New upstream version 0.22.0
authorVasudev Kamath <vasudev@copyninja.info>
Thu, 26 Oct 2017 16:29:03 +0000 (21:59 +0530)
committerVasudev Kamath <vasudev@copyninja.info>
Thu, 26 Oct 2017 16:29:03 +0000 (21:59 +0530)
803 files changed:
1  2 
vendor/advapi32-sys-0.2.0/.cargo-checksum.json
vendor/advapi32-sys-0.2.0/.cargo-ok
vendor/advapi32-sys-0.2.0/Cargo.toml
vendor/advapi32-sys-0.2.0/README.md
vendor/advapi32-sys-0.2.0/build.rs
vendor/advapi32-sys-0.2.0/src/lib.rs
vendor/backtrace-sys-0.1.12/.cargo-checksum.json
vendor/backtrace-sys-0.1.12/.cargo-ok
vendor/backtrace-sys-0.1.12/Cargo.toml
vendor/backtrace-sys-0.1.12/build.rs
vendor/backtrace-sys-0.1.12/src/lib.rs
vendor/backtrace-sys-0.1.12/src/libbacktrace/ChangeLog
vendor/backtrace-sys-0.1.12/src/libbacktrace/ChangeLog.jit
vendor/backtrace-sys-0.1.12/src/libbacktrace/Makefile.am
vendor/backtrace-sys-0.1.12/src/libbacktrace/Makefile.in
vendor/backtrace-sys-0.1.12/src/libbacktrace/README
vendor/backtrace-sys-0.1.12/src/libbacktrace/aclocal.m4
vendor/backtrace-sys-0.1.12/src/libbacktrace/alloc.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/ansidecl.h
vendor/backtrace-sys-0.1.12/src/libbacktrace/atomic.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/backtrace-supported.h.in
vendor/backtrace-sys-0.1.12/src/libbacktrace/backtrace.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/backtrace.h
vendor/backtrace-sys-0.1.12/src/libbacktrace/btest.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/config.guess
vendor/backtrace-sys-0.1.12/src/libbacktrace/config.h.in
vendor/backtrace-sys-0.1.12/src/libbacktrace/config.sub
vendor/backtrace-sys-0.1.12/src/libbacktrace/configure
vendor/backtrace-sys-0.1.12/src/libbacktrace/configure.ac
vendor/backtrace-sys-0.1.12/src/libbacktrace/dwarf.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/dwarf2.def
vendor/backtrace-sys-0.1.12/src/libbacktrace/dwarf2.h
vendor/backtrace-sys-0.1.12/src/libbacktrace/elf.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/fileline.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/filenames.h
vendor/backtrace-sys-0.1.12/src/libbacktrace/filetype.awk
vendor/backtrace-sys-0.1.12/src/libbacktrace/hashtab.h
vendor/backtrace-sys-0.1.12/src/libbacktrace/install-sh
vendor/backtrace-sys-0.1.12/src/libbacktrace/internal.h
vendor/backtrace-sys-0.1.12/src/libbacktrace/ltmain.sh
vendor/backtrace-sys-0.1.12/src/libbacktrace/missing
vendor/backtrace-sys-0.1.12/src/libbacktrace/mmap.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/mmapio.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/nounwind.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/pecoff.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/posix.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/print.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/read.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/simple.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/sort.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/state.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/stest.c
vendor/backtrace-sys-0.1.12/src/libbacktrace/unknown.c
vendor/backtrace-sys-0.1.12/symbol-map
vendor/bitflags-0.7.0/.cargo-checksum.json
vendor/bitflags-0.7.0/.cargo-ok
vendor/bitflags-0.7.0/.travis.yml
vendor/bitflags-0.7.0/Cargo.toml
vendor/bitflags-0.7.0/LICENSE-APACHE
vendor/bitflags-0.7.0/LICENSE-MIT
vendor/bitflags-0.7.0/README.md
vendor/bitflags-0.7.0/src/lib.rs
vendor/bitflags-0.7.0/tests/external.rs
vendor/bitflags-0.7.0/tests/external_no_std.rs
vendor/conv-0.3.3/.cargo-checksum.json
vendor/conv-0.3.3/.cargo-ok
vendor/conv-0.3.3/.travis.yml
vendor/conv-0.3.3/Cargo.toml
vendor/conv-0.3.3/LICENSE
vendor/conv-0.3.3/README.md
vendor/conv-0.3.3/src/errors.rs
vendor/conv-0.3.3/src/impls.rs
vendor/conv-0.3.3/src/lib.rs
vendor/conv-0.3.3/src/macros.rs
vendor/conv-0.3.3/src/misc.rs
vendor/conv-0.3.3/tests/conv_utils.rs
vendor/conv-0.3.3/tests/derive_try_from.rs
vendor/conv-0.3.3/tests/lang_char.rs
vendor/conv-0.3.3/tests/lang_floats.rs
vendor/conv-0.3.3/tests/lang_ints.rs
vendor/conv-0.3.3/tests/unwraps.rs
vendor/conv-0.3.3/tests/use_in_generics.rs
vendor/conv-0.3.3/tests/util/mod.rs
vendor/core-foundation-0.4.4/.cargo-checksum.json
vendor/core-foundation-0.4.4/.cargo-ok
vendor/core-foundation-0.4.4/Cargo.toml
vendor/core-foundation-0.4.4/src/array.rs
vendor/core-foundation-0.4.4/src/base.rs
vendor/core-foundation-0.4.4/src/boolean.rs
vendor/core-foundation-0.4.4/src/bundle.rs
vendor/core-foundation-0.4.4/src/data.rs
vendor/core-foundation-0.4.4/src/dictionary.rs
vendor/core-foundation-0.4.4/src/error.rs
vendor/core-foundation-0.4.4/src/lib.rs
vendor/core-foundation-0.4.4/src/number.rs
vendor/core-foundation-0.4.4/src/propertylist.rs
vendor/core-foundation-0.4.4/src/runloop.rs
vendor/core-foundation-0.4.4/src/set.rs
vendor/core-foundation-0.4.4/src/string.rs
vendor/core-foundation-0.4.4/src/url.rs
vendor/core-foundation-sys-0.4.4/.cargo-checksum.json
vendor/core-foundation-sys-0.4.4/.cargo-ok
vendor/core-foundation-sys-0.4.4/Cargo.toml
vendor/core-foundation-sys-0.4.4/build.rs
vendor/core-foundation-sys-0.4.4/src/array.rs
vendor/core-foundation-sys-0.4.4/src/base.rs
vendor/core-foundation-sys-0.4.4/src/bundle.rs
vendor/core-foundation-sys-0.4.4/src/data.rs
vendor/core-foundation-sys-0.4.4/src/date.rs
vendor/core-foundation-sys-0.4.4/src/dictionary.rs
vendor/core-foundation-sys-0.4.4/src/error.rs
vendor/core-foundation-sys-0.4.4/src/lib.rs
vendor/core-foundation-sys-0.4.4/src/messageport.rs
vendor/core-foundation-sys-0.4.4/src/number.rs
vendor/core-foundation-sys-0.4.4/src/propertylist.rs
vendor/core-foundation-sys-0.4.4/src/runloop.rs
vendor/core-foundation-sys-0.4.4/src/set.rs
vendor/core-foundation-sys-0.4.4/src/string.rs
vendor/core-foundation-sys-0.4.4/src/url.rs
vendor/curl-0.4.8/.cargo-checksum.json
vendor/curl-0.4.8/.cargo-ok
vendor/curl-0.4.8/.gitmodules
vendor/curl-0.4.8/.travis.yml
vendor/curl-0.4.8/Cargo.toml
vendor/curl-0.4.8/LICENSE
vendor/curl-0.4.8/README.md
vendor/curl-0.4.8/appveyor.yml
vendor/curl-0.4.8/ci/.cargo/config
vendor/curl-0.4.8/ci/Dockerfile-linux32
vendor/curl-0.4.8/ci/Dockerfile-linux64
vendor/curl-0.4.8/ci/Dockerfile-linux64-curl
vendor/curl-0.4.8/ci/Dockerfile-mingw
vendor/curl-0.4.8/ci/Dockerfile-musl
vendor/curl-0.4.8/ci/run.sh
vendor/curl-0.4.8/src/easy/form.rs
vendor/curl-0.4.8/src/easy/handle.rs
vendor/curl-0.4.8/src/easy/handler.rs
vendor/curl-0.4.8/src/easy/list.rs
vendor/curl-0.4.8/src/easy/mod.rs
vendor/curl-0.4.8/src/error.rs
vendor/curl-0.4.8/src/lib.rs
vendor/curl-0.4.8/src/multi.rs
vendor/curl-0.4.8/src/panic.rs
vendor/curl-0.4.8/src/version.rs
vendor/curl-0.4.8/tests/easy.rs
vendor/curl-0.4.8/tests/formdata
vendor/curl-0.4.8/tests/multi.rs
vendor/curl-0.4.8/tests/post.rs
vendor/curl-0.4.8/tests/server/mod.rs
vendor/custom_derive-0.1.7/.cargo-checksum.json
vendor/custom_derive-0.1.7/.cargo-ok
vendor/custom_derive-0.1.7/Cargo.toml
vendor/custom_derive-0.1.7/LICENSE
vendor/custom_derive-0.1.7/README.md
vendor/custom_derive-0.1.7/src/lib.rs
vendor/custom_derive-0.1.7/tests/empty_bi_derives.rs
vendor/custom_derive-0.1.7/tests/enum_iterator.rs
vendor/custom_derive-0.1.7/tests/enum_try_from.rs
vendor/custom_derive-0.1.7/tests/passthru_derive.rs
vendor/custom_derive-0.1.7/tests/stable_encodable.rs
vendor/custom_derive-0.1.7/tests/trailing_comma.rs
vendor/error-chain-0.11.0-rc.2/.cargo-checksum.json
vendor/error-chain-0.11.0-rc.2/.cargo-ok
vendor/error-chain-0.11.0-rc.2/.travis.yml
vendor/error-chain-0.11.0-rc.2/CHANGELOG.md
vendor/error-chain-0.11.0-rc.2/Cargo.toml
vendor/error-chain-0.11.0-rc.2/LICENSE-APACHE
vendor/error-chain-0.11.0-rc.2/LICENSE-MIT
vendor/error-chain-0.11.0-rc.2/README.md
vendor/error-chain-0.11.0-rc.2/examples/all.rs
vendor/error-chain-0.11.0-rc.2/examples/chain_err.rs
vendor/error-chain-0.11.0-rc.2/examples/doc.rs
vendor/error-chain-0.11.0-rc.2/examples/quickstart.rs
vendor/error-chain-0.11.0-rc.2/examples/size.rs
vendor/error-chain-0.11.0-rc.2/src/error_chain.rs
vendor/error-chain-0.11.0-rc.2/src/example_generated.rs
vendor/error-chain-0.11.0-rc.2/src/lib.rs
vendor/error-chain-0.11.0-rc.2/src/quick_error.rs
vendor/error-chain-0.11.0-rc.2/src/quick_main.rs
vendor/error-chain-0.11.0-rc.2/tests/quick_main.rs
vendor/error-chain-0.11.0-rc.2/tests/tests.rs
vendor/fnv-1.0.5/.cargo-checksum.json
vendor/fnv-1.0.5/.cargo-ok
vendor/fnv-1.0.5/.travis.yml
vendor/fnv-1.0.5/Cargo.toml
vendor/fnv-1.0.5/README.md
vendor/fnv-1.0.5/lib.rs
vendor/globset-0.2.0/.cargo-checksum.json
vendor/globset-0.2.0/.cargo-ok
vendor/globset-0.2.0/COPYING
vendor/globset-0.2.0/Cargo.toml
vendor/globset-0.2.0/LICENSE-MIT
vendor/globset-0.2.0/README.md
vendor/globset-0.2.0/UNLICENSE
vendor/globset-0.2.0/benches/bench.rs
vendor/globset-0.2.0/src/glob.rs
vendor/globset-0.2.0/src/lib.rs
vendor/globset-0.2.0/src/pathutil.rs
vendor/home-0.3.0/.cargo-checksum.json
vendor/home-0.3.0/.cargo-ok
vendor/home-0.3.0/Cargo.toml
vendor/home-0.3.0/README.md
vendor/home-0.3.0/src/lib.rs
vendor/idna-0.1.4/.cargo-checksum.json
vendor/idna-0.1.4/.cargo-ok
vendor/idna-0.1.4/Cargo.toml
vendor/idna-0.1.4/LICENSE-APACHE
vendor/idna-0.1.4/LICENSE-MIT
vendor/idna-0.1.4/src/IdnaMappingTable.txt
vendor/idna-0.1.4/src/lib.rs
vendor/idna-0.1.4/src/make_uts46_mapping_table.py
vendor/idna-0.1.4/src/punycode.rs
vendor/idna-0.1.4/src/uts46.rs
vendor/idna-0.1.4/src/uts46_mapping_table.rs
vendor/idna-0.1.4/tests/IdnaTest.txt
vendor/idna-0.1.4/tests/punycode.rs
vendor/idna-0.1.4/tests/punycode_tests.json
vendor/idna-0.1.4/tests/tests.rs
vendor/idna-0.1.4/tests/unit.rs
vendor/idna-0.1.4/tests/uts46.rs
vendor/ignore-0.2.2/.cargo-checksum.json
vendor/ignore-0.2.2/.cargo-ok
vendor/ignore-0.2.2/COPYING
vendor/ignore-0.2.2/Cargo.toml
vendor/ignore-0.2.2/LICENSE-MIT
vendor/ignore-0.2.2/README.md
vendor/ignore-0.2.2/UNLICENSE
vendor/ignore-0.2.2/examples/walk.rs
vendor/ignore-0.2.2/src/dir.rs
vendor/ignore-0.2.2/src/gitignore.rs
vendor/ignore-0.2.2/src/lib.rs
vendor/ignore-0.2.2/src/overrides.rs
vendor/ignore-0.2.2/src/pathutil.rs
vendor/ignore-0.2.2/src/types.rs
vendor/ignore-0.2.2/src/walk.rs
vendor/ignore-0.2.2/tests/gitignore_matched_path_or_any_parents_tests.gitignore
vendor/ignore-0.2.2/tests/gitignore_matched_path_or_any_parents_tests.rs
vendor/libc-0.2.28/.cargo-checksum.json
vendor/libc-0.2.28/.cargo-ok
vendor/libc-0.2.28/.travis.yml
vendor/libc-0.2.28/Cargo.toml
vendor/libc-0.2.28/LICENSE-APACHE
vendor/libc-0.2.28/LICENSE-MIT
vendor/libc-0.2.28/README.md
vendor/libc-0.2.28/appveyor.yml
vendor/libc-0.2.28/ci/README.md
vendor/libc-0.2.28/ci/android-accept-licenses.sh
vendor/libc-0.2.28/ci/android-install-ndk.sh
vendor/libc-0.2.28/ci/android-install-sdk.sh
vendor/libc-0.2.28/ci/android-sysimage.sh
vendor/libc-0.2.28/ci/docker/aarch64-linux-android/Dockerfile
vendor/libc-0.2.28/ci/docker/aarch64-unknown-linux-gnu/Dockerfile
vendor/libc-0.2.28/ci/docker/arm-linux-androideabi/Dockerfile
vendor/libc-0.2.28/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile
vendor/libc-0.2.28/ci/docker/i686-linux-android/Dockerfile
vendor/libc-0.2.28/ci/docker/i686-unknown-linux-gnu/Dockerfile
vendor/libc-0.2.28/ci/docker/i686-unknown-linux-musl/Dockerfile
vendor/libc-0.2.28/ci/docker/mips-unknown-linux-gnu/Dockerfile
vendor/libc-0.2.28/ci/docker/mips-unknown-linux-musl/Dockerfile
vendor/libc-0.2.28/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile
vendor/libc-0.2.28/ci/docker/mipsel-unknown-linux-musl/Dockerfile
vendor/libc-0.2.28/ci/docker/powerpc-unknown-linux-gnu/Dockerfile
vendor/libc-0.2.28/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile
vendor/libc-0.2.28/ci/docker/s390x-unknown-linux-gnu/Dockerfile
vendor/libc-0.2.28/ci/docker/x86_64-linux-android/Dockerfile
vendor/libc-0.2.28/ci/docker/x86_64-rumprun-netbsd/Dockerfile
vendor/libc-0.2.28/ci/docker/x86_64-unknown-freebsd/Dockerfile
vendor/libc-0.2.28/ci/docker/x86_64-unknown-linux-gnu/Dockerfile
vendor/libc-0.2.28/ci/docker/x86_64-unknown-linux-musl/Dockerfile
vendor/libc-0.2.28/ci/docker/x86_64-unknown-openbsd/Dockerfile
vendor/libc-0.2.28/ci/dox.sh
vendor/libc-0.2.28/ci/ios/deploy_and_run_on_ios_simulator.rs
vendor/libc-0.2.28/ci/landing-page-footer.html
vendor/libc-0.2.28/ci/landing-page-head.html
vendor/libc-0.2.28/ci/run-docker.sh
vendor/libc-0.2.28/ci/run-qemu.sh
vendor/libc-0.2.28/ci/run.sh
vendor/libc-0.2.28/ci/style.rs
vendor/libc-0.2.28/src/dox.rs
vendor/libc-0.2.28/src/lib.rs
vendor/libc-0.2.28/src/macros.rs
vendor/libc-0.2.28/src/redox.rs
vendor/libc-0.2.28/src/unix/bsd/apple/b32.rs
vendor/libc-0.2.28/src/unix/bsd/apple/b64.rs
vendor/libc-0.2.28/src/unix/bsd/apple/mod.rs
vendor/libc-0.2.28/src/unix/bsd/freebsdlike/dragonfly/mod.rs
vendor/libc-0.2.28/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
vendor/libc-0.2.28/src/unix/bsd/freebsdlike/freebsd/mod.rs
vendor/libc-0.2.28/src/unix/bsd/freebsdlike/freebsd/x86.rs
vendor/libc-0.2.28/src/unix/bsd/freebsdlike/freebsd/x86_64.rs
vendor/libc-0.2.28/src/unix/bsd/freebsdlike/mod.rs
vendor/libc-0.2.28/src/unix/bsd/mod.rs
vendor/libc-0.2.28/src/unix/bsd/netbsdlike/mod.rs
vendor/libc-0.2.28/src/unix/bsd/netbsdlike/netbsd/mod.rs
vendor/libc-0.2.28/src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs
vendor/libc-0.2.28/src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs
vendor/libc-0.2.28/src/unix/bsd/netbsdlike/netbsd/other/mod.rs
vendor/libc-0.2.28/src/unix/bsd/netbsdlike/openbsdlike/bitrig.rs
vendor/libc-0.2.28/src/unix/bsd/netbsdlike/openbsdlike/mod.rs
vendor/libc-0.2.28/src/unix/bsd/netbsdlike/openbsdlike/openbsd.rs
vendor/libc-0.2.28/src/unix/bsd/netbsdlike/openbsdlike/other/b32/mod.rs
vendor/libc-0.2.28/src/unix/bsd/netbsdlike/openbsdlike/other/b64/mod.rs
vendor/libc-0.2.28/src/unix/bsd/netbsdlike/openbsdlike/other/mod.rs
vendor/libc-0.2.28/src/unix/haiku/b32.rs
vendor/libc-0.2.28/src/unix/haiku/b64.rs
vendor/libc-0.2.28/src/unix/haiku/mod.rs
vendor/libc-0.2.28/src/unix/mod.rs
vendor/libc-0.2.28/src/unix/newlib/arm/mod.rs
vendor/libc-0.2.28/src/unix/newlib/mod.rs
vendor/libc-0.2.28/src/unix/notbsd/android/b32/arm.rs
vendor/libc-0.2.28/src/unix/notbsd/android/b32/mod.rs
vendor/libc-0.2.28/src/unix/notbsd/android/b32/x86.rs
vendor/libc-0.2.28/src/unix/notbsd/android/b64/aarch64.rs
vendor/libc-0.2.28/src/unix/notbsd/android/b64/mod.rs
vendor/libc-0.2.28/src/unix/notbsd/android/b64/x86_64.rs
vendor/libc-0.2.28/src/unix/notbsd/android/mod.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/mips/mips32.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/mips/mips64.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/mips/mod.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/mod.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/musl/b32/arm.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/musl/b32/asmjs.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/musl/b32/mips.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/musl/b32/mod.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/musl/b32/x86.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/musl/b64/aarch64.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/musl/b64/mod.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/musl/b64/powerpc64.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/musl/b64/x86_64.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/musl/mod.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/other/b32/arm.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/other/b32/mod.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/other/b32/powerpc.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/other/b32/x86.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/other/b64/aarch64.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/other/b64/mod.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/other/b64/powerpc64.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/other/b64/sparc64.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/other/b64/x86_64.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/other/mod.rs
vendor/libc-0.2.28/src/unix/notbsd/linux/s390x.rs
vendor/libc-0.2.28/src/unix/notbsd/mod.rs
vendor/libc-0.2.28/src/unix/solaris/mod.rs
vendor/libc-0.2.28/src/unix/uclibc/mips/mips32.rs
vendor/libc-0.2.28/src/unix/uclibc/mips/mips64.rs
vendor/libc-0.2.28/src/unix/uclibc/mips/mod.rs
vendor/libc-0.2.28/src/unix/uclibc/mod.rs
vendor/libc-0.2.28/src/unix/uclibc/x86_64/mod.rs
vendor/libc-0.2.28/src/windows.rs
vendor/magenta-0.1.1/.cargo-checksum.json
vendor/magenta-0.1.1/.cargo-ok
vendor/magenta-0.1.1/AUTHORS
vendor/magenta-0.1.1/BUILD.gn
vendor/magenta-0.1.1/CONTRIBUTING.md
vendor/magenta-0.1.1/Cargo.toml
vendor/magenta-0.1.1/GETTING_STARTED.md
vendor/magenta-0.1.1/LICENSE
vendor/magenta-0.1.1/PATENTS
vendor/magenta-0.1.1/README.md
vendor/magenta-0.1.1/examples/BUILD.gn
vendor/magenta-0.1.1/src/channel.rs
vendor/magenta-0.1.1/src/event.rs
vendor/magenta-0.1.1/src/eventpair.rs
vendor/magenta-0.1.1/src/fifo.rs
vendor/magenta-0.1.1/src/job.rs
vendor/magenta-0.1.1/src/lib.rs
vendor/magenta-0.1.1/src/port.rs
vendor/magenta-0.1.1/src/process.rs
vendor/magenta-0.1.1/src/socket.rs
vendor/magenta-0.1.1/src/thread.rs
vendor/magenta-0.1.1/src/timer.rs
vendor/magenta-0.1.1/src/vmo.rs
vendor/magenta-0.1.1/tools/BUILD.gn
vendor/magenta-0.1.1/tools/README.md
vendor/magenta-0.1.1/tools/clang_wrapper.cc
vendor/magenta-0.1.1/tools/gen_status.py
vendor/magenta-sys-0.1.1/.cargo-checksum.json
vendor/magenta-sys-0.1.1/.cargo-ok
vendor/magenta-sys-0.1.1/BUILD.gn
vendor/magenta-sys-0.1.1/Cargo.toml
vendor/magenta-sys-0.1.1/examples/hello.rs
vendor/magenta-sys-0.1.1/src/definitions.rs
vendor/magenta-sys-0.1.1/src/lib.rs
vendor/num-0.1.40/.cargo-checksum.json
vendor/num-0.1.40/.cargo-ok
vendor/num-0.1.40/.travis.yml
vendor/num-0.1.40/Cargo.toml
vendor/num-0.1.40/LICENSE-APACHE
vendor/num-0.1.40/LICENSE-MIT
vendor/num-0.1.40/README.md
vendor/num-0.1.40/benches/bigint.rs
vendor/num-0.1.40/benches/shootout-pidigits.rs
vendor/num-0.1.40/bors.toml
vendor/num-0.1.40/ci/deploy.enc
vendor/num-0.1.40/ci/deploy.sh
vendor/num-0.1.40/ci/rustup.sh
vendor/num-0.1.40/ci/test_full.sh
vendor/num-0.1.40/doc/favicon.ico
vendor/num-0.1.40/doc/index.html
vendor/num-0.1.40/doc/rust-logo-128x128-blk-v2.png
vendor/num-0.1.40/src/lib.rs
vendor/num-bigint-0.1.40/.cargo-checksum.json
vendor/num-bigint-0.1.40/.cargo-ok
vendor/num-bigint-0.1.40/Cargo.toml
vendor/num-bigint-0.1.40/LICENSE-APACHE
vendor/num-bigint-0.1.40/LICENSE-MIT
vendor/num-bigint-0.1.40/src/algorithms.rs
vendor/num-bigint-0.1.40/src/bigint.rs
vendor/num-bigint-0.1.40/src/biguint.rs
vendor/num-bigint-0.1.40/src/lib.rs
vendor/num-bigint-0.1.40/src/macros.rs
vendor/num-bigint-0.1.40/src/tests/bigint.rs
vendor/num-bigint-0.1.40/src/tests/biguint.rs
vendor/num-complex-0.1.40/.cargo-checksum.json
vendor/num-complex-0.1.40/.cargo-ok
vendor/num-complex-0.1.40/Cargo.toml
vendor/num-complex-0.1.40/LICENSE-APACHE
vendor/num-complex-0.1.40/LICENSE-MIT
vendor/num-complex-0.1.40/src/lib.rs
vendor/num-integer-0.1.35/.cargo-checksum.json
vendor/num-integer-0.1.35/.cargo-ok
vendor/num-integer-0.1.35/Cargo.toml
vendor/num-integer-0.1.35/LICENSE-APACHE
vendor/num-integer-0.1.35/LICENSE-MIT
vendor/num-integer-0.1.35/src/lib.rs
vendor/num-iter-0.1.34/.cargo-checksum.json
vendor/num-iter-0.1.34/.cargo-ok
vendor/num-iter-0.1.34/Cargo.toml
vendor/num-iter-0.1.34/LICENSE-APACHE
vendor/num-iter-0.1.34/LICENSE-MIT
vendor/num-iter-0.1.34/src/lib.rs
vendor/num-rational-0.1.39/.cargo-checksum.json
vendor/num-rational-0.1.39/.cargo-ok
vendor/num-rational-0.1.39/Cargo.toml
vendor/num-rational-0.1.39/LICENSE-APACHE
vendor/num-rational-0.1.39/LICENSE-MIT
vendor/num-rational-0.1.39/src/lib.rs
vendor/num-traits-0.1.40/.cargo-checksum.json
vendor/num-traits-0.1.40/.cargo-ok
vendor/num-traits-0.1.40/Cargo.toml
vendor/num-traits-0.1.40/LICENSE-APACHE
vendor/num-traits-0.1.40/LICENSE-MIT
vendor/num-traits-0.1.40/src/bounds.rs
vendor/num-traits-0.1.40/src/cast.rs
vendor/num-traits-0.1.40/src/float.rs
vendor/num-traits-0.1.40/src/identities.rs
vendor/num-traits-0.1.40/src/int.rs
vendor/num-traits-0.1.40/src/lib.rs
vendor/num-traits-0.1.40/src/ops/checked.rs
vendor/num-traits-0.1.40/src/ops/mod.rs
vendor/num-traits-0.1.40/src/ops/saturating.rs
vendor/num-traits-0.1.40/src/ops/wrapping.rs
vendor/num-traits-0.1.40/src/pow.rs
vendor/num-traits-0.1.40/src/sign.rs
vendor/openssl-0.9.15/.cargo-checksum.json
vendor/openssl-0.9.15/.cargo-ok
vendor/openssl-0.9.15/Cargo.toml
vendor/openssl-0.9.15/LICENSE
vendor/openssl-0.9.15/build.rs
vendor/openssl-0.9.15/src/aes.rs
vendor/openssl-0.9.15/src/asn1.rs
vendor/openssl-0.9.15/src/bio.rs
vendor/openssl-0.9.15/src/bn.rs
vendor/openssl-0.9.15/src/conf.rs
vendor/openssl-0.9.15/src/crypto.rs
vendor/openssl-0.9.15/src/dh.rs
vendor/openssl-0.9.15/src/dsa.rs
vendor/openssl-0.9.15/src/ec.rs
vendor/openssl-0.9.15/src/ec_key.rs
vendor/openssl-0.9.15/src/error.rs
vendor/openssl-0.9.15/src/ex_data.rs
vendor/openssl-0.9.15/src/hash.rs
vendor/openssl-0.9.15/src/lib.rs
vendor/openssl-0.9.15/src/macros.rs
vendor/openssl-0.9.15/src/memcmp.rs
vendor/openssl-0.9.15/src/nid.rs
vendor/openssl-0.9.15/src/ocsp.rs
vendor/openssl-0.9.15/src/pkcs12.rs
vendor/openssl-0.9.15/src/pkcs5.rs
vendor/openssl-0.9.15/src/pkey.rs
vendor/openssl-0.9.15/src/rand.rs
vendor/openssl-0.9.15/src/rsa.rs
vendor/openssl-0.9.15/src/sha.rs
vendor/openssl-0.9.15/src/sign.rs
vendor/openssl-0.9.15/src/ssl/bio.rs
vendor/openssl-0.9.15/src/ssl/callbacks.rs
vendor/openssl-0.9.15/src/ssl/connector.rs
vendor/openssl-0.9.15/src/ssl/error.rs
vendor/openssl-0.9.15/src/ssl/mod.rs
vendor/openssl-0.9.15/src/ssl/tests/mod.rs
vendor/openssl-0.9.15/src/ssl/tests/select.rs
vendor/openssl-0.9.15/src/stack.rs
vendor/openssl-0.9.15/src/string.rs
vendor/openssl-0.9.15/src/symm.rs
vendor/openssl-0.9.15/src/types.rs
vendor/openssl-0.9.15/src/util.rs
vendor/openssl-0.9.15/src/verify.rs
vendor/openssl-0.9.15/src/version.rs
vendor/openssl-0.9.15/src/x509/extension.rs
vendor/openssl-0.9.15/src/x509/mod.rs
vendor/openssl-0.9.15/src/x509/store.rs
vendor/openssl-0.9.15/src/x509/tests.rs
vendor/openssl-0.9.15/src/x509/verify.rs
vendor/openssl-0.9.15/test/alt_name_cert.pem
vendor/openssl-0.9.15/test/cert.pem
vendor/openssl-0.9.15/test/certs.pem
vendor/openssl-0.9.15/test/dhparams.pem
vendor/openssl-0.9.15/test/dsa-encrypted.pem
vendor/openssl-0.9.15/test/dsa.pem
vendor/openssl-0.9.15/test/dsa.pem.pub
vendor/openssl-0.9.15/test/dsaparam.pem
vendor/openssl-0.9.15/test/identity.p12
vendor/openssl-0.9.15/test/key.der
vendor/openssl-0.9.15/test/key.der.pub
vendor/openssl-0.9.15/test/key.pem
vendor/openssl-0.9.15/test/key.pem.pub
vendor/openssl-0.9.15/test/keystore-empty-chain.p12
vendor/openssl-0.9.15/test/nid_test_cert.pem
vendor/openssl-0.9.15/test/nid_uid_test_cert.pem
vendor/openssl-0.9.15/test/pkcs8.der
vendor/openssl-0.9.15/test/root-ca.key
vendor/openssl-0.9.15/test/root-ca.pem
vendor/openssl-0.9.15/test/rsa-encrypted.pem
vendor/openssl-0.9.15/test/rsa.pem
vendor/openssl-0.9.15/test/rsa.pem.pub
vendor/openssl-sys-0.9.15/.cargo-checksum.json
vendor/openssl-sys-0.9.15/.cargo-ok
vendor/openssl-sys-0.9.15/Cargo.toml
vendor/openssl-sys-0.9.15/LICENSE-MIT
vendor/openssl-sys-0.9.15/build.rs
vendor/openssl-sys-0.9.15/src/lib.rs
vendor/openssl-sys-0.9.15/src/libressl/mod.rs
vendor/openssl-sys-0.9.15/src/libressl/v250.rs
vendor/openssl-sys-0.9.15/src/libressl/v25x.rs
vendor/openssl-sys-0.9.15/src/ossl10x.rs
vendor/openssl-sys-0.9.15/src/ossl110.rs
vendor/rand-0.3.16/.cargo-checksum.json
vendor/rand-0.3.16/.cargo-ok
vendor/rand-0.3.16/.travis.yml
vendor/rand-0.3.16/Cargo.toml
vendor/rand-0.3.16/LICENSE-APACHE
vendor/rand-0.3.16/LICENSE-MIT
vendor/rand-0.3.16/README.md
vendor/rand-0.3.16/appveyor.yml
vendor/rand-0.3.16/benches/bench.rs
vendor/rand-0.3.16/benches/distributions/exponential.rs
vendor/rand-0.3.16/benches/distributions/gamma.rs
vendor/rand-0.3.16/benches/distributions/mod.rs
vendor/rand-0.3.16/benches/distributions/normal.rs
vendor/rand-0.3.16/src/chacha.rs
vendor/rand-0.3.16/src/distributions/exponential.rs
vendor/rand-0.3.16/src/distributions/gamma.rs
vendor/rand-0.3.16/src/distributions/mod.rs
vendor/rand-0.3.16/src/distributions/normal.rs
vendor/rand-0.3.16/src/distributions/range.rs
vendor/rand-0.3.16/src/distributions/ziggurat_tables.rs
vendor/rand-0.3.16/src/isaac.rs
vendor/rand-0.3.16/src/lib.rs
vendor/rand-0.3.16/src/os.rs
vendor/rand-0.3.16/src/rand_impls.rs
vendor/rand-0.3.16/src/read.rs
vendor/rand-0.3.16/src/reseeding.rs
vendor/same-file-0.1.3/.cargo-checksum.json
vendor/same-file-0.1.3/.cargo-ok
vendor/same-file-0.1.3/.travis.yml
vendor/same-file-0.1.3/COPYING
vendor/same-file-0.1.3/Cargo.toml
vendor/same-file-0.1.3/README.md
vendor/same-file-0.1.3/appveyor.yml
vendor/same-file-0.1.3/examples/is_same_file.rs
vendor/same-file-0.1.3/examples/is_stderr.rs
vendor/same-file-0.1.3/src/lib.rs
vendor/same-file-0.1.3/src/unix.rs
vendor/same-file-0.1.3/src/win.rs
vendor/scopeguard-0.1.2/.cargo-checksum.json
vendor/scopeguard-0.1.2/.cargo-ok
vendor/scopeguard-0.1.2/.travis.yml
vendor/scopeguard-0.1.2/Cargo.toml
vendor/scopeguard-0.1.2/LICENSE-APACHE
vendor/scopeguard-0.1.2/LICENSE-MIT
vendor/scopeguard-0.1.2/README.rst
vendor/scopeguard-0.1.2/src/lib.rs
vendor/serde-1.0.11/.cargo-checksum.json
vendor/serde-1.0.11/.cargo-ok
vendor/serde-1.0.11/Cargo.toml
vendor/serde-1.0.11/LICENSE-APACHE
vendor/serde-1.0.11/LICENSE-MIT
vendor/serde-1.0.11/README.md
vendor/serde-1.0.11/src/de/from_primitive.rs
vendor/serde-1.0.11/src/de/ignored_any.rs
vendor/serde-1.0.11/src/de/impls.rs
vendor/serde-1.0.11/src/de/mod.rs
vendor/serde-1.0.11/src/de/utf8.rs
vendor/serde-1.0.11/src/de/value.rs
vendor/serde-1.0.11/src/export.rs
vendor/serde-1.0.11/src/lib.rs
vendor/serde-1.0.11/src/macros.rs
vendor/serde-1.0.11/src/private/de.rs
vendor/serde-1.0.11/src/private/macros.rs
vendor/serde-1.0.11/src/private/mod.rs
vendor/serde-1.0.11/src/private/ser.rs
vendor/serde-1.0.11/src/ser/impls.rs
vendor/serde-1.0.11/src/ser/impossible.rs
vendor/serde-1.0.11/src/ser/mod.rs
vendor/serde_derive-1.0.11/.cargo-checksum.json
vendor/serde_derive-1.0.11/.cargo-ok
vendor/serde_derive-1.0.11/Cargo.toml
vendor/serde_derive-1.0.11/LICENSE-APACHE
vendor/serde_derive-1.0.11/LICENSE-MIT
vendor/serde_derive-1.0.11/README.md
vendor/serde_derive-1.0.11/src/bound.rs
vendor/serde_derive-1.0.11/src/de.rs
vendor/serde_derive-1.0.11/src/fragment.rs
vendor/serde_derive-1.0.11/src/lib.rs
vendor/serde_derive-1.0.11/src/ser.rs
vendor/toml-0.4.3/.cargo-checksum.json
vendor/toml-0.4.3/.cargo-ok
vendor/toml-0.4.3/.travis.yml
vendor/toml-0.4.3/Cargo.toml
vendor/toml-0.4.3/LICENSE-APACHE
vendor/toml-0.4.3/LICENSE-MIT
vendor/toml-0.4.3/README.md
vendor/toml-0.4.3/examples/decode.rs
vendor/toml-0.4.3/examples/toml2json.rs
vendor/toml-0.4.3/src/datetime.rs
vendor/toml-0.4.3/src/de.rs
vendor/toml-0.4.3/src/lib.rs
vendor/toml-0.4.3/src/ser.rs
vendor/toml-0.4.3/src/tokens.rs
vendor/toml-0.4.3/src/value.rs
vendor/toml-0.4.3/tests/README.md
vendor/toml-0.4.3/tests/backcompat.rs
vendor/toml-0.4.3/tests/datetime.rs
vendor/toml-0.4.3/tests/display-tricky.rs
vendor/toml-0.4.3/tests/display.rs
vendor/toml-0.4.3/tests/formatting.rs
vendor/toml-0.4.3/tests/invalid-encoder-misc.rs
vendor/toml-0.4.3/tests/invalid-encoder/array-mixed-types-ints-and-floats.json
vendor/toml-0.4.3/tests/invalid-misc.rs
vendor/toml-0.4.3/tests/invalid.rs
vendor/toml-0.4.3/tests/invalid/array-mixed-types-arrays-and-ints.toml
vendor/toml-0.4.3/tests/invalid/array-mixed-types-ints-and-floats.toml
vendor/toml-0.4.3/tests/invalid/array-mixed-types-strings-and-ints.toml
vendor/toml-0.4.3/tests/invalid/datetime-malformed-no-leads.toml
vendor/toml-0.4.3/tests/invalid/datetime-malformed-no-secs.toml
vendor/toml-0.4.3/tests/invalid/datetime-malformed-no-t.toml
vendor/toml-0.4.3/tests/invalid/datetime-malformed-with-milli.toml
vendor/toml-0.4.3/tests/invalid/duplicate-key-table.toml
vendor/toml-0.4.3/tests/invalid/duplicate-keys.toml
vendor/toml-0.4.3/tests/invalid/duplicate-tables.toml
vendor/toml-0.4.3/tests/invalid/empty-implicit-table.toml
vendor/toml-0.4.3/tests/invalid/empty-table.toml
vendor/toml-0.4.3/tests/invalid/float-no-leading-zero.toml
vendor/toml-0.4.3/tests/invalid/float-no-trailing-digits.toml
vendor/toml-0.4.3/tests/invalid/key-after-array.toml
vendor/toml-0.4.3/tests/invalid/key-after-table.toml
vendor/toml-0.4.3/tests/invalid/key-empty.toml
vendor/toml-0.4.3/tests/invalid/key-hash.toml
vendor/toml-0.4.3/tests/invalid/key-newline.toml
vendor/toml-0.4.3/tests/invalid/key-open-bracket.toml
vendor/toml-0.4.3/tests/invalid/key-single-open-bracket.toml
vendor/toml-0.4.3/tests/invalid/key-space.toml
vendor/toml-0.4.3/tests/invalid/key-start-bracket.toml
vendor/toml-0.4.3/tests/invalid/key-two-equals.toml
vendor/toml-0.4.3/tests/invalid/string-bad-byte-escape.toml
vendor/toml-0.4.3/tests/invalid/string-bad-escape.toml
vendor/toml-0.4.3/tests/invalid/string-byte-escapes.toml
vendor/toml-0.4.3/tests/invalid/string-no-close.toml
vendor/toml-0.4.3/tests/invalid/table-array-implicit.toml
vendor/toml-0.4.3/tests/invalid/table-array-malformed-bracket.toml
vendor/toml-0.4.3/tests/invalid/table-array-malformed-empty.toml
vendor/toml-0.4.3/tests/invalid/table-empty.toml
vendor/toml-0.4.3/tests/invalid/table-nested-brackets-close.toml
vendor/toml-0.4.3/tests/invalid/table-nested-brackets-open.toml
vendor/toml-0.4.3/tests/invalid/table-whitespace.toml
vendor/toml-0.4.3/tests/invalid/table-with-pound.toml
vendor/toml-0.4.3/tests/invalid/text-after-array-entries.toml
vendor/toml-0.4.3/tests/invalid/text-after-integer.toml
vendor/toml-0.4.3/tests/invalid/text-after-string.toml
vendor/toml-0.4.3/tests/invalid/text-after-table.toml
vendor/toml-0.4.3/tests/invalid/text-before-array-separator.toml
vendor/toml-0.4.3/tests/invalid/text-in-array.toml
vendor/toml-0.4.3/tests/parser.rs
vendor/toml-0.4.3/tests/pretty.rs
vendor/toml-0.4.3/tests/serde.rs
vendor/toml-0.4.3/tests/tables-last.rs
vendor/toml-0.4.3/tests/valid.rs
vendor/toml-0.4.3/tests/valid/array-empty.json
vendor/toml-0.4.3/tests/valid/array-empty.toml
vendor/toml-0.4.3/tests/valid/array-nospaces.json
vendor/toml-0.4.3/tests/valid/array-nospaces.toml
vendor/toml-0.4.3/tests/valid/arrays-hetergeneous.json
vendor/toml-0.4.3/tests/valid/arrays-hetergeneous.toml
vendor/toml-0.4.3/tests/valid/arrays-nested.json
vendor/toml-0.4.3/tests/valid/arrays-nested.toml
vendor/toml-0.4.3/tests/valid/arrays.json
vendor/toml-0.4.3/tests/valid/arrays.toml
vendor/toml-0.4.3/tests/valid/bool.json
vendor/toml-0.4.3/tests/valid/bool.toml
vendor/toml-0.4.3/tests/valid/comments-everywhere.json
vendor/toml-0.4.3/tests/valid/comments-everywhere.toml
vendor/toml-0.4.3/tests/valid/datetime-truncate.json
vendor/toml-0.4.3/tests/valid/datetime-truncate.toml
vendor/toml-0.4.3/tests/valid/datetime.json
vendor/toml-0.4.3/tests/valid/datetime.toml
vendor/toml-0.4.3/tests/valid/empty.json
vendor/toml-0.4.3/tests/valid/empty.toml
vendor/toml-0.4.3/tests/valid/example-bom.toml
vendor/toml-0.4.3/tests/valid/example-v0.3.0.json
vendor/toml-0.4.3/tests/valid/example-v0.3.0.toml
vendor/toml-0.4.3/tests/valid/example-v0.4.0.json
vendor/toml-0.4.3/tests/valid/example-v0.4.0.toml
vendor/toml-0.4.3/tests/valid/example.json
vendor/toml-0.4.3/tests/valid/example.toml
vendor/toml-0.4.3/tests/valid/example2.json
vendor/toml-0.4.3/tests/valid/example2.toml
vendor/toml-0.4.3/tests/valid/float.json
vendor/toml-0.4.3/tests/valid/float.toml
vendor/toml-0.4.3/tests/valid/hard_example.json
vendor/toml-0.4.3/tests/valid/hard_example.toml
vendor/toml-0.4.3/tests/valid/implicit-and-explicit-after.json
vendor/toml-0.4.3/tests/valid/implicit-and-explicit-after.toml
vendor/toml-0.4.3/tests/valid/implicit-and-explicit-before.json
vendor/toml-0.4.3/tests/valid/implicit-and-explicit-before.toml
vendor/toml-0.4.3/tests/valid/implicit-groups.json
vendor/toml-0.4.3/tests/valid/implicit-groups.toml
vendor/toml-0.4.3/tests/valid/integer.json
vendor/toml-0.4.3/tests/valid/integer.toml
vendor/toml-0.4.3/tests/valid/key-equals-nospace.json
vendor/toml-0.4.3/tests/valid/key-equals-nospace.toml
vendor/toml-0.4.3/tests/valid/key-quote-newline.json
vendor/toml-0.4.3/tests/valid/key-quote-newline.toml
vendor/toml-0.4.3/tests/valid/key-space.json
vendor/toml-0.4.3/tests/valid/key-space.toml
vendor/toml-0.4.3/tests/valid/key-special-chars.json
vendor/toml-0.4.3/tests/valid/key-special-chars.toml
vendor/toml-0.4.3/tests/valid/key-with-pound.json
vendor/toml-0.4.3/tests/valid/key-with-pound.toml
vendor/toml-0.4.3/tests/valid/long-float.json
vendor/toml-0.4.3/tests/valid/long-float.toml
vendor/toml-0.4.3/tests/valid/long-integer.json
vendor/toml-0.4.3/tests/valid/long-integer.toml
vendor/toml-0.4.3/tests/valid/multiline-string.json
vendor/toml-0.4.3/tests/valid/multiline-string.toml
vendor/toml-0.4.3/tests/valid/raw-multiline-string.json
vendor/toml-0.4.3/tests/valid/raw-multiline-string.toml
vendor/toml-0.4.3/tests/valid/raw-string.json
vendor/toml-0.4.3/tests/valid/raw-string.toml
vendor/toml-0.4.3/tests/valid/string-empty.json
vendor/toml-0.4.3/tests/valid/string-empty.toml
vendor/toml-0.4.3/tests/valid/string-escapes.json
vendor/toml-0.4.3/tests/valid/string-escapes.toml
vendor/toml-0.4.3/tests/valid/string-simple.json
vendor/toml-0.4.3/tests/valid/string-simple.toml
vendor/toml-0.4.3/tests/valid/string-with-pound.json
vendor/toml-0.4.3/tests/valid/string-with-pound.toml
vendor/toml-0.4.3/tests/valid/table-array-implicit.json
vendor/toml-0.4.3/tests/valid/table-array-implicit.toml
vendor/toml-0.4.3/tests/valid/table-array-many.json
vendor/toml-0.4.3/tests/valid/table-array-many.toml
vendor/toml-0.4.3/tests/valid/table-array-nest-no-keys.json
vendor/toml-0.4.3/tests/valid/table-array-nest-no-keys.toml
vendor/toml-0.4.3/tests/valid/table-array-nest.json
vendor/toml-0.4.3/tests/valid/table-array-nest.toml
vendor/toml-0.4.3/tests/valid/table-array-one.json
vendor/toml-0.4.3/tests/valid/table-array-one.toml
vendor/toml-0.4.3/tests/valid/table-empty.json
vendor/toml-0.4.3/tests/valid/table-empty.toml
vendor/toml-0.4.3/tests/valid/table-multi-empty.json
vendor/toml-0.4.3/tests/valid/table-multi-empty.toml
vendor/toml-0.4.3/tests/valid/table-sub-empty.json
vendor/toml-0.4.3/tests/valid/table-sub-empty.toml
vendor/toml-0.4.3/tests/valid/table-whitespace.json
vendor/toml-0.4.3/tests/valid/table-whitespace.toml
vendor/toml-0.4.3/tests/valid/table-with-pound.json
vendor/toml-0.4.3/tests/valid/table-with-pound.toml
vendor/toml-0.4.3/tests/valid/unicode-escape.json
vendor/toml-0.4.3/tests/valid/unicode-escape.toml
vendor/toml-0.4.3/tests/valid/unicode-literal.json
vendor/toml-0.4.3/tests/valid/unicode-literal.toml
vendor/userenv-sys-0.2.0/.cargo-checksum.json
vendor/userenv-sys-0.2.0/.cargo-ok
vendor/userenv-sys-0.2.0/Cargo.toml
vendor/userenv-sys-0.2.0/README.md
vendor/userenv-sys-0.2.0/build.rs
vendor/userenv-sys-0.2.0/src/lib.rs
vendor/walkdir-1.0.7/.cargo-checksum.json
vendor/walkdir-1.0.7/.cargo-ok
vendor/walkdir-1.0.7/.travis.yml
vendor/walkdir-1.0.7/COPYING
vendor/walkdir-1.0.7/Cargo.toml
vendor/walkdir-1.0.7/LICENSE-MIT
vendor/walkdir-1.0.7/Makefile
vendor/walkdir-1.0.7/README.md
vendor/walkdir-1.0.7/UNLICENSE
vendor/walkdir-1.0.7/appveyor.yml
vendor/walkdir-1.0.7/compare/nftw.c
vendor/walkdir-1.0.7/compare/walk.py
vendor/walkdir-1.0.7/ctags.rust
vendor/walkdir-1.0.7/examples/walkdir.rs
vendor/walkdir-1.0.7/session.vim
vendor/walkdir-1.0.7/src/lib.rs
vendor/walkdir-1.0.7/src/tests.rs

index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..22bddd46709f0aed77fee89ea162b184b0ced1ff
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"e06588080cb19d0acb6739808aafa5f26bfb2ca015b2b6370028b44cf7cb8a9a"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fccf0ad802462fdbdb74fefb710dd191e37207a8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++[package]
++name = "advapi32-sys"
++version = "0.2.0"
++authors = ["Peter Atashian <retep998@gmail.com>"]
++description = "Contains function definitions for the Windows API library advapi32. See winapi for types and constants."
++documentation = "https://retep998.github.io/doc/advapi32/"
++repository = "https://github.com/retep998/winapi-rs"
++readme = "README.md"
++keywords = ["windows", "ffi", "win32"]
++license = "MIT"
++build = "build.rs"
++[lib]
++name = "advapi32"
++[dependencies]
++winapi = { version = "0.2.5", path = "../.." }
++[build-dependencies]
++winapi-build = { version = "0.1.1", path = "../../build" }
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c3d84c3288d9f44c55ee6e359bb4380e45c6d3c0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++# advapi32 #
++Contains function definitions for the Windows API library advapi32. See winapi for types and constants.
++
++```toml
++[dependencies]
++advapi32-sys = "0.1.2"
++```
++
++```rust
++extern crate advapi32;
++```
++
++[Documentation](https://retep998.github.io/doc/advapi32/)
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..639d0b305799e4e61c1e3ff1eaf7223eb1609ff9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++// Copyright © 2015, Peter Atashian
++// Licensed under the MIT License <LICENSE.md>
++extern crate build;
++fn main() {
++    build::link("advapi32", false)
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3c4a5221b7af9fb485b72ca428c0347959938113
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1005 @@@
++// Copyright © 2015, Peter Atashian
++// Licensed under the MIT License <LICENSE.md>
++//! FFI bindings to advapi32.
++#![cfg(windows)]
++extern crate winapi;
++use winapi::*;
++extern "system" {
++    pub fn AbortSystemShutdownA(lpMachineName: LPCSTR) -> BOOL;
++    pub fn AbortSystemShutdownW(lpMachineName: LPWSTR) -> BOOL;
++    // pub fn AccessCheck();
++    // pub fn AccessCheckAndAuditAlarmA();
++    // pub fn AccessCheckAndAuditAlarmW();
++    // pub fn AccessCheckByType();
++    // pub fn AccessCheckByTypeAndAuditAlarmA();
++    // pub fn AccessCheckByTypeAndAuditAlarmW();
++    // pub fn AccessCheckByTypeResultList();
++    // pub fn AccessCheckByTypeResultListAndAuditAlarmA();
++    // pub fn AccessCheckByTypeResultListAndAuditAlarmByHandleA();
++    // pub fn AccessCheckByTypeResultListAndAuditAlarmByHandleW();
++    // pub fn AccessCheckByTypeResultListAndAuditAlarmW();
++    // pub fn AddAccessAllowedAce();
++    // pub fn AddAccessAllowedAceEx();
++    // pub fn AddAccessAllowedObjectAce();
++    // pub fn AddAccessDeniedAce();
++    // pub fn AddAccessDeniedAceEx();
++    // pub fn AddAccessDeniedObjectAce();
++    // pub fn AddAce();
++    // pub fn AddAuditAccessAce();
++    // pub fn AddAuditAccessAceEx();
++    // pub fn AddAuditAccessObjectAce();
++    // pub fn AddConditionalAce();
++    // pub fn AddMandatoryAce();
++    // pub fn AddUsersToEncryptedFile();
++    // pub fn AddUsersToEncryptedFileEx();
++    // pub fn AdjustTokenGroups();
++    pub fn AdjustTokenPrivileges(
++        TokenHandle: HANDLE, DisableAllPrivileges: BOOL, NewState: PTOKEN_PRIVILEGES,
++        BufferLength: DWORD, PreviousState: PTOKEN_PRIVILEGES, ReturnLength: PDWORD,
++    ) -> BOOL;
++    // pub fn AllocateAndInitializeSid();
++    pub fn AllocateLocallyUniqueId(Luid: PLUID) -> BOOL;
++    pub fn AreAllAccessesGranted(GrantedAccess: DWORD, DesiredAccess: DWORD) -> BOOL;
++    pub fn AreAnyAccessesGranted(GrantedAccess: DWORD, DesiredAccess: DWORD) -> BOOL;
++    // pub fn AuditComputeEffectivePolicyBySid();
++    // pub fn AuditComputeEffectivePolicyByToken();
++    // pub fn AuditEnumerateCategories();
++    // pub fn AuditEnumeratePerUserPolicy();
++    // pub fn AuditEnumerateSubCategories();
++    pub fn AuditFree(Buffer: PVOID);
++    // pub fn AuditLookupCategoryGuidFromCategoryId();
++    // pub fn AuditLookupCategoryIdFromCategoryGuid();
++    // pub fn AuditLookupCategoryNameA();
++    // pub fn AuditLookupCategoryNameW();
++    // pub fn AuditLookupSubCategoryNameA();
++    // pub fn AuditLookupSubCategoryNameW();
++    // pub fn AuditQueryGlobalSaclA();
++    // pub fn AuditQueryGlobalSaclW();
++    // pub fn AuditQueryPerUserPolicy();
++    // pub fn AuditQuerySecurity();
++    // pub fn AuditQuerySystemPolicy();
++    // pub fn AuditSetGlobalSaclA();
++    // pub fn AuditSetGlobalSaclW();
++    // pub fn AuditSetPerUserPolicy();
++    // pub fn AuditSetSecurity();
++    // pub fn AuditSetSystemPolicy();
++    // pub fn BackupEventLogA();
++    // pub fn BackupEventLogW();
++    // pub fn BaseRegCloseKey();
++    // pub fn BaseRegCreateKey();
++    // pub fn BaseRegDeleteKeyEx();
++    // pub fn BaseRegDeleteValue();
++    // pub fn BaseRegFlushKey();
++    // pub fn BaseRegGetVersion();
++    // pub fn BaseRegLoadKey();
++    // pub fn BaseRegOpenKey();
++    // pub fn BaseRegRestoreKey();
++    // pub fn BaseRegSaveKeyEx();
++    // pub fn BaseRegSetKeySecurity();
++    // pub fn BaseRegSetValue();
++    // pub fn BaseRegUnLoadKey();
++    // pub fn BuildExplicitAccessWithNameA();
++    // pub fn BuildExplicitAccessWithNameW();
++    // pub fn BuildImpersonateExplicitAccessWithNameA();
++    // pub fn BuildImpersonateExplicitAccessWithNameW();
++    // pub fn BuildImpersonateTrusteeA();
++    // pub fn BuildImpersonateTrusteeW();
++    // pub fn BuildSecurityDescriptorA();
++    // pub fn BuildSecurityDescriptorW();
++    // pub fn BuildTrusteeWithNameA();
++    // pub fn BuildTrusteeWithNameW();
++    // pub fn BuildTrusteeWithObjectsAndNameA();
++    // pub fn BuildTrusteeWithObjectsAndNameW();
++    // pub fn BuildTrusteeWithObjectsAndSidA();
++    // pub fn BuildTrusteeWithObjectsAndSidW();
++    // pub fn BuildTrusteeWithSidA();
++    // pub fn BuildTrusteeWithSidW();
++    // pub fn CancelOverlappedAccess();
++    // pub fn ChangeServiceConfig2A();
++    // pub fn ChangeServiceConfig2W();
++    // pub fn ChangeServiceConfigA();
++    // pub fn ChangeServiceConfigW();
++    // pub fn CheckForHiberboot();
++    // pub fn CheckTokenMembership();
++    // pub fn ClearEventLogA();
++    // pub fn ClearEventLogW();
++    // pub fn CloseCodeAuthzLevel();
++    // pub fn CloseEncryptedFileRaw();
++    // pub fn CloseEventLog();
++    pub fn CloseServiceHandle(hSCObject: SC_HANDLE) -> BOOL;
++    // pub fn CloseThreadWaitChainSession();
++    // pub fn CloseTrace();
++    // pub fn CommandLineFromMsiDescriptor();
++    // pub fn ComputeAccessTokenFromCodeAuthzLevel();
++    pub fn ControlService(
++        hService: SC_HANDLE, dwControl: DWORD, lpServiceStatus: LPSERVICE_STATUS,
++    ) -> BOOL;
++    // pub fn ControlServiceExA();
++    // pub fn ControlServiceExW();
++    // pub fn ControlTraceA();
++    // pub fn ControlTraceW();
++    // pub fn ConvertAccessToSecurityDescriptorA();
++    // pub fn ConvertAccessToSecurityDescriptorW();
++    // pub fn ConvertSDToStringSDDomainW();
++    // pub fn ConvertSDToStringSDRootDomainA();
++    // pub fn ConvertSDToStringSDRootDomainW();
++    // pub fn ConvertSecurityDescriptorToAccessA();
++    // pub fn ConvertSecurityDescriptorToAccessNamedA();
++    // pub fn ConvertSecurityDescriptorToAccessNamedW();
++    // pub fn ConvertSecurityDescriptorToAccessW();
++    // pub fn ConvertSecurityDescriptorToStringSecurityDescriptorA();
++    // pub fn ConvertSecurityDescriptorToStringSecurityDescriptorW();
++    // pub fn ConvertSidToStringSidA();
++    // pub fn ConvertSidToStringSidW();
++    // pub fn ConvertStringSDToSDDomainA();
++    // pub fn ConvertStringSDToSDDomainW();
++    // pub fn ConvertStringSDToSDRootDomainA();
++    // pub fn ConvertStringSDToSDRootDomainW();
++    // pub fn ConvertStringSecurityDescriptorToSecurityDescriptorA();
++    // pub fn ConvertStringSecurityDescriptorToSecurityDescriptorW();
++    // pub fn ConvertStringSidToSidA();
++    // pub fn ConvertStringSidToSidW();
++    // pub fn ConvertToAutoInheritPrivateObjectSecurity();
++    // pub fn CopySid();
++    // pub fn CreateCodeAuthzLevel();
++    // pub fn CreatePrivateObjectSecurity();
++    // pub fn CreatePrivateObjectSecurityEx();
++    // pub fn CreatePrivateObjectSecurityWithMultipleInheritance();
++    // pub fn CreateProcessAsUserA();
++    // pub fn CreateProcessAsUserW();
++    // pub fn CreateProcessWithLogonW();
++    // pub fn CreateProcessWithTokenW();
++    // pub fn CreateRestrictedToken();
++    pub fn CreateServiceA(
++        hSCManager: SC_HANDLE, lpServiceName: LPCSTR, lpDisplayName: LPCSTR,
++        dwDesiredAccess: DWORD, dwServiceType: DWORD, dwStartType: DWORD, dwErrorControl: DWORD,
++        lpBinaryPathName: LPCSTR, lpLoadOrderGroup: LPCSTR, lpdwTagId: LPDWORD,
++        lpDependencies: LPCSTR, lpServiceStartName: LPCSTR, lpPassword: LPCSTR,
++    ) -> SC_HANDLE;
++    pub fn CreateServiceW(
++        hSCManager: SC_HANDLE, lpServiceName: LPCWSTR, lpDisplayName: LPCWSTR,
++        dwDesiredAccess: DWORD, dwServiceType: DWORD, dwStartType: DWORD, dwErrorControl: DWORD,
++        lpBinaryPathName: LPCWSTR, lpLoadOrderGroup: LPCWSTR, lpdwTagId: LPDWORD,
++        lpDependencies: LPCWSTR, lpServiceStartName: LPCWSTR, lpPassword: LPCWSTR,
++    ) -> SC_HANDLE;
++    // pub fn CreateTraceInstanceId();
++    // pub fn CreateWellKnownSid();
++    pub fn CredDeleteA(TargetName: LPCSTR, Type: DWORD, Flags: DWORD) -> BOOL;
++    pub fn CredDeleteW(TargetName: LPCWSTR, Type: DWORD, Flags: DWORD) -> BOOL;
++    // pub fn CredEnumerateA();
++    // pub fn CredEnumerateW();
++    // pub fn CredFindBestCredentialA();
++    // pub fn CredFindBestCredentialW();
++    pub fn CredFree(Buffer: PVOID);
++    // pub fn CredGetSessionTypes();
++    // pub fn CredGetTargetInfoA();
++    // pub fn CredGetTargetInfoW();
++    // pub fn CredIsMarshaledCredentialA();
++    // pub fn CredIsMarshaledCredentialW();
++    // pub fn CredIsProtectedA();
++    // pub fn CredIsProtectedW();
++    // pub fn CredMarshalCredentialA();
++    // pub fn CredMarshalCredentialW();
++    // pub fn CredProtectA();
++    // pub fn CredProtectW();
++    pub fn CredReadA(
++        TargetName: LPCSTR, Type: DWORD, Flags: DWORD, Credential: *mut PCREDENTIALA,
++    ) -> BOOL;
++    // pub fn CredReadDomainCredentialsA();
++    // pub fn CredReadDomainCredentialsW();
++    pub fn CredReadW(
++        TargetName: LPCWSTR, Type: DWORD, Flags: DWORD, Credential: *mut PCREDENTIALW,
++    ) -> BOOL;
++    // pub fn CredRenameA();
++    // pub fn CredRenameW();
++    // pub fn CredUnmarshalCredentialA();
++    // pub fn CredUnmarshalCredentialW();
++    // pub fn CredUnprotectA();
++    // pub fn CredUnprotectW();
++    pub fn CredWriteA(Credential: PCREDENTIALA, Flags: DWORD) -> BOOL;
++    // pub fn CredWriteDomainCredentialsA();
++    // pub fn CredWriteDomainCredentialsW();
++    pub fn CredWriteW(Credential: PCREDENTIALW, Flags: DWORD) -> BOOL;
++    pub fn CryptAcquireContextA(
++        phProv: *mut HCRYPTPROV, szContainer: LPCSTR, szProvider: LPCSTR, dwProvType: DWORD,
++        dwFlags: DWORD,
++    ) -> BOOL;
++    pub fn CryptAcquireContextW(
++        phProv: *mut HCRYPTPROV, szContainer: LPCWSTR, szProvider: LPCWSTR, dwProvType: DWORD,
++        dwFlags: DWORD,
++    ) -> BOOL;
++    pub fn CryptContextAddRef(hProv: HCRYPTPROV, pdwReserved: *mut DWORD, dwFlags: DWORD) -> BOOL;
++    pub fn CryptCreateHash(
++        hProv: HCRYPTPROV, Algid: ALG_ID, hKey: HCRYPTKEY, dwFlags: DWORD, phHash: *mut HCRYPTHASH,
++    ) -> BOOL;
++    pub fn CryptDecrypt(
++        hKey: HCRYPTKEY, hHash: HCRYPTHASH, Final: BOOL, dwFlags: DWORD, pbData: *mut BYTE,
++        pdwDataLen: *mut DWORD,
++    ) -> BOOL;
++    pub fn CryptDeriveKey(
++        hProv: HCRYPTPROV, Algid: ALG_ID, hBaseData: HCRYPTHASH, dwFlags: DWORD,
++        phKey: *mut HCRYPTKEY,
++    ) -> BOOL;
++    pub fn CryptDestroyHash(hHash: HCRYPTHASH) -> BOOL;
++    pub fn CryptDestroyKey(hKey: HCRYPTKEY) -> BOOL;
++    pub fn CryptDuplicateHash(
++        hHash: HCRYPTHASH, pdwReserved: *mut DWORD, dwFlags: DWORD, phHash: *mut HCRYPTHASH,
++    ) -> BOOL;
++    pub fn CryptDuplicateKey(
++        hKey: HCRYPTKEY, pdwReserved: *mut DWORD, dwFlags: DWORD, phKey: *mut HCRYPTKEY,
++    ) -> BOOL;
++    pub fn CryptEncrypt(
++        hKey: HCRYPTKEY, hHash: HCRYPTHASH, Final: BOOL, dwFlags: DWORD, pbData: *mut BYTE,
++        pdwDataLen: *mut DWORD, dwBufLen: DWORD,
++    ) -> BOOL;
++    pub fn CryptEnumProviderTypesA(
++        dwIndex: DWORD, pdwReserved: *mut DWORD, dwFlags: DWORD, pdwProvType: *mut DWORD,
++        szTypeName: LPSTR, pcbTypeName: *mut DWORD,
++    ) -> BOOL;
++    pub fn CryptEnumProviderTypesW(
++        dwIndex: DWORD, pdwReserved: *mut DWORD, dwFlags: DWORD, pdwProvType: *mut DWORD,
++        szTypeName: LPWSTR, pcbTypeName: *mut DWORD,
++    ) -> BOOL;
++    pub fn CryptEnumProvidersA(
++        dwIndex: DWORD, pdwReserved: *mut DWORD, dwFlags: DWORD, pdwProvType: *mut DWORD,
++        szProvName: LPSTR, pcbProvName: *mut DWORD,
++    ) -> BOOL;
++    pub fn CryptEnumProvidersW(
++        dwIndex: DWORD, pdwReserved: *mut DWORD, dwFlags: DWORD, pdwProvType: *mut DWORD,
++        szProvName: LPWSTR, pcbProvName: *mut DWORD,
++    ) -> BOOL;
++    pub fn CryptExportKey(
++        hKey: HCRYPTKEY, hExpKey: HCRYPTKEY, dwBlobType: DWORD, dwFlags: DWORD, pbData: *mut BYTE,
++        pdwDataLen: *mut DWORD,
++    ) -> BOOL;
++    pub fn CryptGenKey(
++        hProv: HCRYPTPROV, Algid: ALG_ID, dwFlags: DWORD, phKey: *mut HCRYPTKEY,
++    ) -> BOOL;
++    pub fn CryptGenRandom(hProv: HCRYPTPROV, dwLen: DWORD, pbBuffer: *mut BYTE) -> BOOL;
++    pub fn CryptGetDefaultProviderA(
++        dwProvType: DWORD, pdwReserved: *mut DWORD, dwFlags: DWORD, pszProvName: LPSTR,
++        pcbProvName: *mut DWORD,
++    ) -> BOOL;
++    pub fn CryptGetDefaultProviderW(
++        dwProvType: DWORD, pdwReserved: *mut DWORD, dwFlags: DWORD, pszProvName: LPWSTR,
++        pcbProvName: *mut DWORD,
++    ) -> BOOL;
++    pub fn CryptGetHashParam(
++        hHash: HCRYPTHASH, dwParam: DWORD, pbData: *mut BYTE, pdwDataLen: *mut DWORD,
++        dwFlags: DWORD,
++    ) -> BOOL;
++    pub fn CryptGetKeyParam(
++        hKey: HCRYPTKEY, dwParam: DWORD, pbData: *mut BYTE, pdwDataLen: *mut DWORD, dwFlags: DWORD,
++    ) -> BOOL;
++    pub fn CryptGetProvParam(
++        hProv: HCRYPTPROV, dwParam: DWORD, pbData: *mut BYTE, pdwDataLen: *mut DWORD,
++        dwFlags: DWORD,
++    ) -> BOOL;
++    pub fn CryptGetUserKey(hProv: HCRYPTPROV, dwKeySpec: DWORD, phUserKey: *mut HCRYPTKEY) -> BOOL;
++    pub fn CryptHashData(
++        hHash: HCRYPTHASH, pbData: *const BYTE, dwDataLen: DWORD, dwFlags: DWORD,
++    ) -> BOOL;
++    pub fn CryptHashSessionKey(hHash: HCRYPTHASH, hKey: HCRYPTKEY, dwFlags: DWORD) -> BOOL;
++    pub fn CryptImportKey(
++        hProv: HCRYPTPROV, pbData: *const BYTE, dwDataLen: DWORD, hPubKey: HCRYPTKEY,
++        dwFlags: DWORD, phKey: *mut HCRYPTKEY,
++    ) -> BOOL;
++    pub fn CryptReleaseContext(hProv: HCRYPTPROV, dwFlags: DWORD) -> BOOL;
++    pub fn CryptSetHashParam(
++        hHash: HCRYPTHASH, dwParam: DWORD, pbData: *const BYTE, dwFlags: DWORD,
++    ) -> BOOL;
++    pub fn CryptSetKeyParam(
++        hKey: HCRYPTKEY, dwParam: DWORD, pbData: *const BYTE, dwFlags: DWORD,
++    ) -> BOOL;
++    pub fn CryptSetProvParam(
++        hProv: HCRYPTPROV, dwParam: DWORD, pbData: *const BYTE, dwFlags: DWORD,
++    ) -> BOOL;
++    pub fn CryptSetProviderA(pszProvName: LPCSTR, dwProvType: DWORD) -> BOOL;
++    pub fn CryptSetProviderExA(
++        pszProvName: LPCSTR, dwProvType: DWORD, pdwReserved: *mut DWORD, dwFlags: DWORD,
++    ) -> BOOL;
++    pub fn CryptSetProviderExW(
++        pszProvName: LPCWSTR, dwProvType: DWORD, pdwReserved: *mut DWORD, dwFlags: DWORD,
++    ) -> BOOL;
++    pub fn CryptSetProviderW(pszProvName: LPCWSTR, dwProvType: DWORD) -> BOOL;
++    pub fn CryptSignHashA(
++        hHash: HCRYPTHASH, dwKeySpec: DWORD, szDescription: LPCSTR, dwFlags: DWORD,
++        pbSignature: *mut BYTE, pdwSigLen: *mut DWORD,
++    ) -> BOOL;
++    pub fn CryptSignHashW(
++        hHash: HCRYPTHASH, dwKeySpec: DWORD, szDescription: LPCWSTR, dwFlags: DWORD,
++        pbSignature: *mut BYTE, pdwSigLen: *mut DWORD,
++    ) -> BOOL;
++    pub fn CryptVerifySignatureA(
++        hHash: HCRYPTHASH, pbSignature: *const BYTE, dwSigLen: DWORD, hPubKey: HCRYPTKEY,
++        szDescription: LPCSTR, dwFlags: DWORD,
++    ) -> BOOL;
++    pub fn CryptVerifySignatureW(
++        hHash: HCRYPTHASH, pbSignature: *const BYTE, dwSigLen: DWORD, hPubKey: HCRYPTKEY,
++        szDescription: LPCWSTR, dwFlags: DWORD,
++    ) -> BOOL;
++    // pub fn DecryptFileA();
++    // pub fn DecryptFileW();
++    // pub fn DeleteAce();
++    pub fn DeleteService(hService: SC_HANDLE) -> BOOL;
++    // pub fn DeregisterEventSource();
++    // pub fn DestroyPrivateObjectSecurity();
++    // pub fn DuplicateEncryptionInfoFile();
++    // pub fn DuplicateToken();
++    // pub fn DuplicateTokenEx();
++    // pub fn ElfBackupEventLogFileA();
++    // pub fn ElfBackupEventLogFileW();
++    // pub fn ElfChangeNotify();
++    // pub fn ElfClearEventLogFileA();
++    // pub fn ElfClearEventLogFileW();
++    // pub fn ElfCloseEventLog();
++    // pub fn ElfDeregisterEventSource();
++    // pub fn ElfFlushEventLog();
++    // pub fn ElfNumberOfRecords();
++    // pub fn ElfOldestRecord();
++    // pub fn ElfOpenBackupEventLogA();
++    // pub fn ElfOpenBackupEventLogW();
++    // pub fn ElfOpenEventLogA();
++    // pub fn ElfOpenEventLogW();
++    // pub fn ElfReadEventLogA();
++    // pub fn ElfReadEventLogW();
++    // pub fn ElfRegisterEventSourceA();
++    // pub fn ElfRegisterEventSourceW();
++    // pub fn ElfReportEventA();
++    // pub fn ElfReportEventAndSourceW();
++    // pub fn ElfReportEventW();
++    // pub fn EnableTrace();
++    // pub fn EnableTraceEx();
++    // pub fn EnableTraceEx2();
++    // pub fn EncryptFileA();
++    // pub fn EncryptFileW();
++    // pub fn EncryptedFileKeyInfo();
++    // pub fn EncryptionDisable();
++    // pub fn EnumDependentServicesA();
++    // pub fn EnumDependentServicesW();
++    // pub fn EnumDynamicTimeZoneInformation();
++    // pub fn EnumServiceGroupW();
++    // pub fn EnumServicesStatusA();
++    // pub fn EnumServicesStatusExA();
++    // pub fn EnumServicesStatusExW();
++    // pub fn EnumServicesStatusW();
++    // pub fn EnumerateTraceGuids();
++    // pub fn EnumerateTraceGuidsEx();
++    // pub fn EqualDomainSid();
++    // pub fn EqualPrefixSid();
++    // pub fn EqualSid();
++    // pub fn EtwLogSysConfigExtension();
++    // pub fn EventAccessControl();
++    // pub fn EventAccessQuery();
++    // pub fn EventAccessRemove();
++    // pub fn EventActivityIdControl();
++    // pub fn EventEnabled();
++    // pub fn EventProviderEnabled();
++    // pub fn EventRegister();
++    // pub fn EventSetInformation();
++    // pub fn EventUnregister();
++    // pub fn EventWrite();
++    // pub fn EventWriteEndScenario();
++    // pub fn EventWriteEx();
++    // pub fn EventWriteStartScenario();
++    // pub fn EventWriteString();
++    // pub fn EventWriteTransfer();
++    // pub fn FileEncryptionStatusA();
++    // pub fn FileEncryptionStatusW();
++    // pub fn FindFirstFreeAce();
++    // pub fn FlushEfsCache();
++    // pub fn FlushTraceA();
++    // pub fn FlushTraceW();
++    // pub fn FreeEncryptedFileKeyInfo();
++    // pub fn FreeEncryptedFileMetadata();
++    // pub fn FreeEncryptionCertificateHashList();
++    // pub fn FreeInheritedFromArray();
++    // pub fn FreeSid();
++    // pub fn GetAccessPermissionsForObjectA();
++    // pub fn GetAccessPermissionsForObjectW();
++    // pub fn GetAce();
++    // pub fn GetAclInformation();
++    // pub fn GetAuditedPermissionsFromAclA();
++    // pub fn GetAuditedPermissionsFromAclW();
++    pub fn GetCurrentHwProfileA(lpHwProfileInfo: LPHW_PROFILE_INFOA) -> BOOL;
++    pub fn GetCurrentHwProfileW(lpHwProfileInfo: LPHW_PROFILE_INFOW) -> BOOL;
++    // pub fn GetDynamicTimeZoneInformationEffectiveYears();
++    // pub fn GetEffectiveRightsFromAclA();
++    // pub fn GetEffectiveRightsFromAclW();
++    // pub fn GetEncryptedFileMetadata();
++    // pub fn GetEventLogInformation();
++    // pub fn GetExplicitEntriesFromAclA();
++    // pub fn GetExplicitEntriesFromAclW();
++    // pub fn GetFileSecurityA();
++    // pub fn GetFileSecurityW();
++    // pub fn GetInformationCodeAuthzLevelW();
++    // pub fn GetInformationCodeAuthzPolicyW();
++    // pub fn GetInheritanceSourceA();
++    // pub fn GetInheritanceSourceW();
++    // pub fn GetKernelObjectSecurity();
++    // pub fn GetLengthSid();
++    // pub fn GetLocalManagedApplicationData();
++    // pub fn GetLocalManagedApplications();
++    // pub fn GetManagedApplicationCategories();
++    // pub fn GetManagedApplications();
++    // pub fn GetMultipleTrusteeA();
++    // pub fn GetMultipleTrusteeOperationA();
++    // pub fn GetMultipleTrusteeOperationW();
++    // pub fn GetMultipleTrusteeW();
++    // pub fn GetNamedSecurityInfoA();
++    // pub fn GetNamedSecurityInfoExA();
++    // pub fn GetNamedSecurityInfoExW();
++    // pub fn GetNamedSecurityInfoW();
++    // pub fn GetNumberOfEventLogRecords();
++    // pub fn GetOldestEventLogRecord();
++    // pub fn GetOverlappedAccessResults();
++    // pub fn GetPrivateObjectSecurity();
++    // pub fn GetSecurityDescriptorControl();
++    // pub fn GetSecurityDescriptorDacl();
++    // pub fn GetSecurityDescriptorGroup();
++    // pub fn GetSecurityDescriptorLength();
++    // pub fn GetSecurityDescriptorOwner();
++    // pub fn GetSecurityDescriptorRMControl();
++    // pub fn GetSecurityDescriptorSacl();
++    // pub fn GetSecurityInfo();
++    // pub fn GetSecurityInfoExA();
++    // pub fn GetSecurityInfoExW();
++    // pub fn GetServiceDisplayNameA();
++    // pub fn GetServiceDisplayNameW();
++    // pub fn GetServiceKeyNameA();
++    // pub fn GetServiceKeyNameW();
++    // pub fn GetSidIdentifierAuthority();
++    // pub fn GetSidLengthRequired();
++    // pub fn GetSidSubAuthority();
++    // pub fn GetSidSubAuthorityCount();
++    // pub fn GetStringConditionFromBinary();
++    // pub fn GetThreadWaitChain();
++    // pub fn GetTokenInformation();
++    // pub fn GetTraceEnableFlags();
++    // pub fn GetTraceEnableLevel();
++    // pub fn GetTraceLoggerHandle();
++    // pub fn GetTrusteeFormA();
++    // pub fn GetTrusteeFormW();
++    // pub fn GetTrusteeNameA();
++    // pub fn GetTrusteeNameW();
++    // pub fn GetTrusteeTypeA();
++    // pub fn GetTrusteeTypeW();
++    pub fn GetUserNameA(lpBuffer: LPSTR, pcbBuffer: LPDWORD) -> BOOL;
++    pub fn GetUserNameW(lpBuffer: LPWSTR, pcbBuffer: LPDWORD) -> BOOL;
++    // pub fn GetWindowsAccountDomainSid();
++    // pub fn I_ScSetServiceBitsA();
++    // pub fn I_ScSetServiceBitsW();
++    // pub fn IdentifyCodeAuthzLevelW();
++    // pub fn ImpersonateAnonymousToken();
++    // pub fn ImpersonateLoggedOnUser();
++    // pub fn ImpersonateNamedPipeClient();
++    // pub fn ImpersonateSelf();
++    // pub fn InitializeAcl();
++    // pub fn InitializeSecurityDescriptor();
++    // pub fn InitializeSid();
++    // pub fn InitiateShutdownA();
++    // pub fn InitiateShutdownW();
++    // pub fn InitiateSystemShutdownA();
++    // pub fn InitiateSystemShutdownExA();
++    // pub fn InitiateSystemShutdownExW();
++    // pub fn InitiateSystemShutdownW();
++    // pub fn InstallApplication();
++    // pub fn IsTextUnicode();
++    // pub fn IsTokenRestricted();
++    // pub fn IsTokenUntrusted();
++    // pub fn IsValidAcl();
++    // pub fn IsValidRelativeSecurityDescriptor();
++    // pub fn IsValidSecurityDescriptor();
++    // pub fn IsValidSid();
++    // pub fn IsWellKnownSid();
++    // pub fn LockServiceDatabase();
++    // pub fn LogonUserA();
++    // pub fn LogonUserExA();
++    // pub fn LogonUserExExW();
++    // pub fn LogonUserExW();
++    // pub fn LogonUserW();
++    // pub fn LookupAccountNameA();
++    // pub fn LookupAccountNameW();
++    // pub fn LookupAccountSidA();
++    // pub fn LookupAccountSidW();
++    // pub fn LookupPrivilegeDisplayNameA();
++    // pub fn LookupPrivilegeDisplayNameW();
++    pub fn LookupPrivilegeNameA(
++        lpSystemName: LPCSTR, lpLuid: PLUID, lpName: LPSTR, cchName: LPDWORD,
++    ) -> BOOL;
++    pub fn LookupPrivilegeNameW(
++        lpSystemName: LPCWSTR, lpLuid: PLUID, lpName: LPWSTR, cchName: LPDWORD,
++    ) -> BOOL;
++    pub fn LookupPrivilegeValueA(
++        lpSystemName: LPCSTR, lpName: LPCSTR, lpLuid: PLUID,
++    ) -> BOOL;
++    pub fn LookupPrivilegeValueW(
++        lpSystemName: LPCWSTR, lpName: LPCWSTR, lpLuid: PLUID,
++    ) -> BOOL;
++    // pub fn LookupSecurityDescriptorPartsA();
++    // pub fn LookupSecurityDescriptorPartsW();
++    // pub fn LsaAddAccountRights();
++    // pub fn LsaAddPrivilegesToAccount();
++    // pub fn LsaClearAuditLog();
++    // pub fn LsaClose();
++    // pub fn LsaCreateAccount();
++    // pub fn LsaCreateSecret();
++    // pub fn LsaCreateTrustedDomain();
++    // pub fn LsaCreateTrustedDomainEx();
++    // pub fn LsaDelete();
++    // pub fn LsaDeleteTrustedDomain();
++    // pub fn LsaEnumerateAccountRights();
++    // pub fn LsaEnumerateAccounts();
++    // pub fn LsaEnumerateAccountsWithUserRight();
++    // pub fn LsaEnumeratePrivileges();
++    // pub fn LsaEnumeratePrivilegesOfAccount();
++    // pub fn LsaEnumerateTrustedDomains();
++    // pub fn LsaEnumerateTrustedDomainsEx();
++    // pub fn LsaFreeMemory();
++    // pub fn LsaGetAppliedCAPIDs();
++    // pub fn LsaGetQuotasForAccount();
++    // pub fn LsaGetRemoteUserName();
++    // pub fn LsaGetSystemAccessAccount();
++    // pub fn LsaGetUserName();
++    // pub fn LsaICLookupNames();
++    // pub fn LsaICLookupNamesWithCreds();
++    // pub fn LsaICLookupSids();
++    // pub fn LsaICLookupSidsWithCreds();
++    // pub fn LsaLookupNames();
++    // pub fn LsaLookupNames2();
++    // pub fn LsaLookupPrivilegeDisplayName();
++    // pub fn LsaLookupPrivilegeName();
++    // pub fn LsaLookupPrivilegeValue();
++    // pub fn LsaLookupSids();
++    // pub fn LsaLookupSids2();
++    // pub fn LsaManageSidNameMapping();
++    // pub fn LsaNtStatusToWinError();
++    // pub fn LsaOpenAccount();
++    // pub fn LsaOpenPolicy();
++    // pub fn LsaOpenPolicySce();
++    // pub fn LsaOpenSecret();
++    // pub fn LsaOpenTrustedDomain();
++    // pub fn LsaOpenTrustedDomainByName();
++    // pub fn LsaQueryCAPs();
++    // pub fn LsaQueryDomainInformationPolicy();
++    // pub fn LsaQueryForestTrustInformation();
++    // pub fn LsaQueryInfoTrustedDomain();
++    // pub fn LsaQueryInformationPolicy();
++    // pub fn LsaQuerySecret();
++    // pub fn LsaQuerySecurityObject();
++    // pub fn LsaQueryTrustedDomainInfo();
++    // pub fn LsaQueryTrustedDomainInfoByName();
++    // pub fn LsaRemoveAccountRights();
++    // pub fn LsaRemovePrivilegesFromAccount();
++    // pub fn LsaRetrievePrivateData();
++    // pub fn LsaSetCAPs();
++    // pub fn LsaSetDomainInformationPolicy();
++    // pub fn LsaSetForestTrustInformation();
++    // pub fn LsaSetInformationPolicy();
++    // pub fn LsaSetInformationTrustedDomain();
++    // pub fn LsaSetQuotasForAccount();
++    // pub fn LsaSetSecret();
++    // pub fn LsaSetSecurityObject();
++    // pub fn LsaSetSystemAccessAccount();
++    // pub fn LsaSetTrustedDomainInfoByName();
++    // pub fn LsaSetTrustedDomainInformation();
++    // pub fn LsaStorePrivateData();
++    // pub fn MIDL_user_free_Ext();
++    // pub fn MSChapSrvChangePassword();
++    // pub fn MSChapSrvChangePassword2();
++    // pub fn MakeAbsoluteSD();
++    // pub fn MakeAbsoluteSD2();
++    // pub fn MakeSelfRelativeSD();
++    // pub fn MapGenericMask();
++    // pub fn NotifyBootConfigStatus();
++    // pub fn NotifyChangeEventLog();
++    // pub fn NotifyServiceStatusChange();
++    // pub fn NotifyServiceStatusChangeA();
++    // pub fn NotifyServiceStatusChangeW();
++    // pub fn ObjectCloseAuditAlarmA();
++    // pub fn ObjectCloseAuditAlarmW();
++    // pub fn ObjectDeleteAuditAlarmA();
++    // pub fn ObjectDeleteAuditAlarmW();
++    // pub fn ObjectOpenAuditAlarmA();
++    // pub fn ObjectOpenAuditAlarmW();
++    // pub fn ObjectPrivilegeAuditAlarmA();
++    // pub fn ObjectPrivilegeAuditAlarmW();
++    // pub fn OpenBackupEventLogA();
++    // pub fn OpenBackupEventLogW();
++    // pub fn OpenEncryptedFileRawA();
++    // pub fn OpenEncryptedFileRawW();
++    // pub fn OpenEventLogA();
++    // pub fn OpenEventLogW();
++    pub fn OpenProcessToken(
++        ProcessHandle: HANDLE, DesiredAccess: DWORD, TokenHandle: PHANDLE,
++    ) -> BOOL;
++    pub fn OpenSCManagerA(
++        lpMachineName: LPCSTR, lpDatabaseName: LPCSTR, dwDesiredAccess: DWORD,
++    ) -> SC_HANDLE;
++    pub fn OpenSCManagerW(
++        lpMachineName: LPCWSTR, lpDatabaseName: LPCWSTR, dwDesiredAccess: DWORD,
++    ) -> SC_HANDLE;
++    pub fn OpenServiceA(
++        hSCManager: SC_HANDLE, lpServiceName: LPCSTR, dwDesiredAccess: DWORD,
++    ) -> SC_HANDLE;
++    pub fn OpenServiceW(
++        hSCManager: SC_HANDLE, lpServiceName: LPCWSTR, dwDesiredAccess: DWORD,
++    ) -> SC_HANDLE;
++    // pub fn OpenThreadToken();
++    // pub fn OpenThreadWaitChainSession();
++    // pub fn OpenTraceA();
++    // pub fn OpenTraceW();
++    // pub fn OperationEnd();
++    // pub fn OperationStart();
++    // pub fn PerfAddCounters();
++    // pub fn PerfCloseQueryHandle();
++    // pub fn PerfCreateInstance();
++    // pub fn PerfDecrementULongCounterValue();
++    // pub fn PerfDecrementULongLongCounterValue();
++    // pub fn PerfDeleteCounters();
++    // pub fn PerfDeleteInstance();
++    // pub fn PerfEnumerateCounterSet();
++    // pub fn PerfEnumerateCounterSetInstances();
++    // pub fn PerfIncrementULongCounterValue();
++    // pub fn PerfIncrementULongLongCounterValue();
++    // pub fn PerfOpenQueryHandle();
++    // pub fn PerfQueryCounterData();
++    // pub fn PerfQueryCounterInfo();
++    // pub fn PerfQueryCounterSetRegistrationInfo();
++    // pub fn PerfQueryInstance();
++    // pub fn PerfRegCloseKey();
++    // pub fn PerfRegEnumKey();
++    // pub fn PerfRegEnumValue();
++    // pub fn PerfRegQueryInfoKey();
++    // pub fn PerfRegQueryValue();
++    // pub fn PerfRegSetValue();
++    // pub fn PerfSetCounterRefValue();
++    // pub fn PerfSetCounterSetInfo();
++    // pub fn PerfSetULongCounterValue();
++    // pub fn PerfSetULongLongCounterValue();
++    // pub fn PerfStartProvider();
++    // pub fn PerfStartProviderEx();
++    // pub fn PerfStopProvider();
++    // pub fn PrivilegeCheck();
++    // pub fn PrivilegedServiceAuditAlarmA();
++    // pub fn PrivilegedServiceAuditAlarmW();
++    // pub fn ProcessTrace();
++    // pub fn QueryAllTracesA();
++    // pub fn QueryAllTracesW();
++    // pub fn QueryRecoveryAgentsOnEncryptedFile();
++    // pub fn QuerySecurityAccessMask();
++    // pub fn QueryServiceConfig2A();
++    // pub fn QueryServiceConfig2W();
++    // pub fn QueryServiceConfigA();
++    // pub fn QueryServiceConfigW();
++    // pub fn QueryServiceDynamicInformation();
++    // pub fn QueryServiceLockStatusA();
++    // pub fn QueryServiceLockStatusW();
++    // pub fn QueryServiceObjectSecurity();
++    pub fn QueryServiceStatus(hService: SC_HANDLE, lpServiceStatus: LPSERVICE_STATUS) -> BOOL;
++    pub fn QueryServiceStatusEx(
++        hService: SC_HANDLE, InfoLevel: SC_STATUS_TYPE, lpBuffer: LPBYTE, cbBufSize: DWORD,
++        pcbBytesNeeded: LPDWORD,
++    ) -> BOOL;
++    // pub fn QueryTraceA();
++    // pub fn QueryTraceW();
++    // pub fn QueryUsersOnEncryptedFile();
++    // pub fn ReadEncryptedFileRaw();
++    // pub fn ReadEventLogA();
++    // pub fn ReadEventLogW();
++    pub fn RegCloseKey(hKey: HKEY) -> LONG;
++    pub fn RegConnectRegistryA(lpMachineName: LPCSTR, hKey: HKEY, phkResult: PHKEY) -> LONG;
++    // pub fn RegConnectRegistryExA();
++    // pub fn RegConnectRegistryExW();
++    pub fn RegConnectRegistryW(lpMachineName: LPCWSTR, hKey: HKEY, phkResult: PHKEY) -> LONG;
++    pub fn RegCopyTreeA(hKeySrc: HKEY, lpSubKey: LPCSTR, hKeyDest: HKEY) -> LONG;
++    pub fn RegCopyTreeW(hKeySrc: HKEY, lpSubKey: LPCWSTR, hKeyDest: HKEY) -> LONG;
++    // pub fn RegCreateKeyA();
++    pub fn RegCreateKeyExA(
++        hKey: HKEY, lpSubKey: LPCSTR, Reserved: DWORD, lpClass: LPSTR, dwOptions: DWORD,
++        samDesired: REGSAM, lpSecurityAttributes: LPSECURITY_ATTRIBUTES, phkResult: PHKEY,
++        lpdwDisposition: LPDWORD,
++    ) -> LONG;
++    pub fn RegCreateKeyExW(
++        hKey: HKEY, lpSubKey: LPCWSTR, Reserved: DWORD, lpClass: LPWSTR, dwOptions: DWORD,
++        samDesired: REGSAM, lpSecurityAttributes: LPSECURITY_ATTRIBUTES, phkResult: PHKEY,
++        lpdwDisposition: LPDWORD,
++    ) -> LONG;
++    pub fn RegCreateKeyTransactedA(
++        hKey: HKEY, lpSubKey: LPCSTR, Reserved: DWORD, lpClass: LPSTR, dwOptions: DWORD,
++        samDesired: REGSAM, lpSecurityAttributes: LPSECURITY_ATTRIBUTES, phkResult: PHKEY,
++        lpdwDisposition: LPDWORD, hTransaction: HANDLE, pExtendedParemeter: PVOID,
++    ) -> LONG;
++    pub fn RegCreateKeyTransactedW(
++        hKey: HKEY, lpSubKey: LPCWSTR, Reserved: DWORD, lpClass: LPWSTR, dwOptions: DWORD,
++        samDesired: REGSAM, lpSecurityAttributes: LPSECURITY_ATTRIBUTES, phkResult: PHKEY,
++        lpdwDisposition: LPDWORD, hTransaction: HANDLE, pExtendedParemeter: PVOID,
++    ) -> LONG;
++    // pub fn RegCreateKeyW();
++    pub fn RegDeleteKeyA(hKey: HKEY, lpSubKey: LPCSTR) -> LONG;
++    pub fn RegDeleteKeyExA(
++        hKey: HKEY, lpSubKey: LPCSTR, samDesired: REGSAM, Reserved: DWORD,
++    ) -> LONG;
++    pub fn RegDeleteKeyExW(
++        hKey: HKEY, lpSubKey: LPCWSTR, samDesired: REGSAM, Reserved: DWORD,
++    ) -> LONG;
++    pub fn RegDeleteKeyTransactedA(
++        hKey: HKEY, lpSubKey: LPCSTR, samDesired: REGSAM, Reserved: DWORD,
++        hTransaction: HANDLE, pExtendedParemeter: PVOID,
++    ) -> LONG;
++    pub fn RegDeleteKeyTransactedW(
++        hKey: HKEY, lpSubKey: LPCWSTR, samDesired: REGSAM, Reserved: DWORD,
++        hTransaction: HANDLE, pExtendedParemeter: PVOID,
++    ) -> LONG;
++    pub fn RegDeleteKeyValueA(hKey: HKEY, lpSubKey: LPCSTR, lpValueName: LPCSTR) -> LONG;
++    pub fn RegDeleteKeyValueW(hKey: HKEY, lpSubKey: LPCWSTR, lpValueName: LPCWSTR) -> LONG;
++    pub fn RegDeleteKeyW(hKey: HKEY, lpSubKey: LPCWSTR) -> LONG;
++    pub fn RegDeleteTreeA(hKey: HKEY, lpSubKey: LPCSTR) -> LONG;
++    pub fn RegDeleteTreeW(hKey: HKEY, lpSubKey: LPCWSTR) -> LONG;
++    pub fn RegDeleteValueA(hKey: HKEY, lpValueName: LPCSTR) -> LONG;
++    pub fn RegDeleteValueW(hKey: HKEY, lpValueName: LPCWSTR) -> LONG;
++    pub fn RegDisablePredefinedCache() -> LONG;
++    pub fn RegDisablePredefinedCacheEx() -> LONG;
++    pub fn RegDisableReflectionKey(hBase: HKEY) -> LONG;
++    pub fn RegEnableReflectionKey(hBase: HKEY) -> LONG;
++    // pub fn RegEnumKeyA();
++    pub fn RegEnumKeyExA(
++        hKey: HKEY, dwIndex: DWORD, lpName: LPSTR, lpcName: LPDWORD, lpReserved: LPDWORD,
++        lpClass: LPSTR, lpcClass: LPDWORD, lpftLastWriteTime: PFILETIME,
++    ) -> LONG;
++    pub fn RegEnumKeyExW(
++        hKey: HKEY, dwIndex: DWORD, lpName: LPWSTR, lpcName: LPDWORD, lpReserved: LPDWORD,
++        lpClass: LPWSTR, lpcClass: LPDWORD, lpftLastWriteTime: PFILETIME,
++    ) -> LONG;
++    // pub fn RegEnumKeyW();
++    pub fn RegEnumValueA(
++        hKey: HKEY, dwIndex: DWORD, lpValueName: LPSTR, lpcchValueName: LPDWORD,
++        lpReserved: LPDWORD, lpType: LPDWORD, lpData: LPBYTE, lpcbData: LPDWORD,
++    ) -> LONG;
++    pub fn RegEnumValueW(
++        hKey: HKEY, dwIndex: DWORD, lpValueName: LPWSTR, lpcchValueName: LPDWORD,
++        lpReserved: LPDWORD, lpType: LPDWORD, lpData: LPBYTE, lpcbData: LPDWORD,
++    ) -> LONG;
++    pub fn RegFlushKey(hKey: HKEY) -> LONG;
++    // pub fn RegGetKeySecurity();
++    pub fn RegGetValueA(
++        hkey: HKEY, lpSubKey: LPCSTR, lpValue: LPCSTR, dwFlags: DWORD, pdwType: LPDWORD,
++        pvData: PVOID, pcbData: LPDWORD,
++    ) -> LONG;
++    pub fn RegGetValueW(
++        hkey: HKEY, lpSubKey: LPCWSTR, lpValue: LPCWSTR, dwFlags: DWORD, pdwType: LPDWORD,
++        pvData: PVOID, pcbData: LPDWORD,
++    ) -> LONG;
++    // pub fn RegLoadAppKeyA();
++    // pub fn RegLoadAppKeyW();
++    // pub fn RegLoadKeyA();
++    // pub fn RegLoadKeyW();
++    // pub fn RegLoadMUIStringA();
++    pub fn RegLoadMUIStringW(
++        hKey: HKEY, pszValue: LPCWSTR, pszOutBuf: LPWSTR, cbOutBuf: DWORD, pcbData: LPDWORD,
++        Flags: DWORD, pszDirectory: LPCWSTR,
++    ) -> LONG;
++    pub fn RegNotifyChangeKeyValue(
++        hKey: HKEY, bWatchSubtree: BOOL, dwNotifyFilter: DWORD, hEvent: HANDLE,
++        fAsynchronous: BOOL,
++    ) -> LONG;
++    pub fn RegOpenCurrentUser(samDesired: REGSAM, phkResult: PHKEY) -> LONG;
++    // pub fn RegOpenKeyA();
++    pub fn RegOpenKeyExA(
++        hKey: HKEY, lpSubKey: LPCSTR, ulOptions: DWORD, samDesired: REGSAM, phkResult: PHKEY,
++    ) -> LONG;
++    pub fn RegOpenKeyExW(
++        hKey: HKEY, lpSubKey: LPCWSTR, ulOptions: DWORD, samDesired: REGSAM, phkResult: PHKEY,
++    ) -> LONG;
++    pub fn RegOpenKeyTransactedA(
++        hKey: HKEY, lpSubKey: LPCSTR, ulOptions: DWORD, samDesired: REGSAM, phkResult: PHKEY,
++        hTransaction: HANDLE, pExtendedParemeter: PVOID,
++    ) -> LONG;
++    pub fn RegOpenKeyTransactedW(
++        hKey: HKEY, lpSubKey: LPCWSTR, ulOptions: DWORD, samDesired: REGSAM, phkResult: PHKEY,
++        hTransaction: HANDLE, pExtendedParemeter: PVOID,
++    ) -> LONG;
++    // pub fn RegOpenKeyW();
++    pub fn RegOpenUserClassesRoot(
++        hToken: HANDLE, dwOptions: DWORD, samDesired: REGSAM, phkResult: PHKEY,
++    ) -> LONG;
++    pub fn RegOverridePredefKey(hKey: HKEY, hNewHKey: HKEY) -> LONG;
++    pub fn RegQueryInfoKeyA(
++        hKey: HKEY, lpClass: LPSTR, lpcClass: LPDWORD, lpReserved: LPDWORD, lpcSubKeys: LPDWORD,
++        lpcMaxSubKeyLen: LPDWORD, lpcMaxClassLen: LPDWORD, lpcValues: LPDWORD,
++        lpcMaxValueNameLen: LPDWORD, lpcMaxValueLen: LPDWORD, lpcbSecurityDescriptor: LPDWORD,
++        lpftLastWriteTime: PFILETIME,
++    ) -> LONG;
++    pub fn RegQueryInfoKeyW(
++        hKey: HKEY, lpClass: LPWSTR, lpcClass: LPDWORD, lpReserved: LPDWORD, lpcSubKeys: LPDWORD,
++        lpcMaxSubKeyLen: LPDWORD, lpcMaxClassLen: LPDWORD, lpcValues: LPDWORD,
++        lpcMaxValueNameLen: LPDWORD, lpcMaxValueLen: LPDWORD, lpcbSecurityDescriptor: LPDWORD,
++        lpftLastWriteTime: PFILETIME,
++    ) -> LONG;
++    pub fn RegQueryMultipleValuesA(
++        hKey: HKEY, val_list: PVALENTA, num_vals: DWORD, lpValueBuf: LPSTR, ldwTotsize: LPDWORD,
++    ) -> LONG;
++    pub fn RegQueryMultipleValuesW(
++        hKey: HKEY, val_list: PVALENTW, num_vals: DWORD, lpValueBuf: LPWSTR, ldwTotsize: LPDWORD,
++    ) -> LONG;
++    pub fn RegQueryReflectionKey(hBase: HKEY, bIsReflectionDisabled: PBOOL) -> LONG;
++    pub fn RegQueryValueExA(
++        hKey: HKEY, lpValueName: LPCSTR, lpReserved: LPDWORD, lpType: LPDWORD, lpData: LPBYTE,
++        lpcbData: LPDWORD,
++    ) -> LONG;
++    pub fn RegQueryValueExW(
++        hKey: HKEY, lpValueName: LPCWSTR, lpReserved: LPDWORD, lpType: LPDWORD, lpData: LPBYTE,
++        lpcbData: LPDWORD,
++    ) -> LONG;
++    // pub fn RegQueryValueW();
++    // pub fn RegRenameKey();
++    // pub fn RegReplaceKeyA();
++    // pub fn RegReplaceKeyW();
++    // pub fn RegRestoreKeyA();
++    // pub fn RegRestoreKeyW();
++    // pub fn RegSaveKeyA();
++    // pub fn RegSaveKeyExA();
++    // pub fn RegSaveKeyExW();
++    // pub fn RegSaveKeyW();
++    // pub fn RegSetKeySecurity();
++    pub fn RegSetKeyValueA(
++        hKey: HKEY, lpSubKey: LPCSTR, lpValueName: LPCSTR, dwType: DWORD, lpData: LPCVOID,
++        cbData: DWORD,
++    ) -> LONG;
++    pub fn RegSetValueExA(
++        hKey: HKEY, lpValueName: LPCSTR, Reserved: DWORD, dwType: DWORD, lpData: *const BYTE,
++        cbData: DWORD,
++    ) -> LONG;
++    pub fn RegSetValueExW(
++        hKey: HKEY, lpValueName: LPCWSTR, Reserved: DWORD, dwType: DWORD, lpData: *const BYTE,
++        cbData: DWORD,
++    ) -> LONG;
++    pub fn RegSetKeyValueW(
++        hKey: HKEY, lpSubKey: LPCWSTR, lpValueName: LPCWSTR, dwType: DWORD, lpData: LPCVOID,
++        cbData: DWORD,
++    ) -> LONG;
++    // pub fn RegUnLoadKeyA();
++    // pub fn RegUnLoadKeyW();
++    // pub fn RegisterEventSourceA();
++    // pub fn RegisterEventSourceW();
++    pub fn RegisterServiceCtrlHandlerA(
++        lpServiceName: LPCSTR, lpHandlerProc: LPHANDLER_FUNCTION,
++    ) -> SERVICE_STATUS_HANDLE;
++    pub fn RegisterServiceCtrlHandlerExA(
++        lpServiceName: LPCSTR, lpHandlerProc: LPHANDLER_FUNCTION_EX, lpContext: LPVOID,
++    ) -> SERVICE_STATUS_HANDLE;
++    pub fn RegisterServiceCtrlHandlerExW(
++        lpServiceName: LPCWSTR, lpHandlerProc: LPHANDLER_FUNCTION_EX, lpContext: LPVOID,
++    ) -> SERVICE_STATUS_HANDLE;
++    pub fn RegisterServiceCtrlHandlerW(
++        lpServiceName: LPCWSTR, lpHandlerProc: LPHANDLER_FUNCTION,
++    ) -> SERVICE_STATUS_HANDLE;
++    // pub fn RegisterTraceGuidsA();
++    // pub fn RegisterTraceGuidsW();
++    // pub fn RegisterWaitChainCOMCallback();
++    // pub fn RemoteRegEnumKeyWrapper();
++    // pub fn RemoteRegEnumValueWrapper();
++    // pub fn RemoteRegQueryInfoKeyWrapper();
++    // pub fn RemoteRegQueryValueWrapper();
++    // pub fn RemoveTraceCallback();
++    // pub fn RemoveUsersFromEncryptedFile();
++    // pub fn ReportEventA();
++    // pub fn ReportEventW();
++    // pub fn RevertToSelf();
++    // pub fn SafeBaseRegGetKeySecurity();
++    // pub fn SaferCloseLevel();
++    // pub fn SaferComputeTokenFromLevel();
++    // pub fn SaferCreateLevel();
++    // pub fn SaferGetLevelInformation();
++    // pub fn SaferGetPolicyInformation();
++    // pub fn SaferIdentifyLevel();
++    // pub fn SaferRecordEventLogEntry();
++    // pub fn SaferSetLevelInformation();
++    // pub fn SaferSetPolicyInformation();
++    // pub fn SaferiIsExecutableFileType();
++    // pub fn SetAclInformation();
++    // pub fn SetEncryptedFileMetadata();
++    // pub fn SetEntriesInAccessListA();
++    // pub fn SetEntriesInAccessListW();
++    // pub fn SetEntriesInAclA();
++    // pub fn SetEntriesInAclW();
++    // pub fn SetEntriesInAuditListA();
++    // pub fn SetEntriesInAuditListW();
++    // pub fn SetFileSecurityA();
++    // pub fn SetFileSecurityW();
++    // pub fn SetInformationCodeAuthzLevelW();
++    // pub fn SetInformationCodeAuthzPolicyW();
++    // pub fn SetKernelObjectSecurity();
++    // pub fn SetNamedSecurityInfoA();
++    // pub fn SetNamedSecurityInfoExA();
++    // pub fn SetNamedSecurityInfoExW();
++    // pub fn SetNamedSecurityInfoW();
++    // pub fn SetPrivateObjectSecurity();
++    // pub fn SetPrivateObjectSecurityEx();
++    // pub fn SetSecurityAccessMask();
++    // pub fn SetSecurityDescriptorControl();
++    // pub fn SetSecurityDescriptorDacl();
++    // pub fn SetSecurityDescriptorGroup();
++    // pub fn SetSecurityDescriptorOwner();
++    // pub fn SetSecurityDescriptorRMControl();
++    // pub fn SetSecurityDescriptorSacl();
++    // pub fn SetSecurityInfo();
++    // pub fn SetSecurityInfoExA();
++    // pub fn SetSecurityInfoExW();
++    // pub fn SetServiceBits();
++    // pub fn SetServiceObjectSecurity();
++    pub fn SetServiceStatus(
++        hServiceStatus: SERVICE_STATUS_HANDLE, lpServiceStatus: LPSERVICE_STATUS,
++    ) -> BOOL;
++    // pub fn SetThreadToken();
++    // pub fn SetTokenInformation();
++    // pub fn SetTraceCallback();
++    // pub fn SetUserFileEncryptionKey();
++    // pub fn SetUserFileEncryptionKeyEx();
++    // pub fn StartServiceA();
++    pub fn StartServiceCtrlDispatcherA(lpServiceStartTable: *const SERVICE_TABLE_ENTRYA) -> BOOL;
++    pub fn StartServiceCtrlDispatcherW(lpServiceStartTable: *const SERVICE_TABLE_ENTRYW) -> BOOL;
++    // pub fn StartServiceW();
++    // pub fn StartTraceA();
++    // pub fn StartTraceW();
++    // pub fn StopTraceA();
++    // pub fn StopTraceW();
++    // pub fn SystemFunction001();
++    // pub fn SystemFunction002();
++    // pub fn SystemFunction003();
++    // pub fn SystemFunction004();
++    // pub fn SystemFunction005();
++    // pub fn SystemFunction006();
++    // pub fn SystemFunction007();
++    // pub fn SystemFunction008();
++    // pub fn SystemFunction009();
++    // pub fn SystemFunction010();
++    // pub fn SystemFunction011();
++    // pub fn SystemFunction012();
++    // pub fn SystemFunction013();
++    // pub fn SystemFunction014();
++    // pub fn SystemFunction015();
++    // pub fn SystemFunction016();
++    // pub fn SystemFunction017();
++    // pub fn SystemFunction018();
++    // pub fn SystemFunction019();
++    // pub fn SystemFunction020();
++    // pub fn SystemFunction021();
++    // pub fn SystemFunction022();
++    // pub fn SystemFunction023();
++    // pub fn SystemFunction024();
++    // pub fn SystemFunction025();
++    // pub fn SystemFunction026();
++    // pub fn SystemFunction027();
++    // pub fn SystemFunction028();
++    // pub fn SystemFunction029();
++    // pub fn SystemFunction030();
++    // pub fn SystemFunction031();
++    // pub fn SystemFunction032();
++    // pub fn SystemFunction033();
++    // pub fn SystemFunction034();
++    // pub fn SystemFunction036();
++    // pub fn SystemFunction040();
++    // pub fn SystemFunction041();
++    // pub fn TraceEvent();
++    // pub fn TraceEventInstance();
++    // pub fn TraceMessage();
++    // pub fn TraceMessageVa();
++    // pub fn TraceQueryInformation();
++    // pub fn TraceSetInformation();
++    // pub fn TreeResetNamedSecurityInfoA();
++    // pub fn TreeResetNamedSecurityInfoW();
++    // pub fn TreeSetNamedSecurityInfoA();
++    // pub fn TreeSetNamedSecurityInfoW();
++    // pub fn TrusteeAccessToObjectA();
++    // pub fn TrusteeAccessToObjectW();
++    // pub fn UninstallApplication();
++    // pub fn UnlockServiceDatabase();
++    // pub fn UnregisterTraceGuids();
++    // pub fn UpdateTraceA();
++    // pub fn UpdateTraceW();
++    // pub fn UsePinForEncryptedFilesA();
++    // pub fn UsePinForEncryptedFilesW();
++    // pub fn WaitServiceState();
++    // pub fn WriteEncryptedFileRaw();
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..625e4951dc6fd5f2701e82a76707c383402763c8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"afccc5772ba333abccdf60d55200fa3406f8c59dcf54d5f7998c9107d3799c7c"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..95bfc39bd8da0e8583268a89c796553af8785f4b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,26 @@@
++# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
++#
++# When uploading crates to the registry Cargo will automatically
++# "normalize" Cargo.toml files for maximal compatibility
++# with all versions of Cargo and also rewrite `path` dependencies
++# to registry (e.g. crates.io) dependencies
++#
++# If you believe there's an error in this file please file an
++# issue against the rust-lang/cargo repository. If you're
++# editing this file be aware that the upstream Cargo.toml
++# will likely look very different (and much more reasonable)
++
++[package]
++name = "backtrace-sys"
++version = "0.1.12"
++authors = ["Alex Crichton <alex@alexcrichton.com>"]
++build = "build.rs"
++description = "Bindings to the libbacktrace gcc library\n"
++homepage = "https://github.com/alexcrichton/backtrace-rs"
++documentation = "http://alexcrichton.com/backtrace-rs"
++license = "MIT/Apache-2.0"
++repository = "https://github.com/alexcrichton/backtrace-rs"
++[dependencies.libc]
++version = "0.2"
++[build-dependencies.gcc]
++version = "0.3"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..95f89e1b96976117fa95fd6258ec6936b6210ab4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,171 @@@
++extern crate gcc;
++
++use std::env;
++use std::ffi::OsString;
++use std::fs;
++use std::io;
++use std::path::PathBuf;
++use std::process::Command;
++
++macro_rules! t {
++    ($e:expr) => (match $e {
++        Ok(e) => e,
++        Err(e) => panic!("{} failed with {}", stringify!($e), e),
++    })
++}
++
++fn try_tool(compiler: &gcc::Tool, cc: &str, compiler_suffix: &str, tool_suffix: &str)
++            -> Option<PathBuf> {
++    if !cc.ends_with(compiler_suffix) {
++        return None
++    }
++    let cc = cc.replace(compiler_suffix, tool_suffix);
++    let candidate = compiler.path().parent().unwrap().join(cc);
++    if Command::new(&candidate).output().is_ok() {
++        Some(candidate)
++    } else {
++        None
++    }
++}
++
++fn find_tool(compiler: &gcc::Tool, cc: &str, tool: &str) -> PathBuf {
++    // Allow overrides via env var
++    if let Some(s) = env::var_os(tool.to_uppercase()) {
++        return s.into()
++    }
++    let tool_suffix = format!("-{}", tool);
++    try_tool(compiler, cc, "-gcc", &tool_suffix)
++        .or_else(|| try_tool(compiler, cc, "-clang", &tool_suffix))
++        .or_else(|| try_tool(compiler, cc, "-cc", &tool_suffix))
++        .unwrap_or_else(|| PathBuf::from(tool))
++}
++
++fn main() {
++    let src = env::current_dir().unwrap();
++    let dst = PathBuf::from(env::var_os("OUT_DIR").unwrap());
++    let target = env::var("TARGET").unwrap();
++    let host = env::var("HOST").unwrap();
++
++    // libbacktrace doesn't currently support Mach-O files
++    if target.contains("darwin") {
++        return
++    }
++
++    // libbacktrace isn't used on windows
++    if target.contains("windows") {
++        return
++    }
++
++    // no way this will ever compile for emscripten
++    if target.contains("emscripten") {
++        return
++    }
++
++    let mut make = "make";
++
++    // host BSDs has GNU-make as gmake
++    if host.contains("bitrig") || host.contains("dragonfly") ||
++        host.contains("freebsd") || host.contains("netbsd") ||
++        host.contains("openbsd") {
++
++        make = "gmake"
++    }
++
++    let configure = src.join("src/libbacktrace/configure").into_os_string();
++
++    // When cross-compiling on Windows, this path will contain backslashes,
++    // but configure doesn't like that. Replace them with forward slashes.
++    #[cfg(windows)]
++    let configure = {
++        use std::os::windows::ffi::{OsStrExt, OsStringExt};
++        let mut chars: Vec<u16> = configure.encode_wide().collect();
++        for c in chars.iter_mut() {
++            if *c == '\\' as u16 {
++                *c = '/' as u16;
++            }
++        }
++        OsString::from_wide(&chars)
++    };
++
++    let cfg = gcc::Config::new();
++    let compiler = cfg.get_compiler();
++    let cc = compiler.path().file_name().unwrap().to_str().unwrap();
++    let mut flags = OsString::new();
++    for (i, flag) in compiler.args().iter().enumerate() {
++        if i > 0 {
++            flags.push(" ");
++        }
++        flags.push(flag);
++    }
++    let ar = find_tool(&compiler, cc, "ar");
++    let mut cmd = Command::new("sh");
++
++    cmd.arg(configure)
++       .current_dir(&dst)
++       .env("AR", &ar)
++       .env("CC", compiler.path())
++       .env("CFLAGS", flags)
++       .arg("--with-pic")
++       .arg("--disable-multilib")
++       .arg("--disable-shared")
++       .arg("--disable-host-shared")
++       .arg(format!("--host={}", target));
++
++    // Apparently passing this flag causes problems on Windows
++    if !host.contains("windows") {
++       cmd.arg(format!("--build={}", host));
++    }
++
++    run(&mut cmd, "sh");
++    run(Command::new(make)
++                .current_dir(&dst)
++                .arg(format!("INCDIR={}",
++                             src.join("src/libbacktrace").display())),
++        "make");
++    println!("cargo:rustc-link-search=native={}/.libs", dst.display());
++    println!("cargo:rustc-link-lib=static=backtrace");
++
++    // The standard library currently bundles in libbacktrace, but it's
++    // compiled with hidden visibility (naturally) so we can't use it.
++    //
++    // To prevent conflicts with a second statically linked copy we rename all
++    // symbols with a '__rbt_' prefix manually here through `objcopy`.
++    let lib = dst.join(".libs/libbacktrace.a");
++    let tmpdir = dst.join("__tmp");
++    drop(fs::remove_dir_all(&tmpdir));
++    t!(fs::create_dir_all(&tmpdir));
++    run(Command::new(&ar).arg("x").arg(&lib).current_dir(&tmpdir),
++        ar.to_str().unwrap());
++
++    t!(fs::remove_file(&lib));
++    let mut objs = Vec::new();
++    let objcopy = find_tool(&compiler, cc, "objcopy");
++    for obj in t!(tmpdir.read_dir()) {
++        let obj = t!(obj);
++        run(Command::new(&objcopy)
++                    .arg("--redefine-syms=symbol-map")
++                    .arg(obj.path()),
++            objcopy.to_str().unwrap());
++        objs.push(obj.path());
++    }
++
++    run(Command::new(&ar).arg("crus").arg(&lib).args(&objs),
++        ar.to_str().unwrap());
++}
++
++fn run(cmd: &mut Command, program: &str) {
++    println!("running: {:?}", cmd);
++    let status = match cmd.status() {
++        Ok(s) => s,
++        Err(ref e) if e.kind() == io::ErrorKind::NotFound => {
++            panic!("\n\nfailed to execute command: {}\nIs `{}` \
++                    not installed?\n\n",
++                   e,
++                   program);
++        }
++        Err(e) => panic!("failed to get status: {}", e),
++    };
++    if !status.success() {
++        panic!("failed with: {}", status);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0edc2674cca42d50cbec92b3a3fed8d59e4d7dc8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,44 @@@
++#![allow(bad_style)]
++
++extern crate libc;
++
++use libc::uintptr_t;
++use std::os::raw::{c_void, c_char, c_int};
++
++pub type backtrace_syminfo_callback =
++    extern fn(data: *mut c_void,
++              pc: uintptr_t,
++              symname: *const c_char,
++              symval: uintptr_t,
++              symsize: uintptr_t);
++pub type backtrace_full_callback =
++    extern fn(data: *mut c_void,
++              pc: uintptr_t,
++              filename: *const c_char,
++              lineno: c_int,
++              function: *const c_char) -> c_int;
++pub type backtrace_error_callback =
++    extern fn(data: *mut c_void,
++              msg: *const c_char,
++              errnum: c_int);
++pub enum backtrace_state {}
++
++extern {
++    #[link_name = "__rbt_backtrace_create_state"]
++    pub fn backtrace_create_state(filename: *const c_char,
++                                  threaded: c_int,
++                                  error: backtrace_error_callback,
++                                  data: *mut c_void) -> *mut backtrace_state;
++    #[link_name = "__rbt_backtrace_syminfo"]
++    pub fn backtrace_syminfo(state: *mut backtrace_state,
++                             addr: uintptr_t,
++                             cb: backtrace_syminfo_callback,
++                             error: backtrace_error_callback,
++                             data: *mut c_void) -> c_int;
++    #[link_name = "__rbt_backtrace_pcinfo"]
++    pub fn backtrace_pcinfo(state: *mut backtrace_state,
++                            addr: uintptr_t,
++                            cb: backtrace_full_callback,
++                            error: backtrace_error_callback,
++                            data: *mut c_void) -> c_int;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..88005dfb01eb29badbc800430331c4bb3ad4dbe9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,598 @@@
++2016-11-15  Matthias Klose  <doko@ubuntu.com>
++
++      * configure: Regenerate.
++
++2016-09-11  Carlos Liam  <carlos@aarzee.me>
++
++      * all: Remove meaningless trailing whitespace.
++
++2016-05-18  Uros Bizjak  <ubizjak@gmail.com>
++
++      PR target/71161
++      * elf.c (phdr_callback) [__i386__]: Add
++      __attribute__((__force_align_arg_pointer__)).
++
++2016-03-02  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
++
++      * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
++      avoid possible crash.
++      (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
++      missing debug info anymore.
++
++2016-02-06  John David Anglin  <danglin@gcc.gnu.org>
++
++      * mmap.c (MAP_FAILED): Define if not defined.
++
++2016-01-04  Jakub Jelinek  <jakub@redhat.com>
++
++      Update copyright years.
++
++2015-12-18  Andris Pavenis  <andris.pavenis@iki.fi>
++
++      * configure.ac: Specify that DJGPP do not have mmap
++      even when sys/mman.h exists.
++      * configure: Regenerate
++
++2015-12-09  John David Anglin  <danglin@gcc.gnu.org>
++
++      PR libgfortran/68115
++      * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
++      * configure: Regenerate.
++      * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
++      to void.
++
++2015-09-17  Ian Lance Taylor  <iant@google.com>
++
++      * posix.c (backtrace_open): Cast second argument of open() to int.
++
++2015-09-11  Ian Lance Taylor  <iant@google.com>
++
++      * Makefile.am (backtrace.lo): Depend on internal.h.
++      (sort.lo, stest.lo): Add explicit dependencies.
++      * Makefile.in: Rebuild.
++
++2015-09-09  Hans-Peter Nilsson  <hp@axis.com>
++
++      * backtrace.c: #include <sys/types.h>.
++
++2015-09-08  Ian Lance Taylor  <iant@google.com>
++
++      PR other/67457
++      * backtrace.c: #include "internal.h".
++      (struct backtrace_data): Add can_alloc field.
++      (unwind): If can_alloc is false, don't try to get file/line
++      information.
++      (backtrace_full): Set can_alloc field in bdata.
++      * alloc.c (backtrace_alloc): Don't call error_callback if it is
++      NULL.
++      * mmap.c (backtrace_alloc): Likewise.
++      * internal.h: Update comments for backtrace_alloc and
++      backtrace_free.
++
++2015-09-08  Ian Lance Taylor  <iant@google.com>
++
++      PR other/67457
++      * mmap.c (backtrace_alloc): Correct test for mmap failure.
++
++2015-08-31  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
++
++      * configure.ac: For spu-*-* targets, set have_fcntl to no.
++      * configure: Regenerate.
++
++2015-08-27  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
++
++      * configure.ac: Remove [disable-shared] argument to LT_INIT.
++      Remove setting PIC_FLAG when building as target library.
++      * configure: Regenerate.
++
++2015-08-26  Hans-Peter Nilsson  <hp@axis.com>
++
++      * configure.ac: Only compile with -fPIC if the target
++      supports it.
++      * configure: Regenerate.
++
++2015-08-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
++
++      * configure.ac: Set have_mmap to no on spu-*-* targets.
++      * configure: Regenerate.
++
++2015-08-13  Ian Lance Taylor  <iant@google.com>
++
++      * dwarf.c (read_function_entry): Add vec_inlined parameter.
++      Change all callers.
++
++2015-06-11  Martin Sebor  <msebor@redhat.com>
++
++      PR sanitizer/65479
++      * dwarf.c (struct line): Add new field idx.
++      (line_compare): Use it.
++      (add_line): Set it.
++      (read_line_info): Reset it.
++
++2015-05-29  Tristan Gingold  <gingold@adacore.com>
++
++      * pecoff.c: New file.
++      * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
++      * Makefile.in: Regenerate.
++      * filetype.awk: Detect pecoff.
++      * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
++      Add pecoff.
++      * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
++      true.
++      * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
++      * configure: Regenerate.
++      * pecoff.c: New file.
++
++2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
++
++      * Makefile.in: Regenerated with automake-1.11.6.
++      * aclocal.m4: Likewise.
++      * configure: Likewise.
++
++2015-01-24  Matthias Klose  <doko@ubuntu.com>
++
++      * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
++      * configure: Regenerate.
++
++2015-01-05  Jakub Jelinek  <jakub@redhat.com>
++
++      Update copyright years.
++
++2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
++
++      PR bootstrap/63784
++      * configure: Regenerated.
++
++2014-11-11  David Malcolm  <dmalcolm@redhat.com>
++
++      * ChangeLog.jit: New.
++
++2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
++
++      PR target/63610
++      * configure: Regenerate.
++
++2014-10-23  Ian Lance Taylor  <iant@google.com>
++
++      * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
++      Fix to return void *.
++
++2014-05-08  Ian Lance Taylor  <iant@google.com>
++
++      * mmap.c (backtrace_free): If freeing a large aligned block of
++      memory, call munmap rather than holding onto it.
++      (backtrace_vector_grow): When growing a vector, double the number
++      of pages requested.  When releasing the old version of a grown
++      vector, pass the correct size to backtrace_free.
++
++2014-03-07  Ian Lance Taylor  <iant@google.com>
++
++      * sort.c (backtrace_qsort): Use middle element as pivot.
++
++2014-03-06  Ian Lance Taylor  <iant@google.com>
++
++      * sort.c: New file.
++      * stest.c: New file.
++      * internal.h (backtrace_qsort): Declare.
++      * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
++      (read_line_info, read_function_entry): Likewise.
++      (read_function_info, build_dwarf_data): Likewise.
++      * elf.c (elf_initialize_syminfo): Likewise.
++      * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
++      (stest_SOURCES, stest_LDADD): Define.
++      (check_PROGRAMS): Add stest.
++
++2014-02-07  Misty De Meo  <misty@brew.sh>
++
++      PR target/58710
++      * configure.ac: Use AC_LINK_IFELSE in check for
++      _Unwind_GetIPInfo.
++      * configure: Regenerate.
++
++2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
++
++      Update copyright years
++
++2013-12-06  Jakub Jelinek  <jakub@redhat.com>
++
++      * elf.c (ET_DYN): Undefine and define again.
++      (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
++      return early -1 without closing the descriptor.
++      (struct phdr_data): Add exe_descriptor.
++      (phdr_callback): If pd->exe_descriptor is not -1, for very first
++      call if dlpi_name is NULL just call elf_add with the exe_descriptor,
++      otherwise backtrace_close the exe_descriptor if not -1.  Adjust
++      call to elf_add.
++      (backtrace_initialize): Adjust call to elf_add.  If it returns
++      -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
++
++2013-12-05  Ian Lance Taylor  <iant@google.com>
++
++      * alloc.c (backtrace_vector_finish): Add error_callback and data
++      parameters.  Call backtrace_vector_release.  Return address base.
++      * mmap.c (backtrace_vector_finish): Add error_callback and data
++      parameters.  Return address base.
++      * dwarf.c (read_function_info): Get new address base from
++      backtrace_vector_finish.
++      * internal.h (backtrace_vector_finish): Update declaration.
++
++2013-11-27  Ian Lance Taylor  <iant@google.com>
++
++      * dwarf.c (find_address_ranges): New static function, broken out
++      of build_address_map.
++      (build_address_map): Call it.
++      * btest.c (check): Check for missing filename or function, rather
++      than crashing.
++      (f3): Check that enough frames were returned.
++
++2013-11-19  Jakub Jelinek  <jakub@redhat.com>
++
++      * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
++      * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
++      last argument.
++      * btest.c (struct symdata): Add size field.
++      (callback_three): Add symsize argument.  Copy it to the data->size
++      field.
++      (f23): Set symdata.size to 0.
++      (test5): Likewise.  If sizeof (int) > 1, lookup address of
++      ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
++      values.
++
++      * atomic.c: Include sys/types.h.
++
++2013-11-18  Ian Lance Taylor  <iant@google.com>
++
++      * configure.ac: Check for support of __atomic extensions.
++      * internal.h: Declare or #define atomic functions for use in
++      backtrace code.
++      * atomic.c: New file.
++      * dwarf.c (dwarf_lookup_pc): Use atomic functions.
++      (dwarf_fileline, backtrace_dwarf_add): Likewise.
++      * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
++      (backtrace_initialize): Likewise.
++      * fileline.c (fileline_initialize): Likewise.
++      * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
++      * configure, config.h.in, Makefile.in: Rebuild.
++
++2013-11-18  Jakub Jelinek  <jakub@redhat.com>
++
++      * elf.c (SHN_UNDEF): Define.
++      (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
++      with st_shndx == SHN_UNDEF.  Add base_address to address fields.
++      (elf_add): Adjust caller.
++
++      * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
++
++2013-11-16  Ian Lance Taylor  <iant@google.com>
++
++      * backtrace.h (backtrace_create_state): Correct comment about
++      threading.
++
++2013-11-15  Ian Lance Taylor  <iant@google.com>
++
++      * backtrace.h (backtrace_syminfo): Update comment and parameter
++      name to take any address, not just a PC value.
++      * elf.c (STT_OBJECT): Define.
++      (elf_nosyms): Rename parameter pc to addr.
++      (elf_symbol_search): Rename local variable pc to addr.
++      (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
++      (elf_syminfo): Rename parameter pc to addr.
++      * btest.c (global): New global variable.
++      (test5): New test.
++      (main): Call test5.
++
++2013-10-17  Ian Lance Taylor  <iant@google.com>
++
++      * elf.c (elf_add): Don't get the wrong offsets if a debug section
++      is missing.
++
++2013-10-15  David Malcolm  <dmalcolm@redhat.com>
++
++      * configure.ac: Add --enable-host-shared, setting up
++      pre-existing PIC_FLAG variable within Makefile.am et al.
++      * configure: Regenerate.
++
++2013-09-20  Alan Modra  <amodra@gmail.com>
++
++      * configure: Regenerate.
++
++2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
++
++      * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
++
++2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
++
++      * elf.c (backtrace_initialize): Pass elf_fileline_fn to
++      dl_iterate_phdr callbacks.
++
++2013-03-25  Ian Lance Taylor  <iant@google.com>
++
++      * alloc.c: #include <sys/types.h>.
++      * mmap.c: Likewise.
++
++2013-01-31  Ian Lance Taylor  <iant@google.com>
++
++      * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
++      (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
++
++2013-01-25  Jakub Jelinek  <jakub@redhat.com>
++
++      PR other/56076
++      * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
++      attribute was not seen.
++
++2013-01-16  Ian Lance Taylor  <iant@google.com>
++
++      * dwarf.c (struct unit): Add filename and abs_filename fields.
++      (build_address_map): Set new fields when reading unit.
++      (dwarf_lookup_pc): If we don't find an entry in the line table,
++      just return the main file name.
++
++2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
++
++      Update copyright years.
++
++2013-01-01  Ian Lance Taylor  <iant@google.com>
++
++      PR bootstrap/54834
++      * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
++      $(MULTIBUILDTOP)/../../gcc/include.
++      * Makefile.in: Rebuild.
++
++2013-01-01  Ian Lance Taylor  <iant@google.com>
++
++      PR other/55536
++      * mmap.c (backtrace_alloc): Don't call sync functions if not
++      threaded.
++      (backtrace_free): Likewise.
++
++2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
++
++      * mmapio.c: Define MAP_FAILED if not defined.
++
++2012-12-11  Jakub Jelinek  <jakub@redhat.com>
++
++      PR bootstrap/54926
++      * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
++      * configure.ac: If --with-target-subdir, add -frandom-seed=$@
++      to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
++      accepts it.
++      * Makefile.in: Regenerated.
++      * configure: Regenerated.
++
++2012-12-07  Jakub Jelinek  <jakub@redhat.com>
++
++      PR bootstrap/54926
++      * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
++      * Makefile.in: Regenerated.
++
++2012-11-20  Ian Lance Taylor  <iant@google.com>
++
++      * dwarf.c (read_attribute): Always clear val.
++
++2012-11-13  Ian Lance Taylor  <iant@google.com>
++
++      PR other/55312
++      * configure.ac: Only add -Werror if building a target library.
++      * configure: Rebuild.
++
++2012-11-12  Ian Lance Taylor  <iant@google.com>
++          Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
++          Gerald Pfeifer  <gerald@pfeifer.com>
++
++      * configure.ac: Check for getexecname.
++      * fileline.c: #include <errno.h>.  Define getexecname if not
++      available.
++      (fileline_initialize): Try to find the executable in a few
++      different ways.
++      * print.c (error_callback): Only print the filename if it came
++      from the backtrace state.
++      * configure, config.h.in: Rebuild.
++
++2012-10-29  Ian Lance Taylor  <iant@google.com>
++
++      * mmap.c (backtrace_vector_release): Correct last patch: add
++      aligned, not size.
++
++2012-10-29  Ian Lance Taylor  <iant@google.com>
++
++      * mmap.c (backtrace_vector_release): Make sure freed block is
++      aligned on 8-byte boundary.
++
++2012-10-26  Ian Lance Taylor  <iant@google.com>
++
++      PR other/55087
++      * posix.c (backtrace_open): Add does_not_exist parameter.
++      * elf.c (phdr_callback): Do not warn if shared library could not
++      be opened.
++      * fileline.c (fileline_initialize): Update calls to
++      backtrace_open.
++      * internal.h (backtrace_open): Update declaration.
++
++2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
++
++      PR target/55061
++      * configure.ac: Check for _Unwind_GetIPInfo function declaration.
++      * configure: Regenerate.
++
++2012-10-24  Ian Lance Taylor  <iant@google.com>
++
++      PR target/55061
++      * configure.ac: Check whether -funwind-tables option works.
++      * configure: Rebuild.
++
++2012-10-11  Ian Lance Taylor  <iant@google.com>
++
++      * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
++      * configure: Rebuild.
++
++2012-10-10  Ian Lance Taylor  <iant@google.com>
++
++      * elf.c: Rename all Elf typedefs to start with b_elf, and be all
++      lower case.
++
++2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
++
++      * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
++
++2012-10-09  Ian Lance Taylor  <iant@google.com>
++
++      * dwarf.c (dwarf_fileline): Add cast to avoid warning.
++      (backtrace_dwarf_add): Likewise.
++
++2012-10-09  Ian Lance Taylor  <iant@google.com>
++
++      Add support for tracing through shared libraries.
++      * configure.ac: Check for link.h and dl_iterate_phdr.
++      * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
++      ELF macros before #defining them.
++      (dl_phdr_info, dl_iterate_phdr): Define if system does not have
++      dl_iterate_phdr.
++      (struct elf_syminfo_data): Add next field.
++      (elf_initialize_syminfo): Initialize next field.
++      (elf_add_syminfo_data): New static function.
++      (elf_add): New static function, broken out of
++      backtrace_initialize.  Call backtrace_dwarf_add instead of
++      backtrace_dwarf_initialize.
++      (struct phdr_data): Define.
++      (phdr_callback): New static function.
++      (backtrace_initialize): Call elf_add.
++      * dwarf.c (struct dwarf_data): Add next and base_address fields.
++      (add_unit_addr): Add base_address parameter.  Change all callers.
++      (add_unit_ranges, build_address_map): Likewise.
++      (add_line): Add ddata parameter.  Change all callers.
++      (read_line_program, add_function_range): Likewise.
++      (dwarf_lookup_pc): New static function, broken out of
++      dwarf_fileline.
++      (dwarf_fileline): Call dwarf_lookup_pc.
++      (build_dwarf_data): New static function.
++      (backtrace_dwarf_add): New function.
++      (backtrace_dwarf_initialize): Remove.
++      * internal.h (backtrace_dwarf_initialize): Don't declare.
++      (backtrace_dwarf_add): Declare.
++      * configure, config.h.in: Rebuild.
++
++2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
++
++      * btest.c (f23): Avoid uninitialized variable warning.
++
++2012-10-04  Ian Lance Taylor  <iant@google.com>
++
++      * dwarf.c: If the system header files do not declare strnlen,
++      provide our own version.
++
++2012-10-03  Ian Lance Taylor  <iant@google.com>
++
++      * dwarf.c (read_uleb128): Fix overflow test.
++      (read_sleb128): Likewise.
++      (build_address_map): Don't change unit_buf.start.
++
++2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
++
++      PR other/54761
++      * configure.ac (EXTRA_FLAGS): New.
++      * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
++      * configure, Makefile.in: Regenerate.
++
++2012-09-29  Ian Lance Taylor  <iant@google.com>
++
++      PR other/54749
++      * fileline.c (fileline_initialize): Pass errnum as -1 when
++      reporting that we could not read executable information after a
++      previous failure.
++
++2012-09-27  Ian Lance Taylor  <iant@google.com>
++
++      PR bootstrap/54732
++      * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
++      * Makefile.am: Add dependencies for all objects.
++      * configure, aclocal.m4, Makefile.in: Rebuild.
++
++2012-09-27  Ian Lance Taylor  <iant@google.com>
++
++      PR other/54726
++      * elf.c (backtrace_initialize): Set *fileln_fn, not
++      state->fileln_fn.
++
++2012-09-19  Ian Lance Taylor  <iant@google.com>
++
++      * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
++      as a target library.
++      * configure: Rebuild.
++
++2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
++          Ian Lance Taylor  <iant@google.com>
++
++        * configure.ac (GCC_HEADER_STDINT): Invoke.
++        * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
++        * btest.c: Don't include <stdint.h>.
++        * dwarf.c: Likewise.
++        * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
++
++2012-09-18  Ian Lance Taylor  <iant@google.com>
++
++      PR bootstrap/54623
++      * Makefile.am (AM_CPPFLAGS): Define.
++      (AM_CFLAGS): Remove -I options.
++      * Makefile.in: Rebuild.
++
++2012-09-18  Ian Lance Taylor  <iant@google.com>
++
++      * posix.c (O_BINARY): Define if not defined.
++      (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
++      HAVE_FCNTL is defined.
++      * configure.ac: Test for the fcntl function.
++      * configure, config.h.in: Rebuild.
++
++2012-09-18  Ian Lance Taylor  <iant@google.com>
++
++      * btest.c (test1, test2, test3, test4): Add the unused attribute.
++
++2012-09-18  Ian Lance Taylor  <iant@google.com>
++
++      * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
++
++2012-09-18  Ian Lance Taylor  <iant@google.com>
++
++      * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
++      * mmapio.c: Don't define _GNU_SOURCE.
++      * configure, config.h.in: Rebuild.
++
++2012-09-18  Ian Lance Taylor  <iant@google.com>
++
++      * configure.ac: Check whether strnlen is declared.
++      * dwarf.c: Declare strnlen if not declared.
++      * configure, config.h.in: Rebuild.
++
++2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
++
++      * fileline.c: Include <stdlib.h>.
++      * mmap.c: Likewise.
++
++2012-09-17  Ian Lance Taylor  <iant@google.com>
++
++      PR bootstrap/54611
++      * nounwind.c (backtrace_full): Rename from backtrace.  Add state
++      parameter.
++
++2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
++
++      PR bootstrap/54611
++      * nounwind.c (backtrace_simple): Add state parameter.
++
++2012-09-17  Ian Lance Taylor  <iant@google.com>
++
++      PR bootstrap/54609
++      * unknown.c (unknown_fileline): Add state parameter, remove
++      fileline_data parameter, name error_callback parameter.
++      (backtrace_initialize): Add state parameter.
++
++2012-09-17  Ian Lance Taylor  <iant@google.com>
++
++      * Initial implementation.
++\f
++Copyright (C) 2012-2016 Free Software Foundation, Inc.
++
++Copying and distribution of this file, with or without modification,
++are permitted in any medium without royalty provided the copyright
++notice and this notice are preserved.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6b60e3b3b07382a48c7ffbaf992876426234bdee
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++2014-09-24  David Malcolm  <dmalcolm@redhat.com>
++
++      * ChangeLog.jit: Add copyright footer.
++
++2013-10-03  David Malcolm  <dmalcolm@redhat.com>
++
++      * configure.ac: Add --enable-host-shared.
++      * configure: Regenerate.
++\f
++Copyright (C) 2013-2014 Free Software Foundation, Inc.
++
++Copying and distribution of this file, with or without modification,
++are permitted in any medium without royalty provided the copyright
++notice and this notice are preserved.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..61aec4474a70c4ead832012b93ef7d384c274166
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,136 @@@
++# Makefile.am -- Backtrace Makefile.
++# Copyright (C) 2012-2016 Free Software Foundation, Inc.
++
++# Redistribution and use in source and binary forms, with or without
++# modification, are permitted provided that the following conditions are
++# met:
++
++#     (1) Redistributions of source code must retain the above copyright
++#     notice, this list of conditions and the following disclaimer.
++
++#     (2) Redistributions in binary form must reproduce the above copyright
++#     notice, this list of conditions and the following disclaimer in
++#     the documentation and/or other materials provided with the
++#     distribution.
++
++#     (3) The name of the author may not be used to
++#     endorse or promote products derived from this software without
++#     specific prior written permission.
++
++# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++# POSSIBILITY OF SUCH DAMAGE.
++
++ACLOCAL_AMFLAGS = -I .. -I ../config
++
++AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
++      -I ../libgcc
++
++AM_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) $(PIC_FLAG)
++
++noinst_LTLIBRARIES = libbacktrace.la
++
++libbacktrace_la_SOURCES = \
++      backtrace.h \
++      atomic.c \
++      dwarf.c \
++      fileline.c \
++      internal.h \
++      posix.c \
++      print.c \
++      sort.c \
++      state.c
++
++BACKTRACE_FILES = \
++      backtrace.c \
++      simple.c \
++      nounwind.c
++
++FORMAT_FILES = \
++      elf.c \
++      pecoff.c \
++      unknown.c
++
++VIEW_FILES = \
++      read.c \
++      mmapio.c
++
++ALLOC_FILES = \
++      alloc.c \
++      mmap.c
++
++EXTRA_libbacktrace_la_SOURCES = \
++      $(BACKTRACE_FILES) \
++      $(FORMAT_FILES) \
++      $(VIEW_FILES) \
++      $(ALLOC_FILES)
++
++libbacktrace_la_LIBADD = \
++      $(BACKTRACE_FILE) \
++      $(FORMAT_FILE) \
++      $(VIEW_FILE) \
++      $(ALLOC_FILE)
++
++libbacktrace_la_DEPENDENCIES = $(libbacktrace_la_LIBADD)
++
++# Testsuite.
++
++check_PROGRAMS =
++
++TESTS = $(check_PROGRAMS)
++
++if NATIVE
++
++btest_SOURCES = btest.c
++btest_CFLAGS = $(AM_CFLAGS) -g -O
++btest_LDADD = libbacktrace.la
++
++check_PROGRAMS += btest
++
++stest_SOURCES = stest.c
++stest_LDADD = libbacktrace.la
++
++check_PROGRAMS += stest
++
++endif NATIVE
++
++# We can't use automake's automatic dependency tracking, because it
++# breaks when using bootstrap-lean.  Automatic dependency tracking
++# with GCC bootstrap will cause some of the objects to depend on
++# header files in prev-gcc/include, e.g., stddef.h and stdarg.h.  When
++# using bootstrap-lean, prev-gcc is removed after each stage.  When
++# running "make install", those header files will be gone, causing the
++# library to be rebuilt at install time.  That may not succeed.
++
++# These manual dependencies do not include dependencies on unwind.h,
++# even though that is part of GCC, because where to find it depends on
++# whether we are being built as a host library or a target library.
++
++INCDIR = $(top_srcdir)/../include
++alloc.lo: config.h backtrace.h internal.h
++backtrace.lo: config.h backtrace.h internal.h
++btest.lo: (INCDIR)/filenames.h backtrace.h backtrace-supported.h
++dwarf.lo: config.h $(INCDIR)/dwarf2.h $(INCDIR)/dwarf2.def \
++      $(INCDIR)/filenames.h backtrace.h internal.h
++elf.lo: config.h backtrace.h internal.h
++fileline.lo: config.h backtrace.h internal.h
++mmap.lo: config.h backtrace.h internal.h
++mmapio.lo: config.h backtrace.h internal.h
++nounwind.lo: config.h internal.h
++pecoff.lo: config.h backtrace.h internal.h
++posix.lo: config.h backtrace.h internal.h
++print.lo: config.h backtrace.h internal.h
++read.lo: config.h backtrace.h internal.h
++simple.lo: config.h backtrace.h internal.h
++sort.lo: config.h backtrace.h internal.h
++stest.lo: config.h backtrace.h internal.h
++state.lo: config.h backtrace.h backtrace-supported.h internal.h
++unknown.lo: config.h backtrace.h internal.h
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..de74b5d095f0f2a8319cf5414499123dc0be1976
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,770 @@@
++# Makefile.in generated by automake 1.11.6 from Makefile.am.
++# @configure_input@
++
++# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
++# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
++# Foundation, Inc.
++# This Makefile.in is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
++# PARTICULAR PURPOSE.
++
++@SET_MAKE@
++
++# Makefile.am -- Backtrace Makefile.
++# Copyright (C) 2012-2016 Free Software Foundation, Inc.
++
++# Redistribution and use in source and binary forms, with or without
++# modification, are permitted provided that the following conditions are
++# met:
++
++#     (1) Redistributions of source code must retain the above copyright
++#     notice, this list of conditions and the following disclaimer.
++
++#     (2) Redistributions in binary form must reproduce the above copyright
++#     notice, this list of conditions and the following disclaimer in
++#     the documentation and/or other materials provided with the
++#     distribution.
++
++#     (3) The name of the author may not be used to
++#     endorse or promote products derived from this software without
++#     specific prior written permission.
++
++# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++# POSSIBILITY OF SUCH DAMAGE.
++
++VPATH = @srcdir@
++am__make_dryrun = \
++  { \
++    am__dry=no; \
++    case $$MAKEFLAGS in \
++      *\\[\ \ ]*) \
++        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
++          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
++      *) \
++        for am__flg in $$MAKEFLAGS; do \
++          case $$am__flg in \
++            *=*|--*) ;; \
++            *n*) am__dry=yes; break;; \
++          esac; \
++        done;; \
++    esac; \
++    test $$am__dry = yes; \
++  }
++pkgdatadir = $(datadir)/@PACKAGE@
++pkgincludedir = $(includedir)/@PACKAGE@
++pkglibdir = $(libdir)/@PACKAGE@
++pkglibexecdir = $(libexecdir)/@PACKAGE@
++am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
++install_sh_DATA = $(install_sh) -c -m 644
++install_sh_PROGRAM = $(install_sh) -c
++install_sh_SCRIPT = $(install_sh) -c
++INSTALL_HEADER = $(INSTALL_DATA)
++transform = $(program_transform_name)
++NORMAL_INSTALL = :
++PRE_INSTALL = :
++POST_INSTALL = :
++NORMAL_UNINSTALL = :
++PRE_UNINSTALL = :
++POST_UNINSTALL = :
++build_triplet = @build@
++host_triplet = @host@
++target_triplet = @target@
++check_PROGRAMS = $(am__EXEEXT_1)
++@NATIVE_TRUE@am__append_1 = btest stest
++subdir = .
++DIST_COMMON = README ChangeLog $(srcdir)/Makefile.in \
++      $(srcdir)/Makefile.am $(top_srcdir)/configure \
++      $(am__configure_deps) $(srcdir)/config.h.in \
++      $(srcdir)/../mkinstalldirs $(srcdir)/backtrace-supported.h.in
++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
++am__aclocal_m4_deps = $(top_srcdir)/../config/lead-dot.m4 \
++      $(top_srcdir)/../config/multi.m4 \
++      $(top_srcdir)/../config/override.m4 \
++      $(top_srcdir)/../config/stdint.m4 \
++      $(top_srcdir)/../config/unwind_ipinfo.m4 \
++      $(top_srcdir)/../config/warnings.m4 \
++      $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
++      $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
++      $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
++am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
++      $(ACLOCAL_M4)
++am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
++ configure.lineno config.status.lineno
++mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
++CONFIG_HEADER = config.h
++CONFIG_CLEAN_FILES = backtrace-supported.h
++CONFIG_CLEAN_VPATH_FILES =
++LTLIBRARIES = $(noinst_LTLIBRARIES)
++am__DEPENDENCIES_1 =
++am_libbacktrace_la_OBJECTS = atomic.lo dwarf.lo fileline.lo posix.lo \
++      print.lo sort.lo state.lo
++libbacktrace_la_OBJECTS = $(am_libbacktrace_la_OBJECTS)
++@NATIVE_TRUE@am__EXEEXT_1 = btest$(EXEEXT) stest$(EXEEXT)
++@NATIVE_TRUE@am_btest_OBJECTS = btest-btest.$(OBJEXT)
++btest_OBJECTS = $(am_btest_OBJECTS)
++@NATIVE_TRUE@btest_DEPENDENCIES = libbacktrace.la
++btest_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++      --mode=link $(CCLD) $(btest_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
++      $(LDFLAGS) -o $@
++@NATIVE_TRUE@am_stest_OBJECTS = stest.$(OBJEXT)
++stest_OBJECTS = $(am_stest_OBJECTS)
++@NATIVE_TRUE@stest_DEPENDENCIES = libbacktrace.la
++DEFAULT_INCLUDES = -I.@am__isrc@
++depcomp =
++am__depfiles_maybe =
++COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
++      $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
++LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++      --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
++      $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
++CCLD = $(CC)
++LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++      --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
++      $(LDFLAGS) -o $@
++SOURCES = $(libbacktrace_la_SOURCES) $(EXTRA_libbacktrace_la_SOURCES) \
++      $(btest_SOURCES) $(stest_SOURCES)
++MULTISRCTOP = 
++MULTIBUILDTOP = 
++MULTIDIRS = 
++MULTISUBDIR = 
++MULTIDO = true
++MULTICLEAN = true
++am__can_run_installinfo = \
++  case $$AM_UPDATE_INFO_DIR in \
++    n|no|NO) false;; \
++    *) (install-info --version) >/dev/null 2>&1;; \
++  esac
++ETAGS = etags
++CTAGS = ctags
++am__tty_colors = \
++red=; grn=; lgn=; blu=; std=
++ACLOCAL = @ACLOCAL@
++ALLOC_FILE = @ALLOC_FILE@
++AMTAR = @AMTAR@
++AR = @AR@
++AUTOCONF = @AUTOCONF@
++AUTOHEADER = @AUTOHEADER@
++AUTOMAKE = @AUTOMAKE@
++AWK = @AWK@
++BACKTRACE_FILE = @BACKTRACE_FILE@
++BACKTRACE_SUPPORTED = @BACKTRACE_SUPPORTED@
++BACKTRACE_SUPPORTS_DATA = @BACKTRACE_SUPPORTS_DATA@
++BACKTRACE_SUPPORTS_THREADS = @BACKTRACE_SUPPORTS_THREADS@
++BACKTRACE_USES_MALLOC = @BACKTRACE_USES_MALLOC@
++CC = @CC@
++CFLAGS = @CFLAGS@
++CPP = @CPP@
++CPPFLAGS = @CPPFLAGS@
++CYGPATH_W = @CYGPATH_W@
++DEFS = @DEFS@
++DSYMUTIL = @DSYMUTIL@
++DUMPBIN = @DUMPBIN@
++ECHO_C = @ECHO_C@
++ECHO_N = @ECHO_N@
++ECHO_T = @ECHO_T@
++EGREP = @EGREP@
++EXEEXT = @EXEEXT@
++EXTRA_FLAGS = @EXTRA_FLAGS@
++FGREP = @FGREP@
++FORMAT_FILE = @FORMAT_FILE@
++GREP = @GREP@
++INSTALL = @INSTALL@
++INSTALL_DATA = @INSTALL_DATA@
++INSTALL_PROGRAM = @INSTALL_PROGRAM@
++INSTALL_SCRIPT = @INSTALL_SCRIPT@
++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
++LD = @LD@
++LDFLAGS = @LDFLAGS@
++LIBOBJS = @LIBOBJS@
++LIBS = @LIBS@
++LIBTOOL = @LIBTOOL@
++LIPO = @LIPO@
++LN_S = @LN_S@
++LTLIBOBJS = @LTLIBOBJS@
++MAINT = @MAINT@
++MAKEINFO = @MAKEINFO@
++MKDIR_P = @MKDIR_P@
++NM = @NM@
++NMEDIT = @NMEDIT@
++OBJDUMP = @OBJDUMP@
++OBJEXT = @OBJEXT@
++OTOOL = @OTOOL@
++OTOOL64 = @OTOOL64@
++PACKAGE = @PACKAGE@
++PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
++PACKAGE_NAME = @PACKAGE_NAME@
++PACKAGE_STRING = @PACKAGE_STRING@
++PACKAGE_TARNAME = @PACKAGE_TARNAME@
++PACKAGE_URL = @PACKAGE_URL@
++PACKAGE_VERSION = @PACKAGE_VERSION@
++PATH_SEPARATOR = @PATH_SEPARATOR@
++PIC_FLAG = @PIC_FLAG@
++RANLIB = @RANLIB@
++SED = @SED@
++SET_MAKE = @SET_MAKE@
++SHELL = @SHELL@
++STRIP = @STRIP@
++VERSION = @VERSION@
++VIEW_FILE = @VIEW_FILE@
++WARN_FLAGS = @WARN_FLAGS@
++abs_builddir = @abs_builddir@
++abs_srcdir = @abs_srcdir@
++abs_top_builddir = @abs_top_builddir@
++abs_top_srcdir = @abs_top_srcdir@
++ac_ct_CC = @ac_ct_CC@
++ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
++am__leading_dot = @am__leading_dot@
++am__tar = @am__tar@
++am__untar = @am__untar@
++bindir = @bindir@
++build = @build@
++build_alias = @build_alias@
++build_cpu = @build_cpu@
++build_os = @build_os@
++build_vendor = @build_vendor@
++builddir = @builddir@
++datadir = @datadir@
++datarootdir = @datarootdir@
++docdir = @docdir@
++dvidir = @dvidir@
++exec_prefix = @exec_prefix@
++host = @host@
++host_alias = @host_alias@
++host_cpu = @host_cpu@
++host_os = @host_os@
++host_vendor = @host_vendor@
++htmldir = @htmldir@
++includedir = @includedir@
++infodir = @infodir@
++install_sh = @install_sh@
++libdir = @libdir@
++libexecdir = @libexecdir@
++libtool_VERSION = @libtool_VERSION@
++localedir = @localedir@
++localstatedir = @localstatedir@
++mandir = @mandir@
++mkdir_p = @mkdir_p@
++multi_basedir = @multi_basedir@
++oldincludedir = @oldincludedir@
++pdfdir = @pdfdir@
++prefix = @prefix@
++program_transform_name = @program_transform_name@
++psdir = @psdir@
++sbindir = @sbindir@
++sharedstatedir = @sharedstatedir@
++srcdir = @srcdir@
++sysconfdir = @sysconfdir@
++target = @target@
++target_alias = @target_alias@
++target_cpu = @target_cpu@
++target_os = @target_os@
++target_vendor = @target_vendor@
++top_build_prefix = @top_build_prefix@
++top_builddir = @top_builddir@
++top_srcdir = @top_srcdir@
++ACLOCAL_AMFLAGS = -I .. -I ../config
++AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
++      -I ../libgcc
++
++AM_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) $(PIC_FLAG)
++noinst_LTLIBRARIES = libbacktrace.la
++libbacktrace_la_SOURCES = \
++      backtrace.h \
++      atomic.c \
++      dwarf.c \
++      fileline.c \
++      internal.h \
++      posix.c \
++      print.c \
++      sort.c \
++      state.c
++
++BACKTRACE_FILES = \
++      backtrace.c \
++      simple.c \
++      nounwind.c
++
++FORMAT_FILES = \
++      elf.c \
++      pecoff.c \
++      unknown.c
++
++VIEW_FILES = \
++      read.c \
++      mmapio.c
++
++ALLOC_FILES = \
++      alloc.c \
++      mmap.c
++
++EXTRA_libbacktrace_la_SOURCES = \
++      $(BACKTRACE_FILES) \
++      $(FORMAT_FILES) \
++      $(VIEW_FILES) \
++      $(ALLOC_FILES)
++
++libbacktrace_la_LIBADD = \
++      $(BACKTRACE_FILE) \
++      $(FORMAT_FILE) \
++      $(VIEW_FILE) \
++      $(ALLOC_FILE)
++
++libbacktrace_la_DEPENDENCIES = $(libbacktrace_la_LIBADD)
++TESTS = $(check_PROGRAMS)
++@NATIVE_TRUE@btest_SOURCES = btest.c
++@NATIVE_TRUE@btest_CFLAGS = $(AM_CFLAGS) -g -O
++@NATIVE_TRUE@btest_LDADD = libbacktrace.la
++@NATIVE_TRUE@stest_SOURCES = stest.c
++@NATIVE_TRUE@stest_LDADD = libbacktrace.la
++
++# We can't use automake's automatic dependency tracking, because it
++# breaks when using bootstrap-lean.  Automatic dependency tracking
++# with GCC bootstrap will cause some of the objects to depend on
++# header files in prev-gcc/include, e.g., stddef.h and stdarg.h.  When
++# using bootstrap-lean, prev-gcc is removed after each stage.  When
++# running "make install", those header files will be gone, causing the
++# library to be rebuilt at install time.  That may not succeed.
++
++# These manual dependencies do not include dependencies on unwind.h,
++# even though that is part of GCC, because where to find it depends on
++# whether we are being built as a host library or a target library.
++INCDIR = $(top_srcdir)/../include
++all: config.h
++      $(MAKE) $(AM_MAKEFLAGS) all-am
++
++.SUFFIXES:
++.SUFFIXES: .c .lo .o .obj
++am--refresh: Makefile
++      @:
++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
++      @for dep in $?; do \
++        case '$(am__configure_deps)' in \
++          *$$dep*) \
++            echo ' cd $(srcdir) && $(AUTOMAKE) --foreign --ignore-deps'; \
++            $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign --ignore-deps \
++              && exit 0; \
++            exit 1;; \
++        esac; \
++      done; \
++      echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps Makefile'; \
++      $(am__cd) $(top_srcdir) && \
++        $(AUTOMAKE) --foreign --ignore-deps Makefile
++.PRECIOUS: Makefile
++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
++      @case '$?' in \
++        *config.status*) \
++          echo ' $(SHELL) ./config.status'; \
++          $(SHELL) ./config.status;; \
++        *) \
++          echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
++          cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
++      esac;
++
++$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
++      $(SHELL) ./config.status --recheck
++
++$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
++      $(am__cd) $(srcdir) && $(AUTOCONF)
++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
++      $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
++$(am__aclocal_m4_deps):
++
++config.h: stamp-h1
++      @if test ! -f $@; then rm -f stamp-h1; else :; fi
++      @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
++
++stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
++      @rm -f stamp-h1
++      cd $(top_builddir) && $(SHELL) ./config.status config.h
++$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
++      ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
++      rm -f stamp-h1
++      touch $@
++
++distclean-hdr:
++      -rm -f config.h stamp-h1
++backtrace-supported.h: $(top_builddir)/config.status $(srcdir)/backtrace-supported.h.in
++      cd $(top_builddir) && $(SHELL) ./config.status $@
++
++clean-noinstLTLIBRARIES:
++      -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
++      @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
++        dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
++        test "$$dir" != "$$p" || dir=.; \
++        echo "rm -f \"$${dir}/so_locations\""; \
++        rm -f "$${dir}/so_locations"; \
++      done
++libbacktrace.la: $(libbacktrace_la_OBJECTS) $(libbacktrace_la_DEPENDENCIES) $(EXTRA_libbacktrace_la_DEPENDENCIES) 
++      $(LINK)  $(libbacktrace_la_OBJECTS) $(libbacktrace_la_LIBADD) $(LIBS)
++
++clean-checkPROGRAMS:
++      @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
++      echo " rm -f" $$list; \
++      rm -f $$list || exit $$?; \
++      test -n "$(EXEEXT)" || exit 0; \
++      list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
++      echo " rm -f" $$list; \
++      rm -f $$list
++btest$(EXEEXT): $(btest_OBJECTS) $(btest_DEPENDENCIES) $(EXTRA_btest_DEPENDENCIES) 
++      @rm -f btest$(EXEEXT)
++      $(btest_LINK) $(btest_OBJECTS) $(btest_LDADD) $(LIBS)
++stest$(EXEEXT): $(stest_OBJECTS) $(stest_DEPENDENCIES) $(EXTRA_stest_DEPENDENCIES) 
++      @rm -f stest$(EXEEXT)
++      $(LINK) $(stest_OBJECTS) $(stest_LDADD) $(LIBS)
++
++mostlyclean-compile:
++      -rm -f *.$(OBJEXT)
++
++distclean-compile:
++      -rm -f *.tab.c
++
++.c.o:
++      $(COMPILE) -c $<
++
++.c.obj:
++      $(COMPILE) -c `$(CYGPATH_W) '$<'`
++
++.c.lo:
++      $(LTCOMPILE) -c -o $@ $<
++
++btest-btest.o: btest.c
++      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_CFLAGS) $(CFLAGS) -c -o btest-btest.o `test -f 'btest.c' || echo '$(srcdir)/'`btest.c
++
++btest-btest.obj: btest.c
++      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(btest_CFLAGS) $(CFLAGS) -c -o btest-btest.obj `if test -f 'btest.c'; then $(CYGPATH_W) 'btest.c'; else $(CYGPATH_W) '$(srcdir)/btest.c'; fi`
++
++mostlyclean-libtool:
++      -rm -f *.lo
++
++clean-libtool:
++      -rm -rf .libs _libs
++
++distclean-libtool:
++      -rm -f libtool config.lt
++
++# GNU Make needs to see an explicit $(MAKE) variable in the command it
++# runs to enable its job server during parallel builds.  Hence the
++# comments below.
++all-multi:
++      $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
++install-multi:
++      $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE)
++
++mostlyclean-multi:
++      $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean # $(MAKE)
++clean-multi:
++      $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean # $(MAKE)
++distclean-multi:
++      $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean # $(MAKE)
++maintainer-clean-multi:
++      $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean # $(MAKE)
++
++ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
++      list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
++      unique=`for i in $$list; do \
++          if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++        done | \
++        $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
++            END { if (nonempty) { for (i in files) print i; }; }'`; \
++      mkid -fID $$unique
++tags: TAGS
++
++TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
++              $(TAGS_FILES) $(LISP)
++      set x; \
++      here=`pwd`; \
++      list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
++      unique=`for i in $$list; do \
++          if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++        done | \
++        $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
++            END { if (nonempty) { for (i in files) print i; }; }'`; \
++      shift; \
++      if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
++        test -n "$$unique" || unique=$$empty_fix; \
++        if test $$# -gt 0; then \
++          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
++            "$$@" $$unique; \
++        else \
++          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
++            $$unique; \
++        fi; \
++      fi
++ctags: CTAGS
++CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
++              $(TAGS_FILES) $(LISP)
++      list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
++      unique=`for i in $$list; do \
++          if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++        done | \
++        $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
++            END { if (nonempty) { for (i in files) print i; }; }'`; \
++      test -z "$(CTAGS_ARGS)$$unique" \
++        || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
++           $$unique
++
++GTAGS:
++      here=`$(am__cd) $(top_builddir) && pwd` \
++        && $(am__cd) $(top_srcdir) \
++        && gtags -i $(GTAGS_ARGS) "$$here"
++
++distclean-tags:
++      -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
++
++check-TESTS: $(TESTS)
++      @failed=0; all=0; xfail=0; xpass=0; skip=0; \
++      srcdir=$(srcdir); export srcdir; \
++      list=' $(TESTS) '; \
++      $(am__tty_colors); \
++      if test -n "$$list"; then \
++        for tst in $$list; do \
++          if test -f ./$$tst; then dir=./; \
++          elif test -f $$tst; then dir=; \
++          else dir="$(srcdir)/"; fi; \
++          if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
++            all=`expr $$all + 1`; \
++            case " $(XFAIL_TESTS) " in \
++            *[\ \     ]$$tst[\ \      ]*) \
++              xpass=`expr $$xpass + 1`; \
++              failed=`expr $$failed + 1`; \
++              col=$$red; res=XPASS; \
++            ;; \
++            *) \
++              col=$$grn; res=PASS; \
++            ;; \
++            esac; \
++          elif test $$? -ne 77; then \
++            all=`expr $$all + 1`; \
++            case " $(XFAIL_TESTS) " in \
++            *[\ \     ]$$tst[\ \      ]*) \
++              xfail=`expr $$xfail + 1`; \
++              col=$$lgn; res=XFAIL; \
++            ;; \
++            *) \
++              failed=`expr $$failed + 1`; \
++              col=$$red; res=FAIL; \
++            ;; \
++            esac; \
++          else \
++            skip=`expr $$skip + 1`; \
++            col=$$blu; res=SKIP; \
++          fi; \
++          echo "$${col}$$res$${std}: $$tst"; \
++        done; \
++        if test "$$all" -eq 1; then \
++          tests="test"; \
++          All=""; \
++        else \
++          tests="tests"; \
++          All="All "; \
++        fi; \
++        if test "$$failed" -eq 0; then \
++          if test "$$xfail" -eq 0; then \
++            banner="$$All$$all $$tests passed"; \
++          else \
++            if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
++            banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
++          fi; \
++        else \
++          if test "$$xpass" -eq 0; then \
++            banner="$$failed of $$all $$tests failed"; \
++          else \
++            if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
++            banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
++          fi; \
++        fi; \
++        dashes="$$banner"; \
++        skipped=""; \
++        if test "$$skip" -ne 0; then \
++          if test "$$skip" -eq 1; then \
++            skipped="($$skip test was not run)"; \
++          else \
++            skipped="($$skip tests were not run)"; \
++          fi; \
++          test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
++            dashes="$$skipped"; \
++        fi; \
++        report=""; \
++        if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
++          report="Please report to $(PACKAGE_BUGREPORT)"; \
++          test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
++            dashes="$$report"; \
++        fi; \
++        dashes=`echo "$$dashes" | sed s/./=/g`; \
++        if test "$$failed" -eq 0; then \
++          col="$$grn"; \
++        else \
++          col="$$red"; \
++        fi; \
++        echo "$${col}$$dashes$${std}"; \
++        echo "$${col}$$banner$${std}"; \
++        test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
++        test -z "$$report" || echo "$${col}$$report$${std}"; \
++        echo "$${col}$$dashes$${std}"; \
++        test "$$failed" -eq 0; \
++      else :; fi
++check-am: all-am
++      $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
++      $(MAKE) $(AM_MAKEFLAGS) check-TESTS
++check: check-am
++all-am: Makefile $(LTLIBRARIES) all-multi config.h
++installdirs:
++install: install-am
++install-exec: install-exec-am
++install-data: install-data-am
++uninstall: uninstall-am
++
++install-am: all-am
++      @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
++
++installcheck: installcheck-am
++install-strip:
++      if test -z '$(STRIP)'; then \
++        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
++          install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
++            install; \
++      else \
++        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
++          install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
++          "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
++      fi
++mostlyclean-generic:
++
++clean-generic:
++
++distclean-generic:
++      -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
++      -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
++
++maintainer-clean-generic:
++      @echo "This command is intended for maintainers to use"
++      @echo "it deletes files that may require special tools to rebuild."
++clean: clean-am clean-multi
++
++clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
++      clean-noinstLTLIBRARIES mostlyclean-am
++
++distclean: distclean-am distclean-multi
++      -rm -f $(am__CONFIG_DISTCLEAN_FILES)
++      -rm -f Makefile
++distclean-am: clean-am distclean-compile distclean-generic \
++      distclean-hdr distclean-libtool distclean-tags
++
++dvi: dvi-am
++
++dvi-am:
++
++html: html-am
++
++html-am:
++
++info: info-am
++
++info-am:
++
++install-data-am:
++
++install-dvi: install-dvi-am
++
++install-dvi-am:
++
++install-exec-am: install-multi
++
++install-html: install-html-am
++
++install-html-am:
++
++install-info: install-info-am
++
++install-info-am:
++
++install-man:
++
++install-pdf: install-pdf-am
++
++install-pdf-am:
++
++install-ps: install-ps-am
++
++install-ps-am:
++
++installcheck-am:
++
++maintainer-clean: maintainer-clean-am maintainer-clean-multi
++      -rm -f $(am__CONFIG_DISTCLEAN_FILES)
++      -rm -rf $(top_srcdir)/autom4te.cache
++      -rm -f Makefile
++maintainer-clean-am: distclean-am maintainer-clean-generic
++
++mostlyclean: mostlyclean-am mostlyclean-multi
++
++mostlyclean-am: mostlyclean-compile mostlyclean-generic \
++      mostlyclean-libtool
++
++pdf: pdf-am
++
++pdf-am:
++
++ps: ps-am
++
++ps-am:
++
++uninstall-am:
++
++.MAKE: all all-multi check-am clean-multi distclean-multi install-am \
++      install-multi install-strip maintainer-clean-multi \
++      mostlyclean-multi
++
++.PHONY: CTAGS GTAGS all all-am all-multi am--refresh check check-TESTS \
++      check-am clean clean-checkPROGRAMS clean-generic clean-libtool \
++      clean-multi clean-noinstLTLIBRARIES ctags distclean \
++      distclean-compile distclean-generic distclean-hdr \
++      distclean-libtool distclean-multi distclean-tags dvi dvi-am \
++      html html-am info info-am install install-am install-data \
++      install-data-am install-dvi install-dvi-am install-exec \
++      install-exec-am install-html install-html-am install-info \
++      install-info-am install-man install-multi install-pdf \
++      install-pdf-am install-ps install-ps-am install-strip \
++      installcheck installcheck-am installdirs maintainer-clean \
++      maintainer-clean-generic maintainer-clean-multi mostlyclean \
++      mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
++      mostlyclean-multi pdf pdf-am ps ps-am tags uninstall \
++      uninstall-am
++
++alloc.lo: config.h backtrace.h internal.h
++backtrace.lo: config.h backtrace.h internal.h
++btest.lo: (INCDIR)/filenames.h backtrace.h backtrace-supported.h
++dwarf.lo: config.h $(INCDIR)/dwarf2.h $(INCDIR)/dwarf2.def \
++      $(INCDIR)/filenames.h backtrace.h internal.h
++elf.lo: config.h backtrace.h internal.h
++fileline.lo: config.h backtrace.h internal.h
++mmap.lo: config.h backtrace.h internal.h
++mmapio.lo: config.h backtrace.h internal.h
++nounwind.lo: config.h internal.h
++pecoff.lo: config.h backtrace.h internal.h
++posix.lo: config.h backtrace.h internal.h
++print.lo: config.h backtrace.h internal.h
++read.lo: config.h backtrace.h internal.h
++simple.lo: config.h backtrace.h internal.h
++sort.lo: config.h backtrace.h internal.h
++stest.lo: config.h backtrace.h internal.h
++state.lo: config.h backtrace.h backtrace-supported.h internal.h
++unknown.lo: config.h backtrace.h internal.h
++
++# Tell versions [3.59,3.63) of GNU make to not export all variables.
++# Otherwise a system limit (for SysV at least) may be exceeded.
++.NOEXPORT:
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e8b225745c9c639e67ea4f6fa0f97041ba978276
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,23 @@@
++The libbacktrace library
++Initially written by Ian Lance Taylor <iant@google.com>
++
++The libbacktrace library may be linked into a program or library and
++used to produce symbolic backtraces.  Sample uses would be to print a
++detailed backtrace when an error occurs or to gather detailed
++profiling information.
++
++The libbacktrace library is provided under a BSD license.  See the
++source files for the exact license text.
++
++The public functions are declared and documented in the header file
++backtrace.h, which should be #include'd by a user of the library.
++
++Building libbacktrace will generate a file backtrace-supported.h,
++which a user of the library may use to determine whether backtraces
++will work.  See the source file backtrace-supported.h.in for the
++macros that it defines.
++
++As of September 2012, libbacktrace only supports ELF executables with
++DWARF debugging information.  The library is written to make it
++straightforward to add support for other object file and debugging
++formats.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8e84ddd1f10132210a49e7d08ba522e09df3a8ad
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,683 @@@
++# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
++
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
++# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
++# Inc.
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
++# PARTICULAR PURPOSE.
++
++m4_ifndef([AC_AUTOCONF_VERSION],
++  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
++m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
++[m4_warning([this file was generated for autoconf 2.64.
++You have another version of autoconf.  It may work, but is not guaranteed to.
++If you have problems, you may need to regenerate the build system entirely.
++To do so, use the procedure documented by the package, typically `autoreconf'.])])
++
++# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
++# Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# serial 1
++
++# AM_AUTOMAKE_VERSION(VERSION)
++# ----------------------------
++# Automake X.Y traces this macro to ensure aclocal.m4 has been
++# generated from the m4 files accompanying Automake X.Y.
++# (This private macro should not be called outside this file.)
++AC_DEFUN([AM_AUTOMAKE_VERSION],
++[am__api_version='1.11'
++dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
++dnl require some minimum version.  Point them to the right macro.
++m4_if([$1], [1.11.6], [],
++      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
++])
++
++# _AM_AUTOCONF_VERSION(VERSION)
++# -----------------------------
++# aclocal traces this macro to find the Autoconf version.
++# This is a private macro too.  Using m4_define simplifies
++# the logic in aclocal, which can simply ignore this definition.
++m4_define([_AM_AUTOCONF_VERSION], [])
++
++# AM_SET_CURRENT_AUTOMAKE_VERSION
++# -------------------------------
++# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
++# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
++AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
++[AM_AUTOMAKE_VERSION([1.11.6])dnl
++m4_ifndef([AC_AUTOCONF_VERSION],
++  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
++_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
++
++# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
++
++# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# serial 1
++
++# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
++# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
++# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
++#
++# Of course, Automake must honor this variable whenever it calls a
++# tool from the auxiliary directory.  The problem is that $srcdir (and
++# therefore $ac_aux_dir as well) can be either absolute or relative,
++# depending on how configure is run.  This is pretty annoying, since
++# it makes $ac_aux_dir quite unusable in subdirectories: in the top
++# source directory, any form will work fine, but in subdirectories a
++# relative path needs to be adjusted first.
++#
++# $ac_aux_dir/missing
++#    fails when called from a subdirectory if $ac_aux_dir is relative
++# $top_srcdir/$ac_aux_dir/missing
++#    fails if $ac_aux_dir is absolute,
++#    fails when called from a subdirectory in a VPATH build with
++#          a relative $ac_aux_dir
++#
++# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
++# are both prefixed by $srcdir.  In an in-source build this is usually
++# harmless because $srcdir is `.', but things will broke when you
++# start a VPATH build or use an absolute $srcdir.
++#
++# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
++# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
++#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
++# and then we would define $MISSING as
++#   MISSING="\${SHELL} $am_aux_dir/missing"
++# This will work as long as MISSING is not called from configure, because
++# unfortunately $(top_srcdir) has no meaning in configure.
++# However there are other variables, like CC, which are often used in
++# configure, and could therefore not use this "fixed" $ac_aux_dir.
++#
++# Another solution, used here, is to always expand $ac_aux_dir to an
++# absolute PATH.  The drawback is that using absolute paths prevent a
++# configured tree to be moved without reconfiguration.
++
++AC_DEFUN([AM_AUX_DIR_EXPAND],
++[dnl Rely on autoconf to set up CDPATH properly.
++AC_PREREQ([2.50])dnl
++# expand $ac_aux_dir to an absolute path
++am_aux_dir=`cd $ac_aux_dir && pwd`
++])
++
++# AM_CONDITIONAL                                            -*- Autoconf -*-
++
++# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
++# Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# serial 9
++
++# AM_CONDITIONAL(NAME, SHELL-CONDITION)
++# -------------------------------------
++# Define a conditional.
++AC_DEFUN([AM_CONDITIONAL],
++[AC_PREREQ(2.52)dnl
++ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
++      [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
++AC_SUBST([$1_TRUE])dnl
++AC_SUBST([$1_FALSE])dnl
++_AM_SUBST_NOTMAKE([$1_TRUE])dnl
++_AM_SUBST_NOTMAKE([$1_FALSE])dnl
++m4_define([_AM_COND_VALUE_$1], [$2])dnl
++if $2; then
++  $1_TRUE=
++  $1_FALSE='#'
++else
++  $1_TRUE='#'
++  $1_FALSE=
++fi
++AC_CONFIG_COMMANDS_PRE(
++[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
++  AC_MSG_ERROR([[conditional "$1" was never defined.
++Usually this means the macro was only invoked conditionally.]])
++fi])])
++
++# Do all the work for Automake.                             -*- Autoconf -*-
++
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
++# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# serial 16
++
++# This macro actually does too much.  Some checks are only needed if
++# your package does certain things.  But this isn't really a big deal.
++
++# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
++# AM_INIT_AUTOMAKE([OPTIONS])
++# -----------------------------------------------
++# The call with PACKAGE and VERSION arguments is the old style
++# call (pre autoconf-2.50), which is being phased out.  PACKAGE
++# and VERSION should now be passed to AC_INIT and removed from
++# the call to AM_INIT_AUTOMAKE.
++# We support both call styles for the transition.  After
++# the next Automake release, Autoconf can make the AC_INIT
++# arguments mandatory, and then we can depend on a new Autoconf
++# release and drop the old call support.
++AC_DEFUN([AM_INIT_AUTOMAKE],
++[AC_PREREQ([2.62])dnl
++dnl Autoconf wants to disallow AM_ names.  We explicitly allow
++dnl the ones we care about.
++m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
++AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
++AC_REQUIRE([AC_PROG_INSTALL])dnl
++if test "`cd $srcdir && pwd`" != "`pwd`"; then
++  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
++  # is not polluted with repeated "-I."
++  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
++  # test to see if srcdir already configured
++  if test -f $srcdir/config.status; then
++    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
++  fi
++fi
++
++# test whether we have cygpath
++if test -z "$CYGPATH_W"; then
++  if (cygpath --version) >/dev/null 2>/dev/null; then
++    CYGPATH_W='cygpath -w'
++  else
++    CYGPATH_W=echo
++  fi
++fi
++AC_SUBST([CYGPATH_W])
++
++# Define the identity of the package.
++dnl Distinguish between old-style and new-style calls.
++m4_ifval([$2],
++[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
++ AC_SUBST([PACKAGE], [$1])dnl
++ AC_SUBST([VERSION], [$2])],
++[_AM_SET_OPTIONS([$1])dnl
++dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
++m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
++  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
++ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
++ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
++
++_AM_IF_OPTION([no-define],,
++[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
++ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
++
++# Some tools Automake needs.
++AC_REQUIRE([AM_SANITY_CHECK])dnl
++AC_REQUIRE([AC_ARG_PROGRAM])dnl
++AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
++AM_MISSING_PROG(AUTOCONF, autoconf)
++AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
++AM_MISSING_PROG(AUTOHEADER, autoheader)
++AM_MISSING_PROG(MAKEINFO, makeinfo)
++AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
++AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
++AC_REQUIRE([AM_PROG_MKDIR_P])dnl
++# We need awk for the "check" target.  The system "awk" is bad on
++# some platforms.
++AC_REQUIRE([AC_PROG_AWK])dnl
++AC_REQUIRE([AC_PROG_MAKE_SET])dnl
++AC_REQUIRE([AM_SET_LEADING_DOT])dnl
++_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
++            [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
++                           [_AM_PROG_TAR([v7])])])
++_AM_IF_OPTION([no-dependencies],,
++[AC_PROVIDE_IFELSE([AC_PROG_CC],
++                [_AM_DEPENDENCIES(CC)],
++                [define([AC_PROG_CC],
++                        defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
++AC_PROVIDE_IFELSE([AC_PROG_CXX],
++                [_AM_DEPENDENCIES(CXX)],
++                [define([AC_PROG_CXX],
++                        defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
++AC_PROVIDE_IFELSE([AC_PROG_OBJC],
++                [_AM_DEPENDENCIES(OBJC)],
++                [define([AC_PROG_OBJC],
++                        defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
++])
++_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
++dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
++dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
++dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
++AC_CONFIG_COMMANDS_PRE(dnl
++[m4_provide_if([_AM_COMPILER_EXEEXT],
++  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
++])
++
++dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
++dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
++dnl mangled by Autoconf and run in a shell conditional statement.
++m4_define([_AC_COMPILER_EXEEXT],
++m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
++
++
++# When config.status generates a header, we must update the stamp-h file.
++# This file resides in the same directory as the config header
++# that is generated.  The stamp files are numbered to have different names.
++
++# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
++# loop where config.status creates the headers, so we can generate
++# our stamp files there.
++AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
++[# Compute $1's index in $config_headers.
++_am_arg=$1
++_am_stamp_count=1
++for _am_header in $config_headers :; do
++  case $_am_header in
++    $_am_arg | $_am_arg:* )
++      break ;;
++    * )
++      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
++  esac
++done
++echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
++
++# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
++# Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# serial 1
++
++# AM_PROG_INSTALL_SH
++# ------------------
++# Define $install_sh.
++AC_DEFUN([AM_PROG_INSTALL_SH],
++[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
++if test x"${install_sh}" != xset; then
++  case $am_aux_dir in
++  *\ * | *\   *)
++    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
++  *)
++    install_sh="\${SHELL} $am_aux_dir/install-sh"
++  esac
++fi
++AC_SUBST(install_sh)])
++
++# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
++# From Jim Meyering
++
++# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
++# 2011 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# serial 5
++
++# AM_MAINTAINER_MODE([DEFAULT-MODE])
++# ----------------------------------
++# Control maintainer-specific portions of Makefiles.
++# Default is to disable them, unless `enable' is passed literally.
++# For symmetry, `disable' may be passed as well.  Anyway, the user
++# can override the default with the --enable/--disable switch.
++AC_DEFUN([AM_MAINTAINER_MODE],
++[m4_case(m4_default([$1], [disable]),
++       [enable], [m4_define([am_maintainer_other], [disable])],
++       [disable], [m4_define([am_maintainer_other], [enable])],
++       [m4_define([am_maintainer_other], [enable])
++        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
++AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
++  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
++  AC_ARG_ENABLE([maintainer-mode],
++[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
++                        (and sometimes confusing) to the casual installer],
++      [USE_MAINTAINER_MODE=$enableval],
++      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
++  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
++  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
++  MAINT=$MAINTAINER_MODE_TRUE
++  AC_SUBST([MAINT])dnl
++]
++)
++
++AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
++
++# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
++
++# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
++# Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# serial 6
++
++# AM_MISSING_PROG(NAME, PROGRAM)
++# ------------------------------
++AC_DEFUN([AM_MISSING_PROG],
++[AC_REQUIRE([AM_MISSING_HAS_RUN])
++$1=${$1-"${am_missing_run}$2"}
++AC_SUBST($1)])
++
++
++# AM_MISSING_HAS_RUN
++# ------------------
++# Define MISSING if not defined so far and test if it supports --run.
++# If it does, set am_missing_run to use it, otherwise, to nothing.
++AC_DEFUN([AM_MISSING_HAS_RUN],
++[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
++AC_REQUIRE_AUX_FILE([missing])dnl
++if test x"${MISSING+set}" != xset; then
++  case $am_aux_dir in
++  *\ * | *\   *)
++    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
++  *)
++    MISSING="\${SHELL} $am_aux_dir/missing" ;;
++  esac
++fi
++# Use eval to expand $SHELL
++if eval "$MISSING --run true"; then
++  am_missing_run="$MISSING --run "
++else
++  am_missing_run=
++  AC_MSG_WARN([`missing' script is too old or missing])
++fi
++])
++
++# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
++# Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# serial 1
++
++# AM_PROG_MKDIR_P
++# ---------------
++# Check for `mkdir -p'.
++AC_DEFUN([AM_PROG_MKDIR_P],
++[AC_PREREQ([2.60])dnl
++AC_REQUIRE([AC_PROG_MKDIR_P])dnl
++dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
++dnl while keeping a definition of mkdir_p for backward compatibility.
++dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
++dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
++dnl Makefile.ins that do not define MKDIR_P, so we do our own
++dnl adjustment using top_builddir (which is defined more often than
++dnl MKDIR_P).
++AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
++case $mkdir_p in
++  [[\\/$]]* | ?:[[\\/]]*) ;;
++  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
++esac
++])
++
++# Helper functions for option handling.                     -*- Autoconf -*-
++
++# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
++# Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# serial 5
++
++# _AM_MANGLE_OPTION(NAME)
++# -----------------------
++AC_DEFUN([_AM_MANGLE_OPTION],
++[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
++
++# _AM_SET_OPTION(NAME)
++# --------------------
++# Set option NAME.  Presently that only means defining a flag for this option.
++AC_DEFUN([_AM_SET_OPTION],
++[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
++
++# _AM_SET_OPTIONS(OPTIONS)
++# ------------------------
++# OPTIONS is a space-separated list of Automake options.
++AC_DEFUN([_AM_SET_OPTIONS],
++[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
++
++# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
++# -------------------------------------------
++# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
++AC_DEFUN([_AM_IF_OPTION],
++[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
++
++# Check to make sure that the build environment is sane.    -*- Autoconf -*-
++
++# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
++# Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# serial 5
++
++# AM_SANITY_CHECK
++# ---------------
++AC_DEFUN([AM_SANITY_CHECK],
++[AC_MSG_CHECKING([whether build environment is sane])
++# Just in case
++sleep 1
++echo timestamp > conftest.file
++# Reject unsafe characters in $srcdir or the absolute working directory
++# name.  Accept space and tab only in the latter.
++am_lf='
++'
++case `pwd` in
++  *[[\\\"\#\$\&\'\`$am_lf]]*)
++    AC_MSG_ERROR([unsafe absolute working directory name]);;
++esac
++case $srcdir in
++  *[[\\\"\#\$\&\'\`$am_lf\ \  ]]*)
++    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
++esac
++
++# Do `set' in a subshell so we don't clobber the current shell's
++# arguments.  Must try -L first in case configure is actually a
++# symlink; some systems play weird games with the mod time of symlinks
++# (eg FreeBSD returns the mod time of the symlink's containing
++# directory).
++if (
++   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
++   if test "$[*]" = "X"; then
++      # -L didn't work.
++      set X `ls -t "$srcdir/configure" conftest.file`
++   fi
++   rm -f conftest.file
++   if test "$[*]" != "X $srcdir/configure conftest.file" \
++      && test "$[*]" != "X conftest.file $srcdir/configure"; then
++
++      # If neither matched, then we have a broken ls.  This can happen
++      # if, for instance, CONFIG_SHELL is bash and it inherits a
++      # broken ls alias from the environment.  This has actually
++      # happened.  Such a system could not be considered "sane".
++      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
++alias in your environment])
++   fi
++
++   test "$[2]" = conftest.file
++   )
++then
++   # Ok.
++   :
++else
++   AC_MSG_ERROR([newly created file is older than distributed files!
++Check your system clock])
++fi
++AC_MSG_RESULT(yes)])
++
++# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# serial 1
++
++# AM_PROG_INSTALL_STRIP
++# ---------------------
++# One issue with vendor `install' (even GNU) is that you can't
++# specify the program used to strip binaries.  This is especially
++# annoying in cross-compiling environments, where the build's strip
++# is unlikely to handle the host's binaries.
++# Fortunately install-sh will honor a STRIPPROG variable, so we
++# always use install-sh in `make install-strip', and initialize
++# STRIPPROG with the value of the STRIP variable (set by the user).
++AC_DEFUN([AM_PROG_INSTALL_STRIP],
++[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
++# Installed binaries are usually stripped using `strip' when the user
++# run `make install-strip'.  However `strip' might not be the right
++# tool to use in cross-compilation environments, therefore Automake
++# will honor the `STRIP' environment variable to overrule this program.
++dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
++if test "$cross_compiling" != no; then
++  AC_CHECK_TOOL([STRIP], [strip], :)
++fi
++INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
++AC_SUBST([INSTALL_STRIP_PROGRAM])])
++
++# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# serial 3
++
++# _AM_SUBST_NOTMAKE(VARIABLE)
++# ---------------------------
++# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
++# This macro is traced by Automake.
++AC_DEFUN([_AM_SUBST_NOTMAKE])
++
++# AM_SUBST_NOTMAKE(VARIABLE)
++# --------------------------
++# Public sister of _AM_SUBST_NOTMAKE.
++AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
++
++# Check how to create a tarball.                            -*- Autoconf -*-
++
++# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# serial 2
++
++# _AM_PROG_TAR(FORMAT)
++# --------------------
++# Check how to create a tarball in format FORMAT.
++# FORMAT should be one of `v7', `ustar', or `pax'.
++#
++# Substitute a variable $(am__tar) that is a command
++# writing to stdout a FORMAT-tarball containing the directory
++# $tardir.
++#     tardir=directory && $(am__tar) > result.tar
++#
++# Substitute a variable $(am__untar) that extract such
++# a tarball read from stdin.
++#     $(am__untar) < result.tar
++AC_DEFUN([_AM_PROG_TAR],
++[# Always define AMTAR for backward compatibility.  Yes, it's still used
++# in the wild :-(  We should find a proper way to deprecate it ...
++AC_SUBST([AMTAR], ['$${TAR-tar}'])
++m4_if([$1], [v7],
++     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
++     [m4_case([$1], [ustar],, [pax],,
++              [m4_fatal([Unknown tar format])])
++AC_MSG_CHECKING([how to create a $1 tar archive])
++# Loop over all known methods to create a tar archive until one works.
++_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
++_am_tools=${am_cv_prog_tar_$1-$_am_tools}
++# Do not fold the above two line into one, because Tru64 sh and
++# Solaris sh will not grok spaces in the rhs of `-'.
++for _am_tool in $_am_tools
++do
++  case $_am_tool in
++  gnutar)
++    for _am_tar in tar gnutar gtar;
++    do
++      AM_RUN_LOG([$_am_tar --version]) && break
++    done
++    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
++    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
++    am__untar="$_am_tar -xf -"
++    ;;
++  plaintar)
++    # Must skip GNU tar: if it does not support --format= it doesn't create
++    # ustar tarball either.
++    (tar --version) >/dev/null 2>&1 && continue
++    am__tar='tar chf - "$$tardir"'
++    am__tar_='tar chf - "$tardir"'
++    am__untar='tar xf -'
++    ;;
++  pax)
++    am__tar='pax -L -x $1 -w "$$tardir"'
++    am__tar_='pax -L -x $1 -w "$tardir"'
++    am__untar='pax -r'
++    ;;
++  cpio)
++    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
++    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
++    am__untar='cpio -i -H $1 -d'
++    ;;
++  none)
++    am__tar=false
++    am__tar_=false
++    am__untar=false
++    ;;
++  esac
++
++  # If the value was cached, stop now.  We just wanted to have am__tar
++  # and am__untar set.
++  test -n "${am_cv_prog_tar_$1}" && break
++
++  # tar/untar a dummy directory, and stop if the command works
++  rm -rf conftest.dir
++  mkdir conftest.dir
++  echo GrepMe > conftest.dir/file
++  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
++  rm -rf conftest.dir
++  if test -s conftest.tar; then
++    AM_RUN_LOG([$am__untar <conftest.tar])
++    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
++  fi
++done
++rm -rf conftest.dir
++
++AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
++AC_MSG_RESULT([$am_cv_prog_tar_$1])])
++AC_SUBST([am__tar])
++AC_SUBST([am__untar])
++]) # _AM_PROG_TAR
++
++m4_include([../config/lead-dot.m4])
++m4_include([../config/multi.m4])
++m4_include([../config/override.m4])
++m4_include([../config/stdint.m4])
++m4_include([../config/unwind_ipinfo.m4])
++m4_include([../config/warnings.m4])
++m4_include([../libtool.m4])
++m4_include([../ltoptions.m4])
++m4_include([../ltsugar.m4])
++m4_include([../ltversion.m4])
++m4_include([../lt~obsolete.m4])
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3333624a2095626c46a7af00d375611a2e825b2a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,156 @@@
++/* alloc.c -- Memory allocation without mmap.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <errno.h>
++#include <stdlib.h>
++#include <sys/types.h>
++
++#include "backtrace.h"
++#include "internal.h"
++
++/* Allocation routines to use on systems that do not support anonymous
++   mmap.  This implementation just uses malloc, which means that the
++   backtrace functions may not be safely invoked from a signal
++   handler.  */
++
++/* Allocate memory like malloc.  If ERROR_CALLBACK is NULL, don't
++   report an error.  */
++
++void *
++backtrace_alloc (struct backtrace_state *state ATTRIBUTE_UNUSED,
++               size_t size, backtrace_error_callback error_callback,
++               void *data)
++{
++  void *ret;
++
++  ret = malloc (size);
++  if (ret == NULL)
++    {
++      if (error_callback)
++      error_callback (data, "malloc", errno);
++    }
++  return ret;
++}
++
++/* Free memory.  */
++
++void
++backtrace_free (struct backtrace_state *state ATTRIBUTE_UNUSED,
++              void *p, size_t size ATTRIBUTE_UNUSED,
++              backtrace_error_callback error_callback ATTRIBUTE_UNUSED,
++              void *data ATTRIBUTE_UNUSED)
++{
++  free (p);
++}
++
++/* Grow VEC by SIZE bytes.  */
++
++void *
++backtrace_vector_grow (struct backtrace_state *state ATTRIBUTE_UNUSED,
++                     size_t size, backtrace_error_callback error_callback,
++                     void *data, struct backtrace_vector *vec)
++{
++  void *ret;
++
++  if (size > vec->alc)
++    {
++      size_t alc;
++      void *base;
++
++      if (vec->size == 0)
++      alc = 32 * size;
++      else if (vec->size >= 4096)
++      alc = vec->size + 4096;
++      else
++      alc = 2 * vec->size;
++
++      if (alc < vec->size + size)
++      alc = vec->size + size;
++
++      base = realloc (vec->base, alc);
++      if (base == NULL)
++      {
++        error_callback (data, "realloc", errno);
++        return NULL;
++      }
++
++      vec->base = base;
++      vec->alc = alc - vec->size;
++    }
++
++  ret = (char *) vec->base + vec->size;
++  vec->size += size;
++  vec->alc -= size;
++  return ret;
++}
++
++/* Finish the current allocation on VEC.  */
++
++void *
++backtrace_vector_finish (struct backtrace_state *state,
++                       struct backtrace_vector *vec,
++                       backtrace_error_callback error_callback,
++                       void *data)
++{
++  void *ret;
++
++  /* With this allocator we call realloc in backtrace_vector_grow,
++     which means we can't easily reuse the memory here.  So just
++     release it.  */
++  if (!backtrace_vector_release (state, vec, error_callback, data))
++    return NULL;
++  ret = vec->base;
++  vec->base = NULL;
++  vec->size = 0;
++  vec->alc = 0;
++  return ret;
++}
++
++/* Release any extra space allocated for VEC.  */
++
++int
++backtrace_vector_release (struct backtrace_state *state ATTRIBUTE_UNUSED,
++                        struct backtrace_vector *vec,
++                        backtrace_error_callback error_callback,
++                        void *data)
++{
++  vec->base = realloc (vec->base, vec->size);
++  if (vec->base == NULL)
++    {
++      error_callback (data, "realloc", errno);
++      return 0;
++    }
++  vec->alc = 0;
++  return 1;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..08aeb1eeb3500250aa003b29f51f7646b6a235c9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,355 @@@
++/* ANSI and traditional C compatability macros
++   Copyright (C) 1991-2015 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++This program is free software; you can redistribute it and/or modify
++it under the terms of the GNU General Public License as published by
++the Free Software Foundation; either version 2 of the License, or
++(at your option) any later version.
++
++This program is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with this program; if not, write to the Free Software
++Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
++
++/* ANSI and traditional C compatibility macros
++
++   ANSI C is assumed if __STDC__ is #defined.
++
++   Macro              ANSI C definition       Traditional C definition
++   -----              ---- - ----------       ----------- - ----------
++   PTR                        `void *'                `char *'
++   const              not defined             `'
++   volatile           not defined             `'
++   signed             not defined             `'
++
++   For ease of writing code which uses GCC extensions but needs to be
++   portable to other compilers, we provide the GCC_VERSION macro that
++   simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various
++   wrappers around __attribute__.  Also, __extension__ will be #defined
++   to nothing if it doesn't work.  See below.  */
++
++#ifndef       _ANSIDECL_H
++#define _ANSIDECL_H   1
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++/* Every source file includes this file,
++   so they will all get the switch for lint.  */
++/* LINTLIBRARY */
++
++/* Using MACRO(x,y) in cpp #if conditionals does not work with some
++   older preprocessors.  Thus we can't define something like this:
++
++#define HAVE_GCC_VERSION(MAJOR, MINOR) \
++  (__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))
++
++and then test "#if HAVE_GCC_VERSION(2,7)".
++
++So instead we use the macro below and test it against specific values.  */
++
++/* This macro simplifies testing whether we are using gcc, and if it
++   is of a particular minimum version. (Both major & minor numbers are
++   significant.)  This macro will evaluate to 0 if we are not using
++   gcc at all.  */
++#ifndef GCC_VERSION
++#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
++#endif /* GCC_VERSION */
++
++#if defined (__STDC__) || defined(__cplusplus) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32)
++/* All known AIX compilers implement these things (but don't always
++   define __STDC__).  The RISC/OS MIPS compiler defines these things
++   in SVR4 mode, but does not define __STDC__.  */
++/* eraxxon@alumni.rice.edu: The Compaq C++ compiler, unlike many other
++   C++ compilers, does not define __STDC__, though it acts as if this
++   was so. (Verified versions: 5.7, 6.2, 6.3, 6.5) */
++
++#define PTR           void *
++
++#undef const
++#undef volatile
++#undef signed
++
++/* inline requires special treatment; it's in C99, and GCC >=2.7 supports
++   it too, but it's not in C89.  */
++#undef inline
++#if __STDC_VERSION__ >= 199901L || defined(__cplusplus) || (defined(__SUNPRO_C) && defined(__C99FEATURES__))
++/* it's a keyword */
++#else
++# if GCC_VERSION >= 2007
++#  define inline __inline__   /* __inline__ prevents -pedantic warnings */
++# else
++#  define inline  /* nothing */
++# endif
++#endif
++
++#else /* Not ANSI C.  */
++
++#define PTR           char *
++
++/* some systems define these in header files for non-ansi mode */
++#undef const
++#undef volatile
++#undef signed
++#undef inline
++#define const
++#define volatile
++#define signed
++#define inline
++
++#endif        /* ANSI C.  */
++
++/* Define macros for some gcc attributes.  This permits us to use the
++   macros freely, and know that they will come into play for the
++   version of gcc in which they are supported.  */
++
++#if (GCC_VERSION < 2007)
++# define __attribute__(x)
++#endif
++
++/* Attribute __malloc__ on functions was valid as of gcc 2.96. */
++#ifndef ATTRIBUTE_MALLOC
++# if (GCC_VERSION >= 2096)
++#  define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
++# else
++#  define ATTRIBUTE_MALLOC
++# endif /* GNUC >= 2.96 */
++#endif /* ATTRIBUTE_MALLOC */
++
++/* Attributes on labels were valid as of gcc 2.93 and g++ 4.5.  For
++   g++ an attribute on a label must be followed by a semicolon.  */
++#ifndef ATTRIBUTE_UNUSED_LABEL
++# ifndef __cplusplus
++#  if GCC_VERSION >= 2093
++#   define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
++#  else
++#   define ATTRIBUTE_UNUSED_LABEL
++#  endif
++# else
++#  if GCC_VERSION >= 4005
++#   define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED ;
++#  else
++#   define ATTRIBUTE_UNUSED_LABEL
++#  endif
++# endif
++#endif
++
++/* Similarly to ARG_UNUSED below.  Prior to GCC 3.4, the C++ frontend
++   couldn't parse attributes placed after the identifier name, and now
++   the entire compiler is built with C++.  */
++#ifndef ATTRIBUTE_UNUSED
++#if GCC_VERSION >= 3004
++#  define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
++#else
++#define ATTRIBUTE_UNUSED
++#endif
++#endif /* ATTRIBUTE_UNUSED */
++
++/* Before GCC 3.4, the C++ frontend couldn't parse attributes placed after the
++   identifier name.  */
++#if ! defined(__cplusplus) || (GCC_VERSION >= 3004)
++# define ARG_UNUSED(NAME) NAME ATTRIBUTE_UNUSED
++#else /* !__cplusplus || GNUC >= 3.4 */
++# define ARG_UNUSED(NAME) NAME
++#endif /* !__cplusplus || GNUC >= 3.4 */
++
++#ifndef ATTRIBUTE_NORETURN
++#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
++#endif /* ATTRIBUTE_NORETURN */
++
++/* Attribute `nonnull' was valid as of gcc 3.3.  */
++#ifndef ATTRIBUTE_NONNULL
++# if (GCC_VERSION >= 3003)
++#  define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
++# else
++#  define ATTRIBUTE_NONNULL(m)
++# endif /* GNUC >= 3.3 */
++#endif /* ATTRIBUTE_NONNULL */
++
++/* Attribute `returns_nonnull' was valid as of gcc 4.9.  */
++#ifndef ATTRIBUTE_RETURNS_NONNULL
++# if (GCC_VERSION >= 4009)
++#  define ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
++# else
++#  define ATTRIBUTE_RETURNS_NONNULL
++# endif /* GNUC >= 4.9 */
++#endif /* ATTRIBUTE_RETURNS_NONNULL */
++
++/* Attribute `pure' was valid as of gcc 3.0.  */
++#ifndef ATTRIBUTE_PURE
++# if (GCC_VERSION >= 3000)
++#  define ATTRIBUTE_PURE __attribute__ ((__pure__))
++# else
++#  define ATTRIBUTE_PURE
++# endif /* GNUC >= 3.0 */
++#endif /* ATTRIBUTE_PURE */
++
++/* Use ATTRIBUTE_PRINTF when the format specifier must not be NULL.
++   This was the case for the `printf' format attribute by itself
++   before GCC 3.3, but as of 3.3 we need to add the `nonnull'
++   attribute to retain this behavior.  */
++#ifndef ATTRIBUTE_PRINTF
++#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ATTRIBUTE_NONNULL(m)
++#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
++#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
++#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
++#define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
++#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
++#endif /* ATTRIBUTE_PRINTF */
++
++/* Use ATTRIBUTE_FPTR_PRINTF when the format attribute is to be set on
++   a function pointer.  Format attributes were allowed on function
++   pointers as of gcc 3.1.  */
++#ifndef ATTRIBUTE_FPTR_PRINTF
++# if (GCC_VERSION >= 3001)
++#  define ATTRIBUTE_FPTR_PRINTF(m, n) ATTRIBUTE_PRINTF(m, n)
++# else
++#  define ATTRIBUTE_FPTR_PRINTF(m, n)
++# endif /* GNUC >= 3.1 */
++# define ATTRIBUTE_FPTR_PRINTF_1 ATTRIBUTE_FPTR_PRINTF(1, 2)
++# define ATTRIBUTE_FPTR_PRINTF_2 ATTRIBUTE_FPTR_PRINTF(2, 3)
++# define ATTRIBUTE_FPTR_PRINTF_3 ATTRIBUTE_FPTR_PRINTF(3, 4)
++# define ATTRIBUTE_FPTR_PRINTF_4 ATTRIBUTE_FPTR_PRINTF(4, 5)
++# define ATTRIBUTE_FPTR_PRINTF_5 ATTRIBUTE_FPTR_PRINTF(5, 6)
++#endif /* ATTRIBUTE_FPTR_PRINTF */
++
++/* Use ATTRIBUTE_NULL_PRINTF when the format specifier may be NULL.  A
++   NULL format specifier was allowed as of gcc 3.3.  */
++#ifndef ATTRIBUTE_NULL_PRINTF
++# if (GCC_VERSION >= 3003)
++#  define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
++# else
++#  define ATTRIBUTE_NULL_PRINTF(m, n)
++# endif /* GNUC >= 3.3 */
++# define ATTRIBUTE_NULL_PRINTF_1 ATTRIBUTE_NULL_PRINTF(1, 2)
++# define ATTRIBUTE_NULL_PRINTF_2 ATTRIBUTE_NULL_PRINTF(2, 3)
++# define ATTRIBUTE_NULL_PRINTF_3 ATTRIBUTE_NULL_PRINTF(3, 4)
++# define ATTRIBUTE_NULL_PRINTF_4 ATTRIBUTE_NULL_PRINTF(4, 5)
++# define ATTRIBUTE_NULL_PRINTF_5 ATTRIBUTE_NULL_PRINTF(5, 6)
++#endif /* ATTRIBUTE_NULL_PRINTF */
++
++/* Attribute `sentinel' was valid as of gcc 3.5.  */
++#ifndef ATTRIBUTE_SENTINEL
++# if (GCC_VERSION >= 3005)
++#  define ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__))
++# else
++#  define ATTRIBUTE_SENTINEL
++# endif /* GNUC >= 3.5 */
++#endif /* ATTRIBUTE_SENTINEL */
++
++
++#ifndef ATTRIBUTE_ALIGNED_ALIGNOF
++# if (GCC_VERSION >= 3000)
++#  define ATTRIBUTE_ALIGNED_ALIGNOF(m) __attribute__ ((__aligned__ (__alignof__ (m))))
++# else
++#  define ATTRIBUTE_ALIGNED_ALIGNOF(m)
++# endif /* GNUC >= 3.0 */
++#endif /* ATTRIBUTE_ALIGNED_ALIGNOF */
++
++/* Useful for structures whose layout must much some binary specification
++   regardless of the alignment and padding qualities of the compiler.  */
++#ifndef ATTRIBUTE_PACKED
++# define ATTRIBUTE_PACKED __attribute__ ((packed))
++#endif
++
++/* Attribute `hot' and `cold' was valid as of gcc 4.3.  */
++#ifndef ATTRIBUTE_COLD
++# if (GCC_VERSION >= 4003)
++#  define ATTRIBUTE_COLD __attribute__ ((__cold__))
++# else
++#  define ATTRIBUTE_COLD
++# endif /* GNUC >= 4.3 */
++#endif /* ATTRIBUTE_COLD */
++#ifndef ATTRIBUTE_HOT
++# if (GCC_VERSION >= 4003)
++#  define ATTRIBUTE_HOT __attribute__ ((__hot__))
++# else
++#  define ATTRIBUTE_HOT
++# endif /* GNUC >= 4.3 */
++#endif /* ATTRIBUTE_HOT */
++
++/* Attribute 'no_sanitize_undefined' was valid as of gcc 4.9.  */
++#ifndef ATTRIBUTE_NO_SANITIZE_UNDEFINED
++# if (GCC_VERSION >= 4009)
++#  define ATTRIBUTE_NO_SANITIZE_UNDEFINED __attribute__ ((no_sanitize_undefined))
++# else
++#  define ATTRIBUTE_NO_SANITIZE_UNDEFINED
++# endif /* GNUC >= 4.9 */
++#endif /* ATTRIBUTE_NO_SANITIZE_UNDEFINED */
++
++/* We use __extension__ in some places to suppress -pedantic warnings
++   about GCC extensions.  This feature didn't work properly before
++   gcc 2.8.  */
++#if GCC_VERSION < 2008
++#define __extension__
++#endif
++
++/* This is used to declare a const variable which should be visible
++   outside of the current compilation unit.  Use it as
++     EXPORTED_CONST int i = 1;
++   This is because the semantics of const are different in C and C++.
++   "extern const" is permitted in C but it looks strange, and gcc
++   warns about it when -Wc++-compat is not used.  */
++#ifdef __cplusplus
++#define EXPORTED_CONST extern const
++#else
++#define EXPORTED_CONST const
++#endif
++
++/* Be conservative and only use enum bitfields with C++ or GCC.
++   FIXME: provide a complete autoconf test for buggy enum bitfields.  */
++
++#ifdef __cplusplus
++#define ENUM_BITFIELD(TYPE) enum TYPE
++#elif (GCC_VERSION > 2000)
++#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE
++#else
++#define ENUM_BITFIELD(TYPE) unsigned int
++#endif
++
++/* C++11 adds the ability to add "override" after an implementation of a
++   virtual function in a subclass, to:
++     (A) document that this is an override of a virtual function
++     (B) allow the compiler to issue a warning if it isn't (e.g. a mismatch
++         of the type signature).
++
++   Similarly, it allows us to add a "final" to indicate that no subclass
++   may subsequently override the vfunc.
++
++   Provide OVERRIDE and FINAL as macros, allowing us to get these benefits
++   when compiling with C++11 support, but without requiring C++11.
++
++   For gcc, use "-std=c++11" to enable C++11 support; gcc 6 onwards enables
++   this by default (actually GNU++14).  */
++
++#if __cplusplus >= 201103
++/* C++11 claims to be available: use it.  final/override were only
++   implemented in 4.7, though.  */
++# if GCC_VERSION < 4007
++#  define OVERRIDE
++#  define FINAL
++# else
++#  define OVERRIDE override
++#  define FINAL final
++# endif
++#elif GCC_VERSION >= 4007
++/* G++ 4.7 supports __final in C++98.  */
++# define OVERRIDE
++# define FINAL __final
++#else
++/* No C++11 support; leave the macros empty: */
++# define OVERRIDE
++# define FINAL
++#endif
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif        /* ansidecl.h   */
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4f31ff36f81d622365116f2e3fa2a034cc799a13
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,113 @@@
++/* atomic.c -- Support for atomic functions if not present.
++   Copyright (C) 2013-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <sys/types.h>
++
++#include "backtrace.h"
++#include "backtrace-supported.h"
++#include "internal.h"
++
++/* This file holds implementations of the atomic functions that are
++   used if the host compiler has the sync functions but not the atomic
++   functions, as is true of versions of GCC before 4.7.  */
++
++#if !defined (HAVE_ATOMIC_FUNCTIONS) && defined (HAVE_SYNC_FUNCTIONS)
++
++/* Do an atomic load of a pointer.  */
++
++void *
++backtrace_atomic_load_pointer (void *arg)
++{
++  void **pp;
++  void *p;
++
++  pp = (void **) arg;
++  p = *pp;
++  while (!__sync_bool_compare_and_swap (pp, p, p))
++    p = *pp;
++  return p;
++}
++
++/* Do an atomic load of an int.  */
++
++int
++backtrace_atomic_load_int (int *p)
++{
++  int i;
++
++  i = *p;
++  while (!__sync_bool_compare_and_swap (p, i, i))
++    i = *p;
++  return i;
++}
++
++/* Do an atomic store of a pointer.  */
++
++void
++backtrace_atomic_store_pointer (void *arg, void *p)
++{
++  void **pp;
++  void *old;
++
++  pp = (void **) arg;
++  old = *pp;
++  while (!__sync_bool_compare_and_swap (pp, old, p))
++    old = *pp;
++}
++
++/* Do an atomic store of a size_t value.  */
++
++void
++backtrace_atomic_store_size_t (size_t *p, size_t v)
++{
++  size_t old;
++
++  old = *p;
++  while (!__sync_bool_compare_and_swap (p, old, v))
++    old = *p;
++}
++
++/* Do an atomic store of a int value.  */
++
++void
++backtrace_atomic_store_int (int *p, int v)
++{
++  size_t old;
++
++  old = *p;
++  while (!__sync_bool_compare_and_swap (p, old, v))
++    old = *p;
++}
++
++#endif
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c2d03d241adb0fbe514d51ace6bee34167764e90
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,66 @@@
++/* backtrace-supported.h.in -- Whether stack backtrace is supported.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++/* The file backtrace-supported.h.in is used by configure to generate
++   the file backtrace-supported.h.  The file backtrace-supported.h may
++   be #include'd to see whether the backtrace library will be able to
++   get a backtrace and produce symbolic information.  */
++
++
++/* BACKTRACE_SUPPORTED will be #define'd as 1 if the backtrace library
++   should work, 0 if it will not.  Libraries may #include this to make
++   other arrangements.  */
++
++#define BACKTRACE_SUPPORTED @BACKTRACE_SUPPORTED@
++
++/* BACKTRACE_USES_MALLOC will be #define'd as 1 if the backtrace
++   library will call malloc as it works, 0 if it will call mmap
++   instead.  This may be used to determine whether it is safe to call
++   the backtrace functions from a signal handler.  In general this
++   only applies to calls like backtrace and backtrace_pcinfo.  It does
++   not apply to backtrace_simple, which never calls malloc.  It does
++   not apply to backtrace_print, which always calls fprintf and
++   therefore malloc.  */
++
++#define BACKTRACE_USES_MALLOC @BACKTRACE_USES_MALLOC@
++
++/* BACKTRACE_SUPPORTS_THREADS will be #define'd as 1 if the backtrace
++   library is configured with threading support, 0 if not.  If this is
++   0, the threaded parameter to backtrace_create_state must be passed
++   as 0.  */
++
++#define BACKTRACE_SUPPORTS_THREADS @BACKTRACE_SUPPORTS_THREADS@
++
++/* BACKTRACE_SUPPORTS_DATA will be #defined'd as 1 if the backtrace_syminfo
++   will work for variables.  It will always work for functions.  */
++
++#define BACKTRACE_SUPPORTS_DATA @BACKTRACE_SUPPORTS_DATA@
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7372a27f15fce5149c7943b1d8297e412fd584fd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,129 @@@
++/* backtrace.c -- Entry point for stack backtrace library.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <sys/types.h>
++
++#include "unwind.h"
++#include "backtrace.h"
++#include "internal.h"
++
++/* The main backtrace_full routine.  */
++
++/* Data passed through _Unwind_Backtrace.  */
++
++struct backtrace_data
++{
++  /* Number of frames to skip.  */
++  int skip;
++  /* Library state.  */
++  struct backtrace_state *state;
++  /* Callback routine.  */
++  backtrace_full_callback callback;
++  /* Error callback routine.  */
++  backtrace_error_callback error_callback;
++  /* Data to pass to callback routines.  */
++  void *data;
++  /* Value to return from backtrace_full.  */
++  int ret;
++  /* Whether there is any memory available.  */
++  int can_alloc;
++};
++
++/* Unwind library callback routine.  This is passed to
++   _Unwind_Backtrace.  */
++
++static _Unwind_Reason_Code
++unwind (struct _Unwind_Context *context, void *vdata)
++{
++  struct backtrace_data *bdata = (struct backtrace_data *) vdata;
++  uintptr_t pc;
++  int ip_before_insn = 0;
++
++#ifdef HAVE_GETIPINFO
++  pc = _Unwind_GetIPInfo (context, &ip_before_insn);
++#else
++  pc = _Unwind_GetIP (context);
++#endif
++
++  if (bdata->skip > 0)
++    {
++      --bdata->skip;
++      return _URC_NO_REASON;
++    }
++
++  if (!ip_before_insn)
++    --pc;
++
++  if (!bdata->can_alloc)
++    bdata->ret = bdata->callback (bdata->data, pc, NULL, 0, NULL);
++  else
++    bdata->ret = backtrace_pcinfo (bdata->state, pc, bdata->callback,
++                                 bdata->error_callback, bdata->data);
++  if (bdata->ret != 0)
++    return _URC_END_OF_STACK;
++
++  return _URC_NO_REASON;
++}
++
++/* Get a stack backtrace.  */
++
++int
++backtrace_full (struct backtrace_state *state, int skip,
++              backtrace_full_callback callback,
++              backtrace_error_callback error_callback, void *data)
++{
++  struct backtrace_data bdata;
++  void *p;
++
++  bdata.skip = skip + 1;
++  bdata.state = state;
++  bdata.callback = callback;
++  bdata.error_callback = error_callback;
++  bdata.data = data;
++  bdata.ret = 0;
++
++  /* If we can't allocate any memory at all, don't try to produce
++     file/line information.  */
++  p = backtrace_alloc (state, 4096, NULL, NULL);
++  if (p == NULL)
++    bdata.can_alloc = 0;
++  else
++    {
++      backtrace_free (state, p, 4096, NULL, NULL);
++      bdata.can_alloc = 1;
++    }
++
++  _Unwind_Backtrace (unwind, &bdata);
++  return bdata.ret;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0e6e29f39c4fe88e492639161d68dea36b7ffe97
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,199 @@@
++/* backtrace.h -- Public header file for stack backtrace library.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#ifndef BACKTRACE_H
++#define BACKTRACE_H
++
++#include <stddef.h>
++#include <stdio.h>
++
++/* We want to get a definition for uintptr_t, but we still care about
++   systems that don't have <stdint.h>.  */
++#if defined(__GLIBC__) && __GLIBC__ >= 2
++
++#include <stdint.h>
++
++#elif defined(HAVE_STDINT_H)
++
++#include <stdint.h>
++
++#else
++
++/* Systems that don't have <stdint.h> must provide gstdint.h, e.g.,
++   from GCC_HEADER_STDINT in configure.ac.  */
++#include "gstdint.h"
++
++#endif
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++/* The backtrace state.  This struct is intentionally not defined in
++   the public interface.  */
++
++struct backtrace_state;
++
++/* The type of the error callback argument to backtrace functions.
++   This function, if not NULL, will be called for certain error cases.
++   The DATA argument is passed to the function that calls this one.
++   The MSG argument is an error message.  The ERRNUM argument, if
++   greater than 0, holds an errno value.  The MSG buffer may become
++   invalid after this function returns.
++
++   As a special case, the ERRNUM argument will be passed as -1 if no
++   debug info can be found for the executable, but the function
++   requires debug info (e.g., backtrace_full, backtrace_pcinfo).  The
++   MSG in this case will be something along the lines of "no debug
++   info".  Similarly, ERRNUM will be passed as -1 if there is no
++   symbol table, but the function requires a symbol table (e.g.,
++   backtrace_syminfo).  This may be used as a signal that some other
++   approach should be tried.  */
++
++typedef void (*backtrace_error_callback) (void *data, const char *msg,
++                                        int errnum);
++
++/* Create state information for the backtrace routines.  This must be
++   called before any of the other routines, and its return value must
++   be passed to all of the other routines.  FILENAME is the path name
++   of the executable file; if it is NULL the library will try
++   system-specific path names.  If not NULL, FILENAME must point to a
++   permanent buffer.  If THREADED is non-zero the state may be
++   accessed by multiple threads simultaneously, and the library will
++   use appropriate atomic operations.  If THREADED is zero the state
++   may only be accessed by one thread at a time.  This returns a state
++   pointer on success, NULL on error.  If an error occurs, this will
++   call the ERROR_CALLBACK routine.  */
++
++extern struct backtrace_state *backtrace_create_state (
++    const char *filename, int threaded,
++    backtrace_error_callback error_callback, void *data);
++
++/* The type of the callback argument to the backtrace_full function.
++   DATA is the argument passed to backtrace_full.  PC is the program
++   counter.  FILENAME is the name of the file containing PC, or NULL
++   if not available.  LINENO is the line number in FILENAME containing
++   PC, or 0 if not available.  FUNCTION is the name of the function
++   containing PC, or NULL if not available.  This should return 0 to
++   continuing tracing.  The FILENAME and FUNCTION buffers may become
++   invalid after this function returns.  */
++
++typedef int (*backtrace_full_callback) (void *data, uintptr_t pc,
++                                      const char *filename, int lineno,
++                                      const char *function);
++
++/* Get a full stack backtrace.  SKIP is the number of frames to skip;
++   passing 0 will start the trace with the function calling
++   backtrace_full.  DATA is passed to the callback routine.  If any
++   call to CALLBACK returns a non-zero value, the stack backtrace
++   stops, and backtrace returns that value; this may be used to limit
++   the number of stack frames desired.  If all calls to CALLBACK
++   return 0, backtrace returns 0.  The backtrace_full function will
++   make at least one call to either CALLBACK or ERROR_CALLBACK.  This
++   function requires debug info for the executable.  */
++
++extern int backtrace_full (struct backtrace_state *state, int skip,
++                         backtrace_full_callback callback,
++                         backtrace_error_callback error_callback,
++                         void *data);
++
++/* The type of the callback argument to the backtrace_simple function.
++   DATA is the argument passed to simple_backtrace.  PC is the program
++   counter.  This should return 0 to continue tracing.  */
++
++typedef int (*backtrace_simple_callback) (void *data, uintptr_t pc);
++
++/* Get a simple backtrace.  SKIP is the number of frames to skip, as
++   in backtrace.  DATA is passed to the callback routine.  If any call
++   to CALLBACK returns a non-zero value, the stack backtrace stops,
++   and backtrace_simple returns that value.  Otherwise
++   backtrace_simple returns 0.  The backtrace_simple function will
++   make at least one call to either CALLBACK or ERROR_CALLBACK.  This
++   function does not require any debug info for the executable.  */
++
++extern int backtrace_simple (struct backtrace_state *state, int skip,
++                           backtrace_simple_callback callback,
++                           backtrace_error_callback error_callback,
++                           void *data);
++
++/* Print the current backtrace in a user readable format to a FILE.
++   SKIP is the number of frames to skip, as in backtrace_full.  Any
++   error messages are printed to stderr.  This function requires debug
++   info for the executable.  */
++
++extern void backtrace_print (struct backtrace_state *state, int skip, FILE *);
++
++/* Given PC, a program counter in the current program, call the
++   callback function with filename, line number, and function name
++   information.  This will normally call the callback function exactly
++   once.  However, if the PC happens to describe an inlined call, and
++   the debugging information contains the necessary information, then
++   this may call the callback function multiple times.  This will make
++   at least one call to either CALLBACK or ERROR_CALLBACK.  This
++   returns the first non-zero value returned by CALLBACK, or 0.  */
++
++extern int backtrace_pcinfo (struct backtrace_state *state, uintptr_t pc,
++                           backtrace_full_callback callback,
++                           backtrace_error_callback error_callback,
++                           void *data);
++
++/* The type of the callback argument to backtrace_syminfo.  DATA and
++   PC are the arguments passed to backtrace_syminfo.  SYMNAME is the
++   name of the symbol for the corresponding code.  SYMVAL is the
++   value and SYMSIZE is the size of the symbol.  SYMNAME will be NULL
++   if no error occurred but the symbol could not be found.  */
++
++typedef void (*backtrace_syminfo_callback) (void *data, uintptr_t pc,
++                                          const char *symname,
++                                          uintptr_t symval,
++                                          uintptr_t symsize);
++
++/* Given ADDR, an address or program counter in the current program,
++   call the callback information with the symbol name and value
++   describing the function or variable in which ADDR may be found.
++   This will call either CALLBACK or ERROR_CALLBACK exactly once.
++   This returns 1 on success, 0 on failure.  This function requires
++   the symbol table but does not require the debug info.  Note that if
++   the symbol table is present but ADDR could not be found in the
++   table, CALLBACK will be called with a NULL SYMNAME argument.
++   Returns 1 on success, 0 on error.  */
++
++extern int backtrace_syminfo (struct backtrace_state *state, uintptr_t addr,
++                            backtrace_syminfo_callback callback,
++                            backtrace_error_callback error_callback,
++                            void *data);
++
++#ifdef __cplusplus
++} /* End extern "C".  */
++#endif
++
++#endif
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8c69b1b87f267e95971ebd00e59be1bf8fd59d52
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,721 @@@
++/* btest.c -- Test for libbacktrace library
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++/* This program tests the externally visible interfaces of the
++   libbacktrace library.  */
++
++#include <assert.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "filenames.h"
++
++#include "backtrace.h"
++#include "backtrace-supported.h"
++
++/* Portable attribute syntax.  Actually some of these tests probably
++   won't work if the attributes are not recognized.  */
++
++#ifndef GCC_VERSION
++# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
++#endif
++
++#if (GCC_VERSION < 2007)
++# define __attribute__(x)
++#endif
++
++#ifndef ATTRIBUTE_UNUSED
++# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
++#endif
++
++/* Used to collect backtrace info.  */
++
++struct info
++{
++  char *filename;
++  int lineno;
++  char *function;
++};
++
++/* Passed to backtrace callback function.  */
++
++struct bdata
++{
++  struct info *all;
++  size_t index;
++  size_t max;
++  int failed;
++};
++
++/* Passed to backtrace_simple callback function.  */
++
++struct sdata
++{
++  uintptr_t *addrs;
++  size_t index;
++  size_t max;
++  int failed;
++};
++
++/* Passed to backtrace_syminfo callback function.  */
++
++struct symdata
++{
++  const char *name;
++  uintptr_t val, size;
++  int failed;
++};
++
++/* The backtrace state.  */
++
++static void *state;
++
++/* The number of failures.  */
++
++static int failures;
++
++/* Return the base name in a path.  */
++
++static const char *
++base (const char *p)
++{
++  const char *last;
++  const char *s;
++
++  last = NULL;
++  for (s = p; *s != '\0'; ++s)
++    {
++      if (IS_DIR_SEPARATOR (*s))
++      last = s + 1;
++    }
++  return last != NULL ? last : p;
++}
++
++/* Check an entry in a struct info array.  */
++
++static void
++check (const char *name, int index, const struct info *all, int want_lineno,
++       const char *want_function, int *failed)
++{
++  if (*failed)
++    return;
++  if (all[index].filename == NULL || all[index].function == NULL)
++    {
++      fprintf (stderr, "%s: [%d]: missing file name or function name\n",
++             name, index);
++      *failed = 1;
++      return;
++    }
++  if (strcmp (base (all[index].filename), "btest.c") != 0)
++    {
++      fprintf (stderr, "%s: [%d]: got %s expected test.c\n", name, index,
++             all[index].filename);
++      *failed = 1;
++    }
++  if (all[index].lineno != want_lineno)
++    {
++      fprintf (stderr, "%s: [%d]: got %d expected %d\n", name, index,
++             all[index].lineno, want_lineno);
++      *failed = 1;
++    }
++  if (strcmp (all[index].function, want_function) != 0)
++    {
++      fprintf (stderr, "%s: [%d]: got %s expected %s\n", name, index,
++             all[index].function, want_function);
++      *failed = 1;
++    }
++}
++
++/* The backtrace callback function.  */
++
++static int
++callback_one (void *vdata, uintptr_t pc ATTRIBUTE_UNUSED,
++            const char *filename, int lineno, const char *function)
++{
++  struct bdata *data = (struct bdata *) vdata;
++  struct info *p;
++
++  if (data->index >= data->max)
++    {
++      fprintf (stderr, "callback_one: callback called too many times\n");
++      data->failed = 1;
++      return 1;
++    }
++
++  p = &data->all[data->index];
++  if (filename == NULL)
++    p->filename = NULL;
++  else
++    {
++      p->filename = strdup (filename);
++      assert (p->filename != NULL);
++    }
++  p->lineno = lineno;
++  if (function == NULL)
++    p->function = NULL;
++  else
++    {
++      p->function = strdup (function);
++      assert (p->function != NULL);
++    }
++  ++data->index;
++
++  return 0;
++}
++
++/* An error callback passed to backtrace.  */
++
++static void
++error_callback_one (void *vdata, const char *msg, int errnum)
++{
++  struct bdata *data = (struct bdata *) vdata;
++
++  fprintf (stderr, "%s", msg);
++  if (errnum > 0)
++    fprintf (stderr, ": %s", strerror (errnum));
++  fprintf (stderr, "\n");
++  data->failed = 1;
++}
++
++/* The backtrace_simple callback function.  */
++
++static int
++callback_two (void *vdata, uintptr_t pc)
++{
++  struct sdata *data = (struct sdata *) vdata;
++
++  if (data->index >= data->max)
++    {
++      fprintf (stderr, "callback_two: callback called too many times\n");
++      data->failed = 1;
++      return 1;
++    }
++
++  data->addrs[data->index] = pc;
++  ++data->index;
++
++  return 0;
++}
++
++/* An error callback passed to backtrace_simple.  */
++
++static void
++error_callback_two (void *vdata, const char *msg, int errnum)
++{
++  struct sdata *data = (struct sdata *) vdata;
++
++  fprintf (stderr, "%s", msg);
++  if (errnum > 0)
++    fprintf (stderr, ": %s", strerror (errnum));
++  fprintf (stderr, "\n");
++  data->failed = 1;
++}
++
++/* The backtrace_syminfo callback function.  */
++
++static void
++callback_three (void *vdata, uintptr_t pc ATTRIBUTE_UNUSED,
++              const char *symname, uintptr_t symval,
++              uintptr_t symsize)
++{
++  struct symdata *data = (struct symdata *) vdata;
++
++  if (symname == NULL)
++    data->name = NULL;
++  else
++    {
++      data->name = strdup (symname);
++      assert (data->name != NULL);
++    }
++  data->val = symval;
++  data->size = symsize;
++}
++
++/* The backtrace_syminfo error callback function.  */
++
++static void
++error_callback_three (void *vdata, const char *msg, int errnum)
++{
++  struct symdata *data = (struct symdata *) vdata;
++
++  fprintf (stderr, "%s", msg);
++  if (errnum > 0)
++    fprintf (stderr, ": %s", strerror (errnum));
++  fprintf (stderr, "\n");
++  data->failed = 1;
++}
++
++/* Test the backtrace function with non-inlined functions.  */
++
++static int test1 (void) __attribute__ ((noinline, unused));
++static int f2 (int) __attribute__ ((noinline));
++static int f3 (int, int) __attribute__ ((noinline));
++
++static int
++test1 (void)
++{
++  /* Returning a value here and elsewhere avoids a tailcall which
++     would mess up the backtrace.  */
++  return f2 (__LINE__) + 1;
++}
++
++static int
++f2 (int f1line)
++{
++  return f3 (f1line, __LINE__) + 2;
++}
++
++static int
++f3 (int f1line, int f2line)
++{
++  struct info all[20];
++  struct bdata data;
++  int f3line;
++  int i;
++
++  data.all = &all[0];
++  data.index = 0;
++  data.max = 20;
++  data.failed = 0;
++
++  f3line = __LINE__ + 1;
++  i = backtrace_full (state, 0, callback_one, error_callback_one, &data);
++
++  if (i != 0)
++    {
++      fprintf (stderr, "test1: unexpected return value %d\n", i);
++      data.failed = 1;
++    }
++
++  if (data.index < 3)
++    {
++      fprintf (stderr,
++             "test1: not enough frames; got %zu, expected at least 3\n",
++             data.index);
++      data.failed = 1;
++    }
++
++  check ("test1", 0, all, f3line, "f3", &data.failed);
++  check ("test1", 1, all, f2line, "f2", &data.failed);
++  check ("test1", 2, all, f1line, "test1", &data.failed);
++
++  printf ("%s: backtrace_full noinline\n", data.failed ? "FAIL" : "PASS");
++
++  if (data.failed)
++    ++failures;
++
++  return failures;
++}
++
++/* Test the backtrace function with inlined functions.  */
++
++static inline int test2 (void) __attribute__ ((always_inline, unused));
++static inline int f12 (int) __attribute__ ((always_inline));
++static inline int f13 (int, int) __attribute__ ((always_inline));
++
++static inline int
++test2 (void)
++{
++  return f12 (__LINE__) + 1;
++}
++
++static inline int
++f12 (int f1line)
++{
++  return f13 (f1line, __LINE__) + 2;
++}
++
++static inline int
++f13 (int f1line, int f2line)
++{
++  struct info all[20];
++  struct bdata data;
++  int f3line;
++  int i;
++
++  data.all = &all[0];
++  data.index = 0;
++  data.max = 20;
++  data.failed = 0;
++
++  f3line = __LINE__ + 1;
++  i = backtrace_full (state, 0, callback_one, error_callback_one, &data);
++
++  if (i != 0)
++    {
++      fprintf (stderr, "test2: unexpected return value %d\n", i);
++      data.failed = 1;
++    }
++
++  check ("test2", 0, all, f3line, "f13", &data.failed);
++  check ("test2", 1, all, f2line, "f12", &data.failed);
++  check ("test2", 2, all, f1line, "test2", &data.failed);
++
++  printf ("%s: backtrace_full inline\n", data.failed ? "FAIL" : "PASS");
++
++  if (data.failed)
++    ++failures;
++
++  return failures;
++}
++
++/* Test the backtrace_simple function with non-inlined functions.  */
++
++static int test3 (void) __attribute__ ((noinline, unused));
++static int f22 (int) __attribute__ ((noinline));
++static int f23 (int, int) __attribute__ ((noinline));
++
++static int
++test3 (void)
++{
++  return f22 (__LINE__) + 1;
++}
++
++static int
++f22 (int f1line)
++{
++  return f23 (f1line, __LINE__) + 2;
++}
++
++static int
++f23 (int f1line, int f2line)
++{
++  uintptr_t addrs[20];
++  struct sdata data;
++  int f3line;
++  int i;
++
++  data.addrs = &addrs[0];
++  data.index = 0;
++  data.max = 20;
++  data.failed = 0;
++
++  f3line = __LINE__ + 1;
++  i = backtrace_simple (state, 0, callback_two, error_callback_two, &data);
++
++  if (i != 0)
++    {
++      fprintf (stderr, "test3: unexpected return value %d\n", i);
++      data.failed = 1;
++    }
++
++  if (!data.failed)
++    {
++      struct info all[20];
++      struct bdata bdata;
++      int j;
++
++      bdata.all = &all[0];
++      bdata.index = 0;
++      bdata.max = 20;
++      bdata.failed = 0;
++
++      for (j = 0; j < 3; ++j)
++      {
++        i = backtrace_pcinfo (state, addrs[j], callback_one,
++                              error_callback_one, &bdata);
++        if (i != 0)
++          {
++            fprintf (stderr,
++                     ("test3: unexpected return value "
++                      "from backtrace_pcinfo %d\n"),
++                     i);
++            bdata.failed = 1;
++          }
++        if (!bdata.failed && bdata.index != (size_t) (j + 1))
++          {
++            fprintf (stderr,
++                     ("wrong number of calls from backtrace_pcinfo "
++                      "got %u expected %d\n"),
++                     (unsigned int) bdata.index, j + 1);
++            bdata.failed = 1;
++          }
++      }
++
++      check ("test3", 0, all, f3line, "f23", &bdata.failed);
++      check ("test3", 1, all, f2line, "f22", &bdata.failed);
++      check ("test3", 2, all, f1line, "test3", &bdata.failed);
++
++      if (bdata.failed)
++      data.failed = 1;
++
++      for (j = 0; j < 3; ++j)
++      {
++        struct symdata symdata;
++
++        symdata.name = NULL;
++        symdata.val = 0;
++        symdata.size = 0;
++        symdata.failed = 0;
++
++        i = backtrace_syminfo (state, addrs[j], callback_three,
++                               error_callback_three, &symdata);
++        if (i == 0)
++          {
++            fprintf (stderr,
++                     ("test3: [%d]: unexpected return value "
++                      "from backtrace_syminfo %d\n"),
++                     j, i);
++            symdata.failed = 1;
++          }
++
++        if (!symdata.failed)
++          {
++            const char *expected;
++
++            switch (j)
++              {
++              case 0:
++                expected = "f23";
++                break;
++              case 1:
++                expected = "f22";
++                break;
++              case 2:
++                expected = "test3";
++                break;
++              default:
++                assert (0);
++              }
++
++            if (symdata.name == NULL)
++              {
++                fprintf (stderr, "test3: [%d]: NULL syminfo name\n", j);
++                symdata.failed = 1;
++              }
++            /* Use strncmp, not strcmp, because GCC might create a
++               clone.  */
++            else if (strncmp (symdata.name, expected, strlen (expected))
++                     != 0)
++              {
++                fprintf (stderr,
++                         ("test3: [%d]: unexpected syminfo name "
++                          "got %s expected %s\n"),
++                         j, symdata.name, expected);
++                symdata.failed = 1;
++              }
++          }
++
++        if (symdata.failed)
++          data.failed = 1;
++      }
++    }
++
++  printf ("%s: backtrace_simple noinline\n", data.failed ? "FAIL" : "PASS");
++
++  if (data.failed)
++    ++failures;
++
++  return failures;
++}
++
++/* Test the backtrace_simple function with inlined functions.  */
++
++static inline int test4 (void) __attribute__ ((always_inline, unused));
++static inline int f32 (int) __attribute__ ((always_inline));
++static inline int f33 (int, int) __attribute__ ((always_inline));
++
++static inline int
++test4 (void)
++{
++  return f32 (__LINE__) + 1;
++}
++
++static inline int
++f32 (int f1line)
++{
++  return f33 (f1line, __LINE__) + 2;
++}
++
++static inline int
++f33 (int f1line, int f2line)
++{
++  uintptr_t addrs[20];
++  struct sdata data;
++  int f3line;
++  int i;
++
++  data.addrs = &addrs[0];
++  data.index = 0;
++  data.max = 20;
++  data.failed = 0;
++
++  f3line = __LINE__ + 1;
++  i = backtrace_simple (state, 0, callback_two, error_callback_two, &data);
++
++  if (i != 0)
++    {
++      fprintf (stderr, "test3: unexpected return value %d\n", i);
++      data.failed = 1;
++    }
++
++  if (!data.failed)
++    {
++      struct info all[20];
++      struct bdata bdata;
++
++      bdata.all = &all[0];
++      bdata.index = 0;
++      bdata.max = 20;
++      bdata.failed = 0;
++
++      i = backtrace_pcinfo (state, addrs[0], callback_one, error_callback_one,
++                          &bdata);
++      if (i != 0)
++      {
++        fprintf (stderr,
++                 ("test4: unexpected return value "
++                  "from backtrace_pcinfo %d\n"),
++                 i);
++        bdata.failed = 1;
++      }
++
++      check ("test4", 0, all, f3line, "f33", &bdata.failed);
++      check ("test4", 1, all, f2line, "f32", &bdata.failed);
++      check ("test4", 2, all, f1line, "test4", &bdata.failed);
++
++      if (bdata.failed)
++      data.failed = 1;
++    }
++
++  printf ("%s: backtrace_simple inline\n", data.failed ? "FAIL" : "PASS");
++
++  if (data.failed)
++    ++failures;
++
++  return failures;
++}
++
++#if BACKTRACE_SUPPORTS_DATA
++
++int global = 1;
++
++static int
++test5 (void)
++{
++  struct symdata symdata;
++  int i;
++  uintptr_t addr = (uintptr_t) &global;
++
++  if (sizeof (global) > 1)
++    addr += 1;
++
++  symdata.name = NULL;
++  symdata.val = 0;
++  symdata.size = 0;
++  symdata.failed = 0;
++
++  i = backtrace_syminfo (state, addr, callback_three,
++                       error_callback_three, &symdata);
++  if (i == 0)
++    {
++      fprintf (stderr,
++             "test5: unexpected return value from backtrace_syminfo %d\n",
++             i);
++      symdata.failed = 1;
++    }
++
++  if (!symdata.failed)
++    {
++      if (symdata.name == NULL)
++      {
++        fprintf (stderr, "test5: NULL syminfo name\n");
++        symdata.failed = 1;
++      }
++      else if (strcmp (symdata.name, "global") != 0)
++      {
++        fprintf (stderr,
++                 "test5: unexpected syminfo name got %s expected %s\n",
++                 symdata.name, "global");
++        symdata.failed = 1;
++      }
++      else if (symdata.val != (uintptr_t) &global)
++      {
++        fprintf (stderr,
++                 "test5: unexpected syminfo value got %lx expected %lx\n",
++                 (unsigned long) symdata.val,
++                 (unsigned long) (uintptr_t) &global);
++        symdata.failed = 1;
++      }
++      else if (symdata.size != sizeof (global))
++      {
++        fprintf (stderr,
++                 "test5: unexpected syminfo size got %lx expected %lx\n",
++                 (unsigned long) symdata.size,
++                 (unsigned long) sizeof (global));
++        symdata.failed = 1;
++      }
++    }
++
++  printf ("%s: backtrace_syminfo variable\n",
++        symdata.failed ? "FAIL" : "PASS");
++
++  if (symdata.failed)
++    ++failures;
++
++  return failures;
++}
++
++#endif /* BACKTRACE_SUPPORTS_DATA  */
++
++static void
++error_callback_create (void *data ATTRIBUTE_UNUSED, const char *msg,
++                     int errnum)
++{
++  fprintf (stderr, "%s", msg);
++  if (errnum > 0)
++    fprintf (stderr, ": %s", strerror (errnum));
++  fprintf (stderr, "\n");
++  exit (EXIT_FAILURE);
++}
++
++/* Run all the tests.  */
++
++int
++main (int argc ATTRIBUTE_UNUSED, char **argv)
++{
++  state = backtrace_create_state (argv[0], BACKTRACE_SUPPORTS_THREADS,
++                                error_callback_create, NULL);
++
++#if BACKTRACE_SUPPORTED
++  test1 ();
++  test2 ();
++  test3 ();
++  test4 ();
++#if BACKTRACE_SUPPORTS_DATA
++  test5 ();
++#endif
++#endif
++
++  exit (failures ? EXIT_FAILURE : EXIT_SUCCESS);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2e9ad7fe8189d20ca777d62a38609942e7732c25
new file mode 100755 (executable)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1462 @@@
++#! /bin/sh
++# Attempt to guess a canonical system name.
++#   Copyright 1992-2016 Free Software Foundation, Inc.
++
++timestamp='2016-10-02'
++
++# This file is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++# General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, see <http://www.gnu.org/licenses/>.
++#
++# As a special exception to the GNU General Public License, if you
++# distribute this file as part of a program that contains a
++# configuration script generated by Autoconf, you may include it under
++# the same distribution terms that you use for the rest of that
++# program.  This Exception is an additional permission under section 7
++# of the GNU General Public License, version 3 ("GPLv3").
++#
++# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
++#
++# You can get the latest version of this script from:
++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
++#
++# Please send patches to <config-patches@gnu.org>.
++
++
++me=`echo "$0" | sed -e 's,.*/,,'`
++
++usage="\
++Usage: $0 [OPTION]
++
++Output the configuration name of the system \`$me' is run on.
++
++Operation modes:
++  -h, --help         print this help, then exit
++  -t, --time-stamp   print date of last modification, then exit
++  -v, --version      print version number, then exit
++
++Report bugs and patches to <config-patches@gnu.org>."
++
++version="\
++GNU config.guess ($timestamp)
++
++Originally written by Per Bothner.
++Copyright 1992-2016 Free Software Foundation, Inc.
++
++This is free software; see the source for copying conditions.  There is NO
++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
++
++help="
++Try \`$me --help' for more information."
++
++# Parse command line
++while test $# -gt 0 ; do
++  case $1 in
++    --time-stamp | --time* | -t )
++       echo "$timestamp" ; exit ;;
++    --version | -v )
++       echo "$version" ; exit ;;
++    --help | --h* | -h )
++       echo "$usage"; exit ;;
++    -- )     # Stop option processing
++       shift; break ;;
++    - )       # Use stdin as input.
++       break ;;
++    -* )
++       echo "$me: invalid option $1$help" >&2
++       exit 1 ;;
++    * )
++       break ;;
++  esac
++done
++
++if test $# != 0; then
++  echo "$me: too many arguments$help" >&2
++  exit 1
++fi
++
++trap 'exit 1' 1 2 15
++
++# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
++# compiler to aid in system detection is discouraged as it requires
++# temporary files to be created and, as you can see below, it is a
++# headache to deal with in a portable fashion.
++
++# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
++# use `HOST_CC' if defined, but it is deprecated.
++
++# Portable tmp directory creation inspired by the Autoconf team.
++
++set_cc_for_build='
++trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
++trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
++: ${TMPDIR=/tmp} ;
++ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
++ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
++ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
++ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
++dummy=$tmp/dummy ;
++tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
++case $CC_FOR_BUILD,$HOST_CC,$CC in
++ ,,)    echo "int x;" > $dummy.c ;
++      for c in cc gcc c89 c99 ; do
++        if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
++           CC_FOR_BUILD="$c"; break ;
++        fi ;
++      done ;
++      if test x"$CC_FOR_BUILD" = x ; then
++        CC_FOR_BUILD=no_compiler_found ;
++      fi
++      ;;
++ ,,*)   CC_FOR_BUILD=$CC ;;
++ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
++esac ; set_cc_for_build= ;'
++
++# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
++# (ghazi@noc.rutgers.edu 1994-08-24)
++if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
++      PATH=$PATH:/.attbin ; export PATH
++fi
++
++UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
++UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
++UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
++UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
++
++case "${UNAME_SYSTEM}" in
++Linux|GNU|GNU/*)
++      # If the system lacks a compiler, then just pick glibc.
++      # We could probably try harder.
++      LIBC=gnu
++
++      eval $set_cc_for_build
++      cat <<-EOF > $dummy.c
++      #include <features.h>
++      #if defined(__UCLIBC__)
++      LIBC=uclibc
++      #elif defined(__dietlibc__)
++      LIBC=dietlibc
++      #else
++      LIBC=gnu
++      #endif
++      EOF
++      eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
++      ;;
++esac
++
++# Note: order is significant - the case branches are not exclusive.
++
++case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
++    *:NetBSD:*:*)
++      # NetBSD (nbsd) targets should (where applicable) match one or
++      # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
++      # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
++      # switched to ELF, *-*-netbsd* would select the old
++      # object file format.  This provides both forward
++      # compatibility and a consistent mechanism for selecting the
++      # object file format.
++      #
++      # Note: NetBSD doesn't particularly care about the vendor
++      # portion of the name.  We always set it to "unknown".
++      sysctl="sysctl -n hw.machine_arch"
++      UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
++          /sbin/$sysctl 2>/dev/null || \
++          /usr/sbin/$sysctl 2>/dev/null || \
++          echo unknown)`
++      case "${UNAME_MACHINE_ARCH}" in
++          armeb) machine=armeb-unknown ;;
++          arm*) machine=arm-unknown ;;
++          sh3el) machine=shl-unknown ;;
++          sh3eb) machine=sh-unknown ;;
++          sh5el) machine=sh5le-unknown ;;
++          earmv*)
++              arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
++              endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
++              machine=${arch}${endian}-unknown
++              ;;
++          *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
++      esac
++      # The Operating System including object format, if it has switched
++      # to ELF recently (or will in the future) and ABI.
++      case "${UNAME_MACHINE_ARCH}" in
++          earm*)
++              os=netbsdelf
++              ;;
++          arm*|i386|m68k|ns32k|sh3*|sparc|vax)
++              eval $set_cc_for_build
++              if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
++                      | grep -q __ELF__
++              then
++                  # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
++                  # Return netbsd for either.  FIX?
++                  os=netbsd
++              else
++                  os=netbsdelf
++              fi
++              ;;
++          *)
++              os=netbsd
++              ;;
++      esac
++      # Determine ABI tags.
++      case "${UNAME_MACHINE_ARCH}" in
++          earm*)
++              expr='s/^earmv[0-9]/-eabi/;s/eb$//'
++              abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
++              ;;
++      esac
++      # The OS release
++      # Debian GNU/NetBSD machines have a different userland, and
++      # thus, need a distinct triplet. However, they do not need
++      # kernel version information, so it can be replaced with a
++      # suitable tag, in the style of linux-gnu.
++      case "${UNAME_VERSION}" in
++          Debian*)
++              release='-gnu'
++              ;;
++          *)
++              release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
++              ;;
++      esac
++      # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
++      # contains redundant information, the shorter form:
++      # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
++      echo "${machine}-${os}${release}${abi}"
++      exit ;;
++    *:Bitrig:*:*)
++      UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
++      echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
++      exit ;;
++    *:OpenBSD:*:*)
++      UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
++      echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
++      exit ;;
++    *:LibertyBSD:*:*)
++      UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
++      echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
++      exit ;;
++    *:ekkoBSD:*:*)
++      echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
++      exit ;;
++    *:SolidBSD:*:*)
++      echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
++      exit ;;
++    macppc:MirBSD:*:*)
++      echo powerpc-unknown-mirbsd${UNAME_RELEASE}
++      exit ;;
++    *:MirBSD:*:*)
++      echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
++      exit ;;
++    *:Sortix:*:*)
++      echo ${UNAME_MACHINE}-unknown-sortix
++      exit ;;
++    alpha:OSF1:*:*)
++      case $UNAME_RELEASE in
++      *4.0)
++              UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
++              ;;
++      *5.*)
++              UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
++              ;;
++      esac
++      # According to Compaq, /usr/sbin/psrinfo has been available on
++      # OSF/1 and Tru64 systems produced since 1995.  I hope that
++      # covers most systems running today.  This code pipes the CPU
++      # types through head -n 1, so we only detect the type of CPU 0.
++      ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
++      case "$ALPHA_CPU_TYPE" in
++          "EV4 (21064)")
++              UNAME_MACHINE=alpha ;;
++          "EV4.5 (21064)")
++              UNAME_MACHINE=alpha ;;
++          "LCA4 (21066/21068)")
++              UNAME_MACHINE=alpha ;;
++          "EV5 (21164)")
++              UNAME_MACHINE=alphaev5 ;;
++          "EV5.6 (21164A)")
++              UNAME_MACHINE=alphaev56 ;;
++          "EV5.6 (21164PC)")
++              UNAME_MACHINE=alphapca56 ;;
++          "EV5.7 (21164PC)")
++              UNAME_MACHINE=alphapca57 ;;
++          "EV6 (21264)")
++              UNAME_MACHINE=alphaev6 ;;
++          "EV6.7 (21264A)")
++              UNAME_MACHINE=alphaev67 ;;
++          "EV6.8CB (21264C)")
++              UNAME_MACHINE=alphaev68 ;;
++          "EV6.8AL (21264B)")
++              UNAME_MACHINE=alphaev68 ;;
++          "EV6.8CX (21264D)")
++              UNAME_MACHINE=alphaev68 ;;
++          "EV6.9A (21264/EV69A)")
++              UNAME_MACHINE=alphaev69 ;;
++          "EV7 (21364)")
++              UNAME_MACHINE=alphaev7 ;;
++          "EV7.9 (21364A)")
++              UNAME_MACHINE=alphaev79 ;;
++      esac
++      # A Pn.n version is a patched version.
++      # A Vn.n version is a released version.
++      # A Tn.n version is a released field test version.
++      # A Xn.n version is an unreleased experimental baselevel.
++      # 1.2 uses "1.2" for uname -r.
++      echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
++      # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
++      exitcode=$?
++      trap '' 0
++      exit $exitcode ;;
++    Alpha\ *:Windows_NT*:*)
++      # How do we know it's Interix rather than the generic POSIX subsystem?
++      # Should we change UNAME_MACHINE based on the output of uname instead
++      # of the specific Alpha model?
++      echo alpha-pc-interix
++      exit ;;
++    21064:Windows_NT:50:3)
++      echo alpha-dec-winnt3.5
++      exit ;;
++    Amiga*:UNIX_System_V:4.0:*)
++      echo m68k-unknown-sysv4
++      exit ;;
++    *:[Aa]miga[Oo][Ss]:*:*)
++      echo ${UNAME_MACHINE}-unknown-amigaos
++      exit ;;
++    *:[Mm]orph[Oo][Ss]:*:*)
++      echo ${UNAME_MACHINE}-unknown-morphos
++      exit ;;
++    *:OS/390:*:*)
++      echo i370-ibm-openedition
++      exit ;;
++    *:z/VM:*:*)
++      echo s390-ibm-zvmoe
++      exit ;;
++    *:OS400:*:*)
++      echo powerpc-ibm-os400
++      exit ;;
++    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
++      echo arm-acorn-riscix${UNAME_RELEASE}
++      exit ;;
++    arm*:riscos:*:*|arm*:RISCOS:*:*)
++      echo arm-unknown-riscos
++      exit ;;
++    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
++      echo hppa1.1-hitachi-hiuxmpp
++      exit ;;
++    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
++      # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
++      if test "`(/bin/universe) 2>/dev/null`" = att ; then
++              echo pyramid-pyramid-sysv3
++      else
++              echo pyramid-pyramid-bsd
++      fi
++      exit ;;
++    NILE*:*:*:dcosx)
++      echo pyramid-pyramid-svr4
++      exit ;;
++    DRS?6000:unix:4.0:6*)
++      echo sparc-icl-nx6
++      exit ;;
++    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
++      case `/usr/bin/uname -p` in
++          sparc) echo sparc-icl-nx7; exit ;;
++      esac ;;
++    s390x:SunOS:*:*)
++      echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++      exit ;;
++    sun4H:SunOS:5.*:*)
++      echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++      exit ;;
++    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
++      echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++      exit ;;
++    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
++      echo i386-pc-auroraux${UNAME_RELEASE}
++      exit ;;
++    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
++      eval $set_cc_for_build
++      SUN_ARCH=i386
++      # If there is a compiler, see if it is configured for 64-bit objects.
++      # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
++      # This test works for both compilers.
++      if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
++          if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
++              (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
++              grep IS_64BIT_ARCH >/dev/null
++          then
++              SUN_ARCH=x86_64
++          fi
++      fi
++      echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++      exit ;;
++    sun4*:SunOS:6*:*)
++      # According to config.sub, this is the proper way to canonicalize
++      # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
++      # it's likely to be more like Solaris than SunOS4.
++      echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++      exit ;;
++    sun4*:SunOS:*:*)
++      case "`/usr/bin/arch -k`" in
++          Series*|S4*)
++              UNAME_RELEASE=`uname -v`
++              ;;
++      esac
++      # Japanese Language versions have a version number like `4.1.3-JL'.
++      echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
++      exit ;;
++    sun3*:SunOS:*:*)
++      echo m68k-sun-sunos${UNAME_RELEASE}
++      exit ;;
++    sun*:*:4.2BSD:*)
++      UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
++      test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
++      case "`/bin/arch`" in
++          sun3)
++              echo m68k-sun-sunos${UNAME_RELEASE}
++              ;;
++          sun4)
++              echo sparc-sun-sunos${UNAME_RELEASE}
++              ;;
++      esac
++      exit ;;
++    aushp:SunOS:*:*)
++      echo sparc-auspex-sunos${UNAME_RELEASE}
++      exit ;;
++    # The situation for MiNT is a little confusing.  The machine name
++    # can be virtually everything (everything which is not
++    # "atarist" or "atariste" at least should have a processor
++    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
++    # to the lowercase version "mint" (or "freemint").  Finally
++    # the system name "TOS" denotes a system which is actually not
++    # MiNT.  But MiNT is downward compatible to TOS, so this should
++    # be no problem.
++    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
++      echo m68k-atari-mint${UNAME_RELEASE}
++      exit ;;
++    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
++      echo m68k-atari-mint${UNAME_RELEASE}
++      exit ;;
++    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
++      echo m68k-atari-mint${UNAME_RELEASE}
++      exit ;;
++    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
++      echo m68k-milan-mint${UNAME_RELEASE}
++      exit ;;
++    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
++      echo m68k-hades-mint${UNAME_RELEASE}
++      exit ;;
++    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
++      echo m68k-unknown-mint${UNAME_RELEASE}
++      exit ;;
++    m68k:machten:*:*)
++      echo m68k-apple-machten${UNAME_RELEASE}
++      exit ;;
++    powerpc:machten:*:*)
++      echo powerpc-apple-machten${UNAME_RELEASE}
++      exit ;;
++    RISC*:Mach:*:*)
++      echo mips-dec-mach_bsd4.3
++      exit ;;
++    RISC*:ULTRIX:*:*)
++      echo mips-dec-ultrix${UNAME_RELEASE}
++      exit ;;
++    VAX*:ULTRIX*:*:*)
++      echo vax-dec-ultrix${UNAME_RELEASE}
++      exit ;;
++    2020:CLIX:*:* | 2430:CLIX:*:*)
++      echo clipper-intergraph-clix${UNAME_RELEASE}
++      exit ;;
++    mips:*:*:UMIPS | mips:*:*:RISCos)
++      eval $set_cc_for_build
++      sed 's/^        //' << EOF >$dummy.c
++#ifdef __cplusplus
++#include <stdio.h>  /* for printf() prototype */
++      int main (int argc, char *argv[]) {
++#else
++      int main (argc, argv) int argc; char *argv[]; {
++#endif
++      #if defined (host_mips) && defined (MIPSEB)
++      #if defined (SYSTYPE_SYSV)
++        printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
++      #endif
++      #if defined (SYSTYPE_SVR4)
++        printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
++      #endif
++      #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
++        printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
++      #endif
++      #endif
++        exit (-1);
++      }
++EOF
++      $CC_FOR_BUILD -o $dummy $dummy.c &&
++        dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
++        SYSTEM_NAME=`$dummy $dummyarg` &&
++          { echo "$SYSTEM_NAME"; exit; }
++      echo mips-mips-riscos${UNAME_RELEASE}
++      exit ;;
++    Motorola:PowerMAX_OS:*:*)
++      echo powerpc-motorola-powermax
++      exit ;;
++    Motorola:*:4.3:PL8-*)
++      echo powerpc-harris-powermax
++      exit ;;
++    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
++      echo powerpc-harris-powermax
++      exit ;;
++    Night_Hawk:Power_UNIX:*:*)
++      echo powerpc-harris-powerunix
++      exit ;;
++    m88k:CX/UX:7*:*)
++      echo m88k-harris-cxux7
++      exit ;;
++    m88k:*:4*:R4*)
++      echo m88k-motorola-sysv4
++      exit ;;
++    m88k:*:3*:R3*)
++      echo m88k-motorola-sysv3
++      exit ;;
++    AViiON:dgux:*:*)
++      # DG/UX returns AViiON for all architectures
++      UNAME_PROCESSOR=`/usr/bin/uname -p`
++      if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
++      then
++          if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
++             [ ${TARGET_BINARY_INTERFACE}x = x ]
++          then
++              echo m88k-dg-dgux${UNAME_RELEASE}
++          else
++              echo m88k-dg-dguxbcs${UNAME_RELEASE}
++          fi
++      else
++          echo i586-dg-dgux${UNAME_RELEASE}
++      fi
++      exit ;;
++    M88*:DolphinOS:*:*)       # DolphinOS (SVR3)
++      echo m88k-dolphin-sysv3
++      exit ;;
++    M88*:*:R3*:*)
++      # Delta 88k system running SVR3
++      echo m88k-motorola-sysv3
++      exit ;;
++    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
++      echo m88k-tektronix-sysv3
++      exit ;;
++    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
++      echo m68k-tektronix-bsd
++      exit ;;
++    *:IRIX*:*:*)
++      echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
++      exit ;;
++    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
++      echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
++      exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
++    i*86:AIX:*:*)
++      echo i386-ibm-aix
++      exit ;;
++    ia64:AIX:*:*)
++      if [ -x /usr/bin/oslevel ] ; then
++              IBM_REV=`/usr/bin/oslevel`
++      else
++              IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
++      fi
++      echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
++      exit ;;
++    *:AIX:2:3)
++      if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
++              eval $set_cc_for_build
++              sed 's/^                //' << EOF >$dummy.c
++              #include <sys/systemcfg.h>
++
++              main()
++                      {
++                      if (!__power_pc())
++                              exit(1);
++                      puts("powerpc-ibm-aix3.2.5");
++                      exit(0);
++                      }
++EOF
++              if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
++              then
++                      echo "$SYSTEM_NAME"
++              else
++                      echo rs6000-ibm-aix3.2.5
++              fi
++      elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
++              echo rs6000-ibm-aix3.2.4
++      else
++              echo rs6000-ibm-aix3.2
++      fi
++      exit ;;
++    *:AIX:*:[4567])
++      IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
++      if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
++              IBM_ARCH=rs6000
++      else
++              IBM_ARCH=powerpc
++      fi
++      if [ -x /usr/bin/lslpp ] ; then
++              IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
++                         awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
++      else
++              IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
++      fi
++      echo ${IBM_ARCH}-ibm-aix${IBM_REV}
++      exit ;;
++    *:AIX:*:*)
++      echo rs6000-ibm-aix
++      exit ;;
++    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
++      echo romp-ibm-bsd4.4
++      exit ;;
++    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
++      echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
++      exit ;;                             # report: romp-ibm BSD 4.3
++    *:BOSX:*:*)
++      echo rs6000-bull-bosx
++      exit ;;
++    DPX/2?00:B.O.S.:*:*)
++      echo m68k-bull-sysv3
++      exit ;;
++    9000/[34]??:4.3bsd:1.*:*)
++      echo m68k-hp-bsd
++      exit ;;
++    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
++      echo m68k-hp-bsd4.4
++      exit ;;
++    9000/[34678]??:HP-UX:*:*)
++      HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
++      case "${UNAME_MACHINE}" in
++          9000/31? )            HP_ARCH=m68000 ;;
++          9000/[34]?? )         HP_ARCH=m68k ;;
++          9000/[678][0-9][0-9])
++              if [ -x /usr/bin/getconf ]; then
++                  sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
++                  sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
++                  case "${sc_cpu_version}" in
++                    523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
++                    528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
++                    532)                      # CPU_PA_RISC2_0
++                      case "${sc_kernel_bits}" in
++                        32) HP_ARCH=hppa2.0n ;;
++                        64) HP_ARCH=hppa2.0w ;;
++                        '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
++                      esac ;;
++                  esac
++              fi
++              if [ "${HP_ARCH}" = "" ]; then
++                  eval $set_cc_for_build
++                  sed 's/^            //' << EOF >$dummy.c
++
++              #define _HPUX_SOURCE
++              #include <stdlib.h>
++              #include <unistd.h>
++
++              int main ()
++              {
++              #if defined(_SC_KERNEL_BITS)
++                  long bits = sysconf(_SC_KERNEL_BITS);
++              #endif
++                  long cpu  = sysconf (_SC_CPU_VERSION);
++
++                  switch (cpu)
++                      {
++                      case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
++                      case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
++                      case CPU_PA_RISC2_0:
++              #if defined(_SC_KERNEL_BITS)
++                          switch (bits)
++                              {
++                              case 64: puts ("hppa2.0w"); break;
++                              case 32: puts ("hppa2.0n"); break;
++                              default: puts ("hppa2.0"); break;
++                              } break;
++              #else  /* !defined(_SC_KERNEL_BITS) */
++                          puts ("hppa2.0"); break;
++              #endif
++                      default: puts ("hppa1.0"); break;
++                      }
++                  exit (0);
++              }
++EOF
++                  (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
++                  test -z "$HP_ARCH" && HP_ARCH=hppa
++              fi ;;
++      esac
++      if [ ${HP_ARCH} = hppa2.0w ]
++      then
++          eval $set_cc_for_build
++
++          # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
++          # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
++          # generating 64-bit code.  GNU and HP use different nomenclature:
++          #
++          # $ CC_FOR_BUILD=cc ./config.guess
++          # => hppa2.0w-hp-hpux11.23
++          # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
++          # => hppa64-hp-hpux11.23
++
++          if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
++              grep -q __LP64__
++          then
++              HP_ARCH=hppa2.0w
++          else
++              HP_ARCH=hppa64
++          fi
++      fi
++      echo ${HP_ARCH}-hp-hpux${HPUX_REV}
++      exit ;;
++    ia64:HP-UX:*:*)
++      HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
++      echo ia64-hp-hpux${HPUX_REV}
++      exit ;;
++    3050*:HI-UX:*:*)
++      eval $set_cc_for_build
++      sed 's/^        //' << EOF >$dummy.c
++      #include <unistd.h>
++      int
++      main ()
++      {
++        long cpu = sysconf (_SC_CPU_VERSION);
++        /* The order matters, because CPU_IS_HP_MC68K erroneously returns
++           true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
++           results, however.  */
++        if (CPU_IS_PA_RISC (cpu))
++          {
++            switch (cpu)
++              {
++                case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
++                case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
++                case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
++                default: puts ("hppa-hitachi-hiuxwe2"); break;
++              }
++          }
++        else if (CPU_IS_HP_MC68K (cpu))
++          puts ("m68k-hitachi-hiuxwe2");
++        else puts ("unknown-hitachi-hiuxwe2");
++        exit (0);
++      }
++EOF
++      $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
++              { echo "$SYSTEM_NAME"; exit; }
++      echo unknown-hitachi-hiuxwe2
++      exit ;;
++    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
++      echo hppa1.1-hp-bsd
++      exit ;;
++    9000/8??:4.3bsd:*:*)
++      echo hppa1.0-hp-bsd
++      exit ;;
++    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
++      echo hppa1.0-hp-mpeix
++      exit ;;
++    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
++      echo hppa1.1-hp-osf
++      exit ;;
++    hp8??:OSF1:*:*)
++      echo hppa1.0-hp-osf
++      exit ;;
++    i*86:OSF1:*:*)
++      if [ -x /usr/sbin/sysversion ] ; then
++          echo ${UNAME_MACHINE}-unknown-osf1mk
++      else
++          echo ${UNAME_MACHINE}-unknown-osf1
++      fi
++      exit ;;
++    parisc*:Lites*:*:*)
++      echo hppa1.1-hp-lites
++      exit ;;
++    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
++      echo c1-convex-bsd
++      exit ;;
++    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
++      if getsysinfo -f scalar_acc
++      then echo c32-convex-bsd
++      else echo c2-convex-bsd
++      fi
++      exit ;;
++    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
++      echo c34-convex-bsd
++      exit ;;
++    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
++      echo c38-convex-bsd
++      exit ;;
++    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
++      echo c4-convex-bsd
++      exit ;;
++    CRAY*Y-MP:*:*:*)
++      echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++      exit ;;
++    CRAY*[A-Z]90:*:*:*)
++      echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
++      | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
++            -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
++            -e 's/\.[^.]*$/.X/'
++      exit ;;
++    CRAY*TS:*:*:*)
++      echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++      exit ;;
++    CRAY*T3E:*:*:*)
++      echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++      exit ;;
++    CRAY*SV1:*:*:*)
++      echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++      exit ;;
++    *:UNICOS/mp:*:*)
++      echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++      exit ;;
++    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
++      FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
++      FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
++      FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
++      echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++      exit ;;
++    5000:UNIX_System_V:4.*:*)
++      FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
++      FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
++      echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++      exit ;;
++    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
++      echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
++      exit ;;
++    sparc*:BSD/OS:*:*)
++      echo sparc-unknown-bsdi${UNAME_RELEASE}
++      exit ;;
++    *:BSD/OS:*:*)
++      echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
++      exit ;;
++    *:FreeBSD:*:*)
++      UNAME_PROCESSOR=`/usr/bin/uname -p`
++      case ${UNAME_PROCESSOR} in
++          amd64)
++              echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++          *)
++              echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++      esac
++      exit ;;
++    i*:CYGWIN*:*)
++      echo ${UNAME_MACHINE}-pc-cygwin
++      exit ;;
++    *:MINGW64*:*)
++      echo ${UNAME_MACHINE}-pc-mingw64
++      exit ;;
++    *:MINGW*:*)
++      echo ${UNAME_MACHINE}-pc-mingw32
++      exit ;;
++    *:MSYS*:*)
++      echo ${UNAME_MACHINE}-pc-msys
++      exit ;;
++    i*:windows32*:*)
++      # uname -m includes "-pc" on this system.
++      echo ${UNAME_MACHINE}-mingw32
++      exit ;;
++    i*:PW*:*)
++      echo ${UNAME_MACHINE}-pc-pw32
++      exit ;;
++    *:Interix*:*)
++      case ${UNAME_MACHINE} in
++          x86)
++              echo i586-pc-interix${UNAME_RELEASE}
++              exit ;;
++          authenticamd | genuineintel | EM64T)
++              echo x86_64-unknown-interix${UNAME_RELEASE}
++              exit ;;
++          IA64)
++              echo ia64-unknown-interix${UNAME_RELEASE}
++              exit ;;
++      esac ;;
++    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
++      echo i${UNAME_MACHINE}-pc-mks
++      exit ;;
++    8664:Windows_NT:*)
++      echo x86_64-pc-mks
++      exit ;;
++    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
++      # How do we know it's Interix rather than the generic POSIX subsystem?
++      # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
++      # UNAME_MACHINE based on the output of uname instead of i386?
++      echo i586-pc-interix
++      exit ;;
++    i*:UWIN*:*)
++      echo ${UNAME_MACHINE}-pc-uwin
++      exit ;;
++    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
++      echo x86_64-unknown-cygwin
++      exit ;;
++    p*:CYGWIN*:*)
++      echo powerpcle-unknown-cygwin
++      exit ;;
++    prep*:SunOS:5.*:*)
++      echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++      exit ;;
++    *:GNU:*:*)
++      # the GNU system
++      echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
++      exit ;;
++    *:GNU/*:*:*)
++      # other systems with GNU libc and userland
++      echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
++      exit ;;
++    i*86:Minix:*:*)
++      echo ${UNAME_MACHINE}-pc-minix
++      exit ;;
++    aarch64:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    aarch64_be:Linux:*:*)
++      UNAME_MACHINE=aarch64_be
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    alpha:Linux:*:*)
++      case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
++        EV5)   UNAME_MACHINE=alphaev5 ;;
++        EV56)  UNAME_MACHINE=alphaev56 ;;
++        PCA56) UNAME_MACHINE=alphapca56 ;;
++        PCA57) UNAME_MACHINE=alphapca56 ;;
++        EV6)   UNAME_MACHINE=alphaev6 ;;
++        EV67)  UNAME_MACHINE=alphaev67 ;;
++        EV68*) UNAME_MACHINE=alphaev68 ;;
++      esac
++      objdump --private-headers /bin/sh | grep -q ld.so.1
++      if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    arc:Linux:*:* | arceb:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    arm*:Linux:*:*)
++      eval $set_cc_for_build
++      if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
++          | grep -q __ARM_EABI__
++      then
++          echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      else
++          if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
++              | grep -q __ARM_PCS_VFP
++          then
++              echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
++          else
++              echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
++          fi
++      fi
++      exit ;;
++    avr32*:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    cris:Linux:*:*)
++      echo ${UNAME_MACHINE}-axis-linux-${LIBC}
++      exit ;;
++    crisv32:Linux:*:*)
++      echo ${UNAME_MACHINE}-axis-linux-${LIBC}
++      exit ;;
++    e2k:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    frv:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    hexagon:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    i*86:Linux:*:*)
++      echo ${UNAME_MACHINE}-pc-linux-${LIBC}
++      exit ;;
++    ia64:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    k1om:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    m32r*:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    m68*:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    mips:Linux:*:* | mips64:Linux:*:*)
++      eval $set_cc_for_build
++      sed 's/^        //' << EOF >$dummy.c
++      #undef CPU
++      #undef ${UNAME_MACHINE}
++      #undef ${UNAME_MACHINE}el
++      #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
++      CPU=${UNAME_MACHINE}el
++      #else
++      #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
++      CPU=${UNAME_MACHINE}
++      #else
++      CPU=
++      #endif
++      #endif
++EOF
++      eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
++      test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
++      ;;
++    mips64el:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    openrisc*:Linux:*:*)
++      echo or1k-unknown-linux-${LIBC}
++      exit ;;
++    or32:Linux:*:* | or1k*:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    padre:Linux:*:*)
++      echo sparc-unknown-linux-${LIBC}
++      exit ;;
++    parisc64:Linux:*:* | hppa64:Linux:*:*)
++      echo hppa64-unknown-linux-${LIBC}
++      exit ;;
++    parisc:Linux:*:* | hppa:Linux:*:*)
++      # Look for CPU level
++      case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
++        PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
++        PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
++        *)    echo hppa-unknown-linux-${LIBC} ;;
++      esac
++      exit ;;
++    ppc64:Linux:*:*)
++      echo powerpc64-unknown-linux-${LIBC}
++      exit ;;
++    ppc:Linux:*:*)
++      echo powerpc-unknown-linux-${LIBC}
++      exit ;;
++    ppc64le:Linux:*:*)
++      echo powerpc64le-unknown-linux-${LIBC}
++      exit ;;
++    ppcle:Linux:*:*)
++      echo powerpcle-unknown-linux-${LIBC}
++      exit ;;
++    riscv32:Linux:*:* | riscv64:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    s390:Linux:*:* | s390x:Linux:*:*)
++      echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
++      exit ;;
++    sh64*:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    sh*:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    sparc:Linux:*:* | sparc64:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    tile*:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    vax:Linux:*:*)
++      echo ${UNAME_MACHINE}-dec-linux-${LIBC}
++      exit ;;
++    x86_64:Linux:*:*)
++      echo ${UNAME_MACHINE}-pc-linux-${LIBC}
++      exit ;;
++    xtensa*:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++      exit ;;
++    i*86:DYNIX/ptx:4*:*)
++      # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
++      # earlier versions are messed up and put the nodename in both
++      # sysname and nodename.
++      echo i386-sequent-sysv4
++      exit ;;
++    i*86:UNIX_SV:4.2MP:2.*)
++      # Unixware is an offshoot of SVR4, but it has its own version
++      # number series starting with 2...
++      # I am not positive that other SVR4 systems won't match this,
++      # I just have to hope.  -- rms.
++      # Use sysv4.2uw... so that sysv4* matches it.
++      echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
++      exit ;;
++    i*86:OS/2:*:*)
++      # If we were able to find `uname', then EMX Unix compatibility
++      # is probably installed.
++      echo ${UNAME_MACHINE}-pc-os2-emx
++      exit ;;
++    i*86:XTS-300:*:STOP)
++      echo ${UNAME_MACHINE}-unknown-stop
++      exit ;;
++    i*86:atheos:*:*)
++      echo ${UNAME_MACHINE}-unknown-atheos
++      exit ;;
++    i*86:syllable:*:*)
++      echo ${UNAME_MACHINE}-pc-syllable
++      exit ;;
++    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
++      echo i386-unknown-lynxos${UNAME_RELEASE}
++      exit ;;
++    i*86:*DOS:*:*)
++      echo ${UNAME_MACHINE}-pc-msdosdjgpp
++      exit ;;
++    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
++      UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
++      if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
++              echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
++      else
++              echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
++      fi
++      exit ;;
++    i*86:*:5:[678]*)
++      # UnixWare 7.x, OpenUNIX and OpenServer 6.
++      case `/bin/uname -X | grep "^Machine"` in
++          *486*)           UNAME_MACHINE=i486 ;;
++          *Pentium)        UNAME_MACHINE=i586 ;;
++          *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
++      esac
++      echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
++      exit ;;
++    i*86:*:3.2:*)
++      if test -f /usr/options/cb.name; then
++              UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
++              echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
++      elif /bin/uname -X 2>/dev/null >/dev/null ; then
++              UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
++              (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
++              (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
++                      && UNAME_MACHINE=i586
++              (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
++                      && UNAME_MACHINE=i686
++              (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
++                      && UNAME_MACHINE=i686
++              echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
++      else
++              echo ${UNAME_MACHINE}-pc-sysv32
++      fi
++      exit ;;
++    pc:*:*:*)
++      # Left here for compatibility:
++      # uname -m prints for DJGPP always 'pc', but it prints nothing about
++      # the processor, so we play safe by assuming i586.
++      # Note: whatever this is, it MUST be the same as what config.sub
++      # prints for the "djgpp" host, or else GDB configure will decide that
++      # this is a cross-build.
++      echo i586-pc-msdosdjgpp
++      exit ;;
++    Intel:Mach:3*:*)
++      echo i386-pc-mach3
++      exit ;;
++    paragon:*:*:*)
++      echo i860-intel-osf1
++      exit ;;
++    i860:*:4.*:*) # i860-SVR4
++      if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
++        echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
++      else # Add other i860-SVR4 vendors below as they are discovered.
++        echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
++      fi
++      exit ;;
++    mini*:CTIX:SYS*5:*)
++      # "miniframe"
++      echo m68010-convergent-sysv
++      exit ;;
++    mc68k:UNIX:SYSTEM5:3.51m)
++      echo m68k-convergent-sysv
++      exit ;;
++    M680?0:D-NIX:5.3:*)
++      echo m68k-diab-dnix
++      exit ;;
++    M68*:*:R3V[5678]*:*)
++      test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
++    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
++      OS_REL=''
++      test -r /etc/.relid \
++      && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
++      /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
++        && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
++      /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
++        && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
++    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
++      /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
++        && { echo i486-ncr-sysv4; exit; } ;;
++    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
++      OS_REL='.3'
++      test -r /etc/.relid \
++          && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
++      /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
++          && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
++      /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
++          && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
++      /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
++          && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
++    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
++      echo m68k-unknown-lynxos${UNAME_RELEASE}
++      exit ;;
++    mc68030:UNIX_System_V:4.*:*)
++      echo m68k-atari-sysv4
++      exit ;;
++    TSUNAMI:LynxOS:2.*:*)
++      echo sparc-unknown-lynxos${UNAME_RELEASE}
++      exit ;;
++    rs6000:LynxOS:2.*:*)
++      echo rs6000-unknown-lynxos${UNAME_RELEASE}
++      exit ;;
++    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
++      echo powerpc-unknown-lynxos${UNAME_RELEASE}
++      exit ;;
++    SM[BE]S:UNIX_SV:*:*)
++      echo mips-dde-sysv${UNAME_RELEASE}
++      exit ;;
++    RM*:ReliantUNIX-*:*:*)
++      echo mips-sni-sysv4
++      exit ;;
++    RM*:SINIX-*:*:*)
++      echo mips-sni-sysv4
++      exit ;;
++    *:SINIX-*:*:*)
++      if uname -p 2>/dev/null >/dev/null ; then
++              UNAME_MACHINE=`(uname -p) 2>/dev/null`
++              echo ${UNAME_MACHINE}-sni-sysv4
++      else
++              echo ns32k-sni-sysv
++      fi
++      exit ;;
++    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
++                      # says <Richard.M.Bartel@ccMail.Census.GOV>
++      echo i586-unisys-sysv4
++      exit ;;
++    *:UNIX_System_V:4*:FTX*)
++      # From Gerald Hewes <hewes@openmarket.com>.
++      # How about differentiating between stratus architectures? -djm
++      echo hppa1.1-stratus-sysv4
++      exit ;;
++    *:*:*:FTX*)
++      # From seanf@swdc.stratus.com.
++      echo i860-stratus-sysv4
++      exit ;;
++    i*86:VOS:*:*)
++      # From Paul.Green@stratus.com.
++      echo ${UNAME_MACHINE}-stratus-vos
++      exit ;;
++    *:VOS:*:*)
++      # From Paul.Green@stratus.com.
++      echo hppa1.1-stratus-vos
++      exit ;;
++    mc68*:A/UX:*:*)
++      echo m68k-apple-aux${UNAME_RELEASE}
++      exit ;;
++    news*:NEWS-OS:6*:*)
++      echo mips-sony-newsos6
++      exit ;;
++    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
++      if [ -d /usr/nec ]; then
++              echo mips-nec-sysv${UNAME_RELEASE}
++      else
++              echo mips-unknown-sysv${UNAME_RELEASE}
++      fi
++      exit ;;
++    BeBox:BeOS:*:*)   # BeOS running on hardware made by Be, PPC only.
++      echo powerpc-be-beos
++      exit ;;
++    BeMac:BeOS:*:*)   # BeOS running on Mac or Mac clone, PPC only.
++      echo powerpc-apple-beos
++      exit ;;
++    BePC:BeOS:*:*)    # BeOS running on Intel PC compatible.
++      echo i586-pc-beos
++      exit ;;
++    BePC:Haiku:*:*)   # Haiku running on Intel PC compatible.
++      echo i586-pc-haiku
++      exit ;;
++    x86_64:Haiku:*:*)
++      echo x86_64-unknown-haiku
++      exit ;;
++    SX-4:SUPER-UX:*:*)
++      echo sx4-nec-superux${UNAME_RELEASE}
++      exit ;;
++    SX-5:SUPER-UX:*:*)
++      echo sx5-nec-superux${UNAME_RELEASE}
++      exit ;;
++    SX-6:SUPER-UX:*:*)
++      echo sx6-nec-superux${UNAME_RELEASE}
++      exit ;;
++    SX-7:SUPER-UX:*:*)
++      echo sx7-nec-superux${UNAME_RELEASE}
++      exit ;;
++    SX-8:SUPER-UX:*:*)
++      echo sx8-nec-superux${UNAME_RELEASE}
++      exit ;;
++    SX-8R:SUPER-UX:*:*)
++      echo sx8r-nec-superux${UNAME_RELEASE}
++      exit ;;
++    SX-ACE:SUPER-UX:*:*)
++      echo sxace-nec-superux${UNAME_RELEASE}
++      exit ;;
++    Power*:Rhapsody:*:*)
++      echo powerpc-apple-rhapsody${UNAME_RELEASE}
++      exit ;;
++    *:Rhapsody:*:*)
++      echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
++      exit ;;
++    *:Darwin:*:*)
++      UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
++      eval $set_cc_for_build
++      if test "$UNAME_PROCESSOR" = unknown ; then
++          UNAME_PROCESSOR=powerpc
++      fi
++      if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
++          if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
++              if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
++                  (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
++                  grep IS_64BIT_ARCH >/dev/null
++              then
++                  case $UNAME_PROCESSOR in
++                      i386) UNAME_PROCESSOR=x86_64 ;;
++                      powerpc) UNAME_PROCESSOR=powerpc64 ;;
++                  esac
++              fi
++          fi
++      elif test "$UNAME_PROCESSOR" = i386 ; then
++          # Avoid executing cc on OS X 10.9, as it ships with a stub
++          # that puts up a graphical alert prompting to install
++          # developer tools.  Any system running Mac OS X 10.7 or
++          # later (Darwin 11 and later) is required to have a 64-bit
++          # processor. This is not true of the ARM version of Darwin
++          # that Apple uses in portable devices.
++          UNAME_PROCESSOR=x86_64
++      fi
++      echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
++      exit ;;
++    *:procnto*:*:* | *:QNX:[0123456789]*:*)
++      UNAME_PROCESSOR=`uname -p`
++      if test "$UNAME_PROCESSOR" = x86; then
++              UNAME_PROCESSOR=i386
++              UNAME_MACHINE=pc
++      fi
++      echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
++      exit ;;
++    *:QNX:*:4*)
++      echo i386-pc-qnx
++      exit ;;
++    NEO-?:NONSTOP_KERNEL:*:*)
++      echo neo-tandem-nsk${UNAME_RELEASE}
++      exit ;;
++    NSE-*:NONSTOP_KERNEL:*:*)
++      echo nse-tandem-nsk${UNAME_RELEASE}
++      exit ;;
++    NSR-?:NONSTOP_KERNEL:*:*)
++      echo nsr-tandem-nsk${UNAME_RELEASE}
++      exit ;;
++    *:NonStop-UX:*:*)
++      echo mips-compaq-nonstopux
++      exit ;;
++    BS2000:POSIX*:*:*)
++      echo bs2000-siemens-sysv
++      exit ;;
++    DS/*:UNIX_System_V:*:*)
++      echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
++      exit ;;
++    *:Plan9:*:*)
++      # "uname -m" is not consistent, so use $cputype instead. 386
++      # is converted to i386 for consistency with other x86
++      # operating systems.
++      if test "$cputype" = 386; then
++          UNAME_MACHINE=i386
++      else
++          UNAME_MACHINE="$cputype"
++      fi
++      echo ${UNAME_MACHINE}-unknown-plan9
++      exit ;;
++    *:TOPS-10:*:*)
++      echo pdp10-unknown-tops10
++      exit ;;
++    *:TENEX:*:*)
++      echo pdp10-unknown-tenex
++      exit ;;
++    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
++      echo pdp10-dec-tops20
++      exit ;;
++    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
++      echo pdp10-xkl-tops20
++      exit ;;
++    *:TOPS-20:*:*)
++      echo pdp10-unknown-tops20
++      exit ;;
++    *:ITS:*:*)
++      echo pdp10-unknown-its
++      exit ;;
++    SEI:*:*:SEIUX)
++      echo mips-sei-seiux${UNAME_RELEASE}
++      exit ;;
++    *:DragonFly:*:*)
++      echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
++      exit ;;
++    *:*VMS:*:*)
++      UNAME_MACHINE=`(uname -p) 2>/dev/null`
++      case "${UNAME_MACHINE}" in
++          A*) echo alpha-dec-vms ; exit ;;
++          I*) echo ia64-dec-vms ; exit ;;
++          V*) echo vax-dec-vms ; exit ;;
++      esac ;;
++    *:XENIX:*:SysV)
++      echo i386-pc-xenix
++      exit ;;
++    i*86:skyos:*:*)
++      echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
++      exit ;;
++    i*86:rdos:*:*)
++      echo ${UNAME_MACHINE}-pc-rdos
++      exit ;;
++    i*86:AROS:*:*)
++      echo ${UNAME_MACHINE}-pc-aros
++      exit ;;
++    x86_64:VMkernel:*:*)
++      echo ${UNAME_MACHINE}-unknown-esx
++      exit ;;
++    amd64:Isilon\ OneFS:*:*)
++      echo x86_64-unknown-onefs
++      exit ;;
++esac
++
++cat >&2 <<EOF
++$0: unable to guess system type
++
++This script (version $timestamp), has failed to recognize the
++operating system you are using. If your script is old, overwrite
++config.guess and config.sub with the latest versions from:
++
++  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
++and
++  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
++
++If $0 has already been updated, send the following data and any
++information you think might be pertinent to config-patches@gnu.org to
++provide the necessary information to handle your system.
++
++config.guess timestamp = $timestamp
++
++uname -m = `(uname -m) 2>/dev/null || echo unknown`
++uname -r = `(uname -r) 2>/dev/null || echo unknown`
++uname -s = `(uname -s) 2>/dev/null || echo unknown`
++uname -v = `(uname -v) 2>/dev/null || echo unknown`
++
++/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
++/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
++
++hostinfo               = `(hostinfo) 2>/dev/null`
++/bin/universe          = `(/bin/universe) 2>/dev/null`
++/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
++/bin/arch              = `(/bin/arch) 2>/dev/null`
++/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
++/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
++
++UNAME_MACHINE = ${UNAME_MACHINE}
++UNAME_RELEASE = ${UNAME_RELEASE}
++UNAME_SYSTEM  = ${UNAME_SYSTEM}
++UNAME_VERSION = ${UNAME_VERSION}
++EOF
++
++exit 1
++
++# Local variables:
++# eval: (add-hook 'write-file-hooks 'time-stamp)
++# time-stamp-start: "timestamp='"
++# time-stamp-format: "%:y-%02m-%02d"
++# time-stamp-end: "'"
++# End:
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..87cb805984d4f06782ed96a509fe18a290377f33
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,134 @@@
++/* config.h.in.  Generated from configure.ac by autoheader.  */
++
++/* ELF size: 32 or 64 */
++#undef BACKTRACE_ELF_SIZE
++
++/* Define to 1 if you have the __atomic functions */
++#undef HAVE_ATOMIC_FUNCTIONS
++
++/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
++   don't. */
++#undef HAVE_DECL_STRNLEN
++
++/* Define to 1 if you have the <dlfcn.h> header file. */
++#undef HAVE_DLFCN_H
++
++/* Define if dl_iterate_phdr is available. */
++#undef HAVE_DL_ITERATE_PHDR
++
++/* Define to 1 if you have the fcntl function */
++#undef HAVE_FCNTL
++
++/* Define if getexecname is available. */
++#undef HAVE_GETEXECNAME
++
++/* Define if _Unwind_GetIPInfo is available. */
++#undef HAVE_GETIPINFO
++
++/* Define to 1 if you have the <inttypes.h> header file. */
++#undef HAVE_INTTYPES_H
++
++/* Define to 1 if you have the <link.h> header file. */
++#undef HAVE_LINK_H
++
++/* Define to 1 if you have the <memory.h> header file. */
++#undef HAVE_MEMORY_H
++
++/* Define to 1 if you have the <stdint.h> header file. */
++#undef HAVE_STDINT_H
++
++/* Define to 1 if you have the <stdlib.h> header file. */
++#undef HAVE_STDLIB_H
++
++/* Define to 1 if you have the <strings.h> header file. */
++#undef HAVE_STRINGS_H
++
++/* Define to 1 if you have the <string.h> header file. */
++#undef HAVE_STRING_H
++
++/* Define to 1 if you have the __sync functions */
++#undef HAVE_SYNC_FUNCTIONS
++
++/* Define to 1 if you have the <sys/mman.h> header file. */
++#undef HAVE_SYS_MMAN_H
++
++/* Define to 1 if you have the <sys/stat.h> header file. */
++#undef HAVE_SYS_STAT_H
++
++/* Define to 1 if you have the <sys/types.h> header file. */
++#undef HAVE_SYS_TYPES_H
++
++/* Define to 1 if you have the <unistd.h> header file. */
++#undef HAVE_UNISTD_H
++
++/* Define to the sub-directory in which libtool stores uninstalled libraries.
++   */
++#undef LT_OBJDIR
++
++/* Define to the address where bug reports for this package should be sent. */
++#undef PACKAGE_BUGREPORT
++
++/* Define to the full name of this package. */
++#undef PACKAGE_NAME
++
++/* Define to the full name and version of this package. */
++#undef PACKAGE_STRING
++
++/* Define to the one symbol short name of this package. */
++#undef PACKAGE_TARNAME
++
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
++/* Define to the version of this package. */
++#undef PACKAGE_VERSION
++
++/* The size of `char', as computed by sizeof. */
++#undef SIZEOF_CHAR
++
++/* The size of `int', as computed by sizeof. */
++#undef SIZEOF_INT
++
++/* The size of `long', as computed by sizeof. */
++#undef SIZEOF_LONG
++
++/* The size of `short', as computed by sizeof. */
++#undef SIZEOF_SHORT
++
++/* The size of `void *', as computed by sizeof. */
++#undef SIZEOF_VOID_P
++
++/* Define to 1 if you have the ANSI C header files. */
++#undef STDC_HEADERS
++
++/* Enable extensions on AIX 3, Interix.  */
++#ifndef _ALL_SOURCE
++# undef _ALL_SOURCE
++#endif
++/* Enable GNU extensions on systems that have them.  */
++#ifndef _GNU_SOURCE
++# undef _GNU_SOURCE
++#endif
++/* Enable threading extensions on Solaris.  */
++#ifndef _POSIX_PTHREAD_SEMANTICS
++# undef _POSIX_PTHREAD_SEMANTICS
++#endif
++/* Enable extensions on HP NonStop.  */
++#ifndef _TANDEM_SOURCE
++# undef _TANDEM_SOURCE
++#endif
++/* Enable general extensions on Solaris.  */
++#ifndef __EXTENSIONS__
++# undef __EXTENSIONS__
++#endif
++
++
++/* Define to 1 if on MINIX. */
++#undef _MINIX
++
++/* Define to 2 if the system does not provide POSIX.1 features except with
++   this defined. */
++#undef _POSIX_1_SOURCE
++
++/* Define to 1 if you need to in order for `stat' and other things to work. */
++#undef _POSIX_SOURCE
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3478c1fd0d3188180a9ba8b6b9f7134d31dd0e5e
new file mode 100755 (executable)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1825 @@@
++#! /bin/sh
++# Configuration validation subroutine script.
++#   Copyright 1992-2016 Free Software Foundation, Inc.
++
++timestamp='2016-11-19'
++
++# This file is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++# General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, see <http://www.gnu.org/licenses/>.
++#
++# As a special exception to the GNU General Public License, if you
++# distribute this file as part of a program that contains a
++# configuration script generated by Autoconf, you may include it under
++# the same distribution terms that you use for the rest of that
++# program.  This Exception is an additional permission under section 7
++# of the GNU General Public License, version 3 ("GPLv3").
++
++
++# Please send patches to <config-patches@gnu.org>.
++#
++# Configuration subroutine to validate and canonicalize a configuration type.
++# Supply the specified configuration type as an argument.
++# If it is invalid, we print an error message on stderr and exit with code 1.
++# Otherwise, we print the canonical config type on stdout and succeed.
++
++# You can get the latest version of this script from:
++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
++
++# This file is supposed to be the same for all GNU packages
++# and recognize all the CPU types, system types and aliases
++# that are meaningful with *any* GNU software.
++# Each package is responsible for reporting which valid configurations
++# it does not support.  The user should be able to distinguish
++# a failure to support a valid configuration from a meaningless
++# configuration.
++
++# The goal of this file is to map all the various variations of a given
++# machine specification into a single specification in the form:
++#     CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
++# or in some cases, the newer four-part form:
++#     CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
++# It is wrong to echo any other type of specification.
++
++me=`echo "$0" | sed -e 's,.*/,,'`
++
++usage="\
++Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
++
++Canonicalize a configuration name.
++
++Operation modes:
++  -h, --help         print this help, then exit
++  -t, --time-stamp   print date of last modification, then exit
++  -v, --version      print version number, then exit
++
++Report bugs and patches to <config-patches@gnu.org>."
++
++version="\
++GNU config.sub ($timestamp)
++
++Copyright 1992-2016 Free Software Foundation, Inc.
++
++This is free software; see the source for copying conditions.  There is NO
++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
++
++help="
++Try \`$me --help' for more information."
++
++# Parse command line
++while test $# -gt 0 ; do
++  case $1 in
++    --time-stamp | --time* | -t )
++       echo "$timestamp" ; exit ;;
++    --version | -v )
++       echo "$version" ; exit ;;
++    --help | --h* | -h )
++       echo "$usage"; exit ;;
++    -- )     # Stop option processing
++       shift; break ;;
++    - )       # Use stdin as input.
++       break ;;
++    -* )
++       echo "$me: invalid option $1$help"
++       exit 1 ;;
++
++    *local*)
++       # First pass through any local machine types.
++       echo $1
++       exit ;;
++
++    * )
++       break ;;
++  esac
++done
++
++case $# in
++ 0) echo "$me: missing argument$help" >&2
++    exit 1;;
++ 1) ;;
++ *) echo "$me: too many arguments$help" >&2
++    exit 1;;
++esac
++
++# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
++# Here we must recognize all the valid KERNEL-OS combinations.
++maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
++case $maybe_os in
++  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
++  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
++  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
++  kopensolaris*-gnu* | cloudabi*-eabi* | \
++  storm-chaos* | os2-emx* | rtmk-nova*)
++    os=-$maybe_os
++    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
++    ;;
++  android-linux)
++    os=-linux-android
++    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
++    ;;
++  *)
++    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
++    if [ $basic_machine != $1 ]
++    then os=`echo $1 | sed 's/.*-/-/'`
++    else os=; fi
++    ;;
++esac
++
++### Let's recognize common machines as not being operating systems so
++### that things like config.sub decstation-3100 work.  We also
++### recognize some manufacturers as not being operating systems, so we
++### can provide default operating systems below.
++case $os in
++      -sun*os*)
++              # Prevent following clause from handling this invalid input.
++              ;;
++      -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
++      -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
++      -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
++      -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
++      -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
++      -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
++      -apple | -axis | -knuth | -cray | -microblaze*)
++              os=
++              basic_machine=$1
++              ;;
++      -bluegene*)
++              os=-cnk
++              ;;
++      -sim | -cisco | -oki | -wec | -winbond)
++              os=
++              basic_machine=$1
++              ;;
++      -scout)
++              ;;
++      -wrs)
++              os=-vxworks
++              basic_machine=$1
++              ;;
++      -chorusos*)
++              os=-chorusos
++              basic_machine=$1
++              ;;
++      -chorusrdb)
++              os=-chorusrdb
++              basic_machine=$1
++              ;;
++      -hiux*)
++              os=-hiuxwe2
++              ;;
++      -sco6)
++              os=-sco5v6
++              basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++              ;;
++      -sco5)
++              os=-sco3.2v5
++              basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++              ;;
++      -sco4)
++              os=-sco3.2v4
++              basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++              ;;
++      -sco3.2.[4-9]*)
++              os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
++              basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++              ;;
++      -sco3.2v[4-9]*)
++              # Don't forget version if it is 3.2v4 or newer.
++              basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++              ;;
++      -sco5v6*)
++              # Don't forget version if it is 3.2v4 or newer.
++              basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++              ;;
++      -sco*)
++              os=-sco3.2v2
++              basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++              ;;
++      -udk*)
++              basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++              ;;
++      -isc)
++              os=-isc2.2
++              basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++              ;;
++      -clix*)
++              basic_machine=clipper-intergraph
++              ;;
++      -isc*)
++              basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++              ;;
++      -lynx*178)
++              os=-lynxos178
++              ;;
++      -lynx*5)
++              os=-lynxos5
++              ;;
++      -lynx*)
++              os=-lynxos
++              ;;
++      -ptx*)
++              basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
++              ;;
++      -windowsnt*)
++              os=`echo $os | sed -e 's/windowsnt/winnt/'`
++              ;;
++      -psos*)
++              os=-psos
++              ;;
++      -mint | -mint[0-9]*)
++              basic_machine=m68k-atari
++              os=-mint
++              ;;
++esac
++
++# Decode aliases for certain CPU-COMPANY combinations.
++case $basic_machine in
++      # Recognize the basic CPU types without company name.
++      # Some are omitted here because they have special meanings below.
++      1750a | 580 \
++      | a29k \
++      | aarch64 | aarch64_be \
++      | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
++      | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
++      | am33_2.0 \
++      | arc | arceb \
++      | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
++      | avr | avr32 \
++      | ba \
++      | be32 | be64 \
++      | bfin \
++      | c4x | c8051 | clipper \
++      | d10v | d30v | dlx | dsp16xx \
++      | e2k | epiphany \
++      | fido | fr30 | frv | ft32 \
++      | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
++      | hexagon \
++      | i370 | i860 | i960 | ia64 \
++      | ip2k | iq2000 \
++      | k1om \
++      | le32 | le64 \
++      | lm32 \
++      | m32c | m32r | m32rle | m68000 | m68k | m88k \
++      | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
++      | mips | mipsbe | mipseb | mipsel | mipsle \
++      | mips16 \
++      | mips64 | mips64el \
++      | mips64octeon | mips64octeonel \
++      | mips64orion | mips64orionel \
++      | mips64r5900 | mips64r5900el \
++      | mips64vr | mips64vrel \
++      | mips64vr4100 | mips64vr4100el \
++      | mips64vr4300 | mips64vr4300el \
++      | mips64vr5000 | mips64vr5000el \
++      | mips64vr5900 | mips64vr5900el \
++      | mipsisa32 | mipsisa32el \
++      | mipsisa32r2 | mipsisa32r2el \
++      | mipsisa32r6 | mipsisa32r6el \
++      | mipsisa64 | mipsisa64el \
++      | mipsisa64r2 | mipsisa64r2el \
++      | mipsisa64r6 | mipsisa64r6el \
++      | mipsisa64sb1 | mipsisa64sb1el \
++      | mipsisa64sr71k | mipsisa64sr71kel \
++      | mipsr5900 | mipsr5900el \
++      | mipstx39 | mipstx39el \
++      | mn10200 | mn10300 \
++      | moxie \
++      | mt \
++      | msp430 \
++      | nds32 | nds32le | nds32be \
++      | nios | nios2 | nios2eb | nios2el \
++      | ns16k | ns32k \
++      | open8 | or1k | or1knd | or32 \
++      | pdp10 | pdp11 | pj | pjl \
++      | powerpc | powerpc64 | powerpc64le | powerpcle \
++      | pru \
++      | pyramid \
++      | riscv32 | riscv64 \
++      | rl78 | rx \
++      | score \
++      | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
++      | sh64 | sh64le \
++      | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
++      | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
++      | spu \
++      | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
++      | ubicom32 \
++      | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
++      | visium \
++      | we32k \
++      | x86 | xc16x | xstormy16 | xtensa \
++      | z8k | z80)
++              basic_machine=$basic_machine-unknown
++              ;;
++      c54x)
++              basic_machine=tic54x-unknown
++              ;;
++      c55x)
++              basic_machine=tic55x-unknown
++              ;;
++      c6x)
++              basic_machine=tic6x-unknown
++              ;;
++      leon|leon[3-9])
++              basic_machine=sparc-$basic_machine
++              ;;
++      m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
++              basic_machine=$basic_machine-unknown
++              os=-none
++              ;;
++      m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
++              ;;
++      ms1)
++              basic_machine=mt-unknown
++              ;;
++
++      strongarm | thumb | xscale)
++              basic_machine=arm-unknown
++              ;;
++      xgate)
++              basic_machine=$basic_machine-unknown
++              os=-none
++              ;;
++      xscaleeb)
++              basic_machine=armeb-unknown
++              ;;
++
++      xscaleel)
++              basic_machine=armel-unknown
++              ;;
++
++      # We use `pc' rather than `unknown'
++      # because (1) that's what they normally are, and
++      # (2) the word "unknown" tends to confuse beginning users.
++      i*86 | x86_64)
++        basic_machine=$basic_machine-pc
++        ;;
++      # Object if more than one company name word.
++      *-*-*)
++              echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
++              exit 1
++              ;;
++      # Recognize the basic CPU types with company name.
++      580-* \
++      | a29k-* \
++      | aarch64-* | aarch64_be-* \
++      | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
++      | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
++      | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
++      | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
++      | avr-* | avr32-* \
++      | ba-* \
++      | be32-* | be64-* \
++      | bfin-* | bs2000-* \
++      | c[123]* | c30-* | [cjt]90-* | c4x-* \
++      | c8051-* | clipper-* | craynv-* | cydra-* \
++      | d10v-* | d30v-* | dlx-* \
++      | e2k-* | elxsi-* \
++      | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
++      | h8300-* | h8500-* \
++      | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
++      | hexagon-* \
++      | i*86-* | i860-* | i960-* | ia64-* \
++      | ip2k-* | iq2000-* \
++      | k1om-* \
++      | le32-* | le64-* \
++      | lm32-* \
++      | m32c-* | m32r-* | m32rle-* \
++      | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
++      | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
++      | microblaze-* | microblazeel-* \
++      | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
++      | mips16-* \
++      | mips64-* | mips64el-* \
++      | mips64octeon-* | mips64octeonel-* \
++      | mips64orion-* | mips64orionel-* \
++      | mips64r5900-* | mips64r5900el-* \
++      | mips64vr-* | mips64vrel-* \
++      | mips64vr4100-* | mips64vr4100el-* \
++      | mips64vr4300-* | mips64vr4300el-* \
++      | mips64vr5000-* | mips64vr5000el-* \
++      | mips64vr5900-* | mips64vr5900el-* \
++      | mipsisa32-* | mipsisa32el-* \
++      | mipsisa32r2-* | mipsisa32r2el-* \
++      | mipsisa32r6-* | mipsisa32r6el-* \
++      | mipsisa64-* | mipsisa64el-* \
++      | mipsisa64r2-* | mipsisa64r2el-* \
++      | mipsisa64r6-* | mipsisa64r6el-* \
++      | mipsisa64sb1-* | mipsisa64sb1el-* \
++      | mipsisa64sr71k-* | mipsisa64sr71kel-* \
++      | mipsr5900-* | mipsr5900el-* \
++      | mipstx39-* | mipstx39el-* \
++      | mmix-* \
++      | mt-* \
++      | msp430-* \
++      | nds32-* | nds32le-* | nds32be-* \
++      | nios-* | nios2-* | nios2eb-* | nios2el-* \
++      | none-* | np1-* | ns16k-* | ns32k-* \
++      | open8-* \
++      | or1k*-* \
++      | orion-* \
++      | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
++      | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
++      | pru-* \
++      | pyramid-* \
++      | riscv32-* | riscv64-* \
++      | rl78-* | romp-* | rs6000-* | rx-* \
++      | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
++      | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
++      | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
++      | sparclite-* \
++      | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
++      | tahoe-* \
++      | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
++      | tile*-* \
++      | tron-* \
++      | ubicom32-* \
++      | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
++      | vax-* \
++      | visium-* \
++      | we32k-* \
++      | x86-* | x86_64-* | xc16x-* | xps100-* \
++      | xstormy16-* | xtensa*-* \
++      | ymp-* \
++      | z8k-* | z80-*)
++              ;;
++      # Recognize the basic CPU types without company name, with glob match.
++      xtensa*)
++              basic_machine=$basic_machine-unknown
++              ;;
++      # Recognize the various machine names and aliases which stand
++      # for a CPU type and a company and sometimes even an OS.
++      386bsd)
++              basic_machine=i386-unknown
++              os=-bsd
++              ;;
++      3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
++              basic_machine=m68000-att
++              ;;
++      3b*)
++              basic_machine=we32k-att
++              ;;
++      a29khif)
++              basic_machine=a29k-amd
++              os=-udi
++              ;;
++      abacus)
++              basic_machine=abacus-unknown
++              ;;
++      adobe68k)
++              basic_machine=m68010-adobe
++              os=-scout
++              ;;
++      alliant | fx80)
++              basic_machine=fx80-alliant
++              ;;
++      altos | altos3068)
++              basic_machine=m68k-altos
++              ;;
++      am29k)
++              basic_machine=a29k-none
++              os=-bsd
++              ;;
++      amd64)
++              basic_machine=x86_64-pc
++              ;;
++      amd64-*)
++              basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
++              ;;
++      amdahl)
++              basic_machine=580-amdahl
++              os=-sysv
++              ;;
++      amiga | amiga-*)
++              basic_machine=m68k-unknown
++              ;;
++      amigaos | amigados)
++              basic_machine=m68k-unknown
++              os=-amigaos
++              ;;
++      amigaunix | amix)
++              basic_machine=m68k-unknown
++              os=-sysv4
++              ;;
++      apollo68)
++              basic_machine=m68k-apollo
++              os=-sysv
++              ;;
++      apollo68bsd)
++              basic_machine=m68k-apollo
++              os=-bsd
++              ;;
++      aros)
++              basic_machine=i386-pc
++              os=-aros
++              ;;
++      asmjs)
++              basic_machine=asmjs-unknown
++              ;;
++      aux)
++              basic_machine=m68k-apple
++              os=-aux
++              ;;
++      balance)
++              basic_machine=ns32k-sequent
++              os=-dynix
++              ;;
++      blackfin)
++              basic_machine=bfin-unknown
++              os=-linux
++              ;;
++      blackfin-*)
++              basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
++              os=-linux
++              ;;
++      bluegene*)
++              basic_machine=powerpc-ibm
++              os=-cnk
++              ;;
++      c54x-*)
++              basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
++              ;;
++      c55x-*)
++              basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
++              ;;
++      c6x-*)
++              basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
++              ;;
++      c90)
++              basic_machine=c90-cray
++              os=-unicos
++              ;;
++      cegcc)
++              basic_machine=arm-unknown
++              os=-cegcc
++              ;;
++      convex-c1)
++              basic_machine=c1-convex
++              os=-bsd
++              ;;
++      convex-c2)
++              basic_machine=c2-convex
++              os=-bsd
++              ;;
++      convex-c32)
++              basic_machine=c32-convex
++              os=-bsd
++              ;;
++      convex-c34)
++              basic_machine=c34-convex
++              os=-bsd
++              ;;
++      convex-c38)
++              basic_machine=c38-convex
++              os=-bsd
++              ;;
++      cray | j90)
++              basic_machine=j90-cray
++              os=-unicos
++              ;;
++      craynv)
++              basic_machine=craynv-cray
++              os=-unicosmp
++              ;;
++      cr16 | cr16-*)
++              basic_machine=cr16-unknown
++              os=-elf
++              ;;
++      crds | unos)
++              basic_machine=m68k-crds
++              ;;
++      crisv32 | crisv32-* | etraxfs*)
++              basic_machine=crisv32-axis
++              ;;
++      cris | cris-* | etrax*)
++              basic_machine=cris-axis
++              ;;
++      crx)
++              basic_machine=crx-unknown
++              os=-elf
++              ;;
++      da30 | da30-*)
++              basic_machine=m68k-da30
++              ;;
++      decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
++              basic_machine=mips-dec
++              ;;
++      decsystem10* | dec10*)
++              basic_machine=pdp10-dec
++              os=-tops10
++              ;;
++      decsystem20* | dec20*)
++              basic_machine=pdp10-dec
++              os=-tops20
++              ;;
++      delta | 3300 | motorola-3300 | motorola-delta \
++            | 3300-motorola | delta-motorola)
++              basic_machine=m68k-motorola
++              ;;
++      delta88)
++              basic_machine=m88k-motorola
++              os=-sysv3
++              ;;
++      dicos)
++              basic_machine=i686-pc
++              os=-dicos
++              ;;
++      djgpp)
++              basic_machine=i586-pc
++              os=-msdosdjgpp
++              ;;
++      dpx20 | dpx20-*)
++              basic_machine=rs6000-bull
++              os=-bosx
++              ;;
++      dpx2* | dpx2*-bull)
++              basic_machine=m68k-bull
++              os=-sysv3
++              ;;
++      e500v[12])
++              basic_machine=powerpc-unknown
++              os=$os"spe"
++              ;;
++      e500v[12]-*)
++              basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
++              os=$os"spe"
++              ;;
++      ebmon29k)
++              basic_machine=a29k-amd
++              os=-ebmon
++              ;;
++      elxsi)
++              basic_machine=elxsi-elxsi
++              os=-bsd
++              ;;
++      encore | umax | mmax)
++              basic_machine=ns32k-encore
++              ;;
++      es1800 | OSE68k | ose68k | ose | OSE)
++              basic_machine=m68k-ericsson
++              os=-ose
++              ;;
++      fx2800)
++              basic_machine=i860-alliant
++              ;;
++      genix)
++              basic_machine=ns32k-ns
++              ;;
++      gmicro)
++              basic_machine=tron-gmicro
++              os=-sysv
++              ;;
++      go32)
++              basic_machine=i386-pc
++              os=-go32
++              ;;
++      h3050r* | hiux*)
++              basic_machine=hppa1.1-hitachi
++              os=-hiuxwe2
++              ;;
++      h8300hms)
++              basic_machine=h8300-hitachi
++              os=-hms
++              ;;
++      h8300xray)
++              basic_machine=h8300-hitachi
++              os=-xray
++              ;;
++      h8500hms)
++              basic_machine=h8500-hitachi
++              os=-hms
++              ;;
++      harris)
++              basic_machine=m88k-harris
++              os=-sysv3
++              ;;
++      hp300-*)
++              basic_machine=m68k-hp
++              ;;
++      hp300bsd)
++              basic_machine=m68k-hp
++              os=-bsd
++              ;;
++      hp300hpux)
++              basic_machine=m68k-hp
++              os=-hpux
++              ;;
++      hp3k9[0-9][0-9] | hp9[0-9][0-9])
++              basic_machine=hppa1.0-hp
++              ;;
++      hp9k2[0-9][0-9] | hp9k31[0-9])
++              basic_machine=m68000-hp
++              ;;
++      hp9k3[2-9][0-9])
++              basic_machine=m68k-hp
++              ;;
++      hp9k6[0-9][0-9] | hp6[0-9][0-9])
++              basic_machine=hppa1.0-hp
++              ;;
++      hp9k7[0-79][0-9] | hp7[0-79][0-9])
++              basic_machine=hppa1.1-hp
++              ;;
++      hp9k78[0-9] | hp78[0-9])
++              # FIXME: really hppa2.0-hp
++              basic_machine=hppa1.1-hp
++              ;;
++      hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
++              # FIXME: really hppa2.0-hp
++              basic_machine=hppa1.1-hp
++              ;;
++      hp9k8[0-9][13679] | hp8[0-9][13679])
++              basic_machine=hppa1.1-hp
++              ;;
++      hp9k8[0-9][0-9] | hp8[0-9][0-9])
++              basic_machine=hppa1.0-hp
++              ;;
++      hppa-next)
++              os=-nextstep3
++              ;;
++      hppaosf)
++              basic_machine=hppa1.1-hp
++              os=-osf
++              ;;
++      hppro)
++              basic_machine=hppa1.1-hp
++              os=-proelf
++              ;;
++      i370-ibm* | ibm*)
++              basic_machine=i370-ibm
++              ;;
++      i*86v32)
++              basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
++              os=-sysv32
++              ;;
++      i*86v4*)
++              basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
++              os=-sysv4
++              ;;
++      i*86v)
++              basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
++              os=-sysv
++              ;;
++      i*86sol2)
++              basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
++              os=-solaris2
++              ;;
++      i386mach)
++              basic_machine=i386-mach
++              os=-mach
++              ;;
++      i386-vsta | vsta)
++              basic_machine=i386-unknown
++              os=-vsta
++              ;;
++      iris | iris4d)
++              basic_machine=mips-sgi
++              case $os in
++                  -irix*)
++                      ;;
++                  *)
++                      os=-irix4
++                      ;;
++              esac
++              ;;
++      isi68 | isi)
++              basic_machine=m68k-isi
++              os=-sysv
++              ;;
++      leon-*|leon[3-9]-*)
++              basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
++              ;;
++      m68knommu)
++              basic_machine=m68k-unknown
++              os=-linux
++              ;;
++      m68knommu-*)
++              basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
++              os=-linux
++              ;;
++      m88k-omron*)
++              basic_machine=m88k-omron
++              ;;
++      magnum | m3230)
++              basic_machine=mips-mips
++              os=-sysv
++              ;;
++      merlin)
++              basic_machine=ns32k-utek
++              os=-sysv
++              ;;
++      microblaze*)
++              basic_machine=microblaze-xilinx
++              ;;
++      mingw64)
++              basic_machine=x86_64-pc
++              os=-mingw64
++              ;;
++      mingw32)
++              basic_machine=i686-pc
++              os=-mingw32
++              ;;
++      mingw32ce)
++              basic_machine=arm-unknown
++              os=-mingw32ce
++              ;;
++      miniframe)
++              basic_machine=m68000-convergent
++              ;;
++      *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
++              basic_machine=m68k-atari
++              os=-mint
++              ;;
++      mips3*-*)
++              basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
++              ;;
++      mips3*)
++              basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
++              ;;
++      monitor)
++              basic_machine=m68k-rom68k
++              os=-coff
++              ;;
++      morphos)
++              basic_machine=powerpc-unknown
++              os=-morphos
++              ;;
++      moxiebox)
++              basic_machine=moxie-unknown
++              os=-moxiebox
++              ;;
++      msdos)
++              basic_machine=i386-pc
++              os=-msdos
++              ;;
++      ms1-*)
++              basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
++              ;;
++      msys)
++              basic_machine=i686-pc
++              os=-msys
++              ;;
++      mvs)
++              basic_machine=i370-ibm
++              os=-mvs
++              ;;
++      nacl)
++              basic_machine=le32-unknown
++              os=-nacl
++              ;;
++      ncr3000)
++              basic_machine=i486-ncr
++              os=-sysv4
++              ;;
++      netbsd386)
++              basic_machine=i386-unknown
++              os=-netbsd
++              ;;
++      netwinder)
++              basic_machine=armv4l-rebel
++              os=-linux
++              ;;
++      news | news700 | news800 | news900)
++              basic_machine=m68k-sony
++              os=-newsos
++              ;;
++      news1000)
++              basic_machine=m68030-sony
++              os=-newsos
++              ;;
++      news-3600 | risc-news)
++              basic_machine=mips-sony
++              os=-newsos
++              ;;
++      necv70)
++              basic_machine=v70-nec
++              os=-sysv
++              ;;
++      next | m*-next )
++              basic_machine=m68k-next
++              case $os in
++                  -nextstep* )
++                      ;;
++                  -ns2*)
++                    os=-nextstep2
++                      ;;
++                  *)
++                    os=-nextstep3
++                      ;;
++              esac
++              ;;
++      nh3000)
++              basic_machine=m68k-harris
++              os=-cxux
++              ;;
++      nh[45]000)
++              basic_machine=m88k-harris
++              os=-cxux
++              ;;
++      nindy960)
++              basic_machine=i960-intel
++              os=-nindy
++              ;;
++      mon960)
++              basic_machine=i960-intel
++              os=-mon960
++              ;;
++      nonstopux)
++              basic_machine=mips-compaq
++              os=-nonstopux
++              ;;
++      np1)
++              basic_machine=np1-gould
++              ;;
++      neo-tandem)
++              basic_machine=neo-tandem
++              ;;
++      nse-tandem)
++              basic_machine=nse-tandem
++              ;;
++      nsr-tandem)
++              basic_machine=nsr-tandem
++              ;;
++      op50n-* | op60c-*)
++              basic_machine=hppa1.1-oki
++              os=-proelf
++              ;;
++      openrisc | openrisc-*)
++              basic_machine=or32-unknown
++              ;;
++      os400)
++              basic_machine=powerpc-ibm
++              os=-os400
++              ;;
++      OSE68000 | ose68000)
++              basic_machine=m68000-ericsson
++              os=-ose
++              ;;
++      os68k)
++              basic_machine=m68k-none
++              os=-os68k
++              ;;
++      pa-hitachi)
++              basic_machine=hppa1.1-hitachi
++              os=-hiuxwe2
++              ;;
++      paragon)
++              basic_machine=i860-intel
++              os=-osf
++              ;;
++      parisc)
++              basic_machine=hppa-unknown
++              os=-linux
++              ;;
++      parisc-*)
++              basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
++              os=-linux
++              ;;
++      pbd)
++              basic_machine=sparc-tti
++              ;;
++      pbb)
++              basic_machine=m68k-tti
++              ;;
++      pc532 | pc532-*)
++              basic_machine=ns32k-pc532
++              ;;
++      pc98)
++              basic_machine=i386-pc
++              ;;
++      pc98-*)
++              basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
++              ;;
++      pentium | p5 | k5 | k6 | nexgen | viac3)
++              basic_machine=i586-pc
++              ;;
++      pentiumpro | p6 | 6x86 | athlon | athlon_*)
++              basic_machine=i686-pc
++              ;;
++      pentiumii | pentium2 | pentiumiii | pentium3)
++              basic_machine=i686-pc
++              ;;
++      pentium4)
++              basic_machine=i786-pc
++              ;;
++      pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
++              basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
++              ;;
++      pentiumpro-* | p6-* | 6x86-* | athlon-*)
++              basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
++              ;;
++      pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
++              basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
++              ;;
++      pentium4-*)
++              basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
++              ;;
++      pn)
++              basic_machine=pn-gould
++              ;;
++      power)  basic_machine=power-ibm
++              ;;
++      ppc | ppcbe)    basic_machine=powerpc-unknown
++              ;;
++      ppc-* | ppcbe-*)
++              basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
++              ;;
++      ppcle | powerpclittle)
++              basic_machine=powerpcle-unknown
++              ;;
++      ppcle-* | powerpclittle-*)
++              basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
++              ;;
++      ppc64)  basic_machine=powerpc64-unknown
++              ;;
++      ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
++              ;;
++      ppc64le | powerpc64little)
++              basic_machine=powerpc64le-unknown
++              ;;
++      ppc64le-* | powerpc64little-*)
++              basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
++              ;;
++      ps2)
++              basic_machine=i386-ibm
++              ;;
++      pw32)
++              basic_machine=i586-unknown
++              os=-pw32
++              ;;
++      rdos | rdos64)
++              basic_machine=x86_64-pc
++              os=-rdos
++              ;;
++      rdos32)
++              basic_machine=i386-pc
++              os=-rdos
++              ;;
++      rom68k)
++              basic_machine=m68k-rom68k
++              os=-coff
++              ;;
++      rm[46]00)
++              basic_machine=mips-siemens
++              ;;
++      rtpc | rtpc-*)
++              basic_machine=romp-ibm
++              ;;
++      s390 | s390-*)
++              basic_machine=s390-ibm
++              ;;
++      s390x | s390x-*)
++              basic_machine=s390x-ibm
++              ;;
++      sa29200)
++              basic_machine=a29k-amd
++              os=-udi
++              ;;
++      sb1)
++              basic_machine=mipsisa64sb1-unknown
++              ;;
++      sb1el)
++              basic_machine=mipsisa64sb1el-unknown
++              ;;
++      sde)
++              basic_machine=mipsisa32-sde
++              os=-elf
++              ;;
++      sei)
++              basic_machine=mips-sei
++              os=-seiux
++              ;;
++      sequent)
++              basic_machine=i386-sequent
++              ;;
++      sh)
++              basic_machine=sh-hitachi
++              os=-hms
++              ;;
++      sh5el)
++              basic_machine=sh5le-unknown
++              ;;
++      sh64)
++              basic_machine=sh64-unknown
++              ;;
++      sparclite-wrs | simso-wrs)
++              basic_machine=sparclite-wrs
++              os=-vxworks
++              ;;
++      sps7)
++              basic_machine=m68k-bull
++              os=-sysv2
++              ;;
++      spur)
++              basic_machine=spur-unknown
++              ;;
++      st2000)
++              basic_machine=m68k-tandem
++              ;;
++      stratus)
++              basic_machine=i860-stratus
++              os=-sysv4
++              ;;
++      strongarm-* | thumb-*)
++              basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
++              ;;
++      sun2)
++              basic_machine=m68000-sun
++              ;;
++      sun2os3)
++              basic_machine=m68000-sun
++              os=-sunos3
++              ;;
++      sun2os4)
++              basic_machine=m68000-sun
++              os=-sunos4
++              ;;
++      sun3os3)
++              basic_machine=m68k-sun
++              os=-sunos3
++              ;;
++      sun3os4)
++              basic_machine=m68k-sun
++              os=-sunos4
++              ;;
++      sun4os3)
++              basic_machine=sparc-sun
++              os=-sunos3
++              ;;
++      sun4os4)
++              basic_machine=sparc-sun
++              os=-sunos4
++              ;;
++      sun4sol2)
++              basic_machine=sparc-sun
++              os=-solaris2
++              ;;
++      sun3 | sun3-*)
++              basic_machine=m68k-sun
++              ;;
++      sun4)
++              basic_machine=sparc-sun
++              ;;
++      sun386 | sun386i | roadrunner)
++              basic_machine=i386-sun
++              ;;
++      sv1)
++              basic_machine=sv1-cray
++              os=-unicos
++              ;;
++      symmetry)
++              basic_machine=i386-sequent
++              os=-dynix
++              ;;
++      t3e)
++              basic_machine=alphaev5-cray
++              os=-unicos
++              ;;
++      t90)
++              basic_machine=t90-cray
++              os=-unicos
++              ;;
++      tile*)
++              basic_machine=$basic_machine-unknown
++              os=-linux-gnu
++              ;;
++      tx39)
++              basic_machine=mipstx39-unknown
++              ;;
++      tx39el)
++              basic_machine=mipstx39el-unknown
++              ;;
++      toad1)
++              basic_machine=pdp10-xkl
++              os=-tops20
++              ;;
++      tower | tower-32)
++              basic_machine=m68k-ncr
++              ;;
++      tpf)
++              basic_machine=s390x-ibm
++              os=-tpf
++              ;;
++      udi29k)
++              basic_machine=a29k-amd
++              os=-udi
++              ;;
++      ultra3)
++              basic_machine=a29k-nyu
++              os=-sym1
++              ;;
++      v810 | necv810)
++              basic_machine=v810-nec
++              os=-none
++              ;;
++      vaxv)
++              basic_machine=vax-dec
++              os=-sysv
++              ;;
++      vms)
++              basic_machine=vax-dec
++              os=-vms
++              ;;
++      vpp*|vx|vx-*)
++              basic_machine=f301-fujitsu
++              ;;
++      vxworks960)
++              basic_machine=i960-wrs
++              os=-vxworks
++              ;;
++      vxworks68)
++              basic_machine=m68k-wrs
++              os=-vxworks
++              ;;
++      vxworks29k)
++              basic_machine=a29k-wrs
++              os=-vxworks
++              ;;
++      w65*)
++              basic_machine=w65-wdc
++              os=-none
++              ;;
++      w89k-*)
++              basic_machine=hppa1.1-winbond
++              os=-proelf
++              ;;
++      xbox)
++              basic_machine=i686-pc
++              os=-mingw32
++              ;;
++      xps | xps100)
++              basic_machine=xps100-honeywell
++              ;;
++      xscale-* | xscalee[bl]-*)
++              basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
++              ;;
++      ymp)
++              basic_machine=ymp-cray
++              os=-unicos
++              ;;
++      z8k-*-coff)
++              basic_machine=z8k-unknown
++              os=-sim
++              ;;
++      z80-*-coff)
++              basic_machine=z80-unknown
++              os=-sim
++              ;;
++      none)
++              basic_machine=none-none
++              os=-none
++              ;;
++
++# Here we handle the default manufacturer of certain CPU types.  It is in
++# some cases the only manufacturer, in others, it is the most popular.
++      w89k)
++              basic_machine=hppa1.1-winbond
++              ;;
++      op50n)
++              basic_machine=hppa1.1-oki
++              ;;
++      op60c)
++              basic_machine=hppa1.1-oki
++              ;;
++      romp)
++              basic_machine=romp-ibm
++              ;;
++      mmix)
++              basic_machine=mmix-knuth
++              ;;
++      rs6000)
++              basic_machine=rs6000-ibm
++              ;;
++      vax)
++              basic_machine=vax-dec
++              ;;
++      pdp10)
++              # there are many clones, so DEC is not a safe bet
++              basic_machine=pdp10-unknown
++              ;;
++      pdp11)
++              basic_machine=pdp11-dec
++              ;;
++      we32k)
++              basic_machine=we32k-att
++              ;;
++      sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
++              basic_machine=sh-unknown
++              ;;
++      sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
++              basic_machine=sparc-sun
++              ;;
++      cydra)
++              basic_machine=cydra-cydrome
++              ;;
++      orion)
++              basic_machine=orion-highlevel
++              ;;
++      orion105)
++              basic_machine=clipper-highlevel
++              ;;
++      mac | mpw | mac-mpw)
++              basic_machine=m68k-apple
++              ;;
++      pmac | pmac-mpw)
++              basic_machine=powerpc-apple
++              ;;
++      *-unknown)
++              # Make sure to match an already-canonicalized machine name.
++              ;;
++      *)
++              echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
++              exit 1
++              ;;
++esac
++
++# Here we canonicalize certain aliases for manufacturers.
++case $basic_machine in
++      *-digital*)
++              basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
++              ;;
++      *-commodore*)
++              basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
++              ;;
++      *)
++              ;;
++esac
++
++# Decode manufacturer-specific aliases for certain operating systems.
++
++if [ x"$os" != x"" ]
++then
++case $os in
++      # First match some system type aliases
++      # that might get confused with valid system types.
++      # -solaris* is a basic system type, with this one exception.
++      -auroraux)
++              os=-auroraux
++              ;;
++      -solaris1 | -solaris1.*)
++              os=`echo $os | sed -e 's|solaris1|sunos4|'`
++              ;;
++      -solaris)
++              os=-solaris2
++              ;;
++      -svr4*)
++              os=-sysv4
++              ;;
++      -unixware*)
++              os=-sysv4.2uw
++              ;;
++      -gnu/linux*)
++              os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
++              ;;
++      # First accept the basic system types.
++      # The portable systems comes first.
++      # Each alternative MUST END IN A *, to match a version number.
++      # -sysv* is not here because it comes later, after sysvr4.
++      -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
++            | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
++            | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
++            | -sym* | -kopensolaris* | -plan9* \
++            | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
++            | -aos* | -aros* | -cloudabi* | -sortix* \
++            | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
++            | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
++            | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
++            | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
++            | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
++            | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
++            | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
++            | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
++            | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
++            | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
++            | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
++            | -linux-newlib* | -linux-musl* | -linux-uclibc* \
++            | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
++            | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
++            | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
++            | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
++            | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
++            | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
++            | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
++            | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
++            | -onefs* | -tirtos* | -phoenix* | -fuchsia*)
++      # Remember, each alternative MUST END IN *, to match a version number.
++              ;;
++      -qnx*)
++              case $basic_machine in
++                  x86-* | i*86-*)
++                      ;;
++                  *)
++                      os=-nto$os
++                      ;;
++              esac
++              ;;
++      -nto-qnx*)
++              ;;
++      -nto*)
++              os=`echo $os | sed -e 's|nto|nto-qnx|'`
++              ;;
++      -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
++            | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
++            | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
++              ;;
++      -mac*)
++              os=`echo $os | sed -e 's|mac|macos|'`
++              ;;
++      -linux-dietlibc)
++              os=-linux-dietlibc
++              ;;
++      -linux*)
++              os=`echo $os | sed -e 's|linux|linux-gnu|'`
++              ;;
++      -sunos5*)
++              os=`echo $os | sed -e 's|sunos5|solaris2|'`
++              ;;
++      -sunos6*)
++              os=`echo $os | sed -e 's|sunos6|solaris3|'`
++              ;;
++      -opened*)
++              os=-openedition
++              ;;
++      -os400*)
++              os=-os400
++              ;;
++      -wince*)
++              os=-wince
++              ;;
++      -osfrose*)
++              os=-osfrose
++              ;;
++      -osf*)
++              os=-osf
++              ;;
++      -utek*)
++              os=-bsd
++              ;;
++      -dynix*)
++              os=-bsd
++              ;;
++      -acis*)
++              os=-aos
++              ;;
++      -atheos*)
++              os=-atheos
++              ;;
++      -syllable*)
++              os=-syllable
++              ;;
++      -386bsd)
++              os=-bsd
++              ;;
++      -ctix* | -uts*)
++              os=-sysv
++              ;;
++      -nova*)
++              os=-rtmk-nova
++              ;;
++      -ns2 )
++              os=-nextstep2
++              ;;
++      -nsk*)
++              os=-nsk
++              ;;
++      # Preserve the version number of sinix5.
++      -sinix5.*)
++              os=`echo $os | sed -e 's|sinix|sysv|'`
++              ;;
++      -sinix*)
++              os=-sysv4
++              ;;
++      -tpf*)
++              os=-tpf
++              ;;
++      -triton*)
++              os=-sysv3
++              ;;
++      -oss*)
++              os=-sysv3
++              ;;
++      -svr4)
++              os=-sysv4
++              ;;
++      -svr3)
++              os=-sysv3
++              ;;
++      -sysvr4)
++              os=-sysv4
++              ;;
++      # This must come after -sysvr4.
++      -sysv*)
++              ;;
++      -ose*)
++              os=-ose
++              ;;
++      -es1800*)
++              os=-ose
++              ;;
++      -xenix)
++              os=-xenix
++              ;;
++      -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
++              os=-mint
++              ;;
++      -aros*)
++              os=-aros
++              ;;
++      -zvmoe)
++              os=-zvmoe
++              ;;
++      -dicos*)
++              os=-dicos
++              ;;
++      -nacl*)
++              ;;
++      -ios)
++              ;;
++      -none)
++              ;;
++      *)
++              # Get rid of the `-' at the beginning of $os.
++              os=`echo $os | sed 's/[^-]*-//'`
++              echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
++              exit 1
++              ;;
++esac
++else
++
++# Here we handle the default operating systems that come with various machines.
++# The value should be what the vendor currently ships out the door with their
++# machine or put another way, the most popular os provided with the machine.
++
++# Note that if you're going to try to match "-MANUFACTURER" here (say,
++# "-sun"), then you have to tell the case statement up towards the top
++# that MANUFACTURER isn't an operating system.  Otherwise, code above
++# will signal an error saying that MANUFACTURER isn't an operating
++# system, and we'll never get to this point.
++
++case $basic_machine in
++      score-*)
++              os=-elf
++              ;;
++      spu-*)
++              os=-elf
++              ;;
++      *-acorn)
++              os=-riscix1.2
++              ;;
++      arm*-rebel)
++              os=-linux
++              ;;
++      arm*-semi)
++              os=-aout
++              ;;
++      c4x-* | tic4x-*)
++              os=-coff
++              ;;
++      c8051-*)
++              os=-elf
++              ;;
++      hexagon-*)
++              os=-elf
++              ;;
++      tic54x-*)
++              os=-coff
++              ;;
++      tic55x-*)
++              os=-coff
++              ;;
++      tic6x-*)
++              os=-coff
++              ;;
++      # This must come before the *-dec entry.
++      pdp10-*)
++              os=-tops20
++              ;;
++      pdp11-*)
++              os=-none
++              ;;
++      *-dec | vax-*)
++              os=-ultrix4.2
++              ;;
++      m68*-apollo)
++              os=-domain
++              ;;
++      i386-sun)
++              os=-sunos4.0.2
++              ;;
++      m68000-sun)
++              os=-sunos3
++              ;;
++      m68*-cisco)
++              os=-aout
++              ;;
++      mep-*)
++              os=-elf
++              ;;
++      mips*-cisco)
++              os=-elf
++              ;;
++      mips*-*)
++              os=-elf
++              ;;
++      or32-*)
++              os=-coff
++              ;;
++      *-tti)  # must be before sparc entry or we get the wrong os.
++              os=-sysv3
++              ;;
++      sparc-* | *-sun)
++              os=-sunos4.1.1
++              ;;
++      *-be)
++              os=-beos
++              ;;
++      *-haiku)
++              os=-haiku
++              ;;
++      *-ibm)
++              os=-aix
++              ;;
++      *-knuth)
++              os=-mmixware
++              ;;
++      *-wec)
++              os=-proelf
++              ;;
++      *-winbond)
++              os=-proelf
++              ;;
++      *-oki)
++              os=-proelf
++              ;;
++      *-hp)
++              os=-hpux
++              ;;
++      *-hitachi)
++              os=-hiux
++              ;;
++      i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
++              os=-sysv
++              ;;
++      *-cbm)
++              os=-amigaos
++              ;;
++      *-dg)
++              os=-dgux
++              ;;
++      *-dolphin)
++              os=-sysv3
++              ;;
++      m68k-ccur)
++              os=-rtu
++              ;;
++      m88k-omron*)
++              os=-luna
++              ;;
++      *-next )
++              os=-nextstep
++              ;;
++      *-sequent)
++              os=-ptx
++              ;;
++      *-crds)
++              os=-unos
++              ;;
++      *-ns)
++              os=-genix
++              ;;
++      i370-*)
++              os=-mvs
++              ;;
++      *-next)
++              os=-nextstep3
++              ;;
++      *-gould)
++              os=-sysv
++              ;;
++      *-highlevel)
++              os=-bsd
++              ;;
++      *-encore)
++              os=-bsd
++              ;;
++      *-sgi)
++              os=-irix
++              ;;
++      *-siemens)
++              os=-sysv4
++              ;;
++      *-masscomp)
++              os=-rtu
++              ;;
++      f30[01]-fujitsu | f700-fujitsu)
++              os=-uxpv
++              ;;
++      *-rom68k)
++              os=-coff
++              ;;
++      *-*bug)
++              os=-coff
++              ;;
++      *-apple)
++              os=-macos
++              ;;
++      *-atari*)
++              os=-mint
++              ;;
++      *)
++              os=-none
++              ;;
++esac
++fi
++
++# Here we handle the case where we know the os, and the CPU type, but not the
++# manufacturer.  We pick the logical manufacturer.
++vendor=unknown
++case $basic_machine in
++      *-unknown)
++              case $os in
++                      -riscix*)
++                              vendor=acorn
++                              ;;
++                      -sunos*)
++                              vendor=sun
++                              ;;
++                      -cnk*|-aix*)
++                              vendor=ibm
++                              ;;
++                      -beos*)
++                              vendor=be
++                              ;;
++                      -hpux*)
++                              vendor=hp
++                              ;;
++                      -mpeix*)
++                              vendor=hp
++                              ;;
++                      -hiux*)
++                              vendor=hitachi
++                              ;;
++                      -unos*)
++                              vendor=crds
++                              ;;
++                      -dgux*)
++                              vendor=dg
++                              ;;
++                      -luna*)
++                              vendor=omron
++                              ;;
++                      -genix*)
++                              vendor=ns
++                              ;;
++                      -mvs* | -opened*)
++                              vendor=ibm
++                              ;;
++                      -os400*)
++                              vendor=ibm
++                              ;;
++                      -ptx*)
++                              vendor=sequent
++                              ;;
++                      -tpf*)
++                              vendor=ibm
++                              ;;
++                      -vxsim* | -vxworks* | -windiss*)
++                              vendor=wrs
++                              ;;
++                      -aux*)
++                              vendor=apple
++                              ;;
++                      -hms*)
++                              vendor=hitachi
++                              ;;
++                      -mpw* | -macos*)
++                              vendor=apple
++                              ;;
++                      -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
++                              vendor=atari
++                              ;;
++                      -vos*)
++                              vendor=stratus
++                              ;;
++              esac
++              basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
++              ;;
++esac
++
++echo $basic_machine$os
++exit
++
++# Local variables:
++# eval: (add-hook 'write-file-hooks 'time-stamp)
++# time-stamp-start: "timestamp='"
++# time-stamp-format: "%:y-%02m-%02d"
++# time-stamp-end: "'"
++# End:
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ee90bc6dea0735a3ccd9b20f168a0b9a781c5d1b
new file mode 100755 (executable)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15189 @@@
++#! /bin/sh
++# Guess values for system-dependent variables and create Makefiles.
++# Generated by GNU Autoconf 2.64 for package-unused version-unused.
++#
++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
++# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
++# Foundation, Inc.
++#
++# This configure script is free software; the Free Software Foundation
++# gives unlimited permission to copy, distribute and modify it.
++## -------------------- ##
++## M4sh Initialization. ##
++## -------------------- ##
++
++# Be more Bourne compatible
++DUALCASE=1; export DUALCASE # for MKS sh
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
++  emulate sh
++  NULLCMD=:
++  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
++  # is contrary to our usage.  Disable this feature.
++  alias -g '${1+"$@"}'='"$@"'
++  setopt NO_GLOB_SUBST
++else
++  case `(set -o) 2>/dev/null` in #(
++  *posix*) :
++    set -o posix ;; #(
++  *) :
++     ;;
++esac
++fi
++
++
++as_nl='
++'
++export as_nl
++# Printing a long string crashes Solaris 7 /usr/bin/printf.
++as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
++# Prefer a ksh shell builtin over an external printf program on Solaris,
++# but without wasting forks for bash or zsh.
++if test -z "$BASH_VERSION$ZSH_VERSION" \
++    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
++  as_echo='print -r --'
++  as_echo_n='print -rn --'
++elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
++  as_echo='printf %s\n'
++  as_echo_n='printf %s'
++else
++  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
++    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
++    as_echo_n='/usr/ucb/echo -n'
++  else
++    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
++    as_echo_n_body='eval
++      arg=$1;
++      case $arg in #(
++      *"$as_nl"*)
++      expr "X$arg" : "X\\(.*\\)$as_nl";
++      arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
++      esac;
++      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
++    '
++    export as_echo_n_body
++    as_echo_n='sh -c $as_echo_n_body as_echo'
++  fi
++  export as_echo_body
++  as_echo='sh -c $as_echo_body as_echo'
++fi
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++  PATH_SEPARATOR=:
++  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
++    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
++      PATH_SEPARATOR=';'
++  }
++fi
++
++
++# IFS
++# We need space, tab and new line, in precisely that order.  Quoting is
++# there to prevent editors from complaining about space-tab.
++# (If _AS_PATH_WALK were called with IFS unset, it would disable word
++# splitting by setting IFS to empty value.)
++IFS=" ""      $as_nl"
++
++# Find who we are.  Look in the path if we contain no directory separator.
++case $0 in #((
++  *[\\/]* ) as_myself=$0 ;;
++  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
++  done
++IFS=$as_save_IFS
++
++     ;;
++esac
++# We did not find ourselves, most probably we were run as `sh COMMAND'
++# in which case we are not to be found in the path.
++if test "x$as_myself" = x; then
++  as_myself=$0
++fi
++if test ! -f "$as_myself"; then
++  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++  exit 1
++fi
++
++# Unset variables that we do not need and which cause bugs (e.g. in
++# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
++# suppresses any "Segmentation fault" message there.  '((' could
++# trigger a bug in pdksh 5.2.14.
++for as_var in BASH_ENV ENV MAIL MAILPATH
++do eval test x\${$as_var+set} = xset \
++  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
++done
++PS1='$ '
++PS2='> '
++PS4='+ '
++
++# NLS nuisances.
++LC_ALL=C
++export LC_ALL
++LANGUAGE=C
++export LANGUAGE
++
++# CDPATH.
++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
++
++if test "x$CONFIG_SHELL" = x; then
++  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
++  emulate sh
++  NULLCMD=:
++  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
++  # is contrary to our usage.  Disable this feature.
++  alias -g '\${1+\"\$@\"}'='\"\$@\"'
++  setopt NO_GLOB_SUBST
++else
++  case \`(set -o) 2>/dev/null\` in #(
++  *posix*) :
++    set -o posix ;; #(
++  *) :
++     ;;
++esac
++fi
++"
++  as_required="as_fn_return () { (exit \$1); }
++as_fn_success () { as_fn_return 0; }
++as_fn_failure () { as_fn_return 1; }
++as_fn_ret_success () { return 0; }
++as_fn_ret_failure () { return 1; }
++
++exitcode=0
++as_fn_success || { exitcode=1; echo as_fn_success failed.; }
++as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
++as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
++as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
++if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
++
++else
++  exitcode=1; echo positional parameters were not saved.
++fi
++test x\$exitcode = x0 || exit 1"
++  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
++  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
++  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
++  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
++test \$(( 1 + 1 )) = 2 || exit 1
++
++  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
++    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
++    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
++    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
++    PATH=/empty FPATH=/empty; export PATH FPATH
++    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
++      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
++  if (eval "$as_required") 2>/dev/null; then :
++  as_have_required=yes
++else
++  as_have_required=no
++fi
++  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
++
++else
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++as_found=false
++for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++  as_found=:
++  case $as_dir in #(
++       /*)
++         for as_base in sh bash ksh sh5; do
++           # Try only shells that exist, to save several forks.
++           as_shell=$as_dir/$as_base
++           if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
++                  { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
++  CONFIG_SHELL=$as_shell as_have_required=yes
++                 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
++  break 2
++fi
++fi
++         done;;
++       esac
++  as_found=false
++done
++$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
++            { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
++  CONFIG_SHELL=$SHELL as_have_required=yes
++fi; }
++IFS=$as_save_IFS
++
++
++      if test "x$CONFIG_SHELL" != x; then :
++  # We cannot yet assume a decent shell, so we have to provide a
++      # neutralization value for shells without unset; and this also
++      # works around shells that cannot unset nonexistent variables.
++      BASH_ENV=/dev/null
++      ENV=/dev/null
++      (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
++      export CONFIG_SHELL
++      exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
++fi
++
++    if test x$as_have_required = xno; then :
++  $as_echo "$0: This script requires a shell more modern than all"
++  $as_echo "$0: the shells that I found on your system."
++  if test x${ZSH_VERSION+set} = xset ; then
++    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
++    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
++  else
++    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
++$0: including any error possibly output before this
++$0: message. Then install a modern shell, or manually run
++$0: the script under such a shell if you do have one."
++  fi
++  exit 1
++fi
++fi
++fi
++SHELL=${CONFIG_SHELL-/bin/sh}
++export SHELL
++# Unset more variables known to interfere with behavior of common tools.
++CLICOLOR_FORCE= GREP_OPTIONS=
++unset CLICOLOR_FORCE GREP_OPTIONS
++
++## --------------------- ##
++## M4sh Shell Functions. ##
++## --------------------- ##
++# as_fn_unset VAR
++# ---------------
++# Portably unset VAR.
++as_fn_unset ()
++{
++  { eval $1=; unset $1;}
++}
++as_unset=as_fn_unset
++
++# as_fn_set_status STATUS
++# -----------------------
++# Set $? to STATUS, without forking.
++as_fn_set_status ()
++{
++  return $1
++} # as_fn_set_status
++
++# as_fn_exit STATUS
++# -----------------
++# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
++as_fn_exit ()
++{
++  set +e
++  as_fn_set_status $1
++  exit $1
++} # as_fn_exit
++
++# as_fn_mkdir_p
++# -------------
++# Create "$as_dir" as a directory, including parents if necessary.
++as_fn_mkdir_p ()
++{
++
++  case $as_dir in #(
++  -*) as_dir=./$as_dir;;
++  esac
++  test -d "$as_dir" || eval $as_mkdir_p || {
++    as_dirs=
++    while :; do
++      case $as_dir in #(
++      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
++      *) as_qdir=$as_dir;;
++      esac
++      as_dirs="'$as_qdir' $as_dirs"
++      as_dir=`$as_dirname -- "$as_dir" ||
++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++       X"$as_dir" : 'X\(//\)[^/]' \| \
++       X"$as_dir" : 'X\(//\)$' \| \
++       X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X"$as_dir" |
++    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++          s//\1/
++          q
++        }
++        /^X\(\/\/\)[^/].*/{
++          s//\1/
++          q
++        }
++        /^X\(\/\/\)$/{
++          s//\1/
++          q
++        }
++        /^X\(\/\).*/{
++          s//\1/
++          q
++        }
++        s/.*/./; q'`
++      test -d "$as_dir" && break
++    done
++    test -z "$as_dirs" || eval "mkdir $as_dirs"
++  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
++
++
++} # as_fn_mkdir_p
++# as_fn_append VAR VALUE
++# ----------------------
++# Append the text in VALUE to the end of the definition contained in VAR. Take
++# advantage of any shell optimizations that allow amortized linear growth over
++# repeated appends, instead of the typical quadratic growth present in naive
++# implementations.
++if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
++  eval 'as_fn_append ()
++  {
++    eval $1+=\$2
++  }'
++else
++  as_fn_append ()
++  {
++    eval $1=\$$1\$2
++  }
++fi # as_fn_append
++
++# as_fn_arith ARG...
++# ------------------
++# Perform arithmetic evaluation on the ARGs, and store the result in the
++# global $as_val. Take advantage of shells that can avoid forks. The arguments
++# must be portable across $(()) and expr.
++if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
++  eval 'as_fn_arith ()
++  {
++    as_val=$(( $* ))
++  }'
++else
++  as_fn_arith ()
++  {
++    as_val=`expr "$@" || test $? -eq 1`
++  }
++fi # as_fn_arith
++
++
++# as_fn_error ERROR [LINENO LOG_FD]
++# ---------------------------------
++# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
++# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
++# script with status $?, using 1 if that was 0.
++as_fn_error ()
++{
++  as_status=$?; test $as_status -eq 0 && as_status=1
++  if test "$3"; then
++    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
++  fi
++  $as_echo "$as_me: error: $1" >&2
++  as_fn_exit $as_status
++} # as_fn_error
++
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++   test "X`expr 00001 : '.*\(...\)'`" = X001; then
++  as_expr=expr
++else
++  as_expr=false
++fi
++
++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
++  as_basename=basename
++else
++  as_basename=false
++fi
++
++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
++  as_dirname=dirname
++else
++  as_dirname=false
++fi
++
++as_me=`$as_basename -- "$0" ||
++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
++       X"$0" : 'X\(//\)$' \| \
++       X"$0" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X/"$0" |
++    sed '/^.*\/\([^/][^/]*\)\/*$/{
++          s//\1/
++          q
++        }
++        /^X\/\(\/\/\)$/{
++          s//\1/
++          q
++        }
++        /^X\/\(\/\).*/{
++          s//\1/
++          q
++        }
++        s/.*/./; q'`
++
++# Avoid depending upon Character Ranges.
++as_cr_letters='abcdefghijklmnopqrstuvwxyz'
++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
++as_cr_Letters=$as_cr_letters$as_cr_LETTERS
++as_cr_digits='0123456789'
++as_cr_alnum=$as_cr_Letters$as_cr_digits
++
++
++  as_lineno_1=$LINENO as_lineno_1a=$LINENO
++  as_lineno_2=$LINENO as_lineno_2a=$LINENO
++  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
++  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
++  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
++  sed -n '
++    p
++    /[$]LINENO/=
++  ' <$as_myself |
++    sed '
++      s/[$]LINENO.*/&-/
++      t lineno
++      b
++      :lineno
++      N
++      :loop
++      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
++      t loop
++      s/-\n.*//
++    ' >$as_me.lineno &&
++  chmod +x "$as_me.lineno" ||
++    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
++
++  # Don't try to exec as it changes $[0], causing all sort of problems
++  # (the dirname of $[0] is not the place where we might find the
++  # original and so on.  Autoconf is especially sensitive to this).
++  . "./$as_me.lineno"
++  # Exit status is that of the last command.
++  exit
++}
++
++ECHO_C= ECHO_N= ECHO_T=
++case `echo -n x` in #(((((
++-n*)
++  case `echo 'xy\c'` in
++  *c*) ECHO_T='       ';;     # ECHO_T is single tab character.
++  xy)  ECHO_C='\c';;
++  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
++       ECHO_T='       ';;
++  esac;;
++*)
++  ECHO_N='-n';;
++esac
++
++rm -f conf$$ conf$$.exe conf$$.file
++if test -d conf$$.dir; then
++  rm -f conf$$.dir/conf$$.file
++else
++  rm -f conf$$.dir
++  mkdir conf$$.dir 2>/dev/null
++fi
++if (echo >conf$$.file) 2>/dev/null; then
++  if ln -s conf$$.file conf$$ 2>/dev/null; then
++    as_ln_s='ln -s'
++    # ... but there are two gotchas:
++    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
++    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
++    # In both cases, we have to default to `cp -p'.
++    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
++      as_ln_s='cp -p'
++  elif ln conf$$.file conf$$ 2>/dev/null; then
++    as_ln_s=ln
++  else
++    as_ln_s='cp -p'
++  fi
++else
++  as_ln_s='cp -p'
++fi
++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
++rmdir conf$$.dir 2>/dev/null
++
++if mkdir -p . 2>/dev/null; then
++  as_mkdir_p='mkdir -p "$as_dir"'
++else
++  test -d ./-p && rmdir ./-p
++  as_mkdir_p=false
++fi
++
++if test -x / >/dev/null 2>&1; then
++  as_test_x='test -x'
++else
++  if ls -dL / >/dev/null 2>&1; then
++    as_ls_L_option=L
++  else
++    as_ls_L_option=
++  fi
++  as_test_x='
++    eval sh -c '\''
++      if test -d "$1"; then
++      test -d "$1/.";
++      else
++      case $1 in #(
++      -*)set "./$1";;
++      esac;
++      case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
++      ???[sx]*):;;*)false;;esac;fi
++    '\'' sh
++  '
++fi
++as_executable_p=$as_test_x
++
++# Sed expression to map a string onto a valid CPP name.
++as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
++
++# Sed expression to map a string onto a valid variable name.
++as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
++
++SHELL=${CONFIG_SHELL-/bin/sh}
++
++
++exec 7<&0 </dev/null 6>&1
++
++# Name of the host.
++# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
++# so uname gets run too.
++ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
++
++#
++# Initializations.
++#
++ac_default_prefix=/usr/local
++ac_clean_files=
++ac_config_libobj_dir=.
++LIBOBJS=
++cross_compiling=no
++subdirs=
++MFLAGS=
++MAKEFLAGS=
++
++# Identity of this package.
++PACKAGE_NAME='package-unused'
++PACKAGE_TARNAME='libbacktrace'
++PACKAGE_VERSION='version-unused'
++PACKAGE_STRING='package-unused version-unused'
++PACKAGE_BUGREPORT=''
++PACKAGE_URL=''
++
++ac_unique_file="backtrace.h"
++# Factoring default headers for most tests.
++ac_includes_default="\
++#include <stdio.h>
++#ifdef HAVE_SYS_TYPES_H
++# include <sys/types.h>
++#endif
++#ifdef HAVE_SYS_STAT_H
++# include <sys/stat.h>
++#endif
++#ifdef STDC_HEADERS
++# include <stdlib.h>
++# include <stddef.h>
++#else
++# ifdef HAVE_STDLIB_H
++#  include <stdlib.h>
++# endif
++#endif
++#ifdef HAVE_STRING_H
++# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
++#  include <memory.h>
++# endif
++# include <string.h>
++#endif
++#ifdef HAVE_STRINGS_H
++# include <strings.h>
++#endif
++#ifdef HAVE_INTTYPES_H
++# include <inttypes.h>
++#endif
++#ifdef HAVE_STDINT_H
++# include <stdint.h>
++#endif
++#ifdef HAVE_UNISTD_H
++# include <unistd.h>
++#endif"
++
++ac_subst_vars='am__EXEEXT_FALSE
++am__EXEEXT_TRUE
++LTLIBOBJS
++LIBOBJS
++NATIVE_FALSE
++NATIVE_TRUE
++BACKTRACE_USES_MALLOC
++ALLOC_FILE
++VIEW_FILE
++BACKTRACE_SUPPORTS_DATA
++BACKTRACE_SUPPORTED
++FORMAT_FILE
++BACKTRACE_SUPPORTS_THREADS
++PIC_FLAG
++WARN_FLAGS
++EXTRA_FLAGS
++BACKTRACE_FILE
++OTOOL64
++OTOOL
++LIPO
++NMEDIT
++DSYMUTIL
++AR
++OBJDUMP
++LN_S
++NM
++ac_ct_DUMPBIN
++DUMPBIN
++LD
++FGREP
++SED
++LIBTOOL
++RANLIB
++MAINT
++MAINTAINER_MODE_FALSE
++MAINTAINER_MODE_TRUE
++am__untar
++am__tar
++AMTAR
++am__leading_dot
++SET_MAKE
++AWK
++mkdir_p
++MKDIR_P
++INSTALL_STRIP_PROGRAM
++STRIP
++install_sh
++MAKEINFO
++AUTOHEADER
++AUTOMAKE
++AUTOCONF
++ACLOCAL
++VERSION
++PACKAGE
++CYGPATH_W
++am__isrc
++INSTALL_DATA
++INSTALL_SCRIPT
++INSTALL_PROGRAM
++libtool_VERSION
++EGREP
++GREP
++CPP
++OBJEXT
++EXEEXT
++ac_ct_CC
++CPPFLAGS
++LDFLAGS
++CFLAGS
++CC
++target_os
++target_vendor
++target_cpu
++target
++host_os
++host_vendor
++host_cpu
++host
++build_os
++build_vendor
++build_cpu
++build
++multi_basedir
++target_alias
++host_alias
++build_alias
++LIBS
++ECHO_T
++ECHO_N
++ECHO_C
++DEFS
++mandir
++localedir
++libdir
++psdir
++pdfdir
++dvidir
++htmldir
++infodir
++docdir
++oldincludedir
++includedir
++localstatedir
++sharedstatedir
++sysconfdir
++datadir
++datarootdir
++libexecdir
++sbindir
++bindir
++program_transform_name
++prefix
++exec_prefix
++PACKAGE_URL
++PACKAGE_BUGREPORT
++PACKAGE_STRING
++PACKAGE_VERSION
++PACKAGE_TARNAME
++PACKAGE_NAME
++PATH_SEPARATOR
++SHELL'
++ac_subst_files=''
++ac_user_opts='
++enable_option_checking
++enable_multilib
++enable_maintainer_mode
++with_target_subdir
++enable_shared
++enable_static
++with_pic
++enable_fast_install
++with_gnu_ld
++enable_libtool_lock
++with_system_libunwind
++enable_host_shared
++'
++      ac_precious_vars='build_alias
++host_alias
++target_alias
++CC
++CFLAGS
++LDFLAGS
++LIBS
++CPPFLAGS
++CPP'
++
++
++# Initialize some variables set by options.
++ac_init_help=
++ac_init_version=false
++ac_unrecognized_opts=
++ac_unrecognized_sep=
++# The variables have the same names as the options, with
++# dashes changed to underlines.
++cache_file=/dev/null
++exec_prefix=NONE
++no_create=
++no_recursion=
++prefix=NONE
++program_prefix=NONE
++program_suffix=NONE
++program_transform_name=s,x,x,
++silent=
++site=
++srcdir=
++verbose=
++x_includes=NONE
++x_libraries=NONE
++
++# Installation directory options.
++# These are left unexpanded so users can "make install exec_prefix=/foo"
++# and all the variables that are supposed to be based on exec_prefix
++# by default will actually change.
++# Use braces instead of parens because sh, perl, etc. also accept them.
++# (The list follows the same order as the GNU Coding Standards.)
++bindir='${exec_prefix}/bin'
++sbindir='${exec_prefix}/sbin'
++libexecdir='${exec_prefix}/libexec'
++datarootdir='${prefix}/share'
++datadir='${datarootdir}'
++sysconfdir='${prefix}/etc'
++sharedstatedir='${prefix}/com'
++localstatedir='${prefix}/var'
++includedir='${prefix}/include'
++oldincludedir='/usr/include'
++docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
++infodir='${datarootdir}/info'
++htmldir='${docdir}'
++dvidir='${docdir}'
++pdfdir='${docdir}'
++psdir='${docdir}'
++libdir='${exec_prefix}/lib'
++localedir='${datarootdir}/locale'
++mandir='${datarootdir}/man'
++
++ac_prev=
++ac_dashdash=
++for ac_option
++do
++  # If the previous option needs an argument, assign it.
++  if test -n "$ac_prev"; then
++    eval $ac_prev=\$ac_option
++    ac_prev=
++    continue
++  fi
++
++  case $ac_option in
++  *=*)        ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
++  *)  ac_optarg=yes ;;
++  esac
++
++  # Accept the important Cygnus configure options, so we can diagnose typos.
++
++  case $ac_dashdash$ac_option in
++  --)
++    ac_dashdash=yes ;;
++
++  -bindir | --bindir | --bindi | --bind | --bin | --bi)
++    ac_prev=bindir ;;
++  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
++    bindir=$ac_optarg ;;
++
++  -build | --build | --buil | --bui | --bu)
++    ac_prev=build_alias ;;
++  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
++    build_alias=$ac_optarg ;;
++
++  -cache-file | --cache-file | --cache-fil | --cache-fi \
++  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
++    ac_prev=cache_file ;;
++  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
++  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
++    cache_file=$ac_optarg ;;
++
++  --config-cache | -C)
++    cache_file=config.cache ;;
++
++  -datadir | --datadir | --datadi | --datad)
++    ac_prev=datadir ;;
++  -datadir=* | --datadir=* | --datadi=* | --datad=*)
++    datadir=$ac_optarg ;;
++
++  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
++  | --dataroo | --dataro | --datar)
++    ac_prev=datarootdir ;;
++  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
++  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
++    datarootdir=$ac_optarg ;;
++
++  -disable-* | --disable-*)
++    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
++    # Reject names that are not valid shell variable names.
++    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
++      as_fn_error "invalid feature name: $ac_useropt"
++    ac_useropt_orig=$ac_useropt
++    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++    case $ac_user_opts in
++      *"
++"enable_$ac_useropt"
++"*) ;;
++      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
++       ac_unrecognized_sep=', ';;
++    esac
++    eval enable_$ac_useropt=no ;;
++
++  -docdir | --docdir | --docdi | --doc | --do)
++    ac_prev=docdir ;;
++  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
++    docdir=$ac_optarg ;;
++
++  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
++    ac_prev=dvidir ;;
++  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
++    dvidir=$ac_optarg ;;
++
++  -enable-* | --enable-*)
++    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
++    # Reject names that are not valid shell variable names.
++    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
++      as_fn_error "invalid feature name: $ac_useropt"
++    ac_useropt_orig=$ac_useropt
++    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++    case $ac_user_opts in
++      *"
++"enable_$ac_useropt"
++"*) ;;
++      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
++       ac_unrecognized_sep=', ';;
++    esac
++    eval enable_$ac_useropt=\$ac_optarg ;;
++
++  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
++  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
++  | --exec | --exe | --ex)
++    ac_prev=exec_prefix ;;
++  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
++  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
++  | --exec=* | --exe=* | --ex=*)
++    exec_prefix=$ac_optarg ;;
++
++  -gas | --gas | --ga | --g)
++    # Obsolete; use --with-gas.
++    with_gas=yes ;;
++
++  -help | --help | --hel | --he | -h)
++    ac_init_help=long ;;
++  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
++    ac_init_help=recursive ;;
++  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
++    ac_init_help=short ;;
++
++  -host | --host | --hos | --ho)
++    ac_prev=host_alias ;;
++  -host=* | --host=* | --hos=* | --ho=*)
++    host_alias=$ac_optarg ;;
++
++  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
++    ac_prev=htmldir ;;
++  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
++  | --ht=*)
++    htmldir=$ac_optarg ;;
++
++  -includedir | --includedir | --includedi | --included | --include \
++  | --includ | --inclu | --incl | --inc)
++    ac_prev=includedir ;;
++  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
++  | --includ=* | --inclu=* | --incl=* | --inc=*)
++    includedir=$ac_optarg ;;
++
++  -infodir | --infodir | --infodi | --infod | --info | --inf)
++    ac_prev=infodir ;;
++  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
++    infodir=$ac_optarg ;;
++
++  -libdir | --libdir | --libdi | --libd)
++    ac_prev=libdir ;;
++  -libdir=* | --libdir=* | --libdi=* | --libd=*)
++    libdir=$ac_optarg ;;
++
++  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
++  | --libexe | --libex | --libe)
++    ac_prev=libexecdir ;;
++  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
++  | --libexe=* | --libex=* | --libe=*)
++    libexecdir=$ac_optarg ;;
++
++  -localedir | --localedir | --localedi | --localed | --locale)
++    ac_prev=localedir ;;
++  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
++    localedir=$ac_optarg ;;
++
++  -localstatedir | --localstatedir | --localstatedi | --localstated \
++  | --localstate | --localstat | --localsta | --localst | --locals)
++    ac_prev=localstatedir ;;
++  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
++  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
++    localstatedir=$ac_optarg ;;
++
++  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
++    ac_prev=mandir ;;
++  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
++    mandir=$ac_optarg ;;
++
++  -nfp | --nfp | --nf)
++    # Obsolete; use --without-fp.
++    with_fp=no ;;
++
++  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
++  | --no-cr | --no-c | -n)
++    no_create=yes ;;
++
++  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
++  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
++    no_recursion=yes ;;
++
++  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
++  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
++  | --oldin | --oldi | --old | --ol | --o)
++    ac_prev=oldincludedir ;;
++  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
++  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
++  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
++    oldincludedir=$ac_optarg ;;
++
++  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
++    ac_prev=prefix ;;
++  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
++    prefix=$ac_optarg ;;
++
++  -program-prefix | --program-prefix | --program-prefi | --program-pref \
++  | --program-pre | --program-pr | --program-p)
++    ac_prev=program_prefix ;;
++  -program-prefix=* | --program-prefix=* | --program-prefi=* \
++  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
++    program_prefix=$ac_optarg ;;
++
++  -program-suffix | --program-suffix | --program-suffi | --program-suff \
++  | --program-suf | --program-su | --program-s)
++    ac_prev=program_suffix ;;
++  -program-suffix=* | --program-suffix=* | --program-suffi=* \
++  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
++    program_suffix=$ac_optarg ;;
++
++  -program-transform-name | --program-transform-name \
++  | --program-transform-nam | --program-transform-na \
++  | --program-transform-n | --program-transform- \
++  | --program-transform | --program-transfor \
++  | --program-transfo | --program-transf \
++  | --program-trans | --program-tran \
++  | --progr-tra | --program-tr | --program-t)
++    ac_prev=program_transform_name ;;
++  -program-transform-name=* | --program-transform-name=* \
++  | --program-transform-nam=* | --program-transform-na=* \
++  | --program-transform-n=* | --program-transform-=* \
++  | --program-transform=* | --program-transfor=* \
++  | --program-transfo=* | --program-transf=* \
++  | --program-trans=* | --program-tran=* \
++  | --progr-tra=* | --program-tr=* | --program-t=*)
++    program_transform_name=$ac_optarg ;;
++
++  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
++    ac_prev=pdfdir ;;
++  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
++    pdfdir=$ac_optarg ;;
++
++  -psdir | --psdir | --psdi | --psd | --ps)
++    ac_prev=psdir ;;
++  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
++    psdir=$ac_optarg ;;
++
++  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
++  | -silent | --silent | --silen | --sile | --sil)
++    silent=yes ;;
++
++  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
++    ac_prev=sbindir ;;
++  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
++  | --sbi=* | --sb=*)
++    sbindir=$ac_optarg ;;
++
++  -sharedstatedir | --sharedstatedir | --sharedstatedi \
++  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
++  | --sharedst | --shareds | --shared | --share | --shar \
++  | --sha | --sh)
++    ac_prev=sharedstatedir ;;
++  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
++  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
++  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
++  | --sha=* | --sh=*)
++    sharedstatedir=$ac_optarg ;;
++
++  -site | --site | --sit)
++    ac_prev=site ;;
++  -site=* | --site=* | --sit=*)
++    site=$ac_optarg ;;
++
++  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
++    ac_prev=srcdir ;;
++  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
++    srcdir=$ac_optarg ;;
++
++  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
++  | --syscon | --sysco | --sysc | --sys | --sy)
++    ac_prev=sysconfdir ;;
++  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
++  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
++    sysconfdir=$ac_optarg ;;
++
++  -target | --target | --targe | --targ | --tar | --ta | --t)
++    ac_prev=target_alias ;;
++  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
++    target_alias=$ac_optarg ;;
++
++  -v | -verbose | --verbose | --verbos | --verbo | --verb)
++    verbose=yes ;;
++
++  -version | --version | --versio | --versi | --vers | -V)
++    ac_init_version=: ;;
++
++  -with-* | --with-*)
++    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
++    # Reject names that are not valid shell variable names.
++    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
++      as_fn_error "invalid package name: $ac_useropt"
++    ac_useropt_orig=$ac_useropt
++    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++    case $ac_user_opts in
++      *"
++"with_$ac_useropt"
++"*) ;;
++      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
++       ac_unrecognized_sep=', ';;
++    esac
++    eval with_$ac_useropt=\$ac_optarg ;;
++
++  -without-* | --without-*)
++    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
++    # Reject names that are not valid shell variable names.
++    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
++      as_fn_error "invalid package name: $ac_useropt"
++    ac_useropt_orig=$ac_useropt
++    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++    case $ac_user_opts in
++      *"
++"with_$ac_useropt"
++"*) ;;
++      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
++       ac_unrecognized_sep=', ';;
++    esac
++    eval with_$ac_useropt=no ;;
++
++  --x)
++    # Obsolete; use --with-x.
++    with_x=yes ;;
++
++  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
++  | --x-incl | --x-inc | --x-in | --x-i)
++    ac_prev=x_includes ;;
++  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
++  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
++    x_includes=$ac_optarg ;;
++
++  -x-libraries | --x-libraries | --x-librarie | --x-librari \
++  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
++    ac_prev=x_libraries ;;
++  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
++  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
++    x_libraries=$ac_optarg ;;
++
++  -*) as_fn_error "unrecognized option: \`$ac_option'
++Try \`$0 --help' for more information."
++    ;;
++
++  *=*)
++    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
++    # Reject names that are not valid shell variable names.
++    case $ac_envvar in #(
++      '' | [0-9]* | *[!_$as_cr_alnum]* )
++      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
++    esac
++    eval $ac_envvar=\$ac_optarg
++    export $ac_envvar ;;
++
++  *)
++    # FIXME: should be removed in autoconf 3.0.
++    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
++    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
++      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
++    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
++    ;;
++
++  esac
++done
++
++if test -n "$ac_prev"; then
++  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
++  as_fn_error "missing argument to $ac_option"
++fi
++
++if test -n "$ac_unrecognized_opts"; then
++  case $enable_option_checking in
++    no) ;;
++    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
++    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
++  esac
++fi
++
++# Check all directory arguments for consistency.
++for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
++              datadir sysconfdir sharedstatedir localstatedir includedir \
++              oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
++              libdir localedir mandir
++do
++  eval ac_val=\$$ac_var
++  # Remove trailing slashes.
++  case $ac_val in
++    */ )
++      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
++      eval $ac_var=\$ac_val;;
++  esac
++  # Be sure to have absolute directory names.
++  case $ac_val in
++    [\\/$]* | ?:[\\/]* )  continue;;
++    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
++  esac
++  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
++done
++
++# There might be people who depend on the old broken behavior: `$host'
++# used to hold the argument of --host etc.
++# FIXME: To remove some day.
++build=$build_alias
++host=$host_alias
++target=$target_alias
++
++# FIXME: To remove some day.
++if test "x$host_alias" != x; then
++  if test "x$build_alias" = x; then
++    cross_compiling=maybe
++    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
++    If a cross compiler is detected then cross compile mode will be used." >&2
++  elif test "x$build_alias" != "x$host_alias"; then
++    cross_compiling=yes
++  fi
++fi
++
++ac_tool_prefix=
++test -n "$host_alias" && ac_tool_prefix=$host_alias-
++
++test "$silent" = yes && exec 6>/dev/null
++
++
++ac_pwd=`pwd` && test -n "$ac_pwd" &&
++ac_ls_di=`ls -di .` &&
++ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
++  as_fn_error "working directory cannot be determined"
++test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
++  as_fn_error "pwd does not report name of working directory"
++
++
++# Find the source files, if location was not specified.
++if test -z "$srcdir"; then
++  ac_srcdir_defaulted=yes
++  # Try the directory containing this script, then the parent directory.
++  ac_confdir=`$as_dirname -- "$as_myself" ||
++$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++       X"$as_myself" : 'X\(//\)[^/]' \| \
++       X"$as_myself" : 'X\(//\)$' \| \
++       X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X"$as_myself" |
++    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++          s//\1/
++          q
++        }
++        /^X\(\/\/\)[^/].*/{
++          s//\1/
++          q
++        }
++        /^X\(\/\/\)$/{
++          s//\1/
++          q
++        }
++        /^X\(\/\).*/{
++          s//\1/
++          q
++        }
++        s/.*/./; q'`
++  srcdir=$ac_confdir
++  if test ! -r "$srcdir/$ac_unique_file"; then
++    srcdir=..
++  fi
++else
++  ac_srcdir_defaulted=no
++fi
++if test ! -r "$srcdir/$ac_unique_file"; then
++  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
++  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
++fi
++ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
++ac_abs_confdir=`(
++      cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
++      pwd)`
++# When building in place, set srcdir=.
++if test "$ac_abs_confdir" = "$ac_pwd"; then
++  srcdir=.
++fi
++# Remove unnecessary trailing slashes from srcdir.
++# Double slashes in file names in object file debugging info
++# mess up M-x gdb in Emacs.
++case $srcdir in
++*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
++esac
++for ac_var in $ac_precious_vars; do
++  eval ac_env_${ac_var}_set=\${${ac_var}+set}
++  eval ac_env_${ac_var}_value=\$${ac_var}
++  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
++  eval ac_cv_env_${ac_var}_value=\$${ac_var}
++done
++
++#
++# Report the --help message.
++#
++if test "$ac_init_help" = "long"; then
++  # Omit some internal or obsolete options to make the list less imposing.
++  # This message is too long to be a string in the A/UX 3.1 sh.
++  cat <<_ACEOF
++\`configure' configures package-unused version-unused to adapt to many kinds of systems.
++
++Usage: $0 [OPTION]... [VAR=VALUE]...
++
++To assign environment variables (e.g., CC, CFLAGS...), specify them as
++VAR=VALUE.  See below for descriptions of some of the useful variables.
++
++Defaults for the options are specified in brackets.
++
++Configuration:
++  -h, --help              display this help and exit
++      --help=short        display options specific to this package
++      --help=recursive    display the short help of all the included packages
++  -V, --version           display version information and exit
++  -q, --quiet, --silent   do not print \`checking...' messages
++      --cache-file=FILE   cache test results in FILE [disabled]
++  -C, --config-cache      alias for \`--cache-file=config.cache'
++  -n, --no-create         do not create output files
++      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
++
++Installation directories:
++  --prefix=PREFIX         install architecture-independent files in PREFIX
++                          [$ac_default_prefix]
++  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
++                          [PREFIX]
++
++By default, \`make install' will install all the files in
++\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
++an installation prefix other than \`$ac_default_prefix' using \`--prefix',
++for instance \`--prefix=\$HOME'.
++
++For better control, use the options below.
++
++Fine tuning of the installation directories:
++  --bindir=DIR            user executables [EPREFIX/bin]
++  --sbindir=DIR           system admin executables [EPREFIX/sbin]
++  --libexecdir=DIR        program executables [EPREFIX/libexec]
++  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
++  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
++  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
++  --libdir=DIR            object code libraries [EPREFIX/lib]
++  --includedir=DIR        C header files [PREFIX/include]
++  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
++  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
++  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
++  --infodir=DIR           info documentation [DATAROOTDIR/info]
++  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
++  --mandir=DIR            man documentation [DATAROOTDIR/man]
++  --docdir=DIR            documentation root [DATAROOTDIR/doc/libbacktrace]
++  --htmldir=DIR           html documentation [DOCDIR]
++  --dvidir=DIR            dvi documentation [DOCDIR]
++  --pdfdir=DIR            pdf documentation [DOCDIR]
++  --psdir=DIR             ps documentation [DOCDIR]
++_ACEOF
++
++  cat <<\_ACEOF
++
++Program names:
++  --program-prefix=PREFIX            prepend PREFIX to installed program names
++  --program-suffix=SUFFIX            append SUFFIX to installed program names
++  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
++
++System types:
++  --build=BUILD     configure for building on BUILD [guessed]
++  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
++  --target=TARGET   configure for building compilers for TARGET [HOST]
++_ACEOF
++fi
++
++if test -n "$ac_init_help"; then
++  case $ac_init_help in
++     short | recursive ) echo "Configuration of package-unused version-unused:";;
++   esac
++  cat <<\_ACEOF
++
++Optional Features:
++  --disable-option-checking  ignore unrecognized --enable/--with options
++  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
++  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
++  --enable-multilib       build many library versions (default)
++  --enable-maintainer-mode  enable make rules and dependencies not useful
++                        (and sometimes confusing) to the casual installer
++  --enable-shared[=PKGS]  build shared libraries [default=yes]
++  --enable-static[=PKGS]  build static libraries [default=yes]
++  --enable-fast-install[=PKGS]
++                          optimize for fast installation [default=yes]
++  --disable-libtool-lock  avoid locking (might break parallel builds)
++  --enable-host-shared    build host code as shared libraries
++
++Optional Packages:
++  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
++  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
++  --with-target-subdir=SUBDIR      Configuring in a subdirectory for target
++  --with-pic              try to use only PIC/non-PIC objects [default=use
++                          both]
++  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
++  --with-system-libunwind use installed libunwind
++
++Some influential environment variables:
++  CC          C compiler command
++  CFLAGS      C compiler flags
++  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
++              nonstandard directory <lib dir>
++  LIBS        libraries to pass to the linker, e.g. -l<library>
++  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
++              you have headers in a nonstandard directory <include dir>
++  CPP         C preprocessor
++
++Use these variables to override the choices made by `configure' or to help
++it to find libraries and programs with nonstandard names/locations.
++
++Report bugs to the package provider.
++_ACEOF
++ac_status=$?
++fi
++
++if test "$ac_init_help" = "recursive"; then
++  # If there are subdirs, report their specific --help.
++  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
++    test -d "$ac_dir" ||
++      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
++      continue
++    ac_builddir=.
++
++case "$ac_dir" in
++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
++*)
++  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
++  # A ".." for each directory in $ac_dir_suffix.
++  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
++  case $ac_top_builddir_sub in
++  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
++  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
++  esac ;;
++esac
++ac_abs_top_builddir=$ac_pwd
++ac_abs_builddir=$ac_pwd$ac_dir_suffix
++# for backward compatibility:
++ac_top_builddir=$ac_top_build_prefix
++
++case $srcdir in
++  .)  # We are building in place.
++    ac_srcdir=.
++    ac_top_srcdir=$ac_top_builddir_sub
++    ac_abs_top_srcdir=$ac_pwd ;;
++  [\\/]* | ?:[\\/]* )  # Absolute name.
++    ac_srcdir=$srcdir$ac_dir_suffix;
++    ac_top_srcdir=$srcdir
++    ac_abs_top_srcdir=$srcdir ;;
++  *) # Relative name.
++    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
++    ac_top_srcdir=$ac_top_build_prefix$srcdir
++    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
++esac
++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
++
++    cd "$ac_dir" || { ac_status=$?; continue; }
++    # Check for guested configure.
++    if test -f "$ac_srcdir/configure.gnu"; then
++      echo &&
++      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
++    elif test -f "$ac_srcdir/configure"; then
++      echo &&
++      $SHELL "$ac_srcdir/configure" --help=recursive
++    else
++      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
++    fi || ac_status=$?
++    cd "$ac_pwd" || { ac_status=$?; break; }
++  done
++fi
++
++test -n "$ac_init_help" && exit $ac_status
++if $ac_init_version; then
++  cat <<\_ACEOF
++package-unused configure version-unused
++generated by GNU Autoconf 2.64
++
++Copyright (C) 2009 Free Software Foundation, Inc.
++This configure script is free software; the Free Software Foundation
++gives unlimited permission to copy, distribute and modify it.
++_ACEOF
++  exit
++fi
++
++## ------------------------ ##
++## Autoconf initialization. ##
++## ------------------------ ##
++
++# ac_fn_c_try_compile LINENO
++# --------------------------
++# Try to compile conftest.$ac_ext, and return whether this succeeded.
++ac_fn_c_try_compile ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  rm -f conftest.$ac_objext
++  if { { ac_try="$ac_compile"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_compile") 2>conftest.err
++  ac_status=$?
++  if test -s conftest.err; then
++    grep -v '^ *+' conftest.err >conftest.er1
++    cat conftest.er1 >&5
++    mv -f conftest.er1 conftest.err
++  fi
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then :
++  ac_retval=0
++else
++  $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++      ac_retval=1
++fi
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++  return $ac_retval
++
++} # ac_fn_c_try_compile
++
++# ac_fn_c_try_cpp LINENO
++# ----------------------
++# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
++ac_fn_c_try_cpp ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  if { { ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
++  ac_status=$?
++  if test -s conftest.err; then
++    grep -v '^ *+' conftest.err >conftest.er1
++    cat conftest.er1 >&5
++    mv -f conftest.er1 conftest.err
++  fi
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } >/dev/null && {
++       test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       }; then :
++  ac_retval=0
++else
++  $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++    ac_retval=1
++fi
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++  return $ac_retval
++
++} # ac_fn_c_try_cpp
++
++# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
++# -------------------------------------------------------
++# Tests whether HEADER exists, giving a warning if it cannot be compiled using
++# the include files in INCLUDES and setting the cache variable VAR
++# accordingly.
++ac_fn_c_check_header_mongrel ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
++$as_echo_n "checking for $2... " >&6; }
++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++fi
++eval ac_res=\$$3
++             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++else
++  # Is the header compilable?
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
++$as_echo_n "checking $2 usability... " >&6; }
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++#include <$2>
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_header_compiler=yes
++else
++  ac_header_compiler=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
++$as_echo "$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
++$as_echo_n "checking $2 presence... " >&6; }
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <$2>
++_ACEOF
++if ac_fn_c_try_cpp "$LINENO"; then :
++  ac_header_preproc=yes
++else
++  ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
++$as_echo "$ac_header_preproc" >&6; }
++
++# So?  What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
++  yes:no: )
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
++$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
++$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
++    ;;
++  no:yes:* )
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
++$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
++$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
++$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
++$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
++$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
++    ;;
++esac
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
++$as_echo_n "checking for $2... " >&6; }
++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++else
++  eval "$3=\$ac_header_compiler"
++fi
++eval ac_res=\$$3
++             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++fi
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++
++} # ac_fn_c_check_header_mongrel
++
++# ac_fn_c_try_run LINENO
++# ----------------------
++# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
++# that executables *can* be run.
++ac_fn_c_try_run ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  if { { ac_try="$ac_link"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_link") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
++  { { case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_try") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; }; then :
++  ac_retval=0
++else
++  $as_echo "$as_me: program exited with status $ac_status" >&5
++       $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++       ac_retval=$ac_status
++fi
++  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++  return $ac_retval
++
++} # ac_fn_c_try_run
++
++# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
++# -------------------------------------------------------
++# Tests whether HEADER exists and can be compiled using the include files in
++# INCLUDES, setting the cache variable VAR accordingly.
++ac_fn_c_check_header_compile ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
++$as_echo_n "checking for $2... " >&6; }
++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++#include <$2>
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "$3=yes"
++else
++  eval "$3=no"
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++eval ac_res=\$$3
++             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++
++} # ac_fn_c_check_header_compile
++
++# ac_fn_c_try_link LINENO
++# -----------------------
++# Try to link conftest.$ac_ext, and return whether this succeeded.
++ac_fn_c_try_link ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  rm -f conftest.$ac_objext conftest$ac_exeext
++  if { { ac_try="$ac_link"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_link") 2>conftest.err
++  ac_status=$?
++  if test -s conftest.err; then
++    grep -v '^ *+' conftest.err >conftest.er1
++    cat conftest.er1 >&5
++    mv -f conftest.er1 conftest.err
++  fi
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext && {
++       test "$cross_compiling" = yes ||
++       $as_test_x conftest$ac_exeext
++       }; then :
++  ac_retval=0
++else
++  $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++      ac_retval=1
++fi
++  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
++  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
++  # interfere with the next link command; also delete a directory that is
++  # left behind by Apple's compiler.  We do this before executing the actions.
++  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++  return $ac_retval
++
++} # ac_fn_c_try_link
++
++# ac_fn_c_check_func LINENO FUNC VAR
++# ----------------------------------
++# Tests whether FUNC exists, setting the cache variable VAR accordingly
++ac_fn_c_check_func ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
++$as_echo_n "checking for $2... " >&6; }
++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
++   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
++#define $2 innocuous_$2
++
++/* System header to define __stub macros and hopefully few prototypes,
++    which can conflict with char $2 (); below.
++    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++    <limits.h> exists even on freestanding compilers.  */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $2
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $2 ();
++/* The GNU C library defines this for functions which it implements
++    to always fail with ENOSYS.  Some functions are actually named
++    something starting with __ and the normal name is an alias.  */
++#if defined __stub_$2 || defined __stub___$2
++choke me
++#endif
++
++int
++main ()
++{
++return $2 ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  eval "$3=yes"
++else
++  eval "$3=no"
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++fi
++eval ac_res=\$$3
++             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++
++} # ac_fn_c_check_func
++
++# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
++# -------------------------------------------
++# Tests whether TYPE exists after having included INCLUDES, setting cache
++# variable VAR accordingly.
++ac_fn_c_check_type ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
++$as_echo_n "checking for $2... " >&6; }
++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++else
++  eval "$3=no"
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++if (sizeof ($2))
++       return 0;
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++if (sizeof (($2)))
++          return 0;
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++
++else
++  eval "$3=yes"
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++eval ac_res=\$$3
++             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++
++} # ac_fn_c_check_type
++
++# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
++# --------------------------------------------
++# Tries to find the compile-time value of EXPR in a program that includes
++# INCLUDES, setting VAR accordingly. Returns whether the value could be
++# computed
++ac_fn_c_compute_int ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  if test "$cross_compiling" = yes; then
++    # Depending upon the size, compute the lo and hi bounds.
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) >= 0)];
++test_array [0] = 0
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_lo=0 ac_mid=0
++  while :; do
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) <= $ac_mid)];
++test_array [0] = 0
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_hi=$ac_mid; break
++else
++  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
++                      if test $ac_lo -le $ac_mid; then
++                        ac_lo= ac_hi=
++                        break
++                      fi
++                      as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  done
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) < 0)];
++test_array [0] = 0
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_hi=-1 ac_mid=-1
++  while :; do
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) >= $ac_mid)];
++test_array [0] = 0
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_lo=$ac_mid; break
++else
++  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
++                      if test $ac_mid -le $ac_hi; then
++                        ac_lo= ac_hi=
++                        break
++                      fi
++                      as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  done
++else
++  ac_lo= ac_hi=
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++# Binary search between lo and hi bounds.
++while test "x$ac_lo" != "x$ac_hi"; do
++  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) <= $ac_mid)];
++test_array [0] = 0
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_hi=$ac_mid
++else
++  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++done
++case $ac_lo in #((
++?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
++'') ac_retval=1 ;;
++esac
++  else
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++static long int longval () { return $2; }
++static unsigned long int ulongval () { return $2; }
++#include <stdio.h>
++#include <stdlib.h>
++int
++main ()
++{
++
++  FILE *f = fopen ("conftest.val", "w");
++  if (! f)
++    return 1;
++  if (($2) < 0)
++    {
++      long int i = longval ();
++      if (i != ($2))
++      return 1;
++      fprintf (f, "%ld", i);
++    }
++  else
++    {
++      unsigned long int i = ulongval ();
++      if (i != ($2))
++      return 1;
++      fprintf (f, "%lu", i);
++    }
++  /* Do not output a trailing newline, as this causes \r\n confusion
++     on some platforms.  */
++  return ferror (f) || fclose (f) != 0;
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
++else
++  ac_retval=1
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++rm -f conftest.val
++
++  fi
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++  return $ac_retval
++
++} # ac_fn_c_compute_int
++
++# ac_fn_c_check_decl LINENO SYMBOL VAR
++# ------------------------------------
++# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
++ac_fn_c_check_decl ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  as_decl_name=`echo $2|sed 's/ *(.*//'`
++  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
++$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++#ifndef $as_decl_name
++#ifdef __cplusplus
++  (void) $as_decl_use;
++#else
++  (void) $as_decl_name;
++#endif
++#endif
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "$3=yes"
++else
++  eval "$3=no"
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++eval ac_res=\$$3
++             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++
++} # ac_fn_c_check_decl
++cat >config.log <<_ACEOF
++This file contains any messages produced by compilers while
++running configure, to aid debugging if configure makes a mistake.
++
++It was created by package-unused $as_me version-unused, which was
++generated by GNU Autoconf 2.64.  Invocation command line was
++
++  $ $0 $@
++
++_ACEOF
++exec 5>>config.log
++{
++cat <<_ASUNAME
++## --------- ##
++## Platform. ##
++## --------- ##
++
++hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
++uname -m = `(uname -m) 2>/dev/null || echo unknown`
++uname -r = `(uname -r) 2>/dev/null || echo unknown`
++uname -s = `(uname -s) 2>/dev/null || echo unknown`
++uname -v = `(uname -v) 2>/dev/null || echo unknown`
++
++/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
++/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
++
++/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
++/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
++/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
++/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
++/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
++/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
++/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
++
++_ASUNAME
++
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    $as_echo "PATH: $as_dir"
++  done
++IFS=$as_save_IFS
++
++} >&5
++
++cat >&5 <<_ACEOF
++
++
++## ----------- ##
++## Core tests. ##
++## ----------- ##
++
++_ACEOF
++
++
++# Keep a trace of the command line.
++# Strip out --no-create and --no-recursion so they do not pile up.
++# Strip out --silent because we don't want to record it for future runs.
++# Also quote any args containing shell meta-characters.
++# Make two passes to allow for proper duplicate-argument suppression.
++ac_configure_args=
++ac_configure_args0=
++ac_configure_args1=
++ac_must_keep_next=false
++for ac_pass in 1 2
++do
++  for ac_arg
++  do
++    case $ac_arg in
++    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
++    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
++    | -silent | --silent | --silen | --sile | --sil)
++      continue ;;
++    *\'*)
++      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
++    esac
++    case $ac_pass in
++    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
++    2)
++      as_fn_append ac_configure_args1 " '$ac_arg'"
++      if test $ac_must_keep_next = true; then
++      ac_must_keep_next=false # Got value, back to normal.
++      else
++      case $ac_arg in
++        *=* | --config-cache | -C | -disable-* | --disable-* \
++        | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
++        | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
++        | -with-* | --with-* | -without-* | --without-* | --x)
++          case "$ac_configure_args0 " in
++            "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
++          esac
++          ;;
++        -* ) ac_must_keep_next=true ;;
++      esac
++      fi
++      as_fn_append ac_configure_args " '$ac_arg'"
++      ;;
++    esac
++  done
++done
++{ ac_configure_args0=; unset ac_configure_args0;}
++{ ac_configure_args1=; unset ac_configure_args1;}
++
++# When interrupted or exit'd, cleanup temporary files, and complete
++# config.log.  We remove comments because anyway the quotes in there
++# would cause problems or look ugly.
++# WARNING: Use '\'' to represent an apostrophe within the trap.
++# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
++trap 'exit_status=$?
++  # Save into config.log some information that might help in debugging.
++  {
++    echo
++
++    cat <<\_ASBOX
++## ---------------- ##
++## Cache variables. ##
++## ---------------- ##
++_ASBOX
++    echo
++    # The following way of writing the cache mishandles newlines in values,
++(
++  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
++    eval ac_val=\$$ac_var
++    case $ac_val in #(
++    *${as_nl}*)
++      case $ac_var in #(
++      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
++$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
++      esac
++      case $ac_var in #(
++      _ | IFS | as_nl) ;; #(
++      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
++      *) { eval $ac_var=; unset $ac_var;} ;;
++      esac ;;
++    esac
++  done
++  (set) 2>&1 |
++    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
++    *${as_nl}ac_space=\ *)
++      sed -n \
++      "s/'\''/'\''\\\\'\'''\''/g;
++        s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
++      ;; #(
++    *)
++      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
++      ;;
++    esac |
++    sort
++)
++    echo
++
++    cat <<\_ASBOX
++## ----------------- ##
++## Output variables. ##
++## ----------------- ##
++_ASBOX
++    echo
++    for ac_var in $ac_subst_vars
++    do
++      eval ac_val=\$$ac_var
++      case $ac_val in
++      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++      esac
++      $as_echo "$ac_var='\''$ac_val'\''"
++    done | sort
++    echo
++
++    if test -n "$ac_subst_files"; then
++      cat <<\_ASBOX
++## ------------------- ##
++## File substitutions. ##
++## ------------------- ##
++_ASBOX
++      echo
++      for ac_var in $ac_subst_files
++      do
++      eval ac_val=\$$ac_var
++      case $ac_val in
++      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++      esac
++      $as_echo "$ac_var='\''$ac_val'\''"
++      done | sort
++      echo
++    fi
++
++    if test -s confdefs.h; then
++      cat <<\_ASBOX
++## ----------- ##
++## confdefs.h. ##
++## ----------- ##
++_ASBOX
++      echo
++      cat confdefs.h
++      echo
++    fi
++    test "$ac_signal" != 0 &&
++      $as_echo "$as_me: caught signal $ac_signal"
++    $as_echo "$as_me: exit $exit_status"
++  } >&5
++  rm -f core *.core core.conftest.* &&
++    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
++    exit $exit_status
++' 0
++for ac_signal in 1 2 13 15; do
++  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
++done
++ac_signal=0
++
++# confdefs.h avoids OS command line length limits that DEFS can exceed.
++rm -f -r conftest* confdefs.h
++
++$as_echo "/* confdefs.h */" > confdefs.h
++
++# Predefined preprocessor variables.
++
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_NAME "$PACKAGE_NAME"
++_ACEOF
++
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
++_ACEOF
++
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_VERSION "$PACKAGE_VERSION"
++_ACEOF
++
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_STRING "$PACKAGE_STRING"
++_ACEOF
++
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
++_ACEOF
++
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_URL "$PACKAGE_URL"
++_ACEOF
++
++
++# Let the site file select an alternate cache file if it wants to.
++# Prefer an explicitly selected file to automatically selected ones.
++ac_site_file1=NONE
++ac_site_file2=NONE
++if test -n "$CONFIG_SITE"; then
++  ac_site_file1=$CONFIG_SITE
++elif test "x$prefix" != xNONE; then
++  ac_site_file1=$prefix/share/config.site
++  ac_site_file2=$prefix/etc/config.site
++else
++  ac_site_file1=$ac_default_prefix/share/config.site
++  ac_site_file2=$ac_default_prefix/etc/config.site
++fi
++for ac_site_file in "$ac_site_file1" "$ac_site_file2"
++do
++  test "x$ac_site_file" = xNONE && continue
++  if test -r "$ac_site_file"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
++$as_echo "$as_me: loading site script $ac_site_file" >&6;}
++    sed 's/^/| /' "$ac_site_file" >&5
++    . "$ac_site_file"
++  fi
++done
++
++if test -r "$cache_file"; then
++  # Some versions of bash will fail to source /dev/null (special
++  # files actually), so we avoid doing that.
++  if test -f "$cache_file"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
++$as_echo "$as_me: loading cache $cache_file" >&6;}
++    case $cache_file in
++      [\\/]* | ?:[\\/]* ) . "$cache_file";;
++      *)                      . "./$cache_file";;
++    esac
++  fi
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
++$as_echo "$as_me: creating cache $cache_file" >&6;}
++  >$cache_file
++fi
++
++# Check that the precious variables saved in the cache have kept the same
++# value.
++ac_cache_corrupted=false
++for ac_var in $ac_precious_vars; do
++  eval ac_old_set=\$ac_cv_env_${ac_var}_set
++  eval ac_new_set=\$ac_env_${ac_var}_set
++  eval ac_old_val=\$ac_cv_env_${ac_var}_value
++  eval ac_new_val=\$ac_env_${ac_var}_value
++  case $ac_old_set,$ac_new_set in
++    set,)
++      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
++$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
++      ac_cache_corrupted=: ;;
++    ,set)
++      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
++$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
++      ac_cache_corrupted=: ;;
++    ,);;
++    *)
++      if test "x$ac_old_val" != "x$ac_new_val"; then
++      # differences in whitespace do not lead to failure.
++      ac_old_val_w=`echo x $ac_old_val`
++      ac_new_val_w=`echo x $ac_new_val`
++      if test "$ac_old_val_w" != "$ac_new_val_w"; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
++$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
++        ac_cache_corrupted=:
++      else
++        { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
++$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
++        eval $ac_var=\$ac_old_val
++      fi
++      { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
++$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
++      { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
++$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
++      fi;;
++  esac
++  # Pass precious variables to config.status.
++  if test "$ac_new_set" = set; then
++    case $ac_new_val in
++    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
++    *) ac_arg=$ac_var=$ac_new_val ;;
++    esac
++    case " $ac_configure_args " in
++      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
++      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
++    esac
++  fi
++done
++if $ac_cache_corrupted; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
++$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
++  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
++fi
++## -------------------- ##
++## Main body of script. ##
++## -------------------- ##
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++
++
++
++
++
++ac_config_headers="$ac_config_headers config.h"
++
++
++if test -n "${with_target_subdir}"; then
++  # Default to --enable-multilib
++# Check whether --enable-multilib was given.
++if test "${enable_multilib+set}" = set; then :
++  enableval=$enable_multilib; case "$enableval" in
++  yes) multilib=yes ;;
++  no)  multilib=no ;;
++  *)   as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;;
++ esac
++else
++  multilib=yes
++fi
++
++
++# We may get other options which we leave undocumented:
++# --with-target-subdir, --with-multisrctop, --with-multisubdir
++# See config-ml.in if you want the gory details.
++
++if test "$srcdir" = "."; then
++  if test "$with_target_subdir" != "."; then
++    multi_basedir="$srcdir/$with_multisrctop../.."
++  else
++    multi_basedir="$srcdir/$with_multisrctop.."
++  fi
++else
++  multi_basedir="$srcdir/.."
++fi
++
++
++# Even if the default multilib is not a cross compilation,
++# it may be that some of the other multilibs are.
++if test $cross_compiling = no && test $multilib = yes \
++   && test "x${with_multisubdir}" != x ; then
++   cross_compiling=maybe
++fi
++
++ac_config_commands="$ac_config_commands default-1"
++
++fi
++
++ac_aux_dir=
++for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
++  for ac_t in install-sh install.sh shtool; do
++    if test -f "$ac_dir/$ac_t"; then
++      ac_aux_dir=$ac_dir
++      ac_install_sh="$ac_aux_dir/$ac_t -c"
++      break 2
++    fi
++  done
++done
++if test -z "$ac_aux_dir"; then
++  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
++fi
++
++# These three variables are undocumented and unsupported,
++# and are intended to be withdrawn in a future Autoconf release.
++# They can cause serious problems if a builder's source tree is in a directory
++# whose full name contains unusual characters.
++ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
++ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
++ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
++
++
++# Make sure we can run config.sub.
++$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
++  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
++$as_echo_n "checking build system type... " >&6; }
++if test "${ac_cv_build+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_build_alias=$build_alias
++test "x$ac_build_alias" = x &&
++  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
++test "x$ac_build_alias" = x &&
++  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
++ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
++  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
++$as_echo "$ac_cv_build" >&6; }
++case $ac_cv_build in
++*-*-*) ;;
++*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
++esac
++build=$ac_cv_build
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_build
++shift
++build_cpu=$1
++build_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++build_os=$*
++IFS=$ac_save_IFS
++case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
++$as_echo_n "checking host system type... " >&6; }
++if test "${ac_cv_host+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test "x$host_alias" = x; then
++  ac_cv_host=$ac_cv_build
++else
++  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
++    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
++$as_echo "$ac_cv_host" >&6; }
++case $ac_cv_host in
++*-*-*) ;;
++*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
++esac
++host=$ac_cv_host
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_host
++shift
++host_cpu=$1
++host_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++host_os=$*
++IFS=$ac_save_IFS
++case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
++$as_echo_n "checking target system type... " >&6; }
++if test "${ac_cv_target+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test "x$target_alias" = x; then
++  ac_cv_target=$ac_cv_host
++else
++  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
++    as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
++$as_echo "$ac_cv_target" >&6; }
++case $ac_cv_target in
++*-*-*) ;;
++*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
++esac
++target=$ac_cv_target
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_target
++shift
++target_cpu=$1
++target_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++target_os=$*
++IFS=$ac_save_IFS
++case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
++
++
++# The aliases save the names the user supplied, while $host etc.
++# will get canonicalized.
++test -n "$target_alias" &&
++  test "$program_prefix$program_suffix$program_transform_name" = \
++    NONENONEs,x,x, &&
++  program_prefix=${target_alias}-
++
++target_alias=${target_alias-$host_alias}
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
++set dummy ${ac_tool_prefix}gcc; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$CC"; then
++  ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_CC="${ac_tool_prefix}gcc"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_CC"; then
++  ac_ct_CC=$CC
++  # Extract the first word of "gcc", so it can be a program name with args.
++set dummy gcc; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_CC"; then
++  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_CC="gcc"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_CC=$ac_cv_prog_ac_ct_CC
++if test -n "$ac_ct_CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
++$as_echo "$ac_ct_CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_CC" = x; then
++    CC=""
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    CC=$ac_ct_CC
++  fi
++else
++  CC="$ac_cv_prog_CC"
++fi
++
++if test -z "$CC"; then
++          if test -n "$ac_tool_prefix"; then
++    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
++set dummy ${ac_tool_prefix}cc; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$CC"; then
++  ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_CC="${ac_tool_prefix}cc"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++  fi
++fi
++if test -z "$CC"; then
++  # Extract the first word of "cc", so it can be a program name with args.
++set dummy cc; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$CC"; then
++  ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++  ac_prog_rejected=no
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
++       ac_prog_rejected=yes
++       continue
++     fi
++    ac_cv_prog_CC="cc"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++if test $ac_prog_rejected = yes; then
++  # We found a bogon in the path, so make sure we never use it.
++  set dummy $ac_cv_prog_CC
++  shift
++  if test $# != 0; then
++    # We chose a different compiler from the bogus one.
++    # However, it has the same basename, so the bogon will be chosen
++    # first if we set CC to just the basename; use the full file name.
++    shift
++    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
++  fi
++fi
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$CC"; then
++  if test -n "$ac_tool_prefix"; then
++  for ac_prog in cl.exe
++  do
++    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
++set dummy $ac_tool_prefix$ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$CC"; then
++  ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++    test -n "$CC" && break
++  done
++fi
++if test -z "$CC"; then
++  ac_ct_CC=$CC
++  for ac_prog in cl.exe
++do
++  # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_CC"; then
++  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_CC="$ac_prog"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_CC=$ac_cv_prog_ac_ct_CC
++if test -n "$ac_ct_CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
++$as_echo "$ac_ct_CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++  test -n "$ac_ct_CC" && break
++done
++
++  if test "x$ac_ct_CC" = x; then
++    CC=""
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    CC=$ac_ct_CC
++  fi
++fi
++
++fi
++
++
++test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "no acceptable C compiler found in \$PATH
++See \`config.log' for more details." "$LINENO" 5; }
++
++# Provide some information about the compiler.
++$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
++set X $ac_compile
++ac_compiler=$2
++for ac_option in --version -v -V -qversion; do
++  { { ac_try="$ac_compiler $ac_option >&5"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
++  ac_status=$?
++  if test -s conftest.err; then
++    sed '10a\
++... rest of stderr output deleted ...
++         10q' conftest.err >conftest.er1
++    cat conftest.er1 >&5
++    rm -f conftest.er1 conftest.err
++  fi
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }
++done
++
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++ac_clean_files_save=$ac_clean_files
++ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
++# Try to create an executable without -o first, disregard a.out.
++# It will help us diagnose broken compilers, and finding out an intuition
++# of exeext.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
++$as_echo_n "checking for C compiler default output file name... " >&6; }
++ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
++
++# The possible output files:
++ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
++
++ac_rmfiles=
++for ac_file in $ac_files
++do
++  case $ac_file in
++    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
++    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
++  esac
++done
++rm -f $ac_rmfiles
++
++if { { ac_try="$ac_link_default"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_link_default") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then :
++  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
++# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
++# in a Makefile.  We should not override ac_cv_exeext if it was cached,
++# so that the user can short-circuit this test for compilers unknown to
++# Autoconf.
++for ac_file in $ac_files ''
++do
++  test -f "$ac_file" || continue
++  case $ac_file in
++    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
++      ;;
++    [ab].out )
++      # We found the default executable, but exeext='' is most
++      # certainly right.
++      break;;
++    *.* )
++      if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
++      then :; else
++         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
++      fi
++      # We set ac_cv_exeext here because the later test for it is not
++      # safe: cross compilers may not add the suffix if given an `-o'
++      # argument, so we may need to know it at that point already.
++      # Even if this section looks crufty: it has the advantage of
++      # actually working.
++      break;;
++    * )
++      break;;
++  esac
++done
++test "$ac_cv_exeext" = no && ac_cv_exeext=
++
++else
++  ac_file=''
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
++$as_echo "$ac_file" >&6; }
++if test -z "$ac_file"; then :
++  $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++{ as_fn_set_status 77
++as_fn_error "C compiler cannot create executables
++See \`config.log' for more details." "$LINENO" 5; }; }
++fi
++ac_exeext=$ac_cv_exeext
++
++# Check that the compiler produces executables we can run.  If not, either
++# the compiler is broken, or we cross compile.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
++$as_echo_n "checking whether the C compiler works... " >&6; }
++# If not cross compiling, check that we can run a simple program.
++if test "$cross_compiling" != yes; then
++  if { ac_try='./$ac_file'
++  { { case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_try") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; }; then
++    cross_compiling=no
++  else
++    if test "$cross_compiling" = maybe; then
++      cross_compiling=yes
++    else
++      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "cannot run C compiled programs.
++If you meant to cross compile, use \`--host'.
++See \`config.log' for more details." "$LINENO" 5; }
++    fi
++  fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++
++rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
++ac_clean_files=$ac_clean_files_save
++# Check that the compiler produces executables we can run.  If not, either
++# the compiler is broken, or we cross compile.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
++$as_echo_n "checking whether we are cross compiling... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
++$as_echo "$cross_compiling" >&6; }
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
++$as_echo_n "checking for suffix of executables... " >&6; }
++if { { ac_try="$ac_link"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_link") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then :
++  # If both `conftest.exe' and `conftest' are `present' (well, observable)
++# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
++# work properly (i.e., refer to `conftest.exe'), while it won't with
++# `rm'.
++for ac_file in conftest.exe conftest conftest.*; do
++  test -f "$ac_file" || continue
++  case $ac_file in
++    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
++    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
++        break;;
++    * ) break;;
++  esac
++done
++else
++  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "cannot compute suffix of executables: cannot compile and link
++See \`config.log' for more details." "$LINENO" 5; }
++fi
++rm -f conftest$ac_cv_exeext
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
++$as_echo "$ac_cv_exeext" >&6; }
++
++rm -f conftest.$ac_ext
++EXEEXT=$ac_cv_exeext
++ac_exeext=$EXEEXT
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
++$as_echo_n "checking for suffix of object files... " >&6; }
++if test "${ac_cv_objext+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.o conftest.obj
++if { { ac_try="$ac_compile"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_compile") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then :
++  for ac_file in conftest.o conftest.obj conftest.*; do
++  test -f "$ac_file" || continue;
++  case $ac_file in
++    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
++    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
++       break;;
++  esac
++done
++else
++  $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "cannot compute suffix of object files: cannot compile
++See \`config.log' for more details." "$LINENO" 5; }
++fi
++rm -f conftest.$ac_cv_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
++$as_echo "$ac_cv_objext" >&6; }
++OBJEXT=$ac_cv_objext
++ac_objext=$OBJEXT
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
++$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
++if test "${ac_cv_c_compiler_gnu+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++#ifndef __GNUC__
++       choke me
++#endif
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_compiler_gnu=yes
++else
++  ac_compiler_gnu=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ac_cv_c_compiler_gnu=$ac_compiler_gnu
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
++$as_echo "$ac_cv_c_compiler_gnu" >&6; }
++if test $ac_compiler_gnu = yes; then
++  GCC=yes
++else
++  GCC=
++fi
++ac_test_CFLAGS=${CFLAGS+set}
++ac_save_CFLAGS=$CFLAGS
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
++$as_echo_n "checking whether $CC accepts -g... " >&6; }
++if test "${ac_cv_prog_cc_g+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_save_c_werror_flag=$ac_c_werror_flag
++   ac_c_werror_flag=yes
++   ac_cv_prog_cc_g=no
++   CFLAGS="-g"
++   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_prog_cc_g=yes
++else
++  CFLAGS=""
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++
++else
++  ac_c_werror_flag=$ac_save_c_werror_flag
++       CFLAGS="-g"
++       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_prog_cc_g=yes
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++   ac_c_werror_flag=$ac_save_c_werror_flag
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
++$as_echo "$ac_cv_prog_cc_g" >&6; }
++if test "$ac_test_CFLAGS" = set; then
++  CFLAGS=$ac_save_CFLAGS
++elif test $ac_cv_prog_cc_g = yes; then
++  if test "$GCC" = yes; then
++    CFLAGS="-g -O2"
++  else
++    CFLAGS="-g"
++  fi
++else
++  if test "$GCC" = yes; then
++    CFLAGS="-O2"
++  else
++    CFLAGS=
++  fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
++$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
++if test "${ac_cv_prog_cc_c89+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_cv_prog_cc_c89=no
++ac_save_CC=$CC
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdarg.h>
++#include <stdio.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
++struct buf { int x; };
++FILE * (*rcsopen) (struct buf *, struct stat *, int);
++static char *e (p, i)
++     char **p;
++     int i;
++{
++  return p[i];
++}
++static char *f (char * (*g) (char **, int), char **p, ...)
++{
++  char *s;
++  va_list v;
++  va_start (v,p);
++  s = g (p, va_arg (v,int));
++  va_end (v);
++  return s;
++}
++
++/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
++   function prototypes and stuff, but not '\xHH' hex character constants.
++   These don't provoke an error unfortunately, instead are silently treated
++   as 'x'.  The following induces an error, until -std is added to get
++   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
++   array size at least.  It's necessary to write '\x00'==0 to get something
++   that's true only with -std.  */
++int osf4_cc_array ['\x00' == 0 ? 1 : -1];
++
++/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
++   inside strings and character constants.  */
++#define FOO(x) 'x'
++int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
++
++int test (int i, double x);
++struct s1 {int (*f) (int a);};
++struct s2 {int (*f) (double a);};
++int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
++int argc;
++char **argv;
++int
++main ()
++{
++return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
++  ;
++  return 0;
++}
++_ACEOF
++for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
++      -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
++do
++  CC="$ac_save_CC $ac_arg"
++  if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_prog_cc_c89=$ac_arg
++fi
++rm -f core conftest.err conftest.$ac_objext
++  test "x$ac_cv_prog_cc_c89" != "xno" && break
++done
++rm -f conftest.$ac_ext
++CC=$ac_save_CC
++
++fi
++# AC_CACHE_VAL
++case "x$ac_cv_prog_cc_c89" in
++  x)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
++$as_echo "none needed" >&6; } ;;
++  xno)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
++$as_echo "unsupported" >&6; } ;;
++  *)
++    CC="$CC $ac_cv_prog_cc_c89"
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
++$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
++esac
++if test "x$ac_cv_prog_cc_c89" != xno; then :
++
++fi
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
++$as_echo_n "checking how to run the C preprocessor... " >&6; }
++# On Suns, sometimes $CPP names a directory.
++if test -n "$CPP" && test -d "$CPP"; then
++  CPP=
++fi
++if test -z "$CPP"; then
++  if test "${ac_cv_prog_CPP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++      # Double quotes because CPP needs to be expanded
++    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
++    do
++      ac_preproc_ok=false
++for ac_c_preproc_warn_flag in '' yes
++do
++  # Use a header file that comes with gcc, so configuring glibc
++  # with a fresh cross-compiler works.
++  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++  # <limits.h> exists even on freestanding compilers.
++  # On the NeXT, cc -E runs the code through the compiler's parser,
++  # not just through cpp. "Syntax error" is here to catch this case.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++                   Syntax error
++_ACEOF
++if ac_fn_c_try_cpp "$LINENO"; then :
++
++else
++  # Broken: fails on valid input.
++continue
++fi
++rm -f conftest.err conftest.$ac_ext
++
++  # OK, works on sane cases.  Now check whether nonexistent headers
++  # can be detected and how.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <ac_nonexistent.h>
++_ACEOF
++if ac_fn_c_try_cpp "$LINENO"; then :
++  # Broken: success on invalid input.
++continue
++else
++  # Passes both tests.
++ac_preproc_ok=:
++break
++fi
++rm -f conftest.err conftest.$ac_ext
++
++done
++# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
++rm -f conftest.err conftest.$ac_ext
++if $ac_preproc_ok; then :
++  break
++fi
++
++    done
++    ac_cv_prog_CPP=$CPP
++
++fi
++  CPP=$ac_cv_prog_CPP
++else
++  ac_cv_prog_CPP=$CPP
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
++$as_echo "$CPP" >&6; }
++ac_preproc_ok=false
++for ac_c_preproc_warn_flag in '' yes
++do
++  # Use a header file that comes with gcc, so configuring glibc
++  # with a fresh cross-compiler works.
++  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++  # <limits.h> exists even on freestanding compilers.
++  # On the NeXT, cc -E runs the code through the compiler's parser,
++  # not just through cpp. "Syntax error" is here to catch this case.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++                   Syntax error
++_ACEOF
++if ac_fn_c_try_cpp "$LINENO"; then :
++
++else
++  # Broken: fails on valid input.
++continue
++fi
++rm -f conftest.err conftest.$ac_ext
++
++  # OK, works on sane cases.  Now check whether nonexistent headers
++  # can be detected and how.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <ac_nonexistent.h>
++_ACEOF
++if ac_fn_c_try_cpp "$LINENO"; then :
++  # Broken: success on invalid input.
++continue
++else
++  # Passes both tests.
++ac_preproc_ok=:
++break
++fi
++rm -f conftest.err conftest.$ac_ext
++
++done
++# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
++rm -f conftest.err conftest.$ac_ext
++if $ac_preproc_ok; then :
++
++else
++  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "C preprocessor \"$CPP\" fails sanity check
++See \`config.log' for more details." "$LINENO" 5; }
++fi
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
++$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
++if test "${ac_cv_path_GREP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -z "$GREP"; then
++  ac_path_GREP_found=false
++  # Loop through the user's path and test for each of PROGNAME-LIST
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_prog in grep ggrep; do
++    for ac_exec_ext in '' $ac_executable_extensions; do
++      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
++      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
++# Check for GNU ac_path_GREP and select it if it is found.
++  # Check for GNU $ac_path_GREP
++case `"$ac_path_GREP" --version 2>&1` in
++*GNU*)
++  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
++*)
++  ac_count=0
++  $as_echo_n 0123456789 >"conftest.in"
++  while :
++  do
++    cat "conftest.in" "conftest.in" >"conftest.tmp"
++    mv "conftest.tmp" "conftest.in"
++    cp "conftest.in" "conftest.nl"
++    $as_echo 'GREP' >> "conftest.nl"
++    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
++    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
++    as_fn_arith $ac_count + 1 && ac_count=$as_val
++    if test $ac_count -gt ${ac_path_GREP_max-0}; then
++      # Best one so far, save it but keep looking for a better one
++      ac_cv_path_GREP="$ac_path_GREP"
++      ac_path_GREP_max=$ac_count
++    fi
++    # 10*(2^10) chars as input seems more than enough
++    test $ac_count -gt 10 && break
++  done
++  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
++esac
++
++      $ac_path_GREP_found && break 3
++    done
++  done
++  done
++IFS=$as_save_IFS
++  if test -z "$ac_cv_path_GREP"; then
++    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++  fi
++else
++  ac_cv_path_GREP=$GREP
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
++$as_echo "$ac_cv_path_GREP" >&6; }
++ GREP="$ac_cv_path_GREP"
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
++$as_echo_n "checking for egrep... " >&6; }
++if test "${ac_cv_path_EGREP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
++   then ac_cv_path_EGREP="$GREP -E"
++   else
++     if test -z "$EGREP"; then
++  ac_path_EGREP_found=false
++  # Loop through the user's path and test for each of PROGNAME-LIST
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_prog in egrep; do
++    for ac_exec_ext in '' $ac_executable_extensions; do
++      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
++      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
++# Check for GNU ac_path_EGREP and select it if it is found.
++  # Check for GNU $ac_path_EGREP
++case `"$ac_path_EGREP" --version 2>&1` in
++*GNU*)
++  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
++*)
++  ac_count=0
++  $as_echo_n 0123456789 >"conftest.in"
++  while :
++  do
++    cat "conftest.in" "conftest.in" >"conftest.tmp"
++    mv "conftest.tmp" "conftest.in"
++    cp "conftest.in" "conftest.nl"
++    $as_echo 'EGREP' >> "conftest.nl"
++    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
++    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
++    as_fn_arith $ac_count + 1 && ac_count=$as_val
++    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
++      # Best one so far, save it but keep looking for a better one
++      ac_cv_path_EGREP="$ac_path_EGREP"
++      ac_path_EGREP_max=$ac_count
++    fi
++    # 10*(2^10) chars as input seems more than enough
++    test $ac_count -gt 10 && break
++  done
++  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
++esac
++
++      $ac_path_EGREP_found && break 3
++    done
++  done
++  done
++IFS=$as_save_IFS
++  if test -z "$ac_cv_path_EGREP"; then
++    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++  fi
++else
++  ac_cv_path_EGREP=$EGREP
++fi
++
++   fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
++$as_echo "$ac_cv_path_EGREP" >&6; }
++ EGREP="$ac_cv_path_EGREP"
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
++$as_echo_n "checking for ANSI C header files... " >&6; }
++if test "${ac_cv_header_stdc+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdlib.h>
++#include <stdarg.h>
++#include <string.h>
++#include <float.h>
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_header_stdc=yes
++else
++  ac_cv_header_stdc=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
++if test $ac_cv_header_stdc = yes; then
++  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <string.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "memchr" >/dev/null 2>&1; then :
++
++else
++  ac_cv_header_stdc=no
++fi
++rm -f conftest*
++
++fi
++
++if test $ac_cv_header_stdc = yes; then
++  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdlib.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "free" >/dev/null 2>&1; then :
++
++else
++  ac_cv_header_stdc=no
++fi
++rm -f conftest*
++
++fi
++
++if test $ac_cv_header_stdc = yes; then
++  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
++  if test "$cross_compiling" = yes; then :
++  :
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <ctype.h>
++#include <stdlib.h>
++#if ((' ' & 0x0FF) == 0x020)
++# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
++# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
++#else
++# define ISLOWER(c) \
++                 (('a' <= (c) && (c) <= 'i') \
++                   || ('j' <= (c) && (c) <= 'r') \
++                   || ('s' <= (c) && (c) <= 'z'))
++# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
++#endif
++
++#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
++int
++main ()
++{
++  int i;
++  for (i = 0; i < 256; i++)
++    if (XOR (islower (i), ISLOWER (i))
++      || toupper (i) != TOUPPER (i))
++      return 2;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++
++else
++  ac_cv_header_stdc=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
++
++fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
++$as_echo "$ac_cv_header_stdc" >&6; }
++if test $ac_cv_header_stdc = yes; then
++
++$as_echo "#define STDC_HEADERS 1" >>confdefs.h
++
++fi
++
++# On IRIX 5.3, sys/types and inttypes.h are conflicting.
++for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
++                inttypes.h stdint.h unistd.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
++"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++
++
++  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
++if test "x$ac_cv_header_minix_config_h" = x""yes; then :
++  MINIX=yes
++else
++  MINIX=
++fi
++
++
++  if test "$MINIX" = yes; then
++
++$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
++
++
++$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
++
++
++$as_echo "#define _MINIX 1" >>confdefs.h
++
++  fi
++
++
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
++$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
++if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++#       define __EXTENSIONS__ 1
++        $ac_includes_default
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_safe_to_define___extensions__=yes
++else
++  ac_cv_safe_to_define___extensions__=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
++$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
++  test $ac_cv_safe_to_define___extensions__ = yes &&
++    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
++
++  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
++
++  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
++
++  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
++
++  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
++
++
++
++libtool_VERSION=1:0:0
++
++
++# 1.11.1: Require that version of automake.
++# foreign: Don't require README, INSTALL, NEWS, etc.
++# no-define: Don't define PACKAGE and VERSION.
++# no-dependencies: Don't generate automatic dependencies.
++#    (because it breaks when using bootstrap-lean, since some of the
++#    headers are gone at "make install" time).
++# -Wall: Issue all automake warnings.
++# -Wno-portability: Don't warn about constructs supported by GNU make.
++#    (because GCC requires GNU make anyhow).
++am__api_version='1.11'
++
++# Find a good install program.  We prefer a C program (faster),
++# so one script is as good as another.  But avoid the broken or
++# incompatible versions:
++# SysV /etc/install, /usr/sbin/install
++# SunOS /usr/etc/install
++# IRIX /sbin/install
++# AIX /bin/install
++# AmigaOS /C/install, which installs bootblocks on floppy discs
++# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
++# AFS /usr/afsws/bin/install, which mishandles nonexistent args
++# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
++# OS/2's system install, which has a completely different semantic
++# ./install, which can be erroneously created by make from ./install.sh.
++# Reject install programs that cannot install multiple files.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
++$as_echo_n "checking for a BSD-compatible install... " >&6; }
++if test -z "$INSTALL"; then
++if test "${ac_cv_path_install+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    # Account for people who put trailing slashes in PATH elements.
++case $as_dir/ in #((
++  ./ | .// | /[cC]/* | \
++  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
++  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
++  /usr/ucb/* ) ;;
++  *)
++    # OSF1 and SCO ODT 3.0 have their own names for install.
++    # Don't use installbsd from OSF since it installs stuff as root
++    # by default.
++    for ac_prog in ginstall scoinst install; do
++      for ac_exec_ext in '' $ac_executable_extensions; do
++      if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
++        if test $ac_prog = install &&
++          grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
++          # AIX install.  It has an incompatible calling convention.
++          :
++        elif test $ac_prog = install &&
++          grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
++          # program-specific install script used by HP pwplus--don't use.
++          :
++        else
++          rm -rf conftest.one conftest.two conftest.dir
++          echo one > conftest.one
++          echo two > conftest.two
++          mkdir conftest.dir
++          if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
++            test -s conftest.one && test -s conftest.two &&
++            test -s conftest.dir/conftest.one &&
++            test -s conftest.dir/conftest.two
++          then
++            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
++            break 3
++          fi
++        fi
++      fi
++      done
++    done
++    ;;
++esac
++
++  done
++IFS=$as_save_IFS
++
++rm -rf conftest.one conftest.two conftest.dir
++
++fi
++  if test "${ac_cv_path_install+set}" = set; then
++    INSTALL=$ac_cv_path_install
++  else
++    # As a last resort, use the slow shell script.  Don't cache a
++    # value for INSTALL within a source directory, because that will
++    # break other packages using the cache if that directory is
++    # removed, or if the value is a relative name.
++    INSTALL=$ac_install_sh
++  fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
++$as_echo "$INSTALL" >&6; }
++
++# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
++# It thinks the first close brace ends the variable substitution.
++test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
++
++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
++
++test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
++$as_echo_n "checking whether build environment is sane... " >&6; }
++# Just in case
++sleep 1
++echo timestamp > conftest.file
++# Reject unsafe characters in $srcdir or the absolute working directory
++# name.  Accept space and tab only in the latter.
++am_lf='
++'
++case `pwd` in
++  *[\\\"\#\$\&\'\`$am_lf]*)
++    as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
++esac
++case $srcdir in
++  *[\\\"\#\$\&\'\`$am_lf\ \   ]*)
++    as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
++esac
++
++# Do `set' in a subshell so we don't clobber the current shell's
++# arguments.  Must try -L first in case configure is actually a
++# symlink; some systems play weird games with the mod time of symlinks
++# (eg FreeBSD returns the mod time of the symlink's containing
++# directory).
++if (
++   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
++   if test "$*" = "X"; then
++      # -L didn't work.
++      set X `ls -t "$srcdir/configure" conftest.file`
++   fi
++   rm -f conftest.file
++   if test "$*" != "X $srcdir/configure conftest.file" \
++      && test "$*" != "X conftest.file $srcdir/configure"; then
++
++      # If neither matched, then we have a broken ls.  This can happen
++      # if, for instance, CONFIG_SHELL is bash and it inherits a
++      # broken ls alias from the environment.  This has actually
++      # happened.  Such a system could not be considered "sane".
++      as_fn_error "ls -t appears to fail.  Make sure there is not a broken
++alias in your environment" "$LINENO" 5
++   fi
++
++   test "$2" = conftest.file
++   )
++then
++   # Ok.
++   :
++else
++   as_fn_error "newly created file is older than distributed files!
++Check your system clock" "$LINENO" 5
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++test "$program_prefix" != NONE &&
++  program_transform_name="s&^&$program_prefix&;$program_transform_name"
++# Use a double $ so make ignores it.
++test "$program_suffix" != NONE &&
++  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
++# Double any \ or $.
++# By default was `s,x,x', remove it if useless.
++ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
++program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
++
++# expand $ac_aux_dir to an absolute path
++am_aux_dir=`cd $ac_aux_dir && pwd`
++
++if test x"${MISSING+set}" != xset; then
++  case $am_aux_dir in
++  *\ * | *\   *)
++    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
++  *)
++    MISSING="\${SHELL} $am_aux_dir/missing" ;;
++  esac
++fi
++# Use eval to expand $SHELL
++if eval "$MISSING --run true"; then
++  am_missing_run="$MISSING --run "
++else
++  am_missing_run=
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
++$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
++fi
++
++if test x"${install_sh}" != xset; then
++  case $am_aux_dir in
++  *\ * | *\   *)
++    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
++  *)
++    install_sh="\${SHELL} $am_aux_dir/install-sh"
++  esac
++fi
++
++# Installed binaries are usually stripped using `strip' when the user
++# run `make install-strip'.  However `strip' might not be the right
++# tool to use in cross-compilation environments, therefore Automake
++# will honor the `STRIP' environment variable to overrule this program.
++if test "$cross_compiling" != no; then
++  if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
++set dummy ${ac_tool_prefix}strip; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_STRIP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$STRIP"; then
++  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++STRIP=$ac_cv_prog_STRIP
++if test -n "$STRIP"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
++$as_echo "$STRIP" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_STRIP"; then
++  ac_ct_STRIP=$STRIP
++  # Extract the first word of "strip", so it can be a program name with args.
++set dummy strip; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_STRIP"; then
++  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_STRIP="strip"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
++if test -n "$ac_ct_STRIP"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
++$as_echo "$ac_ct_STRIP" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_STRIP" = x; then
++    STRIP=":"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    STRIP=$ac_ct_STRIP
++  fi
++else
++  STRIP="$ac_cv_prog_STRIP"
++fi
++
++fi
++INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
++$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
++if test -z "$MKDIR_P"; then
++  if test "${ac_cv_path_mkdir+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_prog in mkdir gmkdir; do
++       for ac_exec_ext in '' $ac_executable_extensions; do
++         { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
++         case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
++           'mkdir (GNU coreutils) '* | \
++           'mkdir (coreutils) '* | \
++           'mkdir (fileutils) '4.1*)
++             ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
++             break 3;;
++         esac
++       done
++       done
++  done
++IFS=$as_save_IFS
++
++fi
++
++  if test "${ac_cv_path_mkdir+set}" = set; then
++    MKDIR_P="$ac_cv_path_mkdir -p"
++  else
++    # As a last resort, use the slow shell script.  Don't cache a
++    # value for MKDIR_P within a source directory, because that will
++    # break other packages using the cache if that directory is
++    # removed, or if the value is a relative name.
++    test -d ./--version && rmdir ./--version
++    MKDIR_P="$ac_install_sh -d"
++  fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
++$as_echo "$MKDIR_P" >&6; }
++
++mkdir_p="$MKDIR_P"
++case $mkdir_p in
++  [\\/$]* | ?:[\\/]*) ;;
++  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
++esac
++
++for ac_prog in gawk mawk nawk awk
++do
++  # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_AWK+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$AWK"; then
++  ac_cv_prog_AWK="$AWK" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_AWK="$ac_prog"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++AWK=$ac_cv_prog_AWK
++if test -n "$AWK"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
++$as_echo "$AWK" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++  test -n "$AWK" && break
++done
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
++$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
++set x ${MAKE-make}
++ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
++if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat >conftest.make <<\_ACEOF
++SHELL = /bin/sh
++all:
++      @echo '@@@%%%=$(MAKE)=@@@%%%'
++_ACEOF
++# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
++case `${MAKE-make} -f conftest.make 2>/dev/null` in
++  *@@@%%%=?*=@@@%%%*)
++    eval ac_cv_prog_make_${ac_make}_set=yes;;
++  *)
++    eval ac_cv_prog_make_${ac_make}_set=no;;
++esac
++rm -f conftest.make
++fi
++if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++  SET_MAKE=
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++  SET_MAKE="MAKE=${MAKE-make}"
++fi
++
++rm -rf .tst 2>/dev/null
++mkdir .tst 2>/dev/null
++if test -d .tst; then
++  am__leading_dot=.
++else
++  am__leading_dot=_
++fi
++rmdir .tst 2>/dev/null
++
++if test "`cd $srcdir && pwd`" != "`pwd`"; then
++  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
++  # is not polluted with repeated "-I."
++  am__isrc=' -I$(srcdir)'
++  # test to see if srcdir already configured
++  if test -f $srcdir/config.status; then
++    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
++  fi
++fi
++
++# test whether we have cygpath
++if test -z "$CYGPATH_W"; then
++  if (cygpath --version) >/dev/null 2>/dev/null; then
++    CYGPATH_W='cygpath -w'
++  else
++    CYGPATH_W=echo
++  fi
++fi
++
++
++# Define the identity of the package.
++ PACKAGE='libbacktrace'
++ VERSION='version-unused'
++
++
++# Some tools Automake needs.
++
++ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
++
++
++AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
++
++
++AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
++
++
++AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
++
++
++MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
++
++# We need awk for the "check" target.  The system "awk" is bad on
++# some platforms.
++# Always define AMTAR for backward compatibility.  Yes, it's still used
++# in the wild :-(  We should find a proper way to deprecate it ...
++AMTAR='$${TAR-tar}'
++
++am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
++
++
++
++
++
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
++$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
++    # Check whether --enable-maintainer-mode was given.
++if test "${enable_maintainer_mode+set}" = set; then :
++  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
++else
++  USE_MAINTAINER_MODE=no
++fi
++
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
++$as_echo "$USE_MAINTAINER_MODE" >&6; }
++   if test $USE_MAINTAINER_MODE = yes; then
++  MAINTAINER_MODE_TRUE=
++  MAINTAINER_MODE_FALSE='#'
++else
++  MAINTAINER_MODE_TRUE='#'
++  MAINTAINER_MODE_FALSE=
++fi
++
++  MAINT=$MAINTAINER_MODE_TRUE
++
++
++
++
++# Check whether --with-target-subdir was given.
++if test "${with_target_subdir+set}" = set; then :
++  withval=$with_target_subdir;
++fi
++
++
++# We must force CC to /not/ be precious variables; otherwise
++# the wrong, non-multilib-adjusted value will be used in multilibs.
++# As a side effect, we have to subst CFLAGS ourselves.
++
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
++set dummy ${ac_tool_prefix}gcc; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$CC"; then
++  ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_CC="${ac_tool_prefix}gcc"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_CC"; then
++  ac_ct_CC=$CC
++  # Extract the first word of "gcc", so it can be a program name with args.
++set dummy gcc; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_CC"; then
++  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_CC="gcc"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_CC=$ac_cv_prog_ac_ct_CC
++if test -n "$ac_ct_CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
++$as_echo "$ac_ct_CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_CC" = x; then
++    CC=""
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    CC=$ac_ct_CC
++  fi
++else
++  CC="$ac_cv_prog_CC"
++fi
++
++if test -z "$CC"; then
++          if test -n "$ac_tool_prefix"; then
++    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
++set dummy ${ac_tool_prefix}cc; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$CC"; then
++  ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_CC="${ac_tool_prefix}cc"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++  fi
++fi
++if test -z "$CC"; then
++  # Extract the first word of "cc", so it can be a program name with args.
++set dummy cc; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$CC"; then
++  ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++  ac_prog_rejected=no
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
++       ac_prog_rejected=yes
++       continue
++     fi
++    ac_cv_prog_CC="cc"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++if test $ac_prog_rejected = yes; then
++  # We found a bogon in the path, so make sure we never use it.
++  set dummy $ac_cv_prog_CC
++  shift
++  if test $# != 0; then
++    # We chose a different compiler from the bogus one.
++    # However, it has the same basename, so the bogon will be chosen
++    # first if we set CC to just the basename; use the full file name.
++    shift
++    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
++  fi
++fi
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$CC"; then
++  if test -n "$ac_tool_prefix"; then
++  for ac_prog in cl.exe
++  do
++    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
++set dummy $ac_tool_prefix$ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$CC"; then
++  ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++    test -n "$CC" && break
++  done
++fi
++if test -z "$CC"; then
++  ac_ct_CC=$CC
++  for ac_prog in cl.exe
++do
++  # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_CC"; then
++  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_CC="$ac_prog"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_CC=$ac_cv_prog_ac_ct_CC
++if test -n "$ac_ct_CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
++$as_echo "$ac_ct_CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++  test -n "$ac_ct_CC" && break
++done
++
++  if test "x$ac_ct_CC" = x; then
++    CC=""
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    CC=$ac_ct_CC
++  fi
++fi
++
++fi
++
++
++test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "no acceptable C compiler found in \$PATH
++See \`config.log' for more details." "$LINENO" 5; }
++
++# Provide some information about the compiler.
++$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
++set X $ac_compile
++ac_compiler=$2
++for ac_option in --version -v -V -qversion; do
++  { { ac_try="$ac_compiler $ac_option >&5"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
++  ac_status=$?
++  if test -s conftest.err; then
++    sed '10a\
++... rest of stderr output deleted ...
++         10q' conftest.err >conftest.er1
++    cat conftest.er1 >&5
++    rm -f conftest.er1 conftest.err
++  fi
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }
++done
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
++$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
++if test "${ac_cv_c_compiler_gnu+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++#ifndef __GNUC__
++       choke me
++#endif
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_compiler_gnu=yes
++else
++  ac_compiler_gnu=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ac_cv_c_compiler_gnu=$ac_compiler_gnu
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
++$as_echo "$ac_cv_c_compiler_gnu" >&6; }
++if test $ac_compiler_gnu = yes; then
++  GCC=yes
++else
++  GCC=
++fi
++ac_test_CFLAGS=${CFLAGS+set}
++ac_save_CFLAGS=$CFLAGS
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
++$as_echo_n "checking whether $CC accepts -g... " >&6; }
++if test "${ac_cv_prog_cc_g+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_save_c_werror_flag=$ac_c_werror_flag
++   ac_c_werror_flag=yes
++   ac_cv_prog_cc_g=no
++   CFLAGS="-g"
++   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_prog_cc_g=yes
++else
++  CFLAGS=""
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++
++else
++  ac_c_werror_flag=$ac_save_c_werror_flag
++       CFLAGS="-g"
++       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_prog_cc_g=yes
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++   ac_c_werror_flag=$ac_save_c_werror_flag
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
++$as_echo "$ac_cv_prog_cc_g" >&6; }
++if test "$ac_test_CFLAGS" = set; then
++  CFLAGS=$ac_save_CFLAGS
++elif test $ac_cv_prog_cc_g = yes; then
++  if test "$GCC" = yes; then
++    CFLAGS="-g -O2"
++  else
++    CFLAGS="-g"
++  fi
++else
++  if test "$GCC" = yes; then
++    CFLAGS="-O2"
++  else
++    CFLAGS=
++  fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
++$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
++if test "${ac_cv_prog_cc_c89+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_cv_prog_cc_c89=no
++ac_save_CC=$CC
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdarg.h>
++#include <stdio.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
++struct buf { int x; };
++FILE * (*rcsopen) (struct buf *, struct stat *, int);
++static char *e (p, i)
++     char **p;
++     int i;
++{
++  return p[i];
++}
++static char *f (char * (*g) (char **, int), char **p, ...)
++{
++  char *s;
++  va_list v;
++  va_start (v,p);
++  s = g (p, va_arg (v,int));
++  va_end (v);
++  return s;
++}
++
++/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
++   function prototypes and stuff, but not '\xHH' hex character constants.
++   These don't provoke an error unfortunately, instead are silently treated
++   as 'x'.  The following induces an error, until -std is added to get
++   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
++   array size at least.  It's necessary to write '\x00'==0 to get something
++   that's true only with -std.  */
++int osf4_cc_array ['\x00' == 0 ? 1 : -1];
++
++/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
++   inside strings and character constants.  */
++#define FOO(x) 'x'
++int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
++
++int test (int i, double x);
++struct s1 {int (*f) (int a);};
++struct s2 {int (*f) (double a);};
++int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
++int argc;
++char **argv;
++int
++main ()
++{
++return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
++  ;
++  return 0;
++}
++_ACEOF
++for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
++      -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
++do
++  CC="$ac_save_CC $ac_arg"
++  if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_prog_cc_c89=$ac_arg
++fi
++rm -f core conftest.err conftest.$ac_objext
++  test "x$ac_cv_prog_cc_c89" != "xno" && break
++done
++rm -f conftest.$ac_ext
++CC=$ac_save_CC
++
++fi
++# AC_CACHE_VAL
++case "x$ac_cv_prog_cc_c89" in
++  x)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
++$as_echo "none needed" >&6; } ;;
++  xno)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
++$as_echo "unsupported" >&6; } ;;
++  *)
++    CC="$CC $ac_cv_prog_cc_c89"
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
++$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
++esac
++if test "x$ac_cv_prog_cc_c89" != xno; then :
++
++fi
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++
++
++
++
++if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
++set dummy ${ac_tool_prefix}ranlib; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_RANLIB+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$RANLIB"; then
++  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++RANLIB=$ac_cv_prog_RANLIB
++if test -n "$RANLIB"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
++$as_echo "$RANLIB" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_RANLIB"; then
++  ac_ct_RANLIB=$RANLIB
++  # Extract the first word of "ranlib", so it can be a program name with args.
++set dummy ranlib; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_RANLIB"; then
++  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_RANLIB="ranlib"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
++if test -n "$ac_ct_RANLIB"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
++$as_echo "$ac_ct_RANLIB" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_RANLIB" = x; then
++    RANLIB=":"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    RANLIB=$ac_ct_RANLIB
++  fi
++else
++  RANLIB="$ac_cv_prog_RANLIB"
++fi
++
++
++for ac_prog in gawk mawk nawk awk
++do
++  # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_AWK+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$AWK"; then
++  ac_cv_prog_AWK="$AWK" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_AWK="$ac_prog"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++AWK=$ac_cv_prog_AWK
++if test -n "$AWK"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
++$as_echo "$AWK" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++  test -n "$AWK" && break
++done
++
++case "$AWK" in
++"") as_fn_error "can't build without awk" "$LINENO" 5 ;;
++esac
++
++case `pwd` in
++  *\ * | *\   *)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
++$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
++esac
++
++
++
++macro_version='2.2.7a'
++macro_revision='1.3134'
++
++
++
++
++
++
++
++
++
++
++
++
++
++ltmain="$ac_aux_dir/ltmain.sh"
++
++# Backslashify metacharacters that are still active within
++# double-quoted strings.
++sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
++
++# Same as above, but do not quote variable references.
++double_quote_subst='s/\(["`\\]\)/\\\1/g'
++
++# Sed substitution to delay expansion of an escaped shell variable in a
++# double_quote_subst'ed string.
++delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
++
++# Sed substitution to delay expansion of an escaped single quote.
++delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
++
++# Sed substitution to avoid accidental globbing in evaled expressions
++no_glob_subst='s/\*/\\\*/g'
++
++ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
++ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
++ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
++$as_echo_n "checking how to print strings... " >&6; }
++# Test print first, because it will be a builtin if present.
++if test "X`print -r -- -n 2>/dev/null`" = X-n && \
++   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
++  ECHO='print -r --'
++elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
++  ECHO='printf %s\n'
++else
++  # Use this function as a fallback that always works.
++  func_fallback_echo ()
++  {
++    eval 'cat <<_LTECHO_EOF
++$1
++_LTECHO_EOF'
++  }
++  ECHO='func_fallback_echo'
++fi
++
++# func_echo_all arg...
++# Invoke $ECHO with all args, space-separated.
++func_echo_all ()
++{
++    $ECHO ""
++}
++
++case "$ECHO" in
++  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
++$as_echo "printf" >&6; } ;;
++  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
++$as_echo "print -r" >&6; } ;;
++  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
++$as_echo "cat" >&6; } ;;
++esac
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
++$as_echo_n "checking for a sed that does not truncate output... " >&6; }
++if test "${ac_cv_path_SED+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
++     for ac_i in 1 2 3 4 5 6 7; do
++       ac_script="$ac_script$as_nl$ac_script"
++     done
++     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
++     { ac_script=; unset ac_script;}
++     if test -z "$SED"; then
++  ac_path_SED_found=false
++  # Loop through the user's path and test for each of PROGNAME-LIST
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_prog in sed gsed; do
++    for ac_exec_ext in '' $ac_executable_extensions; do
++      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
++      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
++# Check for GNU ac_path_SED and select it if it is found.
++  # Check for GNU $ac_path_SED
++case `"$ac_path_SED" --version 2>&1` in
++*GNU*)
++  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
++*)
++  ac_count=0
++  $as_echo_n 0123456789 >"conftest.in"
++  while :
++  do
++    cat "conftest.in" "conftest.in" >"conftest.tmp"
++    mv "conftest.tmp" "conftest.in"
++    cp "conftest.in" "conftest.nl"
++    $as_echo '' >> "conftest.nl"
++    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
++    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
++    as_fn_arith $ac_count + 1 && ac_count=$as_val
++    if test $ac_count -gt ${ac_path_SED_max-0}; then
++      # Best one so far, save it but keep looking for a better one
++      ac_cv_path_SED="$ac_path_SED"
++      ac_path_SED_max=$ac_count
++    fi
++    # 10*(2^10) chars as input seems more than enough
++    test $ac_count -gt 10 && break
++  done
++  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
++esac
++
++      $ac_path_SED_found && break 3
++    done
++  done
++  done
++IFS=$as_save_IFS
++  if test -z "$ac_cv_path_SED"; then
++    as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
++  fi
++else
++  ac_cv_path_SED=$SED
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
++$as_echo "$ac_cv_path_SED" >&6; }
++ SED="$ac_cv_path_SED"
++  rm -f conftest.sed
++
++test -z "$SED" && SED=sed
++Xsed="$SED -e 1s/^X//"
++
++
++
++
++
++
++
++
++
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
++$as_echo_n "checking for fgrep... " >&6; }
++if test "${ac_cv_path_FGREP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
++   then ac_cv_path_FGREP="$GREP -F"
++   else
++     if test -z "$FGREP"; then
++  ac_path_FGREP_found=false
++  # Loop through the user's path and test for each of PROGNAME-LIST
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_prog in fgrep; do
++    for ac_exec_ext in '' $ac_executable_extensions; do
++      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
++      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
++# Check for GNU ac_path_FGREP and select it if it is found.
++  # Check for GNU $ac_path_FGREP
++case `"$ac_path_FGREP" --version 2>&1` in
++*GNU*)
++  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
++*)
++  ac_count=0
++  $as_echo_n 0123456789 >"conftest.in"
++  while :
++  do
++    cat "conftest.in" "conftest.in" >"conftest.tmp"
++    mv "conftest.tmp" "conftest.in"
++    cp "conftest.in" "conftest.nl"
++    $as_echo 'FGREP' >> "conftest.nl"
++    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
++    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
++    as_fn_arith $ac_count + 1 && ac_count=$as_val
++    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
++      # Best one so far, save it but keep looking for a better one
++      ac_cv_path_FGREP="$ac_path_FGREP"
++      ac_path_FGREP_max=$ac_count
++    fi
++    # 10*(2^10) chars as input seems more than enough
++    test $ac_count -gt 10 && break
++  done
++  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
++esac
++
++      $ac_path_FGREP_found && break 3
++    done
++  done
++  done
++IFS=$as_save_IFS
++  if test -z "$ac_cv_path_FGREP"; then
++    as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++  fi
++else
++  ac_cv_path_FGREP=$FGREP
++fi
++
++   fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
++$as_echo "$ac_cv_path_FGREP" >&6; }
++ FGREP="$ac_cv_path_FGREP"
++
++
++test -z "$GREP" && GREP=grep
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++# Check whether --with-gnu-ld was given.
++if test "${with_gnu_ld+set}" = set; then :
++  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
++else
++  with_gnu_ld=no
++fi
++
++ac_prog=ld
++if test "$GCC" = yes; then
++  # Check if gcc -print-prog-name=ld gives a path.
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
++$as_echo_n "checking for ld used by $CC... " >&6; }
++  case $host in
++  *-*-mingw*)
++    # gcc leaves a trailing carriage return which upsets mingw
++    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
++  *)
++    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
++  esac
++  case $ac_prog in
++    # Accept absolute paths.
++    [\\/]* | ?:[\\/]*)
++      re_direlt='/[^/][^/]*/\.\./'
++      # Canonicalize the pathname of ld
++      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
++      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
++      ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
++      done
++      test -z "$LD" && LD="$ac_prog"
++      ;;
++  "")
++    # If it fails, then pretend we aren't using GCC.
++    ac_prog=ld
++    ;;
++  *)
++    # If it is relative, then search for the first ld in PATH.
++    with_gnu_ld=unknown
++    ;;
++  esac
++elif test "$with_gnu_ld" = yes; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
++$as_echo_n "checking for GNU ld... " >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
++$as_echo_n "checking for non-GNU ld... " >&6; }
++fi
++if test "${lt_cv_path_LD+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -z "$LD"; then
++  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
++  for ac_dir in $PATH; do
++    IFS="$lt_save_ifs"
++    test -z "$ac_dir" && ac_dir=.
++    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
++      lt_cv_path_LD="$ac_dir/$ac_prog"
++      # Check to see if the program is GNU ld.  I'd rather use --version,
++      # but apparently some variants of GNU ld only accept -v.
++      # Break only if it was the GNU/non-GNU ld that we prefer.
++      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
++      *GNU* | *'with BFD'*)
++      test "$with_gnu_ld" != no && break
++      ;;
++      *)
++      test "$with_gnu_ld" != yes && break
++      ;;
++      esac
++    fi
++  done
++  IFS="$lt_save_ifs"
++else
++  lt_cv_path_LD="$LD" # Let the user override the test with a path.
++fi
++fi
++
++LD="$lt_cv_path_LD"
++if test -n "$LD"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
++$as_echo "$LD" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
++$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
++if test "${lt_cv_prog_gnu_ld+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  # I'd rather use --version here, but apparently some GNU lds only accept -v.
++case `$LD -v 2>&1 </dev/null` in
++*GNU* | *'with BFD'*)
++  lt_cv_prog_gnu_ld=yes
++  ;;
++*)
++  lt_cv_prog_gnu_ld=no
++  ;;
++esac
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
++$as_echo "$lt_cv_prog_gnu_ld" >&6; }
++with_gnu_ld=$lt_cv_prog_gnu_ld
++
++
++
++
++
++
++
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
++$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
++if test "${lt_cv_path_NM+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$NM"; then
++  # Let the user override the test.
++  lt_cv_path_NM="$NM"
++else
++  lt_nm_to_check="${ac_tool_prefix}nm"
++  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
++    lt_nm_to_check="$lt_nm_to_check nm"
++  fi
++  for lt_tmp_nm in $lt_nm_to_check; do
++    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
++    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
++      IFS="$lt_save_ifs"
++      test -z "$ac_dir" && ac_dir=.
++      tmp_nm="$ac_dir/$lt_tmp_nm"
++      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
++      # Check to see if the nm accepts a BSD-compat flag.
++      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
++      #   nm: unknown option "B" ignored
++      # Tru64's nm complains that /dev/null is an invalid object file
++      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
++      */dev/null* | *'Invalid file or object type'*)
++        lt_cv_path_NM="$tmp_nm -B"
++        break
++        ;;
++      *)
++        case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
++        */dev/null*)
++          lt_cv_path_NM="$tmp_nm -p"
++          break
++          ;;
++        *)
++          lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
++          continue # so that we can try to find one that supports BSD flags
++          ;;
++        esac
++        ;;
++      esac
++      fi
++    done
++    IFS="$lt_save_ifs"
++  done
++  : ${lt_cv_path_NM=no}
++fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
++$as_echo "$lt_cv_path_NM" >&6; }
++if test "$lt_cv_path_NM" != "no"; then
++  NM="$lt_cv_path_NM"
++else
++  # Didn't find any BSD compatible name lister, look for dumpbin.
++  if test -n "$DUMPBIN"; then :
++    # Let the user override the test.
++  else
++    if test -n "$ac_tool_prefix"; then
++  for ac_prog in dumpbin "link -dump"
++  do
++    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
++set dummy $ac_tool_prefix$ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$DUMPBIN"; then
++  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++DUMPBIN=$ac_cv_prog_DUMPBIN
++if test -n "$DUMPBIN"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
++$as_echo "$DUMPBIN" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++    test -n "$DUMPBIN" && break
++  done
++fi
++if test -z "$DUMPBIN"; then
++  ac_ct_DUMPBIN=$DUMPBIN
++  for ac_prog in dumpbin "link -dump"
++do
++  # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_DUMPBIN"; then
++  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
++if test -n "$ac_ct_DUMPBIN"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
++$as_echo "$ac_ct_DUMPBIN" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++  test -n "$ac_ct_DUMPBIN" && break
++done
++
++  if test "x$ac_ct_DUMPBIN" = x; then
++    DUMPBIN=":"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    DUMPBIN=$ac_ct_DUMPBIN
++  fi
++fi
++
++    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
++    *COFF*)
++      DUMPBIN="$DUMPBIN -symbols"
++      ;;
++    *)
++      DUMPBIN=:
++      ;;
++    esac
++  fi
++
++  if test "$DUMPBIN" != ":"; then
++    NM="$DUMPBIN"
++  fi
++fi
++test -z "$NM" && NM=nm
++
++
++
++
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
++$as_echo_n "checking the name lister ($NM) interface... " >&6; }
++if test "${lt_cv_nm_interface+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_nm_interface="BSD nm"
++  echo "int some_variable = 0;" > conftest.$ac_ext
++  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
++  (eval "$ac_compile" 2>conftest.err)
++  cat conftest.err >&5
++  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
++  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
++  cat conftest.err >&5
++  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
++  cat conftest.out >&5
++  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
++    lt_cv_nm_interface="MS dumpbin"
++  fi
++  rm -f conftest*
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
++$as_echo "$lt_cv_nm_interface" >&6; }
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
++$as_echo_n "checking whether ln -s works... " >&6; }
++LN_S=$as_ln_s
++if test "$LN_S" = "ln -s"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
++$as_echo "no, using $LN_S" >&6; }
++fi
++
++# find the maximum length of command line arguments
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
++$as_echo_n "checking the maximum length of command line arguments... " >&6; }
++if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++    i=0
++  teststring="ABCD"
++
++  case $build_os in
++  msdosdjgpp*)
++    # On DJGPP, this test can blow up pretty badly due to problems in libc
++    # (any single argument exceeding 2000 bytes causes a buffer overrun
++    # during glob expansion).  Even if it were fixed, the result of this
++    # check would be larger than it should be.
++    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
++    ;;
++
++  gnu*)
++    # Under GNU Hurd, this test is not required because there is
++    # no limit to the length of command line arguments.
++    # Libtool will interpret -1 as no limit whatsoever
++    lt_cv_sys_max_cmd_len=-1;
++    ;;
++
++  cygwin* | mingw* | cegcc*)
++    # On Win9x/ME, this test blows up -- it succeeds, but takes
++    # about 5 minutes as the teststring grows exponentially.
++    # Worse, since 9x/ME are not pre-emptively multitasking,
++    # you end up with a "frozen" computer, even though with patience
++    # the test eventually succeeds (with a max line length of 256k).
++    # Instead, let's just punt: use the minimum linelength reported by
++    # all of the supported platforms: 8192 (on NT/2K/XP).
++    lt_cv_sys_max_cmd_len=8192;
++    ;;
++
++  mint*)
++    # On MiNT this can take a long time and run out of memory.
++    lt_cv_sys_max_cmd_len=8192;
++    ;;
++
++  amigaos*)
++    # On AmigaOS with pdksh, this test takes hours, literally.
++    # So we just punt and use a minimum line length of 8192.
++    lt_cv_sys_max_cmd_len=8192;
++    ;;
++
++  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
++    # This has been around since 386BSD, at least.  Likely further.
++    if test -x /sbin/sysctl; then
++      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
++    elif test -x /usr/sbin/sysctl; then
++      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
++    else
++      lt_cv_sys_max_cmd_len=65536     # usable default for all BSDs
++    fi
++    # And add a safety zone
++    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
++    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
++    ;;
++
++  interix*)
++    # We know the value 262144 and hardcode it with a safety zone (like BSD)
++    lt_cv_sys_max_cmd_len=196608
++    ;;
++
++  osf*)
++    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
++    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
++    # nice to cause kernel panics so lets avoid the loop below.
++    # First set a reasonable default.
++    lt_cv_sys_max_cmd_len=16384
++    #
++    if test -x /sbin/sysconfig; then
++      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
++        *1*) lt_cv_sys_max_cmd_len=-1 ;;
++      esac
++    fi
++    ;;
++  sco3.2v5*)
++    lt_cv_sys_max_cmd_len=102400
++    ;;
++  sysv5* | sco5v6* | sysv4.2uw2*)
++    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
++    if test -n "$kargmax"; then
++      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[        ]//'`
++    else
++      lt_cv_sys_max_cmd_len=32768
++    fi
++    ;;
++  *)
++    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
++    if test -n "$lt_cv_sys_max_cmd_len"; then
++      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
++      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
++    else
++      # Make teststring a little bigger before we do anything with it.
++      # a 1K string should be a reasonable start.
++      for i in 1 2 3 4 5 6 7 8 ; do
++        teststring=$teststring$teststring
++      done
++      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
++      # If test is not a shell built-in, we'll probably end up computing a
++      # maximum length that is only half of the actual maximum length, but
++      # we can't tell.
++      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
++               = "X$teststring$teststring"; } >/dev/null 2>&1 &&
++            test $i != 17 # 1/2 MB should be enough
++      do
++        i=`expr $i + 1`
++        teststring=$teststring$teststring
++      done
++      # Only check the string length outside the loop.
++      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
++      teststring=
++      # Add a significant safety factor because C++ compilers can tack on
++      # massive amounts of additional arguments before passing them to the
++      # linker.  It appears as though 1/2 is a usable value.
++      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
++    fi
++    ;;
++  esac
++
++fi
++
++if test -n $lt_cv_sys_max_cmd_len ; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
++$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
++$as_echo "none" >&6; }
++fi
++max_cmd_len=$lt_cv_sys_max_cmd_len
++
++
++
++
++
++
++: ${CP="cp -f"}
++: ${MV="mv -f"}
++: ${RM="rm -f"}
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
++$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
++# Try some XSI features
++xsi_shell=no
++( _lt_dummy="a/b/c"
++  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
++      = c,a/b,, \
++    && eval 'test $(( 1 + 1 )) -eq 2 \
++    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
++  && xsi_shell=yes
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
++$as_echo "$xsi_shell" >&6; }
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
++$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
++lt_shell_append=no
++( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
++    >/dev/null 2>&1 \
++  && lt_shell_append=yes
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
++$as_echo "$lt_shell_append" >&6; }
++
++
++if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
++  lt_unset=unset
++else
++  lt_unset=false
++fi
++
++
++
++
++
++# test EBCDIC or ASCII
++case `echo X|tr X '\101'` in
++ A) # ASCII based system
++    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
++  lt_SP2NL='tr \040 \012'
++  lt_NL2SP='tr \015\012 \040\040'
++  ;;
++ *) # EBCDIC based system
++  lt_SP2NL='tr \100 \n'
++  lt_NL2SP='tr \r\n \100\100'
++  ;;
++esac
++
++
++
++
++
++
++
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
++$as_echo_n "checking for $LD option to reload object files... " >&6; }
++if test "${lt_cv_ld_reload_flag+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_ld_reload_flag='-r'
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
++$as_echo "$lt_cv_ld_reload_flag" >&6; }
++reload_flag=$lt_cv_ld_reload_flag
++case $reload_flag in
++"" | " "*) ;;
++*) reload_flag=" $reload_flag" ;;
++esac
++reload_cmds='$LD$reload_flag -o $output$reload_objs'
++case $host_os in
++  darwin*)
++    if test "$GCC" = yes; then
++      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
++    else
++      reload_cmds='$LD$reload_flag -o $output$reload_objs'
++    fi
++    ;;
++esac
++
++
++
++
++
++
++
++
++
++if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
++set dummy ${ac_tool_prefix}objdump; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$OBJDUMP"; then
++  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++OBJDUMP=$ac_cv_prog_OBJDUMP
++if test -n "$OBJDUMP"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
++$as_echo "$OBJDUMP" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_OBJDUMP"; then
++  ac_ct_OBJDUMP=$OBJDUMP
++  # Extract the first word of "objdump", so it can be a program name with args.
++set dummy objdump; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_OBJDUMP"; then
++  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_OBJDUMP="objdump"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
++if test -n "$ac_ct_OBJDUMP"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
++$as_echo "$ac_ct_OBJDUMP" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_OBJDUMP" = x; then
++    OBJDUMP="false"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    OBJDUMP=$ac_ct_OBJDUMP
++  fi
++else
++  OBJDUMP="$ac_cv_prog_OBJDUMP"
++fi
++
++test -z "$OBJDUMP" && OBJDUMP=objdump
++
++
++
++
++
++
++
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
++$as_echo_n "checking how to recognize dependent libraries... " >&6; }
++if test "${lt_cv_deplibs_check_method+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_file_magic_cmd='$MAGIC_CMD'
++lt_cv_file_magic_test_file=
++lt_cv_deplibs_check_method='unknown'
++# Need to set the preceding variable on all platforms that support
++# interlibrary dependencies.
++# 'none' -- dependencies not supported.
++# `unknown' -- same as none, but documents that we really don't know.
++# 'pass_all' -- all dependencies passed with no checks.
++# 'test_compile' -- check by making test program.
++# 'file_magic [[regex]]' -- check by looking for files in library path
++# which responds to the $file_magic_cmd with a given extended regex.
++# If you have `file' or equivalent on your system and you're not sure
++# whether `pass_all' will *always* work, you probably want this one.
++
++case $host_os in
++aix[4-9]*)
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++
++beos*)
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++
++bsdi[45]*)
++  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
++  lt_cv_file_magic_cmd='/usr/bin/file -L'
++  lt_cv_file_magic_test_file=/shlib/libc.so
++  ;;
++
++cygwin*)
++  # func_win32_libid is a shell function defined in ltmain.sh
++  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
++  lt_cv_file_magic_cmd='func_win32_libid'
++  ;;
++
++mingw* | pw32*)
++  # Base MSYS/MinGW do not provide the 'file' command needed by
++  # func_win32_libid shell function, so use a weaker test based on 'objdump',
++  # unless we find 'file', for example because we are cross-compiling.
++  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
++  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
++    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
++    lt_cv_file_magic_cmd='func_win32_libid'
++  else
++    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
++    lt_cv_file_magic_cmd='$OBJDUMP -f'
++  fi
++  ;;
++
++cegcc*)
++  # use the weaker test based on 'objdump'. See mingw*.
++  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
++  lt_cv_file_magic_cmd='$OBJDUMP -f'
++  ;;
++
++darwin* | rhapsody*)
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++
++freebsd* | dragonfly*)
++  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
++    case $host_cpu in
++    i*86 )
++      # Not sure whether the presence of OpenBSD here was a mistake.
++      # Let's accept both of them until this is cleared up.
++      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
++      lt_cv_file_magic_cmd=/usr/bin/file
++      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
++      ;;
++    esac
++  else
++    lt_cv_deplibs_check_method=pass_all
++  fi
++  ;;
++
++gnu*)
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++
++haiku*)
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++
++hpux10.20* | hpux11*)
++  lt_cv_file_magic_cmd=/usr/bin/file
++  case $host_cpu in
++  ia64*)
++    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
++    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
++    ;;
++  hppa*64*)
++    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
++    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
++    ;;
++  *)
++    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
++    lt_cv_file_magic_test_file=/usr/lib/libc.sl
++    ;;
++  esac
++  ;;
++
++interix[3-9]*)
++  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
++  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
++  ;;
++
++irix5* | irix6* | nonstopux*)
++  case $LD in
++  *-32|*"-32 ") libmagic=32-bit;;
++  *-n32|*"-n32 ") libmagic=N32;;
++  *-64|*"-64 ") libmagic=64-bit;;
++  *) libmagic=never-match;;
++  esac
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++
++# This must be Linux ELF.
++linux* | k*bsd*-gnu | kopensolaris*-gnu)
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++
++netbsd*)
++  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
++    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
++  else
++    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
++  fi
++  ;;
++
++newos6*)
++  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
++  lt_cv_file_magic_cmd=/usr/bin/file
++  lt_cv_file_magic_test_file=/usr/lib/libnls.so
++  ;;
++
++*nto* | *qnx*)
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++
++openbsd*)
++  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
++  else
++    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
++  fi
++  ;;
++
++osf3* | osf4* | osf5*)
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++
++rdos*)
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++
++solaris*)
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++
++sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++
++sysv4 | sysv4.3*)
++  case $host_vendor in
++  motorola)
++    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
++    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
++    ;;
++  ncr)
++    lt_cv_deplibs_check_method=pass_all
++    ;;
++  sequent)
++    lt_cv_file_magic_cmd='/bin/file'
++    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
++    ;;
++  sni)
++    lt_cv_file_magic_cmd='/bin/file'
++    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
++    lt_cv_file_magic_test_file=/lib/libc.so
++    ;;
++  siemens)
++    lt_cv_deplibs_check_method=pass_all
++    ;;
++  pc)
++    lt_cv_deplibs_check_method=pass_all
++    ;;
++  esac
++  ;;
++
++tpf*)
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++esac
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
++$as_echo "$lt_cv_deplibs_check_method" >&6; }
++file_magic_cmd=$lt_cv_file_magic_cmd
++deplibs_check_method=$lt_cv_deplibs_check_method
++test -z "$deplibs_check_method" && deplibs_check_method=unknown
++
++
++
++
++
++
++
++
++
++
++
++
++if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
++set dummy ${ac_tool_prefix}ar; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_AR+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$AR"; then
++  ac_cv_prog_AR="$AR" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_AR="${ac_tool_prefix}ar"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++AR=$ac_cv_prog_AR
++if test -n "$AR"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
++$as_echo "$AR" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_AR"; then
++  ac_ct_AR=$AR
++  # Extract the first word of "ar", so it can be a program name with args.
++set dummy ar; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_AR"; then
++  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_AR="ar"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_AR=$ac_cv_prog_ac_ct_AR
++if test -n "$ac_ct_AR"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
++$as_echo "$ac_ct_AR" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_AR" = x; then
++    AR="false"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    AR=$ac_ct_AR
++  fi
++else
++  AR="$ac_cv_prog_AR"
++fi
++
++test -z "$AR" && AR=ar
++test -z "$AR_FLAGS" && AR_FLAGS=cru
++
++
++
++
++
++
++
++
++
++
++
++if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
++set dummy ${ac_tool_prefix}strip; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_STRIP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$STRIP"; then
++  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++STRIP=$ac_cv_prog_STRIP
++if test -n "$STRIP"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
++$as_echo "$STRIP" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_STRIP"; then
++  ac_ct_STRIP=$STRIP
++  # Extract the first word of "strip", so it can be a program name with args.
++set dummy strip; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_STRIP"; then
++  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_STRIP="strip"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
++if test -n "$ac_ct_STRIP"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
++$as_echo "$ac_ct_STRIP" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_STRIP" = x; then
++    STRIP=":"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    STRIP=$ac_ct_STRIP
++  fi
++else
++  STRIP="$ac_cv_prog_STRIP"
++fi
++
++test -z "$STRIP" && STRIP=:
++
++
++
++
++
++
++if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
++set dummy ${ac_tool_prefix}ranlib; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_RANLIB+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$RANLIB"; then
++  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++RANLIB=$ac_cv_prog_RANLIB
++if test -n "$RANLIB"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
++$as_echo "$RANLIB" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_RANLIB"; then
++  ac_ct_RANLIB=$RANLIB
++  # Extract the first word of "ranlib", so it can be a program name with args.
++set dummy ranlib; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_RANLIB"; then
++  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_RANLIB="ranlib"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
++if test -n "$ac_ct_RANLIB"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
++$as_echo "$ac_ct_RANLIB" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_RANLIB" = x; then
++    RANLIB=":"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    RANLIB=$ac_ct_RANLIB
++  fi
++else
++  RANLIB="$ac_cv_prog_RANLIB"
++fi
++
++test -z "$RANLIB" && RANLIB=:
++
++
++
++
++
++
++# Determine commands to create old-style static archives.
++old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
++old_postinstall_cmds='chmod 644 $oldlib'
++old_postuninstall_cmds=
++
++if test -n "$RANLIB"; then
++  case $host_os in
++  openbsd*)
++    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
++    ;;
++  *)
++    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
++    ;;
++  esac
++  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
++fi
++
++case $host_os in
++  darwin*)
++    lock_old_archive_extraction=yes ;;
++  *)
++    lock_old_archive_extraction=no ;;
++esac
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++# If no C compiler was specified, use CC.
++LTCC=${LTCC-"$CC"}
++
++# If no C compiler flags were specified, use CFLAGS.
++LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
++
++# Allow CC to be a program name with arguments.
++compiler=$CC
++
++
++# Check for command to grab the raw symbol name followed by C symbol from nm.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
++$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
++if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++# These are sane defaults that work on at least a few old systems.
++# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
++
++# Character class describing NM global symbol codes.
++symcode='[BCDEGRST]'
++
++# Regexp to match symbols that can be accessed directly from C.
++sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
++
++# Define system-specific variables.
++case $host_os in
++aix*)
++  symcode='[BCDT]'
++  ;;
++cygwin* | mingw* | pw32* | cegcc*)
++  symcode='[ABCDGISTW]'
++  ;;
++hpux*)
++  if test "$host_cpu" = ia64; then
++    symcode='[ABCDEGRST]'
++  fi
++  ;;
++irix* | nonstopux*)
++  symcode='[BCDEGRST]'
++  ;;
++osf*)
++  symcode='[BCDEGQRST]'
++  ;;
++solaris*)
++  symcode='[BDRT]'
++  ;;
++sco3.2v5*)
++  symcode='[DT]'
++  ;;
++sysv4.2uw2*)
++  symcode='[DT]'
++  ;;
++sysv5* | sco5v6* | unixware* | OpenUNIX*)
++  symcode='[ABDT]'
++  ;;
++sysv4)
++  symcode='[DFNSTU]'
++  ;;
++esac
++
++# If we're using GNU nm, then use its standard symbol codes.
++case `$NM -V 2>&1` in
++*GNU* | *'with BFD'*)
++  symcode='[ABCDGIRSTW]' ;;
++esac
++
++# Transform an extracted symbol line into a proper C declaration.
++# Some systems (esp. on ia64) link data and code symbols differently,
++# so use this general approach.
++lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
++
++# Transform an extracted symbol line into symbol name and symbol address
++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
++
++# Handle CRLF in mingw tool chain
++opt_cr=
++case $build_os in
++mingw*)
++  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
++  ;;
++esac
++
++# Try without a prefix underscore, then with it.
++for ac_symprfx in "" "_"; do
++
++  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
++  symxfrm="\\1 $ac_symprfx\\2 \\2"
++
++  # Write the raw and C identifiers.
++  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
++    # Fake it for dumpbin and say T for any non-static function
++    # and D for any global variable.
++    # Also find C++ and __fastcall symbols from MSVC++,
++    # which start with @ or ?.
++    lt_cv_sys_global_symbol_pipe="$AWK '"\
++"     {last_section=section; section=\$ 3};"\
++"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
++"     \$ 0!~/External *\|/{next};"\
++"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
++"     {if(hide[section]) next};"\
++"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
++"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
++"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
++"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
++"     ' prfx=^$ac_symprfx"
++  else
++    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[    ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
++  fi
++
++  # Check to see that the pipe works correctly.
++  pipe_works=no
++
++  rm -f conftest*
++  cat > conftest.$ac_ext <<_LT_EOF
++#ifdef __cplusplus
++extern "C" {
++#endif
++char nm_test_var;
++void nm_test_func(void);
++void nm_test_func(void){}
++#ifdef __cplusplus
++}
++#endif
++int main(){nm_test_var='a';nm_test_func();return(0);}
++_LT_EOF
++
++  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
++    # Now try to grab the symbols.
++    nlist=conftest.nm
++    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
++  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } && test -s "$nlist"; then
++      # Try sorting and uniquifying the output.
++      if sort "$nlist" | uniq > "$nlist"T; then
++      mv -f "$nlist"T "$nlist"
++      else
++      rm -f "$nlist"T
++      fi
++
++      # Make sure that we snagged all the symbols we need.
++      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
++      if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
++        cat <<_LT_EOF > conftest.$ac_ext
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++_LT_EOF
++        # Now generate the symbol file.
++        eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
++
++        cat <<_LT_EOF >> conftest.$ac_ext
++
++/* The mapping between symbol names and symbols.  */
++const struct {
++  const char *name;
++  void       *address;
++}
++lt__PROGRAM__LTX_preloaded_symbols[] =
++{
++  { "@PROGRAM@", (void *) 0 },
++_LT_EOF
++        $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
++        cat <<\_LT_EOF >> conftest.$ac_ext
++  {0, (void *) 0}
++};
++
++/* This works around a problem in FreeBSD linker */
++#ifdef FREEBSD_WORKAROUND
++static const void *lt_preloaded_setup() {
++  return lt__PROGRAM__LTX_preloaded_symbols;
++}
++#endif
++
++#ifdef __cplusplus
++}
++#endif
++_LT_EOF
++        # Now try linking the two files.
++        mv conftest.$ac_objext conftstm.$ac_objext
++        lt_save_LIBS="$LIBS"
++        lt_save_CFLAGS="$CFLAGS"
++        LIBS="conftstm.$ac_objext"
++        CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
++        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
++  (eval $ac_link) 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
++          pipe_works=yes
++        fi
++        LIBS="$lt_save_LIBS"
++        CFLAGS="$lt_save_CFLAGS"
++      else
++        echo "cannot find nm_test_func in $nlist" >&5
++      fi
++      else
++      echo "cannot find nm_test_var in $nlist" >&5
++      fi
++    else
++      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
++    fi
++  else
++    echo "$progname: failed program was:" >&5
++    cat conftest.$ac_ext >&5
++  fi
++  rm -rf conftest* conftst*
++
++  # Do not use the global_symbol_pipe unless it works.
++  if test "$pipe_works" = yes; then
++    break
++  else
++    lt_cv_sys_global_symbol_pipe=
++  fi
++done
++
++fi
++
++if test -z "$lt_cv_sys_global_symbol_pipe"; then
++  lt_cv_sys_global_symbol_to_cdecl=
++fi
++if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
++$as_echo "failed" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
++$as_echo "ok" >&6; }
++fi
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++# Check whether --enable-libtool-lock was given.
++if test "${enable_libtool_lock+set}" = set; then :
++  enableval=$enable_libtool_lock;
++fi
++
++test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
++
++# Some flags need to be propagated to the compiler or linker for good
++# libtool support.
++case $host in
++ia64-*-hpux*)
++  # Find out which ABI we are using.
++  echo 'int i;' > conftest.$ac_ext
++  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
++    case `/usr/bin/file conftest.$ac_objext` in
++      *ELF-32*)
++      HPUX_IA64_MODE="32"
++      ;;
++      *ELF-64*)
++      HPUX_IA64_MODE="64"
++      ;;
++    esac
++  fi
++  rm -rf conftest*
++  ;;
++*-*-irix6*)
++  # Find out which ABI we are using.
++  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
++  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
++    if test "$lt_cv_prog_gnu_ld" = yes; then
++      case `/usr/bin/file conftest.$ac_objext` in
++      *32-bit*)
++        LD="${LD-ld} -melf32bsmip"
++        ;;
++      *N32*)
++        LD="${LD-ld} -melf32bmipn32"
++        ;;
++      *64-bit*)
++        LD="${LD-ld} -melf64bmip"
++      ;;
++      esac
++    else
++      case `/usr/bin/file conftest.$ac_objext` in
++      *32-bit*)
++        LD="${LD-ld} -32"
++        ;;
++      *N32*)
++        LD="${LD-ld} -n32"
++        ;;
++      *64-bit*)
++        LD="${LD-ld} -64"
++        ;;
++      esac
++    fi
++  fi
++  rm -rf conftest*
++  ;;
++
++x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
++s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
++  # Find out which ABI we are using.
++  echo 'int i;' > conftest.$ac_ext
++  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
++    case `/usr/bin/file conftest.o` in
++      *32-bit*)
++      case $host in
++        x86_64-*kfreebsd*-gnu)
++          LD="${LD-ld} -m elf_i386_fbsd"
++          ;;
++        x86_64-*linux*)
++          case `/usr/bin/file conftest.o` in
++            *x86-64*)
++              LD="${LD-ld} -m elf32_x86_64"
++              ;;
++            *)
++              LD="${LD-ld} -m elf_i386"
++              ;;
++          esac
++          ;;
++        powerpc64le-*linux*)
++          LD="${LD-ld} -m elf32lppclinux"
++          ;;
++        powerpc64-*linux*)
++          LD="${LD-ld} -m elf32ppclinux"
++          ;;
++        s390x-*linux*)
++          LD="${LD-ld} -m elf_s390"
++          ;;
++        sparc64-*linux*)
++          LD="${LD-ld} -m elf32_sparc"
++          ;;
++      esac
++      ;;
++      *64-bit*)
++      case $host in
++        x86_64-*kfreebsd*-gnu)
++          LD="${LD-ld} -m elf_x86_64_fbsd"
++          ;;
++        x86_64-*linux*)
++          LD="${LD-ld} -m elf_x86_64"
++          ;;
++        powerpcle-*linux*)
++          LD="${LD-ld} -m elf64lppc"
++          ;;
++        powerpc-*linux*)
++          LD="${LD-ld} -m elf64ppc"
++          ;;
++        s390*-*linux*|s390*-*tpf*)
++          LD="${LD-ld} -m elf64_s390"
++          ;;
++        sparc*-*linux*)
++          LD="${LD-ld} -m elf64_sparc"
++          ;;
++      esac
++      ;;
++    esac
++  fi
++  rm -rf conftest*
++  ;;
++
++*-*-sco3.2v5*)
++  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
++  SAVE_CFLAGS="$CFLAGS"
++  CFLAGS="$CFLAGS -belf"
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
++$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
++if test "${lt_cv_cc_needs_belf+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  lt_cv_cc_needs_belf=yes
++else
++  lt_cv_cc_needs_belf=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++     ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
++$as_echo "$lt_cv_cc_needs_belf" >&6; }
++  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
++    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
++    CFLAGS="$SAVE_CFLAGS"
++  fi
++  ;;
++sparc*-*solaris*)
++  # Find out which ABI we are using.
++  echo 'int i;' > conftest.$ac_ext
++  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
++    case `/usr/bin/file conftest.o` in
++    *64-bit*)
++      case $lt_cv_prog_gnu_ld in
++      yes*) LD="${LD-ld} -m elf64_sparc" ;;
++      *)
++      if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
++        LD="${LD-ld} -64"
++      fi
++      ;;
++      esac
++      ;;
++    esac
++  fi
++  rm -rf conftest*
++  ;;
++esac
++
++need_locks="$enable_libtool_lock"
++
++
++  case $host_os in
++    rhapsody* | darwin*)
++    if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
++set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$DSYMUTIL"; then
++  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++DSYMUTIL=$ac_cv_prog_DSYMUTIL
++if test -n "$DSYMUTIL"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
++$as_echo "$DSYMUTIL" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_DSYMUTIL"; then
++  ac_ct_DSYMUTIL=$DSYMUTIL
++  # Extract the first word of "dsymutil", so it can be a program name with args.
++set dummy dsymutil; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_DSYMUTIL"; then
++  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
++if test -n "$ac_ct_DSYMUTIL"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
++$as_echo "$ac_ct_DSYMUTIL" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_DSYMUTIL" = x; then
++    DSYMUTIL=":"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    DSYMUTIL=$ac_ct_DSYMUTIL
++  fi
++else
++  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
++fi
++
++    if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
++set dummy ${ac_tool_prefix}nmedit; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_NMEDIT+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$NMEDIT"; then
++  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++NMEDIT=$ac_cv_prog_NMEDIT
++if test -n "$NMEDIT"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
++$as_echo "$NMEDIT" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_NMEDIT"; then
++  ac_ct_NMEDIT=$NMEDIT
++  # Extract the first word of "nmedit", so it can be a program name with args.
++set dummy nmedit; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_NMEDIT"; then
++  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_NMEDIT="nmedit"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
++if test -n "$ac_ct_NMEDIT"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
++$as_echo "$ac_ct_NMEDIT" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_NMEDIT" = x; then
++    NMEDIT=":"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    NMEDIT=$ac_ct_NMEDIT
++  fi
++else
++  NMEDIT="$ac_cv_prog_NMEDIT"
++fi
++
++    if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
++set dummy ${ac_tool_prefix}lipo; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_LIPO+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$LIPO"; then
++  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++LIPO=$ac_cv_prog_LIPO
++if test -n "$LIPO"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
++$as_echo "$LIPO" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_LIPO"; then
++  ac_ct_LIPO=$LIPO
++  # Extract the first word of "lipo", so it can be a program name with args.
++set dummy lipo; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_LIPO"; then
++  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_LIPO="lipo"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
++if test -n "$ac_ct_LIPO"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
++$as_echo "$ac_ct_LIPO" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_LIPO" = x; then
++    LIPO=":"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    LIPO=$ac_ct_LIPO
++  fi
++else
++  LIPO="$ac_cv_prog_LIPO"
++fi
++
++    if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
++set dummy ${ac_tool_prefix}otool; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_OTOOL+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$OTOOL"; then
++  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++OTOOL=$ac_cv_prog_OTOOL
++if test -n "$OTOOL"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
++$as_echo "$OTOOL" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_OTOOL"; then
++  ac_ct_OTOOL=$OTOOL
++  # Extract the first word of "otool", so it can be a program name with args.
++set dummy otool; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_OTOOL"; then
++  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_OTOOL="otool"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
++if test -n "$ac_ct_OTOOL"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
++$as_echo "$ac_ct_OTOOL" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_OTOOL" = x; then
++    OTOOL=":"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    OTOOL=$ac_ct_OTOOL
++  fi
++else
++  OTOOL="$ac_cv_prog_OTOOL"
++fi
++
++    if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
++set dummy ${ac_tool_prefix}otool64; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_OTOOL64+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$OTOOL64"; then
++  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++OTOOL64=$ac_cv_prog_OTOOL64
++if test -n "$OTOOL64"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
++$as_echo "$OTOOL64" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_OTOOL64"; then
++  ac_ct_OTOOL64=$OTOOL64
++  # Extract the first word of "otool64", so it can be a program name with args.
++set dummy otool64; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_OTOOL64"; then
++  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_OTOOL64="otool64"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
++if test -n "$ac_ct_OTOOL64"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
++$as_echo "$ac_ct_OTOOL64" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_OTOOL64" = x; then
++    OTOOL64=":"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    OTOOL64=$ac_ct_OTOOL64
++  fi
++else
++  OTOOL64="$ac_cv_prog_OTOOL64"
++fi
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
++$as_echo_n "checking for -single_module linker flag... " >&6; }
++if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_apple_cc_single_mod=no
++      if test -z "${LT_MULTI_MODULE}"; then
++      # By default we will add the -single_module flag. You can override
++      # by either setting the environment variable LT_MULTI_MODULE
++      # non-empty at configure time, or by adding -multi_module to the
++      # link flags.
++      rm -rf libconftest.dylib*
++      echo "int foo(void){return 1;}" > conftest.c
++      echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
++-dynamiclib -Wl,-single_module conftest.c" >&5
++      $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
++        -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
++        _lt_result=$?
++      if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
++        lt_cv_apple_cc_single_mod=yes
++      else
++        cat conftest.err >&5
++      fi
++      rm -rf libconftest.dylib*
++      rm -f conftest.*
++      fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
++$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
++$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
++if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_ld_exported_symbols_list=no
++      save_LDFLAGS=$LDFLAGS
++      echo "_main" > conftest.sym
++      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  lt_cv_ld_exported_symbols_list=yes
++else
++  lt_cv_ld_exported_symbols_list=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++      LDFLAGS="$save_LDFLAGS"
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
++$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
++$as_echo_n "checking for -force_load linker flag... " >&6; }
++if test "${lt_cv_ld_force_load+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_ld_force_load=no
++      cat > conftest.c << _LT_EOF
++int forced_loaded() { return 2;}
++_LT_EOF
++      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
++      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
++      echo "$AR cru libconftest.a conftest.o" >&5
++      $AR cru libconftest.a conftest.o 2>&5
++      cat > conftest.c << _LT_EOF
++int main() { return 0;}
++_LT_EOF
++      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
++      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
++      _lt_result=$?
++      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
++      lt_cv_ld_force_load=yes
++      else
++      cat conftest.err >&5
++      fi
++        rm -f conftest.err libconftest.a conftest conftest.c
++        rm -rf conftest.dSYM
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
++$as_echo "$lt_cv_ld_force_load" >&6; }
++    case $host_os in
++    rhapsody* | darwin1.[012])
++      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
++    darwin1.*)
++      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
++    darwin*) # darwin 5.x on
++      # if running on 10.5 or later, the deployment target defaults
++      # to the OS version, if on x86, and 10.4, the deployment
++      # target defaults to 10.4. Don't you love it?
++      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
++      10.0,*86*-darwin8*|10.0,*-darwin[91]*)
++        _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
++      10.[012][,.]*)
++        _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
++      10.*)
++        _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
++      esac
++    ;;
++  esac
++    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
++      _lt_dar_single_mod='$single_module'
++    fi
++    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
++      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
++    else
++      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
++    fi
++    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
++      _lt_dsymutil='~$DSYMUTIL $lib || :'
++    else
++      _lt_dsymutil=
++    fi
++    ;;
++  esac
++
++for ac_header in dlfcn.h
++do :
++  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
++"
++if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_DLFCN_H 1
++_ACEOF
++
++fi
++
++done
++
++
++
++
++
++# Set options
++
++
++
++        enable_dlopen=no
++
++
++  enable_win32_dll=no
++
++
++            # Check whether --enable-shared was given.
++if test "${enable_shared+set}" = set; then :
++  enableval=$enable_shared; p=${PACKAGE-default}
++    case $enableval in
++    yes) enable_shared=yes ;;
++    no) enable_shared=no ;;
++    *)
++      enable_shared=no
++      # Look at the argument we got.  We use all the common list separators.
++      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
++      for pkg in $enableval; do
++      IFS="$lt_save_ifs"
++      if test "X$pkg" = "X$p"; then
++        enable_shared=yes
++      fi
++      done
++      IFS="$lt_save_ifs"
++      ;;
++    esac
++else
++  enable_shared=yes
++fi
++
++
++
++
++
++
++
++
++
++  # Check whether --enable-static was given.
++if test "${enable_static+set}" = set; then :
++  enableval=$enable_static; p=${PACKAGE-default}
++    case $enableval in
++    yes) enable_static=yes ;;
++    no) enable_static=no ;;
++    *)
++     enable_static=no
++      # Look at the argument we got.  We use all the common list separators.
++      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
++      for pkg in $enableval; do
++      IFS="$lt_save_ifs"
++      if test "X$pkg" = "X$p"; then
++        enable_static=yes
++      fi
++      done
++      IFS="$lt_save_ifs"
++      ;;
++    esac
++else
++  enable_static=yes
++fi
++
++
++
++
++
++
++
++
++
++
++# Check whether --with-pic was given.
++if test "${with_pic+set}" = set; then :
++  withval=$with_pic; pic_mode="$withval"
++else
++  pic_mode=default
++fi
++
++
++test -z "$pic_mode" && pic_mode=default
++
++
++
++
++
++
++
++  # Check whether --enable-fast-install was given.
++if test "${enable_fast_install+set}" = set; then :
++  enableval=$enable_fast_install; p=${PACKAGE-default}
++    case $enableval in
++    yes) enable_fast_install=yes ;;
++    no) enable_fast_install=no ;;
++    *)
++      enable_fast_install=no
++      # Look at the argument we got.  We use all the common list separators.
++      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
++      for pkg in $enableval; do
++      IFS="$lt_save_ifs"
++      if test "X$pkg" = "X$p"; then
++        enable_fast_install=yes
++      fi
++      done
++      IFS="$lt_save_ifs"
++      ;;
++    esac
++else
++  enable_fast_install=yes
++fi
++
++
++
++
++
++
++
++
++
++
++
++# This can be used to rebuild libtool when needed
++LIBTOOL_DEPS="$ltmain"
++
++# Always use our own libtool.
++LIBTOOL='$(SHELL) $(top_builddir)/libtool'
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++test -z "$LN_S" && LN_S="ln -s"
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++if test -n "${ZSH_VERSION+set}" ; then
++   setopt NO_GLOB_SUBST
++fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
++$as_echo_n "checking for objdir... " >&6; }
++if test "${lt_cv_objdir+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  rm -f .libs 2>/dev/null
++mkdir .libs 2>/dev/null
++if test -d .libs; then
++  lt_cv_objdir=.libs
++else
++  # MS-DOS does not allow filenames that begin with a dot.
++  lt_cv_objdir=_libs
++fi
++rmdir .libs 2>/dev/null
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
++$as_echo "$lt_cv_objdir" >&6; }
++objdir=$lt_cv_objdir
++
++
++
++
++
++cat >>confdefs.h <<_ACEOF
++#define LT_OBJDIR "$lt_cv_objdir/"
++_ACEOF
++
++
++
++
++case $host_os in
++aix3*)
++  # AIX sometimes has problems with the GCC collect2 program.  For some
++  # reason, if we set the COLLECT_NAMES environment variable, the problems
++  # vanish in a puff of smoke.
++  if test "X${COLLECT_NAMES+set}" != Xset; then
++    COLLECT_NAMES=
++    export COLLECT_NAMES
++  fi
++  ;;
++esac
++
++# Global variables:
++ofile=libtool
++can_build_shared=yes
++
++# All known linkers require a `.a' archive for static linking (except MSVC,
++# which needs '.lib').
++libext=a
++
++with_gnu_ld="$lt_cv_prog_gnu_ld"
++
++old_CC="$CC"
++old_CFLAGS="$CFLAGS"
++
++# Set sane defaults for various variables
++test -z "$CC" && CC=cc
++test -z "$LTCC" && LTCC=$CC
++test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
++test -z "$LD" && LD=ld
++test -z "$ac_objext" && ac_objext=o
++
++for cc_temp in $compiler""; do
++  case $cc_temp in
++    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
++    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
++    \-*) ;;
++    *) break;;
++  esac
++done
++cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
++
++
++# Only perform the check for file, if the check method requires it
++test -z "$MAGIC_CMD" && MAGIC_CMD=file
++case $deplibs_check_method in
++file_magic*)
++  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
++$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
++if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  case $MAGIC_CMD in
++[\\/*] |  ?:[\\/]*)
++  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
++  ;;
++*)
++  lt_save_MAGIC_CMD="$MAGIC_CMD"
++  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
++  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
++  for ac_dir in $ac_dummy; do
++    IFS="$lt_save_ifs"
++    test -z "$ac_dir" && ac_dir=.
++    if test -f $ac_dir/${ac_tool_prefix}file; then
++      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
++      if test -n "$file_magic_test_file"; then
++      case $deplibs_check_method in
++      "file_magic "*)
++        file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
++        MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
++        if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
++          $EGREP "$file_magic_regex" > /dev/null; then
++          :
++        else
++          cat <<_LT_EOF 1>&2
++
++*** Warning: the command libtool uses to detect shared libraries,
++*** $file_magic_cmd, produces output that libtool cannot recognize.
++*** The result is that libtool may fail to recognize shared libraries
++*** as such.  This will affect the creation of libtool libraries that
++*** depend on shared libraries, but programs linked with such libtool
++*** libraries will work regardless of this problem.  Nevertheless, you
++*** may want to report the problem to your system manager and/or to
++*** bug-libtool@gnu.org
++
++_LT_EOF
++        fi ;;
++      esac
++      fi
++      break
++    fi
++  done
++  IFS="$lt_save_ifs"
++  MAGIC_CMD="$lt_save_MAGIC_CMD"
++  ;;
++esac
++fi
++
++MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
++if test -n "$MAGIC_CMD"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
++$as_echo "$MAGIC_CMD" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++
++
++
++if test -z "$lt_cv_path_MAGIC_CMD"; then
++  if test -n "$ac_tool_prefix"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
++$as_echo_n "checking for file... " >&6; }
++if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  case $MAGIC_CMD in
++[\\/*] |  ?:[\\/]*)
++  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
++  ;;
++*)
++  lt_save_MAGIC_CMD="$MAGIC_CMD"
++  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
++  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
++  for ac_dir in $ac_dummy; do
++    IFS="$lt_save_ifs"
++    test -z "$ac_dir" && ac_dir=.
++    if test -f $ac_dir/file; then
++      lt_cv_path_MAGIC_CMD="$ac_dir/file"
++      if test -n "$file_magic_test_file"; then
++      case $deplibs_check_method in
++      "file_magic "*)
++        file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
++        MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
++        if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
++          $EGREP "$file_magic_regex" > /dev/null; then
++          :
++        else
++          cat <<_LT_EOF 1>&2
++
++*** Warning: the command libtool uses to detect shared libraries,
++*** $file_magic_cmd, produces output that libtool cannot recognize.
++*** The result is that libtool may fail to recognize shared libraries
++*** as such.  This will affect the creation of libtool libraries that
++*** depend on shared libraries, but programs linked with such libtool
++*** libraries will work regardless of this problem.  Nevertheless, you
++*** may want to report the problem to your system manager and/or to
++*** bug-libtool@gnu.org
++
++_LT_EOF
++        fi ;;
++      esac
++      fi
++      break
++    fi
++  done
++  IFS="$lt_save_ifs"
++  MAGIC_CMD="$lt_save_MAGIC_CMD"
++  ;;
++esac
++fi
++
++MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
++if test -n "$MAGIC_CMD"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
++$as_echo "$MAGIC_CMD" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++  else
++    MAGIC_CMD=:
++  fi
++fi
++
++  fi
++  ;;
++esac
++
++# Use C for the default configuration in the libtool script
++
++lt_save_CC="$CC"
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++
++# Source file extension for C test sources.
++ac_ext=c
++
++# Object file extension for compiled C test sources.
++objext=o
++objext=$objext
++
++# Code to be used in simple compile tests
++lt_simple_compile_test_code="int some_variable = 0;"
++
++# Code to be used in simple link tests
++lt_simple_link_test_code='int main(){return(0);}'
++
++
++
++
++
++
++
++# If no C compiler was specified, use CC.
++LTCC=${LTCC-"$CC"}
++
++# If no C compiler flags were specified, use CFLAGS.
++LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
++
++# Allow CC to be a program name with arguments.
++compiler=$CC
++
++# Save the default compiler, since it gets overwritten when the other
++# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
++compiler_DEFAULT=$CC
++
++# save warnings/boilerplate of simple test code
++ac_outfile=conftest.$ac_objext
++echo "$lt_simple_compile_test_code" >conftest.$ac_ext
++eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
++_lt_compiler_boilerplate=`cat conftest.err`
++$RM conftest*
++
++ac_outfile=conftest.$ac_objext
++echo "$lt_simple_link_test_code" >conftest.$ac_ext
++eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
++_lt_linker_boilerplate=`cat conftest.err`
++$RM -r conftest*
++
++
++## CAVEAT EMPTOR:
++## There is no encapsulation within the following macros, do not change
++## the running order or otherwise move them around unless you know exactly
++## what you are doing...
++if test -n "$compiler"; then
++
++lt_prog_compiler_no_builtin_flag=
++
++if test "$GCC" = yes; then
++  case $cc_basename in
++  nvcc*)
++    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
++  *)
++    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
++  esac
++
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
++$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
++if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_prog_compiler_rtti_exceptions=no
++   ac_outfile=conftest.$ac_objext
++   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
++   lt_compiler_flag="-fno-rtti -fno-exceptions"
++   # Insert the option either (1) after the last *FLAGS variable, or
++   # (2) before a word containing "conftest.", or (3) at the end.
++   # Note that $ac_compile itself does not contain backslashes and begins
++   # with a dollar sign (not a hyphen), so the echo should work correctly.
++   # The option is referenced via a variable to avoid confusing sed.
++   lt_compile=`echo "$ac_compile" | $SED \
++   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
++   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
++   -e 's:$: $lt_compiler_flag:'`
++   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
++   (eval "$lt_compile" 2>conftest.err)
++   ac_status=$?
++   cat conftest.err >&5
++   echo "$as_me:$LINENO: \$? = $ac_status" >&5
++   if (exit $ac_status) && test -s "$ac_outfile"; then
++     # The compiler can only warn and ignore the option if not recognized
++     # So say no if there are warnings other than the usual output.
++     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
++     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
++     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
++       lt_cv_prog_compiler_rtti_exceptions=yes
++     fi
++   fi
++   $RM conftest*
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
++$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
++
++if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
++    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
++else
++    :
++fi
++
++fi
++
++
++
++
++
++
++  lt_prog_compiler_wl=
++lt_prog_compiler_pic=
++lt_prog_compiler_static=
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
++$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
++
++  if test "$GCC" = yes; then
++    lt_prog_compiler_wl='-Wl,'
++    lt_prog_compiler_static='-static'
++
++    case $host_os in
++      aix*)
++      # All AIX code is PIC.
++      if test "$host_cpu" = ia64; then
++      # AIX 5 now supports IA64 processor
++      lt_prog_compiler_static='-Bstatic'
++      fi
++      lt_prog_compiler_pic='-fPIC'
++      ;;
++
++    amigaos*)
++      case $host_cpu in
++      powerpc)
++            # see comment about AmigaOS4 .so support
++            lt_prog_compiler_pic='-fPIC'
++        ;;
++      m68k)
++            # FIXME: we need at least 68020 code to build shared libraries, but
++            # adding the `-m68020' flag to GCC prevents building anything better,
++            # like `-m68040'.
++            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
++        ;;
++      esac
++      ;;
++
++    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
++      # PIC is the default for these OSes.
++      ;;
++
++    mingw* | cygwin* | pw32* | os2* | cegcc*)
++      # This hack is so that the source file can tell whether it is being
++      # built for inclusion in a dll (and should export symbols for example).
++      # Although the cygwin gcc ignores -fPIC, still need this for old-style
++      # (--disable-auto-import) libraries
++      lt_prog_compiler_pic='-DDLL_EXPORT'
++      ;;
++
++    darwin* | rhapsody*)
++      # PIC is the default on this platform
++      # Common symbols not allowed in MH_DYLIB files
++      lt_prog_compiler_pic='-fno-common'
++      ;;
++
++    haiku*)
++      # PIC is the default for Haiku.
++      # The "-static" flag exists, but is broken.
++      lt_prog_compiler_static=
++      ;;
++
++    hpux*)
++      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
++      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
++      # sets the default TLS model and affects inlining.
++      case $host_cpu in
++      hppa*64*)
++      # +Z the default
++      ;;
++      *)
++      lt_prog_compiler_pic='-fPIC'
++      ;;
++      esac
++      ;;
++
++    interix[3-9]*)
++      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
++      # Instead, we relocate shared libraries at runtime.
++      ;;
++
++    msdosdjgpp*)
++      # Just because we use GCC doesn't mean we suddenly get shared libraries
++      # on systems that don't support them.
++      lt_prog_compiler_can_build_shared=no
++      enable_shared=no
++      ;;
++
++    *nto* | *qnx*)
++      # QNX uses GNU C++, but need to define -shared option too, otherwise
++      # it will coredump.
++      lt_prog_compiler_pic='-fPIC -shared'
++      ;;
++
++    sysv4*MP*)
++      if test -d /usr/nec; then
++      lt_prog_compiler_pic=-Kconform_pic
++      fi
++      ;;
++
++    *)
++      lt_prog_compiler_pic='-fPIC'
++      ;;
++    esac
++
++    case $cc_basename in
++    nvcc*) # Cuda Compiler Driver 2.2
++      lt_prog_compiler_wl='-Xlinker '
++      lt_prog_compiler_pic='-Xcompiler -fPIC'
++      ;;
++    esac
++  else
++    # PORTME Check for flag to pass linker flags through the system compiler.
++    case $host_os in
++    aix*)
++      lt_prog_compiler_wl='-Wl,'
++      if test "$host_cpu" = ia64; then
++      # AIX 5 now supports IA64 processor
++      lt_prog_compiler_static='-Bstatic'
++      else
++      lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
++      fi
++      ;;
++
++    mingw* | cygwin* | pw32* | os2* | cegcc*)
++      # This hack is so that the source file can tell whether it is being
++      # built for inclusion in a dll (and should export symbols for example).
++      lt_prog_compiler_pic='-DDLL_EXPORT'
++      ;;
++
++    hpux9* | hpux10* | hpux11*)
++      lt_prog_compiler_wl='-Wl,'
++      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
++      # not for PA HP-UX.
++      case $host_cpu in
++      hppa*64*|ia64*)
++      # +Z the default
++      ;;
++      *)
++      lt_prog_compiler_pic='+Z'
++      ;;
++      esac
++      # Is there a better lt_prog_compiler_static that works with the bundled CC?
++      lt_prog_compiler_static='${wl}-a ${wl}archive'
++      ;;
++
++    irix5* | irix6* | nonstopux*)
++      lt_prog_compiler_wl='-Wl,'
++      # PIC (with -KPIC) is the default.
++      lt_prog_compiler_static='-non_shared'
++      ;;
++
++    linux* | k*bsd*-gnu | kopensolaris*-gnu)
++      case $cc_basename in
++      # old Intel for x86_64 which still supported -KPIC.
++      ecc*)
++      lt_prog_compiler_wl='-Wl,'
++      lt_prog_compiler_pic='-KPIC'
++      lt_prog_compiler_static='-static'
++        ;;
++      # icc used to be incompatible with GCC.
++      # ICC 10 doesn't accept -KPIC any more.
++      icc* | ifort*)
++      lt_prog_compiler_wl='-Wl,'
++      lt_prog_compiler_pic='-fPIC'
++      lt_prog_compiler_static='-static'
++        ;;
++      # Lahey Fortran 8.1.
++      lf95*)
++      lt_prog_compiler_wl='-Wl,'
++      lt_prog_compiler_pic='--shared'
++      lt_prog_compiler_static='--static'
++      ;;
++      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
++        # Portland Group compilers (*not* the Pentium gcc compiler,
++      # which looks to be a dead project)
++      lt_prog_compiler_wl='-Wl,'
++      lt_prog_compiler_pic='-fpic'
++      lt_prog_compiler_static='-Bstatic'
++        ;;
++      ccc*)
++        lt_prog_compiler_wl='-Wl,'
++        # All Alpha code is PIC.
++        lt_prog_compiler_static='-non_shared'
++        ;;
++      xl* | bgxl* | bgf* | mpixl*)
++      # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
++      lt_prog_compiler_wl='-Wl,'
++      lt_prog_compiler_pic='-qpic'
++      lt_prog_compiler_static='-qstaticlink'
++      ;;
++      *)
++      case `$CC -V 2>&1 | sed 5q` in
++      *Sun\ F* | *Sun*Fortran*)
++        # Sun Fortran 8.3 passes all unrecognized flags to the linker
++        lt_prog_compiler_pic='-KPIC'
++        lt_prog_compiler_static='-Bstatic'
++        lt_prog_compiler_wl=''
++        ;;
++      *Sun\ C*)
++        # Sun C 5.9
++        lt_prog_compiler_pic='-KPIC'
++        lt_prog_compiler_static='-Bstatic'
++        lt_prog_compiler_wl='-Wl,'
++        ;;
++      esac
++      ;;
++      esac
++      ;;
++
++    newsos6)
++      lt_prog_compiler_pic='-KPIC'
++      lt_prog_compiler_static='-Bstatic'
++      ;;
++
++    *nto* | *qnx*)
++      # QNX uses GNU C++, but need to define -shared option too, otherwise
++      # it will coredump.
++      lt_prog_compiler_pic='-fPIC -shared'
++      ;;
++
++    osf3* | osf4* | osf5*)
++      lt_prog_compiler_wl='-Wl,'
++      # All OSF/1 code is PIC.
++      lt_prog_compiler_static='-non_shared'
++      ;;
++
++    rdos*)
++      lt_prog_compiler_static='-non_shared'
++      ;;
++
++    solaris*)
++      lt_prog_compiler_pic='-KPIC'
++      lt_prog_compiler_static='-Bstatic'
++      case $cc_basename in
++      f77* | f90* | f95*)
++      lt_prog_compiler_wl='-Qoption ld ';;
++      *)
++      lt_prog_compiler_wl='-Wl,';;
++      esac
++      ;;
++
++    sunos4*)
++      lt_prog_compiler_wl='-Qoption ld '
++      lt_prog_compiler_pic='-PIC'
++      lt_prog_compiler_static='-Bstatic'
++      ;;
++
++    sysv4 | sysv4.2uw2* | sysv4.3*)
++      lt_prog_compiler_wl='-Wl,'
++      lt_prog_compiler_pic='-KPIC'
++      lt_prog_compiler_static='-Bstatic'
++      ;;
++
++    sysv4*MP*)
++      if test -d /usr/nec ;then
++      lt_prog_compiler_pic='-Kconform_pic'
++      lt_prog_compiler_static='-Bstatic'
++      fi
++      ;;
++
++    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
++      lt_prog_compiler_wl='-Wl,'
++      lt_prog_compiler_pic='-KPIC'
++      lt_prog_compiler_static='-Bstatic'
++      ;;
++
++    unicos*)
++      lt_prog_compiler_wl='-Wl,'
++      lt_prog_compiler_can_build_shared=no
++      ;;
++
++    uts4*)
++      lt_prog_compiler_pic='-pic'
++      lt_prog_compiler_static='-Bstatic'
++      ;;
++
++    *)
++      lt_prog_compiler_can_build_shared=no
++      ;;
++    esac
++  fi
++
++case $host_os in
++  # For platforms which do not support PIC, -DPIC is meaningless:
++  *djgpp*)
++    lt_prog_compiler_pic=
++    ;;
++  *)
++    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
++    ;;
++esac
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
++$as_echo "$lt_prog_compiler_pic" >&6; }
++
++
++
++
++
++
++#
++# Check to make sure the PIC flag actually works.
++#
++if test -n "$lt_prog_compiler_pic"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
++$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
++if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_prog_compiler_pic_works=no
++   ac_outfile=conftest.$ac_objext
++   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
++   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
++   # Insert the option either (1) after the last *FLAGS variable, or
++   # (2) before a word containing "conftest.", or (3) at the end.
++   # Note that $ac_compile itself does not contain backslashes and begins
++   # with a dollar sign (not a hyphen), so the echo should work correctly.
++   # The option is referenced via a variable to avoid confusing sed.
++   lt_compile=`echo "$ac_compile" | $SED \
++   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
++   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
++   -e 's:$: $lt_compiler_flag:'`
++   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
++   (eval "$lt_compile" 2>conftest.err)
++   ac_status=$?
++   cat conftest.err >&5
++   echo "$as_me:$LINENO: \$? = $ac_status" >&5
++   if (exit $ac_status) && test -s "$ac_outfile"; then
++     # The compiler can only warn and ignore the option if not recognized
++     # So say no if there are warnings other than the usual output.
++     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
++     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
++     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
++       lt_cv_prog_compiler_pic_works=yes
++     fi
++   fi
++   $RM conftest*
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
++$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
++
++if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
++    case $lt_prog_compiler_pic in
++     "" | " "*) ;;
++     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
++     esac
++else
++    lt_prog_compiler_pic=
++     lt_prog_compiler_can_build_shared=no
++fi
++
++fi
++
++
++
++
++
++
++#
++# Check to make sure the static flag actually works.
++#
++wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
++$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
++if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_prog_compiler_static_works=no
++   save_LDFLAGS="$LDFLAGS"
++   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
++   echo "$lt_simple_link_test_code" > conftest.$ac_ext
++   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
++     # The linker can only warn and ignore the option if not recognized
++     # So say no if there are warnings
++     if test -s conftest.err; then
++       # Append any errors to the config.log.
++       cat conftest.err 1>&5
++       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
++       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
++       if diff conftest.exp conftest.er2 >/dev/null; then
++         lt_cv_prog_compiler_static_works=yes
++       fi
++     else
++       lt_cv_prog_compiler_static_works=yes
++     fi
++   fi
++   $RM -r conftest*
++   LDFLAGS="$save_LDFLAGS"
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
++$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
++
++if test x"$lt_cv_prog_compiler_static_works" = xyes; then
++    :
++else
++    lt_prog_compiler_static=
++fi
++
++
++
++
++
++
++
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
++$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
++if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_prog_compiler_c_o=no
++   $RM -r conftest 2>/dev/null
++   mkdir conftest
++   cd conftest
++   mkdir out
++   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
++
++   lt_compiler_flag="-o out/conftest2.$ac_objext"
++   # Insert the option either (1) after the last *FLAGS variable, or
++   # (2) before a word containing "conftest.", or (3) at the end.
++   # Note that $ac_compile itself does not contain backslashes and begins
++   # with a dollar sign (not a hyphen), so the echo should work correctly.
++   lt_compile=`echo "$ac_compile" | $SED \
++   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
++   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
++   -e 's:$: $lt_compiler_flag:'`
++   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
++   (eval "$lt_compile" 2>out/conftest.err)
++   ac_status=$?
++   cat out/conftest.err >&5
++   echo "$as_me:$LINENO: \$? = $ac_status" >&5
++   if (exit $ac_status) && test -s out/conftest2.$ac_objext
++   then
++     # The compiler can only warn and ignore the option if not recognized
++     # So say no if there are warnings
++     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
++     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
++     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
++       lt_cv_prog_compiler_c_o=yes
++     fi
++   fi
++   chmod u+w . 2>&5
++   $RM conftest*
++   # SGI C++ compiler will create directory out/ii_files/ for
++   # template instantiation
++   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
++   $RM out/* && rmdir out
++   cd ..
++   $RM -r conftest
++   $RM conftest*
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
++$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
++
++
++
++
++
++
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
++$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
++if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_prog_compiler_c_o=no
++   $RM -r conftest 2>/dev/null
++   mkdir conftest
++   cd conftest
++   mkdir out
++   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
++
++   lt_compiler_flag="-o out/conftest2.$ac_objext"
++   # Insert the option either (1) after the last *FLAGS variable, or
++   # (2) before a word containing "conftest.", or (3) at the end.
++   # Note that $ac_compile itself does not contain backslashes and begins
++   # with a dollar sign (not a hyphen), so the echo should work correctly.
++   lt_compile=`echo "$ac_compile" | $SED \
++   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
++   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
++   -e 's:$: $lt_compiler_flag:'`
++   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
++   (eval "$lt_compile" 2>out/conftest.err)
++   ac_status=$?
++   cat out/conftest.err >&5
++   echo "$as_me:$LINENO: \$? = $ac_status" >&5
++   if (exit $ac_status) && test -s out/conftest2.$ac_objext
++   then
++     # The compiler can only warn and ignore the option if not recognized
++     # So say no if there are warnings
++     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
++     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
++     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
++       lt_cv_prog_compiler_c_o=yes
++     fi
++   fi
++   chmod u+w . 2>&5
++   $RM conftest*
++   # SGI C++ compiler will create directory out/ii_files/ for
++   # template instantiation
++   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
++   $RM out/* && rmdir out
++   cd ..
++   $RM -r conftest
++   $RM conftest*
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
++$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
++
++
++
++
++hard_links="nottested"
++if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
++  # do not overwrite the value of need_locks provided by the user
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
++$as_echo_n "checking if we can lock with hard links... " >&6; }
++  hard_links=yes
++  $RM conftest*
++  ln conftest.a conftest.b 2>/dev/null && hard_links=no
++  touch conftest.a
++  ln conftest.a conftest.b 2>&5 || hard_links=no
++  ln conftest.a conftest.b 2>/dev/null && hard_links=no
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
++$as_echo "$hard_links" >&6; }
++  if test "$hard_links" = no; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
++$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
++    need_locks=warn
++  fi
++else
++  need_locks=no
++fi
++
++
++
++
++
++
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
++$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
++
++  runpath_var=
++  allow_undefined_flag=
++  always_export_symbols=no
++  archive_cmds=
++  archive_expsym_cmds=
++  compiler_needs_object=no
++  enable_shared_with_static_runtimes=no
++  export_dynamic_flag_spec=
++  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
++  hardcode_automatic=no
++  hardcode_direct=no
++  hardcode_direct_absolute=no
++  hardcode_libdir_flag_spec=
++  hardcode_libdir_flag_spec_ld=
++  hardcode_libdir_separator=
++  hardcode_minus_L=no
++  hardcode_shlibpath_var=unsupported
++  inherit_rpath=no
++  link_all_deplibs=unknown
++  module_cmds=
++  module_expsym_cmds=
++  old_archive_from_new_cmds=
++  old_archive_from_expsyms_cmds=
++  thread_safe_flag_spec=
++  whole_archive_flag_spec=
++  # include_expsyms should be a list of space-separated symbols to be *always*
++  # included in the symbol list
++  include_expsyms=
++  # exclude_expsyms can be an extended regexp of symbols to exclude
++  # it will be wrapped by ` (' and `)$', so one must not match beginning or
++  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
++  # as well as any symbol that contains `d'.
++  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
++  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
++  # platforms (ab)use it in PIC code, but their linkers get confused if
++  # the symbol is explicitly referenced.  Since portable code cannot
++  # rely on this symbol name, it's probably fine to never include it in
++  # preloaded symbol tables.
++  # Exclude shared library initialization/finalization symbols.
++  extract_expsyms_cmds=
++
++  case $host_os in
++  cygwin* | mingw* | pw32* | cegcc*)
++    # FIXME: the MSVC++ port hasn't been tested in a loooong time
++    # When not using gcc, we currently assume that we are using
++    # Microsoft Visual C++.
++    if test "$GCC" != yes; then
++      with_gnu_ld=no
++    fi
++    ;;
++  interix*)
++    # we just hope/assume this is gcc and not c89 (= MSVC++)
++    with_gnu_ld=yes
++    ;;
++  openbsd*)
++    with_gnu_ld=no
++    ;;
++  esac
++
++  ld_shlibs=yes
++
++  # On some targets, GNU ld is compatible enough with the native linker
++  # that we're better off using the native interface for both.
++  lt_use_gnu_ld_interface=no
++  if test "$with_gnu_ld" = yes; then
++    case $host_os in
++      aix*)
++      # The AIX port of GNU ld has always aspired to compatibility
++      # with the native linker.  However, as the warning in the GNU ld
++      # block says, versions before 2.19.5* couldn't really create working
++      # shared libraries, regardless of the interface used.
++      case `$LD -v 2>&1` in
++        *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
++        *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
++        *\ \(GNU\ Binutils\)\ [3-9]*) ;;
++        *)
++          lt_use_gnu_ld_interface=yes
++          ;;
++      esac
++      ;;
++      *)
++      lt_use_gnu_ld_interface=yes
++      ;;
++    esac
++  fi
++
++  if test "$lt_use_gnu_ld_interface" = yes; then
++    # If archive_cmds runs LD, not CC, wlarc should be empty
++    wlarc='${wl}'
++
++    # Set some defaults for GNU ld with shared library support. These
++    # are reset later if shared libraries are not supported. Putting them
++    # here allows them to be overridden if necessary.
++    runpath_var=LD_RUN_PATH
++    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
++    export_dynamic_flag_spec='${wl}--export-dynamic'
++    # ancient GNU ld didn't support --whole-archive et. al.
++    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
++      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
++    else
++      whole_archive_flag_spec=
++    fi
++    supports_anon_versioning=no
++    case `$LD -v 2>&1` in
++      *GNU\ gold*) supports_anon_versioning=yes ;;
++      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
++      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
++      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
++      *\ 2.11.*) ;; # other 2.11 versions
++      *) supports_anon_versioning=yes ;;
++    esac
++
++    # See if GNU ld supports shared libraries.
++    case $host_os in
++    aix[3-9]*)
++      # On AIX/PPC, the GNU linker is very broken
++      if test "$host_cpu" != ia64; then
++      ld_shlibs=no
++      cat <<_LT_EOF 1>&2
++
++*** Warning: the GNU linker, at least up to release 2.19, is reported
++*** to be unable to reliably create shared libraries on AIX.
++*** Therefore, libtool is disabling shared libraries support.  If you
++*** really care for shared libraries, you may want to install binutils
++*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
++*** You will then need to restart the configuration process.
++
++_LT_EOF
++      fi
++      ;;
++
++    amigaos*)
++      case $host_cpu in
++      powerpc)
++            # see comment about AmigaOS4 .so support
++            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++            archive_expsym_cmds=''
++        ;;
++      m68k)
++            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
++            hardcode_libdir_flag_spec='-L$libdir'
++            hardcode_minus_L=yes
++        ;;
++      esac
++      ;;
++
++    beos*)
++      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
++      allow_undefined_flag=unsupported
++      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
++      # support --undefined.  This deserves some investigation.  FIXME
++      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      else
++      ld_shlibs=no
++      fi
++      ;;
++
++    cygwin* | mingw* | pw32* | cegcc*)
++      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
++      # as there is no search path for DLLs.
++      hardcode_libdir_flag_spec='-L$libdir'
++      export_dynamic_flag_spec='${wl}--export-all-symbols'
++      allow_undefined_flag=unsupported
++      always_export_symbols=no
++      enable_shared_with_static_runtimes=yes
++      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
++
++      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
++        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
++      # If the export-symbols file already is a .def file (1st line
++      # is EXPORTS), use it as is; otherwise, prepend...
++      archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
++        cp $export_symbols $output_objdir/$soname.def;
++      else
++        echo EXPORTS > $output_objdir/$soname.def;
++        cat $export_symbols >> $output_objdir/$soname.def;
++      fi~
++      $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
++      else
++      ld_shlibs=no
++      fi
++      ;;
++
++    haiku*)
++      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      link_all_deplibs=yes
++      ;;
++
++    interix[3-9]*)
++      hardcode_direct=no
++      hardcode_shlibpath_var=no
++      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
++      export_dynamic_flag_spec='${wl}-E'
++      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
++      # Instead, shared libraries are loaded at an image base (0x10000000 by
++      # default) and relocated if they conflict, which is a slow very memory
++      # consuming and fragmenting process.  To avoid this, we pick a random,
++      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
++      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
++      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
++      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
++      ;;
++
++    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
++      tmp_diet=no
++      if test "$host_os" = linux-dietlibc; then
++      case $cc_basename in
++        diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
++      esac
++      fi
++      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
++       && test "$tmp_diet" = no
++      then
++      tmp_addflag=' $pic_flag'
++      tmp_sharedflag='-shared'
++      case $cc_basename,$host_cpu in
++        pgcc*)                                # Portland Group C compiler
++        whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
++        tmp_addflag=' $pic_flag'
++        ;;
++      pgf77* | pgf90* | pgf95* | pgfortran*)
++                                      # Portland Group f77 and f90 compilers
++        whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
++        tmp_addflag=' $pic_flag -Mnomain' ;;
++      ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
++        tmp_addflag=' -i_dynamic' ;;
++      efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
++        tmp_addflag=' -i_dynamic -nofor_main' ;;
++      ifc* | ifort*)                  # Intel Fortran compiler
++        tmp_addflag=' -nofor_main' ;;
++      lf95*)                          # Lahey Fortran 8.1
++        whole_archive_flag_spec=
++        tmp_sharedflag='--shared' ;;
++      xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
++        tmp_sharedflag='-qmkshrobj'
++        tmp_addflag= ;;
++      nvcc*)  # Cuda Compiler Driver 2.2
++        whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
++        compiler_needs_object=yes
++        ;;
++      esac
++      case `$CC -V 2>&1 | sed 5q` in
++      *Sun\ C*)                       # Sun C 5.9
++        whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
++        compiler_needs_object=yes
++        tmp_sharedflag='-G' ;;
++      *Sun\ F*)                       # Sun Fortran 8.3
++        tmp_sharedflag='-G' ;;
++      esac
++      archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++
++        if test "x$supports_anon_versioning" = xyes; then
++          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
++          cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
++          echo "local: *; };" >> $output_objdir/$libname.ver~
++          $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
++        fi
++
++      case $cc_basename in
++      xlf* | bgf* | bgxlf* | mpixlf*)
++        # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
++        whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
++        hardcode_libdir_flag_spec=
++        hardcode_libdir_flag_spec_ld='-rpath $libdir'
++        archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
++        if test "x$supports_anon_versioning" = xyes; then
++          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
++            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
++            echo "local: *; };" >> $output_objdir/$libname.ver~
++            $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
++        fi
++        ;;
++      esac
++      else
++        ld_shlibs=no
++      fi
++      ;;
++
++    netbsd*)
++      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
++      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
++      wlarc=
++      else
++      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      fi
++      ;;
++
++    solaris*)
++      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
++      ld_shlibs=no
++      cat <<_LT_EOF 1>&2
++
++*** Warning: The releases 2.8.* of the GNU linker cannot reliably
++*** create shared libraries on Solaris systems.  Therefore, libtool
++*** is disabling shared libraries support.  We urge you to upgrade GNU
++*** binutils to release 2.9.1 or newer.  Another option is to modify
++*** your PATH or compiler configuration so that the native linker is
++*** used, and then restart.
++
++_LT_EOF
++      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
++      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      else
++      ld_shlibs=no
++      fi
++      ;;
++
++    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
++      case `$LD -v 2>&1` in
++        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
++      ld_shlibs=no
++      cat <<_LT_EOF 1>&2
++
++*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
++*** reliably create shared libraries on SCO systems.  Therefore, libtool
++*** is disabling shared libraries support.  We urge you to upgrade GNU
++*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
++*** your PATH or compiler configuration so that the native linker is
++*** used, and then restart.
++
++_LT_EOF
++      ;;
++      *)
++        # For security reasons, it is highly recommended that you always
++        # use absolute paths for naming shared libraries, and exclude the
++        # DT_RUNPATH tag from executables and libraries.  But doing so
++        # requires that you compile everything twice, which is a pain.
++        if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
++          hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
++          archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++          archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++        else
++          ld_shlibs=no
++        fi
++      ;;
++      esac
++      ;;
++
++    sunos4*)
++      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
++      wlarc=
++      hardcode_direct=yes
++      hardcode_shlibpath_var=no
++      ;;
++
++    *)
++      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
++      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      else
++      ld_shlibs=no
++      fi
++      ;;
++    esac
++
++    if test "$ld_shlibs" = no; then
++      runpath_var=
++      hardcode_libdir_flag_spec=
++      export_dynamic_flag_spec=
++      whole_archive_flag_spec=
++    fi
++  else
++    # PORTME fill in a description of your system's linker (not GNU ld)
++    case $host_os in
++    aix3*)
++      allow_undefined_flag=unsupported
++      always_export_symbols=yes
++      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
++      # Note: this linker hardcodes the directories in LIBPATH if there
++      # are no directories specified by -L.
++      hardcode_minus_L=yes
++      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
++      # Neither direct hardcoding nor static linking is supported with a
++      # broken collect2.
++      hardcode_direct=unsupported
++      fi
++      ;;
++
++    aix[4-9]*)
++      if test "$host_cpu" = ia64; then
++      # On IA64, the linker does run time linking by default, so we don't
++      # have to do anything special.
++      aix_use_runtimelinking=no
++      exp_sym_flag='-Bexport'
++      no_entry_flag=""
++      else
++      # If we're using GNU nm, then we don't want the "-C" option.
++      # -C means demangle to AIX nm, but means don't demangle with GNU nm
++      # Also, AIX nm treats weak defined symbols like other global
++      # defined symbols, whereas GNU nm marks them as "W".
++      if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
++        export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++      else
++        export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++      fi
++      aix_use_runtimelinking=no
++
++      # Test if we are trying to use run time linking or normal
++      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
++      # need to do runtime linking.
++      case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
++        for ld_flag in $LDFLAGS; do
++        if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
++          aix_use_runtimelinking=yes
++          break
++        fi
++        done
++        ;;
++      esac
++
++      exp_sym_flag='-bexport'
++      no_entry_flag='-bnoentry'
++      fi
++
++      # When large executables or shared objects are built, AIX ld can
++      # have problems creating the table of contents.  If linking a library
++      # or program results in "error TOC overflow" add -mminimal-toc to
++      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
++      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
++
++      archive_cmds=''
++      hardcode_direct=yes
++      hardcode_direct_absolute=yes
++      hardcode_libdir_separator=':'
++      link_all_deplibs=yes
++      file_list_spec='${wl}-f,'
++
++      if test "$GCC" = yes; then
++      case $host_os in aix4.[012]|aix4.[012].*)
++      # We only want to do this on AIX 4.2 and lower, the check
++      # below for broken collect2 doesn't work under 4.3+
++        collect2name=`${CC} -print-prog-name=collect2`
++        if test -f "$collect2name" &&
++         strings "$collect2name" | $GREP resolve_lib_name >/dev/null
++        then
++        # We have reworked collect2
++        :
++        else
++        # We have old collect2
++        hardcode_direct=unsupported
++        # It fails to find uninstalled libraries when the uninstalled
++        # path is not listed in the libpath.  Setting hardcode_minus_L
++        # to unsupported forces relinking
++        hardcode_minus_L=yes
++        hardcode_libdir_flag_spec='-L$libdir'
++        hardcode_libdir_separator=
++        fi
++        ;;
++      esac
++      shared_flag='-shared'
++      if test "$aix_use_runtimelinking" = yes; then
++        shared_flag="$shared_flag "'${wl}-G'
++      fi
++      else
++      # not using gcc
++      if test "$host_cpu" = ia64; then
++      # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
++      # chokes on -Wl,-G. The following line is correct:
++        shared_flag='-G'
++      else
++        if test "$aix_use_runtimelinking" = yes; then
++          shared_flag='${wl}-G'
++        else
++          shared_flag='${wl}-bM:SRE'
++        fi
++      fi
++      fi
++
++      export_dynamic_flag_spec='${wl}-bexpall'
++      # It seems that -bexpall does not export symbols beginning with
++      # underscore (_), so it is better to generate a list of symbols to export.
++      always_export_symbols=yes
++      if test "$aix_use_runtimelinking" = yes; then
++      # Warning - without using the other runtime loading flags (-brtl),
++      # -berok will link without error, but may produce a broken library.
++      allow_undefined_flag='-berok'
++        # Determine the default libpath from the value encoded in an
++        # empty executable.
++        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++
++lt_aix_libpath_sed='
++    /Import File Strings/,/^$/ {
++      /^0/ {
++          s/^0  *\(.*\)$/\1/
++          p
++      }
++    }'
++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++# Check for a 64-bit object if we didn't find anything.
++if test -z "$aix_libpath"; then
++  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++fi
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
++
++        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
++        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
++      else
++      if test "$host_cpu" = ia64; then
++        hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
++        allow_undefined_flag="-z nodefs"
++        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
++      else
++       # Determine the default libpath from the value encoded in an
++       # empty executable.
++       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++
++lt_aix_libpath_sed='
++    /Import File Strings/,/^$/ {
++      /^0/ {
++          s/^0  *\(.*\)$/\1/
++          p
++      }
++    }'
++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++# Check for a 64-bit object if we didn't find anything.
++if test -z "$aix_libpath"; then
++  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++fi
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
++
++       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
++        # Warning - without using the other run time loading flags,
++        # -berok will link without error, but may produce a broken library.
++        no_undefined_flag=' ${wl}-bernotok'
++        allow_undefined_flag=' ${wl}-berok'
++        if test "$with_gnu_ld" = yes; then
++          # We only use this code for GNU lds that support --whole-archive.
++          whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
++        else
++          # Exported symbols can be pulled into shared objects from archives
++          whole_archive_flag_spec='$convenience'
++        fi
++        archive_cmds_need_lc=yes
++        # This is similar to how AIX traditionally builds its shared libraries.
++        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
++      fi
++      fi
++      ;;
++
++    amigaos*)
++      case $host_cpu in
++      powerpc)
++            # see comment about AmigaOS4 .so support
++            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++            archive_expsym_cmds=''
++        ;;
++      m68k)
++            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
++            hardcode_libdir_flag_spec='-L$libdir'
++            hardcode_minus_L=yes
++        ;;
++      esac
++      ;;
++
++    bsdi[45]*)
++      export_dynamic_flag_spec=-rdynamic
++      ;;
++
++    cygwin* | mingw* | pw32* | cegcc*)
++      # When not using gcc, we currently assume that we are using
++      # Microsoft Visual C++.
++      # hardcode_libdir_flag_spec is actually meaningless, as there is
++      # no search path for DLLs.
++      hardcode_libdir_flag_spec=' '
++      allow_undefined_flag=unsupported
++      # Tell ltmain to make .lib files, not .a files.
++      libext=lib
++      # Tell ltmain to make .dll files, not .so files.
++      shrext_cmds=".dll"
++      # FIXME: Setting linknames here is a bad hack.
++      archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
++      # The linker will automatically build a .lib file if we build a DLL.
++      old_archive_from_new_cmds='true'
++      # FIXME: Should let the user specify the lib program.
++      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
++      fix_srcfile_path='`cygpath -w "$srcfile"`'
++      enable_shared_with_static_runtimes=yes
++      ;;
++
++    darwin* | rhapsody*)
++
++
++  archive_cmds_need_lc=no
++  hardcode_direct=no
++  hardcode_automatic=yes
++  hardcode_shlibpath_var=unsupported
++  if test "$lt_cv_ld_force_load" = "yes"; then
++    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
++  else
++    whole_archive_flag_spec=''
++  fi
++  link_all_deplibs=yes
++  allow_undefined_flag="$_lt_dar_allow_undefined"
++  case $cc_basename in
++     ifort*) _lt_dar_can_shared=yes ;;
++     *) _lt_dar_can_shared=$GCC ;;
++  esac
++  if test "$_lt_dar_can_shared" = "yes"; then
++    output_verbose_link_cmd=func_echo_all
++    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
++    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
++    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++    module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
++
++  else
++  ld_shlibs=no
++  fi
++
++      ;;
++
++    dgux*)
++      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++      hardcode_libdir_flag_spec='-L$libdir'
++      hardcode_shlibpath_var=no
++      ;;
++
++    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
++    # support.  Future versions do this automatically, but an explicit c++rt0.o
++    # does not break anything, and helps significantly (at the cost of a little
++    # extra space).
++    freebsd2.2*)
++      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
++      hardcode_libdir_flag_spec='-R$libdir'
++      hardcode_direct=yes
++      hardcode_shlibpath_var=no
++      ;;
++
++    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
++    freebsd2.*)
++      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
++      hardcode_direct=yes
++      hardcode_minus_L=yes
++      hardcode_shlibpath_var=no
++      ;;
++
++    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
++    freebsd* | dragonfly*)
++      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
++      hardcode_libdir_flag_spec='-R$libdir'
++      hardcode_direct=yes
++      hardcode_shlibpath_var=no
++      ;;
++
++    hpux9*)
++      if test "$GCC" = yes; then
++      archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
++      else
++      archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
++      fi
++      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
++      hardcode_libdir_separator=:
++      hardcode_direct=yes
++
++      # hardcode_minus_L: Not really in the search PATH,
++      # but as the default location of the library.
++      hardcode_minus_L=yes
++      export_dynamic_flag_spec='${wl}-E'
++      ;;
++
++    hpux10*)
++      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
++      archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
++      else
++      archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
++      fi
++      if test "$with_gnu_ld" = no; then
++      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
++      hardcode_libdir_flag_spec_ld='+b $libdir'
++      hardcode_libdir_separator=:
++      hardcode_direct=yes
++      hardcode_direct_absolute=yes
++      export_dynamic_flag_spec='${wl}-E'
++      # hardcode_minus_L: Not really in the search PATH,
++      # but as the default location of the library.
++      hardcode_minus_L=yes
++      fi
++      ;;
++
++    hpux11*)
++      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
++      case $host_cpu in
++      hppa*64*)
++        archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
++        ;;
++      ia64*)
++        archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
++        ;;
++      *)
++        archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
++        ;;
++      esac
++      else
++      case $host_cpu in
++      hppa*64*)
++        archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
++        ;;
++      ia64*)
++        archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
++        ;;
++      *)
++
++        # Older versions of the 11.00 compiler do not understand -b yet
++        # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
++$as_echo_n "checking if $CC understands -b... " >&6; }
++if test "${lt_cv_prog_compiler__b+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_prog_compiler__b=no
++   save_LDFLAGS="$LDFLAGS"
++   LDFLAGS="$LDFLAGS -b"
++   echo "$lt_simple_link_test_code" > conftest.$ac_ext
++   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
++     # The linker can only warn and ignore the option if not recognized
++     # So say no if there are warnings
++     if test -s conftest.err; then
++       # Append any errors to the config.log.
++       cat conftest.err 1>&5
++       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
++       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
++       if diff conftest.exp conftest.er2 >/dev/null; then
++         lt_cv_prog_compiler__b=yes
++       fi
++     else
++       lt_cv_prog_compiler__b=yes
++     fi
++   fi
++   $RM -r conftest*
++   LDFLAGS="$save_LDFLAGS"
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
++$as_echo "$lt_cv_prog_compiler__b" >&6; }
++
++if test x"$lt_cv_prog_compiler__b" = xyes; then
++    archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
++else
++    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
++fi
++
++        ;;
++      esac
++      fi
++      if test "$with_gnu_ld" = no; then
++      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
++      hardcode_libdir_separator=:
++
++      case $host_cpu in
++      hppa*64*|ia64*)
++        hardcode_direct=no
++        hardcode_shlibpath_var=no
++        ;;
++      *)
++        hardcode_direct=yes
++        hardcode_direct_absolute=yes
++        export_dynamic_flag_spec='${wl}-E'
++
++        # hardcode_minus_L: Not really in the search PATH,
++        # but as the default location of the library.
++        hardcode_minus_L=yes
++        ;;
++      esac
++      fi
++      ;;
++
++    irix5* | irix6* | nonstopux*)
++      if test "$GCC" = yes; then
++      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++      # Try to use the -exported_symbol ld option, if it does not
++      # work, assume that -exports_file does not work either and
++      # implicitly export all symbols.
++        save_LDFLAGS="$LDFLAGS"
++        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
++        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++int foo(void) {}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
++
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++        LDFLAGS="$save_LDFLAGS"
++      else
++      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
++      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
++      fi
++      archive_cmds_need_lc='no'
++      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
++      hardcode_libdir_separator=:
++      inherit_rpath=yes
++      link_all_deplibs=yes
++      ;;
++
++    netbsd*)
++      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
++      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
++      else
++      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
++      fi
++      hardcode_libdir_flag_spec='-R$libdir'
++      hardcode_direct=yes
++      hardcode_shlibpath_var=no
++      ;;
++
++    newsos6)
++      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++      hardcode_direct=yes
++      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
++      hardcode_libdir_separator=:
++      hardcode_shlibpath_var=no
++      ;;
++
++    *nto* | *qnx*)
++      ;;
++
++    openbsd*)
++      if test -f /usr/libexec/ld.so; then
++      hardcode_direct=yes
++      hardcode_shlibpath_var=no
++      hardcode_direct_absolute=yes
++      if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++        archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
++        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
++        export_dynamic_flag_spec='${wl}-E'
++      else
++        case $host_os in
++         openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
++           archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
++           hardcode_libdir_flag_spec='-R$libdir'
++           ;;
++         *)
++           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++           hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
++           ;;
++        esac
++      fi
++      else
++      ld_shlibs=no
++      fi
++      ;;
++
++    os2*)
++      hardcode_libdir_flag_spec='-L$libdir'
++      hardcode_minus_L=yes
++      allow_undefined_flag=unsupported
++      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
++      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
++      ;;
++
++    osf3*)
++      if test "$GCC" = yes; then
++      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
++      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++      else
++      allow_undefined_flag=' -expect_unresolved \*'
++      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
++      fi
++      archive_cmds_need_lc='no'
++      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
++      hardcode_libdir_separator=:
++      ;;
++
++    osf4* | osf5*)    # as osf3* with the addition of -msym flag
++      if test "$GCC" = yes; then
++      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
++      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
++      else
++      allow_undefined_flag=' -expect_unresolved \*'
++      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
++      archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
++      $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
++
++      # Both c and cxx compiler support -rpath directly
++      hardcode_libdir_flag_spec='-rpath $libdir'
++      fi
++      archive_cmds_need_lc='no'
++      hardcode_libdir_separator=:
++      ;;
++
++    solaris*)
++      no_undefined_flag=' -z defs'
++      if test "$GCC" = yes; then
++      wlarc='${wl}'
++      archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
++      archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
++        $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
++      else
++      case `$CC -V 2>&1` in
++      *"Compilers 5.0"*)
++        wlarc=''
++        archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
++        archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
++        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
++        ;;
++      *)
++        wlarc='${wl}'
++        archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
++        archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
++        $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
++        ;;
++      esac
++      fi
++      hardcode_libdir_flag_spec='-R$libdir'
++      hardcode_shlibpath_var=no
++      case $host_os in
++      solaris2.[0-5] | solaris2.[0-5].*) ;;
++      *)
++      # The compiler driver will combine and reorder linker options,
++      # but understands `-z linker_flag'.  GCC discards it without `$wl',
++      # but is careful enough not to reorder.
++      # Supported since Solaris 2.6 (maybe 2.5.1?)
++      if test "$GCC" = yes; then
++        whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
++      else
++        whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
++      fi
++      ;;
++      esac
++      link_all_deplibs=yes
++      ;;
++
++    sunos4*)
++      if test "x$host_vendor" = xsequent; then
++      # Use $CC to link under sequent, because it throws in some extra .o
++      # files that make .init and .fini sections work.
++      archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
++      else
++      archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
++      fi
++      hardcode_libdir_flag_spec='-L$libdir'
++      hardcode_direct=yes
++      hardcode_minus_L=yes
++      hardcode_shlibpath_var=no
++      ;;
++
++    sysv4)
++      case $host_vendor in
++      sni)
++        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++        hardcode_direct=yes # is this really true???
++      ;;
++      siemens)
++        ## LD is ld it makes a PLAMLIB
++        ## CC just makes a GrossModule.
++        archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
++        reload_cmds='$CC -r -o $output$reload_objs'
++        hardcode_direct=no
++        ;;
++      motorola)
++        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++        hardcode_direct=no #Motorola manual says yes, but my tests say they lie
++      ;;
++      esac
++      runpath_var='LD_RUN_PATH'
++      hardcode_shlibpath_var=no
++      ;;
++
++    sysv4.3*)
++      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++      hardcode_shlibpath_var=no
++      export_dynamic_flag_spec='-Bexport'
++      ;;
++
++    sysv4*MP*)
++      if test -d /usr/nec; then
++      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++      hardcode_shlibpath_var=no
++      runpath_var=LD_RUN_PATH
++      hardcode_runpath_var=yes
++      ld_shlibs=yes
++      fi
++      ;;
++
++    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
++      no_undefined_flag='${wl}-z,text'
++      archive_cmds_need_lc=no
++      hardcode_shlibpath_var=no
++      runpath_var='LD_RUN_PATH'
++
++      if test "$GCC" = yes; then
++      archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++      archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++      else
++      archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++      archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++      fi
++      ;;
++
++    sysv5* | sco3.2v5* | sco5v6*)
++      # Note: We can NOT use -z defs as we might desire, because we do not
++      # link with -lc, and that would cause any symbols used from libc to
++      # always be unresolved, which means just about no library would
++      # ever link correctly.  If we're not using GNU ld we use -z text
++      # though, which does catch some bad symbols but isn't as heavy-handed
++      # as -z defs.
++      no_undefined_flag='${wl}-z,text'
++      allow_undefined_flag='${wl}-z,nodefs'
++      archive_cmds_need_lc=no
++      hardcode_shlibpath_var=no
++      hardcode_libdir_flag_spec='${wl}-R,$libdir'
++      hardcode_libdir_separator=':'
++      link_all_deplibs=yes
++      export_dynamic_flag_spec='${wl}-Bexport'
++      runpath_var='LD_RUN_PATH'
++
++      if test "$GCC" = yes; then
++      archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++      archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++      else
++      archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++      archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++      fi
++      ;;
++
++    uts4*)
++      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++      hardcode_libdir_flag_spec='-L$libdir'
++      hardcode_shlibpath_var=no
++      ;;
++
++    *)
++      ld_shlibs=no
++      ;;
++    esac
++
++    if test x$host_vendor = xsni; then
++      case $host in
++      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
++      export_dynamic_flag_spec='${wl}-Blargedynsym'
++      ;;
++      esac
++    fi
++  fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
++$as_echo "$ld_shlibs" >&6; }
++test "$ld_shlibs" = no && can_build_shared=no
++
++with_gnu_ld=$with_gnu_ld
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++#
++# Do we need to explicitly link libc?
++#
++case "x$archive_cmds_need_lc" in
++x|xyes)
++  # Assume -lc should be added
++  archive_cmds_need_lc=yes
++
++  if test "$enable_shared" = yes && test "$GCC" = yes; then
++    case $archive_cmds in
++    *'~'*)
++      # FIXME: we may have to deal with multi-command sequences.
++      ;;
++    '$CC '*)
++      # Test whether the compiler implicitly links with -lc since on some
++      # systems, -lgcc has to come before -lc. If gcc already passes -lc
++      # to ld, don't add -lc before -lgcc.
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
++$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
++if test "${lt_cv_archive_cmds_need_lc+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  $RM conftest*
++      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
++
++      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
++  (eval $ac_compile) 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } 2>conftest.err; then
++        soname=conftest
++        lib=conftest
++        libobjs=conftest.$ac_objext
++        deplibs=
++        wl=$lt_prog_compiler_wl
++        pic_flag=$lt_prog_compiler_pic
++        compiler_flags=-v
++        linker_flags=-v
++        verstring=
++        output_objdir=.
++        libname=conftest
++        lt_save_allow_undefined_flag=$allow_undefined_flag
++        allow_undefined_flag=
++        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
++  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }
++        then
++          lt_cv_archive_cmds_need_lc=no
++        else
++          lt_cv_archive_cmds_need_lc=yes
++        fi
++        allow_undefined_flag=$lt_save_allow_undefined_flag
++      else
++        cat conftest.err 1>&5
++      fi
++      $RM conftest*
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
++$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
++      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
++      ;;
++    esac
++  fi
++  ;;
++esac
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
++$as_echo_n "checking dynamic linker characteristics... " >&6; }
++
++if test "$GCC" = yes; then
++  case $host_os in
++    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
++    *) lt_awk_arg="/^libraries:/" ;;
++  esac
++  case $host_os in
++    mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
++    *) lt_sed_strip_eq="s,=/,/,g" ;;
++  esac
++  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
++  case $lt_search_path_spec in
++  *\;*)
++    # if the path contains ";" then we assume it to be the separator
++    # otherwise default to the standard path separator (i.e. ":") - it is
++    # assumed that no part of a normal pathname contains ";" but that should
++    # okay in the real world where ";" in dirpaths is itself problematic.
++    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
++    ;;
++  *)
++    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
++    ;;
++  esac
++  # Ok, now we have the path, separated by spaces, we can step through it
++  # and add multilib dir if necessary.
++  lt_tmp_lt_search_path_spec=
++  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
++  for lt_sys_path in $lt_search_path_spec; do
++    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
++      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
++    else
++      test -d "$lt_sys_path" && \
++      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
++    fi
++  done
++  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
++BEGIN {RS=" "; FS="/|\n";} {
++  lt_foo="";
++  lt_count=0;
++  for (lt_i = NF; lt_i > 0; lt_i--) {
++    if ($lt_i != "" && $lt_i != ".") {
++      if ($lt_i == "..") {
++        lt_count++;
++      } else {
++        if (lt_count == 0) {
++          lt_foo="/" $lt_i lt_foo;
++        } else {
++          lt_count--;
++        }
++      }
++    }
++  }
++  if (lt_foo != "") { lt_freq[lt_foo]++; }
++  if (lt_freq[lt_foo] == 1) { print lt_foo; }
++}'`
++  # AWK program above erroneously prepends '/' to C:/dos/paths
++  # for these hosts.
++  case $host_os in
++    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
++      $SED 's,/\([A-Za-z]:\),\1,g'` ;;
++  esac
++  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
++else
++  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
++fi
++library_names_spec=
++libname_spec='lib$name'
++soname_spec=
++shrext_cmds=".so"
++postinstall_cmds=
++postuninstall_cmds=
++finish_cmds=
++finish_eval=
++shlibpath_var=
++shlibpath_overrides_runpath=unknown
++version_type=none
++dynamic_linker="$host_os ld.so"
++sys_lib_dlsearch_path_spec="/lib /usr/lib"
++need_lib_prefix=unknown
++hardcode_into_libs=no
++
++# when you set need_version to no, make sure it does not cause -set_version
++# flags to be left without arguments
++need_version=unknown
++
++case $host_os in
++aix3*)
++  version_type=linux
++  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
++  shlibpath_var=LIBPATH
++
++  # AIX 3 has no versioning support, so we append a major version to the name.
++  soname_spec='${libname}${release}${shared_ext}$major'
++  ;;
++
++aix[4-9]*)
++  version_type=linux
++  need_lib_prefix=no
++  need_version=no
++  hardcode_into_libs=yes
++  if test "$host_cpu" = ia64; then
++    # AIX 5 supports IA64
++    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
++    shlibpath_var=LD_LIBRARY_PATH
++  else
++    # With GCC up to 2.95.x, collect2 would create an import file
++    # for dependence libraries.  The import file would start with
++    # the line `#! .'.  This would cause the generated library to
++    # depend on `.', always an invalid library.  This was fixed in
++    # development snapshots of GCC prior to 3.0.
++    case $host_os in
++      aix4 | aix4.[01] | aix4.[01].*)
++      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
++         echo ' yes '
++         echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
++      :
++      else
++      can_build_shared=no
++      fi
++      ;;
++    esac
++    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
++    # soname into executable. Probably we can add versioning support to
++    # collect2, so additional links can be useful in future.
++    if test "$aix_use_runtimelinking" = yes; then
++      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
++      # instead of lib<name>.a to let people know that these are not
++      # typical AIX shared libraries.
++      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++    else
++      # We preserve .a as extension for shared libraries through AIX4.2
++      # and later when we are not doing run time linking.
++      library_names_spec='${libname}${release}.a $libname.a'
++      soname_spec='${libname}${release}${shared_ext}$major'
++    fi
++    shlibpath_var=LIBPATH
++  fi
++  ;;
++
++amigaos*)
++  case $host_cpu in
++  powerpc)
++    # Since July 2007 AmigaOS4 officially supports .so libraries.
++    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
++    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++    ;;
++  m68k)
++    library_names_spec='$libname.ixlibrary $libname.a'
++    # Create ${libname}_ixlibrary.a entries in /sys/libs.
++    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
++    ;;
++  esac
++  ;;
++
++beos*)
++  library_names_spec='${libname}${shared_ext}'
++  dynamic_linker="$host_os ld.so"
++  shlibpath_var=LIBRARY_PATH
++  ;;
++
++bsdi[45]*)
++  version_type=linux
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
++  shlibpath_var=LD_LIBRARY_PATH
++  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
++  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
++  # the default ld.so.conf also contains /usr/contrib/lib and
++  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
++  # libtool to hard-code these into programs
++  ;;
++
++cygwin* | mingw* | pw32* | cegcc*)
++  version_type=windows
++  shrext_cmds=".dll"
++  need_version=no
++  need_lib_prefix=no
++
++  case $GCC,$host_os in
++  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
++    library_names_spec='$libname.dll.a'
++    # DLL is installed to $(libdir)/../bin by postinstall_cmds
++    postinstall_cmds='base_file=`basename \${file}`~
++      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
++      dldir=$destdir/`dirname \$dlpath`~
++      test -d \$dldir || mkdir -p \$dldir~
++      $install_prog $dir/$dlname \$dldir/$dlname~
++      chmod a+x \$dldir/$dlname~
++      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
++        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
++      fi'
++    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
++      dlpath=$dir/\$dldll~
++       $RM \$dlpath'
++    shlibpath_overrides_runpath=yes
++
++    case $host_os in
++    cygwin*)
++      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
++      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
++
++      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
++      ;;
++    mingw* | cegcc*)
++      # MinGW DLLs use traditional 'lib' prefix
++      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
++      ;;
++    pw32*)
++      # pw32 DLLs use 'pw' prefix rather than 'lib'
++      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
++      ;;
++    esac
++    ;;
++
++  *)
++    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
++    ;;
++  esac
++  dynamic_linker='Win32 ld.exe'
++  # FIXME: first we should search . and the directory the executable is in
++  shlibpath_var=PATH
++  ;;
++
++darwin* | rhapsody*)
++  dynamic_linker="$host_os dyld"
++  version_type=darwin
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
++  soname_spec='${libname}${release}${major}$shared_ext'
++  shlibpath_overrides_runpath=yes
++  shlibpath_var=DYLD_LIBRARY_PATH
++  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
++
++  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
++  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
++  ;;
++
++dgux*)
++  version_type=linux
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  shlibpath_var=LD_LIBRARY_PATH
++  ;;
++
++freebsd* | dragonfly*)
++  # DragonFly does not have aout.  When/if they implement a new
++  # versioning mechanism, adjust this.
++  if test -x /usr/bin/objformat; then
++    objformat=`/usr/bin/objformat`
++  else
++    case $host_os in
++    freebsd[23].*) objformat=aout ;;
++    *) objformat=elf ;;
++    esac
++  fi
++  version_type=freebsd-$objformat
++  case $version_type in
++    freebsd-elf*)
++      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
++      need_version=no
++      need_lib_prefix=no
++      ;;
++    freebsd-*)
++      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
++      need_version=yes
++      ;;
++  esac
++  shlibpath_var=LD_LIBRARY_PATH
++  case $host_os in
++  freebsd2.*)
++    shlibpath_overrides_runpath=yes
++    ;;
++  freebsd3.[01]* | freebsdelf3.[01]*)
++    shlibpath_overrides_runpath=yes
++    hardcode_into_libs=yes
++    ;;
++  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
++  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
++    shlibpath_overrides_runpath=no
++    hardcode_into_libs=yes
++    ;;
++  *) # from 4.6 on, and DragonFly
++    shlibpath_overrides_runpath=yes
++    hardcode_into_libs=yes
++    ;;
++  esac
++  ;;
++
++gnu*)
++  version_type=linux
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  shlibpath_var=LD_LIBRARY_PATH
++  hardcode_into_libs=yes
++  ;;
++
++haiku*)
++  version_type=linux
++  need_lib_prefix=no
++  need_version=no
++  dynamic_linker="$host_os runtime_loader"
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  shlibpath_var=LIBRARY_PATH
++  shlibpath_overrides_runpath=yes
++  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
++  hardcode_into_libs=yes
++  ;;
++
++hpux9* | hpux10* | hpux11*)
++  # Give a soname corresponding to the major version so that dld.sl refuses to
++  # link against other versions.
++  version_type=sunos
++  need_lib_prefix=no
++  need_version=no
++  case $host_cpu in
++  ia64*)
++    shrext_cmds='.so'
++    hardcode_into_libs=yes
++    dynamic_linker="$host_os dld.so"
++    shlibpath_var=LD_LIBRARY_PATH
++    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
++    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++    soname_spec='${libname}${release}${shared_ext}$major'
++    if test "X$HPUX_IA64_MODE" = X32; then
++      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
++    else
++      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
++    fi
++    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
++    ;;
++  hppa*64*)
++    shrext_cmds='.sl'
++    hardcode_into_libs=yes
++    dynamic_linker="$host_os dld.sl"
++    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
++    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
++    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++    soname_spec='${libname}${release}${shared_ext}$major'
++    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
++    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
++    ;;
++  *)
++    shrext_cmds='.sl'
++    dynamic_linker="$host_os dld.sl"
++    shlibpath_var=SHLIB_PATH
++    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
++    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++    soname_spec='${libname}${release}${shared_ext}$major'
++    ;;
++  esac
++  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
++  postinstall_cmds='chmod 555 $lib'
++  # or fails outright, so override atomically:
++  install_override_mode=555
++  ;;
++
++interix[3-9]*)
++  version_type=linux
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=no
++  hardcode_into_libs=yes
++  ;;
++
++irix5* | irix6* | nonstopux*)
++  case $host_os in
++    nonstopux*) version_type=nonstopux ;;
++    *)
++      if test "$lt_cv_prog_gnu_ld" = yes; then
++              version_type=linux
++      else
++              version_type=irix
++      fi ;;
++  esac
++  need_lib_prefix=no
++  need_version=no
++  soname_spec='${libname}${release}${shared_ext}$major'
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
++  case $host_os in
++  irix5* | nonstopux*)
++    libsuff= shlibsuff=
++    ;;
++  *)
++    case $LD in # libtool.m4 will add one of these switches to LD
++    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
++      libsuff= shlibsuff= libmagic=32-bit;;
++    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
++      libsuff=32 shlibsuff=N32 libmagic=N32;;
++    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
++      libsuff=64 shlibsuff=64 libmagic=64-bit;;
++    *) libsuff= shlibsuff= libmagic=never-match;;
++    esac
++    ;;
++  esac
++  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
++  shlibpath_overrides_runpath=no
++  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
++  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
++  hardcode_into_libs=yes
++  ;;
++
++# No shared lib support for Linux oldld, aout, or coff.
++linux*oldld* | linux*aout* | linux*coff*)
++  dynamic_linker=no
++  ;;
++
++# This must be Linux ELF.
++linux* | k*bsd*-gnu | kopensolaris*-gnu)
++  version_type=linux
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=no
++
++  # Some binutils ld are patched to set DT_RUNPATH
++  if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_shlibpath_overrides_runpath=no
++    save_LDFLAGS=$LDFLAGS
++    save_libdir=$libdir
++    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
++       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
++  lt_cv_shlibpath_overrides_runpath=yes
++fi
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++    LDFLAGS=$save_LDFLAGS
++    libdir=$save_libdir
++
++fi
++
++  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
++
++  # This implies no fast_install, which is unacceptable.
++  # Some rework will be needed to allow for fast_install
++  # before this can be enabled.
++  hardcode_into_libs=yes
++
++  # Append ld.so.conf contents to the search path
++  if test -f /etc/ld.so.conf; then
++    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[     ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
++    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
++  fi
++
++  # We used to test for /lib/ld.so.1 and disable shared libraries on
++  # powerpc, because MkLinux only supported shared libraries with the
++  # GNU dynamic linker.  Since this was broken with cross compilers,
++  # most powerpc-linux boxes support dynamic linking these days and
++  # people can always --disable-shared, the test was removed, and we
++  # assume the GNU/Linux dynamic linker is in use.
++  dynamic_linker='GNU/Linux ld.so'
++  ;;
++
++netbsd*)
++  version_type=sunos
++  need_lib_prefix=no
++  need_version=no
++  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
++    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
++    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
++    dynamic_linker='NetBSD (a.out) ld.so'
++  else
++    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++    soname_spec='${libname}${release}${shared_ext}$major'
++    dynamic_linker='NetBSD ld.elf_so'
++  fi
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=yes
++  hardcode_into_libs=yes
++  ;;
++
++newsos6)
++  version_type=linux
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=yes
++  ;;
++
++*nto* | *qnx*)
++  version_type=qnx
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=no
++  hardcode_into_libs=yes
++  dynamic_linker='ldqnx.so'
++  ;;
++
++openbsd*)
++  version_type=sunos
++  sys_lib_dlsearch_path_spec="/usr/lib"
++  need_lib_prefix=no
++  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
++  case $host_os in
++    openbsd3.3 | openbsd3.3.*)        need_version=yes ;;
++    *)                                need_version=no  ;;
++  esac
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
++  shlibpath_var=LD_LIBRARY_PATH
++  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++    case $host_os in
++      openbsd2.[89] | openbsd2.[89].*)
++      shlibpath_overrides_runpath=no
++      ;;
++      *)
++      shlibpath_overrides_runpath=yes
++      ;;
++      esac
++  else
++    shlibpath_overrides_runpath=yes
++  fi
++  ;;
++
++os2*)
++  libname_spec='$name'
++  shrext_cmds=".dll"
++  need_lib_prefix=no
++  library_names_spec='$libname${shared_ext} $libname.a'
++  dynamic_linker='OS/2 ld.exe'
++  shlibpath_var=LIBPATH
++  ;;
++
++osf3* | osf4* | osf5*)
++  version_type=osf
++  need_lib_prefix=no
++  need_version=no
++  soname_spec='${libname}${release}${shared_ext}$major'
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++  shlibpath_var=LD_LIBRARY_PATH
++  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
++  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
++  ;;
++
++rdos*)
++  dynamic_linker=no
++  ;;
++
++solaris*)
++  version_type=linux
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=yes
++  hardcode_into_libs=yes
++  # ldd complains unless libraries are executable
++  postinstall_cmds='chmod +x $lib'
++  ;;
++
++sunos4*)
++  version_type=sunos
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
++  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=yes
++  if test "$with_gnu_ld" = yes; then
++    need_lib_prefix=no
++  fi
++  need_version=yes
++  ;;
++
++sysv4 | sysv4.3*)
++  version_type=linux
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  shlibpath_var=LD_LIBRARY_PATH
++  case $host_vendor in
++    sni)
++      shlibpath_overrides_runpath=no
++      need_lib_prefix=no
++      runpath_var=LD_RUN_PATH
++      ;;
++    siemens)
++      need_lib_prefix=no
++      ;;
++    motorola)
++      need_lib_prefix=no
++      need_version=no
++      shlibpath_overrides_runpath=no
++      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
++      ;;
++  esac
++  ;;
++
++sysv4*MP*)
++  if test -d /usr/nec ;then
++    version_type=linux
++    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
++    soname_spec='$libname${shared_ext}.$major'
++    shlibpath_var=LD_LIBRARY_PATH
++  fi
++  ;;
++
++sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
++  version_type=freebsd-elf
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=yes
++  hardcode_into_libs=yes
++  if test "$with_gnu_ld" = yes; then
++    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
++  else
++    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
++    case $host_os in
++      sco3.2v5*)
++        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
++      ;;
++    esac
++  fi
++  sys_lib_dlsearch_path_spec='/usr/lib'
++  ;;
++
++tpf*)
++  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
++  version_type=linux
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=no
++  hardcode_into_libs=yes
++  ;;
++
++uts4*)
++  version_type=linux
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  shlibpath_var=LD_LIBRARY_PATH
++  ;;
++
++*)
++  dynamic_linker=no
++  ;;
++esac
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
++$as_echo "$dynamic_linker" >&6; }
++test "$dynamic_linker" = no && can_build_shared=no
++
++variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
++if test "$GCC" = yes; then
++  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
++fi
++
++if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
++  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
++fi
++if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
++  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
++fi
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
++$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
++hardcode_action=
++if test -n "$hardcode_libdir_flag_spec" ||
++   test -n "$runpath_var" ||
++   test "X$hardcode_automatic" = "Xyes" ; then
++
++  # We can hardcode non-existent directories.
++  if test "$hardcode_direct" != no &&
++     # If the only mechanism to avoid hardcoding is shlibpath_var, we
++     # have to relink, otherwise we might link with an installed library
++     # when we should be linking with a yet-to-be-installed one
++     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
++     test "$hardcode_minus_L" != no; then
++    # Linking always hardcodes the temporary library directory.
++    hardcode_action=relink
++  else
++    # We can link without hardcoding, and we can hardcode nonexisting dirs.
++    hardcode_action=immediate
++  fi
++else
++  # We cannot hardcode anything, or else we can only hardcode existing
++  # directories.
++  hardcode_action=unsupported
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
++$as_echo "$hardcode_action" >&6; }
++
++if test "$hardcode_action" = relink ||
++   test "$inherit_rpath" = yes; then
++  # Fast installation is not supported
++  enable_fast_install=no
++elif test "$shlibpath_overrides_runpath" = yes ||
++     test "$enable_shared" = no; then
++  # Fast installation is not necessary
++  enable_fast_install=needless
++fi
++
++
++
++
++
++
++  if test "x$enable_dlopen" != xyes; then
++  enable_dlopen=unknown
++  enable_dlopen_self=unknown
++  enable_dlopen_self_static=unknown
++else
++  lt_cv_dlopen=no
++  lt_cv_dlopen_libs=
++
++  case $host_os in
++  beos*)
++    lt_cv_dlopen="load_add_on"
++    lt_cv_dlopen_libs=
++    lt_cv_dlopen_self=yes
++    ;;
++
++  mingw* | pw32* | cegcc*)
++    lt_cv_dlopen="LoadLibrary"
++    lt_cv_dlopen_libs=
++    ;;
++
++  cygwin*)
++    lt_cv_dlopen="dlopen"
++    lt_cv_dlopen_libs=
++    ;;
++
++  darwin*)
++  # if libdl is installed we need to link against it
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
++$as_echo_n "checking for dlopen in -ldl... " >&6; }
++if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-ldl  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char dlopen ();
++int
++main ()
++{
++return dlopen ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_dl_dlopen=yes
++else
++  ac_cv_lib_dl_dlopen=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
++$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
++if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
++  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
++else
++
++    lt_cv_dlopen="dyld"
++    lt_cv_dlopen_libs=
++    lt_cv_dlopen_self=yes
++
++fi
++
++    ;;
++
++  *)
++    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
++if test "x$ac_cv_func_shl_load" = x""yes; then :
++  lt_cv_dlopen="shl_load"
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
++$as_echo_n "checking for shl_load in -ldld... " >&6; }
++if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-ldld  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char shl_load ();
++int
++main ()
++{
++return shl_load ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_dld_shl_load=yes
++else
++  ac_cv_lib_dld_shl_load=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
++$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
++if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
++  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
++else
++  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
++if test "x$ac_cv_func_dlopen" = x""yes; then :
++  lt_cv_dlopen="dlopen"
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
++$as_echo_n "checking for dlopen in -ldl... " >&6; }
++if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-ldl  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char dlopen ();
++int
++main ()
++{
++return dlopen ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_dl_dlopen=yes
++else
++  ac_cv_lib_dl_dlopen=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
++$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
++if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
++  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
++$as_echo_n "checking for dlopen in -lsvld... " >&6; }
++if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsvld  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char dlopen ();
++int
++main ()
++{
++return dlopen ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_svld_dlopen=yes
++else
++  ac_cv_lib_svld_dlopen=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
++$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
++if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
++  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
++$as_echo_n "checking for dld_link in -ldld... " >&6; }
++if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-ldld  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char dld_link ();
++int
++main ()
++{
++return dld_link ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_dld_dld_link=yes
++else
++  ac_cv_lib_dld_dld_link=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
++$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
++if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
++  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
++fi
++
++
++fi
++
++
++fi
++
++
++fi
++
++
++fi
++
++
++fi
++
++    ;;
++  esac
++
++  if test "x$lt_cv_dlopen" != xno; then
++    enable_dlopen=yes
++  else
++    enable_dlopen=no
++  fi
++
++  case $lt_cv_dlopen in
++  dlopen)
++    save_CPPFLAGS="$CPPFLAGS"
++    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
++
++    save_LDFLAGS="$LDFLAGS"
++    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
++
++    save_LIBS="$LIBS"
++    LIBS="$lt_cv_dlopen_libs $LIBS"
++
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
++$as_echo_n "checking whether a program can dlopen itself... " >&6; }
++if test "${lt_cv_dlopen_self+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++        if test "$cross_compiling" = yes; then :
++  lt_cv_dlopen_self=cross
++else
++  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
++  lt_status=$lt_dlunknown
++  cat > conftest.$ac_ext <<_LT_EOF
++#line 11134 "configure"
++#include "confdefs.h"
++
++#if HAVE_DLFCN_H
++#include <dlfcn.h>
++#endif
++
++#include <stdio.h>
++
++#ifdef RTLD_GLOBAL
++#  define LT_DLGLOBAL         RTLD_GLOBAL
++#else
++#  ifdef DL_GLOBAL
++#    define LT_DLGLOBAL               DL_GLOBAL
++#  else
++#    define LT_DLGLOBAL               0
++#  endif
++#endif
++
++/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
++   find out it does not work in some platform. */
++#ifndef LT_DLLAZY_OR_NOW
++#  ifdef RTLD_LAZY
++#    define LT_DLLAZY_OR_NOW          RTLD_LAZY
++#  else
++#    ifdef DL_LAZY
++#      define LT_DLLAZY_OR_NOW                DL_LAZY
++#    else
++#      ifdef RTLD_NOW
++#        define LT_DLLAZY_OR_NOW      RTLD_NOW
++#      else
++#        ifdef DL_NOW
++#          define LT_DLLAZY_OR_NOW    DL_NOW
++#        else
++#          define LT_DLLAZY_OR_NOW    0
++#        endif
++#      endif
++#    endif
++#  endif
++#endif
++
++/* When -fvisbility=hidden is used, assume the code has been annotated
++   correspondingly for the symbols needed.  */
++#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
++void fnord () __attribute__((visibility("default")));
++#endif
++
++void fnord () { int i=42; }
++int main ()
++{
++  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
++  int status = $lt_dlunknown;
++
++  if (self)
++    {
++      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
++      else
++        {
++        if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
++          else puts (dlerror ());
++      }
++      /* dlclose (self); */
++    }
++  else
++    puts (dlerror ());
++
++  return status;
++}
++_LT_EOF
++  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
++  (eval $ac_link) 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
++    (./conftest; exit; ) >&5 2>/dev/null
++    lt_status=$?
++    case x$lt_status in
++      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
++      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
++      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
++    esac
++  else :
++    # compilation failed
++    lt_cv_dlopen_self=no
++  fi
++fi
++rm -fr conftest*
++
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
++$as_echo "$lt_cv_dlopen_self" >&6; }
++
++    if test "x$lt_cv_dlopen_self" = xyes; then
++      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
++$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
++if test "${lt_cv_dlopen_self_static+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++        if test "$cross_compiling" = yes; then :
++  lt_cv_dlopen_self_static=cross
++else
++  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
++  lt_status=$lt_dlunknown
++  cat > conftest.$ac_ext <<_LT_EOF
++#line 11240 "configure"
++#include "confdefs.h"
++
++#if HAVE_DLFCN_H
++#include <dlfcn.h>
++#endif
++
++#include <stdio.h>
++
++#ifdef RTLD_GLOBAL
++#  define LT_DLGLOBAL         RTLD_GLOBAL
++#else
++#  ifdef DL_GLOBAL
++#    define LT_DLGLOBAL               DL_GLOBAL
++#  else
++#    define LT_DLGLOBAL               0
++#  endif
++#endif
++
++/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
++   find out it does not work in some platform. */
++#ifndef LT_DLLAZY_OR_NOW
++#  ifdef RTLD_LAZY
++#    define LT_DLLAZY_OR_NOW          RTLD_LAZY
++#  else
++#    ifdef DL_LAZY
++#      define LT_DLLAZY_OR_NOW                DL_LAZY
++#    else
++#      ifdef RTLD_NOW
++#        define LT_DLLAZY_OR_NOW      RTLD_NOW
++#      else
++#        ifdef DL_NOW
++#          define LT_DLLAZY_OR_NOW    DL_NOW
++#        else
++#          define LT_DLLAZY_OR_NOW    0
++#        endif
++#      endif
++#    endif
++#  endif
++#endif
++
++/* When -fvisbility=hidden is used, assume the code has been annotated
++   correspondingly for the symbols needed.  */
++#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
++void fnord () __attribute__((visibility("default")));
++#endif
++
++void fnord () { int i=42; }
++int main ()
++{
++  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
++  int status = $lt_dlunknown;
++
++  if (self)
++    {
++      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
++      else
++        {
++        if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
++          else puts (dlerror ());
++      }
++      /* dlclose (self); */
++    }
++  else
++    puts (dlerror ());
++
++  return status;
++}
++_LT_EOF
++  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
++  (eval $ac_link) 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
++    (./conftest; exit; ) >&5 2>/dev/null
++    lt_status=$?
++    case x$lt_status in
++      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
++      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
++      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
++    esac
++  else :
++    # compilation failed
++    lt_cv_dlopen_self_static=no
++  fi
++fi
++rm -fr conftest*
++
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
++$as_echo "$lt_cv_dlopen_self_static" >&6; }
++    fi
++
++    CPPFLAGS="$save_CPPFLAGS"
++    LDFLAGS="$save_LDFLAGS"
++    LIBS="$save_LIBS"
++    ;;
++  esac
++
++  case $lt_cv_dlopen_self in
++  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
++  *) enable_dlopen_self=unknown ;;
++  esac
++
++  case $lt_cv_dlopen_self_static in
++  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
++  *) enable_dlopen_self_static=unknown ;;
++  esac
++fi
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++striplib=
++old_striplib=
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
++$as_echo_n "checking whether stripping libraries is possible... " >&6; }
++if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
++  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
++  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++else
++# FIXME - insert some real tests, host_os isn't really good enough
++  case $host_os in
++  darwin*)
++    if test -n "$STRIP" ; then
++      striplib="$STRIP -x"
++      old_striplib="$STRIP -S"
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++    else
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++    fi
++    ;;
++  *)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++    ;;
++  esac
++fi
++
++
++
++
++
++
++
++
++
++
++
++
++  # Report which library types will actually be built
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
++$as_echo_n "checking if libtool supports shared libraries... " >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
++$as_echo "$can_build_shared" >&6; }
++
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
++$as_echo_n "checking whether to build shared libraries... " >&6; }
++  test "$can_build_shared" = "no" && enable_shared=no
++
++  # On AIX, shared libraries and static libraries use the same namespace, and
++  # are all built from PIC.
++  case $host_os in
++  aix3*)
++    test "$enable_shared" = yes && enable_static=no
++    if test -n "$RANLIB"; then
++      archive_cmds="$archive_cmds~\$RANLIB \$lib"
++      postinstall_cmds='$RANLIB $lib'
++    fi
++    ;;
++
++  aix[4-9]*)
++    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
++      test "$enable_shared" = yes && enable_static=no
++    fi
++    ;;
++  esac
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
++$as_echo "$enable_shared" >&6; }
++
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
++$as_echo_n "checking whether to build static libraries... " >&6; }
++  # Make sure either enable_shared or enable_static is yes.
++  test "$enable_shared" = yes || enable_static=yes
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
++$as_echo "$enable_static" >&6; }
++
++
++
++
++fi
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++CC="$lt_save_CC"
++
++
++
++
++
++
++
++
++
++
++
++
++
++        ac_config_commands="$ac_config_commands libtool"
++
++
++
++
++# Only expand once:
++
++
++
++
++backtrace_supported=yes
++
++if test -n "${with_target_subdir}"; then
++  # We are compiling a GCC library.  We can assume that the unwind
++  # library exists.
++  BACKTRACE_FILE="backtrace.lo simple.lo"
++else
++  ac_fn_c_check_header_mongrel "$LINENO" "unwind.h" "ac_cv_header_unwind_h" "$ac_includes_default"
++if test "x$ac_cv_header_unwind_h" = x""yes; then :
++  ac_fn_c_check_func "$LINENO" "_Unwind_Backtrace" "ac_cv_func__Unwind_Backtrace"
++if test "x$ac_cv_func__Unwind_Backtrace" = x""yes; then :
++  BACKTRACE_FILE="backtrace.lo simple.lo"
++else
++  BACKTRACE_FILE="nounwind.lo"
++                    backtrace_supported=no
++fi
++
++else
++  BACKTRACE_FILE="nounwind.lo"
++     backtrace_supported=no
++fi
++
++
++fi
++
++
++EXTRA_FLAGS=
++if test -n "${with_target_subdir}"; then
++  EXTRA_FLAGS="-funwind-tables -frandom-seed=\$@"
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -funwind-tables option" >&5
++$as_echo_n "checking for -funwind-tables option... " >&6; }
++if test "${libbacktrace_cv_c_unwind_tables+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  CFLAGS_hold="$CFLAGS"
++     CFLAGS="$CFLAGS -funwind-tables"
++     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++static int f() { return 0; }
++int
++main ()
++{
++return f();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  libbacktrace_cv_c_unwind_tables=yes
++else
++  libbacktrace_cv_c_unwind_tables=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++     CFLAGS="$CFLAGS_hold"
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_c_unwind_tables" >&5
++$as_echo "$libbacktrace_cv_c_unwind_tables" >&6; }
++  if test "$libbacktrace_cv_c_unwind_tables" = "yes"; then
++    EXTRA_FLAGS=-funwind-tables
++  fi
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -frandom-seed=string option" >&5
++$as_echo_n "checking for -frandom-seed=string option... " >&6; }
++if test "${libbacktrace_cv_c_random_seed_string+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  CFLAGS_hold="$CFLAGS"
++     CFLAGS="$CFLAGS -frandom-seed=conftest.lo"
++     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++return 0;
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  libbacktrace_cv_c_random_seed_string=yes
++else
++  libbacktrace_cv_c_random_seed_string=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++     CFLAGS="$CFLAGS_hold"
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_c_random_seed_string" >&5
++$as_echo "$libbacktrace_cv_c_random_seed_string" >&6; }
++  if test "$libbacktrace_cv_c_random_seed_string" = "yes"; then
++    EXTRA_FLAGS="$EXTRA_FLAGS -frandom-seed=\$@"
++  fi
++fi
++
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++WARN_FLAGS=
++save_CFLAGS="$CFLAGS"
++for real_option in -W -Wall -Wwrite-strings -Wstrict-prototypes \
++                        -Wmissing-prototypes -Wold-style-definition \
++                        -Wmissing-format-attribute -Wcast-qual; do
++  # Do the check with the no- prefix removed since gcc silently
++  # accepts any -Wno-* option on purpose
++  case $real_option in
++    -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
++    *) option=$real_option ;;
++  esac
++  as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
++
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
++$as_echo_n "checking whether $CC supports $option... " >&6; }
++if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++else
++  CFLAGS="$option"
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "$as_acx_Woption=yes"
++else
++  eval "$as_acx_Woption=no"
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
++fi
++eval ac_res=\$$as_acx_Woption
++             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++  if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
++  WARN_FLAGS="$WARN_FLAGS${WARN_FLAGS:+ }$real_option"
++fi
++  done
++CFLAGS="$save_CFLAGS"
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++
++
++if test -n "${with_target_subdir}"; then
++  WARN_FLAGS="$WARN_FLAGS -Werror"
++fi
++
++
++
++if test -n "${with_target_subdir}"; then
++
++
++# Check whether --with-system-libunwind was given.
++if test "${with_system_libunwind+set}" = set; then :
++  withval=$with_system_libunwind;
++fi
++
++  # If system-libunwind was not specifically set, pick a default setting.
++  if test x$with_system_libunwind = x; then
++    case ${target} in
++      ia64-*-hpux*) with_system_libunwind=yes ;;
++      *) with_system_libunwind=no ;;
++    esac
++  fi
++  # Based on system-libunwind and target, do we have ipinfo?
++  if  test x$with_system_libunwind = xyes; then
++    case ${target} in
++      ia64-*-*) have_unwind_getipinfo=no ;;
++      *) have_unwind_getipinfo=yes ;;
++    esac
++  else
++    # Darwin before version 9 does not have _Unwind_GetIPInfo.
++
++    case ${target} in
++      *-*-darwin[3-8]|*-*-darwin[3-8].*) have_unwind_getipinfo=no ;;
++      *) have_unwind_getipinfo=yes ;;
++    esac
++
++  fi
++
++  if test x$have_unwind_getipinfo = xyes; then
++
++$as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
++
++  fi
++
++else
++  ac_save_CFFLAGS="$CFLAGS"
++  CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Unwind_GetIPInfo" >&5
++$as_echo_n "checking for _Unwind_GetIPInfo... " >&6; }
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include "unwind.h"
++      struct _Unwind_Context *context;
++      int ip_before_insn = 0;
++int
++main ()
++{
++return _Unwind_GetIPInfo (context, &ip_before_insn);
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  have_unwind_getipinfo=yes
++else
++  have_unwind_getipinfo=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++  CFLAGS="$ac_save_CFLAGS"
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_unwind_getipinfo" >&5
++$as_echo "$have_unwind_getipinfo" >&6; }
++  if test "$have_unwind_getipinfo" = "yes"; then
++
++$as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
++
++  fi
++fi
++
++# Enable --enable-host-shared.
++# Check whether --enable-host-shared was given.
++if test "${enable_host_shared+set}" = set; then :
++  enableval=$enable_host_shared; PIC_FLAG=-fPIC
++else
++  PIC_FLAG=
++fi
++
++
++
++# Test for __sync support.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking __sync extensions" >&5
++$as_echo_n "checking __sync extensions... " >&6; }
++if test "${libbacktrace_cv_sys_sync+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "${with_target_subdir}"; then
++   case "${host}" in
++   hppa*-*-hpux*) libbacktrace_cv_sys_sync=no ;;
++   *) libbacktrace_cv_sys_sync=yes ;;
++   esac
++ else
++   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++int i;
++int
++main ()
++{
++__sync_bool_compare_and_swap (&i, i, i);
++                       __sync_lock_test_and_set (&i, 1);
++                       __sync_lock_release (&i);
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  libbacktrace_cv_sys_sync=yes
++else
++  libbacktrace_cv_sys_sync=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++ fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_sys_sync" >&5
++$as_echo "$libbacktrace_cv_sys_sync" >&6; }
++BACKTRACE_SUPPORTS_THREADS=0
++if test "$libbacktrace_cv_sys_sync" = "yes"; then
++  BACKTRACE_SUPPORTS_THREADS=1
++
++$as_echo "#define HAVE_SYNC_FUNCTIONS 1" >>confdefs.h
++
++fi
++
++
++# Test for __atomic support.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking __atomic extensions" >&5
++$as_echo_n "checking __atomic extensions... " >&6; }
++if test "${libbacktrace_cv_sys_atomic+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "${with_target_subdir}"; then
++   libbacktrace_cv_sys_atomic=yes
++ else
++   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++int i;
++int
++main ()
++{
++__atomic_load_n (&i, __ATOMIC_ACQUIRE);
++                     __atomic_store_n (&i, 1, __ATOMIC_RELEASE);
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  libbacktrace_cv_sys_atomic=yes
++else
++  libbacktrace_cv_sys_atomic=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++ fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_sys_atomic" >&5
++$as_echo "$libbacktrace_cv_sys_atomic" >&6; }
++if test "$libbacktrace_cv_sys_atomic" = "yes"; then
++
++$as_echo "#define HAVE_ATOMIC_FUNCTIONS 1" >>confdefs.h
++
++fi
++
++# The library needs to be able to read the executable itself.  Compile
++# a file to determine the executable format.  The awk script
++# filetype.awk prints out the file type.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking output filetype" >&5
++$as_echo_n "checking output filetype... " >&6; }
++if test "${libbacktrace_cv_sys_filetype+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  filetype=
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++int i;
++int
++main ()
++{
++int j;
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  filetype=`${AWK} -f $srcdir/filetype.awk conftest.$ac_objext`
++else
++  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "compiler failed
++See \`config.log' for more details." "$LINENO" 5; }
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++libbacktrace_cv_sys_filetype=$filetype
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_sys_filetype" >&5
++$as_echo "$libbacktrace_cv_sys_filetype" >&6; }
++
++# Match the file type to decide what files to compile.
++FORMAT_FILE=
++backtrace_supports_data=yes
++case "$libbacktrace_cv_sys_filetype" in
++elf*) FORMAT_FILE="elf.lo" ;;
++pecoff) FORMAT_FILE="pecoff.lo"
++        backtrace_supports_data=no
++      ;;
++*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not determine output file type" >&5
++$as_echo "$as_me: WARNING: could not determine output file type" >&2;}
++   FORMAT_FILE="unknown.lo"
++   backtrace_supported=no
++   ;;
++esac
++
++
++# ELF defines.
++elfsize=
++case "$libbacktrace_cv_sys_filetype" in
++elf32) elfsize=32 ;;
++elf64) elfsize=64 ;;
++*)     elfsize=unused
++esac
++
++cat >>confdefs.h <<_ACEOF
++#define BACKTRACE_ELF_SIZE $elfsize
++_ACEOF
++
++
++BACKTRACE_SUPPORTED=0
++if test "$backtrace_supported" = "yes"; then
++  BACKTRACE_SUPPORTED=1
++fi
++
++
++BACKTRACE_SUPPORTS_DATA=0
++if test "$backtrace_supports_data" = "yes"; then
++  BACKTRACE_SUPPORTS_DATA=1
++fi
++
++
++
++
++inttype_headers=`echo inttypes.h sys/inttypes.h  | sed -e 's/,/ /g'`
++
++acx_cv_header_stdint=stddef.h
++acx_cv_header_stdint_kind="(already complete)"
++for i in stdint.h $inttype_headers; do
++  unset ac_cv_type_uintptr_t
++  unset ac_cv_type_uintmax_t
++  unset ac_cv_type_int_least32_t
++  unset ac_cv_type_int_fast32_t
++  unset ac_cv_type_uint64_t
++  $as_echo_n "looking for a compliant stdint.h in $i, " >&6
++  ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "#include <sys/types.h>
++#include <$i>
++"
++if test "x$ac_cv_type_uintmax_t" = x""yes; then :
++  acx_cv_header_stdint=$i
++else
++  continue
++fi
++
++  ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include <sys/types.h>
++#include <$i>
++"
++if test "x$ac_cv_type_uintptr_t" = x""yes; then :
++
++else
++  acx_cv_header_stdint_kind="(mostly complete)"
++fi
++
++  ac_fn_c_check_type "$LINENO" "int_least32_t" "ac_cv_type_int_least32_t" "#include <sys/types.h>
++#include <$i>
++"
++if test "x$ac_cv_type_int_least32_t" = x""yes; then :
++
++else
++  acx_cv_header_stdint_kind="(mostly complete)"
++fi
++
++  ac_fn_c_check_type "$LINENO" "int_fast32_t" "ac_cv_type_int_fast32_t" "#include <sys/types.h>
++#include <$i>
++"
++if test "x$ac_cv_type_int_fast32_t" = x""yes; then :
++
++else
++  acx_cv_header_stdint_kind="(mostly complete)"
++fi
++
++  ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include <sys/types.h>
++#include <$i>
++"
++if test "x$ac_cv_type_uint64_t" = x""yes; then :
++
++else
++  acx_cv_header_stdint_kind="(lacks uint64_t)"
++fi
++
++  break
++done
++if test "$acx_cv_header_stdint" = stddef.h; then
++  acx_cv_header_stdint_kind="(lacks uintmax_t)"
++  for i in stdint.h $inttype_headers; do
++    unset ac_cv_type_uintptr_t
++    unset ac_cv_type_uint32_t
++    unset ac_cv_type_uint64_t
++    $as_echo_n "looking for an incomplete stdint.h in $i, " >&6
++    ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "#include <sys/types.h>
++#include <$i>
++"
++if test "x$ac_cv_type_uint32_t" = x""yes; then :
++  acx_cv_header_stdint=$i
++else
++  continue
++fi
++
++    ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include <sys/types.h>
++#include <$i>
++"
++if test "x$ac_cv_type_uint64_t" = x""yes; then :
++
++fi
++
++    ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include <sys/types.h>
++#include <$i>
++"
++if test "x$ac_cv_type_uintptr_t" = x""yes; then :
++
++fi
++
++    break
++  done
++fi
++if test "$acx_cv_header_stdint" = stddef.h; then
++  acx_cv_header_stdint_kind="(u_intXX_t style)"
++  for i in sys/types.h $inttype_headers; do
++    unset ac_cv_type_u_int32_t
++    unset ac_cv_type_u_int64_t
++    $as_echo_n "looking for u_intXX_t types in $i, " >&6
++    ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "#include <sys/types.h>
++#include <$i>
++"
++if test "x$ac_cv_type_u_int32_t" = x""yes; then :
++  acx_cv_header_stdint=$i
++else
++  continue
++fi
++
++    ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "#include <sys/types.h>
++#include <$i>
++"
++if test "x$ac_cv_type_u_int64_t" = x""yes; then :
++
++fi
++
++    break
++  done
++fi
++if test "$acx_cv_header_stdint" = stddef.h; then
++  acx_cv_header_stdint_kind="(using manual detection)"
++fi
++
++test -z "$ac_cv_type_uintptr_t" && ac_cv_type_uintptr_t=no
++test -z "$ac_cv_type_uint64_t" && ac_cv_type_uint64_t=no
++test -z "$ac_cv_type_u_int64_t" && ac_cv_type_u_int64_t=no
++test -z "$ac_cv_type_int_least32_t" && ac_cv_type_int_least32_t=no
++test -z "$ac_cv_type_int_fast32_t" && ac_cv_type_int_fast32_t=no
++
++# ----------------- Summarize what we found so far
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what to include in gstdint.h" >&5
++$as_echo_n "checking what to include in gstdint.h... " >&6; }
++
++case `$as_basename -- gstdint.h ||
++$as_expr X/gstdint.h : '.*/\([^/][^/]*\)/*$' \| \
++       Xgstdint.h : 'X\(//\)$' \| \
++       Xgstdint.h : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X/gstdint.h |
++    sed '/^.*\/\([^/][^/]*\)\/*$/{
++          s//\1/
++          q
++        }
++        /^X\/\(\/\/\)$/{
++          s//\1/
++          q
++        }
++        /^X\/\(\/\).*/{
++          s//\1/
++          q
++        }
++        s/.*/./; q'` in
++  stdint.h) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: are you sure you want it there?" >&5
++$as_echo "$as_me: WARNING: are you sure you want it there?" >&2;} ;;
++  inttypes.h) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: are you sure you want it there?" >&5
++$as_echo "$as_me: WARNING: are you sure you want it there?" >&2;} ;;
++  *) ;;
++esac
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_header_stdint $acx_cv_header_stdint_kind" >&5
++$as_echo "$acx_cv_header_stdint $acx_cv_header_stdint_kind" >&6; }
++
++# ----------------- done included file, check C basic types --------
++
++# Lacking an uintptr_t?  Test size of void *
++case "$acx_cv_header_stdint:$ac_cv_type_uintptr_t" in
++  stddef.h:* | *:no) # The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
++$as_echo_n "checking size of void *... " >&6; }
++if test "${ac_cv_sizeof_void_p+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
++
++else
++  if test "$ac_cv_type_void_p" = yes; then
++     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++{ as_fn_set_status 77
++as_fn_error "cannot compute sizeof (void *)
++See \`config.log' for more details." "$LINENO" 5; }; }
++   else
++     ac_cv_sizeof_void_p=0
++   fi
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
++$as_echo "$ac_cv_sizeof_void_p" >&6; }
++
++
++
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
++_ACEOF
++
++ ;;
++esac
++
++# Lacking an uint64_t?  Test size of long
++case "$acx_cv_header_stdint:$ac_cv_type_uint64_t:$ac_cv_type_u_int64_t" in
++  stddef.h:*:* | *:no:no) # The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
++$as_echo_n "checking size of long... " >&6; }
++if test "${ac_cv_sizeof_long+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
++
++else
++  if test "$ac_cv_type_long" = yes; then
++     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++{ as_fn_set_status 77
++as_fn_error "cannot compute sizeof (long)
++See \`config.log' for more details." "$LINENO" 5; }; }
++   else
++     ac_cv_sizeof_long=0
++   fi
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
++$as_echo "$ac_cv_sizeof_long" >&6; }
++
++
++
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_LONG $ac_cv_sizeof_long
++_ACEOF
++
++ ;;
++esac
++
++if test $acx_cv_header_stdint = stddef.h; then
++  # Lacking a good header?  Test size of everything and deduce all types.
++  # The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
++$as_echo_n "checking size of int... " >&6; }
++if test "${ac_cv_sizeof_int+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
++
++else
++  if test "$ac_cv_type_int" = yes; then
++     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++{ as_fn_set_status 77
++as_fn_error "cannot compute sizeof (int)
++See \`config.log' for more details." "$LINENO" 5; }; }
++   else
++     ac_cv_sizeof_int=0
++   fi
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
++$as_echo "$ac_cv_sizeof_int" >&6; }
++
++
++
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_INT $ac_cv_sizeof_int
++_ACEOF
++
++
++  # The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
++$as_echo_n "checking size of short... " >&6; }
++if test "${ac_cv_sizeof_short+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
++
++else
++  if test "$ac_cv_type_short" = yes; then
++     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++{ as_fn_set_status 77
++as_fn_error "cannot compute sizeof (short)
++See \`config.log' for more details." "$LINENO" 5; }; }
++   else
++     ac_cv_sizeof_short=0
++   fi
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
++$as_echo "$ac_cv_sizeof_short" >&6; }
++
++
++
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_SHORT $ac_cv_sizeof_short
++_ACEOF
++
++
++  # The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
++$as_echo_n "checking size of char... " >&6; }
++if test "${ac_cv_sizeof_char+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char"        "$ac_includes_default"; then :
++
++else
++  if test "$ac_cv_type_char" = yes; then
++     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++{ as_fn_set_status 77
++as_fn_error "cannot compute sizeof (char)
++See \`config.log' for more details." "$LINENO" 5; }; }
++   else
++     ac_cv_sizeof_char=0
++   fi
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
++$as_echo "$ac_cv_sizeof_char" >&6; }
++
++
++
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_CHAR $ac_cv_sizeof_char
++_ACEOF
++
++
++
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to int8_t" >&5
++$as_echo_n "checking for type equivalent to int8_t... " >&6; }
++  case "$ac_cv_sizeof_char" in
++    1) acx_cv_type_int8_t=char ;;
++    *) as_fn_error "no 8-bit type, please report a bug" "$LINENO" 5
++  esac
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_type_int8_t" >&5
++$as_echo "$acx_cv_type_int8_t" >&6; }
++
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to int16_t" >&5
++$as_echo_n "checking for type equivalent to int16_t... " >&6; }
++  case "$ac_cv_sizeof_int:$ac_cv_sizeof_short" in
++    2:*) acx_cv_type_int16_t=int ;;
++    *:2) acx_cv_type_int16_t=short ;;
++    *) as_fn_error "no 16-bit type, please report a bug" "$LINENO" 5
++  esac
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_type_int16_t" >&5
++$as_echo "$acx_cv_type_int16_t" >&6; }
++
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to int32_t" >&5
++$as_echo_n "checking for type equivalent to int32_t... " >&6; }
++  case "$ac_cv_sizeof_int:$ac_cv_sizeof_long" in
++    4:*) acx_cv_type_int32_t=int ;;
++    *:4) acx_cv_type_int32_t=long ;;
++    *) as_fn_error "no 32-bit type, please report a bug" "$LINENO" 5
++  esac
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_type_int32_t" >&5
++$as_echo "$acx_cv_type_int32_t" >&6; }
++fi
++
++# These tests are here to make the output prettier
++
++if test "$ac_cv_type_uint64_t" != yes && test "$ac_cv_type_u_int64_t" != yes; then
++  case "$ac_cv_sizeof_long" in
++    8) acx_cv_type_int64_t=long ;;
++  esac
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to int64_t" >&5
++$as_echo_n "checking for type equivalent to int64_t... " >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${acx_cv_type_int64_t-'using preprocessor symbols'}" >&5
++$as_echo "${acx_cv_type_int64_t-'using preprocessor symbols'}" >&6; }
++fi
++
++# Now we can use the above types
++
++if test "$ac_cv_type_uintptr_t" != yes; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to intptr_t" >&5
++$as_echo_n "checking for type equivalent to intptr_t... " >&6; }
++  case $ac_cv_sizeof_void_p in
++    2) acx_cv_type_intptr_t=int16_t ;;
++    4) acx_cv_type_intptr_t=int32_t ;;
++    8) acx_cv_type_intptr_t=int64_t ;;
++    *) as_fn_error "no equivalent for intptr_t, please report a bug" "$LINENO" 5
++  esac
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_type_intptr_t" >&5
++$as_echo "$acx_cv_type_intptr_t" >&6; }
++fi
++
++# ----------------- done all checks, emit header -------------
++ac_config_commands="$ac_config_commands gstdint.h"
++
++
++
++
++for ac_header in sys/mman.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_mman_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SYS_MMAN_H 1
++_ACEOF
++
++fi
++
++done
++
++if test "$ac_cv_header_sys_mman_h" = "no"; then
++  have_mmap=no
++else
++  if test -n "${with_target_subdir}"; then
++    # When built as a GCC target library, we can't do a link test.  We
++    # simply assume that if we have mman.h, we have mmap.
++    have_mmap=yes
++    case "${host}" in
++    spu-*-*|*-*-msdosdjgpp)
++        # The SPU does not have mmap, but it has a sys/mman.h header file
++        # containing "mmap_eaddr" and the mmap flags, confusing the test.
++        # DJGPP also has sys/man.h, but no mmap
++      have_mmap=no ;;
++    esac
++  else
++    ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
++if test "x$ac_cv_func_mmap" = x""yes; then :
++  have_mmap=yes
++else
++  have_mmap=no
++fi
++
++  fi
++fi
++if test "$have_mmap" = "no"; then
++  VIEW_FILE=read.lo
++  ALLOC_FILE=alloc.lo
++else
++  VIEW_FILE=mmapio.lo
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++#include <sys/mman.h>
++#if !defined(MAP_ANONYMOUS) && !defined(MAP_ANON)
++  #error no MAP_ANONYMOUS
++#endif
++
++_ACEOF
++if ac_fn_c_try_cpp "$LINENO"; then :
++  ALLOC_FILE=mmap.lo
++else
++  ALLOC_FILE=alloc.lo
++fi
++rm -f conftest.err conftest.$ac_ext
++fi
++
++
++
++BACKTRACE_USES_MALLOC=0
++if test "$ALLOC_FILE" = "alloc.lo"; then
++  BACKTRACE_USES_MALLOC=1
++fi
++
++
++# Check for dl_iterate_phdr.
++for ac_header in link.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "link.h" "ac_cv_header_link_h" "$ac_includes_default"
++if test "x$ac_cv_header_link_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LINK_H 1
++_ACEOF
++
++fi
++
++done
++
++if test "$ac_cv_header_link_h" = "no"; then
++  have_dl_iterate_phdr=no
++else
++  if test -n "${with_target_subdir}"; then
++    # When built as a GCC target library, we can't do a link test.
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <link.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "dl_iterate_phdr" >/dev/null 2>&1; then :
++  have_dl_iterate_phdr=yes
++else
++  have_dl_iterate_phdr=no
++fi
++rm -f conftest*
++
++    case "${host}" in
++    *-*-solaris2.10*)
++        # Avoid dl_iterate_phdr on Solaris 10, where it is in the
++      # header file but is only in -ldl.
++      have_dl_iterate_phdr=no ;;
++    esac
++  else
++    ac_fn_c_check_func "$LINENO" "dl_iterate_phdr" "ac_cv_func_dl_iterate_phdr"
++if test "x$ac_cv_func_dl_iterate_phdr" = x""yes; then :
++  have_dl_iterate_phdr=yes
++else
++  have_dl_iterate_phdr=no
++fi
++
++  fi
++fi
++if test "$have_dl_iterate_phdr" = "yes"; then
++
++$as_echo "#define HAVE_DL_ITERATE_PHDR 1" >>confdefs.h
++
++fi
++
++# Check for the fcntl function.
++if test -n "${with_target_subdir}"; then
++   case "${host}" in
++   *-*-mingw*) have_fcntl=no ;;
++   spu-*-*) have_fcntl=no ;;
++   *) have_fcntl=yes ;;
++   esac
++else
++  ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl"
++if test "x$ac_cv_func_fcntl" = x""yes; then :
++  have_fcntl=yes
++else
++  have_fcntl=no
++fi
++
++fi
++if test "$have_fcntl" = "yes"; then
++
++$as_echo "#define HAVE_FCNTL 1" >>confdefs.h
++
++fi
++
++ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
++if test "x$ac_cv_have_decl_strnlen" = x""yes; then :
++  ac_have_decl=1
++else
++  ac_have_decl=0
++fi
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_STRNLEN $ac_have_decl
++_ACEOF
++
++
++# Check for getexecname function.
++if test -n "${with_target_subdir}"; then
++   case "${host}" in
++   *-*-solaris2*) have_getexecname=yes ;;
++   *) have_getexecname=no ;;
++   esac
++else
++  ac_fn_c_check_func "$LINENO" "getexecname" "ac_cv_func_getexecname"
++if test "x$ac_cv_func_getexecname" = x""yes; then :
++  have_getexecname=yes
++else
++  have_getexecname=no
++fi
++
++fi
++if test "$have_getexecname" = "yes"; then
++
++$as_echo "#define HAVE_GETEXECNAME 1" >>confdefs.h
++
++fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tests can run" >&5
++$as_echo_n "checking whether tests can run... " >&6; }
++if test "${libbacktrace_cv_sys_native+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test "$cross_compiling" = yes; then :
++  libbacktrace_cv_sys_native=no
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++return 0;
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  libbacktrace_cv_sys_native=yes
++else
++  libbacktrace_cv_sys_native=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_sys_native" >&5
++$as_echo "$libbacktrace_cv_sys_native" >&6; }
++ if test "$libbacktrace_cv_sys_native" = "yes"; then
++  NATIVE_TRUE=
++  NATIVE_FALSE='#'
++else
++  NATIVE_TRUE='#'
++  NATIVE_FALSE=
++fi
++
++
++if test "${multilib}" = "yes"; then
++  multilib_arg="--enable-multilib"
++else
++  multilib_arg=
++fi
++
++ac_config_files="$ac_config_files Makefile backtrace-supported.h"
++
++
++# We need multilib support, but only if configuring for the target.
++ac_config_commands="$ac_config_commands default"
++
++
++cat >confcache <<\_ACEOF
++# This file is a shell script that caches the results of configure
++# tests run on this system so they can be shared between configure
++# scripts and configure runs, see configure's option --config-cache.
++# It is not useful on other systems.  If it contains results you don't
++# want to keep, you may remove or edit it.
++#
++# config.status only pays attention to the cache file if you give it
++# the --recheck option to rerun configure.
++#
++# `ac_cv_env_foo' variables (set or unset) will be overridden when
++# loading this file, other *unset* `ac_cv_foo' will be assigned the
++# following values.
++
++_ACEOF
++
++# The following way of writing the cache mishandles newlines in values,
++# but we know of no workaround that is simple, portable, and efficient.
++# So, we kill variables containing newlines.
++# Ultrix sh set writes to stderr and can't be redirected directly,
++# and sets the high bit in the cache file unless we assign to the vars.
++(
++  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
++    eval ac_val=\$$ac_var
++    case $ac_val in #(
++    *${as_nl}*)
++      case $ac_var in #(
++      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
++$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
++      esac
++      case $ac_var in #(
++      _ | IFS | as_nl) ;; #(
++      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
++      *) { eval $ac_var=; unset $ac_var;} ;;
++      esac ;;
++    esac
++  done
++
++  (set) 2>&1 |
++    case $as_nl`(ac_space=' '; set) 2>&1` in #(
++    *${as_nl}ac_space=\ *)
++      # `set' does not quote correctly, so add quotes: double-quote
++      # substitution turns \\\\ into \\, and sed turns \\ into \.
++      sed -n \
++      "s/'/'\\\\''/g;
++        s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
++      ;; #(
++    *)
++      # `set' quotes correctly as required by POSIX, so do not add quotes.
++      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
++      ;;
++    esac |
++    sort
++) |
++  sed '
++     /^ac_cv_env_/b end
++     t clear
++     :clear
++     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
++     t end
++     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
++     :end' >>confcache
++if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
++  if test -w "$cache_file"; then
++    test "x$cache_file" != "x/dev/null" &&
++      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
++$as_echo "$as_me: updating cache $cache_file" >&6;}
++    cat confcache >$cache_file
++  else
++    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
++$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
++  fi
++fi
++rm -f confcache
++
++test "x$prefix" = xNONE && prefix=$ac_default_prefix
++# Let make expand exec_prefix.
++test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
++
++DEFS=-DHAVE_CONFIG_H
++
++ac_libobjs=
++ac_ltlibobjs=
++for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
++  # 1. Remove the extension, and $U if already installed.
++  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
++  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
++  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
++  #    will be set to the directory where LIBOBJS objects are built.
++  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
++  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
++done
++LIBOBJS=$ac_libobjs
++
++LTLIBOBJS=$ac_ltlibobjs
++
++
++ if test -n "$EXEEXT"; then
++  am__EXEEXT_TRUE=
++  am__EXEEXT_FALSE='#'
++else
++  am__EXEEXT_TRUE='#'
++  am__EXEEXT_FALSE=
++fi
++
++if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
++  as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
++if test -z "${NATIVE_TRUE}" && test -z "${NATIVE_FALSE}"; then
++  as_fn_error "conditional \"NATIVE\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
++
++: ${CONFIG_STATUS=./config.status}
++ac_write_fail=0
++ac_clean_files_save=$ac_clean_files
++ac_clean_files="$ac_clean_files $CONFIG_STATUS"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
++$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
++as_write_fail=0
++cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
++#! $SHELL
++# Generated by $as_me.
++# Run this file to recreate the current configuration.
++# Compiler output produced by configure, useful for debugging
++# configure, is in config.log if it exists.
++
++debug=false
++ac_cs_recheck=false
++ac_cs_silent=false
++
++SHELL=\${CONFIG_SHELL-$SHELL}
++export SHELL
++_ASEOF
++cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
++## -------------------- ##
++## M4sh Initialization. ##
++## -------------------- ##
++
++# Be more Bourne compatible
++DUALCASE=1; export DUALCASE # for MKS sh
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
++  emulate sh
++  NULLCMD=:
++  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
++  # is contrary to our usage.  Disable this feature.
++  alias -g '${1+"$@"}'='"$@"'
++  setopt NO_GLOB_SUBST
++else
++  case `(set -o) 2>/dev/null` in #(
++  *posix*) :
++    set -o posix ;; #(
++  *) :
++     ;;
++esac
++fi
++
++
++as_nl='
++'
++export as_nl
++# Printing a long string crashes Solaris 7 /usr/bin/printf.
++as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
++# Prefer a ksh shell builtin over an external printf program on Solaris,
++# but without wasting forks for bash or zsh.
++if test -z "$BASH_VERSION$ZSH_VERSION" \
++    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
++  as_echo='print -r --'
++  as_echo_n='print -rn --'
++elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
++  as_echo='printf %s\n'
++  as_echo_n='printf %s'
++else
++  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
++    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
++    as_echo_n='/usr/ucb/echo -n'
++  else
++    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
++    as_echo_n_body='eval
++      arg=$1;
++      case $arg in #(
++      *"$as_nl"*)
++      expr "X$arg" : "X\\(.*\\)$as_nl";
++      arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
++      esac;
++      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
++    '
++    export as_echo_n_body
++    as_echo_n='sh -c $as_echo_n_body as_echo'
++  fi
++  export as_echo_body
++  as_echo='sh -c $as_echo_body as_echo'
++fi
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++  PATH_SEPARATOR=:
++  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
++    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
++      PATH_SEPARATOR=';'
++  }
++fi
++
++
++# IFS
++# We need space, tab and new line, in precisely that order.  Quoting is
++# there to prevent editors from complaining about space-tab.
++# (If _AS_PATH_WALK were called with IFS unset, it would disable word
++# splitting by setting IFS to empty value.)
++IFS=" ""      $as_nl"
++
++# Find who we are.  Look in the path if we contain no directory separator.
++case $0 in #((
++  *[\\/]* ) as_myself=$0 ;;
++  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
++  done
++IFS=$as_save_IFS
++
++     ;;
++esac
++# We did not find ourselves, most probably we were run as `sh COMMAND'
++# in which case we are not to be found in the path.
++if test "x$as_myself" = x; then
++  as_myself=$0
++fi
++if test ! -f "$as_myself"; then
++  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++  exit 1
++fi
++
++# Unset variables that we do not need and which cause bugs (e.g. in
++# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
++# suppresses any "Segmentation fault" message there.  '((' could
++# trigger a bug in pdksh 5.2.14.
++for as_var in BASH_ENV ENV MAIL MAILPATH
++do eval test x\${$as_var+set} = xset \
++  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
++done
++PS1='$ '
++PS2='> '
++PS4='+ '
++
++# NLS nuisances.
++LC_ALL=C
++export LC_ALL
++LANGUAGE=C
++export LANGUAGE
++
++# CDPATH.
++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
++
++
++# as_fn_error ERROR [LINENO LOG_FD]
++# ---------------------------------
++# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
++# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
++# script with status $?, using 1 if that was 0.
++as_fn_error ()
++{
++  as_status=$?; test $as_status -eq 0 && as_status=1
++  if test "$3"; then
++    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
++  fi
++  $as_echo "$as_me: error: $1" >&2
++  as_fn_exit $as_status
++} # as_fn_error
++
++
++# as_fn_set_status STATUS
++# -----------------------
++# Set $? to STATUS, without forking.
++as_fn_set_status ()
++{
++  return $1
++} # as_fn_set_status
++
++# as_fn_exit STATUS
++# -----------------
++# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
++as_fn_exit ()
++{
++  set +e
++  as_fn_set_status $1
++  exit $1
++} # as_fn_exit
++
++# as_fn_unset VAR
++# ---------------
++# Portably unset VAR.
++as_fn_unset ()
++{
++  { eval $1=; unset $1;}
++}
++as_unset=as_fn_unset
++# as_fn_append VAR VALUE
++# ----------------------
++# Append the text in VALUE to the end of the definition contained in VAR. Take
++# advantage of any shell optimizations that allow amortized linear growth over
++# repeated appends, instead of the typical quadratic growth present in naive
++# implementations.
++if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
++  eval 'as_fn_append ()
++  {
++    eval $1+=\$2
++  }'
++else
++  as_fn_append ()
++  {
++    eval $1=\$$1\$2
++  }
++fi # as_fn_append
++
++# as_fn_arith ARG...
++# ------------------
++# Perform arithmetic evaluation on the ARGs, and store the result in the
++# global $as_val. Take advantage of shells that can avoid forks. The arguments
++# must be portable across $(()) and expr.
++if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
++  eval 'as_fn_arith ()
++  {
++    as_val=$(( $* ))
++  }'
++else
++  as_fn_arith ()
++  {
++    as_val=`expr "$@" || test $? -eq 1`
++  }
++fi # as_fn_arith
++
++
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++   test "X`expr 00001 : '.*\(...\)'`" = X001; then
++  as_expr=expr
++else
++  as_expr=false
++fi
++
++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
++  as_basename=basename
++else
++  as_basename=false
++fi
++
++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
++  as_dirname=dirname
++else
++  as_dirname=false
++fi
++
++as_me=`$as_basename -- "$0" ||
++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
++       X"$0" : 'X\(//\)$' \| \
++       X"$0" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X/"$0" |
++    sed '/^.*\/\([^/][^/]*\)\/*$/{
++          s//\1/
++          q
++        }
++        /^X\/\(\/\/\)$/{
++          s//\1/
++          q
++        }
++        /^X\/\(\/\).*/{
++          s//\1/
++          q
++        }
++        s/.*/./; q'`
++
++# Avoid depending upon Character Ranges.
++as_cr_letters='abcdefghijklmnopqrstuvwxyz'
++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
++as_cr_Letters=$as_cr_letters$as_cr_LETTERS
++as_cr_digits='0123456789'
++as_cr_alnum=$as_cr_Letters$as_cr_digits
++
++ECHO_C= ECHO_N= ECHO_T=
++case `echo -n x` in #(((((
++-n*)
++  case `echo 'xy\c'` in
++  *c*) ECHO_T='       ';;     # ECHO_T is single tab character.
++  xy)  ECHO_C='\c';;
++  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
++       ECHO_T='       ';;
++  esac;;
++*)
++  ECHO_N='-n';;
++esac
++
++rm -f conf$$ conf$$.exe conf$$.file
++if test -d conf$$.dir; then
++  rm -f conf$$.dir/conf$$.file
++else
++  rm -f conf$$.dir
++  mkdir conf$$.dir 2>/dev/null
++fi
++if (echo >conf$$.file) 2>/dev/null; then
++  if ln -s conf$$.file conf$$ 2>/dev/null; then
++    as_ln_s='ln -s'
++    # ... but there are two gotchas:
++    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
++    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
++    # In both cases, we have to default to `cp -p'.
++    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
++      as_ln_s='cp -p'
++  elif ln conf$$.file conf$$ 2>/dev/null; then
++    as_ln_s=ln
++  else
++    as_ln_s='cp -p'
++  fi
++else
++  as_ln_s='cp -p'
++fi
++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
++rmdir conf$$.dir 2>/dev/null
++
++
++# as_fn_mkdir_p
++# -------------
++# Create "$as_dir" as a directory, including parents if necessary.
++as_fn_mkdir_p ()
++{
++
++  case $as_dir in #(
++  -*) as_dir=./$as_dir;;
++  esac
++  test -d "$as_dir" || eval $as_mkdir_p || {
++    as_dirs=
++    while :; do
++      case $as_dir in #(
++      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
++      *) as_qdir=$as_dir;;
++      esac
++      as_dirs="'$as_qdir' $as_dirs"
++      as_dir=`$as_dirname -- "$as_dir" ||
++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++       X"$as_dir" : 'X\(//\)[^/]' \| \
++       X"$as_dir" : 'X\(//\)$' \| \
++       X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X"$as_dir" |
++    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++          s//\1/
++          q
++        }
++        /^X\(\/\/\)[^/].*/{
++          s//\1/
++          q
++        }
++        /^X\(\/\/\)$/{
++          s//\1/
++          q
++        }
++        /^X\(\/\).*/{
++          s//\1/
++          q
++        }
++        s/.*/./; q'`
++      test -d "$as_dir" && break
++    done
++    test -z "$as_dirs" || eval "mkdir $as_dirs"
++  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
++
++
++} # as_fn_mkdir_p
++if mkdir -p . 2>/dev/null; then
++  as_mkdir_p='mkdir -p "$as_dir"'
++else
++  test -d ./-p && rmdir ./-p
++  as_mkdir_p=false
++fi
++
++if test -x / >/dev/null 2>&1; then
++  as_test_x='test -x'
++else
++  if ls -dL / >/dev/null 2>&1; then
++    as_ls_L_option=L
++  else
++    as_ls_L_option=
++  fi
++  as_test_x='
++    eval sh -c '\''
++      if test -d "$1"; then
++      test -d "$1/.";
++      else
++      case $1 in #(
++      -*)set "./$1";;
++      esac;
++      case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
++      ???[sx]*):;;*)false;;esac;fi
++    '\'' sh
++  '
++fi
++as_executable_p=$as_test_x
++
++# Sed expression to map a string onto a valid CPP name.
++as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
++
++# Sed expression to map a string onto a valid variable name.
++as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
++
++
++exec 6>&1
++## ----------------------------------- ##
++## Main body of $CONFIG_STATUS script. ##
++## ----------------------------------- ##
++_ASEOF
++test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
++
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++# Save the log message, to keep $0 and so on meaningful, and to
++# report actual input values of CONFIG_FILES etc. instead of their
++# values after options handling.
++ac_log="
++This file was extended by package-unused $as_me version-unused, which was
++generated by GNU Autoconf 2.64.  Invocation command line was
++
++  CONFIG_FILES    = $CONFIG_FILES
++  CONFIG_HEADERS  = $CONFIG_HEADERS
++  CONFIG_LINKS    = $CONFIG_LINKS
++  CONFIG_COMMANDS = $CONFIG_COMMANDS
++  $ $0 $@
++
++on `(hostname || uname -n) 2>/dev/null | sed 1q`
++"
++
++_ACEOF
++
++case $ac_config_files in *"
++"*) set x $ac_config_files; shift; ac_config_files=$*;;
++esac
++
++case $ac_config_headers in *"
++"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
++esac
++
++
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++# Files that config.status was made for.
++config_files="$ac_config_files"
++config_headers="$ac_config_headers"
++config_commands="$ac_config_commands"
++
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++ac_cs_usage="\
++\`$as_me' instantiates files and other configuration actions
++from templates according to the current configuration.  Unless the files
++and actions are specified as TAGs, all are instantiated by default.
++
++Usage: $0 [OPTION]... [TAG]...
++
++  -h, --help       print this help, then exit
++  -V, --version    print version number and configuration settings, then exit
++  -q, --quiet, --silent
++                   do not print progress messages
++  -d, --debug      don't remove temporary files
++      --recheck    update $as_me by reconfiguring in the same conditions
++      --file=FILE[:TEMPLATE]
++                   instantiate the configuration file FILE
++      --header=FILE[:TEMPLATE]
++                   instantiate the configuration header FILE
++
++Configuration files:
++$config_files
++
++Configuration headers:
++$config_headers
++
++Configuration commands:
++$config_commands
++
++Report bugs to the package provider."
++
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++ac_cs_version="\\
++package-unused config.status version-unused
++configured by $0, generated by GNU Autoconf 2.64,
++  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
++
++Copyright (C) 2009 Free Software Foundation, Inc.
++This config.status script is free software; the Free Software Foundation
++gives unlimited permission to copy, distribute and modify it."
++
++ac_pwd='$ac_pwd'
++srcdir='$srcdir'
++INSTALL='$INSTALL'
++MKDIR_P='$MKDIR_P'
++AWK='$AWK'
++test -n "\$AWK" || AWK=awk
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++# The default lists apply if the user does not specify any file.
++ac_need_defaults=:
++while test $# != 0
++do
++  case $1 in
++  --*=*)
++    ac_option=`expr "X$1" : 'X\([^=]*\)='`
++    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
++    ac_shift=:
++    ;;
++  *)
++    ac_option=$1
++    ac_optarg=$2
++    ac_shift=shift
++    ;;
++  esac
++
++  case $ac_option in
++  # Handling of the options.
++  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
++    ac_cs_recheck=: ;;
++  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
++    $as_echo "$ac_cs_version"; exit ;;
++  --debug | --debu | --deb | --de | --d | -d )
++    debug=: ;;
++  --file | --fil | --fi | --f )
++    $ac_shift
++    case $ac_optarg in
++    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
++    esac
++    as_fn_append CONFIG_FILES " '$ac_optarg'"
++    ac_need_defaults=false;;
++  --header | --heade | --head | --hea )
++    $ac_shift
++    case $ac_optarg in
++    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
++    esac
++    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
++    ac_need_defaults=false;;
++  --he | --h)
++    # Conflict between --help and --header
++    as_fn_error "ambiguous option: \`$1'
++Try \`$0 --help' for more information.";;
++  --help | --hel | -h )
++    $as_echo "$ac_cs_usage"; exit ;;
++  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
++  | -silent | --silent | --silen | --sile | --sil | --si | --s)
++    ac_cs_silent=: ;;
++
++  # This is an error.
++  -*) as_fn_error "unrecognized option: \`$1'
++Try \`$0 --help' for more information." ;;
++
++  *) as_fn_append ac_config_targets " $1"
++     ac_need_defaults=false ;;
++
++  esac
++  shift
++done
++
++ac_configure_extra_args=
++
++if $ac_cs_silent; then
++  exec 6>/dev/null
++  ac_configure_extra_args="$ac_configure_extra_args --silent"
++fi
++
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++if \$ac_cs_recheck; then
++  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
++  shift
++  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
++  CONFIG_SHELL='$SHELL'
++  export CONFIG_SHELL
++  exec "\$@"
++fi
++
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++exec 5>>config.log
++{
++  echo
++  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
++## Running $as_me. ##
++_ASBOX
++  $as_echo "$ac_log"
++} >&5
++
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++#
++# INIT-COMMANDS
++#
++
++srcdir="$srcdir"
++host="$host"
++target="$target"
++with_multisubdir="$with_multisubdir"
++with_multisrctop="$with_multisrctop"
++with_target_subdir="$with_target_subdir"
++ac_configure_args="${multilib_arg} ${ac_configure_args}"
++multi_basedir="$multi_basedir"
++CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
++CC="$CC"
++CXX="$CXX"
++GFORTRAN="$GFORTRAN"
++
++
++# The HP-UX ksh and POSIX shell print the target directory to stdout
++# if CDPATH is set.
++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
++
++sed_quote_subst='$sed_quote_subst'
++double_quote_subst='$double_quote_subst'
++delay_variable_subst='$delay_variable_subst'
++macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
++macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
++enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
++enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
++pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
++enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
++SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
++ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
++host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
++host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
++host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
++build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
++build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
++build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
++SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
++Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
++GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
++EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
++FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
++LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
++NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
++LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
++max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
++ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
++exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
++lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
++lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
++lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
++reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
++reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
++OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
++deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
++file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
++AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
++AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
++STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
++RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
++old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
++old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
++old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
++lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
++CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
++CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
++compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
++GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
++lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
++lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
++lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
++objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
++MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
++lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
++lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
++lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
++lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
++need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
++DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
++NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
++LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
++OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
++OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
++libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
++shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
++extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
++archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
++enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
++export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
++whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
++compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
++old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
++old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
++archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
++archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
++module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
++module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
++with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
++allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
++no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
++hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
++hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
++hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
++hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
++hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
++hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
++hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
++hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
++inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
++link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
++fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`'
++always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
++export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
++exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
++include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
++prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
++file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
++variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
++need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
++need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
++version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
++runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
++shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
++shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
++libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
++library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
++soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
++install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
++postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
++postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
++finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
++finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
++hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
++sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
++sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
++hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
++enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
++enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
++enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
++old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
++striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
++
++LTCC='$LTCC'
++LTCFLAGS='$LTCFLAGS'
++compiler='$compiler_DEFAULT'
++
++# A function that is used when there is no print builtin or printf.
++func_fallback_echo ()
++{
++  eval 'cat <<_LTECHO_EOF
++\$1
++_LTECHO_EOF'
++}
++
++# Quote evaled strings.
++for var in SHELL \
++ECHO \
++SED \
++GREP \
++EGREP \
++FGREP \
++LD \
++NM \
++LN_S \
++lt_SP2NL \
++lt_NL2SP \
++reload_flag \
++OBJDUMP \
++deplibs_check_method \
++file_magic_cmd \
++AR \
++AR_FLAGS \
++STRIP \
++RANLIB \
++CC \
++CFLAGS \
++compiler \
++lt_cv_sys_global_symbol_pipe \
++lt_cv_sys_global_symbol_to_cdecl \
++lt_cv_sys_global_symbol_to_c_name_address \
++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
++lt_prog_compiler_no_builtin_flag \
++lt_prog_compiler_wl \
++lt_prog_compiler_pic \
++lt_prog_compiler_static \
++lt_cv_prog_compiler_c_o \
++need_locks \
++DSYMUTIL \
++NMEDIT \
++LIPO \
++OTOOL \
++OTOOL64 \
++shrext_cmds \
++export_dynamic_flag_spec \
++whole_archive_flag_spec \
++compiler_needs_object \
++with_gnu_ld \
++allow_undefined_flag \
++no_undefined_flag \
++hardcode_libdir_flag_spec \
++hardcode_libdir_flag_spec_ld \
++hardcode_libdir_separator \
++fix_srcfile_path \
++exclude_expsyms \
++include_expsyms \
++file_list_spec \
++variables_saved_for_relink \
++libname_spec \
++library_names_spec \
++soname_spec \
++install_override_mode \
++finish_eval \
++old_striplib \
++striplib; do
++    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
++    *[\\\\\\\`\\"\\\$]*)
++      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
++      ;;
++    *)
++      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
++      ;;
++    esac
++done
++
++# Double-quote double-evaled strings.
++for var in reload_cmds \
++old_postinstall_cmds \
++old_postuninstall_cmds \
++old_archive_cmds \
++extract_expsyms_cmds \
++old_archive_from_new_cmds \
++old_archive_from_expsyms_cmds \
++archive_cmds \
++archive_expsym_cmds \
++module_cmds \
++module_expsym_cmds \
++export_symbols_cmds \
++prelink_cmds \
++postinstall_cmds \
++postuninstall_cmds \
++finish_cmds \
++sys_lib_search_path_spec \
++sys_lib_dlsearch_path_spec; do
++    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
++    *[\\\\\\\`\\"\\\$]*)
++      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
++      ;;
++    *)
++      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
++      ;;
++    esac
++done
++
++ac_aux_dir='$ac_aux_dir'
++xsi_shell='$xsi_shell'
++lt_shell_append='$lt_shell_append'
++
++# See if we are running on zsh, and set the options which allow our
++# commands through without removal of \ escapes INIT.
++if test -n "\${ZSH_VERSION+set}" ; then
++   setopt NO_GLOB_SUBST
++fi
++
++
++    PACKAGE='$PACKAGE'
++    VERSION='$VERSION'
++    TIMESTAMP='$TIMESTAMP'
++    RM='$RM'
++    ofile='$ofile'
++
++
++
++
++GCC="$GCC"
++CC="$CC"
++acx_cv_header_stdint="$acx_cv_header_stdint"
++acx_cv_type_int8_t="$acx_cv_type_int8_t"
++acx_cv_type_int16_t="$acx_cv_type_int16_t"
++acx_cv_type_int32_t="$acx_cv_type_int32_t"
++acx_cv_type_int64_t="$acx_cv_type_int64_t"
++acx_cv_type_intptr_t="$acx_cv_type_intptr_t"
++ac_cv_type_uintmax_t="$ac_cv_type_uintmax_t"
++ac_cv_type_uintptr_t="$ac_cv_type_uintptr_t"
++ac_cv_type_uint64_t="$ac_cv_type_uint64_t"
++ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t"
++ac_cv_type_u_int32_t="$ac_cv_type_u_int32_t"
++ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t"
++ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t"
++ac_cv_sizeof_void_p="$ac_cv_sizeof_void_p"
++
++
++# Variables needed in config.status (file generation) which aren't already
++# passed by autoconf.
++SUBDIRS="$SUBDIRS"
++
++
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++
++# Handling of arguments.
++for ac_config_target in $ac_config_targets
++do
++  case $ac_config_target in
++    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
++    "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
++    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
++    "gstdint.h") CONFIG_COMMANDS="$CONFIG_COMMANDS gstdint.h" ;;
++    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
++    "backtrace-supported.h") CONFIG_FILES="$CONFIG_FILES backtrace-supported.h" ;;
++    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
++
++  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
++  esac
++done
++
++
++# If the user did not use the arguments to specify the items to instantiate,
++# then the envvar interface is used.  Set only those that are not.
++# We use the long form for the default assignment because of an extremely
++# bizarre bug on SunOS 4.1.3.
++if $ac_need_defaults; then
++  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
++  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
++  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
++fi
++
++# Have a temporary directory for convenience.  Make it in the build tree
++# simply because there is no reason against having it here, and in addition,
++# creating and moving files from /tmp can sometimes cause problems.
++# Hook for its removal unless debugging.
++# Note that there is a small window in which the directory will not be cleaned:
++# after its creation but before its name has been assigned to `$tmp'.
++$debug ||
++{
++  tmp=
++  trap 'exit_status=$?
++  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
++' 0
++  trap 'as_fn_exit 1' 1 2 13 15
++}
++# Create a (secure) tmp directory for tmp files.
++
++{
++  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
++  test -n "$tmp" && test -d "$tmp"
++}  ||
++{
++  tmp=./conf$$-$RANDOM
++  (umask 077 && mkdir "$tmp")
++} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
++
++# Set up the scripts for CONFIG_FILES section.
++# No need to generate them if there are no CONFIG_FILES.
++# This happens for instance with `./config.status config.h'.
++if test -n "$CONFIG_FILES"; then
++
++
++ac_cr=`echo X | tr X '\015'`
++# On cygwin, bash can eat \r inside `` if the user requested igncr.
++# But we know of no other shell where ac_cr would be empty at this
++# point, so we can use a bashism as a fallback.
++if test "x$ac_cr" = x; then
++  eval ac_cr=\$\'\\r\'
++fi
++ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
++if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
++  ac_cs_awk_cr='\r'
++else
++  ac_cs_awk_cr=$ac_cr
++fi
++
++echo 'BEGIN {' >"$tmp/subs1.awk" &&
++_ACEOF
++
++
++{
++  echo "cat >conf$$subs.awk <<_ACEOF" &&
++  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
++  echo "_ACEOF"
++} >conf$$subs.sh ||
++  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
++ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
++ac_delim='%!_!# '
++for ac_last_try in false false false false false :; do
++  . ./conf$$subs.sh ||
++    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
++
++  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
++  if test $ac_delim_n = $ac_delim_num; then
++    break
++  elif $ac_last_try; then
++    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
++  else
++    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
++  fi
++done
++rm -f conf$$subs.sh
++
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
++_ACEOF
++sed -n '
++h
++s/^/S["/; s/!.*/"]=/
++p
++g
++s/^[^!]*!//
++:repl
++t repl
++s/'"$ac_delim"'$//
++t delim
++:nl
++h
++s/\(.\{148\}\).*/\1/
++t more1
++s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
++p
++n
++b repl
++:more1
++s/["\\]/\\&/g; s/^/"/; s/$/"\\/
++p
++g
++s/.\{148\}//
++t nl
++:delim
++h
++s/\(.\{148\}\).*/\1/
++t more2
++s/["\\]/\\&/g; s/^/"/; s/$/"/
++p
++b
++:more2
++s/["\\]/\\&/g; s/^/"/; s/$/"\\/
++p
++g
++s/.\{148\}//
++t delim
++' <conf$$subs.awk | sed '
++/^[^""]/{
++  N
++  s/\n//
++}
++' >>$CONFIG_STATUS || ac_write_fail=1
++rm -f conf$$subs.awk
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++_ACAWK
++cat >>"\$tmp/subs1.awk" <<_ACAWK &&
++  for (key in S) S_is_set[key] = 1
++  FS = "\a"
++
++}
++{
++  line = $ 0
++  nfields = split(line, field, "@")
++  substed = 0
++  len = length(field[1])
++  for (i = 2; i < nfields; i++) {
++    key = field[i]
++    keylen = length(key)
++    if (S_is_set[key]) {
++      value = S[key]
++      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
++      len += length(value) + length(field[++i])
++      substed = 1
++    } else
++      len += 1 + keylen
++  }
++
++  print line
++}
++
++_ACAWK
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
++  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
++else
++  cat
++fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
++  || as_fn_error "could not setup config files machinery" "$LINENO" 5
++_ACEOF
++
++# VPATH may cause trouble with some makes, so we remove $(srcdir),
++# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
++# trailing colons and then remove the whole line if VPATH becomes empty
++# (actually we leave an empty line to preserve line numbers).
++if test "x$srcdir" = x.; then
++  ac_vpsub='/^[        ]*VPATH[        ]*=/{
++s/:*\$(srcdir):*/:/
++s/:*\${srcdir}:*/:/
++s/:*@srcdir@:*/:/
++s/^\([^=]*=[   ]*\):*/\1/
++s/:*$//
++s/^[^=]*=[     ]*$//
++}'
++fi
++
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++fi # test -n "$CONFIG_FILES"
++
++# Set up the scripts for CONFIG_HEADERS section.
++# No need to generate them if there are no CONFIG_HEADERS.
++# This happens for instance with `./config.status Makefile'.
++if test -n "$CONFIG_HEADERS"; then
++cat >"$tmp/defines.awk" <<\_ACAWK ||
++BEGIN {
++_ACEOF
++
++# Transform confdefs.h into an awk script `defines.awk', embedded as
++# here-document in config.status, that substitutes the proper values into
++# config.h.in to produce config.h.
++
++# Create a delimiter string that does not exist in confdefs.h, to ease
++# handling of long lines.
++ac_delim='%!_!# '
++for ac_last_try in false false :; do
++  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
++  if test -z "$ac_t"; then
++    break
++  elif $ac_last_try; then
++    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
++  else
++    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
++  fi
++done
++
++# For the awk script, D is an array of macro values keyed by name,
++# likewise P contains macro parameters if any.  Preserve backslash
++# newline sequences.
++
++ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
++sed -n '
++s/.\{148\}/&'"$ac_delim"'/g
++t rset
++:rset
++s/^[   ]*#[    ]*define[       ][      ]*/ /
++t def
++d
++:def
++s/\\$//
++t bsnl
++s/["\\]/\\&/g
++s/^ \('"$ac_word_re"'\)\(([^()]*)\)[   ]*\(.*\)/P["\1"]="\2"\
++D["\1"]=" \3"/p
++s/^ \('"$ac_word_re"'\)[       ]*\(.*\)/D["\1"]=" \2"/p
++d
++:bsnl
++s/["\\]/\\&/g
++s/^ \('"$ac_word_re"'\)\(([^()]*)\)[   ]*\(.*\)/P["\1"]="\2"\
++D["\1"]=" \3\\\\\\n"\\/p
++t cont
++s/^ \('"$ac_word_re"'\)[       ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
++t cont
++d
++:cont
++n
++s/.\{148\}/&'"$ac_delim"'/g
++t clear
++:clear
++s/\\$//
++t bsnlc
++s/["\\]/\\&/g; s/^/"/; s/$/"/p
++d
++:bsnlc
++s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
++b cont
++' <confdefs.h | sed '
++s/'"$ac_delim"'/"\\\
++"/g' >>$CONFIG_STATUS || ac_write_fail=1
++
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++  for (key in D) D_is_set[key] = 1
++  FS = "\a"
++}
++/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
++  line = \$ 0
++  split(line, arg, " ")
++  if (arg[1] == "#") {
++    defundef = arg[2]
++    mac1 = arg[3]
++  } else {
++    defundef = substr(arg[1], 2)
++    mac1 = arg[2]
++  }
++  split(mac1, mac2, "(") #)
++  macro = mac2[1]
++  prefix = substr(line, 1, index(line, defundef) - 1)
++  if (D_is_set[macro]) {
++    # Preserve the white space surrounding the "#".
++    print prefix "define", macro P[macro] D[macro]
++    next
++  } else {
++    # Replace #undef with comments.  This is necessary, for example,
++    # in the case of _POSIX_SOURCE, which is predefined and required
++    # on some systems where configure will not decide to define it.
++    if (defundef == "undef") {
++      print "/*", prefix defundef, macro, "*/"
++      next
++    }
++  }
++}
++{ print }
++_ACAWK
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++  as_fn_error "could not setup config headers machinery" "$LINENO" 5
++fi # test -n "$CONFIG_HEADERS"
++
++
++eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
++shift
++for ac_tag
++do
++  case $ac_tag in
++  :[FHLC]) ac_mode=$ac_tag; continue;;
++  esac
++  case $ac_mode$ac_tag in
++  :[FHL]*:*);;
++  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
++  :[FH]-) ac_tag=-:-;;
++  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
++  esac
++  ac_save_IFS=$IFS
++  IFS=:
++  set x $ac_tag
++  IFS=$ac_save_IFS
++  shift
++  ac_file=$1
++  shift
++
++  case $ac_mode in
++  :L) ac_source=$1;;
++  :[FH])
++    ac_file_inputs=
++    for ac_f
++    do
++      case $ac_f in
++      -) ac_f="$tmp/stdin";;
++      *) # Look for the file first in the build tree, then in the source tree
++       # (if the path is not absolute).  The absolute path cannot be DOS-style,
++       # because $ac_f cannot contain `:'.
++       test -f "$ac_f" ||
++         case $ac_f in
++         [\\/$]*) false;;
++         *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
++         esac ||
++         as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
++      esac
++      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
++      as_fn_append ac_file_inputs " '$ac_f'"
++    done
++
++    # Let's still pretend it is `configure' which instantiates (i.e., don't
++    # use $as_me), people would be surprised to read:
++    #    /* config.h.  Generated by config.status.  */
++    configure_input='Generated from '`
++        $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
++      `' by configure.'
++    if test x"$ac_file" != x-; then
++      configure_input="$ac_file.  $configure_input"
++      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
++$as_echo "$as_me: creating $ac_file" >&6;}
++    fi
++    # Neutralize special characters interpreted by sed in replacement strings.
++    case $configure_input in #(
++    *\&* | *\|* | *\\* )
++       ac_sed_conf_input=`$as_echo "$configure_input" |
++       sed 's/[\\\\&|]/\\\\&/g'`;; #(
++    *) ac_sed_conf_input=$configure_input;;
++    esac
++
++    case $ac_tag in
++    *:-:* | *:-) cat >"$tmp/stdin" \
++      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
++    esac
++    ;;
++  esac
++
++  ac_dir=`$as_dirname -- "$ac_file" ||
++$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++       X"$ac_file" : 'X\(//\)[^/]' \| \
++       X"$ac_file" : 'X\(//\)$' \| \
++       X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X"$ac_file" |
++    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++          s//\1/
++          q
++        }
++        /^X\(\/\/\)[^/].*/{
++          s//\1/
++          q
++        }
++        /^X\(\/\/\)$/{
++          s//\1/
++          q
++        }
++        /^X\(\/\).*/{
++          s//\1/
++          q
++        }
++        s/.*/./; q'`
++  as_dir="$ac_dir"; as_fn_mkdir_p
++  ac_builddir=.
++
++case "$ac_dir" in
++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
++*)
++  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
++  # A ".." for each directory in $ac_dir_suffix.
++  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
++  case $ac_top_builddir_sub in
++  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
++  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
++  esac ;;
++esac
++ac_abs_top_builddir=$ac_pwd
++ac_abs_builddir=$ac_pwd$ac_dir_suffix
++# for backward compatibility:
++ac_top_builddir=$ac_top_build_prefix
++
++case $srcdir in
++  .)  # We are building in place.
++    ac_srcdir=.
++    ac_top_srcdir=$ac_top_builddir_sub
++    ac_abs_top_srcdir=$ac_pwd ;;
++  [\\/]* | ?:[\\/]* )  # Absolute name.
++    ac_srcdir=$srcdir$ac_dir_suffix;
++    ac_top_srcdir=$srcdir
++    ac_abs_top_srcdir=$srcdir ;;
++  *) # Relative name.
++    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
++    ac_top_srcdir=$ac_top_build_prefix$srcdir
++    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
++esac
++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
++
++
++  case $ac_mode in
++  :F)
++  #
++  # CONFIG_FILE
++  #
++
++  case $INSTALL in
++  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
++  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
++  esac
++  ac_MKDIR_P=$MKDIR_P
++  case $MKDIR_P in
++  [\\/$]* | ?:[\\/]* ) ;;
++  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
++  esac
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++# If the template does not know about datarootdir, expand it.
++# FIXME: This hack should be removed a few years after 2.60.
++ac_datarootdir_hack=; ac_datarootdir_seen=
++ac_sed_dataroot='
++/datarootdir/ {
++  p
++  q
++}
++/@datadir@/p
++/@docdir@/p
++/@infodir@/p
++/@localedir@/p
++/@mandir@/p'
++case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
++*datarootdir*) ac_datarootdir_seen=yes;;
++*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
++$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++  ac_datarootdir_hack='
++  s&@datadir@&$datadir&g
++  s&@docdir@&$docdir&g
++  s&@infodir@&$infodir&g
++  s&@localedir@&$localedir&g
++  s&@mandir@&$mandir&g
++  s&\\\${datarootdir}&$datarootdir&g' ;;
++esac
++_ACEOF
++
++# Neutralize VPATH when `$srcdir' = `.'.
++# Shell code in configure.ac might set extrasub.
++# FIXME: do we really want to maintain this feature?
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++ac_sed_extra="$ac_vpsub
++$extrasub
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++:t
++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
++s|@configure_input@|$ac_sed_conf_input|;t t
++s&@top_builddir@&$ac_top_builddir_sub&;t t
++s&@top_build_prefix@&$ac_top_build_prefix&;t t
++s&@srcdir@&$ac_srcdir&;t t
++s&@abs_srcdir@&$ac_abs_srcdir&;t t
++s&@top_srcdir@&$ac_top_srcdir&;t t
++s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
++s&@builddir@&$ac_builddir&;t t
++s&@abs_builddir@&$ac_abs_builddir&;t t
++s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
++s&@INSTALL@&$ac_INSTALL&;t t
++s&@MKDIR_P@&$ac_MKDIR_P&;t t
++$ac_datarootdir_hack
++"
++eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
++  || as_fn_error "could not create $ac_file" "$LINENO" 5
++
++test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
++  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
++  { ac_out=`sed -n '/^[        ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
++which seems to be undefined.  Please make sure it is defined." >&5
++$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
++which seems to be undefined.  Please make sure it is defined." >&2;}
++
++  rm -f "$tmp/stdin"
++  case $ac_file in
++  -) cat "$tmp/out" && rm -f "$tmp/out";;
++  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
++  esac \
++  || as_fn_error "could not create $ac_file" "$LINENO" 5
++ ;;
++  :H)
++  #
++  # CONFIG_HEADER
++  #
++  if test x"$ac_file" != x-; then
++    {
++      $as_echo "/* $configure_input  */" \
++      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
++    } >"$tmp/config.h" \
++      || as_fn_error "could not create $ac_file" "$LINENO" 5
++    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
++      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
++$as_echo "$as_me: $ac_file is unchanged" >&6;}
++    else
++      rm -f "$ac_file"
++      mv "$tmp/config.h" "$ac_file" \
++      || as_fn_error "could not create $ac_file" "$LINENO" 5
++    fi
++  else
++    $as_echo "/* $configure_input  */" \
++      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
++      || as_fn_error "could not create -" "$LINENO" 5
++  fi
++# Compute "$ac_file"'s index in $config_headers.
++_am_arg="$ac_file"
++_am_stamp_count=1
++for _am_header in $config_headers :; do
++  case $_am_header in
++    $_am_arg | $_am_arg:* )
++      break ;;
++    * )
++      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
++  esac
++done
++echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
++$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++       X"$_am_arg" : 'X\(//\)[^/]' \| \
++       X"$_am_arg" : 'X\(//\)$' \| \
++       X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X"$_am_arg" |
++    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++          s//\1/
++          q
++        }
++        /^X\(\/\/\)[^/].*/{
++          s//\1/
++          q
++        }
++        /^X\(\/\/\)$/{
++          s//\1/
++          q
++        }
++        /^X\(\/\).*/{
++          s//\1/
++          q
++        }
++        s/.*/./; q'`/stamp-h$_am_stamp_count
++ ;;
++
++  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
++$as_echo "$as_me: executing $ac_file commands" >&6;}
++ ;;
++  esac
++
++
++  case $ac_file$ac_mode in
++    "default-1":C)
++# Only add multilib support code if we just rebuilt the top-level
++# Makefile.
++case " $CONFIG_FILES " in
++ *" Makefile "*)
++   ac_file=Makefile . ${multi_basedir}/config-ml.in
++   ;;
++esac ;;
++    "libtool":C)
++
++    # See if we are running on zsh, and set the options which allow our
++    # commands through without removal of \ escapes.
++    if test -n "${ZSH_VERSION+set}" ; then
++      setopt NO_GLOB_SUBST
++    fi
++
++    cfgfile="${ofile}T"
++    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
++    $RM "$cfgfile"
++
++    cat <<_LT_EOF >> "$cfgfile"
++#! $SHELL
++
++# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
++# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
++# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
++# NOTE: Changes made to this file will be lost: look at ltmain.sh.
++#
++#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
++#                 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
++#   Written by Gordon Matzigkeit, 1996
++#
++#   This file is part of GNU Libtool.
++#
++# GNU Libtool is free software; you can redistribute it and/or
++# modify it under the terms of the GNU General Public License as
++# published by the Free Software Foundation; either version 2 of
++# the License, or (at your option) any later version.
++#
++# As a special exception to the GNU General Public License,
++# if you distribute this file as part of a program or library that
++# is built using GNU Libtool, you may include this file under the
++# same distribution terms that you use for the rest of that program.
++#
++# GNU Libtool is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with GNU Libtool; see the file COPYING.  If not, a copy
++# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
++# obtained by writing to the Free Software Foundation, Inc.,
++# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++
++
++# The names of the tagged configurations supported by this script.
++available_tags=""
++
++# ### BEGIN LIBTOOL CONFIG
++
++# Which release of libtool.m4 was used?
++macro_version=$macro_version
++macro_revision=$macro_revision
++
++# Whether or not to build shared libraries.
++build_libtool_libs=$enable_shared
++
++# Whether or not to build static libraries.
++build_old_libs=$enable_static
++
++# What type of objects to build.
++pic_mode=$pic_mode
++
++# Whether or not to optimize for fast installation.
++fast_install=$enable_fast_install
++
++# Shell to use when invoking shell scripts.
++SHELL=$lt_SHELL
++
++# An echo program that protects backslashes.
++ECHO=$lt_ECHO
++
++# The host system.
++host_alias=$host_alias
++host=$host
++host_os=$host_os
++
++# The build system.
++build_alias=$build_alias
++build=$build
++build_os=$build_os
++
++# A sed program that does not truncate output.
++SED=$lt_SED
++
++# Sed that helps us avoid accidentally triggering echo(1) options like -n.
++Xsed="\$SED -e 1s/^X//"
++
++# A grep program that handles long lines.
++GREP=$lt_GREP
++
++# An ERE matcher.
++EGREP=$lt_EGREP
++
++# A literal string matcher.
++FGREP=$lt_FGREP
++
++# A BSD- or MS-compatible name lister.
++NM=$lt_NM
++
++# Whether we need soft or hard links.
++LN_S=$lt_LN_S
++
++# What is the maximum length of a command?
++max_cmd_len=$max_cmd_len
++
++# Object file suffix (normally "o").
++objext=$ac_objext
++
++# Executable file suffix (normally "").
++exeext=$exeext
++
++# whether the shell understands "unset".
++lt_unset=$lt_unset
++
++# turn spaces into newlines.
++SP2NL=$lt_lt_SP2NL
++
++# turn newlines into spaces.
++NL2SP=$lt_lt_NL2SP
++
++# An object symbol dumper.
++OBJDUMP=$lt_OBJDUMP
++
++# Method to check whether dependent libraries are shared objects.
++deplibs_check_method=$lt_deplibs_check_method
++
++# Command to use when deplibs_check_method == "file_magic".
++file_magic_cmd=$lt_file_magic_cmd
++
++# The archiver.
++AR=$lt_AR
++AR_FLAGS=$lt_AR_FLAGS
++
++# A symbol stripping program.
++STRIP=$lt_STRIP
++
++# Commands used to install an old-style archive.
++RANLIB=$lt_RANLIB
++old_postinstall_cmds=$lt_old_postinstall_cmds
++old_postuninstall_cmds=$lt_old_postuninstall_cmds
++
++# Whether to use a lock for old archive extraction.
++lock_old_archive_extraction=$lock_old_archive_extraction
++
++# A C compiler.
++LTCC=$lt_CC
++
++# LTCC compiler flags.
++LTCFLAGS=$lt_CFLAGS
++
++# Take the output of nm and produce a listing of raw symbols and C names.
++global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
++
++# Transform the output of nm in a proper C declaration.
++global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
++
++# Transform the output of nm in a C name address pair.
++global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
++
++# Transform the output of nm in a C name address pair when lib prefix is needed.
++global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
++
++# The name of the directory that contains temporary libtool files.
++objdir=$objdir
++
++# Used to examine libraries when file_magic_cmd begins with "file".
++MAGIC_CMD=$MAGIC_CMD
++
++# Must we lock files when doing compilation?
++need_locks=$lt_need_locks
++
++# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
++DSYMUTIL=$lt_DSYMUTIL
++
++# Tool to change global to local symbols on Mac OS X.
++NMEDIT=$lt_NMEDIT
++
++# Tool to manipulate fat objects and archives on Mac OS X.
++LIPO=$lt_LIPO
++
++# ldd/readelf like tool for Mach-O binaries on Mac OS X.
++OTOOL=$lt_OTOOL
++
++# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
++OTOOL64=$lt_OTOOL64
++
++# Old archive suffix (normally "a").
++libext=$libext
++
++# Shared library suffix (normally ".so").
++shrext_cmds=$lt_shrext_cmds
++
++# The commands to extract the exported symbol list from a shared archive.
++extract_expsyms_cmds=$lt_extract_expsyms_cmds
++
++# Variables whose values should be saved in libtool wrapper scripts and
++# restored at link time.
++variables_saved_for_relink=$lt_variables_saved_for_relink
++
++# Do we need the "lib" prefix for modules?
++need_lib_prefix=$need_lib_prefix
++
++# Do we need a version for libraries?
++need_version=$need_version
++
++# Library versioning type.
++version_type=$version_type
++
++# Shared library runtime path variable.
++runpath_var=$runpath_var
++
++# Shared library path variable.
++shlibpath_var=$shlibpath_var
++
++# Is shlibpath searched before the hard-coded library search path?
++shlibpath_overrides_runpath=$shlibpath_overrides_runpath
++
++# Format of library name prefix.
++libname_spec=$lt_libname_spec
++
++# List of archive names.  First name is the real one, the rest are links.
++# The last name is the one that the linker finds with -lNAME
++library_names_spec=$lt_library_names_spec
++
++# The coded name of the library, if different from the real name.
++soname_spec=$lt_soname_spec
++
++# Permission mode override for installation of shared libraries.
++install_override_mode=$lt_install_override_mode
++
++# Command to use after installation of a shared archive.
++postinstall_cmds=$lt_postinstall_cmds
++
++# Command to use after uninstallation of a shared archive.
++postuninstall_cmds=$lt_postuninstall_cmds
++
++# Commands used to finish a libtool library installation in a directory.
++finish_cmds=$lt_finish_cmds
++
++# As "finish_cmds", except a single script fragment to be evaled but
++# not shown.
++finish_eval=$lt_finish_eval
++
++# Whether we should hardcode library paths into libraries.
++hardcode_into_libs=$hardcode_into_libs
++
++# Compile-time system search path for libraries.
++sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
++
++# Run-time system search path for libraries.
++sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
++
++# Whether dlopen is supported.
++dlopen_support=$enable_dlopen
++
++# Whether dlopen of programs is supported.
++dlopen_self=$enable_dlopen_self
++
++# Whether dlopen of statically linked programs is supported.
++dlopen_self_static=$enable_dlopen_self_static
++
++# Commands to strip libraries.
++old_striplib=$lt_old_striplib
++striplib=$lt_striplib
++
++
++# The linker used to build libraries.
++LD=$lt_LD
++
++# How to create reloadable object files.
++reload_flag=$lt_reload_flag
++reload_cmds=$lt_reload_cmds
++
++# Commands used to build an old-style archive.
++old_archive_cmds=$lt_old_archive_cmds
++
++# A language specific compiler.
++CC=$lt_compiler
++
++# Is the compiler the GNU compiler?
++with_gcc=$GCC
++
++# Compiler flag to turn off builtin functions.
++no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
++
++# How to pass a linker flag through the compiler.
++wl=$lt_lt_prog_compiler_wl
++
++# Additional compiler flags for building library objects.
++pic_flag=$lt_lt_prog_compiler_pic
++
++# Compiler flag to prevent dynamic linking.
++link_static_flag=$lt_lt_prog_compiler_static
++
++# Does compiler simultaneously support -c and -o options?
++compiler_c_o=$lt_lt_cv_prog_compiler_c_o
++
++# Whether or not to add -lc for building shared libraries.
++build_libtool_need_lc=$archive_cmds_need_lc
++
++# Whether or not to disallow shared libs when runtime libs are static.
++allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
++
++# Compiler flag to allow reflexive dlopens.
++export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
++
++# Compiler flag to generate shared objects directly from archives.
++whole_archive_flag_spec=$lt_whole_archive_flag_spec
++
++# Whether the compiler copes with passing no objects directly.
++compiler_needs_object=$lt_compiler_needs_object
++
++# Create an old-style archive from a shared archive.
++old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
++
++# Create a temporary old-style archive to link instead of a shared archive.
++old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
++
++# Commands used to build a shared archive.
++archive_cmds=$lt_archive_cmds
++archive_expsym_cmds=$lt_archive_expsym_cmds
++
++# Commands used to build a loadable module if different from building
++# a shared archive.
++module_cmds=$lt_module_cmds
++module_expsym_cmds=$lt_module_expsym_cmds
++
++# Whether we are building with GNU ld or not.
++with_gnu_ld=$lt_with_gnu_ld
++
++# Flag that allows shared libraries with undefined symbols to be built.
++allow_undefined_flag=$lt_allow_undefined_flag
++
++# Flag that enforces no undefined symbols.
++no_undefined_flag=$lt_no_undefined_flag
++
++# Flag to hardcode \$libdir into a binary during linking.
++# This must work even if \$libdir does not exist
++hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
++
++# If ld is used when linking, flag to hardcode \$libdir into a binary
++# during linking.  This must work even if \$libdir does not exist.
++hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
++
++# Whether we need a single "-rpath" flag with a separated argument.
++hardcode_libdir_separator=$lt_hardcode_libdir_separator
++
++# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
++# DIR into the resulting binary.
++hardcode_direct=$hardcode_direct
++
++# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
++# DIR into the resulting binary and the resulting library dependency is
++# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
++# library is relocated.
++hardcode_direct_absolute=$hardcode_direct_absolute
++
++# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
++# into the resulting binary.
++hardcode_minus_L=$hardcode_minus_L
++
++# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
++# into the resulting binary.
++hardcode_shlibpath_var=$hardcode_shlibpath_var
++
++# Set to "yes" if building a shared library automatically hardcodes DIR
++# into the library and all subsequent libraries and executables linked
++# against it.
++hardcode_automatic=$hardcode_automatic
++
++# Set to yes if linker adds runtime paths of dependent libraries
++# to runtime path list.
++inherit_rpath=$inherit_rpath
++
++# Whether libtool must link a program against all its dependency libraries.
++link_all_deplibs=$link_all_deplibs
++
++# Fix the shell variable \$srcfile for the compiler.
++fix_srcfile_path=$lt_fix_srcfile_path
++
++# Set to "yes" if exported symbols are required.
++always_export_symbols=$always_export_symbols
++
++# The commands to list exported symbols.
++export_symbols_cmds=$lt_export_symbols_cmds
++
++# Symbols that should not be listed in the preloaded symbols.
++exclude_expsyms=$lt_exclude_expsyms
++
++# Symbols that must always be exported.
++include_expsyms=$lt_include_expsyms
++
++# Commands necessary for linking programs (against libraries) with templates.
++prelink_cmds=$lt_prelink_cmds
++
++# Specify filename containing input files.
++file_list_spec=$lt_file_list_spec
++
++# How to hardcode a shared library path into an executable.
++hardcode_action=$hardcode_action
++
++# ### END LIBTOOL CONFIG
++
++_LT_EOF
++
++  case $host_os in
++  aix3*)
++    cat <<\_LT_EOF >> "$cfgfile"
++# AIX sometimes has problems with the GCC collect2 program.  For some
++# reason, if we set the COLLECT_NAMES environment variable, the problems
++# vanish in a puff of smoke.
++if test "X${COLLECT_NAMES+set}" != Xset; then
++  COLLECT_NAMES=
++  export COLLECT_NAMES
++fi
++_LT_EOF
++    ;;
++  esac
++
++
++ltmain="$ac_aux_dir/ltmain.sh"
++
++
++  # We use sed instead of cat because bash on DJGPP gets confused if
++  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
++  # text mode, it properly converts lines to CR/LF.  This bash problem
++  # is reportedly fixed, but why not run on old versions too?
++  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
++    || (rm -f "$cfgfile"; exit 1)
++
++  case $xsi_shell in
++  yes)
++    cat << \_LT_EOF >> "$cfgfile"
++
++# func_dirname file append nondir_replacement
++# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
++# otherwise set result to NONDIR_REPLACEMENT.
++func_dirname ()
++{
++  case ${1} in
++    */*) func_dirname_result="${1%/*}${2}" ;;
++    *  ) func_dirname_result="${3}" ;;
++  esac
++}
++
++# func_basename file
++func_basename ()
++{
++  func_basename_result="${1##*/}"
++}
++
++# func_dirname_and_basename file append nondir_replacement
++# perform func_basename and func_dirname in a single function
++# call:
++#   dirname:  Compute the dirname of FILE.  If nonempty,
++#             add APPEND to the result, otherwise set result
++#             to NONDIR_REPLACEMENT.
++#             value returned in "$func_dirname_result"
++#   basename: Compute filename of FILE.
++#             value retuned in "$func_basename_result"
++# Implementation must be kept synchronized with func_dirname
++# and func_basename. For efficiency, we do not delegate to
++# those functions but instead duplicate the functionality here.
++func_dirname_and_basename ()
++{
++  case ${1} in
++    */*) func_dirname_result="${1%/*}${2}" ;;
++    *  ) func_dirname_result="${3}" ;;
++  esac
++  func_basename_result="${1##*/}"
++}
++
++# func_stripname prefix suffix name
++# strip PREFIX and SUFFIX off of NAME.
++# PREFIX and SUFFIX must not contain globbing or regex special
++# characters, hashes, percent signs, but SUFFIX may contain a leading
++# dot (in which case that matches only a dot).
++func_stripname ()
++{
++  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
++  # positional parameters, so assign one to ordinary parameter first.
++  func_stripname_result=${3}
++  func_stripname_result=${func_stripname_result#"${1}"}
++  func_stripname_result=${func_stripname_result%"${2}"}
++}
++
++# func_opt_split
++func_opt_split ()
++{
++  func_opt_split_opt=${1%%=*}
++  func_opt_split_arg=${1#*=}
++}
++
++# func_lo2o object
++func_lo2o ()
++{
++  case ${1} in
++    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
++    *)    func_lo2o_result=${1} ;;
++  esac
++}
++
++# func_xform libobj-or-source
++func_xform ()
++{
++  func_xform_result=${1%.*}.lo
++}
++
++# func_arith arithmetic-term...
++func_arith ()
++{
++  func_arith_result=$(( $* ))
++}
++
++# func_len string
++# STRING may not start with a hyphen.
++func_len ()
++{
++  func_len_result=${#1}
++}
++
++_LT_EOF
++    ;;
++  *) # Bourne compatible functions.
++    cat << \_LT_EOF >> "$cfgfile"
++
++# func_dirname file append nondir_replacement
++# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
++# otherwise set result to NONDIR_REPLACEMENT.
++func_dirname ()
++{
++  # Extract subdirectory from the argument.
++  func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
++  if test "X$func_dirname_result" = "X${1}"; then
++    func_dirname_result="${3}"
++  else
++    func_dirname_result="$func_dirname_result${2}"
++  fi
++}
++
++# func_basename file
++func_basename ()
++{
++  func_basename_result=`$ECHO "${1}" | $SED "$basename"`
++}
++
++
++# func_stripname prefix suffix name
++# strip PREFIX and SUFFIX off of NAME.
++# PREFIX and SUFFIX must not contain globbing or regex special
++# characters, hashes, percent signs, but SUFFIX may contain a leading
++# dot (in which case that matches only a dot).
++# func_strip_suffix prefix name
++func_stripname ()
++{
++  case ${2} in
++    .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
++    *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
++  esac
++}
++
++# sed scripts:
++my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
++my_sed_long_arg='1s/^-[^=]*=//'
++
++# func_opt_split
++func_opt_split ()
++{
++  func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
++  func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
++}
++
++# func_lo2o object
++func_lo2o ()
++{
++  func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
++}
++
++# func_xform libobj-or-source
++func_xform ()
++{
++  func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
++}
++
++# func_arith arithmetic-term...
++func_arith ()
++{
++  func_arith_result=`expr "$@"`
++}
++
++# func_len string
++# STRING may not start with a hyphen.
++func_len ()
++{
++  func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
++}
++
++_LT_EOF
++esac
++
++case $lt_shell_append in
++  yes)
++    cat << \_LT_EOF >> "$cfgfile"
++
++# func_append var value
++# Append VALUE to the end of shell variable VAR.
++func_append ()
++{
++  eval "$1+=\$2"
++}
++_LT_EOF
++    ;;
++  *)
++    cat << \_LT_EOF >> "$cfgfile"
++
++# func_append var value
++# Append VALUE to the end of shell variable VAR.
++func_append ()
++{
++  eval "$1=\$$1\$2"
++}
++
++_LT_EOF
++    ;;
++  esac
++
++
++  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
++    || (rm -f "$cfgfile"; exit 1)
++
++  mv -f "$cfgfile" "$ofile" ||
++    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
++  chmod +x "$ofile"
++
++ ;;
++    "gstdint.h":C)
++if test "$GCC" = yes; then
++  echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h
++else
++  echo "/* generated for $CC */" > tmp-stdint.h
++fi
++
++sed 's/^ *//' >> tmp-stdint.h <<EOF
++
++  #ifndef GCC_GENERATED_STDINT_H
++  #define GCC_GENERATED_STDINT_H 1
++
++  #include <sys/types.h>
++EOF
++
++if test "$acx_cv_header_stdint" != stdint.h; then
++  echo "#include <stddef.h>" >> tmp-stdint.h
++fi
++if test "$acx_cv_header_stdint" != stddef.h; then
++  echo "#include <$acx_cv_header_stdint>" >> tmp-stdint.h
++fi
++
++sed 's/^ *//' >> tmp-stdint.h <<EOF
++  /* glibc uses these symbols as guards to prevent redefinitions.  */
++  #ifdef __int8_t_defined
++  #define _INT8_T
++  #define _INT16_T
++  #define _INT32_T
++  #endif
++  #ifdef __uint32_t_defined
++  #define _UINT32_T
++  #endif
++
++EOF
++
++# ----------------- done header, emit basic int types -------------
++if test "$acx_cv_header_stdint" = stddef.h; then
++  sed 's/^ *//' >> tmp-stdint.h <<EOF
++
++    #ifndef _UINT8_T
++    #define _UINT8_T
++    #ifndef __uint8_t_defined
++    #define __uint8_t_defined
++    #ifndef uint8_t
++    typedef unsigned $acx_cv_type_int8_t uint8_t;
++    #endif
++    #endif
++    #endif
++
++    #ifndef _UINT16_T
++    #define _UINT16_T
++    #ifndef __uint16_t_defined
++    #define __uint16_t_defined
++    #ifndef uint16_t
++    typedef unsigned $acx_cv_type_int16_t uint16_t;
++    #endif
++    #endif
++    #endif
++
++    #ifndef _UINT32_T
++    #define _UINT32_T
++    #ifndef __uint32_t_defined
++    #define __uint32_t_defined
++    #ifndef uint32_t
++    typedef unsigned $acx_cv_type_int32_t uint32_t;
++    #endif
++    #endif
++    #endif
++
++    #ifndef _INT8_T
++    #define _INT8_T
++    #ifndef __int8_t_defined
++    #define __int8_t_defined
++    #ifndef int8_t
++    typedef $acx_cv_type_int8_t int8_t;
++    #endif
++    #endif
++    #endif
++
++    #ifndef _INT16_T
++    #define _INT16_T
++    #ifndef __int16_t_defined
++    #define __int16_t_defined
++    #ifndef int16_t
++    typedef $acx_cv_type_int16_t int16_t;
++    #endif
++    #endif
++    #endif
++
++    #ifndef _INT32_T
++    #define _INT32_T
++    #ifndef __int32_t_defined
++    #define __int32_t_defined
++    #ifndef int32_t
++    typedef $acx_cv_type_int32_t int32_t;
++    #endif
++    #endif
++    #endif
++EOF
++elif test "$ac_cv_type_u_int32_t" = yes; then
++  sed 's/^ *//' >> tmp-stdint.h <<EOF
++
++    /* int8_t int16_t int32_t defined by inet code, we do the u_intXX types */
++    #ifndef _INT8_T
++    #define _INT8_T
++    #endif
++    #ifndef _INT16_T
++    #define _INT16_T
++    #endif
++    #ifndef _INT32_T
++    #define _INT32_T
++    #endif
++
++    #ifndef _UINT8_T
++    #define _UINT8_T
++    #ifndef __uint8_t_defined
++    #define __uint8_t_defined
++    #ifndef uint8_t
++    typedef u_int8_t uint8_t;
++    #endif
++    #endif
++    #endif
++
++    #ifndef _UINT16_T
++    #define _UINT16_T
++    #ifndef __uint16_t_defined
++    #define __uint16_t_defined
++    #ifndef uint16_t
++    typedef u_int16_t uint16_t;
++    #endif
++    #endif
++    #endif
++
++    #ifndef _UINT32_T
++    #define _UINT32_T
++    #ifndef __uint32_t_defined
++    #define __uint32_t_defined
++    #ifndef uint32_t
++    typedef u_int32_t uint32_t;
++    #endif
++    #endif
++    #endif
++EOF
++else
++  sed 's/^ *//' >> tmp-stdint.h <<EOF
++
++    /* Some systems have guard macros to prevent redefinitions, define them.  */
++    #ifndef _INT8_T
++    #define _INT8_T
++    #endif
++    #ifndef _INT16_T
++    #define _INT16_T
++    #endif
++    #ifndef _INT32_T
++    #define _INT32_T
++    #endif
++    #ifndef _UINT8_T
++    #define _UINT8_T
++    #endif
++    #ifndef _UINT16_T
++    #define _UINT16_T
++    #endif
++    #ifndef _UINT32_T
++    #define _UINT32_T
++    #endif
++EOF
++fi
++
++# ------------- done basic int types, emit int64_t types ------------
++if test "$ac_cv_type_uint64_t" = yes; then
++  sed 's/^ *//' >> tmp-stdint.h <<EOF
++
++    /* system headers have good uint64_t and int64_t */
++    #ifndef _INT64_T
++    #define _INT64_T
++    #endif
++    #ifndef _UINT64_T
++    #define _UINT64_T
++    #endif
++EOF
++elif test "$ac_cv_type_u_int64_t" = yes; then
++  sed 's/^ *//' >> tmp-stdint.h <<EOF
++
++    /* system headers have an u_int64_t (and int64_t) */
++    #ifndef _INT64_T
++    #define _INT64_T
++    #endif
++    #ifndef _UINT64_T
++    #define _UINT64_T
++    #ifndef __uint64_t_defined
++    #define __uint64_t_defined
++    #ifndef uint64_t
++    typedef u_int64_t uint64_t;
++    #endif
++    #endif
++    #endif
++EOF
++elif test -n "$acx_cv_type_int64_t"; then
++  sed 's/^ *//' >> tmp-stdint.h <<EOF
++
++    /* architecture has a 64-bit type, $acx_cv_type_int64_t */
++    #ifndef _INT64_T
++    #define _INT64_T
++    #ifndef int64_t
++    typedef $acx_cv_type_int64_t int64_t;
++    #endif
++    #endif
++    #ifndef _UINT64_T
++    #define _UINT64_T
++    #ifndef __uint64_t_defined
++    #define __uint64_t_defined
++    #ifndef uint64_t
++    typedef unsigned $acx_cv_type_int64_t uint64_t;
++    #endif
++    #endif
++    #endif
++EOF
++else
++  sed 's/^ *//' >> tmp-stdint.h <<EOF
++
++    /* some common heuristics for int64_t, using compiler-specific tests */
++    #if defined __STDC_VERSION__ && (__STDC_VERSION__-0) >= 199901L
++    #ifndef _INT64_T
++    #define _INT64_T
++    #ifndef __int64_t_defined
++    #ifndef int64_t
++    typedef long long int64_t;
++    #endif
++    #endif
++    #endif
++    #ifndef _UINT64_T
++    #define _UINT64_T
++    #ifndef uint64_t
++    typedef unsigned long long uint64_t;
++    #endif
++    #endif
++
++    #elif defined __GNUC__ && defined (__STDC__) && __STDC__-0
++    /* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
++       does not implement __extension__.  But that compiler doesn't define
++       __GNUC_MINOR__.  */
++    # if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
++    # define __extension__
++    # endif
++
++    # ifndef _INT64_T
++    # define _INT64_T
++    # ifndef int64_t
++    __extension__ typedef long long int64_t;
++    # endif
++    # endif
++    # ifndef _UINT64_T
++    # define _UINT64_T
++    # ifndef uint64_t
++    __extension__ typedef unsigned long long uint64_t;
++    # endif
++    # endif
++
++    #elif !defined __STRICT_ANSI__
++    # if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
++
++    #  ifndef _INT64_T
++    #  define _INT64_T
++    #  ifndef int64_t
++    typedef __int64 int64_t;
++    #  endif
++    #  endif
++    #  ifndef _UINT64_T
++    #  define _UINT64_T
++    #  ifndef uint64_t
++    typedef unsigned __int64 uint64_t;
++    #  endif
++    #  endif
++    # endif /* compiler */
++
++    #endif /* ANSI version */
++EOF
++fi
++
++# ------------- done int64_t types, emit intptr types ------------
++if test "$ac_cv_type_uintptr_t" != yes; then
++  sed 's/^ *//' >> tmp-stdint.h <<EOF
++
++    /* Define intptr_t based on sizeof(void*) = $ac_cv_sizeof_void_p */
++    #ifndef __uintptr_t_defined
++    #ifndef uintptr_t
++    typedef u$acx_cv_type_intptr_t uintptr_t;
++    #endif
++    #endif
++    #ifndef __intptr_t_defined
++    #ifndef intptr_t
++    typedef $acx_cv_type_intptr_t  intptr_t;
++    #endif
++    #endif
++EOF
++fi
++
++# ------------- done intptr types, emit int_least types ------------
++if test "$ac_cv_type_int_least32_t" != yes; then
++  sed 's/^ *//' >> tmp-stdint.h <<EOF
++
++    /* Define int_least types */
++    typedef int8_t     int_least8_t;
++    typedef int16_t    int_least16_t;
++    typedef int32_t    int_least32_t;
++    #ifdef _INT64_T
++    typedef int64_t    int_least64_t;
++    #endif
++
++    typedef uint8_t    uint_least8_t;
++    typedef uint16_t   uint_least16_t;
++    typedef uint32_t   uint_least32_t;
++    #ifdef _UINT64_T
++    typedef uint64_t   uint_least64_t;
++    #endif
++EOF
++fi
++
++# ------------- done intptr types, emit int_fast types ------------
++if test "$ac_cv_type_int_fast32_t" != yes; then
++      sed 's/^ *//' >> tmp-stdint.h <<EOF
++
++    /* Define int_fast types.  short is often slow */
++    typedef int8_t       int_fast8_t;
++    typedef int          int_fast16_t;
++    typedef int32_t      int_fast32_t;
++    #ifdef _INT64_T
++    typedef int64_t      int_fast64_t;
++    #endif
++
++    typedef uint8_t      uint_fast8_t;
++    typedef unsigned int uint_fast16_t;
++    typedef uint32_t     uint_fast32_t;
++    #ifdef _UINT64_T
++    typedef uint64_t     uint_fast64_t;
++    #endif
++EOF
++fi
++
++if test "$ac_cv_type_uintmax_t" != yes; then
++  sed 's/^ *//' >> tmp-stdint.h <<EOF
++
++    /* Define intmax based on what we found */
++    #ifndef intmax_t
++    #ifdef _INT64_T
++    typedef int64_t       intmax_t;
++    #else
++    typedef long          intmax_t;
++    #endif
++    #endif
++    #ifndef uintmax_t
++    #ifdef _UINT64_T
++    typedef uint64_t      uintmax_t;
++    #else
++    typedef unsigned long uintmax_t;
++    #endif
++    #endif
++EOF
++fi
++
++sed 's/^ *//' >> tmp-stdint.h <<EOF
++
++  #endif /* GCC_GENERATED_STDINT_H */
++EOF
++
++if test -r gstdint.h && cmp -s tmp-stdint.h gstdint.h; then
++  rm -f tmp-stdint.h
++else
++  mv -f tmp-stdint.h gstdint.h
++fi
++
++ ;;
++    "default":C) if test -n "$CONFIG_FILES"; then
++   if test -n "${with_target_subdir}"; then
++     # Multilibs need MULTISUBDIR defined correctly in certain makefiles so
++     # that multilib installs will end up installed in the correct place.
++     # The testsuite needs it for multilib-aware ABI baseline files.
++     # To work around this not being passed down from config-ml.in ->
++     # srcdir/Makefile.am -> srcdir/{src,libsupc++,...}/Makefile.am, manually
++     # append it here.  Only modify Makefiles that have just been created.
++     #
++     # Also, get rid of this simulated-VPATH thing that automake does.
++     cat > vpsed << \_EOF
++  s!`test -f '$<' || echo '$(srcdir)/'`!!
++_EOF
++     for i in $SUBDIRS; do
++      case $CONFIG_FILES in
++       *${i}/Makefile*)
++       #echo "Adding MULTISUBDIR to $i/Makefile"
++       sed -f vpsed $i/Makefile > tmp
++       grep '^MULTISUBDIR =' Makefile >> tmp
++       mv tmp $i/Makefile
++       ;;
++      esac
++     done
++     rm vpsed
++   fi
++ fi
++ ;;
++
++  esac
++done # for ac_tag
++
++
++as_fn_exit 0
++_ACEOF
++ac_clean_files=$ac_clean_files_save
++
++test $ac_write_fail = 0 ||
++  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
++
++
++# configure is writing to config.log, and then calls config.status.
++# config.status does its own redirection, appending to config.log.
++# Unfortunately, on DOS this fails, as config.log is still kept open
++# by configure, so config.status won't be able to write to it; its
++# output is simply discarded.  So we exec the FD to /dev/null,
++# effectively closing config.log, so it can be properly (re)opened and
++# appended to by config.status.  When coming back to configure, we
++# need to make the FD available again.
++if test "$no_create" != yes; then
++  ac_cs_success=:
++  ac_config_status_args=
++  test "$silent" = yes &&
++    ac_config_status_args="$ac_config_status_args --quiet"
++  exec 5>/dev/null
++  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
++  exec 5>>config.log
++  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
++  # would make configure fail if this is the last instruction.
++  $ac_cs_success || as_fn_exit $?
++fi
++if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
++$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
++fi
++
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2b774b058993d040c6353ed1b084655c9a27f265
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,409 @@@
++# configure.ac -- Backtrace configure script.
++# Copyright (C) 2012-2016 Free Software Foundation, Inc.
++
++# Redistribution and use in source and binary forms, with or without
++# modification, are permitted provided that the following conditions are
++# met:
++
++#     (1) Redistributions of source code must retain the above copyright
++#     notice, this list of conditions and the following disclaimer.
++
++#     (2) Redistributions in binary form must reproduce the above copyright
++#     notice, this list of conditions and the following disclaimer in
++#     the documentation and/or other materials provided with the
++#     distribution.
++
++#     (3) The name of the author may not be used to
++#     endorse or promote products derived from this software without
++#     specific prior written permission.
++
++# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++# POSSIBILITY OF SUCH DAMAGE.
++
++AC_PREREQ(2.64)
++AC_INIT(package-unused, version-unused,, libbacktrace)
++AC_CONFIG_SRCDIR(backtrace.h)
++AC_CONFIG_HEADER(config.h)
++
++if test -n "${with_target_subdir}"; then
++  AM_ENABLE_MULTILIB(, ..)
++fi
++
++AC_CANONICAL_SYSTEM
++target_alias=${target_alias-$host_alias}
++
++AC_USE_SYSTEM_EXTENSIONS
++
++libtool_VERSION=1:0:0
++AC_SUBST(libtool_VERSION)
++
++# 1.11.1: Require that version of automake.
++# foreign: Don't require README, INSTALL, NEWS, etc.
++# no-define: Don't define PACKAGE and VERSION.
++# no-dependencies: Don't generate automatic dependencies.
++#    (because it breaks when using bootstrap-lean, since some of the
++#    headers are gone at "make install" time).
++# -Wall: Issue all automake warnings.
++# -Wno-portability: Don't warn about constructs supported by GNU make.
++#    (because GCC requires GNU make anyhow).
++AM_INIT_AUTOMAKE([1.11.1 foreign no-dist no-define no-dependencies -Wall -Wno-portability])
++
++AM_MAINTAINER_MODE
++
++AC_ARG_WITH(target-subdir,
++[  --with-target-subdir=SUBDIR      Configuring in a subdirectory for target])
++
++# We must force CC to /not/ be precious variables; otherwise
++# the wrong, non-multilib-adjusted value will be used in multilibs.
++# As a side effect, we have to subst CFLAGS ourselves.
++m4_rename([_AC_ARG_VAR_PRECIOUS],[backtrace_PRECIOUS])
++m4_define([_AC_ARG_VAR_PRECIOUS],[])
++AC_PROG_CC
++m4_rename_force([backtrace_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
++
++AC_SUBST(CFLAGS)
++
++AC_PROG_RANLIB
++
++AC_PROG_AWK
++case "$AWK" in
++"") AC_MSG_ERROR([can't build without awk]) ;;
++esac
++
++LT_INIT
++AM_PROG_LIBTOOL
++
++backtrace_supported=yes
++
++if test -n "${with_target_subdir}"; then
++  # We are compiling a GCC library.  We can assume that the unwind
++  # library exists.
++  BACKTRACE_FILE="backtrace.lo simple.lo"
++else
++  AC_CHECK_HEADER([unwind.h],
++    [AC_CHECK_FUNC([_Unwind_Backtrace],
++                 [BACKTRACE_FILE="backtrace.lo simple.lo"],
++                 [BACKTRACE_FILE="nounwind.lo"
++                    backtrace_supported=no])],
++    [BACKTRACE_FILE="nounwind.lo"
++     backtrace_supported=no])
++fi
++AC_SUBST(BACKTRACE_FILE)
++
++EXTRA_FLAGS=
++if test -n "${with_target_subdir}"; then
++  EXTRA_FLAGS="-funwind-tables -frandom-seed=\$@"
++else
++  AC_CACHE_CHECK([for -funwind-tables option],
++    [libbacktrace_cv_c_unwind_tables],
++    [CFLAGS_hold="$CFLAGS"
++     CFLAGS="$CFLAGS -funwind-tables"
++     AC_COMPILE_IFELSE(
++       [AC_LANG_PROGRAM([static int f() { return 0; }], [return f();])],
++       [libbacktrace_cv_c_unwind_tables=yes],
++       [libbacktrace_cv_c_unwind_tables=no])
++     CFLAGS="$CFLAGS_hold"])
++  if test "$libbacktrace_cv_c_unwind_tables" = "yes"; then
++    EXTRA_FLAGS=-funwind-tables
++  fi
++  AC_CACHE_CHECK([for -frandom-seed=string option],
++    [libbacktrace_cv_c_random_seed_string],
++    [CFLAGS_hold="$CFLAGS"
++     CFLAGS="$CFLAGS -frandom-seed=conftest.lo"
++     AC_COMPILE_IFELSE(
++       [AC_LANG_PROGRAM([], [return 0;])],
++       [libbacktrace_cv_c_random_seed_string=yes],
++       [libbacktrace_cv_c_random_seed_string=no])
++     CFLAGS="$CFLAGS_hold"])
++  if test "$libbacktrace_cv_c_random_seed_string" = "yes"; then
++    EXTRA_FLAGS="$EXTRA_FLAGS -frandom-seed=\$@"
++  fi
++fi
++AC_SUBST(EXTRA_FLAGS)
++
++ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
++                        -Wmissing-prototypes -Wold-style-definition \
++                        -Wmissing-format-attribute -Wcast-qual],
++                        [WARN_FLAGS])
++
++if test -n "${with_target_subdir}"; then
++  WARN_FLAGS="$WARN_FLAGS -Werror"
++fi
++
++AC_SUBST(WARN_FLAGS)
++
++if test -n "${with_target_subdir}"; then
++  GCC_CHECK_UNWIND_GETIPINFO
++else
++  ac_save_CFFLAGS="$CFLAGS"
++  CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
++  AC_MSG_CHECKING([for _Unwind_GetIPInfo])
++  AC_LINK_IFELSE(
++    [AC_LANG_PROGRAM(
++       [#include "unwind.h"
++      struct _Unwind_Context *context;
++      int ip_before_insn = 0;],
++      [return _Unwind_GetIPInfo (context, &ip_before_insn);])],
++      [have_unwind_getipinfo=yes], [have_unwind_getipinfo=no])
++  CFLAGS="$ac_save_CFLAGS"
++  AC_MSG_RESULT([$have_unwind_getipinfo])
++  if test "$have_unwind_getipinfo" = "yes"; then
++    AC_DEFINE(HAVE_GETIPINFO, 1, [Define if _Unwind_GetIPInfo is available.])
++  fi
++fi
++
++# Enable --enable-host-shared.
++AC_ARG_ENABLE(host-shared,
++[AS_HELP_STRING([--enable-host-shared],
++              [build host code as shared libraries])],
++[PIC_FLAG=-fPIC], [PIC_FLAG=])
++AC_SUBST(PIC_FLAG)
++
++# Test for __sync support.
++AC_CACHE_CHECK([__sync extensions],
++[libbacktrace_cv_sys_sync],
++[if test -n "${with_target_subdir}"; then
++   case "${host}" in
++   hppa*-*-hpux*) libbacktrace_cv_sys_sync=no ;;
++   *) libbacktrace_cv_sys_sync=yes ;;
++   esac
++ else
++   AC_LINK_IFELSE(
++     [AC_LANG_PROGRAM([int i;],
++                      [__sync_bool_compare_and_swap (&i, i, i);
++                       __sync_lock_test_and_set (&i, 1);
++                       __sync_lock_release (&i);])],
++     [libbacktrace_cv_sys_sync=yes],
++     [libbacktrace_cv_sys_sync=no])
++ fi])
++BACKTRACE_SUPPORTS_THREADS=0
++if test "$libbacktrace_cv_sys_sync" = "yes"; then
++  BACKTRACE_SUPPORTS_THREADS=1
++  AC_DEFINE([HAVE_SYNC_FUNCTIONS], 1,
++          [Define to 1 if you have the __sync functions])
++fi
++AC_SUBST(BACKTRACE_SUPPORTS_THREADS)
++
++# Test for __atomic support.
++AC_CACHE_CHECK([__atomic extensions],
++[libbacktrace_cv_sys_atomic],
++[if test -n "${with_target_subdir}"; then
++   libbacktrace_cv_sys_atomic=yes
++ else
++   AC_LINK_IFELSE(
++     [AC_LANG_PROGRAM([int i;],
++                    [__atomic_load_n (&i, __ATOMIC_ACQUIRE);
++                     __atomic_store_n (&i, 1, __ATOMIC_RELEASE);])],
++     [libbacktrace_cv_sys_atomic=yes],
++     [libbacktrace_cv_sys_atomic=no])
++ fi])
++if test "$libbacktrace_cv_sys_atomic" = "yes"; then
++  AC_DEFINE([HAVE_ATOMIC_FUNCTIONS], 1,
++          [Define to 1 if you have the __atomic functions])
++fi
++
++# The library needs to be able to read the executable itself.  Compile
++# a file to determine the executable format.  The awk script
++# filetype.awk prints out the file type.
++AC_CACHE_CHECK([output filetype],
++[libbacktrace_cv_sys_filetype],
++[filetype=
++AC_COMPILE_IFELSE(
++  [AC_LANG_PROGRAM([int i;], [int j;])],
++  [filetype=`${AWK} -f $srcdir/filetype.awk conftest.$ac_objext`],
++  [AC_MSG_FAILURE([compiler failed])])
++libbacktrace_cv_sys_filetype=$filetype])
++
++# Match the file type to decide what files to compile.
++FORMAT_FILE=
++backtrace_supports_data=yes
++case "$libbacktrace_cv_sys_filetype" in
++elf*) FORMAT_FILE="elf.lo" ;;
++pecoff) FORMAT_FILE="pecoff.lo"
++        backtrace_supports_data=no
++      ;;
++*) AC_MSG_WARN([could not determine output file type])
++   FORMAT_FILE="unknown.lo"
++   backtrace_supported=no
++   ;;
++esac
++AC_SUBST(FORMAT_FILE)
++
++# ELF defines.
++elfsize=
++case "$libbacktrace_cv_sys_filetype" in
++elf32) elfsize=32 ;;
++elf64) elfsize=64 ;;
++*)     elfsize=unused
++esac
++AC_DEFINE_UNQUOTED([BACKTRACE_ELF_SIZE], [$elfsize], [ELF size: 32 or 64])
++
++BACKTRACE_SUPPORTED=0
++if test "$backtrace_supported" = "yes"; then
++  BACKTRACE_SUPPORTED=1
++fi
++AC_SUBST(BACKTRACE_SUPPORTED)
++
++BACKTRACE_SUPPORTS_DATA=0
++if test "$backtrace_supports_data" = "yes"; then
++  BACKTRACE_SUPPORTS_DATA=1
++fi
++AC_SUBST(BACKTRACE_SUPPORTS_DATA)
++
++GCC_HEADER_STDINT(gstdint.h)
++
++AC_CHECK_HEADERS(sys/mman.h)
++if test "$ac_cv_header_sys_mman_h" = "no"; then
++  have_mmap=no
++else
++  if test -n "${with_target_subdir}"; then
++    # When built as a GCC target library, we can't do a link test.  We
++    # simply assume that if we have mman.h, we have mmap.
++    have_mmap=yes
++    case "${host}" in
++    spu-*-*|*-*-msdosdjgpp)
++        # The SPU does not have mmap, but it has a sys/mman.h header file
++        # containing "mmap_eaddr" and the mmap flags, confusing the test.
++        # DJGPP also has sys/man.h, but no mmap
++      have_mmap=no ;;
++    esac
++  else
++    AC_CHECK_FUNC(mmap, [have_mmap=yes], [have_mmap=no])
++  fi
++fi
++if test "$have_mmap" = "no"; then
++  VIEW_FILE=read.lo
++  ALLOC_FILE=alloc.lo
++else
++  VIEW_FILE=mmapio.lo
++  AC_PREPROC_IFELSE([
++#include <sys/mman.h>
++#if !defined(MAP_ANONYMOUS) && !defined(MAP_ANON)
++  #error no MAP_ANONYMOUS
++#endif
++], [ALLOC_FILE=mmap.lo], [ALLOC_FILE=alloc.lo])
++fi
++AC_SUBST(VIEW_FILE)
++AC_SUBST(ALLOC_FILE)
++
++BACKTRACE_USES_MALLOC=0
++if test "$ALLOC_FILE" = "alloc.lo"; then
++  BACKTRACE_USES_MALLOC=1
++fi
++AC_SUBST(BACKTRACE_USES_MALLOC)
++
++# Check for dl_iterate_phdr.
++AC_CHECK_HEADERS(link.h)
++if test "$ac_cv_header_link_h" = "no"; then
++  have_dl_iterate_phdr=no
++else
++  if test -n "${with_target_subdir}"; then
++    # When built as a GCC target library, we can't do a link test.
++    AC_EGREP_HEADER([dl_iterate_phdr], [link.h], [have_dl_iterate_phdr=yes],
++                  [have_dl_iterate_phdr=no])
++    case "${host}" in
++    *-*-solaris2.10*)
++        # Avoid dl_iterate_phdr on Solaris 10, where it is in the
++      # header file but is only in -ldl.
++      have_dl_iterate_phdr=no ;;
++    esac
++  else
++    AC_CHECK_FUNC([dl_iterate_phdr], [have_dl_iterate_phdr=yes],
++                [have_dl_iterate_phdr=no])
++  fi
++fi
++if test "$have_dl_iterate_phdr" = "yes"; then
++  AC_DEFINE(HAVE_DL_ITERATE_PHDR, 1, [Define if dl_iterate_phdr is available.])
++fi
++
++# Check for the fcntl function.
++if test -n "${with_target_subdir}"; then
++   case "${host}" in
++   *-*-mingw*) have_fcntl=no ;;
++   spu-*-*) have_fcntl=no ;;
++   *) have_fcntl=yes ;;
++   esac
++else
++  AC_CHECK_FUNC(fcntl, [have_fcntl=yes], [have_fcntl=no])
++fi
++if test "$have_fcntl" = "yes"; then
++  AC_DEFINE([HAVE_FCNTL], 1,
++          [Define to 1 if you have the fcntl function])
++fi
++
++AC_CHECK_DECLS(strnlen)
++
++# Check for getexecname function.
++if test -n "${with_target_subdir}"; then
++   case "${host}" in
++   *-*-solaris2*) have_getexecname=yes ;;
++   *) have_getexecname=no ;;
++   esac
++else
++  AC_CHECK_FUNC(getexecname, [have_getexecname=yes], [have_getexecname=no])
++fi
++if test "$have_getexecname" = "yes"; then
++  AC_DEFINE(HAVE_GETEXECNAME, 1, [Define if getexecname is available.])
++fi
++
++AC_CACHE_CHECK([whether tests can run],
++  [libbacktrace_cv_sys_native],
++  [AC_RUN_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
++     [libbacktrace_cv_sys_native=yes],
++     [libbacktrace_cv_sys_native=no],
++     [libbacktrace_cv_sys_native=no])])
++AM_CONDITIONAL(NATIVE, test "$libbacktrace_cv_sys_native" = "yes")
++
++if test "${multilib}" = "yes"; then
++  multilib_arg="--enable-multilib"
++else
++  multilib_arg=
++fi
++
++AC_CONFIG_FILES(Makefile backtrace-supported.h)
++
++# We need multilib support, but only if configuring for the target.
++AC_CONFIG_COMMANDS([default],
++[if test -n "$CONFIG_FILES"; then
++   if test -n "${with_target_subdir}"; then
++     # Multilibs need MULTISUBDIR defined correctly in certain makefiles so
++     # that multilib installs will end up installed in the correct place.
++     # The testsuite needs it for multilib-aware ABI baseline files.
++     # To work around this not being passed down from config-ml.in ->
++     # srcdir/Makefile.am -> srcdir/{src,libsupc++,...}/Makefile.am, manually
++     # append it here.  Only modify Makefiles that have just been created.
++     #
++     # Also, get rid of this simulated-VPATH thing that automake does.
++     cat > vpsed << \_EOF
++  s!`test -f '$<' || echo '$(srcdir)/'`!!
++_EOF
++     for i in $SUBDIRS; do
++      case $CONFIG_FILES in
++       *${i}/Makefile*)
++       #echo "Adding MULTISUBDIR to $i/Makefile"
++       sed -f vpsed $i/Makefile > tmp
++       grep '^MULTISUBDIR =' Makefile >> tmp
++       mv tmp $i/Makefile
++       ;;
++      esac
++     done
++     rm vpsed
++   fi
++ fi
++],
++[
++# Variables needed in config.status (file generation) which aren't already
++# passed by autoconf.
++SUBDIRS="$SUBDIRS"
++])
++
++AC_OUTPUT
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..37682c0038e546634ef05b37bc47851fced151bb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3038 @@@
++/* dwarf.c -- Get file/line information from DWARF for backtraces.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <errno.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/types.h>
++
++#include "dwarf2.h"
++#include "filenames.h"
++
++#include "backtrace.h"
++#include "internal.h"
++
++#if !defined(HAVE_DECL_STRNLEN) || !HAVE_DECL_STRNLEN
++
++/* If strnlen is not declared, provide our own version.  */
++
++static size_t
++xstrnlen (const char *s, size_t maxlen)
++{
++  size_t i;
++
++  for (i = 0; i < maxlen; ++i)
++    if (s[i] == '\0')
++      break;
++  return i;
++}
++
++#define strnlen xstrnlen
++
++#endif
++
++/* A buffer to read DWARF info.  */
++
++struct dwarf_buf
++{
++  /* Buffer name for error messages.  */
++  const char *name;
++  /* Start of the buffer.  */
++  const unsigned char *start;
++  /* Next byte to read.  */
++  const unsigned char *buf;
++  /* The number of bytes remaining.  */
++  size_t left;
++  /* Whether the data is big-endian.  */
++  int is_bigendian;
++  /* Error callback routine.  */
++  backtrace_error_callback error_callback;
++  /* Data for error_callback.  */
++  void *data;
++  /* Non-zero if we've reported an underflow error.  */
++  int reported_underflow;
++};
++
++/* A single attribute in a DWARF abbreviation.  */
++
++struct attr
++{
++  /* The attribute name.  */
++  enum dwarf_attribute name;
++  /* The attribute form.  */
++  enum dwarf_form form;
++};
++
++/* A single DWARF abbreviation.  */
++
++struct abbrev
++{
++  /* The abbrev code--the number used to refer to the abbrev.  */
++  uint64_t code;
++  /* The entry tag.  */
++  enum dwarf_tag tag;
++  /* Non-zero if this abbrev has child entries.  */
++  int has_children;
++  /* The number of attributes.  */
++  size_t num_attrs;
++  /* The attributes.  */
++  struct attr *attrs;
++};
++
++/* The DWARF abbreviations for a compilation unit.  This structure
++   only exists while reading the compilation unit.  Most DWARF readers
++   seem to a hash table to map abbrev ID's to abbrev entries.
++   However, we primarily care about GCC, and GCC simply issues ID's in
++   numerical order starting at 1.  So we simply keep a sorted vector,
++   and try to just look up the code.  */
++
++struct abbrevs
++{
++  /* The number of abbrevs in the vector.  */
++  size_t num_abbrevs;
++  /* The abbrevs, sorted by the code field.  */
++  struct abbrev *abbrevs;
++};
++
++/* The different kinds of attribute values.  */
++
++enum attr_val_encoding
++{
++  /* An address.  */
++  ATTR_VAL_ADDRESS,
++  /* A unsigned integer.  */
++  ATTR_VAL_UINT,
++  /* A sigd integer.  */
++  ATTR_VAL_SINT,
++  /* A string.  */
++  ATTR_VAL_STRING,
++  /* An offset to other data in the containing unit.  */
++  ATTR_VAL_REF_UNIT,
++  /* An offset to other data within the .dwarf_info section.  */
++  ATTR_VAL_REF_INFO,
++  /* An offset to data in some other section.  */
++  ATTR_VAL_REF_SECTION,
++  /* A type signature.  */
++  ATTR_VAL_REF_TYPE,
++  /* A block of data (not represented).  */
++  ATTR_VAL_BLOCK,
++  /* An expression (not represented).  */
++  ATTR_VAL_EXPR,
++};
++
++/* An attribute value.  */
++
++struct attr_val
++{
++  /* How the value is stored in the field u.  */
++  enum attr_val_encoding encoding;
++  union
++  {
++    /* ATTR_VAL_ADDRESS, ATTR_VAL_UINT, ATTR_VAL_REF*.  */
++    uint64_t uint;
++    /* ATTR_VAL_SINT.  */
++    int64_t sint;
++    /* ATTR_VAL_STRING.  */
++    const char *string;
++    /* ATTR_VAL_BLOCK not stored.  */
++  } u;
++};
++
++/* The line number program header.  */
++
++struct line_header
++{
++  /* The version of the line number information.  */
++  int version;
++  /* The minimum instruction length.  */
++  unsigned int min_insn_len;
++  /* The maximum number of ops per instruction.  */
++  unsigned int max_ops_per_insn;
++  /* The line base for special opcodes.  */
++  int line_base;
++  /* The line range for special opcodes.  */
++  unsigned int line_range;
++  /* The opcode base--the first special opcode.  */
++  unsigned int opcode_base;
++  /* Opcode lengths, indexed by opcode - 1.  */
++  const unsigned char *opcode_lengths;
++  /* The number of directory entries.  */
++  size_t dirs_count;
++  /* The directory entries.  */
++  const char **dirs;
++  /* The number of filenames.  */
++  size_t filenames_count;
++  /* The filenames.  */
++  const char **filenames;
++};
++
++/* Map a single PC value to a file/line.  We will keep a vector of
++   these sorted by PC value.  Each file/line will be correct from the
++   PC up to the PC of the next entry if there is one.  We allocate one
++   extra entry at the end so that we can use bsearch.  */
++
++struct line
++{
++  /* PC.  */
++  uintptr_t pc;
++  /* File name.  Many entries in the array are expected to point to
++     the same file name.  */
++  const char *filename;
++  /* Line number.  */
++  int lineno;
++  /* Index of the object in the original array read from the DWARF
++     section, before it has been sorted.  The index makes it possible
++     to use Quicksort and maintain stability.  */
++  int idx;
++};
++
++/* A growable vector of line number information.  This is used while
++   reading the line numbers.  */
++
++struct line_vector
++{
++  /* Memory.  This is an array of struct line.  */
++  struct backtrace_vector vec;
++  /* Number of valid mappings.  */
++  size_t count;
++};
++
++/* A function described in the debug info.  */
++
++struct function
++{
++  /* The name of the function.  */
++  const char *name;
++  /* If this is an inlined function, the filename of the call
++     site.  */
++  const char *caller_filename;
++  /* If this is an inlined function, the line number of the call
++     site.  */
++  int caller_lineno;
++  /* Map PC ranges to inlined functions.  */
++  struct function_addrs *function_addrs;
++  size_t function_addrs_count;
++};
++
++/* An address range for a function.  This maps a PC value to a
++   specific function.  */
++
++struct function_addrs
++{
++  /* Range is LOW <= PC < HIGH.  */
++  uint64_t low;
++  uint64_t high;
++  /* Function for this address range.  */
++  struct function *function;
++};
++
++/* A growable vector of function address ranges.  */
++
++struct function_vector
++{
++  /* Memory.  This is an array of struct function_addrs.  */
++  struct backtrace_vector vec;
++  /* Number of address ranges present.  */
++  size_t count;
++};
++
++/* A DWARF compilation unit.  This only holds the information we need
++   to map a PC to a file and line.  */
++
++struct unit
++{
++  /* The first entry for this compilation unit.  */
++  const unsigned char *unit_data;
++  /* The length of the data for this compilation unit.  */
++  size_t unit_data_len;
++  /* The offset of UNIT_DATA from the start of the information for
++     this compilation unit.  */
++  size_t unit_data_offset;
++  /* DWARF version.  */
++  int version;
++  /* Whether unit is DWARF64.  */
++  int is_dwarf64;
++  /* Address size.  */
++  int addrsize;
++  /* Offset into line number information.  */
++  off_t lineoff;
++  /* Primary source file.  */
++  const char *filename;
++  /* Compilation command working directory.  */
++  const char *comp_dir;
++  /* Absolute file name, only set if needed.  */
++  const char *abs_filename;
++  /* The abbreviations for this unit.  */
++  struct abbrevs abbrevs;
++
++  /* The fields above this point are read in during initialization and
++     may be accessed freely.  The fields below this point are read in
++     as needed, and therefore require care, as different threads may
++     try to initialize them simultaneously.  */
++
++  /* PC to line number mapping.  This is NULL if the values have not
++     been read.  This is (struct line *) -1 if there was an error
++     reading the values.  */
++  struct line *lines;
++  /* Number of entries in lines.  */
++  size_t lines_count;
++  /* PC ranges to function.  */
++  struct function_addrs *function_addrs;
++  size_t function_addrs_count;
++};
++
++/* An address range for a compilation unit.  This maps a PC value to a
++   specific compilation unit.  Note that we invert the representation
++   in DWARF: instead of listing the units and attaching a list of
++   ranges, we list the ranges and have each one point to the unit.
++   This lets us do a binary search to find the unit.  */
++
++struct unit_addrs
++{
++  /* Range is LOW <= PC < HIGH.  */
++  uint64_t low;
++  uint64_t high;
++  /* Compilation unit for this address range.  */
++  struct unit *u;
++};
++
++/* A growable vector of compilation unit address ranges.  */
++
++struct unit_addrs_vector
++{
++  /* Memory.  This is an array of struct unit_addrs.  */
++  struct backtrace_vector vec;
++  /* Number of address ranges present.  */
++  size_t count;
++};
++
++/* The information we need to map a PC to a file and line.  */
++
++struct dwarf_data
++{
++  /* The data for the next file we know about.  */
++  struct dwarf_data *next;
++  /* The base address for this file.  */
++  uintptr_t base_address;
++  /* A sorted list of address ranges.  */
++  struct unit_addrs *addrs;
++  /* Number of address ranges in list.  */
++  size_t addrs_count;
++  /* The unparsed .debug_info section.  */
++  const unsigned char *dwarf_info;
++  size_t dwarf_info_size;
++  /* The unparsed .debug_line section.  */
++  const unsigned char *dwarf_line;
++  size_t dwarf_line_size;
++  /* The unparsed .debug_ranges section.  */
++  const unsigned char *dwarf_ranges;
++  size_t dwarf_ranges_size;
++  /* The unparsed .debug_str section.  */
++  const unsigned char *dwarf_str;
++  size_t dwarf_str_size;
++  /* Whether the data is big-endian or not.  */
++  int is_bigendian;
++  /* A vector used for function addresses.  We keep this here so that
++     we can grow the vector as we read more functions.  */
++  struct function_vector fvec;
++};
++
++/* Report an error for a DWARF buffer.  */
++
++static void
++dwarf_buf_error (struct dwarf_buf *buf, const char *msg)
++{
++  char b[200];
++
++  snprintf (b, sizeof b, "%s in %s at %d",
++          msg, buf->name, (int) (buf->buf - buf->start));
++  buf->error_callback (buf->data, b, 0);
++}
++
++/* Require at least COUNT bytes in BUF.  Return 1 if all is well, 0 on
++   error.  */
++
++static int
++require (struct dwarf_buf *buf, size_t count)
++{
++  if (buf->left >= count)
++    return 1;
++
++  if (!buf->reported_underflow)
++    {
++      dwarf_buf_error (buf, "DWARF underflow");
++      buf->reported_underflow = 1;
++    }
++
++  return 0;
++}
++
++/* Advance COUNT bytes in BUF.  Return 1 if all is well, 0 on
++   error.  */
++
++static int
++advance (struct dwarf_buf *buf, size_t count)
++{
++  if (!require (buf, count))
++    return 0;
++  buf->buf += count;
++  buf->left -= count;
++  return 1;
++}
++
++/* Read one byte from BUF and advance 1 byte.  */
++
++static unsigned char
++read_byte (struct dwarf_buf *buf)
++{
++  const unsigned char *p = buf->buf;
++
++  if (!advance (buf, 1))
++    return 0;
++  return p[0];
++}
++
++/* Read a signed char from BUF and advance 1 byte.  */
++
++static signed char
++read_sbyte (struct dwarf_buf *buf)
++{
++  const unsigned char *p = buf->buf;
++
++  if (!advance (buf, 1))
++    return 0;
++  return (*p ^ 0x80) - 0x80;
++}
++
++/* Read a uint16 from BUF and advance 2 bytes.  */
++
++static uint16_t
++read_uint16 (struct dwarf_buf *buf)
++{
++  const unsigned char *p = buf->buf;
++
++  if (!advance (buf, 2))
++    return 0;
++  if (buf->is_bigendian)
++    return ((uint16_t) p[0] << 8) | (uint16_t) p[1];
++  else
++    return ((uint16_t) p[1] << 8) | (uint16_t) p[0];
++}
++
++/* Read a uint32 from BUF and advance 4 bytes.  */
++
++static uint32_t
++read_uint32 (struct dwarf_buf *buf)
++{
++  const unsigned char *p = buf->buf;
++
++  if (!advance (buf, 4))
++    return 0;
++  if (buf->is_bigendian)
++    return (((uint32_t) p[0] << 24) | ((uint32_t) p[1] << 16)
++          | ((uint32_t) p[2] << 8) | (uint32_t) p[3]);
++  else
++    return (((uint32_t) p[3] << 24) | ((uint32_t) p[2] << 16)
++          | ((uint32_t) p[1] << 8) | (uint32_t) p[0]);
++}
++
++/* Read a uint64 from BUF and advance 8 bytes.  */
++
++static uint64_t
++read_uint64 (struct dwarf_buf *buf)
++{
++  const unsigned char *p = buf->buf;
++
++  if (!advance (buf, 8))
++    return 0;
++  if (buf->is_bigendian)
++    return (((uint64_t) p[0] << 56) | ((uint64_t) p[1] << 48)
++          | ((uint64_t) p[2] << 40) | ((uint64_t) p[3] << 32)
++          | ((uint64_t) p[4] << 24) | ((uint64_t) p[5] << 16)
++          | ((uint64_t) p[6] << 8) | (uint64_t) p[7]);
++  else
++    return (((uint64_t) p[7] << 56) | ((uint64_t) p[6] << 48)
++          | ((uint64_t) p[5] << 40) | ((uint64_t) p[4] << 32)
++          | ((uint64_t) p[3] << 24) | ((uint64_t) p[2] << 16)
++          | ((uint64_t) p[1] << 8) | (uint64_t) p[0]);
++}
++
++/* Read an offset from BUF and advance the appropriate number of
++   bytes.  */
++
++static uint64_t
++read_offset (struct dwarf_buf *buf, int is_dwarf64)
++{
++  if (is_dwarf64)
++    return read_uint64 (buf);
++  else
++    return read_uint32 (buf);
++}
++
++/* Read an address from BUF and advance the appropriate number of
++   bytes.  */
++
++static uint64_t
++read_address (struct dwarf_buf *buf, int addrsize)
++{
++  switch (addrsize)
++    {
++    case 1:
++      return read_byte (buf);
++    case 2:
++      return read_uint16 (buf);
++    case 4:
++      return read_uint32 (buf);
++    case 8:
++      return read_uint64 (buf);
++    default:
++      dwarf_buf_error (buf, "unrecognized address size");
++      return 0;
++    }
++}
++
++/* Return whether a value is the highest possible address, given the
++   address size.  */
++
++static int
++is_highest_address (uint64_t address, int addrsize)
++{
++  switch (addrsize)
++    {
++    case 1:
++      return address == (unsigned char) -1;
++    case 2:
++      return address == (uint16_t) -1;
++    case 4:
++      return address == (uint32_t) -1;
++    case 8:
++      return address == (uint64_t) -1;
++    default:
++      return 0;
++    }
++}
++
++/* Read an unsigned LEB128 number.  */
++
++static uint64_t
++read_uleb128 (struct dwarf_buf *buf)
++{
++  uint64_t ret;
++  unsigned int shift;
++  int overflow;
++  unsigned char b;
++
++  ret = 0;
++  shift = 0;
++  overflow = 0;
++  do
++    {
++      const unsigned char *p;
++
++      p = buf->buf;
++      if (!advance (buf, 1))
++      return 0;
++      b = *p;
++      if (shift < 64)
++      ret |= ((uint64_t) (b & 0x7f)) << shift;
++      else if (!overflow)
++      {
++        dwarf_buf_error (buf, "LEB128 overflows uint64_t");
++        overflow = 1;
++      }
++      shift += 7;
++    }
++  while ((b & 0x80) != 0);
++
++  return ret;
++}
++
++/* Read a signed LEB128 number.  */
++
++static int64_t
++read_sleb128 (struct dwarf_buf *buf)
++{
++  uint64_t val;
++  unsigned int shift;
++  int overflow;
++  unsigned char b;
++
++  val = 0;
++  shift = 0;
++  overflow = 0;
++  do
++    {
++      const unsigned char *p;
++
++      p = buf->buf;
++      if (!advance (buf, 1))
++      return 0;
++      b = *p;
++      if (shift < 64)
++      val |= ((uint64_t) (b & 0x7f)) << shift;
++      else if (!overflow)
++      {
++        dwarf_buf_error (buf, "signed LEB128 overflows uint64_t");
++        overflow = 1;
++      }
++      shift += 7;
++    }
++  while ((b & 0x80) != 0);
++
++  if ((b & 0x40) != 0 && shift < 64)
++    val |= ((uint64_t) -1) << shift;
++
++  return (int64_t) val;
++}
++
++/* Return the length of an LEB128 number.  */
++
++static size_t
++leb128_len (const unsigned char *p)
++{
++  size_t ret;
++
++  ret = 1;
++  while ((*p & 0x80) != 0)
++    {
++      ++p;
++      ++ret;
++    }
++  return ret;
++}
++
++/* Free an abbreviations structure.  */
++
++static void
++free_abbrevs (struct backtrace_state *state, struct abbrevs *abbrevs,
++            backtrace_error_callback error_callback, void *data)
++{
++  size_t i;
++
++  for (i = 0; i < abbrevs->num_abbrevs; ++i)
++    backtrace_free (state, abbrevs->abbrevs[i].attrs,
++                  abbrevs->abbrevs[i].num_attrs * sizeof (struct attr),
++                  error_callback, data);
++  backtrace_free (state, abbrevs->abbrevs,
++                abbrevs->num_abbrevs * sizeof (struct abbrev),
++                error_callback, data);
++  abbrevs->num_abbrevs = 0;
++  abbrevs->abbrevs = NULL;
++}
++
++/* Read an attribute value.  Returns 1 on success, 0 on failure.  If
++   the value can be represented as a uint64_t, sets *VAL and sets
++   *IS_VALID to 1.  We don't try to store the value of other attribute
++   forms, because we don't care about them.  */
++
++static int
++read_attribute (enum dwarf_form form, struct dwarf_buf *buf,
++              int is_dwarf64, int version, int addrsize,
++              const unsigned char *dwarf_str, size_t dwarf_str_size,
++              struct attr_val *val)
++{
++  /* Avoid warnings about val.u.FIELD may be used uninitialized if
++     this function is inlined.  The warnings aren't valid but can
++     occur because the different fields are set and used
++     conditionally.  */
++  memset (val, 0, sizeof *val);
++
++  switch (form)
++    {
++    case DW_FORM_addr:
++      val->encoding = ATTR_VAL_ADDRESS;
++      val->u.uint = read_address (buf, addrsize);
++      return 1;
++    case DW_FORM_block2:
++      val->encoding = ATTR_VAL_BLOCK;
++      return advance (buf, read_uint16 (buf));
++    case DW_FORM_block4:
++      val->encoding = ATTR_VAL_BLOCK;
++      return advance (buf, read_uint32 (buf));
++    case DW_FORM_data2:
++      val->encoding = ATTR_VAL_UINT;
++      val->u.uint = read_uint16 (buf);
++      return 1;
++    case DW_FORM_data4:
++      val->encoding = ATTR_VAL_UINT;
++      val->u.uint = read_uint32 (buf);
++      return 1;
++    case DW_FORM_data8:
++      val->encoding = ATTR_VAL_UINT;
++      val->u.uint = read_uint64 (buf);
++      return 1;
++    case DW_FORM_string:
++      val->encoding = ATTR_VAL_STRING;
++      val->u.string = (const char *) buf->buf;
++      return advance (buf, strnlen ((const char *) buf->buf, buf->left) + 1);
++    case DW_FORM_block:
++      val->encoding = ATTR_VAL_BLOCK;
++      return advance (buf, read_uleb128 (buf));
++    case DW_FORM_block1:
++      val->encoding = ATTR_VAL_BLOCK;
++      return advance (buf, read_byte (buf));
++    case DW_FORM_data1:
++      val->encoding = ATTR_VAL_UINT;
++      val->u.uint = read_byte (buf);
++      return 1;
++    case DW_FORM_flag:
++      val->encoding = ATTR_VAL_UINT;
++      val->u.uint = read_byte (buf);
++      return 1;
++    case DW_FORM_sdata:
++      val->encoding = ATTR_VAL_SINT;
++      val->u.sint = read_sleb128 (buf);
++      return 1;
++    case DW_FORM_strp:
++      {
++      uint64_t offset;
++
++      offset = read_offset (buf, is_dwarf64);
++      if (offset >= dwarf_str_size)
++        {
++          dwarf_buf_error (buf, "DW_FORM_strp out of range");
++          return 0;
++        }
++      val->encoding = ATTR_VAL_STRING;
++      val->u.string = (const char *) dwarf_str + offset;
++      return 1;
++      }
++    case DW_FORM_udata:
++      val->encoding = ATTR_VAL_UINT;
++      val->u.uint = read_uleb128 (buf);
++      return 1;
++    case DW_FORM_ref_addr:
++      val->encoding = ATTR_VAL_REF_INFO;
++      if (version == 2)
++      val->u.uint = read_address (buf, addrsize);
++      else
++      val->u.uint = read_offset (buf, is_dwarf64);
++      return 1;
++    case DW_FORM_ref1:
++      val->encoding = ATTR_VAL_REF_UNIT;
++      val->u.uint = read_byte (buf);
++      return 1;
++    case DW_FORM_ref2:
++      val->encoding = ATTR_VAL_REF_UNIT;
++      val->u.uint = read_uint16 (buf);
++      return 1;
++    case DW_FORM_ref4:
++      val->encoding = ATTR_VAL_REF_UNIT;
++      val->u.uint = read_uint32 (buf);
++      return 1;
++    case DW_FORM_ref8:
++      val->encoding = ATTR_VAL_REF_UNIT;
++      val->u.uint = read_uint64 (buf);
++      return 1;
++    case DW_FORM_ref_udata:
++      val->encoding = ATTR_VAL_REF_UNIT;
++      val->u.uint = read_uleb128 (buf);
++      return 1;
++    case DW_FORM_indirect:
++      {
++      uint64_t form;
++
++      form = read_uleb128 (buf);
++      return read_attribute ((enum dwarf_form) form, buf, is_dwarf64,
++                             version, addrsize, dwarf_str, dwarf_str_size,
++                             val);
++      }
++    case DW_FORM_sec_offset:
++      val->encoding = ATTR_VAL_REF_SECTION;
++      val->u.uint = read_offset (buf, is_dwarf64);
++      return 1;
++    case DW_FORM_exprloc:
++      val->encoding = ATTR_VAL_EXPR;
++      return advance (buf, read_uleb128 (buf));
++    case DW_FORM_flag_present:
++      val->encoding = ATTR_VAL_UINT;
++      val->u.uint = 1;
++      return 1;
++    case DW_FORM_ref_sig8:
++      val->encoding = ATTR_VAL_REF_TYPE;
++      val->u.uint = read_uint64 (buf);
++      return 1;
++    case DW_FORM_GNU_addr_index:
++      val->encoding = ATTR_VAL_REF_SECTION;
++      val->u.uint = read_uleb128 (buf);
++      return 1;
++    case DW_FORM_GNU_str_index:
++      val->encoding = ATTR_VAL_REF_SECTION;
++      val->u.uint = read_uleb128 (buf);
++      return 1;
++    case DW_FORM_GNU_ref_alt:
++      val->encoding = ATTR_VAL_REF_SECTION;
++      val->u.uint = read_offset (buf, is_dwarf64);
++      return 1;
++    case DW_FORM_GNU_strp_alt:
++      val->encoding = ATTR_VAL_REF_SECTION;
++      val->u.uint = read_offset (buf, is_dwarf64);
++      return 1;
++    default:
++      dwarf_buf_error (buf, "unrecognized DWARF form");
++      return 0;
++    }
++}
++
++/* Compare function_addrs for qsort.  When ranges are nested, make the
++   smallest one sort last.  */
++
++static int
++function_addrs_compare (const void *v1, const void *v2)
++{
++  const struct function_addrs *a1 = (const struct function_addrs *) v1;
++  const struct function_addrs *a2 = (const struct function_addrs *) v2;
++
++  if (a1->low < a2->low)
++    return -1;
++  if (a1->low > a2->low)
++    return 1;
++  if (a1->high < a2->high)
++    return 1;
++  if (a1->high > a2->high)
++    return -1;
++  return strcmp (a1->function->name, a2->function->name);
++}
++
++/* Compare a PC against a function_addrs for bsearch.  Note that if
++   there are multiple ranges containing PC, which one will be returned
++   is unpredictable.  We compensate for that in dwarf_fileline.  */
++
++static int
++function_addrs_search (const void *vkey, const void *ventry)
++{
++  const uintptr_t *key = (const uintptr_t *) vkey;
++  const struct function_addrs *entry = (const struct function_addrs *) ventry;
++  uintptr_t pc;
++
++  pc = *key;
++  if (pc < entry->low)
++    return -1;
++  else if (pc >= entry->high)
++    return 1;
++  else
++    return 0;
++}
++
++/* Add a new compilation unit address range to a vector.  Returns 1 on
++   success, 0 on failure.  */
++
++static int
++add_unit_addr (struct backtrace_state *state, uintptr_t base_address,
++             struct unit_addrs addrs,
++             backtrace_error_callback error_callback, void *data,
++             struct unit_addrs_vector *vec)
++{
++  struct unit_addrs *p;
++
++  /* Add in the base address of the module here, so that we can look
++     up the PC directly.  */
++  addrs.low += base_address;
++  addrs.high += base_address;
++
++  /* Try to merge with the last entry.  */
++  if (vec->count > 0)
++    {
++      p = (struct unit_addrs *) vec->vec.base + (vec->count - 1);
++      if ((addrs.low == p->high || addrs.low == p->high + 1)
++        && addrs.u == p->u)
++      {
++        if (addrs.high > p->high)
++          p->high = addrs.high;
++        return 1;
++      }
++    }
++
++  p = ((struct unit_addrs *)
++       backtrace_vector_grow (state, sizeof (struct unit_addrs),
++                            error_callback, data, &vec->vec));
++  if (p == NULL)
++    return 0;
++
++  *p = addrs;
++  ++vec->count;
++  return 1;
++}
++
++/* Free a unit address vector.  */
++
++static void
++free_unit_addrs_vector (struct backtrace_state *state,
++                      struct unit_addrs_vector *vec,
++                      backtrace_error_callback error_callback, void *data)
++{
++  struct unit_addrs *addrs;
++  size_t i;
++
++  addrs = (struct unit_addrs *) vec->vec.base;
++  for (i = 0; i < vec->count; ++i)
++    free_abbrevs (state, &addrs[i].u->abbrevs, error_callback, data);
++}
++
++/* Compare unit_addrs for qsort.  When ranges are nested, make the
++   smallest one sort last.  */
++
++static int
++unit_addrs_compare (const void *v1, const void *v2)
++{
++  const struct unit_addrs *a1 = (const struct unit_addrs *) v1;
++  const struct unit_addrs *a2 = (const struct unit_addrs *) v2;
++
++  if (a1->low < a2->low)
++    return -1;
++  if (a1->low > a2->low)
++    return 1;
++  if (a1->high < a2->high)
++    return 1;
++  if (a1->high > a2->high)
++    return -1;
++  if (a1->u->lineoff < a2->u->lineoff)
++    return -1;
++  if (a1->u->lineoff > a2->u->lineoff)
++    return 1;
++  return 0;
++}
++
++/* Compare a PC against a unit_addrs for bsearch.  Note that if there
++   are multiple ranges containing PC, which one will be returned is
++   unpredictable.  We compensate for that in dwarf_fileline.  */
++
++static int
++unit_addrs_search (const void *vkey, const void *ventry)
++{
++  const uintptr_t *key = (const uintptr_t *) vkey;
++  const struct unit_addrs *entry = (const struct unit_addrs *) ventry;
++  uintptr_t pc;
++
++  pc = *key;
++  if (pc < entry->low)
++    return -1;
++  else if (pc >= entry->high)
++    return 1;
++  else
++    return 0;
++}
++
++/* Sort the line vector by PC.  We want a stable sort here to maintain
++   the order of lines for the same PC values.  Since the sequence is
++   being sorted in place, their addresses cannot be relied on to
++   maintain stability.  That is the purpose of the index member.  */
++
++static int
++line_compare (const void *v1, const void *v2)
++{
++  const struct line *ln1 = (const struct line *) v1;
++  const struct line *ln2 = (const struct line *) v2;
++
++  if (ln1->pc < ln2->pc)
++    return -1;
++  else if (ln1->pc > ln2->pc)
++    return 1;
++  else if (ln1->idx < ln2->idx)
++    return -1;
++  else if (ln1->idx > ln2->idx)
++    return 1;
++  else
++    return 0;
++}
++
++/* Find a PC in a line vector.  We always allocate an extra entry at
++   the end of the lines vector, so that this routine can safely look
++   at the next entry.  Note that when there are multiple mappings for
++   the same PC value, this will return the last one.  */
++
++static int
++line_search (const void *vkey, const void *ventry)
++{
++  const uintptr_t *key = (const uintptr_t *) vkey;
++  const struct line *entry = (const struct line *) ventry;
++  uintptr_t pc;
++
++  pc = *key;
++  if (pc < entry->pc)
++    return -1;
++  else if (pc >= (entry + 1)->pc)
++    return 1;
++  else
++    return 0;
++}
++
++/* Sort the abbrevs by the abbrev code.  This function is passed to
++   both qsort and bsearch.  */
++
++static int
++abbrev_compare (const void *v1, const void *v2)
++{
++  const struct abbrev *a1 = (const struct abbrev *) v1;
++  const struct abbrev *a2 = (const struct abbrev *) v2;
++
++  if (a1->code < a2->code)
++    return -1;
++  else if (a1->code > a2->code)
++    return 1;
++  else
++    {
++      /* This really shouldn't happen.  It means there are two
++       different abbrevs with the same code, and that means we don't
++       know which one lookup_abbrev should return.  */
++      return 0;
++    }
++}
++
++/* Read the abbreviation table for a compilation unit.  Returns 1 on
++   success, 0 on failure.  */
++
++static int
++read_abbrevs (struct backtrace_state *state, uint64_t abbrev_offset,
++            const unsigned char *dwarf_abbrev, size_t dwarf_abbrev_size,
++            int is_bigendian, backtrace_error_callback error_callback,
++            void *data, struct abbrevs *abbrevs)
++{
++  struct dwarf_buf abbrev_buf;
++  struct dwarf_buf count_buf;
++  size_t num_abbrevs;
++
++  abbrevs->num_abbrevs = 0;
++  abbrevs->abbrevs = NULL;
++
++  if (abbrev_offset >= dwarf_abbrev_size)
++    {
++      error_callback (data, "abbrev offset out of range", 0);
++      return 0;
++    }
++
++  abbrev_buf.name = ".debug_abbrev";
++  abbrev_buf.start = dwarf_abbrev;
++  abbrev_buf.buf = dwarf_abbrev + abbrev_offset;
++  abbrev_buf.left = dwarf_abbrev_size - abbrev_offset;
++  abbrev_buf.is_bigendian = is_bigendian;
++  abbrev_buf.error_callback = error_callback;
++  abbrev_buf.data = data;
++  abbrev_buf.reported_underflow = 0;
++
++  /* Count the number of abbrevs in this list.  */
++
++  count_buf = abbrev_buf;
++  num_abbrevs = 0;
++  while (read_uleb128 (&count_buf) != 0)
++    {
++      if (count_buf.reported_underflow)
++      return 0;
++      ++num_abbrevs;
++      // Skip tag.
++      read_uleb128 (&count_buf);
++      // Skip has_children.
++      read_byte (&count_buf);
++      // Skip attributes.
++      while (read_uleb128 (&count_buf) != 0)
++      read_uleb128 (&count_buf);
++      // Skip form of last attribute.
++      read_uleb128 (&count_buf);
++    }
++
++  if (count_buf.reported_underflow)
++    return 0;
++
++  if (num_abbrevs == 0)
++    return 1;
++
++  abbrevs->num_abbrevs = num_abbrevs;
++  abbrevs->abbrevs = ((struct abbrev *)
++                    backtrace_alloc (state,
++                                     num_abbrevs * sizeof (struct abbrev),
++                                     error_callback, data));
++  if (abbrevs->abbrevs == NULL)
++    return 0;
++  memset (abbrevs->abbrevs, 0, num_abbrevs * sizeof (struct abbrev));
++
++  num_abbrevs = 0;
++  while (1)
++    {
++      uint64_t code;
++      struct abbrev a;
++      size_t num_attrs;
++      struct attr *attrs;
++
++      if (abbrev_buf.reported_underflow)
++      goto fail;
++
++      code = read_uleb128 (&abbrev_buf);
++      if (code == 0)
++      break;
++
++      a.code = code;
++      a.tag = (enum dwarf_tag) read_uleb128 (&abbrev_buf);
++      a.has_children = read_byte (&abbrev_buf);
++
++      count_buf = abbrev_buf;
++      num_attrs = 0;
++      while (read_uleb128 (&count_buf) != 0)
++      {
++        ++num_attrs;
++        read_uleb128 (&count_buf);
++      }
++
++      if (num_attrs == 0)
++      {
++        attrs = NULL;
++        read_uleb128 (&abbrev_buf);
++        read_uleb128 (&abbrev_buf);
++      }
++      else
++      {
++        attrs = ((struct attr *)
++                 backtrace_alloc (state, num_attrs * sizeof *attrs,
++                                  error_callback, data));
++        if (attrs == NULL)
++          goto fail;
++        num_attrs = 0;
++        while (1)
++          {
++            uint64_t name;
++            uint64_t form;
++
++            name = read_uleb128 (&abbrev_buf);
++            form = read_uleb128 (&abbrev_buf);
++            if (name == 0)
++              break;
++            attrs[num_attrs].name = (enum dwarf_attribute) name;
++            attrs[num_attrs].form = (enum dwarf_form) form;
++            ++num_attrs;
++          }
++      }
++
++      a.num_attrs = num_attrs;
++      a.attrs = attrs;
++
++      abbrevs->abbrevs[num_abbrevs] = a;
++      ++num_abbrevs;
++    }
++
++  backtrace_qsort (abbrevs->abbrevs, abbrevs->num_abbrevs,
++                 sizeof (struct abbrev), abbrev_compare);
++
++  return 1;
++
++ fail:
++  free_abbrevs (state, abbrevs, error_callback, data);
++  return 0;
++}
++
++/* Return the abbrev information for an abbrev code.  */
++
++static const struct abbrev *
++lookup_abbrev (struct abbrevs *abbrevs, uint64_t code,
++             backtrace_error_callback error_callback, void *data)
++{
++  struct abbrev key;
++  void *p;
++
++  /* With GCC, where abbrevs are simply numbered in order, we should
++     be able to just look up the entry.  */
++  if (code - 1 < abbrevs->num_abbrevs
++      && abbrevs->abbrevs[code - 1].code == code)
++    return &abbrevs->abbrevs[code - 1];
++
++  /* Otherwise we have to search.  */
++  memset (&key, 0, sizeof key);
++  key.code = code;
++  p = bsearch (&key, abbrevs->abbrevs, abbrevs->num_abbrevs,
++             sizeof (struct abbrev), abbrev_compare);
++  if (p == NULL)
++    {
++      error_callback (data, "invalid abbreviation code", 0);
++      return NULL;
++    }
++  return (const struct abbrev *) p;
++}
++
++/* Add non-contiguous address ranges for a compilation unit.  Returns
++   1 on success, 0 on failure.  */
++
++static int
++add_unit_ranges (struct backtrace_state *state, uintptr_t base_address,
++               struct unit *u, uint64_t ranges, uint64_t base,
++               int is_bigendian, const unsigned char *dwarf_ranges,
++               size_t dwarf_ranges_size,
++               backtrace_error_callback error_callback, void *data,
++               struct unit_addrs_vector *addrs)
++{
++  struct dwarf_buf ranges_buf;
++
++  if (ranges >= dwarf_ranges_size)
++    {
++      error_callback (data, "ranges offset out of range", 0);
++      return 0;
++    }
++
++  ranges_buf.name = ".debug_ranges";
++  ranges_buf.start = dwarf_ranges;
++  ranges_buf.buf = dwarf_ranges + ranges;
++  ranges_buf.left = dwarf_ranges_size - ranges;
++  ranges_buf.is_bigendian = is_bigendian;
++  ranges_buf.error_callback = error_callback;
++  ranges_buf.data = data;
++  ranges_buf.reported_underflow = 0;
++
++  while (1)
++    {
++      uint64_t low;
++      uint64_t high;
++
++      if (ranges_buf.reported_underflow)
++      return 0;
++
++      low = read_address (&ranges_buf, u->addrsize);
++      high = read_address (&ranges_buf, u->addrsize);
++
++      if (low == 0 && high == 0)
++      break;
++
++      if (is_highest_address (low, u->addrsize))
++      base = high;
++      else
++      {
++        struct unit_addrs a;
++
++        a.low = low + base;
++        a.high = high + base;
++        a.u = u;
++        if (!add_unit_addr (state, base_address, a, error_callback, data,
++                            addrs))
++          return 0;
++      }
++    }
++
++  if (ranges_buf.reported_underflow)
++    return 0;
++
++  return 1;
++}
++
++/* Find the address range covered by a compilation unit, reading from
++   UNIT_BUF and adding values to U.  Returns 1 if all data could be
++   read, 0 if there is some error.  */
++
++static int
++find_address_ranges (struct backtrace_state *state, uintptr_t base_address,
++                   struct dwarf_buf *unit_buf,
++                   const unsigned char *dwarf_str, size_t dwarf_str_size,
++                   const unsigned char *dwarf_ranges,
++                   size_t dwarf_ranges_size,
++                   int is_bigendian, backtrace_error_callback error_callback,
++                   void *data, struct unit *u,
++                   struct unit_addrs_vector *addrs)
++{
++  while (unit_buf->left > 0)
++    {
++      uint64_t code;
++      const struct abbrev *abbrev;
++      uint64_t lowpc;
++      int have_lowpc;
++      uint64_t highpc;
++      int have_highpc;
++      int highpc_is_relative;
++      uint64_t ranges;
++      int have_ranges;
++      size_t i;
++
++      code = read_uleb128 (unit_buf);
++      if (code == 0)
++      return 1;
++
++      abbrev = lookup_abbrev (&u->abbrevs, code, error_callback, data);
++      if (abbrev == NULL)
++      return 0;
++
++      lowpc = 0;
++      have_lowpc = 0;
++      highpc = 0;
++      have_highpc = 0;
++      highpc_is_relative = 0;
++      ranges = 0;
++      have_ranges = 0;
++      for (i = 0; i < abbrev->num_attrs; ++i)
++      {
++        struct attr_val val;
++
++        if (!read_attribute (abbrev->attrs[i].form, unit_buf,
++                             u->is_dwarf64, u->version, u->addrsize,
++                             dwarf_str, dwarf_str_size, &val))
++          return 0;
++
++        switch (abbrev->attrs[i].name)
++          {
++          case DW_AT_low_pc:
++            if (val.encoding == ATTR_VAL_ADDRESS)
++              {
++                lowpc = val.u.uint;
++                have_lowpc = 1;
++              }
++            break;
++
++          case DW_AT_high_pc:
++            if (val.encoding == ATTR_VAL_ADDRESS)
++              {
++                highpc = val.u.uint;
++                have_highpc = 1;
++              }
++            else if (val.encoding == ATTR_VAL_UINT)
++              {
++                highpc = val.u.uint;
++                have_highpc = 1;
++                highpc_is_relative = 1;
++              }
++            break;
++
++          case DW_AT_ranges:
++            if (val.encoding == ATTR_VAL_UINT
++                || val.encoding == ATTR_VAL_REF_SECTION)
++              {
++                ranges = val.u.uint;
++                have_ranges = 1;
++              }
++            break;
++
++          case DW_AT_stmt_list:
++            if (abbrev->tag == DW_TAG_compile_unit
++                && (val.encoding == ATTR_VAL_UINT
++                    || val.encoding == ATTR_VAL_REF_SECTION))
++              u->lineoff = val.u.uint;
++            break;
++
++          case DW_AT_name:
++            if (abbrev->tag == DW_TAG_compile_unit
++                && val.encoding == ATTR_VAL_STRING)
++              u->filename = val.u.string;
++            break;
++
++          case DW_AT_comp_dir:
++            if (abbrev->tag == DW_TAG_compile_unit
++                && val.encoding == ATTR_VAL_STRING)
++              u->comp_dir = val.u.string;
++            break;
++
++          default:
++            break;
++          }
++      }
++
++      if (abbrev->tag == DW_TAG_compile_unit
++        || abbrev->tag == DW_TAG_subprogram)
++      {
++        if (have_ranges)
++          {
++            if (!add_unit_ranges (state, base_address, u, ranges, lowpc,
++                                  is_bigendian, dwarf_ranges,
++                                  dwarf_ranges_size, error_callback,
++                                  data, addrs))
++              return 0;
++          }
++        else if (have_lowpc && have_highpc)
++          {
++            struct unit_addrs a;
++
++            if (highpc_is_relative)
++              highpc += lowpc;
++            a.low = lowpc;
++            a.high = highpc;
++            a.u = u;
++
++            if (!add_unit_addr (state, base_address, a, error_callback, data,
++                                addrs))
++              return 0;
++          }
++
++        /* If we found the PC range in the DW_TAG_compile_unit, we
++           can stop now.  */
++        if (abbrev->tag == DW_TAG_compile_unit
++            && (have_ranges || (have_lowpc && have_highpc)))
++          return 1;
++      }
++
++      if (abbrev->has_children)
++      {
++        if (!find_address_ranges (state, base_address, unit_buf,
++                                  dwarf_str, dwarf_str_size,
++                                  dwarf_ranges, dwarf_ranges_size,
++                                  is_bigendian, error_callback, data,
++                                  u, addrs))
++          return 0;
++      }
++    }
++
++  return 1;
++}
++
++/* Build a mapping from address ranges to the compilation units where
++   the line number information for that range can be found.  Returns 1
++   on success, 0 on failure.  */
++
++static int
++build_address_map (struct backtrace_state *state, uintptr_t base_address,
++                 const unsigned char *dwarf_info, size_t dwarf_info_size,
++                 const unsigned char *dwarf_abbrev, size_t dwarf_abbrev_size,
++                 const unsigned char *dwarf_ranges, size_t dwarf_ranges_size,
++                 const unsigned char *dwarf_str, size_t dwarf_str_size,
++                 int is_bigendian, backtrace_error_callback error_callback,
++                 void *data, struct unit_addrs_vector *addrs)
++{
++  struct dwarf_buf info;
++  struct abbrevs abbrevs;
++
++  memset (&addrs->vec, 0, sizeof addrs->vec);
++  addrs->count = 0;
++
++  /* Read through the .debug_info section.  FIXME: Should we use the
++     .debug_aranges section?  gdb and addr2line don't use it, but I'm
++     not sure why.  */
++
++  info.name = ".debug_info";
++  info.start = dwarf_info;
++  info.buf = dwarf_info;
++  info.left = dwarf_info_size;
++  info.is_bigendian = is_bigendian;
++  info.error_callback = error_callback;
++  info.data = data;
++  info.reported_underflow = 0;
++
++  memset (&abbrevs, 0, sizeof abbrevs);
++  while (info.left > 0)
++    {
++      const unsigned char *unit_data_start;
++      uint64_t len;
++      int is_dwarf64;
++      struct dwarf_buf unit_buf;
++      int version;
++      uint64_t abbrev_offset;
++      int addrsize;
++      struct unit *u;
++
++      if (info.reported_underflow)
++      goto fail;
++
++      unit_data_start = info.buf;
++
++      is_dwarf64 = 0;
++      len = read_uint32 (&info);
++      if (len == 0xffffffff)
++      {
++        len = read_uint64 (&info);
++        is_dwarf64 = 1;
++      }
++
++      unit_buf = info;
++      unit_buf.left = len;
++
++      if (!advance (&info, len))
++      goto fail;
++
++      version = read_uint16 (&unit_buf);
++      if (version < 2 || version > 4)
++      {
++        dwarf_buf_error (&unit_buf, "unrecognized DWARF version");
++        goto fail;
++      }
++
++      abbrev_offset = read_offset (&unit_buf, is_dwarf64);
++      if (!read_abbrevs (state, abbrev_offset, dwarf_abbrev, dwarf_abbrev_size,
++                       is_bigendian, error_callback, data, &abbrevs))
++      goto fail;
++
++      addrsize = read_byte (&unit_buf);
++
++      u = ((struct unit *)
++         backtrace_alloc (state, sizeof *u, error_callback, data));
++      if (u == NULL)
++      goto fail;
++      u->unit_data = unit_buf.buf;
++      u->unit_data_len = unit_buf.left;
++      u->unit_data_offset = unit_buf.buf - unit_data_start;
++      u->version = version;
++      u->is_dwarf64 = is_dwarf64;
++      u->addrsize = addrsize;
++      u->filename = NULL;
++      u->comp_dir = NULL;
++      u->abs_filename = NULL;
++      u->lineoff = 0;
++      u->abbrevs = abbrevs;
++      memset (&abbrevs, 0, sizeof abbrevs);
++
++      /* The actual line number mappings will be read as needed.  */
++      u->lines = NULL;
++      u->lines_count = 0;
++      u->function_addrs = NULL;
++      u->function_addrs_count = 0;
++
++      if (!find_address_ranges (state, base_address, &unit_buf,
++                              dwarf_str, dwarf_str_size,
++                              dwarf_ranges, dwarf_ranges_size,
++                              is_bigendian, error_callback, data,
++                              u, addrs))
++      {
++        free_abbrevs (state, &u->abbrevs, error_callback, data);
++        backtrace_free (state, u, sizeof *u, error_callback, data);
++        goto fail;
++      }
++
++      if (unit_buf.reported_underflow)
++      {
++        free_abbrevs (state, &u->abbrevs, error_callback, data);
++        backtrace_free (state, u, sizeof *u, error_callback, data);
++        goto fail;
++      }
++    }
++  if (info.reported_underflow)
++    goto fail;
++
++  return 1;
++
++ fail:
++  free_abbrevs (state, &abbrevs, error_callback, data);
++  free_unit_addrs_vector (state, addrs, error_callback, data);
++  return 0;
++}
++
++/* Add a new mapping to the vector of line mappings that we are
++   building.  Returns 1 on success, 0 on failure.  */
++
++static int
++add_line (struct backtrace_state *state, struct dwarf_data *ddata,
++        uintptr_t pc, const char *filename, int lineno,
++        backtrace_error_callback error_callback, void *data,
++        struct line_vector *vec)
++{
++  struct line *ln;
++
++  /* If we are adding the same mapping, ignore it.  This can happen
++     when using discriminators.  */
++  if (vec->count > 0)
++    {
++      ln = (struct line *) vec->vec.base + (vec->count - 1);
++      if (pc == ln->pc && filename == ln->filename && lineno == ln->lineno)
++      return 1;
++    }
++
++  ln = ((struct line *)
++      backtrace_vector_grow (state, sizeof (struct line), error_callback,
++                             data, &vec->vec));
++  if (ln == NULL)
++    return 0;
++
++  /* Add in the base address here, so that we can look up the PC
++     directly.  */
++  ln->pc = pc + ddata->base_address;
++
++  ln->filename = filename;
++  ln->lineno = lineno;
++  ln->idx = vec->count;
++
++  ++vec->count;
++
++  return 1;
++}
++
++/* Free the line header information.  If FREE_FILENAMES is true we
++   free the file names themselves, otherwise we leave them, as there
++   may be line structures pointing to them.  */
++
++static void
++free_line_header (struct backtrace_state *state, struct line_header *hdr,
++                backtrace_error_callback error_callback, void *data)
++{
++  backtrace_free (state, hdr->dirs, hdr->dirs_count * sizeof (const char *),
++                error_callback, data);
++  backtrace_free (state, hdr->filenames,
++                hdr->filenames_count * sizeof (char *),
++                error_callback, data);
++}
++
++/* Read the line header.  Return 1 on success, 0 on failure.  */
++
++static int
++read_line_header (struct backtrace_state *state, struct unit *u,
++                int is_dwarf64, struct dwarf_buf *line_buf,
++                struct line_header *hdr)
++{
++  uint64_t hdrlen;
++  struct dwarf_buf hdr_buf;
++  const unsigned char *p;
++  const unsigned char *pend;
++  size_t i;
++
++  hdr->version = read_uint16 (line_buf);
++  if (hdr->version < 2 || hdr->version > 4)
++    {
++      dwarf_buf_error (line_buf, "unsupported line number version");
++      return 0;
++    }
++
++  hdrlen = read_offset (line_buf, is_dwarf64);
++
++  hdr_buf = *line_buf;
++  hdr_buf.left = hdrlen;
++
++  if (!advance (line_buf, hdrlen))
++    return 0;
++
++  hdr->min_insn_len = read_byte (&hdr_buf);
++  if (hdr->version < 4)
++    hdr->max_ops_per_insn = 1;
++  else
++    hdr->max_ops_per_insn = read_byte (&hdr_buf);
++
++  /* We don't care about default_is_stmt.  */
++  read_byte (&hdr_buf);
++
++  hdr->line_base = read_sbyte (&hdr_buf);
++  hdr->line_range = read_byte (&hdr_buf);
++
++  hdr->opcode_base = read_byte (&hdr_buf);
++  hdr->opcode_lengths = hdr_buf.buf;
++  if (!advance (&hdr_buf, hdr->opcode_base - 1))
++    return 0;
++
++  /* Count the number of directory entries.  */
++  hdr->dirs_count = 0;
++  p = hdr_buf.buf;
++  pend = p + hdr_buf.left;
++  while (p < pend && *p != '\0')
++    {
++      p += strnlen((const char *) p, pend - p) + 1;
++      ++hdr->dirs_count;
++    }
++
++  hdr->dirs = ((const char **)
++             backtrace_alloc (state,
++                              hdr->dirs_count * sizeof (const char *),
++                              line_buf->error_callback, line_buf->data));
++  if (hdr->dirs == NULL)
++    return 0;
++
++  i = 0;
++  while (*hdr_buf.buf != '\0')
++    {
++      if (hdr_buf.reported_underflow)
++      return 0;
++
++      hdr->dirs[i] = (const char *) hdr_buf.buf;
++      ++i;
++      if (!advance (&hdr_buf,
++                  strnlen ((const char *) hdr_buf.buf, hdr_buf.left) + 1))
++      return 0;
++    }
++  if (!advance (&hdr_buf, 1))
++    return 0;
++
++  /* Count the number of file entries.  */
++  hdr->filenames_count = 0;
++  p = hdr_buf.buf;
++  pend = p + hdr_buf.left;
++  while (p < pend && *p != '\0')
++    {
++      p += strnlen ((const char *) p, pend - p) + 1;
++      p += leb128_len (p);
++      p += leb128_len (p);
++      p += leb128_len (p);
++      ++hdr->filenames_count;
++    }
++
++  hdr->filenames = ((const char **)
++                  backtrace_alloc (state,
++                                   hdr->filenames_count * sizeof (char *),
++                                   line_buf->error_callback,
++                                   line_buf->data));
++  if (hdr->filenames == NULL)
++    return 0;
++  i = 0;
++  while (*hdr_buf.buf != '\0')
++    {
++      const char *filename;
++      uint64_t dir_index;
++
++      if (hdr_buf.reported_underflow)
++      return 0;
++
++      filename = (const char *) hdr_buf.buf;
++      if (!advance (&hdr_buf,
++                  strnlen ((const char *) hdr_buf.buf, hdr_buf.left) + 1))
++      return 0;
++      dir_index = read_uleb128 (&hdr_buf);
++      if (IS_ABSOLUTE_PATH (filename)
++        || (dir_index == 0 && u->comp_dir == NULL))
++      hdr->filenames[i] = filename;
++      else
++      {
++        const char *dir;
++        size_t dir_len;
++        size_t filename_len;
++        char *s;
++
++        if (dir_index == 0)
++          dir = u->comp_dir;
++        else if (dir_index - 1 < hdr->dirs_count)
++          dir = hdr->dirs[dir_index - 1];
++        else
++          {
++            dwarf_buf_error (line_buf,
++                             ("invalid directory index in "
++                              "line number program header"));
++            return 0;
++          }
++        dir_len = strlen (dir);
++        filename_len = strlen (filename);
++        s = ((char *)
++             backtrace_alloc (state, dir_len + filename_len + 2,
++                              line_buf->error_callback, line_buf->data));
++        if (s == NULL)
++          return 0;
++        memcpy (s, dir, dir_len);
++        /* FIXME: If we are on a DOS-based file system, and the
++           directory or the file name use backslashes, then we
++           should use a backslash here.  */
++        s[dir_len] = '/';
++        memcpy (s + dir_len + 1, filename, filename_len + 1);
++        hdr->filenames[i] = s;
++      }
++
++      /* Ignore the modification time and size.  */
++      read_uleb128 (&hdr_buf);
++      read_uleb128 (&hdr_buf);
++
++      ++i;
++    }
++
++  if (hdr_buf.reported_underflow)
++    return 0;
++
++  return 1;
++}
++
++/* Read the line program, adding line mappings to VEC.  Return 1 on
++   success, 0 on failure.  */
++
++static int
++read_line_program (struct backtrace_state *state, struct dwarf_data *ddata,
++                 struct unit *u, const struct line_header *hdr,
++                 struct dwarf_buf *line_buf, struct line_vector *vec)
++{
++  uint64_t address;
++  unsigned int op_index;
++  const char *reset_filename;
++  const char *filename;
++  int lineno;
++
++  address = 0;
++  op_index = 0;
++  if (hdr->filenames_count > 0)
++    reset_filename = hdr->filenames[0];
++  else
++    reset_filename = "";
++  filename = reset_filename;
++  lineno = 1;
++  while (line_buf->left > 0)
++    {
++      unsigned int op;
++
++      op = read_byte (line_buf);
++      if (op >= hdr->opcode_base)
++      {
++        unsigned int advance;
++
++        /* Special opcode.  */
++        op -= hdr->opcode_base;
++        advance = op / hdr->line_range;
++        address += (hdr->min_insn_len * (op_index + advance)
++                    / hdr->max_ops_per_insn);
++        op_index = (op_index + advance) % hdr->max_ops_per_insn;
++        lineno += hdr->line_base + (int) (op % hdr->line_range);
++        add_line (state, ddata, address, filename, lineno,
++                  line_buf->error_callback, line_buf->data, vec);
++      }
++      else if (op == DW_LNS_extended_op)
++      {
++        uint64_t len;
++
++        len = read_uleb128 (line_buf);
++        op = read_byte (line_buf);
++        switch (op)
++          {
++          case DW_LNE_end_sequence:
++            /* FIXME: Should we mark the high PC here?  It seems
++               that we already have that information from the
++               compilation unit.  */
++            address = 0;
++            op_index = 0;
++            filename = reset_filename;
++            lineno = 1;
++            break;
++          case DW_LNE_set_address:
++            address = read_address (line_buf, u->addrsize);
++            break;
++          case DW_LNE_define_file:
++            {
++              const char *f;
++              unsigned int dir_index;
++
++              f = (const char *) line_buf->buf;
++              if (!advance (line_buf, strnlen (f, line_buf->left) + 1))
++                return 0;
++              dir_index = read_uleb128 (line_buf);
++              /* Ignore that time and length.  */
++              read_uleb128 (line_buf);
++              read_uleb128 (line_buf);
++              if (IS_ABSOLUTE_PATH (f))
++                filename = f;
++              else
++                {
++                  const char *dir;
++                  size_t dir_len;
++                  size_t f_len;
++                  char *p;
++
++                  if (dir_index == 0)
++                    dir = u->comp_dir;
++                  else if (dir_index - 1 < hdr->dirs_count)
++                    dir = hdr->dirs[dir_index - 1];
++                  else
++                    {
++                      dwarf_buf_error (line_buf,
++                                       ("invalid directory index "
++                                        "in line number program"));
++                      return 0;
++                    }
++                  dir_len = strlen (dir);
++                  f_len = strlen (f);
++                  p = ((char *)
++                       backtrace_alloc (state, dir_len + f_len + 2,
++                                        line_buf->error_callback,
++                                        line_buf->data));
++                  if (p == NULL)
++                    return 0;
++                  memcpy (p, dir, dir_len);
++                  /* FIXME: If we are on a DOS-based file system,
++                     and the directory or the file name use
++                     backslashes, then we should use a backslash
++                     here.  */
++                  p[dir_len] = '/';
++                  memcpy (p + dir_len + 1, f, f_len + 1);
++                  filename = p;
++                }
++            }
++            break;
++          case DW_LNE_set_discriminator:
++            /* We don't care about discriminators.  */
++            read_uleb128 (line_buf);
++            break;
++          default:
++            if (!advance (line_buf, len - 1))
++              return 0;
++            break;
++          }
++      }
++      else
++      {
++        switch (op)
++          {
++          case DW_LNS_copy:
++            add_line (state, ddata, address, filename, lineno,
++                      line_buf->error_callback, line_buf->data, vec);
++            break;
++          case DW_LNS_advance_pc:
++            {
++              uint64_t advance;
++
++              advance = read_uleb128 (line_buf);
++              address += (hdr->min_insn_len * (op_index + advance)
++                          / hdr->max_ops_per_insn);
++              op_index = (op_index + advance) % hdr->max_ops_per_insn;
++            }
++            break;
++          case DW_LNS_advance_line:
++            lineno += (int) read_sleb128 (line_buf);
++            break;
++          case DW_LNS_set_file:
++            {
++              uint64_t fileno;
++
++              fileno = read_uleb128 (line_buf);
++              if (fileno == 0)
++                filename = "";
++              else
++                {
++                  if (fileno - 1 >= hdr->filenames_count)
++                    {
++                      dwarf_buf_error (line_buf,
++                                       ("invalid file number in "
++                                        "line number program"));
++                      return 0;
++                    }
++                  filename = hdr->filenames[fileno - 1];
++                }
++            }
++            break;
++          case DW_LNS_set_column:
++            read_uleb128 (line_buf);
++            break;
++          case DW_LNS_negate_stmt:
++            break;
++          case DW_LNS_set_basic_block:
++            break;
++          case DW_LNS_const_add_pc:
++            {
++              unsigned int advance;
++
++              op = 255 - hdr->opcode_base;
++              advance = op / hdr->line_range;
++              address += (hdr->min_insn_len * (op_index + advance)
++                          / hdr->max_ops_per_insn);
++              op_index = (op_index + advance) % hdr->max_ops_per_insn;
++            }
++            break;
++          case DW_LNS_fixed_advance_pc:
++            address += read_uint16 (line_buf);
++            op_index = 0;
++            break;
++          case DW_LNS_set_prologue_end:
++            break;
++          case DW_LNS_set_epilogue_begin:
++            break;
++          case DW_LNS_set_isa:
++            read_uleb128 (line_buf);
++            break;
++          default:
++            {
++              unsigned int i;
++
++              for (i = hdr->opcode_lengths[op - 1]; i > 0; --i)
++                read_uleb128 (line_buf);
++            }
++            break;
++          }
++      }
++    }
++
++  return 1;
++}
++
++/* Read the line number information for a compilation unit.  Returns 1
++   on success, 0 on failure.  */
++
++static int
++read_line_info (struct backtrace_state *state, struct dwarf_data *ddata,
++              backtrace_error_callback error_callback, void *data,
++              struct unit *u, struct line_header *hdr, struct line **lines,
++              size_t *lines_count)
++{
++  struct line_vector vec;
++  struct dwarf_buf line_buf;
++  uint64_t len;
++  int is_dwarf64;
++  struct line *ln;
++
++  memset (&vec.vec, 0, sizeof vec.vec);
++  vec.count = 0;
++
++  memset (hdr, 0, sizeof *hdr);
++
++  if (u->lineoff != (off_t) (size_t) u->lineoff
++      || (size_t) u->lineoff >= ddata->dwarf_line_size)
++    {
++      error_callback (data, "unit line offset out of range", 0);
++      goto fail;
++    }
++
++  line_buf.name = ".debug_line";
++  line_buf.start = ddata->dwarf_line;
++  line_buf.buf = ddata->dwarf_line + u->lineoff;
++  line_buf.left = ddata->dwarf_line_size - u->lineoff;
++  line_buf.is_bigendian = ddata->is_bigendian;
++  line_buf.error_callback = error_callback;
++  line_buf.data = data;
++  line_buf.reported_underflow = 0;
++
++  is_dwarf64 = 0;
++  len = read_uint32 (&line_buf);
++  if (len == 0xffffffff)
++    {
++      len = read_uint64 (&line_buf);
++      is_dwarf64 = 1;
++    }
++  line_buf.left = len;
++
++  if (!read_line_header (state, u, is_dwarf64, &line_buf, hdr))
++    goto fail;
++
++  if (!read_line_program (state, ddata, u, hdr, &line_buf, &vec))
++    goto fail;
++
++  if (line_buf.reported_underflow)
++    goto fail;
++
++  if (vec.count == 0)
++    {
++      /* This is not a failure in the sense of a generating an error,
++       but it is a failure in that sense that we have no useful
++       information.  */
++      goto fail;
++    }
++
++  /* Allocate one extra entry at the end.  */
++  ln = ((struct line *)
++      backtrace_vector_grow (state, sizeof (struct line), error_callback,
++                             data, &vec.vec));
++  if (ln == NULL)
++    goto fail;
++  ln->pc = (uintptr_t) -1;
++  ln->filename = NULL;
++  ln->lineno = 0;
++  ln->idx = 0;
++
++  if (!backtrace_vector_release (state, &vec.vec, error_callback, data))
++    goto fail;
++
++  ln = (struct line *) vec.vec.base;
++  backtrace_qsort (ln, vec.count, sizeof (struct line), line_compare);
++
++  *lines = ln;
++  *lines_count = vec.count;
++
++  return 1;
++
++ fail:
++  vec.vec.alc += vec.vec.size;
++  vec.vec.size = 0;
++  backtrace_vector_release (state, &vec.vec, error_callback, data);
++  free_line_header (state, hdr, error_callback, data);
++  *lines = (struct line *) (uintptr_t) -1;
++  *lines_count = 0;
++  return 0;
++}
++
++/* Read the name of a function from a DIE referenced by a
++   DW_AT_abstract_origin or DW_AT_specification tag.  OFFSET is within
++   the same compilation unit.  */
++
++static const char *
++read_referenced_name (struct dwarf_data *ddata, struct unit *u,
++                    uint64_t offset, backtrace_error_callback error_callback,
++                    void *data)
++{
++  struct dwarf_buf unit_buf;
++  uint64_t code;
++  const struct abbrev *abbrev;
++  const char *ret;
++  size_t i;
++
++  /* OFFSET is from the start of the data for this compilation unit.
++     U->unit_data is the data, but it starts U->unit_data_offset bytes
++     from the beginning.  */
++
++  if (offset < u->unit_data_offset
++      || offset - u->unit_data_offset >= u->unit_data_len)
++    {
++      error_callback (data,
++                    "abstract origin or specification out of range",
++                    0);
++      return NULL;
++    }
++
++  offset -= u->unit_data_offset;
++
++  unit_buf.name = ".debug_info";
++  unit_buf.start = ddata->dwarf_info;
++  unit_buf.buf = u->unit_data + offset;
++  unit_buf.left = u->unit_data_len - offset;
++  unit_buf.is_bigendian = ddata->is_bigendian;
++  unit_buf.error_callback = error_callback;
++  unit_buf.data = data;
++  unit_buf.reported_underflow = 0;
++
++  code = read_uleb128 (&unit_buf);
++  if (code == 0)
++    {
++      dwarf_buf_error (&unit_buf, "invalid abstract origin or specification");
++      return NULL;
++    }
++
++  abbrev = lookup_abbrev (&u->abbrevs, code, error_callback, data);
++  if (abbrev == NULL)
++    return NULL;
++
++  ret = NULL;
++  for (i = 0; i < abbrev->num_attrs; ++i)
++    {
++      struct attr_val val;
++
++      if (!read_attribute (abbrev->attrs[i].form, &unit_buf,
++                         u->is_dwarf64, u->version, u->addrsize,
++                         ddata->dwarf_str, ddata->dwarf_str_size,
++                         &val))
++      return NULL;
++
++      switch (abbrev->attrs[i].name)
++      {
++      case DW_AT_name:
++        /* We prefer the linkage name if get one.  */
++        if (val.encoding == ATTR_VAL_STRING)
++          ret = val.u.string;
++        break;
++
++      case DW_AT_linkage_name:
++      case DW_AT_MIPS_linkage_name:
++        if (val.encoding == ATTR_VAL_STRING)
++          return val.u.string;
++        break;
++
++      case DW_AT_specification:
++        if (abbrev->attrs[i].form == DW_FORM_ref_addr
++            || abbrev->attrs[i].form == DW_FORM_ref_sig8)
++          {
++            /* This refers to a specification defined in some other
++               compilation unit.  We can handle this case if we
++               must, but it's harder.  */
++            break;
++          }
++        if (val.encoding == ATTR_VAL_UINT
++            || val.encoding == ATTR_VAL_REF_UNIT)
++          {
++            const char *name;
++
++            name = read_referenced_name (ddata, u, val.u.uint,
++                                         error_callback, data);
++            if (name != NULL)
++              ret = name;
++          }
++        break;
++
++      default:
++        break;
++      }
++    }
++
++  return ret;
++}
++
++/* Add a single range to U that maps to function.  Returns 1 on
++   success, 0 on error.  */
++
++static int
++add_function_range (struct backtrace_state *state, struct dwarf_data *ddata,
++                  struct function *function, uint64_t lowpc, uint64_t highpc,
++                  backtrace_error_callback error_callback,
++                  void *data, struct function_vector *vec)
++{
++  struct function_addrs *p;
++
++  /* Add in the base address here, so that we can look up the PC
++     directly.  */
++  lowpc += ddata->base_address;
++  highpc += ddata->base_address;
++
++  if (vec->count > 0)
++    {
++      p = (struct function_addrs *) vec->vec.base + vec->count - 1;
++      if ((lowpc == p->high || lowpc == p->high + 1)
++        && function == p->function)
++      {
++        if (highpc > p->high)
++          p->high = highpc;
++        return 1;
++      }
++    }
++
++  p = ((struct function_addrs *)
++       backtrace_vector_grow (state, sizeof (struct function_addrs),
++                            error_callback, data, &vec->vec));
++  if (p == NULL)
++    return 0;
++
++  p->low = lowpc;
++  p->high = highpc;
++  p->function = function;
++  ++vec->count;
++  return 1;
++}
++
++/* Add PC ranges to U that map to FUNCTION.  Returns 1 on success, 0
++   on error.  */
++
++static int
++add_function_ranges (struct backtrace_state *state, struct dwarf_data *ddata,
++                   struct unit *u, struct function *function,
++                   uint64_t ranges, uint64_t base,
++                   backtrace_error_callback error_callback, void *data,
++                   struct function_vector *vec)
++{
++  struct dwarf_buf ranges_buf;
++
++  if (ranges >= ddata->dwarf_ranges_size)
++    {
++      error_callback (data, "function ranges offset out of range", 0);
++      return 0;
++    }
++
++  ranges_buf.name = ".debug_ranges";
++  ranges_buf.start = ddata->dwarf_ranges;
++  ranges_buf.buf = ddata->dwarf_ranges + ranges;
++  ranges_buf.left = ddata->dwarf_ranges_size - ranges;
++  ranges_buf.is_bigendian = ddata->is_bigendian;
++  ranges_buf.error_callback = error_callback;
++  ranges_buf.data = data;
++  ranges_buf.reported_underflow = 0;
++
++  while (1)
++    {
++      uint64_t low;
++      uint64_t high;
++
++      if (ranges_buf.reported_underflow)
++      return 0;
++
++      low = read_address (&ranges_buf, u->addrsize);
++      high = read_address (&ranges_buf, u->addrsize);
++
++      if (low == 0 && high == 0)
++      break;
++
++      if (is_highest_address (low, u->addrsize))
++      base = high;
++      else
++      {
++        if (!add_function_range (state, ddata, function, low + base,
++                                 high + base, error_callback, data, vec))
++          return 0;
++      }
++    }
++
++  if (ranges_buf.reported_underflow)
++    return 0;
++
++  return 1;
++}
++
++/* Read one entry plus all its children.  Add function addresses to
++   VEC.  Returns 1 on success, 0 on error.  */
++
++static int
++read_function_entry (struct backtrace_state *state, struct dwarf_data *ddata,
++                   struct unit *u, uint64_t base, struct dwarf_buf *unit_buf,
++                   const struct line_header *lhdr,
++                   backtrace_error_callback error_callback, void *data,
++                   struct function_vector *vec_function,
++                   struct function_vector *vec_inlined)
++{
++  while (unit_buf->left > 0)
++    {
++      uint64_t code;
++      const struct abbrev *abbrev;
++      int is_function;
++      struct function *function;
++      struct function_vector *vec;
++      size_t i;
++      uint64_t lowpc;
++      int have_lowpc;
++      uint64_t highpc;
++      int have_highpc;
++      int highpc_is_relative;
++      uint64_t ranges;
++      int have_ranges;
++
++      code = read_uleb128 (unit_buf);
++      if (code == 0)
++      return 1;
++
++      abbrev = lookup_abbrev (&u->abbrevs, code, error_callback, data);
++      if (abbrev == NULL)
++      return 0;
++
++      is_function = (abbrev->tag == DW_TAG_subprogram
++                   || abbrev->tag == DW_TAG_entry_point
++                   || abbrev->tag == DW_TAG_inlined_subroutine);
++
++      if (abbrev->tag == DW_TAG_inlined_subroutine)
++      vec = vec_inlined;
++      else
++      vec = vec_function;
++
++      function = NULL;
++      if (is_function)
++      {
++        function = ((struct function *)
++                    backtrace_alloc (state, sizeof *function,
++                                     error_callback, data));
++        if (function == NULL)
++          return 0;
++        memset (function, 0, sizeof *function);
++      }
++
++      lowpc = 0;
++      have_lowpc = 0;
++      highpc = 0;
++      have_highpc = 0;
++      highpc_is_relative = 0;
++      ranges = 0;
++      have_ranges = 0;
++      for (i = 0; i < abbrev->num_attrs; ++i)
++      {
++        struct attr_val val;
++
++        if (!read_attribute (abbrev->attrs[i].form, unit_buf,
++                             u->is_dwarf64, u->version, u->addrsize,
++                             ddata->dwarf_str, ddata->dwarf_str_size,
++                             &val))
++          return 0;
++
++        /* The compile unit sets the base address for any address
++           ranges in the function entries.  */
++        if (abbrev->tag == DW_TAG_compile_unit
++            && abbrev->attrs[i].name == DW_AT_low_pc
++            && val.encoding == ATTR_VAL_ADDRESS)
++          base = val.u.uint;
++
++        if (is_function)
++          {
++            switch (abbrev->attrs[i].name)
++              {
++              case DW_AT_call_file:
++                if (val.encoding == ATTR_VAL_UINT)
++                  {
++                    if (val.u.uint == 0)
++                      function->caller_filename = "";
++                    else
++                      {
++                        if (val.u.uint - 1 >= lhdr->filenames_count)
++                          {
++                            dwarf_buf_error (unit_buf,
++                                             ("invalid file number in "
++                                              "DW_AT_call_file attribute"));
++                            return 0;
++                          }
++                        function->caller_filename =
++                          lhdr->filenames[val.u.uint - 1];
++                      }
++                  }
++                break;
++
++              case DW_AT_call_line:
++                if (val.encoding == ATTR_VAL_UINT)
++                  function->caller_lineno = val.u.uint;
++                break;
++
++              case DW_AT_abstract_origin:
++              case DW_AT_specification:
++                if (abbrev->attrs[i].form == DW_FORM_ref_addr
++                    || abbrev->attrs[i].form == DW_FORM_ref_sig8)
++                  {
++                    /* This refers to an abstract origin defined in
++                       some other compilation unit.  We can handle
++                       this case if we must, but it's harder.  */
++                    break;
++                  }
++                if (val.encoding == ATTR_VAL_UINT
++                    || val.encoding == ATTR_VAL_REF_UNIT)
++                  {
++                    const char *name;
++
++                    name = read_referenced_name (ddata, u, val.u.uint,
++                                                 error_callback, data);
++                    if (name != NULL)
++                      function->name = name;
++                  }
++                break;
++
++              case DW_AT_name:
++                if (val.encoding == ATTR_VAL_STRING)
++                  {
++                    /* Don't override a name we found in some other
++                       way, as it will normally be more
++                       useful--e.g., this name is normally not
++                       mangled.  */
++                    if (function->name == NULL)
++                      function->name = val.u.string;
++                  }
++                break;
++
++              case DW_AT_linkage_name:
++              case DW_AT_MIPS_linkage_name:
++                if (val.encoding == ATTR_VAL_STRING)
++                  function->name = val.u.string;
++                break;
++
++              case DW_AT_low_pc:
++                if (val.encoding == ATTR_VAL_ADDRESS)
++                  {
++                    lowpc = val.u.uint;
++                    have_lowpc = 1;
++                  }
++                break;
++
++              case DW_AT_high_pc:
++                if (val.encoding == ATTR_VAL_ADDRESS)
++                  {
++                    highpc = val.u.uint;
++                    have_highpc = 1;
++                  }
++                else if (val.encoding == ATTR_VAL_UINT)
++                  {
++                    highpc = val.u.uint;
++                    have_highpc = 1;
++                    highpc_is_relative = 1;
++                  }
++                break;
++
++              case DW_AT_ranges:
++                if (val.encoding == ATTR_VAL_UINT
++                    || val.encoding == ATTR_VAL_REF_SECTION)
++                  {
++                    ranges = val.u.uint;
++                    have_ranges = 1;
++                  }
++                break;
++
++              default:
++                break;
++              }
++          }
++      }
++
++      /* If we couldn't find a name for the function, we have no use
++       for it.  */
++      if (is_function && function->name == NULL)
++      {
++        backtrace_free (state, function, sizeof *function,
++                        error_callback, data);
++        is_function = 0;
++      }
++
++      if (is_function)
++      {
++        if (have_ranges)
++          {
++            if (!add_function_ranges (state, ddata, u, function, ranges,
++                                      base, error_callback, data, vec))
++              return 0;
++          }
++        else if (have_lowpc && have_highpc)
++          {
++            if (highpc_is_relative)
++              highpc += lowpc;
++            if (!add_function_range (state, ddata, function, lowpc, highpc,
++                                     error_callback, data, vec))
++              return 0;
++          }
++        else
++          {
++            backtrace_free (state, function, sizeof *function,
++                            error_callback, data);
++            is_function = 0;
++          }
++      }
++
++      if (abbrev->has_children)
++      {
++        if (!is_function)
++          {
++            if (!read_function_entry (state, ddata, u, base, unit_buf, lhdr,
++                                      error_callback, data, vec_function,
++                                      vec_inlined))
++              return 0;
++          }
++        else
++          {
++            struct function_vector fvec;
++
++            /* Gather any information for inlined functions in
++               FVEC.  */
++
++            memset (&fvec, 0, sizeof fvec);
++
++            if (!read_function_entry (state, ddata, u, base, unit_buf, lhdr,
++                                      error_callback, data, vec_function,
++                                      &fvec))
++              return 0;
++
++            if (fvec.count > 0)
++              {
++                struct function_addrs *faddrs;
++
++                if (!backtrace_vector_release (state, &fvec.vec,
++                                               error_callback, data))
++                  return 0;
++
++                faddrs = (struct function_addrs *) fvec.vec.base;
++                backtrace_qsort (faddrs, fvec.count,
++                                 sizeof (struct function_addrs),
++                                 function_addrs_compare);
++
++                function->function_addrs = faddrs;
++                function->function_addrs_count = fvec.count;
++              }
++          }
++      }
++    }
++
++  return 1;
++}
++
++/* Read function name information for a compilation unit.  We look
++   through the whole unit looking for function tags.  */
++
++static void
++read_function_info (struct backtrace_state *state, struct dwarf_data *ddata,
++                  const struct line_header *lhdr,
++                  backtrace_error_callback error_callback, void *data,
++                  struct unit *u, struct function_vector *fvec,
++                  struct function_addrs **ret_addrs,
++                  size_t *ret_addrs_count)
++{
++  struct function_vector lvec;
++  struct function_vector *pfvec;
++  struct dwarf_buf unit_buf;
++  struct function_addrs *addrs;
++  size_t addrs_count;
++
++  /* Use FVEC if it is not NULL.  Otherwise use our own vector.  */
++  if (fvec != NULL)
++    pfvec = fvec;
++  else
++    {
++      memset (&lvec, 0, sizeof lvec);
++      pfvec = &lvec;
++    }
++
++  unit_buf.name = ".debug_info";
++  unit_buf.start = ddata->dwarf_info;
++  unit_buf.buf = u->unit_data;
++  unit_buf.left = u->unit_data_len;
++  unit_buf.is_bigendian = ddata->is_bigendian;
++  unit_buf.error_callback = error_callback;
++  unit_buf.data = data;
++  unit_buf.reported_underflow = 0;
++
++  while (unit_buf.left > 0)
++    {
++      if (!read_function_entry (state, ddata, u, 0, &unit_buf, lhdr,
++                              error_callback, data, pfvec, pfvec))
++      return;
++    }
++
++  if (pfvec->count == 0)
++    return;
++
++  addrs_count = pfvec->count;
++
++  if (fvec == NULL)
++    {
++      if (!backtrace_vector_release (state, &lvec.vec, error_callback, data))
++      return;
++      addrs = (struct function_addrs *) pfvec->vec.base;
++    }
++  else
++    {
++      /* Finish this list of addresses, but leave the remaining space in
++       the vector available for the next function unit.  */
++      addrs = ((struct function_addrs *)
++             backtrace_vector_finish (state, &fvec->vec,
++                                      error_callback, data));
++      if (addrs == NULL)
++      return;
++      fvec->count = 0;
++    }
++
++  backtrace_qsort (addrs, addrs_count, sizeof (struct function_addrs),
++                 function_addrs_compare);
++
++  *ret_addrs = addrs;
++  *ret_addrs_count = addrs_count;
++}
++
++/* See if PC is inlined in FUNCTION.  If it is, print out the inlined
++   information, and update FILENAME and LINENO for the caller.
++   Returns whatever CALLBACK returns, or 0 to keep going.  */
++
++static int
++report_inlined_functions (uintptr_t pc, struct function *function,
++                        backtrace_full_callback callback, void *data,
++                        const char **filename, int *lineno)
++{
++  struct function_addrs *function_addrs;
++  struct function *inlined;
++  int ret;
++
++  if (function->function_addrs_count == 0)
++    return 0;
++
++  function_addrs = ((struct function_addrs *)
++                  bsearch (&pc, function->function_addrs,
++                           function->function_addrs_count,
++                           sizeof (struct function_addrs),
++                           function_addrs_search));
++  if (function_addrs == NULL)
++    return 0;
++
++  while (((size_t) (function_addrs - function->function_addrs) + 1
++        < function->function_addrs_count)
++       && pc >= (function_addrs + 1)->low
++       && pc < (function_addrs + 1)->high)
++    ++function_addrs;
++
++  /* We found an inlined call.  */
++
++  inlined = function_addrs->function;
++
++  /* Report any calls inlined into this one.  */
++  ret = report_inlined_functions (pc, inlined, callback, data,
++                                filename, lineno);
++  if (ret != 0)
++    return ret;
++
++  /* Report this inlined call.  */
++  ret = callback (data, pc, *filename, *lineno, inlined->name);
++  if (ret != 0)
++    return ret;
++
++  /* Our caller will report the caller of the inlined function; tell
++     it the appropriate filename and line number.  */
++  *filename = inlined->caller_filename;
++  *lineno = inlined->caller_lineno;
++
++  return 0;
++}
++
++/* Look for a PC in the DWARF mapping for one module.  On success,
++   call CALLBACK and return whatever it returns.  On error, call
++   ERROR_CALLBACK and return 0.  Sets *FOUND to 1 if the PC is found,
++   0 if not.  */
++
++static int
++dwarf_lookup_pc (struct backtrace_state *state, struct dwarf_data *ddata,
++               uintptr_t pc, backtrace_full_callback callback,
++               backtrace_error_callback error_callback, void *data,
++               int *found)
++{
++  struct unit_addrs *entry;
++  struct unit *u;
++  int new_data;
++  struct line *lines;
++  struct line *ln;
++  struct function_addrs *function_addrs;
++  struct function *function;
++  const char *filename;
++  int lineno;
++  int ret;
++
++  *found = 1;
++
++  /* Find an address range that includes PC.  */
++  entry = bsearch (&pc, ddata->addrs, ddata->addrs_count,
++                 sizeof (struct unit_addrs), unit_addrs_search);
++
++  if (entry == NULL)
++    {
++      *found = 0;
++      return 0;
++    }
++
++  /* If there are multiple ranges that contain PC, use the last one,
++     in order to produce predictable results.  If we assume that all
++     ranges are properly nested, then the last range will be the
++     smallest one.  */
++  while ((size_t) (entry - ddata->addrs) + 1 < ddata->addrs_count
++       && pc >= (entry + 1)->low
++       && pc < (entry + 1)->high)
++    ++entry;
++
++  /* We need the lines, lines_count, function_addrs,
++     function_addrs_count fields of u.  If they are not set, we need
++     to set them.  When running in threaded mode, we need to allow for
++     the possibility that some other thread is setting them
++     simultaneously.  */
++
++  u = entry->u;
++  lines = u->lines;
++
++  /* Skip units with no useful line number information by walking
++     backward.  Useless line number information is marked by setting
++     lines == -1.  */
++  while (entry > ddata->addrs
++       && pc >= (entry - 1)->low
++       && pc < (entry - 1)->high)
++    {
++      if (state->threaded)
++      lines = (struct line *) backtrace_atomic_load_pointer (&u->lines);
++
++      if (lines != (struct line *) (uintptr_t) -1)
++      break;
++
++      --entry;
++
++      u = entry->u;
++      lines = u->lines;
++    }
++
++  if (state->threaded)
++    lines = backtrace_atomic_load_pointer (&u->lines);
++
++  new_data = 0;
++  if (lines == NULL)
++    {
++      size_t function_addrs_count;
++      struct line_header lhdr;
++      size_t count;
++
++      /* We have never read the line information for this unit.  Read
++       it now.  */
++
++      function_addrs = NULL;
++      function_addrs_count = 0;
++      if (read_line_info (state, ddata, error_callback, data, entry->u, &lhdr,
++                        &lines, &count))
++      {
++        struct function_vector *pfvec;
++
++        /* If not threaded, reuse DDATA->FVEC for better memory
++           consumption.  */
++        if (state->threaded)
++          pfvec = NULL;
++        else
++          pfvec = &ddata->fvec;
++        read_function_info (state, ddata, &lhdr, error_callback, data,
++                            entry->u, pfvec, &function_addrs,
++                            &function_addrs_count);
++        free_line_header (state, &lhdr, error_callback, data);
++        new_data = 1;
++      }
++
++      /* Atomically store the information we just read into the unit.
++       If another thread is simultaneously writing, it presumably
++       read the same information, and we don't care which one we
++       wind up with; we just leak the other one.  We do have to
++       write the lines field last, so that the acquire-loads above
++       ensure that the other fields are set.  */
++
++      if (!state->threaded)
++      {
++        u->lines_count = count;
++        u->function_addrs = function_addrs;
++        u->function_addrs_count = function_addrs_count;
++        u->lines = lines;
++      }
++      else
++      {
++        backtrace_atomic_store_size_t (&u->lines_count, count);
++        backtrace_atomic_store_pointer (&u->function_addrs, function_addrs);
++        backtrace_atomic_store_size_t (&u->function_addrs_count,
++                                       function_addrs_count);
++        backtrace_atomic_store_pointer (&u->lines, lines);
++      }
++    }
++
++  /* Now all fields of U have been initialized.  */
++
++  if (lines == (struct line *) (uintptr_t) -1)
++    {
++      /* If reading the line number information failed in some way,
++       try again to see if there is a better compilation unit for
++       this PC.  */
++      if (new_data)
++      return dwarf_lookup_pc (state, ddata, pc, callback, error_callback,
++                              data, found);
++      return callback (data, pc, NULL, 0, NULL);
++    }
++
++  /* Search for PC within this unit.  */
++
++  ln = (struct line *) bsearch (&pc, lines, entry->u->lines_count,
++                              sizeof (struct line), line_search);
++  if (ln == NULL)
++    {
++      /* The PC is between the low_pc and high_pc attributes of the
++       compilation unit, but no entry in the line table covers it.
++       This implies that the start of the compilation unit has no
++       line number information.  */
++
++      if (entry->u->abs_filename == NULL)
++      {
++        const char *filename;
++
++        filename = entry->u->filename;
++        if (filename != NULL
++            && !IS_ABSOLUTE_PATH (filename)
++            && entry->u->comp_dir != NULL)
++          {
++            size_t filename_len;
++            const char *dir;
++            size_t dir_len;
++            char *s;
++
++            filename_len = strlen (filename);
++            dir = entry->u->comp_dir;
++            dir_len = strlen (dir);
++            s = (char *) backtrace_alloc (state, dir_len + filename_len + 2,
++                                          error_callback, data);
++            if (s == NULL)
++              {
++                *found = 0;
++                return 0;
++              }
++            memcpy (s, dir, dir_len);
++            /* FIXME: Should use backslash if DOS file system.  */
++            s[dir_len] = '/';
++            memcpy (s + dir_len + 1, filename, filename_len + 1);
++            filename = s;
++          }
++        entry->u->abs_filename = filename;
++      }
++
++      return callback (data, pc, entry->u->abs_filename, 0, NULL);
++    }
++
++  /* Search for function name within this unit.  */
++
++  if (entry->u->function_addrs_count == 0)
++    return callback (data, pc, ln->filename, ln->lineno, NULL);
++
++  function_addrs = ((struct function_addrs *)
++                  bsearch (&pc, entry->u->function_addrs,
++                           entry->u->function_addrs_count,
++                           sizeof (struct function_addrs),
++                           function_addrs_search));
++  if (function_addrs == NULL)
++    return callback (data, pc, ln->filename, ln->lineno, NULL);
++
++  /* If there are multiple function ranges that contain PC, use the
++     last one, in order to produce predictable results.  */
++
++  while (((size_t) (function_addrs - entry->u->function_addrs + 1)
++        < entry->u->function_addrs_count)
++       && pc >= (function_addrs + 1)->low
++       && pc < (function_addrs + 1)->high)
++    ++function_addrs;
++
++  function = function_addrs->function;
++
++  filename = ln->filename;
++  lineno = ln->lineno;
++
++  ret = report_inlined_functions (pc, function, callback, data,
++                                &filename, &lineno);
++  if (ret != 0)
++    return ret;
++
++  return callback (data, pc, filename, lineno, function->name);
++}
++
++
++/* Return the file/line information for a PC using the DWARF mapping
++   we built earlier.  */
++
++static int
++dwarf_fileline (struct backtrace_state *state, uintptr_t pc,
++              backtrace_full_callback callback,
++              backtrace_error_callback error_callback, void *data)
++{
++  struct dwarf_data *ddata;
++  int found;
++  int ret;
++
++  if (!state->threaded)
++    {
++      for (ddata = (struct dwarf_data *) state->fileline_data;
++         ddata != NULL;
++         ddata = ddata->next)
++      {
++        ret = dwarf_lookup_pc (state, ddata, pc, callback, error_callback,
++                               data, &found);
++        if (ret != 0 || found)
++          return ret;
++      }
++    }
++  else
++    {
++      struct dwarf_data **pp;
++
++      pp = (struct dwarf_data **) (void *) &state->fileline_data;
++      while (1)
++      {
++        ddata = backtrace_atomic_load_pointer (pp);
++        if (ddata == NULL)
++          break;
++
++        ret = dwarf_lookup_pc (state, ddata, pc, callback, error_callback,
++                               data, &found);
++        if (ret != 0 || found)
++          return ret;
++
++        pp = &ddata->next;
++      }
++    }
++
++  /* FIXME: See if any libraries have been dlopen'ed.  */
++
++  return callback (data, pc, NULL, 0, NULL);
++}
++
++/* Initialize our data structures from the DWARF debug info for a
++   file.  Return NULL on failure.  */
++
++static struct dwarf_data *
++build_dwarf_data (struct backtrace_state *state,
++                uintptr_t base_address,
++                const unsigned char *dwarf_info,
++                size_t dwarf_info_size,
++                const unsigned char *dwarf_line,
++                size_t dwarf_line_size,
++                const unsigned char *dwarf_abbrev,
++                size_t dwarf_abbrev_size,
++                const unsigned char *dwarf_ranges,
++                size_t dwarf_ranges_size,
++                const unsigned char *dwarf_str,
++                size_t dwarf_str_size,
++                int is_bigendian,
++                backtrace_error_callback error_callback,
++                void *data)
++{
++  struct unit_addrs_vector addrs_vec;
++  struct unit_addrs *addrs;
++  size_t addrs_count;
++  struct dwarf_data *fdata;
++
++  if (!build_address_map (state, base_address, dwarf_info, dwarf_info_size,
++                        dwarf_abbrev, dwarf_abbrev_size, dwarf_ranges,
++                        dwarf_ranges_size, dwarf_str, dwarf_str_size,
++                        is_bigendian, error_callback, data, &addrs_vec))
++    return NULL;
++
++  if (!backtrace_vector_release (state, &addrs_vec.vec, error_callback, data))
++    return NULL;
++  addrs = (struct unit_addrs *) addrs_vec.vec.base;
++  addrs_count = addrs_vec.count;
++  backtrace_qsort (addrs, addrs_count, sizeof (struct unit_addrs),
++                 unit_addrs_compare);
++
++  fdata = ((struct dwarf_data *)
++         backtrace_alloc (state, sizeof (struct dwarf_data),
++                          error_callback, data));
++  if (fdata == NULL)
++    return NULL;
++
++  fdata->next = NULL;
++  fdata->base_address = base_address;
++  fdata->addrs = addrs;
++  fdata->addrs_count = addrs_count;
++  fdata->dwarf_info = dwarf_info;
++  fdata->dwarf_info_size = dwarf_info_size;
++  fdata->dwarf_line = dwarf_line;
++  fdata->dwarf_line_size = dwarf_line_size;
++  fdata->dwarf_ranges = dwarf_ranges;
++  fdata->dwarf_ranges_size = dwarf_ranges_size;
++  fdata->dwarf_str = dwarf_str;
++  fdata->dwarf_str_size = dwarf_str_size;
++  fdata->is_bigendian = is_bigendian;
++  memset (&fdata->fvec, 0, sizeof fdata->fvec);
++
++  return fdata;
++}
++
++/* Build our data structures from the DWARF sections for a module.
++   Set FILELINE_FN and STATE->FILELINE_DATA.  Return 1 on success, 0
++   on failure.  */
++
++int
++backtrace_dwarf_add (struct backtrace_state *state,
++                   uintptr_t base_address,
++                   const unsigned char *dwarf_info,
++                   size_t dwarf_info_size,
++                   const unsigned char *dwarf_line,
++                   size_t dwarf_line_size,
++                   const unsigned char *dwarf_abbrev,
++                   size_t dwarf_abbrev_size,
++                   const unsigned char *dwarf_ranges,
++                   size_t dwarf_ranges_size,
++                   const unsigned char *dwarf_str,
++                   size_t dwarf_str_size,
++                   int is_bigendian,
++                   backtrace_error_callback error_callback,
++                   void *data, fileline *fileline_fn)
++{
++  struct dwarf_data *fdata;
++
++  fdata = build_dwarf_data (state, base_address, dwarf_info, dwarf_info_size,
++                          dwarf_line, dwarf_line_size, dwarf_abbrev,
++                          dwarf_abbrev_size, dwarf_ranges, dwarf_ranges_size,
++                          dwarf_str, dwarf_str_size, is_bigendian,
++                          error_callback, data);
++  if (fdata == NULL)
++    return 0;
++
++  if (!state->threaded)
++    {
++      struct dwarf_data **pp;
++
++      for (pp = (struct dwarf_data **) (void *) &state->fileline_data;
++         *pp != NULL;
++         pp = &(*pp)->next)
++      ;
++      *pp = fdata;
++    }
++  else
++    {
++      while (1)
++      {
++        struct dwarf_data **pp;
++
++        pp = (struct dwarf_data **) (void *) &state->fileline_data;
++
++        while (1)
++          {
++            struct dwarf_data *p;
++
++            p = backtrace_atomic_load_pointer (pp);
++
++            if (p == NULL)
++              break;
++
++            pp = &p->next;
++          }
++
++        if (__sync_bool_compare_and_swap (pp, NULL, fdata))
++          break;
++      }
++    }
++
++  *fileline_fn = dwarf_fileline;
++
++  return 1;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bb916ca238221151cf49359c25fd92643c7e60af
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,773 @@@
++/* -*- c -*-
++   Declarations and definitions of codes relating to the DWARF2 and
++   DWARF3 symbolic debugging information formats.
++   Copyright (C) 1992-2015 Free Software Foundation, Inc.
++
++   Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
++   Office (AJPO), Florida State University and Silicon Graphics Inc.
++   provided support for this effort -- June 21, 1995.
++
++   Derived from the DWARF 1 implementation written by Ron Guilmette
++   (rfg@netcom.com), November 1990.
++
++   This file is part of GCC.
++
++   GCC is free software; you can redistribute it and/or modify it under
++   the terms of the GNU General Public License as published by the Free
++   Software Foundation; either version 3, or (at your option) any later
++   version.
++
++   GCC is distributed in the hope that it will be useful, but WITHOUT
++   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
++   License for more details.
++
++   Under Section 7 of GPL version 3, you are granted additional
++   permissions described in the GCC Runtime Library Exception, version
++   3.1, as published by the Free Software Foundation.
++
++   You should have received a copy of the GNU General Public License and
++   a copy of the GCC Runtime Library Exception along with this program;
++   see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
++   <http://www.gnu.org/licenses/>.  */
++
++/* This file is derived from the DWARF specification (a public document)
++   Revision 2.0.0 (July 27, 1993) developed by the UNIX International
++   Programming Languages Special Interest Group (UI/PLSIG) and distributed
++   by UNIX International.  Copies of this specification are available from
++   UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054.
++
++   This file also now contains definitions from the DWARF 3 specification
++   published Dec 20, 2005, available from: http://dwarf.freestandards.org.
++
++   This file also now contains definitions from the DWARF 4
++   specification, available from: http://dwarfstd.org/ */
++
++/* This file declares various DWARF-related constants using a set of
++   macros which can be redefined by the including file.
++   
++   The macros are in sections.  Each section corresponds to a single
++   set of DWARF constants and has a corresponding key.  The key is
++   used in all the macro names.
++   
++   The sections are TAG (for DW_TAG_ constants), FORM (DW_FORM_), AT
++   (DW_AT_), OP (DW_OP_), ATE (DW_ATE_), and CFA (DW_CFA_).
++   
++   Using TAG as an example, the following macros may be used for each
++   key:
++   
++   DW_FIRST_TAG(name, value) - Introduce the first DW_TAG constant.
++   
++   DW_TAG(name, value) - Define a subsequent constant.
++   
++   DW_TAG_DUP(name, value) - Define a subsequent constant whose value
++   is a duplicate of some other constant.  Not all keys use the _DUP
++   macro form.  If more than one name shares a value, then the base
++   (DW_TAG) form will be the preferred name and DW_TAG_DUP will hold
++   any alternate names.
++   
++   DW_END_TAG - Invoked at the end of the DW_TAG constants.  */
++
++DW_FIRST_TAG (DW_TAG_padding, 0x00)
++DW_TAG (DW_TAG_array_type, 0x01)
++DW_TAG (DW_TAG_class_type, 0x02)
++DW_TAG (DW_TAG_entry_point, 0x03)
++DW_TAG (DW_TAG_enumeration_type, 0x04)
++DW_TAG (DW_TAG_formal_parameter, 0x05)
++DW_TAG (DW_TAG_imported_declaration, 0x08)
++DW_TAG (DW_TAG_label, 0x0a)
++DW_TAG (DW_TAG_lexical_block, 0x0b)
++DW_TAG (DW_TAG_member, 0x0d)
++DW_TAG (DW_TAG_pointer_type, 0x0f)
++DW_TAG (DW_TAG_reference_type, 0x10)
++DW_TAG (DW_TAG_compile_unit, 0x11)
++DW_TAG (DW_TAG_string_type, 0x12)
++DW_TAG (DW_TAG_structure_type, 0x13)
++DW_TAG (DW_TAG_subroutine_type, 0x15)
++DW_TAG (DW_TAG_typedef, 0x16)
++DW_TAG (DW_TAG_union_type, 0x17)
++DW_TAG (DW_TAG_unspecified_parameters, 0x18)
++DW_TAG (DW_TAG_variant, 0x19)
++DW_TAG (DW_TAG_common_block, 0x1a)
++DW_TAG (DW_TAG_common_inclusion, 0x1b)
++DW_TAG (DW_TAG_inheritance, 0x1c)
++DW_TAG (DW_TAG_inlined_subroutine, 0x1d)
++DW_TAG (DW_TAG_module, 0x1e)
++DW_TAG (DW_TAG_ptr_to_member_type, 0x1f)
++DW_TAG (DW_TAG_set_type, 0x20)
++DW_TAG (DW_TAG_subrange_type, 0x21)
++DW_TAG (DW_TAG_with_stmt, 0x22)
++DW_TAG (DW_TAG_access_declaration, 0x23)
++DW_TAG (DW_TAG_base_type, 0x24)
++DW_TAG (DW_TAG_catch_block, 0x25)
++DW_TAG (DW_TAG_const_type, 0x26)
++DW_TAG (DW_TAG_constant, 0x27)
++DW_TAG (DW_TAG_enumerator, 0x28)
++DW_TAG (DW_TAG_file_type, 0x29)
++DW_TAG (DW_TAG_friend, 0x2a)
++DW_TAG (DW_TAG_namelist, 0x2b)
++DW_TAG (DW_TAG_namelist_item, 0x2c)
++DW_TAG (DW_TAG_packed_type, 0x2d)
++DW_TAG (DW_TAG_subprogram, 0x2e)
++DW_TAG (DW_TAG_template_type_param, 0x2f)
++DW_TAG (DW_TAG_template_value_param, 0x30)
++DW_TAG (DW_TAG_thrown_type, 0x31)
++DW_TAG (DW_TAG_try_block, 0x32)
++DW_TAG (DW_TAG_variant_part, 0x33)
++DW_TAG (DW_TAG_variable, 0x34)
++DW_TAG (DW_TAG_volatile_type, 0x35)
++/* DWARF 3.  */
++DW_TAG (DW_TAG_dwarf_procedure, 0x36)
++DW_TAG (DW_TAG_restrict_type, 0x37)
++DW_TAG (DW_TAG_interface_type, 0x38)
++DW_TAG (DW_TAG_namespace, 0x39)
++DW_TAG (DW_TAG_imported_module, 0x3a)
++DW_TAG (DW_TAG_unspecified_type, 0x3b)
++DW_TAG (DW_TAG_partial_unit, 0x3c)
++DW_TAG (DW_TAG_imported_unit, 0x3d)
++DW_TAG (DW_TAG_condition, 0x3f)
++DW_TAG (DW_TAG_shared_type, 0x40)
++/* DWARF 4.  */
++DW_TAG (DW_TAG_type_unit, 0x41)
++DW_TAG (DW_TAG_rvalue_reference_type, 0x42)
++DW_TAG (DW_TAG_template_alias, 0x43)
++/* DWARF 5.  */
++DW_TAG (DW_TAG_coarray_type, 0x44)
++DW_TAG (DW_TAG_generic_subrange, 0x45)
++DW_TAG (DW_TAG_dynamic_type, 0x46)
++DW_TAG (DW_TAG_atomic_type, 0x47)
++DW_TAG (DW_TAG_call_site, 0x48)
++DW_TAG (DW_TAG_call_site_parameter, 0x49)
++DW_TAG (DW_TAG_skeleton_unit, 0x4a)
++DW_TAG (DW_TAG_immutable_type, 0x4b)
++
++DW_TAG_DUP (DW_TAG_lo_user, 0x4080)
++DW_TAG_DUP (DW_TAG_hi_user, 0xffff)
++
++/* SGI/MIPS Extensions.  */
++DW_TAG (DW_TAG_MIPS_loop, 0x4081)
++
++/* HP extensions.  See: ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz .  */
++DW_TAG (DW_TAG_HP_array_descriptor, 0x4090)
++DW_TAG (DW_TAG_HP_Bliss_field, 0x4091)
++DW_TAG (DW_TAG_HP_Bliss_field_set, 0x4092)
++
++/* GNU extensions.  */
++DW_TAG (DW_TAG_format_label, 0x4101)  /* For FORTRAN 77 and Fortran 90.  */
++DW_TAG (DW_TAG_function_template, 0x4102)     /* For C++.  */
++DW_TAG (DW_TAG_class_template, 0x4103)        /* For C++.  */
++DW_TAG (DW_TAG_GNU_BINCL, 0x4104)
++DW_TAG (DW_TAG_GNU_EINCL, 0x4105)
++/* Template template parameter.
++   See http://gcc.gnu.org/wiki/TemplateParmsDwarf .  */
++DW_TAG (DW_TAG_GNU_template_template_param, 0x4106)
++
++/* Template parameter pack extension, specified at
++   http://wiki.dwarfstd.org/index.php?title=C%2B%2B0x:_Variadic_templates
++   The values of these two TAGS are in the DW_TAG_GNU_* space until the tags
++   are properly part of DWARF 5.  */
++DW_TAG (DW_TAG_GNU_template_parameter_pack, 0x4107)
++DW_TAG (DW_TAG_GNU_formal_parameter_pack, 0x4108)
++/* The GNU call site extension, specified at
++   http://www.dwarfstd.org/ShowIssue.php?issue=100909.2&type=open .
++   The values of these two TAGS are in the DW_TAG_GNU_* space until the tags
++   are properly part of DWARF 5.  */
++DW_TAG (DW_TAG_GNU_call_site, 0x4109)
++DW_TAG (DW_TAG_GNU_call_site_parameter, 0x410a)
++/* Extensions for UPC.  See: http://dwarfstd.org/doc/DWARF4.pdf.  */
++DW_TAG (DW_TAG_upc_shared_type, 0x8765)
++DW_TAG (DW_TAG_upc_strict_type, 0x8766)
++DW_TAG (DW_TAG_upc_relaxed_type, 0x8767)
++/* PGI (STMicroelectronics) extensions.  No documentation available.  */
++DW_TAG (DW_TAG_PGI_kanji_type, 0xA000)
++DW_TAG (DW_TAG_PGI_interface_block, 0xA020)
++DW_END_TAG
++
++DW_FIRST_FORM (DW_FORM_addr, 0x01)
++DW_FORM (DW_FORM_block2, 0x03)
++DW_FORM (DW_FORM_block4, 0x04)
++DW_FORM (DW_FORM_data2, 0x05)
++DW_FORM (DW_FORM_data4, 0x06)
++DW_FORM (DW_FORM_data8, 0x07)
++DW_FORM (DW_FORM_string, 0x08)
++DW_FORM (DW_FORM_block, 0x09)
++DW_FORM (DW_FORM_block1, 0x0a)
++DW_FORM (DW_FORM_data1, 0x0b)
++DW_FORM (DW_FORM_flag, 0x0c)
++DW_FORM (DW_FORM_sdata, 0x0d)
++DW_FORM (DW_FORM_strp, 0x0e)
++DW_FORM (DW_FORM_udata, 0x0f)
++DW_FORM (DW_FORM_ref_addr, 0x10)
++DW_FORM (DW_FORM_ref1, 0x11)
++DW_FORM (DW_FORM_ref2, 0x12)
++DW_FORM (DW_FORM_ref4, 0x13)
++DW_FORM (DW_FORM_ref8, 0x14)
++DW_FORM (DW_FORM_ref_udata, 0x15)
++DW_FORM (DW_FORM_indirect, 0x16)
++/* DWARF 4.  */
++DW_FORM (DW_FORM_sec_offset, 0x17)
++DW_FORM (DW_FORM_exprloc, 0x18)
++DW_FORM (DW_FORM_flag_present, 0x19)
++DW_FORM (DW_FORM_ref_sig8, 0x20)
++/* DWARF 5.  */
++DW_FORM (DW_FORM_strx, 0x1a)
++DW_FORM (DW_FORM_addrx, 0x1b)
++DW_FORM (DW_FORM_ref_sup, 0x1c)
++DW_FORM (DW_FORM_strp_sup, 0x1d)
++DW_FORM (DW_FORM_data16, 0x1e)
++DW_FORM (DW_FORM_line_strp, 0x1f)
++DW_FORM (DW_FORM_implicit_const, 0x21)
++DW_FORM (DW_FORM_loclistx, 0x22)
++DW_FORM (DW_FORM_rnglistx, 0x23)
++/* Extensions for Fission.  See http://gcc.gnu.org/wiki/DebugFission.  */
++DW_FORM (DW_FORM_GNU_addr_index, 0x1f01)
++DW_FORM (DW_FORM_GNU_str_index, 0x1f02)
++/* Extensions for DWZ multifile.
++   See http://www.dwarfstd.org/ShowIssue.php?issue=120604.1&type=open .  */
++DW_FORM (DW_FORM_GNU_ref_alt, 0x1f20)
++DW_FORM (DW_FORM_GNU_strp_alt, 0x1f21)
++DW_END_FORM
++
++DW_FIRST_AT (DW_AT_sibling, 0x01)
++DW_AT (DW_AT_location, 0x02)
++DW_AT (DW_AT_name, 0x03)
++DW_AT (DW_AT_ordering, 0x09)
++DW_AT (DW_AT_subscr_data, 0x0a)
++DW_AT (DW_AT_byte_size, 0x0b)
++DW_AT (DW_AT_bit_offset, 0x0c)
++DW_AT (DW_AT_bit_size, 0x0d)
++DW_AT (DW_AT_element_list, 0x0f)
++DW_AT (DW_AT_stmt_list, 0x10)
++DW_AT (DW_AT_low_pc, 0x11)
++DW_AT (DW_AT_high_pc, 0x12)
++DW_AT (DW_AT_language, 0x13)
++DW_AT (DW_AT_member, 0x14)
++DW_AT (DW_AT_discr, 0x15)
++DW_AT (DW_AT_discr_value, 0x16)
++DW_AT (DW_AT_visibility, 0x17)
++DW_AT (DW_AT_import, 0x18)
++DW_AT (DW_AT_string_length, 0x19)
++DW_AT (DW_AT_common_reference, 0x1a)
++DW_AT (DW_AT_comp_dir, 0x1b)
++DW_AT (DW_AT_const_value, 0x1c)
++DW_AT (DW_AT_containing_type, 0x1d)
++DW_AT (DW_AT_default_value, 0x1e)
++DW_AT (DW_AT_inline, 0x20)
++DW_AT (DW_AT_is_optional, 0x21)
++DW_AT (DW_AT_lower_bound, 0x22)
++DW_AT (DW_AT_producer, 0x25)
++DW_AT (DW_AT_prototyped, 0x27)
++DW_AT (DW_AT_return_addr, 0x2a)
++DW_AT (DW_AT_start_scope, 0x2c)
++DW_AT (DW_AT_bit_stride, 0x2e)
++DW_AT (DW_AT_upper_bound, 0x2f)
++DW_AT (DW_AT_abstract_origin, 0x31)
++DW_AT (DW_AT_accessibility, 0x32)
++DW_AT (DW_AT_address_class, 0x33)
++DW_AT (DW_AT_artificial, 0x34)
++DW_AT (DW_AT_base_types, 0x35)
++DW_AT (DW_AT_calling_convention, 0x36)
++DW_AT (DW_AT_count, 0x37)
++DW_AT (DW_AT_data_member_location, 0x38)
++DW_AT (DW_AT_decl_column, 0x39)
++DW_AT (DW_AT_decl_file, 0x3a)
++DW_AT (DW_AT_decl_line, 0x3b)
++DW_AT (DW_AT_declaration, 0x3c)
++DW_AT (DW_AT_discr_list, 0x3d)
++DW_AT (DW_AT_encoding, 0x3e)
++DW_AT (DW_AT_external, 0x3f)
++DW_AT (DW_AT_frame_base, 0x40)
++DW_AT (DW_AT_friend, 0x41)
++DW_AT (DW_AT_identifier_case, 0x42)
++DW_AT (DW_AT_macro_info, 0x43)
++DW_AT (DW_AT_namelist_items, 0x44)
++DW_AT (DW_AT_priority, 0x45)
++DW_AT (DW_AT_segment, 0x46)
++DW_AT (DW_AT_specification, 0x47)
++DW_AT (DW_AT_static_link, 0x48)
++DW_AT (DW_AT_type, 0x49)
++DW_AT (DW_AT_use_location, 0x4a)
++DW_AT (DW_AT_variable_parameter, 0x4b)
++DW_AT (DW_AT_virtuality, 0x4c)
++DW_AT (DW_AT_vtable_elem_location, 0x4d)
++/* DWARF 3 values.  */
++DW_AT (DW_AT_allocated, 0x4e)
++DW_AT (DW_AT_associated, 0x4f)
++DW_AT (DW_AT_data_location, 0x50)
++DW_AT (DW_AT_byte_stride, 0x51)
++DW_AT (DW_AT_entry_pc, 0x52)
++DW_AT (DW_AT_use_UTF8, 0x53)
++DW_AT (DW_AT_extension, 0x54)
++DW_AT (DW_AT_ranges, 0x55)
++DW_AT (DW_AT_trampoline, 0x56)
++DW_AT (DW_AT_call_column, 0x57)
++DW_AT (DW_AT_call_file, 0x58)
++DW_AT (DW_AT_call_line, 0x59)
++DW_AT (DW_AT_description, 0x5a)
++DW_AT (DW_AT_binary_scale, 0x5b)
++DW_AT (DW_AT_decimal_scale, 0x5c)
++DW_AT (DW_AT_small, 0x5d)
++DW_AT (DW_AT_decimal_sign, 0x5e)
++DW_AT (DW_AT_digit_count, 0x5f)
++DW_AT (DW_AT_picture_string, 0x60)
++DW_AT (DW_AT_mutable, 0x61)
++DW_AT (DW_AT_threads_scaled, 0x62)
++DW_AT (DW_AT_explicit, 0x63)
++DW_AT (DW_AT_object_pointer, 0x64)
++DW_AT (DW_AT_endianity, 0x65)
++DW_AT (DW_AT_elemental, 0x66)
++DW_AT (DW_AT_pure, 0x67)
++DW_AT (DW_AT_recursive, 0x68)
++/* DWARF 4.  */
++DW_AT (DW_AT_signature, 0x69)
++DW_AT (DW_AT_main_subprogram, 0x6a)
++DW_AT (DW_AT_data_bit_offset, 0x6b)
++DW_AT (DW_AT_const_expr, 0x6c)
++DW_AT (DW_AT_enum_class, 0x6d)
++DW_AT (DW_AT_linkage_name, 0x6e)
++/* DWARF 5.  */
++DW_AT (DW_AT_string_length_bit_size, 0x6f)
++DW_AT (DW_AT_string_length_byte_size, 0x70)
++DW_AT (DW_AT_rank, 0x71)
++DW_AT (DW_AT_str_offsets_base, 0x72)
++DW_AT (DW_AT_addr_base, 0x73)
++DW_AT (DW_AT_rnglists_base, 0x74)
++DW_AT (DW_AT_dwo_name, 0x76)
++DW_AT (DW_AT_reference, 0x77)
++DW_AT (DW_AT_rvalue_reference, 0x78)
++DW_AT (DW_AT_macros, 0x79)
++DW_AT (DW_AT_call_all_calls, 0x7a)
++DW_AT (DW_AT_call_all_source_calls, 0x7b)
++DW_AT (DW_AT_call_all_tail_calls, 0x7c)
++DW_AT (DW_AT_call_return_pc, 0x7d)
++DW_AT (DW_AT_call_value, 0x7e)
++DW_AT (DW_AT_call_origin, 0x7f)
++DW_AT (DW_AT_call_parameter, 0x80)
++DW_AT (DW_AT_call_pc, 0x81)
++DW_AT (DW_AT_call_tail_call, 0x82)
++DW_AT (DW_AT_call_target, 0x83)
++DW_AT (DW_AT_call_target_clobbered, 0x84)
++DW_AT (DW_AT_call_data_location, 0x85)
++DW_AT (DW_AT_call_data_value, 0x86)
++DW_AT (DW_AT_noreturn, 0x87)
++DW_AT (DW_AT_alignment, 0x88)
++DW_AT (DW_AT_export_symbols, 0x89)
++DW_AT (DW_AT_deleted, 0x8a)
++DW_AT (DW_AT_defaulted, 0x8b)
++DW_AT (DW_AT_loclists_base, 0x8c)
++
++DW_AT_DUP (DW_AT_lo_user, 0x2000) /* Implementation-defined range start.  */
++DW_AT_DUP (DW_AT_hi_user, 0x3fff) /* Implementation-defined range end.  */
++
++/* SGI/MIPS extensions.  */
++DW_AT (DW_AT_MIPS_fde, 0x2001)
++DW_AT (DW_AT_MIPS_loop_begin, 0x2002)
++DW_AT (DW_AT_MIPS_tail_loop_begin, 0x2003)
++DW_AT (DW_AT_MIPS_epilog_begin, 0x2004)
++DW_AT (DW_AT_MIPS_loop_unroll_factor, 0x2005)
++DW_AT (DW_AT_MIPS_software_pipeline_depth, 0x2006)
++DW_AT (DW_AT_MIPS_linkage_name, 0x2007)
++DW_AT (DW_AT_MIPS_stride, 0x2008)
++DW_AT (DW_AT_MIPS_abstract_name, 0x2009)
++DW_AT (DW_AT_MIPS_clone_origin, 0x200a)
++DW_AT (DW_AT_MIPS_has_inlines, 0x200b)
++/* HP extensions.  */
++DW_AT (DW_AT_HP_block_index, 0x2000)
++DW_AT_DUP (DW_AT_HP_unmodifiable, 0x2001) /* Same as DW_AT_MIPS_fde.  */
++DW_AT_DUP (DW_AT_HP_prologue, 0x2005) /* Same as DW_AT_MIPS_loop_unroll.  */
++DW_AT_DUP (DW_AT_HP_epilogue, 0x2008) /* Same as DW_AT_MIPS_stride.  */
++DW_AT (DW_AT_HP_actuals_stmt_list, 0x2010)
++DW_AT (DW_AT_HP_proc_per_section, 0x2011)
++DW_AT (DW_AT_HP_raw_data_ptr, 0x2012)
++DW_AT (DW_AT_HP_pass_by_reference, 0x2013)
++DW_AT (DW_AT_HP_opt_level, 0x2014)
++DW_AT (DW_AT_HP_prof_version_id, 0x2015)
++DW_AT (DW_AT_HP_opt_flags, 0x2016)
++DW_AT (DW_AT_HP_cold_region_low_pc, 0x2017)
++DW_AT (DW_AT_HP_cold_region_high_pc, 0x2018)
++DW_AT (DW_AT_HP_all_variables_modifiable, 0x2019)
++DW_AT (DW_AT_HP_linkage_name, 0x201a)
++DW_AT (DW_AT_HP_prof_flags, 0x201b)  /* In comp unit of procs_info for -g.  */
++DW_AT (DW_AT_HP_unit_name, 0x201f)
++DW_AT (DW_AT_HP_unit_size, 0x2020)
++DW_AT (DW_AT_HP_widened_byte_size, 0x2021)
++DW_AT (DW_AT_HP_definition_points, 0x2022)
++DW_AT (DW_AT_HP_default_location, 0x2023)
++DW_AT (DW_AT_HP_is_result_param, 0x2029)
++
++/* GNU extensions.  */
++DW_AT (DW_AT_sf_names, 0x2101)
++DW_AT (DW_AT_src_info, 0x2102)
++DW_AT (DW_AT_mac_info, 0x2103)
++DW_AT (DW_AT_src_coords, 0x2104)
++DW_AT (DW_AT_body_begin, 0x2105)
++DW_AT (DW_AT_body_end, 0x2106)
++DW_AT (DW_AT_GNU_vector, 0x2107)
++/* Thread-safety annotations.
++   See http://gcc.gnu.org/wiki/ThreadSafetyAnnotation .  */
++DW_AT (DW_AT_GNU_guarded_by, 0x2108)
++DW_AT (DW_AT_GNU_pt_guarded_by, 0x2109)
++DW_AT (DW_AT_GNU_guarded, 0x210a)
++DW_AT (DW_AT_GNU_pt_guarded, 0x210b)
++DW_AT (DW_AT_GNU_locks_excluded, 0x210c)
++DW_AT (DW_AT_GNU_exclusive_locks_required, 0x210d)
++DW_AT (DW_AT_GNU_shared_locks_required, 0x210e)
++/* One-definition rule violation detection.
++   See http://gcc.gnu.org/wiki/DwarfSeparateTypeInfo .  */
++DW_AT (DW_AT_GNU_odr_signature, 0x210f)
++/* Template template argument name.
++   See http://gcc.gnu.org/wiki/TemplateParmsDwarf .  */
++DW_AT (DW_AT_GNU_template_name, 0x2110)
++/* The GNU call site extension.
++   See http://www.dwarfstd.org/ShowIssue.php?issue=100909.2&type=open .  */
++DW_AT (DW_AT_GNU_call_site_value, 0x2111)
++DW_AT (DW_AT_GNU_call_site_data_value, 0x2112)
++DW_AT (DW_AT_GNU_call_site_target, 0x2113)
++DW_AT (DW_AT_GNU_call_site_target_clobbered, 0x2114)
++DW_AT (DW_AT_GNU_tail_call, 0x2115)
++DW_AT (DW_AT_GNU_all_tail_call_sites, 0x2116)
++DW_AT (DW_AT_GNU_all_call_sites, 0x2117)
++DW_AT (DW_AT_GNU_all_source_call_sites, 0x2118)
++/* Section offset into .debug_macro section.  */
++DW_AT (DW_AT_GNU_macros, 0x2119)
++/* Attribute for C++ deleted special member functions (= delete;).  */
++DW_AT (DW_AT_GNU_deleted, 0x211a)
++/* Extensions for Fission.  See http://gcc.gnu.org/wiki/DebugFission.  */
++DW_AT (DW_AT_GNU_dwo_name, 0x2130)
++DW_AT (DW_AT_GNU_dwo_id, 0x2131)
++DW_AT (DW_AT_GNU_ranges_base, 0x2132)
++DW_AT (DW_AT_GNU_addr_base, 0x2133)
++DW_AT (DW_AT_GNU_pubnames, 0x2134)
++DW_AT (DW_AT_GNU_pubtypes, 0x2135)
++/* Attribute for discriminator.
++   See http://gcc.gnu.org/wiki/Discriminator  */
++DW_AT (DW_AT_GNU_discriminator, 0x2136)
++/* VMS extensions.  */
++DW_AT (DW_AT_VMS_rtnbeg_pd_address, 0x2201)
++/* GNAT extensions.  */
++/* GNAT descriptive type.
++   See http://gcc.gnu.org/wiki/DW_AT_GNAT_descriptive_type .  */
++DW_AT (DW_AT_use_GNAT_descriptive_type, 0x2301)
++DW_AT (DW_AT_GNAT_descriptive_type, 0x2302)
++/* Rational constant extension.
++   See https://gcc.gnu.org/wiki/DW_AT_GNU_numerator_denominator .  */
++DW_TAG (DW_AT_GNU_numerator, 0x2303)
++DW_TAG (DW_AT_GNU_denominator, 0x2304)
++/* Biased integer extension.
++   See https://gcc.gnu.org/wiki/DW_AT_GNU_bias .  */
++DW_TAG (DW_AT_GNU_bias, 0x2305)
++/* UPC extension.  */
++DW_AT (DW_AT_upc_threads_scaled, 0x3210)
++/* PGI (STMicroelectronics) extensions.  */
++DW_AT (DW_AT_PGI_lbase, 0x3a00)
++DW_AT (DW_AT_PGI_soffset, 0x3a01)
++DW_AT (DW_AT_PGI_lstride, 0x3a02)
++/* Apple extensions.  */
++DW_AT (DW_AT_APPLE_optimized, 0x3fe1)
++DW_AT (DW_AT_APPLE_flags, 0x3fe2)
++DW_AT (DW_AT_APPLE_isa, 0x3fe3)
++DW_AT (DW_AT_APPLE_block, 0x3fe4)
++DW_AT (DW_AT_APPLE_major_runtime_vers, 0x3fe5)
++DW_AT (DW_AT_APPLE_runtime_class, 0x3fe6)
++DW_AT (DW_AT_APPLE_omit_frame_ptr, 0x3fe7)
++DW_AT (DW_AT_APPLE_property_name, 0x3fe8)
++DW_AT (DW_AT_APPLE_property_getter, 0x3fe9)
++DW_AT (DW_AT_APPLE_property_setter, 0x3fea)
++DW_AT (DW_AT_APPLE_property_attribute, 0x3feb)
++DW_AT (DW_AT_APPLE_objc_complete_type, 0x3fec)
++DW_AT (DW_AT_APPLE_property, 0x3fed)
++DW_END_AT
++
++DW_FIRST_OP (DW_OP_addr, 0x03)
++DW_OP (DW_OP_deref, 0x06)
++DW_OP (DW_OP_const1u, 0x08)
++DW_OP (DW_OP_const1s, 0x09)
++DW_OP (DW_OP_const2u, 0x0a)
++DW_OP (DW_OP_const2s, 0x0b)
++DW_OP (DW_OP_const4u, 0x0c)
++DW_OP (DW_OP_const4s, 0x0d)
++DW_OP (DW_OP_const8u, 0x0e)
++DW_OP (DW_OP_const8s, 0x0f)
++DW_OP (DW_OP_constu, 0x10)
++DW_OP (DW_OP_consts, 0x11)
++DW_OP (DW_OP_dup, 0x12)
++DW_OP (DW_OP_drop, 0x13)
++DW_OP (DW_OP_over, 0x14)
++DW_OP (DW_OP_pick, 0x15)
++DW_OP (DW_OP_swap, 0x16)
++DW_OP (DW_OP_rot, 0x17)
++DW_OP (DW_OP_xderef, 0x18)
++DW_OP (DW_OP_abs, 0x19)
++DW_OP (DW_OP_and, 0x1a)
++DW_OP (DW_OP_div, 0x1b)
++DW_OP (DW_OP_minus, 0x1c)
++DW_OP (DW_OP_mod, 0x1d)
++DW_OP (DW_OP_mul, 0x1e)
++DW_OP (DW_OP_neg, 0x1f)
++DW_OP (DW_OP_not, 0x20)
++DW_OP (DW_OP_or, 0x21)
++DW_OP (DW_OP_plus, 0x22)
++DW_OP (DW_OP_plus_uconst, 0x23)
++DW_OP (DW_OP_shl, 0x24)
++DW_OP (DW_OP_shr, 0x25)
++DW_OP (DW_OP_shra, 0x26)
++DW_OP (DW_OP_xor, 0x27)
++DW_OP (DW_OP_bra, 0x28)
++DW_OP (DW_OP_eq, 0x29)
++DW_OP (DW_OP_ge, 0x2a)
++DW_OP (DW_OP_gt, 0x2b)
++DW_OP (DW_OP_le, 0x2c)
++DW_OP (DW_OP_lt, 0x2d)
++DW_OP (DW_OP_ne, 0x2e)
++DW_OP (DW_OP_skip, 0x2f)
++DW_OP (DW_OP_lit0, 0x30)
++DW_OP (DW_OP_lit1, 0x31)
++DW_OP (DW_OP_lit2, 0x32)
++DW_OP (DW_OP_lit3, 0x33)
++DW_OP (DW_OP_lit4, 0x34)
++DW_OP (DW_OP_lit5, 0x35)
++DW_OP (DW_OP_lit6, 0x36)
++DW_OP (DW_OP_lit7, 0x37)
++DW_OP (DW_OP_lit8, 0x38)
++DW_OP (DW_OP_lit9, 0x39)
++DW_OP (DW_OP_lit10, 0x3a)
++DW_OP (DW_OP_lit11, 0x3b)
++DW_OP (DW_OP_lit12, 0x3c)
++DW_OP (DW_OP_lit13, 0x3d)
++DW_OP (DW_OP_lit14, 0x3e)
++DW_OP (DW_OP_lit15, 0x3f)
++DW_OP (DW_OP_lit16, 0x40)
++DW_OP (DW_OP_lit17, 0x41)
++DW_OP (DW_OP_lit18, 0x42)
++DW_OP (DW_OP_lit19, 0x43)
++DW_OP (DW_OP_lit20, 0x44)
++DW_OP (DW_OP_lit21, 0x45)
++DW_OP (DW_OP_lit22, 0x46)
++DW_OP (DW_OP_lit23, 0x47)
++DW_OP (DW_OP_lit24, 0x48)
++DW_OP (DW_OP_lit25, 0x49)
++DW_OP (DW_OP_lit26, 0x4a)
++DW_OP (DW_OP_lit27, 0x4b)
++DW_OP (DW_OP_lit28, 0x4c)
++DW_OP (DW_OP_lit29, 0x4d)
++DW_OP (DW_OP_lit30, 0x4e)
++DW_OP (DW_OP_lit31, 0x4f)
++DW_OP (DW_OP_reg0, 0x50)
++DW_OP (DW_OP_reg1, 0x51)
++DW_OP (DW_OP_reg2, 0x52)
++DW_OP (DW_OP_reg3, 0x53)
++DW_OP (DW_OP_reg4, 0x54)
++DW_OP (DW_OP_reg5, 0x55)
++DW_OP (DW_OP_reg6, 0x56)
++DW_OP (DW_OP_reg7, 0x57)
++DW_OP (DW_OP_reg8, 0x58)
++DW_OP (DW_OP_reg9, 0x59)
++DW_OP (DW_OP_reg10, 0x5a)
++DW_OP (DW_OP_reg11, 0x5b)
++DW_OP (DW_OP_reg12, 0x5c)
++DW_OP (DW_OP_reg13, 0x5d)
++DW_OP (DW_OP_reg14, 0x5e)
++DW_OP (DW_OP_reg15, 0x5f)
++DW_OP (DW_OP_reg16, 0x60)
++DW_OP (DW_OP_reg17, 0x61)
++DW_OP (DW_OP_reg18, 0x62)
++DW_OP (DW_OP_reg19, 0x63)
++DW_OP (DW_OP_reg20, 0x64)
++DW_OP (DW_OP_reg21, 0x65)
++DW_OP (DW_OP_reg22, 0x66)
++DW_OP (DW_OP_reg23, 0x67)
++DW_OP (DW_OP_reg24, 0x68)
++DW_OP (DW_OP_reg25, 0x69)
++DW_OP (DW_OP_reg26, 0x6a)
++DW_OP (DW_OP_reg27, 0x6b)
++DW_OP (DW_OP_reg28, 0x6c)
++DW_OP (DW_OP_reg29, 0x6d)
++DW_OP (DW_OP_reg30, 0x6e)
++DW_OP (DW_OP_reg31, 0x6f)
++DW_OP (DW_OP_breg0, 0x70)
++DW_OP (DW_OP_breg1, 0x71)
++DW_OP (DW_OP_breg2, 0x72)
++DW_OP (DW_OP_breg3, 0x73)
++DW_OP (DW_OP_breg4, 0x74)
++DW_OP (DW_OP_breg5, 0x75)
++DW_OP (DW_OP_breg6, 0x76)
++DW_OP (DW_OP_breg7, 0x77)
++DW_OP (DW_OP_breg8, 0x78)
++DW_OP (DW_OP_breg9, 0x79)
++DW_OP (DW_OP_breg10, 0x7a)
++DW_OP (DW_OP_breg11, 0x7b)
++DW_OP (DW_OP_breg12, 0x7c)
++DW_OP (DW_OP_breg13, 0x7d)
++DW_OP (DW_OP_breg14, 0x7e)
++DW_OP (DW_OP_breg15, 0x7f)
++DW_OP (DW_OP_breg16, 0x80)
++DW_OP (DW_OP_breg17, 0x81)
++DW_OP (DW_OP_breg18, 0x82)
++DW_OP (DW_OP_breg19, 0x83)
++DW_OP (DW_OP_breg20, 0x84)
++DW_OP (DW_OP_breg21, 0x85)
++DW_OP (DW_OP_breg22, 0x86)
++DW_OP (DW_OP_breg23, 0x87)
++DW_OP (DW_OP_breg24, 0x88)
++DW_OP (DW_OP_breg25, 0x89)
++DW_OP (DW_OP_breg26, 0x8a)
++DW_OP (DW_OP_breg27, 0x8b)
++DW_OP (DW_OP_breg28, 0x8c)
++DW_OP (DW_OP_breg29, 0x8d)
++DW_OP (DW_OP_breg30, 0x8e)
++DW_OP (DW_OP_breg31, 0x8f)
++DW_OP (DW_OP_regx, 0x90)
++DW_OP (DW_OP_fbreg, 0x91)
++DW_OP (DW_OP_bregx, 0x92)
++DW_OP (DW_OP_piece, 0x93)
++DW_OP (DW_OP_deref_size, 0x94)
++DW_OP (DW_OP_xderef_size, 0x95)
++DW_OP (DW_OP_nop, 0x96)
++/* DWARF 3 extensions.  */
++DW_OP (DW_OP_push_object_address, 0x97)
++DW_OP (DW_OP_call2, 0x98)
++DW_OP (DW_OP_call4, 0x99)
++DW_OP (DW_OP_call_ref, 0x9a)
++DW_OP (DW_OP_form_tls_address, 0x9b)
++DW_OP (DW_OP_call_frame_cfa, 0x9c)
++DW_OP (DW_OP_bit_piece, 0x9d)
++
++/* DWARF 4 extensions.  */
++DW_OP (DW_OP_implicit_value, 0x9e)
++DW_OP (DW_OP_stack_value, 0x9f)
++
++/* DWARF 5 extensions.  */
++DW_OP (DW_OP_implicit_pointer, 0xa0)
++DW_OP (DW_OP_addrx, 0xa1)
++DW_OP (DW_OP_constx, 0xa2)
++DW_OP (DW_OP_entry_value, 0xa3)
++DW_OP (DW_OP_const_type, 0xa4)
++DW_OP (DW_OP_regval_type, 0xa5)
++DW_OP (DW_OP_deref_type, 0xa6)
++DW_OP (DW_OP_xderef_type, 0xa7)
++DW_OP (DW_OP_convert, 0xa8)
++DW_OP (DW_OP_reinterpret, 0xa9)
++
++DW_OP_DUP (DW_OP_lo_user, 0xe0)       /* Implementation-defined range start.  */
++DW_OP_DUP (DW_OP_hi_user, 0xff)       /* Implementation-defined range end.  */
++
++/* GNU extensions.  */
++DW_OP (DW_OP_GNU_push_tls_address, 0xe0)
++/* The following is for marking variables that are uninitialized.  */
++DW_OP (DW_OP_GNU_uninit, 0xf0)
++DW_OP (DW_OP_GNU_encoded_addr, 0xf1)
++/* The GNU implicit pointer extension.
++   See http://www.dwarfstd.org/ShowIssue.php?issue=100831.1&type=open .  */
++DW_OP (DW_OP_GNU_implicit_pointer, 0xf2)
++/* The GNU entry value extension.
++   See http://www.dwarfstd.org/ShowIssue.php?issue=100909.1&type=open .  */
++DW_OP (DW_OP_GNU_entry_value, 0xf3)
++/* The GNU typed stack extension.
++   See http://www.dwarfstd.org/doc/040408.1.html .  */
++DW_OP (DW_OP_GNU_const_type, 0xf4)
++DW_OP (DW_OP_GNU_regval_type, 0xf5)
++DW_OP (DW_OP_GNU_deref_type, 0xf6)
++DW_OP (DW_OP_GNU_convert, 0xf7)
++DW_OP (DW_OP_GNU_reinterpret, 0xf9)
++/* The GNU parameter ref extension.  */
++DW_OP (DW_OP_GNU_parameter_ref, 0xfa)
++/* Extensions for Fission.  See http://gcc.gnu.org/wiki/DebugFission.  */
++DW_OP (DW_OP_GNU_addr_index, 0xfb)
++DW_OP (DW_OP_GNU_const_index, 0xfc)
++/* HP extensions.  */
++DW_OP_DUP (DW_OP_HP_unknown, 0xe0) /* Ouch, the same as GNU_push_tls_address.  */
++DW_OP (DW_OP_HP_is_value, 0xe1)
++DW_OP (DW_OP_HP_fltconst4, 0xe2)
++DW_OP (DW_OP_HP_fltconst8, 0xe3)
++DW_OP (DW_OP_HP_mod_range, 0xe4)
++DW_OP (DW_OP_HP_unmod_range, 0xe5)
++DW_OP (DW_OP_HP_tls, 0xe6)
++/* PGI (STMicroelectronics) extensions.  */
++DW_OP (DW_OP_PGI_omp_thread_num, 0xf8)
++DW_END_OP
++
++DW_FIRST_ATE (DW_ATE_void, 0x0)
++DW_ATE (DW_ATE_address, 0x1)
++DW_ATE (DW_ATE_boolean, 0x2)
++DW_ATE (DW_ATE_complex_float, 0x3)
++DW_ATE (DW_ATE_float, 0x4)
++DW_ATE (DW_ATE_signed, 0x5)
++DW_ATE (DW_ATE_signed_char, 0x6)
++DW_ATE (DW_ATE_unsigned, 0x7)
++DW_ATE (DW_ATE_unsigned_char, 0x8)
++/* DWARF 3.  */
++DW_ATE (DW_ATE_imaginary_float, 0x9)
++DW_ATE (DW_ATE_packed_decimal, 0xa)
++DW_ATE (DW_ATE_numeric_string, 0xb)
++DW_ATE (DW_ATE_edited, 0xc)
++DW_ATE (DW_ATE_signed_fixed, 0xd)
++DW_ATE (DW_ATE_unsigned_fixed, 0xe)
++DW_ATE (DW_ATE_decimal_float, 0xf)
++/* DWARF 4.  */
++DW_ATE (DW_ATE_UTF, 0x10)
++/* DWARF 5.  */
++DW_ATE (DW_ATE_UCS, 0x11)
++DW_ATE (DW_ATE_ASCII, 0x12)
++
++DW_ATE_DUP (DW_ATE_lo_user, 0x80)
++DW_ATE_DUP (DW_ATE_hi_user, 0xff)
++
++/* HP extensions.  */
++DW_ATE (DW_ATE_HP_float80, 0x80) /* Floating-point (80 bit).  */
++DW_ATE (DW_ATE_HP_complex_float80, 0x81) /* Complex floating-point (80 bit).  */
++DW_ATE (DW_ATE_HP_float128, 0x82) /* Floating-point (128 bit).  */
++DW_ATE (DW_ATE_HP_complex_float128, 0x83) /* Complex fp (128 bit).  */
++DW_ATE (DW_ATE_HP_floathpintel, 0x84) /* Floating-point (82 bit IA64).  */
++DW_ATE (DW_ATE_HP_imaginary_float80, 0x85)
++DW_ATE (DW_ATE_HP_imaginary_float128, 0x86)
++DW_ATE (DW_ATE_HP_VAX_float, 0x88) /* F or G floating.  */
++DW_ATE (DW_ATE_HP_VAX_float_d, 0x89) /* D floating.  */
++DW_ATE (DW_ATE_HP_packed_decimal, 0x8a) /* Cobol.  */
++DW_ATE (DW_ATE_HP_zoned_decimal, 0x8b) /* Cobol.  */
++DW_ATE (DW_ATE_HP_edited, 0x8c) /* Cobol.  */
++DW_ATE (DW_ATE_HP_signed_fixed, 0x8d) /* Cobol.  */
++DW_ATE (DW_ATE_HP_unsigned_fixed, 0x8e) /* Cobol.  */
++DW_ATE (DW_ATE_HP_VAX_complex_float, 0x8f) /* F or G floating complex.  */
++DW_ATE (DW_ATE_HP_VAX_complex_float_d, 0x90) /* D floating complex.  */
++
++DW_END_ATE
++
++DW_FIRST_CFA (DW_CFA_advance_loc, 0x40)
++DW_CFA (DW_CFA_offset, 0x80)
++DW_CFA (DW_CFA_restore, 0xc0)
++DW_CFA (DW_CFA_nop, 0x00)
++DW_CFA (DW_CFA_set_loc, 0x01)
++DW_CFA (DW_CFA_advance_loc1, 0x02)
++DW_CFA (DW_CFA_advance_loc2, 0x03)
++DW_CFA (DW_CFA_advance_loc4, 0x04)
++DW_CFA (DW_CFA_offset_extended, 0x05)
++DW_CFA (DW_CFA_restore_extended, 0x06)
++DW_CFA (DW_CFA_undefined, 0x07)
++DW_CFA (DW_CFA_same_value, 0x08)
++DW_CFA (DW_CFA_register, 0x09)
++DW_CFA (DW_CFA_remember_state, 0x0a)
++DW_CFA (DW_CFA_restore_state, 0x0b)
++DW_CFA (DW_CFA_def_cfa, 0x0c)
++DW_CFA (DW_CFA_def_cfa_register, 0x0d)
++DW_CFA (DW_CFA_def_cfa_offset, 0x0e)
++/* DWARF 3.  */
++DW_CFA (DW_CFA_def_cfa_expression, 0x0f)
++DW_CFA (DW_CFA_expression, 0x10)
++DW_CFA (DW_CFA_offset_extended_sf, 0x11)
++DW_CFA (DW_CFA_def_cfa_sf, 0x12)
++DW_CFA (DW_CFA_def_cfa_offset_sf, 0x13)
++DW_CFA (DW_CFA_val_offset, 0x14)
++DW_CFA (DW_CFA_val_offset_sf, 0x15)
++DW_CFA (DW_CFA_val_expression, 0x16)
++
++DW_CFA (DW_CFA_lo_user, 0x1c)
++DW_CFA (DW_CFA_hi_user, 0x3f)
++
++/* SGI/MIPS specific.  */
++DW_CFA (DW_CFA_MIPS_advance_loc8, 0x1d)
++/* GNU extensions.  */
++DW_CFA (DW_CFA_GNU_window_save, 0x2d)
++DW_CFA (DW_CFA_GNU_args_size, 0x2e)
++DW_CFA (DW_CFA_GNU_negative_offset_extended, 0x2f)
++
++DW_END_CFA
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ca8ff3b6da11b2ec772347fc44af429c2c864631
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,531 @@@
++/* Declarations and definitions of codes relating to the DWARF2 and
++   DWARF3 symbolic debugging information formats.
++   Copyright (C) 1992-2016 Free Software Foundation, Inc.
++
++   Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
++   Office (AJPO), Florida State University and Silicon Graphics Inc.
++   provided support for this effort -- June 21, 1995.
++
++   Derived from the DWARF 1 implementation written by Ron Guilmette
++   (rfg@netcom.com), November 1990.
++
++   This file is part of GCC.
++
++   GCC is free software; you can redistribute it and/or modify it under
++   the terms of the GNU General Public License as published by the Free
++   Software Foundation; either version 3, or (at your option) any later
++   version.
++
++   GCC is distributed in the hope that it will be useful, but WITHOUT
++   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
++   License for more details.
++
++   Under Section 7 of GPL version 3, you are granted additional
++   permissions described in the GCC Runtime Library Exception, version
++   3.1, as published by the Free Software Foundation.
++
++   You should have received a copy of the GNU General Public License and
++   a copy of the GCC Runtime Library Exception along with this program;
++   see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
++   <http://www.gnu.org/licenses/>.  */
++
++/* This file is derived from the DWARF specification (a public document)
++   Revision 2.0.0 (July 27, 1993) developed by the UNIX International
++   Programming Languages Special Interest Group (UI/PLSIG) and distributed
++   by UNIX International.  Copies of this specification are available from
++   UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054.
++
++   This file also now contains definitions from the DWARF 3 specification
++   published Dec 20, 2005, available from: http://dwarf.freestandards.org.  */
++
++#ifndef _DWARF2_H
++#define _DWARF2_H
++
++#define DW_TAG(name, value) , name = value
++#define DW_TAG_DUP(name, value) , name = value
++#define DW_FORM(name, value) , name = value
++#define DW_AT(name, value) , name = value
++#define DW_AT_DUP(name, value) , name = value
++#define DW_OP(name, value) , name = value
++#define DW_OP_DUP(name, value) , name = value
++#define DW_ATE(name, value) , name = value
++#define DW_ATE_DUP(name, value) , name = value
++#define DW_CFA(name, value) , name = value
++
++#define DW_FIRST_TAG(name, value) enum dwarf_tag { \
++  name = value
++#define DW_END_TAG };
++#define DW_FIRST_FORM(name, value) enum dwarf_form { \
++  name = value
++#define DW_END_FORM };
++#define DW_FIRST_AT(name, value) enum dwarf_attribute { \
++  name = value
++#define DW_END_AT };
++#define DW_FIRST_OP(name, value) enum dwarf_location_atom { \
++  name = value
++#define DW_END_OP };
++#define DW_FIRST_ATE(name, value) enum dwarf_type { \
++  name = value
++#define DW_END_ATE };
++#define DW_FIRST_CFA(name, value) enum dwarf_call_frame_info { \
++  name = value
++#define DW_END_CFA };
++
++#include "dwarf2.def"
++
++#undef DW_FIRST_TAG
++#undef DW_END_TAG
++#undef DW_FIRST_FORM
++#undef DW_END_FORM
++#undef DW_FIRST_AT
++#undef DW_END_AT
++#undef DW_FIRST_OP
++#undef DW_END_OP
++#undef DW_FIRST_ATE
++#undef DW_END_ATE
++#undef DW_FIRST_CFA
++#undef DW_END_CFA
++
++#undef DW_TAG
++#undef DW_TAG_DUP
++#undef DW_FORM
++#undef DW_AT
++#undef DW_AT_DUP
++#undef DW_OP
++#undef DW_OP_DUP
++#undef DW_ATE
++#undef DW_ATE_DUP
++#undef DW_CFA
++
++/* Flag that tells whether entry has a child or not.  */
++#define DW_children_no   0
++#define       DW_children_yes  1
++
++#define DW_AT_stride_size   DW_AT_bit_stride  /* Note: The use of DW_AT_stride_size is deprecated.  */
++#define DW_AT_stride   DW_AT_byte_stride  /* Note: The use of DW_AT_stride is deprecated.  */
++
++/* Decimal sign encodings.  */
++enum dwarf_decimal_sign_encoding
++  {
++    /* DWARF 3.  */
++    DW_DS_unsigned = 0x01,
++    DW_DS_leading_overpunch = 0x02,
++    DW_DS_trailing_overpunch = 0x03,
++    DW_DS_leading_separate = 0x04,
++    DW_DS_trailing_separate = 0x05
++  };
++
++/* Endianity encodings.  */
++enum dwarf_endianity_encoding
++  {
++    /* DWARF 3.  */
++    DW_END_default = 0x00,
++    DW_END_big = 0x01,
++    DW_END_little = 0x02,
++
++    DW_END_lo_user = 0x40,
++    DW_END_hi_user = 0xff
++  };
++
++/* Array ordering names and codes.  */
++enum dwarf_array_dim_ordering
++  {
++    DW_ORD_row_major = 0,
++    DW_ORD_col_major = 1
++  };
++
++/* Access attribute.  */
++enum dwarf_access_attribute
++  {
++    DW_ACCESS_public = 1,
++    DW_ACCESS_protected = 2,
++    DW_ACCESS_private = 3
++  };
++
++/* Visibility.  */
++enum dwarf_visibility_attribute
++  {
++    DW_VIS_local = 1,
++    DW_VIS_exported = 2,
++    DW_VIS_qualified = 3
++  };
++
++/* Virtuality.  */
++enum dwarf_virtuality_attribute
++  {
++    DW_VIRTUALITY_none = 0,
++    DW_VIRTUALITY_virtual = 1,
++    DW_VIRTUALITY_pure_virtual = 2
++  };
++
++/* Case sensitivity.  */
++enum dwarf_id_case
++  {
++    DW_ID_case_sensitive = 0,
++    DW_ID_up_case = 1,
++    DW_ID_down_case = 2,
++    DW_ID_case_insensitive = 3
++  };
++
++/* Calling convention.  */
++enum dwarf_calling_convention
++  {
++    DW_CC_normal = 0x1,
++    DW_CC_program = 0x2,
++    DW_CC_nocall = 0x3,
++
++    /* DWARF 5.  */
++    DW_CC_pass_by_reference = 0x4,
++    DW_CC_pass_by_value = 0x5,
++
++    DW_CC_lo_user = 0x40,
++    DW_CC_hi_user = 0xff,
++
++    DW_CC_GNU_renesas_sh = 0x40,
++    DW_CC_GNU_borland_fastcall_i386 = 0x41,
++
++    /* This DW_CC_ value is not currently generated by any toolchain.  It is
++       used internally to GDB to indicate OpenCL C functions that have been
++       compiled with the IBM XL C for OpenCL compiler and use a non-platform
++       calling convention for passing OpenCL C vector types.  This value may
++       be changed freely as long as it does not conflict with any other DW_CC_
++       value defined here.  */
++    DW_CC_GDB_IBM_OpenCL = 0xff
++  };
++
++/* Inline attribute.  */
++enum dwarf_inline_attribute
++  {
++    DW_INL_not_inlined = 0,
++    DW_INL_inlined = 1,
++    DW_INL_declared_not_inlined = 2,
++    DW_INL_declared_inlined = 3
++  };
++
++/* Discriminant lists.  */
++enum dwarf_discrim_list
++  {
++    DW_DSC_label = 0,
++    DW_DSC_range = 1
++  };
++
++/* Line number opcodes.  */
++enum dwarf_line_number_ops
++  {
++    DW_LNS_extended_op = 0,
++    DW_LNS_copy = 1,
++    DW_LNS_advance_pc = 2,
++    DW_LNS_advance_line = 3,
++    DW_LNS_set_file = 4,
++    DW_LNS_set_column = 5,
++    DW_LNS_negate_stmt = 6,
++    DW_LNS_set_basic_block = 7,
++    DW_LNS_const_add_pc = 8,
++    DW_LNS_fixed_advance_pc = 9,
++    /* DWARF 3.  */
++    DW_LNS_set_prologue_end = 10,
++    DW_LNS_set_epilogue_begin = 11,
++    DW_LNS_set_isa = 12
++  };
++
++/* Line number extended opcodes.  */
++enum dwarf_line_number_x_ops
++  {
++    DW_LNE_end_sequence = 1,
++    DW_LNE_set_address = 2,
++    DW_LNE_define_file = 3,
++    DW_LNE_set_discriminator = 4,
++    /* HP extensions.  */
++    DW_LNE_HP_negate_is_UV_update      = 0x11,
++    DW_LNE_HP_push_context             = 0x12,
++    DW_LNE_HP_pop_context              = 0x13,
++    DW_LNE_HP_set_file_line_column     = 0x14,
++    DW_LNE_HP_set_routine_name         = 0x15,
++    DW_LNE_HP_set_sequence             = 0x16,
++    DW_LNE_HP_negate_post_semantics    = 0x17,
++    DW_LNE_HP_negate_function_exit     = 0x18,
++    DW_LNE_HP_negate_front_end_logical = 0x19,
++    DW_LNE_HP_define_proc              = 0x20,
++    DW_LNE_HP_source_file_correlation  = 0x80,
++
++    DW_LNE_lo_user = 0x80,
++    DW_LNE_hi_user = 0xff
++  };
++
++/* Sub-opcodes for DW_LNE_HP_source_file_correlation.  */
++enum dwarf_line_number_hp_sfc_ops
++  {
++    DW_LNE_HP_SFC_formfeed = 1,
++    DW_LNE_HP_SFC_set_listing_line = 2,
++    DW_LNE_HP_SFC_associate = 3
++  };
++
++/* Content type codes in line table directory_entry_format
++   and file_name_entry_format sequences.  */
++enum dwarf_line_number_content_type
++  {
++    DW_LNCT_path = 0x1,
++    DW_LNCT_directory_index = 0x2,
++    DW_LNCT_timestamp = 0x3,
++    DW_LNCT_size = 0x4,
++    DW_LNCT_MD5 = 0x5,
++    DW_LNCT_lo_user = 0x2000,
++    DW_LNCT_hi_user = 0x3fff
++  };
++
++/* Type codes for location list entries.  */
++enum dwarf_location_list_entry_type
++  {
++    DW_LLE_end_of_list = 0x00,
++    DW_LLE_base_addressx = 0x01,
++    DW_LLE_startx_endx = 0x02,
++    DW_LLE_startx_length = 0x03,
++    DW_LLE_offset_pair = 0x04,
++    DW_LLE_default_location = 0x05,
++    DW_LLE_base_address = 0x06,
++    DW_LLE_start_end = 0x07,
++    DW_LLE_start_length = 0x08,
++
++    /* Former extension for Fission.
++       See http://gcc.gnu.org/wiki/DebugFission.  */
++    DW_LLE_GNU_end_of_list_entry = 0x00,
++    DW_LLE_GNU_base_address_selection_entry = 0x01,
++    DW_LLE_GNU_start_end_entry = 0x02,
++    DW_LLE_GNU_start_length_entry = 0x03
++  };
++
++#define DW_CIE_ID       0xffffffff
++#define DW64_CIE_ID     0xffffffffffffffffULL
++#define DW_CIE_VERSION          1
++
++#define DW_CFA_extended   0
++
++#define DW_CHILDREN_no                     0x00
++#define DW_CHILDREN_yes                    0x01
++
++#define DW_ADDR_none          0
++
++/* Source language names and codes.  */
++enum dwarf_source_language
++  {
++    DW_LANG_C89 = 0x0001,
++    DW_LANG_C = 0x0002,
++    DW_LANG_Ada83 = 0x0003,
++    DW_LANG_C_plus_plus = 0x0004,
++    DW_LANG_Cobol74 = 0x0005,
++    DW_LANG_Cobol85 = 0x0006,
++    DW_LANG_Fortran77 = 0x0007,
++    DW_LANG_Fortran90 = 0x0008,
++    DW_LANG_Pascal83 = 0x0009,
++    DW_LANG_Modula2 = 0x000a,
++    /* DWARF 3.  */
++    DW_LANG_Java = 0x000b,
++    DW_LANG_C99 = 0x000c,
++    DW_LANG_Ada95 = 0x000d,
++    DW_LANG_Fortran95 = 0x000e,
++    DW_LANG_PLI = 0x000f,
++    DW_LANG_ObjC = 0x0010,
++    DW_LANG_ObjC_plus_plus = 0x0011,
++    DW_LANG_UPC = 0x0012,
++    DW_LANG_D = 0x0013,
++    /* DWARF 4.  */
++    DW_LANG_Python = 0x0014,
++    /* DWARF 5.  */
++    DW_LANG_OpenCL = 0x0015,
++    DW_LANG_Go = 0x0016,
++    DW_LANG_Modula3 = 0x0017,
++    DW_LANG_Haskell = 0x0018,
++    DW_LANG_C_plus_plus_03 = 0x0019,
++    DW_LANG_C_plus_plus_11 = 0x001a,
++    DW_LANG_OCaml = 0x001b,
++    DW_LANG_Rust = 0x001c,
++    DW_LANG_C11 = 0x001d,
++    DW_LANG_Swift = 0x001e,
++    DW_LANG_Julia = 0x001f,
++    DW_LANG_Dylan = 0x0020,
++    DW_LANG_C_plus_plus_14 = 0x0021,
++    DW_LANG_Fortran03 = 0x0022,
++    DW_LANG_Fortran08 = 0x0023,
++    DW_LANG_RenderScript = 0x0024,
++
++    DW_LANG_lo_user = 0x8000, /* Implementation-defined range start.  */
++    DW_LANG_hi_user = 0xffff, /* Implementation-defined range start.  */
++
++    /* MIPS.  */
++    DW_LANG_Mips_Assembler = 0x8001,
++    /* UPC.  */
++    DW_LANG_Upc = 0x8765,
++    /* HP extensions.  */
++    DW_LANG_HP_Bliss     = 0x8003,
++    DW_LANG_HP_Basic91   = 0x8004,
++    DW_LANG_HP_Pascal91  = 0x8005,
++    DW_LANG_HP_IMacro    = 0x8006,
++    DW_LANG_HP_Assembler = 0x8007,
++
++    /* Rust extension, but replaced in DWARF 5.  */
++    DW_LANG_Rust_old = 0x9000
++  };
++
++/* Names and codes for macro information.  */
++enum dwarf_macinfo_record_type
++  {
++    DW_MACINFO_define = 1,
++    DW_MACINFO_undef = 2,
++    DW_MACINFO_start_file = 3,
++    DW_MACINFO_end_file = 4,
++    DW_MACINFO_vendor_ext = 255
++  };
++
++/* DW_TAG_defaulted/DW_TAG_GNU_defaulted attributes.  */
++enum dwarf_defaulted_attribute
++  {
++    DW_DEFAULTED_no = 0x00,
++    DW_DEFAULTED_in_class = 0x01,
++    DW_DEFAULTED_out_of_class = 0x02
++  };
++
++/* Names and codes for new style macro information.  */
++enum dwarf_macro_record_type
++  {
++    DW_MACRO_define = 0x01,
++    DW_MACRO_undef = 0x02,
++    DW_MACRO_start_file = 0x03,
++    DW_MACRO_end_file = 0x04,
++    DW_MACRO_define_strp = 0x05,
++    DW_MACRO_undef_strp = 0x06,
++    DW_MACRO_import = 0x07,
++    DW_MACRO_define_sup = 0x08,
++    DW_MACRO_undef_sup = 0x09,
++    DW_MACRO_import_sup = 0x0a,
++    DW_MACRO_define_strx = 0x0b,
++    DW_MACRO_undef_strx = 0x0c,
++    DW_MACRO_lo_user = 0xe0,
++    DW_MACRO_hi_user = 0xff,
++
++    /* Compatibility macros for the GNU .debug_macro extension.  */
++    DW_MACRO_GNU_define = 0x01,
++    DW_MACRO_GNU_undef = 0x02,
++    DW_MACRO_GNU_start_file = 0x03,
++    DW_MACRO_GNU_end_file = 0x04,
++    DW_MACRO_GNU_define_indirect = 0x05,
++    DW_MACRO_GNU_undef_indirect = 0x06,
++    DW_MACRO_GNU_transparent_include = 0x07,
++    /* Extensions for DWZ multifile.
++       See http://www.dwarfstd.org/ShowIssue.php?issue=120604.1&type=open .  */
++    DW_MACRO_GNU_define_indirect_alt = 0x08,
++    DW_MACRO_GNU_undef_indirect_alt = 0x09,
++    DW_MACRO_GNU_transparent_include_alt = 0x0a,
++    DW_MACRO_GNU_lo_user = 0xe0,
++    DW_MACRO_GNU_hi_user = 0xff
++  };
++
++/* Index attributes in the Abbreviations Table.  */
++enum dwarf_name_index_attribute
++  {
++    DW_IDX_compile_unit = 1,
++    DW_IDX_type_unit = 2,
++    DW_IDX_die_offset = 3,
++    DW_IDX_parent = 4,
++    DW_IDX_type_hash = 5,
++    DW_IDX_lo_user = 0x2000,
++    DW_IDX_hi_user = 0x3fff
++  };
++
++/* Range list entry kinds in .debug_rnglists* section.  */
++enum dwarf_range_list_entry
++  {
++    DW_RLE_end_of_list = 0x00,
++    DW_RLE_base_addressx = 0x01,
++    DW_RLE_startx_endx = 0x02,
++    DW_RLE_startx_length = 0x03,
++    DW_RLE_offset_pair = 0x04,
++    DW_RLE_base_address = 0x05,
++    DW_RLE_start_end = 0x06,
++    DW_RLE_start_length = 0x07
++  };
++
++/* Unit types in unit_type unit header field.  */
++enum dwarf_unit_type
++  {
++    DW_UT_compile = 0x01,
++    DW_UT_type = 0x02,
++    DW_UT_partial = 0x03,
++    DW_UT_skeleton = 0x04,
++    DW_UT_split_compile = 0x05,
++    DW_UT_split_type = 0x06,
++    DW_UT_lo_user = 0x80,
++    DW_UT_hi_user = 0xff
++  };
++\f
++/* @@@ For use with GNU frame unwind information.  */
++
++#define DW_EH_PE_absptr               0x00
++#define DW_EH_PE_omit         0xff
++
++#define DW_EH_PE_uleb128      0x01
++#define DW_EH_PE_udata2               0x02
++#define DW_EH_PE_udata4               0x03
++#define DW_EH_PE_udata8               0x04
++#define DW_EH_PE_sleb128      0x09
++#define DW_EH_PE_sdata2               0x0A
++#define DW_EH_PE_sdata4               0x0B
++#define DW_EH_PE_sdata8               0x0C
++#define DW_EH_PE_signed               0x08
++
++#define DW_EH_PE_pcrel                0x10
++#define DW_EH_PE_textrel      0x20
++#define DW_EH_PE_datarel      0x30
++#define DW_EH_PE_funcrel      0x40
++#define DW_EH_PE_aligned      0x50
++
++#define DW_EH_PE_indirect     0x80
++
++/* Codes for the debug sections in a dwarf package (.dwp) file.
++   Extensions for Fission.  See http://gcc.gnu.org/wiki/DebugFissionDWP.  */
++enum dwarf_sect
++  {
++    DW_SECT_INFO = 1,
++    DW_SECT_TYPES = 2,
++    DW_SECT_ABBREV = 3,
++    DW_SECT_LINE = 4,
++    DW_SECT_LOC = 5,
++    DW_SECT_STR_OFFSETS = 6,
++    DW_SECT_MACINFO = 7,
++    DW_SECT_MACRO = 8,
++    DW_SECT_MAX = 8
++  };
++
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
++/* Return the name of a DW_TAG_ constant, or NULL if the value is not
++   recognized.  */
++extern const char *get_DW_TAG_name (unsigned int tag);
++
++/* Return the name of a DW_AT_ constant, or NULL if the value is not
++   recognized.  */
++extern const char *get_DW_AT_name (unsigned int attr);
++
++/* Return the name of a DW_FORM_ constant, or NULL if the value is not
++   recognized.  */
++extern const char *get_DW_FORM_name (unsigned int form);
++
++/* Return the name of a DW_OP_ constant, or NULL if the value is not
++   recognized.  */
++extern const char *get_DW_OP_name (unsigned int op);
++
++/* Return the name of a DW_ATE_ constant, or NULL if the value is not
++   recognized.  */
++extern const char *get_DW_ATE_name (unsigned int enc);
++
++/* Return the name of a DW_CFA_ constant, or NULL if the value is not
++   recognized.  */
++extern const char *get_DW_CFA_name (unsigned int opc);
++
++#ifdef __cplusplus
++}
++#endif /* __cplusplus */
++
++#endif /* _DWARF2_H */
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e877413822626b64364f0b09922f46f579ecb0ed
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,979 @@@
++/* elf.c -- Get debug data from an ELF file for backtraces.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <stdlib.h>
++#include <string.h>
++#include <sys/types.h>
++
++#ifdef HAVE_DL_ITERATE_PHDR
++#include <link.h>
++#endif
++
++#include "backtrace.h"
++#include "internal.h"
++
++#ifndef HAVE_DL_ITERATE_PHDR
++
++/* Dummy version of dl_iterate_phdr for systems that don't have it.  */
++
++#define dl_phdr_info x_dl_phdr_info
++#define dl_iterate_phdr x_dl_iterate_phdr
++
++struct dl_phdr_info
++{
++  uintptr_t dlpi_addr;
++  const char *dlpi_name;
++};
++
++static int
++dl_iterate_phdr (int (*callback) (struct dl_phdr_info *,
++                                size_t, void *) ATTRIBUTE_UNUSED,
++               void *data ATTRIBUTE_UNUSED)
++{
++  return 0;
++}
++
++#endif /* ! defined (HAVE_DL_ITERATE_PHDR) */
++
++/* The configure script must tell us whether we are 32-bit or 64-bit
++   ELF.  We could make this code test and support either possibility,
++   but there is no point.  This code only works for the currently
++   running executable, which means that we know the ELF mode at
++   configure mode.  */
++
++#if BACKTRACE_ELF_SIZE != 32 && BACKTRACE_ELF_SIZE != 64
++#error "Unknown BACKTRACE_ELF_SIZE"
++#endif
++
++/* <link.h> might #include <elf.h> which might define our constants
++   with slightly different values.  Undefine them to be safe.  */
++
++#undef EI_NIDENT
++#undef EI_MAG0
++#undef EI_MAG1
++#undef EI_MAG2
++#undef EI_MAG3
++#undef EI_CLASS
++#undef EI_DATA
++#undef EI_VERSION
++#undef ELF_MAG0
++#undef ELF_MAG1
++#undef ELF_MAG2
++#undef ELF_MAG3
++#undef ELFCLASS32
++#undef ELFCLASS64
++#undef ELFDATA2LSB
++#undef ELFDATA2MSB
++#undef EV_CURRENT
++#undef ET_DYN
++#undef SHN_LORESERVE
++#undef SHN_XINDEX
++#undef SHN_UNDEF
++#undef SHT_SYMTAB
++#undef SHT_STRTAB
++#undef SHT_DYNSYM
++#undef STT_OBJECT
++#undef STT_FUNC
++
++/* Basic types.  */
++
++typedef uint16_t b_elf_half;    /* Elf_Half.  */
++typedef uint32_t b_elf_word;    /* Elf_Word.  */
++typedef int32_t  b_elf_sword;   /* Elf_Sword.  */
++
++#if BACKTRACE_ELF_SIZE == 32
++
++typedef uint32_t b_elf_addr;    /* Elf_Addr.  */
++typedef uint32_t b_elf_off;     /* Elf_Off.  */
++
++typedef uint32_t b_elf_wxword;  /* 32-bit Elf_Word, 64-bit ELF_Xword.  */
++
++#else
++
++typedef uint64_t b_elf_addr;    /* Elf_Addr.  */
++typedef uint64_t b_elf_off;     /* Elf_Off.  */
++typedef uint64_t b_elf_xword;   /* Elf_Xword.  */
++typedef int64_t  b_elf_sxword;  /* Elf_Sxword.  */
++
++typedef uint64_t b_elf_wxword;  /* 32-bit Elf_Word, 64-bit ELF_Xword.  */
++
++#endif
++
++/* Data structures and associated constants.  */
++
++#define EI_NIDENT 16
++
++typedef struct {
++  unsigned char       e_ident[EI_NIDENT];     /* ELF "magic number" */
++  b_elf_half  e_type;                 /* Identifies object file type */
++  b_elf_half  e_machine;              /* Specifies required architecture */
++  b_elf_word  e_version;              /* Identifies object file version */
++  b_elf_addr  e_entry;                /* Entry point virtual address */
++  b_elf_off   e_phoff;                /* Program header table file offset */
++  b_elf_off   e_shoff;                /* Section header table file offset */
++  b_elf_word  e_flags;                /* Processor-specific flags */
++  b_elf_half  e_ehsize;               /* ELF header size in bytes */
++  b_elf_half  e_phentsize;            /* Program header table entry size */
++  b_elf_half  e_phnum;                /* Program header table entry count */
++  b_elf_half  e_shentsize;            /* Section header table entry size */
++  b_elf_half  e_shnum;                /* Section header table entry count */
++  b_elf_half  e_shstrndx;             /* Section header string table index */
++} b_elf_ehdr;  /* Elf_Ehdr.  */
++
++#define EI_MAG0 0
++#define EI_MAG1 1
++#define EI_MAG2 2
++#define EI_MAG3 3
++#define EI_CLASS 4
++#define EI_DATA 5
++#define EI_VERSION 6
++
++#define ELFMAG0 0x7f
++#define ELFMAG1 'E'
++#define ELFMAG2 'L'
++#define ELFMAG3 'F'
++
++#define ELFCLASS32 1
++#define ELFCLASS64 2
++
++#define ELFDATA2LSB 1
++#define ELFDATA2MSB 2
++
++#define EV_CURRENT 1
++
++#define ET_DYN 3
++
++typedef struct {
++  b_elf_word  sh_name;                /* Section name, index in string tbl */
++  b_elf_word  sh_type;                /* Type of section */
++  b_elf_wxword        sh_flags;               /* Miscellaneous section attributes */
++  b_elf_addr  sh_addr;                /* Section virtual addr at execution */
++  b_elf_off   sh_offset;              /* Section file offset */
++  b_elf_wxword        sh_size;                /* Size of section in bytes */
++  b_elf_word  sh_link;                /* Index of another section */
++  b_elf_word  sh_info;                /* Additional section information */
++  b_elf_wxword        sh_addralign;           /* Section alignment */
++  b_elf_wxword        sh_entsize;             /* Entry size if section holds table */
++} b_elf_shdr;  /* Elf_Shdr.  */
++
++#define SHN_UNDEF     0x0000          /* Undefined section */
++#define SHN_LORESERVE 0xFF00          /* Begin range of reserved indices */
++#define SHN_XINDEX    0xFFFF          /* Section index is held elsewhere */
++
++#define SHT_SYMTAB 2
++#define SHT_STRTAB 3
++#define SHT_DYNSYM 11
++
++#if BACKTRACE_ELF_SIZE == 32
++
++typedef struct
++{
++  b_elf_word  st_name;                /* Symbol name, index in string tbl */
++  b_elf_addr  st_value;               /* Symbol value */
++  b_elf_word  st_size;                /* Symbol size */
++  unsigned char       st_info;                /* Symbol binding and type */
++  unsigned char       st_other;               /* Visibility and other data */
++  b_elf_half  st_shndx;               /* Symbol section index */
++} b_elf_sym;  /* Elf_Sym.  */
++
++#else /* BACKTRACE_ELF_SIZE != 32 */
++
++typedef struct
++{
++  b_elf_word  st_name;                /* Symbol name, index in string tbl */
++  unsigned char       st_info;                /* Symbol binding and type */
++  unsigned char       st_other;               /* Visibility and other data */
++  b_elf_half  st_shndx;               /* Symbol section index */
++  b_elf_addr  st_value;               /* Symbol value */
++  b_elf_xword st_size;                /* Symbol size */
++} b_elf_sym;  /* Elf_Sym.  */
++
++#endif /* BACKTRACE_ELF_SIZE != 32 */
++
++#define STT_OBJECT 1
++#define STT_FUNC 2
++
++/* An index of ELF sections we care about.  */
++
++enum debug_section
++{
++  DEBUG_INFO,
++  DEBUG_LINE,
++  DEBUG_ABBREV,
++  DEBUG_RANGES,
++  DEBUG_STR,
++  DEBUG_MAX
++};
++
++/* Names of sections, indexed by enum elf_section.  */
++
++static const char * const debug_section_names[DEBUG_MAX] =
++{
++  ".debug_info",
++  ".debug_line",
++  ".debug_abbrev",
++  ".debug_ranges",
++  ".debug_str"
++};
++
++/* Information we gather for the sections we care about.  */
++
++struct debug_section_info
++{
++  /* Section file offset.  */
++  off_t offset;
++  /* Section size.  */
++  size_t size;
++  /* Section contents, after read from file.  */
++  const unsigned char *data;
++};
++
++/* Information we keep for an ELF symbol.  */
++
++struct elf_symbol
++{
++  /* The name of the symbol.  */
++  const char *name;
++  /* The address of the symbol.  */
++  uintptr_t address;
++  /* The size of the symbol.  */
++  size_t size;
++};
++
++/* Information to pass to elf_syminfo.  */
++
++struct elf_syminfo_data
++{
++  /* Symbols for the next module.  */
++  struct elf_syminfo_data *next;
++  /* The ELF symbols, sorted by address.  */
++  struct elf_symbol *symbols;
++  /* The number of symbols.  */
++  size_t count;
++};
++
++/* A dummy callback function used when we can't find any debug info.  */
++
++static int
++elf_nodebug (struct backtrace_state *state ATTRIBUTE_UNUSED,
++           uintptr_t pc ATTRIBUTE_UNUSED,
++           backtrace_full_callback callback ATTRIBUTE_UNUSED,
++           backtrace_error_callback error_callback, void *data)
++{
++  error_callback (data, "no debug info in ELF executable", -1);
++  return 0;
++}
++
++/* A dummy callback function used when we can't find a symbol
++   table.  */
++
++static void
++elf_nosyms (struct backtrace_state *state ATTRIBUTE_UNUSED,
++          uintptr_t addr ATTRIBUTE_UNUSED,
++          backtrace_syminfo_callback callback ATTRIBUTE_UNUSED,
++          backtrace_error_callback error_callback, void *data)
++{
++  error_callback (data, "no symbol table in ELF executable", -1);
++}
++
++/* Compare struct elf_symbol for qsort.  */
++
++static int
++elf_symbol_compare (const void *v1, const void *v2)
++{
++  const struct elf_symbol *e1 = (const struct elf_symbol *) v1;
++  const struct elf_symbol *e2 = (const struct elf_symbol *) v2;
++
++  if (e1->address < e2->address)
++    return -1;
++  else if (e1->address > e2->address)
++    return 1;
++  else
++    return 0;
++}
++
++/* Compare an ADDR against an elf_symbol for bsearch.  We allocate one
++   extra entry in the array so that this can look safely at the next
++   entry.  */
++
++static int
++elf_symbol_search (const void *vkey, const void *ventry)
++{
++  const uintptr_t *key = (const uintptr_t *) vkey;
++  const struct elf_symbol *entry = (const struct elf_symbol *) ventry;
++  uintptr_t addr;
++
++  addr = *key;
++  if (addr < entry->address)
++    return -1;
++  else if (addr >= entry->address + entry->size)
++    return 1;
++  else
++    return 0;
++}
++
++/* Initialize the symbol table info for elf_syminfo.  */
++
++static int
++elf_initialize_syminfo (struct backtrace_state *state,
++                      uintptr_t base_address,
++                      const unsigned char *symtab_data, size_t symtab_size,
++                      const unsigned char *strtab, size_t strtab_size,
++                      backtrace_error_callback error_callback,
++                      void *data, struct elf_syminfo_data *sdata)
++{
++  size_t sym_count;
++  const b_elf_sym *sym;
++  size_t elf_symbol_count;
++  size_t elf_symbol_size;
++  struct elf_symbol *elf_symbols;
++  size_t i;
++  unsigned int j;
++
++  sym_count = symtab_size / sizeof (b_elf_sym);
++
++  /* We only care about function symbols.  Count them.  */
++  sym = (const b_elf_sym *) symtab_data;
++  elf_symbol_count = 0;
++  for (i = 0; i < sym_count; ++i, ++sym)
++    {
++      int info;
++
++      info = sym->st_info & 0xf;
++      if ((info == STT_FUNC || info == STT_OBJECT)
++        && sym->st_shndx != SHN_UNDEF)
++      ++elf_symbol_count;
++    }
++
++  elf_symbol_size = elf_symbol_count * sizeof (struct elf_symbol);
++  elf_symbols = ((struct elf_symbol *)
++               backtrace_alloc (state, elf_symbol_size, error_callback,
++                                data));
++  if (elf_symbols == NULL)
++    return 0;
++
++  sym = (const b_elf_sym *) symtab_data;
++  j = 0;
++  for (i = 0; i < sym_count; ++i, ++sym)
++    {
++      int info;
++
++      info = sym->st_info & 0xf;
++      if (info != STT_FUNC && info != STT_OBJECT)
++      continue;
++      if (sym->st_shndx == SHN_UNDEF)
++      continue;
++      if (sym->st_name >= strtab_size)
++      {
++        error_callback (data, "symbol string index out of range", 0);
++        backtrace_free (state, elf_symbols, elf_symbol_size, error_callback,
++                        data);
++        return 0;
++      }
++      elf_symbols[j].name = (const char *) strtab + sym->st_name;
++      elf_symbols[j].address = sym->st_value + base_address;
++      elf_symbols[j].size = sym->st_size;
++      ++j;
++    }
++
++  backtrace_qsort (elf_symbols, elf_symbol_count, sizeof (struct elf_symbol),
++                 elf_symbol_compare);
++
++  sdata->next = NULL;
++  sdata->symbols = elf_symbols;
++  sdata->count = elf_symbol_count;
++
++  return 1;
++}
++
++/* Add EDATA to the list in STATE.  */
++
++static void
++elf_add_syminfo_data (struct backtrace_state *state,
++                    struct elf_syminfo_data *edata)
++{
++  if (!state->threaded)
++    {
++      struct elf_syminfo_data **pp;
++
++      for (pp = (struct elf_syminfo_data **) (void *) &state->syminfo_data;
++         *pp != NULL;
++         pp = &(*pp)->next)
++      ;
++      *pp = edata;
++    }
++  else
++    {
++      while (1)
++      {
++        struct elf_syminfo_data **pp;
++
++        pp = (struct elf_syminfo_data **) (void *) &state->syminfo_data;
++
++        while (1)
++          {
++            struct elf_syminfo_data *p;
++
++            p = backtrace_atomic_load_pointer (pp);
++
++            if (p == NULL)
++              break;
++
++            pp = &p->next;
++          }
++
++        if (__sync_bool_compare_and_swap (pp, NULL, edata))
++          break;
++      }
++    }
++}
++
++/* Return the symbol name and value for an ADDR.  */
++
++static void
++elf_syminfo (struct backtrace_state *state, uintptr_t addr,
++           backtrace_syminfo_callback callback,
++           backtrace_error_callback error_callback ATTRIBUTE_UNUSED,
++           void *data)
++{
++  struct elf_syminfo_data *edata;
++  struct elf_symbol *sym = NULL;
++
++  if (!state->threaded)
++    {
++      for (edata = (struct elf_syminfo_data *) state->syminfo_data;
++         edata != NULL;
++         edata = edata->next)
++      {
++        sym = ((struct elf_symbol *)
++               bsearch (&addr, edata->symbols, edata->count,
++                        sizeof (struct elf_symbol), elf_symbol_search));
++        if (sym != NULL)
++          break;
++      }
++    }
++  else
++    {
++      struct elf_syminfo_data **pp;
++
++      pp = (struct elf_syminfo_data **) (void *) &state->syminfo_data;
++      while (1)
++      {
++        edata = backtrace_atomic_load_pointer (pp);
++        if (edata == NULL)
++          break;
++
++        sym = ((struct elf_symbol *)
++               bsearch (&addr, edata->symbols, edata->count,
++                        sizeof (struct elf_symbol), elf_symbol_search));
++        if (sym != NULL)
++          break;
++
++        pp = &edata->next;
++      }
++    }
++
++  if (sym == NULL)
++    callback (data, addr, NULL, 0, 0);
++  else
++    callback (data, addr, sym->name, sym->address, sym->size);
++}
++
++/* Add the backtrace data for one ELF file.  Returns 1 on success,
++   0 on failure (in both cases descriptor is closed) or -1 if exe
++   is non-zero and the ELF file is ET_DYN, which tells the caller that
++   elf_add will need to be called on the descriptor again after
++   base_address is determined.  */
++
++static int
++elf_add (struct backtrace_state *state, int descriptor, uintptr_t base_address,
++       backtrace_error_callback error_callback, void *data,
++       fileline *fileline_fn, int *found_sym, int *found_dwarf, int exe)
++{
++  struct backtrace_view ehdr_view;
++  b_elf_ehdr ehdr;
++  off_t shoff;
++  unsigned int shnum;
++  unsigned int shstrndx;
++  struct backtrace_view shdrs_view;
++  int shdrs_view_valid;
++  const b_elf_shdr *shdrs;
++  const b_elf_shdr *shstrhdr;
++  size_t shstr_size;
++  off_t shstr_off;
++  struct backtrace_view names_view;
++  int names_view_valid;
++  const char *names;
++  unsigned int symtab_shndx;
++  unsigned int dynsym_shndx;
++  unsigned int i;
++  struct debug_section_info sections[DEBUG_MAX];
++  struct backtrace_view symtab_view;
++  int symtab_view_valid;
++  struct backtrace_view strtab_view;
++  int strtab_view_valid;
++  off_t min_offset;
++  off_t max_offset;
++  struct backtrace_view debug_view;
++  int debug_view_valid;
++
++  *found_sym = 0;
++  *found_dwarf = 0;
++
++  shdrs_view_valid = 0;
++  names_view_valid = 0;
++  symtab_view_valid = 0;
++  strtab_view_valid = 0;
++  debug_view_valid = 0;
++
++  if (!backtrace_get_view (state, descriptor, 0, sizeof ehdr, error_callback,
++                         data, &ehdr_view))
++    goto fail;
++
++  memcpy (&ehdr, ehdr_view.data, sizeof ehdr);
++
++  backtrace_release_view (state, &ehdr_view, error_callback, data);
++
++  if (ehdr.e_ident[EI_MAG0] != ELFMAG0
++      || ehdr.e_ident[EI_MAG1] != ELFMAG1
++      || ehdr.e_ident[EI_MAG2] != ELFMAG2
++      || ehdr.e_ident[EI_MAG3] != ELFMAG3)
++    {
++      error_callback (data, "executable file is not ELF", 0);
++      goto fail;
++    }
++  if (ehdr.e_ident[EI_VERSION] != EV_CURRENT)
++    {
++      error_callback (data, "executable file is unrecognized ELF version", 0);
++      goto fail;
++    }
++
++#if BACKTRACE_ELF_SIZE == 32
++#define BACKTRACE_ELFCLASS ELFCLASS32
++#else
++#define BACKTRACE_ELFCLASS ELFCLASS64
++#endif
++
++  if (ehdr.e_ident[EI_CLASS] != BACKTRACE_ELFCLASS)
++    {
++      error_callback (data, "executable file is unexpected ELF class", 0);
++      goto fail;
++    }
++
++  if (ehdr.e_ident[EI_DATA] != ELFDATA2LSB
++      && ehdr.e_ident[EI_DATA] != ELFDATA2MSB)
++    {
++      error_callback (data, "executable file has unknown endianness", 0);
++      goto fail;
++    }
++
++  /* If the executable is ET_DYN, it is either a PIE, or we are running
++     directly a shared library with .interp.  We need to wait for
++     dl_iterate_phdr in that case to determine the actual base_address.  */
++  if (exe && ehdr.e_type == ET_DYN)
++    return -1;
++
++  shoff = ehdr.e_shoff;
++  shnum = ehdr.e_shnum;
++  shstrndx = ehdr.e_shstrndx;
++
++  if ((shnum == 0 || shstrndx == SHN_XINDEX)
++      && shoff != 0)
++    {
++      struct backtrace_view shdr_view;
++      const b_elf_shdr *shdr;
++
++      if (!backtrace_get_view (state, descriptor, shoff, sizeof shdr,
++                             error_callback, data, &shdr_view))
++      goto fail;
++
++      shdr = (const b_elf_shdr *) shdr_view.data;
++
++      if (shnum == 0)
++      shnum = shdr->sh_size;
++
++      if (shstrndx == SHN_XINDEX)
++      {
++        shstrndx = shdr->sh_link;
++
++        /* Versions of the GNU binutils between 2.12 and 2.18 did
++           not handle objects with more than SHN_LORESERVE sections
++           correctly.  All large section indexes were offset by
++           0x100.  There is more information at
++           http://sourceware.org/bugzilla/show_bug.cgi?id-5900 .
++           Fortunately these object files are easy to detect, as the
++           GNU binutils always put the section header string table
++           near the end of the list of sections.  Thus if the
++           section header string table index is larger than the
++           number of sections, then we know we have to subtract
++           0x100 to get the real section index.  */
++        if (shstrndx >= shnum && shstrndx >= SHN_LORESERVE + 0x100)
++          shstrndx -= 0x100;
++      }
++
++      backtrace_release_view (state, &shdr_view, error_callback, data);
++    }
++
++  /* To translate PC to file/line when using DWARF, we need to find
++     the .debug_info and .debug_line sections.  */
++
++  /* Read the section headers, skipping the first one.  */
++
++  if (!backtrace_get_view (state, descriptor, shoff + sizeof (b_elf_shdr),
++                         (shnum - 1) * sizeof (b_elf_shdr),
++                         error_callback, data, &shdrs_view))
++    goto fail;
++  shdrs_view_valid = 1;
++  shdrs = (const b_elf_shdr *) shdrs_view.data;
++
++  /* Read the section names.  */
++
++  shstrhdr = &shdrs[shstrndx - 1];
++  shstr_size = shstrhdr->sh_size;
++  shstr_off = shstrhdr->sh_offset;
++
++  if (!backtrace_get_view (state, descriptor, shstr_off, shstr_size,
++                         error_callback, data, &names_view))
++    goto fail;
++  names_view_valid = 1;
++  names = (const char *) names_view.data;
++
++  symtab_shndx = 0;
++  dynsym_shndx = 0;
++
++  memset (sections, 0, sizeof sections);
++
++  /* Look for the symbol table.  */
++  for (i = 1; i < shnum; ++i)
++    {
++      const b_elf_shdr *shdr;
++      unsigned int sh_name;
++      const char *name;
++      int j;
++
++      shdr = &shdrs[i - 1];
++
++      if (shdr->sh_type == SHT_SYMTAB)
++      symtab_shndx = i;
++      else if (shdr->sh_type == SHT_DYNSYM)
++      dynsym_shndx = i;
++
++      sh_name = shdr->sh_name;
++      if (sh_name >= shstr_size)
++      {
++        error_callback (data, "ELF section name out of range", 0);
++        goto fail;
++      }
++
++      name = names + sh_name;
++
++      for (j = 0; j < (int) DEBUG_MAX; ++j)
++      {
++        if (strcmp (name, debug_section_names[j]) == 0)
++          {
++            sections[j].offset = shdr->sh_offset;
++            sections[j].size = shdr->sh_size;
++            break;
++          }
++      }
++    }
++
++  if (symtab_shndx == 0)
++    symtab_shndx = dynsym_shndx;
++  if (symtab_shndx != 0)
++    {
++      const b_elf_shdr *symtab_shdr;
++      unsigned int strtab_shndx;
++      const b_elf_shdr *strtab_shdr;
++      struct elf_syminfo_data *sdata;
++
++      symtab_shdr = &shdrs[symtab_shndx - 1];
++      strtab_shndx = symtab_shdr->sh_link;
++      if (strtab_shndx >= shnum)
++      {
++        error_callback (data,
++                        "ELF symbol table strtab link out of range", 0);
++        goto fail;
++      }
++      strtab_shdr = &shdrs[strtab_shndx - 1];
++
++      if (!backtrace_get_view (state, descriptor, symtab_shdr->sh_offset,
++                             symtab_shdr->sh_size, error_callback, data,
++                             &symtab_view))
++      goto fail;
++      symtab_view_valid = 1;
++
++      if (!backtrace_get_view (state, descriptor, strtab_shdr->sh_offset,
++                             strtab_shdr->sh_size, error_callback, data,
++                             &strtab_view))
++      goto fail;
++      strtab_view_valid = 1;
++
++      sdata = ((struct elf_syminfo_data *)
++             backtrace_alloc (state, sizeof *sdata, error_callback, data));
++      if (sdata == NULL)
++      goto fail;
++
++      if (!elf_initialize_syminfo (state, base_address,
++                                 symtab_view.data, symtab_shdr->sh_size,
++                                 strtab_view.data, strtab_shdr->sh_size,
++                                 error_callback, data, sdata))
++      {
++        backtrace_free (state, sdata, sizeof *sdata, error_callback, data);
++        goto fail;
++      }
++
++      /* We no longer need the symbol table, but we hold on to the
++       string table permanently.  */
++      backtrace_release_view (state, &symtab_view, error_callback, data);
++
++      *found_sym = 1;
++
++      elf_add_syminfo_data (state, sdata);
++    }
++
++  /* FIXME: Need to handle compressed debug sections.  */
++
++  backtrace_release_view (state, &shdrs_view, error_callback, data);
++  shdrs_view_valid = 0;
++  backtrace_release_view (state, &names_view, error_callback, data);
++  names_view_valid = 0;
++
++  /* Read all the debug sections in a single view, since they are
++     probably adjacent in the file.  We never release this view.  */
++
++  min_offset = 0;
++  max_offset = 0;
++  for (i = 0; i < (int) DEBUG_MAX; ++i)
++    {
++      off_t end;
++
++      if (sections[i].size == 0)
++      continue;
++      if (min_offset == 0 || sections[i].offset < min_offset)
++      min_offset = sections[i].offset;
++      end = sections[i].offset + sections[i].size;
++      if (end > max_offset)
++      max_offset = end;
++    }
++  if (min_offset == 0 || max_offset == 0)
++    {
++      if (!backtrace_close (descriptor, error_callback, data))
++      goto fail;
++      return 1;
++    }
++
++  if (!backtrace_get_view (state, descriptor, min_offset,
++                         max_offset - min_offset,
++                         error_callback, data, &debug_view))
++    goto fail;
++  debug_view_valid = 1;
++
++  /* We've read all we need from the executable.  */
++  if (!backtrace_close (descriptor, error_callback, data))
++    goto fail;
++  descriptor = -1;
++
++  for (i = 0; i < (int) DEBUG_MAX; ++i)
++    {
++      if (sections[i].size == 0)
++      sections[i].data = NULL;
++      else
++      sections[i].data = ((const unsigned char *) debug_view.data
++                          + (sections[i].offset - min_offset));
++    }
++
++  if (!backtrace_dwarf_add (state, base_address,
++                          sections[DEBUG_INFO].data,
++                          sections[DEBUG_INFO].size,
++                          sections[DEBUG_LINE].data,
++                          sections[DEBUG_LINE].size,
++                          sections[DEBUG_ABBREV].data,
++                          sections[DEBUG_ABBREV].size,
++                          sections[DEBUG_RANGES].data,
++                          sections[DEBUG_RANGES].size,
++                          sections[DEBUG_STR].data,
++                          sections[DEBUG_STR].size,
++                          ehdr.e_ident[EI_DATA] == ELFDATA2MSB,
++                          error_callback, data, fileline_fn))
++    goto fail;
++
++  *found_dwarf = 1;
++
++  return 1;
++
++ fail:
++  if (shdrs_view_valid)
++    backtrace_release_view (state, &shdrs_view, error_callback, data);
++  if (names_view_valid)
++    backtrace_release_view (state, &names_view, error_callback, data);
++  if (symtab_view_valid)
++    backtrace_release_view (state, &symtab_view, error_callback, data);
++  if (strtab_view_valid)
++    backtrace_release_view (state, &strtab_view, error_callback, data);
++  if (debug_view_valid)
++    backtrace_release_view (state, &debug_view, error_callback, data);
++  if (descriptor != -1)
++    backtrace_close (descriptor, error_callback, data);
++  return 0;
++}
++
++/* Data passed to phdr_callback.  */
++
++struct phdr_data
++{
++  struct backtrace_state *state;
++  backtrace_error_callback error_callback;
++  void *data;
++  fileline *fileline_fn;
++  int *found_sym;
++  int *found_dwarf;
++  int exe_descriptor;
++};
++
++/* Callback passed to dl_iterate_phdr.  Load debug info from shared
++   libraries.  */
++
++static int
++#ifdef __i386__
++__attribute__ ((__force_align_arg_pointer__))
++#endif
++phdr_callback (struct dl_phdr_info *info, size_t size ATTRIBUTE_UNUSED,
++             void *pdata)
++{
++  struct phdr_data *pd = (struct phdr_data *) pdata;
++  int descriptor;
++  int does_not_exist;
++  fileline elf_fileline_fn;
++  int found_dwarf;
++
++  /* There is not much we can do if we don't have the module name,
++     unless executable is ET_DYN, where we expect the very first
++     phdr_callback to be for the PIE.  */
++  if (info->dlpi_name == NULL || info->dlpi_name[0] == '\0')
++    {
++      if (pd->exe_descriptor == -1)
++      return 0;
++      descriptor = pd->exe_descriptor;
++      pd->exe_descriptor = -1;
++    }
++  else
++    {
++      if (pd->exe_descriptor != -1)
++      {
++        backtrace_close (pd->exe_descriptor, pd->error_callback, pd->data);
++        pd->exe_descriptor = -1;
++      }
++
++      descriptor = backtrace_open (info->dlpi_name, pd->error_callback,
++                                 pd->data, &does_not_exist);
++      if (descriptor < 0)
++      return 0;
++    }
++
++  if (elf_add (pd->state, descriptor, info->dlpi_addr, pd->error_callback,
++             pd->data, &elf_fileline_fn, pd->found_sym, &found_dwarf, 0))
++    {
++      if (found_dwarf)
++      {
++        *pd->found_dwarf = 1;
++        *pd->fileline_fn = elf_fileline_fn;
++      }
++    }
++
++  return 0;
++}
++
++/* Initialize the backtrace data we need from an ELF executable.  At
++   the ELF level, all we need to do is find the debug info
++   sections.  */
++
++int
++backtrace_initialize (struct backtrace_state *state, int descriptor,
++                    backtrace_error_callback error_callback,
++                    void *data, fileline *fileline_fn)
++{
++  int ret;
++  int found_sym;
++  int found_dwarf;
++  fileline elf_fileline_fn = elf_nodebug;
++  struct phdr_data pd;
++
++  ret = elf_add (state, descriptor, 0, error_callback, data, &elf_fileline_fn,
++               &found_sym, &found_dwarf, 1);
++  if (!ret)
++    return 0;
++
++  pd.state = state;
++  pd.error_callback = error_callback;
++  pd.data = data;
++  pd.fileline_fn = &elf_fileline_fn;
++  pd.found_sym = &found_sym;
++  pd.found_dwarf = &found_dwarf;
++  pd.exe_descriptor = ret < 0 ? descriptor : -1;
++
++  dl_iterate_phdr (phdr_callback, (void *) &pd);
++
++  if (!state->threaded)
++    {
++      if (found_sym)
++      state->syminfo_fn = elf_syminfo;
++      else if (state->syminfo_fn == NULL)
++      state->syminfo_fn = elf_nosyms;
++    }
++  else
++    {
++      if (found_sym)
++      backtrace_atomic_store_pointer (&state->syminfo_fn, elf_syminfo);
++      else
++      (void) __sync_bool_compare_and_swap (&state->syminfo_fn, NULL,
++                                           elf_nosyms);
++    }
++
++  if (!state->threaded)
++    {
++      if (state->fileline_fn == NULL || state->fileline_fn == elf_nodebug)
++      *fileline_fn = elf_fileline_fn;
++    }
++  else
++    {
++      fileline current_fn;
++
++      current_fn = backtrace_atomic_load_pointer (&state->fileline_fn);
++      if (current_fn == NULL || current_fn == elf_nodebug)
++      *fileline_fn = elf_fileline_fn;
++    }
++
++  return 1;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..503bbc6bc54207113956f2c86b29c3d47792f007
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,194 @@@
++/* fileline.c -- Get file and line number information in a backtrace.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <errno.h>
++#include <fcntl.h>
++#include <stdlib.h>
++
++#include "backtrace.h"
++#include "internal.h"
++
++#ifndef HAVE_GETEXECNAME
++#define getexecname() NULL
++#endif
++
++/* Initialize the fileline information from the executable.  Returns 1
++   on success, 0 on failure.  */
++
++static int
++fileline_initialize (struct backtrace_state *state,
++                   backtrace_error_callback error_callback, void *data)
++{
++  int failed;
++  fileline fileline_fn;
++  int pass;
++  int called_error_callback;
++  int descriptor;
++
++  if (!state->threaded)
++    failed = state->fileline_initialization_failed;
++  else
++    failed = backtrace_atomic_load_int (&state->fileline_initialization_failed);
++
++  if (failed)
++    {
++      error_callback (data, "failed to read executable information", -1);
++      return 0;
++    }
++
++  if (!state->threaded)
++    fileline_fn = state->fileline_fn;
++  else
++    fileline_fn = backtrace_atomic_load_pointer (&state->fileline_fn);
++  if (fileline_fn != NULL)
++    return 1;
++
++  /* We have not initialized the information.  Do it now.  */
++
++  descriptor = -1;
++  called_error_callback = 0;
++  for (pass = 0; pass < 4; ++pass)
++    {
++      const char *filename;
++      int does_not_exist;
++
++      switch (pass)
++      {
++      case 0:
++        filename = state->filename;
++        break;
++      case 1:
++        filename = getexecname ();
++        break;
++      case 2:
++        filename = "/proc/self/exe";
++        break;
++      case 3:
++        filename = "/proc/curproc/file";
++        break;
++      default:
++        abort ();
++      }
++
++      if (filename == NULL)
++      continue;
++
++      descriptor = backtrace_open (filename, error_callback, data,
++                                 &does_not_exist);
++      if (descriptor < 0 && !does_not_exist)
++      {
++        called_error_callback = 1;
++        break;
++      }
++      if (descriptor >= 0)
++      break;
++    }
++
++  if (descriptor < 0)
++    {
++      if (!called_error_callback)
++      {
++        if (state->filename != NULL)
++          error_callback (data, state->filename, ENOENT);
++        else
++          error_callback (data,
++                          "libbacktrace could not find executable to open",
++                          0);
++      }
++      failed = 1;
++    }
++
++  if (!failed)
++    {
++      if (!backtrace_initialize (state, descriptor, error_callback, data,
++                               &fileline_fn))
++      failed = 1;
++    }
++
++  if (failed)
++    {
++      if (!state->threaded)
++      state->fileline_initialization_failed = 1;
++      else
++      backtrace_atomic_store_int (&state->fileline_initialization_failed, 1);
++      return 0;
++    }
++
++  if (!state->threaded)
++    state->fileline_fn = fileline_fn;
++  else
++    {
++      backtrace_atomic_store_pointer (&state->fileline_fn, fileline_fn);
++
++      /* Note that if two threads initialize at once, one of the data
++       sets may be leaked.  */
++    }
++
++  return 1;
++}
++
++/* Given a PC, find the file name, line number, and function name.  */
++
++int
++backtrace_pcinfo (struct backtrace_state *state, uintptr_t pc,
++                backtrace_full_callback callback,
++                backtrace_error_callback error_callback, void *data)
++{
++  if (!fileline_initialize (state, error_callback, data))
++    return 0;
++
++  if (state->fileline_initialization_failed)
++    return 0;
++
++  return state->fileline_fn (state, pc, callback, error_callback, data);
++}
++
++/* Given a PC, find the symbol for it, and its value.  */
++
++int
++backtrace_syminfo (struct backtrace_state *state, uintptr_t pc,
++                 backtrace_syminfo_callback callback,
++                 backtrace_error_callback error_callback, void *data)
++{
++  if (!fileline_initialize (state, error_callback, data))
++    return 0;
++
++  if (state->fileline_initialization_failed)
++    return 0;
++
++  state->syminfo_fn (state, pc, callback, error_callback, data);
++  return 1;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1161daaa4f3581c81c4842509aa7c7298d3bbd7b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,99 @@@
++/* Macros for taking apart, interpreting and processing file names.
++
++   These are here because some non-Posix (a.k.a. DOSish) systems have
++   drive letter brain-damage at the beginning of an absolute file name,
++   use forward- and back-slash in path names interchangeably, and
++   some of them have case-insensitive file names.
++
++   Copyright (C) 2000-2015 Free Software Foundation, Inc.
++
++This file is part of BFD, the Binary File Descriptor library.
++
++This program is free software; you can redistribute it and/or modify
++it under the terms of the GNU General Public License as published by
++the Free Software Foundation; either version 2 of the License, or
++(at your option) any later version.
++
++This program is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with this program; if not, write to the Free Software
++Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
++
++#ifndef FILENAMES_H
++#define FILENAMES_H
++
++#include "hashtab.h" /* for hashval_t */
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__)
++#  ifndef HAVE_DOS_BASED_FILE_SYSTEM
++#    define HAVE_DOS_BASED_FILE_SYSTEM 1
++#  endif
++#  ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
++#    define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1
++#  endif
++#  define HAS_DRIVE_SPEC(f) HAS_DOS_DRIVE_SPEC (f)
++#  define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c)
++#  define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f)
++#else /* not DOSish */
++#  if defined(__APPLE__)
++#    ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
++#      define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1
++#    endif
++#  endif /* __APPLE__ */
++#  define HAS_DRIVE_SPEC(f) (0)
++#  define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c)
++#  define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f)
++#endif
++
++#define IS_DIR_SEPARATOR_1(dos_based, c)                              \
++  (((c) == '/')                                                               \
++   || (((c) == '\\') && (dos_based)))
++
++#define HAS_DRIVE_SPEC_1(dos_based, f)                        \
++  ((f)[0] && ((f)[1] == ':') && (dos_based))
++
++/* Remove the drive spec from F, assuming HAS_DRIVE_SPEC (f).
++   The result is a pointer to the remainder of F.  */
++#define STRIP_DRIVE_SPEC(f)   ((f) + 2)
++
++#define IS_DOS_DIR_SEPARATOR(c) IS_DIR_SEPARATOR_1 (1, c)
++#define IS_DOS_ABSOLUTE_PATH(f) IS_ABSOLUTE_PATH_1 (1, f)
++#define HAS_DOS_DRIVE_SPEC(f) HAS_DRIVE_SPEC_1 (1, f)
++
++#define IS_UNIX_DIR_SEPARATOR(c) IS_DIR_SEPARATOR_1 (0, c)
++#define IS_UNIX_ABSOLUTE_PATH(f) IS_ABSOLUTE_PATH_1 (0, f)
++
++/* Note that when DOS_BASED is true, IS_ABSOLUTE_PATH accepts d:foo as
++   well, although it is only semi-absolute.  This is because the users
++   of IS_ABSOLUTE_PATH want to know whether to prepend the current
++   working directory to a file name, which should not be done with a
++   name like d:foo.  */
++#define IS_ABSOLUTE_PATH_1(dos_based, f)               \
++  (IS_DIR_SEPARATOR_1 (dos_based, (f)[0])              \
++   || HAS_DRIVE_SPEC_1 (dos_based, f))
++
++extern int filename_cmp (const char *s1, const char *s2);
++#define FILENAME_CMP(s1, s2)  filename_cmp(s1, s2)
++
++extern int filename_ncmp (const char *s1, const char *s2,
++                        size_t n);
++
++extern hashval_t filename_hash (const void *s);
++
++extern int filename_eq (const void *s1, const void *s2);
++
++extern int canonical_filename_eq (const char *a, const char *b);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* FILENAMES_H */
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..57bab797a9a8abc1a1310ec077786f499775cfaa
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++# An awk script to determine the type of a file.
++/\177ELF\001/ { if (NR == 1) { print "elf32"; exit } }
++/\177ELF\002/ { if (NR == 1) { print "elf64"; exit } }
++/\114\001/    { if (NR == 1) { print "pecoff"; exit } }
++/\144\206/    { if (NR == 1) { print "pecoff"; exit } }
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b1b5877aae7ca83dd2f04cc050c352b82e4a8d35
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,204 @@@
++/* An expandable hash tables datatype.  
++   Copyright (C) 1999-2015 Free Software Foundation, Inc.
++   Contributed by Vladimir Makarov (vmakarov@cygnus.com).
++
++This program is free software; you can redistribute it and/or modify
++it under the terms of the GNU General Public License as published by
++the Free Software Foundation; either version 2 of the License, or
++(at your option) any later version.
++
++This program is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with this program; if not, write to the Free Software
++Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
++
++/* This package implements basic hash table functionality.  It is possible
++   to search for an entry, create an entry and destroy an entry.
++
++   Elements in the table are generic pointers.
++
++   The size of the table is not fixed; if the occupancy of the table
++   grows too high the hash table will be expanded.
++
++   The abstract data implementation is based on generalized Algorithm D
++   from Knuth's book "The art of computer programming".  Hash table is
++   expanded by creation of new hash table and transferring elements from
++   the old table to the new table.  */
++
++#ifndef __HASHTAB_H__
++#define __HASHTAB_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
++#include "ansidecl.h"
++
++/* The type for a hash code.  */
++typedef unsigned int hashval_t;
++
++/* Callback function pointer types.  */
++
++/* Calculate hash of a table entry.  */
++typedef hashval_t (*htab_hash) (const void *);
++
++/* Compare a table entry with a possible entry.  The entry already in
++   the table always comes first, so the second element can be of a
++   different type (but in this case htab_find and htab_find_slot
++   cannot be used; instead the variants that accept a hash value
++   must be used).  */
++typedef int (*htab_eq) (const void *, const void *);
++
++/* Cleanup function called whenever a live element is removed from
++   the hash table.  */
++typedef void (*htab_del) (void *);
++  
++/* Function called by htab_traverse for each live element.  The first
++   arg is the slot of the element (which can be passed to htab_clear_slot
++   if desired), the second arg is the auxiliary pointer handed to
++   htab_traverse.  Return 1 to continue scan, 0 to stop.  */
++typedef int (*htab_trav) (void **, void *);
++
++/* Memory-allocation function, with the same functionality as calloc().
++   Iff it returns NULL, the hash table implementation will pass an error
++   code back to the user, so if your code doesn't handle errors,
++   best if you use xcalloc instead.  */
++typedef void *(*htab_alloc) (size_t, size_t);
++
++/* We also need a free() routine.  */
++typedef void (*htab_free) (void *);
++
++/* Memory allocation and deallocation; variants which take an extra
++   argument.  */
++typedef void *(*htab_alloc_with_arg) (void *, size_t, size_t);
++typedef void (*htab_free_with_arg) (void *, void *);
++
++/* This macro defines reserved value for empty table entry.  */
++
++#define HTAB_EMPTY_ENTRY    ((PTR) 0)
++
++/* This macro defines reserved value for table entry which contained
++   a deleted element. */
++
++#define HTAB_DELETED_ENTRY  ((PTR) 1)
++
++/* Hash tables are of the following type.  The structure
++   (implementation) of this type is not needed for using the hash
++   tables.  All work with hash table should be executed only through
++   functions mentioned below.  The size of this structure is subject to
++   change.  */
++
++struct htab {
++  /* Pointer to hash function.  */
++  htab_hash hash_f;
++
++  /* Pointer to comparison function.  */
++  htab_eq eq_f;
++
++  /* Pointer to cleanup function.  */
++  htab_del del_f;
++
++  /* Table itself.  */
++  void **entries;
++
++  /* Current size (in entries) of the hash table.  */
++  size_t size;
++
++  /* Current number of elements including also deleted elements.  */
++  size_t n_elements;
++
++  /* Current number of deleted elements in the table.  */
++  size_t n_deleted;
++
++  /* The following member is used for debugging. Its value is number
++     of all calls of `htab_find_slot' for the hash table. */
++  unsigned int searches;
++
++  /* The following member is used for debugging.  Its value is number
++     of collisions fixed for time of work with the hash table. */
++  unsigned int collisions;
++
++  /* Pointers to allocate/free functions.  */
++  htab_alloc alloc_f;
++  htab_free free_f;
++
++  /* Alternate allocate/free functions, which take an extra argument.  */
++  void *alloc_arg;
++  htab_alloc_with_arg alloc_with_arg_f;
++  htab_free_with_arg free_with_arg_f;
++
++  /* Current size (in entries) of the hash table, as an index into the
++     table of primes.  */
++  unsigned int size_prime_index;
++};
++
++typedef struct htab *htab_t;
++
++/* An enum saying whether we insert into the hash table or not.  */
++enum insert_option {NO_INSERT, INSERT};
++
++/* The prototypes of the package functions. */
++
++extern htab_t htab_create_alloc  (size_t, htab_hash,
++                                    htab_eq, htab_del,
++                                    htab_alloc, htab_free);
++
++extern htab_t htab_create_alloc_ex (size_t, htab_hash,
++                                      htab_eq, htab_del,
++                                      void *, htab_alloc_with_arg,
++                                      htab_free_with_arg);
++
++extern htab_t  htab_create_typed_alloc (size_t, htab_hash, htab_eq, htab_del,
++                                      htab_alloc, htab_alloc, htab_free);
++
++/* Backward-compatibility functions.  */
++extern htab_t htab_create (size_t, htab_hash, htab_eq, htab_del);
++extern htab_t htab_try_create (size_t, htab_hash, htab_eq, htab_del);
++
++extern void   htab_set_functions_ex (htab_t, htab_hash,
++                                       htab_eq, htab_del,
++                                       void *, htab_alloc_with_arg,
++                                       htab_free_with_arg);
++
++extern void   htab_delete (htab_t);
++extern void   htab_empty (htab_t);
++
++extern void * htab_find (htab_t, const void *);
++extern void **        htab_find_slot (htab_t, const void *, enum insert_option);
++extern void * htab_find_with_hash (htab_t, const void *, hashval_t);
++extern void **        htab_find_slot_with_hash (htab_t, const void *,
++                                        hashval_t, enum insert_option);
++extern void   htab_clear_slot (htab_t, void **);
++extern void   htab_remove_elt (htab_t, void *);
++extern void   htab_remove_elt_with_hash (htab_t, void *, hashval_t);
++
++extern void   htab_traverse (htab_t, htab_trav, void *);
++extern void   htab_traverse_noresize (htab_t, htab_trav, void *);
++
++extern size_t htab_size (htab_t);
++extern size_t htab_elements (htab_t);
++extern double htab_collisions (htab_t);
++
++/* A hash function for pointers.  */
++extern htab_hash htab_hash_pointer;
++
++/* An equality function for pointers.  */
++extern htab_eq htab_eq_pointer;
++
++/* A hash function for null-terminated strings.  */
++extern hashval_t htab_hash_string (const void *);
++
++/* An iterative hash function for arbitrary data.  */
++extern hashval_t iterative_hash (const void *, size_t, hashval_t);
++/* Shorthand for hashing something with an intrinsic size.  */
++#define iterative_hash_object(OB,INIT) iterative_hash (&OB, sizeof (OB), INIT)
++
++#ifdef __cplusplus
++}
++#endif /* __cplusplus */
++
++#endif /* __HASHTAB_H */
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0b0fdcbba69ab6dd05ca162a5328828d46ab1d54
new file mode 100755 (executable)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,501 @@@
++#!/bin/sh
++# install - install a program, script, or datafile
++
++scriptversion=2013-12-25.23; # UTC
++
++# This originates from X11R5 (mit/util/scripts/install.sh), which was
++# later released in X11R6 (xc/config/util/install.sh) with the
++# following copyright and license.
++#
++# Copyright (C) 1994 X Consortium
++#
++# Permission is hereby granted, free of charge, to any person obtaining a copy
++# of this software and associated documentation files (the "Software"), to
++# deal in the Software without restriction, including without limitation the
++# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
++# sell copies of the Software, and to permit persons to whom the Software is
++# furnished to do so, subject to the following conditions:
++#
++# The above copyright notice and this permission notice shall be included in
++# all copies or substantial portions of the Software.
++#
++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
++# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
++# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
++# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++#
++# Except as contained in this notice, the name of the X Consortium shall not
++# be used in advertising or otherwise to promote the sale, use or other deal-
++# ings in this Software without prior written authorization from the X Consor-
++# tium.
++#
++#
++# FSF changes to this file are in the public domain.
++#
++# Calling this script install-sh is preferred over install.sh, to prevent
++# 'make' implicit rules from creating a file called install from it
++# when there is no Makefile.
++#
++# This script is compatible with the BSD install script, but was written
++# from scratch.
++
++tab=' '
++nl='
++'
++IFS=" $tab$nl"
++
++# Set DOITPROG to "echo" to test this script.
++
++doit=${DOITPROG-}
++doit_exec=${doit:-exec}
++
++# Put in absolute file names if you don't have them in your path;
++# or use environment vars.
++
++chgrpprog=${CHGRPPROG-chgrp}
++chmodprog=${CHMODPROG-chmod}
++chownprog=${CHOWNPROG-chown}
++cmpprog=${CMPPROG-cmp}
++cpprog=${CPPROG-cp}
++mkdirprog=${MKDIRPROG-mkdir}
++mvprog=${MVPROG-mv}
++rmprog=${RMPROG-rm}
++stripprog=${STRIPPROG-strip}
++
++posix_mkdir=
++
++# Desired mode of installed file.
++mode=0755
++
++chgrpcmd=
++chmodcmd=$chmodprog
++chowncmd=
++mvcmd=$mvprog
++rmcmd="$rmprog -f"
++stripcmd=
++
++src=
++dst=
++dir_arg=
++dst_arg=
++
++copy_on_change=false
++is_target_a_directory=possibly
++
++usage="\
++Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
++   or: $0 [OPTION]... SRCFILES... DIRECTORY
++   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
++   or: $0 [OPTION]... -d DIRECTORIES...
++
++In the 1st form, copy SRCFILE to DSTFILE.
++In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
++In the 4th, create DIRECTORIES.
++
++Options:
++     --help     display this help and exit.
++     --version  display version info and exit.
++
++  -c            (ignored)
++  -C            install only if different (preserve the last data modification time)
++  -d            create directories instead of installing files.
++  -g GROUP      $chgrpprog installed files to GROUP.
++  -m MODE       $chmodprog installed files to MODE.
++  -o USER       $chownprog installed files to USER.
++  -s            $stripprog installed files.
++  -t DIRECTORY  install into DIRECTORY.
++  -T            report an error if DSTFILE is a directory.
++
++Environment variables override the default commands:
++  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
++  RMPROG STRIPPROG
++"
++
++while test $# -ne 0; do
++  case $1 in
++    -c) ;;
++
++    -C) copy_on_change=true;;
++
++    -d) dir_arg=true;;
++
++    -g) chgrpcmd="$chgrpprog $2"
++        shift;;
++
++    --help) echo "$usage"; exit $?;;
++
++    -m) mode=$2
++        case $mode in
++          *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
++            echo "$0: invalid mode: $mode" >&2
++            exit 1;;
++        esac
++        shift;;
++
++    -o) chowncmd="$chownprog $2"
++        shift;;
++
++    -s) stripcmd=$stripprog;;
++
++    -t)
++        is_target_a_directory=always
++        dst_arg=$2
++        # Protect names problematic for 'test' and other utilities.
++        case $dst_arg in
++          -* | [=\(\)!]) dst_arg=./$dst_arg;;
++        esac
++        shift;;
++
++    -T) is_target_a_directory=never;;
++
++    --version) echo "$0 $scriptversion"; exit $?;;
++
++    --) shift
++        break;;
++
++    -*) echo "$0: invalid option: $1" >&2
++        exit 1;;
++
++    *)  break;;
++  esac
++  shift
++done
++
++# We allow the use of options -d and -T together, by making -d
++# take the precedence; this is for compatibility with GNU install.
++
++if test -n "$dir_arg"; then
++  if test -n "$dst_arg"; then
++    echo "$0: target directory not allowed when installing a directory." >&2
++    exit 1
++  fi
++fi
++
++if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
++  # When -d is used, all remaining arguments are directories to create.
++  # When -t is used, the destination is already specified.
++  # Otherwise, the last argument is the destination.  Remove it from $@.
++  for arg
++  do
++    if test -n "$dst_arg"; then
++      # $@ is not empty: it contains at least $arg.
++      set fnord "$@" "$dst_arg"
++      shift # fnord
++    fi
++    shift # arg
++    dst_arg=$arg
++    # Protect names problematic for 'test' and other utilities.
++    case $dst_arg in
++      -* | [=\(\)!]) dst_arg=./$dst_arg;;
++    esac
++  done
++fi
++
++if test $# -eq 0; then
++  if test -z "$dir_arg"; then
++    echo "$0: no input file specified." >&2
++    exit 1
++  fi
++  # It's OK to call 'install-sh -d' without argument.
++  # This can happen when creating conditional directories.
++  exit 0
++fi
++
++if test -z "$dir_arg"; then
++  if test $# -gt 1 || test "$is_target_a_directory" = always; then
++    if test ! -d "$dst_arg"; then
++      echo "$0: $dst_arg: Is not a directory." >&2
++      exit 1
++    fi
++  fi
++fi
++
++if test -z "$dir_arg"; then
++  do_exit='(exit $ret); exit $ret'
++  trap "ret=129; $do_exit" 1
++  trap "ret=130; $do_exit" 2
++  trap "ret=141; $do_exit" 13
++  trap "ret=143; $do_exit" 15
++
++  # Set umask so as not to create temps with too-generous modes.
++  # However, 'strip' requires both read and write access to temps.
++  case $mode in
++    # Optimize common cases.
++    *644) cp_umask=133;;
++    *755) cp_umask=22;;
++
++    *[0-7])
++      if test -z "$stripcmd"; then
++        u_plus_rw=
++      else
++        u_plus_rw='% 200'
++      fi
++      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
++    *)
++      if test -z "$stripcmd"; then
++        u_plus_rw=
++      else
++        u_plus_rw=,u+rw
++      fi
++      cp_umask=$mode$u_plus_rw;;
++  esac
++fi
++
++for src
++do
++  # Protect names problematic for 'test' and other utilities.
++  case $src in
++    -* | [=\(\)!]) src=./$src;;
++  esac
++
++  if test -n "$dir_arg"; then
++    dst=$src
++    dstdir=$dst
++    test -d "$dstdir"
++    dstdir_status=$?
++  else
++
++    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
++    # might cause directories to be created, which would be especially bad
++    # if $src (and thus $dsttmp) contains '*'.
++    if test ! -f "$src" && test ! -d "$src"; then
++      echo "$0: $src does not exist." >&2
++      exit 1
++    fi
++
++    if test -z "$dst_arg"; then
++      echo "$0: no destination specified." >&2
++      exit 1
++    fi
++    dst=$dst_arg
++
++    # If destination is a directory, append the input filename; won't work
++    # if double slashes aren't ignored.
++    if test -d "$dst"; then
++      if test "$is_target_a_directory" = never; then
++        echo "$0: $dst_arg: Is a directory" >&2
++        exit 1
++      fi
++      dstdir=$dst
++      dst=$dstdir/`basename "$src"`
++      dstdir_status=0
++    else
++      dstdir=`dirname "$dst"`
++      test -d "$dstdir"
++      dstdir_status=$?
++    fi
++  fi
++
++  obsolete_mkdir_used=false
++
++  if test $dstdir_status != 0; then
++    case $posix_mkdir in
++      '')
++        # Create intermediate dirs using mode 755 as modified by the umask.
++        # This is like FreeBSD 'install' as of 1997-10-28.
++        umask=`umask`
++        case $stripcmd.$umask in
++          # Optimize common cases.
++          *[2367][2367]) mkdir_umask=$umask;;
++          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
++
++          *[0-7])
++            mkdir_umask=`expr $umask + 22 \
++              - $umask % 100 % 40 + $umask % 20 \
++              - $umask % 10 % 4 + $umask % 2
++            `;;
++          *) mkdir_umask=$umask,go-w;;
++        esac
++
++        # With -d, create the new directory with the user-specified mode.
++        # Otherwise, rely on $mkdir_umask.
++        if test -n "$dir_arg"; then
++          mkdir_mode=-m$mode
++        else
++          mkdir_mode=
++        fi
++
++        posix_mkdir=false
++        case $umask in
++          *[123567][0-7][0-7])
++            # POSIX mkdir -p sets u+wx bits regardless of umask, which
++            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
++            ;;
++          *)
++            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
++            trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
++
++            if (umask $mkdir_umask &&
++                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
++            then
++              if test -z "$dir_arg" || {
++                   # Check for POSIX incompatibilities with -m.
++                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
++                   # other-writable bit of parent directory when it shouldn't.
++                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
++                   ls_ld_tmpdir=`ls -ld "$tmpdir"`
++                   case $ls_ld_tmpdir in
++                     d????-?r-*) different_mode=700;;
++                     d????-?--*) different_mode=755;;
++                     *) false;;
++                   esac &&
++                   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
++                     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
++                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
++                   }
++                 }
++              then posix_mkdir=:
++              fi
++              rmdir "$tmpdir/d" "$tmpdir"
++            else
++              # Remove any dirs left behind by ancient mkdir implementations.
++              rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
++            fi
++            trap '' 0;;
++        esac;;
++    esac
++
++    if
++      $posix_mkdir && (
++        umask $mkdir_umask &&
++        $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
++      )
++    then :
++    else
++
++      # The umask is ridiculous, or mkdir does not conform to POSIX,
++      # or it failed possibly due to a race condition.  Create the
++      # directory the slow way, step by step, checking for races as we go.
++
++      case $dstdir in
++        /*) prefix='/';;
++        [-=\(\)!]*) prefix='./';;
++        *)  prefix='';;
++      esac
++
++      oIFS=$IFS
++      IFS=/
++      set -f
++      set fnord $dstdir
++      shift
++      set +f
++      IFS=$oIFS
++
++      prefixes=
++
++      for d
++      do
++        test X"$d" = X && continue
++
++        prefix=$prefix$d
++        if test -d "$prefix"; then
++          prefixes=
++        else
++          if $posix_mkdir; then
++            (umask=$mkdir_umask &&
++             $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
++            # Don't fail if two instances are running concurrently.
++            test -d "$prefix" || exit 1
++          else
++            case $prefix in
++              *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
++              *) qprefix=$prefix;;
++            esac
++            prefixes="$prefixes '$qprefix'"
++          fi
++        fi
++        prefix=$prefix/
++      done
++
++      if test -n "$prefixes"; then
++        # Don't fail if two instances are running concurrently.
++        (umask $mkdir_umask &&
++         eval "\$doit_exec \$mkdirprog $prefixes") ||
++          test -d "$dstdir" || exit 1
++        obsolete_mkdir_used=true
++      fi
++    fi
++  fi
++
++  if test -n "$dir_arg"; then
++    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
++    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
++    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
++      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
++  else
++
++    # Make a couple of temp file names in the proper directory.
++    dsttmp=$dstdir/_inst.$$_
++    rmtmp=$dstdir/_rm.$$_
++
++    # Trap to clean up those temp files at exit.
++    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
++
++    # Copy the file name to the temp name.
++    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
++
++    # and set any options; do chmod last to preserve setuid bits.
++    #
++    # If any of these fail, we abort the whole thing.  If we want to
++    # ignore errors from any of these, just make sure not to ignore
++    # errors from the above "$doit $cpprog $src $dsttmp" command.
++    #
++    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
++    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
++    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
++    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
++
++    # If -C, don't bother to copy if it wouldn't change the file.
++    if $copy_on_change &&
++       old=`LC_ALL=C ls -dlL "$dst"     2>/dev/null` &&
++       new=`LC_ALL=C ls -dlL "$dsttmp"  2>/dev/null` &&
++       set -f &&
++       set X $old && old=:$2:$4:$5:$6 &&
++       set X $new && new=:$2:$4:$5:$6 &&
++       set +f &&
++       test "$old" = "$new" &&
++       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
++    then
++      rm -f "$dsttmp"
++    else
++      # Rename the file to the real destination.
++      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
++
++      # The rename failed, perhaps because mv can't rename something else
++      # to itself, or perhaps because mv is so ancient that it does not
++      # support -f.
++      {
++        # Now remove or move aside any old file at destination location.
++        # We try this two ways since rm can't unlink itself on some
++        # systems and the destination file might be busy for other
++        # reasons.  In this case, the final cleanup might fail but the new
++        # file should still install successfully.
++        {
++          test ! -f "$dst" ||
++          $doit $rmcmd -f "$dst" 2>/dev/null ||
++          { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
++            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
++          } ||
++          { echo "$0: cannot unlink or rename $dst" >&2
++            (exit 1); exit 1
++          }
++        } &&
++
++        # Now rename the file to the real destination.
++        $doit $mvcmd "$dsttmp" "$dst"
++      }
++    fi || exit 1
++
++    trap '' 0
++  fi
++done
++
++# Local variables:
++# eval: (add-hook 'write-file-hooks 'time-stamp)
++# time-stamp-start: "scriptversion="
++# time-stamp-format: "%:y-%02m-%02d.%02H"
++# time-stamp-time-zone: "UTC"
++# time-stamp-end: "; # UTC"
++# End:
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..aab4e2a007a5a501c546016267a87d7373362e54
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,294 @@@
++/* internal.h -- Internal header file for stack backtrace library.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#ifndef BACKTRACE_INTERNAL_H
++#define BACKTRACE_INTERNAL_H
++
++/* We assume that <sys/types.h> and "backtrace.h" have already been
++   included.  */
++
++#ifndef GCC_VERSION
++# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
++#endif
++
++#if (GCC_VERSION < 2007)
++# define __attribute__(x)
++#endif
++
++#ifndef ATTRIBUTE_UNUSED
++# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
++#endif
++
++#ifndef ATTRIBUTE_MALLOC
++# if (GCC_VERSION >= 2096)
++#  define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
++# else
++#  define ATTRIBUTE_MALLOC
++# endif
++#endif
++
++#ifndef HAVE_SYNC_FUNCTIONS
++
++/* Define out the sync functions.  These should never be called if
++   they are not available.  */
++
++#define __sync_bool_compare_and_swap(A, B, C) (abort(), 1)
++#define __sync_lock_test_and_set(A, B) (abort(), 0)
++#define __sync_lock_release(A) abort()
++
++#endif /* !defined (HAVE_SYNC_FUNCTIONS) */
++
++#ifdef HAVE_ATOMIC_FUNCTIONS
++
++/* We have the atomic builtin functions.  */
++
++#define backtrace_atomic_load_pointer(p) \
++    __atomic_load_n ((p), __ATOMIC_ACQUIRE)
++#define backtrace_atomic_load_int(p) \
++    __atomic_load_n ((p), __ATOMIC_ACQUIRE)
++#define backtrace_atomic_store_pointer(p, v) \
++    __atomic_store_n ((p), (v), __ATOMIC_RELEASE)
++#define backtrace_atomic_store_size_t(p, v) \
++    __atomic_store_n ((p), (v), __ATOMIC_RELEASE)
++#define backtrace_atomic_store_int(p, v) \
++    __atomic_store_n ((p), (v), __ATOMIC_RELEASE)
++
++#else /* !defined (HAVE_ATOMIC_FUNCTIONS) */
++#ifdef HAVE_SYNC_FUNCTIONS
++
++/* We have the sync functions but not the atomic functions.  Define
++   the atomic ones in terms of the sync ones.  */
++
++extern void *backtrace_atomic_load_pointer (void *);
++extern int backtrace_atomic_load_int (int *);
++extern void backtrace_atomic_store_pointer (void *, void *);
++extern void backtrace_atomic_store_size_t (size_t *, size_t);
++extern void backtrace_atomic_store_int (int *, int);
++
++#else /* !defined (HAVE_SYNC_FUNCTIONS) */
++
++/* We have neither the sync nor the atomic functions.  These will
++   never be called.  */
++
++#define backtrace_atomic_load_pointer(p) (abort(), (void *) NULL)
++#define backtrace_atomic_load_int(p) (abort(), 0)
++#define backtrace_atomic_store_pointer(p, v) abort()
++#define backtrace_atomic_store_size_t(p, v) abort()
++#define backtrace_atomic_store_int(p, v) abort()
++
++#endif /* !defined (HAVE_SYNC_FUNCTIONS) */
++#endif /* !defined (HAVE_ATOMIC_FUNCTIONS) */
++
++/* The type of the function that collects file/line information.  This
++   is like backtrace_pcinfo.  */
++
++typedef int (*fileline) (struct backtrace_state *state, uintptr_t pc,
++                       backtrace_full_callback callback,
++                       backtrace_error_callback error_callback, void *data);
++
++/* The type of the function that collects symbol information.  This is
++   like backtrace_syminfo.  */
++
++typedef void (*syminfo) (struct backtrace_state *state, uintptr_t pc,
++                       backtrace_syminfo_callback callback,
++                       backtrace_error_callback error_callback, void *data);
++
++/* What the backtrace state pointer points to.  */
++
++struct backtrace_state
++{
++  /* The name of the executable.  */
++  const char *filename;
++  /* Non-zero if threaded.  */
++  int threaded;
++  /* The master lock for fileline_fn, fileline_data, syminfo_fn,
++     syminfo_data, fileline_initialization_failed and everything the
++     data pointers point to.  */
++  void *lock;
++  /* The function that returns file/line information.  */
++  fileline fileline_fn;
++  /* The data to pass to FILELINE_FN.  */
++  void *fileline_data;
++  /* The function that returns symbol information.  */
++  syminfo syminfo_fn;
++  /* The data to pass to SYMINFO_FN.  */
++  void *syminfo_data;
++  /* Whether initializing the file/line information failed.  */
++  int fileline_initialization_failed;
++  /* The lock for the freelist.  */
++  int lock_alloc;
++  /* The freelist when using mmap.  */
++  struct backtrace_freelist_struct *freelist;
++};
++
++/* Open a file for reading.  Returns -1 on error.  If DOES_NOT_EXIST
++   is not NULL, *DOES_NOT_EXIST will be set to 0 normally and set to 1
++   if the file does not exist.  If the file does not exist and
++   DOES_NOT_EXIST is not NULL, the function will return -1 and will
++   not call ERROR_CALLBACK.  On other errors, or if DOES_NOT_EXIST is
++   NULL, the function will call ERROR_CALLBACK before returning.  */
++extern int backtrace_open (const char *filename,
++                         backtrace_error_callback error_callback,
++                         void *data,
++                         int *does_not_exist);
++
++/* A view of the contents of a file.  This supports mmap when
++   available.  A view will remain in memory even after backtrace_close
++   is called on the file descriptor from which the view was
++   obtained.  */
++
++struct backtrace_view
++{
++  /* The data that the caller requested.  */
++  const void *data;
++  /* The base of the view.  */
++  void *base;
++  /* The total length of the view.  */
++  size_t len;
++};
++
++/* Create a view of SIZE bytes from DESCRIPTOR at OFFSET.  Store the
++   result in *VIEW.  Returns 1 on success, 0 on error.  */
++extern int backtrace_get_view (struct backtrace_state *state, int descriptor,
++                             off_t offset, size_t size,
++                             backtrace_error_callback error_callback,
++                             void *data, struct backtrace_view *view);
++
++/* Release a view created by backtrace_get_view.  */
++extern void backtrace_release_view (struct backtrace_state *state,
++                                  struct backtrace_view *view,
++                                  backtrace_error_callback error_callback,
++                                  void *data);
++
++/* Close a file opened by backtrace_open.  Returns 1 on success, 0 on
++   error.  */
++
++extern int backtrace_close (int descriptor,
++                          backtrace_error_callback error_callback,
++                          void *data);
++
++/* Sort without using memory.  */
++
++extern void backtrace_qsort (void *base, size_t count, size_t size,
++                           int (*compar) (const void *, const void *));
++
++/* Allocate memory.  This is like malloc.  If ERROR_CALLBACK is NULL,
++   this does not report an error, it just returns NULL.  */
++
++extern void *backtrace_alloc (struct backtrace_state *state, size_t size,
++                            backtrace_error_callback error_callback,
++                            void *data) ATTRIBUTE_MALLOC;
++
++/* Free memory allocated by backtrace_alloc.  If ERROR_CALLBACK is
++   NULL, this does not report an error.  */
++
++extern void backtrace_free (struct backtrace_state *state, void *mem,
++                          size_t size,
++                          backtrace_error_callback error_callback,
++                          void *data);
++
++/* A growable vector of some struct.  This is used for more efficient
++   allocation when we don't know the final size of some group of data
++   that we want to represent as an array.  */
++
++struct backtrace_vector
++{
++  /* The base of the vector.  */
++  void *base;
++  /* The number of bytes in the vector.  */
++  size_t size;
++  /* The number of bytes available at the current allocation.  */
++  size_t alc;
++};
++
++/* Grow VEC by SIZE bytes.  Return a pointer to the newly allocated
++   bytes.  Note that this may move the entire vector to a new memory
++   location.  Returns NULL on failure.  */
++
++extern void *backtrace_vector_grow (struct backtrace_state *state, size_t size,
++                                  backtrace_error_callback error_callback,
++                                  void *data,
++                                  struct backtrace_vector *vec);
++
++/* Finish the current allocation on VEC.  Prepare to start a new
++   allocation.  The finished allocation will never be freed.  Returns
++   a pointer to the base of the finished entries, or NULL on
++   failure.  */
++
++extern void* backtrace_vector_finish (struct backtrace_state *state,
++                                    struct backtrace_vector *vec,
++                                    backtrace_error_callback error_callback,
++                                    void *data);
++
++/* Release any extra space allocated for VEC.  This may change
++   VEC->base.  Returns 1 on success, 0 on failure.  */
++
++extern int backtrace_vector_release (struct backtrace_state *state,
++                                   struct backtrace_vector *vec,
++                                   backtrace_error_callback error_callback,
++                                   void *data);
++
++/* Read initial debug data from a descriptor, and set the
++   fileline_data, syminfo_fn, and syminfo_data fields of STATE.
++   Return the fileln_fn field in *FILELN_FN--this is done this way so
++   that the synchronization code is only implemented once.  This is
++   called after the descriptor has first been opened.  It will close
++   the descriptor if it is no longer needed.  Returns 1 on success, 0
++   on error.  There will be multiple implementations of this function,
++   for different file formats.  Each system will compile the
++   appropriate one.  */
++
++extern int backtrace_initialize (struct backtrace_state *state,
++                               int descriptor,
++                               backtrace_error_callback error_callback,
++                               void *data,
++                               fileline *fileline_fn);
++
++/* Add file/line information for a DWARF module.  */
++
++extern int backtrace_dwarf_add (struct backtrace_state *state,
++                              uintptr_t base_address,
++                              const unsigned char* dwarf_info,
++                              size_t dwarf_info_size,
++                              const unsigned char *dwarf_line,
++                              size_t dwarf_line_size,
++                              const unsigned char *dwarf_abbrev,
++                              size_t dwarf_abbrev_size,
++                              const unsigned char *dwarf_ranges,
++                              size_t dwarf_range_size,
++                              const unsigned char *dwarf_str,
++                              size_t dwarf_str_size,
++                              int is_bigendian,
++                              backtrace_error_callback error_callback,
++                              void *data, fileline *fileline_fn);
++
++#endif
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9503ec85d709d8f7fdad222ef3c4d8d85fdc6cd1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,8636 @@@
++# Generated from ltmain.m4sh.
++
++# libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a
++# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
++
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
++# 2007, 2008, 2009 Free Software Foundation, Inc.
++# This is free software; see the source for copying conditions.  There is NO
++# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
++
++# GNU Libtool is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# As a special exception to the GNU General Public License,
++# if you distribute this file as part of a program or library that
++# is built using GNU Libtool, you may include this file under the
++# same distribution terms that you use for the rest of that program.
++#
++# GNU Libtool is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++# General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with GNU Libtool; see the file COPYING.  If not, a copy
++# can be downloaded from http://www.gnu.org/licenses/gpl.html,
++# or obtained by writing to the Free Software Foundation, Inc.,
++# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++
++# Usage: $progname [OPTION]... [MODE-ARG]...
++#
++# Provide generalized library-building support services.
++#
++#       --config             show all configuration variables
++#       --debug              enable verbose shell tracing
++#   -n, --dry-run            display commands without modifying any files
++#       --features           display basic configuration information and exit
++#       --mode=MODE          use operation mode MODE
++#       --no-finish          let install mode avoid finish commands
++#       --preserve-dup-deps  don't remove duplicate dependency libraries
++#       --quiet, --silent    don't print informational messages
++#       --no-quiet, --no-silent
++#                            print informational messages (default)
++#       --tag=TAG            use configuration variables from tag TAG
++#   -v, --verbose            print more informational messages than default
++#       --no-verbose         don't print the extra informational messages
++#       --version            print version information
++#   -h, --help, --help-all   print short, long, or detailed help message
++#
++# MODE must be one of the following:
++#
++#         clean              remove files from the build directory
++#         compile            compile a source file into a libtool object
++#         execute            automatically set library path, then run a program
++#         finish             complete the installation of libtool libraries
++#         install            install libraries or executables
++#         link               create a library or an executable
++#         uninstall          remove libraries from an installed directory
++#
++# MODE-ARGS vary depending on the MODE.  When passed as first option,
++# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
++# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
++#
++# When reporting a bug, please describe a test case to reproduce it and
++# include the following information:
++#
++#         host-triplet:       $host
++#         shell:              $SHELL
++#         compiler:           $LTCC
++#         compiler flags:             $LTCFLAGS
++#         linker:             $LD (gnu? $with_gnu_ld)
++#         $progname:  (GNU libtool 1.3134 2009-11-29) 2.2.7a
++#         automake:   $automake_version
++#         autoconf:   $autoconf_version
++#
++# Report bugs to <bug-libtool@gnu.org>.
++
++PROGRAM=libtool
++PACKAGE=libtool
++VERSION=2.2.7a
++TIMESTAMP=" 1.3134 2009-11-29"
++package_revision=1.3134
++
++# Be Bourne compatible
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++  emulate sh
++  NULLCMD=:
++  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++  # is contrary to our usage.  Disable this feature.
++  alias -g '${1+"$@"}'='"$@"'
++  setopt NO_GLOB_SUBST
++else
++  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
++fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
++DUALCASE=1; export DUALCASE # for MKS sh
++
++# A function that is used when there is no print builtin or printf.
++func_fallback_echo ()
++{
++  eval 'cat <<_LTECHO_EOF
++$1
++_LTECHO_EOF'
++}
++
++# NLS nuisances: We save the old values to restore during execute mode.
++# Only set LANG and LC_ALL to C if already set.
++# These must not be set unconditionally because not all systems understand
++# e.g. LANG=C (notably SCO).
++lt_user_locale=
++lt_safe_locale=
++for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
++do
++  eval "if test \"\${$lt_var+set}\" = set; then
++          save_$lt_var=\$$lt_var
++          $lt_var=C
++        export $lt_var
++        lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
++        lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
++      fi"
++done
++
++$lt_unset CDPATH
++
++
++
++
++
++
++
++# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
++# is ksh but when the shell is invoked as "sh" and the current value of
++# the _XPG environment variable is not equal to 1 (one), the special
++# positional parameter $0, within a function call, is the name of the
++# function.
++progpath="$0"
++
++
++
++: ${CP="cp -f"}
++: ${ECHO=$as_echo}
++: ${EGREP="/bin/grep -E"}
++: ${FGREP="/bin/grep -F"}
++: ${GREP="/bin/grep"}
++: ${LN_S="ln -s"}
++: ${MAKE="make"}
++: ${MKDIR="mkdir"}
++: ${MV="mv -f"}
++: ${RM="rm -f"}
++: ${SED="/mount/endor/wildenhu/local-x86_64/bin/sed"}
++: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
++: ${Xsed="$SED -e 1s/^X//"}
++
++# Global variables:
++EXIT_SUCCESS=0
++EXIT_FAILURE=1
++EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
++EXIT_SKIP=77    # $? = 77 is used to indicate a skipped test to automake.
++
++exit_status=$EXIT_SUCCESS
++
++# Make sure IFS has a sensible default
++lt_nl='
++'
++IFS="         $lt_nl"
++
++dirname="s,/[^/]*$,,"
++basename="s,^.*/,,"
++
++# func_dirname_and_basename file append nondir_replacement
++# perform func_basename and func_dirname in a single function
++# call:
++#   dirname:  Compute the dirname of FILE.  If nonempty,
++#             add APPEND to the result, otherwise set result
++#             to NONDIR_REPLACEMENT.
++#             value returned in "$func_dirname_result"
++#   basename: Compute filename of FILE.
++#             value retuned in "$func_basename_result"
++# Implementation must be kept synchronized with func_dirname
++# and func_basename. For efficiency, we do not delegate to
++# those functions but instead duplicate the functionality here.
++func_dirname_and_basename ()
++{
++  # Extract subdirectory from the argument.
++  func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
++  if test "X$func_dirname_result" = "X${1}"; then
++    func_dirname_result="${3}"
++  else
++    func_dirname_result="$func_dirname_result${2}"
++  fi
++  func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
++}
++
++# Generated shell functions inserted here.
++
++# These SED scripts presuppose an absolute path with a trailing slash.
++pathcar='s,^/\([^/]*\).*$,\1,'
++pathcdr='s,^/[^/]*,,'
++removedotparts=':dotsl
++              s@/\./@/@g
++              t dotsl
++              s,/\.$,/,'
++collapseslashes='s@/\{1,\}@/@g'
++finalslash='s,/*$,/,'
++
++# func_normal_abspath PATH
++# Remove doubled-up and trailing slashes, "." path components,
++# and cancel out any ".." path components in PATH after making
++# it an absolute path.
++#             value returned in "$func_normal_abspath_result"
++func_normal_abspath ()
++{
++  # Start from root dir and reassemble the path.
++  func_normal_abspath_result=
++  func_normal_abspath_tpath=$1
++  func_normal_abspath_altnamespace=
++  case $func_normal_abspath_tpath in
++    "")
++      # Empty path, that just means $cwd.
++      func_stripname '' '/' "`pwd`"
++      func_normal_abspath_result=$func_stripname_result
++      return
++    ;;
++    # The next three entries are used to spot a run of precisely
++    # two leading slashes without using negated character classes;
++    # we take advantage of case's first-match behaviour.
++    ///*)
++      # Unusual form of absolute path, do nothing.
++    ;;
++    //*)
++      # Not necessarily an ordinary path; POSIX reserves leading '//'
++      # and for example Cygwin uses it to access remote file shares
++      # over CIFS/SMB, so we conserve a leading double slash if found.
++      func_normal_abspath_altnamespace=/
++    ;;
++    /*)
++      # Absolute path, do nothing.
++    ;;
++    *)
++      # Relative path, prepend $cwd.
++      func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
++    ;;
++  esac
++  # Cancel out all the simple stuff to save iterations.  We also want
++  # the path to end with a slash for ease of parsing, so make sure
++  # there is one (and only one) here.
++  func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
++        -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
++  while :; do
++    # Processed it all yet?
++    if test "$func_normal_abspath_tpath" = / ; then
++      # If we ascended to the root using ".." the result may be empty now.
++      if test -z "$func_normal_abspath_result" ; then
++        func_normal_abspath_result=/
++      fi
++      break
++    fi
++    func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
++        -e "$pathcar"`
++    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
++        -e "$pathcdr"`
++    # Figure out what to do with it
++    case $func_normal_abspath_tcomponent in
++      "")
++        # Trailing empty path component, ignore it.
++      ;;
++      ..)
++        # Parent dir; strip last assembled component from result.
++        func_dirname "$func_normal_abspath_result"
++        func_normal_abspath_result=$func_dirname_result
++      ;;
++      *)
++        # Actual path component, append it.
++        func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
++      ;;
++    esac
++  done
++  # Restore leading double-slash if one was found on entry.
++  func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
++}
++
++# func_relative_path SRCDIR DSTDIR
++# generates a relative path from SRCDIR to DSTDIR, with a trailing
++# slash if non-empty, suitable for immediately appending a filename
++# without needing to append a separator.
++#             value returned in "$func_relative_path_result"
++func_relative_path ()
++{
++  func_relative_path_result=
++  func_normal_abspath "$1"
++  func_relative_path_tlibdir=$func_normal_abspath_result
++  func_normal_abspath "$2"
++  func_relative_path_tbindir=$func_normal_abspath_result
++
++  # Ascend the tree starting from libdir
++  while :; do
++    # check if we have found a prefix of bindir
++    case $func_relative_path_tbindir in
++      $func_relative_path_tlibdir)
++        # found an exact match
++        func_relative_path_tcancelled=
++        break
++        ;;
++      $func_relative_path_tlibdir*)
++        # found a matching prefix
++        func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
++        func_relative_path_tcancelled=$func_stripname_result
++        if test -z "$func_relative_path_result"; then
++          func_relative_path_result=.
++        fi
++        break
++        ;;
++      *)
++        func_dirname $func_relative_path_tlibdir
++        func_relative_path_tlibdir=${func_dirname_result}
++        if test "x$func_relative_path_tlibdir" = x ; then
++          # Have to descend all the way to the root!
++          func_relative_path_result=../$func_relative_path_result
++          func_relative_path_tcancelled=$func_relative_path_tbindir
++          break
++        fi
++        func_relative_path_result=../$func_relative_path_result
++        ;;
++    esac
++  done
++
++  # Now calculate path; take care to avoid doubling-up slashes.
++  func_stripname '' '/' "$func_relative_path_result"
++  func_relative_path_result=$func_stripname_result
++  func_stripname '/' '/' "$func_relative_path_tcancelled"
++  if test "x$func_stripname_result" != x ; then
++    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
++  fi
++
++  # Normalisation. If bindir is libdir, return empty string,
++  # else relative path ending with a slash; either way, target
++  # file name can be directly appended.
++  if test ! -z "$func_relative_path_result"; then
++    func_stripname './' '' "$func_relative_path_result/"
++    func_relative_path_result=$func_stripname_result
++  fi
++}
++
++# The name of this program:
++func_dirname_and_basename "$progpath"
++progname=$func_basename_result
++
++# Make sure we have an absolute path for reexecution:
++case $progpath in
++  [\\/]*|[A-Za-z]:\\*) ;;
++  *[\\/]*)
++     progdir=$func_dirname_result
++     progdir=`cd "$progdir" && pwd`
++     progpath="$progdir/$progname"
++     ;;
++  *)
++     save_IFS="$IFS"
++     IFS=:
++     for progdir in $PATH; do
++       IFS="$save_IFS"
++       test -x "$progdir/$progname" && break
++     done
++     IFS="$save_IFS"
++     test -n "$progdir" || progdir=`pwd`
++     progpath="$progdir/$progname"
++     ;;
++esac
++
++# Sed substitution that helps us do robust quoting.  It backslashifies
++# metacharacters that are still active within double-quoted strings.
++Xsed="${SED}"' -e 1s/^X//'
++sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
++
++# Same as above, but do not quote variable references.
++double_quote_subst='s/\(["`\\]\)/\\\1/g'
++
++# Re-`\' parameter expansions in output of double_quote_subst that were
++# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
++# in input to double_quote_subst, that '$' was protected from expansion.
++# Since each input `\' is now two `\'s, look for any number of runs of
++# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
++bs='\\'
++bs2='\\\\'
++bs4='\\\\\\\\'
++dollar='\$'
++sed_double_backslash="\
++  s/$bs4/&\\
++/g
++  s/^$bs2$dollar/$bs&/
++  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
++  s/\n//g"
++
++# Standard options:
++opt_dry_run=false
++opt_help=false
++opt_quiet=false
++opt_verbose=false
++opt_warning=:
++
++# func_echo arg...
++# Echo program name prefixed message, along with the current mode
++# name if it has been set yet.
++func_echo ()
++{
++    $ECHO "$progname${mode+: }$mode: $*"
++}
++
++# func_verbose arg...
++# Echo program name prefixed message in verbose mode only.
++func_verbose ()
++{
++    $opt_verbose && func_echo ${1+"$@"}
++
++    # A bug in bash halts the script if the last line of a function
++    # fails when set -e is in force, so we need another command to
++    # work around that:
++    :
++}
++
++# func_echo_all arg...
++# Invoke $ECHO with all args, space-separated.
++func_echo_all ()
++{
++    $ECHO "$*"
++}
++
++# func_error arg...
++# Echo program name prefixed message to standard error.
++func_error ()
++{
++    $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
++}
++
++# func_warning arg...
++# Echo program name prefixed warning message to standard error.
++func_warning ()
++{
++    $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
++
++    # bash bug again:
++    :
++}
++
++# func_fatal_error arg...
++# Echo program name prefixed message to standard error, and exit.
++func_fatal_error ()
++{
++    func_error ${1+"$@"}
++    exit $EXIT_FAILURE
++}
++
++# func_fatal_help arg...
++# Echo program name prefixed message to standard error, followed by
++# a help hint, and exit.
++func_fatal_help ()
++{
++    func_error ${1+"$@"}
++    func_fatal_error "$help"
++}
++help="Try \`$progname --help' for more information."  ## default
++
++
++# func_grep expression filename
++# Check whether EXPRESSION matches any line of FILENAME, without output.
++func_grep ()
++{
++    $GREP "$1" "$2" >/dev/null 2>&1
++}
++
++
++# func_mkdir_p directory-path
++# Make sure the entire path to DIRECTORY-PATH is available.
++func_mkdir_p ()
++{
++    my_directory_path="$1"
++    my_dir_list=
++
++    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
++
++      # Protect directory names starting with `-'
++      case $my_directory_path in
++        -*) my_directory_path="./$my_directory_path" ;;
++      esac
++
++      # While some portion of DIR does not yet exist...
++      while test ! -d "$my_directory_path"; do
++        # ...make a list in topmost first order.  Use a colon delimited
++      # list incase some portion of path contains whitespace.
++        my_dir_list="$my_directory_path:$my_dir_list"
++
++        # If the last portion added has no slash in it, the list is done
++        case $my_directory_path in */*) ;; *) break ;; esac
++
++        # ...otherwise throw away the child directory and loop
++        my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
++      done
++      my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
++
++      save_mkdir_p_IFS="$IFS"; IFS=':'
++      for my_dir in $my_dir_list; do
++      IFS="$save_mkdir_p_IFS"
++        # mkdir can fail with a `File exist' error if two processes
++        # try to create one of the directories concurrently.  Don't
++        # stop in that case!
++        $MKDIR "$my_dir" 2>/dev/null || :
++      done
++      IFS="$save_mkdir_p_IFS"
++
++      # Bail out if we (or some other process) failed to create a directory.
++      test -d "$my_directory_path" || \
++        func_fatal_error "Failed to create \`$1'"
++    fi
++}
++
++
++# func_mktempdir [string]
++# Make a temporary directory that won't clash with other running
++# libtool processes, and avoids race conditions if possible.  If
++# given, STRING is the basename for that directory.
++func_mktempdir ()
++{
++    my_template="${TMPDIR-/tmp}/${1-$progname}"
++
++    if test "$opt_dry_run" = ":"; then
++      # Return a directory name, but don't create it in dry-run mode
++      my_tmpdir="${my_template}-$$"
++    else
++
++      # If mktemp works, use that first and foremost
++      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
++
++      if test ! -d "$my_tmpdir"; then
++        # Failing that, at least try and use $RANDOM to avoid a race
++        my_tmpdir="${my_template}-${RANDOM-0}$$"
++
++        save_mktempdir_umask=`umask`
++        umask 0077
++        $MKDIR "$my_tmpdir"
++        umask $save_mktempdir_umask
++      fi
++
++      # If we're not in dry-run mode, bomb out on failure
++      test -d "$my_tmpdir" || \
++        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
++    fi
++
++    $ECHO "$my_tmpdir"
++}
++
++
++# func_quote_for_eval arg
++# Aesthetically quote ARG to be evaled later.
++# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
++# is double-quoted, suitable for a subsequent eval, whereas
++# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
++# which are still active within double quotes backslashified.
++func_quote_for_eval ()
++{
++    case $1 in
++      *[\\\`\"\$]*)
++      func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
++      *)
++        func_quote_for_eval_unquoted_result="$1" ;;
++    esac
++
++    case $func_quote_for_eval_unquoted_result in
++      # Double-quote args containing shell metacharacters to delay
++      # word splitting, command substitution and and variable
++      # expansion for a subsequent eval.
++      # Many Bourne shells cannot handle close brackets correctly
++      # in scan sets, so we specify it separately.
++      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
++        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
++        ;;
++      *)
++        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
++    esac
++}
++
++
++# func_quote_for_expand arg
++# Aesthetically quote ARG to be evaled later; same as above,
++# but do not quote variable references.
++func_quote_for_expand ()
++{
++    case $1 in
++      *[\\\`\"]*)
++      my_arg=`$ECHO "$1" | $SED \
++          -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
++      *)
++        my_arg="$1" ;;
++    esac
++
++    case $my_arg in
++      # Double-quote args containing shell metacharacters to delay
++      # word splitting and command substitution for a subsequent eval.
++      # Many Bourne shells cannot handle close brackets correctly
++      # in scan sets, so we specify it separately.
++      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
++        my_arg="\"$my_arg\""
++        ;;
++    esac
++
++    func_quote_for_expand_result="$my_arg"
++}
++
++
++# func_show_eval cmd [fail_exp]
++# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
++# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
++# is given, then evaluate it.
++func_show_eval ()
++{
++    my_cmd="$1"
++    my_fail_exp="${2-:}"
++
++    ${opt_silent-false} || {
++      func_quote_for_expand "$my_cmd"
++      eval "func_echo $func_quote_for_expand_result"
++    }
++
++    if ${opt_dry_run-false}; then :; else
++      eval "$my_cmd"
++      my_status=$?
++      if test "$my_status" -eq 0; then :; else
++      eval "(exit $my_status); $my_fail_exp"
++      fi
++    fi
++}
++
++
++# func_show_eval_locale cmd [fail_exp]
++# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
++# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
++# is given, then evaluate it.  Use the saved locale for evaluation.
++func_show_eval_locale ()
++{
++    my_cmd="$1"
++    my_fail_exp="${2-:}"
++
++    ${opt_silent-false} || {
++      func_quote_for_expand "$my_cmd"
++      eval "func_echo $func_quote_for_expand_result"
++    }
++
++    if ${opt_dry_run-false}; then :; else
++      eval "$lt_user_locale
++          $my_cmd"
++      my_status=$?
++      eval "$lt_safe_locale"
++      if test "$my_status" -eq 0; then :; else
++      eval "(exit $my_status); $my_fail_exp"
++      fi
++    fi
++}
++
++
++
++
++
++# func_version
++# Echo version message to standard output and exit.
++func_version ()
++{
++    $SED -n '/(C)/!b go
++      :more
++      /\./!{
++        N
++        s/\n# //
++        b more
++      }
++      :go
++      /^# '$PROGRAM' (GNU /,/# warranty; / {
++        s/^# //
++      s/^# *$//
++        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
++        p
++     }' < "$progpath"
++     exit $?
++}
++
++# func_usage
++# Echo short help message to standard output and exit.
++func_usage ()
++{
++    $SED -n '/^# Usage:/,/^#  *-h/ {
++        s/^# //
++      s/^# *$//
++      s/\$progname/'$progname'/
++      p
++    }' < "$progpath"
++    echo
++    $ECHO "run \`$progname --help | more' for full usage"
++    exit $?
++}
++
++# func_help [NOEXIT]
++# Echo long help message to standard output and exit,
++# unless 'noexit' is passed as argument.
++func_help ()
++{
++    $SED -n '/^# Usage:/,/# Report bugs to/ {
++        s/^# //
++      s/^# *$//
++      s*\$progname*'$progname'*
++      s*\$host*'"$host"'*
++      s*\$SHELL*'"$SHELL"'*
++      s*\$LTCC*'"$LTCC"'*
++      s*\$LTCFLAGS*'"$LTCFLAGS"'*
++      s*\$LD*'"$LD"'*
++      s/\$with_gnu_ld/'"$with_gnu_ld"'/
++      s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
++      s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
++      p
++     }' < "$progpath"
++    ret=$?
++    if test -z "$1"; then
++      exit $ret
++    fi
++}
++
++# func_missing_arg argname
++# Echo program name prefixed message to standard error and set global
++# exit_cmd.
++func_missing_arg ()
++{
++    func_error "missing argument for $1"
++    exit_cmd=exit
++}
++
++exit_cmd=:
++
++
++
++
++
++
++magic="%%%MAGIC variable%%%"
++magic_exe="%%%MAGIC EXE variable%%%"
++
++# Global variables.
++# $mode is unset
++nonopt=
++execute_dlfiles=
++preserve_args=
++lo2o="s/\\.lo\$/.${objext}/"
++o2lo="s/\\.${objext}\$/.lo/"
++extracted_archives=
++extracted_serial=0
++
++opt_dry_run=false
++opt_finish=:
++opt_duplicate_deps=false
++opt_silent=false
++opt_debug=:
++
++# If this variable is set in any of the actions, the command in it
++# will be execed at the end.  This prevents here-documents from being
++# left over by shells.
++exec_cmd=
++
++# func_fatal_configuration arg...
++# Echo program name prefixed message to standard error, followed by
++# a configuration failure hint, and exit.
++func_fatal_configuration ()
++{
++    func_error ${1+"$@"}
++    func_error "See the $PACKAGE documentation for more information."
++    func_fatal_error "Fatal configuration error."
++}
++
++
++# func_config
++# Display the configuration for all the tags in this script.
++func_config ()
++{
++    re_begincf='^# ### BEGIN LIBTOOL'
++    re_endcf='^# ### END LIBTOOL'
++
++    # Default configuration.
++    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
++
++    # Now print the configurations for the tags.
++    for tagname in $taglist; do
++      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
++    done
++
++    exit $?
++}
++
++# func_features
++# Display the features supported by this script.
++func_features ()
++{
++    echo "host: $host"
++    if test "$build_libtool_libs" = yes; then
++      echo "enable shared libraries"
++    else
++      echo "disable shared libraries"
++    fi
++    if test "$build_old_libs" = yes; then
++      echo "enable static libraries"
++    else
++      echo "disable static libraries"
++    fi
++
++    exit $?
++}
++
++# func_enable_tag tagname
++# Verify that TAGNAME is valid, and either flag an error and exit, or
++# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
++# variable here.
++func_enable_tag ()
++{
++  # Global variable:
++  tagname="$1"
++
++  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
++  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
++  sed_extractcf="/$re_begincf/,/$re_endcf/p"
++
++  # Validate tagname.
++  case $tagname in
++    *[!-_A-Za-z0-9,/]*)
++      func_fatal_error "invalid tag name: $tagname"
++      ;;
++  esac
++
++  # Don't test for the "default" C tag, as we know it's
++  # there but not specially marked.
++  case $tagname in
++    CC) ;;
++    *)
++      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
++      taglist="$taglist $tagname"
++
++      # Evaluate the configuration.  Be careful to quote the path
++      # and the sed script, to avoid splitting on whitespace, but
++      # also don't use non-portable quotes within backquotes within
++      # quotes we have to do it in 2 steps:
++      extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
++      eval "$extractedcf"
++      else
++      func_error "ignoring unknown tag $tagname"
++      fi
++      ;;
++  esac
++}
++
++# Parse options once, thoroughly.  This comes as soon as possible in
++# the script to make things like `libtool --version' happen quickly.
++{
++
++  # Shorthand for --mode=foo, only valid as the first argument
++  case $1 in
++  clean|clea|cle|cl)
++    shift; set dummy --mode clean ${1+"$@"}; shift
++    ;;
++  compile|compil|compi|comp|com|co|c)
++    shift; set dummy --mode compile ${1+"$@"}; shift
++    ;;
++  execute|execut|execu|exec|exe|ex|e)
++    shift; set dummy --mode execute ${1+"$@"}; shift
++    ;;
++  finish|finis|fini|fin|fi|f)
++    shift; set dummy --mode finish ${1+"$@"}; shift
++    ;;
++  install|instal|insta|inst|ins|in|i)
++    shift; set dummy --mode install ${1+"$@"}; shift
++    ;;
++  link|lin|li|l)
++    shift; set dummy --mode link ${1+"$@"}; shift
++    ;;
++  uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
++    shift; set dummy --mode uninstall ${1+"$@"}; shift
++    ;;
++  esac
++
++  # Parse non-mode specific arguments:
++  while test "$#" -gt 0; do
++    opt="$1"
++    shift
++
++    case $opt in
++      --config)               func_config                                     ;;
++
++      --debug)                preserve_args="$preserve_args $opt"
++                      func_echo "enabling shell trace mode"
++                      opt_debug='set -x'
++                      $opt_debug
++                      ;;
++
++      -dlopen)                test "$#" -eq 0 && func_missing_arg "$opt" && break
++                      execute_dlfiles="$execute_dlfiles $1"
++                      shift
++                      ;;
++
++      --dry-run | -n) opt_dry_run=:                                   ;;
++      --features)       func_features                                 ;;
++      --finish)               mode="finish"                                   ;;
++      --no-finish)    opt_finish=false                                ;;
++
++      --mode)         test "$#" -eq 0 && func_missing_arg "$opt" && break
++                      case $1 in
++                        # Valid mode arguments:
++                        clean)        ;;
++                        compile)      ;;
++                        execute)      ;;
++                        finish)       ;;
++                        install)      ;;
++                        link)         ;;
++                        relink)       ;;
++                        uninstall)    ;;
++
++                        # Catch anything else as an error
++                        *) func_error "invalid argument for $opt"
++                           exit_cmd=exit
++                           break
++                           ;;
++                      esac
++
++                      mode="$1"
++                      shift
++                      ;;
++
++      --preserve-dup-deps)
++                      opt_duplicate_deps=:                            ;;
++
++      --quiet|--silent)       preserve_args="$preserve_args $opt"
++                      opt_silent=:
++                      opt_verbose=false
++                      ;;
++
++      --no-quiet|--no-silent)
++                      preserve_args="$preserve_args $opt"
++                      opt_silent=false
++                      ;;
++
++      --verbose| -v)  preserve_args="$preserve_args $opt"
++                      opt_silent=false
++                      opt_verbose=:
++                      ;;
++
++      --no-verbose)   preserve_args="$preserve_args $opt"
++                      opt_verbose=false
++                      ;;
++
++      --tag)          test "$#" -eq 0 && func_missing_arg "$opt" && break
++                      preserve_args="$preserve_args $opt $1"
++                      func_enable_tag "$1"    # tagname is set here
++                      shift
++                      ;;
++
++      # Separate optargs to long options:
++      -dlopen=*|--mode=*|--tag=*)
++                      func_opt_split "$opt"
++                      set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
++                      shift
++                      ;;
++
++      -\?|-h)         func_usage                                      ;;
++      --help)         opt_help=:                                      ;;
++      --help-all)     opt_help=': help-all'                           ;;
++      --version)      func_version                                    ;;
++
++      -*)             func_fatal_help "unrecognized option \`$opt'"   ;;
++
++      *)              nonopt="$opt"
++                      break
++                      ;;
++    esac
++  done
++
++
++  case $host in
++    *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* )
++      # don't eliminate duplications in $postdeps and $predeps
++      opt_duplicate_compiler_generated_deps=:
++      ;;
++    *)
++      opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
++      ;;
++  esac
++
++  # Having warned about all mis-specified options, bail out if
++  # anything was wrong.
++  $exit_cmd $EXIT_FAILURE
++}
++
++# func_check_version_match
++# Ensure that we are using m4 macros, and libtool script from the same
++# release of libtool.
++func_check_version_match ()
++{
++  if test "$package_revision" != "$macro_revision"; then
++    if test "$VERSION" != "$macro_version"; then
++      if test -z "$macro_version"; then
++        cat >&2 <<_LT_EOF
++$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
++$progname: definition of this LT_INIT comes from an older release.
++$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
++$progname: and run autoconf again.
++_LT_EOF
++      else
++        cat >&2 <<_LT_EOF
++$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
++$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
++$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
++$progname: and run autoconf again.
++_LT_EOF
++      fi
++    else
++      cat >&2 <<_LT_EOF
++$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
++$progname: but the definition of this LT_INIT comes from revision $macro_revision.
++$progname: You should recreate aclocal.m4 with macros from revision $package_revision
++$progname: of $PACKAGE $VERSION and run autoconf again.
++_LT_EOF
++    fi
++
++    exit $EXIT_MISMATCH
++  fi
++}
++
++
++## ----------- ##
++##    Main.    ##
++## ----------- ##
++
++$opt_help || {
++  # Sanity checks first:
++  func_check_version_match
++
++  if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
++    func_fatal_configuration "not configured to build any kind of library"
++  fi
++
++  test -z "$mode" && func_fatal_error "error: you must specify a MODE."
++
++
++  # Darwin sucks
++  eval "std_shrext=\"$shrext_cmds\""
++
++
++  # Only execute mode is allowed to have -dlopen flags.
++  if test -n "$execute_dlfiles" && test "$mode" != execute; then
++    func_error "unrecognized option \`-dlopen'"
++    $ECHO "$help" 1>&2
++    exit $EXIT_FAILURE
++  fi
++
++  # Change the help message to a mode-specific one.
++  generic_help="$help"
++  help="Try \`$progname --help --mode=$mode' for more information."
++}
++
++
++# func_lalib_p file
++# True iff FILE is a libtool `.la' library or `.lo' object file.
++# This function is only a basic sanity check; it will hardly flush out
++# determined imposters.
++func_lalib_p ()
++{
++    test -f "$1" &&
++      $SED -e 4q "$1" 2>/dev/null \
++        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
++}
++
++# func_lalib_unsafe_p file
++# True iff FILE is a libtool `.la' library or `.lo' object file.
++# This function implements the same check as func_lalib_p without
++# resorting to external programs.  To this end, it redirects stdin and
++# closes it afterwards, without saving the original file descriptor.
++# As a safety measure, use it only where a negative result would be
++# fatal anyway.  Works if `file' does not exist.
++func_lalib_unsafe_p ()
++{
++    lalib_p=no
++    if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
++      for lalib_p_l in 1 2 3 4
++      do
++          read lalib_p_line
++          case "$lalib_p_line" in
++              \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
++          esac
++      done
++      exec 0<&5 5<&-
++    fi
++    test "$lalib_p" = yes
++}
++
++# func_ltwrapper_script_p file
++# True iff FILE is a libtool wrapper script
++# This function is only a basic sanity check; it will hardly flush out
++# determined imposters.
++func_ltwrapper_script_p ()
++{
++    func_lalib_p "$1"
++}
++
++# func_ltwrapper_executable_p file
++# True iff FILE is a libtool wrapper executable
++# This function is only a basic sanity check; it will hardly flush out
++# determined imposters.
++func_ltwrapper_executable_p ()
++{
++    func_ltwrapper_exec_suffix=
++    case $1 in
++    *.exe) ;;
++    *) func_ltwrapper_exec_suffix=.exe ;;
++    esac
++    $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
++}
++
++# func_ltwrapper_scriptname file
++# Assumes file is an ltwrapper_executable
++# uses $file to determine the appropriate filename for a
++# temporary ltwrapper_script.
++func_ltwrapper_scriptname ()
++{
++    func_ltwrapper_scriptname_result=""
++    if func_ltwrapper_executable_p "$1"; then
++      func_dirname_and_basename "$1" "" "."
++      func_stripname '' '.exe' "$func_basename_result"
++      func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
++    fi
++}
++
++# func_ltwrapper_p file
++# True iff FILE is a libtool wrapper script or wrapper executable
++# This function is only a basic sanity check; it will hardly flush out
++# determined imposters.
++func_ltwrapper_p ()
++{
++    func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
++}
++
++
++# func_execute_cmds commands fail_cmd
++# Execute tilde-delimited COMMANDS.
++# If FAIL_CMD is given, eval that upon failure.
++# FAIL_CMD may read-access the current command in variable CMD!
++func_execute_cmds ()
++{
++    $opt_debug
++    save_ifs=$IFS; IFS='~'
++    for cmd in $1; do
++      IFS=$save_ifs
++      eval "cmd=\"$cmd\""
++      func_show_eval "$cmd" "${2-:}"
++    done
++    IFS=$save_ifs
++}
++
++
++# func_source file
++# Source FILE, adding directory component if necessary.
++# Note that it is not necessary on cygwin/mingw to append a dot to
++# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
++# behavior happens only for exec(3), not for open(2)!  Also, sourcing
++# `FILE.' does not work on cygwin managed mounts.
++func_source ()
++{
++    $opt_debug
++    case $1 in
++    */* | *\\*)       . "$1" ;;
++    *)                . "./$1" ;;
++    esac
++}
++
++
++# func_infer_tag arg
++# Infer tagged configuration to use if any are available and
++# if one wasn't chosen via the "--tag" command line option.
++# Only attempt this if the compiler in the base compile
++# command doesn't match the default compiler.
++# arg is usually of the form 'gcc ...'
++func_infer_tag ()
++{
++    $opt_debug
++    if test -n "$available_tags" && test -z "$tagname"; then
++      CC_quoted=
++      for arg in $CC; do
++        func_quote_for_eval "$arg"
++      CC_quoted="$CC_quoted $func_quote_for_eval_result"
++      done
++      CC_expanded=`func_echo_all $CC`
++      CC_quoted_expanded=`func_echo_all $CC_quoted`
++      case $@ in
++      # Blanks in the command may have been stripped by the calling shell,
++      # but not from the CC environment variable when configure was run.
++      " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
++      " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
++      # Blanks at the start of $base_compile will cause this to fail
++      # if we don't check for them as well.
++      *)
++      for z in $available_tags; do
++        if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
++          # Evaluate the configuration.
++          eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
++          CC_quoted=
++          for arg in $CC; do
++            # Double-quote args containing other shell metacharacters.
++            func_quote_for_eval "$arg"
++            CC_quoted="$CC_quoted $func_quote_for_eval_result"
++          done
++          CC_expanded=`func_echo_all $CC`
++          CC_quoted_expanded=`func_echo_all $CC_quoted`
++          case "$@ " in
++          " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
++          " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
++            # The compiler in the base compile command matches
++            # the one in the tagged configuration.
++            # Assume this is the tagged configuration we want.
++            tagname=$z
++            break
++            ;;
++          esac
++        fi
++      done
++      # If $tagname still isn't set, then no tagged configuration
++      # was found and let the user know that the "--tag" command
++      # line option must be used.
++      if test -z "$tagname"; then
++        func_echo "unable to infer tagged configuration"
++        func_fatal_error "specify a tag with \`--tag'"
++#     else
++#       func_verbose "using $tagname tagged configuration"
++      fi
++      ;;
++      esac
++    fi
++}
++
++
++
++# func_write_libtool_object output_name pic_name nonpic_name
++# Create a libtool object file (analogous to a ".la" file),
++# but don't create it if we're doing a dry run.
++func_write_libtool_object ()
++{
++    write_libobj=${1}
++    if test "$build_libtool_libs" = yes; then
++      write_lobj=\'${2}\'
++    else
++      write_lobj=none
++    fi
++
++    if test "$build_old_libs" = yes; then
++      write_oldobj=\'${3}\'
++    else
++      write_oldobj=none
++    fi
++
++    $opt_dry_run || {
++      cat >${write_libobj}T <<EOF
++# $write_libobj - a libtool object file
++# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
++#
++# Please DO NOT delete this file!
++# It is necessary for linking the library.
++
++# Name of the PIC object.
++pic_object=$write_lobj
++
++# Name of the non-PIC object
++non_pic_object=$write_oldobj
++
++EOF
++      $MV "${write_libobj}T" "${write_libobj}"
++    }
++}
++
++# func_mode_compile arg...
++func_mode_compile ()
++{
++    $opt_debug
++    # Get the compilation command and the source file.
++    base_compile=
++    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
++    suppress_opt=yes
++    suppress_output=
++    arg_mode=normal
++    libobj=
++    later=
++    pie_flag=
++
++    for arg
++    do
++      case $arg_mode in
++      arg  )
++      # do not "continue".  Instead, add this to base_compile
++      lastarg="$arg"
++      arg_mode=normal
++      ;;
++
++      target )
++      libobj="$arg"
++      arg_mode=normal
++      continue
++      ;;
++
++      normal )
++      # Accept any command-line options.
++      case $arg in
++      -o)
++        test -n "$libobj" && \
++          func_fatal_error "you cannot specify \`-o' more than once"
++        arg_mode=target
++        continue
++        ;;
++
++      -pie | -fpie | -fPIE)
++          pie_flag="$pie_flag $arg"
++        continue
++        ;;
++
++      -shared | -static | -prefer-pic | -prefer-non-pic)
++        later="$later $arg"
++        continue
++        ;;
++
++      -no-suppress)
++        suppress_opt=no
++        continue
++        ;;
++
++      -Xcompiler)
++        arg_mode=arg  #  the next one goes into the "base_compile" arg list
++        continue      #  The current "srcfile" will either be retained or
++        ;;            #  replaced later.  I would guess that would be a bug.
++
++      -Wc,*)
++        func_stripname '-Wc,' '' "$arg"
++        args=$func_stripname_result
++        lastarg=
++        save_ifs="$IFS"; IFS=','
++        for arg in $args; do
++          IFS="$save_ifs"
++          func_quote_for_eval "$arg"
++          lastarg="$lastarg $func_quote_for_eval_result"
++        done
++        IFS="$save_ifs"
++        func_stripname ' ' '' "$lastarg"
++        lastarg=$func_stripname_result
++
++        # Add the arguments to base_compile.
++        base_compile="$base_compile $lastarg"
++        continue
++        ;;
++
++      *)
++        # Accept the current argument as the source file.
++        # The previous "srcfile" becomes the current argument.
++        #
++        lastarg="$srcfile"
++        srcfile="$arg"
++        ;;
++      esac  #  case $arg
++      ;;
++      esac    #  case $arg_mode
++
++      # Aesthetically quote the previous argument.
++      func_quote_for_eval "$lastarg"
++      base_compile="$base_compile $func_quote_for_eval_result"
++    done # for arg
++
++    case $arg_mode in
++    arg)
++      func_fatal_error "you must specify an argument for -Xcompile"
++      ;;
++    target)
++      func_fatal_error "you must specify a target with \`-o'"
++      ;;
++    *)
++      # Get the name of the library object.
++      test -z "$libobj" && {
++      func_basename "$srcfile"
++      libobj="$func_basename_result"
++      }
++      ;;
++    esac
++
++    # Recognize several different file suffixes.
++    # If the user specifies -o file.o, it is replaced with file.lo
++    case $libobj in
++    *.[cCFSifmso] | \
++    *.ada | *.adb | *.ads | *.asm | \
++    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
++    *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
++      func_xform "$libobj"
++      libobj=$func_xform_result
++      ;;
++    esac
++
++    case $libobj in
++    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
++    *)
++      func_fatal_error "cannot determine name of library object from \`$libobj'"
++      ;;
++    esac
++
++    func_infer_tag $base_compile
++
++    for arg in $later; do
++      case $arg in
++      -shared)
++      test "$build_libtool_libs" != yes && \
++        func_fatal_configuration "can not build a shared library"
++      build_old_libs=no
++      continue
++      ;;
++
++      -static)
++      build_libtool_libs=no
++      build_old_libs=yes
++      continue
++      ;;
++
++      -prefer-pic)
++      pic_mode=yes
++      continue
++      ;;
++
++      -prefer-non-pic)
++      pic_mode=no
++      continue
++      ;;
++      esac
++    done
++
++    func_quote_for_eval "$libobj"
++    test "X$libobj" != "X$func_quote_for_eval_result" \
++      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'  &()|`$[]' \
++      && func_warning "libobj name \`$libobj' may not contain shell special characters."
++    func_dirname_and_basename "$obj" "/" ""
++    objname="$func_basename_result"
++    xdir="$func_dirname_result"
++    lobj=${xdir}$objdir/$objname
++
++    test -z "$base_compile" && \
++      func_fatal_help "you must specify a compilation command"
++
++    # Delete any leftover library objects.
++    if test "$build_old_libs" = yes; then
++      removelist="$obj $lobj $libobj ${libobj}T"
++    else
++      removelist="$lobj $libobj ${libobj}T"
++    fi
++
++    # On Cygwin there's no "real" PIC flag so we must build both object types
++    case $host_os in
++    cygwin* | mingw* | pw32* | os2* | cegcc*)
++      pic_mode=default
++      ;;
++    esac
++    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
++      # non-PIC code in shared libraries is not supported
++      pic_mode=default
++    fi
++
++    # Calculate the filename of the output object if compiler does
++    # not support -o with -c
++    if test "$compiler_c_o" = no; then
++      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
++      lockfile="$output_obj.lock"
++    else
++      output_obj=
++      need_locks=no
++      lockfile=
++    fi
++
++    # Lock this critical section if it is needed
++    # We use this script file to make the link, it avoids creating a new file
++    if test "$need_locks" = yes; then
++      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
++      func_echo "Waiting for $lockfile to be removed"
++      sleep 2
++      done
++    elif test "$need_locks" = warn; then
++      if test -f "$lockfile"; then
++      $ECHO "\
++*** ERROR, $lockfile exists and contains:
++`cat $lockfile 2>/dev/null`
++
++This indicates that another process is trying to use the same
++temporary object file, and libtool could not work around it because
++your compiler does not support \`-c' and \`-o' together.  If you
++repeat this compilation, it may succeed, by chance, but you had better
++avoid parallel builds (make -j) in this platform, or get a better
++compiler."
++
++      $opt_dry_run || $RM $removelist
++      exit $EXIT_FAILURE
++      fi
++      removelist="$removelist $output_obj"
++      $ECHO "$srcfile" > "$lockfile"
++    fi
++
++    $opt_dry_run || $RM $removelist
++    removelist="$removelist $lockfile"
++    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
++
++    if test -n "$fix_srcfile_path"; then
++      eval "srcfile=\"$fix_srcfile_path\""
++    fi
++    func_quote_for_eval "$srcfile"
++    qsrcfile=$func_quote_for_eval_result
++
++    # Only build a PIC object if we are building libtool libraries.
++    if test "$build_libtool_libs" = yes; then
++      # Without this assignment, base_compile gets emptied.
++      fbsd_hideous_sh_bug=$base_compile
++
++      if test "$pic_mode" != no; then
++      command="$base_compile $qsrcfile $pic_flag"
++      else
++      # Don't build PIC code
++      command="$base_compile $qsrcfile"
++      fi
++
++      func_mkdir_p "$xdir$objdir"
++
++      if test -z "$output_obj"; then
++      # Place PIC objects in $objdir
++      command="$command -o $lobj"
++      fi
++
++      func_show_eval_locale "$command"        \
++          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
++
++      if test "$need_locks" = warn &&
++       test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
++      $ECHO "\
++*** ERROR, $lockfile contains:
++`cat $lockfile 2>/dev/null`
++
++but it should contain:
++$srcfile
++
++This indicates that another process is trying to use the same
++temporary object file, and libtool could not work around it because
++your compiler does not support \`-c' and \`-o' together.  If you
++repeat this compilation, it may succeed, by chance, but you had better
++avoid parallel builds (make -j) in this platform, or get a better
++compiler."
++
++      $opt_dry_run || $RM $removelist
++      exit $EXIT_FAILURE
++      fi
++
++      # Just move the object if needed, then go on to compile the next one
++      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
++      func_show_eval '$MV "$output_obj" "$lobj"' \
++        'error=$?; $opt_dry_run || $RM $removelist; exit $error'
++      fi
++
++      # Allow error messages only from the first compilation.
++      if test "$suppress_opt" = yes; then
++      suppress_output=' >/dev/null 2>&1'
++      fi
++    fi
++
++    # Only build a position-dependent object if we build old libraries.
++    if test "$build_old_libs" = yes; then
++      if test "$pic_mode" != yes; then
++      # Don't build PIC code
++      command="$base_compile $qsrcfile$pie_flag"
++      else
++      command="$base_compile $qsrcfile $pic_flag"
++      fi
++      if test "$compiler_c_o" = yes; then
++      command="$command -o $obj"
++      fi
++
++      # Suppress compiler output if we already did a PIC compilation.
++      command="$command$suppress_output"
++      func_show_eval_locale "$command" \
++        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
++
++      if test "$need_locks" = warn &&
++       test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
++      $ECHO "\
++*** ERROR, $lockfile contains:
++`cat $lockfile 2>/dev/null`
++
++but it should contain:
++$srcfile
++
++This indicates that another process is trying to use the same
++temporary object file, and libtool could not work around it because
++your compiler does not support \`-c' and \`-o' together.  If you
++repeat this compilation, it may succeed, by chance, but you had better
++avoid parallel builds (make -j) in this platform, or get a better
++compiler."
++
++      $opt_dry_run || $RM $removelist
++      exit $EXIT_FAILURE
++      fi
++
++      # Just move the object if needed
++      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
++      func_show_eval '$MV "$output_obj" "$obj"' \
++        'error=$?; $opt_dry_run || $RM $removelist; exit $error'
++      fi
++    fi
++
++    $opt_dry_run || {
++      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
++
++      # Unlock the critical section if it was locked
++      if test "$need_locks" != no; then
++      removelist=$lockfile
++        $RM "$lockfile"
++      fi
++    }
++
++    exit $EXIT_SUCCESS
++}
++
++$opt_help || {
++  test "$mode" = compile && func_mode_compile ${1+"$@"}
++}
++
++func_mode_help ()
++{
++    # We need to display help for each of the modes.
++    case $mode in
++      "")
++        # Generic help is extracted from the usage comments
++        # at the start of this file.
++        func_help
++        ;;
++
++      clean)
++        $ECHO \
++"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
++
++Remove files from the build directory.
++
++RM is the name of the program to use to delete files associated with each FILE
++(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
++to RM.
++
++If FILE is a libtool library, object or program, all the files associated
++with it are deleted. Otherwise, only FILE itself is deleted using RM."
++        ;;
++
++      compile)
++      $ECHO \
++"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
++
++Compile a source file into a libtool library object.
++
++This mode accepts the following additional options:
++
++  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
++  -no-suppress      do not suppress compiler output for multiple passes
++  -prefer-pic       try to building PIC objects only
++  -prefer-non-pic   try to building non-PIC objects only
++  -shared           do not build a \`.o' file suitable for static linking
++  -static           only build a \`.o' file suitable for static linking
++  -Wc,FLAG          pass FLAG directly to the compiler
++
++COMPILE-COMMAND is a command to be used in creating a \`standard' object file
++from the given SOURCEFILE.
++
++The output file name is determined by removing the directory component from
++SOURCEFILE, then substituting the C source code suffix \`.c' with the
++library object suffix, \`.lo'."
++        ;;
++
++      execute)
++        $ECHO \
++"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
++
++Automatically set library path, then run a program.
++
++This mode accepts the following additional options:
++
++  -dlopen FILE      add the directory containing FILE to the library path
++
++This mode sets the library path environment variable according to \`-dlopen'
++flags.
++
++If any of the ARGS are libtool executable wrappers, then they are translated
++into their corresponding uninstalled binary, and any of their required library
++directories are added to the library path.
++
++Then, COMMAND is executed, with ARGS as arguments."
++        ;;
++
++      finish)
++        $ECHO \
++"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
++
++Complete the installation of libtool libraries.
++
++Each LIBDIR is a directory that contains libtool libraries.
++
++The commands that this mode executes may require superuser privileges.  Use
++the \`--dry-run' option if you just want to see what would be executed."
++        ;;
++
++      install)
++        $ECHO \
++"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
++
++Install executables or libraries.
++
++INSTALL-COMMAND is the installation command.  The first component should be
++either the \`install' or \`cp' program.
++
++The following components of INSTALL-COMMAND are treated specially:
++
++  -inst-prefix-dir PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
++
++The rest of the components are interpreted as arguments to that command (only
++BSD-compatible install options are recognized)."
++        ;;
++
++      link)
++        $ECHO \
++"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
++
++Link object files or libraries together to form another library, or to
++create an executable program.
++
++LINK-COMMAND is a command using the C compiler that you would use to create
++a program from several object files.
++
++The following components of LINK-COMMAND are treated specially:
++
++  -all-static       do not do any dynamic linking at all
++  -avoid-version    do not add a version suffix if possible
++  -bindir BINDIR    specify path to binaries directory (for systems where
++                    libraries must be found in the PATH setting at runtime)
++  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
++  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
++  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
++  -export-symbols SYMFILE
++                    try to export only the symbols listed in SYMFILE
++  -export-symbols-regex REGEX
++                    try to export only the symbols matching REGEX
++  -LLIBDIR          search LIBDIR for required installed libraries
++  -lNAME            OUTPUT-FILE requires the installed library libNAME
++  -module           build a library that can dlopened
++  -no-fast-install  disable the fast-install mode
++  -no-install       link a not-installable executable
++  -no-undefined     declare that a library does not refer to external symbols
++  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
++  -objectlist FILE  Use a list of object files found in FILE to specify objects
++  -precious-files-regex REGEX
++                    don't remove output files matching REGEX
++  -release RELEASE  specify package release information
++  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
++  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
++  -shared           only do dynamic linking of libtool libraries
++  -shrext SUFFIX    override the standard shared library file extension
++  -static           do not do any dynamic linking of uninstalled libtool libraries
++  -static-libtool-libs
++                    do not do any dynamic linking of libtool libraries
++  -version-info CURRENT[:REVISION[:AGE]]
++                    specify library version info [each variable defaults to 0]
++  -weak LIBNAME     declare that the target provides the LIBNAME interface
++  -Wc,FLAG
++  -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
++  -Wl,FLAG
++  -Xlinker FLAG     pass linker-specific FLAG directly to the linker
++  -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
++
++All other options (arguments beginning with \`-') are ignored.
++
++Every other argument is treated as a filename.  Files ending in \`.la' are
++treated as uninstalled libtool libraries, other files are standard or library
++object files.
++
++If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
++only library objects (\`.lo' files) may be specified, and \`-rpath' is
++required, except when creating a convenience library.
++
++If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
++using \`ar' and \`ranlib', or on Windows using \`lib'.
++
++If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
++is created, otherwise an executable program is created."
++        ;;
++
++      uninstall)
++        $ECHO \
++"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
++
++Remove libraries from an installation directory.
++
++RM is the name of the program to use to delete files associated with each FILE
++(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
++to RM.
++
++If FILE is a libtool library, all the files associated with it are deleted.
++Otherwise, only FILE itself is deleted using RM."
++        ;;
++
++      *)
++        func_fatal_help "invalid operation mode \`$mode'"
++        ;;
++    esac
++
++    echo
++    $ECHO "Try \`$progname --help' for more information about other modes."
++}
++
++# Now that we've collected a possible --mode arg, show help if necessary
++if $opt_help; then
++  if test "$opt_help" = :; then
++    func_mode_help
++  else
++    {
++      func_help noexit
++      for mode in compile link execute install finish uninstall clean; do
++      func_mode_help
++      done
++    } | sed -n '1p; 2,$s/^Usage:/  or: /p'
++    {
++      func_help noexit
++      for mode in compile link execute install finish uninstall clean; do
++      echo
++      func_mode_help
++      done
++    } |
++    sed '1d
++      /^When reporting/,/^Report/{
++      H
++      d
++      }
++      $x
++      /information about other modes/d
++      /more detailed .*MODE/d
++      s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
++  fi
++  exit $?
++fi
++
++
++# func_mode_execute arg...
++func_mode_execute ()
++{
++    $opt_debug
++    # The first argument is the command name.
++    cmd="$nonopt"
++    test -z "$cmd" && \
++      func_fatal_help "you must specify a COMMAND"
++
++    # Handle -dlopen flags immediately.
++    for file in $execute_dlfiles; do
++      test -f "$file" \
++      || func_fatal_help "\`$file' is not a file"
++
++      dir=
++      case $file in
++      *.la)
++      # Check to see that this really is a libtool archive.
++      func_lalib_unsafe_p "$file" \
++        || func_fatal_help "\`$lib' is not a valid libtool archive"
++
++      # Read the libtool library.
++      dlname=
++      library_names=
++      func_source "$file"
++
++      # Skip this library if it cannot be dlopened.
++      if test -z "$dlname"; then
++        # Warn if it was a shared library.
++        test -n "$library_names" && \
++          func_warning "\`$file' was not linked with \`-export-dynamic'"
++        continue
++      fi
++
++      func_dirname "$file" "" "."
++      dir="$func_dirname_result"
++
++      if test -f "$dir/$objdir/$dlname"; then
++        dir="$dir/$objdir"
++      else
++        if test ! -f "$dir/$dlname"; then
++          func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
++        fi
++      fi
++      ;;
++
++      *.lo)
++      # Just add the directory containing the .lo file.
++      func_dirname "$file" "" "."
++      dir="$func_dirname_result"
++      ;;
++
++      *)
++      func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
++      continue
++      ;;
++      esac
++
++      # Get the absolute pathname.
++      absdir=`cd "$dir" && pwd`
++      test -n "$absdir" && dir="$absdir"
++
++      # Now add the directory to shlibpath_var.
++      if eval test -z \"\$$shlibpath_var\"; then
++      eval $shlibpath_var=\$dir
++      else
++      eval $shlibpath_var=\$dir:\$$shlibpath_var
++      fi
++    done
++
++    # This variable tells wrapper scripts just to set shlibpath_var
++    # rather than running their programs.
++    libtool_execute_magic="$magic"
++
++    # Check if any of the arguments is a wrapper script.
++    args=
++    for file
++    do
++      case $file in
++      -* | *.la | *.lo ) ;;
++      *)
++      # Do a test to see if this is really a libtool program.
++      if func_ltwrapper_script_p "$file"; then
++        func_source "$file"
++        # Transform arg to wrapped name.
++        file="$progdir/$program"
++      elif func_ltwrapper_executable_p "$file"; then
++        func_ltwrapper_scriptname "$file"
++        func_source "$func_ltwrapper_scriptname_result"
++        # Transform arg to wrapped name.
++        file="$progdir/$program"
++      fi
++      ;;
++      esac
++      # Quote arguments (to preserve shell metacharacters).
++      func_quote_for_eval "$file"
++      args="$args $func_quote_for_eval_result"
++    done
++
++    if test "X$opt_dry_run" = Xfalse; then
++      if test -n "$shlibpath_var"; then
++      # Export the shlibpath_var.
++      eval "export $shlibpath_var"
++      fi
++
++      # Restore saved environment variables
++      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
++      do
++      eval "if test \"\${save_$lt_var+set}\" = set; then
++                $lt_var=\$save_$lt_var; export $lt_var
++            else
++              $lt_unset $lt_var
++            fi"
++      done
++
++      # Now prepare to actually exec the command.
++      exec_cmd="\$cmd$args"
++    else
++      # Display what would be done.
++      if test -n "$shlibpath_var"; then
++      eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
++      echo "export $shlibpath_var"
++      fi
++      $ECHO "$cmd$args"
++      exit $EXIT_SUCCESS
++    fi
++}
++
++test "$mode" = execute && func_mode_execute ${1+"$@"}
++
++
++# func_mode_finish arg...
++func_mode_finish ()
++{
++    $opt_debug
++    libdirs="$nonopt"
++    admincmds=
++
++    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
++      for dir
++      do
++      libdirs="$libdirs $dir"
++      done
++
++      for libdir in $libdirs; do
++      if test -n "$finish_cmds"; then
++        # Do each command in the finish commands.
++        func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
++'"$cmd"'"'
++      fi
++      if test -n "$finish_eval"; then
++        # Do the single finish_eval.
++        eval cmds=\"$finish_eval\"
++        $opt_dry_run || eval "$cmds" || admincmds="$admincmds
++       $cmds"
++      fi
++      done
++    fi
++
++    # Exit here if they wanted silent mode.
++    $opt_silent && exit $EXIT_SUCCESS
++
++    echo "----------------------------------------------------------------------"
++    echo "Libraries have been installed in:"
++    for libdir in $libdirs; do
++      $ECHO "   $libdir"
++    done
++    echo
++    echo "If you ever happen to want to link against installed libraries"
++    echo "in a given directory, LIBDIR, you must either use libtool, and"
++    echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
++    echo "flag during linking and do at least one of the following:"
++    if test -n "$shlibpath_var"; then
++      echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
++      echo "     during execution"
++    fi
++    if test -n "$runpath_var"; then
++      echo "   - add LIBDIR to the \`$runpath_var' environment variable"
++      echo "     during linking"
++    fi
++    if test -n "$hardcode_libdir_flag_spec"; then
++      libdir=LIBDIR
++      eval "flag=\"$hardcode_libdir_flag_spec\""
++
++      $ECHO "   - use the \`$flag' linker flag"
++    fi
++    if test -n "$admincmds"; then
++      $ECHO "   - have your system administrator run these commands:$admincmds"
++    fi
++    if test -f /etc/ld.so.conf; then
++      echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
++    fi
++    echo
++
++    echo "See any operating system documentation about shared libraries for"
++    case $host in
++      solaris2.[6789]|solaris2.1[0-9])
++        echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
++      echo "pages."
++      ;;
++      *)
++        echo "more information, such as the ld(1) and ld.so(8) manual pages."
++        ;;
++    esac
++    echo "----------------------------------------------------------------------"
++    exit $EXIT_SUCCESS
++}
++
++test "$mode" = finish && func_mode_finish ${1+"$@"}
++
++
++# func_mode_install arg...
++func_mode_install ()
++{
++    $opt_debug
++    # There may be an optional sh(1) argument at the beginning of
++    # install_prog (especially on Windows NT).
++    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
++       # Allow the use of GNU shtool's install command.
++       case $nonopt in *shtool*) :;; *) false;; esac; then
++      # Aesthetically quote it.
++      func_quote_for_eval "$nonopt"
++      install_prog="$func_quote_for_eval_result "
++      arg=$1
++      shift
++    else
++      install_prog=
++      arg=$nonopt
++    fi
++
++    # The real first argument should be the name of the installation program.
++    # Aesthetically quote it.
++    func_quote_for_eval "$arg"
++    install_prog="$install_prog$func_quote_for_eval_result"
++    install_shared_prog=$install_prog
++    case " $install_prog " in
++      *[\\\ /]cp\ *) install_cp=: ;;
++      *) install_cp=false ;;
++    esac
++
++    # We need to accept at least all the BSD install flags.
++    dest=
++    files=
++    opts=
++    prev=
++    install_type=
++    isdir=no
++    stripme=
++    no_mode=:
++    for arg
++    do
++      arg2=
++      if test -n "$dest"; then
++      files="$files $dest"
++      dest=$arg
++      continue
++      fi
++
++      case $arg in
++      -d) isdir=yes ;;
++      -f)
++      if $install_cp; then :; else
++        prev=$arg
++      fi
++      ;;
++      -g | -m | -o)
++      prev=$arg
++      ;;
++      -s)
++      stripme=" -s"
++      continue
++      ;;
++      -*)
++      ;;
++      *)
++      # If the previous option needed an argument, then skip it.
++      if test -n "$prev"; then
++        if test "x$prev" = x-m && test -n "$install_override_mode"; then
++          arg2=$install_override_mode
++          no_mode=false
++        fi
++        prev=
++      else
++        dest=$arg
++        continue
++      fi
++      ;;
++      esac
++
++      # Aesthetically quote the argument.
++      func_quote_for_eval "$arg"
++      install_prog="$install_prog $func_quote_for_eval_result"
++      if test -n "$arg2"; then
++      func_quote_for_eval "$arg2"
++      fi
++      install_shared_prog="$install_shared_prog $func_quote_for_eval_result"
++    done
++
++    test -z "$install_prog" && \
++      func_fatal_help "you must specify an install program"
++
++    test -n "$prev" && \
++      func_fatal_help "the \`$prev' option requires an argument"
++
++    if test -n "$install_override_mode" && $no_mode; then
++      if $install_cp; then :; else
++      func_quote_for_eval "$install_override_mode"
++      install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result"
++      fi
++    fi
++
++    if test -z "$files"; then
++      if test -z "$dest"; then
++      func_fatal_help "no file or destination specified"
++      else
++      func_fatal_help "you must specify a destination"
++      fi
++    fi
++
++    # Strip any trailing slash from the destination.
++    func_stripname '' '/' "$dest"
++    dest=$func_stripname_result
++
++    # Check to see that the destination is a directory.
++    test -d "$dest" && isdir=yes
++    if test "$isdir" = yes; then
++      destdir="$dest"
++      destname=
++    else
++      func_dirname_and_basename "$dest" "" "."
++      destdir="$func_dirname_result"
++      destname="$func_basename_result"
++
++      # Not a directory, so check to see that there is only one file specified.
++      set dummy $files; shift
++      test "$#" -gt 1 && \
++      func_fatal_help "\`$dest' is not a directory"
++    fi
++    case $destdir in
++    [\\/]* | [A-Za-z]:[\\/]*) ;;
++    *)
++      for file in $files; do
++      case $file in
++      *.lo) ;;
++      *)
++        func_fatal_help "\`$destdir' must be an absolute directory name"
++        ;;
++      esac
++      done
++      ;;
++    esac
++
++    # This variable tells wrapper scripts just to set variables rather
++    # than running their programs.
++    libtool_install_magic="$magic"
++
++    staticlibs=
++    future_libdirs=
++    current_libdirs=
++    for file in $files; do
++
++      # Do each installation.
++      case $file in
++      *.$libext)
++      # Do the static libraries later.
++      staticlibs="$staticlibs $file"
++      ;;
++
++      *.la)
++      # Check to see that this really is a libtool archive.
++      func_lalib_unsafe_p "$file" \
++        || func_fatal_help "\`$file' is not a valid libtool archive"
++
++      library_names=
++      old_library=
++      relink_command=
++      func_source "$file"
++
++      # Add the libdir to current_libdirs if it is the destination.
++      if test "X$destdir" = "X$libdir"; then
++        case "$current_libdirs " in
++        *" $libdir "*) ;;
++        *) current_libdirs="$current_libdirs $libdir" ;;
++        esac
++      else
++        # Note the libdir as a future libdir.
++        case "$future_libdirs " in
++        *" $libdir "*) ;;
++        *) future_libdirs="$future_libdirs $libdir" ;;
++        esac
++      fi
++
++      func_dirname "$file" "/" ""
++      dir="$func_dirname_result"
++      dir="$dir$objdir"
++
++      if test -n "$relink_command"; then
++        # Determine the prefix the user has applied to our future dir.
++        inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
++
++        # Don't allow the user to place us outside of our expected
++        # location b/c this prevents finding dependent libraries that
++        # are installed to the same prefix.
++        # At present, this check doesn't affect windows .dll's that
++        # are installed into $libdir/../bin (currently, that works fine)
++        # but it's something to keep an eye on.
++        test "$inst_prefix_dir" = "$destdir" && \
++          func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
++
++        if test -n "$inst_prefix_dir"; then
++          # Stick the inst_prefix_dir data into the link command.
++          relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
++        else
++          relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
++        fi
++
++        func_warning "relinking \`$file'"
++        func_show_eval "$relink_command" \
++          'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
++      fi
++
++      # See the names of the shared library.
++      set dummy $library_names; shift
++      if test -n "$1"; then
++        realname="$1"
++        shift
++
++        srcname="$realname"
++        test -n "$relink_command" && srcname="$realname"T
++
++        # Install the shared library and build the symlinks.
++        func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
++            'exit $?'
++        tstripme="$stripme"
++        case $host_os in
++        cygwin* | mingw* | pw32* | cegcc*)
++          case $realname in
++          *.dll.a)
++            tstripme=""
++            ;;
++          esac
++          ;;
++        esac
++        if test -n "$tstripme" && test -n "$striplib"; then
++          func_show_eval "$striplib $destdir/$realname" 'exit $?'
++        fi
++
++        if test "$#" -gt 0; then
++          # Delete the old symlinks, and create new ones.
++          # Try `ln -sf' first, because the `ln' binary might depend on
++          # the symlink we replace!  Solaris /bin/ln does not understand -f,
++          # so we also need to try rm && ln -s.
++          for linkname
++          do
++            test "$linkname" != "$realname" \
++              && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
++          done
++        fi
++
++        # Do each command in the postinstall commands.
++        lib="$destdir/$realname"
++        func_execute_cmds "$postinstall_cmds" 'exit $?'
++      fi
++
++      # Install the pseudo-library for information purposes.
++      func_basename "$file"
++      name="$func_basename_result"
++      instname="$dir/$name"i
++      func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
++
++      # Maybe install the static library, too.
++      test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
++      ;;
++
++      *.lo)
++      # Install (i.e. copy) a libtool object.
++
++      # Figure out destination file name, if it wasn't already specified.
++      if test -n "$destname"; then
++        destfile="$destdir/$destname"
++      else
++        func_basename "$file"
++        destfile="$func_basename_result"
++        destfile="$destdir/$destfile"
++      fi
++
++      # Deduce the name of the destination old-style object file.
++      case $destfile in
++      *.lo)
++        func_lo2o "$destfile"
++        staticdest=$func_lo2o_result
++        ;;
++      *.$objext)
++        staticdest="$destfile"
++        destfile=
++        ;;
++      *)
++        func_fatal_help "cannot copy a libtool object to \`$destfile'"
++        ;;
++      esac
++
++      # Install the libtool object if requested.
++      test -n "$destfile" && \
++        func_show_eval "$install_prog $file $destfile" 'exit $?'
++
++      # Install the old object if enabled.
++      if test "$build_old_libs" = yes; then
++        # Deduce the name of the old-style object file.
++        func_lo2o "$file"
++        staticobj=$func_lo2o_result
++        func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
++      fi
++      exit $EXIT_SUCCESS
++      ;;
++
++      *)
++      # Figure out destination file name, if it wasn't already specified.
++      if test -n "$destname"; then
++        destfile="$destdir/$destname"
++      else
++        func_basename "$file"
++        destfile="$func_basename_result"
++        destfile="$destdir/$destfile"
++      fi
++
++      # If the file is missing, and there is a .exe on the end, strip it
++      # because it is most likely a libtool script we actually want to
++      # install
++      stripped_ext=""
++      case $file in
++        *.exe)
++          if test ! -f "$file"; then
++            func_stripname '' '.exe' "$file"
++            file=$func_stripname_result
++            stripped_ext=".exe"
++          fi
++          ;;
++      esac
++
++      # Do a test to see if this is really a libtool program.
++      case $host in
++      *cygwin* | *mingw*)
++          if func_ltwrapper_executable_p "$file"; then
++            func_ltwrapper_scriptname "$file"
++            wrapper=$func_ltwrapper_scriptname_result
++          else
++            func_stripname '' '.exe' "$file"
++            wrapper=$func_stripname_result
++          fi
++          ;;
++      *)
++          wrapper=$file
++          ;;
++      esac
++      if func_ltwrapper_script_p "$wrapper"; then
++        notinst_deplibs=
++        relink_command=
++
++        func_source "$wrapper"
++
++        # Check the variables that should have been set.
++        test -z "$generated_by_libtool_version" && \
++          func_fatal_error "invalid libtool wrapper script \`$wrapper'"
++
++        finalize=yes
++        for lib in $notinst_deplibs; do
++          # Check to see that each library is installed.
++          libdir=
++          if test -f "$lib"; then
++            func_source "$lib"
++          fi
++          libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
++          if test -n "$libdir" && test ! -f "$libfile"; then
++            func_warning "\`$lib' has not been installed in \`$libdir'"
++            finalize=no
++          fi
++        done
++
++        relink_command=
++        func_source "$wrapper"
++
++        outputname=
++        if test "$fast_install" = no && test -n "$relink_command"; then
++          $opt_dry_run || {
++            if test "$finalize" = yes; then
++              tmpdir=`func_mktempdir`
++              func_basename "$file$stripped_ext"
++              file="$func_basename_result"
++              outputname="$tmpdir/$file"
++              # Replace the output file specification.
++              relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
++
++              $opt_silent || {
++                func_quote_for_expand "$relink_command"
++                eval "func_echo $func_quote_for_expand_result"
++              }
++              if eval "$relink_command"; then :
++                else
++                func_error "error: relink \`$file' with the above command before installing it"
++                $opt_dry_run || ${RM}r "$tmpdir"
++                continue
++              fi
++              file="$outputname"
++            else
++              func_warning "cannot relink \`$file'"
++            fi
++          }
++        else
++          # Install the binary that we compiled earlier.
++          file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
++        fi
++      fi
++
++      # remove .exe since cygwin /usr/bin/install will append another
++      # one anyway
++      case $install_prog,$host in
++      */usr/bin/install*,*cygwin*)
++        case $file:$destfile in
++        *.exe:*.exe)
++          # this is ok
++          ;;
++        *.exe:*)
++          destfile=$destfile.exe
++          ;;
++        *:*.exe)
++          func_stripname '' '.exe' "$destfile"
++          destfile=$func_stripname_result
++          ;;
++        esac
++        ;;
++      esac
++      func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
++      $opt_dry_run || if test -n "$outputname"; then
++        ${RM}r "$tmpdir"
++      fi
++      ;;
++      esac
++    done
++
++    for file in $staticlibs; do
++      func_basename "$file"
++      name="$func_basename_result"
++
++      # Set up the ranlib parameters.
++      oldlib="$destdir/$name"
++
++      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
++
++      if test -n "$stripme" && test -n "$old_striplib"; then
++      func_show_eval "$old_striplib $oldlib" 'exit $?'
++      fi
++
++      # Do each command in the postinstall commands.
++      func_execute_cmds "$old_postinstall_cmds" 'exit $?'
++    done
++
++    test -n "$future_libdirs" && \
++      func_warning "remember to run \`$progname --finish$future_libdirs'"
++
++    if test -n "$current_libdirs" && $opt_finish; then
++      # Maybe just do a dry run.
++      $opt_dry_run && current_libdirs=" -n$current_libdirs"
++      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
++    else
++      exit $EXIT_SUCCESS
++    fi
++}
++
++test "$mode" = install && func_mode_install ${1+"$@"}
++
++
++# func_generate_dlsyms outputname originator pic_p
++# Extract symbols from dlprefiles and create ${outputname}S.o with
++# a dlpreopen symbol table.
++func_generate_dlsyms ()
++{
++    $opt_debug
++    my_outputname="$1"
++    my_originator="$2"
++    my_pic_p="${3-no}"
++    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
++    my_dlsyms=
++
++    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
++      if test -n "$NM" && test -n "$global_symbol_pipe"; then
++      my_dlsyms="${my_outputname}S.c"
++      else
++      func_error "not configured to extract global symbols from dlpreopened files"
++      fi
++    fi
++
++    if test -n "$my_dlsyms"; then
++      case $my_dlsyms in
++      "") ;;
++      *.c)
++      # Discover the nlist of each of the dlfiles.
++      nlist="$output_objdir/${my_outputname}.nm"
++
++      func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
++
++      # Parse the name list into a source file.
++      func_verbose "creating $output_objdir/$my_dlsyms"
++
++      $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
++/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
++/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
++
++#ifdef __cplusplus
++extern \"C\" {
++#endif
++
++#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
++#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
++#endif
++
++/* External symbol declarations for the compiler. */\
++"
++
++      if test "$dlself" = yes; then
++        func_verbose "generating symbol list for \`$output'"
++
++        $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
++
++        # Add our own program objects to the symbol list.
++        progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
++        for progfile in $progfiles; do
++          func_verbose "extracting global C symbols from \`$progfile'"
++          $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
++        done
++
++        if test -n "$exclude_expsyms"; then
++          $opt_dry_run || {
++            $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
++            $MV "$nlist"T "$nlist"
++          }
++        fi
++
++        if test -n "$export_symbols_regex"; then
++          $opt_dry_run || {
++            $EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T
++            $MV "$nlist"T "$nlist"
++          }
++        fi
++
++        # Prepare the list of exported symbols
++        if test -z "$export_symbols"; then
++          export_symbols="$output_objdir/$outputname.exp"
++          $opt_dry_run || {
++            $RM $export_symbols
++            ${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' < "$nlist" > "$export_symbols"
++            case $host in
++            *cygwin* | *mingw* | *cegcc* )
++                echo EXPORTS > "$output_objdir/$outputname.def"
++                cat "$export_symbols" >> "$output_objdir/$outputname.def"
++              ;;
++            esac
++          }
++        else
++          $opt_dry_run || {
++            ${SED} -e 's/\([].[*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/' < "$export_symbols" > "$output_objdir/$outputname.exp"
++            $GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T
++            $MV "$nlist"T "$nlist"
++            case $host in
++              *cygwin* | *mingw* | *cegcc* )
++                echo EXPORTS > "$output_objdir/$outputname.def"
++                cat "$nlist" >> "$output_objdir/$outputname.def"
++                ;;
++            esac
++          }
++        fi
++      fi
++
++      for dlprefile in $dlprefiles; do
++        func_verbose "extracting global C symbols from \`$dlprefile'"
++        func_basename "$dlprefile"
++        name="$func_basename_result"
++        $opt_dry_run || {
++          $ECHO ": $name " >> "$nlist"
++          eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
++        }
++      done
++
++      $opt_dry_run || {
++        # Make sure we have at least an empty file.
++        test -f "$nlist" || : > "$nlist"
++
++        if test -n "$exclude_expsyms"; then
++          $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
++          $MV "$nlist"T "$nlist"
++        fi
++
++        # Try sorting and uniquifying the output.
++        if $GREP -v "^: " < "$nlist" |
++            if sort -k 3 </dev/null >/dev/null 2>&1; then
++              sort -k 3
++            else
++              sort +2
++            fi |
++            uniq > "$nlist"S; then
++          :
++        else
++          $GREP -v "^: " < "$nlist" > "$nlist"S
++        fi
++
++        if test -f "$nlist"S; then
++          eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
++        else
++          echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
++        fi
++
++        echo >> "$output_objdir/$my_dlsyms" "\
++
++/* The mapping between symbol names and symbols.  */
++typedef struct {
++  const char *name;
++  void *address;
++} lt_dlsymlist;
++"
++        case $host in
++        *cygwin* | *mingw* | *cegcc* )
++          echo >> "$output_objdir/$my_dlsyms" "\
++/* DATA imports from DLLs on WIN32 con't be const, because
++   runtime relocations are performed -- see ld's documentation
++   on pseudo-relocs.  */"
++          lt_dlsym_const= ;;
++        *osf5*)
++          echo >> "$output_objdir/$my_dlsyms" "\
++/* This system does not cope well with relocations in const data */"
++          lt_dlsym_const= ;;
++        *)
++          lt_dlsym_const=const ;;
++        esac
++
++        echo >> "$output_objdir/$my_dlsyms" "\
++extern $lt_dlsym_const lt_dlsymlist
++lt_${my_prefix}_LTX_preloaded_symbols[];
++$lt_dlsym_const lt_dlsymlist
++lt_${my_prefix}_LTX_preloaded_symbols[] =
++{\
++  { \"$my_originator\", (void *) 0 },"
++
++        case $need_lib_prefix in
++        no)
++          eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
++          ;;
++        *)
++          eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
++          ;;
++        esac
++        echo >> "$output_objdir/$my_dlsyms" "\
++  {0, (void *) 0}
++};
++
++/* This works around a problem in FreeBSD linker */
++#ifdef FREEBSD_WORKAROUND
++static const void *lt_preloaded_setup() {
++  return lt_${my_prefix}_LTX_preloaded_symbols;
++}
++#endif
++
++#ifdef __cplusplus
++}
++#endif\
++"
++      } # !$opt_dry_run
++
++      pic_flag_for_symtable=
++      case "$compile_command " in
++      *" -static "*) ;;
++      *)
++        case $host in
++        # compiling the symbol table file with pic_flag works around
++        # a FreeBSD bug that causes programs to crash when -lm is
++        # linked before any other PIC object.  But we must not use
++        # pic_flag when linking with -static.  The problem exists in
++        # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
++        *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
++          pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
++        *-*-hpux*)
++          pic_flag_for_symtable=" $pic_flag"  ;;
++        *)
++          if test "X$my_pic_p" != Xno; then
++            pic_flag_for_symtable=" $pic_flag"
++          fi
++          ;;
++        esac
++        ;;
++      esac
++      symtab_cflags=
++      for arg in $LTCFLAGS; do
++        case $arg in
++        -pie | -fpie | -fPIE) ;;
++        *) symtab_cflags="$symtab_cflags $arg" ;;
++        esac
++      done
++
++      # Now compile the dynamic symbol file.
++      func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
++
++      # Clean up the generated files.
++      func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
++
++      # Transform the symbol file into the correct name.
++      symfileobj="$output_objdir/${my_outputname}S.$objext"
++      case $host in
++      *cygwin* | *mingw* | *cegcc* )
++        if test -f "$output_objdir/$my_outputname.def"; then
++          compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
++          finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
++        else
++          compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
++          finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
++        fi
++        ;;
++      *)
++        compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
++        finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
++        ;;
++      esac
++      ;;
++      *)
++      func_fatal_error "unknown suffix for \`$my_dlsyms'"
++      ;;
++      esac
++    else
++      # We keep going just in case the user didn't refer to
++      # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
++      # really was required.
++
++      # Nullify the symbol file.
++      compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
++      finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
++    fi
++}
++
++# func_win32_libid arg
++# return the library type of file 'arg'
++#
++# Need a lot of goo to handle *both* DLLs and import libs
++# Has to be a shell function in order to 'eat' the argument
++# that is supplied when $file_magic_command is called.
++# Despite the name, also deal with 64 bit binaries.
++func_win32_libid ()
++{
++  $opt_debug
++  win32_libid_type="unknown"
++  win32_fileres=`file -L $1 2>/dev/null`
++  case $win32_fileres in
++  *ar\ archive\ import\ library*) # definitely import
++    win32_libid_type="x86 archive import"
++    ;;
++  *ar\ archive*) # could be an import, or static
++    if $OBJDUMP -f "$1" | $SED -e '10q' 2>/dev/null |
++       $EGREP 'file format (pe-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
++      win32_nmres=`$NM -f posix -A "$1" |
++      $SED -n -e '
++          1,100{
++              / I /{
++                  s,.*,import,
++                  p
++                  q
++              }
++          }'`
++      case $win32_nmres in
++      import*)  win32_libid_type="x86 archive import";;
++      *)        win32_libid_type="x86 archive static";;
++      esac
++    fi
++    ;;
++  *DLL*)
++    win32_libid_type="x86 DLL"
++    ;;
++  *executable*) # but shell scripts are "executable" too...
++    case $win32_fileres in
++    *MS\ Windows\ PE\ Intel*)
++      win32_libid_type="x86 DLL"
++      ;;
++    esac
++    ;;
++  esac
++  $ECHO "$win32_libid_type"
++}
++
++
++
++# func_extract_an_archive dir oldlib
++func_extract_an_archive ()
++{
++    $opt_debug
++    f_ex_an_ar_dir="$1"; shift
++    f_ex_an_ar_oldlib="$1"
++    if test "$lock_old_archive_extraction" = yes; then
++      lockfile=$f_ex_an_ar_oldlib.lock
++      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
++      func_echo "Waiting for $lockfile to be removed"
++      sleep 2
++      done
++    fi
++    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
++                 'stat=$?; rm -f "$lockfile"; exit $stat'
++    if test "$lock_old_archive_extraction" = yes; then
++      $opt_dry_run || rm -f "$lockfile"
++    fi
++    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
++     :
++    else
++      func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
++    fi
++}
++
++
++# func_extract_archives gentop oldlib ...
++func_extract_archives ()
++{
++    $opt_debug
++    my_gentop="$1"; shift
++    my_oldlibs=${1+"$@"}
++    my_oldobjs=""
++    my_xlib=""
++    my_xabs=""
++    my_xdir=""
++
++    for my_xlib in $my_oldlibs; do
++      # Extract the objects.
++      case $my_xlib in
++      [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
++      *) my_xabs=`pwd`"/$my_xlib" ;;
++      esac
++      func_basename "$my_xlib"
++      my_xlib="$func_basename_result"
++      my_xlib_u=$my_xlib
++      while :; do
++        case " $extracted_archives " in
++      *" $my_xlib_u "*)
++        func_arith $extracted_serial + 1
++        extracted_serial=$func_arith_result
++        my_xlib_u=lt$extracted_serial-$my_xlib ;;
++      *) break ;;
++      esac
++      done
++      extracted_archives="$extracted_archives $my_xlib_u"
++      my_xdir="$my_gentop/$my_xlib_u"
++
++      func_mkdir_p "$my_xdir"
++
++      case $host in
++      *-darwin*)
++      func_verbose "Extracting $my_xabs"
++      # Do not bother doing anything if just a dry run
++      $opt_dry_run || {
++        darwin_orig_dir=`pwd`
++        cd $my_xdir || exit $?
++        darwin_archive=$my_xabs
++        darwin_curdir=`pwd`
++        darwin_base_archive=`basename "$darwin_archive"`
++        darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
++        if test -n "$darwin_arches"; then
++          darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
++          darwin_arch=
++          func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
++          for darwin_arch in  $darwin_arches ; do
++            func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
++            $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
++            cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
++            func_extract_an_archive "`pwd`" "${darwin_base_archive}"
++            cd "$darwin_curdir"
++            $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
++          done # $darwin_arches
++            ## Okay now we've a bunch of thin objects, gotta fatten them up :)
++          darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
++          darwin_file=
++          darwin_files=
++          for darwin_file in $darwin_filelist; do
++            darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
++            $LIPO -create -output "$darwin_file" $darwin_files
++          done # $darwin_filelist
++          $RM -rf unfat-$$
++          cd "$darwin_orig_dir"
++        else
++          cd $darwin_orig_dir
++          func_extract_an_archive "$my_xdir" "$my_xabs"
++        fi # $darwin_arches
++      } # !$opt_dry_run
++      ;;
++      *)
++        func_extract_an_archive "$my_xdir" "$my_xabs"
++      ;;
++      esac
++      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
++    done
++
++    func_extract_archives_result="$my_oldobjs"
++}
++
++
++# func_emit_wrapper [arg=no]
++#
++# Emit a libtool wrapper script on stdout.
++# Don't directly open a file because we may want to
++# incorporate the script contents within a cygwin/mingw
++# wrapper executable.  Must ONLY be called from within
++# func_mode_link because it depends on a number of variables
++# set therein.
++#
++# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
++# variable will take.  If 'yes', then the emitted script
++# will assume that the directory in which it is stored is
++# the $objdir directory.  This is a cygwin/mingw-specific
++# behavior.
++func_emit_wrapper ()
++{
++      func_emit_wrapper_arg1=${1-no}
++
++      $ECHO "\
++#! $SHELL
++
++# $output - temporary wrapper script for $objdir/$outputname
++# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
++#
++# The $output program cannot be directly executed until all the libtool
++# libraries that it depends on are installed.
++#
++# This wrapper script should never be moved out of the build directory.
++# If it is, it will not operate correctly.
++
++# Sed substitution that helps us do robust quoting.  It backslashifies
++# metacharacters that are still active within double-quoted strings.
++sed_quote_subst='$sed_quote_subst'
++
++# Be Bourne compatible
++if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
++  emulate sh
++  NULLCMD=:
++  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
++  # is contrary to our usage.  Disable this feature.
++  alias -g '\${1+\"\$@\"}'='\"\$@\"'
++  setopt NO_GLOB_SUBST
++else
++  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
++fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
++DUALCASE=1; export DUALCASE # for MKS sh
++
++# The HP-UX ksh and POSIX shell print the target directory to stdout
++# if CDPATH is set.
++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
++
++relink_command=\"$relink_command\"
++
++# This environment variable determines our operation mode.
++if test \"\$libtool_install_magic\" = \"$magic\"; then
++  # install mode needs the following variables:
++  generated_by_libtool_version='$macro_version'
++  notinst_deplibs='$notinst_deplibs'
++else
++  # When we are sourced in execute mode, \$file and \$ECHO are already set.
++  if test \"\$libtool_execute_magic\" != \"$magic\"; then
++    file=\"\$0\""
++
++    qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
++    $ECHO "\
++
++# A function that is used when there is no print builtin or printf.
++func_fallback_echo ()
++{
++  eval 'cat <<_LTECHO_EOF
++\$1
++_LTECHO_EOF'
++}
++    ECHO=\"$qECHO\"
++  fi\
++
++  # Find the directory that this script lives in.
++  thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
++  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
++
++  # Follow symbolic links until we get to the real thisdir.
++  file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
++  while test -n \"\$file\"; do
++    destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
++
++    # If there was a directory component, then change thisdir.
++    if test \"x\$destdir\" != \"x\$file\"; then
++      case \"\$destdir\" in
++      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
++      *) thisdir=\"\$thisdir/\$destdir\" ;;
++      esac
++    fi
++
++    file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
++    file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
++  done
++
++  # Usually 'no', except on cygwin/mingw when embedded into
++  # the cwrapper.
++  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
++  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
++    # special case for '.'
++    if test \"\$thisdir\" = \".\"; then
++      thisdir=\`pwd\`
++    fi
++    # remove .libs from thisdir
++    case \"\$thisdir\" in
++    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
++    $objdir )   thisdir=. ;;
++    esac
++  fi
++
++  # Try to get the absolute directory name.
++  absdir=\`cd \"\$thisdir\" && pwd\`
++  test -n \"\$absdir\" && thisdir=\"\$absdir\"
++"
++
++      if test "$fast_install" = yes; then
++        $ECHO "\
++  program=lt-'$outputname'$exeext
++  progdir=\"\$thisdir/$objdir\"
++
++  if test ! -f \"\$progdir/\$program\" ||
++     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
++       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
++
++    file=\"\$\$-\$program\"
++
++    if test ! -d \"\$progdir\"; then
++      $MKDIR \"\$progdir\"
++    else
++      $RM \"\$progdir/\$file\"
++    fi"
++
++        $ECHO "\
++
++    # relink executable if necessary
++    if test -n \"\$relink_command\"; then
++      if relink_command_output=\`eval \"\$relink_command\" 2>&1\`; then :
++      else
++      $ECHO \"\$relink_command_output\" >&2
++      $RM \"\$progdir/\$file\"
++      exit 1
++      fi
++    fi
++
++    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
++    { $RM \"\$progdir/\$program\";
++      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
++    $RM \"\$progdir/\$file\"
++  fi"
++      else
++        $ECHO "\
++  program='$outputname'
++  progdir=\"\$thisdir/$objdir\"
++"
++      fi
++
++      $ECHO "\
++
++  if test -f \"\$progdir/\$program\"; then"
++
++      # Export our shlibpath_var if we have one.
++      if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
++        $ECHO "\
++    # Add our own library path to $shlibpath_var
++    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
++
++    # Some systems cannot cope with colon-terminated $shlibpath_var
++    # The second colon is a workaround for a bug in BeOS R4 sed
++    $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
++
++    export $shlibpath_var
++"
++      fi
++
++      # fixup the dll searchpath if we need to.
++      if test -n "$dllsearchpath"; then
++        $ECHO "\
++    # Add the dll search path components to the executable PATH
++    PATH=$dllsearchpath:\$PATH
++"
++      fi
++
++      $ECHO "\
++    if test \"\$libtool_execute_magic\" != \"$magic\"; then
++      # Run the actual program with our arguments.
++"
++      case $host in
++      # Backslashes separate directories on plain windows
++      *-*-mingw | *-*-os2* | *-cegcc*)
++        $ECHO "\
++      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
++"
++        ;;
++
++      *)
++        $ECHO "\
++      exec \"\$progdir/\$program\" \${1+\"\$@\"}
++"
++        ;;
++      esac
++      $ECHO "\
++      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
++      exit 1
++    fi
++  else
++    # The program doesn't exist.
++    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
++    \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
++    \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
++    exit 1
++  fi
++fi\
++"
++}
++
++
++# func_to_host_path arg
++#
++# Convert paths to host format when used with build tools.
++# Intended for use with "native" mingw (where libtool itself
++# is running under the msys shell), or in the following cross-
++# build environments:
++#    $build          $host
++#    mingw (msys)    mingw  [e.g. native]
++#    cygwin          mingw
++#    *nix + wine     mingw
++# where wine is equipped with the `winepath' executable.
++# In the native mingw case, the (msys) shell automatically
++# converts paths for any non-msys applications it launches,
++# but that facility isn't available from inside the cwrapper.
++# Similar accommodations are necessary for $host mingw and
++# $build cygwin.  Calling this function does no harm for other
++# $host/$build combinations not listed above.
++#
++# ARG is the path (on $build) that should be converted to
++# the proper representation for $host. The result is stored
++# in $func_to_host_path_result.
++func_to_host_path ()
++{
++  func_to_host_path_result="$1"
++  if test -n "$1"; then
++    case $host in
++      *mingw* )
++        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
++        case $build in
++          *mingw* ) # actually, msys
++            # awkward: cmd appends spaces to result
++            func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null |
++              $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
++            ;;
++          *cygwin* )
++            func_to_host_path_result=`cygpath -w "$1" |
++            $SED -e "$lt_sed_naive_backslashify"`
++            ;;
++          * )
++            # Unfortunately, winepath does not exit with a non-zero
++            # error code, so we are forced to check the contents of
++            # stdout. On the other hand, if the command is not
++            # found, the shell will set an exit code of 127 and print
++            # *an error message* to stdout. So we must check for both
++            # error code of zero AND non-empty stdout, which explains
++            # the odd construction:
++            func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
++            if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
++              func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" |
++                $SED -e "$lt_sed_naive_backslashify"`
++            else
++              # Allow warning below.
++              func_to_host_path_result=
++            fi
++            ;;
++        esac
++        if test -z "$func_to_host_path_result" ; then
++          func_error "Could not determine host path corresponding to"
++          func_error "  \`$1'"
++          func_error "Continuing, but uninstalled executables may not work."
++          # Fallback:
++          func_to_host_path_result="$1"
++        fi
++        ;;
++    esac
++  fi
++}
++# end: func_to_host_path
++
++# func_to_host_pathlist arg
++#
++# Convert pathlists to host format when used with build tools.
++# See func_to_host_path(), above. This function supports the
++# following $build/$host combinations (but does no harm for
++# combinations not listed here):
++#    $build          $host
++#    mingw (msys)    mingw  [e.g. native]
++#    cygwin          mingw
++#    *nix + wine     mingw
++#
++# Path separators are also converted from $build format to
++# $host format. If ARG begins or ends with a path separator
++# character, it is preserved (but converted to $host format)
++# on output.
++#
++# ARG is a pathlist (on $build) that should be converted to
++# the proper representation on $host. The result is stored
++# in $func_to_host_pathlist_result.
++func_to_host_pathlist ()
++{
++  func_to_host_pathlist_result="$1"
++  if test -n "$1"; then
++    case $host in
++      *mingw* )
++        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
++        # Remove leading and trailing path separator characters from
++        # ARG. msys behavior is inconsistent here, cygpath turns them
++        # into '.;' and ';.', and winepath ignores them completely.
++      func_stripname : : "$1"
++        func_to_host_pathlist_tmp1=$func_stripname_result
++        case $build in
++          *mingw* ) # Actually, msys.
++            # Awkward: cmd appends spaces to result.
++            func_to_host_pathlist_result=`
++            ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null |
++            $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
++            ;;
++          *cygwin* )
++            func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" |
++              $SED -e "$lt_sed_naive_backslashify"`
++            ;;
++          * )
++            # unfortunately, winepath doesn't convert pathlists
++            func_to_host_pathlist_result=""
++            func_to_host_pathlist_oldIFS=$IFS
++            IFS=:
++            for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
++              IFS=$func_to_host_pathlist_oldIFS
++              if test -n "$func_to_host_pathlist_f" ; then
++                func_to_host_path "$func_to_host_pathlist_f"
++                if test -n "$func_to_host_path_result" ; then
++                  if test -z "$func_to_host_pathlist_result" ; then
++                    func_to_host_pathlist_result="$func_to_host_path_result"
++                  else
++                    func_append func_to_host_pathlist_result ";$func_to_host_path_result"
++                  fi
++                fi
++              fi
++            done
++            IFS=$func_to_host_pathlist_oldIFS
++            ;;
++        esac
++        if test -z "$func_to_host_pathlist_result"; then
++          func_error "Could not determine the host path(s) corresponding to"
++          func_error "  \`$1'"
++          func_error "Continuing, but uninstalled executables may not work."
++          # Fallback. This may break if $1 contains DOS-style drive
++          # specifications. The fix is not to complicate the expression
++          # below, but for the user to provide a working wine installation
++          # with winepath so that path translation in the cross-to-mingw
++          # case works properly.
++          lt_replace_pathsep_nix_to_dos="s|:|;|g"
++          func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
++            $SED -e "$lt_replace_pathsep_nix_to_dos"`
++        fi
++        # Now, add the leading and trailing path separators back
++        case "$1" in
++          :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
++            ;;
++        esac
++        case "$1" in
++          *: ) func_append func_to_host_pathlist_result ";"
++            ;;
++        esac
++        ;;
++    esac
++  fi
++}
++# end: func_to_host_pathlist
++
++# func_emit_cwrapperexe_src
++# emit the source code for a wrapper executable on stdout
++# Must ONLY be called from within func_mode_link because
++# it depends on a number of variable set therein.
++func_emit_cwrapperexe_src ()
++{
++      cat <<EOF
++
++/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
++   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
++
++   The $output program cannot be directly executed until all the libtool
++   libraries that it depends on are installed.
++
++   This wrapper executable should never be moved out of the build directory.
++   If it is, it will not operate correctly.
++
++   Currently, it simply execs the wrapper *script* "$SHELL $output",
++   but could eventually absorb all of the scripts functionality and
++   exec $objdir/$outputname directly.
++*/
++EOF
++          cat <<"EOF"
++#ifdef _MSC_VER
++# define _CRT_SECURE_NO_DEPRECATE 1
++#endif
++#include <stdio.h>
++#include <stdlib.h>
++#ifdef _MSC_VER
++# include <direct.h>
++# include <process.h>
++# include <io.h>
++#else
++# include <unistd.h>
++# include <stdint.h>
++# ifdef __CYGWIN__
++#  include <io.h>
++# endif
++#endif
++#include <malloc.h>
++#include <stdarg.h>
++#include <assert.h>
++#include <string.h>
++#include <ctype.h>
++#include <errno.h>
++#include <fcntl.h>
++#include <sys/stat.h>
++
++/* declarations of non-ANSI functions */
++#if defined(__MINGW32__)
++# ifdef __STRICT_ANSI__
++int _putenv (const char *);
++# endif
++#elif defined(__CYGWIN__)
++# ifdef __STRICT_ANSI__
++char *realpath (const char *, char *);
++int putenv (char *);
++int setenv (const char *, const char *, int);
++# endif
++/* #elif defined (other platforms) ... */
++#endif
++
++/* portability defines, excluding path handling macros */
++#if defined(_MSC_VER)
++# define setmode _setmode
++# define stat    _stat
++# define chmod   _chmod
++# define getcwd  _getcwd
++# define putenv  _putenv
++# define S_IXUSR _S_IEXEC
++# ifndef _INTPTR_T_DEFINED
++#  define _INTPTR_T_DEFINED
++#  define intptr_t int
++# endif
++#elif defined(__MINGW32__)
++# define setmode _setmode
++# define stat    _stat
++# define chmod   _chmod
++# define getcwd  _getcwd
++# define putenv  _putenv
++#elif defined(__CYGWIN__)
++# define HAVE_SETENV
++# define FOPEN_WB "wb"
++/* #elif defined (other platforms) ... */
++#endif
++
++#if defined(PATH_MAX)
++# define LT_PATHMAX PATH_MAX
++#elif defined(MAXPATHLEN)
++# define LT_PATHMAX MAXPATHLEN
++#else
++# define LT_PATHMAX 1024
++#endif
++
++#ifndef S_IXOTH
++# define S_IXOTH 0
++#endif
++#ifndef S_IXGRP
++# define S_IXGRP 0
++#endif
++
++/* path handling portability macros */
++#ifndef DIR_SEPARATOR
++# define DIR_SEPARATOR '/'
++# define PATH_SEPARATOR ':'
++#endif
++
++#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
++  defined (__OS2__)
++# define HAVE_DOS_BASED_FILE_SYSTEM
++# define FOPEN_WB "wb"
++# ifndef DIR_SEPARATOR_2
++#  define DIR_SEPARATOR_2 '\\'
++# endif
++# ifndef PATH_SEPARATOR_2
++#  define PATH_SEPARATOR_2 ';'
++# endif
++#endif
++
++#ifndef DIR_SEPARATOR_2
++# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
++#else /* DIR_SEPARATOR_2 */
++# define IS_DIR_SEPARATOR(ch) \
++      (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
++#endif /* DIR_SEPARATOR_2 */
++
++#ifndef PATH_SEPARATOR_2
++# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
++#else /* PATH_SEPARATOR_2 */
++# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
++#endif /* PATH_SEPARATOR_2 */
++
++#ifndef FOPEN_WB
++# define FOPEN_WB "w"
++#endif
++#ifndef _O_BINARY
++# define _O_BINARY 0
++#endif
++
++#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
++#define XFREE(stale) do { \
++  if (stale) { free ((void *) stale); stale = 0; } \
++} while (0)
++
++#undef LTWRAPPER_DEBUGPRINTF
++#if defined LT_DEBUGWRAPPER
++# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
++static void
++ltwrapper_debugprintf (const char *fmt, ...)
++{
++    va_list args;
++    va_start (args, fmt);
++    (void) vfprintf (stderr, fmt, args);
++    va_end (args);
++}
++#else
++# define LTWRAPPER_DEBUGPRINTF(args)
++#endif
++
++const char *program_name = NULL;
++
++void *xmalloc (size_t num);
++char *xstrdup (const char *string);
++const char *base_name (const char *name);
++char *find_executable (const char *wrapper);
++char *chase_symlinks (const char *pathspec);
++int make_executable (const char *path);
++int check_executable (const char *path);
++char *strendzap (char *str, const char *pat);
++void lt_fatal (const char *message, ...);
++void lt_setenv (const char *name, const char *value);
++char *lt_extend_str (const char *orig_value, const char *add, int to_end);
++void lt_update_exe_path (const char *name, const char *value);
++void lt_update_lib_path (const char *name, const char *value);
++char **prepare_spawn (char **argv);
++void lt_dump_script (FILE *f);
++EOF
++
++          cat <<EOF
++const char * MAGIC_EXE = "$magic_exe";
++const char * LIB_PATH_VARNAME = "$shlibpath_var";
++EOF
++
++          if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
++              func_to_host_pathlist "$temp_rpath"
++            cat <<EOF
++const char * LIB_PATH_VALUE   = "$func_to_host_pathlist_result";
++EOF
++          else
++            cat <<"EOF"
++const char * LIB_PATH_VALUE   = "";
++EOF
++          fi
++
++          if test -n "$dllsearchpath"; then
++              func_to_host_pathlist "$dllsearchpath:"
++            cat <<EOF
++const char * EXE_PATH_VARNAME = "PATH";
++const char * EXE_PATH_VALUE   = "$func_to_host_pathlist_result";
++EOF
++          else
++            cat <<"EOF"
++const char * EXE_PATH_VARNAME = "";
++const char * EXE_PATH_VALUE   = "";
++EOF
++          fi
++
++          if test "$fast_install" = yes; then
++            cat <<EOF
++const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
++EOF
++          else
++            cat <<EOF
++const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
++EOF
++          fi
++
++
++          cat <<"EOF"
++
++#define LTWRAPPER_OPTION_PREFIX         "--lt-"
++#define LTWRAPPER_OPTION_PREFIX_LENGTH  5
++
++static const size_t opt_prefix_len         = LTWRAPPER_OPTION_PREFIX_LENGTH;
++static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
++
++static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
++
++int
++main (int argc, char *argv[])
++{
++  char **newargz;
++  int  newargc;
++  char *tmp_pathspec;
++  char *actual_cwrapper_path;
++  char *actual_cwrapper_name;
++  char *target_name;
++  char *lt_argv_zero;
++  intptr_t rval = 127;
++
++  int i;
++
++  program_name = (char *) xstrdup (base_name (argv[0]));
++  LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
++  LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
++
++  /* very simple arg parsing; don't want to rely on getopt */
++  for (i = 1; i < argc; i++)
++    {
++      if (strcmp (argv[i], dumpscript_opt) == 0)
++      {
++EOF
++          case "$host" in
++            *mingw* | *cygwin* )
++              # make stdout use "unix" line endings
++              echo "          setmode(1,_O_BINARY);"
++              ;;
++            esac
++
++          cat <<"EOF"
++        lt_dump_script (stdout);
++        return 0;
++      }
++    }
++
++  newargz = XMALLOC (char *, argc + 1);
++  tmp_pathspec = find_executable (argv[0]);
++  if (tmp_pathspec == NULL)
++    lt_fatal ("Couldn't find %s", argv[0]);
++  LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
++                        tmp_pathspec));
++
++  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
++  LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
++                        actual_cwrapper_path));
++  XFREE (tmp_pathspec);
++
++  actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
++  strendzap (actual_cwrapper_path, actual_cwrapper_name);
++
++  /* wrapper name transforms */
++  strendzap (actual_cwrapper_name, ".exe");
++  tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
++  XFREE (actual_cwrapper_name);
++  actual_cwrapper_name = tmp_pathspec;
++  tmp_pathspec = 0;
++
++  /* target_name transforms -- use actual target program name; might have lt- prefix */
++  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
++  strendzap (target_name, ".exe");
++  tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
++  XFREE (target_name);
++  target_name = tmp_pathspec;
++  tmp_pathspec = 0;
++
++  LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
++                        target_name));
++EOF
++
++          cat <<EOF
++  newargz[0] =
++    XMALLOC (char, (strlen (actual_cwrapper_path) +
++                  strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
++  strcpy (newargz[0], actual_cwrapper_path);
++  strcat (newargz[0], "$objdir");
++  strcat (newargz[0], "/");
++EOF
++
++          cat <<"EOF"
++  /* stop here, and copy so we don't have to do this twice */
++  tmp_pathspec = xstrdup (newargz[0]);
++
++  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
++  strcat (newargz[0], actual_cwrapper_name);
++
++  /* DO want the lt- prefix here if it exists, so use target_name */
++  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
++  XFREE (tmp_pathspec);
++  tmp_pathspec = NULL;
++EOF
++
++          case $host_os in
++            mingw*)
++          cat <<"EOF"
++  {
++    char* p;
++    while ((p = strchr (newargz[0], '\\')) != NULL)
++      {
++      *p = '/';
++      }
++    while ((p = strchr (lt_argv_zero, '\\')) != NULL)
++      {
++      *p = '/';
++      }
++  }
++EOF
++          ;;
++          esac
++
++          cat <<"EOF"
++  XFREE (target_name);
++  XFREE (actual_cwrapper_path);
++  XFREE (actual_cwrapper_name);
++
++  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
++  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
++  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
++  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
++
++  newargc=0;
++  for (i = 1; i < argc; i++)
++    {
++      if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
++        {
++          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
++             namespace, but it is not one of the ones we know about and
++             have already dealt with, above (inluding dump-script), then
++             report an error. Otherwise, targets might begin to believe
++             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
++             namespace. The first time any user complains about this, we'll
++             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
++             or a configure.ac-settable value.
++           */
++          lt_fatal ("Unrecognized option in %s namespace: '%s'",
++                    ltwrapper_option_prefix, argv[i]);
++        }
++      /* otherwise ... */
++      newargz[++newargc] = xstrdup (argv[i]);
++    }
++  newargz[++newargc] = NULL;
++
++  LTWRAPPER_DEBUGPRINTF     (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
++  for (i = 0; i < newargc; i++)
++    {
++      LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
++    }
++
++EOF
++
++          case $host_os in
++            mingw*)
++              cat <<"EOF"
++  /* execv doesn't actually work on mingw as expected on unix */
++  newargz = prepare_spawn (newargz);
++  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
++  if (rval == -1)
++    {
++      /* failed to start process */
++      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
++      return 127;
++    }
++  return rval;
++EOF
++              ;;
++            *)
++              cat <<"EOF"
++  execv (lt_argv_zero, newargz);
++  return rval; /* =127, but avoids unused variable warning */
++EOF
++              ;;
++          esac
++
++          cat <<"EOF"
++}
++
++void *
++xmalloc (size_t num)
++{
++  void *p = (void *) malloc (num);
++  if (!p)
++    lt_fatal ("Memory exhausted");
++
++  return p;
++}
++
++char *
++xstrdup (const char *string)
++{
++  return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
++                        string) : NULL;
++}
++
++const char *
++base_name (const char *name)
++{
++  const char *base;
++
++#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
++  /* Skip over the disk name in MSDOS pathnames. */
++  if (isalpha ((unsigned char) name[0]) && name[1] == ':')
++    name += 2;
++#endif
++
++  for (base = name; *name; name++)
++    if (IS_DIR_SEPARATOR (*name))
++      base = name + 1;
++  return base;
++}
++
++int
++check_executable (const char *path)
++{
++  struct stat st;
++
++  LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
++                        path ? (*path ? path : "EMPTY!") : "NULL!"));
++  if ((!path) || (!*path))
++    return 0;
++
++  if ((stat (path, &st) >= 0)
++      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
++    return 1;
++  else
++    return 0;
++}
++
++int
++make_executable (const char *path)
++{
++  int rval = 0;
++  struct stat st;
++
++  LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
++                        path ? (*path ? path : "EMPTY!") : "NULL!"));
++  if ((!path) || (!*path))
++    return 0;
++
++  if (stat (path, &st) >= 0)
++    {
++      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
++    }
++  return rval;
++}
++
++/* Searches for the full path of the wrapper.  Returns
++   newly allocated full path name if found, NULL otherwise
++   Does not chase symlinks, even on platforms that support them.
++*/
++char *
++find_executable (const char *wrapper)
++{
++  int has_slash = 0;
++  const char *p;
++  const char *p_next;
++  /* static buffer for getcwd */
++  char tmp[LT_PATHMAX + 1];
++  int tmp_len;
++  char *concat_name;
++
++  LTWRAPPER_DEBUGPRINTF (("(find_executable)   : %s\n",
++                        wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
++
++  if ((wrapper == NULL) || (*wrapper == '\0'))
++    return NULL;
++
++  /* Absolute path? */
++#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
++  if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
++    {
++      concat_name = xstrdup (wrapper);
++      if (check_executable (concat_name))
++      return concat_name;
++      XFREE (concat_name);
++    }
++  else
++    {
++#endif
++      if (IS_DIR_SEPARATOR (wrapper[0]))
++      {
++        concat_name = xstrdup (wrapper);
++        if (check_executable (concat_name))
++          return concat_name;
++        XFREE (concat_name);
++      }
++#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
++    }
++#endif
++
++  for (p = wrapper; *p; p++)
++    if (*p == '/')
++      {
++      has_slash = 1;
++      break;
++      }
++  if (!has_slash)
++    {
++      /* no slashes; search PATH */
++      const char *path = getenv ("PATH");
++      if (path != NULL)
++      {
++        for (p = path; *p; p = p_next)
++          {
++            const char *q;
++            size_t p_len;
++            for (q = p; *q; q++)
++              if (IS_PATH_SEPARATOR (*q))
++                break;
++            p_len = q - p;
++            p_next = (*q == '\0' ? q : q + 1);
++            if (p_len == 0)
++              {
++                /* empty path: current directory */
++                if (getcwd (tmp, LT_PATHMAX) == NULL)
++                  lt_fatal ("getcwd failed");
++                tmp_len = strlen (tmp);
++                concat_name =
++                  XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
++                memcpy (concat_name, tmp, tmp_len);
++                concat_name[tmp_len] = '/';
++                strcpy (concat_name + tmp_len + 1, wrapper);
++              }
++            else
++              {
++                concat_name =
++                  XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
++                memcpy (concat_name, p, p_len);
++                concat_name[p_len] = '/';
++                strcpy (concat_name + p_len + 1, wrapper);
++              }
++            if (check_executable (concat_name))
++              return concat_name;
++            XFREE (concat_name);
++          }
++      }
++      /* not found in PATH; assume curdir */
++    }
++  /* Relative path | not found in path: prepend cwd */
++  if (getcwd (tmp, LT_PATHMAX) == NULL)
++    lt_fatal ("getcwd failed");
++  tmp_len = strlen (tmp);
++  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
++  memcpy (concat_name, tmp, tmp_len);
++  concat_name[tmp_len] = '/';
++  strcpy (concat_name + tmp_len + 1, wrapper);
++
++  if (check_executable (concat_name))
++    return concat_name;
++  XFREE (concat_name);
++  return NULL;
++}
++
++char *
++chase_symlinks (const char *pathspec)
++{
++#ifndef S_ISLNK
++  return xstrdup (pathspec);
++#else
++  char buf[LT_PATHMAX];
++  struct stat s;
++  char *tmp_pathspec = xstrdup (pathspec);
++  char *p;
++  int has_symlinks = 0;
++  while (strlen (tmp_pathspec) && !has_symlinks)
++    {
++      LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
++                            tmp_pathspec));
++      if (lstat (tmp_pathspec, &s) == 0)
++      {
++        if (S_ISLNK (s.st_mode) != 0)
++          {
++            has_symlinks = 1;
++            break;
++          }
++
++        /* search backwards for last DIR_SEPARATOR */
++        p = tmp_pathspec + strlen (tmp_pathspec) - 1;
++        while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
++          p--;
++        if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
++          {
++            /* no more DIR_SEPARATORS left */
++            break;
++          }
++        *p = '\0';
++      }
++      else
++      {
++        char *errstr = strerror (errno);
++        lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
++      }
++    }
++  XFREE (tmp_pathspec);
++
++  if (!has_symlinks)
++    {
++      return xstrdup (pathspec);
++    }
++
++  tmp_pathspec = realpath (pathspec, buf);
++  if (tmp_pathspec == 0)
++    {
++      lt_fatal ("Could not follow symlinks for %s", pathspec);
++    }
++  return xstrdup (tmp_pathspec);
++#endif
++}
++
++char *
++strendzap (char *str, const char *pat)
++{
++  size_t len, patlen;
++
++  assert (str != NULL);
++  assert (pat != NULL);
++
++  len = strlen (str);
++  patlen = strlen (pat);
++
++  if (patlen <= len)
++    {
++      str += len - patlen;
++      if (strcmp (str, pat) == 0)
++      *str = '\0';
++    }
++  return str;
++}
++
++static void
++lt_error_core (int exit_status, const char *mode,
++             const char *message, va_list ap)
++{
++  fprintf (stderr, "%s: %s: ", program_name, mode);
++  vfprintf (stderr, message, ap);
++  fprintf (stderr, ".\n");
++
++  if (exit_status >= 0)
++    exit (exit_status);
++}
++
++void
++lt_fatal (const char *message, ...)
++{
++  va_list ap;
++  va_start (ap, message);
++  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
++  va_end (ap);
++}
++
++void
++lt_setenv (const char *name, const char *value)
++{
++  LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
++                          (name ? name : "<NULL>"),
++                          (value ? value : "<NULL>")));
++  {
++#ifdef HAVE_SETENV
++    /* always make a copy, for consistency with !HAVE_SETENV */
++    char *str = xstrdup (value);
++    setenv (name, str, 1);
++#else
++    int len = strlen (name) + 1 + strlen (value) + 1;
++    char *str = XMALLOC (char, len);
++    sprintf (str, "%s=%s", name, value);
++    if (putenv (str) != EXIT_SUCCESS)
++      {
++        XFREE (str);
++      }
++#endif
++  }
++}
++
++char *
++lt_extend_str (const char *orig_value, const char *add, int to_end)
++{
++  char *new_value;
++  if (orig_value && *orig_value)
++    {
++      int orig_value_len = strlen (orig_value);
++      int add_len = strlen (add);
++      new_value = XMALLOC (char, add_len + orig_value_len + 1);
++      if (to_end)
++        {
++          strcpy (new_value, orig_value);
++          strcpy (new_value + orig_value_len, add);
++        }
++      else
++        {
++          strcpy (new_value, add);
++          strcpy (new_value + add_len, orig_value);
++        }
++    }
++  else
++    {
++      new_value = xstrdup (add);
++    }
++  return new_value;
++}
++
++void
++lt_update_exe_path (const char *name, const char *value)
++{
++  LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
++                          (name ? name : "<NULL>"),
++                          (value ? value : "<NULL>")));
++
++  if (name && *name && value && *value)
++    {
++      char *new_value = lt_extend_str (getenv (name), value, 0);
++      /* some systems can't cope with a ':'-terminated path #' */
++      int len = strlen (new_value);
++      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
++        {
++          new_value[len-1] = '\0';
++        }
++      lt_setenv (name, new_value);
++      XFREE (new_value);
++    }
++}
++
++void
++lt_update_lib_path (const char *name, const char *value)
++{
++  LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
++                          (name ? name : "<NULL>"),
++                          (value ? value : "<NULL>")));
++
++  if (name && *name && value && *value)
++    {
++      char *new_value = lt_extend_str (getenv (name), value, 0);
++      lt_setenv (name, new_value);
++      XFREE (new_value);
++    }
++}
++
++EOF
++          case $host_os in
++            mingw*)
++              cat <<"EOF"
++
++/* Prepares an argument vector before calling spawn().
++   Note that spawn() does not by itself call the command interpreter
++     (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
++      ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
++         GetVersionEx(&v);
++         v.dwPlatformId == VER_PLATFORM_WIN32_NT;
++      }) ? "cmd.exe" : "command.com").
++   Instead it simply concatenates the arguments, separated by ' ', and calls
++   CreateProcess().  We must quote the arguments since Win32 CreateProcess()
++   interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
++   special way:
++   - Space and tab are interpreted as delimiters. They are not treated as
++     delimiters if they are surrounded by double quotes: "...".
++   - Unescaped double quotes are removed from the input. Their only effect is
++     that within double quotes, space and tab are treated like normal
++     characters.
++   - Backslashes not followed by double quotes are not special.
++   - But 2*n+1 backslashes followed by a double quote become
++     n backslashes followed by a double quote (n >= 0):
++       \" -> "
++       \\\" -> \"
++       \\\\\" -> \\"
++ */
++#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
++#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
++char **
++prepare_spawn (char **argv)
++{
++  size_t argc;
++  char **new_argv;
++  size_t i;
++
++  /* Count number of arguments.  */
++  for (argc = 0; argv[argc] != NULL; argc++)
++    ;
++
++  /* Allocate new argument vector.  */
++  new_argv = XMALLOC (char *, argc + 1);
++
++  /* Put quoted arguments into the new argument vector.  */
++  for (i = 0; i < argc; i++)
++    {
++      const char *string = argv[i];
++
++      if (string[0] == '\0')
++      new_argv[i] = xstrdup ("\"\"");
++      else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
++      {
++        int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
++        size_t length;
++        unsigned int backslashes;
++        const char *s;
++        char *quoted_string;
++        char *p;
++
++        length = 0;
++        backslashes = 0;
++        if (quote_around)
++          length++;
++        for (s = string; *s != '\0'; s++)
++          {
++            char c = *s;
++            if (c == '"')
++              length += backslashes + 1;
++            length++;
++            if (c == '\\')
++              backslashes++;
++            else
++              backslashes = 0;
++          }
++        if (quote_around)
++          length += backslashes + 1;
++
++        quoted_string = XMALLOC (char, length + 1);
++
++        p = quoted_string;
++        backslashes = 0;
++        if (quote_around)
++          *p++ = '"';
++        for (s = string; *s != '\0'; s++)
++          {
++            char c = *s;
++            if (c == '"')
++              {
++                unsigned int j;
++                for (j = backslashes + 1; j > 0; j--)
++                  *p++ = '\\';
++              }
++            *p++ = c;
++            if (c == '\\')
++              backslashes++;
++            else
++              backslashes = 0;
++          }
++        if (quote_around)
++          {
++            unsigned int j;
++            for (j = backslashes; j > 0; j--)
++              *p++ = '\\';
++            *p++ = '"';
++          }
++        *p = '\0';
++
++        new_argv[i] = quoted_string;
++      }
++      else
++      new_argv[i] = (char *) string;
++    }
++  new_argv[argc] = NULL;
++
++  return new_argv;
++}
++EOF
++              ;;
++          esac
++
++            cat <<"EOF"
++void lt_dump_script (FILE* f)
++{
++EOF
++          func_emit_wrapper yes |
++              $SED -e 's/\([\\"]\)/\\\1/g' \
++                 -e 's/^/  fputs ("/' -e 's/$/\\n", f);/'
++
++            cat <<"EOF"
++}
++EOF
++}
++# end: func_emit_cwrapperexe_src
++
++# func_win32_import_lib_p ARG
++# True if ARG is an import lib, as indicated by $file_magic_cmd
++func_win32_import_lib_p ()
++{
++    $opt_debug
++    case `eval "$file_magic_cmd \"\$1\" 2>/dev/null" | $SED -e 10q` in
++    *import*) : ;;
++    *) false ;;
++    esac
++}
++
++# func_mode_link arg...
++func_mode_link ()
++{
++    $opt_debug
++    case $host in
++    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
++      # It is impossible to link a dll without this setting, and
++      # we shouldn't force the makefile maintainer to figure out
++      # which system we are compiling for in order to pass an extra
++      # flag for every libtool invocation.
++      # allow_undefined=no
++
++      # FIXME: Unfortunately, there are problems with the above when trying
++      # to make a dll which has undefined symbols, in which case not
++      # even a static library is built.  For now, we need to specify
++      # -no-undefined on the libtool link line when we can be certain
++      # that all symbols are satisfied, otherwise we get a static library.
++      allow_undefined=yes
++      ;;
++    *)
++      allow_undefined=yes
++      ;;
++    esac
++    libtool_args=$nonopt
++    base_compile="$nonopt $@"
++    compile_command=$nonopt
++    finalize_command=$nonopt
++
++    compile_rpath=
++    finalize_rpath=
++    compile_shlibpath=
++    finalize_shlibpath=
++    convenience=
++    old_convenience=
++    deplibs=
++    old_deplibs=
++    compiler_flags=
++    linker_flags=
++    dllsearchpath=
++    lib_search_path=`pwd`
++    inst_prefix_dir=
++    new_inherited_linker_flags=
++
++    avoid_version=no
++    bindir=
++    dlfiles=
++    dlprefiles=
++    dlself=no
++    export_dynamic=no
++    export_symbols=
++    export_symbols_regex=
++    generated=
++    libobjs=
++    ltlibs=
++    module=no
++    no_install=no
++    objs=
++    non_pic_objects=
++    precious_files_regex=
++    prefer_static_libs=no
++    preload=no
++    prev=
++    prevarg=
++    release=
++    rpath=
++    xrpath=
++    perm_rpath=
++    temp_rpath=
++    thread_safe=no
++    vinfo=
++    vinfo_number=no
++    weak_libs=
++    single_module="${wl}-single_module"
++    func_infer_tag $base_compile
++
++    # We need to know -static, to get the right output filenames.
++    for arg
++    do
++      case $arg in
++      -shared)
++      test "$build_libtool_libs" != yes && \
++        func_fatal_configuration "can not build a shared library"
++      build_old_libs=no
++      break
++      ;;
++      -all-static | -static | -static-libtool-libs)
++      case $arg in
++      -all-static)
++        if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
++          func_warning "complete static linking is impossible in this configuration"
++        fi
++        if test -n "$link_static_flag"; then
++          dlopen_self=$dlopen_self_static
++        fi
++        prefer_static_libs=yes
++        ;;
++      -static)
++        if test -z "$pic_flag" && test -n "$link_static_flag"; then
++          dlopen_self=$dlopen_self_static
++        fi
++        prefer_static_libs=built
++        ;;
++      -static-libtool-libs)
++        if test -z "$pic_flag" && test -n "$link_static_flag"; then
++          dlopen_self=$dlopen_self_static
++        fi
++        prefer_static_libs=yes
++        ;;
++      esac
++      build_libtool_libs=no
++      build_old_libs=yes
++      break
++      ;;
++      esac
++    done
++
++    # See if our shared archives depend on static archives.
++    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
++
++    # Go through the arguments, transforming them on the way.
++    while test "$#" -gt 0; do
++      arg="$1"
++      shift
++      func_quote_for_eval "$arg"
++      qarg=$func_quote_for_eval_unquoted_result
++      func_append libtool_args " $func_quote_for_eval_result"
++
++      # If the previous option needs an argument, assign it.
++      if test -n "$prev"; then
++      case $prev in
++      output)
++        func_append compile_command " @OUTPUT@"
++        func_append finalize_command " @OUTPUT@"
++        ;;
++      esac
++
++      case $prev in
++      bindir)
++        bindir="$arg"
++        prev=
++        continue
++        ;;
++      dlfiles|dlprefiles)
++        if test "$preload" = no; then
++          # Add the symbol object into the linking commands.
++          func_append compile_command " @SYMFILE@"
++          func_append finalize_command " @SYMFILE@"
++          preload=yes
++        fi
++        case $arg in
++        *.la | *.lo) ;;  # We handle these cases below.
++        force)
++          if test "$dlself" = no; then
++            dlself=needless
++            export_dynamic=yes
++          fi
++          prev=
++          continue
++          ;;
++        self)
++          if test "$prev" = dlprefiles; then
++            dlself=yes
++          elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
++            dlself=yes
++          else
++            dlself=needless
++            export_dynamic=yes
++          fi
++          prev=
++          continue
++          ;;
++        *)
++          if test "$prev" = dlfiles; then
++            dlfiles="$dlfiles $arg"
++          else
++            dlprefiles="$dlprefiles $arg"
++          fi
++          prev=
++          continue
++          ;;
++        esac
++        ;;
++      expsyms)
++        export_symbols="$arg"
++        test -f "$arg" \
++          || func_fatal_error "symbol file \`$arg' does not exist"
++        prev=
++        continue
++        ;;
++      expsyms_regex)
++        export_symbols_regex="$arg"
++        prev=
++        continue
++        ;;
++      framework)
++        case $host in
++          *-*-darwin*)
++            case "$deplibs " in
++              *" $qarg.ltframework "*) ;;
++              *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
++                 ;;
++            esac
++            ;;
++        esac
++        prev=
++        continue
++        ;;
++      inst_prefix)
++        inst_prefix_dir="$arg"
++        prev=
++        continue
++        ;;
++      objectlist)
++        if test -f "$arg"; then
++          save_arg=$arg
++          moreargs=
++          for fil in `cat "$save_arg"`
++          do
++#           moreargs="$moreargs $fil"
++            arg=$fil
++            # A libtool-controlled object.
++
++            # Check to see that this really is a libtool object.
++            if func_lalib_unsafe_p "$arg"; then
++              pic_object=
++              non_pic_object=
++
++              # Read the .lo file
++              func_source "$arg"
++
++              if test -z "$pic_object" ||
++                 test -z "$non_pic_object" ||
++                 test "$pic_object" = none &&
++                 test "$non_pic_object" = none; then
++                func_fatal_error "cannot find name of object for \`$arg'"
++              fi
++
++              # Extract subdirectory from the argument.
++              func_dirname "$arg" "/" ""
++              xdir="$func_dirname_result"
++
++              if test "$pic_object" != none; then
++                # Prepend the subdirectory the object is found in.
++                pic_object="$xdir$pic_object"
++
++                if test "$prev" = dlfiles; then
++                  if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
++                    dlfiles="$dlfiles $pic_object"
++                    prev=
++                    continue
++                  else
++                    # If libtool objects are unsupported, then we need to preload.
++                    prev=dlprefiles
++                  fi
++                fi
++
++                # CHECK ME:  I think I busted this.  -Ossama
++                if test "$prev" = dlprefiles; then
++                  # Preload the old-style object.
++                  dlprefiles="$dlprefiles $pic_object"
++                  prev=
++                fi
++
++                # A PIC object.
++                func_append libobjs " $pic_object"
++                arg="$pic_object"
++              fi
++
++              # Non-PIC object.
++              if test "$non_pic_object" != none; then
++                # Prepend the subdirectory the object is found in.
++                non_pic_object="$xdir$non_pic_object"
++
++                # A standard non-PIC object
++                func_append non_pic_objects " $non_pic_object"
++                if test -z "$pic_object" || test "$pic_object" = none ; then
++                  arg="$non_pic_object"
++                fi
++              else
++                # If the PIC object exists, use it instead.
++                # $xdir was prepended to $pic_object above.
++                non_pic_object="$pic_object"
++                func_append non_pic_objects " $non_pic_object"
++              fi
++            else
++              # Only an error if not doing a dry-run.
++              if $opt_dry_run; then
++                # Extract subdirectory from the argument.
++                func_dirname "$arg" "/" ""
++                xdir="$func_dirname_result"
++
++                func_lo2o "$arg"
++                pic_object=$xdir$objdir/$func_lo2o_result
++                non_pic_object=$xdir$func_lo2o_result
++                func_append libobjs " $pic_object"
++                func_append non_pic_objects " $non_pic_object"
++              else
++                func_fatal_error "\`$arg' is not a valid libtool object"
++              fi
++            fi
++          done
++        else
++          func_fatal_error "link input file \`$arg' does not exist"
++        fi
++        arg=$save_arg
++        prev=
++        continue
++        ;;
++      precious_regex)
++        precious_files_regex="$arg"
++        prev=
++        continue
++        ;;
++      release)
++        release="-$arg"
++        prev=
++        continue
++        ;;
++      rpath | xrpath)
++        # We need an absolute path.
++        case $arg in
++        [\\/]* | [A-Za-z]:[\\/]*) ;;
++        *)
++          func_fatal_error "only absolute run-paths are allowed"
++          ;;
++        esac
++        if test "$prev" = rpath; then
++          case "$rpath " in
++          *" $arg "*) ;;
++          *) rpath="$rpath $arg" ;;
++          esac
++        else
++          case "$xrpath " in
++          *" $arg "*) ;;
++          *) xrpath="$xrpath $arg" ;;
++          esac
++        fi
++        prev=
++        continue
++        ;;
++      shrext)
++        shrext_cmds="$arg"
++        prev=
++        continue
++        ;;
++      weak)
++        weak_libs="$weak_libs $arg"
++        prev=
++        continue
++        ;;
++      xcclinker)
++        linker_flags="$linker_flags $qarg"
++        compiler_flags="$compiler_flags $qarg"
++        prev=
++        func_append compile_command " $qarg"
++        func_append finalize_command " $qarg"
++        continue
++        ;;
++      xcompiler)
++        compiler_flags="$compiler_flags $qarg"
++        prev=
++        func_append compile_command " $qarg"
++        func_append finalize_command " $qarg"
++        continue
++        ;;
++      xlinker)
++        linker_flags="$linker_flags $qarg"
++        compiler_flags="$compiler_flags $wl$qarg"
++        prev=
++        func_append compile_command " $wl$qarg"
++        func_append finalize_command " $wl$qarg"
++        continue
++        ;;
++      *)
++        eval "$prev=\"\$arg\""
++        prev=
++        continue
++        ;;
++      esac
++      fi # test -n "$prev"
++
++      prevarg="$arg"
++
++      case $arg in
++      -all-static)
++      if test -n "$link_static_flag"; then
++        # See comment for -static flag below, for more details.
++        func_append compile_command " $link_static_flag"
++        func_append finalize_command " $link_static_flag"
++      fi
++      continue
++      ;;
++
++      -allow-undefined)
++      # FIXME: remove this flag sometime in the future.
++      func_fatal_error "\`-allow-undefined' must not be used because it is the default"
++      ;;
++
++      -avoid-version)
++      avoid_version=yes
++      continue
++      ;;
++
++      -bindir)
++      prev=bindir
++      continue
++      ;;
++
++      -dlopen)
++      prev=dlfiles
++      continue
++      ;;
++
++      -dlpreopen)
++      prev=dlprefiles
++      continue
++      ;;
++
++      -export-dynamic)
++      export_dynamic=yes
++      continue
++      ;;
++
++      -export-symbols | -export-symbols-regex)
++      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
++        func_fatal_error "more than one -exported-symbols argument is not allowed"
++      fi
++      if test "X$arg" = "X-export-symbols"; then
++        prev=expsyms
++      else
++        prev=expsyms_regex
++      fi
++      continue
++      ;;
++
++      -framework)
++      prev=framework
++      continue
++      ;;
++
++      -inst-prefix-dir)
++      prev=inst_prefix
++      continue
++      ;;
++
++      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
++      # so, if we see these flags be careful not to treat them like -L
++      -L[A-Z][A-Z]*:*)
++      case $with_gcc/$host in
++      no/*-*-irix* | /*-*-irix*)
++        func_append compile_command " $arg"
++        func_append finalize_command " $arg"
++        ;;
++      esac
++      continue
++      ;;
++
++      -L*)
++      func_stripname '-L' '' "$arg"
++      dir=$func_stripname_result
++      if test -z "$dir"; then
++        if test "$#" -gt 0; then
++          func_fatal_error "require no space between \`-L' and \`$1'"
++        else
++          func_fatal_error "need path for \`-L' option"
++        fi
++      fi
++      # We need an absolute path.
++      case $dir in
++      [\\/]* | [A-Za-z]:[\\/]*) ;;
++      *)
++        absdir=`cd "$dir" && pwd`
++        test -z "$absdir" && \
++          func_fatal_error "cannot determine absolute directory name of \`$dir'"
++        dir="$absdir"
++        ;;
++      esac
++      case "$deplibs " in
++      *" -L$dir "*) ;;
++      *)
++        deplibs="$deplibs -L$dir"
++        lib_search_path="$lib_search_path $dir"
++        ;;
++      esac
++      case $host in
++      *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
++        testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
++        case :$dllsearchpath: in
++        *":$dir:"*) ;;
++        ::) dllsearchpath=$dir;;
++        *) dllsearchpath="$dllsearchpath:$dir";;
++        esac
++        case :$dllsearchpath: in
++        *":$testbindir:"*) ;;
++        ::) dllsearchpath=$testbindir;;
++        *) dllsearchpath="$dllsearchpath:$testbindir";;
++        esac
++        ;;
++      esac
++      continue
++      ;;
++
++      -l*)
++      if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
++        case $host in
++        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
++          # These systems don't actually have a C or math library (as such)
++          continue
++          ;;
++        *-*-os2*)
++          # These systems don't actually have a C library (as such)
++          test "X$arg" = "X-lc" && continue
++          ;;
++        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
++          # Do not include libc due to us having libc/libc_r.
++          test "X$arg" = "X-lc" && continue
++          ;;
++        *-*-rhapsody* | *-*-darwin1.[012])
++          # Rhapsody C and math libraries are in the System framework
++          deplibs="$deplibs System.ltframework"
++          continue
++          ;;
++        *-*-sco3.2v5* | *-*-sco5v6*)
++          # Causes problems with __ctype
++          test "X$arg" = "X-lc" && continue
++          ;;
++        *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
++          # Compiler inserts libc in the correct place for threads to work
++          test "X$arg" = "X-lc" && continue
++          ;;
++        *-*-linux*)
++          test "X$arg" = "X-lc" && continue
++          ;;
++        esac
++      elif test "X$arg" = "X-lc_r"; then
++       case $host in
++       *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
++         # Do not include libc_r directly, use -pthread flag.
++         continue
++         ;;
++       esac
++      fi
++      deplibs="$deplibs $arg"
++      continue
++      ;;
++
++      -module)
++      module=yes
++      continue
++      ;;
++
++      # Tru64 UNIX uses -model [arg] to determine the layout of C++
++      # classes, name mangling, and exception handling.
++      # Darwin uses the -arch flag to determine output architecture.
++      -model|-arch|-isysroot)
++      compiler_flags="$compiler_flags $arg"
++      func_append compile_command " $arg"
++      func_append finalize_command " $arg"
++      prev=xcompiler
++      continue
++      ;;
++
++      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
++      compiler_flags="$compiler_flags $arg"
++      func_append compile_command " $arg"
++      func_append finalize_command " $arg"
++      case "$new_inherited_linker_flags " in
++          *" $arg "*) ;;
++          * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
++      esac
++      continue
++      ;;
++
++      -multi_module)
++      single_module="${wl}-multi_module"
++      continue
++      ;;
++
++      -no-fast-install)
++      fast_install=no
++      continue
++      ;;
++
++      -no-install)
++      case $host in
++      *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
++        # The PATH hackery in wrapper scripts is required on Windows
++        # and Darwin in order for the loader to find any dlls it needs.
++        func_warning "\`-no-install' is ignored for $host"
++        func_warning "assuming \`-no-fast-install' instead"
++        fast_install=no
++        ;;
++      *) no_install=yes ;;
++      esac
++      continue
++      ;;
++
++      -no-undefined)
++      allow_undefined=no
++      continue
++      ;;
++
++      -objectlist)
++      prev=objectlist
++      continue
++      ;;
++
++      -o) prev=output ;;
++
++      -precious-files-regex)
++      prev=precious_regex
++      continue
++      ;;
++
++      -release)
++      prev=release
++      continue
++      ;;
++
++      -rpath)
++      prev=rpath
++      continue
++      ;;
++
++      -R)
++      prev=xrpath
++      continue
++      ;;
++
++      -R*)
++      func_stripname '-R' '' "$arg"
++      dir=$func_stripname_result
++      # We need an absolute path.
++      case $dir in
++      [\\/]* | [A-Za-z]:[\\/]*) ;;
++      *)
++        func_fatal_error "only absolute run-paths are allowed"
++        ;;
++      esac
++      case "$xrpath " in
++      *" $dir "*) ;;
++      *) xrpath="$xrpath $dir" ;;
++      esac
++      continue
++      ;;
++
++      -shared)
++      # The effects of -shared are defined in a previous loop.
++      continue
++      ;;
++
++      -shrext)
++      prev=shrext
++      continue
++      ;;
++
++      -static | -static-libtool-libs)
++      # The effects of -static are defined in a previous loop.
++      # We used to do the same as -all-static on platforms that
++      # didn't have a PIC flag, but the assumption that the effects
++      # would be equivalent was wrong.  It would break on at least
++      # Digital Unix and AIX.
++      continue
++      ;;
++
++      -thread-safe)
++      thread_safe=yes
++      continue
++      ;;
++
++      -version-info)
++      prev=vinfo
++      continue
++      ;;
++
++      -version-number)
++      prev=vinfo
++      vinfo_number=yes
++      continue
++      ;;
++
++      -weak)
++        prev=weak
++      continue
++      ;;
++
++      -Wc,*)
++      func_stripname '-Wc,' '' "$arg"
++      args=$func_stripname_result
++      arg=
++      save_ifs="$IFS"; IFS=','
++      for flag in $args; do
++        IFS="$save_ifs"
++          func_quote_for_eval "$flag"
++        arg="$arg $func_quote_for_eval_result"
++        compiler_flags="$compiler_flags $func_quote_for_eval_result"
++      done
++      IFS="$save_ifs"
++      func_stripname ' ' '' "$arg"
++      arg=$func_stripname_result
++      ;;
++
++      -Wl,*)
++      func_stripname '-Wl,' '' "$arg"
++      args=$func_stripname_result
++      arg=
++      save_ifs="$IFS"; IFS=','
++      for flag in $args; do
++        IFS="$save_ifs"
++          func_quote_for_eval "$flag"
++        arg="$arg $wl$func_quote_for_eval_result"
++        compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
++        linker_flags="$linker_flags $func_quote_for_eval_result"
++      done
++      IFS="$save_ifs"
++      func_stripname ' ' '' "$arg"
++      arg=$func_stripname_result
++      ;;
++
++      -Xcompiler)
++      prev=xcompiler
++      continue
++      ;;
++
++      -Xlinker)
++      prev=xlinker
++      continue
++      ;;
++
++      -XCClinker)
++      prev=xcclinker
++      continue
++      ;;
++
++      # -msg_* for osf cc
++      -msg_*)
++      func_quote_for_eval "$arg"
++      arg="$func_quote_for_eval_result"
++      ;;
++
++      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
++      # -r[0-9][0-9]* specifies the processor on the SGI compiler
++      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
++      # +DA*, +DD* enable 64-bit mode on the HP compiler
++      # -q* pass through compiler args for the IBM compiler
++      # -m*, -t[45]*, -txscale* pass through architecture-specific
++      # compiler args for GCC
++      # -F/path gives path to uninstalled frameworks, gcc on darwin
++      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
++      # @file GCC response files
++      # -tp=* Portland pgcc target processor selection
++      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
++        func_quote_for_eval "$arg"
++      arg="$func_quote_for_eval_result"
++        func_append compile_command " $arg"
++        func_append finalize_command " $arg"
++        compiler_flags="$compiler_flags $arg"
++        continue
++        ;;
++
++      # Some other compiler flag.
++      -* | +*)
++        func_quote_for_eval "$arg"
++      arg="$func_quote_for_eval_result"
++      ;;
++
++      *.$objext)
++      # A standard object.
++      objs="$objs $arg"
++      ;;
++
++      *.lo)
++      # A libtool-controlled object.
++
++      # Check to see that this really is a libtool object.
++      if func_lalib_unsafe_p "$arg"; then
++        pic_object=
++        non_pic_object=
++
++        # Read the .lo file
++        func_source "$arg"
++
++        if test -z "$pic_object" ||
++           test -z "$non_pic_object" ||
++           test "$pic_object" = none &&
++           test "$non_pic_object" = none; then
++          func_fatal_error "cannot find name of object for \`$arg'"
++        fi
++
++        # Extract subdirectory from the argument.
++        func_dirname "$arg" "/" ""
++        xdir="$func_dirname_result"
++
++        if test "$pic_object" != none; then
++          # Prepend the subdirectory the object is found in.
++          pic_object="$xdir$pic_object"
++
++          if test "$prev" = dlfiles; then
++            if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
++              dlfiles="$dlfiles $pic_object"
++              prev=
++              continue
++            else
++              # If libtool objects are unsupported, then we need to preload.
++              prev=dlprefiles
++            fi
++          fi
++
++          # CHECK ME:  I think I busted this.  -Ossama
++          if test "$prev" = dlprefiles; then
++            # Preload the old-style object.
++            dlprefiles="$dlprefiles $pic_object"
++            prev=
++          fi
++
++          # A PIC object.
++          func_append libobjs " $pic_object"
++          arg="$pic_object"
++        fi
++
++        # Non-PIC object.
++        if test "$non_pic_object" != none; then
++          # Prepend the subdirectory the object is found in.
++          non_pic_object="$xdir$non_pic_object"
++
++          # A standard non-PIC object
++          func_append non_pic_objects " $non_pic_object"
++          if test -z "$pic_object" || test "$pic_object" = none ; then
++            arg="$non_pic_object"
++          fi
++        else
++          # If the PIC object exists, use it instead.
++          # $xdir was prepended to $pic_object above.
++          non_pic_object="$pic_object"
++          func_append non_pic_objects " $non_pic_object"
++        fi
++      else
++        # Only an error if not doing a dry-run.
++        if $opt_dry_run; then
++          # Extract subdirectory from the argument.
++          func_dirname "$arg" "/" ""
++          xdir="$func_dirname_result"
++
++          func_lo2o "$arg"
++          pic_object=$xdir$objdir/$func_lo2o_result
++          non_pic_object=$xdir$func_lo2o_result
++          func_append libobjs " $pic_object"
++          func_append non_pic_objects " $non_pic_object"
++        else
++          func_fatal_error "\`$arg' is not a valid libtool object"
++        fi
++      fi
++      ;;
++
++      *.$libext)
++      # An archive.
++      deplibs="$deplibs $arg"
++      old_deplibs="$old_deplibs $arg"
++      continue
++      ;;
++
++      *.la)
++      # A libtool-controlled library.
++
++      if test "$prev" = dlfiles; then
++        # This library was specified with -dlopen.
++        dlfiles="$dlfiles $arg"
++        prev=
++      elif test "$prev" = dlprefiles; then
++        # The library was specified with -dlpreopen.
++        dlprefiles="$dlprefiles $arg"
++        prev=
++      else
++        deplibs="$deplibs $arg"
++      fi
++      continue
++      ;;
++
++      # Some other compiler argument.
++      *)
++      # Unknown arguments in both finalize_command and compile_command need
++      # to be aesthetically quoted because they are evaled later.
++      func_quote_for_eval "$arg"
++      arg="$func_quote_for_eval_result"
++      ;;
++      esac # arg
++
++      # Now actually substitute the argument into the commands.
++      if test -n "$arg"; then
++      func_append compile_command " $arg"
++      func_append finalize_command " $arg"
++      fi
++    done # argument parsing loop
++
++    test -n "$prev" && \
++      func_fatal_help "the \`$prevarg' option requires an argument"
++
++    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
++      eval "arg=\"$export_dynamic_flag_spec\""
++      func_append compile_command " $arg"
++      func_append finalize_command " $arg"
++    fi
++
++    oldlibs=
++    # calculate the name of the file, without its directory
++    func_basename "$output"
++    outputname="$func_basename_result"
++    libobjs_save="$libobjs"
++
++    if test -n "$shlibpath_var"; then
++      # get the directories listed in $shlibpath_var
++      eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
++    else
++      shlib_search_path=
++    fi
++    eval "sys_lib_search_path=\"$sys_lib_search_path_spec\""
++    eval "sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\""
++
++    func_dirname "$output" "/" ""
++    output_objdir="$func_dirname_result$objdir"
++    # Create the object directory.
++    func_mkdir_p "$output_objdir"
++
++    # Determine the type of output
++    case $output in
++    "")
++      func_fatal_help "you must specify an output file"
++      ;;
++    *.$libext) linkmode=oldlib ;;
++    *.lo | *.$objext) linkmode=obj ;;
++    *.la) linkmode=lib ;;
++    *) linkmode=prog ;; # Anything else should be a program.
++    esac
++
++    specialdeplibs=
++
++    libs=
++    # Find all interdependent deplibs by searching for libraries
++    # that are linked more than once (e.g. -la -lb -la)
++    for deplib in $deplibs; do
++      if $opt_duplicate_deps ; then
++      case "$libs " in
++      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
++      esac
++      fi
++      libs="$libs $deplib"
++    done
++
++    if test "$linkmode" = lib; then
++      libs="$predeps $libs $compiler_lib_search_path $postdeps"
++
++      # Compute libraries that are listed more than once in $predeps
++      # $postdeps and mark them as special (i.e., whose duplicates are
++      # not to be eliminated).
++      pre_post_deps=
++      if $opt_duplicate_compiler_generated_deps; then
++      for pre_post_dep in $predeps $postdeps; do
++        case "$pre_post_deps " in
++        *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
++        esac
++        pre_post_deps="$pre_post_deps $pre_post_dep"
++      done
++      fi
++      pre_post_deps=
++    fi
++
++    deplibs=
++    newdependency_libs=
++    newlib_search_path=
++    need_relink=no # whether we're linking any uninstalled libtool libraries
++    notinst_deplibs= # not-installed libtool libraries
++    notinst_path= # paths that contain not-installed libtool libraries
++
++    case $linkmode in
++    lib)
++      passes="conv dlpreopen link"
++      for file in $dlfiles $dlprefiles; do
++        case $file in
++        *.la) ;;
++        *)
++          func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
++          ;;
++        esac
++      done
++      ;;
++    prog)
++      compile_deplibs=
++      finalize_deplibs=
++      alldeplibs=no
++      newdlfiles=
++      newdlprefiles=
++      passes="conv scan dlopen dlpreopen link"
++      ;;
++    *)  passes="conv"
++      ;;
++    esac
++
++    for pass in $passes; do
++      # The preopen pass in lib mode reverses $deplibs; put it back here
++      # so that -L comes before libs that need it for instance...
++      if test "$linkmode,$pass" = "lib,link"; then
++      ## FIXME: Find the place where the list is rebuilt in the wrong
++      ##        order, and fix it there properly
++        tmp_deplibs=
++      for deplib in $deplibs; do
++        tmp_deplibs="$deplib $tmp_deplibs"
++      done
++      deplibs="$tmp_deplibs"
++      fi
++
++      if test "$linkmode,$pass" = "lib,link" ||
++       test "$linkmode,$pass" = "prog,scan"; then
++      libs="$deplibs"
++      deplibs=
++      fi
++      if test "$linkmode" = prog; then
++      case $pass in
++      dlopen) libs="$dlfiles" ;;
++      dlpreopen) libs="$dlprefiles" ;;
++      link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
++      esac
++      fi
++      if test "$linkmode,$pass" = "lib,dlpreopen"; then
++      # Collect and forward deplibs of preopened libtool libs
++      for lib in $dlprefiles; do
++        # Ignore non-libtool-libs
++        dependency_libs=
++        case $lib in
++        *.la) func_source "$lib" ;;
++        esac
++
++        # Collect preopened libtool deplibs, except any this library
++        # has declared as weak libs
++        for deplib in $dependency_libs; do
++          func_basename "$deplib"
++            deplib_base=$func_basename_result
++          case " $weak_libs " in
++          *" $deplib_base "*) ;;
++          *) deplibs="$deplibs $deplib" ;;
++          esac
++        done
++      done
++      libs="$dlprefiles"
++      fi
++      if test "$pass" = dlopen; then
++      # Collect dlpreopened libraries
++      save_deplibs="$deplibs"
++      deplibs=
++      fi
++
++      for deplib in $libs; do
++      lib=
++      found=no
++      case $deplib in
++      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
++        if test "$linkmode,$pass" = "prog,link"; then
++          compile_deplibs="$deplib $compile_deplibs"
++          finalize_deplibs="$deplib $finalize_deplibs"
++        else
++          compiler_flags="$compiler_flags $deplib"
++          if test "$linkmode" = lib ; then
++              case "$new_inherited_linker_flags " in
++                  *" $deplib "*) ;;
++                  * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
++              esac
++          fi
++        fi
++        continue
++        ;;
++      -l*)
++        if test "$linkmode" != lib && test "$linkmode" != prog; then
++          func_warning "\`-l' is ignored for archives/objects"
++          continue
++        fi
++        func_stripname '-l' '' "$deplib"
++        name=$func_stripname_result
++        if test "$linkmode" = lib; then
++          searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
++        else
++          searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
++        fi
++        for searchdir in $searchdirs; do
++          for search_ext in .la $std_shrext .so .a; do
++            # Search the libtool library
++            lib="$searchdir/lib${name}${search_ext}"
++            if test -f "$lib"; then
++              if test "$search_ext" = ".la"; then
++                found=yes
++              else
++                found=no
++              fi
++              break 2
++            fi
++          done
++        done
++        if test "$found" != yes; then
++          # deplib doesn't seem to be a libtool library
++          if test "$linkmode,$pass" = "prog,link"; then
++            compile_deplibs="$deplib $compile_deplibs"
++            finalize_deplibs="$deplib $finalize_deplibs"
++          else
++            deplibs="$deplib $deplibs"
++            test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
++          fi
++          continue
++        else # deplib is a libtool library
++          # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
++          # We need to do some special things here, and not later.
++          if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
++            case " $predeps $postdeps " in
++            *" $deplib "*)
++              if func_lalib_p "$lib"; then
++                library_names=
++                old_library=
++                func_source "$lib"
++                for l in $old_library $library_names; do
++                  ll="$l"
++                done
++                if test "X$ll" = "X$old_library" ; then # only static version available
++                  found=no
++                  func_dirname "$lib" "" "."
++                  ladir="$func_dirname_result"
++                  lib=$ladir/$old_library
++                  if test "$linkmode,$pass" = "prog,link"; then
++                    compile_deplibs="$deplib $compile_deplibs"
++                    finalize_deplibs="$deplib $finalize_deplibs"
++                  else
++                    deplibs="$deplib $deplibs"
++                    test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
++                  fi
++                  continue
++                fi
++              fi
++              ;;
++            *) ;;
++            esac
++          fi
++        fi
++        ;; # -l
++      *.ltframework)
++        if test "$linkmode,$pass" = "prog,link"; then
++          compile_deplibs="$deplib $compile_deplibs"
++          finalize_deplibs="$deplib $finalize_deplibs"
++        else
++          deplibs="$deplib $deplibs"
++          if test "$linkmode" = lib ; then
++              case "$new_inherited_linker_flags " in
++                  *" $deplib "*) ;;
++                  * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
++              esac
++          fi
++        fi
++        continue
++        ;;
++      -L*)
++        case $linkmode in
++        lib)
++          deplibs="$deplib $deplibs"
++          test "$pass" = conv && continue
++          newdependency_libs="$deplib $newdependency_libs"
++          func_stripname '-L' '' "$deplib"
++          newlib_search_path="$newlib_search_path $func_stripname_result"
++          ;;
++        prog)
++          if test "$pass" = conv; then
++            deplibs="$deplib $deplibs"
++            continue
++          fi
++          if test "$pass" = scan; then
++            deplibs="$deplib $deplibs"
++          else
++            compile_deplibs="$deplib $compile_deplibs"
++            finalize_deplibs="$deplib $finalize_deplibs"
++          fi
++          func_stripname '-L' '' "$deplib"
++          newlib_search_path="$newlib_search_path $func_stripname_result"
++          ;;
++        *)
++          func_warning "\`-L' is ignored for archives/objects"
++          ;;
++        esac # linkmode
++        continue
++        ;; # -L
++      -R*)
++        if test "$pass" = link; then
++          func_stripname '-R' '' "$deplib"
++          dir=$func_stripname_result
++          # Make sure the xrpath contains only unique directories.
++          case "$xrpath " in
++          *" $dir "*) ;;
++          *) xrpath="$xrpath $dir" ;;
++          esac
++        fi
++        deplibs="$deplib $deplibs"
++        continue
++        ;;
++      *.la) lib="$deplib" ;;
++      *.$libext)
++        if test "$pass" = conv; then
++          deplibs="$deplib $deplibs"
++          continue
++        fi
++        case $linkmode in
++        lib)
++          # Linking convenience modules into shared libraries is allowed,
++          # but linking other static libraries is non-portable.
++          case " $dlpreconveniencelibs " in
++          *" $deplib "*) ;;
++          *)
++            valid_a_lib=no
++            case $deplibs_check_method in
++              match_pattern*)
++                set dummy $deplibs_check_method; shift
++                match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
++                if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
++                  | $EGREP "$match_pattern_regex" > /dev/null; then
++                  valid_a_lib=yes
++                fi
++              ;;
++              pass_all)
++                valid_a_lib=yes
++              ;;
++            esac
++            if test "$valid_a_lib" != yes; then
++              echo
++              $ECHO "*** Warning: Trying to link with static lib archive $deplib."
++              echo "*** I have the capability to make that library automatically link in when"
++              echo "*** you link to this library.  But I can only do this if you have a"
++              echo "*** shared version of the library, which you do not appear to have"
++              echo "*** because the file extensions .$libext of this argument makes me believe"
++              echo "*** that it is just a static archive that I should not use here."
++            else
++              echo
++              $ECHO "*** Warning: Linking the shared library $output against the"
++              $ECHO "*** static library $deplib is not portable!"
++              deplibs="$deplib $deplibs"
++            fi
++            ;;
++          esac
++          continue
++          ;;
++        prog)
++          if test "$pass" != link; then
++            deplibs="$deplib $deplibs"
++          else
++            compile_deplibs="$deplib $compile_deplibs"
++            finalize_deplibs="$deplib $finalize_deplibs"
++          fi
++          continue
++          ;;
++        esac # linkmode
++        ;; # *.$libext
++      *.lo | *.$objext)
++        if test "$pass" = conv; then
++          deplibs="$deplib $deplibs"
++        elif test "$linkmode" = prog; then
++          if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
++            # If there is no dlopen support or we're linking statically,
++            # we need to preload.
++            newdlprefiles="$newdlprefiles $deplib"
++            compile_deplibs="$deplib $compile_deplibs"
++            finalize_deplibs="$deplib $finalize_deplibs"
++          else
++            newdlfiles="$newdlfiles $deplib"
++          fi
++        fi
++        continue
++        ;;
++      %DEPLIBS%)
++        alldeplibs=yes
++        continue
++        ;;
++      esac # case $deplib
++
++      if test "$found" = yes || test -f "$lib"; then :
++      else
++        func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
++      fi
++
++      # Check to see that this really is a libtool archive.
++      func_lalib_unsafe_p "$lib" \
++        || func_fatal_error "\`$lib' is not a valid libtool archive"
++
++      func_dirname "$lib" "" "."
++      ladir="$func_dirname_result"
++
++      dlname=
++      dlopen=
++      dlpreopen=
++      libdir=
++      library_names=
++      old_library=
++      inherited_linker_flags=
++      # If the library was installed with an old release of libtool,
++      # it will not redefine variables installed, or shouldnotlink
++      installed=yes
++      shouldnotlink=no
++      avoidtemprpath=
++
++
++      # Read the .la file
++      func_source "$lib"
++
++      # Convert "-framework foo" to "foo.ltframework"
++      if test -n "$inherited_linker_flags"; then
++        tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
++        for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
++          case " $new_inherited_linker_flags " in
++            *" $tmp_inherited_linker_flag "*) ;;
++            *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
++          esac
++        done
++      fi
++      dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
++      if test "$linkmode,$pass" = "lib,link" ||
++         test "$linkmode,$pass" = "prog,scan" ||
++         { test "$linkmode" != prog && test "$linkmode" != lib; }; then
++        test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
++        test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
++      fi
++
++      if test "$pass" = conv; then
++        # Only check for convenience libraries
++        deplibs="$lib $deplibs"
++        if test -z "$libdir"; then
++          if test -z "$old_library"; then
++            func_fatal_error "cannot find name of link library for \`$lib'"
++          fi
++          # It is a libtool convenience library, so add in its objects.
++          convenience="$convenience $ladir/$objdir/$old_library"
++          old_convenience="$old_convenience $ladir/$objdir/$old_library"
++        elif test "$linkmode" != prog && test "$linkmode" != lib; then
++          func_fatal_error "\`$lib' is not a convenience library"
++        fi
++        tmp_libs=
++        for deplib in $dependency_libs; do
++          deplibs="$deplib $deplibs"
++          if $opt_duplicate_deps ; then
++            case "$tmp_libs " in
++            *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
++            esac
++          fi
++          tmp_libs="$tmp_libs $deplib"
++        done
++        continue
++      fi # $pass = conv
++
++
++      # Get the name of the library we link against.
++      linklib=
++      for l in $old_library $library_names; do
++        linklib="$l"
++      done
++      if test -z "$linklib"; then
++        func_fatal_error "cannot find name of link library for \`$lib'"
++      fi
++
++      # This library was specified with -dlopen.
++      if test "$pass" = dlopen; then
++        if test -z "$libdir"; then
++          func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
++        fi
++        if test -z "$dlname" ||
++           test "$dlopen_support" != yes ||
++           test "$build_libtool_libs" = no; then
++          # If there is no dlname, no dlopen support or we're linking
++          # statically, we need to preload.  We also need to preload any
++          # dependent libraries so libltdl's deplib preloader doesn't
++          # bomb out in the load deplibs phase.
++          dlprefiles="$dlprefiles $lib $dependency_libs"
++        else
++          newdlfiles="$newdlfiles $lib"
++        fi
++        continue
++      fi # $pass = dlopen
++
++      # We need an absolute path.
++      case $ladir in
++      [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
++      *)
++        abs_ladir=`cd "$ladir" && pwd`
++        if test -z "$abs_ladir"; then
++          func_warning "cannot determine absolute directory name of \`$ladir'"
++          func_warning "passing it literally to the linker, although it might fail"
++          abs_ladir="$ladir"
++        fi
++        ;;
++      esac
++      func_basename "$lib"
++      laname="$func_basename_result"
++
++      # Find the relevant object directory and library name.
++      if test "X$installed" = Xyes; then
++        if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
++          func_warning "library \`$lib' was moved."
++          dir="$ladir"
++          absdir="$abs_ladir"
++          libdir="$abs_ladir"
++        else
++          dir="$libdir"
++          absdir="$libdir"
++        fi
++        test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
++      else
++        if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
++          dir="$ladir"
++          absdir="$abs_ladir"
++          # Remove this search path later
++          notinst_path="$notinst_path $abs_ladir"
++        else
++          dir="$ladir/$objdir"
++          absdir="$abs_ladir/$objdir"
++          # Remove this search path later
++          notinst_path="$notinst_path $abs_ladir"
++        fi
++      fi # $installed = yes
++      func_stripname 'lib' '.la' "$laname"
++      name=$func_stripname_result
++
++      # This library was specified with -dlpreopen.
++      if test "$pass" = dlpreopen; then
++        if test -z "$libdir" && test "$linkmode" = prog; then
++          func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
++        fi
++        # Prefer using a static library (so that no silly _DYNAMIC symbols
++        # are required to link).
++        if test -n "$old_library"; then
++          newdlprefiles="$newdlprefiles $dir/$old_library"
++          # Keep a list of preopened convenience libraries to check
++          # that they are being used correctly in the link pass.
++          test -z "$libdir" && \
++              dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
++        # Otherwise, use the dlname, so that lt_dlopen finds it.
++        elif test -n "$dlname"; then
++          newdlprefiles="$newdlprefiles $dir/$dlname"
++        else
++          newdlprefiles="$newdlprefiles $dir/$linklib"
++        fi
++      fi # $pass = dlpreopen
++
++      if test -z "$libdir"; then
++        # Link the convenience library
++        if test "$linkmode" = lib; then
++          deplibs="$dir/$old_library $deplibs"
++        elif test "$linkmode,$pass" = "prog,link"; then
++          compile_deplibs="$dir/$old_library $compile_deplibs"
++          finalize_deplibs="$dir/$old_library $finalize_deplibs"
++        else
++          deplibs="$lib $deplibs" # used for prog,scan pass
++        fi
++        continue
++      fi
++
++
++      if test "$linkmode" = prog && test "$pass" != link; then
++        newlib_search_path="$newlib_search_path $ladir"
++        deplibs="$lib $deplibs"
++
++        linkalldeplibs=no
++        if test "$link_all_deplibs" != no || test -z "$library_names" ||
++           test "$build_libtool_libs" = no; then
++          linkalldeplibs=yes
++        fi
++
++        tmp_libs=
++        for deplib in $dependency_libs; do
++          case $deplib in
++          -L*) func_stripname '-L' '' "$deplib"
++               newlib_search_path="$newlib_search_path $func_stripname_result"
++               ;;
++          esac
++          # Need to link against all dependency_libs?
++          if test "$linkalldeplibs" = yes; then
++            deplibs="$deplib $deplibs"
++          else
++            # Need to hardcode shared library paths
++            # or/and link against static libraries
++            newdependency_libs="$deplib $newdependency_libs"
++          fi
++          if $opt_duplicate_deps ; then
++            case "$tmp_libs " in
++            *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
++            esac
++          fi
++          tmp_libs="$tmp_libs $deplib"
++        done # for deplib
++        continue
++      fi # $linkmode = prog...
++
++      if test "$linkmode,$pass" = "prog,link"; then
++        if test -n "$library_names" &&
++           { { test "$prefer_static_libs" = no ||
++               test "$prefer_static_libs,$installed" = "built,yes"; } ||
++             test -z "$old_library"; }; then
++          # We need to hardcode the library path
++          if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
++            # Make sure the rpath contains only unique directories.
++            case "$temp_rpath:" in
++            *"$absdir:"*) ;;
++            *) temp_rpath="$temp_rpath$absdir:" ;;
++            esac
++          fi
++
++          # Hardcode the library path.
++          # Skip directories that are in the system default run-time
++          # search path.
++          case " $sys_lib_dlsearch_path " in
++          *" $absdir "*) ;;
++          *)
++            case "$compile_rpath " in
++            *" $absdir "*) ;;
++            *) compile_rpath="$compile_rpath $absdir"
++            esac
++            ;;
++          esac
++          case " $sys_lib_dlsearch_path " in
++          *" $libdir "*) ;;
++          *)
++            case "$finalize_rpath " in
++            *" $libdir "*) ;;
++            *) finalize_rpath="$finalize_rpath $libdir"
++            esac
++            ;;
++          esac
++        fi # $linkmode,$pass = prog,link...
++
++        if test "$alldeplibs" = yes &&
++           { test "$deplibs_check_method" = pass_all ||
++             { test "$build_libtool_libs" = yes &&
++               test -n "$library_names"; }; }; then
++          # We only need to search for static libraries
++          continue
++        fi
++      fi
++
++      link_static=no # Whether the deplib will be linked statically
++      use_static_libs=$prefer_static_libs
++      if test "$use_static_libs" = built && test "$installed" = yes; then
++        use_static_libs=no
++      fi
++      if test -n "$library_names" &&
++         { test "$use_static_libs" = no || test -z "$old_library"; }; then
++        case $host in
++        *cygwin* | *mingw* | *cegcc*)
++            # No point in relinking DLLs because paths are not encoded
++            notinst_deplibs="$notinst_deplibs $lib"
++            need_relink=no
++          ;;
++        *)
++          if test "$installed" = no; then
++            notinst_deplibs="$notinst_deplibs $lib"
++            need_relink=yes
++          fi
++          ;;
++        esac
++        # This is a shared library
++
++        # Warn about portability, can't link against -module's on some
++        # systems (darwin).  Don't bleat about dlopened modules though!
++        dlopenmodule=""
++        for dlpremoduletest in $dlprefiles; do
++          if test "X$dlpremoduletest" = "X$lib"; then
++            dlopenmodule="$dlpremoduletest"
++            break
++          fi
++        done
++        if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
++          echo
++          if test "$linkmode" = prog; then
++            $ECHO "*** Warning: Linking the executable $output against the loadable module"
++          else
++            $ECHO "*** Warning: Linking the shared library $output against the loadable module"
++          fi
++          $ECHO "*** $linklib is not portable!"
++        fi
++        if test "$linkmode" = lib &&
++           test "$hardcode_into_libs" = yes; then
++          # Hardcode the library path.
++          # Skip directories that are in the system default run-time
++          # search path.
++          case " $sys_lib_dlsearch_path " in
++          *" $absdir "*) ;;
++          *)
++            case "$compile_rpath " in
++            *" $absdir "*) ;;
++            *) compile_rpath="$compile_rpath $absdir"
++            esac
++            ;;
++          esac
++          case " $sys_lib_dlsearch_path " in
++          *" $libdir "*) ;;
++          *)
++            case "$finalize_rpath " in
++            *" $libdir "*) ;;
++            *) finalize_rpath="$finalize_rpath $libdir"
++            esac
++            ;;
++          esac
++        fi
++
++        if test -n "$old_archive_from_expsyms_cmds"; then
++          # figure out the soname
++          set dummy $library_names
++          shift
++          realname="$1"
++          shift
++          eval "libname=\"$libname_spec\""
++          # use dlname if we got it. it's perfectly good, no?
++          if test -n "$dlname"; then
++            soname="$dlname"
++          elif test -n "$soname_spec"; then
++            # bleh windows
++            case $host in
++            *cygwin* | mingw* | *cegcc*)
++              func_arith $current - $age
++              major=$func_arith_result
++              versuffix="-$major"
++              ;;
++            esac
++            eval "soname=\"$soname_spec\""
++          else
++            soname="$realname"
++          fi
++
++          # Make a new name for the extract_expsyms_cmds to use
++          soroot="$soname"
++          func_basename "$soroot"
++          soname="$func_basename_result"
++          func_stripname 'lib' '.dll' "$soname"
++          newlib=libimp-$func_stripname_result.a
++
++          # If the library has no export list, then create one now
++          if test -f "$output_objdir/$soname-def"; then :
++          else
++            func_verbose "extracting exported symbol list from \`$soname'"
++            func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
++          fi
++
++          # Create $newlib
++          if test -f "$output_objdir/$newlib"; then :; else
++            func_verbose "generating import library for \`$soname'"
++            func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
++          fi
++          # make sure the library variables are pointing to the new library
++          dir=$output_objdir
++          linklib=$newlib
++        fi # test -n "$old_archive_from_expsyms_cmds"
++
++        if test "$linkmode" = prog || test "$mode" != relink; then
++          add_shlibpath=
++          add_dir=
++          add=
++          lib_linked=yes
++          case $hardcode_action in
++          immediate | unsupported)
++            if test "$hardcode_direct" = no; then
++              add="$dir/$linklib"
++              case $host in
++                *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
++                *-*-sysv4*uw2*) add_dir="-L$dir" ;;
++                *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
++                  *-*-unixware7*) add_dir="-L$dir" ;;
++                *-*-darwin* )
++                  # if the lib is a (non-dlopened) module then we can not
++                  # link against it, someone is ignoring the earlier warnings
++                  if /usr/bin/file -L $add 2> /dev/null |
++                       $GREP ": [^:]* bundle" >/dev/null ; then
++                    if test "X$dlopenmodule" != "X$lib"; then
++                      $ECHO "*** Warning: lib $linklib is a module, not a shared library"
++                      if test -z "$old_library" ; then
++                        echo
++                        echo "*** And there doesn't seem to be a static archive available"
++                        echo "*** The link will probably fail, sorry"
++                      else
++                        add="$dir/$old_library"
++                      fi
++                    elif test -n "$old_library"; then
++                      add="$dir/$old_library"
++                    fi
++                  fi
++              esac
++            elif test "$hardcode_minus_L" = no; then
++              case $host in
++              *-*-sunos*) add_shlibpath="$dir" ;;
++              esac
++              add_dir="-L$dir"
++              add="-l$name"
++            elif test "$hardcode_shlibpath_var" = no; then
++              add_shlibpath="$dir"
++              add="-l$name"
++            else
++              lib_linked=no
++            fi
++            ;;
++          relink)
++            if test "$hardcode_direct" = yes &&
++               test "$hardcode_direct_absolute" = no; then
++              add="$dir/$linklib"
++            elif test "$hardcode_minus_L" = yes; then
++              add_dir="-L$absdir"
++              # Try looking first in the location we're being installed to.
++              if test -n "$inst_prefix_dir"; then
++                case $libdir in
++                  [\\/]*)
++                    add_dir="$add_dir -L$inst_prefix_dir$libdir"
++                    ;;
++                esac
++              fi
++              add="-l$name"
++            elif test "$hardcode_shlibpath_var" = yes; then
++              add_shlibpath="$dir"
++              add="-l$name"
++            else
++              lib_linked=no
++            fi
++            ;;
++          *) lib_linked=no ;;
++          esac
++
++          if test "$lib_linked" != yes; then
++            func_fatal_configuration "unsupported hardcode properties"
++          fi
++
++          if test -n "$add_shlibpath"; then
++            case :$compile_shlibpath: in
++            *":$add_shlibpath:"*) ;;
++            *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
++            esac
++          fi
++          if test "$linkmode" = prog; then
++            test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
++            test -n "$add" && compile_deplibs="$add $compile_deplibs"
++          else
++            test -n "$add_dir" && deplibs="$add_dir $deplibs"
++            test -n "$add" && deplibs="$add $deplibs"
++            if test "$hardcode_direct" != yes &&
++               test "$hardcode_minus_L" != yes &&
++               test "$hardcode_shlibpath_var" = yes; then
++              case :$finalize_shlibpath: in
++              *":$libdir:"*) ;;
++              *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
++              esac
++            fi
++          fi
++        fi
++
++        if test "$linkmode" = prog || test "$mode" = relink; then
++          add_shlibpath=
++          add_dir=
++          add=
++          # Finalize command for both is simple: just hardcode it.
++          if test "$hardcode_direct" = yes &&
++             test "$hardcode_direct_absolute" = no; then
++            add="$libdir/$linklib"
++          elif test "$hardcode_minus_L" = yes; then
++            add_dir="-L$libdir"
++            add="-l$name"
++          elif test "$hardcode_shlibpath_var" = yes; then
++            case :$finalize_shlibpath: in
++            *":$libdir:"*) ;;
++            *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
++            esac
++            add="-l$name"
++          elif test "$hardcode_automatic" = yes; then
++            if test -n "$inst_prefix_dir" &&
++               test -f "$inst_prefix_dir$libdir/$linklib" ; then
++              add="$inst_prefix_dir$libdir/$linklib"
++            else
++              add="$libdir/$linklib"
++            fi
++          else
++            # We cannot seem to hardcode it, guess we'll fake it.
++            add_dir="-L$libdir"
++            # Try looking first in the location we're being installed to.
++            if test -n "$inst_prefix_dir"; then
++              case $libdir in
++                [\\/]*)
++                  add_dir="$add_dir -L$inst_prefix_dir$libdir"
++                  ;;
++              esac
++            fi
++            add="-l$name"
++          fi
++
++          if test "$linkmode" = prog; then
++            test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
++            test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
++          else
++            test -n "$add_dir" && deplibs="$add_dir $deplibs"
++            test -n "$add" && deplibs="$add $deplibs"
++          fi
++        fi
++      elif test "$linkmode" = prog; then
++        # Here we assume that one of hardcode_direct or hardcode_minus_L
++        # is not unsupported.  This is valid on all known static and
++        # shared platforms.
++        if test "$hardcode_direct" != unsupported; then
++          test -n "$old_library" && linklib="$old_library"
++          compile_deplibs="$dir/$linklib $compile_deplibs"
++          finalize_deplibs="$dir/$linklib $finalize_deplibs"
++        else
++          compile_deplibs="-l$name -L$dir $compile_deplibs"
++          finalize_deplibs="-l$name -L$dir $finalize_deplibs"
++        fi
++      elif test "$build_libtool_libs" = yes; then
++        # Not a shared library
++        if test "$deplibs_check_method" != pass_all; then
++          # We're trying link a shared library against a static one
++          # but the system doesn't support it.
++
++          # Just print a warning and add the library to dependency_libs so
++          # that the program can be linked against the static library.
++          echo
++          $ECHO "*** Warning: This system can not link to static lib archive $lib."
++          echo "*** I have the capability to make that library automatically link in when"
++          echo "*** you link to this library.  But I can only do this if you have a"
++          echo "*** shared version of the library, which you do not appear to have."
++          if test "$module" = yes; then
++            echo "*** But as you try to build a module library, libtool will still create "
++            echo "*** a static module, that should work as long as the dlopening application"
++            echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
++            if test -z "$global_symbol_pipe"; then
++              echo
++              echo "*** However, this would only work if libtool was able to extract symbol"
++              echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
++              echo "*** not find such a program.  So, this module is probably useless."
++              echo "*** \`nm' from GNU binutils and a full rebuild may help."
++            fi
++            if test "$build_old_libs" = no; then
++              build_libtool_libs=module
++              build_old_libs=yes
++            else
++              build_libtool_libs=no
++            fi
++          fi
++        else
++          deplibs="$dir/$old_library $deplibs"
++          link_static=yes
++        fi
++      fi # link shared/static library?
++
++      if test "$linkmode" = lib; then
++        if test -n "$dependency_libs" &&
++           { test "$hardcode_into_libs" != yes ||
++             test "$build_old_libs" = yes ||
++             test "$link_static" = yes; }; then
++          # Extract -R from dependency_libs
++          temp_deplibs=
++          for libdir in $dependency_libs; do
++            case $libdir in
++            -R*) func_stripname '-R' '' "$libdir"
++                 temp_xrpath=$func_stripname_result
++                 case " $xrpath " in
++                 *" $temp_xrpath "*) ;;
++                 *) xrpath="$xrpath $temp_xrpath";;
++                 esac;;
++            *) temp_deplibs="$temp_deplibs $libdir";;
++            esac
++          done
++          dependency_libs="$temp_deplibs"
++        fi
++
++        newlib_search_path="$newlib_search_path $absdir"
++        # Link against this library
++        test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
++        # ... and its dependency_libs
++        tmp_libs=
++        for deplib in $dependency_libs; do
++          newdependency_libs="$deplib $newdependency_libs"
++          if $opt_duplicate_deps ; then
++            case "$tmp_libs " in
++            *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
++            esac
++          fi
++          tmp_libs="$tmp_libs $deplib"
++        done
++
++        if test "$link_all_deplibs" != no; then
++          # Add the search paths of all dependency libraries
++          for deplib in $dependency_libs; do
++            path=
++            case $deplib in
++            -L*) path="$deplib" ;;
++            *.la)
++              func_dirname "$deplib" "" "."
++              dir="$func_dirname_result"
++              # We need an absolute path.
++              case $dir in
++              [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
++              *)
++                absdir=`cd "$dir" && pwd`
++                if test -z "$absdir"; then
++                  func_warning "cannot determine absolute directory name of \`$dir'"
++                  absdir="$dir"
++                fi
++                ;;
++              esac
++              if $GREP "^installed=no" $deplib > /dev/null; then
++              case $host in
++              *-*-darwin*)
++                depdepl=
++                deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
++                if test -n "$deplibrary_names" ; then
++                  for tmp in $deplibrary_names ; do
++                    depdepl=$tmp
++                  done
++                  if test -f "$absdir/$objdir/$depdepl" ; then
++                    depdepl="$absdir/$objdir/$depdepl"
++                    darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
++                      if test -z "$darwin_install_name"; then
++                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
++                      fi
++                    compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
++                    linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
++                    path=
++                  fi
++                fi
++                ;;
++              *)
++                path="-L$absdir/$objdir"
++                ;;
++              esac
++              else
++                libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
++                test -z "$libdir" && \
++                  func_fatal_error "\`$deplib' is not a valid libtool archive"
++                test "$absdir" != "$libdir" && \
++                  func_warning "\`$deplib' seems to be moved"
++
++                path="-L$absdir"
++              fi
++              ;;
++            esac
++            case " $deplibs " in
++            *" $path "*) ;;
++            *) deplibs="$path $deplibs" ;;
++            esac
++          done
++        fi # link_all_deplibs != no
++      fi # linkmode = lib
++      done # for deplib in $libs
++      if test "$pass" = link; then
++      if test "$linkmode" = "prog"; then
++        compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
++        finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
++      else
++        compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
++      fi
++      fi
++      dependency_libs="$newdependency_libs"
++      if test "$pass" = dlpreopen; then
++      # Link the dlpreopened libraries before other libraries
++      for deplib in $save_deplibs; do
++        deplibs="$deplib $deplibs"
++      done
++      fi
++      if test "$pass" != dlopen; then
++      if test "$pass" != conv; then
++        # Make sure lib_search_path contains only unique directories.
++        lib_search_path=
++        for dir in $newlib_search_path; do
++          case "$lib_search_path " in
++          *" $dir "*) ;;
++          *) lib_search_path="$lib_search_path $dir" ;;
++          esac
++        done
++        newlib_search_path=
++      fi
++
++      if test "$linkmode,$pass" != "prog,link"; then
++        vars="deplibs"
++      else
++        vars="compile_deplibs finalize_deplibs"
++      fi
++      for var in $vars dependency_libs; do
++        # Add libraries to $var in reverse order
++        eval tmp_libs=\$$var
++        new_libs=
++        for deplib in $tmp_libs; do
++          # FIXME: Pedantically, this is the right thing to do, so
++          #        that some nasty dependency loop isn't accidentally
++          #        broken:
++          #new_libs="$deplib $new_libs"
++          # Pragmatically, this seems to cause very few problems in
++          # practice:
++          case $deplib in
++          -L*) new_libs="$deplib $new_libs" ;;
++          -R*) ;;
++          *)
++            # And here is the reason: when a library appears more
++            # than once as an explicit dependence of a library, or
++            # is implicitly linked in more than once by the
++            # compiler, it is considered special, and multiple
++            # occurrences thereof are not removed.  Compare this
++            # with having the same library being listed as a
++            # dependency of multiple other libraries: in this case,
++            # we know (pedantically, we assume) the library does not
++            # need to be listed more than once, so we keep only the
++            # last copy.  This is not always right, but it is rare
++            # enough that we require users that really mean to play
++            # such unportable linking tricks to link the library
++            # using -Wl,-lname, so that libtool does not consider it
++            # for duplicate removal.
++            case " $specialdeplibs " in
++            *" $deplib "*) new_libs="$deplib $new_libs" ;;
++            *)
++              case " $new_libs " in
++              *" $deplib "*) ;;
++              *) new_libs="$deplib $new_libs" ;;
++              esac
++              ;;
++            esac
++            ;;
++          esac
++        done
++        tmp_libs=
++        for deplib in $new_libs; do
++          case $deplib in
++          -L*)
++            case " $tmp_libs " in
++            *" $deplib "*) ;;
++            *) tmp_libs="$tmp_libs $deplib" ;;
++            esac
++            ;;
++          *) tmp_libs="$tmp_libs $deplib" ;;
++          esac
++        done
++        eval $var=\$tmp_libs
++      done # for var
++      fi
++      # Last step: remove runtime libs from dependency_libs
++      # (they stay in deplibs)
++      tmp_libs=
++      for i in $dependency_libs ; do
++      case " $predeps $postdeps $compiler_lib_search_path " in
++      *" $i "*)
++        i=""
++        ;;
++      esac
++      if test -n "$i" ; then
++        tmp_libs="$tmp_libs $i"
++      fi
++      done
++      dependency_libs=$tmp_libs
++    done # for pass
++    if test "$linkmode" = prog; then
++      dlfiles="$newdlfiles"
++    fi
++    if test "$linkmode" = prog || test "$linkmode" = lib; then
++      dlprefiles="$newdlprefiles"
++    fi
++
++    case $linkmode in
++    oldlib)
++      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
++      func_warning "\`-dlopen' is ignored for archives"
++      fi
++
++      case " $deplibs" in
++      *\ -l* | *\ -L*)
++      func_warning "\`-l' and \`-L' are ignored for archives" ;;
++      esac
++
++      test -n "$rpath" && \
++      func_warning "\`-rpath' is ignored for archives"
++
++      test -n "$xrpath" && \
++      func_warning "\`-R' is ignored for archives"
++
++      test -n "$vinfo" && \
++      func_warning "\`-version-info/-version-number' is ignored for archives"
++
++      test -n "$release" && \
++      func_warning "\`-release' is ignored for archives"
++
++      test -n "$export_symbols$export_symbols_regex" && \
++      func_warning "\`-export-symbols' is ignored for archives"
++
++      # Now set the variables for building old libraries.
++      build_libtool_libs=no
++      oldlibs="$output"
++      objs="$objs$old_deplibs"
++      ;;
++
++    lib)
++      # Make sure we only generate libraries of the form `libNAME.la'.
++      case $outputname in
++      lib*)
++      func_stripname 'lib' '.la' "$outputname"
++      name=$func_stripname_result
++      eval "shared_ext=\"$shrext_cmds\""
++      eval "libname=\"$libname_spec\""
++      ;;
++      *)
++      test "$module" = no && \
++        func_fatal_help "libtool library \`$output' must begin with \`lib'"
++
++      if test "$need_lib_prefix" != no; then
++        # Add the "lib" prefix for modules if required
++        func_stripname '' '.la' "$outputname"
++        name=$func_stripname_result
++        eval "shared_ext=\"$shrext_cmds\""
++        eval "libname=\"$libname_spec\""
++      else
++        func_stripname '' '.la' "$outputname"
++        libname=$func_stripname_result
++      fi
++      ;;
++      esac
++
++      if test -n "$objs"; then
++      if test "$deplibs_check_method" != pass_all; then
++        func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
++      else
++        echo
++        $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
++        $ECHO "*** objects $objs is not portable!"
++        libobjs="$libobjs $objs"
++      fi
++      fi
++
++      test "$dlself" != no && \
++      func_warning "\`-dlopen self' is ignored for libtool libraries"
++
++      set dummy $rpath
++      shift
++      test "$#" -gt 1 && \
++      func_warning "ignoring multiple \`-rpath's for a libtool library"
++
++      install_libdir="$1"
++
++      oldlibs=
++      if test -z "$rpath"; then
++      if test "$build_libtool_libs" = yes; then
++        # Building a libtool convenience library.
++        # Some compilers have problems with a `.al' extension so
++        # convenience libraries should have the same extension an
++        # archive normally would.
++        oldlibs="$output_objdir/$libname.$libext $oldlibs"
++        build_libtool_libs=convenience
++        build_old_libs=yes
++      fi
++
++      test -n "$vinfo" && \
++        func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
++
++      test -n "$release" && \
++        func_warning "\`-release' is ignored for convenience libraries"
++      else
++
++      # Parse the version information argument.
++      save_ifs="$IFS"; IFS=':'
++      set dummy $vinfo 0 0 0
++      shift
++      IFS="$save_ifs"
++
++      test -n "$7" && \
++        func_fatal_help "too many parameters to \`-version-info'"
++
++      # convert absolute version numbers to libtool ages
++      # this retains compatibility with .la files and attempts
++      # to make the code below a bit more comprehensible
++
++      case $vinfo_number in
++      yes)
++        number_major="$1"
++        number_minor="$2"
++        number_revision="$3"
++        #
++        # There are really only two kinds -- those that
++        # use the current revision as the major version
++        # and those that subtract age and use age as
++        # a minor version.  But, then there is irix
++        # which has an extra 1 added just for fun
++        #
++        case $version_type in
++        darwin|linux|osf|windows|none)
++          func_arith $number_major + $number_minor
++          current=$func_arith_result
++          age="$number_minor"
++          revision="$number_revision"
++          ;;
++        freebsd-aout|freebsd-elf|qnx|sunos)
++          current="$number_major"
++          revision="$number_minor"
++          age="0"
++          ;;
++        irix|nonstopux)
++          func_arith $number_major + $number_minor
++          current=$func_arith_result
++          age="$number_minor"
++          revision="$number_minor"
++          lt_irix_increment=no
++          ;;
++        esac
++        ;;
++      no)
++        current="$1"
++        revision="$2"
++        age="$3"
++        ;;
++      esac
++
++      # Check that each of the things are valid numbers.
++      case $current in
++      0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
++      *)
++        func_error "CURRENT \`$current' must be a nonnegative integer"
++        func_fatal_error "\`$vinfo' is not valid version information"
++        ;;
++      esac
++
++      case $revision in
++      0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
++      *)
++        func_error "REVISION \`$revision' must be a nonnegative integer"
++        func_fatal_error "\`$vinfo' is not valid version information"
++        ;;
++      esac
++
++      case $age in
++      0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
++      *)
++        func_error "AGE \`$age' must be a nonnegative integer"
++        func_fatal_error "\`$vinfo' is not valid version information"
++        ;;
++      esac
++
++      if test "$age" -gt "$current"; then
++        func_error "AGE \`$age' is greater than the current interface number \`$current'"
++        func_fatal_error "\`$vinfo' is not valid version information"
++      fi
++
++      # Calculate the version variables.
++      major=
++      versuffix=
++      verstring=
++      case $version_type in
++      none) ;;
++
++      darwin)
++        # Like Linux, but with the current version available in
++        # verstring for coding it into the library header
++        func_arith $current - $age
++        major=.$func_arith_result
++        versuffix="$major.$age.$revision"
++        # Darwin ld doesn't like 0 for these options...
++        func_arith $current + 1
++        minor_current=$func_arith_result
++        xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
++        verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
++        ;;
++
++      freebsd-aout)
++        major=".$current"
++        versuffix=".$current.$revision";
++        ;;
++
++      freebsd-elf)
++        major=".$current"
++        versuffix=".$current"
++        ;;
++
++      irix | nonstopux)
++        if test "X$lt_irix_increment" = "Xno"; then
++          func_arith $current - $age
++        else
++          func_arith $current - $age + 1
++        fi
++        major=$func_arith_result
++
++        case $version_type in
++          nonstopux) verstring_prefix=nonstopux ;;
++          *)         verstring_prefix=sgi ;;
++        esac
++        verstring="$verstring_prefix$major.$revision"
++
++        # Add in all the interfaces that we are compatible with.
++        loop=$revision
++        while test "$loop" -ne 0; do
++          func_arith $revision - $loop
++          iface=$func_arith_result
++          func_arith $loop - 1
++          loop=$func_arith_result
++          verstring="$verstring_prefix$major.$iface:$verstring"
++        done
++
++        # Before this point, $major must not contain `.'.
++        major=.$major
++        versuffix="$major.$revision"
++        ;;
++
++      linux)
++        func_arith $current - $age
++        major=.$func_arith_result
++        versuffix="$major.$age.$revision"
++        ;;
++
++      osf)
++        func_arith $current - $age
++        major=.$func_arith_result
++        versuffix=".$current.$age.$revision"
++        verstring="$current.$age.$revision"
++
++        # Add in all the interfaces that we are compatible with.
++        loop=$age
++        while test "$loop" -ne 0; do
++          func_arith $current - $loop
++          iface=$func_arith_result
++          func_arith $loop - 1
++          loop=$func_arith_result
++          verstring="$verstring:${iface}.0"
++        done
++
++        # Make executables depend on our current version.
++        verstring="$verstring:${current}.0"
++        ;;
++
++      qnx)
++        major=".$current"
++        versuffix=".$current"
++        ;;
++
++      sunos)
++        major=".$current"
++        versuffix=".$current.$revision"
++        ;;
++
++      windows)
++        # Use '-' rather than '.', since we only want one
++        # extension on DOS 8.3 filesystems.
++        func_arith $current - $age
++        major=$func_arith_result
++        versuffix="-$major"
++        ;;
++
++      *)
++        func_fatal_configuration "unknown library version type \`$version_type'"
++        ;;
++      esac
++
++      # Clear the version info if we defaulted, and they specified a release.
++      if test -z "$vinfo" && test -n "$release"; then
++        major=
++        case $version_type in
++        darwin)
++          # we can't check for "0.0" in archive_cmds due to quoting
++          # problems, so we reset it completely
++          verstring=
++          ;;
++        *)
++          verstring="0.0"
++          ;;
++        esac
++        if test "$need_version" = no; then
++          versuffix=
++        else
++          versuffix=".0.0"
++        fi
++      fi
++
++      # Remove version info from name if versioning should be avoided
++      if test "$avoid_version" = yes && test "$need_version" = no; then
++        major=
++        versuffix=
++        verstring=""
++      fi
++
++      # Check to see if the archive will have undefined symbols.
++      if test "$allow_undefined" = yes; then
++        if test "$allow_undefined_flag" = unsupported; then
++          func_warning "undefined symbols not allowed in $host shared libraries"
++          build_libtool_libs=no
++          build_old_libs=yes
++        fi
++      else
++        # Don't allow undefined symbols.
++        allow_undefined_flag="$no_undefined_flag"
++      fi
++
++      fi
++
++      func_generate_dlsyms "$libname" "$libname" "yes"
++      libobjs="$libobjs $symfileobj"
++      test "X$libobjs" = "X " && libobjs=
++
++      if test "$mode" != relink; then
++      # Remove our outputs, but don't remove object files since they
++      # may have been created when compiling PIC objects.
++      removelist=
++      tempremovelist=`$ECHO "$output_objdir/*"`
++      for p in $tempremovelist; do
++        case $p in
++          *.$objext | *.gcno)
++             ;;
++          $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
++             if test "X$precious_files_regex" != "X"; then
++               if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
++               then
++                 continue
++               fi
++             fi
++             removelist="$removelist $p"
++             ;;
++          *) ;;
++        esac
++      done
++      test -n "$removelist" && \
++        func_show_eval "${RM}r \$removelist"
++      fi
++
++      # Now set the variables for building old libraries.
++      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
++      oldlibs="$oldlibs $output_objdir/$libname.$libext"
++
++      # Transform .lo files to .o files.
++      oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
++      fi
++
++      # Eliminate all temporary directories.
++      #for path in $notinst_path; do
++      #       lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
++      #       deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
++      #       dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
++      #done
++
++      if test -n "$xrpath"; then
++      # If the user specified any rpath flags, then add them.
++      temp_xrpath=
++      for libdir in $xrpath; do
++        temp_xrpath="$temp_xrpath -R$libdir"
++        case "$finalize_rpath " in
++        *" $libdir "*) ;;
++        *) finalize_rpath="$finalize_rpath $libdir" ;;
++        esac
++      done
++      if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
++        dependency_libs="$temp_xrpath $dependency_libs"
++      fi
++      fi
++
++      # Make sure dlfiles contains only unique files that won't be dlpreopened
++      old_dlfiles="$dlfiles"
++      dlfiles=
++      for lib in $old_dlfiles; do
++      case " $dlprefiles $dlfiles " in
++      *" $lib "*) ;;
++      *) dlfiles="$dlfiles $lib" ;;
++      esac
++      done
++
++      # Make sure dlprefiles contains only unique files
++      old_dlprefiles="$dlprefiles"
++      dlprefiles=
++      for lib in $old_dlprefiles; do
++      case "$dlprefiles " in
++      *" $lib "*) ;;
++      *) dlprefiles="$dlprefiles $lib" ;;
++      esac
++      done
++
++      if test "$build_libtool_libs" = yes; then
++      if test -n "$rpath"; then
++        case $host in
++        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
++          # these systems don't actually have a c library (as such)!
++          ;;
++        *-*-rhapsody* | *-*-darwin1.[012])
++          # Rhapsody C library is in the System framework
++          deplibs="$deplibs System.ltframework"
++          ;;
++        *-*-netbsd*)
++          # Don't link with libc until the a.out ld.so is fixed.
++          ;;
++        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
++          # Do not include libc due to us having libc/libc_r.
++          ;;
++        *-*-sco3.2v5* | *-*-sco5v6*)
++          # Causes problems with __ctype
++          ;;
++        *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
++          # Compiler inserts libc in the correct place for threads to work
++          ;;
++        *)
++          # Add libc to deplibs on all other systems if necessary.
++          if test "$build_libtool_need_lc" = "yes"; then
++            deplibs="$deplibs -lc"
++          fi
++          ;;
++        esac
++      fi
++
++      # Transform deplibs into only deplibs that can be linked in shared.
++      name_save=$name
++      libname_save=$libname
++      release_save=$release
++      versuffix_save=$versuffix
++      major_save=$major
++      # I'm not sure if I'm treating the release correctly.  I think
++      # release should show up in the -l (ie -lgmp5) so we don't want to
++      # add it in twice.  Is that correct?
++      release=""
++      versuffix=""
++      major=""
++      newdeplibs=
++      droppeddeps=no
++      case $deplibs_check_method in
++      pass_all)
++        # Don't check for shared/static.  Everything works.
++        # This might be a little naive.  We might want to check
++        # whether the library exists or not.  But this is on
++        # osf3 & osf4 and I'm not really sure... Just
++        # implementing what was already the behavior.
++        newdeplibs=$deplibs
++        ;;
++      test_compile)
++        # This code stresses the "libraries are programs" paradigm to its
++        # limits. Maybe even breaks it.  We compile a program, linking it
++        # against the deplibs as a proxy for the library.  Then we can check
++        # whether they linked in statically or dynamically with ldd.
++        $opt_dry_run || $RM conftest.c
++        cat > conftest.c <<EOF
++        int main() { return 0; }
++EOF
++        $opt_dry_run || $RM conftest
++        if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
++          ldd_output=`ldd conftest`
++          for i in $deplibs; do
++            case $i in
++            -l*)
++              func_stripname -l '' "$i"
++              name=$func_stripname_result
++              if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
++                case " $predeps $postdeps " in
++                *" $i "*)
++                  newdeplibs="$newdeplibs $i"
++                  i=""
++                  ;;
++                esac
++              fi
++              if test -n "$i" ; then
++                eval "libname=\"$libname_spec\""
++                eval "deplib_matches=\"$library_names_spec\""
++                set dummy $deplib_matches; shift
++                deplib_match=$1
++                if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
++                  newdeplibs="$newdeplibs $i"
++                else
++                  droppeddeps=yes
++                  echo
++                  $ECHO "*** Warning: dynamic linker does not accept needed library $i."
++                  echo "*** I have the capability to make that library automatically link in when"
++                  echo "*** you link to this library.  But I can only do this if you have a"
++                  echo "*** shared version of the library, which I believe you do not have"
++                  echo "*** because a test_compile did reveal that the linker did not use it for"
++                  echo "*** its dynamic dependency list that programs get resolved with at runtime."
++                fi
++              fi
++              ;;
++            *)
++              newdeplibs="$newdeplibs $i"
++              ;;
++            esac
++          done
++        else
++          # Error occurred in the first compile.  Let's try to salvage
++          # the situation: Compile a separate program for each library.
++          for i in $deplibs; do
++            case $i in
++            -l*)
++              func_stripname -l '' "$i"
++              name=$func_stripname_result
++              $opt_dry_run || $RM conftest
++              if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
++                ldd_output=`ldd conftest`
++                if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
++                  case " $predeps $postdeps " in
++                  *" $i "*)
++                    newdeplibs="$newdeplibs $i"
++                    i=""
++                    ;;
++                  esac
++                fi
++                if test -n "$i" ; then
++                  eval "libname=\"$libname_spec\""
++                  eval "deplib_matches=\"$library_names_spec\""
++                  set dummy $deplib_matches; shift
++                  deplib_match=$1
++                  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
++                    newdeplibs="$newdeplibs $i"
++                  else
++                    droppeddeps=yes
++                    echo
++                    $ECHO "*** Warning: dynamic linker does not accept needed library $i."
++                    echo "*** I have the capability to make that library automatically link in when"
++                    echo "*** you link to this library.  But I can only do this if you have a"
++                    echo "*** shared version of the library, which you do not appear to have"
++                    echo "*** because a test_compile did reveal that the linker did not use this one"
++                    echo "*** as a dynamic dependency that programs can get resolved with at runtime."
++                  fi
++                fi
++              else
++                droppeddeps=yes
++                echo
++                $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
++                echo "*** make it link in!  You will probably need to install it or some"
++                echo "*** library that it depends on before this library will be fully"
++                echo "*** functional.  Installing it before continuing would be even better."
++              fi
++              ;;
++            *)
++              newdeplibs="$newdeplibs $i"
++              ;;
++            esac
++          done
++        fi
++        ;;
++      file_magic*)
++        set dummy $deplibs_check_method; shift
++        file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
++        for a_deplib in $deplibs; do
++          case $a_deplib in
++          -l*)
++            func_stripname -l '' "$a_deplib"
++            name=$func_stripname_result
++            if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
++              case " $predeps $postdeps " in
++              *" $a_deplib "*)
++                newdeplibs="$newdeplibs $a_deplib"
++                a_deplib=""
++                ;;
++              esac
++            fi
++            if test -n "$a_deplib" ; then
++              eval "libname=\"$libname_spec\""
++              for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
++                potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
++                for potent_lib in $potential_libs; do
++                    # Follow soft links.
++                    if ls -lLd "$potent_lib" 2>/dev/null |
++                       $GREP " -> " >/dev/null; then
++                      continue
++                    fi
++                    # The statement above tries to avoid entering an
++                    # endless loop below, in case of cyclic links.
++                    # We might still enter an endless loop, since a link
++                    # loop can be closed while we follow links,
++                    # but so what?
++                    potlib="$potent_lib"
++                    while test -h "$potlib" 2>/dev/null; do
++                      potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
++                      case $potliblink in
++                      [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
++                      *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
++                      esac
++                    done
++                    if eval "$file_magic_cmd \"\$potlib\"" 2>/dev/null |
++                       $SED -e 10q |
++                       $EGREP "$file_magic_regex" > /dev/null; then
++                      newdeplibs="$newdeplibs $a_deplib"
++                      a_deplib=""
++                      break 2
++                    fi
++                done
++              done
++            fi
++            if test -n "$a_deplib" ; then
++              droppeddeps=yes
++              echo
++              $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
++              echo "*** I have the capability to make that library automatically link in when"
++              echo "*** you link to this library.  But I can only do this if you have a"
++              echo "*** shared version of the library, which you do not appear to have"
++              echo "*** because I did check the linker path looking for a file starting"
++              if test -z "$potlib" ; then
++                $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
++              else
++                $ECHO "*** with $libname and none of the candidates passed a file format test"
++                $ECHO "*** using a file magic. Last file checked: $potlib"
++              fi
++            fi
++            ;;
++          *)
++            # Add a -L argument.
++            newdeplibs="$newdeplibs $a_deplib"
++            ;;
++          esac
++        done # Gone through all deplibs.
++        ;;
++      match_pattern*)
++        set dummy $deplibs_check_method; shift
++        match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
++        for a_deplib in $deplibs; do
++          case $a_deplib in
++          -l*)
++            func_stripname -l '' "$a_deplib"
++            name=$func_stripname_result
++            if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
++              case " $predeps $postdeps " in
++              *" $a_deplib "*)
++                newdeplibs="$newdeplibs $a_deplib"
++                a_deplib=""
++                ;;
++              esac
++            fi
++            if test -n "$a_deplib" ; then
++              eval "libname=\"$libname_spec\""
++              for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
++                potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
++                for potent_lib in $potential_libs; do
++                  potlib="$potent_lib" # see symlink-check above in file_magic test
++                  if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
++                     $EGREP "$match_pattern_regex" > /dev/null; then
++                    newdeplibs="$newdeplibs $a_deplib"
++                    a_deplib=""
++                    break 2
++                  fi
++                done
++              done
++            fi
++            if test -n "$a_deplib" ; then
++              droppeddeps=yes
++              echo
++              $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
++              echo "*** I have the capability to make that library automatically link in when"
++              echo "*** you link to this library.  But I can only do this if you have a"
++              echo "*** shared version of the library, which you do not appear to have"
++              echo "*** because I did check the linker path looking for a file starting"
++              if test -z "$potlib" ; then
++                $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
++              else
++                $ECHO "*** with $libname and none of the candidates passed a file format test"
++                $ECHO "*** using a regex pattern. Last file checked: $potlib"
++              fi
++            fi
++            ;;
++          *)
++            # Add a -L argument.
++            newdeplibs="$newdeplibs $a_deplib"
++            ;;
++          esac
++        done # Gone through all deplibs.
++        ;;
++      none | unknown | *)
++        newdeplibs=""
++        tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
++        if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
++          for i in $predeps $postdeps ; do
++            # can't use Xsed below, because $i might contain '/'
++            tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
++          done
++        fi
++        case $tmp_deplibs in
++        *[!\  \ ]*)
++          echo
++          if test "X$deplibs_check_method" = "Xnone"; then
++            echo "*** Warning: inter-library dependencies are not supported in this platform."
++          else
++            echo "*** Warning: inter-library dependencies are not known to be supported."
++          fi
++          echo "*** All declared inter-library dependencies are being dropped."
++          droppeddeps=yes
++          ;;
++        esac
++        ;;
++      esac
++      versuffix=$versuffix_save
++      major=$major_save
++      release=$release_save
++      libname=$libname_save
++      name=$name_save
++
++      case $host in
++      *-*-rhapsody* | *-*-darwin1.[012])
++        # On Rhapsody replace the C library with the System framework
++        newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
++        ;;
++      esac
++
++      if test "$droppeddeps" = yes; then
++        if test "$module" = yes; then
++          echo
++          echo "*** Warning: libtool could not satisfy all declared inter-library"
++          $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
++          echo "*** a static module, that should work as long as the dlopening"
++          echo "*** application is linked with the -dlopen flag."
++          if test -z "$global_symbol_pipe"; then
++            echo
++            echo "*** However, this would only work if libtool was able to extract symbol"
++            echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
++            echo "*** not find such a program.  So, this module is probably useless."
++            echo "*** \`nm' from GNU binutils and a full rebuild may help."
++          fi
++          if test "$build_old_libs" = no; then
++            oldlibs="$output_objdir/$libname.$libext"
++            build_libtool_libs=module
++            build_old_libs=yes
++          else
++            build_libtool_libs=no
++          fi
++        else
++          echo "*** The inter-library dependencies that have been dropped here will be"
++          echo "*** automatically added whenever a program is linked with this library"
++          echo "*** or is declared to -dlopen it."
++
++          if test "$allow_undefined" = no; then
++            echo
++            echo "*** Since this library must not contain undefined symbols,"
++            echo "*** because either the platform does not support them or"
++            echo "*** it was explicitly requested with -no-undefined,"
++            echo "*** libtool will only create a static version of it."
++            if test "$build_old_libs" = no; then
++              oldlibs="$output_objdir/$libname.$libext"
++              build_libtool_libs=module
++              build_old_libs=yes
++            else
++              build_libtool_libs=no
++            fi
++          fi
++        fi
++      fi
++      # Done checking deplibs!
++      deplibs=$newdeplibs
++      fi
++      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
++      case $host in
++      *-*-darwin*)
++        newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
++        new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
++        deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
++        ;;
++      esac
++
++      # move library search paths that coincide with paths to not yet
++      # installed libraries to the beginning of the library search list
++      new_libs=
++      for path in $notinst_path; do
++      case " $new_libs " in
++      *" -L$path/$objdir "*) ;;
++      *)
++        case " $deplibs " in
++        *" -L$path/$objdir "*)
++          new_libs="$new_libs -L$path/$objdir" ;;
++        esac
++        ;;
++      esac
++      done
++      for deplib in $deplibs; do
++      case $deplib in
++      -L*)
++        case " $new_libs " in
++        *" $deplib "*) ;;
++        *) new_libs="$new_libs $deplib" ;;
++        esac
++        ;;
++      *) new_libs="$new_libs $deplib" ;;
++      esac
++      done
++      deplibs="$new_libs"
++
++      # All the library-specific variables (install_libdir is set above).
++      library_names=
++      old_library=
++      dlname=
++
++      # Test again, we may have decided not to build it any more
++      if test "$build_libtool_libs" = yes; then
++      if test "$hardcode_into_libs" = yes; then
++        # Hardcode the library paths
++        hardcode_libdirs=
++        dep_rpath=
++        rpath="$finalize_rpath"
++        test "$mode" != relink && rpath="$compile_rpath$rpath"
++        for libdir in $rpath; do
++          if test -n "$hardcode_libdir_flag_spec"; then
++            if test -n "$hardcode_libdir_separator"; then
++              if test -z "$hardcode_libdirs"; then
++                hardcode_libdirs="$libdir"
++              else
++                # Just accumulate the unique libdirs.
++                case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
++                *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
++                  ;;
++                *)
++                  hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
++                  ;;
++                esac
++              fi
++            else
++              eval "flag=\"$hardcode_libdir_flag_spec\""
++              dep_rpath="$dep_rpath $flag"
++            fi
++          elif test -n "$runpath_var"; then
++            case "$perm_rpath " in
++            *" $libdir "*) ;;
++            *) perm_rpath="$perm_rpath $libdir" ;;
++            esac
++          fi
++        done
++        # Substitute the hardcoded libdirs into the rpath.
++        if test -n "$hardcode_libdir_separator" &&
++           test -n "$hardcode_libdirs"; then
++          libdir="$hardcode_libdirs"
++          if test -n "$hardcode_libdir_flag_spec_ld"; then
++            eval "dep_rpath=\"$hardcode_libdir_flag_spec_ld\""
++          else
++            eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
++          fi
++        fi
++        if test -n "$runpath_var" && test -n "$perm_rpath"; then
++          # We should set the runpath_var.
++          rpath=
++          for dir in $perm_rpath; do
++            rpath="$rpath$dir:"
++          done
++          eval $runpath_var=\$rpath\$$runpath_var
++          export $runpath_var
++        fi
++        test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
++      fi
++
++      shlibpath="$finalize_shlibpath"
++      test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
++      if test -n "$shlibpath"; then
++        eval $shlibpath_var=\$shlibpath\$$shlibpath_var
++        export $shlibpath_var
++      fi
++
++      # Get the real and link names of the library.
++      eval "shared_ext=\"$shrext_cmds\""
++      eval "library_names=\"$library_names_spec\""
++      set dummy $library_names
++      shift
++      realname="$1"
++      shift
++
++      if test -n "$soname_spec"; then
++        eval "soname=\"$soname_spec\""
++      else
++        soname="$realname"
++      fi
++      if test -z "$dlname"; then
++        dlname=$soname
++      fi
++
++      lib="$output_objdir/$realname"
++      linknames=
++      for link
++      do
++        linknames="$linknames $link"
++      done
++
++      # Use standard objects if they are pic
++      test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
++      test "X$libobjs" = "X " && libobjs=
++
++      delfiles=
++      if test -n "$export_symbols" && test -n "$include_expsyms"; then
++        $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
++        export_symbols="$output_objdir/$libname.uexp"
++        delfiles="$delfiles $export_symbols"
++      fi
++
++      orig_export_symbols=
++      case $host_os in
++      cygwin* | mingw* | cegcc*)
++        if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
++          # exporting using user supplied symfile
++          if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
++            # and it's NOT already a .def file. Must figure out
++            # which of the given symbols are data symbols and tag
++            # them as such. So, trigger use of export_symbols_cmds.
++            # export_symbols gets reassigned inside the "prepare
++            # the list of exported symbols" if statement, so the
++            # include_expsyms logic still works.
++            orig_export_symbols="$export_symbols"
++            export_symbols=
++            always_export_symbols=yes
++          fi
++        fi
++        ;;
++      esac
++
++      # Prepare the list of exported symbols
++      if test -z "$export_symbols"; then
++        if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
++          func_verbose "generating symbol list for \`$libname.la'"
++          export_symbols="$output_objdir/$libname.exp"
++          $opt_dry_run || $RM $export_symbols
++          cmds=$export_symbols_cmds
++          save_ifs="$IFS"; IFS='~'
++          for cmd in $cmds; do
++            IFS="$save_ifs"
++            eval "cmd=\"$cmd\""
++            func_len " $cmd"
++            len=$func_len_result
++            if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
++              func_show_eval "$cmd" 'exit $?'
++              skipped_export=false
++            else
++              # The command line is too long to execute in one step.
++              func_verbose "using reloadable object file for export list..."
++              skipped_export=:
++              # Break out early, otherwise skipped_export may be
++              # set to false by a later but shorter cmd.
++              break
++            fi
++          done
++          IFS="$save_ifs"
++          if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
++            func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
++            func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
++          fi
++        fi
++      fi
++
++      if test -n "$export_symbols" && test -n "$include_expsyms"; then
++        tmp_export_symbols="$export_symbols"
++        test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
++        $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"
++      fi
++
++      if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
++        # The given exports_symbols file has to be filtered, so filter it.
++        func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
++        # FIXME: $output_objdir/$libname.filter potentially contains lots of
++        # 's' commands which not all seds can handle. GNU sed should be fine
++        # though. Also, the filter scales superlinearly with the number of
++        # global variables. join(1) would be nice here, but unfortunately
++        # isn't a blessed tool.
++        $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
++        delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
++        export_symbols=$output_objdir/$libname.def
++        $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
++      fi
++
++      tmp_deplibs=
++      for test_deplib in $deplibs; do
++        case " $convenience " in
++        *" $test_deplib "*) ;;
++        *)
++          tmp_deplibs="$tmp_deplibs $test_deplib"
++          ;;
++        esac
++      done
++      deplibs="$tmp_deplibs"
++
++      if test -n "$convenience"; then
++        if test -n "$whole_archive_flag_spec" &&
++          test "$compiler_needs_object" = yes &&
++          test -z "$libobjs"; then
++          # extract the archives, so we have objects to list.
++          # TODO: could optimize this to just extract one archive.
++          whole_archive_flag_spec=
++        fi
++        if test -n "$whole_archive_flag_spec"; then
++          save_libobjs=$libobjs
++          eval "libobjs=\"\$libobjs $whole_archive_flag_spec\""
++          test "X$libobjs" = "X " && libobjs=
++        else
++          gentop="$output_objdir/${outputname}x"
++          generated="$generated $gentop"
++
++          func_extract_archives $gentop $convenience
++          libobjs="$libobjs $func_extract_archives_result"
++          test "X$libobjs" = "X " && libobjs=
++        fi
++      fi
++
++      if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
++        eval "flag=\"$thread_safe_flag_spec\""
++        linker_flags="$linker_flags $flag"
++      fi
++
++      # Make a backup of the uninstalled library when relinking
++      if test "$mode" = relink; then
++        $opt_dry_run || (cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U) || exit $?
++      fi
++
++      # Do each of the archive commands.
++      if test "$module" = yes && test -n "$module_cmds" ; then
++        if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
++          eval "test_cmds=\"$module_expsym_cmds\""
++          cmds=$module_expsym_cmds
++        else
++          eval "test_cmds=\"$module_cmds\""
++          cmds=$module_cmds
++        fi
++      else
++        if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
++          eval "test_cmds=\"$archive_expsym_cmds\""
++          cmds=$archive_expsym_cmds
++        else
++          eval "test_cmds=\"$archive_cmds\""
++          cmds=$archive_cmds
++        fi
++      fi
++
++      if test "X$skipped_export" != "X:" &&
++         func_len " $test_cmds" &&
++         len=$func_len_result &&
++         test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
++        :
++      else
++        # The command line is too long to link in one step, link piecewise
++        # or, if using GNU ld and skipped_export is not :, use a linker
++        # script.
++
++        # Save the value of $output and $libobjs because we want to
++        # use them later.  If we have whole_archive_flag_spec, we
++        # want to use save_libobjs as it was before
++        # whole_archive_flag_spec was expanded, because we can't
++        # assume the linker understands whole_archive_flag_spec.
++        # This may have to be revisited, in case too many
++        # convenience libraries get linked in and end up exceeding
++        # the spec.
++        if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
++          save_libobjs=$libobjs
++        fi
++        save_output=$output
++        func_basename "$output"
++        output_la=$func_basename_result
++
++        # Clear the reloadable object creation command queue and
++        # initialize k to one.
++        test_cmds=
++        concat_cmds=
++        objlist=
++        last_robj=
++        k=1
++
++        if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
++          output=${output_objdir}/${output_la}.lnkscript
++          func_verbose "creating GNU ld script: $output"
++          echo 'INPUT (' > $output
++          for obj in $save_libobjs
++          do
++            $ECHO "$obj" >> $output
++          done
++          echo ')' >> $output
++          delfiles="$delfiles $output"
++        elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
++          output=${output_objdir}/${output_la}.lnk
++          func_verbose "creating linker input file list: $output"
++          : > $output
++          set x $save_libobjs
++          shift
++          firstobj=
++          if test "$compiler_needs_object" = yes; then
++            firstobj="$1 "
++            shift
++          fi
++          for obj
++          do
++            $ECHO "$obj" >> $output
++          done
++          delfiles="$delfiles $output"
++          output=$firstobj\"$file_list_spec$output\"
++        else
++          if test -n "$save_libobjs"; then
++            func_verbose "creating reloadable object files..."
++            output=$output_objdir/$output_la-${k}.$objext
++            eval "test_cmds=\"$reload_cmds\""
++            func_len " $test_cmds"
++            len0=$func_len_result
++            len=$len0
++
++            # Loop over the list of objects to be linked.
++            for obj in $save_libobjs
++            do
++              func_len " $obj"
++              func_arith $len + $func_len_result
++              len=$func_arith_result
++              if test "X$objlist" = X ||
++                 test "$len" -lt "$max_cmd_len"; then
++                func_append objlist " $obj"
++              else
++                # The command $test_cmds is almost too long, add a
++                # command to the queue.
++                if test "$k" -eq 1 ; then
++                  # The first file doesn't have a previous command to add.
++                  reload_objs=$objlist
++                  eval "concat_cmds=\"$reload_cmds\""
++                else
++                  # All subsequent reloadable object files will link in
++                  # the last one created.
++                  reload_objs="$objlist $last_robj"
++                  eval "concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\""
++                fi
++                last_robj=$output_objdir/$output_la-${k}.$objext
++                func_arith $k + 1
++                k=$func_arith_result
++                output=$output_objdir/$output_la-${k}.$objext
++                objlist=" $obj"
++                func_len " $last_robj"
++                func_arith $len0 + $func_len_result
++                len=$func_arith_result
++              fi
++            done
++            # Handle the remaining objects by creating one last
++            # reloadable object file.  All subsequent reloadable object
++            # files will link in the last one created.
++            test -z "$concat_cmds" || concat_cmds=$concat_cmds~
++            reload_objs="$objlist $last_robj"
++            eval "concat_cmds=\"\${concat_cmds}$reload_cmds\""
++            if test -n "$last_robj"; then
++              eval "concat_cmds=\"\${concat_cmds}~\$RM $last_robj\""
++            fi
++            delfiles="$delfiles $output"
++
++          else
++            output=
++          fi
++
++          if ${skipped_export-false}; then
++            func_verbose "generating symbol list for \`$libname.la'"
++            export_symbols="$output_objdir/$libname.exp"
++            $opt_dry_run || $RM $export_symbols
++            libobjs=$output
++            # Append the command to create the export file.
++            test -z "$concat_cmds" || concat_cmds=$concat_cmds~
++            eval "concat_cmds=\"\$concat_cmds$export_symbols_cmds\""
++            if test -n "$last_robj"; then
++              eval "concat_cmds=\"\$concat_cmds~\$RM $last_robj\""
++            fi
++          fi
++
++          test -n "$save_libobjs" &&
++            func_verbose "creating a temporary reloadable object file: $output"
++
++          # Loop through the commands generated above and execute them.
++          save_ifs="$IFS"; IFS='~'
++          for cmd in $concat_cmds; do
++            IFS="$save_ifs"
++            $opt_silent || {
++                func_quote_for_expand "$cmd"
++                eval "func_echo $func_quote_for_expand_result"
++            }
++            $opt_dry_run || eval "$cmd" || {
++              lt_exit=$?
++
++              # Restore the uninstalled library and exit
++              if test "$mode" = relink; then
++                ( cd "$output_objdir" && \
++                  $RM "${realname}T" && \
++                  $MV "${realname}U" "$realname" )
++              fi
++
++              exit $lt_exit
++            }
++          done
++          IFS="$save_ifs"
++
++          if test -n "$export_symbols_regex" && ${skipped_export-false}; then
++            func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
++            func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
++          fi
++        fi
++
++          if ${skipped_export-false}; then
++          if test -n "$export_symbols" && test -n "$include_expsyms"; then
++            tmp_export_symbols="$export_symbols"
++            test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
++            $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"
++          fi
++
++          if test -n "$orig_export_symbols"; then
++            # The given exports_symbols file has to be filtered, so filter it.
++            func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
++            # FIXME: $output_objdir/$libname.filter potentially contains lots of
++            # 's' commands which not all seds can handle. GNU sed should be fine
++            # though. Also, the filter scales superlinearly with the number of
++            # global variables. join(1) would be nice here, but unfortunately
++            # isn't a blessed tool.
++            $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
++            delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
++            export_symbols=$output_objdir/$libname.def
++            $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
++          fi
++        fi
++
++        libobjs=$output
++        # Restore the value of output.
++        output=$save_output
++
++        if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
++          eval "libobjs=\"\$libobjs $whole_archive_flag_spec\""
++          test "X$libobjs" = "X " && libobjs=
++        fi
++        # Expand the library linking commands again to reset the
++        # value of $libobjs for piecewise linking.
++
++        # Do each of the archive commands.
++        if test "$module" = yes && test -n "$module_cmds" ; then
++          if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
++            cmds=$module_expsym_cmds
++          else
++            cmds=$module_cmds
++          fi
++        else
++          if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
++            cmds=$archive_expsym_cmds
++          else
++            cmds=$archive_cmds
++          fi
++        fi
++      fi
++
++      if test -n "$delfiles"; then
++        # Append the command to remove temporary files to $cmds.
++        eval "cmds=\"\$cmds~\$RM $delfiles\""
++      fi
++
++      # Add any objects from preloaded convenience libraries
++      if test -n "$dlprefiles"; then
++        gentop="$output_objdir/${outputname}x"
++        generated="$generated $gentop"
++
++        func_extract_archives $gentop $dlprefiles
++        libobjs="$libobjs $func_extract_archives_result"
++        test "X$libobjs" = "X " && libobjs=
++      fi
++
++      save_ifs="$IFS"; IFS='~'
++      for cmd in $cmds; do
++        IFS="$save_ifs"
++        eval "cmd=\"$cmd\""
++        $opt_silent || {
++          func_quote_for_expand "$cmd"
++          eval "func_echo $func_quote_for_expand_result"
++        }
++        $opt_dry_run || eval "$cmd" || {
++          lt_exit=$?
++
++          # Restore the uninstalled library and exit
++          if test "$mode" = relink; then
++            ( cd "$output_objdir" && \
++              $RM "${realname}T" && \
++              $MV "${realname}U" "$realname" )
++          fi
++
++          exit $lt_exit
++        }
++      done
++      IFS="$save_ifs"
++
++      # Restore the uninstalled library and exit
++      if test "$mode" = relink; then
++        $opt_dry_run || (cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname) || exit $?
++
++        if test -n "$convenience"; then
++          if test -z "$whole_archive_flag_spec"; then
++            func_show_eval '${RM}r "$gentop"'
++          fi
++        fi
++
++        exit $EXIT_SUCCESS
++      fi
++
++      # Create links to the real library.
++      for linkname in $linknames; do
++        if test "$realname" != "$linkname"; then
++          func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
++        fi
++      done
++
++      # If -module or -export-dynamic was specified, set the dlname.
++      if test "$module" = yes || test "$export_dynamic" = yes; then
++        # On all known operating systems, these are identical.
++        dlname="$soname"
++      fi
++      fi
++      ;;
++
++    obj)
++      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
++      func_warning "\`-dlopen' is ignored for objects"
++      fi
++
++      case " $deplibs" in
++      *\ -l* | *\ -L*)
++      func_warning "\`-l' and \`-L' are ignored for objects" ;;
++      esac
++
++      test -n "$rpath" && \
++      func_warning "\`-rpath' is ignored for objects"
++
++      test -n "$xrpath" && \
++      func_warning "\`-R' is ignored for objects"
++
++      test -n "$vinfo" && \
++      func_warning "\`-version-info' is ignored for objects"
++
++      test -n "$release" && \
++      func_warning "\`-release' is ignored for objects"
++
++      case $output in
++      *.lo)
++      test -n "$objs$old_deplibs" && \
++        func_fatal_error "cannot build library object \`$output' from non-libtool objects"
++
++      libobj=$output
++      func_lo2o "$libobj"
++      obj=$func_lo2o_result
++      ;;
++      *)
++      libobj=
++      obj="$output"
++      ;;
++      esac
++
++      # Delete the old objects.
++      $opt_dry_run || $RM $obj $libobj
++
++      # Objects from convenience libraries.  This assumes
++      # single-version convenience libraries.  Whenever we create
++      # different ones for PIC/non-PIC, this we'll have to duplicate
++      # the extraction.
++      reload_conv_objs=
++      gentop=
++      # reload_cmds runs $LD directly, so let us get rid of
++      # -Wl from whole_archive_flag_spec and hope we can get by with
++      # turning comma into space..
++      wl=
++
++      if test -n "$convenience"; then
++      if test -n "$whole_archive_flag_spec"; then
++        eval "tmp_whole_archive_flags=\"$whole_archive_flag_spec\""
++        reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
++      else
++        gentop="$output_objdir/${obj}x"
++        generated="$generated $gentop"
++
++        func_extract_archives $gentop $convenience
++        reload_conv_objs="$reload_objs $func_extract_archives_result"
++      fi
++      fi
++
++      # Create the old-style object.
++      reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
++
++      output="$obj"
++      func_execute_cmds "$reload_cmds" 'exit $?'
++
++      # Exit if we aren't doing a library object file.
++      if test -z "$libobj"; then
++      if test -n "$gentop"; then
++        func_show_eval '${RM}r "$gentop"'
++      fi
++
++      exit $EXIT_SUCCESS
++      fi
++
++      if test "$build_libtool_libs" != yes; then
++      if test -n "$gentop"; then
++        func_show_eval '${RM}r "$gentop"'
++      fi
++
++      # Create an invalid libtool object if no PIC, so that we don't
++      # accidentally link it into a program.
++      # $show "echo timestamp > $libobj"
++      # $opt_dry_run || echo timestamp > $libobj || exit $?
++      exit $EXIT_SUCCESS
++      fi
++
++      if test -n "$pic_flag" || test "$pic_mode" != default; then
++      # Only do commands if we really have different PIC objects.
++      reload_objs="$libobjs $reload_conv_objs"
++      output="$libobj"
++      func_execute_cmds "$reload_cmds" 'exit $?'
++      fi
++
++      if test -n "$gentop"; then
++      func_show_eval '${RM}r "$gentop"'
++      fi
++
++      exit $EXIT_SUCCESS
++      ;;
++
++    prog)
++      case $host in
++      *cygwin*) func_stripname '' '.exe' "$output"
++                output=$func_stripname_result.exe;;
++      esac
++      test -n "$vinfo" && \
++      func_warning "\`-version-info' is ignored for programs"
++
++      test -n "$release" && \
++      func_warning "\`-release' is ignored for programs"
++
++      test "$preload" = yes \
++        && test "$dlopen_support" = unknown \
++      && test "$dlopen_self" = unknown \
++      && test "$dlopen_self_static" = unknown && \
++        func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
++
++      case $host in
++      *-*-rhapsody* | *-*-darwin1.[012])
++      # On Rhapsody replace the C library is the System framework
++      compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
++      finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
++      ;;
++      esac
++
++      case $host in
++      *-*-darwin*)
++      # Don't allow lazy linking, it breaks C++ global constructors
++      # But is supposedly fixed on 10.4 or later (yay!).
++      if test "$tagname" = CXX ; then
++        case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
++          10.[0123])
++            compile_command="$compile_command ${wl}-bind_at_load"
++            finalize_command="$finalize_command ${wl}-bind_at_load"
++          ;;
++        esac
++      fi
++      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
++      compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
++      finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
++      ;;
++      esac
++
++
++      # move library search paths that coincide with paths to not yet
++      # installed libraries to the beginning of the library search list
++      new_libs=
++      for path in $notinst_path; do
++      case " $new_libs " in
++      *" -L$path/$objdir "*) ;;
++      *)
++        case " $compile_deplibs " in
++        *" -L$path/$objdir "*)
++          new_libs="$new_libs -L$path/$objdir" ;;
++        esac
++        ;;
++      esac
++      done
++      for deplib in $compile_deplibs; do
++      case $deplib in
++      -L*)
++        case " $new_libs " in
++        *" $deplib "*) ;;
++        *) new_libs="$new_libs $deplib" ;;
++        esac
++        ;;
++      *) new_libs="$new_libs $deplib" ;;
++      esac
++      done
++      compile_deplibs="$new_libs"
++
++
++      compile_command="$compile_command $compile_deplibs"
++      finalize_command="$finalize_command $finalize_deplibs"
++
++      if test -n "$rpath$xrpath"; then
++      # If the user specified any rpath flags, then add them.
++      for libdir in $rpath $xrpath; do
++        # This is the magic to use -rpath.
++        case "$finalize_rpath " in
++        *" $libdir "*) ;;
++        *) finalize_rpath="$finalize_rpath $libdir" ;;
++        esac
++      done
++      fi
++
++      # Now hardcode the library paths
++      rpath=
++      hardcode_libdirs=
++      for libdir in $compile_rpath $finalize_rpath; do
++      if test -n "$hardcode_libdir_flag_spec"; then
++        if test -n "$hardcode_libdir_separator"; then
++          if test -z "$hardcode_libdirs"; then
++            hardcode_libdirs="$libdir"
++          else
++            # Just accumulate the unique libdirs.
++            case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
++            *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
++              ;;
++            *)
++              hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
++              ;;
++            esac
++          fi
++        else
++          eval "flag=\"$hardcode_libdir_flag_spec\""
++          rpath="$rpath $flag"
++        fi
++      elif test -n "$runpath_var"; then
++        case "$perm_rpath " in
++        *" $libdir "*) ;;
++        *) perm_rpath="$perm_rpath $libdir" ;;
++        esac
++      fi
++      case $host in
++      *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
++        testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
++        case :$dllsearchpath: in
++        *":$libdir:"*) ;;
++        ::) dllsearchpath=$libdir;;
++        *) dllsearchpath="$dllsearchpath:$libdir";;
++        esac
++        case :$dllsearchpath: in
++        *":$testbindir:"*) ;;
++        ::) dllsearchpath=$testbindir;;
++        *) dllsearchpath="$dllsearchpath:$testbindir";;
++        esac
++        ;;
++      esac
++      done
++      # Substitute the hardcoded libdirs into the rpath.
++      if test -n "$hardcode_libdir_separator" &&
++       test -n "$hardcode_libdirs"; then
++      libdir="$hardcode_libdirs"
++      eval "rpath=\" $hardcode_libdir_flag_spec\""
++      fi
++      compile_rpath="$rpath"
++
++      rpath=
++      hardcode_libdirs=
++      for libdir in $finalize_rpath; do
++      if test -n "$hardcode_libdir_flag_spec"; then
++        if test -n "$hardcode_libdir_separator"; then
++          if test -z "$hardcode_libdirs"; then
++            hardcode_libdirs="$libdir"
++          else
++            # Just accumulate the unique libdirs.
++            case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
++            *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
++              ;;
++            *)
++              hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
++              ;;
++            esac
++          fi
++        else
++          eval "flag=\"$hardcode_libdir_flag_spec\""
++          rpath="$rpath $flag"
++        fi
++      elif test -n "$runpath_var"; then
++        case "$finalize_perm_rpath " in
++        *" $libdir "*) ;;
++        *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
++        esac
++      fi
++      done
++      # Substitute the hardcoded libdirs into the rpath.
++      if test -n "$hardcode_libdir_separator" &&
++       test -n "$hardcode_libdirs"; then
++      libdir="$hardcode_libdirs"
++      eval "rpath=\" $hardcode_libdir_flag_spec\""
++      fi
++      finalize_rpath="$rpath"
++
++      if test -n "$libobjs" && test "$build_old_libs" = yes; then
++      # Transform all the library objects into standard objects.
++      compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
++      finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
++      fi
++
++      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
++
++      # template prelinking step
++      if test -n "$prelink_cmds"; then
++      func_execute_cmds "$prelink_cmds" 'exit $?'
++      fi
++
++      wrappers_required=yes
++      case $host in
++      *cegcc* | *mingw32ce*)
++        # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
++        wrappers_required=no
++        ;;
++      *cygwin* | *mingw* )
++        if test "$build_libtool_libs" != yes; then
++          wrappers_required=no
++        fi
++        ;;
++      *)
++        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
++          wrappers_required=no
++        fi
++        ;;
++      esac
++      if test "$wrappers_required" = no; then
++      # Replace the output file specification.
++      compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
++      link_command="$compile_command$compile_rpath"
++
++      # We have no uninstalled library dependencies, so finalize right now.
++      exit_status=0
++      func_show_eval "$link_command" 'exit_status=$?'
++
++      # Delete the generated files.
++      if test -f "$output_objdir/${outputname}S.${objext}"; then
++        func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
++      fi
++
++      exit $exit_status
++      fi
++
++      if test -n "$compile_shlibpath$finalize_shlibpath"; then
++      compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
++      fi
++      if test -n "$finalize_shlibpath"; then
++      finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
++      fi
++
++      compile_var=
++      finalize_var=
++      if test -n "$runpath_var"; then
++      if test -n "$perm_rpath"; then
++        # We should set the runpath_var.
++        rpath=
++        for dir in $perm_rpath; do
++          rpath="$rpath$dir:"
++        done
++        compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
++      fi
++      if test -n "$finalize_perm_rpath"; then
++        # We should set the runpath_var.
++        rpath=
++        for dir in $finalize_perm_rpath; do
++          rpath="$rpath$dir:"
++        done
++        finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
++      fi
++      fi
++
++      if test "$no_install" = yes; then
++      # We don't need to create a wrapper script.
++      link_command="$compile_var$compile_command$compile_rpath"
++      # Replace the output file specification.
++      link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
++      # Delete the old output file.
++      $opt_dry_run || $RM $output
++      # Link the executable and exit
++      func_show_eval "$link_command" 'exit $?'
++      exit $EXIT_SUCCESS
++      fi
++
++      if test "$hardcode_action" = relink; then
++      # Fast installation is not supported
++      link_command="$compile_var$compile_command$compile_rpath"
++      relink_command="$finalize_var$finalize_command$finalize_rpath"
++
++      func_warning "this platform does not like uninstalled shared libraries"
++      func_warning "\`$output' will be relinked during installation"
++      else
++      if test "$fast_install" != no; then
++        link_command="$finalize_var$compile_command$finalize_rpath"
++        if test "$fast_install" = yes; then
++          relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
++        else
++          # fast_install is set to needless
++          relink_command=
++        fi
++      else
++        link_command="$compile_var$compile_command$compile_rpath"
++        relink_command="$finalize_var$finalize_command$finalize_rpath"
++      fi
++      fi
++
++      # Replace the output file specification.
++      link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
++
++      # Delete the old output files.
++      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
++
++      func_show_eval "$link_command" 'exit $?'
++
++      # Now create the wrapper script.
++      func_verbose "creating $output"
++
++      # Quote the relink command for shipping.
++      if test -n "$relink_command"; then
++      # Preserve any variables that may affect compiler behavior
++      for var in $variables_saved_for_relink; do
++        if eval test -z \"\${$var+set}\"; then
++          relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
++        elif eval var_value=\$$var; test -z "$var_value"; then
++          relink_command="$var=; export $var; $relink_command"
++        else
++          func_quote_for_eval "$var_value"
++          relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
++        fi
++      done
++      relink_command="(cd `pwd`; $relink_command)"
++      relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
++      fi
++
++      # Only actually do things if not in dry run mode.
++      $opt_dry_run || {
++      # win32 will think the script is a binary if it has
++      # a .exe suffix, so we strip it off here.
++      case $output in
++        *.exe) func_stripname '' '.exe' "$output"
++               output=$func_stripname_result ;;
++      esac
++      # test for cygwin because mv fails w/o .exe extensions
++      case $host in
++        *cygwin*)
++          exeext=.exe
++          func_stripname '' '.exe' "$outputname"
++          outputname=$func_stripname_result ;;
++        *) exeext= ;;
++      esac
++      case $host in
++        *cygwin* | *mingw* )
++          func_dirname_and_basename "$output" "" "."
++          output_name=$func_basename_result
++          output_path=$func_dirname_result
++          cwrappersource="$output_path/$objdir/lt-$output_name.c"
++          cwrapper="$output_path/$output_name.exe"
++          $RM $cwrappersource $cwrapper
++          trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
++
++          func_emit_cwrapperexe_src > $cwrappersource
++
++          # The wrapper executable is built using the $host compiler,
++          # because it contains $host paths and files. If cross-
++          # compiling, it, like the target executable, must be
++          # executed on the $host or under an emulation environment.
++          $opt_dry_run || {
++            $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
++            $STRIP $cwrapper
++          }
++
++          # Now, create the wrapper script for func_source use:
++          func_ltwrapper_scriptname $cwrapper
++          $RM $func_ltwrapper_scriptname_result
++          trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
++          $opt_dry_run || {
++            # note: this script will not be executed, so do not chmod.
++            if test "x$build" = "x$host" ; then
++              $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
++            else
++              func_emit_wrapper no > $func_ltwrapper_scriptname_result
++            fi
++          }
++        ;;
++        * )
++          $RM $output
++          trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
++
++          func_emit_wrapper no > $output
++          chmod +x $output
++        ;;
++      esac
++      }
++      exit $EXIT_SUCCESS
++      ;;
++    esac
++
++    # See if we need to build an old-fashioned archive.
++    for oldlib in $oldlibs; do
++
++      if test "$build_libtool_libs" = convenience; then
++      oldobjs="$libobjs_save $symfileobj"
++      addlibs="$convenience"
++      build_libtool_libs=no
++      else
++      if test "$build_libtool_libs" = module; then
++        oldobjs="$libobjs_save"
++        build_libtool_libs=no
++      else
++        oldobjs="$old_deplibs $non_pic_objects"
++        if test "$preload" = yes && test -f "$symfileobj"; then
++          oldobjs="$oldobjs $symfileobj"
++        fi
++      fi
++      addlibs="$old_convenience"
++      fi
++
++      if test -n "$addlibs"; then
++      gentop="$output_objdir/${outputname}x"
++      generated="$generated $gentop"
++
++      func_extract_archives $gentop $addlibs
++      oldobjs="$oldobjs $func_extract_archives_result"
++      fi
++
++      # Do each command in the archive commands.
++      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
++      cmds=$old_archive_from_new_cmds
++      else
++
++      # Add any objects from preloaded convenience libraries
++      if test -n "$dlprefiles"; then
++        gentop="$output_objdir/${outputname}x"
++        generated="$generated $gentop"
++
++        func_extract_archives $gentop $dlprefiles
++        oldobjs="$oldobjs $func_extract_archives_result"
++      fi
++
++      # POSIX demands no paths to be encoded in archives.  We have
++      # to avoid creating archives with duplicate basenames if we
++      # might have to extract them afterwards, e.g., when creating a
++      # static archive out of a convenience library, or when linking
++      # the entirety of a libtool archive into another (currently
++      # not supported by libtool).
++      if (for obj in $oldobjs
++          do
++            func_basename "$obj"
++            $ECHO "$func_basename_result"
++          done | sort | sort -uc >/dev/null 2>&1); then
++        :
++      else
++        echo "copying selected object files to avoid basename conflicts..."
++        gentop="$output_objdir/${outputname}x"
++        generated="$generated $gentop"
++        func_mkdir_p "$gentop"
++        save_oldobjs=$oldobjs
++        oldobjs=
++        counter=1
++        for obj in $save_oldobjs
++        do
++          func_basename "$obj"
++          objbase="$func_basename_result"
++          case " $oldobjs " in
++          " ") oldobjs=$obj ;;
++          *[\ /]"$objbase "*)
++            while :; do
++              # Make sure we don't pick an alternate name that also
++              # overlaps.
++              newobj=lt$counter-$objbase
++              func_arith $counter + 1
++              counter=$func_arith_result
++              case " $oldobjs " in
++              *[\ /]"$newobj "*) ;;
++              *) if test ! -f "$gentop/$newobj"; then break; fi ;;
++              esac
++            done
++            func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
++            oldobjs="$oldobjs $gentop/$newobj"
++            ;;
++          *) oldobjs="$oldobjs $obj" ;;
++          esac
++        done
++      fi
++      eval "cmds=\"$old_archive_cmds\""
++
++      func_len " $cmds"
++      len=$func_len_result
++      if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
++        cmds=$old_archive_cmds
++      else
++        # the command line is too long to link in one step, link in parts
++        func_verbose "using piecewise archive linking..."
++        save_RANLIB=$RANLIB
++        RANLIB=:
++        objlist=
++        concat_cmds=
++        save_oldobjs=$oldobjs
++        oldobjs=
++        # Is there a better way of finding the last object in the list?
++        for obj in $save_oldobjs
++        do
++          last_oldobj=$obj
++        done
++        eval "test_cmds=\"$old_archive_cmds\""
++        func_len " $test_cmds"
++        len0=$func_len_result
++        len=$len0
++        for obj in $save_oldobjs
++        do
++          func_len " $obj"
++          func_arith $len + $func_len_result
++          len=$func_arith_result
++          func_append objlist " $obj"
++          if test "$len" -lt "$max_cmd_len"; then
++            :
++          else
++            # the above command should be used before it gets too long
++            oldobjs=$objlist
++            if test "$obj" = "$last_oldobj" ; then
++              RANLIB=$save_RANLIB
++            fi
++            test -z "$concat_cmds" || concat_cmds=$concat_cmds~
++            eval "concat_cmds=\"\${concat_cmds}$old_archive_cmds\""
++            objlist=
++            len=$len0
++          fi
++        done
++        RANLIB=$save_RANLIB
++        oldobjs=$objlist
++        if test "X$oldobjs" = "X" ; then
++          eval "cmds=\"\$concat_cmds\""
++        else
++          eval "cmds=\"\$concat_cmds~\$old_archive_cmds\""
++        fi
++      fi
++      fi
++      func_execute_cmds "$cmds" 'exit $?'
++    done
++
++    test -n "$generated" && \
++      func_show_eval "${RM}r$generated"
++
++    # Now create the libtool archive.
++    case $output in
++    *.la)
++      old_library=
++      test "$build_old_libs" = yes && old_library="$libname.$libext"
++      func_verbose "creating $output"
++
++      # Preserve any variables that may affect compiler behavior
++      for var in $variables_saved_for_relink; do
++      if eval test -z \"\${$var+set}\"; then
++        relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
++      elif eval var_value=\$$var; test -z "$var_value"; then
++        relink_command="$var=; export $var; $relink_command"
++      else
++        func_quote_for_eval "$var_value"
++        relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
++      fi
++      done
++      # Quote the link command for shipping.
++      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
++      relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
++      if test "$hardcode_automatic" = yes ; then
++      relink_command=
++      fi
++
++      # Only create the output if not a dry run.
++      $opt_dry_run || {
++      for installed in no yes; do
++        if test "$installed" = yes; then
++          if test -z "$install_libdir"; then
++            break
++          fi
++          output="$output_objdir/$outputname"i
++          # Replace all uninstalled libtool libraries with the installed ones
++          newdependency_libs=
++          for deplib in $dependency_libs; do
++            case $deplib in
++            *.la)
++              func_basename "$deplib"
++              name="$func_basename_result"
++              libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
++              test -z "$libdir" && \
++                func_fatal_error "\`$deplib' is not a valid libtool archive"
++              newdependency_libs="$newdependency_libs $libdir/$name"
++              ;;
++            *) newdependency_libs="$newdependency_libs $deplib" ;;
++            esac
++          done
++          dependency_libs="$newdependency_libs"
++          newdlfiles=
++
++          for lib in $dlfiles; do
++            case $lib in
++            *.la)
++              func_basename "$lib"
++              name="$func_basename_result"
++              libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
++              test -z "$libdir" && \
++                func_fatal_error "\`$lib' is not a valid libtool archive"
++              newdlfiles="$newdlfiles $libdir/$name"
++              ;;
++            *) newdlfiles="$newdlfiles $lib" ;;
++            esac
++          done
++          dlfiles="$newdlfiles"
++          newdlprefiles=
++          for lib in $dlprefiles; do
++            case $lib in
++            *.la)
++              # Only pass preopened files to the pseudo-archive (for
++              # eventual linking with the app. that links it) if we
++              # didn't already link the preopened objects directly into
++              # the library:
++              func_basename "$lib"
++              name="$func_basename_result"
++              libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
++              test -z "$libdir" && \
++                func_fatal_error "\`$lib' is not a valid libtool archive"
++              newdlprefiles="$newdlprefiles $libdir/$name"
++              ;;
++            esac
++          done
++          dlprefiles="$newdlprefiles"
++        else
++          newdlfiles=
++          for lib in $dlfiles; do
++            case $lib in
++              [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
++              *) abs=`pwd`"/$lib" ;;
++            esac
++            newdlfiles="$newdlfiles $abs"
++          done
++          dlfiles="$newdlfiles"
++          newdlprefiles=
++          for lib in $dlprefiles; do
++            case $lib in
++              [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
++              *) abs=`pwd`"/$lib" ;;
++            esac
++            newdlprefiles="$newdlprefiles $abs"
++          done
++          dlprefiles="$newdlprefiles"
++        fi
++        $RM $output
++        # place dlname in correct position for cygwin
++        # In fact, it would be nice if we could use this code for all target
++        # systems that can't hard-code library paths into their executables
++        # and that have no shared library path variable independent of PATH,
++        # but it turns out we can't easily determine that from inspecting
++        # libtool variables, so we have to hard-code the OSs to which it
++        # applies here; at the moment, that means platforms that use the PE
++        # object format with DLL files.  See the long comment at the top of
++        # tests/bindir.at for full details.
++        tdlname=$dlname
++        case $host,$output,$installed,$module,$dlname in
++          *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
++            # If a -bindir argument was supplied, place the dll there.
++            if test "x$bindir" != x ;
++            then
++              func_relative_path "$install_libdir" "$bindir"
++              tdlname=$func_relative_path_result$dlname
++            else
++              # Otherwise fall back on heuristic.
++              tdlname=../bin/$dlname
++            fi
++            ;;
++        esac
++        $ECHO > $output "\
++# $outputname - a libtool library file
++# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
++#
++# Please DO NOT delete this file!
++# It is necessary for linking the library.
++
++# The name that we can dlopen(3).
++dlname='$tdlname'
++
++# Names of this library.
++library_names='$library_names'
++
++# The name of the static archive.
++old_library='$old_library'
++
++# Linker flags that can not go in dependency_libs.
++inherited_linker_flags='$new_inherited_linker_flags'
++
++# Libraries that this one depends upon.
++dependency_libs='$dependency_libs'
++
++# Names of additional weak libraries provided by this library
++weak_library_names='$weak_libs'
++
++# Version information for $libname.
++current=$current
++age=$age
++revision=$revision
++
++# Is this an already installed library?
++installed=$installed
++
++# Should we warn about portability when linking against -modules?
++shouldnotlink=$module
++
++# Files to dlopen/dlpreopen
++dlopen='$dlfiles'
++dlpreopen='$dlprefiles'
++
++# Directory that this library needs to be installed in:
++libdir='$install_libdir'"
++        if test "$installed" = no && test "$need_relink" = yes; then
++          $ECHO >> $output "\
++relink_command=\"$relink_command\""
++        fi
++      done
++      }
++
++      # Do a symbolic link so that the libtool archive can be found in
++      # LD_LIBRARY_PATH before the program is installed.
++      func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
++      ;;
++    esac
++    exit $EXIT_SUCCESS
++}
++
++{ test "$mode" = link || test "$mode" = relink; } &&
++    func_mode_link ${1+"$@"}
++
++
++# func_mode_uninstall arg...
++func_mode_uninstall ()
++{
++    $opt_debug
++    RM="$nonopt"
++    files=
++    rmforce=
++    exit_status=0
++
++    # This variable tells wrapper scripts just to set variables rather
++    # than running their programs.
++    libtool_install_magic="$magic"
++
++    for arg
++    do
++      case $arg in
++      -f) RM="$RM $arg"; rmforce=yes ;;
++      -*) RM="$RM $arg" ;;
++      *) files="$files $arg" ;;
++      esac
++    done
++
++    test -z "$RM" && \
++      func_fatal_help "you must specify an RM program"
++
++    rmdirs=
++
++    origobjdir="$objdir"
++    for file in $files; do
++      func_dirname "$file" "" "."
++      dir="$func_dirname_result"
++      if test "X$dir" = X.; then
++      objdir="$origobjdir"
++      else
++      objdir="$dir/$origobjdir"
++      fi
++      func_basename "$file"
++      name="$func_basename_result"
++      test "$mode" = uninstall && objdir="$dir"
++
++      # Remember objdir for removal later, being careful to avoid duplicates
++      if test "$mode" = clean; then
++      case " $rmdirs " in
++        *" $objdir "*) ;;
++        *) rmdirs="$rmdirs $objdir" ;;
++      esac
++      fi
++
++      # Don't error if the file doesn't exist and rm -f was used.
++      if { test -L "$file"; } >/dev/null 2>&1 ||
++       { test -h "$file"; } >/dev/null 2>&1 ||
++       test -f "$file"; then
++      :
++      elif test -d "$file"; then
++      exit_status=1
++      continue
++      elif test "$rmforce" = yes; then
++      continue
++      fi
++
++      rmfiles="$file"
++
++      case $name in
++      *.la)
++      # Possibly a libtool archive, so verify it.
++      if func_lalib_p "$file"; then
++        func_source $dir/$name
++
++        # Delete the libtool libraries and symlinks.
++        for n in $library_names; do
++          rmfiles="$rmfiles $objdir/$n"
++        done
++        test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
++
++        case "$mode" in
++        clean)
++          case "  $library_names " in
++          # "  " in the beginning catches empty $dlname
++          *" $dlname "*) ;;
++          *) rmfiles="$rmfiles $objdir/$dlname" ;;
++          esac
++          test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
++          ;;
++        uninstall)
++          if test -n "$library_names"; then
++            # Do each command in the postuninstall commands.
++            func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
++          fi
++
++          if test -n "$old_library"; then
++            # Do each command in the old_postuninstall commands.
++            func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
++          fi
++          # FIXME: should reinstall the best remaining shared library.
++          ;;
++        esac
++      fi
++      ;;
++
++      *.lo)
++      # Possibly a libtool object, so verify it.
++      if func_lalib_p "$file"; then
++
++        # Read the .lo file
++        func_source $dir/$name
++
++        # Add PIC object to the list of files to remove.
++        if test -n "$pic_object" &&
++           test "$pic_object" != none; then
++          rmfiles="$rmfiles $dir/$pic_object"
++        fi
++
++        # Add non-PIC object to the list of files to remove.
++        if test -n "$non_pic_object" &&
++           test "$non_pic_object" != none; then
++          rmfiles="$rmfiles $dir/$non_pic_object"
++        fi
++      fi
++      ;;
++
++      *)
++      if test "$mode" = clean ; then
++        noexename=$name
++        case $file in
++        *.exe)
++          func_stripname '' '.exe' "$file"
++          file=$func_stripname_result
++          func_stripname '' '.exe' "$name"
++          noexename=$func_stripname_result
++          # $file with .exe has already been added to rmfiles,
++          # add $file without .exe
++          rmfiles="$rmfiles $file"
++          ;;
++        esac
++        # Do a test to see if this is a libtool program.
++        if func_ltwrapper_p "$file"; then
++          if func_ltwrapper_executable_p "$file"; then
++            func_ltwrapper_scriptname "$file"
++            relink_command=
++            func_source $func_ltwrapper_scriptname_result
++            rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
++          else
++            relink_command=
++            func_source $dir/$noexename
++          fi
++
++          # note $name still contains .exe if it was in $file originally
++          # as does the version of $file that was added into $rmfiles
++          rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
++          if test "$fast_install" = yes && test -n "$relink_command"; then
++            rmfiles="$rmfiles $objdir/lt-$name"
++          fi
++          if test "X$noexename" != "X$name" ; then
++            rmfiles="$rmfiles $objdir/lt-${noexename}.c"
++          fi
++        fi
++      fi
++      ;;
++      esac
++      func_show_eval "$RM $rmfiles" 'exit_status=1'
++    done
++    objdir="$origobjdir"
++
++    # Try to remove the ${objdir}s in the directories where we deleted files
++    for dir in $rmdirs; do
++      if test -d "$dir"; then
++      func_show_eval "rmdir $dir >/dev/null 2>&1"
++      fi
++    done
++
++    exit $exit_status
++}
++
++{ test "$mode" = uninstall || test "$mode" = clean; } &&
++    func_mode_uninstall ${1+"$@"}
++
++test -z "$mode" && {
++  help="$generic_help"
++  func_fatal_help "you must specify a MODE"
++}
++
++test -z "$exec_cmd" && \
++  func_fatal_help "invalid operation mode \`$mode'"
++
++if test -n "$exec_cmd"; then
++  eval exec "$exec_cmd"
++  exit $EXIT_FAILURE
++fi
++
++exit $exit_status
++
++
++# The TAGs below are defined such that we never get into a situation
++# in which we disable both kinds of libraries.  Given conflicting
++# choices, we go for a static library, that is the most portable,
++# since we can't tell whether shared libraries were disabled because
++# the user asked for that or because the platform doesn't support
++# them.  This is particularly important on AIX, because we don't
++# support having both static and shared libraries enabled at the same
++# time on that platform, so we default to a shared-only configuration.
++# If a disable-shared tag is given, we'll fallback to a static-only
++# configuration.  But we'll never go from static-only to shared-only.
++
++# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
++build_libtool_libs=no
++build_old_libs=yes
++# ### END LIBTOOL TAG CONFIG: disable-shared
++
++# ### BEGIN LIBTOOL TAG CONFIG: disable-static
++build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
++# ### END LIBTOOL TAG CONFIG: disable-static
++
++# Local Variables:
++# mode:shell-script
++# sh-indentation:2
++# End:
++# vi:sw=2
++
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f62bbae306c7e1bc28896aab8fe7bfb700a9a33e
new file mode 100755 (executable)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,215 @@@
++#! /bin/sh
++# Common wrapper for a few potentially missing GNU programs.
++
++scriptversion=2013-10-28.13; # UTC
++
++# Copyright (C) 1996-2014 Free Software Foundation, Inc.
++# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++# As a special exception to the GNU General Public License, if you
++# distribute this file as part of a program that contains a
++# configuration script generated by Autoconf, you may include it under
++# the same distribution terms that you use for the rest of that program.
++
++if test $# -eq 0; then
++  echo 1>&2 "Try '$0 --help' for more information"
++  exit 1
++fi
++
++case $1 in
++
++  --is-lightweight)
++    # Used by our autoconf macros to check whether the available missing
++    # script is modern enough.
++    exit 0
++    ;;
++
++  --run)
++    # Back-compat with the calling convention used by older automake.
++    shift
++    ;;
++
++  -h|--h|--he|--hel|--help)
++    echo "\
++$0 [OPTION]... PROGRAM [ARGUMENT]...
++
++Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
++to PROGRAM being missing or too old.
++
++Options:
++  -h, --help      display this help and exit
++  -v, --version   output version information and exit
++
++Supported PROGRAM values:
++  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
++  bison     yacc      flex         lex       help2man
++
++Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
++'g' are ignored when checking the name.
++
++Send bug reports to <bug-automake@gnu.org>."
++    exit $?
++    ;;
++
++  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
++    echo "missing $scriptversion (GNU Automake)"
++    exit $?
++    ;;
++
++  -*)
++    echo 1>&2 "$0: unknown '$1' option"
++    echo 1>&2 "Try '$0 --help' for more information"
++    exit 1
++    ;;
++
++esac
++
++# Run the given program, remember its exit status.
++"$@"; st=$?
++
++# If it succeeded, we are done.
++test $st -eq 0 && exit 0
++
++# Also exit now if we it failed (or wasn't found), and '--version' was
++# passed; such an option is passed most likely to detect whether the
++# program is present and works.
++case $2 in --version|--help) exit $st;; esac
++
++# Exit code 63 means version mismatch.  This often happens when the user
++# tries to use an ancient version of a tool on a file that requires a
++# minimum version.
++if test $st -eq 63; then
++  msg="probably too old"
++elif test $st -eq 127; then
++  # Program was missing.
++  msg="missing on your system"
++else
++  # Program was found and executed, but failed.  Give up.
++  exit $st
++fi
++
++perl_URL=http://www.perl.org/
++flex_URL=http://flex.sourceforge.net/
++gnu_software_URL=http://www.gnu.org/software
++
++program_details ()
++{
++  case $1 in
++    aclocal|automake)
++      echo "The '$1' program is part of the GNU Automake package:"
++      echo "<$gnu_software_URL/automake>"
++      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
++      echo "<$gnu_software_URL/autoconf>"
++      echo "<$gnu_software_URL/m4/>"
++      echo "<$perl_URL>"
++      ;;
++    autoconf|autom4te|autoheader)
++      echo "The '$1' program is part of the GNU Autoconf package:"
++      echo "<$gnu_software_URL/autoconf/>"
++      echo "It also requires GNU m4 and Perl in order to run:"
++      echo "<$gnu_software_URL/m4/>"
++      echo "<$perl_URL>"
++      ;;
++  esac
++}
++
++give_advice ()
++{
++  # Normalize program name to check for.
++  normalized_program=`echo "$1" | sed '
++    s/^gnu-//; t
++    s/^gnu//; t
++    s/^g//; t'`
++
++  printf '%s\n' "'$1' is $msg."
++
++  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
++  case $normalized_program in
++    autoconf*)
++      echo "You should only need it if you modified 'configure.ac',"
++      echo "or m4 files included by it."
++      program_details 'autoconf'
++      ;;
++    autoheader*)
++      echo "You should only need it if you modified 'acconfig.h' or"
++      echo "$configure_deps."
++      program_details 'autoheader'
++      ;;
++    automake*)
++      echo "You should only need it if you modified 'Makefile.am' or"
++      echo "$configure_deps."
++      program_details 'automake'
++      ;;
++    aclocal*)
++      echo "You should only need it if you modified 'acinclude.m4' or"
++      echo "$configure_deps."
++      program_details 'aclocal'
++      ;;
++   autom4te*)
++      echo "You might have modified some maintainer files that require"
++      echo "the 'autom4te' program to be rebuilt."
++      program_details 'autom4te'
++      ;;
++    bison*|yacc*)
++      echo "You should only need it if you modified a '.y' file."
++      echo "You may want to install the GNU Bison package:"
++      echo "<$gnu_software_URL/bison/>"
++      ;;
++    lex*|flex*)
++      echo "You should only need it if you modified a '.l' file."
++      echo "You may want to install the Fast Lexical Analyzer package:"
++      echo "<$flex_URL>"
++      ;;
++    help2man*)
++      echo "You should only need it if you modified a dependency" \
++           "of a man page."
++      echo "You may want to install the GNU Help2man package:"
++      echo "<$gnu_software_URL/help2man/>"
++    ;;
++    makeinfo*)
++      echo "You should only need it if you modified a '.texi' file, or"
++      echo "any other file indirectly affecting the aspect of the manual."
++      echo "You might want to install the Texinfo package:"
++      echo "<$gnu_software_URL/texinfo/>"
++      echo "The spurious makeinfo call might also be the consequence of"
++      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
++      echo "want to install GNU make:"
++      echo "<$gnu_software_URL/make/>"
++      ;;
++    *)
++      echo "You might have modified some files without having the proper"
++      echo "tools for further handling them.  Check the 'README' file, it"
++      echo "often tells you about the needed prerequisites for installing"
++      echo "this package.  You may also peek at any GNU archive site, in"
++      echo "case some other package contains this missing '$1' program."
++      ;;
++  esac
++}
++
++give_advice "$1" | sed -e '1s/^/WARNING: /' \
++                       -e '2,$s/^/         /' >&2
++
++# Propagate the correct exit status (expected to be 127 for a program
++# not found, 63 for a program that failed due to version mismatch).
++exit $st
++
++# Local variables:
++# eval: (add-hook 'write-file-hooks 'time-stamp)
++# time-stamp-start: "scriptversion="
++# time-stamp-format: "%:y-%02m-%02d.%02H"
++# time-stamp-time-zone: "UTC"
++# time-stamp-end: "; # UTC"
++# End:
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e30d1c1a3d75924ceadc7581e2825093419852e1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,303 @@@
++/* mmap.c -- Memory allocation with mmap.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <errno.h>
++#include <string.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <sys/types.h>
++#include <sys/mman.h>
++
++#include "backtrace.h"
++#include "internal.h"
++
++/* Memory allocation on systems that provide anonymous mmap.  This
++   permits the backtrace functions to be invoked from a signal
++   handler, assuming that mmap is async-signal safe.  */
++
++#ifndef MAP_ANONYMOUS
++#define MAP_ANONYMOUS MAP_ANON
++#endif
++
++#ifndef MAP_FAILED
++#define MAP_FAILED ((void *)-1)
++#endif
++
++/* A list of free memory blocks.  */
++
++struct backtrace_freelist_struct
++{
++  /* Next on list.  */
++  struct backtrace_freelist_struct *next;
++  /* Size of this block, including this structure.  */
++  size_t size;
++};
++
++/* Free memory allocated by backtrace_alloc.  */
++
++static void
++backtrace_free_locked (struct backtrace_state *state, void *addr, size_t size)
++{
++  /* Just leak small blocks.  We don't have to be perfect.  */
++  if (size >= sizeof (struct backtrace_freelist_struct))
++    {
++      struct backtrace_freelist_struct *p;
++
++      p = (struct backtrace_freelist_struct *) addr;
++      p->next = state->freelist;
++      p->size = size;
++      state->freelist = p;
++    }
++}
++
++/* Allocate memory like malloc.  If ERROR_CALLBACK is NULL, don't
++   report an error.  */
++
++void *
++backtrace_alloc (struct backtrace_state *state,
++               size_t size, backtrace_error_callback error_callback,
++               void *data)
++{
++  void *ret;
++  int locked;
++  struct backtrace_freelist_struct **pp;
++  size_t pagesize;
++  size_t asksize;
++  void *page;
++
++  ret = NULL;
++
++  /* If we can acquire the lock, then see if there is space on the
++     free list.  If we can't acquire the lock, drop straight into
++     using mmap.  __sync_lock_test_and_set returns the old state of
++     the lock, so we have acquired it if it returns 0.  */
++
++  if (!state->threaded)
++    locked = 1;
++  else
++    locked = __sync_lock_test_and_set (&state->lock_alloc, 1) == 0;
++
++  if (locked)
++    {
++      for (pp = &state->freelist; *pp != NULL; pp = &(*pp)->next)
++      {
++        if ((*pp)->size >= size)
++          {
++            struct backtrace_freelist_struct *p;
++
++            p = *pp;
++            *pp = p->next;
++
++            /* Round for alignment; we assume that no type we care about
++               is more than 8 bytes.  */
++            size = (size + 7) & ~ (size_t) 7;
++            if (size < p->size)
++              backtrace_free_locked (state, (char *) p + size,
++                                     p->size - size);
++
++            ret = (void *) p;
++
++            break;
++          }
++      }
++
++      if (state->threaded)
++      __sync_lock_release (&state->lock_alloc);
++    }
++
++  if (ret == NULL)
++    {
++      /* Allocate a new page.  */
++
++      pagesize = getpagesize ();
++      asksize = (size + pagesize - 1) & ~ (pagesize - 1);
++      page = mmap (NULL, asksize, PROT_READ | PROT_WRITE,
++                 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
++      if (page == MAP_FAILED)
++      {
++        if (error_callback)
++          error_callback (data, "mmap", errno);
++      }
++      else
++      {
++        size = (size + 7) & ~ (size_t) 7;
++        if (size < asksize)
++          backtrace_free (state, (char *) page + size, asksize - size,
++                          error_callback, data);
++
++        ret = page;
++      }
++    }
++
++  return ret;
++}
++
++/* Free memory allocated by backtrace_alloc.  */
++
++void
++backtrace_free (struct backtrace_state *state, void *addr, size_t size,
++              backtrace_error_callback error_callback ATTRIBUTE_UNUSED,
++              void *data ATTRIBUTE_UNUSED)
++{
++  int locked;
++
++  /* If we are freeing a large aligned block, just release it back to
++     the system.  This case arises when growing a vector for a large
++     binary with lots of debug info.  Calling munmap here may cause us
++     to call mmap again if there is also a large shared library; we
++     just live with that.  */
++  if (size >= 16 * 4096)
++    {
++      size_t pagesize;
++
++      pagesize = getpagesize ();
++      if (((uintptr_t) addr & (pagesize - 1)) == 0
++        && (size & (pagesize - 1)) == 0)
++      {
++        /* If munmap fails for some reason, just add the block to
++           the freelist.  */
++        if (munmap (addr, size) == 0)
++          return;
++      }
++    }
++
++  /* If we can acquire the lock, add the new space to the free list.
++     If we can't acquire the lock, just leak the memory.
++     __sync_lock_test_and_set returns the old state of the lock, so we
++     have acquired it if it returns 0.  */
++
++  if (!state->threaded)
++    locked = 1;
++  else
++    locked = __sync_lock_test_and_set (&state->lock_alloc, 1) == 0;
++
++  if (locked)
++    {
++      backtrace_free_locked (state, addr, size);
++
++      if (state->threaded)
++      __sync_lock_release (&state->lock_alloc);
++    }
++}
++
++/* Grow VEC by SIZE bytes.  */
++
++void *
++backtrace_vector_grow (struct backtrace_state *state,size_t size,
++                     backtrace_error_callback error_callback,
++                     void *data, struct backtrace_vector *vec)
++{
++  void *ret;
++
++  if (size > vec->alc)
++    {
++      size_t pagesize;
++      size_t alc;
++      void *base;
++
++      pagesize = getpagesize ();
++      alc = vec->size + size;
++      if (vec->size == 0)
++      alc = 16 * size;
++      else if (alc < pagesize)
++      {
++        alc *= 2;
++        if (alc > pagesize)
++          alc = pagesize;
++      }
++      else
++      {
++        alc *= 2;
++        alc = (alc + pagesize - 1) & ~ (pagesize - 1);
++      }
++      base = backtrace_alloc (state, alc, error_callback, data);
++      if (base == NULL)
++      return NULL;
++      if (vec->base != NULL)
++      {
++        memcpy (base, vec->base, vec->size);
++        backtrace_free (state, vec->base, vec->size + vec->alc,
++                        error_callback, data);
++      }
++      vec->base = base;
++      vec->alc = alc - vec->size;
++    }
++
++  ret = (char *) vec->base + vec->size;
++  vec->size += size;
++  vec->alc -= size;
++  return ret;
++}
++
++/* Finish the current allocation on VEC.  */
++
++void *
++backtrace_vector_finish (
++  struct backtrace_state *state ATTRIBUTE_UNUSED,
++  struct backtrace_vector *vec,
++  backtrace_error_callback error_callback ATTRIBUTE_UNUSED,
++  void *data ATTRIBUTE_UNUSED)
++{
++  void *ret;
++
++  ret = vec->base;
++  vec->base = (char *) vec->base + vec->size;
++  vec->size = 0;
++  return ret;
++}
++
++/* Release any extra space allocated for VEC.  */
++
++int
++backtrace_vector_release (struct backtrace_state *state,
++                        struct backtrace_vector *vec,
++                        backtrace_error_callback error_callback,
++                        void *data)
++{
++  size_t size;
++  size_t alc;
++  size_t aligned;
++
++  /* Make sure that the block that we free is aligned on an 8-byte
++     boundary.  */
++  size = vec->size;
++  alc = vec->alc;
++  aligned = (size + 7) & ~ (size_t) 7;
++  alc -= aligned - size;
++
++  backtrace_free (state, (char *) vec->base + aligned, alc,
++                error_callback, data);
++  vec->alc = 0;
++  return 1;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8a9ba8e7bce8e736925461c935730e0d47ff9b27
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,100 @@@
++/* mmapio.c -- File views using mmap.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <errno.h>
++#include <sys/types.h>
++#include <sys/mman.h>
++#include <unistd.h>
++
++#include "backtrace.h"
++#include "internal.h"
++
++#ifndef MAP_FAILED
++#define MAP_FAILED ((void *)-1)
++#endif
++
++/* This file implements file views and memory allocation when mmap is
++   available.  */
++
++/* Create a view of SIZE bytes from DESCRIPTOR at OFFSET.  */
++
++int
++backtrace_get_view (struct backtrace_state *state ATTRIBUTE_UNUSED,
++                  int descriptor, off_t offset, size_t size,
++                  backtrace_error_callback error_callback,
++                  void *data, struct backtrace_view *view)
++{
++  size_t pagesize;
++  unsigned int inpage;
++  off_t pageoff;
++  void *map;
++
++  pagesize = getpagesize ();
++  inpage = offset % pagesize;
++  pageoff = offset - inpage;
++
++  size += inpage;
++  size = (size + (pagesize - 1)) & ~ (pagesize - 1);
++
++  map = mmap (NULL, size, PROT_READ, MAP_PRIVATE, descriptor, pageoff);
++  if (map == MAP_FAILED)
++    {
++      error_callback (data, "mmap", errno);
++      return 0;
++    }
++
++  view->data = (char *) map + inpage;
++  view->base = map;
++  view->len = size;
++
++  return 1;
++}
++
++/* Release a view read by backtrace_get_view.  */
++
++void
++backtrace_release_view (struct backtrace_state *state ATTRIBUTE_UNUSED,
++                      struct backtrace_view *view,
++                      backtrace_error_callback error_callback,
++                      void *data)
++{
++  union {
++    const void *cv;
++    void *v;
++  } const_cast;
++
++  const_cast.cv = view->base;
++  if (munmap (const_cast.v, view->len) < 0)
++    error_callback (data, "munmap", errno);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0deaeef0a8ef09fda799470759c69fddd06e9b50
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,66 @@@
++/* backtrace.c -- Entry point for stack backtrace library.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <sys/types.h>
++
++#include "backtrace.h"
++
++#include "internal.h"
++
++/* This source file is compiled if the unwind library is not
++   available.  */
++
++int
++backtrace_full (struct backtrace_state *state ATTRIBUTE_UNUSED,
++              int skip ATTRIBUTE_UNUSED,
++              backtrace_full_callback callback ATTRIBUTE_UNUSED,
++              backtrace_error_callback error_callback, void *data)
++{
++  error_callback (data,
++                "no stack trace because unwind library not available",
++                0);
++  return 0;
++}
++
++int
++backtrace_simple (struct backtrace_state *state ATTRIBUTE_UNUSED,
++                int skip ATTRIBUTE_UNUSED,
++                backtrace_simple_callback callback ATTRIBUTE_UNUSED,
++                backtrace_error_callback error_callback, void *data)
++{
++  error_callback (data,
++                "no stack trace because unwind library not available",
++                0);
++  return 0;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c7d32aa6b4750495f9b4860db8cc9fe4535c87a2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,937 @@@
++/* pecoff.c -- Get debug data from a PE/COFFF file for backtraces.
++   Copyright (C) 2015-2016 Free Software Foundation, Inc.
++   Adapted from elf.c by Tristan Gingold, AdaCore.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <stdlib.h>
++#include <string.h>
++#include <sys/types.h>
++
++#include "backtrace.h"
++#include "internal.h"
++
++/* Coff file header.  */
++
++typedef struct {
++  uint16_t machine;
++  uint16_t number_of_sections;
++  uint32_t time_date_stamp;
++  uint32_t pointer_to_symbol_table;
++  uint32_t number_of_symbols;
++  uint16_t size_of_optional_header;
++  uint16_t characteristics;
++} b_coff_file_header;
++
++/* Coff optional header.  */
++
++typedef struct {
++  uint16_t magic;
++  uint8_t  major_linker_version;
++  uint8_t  minor_linker_version;
++  uint32_t size_of_code;
++  uint32_t size_of_initialized_data;
++  uint32_t size_of_uninitialized_data;
++  uint32_t address_of_entry_point;
++  uint32_t base_of_code;
++  union {
++    struct {
++      uint32_t base_of_data;
++      uint32_t image_base;
++    } pe;
++    struct {
++      uint64_t image_base;
++    } pep;
++  } u;
++} b_coff_optional_header;
++
++/* Values of magic in optional header.  */
++
++#define PE_MAGIC 0x10b                /* PE32 executable.  */
++#define PEP_MAGIC 0x20b               /* PE32+ executable (for 64bit targets).  */
++
++/* Coff section header.  */
++
++typedef struct {
++  char name[8];
++  uint32_t virtual_size;
++  uint32_t virtual_address;
++  uint32_t size_of_raw_data;
++  uint32_t pointer_to_raw_data;
++  uint32_t pointer_to_relocations;
++  uint32_t pointer_to_line_numbers;
++  uint16_t number_of_relocations;
++  uint16_t number_of_line_numbers;
++  uint32_t characteristics;
++} b_coff_section_header;
++
++/* Coff symbol name.  */
++
++typedef union {
++  char short_name[8];
++  struct {
++    unsigned char zeroes[4];
++    unsigned char off[4];
++  } long_name;
++} b_coff_name;
++
++/* Coff symbol (external representation which is unaligned).  */
++
++typedef struct {
++  b_coff_name name;
++  unsigned char value[4];
++  unsigned char section_number[2];
++  unsigned char type[2];
++  unsigned char storage_class;
++  unsigned char number_of_aux_symbols;
++} b_coff_external_symbol;
++
++/* Symbol types.  */
++
++#define N_TBSHFT 4                    /* Shift for the derived type.  */
++#define IMAGE_SYM_DTYPE_FUNCTION 2    /* Function derived type.  */
++
++/* Size of a coff symbol.  */
++
++#define SYM_SZ 18
++
++/* Coff symbol, internal representation (aligned).  */
++
++typedef struct {
++  const char *name;
++  uint32_t value;
++  int16_t sec;
++  uint16_t type;
++  uint16_t sc;
++} b_coff_internal_symbol;
++
++/* An index of sections we care about.  */
++
++enum debug_section
++{
++  DEBUG_INFO,
++  DEBUG_LINE,
++  DEBUG_ABBREV,
++  DEBUG_RANGES,
++  DEBUG_STR,
++  DEBUG_MAX
++};
++
++/* Names of sections, indexed by enum debug_section.  */
++
++static const char * const debug_section_names[DEBUG_MAX] =
++{
++  ".debug_info",
++  ".debug_line",
++  ".debug_abbrev",
++  ".debug_ranges",
++  ".debug_str"
++};
++
++/* Information we gather for the sections we care about.  */
++
++struct debug_section_info
++{
++  /* Section file offset.  */
++  off_t offset;
++  /* Section size.  */
++  size_t size;
++  /* Section contents, after read from file.  */
++  const unsigned char *data;
++};
++
++/* Information we keep for an coff symbol.  */
++
++struct coff_symbol
++{
++  /* The name of the symbol.  */
++  const char *name;
++  /* The address of the symbol.  */
++  uintptr_t address;
++};
++
++/* Information to pass to coff_syminfo.  */
++
++struct coff_syminfo_data
++{
++  /* Symbols for the next module.  */
++  struct coff_syminfo_data *next;
++  /* The COFF symbols, sorted by address.  */
++  struct coff_symbol *symbols;
++  /* The number of symbols.  */
++  size_t count;
++};
++
++/* A dummy callback function used when we can't find any debug info.  */
++
++static int
++coff_nodebug (struct backtrace_state *state ATTRIBUTE_UNUSED,
++            uintptr_t pc ATTRIBUTE_UNUSED,
++            backtrace_full_callback callback ATTRIBUTE_UNUSED,
++            backtrace_error_callback error_callback, void *data)
++{
++  error_callback (data, "no debug info in PE/COFF executable", -1);
++  return 0;
++}
++
++/* A dummy callback function used when we can't find a symbol
++   table.  */
++
++static void
++coff_nosyms (struct backtrace_state *state ATTRIBUTE_UNUSED,
++           uintptr_t addr ATTRIBUTE_UNUSED,
++           backtrace_syminfo_callback callback ATTRIBUTE_UNUSED,
++           backtrace_error_callback error_callback, void *data)
++{
++  error_callback (data, "no symbol table in PE/COFF executable", -1);
++}
++
++/* Read a potentially unaligned 4 byte word at P, using native endianness.  */
++
++static uint32_t
++coff_read4 (const unsigned char *p)
++{
++  uint32_t res;
++
++  memcpy (&res, p, 4);
++  return res;
++}
++
++/* Read a potentially unaligned 2 byte word at P, using native endianness.
++   All 2 byte word in symbols are always aligned, but for coherency all
++   fields are declared as char arrays.  */
++
++static uint16_t
++coff_read2 (const unsigned char *p)
++{
++  uint16_t res;
++
++  memcpy (&res, p, sizeof (res));
++  return res;
++}
++
++/* Return the length (without the trailing 0) of a COFF short name.  */
++
++static size_t
++coff_short_name_len (const char *name)
++{
++  int i;
++
++  for (i = 0; i < 8; i++)
++    if (name[i] == 0)
++      return i;
++  return 8;
++}
++
++/* Return true iff COFF short name CNAME is the same as NAME (a NUL-terminated
++   string).  */
++
++static int
++coff_short_name_eq (const char *name, const char *cname)
++{
++  int i;
++
++  for (i = 0; i < 8; i++)
++    {
++      if (name[i] != cname[i])
++      return 0;
++      if (name[i] == 0)
++      return 1;
++    }
++  return name[8] == 0;
++}
++
++/* Return true iff NAME is the same as string at offset OFF.  */
++
++static int
++coff_long_name_eq (const char *name, unsigned int off,
++                 struct backtrace_view *str_view)
++{
++  if (off >= str_view->len)
++    return 0;
++  return strcmp (name, (const char *)str_view->data + off) == 0;
++}
++
++/* Compare struct coff_symbol for qsort.  */
++
++static int
++coff_symbol_compare (const void *v1, const void *v2)
++{
++  const struct coff_symbol *e1 = (const struct coff_symbol *) v1;
++  const struct coff_symbol *e2 = (const struct coff_symbol *) v2;
++
++  if (e1->address < e2->address)
++    return -1;
++  else if (e1->address > e2->address)
++    return 1;
++  else
++    return 0;
++}
++
++/* Convert SYM to internal (and aligned) format ISYM, using string table
++   from STRTAB and STRTAB_SIZE, and number of sections SECTS_NUM.
++   Return -1 in case of error (invalid section number or string index).  */
++
++static int
++coff_expand_symbol (b_coff_internal_symbol *isym,
++                  const b_coff_external_symbol *sym,
++                  uint16_t sects_num,
++                  const unsigned char *strtab, size_t strtab_size)
++{
++  isym->type = coff_read2 (sym->type);
++  isym->sec = coff_read2 (sym->section_number);
++  isym->sc = sym->storage_class;
++
++  if (isym->sec > 0 && (uint16_t) isym->sec > sects_num)
++    return -1;
++  if (sym->name.short_name[0] != 0)
++    isym->name = sym->name.short_name;
++  else
++    {
++      uint32_t off = coff_read4 (sym->name.long_name.off);
++
++      if (off >= strtab_size)
++      return -1;
++      isym->name = (const char *) strtab + off;
++    }
++  return 0;
++}
++
++/* Return true iff SYM is a defined symbol for a function.  Data symbols
++   aren't considered because they aren't easily identified (same type as
++   section names, presence of symbols defined by the linker script).  */
++
++static int
++coff_is_function_symbol (const b_coff_internal_symbol *isym)
++{
++  return (isym->type >> N_TBSHFT) == IMAGE_SYM_DTYPE_FUNCTION
++    && isym->sec > 0;
++}
++
++/* Initialize the symbol table info for coff_syminfo.  */
++
++static int
++coff_initialize_syminfo (struct backtrace_state *state,
++                       uintptr_t base_address,
++                       const b_coff_section_header *sects, size_t sects_num,
++                       const b_coff_external_symbol *syms, size_t syms_size,
++                       const unsigned char *strtab, size_t strtab_size,
++                       backtrace_error_callback error_callback,
++                       void *data, struct coff_syminfo_data *sdata)
++{
++  size_t syms_count;
++  char *coff_symstr;
++  size_t coff_symstr_len;
++  size_t coff_symbol_count;
++  size_t coff_symbol_size;
++  struct coff_symbol *coff_symbols;
++  struct coff_symbol *coff_sym;
++  char *coff_str;
++  size_t i;
++
++  syms_count = syms_size / SYM_SZ;
++
++  /* We only care about function symbols.  Count them.  Also count size of
++     strings for in-symbol names.  */
++  coff_symbol_count = 0;
++  coff_symstr_len = 0;
++  for (i = 0; i < syms_count; ++i)
++    {
++      const b_coff_external_symbol *asym = &syms[i];
++      b_coff_internal_symbol isym;
++
++      if (coff_expand_symbol (&isym, asym, sects_num, strtab, strtab_size) < 0)
++      {
++        error_callback (data, "invalid section or offset in coff symbol", 0);
++        return 0;
++      }
++      if (coff_is_function_symbol (&isym))
++      {
++        ++coff_symbol_count;
++        if (asym->name.short_name[0] != 0)
++          coff_symstr_len += coff_short_name_len (asym->name.short_name) + 1;
++      }
++
++      i += asym->number_of_aux_symbols;
++    }
++
++  coff_symbol_size = (coff_symbol_count + 1) * sizeof (struct coff_symbol);
++  coff_symbols = ((struct coff_symbol *)
++                backtrace_alloc (state, coff_symbol_size, error_callback,
++                                 data));
++  if (coff_symbols == NULL)
++    return 0;
++
++  /* Allocate memory for symbols strings.  */
++  if (coff_symstr_len > 0)
++    {
++      coff_symstr = ((char *)
++                   backtrace_alloc (state, coff_symstr_len, error_callback,
++                                    data));
++      if (coff_symstr == NULL)
++      {
++        backtrace_free (state, coff_symbols, coff_symbol_size,
++                        error_callback, data);
++        return 0;
++      }
++    }
++  else
++    coff_symstr = NULL;
++
++  /* Copy symbols.  */
++  coff_sym = coff_symbols;
++  coff_str = coff_symstr;
++  for (i = 0; i < syms_count; ++i)
++    {
++      const b_coff_external_symbol *asym = &syms[i];
++      b_coff_internal_symbol isym;
++
++      if (coff_expand_symbol (&isym, asym, sects_num, strtab, strtab_size))
++      {
++        /* Should not fail, as it was already tested in the previous
++           loop.  */
++        abort ();
++      }
++      if (coff_is_function_symbol (&isym))
++      {
++        const char *name;
++        int16_t secnum;
++
++        if (asym->name.short_name[0] != 0)
++          {
++            size_t len = coff_short_name_len (isym.name);
++            name = coff_str;
++            memcpy (coff_str, isym.name, len);
++            coff_str[len] = 0;
++            coff_str += len + 1;
++          }
++        else
++          name = isym.name;
++
++        /* Strip leading '_'.  */
++        if (name[0] == '_')
++          name++;
++
++        /* Symbol value is section relative, so we need to read the address
++           of its section.  */
++        secnum = coff_read2 (asym->section_number);
++
++        coff_sym->name = name;
++        coff_sym->address = (coff_read4 (asym->value)
++                             + sects[secnum - 1].virtual_address
++                             + base_address);
++        coff_sym++;
++      }
++
++      i += asym->number_of_aux_symbols;
++    }
++
++  /* End of symbols marker.  */
++  coff_sym->name = NULL;
++  coff_sym->address = -1;
++
++  backtrace_qsort (coff_symbols, coff_symbol_count,
++                 sizeof (struct coff_symbol), coff_symbol_compare);
++
++  sdata->next = NULL;
++  sdata->symbols = coff_symbols;
++  sdata->count = coff_symbol_count;
++
++  return 1;
++}
++
++/* Add EDATA to the list in STATE.  */
++
++static void
++coff_add_syminfo_data (struct backtrace_state *state,
++                     struct coff_syminfo_data *sdata)
++{
++  if (!state->threaded)
++    {
++      struct coff_syminfo_data **pp;
++
++      for (pp = (struct coff_syminfo_data **) (void *) &state->syminfo_data;
++         *pp != NULL;
++         pp = &(*pp)->next)
++      ;
++      *pp = sdata;
++    }
++  else
++    {
++      while (1)
++      {
++        struct coff_syminfo_data **pp;
++
++        pp = (struct coff_syminfo_data **) (void *) &state->syminfo_data;
++
++        while (1)
++          {
++            struct coff_syminfo_data *p;
++
++            p = backtrace_atomic_load_pointer (pp);
++
++            if (p == NULL)
++              break;
++
++            pp = &p->next;
++          }
++
++        if (__sync_bool_compare_and_swap (pp, NULL, sdata))
++          break;
++      }
++    }
++}
++
++/* Compare an ADDR against an elf_symbol for bsearch.  We allocate one
++   extra entry in the array so that this can look safely at the next
++   entry.  */
++
++static int
++coff_symbol_search (const void *vkey, const void *ventry)
++{
++  const uintptr_t *key = (const uintptr_t *) vkey;
++  const struct coff_symbol *entry = (const struct coff_symbol *) ventry;
++  uintptr_t addr;
++
++  addr = *key;
++  if (addr < entry->address)
++    return -1;
++  else if (addr >= entry[1].address)
++    return 1;
++  else
++    return 0;
++}
++
++/* Return the symbol name and value for an ADDR.  */
++
++static void
++coff_syminfo (struct backtrace_state *state, uintptr_t addr,
++            backtrace_syminfo_callback callback,
++            backtrace_error_callback error_callback ATTRIBUTE_UNUSED,
++            void *data)
++{
++  struct coff_syminfo_data *sdata;
++  struct coff_symbol *sym = NULL;
++
++  if (!state->threaded)
++    {
++      for (sdata = (struct coff_syminfo_data *) state->syminfo_data;
++         sdata != NULL;
++         sdata = sdata->next)
++      {
++        sym = ((struct coff_symbol *)
++               bsearch (&addr, sdata->symbols, sdata->count,
++                        sizeof (struct coff_symbol), coff_symbol_search));
++        if (sym != NULL)
++          break;
++      }
++    }
++  else
++    {
++      struct coff_syminfo_data **pp;
++
++      pp = (struct coff_syminfo_data **) (void *) &state->syminfo_data;
++      while (1)
++      {
++        sdata = backtrace_atomic_load_pointer (pp);
++        if (sdata == NULL)
++          break;
++
++        sym = ((struct coff_symbol *)
++               bsearch (&addr, sdata->symbols, sdata->count,
++                        sizeof (struct coff_symbol), coff_symbol_search));
++        if (sym != NULL)
++          break;
++
++        pp = &sdata->next;
++      }
++    }
++
++  if (sym == NULL)
++    callback (data, addr, NULL, 0, 0);
++  else
++    callback (data, addr, sym->name, sym->address, 0);
++}
++
++/* Add the backtrace data for one PE/COFF file.  Returns 1 on success,
++   0 on failure (in both cases descriptor is closed).  */
++
++static int
++coff_add (struct backtrace_state *state, int descriptor,
++        backtrace_error_callback error_callback, void *data,
++        fileline *fileline_fn, int *found_sym, int *found_dwarf)
++{
++  struct backtrace_view fhdr_view;
++  off_t fhdr_off;
++  int magic_ok;
++  b_coff_file_header fhdr;
++  off_t opt_sects_off;
++  size_t opt_sects_size;
++  unsigned int sects_num;
++  struct backtrace_view sects_view;
++  int sects_view_valid;
++  const b_coff_optional_header *opt_hdr;
++  const b_coff_section_header *sects;
++  struct backtrace_view str_view;
++  int str_view_valid;
++  size_t str_size;
++  off_t str_off;
++  struct backtrace_view syms_view;
++  off_t syms_off;
++  size_t syms_size;
++  int syms_view_valid;
++  unsigned int syms_num;
++  unsigned int i;
++  struct debug_section_info sections[DEBUG_MAX];
++  off_t min_offset;
++  off_t max_offset;
++  struct backtrace_view debug_view;
++  int debug_view_valid;
++  uintptr_t image_base;
++
++  *found_sym = 0;
++  *found_dwarf = 0;
++
++  sects_view_valid = 0;
++  syms_view_valid = 0;
++  str_view_valid = 0;
++  debug_view_valid = 0;
++
++  /* Map the MS-DOS stub (if any) and extract file header offset.  */
++  if (!backtrace_get_view (state, descriptor, 0, 0x40, error_callback,
++                         data, &fhdr_view))
++    goto fail;
++
++  {
++    const char *vptr = (const char *)fhdr_view.data;
++
++    if (vptr[0] == 'M' && vptr[1] == 'Z')
++      memcpy (&fhdr_off, vptr + 0x3c, 4);
++    else
++      fhdr_off = 0;
++  }
++
++  backtrace_release_view (state, &fhdr_view, error_callback, data);
++
++  /* Map the coff file header.  */
++  if (!backtrace_get_view (state, descriptor, fhdr_off,
++                         sizeof (b_coff_file_header) + 4,
++                         error_callback, data, &fhdr_view))
++    goto fail;
++
++  if (fhdr_off != 0)
++    {
++      const char *magic = (const char *) fhdr_view.data;
++      magic_ok = memcmp (magic, "PE\0", 4) == 0;
++      fhdr_off += 4;
++
++      memcpy (&fhdr, fhdr_view.data + 4, sizeof fhdr);
++    }
++  else
++    {
++      memcpy (&fhdr, fhdr_view.data, sizeof fhdr);
++      /* TODO: test fhdr.machine for coff but non-PE platforms.  */
++      magic_ok = 0;
++    }
++  backtrace_release_view (state, &fhdr_view, error_callback, data);
++
++  if (!magic_ok)
++    {
++      error_callback (data, "executable file is not COFF", 0);
++      goto fail;
++    }
++
++  sects_num = fhdr.number_of_sections;
++  syms_num = fhdr.number_of_symbols;
++
++  opt_sects_off = fhdr_off + sizeof (fhdr);
++  opt_sects_size = (fhdr.size_of_optional_header
++                  + sects_num * sizeof (b_coff_section_header));
++
++  /* To translate PC to file/line when using DWARF, we need to find
++     the .debug_info and .debug_line sections.  */
++
++  /* Read the optional header and the section headers.  */
++
++  if (!backtrace_get_view (state, descriptor, opt_sects_off, opt_sects_size,
++                         error_callback, data, &sects_view))
++    goto fail;
++  sects_view_valid = 1;
++  opt_hdr = (const b_coff_optional_header *) sects_view.data;
++  sects = (const b_coff_section_header *)
++    (sects_view.data + fhdr.size_of_optional_header);
++
++  if (fhdr.size_of_optional_header > sizeof (*opt_hdr))
++    {
++      if (opt_hdr->magic == PE_MAGIC)
++      image_base = opt_hdr->u.pe.image_base;
++      else if (opt_hdr->magic == PEP_MAGIC)
++      image_base = opt_hdr->u.pep.image_base;
++      else
++      {
++        error_callback (data, "bad magic in PE optional header", 0);
++        goto fail;
++      }
++    }
++  else
++    image_base = 0;
++
++  /* Read the symbol table and the string table.  */
++
++  if (fhdr.pointer_to_symbol_table == 0)
++    {
++      /* No symbol table, no string table.  */
++      str_off = 0;
++      str_size = 0;
++      syms_num = 0;
++      syms_size = 0;
++    }
++  else
++    {
++      /* Symbol table is followed by the string table.  The string table
++       starts with its length (on 4 bytes).
++       Map the symbol table and the length of the string table.  */
++      syms_off = fhdr.pointer_to_symbol_table;
++      syms_size = syms_num * SYM_SZ;
++
++      if (!backtrace_get_view (state, descriptor, syms_off, syms_size + 4,
++                             error_callback, data, &syms_view))
++      goto fail;
++      syms_view_valid = 1;
++
++      memcpy (&str_size, syms_view.data + syms_size, 4);
++
++      str_off = syms_off + syms_size;
++
++      if (str_size > 4)
++      {
++        /* Map string table (including the length word).  */
++
++        if (!backtrace_get_view (state, descriptor, str_off, str_size,
++                                 error_callback, data, &str_view))
++          goto fail;
++        str_view_valid = 1;
++      }
++    }
++
++  memset (sections, 0, sizeof sections);
++
++  /* Look for the symbol table.  */
++  for (i = 0; i < sects_num; ++i)
++    {
++      const b_coff_section_header *s = sects + i;
++      unsigned int str_off;
++      int j;
++
++      if (s->name[0] == '/')
++      {
++        /* Extended section name.  */
++        str_off = atoi (s->name + 1);
++      }
++      else
++      str_off = 0;
++
++      for (j = 0; j < (int) DEBUG_MAX; ++j)
++      {
++        const char *dbg_name = debug_section_names[j];
++        int match;
++
++        if (str_off != 0)
++          match = coff_long_name_eq (dbg_name, str_off, &str_view);
++        else
++          match = coff_short_name_eq (dbg_name, s->name);
++        if (match)
++          {
++            sections[j].offset = s->pointer_to_raw_data;
++            sections[j].size = s->virtual_size <= s->size_of_raw_data ?
++              s->virtual_size : s->size_of_raw_data;
++            break;
++          }
++      }
++    }
++
++  if (syms_num != 0)
++    {
++      struct coff_syminfo_data *sdata;
++
++      sdata = ((struct coff_syminfo_data *)
++             backtrace_alloc (state, sizeof *sdata, error_callback, data));
++      if (sdata == NULL)
++      goto fail;
++
++      if (!coff_initialize_syminfo (state, image_base,
++                                  sects, sects_num,
++                                  syms_view.data, syms_size,
++                                  str_view.data, str_size,
++                                  error_callback, data, sdata))
++      {
++        backtrace_free (state, sdata, sizeof *sdata, error_callback, data);
++        goto fail;
++      }
++
++      *found_sym = 1;
++
++      coff_add_syminfo_data (state, sdata);
++    }
++
++  backtrace_release_view (state, &sects_view, error_callback, data);
++  sects_view_valid = 0;
++  backtrace_release_view (state, &syms_view, error_callback, data);
++  syms_view_valid = 0;
++
++  /* Read all the debug sections in a single view, since they are
++     probably adjacent in the file.  We never release this view.  */
++
++  min_offset = 0;
++  max_offset = 0;
++  for (i = 0; i < (int) DEBUG_MAX; ++i)
++    {
++      off_t end;
++
++      if (sections[i].size == 0)
++      continue;
++      if (min_offset == 0 || sections[i].offset < min_offset)
++      min_offset = sections[i].offset;
++      end = sections[i].offset + sections[i].size;
++      if (end > max_offset)
++      max_offset = end;
++    }
++  if (min_offset == 0 || max_offset == 0)
++    {
++      if (!backtrace_close (descriptor, error_callback, data))
++      goto fail;
++      *fileline_fn = coff_nodebug;
++      return 1;
++    }
++
++  if (!backtrace_get_view (state, descriptor, min_offset,
++                         max_offset - min_offset,
++                         error_callback, data, &debug_view))
++    goto fail;
++  debug_view_valid = 1;
++
++  /* We've read all we need from the executable.  */
++  if (!backtrace_close (descriptor, error_callback, data))
++    goto fail;
++  descriptor = -1;
++
++  for (i = 0; i < (int) DEBUG_MAX; ++i)
++    {
++      if (sections[i].size == 0)
++      sections[i].data = NULL;
++      else
++      sections[i].data = ((const unsigned char *) debug_view.data
++                          + (sections[i].offset - min_offset));
++    }
++
++  if (!backtrace_dwarf_add (state, /* base_address */ 0,
++                          sections[DEBUG_INFO].data,
++                          sections[DEBUG_INFO].size,
++                          sections[DEBUG_LINE].data,
++                          sections[DEBUG_LINE].size,
++                          sections[DEBUG_ABBREV].data,
++                          sections[DEBUG_ABBREV].size,
++                          sections[DEBUG_RANGES].data,
++                          sections[DEBUG_RANGES].size,
++                          sections[DEBUG_STR].data,
++                          sections[DEBUG_STR].size,
++                          0, /* FIXME */
++                          error_callback, data, fileline_fn))
++    goto fail;
++
++  *found_dwarf = 1;
++
++  return 1;
++
++ fail:
++  if (sects_view_valid)
++    backtrace_release_view (state, &sects_view, error_callback, data);
++  if (str_view_valid)
++    backtrace_release_view (state, &str_view, error_callback, data);
++  if (syms_view_valid)
++    backtrace_release_view (state, &syms_view, error_callback, data);
++  if (debug_view_valid)
++    backtrace_release_view (state, &debug_view, error_callback, data);
++  if (descriptor != -1)
++    backtrace_close (descriptor, error_callback, data);
++  return 0;
++}
++
++/* Initialize the backtrace data we need from an ELF executable.  At
++   the ELF level, all we need to do is find the debug info
++   sections.  */
++
++int
++backtrace_initialize (struct backtrace_state *state, int descriptor,
++                    backtrace_error_callback error_callback,
++                    void *data, fileline *fileline_fn)
++{
++  int ret;
++  int found_sym;
++  int found_dwarf;
++  fileline coff_fileline_fn;
++
++  ret = coff_add (state, descriptor, error_callback, data,
++                &coff_fileline_fn, &found_sym, &found_dwarf);
++  if (!ret)
++    return 0;
++
++  if (!state->threaded)
++    {
++      if (found_sym)
++      state->syminfo_fn = coff_syminfo;
++      else if (state->syminfo_fn == NULL)
++      state->syminfo_fn = coff_nosyms;
++    }
++  else
++    {
++      if (found_sym)
++      backtrace_atomic_store_pointer (&state->syminfo_fn, coff_syminfo);
++      else
++      __sync_bool_compare_and_swap (&state->syminfo_fn, NULL, coff_nosyms);
++    }
++
++  if (!state->threaded)
++    {
++      if (state->fileline_fn == NULL || state->fileline_fn == coff_nodebug)
++      *fileline_fn = coff_fileline_fn;
++    }
++  else
++    {
++      fileline current_fn;
++
++      current_fn = backtrace_atomic_load_pointer (&state->fileline_fn);
++      if (current_fn == NULL || current_fn == coff_nodebug)
++      *fileline_fn = coff_fileline_fn;
++    }
++
++  return 1;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..be7357e6be669e0203500b98a1e7a0677b8b27fd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,100 @@@
++/* posix.c -- POSIX file I/O routines for the backtrace library.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <errno.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <unistd.h>
++
++#include "backtrace.h"
++#include "internal.h"
++
++#ifndef O_BINARY
++#define O_BINARY 0
++#endif
++
++#ifndef O_CLOEXEC
++#define O_CLOEXEC 0
++#endif
++
++#ifndef FD_CLOEXEC
++#define FD_CLOEXEC 1
++#endif
++
++/* Open a file for reading.  */
++
++int
++backtrace_open (const char *filename, backtrace_error_callback error_callback,
++              void *data, int *does_not_exist)
++{
++  int descriptor;
++
++  if (does_not_exist != NULL)
++    *does_not_exist = 0;
++
++  descriptor = open (filename, (int) (O_RDONLY | O_BINARY | O_CLOEXEC));
++  if (descriptor < 0)
++    {
++      if (does_not_exist != NULL && errno == ENOENT)
++      *does_not_exist = 1;
++      else
++      error_callback (data, filename, errno);
++      return -1;
++    }
++
++#ifdef HAVE_FCNTL
++  /* Set FD_CLOEXEC just in case the kernel does not support
++     O_CLOEXEC. It doesn't matter if this fails for some reason.
++     FIXME: At some point it should be safe to only do this if
++     O_CLOEXEC == 0.  */
++  fcntl (descriptor, F_SETFD, FD_CLOEXEC);
++#endif
++
++  return descriptor;
++}
++
++/* Close DESCRIPTOR.  */
++
++int
++backtrace_close (int descriptor, backtrace_error_callback error_callback,
++               void *data)
++{
++  if (close (descriptor) < 0)
++    {
++      error_callback (data, "close", errno);
++      return 0;
++    }
++  return 1;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..73b8abc193338a88d74c4d3dcd753cbaa7ca5d59
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,92 @@@
++/* print.c -- Print the current backtrace.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <stdio.h>
++#include <string.h>
++#include <sys/types.h>
++
++#include "backtrace.h"
++#include "internal.h"
++
++/* Passed to callbacks.  */
++
++struct print_data
++{
++  struct backtrace_state *state;
++  FILE *f;
++};
++
++/* Print one level of a backtrace.  */
++
++static int
++print_callback (void *data, uintptr_t pc, const char *filename, int lineno,
++              const char *function)
++{
++  struct print_data *pdata = (struct print_data *) data;
++
++  fprintf (pdata->f, "0x%lx %s\n\t%s:%d\n",
++         (unsigned long) pc,
++         function == NULL ? "???" : function,
++         filename == NULL ? "???" : filename,
++         lineno);
++  return 0;
++}
++
++/* Print errors to stderr.  */
++
++static void
++error_callback (void *data, const char *msg, int errnum)
++{
++  struct print_data *pdata = (struct print_data *) data;
++
++  if (pdata->state->filename != NULL)
++    fprintf (stderr, "%s: ", pdata->state->filename);
++  fprintf (stderr, "libbacktrace: %s", msg);
++  if (errnum > 0)
++    fprintf (stderr, ": %s", strerror (errnum));
++  fputc ('\n', stderr);
++}
++
++/* Print a backtrace.  */
++
++void
++backtrace_print (struct backtrace_state *state, int skip, FILE *f)
++{
++  struct print_data data;
++
++  data.state = state;
++  data.f = f;
++  backtrace_full (state, skip + 1, print_callback, error_callback,
++                (void *) &data);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..33b68f8434c9150e22ea84770130a935783366c8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,96 @@@
++/* read.c -- File views without mmap.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <errno.h>
++#include <stdlib.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++#include "backtrace.h"
++#include "internal.h"
++
++/* This file implements file views when mmap is not available.  */
++
++/* Create a view of SIZE bytes from DESCRIPTOR at OFFSET.  */
++
++int
++backtrace_get_view (struct backtrace_state *state, int descriptor,
++                  off_t offset, size_t size,
++                  backtrace_error_callback error_callback,
++                  void *data, struct backtrace_view *view)
++{
++  ssize_t got;
++
++  if (lseek (descriptor, offset, SEEK_SET) < 0)
++    {
++      error_callback (data, "lseek", errno);
++      return 0;
++    }
++
++  view->base = backtrace_alloc (state, size, error_callback, data);
++  if (view->base == NULL)
++    return 0;
++  view->data = view->base;
++  view->len = size;
++
++  got = read (descriptor, view->base, size);
++  if (got < 0)
++    {
++      error_callback (data, "read", errno);
++      free (view->base);
++      return 0;
++    }
++
++  if ((size_t) got < size)
++    {
++      error_callback (data, "file too short", 0);
++      free (view->base);
++      return 0;
++    }
++
++  return 1;
++}
++
++/* Release a view read by backtrace_get_view.  */
++
++void
++backtrace_release_view (struct backtrace_state *state,
++                      struct backtrace_view *view,
++                      backtrace_error_callback error_callback,
++                      void *data)
++{
++  backtrace_free (state, view->base, view->len, error_callback, data);
++  view->data = NULL;
++  view->base = NULL;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..493fd6de7801fe47e6445376205c60a62c39eee2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,108 @@@
++/* simple.c -- The backtrace_simple function.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include "unwind.h"
++#include "backtrace.h"
++
++/* The simple_backtrace routine.  */
++
++/* Data passed through _Unwind_Backtrace.  */
++
++struct backtrace_simple_data
++{
++  /* Number of frames to skip.  */
++  int skip;
++  /* Library state.  */
++  struct backtrace_state *state;
++  /* Callback routine.  */
++  backtrace_simple_callback callback;
++  /* Error callback routine.  */
++  backtrace_error_callback error_callback;
++  /* Data to pass to callback routine.  */
++  void *data;
++  /* Value to return from backtrace.  */
++  int ret;
++};
++
++/* Unwind library callback routine.  This is passd to
++   _Unwind_Backtrace.  */
++
++static _Unwind_Reason_Code
++simple_unwind (struct _Unwind_Context *context, void *vdata)
++{
++  struct backtrace_simple_data *bdata = (struct backtrace_simple_data *) vdata;
++  uintptr_t pc;
++  int ip_before_insn = 0;
++
++#ifdef HAVE_GETIPINFO
++  pc = _Unwind_GetIPInfo (context, &ip_before_insn);
++#else
++  pc = _Unwind_GetIP (context);
++#endif
++
++  if (bdata->skip > 0)
++    {
++      --bdata->skip;
++      return _URC_NO_REASON;
++    }
++
++  if (!ip_before_insn)
++    --pc;
++
++  bdata->ret = bdata->callback (bdata->data, pc);
++
++  if (bdata->ret != 0)
++    return _URC_END_OF_STACK;
++
++  return _URC_NO_REASON;
++}
++
++/* Get a simple stack backtrace.  */
++
++int
++backtrace_simple (struct backtrace_state *state, int skip,
++                backtrace_simple_callback callback,
++                backtrace_error_callback error_callback, void *data)
++{
++  struct backtrace_simple_data bdata;
++
++  bdata.skip = skip + 1;
++  bdata.state = state;
++  bdata.callback = callback;
++  bdata.error_callback = error_callback;
++  bdata.data = data;
++  bdata.ret = 0;
++  _Unwind_Backtrace (simple_unwind, &bdata);
++  return bdata.ret;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f352fca5ef63ea4ea966d84ee5e5a8055aba73cf
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,108 @@@
++/* sort.c -- Sort without allocating memory
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <stddef.h>
++#include <sys/types.h>
++
++#include "backtrace.h"
++#include "internal.h"
++
++/* The GNU glibc version of qsort allocates memory, which we must not
++   do if we are invoked by a signal handler.  So provide our own
++   sort.  */
++
++static void
++swap (char *a, char *b, size_t size)
++{
++  size_t i;
++
++  for (i = 0; i < size; i++, a++, b++)
++    {
++      char t;
++
++      t = *a;
++      *a = *b;
++      *b = t;
++    }
++}
++
++void
++backtrace_qsort (void *basearg, size_t count, size_t size,
++               int (*compar) (const void *, const void *))
++{
++  char *base = (char *) basearg;
++  size_t i;
++  size_t mid;
++
++ tail_recurse:
++  if (count < 2)
++    return;
++
++  /* The symbol table and DWARF tables, which is all we use this
++     routine for, tend to be roughly sorted.  Pick the middle element
++     in the array as our pivot point, so that we are more likely to
++     cut the array in half for each recursion step.  */
++  swap (base, base + (count / 2) * size, size);
++
++  mid = 0;
++  for (i = 1; i < count; i++)
++    {
++      if ((*compar) (base, base + i * size) > 0)
++      {
++        ++mid;
++        if (i != mid)
++          swap (base + mid * size, base + i * size, size);
++      }
++    }
++
++  if (mid > 0)
++    swap (base, base + mid * size, size);
++
++  /* Recurse with the smaller array, loop with the larger one.  That
++     ensures that our maximum stack depth is log count.  */
++  if (2 * mid < count)
++    {
++      backtrace_qsort (base, mid, size, compar);
++      base += (mid + 1) * size;
++      count -= mid + 1;
++      goto tail_recurse;
++    }
++  else
++    {
++      backtrace_qsort (base + (mid + 1) * size, count - (mid + 1),
++                     size, compar);
++      count = mid;
++      goto tail_recurse;
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..361a3963cea1efc8f8f7bd197de485eba680992e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,72 @@@
++/* state.c -- Create the backtrace state.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <string.h>
++#include <sys/types.h>
++
++#include "backtrace.h"
++#include "backtrace-supported.h"
++#include "internal.h"
++
++/* Create the backtrace state.  This will then be passed to all the
++   other routines.  */
++
++struct backtrace_state *
++backtrace_create_state (const char *filename, int threaded,
++                      backtrace_error_callback error_callback,
++                      void *data)
++{
++  struct backtrace_state init_state;
++  struct backtrace_state *state;
++
++#ifndef HAVE_SYNC_FUNCTIONS
++  if (threaded)
++    {
++      error_callback (data, "backtrace library does not support threads", 0);
++      return NULL;
++    }
++#endif
++
++  memset (&init_state, 0, sizeof init_state);
++  init_state.filename = filename;
++  init_state.threaded = threaded;
++
++  state = ((struct backtrace_state *)
++         backtrace_alloc (&init_state, sizeof *state, error_callback, data));
++  if (state == NULL)
++    return NULL;
++  *state = init_state;
++
++  return state;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7a0b06d3e0b59504bf7f3f7ffda59d8867c61da4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,137 @@@
++/* stest.c -- Test for libbacktrace internal sort function
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/types.h>
++
++#include "backtrace.h"
++#include "internal.h"
++
++/* Test the local qsort implementation.  */
++
++#define MAX 10
++
++struct test
++{
++  size_t count;
++  int input[MAX];
++  int output[MAX];
++};
++
++static struct test tests[] =
++  {
++    {
++      10,
++      { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 },
++      { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }
++    },
++    {
++      9,
++      { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
++      { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
++    },
++    {
++      10,
++      { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 },
++      { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 },
++    },
++    {
++      9,
++      { 9, 8, 7, 6, 5, 4, 3, 2, 1 },
++      { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
++    },
++    {
++      10,
++      { 2, 4, 6, 8, 10, 1, 3, 5, 7, 9 },
++      { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 },
++    },
++    {
++      5,
++      { 4, 5, 3, 1, 2 },
++      { 1, 2, 3, 4, 5 },
++    },
++    {
++      5,
++      { 1, 1, 1, 1, 1 },
++      { 1, 1, 1, 1, 1 },
++    },
++    {
++      5,
++      { 1, 1, 2, 1, 1 },
++      { 1, 1, 1, 1, 2 },
++    },
++    {
++      5,
++      { 2, 1, 1, 1, 1 },
++      { 1, 1, 1, 1, 2 },
++    },
++  };
++
++static int
++compare (const void *a, const void *b)
++{
++  const int *ai = (const int *) a;
++  const int *bi = (const int *) b;
++
++  return *ai - *bi;
++}
++
++int
++main (int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
++{
++  int failures;
++  size_t i;
++  int a[MAX];
++
++  failures = 0;
++  for (i = 0; i < sizeof tests / sizeof tests[0]; i++)
++    {
++      memcpy (a, tests[i].input, tests[i].count * sizeof (int));
++      backtrace_qsort (a, tests[i].count, sizeof (int), compare);
++      if (memcmp (a, tests[i].output, tests[i].count * sizeof (int)) != 0)
++      {
++        size_t j;
++
++        fprintf (stderr, "test %d failed:", (int) i);
++        for (j = 0; j < tests[i].count; j++)
++          fprintf (stderr, " %d", a[j]);
++        fprintf (stderr, "\n");
++        ++failures;
++      }
++    }
++
++  exit (failures > 0 ? EXIT_FAILURE : EXIT_SUCCESS);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8afe65b3f1de2f9916f0655dacc9d7f26a64bdd3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,64 @@@
++/* unknown.c -- used when backtrace configury does not know file format.
++   Copyright (C) 2012-2016 Free Software Foundation, Inc.
++   Written by Ian Lance Taylor, Google.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    (1) Redistributions of source code must retain the above copyright
++    notice, this list of conditions and the following disclaimer.
++
++    (2) Redistributions in binary form must reproduce the above copyright
++    notice, this list of conditions and the following disclaimer in
++    the documentation and/or other materials provided with the
++    distribution.
++
++    (3) The name of the author may not be used to
++    endorse or promote products derived from this software without
++    specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.  */
++
++#include "config.h"
++
++#include <sys/types.h>
++
++#include "backtrace.h"
++#include "internal.h"
++
++/* A trivial routine that always fails to find fileline data.  */
++
++static int
++unknown_fileline (struct backtrace_state *state ATTRIBUTE_UNUSED,
++                uintptr_t pc, backtrace_full_callback callback,
++                backtrace_error_callback error_callback ATTRIBUTE_UNUSED,
++                void *data)
++
++{
++  return callback (data, pc, NULL, 0, NULL);
++}
++
++/* Initialize the backtrace data when we don't know how to read the
++   debug info.  */
++
++int
++backtrace_initialize (struct backtrace_state *state ATTRIBUTE_UNUSED,
++                    int descriptor ATTRIBUTE_UNUSED,
++                    backtrace_error_callback error_callback ATTRIBUTE_UNUSED,
++                    void *data ATTRIBUTE_UNUSED, fileline *fileline_fn)
++{
++  state->fileline_data = NULL;
++  *fileline_fn = unknown_fileline;
++  return 1;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fbadc7369542e2865032efe49e5e54d02206cc79
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,18 @@@
++backtrace_full __rbt_backtrace_full
++backtrace_dwarf_add __rbt_backtrace_dwarf_add
++backtrace_initialize __rbt_backtrace_initialize
++backtrace_pcinfo __rbt_backtrace_pcinfo
++backtrace_syminfo __rbt_backtrace_syminfo
++backtrace_get_view __rbt_backtrace_get_view
++backtrace_release_view __rbt_backtrace_release_view
++backtrace_alloc __rbt_backtrace_alloc
++backtrace_free __rbt_backtrace_free
++backtrace_vector_finish __rbt_backtrace_vector_finish
++backtrace_vector_grow __rbt_backtrace_vector_grow
++backtrace_vector_release __rbt_backtrace_vector_release
++backtrace_close __rbt_backtrace_close
++backtrace_open __rbt_backtrace_open
++backtrace_print __rbt_backtrace_print
++backtrace_simple __rbt_backtrace_simple
++backtrace_qsort __rbt_backtrace_qsort
++backtrace_create_state __rbt_backtrace_create_state
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16b5f3f0fcf37a4b19d90043d9fbe2001f1852bf
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..60344466a17796f9caf99751cf50381e1bb986dd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++language: rust
++rust:
++  - stable
++  - beta
++  - nightly
++sudo: false
++script:
++  - cargo build --verbose
++  - cargo test --verbose
++  - cargo doc
++after_success: |
++  [ $TRAVIS_BRANCH = master ] &&
++  [ $TRAVIS_PULL_REQUEST = false ] &&
++  [ $TRAVIS_RUST_VERSION = nightly ] &&
++  echo '<meta http-equiv=refresh content=0;url=bitflags/index.html>' > target/doc/index.html &&
++  pip install ghp-import --user $USER &&
++  $HOME/.local/bin/ghp-import -n target/doc &&
++  git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
++env:
++  global:
++    secure: d+l63TtlF6cfFVDGauYRexgx4lBww4ORqqK4Vt75nWbiCbjZYsKXbcTUdhAr193nIVGiNW50A8SekM01F3EngHwHwr6u5kFleOggm+HA0kkBVeX+k2A4WCVVfYI+gth+zk99WaF8h46MA0evhx6FYDoqeyl9oqmVifI4kaqhMwc=
++notifications:
++  email:
++    on_success: never
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..042497e9caf7d2dea2196b2e84781350d6220048
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++[package]
++
++name = "bitflags"
++version = "0.7.0"
++authors = ["The Rust Project Developers"]
++license = "MIT/Apache-2.0"
++readme = "README.md"
++repository = "https://github.com/rust-lang/bitflags"
++homepage = "https://github.com/rust-lang/bitflags"
++documentation = "https://doc.rust-lang.org/bitflags"
++description = """
++A macro to generate structures which behave like bitflags.
++"""
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16fe87b06e802f094b3fbb0894b137bca2b16ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++                              Apache License
++                        Version 2.0, January 2004
++                     http://www.apache.org/licenses/
++
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++1. Definitions.
++
++   "License" shall mean the terms and conditions for use, reproduction,
++   and distribution as defined by Sections 1 through 9 of this document.
++
++   "Licensor" shall mean the copyright owner or entity authorized by
++   the copyright owner that is granting the License.
++
++   "Legal Entity" shall mean the union of the acting entity and all
++   other entities that control, are controlled by, or are under common
++   control with that entity. For the purposes of this definition,
++   "control" means (i) the power, direct or indirect, to cause the
++   direction or management of such entity, whether by contract or
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the
++   outstanding shares, or (iii) beneficial ownership of such entity.
++
++   "You" (or "Your") shall mean an individual or Legal Entity
++   exercising permissions granted by this License.
++
++   "Source" form shall mean the preferred form for making modifications,
++   including but not limited to software source code, documentation
++   source, and configuration files.
++
++   "Object" form shall mean any form resulting from mechanical
++   transformation or translation of a Source form, including but
++   not limited to compiled object code, generated documentation,
++   and conversions to other media types.
++
++   "Work" shall mean the work of authorship, whether in Source or
++   Object form, made available under the License, as indicated by a
++   copyright notice that is included in or attached to the work
++   (an example is provided in the Appendix below).
++
++   "Derivative Works" shall mean any work, whether in Source or Object
++   form, that is based on (or derived from) the Work and for which the
++   editorial revisions, annotations, elaborations, or other modifications
++   represent, as a whole, an original work of authorship. For the purposes
++   of this License, Derivative Works shall not include works that remain
++   separable from, or merely link (or bind by name) to the interfaces of,
++   the Work and Derivative Works thereof.
++
++   "Contribution" shall mean any work of authorship, including
++   the original version of the Work and any modifications or additions
++   to that Work or Derivative Works thereof, that is intentionally
++   submitted to Licensor for inclusion in the Work by the copyright owner
++   or by an individual or Legal Entity authorized to submit on behalf of
++   the copyright owner. For the purposes of this definition, "submitted"
++   means any form of electronic, verbal, or written communication sent
++   to the Licensor or its representatives, including but not limited to
++   communication on electronic mailing lists, source code control systems,
++   and issue tracking systems that are managed by, or on behalf of, the
++   Licensor for the purpose of discussing and improving the Work, but
++   excluding communication that is conspicuously marked or otherwise
++   designated in writing by the copyright owner as "Not a Contribution."
++
++   "Contributor" shall mean Licensor and any individual or Legal Entity
++   on behalf of whom a Contribution has been received by Licensor and
++   subsequently incorporated within the Work.
++
++2. Grant of Copyright License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   copyright license to reproduce, prepare Derivative Works of,
++   publicly display, publicly perform, sublicense, and distribute the
++   Work and such Derivative Works in Source or Object form.
++
++3. Grant of Patent License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   (except as stated in this section) patent license to make, have made,
++   use, offer to sell, sell, import, and otherwise transfer the Work,
++   where such license applies only to those patent claims licensable
++   by such Contributor that are necessarily infringed by their
++   Contribution(s) alone or by combination of their Contribution(s)
++   with the Work to which such Contribution(s) was submitted. If You
++   institute patent litigation against any entity (including a
++   cross-claim or counterclaim in a lawsuit) alleging that the Work
++   or a Contribution incorporated within the Work constitutes direct
++   or contributory patent infringement, then any patent licenses
++   granted to You under this License for that Work shall terminate
++   as of the date such litigation is filed.
++
++4. Redistribution. You may reproduce and distribute copies of the
++   Work or Derivative Works thereof in any medium, with or without
++   modifications, and in Source or Object form, provided that You
++   meet the following conditions:
++
++   (a) You must give any other recipients of the Work or
++       Derivative Works a copy of this License; and
++
++   (b) You must cause any modified files to carry prominent notices
++       stating that You changed the files; and
++
++   (c) You must retain, in the Source form of any Derivative Works
++       that You distribute, all copyright, patent, trademark, and
++       attribution notices from the Source form of the Work,
++       excluding those notices that do not pertain to any part of
++       the Derivative Works; and
++
++   (d) If the Work includes a "NOTICE" text file as part of its
++       distribution, then any Derivative Works that You distribute must
++       include a readable copy of the attribution notices contained
++       within such NOTICE file, excluding those notices that do not
++       pertain to any part of the Derivative Works, in at least one
++       of the following places: within a NOTICE text file distributed
++       as part of the Derivative Works; within the Source form or
++       documentation, if provided along with the Derivative Works; or,
++       within a display generated by the Derivative Works, if and
++       wherever such third-party notices normally appear. The contents
++       of the NOTICE file are for informational purposes only and
++       do not modify the License. You may add Your own attribution
++       notices within Derivative Works that You distribute, alongside
++       or as an addendum to the NOTICE text from the Work, provided
++       that such additional attribution notices cannot be construed
++       as modifying the License.
++
++   You may add Your own copyright statement to Your modifications and
++   may provide additional or different license terms and conditions
++   for use, reproduction, or distribution of Your modifications, or
++   for any such Derivative Works as a whole, provided Your use,
++   reproduction, and distribution of the Work otherwise complies with
++   the conditions stated in this License.
++
++5. Submission of Contributions. Unless You explicitly state otherwise,
++   any Contribution intentionally submitted for inclusion in the Work
++   by You to the Licensor shall be under the terms and conditions of
++   this License, without any additional terms or conditions.
++   Notwithstanding the above, nothing herein shall supersede or modify
++   the terms of any separate license agreement you may have executed
++   with Licensor regarding such Contributions.
++
++6. Trademarks. This License does not grant permission to use the trade
++   names, trademarks, service marks, or product names of the Licensor,
++   except as required for reasonable and customary use in describing the
++   origin of the Work and reproducing the content of the NOTICE file.
++
++7. Disclaimer of Warranty. Unless required by applicable law or
++   agreed to in writing, Licensor provides the Work (and each
++   Contributor provides its Contributions) on an "AS IS" BASIS,
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++   implied, including, without limitation, any warranties or conditions
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++   PARTICULAR PURPOSE. You are solely responsible for determining the
++   appropriateness of using or redistributing the Work and assume any
++   risks associated with Your exercise of permissions under this License.
++
++8. Limitation of Liability. In no event and under no legal theory,
++   whether in tort (including negligence), contract, or otherwise,
++   unless required by applicable law (such as deliberate and grossly
++   negligent acts) or agreed to in writing, shall any Contributor be
++   liable to You for damages, including any direct, indirect, special,
++   incidental, or consequential damages of any character arising as a
++   result of this License or out of the use or inability to use the
++   Work (including but not limited to damages for loss of goodwill,
++   work stoppage, computer failure or malfunction, or any and all
++   other commercial damages or losses), even if such Contributor
++   has been advised of the possibility of such damages.
++
++9. Accepting Warranty or Additional Liability. While redistributing
++   the Work or Derivative Works thereof, You may choose to offer,
++   and charge a fee for, acceptance of support, warranty, indemnity,
++   or other liability obligations and/or rights consistent with this
++   License. However, in accepting such obligations, You may act only
++   on Your own behalf and on Your sole responsibility, not on behalf
++   of any other Contributor, and only if You agree to indemnify,
++   defend, and hold each Contributor harmless for any liability
++   incurred by, or claims asserted against, such Contributor by reason
++   of your accepting any such warranty or additional liability.
++
++END OF TERMS AND CONDITIONS
++
++APPENDIX: How to apply the Apache License to your work.
++
++   To apply the Apache License to your work, attach the following
++   boilerplate notice, with the fields enclosed by brackets "[]"
++   replaced with your own identifying information. (Don't include
++   the brackets!)  The text should be enclosed in the appropriate
++   comment syntax for the file format. We also recommend that a
++   file or class name and description of purpose be included on the
++   same "printed page" as the copyright notice for easier
++   identification within third-party archives.
++
++Copyright [yyyy] [name of copyright owner]
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++      http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39d4bdb5acd313c1a92dbeaa1c379aaf0596a315
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2014 The Rust Project Developers
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3edd8a361ef4c3e4d148dd64e10fa7dcb1286330
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++bitflags
++========
++
++A Rust macro to generate structures which behave like a set of bitflags
++
++[![Build Status](https://travis-ci.org/rust-lang-nursery/bitflags.svg?branch=master)](https://travis-ci.org/rust-lang-nursery/bitflags)
++
++[Documentation](https://doc.rust-lang.org/bitflags)
++
++## Usage
++
++Add this to your `Cargo.toml`:
++
++```toml
++[dependencies]
++bitflags = "0.6"
++```
++
++and this to your crate root:
++
++```rust
++#[macro_use]
++extern crate bitflags;
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..698799dab2eaaa2153419b53b7ffaa70ce78f5f3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,808 @@@
++// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! A typesafe bitmask flag generator.
++
++#![no_std]
++
++#[cfg(test)]
++#[macro_use]
++extern crate std;
++
++// Re-export libstd/libcore using an alias so that the macros can work in no_std
++// crates while remaining compatible with normal crates.
++#[allow(private_in_public)]
++#[doc(hidden)]
++pub use core as __core;
++
++/// The `bitflags!` macro generates a `struct` that holds a set of C-style
++/// bitmask flags. It is useful for creating typesafe wrappers for C APIs.
++///
++/// The flags should only be defined for integer types, otherwise unexpected
++/// type errors may occur at compile time.
++///
++/// # Example
++///
++/// ```{.rust}
++/// #[macro_use]
++/// extern crate bitflags;
++///
++/// bitflags! {
++///     flags Flags: u32 {
++///         const FLAG_A       = 0b00000001,
++///         const FLAG_B       = 0b00000010,
++///         const FLAG_C       = 0b00000100,
++///         const FLAG_ABC     = FLAG_A.bits
++///                            | FLAG_B.bits
++///                            | FLAG_C.bits,
++///     }
++/// }
++///
++/// fn main() {
++///     let e1 = FLAG_A | FLAG_C;
++///     let e2 = FLAG_B | FLAG_C;
++///     assert_eq!((e1 | e2), FLAG_ABC);   // union
++///     assert_eq!((e1 & e2), FLAG_C);     // intersection
++///     assert_eq!((e1 - e2), FLAG_A);     // set difference
++///     assert_eq!(!e2, FLAG_A);           // set complement
++/// }
++/// ```
++///
++/// The generated `struct`s can also be extended with type and trait
++/// implementations:
++///
++/// ```{.rust}
++/// #[macro_use]
++/// extern crate bitflags;
++///
++/// use std::fmt;
++///
++/// bitflags! {
++///     flags Flags: u32 {
++///         const FLAG_A   = 0b00000001,
++///         const FLAG_B   = 0b00000010,
++///     }
++/// }
++///
++/// impl Flags {
++///     pub fn clear(&mut self) {
++///         self.bits = 0;  // The `bits` field can be accessed from within the
++///                         // same module where the `bitflags!` macro was invoked.
++///     }
++/// }
++///
++/// impl fmt::Display for Flags {
++///     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++///         write!(f, "hi!")
++///     }
++/// }
++///
++/// fn main() {
++///     let mut flags = FLAG_A | FLAG_B;
++///     flags.clear();
++///     assert!(flags.is_empty());
++///     assert_eq!(format!("{}", flags), "hi!");
++///     assert_eq!(format!("{:?}", FLAG_A | FLAG_B), "FLAG_A | FLAG_B");
++///     assert_eq!(format!("{:?}", FLAG_B), "FLAG_B");
++/// }
++/// ```
++///
++/// # Visibility
++///
++/// The generated struct and its associated flag constants are not exported
++/// out of the current module by default. A definition can be exported out of
++/// the current module by adding `pub` before `flags`:
++///
++/// ```{.rust},ignore
++/// #[macro_use]
++/// extern crate bitflags;
++///
++/// mod example {
++///     bitflags! {
++///         pub flags Flags1: u32 {
++///             const FLAG_A   = 0b00000001,
++///         }
++///     }
++///     bitflags! {
++///         flags Flags2: u32 {
++///             const FLAG_B   = 0b00000010,
++///         }
++///     }
++/// }
++///
++/// fn main() {
++///     let flag1 = example::FLAG_A;
++///     let flag2 = example::FLAG_B; // error: const `FLAG_B` is private
++/// }
++/// ```
++///
++/// # Attributes
++///
++/// Attributes can be attached to the generated `struct` by placing them
++/// before the `flags` keyword.
++///
++/// # Trait implementations
++///
++/// The `Copy`, `Clone`, `PartialEq`, `Eq`, `PartialOrd`, `Ord` and `Hash`
++/// traits automatically derived for the `struct` using the `derive` attribute.
++/// Additional traits can be derived by providing an explicit `derive`
++/// attribute on `flags`.
++///
++/// The `Extend` and `FromIterator` traits are implemented for the `struct`,
++/// too: `Extend` adds the union of the instances of the `struct` iterated over,
++/// while `FromIterator` calculates the union.
++///
++/// The `Debug` trait is also implemented by displaying the bits value of the
++/// internal struct.
++///
++/// ## Operators
++///
++/// The following operator traits are implemented for the generated `struct`:
++///
++/// - `BitOr` and `BitOrAssign`: union
++/// - `BitAnd` and `BitAndAssign`: intersection
++/// - `BitXor` and `BitXorAssign`: toggle
++/// - `Sub` and `SubAssign`: set difference
++/// - `Not`: set complement
++///
++/// As long as the assignment operators are unstable rust feature they are only
++/// available with the crate feature `assignment_ops` enabled.
++///
++/// # Methods
++///
++/// The following methods are defined for the generated `struct`:
++///
++/// - `empty`: an empty set of flags
++/// - `all`: the set of all flags
++/// - `bits`: the raw value of the flags currently stored
++/// - `from_bits`: convert from underlying bit representation, unless that
++///                representation contains bits that do not correspond to a flag
++/// - `from_bits_truncate`: convert from underlying bit representation, dropping
++///                         any bits that do not correspond to flags
++/// - `is_empty`: `true` if no flags are currently stored
++/// - `is_all`: `true` if all flags are currently set
++/// - `intersects`: `true` if there are flags common to both `self` and `other`
++/// - `contains`: `true` all of the flags in `other` are contained within `self`
++/// - `insert`: inserts the specified flags in-place
++/// - `remove`: removes the specified flags in-place
++/// - `toggle`: the specified flags will be inserted if not present, and removed
++///             if they are.
++#[macro_export]
++macro_rules! bitflags {
++    ($(#[$attr:meta])* pub flags $BitFlags:ident: $T:ty {
++        $($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr),+
++    }) => {
++        #[derive(Copy, PartialEq, Eq, Clone, PartialOrd, Ord, Hash)]
++        $(#[$attr])*
++        pub struct $BitFlags {
++            bits: $T,
++        }
++
++        $($(#[$Flag_attr])* pub const $Flag: $BitFlags = $BitFlags { bits: $value };)+
++
++        bitflags! {
++            @_impl flags $BitFlags: $T {
++                $($(#[$Flag_attr])* const $Flag = $value),+
++            }
++        }
++    };
++    ($(#[$attr:meta])* flags $BitFlags:ident: $T:ty {
++        $($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr),+
++    }) => {
++        #[derive(Copy, PartialEq, Eq, Clone, PartialOrd, Ord, Hash)]
++        $(#[$attr])*
++        struct $BitFlags {
++            bits: $T,
++        }
++
++        $($(#[$Flag_attr])* const $Flag: $BitFlags = $BitFlags { bits: $value };)+
++
++        bitflags! {
++            @_impl flags $BitFlags: $T {
++                $($(#[$Flag_attr])* const $Flag = $value),+
++            }
++        }
++    };
++    (@_impl flags $BitFlags:ident: $T:ty {
++        $($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr),+
++    }) => {
++        impl $crate::__core::fmt::Debug for $BitFlags {
++            fn fmt(&self, f: &mut $crate::__core::fmt::Formatter) -> $crate::__core::fmt::Result {
++                // This convoluted approach is to handle #[cfg]-based flag
++                // omission correctly. Some of the $Flag variants may not be
++                // defined in this module so we create an inner module which
++                // defines *all* flags to the value of 0. We then create a
++                // second inner module that defines all of the flags with #[cfg]
++                // to their real values. Afterwards the glob will import
++                // variants from the second inner module, shadowing all
++                // defined variants, leaving only the undefined ones with the
++                // bit value of 0.
++                #[allow(dead_code)]
++                #[allow(unused_assignments)]
++                mod dummy {
++                    // We can't use the real $BitFlags struct because it may be
++                    // private, which prevents us from using it to define
++                    // public constants.
++                    pub struct $BitFlags {
++                        bits: u64,
++                    }
++                    mod real_flags {
++                        use super::$BitFlags;
++                        $($(#[$Flag_attr])* pub const $Flag: $BitFlags = $BitFlags {
++                            bits: super::super::$Flag.bits as u64
++                        };)+
++                    }
++                    // Now we define the "undefined" versions of the flags.
++                    // This way, all the names exist, even if some are #[cfg]ed
++                    // out.
++                    $(const $Flag: $BitFlags = $BitFlags { bits: 0 };)+
++
++                    #[inline]
++                    pub fn fmt(self_: u64,
++                               f: &mut $crate::__core::fmt::Formatter)
++                               -> $crate::__core::fmt::Result {
++                        // Now we import the real values for the flags.
++                        // Only ones that are #[cfg]ed out will be 0.
++                        use self::real_flags::*;
++
++                        let mut first = true;
++                        $(
++                            // $Flag.bits == 0 means that $Flag doesn't exist
++                            if $Flag.bits != 0 && self_ & $Flag.bits as u64 == $Flag.bits as u64 {
++                                if !first {
++                                    try!(f.write_str(" | "));
++                                }
++                                first = false;
++                                try!(f.write_str(stringify!($Flag)));
++                            }
++                        )+
++                        Ok(())
++                    }
++                }
++                dummy::fmt(self.bits as u64, f)
++            }
++        }
++
++        #[allow(dead_code)]
++        impl $BitFlags {
++            /// Returns an empty set of flags.
++            #[inline]
++            pub fn empty() -> $BitFlags {
++                $BitFlags { bits: 0 }
++            }
++
++            /// Returns the set containing all flags.
++            #[inline]
++            pub fn all() -> $BitFlags {
++                // See above `dummy` module for why this approach is taken.
++                #[allow(dead_code)]
++                mod dummy {
++                    pub struct $BitFlags {
++                        bits: u64,
++                    }
++                    mod real_flags {
++                        use super::$BitFlags;
++                        $($(#[$Flag_attr])* pub const $Flag: $BitFlags = $BitFlags {
++                            bits: super::super::$Flag.bits as u64
++                        };)+
++                    }
++                    $(const $Flag: $BitFlags = $BitFlags { bits: 0 };)+
++
++                    #[inline]
++                    pub fn all() -> u64 {
++                        use self::real_flags::*;
++                        $($Flag.bits)|+
++                    }
++                }
++                $BitFlags { bits: dummy::all() as $T }
++            }
++
++            /// Returns the raw value of the flags currently stored.
++            #[inline]
++            pub fn bits(&self) -> $T {
++                self.bits
++            }
++
++            /// Convert from underlying bit representation, unless that
++            /// representation contains bits that do not correspond to a flag.
++            #[inline]
++            pub fn from_bits(bits: $T) -> $crate::__core::option::Option<$BitFlags> {
++                if (bits & !$BitFlags::all().bits()) == 0 {
++                    $crate::__core::option::Option::Some($BitFlags { bits: bits })
++                } else {
++                    $crate::__core::option::Option::None
++                }
++            }
++
++            /// Convert from underlying bit representation, dropping any bits
++            /// that do not correspond to flags.
++            #[inline]
++            pub fn from_bits_truncate(bits: $T) -> $BitFlags {
++                $BitFlags { bits: bits } & $BitFlags::all()
++            }
++
++            /// Returns `true` if no flags are currently stored.
++            #[inline]
++            pub fn is_empty(&self) -> bool {
++                *self == $BitFlags::empty()
++            }
++
++            /// Returns `true` if all flags are currently set.
++            #[inline]
++            pub fn is_all(&self) -> bool {
++                *self == $BitFlags::all()
++            }
++
++            /// Returns `true` if there are flags common to both `self` and `other`.
++            #[inline]
++            pub fn intersects(&self, other: $BitFlags) -> bool {
++                !(*self & other).is_empty()
++            }
++
++            /// Returns `true` all of the flags in `other` are contained within `self`.
++            #[inline]
++            pub fn contains(&self, other: $BitFlags) -> bool {
++                (*self & other) == other
++            }
++
++            /// Inserts the specified flags in-place.
++            #[inline]
++            pub fn insert(&mut self, other: $BitFlags) {
++                self.bits |= other.bits;
++            }
++
++            /// Removes the specified flags in-place.
++            #[inline]
++            pub fn remove(&mut self, other: $BitFlags) {
++                self.bits &= !other.bits;
++            }
++
++            /// Toggles the specified flags in-place.
++            #[inline]
++            pub fn toggle(&mut self, other: $BitFlags) {
++                self.bits ^= other.bits;
++            }
++        }
++
++        impl $crate::__core::ops::BitOr for $BitFlags {
++            type Output = $BitFlags;
++
++            /// Returns the union of the two sets of flags.
++            #[inline]
++            fn bitor(self, other: $BitFlags) -> $BitFlags {
++                $BitFlags { bits: self.bits | other.bits }
++            }
++        }
++
++        impl $crate::__core::ops::BitOrAssign for $BitFlags {
++
++            /// Adds the set of flags.
++            #[inline]
++            fn bitor_assign(&mut self, other: $BitFlags) {
++                self.bits |= other.bits;
++            }
++        }
++
++        impl $crate::__core::ops::BitXor for $BitFlags {
++            type Output = $BitFlags;
++
++            /// Returns the left flags, but with all the right flags toggled.
++            #[inline]
++            fn bitxor(self, other: $BitFlags) -> $BitFlags {
++                $BitFlags { bits: self.bits ^ other.bits }
++            }
++        }
++
++        impl $crate::__core::ops::BitXorAssign for $BitFlags {
++
++            /// Toggles the set of flags.
++            #[inline]
++            fn bitxor_assign(&mut self, other: $BitFlags) {
++                self.bits ^= other.bits;
++            }
++        }
++
++        impl $crate::__core::ops::BitAnd for $BitFlags {
++            type Output = $BitFlags;
++
++            /// Returns the intersection between the two sets of flags.
++            #[inline]
++            fn bitand(self, other: $BitFlags) -> $BitFlags {
++                $BitFlags { bits: self.bits & other.bits }
++            }
++        }
++
++        impl $crate::__core::ops::BitAndAssign for $BitFlags {
++
++            /// Disables all flags disabled in the set.
++            #[inline]
++            fn bitand_assign(&mut self, other: $BitFlags) {
++                self.bits &= other.bits;
++            }
++        }
++
++        impl $crate::__core::ops::Sub for $BitFlags {
++            type Output = $BitFlags;
++
++            /// Returns the set difference of the two sets of flags.
++            #[inline]
++            fn sub(self, other: $BitFlags) -> $BitFlags {
++                $BitFlags { bits: self.bits & !other.bits }
++            }
++        }
++
++        impl $crate::__core::ops::SubAssign for $BitFlags {
++
++            /// Disables all flags enabled in the set.
++            #[inline]
++            fn sub_assign(&mut self, other: $BitFlags) {
++                self.bits &= !other.bits;
++            }
++        }
++
++        impl $crate::__core::ops::Not for $BitFlags {
++            type Output = $BitFlags;
++
++            /// Returns the complement of this set of flags.
++            #[inline]
++            fn not(self) -> $BitFlags {
++                $BitFlags { bits: !self.bits } & $BitFlags::all()
++            }
++        }
++
++        impl $crate::__core::iter::Extend<$BitFlags> for $BitFlags {
++            fn extend<T: $crate::__core::iter::IntoIterator<Item=$BitFlags>>(&mut self, iterator: T) {
++                for item in iterator {
++                    self.insert(item)
++                }
++            }
++        }
++
++        impl $crate::__core::iter::FromIterator<$BitFlags> for $BitFlags {
++            fn from_iter<T: $crate::__core::iter::IntoIterator<Item=$BitFlags>>(iterator: T) -> $BitFlags {
++                let mut result = Self::empty();
++                result.extend(iterator);
++                result
++            }
++        }
++    };
++    ($(#[$attr:meta])* pub flags $BitFlags:ident: $T:ty {
++        $($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr),+,
++    }) => {
++        bitflags! {
++            $(#[$attr])*
++            pub flags $BitFlags: $T {
++                $($(#[$Flag_attr])* const $Flag = $value),+
++            }
++        }
++    };
++    ($(#[$attr:meta])* flags $BitFlags:ident: $T:ty {
++        $($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr),+,
++    }) => {
++        bitflags! {
++            $(#[$attr])*
++            flags $BitFlags: $T {
++                $($(#[$Flag_attr])* const $Flag = $value),+
++            }
++        }
++    };
++}
++
++#[cfg(test)]
++#[allow(non_upper_case_globals, dead_code)]
++mod tests {
++    use std::hash::{SipHasher, Hash, Hasher};
++
++    bitflags! {
++        #[doc = "> The first principle is that you must not fool yourself — and"]
++        #[doc = "> you are the easiest person to fool."]
++        #[doc = "> "]
++        #[doc = "> - Richard Feynman"]
++        flags Flags: u32 {
++            const FlagA       = 0b00000001,
++            #[doc = "<pcwalton> macros are way better at generating code than trans is"]
++            const FlagB       = 0b00000010,
++            const FlagC       = 0b00000100,
++            #[doc = "* cmr bed"]
++            #[doc = "* strcat table"]
++            #[doc = "<strcat> wait what?"]
++            const FlagABC     = FlagA.bits
++                               | FlagB.bits
++                               | FlagC.bits,
++        }
++    }
++
++    bitflags! {
++        flags _CfgFlags: u32 {
++            #[cfg(windows)]
++            const _CfgA = 0b01,
++            #[cfg(unix)]
++            const _CfgB = 0b01,
++            #[cfg(windows)]
++            const _CfgC = _CfgA.bits | 0b10,
++        }
++    }
++
++    bitflags! {
++        flags AnotherSetOfFlags: i8 {
++            const AnotherFlag = -1_i8,
++        }
++    }
++
++    #[test]
++    fn test_bits(){
++        assert_eq!(Flags::empty().bits(), 0b00000000);
++        assert_eq!(FlagA.bits(), 0b00000001);
++        assert_eq!(FlagABC.bits(), 0b00000111);
++
++        assert_eq!(AnotherSetOfFlags::empty().bits(), 0b00);
++        assert_eq!(AnotherFlag.bits(), !0_i8);
++    }
++
++    #[test]
++    fn test_from_bits() {
++        assert_eq!(Flags::from_bits(0), Some(Flags::empty()));
++        assert_eq!(Flags::from_bits(0b1), Some(FlagA));
++        assert_eq!(Flags::from_bits(0b10), Some(FlagB));
++        assert_eq!(Flags::from_bits(0b11), Some(FlagA | FlagB));
++        assert_eq!(Flags::from_bits(0b1000), None);
++
++        assert_eq!(AnotherSetOfFlags::from_bits(!0_i8), Some(AnotherFlag));
++    }
++
++    #[test]
++    fn test_from_bits_truncate() {
++        assert_eq!(Flags::from_bits_truncate(0), Flags::empty());
++        assert_eq!(Flags::from_bits_truncate(0b1), FlagA);
++        assert_eq!(Flags::from_bits_truncate(0b10), FlagB);
++        assert_eq!(Flags::from_bits_truncate(0b11), (FlagA | FlagB));
++        assert_eq!(Flags::from_bits_truncate(0b1000), Flags::empty());
++        assert_eq!(Flags::from_bits_truncate(0b1001), FlagA);
++
++        assert_eq!(AnotherSetOfFlags::from_bits_truncate(0_i8), AnotherSetOfFlags::empty());
++    }
++
++    #[test]
++    fn test_is_empty(){
++        assert!(Flags::empty().is_empty());
++        assert!(!FlagA.is_empty());
++        assert!(!FlagABC.is_empty());
++
++        assert!(!AnotherFlag.is_empty());
++    }
++
++    #[test]
++    fn test_is_all() {
++        assert!(Flags::all().is_all());
++        assert!(!FlagA.is_all());
++        assert!(FlagABC.is_all());
++
++        assert!(AnotherFlag.is_all());
++    }
++
++    #[test]
++    fn test_two_empties_do_not_intersect() {
++        let e1 = Flags::empty();
++        let e2 = Flags::empty();
++        assert!(!e1.intersects(e2));
++
++        assert!(AnotherFlag.intersects(AnotherFlag));
++    }
++
++    #[test]
++    fn test_empty_does_not_intersect_with_full() {
++        let e1 = Flags::empty();
++        let e2 = FlagABC;
++        assert!(!e1.intersects(e2));
++    }
++
++    #[test]
++    fn test_disjoint_intersects() {
++        let e1 = FlagA;
++        let e2 = FlagB;
++        assert!(!e1.intersects(e2));
++    }
++
++    #[test]
++    fn test_overlapping_intersects() {
++        let e1 = FlagA;
++        let e2 = FlagA | FlagB;
++        assert!(e1.intersects(e2));
++    }
++
++    #[test]
++    fn test_contains() {
++        let e1 = FlagA;
++        let e2 = FlagA | FlagB;
++        assert!(!e1.contains(e2));
++        assert!(e2.contains(e1));
++        assert!(FlagABC.contains(e2));
++
++        assert!(AnotherFlag.contains(AnotherFlag));
++    }
++
++    #[test]
++    fn test_insert(){
++        let mut e1 = FlagA;
++        let e2 = FlagA | FlagB;
++        e1.insert(e2);
++        assert_eq!(e1, e2);
++
++        let mut e3 = AnotherSetOfFlags::empty();
++        e3.insert(AnotherFlag);
++        assert_eq!(e3, AnotherFlag);
++    }
++
++    #[test]
++    fn test_remove(){
++        let mut e1 = FlagA | FlagB;
++        let e2 = FlagA | FlagC;
++        e1.remove(e2);
++        assert_eq!(e1, FlagB);
++
++        let mut e3 = AnotherFlag;
++        e3.remove(AnotherFlag);
++        assert_eq!(e3, AnotherSetOfFlags::empty());
++    }
++
++    #[test]
++    fn test_operators() {
++        let e1 = FlagA | FlagC;
++        let e2 = FlagB | FlagC;
++        assert_eq!((e1 | e2), FlagABC);     // union
++        assert_eq!((e1 & e2), FlagC);       // intersection
++        assert_eq!((e1 - e2), FlagA);       // set difference
++        assert_eq!(!e2, FlagA);             // set complement
++        assert_eq!(e1 ^ e2, FlagA | FlagB); // toggle
++        let mut e3 = e1;
++        e3.toggle(e2);
++        assert_eq!(e3, FlagA | FlagB);
++
++        let mut m4 = AnotherSetOfFlags::empty();
++        m4.toggle(AnotherSetOfFlags::empty());
++        assert_eq!(m4, AnotherSetOfFlags::empty());
++    }
++
++    #[test]
++    fn test_assignment_operators() {
++        let mut m1 = Flags::empty();
++        let e1 = FlagA | FlagC;
++        // union
++        m1 |= FlagA;
++        assert_eq!(m1, FlagA);
++        // intersection
++        m1 &= e1;
++        assert_eq!(m1, FlagA);
++        // set difference
++        m1 -= m1;
++        assert_eq!(m1, Flags::empty());
++        // toggle
++        m1 ^= e1;
++        assert_eq!(m1, e1);
++    }
++
++    #[test]
++    fn test_extend() {
++        let mut flags;
++
++        flags = Flags::empty();
++        flags.extend([].iter().cloned());
++        assert_eq!(flags, Flags::empty());
++
++        flags = Flags::empty();
++        flags.extend([FlagA, FlagB].iter().cloned());
++        assert_eq!(flags, FlagA | FlagB);
++
++        flags = FlagA;
++        flags.extend([FlagA, FlagB].iter().cloned());
++        assert_eq!(flags, FlagA | FlagB);
++
++        flags = FlagB;
++        flags.extend([FlagA, FlagABC].iter().cloned());
++        assert_eq!(flags, FlagABC);
++    }
++
++    #[test]
++    fn test_from_iterator() {
++        assert_eq!([].iter().cloned().collect::<Flags>(), Flags::empty());
++        assert_eq!([FlagA, FlagB].iter().cloned().collect::<Flags>(), FlagA | FlagB);
++        assert_eq!([FlagA, FlagABC].iter().cloned().collect::<Flags>(), FlagABC);
++    }
++
++    #[test]
++    fn test_lt() {
++        let mut a = Flags::empty();
++        let mut b = Flags::empty();
++
++        assert!(!(a < b) && !(b < a));
++        b = FlagB;
++        assert!(a < b);
++        a = FlagC;
++        assert!(!(a < b) && b < a);
++        b = FlagC | FlagB;
++        assert!(a < b);
++    }
++
++    #[test]
++    fn test_ord() {
++        let mut a = Flags::empty();
++        let mut b = Flags::empty();
++
++        assert!(a <= b && a >= b);
++        a = FlagA;
++        assert!(a > b && a >= b);
++        assert!(b < a && b <= a);
++        b = FlagB;
++        assert!(b > a && b >= a);
++        assert!(a < b && a <= b);
++    }
++
++    fn hash<T: Hash>(t: &T) -> u64 {
++        let mut s = SipHasher::new_with_keys(0, 0);
++        t.hash(&mut s);
++        s.finish()
++    }
++
++    #[test]
++    fn test_hash() {
++        let mut x = Flags::empty();
++        let mut y = Flags::empty();
++        assert_eq!(hash(&x), hash(&y));
++        x = Flags::all();
++        y = FlagABC;
++        assert_eq!(hash(&x), hash(&y));
++    }
++
++    #[test]
++    fn test_debug() {
++        assert_eq!(format!("{:?}", FlagA | FlagB), "FlagA | FlagB");
++        assert_eq!(format!("{:?}", FlagABC), "FlagA | FlagB | FlagC | FlagABC");
++    }
++
++    mod submodule {
++        bitflags! {
++            pub flags PublicFlags: i8 {
++                const FlagX = 0,
++            }
++        }
++        bitflags! {
++            flags PrivateFlags: i8 {
++                const FlagY = 0,
++            }
++        }
++
++        #[test]
++        fn test_private() {
++            let _ = FlagY;
++        }
++    }
++
++    #[test]
++    fn test_public() {
++        let _ = submodule::FlagX;
++    }
++
++    mod t1 {
++        mod foo {
++            pub type Bar = i32;
++        }
++
++        bitflags! {
++            /// baz
++            flags Flags: foo::Bar {
++                const A       = 0b00000001,
++                #[cfg(foo)]
++                const B       = 0b00000010,
++                #[cfg(foo)]
++                const C       = 0b00000010,
++            }
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0f0c7f665fbc01f5afc2da0458f4f85d938ad36e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++#![allow(dead_code)]
++
++#[macro_use]
++extern crate bitflags;
++
++bitflags! {
++    /// baz
++    flags Flags: u32 {
++        const A       = 0b00000001,
++        #[doc = "bar"]
++        const B       = 0b00000010,
++        const C       = 0b00000100,
++        #[doc = "foo"]
++        const ABC     = A.bits | B.bits | C.bits,
++    }
++}
++
++#[test]
++fn smoke() {
++    assert_eq!(ABC, A | B | C);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..46526fd712984b8df09d7059e448a666b68ccf09
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,22 @@@
++#![allow(dead_code)]
++#![no_std]
++
++#[macro_use]
++extern crate bitflags;
++
++bitflags! {
++    /// baz
++    flags Flags: u32 {
++        const A       = 0b00000001,
++        #[doc = "bar"]
++        const B       = 0b00000010,
++        const C       = 0b00000100,
++        #[doc = "foo"]
++        const ABC     = A.bits | B.bits | C.bits,
++    }
++}
++
++#[test]
++fn smoke() {
++    assert_eq!(ABC, A | B | C);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d87627ea8235d2fa124dcc1e72127b7987cd6174
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"78ff10625fd0ac447827aa30ea8b861fead473bb60aeb73af6c1c58caf0d1299"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..067ec09c7ad8915fcb167167cfe947facc52134e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++language: rust\r
++script: cargo build --verbose && cargo test --verbose\r
++rust:\r
++  - 1.2.0\r
++  - 1.3.0\r
++  - 1.4.0\r
++  - 1.5.0\r
++  - 1.6.0\r
++  - stable\r
++  - beta\r
++  - nightly\r
++matrix:\r
++  allow_failures:\r
++    - rust: nightly\r
++branches:\r
++  except:\r
++    - /^issue-.*$/\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..42f42aa0ddc4cfc92ca81a9a1a5fad0c225ffd97
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,22 @@@
++[package]\r
++name = "conv"\r
++version = "0.3.3"\r
++authors = ["Daniel Keep <daniel.keep@gmail.com>"]\r
++\r
++description = "This crate provides a number of conversion traits with more specific semantics than those provided by 'as' or 'From'/'Into'."\r
++repository = "https://github.com/DanielKeep/rust-conv"\r
++documentation = "https://danielkeep.github.io/rust-conv/doc/conv/index.html"\r
++readme = "README.md"\r
++license = "MIT"\r
++keywords = ["from", "into", "conversion", "approximation"]\r
++\r
++exclude = [\r
++    "scripts/*",\r
++    "update-docs.py",\r
++]\r
++\r
++[dependencies]\r
++custom_derive = "0.1.2"\r
++\r
++[dev-dependencies]\r
++quickcheck = "0.2.21, < 0.2.25"\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a2af29bc7d46fd08848d295a483aed255cead60e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2015 Daniel Keep\r
++\r
++Permission is hereby granted, free of charge, to any\r
++person obtaining a copy of this software and associated\r
++documentation files (the "Software"), to deal in the\r
++Software without restriction, including without\r
++limitation the rights to use, copy, modify, merge,\r
++publish, distribute, sublicense, and/or sell copies of\r
++the Software, and to permit persons to whom the Software\r
++is furnished to do so, subject to the following\r
++conditions:\r
++\r
++The above copyright notice and this permission notice\r
++shall be included in all copies or substantial portions\r
++of the Software.\r
++\r
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF\r
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\r
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\r
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\r
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\r
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\r
++DEALINGS IN THE SOFTWARE.\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..85a1a287c9481c4275fd7edce3ea9a1ae252f792
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,129 @@@
++\r
++# `conv`\r
++\r
++This crate provides a number of conversion traits with more specific semantics than those provided by `as` or `From`/`Into`.\r
++\r
++The goal with the traits provided here is to be more specific about what generic code can rely on, as well as provide reasonably self-describing alternatives to the standard `From`/`Into` traits.  For example, the although `T: From<U>` might be satisfied in generic code, this says nothing about what *kind* of conversion that represents.\r
++\r
++In addition, `From`/`Into` provide no facility for a conversion failing, meaning that implementations may need to choose between conversions that may not be valid, or panicking; neither option is appealing in general.\r
++\r
++**Links**\r
++\r
++* [Latest Release](https://crates.io/crates/scan-rules/)\r
++* [Latest Docs](https://danielkeep.github.io/rust-scan-rules/doc/scan_rules/index.html)\r
++* [Repository](https://github.com/DanielKeep/rust-scan-rules)\r
++\r
++## Compatibility\r
++\r
++`conv` is compatible with Rust 1.2 and higher.\r
++\r
++## Examples\r
++\r
++```rust\r
++# extern crate conv;\r
++# use conv::*;\r
++# fn main() {\r
++// This *cannot* fail, so we can use `unwrap_ok` to discard the `Result`.\r
++assert_eq!(u8::value_from(0u8).unwrap_ok(), 0u8);\r
++\r
++// This *can* fail.  Specifically, it can overflow toward negative infinity.\r
++assert_eq!(u8::value_from(0i8),     Ok(0u8));\r
++assert_eq!(u8::value_from(-1i8),    Err(NegOverflow(-1)));\r
++\r
++// This can overflow in *either* direction; hence the change to `RangeError`.\r
++assert_eq!(u8::value_from(-1i16),   Err(RangeError::NegOverflow(-1)));\r
++assert_eq!(u8::value_from(0i16),    Ok(0u8));\r
++assert_eq!(u8::value_from(256i16),  Err(RangeError::PosOverflow(256)));\r
++\r
++// We can use the extension traits to simplify this a little.\r
++assert_eq!(u8::value_from(-1i16).unwrap_or_saturate(),  0u8);\r
++assert_eq!(u8::value_from(0i16).unwrap_or_saturate(),   0u8);\r
++assert_eq!(u8::value_from(256i16).unwrap_or_saturate(), 255u8);\r
++\r
++// Obviously, all integers can be "approximated" using the default scheme (it\r
++// doesn't *do* anything), but they can *also* be approximated with the\r
++// `Wrapping` scheme.\r
++assert_eq!(\r
++    <u8 as ApproxFrom<_, DefaultApprox>>::approx_from(400u16),\r
++    Err(PosOverflow(400)));\r
++assert_eq!(\r
++    <u8 as ApproxFrom<_, Wrapping>>::approx_from(400u16),\r
++    Ok(144u8));\r
++\r
++// This is rather inconvenient; as such, there are a number of convenience\r
++// extension methods available via `ConvUtil` and `ConvAsUtil`.\r
++assert_eq!(400u16.approx(),                       Err::<u8, _>(PosOverflow(400)));\r
++assert_eq!(400u16.approx_by::<Wrapping>(),        Ok::<u8, _>(144u8));\r
++assert_eq!(400u16.approx_as::<u8>(),              Err(PosOverflow(400)));\r
++assert_eq!(400u16.approx_as_by::<u8, Wrapping>(), Ok(144));\r
++\r
++// Integer -> float conversions *can* fail due to limited precision.\r
++// Once the continuous range of exactly representable integers is exceeded, the\r
++// provided implementations fail with overflow errors.\r
++assert_eq!(f32::value_from(16_777_216i32), Ok(16_777_216.0f32));\r
++assert_eq!(f32::value_from(16_777_217i32), Err(RangeError::PosOverflow(16_777_217)));\r
++\r
++// Float -> integer conversions have to be done using approximations.  Although\r
++// exact conversions are *possible*, "advertising" this with an implementation\r
++// is misleading.\r
++//\r
++// Note that `DefaultApprox` for float -> integer uses whatever rounding\r
++// mode is currently active (*i.e.* whatever `as` would do).\r
++assert_eq!(41.0f32.approx(), Ok(41u8));\r
++assert_eq!(41.3f32.approx(), Ok(41u8));\r
++assert_eq!(41.5f32.approx(), Ok(41u8));\r
++assert_eq!(41.8f32.approx(), Ok(41u8));\r
++assert_eq!(42.0f32.approx(), Ok(42u8));\r
++\r
++assert_eq!(255.0f32.approx(), Ok(255u8));\r
++assert_eq!(256.0f32.approx(), Err::<u8, _>(FloatError::PosOverflow(256.0)));\r
++\r
++// Sometimes, it can be useful to saturate the conversion from float to\r
++// integer directly, then account for NaN as input separately.  The `Saturate`\r
++// extension trait exists for this reason.\r
++assert_eq!((-23.0f32).approx_as::<u8>().saturate(), Ok(0));\r
++assert_eq!(302.0f32.approx_as::<u8>().saturate(), Ok(255u8));\r
++assert!(std::f32::NAN.approx_as::<u8>().saturate().is_err());\r
++\r
++// If you really don't care about the specific kind of error, you can just rely\r
++// on automatic conversion to `GeneralErrorKind`.\r
++fn too_many_errors() -> Result<(), GeneralErrorKind> {\r
++    assert_eq!({let r: u8 = try!(0u8.value_into()); r},  0u8);\r
++    assert_eq!({let r: u8 = try!(0i8.value_into()); r},  0u8);\r
++    assert_eq!({let r: u8 = try!(0i16.value_into()); r}, 0u8);\r
++    assert_eq!({let r: u8 = try!(0.0f32.approx()); r},   0u8);\r
++    Ok(())\r
++}\r
++# let _ = too_many_errors();\r
++# }\r
++```\r
++\r
++## Change Log\r
++\r
++### v0.3.2\r
++\r
++- Added integer ↔ `char` conversions.\r
++- Added missing `isize`/`usize` → `f32`/`f64` conversions.\r
++- Fixed the error type of `i64` → `usize` for 64-bit targets.\r
++\r
++### v0.3.1\r
++\r
++- Change to `unwrap_ok` for better codegen (thanks bluss).\r
++- Fix for Rust breaking change (code in question was dodgy anyway; thanks m4rw3r).\r
++\r
++### v0.3.0\r
++\r
++- Added an `Error` constraint to all `Err` associated types.  This will break any user-defined conversions where the `Err` type does not implement `Error`.\r
++- Renamed the `Overflow` and `Underflow` errors to `PosOverflow` and `NegOverflow` respectively.  In the context of floating point conversions, "underflow" usually means the value was too close to zero to correctly represent.\r
++\r
++### v0.2.1\r
++\r
++- Added `ConvUtil::into_as<Dst>` as a shortcut for `Into::<Dst>::into`.\r
++- Added `#[inline]` attributes.\r
++- Added `Saturate::saturate`, which can saturate `Result`s arising from over/underflow.\r
++\r
++### v0.2.0\r
++\r
++- Changed all error types to include the original input as payload.  This breaks pretty much *everything*.  Sorry about that.  On the bright side, there's now no downside to using the conversion traits for non-`Copy` types.\r
++- Added the normal rounding modes for float → int approximations: `RoundToNearest`, `RoundToNegInf`, `RoundToPosInf`, and `RoundToZero`.\r
++- `ApproxWith` is now subsumed by a pair of extension traits (`ConvUtil` and `ConvAsUtil`), that also have shortcuts for `TryInto` and `ValueInto` so that you can specify the destination type on the method.\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9e005b044bddcf273a46edaac881d4b5a796ef82
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,606 @@@
++/*!\r
++This module defines the various error types that can be produced by a failed conversion.\r
++\r
++In addition, it also defines some extension traits to make working with failable conversions more ergonomic (see the `Unwrap*` traits).\r
++*/\r
++\r
++use std::any::Any;\r
++use std::error::Error;\r
++use std::fmt::{self, Debug, Display};\r
++use misc::{Saturated, InvalidSentinel, SignedInfinity};\r
++\r
++macro_rules! Desc {\r
++    (\r
++        ($desc:expr)\r
++        pub struct $name:ident<$t:ident> $_body:tt;\r
++    ) => {\r
++        impl<$t> Display for $name<$t> {\r
++            fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {\r
++                write!(fmt, $desc)\r
++            }\r
++        }\r
++\r
++        impl<$t> Error for $name<$t> where $t: Any {\r
++            fn description(&self) -> &str {\r
++                $desc\r
++            }\r
++        }\r
++    };\r
++}\r
++\r
++macro_rules! DummyDebug {\r
++    (\r
++        () pub enum $name:ident<$t:ident> {\r
++            $(#[doc=$_doc:tt] $vname:ident($_vpay:ident),)+\r
++        }\r
++    ) => {\r
++        impl<$t> Debug for $name<$t> {\r
++            fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {\r
++                let msg = match *self {\r
++                    $($name::$vname(_) => stringify!($vname),)+\r
++                };\r
++                write!(fmt, concat!(stringify!($name), "::{}(..)"), msg)\r
++            }\r
++        }\r
++    };\r
++\r
++    (\r
++        () pub struct $name:ident<$t:ident>(pub $_pay:ident);\r
++    ) => {\r
++        impl<$t> Debug for $name<$t> {\r
++            fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {\r
++                write!(fmt, concat!(stringify!($name), "(..)"))\r
++            }\r
++        }\r
++    };\r
++}\r
++\r
++macro_rules! EnumDesc {\r
++    (\r
++        ($($vname:ident => $vdesc:expr,)+) \r
++        pub enum $name:ident $_body:tt\r
++    ) => {\r
++        impl Display for $name {\r
++            fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {\r
++                write!(fmt, "{}",\r
++                    match *self { $($name::$vname => $vdesc,)+ })\r
++            }\r
++        }\r
++\r
++        impl Error for $name {\r
++            fn description(&self) -> &str {\r
++                match *self { $($name::$vname => $vdesc,)+ }\r
++            }\r
++        }\r
++    };\r
++\r
++    (\r
++        ($($vname:ident => $vdesc:expr,)+) \r
++        pub enum $name:ident<$t:ident> $_body:tt\r
++    ) => {\r
++        impl<$t> Display for $name<$t> {\r
++            fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {\r
++                write!(fmt, "{}",\r
++                    match *self { $($name::$vname(..) => $vdesc,)+ })\r
++            }\r
++        }\r
++\r
++        impl<$t> Error for $name<$t> where $t: Any {\r
++            fn description(&self) -> &str {\r
++                match *self { $($name::$vname(..) => $vdesc,)+ }\r
++            }\r
++        }\r
++    };\r
++}\r
++\r
++macro_rules! FromName {\r
++    (\r
++        ($fname:ident)\r
++        pub enum $name:ident<$t:ident> $_body:tt\r
++    ) => {\r
++        impl<$t> From<$fname<$t>> for $name<$t> {\r
++            #[inline]\r
++            fn from(e: $fname<$t>) -> Self {\r
++                $name::$fname(e.into_inner())\r
++            }\r
++        }\r
++    };\r
++\r
++    (\r
++        ($fname:ident<$t:ident>)\r
++        pub enum $name:ident $_body:tt\r
++    ) => {\r
++        impl<$t> From<$fname<$t>> for $name {\r
++            #[inline]\r
++            fn from(_: $fname<$t>) -> Self {\r
++                $name::$fname\r
++            }\r
++        }\r
++    };\r
++}\r
++\r
++macro_rules! FromNoError {\r
++    (\r
++        () pub enum $name:ident $_body:tt\r
++    ) => {\r
++        impl From<NoError> for $name {\r
++            #[inline]\r
++            fn from(_: NoError) -> Self {\r
++                panic!(concat!("cannot convert NoError into ", stringify!($name)))\r
++            }\r
++        }\r
++    };\r
++\r
++    (\r
++        () pub enum $name:ident<$t:ident> $_body:tt\r
++    ) => {\r
++        impl<$t> From<NoError> for $name<$t> {\r
++            fn from(_: NoError) -> Self {\r
++                panic!(concat!("cannot convert NoError into ", stringify!($name)))\r
++            }\r
++        }\r
++    };\r
++\r
++    (\r
++        () pub struct $name:ident<$t:ident> $_body:tt;\r
++    ) => {\r
++        impl<$t> From<NoError> for $name<$t> {\r
++            fn from(_: NoError) -> Self {\r
++                panic!(concat!("cannot convert NoError into ", stringify!($name)))\r
++            }\r
++        }\r
++    };\r
++}\r
++\r
++macro_rules! FromRemap {\r
++    (\r
++        ($from:ident($($vname:ident),+))\r
++        pub enum $name:ident $_body:tt\r
++    ) => {\r
++        impl From<$from> for $name {\r
++            #[inline]\r
++            fn from(e: $from) -> Self {\r
++                match e {\r
++                    $($from::$vname => $name::$vname,)+\r
++                }\r
++            }\r
++        }\r
++    };\r
++\r
++    (\r
++        ($from:ident<$t:ident>($($vname:ident),+))\r
++        pub enum $name:ident $_body:tt\r
++    ) => {\r
++        impl<$t> From<$from<$t>> for $name {\r
++            #[inline]\r
++            fn from(e: $from<$t>) -> Self {\r
++                match e {\r
++                    $($from::$vname(..) => $name::$vname,)+\r
++                }\r
++            }\r
++        }\r
++    };\r
++\r
++    (\r
++        ($from:ident($($vname:ident),+))\r
++        pub enum $name:ident<$t:ident> $_body:tt\r
++    ) => {\r
++        impl<$t> From<$from<$t>> for $name<$t> {\r
++            #[inline]\r
++            fn from(e: $from<$t>) -> Self {\r
++                match e {\r
++                    $($from::$vname(v) => $name::$vname(v),)+\r
++                }\r
++            }\r
++        }\r
++    };\r
++}\r
++\r
++macro_rules! IntoInner {\r
++    (\r
++        () pub enum $name:ident<$t:ident> {\r
++            $(#[doc=$_doc:tt] $vname:ident($_vpay:ident),)+\r
++        }\r
++    ) => {\r
++        impl<$t> $name<$t> {\r
++            /// Returns the value stored in this error.\r
++            #[inline]\r
++            pub fn into_inner(self) -> $t {\r
++                match self { $($name::$vname(v))|+ => v }\r
++            }\r
++        }\r
++    };\r
++\r
++    (\r
++        () pub struct $name:ident<$t:ident>(pub $_pay:ident);\r
++    ) => {\r
++        impl<$t> $name<$t> {\r
++            /// Returns the value stored in this error.\r
++            #[inline]\r
++            pub fn into_inner(self) -> $t {\r
++                self.0\r
++            }\r
++        }\r
++    };\r
++}\r
++\r
++custom_derive!{\r
++    /**\r
++    A general error enumeration that subsumes all other conversion errors.\r
++\r
++    This exists primarily as a "catch-all" for reliably unifying various different kinds of conversion errors.\r
++    */\r
++    #[derive(\r
++        Copy, Clone, Eq, PartialEq, Ord, PartialOrd,\r
++        IntoInner, DummyDebug, FromNoError,\r
++        EnumDesc(\r
++            NegOverflow => "conversion resulted in negative overflow",\r
++            PosOverflow => "conversion resulted in positive overflow",\r
++            Unrepresentable => "could not convert unrepresentable value",\r
++        ),\r
++        FromName(Unrepresentable),\r
++        FromName(NegOverflow),\r
++        FromName(PosOverflow),\r
++        FromRemap(RangeError(NegOverflow, PosOverflow))\r
++    )]\r
++    pub enum GeneralError<T> {\r
++        /// Input was too negative for the target type.\r
++        NegOverflow(T),\r
++\r
++        /// Input was too positive for the target type.\r
++        PosOverflow(T),\r
++\r
++        /// Input was not representable in the target type.\r
++        Unrepresentable(T),\r
++    }\r
++}\r
++\r
++impl<T> From<FloatError<T>> for GeneralError<T> {\r
++    #[inline]\r
++    fn from(e: FloatError<T>) -> GeneralError<T> {\r
++        use self::FloatError as F;\r
++        use self::GeneralError as G;\r
++        match e {\r
++            F::NegOverflow(v) => G::NegOverflow(v),\r
++            F::PosOverflow(v) => G::PosOverflow(v),\r
++            F::NotANumber(v) => G::Unrepresentable(v),\r
++        }\r
++    }\r
++}\r
++\r
++custom_derive! {\r
++    /**\r
++    A general error enumeration that subsumes all other conversion errors, but discards all input payloads the errors may be carrying.\r
++\r
++    This exists primarily as a "catch-all" for reliably unifying various different kinds of conversion errors, and between different input types.\r
++    */\r
++    #[derive(\r
++        Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug,\r
++        FromNoError,\r
++        EnumDesc(\r
++            NegOverflow => "conversion resulted in negative overflow",\r
++            PosOverflow => "conversion resulted in positive overflow",\r
++            Unrepresentable => "could not convert unrepresentable value",\r
++        ),\r
++        FromName(Unrepresentable<T>),\r
++        FromName(NegOverflow<T>),\r
++        FromName(PosOverflow<T>),\r
++        FromRemap(RangeErrorKind(NegOverflow, PosOverflow)),\r
++        FromRemap(RangeError<T>(NegOverflow, PosOverflow)),\r
++        FromRemap(GeneralError<T>(NegOverflow, PosOverflow, Unrepresentable))\r
++    )]\r
++    pub enum GeneralErrorKind {\r
++        /// Input was too negative for the target type.\r
++        NegOverflow,\r
++\r
++        /// Input was too positive for the target type.\r
++        PosOverflow,\r
++\r
++        /// Input was not representable in the target type.\r
++        Unrepresentable,\r
++    }\r
++}\r
++\r
++impl<T> From<FloatError<T>> for GeneralErrorKind {\r
++    #[inline]\r
++    fn from(e: FloatError<T>) -> GeneralErrorKind {\r
++        use self::FloatError as F;\r
++        use self::GeneralErrorKind as G;\r
++        match e {\r
++            F::NegOverflow(..) => G::NegOverflow,\r
++            F::PosOverflow(..) => G::PosOverflow,\r
++            F::NotANumber(..) => G::Unrepresentable,\r
++        }\r
++    }\r
++}\r
++\r
++/**\r
++Indicates that it is not possible for the conversion to fail.\r
++\r
++You can use the [`UnwrapOk::unwrap_ok`](./trait.UnwrapOk.html#tymethod.unwrap_ok) method to discard the (statically impossible) `Err` case from a `Result<_, NoError>`, without using `Result::unwrap` (which is typically viewed as a "code smell").\r
++*/\r
++#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug)]\r
++pub enum NoError {}\r
++\r
++impl Display for NoError {\r
++    fn fmt(&self, _: &mut fmt::Formatter) -> Result<(), fmt::Error> {\r
++        unreachable!()\r
++    }\r
++}\r
++\r
++impl Error for NoError {\r
++    fn description(&self) -> &str {\r
++        unreachable!()\r
++    }\r
++}\r
++\r
++custom_derive! {\r
++    /// Indicates that the conversion failed because the value was not representable.\r
++    #[derive(\r
++        Copy, Clone, Eq, PartialEq, Ord, PartialOrd,\r
++        IntoInner, DummyDebug, FromNoError,\r
++        Desc("could not convert unrepresentable value")\r
++    )]\r
++    pub struct Unrepresentable<T>(pub T);\r
++}\r
++\r
++custom_derive! {\r
++    /// Indicates that the conversion failed due to a negative overflow.\r
++    #[derive(\r
++        Copy, Clone, Eq, PartialEq, Ord, PartialOrd,\r
++        IntoInner, DummyDebug, FromNoError,\r
++        Desc("conversion resulted in negative overflow")\r
++    )]\r
++    pub struct NegOverflow<T>(pub T);\r
++}\r
++\r
++custom_derive! {\r
++    /// Indicates that the conversion failed due to a positive overflow.\r
++    #[derive(\r
++        Copy, Clone, Eq, PartialEq, Ord, PartialOrd,\r
++        IntoInner, DummyDebug, FromNoError,\r
++        Desc("conversion resulted in positive overflow")\r
++    )]\r
++    pub struct PosOverflow<T>(pub T);\r
++}\r
++\r
++custom_derive! {\r
++    /**\r
++    Indicates that a conversion from a floating point type failed.\r
++    */\r
++    #[derive(\r
++        Copy, Clone, Eq, PartialEq, Ord, PartialOrd,\r
++        IntoInner, DummyDebug, FromNoError,\r
++        EnumDesc(\r
++            NegOverflow => "conversion resulted in negative overflow",\r
++            PosOverflow => "conversion resulted in positive overflow",\r
++            NotANumber => "conversion target does not support not-a-number",\r
++        ),\r
++        FromName(NegOverflow),\r
++        FromName(PosOverflow),\r
++        FromRemap(RangeError(NegOverflow, PosOverflow))\r
++    )]\r
++    pub enum FloatError<T> {\r
++        /// Input was too negative for the target type.\r
++        NegOverflow(T),\r
++\r
++        /// Input was too positive for the target type.\r
++        PosOverflow(T),\r
++\r
++        /// Input was not-a-number, which the target type could not represent.\r
++        NotANumber(T),\r
++    }\r
++}\r
++\r
++custom_derive! {\r
++    /**\r
++    Indicates that a conversion failed due to a range error.\r
++    */\r
++    #[derive(\r
++        Copy, Clone, Eq, PartialEq, Ord, PartialOrd,\r
++        IntoInner, DummyDebug, FromNoError,\r
++        EnumDesc(\r
++            NegOverflow => "conversion resulted in negative overflow",\r
++            PosOverflow => "conversion resulted in positive overflow",\r
++        ),\r
++        FromName(NegOverflow),\r
++        FromName(PosOverflow)\r
++    )]\r
++    pub enum RangeError<T> {\r
++        /// Input was too negative for the target type.\r
++        NegOverflow(T),\r
++\r
++        /// Input was too positive the target type.\r
++        PosOverflow(T),\r
++    }\r
++}\r
++\r
++custom_derive! {\r
++    /**\r
++    Indicates that a conversion failed due to a range error.\r
++\r
++    This is a variant of `RangeError` that does not retain the input value which caused the error.  It exists to help unify some utility methods and should not generally be used directly, unless you are targeting the `Unwrap*` traits.\r
++    */\r
++    #[derive(\r
++        Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug,\r
++        FromNoError,\r
++        EnumDesc(\r
++            NegOverflow => "conversion resulted in negative overflow",\r
++            PosOverflow => "conversion resulted in positive overflow",\r
++        ),\r
++        FromName(NegOverflow<T>),\r
++        FromName(PosOverflow<T>),\r
++        FromRemap(RangeError<T>(NegOverflow, PosOverflow))\r
++    )]\r
++    pub enum RangeErrorKind {\r
++        /// Input was too negative for the target type.\r
++        NegOverflow,\r
++\r
++        /// Input was too positive for the target type.\r
++        PosOverflow,\r
++    }\r
++}\r
++\r
++/**\r
++Saturates a `Result`.\r
++*/\r
++pub trait Saturate {\r
++    /// The result of saturating.\r
++    type Output;\r
++\r
++    /**\r
++    Replaces an overflow error with a saturated value.\r
++\r
++    Unlike `unwrap_or_saturate`, this method can be used in cases where the `Result` error type can encode failures *other* than overflow and underflow.  For example, you cannot saturate a float-to-integer conversion using `unwrap_or_saturate` as the error might be `NotANumber`, which doesn't have a meaningful saturation "direction".\r
++\r
++    The output of this method will be a `Result` where the error type *does not* contain overflow conditions.  What conditions remain must still be dealt with in some fashion.\r
++    */\r
++    fn saturate(self) -> Self::Output;\r
++}\r
++\r
++impl<T, U> Saturate for Result<T, FloatError<U>>\r
++where T: Saturated {\r
++    type Output = Result<T, Unrepresentable<U>>;\r
++\r
++    #[inline]\r
++    fn saturate(self) -> Self::Output {\r
++        use self::FloatError::*;\r
++        match self {\r
++            Ok(v) => Ok(v),\r
++            Err(NegOverflow(_)) => Ok(T::saturated_min()),\r
++            Err(PosOverflow(_)) => Ok(T::saturated_max()),\r
++            Err(NotANumber(v)) => Err(Unrepresentable(v))\r
++        }\r
++    }\r
++}\r
++\r
++impl<T, U> Saturate for Result<T, RangeError<U>>\r
++where T: Saturated {\r
++    type Output = Result<T, NoError>;\r
++\r
++    #[inline]\r
++    fn saturate(self) -> Self::Output {\r
++        use self::RangeError::*;\r
++        match self {\r
++            Ok(v) => Ok(v),\r
++            Err(NegOverflow(_)) => Ok(T::saturated_min()),\r
++            Err(PosOverflow(_)) => Ok(T::saturated_max())\r
++        }\r
++    }\r
++}\r
++\r
++impl<T> Saturate for Result<T, RangeErrorKind>\r
++where T: Saturated {\r
++    type Output = Result<T, NoError>;\r
++\r
++    #[inline]\r
++    fn saturate(self) -> Self::Output {\r
++        use self::RangeErrorKind::*;\r
++        match self {\r
++            Ok(v) => Ok(v),\r
++            Err(NegOverflow) => Ok(T::saturated_min()),\r
++            Err(PosOverflow) => Ok(T::saturated_max())\r
++        }\r
++    }\r
++}\r
++\r
++/**\r
++Safely unwrap a `Result` that cannot contain an error.\r
++*/\r
++pub trait UnwrapOk<T> {\r
++    /**\r
++    Unwraps a `Result` without possibility of failing.\r
++\r
++    Technically, this is not necessary; it's provided simply to make user code a little clearer.\r
++    */\r
++    fn unwrap_ok(self) -> T;\r
++}\r
++\r
++impl<T> UnwrapOk<T> for Result<T, NoError> {\r
++    #[inline]\r
++    fn unwrap_ok(self) -> T {\r
++        match self {\r
++            Ok(v) => v,\r
++            Err(no_error) => match no_error {},\r
++        }\r
++    }\r
++}\r
++\r
++/**\r
++Unwrap a conversion by saturating to infinity.\r
++*/\r
++pub trait UnwrapOrInf {\r
++    /// The result of unwrapping.\r
++    type Output;\r
++\r
++    /**\r
++    Either unwraps the successfully converted value, or saturates to infinity in the "direction" of overflow.\r
++    */\r
++    fn unwrap_or_inf(self) -> Self::Output;\r
++}\r
++\r
++/**\r
++Unwrap a conversion by replacing a failure with an invalid sentinel value.\r
++*/\r
++pub trait UnwrapOrInvalid {\r
++    /// The result of unwrapping.\r
++    type Output;\r
++\r
++    /**\r
++    Either unwraps the successfully converted value, or returns the output type's invalid sentinel value.\r
++    */\r
++    fn unwrap_or_invalid(self) -> Self::Output;\r
++}\r
++\r
++/**\r
++Unwrap a conversion by saturating.\r
++*/\r
++pub trait UnwrapOrSaturate {\r
++    /// The result of unwrapping.\r
++    type Output;\r
++\r
++    /**\r
++    Either unwraps the successfully converted value, or saturates in the "direction" of overflow.\r
++    */\r
++    fn unwrap_or_saturate(self) -> Self::Output;\r
++}\r
++\r
++impl<T, E> UnwrapOrInf for Result<T, E>\r
++where T: SignedInfinity, E: Into<RangeErrorKind> {\r
++    type Output = T;\r
++    #[inline]\r
++    fn unwrap_or_inf(self) -> T {\r
++        use self::RangeErrorKind::*;\r
++        match self.map_err(Into::into) {\r
++            Ok(v) => v,\r
++            Err(NegOverflow) => T::neg_infinity(),\r
++            Err(PosOverflow) => T::pos_infinity(),\r
++        }\r
++    }\r
++}\r
++\r
++impl<T, E> UnwrapOrInvalid for Result<T, E>\r
++where T: InvalidSentinel {\r
++    type Output = T;\r
++    #[inline]\r
++    fn unwrap_or_invalid(self) -> T {\r
++        match self {\r
++            Ok(v) => v,\r
++            Err(..) => T::invalid_sentinel(),\r
++        }\r
++    }\r
++}\r
++\r
++impl<T, E> UnwrapOrSaturate for Result<T, E>\r
++where T: Saturated, E: Into<RangeErrorKind> {\r
++    type Output = T;\r
++    #[inline]\r
++    fn unwrap_or_saturate(self) -> T {\r
++        use self::RangeErrorKind::*;\r
++        match self.map_err(Into::into) {\r
++            Ok(v) => v,\r
++            Err(NegOverflow) => T::saturated_min(),\r
++            Err(PosOverflow) => T::saturated_max(),\r
++        }\r
++    }\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..424ee8338fd2e848b37fbc9c7cb2dff2562cd59d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,591 @@@
++macro_rules! max_of {\r
++    ($name:ident) => { ::std::$name::MAX };\r
++}\r
++\r
++macro_rules! min_of {\r
++    ($name:ident) => { ::std::$name::MIN };\r
++}\r
++\r
++macro_rules! approx_blind {\r
++    (($($attrs:tt)*), $src:ty, $dst:ty, $scheme:ty) => {\r
++        as_item! {\r
++            $($attrs)*\r
++            impl ::ApproxFrom<$src, $scheme> for $dst {\r
++                type Err = ::errors::NoError;\r
++                #[inline]\r
++                fn approx_from(src: $src) -> Result<$dst, Self::Err> {\r
++                    Ok(src as $dst)\r
++                }\r
++            }\r
++        }\r
++    };\r
++}\r
++\r
++macro_rules! approx_z_to_dmax {\r
++    (($($attrs:tt)*), $src:ty, $dst:ident, $scheme:ty) => {\r
++        as_item! {\r
++            $($attrs)*\r
++            impl ::ApproxFrom<$src, $scheme> for $dst {\r
++                type Err = ::errors::RangeError<$src>;\r
++                #[inline]\r
++                fn approx_from(src: $src) -> Result<$dst, Self::Err> {\r
++                    if !(0 <= src) {\r
++                        return Err(::errors::RangeError::NegOverflow(src));\r
++                    }\r
++                    if !(src <= max_of!($dst) as $src) {\r
++                        return Err(::errors::RangeError::PosOverflow(src));\r
++                    }\r
++                    Ok(src as $dst)\r
++                }\r
++            }\r
++        }\r
++    };\r
++}\r
++\r
++macro_rules! approx_to_dmax {\r
++    (($($attrs:tt)*), $src:ty, $dst:ident, $scheme:ty) => {\r
++        as_item! {\r
++            $($attrs)*\r
++            impl ::ApproxFrom<$src, $scheme> for $dst {\r
++                type Err = ::errors::PosOverflow<$src>;\r
++                #[inline]\r
++                fn approx_from(src: $src) -> Result<$dst, Self::Err> {\r
++                    if !(src <= max_of!($dst) as $src) {\r
++                        return Err(::errors::PosOverflow(src));\r
++                    }\r
++                    Ok(src as $dst)\r
++                }\r
++            }\r
++        }\r
++    };\r
++}\r
++\r
++macro_rules! approx_dmin_to_dmax {\r
++    (($($attrs:tt)*), $src:ty, $dst:ident, $scheme:ty) => {\r
++        as_item! {\r
++            $($attrs)*\r
++            impl ::ApproxFrom<$src, $scheme> for $dst {\r
++                type Err = ::errors::RangeError<$src>;\r
++                #[inline]\r
++                fn approx_from(src: $src) -> Result<$dst, Self::Err> {\r
++                    if !(min_of!($dst) as $src <= src) {\r
++                        return Err(::errors::RangeError::NegOverflow(src));\r
++                    }\r
++                    if !(src <= max_of!($dst) as $src) {\r
++                        return Err(::errors::RangeError::PosOverflow(src));\r
++                    }\r
++                    Ok(src as $dst)\r
++                }\r
++            }\r
++        }\r
++    }\r
++}\r
++\r
++macro_rules! approx_z_up {\r
++    (($($attrs:tt)*), $src:ty, $dst:ident, $scheme:ty) => {\r
++        as_item! {\r
++            $($attrs)*\r
++            impl ::ApproxFrom<$src, $scheme> for $dst {\r
++                type Err = ::errors::NegOverflow<$src>;\r
++                #[inline]\r
++                fn approx_from(src: $src) -> Result<$dst, Self::Err> {\r
++                    if !(0 <= src) {\r
++                        return Err(::errors::NegOverflow(src));\r
++                    }\r
++                    Ok(src as $dst)\r
++                }\r
++            }\r
++        }\r
++    };\r
++}\r
++\r
++macro_rules! approx_dmin_to_dmax_no_nan {\r
++    (($($attrs:tt)*), $src:ty, $dst:ident, $scheme:ty) => {\r
++        approx_dmin_to_dmax_no_nan! { ($($attrs)*), $src, $dst, $scheme, approx: |s| s }\r
++    };\r
++\r
++    (($($attrs:tt)*), $src:ty, $dst:ident, $scheme:ty, approx: |$src_name:ident| $conv:expr) => {\r
++        approx_range_no_nan! {\r
++            ($($attrs)*), $src,\r
++            $dst, [min_of!($dst) as $src, max_of!($dst) as $src],\r
++            $scheme, approx: |$src_name| $conv\r
++        }\r
++    };\r
++}\r
++\r
++macro_rules! approx_range_no_nan {\r
++    (($($attrs:tt)*), $src:ty, $dst:ident, [$min:expr, $max:expr], $scheme:ty) => {\r
++        approx_range_no_nan! { ($($attrs)*), $src, $dst,  [$min, $max], $scheme, approx: |s| s }\r
++    };\r
++\r
++    (($($attrs:tt)*), $src:ty, $dst:ident, [$min:expr, $max:expr], $scheme:ty, approx: |$src_name:ident| $conv:expr) => {\r
++        as_item! {\r
++            $($attrs)*\r
++            impl ::ApproxFrom<$src, $scheme> for $dst {\r
++                type Err = ::errors::FloatError<$src>;\r
++                #[inline]\r
++                fn approx_from(src: $src) -> Result<$dst, Self::Err> {\r
++                    if src.is_nan() {\r
++                        return Err(::errors::FloatError::NotANumber(src));\r
++                    }\r
++                    let approx = { let $src_name = src; $conv };\r
++                    if !($min <= approx) {\r
++                        return Err(::errors::FloatError::NegOverflow(src));\r
++                    }\r
++                    if !(approx <= $max) {\r
++                        return Err(::errors::FloatError::PosOverflow(src));\r
++                    }\r
++                    Ok(approx as $dst)\r
++                }\r
++            }\r
++        }\r
++    };\r
++}\r
++\r
++macro_rules! num_conv {\r
++    (@ $src:ty=> $(,)*) => {};\r
++\r
++    (@ $src:ty=> #[32] $($tail:tt)*) => {\r
++        num_conv! { @ $src=> (#[cfg(target_pointer_width="32")]) $($tail)* }\r
++    };\r
++\r
++    (@ $src:ty=> #[64] $($tail:tt)*) => {\r
++        num_conv! { @ $src=> (#[cfg(target_pointer_width="64")]) $($tail)* }\r
++    };\r
++\r
++    (@ $src:ty=> e   $($tail:tt)*) => { num_conv! { @ $src=> () e   $($tail)* } };\r
++    (@ $src:ty=> n+  $($tail:tt)*) => { num_conv! { @ $src=> () n+  $($tail)* } };\r
++    (@ $src:ty=> n   $($tail:tt)*) => { num_conv! { @ $src=> () n   $($tail)* } };\r
++    (@ $src:ty=> w+  $($tail:tt)*) => { num_conv! { @ $src=> () w+  $($tail)* } };\r
++    (@ $src:ty=> w   $($tail:tt)*) => { num_conv! { @ $src=> () w   $($tail)* } };\r
++    (@ $src:ty=> aW  $($tail:tt)*) => { num_conv! { @ $src=> () aW  $($tail)* } };\r
++    (@ $src:ty=> nf  $($tail:tt)*) => { num_conv! { @ $src=> () nf  $($tail)* } };\r
++    (@ $src:ty=> fan $($tail:tt)*) => { num_conv! { @ $src=> () fan $($tail)* } };\r
++\r
++    // Exact conversion\r
++    (@ $src:ty=> ($($attrs:tt)*) e $dst:ty, $($tail:tt)*) => {\r
++        as_item! {\r
++            approx_blind! { ($($attrs)*), $src, $dst, ::DefaultApprox }\r
++            approx_blind! { ($($attrs)*), $src, $dst, ::Wrapping }\r
++\r
++            $($attrs)*\r
++            impl ::ValueFrom<$src> for $dst {\r
++                type Err = ::errors::NoError;\r
++                #[inline]\r
++                fn value_from(src: $src) -> Result<$dst, Self::Err> {\r
++                    Ok(src as $dst)\r
++                }\r
++            }\r
++        }\r
++        num_conv! { @ $src=> $($tail)* }\r
++    };\r
++\r
++    // Narrowing a signed type *into* an unsigned type where the destination type's maximum value is representable by the source type.\r
++    (@ $src:ty=> ($($attrs:tt)*) n+ $dst:ident, $($tail:tt)*) => {\r
++        as_item! {\r
++            approx_z_to_dmax! { ($($attrs)*), $src, $dst, ::DefaultApprox }\r
++            approx_blind! { ($($attrs)*), $src, $dst, ::Wrapping }\r
++\r
++            $($attrs)*\r
++            impl ::ValueFrom<$src> for $dst {\r
++                type Err = ::errors::RangeError<$src>;\r
++                #[inline]\r
++                fn value_from(src: $src) -> Result<$dst, Self::Err> {\r
++                    if !(0 <= src) {\r
++                        return Err(::errors::RangeError::NegOverflow(src));\r
++                    }\r
++                    if !(src <= max_of!($dst) as $src) {\r
++                        return Err(::errors::RangeError::PosOverflow(src));\r
++                    }\r
++                    Ok(src as $dst)\r
++                }\r
++            }\r
++        }\r
++        num_conv! { @ $src=> $($tail)* }\r
++    };\r
++\r
++    // Narrowing an unsigned type *into* a type where the destination type's maximum value is representable by the source type.\r
++    (@ $src:ty=> ($($attrs:tt)*) n- $dst:ident, $($tail:tt)*) => {\r
++        as_item! {\r
++            approx_to_dmax! { ($($attrs)*), $src, $dst, ::DefaultApprox }\r
++            approx_blind! { ($($attrs)*), $src, $dst, ::Wrapping }\r
++\r
++            $($attrs)*\r
++            impl ::ValueFrom<$src> for $dst {\r
++                type Err = ::errors::PosOverflow<$src>;\r
++                #[inline]\r
++                fn value_from(src: $src) -> Result<$dst, Self::Err> {\r
++                    if !(src <= max_of!($dst) as $src) {\r
++                        return Err(::errors::PosOverflow(src));\r
++                    }\r
++                    Ok(src as $dst)\r
++                }\r
++            }\r
++        }\r
++        num_conv! { @ $src=> $($tail)* }\r
++    };\r
++\r
++    // Narrowing where the destination type's bounds are representable by the source type.\r
++    (@ $src:ty=> ($($attrs:tt)*) n $dst:ident, $($tail:tt)*) => {\r
++        as_item! {\r
++            approx_dmin_to_dmax! { ($($attrs)*), $src, $dst, ::DefaultApprox }\r
++            approx_blind! { ($($attrs)*), $src, $dst, ::Wrapping }\r
++\r
++            $($attrs)*\r
++            impl ::ValueFrom<$src> for $dst {\r
++                type Err = ::errors::RangeError<$src>;\r
++                #[inline]\r
++                fn value_from(src: $src) -> Result<$dst, Self::Err> {\r
++                    if !(min_of!($dst) as $src <= src) {\r
++                        return Err(::errors::RangeError::NegOverflow(src));\r
++                    }\r
++                    if !(src <= max_of!($dst) as $src) {\r
++                        return Err(::errors::RangeError::PosOverflow(src));\r
++                    }\r
++                    Ok(src as $dst)\r
++                }\r
++            }\r
++        }\r
++        num_conv! { @ $src=> $($tail)* }\r
++    };\r
++\r
++    // Widening a signed type *into* an unsigned type.\r
++    (@ $src:ty=> ($($attrs:tt)*) w+ $dst:ident, $($tail:tt)*) => {\r
++        as_item! {\r
++            approx_z_up! { ($($attrs)*), $src, $dst, ::DefaultApprox }\r
++            approx_blind! { ($($attrs)*), $src, $dst, ::Wrapping }\r
++\r
++            $($attrs)*\r
++            impl ::ValueFrom<$src> for $dst {\r
++                type Err = ::errors::NegOverflow<$src>;\r
++                #[inline]\r
++                fn value_from(src: $src) -> Result<$dst, Self::Err> {\r
++                    if !(0 <= src) {\r
++                        return Err(::errors::NegOverflow(src));\r
++                    }\r
++                    Ok(src as $dst)\r
++                }\r
++            }\r
++        }\r
++        num_conv! { @ $src=> $($tail)* }\r
++    };\r
++\r
++    // Widening.\r
++    (@ $src:ty=> ($($attrs:tt)*) w $dst:ident, $($tail:tt)*) => {\r
++        as_item! {\r
++            approx_blind! { ($($attrs)*), $src, $dst, ::DefaultApprox }\r
++            approx_blind! { ($($attrs)*), $src, $dst, ::Wrapping }\r
++\r
++            $($attrs)*\r
++            impl ::ValueFrom<$src> for $dst {\r
++                type Err = ::errors::NoError;\r
++                #[inline]\r
++                fn value_from(src: $src) -> Result<$dst, Self::Err> {\r
++                    Ok(src as $dst)\r
++                }\r
++            }\r
++        }\r
++        num_conv! { @ $src=> $($tail)* }\r
++    };\r
++\r
++    // Narrowing *into* a floating-point type where the conversion is only exact within a given range.\r
++    (@ $src:ty=> ($($attrs:tt)*) nf [+- $bound:expr] $dst:ident, $($tail:tt)*) => {\r
++        as_item! {\r
++            approx_blind! { ($($attrs)*), $src, $dst, ::DefaultApprox }\r
++\r
++            $($attrs)*\r
++            impl ::ValueFrom<$src> for $dst {\r
++                type Err = ::errors::RangeError<$src>;\r
++                #[inline]\r
++                fn value_from(src: $src) -> Result<$dst, Self::Err> {\r
++                    if !(-$bound <= src) {\r
++                        return Err(::errors::RangeError::NegOverflow(src));\r
++                    }\r
++                    if !(src <= $bound) {\r
++                        return Err(::errors::RangeError::PosOverflow(src));\r
++                    }\r
++                    Ok(src as $dst)\r
++                }\r
++            }\r
++        }\r
++        num_conv! { @ $src=> $($tail)* }\r
++    };\r
++\r
++    (@ $src:ty=> ($($attrs:tt)*) nf [, $max:expr] $dst:ident, $($tail:tt)*) => {\r
++        as_item! {\r
++            approx_blind! { ($($attrs)*), $src, $dst, ::DefaultApprox }\r
++\r
++            $($attrs)*\r
++            impl ::ValueFrom<$src> for $dst {\r
++                type Err = ::errors::PosOverflow<$src>;\r
++                #[inline]\r
++                fn value_from(src: $src) -> Result<$dst, Self::Err> {\r
++                    if !(src <= $max) {\r
++                        return Err(::errors::PosOverflow(src));\r
++                    }\r
++                    Ok(src as $dst)\r
++                }\r
++            }\r
++        }\r
++        num_conv! { @ $src=> $($tail)* }\r
++    };\r
++\r
++    // Approximately narrowing a floating point value *into* a type where the source value is constrained by the given range of values.\r
++    (@ $src:ty=> ($($attrs:tt)*) fan [$min:expr, $max:expr] $dst:ident, $($tail:tt)*) => {\r
++        as_item! {\r
++            approx_range_no_nan! { ($($attrs)*), $src, $dst, [$min, $max],\r
++                ::DefaultApprox }\r
++            approx_range_no_nan! { ($($attrs)*), $src, $dst, [$min, $max],\r
++                ::RoundToNearest, approx: |s| s.round() }\r
++            approx_range_no_nan! { ($($attrs)*), $src, $dst, [$min, $max],\r
++                ::RoundToNegInf, approx: |s| s.floor() }\r
++            approx_range_no_nan! { ($($attrs)*), $src, $dst, [$min, $max],\r
++                ::RoundToPosInf, approx: |s| s.ceil() }\r
++            approx_range_no_nan! { ($($attrs)*), $src, $dst, [$min, $max],\r
++                ::RoundToZero, approx: |s| s.trunc() }\r
++        }\r
++        num_conv! { @ $src=> $($tail)* }\r
++    };\r
++\r
++    (@ $src:ty=> ($($attrs:tt)*) fan $dst:ident, $($tail:tt)*) => {\r
++        as_item! {\r
++            approx_dmin_to_dmax_no_nan! { ($($attrs)*), $src, $dst, ::DefaultApprox }\r
++            approx_dmin_to_dmax_no_nan! { ($($attrs)*), $src, $dst, ::RoundToNearest,\r
++                approx: |s| s.round() }\r
++            approx_dmin_to_dmax_no_nan! { ($($attrs)*), $src, $dst, ::RoundToNegInf,\r
++                approx: |s| s.floor() }\r
++            approx_dmin_to_dmax_no_nan! { ($($attrs)*), $src, $dst, ::RoundToPosInf,\r
++                approx: |s| s.ceil() }\r
++            approx_dmin_to_dmax_no_nan! { ($($attrs)*), $src, $dst, ::RoundToZero,\r
++                approx: |s| s.trunc() }\r
++        }\r
++        num_conv! { @ $src=> $($tail)* }\r
++    };\r
++\r
++    ($src:ty=> $($tail:tt)*) => {\r
++        num_conv! { @ $src=> $($tail)*, }\r
++    };\r
++}\r
++\r
++mod lang_ints {\r
++    num_conv! { i8=>  w i16, w i32, w i64, w+u8, w+u16, w+u32, w+u64, w isize, w+usize }\r
++    num_conv! { i16=> n i8, w i32, w i64, n+u8, w+u16, w+u32, w+u64, w isize, w+usize }\r
++    num_conv! { i32=> n i8, n i16, w i64, n+u8, n+u16, w+u32, w+u64 }\r
++    num_conv! { i64=> n i8, n i16, n i32, n+u8, n+u16, n+u32, w+u64 }\r
++    num_conv! { i32=> #[32] e isize, #[64] w isize, w+usize }\r
++    num_conv! { i64=> #[32] n isize, #[64] e isize, #[32] n+usize, #[64] w+usize }\r
++\r
++    num_conv! { u8=> n-i8, w i16, w i32, w i64, w u16, w u32, w u64, w isize, w usize }\r
++    num_conv! { u16=> n-i8, n-i16, w i32, w i64, n-u8, w u32, w u64, w isize, w usize }\r
++    num_conv! { u32=> n-i8, n-i16, n-i32, w i64, n-u8, n-u16, w u64 }\r
++    num_conv! { u64=> n-i8, n-i16, n-i32, n-i64, n-u8, n-u16, n-u32 }\r
++    num_conv! { u32=> #[32] n-isize, #[64] w isize, #[32] e usize, #[64] w usize }\r
++    num_conv! { u64=> n-isize, #[32] n-usize, #[64] e usize }\r
++\r
++    num_conv! { isize=> n i8, n i16, #[32] e i32, #[32] w i64, #[64] n i32, #[64] e i64 }\r
++    num_conv! { isize=> n+u8, n+u16, #[32] w+u32, #[32] w+u64, #[64] n+u32, #[64] w+u64 }\r
++    num_conv! { isize=> w+usize }\r
++\r
++    num_conv! { usize=> n-i8, n-i16, #[32] n-i32, #[32] w i64, #[64] n-i32, #[64] n-i64 }\r
++    num_conv! { usize=> n-u8, n-u16, #[32] e u32, #[32] w u64, #[64] n-u32, #[64] e u64 }\r
++    num_conv! { usize=> n-isize }\r
++}\r
++\r
++mod lang_floats {\r
++    use {ApproxFrom, ApproxScheme};\r
++    use ValueFrom;\r
++    use errors::{NoError, RangeError};\r
++\r
++    // f32 -> f64: strictly widening\r
++    impl<Scheme> ApproxFrom<f32, Scheme> for f64\r
++    where Scheme: ApproxScheme {\r
++        type Err = NoError;\r
++        #[inline]\r
++        fn approx_from(src: f32) -> Result<f64, Self::Err> {\r
++            Ok(src as f64)\r
++        }\r
++    }\r
++\r
++    impl ValueFrom<f32> for f64 {\r
++        type Err = NoError;\r
++        #[inline]\r
++        fn value_from(src: f32) -> Result<f64, Self::Err> {\r
++            Ok(src as f64)\r
++        }\r
++    }\r
++\r
++    // f64 -> f32: narrowing, approximate\r
++    impl ApproxFrom<f64> for f32 {\r
++        type Err = RangeError<f64>;\r
++        #[inline]\r
++        fn approx_from(src: f64) -> Result<f32, Self::Err> {\r
++            if !src.is_finite() {\r
++                return Ok(src as f32);\r
++            }\r
++            if !(::std::f32::MIN as f64 <= src) {\r
++                return Err(RangeError::NegOverflow(src));\r
++            }\r
++            if !(src <= ::std::f32::MAX as f64) {\r
++                return Err(RangeError::PosOverflow(src));\r
++            }\r
++            Ok(src as f32)\r
++        }\r
++    }\r
++}\r
++\r
++mod lang_int_to_float {\r
++    num_conv! { i8=>  w f32, w f64 }\r
++    num_conv! { i16=> w f32, w f64 }\r
++    num_conv! { i32=> nf [+- 16_777_216] f32, w f64 }\r
++    num_conv! { i64=> nf [+- 16_777_216] f32, nf [+- 9_007_199_254_740_992] f64 }\r
++\r
++    num_conv! { u8=>  w f32, w f64 }\r
++    num_conv! { u16=> w f32, w f64 }\r
++    num_conv! { u32=> nf [, 16_777_216] f32, w f64 }\r
++    num_conv! { u64=> nf [, 16_777_216] f32, nf [, 9_007_199_254_740_992] f64 }\r
++\r
++    num_conv! { isize=> nf [+- 16_777_216] f32,\r
++        #[32] w f64, #[64] nf [+- 9_007_199_254_740_992] f64 }\r
++    num_conv! { usize=> nf [, 16_777_216] f32,\r
++        #[32] w f64, #[64] nf [, 9_007_199_254_740_992] f64 }\r
++}\r
++\r
++mod lang_float_to_int {\r
++    /*\r
++    We use explicit ranges on narrowing float-to-int conversions because it *turns out* that just because you can cast an integer to a float, this *does not* mean you can cast it back and get the original input.  The non-explicit-range implementation of `fan` *depends* on this, so it was kinda *totally broken* for narrowing conversions.\r
++\r
++    *Yeah.*  That's floating point for you!\r
++    */\r
++    num_conv! { f32=> fan i8, fan i16,\r
++        fan [-2.1474836e9, 2.1474835e9] i32,\r
++        fan [-9.223372e18, 9.2233715e18] i64 }\r
++    num_conv! { f32=> fan u8, fan u16,\r
++        fan [0.0, 4.294967e9] u32,\r
++        fan [0.0, 1.8446743e19] u64 }\r
++    num_conv! { f32=>\r
++        #[32] fan [-2.1474836e9, 2.1474835e9] isize,\r
++        #[32] fan [0.0, 4.294967e9] usize,\r
++        #[64] fan [-9.223372e18, 9.2233715e18] isize,\r
++        #[64] fan [0.0, 1.8446743e19] usize }\r
++\r
++    num_conv! { f64=> fan i8, fan i16, fan i32,\r
++        fan [-9.223372036854776e18, 9.223372036854775e18] i64 }\r
++    num_conv! { f64=> fan u8, fan u16, fan u32,\r
++        fan [0.0, 1.844674407370955e19] u64 }\r
++    num_conv! { f64=>\r
++        #[32] fan isize, #[32] fan usize,\r
++        #[64] fan [-9.223372036854776e18, 9.223372036854775e18] isize,\r
++        #[64] fan [0.0, 1.844674407370955e19] usize }\r
++}\r
++\r
++mod lang_char_to_int {\r
++    use TryFrom;\r
++    use ValueFrom;\r
++    use errors::{NoError, PosOverflow};\r
++\r
++    impl TryFrom<char> for u32 {\r
++        type Err = NoError;\r
++        #[inline]\r
++        fn try_from(src: char) -> Result<u32, Self::Err> {\r
++            Ok(src as u32)\r
++        }\r
++    }\r
++\r
++    impl TryFrom<char> for usize {\r
++        type Err = NoError;\r
++        #[inline]\r
++        fn try_from(src: char) -> Result<usize, Self::Err> {\r
++            Ok(src as usize)\r
++        }\r
++    }\r
++\r
++    impl TryFrom<char> for isize {\r
++        type Err = NoError;\r
++        #[inline]\r
++        fn try_from(src: char) -> Result<isize, Self::Err> {\r
++            Ok(src as isize)\r
++        }\r
++    }\r
++\r
++    macro_rules! conv_char_to_int {\r
++        ($($ts:ty),* $(,)*) => {\r
++            $(\r
++                impl TryFrom<char> for $ts {\r
++                    type Err = PosOverflow<char>;\r
++                    #[inline]\r
++                    fn try_from(src: char) -> Result<$ts, Self::Err> {\r
++                        <$ts as ValueFrom<_>>::value_from(src as u32)\r
++                            .map_err(|_| PosOverflow(src))\r
++                    }\r
++                }\r
++            )*\r
++        };\r
++    }\r
++\r
++    macro_rules! conv_char_to_int_wide {\r
++        ($($ts:ty),* $(,)*) => {\r
++            $(\r
++                impl TryFrom<char> for $ts {\r
++                    type Err = NoError;\r
++                    #[inline]\r
++                    fn try_from(src: char) -> Result<$ts, Self::Err> {\r
++                        <$ts as ValueFrom<_>>::value_from(src as u32)\r
++                    }\r
++                }\r
++            )*\r
++        };\r
++    }\r
++\r
++    conv_char_to_int! { i8, i16, i32, u8, u16 }\r
++    conv_char_to_int_wide! { i64, u64 }\r
++}\r
++\r
++mod lang_int_to_char {\r
++    use TryFrom;\r
++    use ValueFrom;\r
++    use errors::{NoError, Unrepresentable, UnwrapOk};\r
++\r
++    impl TryFrom<u8> for char {\r
++        type Err = NoError;\r
++        #[inline]\r
++        fn try_from(src: u8) -> Result<char, Self::Err> {\r
++            Ok(src as char)\r
++        }\r
++    }\r
++    impl TryFrom<u16> for char {\r
++        type Err = Unrepresentable<u16>;\r
++        #[inline]\r
++        fn try_from(src: u16) -> Result<char, Self::Err> {\r
++            TryFrom::try_from(\r
++                <u32 as ValueFrom<_>>::value_from(src).unwrap_ok()\r
++            ).map_err(|_| Unrepresentable(src))\r
++        }\r
++    }\r
++\r
++    impl TryFrom<u32> for char {\r
++        type Err = Unrepresentable<u32>;\r
++        #[inline]\r
++        fn try_from(src: u32) -> Result<char, Self::Err> {\r
++            ::std::char::from_u32(src).ok_or_else(|| Unrepresentable(src))\r
++        }\r
++    }\r
++\r
++    macro_rules! conv_int_to_char {\r
++        ($($ts:ty),* $(,)*) => {\r
++            $(\r
++                impl TryFrom<$ts> for char {\r
++                    type Err = Unrepresentable<$ts>;\r
++                    #[inline]\r
++                    fn try_from(src: $ts) -> Result<char, Self::Err> {\r
++                        <u32 as ValueFrom<_>>::value_from(src)\r
++                            .map_err(|_| Unrepresentable(src))\r
++                            .and_then(|usv| TryFrom::try_from(usv)\r
++                                .map_err(|_| Unrepresentable(src)))\r
++                    }\r
++                }\r
++            )*\r
++        };\r
++    }\r
++\r
++    conv_int_to_char! { i8, i16, i32, i64, isize, u64, usize }\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..195b8d10fffb3fbf90ab54db1e6dbe8d1ddebfa3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,525 @@@
++/*!\r
++This crate provides a number of conversion traits with more specific semantics than those provided by `as` or `From`/`Into`.\r
++\r
++The goal with the traits provided here is to be more specific about what generic code can rely on, as well as provide reasonably self-describing alternatives to the standard `From`/`Into` traits.  For example, the although `T: From<U>` might be satisfied, it imposes no restrictions on the *kind* of conversion being implemented.  As such, the traits in this crate try to be very specific about what conversions are allowed.  This makes them less generally applicable, but more useful where they *do* apply.\r
++\r
++In addition, `From`/`Into` requires all conversions to succeed or panic.  All conversion traits in this crate define an associated error type, allowing code to react to failed conversions as appropriate.\r
++\r
++<style type="text/css">\r
++.link-block { font-family: "Fira Sans"; }\r
++.link-block > p { display: inline-block; }\r
++.link-block > p > strong { font-weight: 500; margin-right: 1em; }\r
++.link-block > ul { display: inline-block; padding: 0; list-style: none; }\r
++.link-block > ul > li {\r
++  font-size: 0.8em;\r
++  background-color: #eee;\r
++  border: 1px solid #ccc;\r
++  padding: 0.3em;\r
++  display: inline-block;\r
++}\r
++</style>\r
++<span></span><div class="link-block">\r
++\r
++**Links**\r
++\r
++* [Latest Release](https://crates.io/crates/scan-rules/)\r
++* [Latest Docs](https://danielkeep.github.io/rust-scan-rules/doc/scan_rules/index.html)\r
++* [Repository](https://github.com/DanielKeep/rust-scan-rules)\r
++\r
++<span></span></div>\r
++\r
++## Compatibility\r
++\r
++`conv` is compatible with Rust 1.2 and higher.\r
++\r
++## Change Log\r
++\r
++### v0.3.2\r
++\r
++- Added integer ↔ `char` conversions.\r
++- Added missing `isize`/`usize` → `f32`/`f64` conversions.\r
++- Fixed the error type of `i64` → `usize` for 64-bit targets.\r
++\r
++### v0.3.1\r
++\r
++- Change to `unwrap_ok` for better codegen (thanks bluss).\r
++- Fix for Rust breaking change (code in question was dodgy anyway; thanks m4rw3r).\r
++\r
++### v0.3.0\r
++\r
++- Added an `Error` constraint to all `Err` associated types.  This will break any user-defined conversions where the `Err` type does not implement `Error`.\r
++- Renamed the `Overflow` and `Underflow` errors to `PosOverflow` and `NegOverflow` respectively.  In the context of floating point conversions, "underflow" usually means the value was too close to zero to correctly represent.\r
++\r
++### v0.2.1\r
++\r
++- Added `ConvUtil::into_as<Dst>` as a shortcut for `Into::<Dst>::into`.\r
++- Added `#[inline]` attributes.\r
++- Added `Saturate::saturate`, which can saturate `Result`s arising from over/underflow.\r
++\r
++### v0.2.0\r
++\r
++- Changed all error types to include the original input as payload.  This breaks pretty much *everything*.  Sorry about that.  On the bright side, there's now no downside to using the conversion traits for non-`Copy` types.\r
++- Added the normal rounding modes for float → int approximations: `RoundToNearest`, `RoundToNegInf`, `RoundToPosInf`, and `RoundToZero`.\r
++- `ApproxWith` is now subsumed by a pair of extension traits (`ConvUtil` and `ConvAsUtil`), that also have shortcuts for `TryInto` and `ValueInto` so that you can specify the destination type on the method.\r
++\r
++# Overview\r
++\r
++The following traits are used to define various conversion semantics:\r
++\r
++- [`ApproxFrom`](./trait.ApproxFrom.html)/[`ApproxInto`](./trait.ApproxInto.html) - approximate conversions, with selectable approximation scheme (see [`ApproxScheme`](./trait.ApproxScheme.html)).\r
++- [`TryFrom`](./trait.TryFrom.html)/[`TryInto`](./trait.TryInto.html) - general, potentially failing value conversions.\r
++- [`ValueFrom`](./trait.ValueFrom.html)/[`ValueInto`](./trait.ValueInto.html) - exact, value-preserving conversions.\r
++\r
++When *defining* a conversion, try to implement the `*From` trait variant where possible.  When *using* a conversion, try to depend on the `*Into` trait variant where possible.  This is because the `*Into` traits automatically use `*From` implementations, but not the reverse.  Implementing `*From` and using `*Into` ensures conversions work in as many contexts as possible.\r
++\r
++These extension methods are provided to help with some common cases:\r
++\r
++- [`ConvUtil::approx_as<Dst>`](./trait.ConvUtil.html#method.approx_as) - approximates to `Dst` with the `DefaultApprox` scheme.\r
++- [`ConvUtil::approx_as_by<Dst, S>`](./trait.ConvUtil.html#method.approx_as_by) - approximates to `Dst` with the scheme `S`.\r
++- [`ConvUtil::into_as<Dst>`](./trait.ConvUtil.html#method.into_as) - converts to `Dst` using `Into::into`.\r
++- [`ConvUtil::try_as<Dst>`](./trait.ConvUtil.html#method.try_as) - converts to `Dst` using `TryInto::try_into`.\r
++- [`ConvUtil::value_as<Dst>`](./trait.ConvUtil.html#method.value_as) - converts to `Dst` using `ValueInto::value_into`.\r
++- [`ConvAsUtil::approx`](./trait.ConvAsUtil.html#method.approx) - approximates to an inferred destination type with the `DefaultApprox` scheme.\r
++- [`ConvAsUtil::approx_by<S>`](./trait.ConvAsUtil.html#method.approx_by) - approximates to an inferred destination type with the scheme `S`.\r
++- [`Saturate::saturate`](./errors/trait.Saturate.html#tymethod.saturate) - saturates on overflow.\r
++- [`UnwrapOk::unwrap_ok`](./errors/trait.UnwrapOk.html#tymethod.unwrap_ok) - unwraps results from conversions that cannot fail.\r
++- [`UnwrapOrInf::unwrap_or_inf`](./errors/trait.UnwrapOrInf.html#tymethod.unwrap_or_inf) - saturates to ±∞ on failure.\r
++- [`UnwrapOrInvalid::unwrap_or_invalid`](./errors/trait.UnwrapOrInvalid.html#tymethod.unwrap_or_invalid) - substitutes the target type's "invalid" sentinel value on failure.\r
++- [`UnwrapOrSaturate::unwrap_or_saturate`](./errors/trait.UnwrapOrSaturate.html#tymethod.unwrap_or_saturate) - saturates to the maximum or minimum value of the target type on failure.\r
++\r
++A macro is provided to assist in implementing conversions:\r
++\r
++- [`TryFrom!`](./macros/index.html#tryfrom!) - derives an implementation of [`TryFrom`](./trait.TryFrom.html).\r
++\r
++If you are implementing your own types, you may also be interested in the traits contained in the [`misc`](./misc/index.html) module.\r
++\r
++## Provided Implementations\r
++\r
++The crate provides several blanket implementations:\r
++\r
++- `*From<A> for A` (all types can be converted from and into themselves).\r
++- `*Into<Dst> for Src where Dst: *From<Src>` (`*From` implementations imply a matching `*Into` implementation).\r
++\r
++Conversions for the builtin numeric (integer and floating point) types are provided.  In general, `ValueFrom` conversions exist for all pairs except for float → integer (since such a conversion is generally unlikely to *exactly* succeed) and `f64 → f32` (for the same reason).  `ApproxFrom` conversions with the `DefaultApprox` scheme exist between all pairs.  `ApproxFrom` with the `Wrapping` scheme exist between integers.\r
++\r
++## Errors\r
++\r
++A number of error types are defined in the [`errors`](./errors/index.html) module.  Generally, conversions use whichever error type most *narrowly* defines the kinds of failures that can occur.  For example:\r
++\r
++- `ValueFrom<u8> for u16` cannot possibly fail, and as such it uses `NoError`.\r
++- `ValueFrom<i8> for u16` can *only* fail with a negative overflow, thus it uses the `NegOverflow` type.\r
++- `ValueFrom<i32> for u16` can overflow in either direction, hence it uses `RangeError`.\r
++- Finally, `ApproxFrom<f32> for u16` can overflow (positive or negative), or attempt to convert NaN; `FloatError` covers those three cases.\r
++\r
++Because there are *numerous* error types, the `GeneralError` enum is provided.  `From<E, T> for GeneralError<T>` exists for each error type `E<T>` defined by this crate (even for `NoError`!), allowing errors to be translated automatically by `try!`.  In fact, all errors can be "expanded" to *all* more general forms (*e.g.* `NoError` → `NegOverflow`, `PosOverflow` → `RangeError` → `FloatError`).\r
++\r
++Aside from `NoError`, the various error types wrap the input value that you attempted to convert.  This is so that non-`Copy` types do not need to be pre-emptively cloned prior to conversion, just in case the conversion fails.  A downside is that this means there are many, *many* incompatible error types.\r
++\r
++To help alleviate this, there is also `GeneralErrorKind`, which is simply `GeneralError<T>` without the payload, and all errors can be converted into it directly.\r
++\r
++The reason for not just using `GeneralErrorKind` in the first place is to statically reduce the number of potential error cases you need to deal with.  It also allows the `Unwrap*` extension traits to be defined *without* the possibility for runtime failure (*e.g.* you cannot use `unwrap_or_saturate` with a `FloatError`, because what do you do if the error is `NotANumber`; saturate to max or to min?  Or panic?).\r
++\r
++# Examples\r
++\r
++```\r
++# extern crate conv;\r
++# use conv::*;\r
++# fn main() {\r
++// This *cannot* fail, so we can use `unwrap_ok` to discard the `Result`.\r
++assert_eq!(u8::value_from(0u8).unwrap_ok(), 0u8);\r
++\r
++// This *can* fail.  Specifically, it can overflow toward negative infinity.\r
++assert_eq!(u8::value_from(0i8),     Ok(0u8));\r
++assert_eq!(u8::value_from(-1i8),    Err(NegOverflow(-1)));\r
++\r
++// This can overflow in *either* direction; hence the change to `RangeError`.\r
++assert_eq!(u8::value_from(-1i16),   Err(RangeError::NegOverflow(-1)));\r
++assert_eq!(u8::value_from(0i16),    Ok(0u8));\r
++assert_eq!(u8::value_from(256i16),  Err(RangeError::PosOverflow(256)));\r
++\r
++// We can use the extension traits to simplify this a little.\r
++assert_eq!(u8::value_from(-1i16).unwrap_or_saturate(),  0u8);\r
++assert_eq!(u8::value_from(0i16).unwrap_or_saturate(),   0u8);\r
++assert_eq!(u8::value_from(256i16).unwrap_or_saturate(), 255u8);\r
++\r
++// Obviously, all integers can be "approximated" using the default scheme (it\r
++// doesn't *do* anything), but they can *also* be approximated with the\r
++// `Wrapping` scheme.\r
++assert_eq!(\r
++    <u8 as ApproxFrom<_, DefaultApprox>>::approx_from(400u16),\r
++    Err(PosOverflow(400)));\r
++assert_eq!(\r
++    <u8 as ApproxFrom<_, Wrapping>>::approx_from(400u16),\r
++    Ok(144u8));\r
++\r
++// This is rather inconvenient; as such, there are a number of convenience\r
++// extension methods available via `ConvUtil` and `ConvAsUtil`.\r
++assert_eq!(400u16.approx(),                       Err::<u8, _>(PosOverflow(400)));\r
++assert_eq!(400u16.approx_by::<Wrapping>(),        Ok::<u8, _>(144u8));\r
++assert_eq!(400u16.approx_as::<u8>(),              Err(PosOverflow(400)));\r
++assert_eq!(400u16.approx_as_by::<u8, Wrapping>(), Ok(144));\r
++\r
++// Integer -> float conversions *can* fail due to limited precision.\r
++// Once the continuous range of exactly representable integers is exceeded, the\r
++// provided implementations fail with overflow errors.\r
++assert_eq!(f32::value_from(16_777_216i32), Ok(16_777_216.0f32));\r
++assert_eq!(f32::value_from(16_777_217i32), Err(RangeError::PosOverflow(16_777_217)));\r
++\r
++// Float -> integer conversions have to be done using approximations.  Although\r
++// exact conversions are *possible*, "advertising" this with an implementation\r
++// is misleading.\r
++//\r
++// Note that `DefaultApprox` for float -> integer uses whatever rounding\r
++// mode is currently active (*i.e.* whatever `as` would do).\r
++assert_eq!(41.0f32.approx(), Ok(41u8));\r
++assert_eq!(41.3f32.approx(), Ok(41u8));\r
++assert_eq!(41.5f32.approx(), Ok(41u8));\r
++assert_eq!(41.8f32.approx(), Ok(41u8));\r
++assert_eq!(42.0f32.approx(), Ok(42u8));\r
++\r
++assert_eq!(255.0f32.approx(), Ok(255u8));\r
++assert_eq!(256.0f32.approx(), Err::<u8, _>(FloatError::PosOverflow(256.0)));\r
++\r
++// Sometimes, it can be useful to saturate the conversion from float to\r
++// integer directly, then account for NaN as input separately.  The `Saturate`\r
++// extension trait exists for this reason.\r
++assert_eq!((-23.0f32).approx_as::<u8>().saturate(), Ok(0));\r
++assert_eq!(302.0f32.approx_as::<u8>().saturate(), Ok(255u8));\r
++assert!(std::f32::NAN.approx_as::<u8>().saturate().is_err());\r
++\r
++// If you really don't care about the specific kind of error, you can just rely\r
++// on automatic conversion to `GeneralErrorKind`.\r
++fn too_many_errors() -> Result<(), GeneralErrorKind> {\r
++    assert_eq!({let r: u8 = try!(0u8.value_into()); r},  0u8);\r
++    assert_eq!({let r: u8 = try!(0i8.value_into()); r},  0u8);\r
++    assert_eq!({let r: u8 = try!(0i16.value_into()); r}, 0u8);\r
++    assert_eq!({let r: u8 = try!(0.0f32.approx()); r},   0u8);\r
++    Ok(())\r
++}\r
++# let _ = too_many_errors();\r
++# }\r
++```\r
++\r
++*/\r
++\r
++#![deny(missing_docs)]\r
++\r
++#[macro_use] extern crate custom_derive;\r
++\r
++// Exported macros.\r
++pub mod macros;\r
++\r
++pub use errors::{\r
++    NoError, GeneralError, GeneralErrorKind, Unrepresentable,\r
++    NegOverflow, PosOverflow,\r
++    FloatError, RangeError, RangeErrorKind,\r
++    Saturate,\r
++    UnwrapOk, UnwrapOrInf, UnwrapOrInvalid, UnwrapOrSaturate,\r
++};\r
++\r
++use std::error::Error;\r
++\r
++/**\r
++Publicly re-exports the most generally useful set of items.\r
++\r
++Usage of the prelude should be considered **unstable**.  Although items will likely *not* be removed without bumping the major version, new items *may* be added, which could potentially cause name conflicts in user code.\r
++*/\r
++pub mod prelude {\r
++    pub use super::{\r
++        ApproxFrom, ApproxInto,\r
++        ValueFrom, ValueInto,\r
++        GeneralError, GeneralErrorKind,\r
++        Saturate,\r
++        UnwrapOk, UnwrapOrInf, UnwrapOrInvalid, UnwrapOrSaturate,\r
++        ConvUtil, ConvAsUtil,\r
++        RoundToNearest, RoundToZero, Wrapping,\r
++    };\r
++}\r
++\r
++macro_rules! as_item {\r
++    ($($i:item)*) => {$($i)*};\r
++}\r
++\r
++macro_rules! item_for_each {\r
++    (\r
++        $( ($($arg:tt)*) ),* $(,)* => { $($exp:tt)* }\r
++    ) => {\r
++        macro_rules! body {\r
++            $($exp)*\r
++        }\r
++\r
++        $(\r
++            body! { $($arg)* }\r
++        )*\r
++    };\r
++}\r
++\r
++pub mod errors;\r
++pub mod misc;\r
++\r
++mod impls;\r
++\r
++/**\r
++This trait is used to perform a conversion that is permitted to approximate the result, but *not* to wrap or saturate the result to fit into the destination type's representable range.\r
++\r
++Where possible, prefer *implementing* this trait over `ApproxInto`, but prefer *using* `ApproxInto` for generic constraints.\r
++\r
++# Details\r
++\r
++All implementations of this trait must provide a conversion that can be separated into two logical steps: an approximation transform, and a representation transform.\r
++\r
++The "approximation transform" step involves transforming the input value into an approximately equivalent value which is supported by the target type *without* taking the target type's representable range into account.  For example, this might involve rounding or truncating a floating point value to an integer, or reducing the accuracy of a floating point value.\r
++\r
++The "representation transform" step *exactly* rewrites the value from the source type's binary representation into the destination type's binary representation.  This step *may not* transform the value in any way.  If the result of the approximation is not representable, the conversion *must* fail.\r
++\r
++The major reason for this formulation is to exactly define what happens when converting between floating point and integer types.  Often, it is unclear what happens to floating point values beyond the range of the target integer type.  Do they saturate, wrap, or cause a failure?\r
++\r
++With this formulation, it is well-defined: if a floating point value is outside the representable range, the conversion fails.  This allows users to distinguish between approximation and range violation, and act accordingly.\r
++*/\r
++pub trait ApproxFrom<Src, Scheme=DefaultApprox>: Sized where Scheme: ApproxScheme {\r
++    /// The error type produced by a failed conversion.\r
++    type Err: Error;\r
++\r
++    /// Convert the given value into an approximately equivalent representation.\r
++    fn approx_from(src: Src) -> Result<Self, Self::Err>;\r
++}\r
++\r
++impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where Scheme: ApproxScheme {\r
++    type Err = NoError;\r
++    fn approx_from(src: Src) -> Result<Self, Self::Err> {\r
++        Ok(src)\r
++    }\r
++}\r
++\r
++/**\r
++This is the dual of `ApproxFrom`; see that trait for information.\r
++\r
++Where possible, prefer *using* this trait over `ApproxFrom` for generic constraints, but prefer *implementing* `ApproxFrom`.\r
++*/\r
++pub trait ApproxInto<Dst, Scheme=DefaultApprox> where Scheme: ApproxScheme {\r
++    /// The error type produced by a failed conversion.\r
++    type Err: Error;\r
++\r
++    /// Convert the subject into an approximately equivalent representation.\r
++    fn approx_into(self) -> Result<Dst, Self::Err>;\r
++}\r
++\r
++impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src\r
++where\r
++    Dst: ApproxFrom<Src, Scheme>,\r
++    Scheme: ApproxScheme,\r
++{\r
++    type Err = Dst::Err;\r
++    fn approx_into(self) -> Result<Dst, Self::Err> {\r
++        ApproxFrom::approx_from(self)\r
++    }\r
++}\r
++\r
++/**\r
++This trait is used to mark approximation scheme types.\r
++*/\r
++pub trait ApproxScheme {}\r
++\r
++/**\r
++The "default" approximation scheme.  This scheme does whatever would generally be expected of a lossy conversion, assuming no additional context or instruction is given.\r
++\r
++This is a double-edged sword: it has the loosest semantics, but is far more likely to exist than more complicated approximation schemes.\r
++*/\r
++pub enum DefaultApprox {}\r
++impl ApproxScheme for DefaultApprox {}\r
++\r
++/**\r
++This scheme is used to convert a value by "wrapping" it into a narrower range.\r
++\r
++In abstract, this can be viewed as the opposite of rounding: rather than preserving the most significant bits of a value, it preserves the *least* significant bits of a value.\r
++*/\r
++pub enum Wrapping {}\r
++impl ApproxScheme for Wrapping {}\r
++\r
++/**\r
++This scheme is used to convert a value by rounding it to the nearest representable value, with ties rounding away from zero.\r
++*/\r
++pub enum RoundToNearest {}\r
++impl ApproxScheme for RoundToNearest {}\r
++\r
++/**\r
++This scheme is used to convert a value by rounding it toward negative infinity to the nearest representable value.\r
++*/\r
++pub enum RoundToNegInf {}\r
++impl ApproxScheme for RoundToNegInf {}\r
++\r
++/**\r
++This scheme is used to convert a value by rounding it toward positive infinity to the nearest representable value.\r
++*/\r
++pub enum RoundToPosInf {}\r
++impl ApproxScheme for RoundToPosInf {}\r
++\r
++/**\r
++This scheme is used to convert a value by rounding it toward zero to the nearest representable value.\r
++*/\r
++pub enum RoundToZero {}\r
++impl ApproxScheme for RoundToZero {}\r
++\r
++/**\r
++This trait is used to perform a conversion between different semantic types which might fail.\r
++\r
++Where possible, prefer *implementing* this trait over `TryInto`, but prefer *using* `TryInto` for generic constraints.\r
++\r
++# Details\r
++\r
++Typically, this should be used in cases where you are converting between values whose ranges and/or representations only partially overlap.  That the conversion may fail should be a reasonably expected outcome.  A standard example of this is converting from integers to enums of unitary variants.\r
++*/\r
++pub trait TryFrom<Src>: Sized {\r
++    /// The error type produced by a failed conversion.\r
++    type Err: Error;\r
++\r
++    /// Convert the given value into the subject type.\r
++    fn try_from(src: Src) -> Result<Self, Self::Err>;\r
++}\r
++\r
++impl<Src> TryFrom<Src> for Src {\r
++    type Err = NoError;\r
++    fn try_from(src: Src) -> Result<Self, Self::Err> {\r
++        Ok(src)\r
++    }\r
++}\r
++\r
++/**\r
++This is the dual of `TryFrom`; see that trait for information.\r
++\r
++Where possible, prefer *using* this trait over `TryFrom` for generic constraints, but prefer *implementing* `TryFrom`.\r
++*/\r
++pub trait TryInto<Dst> {\r
++    /// The error type produced by a failed conversion.\r
++    type Err: Error;\r
++\r
++    /// Convert the subject into the destination type.\r
++    fn try_into(self) -> Result<Dst, Self::Err>;\r
++}\r
++\r
++impl<Src, Dst> TryInto<Dst> for Src where Dst: TryFrom<Src> {\r
++    type Err = Dst::Err;\r
++    fn try_into(self) -> Result<Dst, Self::Err> {\r
++        TryFrom::try_from(self)\r
++    }\r
++}\r
++\r
++/**\r
++This trait is used to perform an exact, value-preserving conversion.\r
++\r
++Where possible, prefer *implementing* this trait over `ValueInto`, but prefer *using* `ValueInto` for generic constraints.\r
++\r
++# Details\r
++\r
++Implementations of this trait should be reflexive, associative and commutative (in the absence of conversion errors).  That is, all possible cycles of `ValueFrom` conversions (for which each "step" has a defined implementation) should produce the same result, with a given value either being "round-tripped" exactly, or an error being produced.\r
++*/\r
++pub trait ValueFrom<Src>: Sized {\r
++    /// The error type produced by a failed conversion.\r
++    type Err: Error;\r
++\r
++    /// Convert the given value into an exactly equivalent representation.\r
++    fn value_from(src: Src) -> Result<Self, Self::Err>;\r
++}\r
++\r
++impl<Src> ValueFrom<Src> for Src {\r
++    type Err = NoError;\r
++    fn value_from(src: Src) -> Result<Self, Self::Err> {\r
++        Ok(src)\r
++    }\r
++}\r
++\r
++/**\r
++This is the dual of `ValueFrom`; see that trait for information.\r
++\r
++Where possible, prefer *using* this trait over `ValueFrom` for generic constraints, but prefer *implementing* `ValueFrom`.\r
++*/\r
++pub trait ValueInto<Dst> {\r
++    /// The error type produced by a failed conversion.\r
++    type Err: Error;\r
++    \r
++    /// Convert the subject into an exactly equivalent representation.\r
++    fn value_into(self) -> Result<Dst, Self::Err>;\r
++}\r
++\r
++impl<Src, Dst> ValueInto<Dst> for Src where Dst: ValueFrom<Src> {\r
++    type Err = Dst::Err;\r
++    fn value_into(self) -> Result<Dst, Self::Err> {\r
++        ValueFrom::value_from(self)\r
++    }\r
++}\r
++\r
++/**\r
++This extension trait exists to simplify using various conversions.\r
++\r
++If there is more than one implementation for a given type/trait pair, a simple call to `*_into` may not be uniquely resolvable.  Due to the position of the type parameter (on the trait itself), it is cumbersome to specify the destination type.  A similar problem exists for approximation schemes.\r
++\r
++See also the [`ConvAsUtil`](./trait.ConvAsUtil.html) trait.\r
++\r
++> **Note**: There appears to be a bug in `rustdoc`'s output.  This trait is implemented *for all* types, though the methods are only available for types where the appropriate conversions are defined.\r
++*/\r
++pub trait ConvUtil {\r
++    /// Approximate the subject to a given type with the default scheme.\r
++    fn approx_as<Dst>(self) -> Result<Dst, Self::Err>\r
++    where Self: Sized + ApproxInto<Dst> {\r
++        self.approx_into()\r
++    }\r
++\r
++    /// Approximate the subject to a given type with a specific scheme.\r
++    fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>\r
++    where\r
++        Self: Sized + ApproxInto<Dst, Scheme>,\r
++        Scheme: ApproxScheme,\r
++    {\r
++        self.approx_into()\r
++    }\r
++\r
++    /// Convert the subject to a given type.\r
++    fn into_as<Dst>(self) -> Dst\r
++    where Self: Sized + Into<Dst> {\r
++        self.into()\r
++    }\r
++\r
++    /// Attempt to convert the subject to a given type.\r
++    fn try_as<Dst>(self) -> Result<Dst, Self::Err>\r
++    where Self: Sized + TryInto<Dst> {\r
++        self.try_into()\r
++    }\r
++\r
++    /// Attempt a value conversion of the subject to a given type.\r
++    fn value_as<Dst>(self) -> Result<Dst, Self::Err>\r
++    where Self: Sized + ValueInto<Dst> {\r
++        self.value_into()\r
++    }\r
++}\r
++\r
++impl<T> ConvUtil for T {}\r
++\r
++/**\r
++This extension trait exists to simplify using various conversions.\r
++\r
++If there is more than one `ApproxFrom` implementation for a given type, a simple call to `approx_into` may not be uniquely resolvable.  Due to the position of the scheme parameter (on the trait itself), it is cumbersome to specify which scheme you wanted.\r
++\r
++The destination type is inferred from context.\r
++\r
++See also the [`ConvUtil`](./trait.ConvUtil.html) trait.\r
++\r
++> **Note**: There appears to be a bug in `rustdoc`'s output.  This trait is implemented *for all* types, though the methods are only available for types where the appropriate conversions are defined.\r
++*/\r
++pub trait ConvAsUtil<Dst> {\r
++    /// Approximate the subject with the default scheme.\r
++    fn approx(self) -> Result<Dst, Self::Err>\r
++    where Self: Sized + ApproxInto<Dst> {\r
++        self.approx_into()\r
++    }\r
++\r
++    /// Approximate the subject with a specific scheme.\r
++    fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>\r
++    where\r
++        Self: Sized + ApproxInto<Dst, Scheme>,\r
++        Scheme: ApproxScheme,\r
++    {\r
++        self.approx_into()\r
++    }\r
++}\r
++\r
++impl<T, Dst> ConvAsUtil<Dst> for T {}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f0609ecb180243b628537f9a5858c935b46bd998
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,148 @@@
++/*!\r
++This module provides convenience macros to help with implementing the conversion traits.\r
++\r
++# `TryFrom!`\r
++\r
++```ignore\r
++macro_rules! TryFrom {\r
++    (($target:ty) $enum:item) => { ... };\r
++}\r
++```\r
++\r
++This macro attempts to derive an implementation of the [`TryFrom`](../trait.TryFrom.html) trait.  Specifically, it supports `enum`s consisting entirely of unitary variants, with or without explicit values.  The source type can be any integer type which the variants of the enumeration can be explicitly cast to (*i.e.* using `as`).\r
++\r
++If a conversion fails (due to there being no matching variant for the specified integer value `src`), then the conversion returns `Err(Unrepresentable(src))` (see [`Unrepresentable`](../errors/struct.Unrepresentable.html)).\r
++\r
++It is compatible with the [`custom_derive!`](https://crates.io/crates/custom_derive) macro.\r
++\r
++## Example\r
++\r
++Using `custom_derive!`:\r
++\r
++```\r
++#[macro_use] extern crate conv;\r
++#[macro_use] extern crate custom_derive;\r
++\r
++custom_derive! {\r
++    #[derive(Debug, PartialEq, TryFrom(i32))]\r
++    enum Colours {\r
++        Red = 0,\r
++        Green = 5,\r
++        Blue\r
++    }\r
++}\r
++\r
++fn main() {\r
++    use conv::{TryFrom, Unrepresentable};\r
++\r
++    assert_eq!(Colours::try_from(0), Ok(Colours::Red));\r
++    assert_eq!(Colours::try_from(1), Err(Unrepresentable(1)));\r
++    assert_eq!(Colours::try_from(5), Ok(Colours::Green));\r
++    assert_eq!(Colours::try_from(6), Ok(Colours::Blue));\r
++    assert_eq!(Colours::try_from(7), Err(Unrepresentable(7)));\r
++}\r
++```\r
++\r
++The above is equivalent to the following:\r
++\r
++```\r
++#[macro_use] extern crate conv;\r
++\r
++#[derive(Debug, PartialEq)]\r
++enum Colours {\r
++    Red = 0,\r
++    Green = 5,\r
++    Blue\r
++}\r
++\r
++TryFrom! { (i32) enum Colours {\r
++    Red = 0,\r
++    Green = 5,\r
++    Blue\r
++} }\r
++# fn main() {}\r
++```\r
++*/\r
++\r
++/**\r
++See the documentation for the [`macros`](./macros/index.html#tryfrom!) module for details.\r
++*/\r
++#[macro_export]\r
++macro_rules! TryFrom {\r
++    (($prim:ty) $(pub)* enum $name:ident { $($body:tt)* }) => {\r
++        TryFrom! {\r
++            @collect_variants ($name, $prim),\r
++            ($($body)*,) -> ()\r
++        }\r
++    };\r
++\r
++    (\r
++        @collect_variants ($name:ident, $prim:ty),\r
++        ($(,)*) -> ($($var_names:ident,)*)\r
++    ) => {\r
++        impl $crate::TryFrom<$prim> for $name {\r
++            type Err = $crate::errors::Unrepresentable<$prim>;\r
++            fn try_from(src: $prim) -> Result<$name, Self::Err> {\r
++                $(\r
++                    if src == $name::$var_names as $prim {\r
++                        return Ok($name::$var_names);\r
++                    }\r
++                )*\r
++                Err($crate::errors::Unrepresentable(src))\r
++            }\r
++        }\r
++    };\r
++\r
++    (\r
++        @collect_variants $fixed:tt,\r
++        (#[$_attr:meta] $($tail:tt)*) -> $var_names:tt\r
++    ) => {\r
++        TryFrom! {\r
++            @skip_meta $fixed,\r
++            ($($tail)*) -> $var_names\r
++        }\r
++    };\r
++\r
++    (\r
++        @collect_variants $fixed:tt,\r
++        ($var:ident $(= $_val:expr)*, $($tail:tt)*) -> ($($var_names:tt)*)\r
++    ) => {\r
++        TryFrom! {\r
++            @collect_variants $fixed,\r
++            ($($tail)*) -> ($($var_names)* $var,)\r
++        }\r
++    };\r
++\r
++    (\r
++        @collect_variants ($name:ident),\r
++        ($var:ident $_struct:tt, $($tail:tt)*) -> ($($var_names:tt)*)\r
++    ) => {\r
++        const _error: () = concat!(\r
++            "cannot derive TryFrom for ",\r
++            stringify!($name),\r
++            ", due to non-unitary variant ",\r
++            stringify!($var),\r
++            "."\r
++        );\r
++    };\r
++    \r
++    (\r
++        @skip_meta $fixed:tt,\r
++        (#[$_attr:meta] $($tail:tt)*) -> $var_names:tt\r
++    ) => {\r
++        TryFrom! {\r
++            @skip_meta $fixed,\r
++            ($($tail)*) -> $var_names\r
++        }\r
++    };\r
++\r
++    (\r
++        @skip_meta $fixed:tt,\r
++        ($var:ident $($tail:tt)*) -> $var_names:tt\r
++    ) => {\r
++        TryFrom! {\r
++            @collect_variants $fixed,\r
++            ($var $($tail)*) -> $var_names\r
++        }\r
++    };\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..db80a532c6d39c750bf3615641982cf7aa199df0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,71 @@@
++/*!\r
++This module defines some additional traits not *directly* tied to conversions.\r
++*/\r
++\r
++/**\r
++This trait indicates that values of a type can be logically "saturated".\r
++\r
++This is used by the `errors::UnwrapOrSaturate` extension trait.\r
++*/\r
++pub trait Saturated {\r
++    /// Returns the type's saturated, maximum value.\r
++    fn saturated_max() -> Self;\r
++\r
++    /// Returns the type's saturated, minimum value.\r
++    fn saturated_min() -> Self;\r
++}\r
++\r
++item_for_each! {\r
++    (i8), (i16), (i32), (i64), (u8), (u16), (u32), (u64), (isize), (usize) => {\r
++        ($ity:ident) => {\r
++            impl Saturated for $ity {\r
++                #[inline] fn saturated_max() -> Self { ::std::$ity::MAX }\r
++                #[inline] fn saturated_min() -> Self { ::std::$ity::MIN }\r
++            }\r
++        };\r
++    }\r
++}\r
++\r
++/**\r
++This trait indicates that a type has an "invalid" sentinel value.\r
++\r
++This is used by the `errors::UnwrapOrInvalid` extension trait.\r
++*/\r
++pub trait InvalidSentinel {\r
++    /// Returns the type's "invalid" sentinel value.\r
++    fn invalid_sentinel() -> Self;\r
++}\r
++\r
++item_for_each! {\r
++    (f32), (f64) => {\r
++        ($ity:ident) => {\r
++            impl InvalidSentinel for $ity {\r
++                #[inline] fn invalid_sentinel() -> Self { ::std::$ity::NAN }\r
++            }\r
++        };\r
++    }\r
++}\r
++\r
++/**\r
++This trait indicates that a type has positive and negative "infinity" values.\r
++\r
++This is used by the `errors::UnwrapOrInf` extension trait.\r
++*/\r
++pub trait SignedInfinity {\r
++    /// Returns the type's positive infinity value.\r
++    fn neg_infinity() -> Self;\r
++\r
++    /// Returns the type's negative infinity value.\r
++    fn pos_infinity() -> Self;\r
++}\r
++\r
++item_for_each! {\r
++    (f32), (f64) => {\r
++        ($ity:ident) => {\r
++            impl SignedInfinity for $ity {\r
++                #[inline] fn neg_infinity() -> Self { ::std::$ity::NEG_INFINITY }\r
++                #[inline] fn pos_infinity() -> Self { ::std::$ity::INFINITY }\r
++            }\r
++        };\r
++    }\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3444ab3182a39927d8ff61ef260e2fae52ba8145
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,40 @@@
++#[macro_use] extern crate conv;\r
++\r
++use conv::prelude::*;\r
++\r
++#[test]\r
++fn test_approx() {\r
++    use conv::DefaultApprox;\r
++    assert_eq!((1.5f32).approx(), Ok(1i32));\r
++    assert_eq!((1.5f32).approx_by::<DefaultApprox>(), Ok(1));\r
++    assert_eq!((1.5f32).approx_as::<i32>(), Ok(1));\r
++    assert_eq!((1.5f32).approx_as_by::<i32, DefaultApprox>(), Ok(1));\r
++}\r
++\r
++#[test]\r
++fn test_into() {\r
++    let v = "ABC".into_as::<Vec<u8>>();\r
++    assert_eq!(&*v, &[0x41, 0x42, 0x43]);\r
++}\r
++\r
++#[test]\r
++fn test_try() {\r
++    #[derive(PartialEq, Debug)] enum ItAintRight { BabeNo, NoNo }\r
++    TryFrom! { (u8) enum ItAintRight { BabeNo, NoNo } }\r
++\r
++    assert_eq!(0u8.try_as::<ItAintRight>(), Ok(ItAintRight::BabeNo));\r
++    assert_eq!(1u8.try_as::<ItAintRight>(), Ok(ItAintRight::NoNo));\r
++    assert_eq!(2u8.try_as::<ItAintRight>(), Err(conv::Unrepresentable(2)));\r
++}\r
++\r
++#[test]\r
++fn test_value() {\r
++    assert_eq!((123u32).value_as::<u8>(), Ok(123));\r
++}\r
++\r
++#[test]\r
++fn test_whizzo() {\r
++    use conv::errors::Unrepresentable;\r
++    assert_eq!((-1.0f32).approx_as::<u8>().saturate(), Ok::<_, Unrepresentable<_>>(0u8));\r
++    assert_eq!((-1i32).value_as::<u8>().saturate().unwrap_ok(), 0u8);\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f8e0c781f4659d77f7d98866d7f9dcfd2b5fc6c5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,45 @@@
++#[macro_use] extern crate conv;\r
++\r
++use conv::{TryFrom, Unrepresentable};\r
++\r
++#[derive(Debug, PartialEq)]\r
++enum Get { Up, Down, AllAround }\r
++\r
++TryFrom! { (u8)\r
++    enum Get {\r
++        Up,\r
++        /// And\r
++        Down,\r
++        /** And */\r
++        AllAround\r
++    }\r
++}\r
++\r
++#[derive(Debug, PartialEq)]\r
++enum GottaGo { GetAway, Fast = 9000, Faster = 9001 }\r
++\r
++TryFrom! { (u16)\r
++    enum GottaGo {\r
++        GetAway,\r
++        Fast = 9000,\r
++        /// This show was stupid.\r
++        Faster = 9001\r
++    }\r
++}\r
++\r
++#[test]\r
++fn test_try_from() {\r
++    assert_eq!(Get::try_from(0u8), Ok(Get::Up));\r
++    assert_eq!(Get::try_from(1u8), Ok(Get::Down));\r
++    assert_eq!(Get::try_from(2u8), Ok(Get::AllAround));\r
++    assert_eq!(Get::try_from(3u8), Err(Unrepresentable(3u8)));\r
++\r
++    assert_eq!(GottaGo::try_from(0u16), Ok(GottaGo::GetAway));\r
++    assert_eq!(GottaGo::try_from(1u16), Err(Unrepresentable(1u16)));\r
++    assert_eq!(GottaGo::try_from(2u16), Err(Unrepresentable(2u16)));\r
++    assert_eq!(GottaGo::try_from(3u16), Err(Unrepresentable(3u16)));\r
++    assert_eq!(GottaGo::try_from(8999u16), Err(Unrepresentable(8999u16)));\r
++    assert_eq!(GottaGo::try_from(9000u16), Ok(GottaGo::Fast));\r
++    assert_eq!(GottaGo::try_from(9001u16), Ok(GottaGo::Faster));\r
++    assert_eq!(GottaGo::try_from(9002u16), Err(Unrepresentable(9002u16)));\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..88a9320743fba7a5f05f536ce19c21be64d7b65a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,121 @@@
++extern crate conv;\r
++\r
++#[macro_use] mod util;\r
++\r
++use conv::*;\r
++\r
++use conv::PosOverflow as Of;\r
++use conv::Unrepresentable as Ur;\r
++\r
++macro_rules! check {\r
++    (@ $from:ty, $to:ty=> $(;)*) => {};\r
++\r
++    (@ $from:ty, $to:ty=> try cident; $($tail:tt)*) => {\r
++        check!(@ $from, $to=> try v: '\x00';);\r
++        check!(@ $from, $to=> try v: '\x01';);\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> try uident; $($tail:tt)*) => {\r
++        check!(@ $from, $to=> try v: 0;);\r
++        check!(@ $from, $to=> try v: 1;);\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> try v: $src:expr, !$dst:expr; $($tail:tt)*) => {\r
++        {\r
++            let src: $from = $src;\r
++            let dst: Result<$to, _> = src.try_into();\r
++            assert_eq!(dst, Err($dst(src)));\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> try v: $src:expr; $($tail:tt)*) => {\r
++        {\r
++            let src: $from = $src;\r
++            let dst: Result<$to, _> = src.try_into();\r
++            assert_eq!(dst, Ok($src as $to));\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> qt: *; $($tail:tt)*) => {\r
++        {\r
++            extern crate quickcheck;\r
++\r
++            fn property(v: $from) -> bool {\r
++                let dst: Result<$to, _> = v.try_into();\r
++                dst == Ok(v as $to)\r
++            }\r
++\r
++            let mut qc = quickcheck::QuickCheck::new();\r
++            match qc.quicktest(property as fn($from) -> bool) {\r
++                Ok(_) => (),\r
++                Err(err) => panic!("qv {:?}", err)\r
++            }\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    ($from:ty, $to:ty=> $($tail:tt)*) => {\r
++        check! { @ $from, $to=> $($tail)*; }\r
++    };\r
++}\r
++\r
++#[test]\r
++fn test_i_to_c() {\r
++    check!(u8, char => try uident; qt: *);\r
++\r
++    /*\r
++    `char` is a pain because `u8` is the *only* type you can cast directly from.  So, the `check!` macro is *basically useless*.\r
++\r
++    Also, `char` has a great big hole in the middle, which makes things more interesting.\r
++\r
++    Instead, we're just going to make sure that the conversions *exist* and have the expected error type.\r
++    */\r
++    macro_rules! check_i_to_c {\r
++        ($($ts:ty),* $(,)*) => {\r
++            $(\r
++                {\r
++                    let v: $ts = 0;\r
++                    let r: Result<char, Ur<$ts>> = TryFrom::try_from(v);\r
++                    assert_eq!(r, Ok('\x00'));\r
++                }\r
++            )*\r
++        };\r
++    }\r
++    check_i_to_c!(i8, i16, i32, i64, isize, u16, u32, u64, usize);\r
++}\r
++\r
++#[test]\r
++fn test_c_to_i() {\r
++    check!(char, i8=> try cident;\r
++        try v: '\u{80}', !Of;\r
++    );\r
++    check!(char, i16=> try cident;\r
++        try v: '\u{8000}', !Of;\r
++    );\r
++    check!(char, i32=> try cident;);\r
++    check!(char, i64=> try cident;);\r
++    check!(char, u8=> try cident;\r
++        try v: '\u{100}', !Of;\r
++    );\r
++    check!(char, u16=> try cident;\r
++        try v: '\u{10000}', !Of;\r
++    );\r
++    check!(char, u32=> try cident;);\r
++    check!(char, u64=> try cident;);\r
++    for_bitness! {\r
++        32 {\r
++            check!(char, isize=> try cident;\r
++                try v: '\u{10ffff}';\r
++            );\r
++            check!(char, usize=> try cident;);\r
++        }\r
++        64 {\r
++            check!(char, i64=> try cident;);\r
++            check!(char, u64=> try cident;);\r
++        }\r
++    }\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9ec1a416d2b9928ce5b71113b82a36d5bd45761a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,57 @@@
++extern crate conv;\r
++\r
++#[macro_use] mod util;\r
++\r
++use conv::*;\r
++\r
++use conv::FloatError::NegOverflow as FU;\r
++use conv::FloatError::PosOverflow as FO;\r
++\r
++#[test]\r
++fn test_f32() {\r
++    check!(f32, f32=> fident; qv: *;);\r
++    check!(f32, f64=> fident; qv: *;);\r
++}\r
++\r
++#[test]\r
++fn test_f32_to_int() {\r
++    check!(f32, i8=>  sidenta; qa: i8=>  a: -129.0, !FU; a: 128.0, !FO;);\r
++    check!(f32, i16=> sidenta; qa: i16=> a: -32_769.0, !FU; a: 32_768.0, !FO;);\r
++    check!(f32, i32=> sidenta; qa: i32=>\r
++        a: -2.1474836e9, -2147483648; a: 2.1474835e9, 2147483520;\r
++        a: -2_147_500_000.0, !FU; a: 2_147_500_000.0, !FO;);\r
++    check!(f32, i64=> sidenta; qa: i64=>\r
++        a: -9.223372e18, -9223372036854775808; a: 9.2233715e18, 9223371487098961920;\r
++        a: -9_223_373_000_000_000_000.0, !FU; a: 9_223_373_000_000_000_000.0, !FO;);\r
++    check!(f32, u8=>  uidenta; qa: u8=>  a: -1.0, !FU; a: 256.0, !FO;);\r
++    check!(f32, u16=> uidenta; qa: u16=> a: -1.0, !FU; a: 65_536.0, !FO;);\r
++    check!(f32, u32=> uidenta; qa: u32=>\r
++        a: 4.294967e9, 4294967040;\r
++        a: -1.0, !FU; a: 4_294_968_000.0, !FO;);\r
++    check!(f32, u64=> uidenta; qa: u64=>\r
++        a: 1.8446743e19, 18446742974197923840;\r
++        a: -1.0, !FU; a: 18_446_746_000_000_000_000.0, !FO;);\r
++}\r
++\r
++#[test]\r
++fn test_f64_to_int() {\r
++    check!(f64, i8=>  sidenta; qa: i8=>  a: -129.0, !FU; a: 128.0, !FO;);\r
++    check!(f64, i16=> sidenta; qa: i16=> a: -32_769.0, !FU; a: 32_768.0, !FO;);\r
++    check!(f64, i32=> sidenta; qa: i32=> a: -2_147_483_649.0, !FU; a: 2_147_483_648.0, !FO;);\r
++    check!(f64, i64=> sidenta; qa: i64=>\r
++        a: -9.223372036854776e18, -9223372036854775808;\r
++        a: 9.223372036854775e18, 9223372036854774784;\r
++        a: -9_223_372_036_854_778_000.0, !FU; a: 9_223_372_036_854_778_000.0, !FO;);\r
++    check!(f64, u8=>  uidenta; qa: u8=>  a: -1.0, !FU; a: 256.0, !FO;);\r
++    check!(f64, u16=> uidenta; qa: u16=> a: -1.0, !FU; a: 65_536.0, !FO;);\r
++    check!(f64, u32=> uidenta; qa: u32=> a: -1.0, !FU; a: 4_294_967_296.0, !FO;);\r
++    check!(f64, u64=> uidenta; qa: u64=>\r
++        a: 1.844674407370955e19;\r
++        a: -1.0, !FU; a: 18_446_744_073_709_560_000.0, !FO;);\r
++}\r
++\r
++#[test]\r
++fn test_f64() {\r
++    check!(f64, f32=> fidenta; qa: *;);\r
++    check!(f64, f64=> fident; qv: *;);\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f8f63a7cae8bc804a8b2b8a14c09025e8347b0cf
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,395 @@@
++extern crate conv;\r
++\r
++#[macro_use] mod util;\r
++\r
++use conv::*;\r
++\r
++use conv::NegOverflow as Uf;\r
++use conv::PosOverflow as Of;\r
++use conv::RangeError::NegOverflow as RU;\r
++use conv::RangeError::PosOverflow as RO;\r
++\r
++#[test]\r
++fn test_i8() {\r
++    check!(i8, i8=> sident; qv: *; qa: *; qaW: *);\r
++    check!(i8, i16=> sident; qv: *; qa: *; qaW: *);\r
++    check!(i8, i32=> sident; qv: *; qa: *; qaW: *);\r
++    check!(i8, i64=> sident; qv: *; qa: *; qaW: *);\r
++    check!(i8, u8=> uident; qv: +; qa: +; qaW: *;\r
++        v: -1, !Uf;\r
++    );\r
++    check!(i8, u16=> uident; qv: +; qa: +; qaW: *;\r
++        v: -1, !Uf;\r
++    );\r
++    check!(i8, u32=> uident; qv: +; qa: +; qaW: *;\r
++        v: -1, !Uf;\r
++    );\r
++    check!(i8, u64=> uident; qv: +; qa: +; qaW: *;\r
++        v: -1, !Uf;\r
++    );\r
++    check!(i8, isize=> sident; qv: *; qa: *; qaW: *);\r
++    check!(i8, usize=> uident; qv: +; qa: +; qaW: *;\r
++        v: -1, !Uf;\r
++    );\r
++}\r
++\r
++#[test]\r
++fn test_i16() {\r
++    check!(i16, i8=> sident; qv: i8=> qa: i8=> qaW: *;\r
++        v: -129, !RU; v: 128, !RO;\r
++    );\r
++    check!(i16, i16=> sident; qv: *; qa: *; qaW: *);\r
++    check!(i16, i32=> sident; qv: *; qa: *; qaW: *);\r
++    check!(i16, i64=> sident; qv: *; qa: *; qaW: *);\r
++    check!(i16, u8=> uident; qv: u8=> qa: +; qaW: *;\r
++        v: -1, !RU;\r
++    );\r
++    check!(i16, u16=> uident; qv: u16, i16=> qa: +; qaW: *;\r
++        v: -1, !Uf;\r
++    );\r
++    check!(i16, u32=> uident; qv: +; qa: +; qaW: *;\r
++        v: -1, !Uf;\r
++    );\r
++    check!(i16, u64=> uident; qv: +; qa: +; qaW: *;\r
++        v: -1, !Uf;\r
++    );\r
++    check!(i16, isize=> sident; qv: *; qa: *; qaW: *);\r
++    check!(i16, usize=> uident; qv: +; qa: +; qaW: *;\r
++        v: -1, !Uf;\r
++    );\r
++}\r
++\r
++#[test]\r
++fn test_i32() {\r
++    check!(i32, i8=> sident; qv: i8=> qa: i8=> qaW: *;\r
++        v: -129, !RU; v: 128, !RO;\r
++    );\r
++    check!(i32, i16=> sident; qv: i16=> qa: i16=> qaW: *;\r
++        v: -32_769, !RU; v: 32_768, !RO;\r
++    );\r
++    check!(i32, i32=> sident; qv: *; qa: *; qaW: *);\r
++    check!(i32, i64=> sident; qv: *; qa: *; qaW: *);\r
++    check!(i32, u8=> uident; qv: u8=> qa: u8=> qaW: *;\r
++        v: -1, !RU;\r
++    );\r
++    check!(i32, u16=> uident; qv: u16=> qa: u16=> qaW: *;\r
++        v: -1, !RU;\r
++    );\r
++    check!(i32, u32=> uident; qv: +; qa: +; qaW: *;\r
++        v: -1, !Uf;\r
++    );\r
++    check!(i32, u64=> uident; qv: +; qa: +; qaW: *;\r
++        v: -1, !Uf;\r
++    );\r
++    for_bitness! {\r
++        32 {\r
++            check!(i32, isize=> sident; qv: *; qa: *; qaW: *);\r
++            check!(i32, usize=> uident; qv: +; qa: +; qaW: *;\r
++                v: -1, !Uf;\r
++            );\r
++        }\r
++        64 {\r
++            check!(i32, isize=> sident; qv: *; qa: *; qaW: *);\r
++            check!(i32, usize=> uident; qv: +; qa: +; qaW: *;\r
++                v: -1, !Uf;\r
++            );\r
++        }\r
++    }\r
++}\r
++\r
++#[test]\r
++fn test_i64() {\r
++    check!(i64, i8=> sident; qv: i8=> qa: i8=> qaW: *;\r
++        v: -129, !RU; v: 128, !RO;\r
++    );\r
++    check!(i64, i16=> sident; qv: i16=> qa: i16=> qaW: *;\r
++        v: -32_769, !RU; v: 32_768, !RO;\r
++    );\r
++    check!(i64, i32=> sident; qv: i32=> qa: i32=> qaW: *;\r
++        v: -2_147_483_649, !RU; v: 2_147_483_648, !RO;\r
++    );\r
++    check!(i64, i64=> sident; qv: *; qa: *; qaW: *;\r
++    );\r
++    check!(i64, u8=> uident; qv: u8=> qa: u8=> qaW: *;\r
++        v: -1, !RU;\r
++    );\r
++    check!(i64, u16=> uident; qv: u16=> qa: u16=> qaW: *;\r
++        v: -1, !RU;\r
++    );\r
++    check!(i64, u32=> uident; qv: u32=> qa: u32=> qaW: *;\r
++        v: -1, !RU;\r
++    );\r
++    check!(i64, u64=> uident; qv: +; qa: +; qaW: *;\r
++        v: -1, !Uf;\r
++    );\r
++    for_bitness! {\r
++        32 {\r
++            check!(i64, isize=> sident; qv: isize=> qa: isize=> qaW: *;\r
++                v: -2_147_483_649, !RU; v: 2_147_483_648, !RO;\r
++            );\r
++            check!(i64, usize=> uident; qv: usize=> qa: usize=> qaW: *;\r
++                v: -1, !RU; v: 4_294_967_296, !RO;\r
++            );\r
++        }\r
++        64 {\r
++            check!(i64, isize=> sident; qv: *; qa: *; qaW: *;\r
++            );\r
++            check!(i64, usize=> uident; qv: +; qa: +; qaW: *;\r
++                v: -1, !Uf;\r
++            );\r
++        }\r
++    }\r
++}\r
++\r
++#[test]\r
++fn test_u8() {\r
++    check!(u8, i8=> uident; qv: +i8=> qa: +i8=> qaW: *;\r
++        v: 127; v: 128, !Of;\r
++    );\r
++    check!(u8, i16=> uident; qv: *; qa: *; qaW: *);\r
++    check!(u8, i32=> uident; qv: *; qa: *; qaW: *);\r
++    check!(u8, i64=> uident; qv: *; qa: *; qaW: *);\r
++    check!(u8, u8=> uident; qv: *; qa: *; qaW: *);\r
++    check!(u8, u16=> uident; qv: *; qa: *; qaW: *);\r
++    check!(u8, u32=> uident; qv: *; qa: *; qaW: *);\r
++    check!(u8, u64=> uident; qv: *; qa: *; qaW: *);\r
++    check!(u8, isize=> uident; qv: *; qa: *; qaW: *);\r
++    check!(u8, usize=> uident; qv: *; qa: *; qaW: *);\r
++}\r
++\r
++#[test]\r
++fn test_u16() {\r
++    check!(u16, i8=> uident; qv: +i8=> qa: +i8=> qaW: *;\r
++        v: 128, !Of;\r
++    );\r
++    check!(u16, i16=> uident; qv: +i16=> qa: +i16=> qaW: *;\r
++        v: 32_768, !Of;\r
++    );\r
++    check!(u16, i32=> uident; qv: *; qa: *; qaW: *);\r
++    check!(u16, i64=> uident; qv: *; qa: *; qaW: *);\r
++    check!(u16, u8=> uident; qv: u8=> qa: u8=> qaW: *;\r
++        v: 256, !Of;\r
++    );\r
++    check!(u16, u16=> uident; qv: *; qa: *; qaW: *);\r
++    check!(u16, u32=> uident; qv: *; qa: *; qaW: *);\r
++    check!(u16, u64=> uident; qv: *; qa: *; qaW: *);\r
++    check!(u16, isize=> uident; qv: *; qa: *; qaW: *);\r
++    check!(u16, usize=> uident; qv: *; qa: *; qaW: *);\r
++}\r
++\r
++#[test]\r
++fn test_u32() {\r
++    check!(u32, i8=> uident; qv: +i8=> qa: +i8=> qaW: *;\r
++        v: 128, !Of;\r
++    );\r
++    check!(u32, i16=> uident; qv: +i16=> qa: +i16=> qaW: *;\r
++        v: 32_768, !Of;\r
++    );\r
++    check!(u32, i32=> uident; qv: +i32=> qa: +i32=> qaW: *;\r
++        v: 2_147_483_648, !Of;\r
++    );\r
++    check!(u32, i64=> uident; qv: *; qa: *; qaW: *);\r
++    check!(u32, u8=> uident; qv: u8=> qa: u8=> qaW: *;\r
++        v: 256, !Of;\r
++    );\r
++    check!(u32, u16=> uident; qv: u16=> qa: u16=> qaW: *;\r
++        v: 65_536, !Of;\r
++    );\r
++    check!(u32, u32=> uident; qv: *; qa: *; qaW: *);\r
++    check!(u32, u64=> uident; qv: *; qa: *; qaW: *);\r
++    for_bitness! {\r
++        32 {\r
++            check!(u32, isize=> uident; qv: +isize=> qa: +isize=> qaW: *;\r
++                v: 2_147_483_647; v: 2_147_483_648, !Of;\r
++            );\r
++            check!(u32, usize=> uident; qv: *; qa: *; qaW: *);\r
++        }\r
++        64 {\r
++            check!(u32, isize=> uident; qv: *; qa: *; qaW: *);\r
++            check!(u32, usize=> uident; qv: *; qa: *; qaW: *);\r
++        }\r
++    }\r
++}\r
++\r
++#[test]\r
++fn test_u64() {\r
++    check!(u64, i8=> uident; qv: +i8=> qa: +i8=> qaW: *;\r
++        v: 128, !Of;\r
++    );\r
++    check!(u64, i16=> uident; qv: +i16=> qa: +i16=> qaW: *;\r
++        v: 32_768, !Of;\r
++    );\r
++    check!(u64, i32=> uident; qv: +i32=> qa: +i32=> qaW: *;\r
++        v: 2_147_483_648, !Of;\r
++    );\r
++    check!(u64, i64=> uident; qv: +i64=> qa: +i64=> qaW: *;\r
++        v: 9_223_372_036_854_775_808, !Of;\r
++    );\r
++    check!(u64, u8=> uident; qv: u8=> qa: u8=> qaW: *;\r
++        v: 256, !Of;\r
++    );\r
++    check!(u64, u16=> uident; qv: u16=> qa: u16=> qaW: *;\r
++        v: 65_536, !Of;\r
++    );\r
++    check!(u64, u32=> uident; qv: u32=> qa: u32=> qaW: *;\r
++        v: 4_294_967_296, !Of;\r
++    );\r
++    check!(u64, u64=> uident; qv: *; qa: *; qaW: *);\r
++    for_bitness! {\r
++        32 {\r
++            check!(u64, isize=> uident; qv: +isize=> qa: +isize=> qaW: *;\r
++                v: 2_147_483_648, !Of;\r
++            );\r
++            check!(u64, usize=> uident; qv: usize=> qa: usize=> qaW: *;\r
++                v: 4_294_967_296, !Of;\r
++            );\r
++        }\r
++        64 {\r
++            check!(u64, isize=> uident; qv: +i64=> qa: +i64=> qaW: *;\r
++                v: 9_223_372_036_854_775_808, !Of;\r
++            );\r
++            check!(u64, usize=> uident; qv: *; qa: *; qaW: *);\r
++        }\r
++    }\r
++}\r
++\r
++#[test]\r
++fn test_isize() {\r
++    check!(isize, i8=> sident; qv: i8=> qa: i8=> qaW: *;\r
++        v: -129, !RU; v: 128, !RO;\r
++    );\r
++    check!(isize, i16=> sident; qv: i16=> qa: i16=> qaW: *;\r
++        v: -32_769, !RU; v: 32_768, !RO;\r
++    );\r
++    check!(isize, u8=> uident; qv: u8=> qa: u8=> qaW: *;\r
++        v: -1, !RU; v: 256, !RO;\r
++    );\r
++    check!(isize, u16=> uident; qv: u16=> qa: u16=> qaW: *;\r
++        v: -1, !RU; v: 65_536, !RO;\r
++    );\r
++    check!(isize, isize=> sident; qv: *; qa: *; qaW: *);\r
++    for_bitness! {\r
++        32 {\r
++            check!(isize, i32=> sident; qv: *; qa: *; qaW: *);\r
++            check!(isize, i64=> sident; qv: *; qa: *; qaW: *);\r
++            check!(isize, u32=> uident; qv: +; qa: +; qaW: *;\r
++                v: -1, !Uf;\r
++            );\r
++            check!(isize, u64=> uident; qv: +; qa: +; qaW: *;\r
++                v: -1, !Uf;\r
++            );\r
++            check!(isize, usize=> uident; qv: +; qa: +; qaW: *;\r
++                v: -1, !Uf;\r
++            );\r
++        }\r
++        64 {\r
++            check!(isize, i32=> sident; qv: *; qa: *; qaW: *);\r
++            check!(isize, i64=> sident; qv: *; qa: *; qaW: *);\r
++            check!(isize, u32=> uident; qv: u32=> qa: u32=> qaW: *;\r
++                v: -1, !RU; v: 4_294_967_296, !RO;\r
++            );\r
++            check!(isize, u64=> uident; qv: +; qa: +; qaW: *;\r
++                v: -1, !Uf;\r
++            );\r
++            check!(isize, usize=> uident; qv: +; qa: +; qaW: *;\r
++                v: -1, !Uf;\r
++            );\r
++        }\r
++    }\r
++}\r
++\r
++#[test]\r
++fn test_usize() {\r
++    check!(usize, i8=> uident; qv: +i8=> qa: +i8=> qaW: *;\r
++        v: 128, !Of;\r
++    );\r
++    check!(usize, i16=> uident; qv: +i16=> qa: +i16=> qaW: *;\r
++        v: 32_768, !Of;\r
++    );\r
++    check!(usize, u8=> uident; qv: u8=> qa: u8=> qaW: *;\r
++        v: 256, !Of;\r
++    );\r
++    check!(usize, u16=> uident; qv: u16=> qa: u16=> qaW: *;\r
++        v: 65_536, !Of;\r
++    );\r
++    check!(usize, usize=> uident; qv: *; qa: *; qaW: *);\r
++    for_bitness! {\r
++        32 {\r
++            check!(usize, i32=> uident; qv: +i32=> qa: +i32=> qaW: *);\r
++            check!(usize, i64=> uident; qv: *; qa: *; qaW: *);\r
++            check!(usize, u32=> uident; qv: *; qa: *; qaW: *);\r
++            check!(usize, u64=> uident; qv: *; qa: *; qaW: *);\r
++            check!(usize, isize=> uident; qv: +isize=> qa: +isize=> qaW: *);\r
++        }\r
++        64 {\r
++            check!(usize, i32=> uident; qv: +i32=> qa: +i32=> qaW: *);\r
++            check!(usize, i64=> uident; qv: +i64=> qa: +i64=> qaW: *);\r
++            check!(usize, u32=> uident; qv: u32=> qa: u32=> qaW: *;\r
++                v: 4_294_967_296, !Of;\r
++            );\r
++            check!(usize, u64=> uident; qv: *; qa: *; qaW: *);\r
++            check!(usize, isize=> uident; qv: +isize=> qa: +isize=> qaW: *);\r
++        }\r
++    }\r
++}\r
++\r
++#[test]\r
++fn test_i_to_f() {\r
++    check!(i8,  f32=> sident; qv: *; qa: *);\r
++    check!(i16, f32=> sident; qv: *; qa: *);\r
++    check!(i32, f32=> sident; qv: (+-16_777_216); qa: *;\r
++        v: -16_777_217, !RU; v: 16_777_217, !RO;\r
++    );\r
++    check!(i64, f32=> sident; qv: (+-16_777_216); qa: *;\r
++        v: -16_777_217, !RU; v: 16_777_217, !RO;\r
++    );\r
++    check!(isize, f32=> sident; qv: (+-16_777_216); qa: *;\r
++        v: -16_777_217, !RU; v: 16_777_217, !RO;\r
++    );\r
++\r
++    check!(u8,  f32=> uident; qv: *; qa: *);\r
++    check!(u16, f32=> uident; qv: *; qa: *);\r
++    check!(u32, f32=> uident; qv: (, 16_777_216); qa: *;\r
++        v: 16_777_217, !Of;\r
++    );\r
++    check!(u64, f32=> uident; qv: (, 16_777_216); qa: *;\r
++        v: 16_777_217, !Of;\r
++    );\r
++    check!(usize, f32=> uident; qv: (, 16_777_216); qa: *;\r
++        v: 16_777_217, !Of;\r
++    );\r
++\r
++    check!(i8,  f64=> sident; qv: *; qa: *);\r
++    check!(i16, f64=> sident; qv: *; qa: *);\r
++    check!(i32, f64=> sident; qv: *; qa: *);\r
++    check!(i64, f64=> sident; qv: (+-9_007_199_254_740_992); qa: *;\r
++        v: -9_007_199_254_740_993, !RU; v: 9_007_199_254_740_993, !RO;\r
++    );\r
++    for_bitness! {\r
++        32 {\r
++            check!(isize, f64=> sident; qv: *; qa: *);\r
++        }\r
++        64 {\r
++            check!(i64, f64=> sident; qv: (+-9_007_199_254_740_992); qa: *;\r
++                v: -9_007_199_254_740_993, !RU; v: 9_007_199_254_740_993, !RO;\r
++            );\r
++        }\r
++    }\r
++\r
++    check!(u8,  f64=> uident; qv: *; qa: *);\r
++    check!(u16, f64=> uident; qv: *; qa: *);\r
++    check!(u32, f64=> uident; qv: *; qa: *);\r
++    check!(u64, f64=> uident; qv: (, 9_007_199_254_740_992); qa: *;\r
++        v: 9_007_199_254_740_993, !Of;\r
++    );\r
++    for_bitness! {\r
++        32 {\r
++            check!(usize, f64=> uident; qv: *; qa: *);\r
++        }\r
++        64 {\r
++            check!(u64, f64=> uident; qv: (, 9_007_199_254_740_992); qa: *;\r
++                v: 9_007_199_254_740_993, !Of;\r
++            );\r
++        }\r
++    }\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..921dec7c4ebcdc606267e88b9409e0e82bee212b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,31 @@@
++extern crate conv;\r
++\r
++#[macro_use] mod util;\r
++\r
++use conv::*;\r
++\r
++macro_rules! cty {\r
++    ($e:expr, $t:ty) => {\r
++        { let v: $t = $e; v }\r
++    };\r
++}\r
++\r
++#[test]\r
++fn test_unwraps() {\r
++    assert_eq!(cty!(0i16.value_into().unwrap(), i32), 0);\r
++    assert_eq!(cty!(127i16.value_into().unwrap(), i8), 127);\r
++    assert_eq!(cty!(128i16.value_into().unwrap_or_saturate(), i8), 127);\r
++    assert_eq!(cty!(128i16.approx().unwrap_or_saturate(), i8), 127);\r
++    assert_eq!(cty!(128i16.approx_by::<Wrapping>().unwrap_or_saturate(), i8), -128);\r
++\r
++    assert_eq!(cty!(16_777_216i32.value_into().unwrap(), f32), 16_777_216.0);\r
++    assert_eq!(cty!(16_777_216i32.value_into().unwrap_or_inf(), f32), 16_777_216.0);\r
++    assert_eq!(cty!(16_777_217i32.value_into().unwrap_or_inf(), f32), std::f32::INFINITY);\r
++    assert_eq!(cty!((-16_777_217i32).value_into().unwrap_or_inf(), f32), std::f32::NEG_INFINITY);\r
++\r
++    assert_eq!(cty!(16_777_216i32.value_into().unwrap_or_invalid(), f32), 16_777_216.0);\r
++    assert!(cty!(16_777_217i32.value_into().unwrap_or_invalid(), f32).is_nan());\r
++    assert!(cty!((-16_777_217i32).value_into().unwrap_or_invalid(), f32).is_nan());\r
++\r
++    assert_eq!(cty!(0u8.value_into().unwrap_ok(), u16), 0);\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9400dacc5ccbea7e16e1c2efc0b376f9e65786a1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++//! Are conversions easily usable in generic code?\r
++extern crate conv;\r
++\r
++use conv::prelude::*;\r
++\r
++#[test]\r
++fn test_generic_unwrap() {\r
++    fn do_conv<T, U>(t: T) -> U\r
++    where T: ValueInto<U> {\r
++        t.value_into().unwrap()\r
++    }\r
++\r
++    assert_eq!({let x: u8 = do_conv(42i32); x}, 42u8);\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9bb5abfc584091e4295279849f6f17e8265aeadd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,509 @@@
++macro_rules! SL {\r
++    ($($tts:tt)*) => { stringify!($($tts)*) };\r
++}\r
++\r
++macro_rules! as_expr {\r
++    ($e:expr) => {$e};\r
++}\r
++\r
++macro_rules! check {\r
++    (@ $from:ty, $to:ty=> $(;)*) => {};\r
++\r
++    (@ $from:ty, $to:ty=> cident; $($tail:tt)*) => {\r
++        check!(@ $from, $to=> v: '\x00';);\r
++        check!(@ $from, $to=> v: '\x01';);\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> uident; $($tail:tt)*) => {\r
++        check!(@ $from, $to=> v: 0;);\r
++        check!(@ $from, $to=> v: 1;);\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> sident; $($tail:tt)*) => {\r
++        check!(@ $from, $to=> v: -1;);\r
++        check!(@ $from, $to=> v: 0;);\r
++        check!(@ $from, $to=> v: 1;);\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> fident; $($tail:tt)*) => {\r
++        check!(@ $from, $to=> v: -1.0;);\r
++        check!(@ $from, $to=> v:  0.0;);\r
++        check!(@ $from, $to=> v:  1.0;);\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> uidenta; $($tail:tt)*) => {\r
++        check!(@ $from, $to=> a: 0.0;);\r
++        check!(@ $from, $to=> a: 1.0;);\r
++\r
++        check!(@ $from, $to=> aRTN: 0.00, 0;);\r
++        check!(@ $from, $to=> aRTN: 0.25, 0;);\r
++        check!(@ $from, $to=> aRTN: 0.50, 1;);\r
++        check!(@ $from, $to=> aRTN: 0.75, 1;);\r
++        check!(@ $from, $to=> aRTN: 1.00, 1;);\r
++\r
++        check!(@ $from, $to=> aRNI:  0.00,  0;);\r
++        check!(@ $from, $to=> aRNI:  0.25,  0;);\r
++        check!(@ $from, $to=> aRNI:  0.50,  0;);\r
++        check!(@ $from, $to=> aRNI:  0.75,  0;);\r
++        check!(@ $from, $to=> aRNI:  1.00,  1;);\r
++\r
++        check!(@ $from, $to=> aRPI:  0.00,  0;);\r
++        check!(@ $from, $to=> aRPI:  0.25,  1;);\r
++        check!(@ $from, $to=> aRPI:  0.50,  1;);\r
++        check!(@ $from, $to=> aRPI:  0.75,  1;);\r
++        check!(@ $from, $to=> aRPI:  1.00,  1;);\r
++\r
++        check!(@ $from, $to=> aRTZ:  0.00,  0;);\r
++        check!(@ $from, $to=> aRTZ:  0.25,  0;);\r
++        check!(@ $from, $to=> aRTZ:  0.50,  0;);\r
++        check!(@ $from, $to=> aRTZ:  0.75,  0;);\r
++        check!(@ $from, $to=> aRTZ:  1.00,  1;);\r
++\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> sidenta; $($tail:tt)*) => {\r
++        check!(@ $from, $to=> a: -1.0;);\r
++        check!(@ $from, $to=> a:  0.0;);\r
++        check!(@ $from, $to=> a:  1.0;);\r
++\r
++        check!(@ $from, $to=> aRTN: -1.00, -1;);\r
++        check!(@ $from, $to=> aRTN: -0.75, -1;);\r
++        check!(@ $from, $to=> aRTN: -0.50, -1;);\r
++        check!(@ $from, $to=> aRTN: -0.25,  0;);\r
++        check!(@ $from, $to=> aRTN:  0.00,  0;);\r
++        check!(@ $from, $to=> aRTN:  0.25,  0;);\r
++        check!(@ $from, $to=> aRTN:  0.50,  1;);\r
++        check!(@ $from, $to=> aRTN:  0.75,  1;);\r
++        check!(@ $from, $to=> aRTN:  1.00,  1;);\r
++\r
++        check!(@ $from, $to=> aRNI: -1.00, -1;);\r
++        check!(@ $from, $to=> aRNI: -0.75, -1;);\r
++        check!(@ $from, $to=> aRNI: -0.50, -1;);\r
++        check!(@ $from, $to=> aRNI: -0.25, -1;);\r
++        check!(@ $from, $to=> aRNI:  0.00,  0;);\r
++        check!(@ $from, $to=> aRNI:  0.25,  0;);\r
++        check!(@ $from, $to=> aRNI:  0.50,  0;);\r
++        check!(@ $from, $to=> aRNI:  0.75,  0;);\r
++        check!(@ $from, $to=> aRNI:  1.00,  1;);\r
++\r
++        check!(@ $from, $to=> aRPI: -1.00, -1;);\r
++        check!(@ $from, $to=> aRPI: -0.75,  0;);\r
++        check!(@ $from, $to=> aRPI: -0.50,  0;);\r
++        check!(@ $from, $to=> aRPI: -0.25,  0;);\r
++        check!(@ $from, $to=> aRPI:  0.00,  0;);\r
++        check!(@ $from, $to=> aRPI:  0.25,  1;);\r
++        check!(@ $from, $to=> aRPI:  0.50,  1;);\r
++        check!(@ $from, $to=> aRPI:  0.75,  1;);\r
++        check!(@ $from, $to=> aRPI:  1.00,  1;);\r
++\r
++        check!(@ $from, $to=> aRTZ: -1.00, -1;);\r
++        check!(@ $from, $to=> aRTZ: -0.75,  0;);\r
++        check!(@ $from, $to=> aRTZ: -0.50,  0;);\r
++        check!(@ $from, $to=> aRTZ: -0.25,  0;);\r
++        check!(@ $from, $to=> aRTZ:  0.00,  0;);\r
++        check!(@ $from, $to=> aRTZ:  0.25,  0;);\r
++        check!(@ $from, $to=> aRTZ:  0.50,  0;);\r
++        check!(@ $from, $to=> aRTZ:  0.75,  0;);\r
++        check!(@ $from, $to=> aRTZ:  1.00,  1;);\r
++\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> fidenta; $($tail:tt)*) => {\r
++        check!(@ $from, $to=> a: -1.0;);\r
++        check!(@ $from, $to=> a:  0.0;);\r
++        check!(@ $from, $to=> a:  1.0;);\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> v: $src:expr, !$dst:expr; $($tail:tt)*) => {\r
++        {\r
++            println!("? {} => {}, v: {}, !{}", SL!($from), SL!($to), SL!($src), SL!($dst));\r
++            let src: $from = $src;\r
++            let dst: Result<$to, _> = src.value_into();\r
++            assert_eq!(dst, Err($dst(src)));\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> v: $src:expr; $($tail:tt)*) => {\r
++        {\r
++            println!("? {} => {}, v: {}", SL!($from), SL!($to), SL!($src));\r
++            let src: $from = $src;\r
++            let dst: Result<$to, _> = src.value_into();\r
++            assert_eq!(dst, Ok($src as $to));\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> qv: *; $($tail:tt)*) => {\r
++        {\r
++            extern crate quickcheck;\r
++            println!("? {} => {}, qv: *", SL!($from), SL!($to));\r
++\r
++            fn property(v: $from) -> bool {\r
++                let dst: Result<$to, _> = v.value_into();\r
++                dst == Ok(v as $to)\r
++            }\r
++\r
++            let mut qc = quickcheck::QuickCheck::new();\r
++            match qc.quicktest(property as fn($from) -> bool) {\r
++                Ok(_) => (),\r
++                Err(err) => panic!("qv {:?}", err)\r
++            }\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> qv: (+-$bound:expr); $($tail:tt)*) => {\r
++        {\r
++            extern crate quickcheck;\r
++            println!("? {} => {}, qv: (+- {})", SL!($from), SL!($to), SL!($bound));\r
++\r
++            fn property(v: $from) -> bool {\r
++                let dst: Result<$to, conv::FloatError<_>> = v.value_into().map_err(From::from);\r
++                if !(-$bound as $from <= v) {\r
++                    dst == Err(conv::FloatError::NegOverflow(v))\r
++                } else if !(v <= $bound as $from) {\r
++                    dst == Err(conv::FloatError::PosOverflow(v))\r
++                } else {\r
++                    dst == Ok(v as $to)\r
++                }\r
++            }\r
++\r
++            let mut qc = quickcheck::QuickCheck::new();\r
++            match qc.quicktest(property as fn($from) -> bool) {\r
++                Ok(_) => (),\r
++                Err(err) => panic!("qv {:?}", err)\r
++            }\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> qv: (, $bound:expr); $($tail:tt)*) => {\r
++        {\r
++            extern crate quickcheck;\r
++            println!("? {} => {}, qv: (, {})", SL!($from), SL!($to), SL!($bound));\r
++\r
++            fn property(v: $from) -> bool {\r
++                let dst: Result<$to, conv::FloatError<_>> = v.value_into().map_err(From::from);\r
++                if !(v <= $bound as $from) {\r
++                    dst == Err(conv::FloatError::PosOverflow(v))\r
++                } else {\r
++                    dst == Ok(v as $to)\r
++                }\r
++            }\r
++\r
++            let mut qc = quickcheck::QuickCheck::new();\r
++            match qc.quicktest(property as fn($from) -> bool) {\r
++                Ok(_) => (),\r
++                Err(err) => panic!("qv {:?}", err)\r
++            }\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> qv: +; $($tail:tt)*) => {\r
++        {\r
++            extern crate quickcheck;\r
++            println!("? {} => {}, qv: +", SL!($from), SL!($to));\r
++\r
++            fn property(v: $from) -> bool {\r
++                let dst: Result<$to, conv::FloatError<_>> = v.value_into().map_err(From::from);\r
++                if !(0 <= v) {\r
++                    dst == Err(conv::FloatError::NegOverflow(v))\r
++                } else {\r
++                    dst == Ok(v as $to)\r
++                }\r
++            }\r
++\r
++            let mut qc = quickcheck::QuickCheck::new();\r
++            match qc.quicktest(property as fn($from) -> bool) {\r
++                Ok(_) => (),\r
++                Err(err) => panic!("qv {:?}", err)\r
++            }\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> qv: +$max:ty=> $($tail:tt)*) => {\r
++        {\r
++            extern crate quickcheck;\r
++            println!("? {} => {}, qv: +{}", SL!($from), SL!($to), SL!($max));\r
++\r
++            fn property(v: $from) -> bool {\r
++                let dst: Result<$to, conv::FloatError<_>> = v.value_into().map_err(From::from);\r
++                if !(v <= <$max>::max_value() as $from) {\r
++                    dst == Err(conv::FloatError::PosOverflow(v))\r
++                } else {\r
++                    dst == Ok(v as $to)\r
++                }\r
++            }\r
++\r
++            let mut qc = quickcheck::QuickCheck::new();\r
++            match qc.quicktest(property as fn($from) -> bool) {\r
++                Ok(_) => (),\r
++                Err(err) => panic!("qv {:?}", err)\r
++            }\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> qv: $bound:ty=> $($tail:tt)*) => {\r
++        {\r
++            extern crate quickcheck;\r
++            println!("? {} => {}, qv: {}", SL!($from), SL!($to), SL!($bound));\r
++\r
++            fn property(v: $from) -> bool {\r
++                let dst: Result<$to, conv::FloatError<_>> = v.value_into().map_err(From::from);\r
++                if !(<$bound>::min_value() as $from <= v) {\r
++                    dst == Err(conv::FloatError::NegOverflow(v))\r
++                } else if !(v <= <$bound>::max_value() as $from) {\r
++                    dst == Err(conv::FloatError::PosOverflow(v))\r
++                } else {\r
++                    dst == Ok(v as $to)\r
++                }\r
++            }\r
++\r
++            let mut qc = quickcheck::QuickCheck::new();\r
++            match qc.quicktest(property as fn($from) -> bool) {\r
++                Ok(_) => (),\r
++                Err(err) => panic!("qv {:?}", err)\r
++            }\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> qv: $min:ty, $max:ty=> $($tail:tt)*) => {\r
++        {\r
++            extern crate quickcheck;\r
++            println!("? {} => {}, qv: {}, {}", SL!($from), SL!($to), SL!($min), SL!($max));\r
++\r
++            fn property(v: $from) -> bool {\r
++                let dst: Result<$to, conv::FloatError<_>> = v.value_into().map_err(From::from);\r
++                if !(<$min>::min_value() as $from <= v) {\r
++                    dst == Err(conv::FloatError::NegOverflow(v))\r
++                } else if !(v <= <$max>::max_value() as $from) {\r
++                    dst == Err(conv::FloatError::PosOverflow(v))\r
++                } else {\r
++                    dst == Ok(v as $to)\r
++                }\r
++            }\r
++\r
++            let mut qc = quickcheck::QuickCheck::new();\r
++            match qc.quicktest(property as fn($from) -> bool) {\r
++                Ok(_) => (),\r
++                Err(err) => panic!("qv {:?}", err)\r
++            }\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> a: $src:expr, !$dst:expr; $($tail:tt)*) => {\r
++        {\r
++            println!("? {} => {}, a: {}, !{}", SL!($from), SL!($to), SL!($src), SL!($dst));\r
++            let src: $from = $src;\r
++            let dst: Result<$to, _> = src.approx_as();\r
++            assert_eq!(dst, Err($dst(src)));\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> a: $src:expr, $dst:expr; $($tail:tt)*) => {\r
++        {\r
++            println!("? {} => {}, a: {}, {}", SL!($from), SL!($to), SL!($src), SL!($dst));\r
++            let src: $from = $src;\r
++            let dst: Result<$to, _> = src.approx_as();\r
++            assert_eq!(dst, Ok($dst));\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> a: $src:expr; $($tail:tt)*) => {\r
++        {\r
++            println!("? {} => {}, a: {}", SL!($from), SL!($to), SL!($src));\r
++            let src: $from = $src;\r
++            let dst: Result<$to, _> = src.approx_as();\r
++            assert_eq!(dst, Ok($src as $to));\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> qa: *; $($tail:tt)*) => {\r
++        {\r
++            println!("? {} => {}, qa: *", SL!($from), SL!($to));\r
++            extern crate quickcheck;\r
++\r
++            fn property(v: $from) -> bool {\r
++                let dst: Result<$to, _> = v.approx_as();\r
++                dst == Ok(v as $to)\r
++            }\r
++\r
++            let mut qc = quickcheck::QuickCheck::new();\r
++            match qc.quicktest(property as fn($from) -> bool) {\r
++                Ok(_) => (),\r
++                Err(err) => panic!("qa {:?}", err)\r
++            }\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> qa: +; $($tail:tt)*) => {\r
++        {\r
++            extern crate quickcheck;\r
++            println!("? {} => {}, qa: +", SL!($from), SL!($to));\r
++\r
++            fn property(v: $from) -> bool {\r
++                let dst: Result<$to, conv::FloatError<_>> = v.approx_as().map_err(From::from);\r
++                if !(0 <= v) {\r
++                    dst == Err(conv::FloatError::NegOverflow(v))\r
++                } else {\r
++                    dst == Ok(v as $to)\r
++                }\r
++            }\r
++\r
++            let mut qc = quickcheck::QuickCheck::new();\r
++            match qc.quicktest(property as fn($from) -> bool) {\r
++                Ok(_) => (),\r
++                Err(err) => panic!("qa {:?}", err)\r
++            }\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> qa: +$max:ty=> $($tail:tt)*) => {\r
++        {\r
++            extern crate quickcheck;\r
++            println!("? {} => {}, qa: +{}", SL!($from), SL!($to), SL!($max));\r
++\r
++            fn property(v: $from) -> bool {\r
++                let dst: Result<$to, conv::FloatError<_>> = v.approx_as().map_err(From::from);\r
++                if !(v <= <$max>::max_value() as $from) {\r
++                    dst == Err(conv::FloatError::PosOverflow(v))\r
++                } else {\r
++                    dst == Ok(v as $to)\r
++                }\r
++            }\r
++\r
++            let mut qc = quickcheck::QuickCheck::new();\r
++            match qc.quicktest(property as fn($from) -> bool) {\r
++                Ok(_) => (),\r
++                Err(err) => panic!("qa {:?}", err)\r
++            }\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> qa: $bound:ty=> $($tail:tt)*) => {\r
++        {\r
++            extern crate quickcheck;\r
++            println!("? {} => {}, qa: {}", SL!($from), SL!($to), SL!($bound));\r
++\r
++            fn property(v: $from) -> bool {\r
++                let dst: Result<$to, conv::FloatError<_>> = v.approx_as().map_err(From::from);\r
++                if !(<$bound>::min_value() as $from <= v) {\r
++                    dst == Err(conv::FloatError::NegOverflow(v))\r
++                } else if !(v <= <$bound>::max_value() as $from) {\r
++                    dst == Err(conv::FloatError::PosOverflow(v))\r
++                } else {\r
++                    dst == Ok(v as $to)\r
++                }\r
++            }\r
++\r
++            let mut qc = quickcheck::QuickCheck::new();\r
++            match qc.quicktest(property as fn($from) -> bool) {\r
++                Ok(_) => (),\r
++                Err(err) => panic!("qa {:?}", err)\r
++            }\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> qaW: *; $($tail:tt)*) => {\r
++        {\r
++            extern crate quickcheck;\r
++            println!("? {} => {}, qaW: *", SL!($from), SL!($to));\r
++\r
++            fn property(v: $from) -> bool {\r
++                let dst: Result<$to, _> = v.approx_as_by::<_, Wrapping>();\r
++                dst == Ok(v as $to)\r
++            }\r
++\r
++            let mut qc = quickcheck::QuickCheck::new();\r
++            match qc.quicktest(property as fn($from) -> bool) {\r
++                Ok(_) => (),\r
++                Err(err) => panic!("qaW {:?}", err)\r
++            }\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> aRTN: $src:expr, $dst:expr; $($tail:tt)*) => {\r
++        {\r
++            println!("? {} => {}, aRTN: {}, {}", SL!($from), SL!($to), SL!($src), SL!($dst));\r
++            let src: $from = $src;\r
++            let dst: Result<$to, _> = src.approx_by::<conv::RoundToNearest>();\r
++            assert_eq!(dst, Ok($dst));\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> aRNI: $src:expr, $dst:expr; $($tail:tt)*) => {\r
++        {\r
++            println!("? {} => {}, aRNI: {}, {}", SL!($from), SL!($to), SL!($src), SL!($dst));\r
++            let src: $from = $src;\r
++            let dst: Result<$to, _> = src.approx_by::<conv::RoundToNegInf>();\r
++            assert_eq!(dst, Ok($dst));\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> aRPI: $src:expr, $dst:expr; $($tail:tt)*) => {\r
++        {\r
++            println!("? {} => {}, aRPI: {}, {}", SL!($from), SL!($to), SL!($src), SL!($dst));\r
++            let src: $from = $src;\r
++            let dst: Result<$to, _> = src.approx_by::<conv::RoundToPosInf>();\r
++            assert_eq!(dst, Ok($dst));\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    (@ $from:ty, $to:ty=> aRTZ: $src:expr, $dst:expr; $($tail:tt)*) => {\r
++        {\r
++            println!("? {} => {}, aRTZ: {}, {}", SL!($from), SL!($to), SL!($src), SL!($dst));\r
++            let src: $from = $src;\r
++            let dst: Result<$to, _> = src.approx_by::<conv::RoundToZero>();\r
++            assert_eq!(dst, Ok($dst));\r
++        }\r
++        check!(@ $from, $to=> $($tail)*);\r
++    };\r
++\r
++    ($from:ty, $to:ty=> $($tail:tt)*) => {\r
++        check! { @ $from, $to=> $($tail)*; }\r
++    };\r
++}\r
++\r
++macro_rules! for_bitness {\r
++    (32 {$($bits32:tt)*} 64 {$($bits64:tt)*}) => {\r
++        as_expr!(\r
++            {\r
++                #[cfg(target_pointer_width="32")]\r
++                fn for_bitness() {\r
++                    $($bits32)*\r
++                }\r
++\r
++                #[cfg(target_pointer_width="64")]\r
++                fn for_bitness() {\r
++                    $($bits64)*\r
++                }\r
++\r
++                for_bitness()\r
++            }\r
++        )\r
++    };\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d372e42f758267ffe4658eb3fc7c22840fc66eb8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"5909502e547762013619f4c4e01cc7393c20fe2d52d7fa471c1210adb2320dc7"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b20557ccc8a0d875c643226f8308c8c64b56da8e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,29 @@@
++# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
++#
++# When uploading crates to the registry Cargo will automatically
++# "normalize" Cargo.toml files for maximal compatibility
++# with all versions of Cargo and also rewrite `path` dependencies
++# to registry (e.g. crates.io) dependencies
++#
++# If you believe there's an error in this file please file an
++# issue against the rust-lang/cargo repository. If you're
++# editing this file be aware that the upstream Cargo.toml
++# will likely look very different (and much more reasonable)
++
++[package]
++name = "core-foundation"
++version = "0.4.4"
++authors = ["The Servo Project Developers"]
++description = "Bindings to Core Foundation for OS X"
++homepage = "https://github.com/servo/core-foundation-rs"
++license = "MIT / Apache-2.0"
++repository = "https://github.com/servo/core-foundation-rs"
++[dependencies.libc]
++version = "0.2"
++
++[dependencies.core-foundation-sys]
++version = "0.4.4"
++
++[features]
++mac_os_10_8_features = ["core-foundation-sys/mac_os_10_8_features"]
++mac_os_10_7_support = ["core-foundation-sys/mac_os_10_7_support"]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3859b0a5b0f62178a431d21ed6dff472a63fdf5c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,160 @@@
++// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Heterogeneous immutable arrays.
++
++pub use core_foundation_sys::array::*;
++pub use core_foundation_sys::base::{CFIndex, CFRelease};
++use core_foundation_sys::base::{CFTypeRef, kCFAllocatorDefault};
++use libc::c_void;
++use std::mem;
++
++use base::{CFIndexConvertible, TCFType, CFRange};
++
++/// A heterogeneous immutable array.
++pub struct CFArray(CFArrayRef);
++
++impl Drop for CFArray {
++    fn drop(&mut self) {
++        unsafe {
++            CFRelease(self.as_CFTypeRef())
++        }
++    }
++}
++
++pub struct CFArrayIterator<'a> {
++    array: &'a CFArray,
++    index: CFIndex,
++}
++
++impl<'a> Iterator for CFArrayIterator<'a> {
++    type Item = *const c_void;
++
++    fn next(&mut self) -> Option<*const c_void> {
++        if self.index >= self.array.len() {
++            None
++        } else {
++            let value = self.array.get(self.index);
++            self.index += 1;
++            Some(value)
++        }
++    }
++}
++
++impl_TCFType!(CFArray, CFArrayRef, CFArrayGetTypeID);
++
++impl CFArray {
++    /// Creates a new `CFArray` with the given elements, which must be `CFType` objects.
++    pub fn from_CFTypes<R, T>(elems: &[T]) -> CFArray where T: TCFType<R> {
++        unsafe {
++            let elems: Vec<CFTypeRef> = elems.iter().map(|elem| elem.as_CFTypeRef()).collect();
++            let array_ref = CFArrayCreate(kCFAllocatorDefault,
++                                          mem::transmute(elems.as_ptr()),
++                                          elems.len().to_CFIndex(),
++                                          &kCFTypeArrayCallBacks);
++            TCFType::wrap_under_create_rule(array_ref)
++        }
++    }
++
++    /// Iterates over the elements of this `CFArray`.
++    ///
++    /// Careful; the loop body must wrap the reference properly. Generally, when array elements are
++    /// Core Foundation objects (not always true), they need to be wrapped with
++    /// `TCFType::wrap_under_get_rule()`.
++    #[inline]
++    pub fn iter<'a>(&'a self) -> CFArrayIterator<'a> {
++        CFArrayIterator {
++            array: self,
++            index: 0
++        }
++    }
++
++    #[inline]
++    pub fn len(&self) -> CFIndex {
++        unsafe {
++            CFArrayGetCount(self.0)
++        }
++    }
++
++    #[inline]
++    pub fn get(&self, index: CFIndex) -> *const c_void {
++        assert!(index < self.len());
++        unsafe {
++            CFArrayGetValueAtIndex(self.0, index)
++        }
++    }
++
++    pub fn get_values(&self, range: CFRange) -> Vec<*const c_void> {
++        let mut vec = Vec::with_capacity(range.length as usize);
++        unsafe {
++            CFArrayGetValues(self.0, range, vec.as_mut_ptr());
++            vec.set_len(range.length as usize);
++            vec
++        }
++    }
++
++    pub fn get_all_values(&self) -> Vec<*const c_void> {
++        self.get_values(CFRange {
++            location: 0,
++            length: self.len()
++        })
++    }
++}
++
++impl<'a> IntoIterator for &'a CFArray {
++    type Item = *const c_void;
++    type IntoIter = CFArrayIterator<'a>;
++
++    fn into_iter(self) -> CFArrayIterator<'a> {
++        self.iter()
++    }
++}
++
++#[test]
++fn should_box_and_unbox() {
++    use number::{CFNumber, number};
++
++    let n1 = number(1);
++    let n2 = number(2);
++    let n3 = number(3);
++    let n4 = number(4);
++    let n5 = number(5);
++
++    let arr = CFArray::from_CFTypes(&[
++        n1.as_CFType(),
++        n2.as_CFType(),
++        n3.as_CFType(),
++        n4.as_CFType(),
++        n5.as_CFType(),
++    ]);
++
++    assert!(arr.get_all_values() == &[n1.as_CFTypeRef(),
++                                      n2.as_CFTypeRef(),
++                                      n3.as_CFTypeRef(),
++                                      n4.as_CFTypeRef(),
++                                      n5.as_CFTypeRef()]);
++
++    unsafe {
++        let mut sum = 0;
++
++        for elem in arr.iter() {
++            let number: CFNumber = TCFType::wrap_under_get_rule(mem::transmute(elem));
++            sum += number.to_i64().unwrap()
++        }
++
++        assert!(sum == 15);
++
++        for elem in arr.iter() {
++            let number: CFNumber = TCFType::wrap_under_get_rule(mem::transmute(elem));
++            sum += number.to_i64().unwrap()
++        }
++
++        assert!(sum == 30);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3f4bcea169f2a45cbf513bf11c9be167bf5345b8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,142 @@@
++// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++pub use core_foundation_sys::base::*;
++
++pub trait CFIndexConvertible {
++    /// Always use this method to construct a `CFIndex` value. It performs bounds checking to
++    /// ensure the value is in range.
++    fn to_CFIndex(self) -> CFIndex;
++}
++
++impl CFIndexConvertible for usize {
++    #[inline]
++    fn to_CFIndex(self) -> CFIndex {
++        let max_CFIndex = CFIndex::max_value();
++        if self > (max_CFIndex as usize) {
++            panic!("value out of range")
++        }
++        self as CFIndex
++    }
++}
++
++/// Superclass of all Core Foundation objects.
++pub struct CFType(CFTypeRef);
++
++impl Clone for CFType {
++    #[inline]
++    fn clone(&self) -> CFType {
++        unsafe {
++            TCFType::wrap_under_get_rule(self.0)
++        }
++    }
++}
++
++impl Drop for CFType {
++    fn drop(&mut self) {
++        unsafe {
++            CFRelease(self.0)
++        }
++    }
++}
++
++/// All Core Foundation types implement this trait. The type parameter `TypeRef` specifies the
++/// associated Core Foundation type: e.g. for `CFType` this is `CFTypeRef`; for `CFArray` this is
++/// `CFArrayRef`.
++pub trait TCFType<ConcreteTypeRef> {
++    /// Returns the object as its concrete TypeRef.
++    fn as_concrete_TypeRef(&self) -> ConcreteTypeRef;
++
++    /// Returns an instance of the object, wrapping the underlying `CFTypeRef` subclass. Use this
++    /// when following Core Foundation's "Create Rule". The reference count is *not* bumped.
++    unsafe fn wrap_under_create_rule(obj: ConcreteTypeRef) -> Self;
++
++    /// Returns the type ID for this class.
++    fn type_id() -> CFTypeID;
++
++    /// Returns the object as a wrapped `CFType`. The reference count is incremented by one.
++    #[inline]
++    fn as_CFType(&self) -> CFType {
++        unsafe {
++            TCFType::wrap_under_get_rule(self.as_CFTypeRef())
++        }
++    }
++
++    /// Returns the object as a raw `CFTypeRef`. The reference count is not adjusted.
++    fn as_CFTypeRef(&self) -> CFTypeRef;
++
++    /// Returns an instance of the object, wrapping the underlying `CFTypeRef` subclass. Use this
++    /// when following Core Foundation's "Get Rule". The reference count *is* bumped.
++    unsafe fn wrap_under_get_rule(reference: ConcreteTypeRef) -> Self;
++
++    /// Returns the reference count of the object. It is unwise to do anything other than test
++    /// whether the return value of this method is greater than zero.
++    #[inline]
++    fn retain_count(&self) -> CFIndex {
++        unsafe {
++            CFGetRetainCount(self.as_CFTypeRef())
++        }
++    }
++
++    /// Returns the type ID of this object.
++    #[inline]
++    fn type_of(&self) -> CFTypeID {
++        unsafe {
++            CFGetTypeID(self.as_CFTypeRef())
++        }
++    }
++
++    /// Writes a debugging version of this object on standard error.
++    fn show(&self) {
++        unsafe {
++            CFShow(self.as_CFTypeRef())
++        }
++    }
++
++    /// Returns true if this value is an instance of another type.
++    #[inline]
++    fn instance_of<OtherConcreteTypeRef,OtherCFType:TCFType<OtherConcreteTypeRef>>(&self) -> bool {
++        self.type_of() == <OtherCFType as TCFType<_>>::type_id()
++    }
++}
++
++impl TCFType<CFTypeRef> for CFType {
++    #[inline]
++    fn as_concrete_TypeRef(&self) -> CFTypeRef {
++        self.0
++    }
++
++    #[inline]
++    unsafe fn wrap_under_get_rule(reference: CFTypeRef) -> CFType {
++        let reference: CFTypeRef = CFRetain(reference);
++        TCFType::wrap_under_create_rule(reference)
++    }
++
++    #[inline]
++    fn as_CFTypeRef(&self) -> CFTypeRef {
++        self.as_concrete_TypeRef()
++    }
++
++    #[inline]
++    unsafe fn wrap_under_create_rule(obj: CFTypeRef) -> CFType {
++        CFType(obj)
++    }
++
++    #[inline]
++    fn type_id() -> CFTypeID {
++        // FIXME(pcwalton): Is this right?
++        0
++    }
++
++    #[inline]
++    fn instance_of<OtherConcreteTypeRef,OtherCFType:TCFType<OtherConcreteTypeRef>>(&self) -> bool {
++        // Since this is the root of the type hierarchy, we always answer yes.
++        true
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8e6ca3bf83e0ac51599f94f602fa7c38df2ebbc5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,44 @@@
++// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! A Boolean type.
++
++use core_foundation_sys::base::{CFRelease};
++pub use core_foundation_sys::number::{CFBooleanRef, CFBooleanGetTypeID, kCFBooleanTrue, kCFBooleanFalse};
++
++use base::TCFType;
++
++/// A Boolean type.
++///
++/// FIXME(pcwalton): Should be a newtype struct, but that fails due to a Rust compiler bug.
++pub struct CFBoolean(CFBooleanRef);
++
++impl Drop for CFBoolean {
++    fn drop(&mut self) {
++        unsafe {
++            CFRelease(self.as_CFTypeRef())
++        }
++    }
++}
++
++impl_TCFType!(CFBoolean, CFBooleanRef, CFBooleanGetTypeID);
++
++impl CFBoolean {
++    pub fn true_value() -> CFBoolean {
++        unsafe {
++            TCFType::wrap_under_get_rule(kCFBooleanTrue)
++        }
++    }
++
++    pub fn false_value() -> CFBoolean {
++        unsafe {
++            TCFType::wrap_under_get_rule(kCFBooleanFalse)
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4d75c302f142493636a9fd19450ca753ab6b6972
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,127 @@@
++// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Core Foundation Bundle Type
++
++pub use core_foundation_sys::bundle::*;
++use core_foundation_sys::base::{CFRelease, kCFAllocatorDefault};
++
++use base::TCFType;
++use url::CFURL;
++use dictionary::CFDictionary;
++
++/// A Bundle type.
++pub struct CFBundle(CFBundleRef);
++
++impl Drop for CFBundle {
++    fn drop(&mut self) {
++        unsafe {
++            CFRelease(self.as_CFTypeRef())
++        }
++    }
++}
++
++impl CFBundle {
++    pub fn new(bundleURL: CFURL) -> Option<CFBundle> {
++        unsafe {
++            let bundle_ref = CFBundleCreate(kCFAllocatorDefault, bundleURL.as_concrete_TypeRef());
++            if bundle_ref.is_null() {
++                None
++            } else {
++                Some(TCFType::wrap_under_create_rule(bundle_ref))
++            }
++        }
++    }
++
++    pub fn main_bundle() -> CFBundle {
++        unsafe {
++            let bundle_ref = CFBundleGetMainBundle();
++            TCFType::wrap_under_get_rule(bundle_ref)
++        }
++    }
++
++    pub fn info_dictionary(&self) -> CFDictionary {
++        unsafe {
++            let info_dictionary = CFBundleGetInfoDictionary(self.0);
++            TCFType::wrap_under_get_rule(info_dictionary)
++        }
++    }
++
++    pub fn executable_url(&self) -> Option<CFURL> {
++        unsafe {
++            let exe_url = CFBundleCopyExecutableURL(self.0);
++            if exe_url.is_null() {
++                None
++            } else {
++                Some(TCFType::wrap_under_create_rule(exe_url))
++            }
++        }
++    }
++
++    pub fn private_frameworks_url(&self) -> Option<CFURL> {
++        unsafe {
++            let fw_url = CFBundleCopyPrivateFrameworksURL(self.0);
++            if fw_url.is_null() {
++                None
++            } else {
++                Some(TCFType::wrap_under_create_rule(fw_url))
++            }
++        }
++    }
++}
++
++impl_TCFType!(CFBundle, CFBundleRef, CFBundleGetTypeID);
++
++#[test]
++fn safari_executable_url() {
++    use string::CFString;
++    use url::{CFURL, kCFURLPOSIXPathStyle};
++
++    let cfstr_path = CFString::from_static_string("/Applications/Safari.app");
++    let cfurl_path = CFURL::from_file_system_path(cfstr_path, kCFURLPOSIXPathStyle, true);
++    let cfurl_executable = CFBundle::new(cfurl_path)
++        .expect("Safari not present")
++        .executable_url();
++    assert!(cfurl_executable.is_some());
++    assert_eq!(cfurl_executable
++                   .unwrap()
++                   .absolute()
++                   .get_file_system_path(kCFURLPOSIXPathStyle)
++                   .to_string(),
++               "/Applications/Safari.app/Contents/MacOS/Safari");
++}
++
++#[test]
++fn safari_private_frameworks_url() {
++    use string::CFString;
++    use url::{CFURL, kCFURLPOSIXPathStyle};
++
++    let cfstr_path = CFString::from_static_string("/Applications/Safari.app");
++    let cfurl_path = CFURL::from_file_system_path(cfstr_path, kCFURLPOSIXPathStyle, true);
++    let cfurl_executable = CFBundle::new(cfurl_path)
++        .expect("Safari not present")
++        .private_frameworks_url();
++    assert!(cfurl_executable.is_some());
++    assert_eq!(cfurl_executable
++                   .unwrap()
++                   .absolute()
++                   .get_file_system_path(kCFURLPOSIXPathStyle)
++                   .to_string(),
++               "/Applications/Safari.app/Contents/Frameworks");
++}
++
++#[test]
++fn non_existant_bundle() {
++    use string::CFString;
++    use url::{CFURL, kCFURLPOSIXPathStyle};
++
++    let cfstr_path = CFString::from_static_string("/usr/local/foo");
++    let cfurl_path = CFURL::from_file_system_path(cfstr_path, kCFURLPOSIXPathStyle, true);
++    assert!(CFBundle::new(cfurl_path).is_none());
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7d83a615c13e594d55f3beae69a6be8176849e59
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,68 @@@
++// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Core Foundation byte buffers.
++
++pub use core_foundation_sys::data::*;
++use core_foundation_sys::base::{CFIndex, CFRelease};
++use core_foundation_sys::base::{kCFAllocatorDefault};
++use std::ops::Deref;
++use std::slice;
++
++use base::{CFIndexConvertible, TCFType};
++
++/// A byte buffer.
++pub struct CFData(CFDataRef);
++
++impl Drop for CFData {
++    fn drop(&mut self) {
++        unsafe {
++            CFRelease(self.as_CFTypeRef())
++        }
++    }
++}
++
++impl_TCFType!(CFData, CFDataRef, CFDataGetTypeID);
++
++impl CFData {
++    pub fn from_buffer(buffer: &[u8]) -> CFData {
++        unsafe {
++            let data_ref = CFDataCreate(kCFAllocatorDefault,
++                                        buffer.as_ptr(),
++                                        buffer.len().to_CFIndex());
++            TCFType::wrap_under_create_rule(data_ref)
++        }
++    }
++
++    /// Returns a pointer to the underlying bytes in this data. Note that this byte buffer is
++    /// read-only.
++    #[inline]
++    pub fn bytes<'a>(&'a self) -> &'a [u8] {
++        unsafe {
++            slice::from_raw_parts(CFDataGetBytePtr(self.0), self.len() as usize)
++        }
++    }
++
++    /// Returns the length of this byte buffer.
++    #[inline]
++    pub fn len(&self) -> CFIndex {
++        unsafe {
++            CFDataGetLength(self.0)
++        }
++    }
++}
++
++impl Deref for CFData {
++    type Target = [u8];
++
++    #[inline]
++    fn deref(&self) -> &[u8] {
++        self.bytes()
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9953c4b105002e14df1dfe32a75c67c4408a6232
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,118 @@@
++// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Dictionaries of key-value pairs.
++
++pub use core_foundation_sys::dictionary::*;
++use core_foundation_sys::base::CFRelease;
++use core_foundation_sys::base::{CFTypeRef, kCFAllocatorDefault};
++use libc::c_void;
++use std::mem;
++use std::ptr;
++
++use base::{CFType, CFIndexConvertible, TCFType};
++
++/// An immutable dictionary of key-value pairs.
++pub struct CFDictionary(CFDictionaryRef);
++
++impl Drop for CFDictionary {
++    fn drop(&mut self) {
++        unsafe {
++            CFRelease(self.as_CFTypeRef())
++        }
++    }
++}
++
++impl_TCFType!(CFDictionary, CFDictionaryRef, CFDictionaryGetTypeID);
++
++impl CFDictionary {
++    pub fn from_CFType_pairs<R1, R2, K, V>(pairs: &[(K, V)]) -> CFDictionary
++            where K: TCFType<R1>, V: TCFType<R2> {
++        let (keys, values): (Vec<CFTypeRef>,Vec<CFTypeRef>) =
++            pairs.iter()
++            .map(|&(ref key, ref value)| (key.as_CFTypeRef(), value.as_CFTypeRef()))
++            .unzip();
++
++        unsafe {
++            let dictionary_ref = CFDictionaryCreate(kCFAllocatorDefault,
++                                                    mem::transmute(keys.as_ptr()),
++                                                    mem::transmute(values.as_ptr()),
++                                                    keys.len().to_CFIndex(),
++                                                    &kCFTypeDictionaryKeyCallBacks,
++                                                    &kCFTypeDictionaryValueCallBacks);
++            TCFType::wrap_under_create_rule(dictionary_ref)
++        }
++    }
++
++    #[inline]
++    pub fn len(&self) -> usize {
++        unsafe {
++            CFDictionaryGetCount(self.0) as usize
++        }
++    }
++
++    #[inline]
++    pub fn is_empty(&self) -> bool {
++        self.len() == 0
++    }
++
++    #[inline]
++    pub fn contains_key(&self, key: *const c_void) -> bool {
++        unsafe {
++            CFDictionaryContainsKey(self.0, key) != 0
++        }
++    }
++
++    #[inline]
++    pub fn find(&self, key: *const c_void) -> Option<*const c_void> {
++        unsafe {
++            let mut value: *const c_void = ptr::null();
++            if CFDictionaryGetValueIfPresent(self.0, key, &mut value) != 0 {
++                Some(value)
++            } else {
++                None
++            }
++        }
++    }
++
++    #[inline]
++    pub fn get(&self, key: *const c_void) -> *const c_void {
++        let value = self.find(key);
++        if value.is_none() {
++            panic!("No entry found for key {:p}", key);
++        }
++        value.unwrap()
++    }
++
++    /// A convenience function to retrieve `CFType` instances.
++    #[inline]
++    pub unsafe fn get_CFType(&self, key: *const c_void) -> CFType {
++        let value: CFTypeRef = mem::transmute(self.get(key));
++        TCFType::wrap_under_get_rule(value)
++    }
++
++    #[inline]
++    pub unsafe fn set_value(&self, key: *const c_void, value: *const c_void) {
++        CFDictionarySetValue(self.0, key, value)
++    }
++
++    pub fn get_keys_and_values(&self) -> (Vec<*const c_void>, Vec<*const c_void>) {
++        let length = self.len();
++        let mut keys = Vec::with_capacity(length);
++        let mut values = Vec::with_capacity(length);
++
++        unsafe {
++            CFDictionaryGetKeysAndValues(self.0, keys.as_mut_ptr(), values.as_mut_ptr());
++            keys.set_len(length);
++            values.set_len(length);
++        }
++
++        (keys, values)
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..af9b26f4e166a0fcf8b8786fcec493f1637aff26
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,77 @@@
++// Copyright 2016 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Core Foundation errors.
++
++use core_foundation_sys::error::*;
++use core_foundation_sys::base::CFRelease;
++use std::error::Error;
++use std::fmt;
++
++use base::{CFIndex, TCFType};
++use string::CFString;
++
++/// An error value.
++pub struct CFError(CFErrorRef);
++
++impl Drop for CFError {
++    fn drop(&mut self) {
++        unsafe {
++            CFRelease(self.as_CFTypeRef())
++        }
++    }
++}
++
++impl_TCFType!(CFError, CFErrorRef, CFErrorGetTypeID);
++
++impl fmt::Debug for CFError {
++    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++        fmt.debug_struct("CFError")
++           .field("domain", &self.domain())
++           .field("code", &self.code())
++           .field("description", &self.description())
++           .finish()
++    }
++}
++
++impl fmt::Display for CFError {
++    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++        write!(fmt, "{}", self.description())
++    }
++}
++
++impl Error for CFError {
++    fn description(&self) -> &str {
++        "a Core Foundation error"
++    }
++}
++
++impl CFError {
++    /// Returns a string identifying the domain with which this error is
++    /// associated.
++    pub fn domain(&self) -> CFString {
++        unsafe {
++            let s = CFErrorGetDomain(self.0);
++            CFString::wrap_under_get_rule(s)
++        }
++    }
++
++    /// Returns the code identifying this type of error.
++    pub fn code(&self) -> CFIndex {
++        unsafe { CFErrorGetCode(self.0) }
++    }
++
++    /// Returns a human-presentable description of the error.
++    pub fn description(&self) -> CFString {
++        unsafe {
++            let s = CFErrorCopyDescription(self.0);
++            CFString::wrap_under_create_rule(s)
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f4ca71d83f4180eb7477ffb7293e3ee6806b488b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,98 @@@
++// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++#![allow(non_snake_case)]
++
++extern crate core_foundation_sys;
++extern crate libc;
++
++#[macro_export]
++macro_rules! impl_TCFType {
++    ($ty:ident, $raw:ident, $ty_id:ident) => {
++        impl $crate::base::TCFType<$raw> for $ty {
++            #[inline]
++            fn as_concrete_TypeRef(&self) -> $raw {
++                self.0
++            }
++
++            #[inline]
++            unsafe fn wrap_under_get_rule(reference: $raw) -> $ty {
++                let reference = ::std::mem::transmute(::core_foundation_sys::base::CFRetain(::std::mem::transmute(reference)));
++                $crate::base::TCFType::wrap_under_create_rule(reference)
++            }
++
++            #[inline]
++            fn as_CFTypeRef(&self) -> ::core_foundation_sys::base::CFTypeRef {
++                unsafe {
++                    ::std::mem::transmute(self.as_concrete_TypeRef())
++                }
++            }
++
++            #[inline]
++            unsafe fn wrap_under_create_rule(obj: $raw) -> $ty {
++                $ty(obj)
++            }
++
++            #[inline]
++            fn type_id() -> ::core_foundation_sys::base::CFTypeID {
++                unsafe {
++                    $ty_id()
++                }
++            }
++        }
++    }
++}
++
++pub mod array;
++pub mod base;
++pub mod boolean;
++pub mod data;
++pub use core_foundation_sys::date; // back compat
++pub mod dictionary;
++pub mod error;
++pub mod number;
++pub mod set;
++pub mod string;
++pub mod url;
++pub mod bundle;
++pub mod propertylist;
++pub mod runloop;
++
++#[cfg(test)]
++pub mod test {
++    #[test]
++    fn test_stuff() {
++        use base::TCFType;
++        use boolean::CFBoolean;
++        use number::number;
++        use dictionary::CFDictionary;
++        use string::CFString;
++
++        /*let n = CFNumber::new_number(42 as i32);
++        io::println(format!("%d", (&n).retain_count() as int));
++        (&n).show();*/
++
++        let bar = CFString::from_static_string("Bar");
++        let baz = CFString::from_static_string("Baz");
++        let boo = CFString::from_static_string("Boo");
++        let foo = CFString::from_static_string("Foo");
++        let tru = CFBoolean::true_value();
++        let n42 = number(42);
++
++        let d = CFDictionary::from_CFType_pairs(&[
++            (bar.as_CFType(), boo.as_CFType()),
++            (baz.as_CFType(), tru.as_CFType()),
++            (foo.as_CFType(), n42.as_CFType()),
++        ]);
++
++        let (v1, v2) = d.get_keys_and_values();
++
++        assert!(v1 == &[bar.as_CFTypeRef(), baz.as_CFTypeRef(), foo.as_CFTypeRef()]);
++        assert!(v2 == &[boo.as_CFTypeRef(), tru.as_CFTypeRef(), n42.as_CFTypeRef()]);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..771c75eb984cf4fef6e3a20258e04c369ea5d2df
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,85 @@@
++// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Immutable numbers.
++
++use core_foundation_sys::base::{CFRelease, kCFAllocatorDefault};
++pub use core_foundation_sys::number::*;
++use std::mem;
++
++use base::{TCFType};
++
++/// An immutable numeric value.
++pub struct CFNumber(CFNumberRef);
++
++impl Drop for CFNumber {
++    fn drop(&mut self) {
++        unsafe {
++            CFRelease(self.as_CFTypeRef())
++        }
++    }
++}
++
++impl_TCFType!(CFNumber, CFNumberRef, CFNumberGetTypeID);
++
++// TODO(pcwalton): Floating point.
++impl CFNumber {
++    #[inline]
++    pub fn from_i32(value: i32) -> CFNumber {
++        unsafe {
++            let number_ref = CFNumberCreate(kCFAllocatorDefault,
++                                            kCFNumberSInt32Type,
++                                            mem::transmute(&value));
++            TCFType::wrap_under_create_rule(number_ref)
++        }
++    }
++
++    #[inline]
++    pub fn to_i64(&self) -> Option<i64> {
++        unsafe {
++            let mut value: i64 = 0;
++            let ok = CFNumberGetValue(self.0, kCFNumberSInt64Type, mem::transmute(&mut value));
++            if ok { Some(value) } else { None }
++        }
++    }
++
++    #[inline]
++    pub fn to_f64(&self) -> Option<f64> {
++        unsafe {
++            let mut value: f64 = 0.0;
++            let ok = CFNumberGetValue(self.0, kCFNumberFloat64Type, mem::transmute(&mut value));
++            if ok { Some(value) } else { None }
++        }
++    }
++
++    #[inline]
++    pub fn from_i64(value: i64) -> CFNumber {
++        unsafe {
++            let number_ref = CFNumberCreate(kCFAllocatorDefault,
++                                            kCFNumberSInt64Type,
++                                            mem::transmute(&value));
++            TCFType::wrap_under_create_rule(number_ref)
++        }
++    }
++
++    #[inline]
++    pub fn from_f64(value: f64) -> CFNumber {
++        unsafe {
++            let number_ref = CFNumberCreate(kCFAllocatorDefault,
++                                            kCFNumberFloat64Type,
++                                            mem::transmute(&value));
++            TCFType::wrap_under_create_rule(number_ref)
++        }
++    }
++}
++
++/// A convenience function to create CFNumbers.
++pub fn number(value: i64) -> CFNumber {
++    CFNumber::from_i64(value)
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9b175fe4c310f50c6cf1227ef2842787713d8d44
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,87 @@@
++// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Core Foundation property lists
++
++use std::ptr;
++
++use libc::c_void;
++
++use error::CFError;
++use data::CFData;
++use base::{TCFType};
++
++pub use core_foundation_sys::propertylist::*;
++use core_foundation_sys::error::CFErrorRef;
++use core_foundation_sys::base::{kCFAllocatorDefault};
++
++pub fn create_with_data(data: CFData,
++                        options: CFPropertyListMutabilityOptions)
++                        -> Result<(*const c_void, CFPropertyListFormat), CFError> {
++    unsafe {
++        let mut error: CFErrorRef = ptr::null_mut();
++        let mut format: CFPropertyListFormat = 0;
++        let property_list = CFPropertyListCreateWithData(kCFAllocatorDefault,
++                                                         data.as_concrete_TypeRef(),
++                                                         options,
++                                                         &mut format,
++                                                         &mut error);
++        if property_list.is_null() {
++            Err(TCFType::wrap_under_create_rule(error))
++        } else {
++            Ok((property_list, format))
++        }
++    }
++}
++
++pub fn create_data(property_list: *const c_void, format: CFPropertyListFormat) -> Result<CFData, CFError> {
++    unsafe {
++        let mut error: CFErrorRef = ptr::null_mut();
++        let data_ref = CFPropertyListCreateData(kCFAllocatorDefault,
++                                                property_list,
++                                                format,
++                                                0,
++                                                &mut error);
++        if data_ref.is_null() {
++            Err(TCFType::wrap_under_create_rule(error))
++        } else {
++            Ok(TCFType::wrap_under_create_rule(data_ref))
++        }
++    }
++}
++
++#[cfg(test)]
++pub mod test {
++    #[test]
++    fn test_property_list_serialization() {
++        use base::{TCFType, CFEqual};
++        use boolean::CFBoolean;
++        use number::number;
++        use dictionary::CFDictionary;
++        use string::CFString;
++        use super::*;
++
++        let bar = CFString::from_static_string("Bar");
++        let baz = CFString::from_static_string("Baz");
++        let boo = CFString::from_static_string("Boo");
++        let foo = CFString::from_static_string("Foo");
++        let tru = CFBoolean::true_value();
++        let n42 = number(42);
++
++        let dict1 = CFDictionary::from_CFType_pairs(&[(bar.as_CFType(), boo.as_CFType()),
++                                                      (baz.as_CFType(), tru.as_CFType()),
++                                                      (foo.as_CFType(), n42.as_CFType())]);
++
++        let data = create_data(dict1.as_CFTypeRef(), kCFPropertyListXMLFormat_v1_0).unwrap();
++        let (dict2, _) = create_with_data(data, kCFPropertyListImmutable).unwrap();
++        unsafe {
++            assert!(CFEqual(dict1.as_CFTypeRef(), dict2) == 1);
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ccc1f78edbc9f75d0494c0a8556709402b943d70
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,141 @@@
++// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++#![allow(non_upper_case_globals)]
++
++pub use core_foundation_sys::runloop::*;
++use core_foundation_sys::base::{CFIndex, CFRelease};
++use core_foundation_sys::base::{kCFAllocatorDefault, CFOptionFlags};
++use core_foundation_sys::string::CFStringRef;
++use core_foundation_sys::date::{CFAbsoluteTime, CFTimeInterval};
++
++use base::{TCFType};
++use string::{CFString};
++
++pub struct CFRunLoop(CFRunLoopRef);
++
++impl Drop for CFRunLoop {
++    fn drop(&mut self) {
++        unsafe {
++            CFRelease(self.as_CFTypeRef())
++        }
++    }
++}
++
++impl_TCFType!(CFRunLoop, CFRunLoopRef, CFRunLoopGetTypeID);
++
++impl CFRunLoop {
++    pub fn get_current() -> CFRunLoop {
++        unsafe {
++            let run_loop_ref = CFRunLoopGetCurrent();
++            TCFType::wrap_under_get_rule(run_loop_ref)
++        }
++    }
++
++    pub fn get_main() -> CFRunLoop {
++        unsafe {
++            let run_loop_ref = CFRunLoopGetMain();
++            TCFType::wrap_under_get_rule(run_loop_ref)
++        }
++    }
++
++    pub fn run_current() {
++        unsafe {
++            CFRunLoopRun();
++        }
++    }
++
++    pub fn stop(&self) {
++        unsafe {
++            CFRunLoopStop(self.0);
++        }
++    }
++
++    pub fn current_mode(&self) -> Option<String> {
++        unsafe {
++            let string_ref = CFRunLoopCopyCurrentMode(self.0);
++            if string_ref.is_null() {
++                return None;
++            }
++
++            let cf_string: CFString = TCFType::wrap_under_create_rule(string_ref);
++            Some(cf_string.to_string())
++        }
++    }
++
++    pub fn contains_timer(&self, timer: &CFRunLoopTimer, mode: CFStringRef) -> bool {
++        unsafe {
++            CFRunLoopContainsTimer(self.0, timer.0, mode) != 0
++        }
++    }
++
++    pub fn add_timer(&self, timer: &CFRunLoopTimer, mode: CFStringRef) {
++        unsafe {
++            CFRunLoopAddTimer(self.0, timer.0, mode);
++        }
++    }
++
++}
++
++pub struct CFRunLoopTimer(CFRunLoopTimerRef);
++
++impl Drop for CFRunLoopTimer {
++    fn drop(&mut self) {
++        unsafe {
++            CFRelease(self.as_CFTypeRef())
++        }
++    }
++}
++
++impl_TCFType!(CFRunLoopTimer, CFRunLoopTimerRef, CFRunLoopTimerGetTypeID);
++
++impl CFRunLoopTimer {
++    pub fn new(fireDate: CFAbsoluteTime, interval: CFTimeInterval, flags: CFOptionFlags, order: CFIndex, callout: CFRunLoopTimerCallBack, context: *mut CFRunLoopTimerContext) -> CFRunLoopTimer {
++        unsafe {
++            let timer_ref = CFRunLoopTimerCreate(kCFAllocatorDefault, fireDate, interval, flags, order, callout, context);
++            TCFType::wrap_under_create_rule(timer_ref)
++        }
++    }
++}
++
++#[cfg(test)]
++mod test {
++    use super::*;
++    use core_foundation_sys::date::{CFAbsoluteTime, CFAbsoluteTimeGetCurrent};
++    use std::mem;
++    use libc::c_void;
++
++    #[test]
++    fn wait_200_milliseconds() {
++        let run_loop = CFRunLoop::get_current();
++        let mut now = unsafe { CFAbsoluteTimeGetCurrent() };
++        let mut context = unsafe { CFRunLoopTimerContext {
++            version: 0,
++            info: mem::transmute(&mut now),
++            retain: mem::zeroed(),
++            release: mem::zeroed(),
++            copyDescription: mem::zeroed(),
++        } };
++
++
++        let run_loop_timer = CFRunLoopTimer::new(now + 0.20f64, 0f64, 0, 0, timer_popped, &mut context);
++        unsafe {
++            run_loop.add_timer(&run_loop_timer, kCFRunLoopDefaultMode);
++        }
++        CFRunLoop::run_current();
++    }
++
++    extern "C" fn timer_popped(_timer: CFRunLoopTimerRef, _info: *mut c_void) {
++        let previous_now_ptr: *const CFAbsoluteTime = unsafe { mem::transmute(_info) };
++        let previous_now = unsafe { *previous_now_ptr };
++        let now = unsafe { CFAbsoluteTimeGetCurrent() };
++        assert!(now - previous_now > 0.19 && now - previous_now < 0.21);
++        CFRunLoop::get_current().stop();
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8224a20907c5b6976f96910b3821c934b304b788
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,45 @@@
++// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! An immutable bag of elements.
++
++pub use core_foundation_sys::set::*;
++use core_foundation_sys::base::CFRelease;
++use core_foundation_sys::base::{CFTypeRef, kCFAllocatorDefault};
++
++use base::{CFIndexConvertible, TCFType};
++
++use std::mem;
++
++/// An immutable bag of elements.
++pub struct CFSet(CFSetRef);
++
++impl Drop for CFSet {
++    fn drop(&mut self) {
++        unsafe {
++            CFRelease(self.as_CFTypeRef())
++        }
++    }
++}
++
++impl_TCFType!(CFSet, CFSetRef, CFSetGetTypeID);
++
++impl CFSet {
++    /// Creates a new set from a list of `CFType` instances.
++    pub fn from_slice<R, T>(elems: &[T]) -> CFSet where T: TCFType<R> {
++        unsafe {
++            let elems: Vec<CFTypeRef> = elems.iter().map(|elem| elem.as_CFTypeRef()).collect();
++            let set_ref = CFSetCreate(kCFAllocatorDefault,
++                                      mem::transmute(elems.as_ptr()),
++                                      elems.len().to_CFIndex(),
++                                      &kCFTypeSetCallBacks);
++            TCFType::wrap_under_create_rule(set_ref)
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..051ca9a4e3b2be5b9c02870c28b6b892572b4abe
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,152 @@@
++// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Immutable strings.
++
++pub use core_foundation_sys::string::*;
++
++use base::{CFIndexConvertible, TCFType};
++
++use core_foundation_sys::base::{Boolean, CFIndex, CFRange, CFRelease};
++use core_foundation_sys::base::{kCFAllocatorDefault, kCFAllocatorNull};
++use std::fmt;
++use std::str::{self, FromStr};
++use std::ptr;
++use std::ffi::CStr;
++
++/// An immutable string in one of a variety of encodings.
++pub struct CFString(CFStringRef);
++
++impl Clone for CFString {
++    #[inline]
++    fn clone(&self) -> CFString {
++        unsafe {
++            TCFType::wrap_under_get_rule(self.0)
++        }
++    }
++}
++
++impl Drop for CFString {
++    fn drop(&mut self) {
++        unsafe {
++            CFRelease(self.as_CFTypeRef())
++        }
++    }
++}
++
++impl_TCFType!(CFString, CFStringRef, CFStringGetTypeID);
++
++impl FromStr for CFString {
++    type Err = ();
++
++    /// See also CFString::new for a variant of this which does not return a Result
++    #[inline]
++    fn from_str(string: &str) -> Result<CFString, ()> {
++        Ok(CFString::new(string))
++    }
++}
++
++impl fmt::Display for CFString {
++    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++        unsafe {
++            // Do this without allocating if we can get away with it
++            let c_string = CFStringGetCStringPtr(self.0, kCFStringEncodingUTF8);
++            if c_string != ptr::null() {
++                let c_str = CStr::from_ptr(c_string);
++                fmt.write_str(str::from_utf8_unchecked(c_str.to_bytes()))
++            } else {
++                let char_len = self.char_len();
++
++                // First, ask how big the buffer ought to be.
++                let mut bytes_required: CFIndex = 0;
++                CFStringGetBytes(self.0,
++                                 CFRange { location: 0, length: char_len },
++                                 kCFStringEncodingUTF8,
++                                 0,
++                                 false as Boolean,
++                                 ptr::null_mut(),
++                                 0,
++                                 &mut bytes_required);
++
++                // Then, allocate the buffer and actually copy.
++                let mut buffer = vec![b'\x00'; bytes_required as usize];
++
++                let mut bytes_used: CFIndex = 0;
++                let chars_written = CFStringGetBytes(self.0,
++                                                     CFRange { location: 0, length: char_len },
++                                                     kCFStringEncodingUTF8,
++                                                     0,
++                                                     false as Boolean,
++                                                     buffer.as_mut_ptr(),
++                                                     buffer.len().to_CFIndex(),
++                                                     &mut bytes_used) as usize;
++                assert!(chars_written.to_CFIndex() == char_len);
++
++                // This is dangerous; we over-allocate and null-terminate the string (during
++                // initialization).
++                assert!(bytes_used == buffer.len().to_CFIndex());
++                fmt.write_str(str::from_utf8_unchecked(&buffer))
++            }
++        }
++    }
++}
++
++impl fmt::Debug for CFString {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write!(f, "\"{}\"", self)
++    }
++}
++
++
++impl CFString {
++    /// Creates a new `CFString` instance from a Rust string.
++    #[inline]
++    pub fn new(string: &str) -> CFString {
++        unsafe {
++            let string_ref = CFStringCreateWithBytes(kCFAllocatorDefault,
++                                                     string.as_ptr(),
++                                                     string.len().to_CFIndex(),
++                                                     kCFStringEncodingUTF8,
++                                                     false as Boolean,
++                                                     kCFAllocatorNull);
++            CFString::wrap_under_create_rule(string_ref)
++        }
++    }
++
++    /// Like `CFString::new`, but references a string that can be used as a backing store
++    /// by virtue of being statically allocated.
++    #[inline]
++    pub fn from_static_string(string: &'static str) -> CFString {
++        unsafe {
++            let string_ref = CFStringCreateWithBytesNoCopy(kCFAllocatorDefault,
++                                                           string.as_ptr(),
++                                                           string.len().to_CFIndex(),
++                                                           kCFStringEncodingUTF8,
++                                                           false as Boolean,
++                                                           kCFAllocatorNull);
++            TCFType::wrap_under_create_rule(string_ref)
++        }
++    }
++
++    /// Returns the number of characters in the string.
++    #[inline]
++    pub fn char_len(&self) -> CFIndex {
++        unsafe {
++            CFStringGetLength(self.0)
++        }
++    }
++}
++
++#[test]
++fn string_and_back() {
++    let original = "The quick brown fox jumped over the slow lazy dog.";
++    let cfstr = CFString::from_static_string(original);
++    let converted = cfstr.to_string();
++    assert!(converted == original);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..34c53b7541749f288574275db7f6e99e262e06f4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,120 @@@
++// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! A URL type for Core Foundation.
++
++pub use core_foundation_sys::url::*;
++
++use base::{TCFType, CFIndex};
++use string::{CFString};
++
++use core_foundation_sys::base::{kCFAllocatorDefault, CFRelease};
++use std::fmt;
++use std::ptr;
++use std::path::Path;
++
++pub struct CFURL(CFURLRef);
++
++impl Drop for CFURL {
++    fn drop(&mut self) {
++        unsafe {
++            CFRelease(self.as_CFTypeRef())
++        }
++    }
++}
++
++impl_TCFType!(CFURL, CFURLRef, CFURLGetTypeID);
++
++impl fmt::Debug for CFURL {
++    #[inline]
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        unsafe {
++            let string: CFString = TCFType::wrap_under_get_rule(CFURLGetString(self.0));
++            write!(f, "{}", string.to_string())
++        }
++    }
++}
++
++impl CFURL {
++    pub fn from_path<P: AsRef<Path>>(path: P, isDirectory: bool) -> Option<CFURL> {
++        let path = match path.as_ref().to_str() {
++            Some(path) => path,
++            None => return None,
++        };
++
++        unsafe {
++            let url_ref = CFURLCreateFromFileSystemRepresentation(ptr::null_mut(), path.as_ptr(), path.len() as CFIndex, isDirectory as u8);
++            if url_ref.is_null() {
++                return None;
++            }
++            Some(TCFType::wrap_under_create_rule(url_ref))
++        }
++    }
++
++    pub fn from_file_system_path(filePath: CFString, pathStyle: CFURLPathStyle, isDirectory: bool) -> CFURL {
++        unsafe {
++            let url_ref = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, filePath.as_concrete_TypeRef(), pathStyle, isDirectory as u8);
++            TCFType::wrap_under_create_rule(url_ref)
++        }
++    }
++
++    pub fn get_string(&self) -> CFString {
++        unsafe {
++            TCFType::wrap_under_get_rule(CFURLGetString(self.0))
++        }
++    }
++
++    pub fn get_file_system_path(&self, pathStyle: CFURLPathStyle) -> CFString {
++        unsafe {
++            TCFType::wrap_under_create_rule(CFURLCopyFileSystemPath(self.as_concrete_TypeRef(), pathStyle))
++        }
++    }
++
++    pub fn absolute(&self) -> CFURL {
++        unsafe {
++            TCFType::wrap_under_create_rule(CFURLCopyAbsoluteURL(self.as_concrete_TypeRef()))
++        }
++    }
++}
++
++#[test]
++fn file_url_from_path() {
++    let path = "/usr/local/foo/";
++    let cfstr_path = CFString::from_static_string(path);
++    let cfurl = CFURL::from_file_system_path(cfstr_path, kCFURLPOSIXPathStyle, true);
++    assert_eq!(cfurl.get_string().to_string(), "file:///usr/local/foo/");
++}
++
++#[test]
++fn absolute_file_url() {
++    use core_foundation_sys::url::CFURLCreateWithFileSystemPathRelativeToBase;
++    use std::path::PathBuf;
++
++    let path = "/usr/local/foo";
++    let file = "bar";
++
++    let cfstr_path = CFString::from_static_string(path);
++    let cfstr_file = CFString::from_static_string(file);
++    let cfurl_base = CFURL::from_file_system_path(cfstr_path, kCFURLPOSIXPathStyle, true);
++    let cfurl_relative: CFURL = unsafe {
++        let url_ref = CFURLCreateWithFileSystemPathRelativeToBase(kCFAllocatorDefault,
++            cfstr_file.as_concrete_TypeRef(),
++            kCFURLPOSIXPathStyle,
++            false as u8,
++            cfurl_base.as_concrete_TypeRef());
++        TCFType::wrap_under_create_rule(url_ref)
++    };
++
++    let mut absolute_path = PathBuf::from(path);
++    absolute_path.push(file);
++
++    assert_eq!(cfurl_relative.get_file_system_path(kCFURLPOSIXPathStyle).to_string(), file);
++    assert_eq!(cfurl_relative.absolute().get_file_system_path(kCFURLPOSIXPathStyle).to_string(),
++        absolute_path.to_str().unwrap());
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e2dfddf96df266052b69e1105d276ec7680a99a9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"bc9fb3d6cb663e6fd7cf1c63f9b144ee2b1e4a78595a0451dd34bff85b9a3387"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a4d63964c02e52796feaceb5288ce84192dac21c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,27 @@@
++# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
++#
++# When uploading crates to the registry Cargo will automatically
++# "normalize" Cargo.toml files for maximal compatibility
++# with all versions of Cargo and also rewrite `path` dependencies
++# to registry (e.g. crates.io) dependencies
++#
++# If you believe there's an error in this file please file an
++# issue against the rust-lang/cargo repository. If you're
++# editing this file be aware that the upstream Cargo.toml
++# will likely look very different (and much more reasonable)
++
++[package]
++name = "core-foundation-sys"
++version = "0.4.4"
++authors = ["The Servo Project Developers"]
++build = "build.rs"
++description = "Bindings to Core Foundation for OS X"
++homepage = "https://github.com/servo/core-foundation-rs"
++license = "MIT / Apache-2.0"
++repository = "https://github.com/servo/core-foundation-rs"
++[dependencies.libc]
++version = "0.2"
++
++[features]
++mac_os_10_7_support = []
++mac_os_10_8_features = []
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1f03b0602eadde2185f87b43998951f752045200
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++// Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++fn main() {
++    if std::env::var("TARGET").unwrap().contains("-apple") {
++        println!("cargo:rustc-link-lib=framework=CoreFoundation");
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2574ecae42f68973791a2b1b78f3c7360ff61ba2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,61 @@@
++// Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use libc::c_void;
++
++use base::{CFRange, CFIndex, CFAllocatorRef, CFTypeID};
++
++/// FIXME(pcwalton): This is wrong.
++pub type CFArrayRetainCallBack = *const u8;
++
++/// FIXME(pcwalton): This is wrong.
++pub type CFArrayReleaseCallBack = *const u8;
++
++/// FIXME(pcwalton): This is wrong.
++pub type CFArrayCopyDescriptionCallBack = *const u8;
++
++/// FIXME(pcwalton): This is wrong.
++pub type CFArrayEqualCallBack = *const u8;
++
++#[repr(C)]
++#[derive(Clone, Copy)]
++pub struct CFArrayCallBacks {
++    pub version: CFIndex,
++    pub retain: CFArrayRetainCallBack,
++    pub release: CFArrayReleaseCallBack,
++    pub copyDescription: CFArrayCopyDescriptionCallBack,
++    pub equal: CFArrayEqualCallBack,
++}
++
++#[repr(C)]
++pub struct __CFArray(c_void);
++
++pub type CFArrayRef = *const __CFArray;
++
++extern {
++    /*
++     * CFArray.h
++     */
++    pub static kCFTypeArrayCallBacks: CFArrayCallBacks;
++
++    pub fn CFArrayCreate(allocator: CFAllocatorRef, values: *const *const c_void,
++                     numValues: CFIndex, callBacks: *const CFArrayCallBacks) -> CFArrayRef;
++    pub fn CFArrayCreateCopy(allocator: CFAllocatorRef , theArray: CFArrayRef) -> CFArrayRef;
++    
++    // CFArrayBSearchValues
++    // CFArrayContainsValue
++    pub fn CFArrayGetCount(theArray: CFArrayRef) -> CFIndex;
++    // CFArrayGetCountOfValue
++    // CFArrayGetFirstIndexOfValue
++    // CFArrayGetLastIndexOfValue
++    pub fn CFArrayGetValues(theArray: CFArrayRef, range: CFRange, values: *mut *const c_void);
++    pub fn CFArrayGetValueAtIndex(theArray: CFArrayRef, idx: CFIndex) -> *const c_void;
++    // CFArrayApplyFunction
++    pub fn CFArrayGetTypeID() -> CFTypeID;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..42e2946120b158b343081066928631cc8597462f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,76 @@@
++// Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use libc::{c_uint, c_long, c_ulong, c_void, c_int};
++
++pub type Boolean = u8;
++pub type CFIndex = c_long;
++pub type mach_port_t = c_uint;
++pub type CFAllocatorRef = *const c_void;
++pub type CFNullRef = *const c_void;
++pub type CFHashCode = c_ulong;
++pub type CFTypeID = c_ulong;
++pub type CFTypeRef = *const c_void;
++pub type CFOptionFlags = u32;
++pub type OSStatus = i32;
++pub type SInt32 = c_int;
++
++#[repr(C)]
++#[derive(Clone, Copy)]
++pub struct CFRange {
++    pub location: CFIndex,
++    pub length: CFIndex
++}
++
++// for back-compat
++impl CFRange {
++    pub fn init(location: CFIndex, length: CFIndex) -> CFRange {
++        CFRange {
++            location: location,
++            length: length,
++        }
++    }
++}
++
++extern {
++    /*
++     * CFBase.h
++     */
++
++    /* CFAllocator Reference */
++    // N.B. Many CFAllocator functions and constants are omitted here.
++    pub static kCFAllocatorDefault: CFAllocatorRef;
++    pub static kCFAllocatorSystemDefault: CFAllocatorRef;
++    pub static kCFAllocatorMalloc: CFAllocatorRef;
++    pub static kCFAllocatorMallocZone: CFAllocatorRef;
++    pub static kCFAllocatorNull: CFAllocatorRef;
++    pub static kCFAllocatorUseContext: CFAllocatorRef;
++
++    /* CFNull Reference */
++
++    pub static kCFNull: CFNullRef;
++
++    /* CFType Reference */
++
++    //fn CFCopyDescription
++    //fn CFCopyTypeIDDescription
++    //fn CFEqual
++    //fn CFGetAllocator
++    pub fn CFEqual(cf1: CFTypeRef, cf2: CFTypeRef) -> Boolean;
++    pub fn CFGetRetainCount(cf: CFTypeRef) -> CFIndex;
++    pub fn CFGetTypeID(cf: CFTypeRef) -> CFTypeID;
++    pub fn CFHash(cf: CFTypeRef) -> CFHashCode;
++    //fn CFMakeCollectable
++    pub fn CFRelease(cf: CFTypeRef);
++    pub fn CFRetain(cf: CFTypeRef) -> CFTypeRef;
++    pub fn CFShow(obj: CFTypeRef);
++
++    /* Base Utilities Reference */
++    // N.B. Some things missing here.
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3f8c0b3766113c473423fe576564833f7be0135e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++// Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use libc::c_void;
++
++use base::{CFTypeID, CFAllocatorRef};
++use url::CFURLRef;
++use dictionary::CFDictionaryRef;
++use string::CFStringRef;
++
++#[repr(C)]
++pub struct __CFBundle(c_void);
++
++pub type CFBundleRef = *const __CFBundle;
++
++extern {
++    /*
++     * CFBundle.h
++     */
++    pub fn CFBundleCreate(allocator: CFAllocatorRef, bundleURL: CFURLRef) -> CFBundleRef;
++
++    pub fn CFBundleGetBundleWithIdentifier(bundleID: CFStringRef) -> CFBundleRef;
++    pub fn CFBundleGetFunctionPointerForName(bundle: CFBundleRef, function_name: CFStringRef) -> *const c_void;
++    pub fn CFBundleGetMainBundle() -> CFBundleRef;
++    pub fn CFBundleGetInfoDictionary(bundle: CFBundleRef) -> CFDictionaryRef;
++
++    pub fn CFBundleGetTypeID() -> CFTypeID;
++    pub fn CFBundleCopyExecutableURL(bundle: CFBundleRef) -> CFURLRef;
++    pub fn CFBundleCopyPrivateFrameworksURL(bundle: CFBundleRef) -> CFURLRef;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6a42b2b387d4dc9c0ed8c139e2f12412cbfadde5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,22 @@@
++use libc::c_void;
++
++use base::{CFAllocatorRef, CFTypeID, CFIndex};
++
++#[repr(C)]
++pub struct __CFData(c_void);
++
++pub type CFDataRef = *const __CFData;
++
++extern {
++    /*
++     * CFData.h
++     */
++
++    pub fn CFDataCreate(allocator: CFAllocatorRef,
++                        bytes: *const u8, length: CFIndex) -> CFDataRef;
++    //fn CFDataFind
++    pub fn CFDataGetBytePtr(theData: CFDataRef) -> *const u8;
++    pub fn CFDataGetLength(theData: CFDataRef) -> CFIndex;
++
++    pub fn CFDataGetTypeID() -> CFTypeID;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c6cac2d9542c9d3f8864e02c1034093fa39604c7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++// Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++pub type CFTimeInterval = f64;
++pub type CFAbsoluteTime = CFTimeInterval;
++
++extern {
++    pub fn CFAbsoluteTimeGetCurrent() -> CFAbsoluteTime;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bf51bb101c3b656e9cb4fd51acc7905fa3f63b7f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,79 @@@
++// Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use libc::{c_void};
++
++use base::{CFAllocatorRef, CFIndex, CFTypeID, Boolean};
++
++pub type CFDictionaryApplierFunction = extern "C" fn (key: *const c_void,
++                                                      value: *const c_void,
++                                                      context: *mut c_void);
++pub type CFDictionaryCopyDescriptionCallBack = *const u8;
++pub type CFDictionaryEqualCallBack = *const u8;
++pub type CFDictionaryHashCallBack = *const u8;
++pub type CFDictionaryReleaseCallBack = *const u8;
++pub type CFDictionaryRetainCallBack = *const u8;
++
++#[allow(dead_code)]
++#[repr(C)]
++#[derive(Clone, Copy)]
++pub struct CFDictionaryKeyCallBacks {
++    pub version: CFIndex,
++    pub retain: CFDictionaryRetainCallBack,
++    pub release: CFDictionaryReleaseCallBack,
++    pub copyDescription: CFDictionaryCopyDescriptionCallBack,
++    pub equal: CFDictionaryEqualCallBack,
++    pub hash: CFDictionaryHashCallBack
++}
++
++#[allow(dead_code)]
++#[repr(C)]
++#[derive(Clone, Copy)]
++pub struct CFDictionaryValueCallBacks {
++    pub version: CFIndex,
++    pub retain: CFDictionaryRetainCallBack,
++    pub release: CFDictionaryReleaseCallBack,
++    pub copyDescription: CFDictionaryCopyDescriptionCallBack,
++    pub equal: CFDictionaryEqualCallBack
++}
++
++#[repr(C)]
++pub struct __CFDictionary(c_void);
++
++pub type CFDictionaryRef = *const __CFDictionary;
++pub type CFMutableDictionaryRef = *const __CFDictionary;
++
++extern {
++    /*
++     * CFDictionary.h
++     */
++
++    pub static kCFTypeDictionaryKeyCallBacks: CFDictionaryKeyCallBacks;
++    pub static kCFTypeDictionaryValueCallBacks: CFDictionaryValueCallBacks;
++
++    pub fn CFDictionaryContainsKey(theDict: CFDictionaryRef, key: *const c_void) -> Boolean;
++    pub fn CFDictionaryCreate(allocator: CFAllocatorRef, keys: *const *const c_void, values: *const *const c_void,
++                              numValues: CFIndex, keyCallBacks: *const CFDictionaryKeyCallBacks,
++                              valueCallBacks: *const CFDictionaryValueCallBacks)
++                              -> CFDictionaryRef;
++    pub fn CFDictionaryGetCount(theDict: CFDictionaryRef) -> CFIndex;
++    pub fn CFDictionaryGetTypeID() -> CFTypeID;
++    pub fn CFDictionaryGetValueIfPresent(theDict: CFDictionaryRef, key: *const c_void, value: *mut *const c_void)
++                                         -> Boolean;
++    pub fn CFDictionaryApplyFunction(theDict: CFDictionaryRef,
++                                     applier: CFDictionaryApplierFunction,
++                                     context: *mut c_void);
++    pub fn CFDictionarySetValue(theDict: CFMutableDictionaryRef,
++                                key: *const c_void,
++                                value: *const c_void);
++    pub fn CFDictionaryGetKeysAndValues(theDict: CFDictionaryRef,
++                                        keys: *mut *const c_void,
++                                        values: *mut *const c_void);
++
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..68097dad7cb1a1218d9f4877758cb3a641c1447d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,32 @@@
++// Copyright 2016 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use libc::c_void;
++
++use base::{CFTypeID, CFIndex};
++use string::CFStringRef;
++
++#[repr(C)]
++pub struct __CFError(c_void);
++
++pub type CFErrorRef = *mut __CFError;
++
++extern "C" {
++    pub fn CFErrorGetTypeID() -> CFTypeID;
++
++    pub static kCFErrorDomainPOSIX: CFStringRef;
++    pub static kCFErrorDomainOSStatus: CFStringRef;
++    pub static kCFErrorDomainMach: CFStringRef;
++    pub static kCFErrorDomainCocoa: CFStringRef;
++
++    pub fn CFErrorGetDomain(err: CFErrorRef) -> CFStringRef;
++    pub fn CFErrorGetCode(err: CFErrorRef) -> CFIndex;
++
++    pub fn CFErrorCopyDescription(err: CFErrorRef) -> CFStringRef;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..96c0b1e6901481f478b0229df9cf7d0b1c720bba
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,28 @@@
++// Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals, improper_ctypes)]
++
++#![cfg_attr(all(feature="mac_os_10_7_support", feature="mac_os_10_8_features"), feature(linkage))] // back-compat requires weak linkage
++
++extern crate libc;
++
++pub mod array;
++pub mod base;
++pub mod bundle;
++pub mod data;
++pub mod date;
++pub mod dictionary;
++pub mod error;
++pub mod messageport;
++pub mod number;
++pub mod propertylist;
++pub mod runloop;
++pub mod set;
++pub mod string;
++pub mod url;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9b15a4d06991cf0c8826e49e3de3e5c4e2e26d34
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,79 @@@
++// Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use libc::c_void;
++
++use base::{CFAllocatorRef, CFIndex, CFTypeID, Boolean};
++use data::CFDataRef;
++use date::CFTimeInterval;
++use runloop::CFRunLoopSourceRef;
++use string::CFStringRef;
++
++#[repr(C)]
++#[derive(Copy, Clone)]
++#[derive(Debug)]
++pub struct CFMessagePortContext {
++    pub version: CFIndex,
++    pub info: *mut c_void,
++    pub retain: Option<unsafe extern fn(info: *const c_void) -> *const c_void>,
++    pub release: Option<unsafe extern fn(info: *const c_void)>,
++    pub copyDescription: Option<unsafe extern fn(info: *const c_void)
++        -> CFStringRef>,
++}
++
++pub type CFMessagePortCallBack = Option<
++    unsafe extern fn(local: CFMessagePortRef,
++                     msgid: i32,
++                     data: CFDataRef,
++                     info: *mut c_void) -> CFDataRef>;
++
++pub type CFMessagePortInvalidationCallBack = Option<
++    unsafe extern "C" fn(ms: CFMessagePortRef, info: *mut c_void)>;
++
++#[repr(C)]
++pub struct __CFMessagePort(c_void);
++pub type CFMessagePortRef = *const __CFMessagePort;
++
++extern {
++    /*
++     * CFMessagePort.h
++     */
++    pub fn CFMessagePortGetTypeID() -> CFTypeID;
++    pub fn CFMessagePortCreateLocal(allocator: CFAllocatorRef,
++                                    name: CFStringRef,
++                                    callout: CFMessagePortCallBack,
++                                    context: *const CFMessagePortContext,
++                                    shouldFreeInfo: *mut Boolean)
++        -> CFMessagePortRef;
++    pub fn CFMessagePortCreateRemote(allocator: CFAllocatorRef,
++                                     name: CFStringRef) -> CFMessagePortRef;
++    pub fn CFMessagePortIsRemote(ms: CFMessagePortRef) -> Boolean;
++    pub fn CFMessagePortGetName(ms: CFMessagePortRef) -> CFStringRef;
++    pub fn CFMessagePortSetName(ms: CFMessagePortRef, newName: CFStringRef)
++        -> Boolean;
++    pub fn CFMessagePortGetContext(ms: CFMessagePortRef,
++                                   context: *mut CFMessagePortContext);
++    pub fn CFMessagePortInvalidate(ms: CFMessagePortRef);
++    pub fn CFMessagePortIsValid(ms: CFMessagePortRef) -> Boolean;
++    pub fn CFMessagePortGetInvalidationCallBack(ms: CFMessagePortRef)
++        -> CFMessagePortInvalidationCallBack;
++    pub fn CFMessagePortSetInvalidationCallBack(ms: CFMessagePortRef,
++                                                callout: CFMessagePortInvalidationCallBack);
++    pub fn CFMessagePortSendRequest(remote: CFMessagePortRef, msgid: i32,
++                                    data: CFDataRef,
++                                    sendTimeout: CFTimeInterval,
++                                    rcvTimeout: CFTimeInterval,
++                                    replyMode: CFStringRef,
++                                    returnData: *mut CFDataRef) -> i32;
++    pub fn CFMessagePortCreateRunLoopSource(allocator: CFAllocatorRef,
++                                            local: CFMessagePortRef,
++                                            order: CFIndex)
++        -> CFRunLoopSourceRef;
++    // CFMessagePortSetDispatchQueue
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3a5c09f428d864d5c7aabbc1cbf5966683a96026
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,60 @@@
++// Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use libc::c_void;
++
++use base::{CFAllocatorRef, CFTypeID};
++
++#[repr(C)]
++pub struct __CFBoolean(c_void);
++
++pub type CFBooleanRef = *const __CFBoolean;
++
++pub type CFNumberType = u32;
++
++// members of enum CFNumberType
++// static kCFNumberSInt8Type:     CFNumberType = 1;
++// static kCFNumberSInt16Type:    CFNumberType = 2;
++pub static kCFNumberSInt32Type:    CFNumberType = 3;
++pub static kCFNumberSInt64Type:    CFNumberType = 4;
++// static kCFNumberFloat32Type:   CFNumberType = 5;
++pub static kCFNumberFloat64Type:   CFNumberType = 6;
++// static kCFNumberCharType:      CFNumberType = 7;
++// static kCFNumberShortType:     CFNumberType = 8;
++// static kCFNumberIntType:       CFNumberType = 9;
++// static kCFNumberLongType:      CFNumberType = 10;
++// static kCFNumberLongLongType:  CFNumberType = 11;
++// static kCFNumberFloatType:     CFNumberType = 12;
++// static kCFNumberDoubleType:    CFNumberType = 13;
++// static kCFNumberCFIndexType:   CFNumberType = 14;
++// static kCFNumberNSIntegerType: CFNumberType = 15;
++// static kCFNumberCGFloatType:   CFNumberType = 16;
++// static kCFNumberMaxType:       CFNumberType = 16;
++
++// This is an enum due to zero-sized types warnings.
++// For more details see https://github.com/rust-lang/rust/issues/27303
++pub enum __CFNumber {}
++
++pub type CFNumberRef = *const __CFNumber;
++
++extern {
++    /*
++     * CFNumber.h
++     */
++    pub static kCFBooleanTrue: CFBooleanRef;
++    pub static kCFBooleanFalse: CFBooleanRef;
++
++    pub fn CFBooleanGetTypeID() -> CFTypeID;
++    pub fn CFNumberCreate(allocator: CFAllocatorRef, theType: CFNumberType, valuePtr: *const c_void)
++                          -> CFNumberRef;
++    //fn CFNumberGetByteSize
++    pub fn CFNumberGetValue(number: CFNumberRef, theType: CFNumberType, valuePtr: *mut c_void) -> bool;
++    //fn CFNumberCompare
++    pub fn CFNumberGetTypeID() -> CFTypeID;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2396ef998939b4bcd3614fb6697fd80edfedc98e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,37 @@@
++use base::{CFAllocatorRef, CFIndex, CFOptionFlags, CFTypeRef};
++use data::CFDataRef;
++use error::CFErrorRef;
++
++pub type CFPropertyListRef = CFTypeRef;
++
++pub type CFPropertyListFormat = CFIndex;
++pub const kCFPropertyListOpenStepFormat: CFPropertyListFormat = 1;
++pub const kCFPropertyListXMLFormat_v1_0: CFPropertyListFormat = 100;
++pub const kCFPropertyListBinaryFormat_v1_0: CFPropertyListFormat = 200;
++
++pub type CFPropertyListMutabilityOptions = CFOptionFlags;
++pub const kCFPropertyListImmutable: CFPropertyListMutabilityOptions = 0;
++pub const kCFPropertyListMutableContainers: CFPropertyListMutabilityOptions = 1;
++pub const kCFPropertyListMutableContainersAndLeaves: CFPropertyListMutabilityOptions = 2;
++
++extern "C" {
++    // CFPropertyList.h
++    //
++
++    // fn CFPropertyListCreateDeepCopy
++    // fn CFPropertyListIsValid
++    pub fn CFPropertyListCreateWithData(allocator: CFAllocatorRef,
++                                        data: CFDataRef,
++                                        options: CFPropertyListMutabilityOptions,
++                                        format: *mut CFPropertyListFormat,
++                                        error: *mut CFErrorRef)
++                                        -> CFPropertyListRef;
++    // fn CFPropertyListCreateWithStream
++    // fn CFPropertyListWrite
++    pub fn CFPropertyListCreateData(allocator: CFAllocatorRef,
++                                    propertyList: CFPropertyListRef,
++                                    format: CFPropertyListFormat,
++                                    options: CFOptionFlags,
++                                    error: *mut CFErrorRef)
++                                    -> CFDataRef;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..86414a5ee1d4a0c2c7069aeb46babd443d5bb8df
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,164 @@@
++// Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use libc::c_void;
++
++use array::CFArrayRef;
++use base::{Boolean, CFIndex, CFTypeID, CFAllocatorRef, CFOptionFlags, CFHashCode, mach_port_t};
++use date::{CFAbsoluteTime, CFTimeInterval};
++use string::CFStringRef;
++
++#[repr(C)]
++pub struct __CFRunLoop(c_void);
++
++pub type CFRunLoopRef = *const __CFRunLoop;
++
++#[repr(C)]
++pub struct __CFRunLoopSource(c_void);
++
++pub type CFRunLoopSourceRef = *const __CFRunLoopSource;
++
++#[repr(C)]
++pub struct __CFRunLoopObserver(c_void);
++
++pub type CFRunLoopObserverRef = *const __CFRunLoopObserver;
++
++// Reasons for CFRunLoopRunInMode() to Return
++pub const kCFRunLoopRunFinished: i32      = 1;
++pub const kCFRunLoopRunStopped: i32       = 2;
++pub const kCFRunLoopRunTimedOut: i32      = 3;
++pub const kCFRunLoopRunHandledSource: i32 = 4;
++
++// Run Loop Observer Activities
++//typedef CF_OPTIONS(CFOptionFlags, CFRunLoopActivity) {
++pub type CFRunLoopActivity = CFOptionFlags;
++pub const kCFRunLoopEntry: CFOptionFlags         = 1 << 0;
++pub const kCFRunLoopBeforeTimers: CFOptionFlags  = 1 << 1;
++pub const kCFRunLoopBeforeSources: CFOptionFlags = 1 << 2;
++pub const kCFRunLoopBeforeWaiting: CFOptionFlags = 1 << 5;
++pub const kCFRunLoopAfterWaiting: CFOptionFlags  = 1 << 6;
++pub const kCFRunLoopExit: CFOptionFlags          = 1 << 7;
++pub const kCFRunLoopAllActivities: CFOptionFlags = 0x0FFFFFFF;
++
++#[repr(C)]
++pub struct CFRunLoopSourceContext {
++    pub version: CFIndex,
++    pub info: *mut c_void,
++    pub retain: extern "C" fn (info: *const c_void) -> *const c_void,
++    pub release: extern "C" fn (info: *const c_void),
++    pub copyDescription: extern "C" fn (info: *const c_void) -> CFStringRef,
++    pub equal: extern "C" fn (info1: *const c_void, info2: *const c_void) -> Boolean,
++    pub hash: extern "C" fn (info: *const c_void) -> CFHashCode,
++    pub schedule: extern "C" fn (info: *const c_void, rl: CFRunLoopRef, mode: CFStringRef),
++    pub cancel: extern "C" fn (info: *const c_void, rl: CFRunLoopRef, mode: CFStringRef),
++    pub perform: extern "C" fn (info: *const c_void),
++}
++
++#[repr(C)]
++pub struct CFRunLoopSourceContext1 {
++    pub version: CFIndex,
++    pub info: *mut c_void,
++    pub retain: extern "C" fn (info: *const c_void) -> *const c_void,
++    pub release: extern "C" fn (info: *const c_void),
++    pub copyDescription: extern "C" fn (info: *const c_void) -> CFStringRef,
++    pub equal: extern "C" fn (info1: *const c_void, info2: *const c_void) -> Boolean,
++    pub hash: extern "C" fn (info: *const c_void) -> CFHashCode,
++    // note that the following two fields are platform dependent in the C header, the ones here are for OS X
++    pub getPort: extern "C" fn (info: *mut c_void) -> mach_port_t,
++    pub perform: extern "C" fn (msg: *mut c_void, size: CFIndex, allocator: CFAllocatorRef, info: *mut c_void) -> *mut c_void,
++}
++
++#[repr(C)]
++pub struct CFRunLoopObserverContext {
++    pub version: CFIndex,
++    pub info: *mut c_void,
++    pub retain: extern "C" fn (info: *const c_void) -> *const c_void,
++    pub release: extern "C" fn (info: *const c_void),
++    pub copyDescription: extern "C" fn (info: *const c_void) -> CFStringRef,
++}
++
++pub type CFRunLoopObserverCallBack = extern "C" fn (observer: CFRunLoopObserverRef, activity: CFRunLoopActivity, info: *mut c_void);
++
++#[repr(C)]
++pub struct CFRunLoopTimerContext {
++    pub version: CFIndex,
++    pub info: *mut c_void,
++    pub retain: extern "C" fn (info: *const c_void) -> *const c_void,
++    pub release: extern "C" fn (info: *const c_void),
++    pub copyDescription: extern "C" fn (info: *const c_void) -> CFStringRef,
++}
++
++pub type CFRunLoopTimerCallBack = extern "C" fn (timer: CFRunLoopTimerRef, info: *mut c_void);
++
++#[repr(C)]
++pub struct __CFRunLoopTimer;
++
++pub type CFRunLoopTimerRef = *const __CFRunLoopTimer;
++
++extern {
++    /*
++     * CFRunLoop.h
++     */
++    pub static kCFRunLoopDefaultMode: CFStringRef;
++    pub static kCFRunLoopCommonModes: CFStringRef;
++    pub fn CFRunLoopGetTypeID() -> CFTypeID;
++    pub fn CFRunLoopGetCurrent() -> CFRunLoopRef;
++    pub fn CFRunLoopGetMain() -> CFRunLoopRef;
++    pub fn CFRunLoopCopyCurrentMode(rl: CFRunLoopRef) -> CFStringRef;
++    pub fn CFRunLoopCopyAllModes(rl: CFRunLoopRef) -> CFArrayRef;
++    pub fn CFRunLoopAddCommonMode(rl: CFRunLoopRef, mode: CFStringRef);
++    pub fn CFRunLoopGetNextTimerFireDate(rl: CFRunLoopRef, mode: CFStringRef) -> CFAbsoluteTime;
++    pub fn CFRunLoopRun();
++    pub fn CFRunLoopRunInMode(mode: CFStringRef, seconds: CFTimeInterval, returnAfterSourceHandled: Boolean) -> i32;
++    pub fn CFRunLoopIsWaiting(rl: CFRunLoopRef) -> Boolean;
++    pub fn CFRunLoopWakeUp(rl: CFRunLoopRef);
++    pub fn CFRunLoopStop(rl: CFRunLoopRef);
++    // fn CFRunLoopPerformBlock(rl: CFRunLoopRef, mode: CFTypeRef, block: void (^)(void));
++    pub fn CFRunLoopContainsSource(rl: CFRunLoopRef, source: CFRunLoopSourceRef, mode: CFStringRef) -> Boolean;
++    pub fn CFRunLoopAddSource(rl: CFRunLoopRef, source: CFRunLoopSourceRef, mode: CFStringRef);
++    pub fn CFRunLoopRemoveSource(rl: CFRunLoopRef, source: CFRunLoopSourceRef, mode: CFStringRef);
++    pub fn CFRunLoopContainsObserver(rl: CFRunLoopRef, observer: CFRunLoopObserverRef, mode: CFStringRef) -> Boolean;
++    pub fn CFRunLoopAddObserver(rl: CFRunLoopRef, observer: CFRunLoopObserverRef, mode: CFStringRef);
++    pub fn CFRunLoopRemoveObserver(rl: CFRunLoopRef, observer: CFRunLoopObserverRef, mode: CFStringRef);
++    pub fn CFRunLoopContainsTimer(rl: CFRunLoopRef, timer: CFRunLoopTimerRef, mode: CFStringRef) -> Boolean;
++    pub fn CFRunLoopAddTimer(rl: CFRunLoopRef, timer: CFRunLoopTimerRef, mode: CFStringRef);
++    pub fn CFRunLoopRemoveTimer(rl: CFRunLoopRef, timer: CFRunLoopTimerRef, mode: CFStringRef);
++
++    pub fn CFRunLoopSourceGetTypeID() -> CFTypeID;
++    pub fn CFRunLoopSourceCreate(allocator: CFAllocatorRef, order: CFIndex, context: *mut CFRunLoopSourceContext) -> CFRunLoopSourceRef;
++    pub fn CFRunLoopSourceGetOrder(source: CFRunLoopSourceRef) -> CFIndex;
++    pub fn CFRunLoopSourceInvalidate(source: CFRunLoopSourceRef);
++    pub fn CFRunLoopSourceIsValid(source: CFRunLoopSourceRef) -> Boolean;
++    pub fn CFRunLoopSourceGetContext(source: CFRunLoopSourceRef, context: *mut CFRunLoopSourceContext);
++    pub fn CFRunLoopSourceSignal(source: CFRunLoopSourceRef);
++
++    pub fn CFRunLoopObserverGetTypeID() -> CFTypeID;
++    pub fn CFRunLoopObserverCreate(allocator: CFAllocatorRef, activities: CFOptionFlags, repeats: Boolean, order: CFIndex, callout: CFRunLoopObserverCallBack, context: *mut CFRunLoopObserverContext) -> CFRunLoopObserverRef;
++    // fn CFRunLoopObserverCreateWithHandler(allocator: CFAllocatorRef, activities: CFOptionFlags, repeats: Boolean, order: CFIndex, block: void (^) (CFRunLoopObserverRef observer, CFRunLoopActivity activity)) -> CFRunLoopObserverRef;
++    pub fn CFRunLoopObserverGetActivities(observer: CFRunLoopObserverRef) -> CFOptionFlags;
++    pub fn CFRunLoopObserverDoesRepeat(observer: CFRunLoopObserverRef) -> Boolean;
++    pub fn CFRunLoopObserverGetOrder(observer: CFRunLoopObserverRef) -> CFIndex;
++    pub fn CFRunLoopObserverInvalidate(observer: CFRunLoopObserverRef);
++    pub fn CFRunLoopObserverIsValid(observer: CFRunLoopObserverRef) -> Boolean;
++    pub fn CFRunLoopObserverGetContext(observer: CFRunLoopObserverRef, context: *mut CFRunLoopObserverContext);
++
++    pub fn CFRunLoopTimerGetTypeID() -> CFTypeID;
++    pub fn CFRunLoopTimerCreate(allocator: CFAllocatorRef, fireDate: CFAbsoluteTime, interval: CFTimeInterval, flags: CFOptionFlags, order: CFIndex, callout: CFRunLoopTimerCallBack, context: *mut CFRunLoopTimerContext) -> CFRunLoopTimerRef;
++    // fn CFRunLoopTimerCreateWithHandler(allocator: CFAllocatorRef, fireDate: CFAbsoluteTime, interval: CFTimeInterval, flags: CFOptionFlags, order: CFIndex, block: void (^) (CFRunLoopTimerRef timer)) -> CFRunLoopTimerRef;
++    pub fn CFRunLoopTimerGetNextFireDate(timer: CFRunLoopTimerRef) -> CFAbsoluteTime;
++    pub fn CFRunLoopTimerSetNextFireDate(timer: CFRunLoopTimerRef, fireDate: CFAbsoluteTime);
++    pub fn CFRunLoopTimerGetInterval(timer: CFRunLoopTimerRef) -> CFTimeInterval;
++    pub fn CFRunLoopTimerDoesRepeat(timer: CFRunLoopTimerRef) -> Boolean;
++    pub fn CFRunLoopTimerGetOrder(timer: CFRunLoopTimerRef) -> CFIndex;
++    pub fn CFRunLoopTimerInvalidate(timer: CFRunLoopTimerRef);
++    pub fn CFRunLoopTimerIsValid(timer: CFRunLoopTimerRef) -> Boolean;
++    pub fn CFRunLoopTimerGetContext(timer: CFRunLoopTimerRef, context: *mut CFRunLoopTimerContext);
++    pub fn CFRunLoopTimerGetTolerance(timer: CFRunLoopTimerRef) -> CFTimeInterval;
++    pub fn CFRunLoopTimerSetTolerance(timer: CFRunLoopTimerRef, tolerance: CFTimeInterval);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ca9c3c59ab6b1f0acb7b04309e385f44cfc54e39
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,58 @@@
++// Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use libc::c_void;
++
++use base::{CFAllocatorRef, CFIndex, CFTypeID};
++
++pub type CFSetApplierFunction = extern "C" fn (value: *const c_void,
++                                               context: *const c_void);
++pub type CFSetRetainCallBack = *const u8;
++pub type CFSetReleaseCallBack = *const u8;
++pub type CFSetCopyDescriptionCallBack = *const u8;
++pub type CFSetEqualCallBack = *const u8;
++pub type CFSetHashCallBack = *const u8;
++
++#[repr(C)]
++#[derive(Clone, Copy)]
++pub struct CFSetCallBacks {
++    pub version: CFIndex,
++    pub retain: CFSetRetainCallBack,
++    pub release: CFSetReleaseCallBack,
++    pub copyDescription: CFSetCopyDescriptionCallBack,
++    pub equal: CFSetEqualCallBack,
++    pub hash: CFSetHashCallBack,
++}
++
++#[repr(C)]
++pub struct __CFSet(c_void);
++
++pub type CFSetRef = *const __CFSet;
++
++extern {
++    /*
++     * CFSet.h
++     */
++
++    pub static kCFTypeSetCallBacks: CFSetCallBacks;
++
++    /* Creating Sets */
++    pub fn CFSetCreate(allocator: CFAllocatorRef, values: *const *const c_void, numValues: CFIndex,
++                       callBacks: *const CFSetCallBacks) -> CFSetRef;
++
++    /* Applying a Function to Set Members */
++    pub fn CFSetApplyFunction(theSet: CFSetRef,
++                              applier: CFSetApplierFunction,
++                              context: *const c_void);
++
++    pub fn CFSetGetCount(theSet: CFSetRef) -> CFIndex;
++
++    pub fn CFSetGetTypeID() -> CFTypeID;
++}
++
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6095bca8711bc787587b0fdaa1b1be21483132d8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,320 @@@
++// Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use libc::{c_char, c_ushort, c_void};
++
++use base::{Boolean, CFOptionFlags, CFIndex, CFAllocatorRef, CFRange, CFTypeID};
++
++pub type UniChar = c_ushort;
++
++// CFString.h
++
++pub type CFStringCompareFlags = CFOptionFlags;
++//static kCFCompareCaseInsensitive: CFStringCompareFlags = 1;
++//static kCFCompareBackwards: CFStringCompareFlags = 4;
++//static kCFCompareAnchored: CFStringCompareFlags = 8;
++//static kCFCompareNonliteral: CFStringCompareFlags = 16;
++//static kCFCompareLocalized: CFStringCompareFlags = 32;
++//static kCFCompareNumerically: CFStringCompareFlags = 64;
++//static kCFCompareDiacriticInsensitive: CFStringCompareFlags = 128;
++//static kCFCompareWidthInsensitive: CFStringCompareFlags = 256;
++//static kCFCompareForcedOrdering: CFStringCompareFlags = 512;
++
++pub type CFStringEncoding = u32;
++
++// OS X built-in encodings.
++
++//static kCFStringEncodingMacRoman: CFStringEncoding = 0;
++//static kCFStringEncodingWindowsLatin1: CFStringEncoding = 0x0500;
++//static kCFStringEncodingISOLatin1: CFStringEncoding = 0x0201;
++//static kCFStringEncodingNextStepLatin: CFStringEncoding = 0x0B01;
++//static kCFStringEncodingASCII: CFStringEncoding = 0x0600;
++//static kCFStringEncodingUnicode: CFStringEncoding = 0x0100;
++pub static kCFStringEncodingUTF8: CFStringEncoding = 0x08000100;
++//static kCFStringEncodingNonLossyASCII: CFStringEncoding = 0x0BFF;
++
++//static kCFStringEncodingUTF16: CFStringEncoding = 0x0100;
++//static kCFStringEncodingUTF16BE: CFStringEncoding = 0x10000100;
++//static kCFStringEncodingUTF16LE: CFStringEncoding = 0x14000100;
++//static kCFStringEncodingUTF32: CFStringEncoding = 0x0c000100;
++//static kCFStringEncodingUTF32BE: CFStringEncoding = 0x18000100;
++//static kCFStringEncodingUTF32LE: CFStringEncoding = 0x1c000100;
++
++
++// CFStringEncodingExt.h
++
++pub type CFStringEncodings = CFIndex;
++
++// External encodings, except those defined above.
++// Defined above: kCFStringEncodingMacRoman = 0
++//static kCFStringEncodingMacJapanese: CFStringEncoding = 1;
++//static kCFStringEncodingMacChineseTrad: CFStringEncoding = 2;
++//static kCFStringEncodingMacKorean: CFStringEncoding = 3;
++//static kCFStringEncodingMacArabic: CFStringEncoding = 4;
++//static kCFStringEncodingMacHebrew: CFStringEncoding = 5;
++//static kCFStringEncodingMacGreek: CFStringEncoding = 6;
++//static kCFStringEncodingMacCyrillic: CFStringEncoding = 7;
++//static kCFStringEncodingMacDevanagari: CFStringEncoding = 9;
++//static kCFStringEncodingMacGurmukhi: CFStringEncoding = 10;
++//static kCFStringEncodingMacGujarati: CFStringEncoding = 11;
++//static kCFStringEncodingMacOriya: CFStringEncoding = 12;
++//static kCFStringEncodingMacBengali: CFStringEncoding = 13;
++//static kCFStringEncodingMacTamil: CFStringEncoding = 14;
++//static kCFStringEncodingMacTelugu: CFStringEncoding = 15;
++//static kCFStringEncodingMacKannada: CFStringEncoding = 16;
++//static kCFStringEncodingMacMalayalam: CFStringEncoding = 17;
++//static kCFStringEncodingMacSinhalese: CFStringEncoding = 18;
++//static kCFStringEncodingMacBurmese: CFStringEncoding = 19;
++//static kCFStringEncodingMacKhmer: CFStringEncoding = 20;
++//static kCFStringEncodingMacThai: CFStringEncoding = 21;
++//static kCFStringEncodingMacLaotian: CFStringEncoding = 22;
++//static kCFStringEncodingMacGeorgian: CFStringEncoding = 23;
++//static kCFStringEncodingMacArmenian: CFStringEncoding = 24;
++//static kCFStringEncodingMacChineseSimp: CFStringEncoding = 25;
++//static kCFStringEncodingMacTibetan: CFStringEncoding = 26;
++//static kCFStringEncodingMacMongolian: CFStringEncoding = 27;
++//static kCFStringEncodingMacEthiopic: CFStringEncoding = 28;
++//static kCFStringEncodingMacCentralEurRoman: CFStringEncoding = 29;
++//static kCFStringEncodingMacVietnamese: CFStringEncoding = 30;
++//static kCFStringEncodingMacExtArabic: CFStringEncoding = 31;
++//static kCFStringEncodingMacSymbol: CFStringEncoding = 33;
++//static kCFStringEncodingMacDingbats: CFStringEncoding = 34;
++//static kCFStringEncodingMacTurkish: CFStringEncoding = 35;
++//static kCFStringEncodingMacCroatian: CFStringEncoding = 36;
++//static kCFStringEncodingMacIcelandic: CFStringEncoding = 37;
++//static kCFStringEncodingMacRomanian: CFStringEncoding = 38;
++//static kCFStringEncodingMacCeltic: CFStringEncoding = 39;
++//static kCFStringEncodingMacGaelic: CFStringEncoding = 40;
++//static kCFStringEncodingMacFarsi: CFStringEncoding = 0x8C;
++//static kCFStringEncodingMacUkrainian: CFStringEncoding = 0x98;
++//static kCFStringEncodingMacInuit: CFStringEncoding = 0xEC;
++//static kCFStringEncodingMacVT100: CFStringEncoding = 0xFC;
++//static kCFStringEncodingMacHFS: CFStringEncoding = 0xFF;
++// Defined above: kCFStringEncodingISOLatin1 = 0x0201
++//static kCFStringEncodingISOLatin2: CFStringEncoding = 0x0202;
++//static kCFStringEncodingISOLatin3: CFStringEncoding = 0x0203;
++//static kCFStringEncodingISOLatin4: CFStringEncoding = 0x0204;
++//static kCFStringEncodingISOLatinCyrillic: CFStringEncoding = 0x0205;
++//static kCFStringEncodingISOLatinArabic: CFStringEncoding = 0x0206;
++//static kCFStringEncodingISOLatinGreek: CFStringEncoding = 0x0207;
++//static kCFStringEncodingISOLatinHebrew: CFStringEncoding = 0x0208;
++//static kCFStringEncodingISOLatin5: CFStringEncoding = 0x0209;
++//static kCFStringEncodingISOLatin6: CFStringEncoding = 0x020A;
++//static kCFStringEncodingISOLatinThai: CFStringEncoding = 0x020B;
++//static kCFStringEncodingISOLatin7: CFStringEncoding = 0x020D;
++//static kCFStringEncodingISOLatin8: CFStringEncoding = 0x020E;
++//static kCFStringEncodingISOLatin9: CFStringEncoding = 0x020F;
++//static kCFStringEncodingISOLatin10: CFStringEncoding = 0x0210;
++//static kCFStringEncodingDOSLatinUS: CFStringEncoding = 0x0400;
++//static kCFStringEncodingDOSGreek: CFStringEncoding = 0x0405;
++//static kCFStringEncodingDOSBalticRim: CFStringEncoding = 0x0406;
++//static kCFStringEncodingDOSLatin1: CFStringEncoding = 0x0410;
++//static kCFStringEncodingDOSGreek1: CFStringEncoding = 0x0411;
++//static kCFStringEncodingDOSLatin2: CFStringEncoding = 0x0412;
++//static kCFStringEncodingDOSCyrillic: CFStringEncoding = 0x0413;
++//static kCFStringEncodingDOSTurkish: CFStringEncoding = 0x0414;
++//static kCFStringEncodingDOSPortuguese: CFStringEncoding = 0x0415;
++//static kCFStringEncodingDOSIcelandic: CFStringEncoding = 0x0416;
++//static kCFStringEncodingDOSHebrew: CFStringEncoding = 0x0417;
++//static kCFStringEncodingDOSCanadianFrench: CFStringEncoding = 0x0418;
++//static kCFStringEncodingDOSArabic: CFStringEncoding = 0x0419;
++//static kCFStringEncodingDOSNordic: CFStringEncoding = 0x041A;
++//static kCFStringEncodingDOSRussian: CFStringEncoding = 0x041B;
++//static kCFStringEncodingDOSGreek2: CFStringEncoding = 0x041C;
++//static kCFStringEncodingDOSThai: CFStringEncoding = 0x041D;
++//static kCFStringEncodingDOSJapanese: CFStringEncoding = 0x0420;
++//static kCFStringEncodingDOSChineseSimplif: CFStringEncoding = 0x0421;
++//static kCFStringEncodingDOSKorean: CFStringEncoding = 0x0422;
++//static kCFStringEncodingDOSChineseTrad: CFStringEncoding = 0x0423;
++// Defined above: kCFStringEncodingWindowsLatin1 = 0x0500
++//static kCFStringEncodingWindowsLatin2: CFStringEncoding = 0x0501;
++//static kCFStringEncodingWindowsCyrillic: CFStringEncoding = 0x0502;
++//static kCFStringEncodingWindowsGreek: CFStringEncoding = 0x0503;
++//static kCFStringEncodingWindowsLatin5: CFStringEncoding = 0x0504;
++//static kCFStringEncodingWindowsHebrew: CFStringEncoding = 0x0505;
++//static kCFStringEncodingWindowsArabic: CFStringEncoding = 0x0506;
++//static kCFStringEncodingWindowsBalticRim: CFStringEncoding = 0x0507;
++//static kCFStringEncodingWindowsVietnamese: CFStringEncoding = 0x0508;
++//static kCFStringEncodingWindowsKoreanJohab: CFStringEncoding = 0x0510;
++// Defined above: kCFStringEncodingASCII = 0x0600
++//static kCFStringEncodingANSEL: CFStringEncoding = 0x0601;
++//static kCFStringEncodingJIS_X0201_76: CFStringEncoding = 0x0620;
++//static kCFStringEncodingJIS_X0208_83: CFStringEncoding = 0x0621;
++//static kCFStringEncodingJIS_X0208_90: CFStringEncoding = 0x0622;
++//static kCFStringEncodingJIS_X0212_90: CFStringEncoding = 0x0623;
++//static kCFStringEncodingJIS_C6226_78: CFStringEncoding = 0x0624;
++//static kCFStringEncodingShiftJIS_X0213: CFStringEncoding = 0x0628;
++//static kCFStringEncodingShiftJIS_X0213_MenKuTen: CFStringEncoding = 0x0629;
++//static kCFStringEncodingGB_2312_80: CFStringEncoding = 0x0630;
++//static kCFStringEncodingGBK_95: CFStringEncoding = 0x0631;
++//static kCFStringEncodingGB_18030_2000: CFStringEncoding = 0x0632;
++//static kCFStringEncodingKSC_5601_87: CFStringEncoding = 0x0640;
++//static kCFStringEncodingKSC_5601_92_Johab: CFStringEncoding = 0x0641;
++//static kCFStringEncodingCNS_11643_92_P1: CFStringEncoding = 0x0651;
++//static kCFStringEncodingCNS_11643_92_P2: CFStringEncoding = 0x0652;
++//static kCFStringEncodingCNS_11643_92_P3: CFStringEncoding = 0x0653;
++//static kCFStringEncodingISO_2022_JP: CFStringEncoding = 0x0820;
++//static kCFStringEncodingISO_2022_JP_2: CFStringEncoding = 0x0821;
++//static kCFStringEncodingISO_2022_JP_1: CFStringEncoding = 0x0822;
++//static kCFStringEncodingISO_2022_JP_3: CFStringEncoding = 0x0823;
++//static kCFStringEncodingISO_2022_CN: CFStringEncoding = 0x0830;
++//static kCFStringEncodingISO_2022_CN_EXT: CFStringEncoding = 0x0831;
++//static kCFStringEncodingISO_2022_KR: CFStringEncoding = 0x0840;
++//static kCFStringEncodingEUC_JP: CFStringEncoding = 0x0920;
++//static kCFStringEncodingEUC_CN: CFStringEncoding = 0x0930;
++//static kCFStringEncodingEUC_TW: CFStringEncoding = 0x0931;
++//static kCFStringEncodingEUC_KR: CFStringEncoding = 0x0940;
++//static kCFStringEncodingShiftJIS: CFStringEncoding = 0x0A01;
++//static kCFStringEncodingKOI8_R: CFStringEncoding = 0x0A02;
++//static kCFStringEncodingBig5: CFStringEncoding = 0x0A03;
++//static kCFStringEncodingMacRomanLatin1: CFStringEncoding = 0x0A04;
++//static kCFStringEncodingHZ_GB_2312: CFStringEncoding = 0x0A05;
++//static kCFStringEncodingBig5_HKSCS_1999: CFStringEncoding = 0x0A06;
++//static kCFStringEncodingVISCII: CFStringEncoding = 0x0A07;
++//static kCFStringEncodingKOI8_U: CFStringEncoding = 0x0A08;
++//static kCFStringEncodingBig5_E: CFStringEncoding = 0x0A09;
++// Defined above: kCFStringEncodingNextStepLatin = 0x0B01
++//static kCFStringEncodingNextStepJapanese: CFStringEncoding = 0x0B02;
++//static kCFStringEncodingEBCDIC_US: CFStringEncoding = 0x0C01;
++//static kCFStringEncodingEBCDIC_CP037: CFStringEncoding = 0x0C02;
++//static kCFStringEncodingUTF7: CFStringEncoding = 0x04000100;
++//static kCFStringEncodingUTF7_IMAP: CFStringEncoding = 0x0A10;
++//static kCFStringEncodingShiftJIS_X0213_00: CFStringEncoding = 0x0628; /* Deprecated */
++
++#[repr(C)]
++pub struct __CFString(c_void);
++
++pub type CFStringRef = *const __CFString;
++
++extern {
++    /*
++     * CFString.h
++     */
++
++    // N.B. organized according to "Functions by task" in docs
++
++    /* Creating a CFString */
++    //fn CFSTR
++    //fn CFStringCreateArrayBySeparatingStrings
++    //fn CFStringCreateByCombiningStrings
++    //fn CFStringCreateCopy
++    //fn CFStringCreateFromExternalRepresentation
++    pub fn CFStringCreateWithBytes(alloc: CFAllocatorRef,
++                                   bytes: *const u8,
++                                   numBytes: CFIndex,
++                                   encoding: CFStringEncoding,
++                                   isExternalRepresentation: Boolean,
++                                   contentsDeallocator: CFAllocatorRef)
++                                   -> CFStringRef;
++    pub fn CFStringCreateWithBytesNoCopy(alloc: CFAllocatorRef,
++                                         bytes: *const u8,
++                                         numBytes: CFIndex,
++                                         encoding: CFStringEncoding,
++                                         isExternalRepresentation: Boolean,
++                                         contentsDeallocator: CFAllocatorRef)
++                                         -> CFStringRef;
++    //fn CFStringCreateWithCharacters
++    //fn CFStringCreateWithCharactersNoCopy
++    pub fn CFStringCreateWithCString(alloc: CFAllocatorRef,
++                                     cStr: *const c_char,
++                                     encoding: CFStringEncoding)
++                                     -> CFStringRef;
++    //fn CFStringCreateWithCStringNoCopy
++    //fn CFStringCreateWithFormat
++    //fn CFStringCreateWithFormatAndArguments
++    //fn CFStringCreateWithPascalString
++    //fn CFStringCreateWithPascalStringNoCopy
++    //fn CFStringCreateWithSubstring
++
++    /* Searching Strings */
++    //fn CFStringCreateArrayWithFindResults
++    //fn CFStringFind
++    //fn CFStringFindCharacterFromSet
++    //fn CFStringFindWithOptions
++    //fn CFStringFindWithOptionsAndLocale
++    //fn CFStringGetLineBounds
++
++    /* Comparing Strings */
++    //fn CFStringCompare
++    //fn CFStringCompareWithOptions
++    //fn CFStringCompareWithOptionsAndLocale
++    //fn CFStringHasPrefix
++    //fn CFStringHasSuffix
++
++    /* Accessing Characters */
++    //fn CFStringCreateExternalRepresentation
++    pub fn CFStringGetBytes(theString: CFStringRef,
++                            range: CFRange,
++                            encoding: CFStringEncoding,
++                            lossByte: u8,
++                            isExternalRepresentation: Boolean,
++                            buffer: *mut u8,
++                            maxBufLen: CFIndex,
++                            usedBufLen: *mut CFIndex)
++                            -> CFIndex;
++    //fn CFStringGetCharacterAtIndex
++    //fn CFStringGetCharacters
++    //fn CFStringGetCharactersPtr
++    //fn CFStringGetCharacterFromInlineBuffer
++    pub fn CFStringGetCString(theString: CFStringRef,
++                              buffer: *mut c_char,
++                              bufferSize: CFIndex,
++                              encoding: CFStringEncoding)
++                              -> Boolean;
++    pub fn CFStringGetCStringPtr(theString: CFStringRef,
++                                 encoding: CFStringEncoding)
++                                 -> *const c_char;
++    pub fn CFStringGetLength(theString: CFStringRef) -> CFIndex;
++    //fn CFStringGetPascalString
++    //fn CFStringGetPascalStringPtr
++    //fn CFStringGetRangeOfComposedCharactersAtIndex
++    //fn CFStringInitInlineBuffer
++
++    /* Working With Hyphenation */
++    //fn CFStringGetHyphenationLocationBeforeIndex
++    //fn CFStringIsHyphenationAvailableForLocale
++
++    /* Working With Encodings */
++    //fn CFStringConvertEncodingToIANACharSetName
++    //fn CFStringConvertEncodingToNSStringEncoding
++    //fn CFStringConvertEncodingToWindowsCodepage
++    //fn CFStringConvertIANACharSetNameToEncoding
++    //fn CFStringConvertNSStringEncodingToEncoding
++    //fn CFStringConvertWindowsCodepageToEncoding
++    //fn CFStringGetFastestEncoding
++    //fn CFStringGetListOfAvailableEncodings
++    //fn CFStringGetMaximumSizeForEncoding
++    //fn CFStringGetMostCompatibleMacStringEncoding
++    //fn CFStringGetNameOfEncoding
++    //fn CFStringGetSmallestEncoding
++    //fn CFStringGetSystemEncoding
++    //fn CFStringIsEncodingAvailable
++
++    /* Getting Numeric Values */
++    //fn CFStringGetDoubleValue
++    //fn CFStringGetIntValue
++
++    /* Getting String Properties */
++    //fn CFShowStr
++    pub fn CFStringGetTypeID() -> CFTypeID;
++
++    /* String File System Representations */
++    //fn CFStringCreateWithFileSystemRepresentation
++    //fn CFStringGetFileSystemRepresentation
++    //fn CFStringGetMaximumSizeOfFileSystemRepresentation
++
++    /* Getting Paragraph Bounds */
++    //fn CFStringGetParagraphBounds
++
++    /* Managing Surrogates */
++    //fn CFStringGetLongCharacterForSurrogatePair
++    //fn CFStringGetSurrogatePairForLongCharacter
++    //fn CFStringIsSurrogateHighCharacter
++    //fn CFStringIsSurrogateLowCharacter
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3081ec2e994e5264a02b50a66dad559ad3262df2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,162 @@@
++// Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++use libc::c_void;
++
++use base::{CFOptionFlags, CFIndex, CFAllocatorRef, Boolean, CFTypeID, CFTypeRef, SInt32};
++use string::{CFStringRef, CFStringEncoding};
++use error::CFErrorRef;
++
++#[repr(C)]
++pub struct __CFURL(c_void);
++
++pub type CFURLRef = *const __CFURL;
++
++pub type CFURLBookmarkCreationOptions = CFOptionFlags;
++
++pub type CFURLPathStyle = CFIndex;
++
++/* typedef CF_ENUM(CFIndex, CFURLPathStyle) */
++pub const kCFURLPOSIXPathStyle: CFURLPathStyle   = 0;
++pub const kCFURLHFSPathStyle: CFURLPathStyle     = 1;
++pub const kCFURLWindowsPathStyle: CFURLPathStyle = 2;
++
++// static kCFURLBookmarkCreationPreferFileIDResolutionMask: CFURLBookmarkCreationOptions =
++//     (1 << 8) as u32;
++// static kCFURLBookmarkCreationMinimalBookmarkMask: CFURLBookmarkCreationOptions =
++//     (1 << 9) as u32;
++// static kCFURLBookmarkCreationSuitableForBookmarkFile: CFURLBookmarkCreationOptions =
++//     (1 << 10) as u32;
++// static kCFURLBookmarkCreationWithSecurityScope: CFURLBookmarkCreationOptions =
++//     (1 << 11) as u32;
++// static kCFURLBookmarkCreationSecurityScopeAllowOnlyReadAccess: CFURLBookmarkCreationOptions =
++//     (1 << 12) as u32;
++
++// TODO: there are a lot of missing keys and constants. Add if you are bored or need them.
++
++extern {
++    /*
++     * CFURL.h
++     */
++
++    /* Common File System Resource Keys */
++    pub static kCFURLAttributeModificationDateKey: CFStringRef;
++    pub static kCFURLContentAccessDateKey: CFStringRef;
++    pub static kCFURLContentModificationDateKey: CFStringRef;
++    pub static kCFURLCreationDateKey: CFStringRef;
++    pub static kCFURLFileResourceIdentifierKey: CFStringRef;
++    pub static kCFURLFileSecurityKey: CFStringRef;
++    pub static kCFURLHasHiddenExtensionKey: CFStringRef;
++    pub static kCFURLIsDirectoryKey: CFStringRef;
++    pub static kCFURLIsExecutableKey: CFStringRef;
++    pub static kCFURLIsHiddenKey: CFStringRef;
++    pub static kCFURLIsPackageKey: CFStringRef;
++    pub static kCFURLIsReadableKey: CFStringRef;
++    pub static kCFURLIsRegularFileKey: CFStringRef;
++    pub static kCFURLIsSymbolicLinkKey: CFStringRef;
++    pub static kCFURLIsSystemImmutableKey: CFStringRef;
++    pub static kCFURLIsUserImmutableKey: CFStringRef;
++    pub static kCFURLIsVolumeKey: CFStringRef;
++    pub static kCFURLIsWritableKey: CFStringRef;
++    pub static kCFURLLabelNumberKey: CFStringRef;
++    pub static kCFURLLinkCountKey: CFStringRef;
++    pub static kCFURLLocalizedLabelKey: CFStringRef;
++    pub static kCFURLLocalizedNameKey: CFStringRef;
++    pub static kCFURLLocalizedTypeDescriptionKey: CFStringRef;
++    pub static kCFURLNameKey: CFStringRef;
++    pub static kCFURLParentDirectoryURLKey: CFStringRef;
++    pub static kCFURLPreferredIOBlockSizeKey: CFStringRef;
++    pub static kCFURLTypeIdentifierKey: CFStringRef;
++    pub static kCFURLVolumeIdentifierKey: CFStringRef;
++    pub static kCFURLVolumeURLKey: CFStringRef;
++
++    #[cfg(feature="mac_os_10_8_features")]
++    #[cfg_attr(feature = "mac_os_10_7_support", linkage = "extern_weak")]
++    pub static kCFURLIsExcludedFromBackupKey: CFStringRef;
++    pub static kCFURLFileResourceTypeKey: CFStringRef;
++
++    /* Creating a CFURL */
++    pub fn CFURLCopyAbsoluteURL(anURL: CFURLRef) -> CFURLRef;
++    //fn CFURLCreateAbsoluteURLWithBytes
++    //fn CFURLCreateByResolvingBookmarkData
++    //fn CFURLCreateCopyAppendingPathComponent
++    //fn CFURLCreateCopyAppendingPathExtension
++    //fn CFURLCreateCopyDeletingLastPathComponent
++    //fn CFURLCreateCopyDeletingPathExtension
++    pub fn CFURLCreateFilePathURL(allocator: CFAllocatorRef, url: CFURLRef, error: *mut CFErrorRef) -> CFURLRef;
++    //fn CFURLCreateFileReferenceURL
++    pub fn CFURLCreateFromFileSystemRepresentation(allocator: CFAllocatorRef, buffer: *const u8, bufLen: CFIndex, isDirectory: Boolean) -> CFURLRef;
++    //fn CFURLCreateFromFileSystemRepresentationRelativeToBase
++    //fn CFURLCreateFromFSRef
++    pub fn CFURLCreateWithBytes(allocator: CFAllocatorRef, URLBytes: *const u8, length: CFIndex, encoding: CFStringEncoding, baseURL: CFURLRef) -> CFURLRef;
++    pub fn CFURLCreateWithFileSystemPath(allocator: CFAllocatorRef, filePath: CFStringRef, pathStyle: CFURLPathStyle, isDirectory: Boolean) -> CFURLRef;
++    pub fn CFURLCreateWithFileSystemPathRelativeToBase(allocator: CFAllocatorRef, filePath: CFStringRef, pathStyle: CFURLPathStyle, isDirectory: Boolean, baseURL: CFURLRef) -> CFURLRef;
++    //fn CFURLCreateWithString(allocator: CFAllocatorRef, urlString: CFStringRef,
++    //                         baseURL: CFURLRef) -> CFURLRef;
++
++    /* Accessing the Parts of a URL */
++    pub fn CFURLCanBeDecomposed(anURL: CFURLRef) -> Boolean;
++    pub fn CFURLCopyFileSystemPath(anURL: CFURLRef, pathStyle: CFURLPathStyle) -> CFStringRef;
++    pub fn CFURLCopyFragment(anURL: CFURLRef, charactersToLeaveEscaped: CFStringRef) -> CFStringRef;
++    pub fn CFURLCopyHostName(anURL: CFURLRef) -> CFStringRef;
++    pub fn CFURLCopyLastPathComponent(anURL: CFURLRef) -> CFStringRef;
++    pub fn CFURLCopyNetLocation(anURL: CFURLRef) -> CFStringRef;
++    pub fn CFURLCopyParameterString(anURL: CFURLRef, charactersToLeaveEscaped: CFStringRef) -> CFStringRef;
++    pub fn CFURLCopyPassword(anURL: CFURLRef) -> CFStringRef;
++    pub fn CFURLCopyPath(anURL: CFURLRef) -> CFStringRef;
++    pub fn CFURLCopyPathExtension(anURL: CFURLRef) -> CFStringRef;
++    pub fn CFURLCopyQueryString(anURL: CFURLRef, charactersToLeaveEscaped: CFStringRef) -> CFStringRef;
++    pub fn CFURLCopyResourceSpecifier(anURL: CFURLRef) -> CFStringRef;
++    pub fn CFURLCopyScheme(anURL: CFURLRef) -> CFStringRef;
++    pub fn CFURLCopyStrictPath(anURL: CFURLRef, isAbsolute: *mut Boolean) -> CFStringRef;
++    pub fn CFURLCopyUserName(anURL: CFURLRef) -> CFStringRef;
++    pub fn CFURLGetPortNumber(anURL: CFURLRef) -> SInt32;
++    pub fn CFURLHasDirectoryPath(anURL: CFURLRef) -> Boolean;
++
++    /* Converting URLs to Other Representations */
++    //fn CFURLCreateData(allocator: CFAllocatorRef, url: CFURLRef,
++    //                   encoding: CFStringEncoding, escapeWhitespace: bool) -> CFDataRef;
++    //fn CFURLCreateStringByAddingPercentEscapes
++    //fn CFURLCreateStringByReplacingPercentEscapes
++    //fn CFURLCreateStringByReplacingPercentEscapesUsingEncoding
++    //fn CFURLGetFileSystemRepresentation
++    //fn CFURLGetFSRef
++    pub fn CFURLGetString(anURL: CFURLRef) -> CFStringRef;
++
++    /* Getting URL Properties */
++    //fn CFURLGetBaseURL(anURL: CFURLRef) -> CFURLRef;
++    //fn CFURLGetBytes
++    //fn CFURLGetByteRangeForComponent
++    pub fn CFURLGetTypeID() -> CFTypeID;
++    //fn CFURLResourceIsReachable
++
++    /* Getting and Setting File System Resource Properties */
++    pub fn CFURLClearResourcePropertyCache(url: CFURLRef);
++    //fn CFURLClearResourcePropertyCacheForKey
++    //fn CFURLCopyResourcePropertiesForKeys
++    //fn CFURLCopyResourcePropertyForKey
++    //fn CFURLCreateResourcePropertiesForKeysFromBookmarkData
++    //fn CFURLCreateResourcePropertyForKeyFromBookmarkData
++    //fn CFURLSetResourcePropertiesForKeys
++    pub fn CFURLSetResourcePropertyForKey(url: CFURLRef, key: CFStringRef, value: CFTypeRef, error: *mut CFErrorRef) -> Boolean;
++    //fn CFURLSetTemporaryResourcePropertyForKey
++
++    /* Working with Bookmark Data */
++    //fn CFURLCreateBookmarkData
++    //fn CFURLCreateBookmarkDataFromAliasRecord
++    //fn CFURLCreateBookmarkDataFromFile
++    //fn CFURLWriteBookmarkDataToFile
++    //fn CFURLStartAccessingSecurityScopedResource
++    //fn CFURLStopAccessingSecurityScopedResource
++}
++
++#[test]
++#[cfg(feature="mac_os_10_8_features")]
++fn can_see_excluded_from_backup_key() {
++    let _ = unsafe { kCFURLIsExcludedFromBackupKey };
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..865cddf7d3d5f2fee2299ec6692768461dc1c605
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"7034c534a1d7d22f7971d6088aa9d281d219ef724026c3428092500f41ae9c2c"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7196785dddb0cd7656488d7b66968be0766b0940
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++[submodule "curl-sys/curl"]
++      path = curl-sys/curl
++      url = https://github.com/alexcrichton/curl
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..00ff5cc1fcb24ef87a1c42af5c67f9fac5b16d0a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,68 @@@
++language: rust
++sudo: required
++dist: trusty
++services:
++  - docker
++
++matrix:
++  include:
++    - os: linux
++      rust: stable
++      env: TARGET=x86_64-unknown-linux-gnu DOCKER=linux64 NO_ADD=1
++    - os: linux
++      rust: stable
++      env: TARGET=i686-unknown-linux-gnu DOCKER=linux32
++    - os: linux
++      rust: stable
++      env: TARGET=x86_64-unknown-linux-musl DOCKER=musl
++    - os: linux
++      rust: stable
++      env: TARGET=x86_64-pc-windows-gnu NO_RUN=1 DOCKER=mingw
++    - os: linux
++      rust: stable
++      env: TARGET=x86_64-unknown-linux-gnu DOCKER=linux64-curl NO_ADD=1
++    - os: osx
++      rust: stable
++      env: TARGET=x86_64-apple-darwin NO_ADD=1
++    - os: osx
++      rust: stable
++      env: TARGET=i686-apple-darwin
++    - os: linux
++      rust: beta
++      env: TARGET=x86_64-unknown-linux-gnu DOCKER=linux64 NO_ADD=1
++    - os: linux
++      rust: nightly
++      env: TARGET=x86_64-unknown-linux-gnu DOCKER=linux64 NO_ADD=1
++sudo: false
++before_script:
++  - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
++  - if [ -z "$NO_ADD" ]; then rustup target add $TARGET; fi
++script:
++  - curl --version
++  - cargo generate-lockfile
++  - cargo generate-lockfile --manifest-path systest/Cargo.toml
++  - if [ -z "$DOCKER" ]; then
++      sh ci/run.sh;
++    else
++      mkdir .cargo target;
++      docker build -t rust -f ci/Dockerfile-$DOCKER ci;
++      docker run
++        -w /src
++        -v `pwd`:/src:ro
++        -v `pwd`/target:/src/target
++        -v `pwd`/ci/.cargo:/src/.cargo:ro
++        -v `rustc --print sysroot`:/usr/local:ro
++        -e TARGET=$TARGET
++        -e NO_RUN=$NO_RUN
++        -e CARGO_TARGET_DIR=/src/target
++        -it rust
++        sh ci/run.sh;
++    fi
++after_success:
++  - travis-cargo --only nightly doc-upload
++notifications:
++  email:
++    on_success: never
++env:
++  global:
++    secure: "j4son34/PmqogLMUHgcvOk+XtyUtcd0aAA8Sa/h4pyupw8AEM7+5DMMIrcrRh7ieKqmL2RSSGnYtYbd2b5yYroudypsqmQhK0StzrtPaftl/8zxw8liXzA9rat8MP0vuEAe5w9KLRdFKUCU7TzcYXcKttpbavqdNsJae+OFzHJc="
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..10720cb23790daf48dffbfb2f428cadd3a46bdfc
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,35 @@@
++[package]
++
++name = "curl"
++version = "0.4.8"
++authors = ["Carl Lerche <me@carllerche.com>",
++           "Alex Crichton <alex@alexcrichton.com>"]
++license = "MIT"
++repository = "https://github.com/alexcrichton/curl-rust"
++homepage = "https://github.com/alexcrichton/curl-rust"
++documentation = "https://docs.rs/curl"
++description = "Rust bindings to libcurl for making HTTP requests"
++categories = ["api-bindings", "web-programming::http-client"]
++
++[badges]
++travis-ci = { repository = "alexcrichton/curl-rust" }
++appveyor = { repository = "alexcrichton/curl-rust" }
++
++[dependencies]
++libc = "0.2"
++curl-sys = { path = "curl-sys", version = "0.3.13" }
++socket2 = "0.2"
++
++# Unix platforms use OpenSSL for now to provide SSL functionality
++[target."cfg(all(unix, not(target_os = \"macos\")))".dependencies]
++openssl-sys = "0.9.0"
++openssl-probe = "0.1"
++
++[target."cfg(windows)".dependencies]
++winapi = "0.2"
++
++[dev-dependencies]
++mio = "0.6"
++
++[workspace]
++members = ["systest"]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5f5e4b09d57a091efc7b6430fb296b0adef6de12
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,19 @@@
++Copyright (c) 2014 Carl Lerche
++
++Permission is hereby granted, free of charge, to any person obtaining a copy
++of this software and associated documentation files (the "Software"), to deal
++in the Software without restriction, including without limitation the rights
++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++copies of the Software, and to permit persons to whom the Software is
++furnished to do so, subject to the following conditions:
++
++The above copyright notice and this permission notice shall be included in
++all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7e5a91b2a3d0d6eb210b07f637534c328f1d4354
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,137 @@@
++# curl-rust
++
++libcurl bindings for Rust
++
++[![Build Status](https://travis-ci.org/alexcrichton/curl-rust.svg?branch=master)](https://travis-ci.org/alexcrichton/curl-rust)
++[![Build status](https://ci.appveyor.com/api/projects/status/lx98wtbxhhhajpr9?svg=true)](https://ci.appveyor.com/project/alexcrichton/curl-rust)
++
++[Documentation](https://docs.rs/curl)
++
++## Quick Start
++
++```rust
++extern crate curl;
++
++use std::io::{stdout, Write};
++
++use curl::easy::Easy;
++
++// Print a web page onto stdout
++fn main() {
++    let mut easy = Easy::new();
++    easy.url("https://www.rust-lang.org/").unwrap();
++    easy.write_function(|data| {
++        Ok(stdout().write(data).unwrap())
++    }).unwrap();
++    easy.perform().unwrap();
++
++    println!("{}", easy.response_code().unwrap());
++}
++```
++
++```rust
++extern crate curl;
++
++use curl::easy::Easy;
++
++// Capture output into a local `Vec`.
++fn main() {
++    let mut dst = Vec::new();
++    let mut easy = Easy::new();
++    easy.url("https://www.rust-lang.org/").unwrap();
++
++    let mut transfer = easy.transfer();
++    transfer.write_function(|data| {
++        dst.extend_from_slice(data);
++        Ok(data.len())
++    }).unwrap();
++    transfer.perform().unwrap();
++}
++```
++
++## Post / Put requests
++
++The `put` and `post` methods on `Easy` can configure the method of the HTTP
++request, and then `read_function` can be used to specify how data is filled in.
++This interface works particularly well with types that implement `Read`.
++
++```rust,no_run
++extern crate curl;
++
++use std::io::Read;
++use curl::easy::Easy;
++
++fn main() {
++    let mut data = "this is the body".as_bytes();
++
++    let mut easy = Easy::new();
++    easy.url("http://www.example.com/upload").unwrap();
++    easy.post(true).unwrap();
++    easy.post_field_size(data.len() as u64).unwrap();
++
++    let mut transfer = easy.transfer();
++    transfer.read_function(|buf| {
++        Ok(data.read(buf).unwrap_or(0))
++    }).unwrap();
++    transfer.perform().unwrap();
++}
++```
++
++## Custom headers
++
++Custom headers can be specified as part of the request:
++
++```rust,no_run
++extern crate curl;
++
++use curl::easy::{Easy, List};
++
++fn main() {
++    let mut easy = Easy::new();
++    easy.url("http://www.example.com").unwrap();
++
++    let mut list = List::new();
++    list.append("Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==").unwrap();
++    easy.http_headers(list).unwrap();
++    easy.perform().unwrap();
++}
++```
++
++## Keep alive
++
++The handle can be re-used across multiple requests. Curl will attempt to
++keep the connections alive.
++
++```rust,no_run
++extern crate curl;
++
++use curl::easy::Easy;
++
++fn main() {
++    let mut handle = Easy::new();
++
++    handle.url("http://www.example.com/foo").unwrap();
++    handle.perform().unwrap();
++
++    handle.url("http://www.example.com/bar").unwrap();
++    handle.perform().unwrap();
++}
++```
++
++## Multiple requests
++
++The libcurl library provides support for sending multiple requests
++simultaneously through the "multi" interface. This is currently bound in the
++`multi` module of this crate and provides the ability to execute multiple
++transfers simultaneously. For more information, see that module.
++
++## Version Support
++
++The bindings have been developed using curl version 7.24.0. They should
++work with any newer version of curl and possibly with older versions,
++but this has not been tested.
++
++## License
++
++The `curl-rust` crate is licensed under the MIT license, see `LICENSE` for more
++details.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f13520ad2997e34a921d2dcba8729c65445efa1d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,68 @@@
++environment:
++  matrix:
++
++  # Ensure MinGW works, but we need to download the 32-bit MinGW compiler from a
++  # custom location.
++  - TARGET: i686-pc-windows-gnu
++    MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
++    MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
++    MINGW_DIR: mingw32
++  - TARGET: x86_64-pc-windows-gnu
++    MSYS_BITS: 64
++
++  # Ensure vanilla builds work
++  - TARGET: i686-pc-windows-msvc
++  - TARGET: x86_64-pc-windows-msvc
++
++  # Pin to specific VS versions to ensure the build works
++  - TARGET: x86_64-pc-windows-msvc
++    ARCH: amd64
++    VS: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat
++  - TARGET: x86_64-pc-windows-msvc
++    ARCH: amd64
++    VS: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
++
++  # Ensure getting libcurl from vcpkg works
++  - TARGET: x86_64-pc-windows-msvc
++    RUSTFLAGS: -Ctarget-feature=+crt-static
++    VCPKG_DEFAULT_TRIPLET: x64-windows-static
++
++install:
++  # Install rust, x86_64-pc-windows-msvc host
++  - appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
++  # use nightly if required until -Ctarget-feature=+crt-static is stable (expected in rust 1.19)
++  - if not defined RUSTFLAGS rustup-init.exe -y --default-host x86_64-pc-windows-msvc
++  - if defined RUSTFLAGS rustup-init.exe -y --default-host x86_64-pc-windows-msvc --default-toolchain nightly
++  - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
++
++  # Install the target we're compiling for
++  - if NOT "%TARGET%" == "x86_64-pc-windows-msvc" rustup target add %TARGET%
++
++  # Use the system msys if we can
++  - if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%
++
++  # download a custom compiler otherwise
++  - if defined MINGW_URL appveyor DownloadFile %MINGW_URL%/%MINGW_ARCHIVE%
++  - if defined MINGW_URL 7z x -y %MINGW_ARCHIVE% > nul
++  - if defined MINGW_URL set PATH=C:\Python27;%CD%\%MINGW_DIR%\bin;C:\msys64\usr\bin;%PATH%
++
++  # If we're pinning to a specific visual studio, do so now
++  - if defined VS call "%VS%" %ARCH%
++
++  # let's see what we got
++  - where gcc rustc cargo
++  - rustc -vV
++  - cargo -vV
++  - set CARGO_TARGET_DIR=%CD%\target
++
++  # install vcpkg if required
++  - if defined VCPKG_DEFAULT_TRIPLET git clone https://github.com/Microsoft/vcpkg c:\projects\vcpkg
++  - if defined VCPKG_DEFAULT_TRIPLET c:\projects\vcpkg\bootstrap-vcpkg.bat
++  - if defined VCPKG_DEFAULT_TRIPLET set VCPKG_ROOT=c:\projects\vcpkg
++  - if defined VCPKG_DEFAULT_TRIPLET %VCPKG_ROOT%\vcpkg.exe install curl
++
++build: false
++
++test_script:
++  - cargo test --target %TARGET%
++  - cargo run --manifest-path systest/Cargo.toml --target %TARGET%
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5ed6338909da0b717fbedc822e5b2ba86cd667bc
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++[target.x86_64-pc-windows-gnu]
++linker = "x86_64-w64-mingw32-gcc"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4d55dcf04dc8f886f68dba2de83f2dbf57eae275
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++FROM ubuntu:16.04
++
++RUN dpkg --add-architecture i386 && \
++    apt-get update && \
++    apt-get install -y --no-install-recommends \
++      gcc-multilib \
++      ca-certificates \
++      make \
++      libc6-dev \
++      libssl-dev:i386 \
++      pkg-config
++
++ENV PKG_CONFIG=i686-linux-gnu-pkg-config \
++    PKG_CONFIG_ALLOW_CROSS=1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a5c1fe37fcdd32cccaf664635b871e2e11b90d78
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,9 @@@
++FROM ubuntu:16.04
++
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++  gcc ca-certificates make libc6-dev \
++  libssl-dev \
++  pkg-config
++
++ENV FEATURES="http2"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..be03c24daf61b9bbe974d23f083c9e6159be9ef8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++FROM ubuntu:14.04
++
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++  gcc ca-certificates make libc6-dev \
++  libssl-dev libcurl4-openssl-dev pkg-config
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ee5926c8d60fbd89da1801664aabed32992639f2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++FROM ubuntu:16.04
++
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++  gcc ca-certificates make libc6-dev \
++  gcc-mingw-w64-x86-64 libz-mingw-w64-dev
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47d211fdfe33e343fe96c3dd3990bba1ef823dc7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,18 @@@
++FROM ubuntu:16.04
++
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++  gcc ca-certificates make libc6-dev curl \
++  musl-tools
++
++RUN \
++  curl https://www.openssl.org/source/old/1.0.2/openssl-1.0.2g.tar.gz | tar xzf - && \
++  cd openssl-1.0.2g && \
++  CC=musl-gcc ./Configure --prefix=/openssl no-dso linux-x86_64 -fPIC && \
++  make -j10 && \
++  make install && \
++  cd .. && \
++  rm -rf openssl-1.0.2g
++
++ENV OPENSSL_STATIC=1 \
++    OPENSSL_DIR=/openssl
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..239d0b8c1c04243f2e9f75e8d676fc84c0065e8d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++#!/bin/sh
++
++set -ex
++
++cargo test --target $TARGET --no-run
++if [ -z "$NO_RUN" ]; then
++    cargo test --target $TARGET
++    cargo run --manifest-path systest/Cargo.toml --target $TARGET
++    cargo doc --no-deps --target $TARGET
++    cargo doc --no-deps -p curl-sys --target $TARGET
++fi
++
++if [ -n "$FEATURES" ]
++then
++    cargo run --manifest-path systest/Cargo.toml --target $TARGET --features "$FEATURES"
++fi
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..be98d4e8ea177763c5208a7a47df5ced675bbcd8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,333 @@@
++use std::ffi::CString;
++use std::fmt;
++use std::path::Path;
++
++use FormError;
++use curl_sys;
++use easy::{list, List};
++
++/// Multipart/formdata for an HTTP POST request.
++///
++/// This structure is built up and then passed to the `Easy::httppost` method to
++/// be sent off with a request.
++pub struct Form {
++    head: *mut curl_sys::curl_httppost,
++    tail: *mut curl_sys::curl_httppost,
++    headers: Vec<List>,
++    buffers: Vec<Vec<u8>>,
++    strings: Vec<CString>,
++}
++
++/// One part in a multipart upload, added to a `Form`.
++pub struct Part<'form, 'data> {
++    form: &'form mut Form,
++    name: &'data str,
++    array: Vec<curl_sys::curl_forms>,
++    error: Option<FormError>,
++}
++
++pub fn raw(form: &Form) -> *mut curl_sys::curl_httppost {
++    form.head
++}
++
++impl Form {
++    /// Creates a new blank form ready for the addition of new data.
++    pub fn new() -> Form {
++        Form {
++            head: 0 as *mut _,
++            tail: 0 as *mut _,
++            headers: Vec::new(),
++            buffers: Vec::new(),
++            strings: Vec::new(),
++        }
++    }
++
++    /// Prepares adding a new part to this `Form`
++    ///
++    /// Note that the part is not actually added to the form until the `add`
++    /// method is called on `Part`, which may or may not fail.
++    pub fn part<'a, 'data>(&'a mut self, name: &'data str) -> Part<'a, 'data> {
++        Part {
++            error: None,
++            form: self,
++            name: name,
++            array: vec![curl_sys::curl_forms {
++                option: curl_sys::CURLFORM_END,
++                value: 0 as *mut _,
++            }],
++        }
++    }
++}
++
++impl fmt::Debug for Form {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        // TODO: fill this out more
++        f.debug_struct("Form")
++         .field("fields", &"...")
++         .finish()
++    }
++}
++
++impl Drop for Form {
++    fn drop(&mut self) {
++        unsafe {
++            curl_sys::curl_formfree(self.head);
++        }
++    }
++}
++
++impl<'form, 'data> Part<'form, 'data> {
++    /// A pointer to the contents of this part, the actual data to send away.
++    pub fn contents(&mut self, contents: &'data [u8]) -> &mut Self {
++        let pos = self.array.len() - 1;
++
++        // curl has an oddity where if the length if 0 it will call strlen
++        // on the value.  This means that if someone wants to add empty form
++        // contents we need to make sure the buffer contains a null byte.
++        let ptr = if contents.is_empty() {
++            b"\x00"
++        } else {
++            contents
++        }.as_ptr();
++
++        self.array.insert(pos, curl_sys::curl_forms {
++            option: curl_sys::CURLFORM_COPYCONTENTS,
++            value: ptr as *mut _,
++        });
++        self.array.insert(pos + 1, curl_sys::curl_forms {
++            option: curl_sys::CURLFORM_CONTENTSLENGTH,
++            value: contents.len() as *mut _,
++        });
++        self
++    }
++
++    /// Causes this file to be read and its contents used as data in this part
++    ///
++    /// This part does not automatically become a file upload part simply
++    /// because its data was read from a file.
++    ///
++    /// # Errors
++    ///
++    /// If the filename has any internal nul bytes or if on Windows it does not
++    /// contain a unicode filename then the `add` function will eventually
++    /// return an error.
++    pub fn file_content<P>(&mut self, file: P) -> &mut Self
++        where P: AsRef<Path>
++    {
++        self._file_content(file.as_ref())
++    }
++
++    fn _file_content(&mut self, file: &Path) -> &mut Self {
++        if let Some(bytes) = self.path2cstr(file) {
++            let pos = self.array.len() - 1;
++            self.array.insert(pos, curl_sys::curl_forms {
++                option: curl_sys::CURLFORM_FILECONTENT,
++                value: bytes.as_ptr() as *mut _,
++            });
++            self.form.strings.push(bytes);
++        }
++        self
++    }
++
++    /// Makes this part a file upload part of the given file.
++    ///
++    /// Sets the filename field to the basename of the provided file name, and
++    /// it reads the contents of the file and passes them as data and sets the
++    /// content type if the given file matches one of the internally known file
++    /// extensions.
++    ///
++    /// The given upload file must exist entirely on the filesystem before the
++    /// upload is started because libcurl needs to read the size of it
++    /// beforehand.
++    ///
++    /// Multiple files can be uploaded by calling this method multiple times and
++    /// content types can also be configured for each file (by calling that
++    /// next).
++    ///
++    /// # Errors
++    ///
++    /// If the filename has any internal nul bytes or if on Windows it does not
++    /// contain a unicode filename then this function will cause `add` to return
++    /// an error when called.
++    pub fn file<P: ?Sized>(&mut self, file: &'data P) -> &mut Self
++        where P: AsRef<Path>
++    {
++        self._file(file.as_ref())
++    }
++
++    fn _file(&mut self, file: &'data Path) -> &mut Self {
++        if let Some(bytes) = self.path2cstr(file) {
++            let pos = self.array.len() - 1;
++            self.array.insert(pos, curl_sys::curl_forms {
++                option: curl_sys::CURLFORM_FILE,
++                value: bytes.as_ptr() as *mut _,
++            });
++            self.form.strings.push(bytes);
++        }
++        self
++    }
++
++    /// Used in combination with `Part::file`, provides the content-type for
++    /// this part, possibly instead of choosing an internal one.
++    ///
++    /// # Panics
++    ///
++    /// This function will panic if `content_type` contains an internal nul
++    /// byte.
++    pub fn content_type(&mut self, content_type: &'data str) -> &mut Self {
++        if let Some(bytes) = self.bytes2cstr(content_type.as_bytes()) {
++            let pos = self.array.len() - 1;
++            self.array.insert(pos, curl_sys::curl_forms {
++                option: curl_sys::CURLFORM_CONTENTTYPE,
++                value: bytes.as_ptr() as *mut _,
++            });
++            self.form.strings.push(bytes);
++        }
++        self
++    }
++
++    /// Used in combination with `Part::file`, provides the filename for
++    /// this part instead of the actual one.
++    ///
++    /// # Errors
++    ///
++    /// If `name` contains an internal nul byte, or if on Windows the path is
++    /// not valid unicode then this function will return an error when `add` is
++    /// called.
++    pub fn filename<P: ?Sized>(&mut self, name: &'data P) -> &mut Self
++        where P: AsRef<Path>
++    {
++        self._filename(name.as_ref())
++    }
++
++    fn _filename(&mut self, name: &'data Path) -> &mut Self {
++        if let Some(bytes) = self.path2cstr(name) {
++            let pos = self.array.len() - 1;
++            self.array.insert(pos, curl_sys::curl_forms {
++                option: curl_sys::CURLFORM_FILENAME,
++                value: bytes.as_ptr() as *mut _,
++            });
++            self.form.strings.push(bytes);
++        }
++        self
++    }
++
++    /// This is used to provide a custom file upload part without using the
++    /// `file` method above.
++    ///
++    /// The first parameter is for the filename field and the second is the
++    /// in-memory contents.
++    ///
++    /// # Errors
++    ///
++    /// If `name` contains an internal nul byte, or if on Windows the path is
++    /// not valid unicode then this function will return an error when `add` is
++    /// called.
++    pub fn buffer<P: ?Sized>(&mut self, name: &'data P, data: Vec<u8>)
++                             -> &mut Self
++        where P: AsRef<Path>
++    {
++        self._buffer(name.as_ref(), data)
++    }
++
++    fn _buffer(&mut self, name: &'data Path, data: Vec<u8>) -> &mut Self {
++        if let Some(bytes) = self.path2cstr(name) {
++            let pos = self.array.len() - 1;
++            self.array.insert(pos, curl_sys::curl_forms {
++                option: curl_sys::CURLFORM_BUFFER,
++                value: bytes.as_ptr() as *mut _,
++            });
++            self.form.strings.push(bytes);
++            self.array.insert(pos + 1, curl_sys::curl_forms {
++                option: curl_sys::CURLFORM_BUFFERPTR,
++                value: data.as_ptr() as *mut _,
++            });
++            self.array.insert(pos + 2, curl_sys::curl_forms {
++                option: curl_sys::CURLFORM_BUFFERLENGTH,
++                value: data.len() as *mut _,
++            });
++            self.form.buffers.push(data);
++        }
++        self
++    }
++
++    /// Specifies extra headers for the form POST section.
++    ///
++    /// Appends the list of headers to those libcurl automatically generates.
++    pub fn content_header(&mut self, headers: List) -> &mut Self {
++        let pos = self.array.len() - 1;
++        self.array.insert(pos, curl_sys::curl_forms {
++            option: curl_sys::CURLFORM_CONTENTHEADER,
++            value: list::raw(&headers) as *mut _,
++        });
++        self.form.headers.push(headers);
++        self
++    }
++
++    /// Attempts to add this part to the `Form` that it was created from.
++    ///
++    /// If any error happens while adding, that error is returned, otherwise
++    /// `Ok(())` is returned.
++    pub fn add(&mut self) -> Result<(), FormError> {
++        if let Some(err) = self.error.clone() {
++            return Err(err)
++        }
++        let rc = unsafe {
++            curl_sys::curl_formadd(&mut self.form.head,
++                                   &mut self.form.tail,
++                                   curl_sys::CURLFORM_COPYNAME,
++                                   self.name.as_ptr(),
++                                   curl_sys::CURLFORM_NAMELENGTH,
++                                   self.name.len(),
++                                   curl_sys::CURLFORM_ARRAY,
++                                   self.array.as_ptr(),
++                                   curl_sys::CURLFORM_END)
++        };
++        if rc == curl_sys::CURL_FORMADD_OK {
++            Ok(())
++        } else {
++            Err(FormError::new(rc))
++        }
++    }
++
++    #[cfg(unix)]
++    fn path2cstr(&mut self, p: &Path) -> Option<CString> {
++        use std::os::unix::prelude::*;
++        self.bytes2cstr(p.as_os_str().as_bytes())
++    }
++
++    #[cfg(windows)]
++    fn path2cstr(&mut self, p: &Path) -> Option<CString> {
++        match p.to_str() {
++            Some(bytes) => self.bytes2cstr(bytes.as_bytes()),
++            None if self.error.is_none() => {
++                // TODO: better error code
++                self.error = Some(FormError::new(curl_sys::CURL_FORMADD_INCOMPLETE));
++                None
++            }
++            None => None,
++        }
++    }
++
++    fn bytes2cstr(&mut self, bytes: &[u8]) -> Option<CString> {
++        match CString::new(bytes) {
++            Ok(c) => Some(c),
++            Err(..) if self.error.is_none() => {
++                // TODO: better error code
++                self.error = Some(FormError::new(curl_sys::CURL_FORMADD_INCOMPLETE));
++                None
++            }
++            Err(..) => None,
++        }
++    }
++}
++
++impl<'form, 'data> fmt::Debug for Part<'form, 'data> {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        // TODO: fill this out more
++        f.debug_struct("Part")
++         .field("name", &self.name)
++         .field("form", &self.form)
++         .finish()
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..170f801de592c41dd6750d29c00087df77ab8526
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1441 @@@
++use std::cell::Cell;
++use std::fmt;
++use std::io::SeekFrom;
++use std::path::Path;
++use std::ptr;
++use std::str;
++use std::time::Duration;
++
++use curl_sys;
++use libc::c_void;
++
++use Error;
++use easy::{Form, List};
++use easy::handler::{self, InfoType, SeekResult, ReadError, WriteError};
++use easy::handler::{TimeCondition, IpResolve, HttpVersion, SslVersion};
++use easy::handler::{SslOpt, NetRc, Auth, ProxyType};
++use easy::{Easy2, Handler};
++
++/// Raw bindings to a libcurl "easy session".
++///
++/// This type is the same as the `Easy2` type in this library except that it
++/// does not contain a type parameter. Callbacks from curl are all controlled
++/// via closures on this `Easy` type, and this type namely has a `transfer`
++/// method as well for ergonomic management of these callbacks.
++///
++/// There's not necessarily a right answer for which type is correct to use, but
++/// as a general rule of thumb `Easy` is typically a reasonable choice for
++/// synchronous I/O and `Easy2` is a good choice for asynchronous I/O.
++///
++/// ## Examples
++///
++/// Creating a handle which can be used later
++///
++/// ```
++/// use curl::easy::Easy;
++///
++/// let handle = Easy::new();
++/// ```
++///
++/// Send an HTTP request, writing the response to stdout.
++///
++/// ```
++/// use std::io::{stdout, Write};
++///
++/// use curl::easy::Easy;
++///
++/// let mut handle = Easy::new();
++/// handle.url("https://www.rust-lang.org/").unwrap();
++/// handle.write_function(|data| {
++///     Ok(stdout().write(data).unwrap())
++/// }).unwrap();
++/// handle.perform().unwrap();
++/// ```
++///
++/// Collect all output of an HTTP request to a vector.
++///
++/// ```
++/// use curl::easy::Easy;
++///
++/// let mut data = Vec::new();
++/// let mut handle = Easy::new();
++/// handle.url("https://www.rust-lang.org/").unwrap();
++/// {
++///     let mut transfer = handle.transfer();
++///     transfer.write_function(|new_data| {
++///         data.extend_from_slice(new_data);
++///         Ok(new_data.len())
++///     }).unwrap();
++///     transfer.perform().unwrap();
++/// }
++/// println!("{:?}", data);
++/// ```
++///
++/// More examples of various properties of an HTTP request can be found on the
++/// specific methods as well.
++#[derive(Debug)]
++pub struct Easy {
++    inner: Easy2<EasyData>,
++}
++
++/// A scoped transfer of information which borrows an `Easy` and allows
++/// referencing stack-local data of the lifetime `'data`.
++///
++/// Usage of `Easy` requires the `'static` and `Send` bounds on all callbacks
++/// registered, but that's not often wanted if all you need is to collect a
++/// bunch of data in memory to a vector, for example. The `Transfer` structure,
++/// created by the `Easy::transfer` method, is used for this sort of request.
++///
++/// The callbacks attached to a `Transfer` are only active for that one transfer
++/// object, and they allow to elide both the `Send` and `'static` bounds to
++/// close over stack-local information.
++pub struct Transfer<'easy, 'data> {
++    easy: &'easy mut Easy,
++    data: Box<Callbacks<'data>>,
++}
++
++pub struct EasyData {
++    running: Cell<bool>,
++    owned: Callbacks<'static>,
++    borrowed: Cell<*mut Callbacks<'static>>,
++}
++
++unsafe impl Send for EasyData {}
++
++#[derive(Default)]
++struct Callbacks<'a> {
++    write: Option<Box<FnMut(&[u8]) -> Result<usize, WriteError> + 'a>>,
++    read: Option<Box<FnMut(&mut [u8]) -> Result<usize, ReadError> + 'a>>,
++    seek: Option<Box<FnMut(SeekFrom) -> SeekResult + 'a>>,
++    debug: Option<Box<FnMut(InfoType, &[u8]) + 'a>>,
++    header: Option<Box<FnMut(&[u8]) -> bool + 'a>>,
++    progress: Option<Box<FnMut(f64, f64, f64, f64) -> bool + 'a>>,
++    ssl_ctx: Option<Box<FnMut(*mut c_void) -> Result<(), Error> + 'a>>,
++}
++
++impl Easy {
++    /// Creates a new "easy" handle which is the core of almost all operations
++    /// in libcurl.
++    ///
++    /// To use a handle, applications typically configure a number of options
++    /// followed by a call to `perform`. Options are preserved across calls to
++    /// `perform` and need to be reset manually (or via the `reset` method) if
++    /// this is not desired.
++    pub fn new() -> Easy {
++        Easy {
++            inner: Easy2::new(EasyData {
++                running: Cell::new(false),
++                owned: Callbacks::default(),
++                borrowed: Cell::new(ptr::null_mut()),
++            }),
++        }
++    }
++
++    // =========================================================================
++    // Behavior options
++
++    /// Same as [`Easy2::verbose`](struct.Easy2.html#method.verbose)
++    pub fn verbose(&mut self, verbose: bool) -> Result<(), Error> {
++        self.inner.verbose(verbose)
++    }
++
++    /// Same as [`Easy2::show_header`](struct.Easy2.html#method.show_header)
++    pub fn show_header(&mut self, show: bool) -> Result<(), Error> {
++        self.inner.show_header(show)
++    }
++
++    /// Same as [`Easy2::progress`](struct.Easy2.html#method.progress)
++    pub fn progress(&mut self, progress: bool) -> Result<(), Error> {
++        self.inner.progress(progress)
++    }
++
++    /// Same as [`Easy2::signal`](struct.Easy2.html#method.signal)
++    pub fn signal(&mut self, signal: bool) -> Result<(), Error> {
++        self.inner.signal(signal)
++    }
++
++    /// Same as [`Easy2::wildcard_match`](struct.Easy2.html#method.wildcard_match)
++    pub fn wildcard_match(&mut self, m: bool) -> Result<(), Error> {
++        self.inner.wildcard_match(m)
++    }
++
++    /// Same as [`Easy2::unix_socket`](struct.Easy2.html#method.unix_socket)
++    pub fn unix_socket(&mut self, unix_domain_socket: &str) -> Result<(), Error> {
++        self.inner.unix_socket(unix_domain_socket)
++    }
++
++    // =========================================================================
++    // Callback options
++
++    /// Set callback for writing received data.
++    ///
++    /// This callback function gets called by libcurl as soon as there is data
++    /// received that needs to be saved.
++    ///
++    /// The callback function will be passed as much data as possible in all
++    /// invokes, but you must not make any assumptions. It may be one byte, it
++    /// may be thousands. If `show_header` is enabled, which makes header data
++    /// get passed to the write callback, you can get up to
++    /// `CURL_MAX_HTTP_HEADER` bytes of header data passed into it.  This
++    /// usually means 100K.
++    ///
++    /// This function may be called with zero bytes data if the transferred file
++    /// is empty.
++    ///
++    /// The callback should return the number of bytes actually taken care of.
++    /// If that amount differs from the amount passed to your callback function,
++    /// it'll signal an error condition to the library. This will cause the
++    /// transfer to get aborted and the libcurl function used will return
++    /// an error with `is_write_error`.
++    ///
++    /// If your callback function returns `Err(WriteError::Pause)` it will cause
++    /// this transfer to become paused. See `unpause_write` for further details.
++    ///
++    /// By default data is sent into the void, and this corresponds to the
++    /// `CURLOPT_WRITEFUNCTION` and `CURLOPT_WRITEDATA` options.
++    ///
++    /// Note that the lifetime bound on this function is `'static`, but that
++    /// is often too restrictive. To use stack data consider calling the
++    /// `transfer` method and then using `write_function` to configure a
++    /// callback that can reference stack-local data.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use std::io::{stdout, Write};
++    /// use curl::easy::Easy;
++    ///
++    /// let mut handle = Easy::new();
++    /// handle.url("https://www.rust-lang.org/").unwrap();
++    /// handle.write_function(|data| {
++    ///     Ok(stdout().write(data).unwrap())
++    /// }).unwrap();
++    /// handle.perform().unwrap();
++    /// ```
++    ///
++    /// Writing to a stack-local buffer
++    ///
++    /// ```
++    /// use std::io::{stdout, Write};
++    /// use curl::easy::Easy;
++    ///
++    /// let mut buf = Vec::new();
++    /// let mut handle = Easy::new();
++    /// handle.url("https://www.rust-lang.org/").unwrap();
++    ///
++    /// let mut transfer = handle.transfer();
++    /// transfer.write_function(|data| {
++    ///     buf.extend_from_slice(data);
++    ///     Ok(data.len())
++    /// }).unwrap();
++    /// transfer.perform().unwrap();
++    /// ```
++    pub fn write_function<F>(&mut self, f: F) -> Result<(), Error>
++        where F: FnMut(&[u8]) -> Result<usize, WriteError> + Send + 'static
++    {
++        self.inner.get_mut().owned.write = Some(Box::new(f));
++        Ok(())
++    }
++
++    /// Read callback for data uploads.
++    ///
++    /// This callback function gets called by libcurl as soon as it needs to
++    /// read data in order to send it to the peer - like if you ask it to upload
++    /// or post data to the server.
++    ///
++    /// Your function must then return the actual number of bytes that it stored
++    /// in that memory area. Returning 0 will signal end-of-file to the library
++    /// and cause it to stop the current transfer.
++    ///
++    /// If you stop the current transfer by returning 0 "pre-maturely" (i.e
++    /// before the server expected it, like when you've said you will upload N
++    /// bytes and you upload less than N bytes), you may experience that the
++    /// server "hangs" waiting for the rest of the data that won't come.
++    ///
++    /// The read callback may return `Err(ReadError::Abort)` to stop the
++    /// current operation immediately, resulting in a `is_aborted_by_callback`
++    /// error code from the transfer.
++    ///
++    /// The callback can return `Err(ReadError::Pause)` to cause reading from
++    /// this connection to pause. See `unpause_read` for further details.
++    ///
++    /// By default data not input, and this corresponds to the
++    /// `CURLOPT_READFUNCTION` and `CURLOPT_READDATA` options.
++    ///
++    /// Note that the lifetime bound on this function is `'static`, but that
++    /// is often too restrictive. To use stack data consider calling the
++    /// `transfer` method and then using `read_function` to configure a
++    /// callback that can reference stack-local data.
++    ///
++    /// # Examples
++    ///
++    /// Read input from stdin
++    ///
++    /// ```no_run
++    /// use std::io::{stdin, Read};
++    /// use curl::easy::Easy;
++    ///
++    /// let mut handle = Easy::new();
++    /// handle.url("https://example.com/login").unwrap();
++    /// handle.read_function(|into| {
++    ///     Ok(stdin().read(into).unwrap())
++    /// }).unwrap();
++    /// handle.post(true).unwrap();
++    /// handle.perform().unwrap();
++    /// ```
++    ///
++    /// Reading from stack-local data:
++    ///
++    /// ```no_run
++    /// use std::io::{stdin, Read};
++    /// use curl::easy::Easy;
++    ///
++    /// let mut data_to_upload = &b"foobar"[..];
++    /// let mut handle = Easy::new();
++    /// handle.url("https://example.com/login").unwrap();
++    /// handle.post(true).unwrap();
++    ///
++    /// let mut transfer = handle.transfer();
++    /// transfer.read_function(|into| {
++    ///     Ok(data_to_upload.read(into).unwrap())
++    /// }).unwrap();
++    /// transfer.perform().unwrap();
++    /// ```
++    pub fn read_function<F>(&mut self, f: F) -> Result<(), Error>
++        where F: FnMut(&mut [u8]) -> Result<usize, ReadError> + Send + 'static
++    {
++        self.inner.get_mut().owned.read = Some(Box::new(f));
++        Ok(())
++    }
++
++    /// User callback for seeking in input stream.
++    ///
++    /// This function gets called by libcurl to seek to a certain position in
++    /// the input stream and can be used to fast forward a file in a resumed
++    /// upload (instead of reading all uploaded bytes with the normal read
++    /// function/callback). It is also called to rewind a stream when data has
++    /// already been sent to the server and needs to be sent again. This may
++    /// happen when doing a HTTP PUT or POST with a multi-pass authentication
++    /// method, or when an existing HTTP connection is reused too late and the
++    /// server closes the connection.
++    ///
++    /// The callback function must return `SeekResult::Ok` on success,
++    /// `SeekResult::Fail` to cause the upload operation to fail or
++    /// `SeekResult::CantSeek` to indicate that while the seek failed, libcurl
++    /// is free to work around the problem if possible. The latter can sometimes
++    /// be done by instead reading from the input or similar.
++    ///
++    /// By default data this option is not set, and this corresponds to the
++    /// `CURLOPT_SEEKFUNCTION` and `CURLOPT_SEEKDATA` options.
++    ///
++    /// Note that the lifetime bound on this function is `'static`, but that
++    /// is often too restrictive. To use stack data consider calling the
++    /// `transfer` method and then using `seek_function` to configure a
++    /// callback that can reference stack-local data.
++    pub fn seek_function<F>(&mut self, f: F) -> Result<(), Error>
++        where F: FnMut(SeekFrom) -> SeekResult + Send + 'static
++    {
++        self.inner.get_mut().owned.seek = Some(Box::new(f));
++        Ok(())
++    }
++
++    /// Callback to progress meter function
++    ///
++    /// This function gets called by libcurl instead of its internal equivalent
++    /// with a frequent interval. While data is being transferred it will be
++    /// called very frequently, and during slow periods like when nothing is
++    /// being transferred it can slow down to about one call per second.
++    ///
++    /// The callback gets told how much data libcurl will transfer and has
++    /// transferred, in number of bytes. The first argument is the total number
++    /// of bytes libcurl expects to download in this transfer. The second
++    /// argument is the number of bytes downloaded so far. The third argument is
++    /// the total number of bytes libcurl expects to upload in this transfer.
++    /// The fourth argument is the number of bytes uploaded so far.
++    ///
++    /// Unknown/unused argument values passed to the callback will be set to
++    /// zero (like if you only download data, the upload size will remain 0).
++    /// Many times the callback will be called one or more times first, before
++    /// it knows the data sizes so a program must be made to handle that.
++    ///
++    /// Returning `false` from this callback will cause libcurl to abort the
++    /// transfer and return `is_aborted_by_callback`.
++    ///
++    /// If you transfer data with the multi interface, this function will not be
++    /// called during periods of idleness unless you call the appropriate
++    /// libcurl function that performs transfers.
++    ///
++    /// `progress` must be set to `true` to make this function actually get
++    /// called.
++    ///
++    /// By default this function calls an internal method and corresponds to
++    /// `CURLOPT_PROGRESSFUNCTION` and `CURLOPT_PROGRESSDATA`.
++    ///
++    /// Note that the lifetime bound on this function is `'static`, but that
++    /// is often too restrictive. To use stack data consider calling the
++    /// `transfer` method and then using `progress_function` to configure a
++    /// callback that can reference stack-local data.
++    pub fn progress_function<F>(&mut self, f: F) -> Result<(), Error>
++        where F: FnMut(f64, f64, f64, f64) -> bool + Send + 'static
++    {
++        self.inner.get_mut().owned.progress = Some(Box::new(f));
++        Ok(())
++    }
++
++    /// Callback to SSL context
++    ///
++    /// This callback function gets called by libcurl just before the
++    /// initialization of an SSL connection after having processed all
++    /// other SSL related options to give a last chance to an
++    /// application to modify the behaviour of the SSL
++    /// initialization. The `ssl_ctx` parameter is actually a pointer
++    /// to the SSL library's SSL_CTX. If an error is returned from the
++    /// callback no attempt to establish a connection is made and the
++    /// perform operation will return the callback's error code.
++    ///
++    /// This function will get called on all new connections made to a
++    /// server, during the SSL negotiation. The SSL_CTX pointer will
++    /// be a new one every time.
++    ///
++    /// To use this properly, a non-trivial amount of knowledge of
++    /// your SSL library is necessary. For example, you can use this
++    /// function to call library-specific callbacks to add additional
++    /// validation code for certificates, and even to change the
++    /// actual URI of a HTTPS request.
++    ///
++    /// By default this function calls an internal method and
++    /// corresponds to `CURLOPT_SSL_CTX_FUNCTION` and
++    /// `CURLOPT_SSL_CTX_DATA`.
++    ///
++    /// Note that the lifetime bound on this function is `'static`, but that
++    /// is often too restrictive. To use stack data consider calling the
++    /// `transfer` method and then using `progress_function` to configure a
++    /// callback that can reference stack-local data.
++    pub fn ssl_ctx_function<F>(&mut self, f: F) -> Result<(), Error>
++        where F: FnMut(*mut c_void) -> Result<(), Error> + Send + 'static
++    {
++        self.inner.get_mut().owned.ssl_ctx = Some(Box::new(f));
++        Ok(())
++    }
++
++    /// Specify a debug callback
++    ///
++    /// `debug_function` replaces the standard debug function used when
++    /// `verbose` is in effect. This callback receives debug information,
++    /// as specified in the type argument.
++    ///
++    /// By default this option is not set and corresponds to the
++    /// `CURLOPT_DEBUGFUNCTION` and `CURLOPT_DEBUGDATA` options.
++    ///
++    /// Note that the lifetime bound on this function is `'static`, but that
++    /// is often too restrictive. To use stack data consider calling the
++    /// `transfer` method and then using `debug_function` to configure a
++    /// callback that can reference stack-local data.
++    pub fn debug_function<F>(&mut self, f: F) -> Result<(), Error>
++        where F: FnMut(InfoType, &[u8]) + Send + 'static
++    {
++        self.inner.get_mut().owned.debug = Some(Box::new(f));
++        Ok(())
++    }
++
++    /// Callback that receives header data
++    ///
++    /// This function gets called by libcurl as soon as it has received header
++    /// data. The header callback will be called once for each header and only
++    /// complete header lines are passed on to the callback. Parsing headers is
++    /// very easy using this. If this callback returns `false` it'll signal an
++    /// error to the library. This will cause the transfer to get aborted and
++    /// the libcurl function in progress will return `is_write_error`.
++    ///
++    /// A complete HTTP header that is passed to this function can be up to
++    /// CURL_MAX_HTTP_HEADER (100K) bytes.
++    ///
++    /// It's important to note that the callback will be invoked for the headers
++    /// of all responses received after initiating a request and not just the
++    /// final response. This includes all responses which occur during
++    /// authentication negotiation. If you need to operate on only the headers
++    /// from the final response, you will need to collect headers in the
++    /// callback yourself and use HTTP status lines, for example, to delimit
++    /// response boundaries.
++    ///
++    /// When a server sends a chunked encoded transfer, it may contain a
++    /// trailer. That trailer is identical to a HTTP header and if such a
++    /// trailer is received it is passed to the application using this callback
++    /// as well. There are several ways to detect it being a trailer and not an
++    /// ordinary header: 1) it comes after the response-body. 2) it comes after
++    /// the final header line (CR LF) 3) a Trailer: header among the regular
++    /// response-headers mention what header(s) to expect in the trailer.
++    ///
++    /// For non-HTTP protocols like FTP, POP3, IMAP and SMTP this function will
++    /// get called with the server responses to the commands that libcurl sends.
++    ///
++    /// By default this option is not set and corresponds to the
++    /// `CURLOPT_HEADERFUNCTION` and `CURLOPT_HEADERDATA` options.
++    ///
++    /// Note that the lifetime bound on this function is `'static`, but that
++    /// is often too restrictive. To use stack data consider calling the
++    /// `transfer` method and then using `header_function` to configure a
++    /// callback that can reference stack-local data.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use std::str;
++    ///
++    /// use curl::easy::Easy;
++    ///
++    /// let mut handle = Easy::new();
++    /// handle.url("https://www.rust-lang.org/").unwrap();
++    /// handle.header_function(|header| {
++    ///     print!("header: {}", str::from_utf8(header).unwrap());
++    ///     true
++    /// }).unwrap();
++    /// handle.perform().unwrap();
++    /// ```
++    ///
++    /// Collecting headers to a stack local vector
++    ///
++    /// ```
++    /// use std::str;
++    ///
++    /// use curl::easy::Easy;
++    ///
++    /// let mut headers = Vec::new();
++    /// let mut handle = Easy::new();
++    /// handle.url("https://www.rust-lang.org/").unwrap();
++    ///
++    /// {
++    ///     let mut transfer = handle.transfer();
++    ///     transfer.header_function(|header| {
++    ///         headers.push(str::from_utf8(header).unwrap().to_string());
++    ///         true
++    ///     }).unwrap();
++    ///     transfer.perform().unwrap();
++    /// }
++    ///
++    /// println!("{:?}", headers);
++    /// ```
++    pub fn header_function<F>(&mut self, f: F) -> Result<(), Error>
++        where F: FnMut(&[u8]) -> bool + Send + 'static
++    {
++        self.inner.get_mut().owned.header = Some(Box::new(f));
++        Ok(())
++    }
++
++    // =========================================================================
++    // Error options
++
++    // TODO: error buffer and stderr
++
++    /// Same as [`Easy2::fail_on_error`](struct.Easy2.html#method.fail_on_error)
++    pub fn fail_on_error(&mut self, fail: bool) -> Result<(), Error> {
++        self.inner.fail_on_error(fail)
++    }
++
++    // =========================================================================
++    // Network options
++
++    /// Same as [`Easy2::url`](struct.Easy2.html#method.url)
++    pub fn url(&mut self, url: &str) -> Result<(), Error> {
++        self.inner.url(url)
++    }
++
++    /// Same as [`Easy2::port`](struct.Easy2.html#method.port)
++    pub fn port(&mut self, port: u16) -> Result<(), Error> {
++        self.inner.port(port)
++    }
++
++    /// Same as [`Easy2::proxy`](struct.Easy2.html#method.proxy)
++    pub fn proxy(&mut self, url: &str) -> Result<(), Error> {
++        self.inner.proxy(url)
++    }
++
++    /// Same as [`Easy2::proxy_port`](struct.Easy2.html#method.proxy_port)
++    pub fn proxy_port(&mut self, port: u16) -> Result<(), Error> {
++        self.inner.proxy_port(port)
++    }
++
++    /// Same as [`Easy2::proxy_type`](struct.Easy2.html#method.proxy_type)
++    pub fn proxy_type(&mut self, kind: ProxyType) -> Result<(), Error> {
++        self.inner.proxy_type(kind)
++    }
++
++    /// Same as [`Easy2::noproxy`](struct.Easy2.html#method.noproxy)
++    pub fn noproxy(&mut self, skip: &str) -> Result<(), Error> {
++        self.inner.noproxy(skip)
++    }
++
++    /// Same as [`Easy2::http_proxy_tunnel`](struct.Easy2.html#method.http_proxy_tunnel)
++    pub fn http_proxy_tunnel(&mut self, tunnel: bool) -> Result<(), Error> {
++        self.inner.http_proxy_tunnel(tunnel)
++    }
++
++    /// Same as [`Easy2::interface`](struct.Easy2.html#method.interface)
++    pub fn interface(&mut self, interface: &str) -> Result<(), Error> {
++        self.inner.interface(interface)
++    }
++
++    /// Same as [`Easy2::set_local_port`](struct.Easy2.html#method.set_local_port)
++    pub fn set_local_port(&mut self, port: u16) -> Result<(), Error> {
++        self.inner.set_local_port(port)
++    }
++
++    /// Same as [`Easy2::local_port_range`](struct.Easy2.html#method.local_port_range)
++    pub fn local_port_range(&mut self, range: u16) -> Result<(), Error> {
++        self.inner.local_port_range(range)
++    }
++
++    /// Same as [`Easy2::dns_cache_timeout`](struct.Easy2.html#method.dns_cache_timeout)
++    pub fn dns_cache_timeout(&mut self, dur: Duration) -> Result<(), Error> {
++        self.inner.dns_cache_timeout(dur)
++    }
++
++    /// Same as [`Easy2::buffer_size`](struct.Easy2.html#method.buffer_size)
++    pub fn buffer_size(&mut self, size: usize) -> Result<(), Error> {
++        self.inner.buffer_size(size)
++    }
++
++    /// Same as [`Easy2::tcp_nodelay`](struct.Easy2.html#method.tcp_nodelay)
++    pub fn tcp_nodelay(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.tcp_nodelay(enable)
++    }
++
++    /// Same as [`Easy2::tcp_keepalive`](struct.Easy2.html#method.tcp_keepalive)
++    pub fn tcp_keepalive(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.tcp_keepalive(enable)
++    }
++
++    /// Same as [`Easy2::tcp_keepintvl`](struct.Easy2.html#method.tcp_keepalive)
++    pub fn tcp_keepintvl(&mut self, dur: Duration) -> Result<(), Error> {
++        self.inner.tcp_keepintvl(dur)
++    }
++
++    /// Same as [`Easy2::tcp_keepidle`](struct.Easy2.html#method.tcp_keepidle)
++    pub fn tcp_keepidle(&mut self, dur: Duration) -> Result<(), Error> {
++        self.inner.tcp_keepidle(dur)
++    }
++
++    /// Same as [`Easy2::address_scope`](struct.Easy2.html#method.address_scope)
++    pub fn address_scope(&mut self, scope: u32) -> Result<(), Error> {
++        self.inner.address_scope(scope)
++    }
++
++    // =========================================================================
++    // Names and passwords
++
++    /// Same as [`Easy2::username`](struct.Easy2.html#method.username)
++    pub fn username(&mut self, user: &str) -> Result<(), Error> {
++        self.inner.username(user)
++    }
++
++    /// Same as [`Easy2::password`](struct.Easy2.html#method.password)
++    pub fn password(&mut self, pass: &str) -> Result<(), Error> {
++        self.inner.password(pass)
++    }
++
++    /// Same as [`Easy2::http_auth`](struct.Easy2.html#method.http_auth)
++    pub fn http_auth(&mut self, auth: &Auth) -> Result<(), Error> {
++        self.inner.http_auth(auth)
++    }
++
++    /// Same as [`Easy2::proxy_username`](struct.Easy2.html#method.proxy_username)
++    pub fn proxy_username(&mut self, user: &str) -> Result<(), Error> {
++        self.inner.proxy_username(user)
++    }
++
++    /// Same as [`Easy2::proxy_password`](struct.Easy2.html#method.proxy_password)
++    pub fn proxy_password(&mut self, pass: &str) -> Result<(), Error> {
++        self.inner.proxy_password(pass)
++    }
++
++    /// Same as [`Easy2::proxy_auth`](struct.Easy2.html#method.proxy_auth)
++    pub fn proxy_auth(&mut self, auth: &Auth) -> Result<(), Error> {
++        self.inner.proxy_auth(auth)
++    }
++
++    /// Same as [`Easy2::netrc`](struct.Easy2.html#method.netrc)
++    pub fn netrc(&mut self, netrc: NetRc) -> Result<(), Error> {
++        self.inner.netrc(netrc)
++    }
++
++    // =========================================================================
++    // HTTP Options
++
++    /// Same as [`Easy2::autoreferer`](struct.Easy2.html#method.autoreferer)
++    pub fn autoreferer(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.autoreferer(enable)
++    }
++
++    /// Same as [`Easy2::accept_encoding`](struct.Easy2.html#method.accept_encoding)
++    pub fn accept_encoding(&mut self, encoding: &str) -> Result<(), Error> {
++        self.inner.accept_encoding(encoding)
++    }
++
++    /// Same as [`Easy2::transfer_encoding`](struct.Easy2.html#method.transfer_encoding)
++    pub fn transfer_encoding(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.transfer_encoding(enable)
++    }
++
++    /// Same as [`Easy2::follow_location`](struct.Easy2.html#method.follow_location)
++    pub fn follow_location(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.follow_location(enable)
++    }
++
++    /// Same as [`Easy2::unrestricted_auth`](struct.Easy2.html#method.unrestricted_auth)
++    pub fn unrestricted_auth(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.unrestricted_auth(enable)
++    }
++
++    /// Same as [`Easy2::max_redirections`](struct.Easy2.html#method.max_redirections)
++    pub fn max_redirections(&mut self, max: u32) -> Result<(), Error> {
++        self.inner.max_redirections(max)
++    }
++
++    /// Same as [`Easy2::put`](struct.Easy2.html#method.put)
++    pub fn put(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.put(enable)
++    }
++
++    /// Same as [`Easy2::post`](struct.Easy2.html#method.post)
++    pub fn post(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.post(enable)
++    }
++
++    /// Same as [`Easy2::post_field_copy`](struct.Easy2.html#method.post_field_copy)
++    pub fn post_fields_copy(&mut self, data: &[u8]) -> Result<(), Error> {
++        self.inner.post_fields_copy(data)
++    }
++
++    /// Same as [`Easy2::post_field_size`](struct.Easy2.html#method.post_field_size)
++    pub fn post_field_size(&mut self, size: u64) -> Result<(), Error> {
++        self.inner.post_field_size(size)
++    }
++
++    /// Same as [`Easy2::httppost`](struct.Easy2.html#method.httppost)
++    pub fn httppost(&mut self, form: Form) -> Result<(), Error> {
++        self.inner.httppost(form)
++    }
++
++    /// Same as [`Easy2::referer`](struct.Easy2.html#method.referer)
++    pub fn referer(&mut self, referer: &str) -> Result<(), Error> {
++        self.inner.referer(referer)
++    }
++
++    /// Same as [`Easy2::useragent`](struct.Easy2.html#method.useragent)
++    pub fn useragent(&mut self, useragent: &str) -> Result<(), Error> {
++        self.inner.useragent(useragent)
++    }
++
++    /// Same as [`Easy2::http_headers`](struct.Easy2.html#method.http_headers)
++    pub fn http_headers(&mut self, list: List) -> Result<(), Error> {
++        self.inner.http_headers(list)
++    }
++
++    /// Same as [`Easy2::cookie`](struct.Easy2.html#method.cookie)
++    pub fn cookie(&mut self, cookie: &str) -> Result<(), Error> {
++        self.inner.cookie(cookie)
++    }
++
++    /// Same as [`Easy2::cookie_file`](struct.Easy2.html#method.cookie_file)
++    pub fn cookie_file<P: AsRef<Path>>(&mut self, file: P) -> Result<(), Error> {
++        self.inner.cookie_file(file)
++    }
++
++    /// Same as [`Easy2::cookie_jar`](struct.Easy2.html#method.cookie_jar)
++    pub fn cookie_jar<P: AsRef<Path>>(&mut self, file: P) -> Result<(), Error> {
++        self.inner.cookie_jar(file)
++    }
++
++    /// Same as [`Easy2::cookie_session`](struct.Easy2.html#method.cookie_session)
++    pub fn cookie_session(&mut self, session: bool) -> Result<(), Error> {
++        self.inner.cookie_session(session)
++    }
++
++    /// Same as [`Easy2::cookie_list`](struct.Easy2.html#method.cookie_list)
++    pub fn cookie_list(&mut self, cookie: &str) -> Result<(), Error> {
++        self.inner.cookie_list(cookie)
++    }
++
++    /// Same as [`Easy2::get`](struct.Easy2.html#method.get)
++    pub fn get(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.get(enable)
++    }
++
++    /// Same as [`Easy2::ignore_content_length`](struct.Easy2.html#method.ignore_content_length)
++    pub fn ignore_content_length(&mut self, ignore: bool) -> Result<(), Error> {
++        self.inner.ignore_content_length(ignore)
++    }
++
++    /// Same as [`Easy2::http_content_decoding`](struct.Easy2.html#method.http_content_decoding)
++    pub fn http_content_decoding(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.http_content_decoding(enable)
++    }
++
++    /// Same as [`Easy2::http_transfer_decoding`](struct.Easy2.html#method.http_transfer_decoding)
++    pub fn http_transfer_decoding(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.http_transfer_decoding(enable)
++    }
++
++    // =========================================================================
++    // Protocol Options
++
++    /// Same as [`Easy2::range`](struct.Easy2.html#method.range)
++    pub fn range(&mut self, range: &str) -> Result<(), Error> {
++        self.inner.range(range)
++    }
++
++    /// Same as [`Easy2::resume_from`](struct.Easy2.html#method.resume_from)
++    pub fn resume_from(&mut self, from: u64) -> Result<(), Error> {
++        self.inner.resume_from(from)
++    }
++
++    /// Same as [`Easy2::custom_request`](struct.Easy2.html#method.custom_request)
++    pub fn custom_request(&mut self, request: &str) -> Result<(), Error> {
++        self.inner.custom_request(request)
++    }
++
++    /// Same as [`Easy2::fetch_filetime`](struct.Easy2.html#method.fetch_filetime)
++    pub fn fetch_filetime(&mut self, fetch: bool) -> Result<(), Error> {
++        self.inner.fetch_filetime(fetch)
++    }
++
++    /// Same as [`Easy2::nobody`](struct.Easy2.html#method.nobody)
++    pub fn nobody(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.nobody(enable)
++    }
++
++    /// Same as [`Easy2::in_filesize`](struct.Easy2.html#method.in_filesize)
++    pub fn in_filesize(&mut self, size: u64) -> Result<(), Error> {
++        self.inner.in_filesize(size)
++    }
++
++    /// Same as [`Easy2::upload`](struct.Easy2.html#method.upload)
++    pub fn upload(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.upload(enable)
++    }
++
++    /// Same as [`Easy2::max_filesize`](struct.Easy2.html#method.max_filesize)
++    pub fn max_filesize(&mut self, size: u64) -> Result<(), Error> {
++        self.inner.max_filesize(size)
++    }
++
++    /// Same as [`Easy2::time_condition`](struct.Easy2.html#method.time_condition)
++    pub fn time_condition(&mut self, cond: TimeCondition) -> Result<(), Error> {
++        self.inner.time_condition(cond)
++    }
++
++    /// Same as [`Easy2::time_value`](struct.Easy2.html#method.time_value)
++    pub fn time_value(&mut self, val: i64) -> Result<(), Error> {
++        self.inner.time_value(val)
++    }
++
++    // =========================================================================
++    // Connection Options
++
++    /// Same as [`Easy2::timeout`](struct.Easy2.html#method.timeout)
++    pub fn timeout(&mut self, timeout: Duration) -> Result<(), Error> {
++        self.inner.timeout(timeout)
++    }
++
++    /// Same as [`Easy2::low_speed_limit`](struct.Easy2.html#method.low_speed_limit)
++    pub fn low_speed_limit(&mut self, limit: u32) -> Result<(), Error> {
++        self.inner.low_speed_limit(limit)
++    }
++
++    /// Same as [`Easy2::low_speed_time`](struct.Easy2.html#method.low_speed_time)
++    pub fn low_speed_time(&mut self, dur: Duration) -> Result<(), Error> {
++        self.inner.low_speed_time(dur)
++    }
++
++    /// Same as [`Easy2::max_send_speed`](struct.Easy2.html#method.max_send_speed)
++    pub fn max_send_speed(&mut self, speed: u64) -> Result<(), Error> {
++        self.inner.max_send_speed(speed)
++    }
++
++    /// Same as [`Easy2::max_recv_speed`](struct.Easy2.html#method.max_recv_speed)
++    pub fn max_recv_speed(&mut self, speed: u64) -> Result<(), Error> {
++        self.inner.max_recv_speed(speed)
++    }
++
++    /// Same as [`Easy2::max_connects`](struct.Easy2.html#method.max_connects)
++    pub fn max_connects(&mut self, max: u32) -> Result<(), Error> {
++        self.inner.max_connects(max)
++    }
++
++    /// Same as [`Easy2::fresh_connect`](struct.Easy2.html#method.fresh_connect)
++    pub fn fresh_connect(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.fresh_connect(enable)
++    }
++
++    /// Same as [`Easy2::forbid_reuse`](struct.Easy2.html#method.forbid_reuse)
++    pub fn forbid_reuse(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.forbid_reuse(enable)
++    }
++
++    /// Same as [`Easy2::connect_timeout`](struct.Easy2.html#method.connect_timeout)
++    pub fn connect_timeout(&mut self, timeout: Duration) -> Result<(), Error> {
++        self.inner.connect_timeout(timeout)
++    }
++
++    /// Same as [`Easy2::ip_resolve`](struct.Easy2.html#method.ip_resolve)
++    pub fn ip_resolve(&mut self, resolve: IpResolve) -> Result<(), Error> {
++        self.inner.ip_resolve(resolve)
++    }
++
++    /// Same as [`Easy2::connect_only`](struct.Easy2.html#method.connect_only)
++    pub fn connect_only(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.connect_only(enable)
++    }
++
++    // =========================================================================
++    // SSL/Security Options
++
++    /// Same as [`Easy2::ssl_cert`](struct.Easy2.html#method.ssl_cert)
++    pub fn ssl_cert<P: AsRef<Path>>(&mut self, cert: P) -> Result<(), Error> {
++        self.inner.ssl_cert(cert)
++    }
++
++    /// Same as [`Easy2::ssl_cert_type`](struct.Easy2.html#method.ssl_cert_type)
++    pub fn ssl_cert_type(&mut self, kind: &str) -> Result<(), Error> {
++        self.inner.ssl_cert_type(kind)
++    }
++
++    /// Same as [`Easy2::ssl_key`](struct.Easy2.html#method.ssl_key)
++    pub fn ssl_key<P: AsRef<Path>>(&mut self, key: P) -> Result<(), Error> {
++        self.inner.ssl_key(key)
++    }
++
++    /// Same as [`Easy2::ssl_key_type`](struct.Easy2.html#method.ssl_key_type)
++    pub fn ssl_key_type(&mut self, kind: &str) -> Result<(), Error> {
++        self.inner.ssl_key_type(kind)
++    }
++
++    /// Same as [`Easy2::key_password`](struct.Easy2.html#method.key_password)
++    pub fn key_password(&mut self, password: &str) -> Result<(), Error> {
++        self.inner.key_password(password)
++    }
++
++    /// Same as [`Easy2::ssl_engine`](struct.Easy2.html#method.ssl_engine)
++    pub fn ssl_engine(&mut self, engine: &str) -> Result<(), Error> {
++        self.inner.ssl_engine(engine)
++    }
++
++    /// Same as [`Easy2::ssl_engine_default`](struct.Easy2.html#method.ssl_engine_default)
++    pub fn ssl_engine_default(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.ssl_engine_default(enable)
++    }
++
++    /// Same as [`Easy2::http_version`](struct.Easy2.html#method.http_version)
++    pub fn http_version(&mut self, version: HttpVersion) -> Result<(), Error> {
++        self.inner.http_version(version)
++    }
++
++    /// Same as [`Easy2::ssl_version`](struct.Easy2.html#method.ssl_version)
++    pub fn ssl_version(&mut self, version: SslVersion) -> Result<(), Error> {
++        self.inner.ssl_version(version)
++    }
++
++    /// Same as [`Easy2::ssl_verify_host`](struct.Easy2.html#method.ssl_verify_host)
++    pub fn ssl_verify_host(&mut self, verify: bool) -> Result<(), Error> {
++        self.inner.ssl_verify_host(verify)
++    }
++
++    /// Same as [`Easy2::ssl_verify_peer`](struct.Easy2.html#method.ssl_verify_peer)
++    pub fn ssl_verify_peer(&mut self, verify: bool) -> Result<(), Error> {
++        self.inner.ssl_verify_peer(verify)
++    }
++
++    /// Same as [`Easy2::cainfo`](struct.Easy2.html#method.cainfo)
++    pub fn cainfo<P: AsRef<Path>>(&mut self, path: P) -> Result<(), Error> {
++        self.inner.cainfo(path)
++    }
++
++    /// Same as [`Easy2::issuer_cert`](struct.Easy2.html#method.issuer_cert)
++    pub fn issuer_cert<P: AsRef<Path>>(&mut self, path: P) -> Result<(), Error> {
++        self.inner.issuer_cert(path)
++    }
++
++    /// Same as [`Easy2::capath`](struct.Easy2.html#method.capath)
++    pub fn capath<P: AsRef<Path>>(&mut self, path: P) -> Result<(), Error> {
++        self.inner.capath(path)
++    }
++
++    /// Same as [`Easy2::crlfile`](struct.Easy2.html#method.crlfile)
++    pub fn crlfile<P: AsRef<Path>>(&mut self, path: P) -> Result<(), Error> {
++        self.inner.crlfile(path)
++    }
++
++    /// Same as [`Easy2::certinfo`](struct.Easy2.html#method.certinfo)
++    pub fn certinfo(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.certinfo(enable)
++    }
++
++    /// Same as [`Easy2::random_file`](struct.Easy2.html#method.random_file)
++    pub fn random_file<P: AsRef<Path>>(&mut self, p: P) -> Result<(), Error> {
++        self.inner.random_file(p)
++    }
++
++    /// Same as [`Easy2::egd_socket`](struct.Easy2.html#method.egd_socket)
++    pub fn egd_socket<P: AsRef<Path>>(&mut self, p: P) -> Result<(), Error> {
++        self.inner.egd_socket(p)
++    }
++
++    /// Same as [`Easy2::ssl_cipher_list`](struct.Easy2.html#method.ssl_cipher_list)
++    pub fn ssl_cipher_list(&mut self, ciphers: &str) -> Result<(), Error> {
++        self.inner.ssl_cipher_list(ciphers)
++    }
++
++    /// Same as [`Easy2::ssl_sessionid_cache`](struct.Easy2.html#method.ssl_sessionid_cache)
++    pub fn ssl_sessionid_cache(&mut self, enable: bool) -> Result<(), Error> {
++        self.inner.ssl_sessionid_cache(enable)
++    }
++
++    /// Same as [`Easy2::ssl_options`](struct.Easy2.html#method.ssl_options)
++    pub fn ssl_options(&mut self, bits: &SslOpt) -> Result<(), Error> {
++        self.inner.ssl_options(bits)
++    }
++
++    // =========================================================================
++    // getters
++
++    /// Same as [`Easy2::effective_url`](struct.Easy2.html#method.effective_url)
++    pub fn effective_url(&mut self) -> Result<Option<&str>, Error> {
++        self.inner.effective_url()
++    }
++
++    /// Same as [`Easy2::effective_url_bytes`](struct.Easy2.html#method.effective_url_bytes)
++    pub fn effective_url_bytes(&mut self) -> Result<Option<&[u8]>, Error> {
++        self.inner.effective_url_bytes()
++    }
++
++    /// Same as [`Easy2::response_code`](struct.Easy2.html#method.response_code)
++    pub fn response_code(&mut self) -> Result<u32, Error> {
++        self.inner.response_code()
++    }
++
++    /// Same as [`Easy2::http_connectcode`](struct.Easy2.html#method.http_connectcode)
++    pub fn http_connectcode(&mut self) -> Result<u32, Error> {
++        self.inner.http_connectcode()
++    }
++
++    /// Same as [`Easy2::filetime`](struct.Easy2.html#method.filetime)
++    pub fn filetime(&mut self) -> Result<Option<i64>, Error> {
++        self.inner.filetime()
++    }
++
++    /// Same as [`Easy2::total_time`](struct.Easy2.html#method.total_time)
++    pub fn total_time(&mut self) -> Result<Duration, Error> {
++        self.inner.total_time()
++    }
++
++    /// Same as [`Easy2::namelookup_time`](struct.Easy2.html#method.namelookup_time)
++    pub fn namelookup_time(&mut self) -> Result<Duration, Error> {
++        self.inner.namelookup_time()
++    }
++
++    /// Same as [`Easy2::connect_time`](struct.Easy2.html#method.connect_time)
++    pub fn connect_time(&mut self) -> Result<Duration, Error> {
++        self.inner.connect_time()
++    }
++
++    /// Same as [`Easy2::appconnect_time`](struct.Easy2.html#method.appconnect_time)
++    pub fn appconnect_time(&mut self) -> Result<Duration, Error> {
++        self.inner.appconnect_time()
++    }
++
++    /// Same as [`Easy2::pretransfer_time`](struct.Easy2.html#method.pretransfer_time)
++    pub fn pretransfer_time(&mut self) -> Result<Duration, Error> {
++        self.inner.pretransfer_time()
++    }
++
++    /// Same as [`Easy2::starttransfer_time`](struct.Easy2.html#method.starttransfer_time)
++    pub fn starttransfer_time(&mut self) -> Result<Duration, Error> {
++        self.inner.starttransfer_time()
++    }
++
++    /// Same as [`Easy2::redirect_time`](struct.Easy2.html#method.redirect_time)
++    pub fn redirect_time(&mut self) -> Result<Duration, Error> {
++        self.inner.redirect_time()
++    }
++
++    /// Same as [`Easy2::redirect_count`](struct.Easy2.html#method.redirect_count)
++    pub fn redirect_count(&mut self) -> Result<u32, Error> {
++        self.inner.redirect_count()
++    }
++
++    /// Same as [`Easy2::redirect_url`](struct.Easy2.html#method.redirect_url)
++    pub fn redirect_url(&mut self) -> Result<Option<&str>, Error> {
++        self.inner.redirect_url()
++    }
++
++    /// Same as [`Easy2::redirect_url_bytes`](struct.Easy2.html#method.redirect_url_bytes)
++    pub fn redirect_url_bytes(&mut self) -> Result<Option<&[u8]>, Error> {
++        self.inner.redirect_url_bytes()
++    }
++
++    /// Same as [`Easy2::header_size`](struct.Easy2.html#method.header_size)
++    pub fn header_size(&mut self) -> Result<u64, Error> {
++        self.inner.header_size()
++    }
++
++    /// Same as [`Easy2::request_size`](struct.Easy2.html#method.request_size)
++    pub fn request_size(&mut self) -> Result<u64, Error> {
++        self.inner.request_size()
++    }
++
++    /// Same as [`Easy2::content_type`](struct.Easy2.html#method.content_type)
++    pub fn content_type(&mut self) -> Result<Option<&str>, Error> {
++        self.inner.content_type()
++    }
++
++    /// Same as [`Easy2::content_type_bytes`](struct.Easy2.html#method.content_type_bytes)
++    pub fn content_type_bytes(&mut self) -> Result<Option<&[u8]>, Error> {
++        self.inner.content_type_bytes()
++    }
++
++    /// Same as [`Easy2::os_errno`](struct.Easy2.html#method.os_errno)
++    pub fn os_errno(&mut self) -> Result<i32, Error> {
++        self.inner.os_errno()
++    }
++
++    /// Same as [`Easy2::primary_ip`](struct.Easy2.html#method.primary_ip)
++    pub fn primary_ip(&mut self) -> Result<Option<&str>, Error> {
++        self.inner.primary_ip()
++    }
++
++    /// Same as [`Easy2::primary_port`](struct.Easy2.html#method.primary_port)
++    pub fn primary_port(&mut self) -> Result<u16, Error> {
++        self.inner.primary_port()
++    }
++
++    /// Same as [`Easy2::local_ip`](struct.Easy2.html#method.local_ip)
++    pub fn local_ip(&mut self) -> Result<Option<&str>, Error> {
++        self.inner.local_ip()
++    }
++
++    /// Same as [`Easy2::local_port`](struct.Easy2.html#method.local_port)
++    pub fn local_port(&mut self) -> Result<u16, Error> {
++        self.inner.local_port()
++    }
++
++    /// Same as [`Easy2::cookies`](struct.Easy2.html#method.cookies)
++    pub fn cookies(&mut self) -> Result<List, Error> {
++        self.inner.cookies()
++    }
++
++    // =========================================================================
++    // Other methods
++
++    /// Same as [`Easy2::perform`](struct.Easy2.html#method.perform)
++    pub fn perform(&self) -> Result<(), Error> {
++        assert!(self.inner.get_ref().borrowed.get().is_null());
++        self.do_perform()
++    }
++
++    fn do_perform(&self) -> Result<(), Error> {
++        // We don't allow recursive invocations of `perform` because we're
++        // invoking `FnMut`closures behind a `&self` pointer. This flag acts as
++        // our own `RefCell` borrow flag sorta.
++        if self.inner.get_ref().running.get() {
++            return Err(Error::new(curl_sys::CURLE_FAILED_INIT))
++        }
++
++        self.inner.get_ref().running.set(true);
++        struct Reset<'a>(&'a Cell<bool>);
++        impl<'a> Drop for Reset<'a> {
++            fn drop(&mut self) {
++                self.0.set(false);
++            }
++        }
++        let _reset = Reset(&self.inner.get_ref().running);
++
++        self.inner.perform()
++    }
++
++    /// Creates a new scoped transfer which can be used to set callbacks and
++    /// data which only live for the scope of the returned object.
++    ///
++    /// An `Easy` handle is often reused between different requests to cache
++    /// connections to servers, but often the lifetime of the data as part of
++    /// each transfer is unique. This function serves as an ability to share an
++    /// `Easy` across many transfers while ergonomically using possibly
++    /// stack-local data as part of each transfer.
++    ///
++    /// Configuration can be set on the `Easy` and then a `Transfer` can be
++    /// created to set scoped configuration (like callbacks). Finally, the
++    /// `perform` method on the `Transfer` function can be used.
++    ///
++    /// When the `Transfer` option is dropped then all configuration set on the
++    /// transfer itself will be reset.
++    pub fn transfer<'data, 'easy>(&'easy mut self) -> Transfer<'easy, 'data> {
++        assert!(!self.inner.get_ref().running.get());
++        Transfer {
++            data: Box::new(Callbacks::default()),
++            easy: self,
++        }
++    }
++
++    /// Same as [`Easy2::unpause_read`](struct.Easy2.html#method.unpause_read)
++    pub fn unpause_read(&self) -> Result<(), Error> {
++        self.inner.unpause_read()
++    }
++
++    /// Same as [`Easy2::unpause_write`](struct.Easy2.html#method.unpause_write)
++    pub fn unpause_write(&self) -> Result<(), Error> {
++        self.inner.unpause_write()
++    }
++
++    /// Same as [`Easy2::url_encode`](struct.Easy2.html#method.url_encode)
++    pub fn url_encode(&mut self, s: &[u8]) -> String {
++        self.inner.url_encode(s)
++    }
++
++    /// Same as [`Easy2::url_decode`](struct.Easy2.html#method.url_decode)
++    pub fn url_decode(&mut self, s: &str) -> Vec<u8> {
++        self.inner.url_decode(s)
++    }
++
++    /// Same as [`Easy2::reset`](struct.Easy2.html#method.reset)
++    pub fn reset(&mut self) {
++        self.inner.reset()
++    }
++
++    /// Same as [`Easy2::recv`](struct.Easy2.html#method.recv)
++    pub fn recv(&mut self, data: &mut [u8]) -> Result<usize, Error> {
++        self.inner.recv(data)
++    }
++
++    /// Same as [`Easy2::send`](struct.Easy2.html#method.send)
++    pub fn send(&mut self, data: &[u8]) -> Result<usize, Error> {
++        self.inner.send(data)
++    }
++
++    /// Same as [`Easy2::raw`](struct.Easy2.html#method.raw)
++    pub fn raw(&self) -> *mut curl_sys::CURL {
++        self.inner.raw()
++    }
++}
++
++impl EasyData {
++    /// An unsafe function to get the appropriate callback field.
++    ///
++    /// We can have callbacks configured from one of two different sources.
++    /// We could either have a callback from the `borrowed` field, callbacks on
++    /// an ephemeral `Transfer`, or the `owned` field which are `'static`
++    /// callbacks that live for the lifetime of this `EasyData`.
++    ///
++    /// The first set of callbacks are unsafe to access because they're actually
++    /// owned elsewhere and we're just aliasing. Additionally they don't
++    /// technically live long enough for us to access them, so they're hidden
++    /// behind unsafe pointers and casts.
++    ///
++    /// This function returns `&'a mut T` but that's actually somewhat of a lie.
++    /// The value should **not be stored to** nor should it be used for the full
++    /// lifetime of `'a`, but rather immediately in the local scope.
++    ///
++    /// Basically this is just intended to acquire a callback, invoke it, and
++    /// then stop. Nothing else. Super unsafe.
++    unsafe fn callback<'a, T, F>(&'a mut self, f: F) -> Option<&'a mut T>
++        where F: for<'b> Fn(&'b mut Callbacks<'static>) -> &'b mut Option<T>,
++    {
++        let ptr = self.borrowed.get();
++        if !ptr.is_null() {
++            let val = f(&mut *ptr);
++            if val.is_some() {
++                return val.as_mut()
++            }
++        }
++        f(&mut self.owned).as_mut()
++    }
++}
++
++impl Handler for EasyData {
++    fn write(&mut self, data: &[u8]) -> Result<usize, WriteError> {
++        unsafe {
++            match self.callback(|s| &mut s.write) {
++                Some(write) => write(data),
++                None => Ok(data.len()),
++            }
++        }
++    }
++
++    fn read(&mut self, data: &mut [u8]) -> Result<usize, ReadError> {
++        unsafe {
++            match self.callback(|s| &mut s.read) {
++                Some(read) => read(data),
++                None => Ok(0),
++            }
++        }
++    }
++
++    fn seek(&mut self, whence: SeekFrom) -> SeekResult {
++        unsafe {
++            match self.callback(|s| &mut s.seek) {
++                Some(seek) => seek(whence),
++                None => SeekResult::CantSeek,
++            }
++        }
++    }
++
++    fn debug(&mut self, kind: InfoType, data: &[u8]) {
++        unsafe {
++            match self.callback(|s| &mut s.debug) {
++                Some(debug) => debug(kind, data),
++                None => handler::debug(kind, data),
++            }
++        }
++    }
++
++    fn header(&mut self, data: &[u8]) -> bool {
++        unsafe {
++            match self.callback(|s| &mut s.header) {
++                Some(header) => header(data),
++                None => true,
++            }
++        }
++    }
++
++    fn progress(&mut self,
++                dltotal: f64,
++                dlnow: f64,
++                ultotal: f64,
++                ulnow: f64) -> bool {
++        unsafe {
++            match self.callback(|s| &mut s.progress) {
++                Some(progress) => progress(dltotal, dlnow, ultotal, ulnow),
++                None => true,
++            }
++        }
++    }
++
++    fn ssl_ctx(&mut self, cx: *mut c_void) -> Result<(), Error> {
++        unsafe {
++            match self.callback(|s| &mut s.ssl_ctx) {
++                Some(ssl_ctx) => ssl_ctx(cx),
++                None => Ok(()),
++            }
++        }
++    }
++}
++
++impl fmt::Debug for EasyData {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        "callbacks ...".fmt(f)
++    }
++}
++
++impl<'easy, 'data> Transfer<'easy, 'data> {
++    /// Same as `Easy::write_function`, just takes a non `'static` lifetime
++    /// corresponding to the lifetime of this transfer.
++    pub fn write_function<F>(&mut self, f: F) -> Result<(), Error>
++        where F: FnMut(&[u8]) -> Result<usize, WriteError> + 'data
++    {
++        self.data.write = Some(Box::new(f));
++        Ok(())
++    }
++
++    /// Same as `Easy::read_function`, just takes a non `'static` lifetime
++    /// corresponding to the lifetime of this transfer.
++    pub fn read_function<F>(&mut self, f: F) -> Result<(), Error>
++        where F: FnMut(&mut [u8]) -> Result<usize, ReadError> + 'data
++    {
++        self.data.read = Some(Box::new(f));
++        Ok(())
++    }
++
++    /// Same as `Easy::seek_function`, just takes a non `'static` lifetime
++    /// corresponding to the lifetime of this transfer.
++    pub fn seek_function<F>(&mut self, f: F) -> Result<(), Error>
++        where F: FnMut(SeekFrom) -> SeekResult + 'data
++    {
++        self.data.seek = Some(Box::new(f));
++        Ok(())
++    }
++
++    /// Same as `Easy::progress_function`, just takes a non `'static` lifetime
++    /// corresponding to the lifetime of this transfer.
++    pub fn progress_function<F>(&mut self, f: F) -> Result<(), Error>
++        where F: FnMut(f64, f64, f64, f64) -> bool + 'data
++    {
++        self.data.progress = Some(Box::new(f));
++        Ok(())
++    }
++
++    /// Same as `Easy::ssl_ctx_function`, just takes a non `'static`
++    /// lifetime corresponding to the lifetime of this transfer.
++    pub fn ssl_ctx_function<F>(&mut self, f: F) -> Result<(), Error>
++        where F: FnMut(*mut c_void) -> Result<(), Error> + Send + 'data
++    {
++        self.data.ssl_ctx = Some(Box::new(f));
++        Ok(())
++    }
++
++    /// Same as `Easy::debug_function`, just takes a non `'static` lifetime
++    /// corresponding to the lifetime of this transfer.
++    pub fn debug_function<F>(&mut self, f: F) -> Result<(), Error>
++        where F: FnMut(InfoType, &[u8]) + 'data
++    {
++        self.data.debug = Some(Box::new(f));
++        Ok(())
++    }
++
++    /// Same as `Easy::header_function`, just takes a non `'static` lifetime
++    /// corresponding to the lifetime of this transfer.
++    pub fn header_function<F>(&mut self, f: F) -> Result<(), Error>
++        where F: FnMut(&[u8]) -> bool + 'data
++    {
++        self.data.header = Some(Box::new(f));
++        Ok(())
++    }
++
++    /// Same as `Easy::transfer`.
++    pub fn perform(&self) -> Result<(), Error> {
++        let inner = self.easy.inner.get_ref();
++
++        // Note that we're casting a `&self` pointer to a `*mut`, and then
++        // during the invocation of this call we're going to invoke `FnMut`
++        // closures that we ourselves own.
++        //
++        // This should be ok, however, because `do_perform` checks for recursive
++        // invocations of `perform` and disallows them. Our type also isn't
++        // `Sync`.
++        inner.borrowed.set(&*self.data as *const _ as *mut _);
++
++        // Make sure to reset everything back to the way it was before when
++        // we're done.
++        struct Reset<'a>(&'a Cell<*mut Callbacks<'static>>);
++        impl<'a> Drop for Reset<'a> {
++            fn drop(&mut self) {
++                self.0.set(ptr::null_mut());
++            }
++        }
++        let _reset = Reset(&inner.borrowed);
++
++        self.easy.do_perform()
++    }
++
++    /// Same as `Easy::unpause_read`.
++    pub fn unpause_read(&self) -> Result<(), Error> {
++        self.easy.unpause_read()
++    }
++
++    /// Same as `Easy::unpause_write`
++    pub fn unpause_write(&self) -> Result<(), Error> {
++        self.easy.unpause_write()
++    }
++}
++
++impl<'easy, 'data> fmt::Debug for Transfer<'easy, 'data> {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.debug_struct("Transfer")
++         .field("easy", &self.easy)
++         .finish()
++    }
++}
++
++impl<'easy, 'data> Drop for Transfer<'easy, 'data> {
++    fn drop(&mut self) {
++        // Extra double check to make sure we don't leak a pointer to ourselves.
++        assert!(self.easy.inner.get_ref().borrowed.get().is_null());
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2556fc82dfb75eda5803dc7d65ea75c0734b709e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3108 @@@
++use std::cell::RefCell;
++use std::ffi::{CStr, CString};
++use std::fmt;
++use std::io::{self, SeekFrom, Write};
++use std::path::Path;
++use std::slice;
++use std::str;
++use std::time::Duration;
++
++use curl_sys;
++use libc::{self, c_void, c_char, c_long, size_t, c_int, c_double, c_ulong};
++use socket2::Socket;
++
++use Error;
++use easy::form;
++use easy::list;
++use easy::{List, Form};
++use panic;
++
++/// A trait for the various callbacks used by libcurl to invoke user code.
++///
++/// This trait represents all operations that libcurl can possibly invoke a
++/// client for code during an HTTP transaction. Each callback has a default
++/// "noop" implementation, the same as in libcurl. Types implementing this trait
++/// may simply override the relevant functions to learn about the callbacks
++/// they're interested in.
++///
++/// # Examples
++///
++/// ```
++/// use curl::easy::{Easy2, Handler, WriteError};
++///
++/// struct Collector(Vec<u8>);
++///
++/// impl Handler for Collector {
++///     fn write(&mut self, data: &[u8]) -> Result<usize, WriteError> {
++///         self.0.extend_from_slice(data);
++///         Ok(data.len())
++///     }
++/// }
++///
++/// let mut easy = Easy2::new(Collector(Vec::new()));
++/// easy.get(true).unwrap();
++/// easy.url("https://www.rust-lang.org/").unwrap();
++/// easy.perform().unwrap();
++///
++/// assert_eq!(easy.response_code().unwrap(), 200);
++/// let contents = easy.get_ref();
++/// println!("{}", String::from_utf8_lossy(&contents.0));
++/// ```
++pub trait Handler {
++    /// Callback invoked whenever curl has downloaded data for the application.
++    ///
++    /// This callback function gets called by libcurl as soon as there is data
++    /// received that needs to be saved.
++    ///
++    /// The callback function will be passed as much data as possible in all
++    /// invokes, but you must not make any assumptions. It may be one byte, it
++    /// may be thousands. If `show_header` is enabled, which makes header data
++    /// get passed to the write callback, you can get up to
++    /// `CURL_MAX_HTTP_HEADER` bytes of header data passed into it.  This
++    /// usually means 100K.
++    ///
++    /// This function may be called with zero bytes data if the transferred file
++    /// is empty.
++    ///
++    /// The callback should return the number of bytes actually taken care of.
++    /// If that amount differs from the amount passed to your callback function,
++    /// it'll signal an error condition to the library. This will cause the
++    /// transfer to get aborted and the libcurl function used will return
++    /// an error with `is_write_error`.
++    ///
++    /// If your callback function returns `Err(WriteError::Pause)` it will cause
++    /// this transfer to become paused. See `unpause_write` for further details.
++    ///
++    /// By default data is sent into the void, and this corresponds to the
++    /// `CURLOPT_WRITEFUNCTION` and `CURLOPT_WRITEDATA` options.
++    fn write(&mut self, data: &[u8]) -> Result<usize, WriteError> {
++        Ok(data.len())
++    }
++
++    /// Read callback for data uploads.
++    ///
++    /// This callback function gets called by libcurl as soon as it needs to
++    /// read data in order to send it to the peer - like if you ask it to upload
++    /// or post data to the server.
++    ///
++    /// Your function must then return the actual number of bytes that it stored
++    /// in that memory area. Returning 0 will signal end-of-file to the library
++    /// and cause it to stop the current transfer.
++    ///
++    /// If you stop the current transfer by returning 0 "pre-maturely" (i.e
++    /// before the server expected it, like when you've said you will upload N
++    /// bytes and you upload less than N bytes), you may experience that the
++    /// server "hangs" waiting for the rest of the data that won't come.
++    ///
++    /// The read callback may return `Err(ReadError::Abort)` to stop the
++    /// current operation immediately, resulting in a `is_aborted_by_callback`
++    /// error code from the transfer.
++    ///
++    /// The callback can return `Err(ReadError::Pause)` to cause reading from
++    /// this connection to pause. See `unpause_read` for further details.
++    ///
++    /// By default data not input, and this corresponds to the
++    /// `CURLOPT_READFUNCTION` and `CURLOPT_READDATA` options.
++    ///
++    /// Note that the lifetime bound on this function is `'static`, but that
++    /// is often too restrictive. To use stack data consider calling the
++    /// `transfer` method and then using `read_function` to configure a
++    /// callback that can reference stack-local data.
++    fn read(&mut self, data: &mut [u8]) -> Result<usize, ReadError> {
++        drop(data);
++        Ok(0)
++    }
++
++    /// User callback for seeking in input stream.
++    ///
++    /// This function gets called by libcurl to seek to a certain position in
++    /// the input stream and can be used to fast forward a file in a resumed
++    /// upload (instead of reading all uploaded bytes with the normal read
++    /// function/callback). It is also called to rewind a stream when data has
++    /// already been sent to the server and needs to be sent again. This may
++    /// happen when doing a HTTP PUT or POST with a multi-pass authentication
++    /// method, or when an existing HTTP connection is reused too late and the
++    /// server closes the connection.
++    ///
++    /// The callback function must return `SeekResult::Ok` on success,
++    /// `SeekResult::Fail` to cause the upload operation to fail or
++    /// `SeekResult::CantSeek` to indicate that while the seek failed, libcurl
++    /// is free to work around the problem if possible. The latter can sometimes
++    /// be done by instead reading from the input or similar.
++    ///
++    /// By default data this option is not set, and this corresponds to the
++    /// `CURLOPT_SEEKFUNCTION` and `CURLOPT_SEEKDATA` options.
++    fn seek(&mut self, whence: SeekFrom) -> SeekResult {
++        drop(whence);
++        SeekResult::CantSeek
++    }
++
++    /// Specify a debug callback
++    ///
++    /// `debug_function` replaces the standard debug function used when
++    /// `verbose` is in effect. This callback receives debug information,
++    /// as specified in the type argument.
++    ///
++    /// By default this option is not set and corresponds to the
++    /// `CURLOPT_DEBUGFUNCTION` and `CURLOPT_DEBUGDATA` options.
++    fn debug(&mut self, kind: InfoType, data: &[u8]) {
++        debug(kind, data)
++    }
++
++    /// Callback that receives header data
++    ///
++    /// This function gets called by libcurl as soon as it has received header
++    /// data. The header callback will be called once for each header and only
++    /// complete header lines are passed on to the callback. Parsing headers is
++    /// very easy using this. If this callback returns `false` it'll signal an
++    /// error to the library. This will cause the transfer to get aborted and
++    /// the libcurl function in progress will return `is_write_error`.
++    ///
++    /// A complete HTTP header that is passed to this function can be up to
++    /// CURL_MAX_HTTP_HEADER (100K) bytes.
++    ///
++    /// It's important to note that the callback will be invoked for the headers
++    /// of all responses received after initiating a request and not just the
++    /// final response. This includes all responses which occur during
++    /// authentication negotiation. If you need to operate on only the headers
++    /// from the final response, you will need to collect headers in the
++    /// callback yourself and use HTTP status lines, for example, to delimit
++    /// response boundaries.
++    ///
++    /// When a server sends a chunked encoded transfer, it may contain a
++    /// trailer. That trailer is identical to a HTTP header and if such a
++    /// trailer is received it is passed to the application using this callback
++    /// as well. There are several ways to detect it being a trailer and not an
++    /// ordinary header: 1) it comes after the response-body. 2) it comes after
++    /// the final header line (CR LF) 3) a Trailer: header among the regular
++    /// response-headers mention what header(s) to expect in the trailer.
++    ///
++    /// For non-HTTP protocols like FTP, POP3, IMAP and SMTP this function will
++    /// get called with the server responses to the commands that libcurl sends.
++    ///
++    /// By default this option is not set and corresponds to the
++    /// `CURLOPT_HEADERFUNCTION` and `CURLOPT_HEADERDATA` options.
++    fn header(&mut self, data: &[u8]) -> bool {
++        drop(data);
++        true
++    }
++
++    /// Callback to progress meter function
++    ///
++    /// This function gets called by libcurl instead of its internal equivalent
++    /// with a frequent interval. While data is being transferred it will be
++    /// called very frequently, and during slow periods like when nothing is
++    /// being transferred it can slow down to about one call per second.
++    ///
++    /// The callback gets told how much data libcurl will transfer and has
++    /// transferred, in number of bytes. The first argument is the total number
++    /// of bytes libcurl expects to download in this transfer. The second
++    /// argument is the number of bytes downloaded so far. The third argument is
++    /// the total number of bytes libcurl expects to upload in this transfer.
++    /// The fourth argument is the number of bytes uploaded so far.
++    ///
++    /// Unknown/unused argument values passed to the callback will be set to
++    /// zero (like if you only download data, the upload size will remain 0).
++    /// Many times the callback will be called one or more times first, before
++    /// it knows the data sizes so a program must be made to handle that.
++    ///
++    /// Returning `false` from this callback will cause libcurl to abort the
++    /// transfer and return `is_aborted_by_callback`.
++    ///
++    /// If you transfer data with the multi interface, this function will not be
++    /// called during periods of idleness unless you call the appropriate
++    /// libcurl function that performs transfers.
++    ///
++    /// `progress` must be set to `true` to make this function actually get
++    /// called.
++    ///
++    /// By default this function calls an internal method and corresponds to
++    /// `CURLOPT_PROGRESSFUNCTION` and `CURLOPT_PROGRESSDATA`.
++    fn progress(&mut self,
++                dltotal: f64,
++                dlnow: f64,
++                ultotal: f64,
++                ulnow: f64) -> bool {
++        drop((dltotal, dlnow, ultotal, ulnow));
++        true
++    }
++
++    /// Callback to SSL context
++    ///
++    /// This callback function gets called by libcurl just before the
++    /// initialization of an SSL connection after having processed all
++    /// other SSL related options to give a last chance to an
++    /// application to modify the behaviour of the SSL
++    /// initialization. The `ssl_ctx` parameter is actually a pointer
++    /// to the SSL library's SSL_CTX. If an error is returned from the
++    /// callback no attempt to establish a connection is made and the
++    /// perform operation will return the callback's error code.
++    ///
++    /// This function will get called on all new connections made to a
++    /// server, during the SSL negotiation. The SSL_CTX pointer will
++    /// be a new one every time.
++    ///
++    /// To use this properly, a non-trivial amount of knowledge of
++    /// your SSL library is necessary. For example, you can use this
++    /// function to call library-specific callbacks to add additional
++    /// validation code for certificates, and even to change the
++    /// actual URI of a HTTPS request.
++    ///
++    /// By default this function calls an internal method and
++    /// corresponds to `CURLOPT_SSL_CTX_FUNCTION` and
++    /// `CURLOPT_SSL_CTX_DATA`.
++    ///
++    /// Note that this callback is not guaranteed to be called, not all versions
++    /// of libcurl support calling this callback.
++    fn ssl_ctx(&mut self, cx: *mut c_void) -> Result<(), Error> {
++        drop(cx);
++        Ok(())
++    }
++
++    /// Callback to open sockets for libcurl.
++    ///
++    /// This callback function gets called by libcurl instead of the socket(2)
++    /// call. The callback function should return the newly created socket
++    /// or `None` in case no connection could be established or another
++    /// error was detected. Any additional `setsockopt(2)` calls can of course
++    /// be done on the socket at the user's discretion. A `None` return
++    /// value from the callback function will signal an unrecoverable error to
++    /// libcurl and it will return `is_couldnt_connect` from the function that
++    /// triggered this callback.
++    ///
++    /// By default this function opens a standard socket and
++    /// corresponds to `CURLOPT_OPENSOCKETFUNCTION `.
++    fn open_socket(&mut self,
++                   family: c_int,
++                   socktype: c_int,
++                   protocol: c_int) -> Option<curl_sys::curl_socket_t> {
++        // Note that we override this to calling a function in `socket2` to
++        // ensure that we open all sockets with CLOEXEC. Otherwise if we rely on
++        // libcurl to open sockets it won't use CLOEXEC.
++        return Socket::new(family.into(), socktype.into(), Some(protocol.into()))
++                    .ok()
++                    .map(cvt);
++
++        #[cfg(unix)]
++        fn cvt(socket: Socket) -> curl_sys::curl_socket_t {
++            use std::os::unix::prelude::*;
++            socket.into_raw_fd()
++        }
++
++        #[cfg(windows)]
++        fn cvt(socket: Socket) -> curl_sys::curl_socket_t {
++            use std::os::windows::prelude::*;
++            socket.into_raw_socket()
++        }
++    }
++}
++
++pub fn debug(kind: InfoType, data: &[u8]) {
++    let out = io::stderr();
++    let prefix = match kind {
++        InfoType::Text => "*",
++        InfoType::HeaderIn => "<",
++        InfoType::HeaderOut => ">",
++        InfoType::DataIn |
++        InfoType::SslDataIn => "{",
++        InfoType::DataOut |
++        InfoType::SslDataOut => "}",
++        InfoType::__Nonexhaustive => " ",
++    };
++    let mut out = out.lock();
++    drop(write!(out, "{} ", prefix));
++    drop(out.write_all(data));
++}
++
++/// Raw bindings to a libcurl "easy session".
++///
++/// This type corresponds to the `CURL` type in libcurl, and is probably what
++/// you want for just sending off a simple HTTP request and fetching a response.
++/// Each easy handle can be thought of as a large builder before calling the
++/// final `perform` function.
++///
++/// There are many many configuration options for each `Easy2` handle, and they
++/// should all have their own documentation indicating what it affects and how
++/// it interacts with other options. Some implementations of libcurl can use
++/// this handle to interact with many different protocols, although by default
++/// this crate only guarantees the HTTP/HTTPS protocols working.
++///
++/// Note that almost all methods on this structure which configure various
++/// properties return a `Result`. This is largely used to detect whether the
++/// underlying implementation of libcurl actually implements the option being
++/// requested. If you're linked to a version of libcurl which doesn't support
++/// the option, then an error will be returned. Some options also perform some
++/// validation when they're set, and the error is returned through this vector.
++///
++/// Note that historically this library contained an `Easy` handle so this one's
++/// called `Easy2`. The major difference between the `Easy` type is that an
++/// `Easy2` structure uses a trait instead of closures for all of the callbacks
++/// that curl can invoke. The `Easy` type is actually built on top of this
++/// `Easy` type, and this `Easy2` type can be more flexible in some situations
++/// due to the generic parameter.
++///
++/// There's not necessarily a right answer for which type is correct to use, but
++/// as a general rule of thumb `Easy` is typically a reasonable choice for
++/// synchronous I/O and `Easy2` is a good choice for asynchronous I/O.
++///
++/// # Examples
++///
++/// ```
++/// use curl::easy::{Easy2, Handler, WriteError};
++///
++/// struct Collector(Vec<u8>);
++///
++/// impl Handler for Collector {
++///     fn write(&mut self, data: &[u8]) -> Result<usize, WriteError> {
++///         self.0.extend_from_slice(data);
++///         Ok(data.len())
++///     }
++/// }
++///
++/// let mut easy = Easy2::new(Collector(Vec::new()));
++/// easy.get(true).unwrap();
++/// easy.url("https://www.rust-lang.org/").unwrap();
++/// easy.perform().unwrap();
++///
++/// assert_eq!(easy.response_code().unwrap(), 200);
++/// let contents = easy.get_ref();
++/// println!("{}", String::from_utf8_lossy(&contents.0));
++/// ```
++pub struct Easy2<H> {
++    inner: Box<Inner<H>>,
++}
++
++struct Inner<H> {
++    handle: *mut curl_sys::CURL,
++    header_list: Option<List>,
++    form: Option<Form>,
++    error_buf: RefCell<Vec<u8>>,
++    handler: H,
++}
++
++unsafe impl<H: Send> Send for Inner<H> {}
++
++/// Possible proxy types that libcurl currently understands.
++#[allow(missing_docs)]
++#[derive(Debug)]
++pub enum ProxyType {
++    Http = curl_sys::CURLPROXY_HTTP as isize,
++    Http1 = curl_sys::CURLPROXY_HTTP_1_0 as isize,
++    Socks4 = curl_sys::CURLPROXY_SOCKS4 as isize,
++    Socks5 = curl_sys::CURLPROXY_SOCKS5 as isize,
++    Socks4a = curl_sys::CURLPROXY_SOCKS4A as isize,
++    Socks5Hostname = curl_sys::CURLPROXY_SOCKS5_HOSTNAME as isize,
++
++    /// Hidden variant to indicate that this enum should not be matched on, it
++    /// may grow over time.
++    #[doc(hidden)]
++    __Nonexhaustive,
++}
++
++/// Possible conditions for the `time_condition` method.
++#[allow(missing_docs)]
++#[derive(Debug)]
++pub enum TimeCondition {
++    None = curl_sys::CURL_TIMECOND_NONE as isize,
++    IfModifiedSince = curl_sys::CURL_TIMECOND_IFMODSINCE as isize,
++    IfUnmodifiedSince = curl_sys::CURL_TIMECOND_IFUNMODSINCE as isize,
++    LastModified = curl_sys::CURL_TIMECOND_LASTMOD as isize,
++
++    /// Hidden variant to indicate that this enum should not be matched on, it
++    /// may grow over time.
++    #[doc(hidden)]
++    __Nonexhaustive,
++}
++
++/// Possible values to pass to the `ip_resolve` method.
++#[allow(missing_docs)]
++#[derive(Debug)]
++pub enum IpResolve {
++    V4 = curl_sys::CURL_IPRESOLVE_V4 as isize,
++    V6 = curl_sys::CURL_IPRESOLVE_V6 as isize,
++    Any = curl_sys::CURL_IPRESOLVE_WHATEVER as isize,
++
++    /// Hidden variant to indicate that this enum should not be matched on, it
++    /// may grow over time.
++    #[doc(hidden)]
++    __Nonexhaustive = 500,
++}
++
++/// Possible values to pass to the `http_version` method.
++#[derive(Debug)]
++pub enum HttpVersion {
++    /// We don't care what http version to use, and we'd like the library to
++    /// choose the best possible for us.
++    Any = curl_sys::CURL_HTTP_VERSION_NONE as isize,
++
++    /// Please use HTTP 1.0 in the request
++    V10 = curl_sys::CURL_HTTP_VERSION_1_0 as isize,
++
++    /// Please use HTTP 1.1 in the request
++    V11 = curl_sys::CURL_HTTP_VERSION_1_1 as isize,
++
++    /// Please use HTTP 2 in the request
++    /// (Added in CURL 7.33.0)
++    V2 = curl_sys::CURL_HTTP_VERSION_2_0 as isize,
++
++    /// Use version 2 for HTTPS, version 1.1 for HTTP
++    /// (Added in CURL 7.47.0)
++    V2TLS = curl_sys::CURL_HTTP_VERSION_2TLS as isize,
++
++    /// Please use HTTP 2 without HTTP/1.1 Upgrade
++    /// (Added in CURL 7.49.0)
++    V2PriorKnowledge = curl_sys::CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE as isize,
++
++    /// Hidden variant to indicate that this enum should not be matched on, it
++    /// may grow over time.
++    #[doc(hidden)]
++    __Nonexhaustive = 500,
++}
++
++/// Possible values to pass to the `ip_resolve` method.
++#[allow(missing_docs)]
++#[derive(Debug)]
++pub enum SslVersion {
++    Default = curl_sys::CURL_SSLVERSION_DEFAULT as isize,
++    Tlsv1 = curl_sys::CURL_SSLVERSION_TLSv1 as isize,
++    Sslv2 = curl_sys::CURL_SSLVERSION_SSLv2 as isize,
++    Sslv3 = curl_sys::CURL_SSLVERSION_SSLv3 as isize,
++    // Tlsv10 = curl_sys::CURL_SSLVERSION_TLSv1_0 as isize,
++    // Tlsv11 = curl_sys::CURL_SSLVERSION_TLSv1_1 as isize,
++    // Tlsv12 = curl_sys::CURL_SSLVERSION_TLSv1_2 as isize,
++
++    /// Hidden variant to indicate that this enum should not be matched on, it
++    /// may grow over time.
++    #[doc(hidden)]
++    __Nonexhaustive = 500,
++}
++
++/// Possible return values from the `seek_function` callback.
++#[derive(Debug)]
++pub enum SeekResult {
++    /// Indicates that the seek operation was a success
++    Ok = curl_sys::CURL_SEEKFUNC_OK as isize,
++
++    /// Indicates that the seek operation failed, and the entire request should
++    /// fail as a result.
++    Fail = curl_sys::CURL_SEEKFUNC_FAIL as isize,
++
++    /// Indicates that although the seek failed libcurl should attempt to keep
++    /// working if possible (for example "seek" through reading).
++    CantSeek = curl_sys::CURL_SEEKFUNC_CANTSEEK as isize,
++
++    /// Hidden variant to indicate that this enum should not be matched on, it
++    /// may grow over time.
++    #[doc(hidden)]
++    __Nonexhaustive = 500,
++}
++
++/// Possible data chunks that can be witnessed as part of the `debug_function`
++/// callback.
++#[derive(Debug)]
++pub enum InfoType {
++    /// The data is informational text.
++    Text,
++
++    /// The data is header (or header-like) data received from the peer.
++    HeaderIn,
++
++    /// The data is header (or header-like) data sent to the peer.
++    HeaderOut,
++
++    /// The data is protocol data received from the peer.
++    DataIn,
++
++    /// The data is protocol data sent to the peer.
++    DataOut,
++
++    /// The data is SSL/TLS (binary) data received from the peer.
++    SslDataIn,
++
++    /// The data is SSL/TLS (binary) data sent to the peer.
++    SslDataOut,
++
++    /// Hidden variant to indicate that this enum should not be matched on, it
++    /// may grow over time.
++    #[doc(hidden)]
++    __Nonexhaustive,
++}
++
++/// Possible error codes that can be returned from the `read_function` callback.
++#[derive(Debug)]
++pub enum ReadError {
++    /// Indicates that the connection should be aborted immediately
++    Abort,
++
++    /// Indicates that reading should be paused until `unpause` is called.
++    Pause,
++
++    /// Hidden variant to indicate that this enum should not be matched on, it
++    /// may grow over time.
++    #[doc(hidden)]
++    __Nonexhaustive,
++}
++
++/// Possible error codes that can be returned from the `write_function` callback.
++#[derive(Debug)]
++pub enum WriteError {
++    /// Indicates that reading should be paused until `unpause` is called.
++    Pause,
++
++    /// Hidden variant to indicate that this enum should not be matched on, it
++    /// may grow over time.
++    #[doc(hidden)]
++    __Nonexhaustive,
++}
++
++/// Options for `.netrc` parsing.
++#[derive(Debug)]
++pub enum NetRc {
++    /// Ignoring `.netrc` file and use information from url
++    ///
++    /// This option is default
++    Ignored = curl_sys::CURL_NETRC_IGNORED as isize,
++
++    /// The  use of your `~/.netrc` file is optional, and information in the URL is to be
++    /// preferred. The file will be scanned for the host and user name (to find the password only)
++    /// or for the host only, to find the first user name and password after that machine, which
++    /// ever information is not specified in the URL.
++    Optional = curl_sys::CURL_NETRC_OPTIONAL as isize,
++
++    /// This value tells the library that use of the file is required, to ignore the information in
++    /// the URL, and to search the file for the host only.
++    Required = curl_sys::CURL_NETRC_REQUIRED as isize,
++}
++
++/// Structure which stores possible authentication methods to get passed to
++/// `http_auth` and `proxy_auth`.
++#[derive(Clone)]
++pub struct Auth {
++    bits: c_long,
++}
++
++/// Structure which stores possible ssl options to pass to `ssl_options`.
++#[derive(Clone)]
++pub struct SslOpt {
++    bits: c_long,
++}
++
++impl<H: Handler> Easy2<H> {
++    /// Creates a new "easy" handle which is the core of almost all operations
++    /// in libcurl.
++    ///
++    /// To use a handle, applications typically configure a number of options
++    /// followed by a call to `perform`. Options are preserved across calls to
++    /// `perform` and need to be reset manually (or via the `reset` method) if
++    /// this is not desired.
++    pub fn new(handler: H) -> Easy2<H> {
++        ::init();
++        unsafe {
++            let handle = curl_sys::curl_easy_init();
++            assert!(!handle.is_null());
++            let mut ret = Easy2 {
++                inner: Box::new(Inner {
++                    handle: handle,
++                    header_list: None,
++                    form: None,
++                    error_buf: RefCell::new(vec![0; curl_sys::CURL_ERROR_SIZE]),
++                    handler: handler,
++                }),
++            };
++            ret.default_configure();
++            return ret
++        }
++    }
++
++    /// Re-initializes this handle to the default values.
++    ///
++    /// This puts the handle to the same state as it was in when it was just
++    /// created. This does, however, keep live connections, the session id
++    /// cache, the dns cache, and cookies.
++    pub fn reset(&mut self) {
++        unsafe {
++            curl_sys::curl_easy_reset(self.inner.handle);
++        }
++        self.default_configure();
++    }
++
++    fn default_configure(&mut self) {
++        self.setopt_ptr(curl_sys::CURLOPT_ERRORBUFFER,
++                        self.inner.error_buf.borrow().as_ptr() as *const _)
++              .expect("failed to set error buffer");
++        let _ = self.signal(false);
++        self.ssl_configure();
++
++        let ptr = &*self.inner as *const _ as *const _;
++
++        let cb: extern fn(*mut c_char, size_t, size_t, *mut c_void) -> size_t
++            = header_cb::<H>;
++        self.setopt_ptr(curl_sys::CURLOPT_HEADERFUNCTION, cb as *const _)
++            .expect("failed to set header callback");
++        self.setopt_ptr(curl_sys::CURLOPT_HEADERDATA, ptr)
++            .expect("failed to set header callback");
++
++        let cb: curl_sys::curl_write_callback = write_cb::<H>;
++        self.setopt_ptr(curl_sys::CURLOPT_WRITEFUNCTION, cb as *const _)
++            .expect("failed to set write callback");
++        self.setopt_ptr(curl_sys::CURLOPT_WRITEDATA, ptr)
++            .expect("failed to set write callback");
++
++        let cb: curl_sys::curl_read_callback = read_cb::<H>;
++        self.setopt_ptr(curl_sys::CURLOPT_READFUNCTION, cb as *const _)
++            .expect("failed to set read callback");
++        self.setopt_ptr(curl_sys::CURLOPT_READDATA, ptr)
++            .expect("failed to set read callback");
++
++        let cb: curl_sys::curl_seek_callback = seek_cb::<H>;
++        self.setopt_ptr(curl_sys::CURLOPT_SEEKFUNCTION, cb as *const _)
++            .expect("failed to set seek callback");
++        self.setopt_ptr(curl_sys::CURLOPT_SEEKDATA, ptr)
++            .expect("failed to set seek callback");
++
++        let cb: curl_sys::curl_progress_callback = progress_cb::<H>;
++        self.setopt_ptr(curl_sys::CURLOPT_PROGRESSFUNCTION, cb as *const _)
++            .expect("failed to set progress callback");
++        self.setopt_ptr(curl_sys::CURLOPT_PROGRESSDATA, ptr)
++            .expect("failed to set progress callback");
++
++        let cb: curl_sys::curl_debug_callback = debug_cb::<H>;
++        self.setopt_ptr(curl_sys::CURLOPT_DEBUGFUNCTION, cb as *const _)
++            .expect("failed to set debug callback");
++        self.setopt_ptr(curl_sys::CURLOPT_DEBUGDATA, ptr)
++            .expect("failed to set debug callback");
++
++        let cb: curl_sys::curl_ssl_ctx_callback = ssl_ctx_cb::<H>;
++        drop(self.setopt_ptr(curl_sys::CURLOPT_SSL_CTX_FUNCTION, cb as *const _));
++        drop(self.setopt_ptr(curl_sys::CURLOPT_SSL_CTX_DATA, ptr));
++
++        let cb: curl_sys::curl_opensocket_callback = opensocket_cb::<H>;
++        self.setopt_ptr(curl_sys::CURLOPT_OPENSOCKETFUNCTION , cb as *const _)
++            .expect("failed to set open socket callback");
++        self.setopt_ptr(curl_sys::CURLOPT_OPENSOCKETDATA, ptr)
++            .expect("failed to set open socket callback");
++    }
++
++    #[cfg(all(unix, not(target_os = "macos")))]
++    fn ssl_configure(&mut self) {
++        let probe = ::openssl_probe::probe();
++        if let Some(ref path) = probe.cert_file {
++            let _ = self.cainfo(path);
++        }
++        if let Some(ref path) = probe.cert_dir {
++            let _ = self.capath(path);
++        }
++    }
++
++    #[cfg(not(all(unix, not(target_os = "macos"))))]
++    fn ssl_configure(&mut self) {}
++}
++
++impl<H> Easy2<H> {
++    // =========================================================================
++    // Behavior options
++
++    /// Configures this handle to have verbose output to help debug protocol
++    /// information.
++    ///
++    /// By default output goes to stderr, but the `stderr` function on this type
++    /// can configure that. You can also use the `debug_function` method to get
++    /// all protocol data sent and received.
++    ///
++    /// By default, this option is `false`.
++    pub fn verbose(&mut self, verbose: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_VERBOSE, verbose as c_long)
++    }
++
++    /// Indicates whether header information is streamed to the output body of
++    /// this request.
++    ///
++    /// This option is only relevant for protocols which have header metadata
++    /// (like http or ftp). It's not generally possible to extract headers
++    /// from the body if using this method, that use case should be intended for
++    /// the `header_function` method.
++    ///
++    /// To set HTTP headers, use the `http_header` method.
++    ///
++    /// By default, this option is `false` and corresponds to
++    /// `CURLOPT_HEADER`.
++    pub fn show_header(&mut self, show: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_HEADER, show as c_long)
++    }
++
++    /// Indicates whether a progress meter will be shown for requests done with
++    /// this handle.
++    ///
++    /// This will also prevent the `progress_function` from being called.
++    ///
++    /// By default this option is `false` and corresponds to
++    /// `CURLOPT_NOPROGRESS`.
++    pub fn progress(&mut self, progress: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_NOPROGRESS,
++                         (!progress) as c_long)
++    }
++
++    /// Inform libcurl whether or not it should install signal handlers or
++    /// attempt to use signals to perform library functions.
++    ///
++    /// If this option is disabled then timeouts during name resolution will not
++    /// work unless libcurl is built against c-ares. Note that enabling this
++    /// option, however, may not cause libcurl to work with multiple threads.
++    ///
++    /// By default this option is `false` and corresponds to `CURLOPT_NOSIGNAL`.
++    /// Note that this default is **different than libcurl** as it is intended
++    /// that this library is threadsafe by default. See the [libcurl docs] for
++    /// some more information.
++    ///
++    /// [libcurl docs]: https://curl.haxx.se/libcurl/c/threadsafe.html
++    pub fn signal(&mut self, signal: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_NOSIGNAL,
++                         (!signal) as c_long)
++    }
++
++    /// Indicates whether multiple files will be transferred based on the file
++    /// name pattern.
++    ///
++    /// The last part of a filename uses fnmatch-like pattern matching.
++    ///
++    /// By default this option is `false` and corresponds to
++    /// `CURLOPT_WILDCARDMATCH`.
++    pub fn wildcard_match(&mut self, m: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_WILDCARDMATCH, m as c_long)
++    }
++
++    /// Provides the unix domain socket which this handle will work with.
++    ///
++    /// The string provided must be unix domain socket -encoded with the format:
++    ///
++    /// ```text
++    /// /path/file.sock
++    /// ```
++    pub fn unix_socket(&mut self, unix_domain_socket: &str) -> Result<(), Error> {
++        let socket = try!(CString::new(unix_domain_socket));
++        self.setopt_str(curl_sys::CURLOPT_UNIX_SOCKET_PATH, &socket)
++    }
++
++
++    // =========================================================================
++    // Internal accessors
++
++    /// Acquires a reference to the underlying handler for events.
++    pub fn get_ref(&self) -> &H {
++        &self.inner.handler
++    }
++
++    /// Acquires a reference to the underlying handler for events.
++    pub fn get_mut(&mut self) -> &mut H {
++        &mut self.inner.handler
++    }
++
++    // =========================================================================
++    // Error options
++
++    // TODO: error buffer and stderr
++
++    /// Indicates whether this library will fail on HTTP response codes >= 400.
++    ///
++    /// This method is not fail-safe especially when authentication is involved.
++    ///
++    /// By default this option is `false` and corresponds to
++    /// `CURLOPT_FAILONERROR`.
++    pub fn fail_on_error(&mut self, fail: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_FAILONERROR, fail as c_long)
++    }
++
++    // =========================================================================
++    // Network options
++
++    /// Provides the URL which this handle will work with.
++    ///
++    /// The string provided must be URL-encoded with the format:
++    ///
++    /// ```text
++    /// scheme://host:port/path
++    /// ```
++    ///
++    /// The syntax is not validated as part of this function and that is
++    /// deferred until later.
++    ///
++    /// By default this option is not set and `perform` will not work until it
++    /// is set. This option corresponds to `CURLOPT_URL`.
++    pub fn url(&mut self, url: &str) -> Result<(), Error> {
++        let url = try!(CString::new(url));
++        self.setopt_str(curl_sys::CURLOPT_URL, &url)
++    }
++
++    /// Configures the port number to connect to, instead of the one specified
++    /// in the URL or the default of the protocol.
++    pub fn port(&mut self, port: u16) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_PORT, port as c_long)
++    }
++
++    // /// Indicates whether sequences of `/../` and `/./` will be squashed or not.
++    // ///
++    // /// By default this option is `false` and corresponds to
++    // /// `CURLOPT_PATH_AS_IS`.
++    // pub fn path_as_is(&mut self, as_is: bool) -> Result<(), Error> {
++    // }
++
++    /// Provide the URL of a proxy to use.
++    ///
++    /// By default this option is not set and corresponds to `CURLOPT_PROXY`.
++    pub fn proxy(&mut self, url: &str) -> Result<(), Error> {
++        let url = try!(CString::new(url));
++        self.setopt_str(curl_sys::CURLOPT_PROXY, &url)
++    }
++
++    /// Provide port number the proxy is listening on.
++    ///
++    /// By default this option is not set (the default port for the proxy
++    /// protocol is used) and corresponds to `CURLOPT_PROXYPORT`.
++    pub fn proxy_port(&mut self, port: u16) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_PROXYPORT, port as c_long)
++    }
++
++    /// Indicates the type of proxy being used.
++    ///
++    /// By default this option is `ProxyType::Http` and corresponds to
++    /// `CURLOPT_PROXYTYPE`.
++    pub fn proxy_type(&mut self, kind: ProxyType) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_PROXYTYPE, kind as c_long)
++    }
++
++    /// Provide a list of hosts that should not be proxied to.
++    ///
++    /// This string is a comma-separated list of hosts which should not use the
++    /// proxy specified for connections. A single `*` character is also accepted
++    /// as a wildcard for all hosts.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_NOPROXY`.
++    pub fn noproxy(&mut self, skip: &str) -> Result<(), Error> {
++        let skip = try!(CString::new(skip));
++        self.setopt_str(curl_sys::CURLOPT_PROXYTYPE, &skip)
++    }
++
++    /// Inform curl whether it should tunnel all operations through the proxy.
++    ///
++    /// This essentially means that a `CONNECT` is sent to the proxy for all
++    /// outbound requests.
++    ///
++    /// By default this option is `false` and corresponds to
++    /// `CURLOPT_HTTPPROXYTUNNEL`.
++    pub fn http_proxy_tunnel(&mut self, tunnel: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_HTTPPROXYTUNNEL,
++                         tunnel as c_long)
++    }
++
++    /// Tell curl which interface to bind to for an outgoing network interface.
++    ///
++    /// The interface name, IP address, or host name can be specified here.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_INTERFACE`.
++    pub fn interface(&mut self, interface: &str) -> Result<(), Error> {
++        let s = try!(CString::new(interface));
++        self.setopt_str(curl_sys::CURLOPT_INTERFACE, &s)
++    }
++
++    /// Indicate which port should be bound to locally for this connection.
++    ///
++    /// By default this option is 0 (any port) and corresponds to
++    /// `CURLOPT_LOCALPORT`.
++    pub fn set_local_port(&mut self, port: u16) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_LOCALPORT, port as c_long)
++    }
++
++    /// Indicates the number of attempts libcurl will perform to find a working
++    /// port number.
++    ///
++    /// By default this option is 1 and corresponds to
++    /// `CURLOPT_LOCALPORTRANGE`.
++    pub fn local_port_range(&mut self, range: u16) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_LOCALPORTRANGE,
++                         range as c_long)
++    }
++
++    /// Sets the timeout of how long name resolves will be kept in memory.
++    ///
++    /// This is distinct from DNS TTL options and is entirely speculative.
++    ///
++    /// By default this option is 60s and corresponds to
++    /// `CURLOPT_DNS_CACHE_TIMEOUT`.
++    pub fn dns_cache_timeout(&mut self, dur: Duration) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_DNS_CACHE_TIMEOUT,
++                         dur.as_secs() as c_long)
++    }
++
++    /// Specify the preferred receive buffer size, in bytes.
++    ///
++    /// This is treated as a request, not an order, and the main point of this
++    /// is that the write callback may get called more often with smaller
++    /// chunks.
++    ///
++    /// By default this option is the maximum write size and corresopnds to
++    /// `CURLOPT_BUFFERSIZE`.
++    pub fn buffer_size(&mut self, size: usize) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_BUFFERSIZE, size as c_long)
++    }
++
++    // /// Enable or disable TCP Fast Open
++    // ///
++    // /// By default this options defaults to `false` and corresponds to
++    // /// `CURLOPT_TCP_FASTOPEN`
++    // pub fn fast_open(&mut self, enable: bool) -> Result<(), Error> {
++    // }
++
++    /// Configures whether the TCP_NODELAY option is set, or Nagle's algorithm
++    /// is disabled.
++    ///
++    /// The purpose of Nagle's algorithm is to minimize the number of small
++    /// packet's on the network, and disabling this may be less efficient in
++    /// some situations.
++    ///
++    /// By default this option is `false` and corresponds to
++    /// `CURLOPT_TCP_NODELAY`.
++    pub fn tcp_nodelay(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_TCP_NODELAY, enable as c_long)
++    }
++
++    /// Configures whether TCP keepalive probes will be sent.
++    ///
++    /// The delay and frequency of these probes is controlled by `tcp_keepidle`
++    /// and `tcp_keepintvl`.
++    ///
++    /// By default this option is `false` and corresponds to
++    /// `CURLOPT_TCP_KEEPALIVE`.
++    pub fn tcp_keepalive(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_TCP_KEEPALIVE, enable as c_long)
++    }
++
++    /// Configures the TCP keepalive idle time wait.
++    ///
++    /// This is the delay, after which the connection is idle, keepalive probes
++    /// will be sent. Not all operating systems support this.
++    ///
++    /// By default this corresponds to `CURLOPT_TCP_KEEPIDLE`.
++    pub fn tcp_keepidle(&mut self, amt: Duration) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_TCP_KEEPIDLE,
++                         amt.as_secs() as c_long)
++    }
++
++    /// Configures the delay between keepalive probes.
++    ///
++    /// By default this corresponds to `CURLOPT_TCP_KEEPINTVL`.
++    pub fn tcp_keepintvl(&mut self, amt: Duration) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_TCP_KEEPINTVL,
++                         amt.as_secs() as c_long)
++    }
++
++    /// Configures the scope for local IPv6 addresses.
++    ///
++    /// Sets the scope_id value to use when connecting to IPv6 or link-local
++    /// addresses.
++    ///
++    /// By default this value is 0 and corresponds to `CURLOPT_ADDRESS_SCOPE`
++    pub fn address_scope(&mut self, scope: u32) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_ADDRESS_SCOPE,
++                         scope as c_long)
++    }
++
++    // =========================================================================
++    // Names and passwords
++
++    /// Configures the username to pass as authentication for this connection.
++    ///
++    /// By default this value is not set and corresponds to `CURLOPT_USERNAME`.
++    pub fn username(&mut self, user: &str) -> Result<(), Error> {
++        let user = try!(CString::new(user));
++        self.setopt_str(curl_sys::CURLOPT_USERNAME, &user)
++    }
++
++    /// Configures the password to pass as authentication for this connection.
++    ///
++    /// By default this value is not set and corresponds to `CURLOPT_PASSWORD`.
++    pub fn password(&mut self, pass: &str) -> Result<(), Error> {
++        let pass = try!(CString::new(pass));
++        self.setopt_str(curl_sys::CURLOPT_PASSWORD, &pass)
++    }
++
++    /// Set HTTP server authentication methods to try
++    ///
++    /// If more than one method is set, libcurl will first query the site to see
++    /// which authentication methods it supports and then pick the best one you
++    /// allow it to use. For some methods, this will induce an extra network
++    /// round-trip. Set the actual name and password with the `password` and
++    /// `username` methods.
++    ///
++    /// For authentication with a proxy, see `proxy_auth`.
++    ///
++    /// By default this value is basic and corresponds to `CURLOPT_HTTPAUTH`.
++    pub fn http_auth(&mut self, auth: &Auth) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_HTTPAUTH, auth.bits)
++    }
++
++    /// Configures the proxy username to pass as authentication for this
++    /// connection.
++    ///
++    /// By default this value is not set and corresponds to
++    /// `CURLOPT_PROXYUSERNAME`.
++    pub fn proxy_username(&mut self, user: &str) -> Result<(), Error> {
++        let user = try!(CString::new(user));
++        self.setopt_str(curl_sys::CURLOPT_PROXYUSERNAME, &user)
++    }
++
++    /// Configures the proxy password to pass as authentication for this
++    /// connection.
++    ///
++    /// By default this value is not set and corresponds to
++    /// `CURLOPT_PROXYPASSWORD`.
++    pub fn proxy_password(&mut self, pass: &str) -> Result<(), Error> {
++        let pass = try!(CString::new(pass));
++        self.setopt_str(curl_sys::CURLOPT_PROXYPASSWORD, &pass)
++    }
++
++    /// Set HTTP proxy authentication methods to try
++    ///
++    /// If more than one method is set, libcurl will first query the site to see
++    /// which authentication methods it supports and then pick the best one you
++    /// allow it to use. For some methods, this will induce an extra network
++    /// round-trip. Set the actual name and password with the `proxy_password`
++    /// and `proxy_username` methods.
++    ///
++    /// By default this value is basic and corresponds to `CURLOPT_PROXYAUTH`.
++    pub fn proxy_auth(&mut self, auth: &Auth) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_PROXYAUTH, auth.bits)
++    }
++
++    /// Enable .netrc parsing
++    ///
++    /// By default the .netrc file is ignored and corresponds to `CURL_NETRC_IGNORED`.
++    pub fn netrc(&mut self, netrc: NetRc) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_NETRC, netrc as c_long)
++    }
++
++    // =========================================================================
++    // HTTP Options
++
++    /// Indicates whether the referer header is automatically updated
++    ///
++    /// By default this option is `false` and corresponds to
++    /// `CURLOPT_AUTOREFERER`.
++    pub fn autoreferer(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_AUTOREFERER, enable as c_long)
++    }
++
++    /// Enables automatic decompression of HTTP downloads.
++    ///
++    /// Sets the contents of the Accept-Encoding header sent in an HTTP request.
++    /// This enables decoding of a response with Content-Encoding.
++    ///
++    /// Currently supported encoding are `identity`, `zlib`, and `gzip`. A
++    /// zero-length string passed in will send all accepted encodings.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_ACCEPT_ENCODING`.
++    pub fn accept_encoding(&mut self, encoding: &str) -> Result<(), Error> {
++        let encoding = try!(CString::new(encoding));
++        self.setopt_str(curl_sys::CURLOPT_ACCEPT_ENCODING, &encoding)
++    }
++
++    /// Request the HTTP Transfer Encoding.
++    ///
++    /// By default this option is `false` and corresponds to
++    /// `CURLOPT_TRANSFER_ENCODING`.
++    pub fn transfer_encoding(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_TRANSFER_ENCODING, enable as c_long)
++    }
++
++    /// Follow HTTP 3xx redirects.
++    ///
++    /// Indicates whether any `Location` headers in the response should get
++    /// followed.
++    ///
++    /// By default this option is `false` and corresponds to
++    /// `CURLOPT_FOLLOWLOCATION`.
++    pub fn follow_location(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_FOLLOWLOCATION, enable as c_long)
++    }
++
++    /// Send credentials to hosts other than the first as well.
++    ///
++    /// Sends username/password credentials even when the host changes as part
++    /// of a redirect.
++    ///
++    /// By default this option is `false` and corresponds to
++    /// `CURLOPT_UNRESTRICTED_AUTH`.
++    pub fn unrestricted_auth(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_UNRESTRICTED_AUTH, enable as c_long)
++    }
++
++    /// Set the maximum number of redirects allowed.
++    ///
++    /// A value of 0 will refuse any redirect.
++    ///
++    /// By default this option is `-1` (unlimited) and corresponds to
++    /// `CURLOPT_MAXREDIRS`.
++    pub fn max_redirections(&mut self, max: u32) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_MAXREDIRS, max as c_long)
++    }
++
++    // TODO: post_redirections
++
++    /// Make an HTTP PUT request.
++    ///
++    /// By default this option is `false` and corresponds to `CURLOPT_PUT`.
++    pub fn put(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_PUT, enable as c_long)
++    }
++
++    /// Make an HTTP POST request.
++    ///
++    /// This will also make the library use the
++    /// `Content-Type: application/x-www-form-urlencoded` header.
++    ///
++    /// POST data can be specified through `post_fields` or by specifying a read
++    /// function.
++    ///
++    /// By default this option is `false` and corresponds to `CURLOPT_POST`.
++    pub fn post(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_POST, enable as c_long)
++    }
++
++    /// Configures the data that will be uploaded as part of a POST.
++    ///
++    /// Note that the data is copied into this handle and if that's not desired
++    /// then the read callbacks can be used instead.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_COPYPOSTFIELDS`.
++    pub fn post_fields_copy(&mut self, data: &[u8]) -> Result<(), Error> {
++        // Set the length before the pointer so libcurl knows how much to read
++        try!(self.post_field_size(data.len() as u64));
++        self.setopt_ptr(curl_sys::CURLOPT_COPYPOSTFIELDS,
++                        data.as_ptr() as *const _)
++    }
++
++    /// Configures the size of data that's going to be uploaded as part of a
++    /// POST operation.
++    ///
++    /// This is called automaticsally as part of `post_fields` and should only
++    /// be called if data is being provided in a read callback (and even then
++    /// it's optional).
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_POSTFIELDSIZE_LARGE`.
++    pub fn post_field_size(&mut self, size: u64) -> Result<(), Error> {
++        // Clear anything previous to ensure we don't read past a buffer
++        try!(self.setopt_ptr(curl_sys::CURLOPT_POSTFIELDS, 0 as *const _));
++        self.setopt_off_t(curl_sys::CURLOPT_POSTFIELDSIZE_LARGE,
++                          size as curl_sys::curl_off_t)
++    }
++
++    /// Tells libcurl you want a multipart/formdata HTTP POST to be made and you
++    /// instruct what data to pass on to the server in the `form` argument.
++    ///
++    /// By default this option is set to null and corresponds to
++    /// `CURLOPT_HTTPPOST`.
++    pub fn httppost(&mut self, form: Form) -> Result<(), Error> {
++        try!(self.setopt_ptr(curl_sys::CURLOPT_HTTPPOST,
++                             form::raw(&form) as *const _));
++        self.inner.form = Some(form);
++        Ok(())
++    }
++
++    /// Sets the HTTP referer header
++    ///
++    /// By default this option is not set and corresponds to `CURLOPT_REFERER`.
++    pub fn referer(&mut self, referer: &str) -> Result<(), Error> {
++        let referer = try!(CString::new(referer));
++        self.setopt_str(curl_sys::CURLOPT_REFERER, &referer)
++    }
++
++    /// Sets the HTTP user-agent header
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_USERAGENT`.
++    pub fn useragent(&mut self, useragent: &str) -> Result<(), Error> {
++        let useragent = try!(CString::new(useragent));
++        self.setopt_str(curl_sys::CURLOPT_USERAGENT, &useragent)
++    }
++
++    /// Add some headers to this HTTP request.
++    ///
++    /// If you add a header that is otherwise used internally, the value here
++    /// takes precedence. If a header is added with no content (like `Accept:`)
++    /// the internally the header will get disabled. To add a header with no
++    /// content, use the form `MyHeader;` (not the trailing semicolon).
++    ///
++    /// Headers must not be CRLF terminated. Many replaced headers have common
++    /// shortcuts which should be prefered.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_HTTPHEADER`
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use curl::easy::{Easy, List};
++    ///
++    /// let mut list = List::new();
++    /// list.append("Foo: bar").unwrap();
++    /// list.append("Bar: baz").unwrap();
++    ///
++    /// let mut handle = Easy::new();
++    /// handle.url("https://www.rust-lang.org/").unwrap();
++    /// handle.http_headers(list).unwrap();
++    /// handle.perform().unwrap();
++    /// ```
++    pub fn http_headers(&mut self, list: List) -> Result<(), Error> {
++        let ptr = list::raw(&list);
++        self.inner.header_list = Some(list);
++        self.setopt_ptr(curl_sys::CURLOPT_HTTPHEADER, ptr as *const _)
++    }
++
++    // /// Add some headers to send to the HTTP proxy.
++    // ///
++    // /// This function is essentially the same as `http_headers`.
++    // ///
++    // /// By default this option is not set and corresponds to
++    // /// `CURLOPT_PROXYHEADER`
++    // pub fn proxy_headers(&mut self, list: &'a List) -> Result<(), Error> {
++    //     self.setopt_ptr(curl_sys::CURLOPT_PROXYHEADER, list.raw as *const _)
++    // }
++
++    /// Set the contents of the HTTP Cookie header.
++    ///
++    /// Pass a string of the form `name=contents` for one cookie value or
++    /// `name1=val1; name2=val2` for multiple values.
++    ///
++    /// Using this option multiple times will only make the latest string
++    /// override the previous ones. This option will not enable the cookie
++    /// engine, use `cookie_file` or `cookie_jar` to do that.
++    ///
++    /// By default this option is not set and corresponds to `CURLOPT_COOKIE`.
++    pub fn cookie(&mut self, cookie: &str) -> Result<(), Error> {
++        let cookie = try!(CString::new(cookie));
++        self.setopt_str(curl_sys::CURLOPT_COOKIE, &cookie)
++    }
++
++    /// Set the file name to read cookies from.
++    ///
++    /// The cookie data can be in either the old Netscape / Mozilla cookie data
++    /// format or just regular HTTP headers (Set-Cookie style) dumped to a file.
++    ///
++    /// This also enables the cookie engine, making libcurl parse and send
++    /// cookies on subsequent requests with this handle.
++    ///
++    /// Given an empty or non-existing file or by passing the empty string ("")
++    /// to this option, you can enable the cookie engine without reading any
++    /// initial cookies.
++    ///
++    /// If you use this option multiple times, you just add more files to read.
++    /// Subsequent files will add more cookies.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_COOKIEFILE`.
++    pub fn cookie_file<P: AsRef<Path>>(&mut self, file: P) -> Result<(), Error> {
++        self.setopt_path(curl_sys::CURLOPT_COOKIEFILE, file.as_ref())
++    }
++
++    /// Set the file name to store cookies to.
++    ///
++    /// This will make libcurl write all internally known cookies to the file
++    /// when this handle is dropped. If no cookies are known, no file will be
++    /// created. Specify "-" as filename to instead have the cookies written to
++    /// stdout. Using this option also enables cookies for this session, so if
++    /// you for example follow a location it will make matching cookies get sent
++    /// accordingly.
++    ///
++    /// Note that libcurl doesn't read any cookies from the cookie jar. If you
++    /// want to read cookies from a file, use `cookie_file`.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_COOKIEJAR`.
++    pub fn cookie_jar<P: AsRef<Path>>(&mut self, file: P) -> Result<(), Error> {
++        self.setopt_path(curl_sys::CURLOPT_COOKIEJAR, file.as_ref())
++    }
++
++    /// Start a new cookie session
++    ///
++    /// Marks this as a new cookie "session". It will force libcurl to ignore
++    /// all cookies it is about to load that are "session cookies" from the
++    /// previous session. By default, libcurl always stores and loads all
++    /// cookies, independent if they are session cookies or not. Session cookies
++    /// are cookies without expiry date and they are meant to be alive and
++    /// existing for this "session" only.
++    ///
++    /// By default this option is `false` and corresponds to
++    /// `CURLOPT_COOKIESESSION`.
++    pub fn cookie_session(&mut self, session: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_COOKIESESSION, session as c_long)
++    }
++
++    /// Add to or manipulate cookies held in memory.
++    ///
++    /// Such a cookie can be either a single line in Netscape / Mozilla format
++    /// or just regular HTTP-style header (Set-Cookie: ...) format. This will
++    /// also enable the cookie engine. This adds that single cookie to the
++    /// internal cookie store.
++    ///
++    /// Exercise caution if you are using this option and multiple transfers may
++    /// occur. If you use the Set-Cookie format and don't specify a domain then
++    /// the cookie is sent for any domain (even after redirects are followed)
++    /// and cannot be modified by a server-set cookie. If a server sets a cookie
++    /// of the same name (or maybe you've imported one) then both will be sent
++    /// on a future transfer to that server, likely not what you intended.
++    /// address these issues set a domain in Set-Cookie or use the Netscape
++    /// format.
++    ///
++    /// Additionally, there are commands available that perform actions if you
++    /// pass in these exact strings:
++    ///
++    /// * "ALL" - erases all cookies held in memory
++    /// * "SESS" - erases all session cookies held in memory
++    /// * "FLUSH" - write all known cookies to the specified cookie jar
++    /// * "RELOAD" - reread all cookies from the cookie file
++    ///
++    /// By default this options corresponds to `CURLOPT_COOKIELIST`
++    pub fn cookie_list(&mut self, cookie: &str) -> Result<(), Error> {
++        let cookie = try!(CString::new(cookie));
++        self.setopt_str(curl_sys::CURLOPT_COOKIELIST, &cookie)
++    }
++
++    /// Ask for a HTTP GET request.
++    ///
++    /// By default this option is `false` and corresponds to `CURLOPT_HTTPGET`.
++    pub fn get(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_HTTPGET, enable as c_long)
++    }
++
++    // /// Ask for a HTTP GET request.
++    // ///
++    // /// By default this option is `false` and corresponds to `CURLOPT_HTTPGET`.
++    // pub fn http_version(&mut self, vers: &str) -> Result<(), Error> {
++    //     self.setopt_long(curl_sys::CURLOPT_HTTPGET, enable as c_long)
++    // }
++
++    /// Ignore the content-length header.
++    ///
++    /// By default this option is `false` and corresponds to
++    /// `CURLOPT_IGNORE_CONTENT_LENGTH`.
++    pub fn ignore_content_length(&mut self, ignore: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_IGNORE_CONTENT_LENGTH,
++                         ignore as c_long)
++    }
++
++    /// Enable or disable HTTP content decoding.
++    ///
++    /// By default this option is `true` and corresponds to
++    /// `CURLOPT_HTTP_CONTENT_DECODING`.
++    pub fn http_content_decoding(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_HTTP_CONTENT_DECODING,
++                         enable as c_long)
++    }
++
++    /// Enable or disable HTTP transfer decoding.
++    ///
++    /// By default this option is `true` and corresponds to
++    /// `CURLOPT_HTTP_TRANSFER_DECODING`.
++    pub fn http_transfer_decoding(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_HTTP_TRANSFER_DECODING,
++                         enable as c_long)
++    }
++
++    // /// Timeout for the Expect: 100-continue response
++    // ///
++    // /// By default this option is 1s and corresponds to
++    // /// `CURLOPT_EXPECT_100_TIMEOUT_MS`.
++    // pub fn expect_100_timeout(&mut self, enable: bool) -> Result<(), Error> {
++    //     self.setopt_long(curl_sys::CURLOPT_HTTP_TRANSFER_DECODING,
++    //                      enable as c_long)
++    // }
++
++    // /// Wait for pipelining/multiplexing.
++    // ///
++    // /// Tells libcurl to prefer to wait for a connection to confirm or deny that
++    // /// it can do pipelining or multiplexing before continuing.
++    // ///
++    // /// When about to perform a new transfer that allows pipelining or
++    // /// multiplexing, libcurl will check for existing connections to re-use and
++    // /// pipeline on. If no such connection exists it will immediately continue
++    // /// and create a fresh new connection to use.
++    // ///
++    // /// By setting this option to `true` - having `pipeline` enabled for the
++    // /// multi handle this transfer is associated with - libcurl will instead
++    // /// wait for the connection to reveal if it is possible to
++    // /// pipeline/multiplex on before it continues. This enables libcurl to much
++    // /// better keep the number of connections to a minimum when using pipelining
++    // /// or multiplexing protocols.
++    // ///
++    // /// The effect thus becomes that with this option set, libcurl prefers to
++    // /// wait and re-use an existing connection for pipelining rather than the
++    // /// opposite: prefer to open a new connection rather than waiting.
++    // ///
++    // /// The waiting time is as long as it takes for the connection to get up and
++    // /// for libcurl to get the necessary response back that informs it about its
++    // /// protocol and support level.
++    // pub fn http_pipewait(&mut self, enable: bool) -> Result<(), Error> {
++    // }
++
++
++    // =========================================================================
++    // Protocol Options
++
++    /// Indicates the range that this request should retrieve.
++    ///
++    /// The string provided should be of the form `N-M` where either `N` or `M`
++    /// can be left out. For HTTP transfers multiple ranges separated by commas
++    /// are also accepted.
++    ///
++    /// By default this option is not set and corresponds to `CURLOPT_RANGE`.
++    pub fn range(&mut self, range: &str) -> Result<(), Error> {
++        let range = try!(CString::new(range));
++        self.setopt_str(curl_sys::CURLOPT_RANGE, &range)
++    }
++
++    /// Set a point to resume transfer from
++    ///
++    /// Specify the offset in bytes you want the transfer to start from.
++    ///
++    /// By default this option is 0 and corresponds to
++    /// `CURLOPT_RESUME_FROM_LARGE`.
++    pub fn resume_from(&mut self, from: u64) -> Result<(), Error> {
++        self.setopt_off_t(curl_sys::CURLOPT_RESUME_FROM_LARGE,
++                          from as curl_sys::curl_off_t)
++    }
++
++    /// Set a custom request string
++    ///
++    /// Specifies that a custom request will be made (e.g. a custom HTTP
++    /// method). This does not change how libcurl performs internally, just
++    /// changes the string sent to the server.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_CUSTOMREQUEST`.
++    pub fn custom_request(&mut self, request: &str) -> Result<(), Error> {
++        let request = try!(CString::new(request));
++        self.setopt_str(curl_sys::CURLOPT_CUSTOMREQUEST, &request)
++    }
++
++    /// Get the modification time of the remote resource
++    ///
++    /// If true, libcurl will attempt to get the modification time of the
++    /// remote document in this operation. This requires that the remote server
++    /// sends the time or replies to a time querying command. The `filetime`
++    /// function can be used after a transfer to extract the received time (if
++    /// any).
++    ///
++    /// By default this option is `false` and corresponds to `CURLOPT_FILETIME`
++    pub fn fetch_filetime(&mut self, fetch: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_FILETIME, fetch as c_long)
++    }
++
++    /// Indicate whether to download the request without getting the body
++    ///
++    /// This is useful, for example, for doing a HEAD request.
++    ///
++    /// By default this option is `false` and corresponds to `CURLOPT_NOBODY`.
++    pub fn nobody(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_NOBODY, enable as c_long)
++    }
++
++    /// Set the size of the input file to send off.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_INFILESIZE_LARGE`.
++    pub fn in_filesize(&mut self, size: u64) -> Result<(), Error> {
++        self.setopt_off_t(curl_sys::CURLOPT_INFILESIZE_LARGE,
++                          size as curl_sys::curl_off_t)
++    }
++
++    /// Enable or disable data upload.
++    ///
++    /// This means that a PUT request will be made for HTTP and probably wants
++    /// to be combined with the read callback as well as the `in_filesize`
++    /// method.
++    ///
++    /// By default this option is `false` and corresponds to `CURLOPT_UPLOAD`.
++    pub fn upload(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_UPLOAD, enable as c_long)
++    }
++
++    /// Configure the maximum file size to download.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_MAXFILESIZE_LARGE`.
++    pub fn max_filesize(&mut self, size: u64) -> Result<(), Error> {
++        self.setopt_off_t(curl_sys::CURLOPT_MAXFILESIZE_LARGE,
++                          size as curl_sys::curl_off_t)
++    }
++
++    /// Selects a condition for a time request.
++    ///
++    /// This value indicates how the `time_value` option is interpreted.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_TIMECONDITION`.
++    pub fn time_condition(&mut self, cond: TimeCondition) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_TIMECONDITION, cond as c_long)
++    }
++
++    /// Sets the time value for a conditional request.
++    ///
++    /// The value here should be the number of seconds elapsed since January 1,
++    /// 1970. To pass how to interpret this value, use `time_condition`.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_TIMEVALUE`.
++    pub fn time_value(&mut self, val: i64) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_TIMEVALUE, val as c_long)
++    }
++
++    // =========================================================================
++    // Connection Options
++
++    /// Set maximum time the request is allowed to take.
++    ///
++    /// Normally, name lookups can take a considerable time and limiting
++    /// operations to less than a few minutes risk aborting perfectly normal
++    /// operations.
++    ///
++    /// If libcurl is built to use the standard system name resolver, that
++    /// portion of the transfer will still use full-second resolution for
++    /// timeouts with a minimum timeout allowed of one second.
++    ///
++    /// In unix-like systems, this might cause signals to be used unless
++    /// `nosignal` is set.
++    ///
++    /// Since this puts a hard limit for how long a request is allowed to
++    /// take, it has limited use in dynamic use cases with varying transfer
++    /// times. You are then advised to explore `low_speed_limit`,
++    /// `low_speed_time` or using `progress_function` to implement your own
++    /// timeout logic.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_TIMEOUT_MS`.
++    pub fn timeout(&mut self, timeout: Duration) -> Result<(), Error> {
++        // TODO: checked arithmetic and casts
++        // TODO: use CURLOPT_TIMEOUT if the timeout is too great
++        let ms = timeout.as_secs() * 1000 +
++                 (timeout.subsec_nanos() / 1_000_000) as u64;
++        self.setopt_long(curl_sys::CURLOPT_TIMEOUT_MS, ms as c_long)
++
++    }
++
++    /// Set the low speed limit in bytes per second.
++    ///
++    /// This specifies the average transfer speed in bytes per second that the
++    /// transfer should be below during `low_speed_time` for libcurl to consider
++    /// it to be too slow and abort.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_LOW_SPEED_LIMIT`.
++    pub fn low_speed_limit(&mut self, limit: u32) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_LOW_SPEED_LIMIT, limit as c_long)
++    }
++
++    /// Set the low speed time period.
++    ///
++    /// Specifies the window of time for which if the transfer rate is below
++    /// `low_speed_limit` the request will be aborted.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_LOW_SPEED_TIME`.
++    pub fn low_speed_time(&mut self, dur: Duration) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_LOW_SPEED_TIME,
++                         dur.as_secs() as c_long)
++    }
++
++    /// Rate limit data upload speed
++    ///
++    /// If an upload exceeds this speed (counted in bytes per second) on
++    /// cumulative average during the transfer, the transfer will pause to keep
++    /// the average rate less than or equal to the parameter value.
++    ///
++    /// By default this option is not set (unlimited speed) and corresponds to
++    /// `CURLOPT_MAX_SEND_SPEED_LARGE`.
++    pub fn max_send_speed(&mut self, speed: u64) -> Result<(), Error> {
++        self.setopt_off_t(curl_sys::CURLOPT_MAX_SEND_SPEED_LARGE,
++                          speed as curl_sys::curl_off_t)
++    }
++
++    /// Rate limit data download speed
++    ///
++    /// If a download exceeds this speed (counted in bytes per second) on
++    /// cumulative average during the transfer, the transfer will pause to keep
++    /// the average rate less than or equal to the parameter value.
++    ///
++    /// By default this option is not set (unlimited speed) and corresponds to
++    /// `CURLOPT_MAX_RECV_SPEED_LARGE`.
++    pub fn max_recv_speed(&mut self, speed: u64) -> Result<(), Error> {
++        self.setopt_off_t(curl_sys::CURLOPT_MAX_RECV_SPEED_LARGE,
++                          speed as curl_sys::curl_off_t)
++    }
++
++    /// Set the maximum connection cache size.
++    ///
++    /// The set amount will be the maximum number of simultaneously open
++    /// persistent connections that libcurl may cache in the pool associated
++    /// with this handle. The default is 5, and there isn't much point in
++    /// changing this value unless you are perfectly aware of how this works and
++    /// changes libcurl's behaviour. This concerns connections using any of the
++    /// protocols that support persistent connections.
++    ///
++    /// When reaching the maximum limit, curl closes the oldest one in the cache
++    /// to prevent increasing the number of open connections.
++    ///
++    /// By default this option is set to 5 and corresponds to
++    /// `CURLOPT_MAXCONNECTS`
++    pub fn max_connects(&mut self, max: u32) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_MAXCONNECTS, max as c_long)
++    }
++
++    /// Force a new connection to be used.
++    ///
++    /// Makes the next transfer use a new (fresh) connection by force instead of
++    /// trying to re-use an existing one. This option should be used with
++    /// caution and only if you understand what it does as it may seriously
++    /// impact performance.
++    ///
++    /// By default this option is `false` and corresponds to
++    /// `CURLOPT_FRESH_CONNECT`.
++    pub fn fresh_connect(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_FRESH_CONNECT, enable as c_long)
++    }
++
++    /// Make connection get closed at once after use.
++    ///
++    /// Makes libcurl explicitly close the connection when done with the
++    /// transfer. Normally, libcurl keeps all connections alive when done with
++    /// one transfer in case a succeeding one follows that can re-use them.
++    /// This option should be used with caution and only if you understand what
++    /// it does as it can seriously impact performance.
++    ///
++    /// By default this option is `false` and corresponds to
++    /// `CURLOPT_FORBID_REUSE`.
++    pub fn forbid_reuse(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_FORBID_REUSE, enable as c_long)
++    }
++
++    /// Timeout for the connect phase
++    ///
++    /// This is the maximum time that you allow the connection phase to the
++    /// server to take. This only limits the connection phase, it has no impact
++    /// once it has connected.
++    ///
++    /// By default this value is 300 seconds and corresponds to
++    /// `CURLOPT_CONNECTTIMEOUT_MS`.
++    pub fn connect_timeout(&mut self, timeout: Duration) -> Result<(), Error> {
++        let ms = timeout.as_secs() * 1000 +
++                 (timeout.subsec_nanos() / 1_000_000) as u64;
++        self.setopt_long(curl_sys::CURLOPT_CONNECTTIMEOUT_MS, ms as c_long)
++    }
++
++    /// Specify which IP protocol version to use
++    ///
++    /// Allows an application to select what kind of IP addresses to use when
++    /// resolving host names. This is only interesting when using host names
++    /// that resolve addresses using more than one version of IP.
++    ///
++    /// By default this value is "any" and corresponds to `CURLOPT_IPRESOLVE`.
++    pub fn ip_resolve(&mut self, resolve: IpResolve) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_IPRESOLVE, resolve as c_long)
++    }
++
++    /// Configure whether to stop when connected to target server
++    ///
++    /// When enabled it tells the library to perform all the required proxy
++    /// authentication and connection setup, but no data transfer, and then
++    /// return.
++    ///
++    /// The option can be used to simply test a connection to a server.
++    ///
++    /// By default this value is `false` and corresponds to
++    /// `CURLOPT_CONNECT_ONLY`.
++    pub fn connect_only(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_CONNECT_ONLY, enable as c_long)
++    }
++
++    // /// Set interface to speak DNS over.
++    // ///
++    // /// Set the name of the network interface that the DNS resolver should bind
++    // /// to. This must be an interface name (not an address).
++    // ///
++    // /// By default this option is not set and corresponds to
++    // /// `CURLOPT_DNS_INTERFACE`.
++    // pub fn dns_interface(&mut self, interface: &str) -> Result<(), Error> {
++    //     let interface = try!(CString::new(interface));
++    //     self.setopt_str(curl_sys::CURLOPT_DNS_INTERFACE, &interface)
++    // }
++    //
++    // /// IPv4 address to bind DNS resolves to
++    // ///
++    // /// Set the local IPv4 address that the resolver should bind to. The
++    // /// argument should be of type char * and contain a single numerical IPv4
++    // /// address as a string.
++    // ///
++    // /// By default this option is not set and corresponds to
++    // /// `CURLOPT_DNS_LOCAL_IP4`.
++    // pub fn dns_local_ip4(&mut self, ip: &str) -> Result<(), Error> {
++    //     let ip = try!(CString::new(ip));
++    //     self.setopt_str(curl_sys::CURLOPT_DNS_LOCAL_IP4, &ip)
++    // }
++    //
++    // /// IPv6 address to bind DNS resolves to
++    // ///
++    // /// Set the local IPv6 address that the resolver should bind to. The
++    // /// argument should be of type char * and contain a single numerical IPv6
++    // /// address as a string.
++    // ///
++    // /// By default this option is not set and corresponds to
++    // /// `CURLOPT_DNS_LOCAL_IP6`.
++    // pub fn dns_local_ip6(&mut self, ip: &str) -> Result<(), Error> {
++    //     let ip = try!(CString::new(ip));
++    //     self.setopt_str(curl_sys::CURLOPT_DNS_LOCAL_IP6, &ip)
++    // }
++    //
++    // /// Set preferred DNS servers.
++    // ///
++    // /// Provides a list of DNS servers to be used instead of the system default.
++    // /// The format of the dns servers option is:
++    // ///
++    // /// ```text
++    // /// host[:port],[host[:port]]...
++    // /// ```
++    // ///
++    // /// By default this option is not set and corresponds to
++    // /// `CURLOPT_DNS_SERVERS`.
++    // pub fn dns_servers(&mut self, servers: &str) -> Result<(), Error> {
++    //     let servers = try!(CString::new(servers));
++    //     self.setopt_str(curl_sys::CURLOPT_DNS_SERVERS, &servers)
++    // }
++
++    // =========================================================================
++    // SSL/Security Options
++
++    /// Sets the SSL client certificate.
++    ///
++    /// The string should be the file name of your client certificate. The
++    /// default format is "P12" on Secure Transport and "PEM" on other engines,
++    /// and can be changed with `ssl_cert_type`.
++    ///
++    /// With NSS or Secure Transport, this can also be the nickname of the
++    /// certificate you wish to authenticate with as it is named in the security
++    /// database. If you want to use a file from the current directory, please
++    /// precede it with "./" prefix, in order to avoid confusion with a
++    /// nickname.
++    ///
++    /// When using a client certificate, you most likely also need to provide a
++    /// private key with `ssl_key`.
++    ///
++    /// By default this option is not set and corresponds to `CURLOPT_SSLCERT`.
++    pub fn ssl_cert<P: AsRef<Path>>(&mut self, cert: P) -> Result<(), Error> {
++        self.setopt_path(curl_sys::CURLOPT_SSLCERT, cert.as_ref())
++    }
++
++    /// Specify type of the client SSL certificate.
++    ///
++    /// The string should be the format of your certificate. Supported formats
++    /// are "PEM" and "DER", except with Secure Transport. OpenSSL (versions
++    /// 0.9.3 and later) and Secure Transport (on iOS 5 or later, or OS X 10.7
++    /// or later) also support "P12" for PKCS#12-encoded files.
++    ///
++    /// By default this option is "PEM" and corresponds to
++    /// `CURLOPT_SSLCERTTYPE`.
++    pub fn ssl_cert_type(&mut self, kind: &str) -> Result<(), Error> {
++        let kind = try!(CString::new(kind));
++        self.setopt_str(curl_sys::CURLOPT_SSLCERTTYPE, &kind)
++    }
++
++    /// Specify private keyfile for TLS and SSL client cert.
++    ///
++    /// The string should be the file name of your private key. The default
++    /// format is "PEM" and can be changed with `ssl_key_type`.
++    ///
++    /// (iOS and Mac OS X only) This option is ignored if curl was built against
++    /// Secure Transport. Secure Transport expects the private key to be already
++    /// present in the keychain or PKCS#12 file containing the certificate.
++    ///
++    /// By default this option is not set and corresponds to `CURLOPT_SSLKEY`.
++    pub fn ssl_key<P: AsRef<Path>>(&mut self, key: P) -> Result<(), Error> {
++        self.setopt_path(curl_sys::CURLOPT_SSLKEY, key.as_ref())
++    }
++
++    /// Set type of the private key file.
++    ///
++    /// The string should be the format of your private key. Supported formats
++    /// are "PEM", "DER" and "ENG".
++    ///
++    /// The format "ENG" enables you to load the private key from a crypto
++    /// engine. In this case `ssl_key` is used as an identifier passed to
++    /// the engine. You have to set the crypto engine with `ssl_engine`.
++    /// "DER" format key file currently does not work because of a bug in
++    /// OpenSSL.
++    ///
++    /// By default this option is "PEM" and corresponds to
++    /// `CURLOPT_SSLKEYTYPE`.
++    pub fn ssl_key_type(&mut self, kind: &str) -> Result<(), Error> {
++        let kind = try!(CString::new(kind));
++        self.setopt_str(curl_sys::CURLOPT_SSLKEYTYPE, &kind)
++    }
++
++    /// Set passphrase to private key.
++    ///
++    /// This will be used as the password required to use the `ssl_key`.
++    /// You never needed a pass phrase to load a certificate but you need one to
++    /// load your private key.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_KEYPASSWD`.
++    pub fn key_password(&mut self, password: &str) -> Result<(), Error> {
++        let password = try!(CString::new(password));
++        self.setopt_str(curl_sys::CURLOPT_KEYPASSWD, &password)
++    }
++
++    /// Set the SSL engine identifier.
++    ///
++    /// This will be used as the identifier for the crypto engine you want to
++    /// use for your private key.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_SSLENGINE`.
++    pub fn ssl_engine(&mut self, engine: &str) -> Result<(), Error> {
++        let engine = try!(CString::new(engine));
++        self.setopt_str(curl_sys::CURLOPT_SSLENGINE, &engine)
++    }
++
++    /// Make this handle's SSL engine the default.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_SSLENGINE_DEFAULT`.
++    pub fn ssl_engine_default(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_SSLENGINE_DEFAULT, enable as c_long)
++    }
++
++    // /// Enable TLS false start.
++    // ///
++    // /// This option determines whether libcurl should use false start during the
++    // /// TLS handshake. False start is a mode where a TLS client will start
++    // /// sending application data before verifying the server's Finished message,
++    // /// thus saving a round trip when performing a full handshake.
++    // ///
++    // /// By default this option is not set and corresponds to
++    // /// `CURLOPT_SSL_FALSESTARTE`.
++    // pub fn ssl_false_start(&mut self, enable: bool) -> Result<(), Error> {
++    //     self.setopt_long(curl_sys::CURLOPT_SSLENGINE_DEFAULT, enable as c_long)
++    // }
++
++    /// Set preferred HTTP version.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_HTTP_VERSION`.
++    pub fn http_version(&mut self, version: HttpVersion) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_HTTP_VERSION, version as c_long)
++    }
++
++    /// Set preferred TLS/SSL version.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_SSLVERSION`.
++    pub fn ssl_version(&mut self, version: SslVersion) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_SSLVERSION, version as c_long)
++    }
++
++    /// Verify the certificate's name against host.
++    ///
++    /// This should be disabled with great caution! It basically disables the
++    /// security features of SSL if it is disabled.
++    ///
++    /// By default this option is set to `true` and corresponds to
++    /// `CURLOPT_SSL_VERIFYHOST`.
++    pub fn ssl_verify_host(&mut self, verify: bool) -> Result<(), Error> {
++        let val = if verify {2} else {0};
++        self.setopt_long(curl_sys::CURLOPT_SSL_VERIFYHOST, val)
++    }
++
++    /// Verify the peer's SSL certificate.
++    ///
++    /// This should be disabled with great caution! It basically disables the
++    /// security features of SSL if it is disabled.
++    ///
++    /// By default this option is set to `true` and corresponds to
++    /// `CURLOPT_SSL_VERIFYPEER`.
++    pub fn ssl_verify_peer(&mut self, verify: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_SSL_VERIFYPEER, verify as c_long)
++    }
++
++    // /// Verify the certificate's status.
++    // ///
++    // /// This option determines whether libcurl verifies the status of the server
++    // /// cert using the "Certificate Status Request" TLS extension (aka. OCSP
++    // /// stapling).
++    // ///
++    // /// By default this option is set to `false` and corresponds to
++    // /// `CURLOPT_SSL_VERIFYSTATUS`.
++    // pub fn ssl_verify_status(&mut self, verify: bool) -> Result<(), Error> {
++    //     self.setopt_long(curl_sys::CURLOPT_SSL_VERIFYSTATUS, verify as c_long)
++    // }
++
++    /// Specify the path to Certificate Authority (CA) bundle
++    ///
++    /// The file referenced should hold one or more certificates to verify the
++    /// peer with.
++    ///
++    /// This option is by default set to the system path where libcurl's cacert
++    /// bundle is assumed to be stored, as established at build time.
++    ///
++    /// If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module
++    /// (libnsspem.so) needs to be available for this option to work properly.
++    ///
++    /// By default this option is the system defaults, and corresponds to
++    /// `CURLOPT_CAINFO`.
++    pub fn cainfo<P: AsRef<Path>>(&mut self, path: P) -> Result<(), Error> {
++        self.setopt_path(curl_sys::CURLOPT_CAINFO, path.as_ref())
++    }
++
++    /// Set the issuer SSL certificate filename
++    ///
++    /// Specifies a file holding a CA certificate in PEM format. If the option
++    /// is set, an additional check against the peer certificate is performed to
++    /// verify the issuer is indeed the one associated with the certificate
++    /// provided by the option. This additional check is useful in multi-level
++    /// PKI where one needs to enforce that the peer certificate is from a
++    /// specific branch of the tree.
++    ///
++    /// This option makes sense only when used in combination with the
++    /// `ssl_verify_peer` option. Otherwise, the result of the check is not
++    /// considered as failure.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_ISSUERCERT`.
++    pub fn issuer_cert<P: AsRef<Path>>(&mut self, path: P) -> Result<(), Error> {
++        self.setopt_path(curl_sys::CURLOPT_ISSUERCERT, path.as_ref())
++    }
++
++    /// Specify directory holding CA certificates
++    ///
++    /// Names a directory holding multiple CA certificates to verify the peer
++    /// with. If libcurl is built against OpenSSL, the certificate directory
++    /// must be prepared using the openssl c_rehash utility. This makes sense
++    /// only when used in combination with the `ssl_verify_peer` option.
++    ///
++    /// By default this option is not set and corresponds to `CURLOPT_CAPATH`.
++    pub fn capath<P: AsRef<Path>>(&mut self, path: P) -> Result<(), Error> {
++        self.setopt_path(curl_sys::CURLOPT_CAPATH, path.as_ref())
++    }
++
++    /// Specify a Certificate Revocation List file
++    ///
++    /// Names a file with the concatenation of CRL (in PEM format) to use in the
++    /// certificate validation that occurs during the SSL exchange.
++    ///
++    /// When curl is built to use NSS or GnuTLS, there is no way to influence
++    /// the use of CRL passed to help in the verification process. When libcurl
++    /// is built with OpenSSL support, X509_V_FLAG_CRL_CHECK and
++    /// X509_V_FLAG_CRL_CHECK_ALL are both set, requiring CRL check against all
++    /// the elements of the certificate chain if a CRL file is passed.
++    ///
++    /// This option makes sense only when used in combination with the
++    /// `ssl_verify_peer` option.
++    ///
++    /// A specific error code (`is_ssl_crl_badfile`) is defined with the
++    /// option. It is returned when the SSL exchange fails because the CRL file
++    /// cannot be loaded. A failure in certificate verification due to a
++    /// revocation information found in the CRL does not trigger this specific
++    /// error.
++    ///
++    /// By default this option is not set and corresponds to `CURLOPT_CRLFILE`.
++    pub fn crlfile<P: AsRef<Path>>(&mut self, path: P) -> Result<(), Error> {
++        self.setopt_path(curl_sys::CURLOPT_CRLFILE, path.as_ref())
++    }
++
++    /// Request SSL certificate information
++    ///
++    /// Enable libcurl's certificate chain info gatherer. With this enabled,
++    /// libcurl will extract lots of information and data about the certificates
++    /// in the certificate chain used in the SSL connection.
++    ///
++    /// By default this option is `false` and corresponds to
++    /// `CURLOPT_CERTINFO`.
++    pub fn certinfo(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_CERTINFO, enable as c_long)
++    }
++
++    // /// Set pinned public key.
++    // ///
++    // /// Pass a pointer to a zero terminated string as parameter. The string can
++    // /// be the file name of your pinned public key. The file format expected is
++    // /// "PEM" or "DER". The string can also be any number of base64 encoded
++    // /// sha256 hashes preceded by "sha256//" and separated by ";"
++    // ///
++    // /// When negotiating a TLS or SSL connection, the server sends a certificate
++    // /// indicating its identity. A public key is extracted from this certificate
++    // /// and if it does not exactly match the public key provided to this option,
++    // /// curl will abort the connection before sending or receiving any data.
++    // ///
++    // /// By default this option is not set and corresponds to
++    // /// `CURLOPT_PINNEDPUBLICKEY`.
++    // pub fn pinned_public_key(&mut self, enable: bool) -> Result<(), Error> {
++    //     self.setopt_long(curl_sys::CURLOPT_CERTINFO, enable as c_long)
++    // }
++
++    /// Specify a source for random data
++    ///
++    /// The file will be used to read from to seed the random engine for SSL and
++    /// more.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_RANDOM_FILE`.
++    pub fn random_file<P: AsRef<Path>>(&mut self, p: P) -> Result<(), Error> {
++        self.setopt_path(curl_sys::CURLOPT_RANDOM_FILE, p.as_ref())
++    }
++
++    /// Specify EGD socket path.
++    ///
++    /// Indicates the path name to the Entropy Gathering Daemon socket. It will
++    /// be used to seed the random engine for SSL.
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_EGDSOCKET`.
++    pub fn egd_socket<P: AsRef<Path>>(&mut self, p: P) -> Result<(), Error> {
++        self.setopt_path(curl_sys::CURLOPT_EGDSOCKET, p.as_ref())
++    }
++
++    /// Specify ciphers to use for TLS.
++    ///
++    /// Holds the list of ciphers to use for the SSL connection. The list must
++    /// be syntactically correct, it consists of one or more cipher strings
++    /// separated by colons. Commas or spaces are also acceptable separators
++    /// but colons are normally used, !, - and + can be used as operators.
++    ///
++    /// For OpenSSL and GnuTLS valid examples of cipher lists include 'RC4-SHA',
++    /// ´SHA1+DES´, 'TLSv1' and 'DEFAULT'. The default list is normally set when
++    /// you compile OpenSSL.
++    ///
++    /// You'll find more details about cipher lists on this URL:
++    ///
++    /// https://www.openssl.org/docs/apps/ciphers.html
++    ///
++    /// For NSS, valid examples of cipher lists include 'rsa_rc4_128_md5',
++    /// ´rsa_aes_128_sha´, etc. With NSS you don't add/remove ciphers. If one
++    /// uses this option then all known ciphers are disabled and only those
++    /// passed in are enabled.
++    ///
++    /// You'll find more details about the NSS cipher lists on this URL:
++    ///
++    /// http://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives
++    ///
++    /// By default this option is not set and corresponds to
++    /// `CURLOPT_SSL_CIPHER_LIST`.
++    pub fn ssl_cipher_list(&mut self, ciphers: &str) -> Result<(), Error> {
++        let ciphers = try!(CString::new(ciphers));
++        self.setopt_str(curl_sys::CURLOPT_SSL_CIPHER_LIST, &ciphers)
++    }
++
++    /// Enable or disable use of the SSL session-ID cache
++    ///
++    /// By default all transfers are done using the cache enabled. While nothing
++    /// ever should get hurt by attempting to reuse SSL session-IDs, there seem
++    /// to be or have been broken SSL implementations in the wild that may
++    /// require you to disable this in order for you to succeed.
++    ///
++    /// This corresponds to the `CURLOPT_SSL_SESSIONID_CACHE` option.
++    pub fn ssl_sessionid_cache(&mut self, enable: bool) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_SSL_SESSIONID_CACHE,
++                         enable as c_long)
++    }
++
++    /// Set SSL behavior options
++    ///
++    /// Inform libcurl about SSL specific behaviors.
++    ///
++    /// This corresponds to the `CURLOPT_SSL_OPTIONS` option.
++    pub fn ssl_options(&mut self, bits: &SslOpt) -> Result<(), Error> {
++        self.setopt_long(curl_sys::CURLOPT_SSL_OPTIONS, bits.bits)
++    }
++
++    // /// Set SSL behavior options for proxies
++    // ///
++    // /// Inform libcurl about SSL specific behaviors.
++    // ///
++    // /// This corresponds to the `CURLOPT_PROXY_SSL_OPTIONS` option.
++    // pub fn proxy_ssl_options(&mut self, bits: &SslOpt) -> Result<(), Error> {
++    //     self.setopt_long(curl_sys::CURLOPT_PROXY_SSL_OPTIONS, bits.bits)
++    // }
++
++    // /// Stores a private pointer-sized piece of data.
++    // ///
++    // /// This can be retrieved through the `private` function and otherwise
++    // /// libcurl does not tamper with this value. This corresponds to
++    // /// `CURLOPT_PRIVATE` and defaults to 0.
++    // pub fn set_private(&mut self, private: usize) -> Result<(), Error> {
++    //     self.setopt_ptr(curl_sys::CURLOPT_PRIVATE, private as *const _)
++    // }
++    //
++    // /// Fetches this handle's private pointer-sized piece of data.
++    // ///
++    // /// This corresponds to `CURLINFO_PRIVATE` and defaults to 0.
++    // pub fn private(&mut self) -> Result<usize, Error> {
++    //     self.getopt_ptr(curl_sys::CURLINFO_PRIVATE).map(|p| p as usize)
++    // }
++
++    // =========================================================================
++    // getters
++
++    /// Get the last used URL
++    ///
++    /// In cases when you've asked libcurl to follow redirects, it may
++    /// not be the same value you set with `url`.
++    ///
++    /// This methods corresponds to the `CURLINFO_EFFECTIVE_URL` option.
++    ///
++    /// Returns `Ok(None)` if no effective url is listed or `Err` if an error
++    /// happens or the underlying bytes aren't valid utf-8.
++    pub fn effective_url(&mut self) -> Result<Option<&str>, Error> {
++        self.getopt_str(curl_sys::CURLINFO_EFFECTIVE_URL)
++    }
++
++    /// Get the last used URL, in bytes
++    ///
++    /// In cases when you've asked libcurl to follow redirects, it may
++    /// not be the same value you set with `url`.
++    ///
++    /// This methods corresponds to the `CURLINFO_EFFECTIVE_URL` option.
++    ///
++    /// Returns `Ok(None)` if no effective url is listed or `Err` if an error
++    /// happens or the underlying bytes aren't valid utf-8.
++    pub fn effective_url_bytes(&mut self) -> Result<Option<&[u8]>, Error> {
++        self.getopt_bytes(curl_sys::CURLINFO_EFFECTIVE_URL)
++    }
++
++    /// Get the last response code
++    ///
++    /// The stored value will be zero if no server response code has been
++    /// received. Note that a proxy's CONNECT response should be read with
++    /// `http_connectcode` and not this.
++    ///
++    /// Corresponds to `CURLINFO_RESPONSE_CODE` and returns an error if this
++    /// option is not supported.
++    pub fn response_code(&mut self) -> Result<u32, Error> {
++        self.getopt_long(curl_sys::CURLINFO_RESPONSE_CODE).map(|c| c as u32)
++    }
++
++    /// Get the CONNECT response code
++    ///
++    /// Returns the last received HTTP proxy response code to a CONNECT request.
++    /// The returned value will be zero if no such response code was available.
++    ///
++    /// Corresponds to `CURLINFO_HTTP_CONNECTCODE` and returns an error if this
++    /// option is not supported.
++    pub fn http_connectcode(&mut self) -> Result<u32, Error> {
++        self.getopt_long(curl_sys::CURLINFO_HTTP_CONNECTCODE).map(|c| c as u32)
++    }
++
++    /// Get the remote time of the retrieved document
++    ///
++    /// Returns the remote time of the retrieved document (in number of seconds
++    /// since 1 Jan 1970 in the GMT/UTC time zone). If you get `None`, it can be
++    /// because of many reasons (it might be unknown, the server might hide it
++    /// or the server doesn't support the command that tells document time etc)
++    /// and the time of the document is unknown.
++    ///
++    /// Note that you must tell the server to collect this information before
++    /// the transfer is made, by using the `filetime` method to
++    /// or you will unconditionally get a `None` back.
++    ///
++    /// This corresponds to `CURLINFO_FILETIME` and may return an error if the
++    /// option is not supported
++    pub fn filetime(&mut self) -> Result<Option<i64>, Error> {
++        self.getopt_long(curl_sys::CURLINFO_FILETIME).map(|r| {
++            if r == -1 {
++                None
++            } else {
++                Some(r as i64)
++            }
++        })
++    }
++
++    /// Get total time of previous transfer
++    ///
++    /// Returns the total time for the previous transfer,
++    /// including name resolving, TCP connect etc.
++    ///
++    /// Corresponds to `CURLINFO_TOTAL_TIME` and may return an error if the
++    /// option isn't supported.
++    pub fn total_time(&mut self) -> Result<Duration, Error> {
++        self.getopt_double(curl_sys::CURLINFO_TOTAL_TIME)
++            .map(double_seconds_to_duration)
++    }
++
++    /// Get the name lookup time
++    ///
++    /// Returns the total time from the start
++    /// until the name resolving was completed.
++    ///
++    /// Corresponds to `CURLINFO_NAMELOOKUP_TIME` and may return an error if the
++    /// option isn't supported.
++    pub fn namelookup_time(&mut self) -> Result<Duration, Error> {
++        self.getopt_double(curl_sys::CURLINFO_NAMELOOKUP_TIME)
++            .map(double_seconds_to_duration)
++    }
++
++    /// Get the time until connect
++    ///
++    /// Returns the total time from the start
++    /// until the connection to the remote host (or proxy) was completed.
++    ///
++    /// Corresponds to `CURLINFO_CONNECT_TIME` and may return an error if the
++    /// option isn't supported.
++    pub fn connect_time(&mut self) -> Result<Duration, Error> {
++        self.getopt_double(curl_sys::CURLINFO_CONNECT_TIME)
++            .map(double_seconds_to_duration)
++    }
++
++    /// Get the time until the SSL/SSH handshake is completed
++    ///
++    /// Returns the total time it took from the start until the SSL/SSH
++    /// connect/handshake to the remote host was completed. This time is most often
++    /// very near to the `pretransfer_time` time, except for cases such as
++    /// HTTP pipelining where the pretransfer time can be delayed due to waits in
++    /// line for the pipeline and more.
++    ///
++    /// Corresponds to `CURLINFO_APPCONNECT_TIME` and may return an error if the
++    /// option isn't supported.
++    pub fn appconnect_time(&mut self) -> Result<Duration, Error> {
++        self.getopt_double(curl_sys::CURLINFO_APPCONNECT_TIME)
++            .map(double_seconds_to_duration)
++    }
++
++    /// Get the time until the file transfer start
++    ///
++    /// Returns the total time it took from the start until the file
++    /// transfer is just about to begin. This includes all pre-transfer commands
++    /// and negotiations that are specific to the particular protocol(s) involved.
++    /// It does not involve the sending of the protocol- specific request that
++    /// triggers a transfer.
++    ///
++    /// Corresponds to `CURLINFO_PRETRANSFER_TIME` and may return an error if the
++    /// option isn't supported.
++    pub fn pretransfer_time(&mut self) -> Result<Duration, Error> {
++        self.getopt_double(curl_sys::CURLINFO_PRETRANSFER_TIME)
++            .map(double_seconds_to_duration)
++    }
++
++    /// Get the time until the first byte is received
++    ///
++    /// Returns the total time it took from the start until the first
++    /// byte is received by libcurl. This includes `pretransfer_time` and
++    /// also the time the server needs to calculate the result.
++    ///
++    /// Corresponds to `CURLINFO_STARTTRANSFER_TIME` and may return an error if the
++    /// option isn't supported.
++    pub fn starttransfer_time(&mut self) -> Result<Duration, Error> {
++        self.getopt_double(curl_sys::CURLINFO_STARTTRANSFER_TIME)
++            .map(double_seconds_to_duration)
++    }
++
++    /// Get the time for all redirection steps
++    ///
++    /// Returns the total time it took for all redirection steps
++    /// include name lookup, connect, pretransfer and transfer before final
++    /// transaction was started. `redirect_time` contains the complete
++    /// execution time for multiple redirections.
++    ///
++    /// Corresponds to `CURLINFO_REDIRECT_TIME` and may return an error if the
++    /// option isn't supported.
++    pub fn redirect_time(&mut self) -> Result<Duration, Error> {
++        self.getopt_double(curl_sys::CURLINFO_REDIRECT_TIME)
++            .map(double_seconds_to_duration)
++    }
++
++    /// Get the number of redirects
++    ///
++    /// Corresponds to `CURLINFO_REDIRECT_COUNT` and may return an error if the
++    /// option isn't supported.
++    pub fn redirect_count(&mut self) -> Result<u32, Error> {
++        self.getopt_long(curl_sys::CURLINFO_REDIRECT_COUNT).map(|c| c as u32)
++    }
++
++    /// Get the URL a redirect would go to
++    ///
++    /// Returns the URL a redirect would take you to if you would enable
++    /// `follow_location`. This can come very handy if you think using the
++    /// built-in libcurl redirect logic isn't good enough for you but you would
++    /// still prefer to avoid implementing all the magic of figuring out the new
++    /// URL.
++    ///
++    /// Corresponds to `CURLINFO_REDIRECT_URL` and may return an error if the
++    /// url isn't valid utf-8 or an error happens.
++    pub fn redirect_url(&mut self) -> Result<Option<&str>, Error> {
++        self.getopt_str(curl_sys::CURLINFO_REDIRECT_URL)
++    }
++
++    /// Get the URL a redirect would go to, in bytes
++    ///
++    /// Returns the URL a redirect would take you to if you would enable
++    /// `follow_location`. This can come very handy if you think using the
++    /// built-in libcurl redirect logic isn't good enough for you but you would
++    /// still prefer to avoid implementing all the magic of figuring out the new
++    /// URL.
++    ///
++    /// Corresponds to `CURLINFO_REDIRECT_URL` and may return an error.
++    pub fn redirect_url_bytes(&mut self) -> Result<Option<&[u8]>, Error> {
++        self.getopt_bytes(curl_sys::CURLINFO_REDIRECT_URL)
++    }
++
++    /// Get size of retrieved headers
++    ///
++    /// Corresponds to `CURLINFO_HEADER_SIZE` and may return an error if the
++    /// option isn't supported.
++    pub fn header_size(&mut self) -> Result<u64, Error> {
++        self.getopt_long(curl_sys::CURLINFO_HEADER_SIZE).map(|c| c as u64)
++    }
++
++    /// Get size of sent request.
++    ///
++    /// Corresponds to `CURLINFO_REQUEST_SIZE` and may return an error if the
++    /// option isn't supported.
++    pub fn request_size(&mut self) -> Result<u64, Error> {
++        self.getopt_long(curl_sys::CURLINFO_REQUEST_SIZE).map(|c| c as u64)
++    }
++
++    /// Get Content-Type
++    ///
++    /// Returns the content-type of the downloaded object. This is the value
++    /// read from the Content-Type: field.  If you get `None`, it means that the
++    /// server didn't send a valid Content-Type header or that the protocol
++    /// used doesn't support this.
++    ///
++    /// Corresponds to `CURLINFO_CONTENT_TYPE` and may return an error if the
++    /// option isn't supported.
++    pub fn content_type(&mut self) -> Result<Option<&str>, Error> {
++        self.getopt_str(curl_sys::CURLINFO_CONTENT_TYPE)
++    }
++
++    /// Get Content-Type, in bytes
++    ///
++    /// Returns the content-type of the downloaded object. This is the value
++    /// read from the Content-Type: field.  If you get `None`, it means that the
++    /// server didn't send a valid Content-Type header or that the protocol
++    /// used doesn't support this.
++    ///
++    /// Corresponds to `CURLINFO_CONTENT_TYPE` and may return an error if the
++    /// option isn't supported.
++    pub fn content_type_bytes(&mut self) -> Result<Option<&[u8]>, Error> {
++        self.getopt_bytes(curl_sys::CURLINFO_CONTENT_TYPE)
++    }
++
++    /// Get errno number from last connect failure.
++    ///
++    /// Note that the value is only set on failure, it is not reset upon a
++    /// successful operation. The number is OS and system specific.
++    ///
++    /// Corresponds to `CURLINFO_OS_ERRNO` and may return an error if the
++    /// option isn't supported.
++    pub fn os_errno(&mut self) -> Result<i32, Error> {
++        self.getopt_long(curl_sys::CURLINFO_OS_ERRNO).map(|c| c as i32)
++    }
++
++    /// Get IP address of last connection.
++    ///
++    /// Returns a string holding the IP address of the most recent connection
++    /// done with this curl handle. This string may be IPv6 when that is
++    /// enabled.
++    ///
++    /// Corresponds to `CURLINFO_PRIMARY_IP` and may return an error if the
++    /// option isn't supported.
++    pub fn primary_ip(&mut self) -> Result<Option<&str>, Error> {
++        self.getopt_str(curl_sys::CURLINFO_PRIMARY_IP)
++    }
++
++    /// Get the latest destination port number
++    ///
++    /// Corresponds to `CURLINFO_PRIMARY_PORT` and may return an error if the
++    /// option isn't supported.
++    pub fn primary_port(&mut self) -> Result<u16, Error> {
++        self.getopt_long(curl_sys::CURLINFO_PRIMARY_PORT).map(|c| c as u16)
++    }
++
++    /// Get local IP address of last connection
++    ///
++    /// Returns a string holding the IP address of the local end of most recent
++    /// connection done with this curl handle. This string may be IPv6 when that
++    /// is enabled.
++    ///
++    /// Corresponds to `CURLINFO_LOCAL_IP` and may return an error if the
++    /// option isn't supported.
++    pub fn local_ip(&mut self) -> Result<Option<&str>, Error> {
++        self.getopt_str(curl_sys::CURLINFO_LOCAL_IP)
++    }
++
++    /// Get the latest local port number
++    ///
++    /// Corresponds to `CURLINFO_LOCAL_PORT` and may return an error if the
++    /// option isn't supported.
++    pub fn local_port(&mut self) -> Result<u16, Error> {
++        self.getopt_long(curl_sys::CURLINFO_LOCAL_PORT).map(|c| c as u16)
++    }
++
++    /// Get all known cookies
++    ///
++    /// Returns a linked-list of all cookies cURL knows (expired ones, too).
++    ///
++    /// Corresponds to the `CURLINFO_COOKIELIST` option and may return an error
++    /// if the option isn't supported.
++    pub fn cookies(&mut self) -> Result<List, Error> {
++        unsafe {
++            let mut list = 0 as *mut _;
++            let rc = curl_sys::curl_easy_getinfo(self.inner.handle,
++                                                 curl_sys::CURLINFO_COOKIELIST,
++                                                 &mut list);
++            try!(self.cvt(rc));
++            Ok(list::from_raw(list))
++        }
++    }
++
++    // =========================================================================
++    // Other methods
++
++    /// After options have been set, this will perform the transfer described by
++    /// the options.
++    ///
++    /// This performs the request in a synchronous fashion. This can be used
++    /// multiple times for one easy handle and libcurl will attempt to re-use
++    /// the same connection for all transfers.
++    ///
++    /// This method will preserve all options configured in this handle for the
++    /// next request, and if that is not desired then the options can be
++    /// manually reset or the `reset` method can be called.
++    ///
++    /// Note that this method takes `&self`, which is quite important! This
++    /// allows applications to close over the handle in various callbacks to
++    /// call methods like `unpause_write` and `unpause_read` while a transfer is
++    /// in progress.
++    pub fn perform(&self) -> Result<(), Error> {
++        let ret = unsafe {
++            self.cvt(curl_sys::curl_easy_perform(self.inner.handle))
++        };
++        panic::propagate();
++        return ret
++    }
++
++    /// Unpause reading on a connection.
++    ///
++    /// Using this function, you can explicitly unpause a connection that was
++    /// previously paused.
++    ///
++    /// A connection can be paused by letting the read or the write callbacks
++    /// return `ReadError::Pause` or `WriteError::Pause`.
++    ///
++    /// To unpause, you may for example call this from the progress callback
++    /// which gets called at least once per second, even if the connection is
++    /// paused.
++    ///
++    /// The chance is high that you will get your write callback called before
++    /// this function returns.
++    pub fn unpause_read(&self) -> Result<(), Error> {
++        unsafe {
++            let rc = curl_sys::curl_easy_pause(self.inner.handle,
++                                               curl_sys::CURLPAUSE_RECV_CONT);
++            self.cvt(rc)
++        }
++    }
++
++    /// Unpause writing on a connection.
++    ///
++    /// Using this function, you can explicitly unpause a connection that was
++    /// previously paused.
++    ///
++    /// A connection can be paused by letting the read or the write callbacks
++    /// return `ReadError::Pause` or `WriteError::Pause`. A write callback that
++    /// returns pause signals to the library that it couldn't take care of any
++    /// data at all, and that data will then be delivered again to the callback
++    /// when the writing is later unpaused.
++    ///
++    /// To unpause, you may for example call this from the progress callback
++    /// which gets called at least once per second, even if the connection is
++    /// paused.
++    pub fn unpause_write(&self) -> Result<(), Error> {
++        unsafe {
++            let rc = curl_sys::curl_easy_pause(self.inner.handle,
++                                               curl_sys::CURLPAUSE_SEND_CONT);
++            self.cvt(rc)
++        }
++    }
++
++    /// URL encodes a string `s`
++    pub fn url_encode(&mut self, s: &[u8]) -> String {
++        if s.len() == 0 {
++            return String::new()
++        }
++        unsafe {
++            let p = curl_sys::curl_easy_escape(self.inner.handle,
++                                               s.as_ptr() as *const _,
++                                               s.len() as c_int);
++            assert!(!p.is_null());
++            let ret = str::from_utf8(CStr::from_ptr(p).to_bytes()).unwrap();
++            let ret = String::from(ret);
++            curl_sys::curl_free(p as *mut _);
++            return ret
++        }
++    }
++
++    /// URL decodes a string `s`, returning `None` if it fails
++    pub fn url_decode(&mut self, s: &str) -> Vec<u8> {
++        if s.len() == 0 {
++            return Vec::new();
++        }
++
++        // Work around https://curl.haxx.se/docs/adv_20130622.html, a bug where
++        // if the last few characters are a bad escape then curl will have a
++        // buffer overrun.
++        let mut iter = s.chars().rev();
++        let orig_len = s.len();
++        let mut data;
++        let mut s = s;
++        if iter.next() == Some('%') ||
++           iter.next() == Some('%') ||
++           iter.next() == Some('%') {
++            data = s.to_string();
++            data.push(0u8 as char);
++            s = &data[..];
++        }
++        unsafe {
++            let mut len = 0;
++            let p = curl_sys::curl_easy_unescape(self.inner.handle,
++                                                 s.as_ptr() as *const _,
++                                                 orig_len as c_int,
++                                                 &mut len);
++            assert!(!p.is_null());
++            let slice = slice::from_raw_parts(p as *const u8, len as usize);
++            let ret = slice.to_vec();
++            curl_sys::curl_free(p as *mut _);
++            return ret
++        }
++    }
++
++    // TODO: I don't think this is safe, you can drop this which has all the
++    //       callback data and then the next is use-after-free
++    //
++    // /// Attempts to clone this handle, returning a new session handle with the
++    // /// same options set for this handle.
++    // ///
++    // /// Internal state info and things like persistent connections ccannot be
++    // /// transferred.
++    // ///
++    // /// # Errors
++    // ///
++    // /// If a new handle could not be allocated or another error happens, `None`
++    // /// is returned.
++    // pub fn try_clone<'b>(&mut self) -> Option<Easy<'b>> {
++    //     unsafe {
++    //         let handle = curl_sys::curl_easy_duphandle(self.handle);
++    //         if handle.is_null() {
++    //             None
++    //         } else {
++    //             Some(Easy {
++    //                 handle: handle,
++    //                 data: blank_data(),
++    //                 _marker: marker::PhantomData,
++    //             })
++    //         }
++    //     }
++    // }
++
++    /// Receives data from a connected socket.
++    ///
++    /// Only useful after a successful `perform` with the `connect_only` option
++    /// set as well.
++    pub fn recv(&mut self, data: &mut [u8]) -> Result<usize, Error> {
++        unsafe {
++            let mut n = 0;
++            let r = curl_sys::curl_easy_recv(self.inner.handle,
++                                             data.as_mut_ptr() as *mut _,
++                                             data.len(),
++                                             &mut n);
++            if r == curl_sys::CURLE_OK {
++                Ok(n)
++            } else {
++                Err(Error::new(r))
++            }
++        }
++    }
++
++    /// Sends data over the connected socket.
++    ///
++    /// Only useful after a successful `perform` with the `connect_only` option
++    /// set as well.
++    pub fn send(&mut self, data: &[u8]) -> Result<usize, Error> {
++        unsafe {
++            let mut n = 0;
++            let rc = curl_sys::curl_easy_send(self.inner.handle,
++                                              data.as_ptr() as *const _,
++                                              data.len(),
++                                              &mut n);
++            try!(self.cvt(rc));
++            Ok(n)
++        }
++    }
++
++    /// Get a pointer to the raw underlying CURL handle.
++    pub fn raw(&self) -> *mut curl_sys::CURL {
++        self.inner.handle
++    }
++
++    #[cfg(unix)]
++    fn setopt_path(&mut self,
++                   opt: curl_sys::CURLoption,
++                   val: &Path) -> Result<(), Error> {
++        use std::os::unix::prelude::*;
++        let s = try!(CString::new(val.as_os_str().as_bytes()));
++        self.setopt_str(opt, &s)
++    }
++
++    #[cfg(windows)]
++    fn setopt_path(&mut self,
++                   opt: curl_sys::CURLoption,
++                   val: &Path) -> Result<(), Error> {
++        match val.to_str() {
++            Some(s) => self.setopt_str(opt, &try!(CString::new(s))),
++            None => Err(Error::new(curl_sys::CURLE_CONV_FAILED)),
++        }
++    }
++
++    fn setopt_long(&mut self,
++                   opt: curl_sys::CURLoption,
++                   val: c_long) -> Result<(), Error> {
++        unsafe {
++            self.cvt(curl_sys::curl_easy_setopt(self.inner.handle, opt, val))
++        }
++    }
++
++    fn setopt_str(&mut self,
++                  opt: curl_sys::CURLoption,
++                  val: &CStr) -> Result<(), Error> {
++        self.setopt_ptr(opt, val.as_ptr())
++    }
++
++    fn setopt_ptr(&self,
++                  opt: curl_sys::CURLoption,
++                  val: *const c_char) -> Result<(), Error> {
++        unsafe {
++            self.cvt(curl_sys::curl_easy_setopt(self.inner.handle, opt, val))
++        }
++    }
++
++    fn setopt_off_t(&mut self,
++                    opt: curl_sys::CURLoption,
++                    val: curl_sys::curl_off_t) -> Result<(), Error> {
++        unsafe {
++            let rc = curl_sys::curl_easy_setopt(self.inner.handle, opt, val);
++            self.cvt(rc)
++        }
++    }
++
++    fn getopt_bytes(&mut self, opt: curl_sys::CURLINFO)
++                    -> Result<Option<&[u8]>, Error> {
++        unsafe {
++            let p = try!(self.getopt_ptr(opt));
++            if p.is_null() {
++                Ok(None)
++            } else {
++                Ok(Some(CStr::from_ptr(p).to_bytes()))
++            }
++        }
++    }
++
++    fn getopt_ptr(&mut self, opt: curl_sys::CURLINFO)
++                  -> Result<*const c_char, Error> {
++        unsafe {
++            let mut p = 0 as *const c_char;
++            let rc = curl_sys::curl_easy_getinfo(self.inner.handle, opt, &mut p);
++            try!(self.cvt(rc));
++            Ok(p)
++        }
++    }
++
++    fn getopt_str(&mut self, opt: curl_sys::CURLINFO)
++                    -> Result<Option<&str>, Error> {
++        match self.getopt_bytes(opt) {
++            Ok(None) => Ok(None),
++            Err(e) => Err(e),
++            Ok(Some(bytes)) => {
++                match str::from_utf8(bytes) {
++                    Ok(s) => Ok(Some(s)),
++                    Err(_) => Err(Error::new(curl_sys::CURLE_CONV_FAILED)),
++                }
++            }
++        }
++    }
++
++    fn getopt_long(&mut self, opt: curl_sys::CURLINFO) -> Result<c_long, Error> {
++        unsafe {
++            let mut p = 0;
++            let rc = curl_sys::curl_easy_getinfo(self.inner.handle, opt, &mut p);
++            try!(self.cvt(rc));
++            Ok(p)
++        }
++    }
++
++    fn getopt_double(&mut self, opt: curl_sys::CURLINFO) -> Result<c_double, Error> {
++        unsafe {
++            let mut p = 0 as c_double;
++            let rc = curl_sys::curl_easy_getinfo(self.inner.handle, opt, &mut p);
++            try!(self.cvt(rc));
++            Ok(p)
++        }
++    }
++
++    fn cvt(&self, rc: curl_sys::CURLcode) -> Result<(), Error> {
++        if rc == curl_sys::CURLE_OK {
++            return Ok(())
++        }
++        let mut buf = self.inner.error_buf.borrow_mut();
++        if buf[0] == 0 {
++            return Err(Error::new(rc))
++        }
++        let pos = buf.iter().position(|i| *i == 0).unwrap_or(buf.len());
++        let msg = String::from_utf8_lossy(&buf[..pos]).into_owned();
++        buf[0] = 0;
++        Err(::error::error_with_extra(rc, msg.into_boxed_str()))
++    }
++}
++
++impl<H: fmt::Debug> fmt::Debug for Easy2<H> {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.debug_struct("Easy")
++         .field("handle", &self.inner.handle)
++         .field("handler", &self.inner.handle)
++         .finish()
++    }
++}
++
++impl<H> Drop for Easy2<H> {
++    fn drop(&mut self) {
++        unsafe {
++            curl_sys::curl_easy_cleanup(self.inner.handle);
++        }
++    }
++}
++
++extern fn header_cb<H: Handler>(buffer: *mut c_char,
++                                size: size_t,
++                                nitems: size_t,
++                                userptr: *mut c_void) -> size_t {
++    let keep_going = panic::catch(|| unsafe {
++        let data = slice::from_raw_parts(buffer as *const u8,
++                                         size * nitems);
++        (*(userptr as *mut Inner<H>)).handler.header(data)
++    }).unwrap_or(false);
++    if keep_going {
++        size * nitems
++    } else {
++        !0
++    }
++}
++
++extern fn write_cb<H: Handler>(ptr: *mut c_char,
++                               size: size_t,
++                               nmemb: size_t,
++                               data: *mut c_void) -> size_t {
++    panic::catch(|| unsafe {
++        let input = slice::from_raw_parts(ptr as *const u8,
++                                          size * nmemb);
++        match (*(data as *mut Inner<H>)).handler.write(input) {
++            Ok(s) => s,
++            Err(WriteError::Pause) |
++            Err(WriteError::__Nonexhaustive) => curl_sys::CURL_WRITEFUNC_PAUSE,
++        }
++    }).unwrap_or(!0)
++}
++
++extern fn read_cb<H: Handler>(ptr: *mut c_char,
++                              size: size_t,
++                              nmemb: size_t,
++                              data: *mut c_void) -> size_t {
++    panic::catch(|| unsafe {
++        let input = slice::from_raw_parts_mut(ptr as *mut u8,
++                                              size * nmemb);
++        match (*(data as *mut Inner<H>)).handler.read(input) {
++            Ok(s) => s,
++            Err(ReadError::Pause) => {
++                curl_sys::CURL_READFUNC_PAUSE
++            }
++            Err(ReadError::__Nonexhaustive) |
++            Err(ReadError::Abort) => {
++                curl_sys::CURL_READFUNC_ABORT
++            }
++        }
++    }).unwrap_or(!0)
++}
++
++extern fn seek_cb<H: Handler>(data: *mut c_void,
++                              offset: curl_sys::curl_off_t,
++                              origin: c_int) -> c_int {
++    panic::catch(|| unsafe {
++        let from = if origin == libc::SEEK_SET {
++            SeekFrom::Start(offset as u64)
++        } else {
++            panic!("unknown origin from libcurl: {}", origin);
++        };
++        (*(data as *mut Inner<H>)).handler.seek(from) as c_int
++    }).unwrap_or(!0)
++}
++
++extern fn progress_cb<H: Handler>(data: *mut c_void,
++                                  dltotal: c_double,
++                                  dlnow: c_double,
++                                  ultotal: c_double,
++                                  ulnow: c_double) -> c_int {
++    let keep_going = panic::catch(|| unsafe {
++        (*(data as *mut Inner<H>)).handler.progress(dltotal, dlnow, ultotal, ulnow)
++    }).unwrap_or(false);
++    if keep_going {
++        0
++    } else {
++        1
++    }
++}
++
++// TODO: expose `handle`? is that safe?
++extern fn debug_cb<H: Handler>(_handle: *mut curl_sys::CURL,
++                               kind: curl_sys::curl_infotype,
++                               data: *mut c_char,
++                               size: size_t,
++                               userptr: *mut c_void) -> c_int {
++    panic::catch(|| unsafe {
++        let data = slice::from_raw_parts(data as *const u8, size);
++        let kind = match kind {
++            curl_sys::CURLINFO_TEXT => InfoType::Text,
++            curl_sys::CURLINFO_HEADER_IN => InfoType::HeaderIn,
++            curl_sys::CURLINFO_HEADER_OUT => InfoType::HeaderOut,
++            curl_sys::CURLINFO_DATA_IN => InfoType::DataIn,
++            curl_sys::CURLINFO_DATA_OUT => InfoType::DataOut,
++            curl_sys::CURLINFO_SSL_DATA_IN => InfoType::SslDataIn,
++            curl_sys::CURLINFO_SSL_DATA_OUT => InfoType::SslDataOut,
++            _ => return,
++        };
++        (*(userptr as *mut Inner<H>)).handler.debug(kind, data)
++    });
++    return 0
++}
++
++extern fn ssl_ctx_cb<H: Handler>(_handle: *mut curl_sys::CURL,
++                                 ssl_ctx: *mut c_void,
++                                 data: *mut c_void) -> curl_sys::CURLcode {
++    let res = panic::catch(|| unsafe {
++        match (*(data as *mut Inner<H>)).handler.ssl_ctx(ssl_ctx) {
++            Ok(()) => curl_sys::CURLE_OK,
++            Err(e) => e.code(),
++        }
++    });
++    // Default to a generic SSL error in case of panic. This
++    // shouldn't really matter since the error should be
++    // propagated later on but better safe than sorry...
++    res.unwrap_or(curl_sys::CURLE_SSL_CONNECT_ERROR)
++}
++
++// TODO: expose `purpose` and `sockaddr` inside of `address`
++extern fn opensocket_cb<H: Handler>(data: *mut c_void,
++                                    _purpose: curl_sys::curlsocktype,
++                                    address: *mut curl_sys::curl_sockaddr)
++    -> curl_sys::curl_socket_t
++{
++    let res = panic::catch(|| unsafe {
++        (*(data as *mut Inner<H>)).handler.open_socket((*address).family,
++                                                       (*address).socktype,
++                                                       (*address).protocol)
++            .unwrap_or(curl_sys::CURL_SOCKET_BAD)
++    });
++    res.unwrap_or(curl_sys::CURL_SOCKET_BAD)
++}
++
++fn double_seconds_to_duration(seconds: f64) -> Duration {
++    let whole_seconds = seconds.trunc() as u64;
++    let nanos = seconds.fract() * 1_000_000_000f64;
++    Duration::new(whole_seconds, nanos as u32)
++}
++
++#[test]
++fn double_seconds_to_duration_whole_second() {
++    let dur = double_seconds_to_duration(1.0);
++    assert_eq!(dur.as_secs(), 1);
++    assert_eq!(dur.subsec_nanos(), 0);
++}
++
++#[test]
++fn double_seconds_to_duration_sub_second1() {
++    let dur = double_seconds_to_duration(0.0);
++    assert_eq!(dur.as_secs(), 0);
++    assert_eq!(dur.subsec_nanos(), 0);
++}
++
++#[test]
++fn double_seconds_to_duration_sub_second2() {
++    let dur = double_seconds_to_duration(0.5);
++    assert_eq!(dur.as_secs(), 0);
++    assert_eq!(dur.subsec_nanos(), 500_000_000);
++}
++
++impl Auth {
++    /// Creates a new set of authentications with no members.
++    ///
++    /// An `Auth` structure is used to configure which forms of authentication
++    /// are attempted when negotiating connections with servers.
++    pub fn new() -> Auth {
++        Auth { bits: 0 }
++    }
++
++    /// HTTP Basic authentication.
++    ///
++    /// This is the default choice, and the only method that is in wide-spread
++    /// use and supported virtually everywhere.  This sends the user name and
++    /// password over the network in plain text, easily captured by others.
++    pub fn basic(&mut self, on: bool) -> &mut Auth {
++        self.flag(curl_sys::CURLAUTH_BASIC, on)
++    }
++
++    /// HTTP Digest authentication.
++    ///
++    /// Digest authentication is defined in RFC 2617 and is a more secure way to
++    /// do authentication over public networks than the regular old-fashioned
++    /// Basic method.
++    pub fn digest(&mut self, on: bool) -> &mut Auth {
++        self.flag(curl_sys::CURLAUTH_DIGEST, on)
++    }
++
++    /// HTTP Digest authentication with an IE flavor.
++    ///
++    /// Digest authentication is defined in RFC 2617 and is a more secure way to
++    /// do authentication over public networks than the regular old-fashioned
++    /// Basic method. The IE flavor is simply that libcurl will use a special
++    /// "quirk" that IE is known to have used before version 7 and that some
++    /// servers require the client to use.
++    pub fn digest_ie(&mut self, on: bool) -> &mut Auth {
++        self.flag(curl_sys::CURLAUTH_DIGEST_IE, on)
++    }
++
++    /// HTTP Negotiate (SPNEGO) authentication.
++    ///
++    /// Negotiate authentication is defined in RFC 4559 and is the most secure
++    /// way to perform authentication over HTTP.
++    ///
++    /// You need to build libcurl with a suitable GSS-API library or SSPI on
++    /// Windows for this to work.
++    pub fn gssnegotiate(&mut self, on: bool) -> &mut Auth {
++        self.flag(curl_sys::CURLAUTH_GSSNEGOTIATE, on)
++    }
++
++    /// HTTP NTLM authentication.
++    ///
++    /// A proprietary protocol invented and used by Microsoft. It uses a
++    /// challenge-response and hash concept similar to Digest, to prevent the
++    /// password from being eavesdropped.
++    ///
++    /// You need to build libcurl with either OpenSSL, GnuTLS or NSS support for
++    /// this option to work, or build libcurl on Windows with SSPI support.
++    pub fn ntlm(&mut self, on: bool) -> &mut Auth {
++        self.flag(curl_sys::CURLAUTH_NTLM, on)
++    }
++
++    /// NTLM delegating to winbind helper.
++    ///
++    /// Authentication is performed by a separate binary application that is
++    /// executed when needed. The name of the application is specified at
++    /// compile time but is typically /usr/bin/ntlm_auth
++    ///
++    /// Note that libcurl will fork when necessary to run the winbind
++    /// application and kill it when complete, calling waitpid() to await its
++    /// exit when done. On POSIX operating systems, killing the process will
++    /// cause a SIGCHLD signal to be raised (regardless of whether
++    /// CURLOPT_NOSIGNAL is set), which must be handled intelligently by the
++    /// application. In particular, the application must not unconditionally
++    /// call wait() in its SIGCHLD signal handler to avoid being subject to a
++    /// race condition. This behavior is subject to change in future versions of
++    /// libcurl.
++    ///
++    /// A proprietary protocol invented and used by Microsoft. It uses a
++    /// challenge-response and hash concept similar to Digest, to prevent the
++    /// password from being eavesdropped.
++    pub fn ntlm_wb(&mut self, on: bool) -> &mut Auth {
++        self.flag(curl_sys::CURLAUTH_NTLM_WB, on)
++    }
++
++    fn flag(&mut self, bit: c_ulong, on: bool) -> &mut Auth {
++        if on {
++            self.bits |= bit as c_long;
++        } else {
++            self.bits &= !bit as c_long;
++        }
++        self
++    }
++}
++
++impl fmt::Debug for Auth {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        let bits = self.bits as c_ulong;
++        f.debug_struct("Auth")
++         .field("basic", &(bits & curl_sys::CURLAUTH_BASIC != 0))
++         .field("digest", &(bits & curl_sys::CURLAUTH_DIGEST != 0))
++         .field("digest_ie", &(bits & curl_sys::CURLAUTH_DIGEST_IE != 0))
++         .field("gssnegotiate", &(bits & curl_sys::CURLAUTH_GSSNEGOTIATE != 0))
++         .field("ntlm", &(bits & curl_sys::CURLAUTH_NTLM != 0))
++         .field("ntlm_wb", &(bits & curl_sys::CURLAUTH_NTLM_WB != 0))
++         .finish()
++    }
++}
++
++impl SslOpt {
++    /// Creates a new set of SSL options.
++    pub fn new() -> SslOpt {
++        SslOpt { bits: 0 }
++    }
++
++    /// Tells libcurl to disable certificate revocation checks for those SSL
++    /// backends where such behavior is present.
++    ///
++    /// Currently this option is only supported for WinSSL (the native Windows
++    /// SSL library), with an exception in the case of Windows' Untrusted
++    /// Publishers blacklist which it seems can't be bypassed. This option may
++    /// have broader support to accommodate other SSL backends in the future.
++    /// https://curl.haxx.se/docs/ssl-compared.html
++    pub fn no_revoke(&mut self, on: bool) -> &mut SslOpt {
++        self.flag(curl_sys::CURLSSLOPT_NO_REVOKE, on)
++    }
++
++    /// Tells libcurl to not attempt to use any workarounds for a security flaw
++    /// in the SSL3 and TLS1.0 protocols.
++    ///
++    /// If this option isn't used or this bit is set to 0, the SSL layer libcurl
++    /// uses may use a work-around for this flaw although it might cause
++    /// interoperability problems with some (older) SSL implementations.
++    ///
++    /// > WARNING: avoiding this work-around lessens the security, and by
++    /// > setting this option to 1 you ask for exactly that. This option is only
++    /// > supported for DarwinSSL, NSS and OpenSSL.
++    pub fn allow_beast(&mut self, on: bool) -> &mut SslOpt {
++        self.flag(curl_sys::CURLSSLOPT_ALLOW_BEAST, on)
++    }
++
++    fn flag(&mut self, bit: c_long, on: bool) -> &mut SslOpt {
++        if on {
++            self.bits |= bit as c_long;
++        } else {
++            self.bits &= !bit as c_long;
++        }
++        self
++    }
++}
++
++impl fmt::Debug for SslOpt {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.debug_struct("SslOpt")
++         .field("no_revoke", &(self.bits & curl_sys::CURLSSLOPT_NO_REVOKE != 0))
++         .field("allow_beast", &(self.bits & curl_sys::CURLSSLOPT_ALLOW_BEAST != 0))
++         .finish()
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..732d006393dbecee580ad32ed4db885433137823
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,99 @@@
++use std::ffi::{CStr, CString};
++use std::fmt;
++
++use curl_sys;
++use Error;
++
++/// A linked list of a strings
++pub struct List {
++    raw: *mut curl_sys::curl_slist,
++}
++
++/// An iterator over `List`
++#[derive(Clone)]
++pub struct Iter<'a> {
++    _me: &'a List,
++    cur: *mut curl_sys::curl_slist,
++}
++
++pub fn raw(list: &List) -> *mut curl_sys::curl_slist {
++    list.raw
++}
++
++pub unsafe fn from_raw(raw: *mut curl_sys::curl_slist) -> List {
++    List { raw: raw }
++}
++
++unsafe impl Send for List {}
++
++impl List {
++    /// Creates a new empty list of strings.
++    pub fn new() -> List {
++        List { raw: 0 as *mut _ }
++    }
++
++    /// Appends some data into this list.
++    pub fn append(&mut self, data: &str) -> Result<(), Error> {
++        let data = try!(CString::new(data));
++        unsafe {
++            let raw = curl_sys::curl_slist_append(self.raw, data.as_ptr());
++            assert!(!raw.is_null());
++            self.raw = raw;
++            Ok(())
++        }
++    }
++
++    /// Returns an iterator over the nodes in this list.
++    pub fn iter(&self) -> Iter {
++        Iter { _me: self, cur: self.raw }
++    }
++}
++
++impl fmt::Debug for List {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.debug_list()
++         .entries(self.iter().map(String::from_utf8_lossy))
++         .finish()
++    }
++}
++
++impl<'a> IntoIterator for &'a List {
++    type IntoIter = Iter<'a>;
++    type Item = &'a [u8];
++
++    fn into_iter(self) -> Iter<'a> {
++        self.iter()
++    }
++}
++
++impl Drop for List {
++    fn drop(&mut self) {
++        unsafe {
++            curl_sys::curl_slist_free_all(self.raw)
++        }
++    }
++}
++
++impl<'a> Iterator for Iter<'a> {
++    type Item = &'a [u8];
++
++    fn next(&mut self) -> Option<&'a [u8]> {
++        if self.cur.is_null() {
++            return None
++        }
++
++        unsafe {
++            let ret = Some(CStr::from_ptr((*self.cur).data).to_bytes());
++            self.cur = (*self.cur).next;
++            return ret
++        }
++    }
++}
++
++impl<'a> fmt::Debug for Iter<'a> {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.debug_list()
++         .entries(self.clone().map(String::from_utf8_lossy))
++         .finish()
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a13df134eb81388e961711a8f00d34ee65595c10
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++//! Bindings to the "easy" libcurl API.
++//!
++//! This module contains some simple types like `Easy` and `List` which are just
++//! wrappers around the corresponding libcurl types. There's also a few enums
++//! scattered about for various options here and there.
++//!
++//! Most simple usage of libcurl will likely use the `Easy` structure here, and
++//! you can find more docs about its usage on that struct.
++
++mod list;
++mod form;
++mod handle;
++mod handler;
++
++pub use self::list::{List, Iter};
++pub use self::form::{Form, Part};
++pub use self::handle::{Easy, Transfer};
++pub use self::handler::{Easy2, Handler};
++pub use self::handler::{InfoType, SeekResult, ReadError, WriteError};
++pub use self::handler::{TimeCondition, IpResolve, HttpVersion, SslVersion};
++pub use self::handler::{SslOpt, NetRc, Auth, ProxyType};
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8dacc2b494146dc999630ac503a34cb9b672c7d9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,598 @@@
++use std::error;
++use std::ffi::{self, CStr};
++use std::fmt;
++use std::str;
++use std::io;
++
++use curl_sys;
++
++/// An error returned from various "easy" operations.
++///
++/// This structure wraps a `CURLcode`.
++#[derive(Clone, PartialEq)]
++pub struct Error {
++    code: curl_sys::CURLcode,
++    extra: Option<Box<str>>,
++}
++
++pub fn error_with_extra(code: curl_sys::CURLcode, extra: Box<str>) -> Error {
++    Error {
++        code: code,
++        extra: Some(extra),
++    }
++}
++
++impl Error {
++    /// Creates a new error from the underlying code returned by libcurl.
++    pub fn new(code: curl_sys::CURLcode) -> Error {
++        Error {
++            code: code,
++            extra: None,
++        }
++    }
++
++    /// Returns whether this error corresponds to CURLE_UNSUPPORTED_PROTOCOL.
++    pub fn is_unsupported_protocol(&self) -> bool {
++        self.code == curl_sys::CURLE_UNSUPPORTED_PROTOCOL
++    }
++
++    /// Returns whether this error corresponds to CURLE_FAILED_INIT.
++    pub fn is_failed_init(&self) -> bool {
++        self.code == curl_sys::CURLE_FAILED_INIT
++    }
++
++    /// Returns whether this error corresponds to CURLE_URL_MALFORMAT.
++    pub fn is_url_malformed(&self) -> bool {
++        self.code == curl_sys::CURLE_URL_MALFORMAT
++    }
++
++    // /// Returns whether this error corresponds to CURLE_NOT_BUILT_IN.
++    // pub fn is_not_built_in(&self) -> bool {
++    //     self.code == curl_sys::CURLE_NOT_BUILT_IN
++    // }
++
++    /// Returns whether this error corresponds to CURLE_COULDNT_RESOLVE_PROXY.
++    pub fn is_couldnt_resolve_proxy(&self) -> bool {
++        self.code == curl_sys::CURLE_COULDNT_RESOLVE_PROXY
++    }
++
++    /// Returns whether this error corresponds to CURLE_COULDNT_RESOLVE_HOST.
++    pub fn is_couldnt_resolve_host(&self) -> bool {
++        self.code == curl_sys::CURLE_COULDNT_RESOLVE_HOST
++    }
++
++    /// Returns whether this error corresponds to CURLE_COULDNT_CONNECT.
++    pub fn is_couldnt_connect(&self) -> bool {
++        self.code == curl_sys::CURLE_COULDNT_CONNECT
++    }
++
++    /// Returns whether this error corresponds to CURLE_REMOTE_ACCESS_DENIED.
++    pub fn is_remote_access_denied(&self) -> bool {
++        self.code == curl_sys::CURLE_REMOTE_ACCESS_DENIED
++    }
++
++    /// Returns whether this error corresponds to CURLE_PARTIAL_FILE.
++    pub fn is_partial_file(&self) -> bool {
++        self.code == curl_sys::CURLE_PARTIAL_FILE
++    }
++
++    /// Returns whether this error corresponds to CURLE_QUOTE_ERROR.
++    pub fn is_quote_error(&self) -> bool {
++        self.code == curl_sys::CURLE_QUOTE_ERROR
++    }
++
++    /// Returns whether this error corresponds to CURLE_HTTP_RETURNED_ERROR.
++    pub fn is_http_returned_error(&self) -> bool {
++        self.code == curl_sys::CURLE_HTTP_RETURNED_ERROR
++    }
++
++    /// Returns whether this error corresponds to CURLE_READ_ERROR.
++    pub fn is_read_error(&self) -> bool {
++        self.code == curl_sys::CURLE_READ_ERROR
++    }
++
++    /// Returns whether this error corresponds to CURLE_WRITE_ERROR.
++    pub fn is_write_error(&self) -> bool {
++        self.code == curl_sys::CURLE_WRITE_ERROR
++    }
++
++    /// Returns whether this error corresponds to CURLE_UPLOAD_FAILED.
++    pub fn is_upload_failed(&self) -> bool {
++        self.code == curl_sys::CURLE_UPLOAD_FAILED
++    }
++
++    /// Returns whether this error corresponds to CURLE_OUT_OF_MEMORY.
++    pub fn is_out_of_memory(&self) -> bool {
++        self.code == curl_sys::CURLE_OUT_OF_MEMORY
++    }
++
++    /// Returns whether this error corresponds to CURLE_OPERATION_TIMEDOUT.
++    pub fn is_operation_timedout(&self) -> bool {
++        self.code == curl_sys::CURLE_OPERATION_TIMEDOUT
++    }
++
++    /// Returns whether this error corresponds to CURLE_RANGE_ERROR.
++    pub fn is_range_error(&self) -> bool {
++        self.code == curl_sys::CURLE_RANGE_ERROR
++    }
++
++    /// Returns whether this error corresponds to CURLE_HTTP_POST_ERROR.
++    pub fn is_http_post_error(&self) -> bool {
++        self.code == curl_sys::CURLE_HTTP_POST_ERROR
++    }
++
++    /// Returns whether this error corresponds to CURLE_SSL_CONNECT_ERROR.
++    pub fn is_ssl_connect_error(&self) -> bool {
++        self.code == curl_sys::CURLE_SSL_CONNECT_ERROR
++    }
++
++    /// Returns whether this error corresponds to CURLE_BAD_DOWNLOAD_RESUME.
++    pub fn is_bad_download_resume(&self) -> bool {
++        self.code == curl_sys::CURLE_BAD_DOWNLOAD_RESUME
++    }
++
++    /// Returns whether this error corresponds to CURLE_FILE_COULDNT_READ_FILE.
++    pub fn is_file_couldnt_read_file(&self) -> bool {
++        self.code == curl_sys::CURLE_FILE_COULDNT_READ_FILE
++    }
++
++    /// Returns whether this error corresponds to CURLE_FUNCTION_NOT_FOUND.
++    pub fn is_function_not_found(&self) -> bool {
++        self.code == curl_sys::CURLE_FUNCTION_NOT_FOUND
++    }
++
++    /// Returns whether this error corresponds to CURLE_ABORTED_BY_CALLBACK.
++    pub fn is_aborted_by_callback(&self) -> bool {
++        self.code == curl_sys::CURLE_ABORTED_BY_CALLBACK
++    }
++
++    /// Returns whether this error corresponds to CURLE_BAD_FUNCTION_ARGUMENT.
++    pub fn is_bad_function_argument(&self) -> bool {
++        self.code == curl_sys::CURLE_BAD_FUNCTION_ARGUMENT
++    }
++
++    /// Returns whether this error corresponds to CURLE_INTERFACE_FAILED.
++    pub fn is_interface_failed(&self) -> bool {
++        self.code == curl_sys::CURLE_INTERFACE_FAILED
++    }
++
++    /// Returns whether this error corresponds to CURLE_TOO_MANY_REDIRECTS.
++    pub fn is_too_many_redirects(&self) -> bool {
++        self.code == curl_sys::CURLE_TOO_MANY_REDIRECTS
++    }
++
++    /// Returns whether this error corresponds to CURLE_UNKNOWN_OPTION.
++    pub fn is_unknown_option(&self) -> bool {
++        self.code == curl_sys::CURLE_UNKNOWN_OPTION
++    }
++
++    /// Returns whether this error corresponds to CURLE_PEER_FAILED_VERIFICATION.
++    pub fn is_peer_failed_verification(&self) -> bool {
++        self.code == curl_sys::CURLE_PEER_FAILED_VERIFICATION
++    }
++
++    /// Returns whether this error corresponds to CURLE_GOT_NOTHING.
++    pub fn is_got_nothing(&self) -> bool {
++        self.code == curl_sys::CURLE_GOT_NOTHING
++    }
++
++    /// Returns whether this error corresponds to CURLE_SSL_ENGINE_NOTFOUND.
++    pub fn is_ssl_engine_notfound(&self) -> bool {
++        self.code == curl_sys::CURLE_SSL_ENGINE_NOTFOUND
++    }
++
++    /// Returns whether this error corresponds to CURLE_SSL_ENGINE_SETFAILED.
++    pub fn is_ssl_engine_setfailed(&self) -> bool {
++        self.code == curl_sys::CURLE_SSL_ENGINE_SETFAILED
++    }
++
++    /// Returns whether this error corresponds to CURLE_SEND_ERROR.
++    pub fn is_send_error(&self) -> bool {
++        self.code == curl_sys::CURLE_SEND_ERROR
++    }
++
++    /// Returns whether this error corresponds to CURLE_RECV_ERROR.
++    pub fn is_recv_error(&self) -> bool {
++        self.code == curl_sys::CURLE_RECV_ERROR
++    }
++
++    /// Returns whether this error corresponds to CURLE_SSL_CERTPROBLEM.
++    pub fn is_ssl_certproblem(&self) -> bool {
++        self.code == curl_sys::CURLE_SSL_CERTPROBLEM
++    }
++
++    /// Returns whether this error corresponds to CURLE_SSL_CIPHER.
++    pub fn is_ssl_cipher(&self) -> bool {
++        self.code == curl_sys::CURLE_SSL_CIPHER
++    }
++
++    /// Returns whether this error corresponds to CURLE_SSL_CACERT.
++    pub fn is_ssl_cacert(&self) -> bool {
++        self.code == curl_sys::CURLE_SSL_CACERT
++    }
++
++    /// Returns whether this error corresponds to CURLE_BAD_CONTENT_ENCODING.
++    pub fn is_bad_content_encoding(&self) -> bool {
++        self.code == curl_sys::CURLE_BAD_CONTENT_ENCODING
++    }
++
++    /// Returns whether this error corresponds to CURLE_FILESIZE_EXCEEDED.
++    pub fn is_filesize_exceeded(&self) -> bool {
++        self.code == curl_sys::CURLE_FILESIZE_EXCEEDED
++    }
++
++    /// Returns whether this error corresponds to CURLE_USE_SSL_FAILED.
++    pub fn is_use_ssl_failed(&self) -> bool {
++        self.code == curl_sys::CURLE_USE_SSL_FAILED
++    }
++
++    /// Returns whether this error corresponds to CURLE_SEND_FAIL_REWIND.
++    pub fn is_send_fail_rewind(&self) -> bool {
++        self.code == curl_sys::CURLE_SEND_FAIL_REWIND
++    }
++
++    /// Returns whether this error corresponds to CURLE_SSL_ENGINE_INITFAILED.
++    pub fn is_ssl_engine_initfailed(&self) -> bool {
++        self.code == curl_sys::CURLE_SSL_ENGINE_INITFAILED
++    }
++
++    /// Returns whether this error corresponds to CURLE_LOGIN_DENIED.
++    pub fn is_login_denied(&self) -> bool {
++        self.code == curl_sys::CURLE_LOGIN_DENIED
++    }
++
++    /// Returns whether this error corresponds to CURLE_CONV_FAILED.
++    pub fn is_conv_failed(&self) -> bool {
++        self.code == curl_sys::CURLE_CONV_FAILED
++    }
++
++    /// Returns whether this error corresponds to CURLE_CONV_REQD.
++    pub fn is_conv_required(&self) -> bool {
++        self.code == curl_sys::CURLE_CONV_REQD
++    }
++
++    /// Returns whether this error corresponds to CURLE_SSL_CACERT_BADFILE.
++    pub fn is_ssl_cacert_badfile(&self) -> bool {
++        self.code == curl_sys::CURLE_SSL_CACERT_BADFILE
++    }
++
++    /// Returns whether this error corresponds to CURLE_SSL_CRL_BADFILE.
++    pub fn is_ssl_crl_badfile(&self) -> bool {
++        self.code == curl_sys::CURLE_SSL_CRL_BADFILE
++    }
++
++    /// Returns whether this error corresponds to CURLE_SSL_SHUTDOWN_FAILED.
++    pub fn is_ssl_shutdown_failed(&self) -> bool {
++        self.code == curl_sys::CURLE_SSL_SHUTDOWN_FAILED
++    }
++
++    /// Returns whether this error corresponds to CURLE_AGAIN.
++    pub fn is_again(&self) -> bool {
++        self.code == curl_sys::CURLE_AGAIN
++    }
++
++    /// Returns whether this error corresponds to CURLE_SSL_ISSUER_ERROR.
++    pub fn is_ssl_issuer_error(&self) -> bool {
++        self.code == curl_sys::CURLE_SSL_ISSUER_ERROR
++    }
++
++    /// Returns whether this error corresponds to CURLE_CHUNK_FAILED.
++    pub fn is_chunk_failed(&self) -> bool {
++        self.code == curl_sys::CURLE_CHUNK_FAILED
++    }
++
++    // /// Returns whether this error corresponds to CURLE_NO_CONNECTION_AVAILABLE.
++    // pub fn is_no_connection_available(&self) -> bool {
++    //     self.code == curl_sys::CURLE_NO_CONNECTION_AVAILABLE
++    // }
++
++    /// Returns the value of the underlying error corresponding to libcurl.
++    pub fn code(&self) -> curl_sys::CURLcode {
++        self.code
++    }
++
++    /// Returns the extra description of this error, if any is available.
++    pub fn extra_description(&self) -> Option<&str> {
++        self.extra.as_ref().map(|s| &**s)
++    }
++}
++
++impl fmt::Display for Error {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        let desc = error::Error::description(self);
++        match self.extra {
++            Some(ref s) => write!(f, "[{}] {} ({})", self.code(), desc, s),
++            None => write!(f, "[{}] {}", self.code(), desc),
++        }
++    }
++}
++
++impl fmt::Debug for Error {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.debug_struct("Error")
++         .field("description", &error::Error::description(self))
++         .field("code", &self.code)
++         .field("extra", &self.extra)
++         .finish()
++    }
++}
++
++impl error::Error for Error {
++    fn description(&self) -> &str {
++        unsafe {
++            let s = curl_sys::curl_easy_strerror(self.code);
++            assert!(!s.is_null());
++            str::from_utf8(CStr::from_ptr(s).to_bytes()).unwrap()
++        }
++    }
++}
++
++/// An error returned from "share" operations.
++///
++/// This structure wraps a `CURLSHcode`.
++#[derive(Clone, PartialEq)]
++pub struct ShareError {
++    code: curl_sys::CURLSHcode,
++}
++
++impl ShareError {
++    /// Creates a new error from the underlying code returned by libcurl.
++    pub fn new(code: curl_sys::CURLSHcode) -> ShareError {
++        ShareError { code: code }
++    }
++
++    /// Returns whether this error corresponds to CURLSHE_BAD_OPTION.
++    pub fn is_bad_option(&self) -> bool {
++        self.code == curl_sys::CURLSHE_BAD_OPTION
++    }
++
++    /// Returns whether this error corresponds to CURLSHE_IN_USE.
++    pub fn is_in_use(&self) -> bool {
++        self.code == curl_sys::CURLSHE_IN_USE
++    }
++
++    /// Returns whether this error corresponds to CURLSHE_INVALID.
++    pub fn is_invalid(&self) -> bool {
++        self.code == curl_sys::CURLSHE_INVALID
++    }
++
++    /// Returns whether this error corresponds to CURLSHE_NOMEM.
++    pub fn is_nomem(&self) -> bool {
++        self.code == curl_sys::CURLSHE_NOMEM
++    }
++
++    // /// Returns whether this error corresponds to CURLSHE_NOT_BUILT_IN.
++    // pub fn is_not_built_in(&self) -> bool {
++    //     self.code == curl_sys::CURLSHE_NOT_BUILT_IN
++    // }
++
++    /// Returns the value of the underlying error corresponding to libcurl.
++    pub fn code(&self) -> curl_sys::CURLSHcode {
++        self.code
++    }
++}
++
++impl fmt::Display for ShareError {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        error::Error::description(self).fmt(f)
++    }
++}
++
++impl fmt::Debug for ShareError {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write!(f, "ShareError {{ description: {:?}, code: {} }}",
++               error::Error::description(self),
++               self.code)
++    }
++}
++
++impl error::Error for ShareError {
++    fn description(&self) -> &str {
++        unsafe {
++            let s = curl_sys::curl_share_strerror(self.code);
++            assert!(!s.is_null());
++            str::from_utf8(CStr::from_ptr(s).to_bytes()).unwrap()
++        }
++    }
++}
++
++/// An error from "multi" operations.
++///
++/// THis structure wraps a `CURLMcode`.
++#[derive(Clone, PartialEq)]
++pub struct MultiError {
++    code: curl_sys::CURLMcode,
++}
++
++impl MultiError {
++    /// Creates a new error from the underlying code returned by libcurl.
++    pub fn new(code: curl_sys::CURLMcode) -> MultiError {
++        MultiError { code: code }
++    }
++
++    /// Returns whether this error corresponds to CURLM_BAD_HANDLE.
++    pub fn is_bad_handle(&self) -> bool {
++        self.code == curl_sys::CURLM_BAD_HANDLE
++    }
++
++    /// Returns whether this error corresponds to CURLM_BAD_EASY_HANDLE.
++    pub fn is_bad_easy_handle(&self) -> bool {
++        self.code == curl_sys::CURLM_BAD_EASY_HANDLE
++    }
++
++    /// Returns whether this error corresponds to CURLM_OUT_OF_MEMORY.
++    pub fn is_out_of_memory(&self) -> bool {
++        self.code == curl_sys::CURLM_OUT_OF_MEMORY
++    }
++
++    /// Returns whether this error corresponds to CURLM_INTERNAL_ERROR.
++    pub fn is_internal_error(&self) -> bool {
++        self.code == curl_sys::CURLM_INTERNAL_ERROR
++    }
++
++    /// Returns whether this error corresponds to CURLM_BAD_SOCKET.
++    pub fn is_bad_socket(&self) -> bool {
++        self.code == curl_sys::CURLM_BAD_SOCKET
++    }
++
++    /// Returns whether this error corresponds to CURLM_UNKNOWN_OPTION.
++    pub fn is_unknown_option(&self) -> bool {
++        self.code == curl_sys::CURLM_UNKNOWN_OPTION
++    }
++
++    /// Returns whether this error corresponds to CURLM_CALL_MULTI_PERFORM.
++    pub fn is_call_perform(&self) -> bool {
++        self.code == curl_sys::CURLM_CALL_MULTI_PERFORM
++    }
++
++    // /// Returns whether this error corresponds to CURLM_ADDED_ALREADY.
++    // pub fn is_added_already(&self) -> bool {
++    //     self.code == curl_sys::CURLM_ADDED_ALREADY
++    // }
++
++    /// Returns the value of the underlying error corresponding to libcurl.
++    pub fn code(&self) -> curl_sys::CURLMcode {
++        self.code
++    }
++}
++
++impl fmt::Display for MultiError {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        error::Error::description(self).fmt(f)
++    }
++}
++
++impl fmt::Debug for MultiError {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write!(f, "MultiError {{ description: {:?}, code: {} }}",
++               error::Error::description(self),
++               self.code)
++    }
++}
++
++impl error::Error for MultiError {
++    fn description(&self) -> &str {
++        unsafe {
++            let s = curl_sys::curl_multi_strerror(self.code);
++            assert!(!s.is_null());
++            str::from_utf8(CStr::from_ptr(s).to_bytes()).unwrap()
++        }
++    }
++}
++
++
++/// An error from "form add" operations.
++///
++/// THis structure wraps a `CURLFORMcode`.
++#[derive(Clone, PartialEq)]
++pub struct FormError {
++    code: curl_sys::CURLFORMcode,
++}
++
++impl FormError {
++    /// Creates a new error from the underlying code returned by libcurl.
++    pub fn new(code: curl_sys::CURLFORMcode) -> FormError {
++        FormError { code: code }
++    }
++
++    /// Returns whether this error corresponds to CURL_FORMADD_MEMORY.
++    pub fn is_memory(&self) -> bool {
++        self.code == curl_sys::CURL_FORMADD_MEMORY
++    }
++
++    /// Returns whether this error corresponds to CURL_FORMADD_OPTION_TWICE.
++    pub fn is_option_twice(&self) -> bool {
++        self.code == curl_sys::CURL_FORMADD_OPTION_TWICE
++    }
++
++    /// Returns whether this error corresponds to CURL_FORMADD_NULL.
++    pub fn is_null(&self) -> bool {
++        self.code == curl_sys::CURL_FORMADD_NULL
++    }
++
++    /// Returns whether this error corresponds to CURL_FORMADD_UNKNOWN_OPTION.
++    pub fn is_unknown_option(&self) -> bool {
++        self.code == curl_sys::CURL_FORMADD_UNKNOWN_OPTION
++    }
++
++    /// Returns whether this error corresponds to CURL_FORMADD_INCOMPLETE.
++    pub fn is_incomplete(&self) -> bool {
++        self.code == curl_sys::CURL_FORMADD_INCOMPLETE
++    }
++
++    /// Returns whether this error corresponds to CURL_FORMADD_ILLEGAL_ARRAY.
++    pub fn is_illegal_array(&self) -> bool {
++        self.code == curl_sys::CURL_FORMADD_ILLEGAL_ARRAY
++    }
++
++    /// Returns whether this error corresponds to CURL_FORMADD_DISABLED.
++    pub fn is_disabled(&self) -> bool {
++        self.code == curl_sys::CURL_FORMADD_DISABLED
++    }
++
++    /// Returns the value of the underlying error corresponding to libcurl.
++    pub fn code(&self) -> curl_sys::CURLFORMcode {
++        self.code
++    }
++}
++
++impl fmt::Display for FormError {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        error::Error::description(self).fmt(f)
++    }
++}
++
++impl fmt::Debug for FormError {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write!(f, "FormError {{ description: {:?}, code: {} }}",
++               error::Error::description(self),
++               self.code)
++    }
++}
++
++impl error::Error for FormError {
++    fn description(&self) -> &str {
++        match self.code {
++            curl_sys::CURL_FORMADD_MEMORY => "allocation failure",
++            curl_sys::CURL_FORMADD_OPTION_TWICE => "one option passed twice",
++            curl_sys::CURL_FORMADD_NULL => "null pointer given for string",
++            curl_sys::CURL_FORMADD_UNKNOWN_OPTION => "unknown option",
++            curl_sys::CURL_FORMADD_INCOMPLETE => "form information not complete",
++            curl_sys::CURL_FORMADD_ILLEGAL_ARRAY => "illegal array in option",
++            curl_sys::CURL_FORMADD_DISABLED => {
++                "libcurl does not have support for this option compiled in"
++            }
++            _ => "unknown form error",
++        }
++    }
++}
++
++impl From<ffi::NulError> for Error {
++    fn from(_: ffi::NulError) -> Error {
++        Error { code: curl_sys::CURLE_CONV_FAILED, extra: None }
++    }
++}
++
++impl From<Error> for io::Error {
++    fn from(e: Error) -> io::Error {
++        io::Error::new(io::ErrorKind::Other, e)
++    }
++}
++
++impl From<ShareError> for io::Error {
++    fn from(e: ShareError) -> io::Error {
++        io::Error::new(io::ErrorKind::Other, e)
++    }
++}
++
++impl From<MultiError> for io::Error {
++    fn from(e: MultiError) -> io::Error {
++        io::Error::new(io::ErrorKind::Other, e)
++    }
++}
++
++impl From<FormError> for io::Error {
++    fn from(e: FormError) -> io::Error {
++        io::Error::new(io::ErrorKind::Other, e)
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1849b93a87d166acee084f313aad0627c0a69f31
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,123 @@@
++//! Rust bindings to the libcurl C library
++//!
++//! This crate contains bindings for an HTTP/HTTPS client which is powered by
++//! [libcurl], the same library behind the `curl` command line tool. The API
++//! currently closely matches that of libcurl itself, except that a Rustic layer
++//! of safety is applied on top.
++//!
++//! [libcurl]: https://curl.haxx.se/libcurl/
++//!
++//! # The "Easy" API
++//!
++//! The easiest way to send a request is to use the `Easy` api which corresponds
++//! to `CURL` in libcurl. This handle supports a wide variety of options and can
++//! be used to make a single blocking request in a thread. Callbacks can be
++//! specified to deal with data as it arrives and a handle can be reused to
++//! cache connections and such.
++//!
++//! ```rust,no_run
++//! use std::io::{stdout, Write};
++//!
++//! use curl::easy::Easy;
++//!
++//! // Write the contents of rust-lang.org to stdout
++//! let mut easy = Easy::new();
++//! easy.url("https://www.rust-lang.org/").unwrap();
++//! easy.write_function(|data| {
++//!     Ok(stdout().write(data).unwrap())
++//! }).unwrap();
++//! easy.perform().unwrap();
++//! ```
++//!
++//! # What about multiple concurrent HTTP requests?
++//!
++//! One option you have currently is to send multiple requests in multiple
++//! threads, but otherwise libcurl has a "multi" interface for doing this
++//! operation. Initial bindings of this interface can be found in the `multi`
++//! module, but feedback is welcome!
++//!
++//! # Where does libcurl come from?
++//!
++//! This crate links to the `curl-sys` crate which is in turn responsible for
++//! acquiring and linking to the libcurl library. Currently this crate will
++//! build libcurl from source if one is not already detected on the system.
++//!
++//! There is a large number of releases for libcurl, all with different sets of
++//! capabilities. Robust programs may wish to inspect `Version::get()` to test
++//! what features are implemented in the linked build of libcurl at runtime.
++
++#![deny(missing_docs, missing_debug_implementations)]
++#![doc(html_root_url = "https://docs.rs/curl/0.4")]
++
++extern crate curl_sys;
++extern crate libc;
++extern crate socket2;
++
++#[cfg(all(unix, not(target_os = "macos")))]
++extern crate openssl_sys;
++#[cfg(all(unix, not(target_os = "macos")))]
++extern crate openssl_probe;
++#[cfg(windows)]
++extern crate winapi;
++
++use std::ffi::CStr;
++use std::str;
++use std::sync::{Once, ONCE_INIT};
++
++pub use error::{Error, ShareError, MultiError, FormError};
++mod error;
++
++pub use version::{Version, Protocols};
++mod version;
++
++mod panic;
++pub mod easy;
++pub mod multi;
++
++/// Initializes the underlying libcurl library.
++///
++/// It's not required to call this before the library is used, but it's
++/// recommended to do so as soon as the program starts.
++pub fn init() {
++    static INIT: Once = ONCE_INIT;
++    INIT.call_once(|| {
++        platform_init();
++        unsafe {
++            assert_eq!(curl_sys::curl_global_init(curl_sys::CURL_GLOBAL_ALL), 0);
++        }
++
++        // Note that we explicitly don't schedule a call to
++        // `curl_global_cleanup`. The documentation for that function says
++        //
++        // > You must not call it when any other thread in the program (i.e. a
++        // > thread sharing the same memory) is running. This doesn't just mean
++        // > no other thread that is using libcurl.
++        //
++        // We can't ever be sure of that, so unfortunately we can't call the
++        // function.
++    });
++
++    #[cfg(all(unix, not(target_os = "macos")))]
++    fn platform_init() {
++        openssl_sys::init();
++    }
++
++    #[cfg(not(all(unix, not(target_os = "macos"))))]
++    fn platform_init() {}
++}
++
++unsafe fn opt_str<'a>(ptr: *const libc::c_char) -> Option<&'a str> {
++    if ptr.is_null() {
++        None
++    } else {
++        Some(str::from_utf8(CStr::from_ptr(ptr).to_bytes()).unwrap())
++    }
++}
++
++fn cvt(r: curl_sys::CURLcode) -> Result<(), Error> {
++    if r == curl_sys::CURLE_OK {
++        Ok(())
++    } else {
++        Err(Error::new(r))
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e721948ab4d0abe7534bd844fcbb7801dc37ef3c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,891 @@@
++//! Multi - initiating multiple requests simultaneously
++
++use std::fmt;
++use std::marker;
++use std::time::Duration;
++
++use libc::{c_int, c_char, c_void, c_long, c_short};
++use curl_sys;
++
++#[cfg(windows)]
++use winapi::fd_set;
++#[cfg(unix)]
++use libc::{fd_set, pollfd, POLLIN, POLLPRI, POLLOUT};
++
++use {MultiError, Error};
++use easy::{Easy, Easy2};
++use panic;
++
++/// A multi handle for initiating multiple connections simultaneously.
++///
++/// This structure corresponds to `CURLM` in libcurl and provides the ability to
++/// have multiple transfers in flight simultaneously. This handle is then used
++/// to manage each transfer. The main purpose of a `CURLM` is for the
++/// *application* to drive the I/O rather than libcurl itself doing all the
++/// blocking. Methods like `action` allow the application to inform libcurl of
++/// when events have happened.
++///
++/// Lots more documentation can be found on the libcurl [multi tutorial] where
++/// the APIs correspond pretty closely with this crate.
++///
++/// [multi tutorial]: https://curl.haxx.se/libcurl/c/libcurl-multi.html
++pub struct Multi {
++    raw: *mut curl_sys::CURLM,
++    data: Box<MultiData>,
++}
++
++struct MultiData {
++    socket: Box<FnMut(Socket, SocketEvents, usize) + Send>,
++    timer: Box<FnMut(Option<Duration>) -> bool + Send>,
++}
++
++/// Message from the `messages` function of a multi handle.
++///
++/// Currently only indicates whether a transfer is done.
++pub struct Message<'multi> {
++    ptr: *mut curl_sys::CURLMsg,
++    _multi: &'multi Multi,
++}
++
++/// Wrapper around an easy handle while it's owned by a multi handle.
++///
++/// Once an easy handle has been added to a multi handle then it can no longer
++/// be used via `perform`. This handle is also used to remove the easy handle
++/// from the multi handle when desired.
++pub struct EasyHandle {
++    easy: Easy,
++    // This is now effecitvely bound to a `Multi`, so it is no longer sendable.
++    _marker: marker::PhantomData<&'static Multi>,
++}
++
++/// Wrapper around an easy handle while it's owned by a multi handle.
++///
++/// Once an easy handle has been added to a multi handle then it can no longer
++/// be used via `perform`. This handle is also used to remove the easy handle
++/// from the multi handle when desired.
++pub struct Easy2Handle<H> {
++    easy: Easy2<H>,
++    // This is now effecitvely bound to a `Multi`, so it is no longer sendable.
++    _marker: marker::PhantomData<&'static Multi>,
++}
++
++/// Notification of the events that have happened on a socket.
++///
++/// This type is passed as an argument to the `action` method on a multi handle
++/// to indicate what events have occurred on a socket.
++pub struct Events {
++    bits: c_int,
++}
++
++/// Notification of events that are requested on a socket.
++///
++/// This type is yielded to the `socket_function` callback to indicate what
++/// events are requested on a socket.
++pub struct SocketEvents {
++    bits: c_int,
++}
++
++/// Raw underlying socket type that the multi handles use
++pub type Socket = curl_sys::curl_socket_t;
++
++/// File descriptor to wait on for use with the `wait` method on a multi handle.
++pub struct WaitFd {
++    inner: curl_sys::curl_waitfd,
++}
++
++impl Multi {
++    /// Creates a new multi session through which multiple HTTP transfers can be
++    /// initiated.
++    pub fn new() -> Multi {
++        unsafe {
++            ::init();
++            let ptr = curl_sys::curl_multi_init();
++            assert!(!ptr.is_null());
++            Multi {
++                raw: ptr,
++                data: Box::new(MultiData {
++                    socket: Box::new(|_, _, _| ()),
++                    timer: Box::new(|_| true),
++                }),
++            }
++        }
++    }
++
++    /// Set the callback informed about what to wait for
++    ///
++    /// When the `action` function runs, it informs the application about
++    /// updates in the socket (file descriptor) status by doing none, one, or
++    /// multiple calls to the socket callback. The callback gets status updates
++    /// with changes since the previous time the callback was called. See
++    /// `action` for more details on how the callback is used and should work.
++    ///
++    /// The `SocketEvents` parameter informs the callback on the status of the
++    /// given socket, and the methods on that type can be used to learn about
++    /// what's going on with the socket.
++    ///
++    /// The third `usize` parameter is a custom value set by the `assign` method
++    /// below.
++    pub fn socket_function<F>(&mut self, f: F) -> Result<(), MultiError>
++        where F: FnMut(Socket, SocketEvents, usize) + Send + 'static,
++    {
++        self._socket_function(Box::new(f))
++    }
++
++    fn _socket_function(&mut self,
++                        f: Box<FnMut(Socket, SocketEvents, usize) + Send>)
++                        -> Result<(), MultiError>
++    {
++        self.data.socket = f;
++        let cb: curl_sys::curl_socket_callback = cb;
++        try!(self.setopt_ptr(curl_sys::CURLMOPT_SOCKETFUNCTION,
++                             cb as usize as *const c_char));
++        let ptr = &*self.data as *const _;
++        try!(self.setopt_ptr(curl_sys::CURLMOPT_SOCKETDATA,
++                             ptr as *const c_char));
++        return Ok(());
++
++        // TODO: figure out how to expose `_easy`
++        extern fn cb(_easy: *mut curl_sys::CURL,
++                     socket: curl_sys::curl_socket_t,
++                     what: c_int,
++                     userptr: *mut c_void,
++                     socketp: *mut c_void) -> c_int {
++            panic::catch(|| unsafe {
++                let f = &mut (*(userptr as *mut MultiData)).socket;
++                f(socket, SocketEvents { bits: what }, socketp as usize)
++            });
++            0
++        }
++    }
++
++    /// Set data to associate with an internal socket
++    ///
++    /// This function creates an association in the multi handle between the
++    /// given socket and a private token of the application. This is designed
++    /// for `action` uses.
++    ///
++    /// When set, the token will be passed to all future socket callbacks for
++    /// the specified socket.
++    ///
++    /// If the given socket isn't already in use by libcurl, this function will
++    /// return an error.
++    ///
++    /// libcurl only keeps one single token associated with a socket, so
++    /// calling this function several times for the same socket will make the
++    /// last set token get used.
++    ///
++    /// The idea here being that this association (socket to token) is something
++    /// that just about every application that uses this API will need and then
++    /// libcurl can just as well do it since it already has an internal hash
++    /// table lookup for this.
++    ///
++    /// # Typical Usage
++    ///
++    /// In a typical application you allocate a struct or at least use some kind
++    /// of semi-dynamic data for each socket that we must wait for action on
++    /// when using the `action` approach.
++    ///
++    /// When our socket-callback gets called by libcurl and we get to know about
++    /// yet another socket to wait for, we can use `assign` to point out the
++    /// particular data so that when we get updates about this same socket
++    /// again, we don't have to find the struct associated with this socket by
++    /// ourselves.
++    pub fn assign(&self,
++                  socket: Socket,
++                  token: usize) -> Result<(), MultiError> {
++        unsafe {
++            try!(cvt(curl_sys::curl_multi_assign(self.raw, socket,
++                                                 token as *mut _)));
++            Ok(())
++        }
++    }
++
++    /// Set callback to receive timeout values
++    ///
++    /// Certain features, such as timeouts and retries, require you to call
++    /// libcurl even when there is no activity on the file descriptors.
++    ///
++    /// Your callback function should install a non-repeating timer with the
++    /// interval specified. Each time that timer fires, call either `action` or
++    /// `perform`, depending on which interface you use.
++    ///
++    /// A timeout value of `None` means you should delete your timer.
++    ///
++    /// A timeout value of 0 means you should call `action` or `perform` (once)
++    /// as soon as possible.
++    ///
++    /// This callback will only be called when the timeout changes.
++    ///
++    /// The timer callback should return `true` on success, and `false` on
++    /// error. This callback can be used instead of, or in addition to,
++    /// `get_timeout`.
++    pub fn timer_function<F>(&mut self, f: F) -> Result<(), MultiError>
++        where F: FnMut(Option<Duration>) -> bool + Send + 'static,
++    {
++        self._timer_function(Box::new(f))
++    }
++
++    fn _timer_function(&mut self,
++                        f: Box<FnMut(Option<Duration>) -> bool + Send>)
++                        -> Result<(), MultiError>
++    {
++        self.data.timer = f;
++        let cb: curl_sys::curl_multi_timer_callback = cb;
++        try!(self.setopt_ptr(curl_sys::CURLMOPT_TIMERFUNCTION,
++                             cb as usize as *const c_char));
++        let ptr = &*self.data as *const _;
++        try!(self.setopt_ptr(curl_sys::CURLMOPT_TIMERDATA,
++                             ptr as *const c_char));
++        return Ok(());
++
++        // TODO: figure out how to expose `_multi`
++        extern fn cb(_multi: *mut curl_sys::CURLM,
++                     timeout_ms: c_long,
++                     user: *mut c_void) -> c_int {
++            let keep_going = panic::catch(|| unsafe {
++                let f = &mut (*(user as *mut MultiData)).timer;
++                if timeout_ms == -1 {
++                    f(None)
++                } else {
++                    f(Some(Duration::from_millis(timeout_ms as u64)))
++                }
++            }).unwrap_or(false);
++            if keep_going {0} else {-1}
++        }
++    }
++
++    fn setopt_ptr(&mut self,
++                  opt: curl_sys::CURLMoption,
++                  val: *const c_char) -> Result<(), MultiError> {
++        unsafe {
++            cvt(curl_sys::curl_multi_setopt(self.raw, opt, val))
++        }
++    }
++
++    /// Add an easy handle to a multi session
++    ///
++    /// Adds a standard easy handle to the multi stack. This function call will
++    /// make this multi handle control the specified easy handle.
++    ///
++    /// When an easy interface is added to a multi handle, it will use a shared
++    /// connection cache owned by the multi handle. Removing and adding new easy
++    /// handles will not affect the pool of connections or the ability to do
++    /// connection re-use.
++    ///
++    /// If you have `timer_function` set in the multi handle (and you really
++    /// should if you're working event-based with `action` and friends), that
++    /// callback will be called from within this function to ask for an updated
++    /// timer so that your main event loop will get the activity on this handle
++    /// to get started.
++    ///
++    /// The easy handle will remain added to the multi handle until you remove
++    /// it again with `remove` on the returned handle - even when a transfer
++    /// with that specific easy handle is completed.
++    pub fn add(&self, mut easy: Easy) -> Result<EasyHandle, MultiError> {
++        // Clear any configuration set by previous transfers because we're
++        // moving this into a `Send+'static` situation now basically.
++        easy.transfer();
++
++        unsafe {
++            try!(cvt(curl_sys::curl_multi_add_handle(self.raw, easy.raw())));
++        }
++        Ok(EasyHandle {
++            easy: easy,
++            _marker: marker::PhantomData,
++        })
++    }
++
++    /// Same as `add`, but works with the `Easy2` type.
++    pub fn add2<H>(&self, easy: Easy2<H>) -> Result<Easy2Handle<H>, MultiError> {
++        unsafe {
++            try!(cvt(curl_sys::curl_multi_add_handle(self.raw, easy.raw())));
++        }
++        Ok(Easy2Handle {
++            easy: easy,
++            _marker: marker::PhantomData,
++        })
++    }
++
++    /// Remove an easy handle from this multi session
++    ///
++    /// Removes the easy handle from this multi handle. This will make the
++    /// returned easy handle be removed from this multi handle's control.
++    ///
++    /// When the easy handle has been removed from a multi stack, it is again
++    /// perfectly legal to invoke `perform` on it.
++    ///
++    /// Removing an easy handle while being used is perfectly legal and will
++    /// effectively halt the transfer in progress involving that easy handle.
++    /// All other easy handles and transfers will remain unaffected.
++    pub fn remove(&self, easy: EasyHandle) -> Result<Easy, MultiError> {
++        unsafe {
++            try!(cvt(curl_sys::curl_multi_remove_handle(self.raw,
++                                                        easy.easy.raw())));
++        }
++        Ok(easy.easy)
++    }
++
++    /// Same as `remove`, but for `Easy2Handle`.
++    pub fn remove2<H>(&self, easy: Easy2Handle<H>) -> Result<Easy2<H>, MultiError> {
++        unsafe {
++            try!(cvt(curl_sys::curl_multi_remove_handle(self.raw,
++                                                        easy.easy.raw())));
++        }
++        Ok(easy.easy)
++    }
++
++    /// Read multi stack informationals
++    ///
++    /// Ask the multi handle if there are any messages/informationals from the
++    /// individual transfers. Messages may include informationals such as an
++    /// error code from the transfer or just the fact that a transfer is
++    /// completed. More details on these should be written down as well.
++    pub fn messages<F>(&self, mut f: F) where F: FnMut(Message) {
++        self._messages(&mut f)
++    }
++
++    fn _messages(&self, mut f: &mut FnMut(Message)) {
++        let mut queue = 0;
++        unsafe {
++            loop {
++                let ptr = curl_sys::curl_multi_info_read(self.raw, &mut queue);
++                if ptr.is_null() {
++                    break
++                }
++                f(Message { ptr: ptr, _multi: self })
++            }
++        }
++    }
++
++    /// Inform of reads/writes available data given an action
++    ///
++    /// When the application has detected action on a socket handled by libcurl,
++    /// it should call this function with the sockfd argument set to
++    /// the socket with the action. When the events on a socket are known, they
++    /// can be passed `events`. When the events on a socket are unknown, pass
++    /// `Events::new()` instead, and libcurl will test the descriptor
++    /// internally.
++    ///
++    /// The returned integer will contain the number of running easy handles
++    /// within the multi handle. When this number reaches zero, all transfers
++    /// are complete/done. When you call `action` on a specific socket and the
++    /// counter decreases by one, it DOES NOT necessarily mean that this exact
++    /// socket/transfer is the one that completed. Use `messages` to figure out
++    /// which easy handle that completed.
++    ///
++    /// The `action` function informs the application about updates in the
++    /// socket (file descriptor) status by doing none, one, or multiple calls to
++    /// the socket callback function set with the `socket_function` method. They
++    /// update the status with changes since the previous time the callback was
++    /// called.
++    pub fn action(&self, socket: Socket, events: &Events)
++                  -> Result<u32, MultiError> {
++        let mut remaining = 0;
++        unsafe {
++            try!(cvt(curl_sys::curl_multi_socket_action(self.raw,
++                                                        socket,
++                                                        events.bits,
++                                                        &mut remaining)));
++            Ok(remaining as u32)
++        }
++    }
++
++    /// Inform libcurl that a timeout has expired and sockets should be tested.
++    ///
++    /// The returned integer will contain the number of running easy handles
++    /// within the multi handle. When this number reaches zero, all transfers
++    /// are complete/done. When you call `action` on a specific socket and the
++    /// counter decreases by one, it DOES NOT necessarily mean that this exact
++    /// socket/transfer is the one that completed. Use `messages` to figure out
++    /// which easy handle that completed.
++    ///
++    /// Get the timeout time by calling the `timer_function` method. Your
++    /// application will then get called with information on how long to wait
++    /// for socket actions at most before doing the timeout action: call the
++    /// `timeout` method. You can also use the `get_timeout` function to
++    /// poll the value at any given time, but for an event-based system using
++    /// the callback is far better than relying on polling the timeout value.
++    pub fn timeout(&self) -> Result<u32, MultiError> {
++        let mut remaining = 0;
++        unsafe {
++            try!(cvt(curl_sys::curl_multi_socket_action(self.raw,
++                                                        curl_sys::CURL_SOCKET_BAD,
++                                                        0,
++                                                        &mut remaining)));
++            Ok(remaining as u32)
++        }
++    }
++
++    /// Get how long to wait for action before proceeding
++    ///
++    /// An application using the libcurl multi interface should call
++    /// `get_timeout` to figure out how long it should wait for socket actions -
++    /// at most - before proceeding.
++    ///
++    /// Proceeding means either doing the socket-style timeout action: call the
++    /// `timeout` function, or call `perform` if you're using the simpler and
++    /// older multi interface approach.
++    ///
++    /// The timeout value returned is the duration at this very moment. If 0, it
++    /// means you should proceed immediately without waiting for anything. If it
++    /// returns `None`, there's no timeout at all set.
++    ///
++    /// Note: if libcurl returns a `None` timeout here, it just means that
++    /// libcurl currently has no stored timeout value. You must not wait too
++    /// long (more than a few seconds perhaps) before you call `perform` again.
++    pub fn get_timeout(&self) -> Result<Option<Duration>, MultiError> {
++        let mut ms = 0;
++        unsafe {
++            try!(cvt(curl_sys::curl_multi_timeout(self.raw, &mut ms)));
++            if ms == -1 {
++                Ok(None)
++            } else {
++                Ok(Some(Duration::from_millis(ms as u64)))
++            }
++        }
++    }
++
++    /// Block until activity is detected or a timeout passes.
++    ///
++    /// The timeout is used in millisecond-precision. Large durations are
++    /// clamped at the maximum value curl accepts.
++    ///
++    /// The returned integer will contain the number of internal file
++    /// descriptors on which interesting events occured.
++    ///
++    /// This function is a simpler alternative to using `fdset()` and `select()`
++    /// and does not suffer from file descriptor limits.
++    ///
++    /// # Example
++    ///
++    /// ```
++    /// use curl::multi::Multi;
++    /// use std::time::Duration;
++    ///
++    /// let m = Multi::new();
++    ///
++    /// // Add some Easy handles...
++    ///
++    /// while m.perform().unwrap() > 0 {
++    ///     m.wait(&mut [], Duration::from_secs(1)).unwrap();
++    /// }
++    /// ```
++    pub fn wait(&self, waitfds: &mut [WaitFd], timeout: Duration)
++                -> Result<u32, MultiError> {
++        let timeout_ms = {
++            let secs = timeout.as_secs();
++            if secs > (i32::max_value() / 1000) as u64 {
++                // Duration too large, clamp at maximum value.
++                i32::max_value()
++            } else {
++                secs as i32 * 1000 + timeout.subsec_nanos() as i32 / 1000_000
++            }
++        };
++        unsafe {
++            let mut ret = 0;
++            try!(cvt(curl_sys::curl_multi_wait(self.raw,
++                                               waitfds.as_mut_ptr() as *mut _,
++                                               waitfds.len() as u32,
++                                               timeout_ms,
++                                               &mut ret)));
++            Ok(ret as u32)
++        }
++    }
++
++    /// Reads/writes available data from each easy handle.
++    ///
++    /// This function handles transfers on all the added handles that need
++    /// attention in an non-blocking fashion.
++    ///
++    /// When an application has found out there's data available for this handle
++    /// or a timeout has elapsed, the application should call this function to
++    /// read/write whatever there is to read or write right now etc.  This
++    /// method returns as soon as the reads/writes are done. This function does
++    /// not require that there actually is any data available for reading or
++    /// that data can be written, it can be called just in case. It will return
++    /// the number of handles that still transfer data.
++    ///
++    /// If the amount of running handles is changed from the previous call (or
++    /// is less than the amount of easy handles you've added to the multi
++    /// handle), you know that there is one or more transfers less "running".
++    /// You can then call `info` to get information about each individual
++    /// completed transfer, and that returned info includes `Error` and more.
++    /// If an added handle fails very quickly, it may never be counted as a
++    /// running handle.
++    ///
++    /// When running_handles is set to zero (0) on the return of this function,
++    /// there is no longer any transfers in progress.
++    ///
++    /// # Return
++    ///
++    /// Before libcurl version 7.20.0: If you receive `is_call_perform`, this
++    /// basically means that you should call `perform` again, before you select
++    /// on more actions. You don't have to do it immediately, but the return
++    /// code means that libcurl may have more data available to return or that
++    /// there may be more data to send off before it is "satisfied". Do note
++    /// that `perform` will return `is_call_perform` only when it wants to be
++    /// called again immediately. When things are fine and there is nothing
++    /// immediate it wants done, it'll return `Ok` and you need to wait for
++    /// "action" and then call this function again.
++    ///
++    /// This function only returns errors etc regarding the whole multi stack.
++    /// Problems still might have occurred on individual transfers even when
++    /// this function returns `Ok`. Use `info` to figure out how individual
++    /// transfers did.
++    pub fn perform(&self) -> Result<u32, MultiError> {
++        unsafe {
++            let mut ret = 0;
++            try!(cvt(curl_sys::curl_multi_perform(self.raw, &mut ret)));
++            Ok(ret as u32)
++        }
++    }
++
++    /// Extracts file descriptor information from a multi handle
++    ///
++    /// This function extracts file descriptor information from a given
++    /// handle, and libcurl returns its `fd_set` sets. The application can use
++    /// these to `select()` on, but be sure to `FD_ZERO` them before calling
++    /// this function as curl_multi_fdset only adds its own descriptors, it
++    /// doesn't zero or otherwise remove any others. The curl_multi_perform
++    /// function should be called as soon as one of them is ready to be read
++    /// from or written to.
++    ///
++    /// If no file descriptors are set by libcurl, this function will return
++    /// `Ok(None)`. Otherwise `Ok(Some(n))` will be returned where `n` the
++    /// highest descriptor number libcurl set. When `Ok(None)` is returned it
++    /// is because libcurl currently does something that isn't possible for
++    /// your application to monitor with a socket and unfortunately you can
++    /// then not know exactly when the current action is completed using
++    /// `select()`. You then need to wait a while before you proceed and call
++    /// `perform` anyway.
++    ///
++    /// When doing `select()`, you should use `get_timeout` to figure out
++    /// how long to wait for action. Call `perform` even if no activity has
++    /// been seen on the `fd_set`s after the timeout expires as otherwise
++    /// internal retries and timeouts may not work as you'd think and want.
++    ///
++    /// If one of the sockets used by libcurl happens to be larger than what
++    /// can be set in an `fd_set`, which on POSIX systems means that the file
++    /// descriptor is larger than `FD_SETSIZE`, then libcurl will try to not
++    /// set it. Setting a too large file descriptor in an `fd_set` implies an out
++    /// of bounds write which can cause crashes, or worse. The effect of NOT
++    /// storing it will possibly save you from the crash, but will make your
++    /// program NOT wait for sockets it should wait for...
++    pub fn fdset(&self,
++                 read: Option<&mut fd_set>,
++                 write: Option<&mut fd_set>,
++                 except: Option<&mut fd_set>) -> Result<Option<i32>, MultiError> {
++        unsafe {
++            let mut ret = 0;
++            let read = read.map(|r| r as *mut _).unwrap_or(0 as *mut _);
++            let write = write.map(|r| r as *mut _).unwrap_or(0 as *mut _);
++            let except = except.map(|r| r as *mut _).unwrap_or(0 as *mut _);
++            try!(cvt(curl_sys::curl_multi_fdset(self.raw, read, write, except,
++                                                &mut ret)));
++            if ret == -1 {
++                Ok(None)
++            } else {
++                Ok(Some(ret))
++            }
++        }
++    }
++
++    /// Attempt to close the multi handle and clean up all associated resources.
++    ///
++    /// Cleans up and removes a whole multi stack. It does not free or touch any
++    /// individual easy handles in any way - they still need to be closed
++    /// individually.
++    pub fn close(&self) -> Result<(), MultiError> {
++        unsafe {
++            cvt(curl_sys::curl_multi_cleanup(self.raw))
++        }
++    }
++}
++
++fn cvt(code: curl_sys::CURLMcode) -> Result<(), MultiError> {
++    if code == curl_sys::CURLM_OK {
++        Ok(())
++    } else {
++        Err(MultiError::new(code))
++    }
++}
++
++impl fmt::Debug for Multi {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.debug_struct("Multi")
++         .field("raw", &self.raw)
++         .finish()
++    }
++}
++
++impl Drop for Multi {
++    fn drop(&mut self) {
++        let _ = self.close();
++    }
++}
++
++impl EasyHandle {
++    /// Sets an internal private token for this `EasyHandle`.
++    ///
++    /// This function will set the `CURLOPT_PRIVATE` field on the underlying
++    /// easy handle.
++    pub fn set_token(&mut self, token: usize) -> Result<(), Error> {
++        unsafe {
++            ::cvt(curl_sys::curl_easy_setopt(self.easy.raw(),
++                                             curl_sys::CURLOPT_PRIVATE,
++                                             token))
++        }
++    }
++}
++
++impl fmt::Debug for EasyHandle {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        self.easy.fmt(f)
++    }
++}
++
++impl<H> Easy2Handle<H> {
++    /// Same as `EasyHandle::set_token`
++    pub fn set_token(&mut self, token: usize) -> Result<(), Error> {
++        unsafe {
++            ::cvt(curl_sys::curl_easy_setopt(self.easy.raw(),
++                                             curl_sys::CURLOPT_PRIVATE,
++                                             token))
++        }
++    }
++}
++
++impl<H: fmt::Debug> fmt::Debug for Easy2Handle<H> {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        self.easy.fmt(f)
++    }
++}
++
++impl<'multi> Message<'multi> {
++    /// If this message indicates that a transfer has finished, returns the
++    /// result of the transfer in `Some`.
++    ///
++    /// If the message doesn't indicate that a transfer has finished, then
++    /// `None` is returned.
++    pub fn result(&self) -> Option<Result<(), Error>> {
++        unsafe {
++            if (*self.ptr).msg == curl_sys::CURLMSG_DONE {
++                Some(::cvt((*self.ptr).data as curl_sys::CURLcode))
++            } else {
++                None
++            }
++        }
++    }
++
++    /// Returns whether this easy message was for the specified easy handle or
++    /// not.
++    pub fn is_for(&self, handle: &EasyHandle) -> bool {
++        unsafe { (*self.ptr).easy_handle == handle.easy.raw() }
++    }
++
++    /// Same as `is_for`, but for `Easy2Handle`.
++    pub fn is_for2<H>(&self, handle: &Easy2Handle<H>) -> bool {
++        unsafe { (*self.ptr).easy_handle == handle.easy.raw() }
++    }
++
++    /// Returns the token associated with the easy handle that this message
++    /// represents a completion for.
++    ///
++    /// This function will return the token assigned with
++    /// `EasyHandle::set_token`. This reads the `CURLINFO_PRIVATE` field of the
++    /// underlying `*mut CURL`.
++    pub fn token(&self) -> Result<usize, Error> {
++        unsafe {
++            let mut p = 0usize;
++            try!(::cvt(curl_sys::curl_easy_getinfo((*self.ptr).easy_handle,
++                                                   curl_sys::CURLINFO_PRIVATE,
++                                                   &mut p)));
++            Ok(p)
++        }
++    }
++}
++
++impl<'a> fmt::Debug for Message<'a> {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.debug_struct("Message")
++         .field("ptr", &self.ptr)
++         .finish()
++    }
++}
++
++impl Events {
++    /// Creates a new blank event bit mask.
++    pub fn new() -> Events {
++        Events { bits: 0 }
++    }
++
++    /// Set or unset the whether these events indicate that input is ready.
++    pub fn input(&mut self, val: bool) -> &mut Events {
++        self.flag(curl_sys::CURL_CSELECT_IN, val)
++    }
++
++    /// Set or unset the whether these events indicate that output is ready.
++    pub fn output(&mut self, val: bool) -> &mut Events {
++        self.flag(curl_sys::CURL_CSELECT_OUT, val)
++    }
++
++    /// Set or unset the whether these events indicate that an error has
++    /// happened.
++    pub fn error(&mut self, val: bool) -> &mut Events {
++        self.flag(curl_sys::CURL_CSELECT_ERR, val)
++    }
++
++    fn flag(&mut self, flag: c_int, val: bool) -> &mut Events {
++        if val {
++            self.bits |= flag;
++        } else {
++            self.bits &= !flag;
++        }
++        self
++    }
++}
++
++impl fmt::Debug for Events {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.debug_struct("Events")
++         .field("input", &(self.bits & curl_sys::CURL_CSELECT_IN != 0))
++         .field("output", &(self.bits & curl_sys::CURL_CSELECT_IN != 0))
++         .field("error", &(self.bits & curl_sys::CURL_CSELECT_IN != 0))
++         .finish()
++    }
++}
++
++impl SocketEvents {
++    /// Wait for incoming data. For the socket to become readable.
++    pub fn input(&self) -> bool {
++        self.bits & curl_sys::CURL_POLL_IN == curl_sys::CURL_POLL_IN
++    }
++
++    /// Wait for outgoing data. For the socket to become writable.
++    pub fn output(&self) -> bool {
++        self.bits & curl_sys::CURL_POLL_OUT == curl_sys::CURL_POLL_OUT
++    }
++
++    /// Wait for incoming and outgoing data. For the socket to become readable
++    /// or writable.
++    pub fn input_and_output(&self) -> bool {
++        self.bits & curl_sys::CURL_POLL_INOUT == curl_sys::CURL_POLL_INOUT
++    }
++
++    /// The specified socket/file descriptor is no longer used by libcurl.
++    pub fn remove(&self) -> bool {
++        self.bits & curl_sys::CURL_POLL_REMOVE == curl_sys::CURL_POLL_REMOVE
++    }
++}
++
++impl fmt::Debug for SocketEvents {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.debug_struct("Events")
++         .field("input", &self.input())
++         .field("output", &self.output())
++         .field("remove", &self.remove())
++         .finish()
++    }
++}
++
++impl WaitFd {
++    /// Constructs an empty (invalid) WaitFd.
++    pub fn new() -> WaitFd {
++        WaitFd {
++            inner: curl_sys::curl_waitfd {
++                fd: 0,
++                events: 0,
++                revents: 0,
++            }
++        }
++    }
++
++    /// Set the file descriptor to wait for.
++    pub fn set_fd(&mut self, fd: Socket) {
++        self.inner.fd = fd;
++    }
++
++    /// Indicate that the socket should poll on read events such as new data
++    /// received.
++    ///
++    /// Corresponds to `CURL_WAIT_POLLIN`.
++    pub fn poll_on_read(&mut self, val: bool) -> &mut WaitFd {
++        self.flag(curl_sys::CURL_WAIT_POLLIN, val)
++    }
++
++    /// Indicate that the socket should poll on high priority read events such
++    /// as out of band data.
++    ///
++    /// Corresponds to `CURL_WAIT_POLLPRI`.
++    pub fn poll_on_priority_read(&mut self, val: bool) -> &mut WaitFd {
++        self.flag(curl_sys::CURL_WAIT_POLLPRI, val)
++    }
++
++    /// Indicate that the socket should poll on write events such as the socket
++    /// being clear to write without blocking.
++    ///
++    /// Corresponds to `CURL_WAIT_POLLOUT`.
++    pub fn poll_on_write(&mut self, val: bool) -> &mut WaitFd {
++        self.flag(curl_sys::CURL_WAIT_POLLOUT, val)
++    }
++
++    fn flag(&mut self, flag: c_short, val: bool) -> &mut WaitFd {
++        if val {
++            self.inner.events |= flag;
++        } else {
++            self.inner.events &= !flag;
++        }
++        self
++    }
++
++    /// After a call to `wait`, returns `true` if `poll_on_read` was set and a
++    /// read event occured.
++    pub fn received_read(&self) -> bool {
++        self.inner.revents & curl_sys::CURL_WAIT_POLLIN == curl_sys::CURL_WAIT_POLLIN
++    }
++
++    /// After a call to `wait`, returns `true` if `poll_on_priority_read` was set and a
++    /// priority read event occured.
++    pub fn received_priority_read(&self) -> bool {
++        self.inner.revents & curl_sys::CURL_WAIT_POLLPRI == curl_sys::CURL_WAIT_POLLPRI
++    }
++
++    /// After a call to `wait`, returns `true` if `poll_on_write` was set and a
++    /// write event occured.
++    pub fn received_write(&self) -> bool {
++        self.inner.revents & curl_sys::CURL_WAIT_POLLOUT == curl_sys::CURL_WAIT_POLLOUT
++    }
++}
++
++#[cfg(unix)]
++impl From<pollfd> for WaitFd {
++    fn from(pfd: pollfd) -> WaitFd {
++        let mut events = 0;
++        if pfd.events & POLLIN == POLLIN {
++            events |= curl_sys::CURL_WAIT_POLLIN;
++        }
++        if pfd.events & POLLPRI == POLLPRI {
++            events |= curl_sys::CURL_WAIT_POLLPRI;
++        }
++        if pfd.events & POLLOUT == POLLOUT {
++            events |= curl_sys::CURL_WAIT_POLLOUT;
++        }
++        WaitFd {
++            inner: curl_sys::curl_waitfd {
++                fd: pfd.fd,
++                events: events,
++                revents: 0,
++            }
++        }
++    }
++}
++
++impl fmt::Debug for WaitFd {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.debug_struct("WaitFd")
++         .field("fd", &self.inner.fd)
++         .field("events", &self.inner.fd)
++         .field("revents", &self.inner.fd)
++         .finish()
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1da2179851cdc91ae240e64f03e9ad3caa5080b1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++use std::any::Any;
++use std::cell::RefCell;
++use std::panic::{self, AssertUnwindSafe};
++
++thread_local!(static LAST_ERROR: RefCell<Option<Box<Any + Send>>> = {
++    RefCell::new(None)
++});
++
++pub fn catch<T, F: FnOnce() -> T>(f: F) -> Option<T> {
++    if LAST_ERROR.with(|slot| slot.borrow().is_some()) {
++        return None
++    }
++
++    // Note that `AssertUnwindSafe` is used here as we prevent reentering
++    // arbitrary code due to the `LAST_ERROR` check above plus propagation of a
++    // panic after we return back to user code from C.
++    match panic::catch_unwind(AssertUnwindSafe(f)) {
++        Ok(ret) => Some(ret),
++        Err(e) => {
++            LAST_ERROR.with(|slot| *slot.borrow_mut() = Some(e));
++            None
++        }
++    }
++}
++
++pub fn propagate() {
++    if let Some(t) = LAST_ERROR.with(|slot| slot.borrow_mut().take()) {
++        panic::resume_unwind(t)
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..aaa734f6ac2540d57ebdad59127c687ae2d451d8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,303 @@@
++use std::ffi::CStr;
++use std::fmt;
++use std::str;
++
++use curl_sys;
++use libc::{c_int, c_char};
++
++/// Version information about libcurl and the capabilities that it supports.
++pub struct Version {
++    inner: *mut curl_sys::curl_version_info_data,
++}
++
++unsafe impl Send for Version {}
++unsafe impl Sync for Version {}
++
++/// An iterator over the list of protocols a version supports.
++#[derive(Clone)]
++pub struct Protocols<'a> {
++    cur: *const *const c_char,
++    _inner: &'a Version,
++}
++
++impl Version {
++    /// Returns the libcurl version that this library is currently linked against.
++    pub fn num() -> &'static str {
++        unsafe {
++            let s = CStr::from_ptr(curl_sys::curl_version() as *const _);
++            str::from_utf8(s.to_bytes()).unwrap()
++        }
++    }
++
++    /// Returns the libcurl version that this library is currently linked against.
++    pub fn get() -> Version {
++        unsafe {
++            let ptr = curl_sys::curl_version_info(curl_sys::CURLVERSION_FOURTH);
++            assert!(!ptr.is_null());
++            Version { inner: ptr }
++        }
++    }
++
++    /// Returns the human readable version string,
++    pub fn version(&self) -> &str {
++        unsafe {
++            ::opt_str((*self.inner).version).unwrap()
++        }
++    }
++
++    /// Returns a numeric representation of the version number
++    ///
++    /// This is a 24 bit number made up of the major number, minor, and then
++    /// patch number. For example 7.9.8 will return 0x070908.
++    pub fn version_num(&self) -> u32 {
++        unsafe {
++            (*self.inner).version_num as u32
++        }
++    }
++
++    /// Returns a human readable string of the host libcurl is built for.
++    ///
++    /// This is discovered as part of the build environment.
++    pub fn host(&self) -> &str {
++        unsafe {
++            ::opt_str((*self.inner).host).unwrap()
++        }
++    }
++
++    /// Returns whether libcurl supports IPv6
++    pub fn feature_ipv6(&self) -> bool {
++        self.flag(curl_sys::CURL_VERSION_IPV6)
++    }
++
++    /// Returns whether libcurl supports SSL
++    pub fn feature_ssl(&self) -> bool {
++        self.flag(curl_sys::CURL_VERSION_SSL)
++    }
++
++    /// Returns whether libcurl supports HTTP deflate via libz
++    pub fn feature_libz(&self) -> bool {
++        self.flag(curl_sys::CURL_VERSION_LIBZ)
++    }
++
++    /// Returns whether libcurl supports HTTP NTLM
++    pub fn feature_ntlm(&self) -> bool {
++        self.flag(curl_sys::CURL_VERSION_NTLM)
++    }
++
++    /// Returns whether libcurl supports HTTP GSSNEGOTIATE
++    pub fn feature_gss_negotiate(&self) -> bool {
++        self.flag(curl_sys::CURL_VERSION_GSSNEGOTIATE)
++    }
++
++    /// Returns whether libcurl was built with debug capabilities
++    pub fn feature_debug(&self) -> bool {
++        self.flag(curl_sys::CURL_VERSION_DEBUG)
++    }
++
++    /// Returns whether libcurl was built with SPNEGO authentication
++    pub fn feature_spnego(&self) -> bool {
++        self.flag(curl_sys::CURL_VERSION_SPNEGO)
++    }
++
++    /// Returns whether libcurl was built with large file support
++    pub fn feature_largefile(&self) -> bool {
++        self.flag(curl_sys::CURL_VERSION_LARGEFILE)
++    }
++
++    /// Returns whether libcurl was built with support for IDNA, domain names
++    /// with international letters.
++    pub fn feature_idn(&self) -> bool {
++        self.flag(curl_sys::CURL_VERSION_IDN)
++    }
++
++    /// Returns whether libcurl was built with support for SSPI.
++    pub fn feature_sspi(&self) -> bool {
++        self.flag(curl_sys::CURL_VERSION_SSPI)
++    }
++
++    /// Returns whether libcurl was built with asynchronous name lookups.
++    pub fn feature_async_dns(&self) -> bool {
++        self.flag(curl_sys::CURL_VERSION_ASYNCHDNS)
++    }
++
++    /// Returns whether libcurl was built with support for character
++    /// conversions.
++    pub fn feature_conv(&self) -> bool {
++        self.flag(curl_sys::CURL_VERSION_CONV)
++    }
++
++    /// Returns whether libcurl was built with support for TLS-SRP.
++    pub fn feature_tlsauth_srp(&self) -> bool {
++        self.flag(curl_sys::CURL_VERSION_TLSAUTH_SRP)
++    }
++
++    /// Returns whether libcurl was built with support for NTLM delegation to
++    /// winbind helper.
++    pub fn feature_ntlm_wb(&self) -> bool {
++        self.flag(curl_sys::CURL_VERSION_NTLM_WB)
++    }
++
++    /// Returns whether libcurl was built with support for unix domain socket
++    pub fn feature_unix_domain_socket(&self) -> bool {
++        self.flag(curl_sys::CURL_VERSION_UNIX_SOCKETS)
++    }
++
++    // /// Returns whether libcurl was built with support for HTTP2.
++    // pub fn feature_http2(&self) -> bool {
++    //     self.flag(curl_sys::CURL_VERSION_HTTP2)
++    // }
++    fn flag(&self, flag: c_int) -> bool {
++        unsafe {
++            (*self.inner).features & flag != 0
++        }
++    }
++
++    /// Returns the version of OpenSSL that is used, or None if there is no SSL
++    /// support.
++    pub fn ssl_version(&self) -> Option<&str> {
++        unsafe {
++            ::opt_str((*self.inner).ssl_version)
++        }
++    }
++
++    /// Returns the version of libz that is used, or None if there is no libz
++    /// support.
++    pub fn libz_version(&self) -> Option<&str> {
++        unsafe {
++            ::opt_str((*self.inner).libz_version)
++        }
++    }
++
++    /// Returns an iterator over the list of protocols that this build of
++    /// libcurl supports.
++    pub fn protocols(&self) -> Protocols {
++        unsafe {
++            Protocols { _inner: self, cur: (*self.inner).protocols }
++        }
++    }
++
++    /// If available, the human readable version of ares that libcurl is linked
++    /// against.
++    pub fn ares_version(&self) -> Option<&str> {
++        unsafe {
++            if (*self.inner).age >= 1 {
++                ::opt_str((*self.inner).ares)
++            } else {
++                None
++            }
++        }
++    }
++
++    /// If available, the version of ares that libcurl is linked against.
++    pub fn ares_version_num(&self) -> Option<u32> {
++        unsafe {
++            if (*self.inner).age >= 1 {
++                Some((*self.inner).ares_num as u32)
++            } else {
++                None
++            }
++        }
++    }
++
++    /// If available, the version of libidn that libcurl is linked against.
++    pub fn libidn_version(&self) -> Option<&str> {
++        unsafe {
++            if (*self.inner).age >= 2 {
++                ::opt_str((*self.inner).libidn)
++            } else {
++                None
++            }
++        }
++    }
++
++    /// If available, the version of iconv libcurl is linked against.
++    pub fn iconv_version_num(&self) -> Option<u32> {
++        unsafe {
++            if (*self.inner).age >= 3 {
++                Some((*self.inner).iconv_ver_num as u32)
++            } else {
++                None
++            }
++        }
++    }
++
++    /// If available, the version of iconv libcurl is linked against.
++    pub fn libssh_version(&self) -> Option<&str> {
++        unsafe {
++            if (*self.inner).age >= 3 {
++                ::opt_str((*self.inner).libssh_version)
++            } else {
++                None
++            }
++        }
++    }
++}
++
++impl fmt::Debug for Version {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        let mut f = f.debug_struct("Version");
++        f.field("version", &self.version())
++         .field("host", &self.host())
++         .field("feature_ipv6", &self.feature_ipv6())
++         .field("feature_ssl", &self.feature_ssl())
++         .field("feature_libz", &self.feature_libz())
++         .field("feature_ntlm", &self.feature_ntlm())
++         .field("feature_gss_negotiate", &self.feature_gss_negotiate())
++         .field("feature_debug", &self.feature_debug())
++         .field("feature_spnego", &self.feature_debug())
++         .field("feature_largefile", &self.feature_debug())
++         .field("feature_idn", &self.feature_debug())
++         .field("feature_sspi", &self.feature_debug())
++         .field("feature_async_dns", &self.feature_debug())
++         .field("feature_conv", &self.feature_debug())
++         .field("feature_tlsauth_srp", &self.feature_debug())
++         .field("feature_ntlm_wb", &self.feature_debug())
++         .field("feature_unix_domain_socket", &self.feature_debug());
++
++        if let Some(s) = self.ssl_version() {
++            f.field("ssl_version", &s);
++        }
++        if let Some(s) = self.libz_version() {
++            f.field("libz_version", &s);
++        }
++        if let Some(s) = self.ares_version() {
++            f.field("ares_version", &s);
++        }
++        if let Some(s) = self.libidn_version() {
++            f.field("libidn_version", &s);
++        }
++        if let Some(s) = self.iconv_version_num() {
++            f.field("iconv_version_num", &format!("{:x}", s));
++        }
++        if let Some(s) = self.libssh_version() {
++            f.field("libssh_version", &s);
++        }
++
++        f.field("protocols", &self.protocols().collect::<Vec<_>>());
++
++        f.finish()
++    }
++}
++
++impl<'a> Iterator for Protocols<'a> {
++    type Item = &'a str;
++
++    fn next(&mut self) -> Option<&'a str> {
++        unsafe {
++            if (*self.cur).is_null() {
++                return None
++            }
++            let ret = ::opt_str(*self.cur).unwrap();
++            self.cur = self.cur.offset(1);
++            Some(ret)
++        }
++    }
++}
++
++impl<'a> fmt::Debug for Protocols<'a> {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.debug_list()
++         .entries(self.clone())
++         .finish()
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e98193ac76a35891df4e33b9be14585750537a34
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,675 @@@
++extern crate curl;
++
++use std::cell::{RefCell, Cell};
++use std::io::Read;
++use std::rc::Rc;
++use std::str;
++use std::time::Duration;
++
++macro_rules! t {
++    ($e:expr) => (match $e {
++        Ok(e) => e,
++        Err(e) => panic!("{} failed with {:?}", stringify!($e), e),
++    })
++}
++
++use curl::easy::{Easy, List, WriteError, ReadError, Transfer};
++
++use server::Server;
++mod server;
++
++fn handle() -> Easy {
++    let mut e = Easy::new();
++    t!(e.timeout(Duration::new(20, 0)));
++    return e
++}
++
++fn sink(data: &[u8]) -> Result<usize, WriteError> {
++    Ok(data.len())
++}
++
++#[test]
++fn get_smoke() {
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("HTTP/1.1 200 OK\r\n\r\n");
++
++    let mut handle = handle();
++    t!(handle.url(&s.url("/")));
++    t!(handle.perform());
++}
++
++#[test]
++fn get_path() {
++    let s = Server::new();
++    s.receive("\
++GET /foo HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("HTTP/1.1 200 OK\r\n\r\n");
++
++    let mut handle = handle();
++    t!(handle.url(&s.url("/foo")));
++    t!(handle.perform());
++}
++
++#[test]
++fn write_callback() {
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("HTTP/1.1 200 OK\r\n\r\nhello!");
++
++    let mut all = Vec::<u8>::new();
++    {
++        let mut handle = handle();
++        t!(handle.url(&s.url("/")));
++        let mut handle = handle.transfer();
++        t!(handle.write_function(|data| {
++            all.extend(data);
++            Ok(data.len())
++        }));
++        t!(handle.perform());
++    }
++    assert_eq!(all, b"hello!");
++}
++
++#[test]
++fn progress() {
++    let s = Server::new();
++    s.receive("\
++GET /foo HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("HTTP/1.1 200 OK\r\n\r\nHello!");
++
++    let mut hits = 0;
++    let mut dl = 0.0;
++    {
++        let mut handle = handle();
++        t!(handle.url(&s.url("/foo")));
++        t!(handle.progress(true));
++        t!(handle.write_function(sink));
++
++        let mut handle = handle.transfer();
++        t!(handle.progress_function(|_, a, _, _| {
++            hits += 1;
++            dl = a;
++            true
++        }));
++        t!(handle.perform());
++    }
++    assert!(hits > 0);
++    assert_eq!(dl, 6.0);
++}
++
++#[test]
++fn headers() {
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++Foo: bar\r\n\
++Bar: baz\r\n\
++\r\n
++Hello!");
++
++    let mut headers = Vec::new();
++    {
++        let mut handle = handle();
++        t!(handle.url(&s.url("/")));
++
++        let mut handle = handle.transfer();
++        t!(handle.header_function(|h| {
++            headers.push(str::from_utf8(h).unwrap().to_string());
++            true
++        }));
++        t!(handle.write_function(sink));
++        t!(handle.perform());
++    }
++    assert_eq!(headers, vec![
++        "HTTP/1.1 200 OK\r\n".to_string(),
++        "Foo: bar\r\n".to_string(),
++        "Bar: baz\r\n".to_string(),
++        "\r\n".to_string(),
++    ]);
++}
++
++#[test]
++fn fail_on_error() {
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 401 Not so good\r\n\
++\r\n");
++
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.fail_on_error(true));
++    assert!(h.perform().is_err());
++
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 401 Not so good\r\n\
++\r\n");
++
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.fail_on_error(false));
++    t!(h.perform());
++}
++
++#[test]
++fn port() {
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Host: localhost:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut h = handle();
++    t!(h.url("http://localhost/"));
++    t!(h.port(s.addr().port()));
++    t!(h.perform());
++}
++
++#[test]
++fn proxy() {
++    let s = Server::new();
++    s.receive("\
++GET http://example.com/ HTTP/1.1\r\n\
++Host: example.com\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut h = handle();
++    t!(h.url("http://example.com/"));
++    t!(h.proxy(&s.url("/")));
++    t!(h.perform());
++}
++
++#[test]
++#[ignore] // fails on newer curl versions? seems benign
++fn noproxy() {
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.proxy(&s.url("/")));
++    t!(h.noproxy("127.0.0.1"));
++    t!(h.perform());
++}
++
++#[test]
++fn misc() {
++    let mut h = handle();
++    t!(h.tcp_nodelay(true));
++    // t!(h.tcp_keepalive(true));
++    // t!(h.tcp_keepidle(Duration::new(3, 0)));
++    // t!(h.tcp_keepintvl(Duration::new(3, 0)));
++    t!(h.buffer_size(10));
++    t!(h.dns_cache_timeout(Duration::new(1, 0)));
++}
++
++#[test]
++fn userpass() {
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Authorization: Basic YmFyOg==\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.username("foo"));
++    t!(h.username("bar"));
++    t!(h.perform());
++}
++
++#[test]
++fn accept_encoding() {
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++Accept-Encoding: gzip\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.accept_encoding("gzip"));
++    t!(h.perform());
++}
++
++#[test]
++fn follow_location() {
++    let s1 = Server::new();
++    let s2 = Server::new();
++    s1.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s1.send(&format!("\
++HTTP/1.1 301 Moved Permanently\r\n\
++Location: http://{}/foo\r\n\
++\r\n", s2.addr()));
++
++    s2.receive("\
++GET /foo HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s2.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut h = handle();
++    t!(h.url(&s1.url("/")));
++    t!(h.follow_location(true));
++    t!(h.perform());
++}
++
++#[test]
++fn put() {
++    let s = Server::new();
++    s.receive("\
++PUT / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++Content-Length: 5\r\n\
++\r\n\
++data\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut data = "data\n".as_bytes();
++    let mut list = List::new();
++    t!(list.append("Expect:"));
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.put(true));
++    t!(h.in_filesize(5));
++    t!(h.upload(true));
++    t!(h.http_headers(list));
++    let mut h = h.transfer();
++    t!(h.read_function(|buf| {
++        Ok(data.read(buf).unwrap())
++    }));
++    t!(h.perform());
++}
++
++#[test]
++fn post1() {
++    let s = Server::new();
++    s.receive("\
++POST / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++Content-Length: 5\r\n\
++Content-Type: application/x-www-form-urlencoded\r\n\
++\r\n\
++data\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.post(true));
++    t!(h.post_fields_copy(b"data\n"));
++    t!(h.perform());
++}
++
++#[test]
++fn post2() {
++    let s = Server::new();
++    s.receive("\
++POST / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++Content-Length: 5\r\n\
++Content-Type: application/x-www-form-urlencoded\r\n\
++\r\n\
++data\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.post(true));
++    t!(h.post_fields_copy(b"data\n"));
++    t!(h.write_function(sink));
++    t!(h.perform());
++}
++
++#[test]
++fn post3() {
++    let s = Server::new();
++    s.receive("\
++POST / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++Content-Length: 5\r\n\
++Content-Type: application/x-www-form-urlencoded\r\n\
++\r\n\
++data\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut data = "data\n".as_bytes();
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.post(true));
++    t!(h.post_field_size(5));
++    let mut h = h.transfer();
++    t!(h.read_function(|buf| {
++        Ok(data.read(buf).unwrap())
++    }));
++    t!(h.perform());
++}
++
++#[test]
++fn referer() {
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++Referer: foo\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.referer("foo"));
++    t!(h.perform());
++}
++
++#[test]
++fn useragent() {
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++User-Agent: foo\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.useragent("foo"));
++    t!(h.perform());
++}
++
++#[test]
++fn custom_headers() {
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Foo: bar\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut custom = List::new();
++    t!(custom.append("Foo: bar"));
++    t!(custom.append("Accept:"));
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.http_headers(custom));
++    t!(h.perform());
++}
++
++#[test]
++fn cookie() {
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++Cookie: foo\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.cookie("foo"));
++    t!(h.perform());
++}
++
++#[test]
++fn url_encoding() {
++    let mut h = handle();
++    assert_eq!(h.url_encode(b"foo"), "foo");
++    assert_eq!(h.url_encode(b"foo bar"), "foo%20bar");
++    assert_eq!(h.url_encode(b"foo bar\xff"), "foo%20bar%FF");
++    assert_eq!(h.url_encode(b""), "");
++    assert_eq!(h.url_decode("foo"), b"foo");
++    assert_eq!(h.url_decode("foo%20bar"), b"foo bar");
++    assert_eq!(h.url_decode("foo%2"), b"foo%2");
++    assert_eq!(h.url_decode("foo%xx"), b"foo%xx");
++    assert_eq!(h.url_decode("foo%ff"), b"foo\xff");
++    assert_eq!(h.url_decode(""), b"");
++}
++
++#[test]
++fn getters() {
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.cookie_file("/dev/null"));
++    t!(h.perform());
++    assert_eq!(t!(h.response_code()), 200);
++    assert_eq!(t!(h.redirect_count()), 0);
++    assert_eq!(t!(h.redirect_url()), None);
++    assert_eq!(t!(h.content_type()), None);
++
++    let addr = format!("http://{}/", s.addr());
++    assert_eq!(t!(h.effective_url()), Some(&addr[..]));
++
++    // TODO: test this
++    // let cookies = t!(h.cookies()).iter()
++    //                              .map(|s| s.to_vec())
++    //                              .collect::<Vec<_>>();
++    // assert_eq!(cookies.len(), 1);
++}
++
++#[test]
++#[should_panic]
++fn panic_in_callback() {
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.header_function(|_| panic!()));
++    t!(h.perform());
++}
++
++#[test]
++fn abort_read() {
++    let s = Server::new();
++    s.receive("\
++PUT / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++Content-Length: 2\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.read_function(|_| Err(ReadError::Abort)));
++    t!(h.put(true));
++    t!(h.in_filesize(2));
++    let mut list = List::new();
++    t!(list.append("Expect:"));
++    t!(h.http_headers(list));
++    let err = h.perform().unwrap_err();
++    assert!(err.is_aborted_by_callback());
++}
++
++#[test]
++fn pause_write_then_resume() {
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n
++a\n
++b");
++
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.progress(true));
++
++    struct State<'a, 'b> {
++        paused: Cell<bool>,
++        unpaused: Cell<bool>,
++        transfer: RefCell<Transfer<'a, 'b>>,
++    }
++
++    let h = Rc::new(State {
++        paused: Cell::new(false),
++        unpaused: Cell::new(false),
++        transfer: RefCell::new(h.transfer()),
++    });
++
++    let h2 = h.clone();
++    t!(h.transfer.borrow_mut().write_function(move |data| {
++        if h2.unpaused.get() {
++            h2.unpaused.set(false);
++            Ok(data.len())
++        } else {
++            h2.paused.set(true);
++            Err(WriteError::Pause)
++        }
++    }));
++    let h2 = h.clone();
++    t!(h.transfer.borrow_mut().progress_function(move |_, _, _, _| {
++        if h2.paused.get() {
++            h2.paused.set(false);
++            h2.unpaused.set(true);
++            t!(h2.transfer.borrow().unpause_write());
++        }
++        true
++    }));
++    t!(h.transfer.borrow().perform());
++}
++
++#[test]
++fn perform_in_perform_is_bad() {
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n
++a\n
++b");
++
++    let mut h = handle();
++    t!(h.url(&s.url("/")));
++    t!(h.progress(true));
++
++    let h = Rc::new(RefCell::new(h.transfer()));
++
++    let h2 = h.clone();
++    t!(h.borrow_mut().write_function(move |data| {
++        assert!(h2.borrow().perform().is_err());
++        Ok(data.len())
++    }));
++    t!(h.borrow().perform());
++}
++
++// Stupid test to check if unix_socket is callable
++#[test]
++fn check_unix_socket() {
++    let mut h = handle();
++    h.unix_socket("/var/something.socks").is_ok();
++}
++
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ce013625030ba8dba906f756967f9e9ca394464a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++hello
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4238b73b411df296922b264eb7fe68cd716f892a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,252 @@@
++#![cfg(unix)]
++
++extern crate curl;
++extern crate mio;
++
++use std::collections::HashMap;
++use std::io::{Read, Cursor};
++use std::time::Duration;
++
++use curl::easy::{Easy, List};
++use curl::multi::Multi;
++
++macro_rules! t {
++    ($e:expr) => (match $e {
++        Ok(e) => e,
++        Err(e) => panic!("{} failed with {:?}", stringify!($e), e),
++    })
++}
++
++use server::Server;
++mod server;
++
++#[test]
++fn smoke() {
++    let m = Multi::new();
++    let mut e = Easy::new();
++
++    let s = Server::new();
++    s.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s.send("HTTP/1.1 200 OK\r\n\r\n");
++
++    t!(e.url(&s.url("/")));
++    let _e = t!(m.add(e));
++    while t!(m.perform()) > 0 {
++        t!(m.wait(&mut [], Duration::from_secs(1)));
++    }
++}
++
++#[test]
++fn smoke2() {
++    let m = Multi::new();
++
++    let s1 = Server::new();
++    s1.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s1.send("HTTP/1.1 200 OK\r\n\r\n");
++
++    let s2 = Server::new();
++    s2.receive("\
++GET / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++\r\n");
++    s2.send("HTTP/1.1 200 OK\r\n\r\n");
++
++    let mut e1 = Easy::new();
++    t!(e1.url(&s1.url("/")));
++    let _e1 = t!(m.add(e1));
++    let mut e2 = Easy::new();
++    t!(e2.url(&s2.url("/")));
++    let _e2 = t!(m.add(e2));
++
++    while t!(m.perform()) > 0 {
++        t!(m.wait(&mut [], Duration::from_secs(1)));
++    }
++
++    let mut done = 0;
++    m.messages(|msg| {
++        msg.result().unwrap().unwrap();
++        done += 1;
++    });
++    assert_eq!(done, 2);
++}
++
++#[test]
++fn upload_lots() {
++    use curl::multi::{Socket, SocketEvents, Events};
++
++    #[derive(Debug)]
++    enum Message {
++        Timeout(Option<Duration>),
++        Wait(Socket, SocketEvents, usize),
++    }
++
++    let mut m = Multi::new();
++    let poll = t!(mio::Poll::new());
++    let (tx, rx) = mio::channel::channel();
++    let tx2 = tx.clone();
++    t!(m.socket_function(move |socket, events, token| {
++        t!(tx2.send(Message::Wait(socket, events, token)));
++    }));
++    t!(m.timer_function(move |dur| {
++        t!(tx.send(Message::Timeout(dur)));
++        true
++    }));
++
++    let s = Server::new();
++    s.receive(&format!("\
++PUT / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++Content-Length: 131072\r\n\
++\r\n\
++{}\n", vec!["a"; 128 * 1024 - 1].join("")));
++    s.send("\
++HTTP/1.1 200 OK\r\n\
++\r\n");
++
++    let mut data = vec![b'a'; 128 * 1024 - 1];
++    data.push(b'\n');
++    let mut data = Cursor::new(data);
++    let mut list = List::new();
++    t!(list.append("Expect:"));
++    let mut h = Easy::new();
++    t!(h.url(&s.url("/")));
++    t!(h.put(true));
++    t!(h.read_function(move |buf| {
++        Ok(data.read(buf).unwrap())
++    }));
++    t!(h.in_filesize(128 * 1024));
++    t!(h.upload(true));
++    t!(h.http_headers(list));
++
++    t!(poll.register(&rx,
++                     mio::Token(0),
++                     mio::Ready::all(),
++                     mio::PollOpt::level()));
++
++    let e = t!(m.add(h));
++
++    assert!(t!(m.perform()) > 0);
++    let mut next_token = 1;
++    let mut token_map = HashMap::new();
++    let mut cur_timeout = None;
++    let mut events = mio::Events::with_capacity(128);
++    let mut running = true;
++
++    while running {
++        let n = t!(poll.poll(&mut events, cur_timeout));
++
++        if n == 0 {
++            if t!(m.timeout()) == 0 {
++                running = false;
++            }
++        }
++
++        for event in events.iter() {
++            while event.token() == mio::Token(0) {
++                match rx.try_recv() {
++                    Ok(Message::Timeout(dur)) => cur_timeout = dur,
++                    Ok(Message::Wait(socket, events, token)) => {
++                        let evented = mio::unix::EventedFd(&socket);
++                        if events.remove() {
++                            token_map.remove(&token).unwrap();
++                        } else {
++                            let mut e = mio::Ready::none();
++                            if events.input() {
++                                e = e | mio::Ready::readable();
++                            }
++                            if events.output() {
++                                e = e | mio::Ready::writable();
++                            }
++                            if token == 0 {
++                                let token = next_token;
++                                next_token += 1;
++                                t!(m.assign(socket, token));
++                                token_map.insert(token, socket);
++                                t!(poll.register(&evented,
++                                                 mio::Token(token),
++                                                 e,
++                                                 mio::PollOpt::level()));
++                            } else {
++                                t!(poll.reregister(&evented,
++                                                   mio::Token(token),
++                                                   e,
++                                                   mio::PollOpt::level()));
++                            }
++                        }
++                    }
++                    Err(_) => break,
++                }
++            }
++
++            if event.token() == mio::Token(0) {
++                continue
++            }
++
++            let token = event.token();
++            let socket = token_map[&token.into()];
++            let mut e = Events::new();
++            if event.kind().is_readable() {
++                e.input(true);
++            }
++            if event.kind().is_writable() {
++                e.output(true);
++            }
++            if event.kind().is_error() {
++                e.error(true);
++            }
++            let remaining = t!(m.action(socket, &e));
++            if remaining == 0 {
++                running = false;
++            }
++        }
++    }
++
++    let mut done = 0;
++    m.messages(|m| {
++        m.result().unwrap().unwrap();
++        done += 1;
++    });
++    assert_eq!(done, 1);
++
++    let mut e = t!(m.remove(e));
++    assert_eq!(t!(e.response_code()), 200);
++}
++
++// Tests passing raw file descriptors to Multi::wait. The test is limited to Linux only as the
++// semantics of the underlying poll(2) system call used by curl apparently differ on other
++// platforms, making the test fail.
++#[cfg(target_os = "linux")]
++#[test]
++fn waitfds() {
++    use std::fs::File;
++    use std::os::unix::io::AsRawFd;
++    use curl::multi::WaitFd;
++
++    let filenames = ["/dev/null", "/dev/zero", "/dev/urandom"];
++    let files: Vec<File> = filenames.iter()
++        .map(|filename| File::open(filename).unwrap())
++        .collect();
++    let mut waitfds: Vec<WaitFd> = files.iter().map(|f| {
++        let mut waitfd = WaitFd::new();
++        waitfd.set_fd(f.as_raw_fd());
++        waitfd.poll_on_read(true);
++        waitfd
++    }).collect();
++
++    let m = Multi::new();
++    let events = t!(m.wait(&mut waitfds, Duration::from_secs(1)));
++    assert_eq!(events, 3);
++    for waitfd in waitfds {
++        assert!(waitfd.received_read());
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8b3413b24f6fcd924103cefc1578a6210a307b7a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,108 @@@
++extern crate curl;
++
++use std::str;
++use std::time::Duration;
++
++macro_rules! t {
++    ($e:expr) => (match $e {
++        Ok(e) => e,
++        Err(e) => panic!("{} failed with {:?}", stringify!($e), e),
++    })
++}
++
++use curl::easy::{Easy, Form};
++
++use server::Server;
++mod server;
++
++fn handle() -> Easy {
++    let mut e = Easy::new();
++    t!(e.timeout(Duration::new(20, 0)));
++    return e
++}
++
++#[test]
++fn custom() {
++    let s = Server::new();
++    s.receive("\
++POST / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++Content-Length: 142\r\n\
++Expect: 100-continue\r\n\
++Content-Type: multipart/form-data; boundary=--[..]\r\n\
++\r\n\
++--[..]\r\n\
++Content-Disposition: form-data; name=\"foo\"\r\n\
++\r\n\
++1234\r\n\
++--[..]\r\n");
++    s.send("HTTP/1.1 200 OK\r\n\r\n");
++
++    let mut handle = handle();
++    let mut form = Form::new();
++    t!(form.part("foo").contents(b"1234").add());
++    t!(handle.url(&s.url("/")));
++    t!(handle.httppost(form));
++    t!(handle.perform());
++}
++
++#[test]
++fn buffer() {
++    let s = Server::new();
++    s.receive("\
++POST / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++Content-Length: 181\r\n\
++Expect: 100-continue\r\n\
++Content-Type: multipart/form-data; boundary=--[..]\r\n\
++\r\n\
++--[..]\r\n\
++Content-Disposition: form-data; name=\"foo\"; filename=\"bar\"\r\n\
++Content-Type: foo/bar\r\n\
++\r\n\
++1234\r\n\
++--[..]\r\n");
++    s.send("HTTP/1.1 200 OK\r\n\r\n");
++
++    let mut handle = handle();
++    let mut form = Form::new();
++    t!(form.part("foo")
++           .buffer("bar", b"1234".to_vec())
++           .content_type("foo/bar")
++           .add());
++    t!(handle.url(&s.url("/")));
++    t!(handle.httppost(form));
++    t!(handle.perform());
++}
++
++#[test]
++fn file() {
++    let s = Server::new();
++    s.receive("\
++POST / HTTP/1.1\r\n\
++Host: 127.0.0.1:$PORT\r\n\
++Accept: */*\r\n\
++Content-Length: 205\r\n\
++Expect: 100-continue\r\n\
++Content-Type: multipart/form-data; boundary=--[..]\r\n\
++\r\n\
++--[..]\r\n\
++Content-Disposition: form-data; name=\"foo\"; filename=\"formdata\"\r\n\
++Content-Type: application/octet-stream\r\n\
++\r\n\
++hello\n\
++\r\n\
++--[..]\r\n");
++    s.send("HTTP/1.1 200 OK\r\n\r\n");
++
++    let mut handle = handle();
++    let mut form = Form::new();
++    t!(form.part("foo")
++           .file("tests/formdata")
++           .add());
++    t!(handle.url(&s.url("/")));
++    t!(handle.httppost(form));
++    t!(handle.perform());
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..445cf901e92d2ffccbaa0c40a934745e20c09310
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,175 @@@
++#![allow(dead_code)]
++
++use std::collections::HashSet;
++use std::net::{TcpListener, SocketAddr, TcpStream};
++use std::io::prelude::*;
++use std::thread;
++use std::sync::mpsc::{Sender, Receiver, channel};
++use std::io::BufReader;
++
++pub struct Server {
++    messages: Option<Sender<Message>>,
++    addr: SocketAddr,
++    thread: Option<thread::JoinHandle<()>>,
++}
++
++enum Message {
++    Read(String),
++    Write(String),
++}
++
++fn run(listener: &TcpListener, rx: &Receiver<Message>) {
++    let mut socket = BufReader::new(listener.accept().unwrap().0);
++    for msg in rx.iter() {
++        match msg {
++            Message::Read(ref expected) => {
++                let mut expected = &expected[..];
++                let mut expected_headers = HashSet::new();
++                while let Some(i) = expected.find("\n") {
++                    let line = &expected[..i + 1];
++                    expected = &expected[i + 1..];
++                    expected_headers.insert(line);
++                    if line == "\r\n" {
++                        break
++                    }
++                }
++
++                let mut expected_len = None;
++                while expected_headers.len() > 0 {
++                    let mut actual = String::new();
++                    t!(socket.read_line(&mut actual));
++                    if actual.starts_with("Content-Length") {
++                        let len = actual.split(": ").skip(1).next().unwrap();
++                        expected_len = len.trim().parse().ok();
++                    }
++                    // various versions of libcurl do different things here
++                    if actual == "Proxy-Connection: Keep-Alive\r\n" {
++                        continue
++                    }
++                    if expected_headers.remove(&actual[..]) {
++                        continue
++                    }
++
++                    let mut found = None;
++                    for header in expected_headers.iter() {
++                        if lines_match(header, &actual) {
++                            found = Some(header.clone());
++                            break
++                        }
++                    }
++                    if let Some(found) = found {
++                        expected_headers.remove(&found);
++                        continue
++                    }
++                    panic!("unexpected header: {:?} (remaining headers {:?})",
++                           actual, expected_headers);
++                }
++                for header in expected_headers {
++                    panic!("expected header but not found: {:?}", header);
++                }
++
++                let mut line = String::new();
++                let mut socket = match expected_len {
++                    Some(amt) => socket.by_ref().take(amt),
++                    None => socket.by_ref().take(expected.len() as u64),
++                };
++                while socket.limit() > 0 {
++                    line.truncate(0);
++                    t!(socket.read_line(&mut line));
++                    if line.len() == 0 {
++                        break
++                    }
++                    if expected.len() == 0 {
++                        panic!("unexpected line: {:?}", line);
++                    }
++                    let i = expected.find("\n").unwrap_or(expected.len() - 1);
++                    let expected_line = &expected[..i + 1];
++                    expected = &expected[i + 1..];
++                    if lines_match(expected_line, &line) {
++                        continue
++                    }
++                    panic!("lines didn't match:\n\
++                            expected: {:?}\n\
++                            actual:   {:?}\n", expected_line, line)
++                }
++                if expected.len() != 0 {
++                    println!("didn't get expected data: {:?}", expected);
++                }
++            }
++            Message::Write(ref to_write) => {
++                t!(socket.get_mut().write_all(to_write.as_bytes()));
++                return
++            }
++        }
++    }
++
++    let mut dst = Vec::new();
++    t!(socket.read_to_end(&mut dst));
++    assert!(dst.len() == 0);
++}
++
++fn lines_match(expected: &str, mut actual: &str) -> bool {
++    for (i, part) in expected.split("[..]").enumerate() {
++        match actual.find(part) {
++            Some(j) => {
++                if i == 0 && j != 0 {
++                    return false
++                }
++                actual = &actual[j + part.len()..];
++            }
++            None => {
++                return false
++            }
++        }
++    }
++    actual.is_empty() || expected.ends_with("[..]")
++}
++
++impl Server {
++    pub fn new() -> Server {
++        let listener = t!(TcpListener::bind("127.0.0.1:0"));
++        let addr = t!(listener.local_addr());
++        let (tx, rx) = channel();
++        let thread = thread::spawn(move || run(&listener, &rx));
++        Server {
++            messages: Some(tx),
++            addr: addr,
++            thread: Some(thread),
++        }
++    }
++
++    pub fn receive(&self, msg: &str) {
++        let msg = msg.replace("$PORT", &self.addr.port().to_string());
++        self.msg(Message::Read(msg));
++    }
++
++    pub fn send(&self, msg: &str) {
++        let msg = msg.replace("$PORT", &self.addr.port().to_string());
++        self.msg(Message::Write(msg));
++    }
++
++    fn msg(&self, msg: Message) {
++        t!(self.messages.as_ref().unwrap().send(msg));
++    }
++
++    pub fn addr(&self) -> &SocketAddr {
++        &self.addr
++    }
++
++    pub fn url(&self, path: &str) -> String {
++        format!("http://{}{}", self.addr, path)
++    }
++}
++
++impl Drop for Server {
++    fn drop(&mut self) {
++        drop(TcpStream::connect(&self.addr));
++        drop(self.messages.take());
++        let res = self.thread.take().unwrap().join();
++        if !thread::panicking() {
++            t!(res);
++        } else if let Err(e) = res {
++            println!("child server thread also failed: {:?}", e);
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..34b8aaf6715b96438ce57e2a3e7fd7449c0cfc1e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"ef8ae57c4978a2acd8b869ce6b9ca1dfe817bff704c220209fdef2c0b75a01b9"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..610fdd9b2d5bcb9049a0cb278ea8a52381f22d6c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,33 @@@
++[package]\r
++name = "custom_derive"\r
++version = "0.1.7"\r
++authors = ["Daniel Keep <daniel.keep@gmail.com>"]\r
++\r
++description = "(Note: superseded by `macro-attr`) This crate provides a macro that enables the use of custom derive attributes."\r
++repository = "https://github.com/DanielKeep/rust-custom-derive/tree/custom_derive-master"\r
++documentation = "https://docs.rs/crate/custom_derive/"\r
++license = "MIT/Apache-2.0"\r
++keywords = ["custom", "derive", "macro"]\r
++\r
++exclude = [\r
++    ".cargo/*",\r
++    "local/*",\r
++    "doc-pkg/*",\r
++    "scripts/*",\r
++    ".gitmodules",\r
++    ".travis.yml",\r
++    "update-docs.py",\r
++]\r
++\r
++[workspace]\r
++members = [\r
++    "enum_derive",\r
++    "newtype_derive",\r
++]\r
++\r
++[features]\r
++default = ["std"]\r
++std = []\r
++\r
++[dev-dependencies]\r
++rustc-serialize = "0.3.15"\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6843892c9b1395acddff72c1b8621a1c238567dd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,237 @@@
++Copyright ⓒ 2015, 2016 rust-custom-derive contributors.\r
++\r
++Licensed under either of:\r
++\r
++* MIT license, or\r
++* Apache License, Version 2.0\r
++\r
++at your option.\r
++\r
++Unless you explicitly state otherwise, any contribution intentionally\r
++submitted for inclusion in the work by you shall be dual licensed as\r
++above, without any additional terms or conditions.\r
++\r
++# MIT License\r
++\r
++Permission is hereby granted, free of charge, to any person obtaining\r
++a copy of this software and associated documentation files (the\r
++"Software"), to deal in the Software without restriction, including\r
++without limitation the rights to use, copy, modify, merge, publish,\r
++distribute, sublicense, and/or sell copies of the Software, and to\r
++permit persons to whom the Software is furnished to do so, subject\r
++to the following conditions:\r
++\r
++The above copyright notice and this permission notice shall be included\r
++in all copies or substantial portions of the Software.\r
++\r
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS\r
++OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\r
++THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\r
++OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\r
++ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r
++OTHER DEALINGS IN THE SOFTWARE.\r
++\r
++# Apache License, Version 2.0\r
++\r
++                              Apache License\r
++                        Version 2.0, January 2004\r
++                     http://www.apache.org/licenses/\r
++\r
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r
++\r
++1. Definitions.\r
++\r
++   "License" shall mean the terms and conditions for use, reproduction,\r
++   and distribution as defined by Sections 1 through 9 of this document.\r
++\r
++   "Licensor" shall mean the copyright owner or entity authorized by\r
++   the copyright owner that is granting the License.\r
++\r
++   "Legal Entity" shall mean the union of the acting entity and all\r
++   other entities that control, are controlled by, or are under common\r
++   control with that entity. For the purposes of this definition,\r
++   "control" means (i) the power, direct or indirect, to cause the\r
++   direction or management of such entity, whether by contract or\r
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the\r
++   outstanding shares, or (iii) beneficial ownership of such entity.\r
++\r
++   "You" (or "Your") shall mean an individual or Legal Entity\r
++   exercising permissions granted by this License.\r
++\r
++   "Source" form shall mean the preferred form for making modifications,\r
++   including but not limited to software source code, documentation\r
++   source, and configuration files.\r
++\r
++   "Object" form shall mean any form resulting from mechanical\r
++   transformation or translation of a Source form, including but\r
++   not limited to compiled object code, generated documentation,\r
++   and conversions to other media types.\r
++\r
++   "Work" shall mean the work of authorship, whether in Source or\r
++   Object form, made available under the License, as indicated by a\r
++   copyright notice that is included in or attached to the work\r
++   (an example is provided in the Appendix below).\r
++\r
++   "Derivative Works" shall mean any work, whether in Source or Object\r
++   form, that is based on (or derived from) the Work and for which the\r
++   editorial revisions, annotations, elaborations, or other modifications\r
++   represent, as a whole, an original work of authorship. For the purposes\r
++   of this License, Derivative Works shall not include works that remain\r
++   separable from, or merely link (or bind by name) to the interfaces of,\r
++   the Work and Derivative Works thereof.\r
++\r
++   "Contribution" shall mean any work of authorship, including\r
++   the original version of the Work and any modifications or additions\r
++   to that Work or Derivative Works thereof, that is intentionally\r
++   submitted to Licensor for inclusion in the Work by the copyright owner\r
++   or by an individual or Legal Entity authorized to submit on behalf of\r
++   the copyright owner. For the purposes of this definition, "submitted"\r
++   means any form of electronic, verbal, or written communication sent\r
++   to the Licensor or its representatives, including but not limited to\r
++   communication on electronic mailing lists, source code control systems,\r
++   and issue tracking systems that are managed by, or on behalf of, the\r
++   Licensor for the purpose of discussing and improving the Work, but\r
++   excluding communication that is conspicuously marked or otherwise\r
++   designated in writing by the copyright owner as "Not a Contribution."\r
++\r
++   "Contributor" shall mean Licensor and any individual or Legal Entity\r
++   on behalf of whom a Contribution has been received by Licensor and\r
++   subsequently incorporated within the Work.\r
++\r
++2. Grant of Copyright License. Subject to the terms and conditions of\r
++   this License, each Contributor hereby grants to You a perpetual,\r
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
++   copyright license to reproduce, prepare Derivative Works of,\r
++   publicly display, publicly perform, sublicense, and distribute the\r
++   Work and such Derivative Works in Source or Object form.\r
++\r
++3. Grant of Patent License. Subject to the terms and conditions of\r
++   this License, each Contributor hereby grants to You a perpetual,\r
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
++   (except as stated in this section) patent license to make, have made,\r
++   use, offer to sell, sell, import, and otherwise transfer the Work,\r
++   where such license applies only to those patent claims licensable\r
++   by such Contributor that are necessarily infringed by their\r
++   Contribution(s) alone or by combination of their Contribution(s)\r
++   with the Work to which such Contribution(s) was submitted. If You\r
++   institute patent litigation against any entity (including a\r
++   cross-claim or counterclaim in a lawsuit) alleging that the Work\r
++   or a Contribution incorporated within the Work constitutes direct\r
++   or contributory patent infringement, then any patent licenses\r
++   granted to You under this License for that Work shall terminate\r
++   as of the date such litigation is filed.\r
++\r
++4. Redistribution. You may reproduce and distribute copies of the\r
++   Work or Derivative Works thereof in any medium, with or without\r
++   modifications, and in Source or Object form, provided that You\r
++   meet the following conditions:\r
++\r
++   (a) You must give any other recipients of the Work or\r
++       Derivative Works a copy of this License; and\r
++\r
++   (b) You must cause any modified files to carry prominent notices\r
++       stating that You changed the files; and\r
++\r
++   (c) You must retain, in the Source form of any Derivative Works\r
++       that You distribute, all copyright, patent, trademark, and\r
++       attribution notices from the Source form of the Work,\r
++       excluding those notices that do not pertain to any part of\r
++       the Derivative Works; and\r
++\r
++   (d) If the Work includes a "NOTICE" text file as part of its\r
++       distribution, then any Derivative Works that You distribute must\r
++       include a readable copy of the attribution notices contained\r
++       within such NOTICE file, excluding those notices that do not\r
++       pertain to any part of the Derivative Works, in at least one\r
++       of the following places: within a NOTICE text file distributed\r
++       as part of the Derivative Works; within the Source form or\r
++       documentation, if provided along with the Derivative Works; or,\r
++       within a display generated by the Derivative Works, if and\r
++       wherever such third-party notices normally appear. The contents\r
++       of the NOTICE file are for informational purposes only and\r
++       do not modify the License. You may add Your own attribution\r
++       notices within Derivative Works that You distribute, alongside\r
++       or as an addendum to the NOTICE text from the Work, provided\r
++       that such additional attribution notices cannot be construed\r
++       as modifying the License.\r
++\r
++   You may add Your own copyright statement to Your modifications and\r
++   may provide additional or different license terms and conditions\r
++   for use, reproduction, or distribution of Your modifications, or\r
++   for any such Derivative Works as a whole, provided Your use,\r
++   reproduction, and distribution of the Work otherwise complies with\r
++   the conditions stated in this License.\r
++\r
++5. Submission of Contributions. Unless You explicitly state otherwise,\r
++   any Contribution intentionally submitted for inclusion in the Work\r
++   by You to the Licensor shall be under the terms and conditions of\r
++   this License, without any additional terms or conditions.\r
++   Notwithstanding the above, nothing herein shall supersede or modify\r
++   the terms of any separate license agreement you may have executed\r
++   with Licensor regarding such Contributions.\r
++\r
++6. Trademarks. This License does not grant permission to use the trade\r
++   names, trademarks, service marks, or product names of the Licensor,\r
++   except as required for reasonable and customary use in describing the\r
++   origin of the Work and reproducing the content of the NOTICE file.\r
++\r
++7. Disclaimer of Warranty. Unless required by applicable law or\r
++   agreed to in writing, Licensor provides the Work (and each\r
++   Contributor provides its Contributions) on an "AS IS" BASIS,\r
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r
++   implied, including, without limitation, any warranties or conditions\r
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\r
++   PARTICULAR PURPOSE. You are solely responsible for determining the\r
++   appropriateness of using or redistributing the Work and assume any\r
++   risks associated with Your exercise of permissions under this License.\r
++\r
++8. Limitation of Liability. In no event and under no legal theory,\r
++   whether in tort (including negligence), contract, or otherwise,\r
++   unless required by applicable law (such as deliberate and grossly\r
++   negligent acts) or agreed to in writing, shall any Contributor be\r
++   liable to You for damages, including any direct, indirect, special,\r
++   incidental, or consequential damages of any character arising as a\r
++   result of this License or out of the use or inability to use the\r
++   Work (including but not limited to damages for loss of goodwill,\r
++   work stoppage, computer failure or malfunction, or any and all\r
++   other commercial damages or losses), even if such Contributor\r
++   has been advised of the possibility of such damages.\r
++\r
++9. Accepting Warranty or Additional Liability. While redistributing\r
++   the Work or Derivative Works thereof, You may choose to offer,\r
++   and charge a fee for, acceptance of support, warranty, indemnity,\r
++   or other liability obligations and/or rights consistent with this\r
++   License. However, in accepting such obligations, You may act only\r
++   on Your own behalf and on Your sole responsibility, not on behalf\r
++   of any other Contributor, and only if You agree to indemnify,\r
++   defend, and hold each Contributor harmless for any liability\r
++   incurred by, or claims asserted against, such Contributor by reason\r
++   of your accepting any such warranty or additional liability.\r
++\r
++END OF TERMS AND CONDITIONS\r
++\r
++APPENDIX: How to apply the Apache License to your work.\r
++\r
++   To apply the Apache License to your work, attach the following\r
++   boilerplate notice, with the fields enclosed by brackets "[]"\r
++   replaced with your own identifying information. (Don't include\r
++   the brackets!)  The text should be enclosed in the appropriate\r
++   comment syntax for the file format. We also recommend that a\r
++   file or class name and description of purpose be included on the\r
++   same "printed page" as the copyright notice for easier\r
++   identification within third-party archives.\r
++\r
++Copyright [yyyy] [name of copyright owner]\r
++\r
++Licensed under the Apache License, Version 2.0 (the "License");\r
++you may not use this file except in compliance with the License.\r
++You may obtain a copy of the License at\r
++\r
++    http://www.apache.org/licenses/LICENSE-2.0\r
++\r
++Unless required by applicable law or agreed to in writing, software\r
++distributed under the License is distributed on an "AS IS" BASIS,\r
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
++See the License for the specific language governing permissions and\r
++limitations under the License.\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..203a2be163e53a52e76302229655ab046abfd46f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++# `custom_derive!`\r
++\r
++**Note**: This crate has been superseded by `macro-attr`.\r
++\r
++This crate provides a macro that enables the use of custom `derive` attributes.\r
++\r
++**Links**\r
++\r
++* [Latest Release](https://crates.io/crates/custom_derive/)\r
++* [Latest Docs](https://docs.rs/crate/custom_derive/)\r
++* [Repository](https://github.com/DanielKeep/rust-custom-derive/tree/custom_derive-master/)\r
++\r
++## License\r
++\r
++Licensed under either of\r
++\r
++* MIT license (see [LICENSE](LICENSE) or <http://opensource.org/licenses/MIT>)\r
++* Apache License, Version 2.0 (see [LICENSE](LICENSE) or <http://www.apache.org/licenses/LICENSE-2.0>)\r
++\r
++at your option.\r
++\r
++### Contribution\r
++\r
++Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..860945cff615a8624dbe431374303489d879f1b8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,462 @@@
++/*\r
++Copyright ⓒ 2016 rust-custom-derive contributors.\r
++\r
++Licensed under the MIT license (see LICENSE or <http://opensource.org\r
++/licenses/MIT>) or the Apache License, Version 2.0 (see LICENSE of\r
++<http://www.apache.org/licenses/LICENSE-2.0>), at your option. All\r
++files in the project carrying such notice may not be copied, modified,\r
++or distributed except according to those terms.\r
++*/\r
++/*!\r
++**Note**: This crate has been superseded by `macro-attr`.\r
++\r
++This crate provides a macro that enables the use of custom `derive` attributes.\r
++\r
++To use it, make sure you link to the crate like so:\r
++\r
++```rust\r
++#[macro_use] extern crate custom_derive;\r
++# macro_rules! Dummy { (() struct $name:ident;) => {}; }\r
++# custom_derive! { #[derive(Clone, Dummy)] struct Foo; }\r
++# fn main() { let _ = Foo; }\r
++```\r
++\r
++> **Note**: the `custom_derive!` macro itself is not documented, as the automatic documentation for it would be uselessly huge and incomprehensible.\r
++\r
++<style type="text/css">\r
++.link-block { font-family: "Fira Sans"; }\r
++.link-block > p { display: inline-block; }\r
++.link-block > p > strong { font-weight: 500; margin-right: 1em; }\r
++.link-block > ul { display: inline-block; padding: 0; list-style: none; }\r
++.link-block > ul > li {\r
++  font-size: 0.8em;\r
++  background-color: #eee;\r
++  border: 1px solid #ccc;\r
++  padding: 0.3em;\r
++  display: inline-block;\r
++}\r
++</style>\r
++<span></span><div class="link-block">\r
++\r
++**Links**\r
++\r
++* [Latest Release](https://crates.io/crates/custom_derive/)\r
++* [Latest Docs](https://docs.rs/crate/custom_derive/)\r
++* [Repository](https://github.com/DanielKeep/rust-custom-derive/tree/custom_derive-master/)\r
++\r
++<span></span></div>\r
++\r
++# Usage\r
++\r
++The macro should be used to wrap an entire *single* `enum` or `struct` declaration, including its attributes (both `derive` and others).  All derivation attributes which the macro does *not* recognise will be assumed to be custom, and treated accordingly.\r
++\r
++`custom_derive!` assumes that custom derivations are implemented as macros (of the same name).  For example, here is a simple derivation macro:\r
++\r
++```rust\r
++#[macro_use] extern crate custom_derive;\r
++\r
++trait TypeName {\r
++    fn type_name() -> &'static str;\r
++}\r
++\r
++trait ReprType {\r
++    type Repr;\r
++}\r
++\r
++macro_rules! TypeName {\r
++    (() $(pub)* enum $name:ident $($tail:tt)*) => { TypeName! { @impl $name } };\r
++    (() $(pub)* struct $name:ident $($tail:tt)*) => { TypeName! { @impl $name } };\r
++\r
++    (@impl $name:ident) => {\r
++        impl TypeName for $name {\r
++            fn type_name() -> &'static str { stringify!($name) }\r
++        }\r
++    };\r
++}\r
++\r
++macro_rules! TryFrom {\r
++    (($repr:ty) $(pub)* enum $name:ident $($tail:tt)*) => {\r
++        impl ReprType for $name {\r
++            type Repr = $repr;\r
++        }\r
++    };\r
++}\r
++\r
++custom_derive! {\r
++    #[allow(dead_code)]\r
++    #[repr(u8)]\r
++    #[derive(Clone, Copy, Debug, TryFrom(u8), TypeName)]\r
++    enum Foo { A, B }\r
++}\r
++\r
++fn main() {\r
++    let foo = Foo::B;\r
++    let v = foo as <Foo as ReprType>::Repr;\r
++    let msg = format!("{}: {:?} ({:?})", Foo::type_name(), foo, v);\r
++    assert_eq!(msg, "Foo: B (1)");\r
++}\r
++```\r
++\r
++First, note that `custom_derive!` passes any arguments on the derivation attribute to the macro.  In the case of attributes *without* any arguments, `()` is passed instead.\r
++\r
++Secondly, the macro is passed the entire item, *sans* attributes.  It is the derivation macro's job to parse the item correctly.\r
++\r
++Third, each derivation macro is expected to result in zero or more items, not including the item itself.  As a result, it is *not* possible to mutate the item in any way, or attach additional attributes to it.\r
++\r
++Finally, `@impl` is merely a trick to pack multiple, different functions into a single macro.  The sequence has no special meaning; it is simply *distinct* from the usual invocation syntax.\r
++*/\r
++#![cfg_attr(not(feature = "std"), no_std)]\r
++\r
++#[doc(hidden)]\r
++#[macro_export]\r
++macro_rules! custom_derive {\r
++    /*\r
++\r
++    > **Convention**: a capture named `$fixed` is used for any part of a recursive rule that is needed in the terminal case, but is not actually being *used* for the recursive part.  This avoids having to constantly repeat the full capture pattern (and makes changing it easier).\r
++\r
++    # Primary Invocation Forms\r
++\r
++    These need to catch any valid form of struct or enum.\r
++\r
++    */\r
++    (\r
++        $(#[$($attrs:tt)*])*\r
++        enum $($it:tt)*\r
++    ) => {\r
++        custom_derive! {\r
++            @split_attrs\r
++            ($(#[$($attrs)*],)*), (), (),\r
++            (enum $($it)*)\r
++        }\r
++    };\r
++\r
++    (\r
++        $(#[$($attrs:tt)*])*\r
++        pub $($it:tt)*\r
++    ) => {\r
++        custom_derive! {\r
++            @split_attrs\r
++            ($(#[$($attrs)*],)*), (), (),\r
++            (pub $($it)*)\r
++        }\r
++    };\r
++\r
++    (\r
++        $(#[$($attrs:tt)*])*\r
++        struct $($it:tt)*\r
++    ) => {\r
++        custom_derive! {\r
++            @split_attrs\r
++            ($(#[$($attrs)*],)*), (), (),\r
++            (struct $($it)*)\r
++        }\r
++    };\r
++\r
++    /*\r
++\r
++    # `@split_attrs`\r
++\r
++    This is responsible for dividing all attributes on an item into two groups:\r
++\r
++    - `#[derive(...)]`\r
++    - Everything else.\r
++\r
++    As part of this, it also explodes `#[derive(A, B(..), C, ...)]` into `A, B(..), C, ...`.  This is to simplify the next stage.\r
++\r
++    */\r
++    (\r
++        @split_attrs\r
++        (),\r
++        $non_derives:tt,\r
++        $derives:tt,\r
++        $it:tt\r
++    ) => {\r
++        custom_derive! {\r
++            @split_derive_attrs\r
++            { $non_derives, $it },\r
++            $derives,\r
++            (),\r
++            ()\r
++        }\r
++    };\r
++\r
++    (\r
++        @split_attrs\r
++        (#[derive($($new_drv:ident $(($($new_drv_args:tt)*))*),* $(,)*)], $(#[$($attrs:tt)*],)*),\r
++        $non_derives:tt,\r
++        ($($derives:ident,)*),\r
++        $it:tt\r
++    ) => {\r
++        custom_derive! {\r
++            @split_attrs\r
++            ($(#[$($attrs)*],)*),\r
++            $non_derives,\r
++            ($($derives,)* $($new_drv $(($($new_drv_args)*))*,)*),\r
++            $it\r
++        }\r
++    };\r
++\r
++    (\r
++        @split_attrs\r
++        (#[$new_attr:meta], $(#[$($attrs:tt)*],)*),\r
++        ($($non_derives:tt)*),\r
++        $derives:tt,\r
++        $it:tt\r
++    ) => {\r
++        custom_derive! {\r
++            @split_attrs\r
++            ($(#[$($attrs)*],)*),\r
++            ($($non_derives)* #[$new_attr],),\r
++            $derives,\r
++            $it\r
++        }\r
++    };\r
++\r
++    /*\r
++\r
++    # `@split_derive_attrs`\r
++\r
++    This is responsible for taking the list of derivation attributes and splitting them into "built-in" and "custom" groups.\r
++\r
++    The list of built-in derives currently supported is: Clone, Hash, RustcEncodable, RustcDecodable, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Send, Sync, Copy.\r
++\r
++    Anything not on that list is considered "custom".\r
++\r
++    And yes, as far as I can see, we *have* to have a separate rule for each of those.  What I wouldn't give for an alternation pattern...\r
++    */\r
++\r
++    (@split_derive_attrs\r
++        { ($(#[$($non_derives:tt)*],)*), ($($it:tt)*) },\r
++        (), (), ($($user_drvs:tt)*)\r
++    ) => {\r
++        custom_derive! {\r
++            @as_item\r
++            $(#[$($non_derives)*])*\r
++            $($it)*\r
++        }\r
++\r
++        custom_derive! {\r
++            @expand_user_drvs\r
++            ($($user_drvs)*), ($($it)*)\r
++        }\r
++    };\r
++\r
++    (@split_derive_attrs\r
++        { ($(#[$($non_derives:tt)*],)*), ($($it:tt)*) },\r
++        (), ($($bi_drvs:ident,)+), ($($user_drvs:tt)*)\r
++    ) => {\r
++        custom_derive! {\r
++            @as_item\r
++            #[derive($($bi_drvs,)+)]\r
++            $(#[$($non_derives)*])*\r
++            $($it)*\r
++        }\r
++\r
++        custom_derive! {\r
++            @expand_user_drvs\r
++            ($($user_drvs)*), ($($it)*)\r
++        }\r
++    };\r
++\r
++    (@split_derive_attrs\r
++        $fixed:tt,\r
++        (Hash, $($tail:tt)*), ($($bi_drvs:ident,)*), $user_drvs:tt\r
++    ) => {\r
++        custom_derive! {\r
++            @split_derive_attrs\r
++            $fixed,\r
++            ($($tail)*), ($($bi_drvs,)* Hash,), $user_drvs\r
++        }\r
++    };\r
++\r
++    (@split_derive_attrs\r
++        $fixed:tt,\r
++        (Clone, $($tail:tt)*), ($($bi_drvs:ident,)*), $user_drvs:tt\r
++    ) => {\r
++        custom_derive! {\r
++            @split_derive_attrs\r
++            $fixed,\r
++            ($($tail)*), ($($bi_drvs,)* Clone,), $user_drvs\r
++        }\r
++    };\r
++\r
++    (@split_derive_attrs\r
++        $fixed:tt,\r
++        (RustcEncodable, $($tail:tt)*), ($($bi_drvs:ident,)*), $user_drvs:tt\r
++    ) => {\r
++        custom_derive! {\r
++            @split_derive_attrs\r
++            $fixed,\r
++            ($($tail)*), ($($bi_drvs,)* RustcEncodable,), $user_drvs\r
++        }\r
++    };\r
++\r
++    (@split_derive_attrs\r
++        $fixed:tt,\r
++        (RustcDecodable, $($tail:tt)*), ($($bi_drvs:ident,)*), $user_drvs:tt\r
++    ) => {\r
++        custom_derive! {\r
++            @split_derive_attrs\r
++            $fixed,\r
++            ($($tail)*), ($($bi_drvs,)* RustcDecodable,), $user_drvs\r
++        }\r
++    };\r
++\r
++    (@split_derive_attrs\r
++        $fixed:tt,\r
++        (PartialEq, $($tail:tt)*), ($($bi_drvs:ident,)*), $user_drvs:tt\r
++    ) => {\r
++        custom_derive! {\r
++            @split_derive_attrs\r
++            $fixed,\r
++            ($($tail)*), ($($bi_drvs,)* PartialEq,), $user_drvs\r
++        }\r
++    };\r
++\r
++    (@split_derive_attrs\r
++        $fixed:tt,\r
++        (Eq, $($tail:tt)*), ($($bi_drvs:ident,)*), $user_drvs:tt\r
++    ) => {\r
++        custom_derive! {\r
++            @split_derive_attrs\r
++            $fixed,\r
++            ($($tail)*), ($($bi_drvs,)* Eq,), $user_drvs\r
++        }\r
++    };\r
++\r
++    (@split_derive_attrs\r
++        $fixed:tt,\r
++        (PartialOrd, $($tail:tt)*), ($($bi_drvs:ident,)*), $user_drvs:tt\r
++    ) => {\r
++        custom_derive! {\r
++            @split_derive_attrs\r
++            $fixed,\r
++            ($($tail)*), ($($bi_drvs,)* PartialOrd,), $user_drvs\r
++        }\r
++    };\r
++\r
++    (@split_derive_attrs\r
++        $fixed:tt,\r
++        (Ord, $($tail:tt)*), ($($bi_drvs:ident,)*), $user_drvs:tt\r
++    ) => {\r
++        custom_derive! {\r
++            @split_derive_attrs\r
++            $fixed,\r
++            ($($tail)*), ($($bi_drvs,)* Ord,), $user_drvs\r
++        }\r
++    };\r
++\r
++    (@split_derive_attrs\r
++        $fixed:tt,\r
++        (Debug, $($tail:tt)*), ($($bi_drvs:ident,)*), $user_drvs:tt\r
++    ) => {\r
++        custom_derive! {\r
++            @split_derive_attrs\r
++            $fixed,\r
++            ($($tail)*), ($($bi_drvs,)* Debug,), $user_drvs\r
++        }\r
++    };\r
++\r
++    (@split_derive_attrs\r
++        $fixed:tt,\r
++        (Default, $($tail:tt)*), ($($bi_drvs:ident,)*), $user_drvs:tt\r
++    ) => {\r
++        custom_derive! {\r
++            @split_derive_attrs\r
++            $fixed,\r
++            ($($tail)*), ($($bi_drvs,)* Default,), $user_drvs\r
++        }\r
++    };\r
++\r
++    (@split_derive_attrs\r
++        $fixed:tt,\r
++        (Send ,$($tail:tt)*), ($($bi_drvs:ident,)*), $user_drvs:tt\r
++    ) => {\r
++        custom_derive! {\r
++            @split_derive_attrs\r
++            $fixed,\r
++            ($($tail)*), ($($bi_drvs,)* Send,), $user_drvs\r
++        }\r
++    };\r
++\r
++    (@split_derive_attrs\r
++        $fixed:tt,\r
++        (Sync, $($tail:tt)*), ($($bi_drvs:ident,)*), $user_drvs:tt\r
++    ) => {\r
++        custom_derive! {\r
++            @split_derive_attrs\r
++            $fixed,\r
++            ($($tail)*), ($($bi_drvs,)* Sync,), $user_drvs\r
++        }\r
++    };\r
++\r
++    (@split_derive_attrs\r
++        $fixed:tt,\r
++        (Copy, $($tail:tt)*), ($($bi_drvs:ident,)*), $user_drvs:tt\r
++    ) => {\r
++        custom_derive! {\r
++            @split_derive_attrs\r
++            $fixed,\r
++            ($($tail)*), ($($bi_drvs,)* Copy,), $user_drvs\r
++        }\r
++    };\r
++\r
++    /*\r
++\r
++    ## Custom Derivations\r
++\r
++    Now we can handle the custom derivations.  There are two forms we care about: those *with* an argument, and those *without*.\r
++\r
++    The *reason* we care is that, in order to simplify the derivation macros, we want to detect the argument-less case and generate an empty pair of parens.\r
++\r
++    */\r
++    (@split_derive_attrs\r
++        $fixed:tt,\r
++        ($new_user:ident, $($tail:tt)*), $bi_drvs:tt, ($($user_drvs:tt)*)\r
++    ) => {\r
++        custom_derive! {\r
++            @split_derive_attrs\r
++            $fixed, ($($tail)*), $bi_drvs, ($($user_drvs)* $new_user(),)\r
++        }\r
++    };\r
++\r
++    (@split_derive_attrs\r
++        $fixed:tt,\r
++        ($new_user:ident ($($new_user_args:tt)*), $($tail:tt)*), $bi_drvs:tt, ($($user_drvs:tt)*)\r
++    ) => {\r
++        custom_derive! {\r
++            @split_derive_attrs\r
++            $fixed, ($($tail)*), $bi_drvs, ($($user_drvs)* $new_user($($new_user_args)*),)\r
++        }\r
++    };\r
++\r
++    /*\r
++\r
++    # `@expand_user_drvs`\r
++\r
++    Finally, we have a recursive rule for expanding user derivations.  This is basically just using the derivation name as a macro identifier.\r
++\r
++    This *has* to be recursive because we need to expand two independent repetition sequences simultaneously, and this causes `macro_rules!` to throw a wobbly.  Don't want that.  So, recursive it is.\r
++\r
++    */\r
++    (@expand_user_drvs\r
++        (), ($($it:tt)*)\r
++    ) => {};\r
++\r
++    (@expand_user_drvs\r
++        ($user_drv:ident $arg:tt, $($tail:tt)*), ($($it:tt)*)\r
++    ) => {\r
++        $user_drv! { $arg $($it)* }\r
++        custom_derive! {\r
++            @expand_user_drvs\r
++            ($($tail)*), ($($it)*)\r
++        }\r
++    };\r
++\r
++    /*\r
++\r
++    # Miscellaneous Rules\r
++\r
++    */\r
++    (@as_item $($i:item)*) => {$($i)*};\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6af19ab329883c9367f6471655c21b1394469098
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++/*\r
++Copyright ⓒ 2015 rust-custom-derive contributors.\r
++\r
++Licensed under the MIT license (see LICENSE or <http://opensource.org\r
++/licenses/MIT>) or the Apache License, Version 2.0 (see LICENSE of\r
++<http://www.apache.org/licenses/LICENSE-2.0>), at your option. All\r
++files in the project carrying such notice may not be copied, modified,\r
++or distributed except according to those terms.\r
++*/\r
++#[macro_use] extern crate custom_derive;\r
++\r
++macro_rules! Dummy {\r
++    ($($tts:tt)*) => {};\r
++}\r
++\r
++custom_derive! {\r
++    #[derive(Dummy)]\r
++    enum Foo { Bar }\r
++}\r
++\r
++#[test]\r
++fn test_empty_bi_derives() {\r
++    let _ = Foo::Bar;\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..65cef29c0094ec6848a15c528bc83f9cdebbe398
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,73 @@@
++/*\r
++Copyright ⓒ 2015 rust-custom-derive contributors.\r
++\r
++Licensed under the MIT license (see LICENSE or <http://opensource.org\r
++/licenses/MIT>) or the Apache License, Version 2.0 (see LICENSE of\r
++<http://www.apache.org/licenses/LICENSE-2.0>), at your option. All\r
++files in the project carrying such notice may not be copied, modified,\r
++or distributed except according to those terms.\r
++*/\r
++#[macro_use] extern crate custom_derive;\r
++\r
++macro_rules! EnumIterator {\r
++    (() $(pub)* enum $name:ident { $($body:tt)* }) => {\r
++        EnumIterator! {\r
++            @collect_variants ($name),\r
++            ($($body)*,) -> ()\r
++        }\r
++    };\r
++\r
++    (\r
++        @collect_variants ($name:ident),\r
++        ($(,)*) -> ($($var_names:ident,)*)\r
++    ) => {\r
++        type NameIter = ::std::vec::IntoIter<&'static str>;\r
++        type VariantIter = ::std::vec::IntoIter<$name>;\r
++\r
++        impl $name {\r
++            #[allow(dead_code)]\r
++            pub fn iter_variants() -> VariantIter {\r
++                vec![$($name::$var_names),*].into_iter()\r
++            }\r
++\r
++            #[allow(dead_code)]\r
++            pub fn iter_variant_names() -> NameIter {\r
++                vec![$(stringify!($var_names)),*].into_iter()\r
++            }\r
++        }\r
++    };\r
++\r
++    (\r
++        @collect_variants $fixed:tt,\r
++        ($var:ident $(= $_val:expr)*, $($tail:tt)*) -> ($($var_names:tt)*)\r
++    ) => {\r
++        EnumIterator! {\r
++            @collect_variants $fixed,\r
++            ($($tail)*) -> ($($var_names)* $var,)\r
++        }\r
++    };\r
++\r
++    (\r
++        @collect_variants ($name:ident),\r
++        ($var:ident $_struct:tt, $($tail:tt)*) -> ($($var_names:tt)*)\r
++    ) => {\r
++        const _error: () = concat!(\r
++            "cannot derive EnumIterator for ",\r
++            stringify!($name),\r
++            ", due to non-unitary variant ",\r
++            stringify!($var),\r
++            "."\r
++        );\r
++    };\r
++}\r
++\r
++custom_derive! {\r
++    #[derive(Debug, PartialEq, EnumIterator)]\r
++    enum Get { Up, Down, AllAround }\r
++}\r
++\r
++#[test]\r
++fn test_enum_iterator() {\r
++    let vs: Vec<_> = Get::iter_variant_names().zip(Get::iter_variants()).collect();\r
++    assert_eq!(&*vs, &[("Up", Get::Up), ("Down", Get::Down), ("AllAround", Get::AllAround)]);\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..41ad00455243ae8388850717da0ef3ca72068918
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,77 @@@
++/*\r
++Copyright ⓒ 2015 rust-custom-derive contributors.\r
++\r
++Licensed under the MIT license (see LICENSE or <http://opensource.org\r
++/licenses/MIT>) or the Apache License, Version 2.0 (see LICENSE of\r
++<http://www.apache.org/licenses/LICENSE-2.0>), at your option. All\r
++files in the project carrying such notice may not be copied, modified,\r
++or distributed except according to those terms.\r
++*/\r
++#[macro_use] extern crate custom_derive;\r
++\r
++trait TryFrom<Src>: Sized {\r
++    type Err;\r
++    fn try_from(src: Src) -> Result<Self, Self::Err>;\r
++}\r
++\r
++macro_rules! TryFrom {\r
++    (($prim:ty) $(pub)* enum $name:ident { $($body:tt)* }) => {\r
++        TryFrom! {\r
++            @collect_variants ($name, $prim),\r
++            ($($body)*,) -> ()\r
++        }\r
++    };\r
++\r
++    (\r
++        @collect_variants ($name:ident, $prim:ty),\r
++        ($(,)*) -> ($($var_names:ident,)*)\r
++    ) => {\r
++        impl TryFrom<$prim> for $name {\r
++            type Err = $prim;\r
++            fn try_from(src: $prim) -> Result<$name, $prim> {\r
++                $(\r
++                    if src == $name::$var_names as $prim {\r
++                        return Ok($name::$var_names);\r
++                    }\r
++                )*\r
++                Err(src)\r
++            }\r
++        }\r
++    };\r
++\r
++    (\r
++        @collect_variants $fixed:tt,\r
++        ($var:ident $(= $_val:expr)*, $($tail:tt)*) -> ($($var_names:tt)*)\r
++    ) => {\r
++        TryFrom! {\r
++            @collect_variants $fixed,\r
++            ($($tail)*) -> ($($var_names)* $var,)\r
++        }\r
++    };\r
++\r
++    (\r
++        @collect_variants ($name:ident),\r
++        ($var:ident $_struct:tt, $($tail:tt)*) -> ($($var_names:tt)*)\r
++    ) => {\r
++        const _error: () = concat!(\r
++            "cannot derive TryFrom for ",\r
++            stringify!($name),\r
++            ", due to non-unitary variant ",\r
++            stringify!($var),\r
++            "."\r
++        );\r
++    };\r
++}\r
++\r
++custom_derive! {\r
++    #[derive(Debug, PartialEq, TryFrom(u8))]\r
++    enum Get { Up, Down, AllAround }\r
++}\r
++\r
++#[test]\r
++fn test_try_from() {\r
++    assert_eq!(Get::try_from(0u8), Ok(Get::Up));\r
++    assert_eq!(Get::try_from(1u8), Ok(Get::Down));\r
++    assert_eq!(Get::try_from(2u8), Ok(Get::AllAround));\r
++    assert_eq!(Get::try_from(3u8), Err(3u8));\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3ff6242c1119cc8a4880666e7f98c98ef3127477
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,19 @@@
++/*\r
++Copyright ⓒ 2015 rust-custom-derive contributors.\r
++\r
++Licensed under the MIT license (see LICENSE or <http://opensource.org\r
++/licenses/MIT>) or the Apache License, Version 2.0 (see LICENSE of\r
++<http://www.apache.org/licenses/LICENSE-2.0>), at your option. All\r
++files in the project carrying such notice may not be copied, modified,\r
++or distributed except according to those terms.\r
++*/\r
++#[macro_use] extern crate custom_derive;\r
++extern crate rustc_serialize;\r
++\r
++custom_derive! {\r
++    #[derive(Clone, Hash, RustcEncodable, RustcDecodable, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Copy)]\r
++    pub struct Dummy(u32);\r
++}\r
++\r
++#[test]\r
++fn test_passthru_derive() {}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fddefca0a5e6497267b88d6b990d79b022737fd7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,378 @@@
++/*\r
++Copyright ⓒ 2015 rust-custom-derive contributors.\r
++\r
++Licensed under the MIT license (see LICENSE or <http://opensource.org\r
++/licenses/MIT>) or the Apache License, Version 2.0 (see LICENSE of\r
++<http://www.apache.org/licenses/LICENSE-2.0>), at your option. All\r
++files in the project carrying such notice may not be copied, modified,\r
++or distributed except according to those terms.\r
++*/\r
++#[macro_use] extern crate custom_derive;\r
++extern crate rustc_serialize;\r
++\r
++macro_rules! StableEncodable {\r
++    (\r
++        () $(pub)* enum $name:ident < $($tail:tt)*\r
++    ) => {\r
++        StableEncodable! {\r
++            @extract_gen_args (enum $name),\r
++            ($($tail)*)\r
++            -> bounds(), ty_clss(where)\r
++        }\r
++    };\r
++\r
++    (\r
++        () $(pub)* enum $name:ident { $($body:tt)* }\r
++    ) => {\r
++        StableEncodable! {\r
++            @impl enum $name,\r
++            bounds(),\r
++            ty_clss(),\r
++            { $($body)* }\r
++        }\r
++    };\r
++\r
++    (\r
++        () $(pub)* struct $name:ident { $($body:tt)* }\r
++    ) => {\r
++        StableEncodable! {\r
++            @impl struct $name,\r
++            bounds(),\r
++            ty_clss(),\r
++            { $($body)* }\r
++        }\r
++    };\r
++\r
++    (\r
++        () $(pub)* struct $name:ident < $($tail:tt)*\r
++    ) => {\r
++        StableEncodable! {\r
++            @extract_gen_args (struct $name),\r
++            ($($tail)*)\r
++            -> bounds(), ty_clss(where)\r
++        }\r
++    };\r
++\r
++    (\r
++        @impl enum $name:ident,\r
++        bounds($($bounds:tt)*),\r
++        ty_clss($($ty_clss:tt)*),\r
++        { $($body:tt)* }\r
++    ) => {\r
++        StableEncodable! {\r
++            @parse_variants (enum $name, bounds($($bounds)*), ty_clss($($ty_clss)*)),\r
++            0usize, ($($body)*,) -> ()\r
++        }\r
++    };\r
++\r
++    (\r
++        @impl struct $name:ident,\r
++        bounds($($bounds:tt)*),\r
++        ty_clss($($ty_clss:tt)*),\r
++        { $($fnames:ident: $_ftys:ty),* $(,)* }\r
++    ) => {\r
++        StableEncodable! {\r
++            @as_item\r
++            impl<$($bounds)*> rustc_serialize::Encodable for $name<$($bounds)*>\r
++            $($ty_clss)* {\r
++                fn encode<StableEncodableEncoder>(\r
++                    &self,\r
++                    s: &mut StableEncodableEncoder\r
++                ) -> Result<(), StableEncodableEncoder::Error>\r
++                where StableEncodableEncoder: rustc_serialize::Encoder {\r
++                    const NUM_FIELDS: usize = StableEncodable!(@count_tts $($fnames)*);\r
++                    try!(s.emit_struct(stringify!($name), NUM_FIELDS, |s| {\r
++                        // Poor man's enumerate!($($fnames)):\r
++                        let mut idx = 0;\r
++                        $(\r
++                            try!(s.emit_struct_field(stringify!($fnames), idx, |s| {\r
++                                self.$fnames.encode(s)\r
++                            }));\r
++                            idx += 1;\r
++                        )*\r
++                        let _ = idx;\r
++                        Ok(())\r
++                    }));\r
++                    Ok(())\r
++                }\r
++            }\r
++        }\r
++    };\r
++\r
++    (@as_item $i:item) => {$i};\r
++\r
++    (\r
++        @extract_gen_args ($kind:ident $name:ident),\r
++        (> { $($tail:tt)* })\r
++        -> bounds($($bounds:tt)*), ty_clss($($ty_clss:tt)*)\r
++    ) => {\r
++        StableEncodable! {\r
++            @impl $kind $name,\r
++            bounds($($bounds)*),\r
++            ty_clss($($ty_clss)*),\r
++            { $($tail)* }\r
++        }\r
++    };\r
++\r
++    (\r
++        @extract_gen_args $fixed:tt,\r
++        ($ty_name:ident: $($tail)*)\r
++        -> bounds($($bounds:tt)*), ty_clss($($ty_clss:tt)*)\r
++    ) => {\r
++        StableEncodable! {\r
++            @skip_inline_bound $fixed,\r
++            ($($tail)*)\r
++            -> bounds($($bounds)* $ty_name:),\r
++               ty_clss($($ty_clss)* $ty_name: ::rustc_serialize::Encodable,)\r
++        }\r
++    };\r
++\r
++    (\r
++        @extract_gen_args $fixed:tt,\r
++        ($ty_name:ident $($tail:tt)*)\r
++        -> bounds($($bounds:tt)*), ty_clss($($ty_clss:tt)*)\r
++    ) => {\r
++        StableEncodable! {\r
++            @extract_gen_args $fixed,\r
++            ($($tail)*)\r
++            -> bounds($($bounds)* $ty_name),\r
++               ty_clss($($ty_clss)* $ty_name: ::rustc_serialize::Encodable,)\r
++        }\r
++    };\r
++\r
++    (\r
++        @extract_gen_args $fixed:tt,\r
++        (, $($tail:tt)*)\r
++        -> bounds($($bounds:tt)*), ty_clss($($ty_clss:tt)*)\r
++    ) => {\r
++        StableEncodable! {\r
++            @extract_gen_args $fixed,\r
++            ($($tail)*)\r
++            -> bounds($($bounds)* ,), ty_clss($($ty_clss)*)\r
++        }\r
++    };\r
++\r
++    (\r
++        @extract_gen_args $fixed:tt,\r
++        ($lt:tt $($tail:tt)*)\r
++        -> bounds($($bounds:tt)*), ty_clss($($ty_clss:tt)*)\r
++    ) => {\r
++        StableEncodable! {\r
++            @extract_gen_args $fixed,\r
++            ($($tail)*)\r
++            -> bounds($($bounds)* $lt), ty_clss($($ty_clss)*)\r
++        }\r
++    };\r
++\r
++    (\r
++        @skip_inline_bound $fixed:tt,\r
++        (, $($tail:tt)*)\r
++        -> bounds($($bounds:tt)*), ty_clss($($ty_clss:tt)*)\r
++    ) => {\r
++        StableEncodable! {\r
++            @extract_gen_args $fixed,\r
++            ($($tail)*)\r
++            -> bounds($($bounds)* ,), ty_clss($($ty_clss)*)\r
++        }\r
++    };\r
++\r
++    (\r
++        @skip_inline_bound $fixed:tt,\r
++        (> { $($tail:tt)* })\r
++        -> bounds($($bounds:tt)*), ty_clss($($ty_clss:tt)*)\r
++    ) => {\r
++        StableEncodable! {\r
++            @impl $fixed,\r
++            bounds($($bounds)*),\r
++            ty_clss($($ty_clss)*),\r
++            { $($tail)* }\r
++        }\r
++    };\r
++\r
++    (\r
++        @parse_variants (enum $name:ident, bounds($($bounds:tt)*), ty_clss($($ty_clss:tt)*)),\r
++        $_id:expr, ($(,)*) -> ($($variants:tt)*)\r
++    ) => {\r
++        StableEncodable! {\r
++            @as_item\r
++            impl<$($bounds)*> rustc_serialize::Encodable for $name<$($bounds)*>\r
++            $($ty_clss)* {\r
++                fn encode<StableEncodableEncoder>(\r
++                    &self,\r
++                    s: &mut StableEncodableEncoder)\r
++                -> Result<(), StableEncodableEncoder::Error>\r
++                where StableEncodableEncoder: rustc_serialize::Encoder {\r
++                    s.emit_enum(stringify!($name), |s| {\r
++                        $(\r
++                            StableEncodable!(@encode_variant $name, $variants, self, s);\r
++                        )*\r
++                        unreachable!();\r
++                    })\r
++                }\r
++            }\r
++        }\r
++    };\r
++\r
++    (\r
++        @parse_variants $fixed:tt,\r
++        $id:expr, ($var_name:ident, $($tail:tt)*) -> ($($variants:tt)*)\r
++    ) => {\r
++        StableEncodable! {\r
++            @parse_variants $fixed,\r
++            ($id + 1usize), ($($tail)*) -> ($($variants)* ($var_name, $id))\r
++        }\r
++    };\r
++\r
++    (\r
++        @parse_variants $fixed:tt,\r
++        $id:expr, ($var_name:ident($(,)*), $($tail:tt)*) -> ($($variants:tt)*)\r
++    ) => {\r
++        StableEncodable! {\r
++            @parse_variants $fixed,\r
++            ($id + 1usize), ($($tail)*) -> ($($variants)*\r
++                ($var_name, $id))\r
++        }\r
++    };\r
++\r
++    (\r
++        @parse_variants $fixed:tt,\r
++        $id:expr, ($var_name:ident($_vta:ty), $($tail:tt)*) -> ($($variants:tt)*)\r
++    ) => {\r
++        StableEncodable! {\r
++            @parse_variants $fixed,\r
++            ($id + 1usize), ($($tail)*) -> ($($variants)*\r
++                ($var_name, $id, (a)))\r
++        }\r
++    };\r
++\r
++    (\r
++        @parse_variants $fixed:tt,\r
++        $id:expr, ($var_name:ident($_vta:ty, $_vtb:ty), $($tail:tt)*) -> ($($variants:tt)*)\r
++    ) => {\r
++        StableEncodable! {\r
++            @parse_variants $fixed,\r
++            ($id + 1usize), ($($tail)*) -> ($($variants)*\r
++                ($var_name, $id, (a, b)))\r
++        }\r
++    };\r
++\r
++    (\r
++        @parse_variants $fixed:tt,\r
++        $id:expr, ($var_name:ident($_vta:ty, $_vtb:ty, $_vtc:ty), $($tail:tt)*) -> ($($variants:tt)*)\r
++    ) => {\r
++        StableEncodable! {\r
++            @parse_variants $fixed,\r
++            ($id + 1usize), ($($tail)*) -> ($($variants)*\r
++                ($var_name, $id, (a, b, c)))\r
++        }\r
++    };\r
++\r
++    (\r
++        @parse_variants $fixed:tt,\r
++        $id:expr, ($var_name:ident { $($vfn:ident: $_vft:ty),* $(,)* }, $($tail:tt)*) -> ($($variants:tt)*)\r
++    ) => {\r
++        StableEncodable! {\r
++            @parse_variants $fixed,\r
++            ($id + 1usize), ($($tail)*) -> ($($variants)*\r
++                ($var_name, $id, {$($vfn),*}))\r
++        }\r
++    };\r
++\r
++    (\r
++        @encode_variant $name:ident,\r
++        ($var_name:ident, $var_id:expr),\r
++        $self_:expr, $s:ident\r
++    ) => {\r
++        {\r
++            if let $name::$var_name = *$self_ {\r
++                return $s.emit_enum_variant(stringify!($var_name), $var_id, 0, |_| Ok(()));\r
++            }\r
++        }\r
++    };\r
++\r
++    (\r
++        @encode_variant $name:ident,\r
++        ($var_name:ident, $var_id:expr, ($($tup_elems:ident),*)),\r
++        $self_:expr, $s:ident\r
++    ) => {\r
++        {\r
++            if let $name::$var_name($(ref $tup_elems),*) = *$self_ {\r
++                return $s.emit_enum_variant(\r
++                    stringify!($var_name),\r
++                    $var_id,\r
++                    StableEncodable!(@count_tts $($tup_elems)*),\r
++                    |s| {\r
++                        let mut idx = 0;\r
++                        $(\r
++                            try!(s.emit_enum_variant_arg(idx, |s| $tup_elems.encode(s)));\r
++                            idx += 1;\r
++                        )*\r
++                        let _ = idx;\r
++                        Ok(())\r
++                    }\r
++                );\r
++            }\r
++        }\r
++    };\r
++\r
++    (\r
++        @encode_variant $name:ident,\r
++        ($var_name:ident, $var_id:expr, {$($str_fields:ident),*}),\r
++        $self_:expr, $s:ident\r
++    ) => {\r
++        {\r
++            if let $name::$var_name { $(ref $str_fields),* } = *$self_ {\r
++                return $s.emit_enum_struct_variant(\r
++                    stringify!($var_name),\r
++                    $var_id,\r
++                    StableEncodable!(@count_tts $($str_fields)*),\r
++                    |s| {\r
++                        let mut idx = 0;\r
++                        $(\r
++                            try!(s.emit_enum_struct_variant_field(\r
++                                stringify!($str_fields),\r
++                                idx,\r
++                                |s| $str_fields.encode(s)\r
++                            ));\r
++                            idx += 1;\r
++                        )*\r
++                        let _ = idx;\r
++                        Ok(())\r
++                    }\r
++                );\r
++            }\r
++        }\r
++    };\r
++\r
++    (@count_tts) => {0usize};\r
++    (@count_tts $_tt:tt $($tail:tt)*) => {1usize + StableEncodable!(@count_tts $($tail)*)};\r
++}\r
++\r
++custom_derive! {\r
++    #[derive(Debug, StableEncodable)]\r
++    struct LazyEg<A> { a: A, b: i32, c: (u8, u8, u8) }\r
++}\r
++\r
++custom_derive! {\r
++    #[derive(Clone, StableEncodable)]\r
++    enum Wonky<S> { Flim, Flam, Flom(i32), Bees { say: S } }\r
++}\r
++\r
++#[test]\r
++fn test_stable_encodable() {\r
++    macro_rules! json {\r
++        ($e:expr) => (rustc_serialize::json::encode(&$e).unwrap());\r
++    }\r
++\r
++    let lazy_eg = LazyEg {\r
++        a: String::from("Oh hai!"),\r
++        b: 42,\r
++        c: (1, 3, 0),\r
++    };\r
++    assert_eq!(&*json!(lazy_eg), r#"{"a":"Oh hai!","b":42,"c":[1,3,0]}"#);\r
++\r
++    assert_eq!(&*json!(Wonky::Flim::<()>), r#""Flim""#);\r
++    assert_eq!(&*json!(Wonky::Flam::<()>), r#""Flam""#);\r
++    assert_eq!(&*json!(Wonky::Flom::<()>(42)), r#"{"variant":"Flom","fields":[42]}"#);\r
++    assert_eq!(&*json!(Wonky::Bees{say:"aaaaah!"}), r#"{"variant":"Bees","fields":["aaaaah!"]}"#);\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ba5d09727d037cf84fe92c909b3a55d58e0acd06
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++/*\r
++Copyright ⓒ 2015 rust-custom-derive contributors.\r
++\r
++Licensed under the MIT license (see LICENSE or <http://opensource.org\r
++/licenses/MIT>) or the Apache License, Version 2.0 (see LICENSE of\r
++<http://www.apache.org/licenses/LICENSE-2.0>), at your option. All\r
++files in the project carrying such notice may not be copied, modified,\r
++or distributed except according to those terms.\r
++*/\r
++#[macro_use] extern crate custom_derive;\r
++\r
++macro_rules! Dummy {\r
++    ($($tts:tt)*) => {};\r
++}\r
++\r
++custom_derive! {\r
++    #[derive(Dummy,)]\r
++    enum Foo { Bar }\r
++}\r
++\r
++#[test]\r
++fn test_trailing_comma() {\r
++    let _ = Foo::Bar;\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2060827713ba07a0781f13f3d7149bc6f2d37713
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"38d3a55d9a7a456748f2a3912c0941a5d9a68006eb15b3c3c9836b8420dc102d"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..31d92970348f807d4af394f6bb7ce686de1937d1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,45 @@@
++language: rust
++rust:
++- stable
++- beta
++- nightly
++# Oldest supported version for all features.
++# Use of https://github.com/rust-lang/rfcs/pull/16
++- 1.13.0
++# Oldest supported version as dependency, with no features, tests, or examples.
++- 1.10.0
++
++sudo: false
++cache: cargo
++addons:
++  apt:
++    packages:
++    - libcurl4-openssl-dev
++    - libelf-dev
++    - libdw-dev
++
++before_script:
++- |
++  pip install 'travis-cargo<0.2' --user &&
++  export PATH=$HOME/.local/bin:$PATH
++
++script:
++- travis-cargo build -- $FEATURES
++- travis-cargo --skip 1.10.0 test -- $FEATURES
++
++after_success:
++- travis-cargo --only stable doc
++- travis-cargo --only stable doc-upload
++
++env:
++  global:
++  - secure: ncxJbvJM1vCZfcEftjsFKJMxxhKLgWKaR8Go9AMo0VB5fB2XVW/6NYO5bQEEYpOf1Nc/+2FbI2+Dkz0S/mJpUcNSfBgablCHgwU2sHse7KsoaqfHj2mf1E3exjzSHoP96hPGicC5zAjSXFjCgJPOUSGqqRaJ7z5AsJLhJT6LuK7QpvwPBZzklUN8T+n1sVmws8TNmRIbaniq/q6wYHANHcy6Dl59dx4sKwniUGiZdUhCiddVpoxbECSxc0A8mN2pk7/aW+WGxK3goBs5ZF7+JXF318F62pDcXQmR5CX6WdpenIcJ25g1Vg1WhQ4Ifpe17CN0bfxV8ShuzrQUThCDMffZCo9XySBtODdEowwK1UIpjnFLfIxjOs45Cd8o3tM2j0CfvtnjOz6BCdUU0qiwNPPNx0wFkx3ZiOfSh+FhBhvyPM12HN2tdN0esgVBItFmEci+sSIIXqjVL6DNiu5zTjbu0bs6COwlUWdmL6vmsZtq5tl7Cno9+C3szxRVAkShGydd04l9NYjqNEzTa1EPG50OsnVRKGdRiFzSxhc3BWExNKvcQ4v867t6/PpPkW6s4oXmYI3+De+8O7ExWc6a4alcrDXKlMs5fCb5Pcd4Ju9kowcjkoJo5yf2wW3Ox5R8SJpaEEpvyhx5O/qtIxjhHNzeo8Wsr/6gdNDv20r91TI=
++  - TRAVIS_CARGO_NIGHTLY_FEATURE=""
++  matrix:
++  - FEATURES=--features=backtrace
++  - FEATURES=--no-default-features
++
++matrix:
++  exclude:
++  - env: FEATURES=--features=backtrace
++    rust: 1.10.0
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5e1422941fcd03f9afff25d1370033ccd9d4f0bb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,109 @@@
++# 0.11.0-rc.2
++
++- [Make `ErrorChainIter`'s field private](https://github.com/brson/error-chain/issues/178)
++- [Rename `ErrorChainIter` to `Iter`](https://github.com/brson/error-chain/issues/168)
++- [Implement `Debug` for `ErrorChainIter`](https://github.com/brson/error-chain/issues/169)
++- [Rename `ChainedError::display` to `display_chain`](https://github.com/brson/error-chain/issues/180)
++- [Add a new method for `Error`: `chain_err`.](https://github.com/brson/error-chain/pull/141)
++- [Allow `chain_err` to be used on `Option<T>`](https://github.com/brson/error-chain/pull/156)
++- [Add support for creating an error chain on boxed trait errors (`Box<Error>`)](https://github.com/brson/error-chain/pull/156)
++- [Remove lint for unused doc comment.](https://github.com/brson/error-chain/pull/199)
++
++# 0.10.0
++
++- [Add a new constructor for `Error`: `with_chain`.](https://github.com/brson/error-chain/pull/126)
++- [Add the `ensure!` macro.](https://github.com/brson/error-chain/pull/135)
++
++# 0.9.0
++
++- Revert [Add a `Sync` bound to errors](https://github.com/brson/error-chain/pull/110)
++
++# 0.8.1
++
++- Add crates.io categorie.
++
++# 0.8.0
++
++- [Add a `Sync` bound to errors](https://github.com/brson/error-chain/pull/110)
++- [Add `ChainedError::display` to format error chains](https://github.com/brson/error-chain/pull/113)
++
++# 0.7.2
++
++- Add `quick_main!` (#88).
++- `allow(unused)` for the `Result` wrapper.
++- Minimum rust version supported is now 1.10 on some conditions (#103).
++
++# 0.7.1
++
++- [Add the `bail!` macro](https://github.com/brson/error-chain/pull/76)
++
++# 0.7.0
++
++- [Rollback several design changes to fix regressions](https://github.com/brson/error-chain/pull/75)
++- New `Variant(Error) #[attrs]` for `links` and `foreign_links`.
++- Hide implementation details from the doc.
++- Always generate `Error::backtrace`.
++
++# 0.6.2
++
++- Allow dead code.
++
++# 0.6.1
++
++- Fix wrong trait constraint in ResultExt implementation (#66).
++
++# 0.6.0
++
++- Conditional compilation for error variants.
++- Backtrace generation is now a feature.
++- More standard trait implementations for extra convenience.
++- Remove ChainErr.
++- Remove need to specify `ErrorKind` in `links {}`.
++- Add ResultExt trait.
++- Error.1 is a struct instead of a tuple.
++- Error is now a struct.
++- The declarations order is more flexible.
++- Way better error reporting when there is a syntax error in the macro call.
++- `Result` generation can be disabled.
++- At most one declaration of each type can be present.
++
++# 0.5.0
++
++- [Only generate backtraces with RUST_BACKTRACE set](https://github.com/brson/error-chain/pull/27)
++- [Fixup matching, disallow repeating "types" section](https://github.com/brson/error-chain/pull/26)
++- [Fix tests on stable/beta](https://github.com/brson/error-chain/pull/28)
++- [Only deploy docs when tagged](https://github.com/brson/error-chain/pull/30)
++
++Contributors: benaryorg, Brian Anderson, Georg Brandl
++
++# 0.4.2
++
++- [Fix the resolution of the ErrorKind description method](https://github.com/brson/error-chain/pull/24)
++
++Contributors: Brian Anderson
++
++# 0.4.1 (yanked)
++
++- [Fix a problem with resolving methods of the standard Error type](https://github.com/brson/error-chain/pull/22)
++
++Contributors: Brian Anderson
++
++# 0.4.0 (yanked)
++
++- [Remove the foreign link description and forward to the foreign error](https://github.com/brson/error-chain/pull/19)
++- [Allow missing sections](https://github.com/brson/error-chain/pull/17)
++
++Contributors: Brian Anderson, Taylor Cramer
++
++# 0.3.0
++
++- [Forward Display implementation for foreign errors](https://github.com/brson/error-chain/pull/13)
++
++Contributors: Brian Anderson, Taylor Cramer
++
++# 0.2.2
++
++- [Don't require `types` section in macro invocation](https://github.com/brson/error-chain/pull/8)
++- [Add "quick start" to README](https://github.com/brson/error-chain/pull/9)
++
++Contributors: Brian Anderson, Jake Shadle, Nate Mara
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1cfe7b3cdd254d206c3b31b861ae9ef436f6f84a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,32 @@@
++# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
++#
++# When uploading crates to the registry Cargo will automatically
++# "normalize" Cargo.toml files for maximal compatibility
++# with all versions of Cargo and also rewrite `path` dependencies
++# to registry (e.g. crates.io) dependencies
++#
++# If you believe there's an error in this file please file an
++# issue against the rust-lang/cargo repository. If you're
++# editing this file be aware that the upstream Cargo.toml
++# will likely look very different (and much more reasonable)
++
++[package]
++name = "error-chain"
++version = "0.11.0-rc.2"
++authors = ["Brian Anderson <banderson@mozilla.com>", "Paul Colomiets <paul@colomiets.name>", "Colin Kiegel <kiegel@gmx.de>", "Yamakaky <yamakaky@yamaworld.fr>"]
++description = "Yet another error boilerplate library."
++documentation = "https://docs.rs/error-chain"
++readme = "README.md"
++keywords = ["error"]
++categories = ["rust-patterns"]
++license = "MIT/Apache-2.0"
++repository = "https://github.com/brson/error-chain"
++[dependencies.backtrace]
++version = "0.3"
++optional = true
++
++[features]
++example_generated = []
++default = ["backtrace", "example_generated"]
++[badges.travis-ci]
++repository = "brson/error-chain"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16fe87b06e802f094b3fbb0894b137bca2b16ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++                              Apache License
++                        Version 2.0, January 2004
++                     http://www.apache.org/licenses/
++
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++1. Definitions.
++
++   "License" shall mean the terms and conditions for use, reproduction,
++   and distribution as defined by Sections 1 through 9 of this document.
++
++   "Licensor" shall mean the copyright owner or entity authorized by
++   the copyright owner that is granting the License.
++
++   "Legal Entity" shall mean the union of the acting entity and all
++   other entities that control, are controlled by, or are under common
++   control with that entity. For the purposes of this definition,
++   "control" means (i) the power, direct or indirect, to cause the
++   direction or management of such entity, whether by contract or
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the
++   outstanding shares, or (iii) beneficial ownership of such entity.
++
++   "You" (or "Your") shall mean an individual or Legal Entity
++   exercising permissions granted by this License.
++
++   "Source" form shall mean the preferred form for making modifications,
++   including but not limited to software source code, documentation
++   source, and configuration files.
++
++   "Object" form shall mean any form resulting from mechanical
++   transformation or translation of a Source form, including but
++   not limited to compiled object code, generated documentation,
++   and conversions to other media types.
++
++   "Work" shall mean the work of authorship, whether in Source or
++   Object form, made available under the License, as indicated by a
++   copyright notice that is included in or attached to the work
++   (an example is provided in the Appendix below).
++
++   "Derivative Works" shall mean any work, whether in Source or Object
++   form, that is based on (or derived from) the Work and for which the
++   editorial revisions, annotations, elaborations, or other modifications
++   represent, as a whole, an original work of authorship. For the purposes
++   of this License, Derivative Works shall not include works that remain
++   separable from, or merely link (or bind by name) to the interfaces of,
++   the Work and Derivative Works thereof.
++
++   "Contribution" shall mean any work of authorship, including
++   the original version of the Work and any modifications or additions
++   to that Work or Derivative Works thereof, that is intentionally
++   submitted to Licensor for inclusion in the Work by the copyright owner
++   or by an individual or Legal Entity authorized to submit on behalf of
++   the copyright owner. For the purposes of this definition, "submitted"
++   means any form of electronic, verbal, or written communication sent
++   to the Licensor or its representatives, including but not limited to
++   communication on electronic mailing lists, source code control systems,
++   and issue tracking systems that are managed by, or on behalf of, the
++   Licensor for the purpose of discussing and improving the Work, but
++   excluding communication that is conspicuously marked or otherwise
++   designated in writing by the copyright owner as "Not a Contribution."
++
++   "Contributor" shall mean Licensor and any individual or Legal Entity
++   on behalf of whom a Contribution has been received by Licensor and
++   subsequently incorporated within the Work.
++
++2. Grant of Copyright License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   copyright license to reproduce, prepare Derivative Works of,
++   publicly display, publicly perform, sublicense, and distribute the
++   Work and such Derivative Works in Source or Object form.
++
++3. Grant of Patent License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   (except as stated in this section) patent license to make, have made,
++   use, offer to sell, sell, import, and otherwise transfer the Work,
++   where such license applies only to those patent claims licensable
++   by such Contributor that are necessarily infringed by their
++   Contribution(s) alone or by combination of their Contribution(s)
++   with the Work to which such Contribution(s) was submitted. If You
++   institute patent litigation against any entity (including a
++   cross-claim or counterclaim in a lawsuit) alleging that the Work
++   or a Contribution incorporated within the Work constitutes direct
++   or contributory patent infringement, then any patent licenses
++   granted to You under this License for that Work shall terminate
++   as of the date such litigation is filed.
++
++4. Redistribution. You may reproduce and distribute copies of the
++   Work or Derivative Works thereof in any medium, with or without
++   modifications, and in Source or Object form, provided that You
++   meet the following conditions:
++
++   (a) You must give any other recipients of the Work or
++       Derivative Works a copy of this License; and
++
++   (b) You must cause any modified files to carry prominent notices
++       stating that You changed the files; and
++
++   (c) You must retain, in the Source form of any Derivative Works
++       that You distribute, all copyright, patent, trademark, and
++       attribution notices from the Source form of the Work,
++       excluding those notices that do not pertain to any part of
++       the Derivative Works; and
++
++   (d) If the Work includes a "NOTICE" text file as part of its
++       distribution, then any Derivative Works that You distribute must
++       include a readable copy of the attribution notices contained
++       within such NOTICE file, excluding those notices that do not
++       pertain to any part of the Derivative Works, in at least one
++       of the following places: within a NOTICE text file distributed
++       as part of the Derivative Works; within the Source form or
++       documentation, if provided along with the Derivative Works; or,
++       within a display generated by the Derivative Works, if and
++       wherever such third-party notices normally appear. The contents
++       of the NOTICE file are for informational purposes only and
++       do not modify the License. You may add Your own attribution
++       notices within Derivative Works that You distribute, alongside
++       or as an addendum to the NOTICE text from the Work, provided
++       that such additional attribution notices cannot be construed
++       as modifying the License.
++
++   You may add Your own copyright statement to Your modifications and
++   may provide additional or different license terms and conditions
++   for use, reproduction, or distribution of Your modifications, or
++   for any such Derivative Works as a whole, provided Your use,
++   reproduction, and distribution of the Work otherwise complies with
++   the conditions stated in this License.
++
++5. Submission of Contributions. Unless You explicitly state otherwise,
++   any Contribution intentionally submitted for inclusion in the Work
++   by You to the Licensor shall be under the terms and conditions of
++   this License, without any additional terms or conditions.
++   Notwithstanding the above, nothing herein shall supersede or modify
++   the terms of any separate license agreement you may have executed
++   with Licensor regarding such Contributions.
++
++6. Trademarks. This License does not grant permission to use the trade
++   names, trademarks, service marks, or product names of the Licensor,
++   except as required for reasonable and customary use in describing the
++   origin of the Work and reproducing the content of the NOTICE file.
++
++7. Disclaimer of Warranty. Unless required by applicable law or
++   agreed to in writing, Licensor provides the Work (and each
++   Contributor provides its Contributions) on an "AS IS" BASIS,
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++   implied, including, without limitation, any warranties or conditions
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++   PARTICULAR PURPOSE. You are solely responsible for determining the
++   appropriateness of using or redistributing the Work and assume any
++   risks associated with Your exercise of permissions under this License.
++
++8. Limitation of Liability. In no event and under no legal theory,
++   whether in tort (including negligence), contract, or otherwise,
++   unless required by applicable law (such as deliberate and grossly
++   negligent acts) or agreed to in writing, shall any Contributor be
++   liable to You for damages, including any direct, indirect, special,
++   incidental, or consequential damages of any character arising as a
++   result of this License or out of the use or inability to use the
++   Work (including but not limited to damages for loss of goodwill,
++   work stoppage, computer failure or malfunction, or any and all
++   other commercial damages or losses), even if such Contributor
++   has been advised of the possibility of such damages.
++
++9. Accepting Warranty or Additional Liability. While redistributing
++   the Work or Derivative Works thereof, You may choose to offer,
++   and charge a fee for, acceptance of support, warranty, indemnity,
++   or other liability obligations and/or rights consistent with this
++   License. However, in accepting such obligations, You may act only
++   on Your own behalf and on Your sole responsibility, not on behalf
++   of any other Contributor, and only if You agree to indemnify,
++   defend, and hold each Contributor harmless for any liability
++   incurred by, or claims asserted against, such Contributor by reason
++   of your accepting any such warranty or additional liability.
++
++END OF TERMS AND CONDITIONS
++
++APPENDIX: How to apply the Apache License to your work.
++
++   To apply the Apache License to your work, attach the following
++   boilerplate notice, with the fields enclosed by brackets "[]"
++   replaced with your own identifying information. (Don't include
++   the brackets!)  The text should be enclosed in the appropriate
++   comment syntax for the file format. We also recommend that a
++   file or class name and description of purpose be included on the
++   same "printed page" as the copyright notice for easier
++   identification within third-party archives.
++
++Copyright [yyyy] [name of copyright owner]
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++      http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5f28864c84228aac077256dc1b861069f782b411
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,26 @@@
++Copyright (c) 2017 The Error-Chain Project Developers
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
++
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1e9bbf4caa2ef3736ed140c0b3253f7bac5cbe4e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++# error-chain - Consistent error handling for Rust
++
++[![Build Status](https://api.travis-ci.org/brson/error-chain.svg?branch=master)](https://travis-ci.org/brson/error-chain)
++[![Latest Version](https://img.shields.io/crates/v/error-chain.svg)](https://crates.io/crates/error-chain)
++[![License](https://img.shields.io/github/license/brson/error-chain.svg)](https://github.com/brson/error-chain)
++
++`error-chain` makes it easy to take full advantage of Rust's error
++handling features without the overhead of maintaining boilerplate
++error types and conversions. It implements an opinionated strategy for
++defining your own error types, as well as conversions from others'
++error types.
++
++[Documentation (crates.io)](https://docs.rs/error-chain).
++
++[Documentation (master)](https://brson.github.io/error-chain).
++
++## Quick start
++
++If you just want to set up your new project with error-chain,
++follow the [quickstart.rs] template, and read this [intro]
++to error-chain.
++
++[quickstart.rs]: https://github.com/brson/error-chain/blob/master/examples/quickstart.rs
++[intro]: http://brson.github.io/2016/11/30/starting-with-error-chain
++
++## Supported Rust version
++
++Please view the beginning of the [Travis configuration file](.travis.yml)
++to see the oldest supported Rust version.
++
++Note that `error-chain` supports older versions of Rust when built with
++`default-features = false`.
++
++## License
++
++MIT/Apache-2.0
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ccc3ab7032bcebd8ef2410e6bb51e721f1b8ba11
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++#[macro_use]
++extern crate error_chain;
++
++pub mod inner {
++    error_chain!{}
++}
++
++#[cfg(feature = "a_feature")]
++pub mod feature {
++    error_chain!{}
++}
++
++error_chain! {
++    // Types generated by the macro. If empty or absent, it defaults to
++    //     Error, ErrorKind, Result;
++    types {
++        // With custom names:
++        MyError, MyErrorKind, MyResult;
++        // Without the `Result` wrapper:
++        //     Error, ErrorKind;
++    }
++
++    // Automatic bindings to other error types generated by `error_chain!`.
++    links {
++        Inner(inner::Error, inner::ErrorKind);
++        // Attributes can be added at the end of the declaration.
++        Feature(feature::Error, feature::ErrorKind) #[cfg(feature = "a_feature")];
++    }
++
++    // Bindings to types implementing std::error::Error.
++    foreign_links {
++        Io(::std::io::Error);
++    }
++}
++
++fn main() {}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bd8effdaf6b97ae5b23b611d7b032c76b20a1ce1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,69 @@@
++//! Demonstrates usage of `Error::caused` method. This method enables chaining errors
++//! like `ResultExt::chain_err` but doesn't require the presence of a `Result` wrapper.
++
++#[macro_use]
++extern crate error_chain;
++
++use std::fs::File;
++
++mod errors {
++    use std::io;
++    use super::LaunchStage;
++
++    error_chain! {
++        foreign_links {
++            Io(io::Error) #[doc = "Error during IO"];
++        }
++
++        errors {
++            Launch(phase: LaunchStage) {
++                description("An error occurred during startup")
++                display("Startup aborted: {:?} did not complete successfully", phase)
++            }
++
++            ConfigLoad(path: String) {
++                description("Config file not found")
++                display("Unable to read file `{}`", path)
++            }
++        }
++    }
++
++    impl From<LaunchStage> for ErrorKind {
++        fn from(v: LaunchStage) -> Self {
++            ErrorKind::Launch(v)
++        }
++    }
++}
++
++pub use errors::*;
++
++#[derive(Debug, Clone, PartialEq, Eq)]
++pub enum LaunchStage {
++    ConfigLoad,
++    ConfigParse,
++    ConfigResolve,
++}
++
++/// Read the service config from the file specified.
++fn load_config(rel_path: &str) -> Result<()> {
++    File::open(rel_path)
++        .map(|_| ())
++        .chain_err(|| ErrorKind::ConfigLoad(rel_path.to_string()))
++}
++
++/// Launch the service.
++fn launch(rel_path: &str) -> Result<()> {
++    load_config(rel_path).map_err(|e| match e {
++                                      e @ Error(ErrorKind::ConfigLoad(_), _) => {
++                                          e.chain_err(|| LaunchStage::ConfigLoad)
++                                      }
++                                      e => e.chain_err(|| "Unknown failure"),
++                                  })
++}
++
++fn main() {
++    let chain = launch("does_not_exist.json").unwrap_err();
++    for err in chain.iter() {
++        println!("{}", err);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..999ac9cef0ae374115f988872218e10e62775cdb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,28 @@@
++#![deny(missing_docs)]
++
++//! This module is used to check that all generated items are documented.
++
++#[macro_use]
++extern crate error_chain;
++
++/// Inner module.
++pub mod inner {
++    error_chain!{}
++}
++
++error_chain! {
++    links {
++        Inner(inner::Error, inner::ErrorKind) #[doc = "Doc"];
++    }
++    foreign_links {
++        Io(::std::io::Error) #[doc = "Io"];
++    }
++    errors {
++        /// Doc
++        Test2 {
++
++        }
++    }
++}
++
++fn main() {}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2e3e2b5d3945cada1198cd5cd9519ab53858e9db
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,80 @@@
++// Simple and robust error handling with error-chain!
++// Use this as a template for new projects.
++
++// `error_chain!` can recurse deeply
++#![recursion_limit = "1024"]
++
++// Import the macro. Don't forget to add `error-chain` in your
++// `Cargo.toml`!
++#[macro_use]
++extern crate error_chain;
++
++// We'll put our errors in an `errors` module, and other modules in
++// this crate will `use errors::*;` to get access to everything
++// `error_chain!` creates.
++mod errors {
++    // Create the Error, ErrorKind, ResultExt, and Result types
++    error_chain!{}
++}
++
++// This only gives access within this module. Make this `pub use errors::*;`
++// instead if the types must be accessible from other modules (e.g., within
++// a `links` section).
++use errors::*;
++
++fn main() {
++    if let Err(ref e) = run() {
++        use std::io::Write;
++        let stderr = &mut ::std::io::stderr();
++        let errmsg = "Error writing to stderr";
++
++        writeln!(stderr, "error: {}", e).expect(errmsg);
++
++        for e in e.iter().skip(1) {
++            writeln!(stderr, "caused by: {}", e).expect(errmsg);
++        }
++
++        // The backtrace is not always generated. Try to run this example
++        // with `RUST_BACKTRACE=1`.
++        if let Some(backtrace) = e.backtrace() {
++            writeln!(stderr, "backtrace: {:?}", backtrace).expect(errmsg);
++        }
++
++        ::std::process::exit(1);
++    }
++}
++
++// The above main gives you maximum control over how the error is
++// formatted. If you don't care (i.e. you want to display the full
++// error during an assert) you can just call the `display_chain` method
++// on the error object
++#[allow(dead_code)]
++fn alternative_main() {
++    if let Err(ref e) = run() {
++        use std::io::Write;
++        use error_chain::ChainedError; // trait which holds `display_chain`
++        let stderr = &mut ::std::io::stderr();
++        let errmsg = "Error writing to stderr";
++
++        writeln!(stderr, "{}", e.display_chain()).expect(errmsg);
++        ::std::process::exit(1);
++    }
++}
++
++// Use this macro to auto-generate the main above. You may want to
++// set the `RUST_BACKTRACE` env variable to see a backtrace.
++// quick_main!(run);
++
++
++// Most functions will return the `Result` type, imported from the
++// `errors` module. It is a typedef of the standard `Result` type
++// for which the error type is always our own `Error`.
++fn run() -> Result<()> {
++    use std::fs::File;
++
++    // This operation will fail
++    File::open("tretrete")
++        .chain_err(|| "unable to open tretrete file")?;
++
++    Ok(())
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ae360d66e974ebb7a35bb557f4acc8f2ed05595e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,38 @@@
++#[macro_use]
++extern crate error_chain;
++
++use std::mem::{size_of, size_of_val};
++
++error_chain! {
++    errors {
++        AVariant
++        Another
++    }
++}
++
++fn main() {
++    println!("Memory usage in bytes");
++    println!("---------------------");
++    println!("Result<()>: {}", size_of::<Result<()>>());
++    println!("  (): {}", size_of::<()>());
++    println!("  Error: {}", size_of::<Error>());
++    println!("    ErrorKind: {}", size_of::<ErrorKind>());
++    let msg = ErrorKind::Msg("test".into());
++    println!("      ErrorKind::Msg: {}", size_of_val(&msg));
++    println!("        String: {}", size_of::<String>());
++    println!("    State: {}", size_of::<error_chain::State>());
++    #[cfg(feature = "backtrace")]
++    {
++        let state = error_chain::State {
++            next_error: None,
++            backtrace: None,
++        };
++        println!("      State.next_error: {}", size_of_val(&state.next_error));
++        println!("      State.backtrace: {}", size_of_val(&state.backtrace));
++    }
++    #[cfg(not(feature = "backtrace"))]
++    {
++        let state = error_chain::State { next_error: None };
++        println!("      State.next_error: {}", size_of_val(&state.next_error));
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5d1958f998d77ad4eac54228d6e5cb87060766e2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,458 @@@
++/// Prefer to use `error_chain` instead of this macro.
++#[macro_export]
++macro_rules! error_chain_processed {
++    // Default values for `types`.
++    (
++        types {}
++        $( $rest: tt )*
++    ) => {
++        error_chain_processed! {
++            types {
++                Error, ErrorKind, ResultExt, Result;
++            }
++            $( $rest )*
++        }
++    };
++    // With `Result` wrapper.
++    (
++        types {
++            $error_name:ident, $error_kind_name:ident,
++            $result_ext_name:ident, $result_name:ident;
++        }
++        $( $rest: tt )*
++    ) => {
++        error_chain_processed! {
++            types {
++                $error_name, $error_kind_name,
++                $result_ext_name;
++            }
++            $( $rest )*
++        }
++        /// Convenient wrapper around `std::Result`.
++        #[allow(unused)]
++        pub type $result_name<T> = ::std::result::Result<T, $error_name>;
++    };
++    // Without `Result` wrapper.
++    (
++        types {
++            $error_name:ident, $error_kind_name:ident,
++            $result_ext_name:ident;
++        }
++
++        links {
++            $( $link_variant:ident ( $link_error_path:path, $link_kind_path:path )
++               $( #[$meta_links:meta] )*; ) *
++        }
++
++        foreign_links {
++            $( $foreign_link_variant:ident ( $foreign_link_error_path:path )
++               $( #[$meta_foreign_links:meta] )*; )*
++        }
++
++        errors {
++            $( $error_chunks:tt ) *
++        }
++
++    ) => {
++        /// The Error type.
++        ///
++        /// This tuple struct is made of two elements:
++        ///
++        /// - an `ErrorKind` which is used to determine the type of the error.
++        /// - An internal `State`, not meant for direct use outside of `error_chain`
++        ///   internals, containing:
++        ///   - a backtrace, generated when the error is created.
++        ///   - an error chain, used for the implementation of `Error::cause()`.
++        #[derive(Debug)]
++        pub struct $error_name(
++            // The members must be `pub` for `links`.
++            /// The kind of the error.
++            pub $error_kind_name,
++            /// Contains the error chain and the backtrace.
++            #[doc(hidden)]
++            pub $crate::State,
++        );
++
++        impl $crate::ChainedError for $error_name {
++            type ErrorKind = $error_kind_name;
++
++            fn new(kind: $error_kind_name, state: $crate::State) -> $error_name {
++                $error_name(kind, state)
++            }
++
++            fn from_kind(kind: Self::ErrorKind) -> Self {
++                Self::from_kind(kind)
++            }
++
++            fn with_chain<E, K>(error: E, kind: K)
++                -> Self
++                where E: ::std::error::Error + Send + 'static,
++                      K: Into<Self::ErrorKind>
++            {
++                Self::with_chain(error, kind)
++            }
++
++            fn kind(&self) -> &Self::ErrorKind {
++                self.kind()
++            }
++
++            fn iter(&self) -> $crate::Iter {
++                $crate::Iter::new(Some(self))
++            }
++
++            fn chain_err<F, EK>(self, error: F) -> Self
++                where F: FnOnce() -> EK,
++                      EK: Into<$error_kind_name> {
++                self.chain_err(error)
++            }
++
++            fn backtrace(&self) -> Option<&$crate::Backtrace> {
++                self.backtrace()
++            }
++
++            impl_extract_backtrace!($error_name
++                                    $error_kind_name
++                                    $([$link_error_path, $(#[$meta_links])*])*);
++        }
++
++        #[allow(dead_code)]
++        impl $error_name {
++            /// Constructs an error from a kind, and generates a backtrace.
++            pub fn from_kind(kind: $error_kind_name) -> $error_name {
++                $error_name(
++                    kind,
++                    $crate::State::default(),
++                )
++            }
++
++            /// Constructs a chained error from another error and a kind, and generates a backtrace.
++            pub fn with_chain<E, K>(error: E, kind: K)
++                -> $error_name
++                where E: ::std::error::Error + Send + 'static,
++                      K: Into<$error_kind_name>
++            {
++                $error_name::with_boxed_chain(Box::new(error), kind)
++            }
++
++            /// Construct a chained error from another boxed error and a kind, and generates a backtrace
++            pub fn with_boxed_chain<K>(error: Box<::std::error::Error + Send>, kind: K)
++                -> $error_name
++                where K: Into<$error_kind_name>
++            {
++                $error_name(
++                    kind.into(),
++                    $crate::State::new::<$error_name>(error, ),
++                )
++            }
++
++            /// Returns the kind of the error.
++            pub fn kind(&self) -> &$error_kind_name {
++                &self.0
++            }
++
++            /// Iterates over the error chain.
++            pub fn iter(&self) -> $crate::Iter {
++                $crate::ChainedError::iter(self)
++            }
++
++            /// Returns the backtrace associated with this error.
++            pub fn backtrace(&self) -> Option<&$crate::Backtrace> {
++                self.1.backtrace()
++            }
++
++            /// Extends the error chain with a new entry.
++            pub fn chain_err<F, EK>(self, error: F) -> $error_name
++                where F: FnOnce() -> EK, EK: Into<$error_kind_name> {
++                $error_name::with_chain(self, Self::from_kind(error().into()))
++            }
++        }
++
++        impl ::std::error::Error for $error_name {
++            fn description(&self) -> &str {
++                self.0.description()
++            }
++
++            #[allow(unused_doc_comment)]
++            fn cause(&self) -> Option<&::std::error::Error> {
++                match self.1.next_error {
++                    Some(ref c) => Some(&**c),
++                    None => {
++                        match self.0 {
++                            $(
++                                $(#[$meta_foreign_links])*
++                                $error_kind_name::$foreign_link_variant(ref foreign_err) => {
++                                    foreign_err.cause()
++                                }
++                            ) *
++                            _ => None
++                        }
++                    }
++                }
++            }
++        }
++
++        impl ::std::fmt::Display for $error_name {
++            fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
++                ::std::fmt::Display::fmt(&self.0, f)
++            }
++        }
++
++        $(
++            $(#[$meta_links])*
++            impl From<$link_error_path> for $error_name {
++                fn from(e: $link_error_path) -> Self {
++                    $error_name(
++                        $error_kind_name::$link_variant(e.0),
++                        e.1,
++                    )
++                }
++            }
++        ) *
++
++        $(
++            $(#[$meta_foreign_links])*
++            impl From<$foreign_link_error_path> for $error_name {
++                fn from(e: $foreign_link_error_path) -> Self {
++                    $error_name::from_kind(
++                        $error_kind_name::$foreign_link_variant(e)
++                    )
++                }
++            }
++        ) *
++
++        impl From<$error_kind_name> for $error_name {
++            fn from(e: $error_kind_name) -> Self {
++                $error_name::from_kind(e)
++            }
++        }
++
++        impl<'a> From<&'a str> for $error_name {
++            fn from(s: &'a str) -> Self {
++                $error_name::from_kind(s.into())
++            }
++        }
++
++        impl From<String> for $error_name {
++            fn from(s: String) -> Self {
++                $error_name::from_kind(s.into())
++            }
++        }
++
++        impl ::std::ops::Deref for $error_name {
++            type Target = $error_kind_name;
++
++            fn deref(&self) -> &Self::Target {
++                &self.0
++            }
++        }
++
++
++        // The ErrorKind type
++        // --------------
++
++        quick_error! {
++            /// The kind of an error.
++            #[derive(Debug)]
++            pub enum $error_kind_name {
++
++                /// A convenient variant for String.
++                Msg(s: String) {
++                    description(&s)
++                    display("{}", s)
++                }
++
++                $(
++                    $(#[$meta_links])*
++                    $link_variant(e: $link_kind_path) {
++                        description(e.description())
++                        display("{}", e)
++                    }
++                ) *
++
++                $(
++                    $(#[$meta_foreign_links])*
++                    $foreign_link_variant(err: $foreign_link_error_path) {
++                        description(::std::error::Error::description(err))
++                        display("{}", err)
++                    }
++                ) *
++
++                $($error_chunks)*
++            }
++        }
++
++        $(
++            $(#[$meta_links])*
++            impl From<$link_kind_path> for $error_kind_name {
++                fn from(e: $link_kind_path) -> Self {
++                    $error_kind_name::$link_variant(e)
++                }
++            }
++        ) *
++
++        impl<'a> From<&'a str> for $error_kind_name {
++            fn from(s: &'a str) -> Self {
++                $error_kind_name::Msg(s.to_string())
++            }
++        }
++
++        impl From<String> for $error_kind_name {
++            fn from(s: String) -> Self {
++                $error_kind_name::Msg(s)
++            }
++        }
++
++        impl From<$error_name> for $error_kind_name {
++            fn from(e: $error_name) -> Self {
++                e.0
++            }
++        }
++
++        // The ResultExt trait defines the `chain_err` method.
++
++        /// Additional methods for `Result`, for easy interaction with this crate.
++        pub trait $result_ext_name<T> {
++            /// If the `Result` is an `Err` then `chain_err` evaluates the closure,
++            /// which returns *some type that can be converted to `ErrorKind`*, boxes
++            /// the original error to store as the cause, then returns a new error
++            /// containing the original error.
++            fn chain_err<F, EK>(self, callback: F) -> ::std::result::Result<T, $error_name>
++                where F: FnOnce() -> EK,
++                      EK: Into<$error_kind_name>;
++        }
++
++        impl<T, E> $result_ext_name<T> for ::std::result::Result<T, E> where E: ::std::error::Error + Send + 'static {
++            fn chain_err<F, EK>(self, callback: F) -> ::std::result::Result<T, $error_name>
++                where F: FnOnce() -> EK,
++                      EK: Into<$error_kind_name> {
++                self.map_err(move |e| {
++                    let state = $crate::State::new::<$error_name>(Box::new(e), );
++                    $crate::ChainedError::new(callback().into(), state)
++                })
++            }
++        }
++
++        impl<T> $result_ext_name<T> for ::std::option::Option<T> {
++            fn chain_err<F, EK>(self, callback: F) -> ::std::result::Result<T, $error_name>
++                where F: FnOnce() -> EK,
++                      EK: Into<$error_kind_name> {
++                self.ok_or_else(move || {
++                    $crate::ChainedError::from_kind(callback().into())
++                })
++            }
++        }
++
++
++    };
++}
++
++/// Internal macro used for reordering of the fields.
++#[doc(hidden)]
++#[macro_export]
++macro_rules! error_chain_processing {
++    (
++        ({}, $b:tt, $c:tt, $d:tt)
++        types $content:tt
++        $( $tail:tt )*
++    ) => {
++        error_chain_processing! {
++            ($content, $b, $c, $d)
++            $($tail)*
++        }
++    };
++    (
++        ($a:tt, {}, $c:tt, $d:tt)
++        links $content:tt
++        $( $tail:tt )*
++    ) => {
++        error_chain_processing! {
++            ($a, $content, $c, $d)
++            $($tail)*
++        }
++    };
++    (
++        ($a:tt, $b:tt, {}, $d:tt)
++        foreign_links $content:tt
++        $( $tail:tt )*
++    ) => {
++        error_chain_processing! {
++            ($a, $b, $content, $d)
++            $($tail)*
++        }
++    };
++    (
++        ($a:tt, $b:tt, $c:tt, {})
++        errors $content:tt
++        $( $tail:tt )*
++    ) => {
++        error_chain_processing! {
++            ($a, $b, $c, $content)
++            $($tail)*
++        }
++    };
++    ( ($a:tt, $b:tt, $c:tt, $d:tt) ) => {
++        error_chain_processed! {
++            types $a
++            links $b
++            foreign_links $c
++            errors $d
++        }
++    };
++}
++
++/// This macro is used for handling of duplicated and out-of-order fields. For
++/// the exact rules, see `error_chain_processed`.
++#[macro_export]
++macro_rules! error_chain {
++    ( $( $block_name:ident { $( $block_content:tt )* } )* ) => {
++        error_chain_processing! {
++            ({}, {}, {}, {})
++            $($block_name { $( $block_content )* })*
++        }
++    };
++}
++
++/// Macro used to manage the `backtrace` feature.
++///
++/// See
++/// https://www.reddit.com/r/rust/comments/57virt/hey_rustaceans_got_an_easy_question_ask_here/da5r4ti/?context=3
++/// for more details.
++#[macro_export]
++#[doc(hidden)]
++#[cfg(feature = "backtrace")]
++macro_rules! impl_extract_backtrace {
++    ($error_name: ident
++     $error_kind_name: ident
++     $([$link_error_path: path, $(#[$meta_links: meta])*])*) => {
++        #[allow(unused_doc_comment)]
++        fn extract_backtrace(e: &(::std::error::Error + Send + 'static))
++            -> Option<::std::sync::Arc<$crate::Backtrace>> {
++            if let Some(e) = e.downcast_ref::<$error_name>() {
++                return e.1.backtrace.clone();
++            }
++            $(
++                $( #[$meta_links] )*
++                {
++                    if let Some(e) = e.downcast_ref::<$link_error_path>() {
++                        return e.1.backtrace.clone();
++                    }
++                }
++            ) *
++            None
++        }
++    }
++}
++
++/// Macro used to manage the `backtrace` feature.
++///
++/// See
++/// https://www.reddit.com/r/rust/comments/57virt/hey_rustaceans_got_an_easy_question_ask_here/da5r4ti/?context=3
++/// for more details.
++#[macro_export]
++#[doc(hidden)]
++#[cfg(not(feature = "backtrace"))]
++macro_rules! impl_extract_backtrace {
++    ($error_name: ident
++     $error_kind_name: ident
++     $([$link_error_path: path, $(#[$meta_links: meta])*])*) => {}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..413407cae96937cc94d7e95c070fc6d196a885fa
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,38 @@@
++//! These modules show an example of code generated by the macro. **IT MUST NOT BE
++//! USED OUTSIDE THIS CRATE**.
++//!
++//! This is the basic error structure. You can see that `ErrorKind`
++//! has been populated in a variety of ways. All `ErrorKind`s get a
++//! `Msg` variant for basic errors. When strings are converted to
++//! `ErrorKind`s they become `ErrorKind::Msg`. The "links" defined in
++//! the macro are expanded to the `Inner` variant, and the
++//! "foreign links" to the `Io` variant.
++//!
++//! Both types come with a variety of `From` conversions as well:
++//! `Error` can be created from `ErrorKind`, `&str` and `String`,
++//! and the `links` and `foreign_links` error types. `ErrorKind`
++//! can be created from the corresponding `ErrorKind`s of the link
++//! types, as well as from `&str` and `String`.
++//!
++//! `into()` and `From::from` are used heavily to massage types into
++//! the right shape. Which one to use in any specific case depends on
++//! the influence of type inference, but there are some patterns that
++//! arise frequently.
++
++/// Another code generated by the macro.
++pub mod inner {
++    error_chain!{}
++}
++
++error_chain! {
++    links {
++        Inner(inner::Error, inner::ErrorKind) #[doc = "Link to another `ErrorChain`."];
++    }
++    foreign_links {
++        Io(::std::io::Error) #[doc = "Link to a `std::error::Error` type."];
++    }
++    errors {
++        #[doc = "A custom error kind."]
++        Custom
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..01a2705c0ee251e66412ed302593aba9196fd97e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,777 @@@
++#![deny(missing_docs)]
++#![allow(unknown_lints)] // to be removed when unused_doc_comments lints is merged
++#![doc(html_root_url = "https://docs.rs/error-chain/0.11.0-rc.2")]
++
++//! A library for consistent and reliable error handling
++//!
++//! error-chain makes it easy to take full advantage of Rust's
++//! powerful error handling features without the overhead of
++//! maintaining boilerplate error types and conversions. It implements
++//! an opinionated strategy for defining your own error types, as well
++//! as conversions from others' error types.
++//!
++//! ## Quick start
++//!
++//! If you just want to set up your new project with error-chain,
++//! follow the [quickstart.rs] template, and read this [intro]
++//! to error-chain.
++//!
++//! [quickstart.rs]: https://github.com/brson/error-chain/blob/master/examples/quickstart.rs
++//! [intro]: http://brson.github.io/2016/11/30/starting-with-error-chain
++//!
++//! ## Why error chain?
++//!
++//! * error-chain is easy to configure. Handle errors robustly with minimal
++//!   effort.
++//! * Basic error handling requires no maintenance of custom error types
++//!   nor the `From` conversions that make `?` work.
++//! * error-chain scales from simple error handling strategies to more
++//!   rigorous.  Return formatted strings for simple errors, only
++//!   introducing error variants and their strong typing as needed for
++//!   advanced error recovery.
++//! * error-chain makes it trivial to correctly manage the [cause] of
++//!   the errors generated by your own code. This is the "chaining"
++//!   in "error-chain".
++//!
++//! [cause]: https://doc.rust-lang.org/std/error/trait.Error.html#method.cause
++//!
++//! ## Principles of error-chain
++//!
++//! error-chain is based on the following principles:
++//!
++//! * No error should ever be discarded. This library primarily
++//!   makes it easy to "chain" errors with the `chain_err` method.
++//! * Introducing new errors is trivial. Simple errors can be introduced
++//!   at the error site with just a string.
++//! * Handling errors is possible with pattern matching.
++//! * Conversions between error types are done in an automatic and
++//!   consistent way - `From` conversion behavior is never specified
++//!   explicitly.
++//! * Errors implement Send.
++//! * Errors can carry backtraces.
++//!
++//! Similar to other libraries like [error-type] and [quick-error],
++//! this library introduces the error chaining mechanism originally
++//! employed by Cargo.  The `error_chain!` macro declares the types
++//! and implementation boilerplate necessary for fulfilling a
++//! particular error-handling strategy. Most importantly it defines a
++//! custom error type (called `Error` by convention) and the `From`
++//! conversions that let the `?` operator work.
++//!
++//! This library differs in a few ways from previous error libs:
++//!
++//! * Instead of defining the custom `Error` type as an enum, it is a
++//!   struct containing an `ErrorKind` (which defines the
++//!   `description` and `display_chain` methods for the error), an opaque,
++//!   optional, boxed `std::error::Error + Send + 'static` object
++//!   (which defines the `cause`, and establishes the links in the
++//!   error chain), and a `Backtrace`.
++//! * The macro also defines a `ResultExt` trait that defines a
++//!   `chain_err` method. This method on all `std::error::Error + Send + 'static`
++//!   types extends the error chain by boxing the current
++//!   error into an opaque object and putting it inside a new concrete
++//!   error.
++//! * It provides automatic `From` conversions between other error types
++//!   defined by the `error_chain!` that preserve type information,
++//!   and facilitate seamless error composition and matching of composed
++//!   errors.
++//! * It provides automatic `From` conversions between any other error
++//!   type that hides the type of the other error in the `cause` box.
++//! * If `RUST_BACKTRACE` is enabled, it collects a single backtrace at
++//!   the earliest opportunity and propagates it down the stack through
++//!   `From` and `ResultExt` conversions.
++//!
++//! To accomplish its goals it makes some tradeoffs:
++//!
++//! * The split between the `Error` and `ErrorKind` types can make it
++//!   slightly more cumbersome to instantiate new (unchained) errors,
++//!   requiring an `Into` or `From` conversion; as well as slightly
++//!   more cumbersome to match on errors with another layer of types
++//!   to match.
++//! * Because the error type contains `std::error::Error + Send + 'static` objects,
++//!   it can't implement `PartialEq` for easy comparisons.
++//!
++//! ## Declaring error types
++//!
++//! Generally, you define one family of error types per crate, though
++//! it's also perfectly fine to define error types on a finer-grained
++//! basis, such as per module.
++//!
++//! Assuming you are using crate-level error types, typically you will
++//! define an `errors` module and inside it call `error_chain!`:
++//!
++//! ```
++//! # #[macro_use] extern crate error_chain;
++//! mod other_error {
++//!     error_chain! {}
++//! }
++//!
++//! error_chain! {
++//!     // The type defined for this error. These are the conventional
++//!     // and recommended names, but they can be arbitrarily chosen.
++//!     //
++//!     // It is also possible to leave this section out entirely, or
++//!     // leave it empty, and these names will be used automatically.
++//!     types {
++//!         Error, ErrorKind, ResultExt, Result;
++//!     }
++//!
++//!     // Without the `Result` wrapper:
++//!     //
++//!     // types {
++//!     //     Error, ErrorKind, ResultExt;
++//!     // }
++//!
++//!     // Automatic conversions between this error chain and other
++//!     // error chains. In this case, it will e.g. generate an
++//!     // `ErrorKind` variant called `Another` which in turn contains
++//!     // the `other_error::ErrorKind`, with conversions from
++//!     // `other_error::Error`.
++//!     //
++//!     // Optionally, some attributes can be added to a variant.
++//!     //
++//!     // This section can be empty.
++//!     links {
++//!         Another(other_error::Error, other_error::ErrorKind) #[cfg(unix)];
++//!     }
++//!
++//!     // Automatic conversions between this error chain and other
++//!     // error types not defined by the `error_chain!`. These will be
++//!     // wrapped in a new error with, in the first case, the
++//!     // `ErrorKind::Fmt` variant. The description and cause will
++//!     // forward to the description and cause of the original error.
++//!     //
++//!     // Optionally, some attributes can be added to a variant.
++//!     //
++//!     // This section can be empty.
++//!     foreign_links {
++//!         Fmt(::std::fmt::Error);
++//!         Io(::std::io::Error) #[cfg(unix)];
++//!     }
++//!
++//!     // Define additional `ErrorKind` variants. The syntax here is
++//!     // the same as `quick_error!`, but the `from()` and `cause()`
++//!     // syntax is not supported.
++//!     errors {
++//!         InvalidToolchainName(t: String) {
++//!             description("invalid toolchain name")
++//!             display("invalid toolchain name: '{}'", t)
++//!         }
++//!
++//!         // You can also add commas after description/display.
++//!         // This may work better with some editor auto-indentation modes:
++//!         UnknownToolchainVersion(v: String) {
++//!             description("unknown toolchain version"), // note the ,
++//!             display("unknown toolchain version: '{}'", v), // trailing comma is allowed
++//!         }
++//!     }
++//! }
++//!
++//! # fn main() {}
++//! ```
++//!
++//! Each section, `types`, `links`, `foreign_links`, and `errors` may
++//! be omitted if it is empty.
++//!
++//! This populates the module with a number of definitions,
++//! the most important of which are the `Error` type
++//! and the `ErrorKind` type. An example of generated code can be found in the
++//! [example_generated](example_generated/index.html) module.
++//!
++//! ## Returning new errors
++//!
++//! Introducing new error chains, with a string message:
++//!
++//! ```
++//! # #[macro_use] extern crate error_chain;
++//! # fn main() {}
++//! # error_chain! {}
++//! fn foo() -> Result<()> {
++//!     Err("foo error!".into())
++//! }
++//! ```
++//!
++//! Introducing new error chains, with an `ErrorKind`:
++//!
++//! ```
++//! # #[macro_use] extern crate error_chain;
++//! # fn main() {}
++//! error_chain! {
++//!     errors { FooError }
++//! }
++//!
++//! fn foo() -> Result<()> {
++//!     Err(ErrorKind::FooError.into())
++//! }
++//! ```
++//!
++//! Note that the return type is the typedef `Result`, which is
++//! defined by the macro as `pub type Result<T> =
++//! ::std::result::Result<T, Error>`. Note that in both cases
++//! `.into()` is called to convert a type into the `Error` type; both
++//! strings and `ErrorKind` have `From` conversions to turn them into
++//! `Error`.
++//!
++//! When the error is emitted behind the `?` operator, the explicit conversion
++//! isn't needed; `Err(ErrorKind)` will automatically be converted to `Err(Error)`.
++//! So the below is equivalent to the previous:
++//!
++//! ```
++//! # #[macro_use] extern crate error_chain;
++//! # fn main() {}
++//! # error_chain! { errors { FooError } }
++//! fn foo() -> Result<()> {
++//!     Ok(Err(ErrorKind::FooError)?)
++//! }
++//!
++//! fn bar() -> Result<()> {
++//!     Ok(Err("bogus!")?)
++//! }
++//! ```
++//!
++//! ## The `bail!` macro
++//!
++//! The above method of introducing new errors works but is a little
++//! verbose. Instead, we can use the `bail!` macro, which performs an early return
++//! with conversions done automatically.
++//!
++//! With `bail!` the previous examples look like:
++//!
++//! ```
++//! # #[macro_use] extern crate error_chain;
++//! # fn main() {}
++//! # error_chain! { errors { FooError } }
++//! fn foo() -> Result<()> {
++//!     if true {
++//!         bail!(ErrorKind::FooError);
++//!     } else {
++//!         Ok(())
++//!     }
++//! }
++//!
++//! fn bar() -> Result<()> {
++//!     if true {
++//!         bail!("bogus!");
++//!     } else {
++//!         Ok(())
++//!     }
++//! }
++//! ```
++//!
++//! ## Chaining errors
++//! error-chain supports extending an error chain by appending new errors.
++//! This can be done on a Result or on an existing Error.
++//!
++//! To extend the error chain:
++//!
++//! ```
++//! # #[macro_use] extern crate error_chain;
++//! # fn main() {}
++//! # error_chain! {}
++//! # fn do_something() -> Result<()> { unimplemented!() }
++//! # fn test() -> Result<()> {
++//! let res: Result<()> = do_something().chain_err(|| "something went wrong");
++//! # Ok(())
++//! # }
++//! ```
++//!
++//! `chain_err` can be called on any `Result` type where the contained
++//! error type implements `std::error::Error + Send + 'static`, as long as
++//! the `Result` type's corresponding `ResultExt` trait is in scope.  If
++//! the `Result` is an `Err` then `chain_err` evaluates the closure,
++//! which returns *some type that can be converted to `ErrorKind`*,
++//! boxes the original error to store as the cause, then returns a new
++//! error containing the original error.
++//!
++//! Calling `chain_err` on an existing `Error` instance has the same
++//! signature and produces the same outcome as being called on a `Result`
++//! matching the properties described above. This is most useful when
++//! partially handling errors using the `map_err` function.
++//!
++//! To chain an error directly, use `with_chain`:
++//!
++//! ```
++//! # #[macro_use] extern crate error_chain;
++//! # fn main() {}
++//! # error_chain! {}
++//! # fn do_something() -> Result<()> { unimplemented!() }
++//! # fn test() -> Result<()> {
++//! let res: Result<()> =
++//!     do_something().map_err(|e| Error::with_chain(e, "something went wrong"));
++//! # Ok(())
++//! # }
++//! ```
++//!
++//! ## Linking errors
++//!
++//! To convert an error from another error chain to this error chain:
++//!
++//! ```
++//! # #[macro_use] extern crate error_chain;
++//! # fn main() {}
++//! # mod other { error_chain! {} }
++//! error_chain! {
++//!     links {
++//!         OtherError(other::Error, other::ErrorKind);
++//!     }
++//! }
++//!
++//! fn do_other_thing() -> other::Result<()> { unimplemented!() }
++//!
++//! # fn test() -> Result<()> {
++//! let res: Result<()> = do_other_thing().map_err(|e| e.into());
++//! # Ok(())
++//! # }
++//! ```
++//!
++//! The `Error` and `ErrorKind` types implements `From` for the corresponding
++//! types of all linked error chains. Linked errors do not introduce a new
++//! cause to the error chain.
++//!
++//! ## Matching errors
++//!
++//! error-chain error variants are matched with simple patterns.
++//! `Error` is a tuple struct and its first field is the `ErrorKind`,
++//! making dispatching on error kinds relatively compact:
++//!
++//! ```
++//! # #[macro_use] extern crate error_chain;
++//! # fn main() {
++//! error_chain! {
++//!     errors {
++//!         InvalidToolchainName(t: String) {
++//!             description("invalid toolchain name")
++//!             display("invalid toolchain name: '{}'", t)
++//!         }
++//!     }
++//! }
++//!
++//! match Error::from("error!") {
++//!     Error(ErrorKind::InvalidToolchainName(_), _) => { }
++//!     Error(ErrorKind::Msg(_), _) => { }
++//! }
++//! # }
++//! ```
++//!
++//! Chained errors are also matched with (relatively) compact syntax
++//!
++//! ```
++//! # #[macro_use] extern crate error_chain;
++//! mod utils {
++//!     error_chain! {
++//!         errors {
++//!             BadStuff {
++//!                 description("bad stuff")
++//!             }
++//!         }
++//!     }
++//! }
++//!
++//! mod app {
++//!     error_chain! {
++//!         links {
++//!             Utils(::utils::Error, ::utils::ErrorKind);
++//!         }
++//!     }
++//! }
++//!
++//!
++//! # fn main() {
++//! match app::Error::from("error!") {
++//!     app::Error(app::ErrorKind::Utils(utils::ErrorKind::BadStuff), _) => { }
++//!     _ => { }
++//! }
++//! # }
++//! ```
++//!
++//! ## Inspecting errors
++//!
++//! An error-chain error contains information about the error itself, a backtrace, and the chain
++//! of causing errors. For reporting purposes, this information can be accessed as follows.
++//!
++//! ```
++//! # #[macro_use] extern crate error_chain;
++//! use error_chain::ChainedError;  // for e.display_chain()
++//!
++//! error_chain! {
++//!     errors {
++//!         InvalidToolchainName(t: String) {
++//!             description("invalid toolchain name")
++//!             display("invalid toolchain name: '{}'", t)
++//!         }
++//!     }
++//! }
++//!
++//! # fn main() {
++//! // Generate an example error to inspect:
++//! let e = "xyzzy".parse::<i32>()
++//!     .chain_err(|| ErrorKind::InvalidToolchainName("xyzzy".to_string()))
++//!     .unwrap_err();
++//!
++//! // Get the brief description of the error:
++//! assert_eq!(e.description(), "invalid toolchain name");
++//!
++//! // Get the display version of the error:
++//! assert_eq!(e.to_string(), "invalid toolchain name: 'xyzzy'");
++//!
++//! // Get the full cause and backtrace:
++//! println!("{}", e.display_chain().to_string());
++//! //     Error: invalid toolchain name: 'xyzzy'
++//! //     Caused by: invalid digit found in string
++//! //     stack backtrace:
++//! //        0:     0x7fa9f684fc94 - backtrace::backtrace::libunwind::trace
++//! //                             at src/backtrace/libunwind.rs:53
++//! //                              - backtrace::backtrace::trace<closure>
++//! //                             at src/backtrace/mod.rs:42
++//! //        1:     0x7fa9f6850b0e - backtrace::capture::{{impl}}::new
++//! //                             at out/capture.rs:79
++//! //     [..]
++//! # }
++//! ```
++//!
++//! The `Error` and `ErrorKind` types also allow programmatic access to these elements.
++//!
++//! ## Foreign links
++//!
++//! Errors that do not conform to the same conventions as this library
++//! can still be included in the error chain. They are considered "foreign
++//! errors", and are declared using the `foreign_links` block of the
++//! `error_chain!` macro. `Error`s are automatically created from
++//! foreign errors by the `?` operator.
++//!
++//! Foreign links and regular links have one crucial difference:
++//! `From` conversions for regular links *do not introduce a new error
++//! into the error chain*, while conversions for foreign links *always
++//! introduce a new error into the error chain*. So for the example
++//! above all errors deriving from the `std::fmt::Error` type will be
++//! presented to the user as a new `ErrorKind::Fmt` variant, and the
++//! cause will be the original `std::fmt::Error` error. In contrast, when
++//! `other_error::Error` is converted to `Error` the two `ErrorKind`s
++//! are converted between each other to create a new `Error` but the
++//! old error is discarded; there is no "cause" created from the
++//! original error.
++//!
++//! ## Backtraces
++//!
++//! If the `RUST_BACKTRACE` environment variable is set to anything
++//! but ``0``, the earliest non-foreign error to be generated creates
++//! a single backtrace, which is passed through all `From` conversions
++//! and `chain_err` invocations of compatible types. To read the
++//! backtrace just call the `backtrace()` method.
++//!
++//! Backtrace generation can be disabled by turning off the `backtrace` feature.
++//!
++//! ## Iteration
++//!
++//! The `iter` method returns an iterator over the chain of error boxes.
++//!
++//! [error-type]: https://github.com/DanielKeep/rust-error-type
++//! [quick-error]: https://github.com/tailhook/quick-error
++
++
++#[cfg(feature = "backtrace")]
++extern crate backtrace;
++
++use std::error;
++use std::iter::Iterator;
++#[cfg(feature = "backtrace")]
++use std::sync::Arc;
++use std::fmt;
++
++#[cfg(feature = "backtrace")]
++pub use backtrace::Backtrace;
++#[cfg(not(feature = "backtrace"))]
++/// Dummy type used when the `backtrace` feature is disabled.
++pub type Backtrace = ();
++
++#[macro_use]
++mod quick_error;
++#[macro_use]
++mod error_chain;
++#[macro_use]
++mod quick_main;
++pub use quick_main::ExitCode;
++#[cfg(feature = "example_generated")]
++pub mod example_generated;
++
++#[derive(Debug)]
++/// Iterator over the error chain using the `Error::cause()` method.
++pub struct Iter<'a>(Option<&'a error::Error>);
++
++impl<'a> Iter<'a> {
++    /// Returns a new iterator over the error chain using `Error::cause()`.
++    pub fn new(err: Option<&'a error::Error>) -> Iter<'a> {
++        Iter(err)
++    }
++}
++
++impl<'a> Iterator for Iter<'a> {
++    type Item = &'a error::Error;
++
++    fn next<'b>(&'b mut self) -> Option<&'a error::Error> {
++        match self.0.take() {
++            Some(e) => {
++                self.0 = e.cause();
++                Some(e)
++            }
++            None => None,
++        }
++    }
++}
++
++/// Returns a backtrace of the current call stack if `RUST_BACKTRACE`
++/// is set to anything but ``0``, and `None` otherwise.  This is used
++/// in the generated error implementations.
++#[cfg(feature = "backtrace")]
++#[doc(hidden)]
++pub fn make_backtrace() -> Option<Arc<Backtrace>> {
++    match std::env::var_os("RUST_BACKTRACE") {
++        Some(ref val) if val != "0" => Some(Arc::new(Backtrace::new())),
++        _ => None,
++    }
++}
++
++/// This trait is implemented on all the errors generated by the `error_chain`
++/// macro.
++pub trait ChainedError: error::Error + Send + 'static {
++    /// Associated kind type.
++    type ErrorKind;
++
++    /// Constructs an error from a kind, and generates a backtrace.
++    fn from_kind(kind: Self::ErrorKind) -> Self where Self: Sized;
++
++    /// Constructs a chained error from another error and a kind, and generates a backtrace.
++    fn with_chain<E, K>(error: E, kind: K) -> Self
++        where Self: Sized,
++              E: ::std::error::Error + Send + 'static,
++              K: Into<Self::ErrorKind>;
++
++    /// Returns the kind of the error.
++    fn kind(&self) -> &Self::ErrorKind;
++
++    /// Iterates over the error chain.
++    fn iter(&self) -> Iter;
++
++    /// Returns the backtrace associated with this error.
++    fn backtrace(&self) -> Option<&Backtrace>;
++
++    /// Returns an object which implements `Display` for printing the full
++    /// context of this error.
++    ///
++    /// The full cause chain and backtrace, if present, will be printed.
++    fn display_chain<'a>(&'a self) -> DisplayChain<'a, Self> {
++        DisplayChain(self)
++    }
++
++    /// Extends the error chain with a new entry.
++    fn chain_err<F, EK>(self, error: F) -> Self
++        where F: FnOnce() -> EK,
++              EK: Into<Self::ErrorKind>;
++
++    /// Creates an error from its parts.
++    #[doc(hidden)]
++    fn new(kind: Self::ErrorKind, state: State) -> Self where Self: Sized;
++
++    /// Returns the first known backtrace, either from its State or from one
++    /// of the errors from `foreign_links`.
++    #[cfg(feature = "backtrace")]
++    #[doc(hidden)]
++    fn extract_backtrace(e: &(error::Error + Send + 'static)) -> Option<Arc<Backtrace>>
++        where Self: Sized;
++}
++
++/// A struct which formats an error for output.
++#[derive(Debug)]
++pub struct DisplayChain<'a, T: 'a + ?Sized>(&'a T);
++
++impl<'a, T> fmt::Display for DisplayChain<'a, T>
++    where T: ChainedError
++{
++    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++        // Keep `try!` for 1.10 support
++        try!(writeln!(fmt, "Error: {}", self.0));
++
++        for e in self.0.iter().skip(1) {
++            try!(writeln!(fmt, "Caused by: {}", e));
++        }
++
++        if let Some(backtrace) = self.0.backtrace() {
++            try!(writeln!(fmt, "{:?}", backtrace));
++        }
++
++        Ok(())
++    }
++}
++
++/// Common state between errors.
++#[derive(Debug)]
++#[doc(hidden)]
++pub struct State {
++    /// Next error in the error chain.
++    pub next_error: Option<Box<error::Error + Send>>,
++    /// Backtrace for the current error.
++    #[cfg(feature = "backtrace")]
++    pub backtrace: Option<Arc<Backtrace>>,
++}
++
++impl Default for State {
++    #[cfg(feature = "backtrace")]
++    fn default() -> State {
++        State {
++            next_error: None,
++            backtrace: make_backtrace(),
++        }
++    }
++
++    #[cfg(not(feature = "backtrace"))]
++    fn default() -> State {
++        State { next_error: None }
++    }
++}
++
++impl State {
++    /// Creates a new State type
++    #[cfg(feature = "backtrace")]
++    pub fn new<CE: ChainedError>(e: Box<error::Error + Send>) -> State {
++        let backtrace = CE::extract_backtrace(&*e).or_else(make_backtrace);
++        State {
++            next_error: Some(e),
++            backtrace: backtrace,
++        }
++    }
++
++    /// Creates a new State type
++    #[cfg(not(feature = "backtrace"))]
++    pub fn new<CE: ChainedError>(e: Box<error::Error + Send>) -> State {
++        State { next_error: Some(e) }
++    }
++
++    /// Returns the inner backtrace if present.
++    #[cfg(feature = "backtrace")]
++    pub fn backtrace(&self) -> Option<&Backtrace> {
++        self.backtrace.as_ref().map(|v| &**v)
++    }
++
++    /// Returns the inner backtrace if present.
++    #[cfg(not(feature = "backtrace"))]
++    pub fn backtrace(&self) -> Option<&Backtrace> {
++        None
++    }
++}
++
++/// Exits a function early with an error
++///
++/// The `bail!` macro provides an easy way to exit a function.
++/// `bail!(expr)` is equivalent to writing.
++///
++/// ```
++/// # #[macro_use] extern crate error_chain;
++/// # error_chain! { }
++/// # fn main() { }
++/// # fn foo() -> Result<()> {
++/// # let expr = "";
++///     return Err(expr.into());
++/// # }
++/// ```
++///
++/// And as shorthand it takes a formatting string a la `println!`:
++///
++/// ```
++/// # #[macro_use] extern crate error_chain;
++/// # error_chain! { }
++/// # fn main() { }
++/// # fn foo() -> Result<()> {
++/// # let n = 0;
++/// bail!("bad number: {}", n);
++/// # }
++/// ```
++///
++/// # Examples
++///
++/// Bailing on a custom error:
++///
++/// ```
++/// # #[macro_use] extern crate error_chain;
++/// # fn main() {}
++/// error_chain! {
++///     errors { FooError }
++/// }
++///
++/// fn foo() -> Result<()> {
++///     if bad_condition() {
++///         bail!(ErrorKind::FooError);
++///     }
++///
++///     Ok(())
++/// }
++///
++/// # fn bad_condition() -> bool { true }
++/// ```
++///
++/// Bailing on a formatted string:
++///
++/// ```
++/// # #[macro_use] extern crate error_chain;
++/// # fn main() {}
++/// error_chain! { }
++///
++/// fn foo() -> Result<()> {
++///     if let Some(bad_num) = bad_condition() {
++///         bail!("so bad: {}", bad_num);
++///     }
++///
++///     Ok(())
++/// }
++///
++/// # fn bad_condition() -> Option<i8> { None }
++/// ```
++#[macro_export]
++macro_rules! bail {
++    ($e:expr) => {
++        return Err($e.into());
++    };
++    ($fmt:expr, $($arg:tt)+) => {
++        return Err(format!($fmt, $($arg)+).into());
++    };
++}
++
++/// Exits a function early with an error if the condition is not satisfied
++///
++/// The `ensure!` macro is a convenience helper that provides a way to exit
++/// a function with an error if the given condition fails.
++///
++/// As an example, `ensure!(condition, "error code: {}", errcode)` is equivalent to
++///
++/// ```
++/// # #[macro_use] extern crate error_chain;
++/// # error_chain! { }
++/// # fn main() { }
++/// # fn foo() -> Result<()> {
++/// # let errcode = 0u8;
++/// # let condition = true;
++/// if !condition {
++///     bail!("error code: {}", errcode);
++/// }
++/// # Ok(())
++/// # }
++/// ```
++///
++/// See documentation for `bail!` macro for further details.
++#[macro_export]
++macro_rules! ensure {
++    ($cond:expr, $e:expr) => {
++        if !($cond) {
++            bail!($e);
++        }
++    };
++    ($cond:expr, $fmt:expr, $($arg:tt)+) => {
++        if !($cond) {
++            bail!($fmt, $($arg)+);
++        }
++    };
++}
++
++#[doc(hidden)]
++pub mod mock {
++    error_chain!{}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c38f50c8fd896f3e0e040605af46e27f6dd20163
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,533 @@@
++// From https://github.com/tailhook/quick-error
++// Changes:
++//   - replace `impl Error` by `impl Item::description`
++//   - $imeta
++
++#[macro_export]
++macro_rules! quick_error {
++    (   $(#[$meta:meta])*
++        pub enum $name:ident { $($chunks:tt)* }
++    ) => {
++        quick_error!(SORT [pub enum $name $(#[$meta])* ]
++            items [] buf []
++            queue [ $($chunks)* ]);
++    };
++    (   $(#[$meta:meta])*
++        enum $name:ident { $($chunks:tt)* }
++    ) => {
++        quick_error!(SORT [enum $name $(#[$meta])* ]
++            items [] buf []
++            queue [ $($chunks)* ]);
++    };
++    // Queue is empty, can do the work
++    (SORT [enum $name:ident $( #[$meta:meta] )*]
++        items [$($( #[$imeta:meta] )*
++                  => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
++                                {$( $ifuncs:tt )*} )* ]
++        buf [ ]
++        queue [ ]
++    ) => {
++        quick_error!(ENUM_DEFINITION [enum $name $( #[$meta] )*]
++            body []
++            queue [$($( #[$imeta] )*
++                      => $iitem: $imode [$( $ivar: $ityp ),*] )*]
++        );
++        quick_error!(IMPLEMENTATIONS $name {$(
++           $iitem: $imode [$(#[$imeta])*] [$( $ivar: $ityp ),*] {$( $ifuncs )*}
++           )*});
++        $(
++            quick_error!(ERROR_CHECK $imode $($ifuncs)*);
++        )*
++    };
++    (SORT [pub enum $name:ident $( #[$meta:meta] )*]
++        items [$($( #[$imeta:meta] )*
++                  => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
++                                {$( $ifuncs:tt )*} )* ]
++        buf [ ]
++        queue [ ]
++    ) => {
++        quick_error!(ENUM_DEFINITION [pub enum $name $( #[$meta] )*]
++            body []
++            queue [$($( #[$imeta] )*
++                      => $iitem: $imode [$( $ivar: $ityp ),*] )*]
++        );
++        quick_error!(IMPLEMENTATIONS $name {$(
++           $iitem: $imode [$(#[$imeta])*] [$( $ivar: $ityp ),*] {$( $ifuncs )*}
++           )*});
++        $(
++            quick_error!(ERROR_CHECK $imode $($ifuncs)*);
++        )*
++    };
++    // Add meta to buffer
++    (SORT [$( $def:tt )*]
++        items [$($( #[$imeta:meta] )*
++                  => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
++                                {$( $ifuncs:tt )*} )* ]
++        buf [$( #[$bmeta:meta] )*]
++        queue [ #[$qmeta:meta] $( $tail:tt )*]
++    ) => {
++        quick_error!(SORT [$( $def )*]
++            items [$( $(#[$imeta])* => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*]
++            buf [$( #[$bmeta] )* #[$qmeta] ]
++            queue [$( $tail )*]);
++    };
++    // Add ident to buffer
++    (SORT [$( $def:tt )*]
++        items [$($( #[$imeta:meta] )*
++                  => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
++                                {$( $ifuncs:tt )*} )* ]
++        buf [$( #[$bmeta:meta] )*]
++        queue [ $qitem:ident $( $tail:tt )*]
++    ) => {
++        quick_error!(SORT [$( $def )*]
++            items [$( $(#[$imeta])*
++                      => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*]
++            buf [$(#[$bmeta])* => $qitem : UNIT [ ] ]
++            queue [$( $tail )*]);
++    };
++    // Flush buffer on meta after ident
++    (SORT [$( $def:tt )*]
++        items [$($( #[$imeta:meta] )*
++                  => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
++                                {$( $ifuncs:tt )*} )* ]
++        buf [$( #[$bmeta:meta] )*
++            => $bitem:ident: $bmode:tt [$( $bvar:ident: $btyp:ty ),*] ]
++        queue [ #[$qmeta:meta] $( $tail:tt )*]
++    ) => {
++        quick_error!(SORT [$( $def )*]
++            enum [$( $(#[$emeta])* => $eitem $(( $($etyp),* ))* )*
++                     $(#[$bmeta])* => $bitem: $bmode $(( $($btyp),* ))*]
++            items [$($( #[$imeta:meta] )*
++                      => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*
++                     $bitem: $bmode [$( $bvar:$btyp ),*] {} ]
++            buf [ #[$qmeta] ]
++            queue [$( $tail )*]);
++    };
++    // Add tuple enum-variant
++    (SORT [$( $def:tt )*]
++        items [$($( #[$imeta:meta] )*
++                  => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
++                                {$( $ifuncs:tt )*} )* ]
++        buf [$( #[$bmeta:meta] )* => $bitem:ident: UNIT [ ] ]
++        queue [($( $qvar:ident: $qtyp:ty ),+) $( $tail:tt )*]
++    ) => {
++        quick_error!(SORT [$( $def )*]
++            items [$( $(#[$imeta])* => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*]
++            buf [$( #[$bmeta] )* => $bitem: TUPLE [$( $qvar:$qtyp ),*] ]
++            queue [$( $tail )*]
++        );
++    };
++    // Add struct enum-variant - e.g. { descr: &'static str }
++    (SORT [$( $def:tt )*]
++        items [$($( #[$imeta:meta] )*
++                  => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
++                                {$( $ifuncs:tt )*} )* ]
++        buf [$( #[$bmeta:meta] )* => $bitem:ident: UNIT [ ] ]
++        queue [{ $( $qvar:ident: $qtyp:ty ),+} $( $tail:tt )*]
++    ) => {
++        quick_error!(SORT [$( $def )*]
++            items [$( $(#[$imeta])* => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*]
++            buf [$( #[$bmeta] )* => $bitem: STRUCT [$( $qvar:$qtyp ),*] ]
++            queue [$( $tail )*]);
++    };
++    // Add struct enum-variant, with excess comma - e.g. { descr: &'static str, }
++    (SORT [$( $def:tt )*]
++        items [$($( #[$imeta:meta] )*
++                  => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
++                                {$( $ifuncs:tt )*} )* ]
++        buf [$( #[$bmeta:meta] )* => $bitem:ident: UNIT [ ] ]
++        queue [{$( $qvar:ident: $qtyp:ty ),+ ,} $( $tail:tt )*]
++    ) => {
++        quick_error!(SORT [$( $def )*]
++            items [$( $(#[$imeta])* => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*]
++            buf [$( #[$bmeta] )* => $bitem: STRUCT [$( $qvar:$qtyp ),*] ]
++            queue [$( $tail )*]);
++    };
++    // Add braces and flush always on braces
++    (SORT [$( $def:tt )*]
++        items [$($( #[$imeta:meta] )*
++                  => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
++                                {$( $ifuncs:tt )*} )* ]
++        buf [$( #[$bmeta:meta] )*
++                 => $bitem:ident: $bmode:tt [$( $bvar:ident: $btyp:ty ),*] ]
++        queue [ {$( $qfuncs:tt )*} $( $tail:tt )*]
++    ) => {
++        quick_error!(SORT [$( $def )*]
++            items [$( $(#[$imeta])* => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*
++                      $(#[$bmeta])* => $bitem: $bmode [$( $bvar:$btyp ),*] {$( $qfuncs )*} ]
++            buf [ ]
++            queue [$( $tail )*]);
++    };
++    // Flush buffer on double ident
++    (SORT [$( $def:tt )*]
++        items [$($( #[$imeta:meta] )*
++                  => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
++                                {$( $ifuncs:tt )*} )* ]
++        buf [$( #[$bmeta:meta] )*
++                 => $bitem:ident: $bmode:tt [$( $bvar:ident: $btyp:ty ),*] ]
++        queue [ $qitem:ident $( $tail:tt )*]
++    ) => {
++        quick_error!(SORT [$( $def )*]
++            items [$( $(#[$imeta])* => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*
++                     $(#[$bmeta])* => $bitem: $bmode [$( $bvar:$btyp ),*] {} ]
++            buf [ => $qitem : UNIT [ ] ]
++            queue [$( $tail )*]);
++    };
++    // Flush buffer on end
++    (SORT [$( $def:tt )*]
++        items [$($( #[$imeta:meta] )*
++                  => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
++                                {$( $ifuncs:tt )*} )* ]
++        buf [$( #[$bmeta:meta] )*
++            => $bitem:ident: $bmode:tt [$( $bvar:ident: $btyp:ty ),*] ]
++        queue [ ]
++    ) => {
++        quick_error!(SORT [$( $def )*]
++            items [$( $(#[$imeta])* => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*
++                     $(#[$bmeta])* => $bitem: $bmode [$( $bvar:$btyp ),*] {} ]
++            buf [ ]
++            queue [ ]);
++    };
++    // Public enum (Queue Empty)
++    (ENUM_DEFINITION [pub enum $name:ident $( #[$meta:meta] )*]
++        body [$($( #[$imeta:meta] )*
++            => $iitem:ident ($(($( $ttyp:ty ),+))*) {$({$( $svar:ident: $styp:ty ),*})*} )* ]
++        queue [ ]
++    ) => {
++        $(#[$meta])*
++        pub enum $name {
++            $(
++                $(#[$imeta])*
++                $iitem $(($( $ttyp ),*))* $({$( $svar: $styp ),*})*,
++            )*
++        }
++    };
++    // Private enum (Queue Empty)
++    (ENUM_DEFINITION [enum $name:ident $( #[$meta:meta] )*]
++        body [$($( #[$imeta:meta] )*
++            => $iitem:ident ($(($( $ttyp:ty ),+))*) {$({$( $svar:ident: $styp:ty ),*})*} )* ]
++        queue [ ]
++    ) => {
++        $(#[$meta])*
++        enum $name {
++            $(
++                $(#[$imeta])*
++                $iitem $(($( $ttyp ),*))* $({$( $svar: $styp ),*})*,
++            )*
++        }
++    };
++    // Unit variant
++    (ENUM_DEFINITION [$( $def:tt )*]
++        body [$($( #[$imeta:meta] )*
++            => $iitem:ident ($(($( $ttyp:ty ),+))*) {$({$( $svar:ident: $styp:ty ),*})*} )* ]
++        queue [$( #[$qmeta:meta] )*
++            => $qitem:ident: UNIT [ ] $( $queue:tt )*]
++    ) => {
++        quick_error!(ENUM_DEFINITION [ $($def)* ]
++            body [$($( #[$imeta] )* => $iitem ($(($( $ttyp ),+))*) {$({$( $svar: $styp ),*})*} )*
++                    $( #[$qmeta] )* => $qitem () {} ]
++            queue [ $($queue)* ]
++        );
++    };
++    // Tuple variant
++    (ENUM_DEFINITION [$( $def:tt )*]
++        body [$($( #[$imeta:meta] )*
++            => $iitem:ident ($(($( $ttyp:ty ),+))*) {$({$( $svar:ident: $styp:ty ),*})*} )* ]
++        queue [$( #[$qmeta:meta] )*
++            => $qitem:ident: TUPLE [$( $qvar:ident: $qtyp:ty ),+] $( $queue:tt )*]
++    ) => {
++        quick_error!(ENUM_DEFINITION [ $($def)* ]
++            body [$($( #[$imeta] )* => $iitem ($(($( $ttyp ),+))*) {$({$( $svar: $styp ),*})*} )*
++                    $( #[$qmeta] )* => $qitem (($( $qtyp ),*)) {} ]
++            queue [ $($queue)* ]
++        );
++    };
++    // Struct variant
++    (ENUM_DEFINITION [$( $def:tt )*]
++        body [$($( #[$imeta:meta] )*
++            => $iitem:ident ($(($( $ttyp:ty ),+))*) {$({$( $svar:ident: $styp:ty ),*})*} )* ]
++        queue [$( #[$qmeta:meta] )*
++            => $qitem:ident: STRUCT [$( $qvar:ident: $qtyp:ty ),*] $( $queue:tt )*]
++    ) => {
++        quick_error!(ENUM_DEFINITION [ $($def)* ]
++            body [$($( #[$imeta] )* => $iitem ($(($( $ttyp ),+))*) {$({$( $svar: $styp ),*})*} )*
++                    $( #[$qmeta] )* => $qitem () {{$( $qvar: $qtyp ),*}} ]
++            queue [ $($queue)* ]
++        );
++    };
++    (IMPLEMENTATIONS
++        $name:ident {$(
++            $item:ident: $imode:tt [$(#[$imeta:meta])*] [$( $var:ident: $typ:ty ),*] {$( $funcs:tt )*}
++        )*}
++    ) => {
++        #[allow(unused, unused_doc_comment)]
++        impl ::std::fmt::Display for $name {
++            fn fmt(&self, fmt: &mut ::std::fmt::Formatter)
++                -> ::std::fmt::Result
++            {
++                match *self {
++                    $(
++                        $(#[$imeta])*
++                        quick_error!(ITEM_PATTERN
++                            $name $item: $imode [$( ref $var ),*]
++                        ) => {
++                            let display_fn = quick_error!(FIND_DISPLAY_IMPL
++                                $name $item: $imode
++                                {$( $funcs )*});
++
++                            display_fn(self, fmt)
++                        }
++                    )*
++                }
++            }
++        }
++        /*#[allow(unused)]
++        impl ::std::error::Error for $name {
++            fn description(&self) -> &str {
++                match *self {
++                    $(
++                        quick_error!(ITEM_PATTERN
++                            $name $item: $imode [$( ref $var ),*]
++                        ) => {
++                            quick_error!(FIND_DESCRIPTION_IMPL
++                                $item: $imode self fmt [$( $var ),*]
++                                {$( $funcs )*})
++                        }
++                    )*
++                }
++            }
++            fn cause(&self) -> Option<&::std::error::Error> {
++                match *self {
++                    $(
++                        quick_error!(ITEM_PATTERN
++                            $name $item: $imode [$( ref $var ),*]
++                        ) => {
++                            quick_error!(FIND_CAUSE_IMPL
++                                $item: $imode [$( $var ),*]
++                                {$( $funcs )*})
++                        }
++                    )*
++                }
++            }
++        }*/
++        #[allow(unused, unused_doc_comment)]
++        impl $name {
++            /// A string describing the error kind.
++            pub fn description(&self) -> &str {
++                match *self {
++                    $(
++                        $(#[$imeta])*
++                        quick_error!(ITEM_PATTERN
++                            $name $item: $imode [$( ref $var ),*]
++                        ) => {
++                            quick_error!(FIND_DESCRIPTION_IMPL
++                                $item: $imode self fmt [$( $var ),*]
++                                {$( $funcs )*})
++                        }
++                    )*
++                }
++            }
++        }
++        $(
++            quick_error!(FIND_FROM_IMPL
++                $name $item: $imode [$( $var:$typ ),*]
++                {$( $funcs )*});
++        )*
++    };
++    (FIND_DISPLAY_IMPL $name:ident $item:ident: $imode:tt
++        { display($self_:tt) -> ($( $exprs:tt )*) $( $tail:tt )*}
++    ) => {
++        |quick_error!(IDENT $self_): &$name, f: &mut ::std::fmt::Formatter| {
++            write!(f, $( $exprs )*)
++        }
++    };
++    (FIND_DISPLAY_IMPL $name:ident $item:ident: $imode:tt
++        { display($pattern:expr) $( $tail:tt )*}
++    ) => {
++        |_, f: &mut ::std::fmt::Formatter| { write!(f, $pattern) }
++    };
++    (FIND_DISPLAY_IMPL $name:ident $item:ident: $imode:tt
++        { display($pattern:expr, $( $exprs:tt )*) $( $tail:tt )*}
++    ) => {
++        |_, f: &mut ::std::fmt::Formatter| { write!(f, $pattern, $( $exprs )*) }
++    };
++    (FIND_DISPLAY_IMPL $name:ident $item:ident: $imode:tt
++        { $t:tt $( $tail:tt )*}
++    ) => {
++        quick_error!(FIND_DISPLAY_IMPL
++            $name $item: $imode
++            {$( $tail )*})
++    };
++    (FIND_DISPLAY_IMPL $name:ident $item:ident: $imode:tt
++        { }
++    ) => {
++        |self_: &$name, f: &mut ::std::fmt::Formatter| {
++            write!(f, "{}", self_.description())
++        }
++    };
++    (FIND_DESCRIPTION_IMPL $item:ident: $imode:tt $me:ident $fmt:ident
++        [$( $var:ident ),*]
++        { description($expr:expr) $( $tail:tt )*}
++    ) => {
++        $expr
++    };
++    (FIND_DESCRIPTION_IMPL $item:ident: $imode:tt $me:ident $fmt:ident
++        [$( $var:ident ),*]
++        { $t:tt $( $tail:tt )*}
++    ) => {
++        quick_error!(FIND_DESCRIPTION_IMPL
++            $item: $imode $me $fmt [$( $var ),*]
++            {$( $tail )*})
++    };
++    (FIND_DESCRIPTION_IMPL $item:ident: $imode:tt $me:ident $fmt:ident
++        [$( $var:ident ),*]
++        { }
++    ) => {
++        stringify!($item)
++    };
++    (FIND_CAUSE_IMPL $item:ident: $imode:tt
++        [$( $var:ident ),*]
++        { cause($expr:expr) $( $tail:tt )*}
++    ) => {
++        Some($expr)
++    };
++    (FIND_CAUSE_IMPL $item:ident: $imode:tt
++        [$( $var:ident ),*]
++        { $t:tt $( $tail:tt )*}
++    ) => {
++        quick_error!(FIND_CAUSE_IMPL
++            $item: $imode [$( $var ),*]
++            { $($tail)* })
++    };
++    (FIND_CAUSE_IMPL $item:ident: $imode:tt
++        [$( $var:ident ),*]
++        { }
++    ) => {
++        None
++    };
++    (FIND_FROM_IMPL $name:ident $item:ident: $imode:tt
++        [$( $var:ident: $typ:ty ),*]
++        { from() $( $tail:tt )*}
++    ) => {
++        $(
++            impl From<$typ> for $name {
++                fn from($var: $typ) -> $name {
++                    $name::$item($var)
++                }
++            }
++        )*
++        quick_error!(FIND_FROM_IMPL
++            $name $item: $imode [$( $var:$typ ),*]
++            {$( $tail )*});
++    };
++    (FIND_FROM_IMPL $name:ident $item:ident: UNIT
++        [ ]
++        { from($ftyp:ty) $( $tail:tt )*}
++    ) => {
++        impl From<$ftyp> for $name {
++            fn from(_discarded_error: $ftyp) -> $name {
++                $name::$item
++            }
++        }
++        quick_error!(FIND_FROM_IMPL
++            $name $item: UNIT [  ]
++            {$( $tail )*});
++    };
++    (FIND_FROM_IMPL $name:ident $item:ident: TUPLE
++        [$( $var:ident: $typ:ty ),*]
++        { from($fvar:ident: $ftyp:ty) -> ($( $texpr:expr ),*) $( $tail:tt )*}
++    ) => {
++        impl From<$ftyp> for $name {
++            fn from($fvar: $ftyp) -> $name {
++                $name::$item($( $texpr ),*)
++            }
++        }
++        quick_error!(FIND_FROM_IMPL
++            $name $item: TUPLE [$( $var:$typ ),*]
++            { $($tail)* });
++    };
++    (FIND_FROM_IMPL $name:ident $item:ident: STRUCT
++        [$( $var:ident: $typ:ty ),*]
++        { from($fvar:ident: $ftyp:ty) -> {$( $tvar:ident: $texpr:expr ),*} $( $tail:tt )*}
++    ) => {
++        impl From<$ftyp> for $name {
++            fn from($fvar: $ftyp) -> $name {
++                $name::$item {
++                    $( $tvar: $texpr ),*
++                }
++            }
++        }
++        quick_error!(FIND_FROM_IMPL
++            $name $item: STRUCT [$( $var:$typ ),*]
++            { $($tail)* });
++    };
++    (FIND_FROM_IMPL $name:ident $item:ident: $imode:tt
++        [$( $var:ident: $typ:ty ),*]
++        { $t:tt $( $tail:tt )*}
++    ) => {
++        quick_error!(FIND_FROM_IMPL
++            $name $item: $imode [$( $var:$typ ),*]
++            {$( $tail )*}
++        );
++    };
++    (FIND_FROM_IMPL $name:ident $item:ident: $imode:tt
++        [$( $var:ident: $typ:ty ),*]
++        { }
++    ) => {
++    };
++    (ITEM_BODY $(#[$imeta:meta])* $item:ident: UNIT
++    ) => { };
++    (ITEM_BODY $(#[$imeta:meta])* $item:ident: TUPLE
++        [$( $typ:ty ),*]
++    ) => {
++        ($( $typ ),*)
++    };
++    (ITEM_BODY $(#[$imeta:meta])* $item:ident: STRUCT
++        [$( $var:ident: $typ:ty ),*]
++    ) => {
++        {$( $var:$typ ),*}
++    };
++    (ITEM_PATTERN $name:ident $item:ident: UNIT []
++    ) => {
++        $name::$item
++    };
++    (ITEM_PATTERN $name:ident $item:ident: TUPLE
++        [$( ref $var:ident ),*]
++    ) => {
++        $name::$item ($( ref $var ),*)
++    };
++    (ITEM_PATTERN $name:ident $item:ident: STRUCT
++        [$( ref $var:ident ),*]
++    ) => {
++        $name::$item {$( ref $var ),*}
++    };
++    // This one should match all allowed sequences in "funcs" but not match
++    // anything else.
++    // This is to contrast FIND_* clauses which just find stuff they need and
++    // skip everything else completely
++    (ERROR_CHECK $imode:tt display($self_:tt) -> ($( $exprs:tt )*) $( $tail:tt )*)
++    => { quick_error!(ERROR_CHECK_COMMA $imode $($tail)*); };
++    (ERROR_CHECK $imode:tt display($pattern: expr) $( $tail:tt )*)
++    => { quick_error!(ERROR_CHECK_COMMA $imode $($tail)*); };
++    (ERROR_CHECK $imode:tt display($pattern: expr, $( $exprs:tt )*) $( $tail:tt )*)
++    => { quick_error!(ERROR_CHECK_COMMA $imode $($tail)*); };
++    (ERROR_CHECK $imode:tt description($expr:expr) $( $tail:tt )*)
++    => { quick_error!(ERROR_CHECK_COMMA $imode $($tail)*); };
++    (ERROR_CHECK $imode:tt cause($expr:expr) $($tail:tt)*)
++    => { quick_error!(ERROR_CHECK_COMMA $imode $($tail)*); };
++    (ERROR_CHECK $imode:tt from() $($tail:tt)*)
++    => { quick_error!(ERROR_CHECK_COMMA $imode $($tail)*); };
++    (ERROR_CHECK $imode:tt from($ftyp:ty) $($tail:tt)*)
++    => { quick_error!(ERROR_CHECK_COMMA $imode $($tail)*); };
++    (ERROR_CHECK TUPLE from($fvar:ident: $ftyp:ty) -> ($( $e:expr ),*) $( $tail:tt )*)
++    => { quick_error!(ERROR_CHECK_COMMA TUPLE $($tail)*); };
++    (ERROR_CHECK STRUCT from($fvar:ident: $ftyp:ty) -> {$( $v:ident: $e:expr ),*} $( $tail:tt )*)
++        => { quick_error!(ERROR_CHECK_COMMA STRUCT $($tail)*); };
++    (ERROR_CHECK $imode:tt ) => {};
++    (ERROR_CHECK_COMMA $imode:tt , $( $tail:tt )*)
++    => { quick_error!(ERROR_CHECK $imode $($tail)*); };
++    (ERROR_CHECK_COMMA $imode:tt $( $tail:tt )*)
++    => { quick_error!(ERROR_CHECK $imode $($tail)*); };
++    // Utility functions
++    (IDENT $ident:ident) => { $ident }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f81e7d704aa313631f98fb0a215d83afe9f085fa
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,77 @@@
++/// Convenient wrapper to be able to use `?` and such in the main. You can
++/// use it with a separated function:
++///
++/// ```
++/// # #[macro_use] extern crate error_chain;
++/// # error_chain! {}
++/// # fn main() {
++/// quick_main!(run);
++/// # }
++///
++/// fn run() -> Result<()> {
++///     Err("error".into())
++/// }
++/// ```
++///
++/// or with a closure:
++///
++/// ```
++/// # #[macro_use] extern crate error_chain;
++/// # error_chain! {}
++/// # fn main() {
++/// quick_main!(|| -> Result<()> {
++///     Err("error".into())
++/// });
++/// # }
++/// ```
++///
++/// You can also set the exit value of the process by returning a type that implements [`ExitCode`](trait.ExitCode.html):
++///
++/// ```
++/// # #[macro_use] extern crate error_chain;
++/// # error_chain! {}
++/// # fn main() {
++/// quick_main!(run);
++/// # }
++///
++/// fn run() -> Result<i32> {
++///     Err("error".into())
++/// }
++/// ```
++#[macro_export]
++macro_rules! quick_main {
++    ($main:expr) => {
++        fn main() {
++            use ::std::io::Write;
++
++            ::std::process::exit(match $main() {
++                Ok(ret) => $crate::ExitCode::code(ret),
++                Err(ref e) => {
++                    write!(&mut ::std::io::stderr(), "{}", $crate::ChainedError::display_chain(e))
++                        .expect("Error writing to stderr");
++
++                    1
++                }
++            });
++        }
++    };
++}
++
++/// Represents a value that can be used as the exit status of the process.
++/// See [`quick_main!`](macro.quick_main.html).
++pub trait ExitCode {
++    /// Returns the value to use as the exit status.
++    fn code(self) -> i32;
++}
++
++impl ExitCode for i32 {
++    fn code(self) -> i32 {
++        self
++    }
++}
++
++impl ExitCode for () {
++    fn code(self) -> i32 {
++        0
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4ada3b4e03d12b4ad2e5d0e1ba49952205301874
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,28 @@@
++#![allow(dead_code)]
++#[macro_use]
++extern crate error_chain;
++
++error_chain!();
++
++mod unit {
++    use super::*;
++    quick_main!(run);
++
++    fn run() -> Result<()> {
++        Ok(())
++    }
++}
++
++mod i32 {
++    use super::*;
++    quick_main!(run);
++
++    fn run() -> Result<i32> {
++        Ok(1)
++    }
++}
++
++mod closure {
++    use super::*;
++    quick_main!(|| -> Result<()> { Ok(()) });
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..dc56b369c2eb8c1cac0b1ebbca517a7c7c714b98
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,633 @@@
++#![allow(dead_code)]
++
++#[macro_use]
++extern crate error_chain;
++
++#[test]
++fn smoke_test_1() {
++    error_chain! {
++        types {
++            Error, ErrorKind, ResultExt, Result;
++        }
++
++        links { }
++
++        foreign_links { }
++
++        errors { }
++    };
++}
++
++#[test]
++fn smoke_test_2() {
++    error_chain! {
++        types { }
++
++        links { }
++
++        foreign_links { }
++
++        errors { }
++    };
++}
++
++#[test]
++fn smoke_test_3() {
++    error_chain! {
++        links { }
++
++        foreign_links { }
++
++        errors { }
++    };
++}
++
++#[test]
++fn smoke_test_4() {
++    error_chain! {
++        links { }
++
++        foreign_links { }
++
++        errors {
++            HttpStatus(e: u32) {
++                description("http request returned an unsuccessful status code")
++                display("http request returned an unsuccessful status code: {}", e)
++            }
++        }
++    };
++}
++
++#[test]
++fn smoke_test_5() {
++    error_chain! {
++        types { }
++
++        links { }
++
++        foreign_links { }
++
++        errors {
++            HttpStatus(e: u32) {
++                description("http request returned an unsuccessful status code")
++                display("http request returned an unsuccessful status code: {}", e)
++            }
++        }
++    };
++}
++
++#[test]
++fn smoke_test_6() {
++    error_chain! {
++        errors {
++            HttpStatus(e: u32) {
++                description("http request returned an unsuccessful status code")
++                display("http request returned an unsuccessful status code: {}", e)
++            }
++        }
++    };
++}
++
++#[test]
++fn smoke_test_7() {
++    error_chain! {
++        types { }
++
++        foreign_links { }
++
++        errors {
++            HttpStatus(e: u32) {
++                description("http request returned an unsuccessful status code")
++                display("http request returned an unsuccessful status code: {}", e)
++            }
++        }
++    };
++}
++
++#[test]
++fn smoke_test_8() {
++    error_chain! {
++        types { }
++
++        links { }
++        links { }
++
++        foreign_links { }
++        foreign_links { }
++
++        errors {
++            FileNotFound
++            AccessDenied
++        }
++    };
++}
++
++#[test]
++fn order_test_1() {
++    error_chain! { types { } links { } foreign_links { } errors { } };
++}
++
++#[test]
++fn order_test_2() {
++    error_chain! { links { } types { } foreign_links { } errors { } };
++}
++
++#[test]
++fn order_test_3() {
++    error_chain! { foreign_links { }  links { }  errors { } types { } };
++}
++
++#[test]
++fn order_test_4() {
++    error_chain! { errors { } types { } foreign_links { } };
++}
++
++#[test]
++fn order_test_5() {
++    error_chain! { foreign_links { } types { }  };
++}
++
++#[test]
++fn order_test_6() {
++    error_chain! {
++        links { }
++
++        errors {
++            HttpStatus(e: u32) {
++                description("http request returned an unsuccessful status code")
++                display("http request returned an unsuccessful status code: {}", e)
++            }
++        }
++
++
++        foreign_links { }
++    };
++}
++
++#[test]
++fn order_test_7() {
++    error_chain! {
++        links { }
++
++        foreign_links { }
++
++        types {
++            Error, ErrorKind, ResultExt, Result;
++        }
++    };
++}
++
++
++#[test]
++fn order_test_8() {
++    error_chain! {
++        links { }
++
++        foreign_links { }
++        foreign_links { }
++
++        types {
++            Error, ErrorKind, ResultExt, Result;
++        }
++    };
++}
++
++#[test]
++fn empty() {
++    error_chain!{};
++}
++
++#[test]
++#[cfg(feature = "backtrace")]
++fn has_backtrace_depending_on_env() {
++    use std::env;
++
++    error_chain! {
++        types {}
++        links {}
++        foreign_links {}
++        errors {
++            MyError
++        }
++    }
++
++    let original_value = env::var_os("RUST_BACKTRACE");
++
++    // missing RUST_BACKTRACE and RUST_BACKTRACE=0
++    env::remove_var("RUST_BACKTRACE");
++    let err = Error::from(ErrorKind::MyError);
++    assert!(err.backtrace().is_none());
++    env::set_var("RUST_BACKTRACE", "0");
++    let err = Error::from(ErrorKind::MyError);
++    assert!(err.backtrace().is_none());
++
++    // RUST_BACKTRACE set to anything but 0
++    env::set_var("RUST_BACKTRACE", "yes");
++    let err = Error::from(ErrorKind::MyError);
++    assert!(err.backtrace().is_some());
++
++    if let Some(var) = original_value {
++        env::set_var("RUST_BACKTRACE", var);
++    }
++}
++
++#[test]
++fn chain_err() {
++    use std::fmt;
++
++    error_chain! {
++        foreign_links {
++            Fmt(fmt::Error);
++        }
++        errors {
++            Test
++        }
++    }
++
++    let _: Result<()> = Err(fmt::Error).chain_err(|| "");
++    let _: Result<()> = Err(Error::from_kind(ErrorKind::Test)).chain_err(|| "");
++}
++
++/// Verify that an error chain is extended one by `Error::chain_err`, with
++/// the new error added to the end.
++#[test]
++fn error_chain_err() {
++    error_chain! {
++        errors {
++            Test
++        }
++    }
++
++    let base = Error::from(ErrorKind::Test);
++    let ext = base.chain_err(|| "Test passes");
++
++    if let Error(ErrorKind::Msg(_), _) = ext {
++        // pass
++    } else {
++        panic!("The error should be wrapped. {:?}", ext);
++    }
++}
++
++#[test]
++fn links() {
++    mod test {
++        error_chain!{}
++    }
++
++    error_chain! {
++        links {
++            Test(test::Error, test::ErrorKind);
++        }
++    }
++}
++
++#[cfg(test)]
++mod foreign_link_test {
++
++    use std::fmt;
++
++    // Note: foreign errors must be `pub` because they appear in the
++    // signature of the public foreign_link_error_path
++    #[derive(Debug)]
++    pub struct ForeignError {
++        cause: ForeignErrorCause,
++    }
++
++    impl ::std::error::Error for ForeignError {
++        fn description(&self) -> &'static str {
++            "Foreign error description"
++        }
++
++        fn cause(&self) -> Option<&::std::error::Error> {
++            Some(&self.cause)
++        }
++    }
++
++    impl fmt::Display for ForeignError {
++        fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++            write!(formatter, "Foreign error display")
++        }
++    }
++
++    #[derive(Debug)]
++    pub struct ForeignErrorCause {}
++
++    impl ::std::error::Error for ForeignErrorCause {
++        fn description(&self) -> &'static str {
++            "Foreign error cause description"
++        }
++
++        fn cause(&self) -> Option<&::std::error::Error> {
++            None
++        }
++    }
++
++    impl fmt::Display for ForeignErrorCause {
++        fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++            write!(formatter, "Foreign error cause display")
++        }
++    }
++
++    error_chain! {
++        types{
++            Error, ErrorKind, ResultExt, Result;
++        }
++        links {}
++        foreign_links {
++            Foreign(ForeignError);
++            Io(::std::io::Error);
++        }
++        errors {}
++    }
++
++    #[test]
++    fn display_underlying_error() {
++        let chained_error = try_foreign_error().err().unwrap();
++        assert_eq!(format!("{}", ForeignError { cause: ForeignErrorCause {} }),
++                   format!("{}", chained_error));
++    }
++
++    #[test]
++    fn finds_cause() {
++        let chained_error = try_foreign_error().err().unwrap();
++        assert_eq!(format!("{}", ForeignErrorCause {}),
++                   format!("{}", ::std::error::Error::cause(&chained_error).unwrap()));
++    }
++
++    #[test]
++    fn iterates() {
++        let chained_error = try_foreign_error().err().unwrap();
++        let mut error_iter = chained_error.iter();
++        assert!(!format!("{:?}", error_iter).is_empty());
++        assert_eq!(format!("{}", ForeignError { cause: ForeignErrorCause {} }),
++                   format!("{}", error_iter.next().unwrap()));
++        assert_eq!(format!("{}", ForeignErrorCause {}),
++                   format!("{}", error_iter.next().unwrap()));
++        assert_eq!(format!("{:?}", None as Option<&::std::error::Error>),
++                   format!("{:?}", error_iter.next()));
++    }
++
++    fn try_foreign_error() -> Result<()> {
++        Err(ForeignError { cause: ForeignErrorCause {} })?;
++        Ok(())
++    }
++}
++
++#[cfg(test)]
++mod attributes_test {
++    #[allow(unused_imports)]
++    use std::io;
++
++    #[cfg(not(test))]
++    mod inner {
++        error_chain!{}
++    }
++
++    error_chain! {
++        types {
++            Error, ErrorKind, ResultExt, Result;
++        }
++
++        links {
++            Inner(inner::Error, inner::ErrorKind) #[cfg(not(test))];
++        }
++
++        foreign_links {
++            Io(io::Error) #[cfg(not(test))];
++        }
++
++        errors {
++            #[cfg(not(test))]
++            AnError {
++
++            }
++        }
++    }
++}
++
++#[test]
++fn with_result() {
++    error_chain! {
++        types {
++            Error, ErrorKind, ResultExt, Result;
++        }
++    }
++    let _: Result<()> = Ok(());
++}
++
++#[test]
++fn without_result() {
++    error_chain! {
++        types {
++            Error, ErrorKind, ResultExt;
++        }
++    }
++    let _: Result<(), ()> = Ok(());
++}
++
++#[test]
++fn documentation() {
++    mod inner {
++        error_chain!{}
++    }
++
++    error_chain! {
++        links {
++            Inner(inner::Error, inner::ErrorKind) #[doc = "Doc"];
++        }
++        foreign_links {
++            Io(::std::io::Error) #[doc = "Doc"];
++        }
++        errors {
++            /// Doc
++            Variant
++        }
++    }
++}
++
++#[cfg(test)]
++mod multiple_error_same_mod {
++    error_chain! {
++        types {
++            MyError, MyErrorKind, MyResultExt, MyResult;
++        }
++    }
++    error_chain!{}
++}
++
++#[doc(test)]
++#[deny(dead_code)]
++mod allow_dead_code {
++    error_chain!{}
++}
++
++// Make sure links actually work!
++#[test]
++fn rustup_regression() {
++    error_chain! {
++        links {
++            Download(error_chain::mock::Error, error_chain::mock::ErrorKind);
++        }
++
++        foreign_links { }
++
++        errors {
++            LocatingWorkingDir {
++                description("could not locate working directory")
++            }
++        }
++    }
++}
++
++#[test]
++fn error_patterns() {
++    error_chain! {
++        links { }
++
++        foreign_links { }
++
++        errors { }
++    }
++
++    // Tuples look nice when matching errors
++    match Error::from("Test") {
++        Error(ErrorKind::Msg(_), _) => {}
++    }
++}
++
++#[test]
++fn error_first() {
++    error_chain! {
++        errors {
++            LocatingWorkingDir {
++                description("could not locate working directory")
++            }
++        }
++
++        links {
++            Download(error_chain::mock::Error, error_chain::mock::ErrorKind);
++        }
++
++        foreign_links { }
++    }
++}
++
++#[test]
++fn bail() {
++    error_chain! {
++        errors { Foo }
++    }
++
++    fn foo() -> Result<()> {
++        bail!(ErrorKind::Foo)
++    }
++
++    fn bar() -> Result<()> {
++        bail!("bar")
++    }
++
++    fn baz() -> Result<()> {
++        bail!("{}", "baz")
++    }
++}
++
++#[test]
++fn ensure() {
++    error_chain! {
++        errors { Bar }
++    }
++
++    fn foo(x: u8) -> Result<()> {
++        ensure!(x == 42, ErrorKind::Bar);
++        Ok(())
++    }
++
++    assert!(foo(42).is_ok());
++    assert!(foo(0).is_err());
++}
++
++/// Since the `types` declaration is a list of symbols, check if we
++/// don't change their meaning or order.
++#[test]
++fn types_declarations() {
++    error_chain! {
++        types {
++            MyError, MyErrorKind, MyResultExt, MyResult;
++        }
++    }
++
++    MyError::from_kind(MyErrorKind::Msg("".into()));
++
++    let err: Result<(), ::std::io::Error> = Ok(());
++    MyResultExt::chain_err(err, || "").unwrap();
++
++    let _: MyResult<()> = Ok(());
++}
++
++#[test]
++/// Calling chain_err over a `Result` containing an error to get a chained error
++/// and constructing a MyError directly, passing it an error should be equivalent.
++fn rewrapping() {
++
++    use std::env::VarError::{self, NotPresent, NotUnicode};
++
++    error_chain! {
++        foreign_links {
++            VarErr(VarError);
++        }
++
++        types {
++            MyError, MyErrorKind, MyResultExt, MyResult;
++        }
++    }
++
++    let result_a_from_func: Result<String, _> = Err(VarError::NotPresent);
++    let result_b_from_func: Result<String, _> = Err(VarError::NotPresent);
++
++    let our_error_a = result_a_from_func.map_err(|e| match e {
++        NotPresent => MyError::with_chain(e, "env var wasn't provided"),
++        NotUnicode(_) => MyError::with_chain(e, "env var was bork文字化ã"),
++    });
++
++    let our_error_b = result_b_from_func.or_else(|e| match e {
++        NotPresent => Err(e).chain_err(|| "env var wasn't provided"),
++        NotUnicode(_) => Err(e).chain_err(|| "env var was bork文字化ã"),
++    });
++
++    assert_eq!(format!("{}", our_error_a.unwrap_err()),
++               format!("{}", our_error_b.unwrap_err()));
++
++}
++
++#[test]
++fn comma_in_errors_impl() {
++    error_chain! {
++        links { }
++
++        foreign_links { }
++
++        errors {
++            HttpStatus(e: u32) {
++                description("http request returned an unsuccessful status code"),
++                display("http request returned an unsuccessful status code: {}", e)
++            }
++        }
++    };
++}
++
++
++#[test]
++fn trailing_comma_in_errors_impl() {
++    error_chain! {
++        links { }
++
++        foreign_links { }
++
++        errors {
++            HttpStatus(e: u32) {
++                description("http request returned an unsuccessful status code"),
++                display("http request returned an unsuccessful status code: {}", e),
++            }
++        }
++    };
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2b2416d71abf4d5bbfbe78b4d3f08dd6f23eb4f2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9c58f03c666160636d965915a58a354760fe53ed
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,8 @@@
++language: rust
++rust:
++  - nightly
++  - beta
++  - stable
++
++notifications:
++  webhooks: http://build.servo.org:54856/travis
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c4011504898caf78292a25493edf4802d631ffe4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++[package]
++name = "fnv"
++version = "1.0.5"
++authors = ["Alex Crichton <alex@alexcrichton.com>"]
++description = "Fowler–Noll–Vo hash function"
++license = "Apache-2.0 / MIT"
++readme = "README.md"
++repository = "https://github.com/servo/rust-fnv"
++documentation = "https://doc.servo.org/fnv/"
++
++[lib]
++name = "fnv"
++path = "lib.rs"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..96001e22deb351a914685661c314bc42906fd6c0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,81 @@@
++# rust-fnv
++
++An implementation of the [Fowler–Noll–Vo hash function][chongo].
++
++### [Read the documentation](https://doc.servo.org/fnv/)
++
++
++## About
++
++The FNV hash function is a custom `Hasher` implementation that is more
++efficient for smaller hash keys.
++
++[The Rust FAQ states that][faq] while the default `Hasher` implementation,
++SipHash, is good in many cases, it is notably slower than other algorithms
++with short keys, such as when you have a map of integers to other values.
++In cases like these, [FNV is demonstrably faster][graphs].
++
++Its disadvantages are that it performs badly on larger inputs, and
++provides no protection against collision attacks, where a malicious user
++can craft specific keys designed to slow a hasher down. Thus, it is
++important to profile your program to ensure that you are using small hash
++keys, and be certain that your program could not be exposed to malicious
++inputs (including being a networked server).
++
++The Rust compiler itself uses FNV, as it is not worried about
++denial-of-service attacks, and can assume that its inputs are going to be
++small—a perfect use case for FNV.
++
++
++## Usage
++
++To include this crate in your program, add the following to your `Cargo.toml`:
++
++```toml
++[dependencies]
++fnv = "1.0.3"
++```
++
++
++## Using FNV in a HashMap
++
++The `FnvHashMap` type alias is the easiest way to use the standard library’s
++`HashMap` with FNV.
++
++```rust
++use fnv::FnvHashMap;
++
++let mut map = FnvHashMap::default();
++map.insert(1, "one");
++map.insert(2, "two");
++
++map = FnvHashMap::with_capacity_and_hasher(10, Default::default());
++map.insert(1, "one");
++map.insert(2, "two");
++```
++
++Note, the standard library’s `HashMap::new` and `HashMap::with_capacity`
++are only implemented for the `RandomState` hasher, so using `Default` to
++get the hasher is the next best option.
++
++
++## Using FNV in a HashSet
++
++Similarly, `FnvHashSet` is a type alias for the standard library’s `HashSet`
++with FNV.
++
++```rust
++use fnv::FnvHashSet;
++
++let mut set = FnvHashSet::default();
++set.insert(1);
++set.insert(2);
++
++set = FnvHashSet::with_capacity_and_hasher(10, Default::default());
++set.insert(1);
++set.insert(2);
++```
++
++[chongo]: http://www.isthe.com/chongo/tech/comp/fnv/index.html
++[faq]: https://www.rust-lang.org/faq.html#why-are-rusts-hashmaps-slow
++[graphs]: http://cglab.ca/~abeinges/blah/hash-rs/
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1fc5d28c20005ce7c1e9856ecfea25cf2329f132
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,349 @@@
++//! An implementation of the [Fowler–Noll–Vo hash function][chongo].
++//!
++//! ## About
++//!
++//! The FNV hash function is a custom `Hasher` implementation that is more
++//! efficient for smaller hash keys.
++//!
++//! [The Rust FAQ states that][faq] while the default `Hasher` implementation,
++//! SipHash, is good in many cases, it is notably slower than other algorithms
++//! with short keys, such as when you have a map of integers to other values.
++//! In cases like these, [FNV is demonstrably faster][graphs].
++//!
++//! Its disadvantages are that it performs badly on larger inputs, and
++//! provides no protection against collision attacks, where a malicious user
++//! can craft specific keys designed to slow a hasher down. Thus, it is
++//! important to profile your program to ensure that you are using small hash
++//! keys, and be certain that your program could not be exposed to malicious
++//! inputs (including being a networked server).
++//!
++//! The Rust compiler itself uses FNV, as it is not worried about
++//! denial-of-service attacks, and can assume that its inputs are going to be
++//! small—a perfect use case for FNV.
++//!
++//!
++//! ## Using FNV in a `HashMap`
++//!
++//! The `FnvHashMap` type alias is the easiest way to use the standard library’s
++//! `HashMap` with FNV.
++//!
++//! ```rust
++//! use fnv::FnvHashMap;
++//!
++//! let mut map = FnvHashMap::default();
++//! map.insert(1, "one");
++//! map.insert(2, "two");
++//!
++//! map = FnvHashMap::with_capacity_and_hasher(10, Default::default());
++//! map.insert(1, "one");
++//! map.insert(2, "two");
++//! ```
++//!
++//! Note, the standard library’s `HashMap::new` and `HashMap::with_capacity`
++//! are only implemented for the `RandomState` hasher, so using `Default` to
++//! get the hasher is the next best option.
++//!
++//! ## Using FNV in a `HashSet`
++//!
++//! Similarly, `FnvHashSet` is a type alias for the standard library’s `HashSet`
++//! with FNV.
++//!
++//! ```rust
++//! use fnv::FnvHashSet;
++//!
++//! let mut set = FnvHashSet::default();
++//! set.insert(1);
++//! set.insert(2);
++//!
++//! set = FnvHashSet::with_capacity_and_hasher(10, Default::default());
++//! set.insert(1);
++//! set.insert(2);
++//! ```
++//!
++//! [chongo]: http://www.isthe.com/chongo/tech/comp/fnv/index.html
++//! [faq]: https://www.rust-lang.org/faq.html#why-are-rusts-hashmaps-slow
++//! [graphs]: http://cglab.ca/~abeinges/blah/hash-rs/
++
++
++use std::default::Default;
++use std::hash::{Hasher, BuildHasherDefault};
++use std::collections::{HashMap, HashSet};
++
++/// An implementation of the Fowler–Noll–Vo hash function.
++///
++/// See the [crate documentation](index.html) for more details.
++#[allow(missing_copy_implementations)]
++pub struct FnvHasher(u64);
++
++impl Default for FnvHasher {
++
++    #[inline]
++    fn default() -> FnvHasher {
++        FnvHasher(0xcbf29ce484222325)
++    }
++}
++
++impl FnvHasher {
++    /// Create an FNV hasher starting with a state corresponding
++    /// to the hash `key`.
++    #[inline]
++    pub fn with_key(key: u64) -> FnvHasher {
++        FnvHasher(key)
++    }
++}
++
++impl Hasher for FnvHasher {
++    #[inline]
++    fn finish(&self) -> u64 {
++        self.0
++    }
++
++    #[inline]
++    fn write(&mut self, bytes: &[u8]) {
++        let FnvHasher(mut hash) = *self;
++
++        for byte in bytes.iter() {
++            hash = hash ^ (*byte as u64);
++            hash = hash.wrapping_mul(0x100000001b3);
++        }
++
++        *self = FnvHasher(hash);
++    }
++}
++
++/// A builder for default FNV hashers.
++pub type FnvBuildHasher = BuildHasherDefault<FnvHasher>;
++
++/// A `HashMap` using a default FNV hasher.
++pub type FnvHashMap<K, V> = HashMap<K, V, FnvBuildHasher>;
++
++/// A `HashSet` using a default FNV hasher.
++pub type FnvHashSet<T> = HashSet<T, FnvBuildHasher>;
++
++
++#[cfg(test)]
++mod test {
++    use super::*;
++    use std::hash::Hasher;
++
++    fn fnv1a(bytes: &[u8]) -> u64 {
++        let mut hasher = FnvHasher::default();
++        hasher.write(bytes);
++        hasher.finish()
++    }
++
++    fn repeat_10(bytes: &[u8]) -> Vec<u8> {
++        (0..10).flat_map(|_| bytes.iter().cloned()).collect()
++    }
++
++    fn repeat_500(bytes: &[u8]) -> Vec<u8> {
++        (0..500).flat_map(|_| bytes.iter().cloned()).collect()
++    }
++
++    #[test]
++    fn basic_tests() {
++        assert_eq!(fnv1a(b""), 0xcbf29ce484222325);
++        assert_eq!(fnv1a(b"a"), 0xaf63dc4c8601ec8c);
++        assert_eq!(fnv1a(b"b"), 0xaf63df4c8601f1a5);
++        assert_eq!(fnv1a(b"c"), 0xaf63de4c8601eff2);
++        assert_eq!(fnv1a(b"d"), 0xaf63d94c8601e773);
++        assert_eq!(fnv1a(b"e"), 0xaf63d84c8601e5c0);
++        assert_eq!(fnv1a(b"f"), 0xaf63db4c8601ead9);
++        assert_eq!(fnv1a(b"fo"), 0x08985907b541d342);
++        assert_eq!(fnv1a(b"foo"), 0xdcb27518fed9d577);
++        assert_eq!(fnv1a(b"foob"), 0xdd120e790c2512af);
++        assert_eq!(fnv1a(b"fooba"), 0xcac165afa2fef40a);
++        assert_eq!(fnv1a(b"foobar"), 0x85944171f73967e8);
++        assert_eq!(fnv1a(b"\0"), 0xaf63bd4c8601b7df);
++        assert_eq!(fnv1a(b"a\0"), 0x089be207b544f1e4);
++        assert_eq!(fnv1a(b"b\0"), 0x08a61407b54d9b5f);
++        assert_eq!(fnv1a(b"c\0"), 0x08a2ae07b54ab836);
++        assert_eq!(fnv1a(b"d\0"), 0x0891b007b53c4869);
++        assert_eq!(fnv1a(b"e\0"), 0x088e4a07b5396540);
++        assert_eq!(fnv1a(b"f\0"), 0x08987c07b5420ebb);
++        assert_eq!(fnv1a(b"fo\0"), 0xdcb28a18fed9f926);
++        assert_eq!(fnv1a(b"foo\0"), 0xdd1270790c25b935);
++        assert_eq!(fnv1a(b"foob\0"), 0xcac146afa2febf5d);
++        assert_eq!(fnv1a(b"fooba\0"), 0x8593d371f738acfe);
++        assert_eq!(fnv1a(b"foobar\0"), 0x34531ca7168b8f38);
++        assert_eq!(fnv1a(b"ch"), 0x08a25607b54a22ae);
++        assert_eq!(fnv1a(b"cho"), 0xf5faf0190cf90df3);
++        assert_eq!(fnv1a(b"chon"), 0xf27397910b3221c7);
++        assert_eq!(fnv1a(b"chong"), 0x2c8c2b76062f22e0);
++        assert_eq!(fnv1a(b"chongo"), 0xe150688c8217b8fd);
++        assert_eq!(fnv1a(b"chongo "), 0xf35a83c10e4f1f87);
++        assert_eq!(fnv1a(b"chongo w"), 0xd1edd10b507344d0);
++        assert_eq!(fnv1a(b"chongo wa"), 0x2a5ee739b3ddb8c3);
++        assert_eq!(fnv1a(b"chongo was"), 0xdcfb970ca1c0d310);
++        assert_eq!(fnv1a(b"chongo was "), 0x4054da76daa6da90);
++        assert_eq!(fnv1a(b"chongo was h"), 0xf70a2ff589861368);
++        assert_eq!(fnv1a(b"chongo was he"), 0x4c628b38aed25f17);
++        assert_eq!(fnv1a(b"chongo was her"), 0x9dd1f6510f78189f);
++        assert_eq!(fnv1a(b"chongo was here"), 0xa3de85bd491270ce);
++        assert_eq!(fnv1a(b"chongo was here!"), 0x858e2fa32a55e61d);
++        assert_eq!(fnv1a(b"chongo was here!\n"), 0x46810940eff5f915);
++        assert_eq!(fnv1a(b"ch\0"), 0xf5fadd190cf8edaa);
++        assert_eq!(fnv1a(b"cho\0"), 0xf273ed910b32b3e9);
++        assert_eq!(fnv1a(b"chon\0"), 0x2c8c5276062f6525);
++        assert_eq!(fnv1a(b"chong\0"), 0xe150b98c821842a0);
++        assert_eq!(fnv1a(b"chongo\0"), 0xf35aa3c10e4f55e7);
++        assert_eq!(fnv1a(b"chongo \0"), 0xd1ed680b50729265);
++        assert_eq!(fnv1a(b"chongo w\0"), 0x2a5f0639b3dded70);
++        assert_eq!(fnv1a(b"chongo wa\0"), 0xdcfbaa0ca1c0f359);
++        assert_eq!(fnv1a(b"chongo was\0"), 0x4054ba76daa6a430);
++        assert_eq!(fnv1a(b"chongo was \0"), 0xf709c7f5898562b0);
++        assert_eq!(fnv1a(b"chongo was h\0"), 0x4c62e638aed2f9b8);
++        assert_eq!(fnv1a(b"chongo was he\0"), 0x9dd1a8510f779415);
++        assert_eq!(fnv1a(b"chongo was her\0"), 0xa3de2abd4911d62d);
++        assert_eq!(fnv1a(b"chongo was here\0"), 0x858e0ea32a55ae0a);
++        assert_eq!(fnv1a(b"chongo was here!\0"), 0x46810f40eff60347);
++        assert_eq!(fnv1a(b"chongo was here!\n\0"), 0xc33bce57bef63eaf);
++        assert_eq!(fnv1a(b"cu"), 0x08a24307b54a0265);
++        assert_eq!(fnv1a(b"cur"), 0xf5b9fd190cc18d15);
++        assert_eq!(fnv1a(b"curd"), 0x4c968290ace35703);
++        assert_eq!(fnv1a(b"curds"), 0x07174bd5c64d9350);
++        assert_eq!(fnv1a(b"curds "), 0x5a294c3ff5d18750);
++        assert_eq!(fnv1a(b"curds a"), 0x05b3c1aeb308b843);
++        assert_eq!(fnv1a(b"curds an"), 0xb92a48da37d0f477);
++        assert_eq!(fnv1a(b"curds and"), 0x73cdddccd80ebc49);
++        assert_eq!(fnv1a(b"curds and "), 0xd58c4c13210a266b);
++        assert_eq!(fnv1a(b"curds and w"), 0xe78b6081243ec194);
++        assert_eq!(fnv1a(b"curds and wh"), 0xb096f77096a39f34);
++        assert_eq!(fnv1a(b"curds and whe"), 0xb425c54ff807b6a3);
++        assert_eq!(fnv1a(b"curds and whey"), 0x23e520e2751bb46e);
++        assert_eq!(fnv1a(b"curds and whey\n"), 0x1a0b44ccfe1385ec);
++        assert_eq!(fnv1a(b"cu\0"), 0xf5ba4b190cc2119f);
++        assert_eq!(fnv1a(b"cur\0"), 0x4c962690ace2baaf);
++        assert_eq!(fnv1a(b"curd\0"), 0x0716ded5c64cda19);
++        assert_eq!(fnv1a(b"curds\0"), 0x5a292c3ff5d150f0);
++        assert_eq!(fnv1a(b"curds \0"), 0x05b3e0aeb308ecf0);
++        assert_eq!(fnv1a(b"curds a\0"), 0xb92a5eda37d119d9);
++        assert_eq!(fnv1a(b"curds an\0"), 0x73ce41ccd80f6635);
++        assert_eq!(fnv1a(b"curds and\0"), 0xd58c2c132109f00b);
++        assert_eq!(fnv1a(b"curds and \0"), 0xe78baf81243f47d1);
++        assert_eq!(fnv1a(b"curds and w\0"), 0xb0968f7096a2ee7c);
++        assert_eq!(fnv1a(b"curds and wh\0"), 0xb425a84ff807855c);
++        assert_eq!(fnv1a(b"curds and whe\0"), 0x23e4e9e2751b56f9);
++        assert_eq!(fnv1a(b"curds and whey\0"), 0x1a0b4eccfe1396ea);
++        assert_eq!(fnv1a(b"curds and whey\n\0"), 0x54abd453bb2c9004);
++        assert_eq!(fnv1a(b"hi"), 0x08ba5f07b55ec3da);
++        assert_eq!(fnv1a(b"hi\0"), 0x337354193006cb6e);
++        assert_eq!(fnv1a(b"hello"), 0xa430d84680aabd0b);
++        assert_eq!(fnv1a(b"hello\0"), 0xa9bc8acca21f39b1);
++        assert_eq!(fnv1a(b"\xff\x00\x00\x01"), 0x6961196491cc682d);
++        assert_eq!(fnv1a(b"\x01\x00\x00\xff"), 0xad2bb1774799dfe9);
++        assert_eq!(fnv1a(b"\xff\x00\x00\x02"), 0x6961166491cc6314);
++        assert_eq!(fnv1a(b"\x02\x00\x00\xff"), 0x8d1bb3904a3b1236);
++        assert_eq!(fnv1a(b"\xff\x00\x00\x03"), 0x6961176491cc64c7);
++        assert_eq!(fnv1a(b"\x03\x00\x00\xff"), 0xed205d87f40434c7);
++        assert_eq!(fnv1a(b"\xff\x00\x00\x04"), 0x6961146491cc5fae);
++        assert_eq!(fnv1a(b"\x04\x00\x00\xff"), 0xcd3baf5e44f8ad9c);
++        assert_eq!(fnv1a(b"\x40\x51\x4e\x44"), 0xe3b36596127cd6d8);
++        assert_eq!(fnv1a(b"\x44\x4e\x51\x40"), 0xf77f1072c8e8a646);
++        assert_eq!(fnv1a(b"\x40\x51\x4e\x4a"), 0xe3b36396127cd372);
++        assert_eq!(fnv1a(b"\x4a\x4e\x51\x40"), 0x6067dce9932ad458);
++        assert_eq!(fnv1a(b"\x40\x51\x4e\x54"), 0xe3b37596127cf208);
++        assert_eq!(fnv1a(b"\x54\x4e\x51\x40"), 0x4b7b10fa9fe83936);
++        assert_eq!(fnv1a(b"127.0.0.1"), 0xaabafe7104d914be);
++        assert_eq!(fnv1a(b"127.0.0.1\0"), 0xf4d3180b3cde3eda);
++        assert_eq!(fnv1a(b"127.0.0.2"), 0xaabafd7104d9130b);
++        assert_eq!(fnv1a(b"127.0.0.2\0"), 0xf4cfb20b3cdb5bb1);
++        assert_eq!(fnv1a(b"127.0.0.3"), 0xaabafc7104d91158);
++        assert_eq!(fnv1a(b"127.0.0.3\0"), 0xf4cc4c0b3cd87888);
++        assert_eq!(fnv1a(b"64.81.78.68"), 0xe729bac5d2a8d3a7);
++        assert_eq!(fnv1a(b"64.81.78.68\0"), 0x74bc0524f4dfa4c5);
++        assert_eq!(fnv1a(b"64.81.78.74"), 0xe72630c5d2a5b352);
++        assert_eq!(fnv1a(b"64.81.78.74\0"), 0x6b983224ef8fb456);
++        assert_eq!(fnv1a(b"64.81.78.84"), 0xe73042c5d2ae266d);
++        assert_eq!(fnv1a(b"64.81.78.84\0"), 0x8527e324fdeb4b37);
++        assert_eq!(fnv1a(b"feedface"), 0x0a83c86fee952abc);
++        assert_eq!(fnv1a(b"feedface\0"), 0x7318523267779d74);
++        assert_eq!(fnv1a(b"feedfacedaffdeed"), 0x3e66d3d56b8caca1);
++        assert_eq!(fnv1a(b"feedfacedaffdeed\0"), 0x956694a5c0095593);
++        assert_eq!(fnv1a(b"feedfacedeadbeef"), 0xcac54572bb1a6fc8);
++        assert_eq!(fnv1a(b"feedfacedeadbeef\0"), 0xa7a4c9f3edebf0d8);
++        assert_eq!(fnv1a(b"line 1\nline 2\nline 3"), 0x7829851fac17b143);
++        assert_eq!(fnv1a(b"chongo <Landon Curt Noll> /\\../\\"), 0x2c8f4c9af81bcf06);
++        assert_eq!(fnv1a(b"chongo <Landon Curt Noll> /\\../\\\0"), 0xd34e31539740c732);
++        assert_eq!(fnv1a(b"chongo (Landon Curt Noll) /\\../\\"), 0x3605a2ac253d2db1);
++        assert_eq!(fnv1a(b"chongo (Landon Curt Noll) /\\../\\\0"), 0x08c11b8346f4a3c3);
++        assert_eq!(fnv1a(b"http://antwrp.gsfc.nasa.gov/apod/astropix.html"), 0x6be396289ce8a6da);
++        assert_eq!(fnv1a(b"http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash"), 0xd9b957fb7fe794c5);
++        assert_eq!(fnv1a(b"http://epod.usra.edu/"), 0x05be33da04560a93);
++        assert_eq!(fnv1a(b"http://exoplanet.eu/"), 0x0957f1577ba9747c);
++        assert_eq!(fnv1a(b"http://hvo.wr.usgs.gov/cam3/"), 0xda2cc3acc24fba57);
++        assert_eq!(fnv1a(b"http://hvo.wr.usgs.gov/cams/HMcam/"), 0x74136f185b29e7f0);
++        assert_eq!(fnv1a(b"http://hvo.wr.usgs.gov/kilauea/update/deformation.html"), 0xb2f2b4590edb93b2);
++        assert_eq!(fnv1a(b"http://hvo.wr.usgs.gov/kilauea/update/images.html"), 0xb3608fce8b86ae04);
++        assert_eq!(fnv1a(b"http://hvo.wr.usgs.gov/kilauea/update/maps.html"), 0x4a3a865079359063);
++        assert_eq!(fnv1a(b"http://hvo.wr.usgs.gov/volcanowatch/current_issue.html"), 0x5b3a7ef496880a50);
++        assert_eq!(fnv1a(b"http://neo.jpl.nasa.gov/risk/"), 0x48fae3163854c23b);
++        assert_eq!(fnv1a(b"http://norvig.com/21-days.html"), 0x07aaa640476e0b9a);
++        assert_eq!(fnv1a(b"http://primes.utm.edu/curios/home.php"), 0x2f653656383a687d);
++        assert_eq!(fnv1a(b"http://slashdot.org/"), 0xa1031f8e7599d79c);
++        assert_eq!(fnv1a(b"http://tux.wr.usgs.gov/Maps/155.25-19.5.html"), 0xa31908178ff92477);
++        assert_eq!(fnv1a(b"http://volcano.wr.usgs.gov/kilaueastatus.php"), 0x097edf3c14c3fb83);
++        assert_eq!(fnv1a(b"http://www.avo.alaska.edu/activity/Redoubt.php"), 0xb51ca83feaa0971b);
++        assert_eq!(fnv1a(b"http://www.dilbert.com/fast/"), 0xdd3c0d96d784f2e9);
++        assert_eq!(fnv1a(b"http://www.fourmilab.ch/gravitation/orbits/"), 0x86cd26a9ea767d78);
++        assert_eq!(fnv1a(b"http://www.fpoa.net/"), 0xe6b215ff54a30c18);
++        assert_eq!(fnv1a(b"http://www.ioccc.org/index.html"), 0xec5b06a1c5531093);
++        assert_eq!(fnv1a(b"http://www.isthe.com/cgi-bin/number.cgi"), 0x45665a929f9ec5e5);
++        assert_eq!(fnv1a(b"http://www.isthe.com/chongo/bio.html"), 0x8c7609b4a9f10907);
++        assert_eq!(fnv1a(b"http://www.isthe.com/chongo/index.html"), 0x89aac3a491f0d729);
++        assert_eq!(fnv1a(b"http://www.isthe.com/chongo/src/calc/lucas-calc"), 0x32ce6b26e0f4a403);
++        assert_eq!(fnv1a(b"http://www.isthe.com/chongo/tech/astro/venus2004.html"), 0x614ab44e02b53e01);
++        assert_eq!(fnv1a(b"http://www.isthe.com/chongo/tech/astro/vita.html"), 0xfa6472eb6eef3290);
++        assert_eq!(fnv1a(b"http://www.isthe.com/chongo/tech/comp/c/expert.html"), 0x9e5d75eb1948eb6a);
++        assert_eq!(fnv1a(b"http://www.isthe.com/chongo/tech/comp/calc/index.html"), 0xb6d12ad4a8671852);
++        assert_eq!(fnv1a(b"http://www.isthe.com/chongo/tech/comp/fnv/index.html"), 0x88826f56eba07af1);
++        assert_eq!(fnv1a(b"http://www.isthe.com/chongo/tech/math/number/howhigh.html"), 0x44535bf2645bc0fd);
++        assert_eq!(fnv1a(b"http://www.isthe.com/chongo/tech/math/number/number.html"), 0x169388ffc21e3728);
++        assert_eq!(fnv1a(b"http://www.isthe.com/chongo/tech/math/prime/mersenne.html"), 0xf68aac9e396d8224);
++        assert_eq!(fnv1a(b"http://www.isthe.com/chongo/tech/math/prime/mersenne.html#largest"), 0x8e87d7e7472b3883);
++        assert_eq!(fnv1a(b"http://www.lavarnd.org/cgi-bin/corpspeak.cgi"), 0x295c26caa8b423de);
++        assert_eq!(fnv1a(b"http://www.lavarnd.org/cgi-bin/haiku.cgi"), 0x322c814292e72176);
++        assert_eq!(fnv1a(b"http://www.lavarnd.org/cgi-bin/rand-none.cgi"), 0x8a06550eb8af7268);
++        assert_eq!(fnv1a(b"http://www.lavarnd.org/cgi-bin/randdist.cgi"), 0xef86d60e661bcf71);
++        assert_eq!(fnv1a(b"http://www.lavarnd.org/index.html"), 0x9e5426c87f30ee54);
++        assert_eq!(fnv1a(b"http://www.lavarnd.org/what/nist-test.html"), 0xf1ea8aa826fd047e);
++        assert_eq!(fnv1a(b"http://www.macosxhints.com/"), 0x0babaf9a642cb769);
++        assert_eq!(fnv1a(b"http://www.mellis.com/"), 0x4b3341d4068d012e);
++        assert_eq!(fnv1a(b"http://www.nature.nps.gov/air/webcams/parks/havoso2alert/havoalert.cfm"), 0xd15605cbc30a335c);
++        assert_eq!(fnv1a(b"http://www.nature.nps.gov/air/webcams/parks/havoso2alert/timelines_24.cfm"), 0x5b21060aed8412e5);
++        assert_eq!(fnv1a(b"http://www.paulnoll.com/"), 0x45e2cda1ce6f4227);
++        assert_eq!(fnv1a(b"http://www.pepysdiary.com/"), 0x50ae3745033ad7d4);
++        assert_eq!(fnv1a(b"http://www.sciencenews.org/index/home/activity/view"), 0xaa4588ced46bf414);
++        assert_eq!(fnv1a(b"http://www.skyandtelescope.com/"), 0xc1b0056c4a95467e);
++        assert_eq!(fnv1a(b"http://www.sput.nl/~rob/sirius.html"), 0x56576a71de8b4089);
++        assert_eq!(fnv1a(b"http://www.systemexperts.com/"), 0xbf20965fa6dc927e);
++        assert_eq!(fnv1a(b"http://www.tq-international.com/phpBB3/index.php"), 0x569f8383c2040882);
++        assert_eq!(fnv1a(b"http://www.travelquesttours.com/index.htm"), 0xe1e772fba08feca0);
++        assert_eq!(fnv1a(b"http://www.wunderground.com/global/stations/89606.html"), 0x4ced94af97138ac4);
++        assert_eq!(fnv1a(&repeat_10(b"21701")), 0xc4112ffb337a82fb);
++        assert_eq!(fnv1a(&repeat_10(b"M21701")), 0xd64a4fd41de38b7d);
++        assert_eq!(fnv1a(&repeat_10(b"2^21701-1")), 0x4cfc32329edebcbb);
++        assert_eq!(fnv1a(&repeat_10(b"\x54\xc5")), 0x0803564445050395);
++        assert_eq!(fnv1a(&repeat_10(b"\xc5\x54")), 0xaa1574ecf4642ffd);
++        assert_eq!(fnv1a(&repeat_10(b"23209")), 0x694bc4e54cc315f9);
++        assert_eq!(fnv1a(&repeat_10(b"M23209")), 0xa3d7cb273b011721);
++        assert_eq!(fnv1a(&repeat_10(b"2^23209-1")), 0x577c2f8b6115bfa5);
++        assert_eq!(fnv1a(&repeat_10(b"\x5a\xa9")), 0xb7ec8c1a769fb4c1);
++        assert_eq!(fnv1a(&repeat_10(b"\xa9\x5a")), 0x5d5cfce63359ab19);
++        assert_eq!(fnv1a(&repeat_10(b"391581216093")), 0x33b96c3cd65b5f71);
++        assert_eq!(fnv1a(&repeat_10(b"391581*2^216093-1")), 0xd845097780602bb9);
++        assert_eq!(fnv1a(&repeat_10(b"\x05\xf9\x9d\x03\x4c\x81")), 0x84d47645d02da3d5);
++        assert_eq!(fnv1a(&repeat_10(b"FEDCBA9876543210")), 0x83544f33b58773a5);
++        assert_eq!(fnv1a(&repeat_10(b"\xfe\xdc\xba\x98\x76\x54\x32\x10")), 0x9175cbb2160836c5);
++        assert_eq!(fnv1a(&repeat_10(b"EFCDAB8967452301")), 0xc71b3bc175e72bc5);
++        assert_eq!(fnv1a(&repeat_10(b"\xef\xcd\xab\x89\x67\x45\x23\x01")), 0x636806ac222ec985);
++        assert_eq!(fnv1a(&repeat_10(b"0123456789ABCDEF")), 0xb6ef0e6950f52ed5);
++        assert_eq!(fnv1a(&repeat_10(b"\x01\x23\x45\x67\x89\xab\xcd\xef")), 0xead3d8a0f3dfdaa5);
++        assert_eq!(fnv1a(&repeat_10(b"1032547698BADCFE")), 0x922908fe9a861ba5);
++        assert_eq!(fnv1a(&repeat_10(b"\x10\x32\x54\x76\x98\xba\xdc\xfe")), 0x6d4821de275fd5c5);
++        assert_eq!(fnv1a(&repeat_500(b"\x00")), 0x1fe3fce62bd816b5);
++        assert_eq!(fnv1a(&repeat_500(b"\x07")), 0xc23e9fccd6f70591);
++        assert_eq!(fnv1a(&repeat_500(b"~")), 0xc1af12bdfe16b5b5);
++        assert_eq!(fnv1a(&repeat_500(b"\x7f")), 0x39e9f18f2f85e221);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3cac4c65a7f9d23d5f12764da025a4801a165936
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"feeb1b6840809ef5efcf7a4a990bc4e1b7ee3df8cf9e2379a75aeb2ba42ac9c3"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bb9c20a094e41b7632d63bcff20c0b4b95e80777
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++This project is dual-licensed under the Unlicense and MIT licenses.
++
++You may use this code under the terms of either license.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6132926a981124e95a2e29a6b2d65f4577223cb3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,32 @@@
++[package]
++name = "globset"
++version = "0.2.0"  #:version
++authors = ["Andrew Gallant <jamslam@gmail.com>"]
++description = """
++Cross platform single glob and glob set matching. Glob set matching is the
++process of matching one or more glob patterns against a single candidate path
++simultaneously, and returning all of the globs that matched.
++"""
++documentation = "https://docs.rs/globset"
++homepage = "https://github.com/BurntSushi/ripgrep/tree/master/globset"
++repository = "https://github.com/BurntSushi/ripgrep/tree/master/globset"
++readme = "README.md"
++keywords = ["regex", "glob", "multiple", "set", "pattern"]
++license = "Unlicense/MIT"
++
++[lib]
++name = "globset"
++bench = false
++
++[dependencies]
++aho-corasick = "0.6.0"
++fnv = "1.0"
++log = "0.3"
++memchr = "1"
++regex = "0.2.1"
++
++[dev-dependencies]
++glob = "0.2"
++
++[features]
++simd-accel = ["regex/simd-accel"]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3b0a5dc09c1e16357459ddc9182a50f360f3cdba
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++The MIT License (MIT)
++
++Copyright (c) 2015 Andrew Gallant
++
++Permission is hereby granted, free of charge, to any person obtaining a copy
++of this software and associated documentation files (the "Software"), to deal
++in the Software without restriction, including without limitation the rights
++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++copies of the Software, and to permit persons to whom the Software is
++furnished to do so, subject to the following conditions:
++
++The above copyright notice and this permission notice shall be included in
++all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f40b8aac5e07e50fc937afdae6255ffdeae68fc9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,122 @@@
++globset
++=======
++Cross platform single glob and glob set matching. Glob set matching is the
++process of matching one or more glob patterns against a single candidate path
++simultaneously, and returning all of the globs that matched.
++
++[![Linux build status](https://api.travis-ci.org/BurntSushi/ripgrep.png)](https://travis-ci.org/BurntSushi/ripgrep)
++[![Windows build status](https://ci.appveyor.com/api/projects/status/github/BurntSushi/ripgrep?svg=true)](https://ci.appveyor.com/project/BurntSushi/ripgrep)
++[![](https://img.shields.io/crates/v/globset.svg)](https://crates.io/crates/globset)
++
++Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
++
++### Documentation
++
++[https://docs.rs/globset](https://docs.rs/globset)
++
++### Usage
++
++Add this to your `Cargo.toml`:
++
++```toml
++[dependencies]
++globset = "0.1"
++```
++
++and this to your crate root:
++
++```rust
++extern crate globset;
++```
++
++### Example: one glob
++
++This example shows how to match a single glob against a single file path.
++
++```rust
++use globset::Glob;
++
++let glob = try!(Glob::new("*.rs")).compile_matcher();
++
++assert!(glob.is_match("foo.rs"));
++assert!(glob.is_match("foo/bar.rs"));
++assert!(!glob.is_match("Cargo.toml"));
++```
++
++### Example: configuring a glob matcher
++
++This example shows how to use a `GlobBuilder` to configure aspects of match
++semantics. In this example, we prevent wildcards from matching path separators.
++
++```rust
++use globset::GlobBuilder;
++
++let glob = try!(GlobBuilder::new("*.rs")
++    .literal_separator(true).build()).compile_matcher();
++
++assert!(glob.is_match("foo.rs"));
++assert!(!glob.is_match("foo/bar.rs")); // no longer matches
++assert!(!glob.is_match("Cargo.toml"));
++```
++
++### Example: match multiple globs at once
++
++This example shows how to match multiple glob patterns at once.
++
++```rust
++use globset::{Glob, GlobSetBuilder};
++
++let mut builder = GlobSetBuilder::new();
++// A GlobBuilder can be used to configure each glob's match semantics
++// independently.
++builder.add(try!(Glob::new("*.rs")));
++builder.add(try!(Glob::new("src/lib.rs")));
++builder.add(try!(Glob::new("src/**/foo.rs")));
++let set = try!(builder.build());
++
++assert_eq!(set.matches("src/bar/baz/foo.rs"), vec![0, 2]);
++```
++
++### Performance
++
++This crate implements globs by converting them to regular expressions, and
++executing them with the
++[`regex`](https://github.com/rust-lang-nursery/regex)
++crate.
++
++For single glob matching, performance of this crate should be roughly on par
++with the performance of the
++[`glob`](https://github.com/rust-lang-nursery/glob)
++crate. (`*_regex` correspond to benchmarks for this library while `*_glob`
++correspond to benchmarks for the `glob` library.)
++Optimizations in the `regex` crate may propel this library past `glob`,
++particularly when matching longer paths.
++
++```
++test ext_glob             ... bench:         425 ns/iter (+/- 21)
++test ext_regex            ... bench:         175 ns/iter (+/- 10)
++test long_glob            ... bench:         182 ns/iter (+/- 11)
++test long_regex           ... bench:         173 ns/iter (+/- 10)
++test short_glob           ... bench:          69 ns/iter (+/- 4)
++test short_regex          ... bench:          83 ns/iter (+/- 2)
++```
++
++The primary performance advantage of this crate is when matching multiple
++globs against a single path. With the `glob` crate, one must match each glob
++synchronously, one after the other. In this crate, many can be matched
++simultaneously. For example:
++
++```
++test many_short_glob      ... bench:       1,063 ns/iter (+/- 47)
++test many_short_regex_set ... bench:         186 ns/iter (+/- 11)
++```
++
++### Comparison with the [`glob`](https://github.com/rust-lang-nursery/glob) crate
++
++* Supports alternate "or" globs, e.g., `*.{foo,bar}`.
++* Can match non-UTF-8 file paths correctly.
++* Supports matching multiple globs at once.
++* Doesn't provide a recursive directory iterator of matching file paths,
++  although I believe this crate should grow one eventually.
++* Supports case insensitive and require-literal-separator match options, but
++  **doesn't** support the require-literal-leading-dot option.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..68a49daad8ff7e35068f2b7a97d643aab440eaec
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++This is free and unencumbered software released into the public domain.
++
++Anyone is free to copy, modify, publish, use, compile, sell, or
++distribute this software, either in source code form or as a compiled
++binary, for any purpose, commercial or non-commercial, and by any
++means.
++
++In jurisdictions that recognize copyright laws, the author or authors
++of this software dedicate any and all copyright interest in the
++software to the public domain. We make this dedication for the benefit
++of the public at large and to the detriment of our heirs and
++successors. We intend this dedication to be an overt act of
++relinquishment in perpetuity of all present and future rights to this
++software under copyright law.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
++OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
++ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++OTHER DEALINGS IN THE SOFTWARE.
++
++For more information, please refer to <http://unlicense.org/>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e142ed72ef0c2c577cdc14796353e152fb0cf555
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,121 @@@
++/*!
++This module benchmarks the glob implementation. For benchmarks on the ripgrep
++tool itself, see the benchsuite directory.
++*/
++#![feature(test)]
++
++extern crate glob;
++extern crate globset;
++#[macro_use]
++extern crate lazy_static;
++extern crate regex;
++extern crate test;
++
++use std::ffi::OsStr;
++use std::path::Path;
++
++use globset::{Candidate, Glob, GlobMatcher, GlobSet, GlobSetBuilder};
++
++const EXT: &'static str = "some/a/bigger/path/to/the/crazy/needle.txt";
++const EXT_PAT: &'static str = "*.txt";
++
++const SHORT: &'static str = "some/needle.txt";
++const SHORT_PAT: &'static str = "some/**/needle.txt";
++
++const LONG: &'static str = "some/a/bigger/path/to/the/crazy/needle.txt";
++const LONG_PAT: &'static str = "some/**/needle.txt";
++
++fn new_glob(pat: &str) -> glob::Pattern {
++    glob::Pattern::new(pat).unwrap()
++}
++
++fn new_reglob(pat: &str) -> GlobMatcher {
++    Glob::new(pat).unwrap().compile_matcher()
++}
++
++fn new_reglob_many(pats: &[&str]) -> GlobSet {
++    let mut builder = GlobSetBuilder::new();
++    for pat in pats {
++        builder.add(Glob::new(pat).unwrap());
++    }
++    builder.build().unwrap()
++}
++
++#[bench]
++fn ext_glob(b: &mut test::Bencher) {
++    let pat = new_glob(EXT_PAT);
++    b.iter(|| assert!(pat.matches(EXT)));
++}
++
++#[bench]
++fn ext_regex(b: &mut test::Bencher) {
++    let set = new_reglob(EXT_PAT);
++    let cand = Candidate::new(EXT);
++    b.iter(|| assert!(set.is_match_candidate(&cand)));
++}
++
++#[bench]
++fn short_glob(b: &mut test::Bencher) {
++    let pat = new_glob(SHORT_PAT);
++    b.iter(|| assert!(pat.matches(SHORT)));
++}
++
++#[bench]
++fn short_regex(b: &mut test::Bencher) {
++    let set = new_reglob(SHORT_PAT);
++    let cand = Candidate::new(SHORT);
++    b.iter(|| assert!(set.is_match_candidate(&cand)));
++}
++
++#[bench]
++fn long_glob(b: &mut test::Bencher) {
++    let pat = new_glob(LONG_PAT);
++    b.iter(|| assert!(pat.matches(LONG)));
++}
++
++#[bench]
++fn long_regex(b: &mut test::Bencher) {
++    let set = new_reglob(LONG_PAT);
++    let cand = Candidate::new(LONG);
++    b.iter(|| assert!(set.is_match_candidate(&cand)));
++}
++
++const MANY_SHORT_GLOBS: &'static [&'static str] = &[
++    // Taken from a random .gitignore on my system.
++    ".*.swp",
++    "tags",
++    "target",
++    "*.lock",
++    "tmp",
++    "*.csv",
++    "*.fst",
++    "*-got",
++    "*.csv.idx",
++    "words",
++    "98m*",
++    "dict",
++    "test",
++    "months",
++];
++
++const MANY_SHORT_SEARCH: &'static str = "98m-blah.csv.idx";
++
++#[bench]
++fn many_short_glob(b: &mut test::Bencher) {
++    let pats: Vec<_> = MANY_SHORT_GLOBS.iter().map(|&s| new_glob(s)).collect();
++    b.iter(|| {
++        let mut count = 0;
++        for pat in &pats {
++            if pat.matches(MANY_SHORT_SEARCH) {
++                count += 1;
++            }
++        }
++        assert_eq!(2, count);
++    })
++}
++
++#[bench]
++fn many_short_regex_set(b: &mut test::Bencher) {
++    let set = new_reglob_many(MANY_SHORT_GLOBS);
++    b.iter(|| assert_eq!(2, set.matches(MANY_SHORT_SEARCH).iter().count()));
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bb7b0602e9fb8376b10b0af98d105edd39480d71
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1340 @@@
++use std::ffi::{OsStr, OsString};
++use std::fmt;
++use std::hash;
++use std::iter;
++use std::ops::{Deref, DerefMut};
++use std::path::{Path, is_separator};
++use std::str;
++
++use regex;
++use regex::bytes::Regex;
++
++use {Candidate, Error, ErrorKind, new_regex};
++
++/// Describes a matching strategy for a particular pattern.
++///
++/// This provides a way to more quickly determine whether a pattern matches
++/// a particular file path in a way that scales with a large number of
++/// patterns. For example, if many patterns are of the form `*.ext`, then it's
++/// possible to test whether any of those patterns matches by looking up a
++/// file path's extension in a hash table.
++#[derive(Clone, Debug, Eq, PartialEq)]
++pub enum MatchStrategy {
++    /// A pattern matches if and only if the entire file path matches this
++    /// literal string.
++    Literal(String),
++    /// A pattern matches if and only if the file path's basename matches this
++    /// literal string.
++    BasenameLiteral(String),
++    /// A pattern matches if and only if the file path's extension matches this
++    /// literal string.
++    Extension(OsString),
++    /// A pattern matches if and only if this prefix literal is a prefix of the
++    /// candidate file path.
++    Prefix(String),
++    /// A pattern matches if and only if this prefix literal is a prefix of the
++    /// candidate file path.
++    ///
++    /// An exception: if `component` is true, then `suffix` must appear at the
++    /// beginning of a file path or immediately following a `/`.
++    Suffix {
++        /// The actual suffix.
++        suffix: String,
++        /// Whether this must start at the beginning of a path component.
++        component: bool,
++    },
++    /// A pattern matches only if the given extension matches the file path's
++    /// extension. Note that this is a necessary but NOT sufficient criterion.
++    /// Namely, if the extension matches, then a full regex search is still
++    /// required.
++    RequiredExtension(OsString),
++    /// A regex needs to be used for matching.
++    Regex,
++}
++
++impl MatchStrategy {
++    /// Returns a matching strategy for the given pattern.
++    pub fn new(pat: &Glob) -> MatchStrategy {
++        if let Some(lit) = pat.basename_literal() {
++            MatchStrategy::BasenameLiteral(lit)
++        } else if let Some(lit) = pat.literal() {
++            MatchStrategy::Literal(lit)
++        } else if let Some(ext) = pat.ext() {
++            MatchStrategy::Extension(ext)
++        } else if let Some(prefix) = pat.prefix() {
++            MatchStrategy::Prefix(prefix)
++        } else if let Some((suffix, component)) = pat.suffix() {
++            MatchStrategy::Suffix { suffix: suffix, component: component }
++        } else if let Some(ext) = pat.required_ext() {
++            MatchStrategy::RequiredExtension(ext)
++        } else {
++            MatchStrategy::Regex
++        }
++    }
++}
++
++/// Glob represents a successfully parsed shell glob pattern.
++///
++/// It cannot be used directly to match file paths, but it can be converted
++/// to a regular expression string or a matcher.
++#[derive(Clone, Debug, Eq)]
++pub struct Glob {
++    glob: String,
++    re: String,
++    opts: GlobOptions,
++    tokens: Tokens,
++}
++
++impl PartialEq for Glob {
++  fn eq(&self, other: &Glob) -> bool {
++    self.glob == other.glob && self.opts == other.opts
++  }
++}
++
++impl hash::Hash for Glob {
++  fn hash<H: hash::Hasher>(&self, state: &mut H) {
++    self.glob.hash(state);
++    self.opts.hash(state);
++  }
++}
++
++impl fmt::Display for Glob {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        self.glob.fmt(f)
++    }
++}
++
++/// A matcher for a single pattern.
++#[derive(Clone, Debug)]
++pub struct GlobMatcher {
++    /// The underlying pattern.
++    pat: Glob,
++    /// The pattern, as a compiled regex.
++    re: Regex,
++}
++
++impl GlobMatcher {
++    /// Tests whether the given path matches this pattern or not.
++    pub fn is_match<P: AsRef<Path>>(&self, path: P) -> bool {
++        self.is_match_candidate(&Candidate::new(path.as_ref()))
++    }
++
++    /// Tests whether the given path matches this pattern or not.
++    pub fn is_match_candidate(&self, path: &Candidate) -> bool {
++        self.re.is_match(&path.path)
++    }
++}
++
++/// A strategic matcher for a single pattern.
++#[cfg(test)]
++#[derive(Clone, Debug)]
++struct GlobStrategic {
++    /// The match strategy to use.
++    strategy: MatchStrategy,
++    /// The underlying pattern.
++    pat: Glob,
++    /// The pattern, as a compiled regex.
++    re: Regex,
++}
++
++#[cfg(test)]
++impl GlobStrategic {
++    /// Tests whether the given path matches this pattern or not.
++    fn is_match<P: AsRef<Path>>(&self, path: P) -> bool {
++        self.is_match_candidate(&Candidate::new(path.as_ref()))
++    }
++
++    /// Tests whether the given path matches this pattern or not.
++    fn is_match_candidate(&self, candidate: &Candidate) -> bool {
++        let byte_path = &*candidate.path;
++
++        match self.strategy {
++            MatchStrategy::Literal(ref lit) => lit.as_bytes() == byte_path,
++            MatchStrategy::BasenameLiteral(ref lit) => {
++                lit.as_bytes() == &*candidate.basename
++            }
++            MatchStrategy::Extension(ref ext) => {
++                candidate.ext == ext
++            }
++            MatchStrategy::Prefix(ref pre) => {
++                starts_with(pre.as_bytes(), byte_path)
++            }
++            MatchStrategy::Suffix { ref suffix, component } => {
++                if component && byte_path == &suffix.as_bytes()[1..] {
++                    return true;
++                }
++                ends_with(suffix.as_bytes(), byte_path)
++            }
++            MatchStrategy::RequiredExtension(ref ext) => {
++                candidate.ext == ext && self.re.is_match(byte_path)
++            }
++            MatchStrategy::Regex => self.re.is_match(byte_path),
++        }
++    }
++}
++
++/// A builder for a pattern.
++///
++/// This builder enables configuring the match semantics of a pattern. For
++/// example, one can make matching case insensitive.
++///
++/// The lifetime `'a` refers to the lifetime of the pattern string.
++#[derive(Clone, Debug)]
++pub struct GlobBuilder<'a> {
++    /// The glob pattern to compile.
++    glob: &'a str,
++    /// Options for the pattern.
++    opts: GlobOptions,
++}
++
++#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
++struct GlobOptions {
++    /// Whether to match case insensitively.
++    case_insensitive: bool,
++    /// Whether to require a literal separator to match a separator in a file
++    /// path. e.g., when enabled, `*` won't match `/`.
++    literal_separator: bool,
++}
++
++#[derive(Clone, Debug, Default, Eq, PartialEq)]
++struct Tokens(Vec<Token>);
++
++impl Deref for Tokens {
++    type Target = Vec<Token>;
++    fn deref(&self) -> &Vec<Token> { &self.0 }
++}
++
++impl DerefMut for Tokens {
++    fn deref_mut(&mut self) -> &mut Vec<Token> { &mut self.0 }
++}
++
++#[derive(Clone, Debug, Eq, PartialEq)]
++enum Token {
++    Literal(char),
++    Any,
++    ZeroOrMore,
++    RecursivePrefix,
++    RecursiveSuffix,
++    RecursiveZeroOrMore,
++    Class {
++        negated: bool,
++        ranges: Vec<(char, char)>,
++    },
++    Alternates(Vec<Tokens>),
++}
++
++impl Glob {
++    /// Builds a new pattern with default options.
++    pub fn new(glob: &str) -> Result<Glob, Error> {
++        GlobBuilder::new(glob).build()
++    }
++
++    /// Returns a matcher for this pattern.
++    pub fn compile_matcher(&self) -> GlobMatcher {
++        let re = new_regex(&self.re)
++            .expect("regex compilation shouldn't fail");
++        GlobMatcher {
++            pat: self.clone(),
++            re: re,
++        }
++    }
++
++    /// Returns a strategic matcher.
++    ///
++    /// This isn't exposed because it's not clear whether it's actually
++    /// faster than just running a regex for a *single* pattern. If it
++    /// is faster, then GlobMatcher should do it automatically.
++    #[cfg(test)]
++    fn compile_strategic_matcher(&self) -> GlobStrategic {
++        let strategy = MatchStrategy::new(self);
++        let re = new_regex(&self.re)
++            .expect("regex compilation shouldn't fail");
++        GlobStrategic {
++            strategy: strategy,
++            pat: self.clone(),
++            re: re,
++        }
++    }
++
++    /// Returns the original glob pattern used to build this pattern.
++    pub fn glob(&self) -> &str {
++        &self.glob
++    }
++
++    /// Returns the regular expression string for this glob.
++    pub fn regex(&self) -> &str {
++        &self.re
++    }
++
++    /// Returns the pattern as a literal if and only if the pattern must match
++    /// an entire path exactly.
++    ///
++    /// The basic format of these patterns is `{literal}`.
++    fn literal(&self) -> Option<String> {
++        if self.opts.case_insensitive {
++            return None;
++        }
++        let mut lit = String::new();
++        for t in &*self.tokens {
++            match *t {
++                Token::Literal(c) => lit.push(c),
++                _ => return None,
++            }
++        }
++        if lit.is_empty() {
++            None
++        } else {
++            Some(lit)
++        }
++    }
++
++    /// Returns an extension if this pattern matches a file path if and only
++    /// if the file path has the extension returned.
++    ///
++    /// Note that this extension returned differs from the extension that
++    /// std::path::Path::extension returns. Namely, this extension includes
++    /// the '.'. Also, paths like `.rs` are considered to have an extension
++    /// of `.rs`.
++    fn ext(&self) -> Option<OsString> {
++        if self.opts.case_insensitive {
++            return None;
++        }
++        let start = match self.tokens.get(0) {
++            Some(&Token::RecursivePrefix) => 1,
++            Some(_) => 0,
++            _ => return None,
++        };
++        match self.tokens.get(start) {
++            Some(&Token::ZeroOrMore) => {
++                // If there was no recursive prefix, then we only permit
++                // `*` if `*` can match a `/`. For example, if `*` can't
++                // match `/`, then `*.c` doesn't match `foo/bar.c`.
++                if start == 0 && self.opts.literal_separator {
++                    return None;
++                }
++            }
++            _ => return None,
++        }
++        match self.tokens.get(start + 1) {
++            Some(&Token::Literal('.')) => {}
++            _ => return None,
++        }
++        let mut lit = OsStr::new(".").to_os_string();
++        for t in self.tokens[start + 2..].iter() {
++            match *t {
++                Token::Literal('.') | Token::Literal('/') => return None,
++                Token::Literal(c) => lit.push(c.to_string()),
++                _ => return None,
++            }
++        }
++        if lit.is_empty() {
++            None
++        } else {
++            Some(lit)
++        }
++    }
++
++    /// This is like `ext`, but returns an extension even if it isn't sufficent
++    /// to imply a match. Namely, if an extension is returned, then it is
++    /// necessary but not sufficient for a match.
++    fn required_ext(&self) -> Option<OsString> {
++        if self.opts.case_insensitive {
++            return None;
++        }
++        // We don't care at all about the beginning of this pattern. All we
++        // need to check for is if it ends with a literal of the form `.ext`.
++        let mut ext: Vec<char> = vec![]; // built in reverse
++        for t in self.tokens.iter().rev() {
++            match *t {
++                Token::Literal('/') => return None,
++                Token::Literal(c) => {
++                    ext.push(c);
++                    if c == '.' {
++                        break;
++                    }
++                }
++                _ => return None,
++            }
++        }
++        if ext.last() != Some(&'.') {
++            None
++        } else {
++            ext.reverse();
++            Some(OsString::from(ext.into_iter().collect::<String>()))
++        }
++    }
++
++    /// Returns a literal prefix of this pattern if the entire pattern matches
++    /// if the literal prefix matches.
++    fn prefix(&self) -> Option<String> {
++        if self.opts.case_insensitive {
++            return None;
++        }
++        let end = match self.tokens.last() {
++            Some(&Token::ZeroOrMore) => {
++                if self.opts.literal_separator {
++                    // If a trailing `*` can't match a `/`, then we can't
++                    // assume a match of the prefix corresponds to a match
++                    // of the overall pattern. e.g., `foo/*` with
++                    // `literal_separator` enabled matches `foo/bar` but not
++                    // `foo/bar/baz`, even though `foo/bar/baz` has a `foo/`
++                    // literal prefix.
++                    return None;
++                }
++                self.tokens.len() - 1
++            }
++            _ => self.tokens.len(),
++        };
++        let mut lit = String::new();
++        for t in &self.tokens[0..end] {
++            match *t {
++                Token::Literal(c) => lit.push(c),
++                _ => return None,
++            }
++        }
++        if lit.is_empty() {
++            None
++        } else {
++            Some(lit)
++        }
++    }
++
++    /// Returns a literal suffix of this pattern if the entire pattern matches
++    /// if the literal suffix matches.
++    ///
++    /// If a literal suffix is returned and it must match either the entire
++    /// file path or be preceded by a `/`, then also return true. This happens
++    /// with a pattern like `**/foo/bar`. Namely, this pattern matches
++    /// `foo/bar` and `baz/foo/bar`, but not `foofoo/bar`. In this case, the
++    /// suffix returned is `/foo/bar` (but should match the entire path
++    /// `foo/bar`).
++    ///
++    /// When this returns true, the suffix literal is guaranteed to start with
++    /// a `/`.
++    fn suffix(&self) -> Option<(String, bool)> {
++        if self.opts.case_insensitive {
++            return None;
++        }
++        let mut lit = String::new();
++        let (start, entire) = match self.tokens.get(0) {
++            Some(&Token::RecursivePrefix) => {
++                // We only care if this follows a path component if the next
++                // token is a literal.
++                if let Some(&Token::Literal(_)) = self.tokens.get(1) {
++                    lit.push('/');
++                    (1, true)
++                } else {
++                    (1, false)
++                }
++            }
++            _ => (0, false),
++        };
++        let start = match self.tokens.get(start) {
++            Some(&Token::ZeroOrMore) => {
++                // If literal_separator is enabled, then a `*` can't
++                // necessarily match everything, so reporting a suffix match
++                // as a match of the pattern would be a false positive.
++                if self.opts.literal_separator {
++                    return None;
++                }
++                start + 1
++            }
++            _ => start,
++        };
++        for t in &self.tokens[start..] {
++            match *t {
++                Token::Literal(c) => lit.push(c),
++                _ => return None,
++            }
++        }
++        if lit.is_empty() || lit == "/" {
++            None
++        } else {
++            Some((lit, entire))
++        }
++    }
++
++    /// If this pattern only needs to inspect the basename of a file path,
++    /// then the tokens corresponding to only the basename match are returned.
++    ///
++    /// For example, given a pattern of `**/*.foo`, only the tokens
++    /// corresponding to `*.foo` are returned.
++    ///
++    /// Note that this will return None if any match of the basename tokens
++    /// doesn't correspond to a match of the entire pattern. For example, the
++    /// glob `foo` only matches when a file path has a basename of `foo`, but
++    /// doesn't *always* match when a file path has a basename of `foo`. e.g.,
++    /// `foo` doesn't match `abc/foo`.
++    fn basename_tokens(&self) -> Option<&[Token]> {
++        if self.opts.case_insensitive {
++            return None;
++        }
++        let start = match self.tokens.get(0) {
++            Some(&Token::RecursivePrefix) => 1,
++            _ => {
++                // With nothing to gobble up the parent portion of a path,
++                // we can't assume that matching on only the basename is
++                // correct.
++                return None;
++            }
++        };
++        if self.tokens[start..].is_empty() {
++            return None;
++        }
++        for t in &self.tokens[start..] {
++            match *t {
++                Token::Literal('/') => return None,
++                Token::Literal(_) => {} // OK
++                Token::Any | Token::ZeroOrMore => {
++                    if !self.opts.literal_separator {
++                        // In this case, `*` and `?` can match a path
++                        // separator, which means this could reach outside
++                        // the basename.
++                        return None;
++                    }
++                }
++                Token::RecursivePrefix
++                | Token::RecursiveSuffix
++                | Token::RecursiveZeroOrMore => {
++                    return None;
++                }
++                Token::Class{..} | Token::Alternates(..) => {
++                    // We *could* be a little smarter here, but either one
++                    // of these is going to prevent our literal optimizations
++                    // anyway, so give up.
++                    return None;
++                }
++            }
++        }
++        Some(&self.tokens[start..])
++    }
++
++    /// Returns the pattern as a literal if and only if the pattern exclusiely
++    /// matches the basename of a file path *and* is a literal.
++    ///
++    /// The basic format of these patterns is `**/{literal}`, where `{literal}`
++    /// does not contain a path separator.
++    fn basename_literal(&self) -> Option<String> {
++        let tokens = match self.basename_tokens() {
++            None => return None,
++            Some(tokens) => tokens,
++        };
++        let mut lit = String::new();
++        for t in tokens {
++            match *t {
++                Token::Literal(c) => lit.push(c),
++                _ => return None,
++            }
++        }
++        Some(lit)
++    }
++}
++
++impl<'a> GlobBuilder<'a> {
++    /// Create a new builder for the pattern given.
++    ///
++    /// The pattern is not compiled until `build` is called.
++    pub fn new(glob: &'a str) -> GlobBuilder<'a> {
++        GlobBuilder {
++            glob: glob,
++            opts: GlobOptions::default(),
++        }
++    }
++
++    /// Parses and builds the pattern.
++    pub fn build(&self) -> Result<Glob, Error> {
++        let mut p = Parser {
++            glob: &self.glob,
++            stack: vec![Tokens::default()],
++            chars: self.glob.chars().peekable(),
++            prev: None,
++            cur: None,
++        };
++        try!(p.parse());
++        if p.stack.is_empty() {
++            Err(Error {
++                glob: Some(self.glob.to_string()),
++                kind: ErrorKind::UnopenedAlternates,
++            })
++        } else if p.stack.len() > 1 {
++            Err(Error {
++                glob: Some(self.glob.to_string()),
++                kind: ErrorKind::UnclosedAlternates,
++            })
++        } else {
++            let tokens = p.stack.pop().unwrap();
++            Ok(Glob {
++                glob: self.glob.to_string(),
++                re: tokens.to_regex_with(&self.opts),
++                opts: self.opts,
++                tokens: tokens,
++            })
++        }
++    }
++
++    /// Toggle whether the pattern matches case insensitively or not.
++    ///
++    /// This is disabled by default.
++    pub fn case_insensitive(&mut self, yes: bool) -> &mut GlobBuilder<'a> {
++        self.opts.case_insensitive = yes;
++        self
++    }
++
++    /// Toggle whether a literal `/` is required to match a path separator.
++    pub fn literal_separator(&mut self, yes: bool) -> &mut GlobBuilder<'a> {
++        self.opts.literal_separator = yes;
++        self
++    }
++}
++
++impl Tokens {
++    /// Convert this pattern to a string that is guaranteed to be a valid
++    /// regular expression and will represent the matching semantics of this
++    /// glob pattern and the options given.
++    fn to_regex_with(&self, options: &GlobOptions) -> String {
++        let mut re = String::new();
++        re.push_str("(?-u)");
++        if options.case_insensitive {
++            re.push_str("(?i)");
++        }
++        re.push('^');
++        // Special case. If the entire glob is just `**`, then it should match
++        // everything.
++        if self.len() == 1 && self[0] == Token::RecursivePrefix {
++            re.push_str(".*");
++            re.push('$');
++            return re;
++        }
++        self.tokens_to_regex(options, &self, &mut re);
++        re.push('$');
++        re
++    }
++
++    fn tokens_to_regex(
++        &self,
++        options: &GlobOptions,
++        tokens: &[Token],
++        re: &mut String,
++    ) {
++        for tok in tokens {
++            match *tok {
++                Token::Literal(c) => {
++                    re.push_str(&char_to_escaped_literal(c));
++                }
++                Token::Any => {
++                    if options.literal_separator {
++                        re.push_str("[^/]");
++                    } else {
++                        re.push_str(".");
++                    }
++                }
++                Token::ZeroOrMore => {
++                    if options.literal_separator {
++                        re.push_str("[^/]*");
++                    } else {
++                        re.push_str(".*");
++                    }
++                }
++                Token::RecursivePrefix => {
++                    re.push_str("(?:/?|.*/)");
++                }
++                Token::RecursiveSuffix => {
++                    re.push_str("(?:/?|/.*)");
++                }
++                Token::RecursiveZeroOrMore => {
++                    re.push_str("(?:/|/.*/)");
++                }
++                Token::Class { negated, ref ranges } => {
++                    re.push('[');
++                    if negated {
++                        re.push('^');
++                    }
++                    for r in ranges {
++                        if r.0 == r.1 {
++                            // Not strictly necessary, but nicer to look at.
++                            re.push_str(&char_to_escaped_literal(r.0));
++                        } else {
++                            re.push_str(&char_to_escaped_literal(r.0));
++                            re.push('-');
++                            re.push_str(&char_to_escaped_literal(r.1));
++                        }
++                    }
++                    re.push(']');
++                }
++                Token::Alternates(ref patterns) => {
++                    let mut parts = vec![];
++                    for pat in patterns {
++                        let mut altre = String::new();
++                        self.tokens_to_regex(options, &pat, &mut altre);
++                        if !altre.is_empty() {
++                            parts.push(altre);
++                        }
++                    }
++
++                    // It is possible to have an empty set in which case the
++                    // resulting alternation '()' would be an error.
++                    if !parts.is_empty() {
++                        re.push('(');
++                        re.push_str(&parts.join("|"));
++                        re.push(')');
++                    }
++                }
++            }
++        }
++    }
++}
++
++/// Convert a Unicode scalar value to an escaped string suitable for use as
++/// a literal in a non-Unicode regex.
++fn char_to_escaped_literal(c: char) -> String {
++    bytes_to_escaped_literal(&c.to_string().into_bytes())
++}
++
++/// Converts an arbitrary sequence of bytes to a UTF-8 string. All non-ASCII
++/// code units are converted to their escaped form.
++fn bytes_to_escaped_literal(bs: &[u8]) -> String {
++    let mut s = String::with_capacity(bs.len());
++    for &b in bs {
++        if b <= 0x7F {
++            s.push_str(&regex::escape(&(b as char).to_string()));
++        } else {
++            s.push_str(&format!("\\x{:02x}", b));
++        }
++    }
++    s
++}
++
++struct Parser<'a> {
++    glob: &'a str,
++    stack: Vec<Tokens>,
++    chars: iter::Peekable<str::Chars<'a>>,
++    prev: Option<char>,
++    cur: Option<char>,
++}
++
++impl<'a> Parser<'a> {
++    fn error(&self, kind: ErrorKind) -> Error {
++        Error { glob: Some(self.glob.to_string()), kind: kind }
++    }
++
++    fn parse(&mut self) -> Result<(), Error> {
++        while let Some(c) = self.bump() {
++            match c {
++                '?' => try!(self.push_token(Token::Any)),
++                '*' => try!(self.parse_star()),
++                '[' => try!(self.parse_class()),
++                '{' => try!(self.push_alternate()),
++                '}' => try!(self.pop_alternate()),
++                ',' => try!(self.parse_comma()),
++                c => {
++                    if is_separator(c) {
++                        // Normalize all patterns to use / as a separator.
++                        try!(self.push_token(Token::Literal('/')))
++                    } else {
++                        try!(self.push_token(Token::Literal(c)))
++                    }
++                }
++            }
++        }
++        Ok(())
++    }
++
++    fn push_alternate(&mut self) -> Result<(), Error> {
++        if self.stack.len() > 1 {
++            return Err(self.error(ErrorKind::NestedAlternates));
++        }
++        Ok(self.stack.push(Tokens::default()))
++    }
++
++    fn pop_alternate(&mut self) -> Result<(), Error> {
++        let mut alts = vec![];
++        while self.stack.len() >= 2 {
++            alts.push(self.stack.pop().unwrap());
++        }
++        self.push_token(Token::Alternates(alts))
++    }
++
++    fn push_token(&mut self, tok: Token) -> Result<(), Error> {
++        if let Some(ref mut pat) = self.stack.last_mut() {
++            return Ok(pat.push(tok));
++        }
++        Err(self.error(ErrorKind::UnopenedAlternates))
++    }
++
++    fn pop_token(&mut self) -> Result<Token, Error> {
++        if let Some(ref mut pat) = self.stack.last_mut() {
++            return Ok(pat.pop().unwrap());
++        }
++        Err(self.error(ErrorKind::UnopenedAlternates))
++    }
++
++    fn have_tokens(&self) -> Result<bool, Error> {
++        match self.stack.last() {
++            None => Err(self.error(ErrorKind::UnopenedAlternates)),
++            Some(ref pat) => Ok(!pat.is_empty()),
++        }
++    }
++
++    fn parse_comma(&mut self) -> Result<(), Error> {
++        // If we aren't inside a group alternation, then don't
++        // treat commas specially. Otherwise, we need to start
++        // a new alternate.
++        if self.stack.len() <= 1 {
++            self.push_token(Token::Literal(','))
++        } else {
++            Ok(self.stack.push(Tokens::default()))
++        }
++    }
++
++    fn parse_star(&mut self) -> Result<(), Error> {
++        let prev = self.prev;
++        if self.chars.peek() != Some(&'*') {
++            try!(self.push_token(Token::ZeroOrMore));
++            return Ok(());
++        }
++        assert!(self.bump() == Some('*'));
++        if !try!(self.have_tokens()) {
++            try!(self.push_token(Token::RecursivePrefix));
++            let next = self.bump();
++            if !next.map(is_separator).unwrap_or(true) {
++                return Err(self.error(ErrorKind::InvalidRecursive));
++            }
++            return Ok(());
++        }
++        try!(self.pop_token());
++        if !prev.map(is_separator).unwrap_or(false) {
++            if self.stack.len() <= 1
++                || (prev != Some(',') && prev != Some('{')) {
++                return Err(self.error(ErrorKind::InvalidRecursive));
++            }
++        }
++        match self.chars.peek() {
++            None => {
++                assert!(self.bump().is_none());
++                self.push_token(Token::RecursiveSuffix)
++            }
++            Some(&',') | Some(&'}') if self.stack.len() >= 2 => {
++                self.push_token(Token::RecursiveSuffix)
++            }
++            Some(&c) if is_separator(c) => {
++                assert!(self.bump().map(is_separator).unwrap_or(false));
++                self.push_token(Token::RecursiveZeroOrMore)
++            }
++            _ => Err(self.error(ErrorKind::InvalidRecursive)),
++        }
++    }
++
++    fn parse_class(&mut self) -> Result<(), Error> {
++        fn add_to_last_range(
++            glob: &str,
++            r: &mut (char, char),
++            add: char,
++        ) -> Result<(), Error> {
++            r.1 = add;
++            if r.1 < r.0 {
++                Err(Error {
++                    glob: Some(glob.to_string()),
++                    kind: ErrorKind::InvalidRange(r.0, r.1),
++                })
++            } else {
++                Ok(())
++            }
++        }
++        let mut negated = false;
++        let mut ranges = vec![];
++        if self.chars.peek() == Some(&'!') {
++            assert!(self.bump() == Some('!'));
++            negated = true;
++        }
++        let mut first = true;
++        let mut in_range = false;
++        loop {
++            let c = match self.bump() {
++                Some(c) => c,
++                // The only way to successfully break this loop is to observe
++                // a ']'.
++                None => return Err(self.error(ErrorKind::UnclosedClass)),
++            };
++            match c {
++                ']' => {
++                    if first {
++                        ranges.push((']', ']'));
++                    } else {
++                        break;
++                    }
++                }
++                '-' => {
++                    if first {
++                        ranges.push(('-', '-'));
++                    } else if in_range {
++                        // invariant: in_range is only set when there is
++                        // already at least one character seen.
++                        let r = ranges.last_mut().unwrap();
++                        try!(add_to_last_range(&self.glob, r, '-'));
++                        in_range = false;
++                    } else {
++                        assert!(!ranges.is_empty());
++                        in_range = true;
++                    }
++                }
++                c => {
++                    if in_range {
++                        // invariant: in_range is only set when there is
++                        // already at least one character seen.
++                        try!(add_to_last_range(
++                            &self.glob, ranges.last_mut().unwrap(), c));
++                    } else {
++                        ranges.push((c, c));
++                    }
++                    in_range = false;
++                }
++            }
++            first = false;
++        }
++        if in_range {
++            // Means that the last character in the class was a '-', so add
++            // it as a literal.
++            ranges.push(('-', '-'));
++        }
++        self.push_token(Token::Class {
++            negated: negated,
++            ranges: ranges,
++        })
++    }
++
++    fn bump(&mut self) -> Option<char> {
++        self.prev = self.cur;
++        self.cur = self.chars.next();
++        self.cur
++    }
++}
++
++#[cfg(test)]
++fn starts_with(needle: &[u8], haystack: &[u8]) -> bool {
++    needle.len() <= haystack.len() && needle == &haystack[..needle.len()]
++}
++
++#[cfg(test)]
++fn ends_with(needle: &[u8], haystack: &[u8]) -> bool {
++    if needle.len() > haystack.len() {
++        return false;
++    }
++    needle == &haystack[haystack.len() - needle.len()..]
++}
++
++#[cfg(test)]
++mod tests {
++    use std::ffi::{OsStr, OsString};
++
++    use {GlobSetBuilder, ErrorKind};
++    use super::{Glob, GlobBuilder, Token};
++    use super::Token::*;
++
++    #[derive(Clone, Copy, Debug, Default)]
++    struct Options {
++        casei: bool,
++        litsep: bool,
++    }
++
++    macro_rules! syntax {
++        ($name:ident, $pat:expr, $tokens:expr) => {
++            #[test]
++            fn $name() {
++                let pat = Glob::new($pat).unwrap();
++                assert_eq!($tokens, pat.tokens.0);
++            }
++        }
++    }
++
++    macro_rules! syntaxerr {
++        ($name:ident, $pat:expr, $err:expr) => {
++            #[test]
++            fn $name() {
++                let err = Glob::new($pat).unwrap_err();
++                assert_eq!(&$err, err.kind());
++            }
++        }
++    }
++
++    macro_rules! toregex {
++        ($name:ident, $pat:expr, $re:expr) => {
++            toregex!($name, $pat, $re, Options::default());
++        };
++        ($name:ident, $pat:expr, $re:expr, $options:expr) => {
++            #[test]
++            fn $name() {
++                let pat = GlobBuilder::new($pat)
++                    .case_insensitive($options.casei)
++                    .literal_separator($options.litsep)
++                    .build()
++                    .unwrap();
++                assert_eq!(format!("(?-u){}", $re), pat.regex());
++            }
++        };
++    }
++
++    macro_rules! matches {
++        ($name:ident, $pat:expr, $path:expr) => {
++            matches!($name, $pat, $path, Options::default());
++        };
++        ($name:ident, $pat:expr, $path:expr, $options:expr) => {
++            #[test]
++            fn $name() {
++                let pat = GlobBuilder::new($pat)
++                    .case_insensitive($options.casei)
++                    .literal_separator($options.litsep)
++                    .build()
++                    .unwrap();
++                let matcher = pat.compile_matcher();
++                let strategic = pat.compile_strategic_matcher();
++                let set = GlobSetBuilder::new().add(pat).build().unwrap();
++                assert!(matcher.is_match($path));
++                assert!(strategic.is_match($path));
++                assert!(set.is_match($path));
++            }
++        };
++    }
++
++    macro_rules! nmatches {
++        ($name:ident, $pat:expr, $path:expr) => {
++            nmatches!($name, $pat, $path, Options::default());
++        };
++        ($name:ident, $pat:expr, $path:expr, $options:expr) => {
++            #[test]
++            fn $name() {
++                let pat = GlobBuilder::new($pat)
++                    .case_insensitive($options.casei)
++                    .literal_separator($options.litsep)
++                    .build()
++                    .unwrap();
++                let matcher = pat.compile_matcher();
++                let strategic = pat.compile_strategic_matcher();
++                let set = GlobSetBuilder::new().add(pat).build().unwrap();
++                assert!(!matcher.is_match($path));
++                assert!(!strategic.is_match($path));
++                assert!(!set.is_match($path));
++            }
++        };
++    }
++
++    fn s(string: &str) -> String { string.to_string() }
++    fn os(string: &str) -> OsString { OsStr::new(string).to_os_string() }
++
++    fn class(s: char, e: char) -> Token {
++        Class { negated: false, ranges: vec![(s, e)] }
++    }
++
++    fn classn(s: char, e: char) -> Token {
++        Class { negated: true, ranges: vec![(s, e)] }
++    }
++
++    fn rclass(ranges: &[(char, char)]) -> Token {
++        Class { negated: false, ranges: ranges.to_vec() }
++    }
++
++    fn rclassn(ranges: &[(char, char)]) -> Token {
++        Class { negated: true, ranges: ranges.to_vec() }
++    }
++
++    syntax!(literal1, "a", vec![Literal('a')]);
++    syntax!(literal2, "ab", vec![Literal('a'), Literal('b')]);
++    syntax!(any1, "?", vec![Any]);
++    syntax!(any2, "a?b", vec![Literal('a'), Any, Literal('b')]);
++    syntax!(seq1, "*", vec![ZeroOrMore]);
++    syntax!(seq2, "a*b", vec![Literal('a'), ZeroOrMore, Literal('b')]);
++    syntax!(seq3, "*a*b*", vec![
++        ZeroOrMore, Literal('a'), ZeroOrMore, Literal('b'), ZeroOrMore,
++    ]);
++    syntax!(rseq1, "**", vec![RecursivePrefix]);
++    syntax!(rseq2, "**/", vec![RecursivePrefix]);
++    syntax!(rseq3, "/**", vec![RecursiveSuffix]);
++    syntax!(rseq4, "/**/", vec![RecursiveZeroOrMore]);
++    syntax!(rseq5, "a/**/b", vec![
++        Literal('a'), RecursiveZeroOrMore, Literal('b'),
++    ]);
++    syntax!(cls1, "[a]", vec![class('a', 'a')]);
++    syntax!(cls2, "[!a]", vec![classn('a', 'a')]);
++    syntax!(cls3, "[a-z]", vec![class('a', 'z')]);
++    syntax!(cls4, "[!a-z]", vec![classn('a', 'z')]);
++    syntax!(cls5, "[-]", vec![class('-', '-')]);
++    syntax!(cls6, "[]]", vec![class(']', ']')]);
++    syntax!(cls7, "[*]", vec![class('*', '*')]);
++    syntax!(cls8, "[!!]", vec![classn('!', '!')]);
++    syntax!(cls9, "[a-]", vec![rclass(&[('a', 'a'), ('-', '-')])]);
++    syntax!(cls10, "[-a-z]", vec![rclass(&[('-', '-'), ('a', 'z')])]);
++    syntax!(cls11, "[a-z-]", vec![rclass(&[('a', 'z'), ('-', '-')])]);
++    syntax!(cls12, "[-a-z-]", vec![
++        rclass(&[('-', '-'), ('a', 'z'), ('-', '-')]),
++    ]);
++    syntax!(cls13, "[]-z]", vec![class(']', 'z')]);
++    syntax!(cls14, "[--z]", vec![class('-', 'z')]);
++    syntax!(cls15, "[ --]", vec![class(' ', '-')]);
++    syntax!(cls16, "[0-9a-z]", vec![rclass(&[('0', '9'), ('a', 'z')])]);
++    syntax!(cls17, "[a-z0-9]", vec![rclass(&[('a', 'z'), ('0', '9')])]);
++    syntax!(cls18, "[!0-9a-z]", vec![rclassn(&[('0', '9'), ('a', 'z')])]);
++    syntax!(cls19, "[!a-z0-9]", vec![rclassn(&[('a', 'z'), ('0', '9')])]);
++
++    syntaxerr!(err_rseq1, "a**", ErrorKind::InvalidRecursive);
++    syntaxerr!(err_rseq2, "**a", ErrorKind::InvalidRecursive);
++    syntaxerr!(err_rseq3, "a**b", ErrorKind::InvalidRecursive);
++    syntaxerr!(err_rseq4, "***", ErrorKind::InvalidRecursive);
++    syntaxerr!(err_rseq5, "/a**", ErrorKind::InvalidRecursive);
++    syntaxerr!(err_rseq6, "/**a", ErrorKind::InvalidRecursive);
++    syntaxerr!(err_rseq7, "/a**b", ErrorKind::InvalidRecursive);
++    syntaxerr!(err_unclosed1, "[", ErrorKind::UnclosedClass);
++    syntaxerr!(err_unclosed2, "[]", ErrorKind::UnclosedClass);
++    syntaxerr!(err_unclosed3, "[!", ErrorKind::UnclosedClass);
++    syntaxerr!(err_unclosed4, "[!]", ErrorKind::UnclosedClass);
++    syntaxerr!(err_range1, "[z-a]", ErrorKind::InvalidRange('z', 'a'));
++    syntaxerr!(err_range2, "[z--]", ErrorKind::InvalidRange('z', '-'));
++
++    const CASEI: Options = Options {
++        casei: true,
++        litsep: false,
++    };
++    const SLASHLIT: Options = Options {
++        casei: false,
++        litsep: true,
++    };
++
++    toregex!(re_casei, "a", "(?i)^a$", &CASEI);
++
++    toregex!(re_slash1, "?", r"^[^/]$", SLASHLIT);
++    toregex!(re_slash2, "*", r"^[^/]*$", SLASHLIT);
++
++    toregex!(re1, "a", "^a$");
++    toregex!(re2, "?", "^.$");
++    toregex!(re3, "*", "^.*$");
++    toregex!(re4, "a?", "^a.$");
++    toregex!(re5, "?a", "^.a$");
++    toregex!(re6, "a*", "^a.*$");
++    toregex!(re7, "*a", "^.*a$");
++    toregex!(re8, "[*]", r"^[\*]$");
++    toregex!(re9, "[+]", r"^[\+]$");
++    toregex!(re10, "+", r"^\+$");
++    toregex!(re11, "**", r"^.*$");
++    toregex!(re12, "☃", r"^\xe2\x98\x83$");
++
++    matches!(match1, "a", "a");
++    matches!(match2, "a*b", "a_b");
++    matches!(match3, "a*b*c", "abc");
++    matches!(match4, "a*b*c", "a_b_c");
++    matches!(match5, "a*b*c", "a___b___c");
++    matches!(match6, "abc*abc*abc", "abcabcabcabcabcabcabc");
++    matches!(match7, "a*a*a*a*a*a*a*a*a", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
++    matches!(match8, "a*b[xyz]c*d", "abxcdbxcddd");
++    matches!(match9, "*.rs", ".rs");
++    matches!(match10, "☃", "☃");
++
++    matches!(matchrec1, "some/**/needle.txt", "some/needle.txt");
++    matches!(matchrec2, "some/**/needle.txt", "some/one/needle.txt");
++    matches!(matchrec3, "some/**/needle.txt", "some/one/two/needle.txt");
++    matches!(matchrec4, "some/**/needle.txt", "some/other/needle.txt");
++    matches!(matchrec5, "**", "abcde");
++    matches!(matchrec6, "**", "");
++    matches!(matchrec7, "**", ".asdf");
++    matches!(matchrec8, "**", "/x/.asdf");
++    matches!(matchrec9, "some/**/**/needle.txt", "some/needle.txt");
++    matches!(matchrec10, "some/**/**/needle.txt", "some/one/needle.txt");
++    matches!(matchrec11, "some/**/**/needle.txt", "some/one/two/needle.txt");
++    matches!(matchrec12, "some/**/**/needle.txt", "some/other/needle.txt");
++    matches!(matchrec13, "**/test", "one/two/test");
++    matches!(matchrec14, "**/test", "one/test");
++    matches!(matchrec15, "**/test", "test");
++    matches!(matchrec16, "/**/test", "/one/two/test");
++    matches!(matchrec17, "/**/test", "/one/test");
++    matches!(matchrec18, "/**/test", "/test");
++    matches!(matchrec19, "**/.*", ".abc");
++    matches!(matchrec20, "**/.*", "abc/.abc");
++    matches!(matchrec21, ".*/**", ".abc");
++    matches!(matchrec22, ".*/**", ".abc/abc");
++    matches!(matchrec23, "foo/**", "foo");
++    matches!(matchrec24, "**/foo/bar", "foo/bar");
++
++    matches!(matchrange1, "a[0-9]b", "a0b");
++    matches!(matchrange2, "a[0-9]b", "a9b");
++    matches!(matchrange3, "a[!0-9]b", "a_b");
++    matches!(matchrange4, "[a-z123]", "1");
++    matches!(matchrange5, "[1a-z23]", "1");
++    matches!(matchrange6, "[123a-z]", "1");
++    matches!(matchrange7, "[abc-]", "-");
++    matches!(matchrange8, "[-abc]", "-");
++    matches!(matchrange9, "[-a-c]", "b");
++    matches!(matchrange10, "[a-c-]", "b");
++    matches!(matchrange11, "[-]", "-");
++
++    matches!(matchpat1, "*hello.txt", "hello.txt");
++    matches!(matchpat2, "*hello.txt", "gareth_says_hello.txt");
++    matches!(matchpat3, "*hello.txt", "some/path/to/hello.txt");
++    matches!(matchpat4, "*hello.txt", "some\\path\\to\\hello.txt");
++    matches!(matchpat5, "*hello.txt", "/an/absolute/path/to/hello.txt");
++    matches!(matchpat6, "*some/path/to/hello.txt", "some/path/to/hello.txt");
++    matches!(matchpat7, "*some/path/to/hello.txt",
++             "a/bigger/some/path/to/hello.txt");
++
++    matches!(matchescape, "_[[]_[]]_[?]_[*]_!_", "_[_]_?_*_!_");
++
++    matches!(matchcasei1, "aBcDeFg", "aBcDeFg", CASEI);
++    matches!(matchcasei2, "aBcDeFg", "abcdefg", CASEI);
++    matches!(matchcasei3, "aBcDeFg", "ABCDEFG", CASEI);
++    matches!(matchcasei4, "aBcDeFg", "AbCdEfG", CASEI);
++
++    matches!(matchalt1, "a,b", "a,b");
++    matches!(matchalt2, ",", ",");
++    matches!(matchalt3, "{a,b}", "a");
++    matches!(matchalt4, "{a,b}", "b");
++    matches!(matchalt5, "{**/src/**,foo}", "abc/src/bar");
++    matches!(matchalt6, "{**/src/**,foo}", "foo");
++    matches!(matchalt7, "{[}],foo}", "}");
++    matches!(matchalt8, "{foo}", "foo");
++    matches!(matchalt9, "{}", "");
++    matches!(matchalt10, "{,}", "");
++    matches!(matchalt11, "{*.foo,*.bar,*.wat}", "test.foo");
++    matches!(matchalt12, "{*.foo,*.bar,*.wat}", "test.bar");
++    matches!(matchalt13, "{*.foo,*.bar,*.wat}", "test.wat");
++
++    matches!(matchslash1, "abc/def", "abc/def", SLASHLIT);
++    #[cfg(unix)]
++    nmatches!(matchslash2, "abc?def", "abc/def", SLASHLIT);
++    #[cfg(not(unix))]
++    nmatches!(matchslash2, "abc?def", "abc\\def", SLASHLIT);
++    nmatches!(matchslash3, "abc*def", "abc/def", SLASHLIT);
++    matches!(matchslash4, "abc[/]def", "abc/def", SLASHLIT); // differs
++    #[cfg(unix)]
++    nmatches!(matchslash5, "abc\\def", "abc/def", SLASHLIT);
++    #[cfg(not(unix))]
++    matches!(matchslash5, "abc\\def", "abc/def", SLASHLIT);
++
++    nmatches!(matchnot1, "a*b*c", "abcd");
++    nmatches!(matchnot2, "abc*abc*abc", "abcabcabcabcabcabcabca");
++    nmatches!(matchnot3, "some/**/needle.txt", "some/other/notthis.txt");
++    nmatches!(matchnot4, "some/**/**/needle.txt", "some/other/notthis.txt");
++    nmatches!(matchnot5, "/**/test", "test");
++    nmatches!(matchnot6, "/**/test", "/one/notthis");
++    nmatches!(matchnot7, "/**/test", "/notthis");
++    nmatches!(matchnot8, "**/.*", "ab.c");
++    nmatches!(matchnot9, "**/.*", "abc/ab.c");
++    nmatches!(matchnot10, ".*/**", "a.bc");
++    nmatches!(matchnot11, ".*/**", "abc/a.bc");
++    nmatches!(matchnot12, "a[0-9]b", "a_b");
++    nmatches!(matchnot13, "a[!0-9]b", "a0b");
++    nmatches!(matchnot14, "a[!0-9]b", "a9b");
++    nmatches!(matchnot15, "[!-]", "-");
++    nmatches!(matchnot16, "*hello.txt", "hello.txt-and-then-some");
++    nmatches!(matchnot17, "*hello.txt", "goodbye.txt");
++    nmatches!(matchnot18, "*some/path/to/hello.txt",
++              "some/path/to/hello.txt-and-then-some");
++    nmatches!(matchnot19, "*some/path/to/hello.txt",
++              "some/other/path/to/hello.txt");
++    nmatches!(matchnot20, "a", "foo/a");
++    nmatches!(matchnot21, "./foo", "foo");
++    nmatches!(matchnot22, "**/foo", "foofoo");
++    nmatches!(matchnot23, "**/foo/bar", "foofoo/bar");
++    nmatches!(matchnot24, "/*.c", "mozilla-sha1/sha1.c");
++    nmatches!(matchnot25, "*.c", "mozilla-sha1/sha1.c", SLASHLIT);
++    nmatches!(matchnot26, "**/m4/ltoptions.m4",
++              "csharp/src/packages/repositories.config", SLASHLIT);
++
++    macro_rules! extract {
++        ($which:ident, $name:ident, $pat:expr, $expect:expr) => {
++            extract!($which, $name, $pat, $expect, Options::default());
++        };
++        ($which:ident, $name:ident, $pat:expr, $expect:expr, $opts:expr) => {
++            #[test]
++            fn $name() {
++                let pat = GlobBuilder::new($pat)
++                    .case_insensitive($opts.casei)
++                    .literal_separator($opts.litsep)
++                    .build().unwrap();
++                assert_eq!($expect, pat.$which());
++            }
++        };
++    }
++
++    macro_rules! literal {
++        ($($tt:tt)*) => { extract!(literal, $($tt)*); }
++    }
++
++    macro_rules! basetokens {
++        ($($tt:tt)*) => { extract!(basename_tokens, $($tt)*); }
++    }
++
++    macro_rules! ext {
++        ($($tt:tt)*) => { extract!(ext, $($tt)*); }
++    }
++
++    macro_rules! required_ext {
++        ($($tt:tt)*) => { extract!(required_ext, $($tt)*); }
++    }
++
++    macro_rules! prefix {
++        ($($tt:tt)*) => { extract!(prefix, $($tt)*); }
++    }
++
++    macro_rules! suffix {
++        ($($tt:tt)*) => { extract!(suffix, $($tt)*); }
++    }
++
++    macro_rules! baseliteral {
++        ($($tt:tt)*) => { extract!(basename_literal, $($tt)*); }
++    }
++
++    literal!(extract_lit1, "foo", Some(s("foo")));
++    literal!(extract_lit2, "foo", None, CASEI);
++    literal!(extract_lit3, "/foo", Some(s("/foo")));
++    literal!(extract_lit4, "/foo/", Some(s("/foo/")));
++    literal!(extract_lit5, "/foo/bar", Some(s("/foo/bar")));
++    literal!(extract_lit6, "*.foo", None);
++    literal!(extract_lit7, "foo/bar", Some(s("foo/bar")));
++    literal!(extract_lit8, "**/foo/bar", None);
++
++    basetokens!(extract_basetoks1, "**/foo", Some(&*vec![
++        Literal('f'), Literal('o'), Literal('o'),
++    ]));
++    basetokens!(extract_basetoks2, "**/foo", None, CASEI);
++    basetokens!(extract_basetoks3, "**/foo", Some(&*vec![
++        Literal('f'), Literal('o'), Literal('o'),
++    ]), SLASHLIT);
++    basetokens!(extract_basetoks4, "*foo", None, SLASHLIT);
++    basetokens!(extract_basetoks5, "*foo", None);
++    basetokens!(extract_basetoks6, "**/fo*o", None);
++    basetokens!(extract_basetoks7, "**/fo*o", Some(&*vec![
++        Literal('f'), Literal('o'), ZeroOrMore, Literal('o'),
++    ]), SLASHLIT);
++
++    ext!(extract_ext1, "**/*.rs", Some(os(".rs")));
++    ext!(extract_ext2, "**/*.rs.bak", None);
++    ext!(extract_ext3, "*.rs", Some(os(".rs")));
++    ext!(extract_ext4, "a*.rs", None);
++    ext!(extract_ext5, "/*.c", None);
++    ext!(extract_ext6, "*.c", None, SLASHLIT);
++    ext!(extract_ext7, "*.c", Some(os(".c")));
++
++    required_ext!(extract_req_ext1, "*.rs", Some(os(".rs")));
++    required_ext!(extract_req_ext2, "/foo/bar/*.rs", Some(os(".rs")));
++    required_ext!(extract_req_ext3, "/foo/bar/*.rs", Some(os(".rs")));
++    required_ext!(extract_req_ext4, "/foo/bar/.rs", Some(os(".rs")));
++    required_ext!(extract_req_ext5, ".rs", Some(os(".rs")));
++    required_ext!(extract_req_ext6, "./rs", None);
++    required_ext!(extract_req_ext7, "foo", None);
++    required_ext!(extract_req_ext8, ".foo/", None);
++    required_ext!(extract_req_ext9, "foo/", None);
++
++    prefix!(extract_prefix1, "/foo", Some(s("/foo")));
++    prefix!(extract_prefix2, "/foo/*", Some(s("/foo/")));
++    prefix!(extract_prefix3, "**/foo", None);
++    prefix!(extract_prefix4, "foo/**", None);
++
++    suffix!(extract_suffix1, "**/foo/bar", Some((s("/foo/bar"), true)));
++    suffix!(extract_suffix2, "*/foo/bar", Some((s("/foo/bar"), false)));
++    suffix!(extract_suffix3, "*/foo/bar", None, SLASHLIT);
++    suffix!(extract_suffix4, "foo/bar", Some((s("foo/bar"), false)));
++    suffix!(extract_suffix5, "*.foo", Some((s(".foo"), false)));
++    suffix!(extract_suffix6, "*.foo", None, SLASHLIT);
++    suffix!(extract_suffix7, "**/*_test", Some((s("_test"), false)));
++
++    baseliteral!(extract_baselit1, "**/foo", Some(s("foo")));
++    baseliteral!(extract_baselit2, "foo", None);
++    baseliteral!(extract_baselit3, "*foo", None);
++    baseliteral!(extract_baselit4, "*/foo", None);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..98080705728e7ca3774f901153bcb48ae8cd0a2c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,835 @@@
++/*!
++The globset crate provides cross platform single glob and glob set matching.
++
++Glob set matching is the process of matching one or more glob patterns against
++a single candidate path simultaneously, and returning all of the globs that
++matched. For example, given this set of globs:
++
++```ignore
++*.rs
++src/lib.rs
++src/**/foo.rs
++```
++
++and a path `src/bar/baz/foo.rs`, then the set would report the first and third
++globs as matching.
++
++# Example: one glob
++
++This example shows how to match a single glob against a single file path.
++
++```
++# fn example() -> Result<(), globset::Error> {
++use globset::Glob;
++
++let glob = try!(Glob::new("*.rs")).compile_matcher();
++
++assert!(glob.is_match("foo.rs"));
++assert!(glob.is_match("foo/bar.rs"));
++assert!(!glob.is_match("Cargo.toml"));
++# Ok(()) } example().unwrap();
++```
++
++# Example: configuring a glob matcher
++
++This example shows how to use a `GlobBuilder` to configure aspects of match
++semantics. In this example, we prevent wildcards from matching path separators.
++
++```
++# fn example() -> Result<(), globset::Error> {
++use globset::GlobBuilder;
++
++let glob = try!(GlobBuilder::new("*.rs")
++    .literal_separator(true).build()).compile_matcher();
++
++assert!(glob.is_match("foo.rs"));
++assert!(!glob.is_match("foo/bar.rs")); // no longer matches
++assert!(!glob.is_match("Cargo.toml"));
++# Ok(()) } example().unwrap();
++```
++
++# Example: match multiple globs at once
++
++This example shows how to match multiple glob patterns at once.
++
++```
++# fn example() -> Result<(), globset::Error> {
++use globset::{Glob, GlobSetBuilder};
++
++let mut builder = GlobSetBuilder::new();
++// A GlobBuilder can be used to configure each glob's match semantics
++// independently.
++builder.add(try!(Glob::new("*.rs")));
++builder.add(try!(Glob::new("src/lib.rs")));
++builder.add(try!(Glob::new("src/**/foo.rs")));
++let set = try!(builder.build());
++
++assert_eq!(set.matches("src/bar/baz/foo.rs"), vec![0, 2]);
++# Ok(()) } example().unwrap();
++```
++
++# Syntax
++
++Standard Unix-style glob syntax is supported:
++
++* `?` matches any single character. (If the `literal_separator` option is
++  enabled, then `?` can never match a path separator.)
++* `*` matches zero or more characters. (If the `literal_separator` option is
++  enabled, then `*` can never match a path separator.)
++* `**` recursively matches directories but are only legal in three situations.
++  First, if the glob starts with <code>\*\*&#x2F;</code>, then it matches
++  all directories. For example, <code>\*\*&#x2F;foo</code> matches `foo`
++  and `bar/foo` but not `foo/bar`. Secondly, if the glob ends with
++  <code>&#x2F;\*\*</code>, then it matches all sub-entries. For example,
++  <code>foo&#x2F;\*\*</code> matches `foo/a` and `foo/a/b`, but not `foo`.
++  Thirdly, if the glob contains <code>&#x2F;\*\*&#x2F;</code> anywhere within
++  the pattern, then it matches zero or more directories. Using `**` anywhere
++  else is illegal (N.B. the glob `**` is allowed and means "match everything").
++* `{a,b}` matches `a` or `b` where `a` and `b` are arbitrary glob patterns.
++  (N.B. Nesting `{...}` is not currently allowed.)
++* `[ab]` matches `a` or `b` where `a` and `b` are characters. Use
++  `[!ab]` to match any character except for `a` and `b`.
++* Metacharacters such as `*` and `?` can be escaped with character class
++  notation. e.g., `[*]` matches `*`.
++
++A `GlobBuilder` can be used to prevent wildcards from matching path separators,
++or to enable case insensitive matching.
++*/
++
++#![deny(missing_docs)]
++
++extern crate aho_corasick;
++extern crate fnv;
++#[macro_use]
++extern crate log;
++extern crate memchr;
++extern crate regex;
++
++use std::borrow::Cow;
++use std::collections::{BTreeMap, HashMap};
++use std::error::Error as StdError;
++use std::ffi::{OsStr, OsString};
++use std::fmt;
++use std::hash;
++use std::path::Path;
++use std::str;
++
++use aho_corasick::{Automaton, AcAutomaton, FullAcAutomaton};
++use regex::bytes::{Regex, RegexBuilder, RegexSet};
++
++use pathutil::{
++    file_name, file_name_ext, normalize_path, os_str_bytes, path_bytes,
++};
++use glob::MatchStrategy;
++pub use glob::{Glob, GlobBuilder, GlobMatcher};
++
++mod glob;
++mod pathutil;
++
++/// Represents an error that can occur when parsing a glob pattern.
++#[derive(Clone, Debug, Eq, PartialEq)]
++pub struct Error {
++    /// The original glob provided by the caller.
++    glob: Option<String>,
++    /// The kind of error.
++    kind: ErrorKind,
++}
++
++/// The kind of error that can occur when parsing a glob pattern.
++#[derive(Clone, Debug, Eq, PartialEq)]
++pub enum ErrorKind {
++    /// Occurs when a use of `**` is invalid. Namely, `**` can only appear
++    /// adjacent to a path separator, or the beginning/end of a glob.
++    InvalidRecursive,
++    /// Occurs when a character class (e.g., `[abc]`) is not closed.
++    UnclosedClass,
++    /// Occurs when a range in a character (e.g., `[a-z]`) is invalid. For
++    /// example, if the range starts with a lexicographically larger character
++    /// than it ends with.
++    InvalidRange(char, char),
++    /// Occurs when a `}` is found without a matching `{`.
++    UnopenedAlternates,
++    /// Occurs when a `{` is found without a matching `}`.
++    UnclosedAlternates,
++    /// Occurs when an alternating group is nested inside another alternating
++    /// group, e.g., `{{a,b},{c,d}}`.
++    NestedAlternates,
++    /// An error associated with parsing or compiling a regex.
++    Regex(String),
++}
++
++impl StdError for Error {
++    fn description(&self) -> &str {
++        self.kind.description()
++    }
++}
++
++impl Error {
++    /// Return the glob that caused this error, if one exists.
++    pub fn glob(&self) -> Option<&str> {
++        self.glob.as_ref().map(|s| &**s)
++    }
++
++    /// Return the kind of this error.
++    pub fn kind(&self) -> &ErrorKind {
++        &self.kind
++    }
++}
++
++impl ErrorKind {
++    fn description(&self) -> &str {
++        match *self {
++            ErrorKind::InvalidRecursive => {
++                "invalid use of **; must be one path component"
++            }
++            ErrorKind::UnclosedClass => {
++                "unclosed character class; missing ']'"
++            }
++            ErrorKind::InvalidRange(_, _) => {
++                "invalid character range"
++            }
++            ErrorKind::UnopenedAlternates => {
++                "unopened alternate group; missing '{' \
++                (maybe escape '}' with '[}]'?)"
++            }
++            ErrorKind::UnclosedAlternates => {
++                "unclosed alternate group; missing '}' \
++                (maybe escape '{' with '[{]'?)"
++            }
++            ErrorKind::NestedAlternates => {
++                "nested alternate groups are not allowed"
++            }
++            ErrorKind::Regex(ref err) => err,
++        }
++    }
++}
++
++impl fmt::Display for Error {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        match self.glob {
++            None => self.kind.fmt(f),
++            Some(ref glob) => {
++                write!(f, "error parsing glob '{}': {}", glob, self.kind)
++            }
++        }
++    }
++}
++
++impl fmt::Display for ErrorKind {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        match *self {
++            ErrorKind::InvalidRecursive
++            | ErrorKind::UnclosedClass
++            | ErrorKind::UnopenedAlternates
++            | ErrorKind::UnclosedAlternates
++            | ErrorKind::NestedAlternates
++            | ErrorKind::Regex(_) => {
++                write!(f, "{}", self.description())
++            }
++            ErrorKind::InvalidRange(s, e) => {
++                write!(f, "invalid range; '{}' > '{}'", s, e)
++            }
++        }
++    }
++}
++
++fn new_regex(pat: &str) -> Result<Regex, Error> {
++    RegexBuilder::new(pat)
++        .dot_matches_new_line(true)
++        .size_limit(10 * (1 << 20))
++        .dfa_size_limit(10 * (1 << 20))
++        .build()
++        .map_err(|err| {
++            Error {
++                glob: Some(pat.to_string()),
++                kind: ErrorKind::Regex(err.to_string()),
++            }
++        })
++}
++
++fn new_regex_set<I, S>(pats: I) -> Result<RegexSet, Error>
++        where S: AsRef<str>, I: IntoIterator<Item=S> {
++    RegexSet::new(pats).map_err(|err| {
++        Error {
++            glob: None,
++            kind: ErrorKind::Regex(err.to_string()),
++        }
++    })
++}
++
++type Fnv = hash::BuildHasherDefault<fnv::FnvHasher>;
++
++/// GlobSet represents a group of globs that can be matched together in a
++/// single pass.
++#[derive(Clone, Debug)]
++pub struct GlobSet {
++    len: usize,
++    strats: Vec<GlobSetMatchStrategy>,
++}
++
++impl GlobSet {
++    /// Returns true if this set is empty, and therefore matches nothing.
++    pub fn is_empty(&self) -> bool {
++        self.len == 0
++    }
++
++    /// Returns the number of globs in this set.
++    pub fn len(&self) -> usize {
++        self.len
++    }
++
++    /// Returns true if any glob in this set matches the path given.
++    pub fn is_match<P: AsRef<Path>>(&self, path: P) -> bool {
++        self.is_match_candidate(&Candidate::new(path.as_ref()))
++    }
++
++    /// Returns true if any glob in this set matches the path given.
++    ///
++    /// This takes a Candidate as input, which can be used to amortize the
++    /// cost of preparing a path for matching.
++    pub fn is_match_candidate(&self, path: &Candidate) -> bool {
++        if self.is_empty() {
++            return false;
++        }
++        for strat in &self.strats {
++            if strat.is_match(path) {
++                return true;
++            }
++        }
++        false
++    }
++
++    /// Returns the sequence number of every glob pattern that matches the
++    /// given path.
++    pub fn matches<P: AsRef<Path>>(&self, path: P) -> Vec<usize> {
++        self.matches_candidate(&Candidate::new(path.as_ref()))
++    }
++
++    /// Returns the sequence number of every glob pattern that matches the
++    /// given path.
++    ///
++    /// This takes a Candidate as input, which can be used to amortize the
++    /// cost of preparing a path for matching.
++    pub fn matches_candidate(&self, path: &Candidate) -> Vec<usize> {
++        let mut into = vec![];
++        if self.is_empty() {
++            return into;
++        }
++        self.matches_candidate_into(path, &mut into);
++        into
++    }
++
++    /// Adds the sequence number of every glob pattern that matches the given
++    /// path to the vec given.
++    ///
++    /// `into` is is cleared before matching begins, and contains the set of
++    /// sequence numbers (in ascending order) after matching ends. If no globs
++    /// were matched, then `into` will be empty.
++    pub fn matches_into<P: AsRef<Path>>(
++        &self,
++        path: P,
++        into: &mut Vec<usize>,
++    ) {
++        self.matches_candidate_into(&Candidate::new(path.as_ref()), into);
++    }
++
++    /// Adds the sequence number of every glob pattern that matches the given
++    /// path to the vec given.
++    ///
++    /// `into` is is cleared before matching begins, and contains the set of
++    /// sequence numbers (in ascending order) after matching ends. If no globs
++    /// were matched, then `into` will be empty.
++    ///
++    /// This takes a Candidate as input, which can be used to amortize the
++    /// cost of preparing a path for matching.
++    pub fn matches_candidate_into(
++        &self,
++        path: &Candidate,
++        into: &mut Vec<usize>,
++    ) {
++        into.clear();
++        if self.is_empty() {
++            return;
++        }
++        for strat in &self.strats {
++            strat.matches_into(path, into);
++        }
++        into.sort();
++        into.dedup();
++    }
++
++    fn new(pats: &[Glob]) -> Result<GlobSet, Error> {
++        if pats.is_empty() {
++            return Ok(GlobSet { len: 0, strats: vec![] });
++        }
++        let mut lits = LiteralStrategy::new();
++        let mut base_lits = BasenameLiteralStrategy::new();
++        let mut exts = ExtensionStrategy::new();
++        let mut prefixes = MultiStrategyBuilder::new();
++        let mut suffixes = MultiStrategyBuilder::new();
++        let mut required_exts = RequiredExtensionStrategyBuilder::new();
++        let mut regexes = MultiStrategyBuilder::new();
++        for (i, p) in pats.iter().enumerate() {
++            match MatchStrategy::new(p) {
++                MatchStrategy::Literal(lit) => {
++                    lits.add(i, lit);
++                }
++                MatchStrategy::BasenameLiteral(lit) => {
++                    base_lits.add(i, lit);
++                }
++                MatchStrategy::Extension(ext) => {
++                    exts.add(i, ext);
++                }
++                MatchStrategy::Prefix(prefix) => {
++                    prefixes.add(i, prefix);
++                }
++                MatchStrategy::Suffix { suffix, component } => {
++                    if component {
++                        lits.add(i, suffix[1..].to_string());
++                    }
++                    suffixes.add(i, suffix);
++                }
++                MatchStrategy::RequiredExtension(ext) => {
++                    required_exts.add(i, ext, p.regex().to_owned());
++                }
++                MatchStrategy::Regex => {
++                    debug!("glob converted to regex: {:?}", p);
++                    regexes.add(i, p.regex().to_owned());
++                }
++            }
++        }
++        debug!("built glob set; {} literals, {} basenames, {} extensions, \
++                {} prefixes, {} suffixes, {} required extensions, {} regexes",
++                lits.0.len(), base_lits.0.len(), exts.0.len(),
++                prefixes.literals.len(), suffixes.literals.len(),
++                required_exts.0.len(), regexes.literals.len());
++        Ok(GlobSet {
++            len: pats.len(),
++            strats: vec![
++                GlobSetMatchStrategy::Extension(exts),
++                GlobSetMatchStrategy::BasenameLiteral(base_lits),
++                GlobSetMatchStrategy::Literal(lits),
++                GlobSetMatchStrategy::Suffix(suffixes.suffix()),
++                GlobSetMatchStrategy::Prefix(prefixes.prefix()),
++                GlobSetMatchStrategy::RequiredExtension(
++                    try!(required_exts.build())),
++                GlobSetMatchStrategy::Regex(try!(regexes.regex_set())),
++            ],
++        })
++    }
++}
++
++/// GlobSetBuilder builds a group of patterns that can be used to
++/// simultaneously match a file path.
++pub struct GlobSetBuilder {
++    pats: Vec<Glob>,
++}
++
++impl GlobSetBuilder {
++    /// Create a new GlobSetBuilder. A GlobSetBuilder can be used to add new
++    /// patterns. Once all patterns have been added, `build` should be called
++    /// to produce a `GlobSet`, which can then be used for matching.
++    pub fn new() -> GlobSetBuilder {
++        GlobSetBuilder { pats: vec![] }
++    }
++
++    /// Builds a new matcher from all of the glob patterns added so far.
++    ///
++    /// Once a matcher is built, no new patterns can be added to it.
++    pub fn build(&self) -> Result<GlobSet, Error> {
++        GlobSet::new(&self.pats)
++    }
++
++    /// Add a new pattern to this set.
++    #[allow(dead_code)]
++    pub fn add(&mut self, pat: Glob) -> &mut GlobSetBuilder {
++        self.pats.push(pat);
++        self
++    }
++}
++
++/// A candidate path for matching.
++///
++/// All glob matching in this crate operates on `Candidate` values.
++/// Constructing candidates has a very small cost associated with it, so
++/// callers may find it beneficial to amortize that cost when matching a single
++/// path against multiple globs or sets of globs.
++#[derive(Clone, Debug)]
++pub struct Candidate<'a> {
++    path: Cow<'a, [u8]>,
++    basename: Cow<'a, [u8]>,
++    ext: &'a OsStr,
++}
++
++impl<'a> Candidate<'a> {
++    /// Create a new candidate for matching from the given path.
++    pub fn new<P: AsRef<Path> + ?Sized>(path: &'a P) -> Candidate<'a> {
++        let path = path.as_ref();
++        let basename = file_name(path).unwrap_or(OsStr::new(""));
++        Candidate {
++            path: normalize_path(path_bytes(path)),
++            basename: os_str_bytes(basename),
++            ext: file_name_ext(basename).unwrap_or(OsStr::new("")),
++        }
++    }
++
++    fn path_prefix(&self, max: usize) -> &[u8] {
++        if self.path.len() <= max {
++            &*self.path
++        } else {
++            &self.path[..max]
++        }
++    }
++
++    fn path_suffix(&self, max: usize) -> &[u8] {
++        if self.path.len() <= max {
++            &*self.path
++        } else {
++            &self.path[self.path.len() - max..]
++        }
++    }
++}
++
++#[derive(Clone, Debug)]
++enum GlobSetMatchStrategy {
++    Literal(LiteralStrategy),
++    BasenameLiteral(BasenameLiteralStrategy),
++    Extension(ExtensionStrategy),
++    Prefix(PrefixStrategy),
++    Suffix(SuffixStrategy),
++    RequiredExtension(RequiredExtensionStrategy),
++    Regex(RegexSetStrategy),
++}
++
++impl GlobSetMatchStrategy {
++    fn is_match(&self, candidate: &Candidate) -> bool {
++        use self::GlobSetMatchStrategy::*;
++        match *self {
++            Literal(ref s) => s.is_match(candidate),
++            BasenameLiteral(ref s) => s.is_match(candidate),
++            Extension(ref s) => s.is_match(candidate),
++            Prefix(ref s) => s.is_match(candidate),
++            Suffix(ref s) => s.is_match(candidate),
++            RequiredExtension(ref s) => s.is_match(candidate),
++            Regex(ref s) => s.is_match(candidate),
++        }
++    }
++
++    fn matches_into(&self, candidate: &Candidate, matches: &mut Vec<usize>) {
++        use self::GlobSetMatchStrategy::*;
++        match *self {
++            Literal(ref s) => s.matches_into(candidate, matches),
++            BasenameLiteral(ref s) => s.matches_into(candidate, matches),
++            Extension(ref s) => s.matches_into(candidate, matches),
++            Prefix(ref s) => s.matches_into(candidate, matches),
++            Suffix(ref s) => s.matches_into(candidate, matches),
++            RequiredExtension(ref s) => s.matches_into(candidate, matches),
++            Regex(ref s) => s.matches_into(candidate, matches),
++        }
++    }
++}
++
++#[derive(Clone, Debug)]
++struct LiteralStrategy(BTreeMap<Vec<u8>, Vec<usize>>);
++
++impl LiteralStrategy {
++    fn new() -> LiteralStrategy {
++        LiteralStrategy(BTreeMap::new())
++    }
++
++    fn add(&mut self, global_index: usize, lit: String) {
++        self.0.entry(lit.into_bytes()).or_insert(vec![]).push(global_index);
++    }
++
++    fn is_match(&self, candidate: &Candidate) -> bool {
++        self.0.contains_key(&*candidate.path)
++    }
++
++    #[inline(never)]
++    fn matches_into(&self, candidate: &Candidate, matches: &mut Vec<usize>) {
++        if let Some(hits) = self.0.get(&*candidate.path) {
++            matches.extend(hits);
++        }
++    }
++}
++
++#[derive(Clone, Debug)]
++struct BasenameLiteralStrategy(BTreeMap<Vec<u8>, Vec<usize>>);
++
++impl BasenameLiteralStrategy {
++    fn new() -> BasenameLiteralStrategy {
++        BasenameLiteralStrategy(BTreeMap::new())
++    }
++
++    fn add(&mut self, global_index: usize, lit: String) {
++        self.0.entry(lit.into_bytes()).or_insert(vec![]).push(global_index);
++    }
++
++    fn is_match(&self, candidate: &Candidate) -> bool {
++        if candidate.basename.is_empty() {
++            return false;
++        }
++        self.0.contains_key(&*candidate.basename)
++    }
++
++    #[inline(never)]
++    fn matches_into(&self, candidate: &Candidate, matches: &mut Vec<usize>) {
++        if candidate.basename.is_empty() {
++            return;
++        }
++        if let Some(hits) = self.0.get(&*candidate.basename) {
++            matches.extend(hits);
++        }
++    }
++}
++
++#[derive(Clone, Debug)]
++struct ExtensionStrategy(HashMap<OsString, Vec<usize>, Fnv>);
++
++impl ExtensionStrategy {
++    fn new() -> ExtensionStrategy {
++        ExtensionStrategy(HashMap::with_hasher(Fnv::default()))
++    }
++
++    fn add(&mut self, global_index: usize, ext: OsString) {
++        self.0.entry(ext).or_insert(vec![]).push(global_index);
++    }
++
++    fn is_match(&self, candidate: &Candidate) -> bool {
++        if candidate.ext.is_empty() {
++            return false;
++        }
++        self.0.contains_key(candidate.ext)
++    }
++
++    #[inline(never)]
++    fn matches_into(&self, candidate: &Candidate, matches: &mut Vec<usize>) {
++        if candidate.ext.is_empty() {
++            return;
++        }
++        if let Some(hits) = self.0.get(candidate.ext) {
++            matches.extend(hits);
++        }
++    }
++}
++
++#[derive(Clone, Debug)]
++struct PrefixStrategy {
++    matcher: FullAcAutomaton<Vec<u8>>,
++    map: Vec<usize>,
++    longest: usize,
++}
++
++impl PrefixStrategy {
++    fn is_match(&self, candidate: &Candidate) -> bool {
++        let path = candidate.path_prefix(self.longest);
++        for m in self.matcher.find_overlapping(path) {
++            if m.start == 0 {
++                return true;
++            }
++        }
++        false
++    }
++
++    fn matches_into(&self, candidate: &Candidate, matches: &mut Vec<usize>) {
++        let path = candidate.path_prefix(self.longest);
++        for m in self.matcher.find_overlapping(path) {
++            if m.start == 0 {
++                matches.push(self.map[m.pati]);
++            }
++        }
++    }
++}
++
++#[derive(Clone, Debug)]
++struct SuffixStrategy {
++    matcher: FullAcAutomaton<Vec<u8>>,
++    map: Vec<usize>,
++    longest: usize,
++}
++
++impl SuffixStrategy {
++    fn is_match(&self, candidate: &Candidate) -> bool {
++        let path = candidate.path_suffix(self.longest);
++        for m in self.matcher.find_overlapping(path) {
++            if m.end == path.len() {
++                return true;
++            }
++        }
++        false
++    }
++
++    fn matches_into(&self, candidate: &Candidate, matches: &mut Vec<usize>) {
++        let path = candidate.path_suffix(self.longest);
++        for m in self.matcher.find_overlapping(path) {
++            if m.end == path.len() {
++                matches.push(self.map[m.pati]);
++            }
++        }
++    }
++}
++
++#[derive(Clone, Debug)]
++struct RequiredExtensionStrategy(HashMap<OsString, Vec<(usize, Regex)>, Fnv>);
++
++impl RequiredExtensionStrategy {
++    fn is_match(&self, candidate: &Candidate) -> bool {
++        if candidate.ext.is_empty() {
++            return false;
++        }
++        match self.0.get(candidate.ext) {
++            None => false,
++            Some(regexes) => {
++                for &(_, ref re) in regexes {
++                    if re.is_match(&*candidate.path) {
++                        return true;
++                    }
++                }
++                false
++            }
++        }
++    }
++
++    #[inline(never)]
++    fn matches_into(&self, candidate: &Candidate, matches: &mut Vec<usize>) {
++        if candidate.ext.is_empty() {
++            return;
++        }
++        if let Some(regexes) = self.0.get(candidate.ext) {
++            for &(global_index, ref re) in regexes {
++                if re.is_match(&*candidate.path) {
++                    matches.push(global_index);
++                }
++            }
++        }
++    }
++}
++
++#[derive(Clone, Debug)]
++struct RegexSetStrategy {
++    matcher: RegexSet,
++    map: Vec<usize>,
++}
++
++impl RegexSetStrategy {
++    fn is_match(&self, candidate: &Candidate) -> bool {
++        self.matcher.is_match(&*candidate.path)
++    }
++
++    fn matches_into(&self, candidate: &Candidate, matches: &mut Vec<usize>) {
++        for i in self.matcher.matches(&*candidate.path) {
++            matches.push(self.map[i]);
++        }
++    }
++}
++
++#[derive(Clone, Debug)]
++struct MultiStrategyBuilder {
++    literals: Vec<String>,
++    map: Vec<usize>,
++    longest: usize,
++}
++
++impl MultiStrategyBuilder {
++    fn new() -> MultiStrategyBuilder {
++        MultiStrategyBuilder {
++            literals: vec![],
++            map: vec![],
++            longest: 0,
++        }
++    }
++
++    fn add(&mut self, global_index: usize, literal: String) {
++        if literal.len() > self.longest {
++            self.longest = literal.len();
++        }
++        self.map.push(global_index);
++        self.literals.push(literal);
++    }
++
++    fn prefix(self) -> PrefixStrategy {
++        let it = self.literals.into_iter().map(|s| s.into_bytes());
++        PrefixStrategy {
++            matcher: AcAutomaton::new(it).into_full(),
++            map: self.map,
++            longest: self.longest,
++        }
++    }
++
++    fn suffix(self) -> SuffixStrategy {
++        let it = self.literals.into_iter().map(|s| s.into_bytes());
++        SuffixStrategy {
++            matcher: AcAutomaton::new(it).into_full(),
++            map: self.map,
++            longest: self.longest,
++        }
++    }
++
++    fn regex_set(self) -> Result<RegexSetStrategy, Error> {
++        Ok(RegexSetStrategy {
++            matcher: try!(new_regex_set(self.literals)),
++            map: self.map,
++        })
++    }
++}
++
++#[derive(Clone, Debug)]
++struct RequiredExtensionStrategyBuilder(
++    HashMap<OsString, Vec<(usize, String)>>,
++);
++
++impl RequiredExtensionStrategyBuilder {
++    fn new() -> RequiredExtensionStrategyBuilder {
++        RequiredExtensionStrategyBuilder(HashMap::new())
++    }
++
++    fn add(&mut self, global_index: usize, ext: OsString, regex: String) {
++        self.0.entry(ext).or_insert(vec![]).push((global_index, regex));
++    }
++
++    fn build(self) -> Result<RequiredExtensionStrategy, Error> {
++        let mut exts = HashMap::with_hasher(Fnv::default());
++        for (ext, regexes) in self.0.into_iter() {
++            exts.insert(ext.clone(), vec![]);
++            for (global_index, regex) in regexes {
++                let compiled = try!(new_regex(&regex));
++                exts.get_mut(&ext).unwrap().push((global_index, compiled));
++            }
++        }
++        Ok(RequiredExtensionStrategy(exts))
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use super::GlobSetBuilder;
++    use glob::Glob;
++
++    #[test]
++    fn set_works() {
++        let mut builder = GlobSetBuilder::new();
++        builder.add(Glob::new("src/**/*.rs").unwrap());
++        builder.add(Glob::new("*.c").unwrap());
++        builder.add(Glob::new("src/lib.rs").unwrap());
++        let set = builder.build().unwrap();
++
++        assert!(set.is_match("foo.c"));
++        assert!(set.is_match("src/foo.c"));
++        assert!(!set.is_match("foo.rs"));
++        assert!(!set.is_match("tests/foo.rs"));
++        assert!(set.is_match("src/foo.rs"));
++        assert!(set.is_match("src/grep/src/main.rs"));
++
++        let matches = set.matches("src/lib.rs");
++        assert_eq!(2, matches.len());
++        assert_eq!(0, matches[0]);
++        assert_eq!(2, matches[1]);
++    }
++
++    #[test]
++    fn empty_set_works() {
++        let set = GlobSetBuilder::new().build().unwrap();
++        assert!(!set.is_match(""));
++        assert!(!set.is_match("a"));
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16bd16fc76e3fa27c741b4ed91f0eda533f5160d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,178 @@@
++use std::borrow::Cow;
++use std::ffi::OsStr;
++use std::path::Path;
++
++/// The final component of the path, if it is a normal file.
++///
++/// If the path terminates in ., .., or consists solely of a root of prefix,
++/// file_name will return None.
++#[cfg(unix)]
++pub fn file_name<'a, P: AsRef<Path> + ?Sized>(
++    path: &'a P,
++) -> Option<&'a OsStr> {
++    use std::os::unix::ffi::OsStrExt;
++    use memchr::memrchr;
++
++    let path = path.as_ref().as_os_str().as_bytes();
++    if path.is_empty() {
++        return None;
++    } else if path.len() == 1 && path[0] == b'.' {
++        return None;
++    } else if path.last() == Some(&b'.') {
++        return None;
++    } else if path.len() >= 2 && &path[path.len() - 2..] == &b".."[..] {
++        return None;
++    }
++    let last_slash = memrchr(b'/', path).map(|i| i + 1).unwrap_or(0);
++    Some(OsStr::from_bytes(&path[last_slash..]))
++}
++
++/// The final component of the path, if it is a normal file.
++///
++/// If the path terminates in ., .., or consists solely of a root of prefix,
++/// file_name will return None.
++#[cfg(not(unix))]
++pub fn file_name<'a, P: AsRef<Path> + ?Sized>(
++    path: &'a P,
++) -> Option<&'a OsStr> {
++    path.as_ref().file_name()
++}
++
++/// Return a file extension given a path's file name.
++///
++/// Note that this does NOT match the semantics of std::path::Path::extension.
++/// Namely, the extension includes the `.` and matching is otherwise more
++/// liberal. Specifically, the extenion is:
++///
++/// * None, if the file name given is empty;
++/// * None, if there is no embedded `.`;
++/// * Otherwise, the portion of the file name starting with the final `.`.
++///
++/// e.g., A file name of `.rs` has an extension `.rs`.
++///
++/// N.B. This is done to make certain glob match optimizations easier. Namely,
++/// a pattern like `*.rs` is obviously trying to match files with a `rs`
++/// extension, but it also matches files like `.rs`, which doesn't have an
++/// extension according to std::path::Path::extension.
++pub fn file_name_ext(name: &OsStr) -> Option<&OsStr> {
++    // Yes, these functions are awful, and yes, we are completely violating
++    // the abstraction barrier of std::ffi. The barrier we're violating is
++    // that an OsStr's encoding is *ASCII compatible*. While this is obviously
++    // true on Unix systems, it's also true on Windows because an OsStr uses
++    // WTF-8 internally: https://simonsapin.github.io/wtf-8/
++    //
++    // We should consider doing the same for the other path utility functions.
++    // Right now, we don't break any barriers, but Windows users are paying
++    // for it.
++    //
++    // Got any better ideas that don't cost anything? Hit me up. ---AG
++    unsafe fn os_str_as_u8_slice(s: &OsStr) -> &[u8] {
++        ::std::mem::transmute(s)
++    }
++    unsafe fn u8_slice_as_os_str(s: &[u8]) -> &OsStr {
++        ::std::mem::transmute(s)
++    }
++    if name.is_empty() {
++        return None;
++    }
++    let name = unsafe { os_str_as_u8_slice(name) };
++    for (i, &b) in name.iter().enumerate().rev() {
++        if b == b'.' {
++            return Some(unsafe { u8_slice_as_os_str(&name[i..]) });
++        }
++    }
++    None
++}
++
++/// Return raw bytes of a path, transcoded to UTF-8 if necessary.
++pub fn path_bytes(path: &Path) -> Cow<[u8]> {
++    os_str_bytes(path.as_os_str())
++}
++
++/// Return the raw bytes of the given OS string, possibly transcoded to UTF-8.
++#[cfg(unix)]
++pub fn os_str_bytes(s: &OsStr) -> Cow<[u8]> {
++    use std::os::unix::ffi::OsStrExt;
++    Cow::Borrowed(s.as_bytes())
++}
++
++/// Return the raw bytes of the given OS string, possibly transcoded to UTF-8.
++#[cfg(not(unix))]
++pub fn os_str_bytes(s: &OsStr) -> Cow<[u8]> {
++    // TODO(burntsushi): On Windows, OS strings are WTF-8, which is a superset
++    // of UTF-8, so even if we could get at the raw bytes, they wouldn't
++    // be useful. We *must* convert to UTF-8 before doing path matching.
++    // Unfortunate, but necessary.
++    match s.to_string_lossy() {
++        Cow::Owned(s) => Cow::Owned(s.into_bytes()),
++        Cow::Borrowed(s) => Cow::Borrowed(s.as_bytes()),
++    }
++}
++
++/// Normalizes a path to use `/` as a separator everywhere, even on platforms
++/// that recognize other characters as separators.
++#[cfg(unix)]
++pub fn normalize_path(path: Cow<[u8]>) -> Cow<[u8]> {
++    // UNIX only uses /, so we're good.
++    path
++}
++
++/// Normalizes a path to use `/` as a separator everywhere, even on platforms
++/// that recognize other characters as separators.
++#[cfg(not(unix))]
++pub fn normalize_path(mut path: Cow<[u8]>) -> Cow<[u8]> {
++    use std::path::is_separator;
++
++    for i in 0..path.len() {
++        if path[i] == b'/' || !is_separator(path[i] as char) {
++            continue;
++        }
++        path.to_mut()[i] = b'/';
++    }
++    path
++}
++
++#[cfg(test)]
++mod tests {
++    use std::borrow::Cow;
++    use std::ffi::OsStr;
++
++    use super::{file_name_ext, normalize_path};
++
++    macro_rules! ext {
++        ($name:ident, $file_name:expr, $ext:expr) => {
++            #[test]
++            fn $name() {
++                let got = file_name_ext(OsStr::new($file_name));
++                assert_eq!($ext.map(OsStr::new), got);
++            }
++        };
++    }
++
++    ext!(ext1, "foo.rs", Some(".rs"));
++    ext!(ext2, ".rs", Some(".rs"));
++    ext!(ext3, "..rs", Some(".rs"));
++    ext!(ext4, "", None::<&str>);
++    ext!(ext5, "foo", None::<&str>);
++
++    macro_rules! normalize {
++        ($name:ident, $path:expr, $expected:expr) => {
++            #[test]
++            fn $name() {
++                let got = normalize_path(Cow::Owned($path.to_vec()));
++                assert_eq!($expected.to_vec(), got.into_owned());
++            }
++        };
++    }
++
++    normalize!(normal1, b"foo", b"foo");
++    normalize!(normal2, b"foo/bar", b"foo/bar");
++    #[cfg(unix)]
++    normalize!(normal3, b"foo\\bar", b"foo\\bar");
++    #[cfg(not(unix))]
++    normalize!(normal3, b"foo\\bar", b"foo/bar");
++    #[cfg(unix)]
++    normalize!(normal4, b"foo\\bar/baz", b"foo\\bar/baz");
++    #[cfg(not(unix))]
++    normalize!(normal4, b"foo\\bar/baz", b"foo/bar/baz");
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..21a188d4e1d697b8621c2acec3e5c08049b55135
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"9f25ae61099d8f3fee8b483df0bd4ecccf4b2731897aad40d50eca1b641fe6db"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..15db51ff2e5561a4266582c34ca7329ab2669b61
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,34 @@@
++# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
++#
++# When uploading crates to the registry Cargo will automatically
++# "normalize" Cargo.toml files for maximal compatibility
++# with all versions of Cargo and also rewrite `path` dependencies
++# to registry (e.g. crates.io) dependencies
++#
++# If you believe there's an error in this file please file an
++# issue against the rust-lang/cargo repository. If you're
++# editing this file be aware that the upstream Cargo.toml
++# will likely look very different (and much more reasonable)
++
++[package]
++name = "home"
++version = "0.3.0"
++authors = ["Brian Anderson <andersrb@gmail.com>"]
++description = "Shared definitions of home directories"
++documentation = "https://docs.rs/home"
++license = "MIT/Apache-2.0"
++repository = "https://github.com/brson/home"
++[target."cfg(windows)".dependencies.winapi]
++version = "0.2.8"
++
++[target."cfg(windows)".dependencies.kernel32-sys]
++version = "0.2.1"
++
++[target."cfg(windows)".dependencies.scopeguard]
++version = "0.1.2"
++
++[target."cfg(windows)".dependencies.userenv-sys]
++version = "0.2.0"
++
++[target."cfg(windows)".dependencies.advapi32-sys]
++version = "0.2.0"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2ff22423e38d6cb17ecc8ebb41d1b640f0f91ac0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++Canonical definitions of `home_dir`, `cargo_home`, and `rustup_home`.
++
++This provides the definition of `home_dir` used by Cargo and rustup,
++as well functions to find the correct value of `CARGO_HOME` and
++`RUSTUP_HOME`.
++
++The definition of `home_dir` provided by the standard library is
++incorrect because it considers the `HOME` environment variable on
++Windows. This causes surprising situations where a Rust program will
++behave differently depending on whether it is run under a Unix
++emulation environment like Cygwin or MinGW. Neither Cargo nor rustup
++use the standard libraries definition - they use the definition here.
++
++This crate further provides two functions, `cargo_home` and
++`rustup_home`, which are the canonical way to determine the location
++that Cargo and rustup store their data.
++
++See [rust-lang/rust#43321].
++
++[rust-lang/rust#43321]: https://github.com/rust-lang/rust/issues/43321
++
++## License
++
++MIT/Apache-2.0
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0917964b0509060081d80877360b6a149f337a43
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,302 @@@
++/// Canonical definitions of `home_dir`, `cargo_home`, and `rustup_home`.
++///
++/// This provides the definition of `home_dir` used by Cargo and
++/// rustup, as well functions to find the correct value of
++/// `CARGO_HOME` and `RUSTUP_HOME`.
++///
++/// The definition of `home_dir` provided by the standard library is
++/// incorrect because it considers the `HOME` environment variable on
++/// Windows. This causes surprising situations where a Rust program
++/// will behave differently depending on whether it is run under a
++/// Unix emulation environment like Cygwin or MinGW. Neither Cargo nor
++/// rustup use the standard libraries definition - they use the
++/// definition here.
++///
++/// This crate further provides two functions, `cargo_home` and
++/// `rustup_home`, which are the canonical way to determine the
++/// location that Cargo and rustup store their data.
++///
++/// See [rust-lang/rust#43321].
++///
++/// [rust-lang/rust#43321]: https://github.com/rust-lang/rust/issues/43321
++
++#[cfg(windows)]
++extern crate scopeguard;
++#[cfg(windows)]
++extern crate winapi;
++#[cfg(windows)]
++extern crate kernel32;
++#[cfg(windows)]
++extern crate advapi32;
++#[cfg(windows)]
++extern crate userenv;
++
++#[cfg(windows)]
++use winapi::DWORD;
++use std::path::{PathBuf, Path};
++use std::io;
++use std::env;
++
++/// Returns the path of the current user's home directory if known.
++///
++/// # Unix
++///
++/// Returns the value of the 'HOME' environment variable if it is set
++/// and not equal to the empty string. Otherwise, it tries to determine the
++/// home directory by invoking the `getpwuid_r` function on the UID of the
++/// current user.
++///
++/// # Windows
++///
++/// Returns the value of the 'USERPROFILE' environment variable if it
++/// is set and not equal to the empty string. If both do not exist,
++/// [`GetUserProfileDirectory`][msdn] is used to return the
++/// appropriate path.
++///
++/// [msdn]: https://msdn.microsoft.com/en-us/library/windows/desktop/bb762280(v=vs.85).aspx
++///
++/// # Examples
++///
++/// ```
++/// use std::env;
++///
++/// match env::home_dir() {
++///     Some(path) => println!("{}", path.display()),
++///     None => println!("Impossible to get your home dir!"),
++/// }
++/// ```
++pub fn home_dir() -> Option<PathBuf> {
++    home_dir_()
++}
++
++#[cfg(windows)]
++fn home_dir_() -> Option<PathBuf> {
++    use std::ptr;
++    use kernel32::{GetCurrentProcess, GetLastError, CloseHandle};
++    use advapi32::OpenProcessToken;
++    use userenv::GetUserProfileDirectoryW;
++    use winapi::ERROR_INSUFFICIENT_BUFFER;
++    use winapi::winnt::TOKEN_READ;
++    use scopeguard;
++
++    ::std::env::var_os("USERPROFILE").map(PathBuf::from).or_else(|| unsafe {
++        let me = GetCurrentProcess();
++        let mut token = ptr::null_mut();
++        if OpenProcessToken(me, TOKEN_READ, &mut token) == 0 {
++            return None;
++        }
++        let _g = scopeguard::guard(token, |h| { let _ = CloseHandle(*h); });
++        fill_utf16_buf(|buf, mut sz| {
++            match GetUserProfileDirectoryW(token, buf, &mut sz) {
++                0 if GetLastError() != ERROR_INSUFFICIENT_BUFFER => 0,
++                0 => sz,
++                _ => sz - 1, // sz includes the null terminator
++            }
++        }, os2path).ok()
++    })
++}
++
++#[cfg(windows)]
++fn os2path(s: &[u16]) -> PathBuf {
++    use std::ffi::OsString;
++    use std::os::windows::ffi::OsStringExt;
++    PathBuf::from(OsString::from_wide(s))
++}
++
++#[cfg(windows)]
++fn fill_utf16_buf<F1, F2, T>(mut f1: F1, f2: F2) -> io::Result<T>
++    where F1: FnMut(*mut u16, DWORD) -> DWORD,
++          F2: FnOnce(&[u16]) -> T
++{
++    use kernel32::{GetLastError, SetLastError};
++    use winapi::{ERROR_INSUFFICIENT_BUFFER};
++
++    // Start off with a stack buf but then spill over to the heap if we end up
++    // needing more space.
++    let mut stack_buf = [0u16; 512];
++    let mut heap_buf = Vec::new();
++    unsafe {
++        let mut n = stack_buf.len();
++        loop {
++            let buf = if n <= stack_buf.len() {
++                &mut stack_buf[..]
++            } else {
++                let extra = n - heap_buf.len();
++                heap_buf.reserve(extra);
++                heap_buf.set_len(n);
++                &mut heap_buf[..]
++            };
++
++            // This function is typically called on windows API functions which
++            // will return the correct length of the string, but these functions
++            // also return the `0` on error. In some cases, however, the
++            // returned "correct length" may actually be 0!
++            //
++            // To handle this case we call `SetLastError` to reset it to 0 and
++            // then check it again if we get the "0 error value". If the "last
++            // error" is still 0 then we interpret it as a 0 length buffer and
++            // not an actual error.
++            SetLastError(0);
++            let k = match f1(buf.as_mut_ptr(), n as DWORD) {
++                0 if GetLastError() == 0 => 0,
++                0 => return Err(io::Error::last_os_error()),
++                n => n,
++            } as usize;
++            if k == n && GetLastError() == ERROR_INSUFFICIENT_BUFFER {
++                n *= 2;
++            } else if k >= n {
++                n = k;
++            } else {
++                return Ok(f2(&buf[..k]))
++            }
++        }
++    }
++}
++
++#[cfg(unix)]
++fn home_dir_() -> Option<PathBuf> {
++    ::std::env::home_dir()
++}
++
++/// Returns the storage directory used by Cargo, often knowns as
++/// `.cargo` or `CARGO_HOME`.
++///
++/// It returns one of the following values, in this order of
++/// preference:
++///
++/// - The value of the `CARGO_HOME` environment variable, if it is
++///   an absolute path.
++/// - The value of the current working directory joined with the value
++///   of the `CARGO_HOME` environment variable, if `CARGO_HOME` is a
++///   relative directory.
++/// - The `.cargo` directory in the user's home directory, as reported
++///   by the `home_dir` function.
++///
++/// # Errors
++///
++/// This function fails if it fails to retrieve the current directory,
++/// or if the home directory cannot be determined.
++pub fn cargo_home() -> io::Result<PathBuf> {
++    let cwd = env::current_dir()?;
++    cargo_home_with_cwd(&cwd)
++}
++
++pub fn cargo_home_with_cwd(cwd: &Path) -> io::Result<PathBuf> {
++    let env_var = env::var_os("CARGO_HOME");
++
++    // NB: During the multirust-rs -> rustup transition the install
++    // dir changed from ~/.multirust/bin to ~/.cargo/bin. Because
++    // multirust used to explicitly set CARGO_HOME it's possible to
++    // get here when e.g. installing under `cargo run` and decide to
++    // install to the wrong place. This check is to make the
++    // multirust-rs to rustup upgrade seamless.
++    let env_var = if let Some(v) = env_var {
++       let vv = v.to_string_lossy().to_string();
++       if vv.contains(".multirust/cargo") ||
++            vv.contains(r".multirust\cargo") ||
++            vv.trim().is_empty() {
++           None
++       } else {
++           Some(v)
++       }
++    } else {
++        None
++    };
++
++    let env_cargo_home = env_var.map(|home| cwd.join(home));
++    let home_dir = home_dir()
++        .ok_or(io::Error::new(io::ErrorKind::Other, "couldn't find home dir"));
++    let user_home = home_dir.map(|p| p.join(".cargo"));
++
++    // Compatibility with old cargo that used the std definition of home_dir
++    let compat_home_dir = ::std::env::home_dir();
++    let compat_user_home = compat_home_dir.map(|p| p.join(".cargo"));
++    
++    if let Some(p) = env_cargo_home {
++        Ok(p)
++    } else {
++        if let Some(d) = compat_user_home {
++            if d.exists() {
++                Ok(d)
++            } else {
++                user_home
++            }                
++        } else {
++            user_home
++        }
++    }
++}
++
++/// Returns the storage directory used by rustup, often knowns as
++/// `.rustup` or `RUSTUP_HOME`.
++///
++/// It returns one of the following values, in this order of
++/// preference:
++///
++/// - The value of the `RUSTUP_HOME` environment variable, if it is
++///   an absolute path.
++/// - The value of the current working directory joined with the value
++///   of the `RUSTUP_HOME` environment variable, if `RUSTUP_HOME` is a
++///   relative directory.
++/// - The `.rustup` directory in the user's home directory, as reported
++///   by the `home_dir` function.
++///
++/// As a matter of backwards compatibility, this function _may_ return
++/// the `.multirust` directory in the user's home directory, only if
++/// it determines that the user is running an old version of rustup
++/// where that is necessary.
++///
++/// # Errors
++///
++/// This function fails if it fails to retrieve the current directory,
++/// or if the home directory cannot be determined.
++pub fn rustup_home() -> io::Result<PathBuf> {
++    let cwd = env::current_dir()?;
++    rustup_home_with_cwd(&cwd)
++}
++
++pub fn rustup_home_with_cwd(cwd: &Path) -> io::Result<PathBuf> {
++    let env_var = env::var_os("RUSTUP_HOME");
++    let env_rustup_home = env_var.map(|home| cwd.join(home));
++    let home_dir = home_dir()
++        .ok_or(io::Error::new(io::ErrorKind::Other, "couldn't find home dir"));
++
++    let user_home = if use_rustup_dir() {
++        home_dir.map(|d| d.join(".rustup"))
++    } else {
++        home_dir.map(|d| d.join(".multirust"))
++    };
++
++    if let Some(p) = env_rustup_home {
++        Ok(p)
++    } else {
++        user_home
++    }
++}
++
++fn use_rustup_dir() -> bool {
++    fn rustup_dir() -> Option<PathBuf> {
++        home_dir().map(|p| p.join(".rustup"))
++    }
++
++    fn multirust_dir() -> Option<PathBuf> {
++        home_dir().map(|p| p.join(".multirust"))
++    }
++
++    fn rustup_dir_exists() -> bool {
++        rustup_dir().map(|p| p.exists()).unwrap_or(false)
++    }
++
++    fn multirust_dir_exists() -> bool {
++        multirust_dir().map(|p| p.exists()).unwrap_or(false)
++    }
++
++    fn rustup_old_version_exists() -> bool {
++        rustup_dir()
++            .map(|p| p.join("rustup-version").exists())
++            .unwrap_or(false)
++    }
++
++    !rustup_old_version_exists()
++        && (rustup_dir_exists() || !multirust_dir_exists())
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..195950967ee82f9ecb6b9654473678b024637c48
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8405be06d27375e9dc6accc916704f4f907746e3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,27 @@@
++[package]
++name = "idna"
++version = "0.1.4"
++authors = ["The rust-url developers"]
++description = "IDNA (Internationalizing Domain Names in Applications) and Punycode."
++repository = "https://github.com/servo/rust-url/"
++license = "MIT/Apache-2.0"
++
++[lib]
++doctest = false
++test = false
++
++[[test]]
++name = "tests"
++harness = false
++
++[[test]]
++name = "unit"
++
++[dev-dependencies]
++rustc-test = "0.2"
++rustc-serialize = "0.3"
++
++[dependencies]
++unicode-bidi = "0.3"
++unicode-normalization = "0.1.5"
++matches = "0.1"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16fe87b06e802f094b3fbb0894b137bca2b16ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++                              Apache License
++                        Version 2.0, January 2004
++                     http://www.apache.org/licenses/
++
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++1. Definitions.
++
++   "License" shall mean the terms and conditions for use, reproduction,
++   and distribution as defined by Sections 1 through 9 of this document.
++
++   "Licensor" shall mean the copyright owner or entity authorized by
++   the copyright owner that is granting the License.
++
++   "Legal Entity" shall mean the union of the acting entity and all
++   other entities that control, are controlled by, or are under common
++   control with that entity. For the purposes of this definition,
++   "control" means (i) the power, direct or indirect, to cause the
++   direction or management of such entity, whether by contract or
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the
++   outstanding shares, or (iii) beneficial ownership of such entity.
++
++   "You" (or "Your") shall mean an individual or Legal Entity
++   exercising permissions granted by this License.
++
++   "Source" form shall mean the preferred form for making modifications,
++   including but not limited to software source code, documentation
++   source, and configuration files.
++
++   "Object" form shall mean any form resulting from mechanical
++   transformation or translation of a Source form, including but
++   not limited to compiled object code, generated documentation,
++   and conversions to other media types.
++
++   "Work" shall mean the work of authorship, whether in Source or
++   Object form, made available under the License, as indicated by a
++   copyright notice that is included in or attached to the work
++   (an example is provided in the Appendix below).
++
++   "Derivative Works" shall mean any work, whether in Source or Object
++   form, that is based on (or derived from) the Work and for which the
++   editorial revisions, annotations, elaborations, or other modifications
++   represent, as a whole, an original work of authorship. For the purposes
++   of this License, Derivative Works shall not include works that remain
++   separable from, or merely link (or bind by name) to the interfaces of,
++   the Work and Derivative Works thereof.
++
++   "Contribution" shall mean any work of authorship, including
++   the original version of the Work and any modifications or additions
++   to that Work or Derivative Works thereof, that is intentionally
++   submitted to Licensor for inclusion in the Work by the copyright owner
++   or by an individual or Legal Entity authorized to submit on behalf of
++   the copyright owner. For the purposes of this definition, "submitted"
++   means any form of electronic, verbal, or written communication sent
++   to the Licensor or its representatives, including but not limited to
++   communication on electronic mailing lists, source code control systems,
++   and issue tracking systems that are managed by, or on behalf of, the
++   Licensor for the purpose of discussing and improving the Work, but
++   excluding communication that is conspicuously marked or otherwise
++   designated in writing by the copyright owner as "Not a Contribution."
++
++   "Contributor" shall mean Licensor and any individual or Legal Entity
++   on behalf of whom a Contribution has been received by Licensor and
++   subsequently incorporated within the Work.
++
++2. Grant of Copyright License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   copyright license to reproduce, prepare Derivative Works of,
++   publicly display, publicly perform, sublicense, and distribute the
++   Work and such Derivative Works in Source or Object form.
++
++3. Grant of Patent License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   (except as stated in this section) patent license to make, have made,
++   use, offer to sell, sell, import, and otherwise transfer the Work,
++   where such license applies only to those patent claims licensable
++   by such Contributor that are necessarily infringed by their
++   Contribution(s) alone or by combination of their Contribution(s)
++   with the Work to which such Contribution(s) was submitted. If You
++   institute patent litigation against any entity (including a
++   cross-claim or counterclaim in a lawsuit) alleging that the Work
++   or a Contribution incorporated within the Work constitutes direct
++   or contributory patent infringement, then any patent licenses
++   granted to You under this License for that Work shall terminate
++   as of the date such litigation is filed.
++
++4. Redistribution. You may reproduce and distribute copies of the
++   Work or Derivative Works thereof in any medium, with or without
++   modifications, and in Source or Object form, provided that You
++   meet the following conditions:
++
++   (a) You must give any other recipients of the Work or
++       Derivative Works a copy of this License; and
++
++   (b) You must cause any modified files to carry prominent notices
++       stating that You changed the files; and
++
++   (c) You must retain, in the Source form of any Derivative Works
++       that You distribute, all copyright, patent, trademark, and
++       attribution notices from the Source form of the Work,
++       excluding those notices that do not pertain to any part of
++       the Derivative Works; and
++
++   (d) If the Work includes a "NOTICE" text file as part of its
++       distribution, then any Derivative Works that You distribute must
++       include a readable copy of the attribution notices contained
++       within such NOTICE file, excluding those notices that do not
++       pertain to any part of the Derivative Works, in at least one
++       of the following places: within a NOTICE text file distributed
++       as part of the Derivative Works; within the Source form or
++       documentation, if provided along with the Derivative Works; or,
++       within a display generated by the Derivative Works, if and
++       wherever such third-party notices normally appear. The contents
++       of the NOTICE file are for informational purposes only and
++       do not modify the License. You may add Your own attribution
++       notices within Derivative Works that You distribute, alongside
++       or as an addendum to the NOTICE text from the Work, provided
++       that such additional attribution notices cannot be construed
++       as modifying the License.
++
++   You may add Your own copyright statement to Your modifications and
++   may provide additional or different license terms and conditions
++   for use, reproduction, or distribution of Your modifications, or
++   for any such Derivative Works as a whole, provided Your use,
++   reproduction, and distribution of the Work otherwise complies with
++   the conditions stated in this License.
++
++5. Submission of Contributions. Unless You explicitly state otherwise,
++   any Contribution intentionally submitted for inclusion in the Work
++   by You to the Licensor shall be under the terms and conditions of
++   this License, without any additional terms or conditions.
++   Notwithstanding the above, nothing herein shall supersede or modify
++   the terms of any separate license agreement you may have executed
++   with Licensor regarding such Contributions.
++
++6. Trademarks. This License does not grant permission to use the trade
++   names, trademarks, service marks, or product names of the Licensor,
++   except as required for reasonable and customary use in describing the
++   origin of the Work and reproducing the content of the NOTICE file.
++
++7. Disclaimer of Warranty. Unless required by applicable law or
++   agreed to in writing, Licensor provides the Work (and each
++   Contributor provides its Contributions) on an "AS IS" BASIS,
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++   implied, including, without limitation, any warranties or conditions
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++   PARTICULAR PURPOSE. You are solely responsible for determining the
++   appropriateness of using or redistributing the Work and assume any
++   risks associated with Your exercise of permissions under this License.
++
++8. Limitation of Liability. In no event and under no legal theory,
++   whether in tort (including negligence), contract, or otherwise,
++   unless required by applicable law (such as deliberate and grossly
++   negligent acts) or agreed to in writing, shall any Contributor be
++   liable to You for damages, including any direct, indirect, special,
++   incidental, or consequential damages of any character arising as a
++   result of this License or out of the use or inability to use the
++   Work (including but not limited to damages for loss of goodwill,
++   work stoppage, computer failure or malfunction, or any and all
++   other commercial damages or losses), even if such Contributor
++   has been advised of the possibility of such damages.
++
++9. Accepting Warranty or Additional Liability. While redistributing
++   the Work or Derivative Works thereof, You may choose to offer,
++   and charge a fee for, acceptance of support, warranty, indemnity,
++   or other liability obligations and/or rights consistent with this
++   License. However, in accepting such obligations, You may act only
++   on Your own behalf and on Your sole responsibility, not on behalf
++   of any other Contributor, and only if You agree to indemnify,
++   defend, and hold each Contributor harmless for any liability
++   incurred by, or claims asserted against, such Contributor by reason
++   of your accepting any such warranty or additional liability.
++
++END OF TERMS AND CONDITIONS
++
++APPENDIX: How to apply the Apache License to your work.
++
++   To apply the Apache License to your work, attach the following
++   boilerplate notice, with the fields enclosed by brackets "[]"
++   replaced with your own identifying information. (Don't include
++   the brackets!)  The text should be enclosed in the appropriate
++   comment syntax for the file format. We also recommend that a
++   file or class name and description of purpose be included on the
++   same "printed page" as the copyright notice for easier
++   identification within third-party archives.
++
++Copyright [yyyy] [name of copyright owner]
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++      http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..24de6b418eaff2dd4483d3727fd11268eab2f9f7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2013-2016 The rust-url developers
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..295606447fda9e01c2f37d735aada982a028c0aa
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,8405 @@@
++# IdnaMappingTable-10.0.0.txt\r
++# Date: 2017-02-23, 14:18:32 GMT\r
++# © 2017 Unicode®, Inc.\r
++# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.\r
++# For terms of use, see http://www.unicode.org/terms_of_use.html\r
++#\r
++# Unicode IDNA Compatible Preprocessing (UTS #46)\r
++# For documentation, see http://www.unicode.org/reports/tr46/\r
++\r
++0000..002C    ; disallowed_STD3_valid                  # 1.1  <control-0000>..COMMA\r
++002D..002E    ; valid                                  # 1.1  HYPHEN-MINUS..FULL STOP\r
++002F          ; disallowed_STD3_valid                  # 1.1  SOLIDUS\r
++0030..0039    ; valid                                  # 1.1  DIGIT ZERO..DIGIT NINE\r
++003A..0040    ; disallowed_STD3_valid                  # 1.1  COLON..COMMERCIAL AT\r
++0041          ; mapped                 ; 0061          # 1.1  LATIN CAPITAL LETTER A\r
++0042          ; mapped                 ; 0062          # 1.1  LATIN CAPITAL LETTER B\r
++0043          ; mapped                 ; 0063          # 1.1  LATIN CAPITAL LETTER C\r
++0044          ; mapped                 ; 0064          # 1.1  LATIN CAPITAL LETTER D\r
++0045          ; mapped                 ; 0065          # 1.1  LATIN CAPITAL LETTER E\r
++0046          ; mapped                 ; 0066          # 1.1  LATIN CAPITAL LETTER F\r
++0047          ; mapped                 ; 0067          # 1.1  LATIN CAPITAL LETTER G\r
++0048          ; mapped                 ; 0068          # 1.1  LATIN CAPITAL LETTER H\r
++0049          ; mapped                 ; 0069          # 1.1  LATIN CAPITAL LETTER I\r
++004A          ; mapped                 ; 006A          # 1.1  LATIN CAPITAL LETTER J\r
++004B          ; mapped                 ; 006B          # 1.1  LATIN CAPITAL LETTER K\r
++004C          ; mapped                 ; 006C          # 1.1  LATIN CAPITAL LETTER L\r
++004D          ; mapped                 ; 006D          # 1.1  LATIN CAPITAL LETTER M\r
++004E          ; mapped                 ; 006E          # 1.1  LATIN CAPITAL LETTER N\r
++004F          ; mapped                 ; 006F          # 1.1  LATIN CAPITAL LETTER O\r
++0050          ; mapped                 ; 0070          # 1.1  LATIN CAPITAL LETTER P\r
++0051          ; mapped                 ; 0071          # 1.1  LATIN CAPITAL LETTER Q\r
++0052          ; mapped                 ; 0072          # 1.1  LATIN CAPITAL LETTER R\r
++0053          ; mapped                 ; 0073          # 1.1  LATIN CAPITAL LETTER S\r
++0054          ; mapped                 ; 0074          # 1.1  LATIN CAPITAL LETTER T\r
++0055          ; mapped                 ; 0075          # 1.1  LATIN CAPITAL LETTER U\r
++0056          ; mapped                 ; 0076          # 1.1  LATIN CAPITAL LETTER V\r
++0057          ; mapped                 ; 0077          # 1.1  LATIN CAPITAL LETTER W\r
++0058          ; mapped                 ; 0078          # 1.1  LATIN CAPITAL LETTER X\r
++0059          ; mapped                 ; 0079          # 1.1  LATIN CAPITAL LETTER Y\r
++005A          ; mapped                 ; 007A          # 1.1  LATIN CAPITAL LETTER Z\r
++005B..0060    ; disallowed_STD3_valid                  # 1.1  LEFT SQUARE BRACKET..GRAVE ACCENT\r
++0061..007A    ; valid                                  # 1.1  LATIN SMALL LETTER A..LATIN SMALL LETTER Z\r
++007B..007F    ; disallowed_STD3_valid                  # 1.1  LEFT CURLY BRACKET..<control-007F>\r
++0080..009F    ; disallowed                             # 1.1  <control-0080>..<control-009F>\r
++00A0          ; disallowed_STD3_mapped ; 0020          # 1.1  NO-BREAK SPACE\r
++00A1..00A7    ; valid                  ;      ; NV8    # 1.1  INVERTED EXCLAMATION MARK..SECTION SIGN\r
++00A8          ; disallowed_STD3_mapped ; 0020 0308     # 1.1  DIAERESIS\r
++00A9          ; valid                  ;      ; NV8    # 1.1  COPYRIGHT SIGN\r
++00AA          ; mapped                 ; 0061          # 1.1  FEMININE ORDINAL INDICATOR\r
++00AB..00AC    ; valid                  ;      ; NV8    # 1.1  LEFT-POINTING DOUBLE ANGLE QUOTATION MARK..NOT SIGN\r
++00AD          ; ignored                                # 1.1  SOFT HYPHEN\r
++00AE          ; valid                  ;      ; NV8    # 1.1  REGISTERED SIGN\r
++00AF          ; disallowed_STD3_mapped ; 0020 0304     # 1.1  MACRON\r
++00B0..00B1    ; valid                  ;      ; NV8    # 1.1  DEGREE SIGN..PLUS-MINUS SIGN\r
++00B2          ; mapped                 ; 0032          # 1.1  SUPERSCRIPT TWO\r
++00B3          ; mapped                 ; 0033          # 1.1  SUPERSCRIPT THREE\r
++00B4          ; disallowed_STD3_mapped ; 0020 0301     # 1.1  ACUTE ACCENT\r
++00B5          ; mapped                 ; 03BC          # 1.1  MICRO SIGN\r
++00B6          ; valid                  ;      ; NV8    # 1.1  PILCROW SIGN\r
++00B7          ; valid                                  # 1.1  MIDDLE DOT\r
++00B8          ; disallowed_STD3_mapped ; 0020 0327     # 1.1  CEDILLA\r
++00B9          ; mapped                 ; 0031          # 1.1  SUPERSCRIPT ONE\r
++00BA          ; mapped                 ; 006F          # 1.1  MASCULINE ORDINAL INDICATOR\r
++00BB          ; valid                  ;      ; NV8    # 1.1  RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK\r
++00BC          ; mapped                 ; 0031 2044 0034 #1.1  VULGAR FRACTION ONE QUARTER\r
++00BD          ; mapped                 ; 0031 2044 0032 #1.1  VULGAR FRACTION ONE HALF\r
++00BE          ; mapped                 ; 0033 2044 0034 #1.1  VULGAR FRACTION THREE QUARTERS\r
++00BF          ; valid                  ;      ; NV8    # 1.1  INVERTED QUESTION MARK\r
++00C0          ; mapped                 ; 00E0          # 1.1  LATIN CAPITAL LETTER A WITH GRAVE\r
++00C1          ; mapped                 ; 00E1          # 1.1  LATIN CAPITAL LETTER A WITH ACUTE\r
++00C2          ; mapped                 ; 00E2          # 1.1  LATIN CAPITAL LETTER A WITH CIRCUMFLEX\r
++00C3          ; mapped                 ; 00E3          # 1.1  LATIN CAPITAL LETTER A WITH TILDE\r
++00C4          ; mapped                 ; 00E4          # 1.1  LATIN CAPITAL LETTER A WITH DIAERESIS\r
++00C5          ; mapped                 ; 00E5          # 1.1  LATIN CAPITAL LETTER A WITH RING ABOVE\r
++00C6          ; mapped                 ; 00E6          # 1.1  LATIN CAPITAL LETTER AE\r
++00C7          ; mapped                 ; 00E7          # 1.1  LATIN CAPITAL LETTER C WITH CEDILLA\r
++00C8          ; mapped                 ; 00E8          # 1.1  LATIN CAPITAL LETTER E WITH GRAVE\r
++00C9          ; mapped                 ; 00E9          # 1.1  LATIN CAPITAL LETTER E WITH ACUTE\r
++00CA          ; mapped                 ; 00EA          # 1.1  LATIN CAPITAL LETTER E WITH CIRCUMFLEX\r
++00CB          ; mapped                 ; 00EB          # 1.1  LATIN CAPITAL LETTER E WITH DIAERESIS\r
++00CC          ; mapped                 ; 00EC          # 1.1  LATIN CAPITAL LETTER I WITH GRAVE\r
++00CD          ; mapped                 ; 00ED          # 1.1  LATIN CAPITAL LETTER I WITH ACUTE\r
++00CE          ; mapped                 ; 00EE          # 1.1  LATIN CAPITAL LETTER I WITH CIRCUMFLEX\r
++00CF          ; mapped                 ; 00EF          # 1.1  LATIN CAPITAL LETTER I WITH DIAERESIS\r
++00D0          ; mapped                 ; 00F0          # 1.1  LATIN CAPITAL LETTER ETH\r
++00D1          ; mapped                 ; 00F1          # 1.1  LATIN CAPITAL LETTER N WITH TILDE\r
++00D2          ; mapped                 ; 00F2          # 1.1  LATIN CAPITAL LETTER O WITH GRAVE\r
++00D3          ; mapped                 ; 00F3          # 1.1  LATIN CAPITAL LETTER O WITH ACUTE\r
++00D4          ; mapped                 ; 00F4          # 1.1  LATIN CAPITAL LETTER O WITH CIRCUMFLEX\r
++00D5          ; mapped                 ; 00F5          # 1.1  LATIN CAPITAL LETTER O WITH TILDE\r
++00D6          ; mapped                 ; 00F6          # 1.1  LATIN CAPITAL LETTER O WITH DIAERESIS\r
++00D7          ; valid                  ;      ; NV8    # 1.1  MULTIPLICATION SIGN\r
++00D8          ; mapped                 ; 00F8          # 1.1  LATIN CAPITAL LETTER O WITH STROKE\r
++00D9          ; mapped                 ; 00F9          # 1.1  LATIN CAPITAL LETTER U WITH GRAVE\r
++00DA          ; mapped                 ; 00FA          # 1.1  LATIN CAPITAL LETTER U WITH ACUTE\r
++00DB          ; mapped                 ; 00FB          # 1.1  LATIN CAPITAL LETTER U WITH CIRCUMFLEX\r
++00DC          ; mapped                 ; 00FC          # 1.1  LATIN CAPITAL LETTER U WITH DIAERESIS\r
++00DD          ; mapped                 ; 00FD          # 1.1  LATIN CAPITAL LETTER Y WITH ACUTE\r
++00DE          ; mapped                 ; 00FE          # 1.1  LATIN CAPITAL LETTER THORN\r
++00DF          ; deviation              ; 0073 0073     # 1.1  LATIN SMALL LETTER SHARP S\r
++00E0..00F6    ; valid                                  # 1.1  LATIN SMALL LETTER A WITH GRAVE..LATIN SMALL LETTER O WITH DIAERESIS\r
++00F7          ; valid                  ;      ; NV8    # 1.1  DIVISION SIGN\r
++00F8..00FF    ; valid                                  # 1.1  LATIN SMALL LETTER O WITH STROKE..LATIN SMALL LETTER Y WITH DIAERESIS\r
++0100          ; mapped                 ; 0101          # 1.1  LATIN CAPITAL LETTER A WITH MACRON\r
++0101          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH MACRON\r
++0102          ; mapped                 ; 0103          # 1.1  LATIN CAPITAL LETTER A WITH BREVE\r
++0103          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH BREVE\r
++0104          ; mapped                 ; 0105          # 1.1  LATIN CAPITAL LETTER A WITH OGONEK\r
++0105          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH OGONEK\r
++0106          ; mapped                 ; 0107          # 1.1  LATIN CAPITAL LETTER C WITH ACUTE\r
++0107          ; valid                                  # 1.1  LATIN SMALL LETTER C WITH ACUTE\r
++0108          ; mapped                 ; 0109          # 1.1  LATIN CAPITAL LETTER C WITH CIRCUMFLEX\r
++0109          ; valid                                  # 1.1  LATIN SMALL LETTER C WITH CIRCUMFLEX\r
++010A          ; mapped                 ; 010B          # 1.1  LATIN CAPITAL LETTER C WITH DOT ABOVE\r
++010B          ; valid                                  # 1.1  LATIN SMALL LETTER C WITH DOT ABOVE\r
++010C          ; mapped                 ; 010D          # 1.1  LATIN CAPITAL LETTER C WITH CARON\r
++010D          ; valid                                  # 1.1  LATIN SMALL LETTER C WITH CARON\r
++010E          ; mapped                 ; 010F          # 1.1  LATIN CAPITAL LETTER D WITH CARON\r
++010F          ; valid                                  # 1.1  LATIN SMALL LETTER D WITH CARON\r
++0110          ; mapped                 ; 0111          # 1.1  LATIN CAPITAL LETTER D WITH STROKE\r
++0111          ; valid                                  # 1.1  LATIN SMALL LETTER D WITH STROKE\r
++0112          ; mapped                 ; 0113          # 1.1  LATIN CAPITAL LETTER E WITH MACRON\r
++0113          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH MACRON\r
++0114          ; mapped                 ; 0115          # 1.1  LATIN CAPITAL LETTER E WITH BREVE\r
++0115          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH BREVE\r
++0116          ; mapped                 ; 0117          # 1.1  LATIN CAPITAL LETTER E WITH DOT ABOVE\r
++0117          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH DOT ABOVE\r
++0118          ; mapped                 ; 0119          # 1.1  LATIN CAPITAL LETTER E WITH OGONEK\r
++0119          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH OGONEK\r
++011A          ; mapped                 ; 011B          # 1.1  LATIN CAPITAL LETTER E WITH CARON\r
++011B          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH CARON\r
++011C          ; mapped                 ; 011D          # 1.1  LATIN CAPITAL LETTER G WITH CIRCUMFLEX\r
++011D          ; valid                                  # 1.1  LATIN SMALL LETTER G WITH CIRCUMFLEX\r
++011E          ; mapped                 ; 011F          # 1.1  LATIN CAPITAL LETTER G WITH BREVE\r
++011F          ; valid                                  # 1.1  LATIN SMALL LETTER G WITH BREVE\r
++0120          ; mapped                 ; 0121          # 1.1  LATIN CAPITAL LETTER G WITH DOT ABOVE\r
++0121          ; valid                                  # 1.1  LATIN SMALL LETTER G WITH DOT ABOVE\r
++0122          ; mapped                 ; 0123          # 1.1  LATIN CAPITAL LETTER G WITH CEDILLA\r
++0123          ; valid                                  # 1.1  LATIN SMALL LETTER G WITH CEDILLA\r
++0124          ; mapped                 ; 0125          # 1.1  LATIN CAPITAL LETTER H WITH CIRCUMFLEX\r
++0125          ; valid                                  # 1.1  LATIN SMALL LETTER H WITH CIRCUMFLEX\r
++0126          ; mapped                 ; 0127          # 1.1  LATIN CAPITAL LETTER H WITH STROKE\r
++0127          ; valid                                  # 1.1  LATIN SMALL LETTER H WITH STROKE\r
++0128          ; mapped                 ; 0129          # 1.1  LATIN CAPITAL LETTER I WITH TILDE\r
++0129          ; valid                                  # 1.1  LATIN SMALL LETTER I WITH TILDE\r
++012A          ; mapped                 ; 012B          # 1.1  LATIN CAPITAL LETTER I WITH MACRON\r
++012B          ; valid                                  # 1.1  LATIN SMALL LETTER I WITH MACRON\r
++012C          ; mapped                 ; 012D          # 1.1  LATIN CAPITAL LETTER I WITH BREVE\r
++012D          ; valid                                  # 1.1  LATIN SMALL LETTER I WITH BREVE\r
++012E          ; mapped                 ; 012F          # 1.1  LATIN CAPITAL LETTER I WITH OGONEK\r
++012F          ; valid                                  # 1.1  LATIN SMALL LETTER I WITH OGONEK\r
++0130          ; mapped                 ; 0069 0307     # 1.1  LATIN CAPITAL LETTER I WITH DOT ABOVE\r
++0131          ; valid                                  # 1.1  LATIN SMALL LETTER DOTLESS I\r
++0132..0133    ; mapped                 ; 0069 006A     # 1.1  LATIN CAPITAL LIGATURE IJ..LATIN SMALL LIGATURE IJ\r
++0134          ; mapped                 ; 0135          # 1.1  LATIN CAPITAL LETTER J WITH CIRCUMFLEX\r
++0135          ; valid                                  # 1.1  LATIN SMALL LETTER J WITH CIRCUMFLEX\r
++0136          ; mapped                 ; 0137          # 1.1  LATIN CAPITAL LETTER K WITH CEDILLA\r
++0137..0138    ; valid                                  # 1.1  LATIN SMALL LETTER K WITH CEDILLA..LATIN SMALL LETTER KRA\r
++0139          ; mapped                 ; 013A          # 1.1  LATIN CAPITAL LETTER L WITH ACUTE\r
++013A          ; valid                                  # 1.1  LATIN SMALL LETTER L WITH ACUTE\r
++013B          ; mapped                 ; 013C          # 1.1  LATIN CAPITAL LETTER L WITH CEDILLA\r
++013C          ; valid                                  # 1.1  LATIN SMALL LETTER L WITH CEDILLA\r
++013D          ; mapped                 ; 013E          # 1.1  LATIN CAPITAL LETTER L WITH CARON\r
++013E          ; valid                                  # 1.1  LATIN SMALL LETTER L WITH CARON\r
++013F..0140    ; mapped                 ; 006C 00B7     # 1.1  LATIN CAPITAL LETTER L WITH MIDDLE DOT..LATIN SMALL LETTER L WITH MIDDLE DOT\r
++0141          ; mapped                 ; 0142          # 1.1  LATIN CAPITAL LETTER L WITH STROKE\r
++0142          ; valid                                  # 1.1  LATIN SMALL LETTER L WITH STROKE\r
++0143          ; mapped                 ; 0144          # 1.1  LATIN CAPITAL LETTER N WITH ACUTE\r
++0144          ; valid                                  # 1.1  LATIN SMALL LETTER N WITH ACUTE\r
++0145          ; mapped                 ; 0146          # 1.1  LATIN CAPITAL LETTER N WITH CEDILLA\r
++0146          ; valid                                  # 1.1  LATIN SMALL LETTER N WITH CEDILLA\r
++0147          ; mapped                 ; 0148          # 1.1  LATIN CAPITAL LETTER N WITH CARON\r
++0148          ; valid                                  # 1.1  LATIN SMALL LETTER N WITH CARON\r
++0149          ; mapped                 ; 02BC 006E     # 1.1  LATIN SMALL LETTER N PRECEDED BY APOSTROPHE\r
++014A          ; mapped                 ; 014B          # 1.1  LATIN CAPITAL LETTER ENG\r
++014B          ; valid                                  # 1.1  LATIN SMALL LETTER ENG\r
++014C          ; mapped                 ; 014D          # 1.1  LATIN CAPITAL LETTER O WITH MACRON\r
++014D          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH MACRON\r
++014E          ; mapped                 ; 014F          # 1.1  LATIN CAPITAL LETTER O WITH BREVE\r
++014F          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH BREVE\r
++0150          ; mapped                 ; 0151          # 1.1  LATIN CAPITAL LETTER O WITH DOUBLE ACUTE\r
++0151          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH DOUBLE ACUTE\r
++0152          ; mapped                 ; 0153          # 1.1  LATIN CAPITAL LIGATURE OE\r
++0153          ; valid                                  # 1.1  LATIN SMALL LIGATURE OE\r
++0154          ; mapped                 ; 0155          # 1.1  LATIN CAPITAL LETTER R WITH ACUTE\r
++0155          ; valid                                  # 1.1  LATIN SMALL LETTER R WITH ACUTE\r
++0156          ; mapped                 ; 0157          # 1.1  LATIN CAPITAL LETTER R WITH CEDILLA\r
++0157          ; valid                                  # 1.1  LATIN SMALL LETTER R WITH CEDILLA\r
++0158          ; mapped                 ; 0159          # 1.1  LATIN CAPITAL LETTER R WITH CARON\r
++0159          ; valid                                  # 1.1  LATIN SMALL LETTER R WITH CARON\r
++015A          ; mapped                 ; 015B          # 1.1  LATIN CAPITAL LETTER S WITH ACUTE\r
++015B          ; valid                                  # 1.1  LATIN SMALL LETTER S WITH ACUTE\r
++015C          ; mapped                 ; 015D          # 1.1  LATIN CAPITAL LETTER S WITH CIRCUMFLEX\r
++015D          ; valid                                  # 1.1  LATIN SMALL LETTER S WITH CIRCUMFLEX\r
++015E          ; mapped                 ; 015F          # 1.1  LATIN CAPITAL LETTER S WITH CEDILLA\r
++015F          ; valid                                  # 1.1  LATIN SMALL LETTER S WITH CEDILLA\r
++0160          ; mapped                 ; 0161          # 1.1  LATIN CAPITAL LETTER S WITH CARON\r
++0161          ; valid                                  # 1.1  LATIN SMALL LETTER S WITH CARON\r
++0162          ; mapped                 ; 0163          # 1.1  LATIN CAPITAL LETTER T WITH CEDILLA\r
++0163          ; valid                                  # 1.1  LATIN SMALL LETTER T WITH CEDILLA\r
++0164          ; mapped                 ; 0165          # 1.1  LATIN CAPITAL LETTER T WITH CARON\r
++0165          ; valid                                  # 1.1  LATIN SMALL LETTER T WITH CARON\r
++0166          ; mapped                 ; 0167          # 1.1  LATIN CAPITAL LETTER T WITH STROKE\r
++0167          ; valid                                  # 1.1  LATIN SMALL LETTER T WITH STROKE\r
++0168          ; mapped                 ; 0169          # 1.1  LATIN CAPITAL LETTER U WITH TILDE\r
++0169          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH TILDE\r
++016A          ; mapped                 ; 016B          # 1.1  LATIN CAPITAL LETTER U WITH MACRON\r
++016B          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH MACRON\r
++016C          ; mapped                 ; 016D          # 1.1  LATIN CAPITAL LETTER U WITH BREVE\r
++016D          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH BREVE\r
++016E          ; mapped                 ; 016F          # 1.1  LATIN CAPITAL LETTER U WITH RING ABOVE\r
++016F          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH RING ABOVE\r
++0170          ; mapped                 ; 0171          # 1.1  LATIN CAPITAL LETTER U WITH DOUBLE ACUTE\r
++0171          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH DOUBLE ACUTE\r
++0172          ; mapped                 ; 0173          # 1.1  LATIN CAPITAL LETTER U WITH OGONEK\r
++0173          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH OGONEK\r
++0174          ; mapped                 ; 0175          # 1.1  LATIN CAPITAL LETTER W WITH CIRCUMFLEX\r
++0175          ; valid                                  # 1.1  LATIN SMALL LETTER W WITH CIRCUMFLEX\r
++0176          ; mapped                 ; 0177          # 1.1  LATIN CAPITAL LETTER Y WITH CIRCUMFLEX\r
++0177          ; valid                                  # 1.1  LATIN SMALL LETTER Y WITH CIRCUMFLEX\r
++0178          ; mapped                 ; 00FF          # 1.1  LATIN CAPITAL LETTER Y WITH DIAERESIS\r
++0179          ; mapped                 ; 017A          # 1.1  LATIN CAPITAL LETTER Z WITH ACUTE\r
++017A          ; valid                                  # 1.1  LATIN SMALL LETTER Z WITH ACUTE\r
++017B          ; mapped                 ; 017C          # 1.1  LATIN CAPITAL LETTER Z WITH DOT ABOVE\r
++017C          ; valid                                  # 1.1  LATIN SMALL LETTER Z WITH DOT ABOVE\r
++017D          ; mapped                 ; 017E          # 1.1  LATIN CAPITAL LETTER Z WITH CARON\r
++017E          ; valid                                  # 1.1  LATIN SMALL LETTER Z WITH CARON\r
++017F          ; mapped                 ; 0073          # 1.1  LATIN SMALL LETTER LONG S\r
++0180          ; valid                                  # 1.1  LATIN SMALL LETTER B WITH STROKE\r
++0181          ; mapped                 ; 0253          # 1.1  LATIN CAPITAL LETTER B WITH HOOK\r
++0182          ; mapped                 ; 0183          # 1.1  LATIN CAPITAL LETTER B WITH TOPBAR\r
++0183          ; valid                                  # 1.1  LATIN SMALL LETTER B WITH TOPBAR\r
++0184          ; mapped                 ; 0185          # 1.1  LATIN CAPITAL LETTER TONE SIX\r
++0185          ; valid                                  # 1.1  LATIN SMALL LETTER TONE SIX\r
++0186          ; mapped                 ; 0254          # 1.1  LATIN CAPITAL LETTER OPEN O\r
++0187          ; mapped                 ; 0188          # 1.1  LATIN CAPITAL LETTER C WITH HOOK\r
++0188          ; valid                                  # 1.1  LATIN SMALL LETTER C WITH HOOK\r
++0189          ; mapped                 ; 0256          # 1.1  LATIN CAPITAL LETTER AFRICAN D\r
++018A          ; mapped                 ; 0257          # 1.1  LATIN CAPITAL LETTER D WITH HOOK\r
++018B          ; mapped                 ; 018C          # 1.1  LATIN CAPITAL LETTER D WITH TOPBAR\r
++018C..018D    ; valid                                  # 1.1  LATIN SMALL LETTER D WITH TOPBAR..LATIN SMALL LETTER TURNED DELTA\r
++018E          ; mapped                 ; 01DD          # 1.1  LATIN CAPITAL LETTER REVERSED E\r
++018F          ; mapped                 ; 0259          # 1.1  LATIN CAPITAL LETTER SCHWA\r
++0190          ; mapped                 ; 025B          # 1.1  LATIN CAPITAL LETTER OPEN E\r
++0191          ; mapped                 ; 0192          # 1.1  LATIN CAPITAL LETTER F WITH HOOK\r
++0192          ; valid                                  # 1.1  LATIN SMALL LETTER F WITH HOOK\r
++0193          ; mapped                 ; 0260          # 1.1  LATIN CAPITAL LETTER G WITH HOOK\r
++0194          ; mapped                 ; 0263          # 1.1  LATIN CAPITAL LETTER GAMMA\r
++0195          ; valid                                  # 1.1  LATIN SMALL LETTER HV\r
++0196          ; mapped                 ; 0269          # 1.1  LATIN CAPITAL LETTER IOTA\r
++0197          ; mapped                 ; 0268          # 1.1  LATIN CAPITAL LETTER I WITH STROKE\r
++0198          ; mapped                 ; 0199          # 1.1  LATIN CAPITAL LETTER K WITH HOOK\r
++0199..019B    ; valid                                  # 1.1  LATIN SMALL LETTER K WITH HOOK..LATIN SMALL LETTER LAMBDA WITH STROKE\r
++019C          ; mapped                 ; 026F          # 1.1  LATIN CAPITAL LETTER TURNED M\r
++019D          ; mapped                 ; 0272          # 1.1  LATIN CAPITAL LETTER N WITH LEFT HOOK\r
++019E          ; valid                                  # 1.1  LATIN SMALL LETTER N WITH LONG RIGHT LEG\r
++019F          ; mapped                 ; 0275          # 1.1  LATIN CAPITAL LETTER O WITH MIDDLE TILDE\r
++01A0          ; mapped                 ; 01A1          # 1.1  LATIN CAPITAL LETTER O WITH HORN\r
++01A1          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH HORN\r
++01A2          ; mapped                 ; 01A3          # 1.1  LATIN CAPITAL LETTER OI\r
++01A3          ; valid                                  # 1.1  LATIN SMALL LETTER OI\r
++01A4          ; mapped                 ; 01A5          # 1.1  LATIN CAPITAL LETTER P WITH HOOK\r
++01A5          ; valid                                  # 1.1  LATIN SMALL LETTER P WITH HOOK\r
++01A6          ; mapped                 ; 0280          # 1.1  LATIN LETTER YR\r
++01A7          ; mapped                 ; 01A8          # 1.1  LATIN CAPITAL LETTER TONE TWO\r
++01A8          ; valid                                  # 1.1  LATIN SMALL LETTER TONE TWO\r
++01A9          ; mapped                 ; 0283          # 1.1  LATIN CAPITAL LETTER ESH\r
++01AA..01AB    ; valid                                  # 1.1  LATIN LETTER REVERSED ESH LOOP..LATIN SMALL LETTER T WITH PALATAL HOOK\r
++01AC          ; mapped                 ; 01AD          # 1.1  LATIN CAPITAL LETTER T WITH HOOK\r
++01AD          ; valid                                  # 1.1  LATIN SMALL LETTER T WITH HOOK\r
++01AE          ; mapped                 ; 0288          # 1.1  LATIN CAPITAL LETTER T WITH RETROFLEX HOOK\r
++01AF          ; mapped                 ; 01B0          # 1.1  LATIN CAPITAL LETTER U WITH HORN\r
++01B0          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH HORN\r
++01B1          ; mapped                 ; 028A          # 1.1  LATIN CAPITAL LETTER UPSILON\r
++01B2          ; mapped                 ; 028B          # 1.1  LATIN CAPITAL LETTER V WITH HOOK\r
++01B3          ; mapped                 ; 01B4          # 1.1  LATIN CAPITAL LETTER Y WITH HOOK\r
++01B4          ; valid                                  # 1.1  LATIN SMALL LETTER Y WITH HOOK\r
++01B5          ; mapped                 ; 01B6          # 1.1  LATIN CAPITAL LETTER Z WITH STROKE\r
++01B6          ; valid                                  # 1.1  LATIN SMALL LETTER Z WITH STROKE\r
++01B7          ; mapped                 ; 0292          # 1.1  LATIN CAPITAL LETTER EZH\r
++01B8          ; mapped                 ; 01B9          # 1.1  LATIN CAPITAL LETTER EZH REVERSED\r
++01B9..01BB    ; valid                                  # 1.1  LATIN SMALL LETTER EZH REVERSED..LATIN LETTER TWO WITH STROKE\r
++01BC          ; mapped                 ; 01BD          # 1.1  LATIN CAPITAL LETTER TONE FIVE\r
++01BD..01C3    ; valid                                  # 1.1  LATIN SMALL LETTER TONE FIVE..LATIN LETTER RETROFLEX CLICK\r
++01C4..01C6    ; mapped                 ; 0064 017E     # 1.1  LATIN CAPITAL LETTER DZ WITH CARON..LATIN SMALL LETTER DZ WITH CARON\r
++01C7..01C9    ; mapped                 ; 006C 006A     # 1.1  LATIN CAPITAL LETTER LJ..LATIN SMALL LETTER LJ\r
++01CA..01CC    ; mapped                 ; 006E 006A     # 1.1  LATIN CAPITAL LETTER NJ..LATIN SMALL LETTER NJ\r
++01CD          ; mapped                 ; 01CE          # 1.1  LATIN CAPITAL LETTER A WITH CARON\r
++01CE          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH CARON\r
++01CF          ; mapped                 ; 01D0          # 1.1  LATIN CAPITAL LETTER I WITH CARON\r
++01D0          ; valid                                  # 1.1  LATIN SMALL LETTER I WITH CARON\r
++01D1          ; mapped                 ; 01D2          # 1.1  LATIN CAPITAL LETTER O WITH CARON\r
++01D2          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH CARON\r
++01D3          ; mapped                 ; 01D4          # 1.1  LATIN CAPITAL LETTER U WITH CARON\r
++01D4          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH CARON\r
++01D5          ; mapped                 ; 01D6          # 1.1  LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON\r
++01D6          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH DIAERESIS AND MACRON\r
++01D7          ; mapped                 ; 01D8          # 1.1  LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE\r
++01D8          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE\r
++01D9          ; mapped                 ; 01DA          # 1.1  LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON\r
++01DA          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH DIAERESIS AND CARON\r
++01DB          ; mapped                 ; 01DC          # 1.1  LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE\r
++01DC..01DD    ; valid                                  # 1.1  LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE..LATIN SMALL LETTER TURNED E\r
++01DE          ; mapped                 ; 01DF          # 1.1  LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON\r
++01DF          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH DIAERESIS AND MACRON\r
++01E0          ; mapped                 ; 01E1          # 1.1  LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON\r
++01E1          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON\r
++01E2          ; mapped                 ; 01E3          # 1.1  LATIN CAPITAL LETTER AE WITH MACRON\r
++01E3          ; valid                                  # 1.1  LATIN SMALL LETTER AE WITH MACRON\r
++01E4          ; mapped                 ; 01E5          # 1.1  LATIN CAPITAL LETTER G WITH STROKE\r
++01E5          ; valid                                  # 1.1  LATIN SMALL LETTER G WITH STROKE\r
++01E6          ; mapped                 ; 01E7          # 1.1  LATIN CAPITAL LETTER G WITH CARON\r
++01E7          ; valid                                  # 1.1  LATIN SMALL LETTER G WITH CARON\r
++01E8          ; mapped                 ; 01E9          # 1.1  LATIN CAPITAL LETTER K WITH CARON\r
++01E9          ; valid                                  # 1.1  LATIN SMALL LETTER K WITH CARON\r
++01EA          ; mapped                 ; 01EB          # 1.1  LATIN CAPITAL LETTER O WITH OGONEK\r
++01EB          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH OGONEK\r
++01EC          ; mapped                 ; 01ED          # 1.1  LATIN CAPITAL LETTER O WITH OGONEK AND MACRON\r
++01ED          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH OGONEK AND MACRON\r
++01EE          ; mapped                 ; 01EF          # 1.1  LATIN CAPITAL LETTER EZH WITH CARON\r
++01EF..01F0    ; valid                                  # 1.1  LATIN SMALL LETTER EZH WITH CARON..LATIN SMALL LETTER J WITH CARON\r
++01F1..01F3    ; mapped                 ; 0064 007A     # 1.1  LATIN CAPITAL LETTER DZ..LATIN SMALL LETTER DZ\r
++01F4          ; mapped                 ; 01F5          # 1.1  LATIN CAPITAL LETTER G WITH ACUTE\r
++01F5          ; valid                                  # 1.1  LATIN SMALL LETTER G WITH ACUTE\r
++01F6          ; mapped                 ; 0195          # 3.0  LATIN CAPITAL LETTER HWAIR\r
++01F7          ; mapped                 ; 01BF          # 3.0  LATIN CAPITAL LETTER WYNN\r
++01F8          ; mapped                 ; 01F9          # 3.0  LATIN CAPITAL LETTER N WITH GRAVE\r
++01F9          ; valid                                  # 3.0  LATIN SMALL LETTER N WITH GRAVE\r
++01FA          ; mapped                 ; 01FB          # 1.1  LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE\r
++01FB          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE\r
++01FC          ; mapped                 ; 01FD          # 1.1  LATIN CAPITAL LETTER AE WITH ACUTE\r
++01FD          ; valid                                  # 1.1  LATIN SMALL LETTER AE WITH ACUTE\r
++01FE          ; mapped                 ; 01FF          # 1.1  LATIN CAPITAL LETTER O WITH STROKE AND ACUTE\r
++01FF          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH STROKE AND ACUTE\r
++0200          ; mapped                 ; 0201          # 1.1  LATIN CAPITAL LETTER A WITH DOUBLE GRAVE\r
++0201          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH DOUBLE GRAVE\r
++0202          ; mapped                 ; 0203          # 1.1  LATIN CAPITAL LETTER A WITH INVERTED BREVE\r
++0203          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH INVERTED BREVE\r
++0204          ; mapped                 ; 0205          # 1.1  LATIN CAPITAL LETTER E WITH DOUBLE GRAVE\r
++0205          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH DOUBLE GRAVE\r
++0206          ; mapped                 ; 0207          # 1.1  LATIN CAPITAL LETTER E WITH INVERTED BREVE\r
++0207          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH INVERTED BREVE\r
++0208          ; mapped                 ; 0209          # 1.1  LATIN CAPITAL LETTER I WITH DOUBLE GRAVE\r
++0209          ; valid                                  # 1.1  LATIN SMALL LETTER I WITH DOUBLE GRAVE\r
++020A          ; mapped                 ; 020B          # 1.1  LATIN CAPITAL LETTER I WITH INVERTED BREVE\r
++020B          ; valid                                  # 1.1  LATIN SMALL LETTER I WITH INVERTED BREVE\r
++020C          ; mapped                 ; 020D          # 1.1  LATIN CAPITAL LETTER O WITH DOUBLE GRAVE\r
++020D          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH DOUBLE GRAVE\r
++020E          ; mapped                 ; 020F          # 1.1  LATIN CAPITAL LETTER O WITH INVERTED BREVE\r
++020F          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH INVERTED BREVE\r
++0210          ; mapped                 ; 0211          # 1.1  LATIN CAPITAL LETTER R WITH DOUBLE GRAVE\r
++0211          ; valid                                  # 1.1  LATIN SMALL LETTER R WITH DOUBLE GRAVE\r
++0212          ; mapped                 ; 0213          # 1.1  LATIN CAPITAL LETTER R WITH INVERTED BREVE\r
++0213          ; valid                                  # 1.1  LATIN SMALL LETTER R WITH INVERTED BREVE\r
++0214          ; mapped                 ; 0215          # 1.1  LATIN CAPITAL LETTER U WITH DOUBLE GRAVE\r
++0215          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH DOUBLE GRAVE\r
++0216          ; mapped                 ; 0217          # 1.1  LATIN CAPITAL LETTER U WITH INVERTED BREVE\r
++0217          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH INVERTED BREVE\r
++0218          ; mapped                 ; 0219          # 3.0  LATIN CAPITAL LETTER S WITH COMMA BELOW\r
++0219          ; valid                                  # 3.0  LATIN SMALL LETTER S WITH COMMA BELOW\r
++021A          ; mapped                 ; 021B          # 3.0  LATIN CAPITAL LETTER T WITH COMMA BELOW\r
++021B          ; valid                                  # 3.0  LATIN SMALL LETTER T WITH COMMA BELOW\r
++021C          ; mapped                 ; 021D          # 3.0  LATIN CAPITAL LETTER YOGH\r
++021D          ; valid                                  # 3.0  LATIN SMALL LETTER YOGH\r
++021E          ; mapped                 ; 021F          # 3.0  LATIN CAPITAL LETTER H WITH CARON\r
++021F          ; valid                                  # 3.0  LATIN SMALL LETTER H WITH CARON\r
++0220          ; mapped                 ; 019E          # 3.2  LATIN CAPITAL LETTER N WITH LONG RIGHT LEG\r
++0221          ; valid                                  # 4.0  LATIN SMALL LETTER D WITH CURL\r
++0222          ; mapped                 ; 0223          # 3.0  LATIN CAPITAL LETTER OU\r
++0223          ; valid                                  # 3.0  LATIN SMALL LETTER OU\r
++0224          ; mapped                 ; 0225          # 3.0  LATIN CAPITAL LETTER Z WITH HOOK\r
++0225          ; valid                                  # 3.0  LATIN SMALL LETTER Z WITH HOOK\r
++0226          ; mapped                 ; 0227          # 3.0  LATIN CAPITAL LETTER A WITH DOT ABOVE\r
++0227          ; valid                                  # 3.0  LATIN SMALL LETTER A WITH DOT ABOVE\r
++0228          ; mapped                 ; 0229          # 3.0  LATIN CAPITAL LETTER E WITH CEDILLA\r
++0229          ; valid                                  # 3.0  LATIN SMALL LETTER E WITH CEDILLA\r
++022A          ; mapped                 ; 022B          # 3.0  LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON\r
++022B          ; valid                                  # 3.0  LATIN SMALL LETTER O WITH DIAERESIS AND MACRON\r
++022C          ; mapped                 ; 022D          # 3.0  LATIN CAPITAL LETTER O WITH TILDE AND MACRON\r
++022D          ; valid                                  # 3.0  LATIN SMALL LETTER O WITH TILDE AND MACRON\r
++022E          ; mapped                 ; 022F          # 3.0  LATIN CAPITAL LETTER O WITH DOT ABOVE\r
++022F          ; valid                                  # 3.0  LATIN SMALL LETTER O WITH DOT ABOVE\r
++0230          ; mapped                 ; 0231          # 3.0  LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON\r
++0231          ; valid                                  # 3.0  LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON\r
++0232          ; mapped                 ; 0233          # 3.0  LATIN CAPITAL LETTER Y WITH MACRON\r
++0233          ; valid                                  # 3.0  LATIN SMALL LETTER Y WITH MACRON\r
++0234..0236    ; valid                                  # 4.0  LATIN SMALL LETTER L WITH CURL..LATIN SMALL LETTER T WITH CURL\r
++0237..0239    ; valid                                  # 4.1  LATIN SMALL LETTER DOTLESS J..LATIN SMALL LETTER QP DIGRAPH\r
++023A          ; mapped                 ; 2C65          # 4.1  LATIN CAPITAL LETTER A WITH STROKE\r
++023B          ; mapped                 ; 023C          # 4.1  LATIN CAPITAL LETTER C WITH STROKE\r
++023C          ; valid                                  # 4.1  LATIN SMALL LETTER C WITH STROKE\r
++023D          ; mapped                 ; 019A          # 4.1  LATIN CAPITAL LETTER L WITH BAR\r
++023E          ; mapped                 ; 2C66          # 4.1  LATIN CAPITAL LETTER T WITH DIAGONAL STROKE\r
++023F..0240    ; valid                                  # 4.1  LATIN SMALL LETTER S WITH SWASH TAIL..LATIN SMALL LETTER Z WITH SWASH TAIL\r
++0241          ; mapped                 ; 0242          # 4.1  LATIN CAPITAL LETTER GLOTTAL STOP\r
++0242          ; valid                                  # 5.0  LATIN SMALL LETTER GLOTTAL STOP\r
++0243          ; mapped                 ; 0180          # 5.0  LATIN CAPITAL LETTER B WITH STROKE\r
++0244          ; mapped                 ; 0289          # 5.0  LATIN CAPITAL LETTER U BAR\r
++0245          ; mapped                 ; 028C          # 5.0  LATIN CAPITAL LETTER TURNED V\r
++0246          ; mapped                 ; 0247          # 5.0  LATIN CAPITAL LETTER E WITH STROKE\r
++0247          ; valid                                  # 5.0  LATIN SMALL LETTER E WITH STROKE\r
++0248          ; mapped                 ; 0249          # 5.0  LATIN CAPITAL LETTER J WITH STROKE\r
++0249          ; valid                                  # 5.0  LATIN SMALL LETTER J WITH STROKE\r
++024A          ; mapped                 ; 024B          # 5.0  LATIN CAPITAL LETTER SMALL Q WITH HOOK TAIL\r
++024B          ; valid                                  # 5.0  LATIN SMALL LETTER Q WITH HOOK TAIL\r
++024C          ; mapped                 ; 024D          # 5.0  LATIN CAPITAL LETTER R WITH STROKE\r
++024D          ; valid                                  # 5.0  LATIN SMALL LETTER R WITH STROKE\r
++024E          ; mapped                 ; 024F          # 5.0  LATIN CAPITAL LETTER Y WITH STROKE\r
++024F          ; valid                                  # 5.0  LATIN SMALL LETTER Y WITH STROKE\r
++0250..02A8    ; valid                                  # 1.1  LATIN SMALL LETTER TURNED A..LATIN SMALL LETTER TC DIGRAPH WITH CURL\r
++02A9..02AD    ; valid                                  # 3.0  LATIN SMALL LETTER FENG DIGRAPH..LATIN LETTER BIDENTAL PERCUSSIVE\r
++02AE..02AF    ; valid                                  # 4.0  LATIN SMALL LETTER TURNED H WITH FISHHOOK..LATIN SMALL LETTER TURNED H WITH FISHHOOK AND TAIL\r
++02B0          ; mapped                 ; 0068          # 1.1  MODIFIER LETTER SMALL H\r
++02B1          ; mapped                 ; 0266          # 1.1  MODIFIER LETTER SMALL H WITH HOOK\r
++02B2          ; mapped                 ; 006A          # 1.1  MODIFIER LETTER SMALL J\r
++02B3          ; mapped                 ; 0072          # 1.1  MODIFIER LETTER SMALL R\r
++02B4          ; mapped                 ; 0279          # 1.1  MODIFIER LETTER SMALL TURNED R\r
++02B5          ; mapped                 ; 027B          # 1.1  MODIFIER LETTER SMALL TURNED R WITH HOOK\r
++02B6          ; mapped                 ; 0281          # 1.1  MODIFIER LETTER SMALL CAPITAL INVERTED R\r
++02B7          ; mapped                 ; 0077          # 1.1  MODIFIER LETTER SMALL W\r
++02B8          ; mapped                 ; 0079          # 1.1  MODIFIER LETTER SMALL Y\r
++02B9..02C1    ; valid                                  # 1.1  MODIFIER LETTER PRIME..MODIFIER LETTER REVERSED GLOTTAL STOP\r
++02C2..02C5    ; valid                  ;      ; NV8    # 1.1  MODIFIER LETTER LEFT ARROWHEAD..MODIFIER LETTER DOWN ARROWHEAD\r
++02C6..02D1    ; valid                                  # 1.1  MODIFIER LETTER CIRCUMFLEX ACCENT..MODIFIER LETTER HALF TRIANGULAR COLON\r
++02D2..02D7    ; valid                  ;      ; NV8    # 1.1  MODIFIER LETTER CENTRED RIGHT HALF RING..MODIFIER LETTER MINUS SIGN\r
++02D8          ; disallowed_STD3_mapped ; 0020 0306     # 1.1  BREVE\r
++02D9          ; disallowed_STD3_mapped ; 0020 0307     # 1.1  DOT ABOVE\r
++02DA          ; disallowed_STD3_mapped ; 0020 030A     # 1.1  RING ABOVE\r
++02DB          ; disallowed_STD3_mapped ; 0020 0328     # 1.1  OGONEK\r
++02DC          ; disallowed_STD3_mapped ; 0020 0303     # 1.1  SMALL TILDE\r
++02DD          ; disallowed_STD3_mapped ; 0020 030B     # 1.1  DOUBLE ACUTE ACCENT\r
++02DE          ; valid                  ;      ; NV8    # 1.1  MODIFIER LETTER RHOTIC HOOK\r
++02DF          ; valid                  ;      ; NV8    # 3.0  MODIFIER LETTER CROSS ACCENT\r
++02E0          ; mapped                 ; 0263          # 1.1  MODIFIER LETTER SMALL GAMMA\r
++02E1          ; mapped                 ; 006C          # 1.1  MODIFIER LETTER SMALL L\r
++02E2          ; mapped                 ; 0073          # 1.1  MODIFIER LETTER SMALL S\r
++02E3          ; mapped                 ; 0078          # 1.1  MODIFIER LETTER SMALL X\r
++02E4          ; mapped                 ; 0295          # 1.1  MODIFIER LETTER SMALL REVERSED GLOTTAL STOP\r
++02E5..02E9    ; valid                  ;      ; NV8    # 1.1  MODIFIER LETTER EXTRA-HIGH TONE BAR..MODIFIER LETTER EXTRA-LOW TONE BAR\r
++02EA..02EB    ; valid                  ;      ; NV8    # 3.0  MODIFIER LETTER YIN DEPARTING TONE MARK..MODIFIER LETTER YANG DEPARTING TONE MARK\r
++02EC          ; valid                                  # 3.0  MODIFIER LETTER VOICING\r
++02ED          ; valid                  ;      ; NV8    # 3.0  MODIFIER LETTER UNASPIRATED\r
++02EE          ; valid                                  # 3.0  MODIFIER LETTER DOUBLE APOSTROPHE\r
++02EF..02FF    ; valid                  ;      ; NV8    # 4.0  MODIFIER LETTER LOW DOWN ARROWHEAD..MODIFIER LETTER LOW LEFT ARROW\r
++0300..033F    ; valid                                  # 1.1  COMBINING GRAVE ACCENT..COMBINING DOUBLE OVERLINE\r
++0340          ; mapped                 ; 0300          # 1.1  COMBINING GRAVE TONE MARK\r
++0341          ; mapped                 ; 0301          # 1.1  COMBINING ACUTE TONE MARK\r
++0342          ; valid                                  # 1.1  COMBINING GREEK PERISPOMENI\r
++0343          ; mapped                 ; 0313          # 1.1  COMBINING GREEK KORONIS\r
++0344          ; mapped                 ; 0308 0301     # 1.1  COMBINING GREEK DIALYTIKA TONOS\r
++0345          ; mapped                 ; 03B9          # 1.1  COMBINING GREEK YPOGEGRAMMENI\r
++0346..034E    ; valid                                  # 3.0  COMBINING BRIDGE ABOVE..COMBINING UPWARDS ARROW BELOW\r
++034F          ; ignored                                # 3.2  COMBINING GRAPHEME JOINER\r
++0350..0357    ; valid                                  # 4.0  COMBINING RIGHT ARROWHEAD ABOVE..COMBINING RIGHT HALF RING ABOVE\r
++0358..035C    ; valid                                  # 4.1  COMBINING DOT ABOVE RIGHT..COMBINING DOUBLE BREVE BELOW\r
++035D..035F    ; valid                                  # 4.0  COMBINING DOUBLE BREVE..COMBINING DOUBLE MACRON BELOW\r
++0360..0361    ; valid                                  # 1.1  COMBINING DOUBLE TILDE..COMBINING DOUBLE INVERTED BREVE\r
++0362          ; valid                                  # 3.0  COMBINING DOUBLE RIGHTWARDS ARROW BELOW\r
++0363..036F    ; valid                                  # 3.2  COMBINING LATIN SMALL LETTER A..COMBINING LATIN SMALL LETTER X\r
++0370          ; mapped                 ; 0371          # 5.1  GREEK CAPITAL LETTER HETA\r
++0371          ; valid                                  # 5.1  GREEK SMALL LETTER HETA\r
++0372          ; mapped                 ; 0373          # 5.1  GREEK CAPITAL LETTER ARCHAIC SAMPI\r
++0373          ; valid                                  # 5.1  GREEK SMALL LETTER ARCHAIC SAMPI\r
++0374          ; mapped                 ; 02B9          # 1.1  GREEK NUMERAL SIGN\r
++0375          ; valid                                  # 1.1  GREEK LOWER NUMERAL SIGN\r
++0376          ; mapped                 ; 0377          # 5.1  GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA\r
++0377          ; valid                                  # 5.1  GREEK SMALL LETTER PAMPHYLIAN DIGAMMA\r
++0378..0379    ; disallowed                             # NA   <reserved-0378>..<reserved-0379>\r
++037A          ; disallowed_STD3_mapped ; 0020 03B9     # 1.1  GREEK YPOGEGRAMMENI\r
++037B..037D    ; valid                                  # 5.0  GREEK SMALL REVERSED LUNATE SIGMA SYMBOL..GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL\r
++037E          ; disallowed_STD3_mapped ; 003B          # 1.1  GREEK QUESTION MARK\r
++037F          ; mapped                 ; 03F3          # 7.0  GREEK CAPITAL LETTER YOT\r
++0380..0383    ; disallowed                             # NA   <reserved-0380>..<reserved-0383>\r
++0384          ; disallowed_STD3_mapped ; 0020 0301     # 1.1  GREEK TONOS\r
++0385          ; disallowed_STD3_mapped ; 0020 0308 0301 #1.1  GREEK DIALYTIKA TONOS\r
++0386          ; mapped                 ; 03AC          # 1.1  GREEK CAPITAL LETTER ALPHA WITH TONOS\r
++0387          ; mapped                 ; 00B7          # 1.1  GREEK ANO TELEIA\r
++0388          ; mapped                 ; 03AD          # 1.1  GREEK CAPITAL LETTER EPSILON WITH TONOS\r
++0389          ; mapped                 ; 03AE          # 1.1  GREEK CAPITAL LETTER ETA WITH TONOS\r
++038A          ; mapped                 ; 03AF          # 1.1  GREEK CAPITAL LETTER IOTA WITH TONOS\r
++038B          ; disallowed                             # NA   <reserved-038B>\r
++038C          ; mapped                 ; 03CC          # 1.1  GREEK CAPITAL LETTER OMICRON WITH TONOS\r
++038D          ; disallowed                             # NA   <reserved-038D>\r
++038E          ; mapped                 ; 03CD          # 1.1  GREEK CAPITAL LETTER UPSILON WITH TONOS\r
++038F          ; mapped                 ; 03CE          # 1.1  GREEK CAPITAL LETTER OMEGA WITH TONOS\r
++0390          ; valid                                  # 1.1  GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS\r
++0391          ; mapped                 ; 03B1          # 1.1  GREEK CAPITAL LETTER ALPHA\r
++0392          ; mapped                 ; 03B2          # 1.1  GREEK CAPITAL LETTER BETA\r
++0393          ; mapped                 ; 03B3          # 1.1  GREEK CAPITAL LETTER GAMMA\r
++0394          ; mapped                 ; 03B4          # 1.1  GREEK CAPITAL LETTER DELTA\r
++0395          ; mapped                 ; 03B5          # 1.1  GREEK CAPITAL LETTER EPSILON\r
++0396          ; mapped                 ; 03B6          # 1.1  GREEK CAPITAL LETTER ZETA\r
++0397          ; mapped                 ; 03B7          # 1.1  GREEK CAPITAL LETTER ETA\r
++0398          ; mapped                 ; 03B8          # 1.1  GREEK CAPITAL LETTER THETA\r
++0399          ; mapped                 ; 03B9          # 1.1  GREEK CAPITAL LETTER IOTA\r
++039A          ; mapped                 ; 03BA          # 1.1  GREEK CAPITAL LETTER KAPPA\r
++039B          ; mapped                 ; 03BB          # 1.1  GREEK CAPITAL LETTER LAMDA\r
++039C          ; mapped                 ; 03BC          # 1.1  GREEK CAPITAL LETTER MU\r
++039D          ; mapped                 ; 03BD          # 1.1  GREEK CAPITAL LETTER NU\r
++039E          ; mapped                 ; 03BE          # 1.1  GREEK CAPITAL LETTER XI\r
++039F          ; mapped                 ; 03BF          # 1.1  GREEK CAPITAL LETTER OMICRON\r
++03A0          ; mapped                 ; 03C0          # 1.1  GREEK CAPITAL LETTER PI\r
++03A1          ; mapped                 ; 03C1          # 1.1  GREEK CAPITAL LETTER RHO\r
++03A2          ; disallowed                             # NA   <reserved-03A2>\r
++03A3          ; mapped                 ; 03C3          # 1.1  GREEK CAPITAL LETTER SIGMA\r
++03A4          ; mapped                 ; 03C4          # 1.1  GREEK CAPITAL LETTER TAU\r
++03A5          ; mapped                 ; 03C5          # 1.1  GREEK CAPITAL LETTER UPSILON\r
++03A6          ; mapped                 ; 03C6          # 1.1  GREEK CAPITAL LETTER PHI\r
++03A7          ; mapped                 ; 03C7          # 1.1  GREEK CAPITAL LETTER CHI\r
++03A8          ; mapped                 ; 03C8          # 1.1  GREEK CAPITAL LETTER PSI\r
++03A9          ; mapped                 ; 03C9          # 1.1  GREEK CAPITAL LETTER OMEGA\r
++03AA          ; mapped                 ; 03CA          # 1.1  GREEK CAPITAL LETTER IOTA WITH DIALYTIKA\r
++03AB          ; mapped                 ; 03CB          # 1.1  GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA\r
++03AC..03C1    ; valid                                  # 1.1  GREEK SMALL LETTER ALPHA WITH TONOS..GREEK SMALL LETTER RHO\r
++03C2          ; deviation              ; 03C3          # 1.1  GREEK SMALL LETTER FINAL SIGMA\r
++03C3..03CE    ; valid                                  # 1.1  GREEK SMALL LETTER SIGMA..GREEK SMALL LETTER OMEGA WITH TONOS\r
++03CF          ; mapped                 ; 03D7          # 5.1  GREEK CAPITAL KAI SYMBOL\r
++03D0          ; mapped                 ; 03B2          # 1.1  GREEK BETA SYMBOL\r
++03D1          ; mapped                 ; 03B8          # 1.1  GREEK THETA SYMBOL\r
++03D2          ; mapped                 ; 03C5          # 1.1  GREEK UPSILON WITH HOOK SYMBOL\r
++03D3          ; mapped                 ; 03CD          # 1.1  GREEK UPSILON WITH ACUTE AND HOOK SYMBOL\r
++03D4          ; mapped                 ; 03CB          # 1.1  GREEK UPSILON WITH DIAERESIS AND HOOK SYMBOL\r
++03D5          ; mapped                 ; 03C6          # 1.1  GREEK PHI SYMBOL\r
++03D6          ; mapped                 ; 03C0          # 1.1  GREEK PI SYMBOL\r
++03D7          ; valid                                  # 3.0  GREEK KAI SYMBOL\r
++03D8          ; mapped                 ; 03D9          # 3.2  GREEK LETTER ARCHAIC KOPPA\r
++03D9          ; valid                                  # 3.2  GREEK SMALL LETTER ARCHAIC KOPPA\r
++03DA          ; mapped                 ; 03DB          # 1.1  GREEK LETTER STIGMA\r
++03DB          ; valid                                  # 3.0  GREEK SMALL LETTER STIGMA\r
++03DC          ; mapped                 ; 03DD          # 1.1  GREEK LETTER DIGAMMA\r
++03DD          ; valid                                  # 3.0  GREEK SMALL LETTER DIGAMMA\r
++03DE          ; mapped                 ; 03DF          # 1.1  GREEK LETTER KOPPA\r
++03DF          ; valid                                  # 3.0  GREEK SMALL LETTER KOPPA\r
++03E0          ; mapped                 ; 03E1          # 1.1  GREEK LETTER SAMPI\r
++03E1          ; valid                                  # 3.0  GREEK SMALL LETTER SAMPI\r
++03E2          ; mapped                 ; 03E3          # 1.1  COPTIC CAPITAL LETTER SHEI\r
++03E3          ; valid                                  # 1.1  COPTIC SMALL LETTER SHEI\r
++03E4          ; mapped                 ; 03E5          # 1.1  COPTIC CAPITAL LETTER FEI\r
++03E5          ; valid                                  # 1.1  COPTIC SMALL LETTER FEI\r
++03E6          ; mapped                 ; 03E7          # 1.1  COPTIC CAPITAL LETTER KHEI\r
++03E7          ; valid                                  # 1.1  COPTIC SMALL LETTER KHEI\r
++03E8          ; mapped                 ; 03E9          # 1.1  COPTIC CAPITAL LETTER HORI\r
++03E9          ; valid                                  # 1.1  COPTIC SMALL LETTER HORI\r
++03EA          ; mapped                 ; 03EB          # 1.1  COPTIC CAPITAL LETTER GANGIA\r
++03EB          ; valid                                  # 1.1  COPTIC SMALL LETTER GANGIA\r
++03EC          ; mapped                 ; 03ED          # 1.1  COPTIC CAPITAL LETTER SHIMA\r
++03ED          ; valid                                  # 1.1  COPTIC SMALL LETTER SHIMA\r
++03EE          ; mapped                 ; 03EF          # 1.1  COPTIC CAPITAL LETTER DEI\r
++03EF          ; valid                                  # 1.1  COPTIC SMALL LETTER DEI\r
++03F0          ; mapped                 ; 03BA          # 1.1  GREEK KAPPA SYMBOL\r
++03F1          ; mapped                 ; 03C1          # 1.1  GREEK RHO SYMBOL\r
++03F2          ; mapped                 ; 03C3          # 1.1  GREEK LUNATE SIGMA SYMBOL\r
++03F3          ; valid                                  # 1.1  GREEK LETTER YOT\r
++03F4          ; mapped                 ; 03B8          # 3.1  GREEK CAPITAL THETA SYMBOL\r
++03F5          ; mapped                 ; 03B5          # 3.1  GREEK LUNATE EPSILON SYMBOL\r
++03F6          ; valid                  ;      ; NV8    # 3.2  GREEK REVERSED LUNATE EPSILON SYMBOL\r
++03F7          ; mapped                 ; 03F8          # 4.0  GREEK CAPITAL LETTER SHO\r
++03F8          ; valid                                  # 4.0  GREEK SMALL LETTER SHO\r
++03F9          ; mapped                 ; 03C3          # 4.0  GREEK CAPITAL LUNATE SIGMA SYMBOL\r
++03FA          ; mapped                 ; 03FB          # 4.0  GREEK CAPITAL LETTER SAN\r
++03FB          ; valid                                  # 4.0  GREEK SMALL LETTER SAN\r
++03FC          ; valid                                  # 4.1  GREEK RHO WITH STROKE SYMBOL\r
++03FD          ; mapped                 ; 037B          # 4.1  GREEK CAPITAL REVERSED LUNATE SIGMA SYMBOL\r
++03FE          ; mapped                 ; 037C          # 4.1  GREEK CAPITAL DOTTED LUNATE SIGMA SYMBOL\r
++03FF          ; mapped                 ; 037D          # 4.1  GREEK CAPITAL REVERSED DOTTED LUNATE SIGMA SYMBOL\r
++0400          ; mapped                 ; 0450          # 3.0  CYRILLIC CAPITAL LETTER IE WITH GRAVE\r
++0401          ; mapped                 ; 0451          # 1.1  CYRILLIC CAPITAL LETTER IO\r
++0402          ; mapped                 ; 0452          # 1.1  CYRILLIC CAPITAL LETTER DJE\r
++0403          ; mapped                 ; 0453          # 1.1  CYRILLIC CAPITAL LETTER GJE\r
++0404          ; mapped                 ; 0454          # 1.1  CYRILLIC CAPITAL LETTER UKRAINIAN IE\r
++0405          ; mapped                 ; 0455          # 1.1  CYRILLIC CAPITAL LETTER DZE\r
++0406          ; mapped                 ; 0456          # 1.1  CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I\r
++0407          ; mapped                 ; 0457          # 1.1  CYRILLIC CAPITAL LETTER YI\r
++0408          ; mapped                 ; 0458          # 1.1  CYRILLIC CAPITAL LETTER JE\r
++0409          ; mapped                 ; 0459          # 1.1  CYRILLIC CAPITAL LETTER LJE\r
++040A          ; mapped                 ; 045A          # 1.1  CYRILLIC CAPITAL LETTER NJE\r
++040B          ; mapped                 ; 045B          # 1.1  CYRILLIC CAPITAL LETTER TSHE\r
++040C          ; mapped                 ; 045C          # 1.1  CYRILLIC CAPITAL LETTER KJE\r
++040D          ; mapped                 ; 045D          # 3.0  CYRILLIC CAPITAL LETTER I WITH GRAVE\r
++040E          ; mapped                 ; 045E          # 1.1  CYRILLIC CAPITAL LETTER SHORT U\r
++040F          ; mapped                 ; 045F          # 1.1  CYRILLIC CAPITAL LETTER DZHE\r
++0410          ; mapped                 ; 0430          # 1.1  CYRILLIC CAPITAL LETTER A\r
++0411          ; mapped                 ; 0431          # 1.1  CYRILLIC CAPITAL LETTER BE\r
++0412          ; mapped                 ; 0432          # 1.1  CYRILLIC CAPITAL LETTER VE\r
++0413          ; mapped                 ; 0433          # 1.1  CYRILLIC CAPITAL LETTER GHE\r
++0414          ; mapped                 ; 0434          # 1.1  CYRILLIC CAPITAL LETTER DE\r
++0415          ; mapped                 ; 0435          # 1.1  CYRILLIC CAPITAL LETTER IE\r
++0416          ; mapped                 ; 0436          # 1.1  CYRILLIC CAPITAL LETTER ZHE\r
++0417          ; mapped                 ; 0437          # 1.1  CYRILLIC CAPITAL LETTER ZE\r
++0418          ; mapped                 ; 0438          # 1.1  CYRILLIC CAPITAL LETTER I\r
++0419          ; mapped                 ; 0439          # 1.1  CYRILLIC CAPITAL LETTER SHORT I\r
++041A          ; mapped                 ; 043A          # 1.1  CYRILLIC CAPITAL LETTER KA\r
++041B          ; mapped                 ; 043B          # 1.1  CYRILLIC CAPITAL LETTER EL\r
++041C          ; mapped                 ; 043C          # 1.1  CYRILLIC CAPITAL LETTER EM\r
++041D          ; mapped                 ; 043D          # 1.1  CYRILLIC CAPITAL LETTER EN\r
++041E          ; mapped                 ; 043E          # 1.1  CYRILLIC CAPITAL LETTER O\r
++041F          ; mapped                 ; 043F          # 1.1  CYRILLIC CAPITAL LETTER PE\r
++0420          ; mapped                 ; 0440          # 1.1  CYRILLIC CAPITAL LETTER ER\r
++0421          ; mapped                 ; 0441          # 1.1  CYRILLIC CAPITAL LETTER ES\r
++0422          ; mapped                 ; 0442          # 1.1  CYRILLIC CAPITAL LETTER TE\r
++0423          ; mapped                 ; 0443          # 1.1  CYRILLIC CAPITAL LETTER U\r
++0424          ; mapped                 ; 0444          # 1.1  CYRILLIC CAPITAL LETTER EF\r
++0425          ; mapped                 ; 0445          # 1.1  CYRILLIC CAPITAL LETTER HA\r
++0426          ; mapped                 ; 0446          # 1.1  CYRILLIC CAPITAL LETTER TSE\r
++0427          ; mapped                 ; 0447          # 1.1  CYRILLIC CAPITAL LETTER CHE\r
++0428          ; mapped                 ; 0448          # 1.1  CYRILLIC CAPITAL LETTER SHA\r
++0429          ; mapped                 ; 0449          # 1.1  CYRILLIC CAPITAL LETTER SHCHA\r
++042A          ; mapped                 ; 044A          # 1.1  CYRILLIC CAPITAL LETTER HARD SIGN\r
++042B          ; mapped                 ; 044B          # 1.1  CYRILLIC CAPITAL LETTER YERU\r
++042C          ; mapped                 ; 044C          # 1.1  CYRILLIC CAPITAL LETTER SOFT SIGN\r
++042D          ; mapped                 ; 044D          # 1.1  CYRILLIC CAPITAL LETTER E\r
++042E          ; mapped                 ; 044E          # 1.1  CYRILLIC CAPITAL LETTER YU\r
++042F          ; mapped                 ; 044F          # 1.1  CYRILLIC CAPITAL LETTER YA\r
++0430..044F    ; valid                                  # 1.1  CYRILLIC SMALL LETTER A..CYRILLIC SMALL LETTER YA\r
++0450          ; valid                                  # 3.0  CYRILLIC SMALL LETTER IE WITH GRAVE\r
++0451..045C    ; valid                                  # 1.1  CYRILLIC SMALL LETTER IO..CYRILLIC SMALL LETTER KJE\r
++045D          ; valid                                  # 3.0  CYRILLIC SMALL LETTER I WITH GRAVE\r
++045E..045F    ; valid                                  # 1.1  CYRILLIC SMALL LETTER SHORT U..CYRILLIC SMALL LETTER DZHE\r
++0460          ; mapped                 ; 0461          # 1.1  CYRILLIC CAPITAL LETTER OMEGA\r
++0461          ; valid                                  # 1.1  CYRILLIC SMALL LETTER OMEGA\r
++0462          ; mapped                 ; 0463          # 1.1  CYRILLIC CAPITAL LETTER YAT\r
++0463          ; valid                                  # 1.1  CYRILLIC SMALL LETTER YAT\r
++0464          ; mapped                 ; 0465          # 1.1  CYRILLIC CAPITAL LETTER IOTIFIED E\r
++0465          ; valid                                  # 1.1  CYRILLIC SMALL LETTER IOTIFIED E\r
++0466          ; mapped                 ; 0467          # 1.1  CYRILLIC CAPITAL LETTER LITTLE YUS\r
++0467          ; valid                                  # 1.1  CYRILLIC SMALL LETTER LITTLE YUS\r
++0468          ; mapped                 ; 0469          # 1.1  CYRILLIC CAPITAL LETTER IOTIFIED LITTLE YUS\r
++0469          ; valid                                  # 1.1  CYRILLIC SMALL LETTER IOTIFIED LITTLE YUS\r
++046A          ; mapped                 ; 046B          # 1.1  CYRILLIC CAPITAL LETTER BIG YUS\r
++046B          ; valid                                  # 1.1  CYRILLIC SMALL LETTER BIG YUS\r
++046C          ; mapped                 ; 046D          # 1.1  CYRILLIC CAPITAL LETTER IOTIFIED BIG YUS\r
++046D          ; valid                                  # 1.1  CYRILLIC SMALL LETTER IOTIFIED BIG YUS\r
++046E          ; mapped                 ; 046F          # 1.1  CYRILLIC CAPITAL LETTER KSI\r
++046F          ; valid                                  # 1.1  CYRILLIC SMALL LETTER KSI\r
++0470          ; mapped                 ; 0471          # 1.1  CYRILLIC CAPITAL LETTER PSI\r
++0471          ; valid                                  # 1.1  CYRILLIC SMALL LETTER PSI\r
++0472          ; mapped                 ; 0473          # 1.1  CYRILLIC CAPITAL LETTER FITA\r
++0473          ; valid                                  # 1.1  CYRILLIC SMALL LETTER FITA\r
++0474          ; mapped                 ; 0475          # 1.1  CYRILLIC CAPITAL LETTER IZHITSA\r
++0475          ; valid                                  # 1.1  CYRILLIC SMALL LETTER IZHITSA\r
++0476          ; mapped                 ; 0477          # 1.1  CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT\r
++0477          ; valid                                  # 1.1  CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT\r
++0478          ; mapped                 ; 0479          # 1.1  CYRILLIC CAPITAL LETTER UK\r
++0479          ; valid                                  # 1.1  CYRILLIC SMALL LETTER UK\r
++047A          ; mapped                 ; 047B          # 1.1  CYRILLIC CAPITAL LETTER ROUND OMEGA\r
++047B          ; valid                                  # 1.1  CYRILLIC SMALL LETTER ROUND OMEGA\r
++047C          ; mapped                 ; 047D          # 1.1  CYRILLIC CAPITAL LETTER OMEGA WITH TITLO\r
++047D          ; valid                                  # 1.1  CYRILLIC SMALL LETTER OMEGA WITH TITLO\r
++047E          ; mapped                 ; 047F          # 1.1  CYRILLIC CAPITAL LETTER OT\r
++047F          ; valid                                  # 1.1  CYRILLIC SMALL LETTER OT\r
++0480          ; mapped                 ; 0481          # 1.1  CYRILLIC CAPITAL LETTER KOPPA\r
++0481          ; valid                                  # 1.1  CYRILLIC SMALL LETTER KOPPA\r
++0482          ; valid                  ;      ; NV8    # 1.1  CYRILLIC THOUSANDS SIGN\r
++0483..0486    ; valid                                  # 1.1  COMBINING CYRILLIC TITLO..COMBINING CYRILLIC PSILI PNEUMATA\r
++0487          ; valid                                  # 5.1  COMBINING CYRILLIC POKRYTIE\r
++0488..0489    ; valid                  ;      ; NV8    # 3.0  COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN\r
++048A          ; mapped                 ; 048B          # 3.2  CYRILLIC CAPITAL LETTER SHORT I WITH TAIL\r
++048B          ; valid                                  # 3.2  CYRILLIC SMALL LETTER SHORT I WITH TAIL\r
++048C          ; mapped                 ; 048D          # 3.0  CYRILLIC CAPITAL LETTER SEMISOFT SIGN\r
++048D          ; valid                                  # 3.0  CYRILLIC SMALL LETTER SEMISOFT SIGN\r
++048E          ; mapped                 ; 048F          # 3.0  CYRILLIC CAPITAL LETTER ER WITH TICK\r
++048F          ; valid                                  # 3.0  CYRILLIC SMALL LETTER ER WITH TICK\r
++0490          ; mapped                 ; 0491          # 1.1  CYRILLIC CAPITAL LETTER GHE WITH UPTURN\r
++0491          ; valid                                  # 1.1  CYRILLIC SMALL LETTER GHE WITH UPTURN\r
++0492          ; mapped                 ; 0493          # 1.1  CYRILLIC CAPITAL LETTER GHE WITH STROKE\r
++0493          ; valid                                  # 1.1  CYRILLIC SMALL LETTER GHE WITH STROKE\r
++0494          ; mapped                 ; 0495          # 1.1  CYRILLIC CAPITAL LETTER GHE WITH MIDDLE HOOK\r
++0495          ; valid                                  # 1.1  CYRILLIC SMALL LETTER GHE WITH MIDDLE HOOK\r
++0496          ; mapped                 ; 0497          # 1.1  CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER\r
++0497          ; valid                                  # 1.1  CYRILLIC SMALL LETTER ZHE WITH DESCENDER\r
++0498          ; mapped                 ; 0499          # 1.1  CYRILLIC CAPITAL LETTER ZE WITH DESCENDER\r
++0499          ; valid                                  # 1.1  CYRILLIC SMALL LETTER ZE WITH DESCENDER\r
++049A          ; mapped                 ; 049B          # 1.1  CYRILLIC CAPITAL LETTER KA WITH DESCENDER\r
++049B          ; valid                                  # 1.1  CYRILLIC SMALL LETTER KA WITH DESCENDER\r
++049C          ; mapped                 ; 049D          # 1.1  CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE\r
++049D          ; valid                                  # 1.1  CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE\r
++049E          ; mapped                 ; 049F          # 1.1  CYRILLIC CAPITAL LETTER KA WITH STROKE\r
++049F          ; valid                                  # 1.1  CYRILLIC SMALL LETTER KA WITH STROKE\r
++04A0          ; mapped                 ; 04A1          # 1.1  CYRILLIC CAPITAL LETTER BASHKIR KA\r
++04A1          ; valid                                  # 1.1  CYRILLIC SMALL LETTER BASHKIR KA\r
++04A2          ; mapped                 ; 04A3          # 1.1  CYRILLIC CAPITAL LETTER EN WITH DESCENDER\r
++04A3          ; valid                                  # 1.1  CYRILLIC SMALL LETTER EN WITH DESCENDER\r
++04A4          ; mapped                 ; 04A5          # 1.1  CYRILLIC CAPITAL LIGATURE EN GHE\r
++04A5          ; valid                                  # 1.1  CYRILLIC SMALL LIGATURE EN GHE\r
++04A6          ; mapped                 ; 04A7          # 1.1  CYRILLIC CAPITAL LETTER PE WITH MIDDLE HOOK\r
++04A7          ; valid                                  # 1.1  CYRILLIC SMALL LETTER PE WITH MIDDLE HOOK\r
++04A8          ; mapped                 ; 04A9          # 1.1  CYRILLIC CAPITAL LETTER ABKHASIAN HA\r
++04A9          ; valid                                  # 1.1  CYRILLIC SMALL LETTER ABKHASIAN HA\r
++04AA          ; mapped                 ; 04AB          # 1.1  CYRILLIC CAPITAL LETTER ES WITH DESCENDER\r
++04AB          ; valid                                  # 1.1  CYRILLIC SMALL LETTER ES WITH DESCENDER\r
++04AC          ; mapped                 ; 04AD          # 1.1  CYRILLIC CAPITAL LETTER TE WITH DESCENDER\r
++04AD          ; valid                                  # 1.1  CYRILLIC SMALL LETTER TE WITH DESCENDER\r
++04AE          ; mapped                 ; 04AF          # 1.1  CYRILLIC CAPITAL LETTER STRAIGHT U\r
++04AF          ; valid                                  # 1.1  CYRILLIC SMALL LETTER STRAIGHT U\r
++04B0          ; mapped                 ; 04B1          # 1.1  CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE\r
++04B1          ; valid                                  # 1.1  CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE\r
++04B2          ; mapped                 ; 04B3          # 1.1  CYRILLIC CAPITAL LETTER HA WITH DESCENDER\r
++04B3          ; valid                                  # 1.1  CYRILLIC SMALL LETTER HA WITH DESCENDER\r
++04B4          ; mapped                 ; 04B5          # 1.1  CYRILLIC CAPITAL LIGATURE TE TSE\r
++04B5          ; valid                                  # 1.1  CYRILLIC SMALL LIGATURE TE TSE\r
++04B6          ; mapped                 ; 04B7          # 1.1  CYRILLIC CAPITAL LETTER CHE WITH DESCENDER\r
++04B7          ; valid                                  # 1.1  CYRILLIC SMALL LETTER CHE WITH DESCENDER\r
++04B8          ; mapped                 ; 04B9          # 1.1  CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE\r
++04B9          ; valid                                  # 1.1  CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE\r
++04BA          ; mapped                 ; 04BB          # 1.1  CYRILLIC CAPITAL LETTER SHHA\r
++04BB          ; valid                                  # 1.1  CYRILLIC SMALL LETTER SHHA\r
++04BC          ; mapped                 ; 04BD          # 1.1  CYRILLIC CAPITAL LETTER ABKHASIAN CHE\r
++04BD          ; valid                                  # 1.1  CYRILLIC SMALL LETTER ABKHASIAN CHE\r
++04BE          ; mapped                 ; 04BF          # 1.1  CYRILLIC CAPITAL LETTER ABKHASIAN CHE WITH DESCENDER\r
++04BF          ; valid                                  # 1.1  CYRILLIC SMALL LETTER ABKHASIAN CHE WITH DESCENDER\r
++04C0          ; disallowed                             # 1.1  CYRILLIC LETTER PALOCHKA\r
++04C1          ; mapped                 ; 04C2          # 1.1  CYRILLIC CAPITAL LETTER ZHE WITH BREVE\r
++04C2          ; valid                                  # 1.1  CYRILLIC SMALL LETTER ZHE WITH BREVE\r
++04C3          ; mapped                 ; 04C4          # 1.1  CYRILLIC CAPITAL LETTER KA WITH HOOK\r
++04C4          ; valid                                  # 1.1  CYRILLIC SMALL LETTER KA WITH HOOK\r
++04C5          ; mapped                 ; 04C6          # 3.2  CYRILLIC CAPITAL LETTER EL WITH TAIL\r
++04C6          ; valid                                  # 3.2  CYRILLIC SMALL LETTER EL WITH TAIL\r
++04C7          ; mapped                 ; 04C8          # 1.1  CYRILLIC CAPITAL LETTER EN WITH HOOK\r
++04C8          ; valid                                  # 1.1  CYRILLIC SMALL LETTER EN WITH HOOK\r
++04C9          ; mapped                 ; 04CA          # 3.2  CYRILLIC CAPITAL LETTER EN WITH TAIL\r
++04CA          ; valid                                  # 3.2  CYRILLIC SMALL LETTER EN WITH TAIL\r
++04CB          ; mapped                 ; 04CC          # 1.1  CYRILLIC CAPITAL LETTER KHAKASSIAN CHE\r
++04CC          ; valid                                  # 1.1  CYRILLIC SMALL LETTER KHAKASSIAN CHE\r
++04CD          ; mapped                 ; 04CE          # 3.2  CYRILLIC CAPITAL LETTER EM WITH TAIL\r
++04CE          ; valid                                  # 3.2  CYRILLIC SMALL LETTER EM WITH TAIL\r
++04CF          ; valid                                  # 5.0  CYRILLIC SMALL LETTER PALOCHKA\r
++04D0          ; mapped                 ; 04D1          # 1.1  CYRILLIC CAPITAL LETTER A WITH BREVE\r
++04D1          ; valid                                  # 1.1  CYRILLIC SMALL LETTER A WITH BREVE\r
++04D2          ; mapped                 ; 04D3          # 1.1  CYRILLIC CAPITAL LETTER A WITH DIAERESIS\r
++04D3          ; valid                                  # 1.1  CYRILLIC SMALL LETTER A WITH DIAERESIS\r
++04D4          ; mapped                 ; 04D5          # 1.1  CYRILLIC CAPITAL LIGATURE A IE\r
++04D5          ; valid                                  # 1.1  CYRILLIC SMALL LIGATURE A IE\r
++04D6          ; mapped                 ; 04D7          # 1.1  CYRILLIC CAPITAL LETTER IE WITH BREVE\r
++04D7          ; valid                                  # 1.1  CYRILLIC SMALL LETTER IE WITH BREVE\r
++04D8          ; mapped                 ; 04D9          # 1.1  CYRILLIC CAPITAL LETTER SCHWA\r
++04D9          ; valid                                  # 1.1  CYRILLIC SMALL LETTER SCHWA\r
++04DA          ; mapped                 ; 04DB          # 1.1  CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS\r
++04DB          ; valid                                  # 1.1  CYRILLIC SMALL LETTER SCHWA WITH DIAERESIS\r
++04DC          ; mapped                 ; 04DD          # 1.1  CYRILLIC CAPITAL LETTER ZHE WITH DIAERESIS\r
++04DD          ; valid                                  # 1.1  CYRILLIC SMALL LETTER ZHE WITH DIAERESIS\r
++04DE          ; mapped                 ; 04DF          # 1.1  CYRILLIC CAPITAL LETTER ZE WITH DIAERESIS\r
++04DF          ; valid                                  # 1.1  CYRILLIC SMALL LETTER ZE WITH DIAERESIS\r
++04E0          ; mapped                 ; 04E1          # 1.1  CYRILLIC CAPITAL LETTER ABKHASIAN DZE\r
++04E1          ; valid                                  # 1.1  CYRILLIC SMALL LETTER ABKHASIAN DZE\r
++04E2          ; mapped                 ; 04E3          # 1.1  CYRILLIC CAPITAL LETTER I WITH MACRON\r
++04E3          ; valid                                  # 1.1  CYRILLIC SMALL LETTER I WITH MACRON\r
++04E4          ; mapped                 ; 04E5          # 1.1  CYRILLIC CAPITAL LETTER I WITH DIAERESIS\r
++04E5          ; valid                                  # 1.1  CYRILLIC SMALL LETTER I WITH DIAERESIS\r
++04E6          ; mapped                 ; 04E7          # 1.1  CYRILLIC CAPITAL LETTER O WITH DIAERESIS\r
++04E7          ; valid                                  # 1.1  CYRILLIC SMALL LETTER O WITH DIAERESIS\r
++04E8          ; mapped                 ; 04E9          # 1.1  CYRILLIC CAPITAL LETTER BARRED O\r
++04E9          ; valid                                  # 1.1  CYRILLIC SMALL LETTER BARRED O\r
++04EA          ; mapped                 ; 04EB          # 1.1  CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS\r
++04EB          ; valid                                  # 1.1  CYRILLIC SMALL LETTER BARRED O WITH DIAERESIS\r
++04EC          ; mapped                 ; 04ED          # 3.0  CYRILLIC CAPITAL LETTER E WITH DIAERESIS\r
++04ED          ; valid                                  # 3.0  CYRILLIC SMALL LETTER E WITH DIAERESIS\r
++04EE          ; mapped                 ; 04EF          # 1.1  CYRILLIC CAPITAL LETTER U WITH MACRON\r
++04EF          ; valid                                  # 1.1  CYRILLIC SMALL LETTER U WITH MACRON\r
++04F0          ; mapped                 ; 04F1          # 1.1  CYRILLIC CAPITAL LETTER U WITH DIAERESIS\r
++04F1          ; valid                                  # 1.1  CYRILLIC SMALL LETTER U WITH DIAERESIS\r
++04F2          ; mapped                 ; 04F3          # 1.1  CYRILLIC CAPITAL LETTER U WITH DOUBLE ACUTE\r
++04F3          ; valid                                  # 1.1  CYRILLIC SMALL LETTER U WITH DOUBLE ACUTE\r
++04F4          ; mapped                 ; 04F5          # 1.1  CYRILLIC CAPITAL LETTER CHE WITH DIAERESIS\r
++04F5          ; valid                                  # 1.1  CYRILLIC SMALL LETTER CHE WITH DIAERESIS\r
++04F6          ; mapped                 ; 04F7          # 4.1  CYRILLIC CAPITAL LETTER GHE WITH DESCENDER\r
++04F7          ; valid                                  # 4.1  CYRILLIC SMALL LETTER GHE WITH DESCENDER\r
++04F8          ; mapped                 ; 04F9          # 1.1  CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS\r
++04F9          ; valid                                  # 1.1  CYRILLIC SMALL LETTER YERU WITH DIAERESIS\r
++04FA          ; mapped                 ; 04FB          # 5.0  CYRILLIC CAPITAL LETTER GHE WITH STROKE AND HOOK\r
++04FB          ; valid                                  # 5.0  CYRILLIC SMALL LETTER GHE WITH STROKE AND HOOK\r
++04FC          ; mapped                 ; 04FD          # 5.0  CYRILLIC CAPITAL LETTER HA WITH HOOK\r
++04FD          ; valid                                  # 5.0  CYRILLIC SMALL LETTER HA WITH HOOK\r
++04FE          ; mapped                 ; 04FF          # 5.0  CYRILLIC CAPITAL LETTER HA WITH STROKE\r
++04FF          ; valid                                  # 5.0  CYRILLIC SMALL LETTER HA WITH STROKE\r
++0500          ; mapped                 ; 0501          # 3.2  CYRILLIC CAPITAL LETTER KOMI DE\r
++0501          ; valid                                  # 3.2  CYRILLIC SMALL LETTER KOMI DE\r
++0502          ; mapped                 ; 0503          # 3.2  CYRILLIC CAPITAL LETTER KOMI DJE\r
++0503          ; valid                                  # 3.2  CYRILLIC SMALL LETTER KOMI DJE\r
++0504          ; mapped                 ; 0505          # 3.2  CYRILLIC CAPITAL LETTER KOMI ZJE\r
++0505          ; valid                                  # 3.2  CYRILLIC SMALL LETTER KOMI ZJE\r
++0506          ; mapped                 ; 0507          # 3.2  CYRILLIC CAPITAL LETTER KOMI DZJE\r
++0507          ; valid                                  # 3.2  CYRILLIC SMALL LETTER KOMI DZJE\r
++0508          ; mapped                 ; 0509          # 3.2  CYRILLIC CAPITAL LETTER KOMI LJE\r
++0509          ; valid                                  # 3.2  CYRILLIC SMALL LETTER KOMI LJE\r
++050A          ; mapped                 ; 050B          # 3.2  CYRILLIC CAPITAL LETTER KOMI NJE\r
++050B          ; valid                                  # 3.2  CYRILLIC SMALL LETTER KOMI NJE\r
++050C          ; mapped                 ; 050D          # 3.2  CYRILLIC CAPITAL LETTER KOMI SJE\r
++050D          ; valid                                  # 3.2  CYRILLIC SMALL LETTER KOMI SJE\r
++050E          ; mapped                 ; 050F          # 3.2  CYRILLIC CAPITAL LETTER KOMI TJE\r
++050F          ; valid                                  # 3.2  CYRILLIC SMALL LETTER KOMI TJE\r
++0510          ; mapped                 ; 0511          # 5.0  CYRILLIC CAPITAL LETTER REVERSED ZE\r
++0511          ; valid                                  # 5.0  CYRILLIC SMALL LETTER REVERSED ZE\r
++0512          ; mapped                 ; 0513          # 5.0  CYRILLIC CAPITAL LETTER EL WITH HOOK\r
++0513          ; valid                                  # 5.0  CYRILLIC SMALL LETTER EL WITH HOOK\r
++0514          ; mapped                 ; 0515          # 5.1  CYRILLIC CAPITAL LETTER LHA\r
++0515          ; valid                                  # 5.1  CYRILLIC SMALL LETTER LHA\r
++0516          ; mapped                 ; 0517          # 5.1  CYRILLIC CAPITAL LETTER RHA\r
++0517          ; valid                                  # 5.1  CYRILLIC SMALL LETTER RHA\r
++0518          ; mapped                 ; 0519          # 5.1  CYRILLIC CAPITAL LETTER YAE\r
++0519          ; valid                                  # 5.1  CYRILLIC SMALL LETTER YAE\r
++051A          ; mapped                 ; 051B          # 5.1  CYRILLIC CAPITAL LETTER QA\r
++051B          ; valid                                  # 5.1  CYRILLIC SMALL LETTER QA\r
++051C          ; mapped                 ; 051D          # 5.1  CYRILLIC CAPITAL LETTER WE\r
++051D          ; valid                                  # 5.1  CYRILLIC SMALL LETTER WE\r
++051E          ; mapped                 ; 051F          # 5.1  CYRILLIC CAPITAL LETTER ALEUT KA\r
++051F          ; valid                                  # 5.1  CYRILLIC SMALL LETTER ALEUT KA\r
++0520          ; mapped                 ; 0521          # 5.1  CYRILLIC CAPITAL LETTER EL WITH MIDDLE HOOK\r
++0521          ; valid                                  # 5.1  CYRILLIC SMALL LETTER EL WITH MIDDLE HOOK\r
++0522          ; mapped                 ; 0523          # 5.1  CYRILLIC CAPITAL LETTER EN WITH MIDDLE HOOK\r
++0523          ; valid                                  # 5.1  CYRILLIC SMALL LETTER EN WITH MIDDLE HOOK\r
++0524          ; mapped                 ; 0525          # 5.2  CYRILLIC CAPITAL LETTER PE WITH DESCENDER\r
++0525          ; valid                                  # 5.2  CYRILLIC SMALL LETTER PE WITH DESCENDER\r
++0526          ; mapped                 ; 0527          # 6.0  CYRILLIC CAPITAL LETTER SHHA WITH DESCENDER\r
++0527          ; valid                                  # 6.0  CYRILLIC SMALL LETTER SHHA WITH DESCENDER\r
++0528          ; mapped                 ; 0529          # 7.0  CYRILLIC CAPITAL LETTER EN WITH LEFT HOOK\r
++0529          ; valid                                  # 7.0  CYRILLIC SMALL LETTER EN WITH LEFT HOOK\r
++052A          ; mapped                 ; 052B          # 7.0  CYRILLIC CAPITAL LETTER DZZHE\r
++052B          ; valid                                  # 7.0  CYRILLIC SMALL LETTER DZZHE\r
++052C          ; mapped                 ; 052D          # 7.0  CYRILLIC CAPITAL LETTER DCHE\r
++052D          ; valid                                  # 7.0  CYRILLIC SMALL LETTER DCHE\r
++052E          ; mapped                 ; 052F          # 7.0  CYRILLIC CAPITAL LETTER EL WITH DESCENDER\r
++052F          ; valid                                  # 7.0  CYRILLIC SMALL LETTER EL WITH DESCENDER\r
++0530          ; disallowed                             # NA   <reserved-0530>\r
++0531          ; mapped                 ; 0561          # 1.1  ARMENIAN CAPITAL LETTER AYB\r
++0532          ; mapped                 ; 0562          # 1.1  ARMENIAN CAPITAL LETTER BEN\r
++0533          ; mapped                 ; 0563          # 1.1  ARMENIAN CAPITAL LETTER GIM\r
++0534          ; mapped                 ; 0564          # 1.1  ARMENIAN CAPITAL LETTER DA\r
++0535          ; mapped                 ; 0565          # 1.1  ARMENIAN CAPITAL LETTER ECH\r
++0536          ; mapped                 ; 0566          # 1.1  ARMENIAN CAPITAL LETTER ZA\r
++0537          ; mapped                 ; 0567          # 1.1  ARMENIAN CAPITAL LETTER EH\r
++0538          ; mapped                 ; 0568          # 1.1  ARMENIAN CAPITAL LETTER ET\r
++0539          ; mapped                 ; 0569          # 1.1  ARMENIAN CAPITAL LETTER TO\r
++053A          ; mapped                 ; 056A          # 1.1  ARMENIAN CAPITAL LETTER ZHE\r
++053B          ; mapped                 ; 056B          # 1.1  ARMENIAN CAPITAL LETTER INI\r
++053C          ; mapped                 ; 056C          # 1.1  ARMENIAN CAPITAL LETTER LIWN\r
++053D          ; mapped                 ; 056D          # 1.1  ARMENIAN CAPITAL LETTER XEH\r
++053E          ; mapped                 ; 056E          # 1.1  ARMENIAN CAPITAL LETTER CA\r
++053F          ; mapped                 ; 056F          # 1.1  ARMENIAN CAPITAL LETTER KEN\r
++0540          ; mapped                 ; 0570          # 1.1  ARMENIAN CAPITAL LETTER HO\r
++0541          ; mapped                 ; 0571          # 1.1  ARMENIAN CAPITAL LETTER JA\r
++0542          ; mapped                 ; 0572          # 1.1  ARMENIAN CAPITAL LETTER GHAD\r
++0543          ; mapped                 ; 0573          # 1.1  ARMENIAN CAPITAL LETTER CHEH\r
++0544          ; mapped                 ; 0574          # 1.1  ARMENIAN CAPITAL LETTER MEN\r
++0545          ; mapped                 ; 0575          # 1.1  ARMENIAN CAPITAL LETTER YI\r
++0546          ; mapped                 ; 0576          # 1.1  ARMENIAN CAPITAL LETTER NOW\r
++0547          ; mapped                 ; 0577          # 1.1  ARMENIAN CAPITAL LETTER SHA\r
++0548          ; mapped                 ; 0578          # 1.1  ARMENIAN CAPITAL LETTER VO\r
++0549          ; mapped                 ; 0579          # 1.1  ARMENIAN CAPITAL LETTER CHA\r
++054A          ; mapped                 ; 057A          # 1.1  ARMENIAN CAPITAL LETTER PEH\r
++054B          ; mapped                 ; 057B          # 1.1  ARMENIAN CAPITAL LETTER JHEH\r
++054C          ; mapped                 ; 057C          # 1.1  ARMENIAN CAPITAL LETTER RA\r
++054D          ; mapped                 ; 057D          # 1.1  ARMENIAN CAPITAL LETTER SEH\r
++054E          ; mapped                 ; 057E          # 1.1  ARMENIAN CAPITAL LETTER VEW\r
++054F          ; mapped                 ; 057F          # 1.1  ARMENIAN CAPITAL LETTER TIWN\r
++0550          ; mapped                 ; 0580          # 1.1  ARMENIAN CAPITAL LETTER REH\r
++0551          ; mapped                 ; 0581          # 1.1  ARMENIAN CAPITAL LETTER CO\r
++0552          ; mapped                 ; 0582          # 1.1  ARMENIAN CAPITAL LETTER YIWN\r
++0553          ; mapped                 ; 0583          # 1.1  ARMENIAN CAPITAL LETTER PIWR\r
++0554          ; mapped                 ; 0584          # 1.1  ARMENIAN CAPITAL LETTER KEH\r
++0555          ; mapped                 ; 0585          # 1.1  ARMENIAN CAPITAL LETTER OH\r
++0556          ; mapped                 ; 0586          # 1.1  ARMENIAN CAPITAL LETTER FEH\r
++0557..0558    ; disallowed                             # NA   <reserved-0557>..<reserved-0558>\r
++0559          ; valid                                  # 1.1  ARMENIAN MODIFIER LETTER LEFT HALF RING\r
++055A..055F    ; valid                  ;      ; NV8    # 1.1  ARMENIAN APOSTROPHE..ARMENIAN ABBREVIATION MARK\r
++0560          ; disallowed                             # NA   <reserved-0560>\r
++0561..0586    ; valid                                  # 1.1  ARMENIAN SMALL LETTER AYB..ARMENIAN SMALL LETTER FEH\r
++0587          ; mapped                 ; 0565 0582     # 1.1  ARMENIAN SMALL LIGATURE ECH YIWN\r
++0588          ; disallowed                             # NA   <reserved-0588>\r
++0589          ; valid                  ;      ; NV8    # 1.1  ARMENIAN FULL STOP\r
++058A          ; valid                  ;      ; NV8    # 3.0  ARMENIAN HYPHEN\r
++058B..058C    ; disallowed                             # NA   <reserved-058B>..<reserved-058C>\r
++058D..058E    ; valid                  ;      ; NV8    # 7.0  RIGHT-FACING ARMENIAN ETERNITY SIGN..LEFT-FACING ARMENIAN ETERNITY SIGN\r
++058F          ; valid                  ;      ; NV8    # 6.1  ARMENIAN DRAM SIGN\r
++0590          ; disallowed                             # NA   <reserved-0590>\r
++0591..05A1    ; valid                                  # 2.0  HEBREW ACCENT ETNAHTA..HEBREW ACCENT PAZER\r
++05A2          ; valid                                  # 4.1  HEBREW ACCENT ATNAH HAFUKH\r
++05A3..05AF    ; valid                                  # 2.0  HEBREW ACCENT MUNAH..HEBREW MARK MASORA CIRCLE\r
++05B0..05B9    ; valid                                  # 1.1  HEBREW POINT SHEVA..HEBREW POINT HOLAM\r
++05BA          ; valid                                  # 5.0  HEBREW POINT HOLAM HASER FOR VAV\r
++05BB..05BD    ; valid                                  # 1.1  HEBREW POINT QUBUTS..HEBREW POINT METEG\r
++05BE          ; valid                  ;      ; NV8    # 1.1  HEBREW PUNCTUATION MAQAF\r
++05BF          ; valid                                  # 1.1  HEBREW POINT RAFE\r
++05C0          ; valid                  ;      ; NV8    # 1.1  HEBREW PUNCTUATION PASEQ\r
++05C1..05C2    ; valid                                  # 1.1  HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT\r
++05C3          ; valid                  ;      ; NV8    # 1.1  HEBREW PUNCTUATION SOF PASUQ\r
++05C4          ; valid                                  # 2.0  HEBREW MARK UPPER DOT\r
++05C5          ; valid                                  # 4.1  HEBREW MARK LOWER DOT\r
++05C6          ; valid                  ;      ; NV8    # 4.1  HEBREW PUNCTUATION NUN HAFUKHA\r
++05C7          ; valid                                  # 4.1  HEBREW POINT QAMATS QATAN\r
++05C8..05CF    ; disallowed                             # NA   <reserved-05C8>..<reserved-05CF>\r
++05D0..05EA    ; valid                                  # 1.1  HEBREW LETTER ALEF..HEBREW LETTER TAV\r
++05EB..05EF    ; disallowed                             # NA   <reserved-05EB>..<reserved-05EF>\r
++05F0..05F4    ; valid                                  # 1.1  HEBREW LIGATURE YIDDISH DOUBLE VAV..HEBREW PUNCTUATION GERSHAYIM\r
++05F5..05FF    ; disallowed                             # NA   <reserved-05F5>..<reserved-05FF>\r
++0600..0603    ; disallowed                             # 4.0  ARABIC NUMBER SIGN..ARABIC SIGN SAFHA\r
++0604          ; disallowed                             # 6.1  ARABIC SIGN SAMVAT\r
++0605          ; disallowed                             # 7.0  ARABIC NUMBER MARK ABOVE\r
++0606..060A    ; valid                  ;      ; NV8    # 5.1  ARABIC-INDIC CUBE ROOT..ARABIC-INDIC PER TEN THOUSAND SIGN\r
++060B          ; valid                  ;      ; NV8    # 4.1  AFGHANI SIGN\r
++060C          ; valid                  ;      ; NV8    # 1.1  ARABIC COMMA\r
++060D..060F    ; valid                  ;      ; NV8    # 4.0  ARABIC DATE SEPARATOR..ARABIC SIGN MISRA\r
++0610..0615    ; valid                                  # 4.0  ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL HIGH TAH\r
++0616..061A    ; valid                                  # 5.1  ARABIC SMALL HIGH LIGATURE ALEF WITH LAM WITH YEH..ARABIC SMALL KASRA\r
++061B          ; valid                  ;      ; NV8    # 1.1  ARABIC SEMICOLON\r
++061C          ; disallowed                             # 6.3  ARABIC LETTER MARK\r
++061D          ; disallowed                             # NA   <reserved-061D>\r
++061E          ; valid                  ;      ; NV8    # 4.1  ARABIC TRIPLE DOT PUNCTUATION MARK\r
++061F          ; valid                  ;      ; NV8    # 1.1  ARABIC QUESTION MARK\r
++0620          ; valid                                  # 6.0  ARABIC LETTER KASHMIRI YEH\r
++0621..063A    ; valid                                  # 1.1  ARABIC LETTER HAMZA..ARABIC LETTER GHAIN\r
++063B..063F    ; valid                                  # 5.1  ARABIC LETTER KEHEH WITH TWO DOTS ABOVE..ARABIC LETTER FARSI YEH WITH THREE DOTS ABOVE\r
++0640          ; valid                  ;      ; NV8    # 1.1  ARABIC TATWEEL\r
++0641..0652    ; valid                                  # 1.1  ARABIC LETTER FEH..ARABIC SUKUN\r
++0653..0655    ; valid                                  # 3.0  ARABIC MADDAH ABOVE..ARABIC HAMZA BELOW\r
++0656..0658    ; valid                                  # 4.0  ARABIC SUBSCRIPT ALEF..ARABIC MARK NOON GHUNNA\r
++0659..065E    ; valid                                  # 4.1  ARABIC ZWARAKAY..ARABIC FATHA WITH TWO DOTS\r
++065F          ; valid                                  # 6.0  ARABIC WAVY HAMZA BELOW\r
++0660..0669    ; valid                                  # 1.1  ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE\r
++066A..066D    ; valid                  ;      ; NV8    # 1.1  ARABIC PERCENT SIGN..ARABIC FIVE POINTED STAR\r
++066E..066F    ; valid                                  # 3.2  ARABIC LETTER DOTLESS BEH..ARABIC LETTER DOTLESS QAF\r
++0670..0674    ; valid                                  # 1.1  ARABIC LETTER SUPERSCRIPT ALEF..ARABIC LETTER HIGH HAMZA\r
++0675          ; mapped                 ; 0627 0674     # 1.1  ARABIC LETTER HIGH HAMZA ALEF\r
++0676          ; mapped                 ; 0648 0674     # 1.1  ARABIC LETTER HIGH HAMZA WAW\r
++0677          ; mapped                 ; 06C7 0674     # 1.1  ARABIC LETTER U WITH HAMZA ABOVE\r
++0678          ; mapped                 ; 064A 0674     # 1.1  ARABIC LETTER HIGH HAMZA YEH\r
++0679..06B7    ; valid                                  # 1.1  ARABIC LETTER TTEH..ARABIC LETTER LAM WITH THREE DOTS ABOVE\r
++06B8..06B9    ; valid                                  # 3.0  ARABIC LETTER LAM WITH THREE DOTS BELOW..ARABIC LETTER NOON WITH DOT BELOW\r
++06BA..06BE    ; valid                                  # 1.1  ARABIC LETTER NOON GHUNNA..ARABIC LETTER HEH DOACHASHMEE\r
++06BF          ; valid                                  # 3.0  ARABIC LETTER TCHEH WITH DOT ABOVE\r
++06C0..06CE    ; valid                                  # 1.1  ARABIC LETTER HEH WITH YEH ABOVE..ARABIC LETTER YEH WITH SMALL V\r
++06CF          ; valid                                  # 3.0  ARABIC LETTER WAW WITH DOT ABOVE\r
++06D0..06D3    ; valid                                  # 1.1  ARABIC LETTER E..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE\r
++06D4          ; valid                  ;      ; NV8    # 1.1  ARABIC FULL STOP\r
++06D5..06DC    ; valid                                  # 1.1  ARABIC LETTER AE..ARABIC SMALL HIGH SEEN\r
++06DD          ; disallowed                             # 1.1  ARABIC END OF AYAH\r
++06DE          ; valid                  ;      ; NV8    # 1.1  ARABIC START OF RUB EL HIZB\r
++06DF..06E8    ; valid                                  # 1.1  ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH NOON\r
++06E9          ; valid                  ;      ; NV8    # 1.1  ARABIC PLACE OF SAJDAH\r
++06EA..06ED    ; valid                                  # 1.1  ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM\r
++06EE..06EF    ; valid                                  # 4.0  ARABIC LETTER DAL WITH INVERTED V..ARABIC LETTER REH WITH INVERTED V\r
++06F0..06F9    ; valid                                  # 1.1  EXTENDED ARABIC-INDIC DIGIT ZERO..EXTENDED ARABIC-INDIC DIGIT NINE\r
++06FA..06FE    ; valid                                  # 3.0  ARABIC LETTER SHEEN WITH DOT BELOW..ARABIC SIGN SINDHI POSTPOSITION MEN\r
++06FF          ; valid                                  # 4.0  ARABIC LETTER HEH WITH INVERTED V\r
++0700..070D    ; valid                  ;      ; NV8    # 3.0  SYRIAC END OF PARAGRAPH..SYRIAC HARKLEAN ASTERISCUS\r
++070E          ; disallowed                             # NA   <reserved-070E>\r
++070F          ; disallowed                             # 3.0  SYRIAC ABBREVIATION MARK\r
++0710..072C    ; valid                                  # 3.0  SYRIAC LETTER ALAPH..SYRIAC LETTER TAW\r
++072D..072F    ; valid                                  # 4.0  SYRIAC LETTER PERSIAN BHETH..SYRIAC LETTER PERSIAN DHALATH\r
++0730..074A    ; valid                                  # 3.0  SYRIAC PTHAHA ABOVE..SYRIAC BARREKH\r
++074B..074C    ; disallowed                             # NA   <reserved-074B>..<reserved-074C>\r
++074D..074F    ; valid                                  # 4.0  SYRIAC LETTER SOGDIAN ZHAIN..SYRIAC LETTER SOGDIAN FE\r
++0750..076D    ; valid                                  # 4.1  ARABIC LETTER BEH WITH THREE DOTS HORIZONTALLY BELOW..ARABIC LETTER SEEN WITH TWO DOTS VERTICALLY ABOVE\r
++076E..077F    ; valid                                  # 5.1  ARABIC LETTER HAH WITH SMALL ARABIC LETTER TAH BELOW..ARABIC LETTER KAF WITH TWO DOTS ABOVE\r
++0780..07B0    ; valid                                  # 3.0  THAANA LETTER HAA..THAANA SUKUN\r
++07B1          ; valid                                  # 3.2  THAANA LETTER NAA\r
++07B2..07BF    ; disallowed                             # NA   <reserved-07B2>..<reserved-07BF>\r
++07C0..07F5    ; valid                                  # 5.0  NKO DIGIT ZERO..NKO LOW TONE APOSTROPHE\r
++07F6..07FA    ; valid                  ;      ; NV8    # 5.0  NKO SYMBOL OO DENNEN..NKO LAJANYALAN\r
++07FB..07FF    ; disallowed                             # NA   <reserved-07FB>..<reserved-07FF>\r
++0800..082D    ; valid                                  # 5.2  SAMARITAN LETTER ALAF..SAMARITAN MARK NEQUDAA\r
++082E..082F    ; disallowed                             # NA   <reserved-082E>..<reserved-082F>\r
++0830..083E    ; valid                  ;      ; NV8    # 5.2  SAMARITAN PUNCTUATION NEQUDAA..SAMARITAN PUNCTUATION ANNAAU\r
++083F          ; disallowed                             # NA   <reserved-083F>\r
++0840..085B    ; valid                                  # 6.0  MANDAIC LETTER HALQA..MANDAIC GEMINATION MARK\r
++085C..085D    ; disallowed                             # NA   <reserved-085C>..<reserved-085D>\r
++085E          ; valid                  ;      ; NV8    # 6.0  MANDAIC PUNCTUATION\r
++085F          ; disallowed                             # NA   <reserved-085F>\r
++0860..086A    ; valid                                  # 10.0 SYRIAC LETTER MALAYALAM NGA..SYRIAC LETTER MALAYALAM SSA\r
++086B..089F    ; disallowed                             # NA   <reserved-086B>..<reserved-089F>\r
++08A0          ; valid                                  # 6.1  ARABIC LETTER BEH WITH SMALL V BELOW\r
++08A1          ; valid                                  # 7.0  ARABIC LETTER BEH WITH HAMZA ABOVE\r
++08A2..08AC    ; valid                                  # 6.1  ARABIC LETTER JEEM WITH TWO DOTS ABOVE..ARABIC LETTER ROHINGYA YEH\r
++08AD..08B2    ; valid                                  # 7.0  ARABIC LETTER LOW ALEF..ARABIC LETTER ZAIN WITH INVERTED V ABOVE\r
++08B3..08B4    ; valid                                  # 8.0  ARABIC LETTER AIN WITH THREE DOTS BELOW..ARABIC LETTER KAF WITH DOT BELOW\r
++08B5          ; disallowed                             # NA   <reserved-08B5>\r
++08B6..08BD    ; valid                                  # 9.0  ARABIC LETTER BEH WITH SMALL MEEM ABOVE..ARABIC LETTER AFRICAN NOON\r
++08BE..08D3    ; disallowed                             # NA   <reserved-08BE>..<reserved-08D3>\r
++08D4..08E1    ; valid                                  # 9.0  ARABIC SMALL HIGH WORD AR-RUB..ARABIC SMALL HIGH SIGN SAFHA\r
++08E2          ; disallowed                             # 9.0  ARABIC DISPUTED END OF AYAH\r
++08E3          ; valid                                  # 8.0  ARABIC TURNED DAMMA BELOW\r
++08E4..08FE    ; valid                                  # 6.1  ARABIC CURLY FATHA..ARABIC DAMMA WITH DOT\r
++08FF          ; valid                                  # 7.0  ARABIC MARK SIDEWAYS NOON GHUNNA\r
++0900          ; valid                                  # 5.2  DEVANAGARI SIGN INVERTED CANDRABINDU\r
++0901..0903    ; valid                                  # 1.1  DEVANAGARI SIGN CANDRABINDU..DEVANAGARI SIGN VISARGA\r
++0904          ; valid                                  # 4.0  DEVANAGARI LETTER SHORT A\r
++0905..0939    ; valid                                  # 1.1  DEVANAGARI LETTER A..DEVANAGARI LETTER HA\r
++093A..093B    ; valid                                  # 6.0  DEVANAGARI VOWEL SIGN OE..DEVANAGARI VOWEL SIGN OOE\r
++093C..094D    ; valid                                  # 1.1  DEVANAGARI SIGN NUKTA..DEVANAGARI SIGN VIRAMA\r
++094E          ; valid                                  # 5.2  DEVANAGARI VOWEL SIGN PRISHTHAMATRA E\r
++094F          ; valid                                  # 6.0  DEVANAGARI VOWEL SIGN AW\r
++0950..0954    ; valid                                  # 1.1  DEVANAGARI OM..DEVANAGARI ACUTE ACCENT\r
++0955          ; valid                                  # 5.2  DEVANAGARI VOWEL SIGN CANDRA LONG E\r
++0956..0957    ; valid                                  # 6.0  DEVANAGARI VOWEL SIGN UE..DEVANAGARI VOWEL SIGN UUE\r
++0958          ; mapped                 ; 0915 093C     # 1.1  DEVANAGARI LETTER QA\r
++0959          ; mapped                 ; 0916 093C     # 1.1  DEVANAGARI LETTER KHHA\r
++095A          ; mapped                 ; 0917 093C     # 1.1  DEVANAGARI LETTER GHHA\r
++095B          ; mapped                 ; 091C 093C     # 1.1  DEVANAGARI LETTER ZA\r
++095C          ; mapped                 ; 0921 093C     # 1.1  DEVANAGARI LETTER DDDHA\r
++095D          ; mapped                 ; 0922 093C     # 1.1  DEVANAGARI LETTER RHA\r
++095E          ; mapped                 ; 092B 093C     # 1.1  DEVANAGARI LETTER FA\r
++095F          ; mapped                 ; 092F 093C     # 1.1  DEVANAGARI LETTER YYA\r
++0960..0963    ; valid                                  # 1.1  DEVANAGARI LETTER VOCALIC RR..DEVANAGARI VOWEL SIGN VOCALIC LL\r
++0964..0965    ; valid                  ;      ; NV8    # 1.1  DEVANAGARI DANDA..DEVANAGARI DOUBLE DANDA\r
++0966..096F    ; valid                                  # 1.1  DEVANAGARI DIGIT ZERO..DEVANAGARI DIGIT NINE\r
++0970          ; valid                  ;      ; NV8    # 1.1  DEVANAGARI ABBREVIATION SIGN\r
++0971..0972    ; valid                                  # 5.1  DEVANAGARI SIGN HIGH SPACING DOT..DEVANAGARI LETTER CANDRA A\r
++0973..0977    ; valid                                  # 6.0  DEVANAGARI LETTER OE..DEVANAGARI LETTER UUE\r
++0978          ; valid                                  # 7.0  DEVANAGARI LETTER MARWARI DDA\r
++0979..097A    ; valid                                  # 5.2  DEVANAGARI LETTER ZHA..DEVANAGARI LETTER HEAVY YA\r
++097B..097C    ; valid                                  # 5.0  DEVANAGARI LETTER GGA..DEVANAGARI LETTER JJA\r
++097D          ; valid                                  # 4.1  DEVANAGARI LETTER GLOTTAL STOP\r
++097E..097F    ; valid                                  # 5.0  DEVANAGARI LETTER DDDA..DEVANAGARI LETTER BBA\r
++0980          ; valid                                  # 7.0  BENGALI ANJI\r
++0981..0983    ; valid                                  # 1.1  BENGALI SIGN CANDRABINDU..BENGALI SIGN VISARGA\r
++0984          ; disallowed                             # NA   <reserved-0984>\r
++0985..098C    ; valid                                  # 1.1  BENGALI LETTER A..BENGALI LETTER VOCALIC L\r
++098D..098E    ; disallowed                             # NA   <reserved-098D>..<reserved-098E>\r
++098F..0990    ; valid                                  # 1.1  BENGALI LETTER E..BENGALI LETTER AI\r
++0991..0992    ; disallowed                             # NA   <reserved-0991>..<reserved-0992>\r
++0993..09A8    ; valid                                  # 1.1  BENGALI LETTER O..BENGALI LETTER NA\r
++09A9          ; disallowed                             # NA   <reserved-09A9>\r
++09AA..09B0    ; valid                                  # 1.1  BENGALI LETTER PA..BENGALI LETTER RA\r
++09B1          ; disallowed                             # NA   <reserved-09B1>\r
++09B2          ; valid                                  # 1.1  BENGALI LETTER LA\r
++09B3..09B5    ; disallowed                             # NA   <reserved-09B3>..<reserved-09B5>\r
++09B6..09B9    ; valid                                  # 1.1  BENGALI LETTER SHA..BENGALI LETTER HA\r
++09BA..09BB    ; disallowed                             # NA   <reserved-09BA>..<reserved-09BB>\r
++09BC          ; valid                                  # 1.1  BENGALI SIGN NUKTA\r
++09BD          ; valid                                  # 4.0  BENGALI SIGN AVAGRAHA\r
++09BE..09C4    ; valid                                  # 1.1  BENGALI VOWEL SIGN AA..BENGALI VOWEL SIGN VOCALIC RR\r
++09C5..09C6    ; disallowed                             # NA   <reserved-09C5>..<reserved-09C6>\r
++09C7..09C8    ; valid                                  # 1.1  BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI\r
++09C9..09CA    ; disallowed                             # NA   <reserved-09C9>..<reserved-09CA>\r
++09CB..09CD    ; valid                                  # 1.1  BENGALI VOWEL SIGN O..BENGALI SIGN VIRAMA\r
++09CE          ; valid                                  # 4.1  BENGALI LETTER KHANDA TA\r
++09CF..09D6    ; disallowed                             # NA   <reserved-09CF>..<reserved-09D6>\r
++09D7          ; valid                                  # 1.1  BENGALI AU LENGTH MARK\r
++09D8..09DB    ; disallowed                             # NA   <reserved-09D8>..<reserved-09DB>\r
++09DC          ; mapped                 ; 09A1 09BC     # 1.1  BENGALI LETTER RRA\r
++09DD          ; mapped                 ; 09A2 09BC     # 1.1  BENGALI LETTER RHA\r
++09DE          ; disallowed                             # NA   <reserved-09DE>\r
++09DF          ; mapped                 ; 09AF 09BC     # 1.1  BENGALI LETTER YYA\r
++09E0..09E3    ; valid                                  # 1.1  BENGALI LETTER VOCALIC RR..BENGALI VOWEL SIGN VOCALIC LL\r
++09E4..09E5    ; disallowed                             # NA   <reserved-09E4>..<reserved-09E5>\r
++09E6..09F1    ; valid                                  # 1.1  BENGALI DIGIT ZERO..BENGALI LETTER RA WITH LOWER DIAGONAL\r
++09F2..09FA    ; valid                  ;      ; NV8    # 1.1  BENGALI RUPEE MARK..BENGALI ISSHAR\r
++09FB          ; valid                  ;      ; NV8    # 5.2  BENGALI GANDA MARK\r
++09FC          ; valid                                  # 10.0 BENGALI LETTER VEDIC ANUSVARA\r
++09FD          ; valid                  ;      ; NV8    # 10.0 BENGALI ABBREVIATION SIGN\r
++09FE..0A00    ; disallowed                             # NA   <reserved-09FE>..<reserved-0A00>\r
++0A01          ; valid                                  # 4.0  GURMUKHI SIGN ADAK BINDI\r
++0A02          ; valid                                  # 1.1  GURMUKHI SIGN BINDI\r
++0A03          ; valid                                  # 4.0  GURMUKHI SIGN VISARGA\r
++0A04          ; disallowed                             # NA   <reserved-0A04>\r
++0A05..0A0A    ; valid                                  # 1.1  GURMUKHI LETTER A..GURMUKHI LETTER UU\r
++0A0B..0A0E    ; disallowed                             # NA   <reserved-0A0B>..<reserved-0A0E>\r
++0A0F..0A10    ; valid                                  # 1.1  GURMUKHI LETTER EE..GURMUKHI LETTER AI\r
++0A11..0A12    ; disallowed                             # NA   <reserved-0A11>..<reserved-0A12>\r
++0A13..0A28    ; valid                                  # 1.1  GURMUKHI LETTER OO..GURMUKHI LETTER NA\r
++0A29          ; disallowed                             # NA   <reserved-0A29>\r
++0A2A..0A30    ; valid                                  # 1.1  GURMUKHI LETTER PA..GURMUKHI LETTER RA\r
++0A31          ; disallowed                             # NA   <reserved-0A31>\r
++0A32          ; valid                                  # 1.1  GURMUKHI LETTER LA\r
++0A33          ; mapped                 ; 0A32 0A3C     # 1.1  GURMUKHI LETTER LLA\r
++0A34          ; disallowed                             # NA   <reserved-0A34>\r
++0A35          ; valid                                  # 1.1  GURMUKHI LETTER VA\r
++0A36          ; mapped                 ; 0A38 0A3C     # 1.1  GURMUKHI LETTER SHA\r
++0A37          ; disallowed                             # NA   <reserved-0A37>\r
++0A38..0A39    ; valid                                  # 1.1  GURMUKHI LETTER SA..GURMUKHI LETTER HA\r
++0A3A..0A3B    ; disallowed                             # NA   <reserved-0A3A>..<reserved-0A3B>\r
++0A3C          ; valid                                  # 1.1  GURMUKHI SIGN NUKTA\r
++0A3D          ; disallowed                             # NA   <reserved-0A3D>\r
++0A3E..0A42    ; valid                                  # 1.1  GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN UU\r
++0A43..0A46    ; disallowed                             # NA   <reserved-0A43>..<reserved-0A46>\r
++0A47..0A48    ; valid                                  # 1.1  GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI\r
++0A49..0A4A    ; disallowed                             # NA   <reserved-0A49>..<reserved-0A4A>\r
++0A4B..0A4D    ; valid                                  # 1.1  GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA\r
++0A4E..0A50    ; disallowed                             # NA   <reserved-0A4E>..<reserved-0A50>\r
++0A51          ; valid                                  # 5.1  GURMUKHI SIGN UDAAT\r
++0A52..0A58    ; disallowed                             # NA   <reserved-0A52>..<reserved-0A58>\r
++0A59          ; mapped                 ; 0A16 0A3C     # 1.1  GURMUKHI LETTER KHHA\r
++0A5A          ; mapped                 ; 0A17 0A3C     # 1.1  GURMUKHI LETTER GHHA\r
++0A5B          ; mapped                 ; 0A1C 0A3C     # 1.1  GURMUKHI LETTER ZA\r
++0A5C          ; valid                                  # 1.1  GURMUKHI LETTER RRA\r
++0A5D          ; disallowed                             # NA   <reserved-0A5D>\r
++0A5E          ; mapped                 ; 0A2B 0A3C     # 1.1  GURMUKHI LETTER FA\r
++0A5F..0A65    ; disallowed                             # NA   <reserved-0A5F>..<reserved-0A65>\r
++0A66..0A74    ; valid                                  # 1.1  GURMUKHI DIGIT ZERO..GURMUKHI EK ONKAR\r
++0A75          ; valid                                  # 5.1  GURMUKHI SIGN YAKASH\r
++0A76..0A80    ; disallowed                             # NA   <reserved-0A76>..<reserved-0A80>\r
++0A81..0A83    ; valid                                  # 1.1  GUJARATI SIGN CANDRABINDU..GUJARATI SIGN VISARGA\r
++0A84          ; disallowed                             # NA   <reserved-0A84>\r
++0A85..0A8B    ; valid                                  # 1.1  GUJARATI LETTER A..GUJARATI LETTER VOCALIC R\r
++0A8C          ; valid                                  # 4.0  GUJARATI LETTER VOCALIC L\r
++0A8D          ; valid                                  # 1.1  GUJARATI VOWEL CANDRA E\r
++0A8E          ; disallowed                             # NA   <reserved-0A8E>\r
++0A8F..0A91    ; valid                                  # 1.1  GUJARATI LETTER E..GUJARATI VOWEL CANDRA O\r
++0A92          ; disallowed                             # NA   <reserved-0A92>\r
++0A93..0AA8    ; valid                                  # 1.1  GUJARATI LETTER O..GUJARATI LETTER NA\r
++0AA9          ; disallowed                             # NA   <reserved-0AA9>\r
++0AAA..0AB0    ; valid                                  # 1.1  GUJARATI LETTER PA..GUJARATI LETTER RA\r
++0AB1          ; disallowed                             # NA   <reserved-0AB1>\r
++0AB2..0AB3    ; valid                                  # 1.1  GUJARATI LETTER LA..GUJARATI LETTER LLA\r
++0AB4          ; disallowed                             # NA   <reserved-0AB4>\r
++0AB5..0AB9    ; valid                                  # 1.1  GUJARATI LETTER VA..GUJARATI LETTER HA\r
++0ABA..0ABB    ; disallowed                             # NA   <reserved-0ABA>..<reserved-0ABB>\r
++0ABC..0AC5    ; valid                                  # 1.1  GUJARATI SIGN NUKTA..GUJARATI VOWEL SIGN CANDRA E\r
++0AC6          ; disallowed                             # NA   <reserved-0AC6>\r
++0AC7..0AC9    ; valid                                  # 1.1  GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN CANDRA O\r
++0ACA          ; disallowed                             # NA   <reserved-0ACA>\r
++0ACB..0ACD    ; valid                                  # 1.1  GUJARATI VOWEL SIGN O..GUJARATI SIGN VIRAMA\r
++0ACE..0ACF    ; disallowed                             # NA   <reserved-0ACE>..<reserved-0ACF>\r
++0AD0          ; valid                                  # 1.1  GUJARATI OM\r
++0AD1..0ADF    ; disallowed                             # NA   <reserved-0AD1>..<reserved-0ADF>\r
++0AE0          ; valid                                  # 1.1  GUJARATI LETTER VOCALIC RR\r
++0AE1..0AE3    ; valid                                  # 4.0  GUJARATI LETTER VOCALIC LL..GUJARATI VOWEL SIGN VOCALIC LL\r
++0AE4..0AE5    ; disallowed                             # NA   <reserved-0AE4>..<reserved-0AE5>\r
++0AE6..0AEF    ; valid                                  # 1.1  GUJARATI DIGIT ZERO..GUJARATI DIGIT NINE\r
++0AF0          ; valid                  ;      ; NV8    # 6.1  GUJARATI ABBREVIATION SIGN\r
++0AF1          ; valid                  ;      ; NV8    # 4.0  GUJARATI RUPEE SIGN\r
++0AF2..0AF8    ; disallowed                             # NA   <reserved-0AF2>..<reserved-0AF8>\r
++0AF9          ; valid                                  # 8.0  GUJARATI LETTER ZHA\r
++0AFA..0AFF    ; valid                                  # 10.0 GUJARATI SIGN SUKUN..GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE\r
++0B00          ; disallowed                             # NA   <reserved-0B00>\r
++0B01..0B03    ; valid                                  # 1.1  ORIYA SIGN CANDRABINDU..ORIYA SIGN VISARGA\r
++0B04          ; disallowed                             # NA   <reserved-0B04>\r
++0B05..0B0C    ; valid                                  # 1.1  ORIYA LETTER A..ORIYA LETTER VOCALIC L\r
++0B0D..0B0E    ; disallowed                             # NA   <reserved-0B0D>..<reserved-0B0E>\r
++0B0F..0B10    ; valid                                  # 1.1  ORIYA LETTER E..ORIYA LETTER AI\r
++0B11..0B12    ; disallowed                             # NA   <reserved-0B11>..<reserved-0B12>\r
++0B13..0B28    ; valid                                  # 1.1  ORIYA LETTER O..ORIYA LETTER NA\r
++0B29          ; disallowed                             # NA   <reserved-0B29>\r
++0B2A..0B30    ; valid                                  # 1.1  ORIYA LETTER PA..ORIYA LETTER RA\r
++0B31          ; disallowed                             # NA   <reserved-0B31>\r
++0B32..0B33    ; valid                                  # 1.1  ORIYA LETTER LA..ORIYA LETTER LLA\r
++0B34          ; disallowed                             # NA   <reserved-0B34>\r
++0B35          ; valid                                  # 4.0  ORIYA LETTER VA\r
++0B36..0B39    ; valid                                  # 1.1  ORIYA LETTER SHA..ORIYA LETTER HA\r
++0B3A..0B3B    ; disallowed                             # NA   <reserved-0B3A>..<reserved-0B3B>\r
++0B3C..0B43    ; valid                                  # 1.1  ORIYA SIGN NUKTA..ORIYA VOWEL SIGN VOCALIC R\r
++0B44          ; valid                                  # 5.1  ORIYA VOWEL SIGN VOCALIC RR\r
++0B45..0B46    ; disallowed                             # NA   <reserved-0B45>..<reserved-0B46>\r
++0B47..0B48    ; valid                                  # 1.1  ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI\r
++0B49..0B4A    ; disallowed                             # NA   <reserved-0B49>..<reserved-0B4A>\r
++0B4B..0B4D    ; valid                                  # 1.1  ORIYA VOWEL SIGN O..ORIYA SIGN VIRAMA\r
++0B4E..0B55    ; disallowed                             # NA   <reserved-0B4E>..<reserved-0B55>\r
++0B56..0B57    ; valid                                  # 1.1  ORIYA AI LENGTH MARK..ORIYA AU LENGTH MARK\r
++0B58..0B5B    ; disallowed                             # NA   <reserved-0B58>..<reserved-0B5B>\r
++0B5C          ; mapped                 ; 0B21 0B3C     # 1.1  ORIYA LETTER RRA\r
++0B5D          ; mapped                 ; 0B22 0B3C     # 1.1  ORIYA LETTER RHA\r
++0B5E          ; disallowed                             # NA   <reserved-0B5E>\r
++0B5F..0B61    ; valid                                  # 1.1  ORIYA LETTER YYA..ORIYA LETTER VOCALIC LL\r
++0B62..0B63    ; valid                                  # 5.1  ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL\r
++0B64..0B65    ; disallowed                             # NA   <reserved-0B64>..<reserved-0B65>\r
++0B66..0B6F    ; valid                                  # 1.1  ORIYA DIGIT ZERO..ORIYA DIGIT NINE\r
++0B70          ; valid                  ;      ; NV8    # 1.1  ORIYA ISSHAR\r
++0B71          ; valid                                  # 4.0  ORIYA LETTER WA\r
++0B72..0B77    ; valid                  ;      ; NV8    # 6.0  ORIYA FRACTION ONE QUARTER..ORIYA FRACTION THREE SIXTEENTHS\r
++0B78..0B81    ; disallowed                             # NA   <reserved-0B78>..<reserved-0B81>\r
++0B82..0B83    ; valid                                  # 1.1  TAMIL SIGN ANUSVARA..TAMIL SIGN VISARGA\r
++0B84          ; disallowed                             # NA   <reserved-0B84>\r
++0B85..0B8A    ; valid                                  # 1.1  TAMIL LETTER A..TAMIL LETTER UU\r
++0B8B..0B8D    ; disallowed                             # NA   <reserved-0B8B>..<reserved-0B8D>\r
++0B8E..0B90    ; valid                                  # 1.1  TAMIL LETTER E..TAMIL LETTER AI\r
++0B91          ; disallowed                             # NA   <reserved-0B91>\r
++0B92..0B95    ; valid                                  # 1.1  TAMIL LETTER O..TAMIL LETTER KA\r
++0B96..0B98    ; disallowed                             # NA   <reserved-0B96>..<reserved-0B98>\r
++0B99..0B9A    ; valid                                  # 1.1  TAMIL LETTER NGA..TAMIL LETTER CA\r
++0B9B          ; disallowed                             # NA   <reserved-0B9B>\r
++0B9C          ; valid                                  # 1.1  TAMIL LETTER JA\r
++0B9D          ; disallowed                             # NA   <reserved-0B9D>\r
++0B9E..0B9F    ; valid                                  # 1.1  TAMIL LETTER NYA..TAMIL LETTER TTA\r
++0BA0..0BA2    ; disallowed                             # NA   <reserved-0BA0>..<reserved-0BA2>\r
++0BA3..0BA4    ; valid                                  # 1.1  TAMIL LETTER NNA..TAMIL LETTER TA\r
++0BA5..0BA7    ; disallowed                             # NA   <reserved-0BA5>..<reserved-0BA7>\r
++0BA8..0BAA    ; valid                                  # 1.1  TAMIL LETTER NA..TAMIL LETTER PA\r
++0BAB..0BAD    ; disallowed                             # NA   <reserved-0BAB>..<reserved-0BAD>\r
++0BAE..0BB5    ; valid                                  # 1.1  TAMIL LETTER MA..TAMIL LETTER VA\r
++0BB6          ; valid                                  # 4.1  TAMIL LETTER SHA\r
++0BB7..0BB9    ; valid                                  # 1.1  TAMIL LETTER SSA..TAMIL LETTER HA\r
++0BBA..0BBD    ; disallowed                             # NA   <reserved-0BBA>..<reserved-0BBD>\r
++0BBE..0BC2    ; valid                                  # 1.1  TAMIL VOWEL SIGN AA..TAMIL VOWEL SIGN UU\r
++0BC3..0BC5    ; disallowed                             # NA   <reserved-0BC3>..<reserved-0BC5>\r
++0BC6..0BC8    ; valid                                  # 1.1  TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI\r
++0BC9          ; disallowed                             # NA   <reserved-0BC9>\r
++0BCA..0BCD    ; valid                                  # 1.1  TAMIL VOWEL SIGN O..TAMIL SIGN VIRAMA\r
++0BCE..0BCF    ; disallowed                             # NA   <reserved-0BCE>..<reserved-0BCF>\r
++0BD0          ; valid                                  # 5.1  TAMIL OM\r
++0BD1..0BD6    ; disallowed                             # NA   <reserved-0BD1>..<reserved-0BD6>\r
++0BD7          ; valid                                  # 1.1  TAMIL AU LENGTH MARK\r
++0BD8..0BE5    ; disallowed                             # NA   <reserved-0BD8>..<reserved-0BE5>\r
++0BE6          ; valid                                  # 4.1  TAMIL DIGIT ZERO\r
++0BE7..0BEF    ; valid                                  # 1.1  TAMIL DIGIT ONE..TAMIL DIGIT NINE\r
++0BF0..0BF2    ; valid                  ;      ; NV8    # 1.1  TAMIL NUMBER TEN..TAMIL NUMBER ONE THOUSAND\r
++0BF3..0BFA    ; valid                  ;      ; NV8    # 4.0  TAMIL DAY SIGN..TAMIL NUMBER SIGN\r
++0BFB..0BFF    ; disallowed                             # NA   <reserved-0BFB>..<reserved-0BFF>\r
++0C00          ; valid                                  # 7.0  TELUGU SIGN COMBINING CANDRABINDU ABOVE\r
++0C01..0C03    ; valid                                  # 1.1  TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA\r
++0C04          ; disallowed                             # NA   <reserved-0C04>\r
++0C05..0C0C    ; valid                                  # 1.1  TELUGU LETTER A..TELUGU LETTER VOCALIC L\r
++0C0D          ; disallowed                             # NA   <reserved-0C0D>\r
++0C0E..0C10    ; valid                                  # 1.1  TELUGU LETTER E..TELUGU LETTER AI\r
++0C11          ; disallowed                             # NA   <reserved-0C11>\r
++0C12..0C28    ; valid                                  # 1.1  TELUGU LETTER O..TELUGU LETTER NA\r
++0C29          ; disallowed                             # NA   <reserved-0C29>\r
++0C2A..0C33    ; valid                                  # 1.1  TELUGU LETTER PA..TELUGU LETTER LLA\r
++0C34          ; valid                                  # 7.0  TELUGU LETTER LLLA\r
++0C35..0C39    ; valid                                  # 1.1  TELUGU LETTER VA..TELUGU LETTER HA\r
++0C3A..0C3C    ; disallowed                             # NA   <reserved-0C3A>..<reserved-0C3C>\r
++0C3D          ; valid                                  # 5.1  TELUGU SIGN AVAGRAHA\r
++0C3E..0C44    ; valid                                  # 1.1  TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN VOCALIC RR\r
++0C45          ; disallowed                             # NA   <reserved-0C45>\r
++0C46..0C48    ; valid                                  # 1.1  TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI\r
++0C49          ; disallowed                             # NA   <reserved-0C49>\r
++0C4A..0C4D    ; valid                                  # 1.1  TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA\r
++0C4E..0C54    ; disallowed                             # NA   <reserved-0C4E>..<reserved-0C54>\r
++0C55..0C56    ; valid                                  # 1.1  TELUGU LENGTH MARK..TELUGU AI LENGTH MARK\r
++0C57          ; disallowed                             # NA   <reserved-0C57>\r
++0C58..0C59    ; valid                                  # 5.1  TELUGU LETTER TSA..TELUGU LETTER DZA\r
++0C5A          ; valid                                  # 8.0  TELUGU LETTER RRRA\r
++0C5B..0C5F    ; disallowed                             # NA   <reserved-0C5B>..<reserved-0C5F>\r
++0C60..0C61    ; valid                                  # 1.1  TELUGU LETTER VOCALIC RR..TELUGU LETTER VOCALIC LL\r
++0C62..0C63    ; valid                                  # 5.1  TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL\r
++0C64..0C65    ; disallowed                             # NA   <reserved-0C64>..<reserved-0C65>\r
++0C66..0C6F    ; valid                                  # 1.1  TELUGU DIGIT ZERO..TELUGU DIGIT NINE\r
++0C70..0C77    ; disallowed                             # NA   <reserved-0C70>..<reserved-0C77>\r
++0C78..0C7F    ; valid                  ;      ; NV8    # 5.1  TELUGU FRACTION DIGIT ZERO FOR ODD POWERS OF FOUR..TELUGU SIGN TUUMU\r
++0C80          ; valid                                  # 9.0  KANNADA SIGN SPACING CANDRABINDU\r
++0C81          ; valid                                  # 7.0  KANNADA SIGN CANDRABINDU\r
++0C82..0C83    ; valid                                  # 1.1  KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA\r
++0C84          ; disallowed                             # NA   <reserved-0C84>\r
++0C85..0C8C    ; valid                                  # 1.1  KANNADA LETTER A..KANNADA LETTER VOCALIC L\r
++0C8D          ; disallowed                             # NA   <reserved-0C8D>\r
++0C8E..0C90    ; valid                                  # 1.1  KANNADA LETTER E..KANNADA LETTER AI\r
++0C91          ; disallowed                             # NA   <reserved-0C91>\r
++0C92..0CA8    ; valid                                  # 1.1  KANNADA LETTER O..KANNADA LETTER NA\r
++0CA9          ; disallowed                             # NA   <reserved-0CA9>\r
++0CAA..0CB3    ; valid                                  # 1.1  KANNADA LETTER PA..KANNADA LETTER LLA\r
++0CB4          ; disallowed                             # NA   <reserved-0CB4>\r
++0CB5..0CB9    ; valid                                  # 1.1  KANNADA LETTER VA..KANNADA LETTER HA\r
++0CBA..0CBB    ; disallowed                             # NA   <reserved-0CBA>..<reserved-0CBB>\r
++0CBC..0CBD    ; valid                                  # 4.0  KANNADA SIGN NUKTA..KANNADA SIGN AVAGRAHA\r
++0CBE..0CC4    ; valid                                  # 1.1  KANNADA VOWEL SIGN AA..KANNADA VOWEL SIGN VOCALIC RR\r
++0CC5          ; disallowed                             # NA   <reserved-0CC5>\r
++0CC6..0CC8    ; valid                                  # 1.1  KANNADA VOWEL SIGN E..KANNADA VOWEL SIGN AI\r
++0CC9          ; disallowed                             # NA   <reserved-0CC9>\r
++0CCA..0CCD    ; valid                                  # 1.1  KANNADA VOWEL SIGN O..KANNADA SIGN VIRAMA\r
++0CCE..0CD4    ; disallowed                             # NA   <reserved-0CCE>..<reserved-0CD4>\r
++0CD5..0CD6    ; valid                                  # 1.1  KANNADA LENGTH MARK..KANNADA AI LENGTH MARK\r
++0CD7..0CDD    ; disallowed                             # NA   <reserved-0CD7>..<reserved-0CDD>\r
++0CDE          ; valid                                  # 1.1  KANNADA LETTER FA\r
++0CDF          ; disallowed                             # NA   <reserved-0CDF>\r
++0CE0..0CE1    ; valid                                  # 1.1  KANNADA LETTER VOCALIC RR..KANNADA LETTER VOCALIC LL\r
++0CE2..0CE3    ; valid                                  # 5.0  KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL\r
++0CE4..0CE5    ; disallowed                             # NA   <reserved-0CE4>..<reserved-0CE5>\r
++0CE6..0CEF    ; valid                                  # 1.1  KANNADA DIGIT ZERO..KANNADA DIGIT NINE\r
++0CF0          ; disallowed                             # NA   <reserved-0CF0>\r
++0CF1..0CF2    ; valid                                  # 5.0  KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA\r
++0CF3..0CFF    ; disallowed                             # NA   <reserved-0CF3>..<reserved-0CFF>\r
++0D00          ; valid                                  # 10.0 MALAYALAM SIGN COMBINING ANUSVARA ABOVE\r
++0D01          ; valid                                  # 7.0  MALAYALAM SIGN CANDRABINDU\r
++0D02..0D03    ; valid                                  # 1.1  MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA\r
++0D04          ; disallowed                             # NA   <reserved-0D04>\r
++0D05..0D0C    ; valid                                  # 1.1  MALAYALAM LETTER A..MALAYALAM LETTER VOCALIC L\r
++0D0D          ; disallowed                             # NA   <reserved-0D0D>\r
++0D0E..0D10    ; valid                                  # 1.1  MALAYALAM LETTER E..MALAYALAM LETTER AI\r
++0D11          ; disallowed                             # NA   <reserved-0D11>\r
++0D12..0D28    ; valid                                  # 1.1  MALAYALAM LETTER O..MALAYALAM LETTER NA\r
++0D29          ; valid                                  # 6.0  MALAYALAM LETTER NNNA\r
++0D2A..0D39    ; valid                                  # 1.1  MALAYALAM LETTER PA..MALAYALAM LETTER HA\r
++0D3A          ; valid                                  # 6.0  MALAYALAM LETTER TTTA\r
++0D3B..0D3C    ; valid                                  # 10.0 MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA\r
++0D3D          ; valid                                  # 5.1  MALAYALAM SIGN AVAGRAHA\r
++0D3E..0D43    ; valid                                  # 1.1  MALAYALAM VOWEL SIGN AA..MALAYALAM VOWEL SIGN VOCALIC R\r
++0D44          ; valid                                  # 5.1  MALAYALAM VOWEL SIGN VOCALIC RR\r
++0D45          ; disallowed                             # NA   <reserved-0D45>\r
++0D46..0D48    ; valid                                  # 1.1  MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI\r
++0D49          ; disallowed                             # NA   <reserved-0D49>\r
++0D4A..0D4D    ; valid                                  # 1.1  MALAYALAM VOWEL SIGN O..MALAYALAM SIGN VIRAMA\r
++0D4E          ; valid                                  # 6.0  MALAYALAM LETTER DOT REPH\r
++0D4F          ; valid                  ;      ; NV8    # 9.0  MALAYALAM SIGN PARA\r
++0D50..0D53    ; disallowed                             # NA   <reserved-0D50>..<reserved-0D53>\r
++0D54..0D56    ; valid                                  # 9.0  MALAYALAM LETTER CHILLU M..MALAYALAM LETTER CHILLU LLL\r
++0D57          ; valid                                  # 1.1  MALAYALAM AU LENGTH MARK\r
++0D58..0D5E    ; valid                  ;      ; NV8    # 9.0  MALAYALAM FRACTION ONE ONE-HUNDRED-AND-SIXTIETH..MALAYALAM FRACTION ONE FIFTH\r
++0D5F          ; valid                                  # 8.0  MALAYALAM LETTER ARCHAIC II\r
++0D60..0D61    ; valid                                  # 1.1  MALAYALAM LETTER VOCALIC RR..MALAYALAM LETTER VOCALIC LL\r
++0D62..0D63    ; valid                                  # 5.1  MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL\r
++0D64..0D65    ; disallowed                             # NA   <reserved-0D64>..<reserved-0D65>\r
++0D66..0D6F    ; valid                                  # 1.1  MALAYALAM DIGIT ZERO..MALAYALAM DIGIT NINE\r
++0D70..0D75    ; valid                  ;      ; NV8    # 5.1  MALAYALAM NUMBER TEN..MALAYALAM FRACTION THREE QUARTERS\r
++0D76..0D78    ; valid                  ;      ; NV8    # 9.0  MALAYALAM FRACTION ONE SIXTEENTH..MALAYALAM FRACTION THREE SIXTEENTHS\r
++0D79          ; valid                  ;      ; NV8    # 5.1  MALAYALAM DATE MARK\r
++0D7A..0D7F    ; valid                                  # 5.1  MALAYALAM LETTER CHILLU NN..MALAYALAM LETTER CHILLU K\r
++0D80..0D81    ; disallowed                             # NA   <reserved-0D80>..<reserved-0D81>\r
++0D82..0D83    ; valid                                  # 3.0  SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA\r
++0D84          ; disallowed                             # NA   <reserved-0D84>\r
++0D85..0D96    ; valid                                  # 3.0  SINHALA LETTER AYANNA..SINHALA LETTER AUYANNA\r
++0D97..0D99    ; disallowed                             # NA   <reserved-0D97>..<reserved-0D99>\r
++0D9A..0DB1    ; valid                                  # 3.0  SINHALA LETTER ALPAPRAANA KAYANNA..SINHALA LETTER DANTAJA NAYANNA\r
++0DB2          ; disallowed                             # NA   <reserved-0DB2>\r
++0DB3..0DBB    ; valid                                  # 3.0  SINHALA LETTER SANYAKA DAYANNA..SINHALA LETTER RAYANNA\r
++0DBC          ; disallowed                             # NA   <reserved-0DBC>\r
++0DBD          ; valid                                  # 3.0  SINHALA LETTER DANTAJA LAYANNA\r
++0DBE..0DBF    ; disallowed                             # NA   <reserved-0DBE>..<reserved-0DBF>\r
++0DC0..0DC6    ; valid                                  # 3.0  SINHALA LETTER VAYANNA..SINHALA LETTER FAYANNA\r
++0DC7..0DC9    ; disallowed                             # NA   <reserved-0DC7>..<reserved-0DC9>\r
++0DCA          ; valid                                  # 3.0  SINHALA SIGN AL-LAKUNA\r
++0DCB..0DCE    ; disallowed                             # NA   <reserved-0DCB>..<reserved-0DCE>\r
++0DCF..0DD4    ; valid                                  # 3.0  SINHALA VOWEL SIGN AELA-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA\r
++0DD5          ; disallowed                             # NA   <reserved-0DD5>\r
++0DD6          ; valid                                  # 3.0  SINHALA VOWEL SIGN DIGA PAA-PILLA\r
++0DD7          ; disallowed                             # NA   <reserved-0DD7>\r
++0DD8..0DDF    ; valid                                  # 3.0  SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN GAYANUKITTA\r
++0DE0..0DE5    ; disallowed                             # NA   <reserved-0DE0>..<reserved-0DE5>\r
++0DE6..0DEF    ; valid                                  # 7.0  SINHALA LITH DIGIT ZERO..SINHALA LITH DIGIT NINE\r
++0DF0..0DF1    ; disallowed                             # NA   <reserved-0DF0>..<reserved-0DF1>\r
++0DF2..0DF3    ; valid                                  # 3.0  SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA\r
++0DF4          ; valid                  ;      ; NV8    # 3.0  SINHALA PUNCTUATION KUNDDALIYA\r
++0DF5..0E00    ; disallowed                             # NA   <reserved-0DF5>..<reserved-0E00>\r
++0E01..0E32    ; valid                                  # 1.1  THAI CHARACTER KO KAI..THAI CHARACTER SARA AA\r
++0E33          ; mapped                 ; 0E4D 0E32     # 1.1  THAI CHARACTER SARA AM\r
++0E34..0E3A    ; valid                                  # 1.1  THAI CHARACTER SARA I..THAI CHARACTER PHINTHU\r
++0E3B..0E3E    ; disallowed                             # NA   <reserved-0E3B>..<reserved-0E3E>\r
++0E3F          ; valid                  ;      ; NV8    # 1.1  THAI CURRENCY SYMBOL BAHT\r
++0E40..0E4E    ; valid                                  # 1.1  THAI CHARACTER SARA E..THAI CHARACTER YAMAKKAN\r
++0E4F          ; valid                  ;      ; NV8    # 1.1  THAI CHARACTER FONGMAN\r
++0E50..0E59    ; valid                                  # 1.1  THAI DIGIT ZERO..THAI DIGIT NINE\r
++0E5A..0E5B    ; valid                  ;      ; NV8    # 1.1  THAI CHARACTER ANGKHANKHU..THAI CHARACTER KHOMUT\r
++0E5C..0E80    ; disallowed                             # NA   <reserved-0E5C>..<reserved-0E80>\r
++0E81..0E82    ; valid                                  # 1.1  LAO LETTER KO..LAO LETTER KHO SUNG\r
++0E83          ; disallowed                             # NA   <reserved-0E83>\r
++0E84          ; valid                                  # 1.1  LAO LETTER KHO TAM\r
++0E85..0E86    ; disallowed                             # NA   <reserved-0E85>..<reserved-0E86>\r
++0E87..0E88    ; valid                                  # 1.1  LAO LETTER NGO..LAO LETTER CO\r
++0E89          ; disallowed                             # NA   <reserved-0E89>\r
++0E8A          ; valid                                  # 1.1  LAO LETTER SO TAM\r
++0E8B..0E8C    ; disallowed                             # NA   <reserved-0E8B>..<reserved-0E8C>\r
++0E8D          ; valid                                  # 1.1  LAO LETTER NYO\r
++0E8E..0E93    ; disallowed                             # NA   <reserved-0E8E>..<reserved-0E93>\r
++0E94..0E97    ; valid                                  # 1.1  LAO LETTER DO..LAO LETTER THO TAM\r
++0E98          ; disallowed                             # NA   <reserved-0E98>\r
++0E99..0E9F    ; valid                                  # 1.1  LAO LETTER NO..LAO LETTER FO SUNG\r
++0EA0          ; disallowed                             # NA   <reserved-0EA0>\r
++0EA1..0EA3    ; valid                                  # 1.1  LAO LETTER MO..LAO LETTER LO LING\r
++0EA4          ; disallowed                             # NA   <reserved-0EA4>\r
++0EA5          ; valid                                  # 1.1  LAO LETTER LO LOOT\r
++0EA6          ; disallowed                             # NA   <reserved-0EA6>\r
++0EA7          ; valid                                  # 1.1  LAO LETTER WO\r
++0EA8..0EA9    ; disallowed                             # NA   <reserved-0EA8>..<reserved-0EA9>\r
++0EAA..0EAB    ; valid                                  # 1.1  LAO LETTER SO SUNG..LAO LETTER HO SUNG\r
++0EAC          ; disallowed                             # NA   <reserved-0EAC>\r
++0EAD..0EB2    ; valid                                  # 1.1  LAO LETTER O..LAO VOWEL SIGN AA\r
++0EB3          ; mapped                 ; 0ECD 0EB2     # 1.1  LAO VOWEL SIGN AM\r
++0EB4..0EB9    ; valid                                  # 1.1  LAO VOWEL SIGN I..LAO VOWEL SIGN UU\r
++0EBA          ; disallowed                             # NA   <reserved-0EBA>\r
++0EBB..0EBD    ; valid                                  # 1.1  LAO VOWEL SIGN MAI KON..LAO SEMIVOWEL SIGN NYO\r
++0EBE..0EBF    ; disallowed                             # NA   <reserved-0EBE>..<reserved-0EBF>\r
++0EC0..0EC4    ; valid                                  # 1.1  LAO VOWEL SIGN E..LAO VOWEL SIGN AI\r
++0EC5          ; disallowed                             # NA   <reserved-0EC5>\r
++0EC6          ; valid                                  # 1.1  LAO KO LA\r
++0EC7          ; disallowed                             # NA   <reserved-0EC7>\r
++0EC8..0ECD    ; valid                                  # 1.1  LAO TONE MAI EK..LAO NIGGAHITA\r
++0ECE..0ECF    ; disallowed                             # NA   <reserved-0ECE>..<reserved-0ECF>\r
++0ED0..0ED9    ; valid                                  # 1.1  LAO DIGIT ZERO..LAO DIGIT NINE\r
++0EDA..0EDB    ; disallowed                             # NA   <reserved-0EDA>..<reserved-0EDB>\r
++0EDC          ; mapped                 ; 0EAB 0E99     # 1.1  LAO HO NO\r
++0EDD          ; mapped                 ; 0EAB 0EA1     # 1.1  LAO HO MO\r
++0EDE..0EDF    ; valid                                  # 6.1  LAO LETTER KHMU GO..LAO LETTER KHMU NYO\r
++0EE0..0EFF    ; disallowed                             # NA   <reserved-0EE0>..<reserved-0EFF>\r
++0F00          ; valid                                  # 2.0  TIBETAN SYLLABLE OM\r
++0F01..0F0A    ; valid                  ;      ; NV8    # 2.0  TIBETAN MARK GTER YIG MGO TRUNCATED A..TIBETAN MARK BKA- SHOG YIG MGO\r
++0F0B          ; valid                                  # 2.0  TIBETAN MARK INTERSYLLABIC TSHEG\r
++0F0C          ; mapped                 ; 0F0B          # 2.0  TIBETAN MARK DELIMITER TSHEG BSTAR\r
++0F0D..0F17    ; valid                  ;      ; NV8    # 2.0  TIBETAN MARK SHAD..TIBETAN ASTROLOGICAL SIGN SGRA GCAN -CHAR RTAGS\r
++0F18..0F19    ; valid                                  # 2.0  TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS\r
++0F1A..0F1F    ; valid                  ;      ; NV8    # 2.0  TIBETAN SIGN RDEL DKAR GCIG..TIBETAN SIGN RDEL DKAR RDEL NAG\r
++0F20..0F29    ; valid                                  # 2.0  TIBETAN DIGIT ZERO..TIBETAN DIGIT NINE\r
++0F2A..0F34    ; valid                  ;      ; NV8    # 2.0  TIBETAN DIGIT HALF ONE..TIBETAN MARK BSDUS RTAGS\r
++0F35          ; valid                                  # 2.0  TIBETAN MARK NGAS BZUNG NYI ZLA\r
++0F36          ; valid                  ;      ; NV8    # 2.0  TIBETAN MARK CARET -DZUD RTAGS BZHI MIG CAN\r
++0F37          ; valid                                  # 2.0  TIBETAN MARK NGAS BZUNG SGOR RTAGS\r
++0F38          ; valid                  ;      ; NV8    # 2.0  TIBETAN MARK CHE MGO\r
++0F39          ; valid                                  # 2.0  TIBETAN MARK TSA -PHRU\r
++0F3A..0F3D    ; valid                  ;      ; NV8    # 2.0  TIBETAN MARK GUG RTAGS GYON..TIBETAN MARK ANG KHANG GYAS\r
++0F3E..0F42    ; valid                                  # 2.0  TIBETAN SIGN YAR TSHES..TIBETAN LETTER GA\r
++0F43          ; mapped                 ; 0F42 0FB7     # 2.0  TIBETAN LETTER GHA\r
++0F44..0F47    ; valid                                  # 2.0  TIBETAN LETTER NGA..TIBETAN LETTER JA\r
++0F48          ; disallowed                             # NA   <reserved-0F48>\r
++0F49..0F4C    ; valid                                  # 2.0  TIBETAN LETTER NYA..TIBETAN LETTER DDA\r
++0F4D          ; mapped                 ; 0F4C 0FB7     # 2.0  TIBETAN LETTER DDHA\r
++0F4E..0F51    ; valid                                  # 2.0  TIBETAN LETTER NNA..TIBETAN LETTER DA\r
++0F52          ; mapped                 ; 0F51 0FB7     # 2.0  TIBETAN LETTER DHA\r
++0F53..0F56    ; valid                                  # 2.0  TIBETAN LETTER NA..TIBETAN LETTER BA\r
++0F57          ; mapped                 ; 0F56 0FB7     # 2.0  TIBETAN LETTER BHA\r
++0F58..0F5B    ; valid                                  # 2.0  TIBETAN LETTER MA..TIBETAN LETTER DZA\r
++0F5C          ; mapped                 ; 0F5B 0FB7     # 2.0  TIBETAN LETTER DZHA\r
++0F5D..0F68    ; valid                                  # 2.0  TIBETAN LETTER WA..TIBETAN LETTER A\r
++0F69          ; mapped                 ; 0F40 0FB5     # 2.0  TIBETAN LETTER KSSA\r
++0F6A          ; valid                                  # 3.0  TIBETAN LETTER FIXED-FORM RA\r
++0F6B..0F6C    ; valid                                  # 5.1  TIBETAN LETTER KKA..TIBETAN LETTER RRA\r
++0F6D..0F70    ; disallowed                             # NA   <reserved-0F6D>..<reserved-0F70>\r
++0F71..0F72    ; valid                                  # 2.0  TIBETAN VOWEL SIGN AA..TIBETAN VOWEL SIGN I\r
++0F73          ; mapped                 ; 0F71 0F72     # 2.0  TIBETAN VOWEL SIGN II\r
++0F74          ; valid                                  # 2.0  TIBETAN VOWEL SIGN U\r
++0F75          ; mapped                 ; 0F71 0F74     # 2.0  TIBETAN VOWEL SIGN UU\r
++0F76          ; mapped                 ; 0FB2 0F80     # 2.0  TIBETAN VOWEL SIGN VOCALIC R\r
++0F77          ; mapped                 ; 0FB2 0F71 0F80 #2.0  TIBETAN VOWEL SIGN VOCALIC RR\r
++0F78          ; mapped                 ; 0FB3 0F80     # 2.0  TIBETAN VOWEL SIGN VOCALIC L\r
++0F79          ; mapped                 ; 0FB3 0F71 0F80 #2.0  TIBETAN VOWEL SIGN VOCALIC LL\r
++0F7A..0F80    ; valid                                  # 2.0  TIBETAN VOWEL SIGN E..TIBETAN VOWEL SIGN REVERSED I\r
++0F81          ; mapped                 ; 0F71 0F80     # 2.0  TIBETAN VOWEL SIGN REVERSED II\r
++0F82..0F84    ; valid                                  # 2.0  TIBETAN SIGN NYI ZLA NAA DA..TIBETAN MARK HALANTA\r
++0F85          ; valid                  ;      ; NV8    # 2.0  TIBETAN MARK PALUTA\r
++0F86..0F8B    ; valid                                  # 2.0  TIBETAN SIGN LCI RTAGS..TIBETAN SIGN GRU MED RGYINGS\r
++0F8C..0F8F    ; valid                                  # 6.0  TIBETAN SIGN INVERTED MCHU CAN..TIBETAN SUBJOINED SIGN INVERTED MCHU CAN\r
++0F90..0F92    ; valid                                  # 2.0  TIBETAN SUBJOINED LETTER KA..TIBETAN SUBJOINED LETTER GA\r
++0F93          ; mapped                 ; 0F92 0FB7     # 2.0  TIBETAN SUBJOINED LETTER GHA\r
++0F94..0F95    ; valid                                  # 2.0  TIBETAN SUBJOINED LETTER NGA..TIBETAN SUBJOINED LETTER CA\r
++0F96          ; valid                                  # 3.0  TIBETAN SUBJOINED LETTER CHA\r
++0F97          ; valid                                  # 2.0  TIBETAN SUBJOINED LETTER JA\r
++0F98          ; disallowed                             # NA   <reserved-0F98>\r
++0F99..0F9C    ; valid                                  # 2.0  TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER DDA\r
++0F9D          ; mapped                 ; 0F9C 0FB7     # 2.0  TIBETAN SUBJOINED LETTER DDHA\r
++0F9E..0FA1    ; valid                                  # 2.0  TIBETAN SUBJOINED LETTER NNA..TIBETAN SUBJOINED LETTER DA\r
++0FA2          ; mapped                 ; 0FA1 0FB7     # 2.0  TIBETAN SUBJOINED LETTER DHA\r
++0FA3..0FA6    ; valid                                  # 2.0  TIBETAN SUBJOINED LETTER NA..TIBETAN SUBJOINED LETTER BA\r
++0FA7          ; mapped                 ; 0FA6 0FB7     # 2.0  TIBETAN SUBJOINED LETTER BHA\r
++0FA8..0FAB    ; valid                                  # 2.0  TIBETAN SUBJOINED LETTER MA..TIBETAN SUBJOINED LETTER DZA\r
++0FAC          ; mapped                 ; 0FAB 0FB7     # 2.0  TIBETAN SUBJOINED LETTER DZHA\r
++0FAD          ; valid                                  # 2.0  TIBETAN SUBJOINED LETTER WA\r
++0FAE..0FB0    ; valid                                  # 3.0  TIBETAN SUBJOINED LETTER ZHA..TIBETAN SUBJOINED LETTER -A\r
++0FB1..0FB7    ; valid                                  # 2.0  TIBETAN SUBJOINED LETTER YA..TIBETAN SUBJOINED LETTER HA\r
++0FB8          ; valid                                  # 3.0  TIBETAN SUBJOINED LETTER A\r
++0FB9          ; mapped                 ; 0F90 0FB5     # 2.0  TIBETAN SUBJOINED LETTER KSSA\r
++0FBA..0FBC    ; valid                                  # 3.0  TIBETAN SUBJOINED LETTER FIXED-FORM WA..TIBETAN SUBJOINED LETTER FIXED-FORM RA\r
++0FBD          ; disallowed                             # NA   <reserved-0FBD>\r
++0FBE..0FC5    ; valid                  ;      ; NV8    # 3.0  TIBETAN KU RU KHA..TIBETAN SYMBOL RDO RJE\r
++0FC6          ; valid                                  # 3.0  TIBETAN SYMBOL PADMA GDAN\r
++0FC7..0FCC    ; valid                  ;      ; NV8    # 3.0  TIBETAN SYMBOL RDO RJE RGYA GRAM..TIBETAN SYMBOL NOR BU BZHI -KHYIL\r
++0FCD          ; disallowed                             # NA   <reserved-0FCD>\r
++0FCE          ; valid                  ;      ; NV8    # 5.1  TIBETAN SIGN RDEL NAG RDEL DKAR\r
++0FCF          ; valid                  ;      ; NV8    # 3.0  TIBETAN SIGN RDEL NAG GSUM\r
++0FD0..0FD1    ; valid                  ;      ; NV8    # 4.1  TIBETAN MARK BSKA- SHOG GI MGO RGYAN..TIBETAN MARK MNYAM YIG GI MGO RGYAN\r
++0FD2..0FD4    ; valid                  ;      ; NV8    # 5.1  TIBETAN MARK NYIS TSHEG..TIBETAN MARK CLOSING BRDA RNYING YIG MGO SGAB MA\r
++0FD5..0FD8    ; valid                  ;      ; NV8    # 5.2  RIGHT-FACING SVASTI SIGN..LEFT-FACING SVASTI SIGN WITH DOTS\r
++0FD9..0FDA    ; valid                  ;      ; NV8    # 6.0  TIBETAN MARK LEADING MCHAN RTAGS..TIBETAN MARK TRAILING MCHAN RTAGS\r
++0FDB..0FFF    ; disallowed                             # NA   <reserved-0FDB>..<reserved-0FFF>\r
++1000..1021    ; valid                                  # 3.0  MYANMAR LETTER KA..MYANMAR LETTER A\r
++1022          ; valid                                  # 5.1  MYANMAR LETTER SHAN A\r
++1023..1027    ; valid                                  # 3.0  MYANMAR LETTER I..MYANMAR LETTER E\r
++1028          ; valid                                  # 5.1  MYANMAR LETTER MON E\r
++1029..102A    ; valid                                  # 3.0  MYANMAR LETTER O..MYANMAR LETTER AU\r
++102B          ; valid                                  # 5.1  MYANMAR VOWEL SIGN TALL AA\r
++102C..1032    ; valid                                  # 3.0  MYANMAR VOWEL SIGN AA..MYANMAR VOWEL SIGN AI\r
++1033..1035    ; valid                                  # 5.1  MYANMAR VOWEL SIGN MON II..MYANMAR VOWEL SIGN E ABOVE\r
++1036..1039    ; valid                                  # 3.0  MYANMAR SIGN ANUSVARA..MYANMAR SIGN VIRAMA\r
++103A..103F    ; valid                                  # 5.1  MYANMAR SIGN ASAT..MYANMAR LETTER GREAT SA\r
++1040..1049    ; valid                                  # 3.0  MYANMAR DIGIT ZERO..MYANMAR DIGIT NINE\r
++104A..104F    ; valid                  ;      ; NV8    # 3.0  MYANMAR SIGN LITTLE SECTION..MYANMAR SYMBOL GENITIVE\r
++1050..1059    ; valid                                  # 3.0  MYANMAR LETTER SHA..MYANMAR VOWEL SIGN VOCALIC LL\r
++105A..1099    ; valid                                  # 5.1  MYANMAR LETTER MON NGA..MYANMAR SHAN DIGIT NINE\r
++109A..109D    ; valid                                  # 5.2  MYANMAR SIGN KHAMTI TONE-1..MYANMAR VOWEL SIGN AITON AI\r
++109E..109F    ; valid                  ;      ; NV8    # 5.1  MYANMAR SYMBOL SHAN ONE..MYANMAR SYMBOL SHAN EXCLAMATION\r
++10A0..10C5    ; disallowed                             # 1.1  GEORGIAN CAPITAL LETTER AN..GEORGIAN CAPITAL LETTER HOE\r
++10C6          ; disallowed                             # NA   <reserved-10C6>\r
++10C7          ; mapped                 ; 2D27          # 6.1  GEORGIAN CAPITAL LETTER YN\r
++10C8..10CC    ; disallowed                             # NA   <reserved-10C8>..<reserved-10CC>\r
++10CD          ; mapped                 ; 2D2D          # 6.1  GEORGIAN CAPITAL LETTER AEN\r
++10CE..10CF    ; disallowed                             # NA   <reserved-10CE>..<reserved-10CF>\r
++10D0..10F6    ; valid                                  # 1.1  GEORGIAN LETTER AN..GEORGIAN LETTER FI\r
++10F7..10F8    ; valid                                  # 3.2  GEORGIAN LETTER YN..GEORGIAN LETTER ELIFI\r
++10F9..10FA    ; valid                                  # 4.1  GEORGIAN LETTER TURNED GAN..GEORGIAN LETTER AIN\r
++10FB          ; valid                  ;      ; NV8    # 1.1  GEORGIAN PARAGRAPH SEPARATOR\r
++10FC          ; mapped                 ; 10DC          # 4.1  MODIFIER LETTER GEORGIAN NAR\r
++10FD..10FF    ; valid                                  # 6.1  GEORGIAN LETTER AEN..GEORGIAN LETTER LABIAL SIGN\r
++1100..1159    ; valid                  ;      ; NV8    # 1.1  HANGUL CHOSEONG KIYEOK..HANGUL CHOSEONG YEORINHIEUH\r
++115A..115E    ; valid                  ;      ; NV8    # 5.2  HANGUL CHOSEONG KIYEOK-TIKEUT..HANGUL CHOSEONG TIKEUT-RIEUL\r
++115F..1160    ; disallowed                             # 1.1  HANGUL CHOSEONG FILLER..HANGUL JUNGSEONG FILLER\r
++1161..11A2    ; valid                  ;      ; NV8    # 1.1  HANGUL JUNGSEONG A..HANGUL JUNGSEONG SSANGARAEA\r
++11A3..11A7    ; valid                  ;      ; NV8    # 5.2  HANGUL JUNGSEONG A-EU..HANGUL JUNGSEONG O-YAE\r
++11A8..11F9    ; valid                  ;      ; NV8    # 1.1  HANGUL JONGSEONG KIYEOK..HANGUL JONGSEONG YEORINHIEUH\r
++11FA..11FF    ; valid                  ;      ; NV8    # 5.2  HANGUL JONGSEONG KIYEOK-NIEUN..HANGUL JONGSEONG SSANGNIEUN\r
++1200..1206    ; valid                                  # 3.0  ETHIOPIC SYLLABLE HA..ETHIOPIC SYLLABLE HO\r
++1207          ; valid                                  # 4.1  ETHIOPIC SYLLABLE HOA\r
++1208..1246    ; valid                                  # 3.0  ETHIOPIC SYLLABLE LA..ETHIOPIC SYLLABLE QO\r
++1247          ; valid                                  # 4.1  ETHIOPIC SYLLABLE QOA\r
++1248          ; valid                                  # 3.0  ETHIOPIC SYLLABLE QWA\r
++1249          ; disallowed                             # NA   <reserved-1249>\r
++124A..124D    ; valid                                  # 3.0  ETHIOPIC SYLLABLE QWI..ETHIOPIC SYLLABLE QWE\r
++124E..124F    ; disallowed                             # NA   <reserved-124E>..<reserved-124F>\r
++1250..1256    ; valid                                  # 3.0  ETHIOPIC SYLLABLE QHA..ETHIOPIC SYLLABLE QHO\r
++1257          ; disallowed                             # NA   <reserved-1257>\r
++1258          ; valid                                  # 3.0  ETHIOPIC SYLLABLE QHWA\r
++1259          ; disallowed                             # NA   <reserved-1259>\r
++125A..125D    ; valid                                  # 3.0  ETHIOPIC SYLLABLE QHWI..ETHIOPIC SYLLABLE QHWE\r
++125E..125F    ; disallowed                             # NA   <reserved-125E>..<reserved-125F>\r
++1260..1286    ; valid                                  # 3.0  ETHIOPIC SYLLABLE BA..ETHIOPIC SYLLABLE XO\r
++1287          ; valid                                  # 4.1  ETHIOPIC SYLLABLE XOA\r
++1288          ; valid                                  # 3.0  ETHIOPIC SYLLABLE XWA\r
++1289          ; disallowed                             # NA   <reserved-1289>\r
++128A..128D    ; valid                                  # 3.0  ETHIOPIC SYLLABLE XWI..ETHIOPIC SYLLABLE XWE\r
++128E..128F    ; disallowed                             # NA   <reserved-128E>..<reserved-128F>\r
++1290..12AE    ; valid                                  # 3.0  ETHIOPIC SYLLABLE NA..ETHIOPIC SYLLABLE KO\r
++12AF          ; valid                                  # 4.1  ETHIOPIC SYLLABLE KOA\r
++12B0          ; valid                                  # 3.0  ETHIOPIC SYLLABLE KWA\r
++12B1          ; disallowed                             # NA   <reserved-12B1>\r
++12B2..12B5    ; valid                                  # 3.0  ETHIOPIC SYLLABLE KWI..ETHIOPIC SYLLABLE KWE\r
++12B6..12B7    ; disallowed                             # NA   <reserved-12B6>..<reserved-12B7>\r
++12B8..12BE    ; valid                                  # 3.0  ETHIOPIC SYLLABLE KXA..ETHIOPIC SYLLABLE KXO\r
++12BF          ; disallowed                             # NA   <reserved-12BF>\r
++12C0          ; valid                                  # 3.0  ETHIOPIC SYLLABLE KXWA\r
++12C1          ; disallowed                             # NA   <reserved-12C1>\r
++12C2..12C5    ; valid                                  # 3.0  ETHIOPIC SYLLABLE KXWI..ETHIOPIC SYLLABLE KXWE\r
++12C6..12C7    ; disallowed                             # NA   <reserved-12C6>..<reserved-12C7>\r
++12C8..12CE    ; valid                                  # 3.0  ETHIOPIC SYLLABLE WA..ETHIOPIC SYLLABLE WO\r
++12CF          ; valid                                  # 4.1  ETHIOPIC SYLLABLE WOA\r
++12D0..12D6    ; valid                                  # 3.0  ETHIOPIC SYLLABLE PHARYNGEAL A..ETHIOPIC SYLLABLE PHARYNGEAL O\r
++12D7          ; disallowed                             # NA   <reserved-12D7>\r
++12D8..12EE    ; valid                                  # 3.0  ETHIOPIC SYLLABLE ZA..ETHIOPIC SYLLABLE YO\r
++12EF          ; valid                                  # 4.1  ETHIOPIC SYLLABLE YOA\r
++12F0..130E    ; valid                                  # 3.0  ETHIOPIC SYLLABLE DA..ETHIOPIC SYLLABLE GO\r
++130F          ; valid                                  # 4.1  ETHIOPIC SYLLABLE GOA\r
++1310          ; valid                                  # 3.0  ETHIOPIC SYLLABLE GWA\r
++1311          ; disallowed                             # NA   <reserved-1311>\r
++1312..1315    ; valid                                  # 3.0  ETHIOPIC SYLLABLE GWI..ETHIOPIC SYLLABLE GWE\r
++1316..1317    ; disallowed                             # NA   <reserved-1316>..<reserved-1317>\r
++1318..131E    ; valid                                  # 3.0  ETHIOPIC SYLLABLE GGA..ETHIOPIC SYLLABLE GGO\r
++131F          ; valid                                  # 4.1  ETHIOPIC SYLLABLE GGWAA\r
++1320..1346    ; valid                                  # 3.0  ETHIOPIC SYLLABLE THA..ETHIOPIC SYLLABLE TZO\r
++1347          ; valid                                  # 4.1  ETHIOPIC SYLLABLE TZOA\r
++1348..135A    ; valid                                  # 3.0  ETHIOPIC SYLLABLE FA..ETHIOPIC SYLLABLE FYA\r
++135B..135C    ; disallowed                             # NA   <reserved-135B>..<reserved-135C>\r
++135D..135E    ; valid                                  # 6.0  ETHIOPIC COMBINING GEMINATION AND VOWEL LENGTH MARK..ETHIOPIC COMBINING VOWEL LENGTH MARK\r
++135F          ; valid                                  # 4.1  ETHIOPIC COMBINING GEMINATION MARK\r
++1360          ; valid                  ;      ; NV8    # 4.1  ETHIOPIC SECTION MARK\r
++1361..137C    ; valid                  ;      ; NV8    # 3.0  ETHIOPIC WORDSPACE..ETHIOPIC NUMBER TEN THOUSAND\r
++137D..137F    ; disallowed                             # NA   <reserved-137D>..<reserved-137F>\r
++1380..138F    ; valid                                  # 4.1  ETHIOPIC SYLLABLE SEBATBEIT MWA..ETHIOPIC SYLLABLE PWE\r
++1390..1399    ; valid                  ;      ; NV8    # 4.1  ETHIOPIC TONAL MARK YIZET..ETHIOPIC TONAL MARK KURT\r
++139A..139F    ; disallowed                             # NA   <reserved-139A>..<reserved-139F>\r
++13A0..13F4    ; valid                                  # 3.0  CHEROKEE LETTER A..CHEROKEE LETTER YV\r
++13F5          ; valid                                  # 8.0  CHEROKEE LETTER MV\r
++13F6..13F7    ; disallowed                             # NA   <reserved-13F6>..<reserved-13F7>\r
++13F8          ; mapped                 ; 13F0          # 8.0  CHEROKEE SMALL LETTER YE\r
++13F9          ; mapped                 ; 13F1          # 8.0  CHEROKEE SMALL LETTER YI\r
++13FA          ; mapped                 ; 13F2          # 8.0  CHEROKEE SMALL LETTER YO\r
++13FB          ; mapped                 ; 13F3          # 8.0  CHEROKEE SMALL LETTER YU\r
++13FC          ; mapped                 ; 13F4          # 8.0  CHEROKEE SMALL LETTER YV\r
++13FD          ; mapped                 ; 13F5          # 8.0  CHEROKEE SMALL LETTER MV\r
++13FE..13FF    ; disallowed                             # NA   <reserved-13FE>..<reserved-13FF>\r
++1400          ; valid                  ;      ; NV8    # 5.2  CANADIAN SYLLABICS HYPHEN\r
++1401..166C    ; valid                                  # 3.0  CANADIAN SYLLABICS E..CANADIAN SYLLABICS CARRIER TTSA\r
++166D..166E    ; valid                  ;      ; NV8    # 3.0  CANADIAN SYLLABICS CHI SIGN..CANADIAN SYLLABICS FULL STOP\r
++166F..1676    ; valid                                  # 3.0  CANADIAN SYLLABICS QAI..CANADIAN SYLLABICS NNGAA\r
++1677..167F    ; valid                                  # 5.2  CANADIAN SYLLABICS WOODS-CREE THWEE..CANADIAN SYLLABICS BLACKFOOT W\r
++1680          ; disallowed                             # 3.0  OGHAM SPACE MARK\r
++1681..169A    ; valid                                  # 3.0  OGHAM LETTER BEITH..OGHAM LETTER PEITH\r
++169B..169C    ; valid                  ;      ; NV8    # 3.0  OGHAM FEATHER MARK..OGHAM REVERSED FEATHER MARK\r
++169D..169F    ; disallowed                             # NA   <reserved-169D>..<reserved-169F>\r
++16A0..16EA    ; valid                                  # 3.0  RUNIC LETTER FEHU FEOH FE F..RUNIC LETTER X\r
++16EB..16F0    ; valid                  ;      ; NV8    # 3.0  RUNIC SINGLE PUNCTUATION..RUNIC BELGTHOR SYMBOL\r
++16F1..16F8    ; valid                                  # 7.0  RUNIC LETTER K..RUNIC LETTER FRANKS CASKET AESC\r
++16F9..16FF    ; disallowed                             # NA   <reserved-16F9>..<reserved-16FF>\r
++1700..170C    ; valid                                  # 3.2  TAGALOG LETTER A..TAGALOG LETTER YA\r
++170D          ; disallowed                             # NA   <reserved-170D>\r
++170E..1714    ; valid                                  # 3.2  TAGALOG LETTER LA..TAGALOG SIGN VIRAMA\r
++1715..171F    ; disallowed                             # NA   <reserved-1715>..<reserved-171F>\r
++1720..1734    ; valid                                  # 3.2  HANUNOO LETTER A..HANUNOO SIGN PAMUDPOD\r
++1735..1736    ; valid                  ;      ; NV8    # 3.2  PHILIPPINE SINGLE PUNCTUATION..PHILIPPINE DOUBLE PUNCTUATION\r
++1737..173F    ; disallowed                             # NA   <reserved-1737>..<reserved-173F>\r
++1740..1753    ; valid                                  # 3.2  BUHID LETTER A..BUHID VOWEL SIGN U\r
++1754..175F    ; disallowed                             # NA   <reserved-1754>..<reserved-175F>\r
++1760..176C    ; valid                                  # 3.2  TAGBANWA LETTER A..TAGBANWA LETTER YA\r
++176D          ; disallowed                             # NA   <reserved-176D>\r
++176E..1770    ; valid                                  # 3.2  TAGBANWA LETTER LA..TAGBANWA LETTER SA\r
++1771          ; disallowed                             # NA   <reserved-1771>\r
++1772..1773    ; valid                                  # 3.2  TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U\r
++1774..177F    ; disallowed                             # NA   <reserved-1774>..<reserved-177F>\r
++1780..17B3    ; valid                                  # 3.0  KHMER LETTER KA..KHMER INDEPENDENT VOWEL QAU\r
++17B4..17B5    ; disallowed                             # 3.0  KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA\r
++17B6..17D3    ; valid                                  # 3.0  KHMER VOWEL SIGN AA..KHMER SIGN BATHAMASAT\r
++17D4..17D6    ; valid                  ;      ; NV8    # 3.0  KHMER SIGN KHAN..KHMER SIGN CAMNUC PII KUUH\r
++17D7          ; valid                                  # 3.0  KHMER SIGN LEK TOO\r
++17D8..17DB    ; valid                  ;      ; NV8    # 3.0  KHMER SIGN BEYYAL..KHMER CURRENCY SYMBOL RIEL\r
++17DC          ; valid                                  # 3.0  KHMER SIGN AVAKRAHASANYA\r
++17DD          ; valid                                  # 4.0  KHMER SIGN ATTHACAN\r
++17DE..17DF    ; disallowed                             # NA   <reserved-17DE>..<reserved-17DF>\r
++17E0..17E9    ; valid                                  # 3.0  KHMER DIGIT ZERO..KHMER DIGIT NINE\r
++17EA..17EF    ; disallowed                             # NA   <reserved-17EA>..<reserved-17EF>\r
++17F0..17F9    ; valid                  ;      ; NV8    # 4.0  KHMER SYMBOL LEK ATTAK SON..KHMER SYMBOL LEK ATTAK PRAM-BUON\r
++17FA..17FF    ; disallowed                             # NA   <reserved-17FA>..<reserved-17FF>\r
++1800..1805    ; valid                  ;      ; NV8    # 3.0  MONGOLIAN BIRGA..MONGOLIAN FOUR DOTS\r
++1806          ; disallowed                             # 3.0  MONGOLIAN TODO SOFT HYPHEN\r
++1807..180A    ; valid                  ;      ; NV8    # 3.0  MONGOLIAN SIBE SYLLABLE BOUNDARY MARKER..MONGOLIAN NIRUGU\r
++180B..180D    ; ignored                                # 3.0  MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE\r
++180E          ; disallowed                             # 3.0  MONGOLIAN VOWEL SEPARATOR\r
++180F          ; disallowed                             # NA   <reserved-180F>\r
++1810..1819    ; valid                                  # 3.0  MONGOLIAN DIGIT ZERO..MONGOLIAN DIGIT NINE\r
++181A..181F    ; disallowed                             # NA   <reserved-181A>..<reserved-181F>\r
++1820..1877    ; valid                                  # 3.0  MONGOLIAN LETTER A..MONGOLIAN LETTER MANCHU ZHA\r
++1878..187F    ; disallowed                             # NA   <reserved-1878>..<reserved-187F>\r
++1880..18A9    ; valid                                  # 3.0  MONGOLIAN LETTER ALI GALI ANUSVARA ONE..MONGOLIAN LETTER ALI GALI DAGALGA\r
++18AA          ; valid                                  # 5.1  MONGOLIAN LETTER MANCHU ALI GALI LHA\r
++18AB..18AF    ; disallowed                             # NA   <reserved-18AB>..<reserved-18AF>\r
++18B0..18F5    ; valid                                  # 5.2  CANADIAN SYLLABICS OY..CANADIAN SYLLABICS CARRIER DENTAL S\r
++18F6..18FF    ; disallowed                             # NA   <reserved-18F6>..<reserved-18FF>\r
++1900..191C    ; valid                                  # 4.0  LIMBU VOWEL-CARRIER LETTER..LIMBU LETTER HA\r
++191D..191E    ; valid                                  # 7.0  LIMBU LETTER GYAN..LIMBU LETTER TRA\r
++191F          ; disallowed                             # NA   <reserved-191F>\r
++1920..192B    ; valid                                  # 4.0  LIMBU VOWEL SIGN A..LIMBU SUBJOINED LETTER WA\r
++192C..192F    ; disallowed                             # NA   <reserved-192C>..<reserved-192F>\r
++1930..193B    ; valid                                  # 4.0  LIMBU SMALL LETTER KA..LIMBU SIGN SA-I\r
++193C..193F    ; disallowed                             # NA   <reserved-193C>..<reserved-193F>\r
++1940          ; valid                  ;      ; NV8    # 4.0  LIMBU SIGN LOO\r
++1941..1943    ; disallowed                             # NA   <reserved-1941>..<reserved-1943>\r
++1944..1945    ; valid                  ;      ; NV8    # 4.0  LIMBU EXCLAMATION MARK..LIMBU QUESTION MARK\r
++1946..196D    ; valid                                  # 4.0  LIMBU DIGIT ZERO..TAI LE LETTER AI\r
++196E..196F    ; disallowed                             # NA   <reserved-196E>..<reserved-196F>\r
++1970..1974    ; valid                                  # 4.0  TAI LE LETTER TONE-2..TAI LE LETTER TONE-6\r
++1975..197F    ; disallowed                             # NA   <reserved-1975>..<reserved-197F>\r
++1980..19A9    ; valid                                  # 4.1  NEW TAI LUE LETTER HIGH QA..NEW TAI LUE LETTER LOW XVA\r
++19AA..19AB    ; valid                                  # 5.2  NEW TAI LUE LETTER HIGH SUA..NEW TAI LUE LETTER LOW SUA\r
++19AC..19AF    ; disallowed                             # NA   <reserved-19AC>..<reserved-19AF>\r
++19B0..19C9    ; valid                                  # 4.1  NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW TAI LUE TONE MARK-2\r
++19CA..19CF    ; disallowed                             # NA   <reserved-19CA>..<reserved-19CF>\r
++19D0..19D9    ; valid                                  # 4.1  NEW TAI LUE DIGIT ZERO..NEW TAI LUE DIGIT NINE\r
++19DA          ; valid                  ;      ; XV8    # 5.2  NEW TAI LUE THAM DIGIT ONE\r
++19DB..19DD    ; disallowed                             # NA   <reserved-19DB>..<reserved-19DD>\r
++19DE..19DF    ; valid                  ;      ; NV8    # 4.1  NEW TAI LUE SIGN LAE..NEW TAI LUE SIGN LAEV\r
++19E0..19FF    ; valid                  ;      ; NV8    # 4.0  KHMER SYMBOL PATHAMASAT..KHMER SYMBOL DAP-PRAM ROC\r
++1A00..1A1B    ; valid                                  # 4.1  BUGINESE LETTER KA..BUGINESE VOWEL SIGN AE\r
++1A1C..1A1D    ; disallowed                             # NA   <reserved-1A1C>..<reserved-1A1D>\r
++1A1E..1A1F    ; valid                  ;      ; NV8    # 4.1  BUGINESE PALLAWA..BUGINESE END OF SECTION\r
++1A20..1A5E    ; valid                                  # 5.2  TAI THAM LETTER HIGH KA..TAI THAM CONSONANT SIGN SA\r
++1A5F          ; disallowed                             # NA   <reserved-1A5F>\r
++1A60..1A7C    ; valid                                  # 5.2  TAI THAM SIGN SAKOT..TAI THAM SIGN KHUEN-LUE KARAN\r
++1A7D..1A7E    ; disallowed                             # NA   <reserved-1A7D>..<reserved-1A7E>\r
++1A7F..1A89    ; valid                                  # 5.2  TAI THAM COMBINING CRYPTOGRAMMIC DOT..TAI THAM HORA DIGIT NINE\r
++1A8A..1A8F    ; disallowed                             # NA   <reserved-1A8A>..<reserved-1A8F>\r
++1A90..1A99    ; valid                                  # 5.2  TAI THAM THAM DIGIT ZERO..TAI THAM THAM DIGIT NINE\r
++1A9A..1A9F    ; disallowed                             # NA   <reserved-1A9A>..<reserved-1A9F>\r
++1AA0..1AA6    ; valid                  ;      ; NV8    # 5.2  TAI THAM SIGN WIANG..TAI THAM SIGN REVERSED ROTATED RANA\r
++1AA7          ; valid                                  # 5.2  TAI THAM SIGN MAI YAMOK\r
++1AA8..1AAD    ; valid                  ;      ; NV8    # 5.2  TAI THAM SIGN KAAN..TAI THAM SIGN CAANG\r
++1AAE..1AAF    ; disallowed                             # NA   <reserved-1AAE>..<reserved-1AAF>\r
++1AB0..1ABD    ; valid                                  # 7.0  COMBINING DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW\r
++1ABE          ; valid                  ;      ; NV8    # 7.0  COMBINING PARENTHESES OVERLAY\r
++1ABF..1AFF    ; disallowed                             # NA   <reserved-1ABF>..<reserved-1AFF>\r
++1B00..1B4B    ; valid                                  # 5.0  BALINESE SIGN ULU RICEM..BALINESE LETTER ASYURA SASAK\r
++1B4C..1B4F    ; disallowed                             # NA   <reserved-1B4C>..<reserved-1B4F>\r
++1B50..1B59    ; valid                                  # 5.0  BALINESE DIGIT ZERO..BALINESE DIGIT NINE\r
++1B5A..1B6A    ; valid                  ;      ; NV8    # 5.0  BALINESE PANTI..BALINESE MUSICAL SYMBOL DANG GEDE\r
++1B6B..1B73    ; valid                                  # 5.0  BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING GONG\r
++1B74..1B7C    ; valid                  ;      ; NV8    # 5.0  BALINESE MUSICAL SYMBOL RIGHT-HAND OPEN DUG..BALINESE MUSICAL SYMBOL LEFT-HAND OPEN PING\r
++1B7D..1B7F    ; disallowed                             # NA   <reserved-1B7D>..<reserved-1B7F>\r
++1B80..1BAA    ; valid                                  # 5.1  SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PAMAAEH\r
++1BAB..1BAD    ; valid                                  # 6.1  SUNDANESE SIGN VIRAMA..SUNDANESE CONSONANT SIGN PASANGAN WA\r
++1BAE..1BB9    ; valid                                  # 5.1  SUNDANESE LETTER KHA..SUNDANESE DIGIT NINE\r
++1BBA..1BBF    ; valid                                  # 6.1  SUNDANESE AVAGRAHA..SUNDANESE LETTER FINAL M\r
++1BC0..1BF3    ; valid                                  # 6.0  BATAK LETTER A..BATAK PANONGONAN\r
++1BF4..1BFB    ; disallowed                             # NA   <reserved-1BF4>..<reserved-1BFB>\r
++1BFC..1BFF    ; valid                  ;      ; NV8    # 6.0  BATAK SYMBOL BINDU NA METEK..BATAK SYMBOL BINDU PANGOLAT\r
++1C00..1C37    ; valid                                  # 5.1  LEPCHA LETTER KA..LEPCHA SIGN NUKTA\r
++1C38..1C3A    ; disallowed                             # NA   <reserved-1C38>..<reserved-1C3A>\r
++1C3B..1C3F    ; valid                  ;      ; NV8    # 5.1  LEPCHA PUNCTUATION TA-ROL..LEPCHA PUNCTUATION TSHOOK\r
++1C40..1C49    ; valid                                  # 5.1  LEPCHA DIGIT ZERO..LEPCHA DIGIT NINE\r
++1C4A..1C4C    ; disallowed                             # NA   <reserved-1C4A>..<reserved-1C4C>\r
++1C4D..1C7D    ; valid                                  # 5.1  LEPCHA LETTER TTA..OL CHIKI AHAD\r
++1C7E..1C7F    ; valid                  ;      ; NV8    # 5.1  OL CHIKI PUNCTUATION MUCAAD..OL CHIKI PUNCTUATION DOUBLE MUCAAD\r
++1C80          ; mapped                 ; 0432          # 9.0  CYRILLIC SMALL LETTER ROUNDED VE\r
++1C81          ; mapped                 ; 0434          # 9.0  CYRILLIC SMALL LETTER LONG-LEGGED DE\r
++1C82          ; mapped                 ; 043E          # 9.0  CYRILLIC SMALL LETTER NARROW O\r
++1C83          ; mapped                 ; 0441          # 9.0  CYRILLIC SMALL LETTER WIDE ES\r
++1C84..1C85    ; mapped                 ; 0442          # 9.0  CYRILLIC SMALL LETTER TALL TE..CYRILLIC SMALL LETTER THREE-LEGGED TE\r
++1C86          ; mapped                 ; 044A          # 9.0  CYRILLIC SMALL LETTER TALL HARD SIGN\r
++1C87          ; mapped                 ; 0463          # 9.0  CYRILLIC SMALL LETTER TALL YAT\r
++1C88          ; mapped                 ; A64B          # 9.0  CYRILLIC SMALL LETTER UNBLENDED UK\r
++1C89..1CBF    ; disallowed                             # NA   <reserved-1C89>..<reserved-1CBF>\r
++1CC0..1CC7    ; valid                  ;      ; NV8    # 6.1  SUNDANESE PUNCTUATION BINDU SURYA..SUNDANESE PUNCTUATION BINDU BA SATANGA\r
++1CC8..1CCF    ; disallowed                             # NA   <reserved-1CC8>..<reserved-1CCF>\r
++1CD0..1CD2    ; valid                                  # 5.2  VEDIC TONE KARSHANA..VEDIC TONE PRENKHA\r
++1CD3          ; valid                  ;      ; NV8    # 5.2  VEDIC SIGN NIHSHVASA\r
++1CD4..1CF2    ; valid                                  # 5.2  VEDIC SIGN YAJURVEDIC MIDLINE SVARITA..VEDIC SIGN ARDHAVISARGA\r
++1CF3..1CF6    ; valid                                  # 6.1  VEDIC SIGN ROTATED ARDHAVISARGA..VEDIC SIGN UPADHMANIYA\r
++1CF7          ; valid                                  # 10.0 VEDIC SIGN ATIKRAMA\r
++1CF8..1CF9    ; valid                                  # 7.0  VEDIC TONE RING ABOVE..VEDIC TONE DOUBLE RING ABOVE\r
++1CFA..1CFF    ; disallowed                             # NA   <reserved-1CFA>..<reserved-1CFF>\r
++1D00..1D2B    ; valid                                  # 4.0  LATIN LETTER SMALL CAPITAL A..CYRILLIC LETTER SMALL CAPITAL EL\r
++1D2C          ; mapped                 ; 0061          # 4.0  MODIFIER LETTER CAPITAL A\r
++1D2D          ; mapped                 ; 00E6          # 4.0  MODIFIER LETTER CAPITAL AE\r
++1D2E          ; mapped                 ; 0062          # 4.0  MODIFIER LETTER CAPITAL B\r
++1D2F          ; valid                                  # 4.0  MODIFIER LETTER CAPITAL BARRED B\r
++1D30          ; mapped                 ; 0064          # 4.0  MODIFIER LETTER CAPITAL D\r
++1D31          ; mapped                 ; 0065          # 4.0  MODIFIER LETTER CAPITAL E\r
++1D32          ; mapped                 ; 01DD          # 4.0  MODIFIER LETTER CAPITAL REVERSED E\r
++1D33          ; mapped                 ; 0067          # 4.0  MODIFIER LETTER CAPITAL G\r
++1D34          ; mapped                 ; 0068          # 4.0  MODIFIER LETTER CAPITAL H\r
++1D35          ; mapped                 ; 0069          # 4.0  MODIFIER LETTER CAPITAL I\r
++1D36          ; mapped                 ; 006A          # 4.0  MODIFIER LETTER CAPITAL J\r
++1D37          ; mapped                 ; 006B          # 4.0  MODIFIER LETTER CAPITAL K\r
++1D38          ; mapped                 ; 006C          # 4.0  MODIFIER LETTER CAPITAL L\r
++1D39          ; mapped                 ; 006D          # 4.0  MODIFIER LETTER CAPITAL M\r
++1D3A          ; mapped                 ; 006E          # 4.0  MODIFIER LETTER CAPITAL N\r
++1D3B          ; valid                                  # 4.0  MODIFIER LETTER CAPITAL REVERSED N\r
++1D3C          ; mapped                 ; 006F          # 4.0  MODIFIER LETTER CAPITAL O\r
++1D3D          ; mapped                 ; 0223          # 4.0  MODIFIER LETTER CAPITAL OU\r
++1D3E          ; mapped                 ; 0070          # 4.0  MODIFIER LETTER CAPITAL P\r
++1D3F          ; mapped                 ; 0072          # 4.0  MODIFIER LETTER CAPITAL R\r
++1D40          ; mapped                 ; 0074          # 4.0  MODIFIER LETTER CAPITAL T\r
++1D41          ; mapped                 ; 0075          # 4.0  MODIFIER LETTER CAPITAL U\r
++1D42          ; mapped                 ; 0077          # 4.0  MODIFIER LETTER CAPITAL W\r
++1D43          ; mapped                 ; 0061          # 4.0  MODIFIER LETTER SMALL A\r
++1D44          ; mapped                 ; 0250          # 4.0  MODIFIER LETTER SMALL TURNED A\r
++1D45          ; mapped                 ; 0251          # 4.0  MODIFIER LETTER SMALL ALPHA\r
++1D46          ; mapped                 ; 1D02          # 4.0  MODIFIER LETTER SMALL TURNED AE\r
++1D47          ; mapped                 ; 0062          # 4.0  MODIFIER LETTER SMALL B\r
++1D48          ; mapped                 ; 0064          # 4.0  MODIFIER LETTER SMALL D\r
++1D49          ; mapped                 ; 0065          # 4.0  MODIFIER LETTER SMALL E\r
++1D4A          ; mapped                 ; 0259          # 4.0  MODIFIER LETTER SMALL SCHWA\r
++1D4B          ; mapped                 ; 025B          # 4.0  MODIFIER LETTER SMALL OPEN E\r
++1D4C          ; mapped                 ; 025C          # 4.0  MODIFIER LETTER SMALL TURNED OPEN E\r
++1D4D          ; mapped                 ; 0067          # 4.0  MODIFIER LETTER SMALL G\r
++1D4E          ; valid                                  # 4.0  MODIFIER LETTER SMALL TURNED I\r
++1D4F          ; mapped                 ; 006B          # 4.0  MODIFIER LETTER SMALL K\r
++1D50          ; mapped                 ; 006D          # 4.0  MODIFIER LETTER SMALL M\r
++1D51          ; mapped                 ; 014B          # 4.0  MODIFIER LETTER SMALL ENG\r
++1D52          ; mapped                 ; 006F          # 4.0  MODIFIER LETTER SMALL O\r
++1D53          ; mapped                 ; 0254          # 4.0  MODIFIER LETTER SMALL OPEN O\r
++1D54          ; mapped                 ; 1D16          # 4.0  MODIFIER LETTER SMALL TOP HALF O\r
++1D55          ; mapped                 ; 1D17          # 4.0  MODIFIER LETTER SMALL BOTTOM HALF O\r
++1D56          ; mapped                 ; 0070          # 4.0  MODIFIER LETTER SMALL P\r
++1D57          ; mapped                 ; 0074          # 4.0  MODIFIER LETTER SMALL T\r
++1D58          ; mapped                 ; 0075          # 4.0  MODIFIER LETTER SMALL U\r
++1D59          ; mapped                 ; 1D1D          # 4.0  MODIFIER LETTER SMALL SIDEWAYS U\r
++1D5A          ; mapped                 ; 026F          # 4.0  MODIFIER LETTER SMALL TURNED M\r
++1D5B          ; mapped                 ; 0076          # 4.0  MODIFIER LETTER SMALL V\r
++1D5C          ; mapped                 ; 1D25          # 4.0  MODIFIER LETTER SMALL AIN\r
++1D5D          ; mapped                 ; 03B2          # 4.0  MODIFIER LETTER SMALL BETA\r
++1D5E          ; mapped                 ; 03B3          # 4.0  MODIFIER LETTER SMALL GREEK GAMMA\r
++1D5F          ; mapped                 ; 03B4          # 4.0  MODIFIER LETTER SMALL DELTA\r
++1D60          ; mapped                 ; 03C6          # 4.0  MODIFIER LETTER SMALL GREEK PHI\r
++1D61          ; mapped                 ; 03C7          # 4.0  MODIFIER LETTER SMALL CHI\r
++1D62          ; mapped                 ; 0069          # 4.0  LATIN SUBSCRIPT SMALL LETTER I\r
++1D63          ; mapped                 ; 0072          # 4.0  LATIN SUBSCRIPT SMALL LETTER R\r
++1D64          ; mapped                 ; 0075          # 4.0  LATIN SUBSCRIPT SMALL LETTER U\r
++1D65          ; mapped                 ; 0076          # 4.0  LATIN SUBSCRIPT SMALL LETTER V\r
++1D66          ; mapped                 ; 03B2          # 4.0  GREEK SUBSCRIPT SMALL LETTER BETA\r
++1D67          ; mapped                 ; 03B3          # 4.0  GREEK SUBSCRIPT SMALL LETTER GAMMA\r
++1D68          ; mapped                 ; 03C1          # 4.0  GREEK SUBSCRIPT SMALL LETTER RHO\r
++1D69          ; mapped                 ; 03C6          # 4.0  GREEK SUBSCRIPT SMALL LETTER PHI\r
++1D6A          ; mapped                 ; 03C7          # 4.0  GREEK SUBSCRIPT SMALL LETTER CHI\r
++1D6B          ; valid                                  # 4.0  LATIN SMALL LETTER UE\r
++1D6C..1D77    ; valid                                  # 4.1  LATIN SMALL LETTER B WITH MIDDLE TILDE..LATIN SMALL LETTER TURNED G\r
++1D78          ; mapped                 ; 043D          # 4.1  MODIFIER LETTER CYRILLIC EN\r
++1D79..1D9A    ; valid                                  # 4.1  LATIN SMALL LETTER INSULAR G..LATIN SMALL LETTER EZH WITH RETROFLEX HOOK\r
++1D9B          ; mapped                 ; 0252          # 4.1  MODIFIER LETTER SMALL TURNED ALPHA\r
++1D9C          ; mapped                 ; 0063          # 4.1  MODIFIER LETTER SMALL C\r
++1D9D          ; mapped                 ; 0255          # 4.1  MODIFIER LETTER SMALL C WITH CURL\r
++1D9E          ; mapped                 ; 00F0          # 4.1  MODIFIER LETTER SMALL ETH\r
++1D9F          ; mapped                 ; 025C          # 4.1  MODIFIER LETTER SMALL REVERSED OPEN E\r
++1DA0          ; mapped                 ; 0066          # 4.1  MODIFIER LETTER SMALL F\r
++1DA1          ; mapped                 ; 025F          # 4.1  MODIFIER LETTER SMALL DOTLESS J WITH STROKE\r
++1DA2          ; mapped                 ; 0261          # 4.1  MODIFIER LETTER SMALL SCRIPT G\r
++1DA3          ; mapped                 ; 0265          # 4.1  MODIFIER LETTER SMALL TURNED H\r
++1DA4          ; mapped                 ; 0268          # 4.1  MODIFIER LETTER SMALL I WITH STROKE\r
++1DA5          ; mapped                 ; 0269          # 4.1  MODIFIER LETTER SMALL IOTA\r
++1DA6          ; mapped                 ; 026A          # 4.1  MODIFIER LETTER SMALL CAPITAL I\r
++1DA7          ; mapped                 ; 1D7B          # 4.1  MODIFIER LETTER SMALL CAPITAL I WITH STROKE\r
++1DA8          ; mapped                 ; 029D          # 4.1  MODIFIER LETTER SMALL J WITH CROSSED-TAIL\r
++1DA9          ; mapped                 ; 026D          # 4.1  MODIFIER LETTER SMALL L WITH RETROFLEX HOOK\r
++1DAA          ; mapped                 ; 1D85          # 4.1  MODIFIER LETTER SMALL L WITH PALATAL HOOK\r
++1DAB          ; mapped                 ; 029F          # 4.1  MODIFIER LETTER SMALL CAPITAL L\r
++1DAC          ; mapped                 ; 0271          # 4.1  MODIFIER LETTER SMALL M WITH HOOK\r
++1DAD          ; mapped                 ; 0270          # 4.1  MODIFIER LETTER SMALL TURNED M WITH LONG LEG\r
++1DAE          ; mapped                 ; 0272          # 4.1  MODIFIER LETTER SMALL N WITH LEFT HOOK\r
++1DAF          ; mapped                 ; 0273          # 4.1  MODIFIER LETTER SMALL N WITH RETROFLEX HOOK\r
++1DB0          ; mapped                 ; 0274          # 4.1  MODIFIER LETTER SMALL CAPITAL N\r
++1DB1          ; mapped                 ; 0275          # 4.1  MODIFIER LETTER SMALL BARRED O\r
++1DB2          ; mapped                 ; 0278          # 4.1  MODIFIER LETTER SMALL PHI\r
++1DB3          ; mapped                 ; 0282          # 4.1  MODIFIER LETTER SMALL S WITH HOOK\r
++1DB4          ; mapped                 ; 0283          # 4.1  MODIFIER LETTER SMALL ESH\r
++1DB5          ; mapped                 ; 01AB          # 4.1  MODIFIER LETTER SMALL T WITH PALATAL HOOK\r
++1DB6          ; mapped                 ; 0289          # 4.1  MODIFIER LETTER SMALL U BAR\r
++1DB7          ; mapped                 ; 028A          # 4.1  MODIFIER LETTER SMALL UPSILON\r
++1DB8          ; mapped                 ; 1D1C          # 4.1  MODIFIER LETTER SMALL CAPITAL U\r
++1DB9          ; mapped                 ; 028B          # 4.1  MODIFIER LETTER SMALL V WITH HOOK\r
++1DBA          ; mapped                 ; 028C          # 4.1  MODIFIER LETTER SMALL TURNED V\r
++1DBB          ; mapped                 ; 007A          # 4.1  MODIFIER LETTER SMALL Z\r
++1DBC          ; mapped                 ; 0290          # 4.1  MODIFIER LETTER SMALL Z WITH RETROFLEX HOOK\r
++1DBD          ; mapped                 ; 0291          # 4.1  MODIFIER LETTER SMALL Z WITH CURL\r
++1DBE          ; mapped                 ; 0292          # 4.1  MODIFIER LETTER SMALL EZH\r
++1DBF          ; mapped                 ; 03B8          # 4.1  MODIFIER LETTER SMALL THETA\r
++1DC0..1DC3    ; valid                                  # 4.1  COMBINING DOTTED GRAVE ACCENT..COMBINING SUSPENSION MARK\r
++1DC4..1DCA    ; valid                                  # 5.0  COMBINING MACRON-ACUTE..COMBINING LATIN SMALL LETTER R BELOW\r
++1DCB..1DE6    ; valid                                  # 5.1  COMBINING BREVE-MACRON..COMBINING LATIN SMALL LETTER Z\r
++1DE7..1DF5    ; valid                                  # 7.0  COMBINING LATIN SMALL LETTER ALPHA..COMBINING UP TACK ABOVE\r
++1DF6..1DF9    ; valid                                  # 10.0 COMBINING KAVYKA ABOVE RIGHT..COMBINING WIDE INVERTED BRIDGE BELOW\r
++1DFA          ; disallowed                             # NA   <reserved-1DFA>\r
++1DFB          ; valid                                  # 9.0  COMBINING DELETION MARK\r
++1DFC          ; valid                                  # 6.0  COMBINING DOUBLE INVERTED BREVE BELOW\r
++1DFD          ; valid                                  # 5.2  COMBINING ALMOST EQUAL TO BELOW\r
++1DFE..1DFF    ; valid                                  # 5.0  COMBINING LEFT ARROWHEAD ABOVE..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW\r
++1E00          ; mapped                 ; 1E01          # 1.1  LATIN CAPITAL LETTER A WITH RING BELOW\r
++1E01          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH RING BELOW\r
++1E02          ; mapped                 ; 1E03          # 1.1  LATIN CAPITAL LETTER B WITH DOT ABOVE\r
++1E03          ; valid                                  # 1.1  LATIN SMALL LETTER B WITH DOT ABOVE\r
++1E04          ; mapped                 ; 1E05          # 1.1  LATIN CAPITAL LETTER B WITH DOT BELOW\r
++1E05          ; valid                                  # 1.1  LATIN SMALL LETTER B WITH DOT BELOW\r
++1E06          ; mapped                 ; 1E07          # 1.1  LATIN CAPITAL LETTER B WITH LINE BELOW\r
++1E07          ; valid                                  # 1.1  LATIN SMALL LETTER B WITH LINE BELOW\r
++1E08          ; mapped                 ; 1E09          # 1.1  LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE\r
++1E09          ; valid                                  # 1.1  LATIN SMALL LETTER C WITH CEDILLA AND ACUTE\r
++1E0A          ; mapped                 ; 1E0B          # 1.1  LATIN CAPITAL LETTER D WITH DOT ABOVE\r
++1E0B          ; valid                                  # 1.1  LATIN SMALL LETTER D WITH DOT ABOVE\r
++1E0C          ; mapped                 ; 1E0D          # 1.1  LATIN CAPITAL LETTER D WITH DOT BELOW\r
++1E0D          ; valid                                  # 1.1  LATIN SMALL LETTER D WITH DOT BELOW\r
++1E0E          ; mapped                 ; 1E0F          # 1.1  LATIN CAPITAL LETTER D WITH LINE BELOW\r
++1E0F          ; valid                                  # 1.1  LATIN SMALL LETTER D WITH LINE BELOW\r
++1E10          ; mapped                 ; 1E11          # 1.1  LATIN CAPITAL LETTER D WITH CEDILLA\r
++1E11          ; valid                                  # 1.1  LATIN SMALL LETTER D WITH CEDILLA\r
++1E12          ; mapped                 ; 1E13          # 1.1  LATIN CAPITAL LETTER D WITH CIRCUMFLEX BELOW\r
++1E13          ; valid                                  # 1.1  LATIN SMALL LETTER D WITH CIRCUMFLEX BELOW\r
++1E14          ; mapped                 ; 1E15          # 1.1  LATIN CAPITAL LETTER E WITH MACRON AND GRAVE\r
++1E15          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH MACRON AND GRAVE\r
++1E16          ; mapped                 ; 1E17          # 1.1  LATIN CAPITAL LETTER E WITH MACRON AND ACUTE\r
++1E17          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH MACRON AND ACUTE\r
++1E18          ; mapped                 ; 1E19          # 1.1  LATIN CAPITAL LETTER E WITH CIRCUMFLEX BELOW\r
++1E19          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH CIRCUMFLEX BELOW\r
++1E1A          ; mapped                 ; 1E1B          # 1.1  LATIN CAPITAL LETTER E WITH TILDE BELOW\r
++1E1B          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH TILDE BELOW\r
++1E1C          ; mapped                 ; 1E1D          # 1.1  LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE\r
++1E1D          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH CEDILLA AND BREVE\r
++1E1E          ; mapped                 ; 1E1F          # 1.1  LATIN CAPITAL LETTER F WITH DOT ABOVE\r
++1E1F          ; valid                                  # 1.1  LATIN SMALL LETTER F WITH DOT ABOVE\r
++1E20          ; mapped                 ; 1E21          # 1.1  LATIN CAPITAL LETTER G WITH MACRON\r
++1E21          ; valid                                  # 1.1  LATIN SMALL LETTER G WITH MACRON\r
++1E22          ; mapped                 ; 1E23          # 1.1  LATIN CAPITAL LETTER H WITH DOT ABOVE\r
++1E23          ; valid                                  # 1.1  LATIN SMALL LETTER H WITH DOT ABOVE\r
++1E24          ; mapped                 ; 1E25          # 1.1  LATIN CAPITAL LETTER H WITH DOT BELOW\r
++1E25          ; valid                                  # 1.1  LATIN SMALL LETTER H WITH DOT BELOW\r
++1E26          ; mapped                 ; 1E27          # 1.1  LATIN CAPITAL LETTER H WITH DIAERESIS\r
++1E27          ; valid                                  # 1.1  LATIN SMALL LETTER H WITH DIAERESIS\r
++1E28          ; mapped                 ; 1E29          # 1.1  LATIN CAPITAL LETTER H WITH CEDILLA\r
++1E29          ; valid                                  # 1.1  LATIN SMALL LETTER H WITH CEDILLA\r
++1E2A          ; mapped                 ; 1E2B          # 1.1  LATIN CAPITAL LETTER H WITH BREVE BELOW\r
++1E2B          ; valid                                  # 1.1  LATIN SMALL LETTER H WITH BREVE BELOW\r
++1E2C          ; mapped                 ; 1E2D          # 1.1  LATIN CAPITAL LETTER I WITH TILDE BELOW\r
++1E2D          ; valid                                  # 1.1  LATIN SMALL LETTER I WITH TILDE BELOW\r
++1E2E          ; mapped                 ; 1E2F          # 1.1  LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE\r
++1E2F          ; valid                                  # 1.1  LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE\r
++1E30          ; mapped                 ; 1E31          # 1.1  LATIN CAPITAL LETTER K WITH ACUTE\r
++1E31          ; valid                                  # 1.1  LATIN SMALL LETTER K WITH ACUTE\r
++1E32          ; mapped                 ; 1E33          # 1.1  LATIN CAPITAL LETTER K WITH DOT BELOW\r
++1E33          ; valid                                  # 1.1  LATIN SMALL LETTER K WITH DOT BELOW\r
++1E34          ; mapped                 ; 1E35          # 1.1  LATIN CAPITAL LETTER K WITH LINE BELOW\r
++1E35          ; valid                                  # 1.1  LATIN SMALL LETTER K WITH LINE BELOW\r
++1E36          ; mapped                 ; 1E37          # 1.1  LATIN CAPITAL LETTER L WITH DOT BELOW\r
++1E37          ; valid                                  # 1.1  LATIN SMALL LETTER L WITH DOT BELOW\r
++1E38          ; mapped                 ; 1E39          # 1.1  LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON\r
++1E39          ; valid                                  # 1.1  LATIN SMALL LETTER L WITH DOT BELOW AND MACRON\r
++1E3A          ; mapped                 ; 1E3B          # 1.1  LATIN CAPITAL LETTER L WITH LINE BELOW\r
++1E3B          ; valid                                  # 1.1  LATIN SMALL LETTER L WITH LINE BELOW\r
++1E3C          ; mapped                 ; 1E3D          # 1.1  LATIN CAPITAL LETTER L WITH CIRCUMFLEX BELOW\r
++1E3D          ; valid                                  # 1.1  LATIN SMALL LETTER L WITH CIRCUMFLEX BELOW\r
++1E3E          ; mapped                 ; 1E3F          # 1.1  LATIN CAPITAL LETTER M WITH ACUTE\r
++1E3F          ; valid                                  # 1.1  LATIN SMALL LETTER M WITH ACUTE\r
++1E40          ; mapped                 ; 1E41          # 1.1  LATIN CAPITAL LETTER M WITH DOT ABOVE\r
++1E41          ; valid                                  # 1.1  LATIN SMALL LETTER M WITH DOT ABOVE\r
++1E42          ; mapped                 ; 1E43          # 1.1  LATIN CAPITAL LETTER M WITH DOT BELOW\r
++1E43          ; valid                                  # 1.1  LATIN SMALL LETTER M WITH DOT BELOW\r
++1E44          ; mapped                 ; 1E45          # 1.1  LATIN CAPITAL LETTER N WITH DOT ABOVE\r
++1E45          ; valid                                  # 1.1  LATIN SMALL LETTER N WITH DOT ABOVE\r
++1E46          ; mapped                 ; 1E47          # 1.1  LATIN CAPITAL LETTER N WITH DOT BELOW\r
++1E47          ; valid                                  # 1.1  LATIN SMALL LETTER N WITH DOT BELOW\r
++1E48          ; mapped                 ; 1E49          # 1.1  LATIN CAPITAL LETTER N WITH LINE BELOW\r
++1E49          ; valid                                  # 1.1  LATIN SMALL LETTER N WITH LINE BELOW\r
++1E4A          ; mapped                 ; 1E4B          # 1.1  LATIN CAPITAL LETTER N WITH CIRCUMFLEX BELOW\r
++1E4B          ; valid                                  # 1.1  LATIN SMALL LETTER N WITH CIRCUMFLEX BELOW\r
++1E4C          ; mapped                 ; 1E4D          # 1.1  LATIN CAPITAL LETTER O WITH TILDE AND ACUTE\r
++1E4D          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH TILDE AND ACUTE\r
++1E4E          ; mapped                 ; 1E4F          # 1.1  LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS\r
++1E4F          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH TILDE AND DIAERESIS\r
++1E50          ; mapped                 ; 1E51          # 1.1  LATIN CAPITAL LETTER O WITH MACRON AND GRAVE\r
++1E51          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH MACRON AND GRAVE\r
++1E52          ; mapped                 ; 1E53          # 1.1  LATIN CAPITAL LETTER O WITH MACRON AND ACUTE\r
++1E53          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH MACRON AND ACUTE\r
++1E54          ; mapped                 ; 1E55          # 1.1  LATIN CAPITAL LETTER P WITH ACUTE\r
++1E55          ; valid                                  # 1.1  LATIN SMALL LETTER P WITH ACUTE\r
++1E56          ; mapped                 ; 1E57          # 1.1  LATIN CAPITAL LETTER P WITH DOT ABOVE\r
++1E57          ; valid                                  # 1.1  LATIN SMALL LETTER P WITH DOT ABOVE\r
++1E58          ; mapped                 ; 1E59          # 1.1  LATIN CAPITAL LETTER R WITH DOT ABOVE\r
++1E59          ; valid                                  # 1.1  LATIN SMALL LETTER R WITH DOT ABOVE\r
++1E5A          ; mapped                 ; 1E5B          # 1.1  LATIN CAPITAL LETTER R WITH DOT BELOW\r
++1E5B          ; valid                                  # 1.1  LATIN SMALL LETTER R WITH DOT BELOW\r
++1E5C          ; mapped                 ; 1E5D          # 1.1  LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON\r
++1E5D          ; valid                                  # 1.1  LATIN SMALL LETTER R WITH DOT BELOW AND MACRON\r
++1E5E          ; mapped                 ; 1E5F          # 1.1  LATIN CAPITAL LETTER R WITH LINE BELOW\r
++1E5F          ; valid                                  # 1.1  LATIN SMALL LETTER R WITH LINE BELOW\r
++1E60          ; mapped                 ; 1E61          # 1.1  LATIN CAPITAL LETTER S WITH DOT ABOVE\r
++1E61          ; valid                                  # 1.1  LATIN SMALL LETTER S WITH DOT ABOVE\r
++1E62          ; mapped                 ; 1E63          # 1.1  LATIN CAPITAL LETTER S WITH DOT BELOW\r
++1E63          ; valid                                  # 1.1  LATIN SMALL LETTER S WITH DOT BELOW\r
++1E64          ; mapped                 ; 1E65          # 1.1  LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE\r
++1E65          ; valid                                  # 1.1  LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE\r
++1E66          ; mapped                 ; 1E67          # 1.1  LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE\r
++1E67          ; valid                                  # 1.1  LATIN SMALL LETTER S WITH CARON AND DOT ABOVE\r
++1E68          ; mapped                 ; 1E69          # 1.1  LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE\r
++1E69          ; valid                                  # 1.1  LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE\r
++1E6A          ; mapped                 ; 1E6B          # 1.1  LATIN CAPITAL LETTER T WITH DOT ABOVE\r
++1E6B          ; valid                                  # 1.1  LATIN SMALL LETTER T WITH DOT ABOVE\r
++1E6C          ; mapped                 ; 1E6D          # 1.1  LATIN CAPITAL LETTER T WITH DOT BELOW\r
++1E6D          ; valid                                  # 1.1  LATIN SMALL LETTER T WITH DOT BELOW\r
++1E6E          ; mapped                 ; 1E6F          # 1.1  LATIN CAPITAL LETTER T WITH LINE BELOW\r
++1E6F          ; valid                                  # 1.1  LATIN SMALL LETTER T WITH LINE BELOW\r
++1E70          ; mapped                 ; 1E71          # 1.1  LATIN CAPITAL LETTER T WITH CIRCUMFLEX BELOW\r
++1E71          ; valid                                  # 1.1  LATIN SMALL LETTER T WITH CIRCUMFLEX BELOW\r
++1E72          ; mapped                 ; 1E73          # 1.1  LATIN CAPITAL LETTER U WITH DIAERESIS BELOW\r
++1E73          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH DIAERESIS BELOW\r
++1E74          ; mapped                 ; 1E75          # 1.1  LATIN CAPITAL LETTER U WITH TILDE BELOW\r
++1E75          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH TILDE BELOW\r
++1E76          ; mapped                 ; 1E77          # 1.1  LATIN CAPITAL LETTER U WITH CIRCUMFLEX BELOW\r
++1E77          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH CIRCUMFLEX BELOW\r
++1E78          ; mapped                 ; 1E79          # 1.1  LATIN CAPITAL LETTER U WITH TILDE AND ACUTE\r
++1E79          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH TILDE AND ACUTE\r
++1E7A          ; mapped                 ; 1E7B          # 1.1  LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS\r
++1E7B          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH MACRON AND DIAERESIS\r
++1E7C          ; mapped                 ; 1E7D          # 1.1  LATIN CAPITAL LETTER V WITH TILDE\r
++1E7D          ; valid                                  # 1.1  LATIN SMALL LETTER V WITH TILDE\r
++1E7E          ; mapped                 ; 1E7F          # 1.1  LATIN CAPITAL LETTER V WITH DOT BELOW\r
++1E7F          ; valid                                  # 1.1  LATIN SMALL LETTER V WITH DOT BELOW\r
++1E80          ; mapped                 ; 1E81          # 1.1  LATIN CAPITAL LETTER W WITH GRAVE\r
++1E81          ; valid                                  # 1.1  LATIN SMALL LETTER W WITH GRAVE\r
++1E82          ; mapped                 ; 1E83          # 1.1  LATIN CAPITAL LETTER W WITH ACUTE\r
++1E83          ; valid                                  # 1.1  LATIN SMALL LETTER W WITH ACUTE\r
++1E84          ; mapped                 ; 1E85          # 1.1  LATIN CAPITAL LETTER W WITH DIAERESIS\r
++1E85          ; valid                                  # 1.1  LATIN SMALL LETTER W WITH DIAERESIS\r
++1E86          ; mapped                 ; 1E87          # 1.1  LATIN CAPITAL LETTER W WITH DOT ABOVE\r
++1E87          ; valid                                  # 1.1  LATIN SMALL LETTER W WITH DOT ABOVE\r
++1E88          ; mapped                 ; 1E89          # 1.1  LATIN CAPITAL LETTER W WITH DOT BELOW\r
++1E89          ; valid                                  # 1.1  LATIN SMALL LETTER W WITH DOT BELOW\r
++1E8A          ; mapped                 ; 1E8B          # 1.1  LATIN CAPITAL LETTER X WITH DOT ABOVE\r
++1E8B          ; valid                                  # 1.1  LATIN SMALL LETTER X WITH DOT ABOVE\r
++1E8C          ; mapped                 ; 1E8D          # 1.1  LATIN CAPITAL LETTER X WITH DIAERESIS\r
++1E8D          ; valid                                  # 1.1  LATIN SMALL LETTER X WITH DIAERESIS\r
++1E8E          ; mapped                 ; 1E8F          # 1.1  LATIN CAPITAL LETTER Y WITH DOT ABOVE\r
++1E8F          ; valid                                  # 1.1  LATIN SMALL LETTER Y WITH DOT ABOVE\r
++1E90          ; mapped                 ; 1E91          # 1.1  LATIN CAPITAL LETTER Z WITH CIRCUMFLEX\r
++1E91          ; valid                                  # 1.1  LATIN SMALL LETTER Z WITH CIRCUMFLEX\r
++1E92          ; mapped                 ; 1E93          # 1.1  LATIN CAPITAL LETTER Z WITH DOT BELOW\r
++1E93          ; valid                                  # 1.1  LATIN SMALL LETTER Z WITH DOT BELOW\r
++1E94          ; mapped                 ; 1E95          # 1.1  LATIN CAPITAL LETTER Z WITH LINE BELOW\r
++1E95..1E99    ; valid                                  # 1.1  LATIN SMALL LETTER Z WITH LINE BELOW..LATIN SMALL LETTER Y WITH RING ABOVE\r
++1E9A          ; mapped                 ; 0061 02BE     # 1.1  LATIN SMALL LETTER A WITH RIGHT HALF RING\r
++1E9B          ; mapped                 ; 1E61          # 2.0  LATIN SMALL LETTER LONG S WITH DOT ABOVE\r
++1E9C..1E9D    ; valid                                  # 5.1  LATIN SMALL LETTER LONG S WITH DIAGONAL STROKE..LATIN SMALL LETTER LONG S WITH HIGH STROKE\r
++1E9E          ; mapped                 ; 0073 0073     # 5.1  LATIN CAPITAL LETTER SHARP S\r
++1E9F          ; valid                                  # 5.1  LATIN SMALL LETTER DELTA\r
++1EA0          ; mapped                 ; 1EA1          # 1.1  LATIN CAPITAL LETTER A WITH DOT BELOW\r
++1EA1          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH DOT BELOW\r
++1EA2          ; mapped                 ; 1EA3          # 1.1  LATIN CAPITAL LETTER A WITH HOOK ABOVE\r
++1EA3          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH HOOK ABOVE\r
++1EA4          ; mapped                 ; 1EA5          # 1.1  LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE\r
++1EA5          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE\r
++1EA6          ; mapped                 ; 1EA7          # 1.1  LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE\r
++1EA7          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE\r
++1EA8          ; mapped                 ; 1EA9          # 1.1  LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE\r
++1EA9          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE\r
++1EAA          ; mapped                 ; 1EAB          # 1.1  LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE\r
++1EAB          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE\r
++1EAC          ; mapped                 ; 1EAD          # 1.1  LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW\r
++1EAD          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW\r
++1EAE          ; mapped                 ; 1EAF          # 1.1  LATIN CAPITAL LETTER A WITH BREVE AND ACUTE\r
++1EAF          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH BREVE AND ACUTE\r
++1EB0          ; mapped                 ; 1EB1          # 1.1  LATIN CAPITAL LETTER A WITH BREVE AND GRAVE\r
++1EB1          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH BREVE AND GRAVE\r
++1EB2          ; mapped                 ; 1EB3          # 1.1  LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE\r
++1EB3          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE\r
++1EB4          ; mapped                 ; 1EB5          # 1.1  LATIN CAPITAL LETTER A WITH BREVE AND TILDE\r
++1EB5          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH BREVE AND TILDE\r
++1EB6          ; mapped                 ; 1EB7          # 1.1  LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW\r
++1EB7          ; valid                                  # 1.1  LATIN SMALL LETTER A WITH BREVE AND DOT BELOW\r
++1EB8          ; mapped                 ; 1EB9          # 1.1  LATIN CAPITAL LETTER E WITH DOT BELOW\r
++1EB9          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH DOT BELOW\r
++1EBA          ; mapped                 ; 1EBB          # 1.1  LATIN CAPITAL LETTER E WITH HOOK ABOVE\r
++1EBB          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH HOOK ABOVE\r
++1EBC          ; mapped                 ; 1EBD          # 1.1  LATIN CAPITAL LETTER E WITH TILDE\r
++1EBD          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH TILDE\r
++1EBE          ; mapped                 ; 1EBF          # 1.1  LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE\r
++1EBF          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE\r
++1EC0          ; mapped                 ; 1EC1          # 1.1  LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE\r
++1EC1          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE\r
++1EC2          ; mapped                 ; 1EC3          # 1.1  LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE\r
++1EC3          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE\r
++1EC4          ; mapped                 ; 1EC5          # 1.1  LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE\r
++1EC5          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE\r
++1EC6          ; mapped                 ; 1EC7          # 1.1  LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW\r
++1EC7          ; valid                                  # 1.1  LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW\r
++1EC8          ; mapped                 ; 1EC9          # 1.1  LATIN CAPITAL LETTER I WITH HOOK ABOVE\r
++1EC9          ; valid                                  # 1.1  LATIN SMALL LETTER I WITH HOOK ABOVE\r
++1ECA          ; mapped                 ; 1ECB          # 1.1  LATIN CAPITAL LETTER I WITH DOT BELOW\r
++1ECB          ; valid                                  # 1.1  LATIN SMALL LETTER I WITH DOT BELOW\r
++1ECC          ; mapped                 ; 1ECD          # 1.1  LATIN CAPITAL LETTER O WITH DOT BELOW\r
++1ECD          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH DOT BELOW\r
++1ECE          ; mapped                 ; 1ECF          # 1.1  LATIN CAPITAL LETTER O WITH HOOK ABOVE\r
++1ECF          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH HOOK ABOVE\r
++1ED0          ; mapped                 ; 1ED1          # 1.1  LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE\r
++1ED1          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE\r
++1ED2          ; mapped                 ; 1ED3          # 1.1  LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE\r
++1ED3          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE\r
++1ED4          ; mapped                 ; 1ED5          # 1.1  LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE\r
++1ED5          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE\r
++1ED6          ; mapped                 ; 1ED7          # 1.1  LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE\r
++1ED7          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE\r
++1ED8          ; mapped                 ; 1ED9          # 1.1  LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW\r
++1ED9          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW\r
++1EDA          ; mapped                 ; 1EDB          # 1.1  LATIN CAPITAL LETTER O WITH HORN AND ACUTE\r
++1EDB          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH HORN AND ACUTE\r
++1EDC          ; mapped                 ; 1EDD          # 1.1  LATIN CAPITAL LETTER O WITH HORN AND GRAVE\r
++1EDD          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH HORN AND GRAVE\r
++1EDE          ; mapped                 ; 1EDF          # 1.1  LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE\r
++1EDF          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE\r
++1EE0          ; mapped                 ; 1EE1          # 1.1  LATIN CAPITAL LETTER O WITH HORN AND TILDE\r
++1EE1          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH HORN AND TILDE\r
++1EE2          ; mapped                 ; 1EE3          # 1.1  LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW\r
++1EE3          ; valid                                  # 1.1  LATIN SMALL LETTER O WITH HORN AND DOT BELOW\r
++1EE4          ; mapped                 ; 1EE5          # 1.1  LATIN CAPITAL LETTER U WITH DOT BELOW\r
++1EE5          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH DOT BELOW\r
++1EE6          ; mapped                 ; 1EE7          # 1.1  LATIN CAPITAL LETTER U WITH HOOK ABOVE\r
++1EE7          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH HOOK ABOVE\r
++1EE8          ; mapped                 ; 1EE9          # 1.1  LATIN CAPITAL LETTER U WITH HORN AND ACUTE\r
++1EE9          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH HORN AND ACUTE\r
++1EEA          ; mapped                 ; 1EEB          # 1.1  LATIN CAPITAL LETTER U WITH HORN AND GRAVE\r
++1EEB          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH HORN AND GRAVE\r
++1EEC          ; mapped                 ; 1EED          # 1.1  LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE\r
++1EED          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE\r
++1EEE          ; mapped                 ; 1EEF          # 1.1  LATIN CAPITAL LETTER U WITH HORN AND TILDE\r
++1EEF          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH HORN AND TILDE\r
++1EF0          ; mapped                 ; 1EF1          # 1.1  LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW\r
++1EF1          ; valid                                  # 1.1  LATIN SMALL LETTER U WITH HORN AND DOT BELOW\r
++1EF2          ; mapped                 ; 1EF3          # 1.1  LATIN CAPITAL LETTER Y WITH GRAVE\r
++1EF3          ; valid                                  # 1.1  LATIN SMALL LETTER Y WITH GRAVE\r
++1EF4          ; mapped                 ; 1EF5          # 1.1  LATIN CAPITAL LETTER Y WITH DOT BELOW\r
++1EF5          ; valid                                  # 1.1  LATIN SMALL LETTER Y WITH DOT BELOW\r
++1EF6          ; mapped                 ; 1EF7          # 1.1  LATIN CAPITAL LETTER Y WITH HOOK ABOVE\r
++1EF7          ; valid                                  # 1.1  LATIN SMALL LETTER Y WITH HOOK ABOVE\r
++1EF8          ; mapped                 ; 1EF9          # 1.1  LATIN CAPITAL LETTER Y WITH TILDE\r
++1EF9          ; valid                                  # 1.1  LATIN SMALL LETTER Y WITH TILDE\r
++1EFA          ; mapped                 ; 1EFB          # 5.1  LATIN CAPITAL LETTER MIDDLE-WELSH LL\r
++1EFB          ; valid                                  # 5.1  LATIN SMALL LETTER MIDDLE-WELSH LL\r
++1EFC          ; mapped                 ; 1EFD          # 5.1  LATIN CAPITAL LETTER MIDDLE-WELSH V\r
++1EFD          ; valid                                  # 5.1  LATIN SMALL LETTER MIDDLE-WELSH V\r
++1EFE          ; mapped                 ; 1EFF          # 5.1  LATIN CAPITAL LETTER Y WITH LOOP\r
++1EFF          ; valid                                  # 5.1  LATIN SMALL LETTER Y WITH LOOP\r
++1F00..1F07    ; valid                                  # 1.1  GREEK SMALL LETTER ALPHA WITH PSILI..GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI\r
++1F08          ; mapped                 ; 1F00          # 1.1  GREEK CAPITAL LETTER ALPHA WITH PSILI\r
++1F09          ; mapped                 ; 1F01          # 1.1  GREEK CAPITAL LETTER ALPHA WITH DASIA\r
++1F0A          ; mapped                 ; 1F02          # 1.1  GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA\r
++1F0B          ; mapped                 ; 1F03          # 1.1  GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA\r
++1F0C          ; mapped                 ; 1F04          # 1.1  GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA\r
++1F0D          ; mapped                 ; 1F05          # 1.1  GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA\r
++1F0E          ; mapped                 ; 1F06          # 1.1  GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI\r
++1F0F          ; mapped                 ; 1F07          # 1.1  GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI\r
++1F10..1F15    ; valid                                  # 1.1  GREEK SMALL LETTER EPSILON WITH PSILI..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA\r
++1F16..1F17    ; disallowed                             # NA   <reserved-1F16>..<reserved-1F17>\r
++1F18          ; mapped                 ; 1F10          # 1.1  GREEK CAPITAL LETTER EPSILON WITH PSILI\r
++1F19          ; mapped                 ; 1F11          # 1.1  GREEK CAPITAL LETTER EPSILON WITH DASIA\r
++1F1A          ; mapped                 ; 1F12          # 1.1  GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA\r
++1F1B          ; mapped                 ; 1F13          # 1.1  GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA\r
++1F1C          ; mapped                 ; 1F14          # 1.1  GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA\r
++1F1D          ; mapped                 ; 1F15          # 1.1  GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA\r
++1F1E..1F1F    ; disallowed                             # NA   <reserved-1F1E>..<reserved-1F1F>\r
++1F20..1F27    ; valid                                  # 1.1  GREEK SMALL LETTER ETA WITH PSILI..GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI\r
++1F28          ; mapped                 ; 1F20          # 1.1  GREEK CAPITAL LETTER ETA WITH PSILI\r
++1F29          ; mapped                 ; 1F21          # 1.1  GREEK CAPITAL LETTER ETA WITH DASIA\r
++1F2A          ; mapped                 ; 1F22          # 1.1  GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA\r
++1F2B          ; mapped                 ; 1F23          # 1.1  GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA\r
++1F2C          ; mapped                 ; 1F24          # 1.1  GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA\r
++1F2D          ; mapped                 ; 1F25          # 1.1  GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA\r
++1F2E          ; mapped                 ; 1F26          # 1.1  GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI\r
++1F2F          ; mapped                 ; 1F27          # 1.1  GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI\r
++1F30..1F37    ; valid                                  # 1.1  GREEK SMALL LETTER IOTA WITH PSILI..GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI\r
++1F38          ; mapped                 ; 1F30          # 1.1  GREEK CAPITAL LETTER IOTA WITH PSILI\r
++1F39          ; mapped                 ; 1F31          # 1.1  GREEK CAPITAL LETTER IOTA WITH DASIA\r
++1F3A          ; mapped                 ; 1F32          # 1.1  GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA\r
++1F3B          ; mapped                 ; 1F33          # 1.1  GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA\r
++1F3C          ; mapped                 ; 1F34          # 1.1  GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA\r
++1F3D          ; mapped                 ; 1F35          # 1.1  GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA\r
++1F3E          ; mapped                 ; 1F36          # 1.1  GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI\r
++1F3F          ; mapped                 ; 1F37          # 1.1  GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI\r
++1F40..1F45    ; valid                                  # 1.1  GREEK SMALL LETTER OMICRON WITH PSILI..GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA\r
++1F46..1F47    ; disallowed                             # NA   <reserved-1F46>..<reserved-1F47>\r
++1F48          ; mapped                 ; 1F40          # 1.1  GREEK CAPITAL LETTER OMICRON WITH PSILI\r
++1F49          ; mapped                 ; 1F41          # 1.1  GREEK CAPITAL LETTER OMICRON WITH DASIA\r
++1F4A          ; mapped                 ; 1F42          # 1.1  GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA\r
++1F4B          ; mapped                 ; 1F43          # 1.1  GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA\r
++1F4C          ; mapped                 ; 1F44          # 1.1  GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA\r
++1F4D          ; mapped                 ; 1F45          # 1.1  GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA\r
++1F4E..1F4F    ; disallowed                             # NA   <reserved-1F4E>..<reserved-1F4F>\r
++1F50..1F57    ; valid                                  # 1.1  GREEK SMALL LETTER UPSILON WITH PSILI..GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI\r
++1F58          ; disallowed                             # NA   <reserved-1F58>\r
++1F59          ; mapped                 ; 1F51          # 1.1  GREEK CAPITAL LETTER UPSILON WITH DASIA\r
++1F5A          ; disallowed                             # NA   <reserved-1F5A>\r
++1F5B          ; mapped                 ; 1F53          # 1.1  GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA\r
++1F5C          ; disallowed                             # NA   <reserved-1F5C>\r
++1F5D          ; mapped                 ; 1F55          # 1.1  GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA\r
++1F5E          ; disallowed                             # NA   <reserved-1F5E>\r
++1F5F          ; mapped                 ; 1F57          # 1.1  GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI\r
++1F60..1F67    ; valid                                  # 1.1  GREEK SMALL LETTER OMEGA WITH PSILI..GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI\r
++1F68          ; mapped                 ; 1F60          # 1.1  GREEK CAPITAL LETTER OMEGA WITH PSILI\r
++1F69          ; mapped                 ; 1F61          # 1.1  GREEK CAPITAL LETTER OMEGA WITH DASIA\r
++1F6A          ; mapped                 ; 1F62          # 1.1  GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA\r
++1F6B          ; mapped                 ; 1F63          # 1.1  GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA\r
++1F6C          ; mapped                 ; 1F64          # 1.1  GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA\r
++1F6D          ; mapped                 ; 1F65          # 1.1  GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA\r
++1F6E          ; mapped                 ; 1F66          # 1.1  GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI\r
++1F6F          ; mapped                 ; 1F67          # 1.1  GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI\r
++1F70          ; valid                                  # 1.1  GREEK SMALL LETTER ALPHA WITH VARIA\r
++1F71          ; mapped                 ; 03AC          # 1.1  GREEK SMALL LETTER ALPHA WITH OXIA\r
++1F72          ; valid                                  # 1.1  GREEK SMALL LETTER EPSILON WITH VARIA\r
++1F73          ; mapped                 ; 03AD          # 1.1  GREEK SMALL LETTER EPSILON WITH OXIA\r
++1F74          ; valid                                  # 1.1  GREEK SMALL LETTER ETA WITH VARIA\r
++1F75          ; mapped                 ; 03AE          # 1.1  GREEK SMALL LETTER ETA WITH OXIA\r
++1F76          ; valid                                  # 1.1  GREEK SMALL LETTER IOTA WITH VARIA\r
++1F77          ; mapped                 ; 03AF          # 1.1  GREEK SMALL LETTER IOTA WITH OXIA\r
++1F78          ; valid                                  # 1.1  GREEK SMALL LETTER OMICRON WITH VARIA\r
++1F79          ; mapped                 ; 03CC          # 1.1  GREEK SMALL LETTER OMICRON WITH OXIA\r
++1F7A          ; valid                                  # 1.1  GREEK SMALL LETTER UPSILON WITH VARIA\r
++1F7B          ; mapped                 ; 03CD          # 1.1  GREEK SMALL LETTER UPSILON WITH OXIA\r
++1F7C          ; valid                                  # 1.1  GREEK SMALL LETTER OMEGA WITH VARIA\r
++1F7D          ; mapped                 ; 03CE          # 1.1  GREEK SMALL LETTER OMEGA WITH OXIA\r
++1F7E..1F7F    ; disallowed                             # NA   <reserved-1F7E>..<reserved-1F7F>\r
++1F80          ; mapped                 ; 1F00 03B9     # 1.1  GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI\r
++1F81          ; mapped                 ; 1F01 03B9     # 1.1  GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI\r
++1F82          ; mapped                 ; 1F02 03B9     # 1.1  GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI\r
++1F83          ; mapped                 ; 1F03 03B9     # 1.1  GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI\r
++1F84          ; mapped                 ; 1F04 03B9     # 1.1  GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI\r
++1F85          ; mapped                 ; 1F05 03B9     # 1.1  GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI\r
++1F86          ; mapped                 ; 1F06 03B9     # 1.1  GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI\r
++1F87          ; mapped                 ; 1F07 03B9     # 1.1  GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI\r
++1F88          ; mapped                 ; 1F00 03B9     # 1.1  GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI\r
++1F89          ; mapped                 ; 1F01 03B9     # 1.1  GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI\r
++1F8A          ; mapped                 ; 1F02 03B9     # 1.1  GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI\r
++1F8B          ; mapped                 ; 1F03 03B9     # 1.1  GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI\r
++1F8C          ; mapped                 ; 1F04 03B9     # 1.1  GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI\r
++1F8D          ; mapped                 ; 1F05 03B9     # 1.1  GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI\r
++1F8E          ; mapped                 ; 1F06 03B9     # 1.1  GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI\r
++1F8F          ; mapped                 ; 1F07 03B9     # 1.1  GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI\r
++1F90          ; mapped                 ; 1F20 03B9     # 1.1  GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI\r
++1F91          ; mapped                 ; 1F21 03B9     # 1.1  GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI\r
++1F92          ; mapped                 ; 1F22 03B9     # 1.1  GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI\r
++1F93          ; mapped                 ; 1F23 03B9     # 1.1  GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI\r
++1F94          ; mapped                 ; 1F24 03B9     # 1.1  GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI\r
++1F95          ; mapped                 ; 1F25 03B9     # 1.1  GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI\r
++1F96          ; mapped                 ; 1F26 03B9     # 1.1  GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI\r
++1F97          ; mapped                 ; 1F27 03B9     # 1.1  GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI\r
++1F98          ; mapped                 ; 1F20 03B9     # 1.1  GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI\r
++1F99          ; mapped                 ; 1F21 03B9     # 1.1  GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI\r
++1F9A          ; mapped                 ; 1F22 03B9     # 1.1  GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI\r
++1F9B          ; mapped                 ; 1F23 03B9     # 1.1  GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI\r
++1F9C          ; mapped                 ; 1F24 03B9     # 1.1  GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI\r
++1F9D          ; mapped                 ; 1F25 03B9     # 1.1  GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI\r
++1F9E          ; mapped                 ; 1F26 03B9     # 1.1  GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI\r
++1F9F          ; mapped                 ; 1F27 03B9     # 1.1  GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI\r
++1FA0          ; mapped                 ; 1F60 03B9     # 1.1  GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI\r
++1FA1          ; mapped                 ; 1F61 03B9     # 1.1  GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI\r
++1FA2          ; mapped                 ; 1F62 03B9     # 1.1  GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI\r
++1FA3          ; mapped                 ; 1F63 03B9     # 1.1  GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI\r
++1FA4          ; mapped                 ; 1F64 03B9     # 1.1  GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI\r
++1FA5          ; mapped                 ; 1F65 03B9     # 1.1  GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI\r
++1FA6          ; mapped                 ; 1F66 03B9     # 1.1  GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI\r
++1FA7          ; mapped                 ; 1F67 03B9     # 1.1  GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI\r
++1FA8          ; mapped                 ; 1F60 03B9     # 1.1  GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI\r
++1FA9          ; mapped                 ; 1F61 03B9     # 1.1  GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI\r
++1FAA          ; mapped                 ; 1F62 03B9     # 1.1  GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI\r
++1FAB          ; mapped                 ; 1F63 03B9     # 1.1  GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI\r
++1FAC          ; mapped                 ; 1F64 03B9     # 1.1  GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI\r
++1FAD          ; mapped                 ; 1F65 03B9     # 1.1  GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI\r
++1FAE          ; mapped                 ; 1F66 03B9     # 1.1  GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI\r
++1FAF          ; mapped                 ; 1F67 03B9     # 1.1  GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI\r
++1FB0..1FB1    ; valid                                  # 1.1  GREEK SMALL LETTER ALPHA WITH VRACHY..GREEK SMALL LETTER ALPHA WITH MACRON\r
++1FB2          ; mapped                 ; 1F70 03B9     # 1.1  GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI\r
++1FB3          ; mapped                 ; 03B1 03B9     # 1.1  GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI\r
++1FB4          ; mapped                 ; 03AC 03B9     # 1.1  GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI\r
++1FB5          ; disallowed                             # NA   <reserved-1FB5>\r
++1FB6          ; valid                                  # 1.1  GREEK SMALL LETTER ALPHA WITH PERISPOMENI\r
++1FB7          ; mapped                 ; 1FB6 03B9     # 1.1  GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI\r
++1FB8          ; mapped                 ; 1FB0          # 1.1  GREEK CAPITAL LETTER ALPHA WITH VRACHY\r
++1FB9          ; mapped                 ; 1FB1          # 1.1  GREEK CAPITAL LETTER ALPHA WITH MACRON\r
++1FBA          ; mapped                 ; 1F70          # 1.1  GREEK CAPITAL LETTER ALPHA WITH VARIA\r
++1FBB          ; mapped                 ; 03AC          # 1.1  GREEK CAPITAL LETTER ALPHA WITH OXIA\r
++1FBC          ; mapped                 ; 03B1 03B9     # 1.1  GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI\r
++1FBD          ; disallowed_STD3_mapped ; 0020 0313     # 1.1  GREEK KORONIS\r
++1FBE          ; mapped                 ; 03B9          # 1.1  GREEK PROSGEGRAMMENI\r
++1FBF          ; disallowed_STD3_mapped ; 0020 0313     # 1.1  GREEK PSILI\r
++1FC0          ; disallowed_STD3_mapped ; 0020 0342     # 1.1  GREEK PERISPOMENI\r
++1FC1          ; disallowed_STD3_mapped ; 0020 0308 0342 #1.1  GREEK DIALYTIKA AND PERISPOMENI\r
++1FC2          ; mapped                 ; 1F74 03B9     # 1.1  GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI\r
++1FC3          ; mapped                 ; 03B7 03B9     # 1.1  GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI\r
++1FC4          ; mapped                 ; 03AE 03B9     # 1.1  GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI\r
++1FC5          ; disallowed                             # NA   <reserved-1FC5>\r
++1FC6          ; valid                                  # 1.1  GREEK SMALL LETTER ETA WITH PERISPOMENI\r
++1FC7          ; mapped                 ; 1FC6 03B9     # 1.1  GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI\r
++1FC8          ; mapped                 ; 1F72          # 1.1  GREEK CAPITAL LETTER EPSILON WITH VARIA\r
++1FC9          ; mapped                 ; 03AD          # 1.1  GREEK CAPITAL LETTER EPSILON WITH OXIA\r
++1FCA          ; mapped                 ; 1F74          # 1.1  GREEK CAPITAL LETTER ETA WITH VARIA\r
++1FCB          ; mapped                 ; 03AE          # 1.1  GREEK CAPITAL LETTER ETA WITH OXIA\r
++1FCC          ; mapped                 ; 03B7 03B9     # 1.1  GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI\r
++1FCD          ; disallowed_STD3_mapped ; 0020 0313 0300 #1.1  GREEK PSILI AND VARIA\r
++1FCE          ; disallowed_STD3_mapped ; 0020 0313 0301 #1.1  GREEK PSILI AND OXIA\r
++1FCF          ; disallowed_STD3_mapped ; 0020 0313 0342 #1.1  GREEK PSILI AND PERISPOMENI\r
++1FD0..1FD2    ; valid                                  # 1.1  GREEK SMALL LETTER IOTA WITH VRACHY..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA\r
++1FD3          ; mapped                 ; 0390          # 1.1  GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA\r
++1FD4..1FD5    ; disallowed                             # NA   <reserved-1FD4>..<reserved-1FD5>\r
++1FD6..1FD7    ; valid                                  # 1.1  GREEK SMALL LETTER IOTA WITH PERISPOMENI..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI\r
++1FD8          ; mapped                 ; 1FD0          # 1.1  GREEK CAPITAL LETTER IOTA WITH VRACHY\r
++1FD9          ; mapped                 ; 1FD1          # 1.1  GREEK CAPITAL LETTER IOTA WITH MACRON\r
++1FDA          ; mapped                 ; 1F76          # 1.1  GREEK CAPITAL LETTER IOTA WITH VARIA\r
++1FDB          ; mapped                 ; 03AF          # 1.1  GREEK CAPITAL LETTER IOTA WITH OXIA\r
++1FDC          ; disallowed                             # NA   <reserved-1FDC>\r
++1FDD          ; disallowed_STD3_mapped ; 0020 0314 0300 #1.1  GREEK DASIA AND VARIA\r
++1FDE          ; disallowed_STD3_mapped ; 0020 0314 0301 #1.1  GREEK DASIA AND OXIA\r
++1FDF          ; disallowed_STD3_mapped ; 0020 0314 0342 #1.1  GREEK DASIA AND PERISPOMENI\r
++1FE0..1FE2    ; valid                                  # 1.1  GREEK SMALL LETTER UPSILON WITH VRACHY..GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA\r
++1FE3          ; mapped                 ; 03B0          # 1.1  GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA\r
++1FE4..1FE7    ; valid                                  # 1.1  GREEK SMALL LETTER RHO WITH PSILI..GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI\r
++1FE8          ; mapped                 ; 1FE0          # 1.1  GREEK CAPITAL LETTER UPSILON WITH VRACHY\r
++1FE9          ; mapped                 ; 1FE1          # 1.1  GREEK CAPITAL LETTER UPSILON WITH MACRON\r
++1FEA          ; mapped                 ; 1F7A          # 1.1  GREEK CAPITAL LETTER UPSILON WITH VARIA\r
++1FEB          ; mapped                 ; 03CD          # 1.1  GREEK CAPITAL LETTER UPSILON WITH OXIA\r
++1FEC          ; mapped                 ; 1FE5          # 1.1  GREEK CAPITAL LETTER RHO WITH DASIA\r
++1FED          ; disallowed_STD3_mapped ; 0020 0308 0300 #1.1  GREEK DIALYTIKA AND VARIA\r
++1FEE          ; disallowed_STD3_mapped ; 0020 0308 0301 #1.1  GREEK DIALYTIKA AND OXIA\r
++1FEF          ; disallowed_STD3_mapped ; 0060          # 1.1  GREEK VARIA\r
++1FF0..1FF1    ; disallowed                             # NA   <reserved-1FF0>..<reserved-1FF1>\r
++1FF2          ; mapped                 ; 1F7C 03B9     # 1.1  GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI\r
++1FF3          ; mapped                 ; 03C9 03B9     # 1.1  GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI\r
++1FF4          ; mapped                 ; 03CE 03B9     # 1.1  GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI\r
++1FF5          ; disallowed                             # NA   <reserved-1FF5>\r
++1FF6          ; valid                                  # 1.1  GREEK SMALL LETTER OMEGA WITH PERISPOMENI\r
++1FF7          ; mapped                 ; 1FF6 03B9     # 1.1  GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI\r
++1FF8          ; mapped                 ; 1F78          # 1.1  GREEK CAPITAL LETTER OMICRON WITH VARIA\r
++1FF9          ; mapped                 ; 03CC          # 1.1  GREEK CAPITAL LETTER OMICRON WITH OXIA\r
++1FFA          ; mapped                 ; 1F7C          # 1.1  GREEK CAPITAL LETTER OMEGA WITH VARIA\r
++1FFB          ; mapped                 ; 03CE          # 1.1  GREEK CAPITAL LETTER OMEGA WITH OXIA\r
++1FFC          ; mapped                 ; 03C9 03B9     # 1.1  GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI\r
++1FFD          ; disallowed_STD3_mapped ; 0020 0301     # 1.1  GREEK OXIA\r
++1FFE          ; disallowed_STD3_mapped ; 0020 0314     # 1.1  GREEK DASIA\r
++1FFF          ; disallowed                             # NA   <reserved-1FFF>\r
++2000..200A    ; disallowed_STD3_mapped ; 0020          # 1.1  EN QUAD..HAIR SPACE\r
++200B          ; ignored                                # 1.1  ZERO WIDTH SPACE\r
++200C..200D    ; deviation              ;               # 1.1  ZERO WIDTH NON-JOINER..ZERO WIDTH JOINER\r
++200E..200F    ; disallowed                             # 1.1  LEFT-TO-RIGHT MARK..RIGHT-TO-LEFT MARK\r
++2010          ; valid                  ;      ; NV8    # 1.1  HYPHEN\r
++2011          ; mapped                 ; 2010          # 1.1  NON-BREAKING HYPHEN\r
++2012..2016    ; valid                  ;      ; NV8    # 1.1  FIGURE DASH..DOUBLE VERTICAL LINE\r
++2017          ; disallowed_STD3_mapped ; 0020 0333     # 1.1  DOUBLE LOW LINE\r
++2018..2023    ; valid                  ;      ; NV8    # 1.1  LEFT SINGLE QUOTATION MARK..TRIANGULAR BULLET\r
++2024..2026    ; disallowed                             # 1.1  ONE DOT LEADER..HORIZONTAL ELLIPSIS\r
++2027          ; valid                  ;      ; NV8    # 1.1  HYPHENATION POINT\r
++2028..202E    ; disallowed                             # 1.1  LINE SEPARATOR..RIGHT-TO-LEFT OVERRIDE\r
++202F          ; disallowed_STD3_mapped ; 0020          # 3.0  NARROW NO-BREAK SPACE\r
++2030..2032    ; valid                  ;      ; NV8    # 1.1  PER MILLE SIGN..PRIME\r
++2033          ; mapped                 ; 2032 2032     # 1.1  DOUBLE PRIME\r
++2034          ; mapped                 ; 2032 2032 2032 #1.1  TRIPLE PRIME\r
++2035          ; valid                  ;      ; NV8    # 1.1  REVERSED PRIME\r
++2036          ; mapped                 ; 2035 2035     # 1.1  REVERSED DOUBLE PRIME\r
++2037          ; mapped                 ; 2035 2035 2035 #1.1  REVERSED TRIPLE PRIME\r
++2038..203B    ; valid                  ;      ; NV8    # 1.1  CARET..REFERENCE MARK\r
++203C          ; disallowed_STD3_mapped ; 0021 0021     # 1.1  DOUBLE EXCLAMATION MARK\r
++203D          ; valid                  ;      ; NV8    # 1.1  INTERROBANG\r
++203E          ; disallowed_STD3_mapped ; 0020 0305     # 1.1  OVERLINE\r
++203F..2046    ; valid                  ;      ; NV8    # 1.1  UNDERTIE..RIGHT SQUARE BRACKET WITH QUILL\r
++2047          ; disallowed_STD3_mapped ; 003F 003F     # 3.2  DOUBLE QUESTION MARK\r
++2048          ; disallowed_STD3_mapped ; 003F 0021     # 3.0  QUESTION EXCLAMATION MARK\r
++2049          ; disallowed_STD3_mapped ; 0021 003F     # 3.0  EXCLAMATION QUESTION MARK\r
++204A..204D    ; valid                  ;      ; NV8    # 3.0  TIRONIAN SIGN ET..BLACK RIGHTWARDS BULLET\r
++204E..2052    ; valid                  ;      ; NV8    # 3.2  LOW ASTERISK..COMMERCIAL MINUS SIGN\r
++2053..2054    ; valid                  ;      ; NV8    # 4.0  SWUNG DASH..INVERTED UNDERTIE\r
++2055..2056    ; valid                  ;      ; NV8    # 4.1  FLOWER PUNCTUATION MARK..THREE DOT PUNCTUATION\r
++2057          ; mapped                 ; 2032 2032 2032 2032 #3.2 QUADRUPLE PRIME\r
++2058..205E    ; valid                  ;      ; NV8    # 4.1  FOUR DOT PUNCTUATION..VERTICAL FOUR DOTS\r
++205F          ; disallowed_STD3_mapped ; 0020          # 3.2  MEDIUM MATHEMATICAL SPACE\r
++2060          ; ignored                                # 3.2  WORD JOINER\r
++2061..2063    ; disallowed                             # 3.2  FUNCTION APPLICATION..INVISIBLE SEPARATOR\r
++2064          ; ignored                                # 5.1  INVISIBLE PLUS\r
++2065          ; disallowed                             # NA   <reserved-2065>\r
++2066..2069    ; disallowed                             # 6.3  LEFT-TO-RIGHT ISOLATE..POP DIRECTIONAL ISOLATE\r
++206A..206F    ; disallowed                             # 1.1  INHIBIT SYMMETRIC SWAPPING..NOMINAL DIGIT SHAPES\r
++2070          ; mapped                 ; 0030          # 1.1  SUPERSCRIPT ZERO\r
++2071          ; mapped                 ; 0069          # 3.2  SUPERSCRIPT LATIN SMALL LETTER I\r
++2072..2073    ; disallowed                             # NA   <reserved-2072>..<reserved-2073>\r
++2074          ; mapped                 ; 0034          # 1.1  SUPERSCRIPT FOUR\r
++2075          ; mapped                 ; 0035          # 1.1  SUPERSCRIPT FIVE\r
++2076          ; mapped                 ; 0036          # 1.1  SUPERSCRIPT SIX\r
++2077          ; mapped                 ; 0037          # 1.1  SUPERSCRIPT SEVEN\r
++2078          ; mapped                 ; 0038          # 1.1  SUPERSCRIPT EIGHT\r
++2079          ; mapped                 ; 0039          # 1.1  SUPERSCRIPT NINE\r
++207A          ; disallowed_STD3_mapped ; 002B          # 1.1  SUPERSCRIPT PLUS SIGN\r
++207B          ; mapped                 ; 2212          # 1.1  SUPERSCRIPT MINUS\r
++207C          ; disallowed_STD3_mapped ; 003D          # 1.1  SUPERSCRIPT EQUALS SIGN\r
++207D          ; disallowed_STD3_mapped ; 0028          # 1.1  SUPERSCRIPT LEFT PARENTHESIS\r
++207E          ; disallowed_STD3_mapped ; 0029          # 1.1  SUPERSCRIPT RIGHT PARENTHESIS\r
++207F          ; mapped                 ; 006E          # 1.1  SUPERSCRIPT LATIN SMALL LETTER N\r
++2080          ; mapped                 ; 0030          # 1.1  SUBSCRIPT ZERO\r
++2081          ; mapped                 ; 0031          # 1.1  SUBSCRIPT ONE\r
++2082          ; mapped                 ; 0032          # 1.1  SUBSCRIPT TWO\r
++2083          ; mapped                 ; 0033          # 1.1  SUBSCRIPT THREE\r
++2084          ; mapped                 ; 0034          # 1.1  SUBSCRIPT FOUR\r
++2085          ; mapped                 ; 0035          # 1.1  SUBSCRIPT FIVE\r
++2086          ; mapped                 ; 0036          # 1.1  SUBSCRIPT SIX\r
++2087          ; mapped                 ; 0037          # 1.1  SUBSCRIPT SEVEN\r
++2088          ; mapped                 ; 0038          # 1.1  SUBSCRIPT EIGHT\r
++2089          ; mapped                 ; 0039          # 1.1  SUBSCRIPT NINE\r
++208A          ; disallowed_STD3_mapped ; 002B          # 1.1  SUBSCRIPT PLUS SIGN\r
++208B          ; mapped                 ; 2212          # 1.1  SUBSCRIPT MINUS\r
++208C          ; disallowed_STD3_mapped ; 003D          # 1.1  SUBSCRIPT EQUALS SIGN\r
++208D          ; disallowed_STD3_mapped ; 0028          # 1.1  SUBSCRIPT LEFT PARENTHESIS\r
++208E          ; disallowed_STD3_mapped ; 0029          # 1.1  SUBSCRIPT RIGHT PARENTHESIS\r
++208F          ; disallowed                             # NA   <reserved-208F>\r
++2090          ; mapped                 ; 0061          # 4.1  LATIN SUBSCRIPT SMALL LETTER A\r
++2091          ; mapped                 ; 0065          # 4.1  LATIN SUBSCRIPT SMALL LETTER E\r
++2092          ; mapped                 ; 006F          # 4.1  LATIN SUBSCRIPT SMALL LETTER O\r
++2093          ; mapped                 ; 0078          # 4.1  LATIN SUBSCRIPT SMALL LETTER X\r
++2094          ; mapped                 ; 0259          # 4.1  LATIN SUBSCRIPT SMALL LETTER SCHWA\r
++2095          ; mapped                 ; 0068          # 6.0  LATIN SUBSCRIPT SMALL LETTER H\r
++2096          ; mapped                 ; 006B          # 6.0  LATIN SUBSCRIPT SMALL LETTER K\r
++2097          ; mapped                 ; 006C          # 6.0  LATIN SUBSCRIPT SMALL LETTER L\r
++2098          ; mapped                 ; 006D          # 6.0  LATIN SUBSCRIPT SMALL LETTER M\r
++2099          ; mapped                 ; 006E          # 6.0  LATIN SUBSCRIPT SMALL LETTER N\r
++209A          ; mapped                 ; 0070          # 6.0  LATIN SUBSCRIPT SMALL LETTER P\r
++209B          ; mapped                 ; 0073          # 6.0  LATIN SUBSCRIPT SMALL LETTER S\r
++209C          ; mapped                 ; 0074          # 6.0  LATIN SUBSCRIPT SMALL LETTER T\r
++209D..209F    ; disallowed                             # NA   <reserved-209D>..<reserved-209F>\r
++20A0..20A7    ; valid                  ;      ; NV8    # 1.1  EURO-CURRENCY SIGN..PESETA SIGN\r
++20A8          ; mapped                 ; 0072 0073     # 1.1  RUPEE SIGN\r
++20A9..20AA    ; valid                  ;      ; NV8    # 1.1  WON SIGN..NEW SHEQEL SIGN\r
++20AB          ; valid                  ;      ; NV8    # 2.0  DONG SIGN\r
++20AC          ; valid                  ;      ; NV8    # 2.1  EURO SIGN\r
++20AD..20AF    ; valid                  ;      ; NV8    # 3.0  KIP SIGN..DRACHMA SIGN\r
++20B0..20B1    ; valid                  ;      ; NV8    # 3.2  GERMAN PENNY SIGN..PESO SIGN\r
++20B2..20B5    ; valid                  ;      ; NV8    # 4.1  GUARANI SIGN..CEDI SIGN\r
++20B6..20B8    ; valid                  ;      ; NV8    # 5.2  LIVRE TOURNOIS SIGN..TENGE SIGN\r
++20B9          ; valid                  ;      ; NV8    # 6.0  INDIAN RUPEE SIGN\r
++20BA          ; valid                  ;      ; NV8    # 6.2  TURKISH LIRA SIGN\r
++20BB..20BD    ; valid                  ;      ; NV8    # 7.0  NORDIC MARK SIGN..RUBLE SIGN\r
++20BE          ; valid                  ;      ; NV8    # 8.0  LARI SIGN\r
++20BF          ; valid                  ;      ; NV8    # 10.0 BITCOIN SIGN\r
++20C0..20CF    ; disallowed                             # NA   <reserved-20C0>..<reserved-20CF>\r
++20D0..20E1    ; valid                  ;      ; NV8    # 1.1  COMBINING LEFT HARPOON ABOVE..COMBINING LEFT RIGHT ARROW ABOVE\r
++20E2..20E3    ; valid                  ;      ; NV8    # 3.0  COMBINING ENCLOSING SCREEN..COMBINING ENCLOSING KEYCAP\r
++20E4..20EA    ; valid                  ;      ; NV8    # 3.2  COMBINING ENCLOSING UPWARD POINTING TRIANGLE..COMBINING LEFTWARDS ARROW OVERLAY\r
++20EB          ; valid                  ;      ; NV8    # 4.1  COMBINING LONG DOUBLE SOLIDUS OVERLAY\r
++20EC..20EF    ; valid                  ;      ; NV8    # 5.0  COMBINING RIGHTWARDS HARPOON WITH BARB DOWNWARDS..COMBINING RIGHT ARROW BELOW\r
++20F0          ; valid                  ;      ; NV8    # 5.1  COMBINING ASTERISK ABOVE\r
++20F1..20FF    ; disallowed                             # NA   <reserved-20F1>..<reserved-20FF>\r
++2100          ; disallowed_STD3_mapped ; 0061 002F 0063 #1.1  ACCOUNT OF\r
++2101          ; disallowed_STD3_mapped ; 0061 002F 0073 #1.1  ADDRESSED TO THE SUBJECT\r
++2102          ; mapped                 ; 0063          # 1.1  DOUBLE-STRUCK CAPITAL C\r
++2103          ; mapped                 ; 00B0 0063     # 1.1  DEGREE CELSIUS\r
++2104          ; valid                  ;      ; NV8    # 1.1  CENTRE LINE SYMBOL\r
++2105          ; disallowed_STD3_mapped ; 0063 002F 006F #1.1  CARE OF\r
++2106          ; disallowed_STD3_mapped ; 0063 002F 0075 #1.1  CADA UNA\r
++2107          ; mapped                 ; 025B          # 1.1  EULER CONSTANT\r
++2108          ; valid                  ;      ; NV8    # 1.1  SCRUPLE\r
++2109          ; mapped                 ; 00B0 0066     # 1.1  DEGREE FAHRENHEIT\r
++210A          ; mapped                 ; 0067          # 1.1  SCRIPT SMALL G\r
++210B..210E    ; mapped                 ; 0068          # 1.1  SCRIPT CAPITAL H..PLANCK CONSTANT\r
++210F          ; mapped                 ; 0127          # 1.1  PLANCK CONSTANT OVER TWO PI\r
++2110..2111    ; mapped                 ; 0069          # 1.1  SCRIPT CAPITAL I..BLACK-LETTER CAPITAL I\r
++2112..2113    ; mapped                 ; 006C          # 1.1  SCRIPT CAPITAL L..SCRIPT SMALL L\r
++2114          ; valid                  ;      ; NV8    # 1.1  L B BAR SYMBOL\r
++2115          ; mapped                 ; 006E          # 1.1  DOUBLE-STRUCK CAPITAL N\r
++2116          ; mapped                 ; 006E 006F     # 1.1  NUMERO SIGN\r
++2117..2118    ; valid                  ;      ; NV8    # 1.1  SOUND RECORDING COPYRIGHT..SCRIPT CAPITAL P\r
++2119          ; mapped                 ; 0070          # 1.1  DOUBLE-STRUCK CAPITAL P\r
++211A          ; mapped                 ; 0071          # 1.1  DOUBLE-STRUCK CAPITAL Q\r
++211B..211D    ; mapped                 ; 0072          # 1.1  SCRIPT CAPITAL R..DOUBLE-STRUCK CAPITAL R\r
++211E..211F    ; valid                  ;      ; NV8    # 1.1  PRESCRIPTION TAKE..RESPONSE\r
++2120          ; mapped                 ; 0073 006D     # 1.1  SERVICE MARK\r
++2121          ; mapped                 ; 0074 0065 006C #1.1  TELEPHONE SIGN\r
++2122          ; mapped                 ; 0074 006D     # 1.1  TRADE MARK SIGN\r
++2123          ; valid                  ;      ; NV8    # 1.1  VERSICLE\r
++2124          ; mapped                 ; 007A          # 1.1  DOUBLE-STRUCK CAPITAL Z\r
++2125          ; valid                  ;      ; NV8    # 1.1  OUNCE SIGN\r
++2126          ; mapped                 ; 03C9          # 1.1  OHM SIGN\r
++2127          ; valid                  ;      ; NV8    # 1.1  INVERTED OHM SIGN\r
++2128          ; mapped                 ; 007A          # 1.1  BLACK-LETTER CAPITAL Z\r
++2129          ; valid                  ;      ; NV8    # 1.1  TURNED GREEK SMALL LETTER IOTA\r
++212A          ; mapped                 ; 006B          # 1.1  KELVIN SIGN\r
++212B          ; mapped                 ; 00E5          # 1.1  ANGSTROM SIGN\r
++212C          ; mapped                 ; 0062          # 1.1  SCRIPT CAPITAL B\r
++212D          ; mapped                 ; 0063          # 1.1  BLACK-LETTER CAPITAL C\r
++212E          ; valid                  ;      ; NV8    # 1.1  ESTIMATED SYMBOL\r
++212F..2130    ; mapped                 ; 0065          # 1.1  SCRIPT SMALL E..SCRIPT CAPITAL E\r
++2131          ; mapped                 ; 0066          # 1.1  SCRIPT CAPITAL F\r
++2132          ; disallowed                             # 1.1  TURNED CAPITAL F\r
++2133          ; mapped                 ; 006D          # 1.1  SCRIPT CAPITAL M\r
++2134          ; mapped                 ; 006F          # 1.1  SCRIPT SMALL O\r
++2135          ; mapped                 ; 05D0          # 1.1  ALEF SYMBOL\r
++2136          ; mapped                 ; 05D1          # 1.1  BET SYMBOL\r
++2137          ; mapped                 ; 05D2          # 1.1  GIMEL SYMBOL\r
++2138          ; mapped                 ; 05D3          # 1.1  DALET SYMBOL\r
++2139          ; mapped                 ; 0069          # 3.0  INFORMATION SOURCE\r
++213A          ; valid                  ;      ; NV8    # 3.0  ROTATED CAPITAL Q\r
++213B          ; mapped                 ; 0066 0061 0078 #4.0  FACSIMILE SIGN\r
++213C          ; mapped                 ; 03C0          # 4.1  DOUBLE-STRUCK SMALL PI\r
++213D..213E    ; mapped                 ; 03B3          # 3.2  DOUBLE-STRUCK SMALL GAMMA..DOUBLE-STRUCK CAPITAL GAMMA\r
++213F          ; mapped                 ; 03C0          # 3.2  DOUBLE-STRUCK CAPITAL PI\r
++2140          ; mapped                 ; 2211          # 3.2  DOUBLE-STRUCK N-ARY SUMMATION\r
++2141..2144    ; valid                  ;      ; NV8    # 3.2  TURNED SANS-SERIF CAPITAL G..TURNED SANS-SERIF CAPITAL Y\r
++2145..2146    ; mapped                 ; 0064          # 3.2  DOUBLE-STRUCK ITALIC CAPITAL D..DOUBLE-STRUCK ITALIC SMALL D\r
++2147          ; mapped                 ; 0065          # 3.2  DOUBLE-STRUCK ITALIC SMALL E\r
++2148          ; mapped                 ; 0069          # 3.2  DOUBLE-STRUCK ITALIC SMALL I\r
++2149          ; mapped                 ; 006A          # 3.2  DOUBLE-STRUCK ITALIC SMALL J\r
++214A..214B    ; valid                  ;      ; NV8    # 3.2  PROPERTY LINE..TURNED AMPERSAND\r
++214C          ; valid                  ;      ; NV8    # 4.1  PER SIGN\r
++214D          ; valid                  ;      ; NV8    # 5.0  AKTIESELSKAB\r
++214E          ; valid                                  # 5.0  TURNED SMALL F\r
++214F          ; valid                  ;      ; NV8    # 5.1  SYMBOL FOR SAMARITAN SOURCE\r
++2150          ; mapped                 ; 0031 2044 0037 #5.2  VULGAR FRACTION ONE SEVENTH\r
++2151          ; mapped                 ; 0031 2044 0039 #5.2  VULGAR FRACTION ONE NINTH\r
++2152          ; mapped                 ; 0031 2044 0031 0030 #5.2 VULGAR FRACTION ONE TENTH\r
++2153          ; mapped                 ; 0031 2044 0033 #1.1  VULGAR FRACTION ONE THIRD\r
++2154          ; mapped                 ; 0032 2044 0033 #1.1  VULGAR FRACTION TWO THIRDS\r
++2155          ; mapped                 ; 0031 2044 0035 #1.1  VULGAR FRACTION ONE FIFTH\r
++2156          ; mapped                 ; 0032 2044 0035 #1.1  VULGAR FRACTION TWO FIFTHS\r
++2157          ; mapped                 ; 0033 2044 0035 #1.1  VULGAR FRACTION THREE FIFTHS\r
++2158          ; mapped                 ; 0034 2044 0035 #1.1  VULGAR FRACTION FOUR FIFTHS\r
++2159          ; mapped                 ; 0031 2044 0036 #1.1  VULGAR FRACTION ONE SIXTH\r
++215A          ; mapped                 ; 0035 2044 0036 #1.1  VULGAR FRACTION FIVE SIXTHS\r
++215B          ; mapped                 ; 0031 2044 0038 #1.1  VULGAR FRACTION ONE EIGHTH\r
++215C          ; mapped                 ; 0033 2044 0038 #1.1  VULGAR FRACTION THREE EIGHTHS\r
++215D          ; mapped                 ; 0035 2044 0038 #1.1  VULGAR FRACTION FIVE EIGHTHS\r
++215E          ; mapped                 ; 0037 2044 0038 #1.1  VULGAR FRACTION SEVEN EIGHTHS\r
++215F          ; mapped                 ; 0031 2044     # 1.1  FRACTION NUMERATOR ONE\r
++2160          ; mapped                 ; 0069          # 1.1  ROMAN NUMERAL ONE\r
++2161          ; mapped                 ; 0069 0069     # 1.1  ROMAN NUMERAL TWO\r
++2162          ; mapped                 ; 0069 0069 0069 #1.1  ROMAN NUMERAL THREE\r
++2163          ; mapped                 ; 0069 0076     # 1.1  ROMAN NUMERAL FOUR\r
++2164          ; mapped                 ; 0076          # 1.1  ROMAN NUMERAL FIVE\r
++2165          ; mapped                 ; 0076 0069     # 1.1  ROMAN NUMERAL SIX\r
++2166          ; mapped                 ; 0076 0069 0069 #1.1  ROMAN NUMERAL SEVEN\r
++2167          ; mapped                 ; 0076 0069 0069 0069 #1.1 ROMAN NUMERAL EIGHT\r
++2168          ; mapped                 ; 0069 0078     # 1.1  ROMAN NUMERAL NINE\r
++2169          ; mapped                 ; 0078          # 1.1  ROMAN NUMERAL TEN\r
++216A          ; mapped                 ; 0078 0069     # 1.1  ROMAN NUMERAL ELEVEN\r
++216B          ; mapped                 ; 0078 0069 0069 #1.1  ROMAN NUMERAL TWELVE\r
++216C          ; mapped                 ; 006C          # 1.1  ROMAN NUMERAL FIFTY\r
++216D          ; mapped                 ; 0063          # 1.1  ROMAN NUMERAL ONE HUNDRED\r
++216E          ; mapped                 ; 0064          # 1.1  ROMAN NUMERAL FIVE HUNDRED\r
++216F          ; mapped                 ; 006D          # 1.1  ROMAN NUMERAL ONE THOUSAND\r
++2170          ; mapped                 ; 0069          # 1.1  SMALL ROMAN NUMERAL ONE\r
++2171          ; mapped                 ; 0069 0069     # 1.1  SMALL ROMAN NUMERAL TWO\r
++2172          ; mapped                 ; 0069 0069 0069 #1.1  SMALL ROMAN NUMERAL THREE\r
++2173          ; mapped                 ; 0069 0076     # 1.1  SMALL ROMAN NUMERAL FOUR\r
++2174          ; mapped                 ; 0076          # 1.1  SMALL ROMAN NUMERAL FIVE\r
++2175          ; mapped                 ; 0076 0069     # 1.1  SMALL ROMAN NUMERAL SIX\r
++2176          ; mapped                 ; 0076 0069 0069 #1.1  SMALL ROMAN NUMERAL SEVEN\r
++2177          ; mapped                 ; 0076 0069 0069 0069 #1.1 SMALL ROMAN NUMERAL EIGHT\r
++2178          ; mapped                 ; 0069 0078     # 1.1  SMALL ROMAN NUMERAL NINE\r
++2179          ; mapped                 ; 0078          # 1.1  SMALL ROMAN NUMERAL TEN\r
++217A          ; mapped                 ; 0078 0069     # 1.1  SMALL ROMAN NUMERAL ELEVEN\r
++217B          ; mapped                 ; 0078 0069 0069 #1.1  SMALL ROMAN NUMERAL TWELVE\r
++217C          ; mapped                 ; 006C          # 1.1  SMALL ROMAN NUMERAL FIFTY\r
++217D          ; mapped                 ; 0063          # 1.1  SMALL ROMAN NUMERAL ONE HUNDRED\r
++217E          ; mapped                 ; 0064          # 1.1  SMALL ROMAN NUMERAL FIVE HUNDRED\r
++217F          ; mapped                 ; 006D          # 1.1  SMALL ROMAN NUMERAL ONE THOUSAND\r
++2180..2182    ; valid                  ;      ; NV8    # 1.1  ROMAN NUMERAL ONE THOUSAND C D..ROMAN NUMERAL TEN THOUSAND\r
++2183          ; disallowed                             # 3.0  ROMAN NUMERAL REVERSED ONE HUNDRED\r
++2184          ; valid                                  # 5.0  LATIN SMALL LETTER REVERSED C\r
++2185..2188    ; valid                  ;      ; NV8    # 5.1  ROMAN NUMERAL SIX LATE FORM..ROMAN NUMERAL ONE HUNDRED THOUSAND\r
++2189          ; mapped                 ; 0030 2044 0033 #5.2  VULGAR FRACTION ZERO THIRDS\r
++218A..218B    ; valid                  ;      ; NV8    # 8.0  TURNED DIGIT TWO..TURNED DIGIT THREE\r
++218C..218F    ; disallowed                             # NA   <reserved-218C>..<reserved-218F>\r
++2190..21EA    ; valid                  ;      ; NV8    # 1.1  LEFTWARDS ARROW..UPWARDS WHITE ARROW FROM BAR\r
++21EB..21F3    ; valid                  ;      ; NV8    # 3.0  UPWARDS WHITE ARROW ON PEDESTAL..UP DOWN WHITE ARROW\r
++21F4..21FF    ; valid                  ;      ; NV8    # 3.2  RIGHT ARROW WITH SMALL CIRCLE..LEFT RIGHT OPEN-HEADED ARROW\r
++2200..222B    ; valid                  ;      ; NV8    # 1.1  FOR ALL..INTEGRAL\r
++222C          ; mapped                 ; 222B 222B     # 1.1  DOUBLE INTEGRAL\r
++222D          ; mapped                 ; 222B 222B 222B #1.1  TRIPLE INTEGRAL\r
++222E          ; valid                  ;      ; NV8    # 1.1  CONTOUR INTEGRAL\r
++222F          ; mapped                 ; 222E 222E     # 1.1  SURFACE INTEGRAL\r
++2230          ; mapped                 ; 222E 222E 222E #1.1  VOLUME INTEGRAL\r
++2231..225F    ; valid                  ;      ; NV8    # 1.1  CLOCKWISE INTEGRAL..QUESTIONED EQUAL TO\r
++2260          ; disallowed_STD3_valid                  # 1.1  NOT EQUAL TO\r
++2261..226D    ; valid                  ;      ; NV8    # 1.1  IDENTICAL TO..NOT EQUIVALENT TO\r
++226E..226F    ; disallowed_STD3_valid                  # 1.1  NOT LESS-THAN..NOT GREATER-THAN\r
++2270..22F1    ; valid                  ;      ; NV8    # 1.1  NEITHER LESS-THAN NOR EQUAL TO..DOWN RIGHT DIAGONAL ELLIPSIS\r
++22F2..22FF    ; valid                  ;      ; NV8    # 3.2  ELEMENT OF WITH LONG HORIZONTAL STROKE..Z NOTATION BAG MEMBERSHIP\r
++2300          ; valid                  ;      ; NV8    # 1.1  DIAMETER SIGN\r
++2301          ; valid                  ;      ; NV8    # 3.0  ELECTRIC ARROW\r
++2302..2328    ; valid                  ;      ; NV8    # 1.1  HOUSE..KEYBOARD\r
++2329          ; mapped                 ; 3008          # 1.1  LEFT-POINTING ANGLE BRACKET\r
++232A          ; mapped                 ; 3009          # 1.1  RIGHT-POINTING ANGLE BRACKET\r
++232B..237A    ; valid                  ;      ; NV8    # 1.1  ERASE TO THE LEFT..APL FUNCTIONAL SYMBOL ALPHA\r
++237B          ; valid                  ;      ; NV8    # 3.0  NOT CHECK MARK\r
++237C          ; valid                  ;      ; NV8    # 3.2  RIGHT ANGLE WITH DOWNWARDS ZIGZAG ARROW\r
++237D..239A    ; valid                  ;      ; NV8    # 3.0  SHOULDERED OPEN BOX..CLEAR SCREEN SYMBOL\r
++239B..23CE    ; valid                  ;      ; NV8    # 3.2  LEFT PARENTHESIS UPPER HOOK..RETURN SYMBOL\r
++23CF..23D0    ; valid                  ;      ; NV8    # 4.0  EJECT SYMBOL..VERTICAL LINE EXTENSION\r
++23D1..23DB    ; valid                  ;      ; NV8    # 4.1  METRICAL BREVE..FUSE\r
++23DC..23E7    ; valid                  ;      ; NV8    # 5.0  TOP PARENTHESIS..ELECTRICAL INTERSECTION\r
++23E8          ; valid                  ;      ; NV8    # 5.2  DECIMAL EXPONENT SYMBOL\r
++23E9..23F3    ; valid                  ;      ; NV8    # 6.0  BLACK RIGHT-POINTING DOUBLE TRIANGLE..HOURGLASS WITH FLOWING SAND\r
++23F4..23FA    ; valid                  ;      ; NV8    # 7.0  BLACK MEDIUM LEFT-POINTING TRIANGLE..BLACK CIRCLE FOR RECORD\r
++23FB..23FE    ; valid                  ;      ; NV8    # 9.0  POWER SYMBOL..POWER SLEEP SYMBOL\r
++23FF          ; valid                  ;      ; NV8    # 10.0 OBSERVER EYE SYMBOL\r
++2400..2424    ; valid                  ;      ; NV8    # 1.1  SYMBOL FOR NULL..SYMBOL FOR NEWLINE\r
++2425..2426    ; valid                  ;      ; NV8    # 3.0  SYMBOL FOR DELETE FORM TWO..SYMBOL FOR SUBSTITUTE FORM TWO\r
++2427..243F    ; disallowed                             # NA   <reserved-2427>..<reserved-243F>\r
++2440..244A    ; valid                  ;      ; NV8    # 1.1  OCR HOOK..OCR DOUBLE BACKSLASH\r
++244B..245F    ; disallowed                             # NA   <reserved-244B>..<reserved-245F>\r
++2460          ; mapped                 ; 0031          # 1.1  CIRCLED DIGIT ONE\r
++2461          ; mapped                 ; 0032          # 1.1  CIRCLED DIGIT TWO\r
++2462          ; mapped                 ; 0033          # 1.1  CIRCLED DIGIT THREE\r
++2463          ; mapped                 ; 0034          # 1.1  CIRCLED DIGIT FOUR\r
++2464          ; mapped                 ; 0035          # 1.1  CIRCLED DIGIT FIVE\r
++2465          ; mapped                 ; 0036          # 1.1  CIRCLED DIGIT SIX\r
++2466          ; mapped                 ; 0037          # 1.1  CIRCLED DIGIT SEVEN\r
++2467          ; mapped                 ; 0038          # 1.1  CIRCLED DIGIT EIGHT\r
++2468          ; mapped                 ; 0039          # 1.1  CIRCLED DIGIT NINE\r
++2469          ; mapped                 ; 0031 0030     # 1.1  CIRCLED NUMBER TEN\r
++246A          ; mapped                 ; 0031 0031     # 1.1  CIRCLED NUMBER ELEVEN\r
++246B          ; mapped                 ; 0031 0032     # 1.1  CIRCLED NUMBER TWELVE\r
++246C          ; mapped                 ; 0031 0033     # 1.1  CIRCLED NUMBER THIRTEEN\r
++246D          ; mapped                 ; 0031 0034     # 1.1  CIRCLED NUMBER FOURTEEN\r
++246E          ; mapped                 ; 0031 0035     # 1.1  CIRCLED NUMBER FIFTEEN\r
++246F          ; mapped                 ; 0031 0036     # 1.1  CIRCLED NUMBER SIXTEEN\r
++2470          ; mapped                 ; 0031 0037     # 1.1  CIRCLED NUMBER SEVENTEEN\r
++2471          ; mapped                 ; 0031 0038     # 1.1  CIRCLED NUMBER EIGHTEEN\r
++2472          ; mapped                 ; 0031 0039     # 1.1  CIRCLED NUMBER NINETEEN\r
++2473          ; mapped                 ; 0032 0030     # 1.1  CIRCLED NUMBER TWENTY\r
++2474          ; disallowed_STD3_mapped ; 0028 0031 0029 #1.1  PARENTHESIZED DIGIT ONE\r
++2475          ; disallowed_STD3_mapped ; 0028 0032 0029 #1.1  PARENTHESIZED DIGIT TWO\r
++2476          ; disallowed_STD3_mapped ; 0028 0033 0029 #1.1  PARENTHESIZED DIGIT THREE\r
++2477          ; disallowed_STD3_mapped ; 0028 0034 0029 #1.1  PARENTHESIZED DIGIT FOUR\r
++2478          ; disallowed_STD3_mapped ; 0028 0035 0029 #1.1  PARENTHESIZED DIGIT FIVE\r
++2479          ; disallowed_STD3_mapped ; 0028 0036 0029 #1.1  PARENTHESIZED DIGIT SIX\r
++247A          ; disallowed_STD3_mapped ; 0028 0037 0029 #1.1  PARENTHESIZED DIGIT SEVEN\r
++247B          ; disallowed_STD3_mapped ; 0028 0038 0029 #1.1  PARENTHESIZED DIGIT EIGHT\r
++247C          ; disallowed_STD3_mapped ; 0028 0039 0029 #1.1  PARENTHESIZED DIGIT NINE\r
++247D          ; disallowed_STD3_mapped ; 0028 0031 0030 0029 #1.1 PARENTHESIZED NUMBER TEN\r
++247E          ; disallowed_STD3_mapped ; 0028 0031 0031 0029 #1.1 PARENTHESIZED NUMBER ELEVEN\r
++247F          ; disallowed_STD3_mapped ; 0028 0031 0032 0029 #1.1 PARENTHESIZED NUMBER TWELVE\r
++2480          ; disallowed_STD3_mapped ; 0028 0031 0033 0029 #1.1 PARENTHESIZED NUMBER THIRTEEN\r
++2481          ; disallowed_STD3_mapped ; 0028 0031 0034 0029 #1.1 PARENTHESIZED NUMBER FOURTEEN\r
++2482          ; disallowed_STD3_mapped ; 0028 0031 0035 0029 #1.1 PARENTHESIZED NUMBER FIFTEEN\r
++2483          ; disallowed_STD3_mapped ; 0028 0031 0036 0029 #1.1 PARENTHESIZED NUMBER SIXTEEN\r
++2484          ; disallowed_STD3_mapped ; 0028 0031 0037 0029 #1.1 PARENTHESIZED NUMBER SEVENTEEN\r
++2485          ; disallowed_STD3_mapped ; 0028 0031 0038 0029 #1.1 PARENTHESIZED NUMBER EIGHTEEN\r
++2486          ; disallowed_STD3_mapped ; 0028 0031 0039 0029 #1.1 PARENTHESIZED NUMBER NINETEEN\r
++2487          ; disallowed_STD3_mapped ; 0028 0032 0030 0029 #1.1 PARENTHESIZED NUMBER TWENTY\r
++2488..249B    ; disallowed                             # 1.1  DIGIT ONE FULL STOP..NUMBER TWENTY FULL STOP\r
++249C          ; disallowed_STD3_mapped ; 0028 0061 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER A\r
++249D          ; disallowed_STD3_mapped ; 0028 0062 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER B\r
++249E          ; disallowed_STD3_mapped ; 0028 0063 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER C\r
++249F          ; disallowed_STD3_mapped ; 0028 0064 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER D\r
++24A0          ; disallowed_STD3_mapped ; 0028 0065 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER E\r
++24A1          ; disallowed_STD3_mapped ; 0028 0066 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER F\r
++24A2          ; disallowed_STD3_mapped ; 0028 0067 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER G\r
++24A3          ; disallowed_STD3_mapped ; 0028 0068 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER H\r
++24A4          ; disallowed_STD3_mapped ; 0028 0069 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER I\r
++24A5          ; disallowed_STD3_mapped ; 0028 006A 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER J\r
++24A6          ; disallowed_STD3_mapped ; 0028 006B 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER K\r
++24A7          ; disallowed_STD3_mapped ; 0028 006C 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER L\r
++24A8          ; disallowed_STD3_mapped ; 0028 006D 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER M\r
++24A9          ; disallowed_STD3_mapped ; 0028 006E 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER N\r
++24AA          ; disallowed_STD3_mapped ; 0028 006F 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER O\r
++24AB          ; disallowed_STD3_mapped ; 0028 0070 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER P\r
++24AC          ; disallowed_STD3_mapped ; 0028 0071 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER Q\r
++24AD          ; disallowed_STD3_mapped ; 0028 0072 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER R\r
++24AE          ; disallowed_STD3_mapped ; 0028 0073 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER S\r
++24AF          ; disallowed_STD3_mapped ; 0028 0074 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER T\r
++24B0          ; disallowed_STD3_mapped ; 0028 0075 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER U\r
++24B1          ; disallowed_STD3_mapped ; 0028 0076 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER V\r
++24B2          ; disallowed_STD3_mapped ; 0028 0077 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER W\r
++24B3          ; disallowed_STD3_mapped ; 0028 0078 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER X\r
++24B4          ; disallowed_STD3_mapped ; 0028 0079 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER Y\r
++24B5          ; disallowed_STD3_mapped ; 0028 007A 0029 #1.1  PARENTHESIZED LATIN SMALL LETTER Z\r
++24B6          ; mapped                 ; 0061          # 1.1  CIRCLED LATIN CAPITAL LETTER A\r
++24B7          ; mapped                 ; 0062          # 1.1  CIRCLED LATIN CAPITAL LETTER B\r
++24B8          ; mapped                 ; 0063          # 1.1  CIRCLED LATIN CAPITAL LETTER C\r
++24B9          ; mapped                 ; 0064          # 1.1  CIRCLED LATIN CAPITAL LETTER D\r
++24BA          ; mapped                 ; 0065          # 1.1  CIRCLED LATIN CAPITAL LETTER E\r
++24BB          ; mapped                 ; 0066          # 1.1  CIRCLED LATIN CAPITAL LETTER F\r
++24BC          ; mapped                 ; 0067          # 1.1  CIRCLED LATIN CAPITAL LETTER G\r
++24BD          ; mapped                 ; 0068          # 1.1  CIRCLED LATIN CAPITAL LETTER H\r
++24BE          ; mapped                 ; 0069          # 1.1  CIRCLED LATIN CAPITAL LETTER I\r
++24BF          ; mapped                 ; 006A          # 1.1  CIRCLED LATIN CAPITAL LETTER J\r
++24C0          ; mapped                 ; 006B          # 1.1  CIRCLED LATIN CAPITAL LETTER K\r
++24C1          ; mapped                 ; 006C          # 1.1  CIRCLED LATIN CAPITAL LETTER L\r
++24C2          ; mapped                 ; 006D          # 1.1  CIRCLED LATIN CAPITAL LETTER M\r
++24C3          ; mapped                 ; 006E          # 1.1  CIRCLED LATIN CAPITAL LETTER N\r
++24C4          ; mapped                 ; 006F          # 1.1  CIRCLED LATIN CAPITAL LETTER O\r
++24C5          ; mapped                 ; 0070          # 1.1  CIRCLED LATIN CAPITAL LETTER P\r
++24C6          ; mapped                 ; 0071          # 1.1  CIRCLED LATIN CAPITAL LETTER Q\r
++24C7          ; mapped                 ; 0072          # 1.1  CIRCLED LATIN CAPITAL LETTER R\r
++24C8          ; mapped                 ; 0073          # 1.1  CIRCLED LATIN CAPITAL LETTER S\r
++24C9          ; mapped                 ; 0074          # 1.1  CIRCLED LATIN CAPITAL LETTER T\r
++24CA          ; mapped                 ; 0075          # 1.1  CIRCLED LATIN CAPITAL LETTER U\r
++24CB          ; mapped                 ; 0076          # 1.1  CIRCLED LATIN CAPITAL LETTER V\r
++24CC          ; mapped                 ; 0077          # 1.1  CIRCLED LATIN CAPITAL LETTER W\r
++24CD          ; mapped                 ; 0078          # 1.1  CIRCLED LATIN CAPITAL LETTER X\r
++24CE          ; mapped                 ; 0079          # 1.1  CIRCLED LATIN CAPITAL LETTER Y\r
++24CF          ; mapped                 ; 007A          # 1.1  CIRCLED LATIN CAPITAL LETTER Z\r
++24D0          ; mapped                 ; 0061          # 1.1  CIRCLED LATIN SMALL LETTER A\r
++24D1          ; mapped                 ; 0062          # 1.1  CIRCLED LATIN SMALL LETTER B\r
++24D2          ; mapped                 ; 0063          # 1.1  CIRCLED LATIN SMALL LETTER C\r
++24D3          ; mapped                 ; 0064          # 1.1  CIRCLED LATIN SMALL LETTER D\r
++24D4          ; mapped                 ; 0065          # 1.1  CIRCLED LATIN SMALL LETTER E\r
++24D5          ; mapped                 ; 0066          # 1.1  CIRCLED LATIN SMALL LETTER F\r
++24D6          ; mapped                 ; 0067          # 1.1  CIRCLED LATIN SMALL LETTER G\r
++24D7          ; mapped                 ; 0068          # 1.1  CIRCLED LATIN SMALL LETTER H\r
++24D8          ; mapped                 ; 0069          # 1.1  CIRCLED LATIN SMALL LETTER I\r
++24D9          ; mapped                 ; 006A          # 1.1  CIRCLED LATIN SMALL LETTER J\r
++24DA          ; mapped                 ; 006B          # 1.1  CIRCLED LATIN SMALL LETTER K\r
++24DB          ; mapped                 ; 006C          # 1.1  CIRCLED LATIN SMALL LETTER L\r
++24DC          ; mapped                 ; 006D          # 1.1  CIRCLED LATIN SMALL LETTER M\r
++24DD          ; mapped                 ; 006E          # 1.1  CIRCLED LATIN SMALL LETTER N\r
++24DE          ; mapped                 ; 006F          # 1.1  CIRCLED LATIN SMALL LETTER O\r
++24DF          ; mapped                 ; 0070          # 1.1  CIRCLED LATIN SMALL LETTER P\r
++24E0          ; mapped                 ; 0071          # 1.1  CIRCLED LATIN SMALL LETTER Q\r
++24E1          ; mapped                 ; 0072          # 1.1  CIRCLED LATIN SMALL LETTER R\r
++24E2          ; mapped                 ; 0073          # 1.1  CIRCLED LATIN SMALL LETTER S\r
++24E3          ; mapped                 ; 0074          # 1.1  CIRCLED LATIN SMALL LETTER T\r
++24E4          ; mapped                 ; 0075          # 1.1  CIRCLED LATIN SMALL LETTER U\r
++24E5          ; mapped                 ; 0076          # 1.1  CIRCLED LATIN SMALL LETTER V\r
++24E6          ; mapped                 ; 0077          # 1.1  CIRCLED LATIN SMALL LETTER W\r
++24E7          ; mapped                 ; 0078          # 1.1  CIRCLED LATIN SMALL LETTER X\r
++24E8          ; mapped                 ; 0079          # 1.1  CIRCLED LATIN SMALL LETTER Y\r
++24E9          ; mapped                 ; 007A          # 1.1  CIRCLED LATIN SMALL LETTER Z\r
++24EA          ; mapped                 ; 0030          # 1.1  CIRCLED DIGIT ZERO\r
++24EB..24FE    ; valid                  ;      ; NV8    # 3.2  NEGATIVE CIRCLED NUMBER ELEVEN..DOUBLE CIRCLED NUMBER TEN\r
++24FF          ; valid                  ;      ; NV8    # 4.0  NEGATIVE CIRCLED DIGIT ZERO\r
++2500..2595    ; valid                  ;      ; NV8    # 1.1  BOX DRAWINGS LIGHT HORIZONTAL..RIGHT ONE EIGHTH BLOCK\r
++2596..259F    ; valid                  ;      ; NV8    # 3.2  QUADRANT LOWER LEFT..QUADRANT UPPER RIGHT AND LOWER LEFT AND LOWER RIGHT\r
++25A0..25EF    ; valid                  ;      ; NV8    # 1.1  BLACK SQUARE..LARGE CIRCLE\r
++25F0..25F7    ; valid                  ;      ; NV8    # 3.0  WHITE SQUARE WITH UPPER LEFT QUADRANT..WHITE CIRCLE WITH UPPER RIGHT QUADRANT\r
++25F8..25FF    ; valid                  ;      ; NV8    # 3.2  UPPER LEFT TRIANGLE..LOWER RIGHT TRIANGLE\r
++2600..2613    ; valid                  ;      ; NV8    # 1.1  BLACK SUN WITH RAYS..SALTIRE\r
++2614..2615    ; valid                  ;      ; NV8    # 4.0  UMBRELLA WITH RAIN DROPS..HOT BEVERAGE\r
++2616..2617    ; valid                  ;      ; NV8    # 3.2  WHITE SHOGI PIECE..BLACK SHOGI PIECE\r
++2618          ; valid                  ;      ; NV8    # 4.1  SHAMROCK\r
++2619          ; valid                  ;      ; NV8    # 3.0  REVERSED ROTATED FLORAL HEART BULLET\r
++261A..266F    ; valid                  ;      ; NV8    # 1.1  BLACK LEFT POINTING INDEX..MUSIC SHARP SIGN\r
++2670..2671    ; valid                  ;      ; NV8    # 3.0  WEST SYRIAC CROSS..EAST SYRIAC CROSS\r
++2672..267D    ; valid                  ;      ; NV8    # 3.2  UNIVERSAL RECYCLING SYMBOL..PARTIALLY-RECYCLED PAPER SYMBOL\r
++267E..267F    ; valid                  ;      ; NV8    # 4.1  PERMANENT PAPER SIGN..WHEELCHAIR SYMBOL\r
++2680..2689    ; valid                  ;      ; NV8    # 3.2  DIE FACE-1..BLACK CIRCLE WITH TWO WHITE DOTS\r
++268A..2691    ; valid                  ;      ; NV8    # 4.0  MONOGRAM FOR YANG..BLACK FLAG\r
++2692..269C    ; valid                  ;      ; NV8    # 4.1  HAMMER AND PICK..FLEUR-DE-LIS\r
++269D          ; valid                  ;      ; NV8    # 5.1  OUTLINED WHITE STAR\r
++269E..269F    ; valid                  ;      ; NV8    # 5.2  THREE LINES CONVERGING RIGHT..THREE LINES CONVERGING LEFT\r
++26A0..26A1    ; valid                  ;      ; NV8    # 4.0  WARNING SIGN..HIGH VOLTAGE SIGN\r
++26A2..26B1    ; valid                  ;      ; NV8    # 4.1  DOUBLED FEMALE SIGN..FUNERAL URN\r
++26B2          ; valid                  ;      ; NV8    # 5.0  NEUTER\r
++26B3..26BC    ; valid                  ;      ; NV8    # 5.1  CERES..SESQUIQUADRATE\r
++26BD..26BF    ; valid                  ;      ; NV8    # 5.2  SOCCER BALL..SQUARED KEY\r
++26C0..26C3    ; valid                  ;      ; NV8    # 5.1  WHITE DRAUGHTS MAN..BLACK DRAUGHTS KING\r
++26C4..26CD    ; valid                  ;      ; NV8    # 5.2  SNOWMAN WITHOUT SNOW..DISABLED CAR\r
++26CE          ; valid                  ;      ; NV8    # 6.0  OPHIUCHUS\r
++26CF..26E1    ; valid                  ;      ; NV8    # 5.2  PICK..RESTRICTED LEFT ENTRY-2\r
++26E2          ; valid                  ;      ; NV8    # 6.0  ASTRONOMICAL SYMBOL FOR URANUS\r
++26E3          ; valid                  ;      ; NV8    # 5.2  HEAVY CIRCLE WITH STROKE AND TWO DOTS ABOVE\r
++26E4..26E7    ; valid                  ;      ; NV8    # 6.0  PENTAGRAM..INVERTED PENTAGRAM\r
++26E8..26FF    ; valid                  ;      ; NV8    # 5.2  BLACK CROSS ON SHIELD..WHITE FLAG WITH HORIZONTAL MIDDLE BLACK STRIPE\r
++2700          ; valid                  ;      ; NV8    # 7.0  BLACK SAFETY SCISSORS\r
++2701..2704    ; valid                  ;      ; NV8    # 1.1  UPPER BLADE SCISSORS..WHITE SCISSORS\r
++2705          ; valid                  ;      ; NV8    # 6.0  WHITE HEAVY CHECK MARK\r
++2706..2709    ; valid                  ;      ; NV8    # 1.1  TELEPHONE LOCATION SIGN..ENVELOPE\r
++270A..270B    ; valid                  ;      ; NV8    # 6.0  RAISED FIST..RAISED HAND\r
++270C..2727    ; valid                  ;      ; NV8    # 1.1  VICTORY HAND..WHITE FOUR POINTED STAR\r
++2728          ; valid                  ;      ; NV8    # 6.0  SPARKLES\r
++2729..274B    ; valid                  ;      ; NV8    # 1.1  STRESS OUTLINED WHITE STAR..HEAVY EIGHT TEARDROP-SPOKED PROPELLER ASTERISK\r
++274C          ; valid                  ;      ; NV8    # 6.0  CROSS MARK\r
++274D          ; valid                  ;      ; NV8    # 1.1  SHADOWED WHITE CIRCLE\r
++274E          ; valid                  ;      ; NV8    # 6.0  NEGATIVE SQUARED CROSS MARK\r
++274F..2752    ; valid                  ;      ; NV8    # 1.1  LOWER RIGHT DROP-SHADOWED WHITE SQUARE..UPPER RIGHT SHADOWED WHITE SQUARE\r
++2753..2755    ; valid                  ;      ; NV8    # 6.0  BLACK QUESTION MARK ORNAMENT..WHITE EXCLAMATION MARK ORNAMENT\r
++2756          ; valid                  ;      ; NV8    # 1.1  BLACK DIAMOND MINUS WHITE X\r
++2757          ; valid                  ;      ; NV8    # 5.2  HEAVY EXCLAMATION MARK SYMBOL\r
++2758..275E    ; valid                  ;      ; NV8    # 1.1  LIGHT VERTICAL BAR..HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT\r
++275F..2760    ; valid                  ;      ; NV8    # 6.0  HEAVY LOW SINGLE COMMA QUOTATION MARK ORNAMENT..HEAVY LOW DOUBLE COMMA QUOTATION MARK ORNAMENT\r
++2761..2767    ; valid                  ;      ; NV8    # 1.1  CURVED STEM PARAGRAPH SIGN ORNAMENT..ROTATED FLORAL HEART BULLET\r
++2768..2775    ; valid                  ;      ; NV8    # 3.2  MEDIUM LEFT PARENTHESIS ORNAMENT..MEDIUM RIGHT CURLY BRACKET ORNAMENT\r
++2776..2794    ; valid                  ;      ; NV8    # 1.1  DINGBAT NEGATIVE CIRCLED DIGIT ONE..HEAVY WIDE-HEADED RIGHTWARDS ARROW\r
++2795..2797    ; valid                  ;      ; NV8    # 6.0  HEAVY PLUS SIGN..HEAVY DIVISION SIGN\r
++2798..27AF    ; valid                  ;      ; NV8    # 1.1  HEAVY SOUTH EAST ARROW..NOTCHED LOWER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW\r
++27B0          ; valid                  ;      ; NV8    # 6.0  CURLY LOOP\r
++27B1..27BE    ; valid                  ;      ; NV8    # 1.1  NOTCHED UPPER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW..OPEN-OUTLINED RIGHTWARDS ARROW\r
++27BF          ; valid                  ;      ; NV8    # 6.0  DOUBLE CURLY LOOP\r
++27C0..27C6    ; valid                  ;      ; NV8    # 4.1  THREE DIMENSIONAL ANGLE..RIGHT S-SHAPED BAG DELIMITER\r
++27C7..27CA    ; valid                  ;      ; NV8    # 5.0  OR WITH DOT INSIDE..VERTICAL BAR WITH HORIZONTAL STROKE\r
++27CB          ; valid                  ;      ; NV8    # 6.1  MATHEMATICAL RISING DIAGONAL\r
++27CC          ; valid                  ;      ; NV8    # 5.1  LONG DIVISION\r
++27CD          ; valid                  ;      ; NV8    # 6.1  MATHEMATICAL FALLING DIAGONAL\r
++27CE..27CF    ; valid                  ;      ; NV8    # 6.0  SQUARED LOGICAL AND..SQUARED LOGICAL OR\r
++27D0..27EB    ; valid                  ;      ; NV8    # 3.2  WHITE DIAMOND WITH CENTRED DOT..MATHEMATICAL RIGHT DOUBLE ANGLE BRACKET\r
++27EC..27EF    ; valid                  ;      ; NV8    # 5.1  MATHEMATICAL LEFT WHITE TORTOISE SHELL BRACKET..MATHEMATICAL RIGHT FLATTENED PARENTHESIS\r
++27F0..27FF    ; valid                  ;      ; NV8    # 3.2  UPWARDS QUADRUPLE ARROW..LONG RIGHTWARDS SQUIGGLE ARROW\r
++2800..28FF    ; valid                  ;      ; NV8    # 3.0  BRAILLE PATTERN BLANK..BRAILLE PATTERN DOTS-12345678\r
++2900..2A0B    ; valid                  ;      ; NV8    # 3.2  RIGHTWARDS TWO-HEADED ARROW WITH VERTICAL STROKE..SUMMATION WITH INTEGRAL\r
++2A0C          ; mapped                 ; 222B 222B 222B 222B #3.2 QUADRUPLE INTEGRAL OPERATOR\r
++2A0D..2A73    ; valid                  ;      ; NV8    # 3.2  FINITE PART INTEGRAL..EQUALS SIGN ABOVE TILDE OPERATOR\r
++2A74          ; disallowed_STD3_mapped ; 003A 003A 003D #3.2  DOUBLE COLON EQUAL\r
++2A75          ; disallowed_STD3_mapped ; 003D 003D     # 3.2  TWO CONSECUTIVE EQUALS SIGNS\r
++2A76          ; disallowed_STD3_mapped ; 003D 003D 003D #3.2  THREE CONSECUTIVE EQUALS SIGNS\r
++2A77..2ADB    ; valid                  ;      ; NV8    # 3.2  EQUALS SIGN WITH TWO DOTS ABOVE AND TWO DOTS BELOW..TRANSVERSAL INTERSECTION\r
++2ADC          ; mapped                 ; 2ADD 0338     # 3.2  FORKING\r
++2ADD..2AFF    ; valid                  ;      ; NV8    # 3.2  NONFORKING..N-ARY WHITE VERTICAL BAR\r
++2B00..2B0D    ; valid                  ;      ; NV8    # 4.0  NORTH EAST WHITE ARROW..UP DOWN BLACK ARROW\r
++2B0E..2B13    ; valid                  ;      ; NV8    # 4.1  RIGHTWARDS ARROW WITH TIP DOWNWARDS..SQUARE WITH BOTTOM HALF BLACK\r
++2B14..2B1A    ; valid                  ;      ; NV8    # 5.0  SQUARE WITH UPPER RIGHT DIAGONAL HALF BLACK..DOTTED SQUARE\r
++2B1B..2B1F    ; valid                  ;      ; NV8    # 5.1  BLACK LARGE SQUARE..BLACK PENTAGON\r
++2B20..2B23    ; valid                  ;      ; NV8    # 5.0  WHITE PENTAGON..HORIZONTAL BLACK HEXAGON\r
++2B24..2B4C    ; valid                  ;      ; NV8    # 5.1  BLACK LARGE CIRCLE..RIGHTWARDS ARROW ABOVE REVERSE TILDE OPERATOR\r
++2B4D..2B4F    ; valid                  ;      ; NV8    # 7.0  DOWNWARDS TRIANGLE-HEADED ZIGZAG ARROW..SHORT BACKSLANTED SOUTH ARROW\r
++2B50..2B54    ; valid                  ;      ; NV8    # 5.1  WHITE MEDIUM STAR..WHITE RIGHT-POINTING PENTAGON\r
++2B55..2B59    ; valid                  ;      ; NV8    # 5.2  HEAVY LARGE CIRCLE..HEAVY CIRCLED SALTIRE\r
++2B5A..2B73    ; valid                  ;      ; NV8    # 7.0  SLANTED NORTH ARROW WITH HOOKED HEAD..DOWNWARDS TRIANGLE-HEADED ARROW TO BAR\r
++2B74..2B75    ; disallowed                             # NA   <reserved-2B74>..<reserved-2B75>\r
++2B76..2B95    ; valid                  ;      ; NV8    # 7.0  NORTH WEST TRIANGLE-HEADED ARROW TO BAR..RIGHTWARDS BLACK ARROW\r
++2B96..2B97    ; disallowed                             # NA   <reserved-2B96>..<reserved-2B97>\r
++2B98..2BB9    ; valid                  ;      ; NV8    # 7.0  THREE-D TOP-LIGHTED LEFTWARDS EQUILATERAL ARROWHEAD..UP ARROWHEAD IN A RECTANGLE BOX\r
++2BBA..2BBC    ; disallowed                             # NA   <reserved-2BBA>..<reserved-2BBC>\r
++2BBD..2BC8    ; valid                  ;      ; NV8    # 7.0  BALLOT BOX WITH LIGHT X..BLACK MEDIUM RIGHT-POINTING TRIANGLE CENTRED\r
++2BC9          ; disallowed                             # NA   <reserved-2BC9>\r
++2BCA..2BD1    ; valid                  ;      ; NV8    # 7.0  TOP HALF BLACK CIRCLE..UNCERTAINTY SIGN\r
++2BD2          ; valid                  ;      ; NV8    # 10.0 GROUP MARK\r
++2BD3..2BEB    ; disallowed                             # NA   <reserved-2BD3>..<reserved-2BEB>\r
++2BEC..2BEF    ; valid                  ;      ; NV8    # 8.0  LEFTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS..DOWNWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS\r
++2BF0..2BFF    ; disallowed                             # NA   <reserved-2BF0>..<reserved-2BFF>\r
++2C00          ; mapped                 ; 2C30          # 4.1  GLAGOLITIC CAPITAL LETTER AZU\r
++2C01          ; mapped                 ; 2C31          # 4.1  GLAGOLITIC CAPITAL LETTER BUKY\r
++2C02          ; mapped                 ; 2C32          # 4.1  GLAGOLITIC CAPITAL LETTER VEDE\r
++2C03          ; mapped                 ; 2C33          # 4.1  GLAGOLITIC CAPITAL LETTER GLAGOLI\r
++2C04          ; mapped                 ; 2C34          # 4.1  GLAGOLITIC CAPITAL LETTER DOBRO\r
++2C05          ; mapped                 ; 2C35          # 4.1  GLAGOLITIC CAPITAL LETTER YESTU\r
++2C06          ; mapped                 ; 2C36          # 4.1  GLAGOLITIC CAPITAL LETTER ZHIVETE\r
++2C07          ; mapped                 ; 2C37          # 4.1  GLAGOLITIC CAPITAL LETTER DZELO\r
++2C08          ; mapped                 ; 2C38          # 4.1  GLAGOLITIC CAPITAL LETTER ZEMLJA\r
++2C09          ; mapped                 ; 2C39          # 4.1  GLAGOLITIC CAPITAL LETTER IZHE\r
++2C0A          ; mapped                 ; 2C3A          # 4.1  GLAGOLITIC CAPITAL LETTER INITIAL IZHE\r
++2C0B          ; mapped                 ; 2C3B          # 4.1  GLAGOLITIC CAPITAL LETTER I\r
++2C0C          ; mapped                 ; 2C3C          # 4.1  GLAGOLITIC CAPITAL LETTER DJERVI\r
++2C0D          ; mapped                 ; 2C3D          # 4.1  GLAGOLITIC CAPITAL LETTER KAKO\r
++2C0E          ; mapped                 ; 2C3E          # 4.1  GLAGOLITIC CAPITAL LETTER LJUDIJE\r
++2C0F          ; mapped                 ; 2C3F          # 4.1  GLAGOLITIC CAPITAL LETTER MYSLITE\r
++2C10          ; mapped                 ; 2C40          # 4.1  GLAGOLITIC CAPITAL LETTER NASHI\r
++2C11          ; mapped                 ; 2C41          # 4.1  GLAGOLITIC CAPITAL LETTER ONU\r
++2C12          ; mapped                 ; 2C42          # 4.1  GLAGOLITIC CAPITAL LETTER POKOJI\r
++2C13          ; mapped                 ; 2C43          # 4.1  GLAGOLITIC CAPITAL LETTER RITSI\r
++2C14          ; mapped                 ; 2C44          # 4.1  GLAGOLITIC CAPITAL LETTER SLOVO\r
++2C15          ; mapped                 ; 2C45          # 4.1  GLAGOLITIC CAPITAL LETTER TVRIDO\r
++2C16          ; mapped                 ; 2C46          # 4.1  GLAGOLITIC CAPITAL LETTER UKU\r
++2C17          ; mapped                 ; 2C47          # 4.1  GLAGOLITIC CAPITAL LETTER FRITU\r
++2C18          ; mapped                 ; 2C48          # 4.1  GLAGOLITIC CAPITAL LETTER HERU\r
++2C19          ; mapped                 ; 2C49          # 4.1  GLAGOLITIC CAPITAL LETTER OTU\r
++2C1A          ; mapped                 ; 2C4A          # 4.1  GLAGOLITIC CAPITAL LETTER PE\r
++2C1B          ; mapped                 ; 2C4B          # 4.1  GLAGOLITIC CAPITAL LETTER SHTA\r
++2C1C          ; mapped                 ; 2C4C          # 4.1  GLAGOLITIC CAPITAL LETTER TSI\r
++2C1D          ; mapped                 ; 2C4D          # 4.1  GLAGOLITIC CAPITAL LETTER CHRIVI\r
++2C1E          ; mapped                 ; 2C4E          # 4.1  GLAGOLITIC CAPITAL LETTER SHA\r
++2C1F          ; mapped                 ; 2C4F          # 4.1  GLAGOLITIC CAPITAL LETTER YERU\r
++2C20          ; mapped                 ; 2C50          # 4.1  GLAGOLITIC CAPITAL LETTER YERI\r
++2C21          ; mapped                 ; 2C51          # 4.1  GLAGOLITIC CAPITAL LETTER YATI\r
++2C22          ; mapped                 ; 2C52          # 4.1  GLAGOLITIC CAPITAL LETTER SPIDERY HA\r
++2C23          ; mapped                 ; 2C53          # 4.1  GLAGOLITIC CAPITAL LETTER YU\r
++2C24          ; mapped                 ; 2C54          # 4.1  GLAGOLITIC CAPITAL LETTER SMALL YUS\r
++2C25          ; mapped                 ; 2C55          # 4.1  GLAGOLITIC CAPITAL LETTER SMALL YUS WITH TAIL\r
++2C26          ; mapped                 ; 2C56          # 4.1  GLAGOLITIC CAPITAL LETTER YO\r
++2C27          ; mapped                 ; 2C57          # 4.1  GLAGOLITIC CAPITAL LETTER IOTATED SMALL YUS\r
++2C28          ; mapped                 ; 2C58          # 4.1  GLAGOLITIC CAPITAL LETTER BIG YUS\r
++2C29          ; mapped                 ; 2C59          # 4.1  GLAGOLITIC CAPITAL LETTER IOTATED BIG YUS\r
++2C2A          ; mapped                 ; 2C5A          # 4.1  GLAGOLITIC CAPITAL LETTER FITA\r
++2C2B          ; mapped                 ; 2C5B          # 4.1  GLAGOLITIC CAPITAL LETTER IZHITSA\r
++2C2C          ; mapped                 ; 2C5C          # 4.1  GLAGOLITIC CAPITAL LETTER SHTAPIC\r
++2C2D          ; mapped                 ; 2C5D          # 4.1  GLAGOLITIC CAPITAL LETTER TROKUTASTI A\r
++2C2E          ; mapped                 ; 2C5E          # 4.1  GLAGOLITIC CAPITAL LETTER LATINATE MYSLITE\r
++2C2F          ; disallowed                             # NA   <reserved-2C2F>\r
++2C30..2C5E    ; valid                                  # 4.1  GLAGOLITIC SMALL LETTER AZU..GLAGOLITIC SMALL LETTER LATINATE MYSLITE\r
++2C5F          ; disallowed                             # NA   <reserved-2C5F>\r
++2C60          ; mapped                 ; 2C61          # 5.0  LATIN CAPITAL LETTER L WITH DOUBLE BAR\r
++2C61          ; valid                                  # 5.0  LATIN SMALL LETTER L WITH DOUBLE BAR\r
++2C62          ; mapped                 ; 026B          # 5.0  LATIN CAPITAL LETTER L WITH MIDDLE TILDE\r
++2C63          ; mapped                 ; 1D7D          # 5.0  LATIN CAPITAL LETTER P WITH STROKE\r
++2C64          ; mapped                 ; 027D          # 5.0  LATIN CAPITAL LETTER R WITH TAIL\r
++2C65..2C66    ; valid                                  # 5.0  LATIN SMALL LETTER A WITH STROKE..LATIN SMALL LETTER T WITH DIAGONAL STROKE\r
++2C67          ; mapped                 ; 2C68          # 5.0  LATIN CAPITAL LETTER H WITH DESCENDER\r
++2C68          ; valid                                  # 5.0  LATIN SMALL LETTER H WITH DESCENDER\r
++2C69          ; mapped                 ; 2C6A          # 5.0  LATIN CAPITAL LETTER K WITH DESCENDER\r
++2C6A          ; valid                                  # 5.0  LATIN SMALL LETTER K WITH DESCENDER\r
++2C6B          ; mapped                 ; 2C6C          # 5.0  LATIN CAPITAL LETTER Z WITH DESCENDER\r
++2C6C          ; valid                                  # 5.0  LATIN SMALL LETTER Z WITH DESCENDER\r
++2C6D          ; mapped                 ; 0251          # 5.1  LATIN CAPITAL LETTER ALPHA\r
++2C6E          ; mapped                 ; 0271          # 5.1  LATIN CAPITAL LETTER M WITH HOOK\r
++2C6F          ; mapped                 ; 0250          # 5.1  LATIN CAPITAL LETTER TURNED A\r
++2C70          ; mapped                 ; 0252          # 5.2  LATIN CAPITAL LETTER TURNED ALPHA\r
++2C71          ; valid                                  # 5.1  LATIN SMALL LETTER V WITH RIGHT HOOK\r
++2C72          ; mapped                 ; 2C73          # 5.1  LATIN CAPITAL LETTER W WITH HOOK\r
++2C73          ; valid                                  # 5.1  LATIN SMALL LETTER W WITH HOOK\r
++2C74          ; valid                                  # 5.0  LATIN SMALL LETTER V WITH CURL\r
++2C75          ; mapped                 ; 2C76          # 5.0  LATIN CAPITAL LETTER HALF H\r
++2C76..2C77    ; valid                                  # 5.0  LATIN SMALL LETTER HALF H..LATIN SMALL LETTER TAILLESS PHI\r
++2C78..2C7B    ; valid                                  # 5.1  LATIN SMALL LETTER E WITH NOTCH..LATIN LETTER SMALL CAPITAL TURNED E\r
++2C7C          ; mapped                 ; 006A          # 5.1  LATIN SUBSCRIPT SMALL LETTER J\r
++2C7D          ; mapped                 ; 0076          # 5.1  MODIFIER LETTER CAPITAL V\r
++2C7E          ; mapped                 ; 023F          # 5.2  LATIN CAPITAL LETTER S WITH SWASH TAIL\r
++2C7F          ; mapped                 ; 0240          # 5.2  LATIN CAPITAL LETTER Z WITH SWASH TAIL\r
++2C80          ; mapped                 ; 2C81          # 4.1  COPTIC CAPITAL LETTER ALFA\r
++2C81          ; valid                                  # 4.1  COPTIC SMALL LETTER ALFA\r
++2C82          ; mapped                 ; 2C83          # 4.1  COPTIC CAPITAL LETTER VIDA\r
++2C83          ; valid                                  # 4.1  COPTIC SMALL LETTER VIDA\r
++2C84          ; mapped                 ; 2C85          # 4.1  COPTIC CAPITAL LETTER GAMMA\r
++2C85          ; valid                                  # 4.1  COPTIC SMALL LETTER GAMMA\r
++2C86          ; mapped                 ; 2C87          # 4.1  COPTIC CAPITAL LETTER DALDA\r
++2C87          ; valid                                  # 4.1  COPTIC SMALL LETTER DALDA\r
++2C88          ; mapped                 ; 2C89          # 4.1  COPTIC CAPITAL LETTER EIE\r
++2C89          ; valid                                  # 4.1  COPTIC SMALL LETTER EIE\r
++2C8A          ; mapped                 ; 2C8B          # 4.1  COPTIC CAPITAL LETTER SOU\r
++2C8B          ; valid                                  # 4.1  COPTIC SMALL LETTER SOU\r
++2C8C          ; mapped                 ; 2C8D          # 4.1  COPTIC CAPITAL LETTER ZATA\r
++2C8D          ; valid                                  # 4.1  COPTIC SMALL LETTER ZATA\r
++2C8E          ; mapped                 ; 2C8F          # 4.1  COPTIC CAPITAL LETTER HATE\r
++2C8F          ; valid                                  # 4.1  COPTIC SMALL LETTER HATE\r
++2C90          ; mapped                 ; 2C91          # 4.1  COPTIC CAPITAL LETTER THETHE\r
++2C91          ; valid                                  # 4.1  COPTIC SMALL LETTER THETHE\r
++2C92          ; mapped                 ; 2C93          # 4.1  COPTIC CAPITAL LETTER IAUDA\r
++2C93          ; valid                                  # 4.1  COPTIC SMALL LETTER IAUDA\r
++2C94          ; mapped                 ; 2C95          # 4.1  COPTIC CAPITAL LETTER KAPA\r
++2C95          ; valid                                  # 4.1  COPTIC SMALL LETTER KAPA\r
++2C96          ; mapped                 ; 2C97          # 4.1  COPTIC CAPITAL LETTER LAULA\r
++2C97          ; valid                                  # 4.1  COPTIC SMALL LETTER LAULA\r
++2C98          ; mapped                 ; 2C99          # 4.1  COPTIC CAPITAL LETTER MI\r
++2C99          ; valid                                  # 4.1  COPTIC SMALL LETTER MI\r
++2C9A          ; mapped                 ; 2C9B          # 4.1  COPTIC CAPITAL LETTER NI\r
++2C9B          ; valid                                  # 4.1  COPTIC SMALL LETTER NI\r
++2C9C          ; mapped                 ; 2C9D          # 4.1  COPTIC CAPITAL LETTER KSI\r
++2C9D          ; valid                                  # 4.1  COPTIC SMALL LETTER KSI\r
++2C9E          ; mapped                 ; 2C9F          # 4.1  COPTIC CAPITAL LETTER O\r
++2C9F          ; valid                                  # 4.1  COPTIC SMALL LETTER O\r
++2CA0          ; mapped                 ; 2CA1          # 4.1  COPTIC CAPITAL LETTER PI\r
++2CA1          ; valid                                  # 4.1  COPTIC SMALL LETTER PI\r
++2CA2          ; mapped                 ; 2CA3          # 4.1  COPTIC CAPITAL LETTER RO\r
++2CA3          ; valid                                  # 4.1  COPTIC SMALL LETTER RO\r
++2CA4          ; mapped                 ; 2CA5          # 4.1  COPTIC CAPITAL LETTER SIMA\r
++2CA5          ; valid                                  # 4.1  COPTIC SMALL LETTER SIMA\r
++2CA6          ; mapped                 ; 2CA7          # 4.1  COPTIC CAPITAL LETTER TAU\r
++2CA7          ; valid                                  # 4.1  COPTIC SMALL LETTER TAU\r
++2CA8          ; mapped                 ; 2CA9          # 4.1  COPTIC CAPITAL LETTER UA\r
++2CA9          ; valid                                  # 4.1  COPTIC SMALL LETTER UA\r
++2CAA          ; mapped                 ; 2CAB          # 4.1  COPTIC CAPITAL LETTER FI\r
++2CAB          ; valid                                  # 4.1  COPTIC SMALL LETTER FI\r
++2CAC          ; mapped                 ; 2CAD          # 4.1  COPTIC CAPITAL LETTER KHI\r
++2CAD          ; valid                                  # 4.1  COPTIC SMALL LETTER KHI\r
++2CAE          ; mapped                 ; 2CAF          # 4.1  COPTIC CAPITAL LETTER PSI\r
++2CAF          ; valid                                  # 4.1  COPTIC SMALL LETTER PSI\r
++2CB0          ; mapped                 ; 2CB1          # 4.1  COPTIC CAPITAL LETTER OOU\r
++2CB1          ; valid                                  # 4.1  COPTIC SMALL LETTER OOU\r
++2CB2          ; mapped                 ; 2CB3          # 4.1  COPTIC CAPITAL LETTER DIALECT-P ALEF\r
++2CB3          ; valid                                  # 4.1  COPTIC SMALL LETTER DIALECT-P ALEF\r
++2CB4          ; mapped                 ; 2CB5          # 4.1  COPTIC CAPITAL LETTER OLD COPTIC AIN\r
++2CB5          ; valid                                  # 4.1  COPTIC SMALL LETTER OLD COPTIC AIN\r
++2CB6          ; mapped                 ; 2CB7          # 4.1  COPTIC CAPITAL LETTER CRYPTOGRAMMIC EIE\r
++2CB7          ; valid                                  # 4.1  COPTIC SMALL LETTER CRYPTOGRAMMIC EIE\r
++2CB8          ; mapped                 ; 2CB9          # 4.1  COPTIC CAPITAL LETTER DIALECT-P KAPA\r
++2CB9          ; valid                                  # 4.1  COPTIC SMALL LETTER DIALECT-P KAPA\r
++2CBA          ; mapped                 ; 2CBB          # 4.1  COPTIC CAPITAL LETTER DIALECT-P NI\r
++2CBB          ; valid                                  # 4.1  COPTIC SMALL LETTER DIALECT-P NI\r
++2CBC          ; mapped                 ; 2CBD          # 4.1  COPTIC CAPITAL LETTER CRYPTOGRAMMIC NI\r
++2CBD          ; valid                                  # 4.1  COPTIC SMALL LETTER CRYPTOGRAMMIC NI\r
++2CBE          ; mapped                 ; 2CBF          # 4.1  COPTIC CAPITAL LETTER OLD COPTIC OOU\r
++2CBF          ; valid                                  # 4.1  COPTIC SMALL LETTER OLD COPTIC OOU\r
++2CC0          ; mapped                 ; 2CC1          # 4.1  COPTIC CAPITAL LETTER SAMPI\r
++2CC1          ; valid                                  # 4.1  COPTIC SMALL LETTER SAMPI\r
++2CC2          ; mapped                 ; 2CC3          # 4.1  COPTIC CAPITAL LETTER CROSSED SHEI\r
++2CC3          ; valid                                  # 4.1  COPTIC SMALL LETTER CROSSED SHEI\r
++2CC4          ; mapped                 ; 2CC5          # 4.1  COPTIC CAPITAL LETTER OLD COPTIC SHEI\r
++2CC5          ; valid                                  # 4.1  COPTIC SMALL LETTER OLD COPTIC SHEI\r
++2CC6          ; mapped                 ; 2CC7          # 4.1  COPTIC CAPITAL LETTER OLD COPTIC ESH\r
++2CC7          ; valid                                  # 4.1  COPTIC SMALL LETTER OLD COPTIC ESH\r
++2CC8          ; mapped                 ; 2CC9          # 4.1  COPTIC CAPITAL LETTER AKHMIMIC KHEI\r
++2CC9          ; valid                                  # 4.1  COPTIC SMALL LETTER AKHMIMIC KHEI\r
++2CCA          ; mapped                 ; 2CCB          # 4.1  COPTIC CAPITAL LETTER DIALECT-P HORI\r
++2CCB          ; valid                                  # 4.1  COPTIC SMALL LETTER DIALECT-P HORI\r
++2CCC          ; mapped                 ; 2CCD          # 4.1  COPTIC CAPITAL LETTER OLD COPTIC HORI\r
++2CCD          ; valid                                  # 4.1  COPTIC SMALL LETTER OLD COPTIC HORI\r
++2CCE          ; mapped                 ; 2CCF          # 4.1  COPTIC CAPITAL LETTER OLD COPTIC HA\r
++2CCF          ; valid                                  # 4.1  COPTIC SMALL LETTER OLD COPTIC HA\r
++2CD0          ; mapped                 ; 2CD1          # 4.1  COPTIC CAPITAL LETTER L-SHAPED HA\r
++2CD1          ; valid                                  # 4.1  COPTIC SMALL LETTER L-SHAPED HA\r
++2CD2          ; mapped                 ; 2CD3          # 4.1  COPTIC CAPITAL LETTER OLD COPTIC HEI\r
++2CD3          ; valid                                  # 4.1  COPTIC SMALL LETTER OLD COPTIC HEI\r
++2CD4          ; mapped                 ; 2CD5          # 4.1  COPTIC CAPITAL LETTER OLD COPTIC HAT\r
++2CD5          ; valid                                  # 4.1  COPTIC SMALL LETTER OLD COPTIC HAT\r
++2CD6          ; mapped                 ; 2CD7          # 4.1  COPTIC CAPITAL LETTER OLD COPTIC GANGIA\r
++2CD7          ; valid                                  # 4.1  COPTIC SMALL LETTER OLD COPTIC GANGIA\r
++2CD8          ; mapped                 ; 2CD9          # 4.1  COPTIC CAPITAL LETTER OLD COPTIC DJA\r
++2CD9          ; valid                                  # 4.1  COPTIC SMALL LETTER OLD COPTIC DJA\r
++2CDA          ; mapped                 ; 2CDB          # 4.1  COPTIC CAPITAL LETTER OLD COPTIC SHIMA\r
++2CDB          ; valid                                  # 4.1  COPTIC SMALL LETTER OLD COPTIC SHIMA\r
++2CDC          ; mapped                 ; 2CDD          # 4.1  COPTIC CAPITAL LETTER OLD NUBIAN SHIMA\r
++2CDD          ; valid                                  # 4.1  COPTIC SMALL LETTER OLD NUBIAN SHIMA\r
++2CDE          ; mapped                 ; 2CDF          # 4.1  COPTIC CAPITAL LETTER OLD NUBIAN NGI\r
++2CDF          ; valid                                  # 4.1  COPTIC SMALL LETTER OLD NUBIAN NGI\r
++2CE0          ; mapped                 ; 2CE1          # 4.1  COPTIC CAPITAL LETTER OLD NUBIAN NYI\r
++2CE1          ; valid                                  # 4.1  COPTIC SMALL LETTER OLD NUBIAN NYI\r
++2CE2          ; mapped                 ; 2CE3          # 4.1  COPTIC CAPITAL LETTER OLD NUBIAN WAU\r
++2CE3..2CE4    ; valid                                  # 4.1  COPTIC SMALL LETTER OLD NUBIAN WAU..COPTIC SYMBOL KAI\r
++2CE5..2CEA    ; valid                  ;      ; NV8    # 4.1  COPTIC SYMBOL MI RO..COPTIC SYMBOL SHIMA SIMA\r
++2CEB          ; mapped                 ; 2CEC          # 5.2  COPTIC CAPITAL LETTER CRYPTOGRAMMIC SHEI\r
++2CEC          ; valid                                  # 5.2  COPTIC SMALL LETTER CRYPTOGRAMMIC SHEI\r
++2CED          ; mapped                 ; 2CEE          # 5.2  COPTIC CAPITAL LETTER CRYPTOGRAMMIC GANGIA\r
++2CEE..2CF1    ; valid                                  # 5.2  COPTIC SMALL LETTER CRYPTOGRAMMIC GANGIA..COPTIC COMBINING SPIRITUS LENIS\r
++2CF2          ; mapped                 ; 2CF3          # 6.1  COPTIC CAPITAL LETTER BOHAIRIC KHEI\r
++2CF3          ; valid                                  # 6.1  COPTIC SMALL LETTER BOHAIRIC KHEI\r
++2CF4..2CF8    ; disallowed                             # NA   <reserved-2CF4>..<reserved-2CF8>\r
++2CF9..2CFF    ; valid                  ;      ; NV8    # 4.1  COPTIC OLD NUBIAN FULL STOP..COPTIC MORPHOLOGICAL DIVIDER\r
++2D00..2D25    ; valid                                  # 4.1  GEORGIAN SMALL LETTER AN..GEORGIAN SMALL LETTER HOE\r
++2D26          ; disallowed                             # NA   <reserved-2D26>\r
++2D27          ; valid                                  # 6.1  GEORGIAN SMALL LETTER YN\r
++2D28..2D2C    ; disallowed                             # NA   <reserved-2D28>..<reserved-2D2C>\r
++2D2D          ; valid                                  # 6.1  GEORGIAN SMALL LETTER AEN\r
++2D2E..2D2F    ; disallowed                             # NA   <reserved-2D2E>..<reserved-2D2F>\r
++2D30..2D65    ; valid                                  # 4.1  TIFINAGH LETTER YA..TIFINAGH LETTER YAZZ\r
++2D66..2D67    ; valid                                  # 6.1  TIFINAGH LETTER YE..TIFINAGH LETTER YO\r
++2D68..2D6E    ; disallowed                             # NA   <reserved-2D68>..<reserved-2D6E>\r
++2D6F          ; mapped                 ; 2D61          # 4.1  TIFINAGH MODIFIER LETTER LABIALIZATION MARK\r
++2D70          ; valid                  ;      ; NV8    # 6.0  TIFINAGH SEPARATOR MARK\r
++2D71..2D7E    ; disallowed                             # NA   <reserved-2D71>..<reserved-2D7E>\r
++2D7F          ; valid                                  # 6.0  TIFINAGH CONSONANT JOINER\r
++2D80..2D96    ; valid                                  # 4.1  ETHIOPIC SYLLABLE LOA..ETHIOPIC SYLLABLE GGWE\r
++2D97..2D9F    ; disallowed                             # NA   <reserved-2D97>..<reserved-2D9F>\r
++2DA0..2DA6    ; valid                                  # 4.1  ETHIOPIC SYLLABLE SSA..ETHIOPIC SYLLABLE SSO\r
++2DA7          ; disallowed                             # NA   <reserved-2DA7>\r
++2DA8..2DAE    ; valid                                  # 4.1  ETHIOPIC SYLLABLE CCA..ETHIOPIC SYLLABLE CCO\r
++2DAF          ; disallowed                             # NA   <reserved-2DAF>\r
++2DB0..2DB6    ; valid                                  # 4.1  ETHIOPIC SYLLABLE ZZA..ETHIOPIC SYLLABLE ZZO\r
++2DB7          ; disallowed                             # NA   <reserved-2DB7>\r
++2DB8..2DBE    ; valid                                  # 4.1  ETHIOPIC SYLLABLE CCHA..ETHIOPIC SYLLABLE CCHO\r
++2DBF          ; disallowed                             # NA   <reserved-2DBF>\r
++2DC0..2DC6    ; valid                                  # 4.1  ETHIOPIC SYLLABLE QYA..ETHIOPIC SYLLABLE QYO\r
++2DC7          ; disallowed                             # NA   <reserved-2DC7>\r
++2DC8..2DCE    ; valid                                  # 4.1  ETHIOPIC SYLLABLE KYA..ETHIOPIC SYLLABLE KYO\r
++2DCF          ; disallowed                             # NA   <reserved-2DCF>\r
++2DD0..2DD6    ; valid                                  # 4.1  ETHIOPIC SYLLABLE XYA..ETHIOPIC SYLLABLE XYO\r
++2DD7          ; disallowed                             # NA   <reserved-2DD7>\r
++2DD8..2DDE    ; valid                                  # 4.1  ETHIOPIC SYLLABLE GYA..ETHIOPIC SYLLABLE GYO\r
++2DDF          ; disallowed                             # NA   <reserved-2DDF>\r
++2DE0..2DFF    ; valid                                  # 5.1  COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS\r
++2E00..2E17    ; valid                  ;      ; NV8    # 4.1  RIGHT ANGLE SUBSTITUTION MARKER..DOUBLE OBLIQUE HYPHEN\r
++2E18..2E1B    ; valid                  ;      ; NV8    # 5.1  INVERTED INTERROBANG..TILDE WITH RING ABOVE\r
++2E1C..2E1D    ; valid                  ;      ; NV8    # 4.1  LEFT LOW PARAPHRASE BRACKET..RIGHT LOW PARAPHRASE BRACKET\r
++2E1E..2E2E    ; valid                  ;      ; NV8    # 5.1  TILDE WITH DOT ABOVE..REVERSED QUESTION MARK\r
++2E2F          ; valid                                  # 5.1  VERTICAL TILDE\r
++2E30          ; valid                  ;      ; NV8    # 5.1  RING POINT\r
++2E31          ; valid                  ;      ; NV8    # 5.2  WORD SEPARATOR MIDDLE DOT\r
++2E32..2E3B    ; valid                  ;      ; NV8    # 6.1  TURNED COMMA..THREE-EM DASH\r
++2E3C..2E42    ; valid                  ;      ; NV8    # 7.0  STENOGRAPHIC FULL STOP..DOUBLE LOW-REVERSED-9 QUOTATION MARK\r
++2E43..2E44    ; valid                  ;      ; NV8    # 9.0  DASH WITH LEFT UPTURN..DOUBLE SUSPENSION MARK\r
++2E45..2E49    ; valid                  ;      ; NV8    # 10.0 INVERTED LOW KAVYKA..DOUBLE STACKED COMMA\r
++2E4A..2E7F    ; disallowed                             # NA   <reserved-2E4A>..<reserved-2E7F>\r
++2E80..2E99    ; valid                  ;      ; NV8    # 3.0  CJK RADICAL REPEAT..CJK RADICAL RAP\r
++2E9A          ; disallowed                             # NA   <reserved-2E9A>\r
++2E9B..2E9E    ; valid                  ;      ; NV8    # 3.0  CJK RADICAL CHOKE..CJK RADICAL DEATH\r
++2E9F          ; mapped                 ; 6BCD          # 3.0  CJK RADICAL MOTHER\r
++2EA0..2EF2    ; valid                  ;      ; NV8    # 3.0  CJK RADICAL CIVILIAN..CJK RADICAL J-SIMPLIFIED TURTLE\r
++2EF3          ; mapped                 ; 9F9F          # 3.0  CJK RADICAL C-SIMPLIFIED TURTLE\r
++2EF4..2EFF    ; disallowed                             # NA   <reserved-2EF4>..<reserved-2EFF>\r
++2F00          ; mapped                 ; 4E00          # 3.0  KANGXI RADICAL ONE\r
++2F01          ; mapped                 ; 4E28          # 3.0  KANGXI RADICAL LINE\r
++2F02          ; mapped                 ; 4E36          # 3.0  KANGXI RADICAL DOT\r
++2F03          ; mapped                 ; 4E3F          # 3.0  KANGXI RADICAL SLASH\r
++2F04          ; mapped                 ; 4E59          # 3.0  KANGXI RADICAL SECOND\r
++2F05          ; mapped                 ; 4E85          # 3.0  KANGXI RADICAL HOOK\r
++2F06          ; mapped                 ; 4E8C          # 3.0  KANGXI RADICAL TWO\r
++2F07          ; mapped                 ; 4EA0          # 3.0  KANGXI RADICAL LID\r
++2F08          ; mapped                 ; 4EBA          # 3.0  KANGXI RADICAL MAN\r
++2F09          ; mapped                 ; 513F          # 3.0  KANGXI RADICAL LEGS\r
++2F0A          ; mapped                 ; 5165          # 3.0  KANGXI RADICAL ENTER\r
++2F0B          ; mapped                 ; 516B          # 3.0  KANGXI RADICAL EIGHT\r
++2F0C          ; mapped                 ; 5182          # 3.0  KANGXI RADICAL DOWN BOX\r
++2F0D          ; mapped                 ; 5196          # 3.0  KANGXI RADICAL COVER\r
++2F0E          ; mapped                 ; 51AB          # 3.0  KANGXI RADICAL ICE\r
++2F0F          ; mapped                 ; 51E0          # 3.0  KANGXI RADICAL TABLE\r
++2F10          ; mapped                 ; 51F5          # 3.0  KANGXI RADICAL OPEN BOX\r
++2F11          ; mapped                 ; 5200          # 3.0  KANGXI RADICAL KNIFE\r
++2F12          ; mapped                 ; 529B          # 3.0  KANGXI RADICAL POWER\r
++2F13          ; mapped                 ; 52F9          # 3.0  KANGXI RADICAL WRAP\r
++2F14          ; mapped                 ; 5315          # 3.0  KANGXI RADICAL SPOON\r
++2F15          ; mapped                 ; 531A          # 3.0  KANGXI RADICAL RIGHT OPEN BOX\r
++2F16          ; mapped                 ; 5338          # 3.0  KANGXI RADICAL HIDING ENCLOSURE\r
++2F17          ; mapped                 ; 5341          # 3.0  KANGXI RADICAL TEN\r
++2F18          ; mapped                 ; 535C          # 3.0  KANGXI RADICAL DIVINATION\r
++2F19          ; mapped                 ; 5369          # 3.0  KANGXI RADICAL SEAL\r
++2F1A          ; mapped                 ; 5382          # 3.0  KANGXI RADICAL CLIFF\r
++2F1B          ; mapped                 ; 53B6          # 3.0  KANGXI RADICAL PRIVATE\r
++2F1C          ; mapped                 ; 53C8          # 3.0  KANGXI RADICAL AGAIN\r
++2F1D          ; mapped                 ; 53E3          # 3.0  KANGXI RADICAL MOUTH\r
++2F1E          ; mapped                 ; 56D7          # 3.0  KANGXI RADICAL ENCLOSURE\r
++2F1F          ; mapped                 ; 571F          # 3.0  KANGXI RADICAL EARTH\r
++2F20          ; mapped                 ; 58EB          # 3.0  KANGXI RADICAL SCHOLAR\r
++2F21          ; mapped                 ; 5902          # 3.0  KANGXI RADICAL GO\r
++2F22          ; mapped                 ; 590A          # 3.0  KANGXI RADICAL GO SLOWLY\r
++2F23          ; mapped                 ; 5915          # 3.0  KANGXI RADICAL EVENING\r
++2F24          ; mapped                 ; 5927          # 3.0  KANGXI RADICAL BIG\r
++2F25          ; mapped                 ; 5973          # 3.0  KANGXI RADICAL WOMAN\r
++2F26          ; mapped                 ; 5B50          # 3.0  KANGXI RADICAL CHILD\r
++2F27          ; mapped                 ; 5B80          # 3.0  KANGXI RADICAL ROOF\r
++2F28          ; mapped                 ; 5BF8          # 3.0  KANGXI RADICAL INCH\r
++2F29          ; mapped                 ; 5C0F          # 3.0  KANGXI RADICAL SMALL\r
++2F2A          ; mapped                 ; 5C22          # 3.0  KANGXI RADICAL LAME\r
++2F2B          ; mapped                 ; 5C38          # 3.0  KANGXI RADICAL CORPSE\r
++2F2C          ; mapped                 ; 5C6E          # 3.0  KANGXI RADICAL SPROUT\r
++2F2D          ; mapped                 ; 5C71          # 3.0  KANGXI RADICAL MOUNTAIN\r
++2F2E          ; mapped                 ; 5DDB          # 3.0  KANGXI RADICAL RIVER\r
++2F2F          ; mapped                 ; 5DE5          # 3.0  KANGXI RADICAL WORK\r
++2F30          ; mapped                 ; 5DF1          # 3.0  KANGXI RADICAL ONESELF\r
++2F31          ; mapped                 ; 5DFE          # 3.0  KANGXI RADICAL TURBAN\r
++2F32          ; mapped                 ; 5E72          # 3.0  KANGXI RADICAL DRY\r
++2F33          ; mapped                 ; 5E7A          # 3.0  KANGXI RADICAL SHORT THREAD\r
++2F34          ; mapped                 ; 5E7F          # 3.0  KANGXI RADICAL DOTTED CLIFF\r
++2F35          ; mapped                 ; 5EF4          # 3.0  KANGXI RADICAL LONG STRIDE\r
++2F36          ; mapped                 ; 5EFE          # 3.0  KANGXI RADICAL TWO HANDS\r
++2F37          ; mapped                 ; 5F0B          # 3.0  KANGXI RADICAL SHOOT\r
++2F38          ; mapped                 ; 5F13          # 3.0  KANGXI RADICAL BOW\r
++2F39          ; mapped                 ; 5F50          # 3.0  KANGXI RADICAL SNOUT\r
++2F3A          ; mapped                 ; 5F61          # 3.0  KANGXI RADICAL BRISTLE\r
++2F3B          ; mapped                 ; 5F73          # 3.0  KANGXI RADICAL STEP\r
++2F3C          ; mapped                 ; 5FC3          # 3.0  KANGXI RADICAL HEART\r
++2F3D          ; mapped                 ; 6208          # 3.0  KANGXI RADICAL HALBERD\r
++2F3E          ; mapped                 ; 6236          # 3.0  KANGXI RADICAL DOOR\r
++2F3F          ; mapped                 ; 624B          # 3.0  KANGXI RADICAL HAND\r
++2F40          ; mapped                 ; 652F          # 3.0  KANGXI RADICAL BRANCH\r
++2F41          ; mapped                 ; 6534          # 3.0  KANGXI RADICAL RAP\r
++2F42          ; mapped                 ; 6587          # 3.0  KANGXI RADICAL SCRIPT\r
++2F43          ; mapped                 ; 6597          # 3.0  KANGXI RADICAL DIPPER\r
++2F44          ; mapped                 ; 65A4          # 3.0  KANGXI RADICAL AXE\r
++2F45          ; mapped                 ; 65B9          # 3.0  KANGXI RADICAL SQUARE\r
++2F46          ; mapped                 ; 65E0          # 3.0  KANGXI RADICAL NOT\r
++2F47          ; mapped                 ; 65E5          # 3.0  KANGXI RADICAL SUN\r
++2F48          ; mapped                 ; 66F0          # 3.0  KANGXI RADICAL SAY\r
++2F49          ; mapped                 ; 6708          # 3.0  KANGXI RADICAL MOON\r
++2F4A          ; mapped                 ; 6728          # 3.0  KANGXI RADICAL TREE\r
++2F4B          ; mapped                 ; 6B20          # 3.0  KANGXI RADICAL LACK\r
++2F4C          ; mapped                 ; 6B62          # 3.0  KANGXI RADICAL STOP\r
++2F4D          ; mapped                 ; 6B79          # 3.0  KANGXI RADICAL DEATH\r
++2F4E          ; mapped                 ; 6BB3          # 3.0  KANGXI RADICAL WEAPON\r
++2F4F          ; mapped                 ; 6BCB          # 3.0  KANGXI RADICAL DO NOT\r
++2F50          ; mapped                 ; 6BD4          # 3.0  KANGXI RADICAL COMPARE\r
++2F51          ; mapped                 ; 6BDB          # 3.0  KANGXI RADICAL FUR\r
++2F52          ; mapped                 ; 6C0F          # 3.0  KANGXI RADICAL CLAN\r
++2F53          ; mapped                 ; 6C14          # 3.0  KANGXI RADICAL STEAM\r
++2F54          ; mapped                 ; 6C34          # 3.0  KANGXI RADICAL WATER\r
++2F55          ; mapped                 ; 706B          # 3.0  KANGXI RADICAL FIRE\r
++2F56          ; mapped                 ; 722A          # 3.0  KANGXI RADICAL CLAW\r
++2F57          ; mapped                 ; 7236          # 3.0  KANGXI RADICAL FATHER\r
++2F58          ; mapped                 ; 723B          # 3.0  KANGXI RADICAL DOUBLE X\r
++2F59          ; mapped                 ; 723F          # 3.0  KANGXI RADICAL HALF TREE TRUNK\r
++2F5A          ; mapped                 ; 7247          # 3.0  KANGXI RADICAL SLICE\r
++2F5B          ; mapped                 ; 7259          # 3.0  KANGXI RADICAL FANG\r
++2F5C          ; mapped                 ; 725B          # 3.0  KANGXI RADICAL COW\r
++2F5D          ; mapped                 ; 72AC          # 3.0  KANGXI RADICAL DOG\r
++2F5E          ; mapped                 ; 7384          # 3.0  KANGXI RADICAL PROFOUND\r
++2F5F          ; mapped                 ; 7389          # 3.0  KANGXI RADICAL JADE\r
++2F60          ; mapped                 ; 74DC          # 3.0  KANGXI RADICAL MELON\r
++2F61          ; mapped                 ; 74E6          # 3.0  KANGXI RADICAL TILE\r
++2F62          ; mapped                 ; 7518          # 3.0  KANGXI RADICAL SWEET\r
++2F63          ; mapped                 ; 751F          # 3.0  KANGXI RADICAL LIFE\r
++2F64          ; mapped                 ; 7528          # 3.0  KANGXI RADICAL USE\r
++2F65          ; mapped                 ; 7530          # 3.0  KANGXI RADICAL FIELD\r
++2F66          ; mapped                 ; 758B          # 3.0  KANGXI RADICAL BOLT OF CLOTH\r
++2F67          ; mapped                 ; 7592          # 3.0  KANGXI RADICAL SICKNESS\r
++2F68          ; mapped                 ; 7676          # 3.0  KANGXI RADICAL DOTTED TENT\r
++2F69          ; mapped                 ; 767D          # 3.0  KANGXI RADICAL WHITE\r
++2F6A          ; mapped                 ; 76AE          # 3.0  KANGXI RADICAL SKIN\r
++2F6B          ; mapped                 ; 76BF          # 3.0  KANGXI RADICAL DISH\r
++2F6C          ; mapped                 ; 76EE          # 3.0  KANGXI RADICAL EYE\r
++2F6D          ; mapped                 ; 77DB          # 3.0  KANGXI RADICAL SPEAR\r
++2F6E          ; mapped                 ; 77E2          # 3.0  KANGXI RADICAL ARROW\r
++2F6F          ; mapped                 ; 77F3          # 3.0  KANGXI RADICAL STONE\r
++2F70          ; mapped                 ; 793A          # 3.0  KANGXI RADICAL SPIRIT\r
++2F71          ; mapped                 ; 79B8          # 3.0  KANGXI RADICAL TRACK\r
++2F72          ; mapped                 ; 79BE          # 3.0  KANGXI RADICAL GRAIN\r
++2F73          ; mapped                 ; 7A74          # 3.0  KANGXI RADICAL CAVE\r
++2F74          ; mapped                 ; 7ACB          # 3.0  KANGXI RADICAL STAND\r
++2F75          ; mapped                 ; 7AF9          # 3.0  KANGXI RADICAL BAMBOO\r
++2F76          ; mapped                 ; 7C73          # 3.0  KANGXI RADICAL RICE\r
++2F77          ; mapped                 ; 7CF8          # 3.0  KANGXI RADICAL SILK\r
++2F78          ; mapped                 ; 7F36          # 3.0  KANGXI RADICAL JAR\r
++2F79          ; mapped                 ; 7F51          # 3.0  KANGXI RADICAL NET\r
++2F7A          ; mapped                 ; 7F8A          # 3.0  KANGXI RADICAL SHEEP\r
++2F7B          ; mapped                 ; 7FBD          # 3.0  KANGXI RADICAL FEATHER\r
++2F7C          ; mapped                 ; 8001          # 3.0  KANGXI RADICAL OLD\r
++2F7D          ; mapped                 ; 800C          # 3.0  KANGXI RADICAL AND\r
++2F7E          ; mapped                 ; 8012          # 3.0  KANGXI RADICAL PLOW\r
++2F7F          ; mapped                 ; 8033          # 3.0  KANGXI RADICAL EAR\r
++2F80          ; mapped                 ; 807F          # 3.0  KANGXI RADICAL BRUSH\r
++2F81          ; mapped                 ; 8089          # 3.0  KANGXI RADICAL MEAT\r
++2F82          ; mapped                 ; 81E3          # 3.0  KANGXI RADICAL MINISTER\r
++2F83          ; mapped                 ; 81EA          # 3.0  KANGXI RADICAL SELF\r
++2F84          ; mapped                 ; 81F3          # 3.0  KANGXI RADICAL ARRIVE\r
++2F85          ; mapped                 ; 81FC          # 3.0  KANGXI RADICAL MORTAR\r
++2F86          ; mapped                 ; 820C          # 3.0  KANGXI RADICAL TONGUE\r
++2F87          ; mapped                 ; 821B          # 3.0  KANGXI RADICAL OPPOSE\r
++2F88          ; mapped                 ; 821F          # 3.0  KANGXI RADICAL BOAT\r
++2F89          ; mapped                 ; 826E          # 3.0  KANGXI RADICAL STOPPING\r
++2F8A          ; mapped                 ; 8272          # 3.0  KANGXI RADICAL COLOR\r
++2F8B          ; mapped                 ; 8278          # 3.0  KANGXI RADICAL GRASS\r
++2F8C          ; mapped                 ; 864D          # 3.0  KANGXI RADICAL TIGER\r
++2F8D          ; mapped                 ; 866B          # 3.0  KANGXI RADICAL INSECT\r
++2F8E          ; mapped                 ; 8840          # 3.0  KANGXI RADICAL BLOOD\r
++2F8F          ; mapped                 ; 884C          # 3.0  KANGXI RADICAL WALK ENCLOSURE\r
++2F90          ; mapped                 ; 8863          # 3.0  KANGXI RADICAL CLOTHES\r
++2F91          ; mapped                 ; 897E          # 3.0  KANGXI RADICAL WEST\r
++2F92          ; mapped                 ; 898B          # 3.0  KANGXI RADICAL SEE\r
++2F93          ; mapped                 ; 89D2          # 3.0  KANGXI RADICAL HORN\r
++2F94          ; mapped                 ; 8A00          # 3.0  KANGXI RADICAL SPEECH\r
++2F95          ; mapped                 ; 8C37          # 3.0  KANGXI RADICAL VALLEY\r
++2F96          ; mapped                 ; 8C46          # 3.0  KANGXI RADICAL BEAN\r
++2F97          ; mapped                 ; 8C55          # 3.0  KANGXI RADICAL PIG\r
++2F98          ; mapped                 ; 8C78          # 3.0  KANGXI RADICAL BADGER\r
++2F99          ; mapped                 ; 8C9D          # 3.0  KANGXI RADICAL SHELL\r
++2F9A          ; mapped                 ; 8D64          # 3.0  KANGXI RADICAL RED\r
++2F9B          ; mapped                 ; 8D70          # 3.0  KANGXI RADICAL RUN\r
++2F9C          ; mapped                 ; 8DB3          # 3.0  KANGXI RADICAL FOOT\r
++2F9D          ; mapped                 ; 8EAB          # 3.0  KANGXI RADICAL BODY\r
++2F9E          ; mapped                 ; 8ECA          # 3.0  KANGXI RADICAL CART\r
++2F9F          ; mapped                 ; 8F9B          # 3.0  KANGXI RADICAL BITTER\r
++2FA0          ; mapped                 ; 8FB0          # 3.0  KANGXI RADICAL MORNING\r
++2FA1          ; mapped                 ; 8FB5          # 3.0  KANGXI RADICAL WALK\r
++2FA2          ; mapped                 ; 9091          # 3.0  KANGXI RADICAL CITY\r
++2FA3          ; mapped                 ; 9149          # 3.0  KANGXI RADICAL WINE\r
++2FA4          ; mapped                 ; 91C6          # 3.0  KANGXI RADICAL DISTINGUISH\r
++2FA5          ; mapped                 ; 91CC          # 3.0  KANGXI RADICAL VILLAGE\r
++2FA6          ; mapped                 ; 91D1          # 3.0  KANGXI RADICAL GOLD\r
++2FA7          ; mapped                 ; 9577          # 3.0  KANGXI RADICAL LONG\r
++2FA8          ; mapped                 ; 9580          # 3.0  KANGXI RADICAL GATE\r
++2FA9          ; mapped                 ; 961C          # 3.0  KANGXI RADICAL MOUND\r
++2FAA          ; mapped                 ; 96B6          # 3.0  KANGXI RADICAL SLAVE\r
++2FAB          ; mapped                 ; 96B9          # 3.0  KANGXI RADICAL SHORT TAILED BIRD\r
++2FAC          ; mapped                 ; 96E8          # 3.0  KANGXI RADICAL RAIN\r
++2FAD          ; mapped                 ; 9751          # 3.0  KANGXI RADICAL BLUE\r
++2FAE          ; mapped                 ; 975E          # 3.0  KANGXI RADICAL WRONG\r
++2FAF          ; mapped                 ; 9762          # 3.0  KANGXI RADICAL FACE\r
++2FB0          ; mapped                 ; 9769          # 3.0  KANGXI RADICAL LEATHER\r
++2FB1          ; mapped                 ; 97CB          # 3.0  KANGXI RADICAL TANNED LEATHER\r
++2FB2          ; mapped                 ; 97ED          # 3.0  KANGXI RADICAL LEEK\r
++2FB3          ; mapped                 ; 97F3          # 3.0  KANGXI RADICAL SOUND\r
++2FB4          ; mapped                 ; 9801          # 3.0  KANGXI RADICAL LEAF\r
++2FB5          ; mapped                 ; 98A8          # 3.0  KANGXI RADICAL WIND\r
++2FB6          ; mapped                 ; 98DB          # 3.0  KANGXI RADICAL FLY\r
++2FB7          ; mapped                 ; 98DF          # 3.0  KANGXI RADICAL EAT\r
++2FB8          ; mapped                 ; 9996          # 3.0  KANGXI RADICAL HEAD\r
++2FB9          ; mapped                 ; 9999          # 3.0  KANGXI RADICAL FRAGRANT\r
++2FBA          ; mapped                 ; 99AC          # 3.0  KANGXI RADICAL HORSE\r
++2FBB          ; mapped                 ; 9AA8          # 3.0  KANGXI RADICAL BONE\r
++2FBC          ; mapped                 ; 9AD8          # 3.0  KANGXI RADICAL TALL\r
++2FBD          ; mapped                 ; 9ADF          # 3.0  KANGXI RADICAL HAIR\r
++2FBE          ; mapped                 ; 9B25          # 3.0  KANGXI RADICAL FIGHT\r
++2FBF          ; mapped                 ; 9B2F          # 3.0  KANGXI RADICAL SACRIFICIAL WINE\r
++2FC0          ; mapped                 ; 9B32          # 3.0  KANGXI RADICAL CAULDRON\r
++2FC1          ; mapped                 ; 9B3C          # 3.0  KANGXI RADICAL GHOST\r
++2FC2          ; mapped                 ; 9B5A          # 3.0  KANGXI RADICAL FISH\r
++2FC3          ; mapped                 ; 9CE5          # 3.0  KANGXI RADICAL BIRD\r
++2FC4          ; mapped                 ; 9E75          # 3.0  KANGXI RADICAL SALT\r
++2FC5          ; mapped                 ; 9E7F          # 3.0  KANGXI RADICAL DEER\r
++2FC6          ; mapped                 ; 9EA5          # 3.0  KANGXI RADICAL WHEAT\r
++2FC7          ; mapped                 ; 9EBB          # 3.0  KANGXI RADICAL HEMP\r
++2FC8          ; mapped                 ; 9EC3          # 3.0  KANGXI RADICAL YELLOW\r
++2FC9          ; mapped                 ; 9ECD          # 3.0  KANGXI RADICAL MILLET\r
++2FCA          ; mapped                 ; 9ED1          # 3.0  KANGXI RADICAL BLACK\r
++2FCB          ; mapped                 ; 9EF9          # 3.0  KANGXI RADICAL EMBROIDERY\r
++2FCC          ; mapped                 ; 9EFD          # 3.0  KANGXI RADICAL FROG\r
++2FCD          ; mapped                 ; 9F0E          # 3.0  KANGXI RADICAL TRIPOD\r
++2FCE          ; mapped                 ; 9F13          # 3.0  KANGXI RADICAL DRUM\r
++2FCF          ; mapped                 ; 9F20          # 3.0  KANGXI RADICAL RAT\r
++2FD0          ; mapped                 ; 9F3B          # 3.0  KANGXI RADICAL NOSE\r
++2FD1          ; mapped                 ; 9F4A          # 3.0  KANGXI RADICAL EVEN\r
++2FD2          ; mapped                 ; 9F52          # 3.0  KANGXI RADICAL TOOTH\r
++2FD3          ; mapped                 ; 9F8D          # 3.0  KANGXI RADICAL DRAGON\r
++2FD4          ; mapped                 ; 9F9C          # 3.0  KANGXI RADICAL TURTLE\r
++2FD5          ; mapped                 ; 9FA0          # 3.0  KANGXI RADICAL FLUTE\r
++2FD6..2FEF    ; disallowed                             # NA   <reserved-2FD6>..<reserved-2FEF>\r
++2FF0..2FFB    ; disallowed                             # 3.0  IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO RIGHT..IDEOGRAPHIC DESCRIPTION CHARACTER OVERLAID\r
++2FFC..2FFF    ; disallowed                             # NA   <reserved-2FFC>..<reserved-2FFF>\r
++3000          ; disallowed_STD3_mapped ; 0020          # 1.1  IDEOGRAPHIC SPACE\r
++3001          ; valid                  ;      ; NV8    # 1.1  IDEOGRAPHIC COMMA\r
++3002          ; mapped                 ; 002E          # 1.1  IDEOGRAPHIC FULL STOP\r
++3003..3004    ; valid                  ;      ; NV8    # 1.1  DITTO MARK..JAPANESE INDUSTRIAL STANDARD SYMBOL\r
++3005..3007    ; valid                                  # 1.1  IDEOGRAPHIC ITERATION MARK..IDEOGRAPHIC NUMBER ZERO\r
++3008..3029    ; valid                  ;      ; NV8    # 1.1  LEFT ANGLE BRACKET..HANGZHOU NUMERAL NINE\r
++302A..302D    ; valid                                  # 1.1  IDEOGRAPHIC LEVEL TONE MARK..IDEOGRAPHIC ENTERING TONE MARK\r
++302E..3035    ; valid                  ;      ; NV8    # 1.1  HANGUL SINGLE DOT TONE MARK..VERTICAL KANA REPEAT MARK LOWER HALF\r
++3036          ; mapped                 ; 3012          # 1.1  CIRCLED POSTAL MARK\r
++3037          ; valid                  ;      ; NV8    # 1.1  IDEOGRAPHIC TELEGRAPH LINE FEED SEPARATOR SYMBOL\r
++3038          ; mapped                 ; 5341          # 3.0  HANGZHOU NUMERAL TEN\r
++3039          ; mapped                 ; 5344          # 3.0  HANGZHOU NUMERAL TWENTY\r
++303A          ; mapped                 ; 5345          # 3.0  HANGZHOU NUMERAL THIRTY\r
++303B          ; valid                  ;      ; NV8    # 3.2  VERTICAL IDEOGRAPHIC ITERATION MARK\r
++303C          ; valid                                  # 3.2  MASU MARK\r
++303D          ; valid                  ;      ; NV8    # 3.2  PART ALTERNATION MARK\r
++303E          ; valid                  ;      ; NV8    # 3.0  IDEOGRAPHIC VARIATION INDICATOR\r
++303F          ; valid                  ;      ; NV8    # 1.1  IDEOGRAPHIC HALF FILL SPACE\r
++3040          ; disallowed                             # NA   <reserved-3040>\r
++3041..3094    ; valid                                  # 1.1  HIRAGANA LETTER SMALL A..HIRAGANA LETTER VU\r
++3095..3096    ; valid                                  # 3.2  HIRAGANA LETTER SMALL KA..HIRAGANA LETTER SMALL KE\r
++3097..3098    ; disallowed                             # NA   <reserved-3097>..<reserved-3098>\r
++3099..309A    ; valid                                  # 1.1  COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK\r
++309B          ; disallowed_STD3_mapped ; 0020 3099     # 1.1  KATAKANA-HIRAGANA VOICED SOUND MARK\r
++309C          ; disallowed_STD3_mapped ; 0020 309A     # 1.1  KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK\r
++309D..309E    ; valid                                  # 1.1  HIRAGANA ITERATION MARK..HIRAGANA VOICED ITERATION MARK\r
++309F          ; mapped                 ; 3088 308A     # 3.2  HIRAGANA DIGRAPH YORI\r
++30A0          ; valid                  ;      ; NV8    # 3.2  KATAKANA-HIRAGANA DOUBLE HYPHEN\r
++30A1..30FE    ; valid                                  # 1.1  KATAKANA LETTER SMALL A..KATAKANA VOICED ITERATION MARK\r
++30FF          ; mapped                 ; 30B3 30C8     # 3.2  KATAKANA DIGRAPH KOTO\r
++3100..3104    ; disallowed                             # NA   <reserved-3100>..<reserved-3104>\r
++3105..312C    ; valid                                  # 1.1  BOPOMOFO LETTER B..BOPOMOFO LETTER GN\r
++312D          ; valid                                  # 5.1  BOPOMOFO LETTER IH\r
++312E          ; valid                                  # 10.0 BOPOMOFO LETTER O WITH DOT ABOVE\r
++312F..3130    ; disallowed                             # NA   <reserved-312F>..<reserved-3130>\r
++3131          ; mapped                 ; 1100          # 1.1  HANGUL LETTER KIYEOK\r
++3132          ; mapped                 ; 1101          # 1.1  HANGUL LETTER SSANGKIYEOK\r
++3133          ; mapped                 ; 11AA          # 1.1  HANGUL LETTER KIYEOK-SIOS\r
++3134          ; mapped                 ; 1102          # 1.1  HANGUL LETTER NIEUN\r
++3135          ; mapped                 ; 11AC          # 1.1  HANGUL LETTER NIEUN-CIEUC\r
++3136          ; mapped                 ; 11AD          # 1.1  HANGUL LETTER NIEUN-HIEUH\r
++3137          ; mapped                 ; 1103          # 1.1  HANGUL LETTER TIKEUT\r
++3138          ; mapped                 ; 1104          # 1.1  HANGUL LETTER SSANGTIKEUT\r
++3139          ; mapped                 ; 1105          # 1.1  HANGUL LETTER RIEUL\r
++313A          ; mapped                 ; 11B0          # 1.1  HANGUL LETTER RIEUL-KIYEOK\r
++313B          ; mapped                 ; 11B1          # 1.1  HANGUL LETTER RIEUL-MIEUM\r
++313C          ; mapped                 ; 11B2          # 1.1  HANGUL LETTER RIEUL-PIEUP\r
++313D          ; mapped                 ; 11B3          # 1.1  HANGUL LETTER RIEUL-SIOS\r
++313E          ; mapped                 ; 11B4          # 1.1  HANGUL LETTER RIEUL-THIEUTH\r
++313F          ; mapped                 ; 11B5          # 1.1  HANGUL LETTER RIEUL-PHIEUPH\r
++3140          ; mapped                 ; 111A          # 1.1  HANGUL LETTER RIEUL-HIEUH\r
++3141          ; mapped                 ; 1106          # 1.1  HANGUL LETTER MIEUM\r
++3142          ; mapped                 ; 1107          # 1.1  HANGUL LETTER PIEUP\r
++3143          ; mapped                 ; 1108          # 1.1  HANGUL LETTER SSANGPIEUP\r
++3144          ; mapped                 ; 1121          # 1.1  HANGUL LETTER PIEUP-SIOS\r
++3145          ; mapped                 ; 1109          # 1.1  HANGUL LETTER SIOS\r
++3146          ; mapped                 ; 110A          # 1.1  HANGUL LETTER SSANGSIOS\r
++3147          ; mapped                 ; 110B          # 1.1  HANGUL LETTER IEUNG\r
++3148          ; mapped                 ; 110C          # 1.1  HANGUL LETTER CIEUC\r
++3149          ; mapped                 ; 110D          # 1.1  HANGUL LETTER SSANGCIEUC\r
++314A          ; mapped                 ; 110E          # 1.1  HANGUL LETTER CHIEUCH\r
++314B          ; mapped                 ; 110F          # 1.1  HANGUL LETTER KHIEUKH\r
++314C          ; mapped                 ; 1110          # 1.1  HANGUL LETTER THIEUTH\r
++314D          ; mapped                 ; 1111          # 1.1  HANGUL LETTER PHIEUPH\r
++314E          ; mapped                 ; 1112          # 1.1  HANGUL LETTER HIEUH\r
++314F          ; mapped                 ; 1161          # 1.1  HANGUL LETTER A\r
++3150          ; mapped                 ; 1162          # 1.1  HANGUL LETTER AE\r
++3151          ; mapped                 ; 1163          # 1.1  HANGUL LETTER YA\r
++3152          ; mapped                 ; 1164          # 1.1  HANGUL LETTER YAE\r
++3153          ; mapped                 ; 1165          # 1.1  HANGUL LETTER EO\r
++3154          ; mapped                 ; 1166          # 1.1  HANGUL LETTER E\r
++3155          ; mapped                 ; 1167          # 1.1  HANGUL LETTER YEO\r
++3156          ; mapped                 ; 1168          # 1.1  HANGUL LETTER YE\r
++3157          ; mapped                 ; 1169          # 1.1  HANGUL LETTER O\r
++3158          ; mapped                 ; 116A          # 1.1  HANGUL LETTER WA\r
++3159          ; mapped                 ; 116B          # 1.1  HANGUL LETTER WAE\r
++315A          ; mapped                 ; 116C          # 1.1  HANGUL LETTER OE\r
++315B          ; mapped                 ; 116D          # 1.1  HANGUL LETTER YO\r
++315C          ; mapped                 ; 116E          # 1.1  HANGUL LETTER U\r
++315D          ; mapped                 ; 116F          # 1.1  HANGUL LETTER WEO\r
++315E          ; mapped                 ; 1170          # 1.1  HANGUL LETTER WE\r
++315F          ; mapped                 ; 1171          # 1.1  HANGUL LETTER WI\r
++3160          ; mapped                 ; 1172          # 1.1  HANGUL LETTER YU\r
++3161          ; mapped                 ; 1173          # 1.1  HANGUL LETTER EU\r
++3162          ; mapped                 ; 1174          # 1.1  HANGUL LETTER YI\r
++3163          ; mapped                 ; 1175          # 1.1  HANGUL LETTER I\r
++3164          ; disallowed                             # 1.1  HANGUL FILLER\r
++3165          ; mapped                 ; 1114          # 1.1  HANGUL LETTER SSANGNIEUN\r
++3166          ; mapped                 ; 1115          # 1.1  HANGUL LETTER NIEUN-TIKEUT\r
++3167          ; mapped                 ; 11C7          # 1.1  HANGUL LETTER NIEUN-SIOS\r
++3168          ; mapped                 ; 11C8          # 1.1  HANGUL LETTER NIEUN-PANSIOS\r
++3169          ; mapped                 ; 11CC          # 1.1  HANGUL LETTER RIEUL-KIYEOK-SIOS\r
++316A          ; mapped                 ; 11CE          # 1.1  HANGUL LETTER RIEUL-TIKEUT\r
++316B          ; mapped                 ; 11D3          # 1.1  HANGUL LETTER RIEUL-PIEUP-SIOS\r
++316C          ; mapped                 ; 11D7          # 1.1  HANGUL LETTER RIEUL-PANSIOS\r
++316D          ; mapped                 ; 11D9          # 1.1  HANGUL LETTER RIEUL-YEORINHIEUH\r
++316E          ; mapped                 ; 111C          # 1.1  HANGUL LETTER MIEUM-PIEUP\r
++316F          ; mapped                 ; 11DD          # 1.1  HANGUL LETTER MIEUM-SIOS\r
++3170          ; mapped                 ; 11DF          # 1.1  HANGUL LETTER MIEUM-PANSIOS\r
++3171          ; mapped                 ; 111D          # 1.1  HANGUL LETTER KAPYEOUNMIEUM\r
++3172          ; mapped                 ; 111E          # 1.1  HANGUL LETTER PIEUP-KIYEOK\r
++3173          ; mapped                 ; 1120          # 1.1  HANGUL LETTER PIEUP-TIKEUT\r
++3174          ; mapped                 ; 1122          # 1.1  HANGUL LETTER PIEUP-SIOS-KIYEOK\r
++3175          ; mapped                 ; 1123          # 1.1  HANGUL LETTER PIEUP-SIOS-TIKEUT\r
++3176          ; mapped                 ; 1127          # 1.1  HANGUL LETTER PIEUP-CIEUC\r
++3177          ; mapped                 ; 1129          # 1.1  HANGUL LETTER PIEUP-THIEUTH\r
++3178          ; mapped                 ; 112B          # 1.1  HANGUL LETTER KAPYEOUNPIEUP\r
++3179          ; mapped                 ; 112C          # 1.1  HANGUL LETTER KAPYEOUNSSANGPIEUP\r
++317A          ; mapped                 ; 112D          # 1.1  HANGUL LETTER SIOS-KIYEOK\r
++317B          ; mapped                 ; 112E          # 1.1  HANGUL LETTER SIOS-NIEUN\r
++317C          ; mapped                 ; 112F          # 1.1  HANGUL LETTER SIOS-TIKEUT\r
++317D          ; mapped                 ; 1132          # 1.1  HANGUL LETTER SIOS-PIEUP\r
++317E          ; mapped                 ; 1136          # 1.1  HANGUL LETTER SIOS-CIEUC\r
++317F          ; mapped                 ; 1140          # 1.1  HANGUL LETTER PANSIOS\r
++3180          ; mapped                 ; 1147          # 1.1  HANGUL LETTER SSANGIEUNG\r
++3181          ; mapped                 ; 114C          # 1.1  HANGUL LETTER YESIEUNG\r
++3182          ; mapped                 ; 11F1          # 1.1  HANGUL LETTER YESIEUNG-SIOS\r
++3183          ; mapped                 ; 11F2          # 1.1  HANGUL LETTER YESIEUNG-PANSIOS\r
++3184          ; mapped                 ; 1157          # 1.1  HANGUL LETTER KAPYEOUNPHIEUPH\r
++3185          ; mapped                 ; 1158          # 1.1  HANGUL LETTER SSANGHIEUH\r
++3186          ; mapped                 ; 1159          # 1.1  HANGUL LETTER YEORINHIEUH\r
++3187          ; mapped                 ; 1184          # 1.1  HANGUL LETTER YO-YA\r
++3188          ; mapped                 ; 1185          # 1.1  HANGUL LETTER YO-YAE\r
++3189          ; mapped                 ; 1188          # 1.1  HANGUL LETTER YO-I\r
++318A          ; mapped                 ; 1191          # 1.1  HANGUL LETTER YU-YEO\r
++318B          ; mapped                 ; 1192          # 1.1  HANGUL LETTER YU-YE\r
++318C          ; mapped                 ; 1194          # 1.1  HANGUL LETTER YU-I\r
++318D          ; mapped                 ; 119E          # 1.1  HANGUL LETTER ARAEA\r
++318E          ; mapped                 ; 11A1          # 1.1  HANGUL LETTER ARAEAE\r
++318F          ; disallowed                             # NA   <reserved-318F>\r
++3190..3191    ; valid                  ;      ; NV8    # 1.1  IDEOGRAPHIC ANNOTATION LINKING MARK..IDEOGRAPHIC ANNOTATION REVERSE MARK\r
++3192          ; mapped                 ; 4E00          # 1.1  IDEOGRAPHIC ANNOTATION ONE MARK\r
++3193          ; mapped                 ; 4E8C          # 1.1  IDEOGRAPHIC ANNOTATION TWO MARK\r
++3194          ; mapped                 ; 4E09          # 1.1  IDEOGRAPHIC ANNOTATION THREE MARK\r
++3195          ; mapped                 ; 56DB          # 1.1  IDEOGRAPHIC ANNOTATION FOUR MARK\r
++3196          ; mapped                 ; 4E0A          # 1.1  IDEOGRAPHIC ANNOTATION TOP MARK\r
++3197          ; mapped                 ; 4E2D          # 1.1  IDEOGRAPHIC ANNOTATION MIDDLE MARK\r
++3198          ; mapped                 ; 4E0B          # 1.1  IDEOGRAPHIC ANNOTATION BOTTOM MARK\r
++3199          ; mapped                 ; 7532          # 1.1  IDEOGRAPHIC ANNOTATION FIRST MARK\r
++319A          ; mapped                 ; 4E59          # 1.1  IDEOGRAPHIC ANNOTATION SECOND MARK\r
++319B          ; mapped                 ; 4E19          # 1.1  IDEOGRAPHIC ANNOTATION THIRD MARK\r
++319C          ; mapped                 ; 4E01          # 1.1  IDEOGRAPHIC ANNOTATION FOURTH MARK\r
++319D          ; mapped                 ; 5929          # 1.1  IDEOGRAPHIC ANNOTATION HEAVEN MARK\r
++319E          ; mapped                 ; 5730          # 1.1  IDEOGRAPHIC ANNOTATION EARTH MARK\r
++319F          ; mapped                 ; 4EBA          # 1.1  IDEOGRAPHIC ANNOTATION MAN MARK\r
++31A0..31B7    ; valid                                  # 3.0  BOPOMOFO LETTER BU..BOPOMOFO FINAL LETTER H\r
++31B8..31BA    ; valid                                  # 6.0  BOPOMOFO LETTER GH..BOPOMOFO LETTER ZY\r
++31BB..31BF    ; disallowed                             # NA   <reserved-31BB>..<reserved-31BF>\r
++31C0..31CF    ; valid                  ;      ; NV8    # 4.1  CJK STROKE T..CJK STROKE N\r
++31D0..31E3    ; valid                  ;      ; NV8    # 5.1  CJK STROKE H..CJK STROKE Q\r
++31E4..31EF    ; disallowed                             # NA   <reserved-31E4>..<reserved-31EF>\r
++31F0..31FF    ; valid                                  # 3.2  KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO\r
++3200          ; disallowed_STD3_mapped ; 0028 1100 0029 #1.1  PARENTHESIZED HANGUL KIYEOK\r
++3201          ; disallowed_STD3_mapped ; 0028 1102 0029 #1.1  PARENTHESIZED HANGUL NIEUN\r
++3202          ; disallowed_STD3_mapped ; 0028 1103 0029 #1.1  PARENTHESIZED HANGUL TIKEUT\r
++3203          ; disallowed_STD3_mapped ; 0028 1105 0029 #1.1  PARENTHESIZED HANGUL RIEUL\r
++3204          ; disallowed_STD3_mapped ; 0028 1106 0029 #1.1  PARENTHESIZED HANGUL MIEUM\r
++3205          ; disallowed_STD3_mapped ; 0028 1107 0029 #1.1  PARENTHESIZED HANGUL PIEUP\r
++3206          ; disallowed_STD3_mapped ; 0028 1109 0029 #1.1  PARENTHESIZED HANGUL SIOS\r
++3207          ; disallowed_STD3_mapped ; 0028 110B 0029 #1.1  PARENTHESIZED HANGUL IEUNG\r
++3208          ; disallowed_STD3_mapped ; 0028 110C 0029 #1.1  PARENTHESIZED HANGUL CIEUC\r
++3209          ; disallowed_STD3_mapped ; 0028 110E 0029 #1.1  PARENTHESIZED HANGUL CHIEUCH\r
++320A          ; disallowed_STD3_mapped ; 0028 110F 0029 #1.1  PARENTHESIZED HANGUL KHIEUKH\r
++320B          ; disallowed_STD3_mapped ; 0028 1110 0029 #1.1  PARENTHESIZED HANGUL THIEUTH\r
++320C          ; disallowed_STD3_mapped ; 0028 1111 0029 #1.1  PARENTHESIZED HANGUL PHIEUPH\r
++320D          ; disallowed_STD3_mapped ; 0028 1112 0029 #1.1  PARENTHESIZED HANGUL HIEUH\r
++320E          ; disallowed_STD3_mapped ; 0028 AC00 0029 #1.1  PARENTHESIZED HANGUL KIYEOK A\r
++320F          ; disallowed_STD3_mapped ; 0028 B098 0029 #1.1  PARENTHESIZED HANGUL NIEUN A\r
++3210          ; disallowed_STD3_mapped ; 0028 B2E4 0029 #1.1  PARENTHESIZED HANGUL TIKEUT A\r
++3211          ; disallowed_STD3_mapped ; 0028 B77C 0029 #1.1  PARENTHESIZED HANGUL RIEUL A\r
++3212          ; disallowed_STD3_mapped ; 0028 B9C8 0029 #1.1  PARENTHESIZED HANGUL MIEUM A\r
++3213          ; disallowed_STD3_mapped ; 0028 BC14 0029 #1.1  PARENTHESIZED HANGUL PIEUP A\r
++3214          ; disallowed_STD3_mapped ; 0028 C0AC 0029 #1.1  PARENTHESIZED HANGUL SIOS A\r
++3215          ; disallowed_STD3_mapped ; 0028 C544 0029 #1.1  PARENTHESIZED HANGUL IEUNG A\r
++3216          ; disallowed_STD3_mapped ; 0028 C790 0029 #1.1  PARENTHESIZED HANGUL CIEUC A\r
++3217          ; disallowed_STD3_mapped ; 0028 CC28 0029 #1.1  PARENTHESIZED HANGUL CHIEUCH A\r
++3218          ; disallowed_STD3_mapped ; 0028 CE74 0029 #1.1  PARENTHESIZED HANGUL KHIEUKH A\r
++3219          ; disallowed_STD3_mapped ; 0028 D0C0 0029 #1.1  PARENTHESIZED HANGUL THIEUTH A\r
++321A          ; disallowed_STD3_mapped ; 0028 D30C 0029 #1.1  PARENTHESIZED HANGUL PHIEUPH A\r
++321B          ; disallowed_STD3_mapped ; 0028 D558 0029 #1.1  PARENTHESIZED HANGUL HIEUH A\r
++321C          ; disallowed_STD3_mapped ; 0028 C8FC 0029 #1.1  PARENTHESIZED HANGUL CIEUC U\r
++321D          ; disallowed_STD3_mapped ; 0028 C624 C804 0029 #4.0 PARENTHESIZED KOREAN CHARACTER OJEON\r
++321E          ; disallowed_STD3_mapped ; 0028 C624 D6C4 0029 #4.0 PARENTHESIZED KOREAN CHARACTER O HU\r
++321F          ; disallowed                             # NA   <reserved-321F>\r
++3220          ; disallowed_STD3_mapped ; 0028 4E00 0029 #1.1  PARENTHESIZED IDEOGRAPH ONE\r
++3221          ; disallowed_STD3_mapped ; 0028 4E8C 0029 #1.1  PARENTHESIZED IDEOGRAPH TWO\r
++3222          ; disallowed_STD3_mapped ; 0028 4E09 0029 #1.1  PARENTHESIZED IDEOGRAPH THREE\r
++3223          ; disallowed_STD3_mapped ; 0028 56DB 0029 #1.1  PARENTHESIZED IDEOGRAPH FOUR\r
++3224          ; disallowed_STD3_mapped ; 0028 4E94 0029 #1.1  PARENTHESIZED IDEOGRAPH FIVE\r
++3225          ; disallowed_STD3_mapped ; 0028 516D 0029 #1.1  PARENTHESIZED IDEOGRAPH SIX\r
++3226          ; disallowed_STD3_mapped ; 0028 4E03 0029 #1.1  PARENTHESIZED IDEOGRAPH SEVEN\r
++3227          ; disallowed_STD3_mapped ; 0028 516B 0029 #1.1  PARENTHESIZED IDEOGRAPH EIGHT\r
++3228          ; disallowed_STD3_mapped ; 0028 4E5D 0029 #1.1  PARENTHESIZED IDEOGRAPH NINE\r
++3229          ; disallowed_STD3_mapped ; 0028 5341 0029 #1.1  PARENTHESIZED IDEOGRAPH TEN\r
++322A          ; disallowed_STD3_mapped ; 0028 6708 0029 #1.1  PARENTHESIZED IDEOGRAPH MOON\r
++322B          ; disallowed_STD3_mapped ; 0028 706B 0029 #1.1  PARENTHESIZED IDEOGRAPH FIRE\r
++322C          ; disallowed_STD3_mapped ; 0028 6C34 0029 #1.1  PARENTHESIZED IDEOGRAPH WATER\r
++322D          ; disallowed_STD3_mapped ; 0028 6728 0029 #1.1  PARENTHESIZED IDEOGRAPH WOOD\r
++322E          ; disallowed_STD3_mapped ; 0028 91D1 0029 #1.1  PARENTHESIZED IDEOGRAPH METAL\r
++322F          ; disallowed_STD3_mapped ; 0028 571F 0029 #1.1  PARENTHESIZED IDEOGRAPH EARTH\r
++3230          ; disallowed_STD3_mapped ; 0028 65E5 0029 #1.1  PARENTHESIZED IDEOGRAPH SUN\r
++3231          ; disallowed_STD3_mapped ; 0028 682A 0029 #1.1  PARENTHESIZED IDEOGRAPH STOCK\r
++3232          ; disallowed_STD3_mapped ; 0028 6709 0029 #1.1  PARENTHESIZED IDEOGRAPH HAVE\r
++3233          ; disallowed_STD3_mapped ; 0028 793E 0029 #1.1  PARENTHESIZED IDEOGRAPH SOCIETY\r
++3234          ; disallowed_STD3_mapped ; 0028 540D 0029 #1.1  PARENTHESIZED IDEOGRAPH NAME\r
++3235          ; disallowed_STD3_mapped ; 0028 7279 0029 #1.1  PARENTHESIZED IDEOGRAPH SPECIAL\r
++3236          ; disallowed_STD3_mapped ; 0028 8CA1 0029 #1.1  PARENTHESIZED IDEOGRAPH FINANCIAL\r
++3237          ; disallowed_STD3_mapped ; 0028 795D 0029 #1.1  PARENTHESIZED IDEOGRAPH CONGRATULATION\r
++3238          ; disallowed_STD3_mapped ; 0028 52B4 0029 #1.1  PARENTHESIZED IDEOGRAPH LABOR\r
++3239          ; disallowed_STD3_mapped ; 0028 4EE3 0029 #1.1  PARENTHESIZED IDEOGRAPH REPRESENT\r
++323A          ; disallowed_STD3_mapped ; 0028 547C 0029 #1.1  PARENTHESIZED IDEOGRAPH CALL\r
++323B          ; disallowed_STD3_mapped ; 0028 5B66 0029 #1.1  PARENTHESIZED IDEOGRAPH STUDY\r
++323C          ; disallowed_STD3_mapped ; 0028 76E3 0029 #1.1  PARENTHESIZED IDEOGRAPH SUPERVISE\r
++323D          ; disallowed_STD3_mapped ; 0028 4F01 0029 #1.1  PARENTHESIZED IDEOGRAPH ENTERPRISE\r
++323E          ; disallowed_STD3_mapped ; 0028 8CC7 0029 #1.1  PARENTHESIZED IDEOGRAPH RESOURCE\r
++323F          ; disallowed_STD3_mapped ; 0028 5354 0029 #1.1  PARENTHESIZED IDEOGRAPH ALLIANCE\r
++3240          ; disallowed_STD3_mapped ; 0028 796D 0029 #1.1  PARENTHESIZED IDEOGRAPH FESTIVAL\r
++3241          ; disallowed_STD3_mapped ; 0028 4F11 0029 #1.1  PARENTHESIZED IDEOGRAPH REST\r
++3242          ; disallowed_STD3_mapped ; 0028 81EA 0029 #1.1  PARENTHESIZED IDEOGRAPH SELF\r
++3243          ; disallowed_STD3_mapped ; 0028 81F3 0029 #1.1  PARENTHESIZED IDEOGRAPH REACH\r
++3244          ; mapped                 ; 554F          # 5.2  CIRCLED IDEOGRAPH QUESTION\r
++3245          ; mapped                 ; 5E7C          # 5.2  CIRCLED IDEOGRAPH KINDERGARTEN\r
++3246          ; mapped                 ; 6587          # 5.2  CIRCLED IDEOGRAPH SCHOOL\r
++3247          ; mapped                 ; 7B8F          # 5.2  CIRCLED IDEOGRAPH KOTO\r
++3248..324F    ; valid                  ;      ; NV8    # 5.2  CIRCLED NUMBER TEN ON BLACK SQUARE..CIRCLED NUMBER EIGHTY ON BLACK SQUARE\r
++3250          ; mapped                 ; 0070 0074 0065 #4.0  PARTNERSHIP SIGN\r
++3251          ; mapped                 ; 0032 0031     # 3.2  CIRCLED NUMBER TWENTY ONE\r
++3252          ; mapped                 ; 0032 0032     # 3.2  CIRCLED NUMBER TWENTY TWO\r
++3253          ; mapped                 ; 0032 0033     # 3.2  CIRCLED NUMBER TWENTY THREE\r
++3254          ; mapped                 ; 0032 0034     # 3.2  CIRCLED NUMBER TWENTY FOUR\r
++3255          ; mapped                 ; 0032 0035     # 3.2  CIRCLED NUMBER TWENTY FIVE\r
++3256          ; mapped                 ; 0032 0036     # 3.2  CIRCLED NUMBER TWENTY SIX\r
++3257          ; mapped                 ; 0032 0037     # 3.2  CIRCLED NUMBER TWENTY SEVEN\r
++3258          ; mapped                 ; 0032 0038     # 3.2  CIRCLED NUMBER TWENTY EIGHT\r
++3259          ; mapped                 ; 0032 0039     # 3.2  CIRCLED NUMBER TWENTY NINE\r
++325A          ; mapped                 ; 0033 0030     # 3.2  CIRCLED NUMBER THIRTY\r
++325B          ; mapped                 ; 0033 0031     # 3.2  CIRCLED NUMBER THIRTY ONE\r
++325C          ; mapped                 ; 0033 0032     # 3.2  CIRCLED NUMBER THIRTY TWO\r
++325D          ; mapped                 ; 0033 0033     # 3.2  CIRCLED NUMBER THIRTY THREE\r
++325E          ; mapped                 ; 0033 0034     # 3.2  CIRCLED NUMBER THIRTY FOUR\r
++325F          ; mapped                 ; 0033 0035     # 3.2  CIRCLED NUMBER THIRTY FIVE\r
++3260          ; mapped                 ; 1100          # 1.1  CIRCLED HANGUL KIYEOK\r
++3261          ; mapped                 ; 1102          # 1.1  CIRCLED HANGUL NIEUN\r
++3262          ; mapped                 ; 1103          # 1.1  CIRCLED HANGUL TIKEUT\r
++3263          ; mapped                 ; 1105          # 1.1  CIRCLED HANGUL RIEUL\r
++3264          ; mapped                 ; 1106          # 1.1  CIRCLED HANGUL MIEUM\r
++3265          ; mapped                 ; 1107          # 1.1  CIRCLED HANGUL PIEUP\r
++3266          ; mapped                 ; 1109          # 1.1  CIRCLED HANGUL SIOS\r
++3267          ; mapped                 ; 110B          # 1.1  CIRCLED HANGUL IEUNG\r
++3268          ; mapped                 ; 110C          # 1.1  CIRCLED HANGUL CIEUC\r
++3269          ; mapped                 ; 110E          # 1.1  CIRCLED HANGUL CHIEUCH\r
++326A          ; mapped                 ; 110F          # 1.1  CIRCLED HANGUL KHIEUKH\r
++326B          ; mapped                 ; 1110          # 1.1  CIRCLED HANGUL THIEUTH\r
++326C          ; mapped                 ; 1111          # 1.1  CIRCLED HANGUL PHIEUPH\r
++326D          ; mapped                 ; 1112          # 1.1  CIRCLED HANGUL HIEUH\r
++326E          ; mapped                 ; AC00          # 1.1  CIRCLED HANGUL KIYEOK A\r
++326F          ; mapped                 ; B098          # 1.1  CIRCLED HANGUL NIEUN A\r
++3270          ; mapped                 ; B2E4          # 1.1  CIRCLED HANGUL TIKEUT A\r
++3271          ; mapped                 ; B77C          # 1.1  CIRCLED HANGUL RIEUL A\r
++3272          ; mapped                 ; B9C8          # 1.1  CIRCLED HANGUL MIEUM A\r
++3273          ; mapped                 ; BC14          # 1.1  CIRCLED HANGUL PIEUP A\r
++3274          ; mapped                 ; C0AC          # 1.1  CIRCLED HANGUL SIOS A\r
++3275          ; mapped                 ; C544          # 1.1  CIRCLED HANGUL IEUNG A\r
++3276          ; mapped                 ; C790          # 1.1  CIRCLED HANGUL CIEUC A\r
++3277          ; mapped                 ; CC28          # 1.1  CIRCLED HANGUL CHIEUCH A\r
++3278          ; mapped                 ; CE74          # 1.1  CIRCLED HANGUL KHIEUKH A\r
++3279          ; mapped                 ; D0C0          # 1.1  CIRCLED HANGUL THIEUTH A\r
++327A          ; mapped                 ; D30C          # 1.1  CIRCLED HANGUL PHIEUPH A\r
++327B          ; mapped                 ; D558          # 1.1  CIRCLED HANGUL HIEUH A\r
++327C          ; mapped                 ; CC38 ACE0     # 4.0  CIRCLED KOREAN CHARACTER CHAMKO\r
++327D          ; mapped                 ; C8FC C758     # 4.0  CIRCLED KOREAN CHARACTER JUEUI\r
++327E          ; mapped                 ; C6B0          # 4.1  CIRCLED HANGUL IEUNG U\r
++327F          ; valid                  ;      ; NV8    # 1.1  KOREAN STANDARD SYMBOL\r
++3280          ; mapped                 ; 4E00          # 1.1  CIRCLED IDEOGRAPH ONE\r
++3281          ; mapped                 ; 4E8C          # 1.1  CIRCLED IDEOGRAPH TWO\r
++3282          ; mapped                 ; 4E09          # 1.1  CIRCLED IDEOGRAPH THREE\r
++3283          ; mapped                 ; 56DB          # 1.1  CIRCLED IDEOGRAPH FOUR\r
++3284          ; mapped                 ; 4E94          # 1.1  CIRCLED IDEOGRAPH FIVE\r
++3285          ; mapped                 ; 516D          # 1.1  CIRCLED IDEOGRAPH SIX\r
++3286          ; mapped                 ; 4E03          # 1.1  CIRCLED IDEOGRAPH SEVEN\r
++3287          ; mapped                 ; 516B          # 1.1  CIRCLED IDEOGRAPH EIGHT\r
++3288          ; mapped                 ; 4E5D          # 1.1  CIRCLED IDEOGRAPH NINE\r
++3289          ; mapped                 ; 5341          # 1.1  CIRCLED IDEOGRAPH TEN\r
++328A          ; mapped                 ; 6708          # 1.1  CIRCLED IDEOGRAPH MOON\r
++328B          ; mapped                 ; 706B          # 1.1  CIRCLED IDEOGRAPH FIRE\r
++328C          ; mapped                 ; 6C34          # 1.1  CIRCLED IDEOGRAPH WATER\r
++328D          ; mapped                 ; 6728          # 1.1  CIRCLED IDEOGRAPH WOOD\r
++328E          ; mapped                 ; 91D1          # 1.1  CIRCLED IDEOGRAPH METAL\r
++328F          ; mapped                 ; 571F          # 1.1  CIRCLED IDEOGRAPH EARTH\r
++3290          ; mapped                 ; 65E5          # 1.1  CIRCLED IDEOGRAPH SUN\r
++3291          ; mapped                 ; 682A          # 1.1  CIRCLED IDEOGRAPH STOCK\r
++3292          ; mapped                 ; 6709          # 1.1  CIRCLED IDEOGRAPH HAVE\r
++3293          ; mapped                 ; 793E          # 1.1  CIRCLED IDEOGRAPH SOCIETY\r
++3294          ; mapped                 ; 540D          # 1.1  CIRCLED IDEOGRAPH NAME\r
++3295          ; mapped                 ; 7279          # 1.1  CIRCLED IDEOGRAPH SPECIAL\r
++3296          ; mapped                 ; 8CA1          # 1.1  CIRCLED IDEOGRAPH FINANCIAL\r
++3297          ; mapped                 ; 795D          # 1.1  CIRCLED IDEOGRAPH CONGRATULATION\r
++3298          ; mapped                 ; 52B4          # 1.1  CIRCLED IDEOGRAPH LABOR\r
++3299          ; mapped                 ; 79D8          # 1.1  CIRCLED IDEOGRAPH SECRET\r
++329A          ; mapped                 ; 7537          # 1.1  CIRCLED IDEOGRAPH MALE\r
++329B          ; mapped                 ; 5973          # 1.1  CIRCLED IDEOGRAPH FEMALE\r
++329C          ; mapped                 ; 9069          # 1.1  CIRCLED IDEOGRAPH SUITABLE\r
++329D          ; mapped                 ; 512A          # 1.1  CIRCLED IDEOGRAPH EXCELLENT\r
++329E          ; mapped                 ; 5370          # 1.1  CIRCLED IDEOGRAPH PRINT\r
++329F          ; mapped                 ; 6CE8          # 1.1  CIRCLED IDEOGRAPH ATTENTION\r
++32A0          ; mapped                 ; 9805          # 1.1  CIRCLED IDEOGRAPH ITEM\r
++32A1          ; mapped                 ; 4F11          # 1.1  CIRCLED IDEOGRAPH REST\r
++32A2          ; mapped                 ; 5199          # 1.1  CIRCLED IDEOGRAPH COPY\r
++32A3          ; mapped                 ; 6B63          # 1.1  CIRCLED IDEOGRAPH CORRECT\r
++32A4          ; mapped                 ; 4E0A          # 1.1  CIRCLED IDEOGRAPH HIGH\r
++32A5          ; mapped                 ; 4E2D          # 1.1  CIRCLED IDEOGRAPH CENTRE\r
++32A6          ; mapped                 ; 4E0B          # 1.1  CIRCLED IDEOGRAPH LOW\r
++32A7          ; mapped                 ; 5DE6          # 1.1  CIRCLED IDEOGRAPH LEFT\r
++32A8          ; mapped                 ; 53F3          # 1.1  CIRCLED IDEOGRAPH RIGHT\r
++32A9          ; mapped                 ; 533B          # 1.1  CIRCLED IDEOGRAPH MEDICINE\r
++32AA          ; mapped                 ; 5B97          # 1.1  CIRCLED IDEOGRAPH RELIGION\r
++32AB          ; mapped                 ; 5B66          # 1.1  CIRCLED IDEOGRAPH STUDY\r
++32AC          ; mapped                 ; 76E3          # 1.1  CIRCLED IDEOGRAPH SUPERVISE\r
++32AD          ; mapped                 ; 4F01          # 1.1  CIRCLED IDEOGRAPH ENTERPRISE\r
++32AE          ; mapped                 ; 8CC7          # 1.1  CIRCLED IDEOGRAPH RESOURCE\r
++32AF          ; mapped                 ; 5354          # 1.1  CIRCLED IDEOGRAPH ALLIANCE\r
++32B0          ; mapped                 ; 591C          # 1.1  CIRCLED IDEOGRAPH NIGHT\r
++32B1          ; mapped                 ; 0033 0036     # 3.2  CIRCLED NUMBER THIRTY SIX\r
++32B2          ; mapped                 ; 0033 0037     # 3.2  CIRCLED NUMBER THIRTY SEVEN\r
++32B3          ; mapped                 ; 0033 0038     # 3.2  CIRCLED NUMBER THIRTY EIGHT\r
++32B4          ; mapped                 ; 0033 0039     # 3.2  CIRCLED NUMBER THIRTY NINE\r
++32B5          ; mapped                 ; 0034 0030     # 3.2  CIRCLED NUMBER FORTY\r
++32B6          ; mapped                 ; 0034 0031     # 3.2  CIRCLED NUMBER FORTY ONE\r
++32B7          ; mapped                 ; 0034 0032     # 3.2  CIRCLED NUMBER FORTY TWO\r
++32B8          ; mapped                 ; 0034 0033     # 3.2  CIRCLED NUMBER FORTY THREE\r
++32B9          ; mapped                 ; 0034 0034     # 3.2  CIRCLED NUMBER FORTY FOUR\r
++32BA          ; mapped                 ; 0034 0035     # 3.2  CIRCLED NUMBER FORTY FIVE\r
++32BB          ; mapped                 ; 0034 0036     # 3.2  CIRCLED NUMBER FORTY SIX\r
++32BC          ; mapped                 ; 0034 0037     # 3.2  CIRCLED NUMBER FORTY SEVEN\r
++32BD          ; mapped                 ; 0034 0038     # 3.2  CIRCLED NUMBER FORTY EIGHT\r
++32BE          ; mapped                 ; 0034 0039     # 3.2  CIRCLED NUMBER FORTY NINE\r
++32BF          ; mapped                 ; 0035 0030     # 3.2  CIRCLED NUMBER FIFTY\r
++32C0          ; mapped                 ; 0031 6708     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR JANUARY\r
++32C1          ; mapped                 ; 0032 6708     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR FEBRUARY\r
++32C2          ; mapped                 ; 0033 6708     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR MARCH\r
++32C3          ; mapped                 ; 0034 6708     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR APRIL\r
++32C4          ; mapped                 ; 0035 6708     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR MAY\r
++32C5          ; mapped                 ; 0036 6708     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR JUNE\r
++32C6          ; mapped                 ; 0037 6708     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR JULY\r
++32C7          ; mapped                 ; 0038 6708     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR AUGUST\r
++32C8          ; mapped                 ; 0039 6708     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR SEPTEMBER\r
++32C9          ; mapped                 ; 0031 0030 6708 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR OCTOBER\r
++32CA          ; mapped                 ; 0031 0031 6708 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR NOVEMBER\r
++32CB          ; mapped                 ; 0031 0032 6708 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DECEMBER\r
++32CC          ; mapped                 ; 0068 0067     # 4.0  SQUARE HG\r
++32CD          ; mapped                 ; 0065 0072 0067 #4.0  SQUARE ERG\r
++32CE          ; mapped                 ; 0065 0076     # 4.0  SQUARE EV\r
++32CF          ; mapped                 ; 006C 0074 0064 #4.0  LIMITED LIABILITY SIGN\r
++32D0          ; mapped                 ; 30A2          # 1.1  CIRCLED KATAKANA A\r
++32D1          ; mapped                 ; 30A4          # 1.1  CIRCLED KATAKANA I\r
++32D2          ; mapped                 ; 30A6          # 1.1  CIRCLED KATAKANA U\r
++32D3          ; mapped                 ; 30A8          # 1.1  CIRCLED KATAKANA E\r
++32D4          ; mapped                 ; 30AA          # 1.1  CIRCLED KATAKANA O\r
++32D5          ; mapped                 ; 30AB          # 1.1  CIRCLED KATAKANA KA\r
++32D6          ; mapped                 ; 30AD          # 1.1  CIRCLED KATAKANA KI\r
++32D7          ; mapped                 ; 30AF          # 1.1  CIRCLED KATAKANA KU\r
++32D8          ; mapped                 ; 30B1          # 1.1  CIRCLED KATAKANA KE\r
++32D9          ; mapped                 ; 30B3          # 1.1  CIRCLED KATAKANA KO\r
++32DA          ; mapped                 ; 30B5          # 1.1  CIRCLED KATAKANA SA\r
++32DB          ; mapped                 ; 30B7          # 1.1  CIRCLED KATAKANA SI\r
++32DC          ; mapped                 ; 30B9          # 1.1  CIRCLED KATAKANA SU\r
++32DD          ; mapped                 ; 30BB          # 1.1  CIRCLED KATAKANA SE\r
++32DE          ; mapped                 ; 30BD          # 1.1  CIRCLED KATAKANA SO\r
++32DF          ; mapped                 ; 30BF          # 1.1  CIRCLED KATAKANA TA\r
++32E0          ; mapped                 ; 30C1          # 1.1  CIRCLED KATAKANA TI\r
++32E1          ; mapped                 ; 30C4          # 1.1  CIRCLED KATAKANA TU\r
++32E2          ; mapped                 ; 30C6          # 1.1  CIRCLED KATAKANA TE\r
++32E3          ; mapped                 ; 30C8          # 1.1  CIRCLED KATAKANA TO\r
++32E4          ; mapped                 ; 30CA          # 1.1  CIRCLED KATAKANA NA\r
++32E5          ; mapped                 ; 30CB          # 1.1  CIRCLED KATAKANA NI\r
++32E6          ; mapped                 ; 30CC          # 1.1  CIRCLED KATAKANA NU\r
++32E7          ; mapped                 ; 30CD          # 1.1  CIRCLED KATAKANA NE\r
++32E8          ; mapped                 ; 30CE          # 1.1  CIRCLED KATAKANA NO\r
++32E9          ; mapped                 ; 30CF          # 1.1  CIRCLED KATAKANA HA\r
++32EA          ; mapped                 ; 30D2          # 1.1  CIRCLED KATAKANA HI\r
++32EB          ; mapped                 ; 30D5          # 1.1  CIRCLED KATAKANA HU\r
++32EC          ; mapped                 ; 30D8          # 1.1  CIRCLED KATAKANA HE\r
++32ED          ; mapped                 ; 30DB          # 1.1  CIRCLED KATAKANA HO\r
++32EE          ; mapped                 ; 30DE          # 1.1  CIRCLED KATAKANA MA\r
++32EF          ; mapped                 ; 30DF          # 1.1  CIRCLED KATAKANA MI\r
++32F0          ; mapped                 ; 30E0          # 1.1  CIRCLED KATAKANA MU\r
++32F1          ; mapped                 ; 30E1          # 1.1  CIRCLED KATAKANA ME\r
++32F2          ; mapped                 ; 30E2          # 1.1  CIRCLED KATAKANA MO\r
++32F3          ; mapped                 ; 30E4          # 1.1  CIRCLED KATAKANA YA\r
++32F4          ; mapped                 ; 30E6          # 1.1  CIRCLED KATAKANA YU\r
++32F5          ; mapped                 ; 30E8          # 1.1  CIRCLED KATAKANA YO\r
++32F6          ; mapped                 ; 30E9          # 1.1  CIRCLED KATAKANA RA\r
++32F7          ; mapped                 ; 30EA          # 1.1  CIRCLED KATAKANA RI\r
++32F8          ; mapped                 ; 30EB          # 1.1  CIRCLED KATAKANA RU\r
++32F9          ; mapped                 ; 30EC          # 1.1  CIRCLED KATAKANA RE\r
++32FA          ; mapped                 ; 30ED          # 1.1  CIRCLED KATAKANA RO\r
++32FB          ; mapped                 ; 30EF          # 1.1  CIRCLED KATAKANA WA\r
++32FC          ; mapped                 ; 30F0          # 1.1  CIRCLED KATAKANA WI\r
++32FD          ; mapped                 ; 30F1          # 1.1  CIRCLED KATAKANA WE\r
++32FE          ; mapped                 ; 30F2          # 1.1  CIRCLED KATAKANA WO\r
++32FF          ; disallowed                             # NA   <reserved-32FF>\r
++3300          ; mapped                 ; 30A2 30D1 30FC 30C8 #1.1 SQUARE APAATO\r
++3301          ; mapped                 ; 30A2 30EB 30D5 30A1 #1.1 SQUARE ARUHUA\r
++3302          ; mapped                 ; 30A2 30F3 30DA 30A2 #1.1 SQUARE ANPEA\r
++3303          ; mapped                 ; 30A2 30FC 30EB #1.1  SQUARE AARU\r
++3304          ; mapped                 ; 30A4 30CB 30F3 30B0 #1.1 SQUARE ININGU\r
++3305          ; mapped                 ; 30A4 30F3 30C1 #1.1  SQUARE INTI\r
++3306          ; mapped                 ; 30A6 30A9 30F3 #1.1  SQUARE UON\r
++3307          ; mapped                 ; 30A8 30B9 30AF 30FC 30C9 #1.1 SQUARE ESUKUUDO\r
++3308          ; mapped                 ; 30A8 30FC 30AB 30FC #1.1 SQUARE EEKAA\r
++3309          ; mapped                 ; 30AA 30F3 30B9 #1.1  SQUARE ONSU\r
++330A          ; mapped                 ; 30AA 30FC 30E0 #1.1  SQUARE OOMU\r
++330B          ; mapped                 ; 30AB 30A4 30EA #1.1  SQUARE KAIRI\r
++330C          ; mapped                 ; 30AB 30E9 30C3 30C8 #1.1 SQUARE KARATTO\r
++330D          ; mapped                 ; 30AB 30ED 30EA 30FC #1.1 SQUARE KARORII\r
++330E          ; mapped                 ; 30AC 30ED 30F3 #1.1  SQUARE GARON\r
++330F          ; mapped                 ; 30AC 30F3 30DE #1.1  SQUARE GANMA\r
++3310          ; mapped                 ; 30AE 30AC     # 1.1  SQUARE GIGA\r
++3311          ; mapped                 ; 30AE 30CB 30FC #1.1  SQUARE GINII\r
++3312          ; mapped                 ; 30AD 30E5 30EA 30FC #1.1 SQUARE KYURII\r
++3313          ; mapped                 ; 30AE 30EB 30C0 30FC #1.1 SQUARE GIRUDAA\r
++3314          ; mapped                 ; 30AD 30ED     # 1.1  SQUARE KIRO\r
++3315          ; mapped                 ; 30AD 30ED 30B0 30E9 30E0 #1.1 SQUARE KIROGURAMU\r
++3316          ; mapped                 ; 30AD 30ED 30E1 30FC 30C8 30EB #1.1 SQUARE KIROMEETORU\r
++3317          ; mapped                 ; 30AD 30ED 30EF 30C3 30C8 #1.1 SQUARE KIROWATTO\r
++3318          ; mapped                 ; 30B0 30E9 30E0 #1.1  SQUARE GURAMU\r
++3319          ; mapped                 ; 30B0 30E9 30E0 30C8 30F3 #1.1 SQUARE GURAMUTON\r
++331A          ; mapped                 ; 30AF 30EB 30BC 30A4 30ED #1.1 SQUARE KURUZEIRO\r
++331B          ; mapped                 ; 30AF 30ED 30FC 30CD #1.1 SQUARE KUROONE\r
++331C          ; mapped                 ; 30B1 30FC 30B9 #1.1  SQUARE KEESU\r
++331D          ; mapped                 ; 30B3 30EB 30CA #1.1  SQUARE KORUNA\r
++331E          ; mapped                 ; 30B3 30FC 30DD #1.1  SQUARE KOOPO\r
++331F          ; mapped                 ; 30B5 30A4 30AF 30EB #1.1 SQUARE SAIKURU\r
++3320          ; mapped                 ; 30B5 30F3 30C1 30FC 30E0 #1.1 SQUARE SANTIIMU\r
++3321          ; mapped                 ; 30B7 30EA 30F3 30B0 #1.1 SQUARE SIRINGU\r
++3322          ; mapped                 ; 30BB 30F3 30C1 #1.1  SQUARE SENTI\r
++3323          ; mapped                 ; 30BB 30F3 30C8 #1.1  SQUARE SENTO\r
++3324          ; mapped                 ; 30C0 30FC 30B9 #1.1  SQUARE DAASU\r
++3325          ; mapped                 ; 30C7 30B7     # 1.1  SQUARE DESI\r
++3326          ; mapped                 ; 30C9 30EB     # 1.1  SQUARE DORU\r
++3327          ; mapped                 ; 30C8 30F3     # 1.1  SQUARE TON\r
++3328          ; mapped                 ; 30CA 30CE     # 1.1  SQUARE NANO\r
++3329          ; mapped                 ; 30CE 30C3 30C8 #1.1  SQUARE NOTTO\r
++332A          ; mapped                 ; 30CF 30A4 30C4 #1.1  SQUARE HAITU\r
++332B          ; mapped                 ; 30D1 30FC 30BB 30F3 30C8 #1.1 SQUARE PAASENTO\r
++332C          ; mapped                 ; 30D1 30FC 30C4 #1.1  SQUARE PAATU\r
++332D          ; mapped                 ; 30D0 30FC 30EC 30EB #1.1 SQUARE BAARERU\r
++332E          ; mapped                 ; 30D4 30A2 30B9 30C8 30EB #1.1 SQUARE PIASUTORU\r
++332F          ; mapped                 ; 30D4 30AF 30EB #1.1  SQUARE PIKURU\r
++3330          ; mapped                 ; 30D4 30B3     # 1.1  SQUARE PIKO\r
++3331          ; mapped                 ; 30D3 30EB     # 1.1  SQUARE BIRU\r
++3332          ; mapped                 ; 30D5 30A1 30E9 30C3 30C9 #1.1 SQUARE HUARADDO\r
++3333          ; mapped                 ; 30D5 30A3 30FC 30C8 #1.1 SQUARE HUIITO\r
++3334          ; mapped                 ; 30D6 30C3 30B7 30A7 30EB #1.1 SQUARE BUSSYERU\r
++3335          ; mapped                 ; 30D5 30E9 30F3 #1.1  SQUARE HURAN\r
++3336          ; mapped                 ; 30D8 30AF 30BF 30FC 30EB #1.1 SQUARE HEKUTAARU\r
++3337          ; mapped                 ; 30DA 30BD     # 1.1  SQUARE PESO\r
++3338          ; mapped                 ; 30DA 30CB 30D2 #1.1  SQUARE PENIHI\r
++3339          ; mapped                 ; 30D8 30EB 30C4 #1.1  SQUARE HERUTU\r
++333A          ; mapped                 ; 30DA 30F3 30B9 #1.1  SQUARE PENSU\r
++333B          ; mapped                 ; 30DA 30FC 30B8 #1.1  SQUARE PEEZI\r
++333C          ; mapped                 ; 30D9 30FC 30BF #1.1  SQUARE BEETA\r
++333D          ; mapped                 ; 30DD 30A4 30F3 30C8 #1.1 SQUARE POINTO\r
++333E          ; mapped                 ; 30DC 30EB 30C8 #1.1  SQUARE BORUTO\r
++333F          ; mapped                 ; 30DB 30F3     # 1.1  SQUARE HON\r
++3340          ; mapped                 ; 30DD 30F3 30C9 #1.1  SQUARE PONDO\r
++3341          ; mapped                 ; 30DB 30FC 30EB #1.1  SQUARE HOORU\r
++3342          ; mapped                 ; 30DB 30FC 30F3 #1.1  SQUARE HOON\r
++3343          ; mapped                 ; 30DE 30A4 30AF 30ED #1.1 SQUARE MAIKURO\r
++3344          ; mapped                 ; 30DE 30A4 30EB #1.1  SQUARE MAIRU\r
++3345          ; mapped                 ; 30DE 30C3 30CF #1.1  SQUARE MAHHA\r
++3346          ; mapped                 ; 30DE 30EB 30AF #1.1  SQUARE MARUKU\r
++3347          ; mapped                 ; 30DE 30F3 30B7 30E7 30F3 #1.1 SQUARE MANSYON\r
++3348          ; mapped                 ; 30DF 30AF 30ED 30F3 #1.1 SQUARE MIKURON\r
++3349          ; mapped                 ; 30DF 30EA     # 1.1  SQUARE MIRI\r
++334A          ; mapped                 ; 30DF 30EA 30D0 30FC 30EB #1.1 SQUARE MIRIBAARU\r
++334B          ; mapped                 ; 30E1 30AC     # 1.1  SQUARE MEGA\r
++334C          ; mapped                 ; 30E1 30AC 30C8 30F3 #1.1 SQUARE MEGATON\r
++334D          ; mapped                 ; 30E1 30FC 30C8 30EB #1.1 SQUARE MEETORU\r
++334E          ; mapped                 ; 30E4 30FC 30C9 #1.1  SQUARE YAADO\r
++334F          ; mapped                 ; 30E4 30FC 30EB #1.1  SQUARE YAARU\r
++3350          ; mapped                 ; 30E6 30A2 30F3 #1.1  SQUARE YUAN\r
++3351          ; mapped                 ; 30EA 30C3 30C8 30EB #1.1 SQUARE RITTORU\r
++3352          ; mapped                 ; 30EA 30E9     # 1.1  SQUARE RIRA\r
++3353          ; mapped                 ; 30EB 30D4 30FC #1.1  SQUARE RUPII\r
++3354          ; mapped                 ; 30EB 30FC 30D6 30EB #1.1 SQUARE RUUBURU\r
++3355          ; mapped                 ; 30EC 30E0     # 1.1  SQUARE REMU\r
++3356          ; mapped                 ; 30EC 30F3 30C8 30B2 30F3 #1.1 SQUARE RENTOGEN\r
++3357          ; mapped                 ; 30EF 30C3 30C8 #1.1  SQUARE WATTO\r
++3358          ; mapped                 ; 0030 70B9     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR ZERO\r
++3359          ; mapped                 ; 0031 70B9     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR ONE\r
++335A          ; mapped                 ; 0032 70B9     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWO\r
++335B          ; mapped                 ; 0033 70B9     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR THREE\r
++335C          ; mapped                 ; 0034 70B9     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FOUR\r
++335D          ; mapped                 ; 0035 70B9     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FIVE\r
++335E          ; mapped                 ; 0036 70B9     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SIX\r
++335F          ; mapped                 ; 0037 70B9     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SEVEN\r
++3360          ; mapped                 ; 0038 70B9     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR EIGHT\r
++3361          ; mapped                 ; 0039 70B9     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR NINE\r
++3362          ; mapped                 ; 0031 0030 70B9 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TEN\r
++3363          ; mapped                 ; 0031 0031 70B9 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR ELEVEN\r
++3364          ; mapped                 ; 0031 0032 70B9 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWELVE\r
++3365          ; mapped                 ; 0031 0033 70B9 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR THIRTEEN\r
++3366          ; mapped                 ; 0031 0034 70B9 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FOURTEEN\r
++3367          ; mapped                 ; 0031 0035 70B9 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FIFTEEN\r
++3368          ; mapped                 ; 0031 0036 70B9 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SIXTEEN\r
++3369          ; mapped                 ; 0031 0037 70B9 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SEVENTEEN\r
++336A          ; mapped                 ; 0031 0038 70B9 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR EIGHTEEN\r
++336B          ; mapped                 ; 0031 0039 70B9 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR NINETEEN\r
++336C          ; mapped                 ; 0032 0030 70B9 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY\r
++336D          ; mapped                 ; 0032 0031 70B9 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-ONE\r
++336E          ; mapped                 ; 0032 0032 70B9 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-TWO\r
++336F          ; mapped                 ; 0032 0033 70B9 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-THREE\r
++3370          ; mapped                 ; 0032 0034 70B9 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-FOUR\r
++3371          ; mapped                 ; 0068 0070 0061 #1.1  SQUARE HPA\r
++3372          ; mapped                 ; 0064 0061     # 1.1  SQUARE DA\r
++3373          ; mapped                 ; 0061 0075     # 1.1  SQUARE AU\r
++3374          ; mapped                 ; 0062 0061 0072 #1.1  SQUARE BAR\r
++3375          ; mapped                 ; 006F 0076     # 1.1  SQUARE OV\r
++3376          ; mapped                 ; 0070 0063     # 1.1  SQUARE PC\r
++3377          ; mapped                 ; 0064 006D     # 4.0  SQUARE DM\r
++3378          ; mapped                 ; 0064 006D 0032 #4.0  SQUARE DM SQUARED\r
++3379          ; mapped                 ; 0064 006D 0033 #4.0  SQUARE DM CUBED\r
++337A          ; mapped                 ; 0069 0075     # 4.0  SQUARE IU\r
++337B          ; mapped                 ; 5E73 6210     # 1.1  SQUARE ERA NAME HEISEI\r
++337C          ; mapped                 ; 662D 548C     # 1.1  SQUARE ERA NAME SYOUWA\r
++337D          ; mapped                 ; 5927 6B63     # 1.1  SQUARE ERA NAME TAISYOU\r
++337E          ; mapped                 ; 660E 6CBB     # 1.1  SQUARE ERA NAME MEIZI\r
++337F          ; mapped                 ; 682A 5F0F 4F1A 793E #1.1 SQUARE CORPORATION\r
++3380          ; mapped                 ; 0070 0061     # 1.1  SQUARE PA AMPS\r
++3381          ; mapped                 ; 006E 0061     # 1.1  SQUARE NA\r
++3382          ; mapped                 ; 03BC 0061     # 1.1  SQUARE MU A\r
++3383          ; mapped                 ; 006D 0061     # 1.1  SQUARE MA\r
++3384          ; mapped                 ; 006B 0061     # 1.1  SQUARE KA\r
++3385          ; mapped                 ; 006B 0062     # 1.1  SQUARE KB\r
++3386          ; mapped                 ; 006D 0062     # 1.1  SQUARE MB\r
++3387          ; mapped                 ; 0067 0062     # 1.1  SQUARE GB\r
++3388          ; mapped                 ; 0063 0061 006C #1.1  SQUARE CAL\r
++3389          ; mapped                 ; 006B 0063 0061 006C #1.1 SQUARE KCAL\r
++338A          ; mapped                 ; 0070 0066     # 1.1  SQUARE PF\r
++338B          ; mapped                 ; 006E 0066     # 1.1  SQUARE NF\r
++338C          ; mapped                 ; 03BC 0066     # 1.1  SQUARE MU F\r
++338D          ; mapped                 ; 03BC 0067     # 1.1  SQUARE MU G\r
++338E          ; mapped                 ; 006D 0067     # 1.1  SQUARE MG\r
++338F          ; mapped                 ; 006B 0067     # 1.1  SQUARE KG\r
++3390          ; mapped                 ; 0068 007A     # 1.1  SQUARE HZ\r
++3391          ; mapped                 ; 006B 0068 007A #1.1  SQUARE KHZ\r
++3392          ; mapped                 ; 006D 0068 007A #1.1  SQUARE MHZ\r
++3393          ; mapped                 ; 0067 0068 007A #1.1  SQUARE GHZ\r
++3394          ; mapped                 ; 0074 0068 007A #1.1  SQUARE THZ\r
++3395          ; mapped                 ; 03BC 006C     # 1.1  SQUARE MU L\r
++3396          ; mapped                 ; 006D 006C     # 1.1  SQUARE ML\r
++3397          ; mapped                 ; 0064 006C     # 1.1  SQUARE DL\r
++3398          ; mapped                 ; 006B 006C     # 1.1  SQUARE KL\r
++3399          ; mapped                 ; 0066 006D     # 1.1  SQUARE FM\r
++339A          ; mapped                 ; 006E 006D     # 1.1  SQUARE NM\r
++339B          ; mapped                 ; 03BC 006D     # 1.1  SQUARE MU M\r
++339C          ; mapped                 ; 006D 006D     # 1.1  SQUARE MM\r
++339D          ; mapped                 ; 0063 006D     # 1.1  SQUARE CM\r
++339E          ; mapped                 ; 006B 006D     # 1.1  SQUARE KM\r
++339F          ; mapped                 ; 006D 006D 0032 #1.1  SQUARE MM SQUARED\r
++33A0          ; mapped                 ; 0063 006D 0032 #1.1  SQUARE CM SQUARED\r
++33A1          ; mapped                 ; 006D 0032     # 1.1  SQUARE M SQUARED\r
++33A2          ; mapped                 ; 006B 006D 0032 #1.1  SQUARE KM SQUARED\r
++33A3          ; mapped                 ; 006D 006D 0033 #1.1  SQUARE MM CUBED\r
++33A4          ; mapped                 ; 0063 006D 0033 #1.1  SQUARE CM CUBED\r
++33A5          ; mapped                 ; 006D 0033     # 1.1  SQUARE M CUBED\r
++33A6          ; mapped                 ; 006B 006D 0033 #1.1  SQUARE KM CUBED\r
++33A7          ; mapped                 ; 006D 2215 0073 #1.1  SQUARE M OVER S\r
++33A8          ; mapped                 ; 006D 2215 0073 0032 #1.1 SQUARE M OVER S SQUARED\r
++33A9          ; mapped                 ; 0070 0061     # 1.1  SQUARE PA\r
++33AA          ; mapped                 ; 006B 0070 0061 #1.1  SQUARE KPA\r
++33AB          ; mapped                 ; 006D 0070 0061 #1.1  SQUARE MPA\r
++33AC          ; mapped                 ; 0067 0070 0061 #1.1  SQUARE GPA\r
++33AD          ; mapped                 ; 0072 0061 0064 #1.1  SQUARE RAD\r
++33AE          ; mapped                 ; 0072 0061 0064 2215 0073 #1.1 SQUARE RAD OVER S\r
++33AF          ; mapped                 ; 0072 0061 0064 2215 0073 0032 #1.1 SQUARE RAD OVER S SQUARED\r
++33B0          ; mapped                 ; 0070 0073     # 1.1  SQUARE PS\r
++33B1          ; mapped                 ; 006E 0073     # 1.1  SQUARE NS\r
++33B2          ; mapped                 ; 03BC 0073     # 1.1  SQUARE MU S\r
++33B3          ; mapped                 ; 006D 0073     # 1.1  SQUARE MS\r
++33B4          ; mapped                 ; 0070 0076     # 1.1  SQUARE PV\r
++33B5          ; mapped                 ; 006E 0076     # 1.1  SQUARE NV\r
++33B6          ; mapped                 ; 03BC 0076     # 1.1  SQUARE MU V\r
++33B7          ; mapped                 ; 006D 0076     # 1.1  SQUARE MV\r
++33B8          ; mapped                 ; 006B 0076     # 1.1  SQUARE KV\r
++33B9          ; mapped                 ; 006D 0076     # 1.1  SQUARE MV MEGA\r
++33BA          ; mapped                 ; 0070 0077     # 1.1  SQUARE PW\r
++33BB          ; mapped                 ; 006E 0077     # 1.1  SQUARE NW\r
++33BC          ; mapped                 ; 03BC 0077     # 1.1  SQUARE MU W\r
++33BD          ; mapped                 ; 006D 0077     # 1.1  SQUARE MW\r
++33BE          ; mapped                 ; 006B 0077     # 1.1  SQUARE KW\r
++33BF          ; mapped                 ; 006D 0077     # 1.1  SQUARE MW MEGA\r
++33C0          ; mapped                 ; 006B 03C9     # 1.1  SQUARE K OHM\r
++33C1          ; mapped                 ; 006D 03C9     # 1.1  SQUARE M OHM\r
++33C2          ; disallowed                             # 1.1  SQUARE AM\r
++33C3          ; mapped                 ; 0062 0071     # 1.1  SQUARE BQ\r
++33C4          ; mapped                 ; 0063 0063     # 1.1  SQUARE CC\r
++33C5          ; mapped                 ; 0063 0064     # 1.1  SQUARE CD\r
++33C6          ; mapped                 ; 0063 2215 006B 0067 #1.1 SQUARE C OVER KG\r
++33C7          ; disallowed                             # 1.1  SQUARE CO\r
++33C8          ; mapped                 ; 0064 0062     # 1.1  SQUARE DB\r
++33C9          ; mapped                 ; 0067 0079     # 1.1  SQUARE GY\r
++33CA          ; mapped                 ; 0068 0061     # 1.1  SQUARE HA\r
++33CB          ; mapped                 ; 0068 0070     # 1.1  SQUARE HP\r
++33CC          ; mapped                 ; 0069 006E     # 1.1  SQUARE IN\r
++33CD          ; mapped                 ; 006B 006B     # 1.1  SQUARE KK\r
++33CE          ; mapped                 ; 006B 006D     # 1.1  SQUARE KM CAPITAL\r
++33CF          ; mapped                 ; 006B 0074     # 1.1  SQUARE KT\r
++33D0          ; mapped                 ; 006C 006D     # 1.1  SQUARE LM\r
++33D1          ; mapped                 ; 006C 006E     # 1.1  SQUARE LN\r
++33D2          ; mapped                 ; 006C 006F 0067 #1.1  SQUARE LOG\r
++33D3          ; mapped                 ; 006C 0078     # 1.1  SQUARE LX\r
++33D4          ; mapped                 ; 006D 0062     # 1.1  SQUARE MB SMALL\r
++33D5          ; mapped                 ; 006D 0069 006C #1.1  SQUARE MIL\r
++33D6          ; mapped                 ; 006D 006F 006C #1.1  SQUARE MOL\r
++33D7          ; mapped                 ; 0070 0068     # 1.1  SQUARE PH\r
++33D8          ; disallowed                             # 1.1  SQUARE PM\r
++33D9          ; mapped                 ; 0070 0070 006D #1.1  SQUARE PPM\r
++33DA          ; mapped                 ; 0070 0072     # 1.1  SQUARE PR\r
++33DB          ; mapped                 ; 0073 0072     # 1.1  SQUARE SR\r
++33DC          ; mapped                 ; 0073 0076     # 1.1  SQUARE SV\r
++33DD          ; mapped                 ; 0077 0062     # 1.1  SQUARE WB\r
++33DE          ; mapped                 ; 0076 2215 006D #4.0  SQUARE V OVER M\r
++33DF          ; mapped                 ; 0061 2215 006D #4.0  SQUARE A OVER M\r
++33E0          ; mapped                 ; 0031 65E5     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY ONE\r
++33E1          ; mapped                 ; 0032 65E5     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWO\r
++33E2          ; mapped                 ; 0033 65E5     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THREE\r
++33E3          ; mapped                 ; 0034 65E5     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FOUR\r
++33E4          ; mapped                 ; 0035 65E5     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FIVE\r
++33E5          ; mapped                 ; 0036 65E5     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SIX\r
++33E6          ; mapped                 ; 0037 65E5     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SEVEN\r
++33E7          ; mapped                 ; 0038 65E5     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY EIGHT\r
++33E8          ; mapped                 ; 0039 65E5     # 1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY NINE\r
++33E9          ; mapped                 ; 0031 0030 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TEN\r
++33EA          ; mapped                 ; 0031 0031 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY ELEVEN\r
++33EB          ; mapped                 ; 0031 0032 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWELVE\r
++33EC          ; mapped                 ; 0031 0033 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THIRTEEN\r
++33ED          ; mapped                 ; 0031 0034 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FOURTEEN\r
++33EE          ; mapped                 ; 0031 0035 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FIFTEEN\r
++33EF          ; mapped                 ; 0031 0036 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SIXTEEN\r
++33F0          ; mapped                 ; 0031 0037 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SEVENTEEN\r
++33F1          ; mapped                 ; 0031 0038 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY EIGHTEEN\r
++33F2          ; mapped                 ; 0031 0039 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY NINETEEN\r
++33F3          ; mapped                 ; 0032 0030 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY\r
++33F4          ; mapped                 ; 0032 0031 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-ONE\r
++33F5          ; mapped                 ; 0032 0032 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-TWO\r
++33F6          ; mapped                 ; 0032 0033 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-THREE\r
++33F7          ; mapped                 ; 0032 0034 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-FOUR\r
++33F8          ; mapped                 ; 0032 0035 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-FIVE\r
++33F9          ; mapped                 ; 0032 0036 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-SIX\r
++33FA          ; mapped                 ; 0032 0037 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-SEVEN\r
++33FB          ; mapped                 ; 0032 0038 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-EIGHT\r
++33FC          ; mapped                 ; 0032 0039 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-NINE\r
++33FD          ; mapped                 ; 0033 0030 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THIRTY\r
++33FE          ; mapped                 ; 0033 0031 65E5 #1.1  IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THIRTY-ONE\r
++33FF          ; mapped                 ; 0067 0061 006C #4.0  SQUARE GAL\r
++3400..4DB5    ; valid                                  # 3.0  CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5\r
++4DB6..4DBF    ; disallowed                             # NA   <reserved-4DB6>..<reserved-4DBF>\r
++4DC0..4DFF    ; valid                  ;      ; NV8    # 4.0  HEXAGRAM FOR THE CREATIVE HEAVEN..HEXAGRAM FOR BEFORE COMPLETION\r
++4E00..9FA5    ; valid                                  # 1.1  CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FA5\r
++9FA6..9FBB    ; valid                                  # 4.1  CJK UNIFIED IDEOGRAPH-9FA6..CJK UNIFIED IDEOGRAPH-9FBB\r
++9FBC..9FC3    ; valid                                  # 5.1  CJK UNIFIED IDEOGRAPH-9FBC..CJK UNIFIED IDEOGRAPH-9FC3\r
++9FC4..9FCB    ; valid                                  # 5.2  CJK UNIFIED IDEOGRAPH-9FC4..CJK UNIFIED IDEOGRAPH-9FCB\r
++9FCC          ; valid                                  # 6.1  CJK UNIFIED IDEOGRAPH-9FCC\r
++9FCD..9FD5    ; valid                                  # 8.0  CJK UNIFIED IDEOGRAPH-9FCD..CJK UNIFIED IDEOGRAPH-9FD5\r
++9FD6..9FEA    ; valid                                  # 10.0 CJK UNIFIED IDEOGRAPH-9FD6..CJK UNIFIED IDEOGRAPH-9FEA\r
++9FEB..9FFF    ; disallowed                             # NA   <reserved-9FEB>..<reserved-9FFF>\r
++A000..A48C    ; valid                                  # 3.0  YI SYLLABLE IT..YI SYLLABLE YYR\r
++A48D..A48F    ; disallowed                             # NA   <reserved-A48D>..<reserved-A48F>\r
++A490..A4A1    ; valid                  ;      ; NV8    # 3.0  YI RADICAL QOT..YI RADICAL GA\r
++A4A2..A4A3    ; valid                  ;      ; NV8    # 3.2  YI RADICAL ZUP..YI RADICAL CYT\r
++A4A4..A4B3    ; valid                  ;      ; NV8    # 3.0  YI RADICAL DDUR..YI RADICAL JO\r
++A4B4          ; valid                  ;      ; NV8    # 3.2  YI RADICAL NZUP\r
++A4B5..A4C0    ; valid                  ;      ; NV8    # 3.0  YI RADICAL JJY..YI RADICAL SHAT\r
++A4C1          ; valid                  ;      ; NV8    # 3.2  YI RADICAL ZUR\r
++A4C2..A4C4    ; valid                  ;      ; NV8    # 3.0  YI RADICAL SHOP..YI RADICAL ZZIET\r
++A4C5          ; valid                  ;      ; NV8    # 3.2  YI RADICAL NBIE\r
++A4C6          ; valid                  ;      ; NV8    # 3.0  YI RADICAL KE\r
++A4C7..A4CF    ; disallowed                             # NA   <reserved-A4C7>..<reserved-A4CF>\r
++A4D0..A4FD    ; valid                                  # 5.2  LISU LETTER BA..LISU LETTER TONE MYA JEU\r
++A4FE..A4FF    ; valid                  ;      ; NV8    # 5.2  LISU PUNCTUATION COMMA..LISU PUNCTUATION FULL STOP\r
++A500..A60C    ; valid                                  # 5.1  VAI SYLLABLE EE..VAI SYLLABLE LENGTHENER\r
++A60D..A60F    ; valid                  ;      ; NV8    # 5.1  VAI COMMA..VAI QUESTION MARK\r
++A610..A62B    ; valid                                  # 5.1  VAI SYLLABLE NDOLE FA..VAI SYLLABLE NDOLE DO\r
++A62C..A63F    ; disallowed                             # NA   <reserved-A62C>..<reserved-A63F>\r
++A640          ; mapped                 ; A641          # 5.1  CYRILLIC CAPITAL LETTER ZEMLYA\r
++A641          ; valid                                  # 5.1  CYRILLIC SMALL LETTER ZEMLYA\r
++A642          ; mapped                 ; A643          # 5.1  CYRILLIC CAPITAL LETTER DZELO\r
++A643          ; valid                                  # 5.1  CYRILLIC SMALL LETTER DZELO\r
++A644          ; mapped                 ; A645          # 5.1  CYRILLIC CAPITAL LETTER REVERSED DZE\r
++A645          ; valid                                  # 5.1  CYRILLIC SMALL LETTER REVERSED DZE\r
++A646          ; mapped                 ; A647          # 5.1  CYRILLIC CAPITAL LETTER IOTA\r
++A647          ; valid                                  # 5.1  CYRILLIC SMALL LETTER IOTA\r
++A648          ; mapped                 ; A649          # 5.1  CYRILLIC CAPITAL LETTER DJERV\r
++A649          ; valid                                  # 5.1  CYRILLIC SMALL LETTER DJERV\r
++A64A          ; mapped                 ; A64B          # 5.1  CYRILLIC CAPITAL LETTER MONOGRAPH UK\r
++A64B          ; valid                                  # 5.1  CYRILLIC SMALL LETTER MONOGRAPH UK\r
++A64C          ; mapped                 ; A64D          # 5.1  CYRILLIC CAPITAL LETTER BROAD OMEGA\r
++A64D          ; valid                                  # 5.1  CYRILLIC SMALL LETTER BROAD OMEGA\r
++A64E          ; mapped                 ; A64F          # 5.1  CYRILLIC CAPITAL LETTER NEUTRAL YER\r
++A64F          ; valid                                  # 5.1  CYRILLIC SMALL LETTER NEUTRAL YER\r
++A650          ; mapped                 ; A651          # 5.1  CYRILLIC CAPITAL LETTER YERU WITH BACK YER\r
++A651          ; valid                                  # 5.1  CYRILLIC SMALL LETTER YERU WITH BACK YER\r
++A652          ; mapped                 ; A653          # 5.1  CYRILLIC CAPITAL LETTER IOTIFIED YAT\r
++A653          ; valid                                  # 5.1  CYRILLIC SMALL LETTER IOTIFIED YAT\r
++A654          ; mapped                 ; A655          # 5.1  CYRILLIC CAPITAL LETTER REVERSED YU\r
++A655          ; valid                                  # 5.1  CYRILLIC SMALL LETTER REVERSED YU\r
++A656          ; mapped                 ; A657          # 5.1  CYRILLIC CAPITAL LETTER IOTIFIED A\r
++A657          ; valid                                  # 5.1  CYRILLIC SMALL LETTER IOTIFIED A\r
++A658          ; mapped                 ; A659          # 5.1  CYRILLIC CAPITAL LETTER CLOSED LITTLE YUS\r
++A659          ; valid                                  # 5.1  CYRILLIC SMALL LETTER CLOSED LITTLE YUS\r
++A65A          ; mapped                 ; A65B          # 5.1  CYRILLIC CAPITAL LETTER BLENDED YUS\r
++A65B          ; valid                                  # 5.1  CYRILLIC SMALL LETTER BLENDED YUS\r
++A65C          ; mapped                 ; A65D          # 5.1  CYRILLIC CAPITAL LETTER IOTIFIED CLOSED LITTLE YUS\r
++A65D          ; valid                                  # 5.1  CYRILLIC SMALL LETTER IOTIFIED CLOSED LITTLE YUS\r
++A65E          ; mapped                 ; A65F          # 5.1  CYRILLIC CAPITAL LETTER YN\r
++A65F          ; valid                                  # 5.1  CYRILLIC SMALL LETTER YN\r
++A660          ; mapped                 ; A661          # 6.0  CYRILLIC CAPITAL LETTER REVERSED TSE\r
++A661          ; valid                                  # 6.0  CYRILLIC SMALL LETTER REVERSED TSE\r
++A662          ; mapped                 ; A663          # 5.1  CYRILLIC CAPITAL LETTER SOFT DE\r
++A663          ; valid                                  # 5.1  CYRILLIC SMALL LETTER SOFT DE\r
++A664          ; mapped                 ; A665          # 5.1  CYRILLIC CAPITAL LETTER SOFT EL\r
++A665          ; valid                                  # 5.1  CYRILLIC SMALL LETTER SOFT EL\r
++A666          ; mapped                 ; A667          # 5.1  CYRILLIC CAPITAL LETTER SOFT EM\r
++A667          ; valid                                  # 5.1  CYRILLIC SMALL LETTER SOFT EM\r
++A668          ; mapped                 ; A669          # 5.1  CYRILLIC CAPITAL LETTER MONOCULAR O\r
++A669          ; valid                                  # 5.1  CYRILLIC SMALL LETTER MONOCULAR O\r
++A66A          ; mapped                 ; A66B          # 5.1  CYRILLIC CAPITAL LETTER BINOCULAR O\r
++A66B          ; valid                                  # 5.1  CYRILLIC SMALL LETTER BINOCULAR O\r
++A66C          ; mapped                 ; A66D          # 5.1  CYRILLIC CAPITAL LETTER DOUBLE MONOCULAR O\r
++A66D..A66F    ; valid                                  # 5.1  CYRILLIC SMALL LETTER DOUBLE MONOCULAR O..COMBINING CYRILLIC VZMET\r
++A670..A673    ; valid                  ;      ; NV8    # 5.1  COMBINING CYRILLIC TEN MILLIONS SIGN..SLAVONIC ASTERISK\r
++A674..A67B    ; valid                                  # 6.1  COMBINING CYRILLIC LETTER UKRAINIAN IE..COMBINING CYRILLIC LETTER OMEGA\r
++A67C..A67D    ; valid                                  # 5.1  COMBINING CYRILLIC KAVYKA..COMBINING CYRILLIC PAYEROK\r
++A67E          ; valid                  ;      ; NV8    # 5.1  CYRILLIC KAVYKA\r
++A67F          ; valid                                  # 5.1  CYRILLIC PAYEROK\r
++A680          ; mapped                 ; A681          # 5.1  CYRILLIC CAPITAL LETTER DWE\r
++A681          ; valid                                  # 5.1  CYRILLIC SMALL LETTER DWE\r
++A682          ; mapped                 ; A683          # 5.1  CYRILLIC CAPITAL LETTER DZWE\r
++A683          ; valid                                  # 5.1  CYRILLIC SMALL LETTER DZWE\r
++A684          ; mapped                 ; A685          # 5.1  CYRILLIC CAPITAL LETTER ZHWE\r
++A685          ; valid                                  # 5.1  CYRILLIC SMALL LETTER ZHWE\r
++A686          ; mapped                 ; A687          # 5.1  CYRILLIC CAPITAL LETTER CCHE\r
++A687          ; valid                                  # 5.1  CYRILLIC SMALL LETTER CCHE\r
++A688          ; mapped                 ; A689          # 5.1  CYRILLIC CAPITAL LETTER DZZE\r
++A689          ; valid                                  # 5.1  CYRILLIC SMALL LETTER DZZE\r
++A68A          ; mapped                 ; A68B          # 5.1  CYRILLIC CAPITAL LETTER TE WITH MIDDLE HOOK\r
++A68B          ; valid                                  # 5.1  CYRILLIC SMALL LETTER TE WITH MIDDLE HOOK\r
++A68C          ; mapped                 ; A68D          # 5.1  CYRILLIC CAPITAL LETTER TWE\r
++A68D          ; valid                                  # 5.1  CYRILLIC SMALL LETTER TWE\r
++A68E          ; mapped                 ; A68F          # 5.1  CYRILLIC CAPITAL LETTER TSWE\r
++A68F          ; valid                                  # 5.1  CYRILLIC SMALL LETTER TSWE\r
++A690          ; mapped                 ; A691          # 5.1  CYRILLIC CAPITAL LETTER TSSE\r
++A691          ; valid                                  # 5.1  CYRILLIC SMALL LETTER TSSE\r
++A692          ; mapped                 ; A693          # 5.1  CYRILLIC CAPITAL LETTER TCHE\r
++A693          ; valid                                  # 5.1  CYRILLIC SMALL LETTER TCHE\r
++A694          ; mapped                 ; A695          # 5.1  CYRILLIC CAPITAL LETTER HWE\r
++A695          ; valid                                  # 5.1  CYRILLIC SMALL LETTER HWE\r
++A696          ; mapped                 ; A697          # 5.1  CYRILLIC CAPITAL LETTER SHWE\r
++A697          ; valid                                  # 5.1  CYRILLIC SMALL LETTER SHWE\r
++A698          ; mapped                 ; A699          # 7.0  CYRILLIC CAPITAL LETTER DOUBLE O\r
++A699          ; valid                                  # 7.0  CYRILLIC SMALL LETTER DOUBLE O\r
++A69A          ; mapped                 ; A69B          # 7.0  CYRILLIC CAPITAL LETTER CROSSED O\r
++A69B          ; valid                                  # 7.0  CYRILLIC SMALL LETTER CROSSED O\r
++A69C          ; mapped                 ; 044A          # 7.0  MODIFIER LETTER CYRILLIC HARD SIGN\r
++A69D          ; mapped                 ; 044C          # 7.0  MODIFIER LETTER CYRILLIC SOFT SIGN\r
++A69E          ; valid                                  # 8.0  COMBINING CYRILLIC LETTER EF\r
++A69F          ; valid                                  # 6.1  COMBINING CYRILLIC LETTER IOTIFIED E\r
++A6A0..A6E5    ; valid                                  # 5.2  BAMUM LETTER A..BAMUM LETTER KI\r
++A6E6..A6EF    ; valid                  ;      ; NV8    # 5.2  BAMUM LETTER MO..BAMUM LETTER KOGHOM\r
++A6F0..A6F1    ; valid                                  # 5.2  BAMUM COMBINING MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS\r
++A6F2..A6F7    ; valid                  ;      ; NV8    # 5.2  BAMUM NJAEMLI..BAMUM QUESTION MARK\r
++A6F8..A6FF    ; disallowed                             # NA   <reserved-A6F8>..<reserved-A6FF>\r
++A700..A716    ; valid                  ;      ; NV8    # 4.1  MODIFIER LETTER CHINESE TONE YIN PING..MODIFIER LETTER EXTRA-LOW LEFT-STEM TONE BAR\r
++A717..A71A    ; valid                                  # 5.0  MODIFIER LETTER DOT VERTICAL BAR..MODIFIER LETTER LOWER RIGHT CORNER ANGLE\r
++A71B..A71F    ; valid                                  # 5.1  MODIFIER LETTER RAISED UP ARROW..MODIFIER LETTER LOW INVERTED EXCLAMATION MARK\r
++A720..A721    ; valid                  ;      ; NV8    # 5.0  MODIFIER LETTER STRESS AND HIGH TONE..MODIFIER LETTER STRESS AND LOW TONE\r
++A722          ; mapped                 ; A723          # 5.1  LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF\r
++A723          ; valid                                  # 5.1  LATIN SMALL LETTER EGYPTOLOGICAL ALEF\r
++A724          ; mapped                 ; A725          # 5.1  LATIN CAPITAL LETTER EGYPTOLOGICAL AIN\r
++A725          ; valid                                  # 5.1  LATIN SMALL LETTER EGYPTOLOGICAL AIN\r
++A726          ; mapped                 ; A727          # 5.1  LATIN CAPITAL LETTER HENG\r
++A727          ; valid                                  # 5.1  LATIN SMALL LETTER HENG\r
++A728          ; mapped                 ; A729          # 5.1  LATIN CAPITAL LETTER TZ\r
++A729          ; valid                                  # 5.1  LATIN SMALL LETTER TZ\r
++A72A          ; mapped                 ; A72B          # 5.1  LATIN CAPITAL LETTER TRESILLO\r
++A72B          ; valid                                  # 5.1  LATIN SMALL LETTER TRESILLO\r
++A72C          ; mapped                 ; A72D          # 5.1  LATIN CAPITAL LETTER CUATRILLO\r
++A72D          ; valid                                  # 5.1  LATIN SMALL LETTER CUATRILLO\r
++A72E          ; mapped                 ; A72F          # 5.1  LATIN CAPITAL LETTER CUATRILLO WITH COMMA\r
++A72F..A731    ; valid                                  # 5.1  LATIN SMALL LETTER CUATRILLO WITH COMMA..LATIN LETTER SMALL CAPITAL S\r
++A732          ; mapped                 ; A733          # 5.1  LATIN CAPITAL LETTER AA\r
++A733          ; valid                                  # 5.1  LATIN SMALL LETTER AA\r
++A734          ; mapped                 ; A735          # 5.1  LATIN CAPITAL LETTER AO\r
++A735          ; valid                                  # 5.1  LATIN SMALL LETTER AO\r
++A736          ; mapped                 ; A737          # 5.1  LATIN CAPITAL LETTER AU\r
++A737          ; valid                                  # 5.1  LATIN SMALL LETTER AU\r
++A738          ; mapped                 ; A739          # 5.1  LATIN CAPITAL LETTER AV\r
++A739          ; valid                                  # 5.1  LATIN SMALL LETTER AV\r
++A73A          ; mapped                 ; A73B          # 5.1  LATIN CAPITAL LETTER AV WITH HORIZONTAL BAR\r
++A73B          ; valid                                  # 5.1  LATIN SMALL LETTER AV WITH HORIZONTAL BAR\r
++A73C          ; mapped                 ; A73D          # 5.1  LATIN CAPITAL LETTER AY\r
++A73D          ; valid                                  # 5.1  LATIN SMALL LETTER AY\r
++A73E          ; mapped                 ; A73F          # 5.1  LATIN CAPITAL LETTER REVERSED C WITH DOT\r
++A73F          ; valid                                  # 5.1  LATIN SMALL LETTER REVERSED C WITH DOT\r
++A740          ; mapped                 ; A741          # 5.1  LATIN CAPITAL LETTER K WITH STROKE\r
++A741          ; valid                                  # 5.1  LATIN SMALL LETTER K WITH STROKE\r
++A742          ; mapped                 ; A743          # 5.1  LATIN CAPITAL LETTER K WITH DIAGONAL STROKE\r
++A743          ; valid                                  # 5.1  LATIN SMALL LETTER K WITH DIAGONAL STROKE\r
++A744          ; mapped                 ; A745          # 5.1  LATIN CAPITAL LETTER K WITH STROKE AND DIAGONAL STROKE\r
++A745          ; valid                                  # 5.1  LATIN SMALL LETTER K WITH STROKE AND DIAGONAL STROKE\r
++A746          ; mapped                 ; A747          # 5.1  LATIN CAPITAL LETTER BROKEN L\r
++A747          ; valid                                  # 5.1  LATIN SMALL LETTER BROKEN L\r
++A748          ; mapped                 ; A749          # 5.1  LATIN CAPITAL LETTER L WITH HIGH STROKE\r
++A749          ; valid                                  # 5.1  LATIN SMALL LETTER L WITH HIGH STROKE\r
++A74A          ; mapped                 ; A74B          # 5.1  LATIN CAPITAL LETTER O WITH LONG STROKE OVERLAY\r
++A74B          ; valid                                  # 5.1  LATIN SMALL LETTER O WITH LONG STROKE OVERLAY\r
++A74C          ; mapped                 ; A74D          # 5.1  LATIN CAPITAL LETTER O WITH LOOP\r
++A74D          ; valid                                  # 5.1  LATIN SMALL LETTER O WITH LOOP\r
++A74E          ; mapped                 ; A74F          # 5.1  LATIN CAPITAL LETTER OO\r
++A74F          ; valid                                  # 5.1  LATIN SMALL LETTER OO\r
++A750          ; mapped                 ; A751          # 5.1  LATIN CAPITAL LETTER P WITH STROKE THROUGH DESCENDER\r
++A751          ; valid                                  # 5.1  LATIN SMALL LETTER P WITH STROKE THROUGH DESCENDER\r
++A752          ; mapped                 ; A753          # 5.1  LATIN CAPITAL LETTER P WITH FLOURISH\r
++A753          ; valid                                  # 5.1  LATIN SMALL LETTER P WITH FLOURISH\r
++A754          ; mapped                 ; A755          # 5.1  LATIN CAPITAL LETTER P WITH SQUIRREL TAIL\r
++A755          ; valid                                  # 5.1  LATIN SMALL LETTER P WITH SQUIRREL TAIL\r
++A756          ; mapped                 ; A757          # 5.1  LATIN CAPITAL LETTER Q WITH STROKE THROUGH DESCENDER\r
++A757          ; valid                                  # 5.1  LATIN SMALL LETTER Q WITH STROKE THROUGH DESCENDER\r
++A758          ; mapped                 ; A759          # 5.1  LATIN CAPITAL LETTER Q WITH DIAGONAL STROKE\r
++A759          ; valid                                  # 5.1  LATIN SMALL LETTER Q WITH DIAGONAL STROKE\r
++A75A          ; mapped                 ; A75B          # 5.1  LATIN CAPITAL LETTER R ROTUNDA\r
++A75B          ; valid                                  # 5.1  LATIN SMALL LETTER R ROTUNDA\r
++A75C          ; mapped                 ; A75D          # 5.1  LATIN CAPITAL LETTER RUM ROTUNDA\r
++A75D          ; valid                                  # 5.1  LATIN SMALL LETTER RUM ROTUNDA\r
++A75E          ; mapped                 ; A75F          # 5.1  LATIN CAPITAL LETTER V WITH DIAGONAL STROKE\r
++A75F          ; valid                                  # 5.1  LATIN SMALL LETTER V WITH DIAGONAL STROKE\r
++A760          ; mapped                 ; A761          # 5.1  LATIN CAPITAL LETTER VY\r
++A761          ; valid                                  # 5.1  LATIN SMALL LETTER VY\r
++A762          ; mapped                 ; A763          # 5.1  LATIN CAPITAL LETTER VISIGOTHIC Z\r
++A763          ; valid                                  # 5.1  LATIN SMALL LETTER VISIGOTHIC Z\r
++A764          ; mapped                 ; A765          # 5.1  LATIN CAPITAL LETTER THORN WITH STROKE\r
++A765          ; valid                                  # 5.1  LATIN SMALL LETTER THORN WITH STROKE\r
++A766          ; mapped                 ; A767          # 5.1  LATIN CAPITAL LETTER THORN WITH STROKE THROUGH DESCENDER\r
++A767          ; valid                                  # 5.1  LATIN SMALL LETTER THORN WITH STROKE THROUGH DESCENDER\r
++A768          ; mapped                 ; A769          # 5.1  LATIN CAPITAL LETTER VEND\r
++A769          ; valid                                  # 5.1  LATIN SMALL LETTER VEND\r
++A76A          ; mapped                 ; A76B          # 5.1  LATIN CAPITAL LETTER ET\r
++A76B          ; valid                                  # 5.1  LATIN SMALL LETTER ET\r
++A76C          ; mapped                 ; A76D          # 5.1  LATIN CAPITAL LETTER IS\r
++A76D          ; valid                                  # 5.1  LATIN SMALL LETTER IS\r
++A76E          ; mapped                 ; A76F          # 5.1  LATIN CAPITAL LETTER CON\r
++A76F          ; valid                                  # 5.1  LATIN SMALL LETTER CON\r
++A770          ; mapped                 ; A76F          # 5.1  MODIFIER LETTER US\r
++A771..A778    ; valid                                  # 5.1  LATIN SMALL LETTER DUM..LATIN SMALL LETTER UM\r
++A779          ; mapped                 ; A77A          # 5.1  LATIN CAPITAL LETTER INSULAR D\r
++A77A          ; valid                                  # 5.1  LATIN SMALL LETTER INSULAR D\r
++A77B          ; mapped                 ; A77C          # 5.1  LATIN CAPITAL LETTER INSULAR F\r
++A77C          ; valid                                  # 5.1  LATIN SMALL LETTER INSULAR F\r
++A77D          ; mapped                 ; 1D79          # 5.1  LATIN CAPITAL LETTER INSULAR G\r
++A77E          ; mapped                 ; A77F          # 5.1  LATIN CAPITAL LETTER TURNED INSULAR G\r
++A77F          ; valid                                  # 5.1  LATIN SMALL LETTER TURNED INSULAR G\r
++A780          ; mapped                 ; A781          # 5.1  LATIN CAPITAL LETTER TURNED L\r
++A781          ; valid                                  # 5.1  LATIN SMALL LETTER TURNED L\r
++A782          ; mapped                 ; A783          # 5.1  LATIN CAPITAL LETTER INSULAR R\r
++A783          ; valid                                  # 5.1  LATIN SMALL LETTER INSULAR R\r
++A784          ; mapped                 ; A785          # 5.1  LATIN CAPITAL LETTER INSULAR S\r
++A785          ; valid                                  # 5.1  LATIN SMALL LETTER INSULAR S\r
++A786          ; mapped                 ; A787          # 5.1  LATIN CAPITAL LETTER INSULAR T\r
++A787..A788    ; valid                                  # 5.1  LATIN SMALL LETTER INSULAR T..MODIFIER LETTER LOW CIRCUMFLEX ACCENT\r
++A789..A78A    ; valid                  ;      ; NV8    # 5.1  MODIFIER LETTER COLON..MODIFIER LETTER SHORT EQUALS SIGN\r
++A78B          ; mapped                 ; A78C          # 5.1  LATIN CAPITAL LETTER SALTILLO\r
++A78C          ; valid                                  # 5.1  LATIN SMALL LETTER SALTILLO\r
++A78D          ; mapped                 ; 0265          # 6.0  LATIN CAPITAL LETTER TURNED H\r
++A78E          ; valid                                  # 6.0  LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT\r
++A78F          ; valid                                  # 8.0  LATIN LETTER SINOLOGICAL DOT\r
++A790          ; mapped                 ; A791          # 6.0  LATIN CAPITAL LETTER N WITH DESCENDER\r
++A791          ; valid                                  # 6.0  LATIN SMALL LETTER N WITH DESCENDER\r
++A792          ; mapped                 ; A793          # 6.1  LATIN CAPITAL LETTER C WITH BAR\r
++A793          ; valid                                  # 6.1  LATIN SMALL LETTER C WITH BAR\r
++A794..A795    ; valid                                  # 7.0  LATIN SMALL LETTER C WITH PALATAL HOOK..LATIN SMALL LETTER H WITH PALATAL HOOK\r
++A796          ; mapped                 ; A797          # 7.0  LATIN CAPITAL LETTER B WITH FLOURISH\r
++A797          ; valid                                  # 7.0  LATIN SMALL LETTER B WITH FLOURISH\r
++A798          ; mapped                 ; A799          # 7.0  LATIN CAPITAL LETTER F WITH STROKE\r
++A799          ; valid                                  # 7.0  LATIN SMALL LETTER F WITH STROKE\r
++A79A          ; mapped                 ; A79B          # 7.0  LATIN CAPITAL LETTER VOLAPUK AE\r
++A79B          ; valid                                  # 7.0  LATIN SMALL LETTER VOLAPUK AE\r
++A79C          ; mapped                 ; A79D          # 7.0  LATIN CAPITAL LETTER VOLAPUK OE\r
++A79D          ; valid                                  # 7.0  LATIN SMALL LETTER VOLAPUK OE\r
++A79E          ; mapped                 ; A79F          # 7.0  LATIN CAPITAL LETTER VOLAPUK UE\r
++A79F          ; valid                                  # 7.0  LATIN SMALL LETTER VOLAPUK UE\r
++A7A0          ; mapped                 ; A7A1          # 6.0  LATIN CAPITAL LETTER G WITH OBLIQUE STROKE\r
++A7A1          ; valid                                  # 6.0  LATIN SMALL LETTER G WITH OBLIQUE STROKE\r
++A7A2          ; mapped                 ; A7A3          # 6.0  LATIN CAPITAL LETTER K WITH OBLIQUE STROKE\r
++A7A3          ; valid                                  # 6.0  LATIN SMALL LETTER K WITH OBLIQUE STROKE\r
++A7A4          ; mapped                 ; A7A5          # 6.0  LATIN CAPITAL LETTER N WITH OBLIQUE STROKE\r
++A7A5          ; valid                                  # 6.0  LATIN SMALL LETTER N WITH OBLIQUE STROKE\r
++A7A6          ; mapped                 ; A7A7          # 6.0  LATIN CAPITAL LETTER R WITH OBLIQUE STROKE\r
++A7A7          ; valid                                  # 6.0  LATIN SMALL LETTER R WITH OBLIQUE STROKE\r
++A7A8          ; mapped                 ; A7A9          # 6.0  LATIN CAPITAL LETTER S WITH OBLIQUE STROKE\r
++A7A9          ; valid                                  # 6.0  LATIN SMALL LETTER S WITH OBLIQUE STROKE\r
++A7AA          ; mapped                 ; 0266          # 6.1  LATIN CAPITAL LETTER H WITH HOOK\r
++A7AB          ; mapped                 ; 025C          # 7.0  LATIN CAPITAL LETTER REVERSED OPEN E\r
++A7AC          ; mapped                 ; 0261          # 7.0  LATIN CAPITAL LETTER SCRIPT G\r
++A7AD          ; mapped                 ; 026C          # 7.0  LATIN CAPITAL LETTER L WITH BELT\r
++A7AE          ; mapped                 ; 026A          # 9.0  LATIN CAPITAL LETTER SMALL CAPITAL I\r
++A7AF          ; disallowed                             # NA   <reserved-A7AF>\r
++A7B0          ; mapped                 ; 029E          # 7.0  LATIN CAPITAL LETTER TURNED K\r
++A7B1          ; mapped                 ; 0287          # 7.0  LATIN CAPITAL LETTER TURNED T\r
++A7B2          ; mapped                 ; 029D          # 8.0  LATIN CAPITAL LETTER J WITH CROSSED-TAIL\r
++A7B3          ; mapped                 ; AB53          # 8.0  LATIN CAPITAL LETTER CHI\r
++A7B4          ; mapped                 ; A7B5          # 8.0  LATIN CAPITAL LETTER BETA\r
++A7B5          ; valid                                  # 8.0  LATIN SMALL LETTER BETA\r
++A7B6          ; mapped                 ; A7B7          # 8.0  LATIN CAPITAL LETTER OMEGA\r
++A7B7          ; valid                                  # 8.0  LATIN SMALL LETTER OMEGA\r
++A7B8..A7F6    ; disallowed                             # NA   <reserved-A7B8>..<reserved-A7F6>\r
++A7F7          ; valid                                  # 7.0  LATIN EPIGRAPHIC LETTER SIDEWAYS I\r
++A7F8          ; mapped                 ; 0127          # 6.1  MODIFIER LETTER CAPITAL H WITH STROKE\r
++A7F9          ; mapped                 ; 0153          # 6.1  MODIFIER LETTER SMALL LIGATURE OE\r
++A7FA          ; valid                                  # 6.0  LATIN LETTER SMALL CAPITAL TURNED M\r
++A7FB..A7FF    ; valid                                  # 5.1  LATIN EPIGRAPHIC LETTER REVERSED F..LATIN EPIGRAPHIC LETTER ARCHAIC M\r
++A800..A827    ; valid                                  # 4.1  SYLOTI NAGRI LETTER A..SYLOTI NAGRI VOWEL SIGN OO\r
++A828..A82B    ; valid                  ;      ; NV8    # 4.1  SYLOTI NAGRI POETRY MARK-1..SYLOTI NAGRI POETRY MARK-4\r
++A82C..A82F    ; disallowed                             # NA   <reserved-A82C>..<reserved-A82F>\r
++A830..A839    ; valid                  ;      ; NV8    # 5.2  NORTH INDIC FRACTION ONE QUARTER..NORTH INDIC QUANTITY MARK\r
++A83A..A83F    ; disallowed                             # NA   <reserved-A83A>..<reserved-A83F>\r
++A840..A873    ; valid                                  # 5.0  PHAGS-PA LETTER KA..PHAGS-PA LETTER CANDRABINDU\r
++A874..A877    ; valid                  ;      ; NV8    # 5.0  PHAGS-PA SINGLE HEAD MARK..PHAGS-PA MARK DOUBLE SHAD\r
++A878..A87F    ; disallowed                             # NA   <reserved-A878>..<reserved-A87F>\r
++A880..A8C4    ; valid                                  # 5.1  SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VIRAMA\r
++A8C5          ; valid                                  # 9.0  SAURASHTRA SIGN CANDRABINDU\r
++A8C6..A8CD    ; disallowed                             # NA   <reserved-A8C6>..<reserved-A8CD>\r
++A8CE..A8CF    ; valid                  ;      ; NV8    # 5.1  SAURASHTRA DANDA..SAURASHTRA DOUBLE DANDA\r
++A8D0..A8D9    ; valid                                  # 5.1  SAURASHTRA DIGIT ZERO..SAURASHTRA DIGIT NINE\r
++A8DA..A8DF    ; disallowed                             # NA   <reserved-A8DA>..<reserved-A8DF>\r
++A8E0..A8F7    ; valid                                  # 5.2  COMBINING DEVANAGARI DIGIT ZERO..DEVANAGARI SIGN CANDRABINDU AVAGRAHA\r
++A8F8..A8FA    ; valid                  ;      ; NV8    # 5.2  DEVANAGARI SIGN PUSHPIKA..DEVANAGARI CARET\r
++A8FB          ; valid                                  # 5.2  DEVANAGARI HEADSTROKE\r
++A8FC          ; valid                  ;      ; NV8    # 8.0  DEVANAGARI SIGN SIDDHAM\r
++A8FD          ; valid                                  # 8.0  DEVANAGARI JAIN OM\r
++A8FE..A8FF    ; disallowed                             # NA   <reserved-A8FE>..<reserved-A8FF>\r
++A900..A92D    ; valid                                  # 5.1  KAYAH LI DIGIT ZERO..KAYAH LI TONE CALYA PLOPHU\r
++A92E..A92F    ; valid                  ;      ; NV8    # 5.1  KAYAH LI SIGN CWI..KAYAH LI SIGN SHYA\r
++A930..A953    ; valid                                  # 5.1  REJANG LETTER KA..REJANG VIRAMA\r
++A954..A95E    ; disallowed                             # NA   <reserved-A954>..<reserved-A95E>\r
++A95F          ; valid                  ;      ; NV8    # 5.1  REJANG SECTION MARK\r
++A960..A97C    ; valid                  ;      ; NV8    # 5.2  HANGUL CHOSEONG TIKEUT-MIEUM..HANGUL CHOSEONG SSANGYEORINHIEUH\r
++A97D..A97F    ; disallowed                             # NA   <reserved-A97D>..<reserved-A97F>\r
++A980..A9C0    ; valid                                  # 5.2  JAVANESE SIGN PANYANGGA..JAVANESE PANGKON\r
++A9C1..A9CD    ; valid                  ;      ; NV8    # 5.2  JAVANESE LEFT RERENGGAN..JAVANESE TURNED PADA PISELEH\r
++A9CE          ; disallowed                             # NA   <reserved-A9CE>\r
++A9CF..A9D9    ; valid                                  # 5.2  JAVANESE PANGRANGKEP..JAVANESE DIGIT NINE\r
++A9DA..A9DD    ; disallowed                             # NA   <reserved-A9DA>..<reserved-A9DD>\r
++A9DE..A9DF    ; valid                  ;      ; NV8    # 5.2  JAVANESE PADA TIRTA TUMETES..JAVANESE PADA ISEN-ISEN\r
++A9E0..A9FE    ; valid                                  # 7.0  MYANMAR LETTER SHAN GHA..MYANMAR LETTER TAI LAING BHA\r
++A9FF          ; disallowed                             # NA   <reserved-A9FF>\r
++AA00..AA36    ; valid                                  # 5.1  CHAM LETTER A..CHAM CONSONANT SIGN WA\r
++AA37..AA3F    ; disallowed                             # NA   <reserved-AA37>..<reserved-AA3F>\r
++AA40..AA4D    ; valid                                  # 5.1  CHAM LETTER FINAL K..CHAM CONSONANT SIGN FINAL H\r
++AA4E..AA4F    ; disallowed                             # NA   <reserved-AA4E>..<reserved-AA4F>\r
++AA50..AA59    ; valid                                  # 5.1  CHAM DIGIT ZERO..CHAM DIGIT NINE\r
++AA5A..AA5B    ; disallowed                             # NA   <reserved-AA5A>..<reserved-AA5B>\r
++AA5C..AA5F    ; valid                  ;      ; NV8    # 5.1  CHAM PUNCTUATION SPIRAL..CHAM PUNCTUATION TRIPLE DANDA\r
++AA60..AA76    ; valid                                  # 5.2  MYANMAR LETTER KHAMTI GA..MYANMAR LOGOGRAM KHAMTI HM\r
++AA77..AA79    ; valid                  ;      ; NV8    # 5.2  MYANMAR SYMBOL AITON EXCLAMATION..MYANMAR SYMBOL AITON TWO\r
++AA7A..AA7B    ; valid                                  # 5.2  MYANMAR LETTER AITON RA..MYANMAR SIGN PAO KAREN TONE\r
++AA7C..AA7F    ; valid                                  # 7.0  MYANMAR SIGN TAI LAING TONE-2..MYANMAR LETTER SHWE PALAUNG SHA\r
++AA80..AAC2    ; valid                                  # 5.2  TAI VIET LETTER LOW KO..TAI VIET TONE MAI SONG\r
++AAC3..AADA    ; disallowed                             # NA   <reserved-AAC3>..<reserved-AADA>\r
++AADB..AADD    ; valid                                  # 5.2  TAI VIET SYMBOL KON..TAI VIET SYMBOL SAM\r
++AADE..AADF    ; valid                  ;      ; NV8    # 5.2  TAI VIET SYMBOL HO HOI..TAI VIET SYMBOL KOI KOI\r
++AAE0..AAEF    ; valid                                  # 6.1  MEETEI MAYEK LETTER E..MEETEI MAYEK VOWEL SIGN AAU\r
++AAF0..AAF1    ; valid                  ;      ; NV8    # 6.1  MEETEI MAYEK CHEIKHAN..MEETEI MAYEK AHANG KHUDAM\r
++AAF2..AAF6    ; valid                                  # 6.1  MEETEI MAYEK ANJI..MEETEI MAYEK VIRAMA\r
++AAF7..AB00    ; disallowed                             # NA   <reserved-AAF7>..<reserved-AB00>\r
++AB01..AB06    ; valid                                  # 6.0  ETHIOPIC SYLLABLE TTHU..ETHIOPIC SYLLABLE TTHO\r
++AB07..AB08    ; disallowed                             # NA   <reserved-AB07>..<reserved-AB08>\r
++AB09..AB0E    ; valid                                  # 6.0  ETHIOPIC SYLLABLE DDHU..ETHIOPIC SYLLABLE DDHO\r
++AB0F..AB10    ; disallowed                             # NA   <reserved-AB0F>..<reserved-AB10>\r
++AB11..AB16    ; valid                                  # 6.0  ETHIOPIC SYLLABLE DZU..ETHIOPIC SYLLABLE DZO\r
++AB17..AB1F    ; disallowed                             # NA   <reserved-AB17>..<reserved-AB1F>\r
++AB20..AB26    ; valid                                  # 6.0  ETHIOPIC SYLLABLE CCHHA..ETHIOPIC SYLLABLE CCHHO\r
++AB27          ; disallowed                             # NA   <reserved-AB27>\r
++AB28..AB2E    ; valid                                  # 6.0  ETHIOPIC SYLLABLE BBA..ETHIOPIC SYLLABLE BBO\r
++AB2F          ; disallowed                             # NA   <reserved-AB2F>\r
++AB30..AB5A    ; valid                                  # 7.0  LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG\r
++AB5B          ; valid                  ;      ; NV8    # 7.0  MODIFIER BREVE WITH INVERTED BREVE\r
++AB5C          ; mapped                 ; A727          # 7.0  MODIFIER LETTER SMALL HENG\r
++AB5D          ; mapped                 ; AB37          # 7.0  MODIFIER LETTER SMALL L WITH INVERTED LAZY S\r
++AB5E          ; mapped                 ; 026B          # 7.0  MODIFIER LETTER SMALL L WITH MIDDLE TILDE\r
++AB5F          ; mapped                 ; AB52          # 7.0  MODIFIER LETTER SMALL U WITH LEFT HOOK\r
++AB60..AB63    ; valid                                  # 8.0  LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER UO\r
++AB64..AB65    ; valid                                  # 7.0  LATIN SMALL LETTER INVERTED ALPHA..GREEK LETTER SMALL CAPITAL OMEGA\r
++AB66..AB6F    ; disallowed                             # NA   <reserved-AB66>..<reserved-AB6F>\r
++AB70          ; mapped                 ; 13A0          # 8.0  CHEROKEE SMALL LETTER A\r
++AB71          ; mapped                 ; 13A1          # 8.0  CHEROKEE SMALL LETTER E\r
++AB72          ; mapped                 ; 13A2          # 8.0  CHEROKEE SMALL LETTER I\r
++AB73          ; mapped                 ; 13A3          # 8.0  CHEROKEE SMALL LETTER O\r
++AB74          ; mapped                 ; 13A4          # 8.0  CHEROKEE SMALL LETTER U\r
++AB75          ; mapped                 ; 13A5          # 8.0  CHEROKEE SMALL LETTER V\r
++AB76          ; mapped                 ; 13A6          # 8.0  CHEROKEE SMALL LETTER GA\r
++AB77          ; mapped                 ; 13A7          # 8.0  CHEROKEE SMALL LETTER KA\r
++AB78          ; mapped                 ; 13A8          # 8.0  CHEROKEE SMALL LETTER GE\r
++AB79          ; mapped                 ; 13A9          # 8.0  CHEROKEE SMALL LETTER GI\r
++AB7A          ; mapped                 ; 13AA          # 8.0  CHEROKEE SMALL LETTER GO\r
++AB7B          ; mapped                 ; 13AB          # 8.0  CHEROKEE SMALL LETTER GU\r
++AB7C          ; mapped                 ; 13AC          # 8.0  CHEROKEE SMALL LETTER GV\r
++AB7D          ; mapped                 ; 13AD          # 8.0  CHEROKEE SMALL LETTER HA\r
++AB7E          ; mapped                 ; 13AE          # 8.0  CHEROKEE SMALL LETTER HE\r
++AB7F          ; mapped                 ; 13AF          # 8.0  CHEROKEE SMALL LETTER HI\r
++AB80          ; mapped                 ; 13B0          # 8.0  CHEROKEE SMALL LETTER HO\r
++AB81          ; mapped                 ; 13B1          # 8.0  CHEROKEE SMALL LETTER HU\r
++AB82          ; mapped                 ; 13B2          # 8.0  CHEROKEE SMALL LETTER HV\r
++AB83          ; mapped                 ; 13B3          # 8.0  CHEROKEE SMALL LETTER LA\r
++AB84          ; mapped                 ; 13B4          # 8.0  CHEROKEE SMALL LETTER LE\r
++AB85          ; mapped                 ; 13B5          # 8.0  CHEROKEE SMALL LETTER LI\r
++AB86          ; mapped                 ; 13B6          # 8.0  CHEROKEE SMALL LETTER LO\r
++AB87          ; mapped                 ; 13B7          # 8.0  CHEROKEE SMALL LETTER LU\r
++AB88          ; mapped                 ; 13B8          # 8.0  CHEROKEE SMALL LETTER LV\r
++AB89          ; mapped                 ; 13B9          # 8.0  CHEROKEE SMALL LETTER MA\r
++AB8A          ; mapped                 ; 13BA          # 8.0  CHEROKEE SMALL LETTER ME\r
++AB8B          ; mapped                 ; 13BB          # 8.0  CHEROKEE SMALL LETTER MI\r
++AB8C          ; mapped                 ; 13BC          # 8.0  CHEROKEE SMALL LETTER MO\r
++AB8D          ; mapped                 ; 13BD          # 8.0  CHEROKEE SMALL LETTER MU\r
++AB8E          ; mapped                 ; 13BE          # 8.0  CHEROKEE SMALL LETTER NA\r
++AB8F          ; mapped                 ; 13BF          # 8.0  CHEROKEE SMALL LETTER HNA\r
++AB90          ; mapped                 ; 13C0          # 8.0  CHEROKEE SMALL LETTER NAH\r
++AB91          ; mapped                 ; 13C1          # 8.0  CHEROKEE SMALL LETTER NE\r
++AB92          ; mapped                 ; 13C2          # 8.0  CHEROKEE SMALL LETTER NI\r
++AB93          ; mapped                 ; 13C3          # 8.0  CHEROKEE SMALL LETTER NO\r
++AB94          ; mapped                 ; 13C4          # 8.0  CHEROKEE SMALL LETTER NU\r
++AB95          ; mapped                 ; 13C5          # 8.0  CHEROKEE SMALL LETTER NV\r
++AB96          ; mapped                 ; 13C6          # 8.0  CHEROKEE SMALL LETTER QUA\r
++AB97          ; mapped                 ; 13C7          # 8.0  CHEROKEE SMALL LETTER QUE\r
++AB98          ; mapped                 ; 13C8          # 8.0  CHEROKEE SMALL LETTER QUI\r
++AB99          ; mapped                 ; 13C9          # 8.0  CHEROKEE SMALL LETTER QUO\r
++AB9A          ; mapped                 ; 13CA          # 8.0  CHEROKEE SMALL LETTER QUU\r
++AB9B          ; mapped                 ; 13CB          # 8.0  CHEROKEE SMALL LETTER QUV\r
++AB9C          ; mapped                 ; 13CC          # 8.0  CHEROKEE SMALL LETTER SA\r
++AB9D          ; mapped                 ; 13CD          # 8.0  CHEROKEE SMALL LETTER S\r
++AB9E          ; mapped                 ; 13CE          # 8.0  CHEROKEE SMALL LETTER SE\r
++AB9F          ; mapped                 ; 13CF          # 8.0  CHEROKEE SMALL LETTER SI\r
++ABA0          ; mapped                 ; 13D0          # 8.0  CHEROKEE SMALL LETTER SO\r
++ABA1          ; mapped                 ; 13D1          # 8.0  CHEROKEE SMALL LETTER SU\r
++ABA2          ; mapped                 ; 13D2          # 8.0  CHEROKEE SMALL LETTER SV\r
++ABA3          ; mapped                 ; 13D3          # 8.0  CHEROKEE SMALL LETTER DA\r
++ABA4          ; mapped                 ; 13D4          # 8.0  CHEROKEE SMALL LETTER TA\r
++ABA5          ; mapped                 ; 13D5          # 8.0  CHEROKEE SMALL LETTER DE\r
++ABA6          ; mapped                 ; 13D6          # 8.0  CHEROKEE SMALL LETTER TE\r
++ABA7          ; mapped                 ; 13D7          # 8.0  CHEROKEE SMALL LETTER DI\r
++ABA8          ; mapped                 ; 13D8          # 8.0  CHEROKEE SMALL LETTER TI\r
++ABA9          ; mapped                 ; 13D9          # 8.0  CHEROKEE SMALL LETTER DO\r
++ABAA          ; mapped                 ; 13DA          # 8.0  CHEROKEE SMALL LETTER DU\r
++ABAB          ; mapped                 ; 13DB          # 8.0  CHEROKEE SMALL LETTER DV\r
++ABAC          ; mapped                 ; 13DC          # 8.0  CHEROKEE SMALL LETTER DLA\r
++ABAD          ; mapped                 ; 13DD          # 8.0  CHEROKEE SMALL LETTER TLA\r
++ABAE          ; mapped                 ; 13DE          # 8.0  CHEROKEE SMALL LETTER TLE\r
++ABAF          ; mapped                 ; 13DF          # 8.0  CHEROKEE SMALL LETTER TLI\r
++ABB0          ; mapped                 ; 13E0          # 8.0  CHEROKEE SMALL LETTER TLO\r
++ABB1          ; mapped                 ; 13E1          # 8.0  CHEROKEE SMALL LETTER TLU\r
++ABB2          ; mapped                 ; 13E2          # 8.0  CHEROKEE SMALL LETTER TLV\r
++ABB3          ; mapped                 ; 13E3          # 8.0  CHEROKEE SMALL LETTER TSA\r
++ABB4          ; mapped                 ; 13E4          # 8.0  CHEROKEE SMALL LETTER TSE\r
++ABB5          ; mapped                 ; 13E5          # 8.0  CHEROKEE SMALL LETTER TSI\r
++ABB6          ; mapped                 ; 13E6          # 8.0  CHEROKEE SMALL LETTER TSO\r
++ABB7          ; mapped                 ; 13E7          # 8.0  CHEROKEE SMALL LETTER TSU\r
++ABB8          ; mapped                 ; 13E8          # 8.0  CHEROKEE SMALL LETTER TSV\r
++ABB9          ; mapped                 ; 13E9          # 8.0  CHEROKEE SMALL LETTER WA\r
++ABBA          ; mapped                 ; 13EA          # 8.0  CHEROKEE SMALL LETTER WE\r
++ABBB          ; mapped                 ; 13EB          # 8.0  CHEROKEE SMALL LETTER WI\r
++ABBC          ; mapped                 ; 13EC          # 8.0  CHEROKEE SMALL LETTER WO\r
++ABBD          ; mapped                 ; 13ED          # 8.0  CHEROKEE SMALL LETTER WU\r
++ABBE          ; mapped                 ; 13EE          # 8.0  CHEROKEE SMALL LETTER WV\r
++ABBF          ; mapped                 ; 13EF          # 8.0  CHEROKEE SMALL LETTER YA\r
++ABC0..ABEA    ; valid                                  # 5.2  MEETEI MAYEK LETTER KOK..MEETEI MAYEK VOWEL SIGN NUNG\r
++ABEB          ; valid                  ;      ; NV8    # 5.2  MEETEI MAYEK CHEIKHEI\r
++ABEC..ABED    ; valid                                  # 5.2  MEETEI MAYEK LUM IYEK..MEETEI MAYEK APUN IYEK\r
++ABEE..ABEF    ; disallowed                             # NA   <reserved-ABEE>..<reserved-ABEF>\r
++ABF0..ABF9    ; valid                                  # 5.2  MEETEI MAYEK DIGIT ZERO..MEETEI MAYEK DIGIT NINE\r
++ABFA..ABFF    ; disallowed                             # NA   <reserved-ABFA>..<reserved-ABFF>\r
++AC00..D7A3    ; valid                                  # 2.0  HANGUL SYLLABLE GA..HANGUL SYLLABLE HIH\r
++D7A4..D7AF    ; disallowed                             # NA   <reserved-D7A4>..<reserved-D7AF>\r
++D7B0..D7C6    ; valid                  ;      ; NV8    # 5.2  HANGUL JUNGSEONG O-YEO..HANGUL JUNGSEONG ARAEA-E\r
++D7C7..D7CA    ; disallowed                             # NA   <reserved-D7C7>..<reserved-D7CA>\r
++D7CB..D7FB    ; valid                  ;      ; NV8    # 5.2  HANGUL JONGSEONG NIEUN-RIEUL..HANGUL JONGSEONG PHIEUPH-THIEUTH\r
++D7FC..D7FF    ; disallowed                             # NA   <reserved-D7FC>..<reserved-D7FF>\r
++D800..DFFF    ; disallowed                             # 2.0  <surrogate-D800>..<surrogate-DFFF>\r
++E000..F8FF    ; disallowed                             # 1.1  <private-use-E000>..<private-use-F8FF>\r
++F900          ; mapped                 ; 8C48          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F900\r
++F901          ; mapped                 ; 66F4          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F901\r
++F902          ; mapped                 ; 8ECA          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F902\r
++F903          ; mapped                 ; 8CC8          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F903\r
++F904          ; mapped                 ; 6ED1          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F904\r
++F905          ; mapped                 ; 4E32          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F905\r
++F906          ; mapped                 ; 53E5          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F906\r
++F907..F908    ; mapped                 ; 9F9C          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F907..CJK COMPATIBILITY IDEOGRAPH-F908\r
++F909          ; mapped                 ; 5951          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F909\r
++F90A          ; mapped                 ; 91D1          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F90A\r
++F90B          ; mapped                 ; 5587          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F90B\r
++F90C          ; mapped                 ; 5948          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F90C\r
++F90D          ; mapped                 ; 61F6          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F90D\r
++F90E          ; mapped                 ; 7669          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F90E\r
++F90F          ; mapped                 ; 7F85          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F90F\r
++F910          ; mapped                 ; 863F          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F910\r
++F911          ; mapped                 ; 87BA          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F911\r
++F912          ; mapped                 ; 88F8          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F912\r
++F913          ; mapped                 ; 908F          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F913\r
++F914          ; mapped                 ; 6A02          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F914\r
++F915          ; mapped                 ; 6D1B          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F915\r
++F916          ; mapped                 ; 70D9          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F916\r
++F917          ; mapped                 ; 73DE          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F917\r
++F918          ; mapped                 ; 843D          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F918\r
++F919          ; mapped                 ; 916A          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F919\r
++F91A          ; mapped                 ; 99F1          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F91A\r
++F91B          ; mapped                 ; 4E82          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F91B\r
++F91C          ; mapped                 ; 5375          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F91C\r
++F91D          ; mapped                 ; 6B04          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F91D\r
++F91E          ; mapped                 ; 721B          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F91E\r
++F91F          ; mapped                 ; 862D          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F91F\r
++F920          ; mapped                 ; 9E1E          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F920\r
++F921          ; mapped                 ; 5D50          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F921\r
++F922          ; mapped                 ; 6FEB          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F922\r
++F923          ; mapped                 ; 85CD          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F923\r
++F924          ; mapped                 ; 8964          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F924\r
++F925          ; mapped                 ; 62C9          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F925\r
++F926          ; mapped                 ; 81D8          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F926\r
++F927          ; mapped                 ; 881F          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F927\r
++F928          ; mapped                 ; 5ECA          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F928\r
++F929          ; mapped                 ; 6717          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F929\r
++F92A          ; mapped                 ; 6D6A          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F92A\r
++F92B          ; mapped                 ; 72FC          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F92B\r
++F92C          ; mapped                 ; 90CE          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F92C\r
++F92D          ; mapped                 ; 4F86          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F92D\r
++F92E          ; mapped                 ; 51B7          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F92E\r
++F92F          ; mapped                 ; 52DE          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F92F\r
++F930          ; mapped                 ; 64C4          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F930\r
++F931          ; mapped                 ; 6AD3          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F931\r
++F932          ; mapped                 ; 7210          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F932\r
++F933          ; mapped                 ; 76E7          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F933\r
++F934          ; mapped                 ; 8001          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F934\r
++F935          ; mapped                 ; 8606          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F935\r
++F936          ; mapped                 ; 865C          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F936\r
++F937          ; mapped                 ; 8DEF          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F937\r
++F938          ; mapped                 ; 9732          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F938\r
++F939          ; mapped                 ; 9B6F          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F939\r
++F93A          ; mapped                 ; 9DFA          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F93A\r
++F93B          ; mapped                 ; 788C          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F93B\r
++F93C          ; mapped                 ; 797F          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F93C\r
++F93D          ; mapped                 ; 7DA0          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F93D\r
++F93E          ; mapped                 ; 83C9          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F93E\r
++F93F          ; mapped                 ; 9304          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F93F\r
++F940          ; mapped                 ; 9E7F          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F940\r
++F941          ; mapped                 ; 8AD6          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F941\r
++F942          ; mapped                 ; 58DF          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F942\r
++F943          ; mapped                 ; 5F04          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F943\r
++F944          ; mapped                 ; 7C60          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F944\r
++F945          ; mapped                 ; 807E          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F945\r
++F946          ; mapped                 ; 7262          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F946\r
++F947          ; mapped                 ; 78CA          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F947\r
++F948          ; mapped                 ; 8CC2          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F948\r
++F949          ; mapped                 ; 96F7          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F949\r
++F94A          ; mapped                 ; 58D8          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F94A\r
++F94B          ; mapped                 ; 5C62          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F94B\r
++F94C          ; mapped                 ; 6A13          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F94C\r
++F94D          ; mapped                 ; 6DDA          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F94D\r
++F94E          ; mapped                 ; 6F0F          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F94E\r
++F94F          ; mapped                 ; 7D2F          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F94F\r
++F950          ; mapped                 ; 7E37          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F950\r
++F951          ; mapped                 ; 964B          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F951\r
++F952          ; mapped                 ; 52D2          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F952\r
++F953          ; mapped                 ; 808B          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F953\r
++F954          ; mapped                 ; 51DC          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F954\r
++F955          ; mapped                 ; 51CC          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F955\r
++F956          ; mapped                 ; 7A1C          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F956\r
++F957          ; mapped                 ; 7DBE          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F957\r
++F958          ; mapped                 ; 83F1          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F958\r
++F959          ; mapped                 ; 9675          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F959\r
++F95A          ; mapped                 ; 8B80          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F95A\r
++F95B          ; mapped                 ; 62CF          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F95B\r
++F95C          ; mapped                 ; 6A02          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F95C\r
++F95D          ; mapped                 ; 8AFE          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F95D\r
++F95E          ; mapped                 ; 4E39          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F95E\r
++F95F          ; mapped                 ; 5BE7          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F95F\r
++F960          ; mapped                 ; 6012          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F960\r
++F961          ; mapped                 ; 7387          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F961\r
++F962          ; mapped                 ; 7570          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F962\r
++F963          ; mapped                 ; 5317          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F963\r
++F964          ; mapped                 ; 78FB          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F964\r
++F965          ; mapped                 ; 4FBF          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F965\r
++F966          ; mapped                 ; 5FA9          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F966\r
++F967          ; mapped                 ; 4E0D          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F967\r
++F968          ; mapped                 ; 6CCC          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F968\r
++F969          ; mapped                 ; 6578          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F969\r
++F96A          ; mapped                 ; 7D22          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F96A\r
++F96B          ; mapped                 ; 53C3          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F96B\r
++F96C          ; mapped                 ; 585E          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F96C\r
++F96D          ; mapped                 ; 7701          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F96D\r
++F96E          ; mapped                 ; 8449          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F96E\r
++F96F          ; mapped                 ; 8AAA          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F96F\r
++F970          ; mapped                 ; 6BBA          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F970\r
++F971          ; mapped                 ; 8FB0          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F971\r
++F972          ; mapped                 ; 6C88          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F972\r
++F973          ; mapped                 ; 62FE          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F973\r
++F974          ; mapped                 ; 82E5          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F974\r
++F975          ; mapped                 ; 63A0          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F975\r
++F976          ; mapped                 ; 7565          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F976\r
++F977          ; mapped                 ; 4EAE          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F977\r
++F978          ; mapped                 ; 5169          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F978\r
++F979          ; mapped                 ; 51C9          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F979\r
++F97A          ; mapped                 ; 6881          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F97A\r
++F97B          ; mapped                 ; 7CE7          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F97B\r
++F97C          ; mapped                 ; 826F          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F97C\r
++F97D          ; mapped                 ; 8AD2          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F97D\r
++F97E          ; mapped                 ; 91CF          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F97E\r
++F97F          ; mapped                 ; 52F5          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F97F\r
++F980          ; mapped                 ; 5442          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F980\r
++F981          ; mapped                 ; 5973          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F981\r
++F982          ; mapped                 ; 5EEC          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F982\r
++F983          ; mapped                 ; 65C5          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F983\r
++F984          ; mapped                 ; 6FFE          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F984\r
++F985          ; mapped                 ; 792A          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F985\r
++F986          ; mapped                 ; 95AD          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F986\r
++F987          ; mapped                 ; 9A6A          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F987\r
++F988          ; mapped                 ; 9E97          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F988\r
++F989          ; mapped                 ; 9ECE          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F989\r
++F98A          ; mapped                 ; 529B          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F98A\r
++F98B          ; mapped                 ; 66C6          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F98B\r
++F98C          ; mapped                 ; 6B77          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F98C\r
++F98D          ; mapped                 ; 8F62          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F98D\r
++F98E          ; mapped                 ; 5E74          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F98E\r
++F98F          ; mapped                 ; 6190          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F98F\r
++F990          ; mapped                 ; 6200          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F990\r
++F991          ; mapped                 ; 649A          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F991\r
++F992          ; mapped                 ; 6F23          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F992\r
++F993          ; mapped                 ; 7149          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F993\r
++F994          ; mapped                 ; 7489          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F994\r
++F995          ; mapped                 ; 79CA          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F995\r
++F996          ; mapped                 ; 7DF4          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F996\r
++F997          ; mapped                 ; 806F          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F997\r
++F998          ; mapped                 ; 8F26          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F998\r
++F999          ; mapped                 ; 84EE          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F999\r
++F99A          ; mapped                 ; 9023          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F99A\r
++F99B          ; mapped                 ; 934A          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F99B\r
++F99C          ; mapped                 ; 5217          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F99C\r
++F99D          ; mapped                 ; 52A3          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F99D\r
++F99E          ; mapped                 ; 54BD          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F99E\r
++F99F          ; mapped                 ; 70C8          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F99F\r
++F9A0          ; mapped                 ; 88C2          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9A0\r
++F9A1          ; mapped                 ; 8AAA          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9A1\r
++F9A2          ; mapped                 ; 5EC9          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9A2\r
++F9A3          ; mapped                 ; 5FF5          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9A3\r
++F9A4          ; mapped                 ; 637B          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9A4\r
++F9A5          ; mapped                 ; 6BAE          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9A5\r
++F9A6          ; mapped                 ; 7C3E          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9A6\r
++F9A7          ; mapped                 ; 7375          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9A7\r
++F9A8          ; mapped                 ; 4EE4          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9A8\r
++F9A9          ; mapped                 ; 56F9          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9A9\r
++F9AA          ; mapped                 ; 5BE7          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9AA\r
++F9AB          ; mapped                 ; 5DBA          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9AB\r
++F9AC          ; mapped                 ; 601C          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9AC\r
++F9AD          ; mapped                 ; 73B2          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9AD\r
++F9AE          ; mapped                 ; 7469          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9AE\r
++F9AF          ; mapped                 ; 7F9A          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9AF\r
++F9B0          ; mapped                 ; 8046          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9B0\r
++F9B1          ; mapped                 ; 9234          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9B1\r
++F9B2          ; mapped                 ; 96F6          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9B2\r
++F9B3          ; mapped                 ; 9748          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9B3\r
++F9B4          ; mapped                 ; 9818          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9B4\r
++F9B5          ; mapped                 ; 4F8B          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9B5\r
++F9B6          ; mapped                 ; 79AE          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9B6\r
++F9B7          ; mapped                 ; 91B4          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9B7\r
++F9B8          ; mapped                 ; 96B8          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9B8\r
++F9B9          ; mapped                 ; 60E1          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9B9\r
++F9BA          ; mapped                 ; 4E86          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9BA\r
++F9BB          ; mapped                 ; 50DA          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9BB\r
++F9BC          ; mapped                 ; 5BEE          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9BC\r
++F9BD          ; mapped                 ; 5C3F          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9BD\r
++F9BE          ; mapped                 ; 6599          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9BE\r
++F9BF          ; mapped                 ; 6A02          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9BF\r
++F9C0          ; mapped                 ; 71CE          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9C0\r
++F9C1          ; mapped                 ; 7642          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9C1\r
++F9C2          ; mapped                 ; 84FC          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9C2\r
++F9C3          ; mapped                 ; 907C          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9C3\r
++F9C4          ; mapped                 ; 9F8D          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9C4\r
++F9C5          ; mapped                 ; 6688          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9C5\r
++F9C6          ; mapped                 ; 962E          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9C6\r
++F9C7          ; mapped                 ; 5289          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9C7\r
++F9C8          ; mapped                 ; 677B          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9C8\r
++F9C9          ; mapped                 ; 67F3          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9C9\r
++F9CA          ; mapped                 ; 6D41          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9CA\r
++F9CB          ; mapped                 ; 6E9C          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9CB\r
++F9CC          ; mapped                 ; 7409          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9CC\r
++F9CD          ; mapped                 ; 7559          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9CD\r
++F9CE          ; mapped                 ; 786B          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9CE\r
++F9CF          ; mapped                 ; 7D10          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9CF\r
++F9D0          ; mapped                 ; 985E          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9D0\r
++F9D1          ; mapped                 ; 516D          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9D1\r
++F9D2          ; mapped                 ; 622E          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9D2\r
++F9D3          ; mapped                 ; 9678          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9D3\r
++F9D4          ; mapped                 ; 502B          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9D4\r
++F9D5          ; mapped                 ; 5D19          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9D5\r
++F9D6          ; mapped                 ; 6DEA          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9D6\r
++F9D7          ; mapped                 ; 8F2A          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9D7\r
++F9D8          ; mapped                 ; 5F8B          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9D8\r
++F9D9          ; mapped                 ; 6144          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9D9\r
++F9DA          ; mapped                 ; 6817          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9DA\r
++F9DB          ; mapped                 ; 7387          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9DB\r
++F9DC          ; mapped                 ; 9686          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9DC\r
++F9DD          ; mapped                 ; 5229          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9DD\r
++F9DE          ; mapped                 ; 540F          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9DE\r
++F9DF          ; mapped                 ; 5C65          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9DF\r
++F9E0          ; mapped                 ; 6613          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9E0\r
++F9E1          ; mapped                 ; 674E          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9E1\r
++F9E2          ; mapped                 ; 68A8          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9E2\r
++F9E3          ; mapped                 ; 6CE5          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9E3\r
++F9E4          ; mapped                 ; 7406          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9E4\r
++F9E5          ; mapped                 ; 75E2          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9E5\r
++F9E6          ; mapped                 ; 7F79          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9E6\r
++F9E7          ; mapped                 ; 88CF          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9E7\r
++F9E8          ; mapped                 ; 88E1          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9E8\r
++F9E9          ; mapped                 ; 91CC          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9E9\r
++F9EA          ; mapped                 ; 96E2          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9EA\r
++F9EB          ; mapped                 ; 533F          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9EB\r
++F9EC          ; mapped                 ; 6EBA          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9EC\r
++F9ED          ; mapped                 ; 541D          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9ED\r
++F9EE          ; mapped                 ; 71D0          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9EE\r
++F9EF          ; mapped                 ; 7498          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9EF\r
++F9F0          ; mapped                 ; 85FA          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9F0\r
++F9F1          ; mapped                 ; 96A3          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9F1\r
++F9F2          ; mapped                 ; 9C57          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9F2\r
++F9F3          ; mapped                 ; 9E9F          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9F3\r
++F9F4          ; mapped                 ; 6797          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9F4\r
++F9F5          ; mapped                 ; 6DCB          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9F5\r
++F9F6          ; mapped                 ; 81E8          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9F6\r
++F9F7          ; mapped                 ; 7ACB          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9F7\r
++F9F8          ; mapped                 ; 7B20          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9F8\r
++F9F9          ; mapped                 ; 7C92          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9F9\r
++F9FA          ; mapped                 ; 72C0          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9FA\r
++F9FB          ; mapped                 ; 7099          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9FB\r
++F9FC          ; mapped                 ; 8B58          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9FC\r
++F9FD          ; mapped                 ; 4EC0          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9FD\r
++F9FE          ; mapped                 ; 8336          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9FE\r
++F9FF          ; mapped                 ; 523A          # 1.1  CJK COMPATIBILITY IDEOGRAPH-F9FF\r
++FA00          ; mapped                 ; 5207          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA00\r
++FA01          ; mapped                 ; 5EA6          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA01\r
++FA02          ; mapped                 ; 62D3          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA02\r
++FA03          ; mapped                 ; 7CD6          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA03\r
++FA04          ; mapped                 ; 5B85          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA04\r
++FA05          ; mapped                 ; 6D1E          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA05\r
++FA06          ; mapped                 ; 66B4          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA06\r
++FA07          ; mapped                 ; 8F3B          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA07\r
++FA08          ; mapped                 ; 884C          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA08\r
++FA09          ; mapped                 ; 964D          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA09\r
++FA0A          ; mapped                 ; 898B          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA0A\r
++FA0B          ; mapped                 ; 5ED3          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA0B\r
++FA0C          ; mapped                 ; 5140          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA0C\r
++FA0D          ; mapped                 ; 55C0          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA0D\r
++FA0E..FA0F    ; valid                                  # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA0E..CJK COMPATIBILITY IDEOGRAPH-FA0F\r
++FA10          ; mapped                 ; 585A          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA10\r
++FA11          ; valid                                  # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA11\r
++FA12          ; mapped                 ; 6674          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA12\r
++FA13..FA14    ; valid                                  # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA13..CJK COMPATIBILITY IDEOGRAPH-FA14\r
++FA15          ; mapped                 ; 51DE          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA15\r
++FA16          ; mapped                 ; 732A          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA16\r
++FA17          ; mapped                 ; 76CA          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA17\r
++FA18          ; mapped                 ; 793C          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA18\r
++FA19          ; mapped                 ; 795E          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA19\r
++FA1A          ; mapped                 ; 7965          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA1A\r
++FA1B          ; mapped                 ; 798F          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA1B\r
++FA1C          ; mapped                 ; 9756          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA1C\r
++FA1D          ; mapped                 ; 7CBE          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA1D\r
++FA1E          ; mapped                 ; 7FBD          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA1E\r
++FA1F          ; valid                                  # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA1F\r
++FA20          ; mapped                 ; 8612          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA20\r
++FA21          ; valid                                  # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA21\r
++FA22          ; mapped                 ; 8AF8          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA22\r
++FA23..FA24    ; valid                                  # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA23..CJK COMPATIBILITY IDEOGRAPH-FA24\r
++FA25          ; mapped                 ; 9038          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA25\r
++FA26          ; mapped                 ; 90FD          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA26\r
++FA27..FA29    ; valid                                  # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA27..CJK COMPATIBILITY IDEOGRAPH-FA29\r
++FA2A          ; mapped                 ; 98EF          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA2A\r
++FA2B          ; mapped                 ; 98FC          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA2B\r
++FA2C          ; mapped                 ; 9928          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA2C\r
++FA2D          ; mapped                 ; 9DB4          # 1.1  CJK COMPATIBILITY IDEOGRAPH-FA2D\r
++FA2E          ; mapped                 ; 90DE          # 6.1  CJK COMPATIBILITY IDEOGRAPH-FA2E\r
++FA2F          ; mapped                 ; 96B7          # 6.1  CJK COMPATIBILITY IDEOGRAPH-FA2F\r
++FA30          ; mapped                 ; 4FAE          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA30\r
++FA31          ; mapped                 ; 50E7          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA31\r
++FA32          ; mapped                 ; 514D          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA32\r
++FA33          ; mapped                 ; 52C9          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA33\r
++FA34          ; mapped                 ; 52E4          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA34\r
++FA35          ; mapped                 ; 5351          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA35\r
++FA36          ; mapped                 ; 559D          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA36\r
++FA37          ; mapped                 ; 5606          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA37\r
++FA38          ; mapped                 ; 5668          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA38\r
++FA39          ; mapped                 ; 5840          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA39\r
++FA3A          ; mapped                 ; 58A8          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA3A\r
++FA3B          ; mapped                 ; 5C64          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA3B\r
++FA3C          ; mapped                 ; 5C6E          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA3C\r
++FA3D          ; mapped                 ; 6094          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA3D\r
++FA3E          ; mapped                 ; 6168          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA3E\r
++FA3F          ; mapped                 ; 618E          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA3F\r
++FA40          ; mapped                 ; 61F2          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA40\r
++FA41          ; mapped                 ; 654F          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA41\r
++FA42          ; mapped                 ; 65E2          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA42\r
++FA43          ; mapped                 ; 6691          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA43\r
++FA44          ; mapped                 ; 6885          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA44\r
++FA45          ; mapped                 ; 6D77          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA45\r
++FA46          ; mapped                 ; 6E1A          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA46\r
++FA47          ; mapped                 ; 6F22          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA47\r
++FA48          ; mapped                 ; 716E          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA48\r
++FA49          ; mapped                 ; 722B          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA49\r
++FA4A          ; mapped                 ; 7422          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA4A\r
++FA4B          ; mapped                 ; 7891          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA4B\r
++FA4C          ; mapped                 ; 793E          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA4C\r
++FA4D          ; mapped                 ; 7949          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA4D\r
++FA4E          ; mapped                 ; 7948          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA4E\r
++FA4F          ; mapped                 ; 7950          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA4F\r
++FA50          ; mapped                 ; 7956          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA50\r
++FA51          ; mapped                 ; 795D          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA51\r
++FA52          ; mapped                 ; 798D          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA52\r
++FA53          ; mapped                 ; 798E          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA53\r
++FA54          ; mapped                 ; 7A40          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA54\r
++FA55          ; mapped                 ; 7A81          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA55\r
++FA56          ; mapped                 ; 7BC0          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA56\r
++FA57          ; mapped                 ; 7DF4          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA57\r
++FA58          ; mapped                 ; 7E09          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA58\r
++FA59          ; mapped                 ; 7E41          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA59\r
++FA5A          ; mapped                 ; 7F72          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA5A\r
++FA5B          ; mapped                 ; 8005          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA5B\r
++FA5C          ; mapped                 ; 81ED          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA5C\r
++FA5D..FA5E    ; mapped                 ; 8279          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA5D..CJK COMPATIBILITY IDEOGRAPH-FA5E\r
++FA5F          ; mapped                 ; 8457          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA5F\r
++FA60          ; mapped                 ; 8910          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA60\r
++FA61          ; mapped                 ; 8996          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA61\r
++FA62          ; mapped                 ; 8B01          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA62\r
++FA63          ; mapped                 ; 8B39          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA63\r
++FA64          ; mapped                 ; 8CD3          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA64\r
++FA65          ; mapped                 ; 8D08          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA65\r
++FA66          ; mapped                 ; 8FB6          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA66\r
++FA67          ; mapped                 ; 9038          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA67\r
++FA68          ; mapped                 ; 96E3          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA68\r
++FA69          ; mapped                 ; 97FF          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA69\r
++FA6A          ; mapped                 ; 983B          # 3.2  CJK COMPATIBILITY IDEOGRAPH-FA6A\r
++FA6B          ; mapped                 ; 6075          # 5.2  CJK COMPATIBILITY IDEOGRAPH-FA6B\r
++FA6C          ; mapped                 ; 242EE         # 5.2  CJK COMPATIBILITY IDEOGRAPH-FA6C\r
++FA6D          ; mapped                 ; 8218          # 5.2  CJK COMPATIBILITY IDEOGRAPH-FA6D\r
++FA6E..FA6F    ; disallowed                             # NA   <reserved-FA6E>..<reserved-FA6F>\r
++FA70          ; mapped                 ; 4E26          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA70\r
++FA71          ; mapped                 ; 51B5          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA71\r
++FA72          ; mapped                 ; 5168          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA72\r
++FA73          ; mapped                 ; 4F80          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA73\r
++FA74          ; mapped                 ; 5145          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA74\r
++FA75          ; mapped                 ; 5180          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA75\r
++FA76          ; mapped                 ; 52C7          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA76\r
++FA77          ; mapped                 ; 52FA          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA77\r
++FA78          ; mapped                 ; 559D          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA78\r
++FA79          ; mapped                 ; 5555          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA79\r
++FA7A          ; mapped                 ; 5599          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA7A\r
++FA7B          ; mapped                 ; 55E2          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA7B\r
++FA7C          ; mapped                 ; 585A          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA7C\r
++FA7D          ; mapped                 ; 58B3          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA7D\r
++FA7E          ; mapped                 ; 5944          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA7E\r
++FA7F          ; mapped                 ; 5954          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA7F\r
++FA80          ; mapped                 ; 5A62          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA80\r
++FA81          ; mapped                 ; 5B28          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA81\r
++FA82          ; mapped                 ; 5ED2          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA82\r
++FA83          ; mapped                 ; 5ED9          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA83\r
++FA84          ; mapped                 ; 5F69          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA84\r
++FA85          ; mapped                 ; 5FAD          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA85\r
++FA86          ; mapped                 ; 60D8          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA86\r
++FA87          ; mapped                 ; 614E          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA87\r
++FA88          ; mapped                 ; 6108          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA88\r
++FA89          ; mapped                 ; 618E          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA89\r
++FA8A          ; mapped                 ; 6160          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA8A\r
++FA8B          ; mapped                 ; 61F2          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA8B\r
++FA8C          ; mapped                 ; 6234          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA8C\r
++FA8D          ; mapped                 ; 63C4          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA8D\r
++FA8E          ; mapped                 ; 641C          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA8E\r
++FA8F          ; mapped                 ; 6452          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA8F\r
++FA90          ; mapped                 ; 6556          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA90\r
++FA91          ; mapped                 ; 6674          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA91\r
++FA92          ; mapped                 ; 6717          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA92\r
++FA93          ; mapped                 ; 671B          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA93\r
++FA94          ; mapped                 ; 6756          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA94\r
++FA95          ; mapped                 ; 6B79          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA95\r
++FA96          ; mapped                 ; 6BBA          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA96\r
++FA97          ; mapped                 ; 6D41          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA97\r
++FA98          ; mapped                 ; 6EDB          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA98\r
++FA99          ; mapped                 ; 6ECB          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA99\r
++FA9A          ; mapped                 ; 6F22          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA9A\r
++FA9B          ; mapped                 ; 701E          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA9B\r
++FA9C          ; mapped                 ; 716E          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA9C\r
++FA9D          ; mapped                 ; 77A7          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA9D\r
++FA9E          ; mapped                 ; 7235          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA9E\r
++FA9F          ; mapped                 ; 72AF          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FA9F\r
++FAA0          ; mapped                 ; 732A          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAA0\r
++FAA1          ; mapped                 ; 7471          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAA1\r
++FAA2          ; mapped                 ; 7506          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAA2\r
++FAA3          ; mapped                 ; 753B          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAA3\r
++FAA4          ; mapped                 ; 761D          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAA4\r
++FAA5          ; mapped                 ; 761F          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAA5\r
++FAA6          ; mapped                 ; 76CA          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAA6\r
++FAA7          ; mapped                 ; 76DB          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAA7\r
++FAA8          ; mapped                 ; 76F4          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAA8\r
++FAA9          ; mapped                 ; 774A          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAA9\r
++FAAA          ; mapped                 ; 7740          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAAA\r
++FAAB          ; mapped                 ; 78CC          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAAB\r
++FAAC          ; mapped                 ; 7AB1          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAAC\r
++FAAD          ; mapped                 ; 7BC0          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAAD\r
++FAAE          ; mapped                 ; 7C7B          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAAE\r
++FAAF          ; mapped                 ; 7D5B          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAAF\r
++FAB0          ; mapped                 ; 7DF4          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAB0\r
++FAB1          ; mapped                 ; 7F3E          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAB1\r
++FAB2          ; mapped                 ; 8005          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAB2\r
++FAB3          ; mapped                 ; 8352          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAB3\r
++FAB4          ; mapped                 ; 83EF          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAB4\r
++FAB5          ; mapped                 ; 8779          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAB5\r
++FAB6          ; mapped                 ; 8941          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAB6\r
++FAB7          ; mapped                 ; 8986          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAB7\r
++FAB8          ; mapped                 ; 8996          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAB8\r
++FAB9          ; mapped                 ; 8ABF          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAB9\r
++FABA          ; mapped                 ; 8AF8          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FABA\r
++FABB          ; mapped                 ; 8ACB          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FABB\r
++FABC          ; mapped                 ; 8B01          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FABC\r
++FABD          ; mapped                 ; 8AFE          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FABD\r
++FABE          ; mapped                 ; 8AED          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FABE\r
++FABF          ; mapped                 ; 8B39          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FABF\r
++FAC0          ; mapped                 ; 8B8A          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAC0\r
++FAC1          ; mapped                 ; 8D08          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAC1\r
++FAC2          ; mapped                 ; 8F38          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAC2\r
++FAC3          ; mapped                 ; 9072          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAC3\r
++FAC4          ; mapped                 ; 9199          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAC4\r
++FAC5          ; mapped                 ; 9276          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAC5\r
++FAC6          ; mapped                 ; 967C          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAC6\r
++FAC7          ; mapped                 ; 96E3          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAC7\r
++FAC8          ; mapped                 ; 9756          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAC8\r
++FAC9          ; mapped                 ; 97DB          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAC9\r
++FACA          ; mapped                 ; 97FF          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FACA\r
++FACB          ; mapped                 ; 980B          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FACB\r
++FACC          ; mapped                 ; 983B          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FACC\r
++FACD          ; mapped                 ; 9B12          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FACD\r
++FACE          ; mapped                 ; 9F9C          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FACE\r
++FACF          ; mapped                 ; 2284A         # 4.1  CJK COMPATIBILITY IDEOGRAPH-FACF\r
++FAD0          ; mapped                 ; 22844         # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAD0\r
++FAD1          ; mapped                 ; 233D5         # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAD1\r
++FAD2          ; mapped                 ; 3B9D          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAD2\r
++FAD3          ; mapped                 ; 4018          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAD3\r
++FAD4          ; mapped                 ; 4039          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAD4\r
++FAD5          ; mapped                 ; 25249         # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAD5\r
++FAD6          ; mapped                 ; 25CD0         # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAD6\r
++FAD7          ; mapped                 ; 27ED3         # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAD7\r
++FAD8          ; mapped                 ; 9F43          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAD8\r
++FAD9          ; mapped                 ; 9F8E          # 4.1  CJK COMPATIBILITY IDEOGRAPH-FAD9\r
++FADA..FAFF    ; disallowed                             # NA   <reserved-FADA>..<reserved-FAFF>\r
++FB00          ; mapped                 ; 0066 0066     # 1.1  LATIN SMALL LIGATURE FF\r
++FB01          ; mapped                 ; 0066 0069     # 1.1  LATIN SMALL LIGATURE FI\r
++FB02          ; mapped                 ; 0066 006C     # 1.1  LATIN SMALL LIGATURE FL\r
++FB03          ; mapped                 ; 0066 0066 0069 #1.1  LATIN SMALL LIGATURE FFI\r
++FB04          ; mapped                 ; 0066 0066 006C #1.1  LATIN SMALL LIGATURE FFL\r
++FB05..FB06    ; mapped                 ; 0073 0074     # 1.1  LATIN SMALL LIGATURE LONG S T..LATIN SMALL LIGATURE ST\r
++FB07..FB12    ; disallowed                             # NA   <reserved-FB07>..<reserved-FB12>\r
++FB13          ; mapped                 ; 0574 0576     # 1.1  ARMENIAN SMALL LIGATURE MEN NOW\r
++FB14          ; mapped                 ; 0574 0565     # 1.1  ARMENIAN SMALL LIGATURE MEN ECH\r
++FB15          ; mapped                 ; 0574 056B     # 1.1  ARMENIAN SMALL LIGATURE MEN INI\r
++FB16          ; mapped                 ; 057E 0576     # 1.1  ARMENIAN SMALL LIGATURE VEW NOW\r
++FB17          ; mapped                 ; 0574 056D     # 1.1  ARMENIAN SMALL LIGATURE MEN XEH\r
++FB18..FB1C    ; disallowed                             # NA   <reserved-FB18>..<reserved-FB1C>\r
++FB1D          ; mapped                 ; 05D9 05B4     # 3.0  HEBREW LETTER YOD WITH HIRIQ\r
++FB1E          ; valid                                  # 1.1  HEBREW POINT JUDEO-SPANISH VARIKA\r
++FB1F          ; mapped                 ; 05F2 05B7     # 1.1  HEBREW LIGATURE YIDDISH YOD YOD PATAH\r
++FB20          ; mapped                 ; 05E2          # 1.1  HEBREW LETTER ALTERNATIVE AYIN\r
++FB21          ; mapped                 ; 05D0          # 1.1  HEBREW LETTER WIDE ALEF\r
++FB22          ; mapped                 ; 05D3          # 1.1  HEBREW LETTER WIDE DALET\r
++FB23          ; mapped                 ; 05D4          # 1.1  HEBREW LETTER WIDE HE\r
++FB24          ; mapped                 ; 05DB          # 1.1  HEBREW LETTER WIDE KAF\r
++FB25          ; mapped                 ; 05DC          # 1.1  HEBREW LETTER WIDE LAMED\r
++FB26          ; mapped                 ; 05DD          # 1.1  HEBREW LETTER WIDE FINAL MEM\r
++FB27          ; mapped                 ; 05E8          # 1.1  HEBREW LETTER WIDE RESH\r
++FB28          ; mapped                 ; 05EA          # 1.1  HEBREW LETTER WIDE TAV\r
++FB29          ; disallowed_STD3_mapped ; 002B          # 1.1  HEBREW LETTER ALTERNATIVE PLUS SIGN\r
++FB2A          ; mapped                 ; 05E9 05C1     # 1.1  HEBREW LETTER SHIN WITH SHIN DOT\r
++FB2B          ; mapped                 ; 05E9 05C2     # 1.1  HEBREW LETTER SHIN WITH SIN DOT\r
++FB2C          ; mapped                 ; 05E9 05BC 05C1 #1.1  HEBREW LETTER SHIN WITH DAGESH AND SHIN DOT\r
++FB2D          ; mapped                 ; 05E9 05BC 05C2 #1.1  HEBREW LETTER SHIN WITH DAGESH AND SIN DOT\r
++FB2E          ; mapped                 ; 05D0 05B7     # 1.1  HEBREW LETTER ALEF WITH PATAH\r
++FB2F          ; mapped                 ; 05D0 05B8     # 1.1  HEBREW LETTER ALEF WITH QAMATS\r
++FB30          ; mapped                 ; 05D0 05BC     # 1.1  HEBREW LETTER ALEF WITH MAPIQ\r
++FB31          ; mapped                 ; 05D1 05BC     # 1.1  HEBREW LETTER BET WITH DAGESH\r
++FB32          ; mapped                 ; 05D2 05BC     # 1.1  HEBREW LETTER GIMEL WITH DAGESH\r
++FB33          ; mapped                 ; 05D3 05BC     # 1.1  HEBREW LETTER DALET WITH DAGESH\r
++FB34          ; mapped                 ; 05D4 05BC     # 1.1  HEBREW LETTER HE WITH MAPIQ\r
++FB35          ; mapped                 ; 05D5 05BC     # 1.1  HEBREW LETTER VAV WITH DAGESH\r
++FB36          ; mapped                 ; 05D6 05BC     # 1.1  HEBREW LETTER ZAYIN WITH DAGESH\r
++FB37          ; disallowed                             # NA   <reserved-FB37>\r
++FB38          ; mapped                 ; 05D8 05BC     # 1.1  HEBREW LETTER TET WITH DAGESH\r
++FB39          ; mapped                 ; 05D9 05BC     # 1.1  HEBREW LETTER YOD WITH DAGESH\r
++FB3A          ; mapped                 ; 05DA 05BC     # 1.1  HEBREW LETTER FINAL KAF WITH DAGESH\r
++FB3B          ; mapped                 ; 05DB 05BC     # 1.1  HEBREW LETTER KAF WITH DAGESH\r
++FB3C          ; mapped                 ; 05DC 05BC     # 1.1  HEBREW LETTER LAMED WITH DAGESH\r
++FB3D          ; disallowed                             # NA   <reserved-FB3D>\r
++FB3E          ; mapped                 ; 05DE 05BC     # 1.1  HEBREW LETTER MEM WITH DAGESH\r
++FB3F          ; disallowed                             # NA   <reserved-FB3F>\r
++FB40          ; mapped                 ; 05E0 05BC     # 1.1  HEBREW LETTER NUN WITH DAGESH\r
++FB41          ; mapped                 ; 05E1 05BC     # 1.1  HEBREW LETTER SAMEKH WITH DAGESH\r
++FB42          ; disallowed                             # NA   <reserved-FB42>\r
++FB43          ; mapped                 ; 05E3 05BC     # 1.1  HEBREW LETTER FINAL PE WITH DAGESH\r
++FB44          ; mapped                 ; 05E4 05BC     # 1.1  HEBREW LETTER PE WITH DAGESH\r
++FB45          ; disallowed                             # NA   <reserved-FB45>\r
++FB46          ; mapped                 ; 05E6 05BC     # 1.1  HEBREW LETTER TSADI WITH DAGESH\r
++FB47          ; mapped                 ; 05E7 05BC     # 1.1  HEBREW LETTER QOF WITH DAGESH\r
++FB48          ; mapped                 ; 05E8 05BC     # 1.1  HEBREW LETTER RESH WITH DAGESH\r
++FB49          ; mapped                 ; 05E9 05BC     # 1.1  HEBREW LETTER SHIN WITH DAGESH\r
++FB4A          ; mapped                 ; 05EA 05BC     # 1.1  HEBREW LETTER TAV WITH DAGESH\r
++FB4B          ; mapped                 ; 05D5 05B9     # 1.1  HEBREW LETTER VAV WITH HOLAM\r
++FB4C          ; mapped                 ; 05D1 05BF     # 1.1  HEBREW LETTER BET WITH RAFE\r
++FB4D          ; mapped                 ; 05DB 05BF     # 1.1  HEBREW LETTER KAF WITH RAFE\r
++FB4E          ; mapped                 ; 05E4 05BF     # 1.1  HEBREW LETTER PE WITH RAFE\r
++FB4F          ; mapped                 ; 05D0 05DC     # 1.1  HEBREW LIGATURE ALEF LAMED\r
++FB50..FB51    ; mapped                 ; 0671          # 1.1  ARABIC LETTER ALEF WASLA ISOLATED FORM..ARABIC LETTER ALEF WASLA FINAL FORM\r
++FB52..FB55    ; mapped                 ; 067B          # 1.1  ARABIC LETTER BEEH ISOLATED FORM..ARABIC LETTER BEEH MEDIAL FORM\r
++FB56..FB59    ; mapped                 ; 067E          # 1.1  ARABIC LETTER PEH ISOLATED FORM..ARABIC LETTER PEH MEDIAL FORM\r
++FB5A..FB5D    ; mapped                 ; 0680          # 1.1  ARABIC LETTER BEHEH ISOLATED FORM..ARABIC LETTER BEHEH MEDIAL FORM\r
++FB5E..FB61    ; mapped                 ; 067A          # 1.1  ARABIC LETTER TTEHEH ISOLATED FORM..ARABIC LETTER TTEHEH MEDIAL FORM\r
++FB62..FB65    ; mapped                 ; 067F          # 1.1  ARABIC LETTER TEHEH ISOLATED FORM..ARABIC LETTER TEHEH MEDIAL FORM\r
++FB66..FB69    ; mapped                 ; 0679          # 1.1  ARABIC LETTER TTEH ISOLATED FORM..ARABIC LETTER TTEH MEDIAL FORM\r
++FB6A..FB6D    ; mapped                 ; 06A4          # 1.1  ARABIC LETTER VEH ISOLATED FORM..ARABIC LETTER VEH MEDIAL FORM\r
++FB6E..FB71    ; mapped                 ; 06A6          # 1.1  ARABIC LETTER PEHEH ISOLATED FORM..ARABIC LETTER PEHEH MEDIAL FORM\r
++FB72..FB75    ; mapped                 ; 0684          # 1.1  ARABIC LETTER DYEH ISOLATED FORM..ARABIC LETTER DYEH MEDIAL FORM\r
++FB76..FB79    ; mapped                 ; 0683          # 1.1  ARABIC LETTER NYEH ISOLATED FORM..ARABIC LETTER NYEH MEDIAL FORM\r
++FB7A..FB7D    ; mapped                 ; 0686          # 1.1  ARABIC LETTER TCHEH ISOLATED FORM..ARABIC LETTER TCHEH MEDIAL FORM\r
++FB7E..FB81    ; mapped                 ; 0687          # 1.1  ARABIC LETTER TCHEHEH ISOLATED FORM..ARABIC LETTER TCHEHEH MEDIAL FORM\r
++FB82..FB83    ; mapped                 ; 068D          # 1.1  ARABIC LETTER DDAHAL ISOLATED FORM..ARABIC LETTER DDAHAL FINAL FORM\r
++FB84..FB85    ; mapped                 ; 068C          # 1.1  ARABIC LETTER DAHAL ISOLATED FORM..ARABIC LETTER DAHAL FINAL FORM\r
++FB86..FB87    ; mapped                 ; 068E          # 1.1  ARABIC LETTER DUL ISOLATED FORM..ARABIC LETTER DUL FINAL FORM\r
++FB88..FB89    ; mapped                 ; 0688          # 1.1  ARABIC LETTER DDAL ISOLATED FORM..ARABIC LETTER DDAL FINAL FORM\r
++FB8A..FB8B    ; mapped                 ; 0698          # 1.1  ARABIC LETTER JEH ISOLATED FORM..ARABIC LETTER JEH FINAL FORM\r
++FB8C..FB8D    ; mapped                 ; 0691          # 1.1  ARABIC LETTER RREH ISOLATED FORM..ARABIC LETTER RREH FINAL FORM\r
++FB8E..FB91    ; mapped                 ; 06A9          # 1.1  ARABIC LETTER KEHEH ISOLATED FORM..ARABIC LETTER KEHEH MEDIAL FORM\r
++FB92..FB95    ; mapped                 ; 06AF          # 1.1  ARABIC LETTER GAF ISOLATED FORM..ARABIC LETTER GAF MEDIAL FORM\r
++FB96..FB99    ; mapped                 ; 06B3          # 1.1  ARABIC LETTER GUEH ISOLATED FORM..ARABIC LETTER GUEH MEDIAL FORM\r
++FB9A..FB9D    ; mapped                 ; 06B1          # 1.1  ARABIC LETTER NGOEH ISOLATED FORM..ARABIC LETTER NGOEH MEDIAL FORM\r
++FB9E..FB9F    ; mapped                 ; 06BA          # 1.1  ARABIC LETTER NOON GHUNNA ISOLATED FORM..ARABIC LETTER NOON GHUNNA FINAL FORM\r
++FBA0..FBA3    ; mapped                 ; 06BB          # 1.1  ARABIC LETTER RNOON ISOLATED FORM..ARABIC LETTER RNOON MEDIAL FORM\r
++FBA4..FBA5    ; mapped                 ; 06C0          # 1.1  ARABIC LETTER HEH WITH YEH ABOVE ISOLATED FORM..ARABIC LETTER HEH WITH YEH ABOVE FINAL FORM\r
++FBA6..FBA9    ; mapped                 ; 06C1          # 1.1  ARABIC LETTER HEH GOAL ISOLATED FORM..ARABIC LETTER HEH GOAL MEDIAL FORM\r
++FBAA..FBAD    ; mapped                 ; 06BE          # 1.1  ARABIC LETTER HEH DOACHASHMEE ISOLATED FORM..ARABIC LETTER HEH DOACHASHMEE MEDIAL FORM\r
++FBAE..FBAF    ; mapped                 ; 06D2          # 1.1  ARABIC LETTER YEH BARREE ISOLATED FORM..ARABIC LETTER YEH BARREE FINAL FORM\r
++FBB0..FBB1    ; mapped                 ; 06D3          # 1.1  ARABIC LETTER YEH BARREE WITH HAMZA ABOVE ISOLATED FORM..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM\r
++FBB2..FBC1    ; valid                  ;      ; NV8    # 6.0  ARABIC SYMBOL DOT ABOVE..ARABIC SYMBOL SMALL TAH BELOW\r
++FBC2..FBD2    ; disallowed                             # NA   <reserved-FBC2>..<reserved-FBD2>\r
++FBD3..FBD6    ; mapped                 ; 06AD          # 1.1  ARABIC LETTER NG ISOLATED FORM..ARABIC LETTER NG MEDIAL FORM\r
++FBD7..FBD8    ; mapped                 ; 06C7          # 1.1  ARABIC LETTER U ISOLATED FORM..ARABIC LETTER U FINAL FORM\r
++FBD9..FBDA    ; mapped                 ; 06C6          # 1.1  ARABIC LETTER OE ISOLATED FORM..ARABIC LETTER OE FINAL FORM\r
++FBDB..FBDC    ; mapped                 ; 06C8          # 1.1  ARABIC LETTER YU ISOLATED FORM..ARABIC LETTER YU FINAL FORM\r
++FBDD          ; mapped                 ; 06C7 0674     # 1.1  ARABIC LETTER U WITH HAMZA ABOVE ISOLATED FORM\r
++FBDE..FBDF    ; mapped                 ; 06CB          # 1.1  ARABIC LETTER VE ISOLATED FORM..ARABIC LETTER VE FINAL FORM\r
++FBE0..FBE1    ; mapped                 ; 06C5          # 1.1  ARABIC LETTER KIRGHIZ OE ISOLATED FORM..ARABIC LETTER KIRGHIZ OE FINAL FORM\r
++FBE2..FBE3    ; mapped                 ; 06C9          # 1.1  ARABIC LETTER KIRGHIZ YU ISOLATED FORM..ARABIC LETTER KIRGHIZ YU FINAL FORM\r
++FBE4..FBE7    ; mapped                 ; 06D0          # 1.1  ARABIC LETTER E ISOLATED FORM..ARABIC LETTER E MEDIAL FORM\r
++FBE8..FBE9    ; mapped                 ; 0649          # 1.1  ARABIC LETTER UIGHUR KAZAKH KIRGHIZ ALEF MAKSURA INITIAL FORM..ARABIC LETTER UIGHUR KAZAKH KIRGHIZ ALEF MAKSURA MEDIAL FORM\r
++FBEA..FBEB    ; mapped                 ; 0626 0627     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM..ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF FINAL FORM\r
++FBEC..FBED    ; mapped                 ; 0626 06D5     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH AE ISOLATED FORM..ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH AE FINAL FORM\r
++FBEE..FBEF    ; mapped                 ; 0626 0648     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH WAW ISOLATED FORM..ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH WAW FINAL FORM\r
++FBF0..FBF1    ; mapped                 ; 0626 06C7     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH U ISOLATED FORM..ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH U FINAL FORM\r
++FBF2..FBF3    ; mapped                 ; 0626 06C6     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH OE ISOLATED FORM..ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH OE FINAL FORM\r
++FBF4..FBF5    ; mapped                 ; 0626 06C8     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YU ISOLATED FORM..ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YU FINAL FORM\r
++FBF6..FBF8    ; mapped                 ; 0626 06D0     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E ISOLATED FORM..ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E INITIAL FORM\r
++FBF9..FBFB    ; mapped                 ; 0626 0649     # 1.1  ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM..ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA INITIAL FORM\r
++FBFC..FBFF    ; mapped                 ; 06CC          # 1.1  ARABIC LETTER FARSI YEH ISOLATED FORM..ARABIC LETTER FARSI YEH MEDIAL FORM\r
++FC00          ; mapped                 ; 0626 062C     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH JEEM ISOLATED FORM\r
++FC01          ; mapped                 ; 0626 062D     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HAH ISOLATED FORM\r
++FC02          ; mapped                 ; 0626 0645     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM ISOLATED FORM\r
++FC03          ; mapped                 ; 0626 0649     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM\r
++FC04          ; mapped                 ; 0626 064A     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YEH ISOLATED FORM\r
++FC05          ; mapped                 ; 0628 062C     # 1.1  ARABIC LIGATURE BEH WITH JEEM ISOLATED FORM\r
++FC06          ; mapped                 ; 0628 062D     # 1.1  ARABIC LIGATURE BEH WITH HAH ISOLATED FORM\r
++FC07          ; mapped                 ; 0628 062E     # 1.1  ARABIC LIGATURE BEH WITH KHAH ISOLATED FORM\r
++FC08          ; mapped                 ; 0628 0645     # 1.1  ARABIC LIGATURE BEH WITH MEEM ISOLATED FORM\r
++FC09          ; mapped                 ; 0628 0649     # 1.1  ARABIC LIGATURE BEH WITH ALEF MAKSURA ISOLATED FORM\r
++FC0A          ; mapped                 ; 0628 064A     # 1.1  ARABIC LIGATURE BEH WITH YEH ISOLATED FORM\r
++FC0B          ; mapped                 ; 062A 062C     # 1.1  ARABIC LIGATURE TEH WITH JEEM ISOLATED FORM\r
++FC0C          ; mapped                 ; 062A 062D     # 1.1  ARABIC LIGATURE TEH WITH HAH ISOLATED FORM\r
++FC0D          ; mapped                 ; 062A 062E     # 1.1  ARABIC LIGATURE TEH WITH KHAH ISOLATED FORM\r
++FC0E          ; mapped                 ; 062A 0645     # 1.1  ARABIC LIGATURE TEH WITH MEEM ISOLATED FORM\r
++FC0F          ; mapped                 ; 062A 0649     # 1.1  ARABIC LIGATURE TEH WITH ALEF MAKSURA ISOLATED FORM\r
++FC10          ; mapped                 ; 062A 064A     # 1.1  ARABIC LIGATURE TEH WITH YEH ISOLATED FORM\r
++FC11          ; mapped                 ; 062B 062C     # 1.1  ARABIC LIGATURE THEH WITH JEEM ISOLATED FORM\r
++FC12          ; mapped                 ; 062B 0645     # 1.1  ARABIC LIGATURE THEH WITH MEEM ISOLATED FORM\r
++FC13          ; mapped                 ; 062B 0649     # 1.1  ARABIC LIGATURE THEH WITH ALEF MAKSURA ISOLATED FORM\r
++FC14          ; mapped                 ; 062B 064A     # 1.1  ARABIC LIGATURE THEH WITH YEH ISOLATED FORM\r
++FC15          ; mapped                 ; 062C 062D     # 1.1  ARABIC LIGATURE JEEM WITH HAH ISOLATED FORM\r
++FC16          ; mapped                 ; 062C 0645     # 1.1  ARABIC LIGATURE JEEM WITH MEEM ISOLATED FORM\r
++FC17          ; mapped                 ; 062D 062C     # 1.1  ARABIC LIGATURE HAH WITH JEEM ISOLATED FORM\r
++FC18          ; mapped                 ; 062D 0645     # 1.1  ARABIC LIGATURE HAH WITH MEEM ISOLATED FORM\r
++FC19          ; mapped                 ; 062E 062C     # 1.1  ARABIC LIGATURE KHAH WITH JEEM ISOLATED FORM\r
++FC1A          ; mapped                 ; 062E 062D     # 1.1  ARABIC LIGATURE KHAH WITH HAH ISOLATED FORM\r
++FC1B          ; mapped                 ; 062E 0645     # 1.1  ARABIC LIGATURE KHAH WITH MEEM ISOLATED FORM\r
++FC1C          ; mapped                 ; 0633 062C     # 1.1  ARABIC LIGATURE SEEN WITH JEEM ISOLATED FORM\r
++FC1D          ; mapped                 ; 0633 062D     # 1.1  ARABIC LIGATURE SEEN WITH HAH ISOLATED FORM\r
++FC1E          ; mapped                 ; 0633 062E     # 1.1  ARABIC LIGATURE SEEN WITH KHAH ISOLATED FORM\r
++FC1F          ; mapped                 ; 0633 0645     # 1.1  ARABIC LIGATURE SEEN WITH MEEM ISOLATED FORM\r
++FC20          ; mapped                 ; 0635 062D     # 1.1  ARABIC LIGATURE SAD WITH HAH ISOLATED FORM\r
++FC21          ; mapped                 ; 0635 0645     # 1.1  ARABIC LIGATURE SAD WITH MEEM ISOLATED FORM\r
++FC22          ; mapped                 ; 0636 062C     # 1.1  ARABIC LIGATURE DAD WITH JEEM ISOLATED FORM\r
++FC23          ; mapped                 ; 0636 062D     # 1.1  ARABIC LIGATURE DAD WITH HAH ISOLATED FORM\r
++FC24          ; mapped                 ; 0636 062E     # 1.1  ARABIC LIGATURE DAD WITH KHAH ISOLATED FORM\r
++FC25          ; mapped                 ; 0636 0645     # 1.1  ARABIC LIGATURE DAD WITH MEEM ISOLATED FORM\r
++FC26          ; mapped                 ; 0637 062D     # 1.1  ARABIC LIGATURE TAH WITH HAH ISOLATED FORM\r
++FC27          ; mapped                 ; 0637 0645     # 1.1  ARABIC LIGATURE TAH WITH MEEM ISOLATED FORM\r
++FC28          ; mapped                 ; 0638 0645     # 1.1  ARABIC LIGATURE ZAH WITH MEEM ISOLATED FORM\r
++FC29          ; mapped                 ; 0639 062C     # 1.1  ARABIC LIGATURE AIN WITH JEEM ISOLATED FORM\r
++FC2A          ; mapped                 ; 0639 0645     # 1.1  ARABIC LIGATURE AIN WITH MEEM ISOLATED FORM\r
++FC2B          ; mapped                 ; 063A 062C     # 1.1  ARABIC LIGATURE GHAIN WITH JEEM ISOLATED FORM\r
++FC2C          ; mapped                 ; 063A 0645     # 1.1  ARABIC LIGATURE GHAIN WITH MEEM ISOLATED FORM\r
++FC2D          ; mapped                 ; 0641 062C     # 1.1  ARABIC LIGATURE FEH WITH JEEM ISOLATED FORM\r
++FC2E          ; mapped                 ; 0641 062D     # 1.1  ARABIC LIGATURE FEH WITH HAH ISOLATED FORM\r
++FC2F          ; mapped                 ; 0641 062E     # 1.1  ARABIC LIGATURE FEH WITH KHAH ISOLATED FORM\r
++FC30          ; mapped                 ; 0641 0645     # 1.1  ARABIC LIGATURE FEH WITH MEEM ISOLATED FORM\r
++FC31          ; mapped                 ; 0641 0649     # 1.1  ARABIC LIGATURE FEH WITH ALEF MAKSURA ISOLATED FORM\r
++FC32          ; mapped                 ; 0641 064A     # 1.1  ARABIC LIGATURE FEH WITH YEH ISOLATED FORM\r
++FC33          ; mapped                 ; 0642 062D     # 1.1  ARABIC LIGATURE QAF WITH HAH ISOLATED FORM\r
++FC34          ; mapped                 ; 0642 0645     # 1.1  ARABIC LIGATURE QAF WITH MEEM ISOLATED FORM\r
++FC35          ; mapped                 ; 0642 0649     # 1.1  ARABIC LIGATURE QAF WITH ALEF MAKSURA ISOLATED FORM\r
++FC36          ; mapped                 ; 0642 064A     # 1.1  ARABIC LIGATURE QAF WITH YEH ISOLATED FORM\r
++FC37          ; mapped                 ; 0643 0627     # 1.1  ARABIC LIGATURE KAF WITH ALEF ISOLATED FORM\r
++FC38          ; mapped                 ; 0643 062C     # 1.1  ARABIC LIGATURE KAF WITH JEEM ISOLATED FORM\r
++FC39          ; mapped                 ; 0643 062D     # 1.1  ARABIC LIGATURE KAF WITH HAH ISOLATED FORM\r
++FC3A          ; mapped                 ; 0643 062E     # 1.1  ARABIC LIGATURE KAF WITH KHAH ISOLATED FORM\r
++FC3B          ; mapped                 ; 0643 0644     # 1.1  ARABIC LIGATURE KAF WITH LAM ISOLATED FORM\r
++FC3C          ; mapped                 ; 0643 0645     # 1.1  ARABIC LIGATURE KAF WITH MEEM ISOLATED FORM\r
++FC3D          ; mapped                 ; 0643 0649     # 1.1  ARABIC LIGATURE KAF WITH ALEF MAKSURA ISOLATED FORM\r
++FC3E          ; mapped                 ; 0643 064A     # 1.1  ARABIC LIGATURE KAF WITH YEH ISOLATED FORM\r
++FC3F          ; mapped                 ; 0644 062C     # 1.1  ARABIC LIGATURE LAM WITH JEEM ISOLATED FORM\r
++FC40          ; mapped                 ; 0644 062D     # 1.1  ARABIC LIGATURE LAM WITH HAH ISOLATED FORM\r
++FC41          ; mapped                 ; 0644 062E     # 1.1  ARABIC LIGATURE LAM WITH KHAH ISOLATED FORM\r
++FC42          ; mapped                 ; 0644 0645     # 1.1  ARABIC LIGATURE LAM WITH MEEM ISOLATED FORM\r
++FC43          ; mapped                 ; 0644 0649     # 1.1  ARABIC LIGATURE LAM WITH ALEF MAKSURA ISOLATED FORM\r
++FC44          ; mapped                 ; 0644 064A     # 1.1  ARABIC LIGATURE LAM WITH YEH ISOLATED FORM\r
++FC45          ; mapped                 ; 0645 062C     # 1.1  ARABIC LIGATURE MEEM WITH JEEM ISOLATED FORM\r
++FC46          ; mapped                 ; 0645 062D     # 1.1  ARABIC LIGATURE MEEM WITH HAH ISOLATED FORM\r
++FC47          ; mapped                 ; 0645 062E     # 1.1  ARABIC LIGATURE MEEM WITH KHAH ISOLATED FORM\r
++FC48          ; mapped                 ; 0645 0645     # 1.1  ARABIC LIGATURE MEEM WITH MEEM ISOLATED FORM\r
++FC49          ; mapped                 ; 0645 0649     # 1.1  ARABIC LIGATURE MEEM WITH ALEF MAKSURA ISOLATED FORM\r
++FC4A          ; mapped                 ; 0645 064A     # 1.1  ARABIC LIGATURE MEEM WITH YEH ISOLATED FORM\r
++FC4B          ; mapped                 ; 0646 062C     # 1.1  ARABIC LIGATURE NOON WITH JEEM ISOLATED FORM\r
++FC4C          ; mapped                 ; 0646 062D     # 1.1  ARABIC LIGATURE NOON WITH HAH ISOLATED FORM\r
++FC4D          ; mapped                 ; 0646 062E     # 1.1  ARABIC LIGATURE NOON WITH KHAH ISOLATED FORM\r
++FC4E          ; mapped                 ; 0646 0645     # 1.1  ARABIC LIGATURE NOON WITH MEEM ISOLATED FORM\r
++FC4F          ; mapped                 ; 0646 0649     # 1.1  ARABIC LIGATURE NOON WITH ALEF MAKSURA ISOLATED FORM\r
++FC50          ; mapped                 ; 0646 064A     # 1.1  ARABIC LIGATURE NOON WITH YEH ISOLATED FORM\r
++FC51          ; mapped                 ; 0647 062C     # 1.1  ARABIC LIGATURE HEH WITH JEEM ISOLATED FORM\r
++FC52          ; mapped                 ; 0647 0645     # 1.1  ARABIC LIGATURE HEH WITH MEEM ISOLATED FORM\r
++FC53          ; mapped                 ; 0647 0649     # 1.1  ARABIC LIGATURE HEH WITH ALEF MAKSURA ISOLATED FORM\r
++FC54          ; mapped                 ; 0647 064A     # 1.1  ARABIC LIGATURE HEH WITH YEH ISOLATED FORM\r
++FC55          ; mapped                 ; 064A 062C     # 1.1  ARABIC LIGATURE YEH WITH JEEM ISOLATED FORM\r
++FC56          ; mapped                 ; 064A 062D     # 1.1  ARABIC LIGATURE YEH WITH HAH ISOLATED FORM\r
++FC57          ; mapped                 ; 064A 062E     # 1.1  ARABIC LIGATURE YEH WITH KHAH ISOLATED FORM\r
++FC58          ; mapped                 ; 064A 0645     # 1.1  ARABIC LIGATURE YEH WITH MEEM ISOLATED FORM\r
++FC59          ; mapped                 ; 064A 0649     # 1.1  ARABIC LIGATURE YEH WITH ALEF MAKSURA ISOLATED FORM\r
++FC5A          ; mapped                 ; 064A 064A     # 1.1  ARABIC LIGATURE YEH WITH YEH ISOLATED FORM\r
++FC5B          ; mapped                 ; 0630 0670     # 1.1  ARABIC LIGATURE THAL WITH SUPERSCRIPT ALEF ISOLATED FORM\r
++FC5C          ; mapped                 ; 0631 0670     # 1.1  ARABIC LIGATURE REH WITH SUPERSCRIPT ALEF ISOLATED FORM\r
++FC5D          ; mapped                 ; 0649 0670     # 1.1  ARABIC LIGATURE ALEF MAKSURA WITH SUPERSCRIPT ALEF ISOLATED FORM\r
++FC5E          ; disallowed_STD3_mapped ; 0020 064C 0651 #1.1  ARABIC LIGATURE SHADDA WITH DAMMATAN ISOLATED FORM\r
++FC5F          ; disallowed_STD3_mapped ; 0020 064D 0651 #1.1  ARABIC LIGATURE SHADDA WITH KASRATAN ISOLATED FORM\r
++FC60          ; disallowed_STD3_mapped ; 0020 064E 0651 #1.1  ARABIC LIGATURE SHADDA WITH FATHA ISOLATED FORM\r
++FC61          ; disallowed_STD3_mapped ; 0020 064F 0651 #1.1  ARABIC LIGATURE SHADDA WITH DAMMA ISOLATED FORM\r
++FC62          ; disallowed_STD3_mapped ; 0020 0650 0651 #1.1  ARABIC LIGATURE SHADDA WITH KASRA ISOLATED FORM\r
++FC63          ; disallowed_STD3_mapped ; 0020 0651 0670 #1.1  ARABIC LIGATURE SHADDA WITH SUPERSCRIPT ALEF ISOLATED FORM\r
++FC64          ; mapped                 ; 0626 0631     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH REH FINAL FORM\r
++FC65          ; mapped                 ; 0626 0632     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ZAIN FINAL FORM\r
++FC66          ; mapped                 ; 0626 0645     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM FINAL FORM\r
++FC67          ; mapped                 ; 0626 0646     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH NOON FINAL FORM\r
++FC68          ; mapped                 ; 0626 0649     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF MAKSURA FINAL FORM\r
++FC69          ; mapped                 ; 0626 064A     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YEH FINAL FORM\r
++FC6A          ; mapped                 ; 0628 0631     # 1.1  ARABIC LIGATURE BEH WITH REH FINAL FORM\r
++FC6B          ; mapped                 ; 0628 0632     # 1.1  ARABIC LIGATURE BEH WITH ZAIN FINAL FORM\r
++FC6C          ; mapped                 ; 0628 0645     # 1.1  ARABIC LIGATURE BEH WITH MEEM FINAL FORM\r
++FC6D          ; mapped                 ; 0628 0646     # 1.1  ARABIC LIGATURE BEH WITH NOON FINAL FORM\r
++FC6E          ; mapped                 ; 0628 0649     # 1.1  ARABIC LIGATURE BEH WITH ALEF MAKSURA FINAL FORM\r
++FC6F          ; mapped                 ; 0628 064A     # 1.1  ARABIC LIGATURE BEH WITH YEH FINAL FORM\r
++FC70          ; mapped                 ; 062A 0631     # 1.1  ARABIC LIGATURE TEH WITH REH FINAL FORM\r
++FC71          ; mapped                 ; 062A 0632     # 1.1  ARABIC LIGATURE TEH WITH ZAIN FINAL FORM\r
++FC72          ; mapped                 ; 062A 0645     # 1.1  ARABIC LIGATURE TEH WITH MEEM FINAL FORM\r
++FC73          ; mapped                 ; 062A 0646     # 1.1  ARABIC LIGATURE TEH WITH NOON FINAL FORM\r
++FC74          ; mapped                 ; 062A 0649     # 1.1  ARABIC LIGATURE TEH WITH ALEF MAKSURA FINAL FORM\r
++FC75          ; mapped                 ; 062A 064A     # 1.1  ARABIC LIGATURE TEH WITH YEH FINAL FORM\r
++FC76          ; mapped                 ; 062B 0631     # 1.1  ARABIC LIGATURE THEH WITH REH FINAL FORM\r
++FC77          ; mapped                 ; 062B 0632     # 1.1  ARABIC LIGATURE THEH WITH ZAIN FINAL FORM\r
++FC78          ; mapped                 ; 062B 0645     # 1.1  ARABIC LIGATURE THEH WITH MEEM FINAL FORM\r
++FC79          ; mapped                 ; 062B 0646     # 1.1  ARABIC LIGATURE THEH WITH NOON FINAL FORM\r
++FC7A          ; mapped                 ; 062B 0649     # 1.1  ARABIC LIGATURE THEH WITH ALEF MAKSURA FINAL FORM\r
++FC7B          ; mapped                 ; 062B 064A     # 1.1  ARABIC LIGATURE THEH WITH YEH FINAL FORM\r
++FC7C          ; mapped                 ; 0641 0649     # 1.1  ARABIC LIGATURE FEH WITH ALEF MAKSURA FINAL FORM\r
++FC7D          ; mapped                 ; 0641 064A     # 1.1  ARABIC LIGATURE FEH WITH YEH FINAL FORM\r
++FC7E          ; mapped                 ; 0642 0649     # 1.1  ARABIC LIGATURE QAF WITH ALEF MAKSURA FINAL FORM\r
++FC7F          ; mapped                 ; 0642 064A     # 1.1  ARABIC LIGATURE QAF WITH YEH FINAL FORM\r
++FC80          ; mapped                 ; 0643 0627     # 1.1  ARABIC LIGATURE KAF WITH ALEF FINAL FORM\r
++FC81          ; mapped                 ; 0643 0644     # 1.1  ARABIC LIGATURE KAF WITH LAM FINAL FORM\r
++FC82          ; mapped                 ; 0643 0645     # 1.1  ARABIC LIGATURE KAF WITH MEEM FINAL FORM\r
++FC83          ; mapped                 ; 0643 0649     # 1.1  ARABIC LIGATURE KAF WITH ALEF MAKSURA FINAL FORM\r
++FC84          ; mapped                 ; 0643 064A     # 1.1  ARABIC LIGATURE KAF WITH YEH FINAL FORM\r
++FC85          ; mapped                 ; 0644 0645     # 1.1  ARABIC LIGATURE LAM WITH MEEM FINAL FORM\r
++FC86          ; mapped                 ; 0644 0649     # 1.1  ARABIC LIGATURE LAM WITH ALEF MAKSURA FINAL FORM\r
++FC87          ; mapped                 ; 0644 064A     # 1.1  ARABIC LIGATURE LAM WITH YEH FINAL FORM\r
++FC88          ; mapped                 ; 0645 0627     # 1.1  ARABIC LIGATURE MEEM WITH ALEF FINAL FORM\r
++FC89          ; mapped                 ; 0645 0645     # 1.1  ARABIC LIGATURE MEEM WITH MEEM FINAL FORM\r
++FC8A          ; mapped                 ; 0646 0631     # 1.1  ARABIC LIGATURE NOON WITH REH FINAL FORM\r
++FC8B          ; mapped                 ; 0646 0632     # 1.1  ARABIC LIGATURE NOON WITH ZAIN FINAL FORM\r
++FC8C          ; mapped                 ; 0646 0645     # 1.1  ARABIC LIGATURE NOON WITH MEEM FINAL FORM\r
++FC8D          ; mapped                 ; 0646 0646     # 1.1  ARABIC LIGATURE NOON WITH NOON FINAL FORM\r
++FC8E          ; mapped                 ; 0646 0649     # 1.1  ARABIC LIGATURE NOON WITH ALEF MAKSURA FINAL FORM\r
++FC8F          ; mapped                 ; 0646 064A     # 1.1  ARABIC LIGATURE NOON WITH YEH FINAL FORM\r
++FC90          ; mapped                 ; 0649 0670     # 1.1  ARABIC LIGATURE ALEF MAKSURA WITH SUPERSCRIPT ALEF FINAL FORM\r
++FC91          ; mapped                 ; 064A 0631     # 1.1  ARABIC LIGATURE YEH WITH REH FINAL FORM\r
++FC92          ; mapped                 ; 064A 0632     # 1.1  ARABIC LIGATURE YEH WITH ZAIN FINAL FORM\r
++FC93          ; mapped                 ; 064A 0645     # 1.1  ARABIC LIGATURE YEH WITH MEEM FINAL FORM\r
++FC94          ; mapped                 ; 064A 0646     # 1.1  ARABIC LIGATURE YEH WITH NOON FINAL FORM\r
++FC95          ; mapped                 ; 064A 0649     # 1.1  ARABIC LIGATURE YEH WITH ALEF MAKSURA FINAL FORM\r
++FC96          ; mapped                 ; 064A 064A     # 1.1  ARABIC LIGATURE YEH WITH YEH FINAL FORM\r
++FC97          ; mapped                 ; 0626 062C     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH JEEM INITIAL FORM\r
++FC98          ; mapped                 ; 0626 062D     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HAH INITIAL FORM\r
++FC99          ; mapped                 ; 0626 062E     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH KHAH INITIAL FORM\r
++FC9A          ; mapped                 ; 0626 0645     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM INITIAL FORM\r
++FC9B          ; mapped                 ; 0626 0647     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HEH INITIAL FORM\r
++FC9C          ; mapped                 ; 0628 062C     # 1.1  ARABIC LIGATURE BEH WITH JEEM INITIAL FORM\r
++FC9D          ; mapped                 ; 0628 062D     # 1.1  ARABIC LIGATURE BEH WITH HAH INITIAL FORM\r
++FC9E          ; mapped                 ; 0628 062E     # 1.1  ARABIC LIGATURE BEH WITH KHAH INITIAL FORM\r
++FC9F          ; mapped                 ; 0628 0645     # 1.1  ARABIC LIGATURE BEH WITH MEEM INITIAL FORM\r
++FCA0          ; mapped                 ; 0628 0647     # 1.1  ARABIC LIGATURE BEH WITH HEH INITIAL FORM\r
++FCA1          ; mapped                 ; 062A 062C     # 1.1  ARABIC LIGATURE TEH WITH JEEM INITIAL FORM\r
++FCA2          ; mapped                 ; 062A 062D     # 1.1  ARABIC LIGATURE TEH WITH HAH INITIAL FORM\r
++FCA3          ; mapped                 ; 062A 062E     # 1.1  ARABIC LIGATURE TEH WITH KHAH INITIAL FORM\r
++FCA4          ; mapped                 ; 062A 0645     # 1.1  ARABIC LIGATURE TEH WITH MEEM INITIAL FORM\r
++FCA5          ; mapped                 ; 062A 0647     # 1.1  ARABIC LIGATURE TEH WITH HEH INITIAL FORM\r
++FCA6          ; mapped                 ; 062B 0645     # 1.1  ARABIC LIGATURE THEH WITH MEEM INITIAL FORM\r
++FCA7          ; mapped                 ; 062C 062D     # 1.1  ARABIC LIGATURE JEEM WITH HAH INITIAL FORM\r
++FCA8          ; mapped                 ; 062C 0645     # 1.1  ARABIC LIGATURE JEEM WITH MEEM INITIAL FORM\r
++FCA9          ; mapped                 ; 062D 062C     # 1.1  ARABIC LIGATURE HAH WITH JEEM INITIAL FORM\r
++FCAA          ; mapped                 ; 062D 0645     # 1.1  ARABIC LIGATURE HAH WITH MEEM INITIAL FORM\r
++FCAB          ; mapped                 ; 062E 062C     # 1.1  ARABIC LIGATURE KHAH WITH JEEM INITIAL FORM\r
++FCAC          ; mapped                 ; 062E 0645     # 1.1  ARABIC LIGATURE KHAH WITH MEEM INITIAL FORM\r
++FCAD          ; mapped                 ; 0633 062C     # 1.1  ARABIC LIGATURE SEEN WITH JEEM INITIAL FORM\r
++FCAE          ; mapped                 ; 0633 062D     # 1.1  ARABIC LIGATURE SEEN WITH HAH INITIAL FORM\r
++FCAF          ; mapped                 ; 0633 062E     # 1.1  ARABIC LIGATURE SEEN WITH KHAH INITIAL FORM\r
++FCB0          ; mapped                 ; 0633 0645     # 1.1  ARABIC LIGATURE SEEN WITH MEEM INITIAL FORM\r
++FCB1          ; mapped                 ; 0635 062D     # 1.1  ARABIC LIGATURE SAD WITH HAH INITIAL FORM\r
++FCB2          ; mapped                 ; 0635 062E     # 1.1  ARABIC LIGATURE SAD WITH KHAH INITIAL FORM\r
++FCB3          ; mapped                 ; 0635 0645     # 1.1  ARABIC LIGATURE SAD WITH MEEM INITIAL FORM\r
++FCB4          ; mapped                 ; 0636 062C     # 1.1  ARABIC LIGATURE DAD WITH JEEM INITIAL FORM\r
++FCB5          ; mapped                 ; 0636 062D     # 1.1  ARABIC LIGATURE DAD WITH HAH INITIAL FORM\r
++FCB6          ; mapped                 ; 0636 062E     # 1.1  ARABIC LIGATURE DAD WITH KHAH INITIAL FORM\r
++FCB7          ; mapped                 ; 0636 0645     # 1.1  ARABIC LIGATURE DAD WITH MEEM INITIAL FORM\r
++FCB8          ; mapped                 ; 0637 062D     # 1.1  ARABIC LIGATURE TAH WITH HAH INITIAL FORM\r
++FCB9          ; mapped                 ; 0638 0645     # 1.1  ARABIC LIGATURE ZAH WITH MEEM INITIAL FORM\r
++FCBA          ; mapped                 ; 0639 062C     # 1.1  ARABIC LIGATURE AIN WITH JEEM INITIAL FORM\r
++FCBB          ; mapped                 ; 0639 0645     # 1.1  ARABIC LIGATURE AIN WITH MEEM INITIAL FORM\r
++FCBC          ; mapped                 ; 063A 062C     # 1.1  ARABIC LIGATURE GHAIN WITH JEEM INITIAL FORM\r
++FCBD          ; mapped                 ; 063A 0645     # 1.1  ARABIC LIGATURE GHAIN WITH MEEM INITIAL FORM\r
++FCBE          ; mapped                 ; 0641 062C     # 1.1  ARABIC LIGATURE FEH WITH JEEM INITIAL FORM\r
++FCBF          ; mapped                 ; 0641 062D     # 1.1  ARABIC LIGATURE FEH WITH HAH INITIAL FORM\r
++FCC0          ; mapped                 ; 0641 062E     # 1.1  ARABIC LIGATURE FEH WITH KHAH INITIAL FORM\r
++FCC1          ; mapped                 ; 0641 0645     # 1.1  ARABIC LIGATURE FEH WITH MEEM INITIAL FORM\r
++FCC2          ; mapped                 ; 0642 062D     # 1.1  ARABIC LIGATURE QAF WITH HAH INITIAL FORM\r
++FCC3          ; mapped                 ; 0642 0645     # 1.1  ARABIC LIGATURE QAF WITH MEEM INITIAL FORM\r
++FCC4          ; mapped                 ; 0643 062C     # 1.1  ARABIC LIGATURE KAF WITH JEEM INITIAL FORM\r
++FCC5          ; mapped                 ; 0643 062D     # 1.1  ARABIC LIGATURE KAF WITH HAH INITIAL FORM\r
++FCC6          ; mapped                 ; 0643 062E     # 1.1  ARABIC LIGATURE KAF WITH KHAH INITIAL FORM\r
++FCC7          ; mapped                 ; 0643 0644     # 1.1  ARABIC LIGATURE KAF WITH LAM INITIAL FORM\r
++FCC8          ; mapped                 ; 0643 0645     # 1.1  ARABIC LIGATURE KAF WITH MEEM INITIAL FORM\r
++FCC9          ; mapped                 ; 0644 062C     # 1.1  ARABIC LIGATURE LAM WITH JEEM INITIAL FORM\r
++FCCA          ; mapped                 ; 0644 062D     # 1.1  ARABIC LIGATURE LAM WITH HAH INITIAL FORM\r
++FCCB          ; mapped                 ; 0644 062E     # 1.1  ARABIC LIGATURE LAM WITH KHAH INITIAL FORM\r
++FCCC          ; mapped                 ; 0644 0645     # 1.1  ARABIC LIGATURE LAM WITH MEEM INITIAL FORM\r
++FCCD          ; mapped                 ; 0644 0647     # 1.1  ARABIC LIGATURE LAM WITH HEH INITIAL FORM\r
++FCCE          ; mapped                 ; 0645 062C     # 1.1  ARABIC LIGATURE MEEM WITH JEEM INITIAL FORM\r
++FCCF          ; mapped                 ; 0645 062D     # 1.1  ARABIC LIGATURE MEEM WITH HAH INITIAL FORM\r
++FCD0          ; mapped                 ; 0645 062E     # 1.1  ARABIC LIGATURE MEEM WITH KHAH INITIAL FORM\r
++FCD1          ; mapped                 ; 0645 0645     # 1.1  ARABIC LIGATURE MEEM WITH MEEM INITIAL FORM\r
++FCD2          ; mapped                 ; 0646 062C     # 1.1  ARABIC LIGATURE NOON WITH JEEM INITIAL FORM\r
++FCD3          ; mapped                 ; 0646 062D     # 1.1  ARABIC LIGATURE NOON WITH HAH INITIAL FORM\r
++FCD4          ; mapped                 ; 0646 062E     # 1.1  ARABIC LIGATURE NOON WITH KHAH INITIAL FORM\r
++FCD5          ; mapped                 ; 0646 0645     # 1.1  ARABIC LIGATURE NOON WITH MEEM INITIAL FORM\r
++FCD6          ; mapped                 ; 0646 0647     # 1.1  ARABIC LIGATURE NOON WITH HEH INITIAL FORM\r
++FCD7          ; mapped                 ; 0647 062C     # 1.1  ARABIC LIGATURE HEH WITH JEEM INITIAL FORM\r
++FCD8          ; mapped                 ; 0647 0645     # 1.1  ARABIC LIGATURE HEH WITH MEEM INITIAL FORM\r
++FCD9          ; mapped                 ; 0647 0670     # 1.1  ARABIC LIGATURE HEH WITH SUPERSCRIPT ALEF INITIAL FORM\r
++FCDA          ; mapped                 ; 064A 062C     # 1.1  ARABIC LIGATURE YEH WITH JEEM INITIAL FORM\r
++FCDB          ; mapped                 ; 064A 062D     # 1.1  ARABIC LIGATURE YEH WITH HAH INITIAL FORM\r
++FCDC          ; mapped                 ; 064A 062E     # 1.1  ARABIC LIGATURE YEH WITH KHAH INITIAL FORM\r
++FCDD          ; mapped                 ; 064A 0645     # 1.1  ARABIC LIGATURE YEH WITH MEEM INITIAL FORM\r
++FCDE          ; mapped                 ; 064A 0647     # 1.1  ARABIC LIGATURE YEH WITH HEH INITIAL FORM\r
++FCDF          ; mapped                 ; 0626 0645     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM MEDIAL FORM\r
++FCE0          ; mapped                 ; 0626 0647     # 1.1  ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HEH MEDIAL FORM\r
++FCE1          ; mapped                 ; 0628 0645     # 1.1  ARABIC LIGATURE BEH WITH MEEM MEDIAL FORM\r
++FCE2          ; mapped                 ; 0628 0647     # 1.1  ARABIC LIGATURE BEH WITH HEH MEDIAL FORM\r
++FCE3          ; mapped                 ; 062A 0645     # 1.1  ARABIC LIGATURE TEH WITH MEEM MEDIAL FORM\r
++FCE4          ; mapped                 ; 062A 0647     # 1.1  ARABIC LIGATURE TEH WITH HEH MEDIAL FORM\r
++FCE5          ; mapped                 ; 062B 0645     # 1.1  ARABIC LIGATURE THEH WITH MEEM MEDIAL FORM\r
++FCE6          ; mapped                 ; 062B 0647     # 1.1  ARABIC LIGATURE THEH WITH HEH MEDIAL FORM\r
++FCE7          ; mapped                 ; 0633 0645     # 1.1  ARABIC LIGATURE SEEN WITH MEEM MEDIAL FORM\r
++FCE8          ; mapped                 ; 0633 0647     # 1.1  ARABIC LIGATURE SEEN WITH HEH MEDIAL FORM\r
++FCE9          ; mapped                 ; 0634 0645     # 1.1  ARABIC LIGATURE SHEEN WITH MEEM MEDIAL FORM\r
++FCEA          ; mapped                 ; 0634 0647     # 1.1  ARABIC LIGATURE SHEEN WITH HEH MEDIAL FORM\r
++FCEB          ; mapped                 ; 0643 0644     # 1.1  ARABIC LIGATURE KAF WITH LAM MEDIAL FORM\r
++FCEC          ; mapped                 ; 0643 0645     # 1.1  ARABIC LIGATURE KAF WITH MEEM MEDIAL FORM\r
++FCED          ; mapped                 ; 0644 0645     # 1.1  ARABIC LIGATURE LAM WITH MEEM MEDIAL FORM\r
++FCEE          ; mapped                 ; 0646 0645     # 1.1  ARABIC LIGATURE NOON WITH MEEM MEDIAL FORM\r
++FCEF          ; mapped                 ; 0646 0647     # 1.1  ARABIC LIGATURE NOON WITH HEH MEDIAL FORM\r
++FCF0          ; mapped                 ; 064A 0645     # 1.1  ARABIC LIGATURE YEH WITH MEEM MEDIAL FORM\r
++FCF1          ; mapped                 ; 064A 0647     # 1.1  ARABIC LIGATURE YEH WITH HEH MEDIAL FORM\r
++FCF2          ; mapped                 ; 0640 064E 0651 #1.1  ARABIC LIGATURE SHADDA WITH FATHA MEDIAL FORM\r
++FCF3          ; mapped                 ; 0640 064F 0651 #1.1  ARABIC LIGATURE SHADDA WITH DAMMA MEDIAL FORM\r
++FCF4          ; mapped                 ; 0640 0650 0651 #1.1  ARABIC LIGATURE SHADDA WITH KASRA MEDIAL FORM\r
++FCF5          ; mapped                 ; 0637 0649     # 1.1  ARABIC LIGATURE TAH WITH ALEF MAKSURA ISOLATED FORM\r
++FCF6          ; mapped                 ; 0637 064A     # 1.1  ARABIC LIGATURE TAH WITH YEH ISOLATED FORM\r
++FCF7          ; mapped                 ; 0639 0649     # 1.1  ARABIC LIGATURE AIN WITH ALEF MAKSURA ISOLATED FORM\r
++FCF8          ; mapped                 ; 0639 064A     # 1.1  ARABIC LIGATURE AIN WITH YEH ISOLATED FORM\r
++FCF9          ; mapped                 ; 063A 0649     # 1.1  ARABIC LIGATURE GHAIN WITH ALEF MAKSURA ISOLATED FORM\r
++FCFA          ; mapped                 ; 063A 064A     # 1.1  ARABIC LIGATURE GHAIN WITH YEH ISOLATED FORM\r
++FCFB          ; mapped                 ; 0633 0649     # 1.1  ARABIC LIGATURE SEEN WITH ALEF MAKSURA ISOLATED FORM\r
++FCFC          ; mapped                 ; 0633 064A     # 1.1  ARABIC LIGATURE SEEN WITH YEH ISOLATED FORM\r
++FCFD          ; mapped                 ; 0634 0649     # 1.1  ARABIC LIGATURE SHEEN WITH ALEF MAKSURA ISOLATED FORM\r
++FCFE          ; mapped                 ; 0634 064A     # 1.1  ARABIC LIGATURE SHEEN WITH YEH ISOLATED FORM\r
++FCFF          ; mapped                 ; 062D 0649     # 1.1  ARABIC LIGATURE HAH WITH ALEF MAKSURA ISOLATED FORM\r
++FD00          ; mapped                 ; 062D 064A     # 1.1  ARABIC LIGATURE HAH WITH YEH ISOLATED FORM\r
++FD01          ; mapped                 ; 062C 0649     # 1.1  ARABIC LIGATURE JEEM WITH ALEF MAKSURA ISOLATED FORM\r
++FD02          ; mapped                 ; 062C 064A     # 1.1  ARABIC LIGATURE JEEM WITH YEH ISOLATED FORM\r
++FD03          ; mapped                 ; 062E 0649     # 1.1  ARABIC LIGATURE KHAH WITH ALEF MAKSURA ISOLATED FORM\r
++FD04          ; mapped                 ; 062E 064A     # 1.1  ARABIC LIGATURE KHAH WITH YEH ISOLATED FORM\r
++FD05          ; mapped                 ; 0635 0649     # 1.1  ARABIC LIGATURE SAD WITH ALEF MAKSURA ISOLATED FORM\r
++FD06          ; mapped                 ; 0635 064A     # 1.1  ARABIC LIGATURE SAD WITH YEH ISOLATED FORM\r
++FD07          ; mapped                 ; 0636 0649     # 1.1  ARABIC LIGATURE DAD WITH ALEF MAKSURA ISOLATED FORM\r
++FD08          ; mapped                 ; 0636 064A     # 1.1  ARABIC LIGATURE DAD WITH YEH ISOLATED FORM\r
++FD09          ; mapped                 ; 0634 062C     # 1.1  ARABIC LIGATURE SHEEN WITH JEEM ISOLATED FORM\r
++FD0A          ; mapped                 ; 0634 062D     # 1.1  ARABIC LIGATURE SHEEN WITH HAH ISOLATED FORM\r
++FD0B          ; mapped                 ; 0634 062E     # 1.1  ARABIC LIGATURE SHEEN WITH KHAH ISOLATED FORM\r
++FD0C          ; mapped                 ; 0634 0645     # 1.1  ARABIC LIGATURE SHEEN WITH MEEM ISOLATED FORM\r
++FD0D          ; mapped                 ; 0634 0631     # 1.1  ARABIC LIGATURE SHEEN WITH REH ISOLATED FORM\r
++FD0E          ; mapped                 ; 0633 0631     # 1.1  ARABIC LIGATURE SEEN WITH REH ISOLATED FORM\r
++FD0F          ; mapped                 ; 0635 0631     # 1.1  ARABIC LIGATURE SAD WITH REH ISOLATED FORM\r
++FD10          ; mapped                 ; 0636 0631     # 1.1  ARABIC LIGATURE DAD WITH REH ISOLATED FORM\r
++FD11          ; mapped                 ; 0637 0649     # 1.1  ARABIC LIGATURE TAH WITH ALEF MAKSURA FINAL FORM\r
++FD12          ; mapped                 ; 0637 064A     # 1.1  ARABIC LIGATURE TAH WITH YEH FINAL FORM\r
++FD13          ; mapped                 ; 0639 0649     # 1.1  ARABIC LIGATURE AIN WITH ALEF MAKSURA FINAL FORM\r
++FD14          ; mapped                 ; 0639 064A     # 1.1  ARABIC LIGATURE AIN WITH YEH FINAL FORM\r
++FD15          ; mapped                 ; 063A 0649     # 1.1  ARABIC LIGATURE GHAIN WITH ALEF MAKSURA FINAL FORM\r
++FD16          ; mapped                 ; 063A 064A     # 1.1  ARABIC LIGATURE GHAIN WITH YEH FINAL FORM\r
++FD17          ; mapped                 ; 0633 0649     # 1.1  ARABIC LIGATURE SEEN WITH ALEF MAKSURA FINAL FORM\r
++FD18          ; mapped                 ; 0633 064A     # 1.1  ARABIC LIGATURE SEEN WITH YEH FINAL FORM\r
++FD19          ; mapped                 ; 0634 0649     # 1.1  ARABIC LIGATURE SHEEN WITH ALEF MAKSURA FINAL FORM\r
++FD1A          ; mapped                 ; 0634 064A     # 1.1  ARABIC LIGATURE SHEEN WITH YEH FINAL FORM\r
++FD1B          ; mapped                 ; 062D 0649     # 1.1  ARABIC LIGATURE HAH WITH ALEF MAKSURA FINAL FORM\r
++FD1C          ; mapped                 ; 062D 064A     # 1.1  ARABIC LIGATURE HAH WITH YEH FINAL FORM\r
++FD1D          ; mapped                 ; 062C 0649     # 1.1  ARABIC LIGATURE JEEM WITH ALEF MAKSURA FINAL FORM\r
++FD1E          ; mapped                 ; 062C 064A     # 1.1  ARABIC LIGATURE JEEM WITH YEH FINAL FORM\r
++FD1F          ; mapped                 ; 062E 0649     # 1.1  ARABIC LIGATURE KHAH WITH ALEF MAKSURA FINAL FORM\r
++FD20          ; mapped                 ; 062E 064A     # 1.1  ARABIC LIGATURE KHAH WITH YEH FINAL FORM\r
++FD21          ; mapped                 ; 0635 0649     # 1.1  ARABIC LIGATURE SAD WITH ALEF MAKSURA FINAL FORM\r
++FD22          ; mapped                 ; 0635 064A     # 1.1  ARABIC LIGATURE SAD WITH YEH FINAL FORM\r
++FD23          ; mapped                 ; 0636 0649     # 1.1  ARABIC LIGATURE DAD WITH ALEF MAKSURA FINAL FORM\r
++FD24          ; mapped                 ; 0636 064A     # 1.1  ARABIC LIGATURE DAD WITH YEH FINAL FORM\r
++FD25          ; mapped                 ; 0634 062C     # 1.1  ARABIC LIGATURE SHEEN WITH JEEM FINAL FORM\r
++FD26          ; mapped                 ; 0634 062D     # 1.1  ARABIC LIGATURE SHEEN WITH HAH FINAL FORM\r
++FD27          ; mapped                 ; 0634 062E     # 1.1  ARABIC LIGATURE SHEEN WITH KHAH FINAL FORM\r
++FD28          ; mapped                 ; 0634 0645     # 1.1  ARABIC LIGATURE SHEEN WITH MEEM FINAL FORM\r
++FD29          ; mapped                 ; 0634 0631     # 1.1  ARABIC LIGATURE SHEEN WITH REH FINAL FORM\r
++FD2A          ; mapped                 ; 0633 0631     # 1.1  ARABIC LIGATURE SEEN WITH REH FINAL FORM\r
++FD2B          ; mapped                 ; 0635 0631     # 1.1  ARABIC LIGATURE SAD WITH REH FINAL FORM\r
++FD2C          ; mapped                 ; 0636 0631     # 1.1  ARABIC LIGATURE DAD WITH REH FINAL FORM\r
++FD2D          ; mapped                 ; 0634 062C     # 1.1  ARABIC LIGATURE SHEEN WITH JEEM INITIAL FORM\r
++FD2E          ; mapped                 ; 0634 062D     # 1.1  ARABIC LIGATURE SHEEN WITH HAH INITIAL FORM\r
++FD2F          ; mapped                 ; 0634 062E     # 1.1  ARABIC LIGATURE SHEEN WITH KHAH INITIAL FORM\r
++FD30          ; mapped                 ; 0634 0645     # 1.1  ARABIC LIGATURE SHEEN WITH MEEM INITIAL FORM\r
++FD31          ; mapped                 ; 0633 0647     # 1.1  ARABIC LIGATURE SEEN WITH HEH INITIAL FORM\r
++FD32          ; mapped                 ; 0634 0647     # 1.1  ARABIC LIGATURE SHEEN WITH HEH INITIAL FORM\r
++FD33          ; mapped                 ; 0637 0645     # 1.1  ARABIC LIGATURE TAH WITH MEEM INITIAL FORM\r
++FD34          ; mapped                 ; 0633 062C     # 1.1  ARABIC LIGATURE SEEN WITH JEEM MEDIAL FORM\r
++FD35          ; mapped                 ; 0633 062D     # 1.1  ARABIC LIGATURE SEEN WITH HAH MEDIAL FORM\r
++FD36          ; mapped                 ; 0633 062E     # 1.1  ARABIC LIGATURE SEEN WITH KHAH MEDIAL FORM\r
++FD37          ; mapped                 ; 0634 062C     # 1.1  ARABIC LIGATURE SHEEN WITH JEEM MEDIAL FORM\r
++FD38          ; mapped                 ; 0634 062D     # 1.1  ARABIC LIGATURE SHEEN WITH HAH MEDIAL FORM\r
++FD39          ; mapped                 ; 0634 062E     # 1.1  ARABIC LIGATURE SHEEN WITH KHAH MEDIAL FORM\r
++FD3A          ; mapped                 ; 0637 0645     # 1.1  ARABIC LIGATURE TAH WITH MEEM MEDIAL FORM\r
++FD3B          ; mapped                 ; 0638 0645     # 1.1  ARABIC LIGATURE ZAH WITH MEEM MEDIAL FORM\r
++FD3C..FD3D    ; mapped                 ; 0627 064B     # 1.1  ARABIC LIGATURE ALEF WITH FATHATAN FINAL FORM..ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM\r
++FD3E..FD3F    ; valid                  ;      ; NV8    # 1.1  ORNATE LEFT PARENTHESIS..ORNATE RIGHT PARENTHESIS\r
++FD40..FD4F    ; disallowed                             # NA   <reserved-FD40>..<reserved-FD4F>\r
++FD50          ; mapped                 ; 062A 062C 0645 #1.1  ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM\r
++FD51..FD52    ; mapped                 ; 062A 062D 062C #1.1  ARABIC LIGATURE TEH WITH HAH WITH JEEM FINAL FORM..ARABIC LIGATURE TEH WITH HAH WITH JEEM INITIAL FORM\r
++FD53          ; mapped                 ; 062A 062D 0645 #1.1  ARABIC LIGATURE TEH WITH HAH WITH MEEM INITIAL FORM\r
++FD54          ; mapped                 ; 062A 062E 0645 #1.1  ARABIC LIGATURE TEH WITH KHAH WITH MEEM INITIAL FORM\r
++FD55          ; mapped                 ; 062A 0645 062C #1.1  ARABIC LIGATURE TEH WITH MEEM WITH JEEM INITIAL FORM\r
++FD56          ; mapped                 ; 062A 0645 062D #1.1  ARABIC LIGATURE TEH WITH MEEM WITH HAH INITIAL FORM\r
++FD57          ; mapped                 ; 062A 0645 062E #1.1  ARABIC LIGATURE TEH WITH MEEM WITH KHAH INITIAL FORM\r
++FD58..FD59    ; mapped                 ; 062C 0645 062D #1.1  ARABIC LIGATURE JEEM WITH MEEM WITH HAH FINAL FORM..ARABIC LIGATURE JEEM WITH MEEM WITH HAH INITIAL FORM\r
++FD5A          ; mapped                 ; 062D 0645 064A #1.1  ARABIC LIGATURE HAH WITH MEEM WITH YEH FINAL FORM\r
++FD5B          ; mapped                 ; 062D 0645 0649 #1.1  ARABIC LIGATURE HAH WITH MEEM WITH ALEF MAKSURA FINAL FORM\r
++FD5C          ; mapped                 ; 0633 062D 062C #1.1  ARABIC LIGATURE SEEN WITH HAH WITH JEEM INITIAL FORM\r
++FD5D          ; mapped                 ; 0633 062C 062D #1.1  ARABIC LIGATURE SEEN WITH JEEM WITH HAH INITIAL FORM\r
++FD5E          ; mapped                 ; 0633 062C 0649 #1.1  ARABIC LIGATURE SEEN WITH JEEM WITH ALEF MAKSURA FINAL FORM\r
++FD5F..FD60    ; mapped                 ; 0633 0645 062D #1.1  ARABIC LIGATURE SEEN WITH MEEM WITH HAH FINAL FORM..ARABIC LIGATURE SEEN WITH MEEM WITH HAH INITIAL FORM\r
++FD61          ; mapped                 ; 0633 0645 062C #1.1  ARABIC LIGATURE SEEN WITH MEEM WITH JEEM INITIAL FORM\r
++FD62..FD63    ; mapped                 ; 0633 0645 0645 #1.1  ARABIC LIGATURE SEEN WITH MEEM WITH MEEM FINAL FORM..ARABIC LIGATURE SEEN WITH MEEM WITH MEEM INITIAL FORM\r
++FD64..FD65    ; mapped                 ; 0635 062D 062D #1.1  ARABIC LIGATURE SAD WITH HAH WITH HAH FINAL FORM..ARABIC LIGATURE SAD WITH HAH WITH HAH INITIAL FORM\r
++FD66          ; mapped                 ; 0635 0645 0645 #1.1  ARABIC LIGATURE SAD WITH MEEM WITH MEEM FINAL FORM\r
++FD67..FD68    ; mapped                 ; 0634 062D 0645 #1.1  ARABIC LIGATURE SHEEN WITH HAH WITH MEEM FINAL FORM..ARABIC LIGATURE SHEEN WITH HAH WITH MEEM INITIAL FORM\r
++FD69          ; mapped                 ; 0634 062C 064A #1.1  ARABIC LIGATURE SHEEN WITH JEEM WITH YEH FINAL FORM\r
++FD6A..FD6B    ; mapped                 ; 0634 0645 062E #1.1  ARABIC LIGATURE SHEEN WITH MEEM WITH KHAH FINAL FORM..ARABIC LIGATURE SHEEN WITH MEEM WITH KHAH INITIAL FORM\r
++FD6C..FD6D    ; mapped                 ; 0634 0645 0645 #1.1  ARABIC LIGATURE SHEEN WITH MEEM WITH MEEM FINAL FORM..ARABIC LIGATURE SHEEN WITH MEEM WITH MEEM INITIAL FORM\r
++FD6E          ; mapped                 ; 0636 062D 0649 #1.1  ARABIC LIGATURE DAD WITH HAH WITH ALEF MAKSURA FINAL FORM\r
++FD6F..FD70    ; mapped                 ; 0636 062E 0645 #1.1  ARABIC LIGATURE DAD WITH KHAH WITH MEEM FINAL FORM..ARABIC LIGATURE DAD WITH KHAH WITH MEEM INITIAL FORM\r
++FD71..FD72    ; mapped                 ; 0637 0645 062D #1.1  ARABIC LIGATURE TAH WITH MEEM WITH HAH FINAL FORM..ARABIC LIGATURE TAH WITH MEEM WITH HAH INITIAL FORM\r
++FD73          ; mapped                 ; 0637 0645 0645 #1.1  ARABIC LIGATURE TAH WITH MEEM WITH MEEM INITIAL FORM\r
++FD74          ; mapped                 ; 0637 0645 064A #1.1  ARABIC LIGATURE TAH WITH MEEM WITH YEH FINAL FORM\r
++FD75          ; mapped                 ; 0639 062C 0645 #1.1  ARABIC LIGATURE AIN WITH JEEM WITH MEEM FINAL FORM\r
++FD76..FD77    ; mapped                 ; 0639 0645 0645 #1.1  ARABIC LIGATURE AIN WITH MEEM WITH MEEM FINAL FORM..ARABIC LIGATURE AIN WITH MEEM WITH MEEM INITIAL FORM\r
++FD78          ; mapped                 ; 0639 0645 0649 #1.1  ARABIC LIGATURE AIN WITH MEEM WITH ALEF MAKSURA FINAL FORM\r
++FD79          ; mapped                 ; 063A 0645 0645 #1.1  ARABIC LIGATURE GHAIN WITH MEEM WITH MEEM FINAL FORM\r
++FD7A          ; mapped                 ; 063A 0645 064A #1.1  ARABIC LIGATURE GHAIN WITH MEEM WITH YEH FINAL FORM\r
++FD7B          ; mapped                 ; 063A 0645 0649 #1.1  ARABIC LIGATURE GHAIN WITH MEEM WITH ALEF MAKSURA FINAL FORM\r
++FD7C..FD7D    ; mapped                 ; 0641 062E 0645 #1.1  ARABIC LIGATURE FEH WITH KHAH WITH MEEM FINAL FORM..ARABIC LIGATURE FEH WITH KHAH WITH MEEM INITIAL FORM\r
++FD7E          ; mapped                 ; 0642 0645 062D #1.1  ARABIC LIGATURE QAF WITH MEEM WITH HAH FINAL FORM\r
++FD7F          ; mapped                 ; 0642 0645 0645 #1.1  ARABIC LIGATURE QAF WITH MEEM WITH MEEM FINAL FORM\r
++FD80          ; mapped                 ; 0644 062D 0645 #1.1  ARABIC LIGATURE LAM WITH HAH WITH MEEM FINAL FORM\r
++FD81          ; mapped                 ; 0644 062D 064A #1.1  ARABIC LIGATURE LAM WITH HAH WITH YEH FINAL FORM\r
++FD82          ; mapped                 ; 0644 062D 0649 #1.1  ARABIC LIGATURE LAM WITH HAH WITH ALEF MAKSURA FINAL FORM\r
++FD83..FD84    ; mapped                 ; 0644 062C 062C #1.1  ARABIC LIGATURE LAM WITH JEEM WITH JEEM INITIAL FORM..ARABIC LIGATURE LAM WITH JEEM WITH JEEM FINAL FORM\r
++FD85..FD86    ; mapped                 ; 0644 062E 0645 #1.1  ARABIC LIGATURE LAM WITH KHAH WITH MEEM FINAL FORM..ARABIC LIGATURE LAM WITH KHAH WITH MEEM INITIAL FORM\r
++FD87..FD88    ; mapped                 ; 0644 0645 062D #1.1  ARABIC LIGATURE LAM WITH MEEM WITH HAH FINAL FORM..ARABIC LIGATURE LAM WITH MEEM WITH HAH INITIAL FORM\r
++FD89          ; mapped                 ; 0645 062D 062C #1.1  ARABIC LIGATURE MEEM WITH HAH WITH JEEM INITIAL FORM\r
++FD8A          ; mapped                 ; 0645 062D 0645 #1.1  ARABIC LIGATURE MEEM WITH HAH WITH MEEM INITIAL FORM\r
++FD8B          ; mapped                 ; 0645 062D 064A #1.1  ARABIC LIGATURE MEEM WITH HAH WITH YEH FINAL FORM\r
++FD8C          ; mapped                 ; 0645 062C 062D #1.1  ARABIC LIGATURE MEEM WITH JEEM WITH HAH INITIAL FORM\r
++FD8D          ; mapped                 ; 0645 062C 0645 #1.1  ARABIC LIGATURE MEEM WITH JEEM WITH MEEM INITIAL FORM\r
++FD8E          ; mapped                 ; 0645 062E 062C #1.1  ARABIC LIGATURE MEEM WITH KHAH WITH JEEM INITIAL FORM\r
++FD8F          ; mapped                 ; 0645 062E 0645 #1.1  ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM\r
++FD90..FD91    ; disallowed                             # NA   <reserved-FD90>..<reserved-FD91>\r
++FD92          ; mapped                 ; 0645 062C 062E #1.1  ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM\r
++FD93          ; mapped                 ; 0647 0645 062C #1.1  ARABIC LIGATURE HEH WITH MEEM WITH JEEM INITIAL FORM\r
++FD94          ; mapped                 ; 0647 0645 0645 #1.1  ARABIC LIGATURE HEH WITH MEEM WITH MEEM INITIAL FORM\r
++FD95          ; mapped                 ; 0646 062D 0645 #1.1  ARABIC LIGATURE NOON WITH HAH WITH MEEM INITIAL FORM\r
++FD96          ; mapped                 ; 0646 062D 0649 #1.1  ARABIC LIGATURE NOON WITH HAH WITH ALEF MAKSURA FINAL FORM\r
++FD97..FD98    ; mapped                 ; 0646 062C 0645 #1.1  ARABIC LIGATURE NOON WITH JEEM WITH MEEM FINAL FORM..ARABIC LIGATURE NOON WITH JEEM WITH MEEM INITIAL FORM\r
++FD99          ; mapped                 ; 0646 062C 0649 #1.1  ARABIC LIGATURE NOON WITH JEEM WITH ALEF MAKSURA FINAL FORM\r
++FD9A          ; mapped                 ; 0646 0645 064A #1.1  ARABIC LIGATURE NOON WITH MEEM WITH YEH FINAL FORM\r
++FD9B          ; mapped                 ; 0646 0645 0649 #1.1  ARABIC LIGATURE NOON WITH MEEM WITH ALEF MAKSURA FINAL FORM\r
++FD9C..FD9D    ; mapped                 ; 064A 0645 0645 #1.1  ARABIC LIGATURE YEH WITH MEEM WITH MEEM FINAL FORM..ARABIC LIGATURE YEH WITH MEEM WITH MEEM INITIAL FORM\r
++FD9E          ; mapped                 ; 0628 062E 064A #1.1  ARABIC LIGATURE BEH WITH KHAH WITH YEH FINAL FORM\r
++FD9F          ; mapped                 ; 062A 062C 064A #1.1  ARABIC LIGATURE TEH WITH JEEM WITH YEH FINAL FORM\r
++FDA0          ; mapped                 ; 062A 062C 0649 #1.1  ARABIC LIGATURE TEH WITH JEEM WITH ALEF MAKSURA FINAL FORM\r
++FDA1          ; mapped                 ; 062A 062E 064A #1.1  ARABIC LIGATURE TEH WITH KHAH WITH YEH FINAL FORM\r
++FDA2          ; mapped                 ; 062A 062E 0649 #1.1  ARABIC LIGATURE TEH WITH KHAH WITH ALEF MAKSURA FINAL FORM\r
++FDA3          ; mapped                 ; 062A 0645 064A #1.1  ARABIC LIGATURE TEH WITH MEEM WITH YEH FINAL FORM\r
++FDA4          ; mapped                 ; 062A 0645 0649 #1.1  ARABIC LIGATURE TEH WITH MEEM WITH ALEF MAKSURA FINAL FORM\r
++FDA5          ; mapped                 ; 062C 0645 064A #1.1  ARABIC LIGATURE JEEM WITH MEEM WITH YEH FINAL FORM\r
++FDA6          ; mapped                 ; 062C 062D 0649 #1.1  ARABIC LIGATURE JEEM WITH HAH WITH ALEF MAKSURA FINAL FORM\r
++FDA7          ; mapped                 ; 062C 0645 0649 #1.1  ARABIC LIGATURE JEEM WITH MEEM WITH ALEF MAKSURA FINAL FORM\r
++FDA8          ; mapped                 ; 0633 062E 0649 #1.1  ARABIC LIGATURE SEEN WITH KHAH WITH ALEF MAKSURA FINAL FORM\r
++FDA9          ; mapped                 ; 0635 062D 064A #1.1  ARABIC LIGATURE SAD WITH HAH WITH YEH FINAL FORM\r
++FDAA          ; mapped                 ; 0634 062D 064A #1.1  ARABIC LIGATURE SHEEN WITH HAH WITH YEH FINAL FORM\r
++FDAB          ; mapped                 ; 0636 062D 064A #1.1  ARABIC LIGATURE DAD WITH HAH WITH YEH FINAL FORM\r
++FDAC          ; mapped                 ; 0644 062C 064A #1.1  ARABIC LIGATURE LAM WITH JEEM WITH YEH FINAL FORM\r
++FDAD          ; mapped                 ; 0644 0645 064A #1.1  ARABIC LIGATURE LAM WITH MEEM WITH YEH FINAL FORM\r
++FDAE          ; mapped                 ; 064A 062D 064A #1.1  ARABIC LIGATURE YEH WITH HAH WITH YEH FINAL FORM\r
++FDAF          ; mapped                 ; 064A 062C 064A #1.1  ARABIC LIGATURE YEH WITH JEEM WITH YEH FINAL FORM\r
++FDB0          ; mapped                 ; 064A 0645 064A #1.1  ARABIC LIGATURE YEH WITH MEEM WITH YEH FINAL FORM\r
++FDB1          ; mapped                 ; 0645 0645 064A #1.1  ARABIC LIGATURE MEEM WITH MEEM WITH YEH FINAL FORM\r
++FDB2          ; mapped                 ; 0642 0645 064A #1.1  ARABIC LIGATURE QAF WITH MEEM WITH YEH FINAL FORM\r
++FDB3          ; mapped                 ; 0646 062D 064A #1.1  ARABIC LIGATURE NOON WITH HAH WITH YEH FINAL FORM\r
++FDB4          ; mapped                 ; 0642 0645 062D #1.1  ARABIC LIGATURE QAF WITH MEEM WITH HAH INITIAL FORM\r
++FDB5          ; mapped                 ; 0644 062D 0645 #1.1  ARABIC LIGATURE LAM WITH HAH WITH MEEM INITIAL FORM\r
++FDB6          ; mapped                 ; 0639 0645 064A #1.1  ARABIC LIGATURE AIN WITH MEEM WITH YEH FINAL FORM\r
++FDB7          ; mapped                 ; 0643 0645 064A #1.1  ARABIC LIGATURE KAF WITH MEEM WITH YEH FINAL FORM\r
++FDB8          ; mapped                 ; 0646 062C 062D #1.1  ARABIC LIGATURE NOON WITH JEEM WITH HAH INITIAL FORM\r
++FDB9          ; mapped                 ; 0645 062E 064A #1.1  ARABIC LIGATURE MEEM WITH KHAH WITH YEH FINAL FORM\r
++FDBA          ; mapped                 ; 0644 062C 0645 #1.1  ARABIC LIGATURE LAM WITH JEEM WITH MEEM INITIAL FORM\r
++FDBB          ; mapped                 ; 0643 0645 0645 #1.1  ARABIC LIGATURE KAF WITH MEEM WITH MEEM FINAL FORM\r
++FDBC          ; mapped                 ; 0644 062C 0645 #1.1  ARABIC LIGATURE LAM WITH JEEM WITH MEEM FINAL FORM\r
++FDBD          ; mapped                 ; 0646 062C 062D #1.1  ARABIC LIGATURE NOON WITH JEEM WITH HAH FINAL FORM\r
++FDBE          ; mapped                 ; 062C 062D 064A #1.1  ARABIC LIGATURE JEEM WITH HAH WITH YEH FINAL FORM\r
++FDBF          ; mapped                 ; 062D 062C 064A #1.1  ARABIC LIGATURE HAH WITH JEEM WITH YEH FINAL FORM\r
++FDC0          ; mapped                 ; 0645 062C 064A #1.1  ARABIC LIGATURE MEEM WITH JEEM WITH YEH FINAL FORM\r
++FDC1          ; mapped                 ; 0641 0645 064A #1.1  ARABIC LIGATURE FEH WITH MEEM WITH YEH FINAL FORM\r
++FDC2          ; mapped                 ; 0628 062D 064A #1.1  ARABIC LIGATURE BEH WITH HAH WITH YEH FINAL FORM\r
++FDC3          ; mapped                 ; 0643 0645 0645 #1.1  ARABIC LIGATURE KAF WITH MEEM WITH MEEM INITIAL FORM\r
++FDC4          ; mapped                 ; 0639 062C 0645 #1.1  ARABIC LIGATURE AIN WITH JEEM WITH MEEM INITIAL FORM\r
++FDC5          ; mapped                 ; 0635 0645 0645 #1.1  ARABIC LIGATURE SAD WITH MEEM WITH MEEM INITIAL FORM\r
++FDC6          ; mapped                 ; 0633 062E 064A #1.1  ARABIC LIGATURE SEEN WITH KHAH WITH YEH FINAL FORM\r
++FDC7          ; mapped                 ; 0646 062C 064A #1.1  ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM\r
++FDC8..FDCF    ; disallowed                             # NA   <reserved-FDC8>..<reserved-FDCF>\r
++FDD0..FDEF    ; disallowed                             # 3.1  <noncharacter-FDD0>..<noncharacter-FDEF>\r
++FDF0          ; mapped                 ; 0635 0644 06D2 #1.1  ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM\r
++FDF1          ; mapped                 ; 0642 0644 06D2 #1.1  ARABIC LIGATURE QALA USED AS KORANIC STOP SIGN ISOLATED FORM\r
++FDF2          ; mapped                 ; 0627 0644 0644 0647 #1.1 ARABIC LIGATURE ALLAH ISOLATED FORM\r
++FDF3          ; mapped                 ; 0627 0643 0628 0631 #1.1 ARABIC LIGATURE AKBAR ISOLATED FORM\r
++FDF4          ; mapped                 ; 0645 062D 0645 062F #1.1 ARABIC LIGATURE MOHAMMAD ISOLATED FORM\r
++FDF5          ; mapped                 ; 0635 0644 0639 0645 #1.1 ARABIC LIGATURE SALAM ISOLATED FORM\r
++FDF6          ; mapped                 ; 0631 0633 0648 0644 #1.1 ARABIC LIGATURE RASOUL ISOLATED FORM\r
++FDF7          ; mapped                 ; 0639 0644 064A 0647 #1.1 ARABIC LIGATURE ALAYHE ISOLATED FORM\r
++FDF8          ; mapped                 ; 0648 0633 0644 0645 #1.1 ARABIC LIGATURE WASALLAM ISOLATED FORM\r
++FDF9          ; mapped                 ; 0635 0644 0649 #1.1  ARABIC LIGATURE SALLA ISOLATED FORM\r
++FDFA          ; disallowed_STD3_mapped ; 0635 0644 0649 0020 0627 0644 0644 0647 0020 0639 0644 064A 0647 0020 0648 0633 0644 0645 #1.1 ARABIC LIGATURE SALLALLAHOU ALAYHE WASALLAM\r
++FDFB          ; disallowed_STD3_mapped ; 062C 0644 0020 062C 0644 0627 0644 0647 #1.1 ARABIC LIGATURE JALLAJALALOUHOU\r
++FDFC          ; mapped                 ; 0631 06CC 0627 0644 #3.2 RIAL SIGN\r
++FDFD          ; valid                  ;      ; NV8    # 4.0  ARABIC LIGATURE BISMILLAH AR-RAHMAN AR-RAHEEM\r
++FDFE..FDFF    ; disallowed                             # NA   <reserved-FDFE>..<reserved-FDFF>\r
++FE00..FE0F    ; ignored                                # 3.2  VARIATION SELECTOR-1..VARIATION SELECTOR-16\r
++FE10          ; disallowed_STD3_mapped ; 002C          # 4.1  PRESENTATION FORM FOR VERTICAL COMMA\r
++FE11          ; mapped                 ; 3001          # 4.1  PRESENTATION FORM FOR VERTICAL IDEOGRAPHIC COMMA\r
++FE12          ; disallowed                             # 4.1  PRESENTATION FORM FOR VERTICAL IDEOGRAPHIC FULL STOP\r
++FE13          ; disallowed_STD3_mapped ; 003A          # 4.1  PRESENTATION FORM FOR VERTICAL COLON\r
++FE14          ; disallowed_STD3_mapped ; 003B          # 4.1  PRESENTATION FORM FOR VERTICAL SEMICOLON\r
++FE15          ; disallowed_STD3_mapped ; 0021          # 4.1  PRESENTATION FORM FOR VERTICAL EXCLAMATION MARK\r
++FE16          ; disallowed_STD3_mapped ; 003F          # 4.1  PRESENTATION FORM FOR VERTICAL QUESTION MARK\r
++FE17          ; mapped                 ; 3016          # 4.1  PRESENTATION FORM FOR VERTICAL LEFT WHITE LENTICULAR BRACKET\r
++FE18          ; mapped                 ; 3017          # 4.1  PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET\r
++FE19          ; disallowed                             # 4.1  PRESENTATION FORM FOR VERTICAL HORIZONTAL ELLIPSIS\r
++FE1A..FE1F    ; disallowed                             # NA   <reserved-FE1A>..<reserved-FE1F>\r
++FE20..FE23    ; valid                                  # 1.1  COMBINING LIGATURE LEFT HALF..COMBINING DOUBLE TILDE RIGHT HALF\r
++FE24..FE26    ; valid                                  # 5.1  COMBINING MACRON LEFT HALF..COMBINING CONJOINING MACRON\r
++FE27..FE2D    ; valid                                  # 7.0  COMBINING LIGATURE LEFT HALF BELOW..COMBINING CONJOINING MACRON BELOW\r
++FE2E..FE2F    ; valid                                  # 8.0  COMBINING CYRILLIC TITLO LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF\r
++FE30          ; disallowed                             # 1.1  PRESENTATION FORM FOR VERTICAL TWO DOT LEADER\r
++FE31          ; mapped                 ; 2014          # 1.1  PRESENTATION FORM FOR VERTICAL EM DASH\r
++FE32          ; mapped                 ; 2013          # 1.1  PRESENTATION FORM FOR VERTICAL EN DASH\r
++FE33..FE34    ; disallowed_STD3_mapped ; 005F          # 1.1  PRESENTATION FORM FOR VERTICAL LOW LINE..PRESENTATION FORM FOR VERTICAL WAVY LOW LINE\r
++FE35          ; disallowed_STD3_mapped ; 0028          # 1.1  PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS\r
++FE36          ; disallowed_STD3_mapped ; 0029          # 1.1  PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS\r
++FE37          ; disallowed_STD3_mapped ; 007B          # 1.1  PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET\r
++FE38          ; disallowed_STD3_mapped ; 007D          # 1.1  PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET\r
++FE39          ; mapped                 ; 3014          # 1.1  PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET\r
++FE3A          ; mapped                 ; 3015          # 1.1  PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET\r
++FE3B          ; mapped                 ; 3010          # 1.1  PRESENTATION FORM FOR VERTICAL LEFT BLACK LENTICULAR BRACKET\r
++FE3C          ; mapped                 ; 3011          # 1.1  PRESENTATION FORM FOR VERTICAL RIGHT BLACK LENTICULAR BRACKET\r
++FE3D          ; mapped                 ; 300A          # 1.1  PRESENTATION FORM FOR VERTICAL LEFT DOUBLE ANGLE BRACKET\r
++FE3E          ; mapped                 ; 300B          # 1.1  PRESENTATION FORM FOR VERTICAL RIGHT DOUBLE ANGLE BRACKET\r
++FE3F          ; mapped                 ; 3008          # 1.1  PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET\r
++FE40          ; mapped                 ; 3009          # 1.1  PRESENTATION FORM FOR VERTICAL RIGHT ANGLE BRACKET\r
++FE41          ; mapped                 ; 300C          # 1.1  PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET\r
++FE42          ; mapped                 ; 300D          # 1.1  PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET\r
++FE43          ; mapped                 ; 300E          # 1.1  PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET\r
++FE44          ; mapped                 ; 300F          # 1.1  PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET\r
++FE45..FE46    ; valid                  ;      ; NV8    # 3.2  SESAME DOT..WHITE SESAME DOT\r
++FE47          ; disallowed_STD3_mapped ; 005B          # 4.0  PRESENTATION FORM FOR VERTICAL LEFT SQUARE BRACKET\r
++FE48          ; disallowed_STD3_mapped ; 005D          # 4.0  PRESENTATION FORM FOR VERTICAL RIGHT SQUARE BRACKET\r
++FE49..FE4C    ; disallowed_STD3_mapped ; 0020 0305     # 1.1  DASHED OVERLINE..DOUBLE WAVY OVERLINE\r
++FE4D..FE4F    ; disallowed_STD3_mapped ; 005F          # 1.1  DASHED LOW LINE..WAVY LOW LINE\r
++FE50          ; disallowed_STD3_mapped ; 002C          # 1.1  SMALL COMMA\r
++FE51          ; mapped                 ; 3001          # 1.1  SMALL IDEOGRAPHIC COMMA\r
++FE52          ; disallowed                             # 1.1  SMALL FULL STOP\r
++FE53          ; disallowed                             # NA   <reserved-FE53>\r
++FE54          ; disallowed_STD3_mapped ; 003B          # 1.1  SMALL SEMICOLON\r
++FE55          ; disallowed_STD3_mapped ; 003A          # 1.1  SMALL COLON\r
++FE56          ; disallowed_STD3_mapped ; 003F          # 1.1  SMALL QUESTION MARK\r
++FE57          ; disallowed_STD3_mapped ; 0021          # 1.1  SMALL EXCLAMATION MARK\r
++FE58          ; mapped                 ; 2014          # 1.1  SMALL EM DASH\r
++FE59          ; disallowed_STD3_mapped ; 0028          # 1.1  SMALL LEFT PARENTHESIS\r
++FE5A          ; disallowed_STD3_mapped ; 0029          # 1.1  SMALL RIGHT PARENTHESIS\r
++FE5B          ; disallowed_STD3_mapped ; 007B          # 1.1  SMALL LEFT CURLY BRACKET\r
++FE5C          ; disallowed_STD3_mapped ; 007D          # 1.1  SMALL RIGHT CURLY BRACKET\r
++FE5D          ; mapped                 ; 3014          # 1.1  SMALL LEFT TORTOISE SHELL BRACKET\r
++FE5E          ; mapped                 ; 3015          # 1.1  SMALL RIGHT TORTOISE SHELL BRACKET\r
++FE5F          ; disallowed_STD3_mapped ; 0023          # 1.1  SMALL NUMBER SIGN\r
++FE60          ; disallowed_STD3_mapped ; 0026          # 1.1  SMALL AMPERSAND\r
++FE61          ; disallowed_STD3_mapped ; 002A          # 1.1  SMALL ASTERISK\r
++FE62          ; disallowed_STD3_mapped ; 002B          # 1.1  SMALL PLUS SIGN\r
++FE63          ; mapped                 ; 002D          # 1.1  SMALL HYPHEN-MINUS\r
++FE64          ; disallowed_STD3_mapped ; 003C          # 1.1  SMALL LESS-THAN SIGN\r
++FE65          ; disallowed_STD3_mapped ; 003E          # 1.1  SMALL GREATER-THAN SIGN\r
++FE66          ; disallowed_STD3_mapped ; 003D          # 1.1  SMALL EQUALS SIGN\r
++FE67          ; disallowed                             # NA   <reserved-FE67>\r
++FE68          ; disallowed_STD3_mapped ; 005C          # 1.1  SMALL REVERSE SOLIDUS\r
++FE69          ; disallowed_STD3_mapped ; 0024          # 1.1  SMALL DOLLAR SIGN\r
++FE6A          ; disallowed_STD3_mapped ; 0025          # 1.1  SMALL PERCENT SIGN\r
++FE6B          ; disallowed_STD3_mapped ; 0040          # 1.1  SMALL COMMERCIAL AT\r
++FE6C..FE6F    ; disallowed                             # NA   <reserved-FE6C>..<reserved-FE6F>\r
++FE70          ; disallowed_STD3_mapped ; 0020 064B     # 1.1  ARABIC FATHATAN ISOLATED FORM\r
++FE71          ; mapped                 ; 0640 064B     # 1.1  ARABIC TATWEEL WITH FATHATAN ABOVE\r
++FE72          ; disallowed_STD3_mapped ; 0020 064C     # 1.1  ARABIC DAMMATAN ISOLATED FORM\r
++FE73          ; valid                                  # 3.2  ARABIC TAIL FRAGMENT\r
++FE74          ; disallowed_STD3_mapped ; 0020 064D     # 1.1  ARABIC KASRATAN ISOLATED FORM\r
++FE75          ; disallowed                             # NA   <reserved-FE75>\r
++FE76          ; disallowed_STD3_mapped ; 0020 064E     # 1.1  ARABIC FATHA ISOLATED FORM\r
++FE77          ; mapped                 ; 0640 064E     # 1.1  ARABIC FATHA MEDIAL FORM\r
++FE78          ; disallowed_STD3_mapped ; 0020 064F     # 1.1  ARABIC DAMMA ISOLATED FORM\r
++FE79          ; mapped                 ; 0640 064F     # 1.1  ARABIC DAMMA MEDIAL FORM\r
++FE7A          ; disallowed_STD3_mapped ; 0020 0650     # 1.1  ARABIC KASRA ISOLATED FORM\r
++FE7B          ; mapped                 ; 0640 0650     # 1.1  ARABIC KASRA MEDIAL FORM\r
++FE7C          ; disallowed_STD3_mapped ; 0020 0651     # 1.1  ARABIC SHADDA ISOLATED FORM\r
++FE7D          ; mapped                 ; 0640 0651     # 1.1  ARABIC SHADDA MEDIAL FORM\r
++FE7E          ; disallowed_STD3_mapped ; 0020 0652     # 1.1  ARABIC SUKUN ISOLATED FORM\r
++FE7F          ; mapped                 ; 0640 0652     # 1.1  ARABIC SUKUN MEDIAL FORM\r
++FE80          ; mapped                 ; 0621          # 1.1  ARABIC LETTER HAMZA ISOLATED FORM\r
++FE81..FE82    ; mapped                 ; 0622          # 1.1  ARABIC LETTER ALEF WITH MADDA ABOVE ISOLATED FORM..ARABIC LETTER ALEF WITH MADDA ABOVE FINAL FORM\r
++FE83..FE84    ; mapped                 ; 0623          # 1.1  ARABIC LETTER ALEF WITH HAMZA ABOVE ISOLATED FORM..ARABIC LETTER ALEF WITH HAMZA ABOVE FINAL FORM\r
++FE85..FE86    ; mapped                 ; 0624          # 1.1  ARABIC LETTER WAW WITH HAMZA ABOVE ISOLATED FORM..ARABIC LETTER WAW WITH HAMZA ABOVE FINAL FORM\r
++FE87..FE88    ; mapped                 ; 0625          # 1.1  ARABIC LETTER ALEF WITH HAMZA BELOW ISOLATED FORM..ARABIC LETTER ALEF WITH HAMZA BELOW FINAL FORM\r
++FE89..FE8C    ; mapped                 ; 0626          # 1.1  ARABIC LETTER YEH WITH HAMZA ABOVE ISOLATED FORM..ARABIC LETTER YEH WITH HAMZA ABOVE MEDIAL FORM\r
++FE8D..FE8E    ; mapped                 ; 0627          # 1.1  ARABIC LETTER ALEF ISOLATED FORM..ARABIC LETTER ALEF FINAL FORM\r
++FE8F..FE92    ; mapped                 ; 0628          # 1.1  ARABIC LETTER BEH ISOLATED FORM..ARABIC LETTER BEH MEDIAL FORM\r
++FE93..FE94    ; mapped                 ; 0629          # 1.1  ARABIC LETTER TEH MARBUTA ISOLATED FORM..ARABIC LETTER TEH MARBUTA FINAL FORM\r
++FE95..FE98    ; mapped                 ; 062A          # 1.1  ARABIC LETTER TEH ISOLATED FORM..ARABIC LETTER TEH MEDIAL FORM\r
++FE99..FE9C    ; mapped                 ; 062B          # 1.1  ARABIC LETTER THEH ISOLATED FORM..ARABIC LETTER THEH MEDIAL FORM\r
++FE9D..FEA0    ; mapped                 ; 062C          # 1.1  ARABIC LETTER JEEM ISOLATED FORM..ARABIC LETTER JEEM MEDIAL FORM\r
++FEA1..FEA4    ; mapped                 ; 062D          # 1.1  ARABIC LETTER HAH ISOLATED FORM..ARABIC LETTER HAH MEDIAL FORM\r
++FEA5..FEA8    ; mapped                 ; 062E          # 1.1  ARABIC LETTER KHAH ISOLATED FORM..ARABIC LETTER KHAH MEDIAL FORM\r
++FEA9..FEAA    ; mapped                 ; 062F          # 1.1  ARABIC LETTER DAL ISOLATED FORM..ARABIC LETTER DAL FINAL FORM\r
++FEAB..FEAC    ; mapped                 ; 0630          # 1.1  ARABIC LETTER THAL ISOLATED FORM..ARABIC LETTER THAL FINAL FORM\r
++FEAD..FEAE    ; mapped                 ; 0631          # 1.1  ARABIC LETTER REH ISOLATED FORM..ARABIC LETTER REH FINAL FORM\r
++FEAF..FEB0    ; mapped                 ; 0632          # 1.1  ARABIC LETTER ZAIN ISOLATED FORM..ARABIC LETTER ZAIN FINAL FORM\r
++FEB1..FEB4    ; mapped                 ; 0633          # 1.1  ARABIC LETTER SEEN ISOLATED FORM..ARABIC LETTER SEEN MEDIAL FORM\r
++FEB5..FEB8    ; mapped                 ; 0634          # 1.1  ARABIC LETTER SHEEN ISOLATED FORM..ARABIC LETTER SHEEN MEDIAL FORM\r
++FEB9..FEBC    ; mapped                 ; 0635          # 1.1  ARABIC LETTER SAD ISOLATED FORM..ARABIC LETTER SAD MEDIAL FORM\r
++FEBD..FEC0    ; mapped                 ; 0636          # 1.1  ARABIC LETTER DAD ISOLATED FORM..ARABIC LETTER DAD MEDIAL FORM\r
++FEC1..FEC4    ; mapped                 ; 0637          # 1.1  ARABIC LETTER TAH ISOLATED FORM..ARABIC LETTER TAH MEDIAL FORM\r
++FEC5..FEC8    ; mapped                 ; 0638          # 1.1  ARABIC LETTER ZAH ISOLATED FORM..ARABIC LETTER ZAH MEDIAL FORM\r
++FEC9..FECC    ; mapped                 ; 0639          # 1.1  ARABIC LETTER AIN ISOLATED FORM..ARABIC LETTER AIN MEDIAL FORM\r
++FECD..FED0    ; mapped                 ; 063A          # 1.1  ARABIC LETTER GHAIN ISOLATED FORM..ARABIC LETTER GHAIN MEDIAL FORM\r
++FED1..FED4    ; mapped                 ; 0641          # 1.1  ARABIC LETTER FEH ISOLATED FORM..ARABIC LETTER FEH MEDIAL FORM\r
++FED5..FED8    ; mapped                 ; 0642          # 1.1  ARABIC LETTER QAF ISOLATED FORM..ARABIC LETTER QAF MEDIAL FORM\r
++FED9..FEDC    ; mapped                 ; 0643          # 1.1  ARABIC LETTER KAF ISOLATED FORM..ARABIC LETTER KAF MEDIAL FORM\r
++FEDD..FEE0    ; mapped                 ; 0644          # 1.1  ARABIC LETTER LAM ISOLATED FORM..ARABIC LETTER LAM MEDIAL FORM\r
++FEE1..FEE4    ; mapped                 ; 0645          # 1.1  ARABIC LETTER MEEM ISOLATED FORM..ARABIC LETTER MEEM MEDIAL FORM\r
++FEE5..FEE8    ; mapped                 ; 0646          # 1.1  ARABIC LETTER NOON ISOLATED FORM..ARABIC LETTER NOON MEDIAL FORM\r
++FEE9..FEEC    ; mapped                 ; 0647          # 1.1  ARABIC LETTER HEH ISOLATED FORM..ARABIC LETTER HEH MEDIAL FORM\r
++FEED..FEEE    ; mapped                 ; 0648          # 1.1  ARABIC LETTER WAW ISOLATED FORM..ARABIC LETTER WAW FINAL FORM\r
++FEEF..FEF0    ; mapped                 ; 0649          # 1.1  ARABIC LETTER ALEF MAKSURA ISOLATED FORM..ARABIC LETTER ALEF MAKSURA FINAL FORM\r
++FEF1..FEF4    ; mapped                 ; 064A          # 1.1  ARABIC LETTER YEH ISOLATED FORM..ARABIC LETTER YEH MEDIAL FORM\r
++FEF5..FEF6    ; mapped                 ; 0644 0622     # 1.1  ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM..ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM\r
++FEF7..FEF8    ; mapped                 ; 0644 0623     # 1.1  ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM..ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM\r
++FEF9..FEFA    ; mapped                 ; 0644 0625     # 1.1  ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM..ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM\r
++FEFB..FEFC    ; mapped                 ; 0644 0627     # 1.1  ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM..ARABIC LIGATURE LAM WITH ALEF FINAL FORM\r
++FEFD..FEFE    ; disallowed                             # NA   <reserved-FEFD>..<reserved-FEFE>\r
++FEFF          ; ignored                                # 1.1  ZERO WIDTH NO-BREAK SPACE\r
++FF00          ; disallowed                             # NA   <reserved-FF00>\r
++FF01          ; disallowed_STD3_mapped ; 0021          # 1.1  FULLWIDTH EXCLAMATION MARK\r
++FF02          ; disallowed_STD3_mapped ; 0022          # 1.1  FULLWIDTH QUOTATION MARK\r
++FF03          ; disallowed_STD3_mapped ; 0023          # 1.1  FULLWIDTH NUMBER SIGN\r
++FF04          ; disallowed_STD3_mapped ; 0024          # 1.1  FULLWIDTH DOLLAR SIGN\r
++FF05          ; disallowed_STD3_mapped ; 0025          # 1.1  FULLWIDTH PERCENT SIGN\r
++FF06          ; disallowed_STD3_mapped ; 0026          # 1.1  FULLWIDTH AMPERSAND\r
++FF07          ; disallowed_STD3_mapped ; 0027          # 1.1  FULLWIDTH APOSTROPHE\r
++FF08          ; disallowed_STD3_mapped ; 0028          # 1.1  FULLWIDTH LEFT PARENTHESIS\r
++FF09          ; disallowed_STD3_mapped ; 0029          # 1.1  FULLWIDTH RIGHT PARENTHESIS\r
++FF0A          ; disallowed_STD3_mapped ; 002A          # 1.1  FULLWIDTH ASTERISK\r
++FF0B          ; disallowed_STD3_mapped ; 002B          # 1.1  FULLWIDTH PLUS SIGN\r
++FF0C          ; disallowed_STD3_mapped ; 002C          # 1.1  FULLWIDTH COMMA\r
++FF0D          ; mapped                 ; 002D          # 1.1  FULLWIDTH HYPHEN-MINUS\r
++FF0E          ; mapped                 ; 002E          # 1.1  FULLWIDTH FULL STOP\r
++FF0F          ; disallowed_STD3_mapped ; 002F          # 1.1  FULLWIDTH SOLIDUS\r
++FF10          ; mapped                 ; 0030          # 1.1  FULLWIDTH DIGIT ZERO\r
++FF11          ; mapped                 ; 0031          # 1.1  FULLWIDTH DIGIT ONE\r
++FF12          ; mapped                 ; 0032          # 1.1  FULLWIDTH DIGIT TWO\r
++FF13          ; mapped                 ; 0033          # 1.1  FULLWIDTH DIGIT THREE\r
++FF14          ; mapped                 ; 0034          # 1.1  FULLWIDTH DIGIT FOUR\r
++FF15          ; mapped                 ; 0035          # 1.1  FULLWIDTH DIGIT FIVE\r
++FF16          ; mapped                 ; 0036          # 1.1  FULLWIDTH DIGIT SIX\r
++FF17          ; mapped                 ; 0037          # 1.1  FULLWIDTH DIGIT SEVEN\r
++FF18          ; mapped                 ; 0038          # 1.1  FULLWIDTH DIGIT EIGHT\r
++FF19          ; mapped                 ; 0039          # 1.1  FULLWIDTH DIGIT NINE\r
++FF1A          ; disallowed_STD3_mapped ; 003A          # 1.1  FULLWIDTH COLON\r
++FF1B          ; disallowed_STD3_mapped ; 003B          # 1.1  FULLWIDTH SEMICOLON\r
++FF1C          ; disallowed_STD3_mapped ; 003C          # 1.1  FULLWIDTH LESS-THAN SIGN\r
++FF1D          ; disallowed_STD3_mapped ; 003D          # 1.1  FULLWIDTH EQUALS SIGN\r
++FF1E          ; disallowed_STD3_mapped ; 003E          # 1.1  FULLWIDTH GREATER-THAN SIGN\r
++FF1F          ; disallowed_STD3_mapped ; 003F          # 1.1  FULLWIDTH QUESTION MARK\r
++FF20          ; disallowed_STD3_mapped ; 0040          # 1.1  FULLWIDTH COMMERCIAL AT\r
++FF21          ; mapped                 ; 0061          # 1.1  FULLWIDTH LATIN CAPITAL LETTER A\r
++FF22          ; mapped                 ; 0062          # 1.1  FULLWIDTH LATIN CAPITAL LETTER B\r
++FF23          ; mapped                 ; 0063          # 1.1  FULLWIDTH LATIN CAPITAL LETTER C\r
++FF24          ; mapped                 ; 0064          # 1.1  FULLWIDTH LATIN CAPITAL LETTER D\r
++FF25          ; mapped                 ; 0065          # 1.1  FULLWIDTH LATIN CAPITAL LETTER E\r
++FF26          ; mapped                 ; 0066          # 1.1  FULLWIDTH LATIN CAPITAL LETTER F\r
++FF27          ; mapped                 ; 0067          # 1.1  FULLWIDTH LATIN CAPITAL LETTER G\r
++FF28          ; mapped                 ; 0068          # 1.1  FULLWIDTH LATIN CAPITAL LETTER H\r
++FF29          ; mapped                 ; 0069          # 1.1  FULLWIDTH LATIN CAPITAL LETTER I\r
++FF2A          ; mapped                 ; 006A          # 1.1  FULLWIDTH LATIN CAPITAL LETTER J\r
++FF2B          ; mapped                 ; 006B          # 1.1  FULLWIDTH LATIN CAPITAL LETTER K\r
++FF2C          ; mapped                 ; 006C          # 1.1  FULLWIDTH LATIN CAPITAL LETTER L\r
++FF2D          ; mapped                 ; 006D          # 1.1  FULLWIDTH LATIN CAPITAL LETTER M\r
++FF2E          ; mapped                 ; 006E          # 1.1  FULLWIDTH LATIN CAPITAL LETTER N\r
++FF2F          ; mapped                 ; 006F          # 1.1  FULLWIDTH LATIN CAPITAL LETTER O\r
++FF30          ; mapped                 ; 0070          # 1.1  FULLWIDTH LATIN CAPITAL LETTER P\r
++FF31          ; mapped                 ; 0071          # 1.1  FULLWIDTH LATIN CAPITAL LETTER Q\r
++FF32          ; mapped                 ; 0072          # 1.1  FULLWIDTH LATIN CAPITAL LETTER R\r
++FF33          ; mapped                 ; 0073          # 1.1  FULLWIDTH LATIN CAPITAL LETTER S\r
++FF34          ; mapped                 ; 0074          # 1.1  FULLWIDTH LATIN CAPITAL LETTER T\r
++FF35          ; mapped                 ; 0075          # 1.1  FULLWIDTH LATIN CAPITAL LETTER U\r
++FF36          ; mapped                 ; 0076          # 1.1  FULLWIDTH LATIN CAPITAL LETTER V\r
++FF37          ; mapped                 ; 0077          # 1.1  FULLWIDTH LATIN CAPITAL LETTER W\r
++FF38          ; mapped                 ; 0078          # 1.1  FULLWIDTH LATIN CAPITAL LETTER X\r
++FF39          ; mapped                 ; 0079          # 1.1  FULLWIDTH LATIN CAPITAL LETTER Y\r
++FF3A          ; mapped                 ; 007A          # 1.1  FULLWIDTH LATIN CAPITAL LETTER Z\r
++FF3B          ; disallowed_STD3_mapped ; 005B          # 1.1  FULLWIDTH LEFT SQUARE BRACKET\r
++FF3C          ; disallowed_STD3_mapped ; 005C          # 1.1  FULLWIDTH REVERSE SOLIDUS\r
++FF3D          ; disallowed_STD3_mapped ; 005D          # 1.1  FULLWIDTH RIGHT SQUARE BRACKET\r
++FF3E          ; disallowed_STD3_mapped ; 005E          # 1.1  FULLWIDTH CIRCUMFLEX ACCENT\r
++FF3F          ; disallowed_STD3_mapped ; 005F          # 1.1  FULLWIDTH LOW LINE\r
++FF40          ; disallowed_STD3_mapped ; 0060          # 1.1  FULLWIDTH GRAVE ACCENT\r
++FF41          ; mapped                 ; 0061          # 1.1  FULLWIDTH LATIN SMALL LETTER A\r
++FF42          ; mapped                 ; 0062          # 1.1  FULLWIDTH LATIN SMALL LETTER B\r
++FF43          ; mapped                 ; 0063          # 1.1  FULLWIDTH LATIN SMALL LETTER C\r
++FF44          ; mapped                 ; 0064          # 1.1  FULLWIDTH LATIN SMALL LETTER D\r
++FF45          ; mapped                 ; 0065          # 1.1  FULLWIDTH LATIN SMALL LETTER E\r
++FF46          ; mapped                 ; 0066          # 1.1  FULLWIDTH LATIN SMALL LETTER F\r
++FF47          ; mapped                 ; 0067          # 1.1  FULLWIDTH LATIN SMALL LETTER G\r
++FF48          ; mapped                 ; 0068          # 1.1  FULLWIDTH LATIN SMALL LETTER H\r
++FF49          ; mapped                 ; 0069          # 1.1  FULLWIDTH LATIN SMALL LETTER I\r
++FF4A          ; mapped                 ; 006A          # 1.1  FULLWIDTH LATIN SMALL LETTER J\r
++FF4B          ; mapped                 ; 006B          # 1.1  FULLWIDTH LATIN SMALL LETTER K\r
++FF4C          ; mapped                 ; 006C          # 1.1  FULLWIDTH LATIN SMALL LETTER L\r
++FF4D          ; mapped                 ; 006D          # 1.1  FULLWIDTH LATIN SMALL LETTER M\r
++FF4E          ; mapped                 ; 006E          # 1.1  FULLWIDTH LATIN SMALL LETTER N\r
++FF4F          ; mapped                 ; 006F          # 1.1  FULLWIDTH LATIN SMALL LETTER O\r
++FF50          ; mapped                 ; 0070          # 1.1  FULLWIDTH LATIN SMALL LETTER P\r
++FF51          ; mapped                 ; 0071          # 1.1  FULLWIDTH LATIN SMALL LETTER Q\r
++FF52          ; mapped                 ; 0072          # 1.1  FULLWIDTH LATIN SMALL LETTER R\r
++FF53          ; mapped                 ; 0073          # 1.1  FULLWIDTH LATIN SMALL LETTER S\r
++FF54          ; mapped                 ; 0074          # 1.1  FULLWIDTH LATIN SMALL LETTER T\r
++FF55          ; mapped                 ; 0075          # 1.1  FULLWIDTH LATIN SMALL LETTER U\r
++FF56          ; mapped                 ; 0076          # 1.1  FULLWIDTH LATIN SMALL LETTER V\r
++FF57          ; mapped                 ; 0077          # 1.1  FULLWIDTH LATIN SMALL LETTER W\r
++FF58          ; mapped                 ; 0078          # 1.1  FULLWIDTH LATIN SMALL LETTER X\r
++FF59          ; mapped                 ; 0079          # 1.1  FULLWIDTH LATIN SMALL LETTER Y\r
++FF5A          ; mapped                 ; 007A          # 1.1  FULLWIDTH LATIN SMALL LETTER Z\r
++FF5B          ; disallowed_STD3_mapped ; 007B          # 1.1  FULLWIDTH LEFT CURLY BRACKET\r
++FF5C          ; disallowed_STD3_mapped ; 007C          # 1.1  FULLWIDTH VERTICAL LINE\r
++FF5D          ; disallowed_STD3_mapped ; 007D          # 1.1  FULLWIDTH RIGHT CURLY BRACKET\r
++FF5E          ; disallowed_STD3_mapped ; 007E          # 1.1  FULLWIDTH TILDE\r
++FF5F          ; mapped                 ; 2985          # 3.2  FULLWIDTH LEFT WHITE PARENTHESIS\r
++FF60          ; mapped                 ; 2986          # 3.2  FULLWIDTH RIGHT WHITE PARENTHESIS\r
++FF61          ; mapped                 ; 002E          # 1.1  HALFWIDTH IDEOGRAPHIC FULL STOP\r
++FF62          ; mapped                 ; 300C          # 1.1  HALFWIDTH LEFT CORNER BRACKET\r
++FF63          ; mapped                 ; 300D          # 1.1  HALFWIDTH RIGHT CORNER BRACKET\r
++FF64          ; mapped                 ; 3001          # 1.1  HALFWIDTH IDEOGRAPHIC COMMA\r
++FF65          ; mapped                 ; 30FB          # 1.1  HALFWIDTH KATAKANA MIDDLE DOT\r
++FF66          ; mapped                 ; 30F2          # 1.1  HALFWIDTH KATAKANA LETTER WO\r
++FF67          ; mapped                 ; 30A1          # 1.1  HALFWIDTH KATAKANA LETTER SMALL A\r
++FF68          ; mapped                 ; 30A3          # 1.1  HALFWIDTH KATAKANA LETTER SMALL I\r
++FF69          ; mapped                 ; 30A5          # 1.1  HALFWIDTH KATAKANA LETTER SMALL U\r
++FF6A          ; mapped                 ; 30A7          # 1.1  HALFWIDTH KATAKANA LETTER SMALL E\r
++FF6B          ; mapped                 ; 30A9          # 1.1  HALFWIDTH KATAKANA LETTER SMALL O\r
++FF6C          ; mapped                 ; 30E3          # 1.1  HALFWIDTH KATAKANA LETTER SMALL YA\r
++FF6D          ; mapped                 ; 30E5          # 1.1  HALFWIDTH KATAKANA LETTER SMALL YU\r
++FF6E          ; mapped                 ; 30E7          # 1.1  HALFWIDTH KATAKANA LETTER SMALL YO\r
++FF6F          ; mapped                 ; 30C3          # 1.1  HALFWIDTH KATAKANA LETTER SMALL TU\r
++FF70          ; mapped                 ; 30FC          # 1.1  HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK\r
++FF71          ; mapped                 ; 30A2          # 1.1  HALFWIDTH KATAKANA LETTER A\r
++FF72          ; mapped                 ; 30A4          # 1.1  HALFWIDTH KATAKANA LETTER I\r
++FF73          ; mapped                 ; 30A6          # 1.1  HALFWIDTH KATAKANA LETTER U\r
++FF74          ; mapped                 ; 30A8          # 1.1  HALFWIDTH KATAKANA LETTER E\r
++FF75          ; mapped                 ; 30AA          # 1.1  HALFWIDTH KATAKANA LETTER O\r
++FF76          ; mapped                 ; 30AB          # 1.1  HALFWIDTH KATAKANA LETTER KA\r
++FF77          ; mapped                 ; 30AD          # 1.1  HALFWIDTH KATAKANA LETTER KI\r
++FF78          ; mapped                 ; 30AF          # 1.1  HALFWIDTH KATAKANA LETTER KU\r
++FF79          ; mapped                 ; 30B1          # 1.1  HALFWIDTH KATAKANA LETTER KE\r
++FF7A          ; mapped                 ; 30B3          # 1.1  HALFWIDTH KATAKANA LETTER KO\r
++FF7B          ; mapped                 ; 30B5          # 1.1  HALFWIDTH KATAKANA LETTER SA\r
++FF7C          ; mapped                 ; 30B7          # 1.1  HALFWIDTH KATAKANA LETTER SI\r
++FF7D          ; mapped                 ; 30B9          # 1.1  HALFWIDTH KATAKANA LETTER SU\r
++FF7E          ; mapped                 ; 30BB          # 1.1  HALFWIDTH KATAKANA LETTER SE\r
++FF7F          ; mapped                 ; 30BD          # 1.1  HALFWIDTH KATAKANA LETTER SO\r
++FF80          ; mapped                 ; 30BF          # 1.1  HALFWIDTH KATAKANA LETTER TA\r
++FF81          ; mapped                 ; 30C1          # 1.1  HALFWIDTH KATAKANA LETTER TI\r
++FF82          ; mapped                 ; 30C4          # 1.1  HALFWIDTH KATAKANA LETTER TU\r
++FF83          ; mapped                 ; 30C6          # 1.1  HALFWIDTH KATAKANA LETTER TE\r
++FF84          ; mapped                 ; 30C8          # 1.1  HALFWIDTH KATAKANA LETTER TO\r
++FF85          ; mapped                 ; 30CA          # 1.1  HALFWIDTH KATAKANA LETTER NA\r
++FF86          ; mapped                 ; 30CB          # 1.1  HALFWIDTH KATAKANA LETTER NI\r
++FF87          ; mapped                 ; 30CC          # 1.1  HALFWIDTH KATAKANA LETTER NU\r
++FF88          ; mapped                 ; 30CD          # 1.1  HALFWIDTH KATAKANA LETTER NE\r
++FF89          ; mapped                 ; 30CE          # 1.1  HALFWIDTH KATAKANA LETTER NO\r
++FF8A          ; mapped                 ; 30CF          # 1.1  HALFWIDTH KATAKANA LETTER HA\r
++FF8B          ; mapped                 ; 30D2          # 1.1  HALFWIDTH KATAKANA LETTER HI\r
++FF8C          ; mapped                 ; 30D5          # 1.1  HALFWIDTH KATAKANA LETTER HU\r
++FF8D          ; mapped                 ; 30D8          # 1.1  HALFWIDTH KATAKANA LETTER HE\r
++FF8E          ; mapped                 ; 30DB          # 1.1  HALFWIDTH KATAKANA LETTER HO\r
++FF8F          ; mapped                 ; 30DE          # 1.1  HALFWIDTH KATAKANA LETTER MA\r
++FF90          ; mapped                 ; 30DF          # 1.1  HALFWIDTH KATAKANA LETTER MI\r
++FF91          ; mapped                 ; 30E0          # 1.1  HALFWIDTH KATAKANA LETTER MU\r
++FF92          ; mapped                 ; 30E1          # 1.1  HALFWIDTH KATAKANA LETTER ME\r
++FF93          ; mapped                 ; 30E2          # 1.1  HALFWIDTH KATAKANA LETTER MO\r
++FF94          ; mapped                 ; 30E4          # 1.1  HALFWIDTH KATAKANA LETTER YA\r
++FF95          ; mapped                 ; 30E6          # 1.1  HALFWIDTH KATAKANA LETTER YU\r
++FF96          ; mapped                 ; 30E8          # 1.1  HALFWIDTH KATAKANA LETTER YO\r
++FF97          ; mapped                 ; 30E9          # 1.1  HALFWIDTH KATAKANA LETTER RA\r
++FF98          ; mapped                 ; 30EA          # 1.1  HALFWIDTH KATAKANA LETTER RI\r
++FF99          ; mapped                 ; 30EB          # 1.1  HALFWIDTH KATAKANA LETTER RU\r
++FF9A          ; mapped                 ; 30EC          # 1.1  HALFWIDTH KATAKANA LETTER RE\r
++FF9B          ; mapped                 ; 30ED          # 1.1  HALFWIDTH KATAKANA LETTER RO\r
++FF9C          ; mapped                 ; 30EF          # 1.1  HALFWIDTH KATAKANA LETTER WA\r
++FF9D          ; mapped                 ; 30F3          # 1.1  HALFWIDTH KATAKANA LETTER N\r
++FF9E          ; mapped                 ; 3099          # 1.1  HALFWIDTH KATAKANA VOICED SOUND MARK\r
++FF9F          ; mapped                 ; 309A          # 1.1  HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK\r
++FFA0          ; disallowed                             # 1.1  HALFWIDTH HANGUL FILLER\r
++FFA1          ; mapped                 ; 1100          # 1.1  HALFWIDTH HANGUL LETTER KIYEOK\r
++FFA2          ; mapped                 ; 1101          # 1.1  HALFWIDTH HANGUL LETTER SSANGKIYEOK\r
++FFA3          ; mapped                 ; 11AA          # 1.1  HALFWIDTH HANGUL LETTER KIYEOK-SIOS\r
++FFA4          ; mapped                 ; 1102          # 1.1  HALFWIDTH HANGUL LETTER NIEUN\r
++FFA5          ; mapped                 ; 11AC          # 1.1  HALFWIDTH HANGUL LETTER NIEUN-CIEUC\r
++FFA6          ; mapped                 ; 11AD          # 1.1  HALFWIDTH HANGUL LETTER NIEUN-HIEUH\r
++FFA7          ; mapped                 ; 1103          # 1.1  HALFWIDTH HANGUL LETTER TIKEUT\r
++FFA8          ; mapped                 ; 1104          # 1.1  HALFWIDTH HANGUL LETTER SSANGTIKEUT\r
++FFA9          ; mapped                 ; 1105          # 1.1  HALFWIDTH HANGUL LETTER RIEUL\r
++FFAA          ; mapped                 ; 11B0          # 1.1  HALFWIDTH HANGUL LETTER RIEUL-KIYEOK\r
++FFAB          ; mapped                 ; 11B1          # 1.1  HALFWIDTH HANGUL LETTER RIEUL-MIEUM\r
++FFAC          ; mapped                 ; 11B2          # 1.1  HALFWIDTH HANGUL LETTER RIEUL-PIEUP\r
++FFAD          ; mapped                 ; 11B3          # 1.1  HALFWIDTH HANGUL LETTER RIEUL-SIOS\r
++FFAE          ; mapped                 ; 11B4          # 1.1  HALFWIDTH HANGUL LETTER RIEUL-THIEUTH\r
++FFAF          ; mapped                 ; 11B5          # 1.1  HALFWIDTH HANGUL LETTER RIEUL-PHIEUPH\r
++FFB0          ; mapped                 ; 111A          # 1.1  HALFWIDTH HANGUL LETTER RIEUL-HIEUH\r
++FFB1          ; mapped                 ; 1106          # 1.1  HALFWIDTH HANGUL LETTER MIEUM\r
++FFB2          ; mapped                 ; 1107          # 1.1  HALFWIDTH HANGUL LETTER PIEUP\r
++FFB3          ; mapped                 ; 1108          # 1.1  HALFWIDTH HANGUL LETTER SSANGPIEUP\r
++FFB4          ; mapped                 ; 1121          # 1.1  HALFWIDTH HANGUL LETTER PIEUP-SIOS\r
++FFB5          ; mapped                 ; 1109          # 1.1  HALFWIDTH HANGUL LETTER SIOS\r
++FFB6          ; mapped                 ; 110A          # 1.1  HALFWIDTH HANGUL LETTER SSANGSIOS\r
++FFB7          ; mapped                 ; 110B          # 1.1  HALFWIDTH HANGUL LETTER IEUNG\r
++FFB8          ; mapped                 ; 110C          # 1.1  HALFWIDTH HANGUL LETTER CIEUC\r
++FFB9          ; mapped                 ; 110D          # 1.1  HALFWIDTH HANGUL LETTER SSANGCIEUC\r
++FFBA          ; mapped                 ; 110E          # 1.1  HALFWIDTH HANGUL LETTER CHIEUCH\r
++FFBB          ; mapped                 ; 110F          # 1.1  HALFWIDTH HANGUL LETTER KHIEUKH\r
++FFBC          ; mapped                 ; 1110          # 1.1  HALFWIDTH HANGUL LETTER THIEUTH\r
++FFBD          ; mapped                 ; 1111          # 1.1  HALFWIDTH HANGUL LETTER PHIEUPH\r
++FFBE          ; mapped                 ; 1112          # 1.1  HALFWIDTH HANGUL LETTER HIEUH\r
++FFBF..FFC1    ; disallowed                             # NA   <reserved-FFBF>..<reserved-FFC1>\r
++FFC2          ; mapped                 ; 1161          # 1.1  HALFWIDTH HANGUL LETTER A\r
++FFC3          ; mapped                 ; 1162          # 1.1  HALFWIDTH HANGUL LETTER AE\r
++FFC4          ; mapped                 ; 1163          # 1.1  HALFWIDTH HANGUL LETTER YA\r
++FFC5          ; mapped                 ; 1164          # 1.1  HALFWIDTH HANGUL LETTER YAE\r
++FFC6          ; mapped                 ; 1165          # 1.1  HALFWIDTH HANGUL LETTER EO\r
++FFC7          ; mapped                 ; 1166          # 1.1  HALFWIDTH HANGUL LETTER E\r
++FFC8..FFC9    ; disallowed                             # NA   <reserved-FFC8>..<reserved-FFC9>\r
++FFCA          ; mapped                 ; 1167          # 1.1  HALFWIDTH HANGUL LETTER YEO\r
++FFCB          ; mapped                 ; 1168          # 1.1  HALFWIDTH HANGUL LETTER YE\r
++FFCC          ; mapped                 ; 1169          # 1.1  HALFWIDTH HANGUL LETTER O\r
++FFCD          ; mapped                 ; 116A          # 1.1  HALFWIDTH HANGUL LETTER WA\r
++FFCE          ; mapped                 ; 116B          # 1.1  HALFWIDTH HANGUL LETTER WAE\r
++FFCF          ; mapped                 ; 116C          # 1.1  HALFWIDTH HANGUL LETTER OE\r
++FFD0..FFD1    ; disallowed                             # NA   <reserved-FFD0>..<reserved-FFD1>\r
++FFD2          ; mapped                 ; 116D          # 1.1  HALFWIDTH HANGUL LETTER YO\r
++FFD3          ; mapped                 ; 116E          # 1.1  HALFWIDTH HANGUL LETTER U\r
++FFD4          ; mapped                 ; 116F          # 1.1  HALFWIDTH HANGUL LETTER WEO\r
++FFD5          ; mapped                 ; 1170          # 1.1  HALFWIDTH HANGUL LETTER WE\r
++FFD6          ; mapped                 ; 1171          # 1.1  HALFWIDTH HANGUL LETTER WI\r
++FFD7          ; mapped                 ; 1172          # 1.1  HALFWIDTH HANGUL LETTER YU\r
++FFD8..FFD9    ; disallowed                             # NA   <reserved-FFD8>..<reserved-FFD9>\r
++FFDA          ; mapped                 ; 1173          # 1.1  HALFWIDTH HANGUL LETTER EU\r
++FFDB          ; mapped                 ; 1174          # 1.1  HALFWIDTH HANGUL LETTER YI\r
++FFDC          ; mapped                 ; 1175          # 1.1  HALFWIDTH HANGUL LETTER I\r
++FFDD..FFDF    ; disallowed                             # NA   <reserved-FFDD>..<reserved-FFDF>\r
++FFE0          ; mapped                 ; 00A2          # 1.1  FULLWIDTH CENT SIGN\r
++FFE1          ; mapped                 ; 00A3          # 1.1  FULLWIDTH POUND SIGN\r
++FFE2          ; mapped                 ; 00AC          # 1.1  FULLWIDTH NOT SIGN\r
++FFE3          ; disallowed_STD3_mapped ; 0020 0304     # 1.1  FULLWIDTH MACRON\r
++FFE4          ; mapped                 ; 00A6          # 1.1  FULLWIDTH BROKEN BAR\r
++FFE5          ; mapped                 ; 00A5          # 1.1  FULLWIDTH YEN SIGN\r
++FFE6          ; mapped                 ; 20A9          # 1.1  FULLWIDTH WON SIGN\r
++FFE7          ; disallowed                             # NA   <reserved-FFE7>\r
++FFE8          ; mapped                 ; 2502          # 1.1  HALFWIDTH FORMS LIGHT VERTICAL\r
++FFE9          ; mapped                 ; 2190          # 1.1  HALFWIDTH LEFTWARDS ARROW\r
++FFEA          ; mapped                 ; 2191          # 1.1  HALFWIDTH UPWARDS ARROW\r
++FFEB          ; mapped                 ; 2192          # 1.1  HALFWIDTH RIGHTWARDS ARROW\r
++FFEC          ; mapped                 ; 2193          # 1.1  HALFWIDTH DOWNWARDS ARROW\r
++FFED          ; mapped                 ; 25A0          # 1.1  HALFWIDTH BLACK SQUARE\r
++FFEE          ; mapped                 ; 25CB          # 1.1  HALFWIDTH WHITE CIRCLE\r
++FFEF..FFF8    ; disallowed                             # NA   <reserved-FFEF>..<reserved-FFF8>\r
++FFF9..FFFB    ; disallowed                             # 3.0  INTERLINEAR ANNOTATION ANCHOR..INTERLINEAR ANNOTATION TERMINATOR\r
++FFFC          ; disallowed                             # 2.1  OBJECT REPLACEMENT CHARACTER\r
++FFFD          ; disallowed                             # 1.1  REPLACEMENT CHARACTER\r
++FFFE..FFFF    ; disallowed                             # 1.1  <noncharacter-FFFE>..<noncharacter-FFFF>\r
++10000..1000B  ; valid                                  # 4.0  LINEAR B SYLLABLE B008 A..LINEAR B SYLLABLE B046 JE\r
++1000C         ; disallowed                             # NA   <reserved-1000C>\r
++1000D..10026  ; valid                                  # 4.0  LINEAR B SYLLABLE B036 JO..LINEAR B SYLLABLE B032 QO\r
++10027         ; disallowed                             # NA   <reserved-10027>\r
++10028..1003A  ; valid                                  # 4.0  LINEAR B SYLLABLE B060 RA..LINEAR B SYLLABLE B042 WO\r
++1003B         ; disallowed                             # NA   <reserved-1003B>\r
++1003C..1003D  ; valid                                  # 4.0  LINEAR B SYLLABLE B017 ZA..LINEAR B SYLLABLE B074 ZE\r
++1003E         ; disallowed                             # NA   <reserved-1003E>\r
++1003F..1004D  ; valid                                  # 4.0  LINEAR B SYLLABLE B020 ZO..LINEAR B SYLLABLE B091 TWO\r
++1004E..1004F  ; disallowed                             # NA   <reserved-1004E>..<reserved-1004F>\r
++10050..1005D  ; valid                                  # 4.0  LINEAR B SYMBOL B018..LINEAR B SYMBOL B089\r
++1005E..1007F  ; disallowed                             # NA   <reserved-1005E>..<reserved-1007F>\r
++10080..100FA  ; valid                                  # 4.0  LINEAR B IDEOGRAM B100 MAN..LINEAR B IDEOGRAM VESSEL B305\r
++100FB..100FF  ; disallowed                             # NA   <reserved-100FB>..<reserved-100FF>\r
++10100..10102  ; valid                  ;      ; NV8    # 4.0  AEGEAN WORD SEPARATOR LINE..AEGEAN CHECK MARK\r
++10103..10106  ; disallowed                             # NA   <reserved-10103>..<reserved-10106>\r
++10107..10133  ; valid                  ;      ; NV8    # 4.0  AEGEAN NUMBER ONE..AEGEAN NUMBER NINETY THOUSAND\r
++10134..10136  ; disallowed                             # NA   <reserved-10134>..<reserved-10136>\r
++10137..1013F  ; valid                  ;      ; NV8    # 4.0  AEGEAN WEIGHT BASE UNIT..AEGEAN MEASURE THIRD SUBUNIT\r
++10140..1018A  ; valid                  ;      ; NV8    # 4.1  GREEK ACROPHONIC ATTIC ONE QUARTER..GREEK ZERO SIGN\r
++1018B..1018C  ; valid                  ;      ; NV8    # 7.0  GREEK ONE QUARTER SIGN..GREEK SINUSOID SIGN\r
++1018D..1018E  ; valid                  ;      ; NV8    # 9.0  GREEK INDICTION SIGN..NOMISMA SIGN\r
++1018F         ; disallowed                             # NA   <reserved-1018F>\r
++10190..1019B  ; valid                  ;      ; NV8    # 5.1  ROMAN SEXTANS SIGN..ROMAN CENTURIAL SIGN\r
++1019C..1019F  ; disallowed                             # NA   <reserved-1019C>..<reserved-1019F>\r
++101A0         ; valid                  ;      ; NV8    # 7.0  GREEK SYMBOL TAU RHO\r
++101A1..101CF  ; disallowed                             # NA   <reserved-101A1>..<reserved-101CF>\r
++101D0..101FC  ; valid                  ;      ; NV8    # 5.1  PHAISTOS DISC SIGN PEDESTRIAN..PHAISTOS DISC SIGN WAVY BAND\r
++101FD         ; valid                                  # 5.1  PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE\r
++101FE..1027F  ; disallowed                             # NA   <reserved-101FE>..<reserved-1027F>\r
++10280..1029C  ; valid                                  # 5.1  LYCIAN LETTER A..LYCIAN LETTER X\r
++1029D..1029F  ; disallowed                             # NA   <reserved-1029D>..<reserved-1029F>\r
++102A0..102D0  ; valid                                  # 5.1  CARIAN LETTER A..CARIAN LETTER UUU3\r
++102D1..102DF  ; disallowed                             # NA   <reserved-102D1>..<reserved-102DF>\r
++102E0         ; valid                                  # 7.0  COPTIC EPACT THOUSANDS MARK\r
++102E1..102FB  ; valid                  ;      ; NV8    # 7.0  COPTIC EPACT DIGIT ONE..COPTIC EPACT NUMBER NINE HUNDRED\r
++102FC..102FF  ; disallowed                             # NA   <reserved-102FC>..<reserved-102FF>\r
++10300..1031E  ; valid                                  # 3.1  OLD ITALIC LETTER A..OLD ITALIC LETTER UU\r
++1031F         ; valid                                  # 7.0  OLD ITALIC LETTER ESS\r
++10320..10323  ; valid                  ;      ; NV8    # 3.1  OLD ITALIC NUMERAL ONE..OLD ITALIC NUMERAL FIFTY\r
++10324..1032C  ; disallowed                             # NA   <reserved-10324>..<reserved-1032C>\r
++1032D..1032F  ; valid                                  # 10.0 OLD ITALIC LETTER YE..OLD ITALIC LETTER SOUTHERN TSE\r
++10330..10340  ; valid                                  # 3.1  GOTHIC LETTER AHSA..GOTHIC LETTER PAIRTHRA\r
++10341         ; valid                  ;      ; NV8    # 3.1  GOTHIC LETTER NINETY\r
++10342..10349  ; valid                                  # 3.1  GOTHIC LETTER RAIDA..GOTHIC LETTER OTHAL\r
++1034A         ; valid                  ;      ; NV8    # 3.1  GOTHIC LETTER NINE HUNDRED\r
++1034B..1034F  ; disallowed                             # NA   <reserved-1034B>..<reserved-1034F>\r
++10350..1037A  ; valid                                  # 7.0  OLD PERMIC LETTER AN..COMBINING OLD PERMIC LETTER SII\r
++1037B..1037F  ; disallowed                             # NA   <reserved-1037B>..<reserved-1037F>\r
++10380..1039D  ; valid                                  # 4.0  UGARITIC LETTER ALPA..UGARITIC LETTER SSU\r
++1039E         ; disallowed                             # NA   <reserved-1039E>\r
++1039F         ; valid                  ;      ; NV8    # 4.0  UGARITIC WORD DIVIDER\r
++103A0..103C3  ; valid                                  # 4.1  OLD PERSIAN SIGN A..OLD PERSIAN SIGN HA\r
++103C4..103C7  ; disallowed                             # NA   <reserved-103C4>..<reserved-103C7>\r
++103C8..103CF  ; valid                                  # 4.1  OLD PERSIAN SIGN AURAMAZDAA..OLD PERSIAN SIGN BUUMISH\r
++103D0..103D5  ; valid                  ;      ; NV8    # 4.1  OLD PERSIAN WORD DIVIDER..OLD PERSIAN NUMBER HUNDRED\r
++103D6..103FF  ; disallowed                             # NA   <reserved-103D6>..<reserved-103FF>\r
++10400         ; mapped                 ; 10428         # 3.1  DESERET CAPITAL LETTER LONG I\r
++10401         ; mapped                 ; 10429         # 3.1  DESERET CAPITAL LETTER LONG E\r
++10402         ; mapped                 ; 1042A         # 3.1  DESERET CAPITAL LETTER LONG A\r
++10403         ; mapped                 ; 1042B         # 3.1  DESERET CAPITAL LETTER LONG AH\r
++10404         ; mapped                 ; 1042C         # 3.1  DESERET CAPITAL LETTER LONG O\r
++10405         ; mapped                 ; 1042D         # 3.1  DESERET CAPITAL LETTER LONG OO\r
++10406         ; mapped                 ; 1042E         # 3.1  DESERET CAPITAL LETTER SHORT I\r
++10407         ; mapped                 ; 1042F         # 3.1  DESERET CAPITAL LETTER SHORT E\r
++10408         ; mapped                 ; 10430         # 3.1  DESERET CAPITAL LETTER SHORT A\r
++10409         ; mapped                 ; 10431         # 3.1  DESERET CAPITAL LETTER SHORT AH\r
++1040A         ; mapped                 ; 10432         # 3.1  DESERET CAPITAL LETTER SHORT O\r
++1040B         ; mapped                 ; 10433         # 3.1  DESERET CAPITAL LETTER SHORT OO\r
++1040C         ; mapped                 ; 10434         # 3.1  DESERET CAPITAL LETTER AY\r
++1040D         ; mapped                 ; 10435         # 3.1  DESERET CAPITAL LETTER OW\r
++1040E         ; mapped                 ; 10436         # 3.1  DESERET CAPITAL LETTER WU\r
++1040F         ; mapped                 ; 10437         # 3.1  DESERET CAPITAL LETTER YEE\r
++10410         ; mapped                 ; 10438         # 3.1  DESERET CAPITAL LETTER H\r
++10411         ; mapped                 ; 10439         # 3.1  DESERET CAPITAL LETTER PEE\r
++10412         ; mapped                 ; 1043A         # 3.1  DESERET CAPITAL LETTER BEE\r
++10413         ; mapped                 ; 1043B         # 3.1  DESERET CAPITAL LETTER TEE\r
++10414         ; mapped                 ; 1043C         # 3.1  DESERET CAPITAL LETTER DEE\r
++10415         ; mapped                 ; 1043D         # 3.1  DESERET CAPITAL LETTER CHEE\r
++10416         ; mapped                 ; 1043E         # 3.1  DESERET CAPITAL LETTER JEE\r
++10417         ; mapped                 ; 1043F         # 3.1  DESERET CAPITAL LETTER KAY\r
++10418         ; mapped                 ; 10440         # 3.1  DESERET CAPITAL LETTER GAY\r
++10419         ; mapped                 ; 10441         # 3.1  DESERET CAPITAL LETTER EF\r
++1041A         ; mapped                 ; 10442         # 3.1  DESERET CAPITAL LETTER VEE\r
++1041B         ; mapped                 ; 10443         # 3.1  DESERET CAPITAL LETTER ETH\r
++1041C         ; mapped                 ; 10444         # 3.1  DESERET CAPITAL LETTER THEE\r
++1041D         ; mapped                 ; 10445         # 3.1  DESERET CAPITAL LETTER ES\r
++1041E         ; mapped                 ; 10446         # 3.1  DESERET CAPITAL LETTER ZEE\r
++1041F         ; mapped                 ; 10447         # 3.1  DESERET CAPITAL LETTER ESH\r
++10420         ; mapped                 ; 10448         # 3.1  DESERET CAPITAL LETTER ZHEE\r
++10421         ; mapped                 ; 10449         # 3.1  DESERET CAPITAL LETTER ER\r
++10422         ; mapped                 ; 1044A         # 3.1  DESERET CAPITAL LETTER EL\r
++10423         ; mapped                 ; 1044B         # 3.1  DESERET CAPITAL LETTER EM\r
++10424         ; mapped                 ; 1044C         # 3.1  DESERET CAPITAL LETTER EN\r
++10425         ; mapped                 ; 1044D         # 3.1  DESERET CAPITAL LETTER ENG\r
++10426         ; mapped                 ; 1044E         # 4.0  DESERET CAPITAL LETTER OI\r
++10427         ; mapped                 ; 1044F         # 4.0  DESERET CAPITAL LETTER EW\r
++10428..1044D  ; valid                                  # 3.1  DESERET SMALL LETTER LONG I..DESERET SMALL LETTER ENG\r
++1044E..1049D  ; valid                                  # 4.0  DESERET SMALL LETTER OI..OSMANYA LETTER OO\r
++1049E..1049F  ; disallowed                             # NA   <reserved-1049E>..<reserved-1049F>\r
++104A0..104A9  ; valid                                  # 4.0  OSMANYA DIGIT ZERO..OSMANYA DIGIT NINE\r
++104AA..104AF  ; disallowed                             # NA   <reserved-104AA>..<reserved-104AF>\r
++104B0         ; mapped                 ; 104D8         # 9.0  OSAGE CAPITAL LETTER A\r
++104B1         ; mapped                 ; 104D9         # 9.0  OSAGE CAPITAL LETTER AI\r
++104B2         ; mapped                 ; 104DA         # 9.0  OSAGE CAPITAL LETTER AIN\r
++104B3         ; mapped                 ; 104DB         # 9.0  OSAGE CAPITAL LETTER AH\r
++104B4         ; mapped                 ; 104DC         # 9.0  OSAGE CAPITAL LETTER BRA\r
++104B5         ; mapped                 ; 104DD         # 9.0  OSAGE CAPITAL LETTER CHA\r
++104B6         ; mapped                 ; 104DE         # 9.0  OSAGE CAPITAL LETTER EHCHA\r
++104B7         ; mapped                 ; 104DF         # 9.0  OSAGE CAPITAL LETTER E\r
++104B8         ; mapped                 ; 104E0         # 9.0  OSAGE CAPITAL LETTER EIN\r
++104B9         ; mapped                 ; 104E1         # 9.0  OSAGE CAPITAL LETTER HA\r
++104BA         ; mapped                 ; 104E2         # 9.0  OSAGE CAPITAL LETTER HYA\r
++104BB         ; mapped                 ; 104E3         # 9.0  OSAGE CAPITAL LETTER I\r
++104BC         ; mapped                 ; 104E4         # 9.0  OSAGE CAPITAL LETTER KA\r
++104BD         ; mapped                 ; 104E5         # 9.0  OSAGE CAPITAL LETTER EHKA\r
++104BE         ; mapped                 ; 104E6         # 9.0  OSAGE CAPITAL LETTER KYA\r
++104BF         ; mapped                 ; 104E7         # 9.0  OSAGE CAPITAL LETTER LA\r
++104C0         ; mapped                 ; 104E8         # 9.0  OSAGE CAPITAL LETTER MA\r
++104C1         ; mapped                 ; 104E9         # 9.0  OSAGE CAPITAL LETTER NA\r
++104C2         ; mapped                 ; 104EA         # 9.0  OSAGE CAPITAL LETTER O\r
++104C3         ; mapped                 ; 104EB         # 9.0  OSAGE CAPITAL LETTER OIN\r
++104C4         ; mapped                 ; 104EC         # 9.0  OSAGE CAPITAL LETTER PA\r
++104C5         ; mapped                 ; 104ED         # 9.0  OSAGE CAPITAL LETTER EHPA\r
++104C6         ; mapped                 ; 104EE         # 9.0  OSAGE CAPITAL LETTER SA\r
++104C7         ; mapped                 ; 104EF         # 9.0  OSAGE CAPITAL LETTER SHA\r
++104C8         ; mapped                 ; 104F0         # 9.0  OSAGE CAPITAL LETTER TA\r
++104C9         ; mapped                 ; 104F1         # 9.0  OSAGE CAPITAL LETTER EHTA\r
++104CA         ; mapped                 ; 104F2         # 9.0  OSAGE CAPITAL LETTER TSA\r
++104CB         ; mapped                 ; 104F3         # 9.0  OSAGE CAPITAL LETTER EHTSA\r
++104CC         ; mapped                 ; 104F4         # 9.0  OSAGE CAPITAL LETTER TSHA\r
++104CD         ; mapped                 ; 104F5         # 9.0  OSAGE CAPITAL LETTER DHA\r
++104CE         ; mapped                 ; 104F6         # 9.0  OSAGE CAPITAL LETTER U\r
++104CF         ; mapped                 ; 104F7         # 9.0  OSAGE CAPITAL LETTER WA\r
++104D0         ; mapped                 ; 104F8         # 9.0  OSAGE CAPITAL LETTER KHA\r
++104D1         ; mapped                 ; 104F9         # 9.0  OSAGE CAPITAL LETTER GHA\r
++104D2         ; mapped                 ; 104FA         # 9.0  OSAGE CAPITAL LETTER ZA\r
++104D3         ; mapped                 ; 104FB         # 9.0  OSAGE CAPITAL LETTER ZHA\r
++104D4..104D7  ; disallowed                             # NA   <reserved-104D4>..<reserved-104D7>\r
++104D8..104FB  ; valid                                  # 9.0  OSAGE SMALL LETTER A..OSAGE SMALL LETTER ZHA\r
++104FC..104FF  ; disallowed                             # NA   <reserved-104FC>..<reserved-104FF>\r
++10500..10527  ; valid                                  # 7.0  ELBASAN LETTER A..ELBASAN LETTER KHE\r
++10528..1052F  ; disallowed                             # NA   <reserved-10528>..<reserved-1052F>\r
++10530..10563  ; valid                                  # 7.0  CAUCASIAN ALBANIAN LETTER ALT..CAUCASIAN ALBANIAN LETTER KIW\r
++10564..1056E  ; disallowed                             # NA   <reserved-10564>..<reserved-1056E>\r
++1056F         ; valid                  ;      ; NV8    # 7.0  CAUCASIAN ALBANIAN CITATION MARK\r
++10570..105FF  ; disallowed                             # NA   <reserved-10570>..<reserved-105FF>\r
++10600..10736  ; valid                                  # 7.0  LINEAR A SIGN AB001..LINEAR A SIGN A664\r
++10737..1073F  ; disallowed                             # NA   <reserved-10737>..<reserved-1073F>\r
++10740..10755  ; valid                                  # 7.0  LINEAR A SIGN A701 A..LINEAR A SIGN A732 JE\r
++10756..1075F  ; disallowed                             # NA   <reserved-10756>..<reserved-1075F>\r
++10760..10767  ; valid                                  # 7.0  LINEAR A SIGN A800..LINEAR A SIGN A807\r
++10768..107FF  ; disallowed                             # NA   <reserved-10768>..<reserved-107FF>\r
++10800..10805  ; valid                                  # 4.0  CYPRIOT SYLLABLE A..CYPRIOT SYLLABLE JA\r
++10806..10807  ; disallowed                             # NA   <reserved-10806>..<reserved-10807>\r
++10808         ; valid                                  # 4.0  CYPRIOT SYLLABLE JO\r
++10809         ; disallowed                             # NA   <reserved-10809>\r
++1080A..10835  ; valid                                  # 4.0  CYPRIOT SYLLABLE KA..CYPRIOT SYLLABLE WO\r
++10836         ; disallowed                             # NA   <reserved-10836>\r
++10837..10838  ; valid                                  # 4.0  CYPRIOT SYLLABLE XA..CYPRIOT SYLLABLE XE\r
++10839..1083B  ; disallowed                             # NA   <reserved-10839>..<reserved-1083B>\r
++1083C         ; valid                                  # 4.0  CYPRIOT SYLLABLE ZA\r
++1083D..1083E  ; disallowed                             # NA   <reserved-1083D>..<reserved-1083E>\r
++1083F         ; valid                                  # 4.0  CYPRIOT SYLLABLE ZO\r
++10840..10855  ; valid                                  # 5.2  IMPERIAL ARAMAIC LETTER ALEPH..IMPERIAL ARAMAIC LETTER TAW\r
++10856         ; disallowed                             # NA   <reserved-10856>\r
++10857..1085F  ; valid                  ;      ; NV8    # 5.2  IMPERIAL ARAMAIC SECTION SIGN..IMPERIAL ARAMAIC NUMBER TEN THOUSAND\r
++10860..10876  ; valid                                  # 7.0  PALMYRENE LETTER ALEPH..PALMYRENE LETTER TAW\r
++10877..1087F  ; valid                  ;      ; NV8    # 7.0  PALMYRENE LEFT-POINTING FLEURON..PALMYRENE NUMBER TWENTY\r
++10880..1089E  ; valid                                  # 7.0  NABATAEAN LETTER FINAL ALEPH..NABATAEAN LETTER TAW\r
++1089F..108A6  ; disallowed                             # NA   <reserved-1089F>..<reserved-108A6>\r
++108A7..108AF  ; valid                  ;      ; NV8    # 7.0  NABATAEAN NUMBER ONE..NABATAEAN NUMBER ONE HUNDRED\r
++108B0..108DF  ; disallowed                             # NA   <reserved-108B0>..<reserved-108DF>\r
++108E0..108F2  ; valid                                  # 8.0  HATRAN LETTER ALEPH..HATRAN LETTER QOPH\r
++108F3         ; disallowed                             # NA   <reserved-108F3>\r
++108F4..108F5  ; valid                                  # 8.0  HATRAN LETTER SHIN..HATRAN LETTER TAW\r
++108F6..108FA  ; disallowed                             # NA   <reserved-108F6>..<reserved-108FA>\r
++108FB..108FF  ; valid                  ;      ; NV8    # 8.0  HATRAN NUMBER ONE..HATRAN NUMBER ONE HUNDRED\r
++10900..10915  ; valid                                  # 5.0  PHOENICIAN LETTER ALF..PHOENICIAN LETTER TAU\r
++10916..10919  ; valid                  ;      ; NV8    # 5.0  PHOENICIAN NUMBER ONE..PHOENICIAN NUMBER ONE HUNDRED\r
++1091A..1091B  ; valid                  ;      ; NV8    # 5.2  PHOENICIAN NUMBER TWO..PHOENICIAN NUMBER THREE\r
++1091C..1091E  ; disallowed                             # NA   <reserved-1091C>..<reserved-1091E>\r
++1091F         ; valid                  ;      ; NV8    # 5.0  PHOENICIAN WORD SEPARATOR\r
++10920..10939  ; valid                                  # 5.1  LYDIAN LETTER A..LYDIAN LETTER C\r
++1093A..1093E  ; disallowed                             # NA   <reserved-1093A>..<reserved-1093E>\r
++1093F         ; valid                  ;      ; NV8    # 5.1  LYDIAN TRIANGULAR MARK\r
++10940..1097F  ; disallowed                             # NA   <reserved-10940>..<reserved-1097F>\r
++10980..109B7  ; valid                                  # 6.1  MEROITIC HIEROGLYPHIC LETTER A..MEROITIC CURSIVE LETTER DA\r
++109B8..109BB  ; disallowed                             # NA   <reserved-109B8>..<reserved-109BB>\r
++109BC..109BD  ; valid                  ;      ; NV8    # 8.0  MEROITIC CURSIVE FRACTION ELEVEN TWELFTHS..MEROITIC CURSIVE FRACTION ONE HALF\r
++109BE..109BF  ; valid                                  # 6.1  MEROITIC CURSIVE LOGOGRAM RMT..MEROITIC CURSIVE LOGOGRAM IMN\r
++109C0..109CF  ; valid                  ;      ; NV8    # 8.0  MEROITIC CURSIVE NUMBER ONE..MEROITIC CURSIVE NUMBER SEVENTY\r
++109D0..109D1  ; disallowed                             # NA   <reserved-109D0>..<reserved-109D1>\r
++109D2..109FF  ; valid                  ;      ; NV8    # 8.0  MEROITIC CURSIVE NUMBER ONE HUNDRED..MEROITIC CURSIVE FRACTION TEN TWELFTHS\r
++10A00..10A03  ; valid                                  # 4.1  KHAROSHTHI LETTER A..KHAROSHTHI VOWEL SIGN VOCALIC R\r
++10A04         ; disallowed                             # NA   <reserved-10A04>\r
++10A05..10A06  ; valid                                  # 4.1  KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O\r
++10A07..10A0B  ; disallowed                             # NA   <reserved-10A07>..<reserved-10A0B>\r
++10A0C..10A13  ; valid                                  # 4.1  KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI LETTER GHA\r
++10A14         ; disallowed                             # NA   <reserved-10A14>\r
++10A15..10A17  ; valid                                  # 4.1  KHAROSHTHI LETTER CA..KHAROSHTHI LETTER JA\r
++10A18         ; disallowed                             # NA   <reserved-10A18>\r
++10A19..10A33  ; valid                                  # 4.1  KHAROSHTHI LETTER NYA..KHAROSHTHI LETTER TTTHA\r
++10A34..10A37  ; disallowed                             # NA   <reserved-10A34>..<reserved-10A37>\r
++10A38..10A3A  ; valid                                  # 4.1  KHAROSHTHI SIGN BAR ABOVE..KHAROSHTHI SIGN DOT BELOW\r
++10A3B..10A3E  ; disallowed                             # NA   <reserved-10A3B>..<reserved-10A3E>\r
++10A3F         ; valid                                  # 4.1  KHAROSHTHI VIRAMA\r
++10A40..10A47  ; valid                  ;      ; NV8    # 4.1  KHAROSHTHI DIGIT ONE..KHAROSHTHI NUMBER ONE THOUSAND\r
++10A48..10A4F  ; disallowed                             # NA   <reserved-10A48>..<reserved-10A4F>\r
++10A50..10A58  ; valid                  ;      ; NV8    # 4.1  KHAROSHTHI PUNCTUATION DOT..KHAROSHTHI PUNCTUATION LINES\r
++10A59..10A5F  ; disallowed                             # NA   <reserved-10A59>..<reserved-10A5F>\r
++10A60..10A7C  ; valid                                  # 5.2  OLD SOUTH ARABIAN LETTER HE..OLD SOUTH ARABIAN LETTER THETH\r
++10A7D..10A7F  ; valid                  ;      ; NV8    # 5.2  OLD SOUTH ARABIAN NUMBER ONE..OLD SOUTH ARABIAN NUMERIC INDICATOR\r
++10A80..10A9C  ; valid                                  # 7.0  OLD NORTH ARABIAN LETTER HEH..OLD NORTH ARABIAN LETTER ZAH\r
++10A9D..10A9F  ; valid                  ;      ; NV8    # 7.0  OLD NORTH ARABIAN NUMBER ONE..OLD NORTH ARABIAN NUMBER TWENTY\r
++10AA0..10ABF  ; disallowed                             # NA   <reserved-10AA0>..<reserved-10ABF>\r
++10AC0..10AC7  ; valid                                  # 7.0  MANICHAEAN LETTER ALEPH..MANICHAEAN LETTER WAW\r
++10AC8         ; valid                  ;      ; NV8    # 7.0  MANICHAEAN SIGN UD\r
++10AC9..10AE6  ; valid                                  # 7.0  MANICHAEAN LETTER ZAYIN..MANICHAEAN ABBREVIATION MARK BELOW\r
++10AE7..10AEA  ; disallowed                             # NA   <reserved-10AE7>..<reserved-10AEA>\r
++10AEB..10AF6  ; valid                  ;      ; NV8    # 7.0  MANICHAEAN NUMBER ONE..MANICHAEAN PUNCTUATION LINE FILLER\r
++10AF7..10AFF  ; disallowed                             # NA   <reserved-10AF7>..<reserved-10AFF>\r
++10B00..10B35  ; valid                                  # 5.2  AVESTAN LETTER A..AVESTAN LETTER HE\r
++10B36..10B38  ; disallowed                             # NA   <reserved-10B36>..<reserved-10B38>\r
++10B39..10B3F  ; valid                  ;      ; NV8    # 5.2  AVESTAN ABBREVIATION MARK..LARGE ONE RING OVER TWO RINGS PUNCTUATION\r
++10B40..10B55  ; valid                                  # 5.2  INSCRIPTIONAL PARTHIAN LETTER ALEPH..INSCRIPTIONAL PARTHIAN LETTER TAW\r
++10B56..10B57  ; disallowed                             # NA   <reserved-10B56>..<reserved-10B57>\r
++10B58..10B5F  ; valid                  ;      ; NV8    # 5.2  INSCRIPTIONAL PARTHIAN NUMBER ONE..INSCRIPTIONAL PARTHIAN NUMBER ONE THOUSAND\r
++10B60..10B72  ; valid                                  # 5.2  INSCRIPTIONAL PAHLAVI LETTER ALEPH..INSCRIPTIONAL PAHLAVI LETTER TAW\r
++10B73..10B77  ; disallowed                             # NA   <reserved-10B73>..<reserved-10B77>\r
++10B78..10B7F  ; valid                  ;      ; NV8    # 5.2  INSCRIPTIONAL PAHLAVI NUMBER ONE..INSCRIPTIONAL PAHLAVI NUMBER ONE THOUSAND\r
++10B80..10B91  ; valid                                  # 7.0  PSALTER PAHLAVI LETTER ALEPH..PSALTER PAHLAVI LETTER TAW\r
++10B92..10B98  ; disallowed                             # NA   <reserved-10B92>..<reserved-10B98>\r
++10B99..10B9C  ; valid                  ;      ; NV8    # 7.0  PSALTER PAHLAVI SECTION MARK..PSALTER PAHLAVI FOUR DOTS WITH DOT\r
++10B9D..10BA8  ; disallowed                             # NA   <reserved-10B9D>..<reserved-10BA8>\r
++10BA9..10BAF  ; valid                  ;      ; NV8    # 7.0  PSALTER PAHLAVI NUMBER ONE..PSALTER PAHLAVI NUMBER ONE HUNDRED\r
++10BB0..10BFF  ; disallowed                             # NA   <reserved-10BB0>..<reserved-10BFF>\r
++10C00..10C48  ; valid                                  # 5.2  OLD TURKIC LETTER ORKHON A..OLD TURKIC LETTER ORKHON BASH\r
++10C49..10C7F  ; disallowed                             # NA   <reserved-10C49>..<reserved-10C7F>\r
++10C80         ; mapped                 ; 10CC0         # 8.0  OLD HUNGARIAN CAPITAL LETTER A\r
++10C81         ; mapped                 ; 10CC1         # 8.0  OLD HUNGARIAN CAPITAL LETTER AA\r
++10C82         ; mapped                 ; 10CC2         # 8.0  OLD HUNGARIAN CAPITAL LETTER EB\r
++10C83         ; mapped                 ; 10CC3         # 8.0  OLD HUNGARIAN CAPITAL LETTER AMB\r
++10C84         ; mapped                 ; 10CC4         # 8.0  OLD HUNGARIAN CAPITAL LETTER EC\r
++10C85         ; mapped                 ; 10CC5         # 8.0  OLD HUNGARIAN CAPITAL LETTER ENC\r
++10C86         ; mapped                 ; 10CC6         # 8.0  OLD HUNGARIAN CAPITAL LETTER ECS\r
++10C87         ; mapped                 ; 10CC7         # 8.0  OLD HUNGARIAN CAPITAL LETTER ED\r
++10C88         ; mapped                 ; 10CC8         # 8.0  OLD HUNGARIAN CAPITAL LETTER AND\r
++10C89         ; mapped                 ; 10CC9         # 8.0  OLD HUNGARIAN CAPITAL LETTER E\r
++10C8A         ; mapped                 ; 10CCA         # 8.0  OLD HUNGARIAN CAPITAL LETTER CLOSE E\r
++10C8B         ; mapped                 ; 10CCB         # 8.0  OLD HUNGARIAN CAPITAL LETTER EE\r
++10C8C         ; mapped                 ; 10CCC         # 8.0  OLD HUNGARIAN CAPITAL LETTER EF\r
++10C8D         ; mapped                 ; 10CCD         # 8.0  OLD HUNGARIAN CAPITAL LETTER EG\r
++10C8E         ; mapped                 ; 10CCE         # 8.0  OLD HUNGARIAN CAPITAL LETTER EGY\r
++10C8F         ; mapped                 ; 10CCF         # 8.0  OLD HUNGARIAN CAPITAL LETTER EH\r
++10C90         ; mapped                 ; 10CD0         # 8.0  OLD HUNGARIAN CAPITAL LETTER I\r
++10C91         ; mapped                 ; 10CD1         # 8.0  OLD HUNGARIAN CAPITAL LETTER II\r
++10C92         ; mapped                 ; 10CD2         # 8.0  OLD HUNGARIAN CAPITAL LETTER EJ\r
++10C93         ; mapped                 ; 10CD3         # 8.0  OLD HUNGARIAN CAPITAL LETTER EK\r
++10C94         ; mapped                 ; 10CD4         # 8.0  OLD HUNGARIAN CAPITAL LETTER AK\r
++10C95         ; mapped                 ; 10CD5         # 8.0  OLD HUNGARIAN CAPITAL LETTER UNK\r
++10C96         ; mapped                 ; 10CD6         # 8.0  OLD HUNGARIAN CAPITAL LETTER EL\r
++10C97         ; mapped                 ; 10CD7         # 8.0  OLD HUNGARIAN CAPITAL LETTER ELY\r
++10C98         ; mapped                 ; 10CD8         # 8.0  OLD HUNGARIAN CAPITAL LETTER EM\r
++10C99         ; mapped                 ; 10CD9         # 8.0  OLD HUNGARIAN CAPITAL LETTER EN\r
++10C9A         ; mapped                 ; 10CDA         # 8.0  OLD HUNGARIAN CAPITAL LETTER ENY\r
++10C9B         ; mapped                 ; 10CDB         # 8.0  OLD HUNGARIAN CAPITAL LETTER O\r
++10C9C         ; mapped                 ; 10CDC         # 8.0  OLD HUNGARIAN CAPITAL LETTER OO\r
++10C9D         ; mapped                 ; 10CDD         # 8.0  OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG OE\r
++10C9E         ; mapped                 ; 10CDE         # 8.0  OLD HUNGARIAN CAPITAL LETTER RUDIMENTA OE\r
++10C9F         ; mapped                 ; 10CDF         # 8.0  OLD HUNGARIAN CAPITAL LETTER OEE\r
++10CA0         ; mapped                 ; 10CE0         # 8.0  OLD HUNGARIAN CAPITAL LETTER EP\r
++10CA1         ; mapped                 ; 10CE1         # 8.0  OLD HUNGARIAN CAPITAL LETTER EMP\r
++10CA2         ; mapped                 ; 10CE2         # 8.0  OLD HUNGARIAN CAPITAL LETTER ER\r
++10CA3         ; mapped                 ; 10CE3         # 8.0  OLD HUNGARIAN CAPITAL LETTER SHORT ER\r
++10CA4         ; mapped                 ; 10CE4         # 8.0  OLD HUNGARIAN CAPITAL LETTER ES\r
++10CA5         ; mapped                 ; 10CE5         # 8.0  OLD HUNGARIAN CAPITAL LETTER ESZ\r
++10CA6         ; mapped                 ; 10CE6         # 8.0  OLD HUNGARIAN CAPITAL LETTER ET\r
++10CA7         ; mapped                 ; 10CE7         # 8.0  OLD HUNGARIAN CAPITAL LETTER ENT\r
++10CA8         ; mapped                 ; 10CE8         # 8.0  OLD HUNGARIAN CAPITAL LETTER ETY\r
++10CA9         ; mapped                 ; 10CE9         # 8.0  OLD HUNGARIAN CAPITAL LETTER ECH\r
++10CAA         ; mapped                 ; 10CEA         # 8.0  OLD HUNGARIAN CAPITAL LETTER U\r
++10CAB         ; mapped                 ; 10CEB         # 8.0  OLD HUNGARIAN CAPITAL LETTER UU\r
++10CAC         ; mapped                 ; 10CEC         # 8.0  OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG UE\r
++10CAD         ; mapped                 ; 10CED         # 8.0  OLD HUNGARIAN CAPITAL LETTER RUDIMENTA UE\r
++10CAE         ; mapped                 ; 10CEE         # 8.0  OLD HUNGARIAN CAPITAL LETTER EV\r
++10CAF         ; mapped                 ; 10CEF         # 8.0  OLD HUNGARIAN CAPITAL LETTER EZ\r
++10CB0         ; mapped                 ; 10CF0         # 8.0  OLD HUNGARIAN CAPITAL LETTER EZS\r
++10CB1         ; mapped                 ; 10CF1         # 8.0  OLD HUNGARIAN CAPITAL LETTER ENT-SHAPED SIGN\r
++10CB2         ; mapped                 ; 10CF2         # 8.0  OLD HUNGARIAN CAPITAL LETTER US\r
++10CB3..10CBF  ; disallowed                             # NA   <reserved-10CB3>..<reserved-10CBF>\r
++10CC0..10CF2  ; valid                                  # 8.0  OLD HUNGARIAN SMALL LETTER A..OLD HUNGARIAN SMALL LETTER US\r
++10CF3..10CF9  ; disallowed                             # NA   <reserved-10CF3>..<reserved-10CF9>\r
++10CFA..10CFF  ; valid                  ;      ; NV8    # 8.0  OLD HUNGARIAN NUMBER ONE..OLD HUNGARIAN NUMBER ONE THOUSAND\r
++10D00..10E5F  ; disallowed                             # NA   <reserved-10D00>..<reserved-10E5F>\r
++10E60..10E7E  ; valid                  ;      ; NV8    # 5.2  RUMI DIGIT ONE..RUMI FRACTION TWO THIRDS\r
++10E7F..10FFF  ; disallowed                             # NA   <reserved-10E7F>..<reserved-10FFF>\r
++11000..11046  ; valid                                  # 6.0  BRAHMI SIGN CANDRABINDU..BRAHMI VIRAMA\r
++11047..1104D  ; valid                  ;      ; NV8    # 6.0  BRAHMI DANDA..BRAHMI PUNCTUATION LOTUS\r
++1104E..11051  ; disallowed                             # NA   <reserved-1104E>..<reserved-11051>\r
++11052..11065  ; valid                  ;      ; NV8    # 6.0  BRAHMI NUMBER ONE..BRAHMI NUMBER ONE THOUSAND\r
++11066..1106F  ; valid                                  # 6.0  BRAHMI DIGIT ZERO..BRAHMI DIGIT NINE\r
++11070..1107E  ; disallowed                             # NA   <reserved-11070>..<reserved-1107E>\r
++1107F         ; valid                                  # 7.0  BRAHMI NUMBER JOINER\r
++11080..110BA  ; valid                                  # 5.2  KAITHI SIGN CANDRABINDU..KAITHI SIGN NUKTA\r
++110BB..110BC  ; valid                  ;      ; NV8    # 5.2  KAITHI ABBREVIATION SIGN..KAITHI ENUMERATION SIGN\r
++110BD         ; disallowed                             # 5.2  KAITHI NUMBER SIGN\r
++110BE..110C1  ; valid                  ;      ; NV8    # 5.2  KAITHI SECTION MARK..KAITHI DOUBLE DANDA\r
++110C2..110CF  ; disallowed                             # NA   <reserved-110C2>..<reserved-110CF>\r
++110D0..110E8  ; valid                                  # 6.1  SORA SOMPENG LETTER SAH..SORA SOMPENG LETTER MAE\r
++110E9..110EF  ; disallowed                             # NA   <reserved-110E9>..<reserved-110EF>\r
++110F0..110F9  ; valid                                  # 6.1  SORA SOMPENG DIGIT ZERO..SORA SOMPENG DIGIT NINE\r
++110FA..110FF  ; disallowed                             # NA   <reserved-110FA>..<reserved-110FF>\r
++11100..11134  ; valid                                  # 6.1  CHAKMA SIGN CANDRABINDU..CHAKMA MAAYYAA\r
++11135         ; disallowed                             # NA   <reserved-11135>\r
++11136..1113F  ; valid                                  # 6.1  CHAKMA DIGIT ZERO..CHAKMA DIGIT NINE\r
++11140..11143  ; valid                  ;      ; NV8    # 6.1  CHAKMA SECTION MARK..CHAKMA QUESTION MARK\r
++11144..1114F  ; disallowed                             # NA   <reserved-11144>..<reserved-1114F>\r
++11150..11173  ; valid                                  # 7.0  MAHAJANI LETTER A..MAHAJANI SIGN NUKTA\r
++11174..11175  ; valid                  ;      ; NV8    # 7.0  MAHAJANI ABBREVIATION SIGN..MAHAJANI SECTION MARK\r
++11176         ; valid                                  # 7.0  MAHAJANI LIGATURE SHRI\r
++11177..1117F  ; disallowed                             # NA   <reserved-11177>..<reserved-1117F>\r
++11180..111C4  ; valid                                  # 6.1  SHARADA SIGN CANDRABINDU..SHARADA OM\r
++111C5..111C8  ; valid                  ;      ; NV8    # 6.1  SHARADA DANDA..SHARADA SEPARATOR\r
++111C9         ; valid                  ;      ; NV8    # 8.0  SHARADA SANDHI MARK\r
++111CA..111CC  ; valid                                  # 8.0  SHARADA SIGN NUKTA..SHARADA EXTRA SHORT VOWEL MARK\r
++111CD         ; valid                  ;      ; NV8    # 7.0  SHARADA SUTRA MARK\r
++111CE..111CF  ; disallowed                             # NA   <reserved-111CE>..<reserved-111CF>\r
++111D0..111D9  ; valid                                  # 6.1  SHARADA DIGIT ZERO..SHARADA DIGIT NINE\r
++111DA         ; valid                                  # 7.0  SHARADA EKAM\r
++111DB         ; valid                  ;      ; NV8    # 8.0  SHARADA SIGN SIDDHAM\r
++111DC         ; valid                                  # 8.0  SHARADA HEADSTROKE\r
++111DD..111DF  ; valid                  ;      ; NV8    # 8.0  SHARADA CONTINUATION SIGN..SHARADA SECTION MARK-2\r
++111E0         ; disallowed                             # NA   <reserved-111E0>\r
++111E1..111F4  ; valid                  ;      ; NV8    # 7.0  SINHALA ARCHAIC DIGIT ONE..SINHALA ARCHAIC NUMBER ONE THOUSAND\r
++111F5..111FF  ; disallowed                             # NA   <reserved-111F5>..<reserved-111FF>\r
++11200..11211  ; valid                                  # 7.0  KHOJKI LETTER A..KHOJKI LETTER JJA\r
++11212         ; disallowed                             # NA   <reserved-11212>\r
++11213..11237  ; valid                                  # 7.0  KHOJKI LETTER NYA..KHOJKI SIGN SHADDA\r
++11238..1123D  ; valid                  ;      ; NV8    # 7.0  KHOJKI DANDA..KHOJKI ABBREVIATION SIGN\r
++1123E         ; valid                                  # 9.0  KHOJKI SIGN SUKUN\r
++1123F..1127F  ; disallowed                             # NA   <reserved-1123F>..<reserved-1127F>\r
++11280..11286  ; valid                                  # 8.0  MULTANI LETTER A..MULTANI LETTER GA\r
++11287         ; disallowed                             # NA   <reserved-11287>\r
++11288         ; valid                                  # 8.0  MULTANI LETTER GHA\r
++11289         ; disallowed                             # NA   <reserved-11289>\r
++1128A..1128D  ; valid                                  # 8.0  MULTANI LETTER CA..MULTANI LETTER JJA\r
++1128E         ; disallowed                             # NA   <reserved-1128E>\r
++1128F..1129D  ; valid                                  # 8.0  MULTANI LETTER NYA..MULTANI LETTER BA\r
++1129E         ; disallowed                             # NA   <reserved-1129E>\r
++1129F..112A8  ; valid                                  # 8.0  MULTANI LETTER BHA..MULTANI LETTER RHA\r
++112A9         ; valid                  ;      ; NV8    # 8.0  MULTANI SECTION MARK\r
++112AA..112AF  ; disallowed                             # NA   <reserved-112AA>..<reserved-112AF>\r
++112B0..112EA  ; valid                                  # 7.0  KHUDAWADI LETTER A..KHUDAWADI SIGN VIRAMA\r
++112EB..112EF  ; disallowed                             # NA   <reserved-112EB>..<reserved-112EF>\r
++112F0..112F9  ; valid                                  # 7.0  KHUDAWADI DIGIT ZERO..KHUDAWADI DIGIT NINE\r
++112FA..112FF  ; disallowed                             # NA   <reserved-112FA>..<reserved-112FF>\r
++11300         ; valid                                  # 8.0  GRANTHA SIGN COMBINING ANUSVARA ABOVE\r
++11301..11303  ; valid                                  # 7.0  GRANTHA SIGN CANDRABINDU..GRANTHA SIGN VISARGA\r
++11304         ; disallowed                             # NA   <reserved-11304>\r
++11305..1130C  ; valid                                  # 7.0  GRANTHA LETTER A..GRANTHA LETTER VOCALIC L\r
++1130D..1130E  ; disallowed                             # NA   <reserved-1130D>..<reserved-1130E>\r
++1130F..11310  ; valid                                  # 7.0  GRANTHA LETTER EE..GRANTHA LETTER AI\r
++11311..11312  ; disallowed                             # NA   <reserved-11311>..<reserved-11312>\r
++11313..11328  ; valid                                  # 7.0  GRANTHA LETTER OO..GRANTHA LETTER NA\r
++11329         ; disallowed                             # NA   <reserved-11329>\r
++1132A..11330  ; valid                                  # 7.0  GRANTHA LETTER PA..GRANTHA LETTER RA\r
++11331         ; disallowed                             # NA   <reserved-11331>\r
++11332..11333  ; valid                                  # 7.0  GRANTHA LETTER LA..GRANTHA LETTER LLA\r
++11334         ; disallowed                             # NA   <reserved-11334>\r
++11335..11339  ; valid                                  # 7.0  GRANTHA LETTER VA..GRANTHA LETTER HA\r
++1133A..1133B  ; disallowed                             # NA   <reserved-1133A>..<reserved-1133B>\r
++1133C..11344  ; valid                                  # 7.0  GRANTHA SIGN NUKTA..GRANTHA VOWEL SIGN VOCALIC RR\r
++11345..11346  ; disallowed                             # NA   <reserved-11345>..<reserved-11346>\r
++11347..11348  ; valid                                  # 7.0  GRANTHA VOWEL SIGN EE..GRANTHA VOWEL SIGN AI\r
++11349..1134A  ; disallowed                             # NA   <reserved-11349>..<reserved-1134A>\r
++1134B..1134D  ; valid                                  # 7.0  GRANTHA VOWEL SIGN OO..GRANTHA SIGN VIRAMA\r
++1134E..1134F  ; disallowed                             # NA   <reserved-1134E>..<reserved-1134F>\r
++11350         ; valid                                  # 8.0  GRANTHA OM\r
++11351..11356  ; disallowed                             # NA   <reserved-11351>..<reserved-11356>\r
++11357         ; valid                                  # 7.0  GRANTHA AU LENGTH MARK\r
++11358..1135C  ; disallowed                             # NA   <reserved-11358>..<reserved-1135C>\r
++1135D..11363  ; valid                                  # 7.0  GRANTHA SIGN PLUTA..GRANTHA VOWEL SIGN VOCALIC LL\r
++11364..11365  ; disallowed                             # NA   <reserved-11364>..<reserved-11365>\r
++11366..1136C  ; valid                                  # 7.0  COMBINING GRANTHA DIGIT ZERO..COMBINING GRANTHA DIGIT SIX\r
++1136D..1136F  ; disallowed                             # NA   <reserved-1136D>..<reserved-1136F>\r
++11370..11374  ; valid                                  # 7.0  COMBINING GRANTHA LETTER A..COMBINING GRANTHA LETTER PA\r
++11375..113FF  ; disallowed                             # NA   <reserved-11375>..<reserved-113FF>\r
++11400..1144A  ; valid                                  # 9.0  NEWA LETTER A..NEWA SIDDHI\r
++1144B..1144F  ; valid                  ;      ; NV8    # 9.0  NEWA DANDA..NEWA ABBREVIATION SIGN\r
++11450..11459  ; valid                                  # 9.0  NEWA DIGIT ZERO..NEWA DIGIT NINE\r
++1145A         ; disallowed                             # NA   <reserved-1145A>\r
++1145B         ; valid                  ;      ; NV8    # 9.0  NEWA PLACEHOLDER MARK\r
++1145C         ; disallowed                             # NA   <reserved-1145C>\r
++1145D         ; valid                  ;      ; NV8    # 9.0  NEWA INSERTION SIGN\r
++1145E..1147F  ; disallowed                             # NA   <reserved-1145E>..<reserved-1147F>\r
++11480..114C5  ; valid                                  # 7.0  TIRHUTA ANJI..TIRHUTA GVANG\r
++114C6         ; valid                  ;      ; NV8    # 7.0  TIRHUTA ABBREVIATION SIGN\r
++114C7         ; valid                                  # 7.0  TIRHUTA OM\r
++114C8..114CF  ; disallowed                             # NA   <reserved-114C8>..<reserved-114CF>\r
++114D0..114D9  ; valid                                  # 7.0  TIRHUTA DIGIT ZERO..TIRHUTA DIGIT NINE\r
++114DA..1157F  ; disallowed                             # NA   <reserved-114DA>..<reserved-1157F>\r
++11580..115B5  ; valid                                  # 7.0  SIDDHAM LETTER A..SIDDHAM VOWEL SIGN VOCALIC RR\r
++115B6..115B7  ; disallowed                             # NA   <reserved-115B6>..<reserved-115B7>\r
++115B8..115C0  ; valid                                  # 7.0  SIDDHAM VOWEL SIGN E..SIDDHAM SIGN NUKTA\r
++115C1..115C9  ; valid                  ;      ; NV8    # 7.0  SIDDHAM SIGN SIDDHAM..SIDDHAM END OF TEXT MARK\r
++115CA..115D7  ; valid                  ;      ; NV8    # 8.0  SIDDHAM SECTION MARK WITH TRIDENT AND U-SHAPED ORNAMENTS..SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES\r
++115D8..115DD  ; valid                                  # 8.0  SIDDHAM LETTER THREE-CIRCLE ALTERNATE I..SIDDHAM VOWEL SIGN ALTERNATE UU\r
++115DE..115FF  ; disallowed                             # NA   <reserved-115DE>..<reserved-115FF>\r
++11600..11640  ; valid                                  # 7.0  MODI LETTER A..MODI SIGN ARDHACANDRA\r
++11641..11643  ; valid                  ;      ; NV8    # 7.0  MODI DANDA..MODI ABBREVIATION SIGN\r
++11644         ; valid                                  # 7.0  MODI SIGN HUVA\r
++11645..1164F  ; disallowed                             # NA   <reserved-11645>..<reserved-1164F>\r
++11650..11659  ; valid                                  # 7.0  MODI DIGIT ZERO..MODI DIGIT NINE\r
++1165A..1165F  ; disallowed                             # NA   <reserved-1165A>..<reserved-1165F>\r
++11660..1166C  ; valid                  ;      ; NV8    # 9.0  MONGOLIAN BIRGA WITH ORNAMENT..MONGOLIAN TURNED SWIRL BIRGA WITH DOUBLE ORNAMENT\r
++1166D..1167F  ; disallowed                             # NA   <reserved-1166D>..<reserved-1167F>\r
++11680..116B7  ; valid                                  # 6.1  TAKRI LETTER A..TAKRI SIGN NUKTA\r
++116B8..116BF  ; disallowed                             # NA   <reserved-116B8>..<reserved-116BF>\r
++116C0..116C9  ; valid                                  # 6.1  TAKRI DIGIT ZERO..TAKRI DIGIT NINE\r
++116CA..116FF  ; disallowed                             # NA   <reserved-116CA>..<reserved-116FF>\r
++11700..11719  ; valid                                  # 8.0  AHOM LETTER KA..AHOM LETTER JHA\r
++1171A..1171C  ; disallowed                             # NA   <reserved-1171A>..<reserved-1171C>\r
++1171D..1172B  ; valid                                  # 8.0  AHOM CONSONANT SIGN MEDIAL LA..AHOM SIGN KILLER\r
++1172C..1172F  ; disallowed                             # NA   <reserved-1172C>..<reserved-1172F>\r
++11730..11739  ; valid                                  # 8.0  AHOM DIGIT ZERO..AHOM DIGIT NINE\r
++1173A..1173F  ; valid                  ;      ; NV8    # 8.0  AHOM NUMBER TEN..AHOM SYMBOL VI\r
++11740..1189F  ; disallowed                             # NA   <reserved-11740>..<reserved-1189F>\r
++118A0         ; mapped                 ; 118C0         # 7.0  WARANG CITI CAPITAL LETTER NGAA\r
++118A1         ; mapped                 ; 118C1         # 7.0  WARANG CITI CAPITAL LETTER A\r
++118A2         ; mapped                 ; 118C2         # 7.0  WARANG CITI CAPITAL LETTER WI\r
++118A3         ; mapped                 ; 118C3         # 7.0  WARANG CITI CAPITAL LETTER YU\r
++118A4         ; mapped                 ; 118C4         # 7.0  WARANG CITI CAPITAL LETTER YA\r
++118A5         ; mapped                 ; 118C5         # 7.0  WARANG CITI CAPITAL LETTER YO\r
++118A6         ; mapped                 ; 118C6         # 7.0  WARANG CITI CAPITAL LETTER II\r
++118A7         ; mapped                 ; 118C7         # 7.0  WARANG CITI CAPITAL LETTER UU\r
++118A8         ; mapped                 ; 118C8         # 7.0  WARANG CITI CAPITAL LETTER E\r
++118A9         ; mapped                 ; 118C9         # 7.0  WARANG CITI CAPITAL LETTER O\r
++118AA         ; mapped                 ; 118CA         # 7.0  WARANG CITI CAPITAL LETTER ANG\r
++118AB         ; mapped                 ; 118CB         # 7.0  WARANG CITI CAPITAL LETTER GA\r
++118AC         ; mapped                 ; 118CC         # 7.0  WARANG CITI CAPITAL LETTER KO\r
++118AD         ; mapped                 ; 118CD         # 7.0  WARANG CITI CAPITAL LETTER ENY\r
++118AE         ; mapped                 ; 118CE         # 7.0  WARANG CITI CAPITAL LETTER YUJ\r
++118AF         ; mapped                 ; 118CF         # 7.0  WARANG CITI CAPITAL LETTER UC\r
++118B0         ; mapped                 ; 118D0         # 7.0  WARANG CITI CAPITAL LETTER ENN\r
++118B1         ; mapped                 ; 118D1         # 7.0  WARANG CITI CAPITAL LETTER ODD\r
++118B2         ; mapped                 ; 118D2         # 7.0  WARANG CITI CAPITAL LETTER TTE\r
++118B3         ; mapped                 ; 118D3         # 7.0  WARANG CITI CAPITAL LETTER NUNG\r
++118B4         ; mapped                 ; 118D4         # 7.0  WARANG CITI CAPITAL LETTER DA\r
++118B5         ; mapped                 ; 118D5         # 7.0  WARANG CITI CAPITAL LETTER AT\r
++118B6         ; mapped                 ; 118D6         # 7.0  WARANG CITI CAPITAL LETTER AM\r
++118B7         ; mapped                 ; 118D7         # 7.0  WARANG CITI CAPITAL LETTER BU\r
++118B8         ; mapped                 ; 118D8         # 7.0  WARANG CITI CAPITAL LETTER PU\r
++118B9         ; mapped                 ; 118D9         # 7.0  WARANG CITI CAPITAL LETTER HIYO\r
++118BA         ; mapped                 ; 118DA         # 7.0  WARANG CITI CAPITAL LETTER HOLO\r
++118BB         ; mapped                 ; 118DB         # 7.0  WARANG CITI CAPITAL LETTER HORR\r
++118BC         ; mapped                 ; 118DC         # 7.0  WARANG CITI CAPITAL LETTER HAR\r
++118BD         ; mapped                 ; 118DD         # 7.0  WARANG CITI CAPITAL LETTER SSUU\r
++118BE         ; mapped                 ; 118DE         # 7.0  WARANG CITI CAPITAL LETTER SII\r
++118BF         ; mapped                 ; 118DF         # 7.0  WARANG CITI CAPITAL LETTER VIYO\r
++118C0..118E9  ; valid                                  # 7.0  WARANG CITI SMALL LETTER NGAA..WARANG CITI DIGIT NINE\r
++118EA..118F2  ; valid                  ;      ; NV8    # 7.0  WARANG CITI NUMBER TEN..WARANG CITI NUMBER NINETY\r
++118F3..118FE  ; disallowed                             # NA   <reserved-118F3>..<reserved-118FE>\r
++118FF         ; valid                                  # 7.0  WARANG CITI OM\r
++11900..119FF  ; disallowed                             # NA   <reserved-11900>..<reserved-119FF>\r
++11A00..11A3E  ; valid                                  # 10.0 ZANABAZAR SQUARE LETTER A..ZANABAZAR SQUARE CLUSTER-FINAL LETTER VA\r
++11A3F..11A46  ; valid                  ;      ; NV8    # 10.0 ZANABAZAR SQUARE INITIAL HEAD MARK..ZANABAZAR SQUARE CLOSING DOUBLE-LINED HEAD MARK\r
++11A47         ; valid                                  # 10.0 ZANABAZAR SQUARE SUBJOINER\r
++11A48..11A4F  ; disallowed                             # NA   <reserved-11A48>..<reserved-11A4F>\r
++11A50..11A83  ; valid                                  # 10.0 SOYOMBO LETTER A..SOYOMBO LETTER KSSA\r
++11A84..11A85  ; disallowed                             # NA   <reserved-11A84>..<reserved-11A85>\r
++11A86..11A99  ; valid                                  # 10.0 SOYOMBO CLUSTER-INITIAL LETTER RA..SOYOMBO SUBJOINER\r
++11A9A..11A9C  ; valid                  ;      ; NV8    # 10.0 SOYOMBO MARK TSHEG..SOYOMBO MARK DOUBLE SHAD\r
++11A9D         ; disallowed                             # NA   <reserved-11A9D>\r
++11A9E..11AA2  ; valid                  ;      ; NV8    # 10.0 SOYOMBO HEAD MARK WITH MOON AND SUN AND TRIPLE FLAME..SOYOMBO TERMINAL MARK-2\r
++11AA3..11ABF  ; disallowed                             # NA   <reserved-11AA3>..<reserved-11ABF>\r
++11AC0..11AF8  ; valid                                  # 7.0  PAU CIN HAU LETTER PA..PAU CIN HAU GLOTTAL STOP FINAL\r
++11AF9..11BFF  ; disallowed                             # NA   <reserved-11AF9>..<reserved-11BFF>\r
++11C00..11C08  ; valid                                  # 9.0  BHAIKSUKI LETTER A..BHAIKSUKI LETTER VOCALIC L\r
++11C09         ; disallowed                             # NA   <reserved-11C09>\r
++11C0A..11C36  ; valid                                  # 9.0  BHAIKSUKI LETTER E..BHAIKSUKI VOWEL SIGN VOCALIC L\r
++11C37         ; disallowed                             # NA   <reserved-11C37>\r
++11C38..11C40  ; valid                                  # 9.0  BHAIKSUKI VOWEL SIGN E..BHAIKSUKI SIGN AVAGRAHA\r
++11C41..11C45  ; valid                  ;      ; NV8    # 9.0  BHAIKSUKI DANDA..BHAIKSUKI GAP FILLER-2\r
++11C46..11C4F  ; disallowed                             # NA   <reserved-11C46>..<reserved-11C4F>\r
++11C50..11C59  ; valid                                  # 9.0  BHAIKSUKI DIGIT ZERO..BHAIKSUKI DIGIT NINE\r
++11C5A..11C6C  ; valid                  ;      ; NV8    # 9.0  BHAIKSUKI NUMBER ONE..BHAIKSUKI HUNDREDS UNIT MARK\r
++11C6D..11C6F  ; disallowed                             # NA   <reserved-11C6D>..<reserved-11C6F>\r
++11C70..11C71  ; valid                  ;      ; NV8    # 9.0  MARCHEN HEAD MARK..MARCHEN MARK SHAD\r
++11C72..11C8F  ; valid                                  # 9.0  MARCHEN LETTER KA..MARCHEN LETTER A\r
++11C90..11C91  ; disallowed                             # NA   <reserved-11C90>..<reserved-11C91>\r
++11C92..11CA7  ; valid                                  # 9.0  MARCHEN SUBJOINED LETTER KA..MARCHEN SUBJOINED LETTER ZA\r
++11CA8         ; disallowed                             # NA   <reserved-11CA8>\r
++11CA9..11CB6  ; valid                                  # 9.0  MARCHEN SUBJOINED LETTER YA..MARCHEN SIGN CANDRABINDU\r
++11CB7..11CFF  ; disallowed                             # NA   <reserved-11CB7>..<reserved-11CFF>\r
++11D00..11D06  ; valid                                  # 10.0 MASARAM GONDI LETTER A..MASARAM GONDI LETTER E\r
++11D07         ; disallowed                             # NA   <reserved-11D07>\r
++11D08..11D09  ; valid                                  # 10.0 MASARAM GONDI LETTER AI..MASARAM GONDI LETTER O\r
++11D0A         ; disallowed                             # NA   <reserved-11D0A>\r
++11D0B..11D36  ; valid                                  # 10.0 MASARAM GONDI LETTER AU..MASARAM GONDI VOWEL SIGN VOCALIC R\r
++11D37..11D39  ; disallowed                             # NA   <reserved-11D37>..<reserved-11D39>\r
++11D3A         ; valid                                  # 10.0 MASARAM GONDI VOWEL SIGN E\r
++11D3B         ; disallowed                             # NA   <reserved-11D3B>\r
++11D3C..11D3D  ; valid                                  # 10.0 MASARAM GONDI VOWEL SIGN AI..MASARAM GONDI VOWEL SIGN O\r
++11D3E         ; disallowed                             # NA   <reserved-11D3E>\r
++11D3F..11D47  ; valid                                  # 10.0 MASARAM GONDI VOWEL SIGN AU..MASARAM GONDI RA-KARA\r
++11D48..11D4F  ; disallowed                             # NA   <reserved-11D48>..<reserved-11D4F>\r
++11D50..11D59  ; valid                                  # 10.0 MASARAM GONDI DIGIT ZERO..MASARAM GONDI DIGIT NINE\r
++11D5A..11FFF  ; disallowed                             # NA   <reserved-11D5A>..<reserved-11FFF>\r
++12000..1236E  ; valid                                  # 5.0  CUNEIFORM SIGN A..CUNEIFORM SIGN ZUM\r
++1236F..12398  ; valid                                  # 7.0  CUNEIFORM SIGN KAP ELAMITE..CUNEIFORM SIGN UM TIMES ME\r
++12399         ; valid                                  # 8.0  CUNEIFORM SIGN U U\r
++1239A..123FF  ; disallowed                             # NA   <reserved-1239A>..<reserved-123FF>\r
++12400..12462  ; valid                  ;      ; NV8    # 5.0  CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN OLD ASSYRIAN ONE QUARTER\r
++12463..1246E  ; valid                  ;      ; NV8    # 7.0  CUNEIFORM NUMERIC SIGN ONE QUARTER GUR..CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM\r
++1246F         ; disallowed                             # NA   <reserved-1246F>\r
++12470..12473  ; valid                  ;      ; NV8    # 5.0  CUNEIFORM PUNCTUATION SIGN OLD ASSYRIAN WORD DIVIDER..CUNEIFORM PUNCTUATION SIGN DIAGONAL TRICOLON\r
++12474         ; valid                  ;      ; NV8    # 7.0  CUNEIFORM PUNCTUATION SIGN DIAGONAL QUADCOLON\r
++12475..1247F  ; disallowed                             # NA   <reserved-12475>..<reserved-1247F>\r
++12480..12543  ; valid                                  # 8.0  CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU\r
++12544..12FFF  ; disallowed                             # NA   <reserved-12544>..<reserved-12FFF>\r
++13000..1342E  ; valid                                  # 5.2  EGYPTIAN HIEROGLYPH A001..EGYPTIAN HIEROGLYPH AA032\r
++1342F..143FF  ; disallowed                             # NA   <reserved-1342F>..<reserved-143FF>\r
++14400..14646  ; valid                                  # 8.0  ANATOLIAN HIEROGLYPH A001..ANATOLIAN HIEROGLYPH A530\r
++14647..167FF  ; disallowed                             # NA   <reserved-14647>..<reserved-167FF>\r
++16800..16A38  ; valid                                  # 6.0  BAMUM LETTER PHASE-A NGKUE MFON..BAMUM LETTER PHASE-F VUEQ\r
++16A39..16A3F  ; disallowed                             # NA   <reserved-16A39>..<reserved-16A3F>\r
++16A40..16A5E  ; valid                                  # 7.0  MRO LETTER TA..MRO LETTER TEK\r
++16A5F         ; disallowed                             # NA   <reserved-16A5F>\r
++16A60..16A69  ; valid                                  # 7.0  MRO DIGIT ZERO..MRO DIGIT NINE\r
++16A6A..16A6D  ; disallowed                             # NA   <reserved-16A6A>..<reserved-16A6D>\r
++16A6E..16A6F  ; valid                  ;      ; NV8    # 7.0  MRO DANDA..MRO DOUBLE DANDA\r
++16A70..16ACF  ; disallowed                             # NA   <reserved-16A70>..<reserved-16ACF>\r
++16AD0..16AED  ; valid                                  # 7.0  BASSA VAH LETTER ENNI..BASSA VAH LETTER I\r
++16AEE..16AEF  ; disallowed                             # NA   <reserved-16AEE>..<reserved-16AEF>\r
++16AF0..16AF4  ; valid                                  # 7.0  BASSA VAH COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE\r
++16AF5         ; valid                  ;      ; NV8    # 7.0  BASSA VAH FULL STOP\r
++16AF6..16AFF  ; disallowed                             # NA   <reserved-16AF6>..<reserved-16AFF>\r
++16B00..16B36  ; valid                                  # 7.0  PAHAWH HMONG VOWEL KEEB..PAHAWH HMONG MARK CIM TAUM\r
++16B37..16B3F  ; valid                  ;      ; NV8    # 7.0  PAHAWH HMONG SIGN VOS THOM..PAHAWH HMONG SIGN XYEEM FAIB\r
++16B40..16B43  ; valid                                  # 7.0  PAHAWH HMONG SIGN VOS SEEV..PAHAWH HMONG SIGN IB YAM\r
++16B44..16B45  ; valid                  ;      ; NV8    # 7.0  PAHAWH HMONG SIGN XAUS..PAHAWH HMONG SIGN CIM TSOV ROG\r
++16B46..16B4F  ; disallowed                             # NA   <reserved-16B46>..<reserved-16B4F>\r
++16B50..16B59  ; valid                                  # 7.0  PAHAWH HMONG DIGIT ZERO..PAHAWH HMONG DIGIT NINE\r
++16B5A         ; disallowed                             # NA   <reserved-16B5A>\r
++16B5B..16B61  ; valid                  ;      ; NV8    # 7.0  PAHAWH HMONG NUMBER TENS..PAHAWH HMONG NUMBER TRILLIONS\r
++16B62         ; disallowed                             # NA   <reserved-16B62>\r
++16B63..16B77  ; valid                                  # 7.0  PAHAWH HMONG SIGN VOS LUB..PAHAWH HMONG SIGN CIM NRES TOS\r
++16B78..16B7C  ; disallowed                             # NA   <reserved-16B78>..<reserved-16B7C>\r
++16B7D..16B8F  ; valid                                  # 7.0  PAHAWH HMONG CLAN SIGN TSHEEJ..PAHAWH HMONG CLAN SIGN VWJ\r
++16B90..16EFF  ; disallowed                             # NA   <reserved-16B90>..<reserved-16EFF>\r
++16F00..16F44  ; valid                                  # 6.1  MIAO LETTER PA..MIAO LETTER HHA\r
++16F45..16F4F  ; disallowed                             # NA   <reserved-16F45>..<reserved-16F4F>\r
++16F50..16F7E  ; valid                                  # 6.1  MIAO LETTER NASALIZATION..MIAO VOWEL SIGN NG\r
++16F7F..16F8E  ; disallowed                             # NA   <reserved-16F7F>..<reserved-16F8E>\r
++16F8F..16F9F  ; valid                                  # 6.1  MIAO TONE RIGHT..MIAO LETTER REFORMED TONE-8\r
++16FA0..16FDF  ; disallowed                             # NA   <reserved-16FA0>..<reserved-16FDF>\r
++16FE0         ; valid                                  # 9.0  TANGUT ITERATION MARK\r
++16FE1         ; valid                                  # 10.0 NUSHU ITERATION MARK\r
++16FE2..16FFF  ; disallowed                             # NA   <reserved-16FE2>..<reserved-16FFF>\r
++17000..187EC  ; valid                                  # 9.0  TANGUT IDEOGRAPH-17000..TANGUT IDEOGRAPH-187EC\r
++187ED..187FF  ; disallowed                             # NA   <reserved-187ED>..<reserved-187FF>\r
++18800..18AF2  ; valid                                  # 9.0  TANGUT COMPONENT-001..TANGUT COMPONENT-755\r
++18AF3..1AFFF  ; disallowed                             # NA   <reserved-18AF3>..<reserved-1AFFF>\r
++1B000..1B001  ; valid                                  # 6.0  KATAKANA LETTER ARCHAIC E..HIRAGANA LETTER ARCHAIC YE\r
++1B002..1B11E  ; valid                                  # 10.0 HENTAIGANA LETTER A-1..HENTAIGANA LETTER N-MU-MO-2\r
++1B11F..1B16F  ; disallowed                             # NA   <reserved-1B11F>..<reserved-1B16F>\r
++1B170..1B2FB  ; valid                                  # 10.0 NUSHU CHARACTER-1B170..NUSHU CHARACTER-1B2FB\r
++1B2FC..1BBFF  ; disallowed                             # NA   <reserved-1B2FC>..<reserved-1BBFF>\r
++1BC00..1BC6A  ; valid                                  # 7.0  DUPLOYAN LETTER H..DUPLOYAN LETTER VOCALIC M\r
++1BC6B..1BC6F  ; disallowed                             # NA   <reserved-1BC6B>..<reserved-1BC6F>\r
++1BC70..1BC7C  ; valid                                  # 7.0  DUPLOYAN AFFIX LEFT HORIZONTAL SECANT..DUPLOYAN AFFIX ATTACHED TANGENT HOOK\r
++1BC7D..1BC7F  ; disallowed                             # NA   <reserved-1BC7D>..<reserved-1BC7F>\r
++1BC80..1BC88  ; valid                                  # 7.0  DUPLOYAN AFFIX HIGH ACUTE..DUPLOYAN AFFIX HIGH VERTICAL\r
++1BC89..1BC8F  ; disallowed                             # NA   <reserved-1BC89>..<reserved-1BC8F>\r
++1BC90..1BC99  ; valid                                  # 7.0  DUPLOYAN AFFIX LOW ACUTE..DUPLOYAN AFFIX LOW ARROW\r
++1BC9A..1BC9B  ; disallowed                             # NA   <reserved-1BC9A>..<reserved-1BC9B>\r
++1BC9C         ; valid                  ;      ; NV8    # 7.0  DUPLOYAN SIGN O WITH CROSS\r
++1BC9D..1BC9E  ; valid                                  # 7.0  DUPLOYAN THICK LETTER SELECTOR..DUPLOYAN DOUBLE MARK\r
++1BC9F         ; valid                  ;      ; NV8    # 7.0  DUPLOYAN PUNCTUATION CHINOOK FULL STOP\r
++1BCA0..1BCA3  ; ignored                                # 7.0  SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP\r
++1BCA4..1CFFF  ; disallowed                             # NA   <reserved-1BCA4>..<reserved-1CFFF>\r
++1D000..1D0F5  ; valid                  ;      ; NV8    # 3.1  BYZANTINE MUSICAL SYMBOL PSILI..BYZANTINE MUSICAL SYMBOL GORGON NEO KATO\r
++1D0F6..1D0FF  ; disallowed                             # NA   <reserved-1D0F6>..<reserved-1D0FF>\r
++1D100..1D126  ; valid                  ;      ; NV8    # 3.1  MUSICAL SYMBOL SINGLE BARLINE..MUSICAL SYMBOL DRUM CLEF-2\r
++1D127..1D128  ; disallowed                             # NA   <reserved-1D127>..<reserved-1D128>\r
++1D129         ; valid                  ;      ; NV8    # 5.1  MUSICAL SYMBOL MULTIPLE MEASURE REST\r
++1D12A..1D15D  ; valid                  ;      ; NV8    # 3.1  MUSICAL SYMBOL DOUBLE SHARP..MUSICAL SYMBOL WHOLE NOTE\r
++1D15E         ; mapped                 ; 1D157 1D165   # 3.1  MUSICAL SYMBOL HALF NOTE\r
++1D15F         ; mapped                 ; 1D158 1D165   # 3.1  MUSICAL SYMBOL QUARTER NOTE\r
++1D160         ; mapped                 ; 1D158 1D165 1D16E #3.1 MUSICAL SYMBOL EIGHTH NOTE\r
++1D161         ; mapped                 ; 1D158 1D165 1D16F #3.1 MUSICAL SYMBOL SIXTEENTH NOTE\r
++1D162         ; mapped                 ; 1D158 1D165 1D170 #3.1 MUSICAL SYMBOL THIRTY-SECOND NOTE\r
++1D163         ; mapped                 ; 1D158 1D165 1D171 #3.1 MUSICAL SYMBOL SIXTY-FOURTH NOTE\r
++1D164         ; mapped                 ; 1D158 1D165 1D172 #3.1 MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE\r
++1D165..1D172  ; valid                  ;      ; NV8    # 3.1  MUSICAL SYMBOL COMBINING STEM..MUSICAL SYMBOL COMBINING FLAG-5\r
++1D173..1D17A  ; disallowed                             # 3.1  MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE\r
++1D17B..1D1BA  ; valid                  ;      ; NV8    # 3.1  MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL SEMIBREVIS BLACK\r
++1D1BB         ; mapped                 ; 1D1B9 1D165   # 3.1  MUSICAL SYMBOL MINIMA\r
++1D1BC         ; mapped                 ; 1D1BA 1D165   # 3.1  MUSICAL SYMBOL MINIMA BLACK\r
++1D1BD         ; mapped                 ; 1D1B9 1D165 1D16E #3.1 MUSICAL SYMBOL SEMIMINIMA WHITE\r
++1D1BE         ; mapped                 ; 1D1BA 1D165 1D16E #3.1 MUSICAL SYMBOL SEMIMINIMA BLACK\r
++1D1BF         ; mapped                 ; 1D1B9 1D165 1D16F #3.1 MUSICAL SYMBOL FUSA WHITE\r
++1D1C0         ; mapped                 ; 1D1BA 1D165 1D16F #3.1 MUSICAL SYMBOL FUSA BLACK\r
++1D1C1..1D1DD  ; valid                  ;      ; NV8    # 3.1  MUSICAL SYMBOL LONGA PERFECTA REST..MUSICAL SYMBOL PES SUBPUNCTIS\r
++1D1DE..1D1E8  ; valid                  ;      ; NV8    # 8.0  MUSICAL SYMBOL KIEVAN C CLEF..MUSICAL SYMBOL KIEVAN FLAT SIGN\r
++1D1E9..1D1FF  ; disallowed                             # NA   <reserved-1D1E9>..<reserved-1D1FF>\r
++1D200..1D245  ; valid                  ;      ; NV8    # 4.1  GREEK VOCAL NOTATION SYMBOL-1..GREEK MUSICAL LEIMMA\r
++1D246..1D2FF  ; disallowed                             # NA   <reserved-1D246>..<reserved-1D2FF>\r
++1D300..1D356  ; valid                  ;      ; NV8    # 4.0  MONOGRAM FOR EARTH..TETRAGRAM FOR FOSTERING\r
++1D357..1D35F  ; disallowed                             # NA   <reserved-1D357>..<reserved-1D35F>\r
++1D360..1D371  ; valid                  ;      ; NV8    # 5.0  COUNTING ROD UNIT DIGIT ONE..COUNTING ROD TENS DIGIT NINE\r
++1D372..1D3FF  ; disallowed                             # NA   <reserved-1D372>..<reserved-1D3FF>\r
++1D400         ; mapped                 ; 0061          # 3.1  MATHEMATICAL BOLD CAPITAL A\r
++1D401         ; mapped                 ; 0062          # 3.1  MATHEMATICAL BOLD CAPITAL B\r
++1D402         ; mapped                 ; 0063          # 3.1  MATHEMATICAL BOLD CAPITAL C\r
++1D403         ; mapped                 ; 0064          # 3.1  MATHEMATICAL BOLD CAPITAL D\r
++1D404         ; mapped                 ; 0065          # 3.1  MATHEMATICAL BOLD CAPITAL E\r
++1D405         ; mapped                 ; 0066          # 3.1  MATHEMATICAL BOLD CAPITAL F\r
++1D406         ; mapped                 ; 0067          # 3.1  MATHEMATICAL BOLD CAPITAL G\r
++1D407         ; mapped                 ; 0068          # 3.1  MATHEMATICAL BOLD CAPITAL H\r
++1D408         ; mapped                 ; 0069          # 3.1  MATHEMATICAL BOLD CAPITAL I\r
++1D409         ; mapped                 ; 006A          # 3.1  MATHEMATICAL BOLD CAPITAL J\r
++1D40A         ; mapped                 ; 006B          # 3.1  MATHEMATICAL BOLD CAPITAL K\r
++1D40B         ; mapped                 ; 006C          # 3.1  MATHEMATICAL BOLD CAPITAL L\r
++1D40C         ; mapped                 ; 006D          # 3.1  MATHEMATICAL BOLD CAPITAL M\r
++1D40D         ; mapped                 ; 006E          # 3.1  MATHEMATICAL BOLD CAPITAL N\r
++1D40E         ; mapped                 ; 006F          # 3.1  MATHEMATICAL BOLD CAPITAL O\r
++1D40F         ; mapped                 ; 0070          # 3.1  MATHEMATICAL BOLD CAPITAL P\r
++1D410         ; mapped                 ; 0071          # 3.1  MATHEMATICAL BOLD CAPITAL Q\r
++1D411         ; mapped                 ; 0072          # 3.1  MATHEMATICAL BOLD CAPITAL R\r
++1D412         ; mapped                 ; 0073          # 3.1  MATHEMATICAL BOLD CAPITAL S\r
++1D413         ; mapped                 ; 0074          # 3.1  MATHEMATICAL BOLD CAPITAL T\r
++1D414         ; mapped                 ; 0075          # 3.1  MATHEMATICAL BOLD CAPITAL U\r
++1D415         ; mapped                 ; 0076          # 3.1  MATHEMATICAL BOLD CAPITAL V\r
++1D416         ; mapped                 ; 0077          # 3.1  MATHEMATICAL BOLD CAPITAL W\r
++1D417         ; mapped                 ; 0078          # 3.1  MATHEMATICAL BOLD CAPITAL X\r
++1D418         ; mapped                 ; 0079          # 3.1  MATHEMATICAL BOLD CAPITAL Y\r
++1D419         ; mapped                 ; 007A          # 3.1  MATHEMATICAL BOLD CAPITAL Z\r
++1D41A         ; mapped                 ; 0061          # 3.1  MATHEMATICAL BOLD SMALL A\r
++1D41B         ; mapped                 ; 0062          # 3.1  MATHEMATICAL BOLD SMALL B\r
++1D41C         ; mapped                 ; 0063          # 3.1  MATHEMATICAL BOLD SMALL C\r
++1D41D         ; mapped                 ; 0064          # 3.1  MATHEMATICAL BOLD SMALL D\r
++1D41E         ; mapped                 ; 0065          # 3.1  MATHEMATICAL BOLD SMALL E\r
++1D41F         ; mapped                 ; 0066          # 3.1  MATHEMATICAL BOLD SMALL F\r
++1D420         ; mapped                 ; 0067          # 3.1  MATHEMATICAL BOLD SMALL G\r
++1D421         ; mapped                 ; 0068          # 3.1  MATHEMATICAL BOLD SMALL H\r
++1D422         ; mapped                 ; 0069          # 3.1  MATHEMATICAL BOLD SMALL I\r
++1D423         ; mapped                 ; 006A          # 3.1  MATHEMATICAL BOLD SMALL J\r
++1D424         ; mapped                 ; 006B          # 3.1  MATHEMATICAL BOLD SMALL K\r
++1D425         ; mapped                 ; 006C          # 3.1  MATHEMATICAL BOLD SMALL L\r
++1D426         ; mapped                 ; 006D          # 3.1  MATHEMATICAL BOLD SMALL M\r
++1D427         ; mapped                 ; 006E          # 3.1  MATHEMATICAL BOLD SMALL N\r
++1D428         ; mapped                 ; 006F          # 3.1  MATHEMATICAL BOLD SMALL O\r
++1D429         ; mapped                 ; 0070          # 3.1  MATHEMATICAL BOLD SMALL P\r
++1D42A         ; mapped                 ; 0071          # 3.1  MATHEMATICAL BOLD SMALL Q\r
++1D42B         ; mapped                 ; 0072          # 3.1  MATHEMATICAL BOLD SMALL R\r
++1D42C         ; mapped                 ; 0073          # 3.1  MATHEMATICAL BOLD SMALL S\r
++1D42D         ; mapped                 ; 0074          # 3.1  MATHEMATICAL BOLD SMALL T\r
++1D42E         ; mapped                 ; 0075          # 3.1  MATHEMATICAL BOLD SMALL U\r
++1D42F         ; mapped                 ; 0076          # 3.1  MATHEMATICAL BOLD SMALL V\r
++1D430         ; mapped                 ; 0077          # 3.1  MATHEMATICAL BOLD SMALL W\r
++1D431         ; mapped                 ; 0078          # 3.1  MATHEMATICAL BOLD SMALL X\r
++1D432         ; mapped                 ; 0079          # 3.1  MATHEMATICAL BOLD SMALL Y\r
++1D433         ; mapped                 ; 007A          # 3.1  MATHEMATICAL BOLD SMALL Z\r
++1D434         ; mapped                 ; 0061          # 3.1  MATHEMATICAL ITALIC CAPITAL A\r
++1D435         ; mapped                 ; 0062          # 3.1  MATHEMATICAL ITALIC CAPITAL B\r
++1D436         ; mapped                 ; 0063          # 3.1  MATHEMATICAL ITALIC CAPITAL C\r
++1D437         ; mapped                 ; 0064          # 3.1  MATHEMATICAL ITALIC CAPITAL D\r
++1D438         ; mapped                 ; 0065          # 3.1  MATHEMATICAL ITALIC CAPITAL E\r
++1D439         ; mapped                 ; 0066          # 3.1  MATHEMATICAL ITALIC CAPITAL F\r
++1D43A         ; mapped                 ; 0067          # 3.1  MATHEMATICAL ITALIC CAPITAL G\r
++1D43B         ; mapped                 ; 0068          # 3.1  MATHEMATICAL ITALIC CAPITAL H\r
++1D43C         ; mapped                 ; 0069          # 3.1  MATHEMATICAL ITALIC CAPITAL I\r
++1D43D         ; mapped                 ; 006A          # 3.1  MATHEMATICAL ITALIC CAPITAL J\r
++1D43E         ; mapped                 ; 006B          # 3.1  MATHEMATICAL ITALIC CAPITAL K\r
++1D43F         ; mapped                 ; 006C          # 3.1  MATHEMATICAL ITALIC CAPITAL L\r
++1D440         ; mapped                 ; 006D          # 3.1  MATHEMATICAL ITALIC CAPITAL M\r
++1D441         ; mapped                 ; 006E          # 3.1  MATHEMATICAL ITALIC CAPITAL N\r
++1D442         ; mapped                 ; 006F          # 3.1  MATHEMATICAL ITALIC CAPITAL O\r
++1D443         ; mapped                 ; 0070          # 3.1  MATHEMATICAL ITALIC CAPITAL P\r
++1D444         ; mapped                 ; 0071          # 3.1  MATHEMATICAL ITALIC CAPITAL Q\r
++1D445         ; mapped                 ; 0072          # 3.1  MATHEMATICAL ITALIC CAPITAL R\r
++1D446         ; mapped                 ; 0073          # 3.1  MATHEMATICAL ITALIC CAPITAL S\r
++1D447         ; mapped                 ; 0074          # 3.1  MATHEMATICAL ITALIC CAPITAL T\r
++1D448         ; mapped                 ; 0075          # 3.1  MATHEMATICAL ITALIC CAPITAL U\r
++1D449         ; mapped                 ; 0076          # 3.1  MATHEMATICAL ITALIC CAPITAL V\r
++1D44A         ; mapped                 ; 0077          # 3.1  MATHEMATICAL ITALIC CAPITAL W\r
++1D44B         ; mapped                 ; 0078          # 3.1  MATHEMATICAL ITALIC CAPITAL X\r
++1D44C         ; mapped                 ; 0079          # 3.1  MATHEMATICAL ITALIC CAPITAL Y\r
++1D44D         ; mapped                 ; 007A          # 3.1  MATHEMATICAL ITALIC CAPITAL Z\r
++1D44E         ; mapped                 ; 0061          # 3.1  MATHEMATICAL ITALIC SMALL A\r
++1D44F         ; mapped                 ; 0062          # 3.1  MATHEMATICAL ITALIC SMALL B\r
++1D450         ; mapped                 ; 0063          # 3.1  MATHEMATICAL ITALIC SMALL C\r
++1D451         ; mapped                 ; 0064          # 3.1  MATHEMATICAL ITALIC SMALL D\r
++1D452         ; mapped                 ; 0065          # 3.1  MATHEMATICAL ITALIC SMALL E\r
++1D453         ; mapped                 ; 0066          # 3.1  MATHEMATICAL ITALIC SMALL F\r
++1D454         ; mapped                 ; 0067          # 3.1  MATHEMATICAL ITALIC SMALL G\r
++1D455         ; disallowed                             # NA   <reserved-1D455>\r
++1D456         ; mapped                 ; 0069          # 3.1  MATHEMATICAL ITALIC SMALL I\r
++1D457         ; mapped                 ; 006A          # 3.1  MATHEMATICAL ITALIC SMALL J\r
++1D458         ; mapped                 ; 006B          # 3.1  MATHEMATICAL ITALIC SMALL K\r
++1D459         ; mapped                 ; 006C          # 3.1  MATHEMATICAL ITALIC SMALL L\r
++1D45A         ; mapped                 ; 006D          # 3.1  MATHEMATICAL ITALIC SMALL M\r
++1D45B         ; mapped                 ; 006E          # 3.1  MATHEMATICAL ITALIC SMALL N\r
++1D45C         ; mapped                 ; 006F          # 3.1  MATHEMATICAL ITALIC SMALL O\r
++1D45D         ; mapped                 ; 0070          # 3.1  MATHEMATICAL ITALIC SMALL P\r
++1D45E         ; mapped                 ; 0071          # 3.1  MATHEMATICAL ITALIC SMALL Q\r
++1D45F         ; mapped                 ; 0072          # 3.1  MATHEMATICAL ITALIC SMALL R\r
++1D460         ; mapped                 ; 0073          # 3.1  MATHEMATICAL ITALIC SMALL S\r
++1D461         ; mapped                 ; 0074          # 3.1  MATHEMATICAL ITALIC SMALL T\r
++1D462         ; mapped                 ; 0075          # 3.1  MATHEMATICAL ITALIC SMALL U\r
++1D463         ; mapped                 ; 0076          # 3.1  MATHEMATICAL ITALIC SMALL V\r
++1D464         ; mapped                 ; 0077          # 3.1  MATHEMATICAL ITALIC SMALL W\r
++1D465         ; mapped                 ; 0078          # 3.1  MATHEMATICAL ITALIC SMALL X\r
++1D466         ; mapped                 ; 0079          # 3.1  MATHEMATICAL ITALIC SMALL Y\r
++1D467         ; mapped                 ; 007A          # 3.1  MATHEMATICAL ITALIC SMALL Z\r
++1D468         ; mapped                 ; 0061          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL A\r
++1D469         ; mapped                 ; 0062          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL B\r
++1D46A         ; mapped                 ; 0063          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL C\r
++1D46B         ; mapped                 ; 0064          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL D\r
++1D46C         ; mapped                 ; 0065          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL E\r
++1D46D         ; mapped                 ; 0066          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL F\r
++1D46E         ; mapped                 ; 0067          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL G\r
++1D46F         ; mapped                 ; 0068          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL H\r
++1D470         ; mapped                 ; 0069          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL I\r
++1D471         ; mapped                 ; 006A          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL J\r
++1D472         ; mapped                 ; 006B          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL K\r
++1D473         ; mapped                 ; 006C          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL L\r
++1D474         ; mapped                 ; 006D          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL M\r
++1D475         ; mapped                 ; 006E          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL N\r
++1D476         ; mapped                 ; 006F          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL O\r
++1D477         ; mapped                 ; 0070          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL P\r
++1D478         ; mapped                 ; 0071          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL Q\r
++1D479         ; mapped                 ; 0072          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL R\r
++1D47A         ; mapped                 ; 0073          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL S\r
++1D47B         ; mapped                 ; 0074          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL T\r
++1D47C         ; mapped                 ; 0075          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL U\r
++1D47D         ; mapped                 ; 0076          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL V\r
++1D47E         ; mapped                 ; 0077          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL W\r
++1D47F         ; mapped                 ; 0078          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL X\r
++1D480         ; mapped                 ; 0079          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL Y\r
++1D481         ; mapped                 ; 007A          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL Z\r
++1D482         ; mapped                 ; 0061          # 3.1  MATHEMATICAL BOLD ITALIC SMALL A\r
++1D483         ; mapped                 ; 0062          # 3.1  MATHEMATICAL BOLD ITALIC SMALL B\r
++1D484         ; mapped                 ; 0063          # 3.1  MATHEMATICAL BOLD ITALIC SMALL C\r
++1D485         ; mapped                 ; 0064          # 3.1  MATHEMATICAL BOLD ITALIC SMALL D\r
++1D486         ; mapped                 ; 0065          # 3.1  MATHEMATICAL BOLD ITALIC SMALL E\r
++1D487         ; mapped                 ; 0066          # 3.1  MATHEMATICAL BOLD ITALIC SMALL F\r
++1D488         ; mapped                 ; 0067          # 3.1  MATHEMATICAL BOLD ITALIC SMALL G\r
++1D489         ; mapped                 ; 0068          # 3.1  MATHEMATICAL BOLD ITALIC SMALL H\r
++1D48A         ; mapped                 ; 0069          # 3.1  MATHEMATICAL BOLD ITALIC SMALL I\r
++1D48B         ; mapped                 ; 006A          # 3.1  MATHEMATICAL BOLD ITALIC SMALL J\r
++1D48C         ; mapped                 ; 006B          # 3.1  MATHEMATICAL BOLD ITALIC SMALL K\r
++1D48D         ; mapped                 ; 006C          # 3.1  MATHEMATICAL BOLD ITALIC SMALL L\r
++1D48E         ; mapped                 ; 006D          # 3.1  MATHEMATICAL BOLD ITALIC SMALL M\r
++1D48F         ; mapped                 ; 006E          # 3.1  MATHEMATICAL BOLD ITALIC SMALL N\r
++1D490         ; mapped                 ; 006F          # 3.1  MATHEMATICAL BOLD ITALIC SMALL O\r
++1D491         ; mapped                 ; 0070          # 3.1  MATHEMATICAL BOLD ITALIC SMALL P\r
++1D492         ; mapped                 ; 0071          # 3.1  MATHEMATICAL BOLD ITALIC SMALL Q\r
++1D493         ; mapped                 ; 0072          # 3.1  MATHEMATICAL BOLD ITALIC SMALL R\r
++1D494         ; mapped                 ; 0073          # 3.1  MATHEMATICAL BOLD ITALIC SMALL S\r
++1D495         ; mapped                 ; 0074          # 3.1  MATHEMATICAL BOLD ITALIC SMALL T\r
++1D496         ; mapped                 ; 0075          # 3.1  MATHEMATICAL BOLD ITALIC SMALL U\r
++1D497         ; mapped                 ; 0076          # 3.1  MATHEMATICAL BOLD ITALIC SMALL V\r
++1D498         ; mapped                 ; 0077          # 3.1  MATHEMATICAL BOLD ITALIC SMALL W\r
++1D499         ; mapped                 ; 0078          # 3.1  MATHEMATICAL BOLD ITALIC SMALL X\r
++1D49A         ; mapped                 ; 0079          # 3.1  MATHEMATICAL BOLD ITALIC SMALL Y\r
++1D49B         ; mapped                 ; 007A          # 3.1  MATHEMATICAL BOLD ITALIC SMALL Z\r
++1D49C         ; mapped                 ; 0061          # 3.1  MATHEMATICAL SCRIPT CAPITAL A\r
++1D49D         ; disallowed                             # NA   <reserved-1D49D>\r
++1D49E         ; mapped                 ; 0063          # 3.1  MATHEMATICAL SCRIPT CAPITAL C\r
++1D49F         ; mapped                 ; 0064          # 3.1  MATHEMATICAL SCRIPT CAPITAL D\r
++1D4A0..1D4A1  ; disallowed                             # NA   <reserved-1D4A0>..<reserved-1D4A1>\r
++1D4A2         ; mapped                 ; 0067          # 3.1  MATHEMATICAL SCRIPT CAPITAL G\r
++1D4A3..1D4A4  ; disallowed                             # NA   <reserved-1D4A3>..<reserved-1D4A4>\r
++1D4A5         ; mapped                 ; 006A          # 3.1  MATHEMATICAL SCRIPT CAPITAL J\r
++1D4A6         ; mapped                 ; 006B          # 3.1  MATHEMATICAL SCRIPT CAPITAL K\r
++1D4A7..1D4A8  ; disallowed                             # NA   <reserved-1D4A7>..<reserved-1D4A8>\r
++1D4A9         ; mapped                 ; 006E          # 3.1  MATHEMATICAL SCRIPT CAPITAL N\r
++1D4AA         ; mapped                 ; 006F          # 3.1  MATHEMATICAL SCRIPT CAPITAL O\r
++1D4AB         ; mapped                 ; 0070          # 3.1  MATHEMATICAL SCRIPT CAPITAL P\r
++1D4AC         ; mapped                 ; 0071          # 3.1  MATHEMATICAL SCRIPT CAPITAL Q\r
++1D4AD         ; disallowed                             # NA   <reserved-1D4AD>\r
++1D4AE         ; mapped                 ; 0073          # 3.1  MATHEMATICAL SCRIPT CAPITAL S\r
++1D4AF         ; mapped                 ; 0074          # 3.1  MATHEMATICAL SCRIPT CAPITAL T\r
++1D4B0         ; mapped                 ; 0075          # 3.1  MATHEMATICAL SCRIPT CAPITAL U\r
++1D4B1         ; mapped                 ; 0076          # 3.1  MATHEMATICAL SCRIPT CAPITAL V\r
++1D4B2         ; mapped                 ; 0077          # 3.1  MATHEMATICAL SCRIPT CAPITAL W\r
++1D4B3         ; mapped                 ; 0078          # 3.1  MATHEMATICAL SCRIPT CAPITAL X\r
++1D4B4         ; mapped                 ; 0079          # 3.1  MATHEMATICAL SCRIPT CAPITAL Y\r
++1D4B5         ; mapped                 ; 007A          # 3.1  MATHEMATICAL SCRIPT CAPITAL Z\r
++1D4B6         ; mapped                 ; 0061          # 3.1  MATHEMATICAL SCRIPT SMALL A\r
++1D4B7         ; mapped                 ; 0062          # 3.1  MATHEMATICAL SCRIPT SMALL B\r
++1D4B8         ; mapped                 ; 0063          # 3.1  MATHEMATICAL SCRIPT SMALL C\r
++1D4B9         ; mapped                 ; 0064          # 3.1  MATHEMATICAL SCRIPT SMALL D\r
++1D4BA         ; disallowed                             # NA   <reserved-1D4BA>\r
++1D4BB         ; mapped                 ; 0066          # 3.1  MATHEMATICAL SCRIPT SMALL F\r
++1D4BC         ; disallowed                             # NA   <reserved-1D4BC>\r
++1D4BD         ; mapped                 ; 0068          # 3.1  MATHEMATICAL SCRIPT SMALL H\r
++1D4BE         ; mapped                 ; 0069          # 3.1  MATHEMATICAL SCRIPT SMALL I\r
++1D4BF         ; mapped                 ; 006A          # 3.1  MATHEMATICAL SCRIPT SMALL J\r
++1D4C0         ; mapped                 ; 006B          # 3.1  MATHEMATICAL SCRIPT SMALL K\r
++1D4C1         ; mapped                 ; 006C          # 4.0  MATHEMATICAL SCRIPT SMALL L\r
++1D4C2         ; mapped                 ; 006D          # 3.1  MATHEMATICAL SCRIPT SMALL M\r
++1D4C3         ; mapped                 ; 006E          # 3.1  MATHEMATICAL SCRIPT SMALL N\r
++1D4C4         ; disallowed                             # NA   <reserved-1D4C4>\r
++1D4C5         ; mapped                 ; 0070          # 3.1  MATHEMATICAL SCRIPT SMALL P\r
++1D4C6         ; mapped                 ; 0071          # 3.1  MATHEMATICAL SCRIPT SMALL Q\r
++1D4C7         ; mapped                 ; 0072          # 3.1  MATHEMATICAL SCRIPT SMALL R\r
++1D4C8         ; mapped                 ; 0073          # 3.1  MATHEMATICAL SCRIPT SMALL S\r
++1D4C9         ; mapped                 ; 0074          # 3.1  MATHEMATICAL SCRIPT SMALL T\r
++1D4CA         ; mapped                 ; 0075          # 3.1  MATHEMATICAL SCRIPT SMALL U\r
++1D4CB         ; mapped                 ; 0076          # 3.1  MATHEMATICAL SCRIPT SMALL V\r
++1D4CC         ; mapped                 ; 0077          # 3.1  MATHEMATICAL SCRIPT SMALL W\r
++1D4CD         ; mapped                 ; 0078          # 3.1  MATHEMATICAL SCRIPT SMALL X\r
++1D4CE         ; mapped                 ; 0079          # 3.1  MATHEMATICAL SCRIPT SMALL Y\r
++1D4CF         ; mapped                 ; 007A          # 3.1  MATHEMATICAL SCRIPT SMALL Z\r
++1D4D0         ; mapped                 ; 0061          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL A\r
++1D4D1         ; mapped                 ; 0062          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL B\r
++1D4D2         ; mapped                 ; 0063          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL C\r
++1D4D3         ; mapped                 ; 0064          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL D\r
++1D4D4         ; mapped                 ; 0065          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL E\r
++1D4D5         ; mapped                 ; 0066          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL F\r
++1D4D6         ; mapped                 ; 0067          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL G\r
++1D4D7         ; mapped                 ; 0068          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL H\r
++1D4D8         ; mapped                 ; 0069          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL I\r
++1D4D9         ; mapped                 ; 006A          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL J\r
++1D4DA         ; mapped                 ; 006B          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL K\r
++1D4DB         ; mapped                 ; 006C          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL L\r
++1D4DC         ; mapped                 ; 006D          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL M\r
++1D4DD         ; mapped                 ; 006E          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL N\r
++1D4DE         ; mapped                 ; 006F          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL O\r
++1D4DF         ; mapped                 ; 0070          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL P\r
++1D4E0         ; mapped                 ; 0071          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL Q\r
++1D4E1         ; mapped                 ; 0072          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL R\r
++1D4E2         ; mapped                 ; 0073          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL S\r
++1D4E3         ; mapped                 ; 0074          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL T\r
++1D4E4         ; mapped                 ; 0075          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL U\r
++1D4E5         ; mapped                 ; 0076          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL V\r
++1D4E6         ; mapped                 ; 0077          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL W\r
++1D4E7         ; mapped                 ; 0078          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL X\r
++1D4E8         ; mapped                 ; 0079          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL Y\r
++1D4E9         ; mapped                 ; 007A          # 3.1  MATHEMATICAL BOLD SCRIPT CAPITAL Z\r
++1D4EA         ; mapped                 ; 0061          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL A\r
++1D4EB         ; mapped                 ; 0062          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL B\r
++1D4EC         ; mapped                 ; 0063          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL C\r
++1D4ED         ; mapped                 ; 0064          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL D\r
++1D4EE         ; mapped                 ; 0065          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL E\r
++1D4EF         ; mapped                 ; 0066          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL F\r
++1D4F0         ; mapped                 ; 0067          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL G\r
++1D4F1         ; mapped                 ; 0068          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL H\r
++1D4F2         ; mapped                 ; 0069          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL I\r
++1D4F3         ; mapped                 ; 006A          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL J\r
++1D4F4         ; mapped                 ; 006B          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL K\r
++1D4F5         ; mapped                 ; 006C          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL L\r
++1D4F6         ; mapped                 ; 006D          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL M\r
++1D4F7         ; mapped                 ; 006E          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL N\r
++1D4F8         ; mapped                 ; 006F          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL O\r
++1D4F9         ; mapped                 ; 0070          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL P\r
++1D4FA         ; mapped                 ; 0071          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL Q\r
++1D4FB         ; mapped                 ; 0072          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL R\r
++1D4FC         ; mapped                 ; 0073          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL S\r
++1D4FD         ; mapped                 ; 0074          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL T\r
++1D4FE         ; mapped                 ; 0075          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL U\r
++1D4FF         ; mapped                 ; 0076          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL V\r
++1D500         ; mapped                 ; 0077          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL W\r
++1D501         ; mapped                 ; 0078          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL X\r
++1D502         ; mapped                 ; 0079          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL Y\r
++1D503         ; mapped                 ; 007A          # 3.1  MATHEMATICAL BOLD SCRIPT SMALL Z\r
++1D504         ; mapped                 ; 0061          # 3.1  MATHEMATICAL FRAKTUR CAPITAL A\r
++1D505         ; mapped                 ; 0062          # 3.1  MATHEMATICAL FRAKTUR CAPITAL B\r
++1D506         ; disallowed                             # NA   <reserved-1D506>\r
++1D507         ; mapped                 ; 0064          # 3.1  MATHEMATICAL FRAKTUR CAPITAL D\r
++1D508         ; mapped                 ; 0065          # 3.1  MATHEMATICAL FRAKTUR CAPITAL E\r
++1D509         ; mapped                 ; 0066          # 3.1  MATHEMATICAL FRAKTUR CAPITAL F\r
++1D50A         ; mapped                 ; 0067          # 3.1  MATHEMATICAL FRAKTUR CAPITAL G\r
++1D50B..1D50C  ; disallowed                             # NA   <reserved-1D50B>..<reserved-1D50C>\r
++1D50D         ; mapped                 ; 006A          # 3.1  MATHEMATICAL FRAKTUR CAPITAL J\r
++1D50E         ; mapped                 ; 006B          # 3.1  MATHEMATICAL FRAKTUR CAPITAL K\r
++1D50F         ; mapped                 ; 006C          # 3.1  MATHEMATICAL FRAKTUR CAPITAL L\r
++1D510         ; mapped                 ; 006D          # 3.1  MATHEMATICAL FRAKTUR CAPITAL M\r
++1D511         ; mapped                 ; 006E          # 3.1  MATHEMATICAL FRAKTUR CAPITAL N\r
++1D512         ; mapped                 ; 006F          # 3.1  MATHEMATICAL FRAKTUR CAPITAL O\r
++1D513         ; mapped                 ; 0070          # 3.1  MATHEMATICAL FRAKTUR CAPITAL P\r
++1D514         ; mapped                 ; 0071          # 3.1  MATHEMATICAL FRAKTUR CAPITAL Q\r
++1D515         ; disallowed                             # NA   <reserved-1D515>\r
++1D516         ; mapped                 ; 0073          # 3.1  MATHEMATICAL FRAKTUR CAPITAL S\r
++1D517         ; mapped                 ; 0074          # 3.1  MATHEMATICAL FRAKTUR CAPITAL T\r
++1D518         ; mapped                 ; 0075          # 3.1  MATHEMATICAL FRAKTUR CAPITAL U\r
++1D519         ; mapped                 ; 0076          # 3.1  MATHEMATICAL FRAKTUR CAPITAL V\r
++1D51A         ; mapped                 ; 0077          # 3.1  MATHEMATICAL FRAKTUR CAPITAL W\r
++1D51B         ; mapped                 ; 0078          # 3.1  MATHEMATICAL FRAKTUR CAPITAL X\r
++1D51C         ; mapped                 ; 0079          # 3.1  MATHEMATICAL FRAKTUR CAPITAL Y\r
++1D51D         ; disallowed                             # NA   <reserved-1D51D>\r
++1D51E         ; mapped                 ; 0061          # 3.1  MATHEMATICAL FRAKTUR SMALL A\r
++1D51F         ; mapped                 ; 0062          # 3.1  MATHEMATICAL FRAKTUR SMALL B\r
++1D520         ; mapped                 ; 0063          # 3.1  MATHEMATICAL FRAKTUR SMALL C\r
++1D521         ; mapped                 ; 0064          # 3.1  MATHEMATICAL FRAKTUR SMALL D\r
++1D522         ; mapped                 ; 0065          # 3.1  MATHEMATICAL FRAKTUR SMALL E\r
++1D523         ; mapped                 ; 0066          # 3.1  MATHEMATICAL FRAKTUR SMALL F\r
++1D524         ; mapped                 ; 0067          # 3.1  MATHEMATICAL FRAKTUR SMALL G\r
++1D525         ; mapped                 ; 0068          # 3.1  MATHEMATICAL FRAKTUR SMALL H\r
++1D526         ; mapped                 ; 0069          # 3.1  MATHEMATICAL FRAKTUR SMALL I\r
++1D527         ; mapped                 ; 006A          # 3.1  MATHEMATICAL FRAKTUR SMALL J\r
++1D528         ; mapped                 ; 006B          # 3.1  MATHEMATICAL FRAKTUR SMALL K\r
++1D529         ; mapped                 ; 006C          # 3.1  MATHEMATICAL FRAKTUR SMALL L\r
++1D52A         ; mapped                 ; 006D          # 3.1  MATHEMATICAL FRAKTUR SMALL M\r
++1D52B         ; mapped                 ; 006E          # 3.1  MATHEMATICAL FRAKTUR SMALL N\r
++1D52C         ; mapped                 ; 006F          # 3.1  MATHEMATICAL FRAKTUR SMALL O\r
++1D52D         ; mapped                 ; 0070          # 3.1  MATHEMATICAL FRAKTUR SMALL P\r
++1D52E         ; mapped                 ; 0071          # 3.1  MATHEMATICAL FRAKTUR SMALL Q\r
++1D52F         ; mapped                 ; 0072          # 3.1  MATHEMATICAL FRAKTUR SMALL R\r
++1D530         ; mapped                 ; 0073          # 3.1  MATHEMATICAL FRAKTUR SMALL S\r
++1D531         ; mapped                 ; 0074          # 3.1  MATHEMATICAL FRAKTUR SMALL T\r
++1D532         ; mapped                 ; 0075          # 3.1  MATHEMATICAL FRAKTUR SMALL U\r
++1D533         ; mapped                 ; 0076          # 3.1  MATHEMATICAL FRAKTUR SMALL V\r
++1D534         ; mapped                 ; 0077          # 3.1  MATHEMATICAL FRAKTUR SMALL W\r
++1D535         ; mapped                 ; 0078          # 3.1  MATHEMATICAL FRAKTUR SMALL X\r
++1D536         ; mapped                 ; 0079          # 3.1  MATHEMATICAL FRAKTUR SMALL Y\r
++1D537         ; mapped                 ; 007A          # 3.1  MATHEMATICAL FRAKTUR SMALL Z\r
++1D538         ; mapped                 ; 0061          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL A\r
++1D539         ; mapped                 ; 0062          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL B\r
++1D53A         ; disallowed                             # NA   <reserved-1D53A>\r
++1D53B         ; mapped                 ; 0064          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL D\r
++1D53C         ; mapped                 ; 0065          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL E\r
++1D53D         ; mapped                 ; 0066          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL F\r
++1D53E         ; mapped                 ; 0067          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL G\r
++1D53F         ; disallowed                             # NA   <reserved-1D53F>\r
++1D540         ; mapped                 ; 0069          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL I\r
++1D541         ; mapped                 ; 006A          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL J\r
++1D542         ; mapped                 ; 006B          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL K\r
++1D543         ; mapped                 ; 006C          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL L\r
++1D544         ; mapped                 ; 006D          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL M\r
++1D545         ; disallowed                             # NA   <reserved-1D545>\r
++1D546         ; mapped                 ; 006F          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL O\r
++1D547..1D549  ; disallowed                             # NA   <reserved-1D547>..<reserved-1D549>\r
++1D54A         ; mapped                 ; 0073          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL S\r
++1D54B         ; mapped                 ; 0074          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL T\r
++1D54C         ; mapped                 ; 0075          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL U\r
++1D54D         ; mapped                 ; 0076          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL V\r
++1D54E         ; mapped                 ; 0077          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL W\r
++1D54F         ; mapped                 ; 0078          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL X\r
++1D550         ; mapped                 ; 0079          # 3.1  MATHEMATICAL DOUBLE-STRUCK CAPITAL Y\r
++1D551         ; disallowed                             # NA   <reserved-1D551>\r
++1D552         ; mapped                 ; 0061          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL A\r
++1D553         ; mapped                 ; 0062          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL B\r
++1D554         ; mapped                 ; 0063          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL C\r
++1D555         ; mapped                 ; 0064          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL D\r
++1D556         ; mapped                 ; 0065          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL E\r
++1D557         ; mapped                 ; 0066          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL F\r
++1D558         ; mapped                 ; 0067          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL G\r
++1D559         ; mapped                 ; 0068          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL H\r
++1D55A         ; mapped                 ; 0069          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL I\r
++1D55B         ; mapped                 ; 006A          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL J\r
++1D55C         ; mapped                 ; 006B          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL K\r
++1D55D         ; mapped                 ; 006C          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL L\r
++1D55E         ; mapped                 ; 006D          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL M\r
++1D55F         ; mapped                 ; 006E          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL N\r
++1D560         ; mapped                 ; 006F          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL O\r
++1D561         ; mapped                 ; 0070          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL P\r
++1D562         ; mapped                 ; 0071          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL Q\r
++1D563         ; mapped                 ; 0072          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL R\r
++1D564         ; mapped                 ; 0073          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL S\r
++1D565         ; mapped                 ; 0074          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL T\r
++1D566         ; mapped                 ; 0075          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL U\r
++1D567         ; mapped                 ; 0076          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL V\r
++1D568         ; mapped                 ; 0077          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL W\r
++1D569         ; mapped                 ; 0078          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL X\r
++1D56A         ; mapped                 ; 0079          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL Y\r
++1D56B         ; mapped                 ; 007A          # 3.1  MATHEMATICAL DOUBLE-STRUCK SMALL Z\r
++1D56C         ; mapped                 ; 0061          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL A\r
++1D56D         ; mapped                 ; 0062          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL B\r
++1D56E         ; mapped                 ; 0063          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL C\r
++1D56F         ; mapped                 ; 0064          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL D\r
++1D570         ; mapped                 ; 0065          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL E\r
++1D571         ; mapped                 ; 0066          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL F\r
++1D572         ; mapped                 ; 0067          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL G\r
++1D573         ; mapped                 ; 0068          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL H\r
++1D574         ; mapped                 ; 0069          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL I\r
++1D575         ; mapped                 ; 006A          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL J\r
++1D576         ; mapped                 ; 006B          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL K\r
++1D577         ; mapped                 ; 006C          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL L\r
++1D578         ; mapped                 ; 006D          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL M\r
++1D579         ; mapped                 ; 006E          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL N\r
++1D57A         ; mapped                 ; 006F          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL O\r
++1D57B         ; mapped                 ; 0070          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL P\r
++1D57C         ; mapped                 ; 0071          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL Q\r
++1D57D         ; mapped                 ; 0072          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL R\r
++1D57E         ; mapped                 ; 0073          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL S\r
++1D57F         ; mapped                 ; 0074          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL T\r
++1D580         ; mapped                 ; 0075          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL U\r
++1D581         ; mapped                 ; 0076          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL V\r
++1D582         ; mapped                 ; 0077          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL W\r
++1D583         ; mapped                 ; 0078          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL X\r
++1D584         ; mapped                 ; 0079          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL Y\r
++1D585         ; mapped                 ; 007A          # 3.1  MATHEMATICAL BOLD FRAKTUR CAPITAL Z\r
++1D586         ; mapped                 ; 0061          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL A\r
++1D587         ; mapped                 ; 0062          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL B\r
++1D588         ; mapped                 ; 0063          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL C\r
++1D589         ; mapped                 ; 0064          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL D\r
++1D58A         ; mapped                 ; 0065          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL E\r
++1D58B         ; mapped                 ; 0066          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL F\r
++1D58C         ; mapped                 ; 0067          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL G\r
++1D58D         ; mapped                 ; 0068          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL H\r
++1D58E         ; mapped                 ; 0069          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL I\r
++1D58F         ; mapped                 ; 006A          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL J\r
++1D590         ; mapped                 ; 006B          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL K\r
++1D591         ; mapped                 ; 006C          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL L\r
++1D592         ; mapped                 ; 006D          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL M\r
++1D593         ; mapped                 ; 006E          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL N\r
++1D594         ; mapped                 ; 006F          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL O\r
++1D595         ; mapped                 ; 0070          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL P\r
++1D596         ; mapped                 ; 0071          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL Q\r
++1D597         ; mapped                 ; 0072          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL R\r
++1D598         ; mapped                 ; 0073          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL S\r
++1D599         ; mapped                 ; 0074          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL T\r
++1D59A         ; mapped                 ; 0075          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL U\r
++1D59B         ; mapped                 ; 0076          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL V\r
++1D59C         ; mapped                 ; 0077          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL W\r
++1D59D         ; mapped                 ; 0078          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL X\r
++1D59E         ; mapped                 ; 0079          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL Y\r
++1D59F         ; mapped                 ; 007A          # 3.1  MATHEMATICAL BOLD FRAKTUR SMALL Z\r
++1D5A0         ; mapped                 ; 0061          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL A\r
++1D5A1         ; mapped                 ; 0062          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL B\r
++1D5A2         ; mapped                 ; 0063          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL C\r
++1D5A3         ; mapped                 ; 0064          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL D\r
++1D5A4         ; mapped                 ; 0065          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL E\r
++1D5A5         ; mapped                 ; 0066          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL F\r
++1D5A6         ; mapped                 ; 0067          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL G\r
++1D5A7         ; mapped                 ; 0068          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL H\r
++1D5A8         ; mapped                 ; 0069          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL I\r
++1D5A9         ; mapped                 ; 006A          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL J\r
++1D5AA         ; mapped                 ; 006B          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL K\r
++1D5AB         ; mapped                 ; 006C          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL L\r
++1D5AC         ; mapped                 ; 006D          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL M\r
++1D5AD         ; mapped                 ; 006E          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL N\r
++1D5AE         ; mapped                 ; 006F          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL O\r
++1D5AF         ; mapped                 ; 0070          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL P\r
++1D5B0         ; mapped                 ; 0071          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL Q\r
++1D5B1         ; mapped                 ; 0072          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL R\r
++1D5B2         ; mapped                 ; 0073          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL S\r
++1D5B3         ; mapped                 ; 0074          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL T\r
++1D5B4         ; mapped                 ; 0075          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL U\r
++1D5B5         ; mapped                 ; 0076          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL V\r
++1D5B6         ; mapped                 ; 0077          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL W\r
++1D5B7         ; mapped                 ; 0078          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL X\r
++1D5B8         ; mapped                 ; 0079          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL Y\r
++1D5B9         ; mapped                 ; 007A          # 3.1  MATHEMATICAL SANS-SERIF CAPITAL Z\r
++1D5BA         ; mapped                 ; 0061          # 3.1  MATHEMATICAL SANS-SERIF SMALL A\r
++1D5BB         ; mapped                 ; 0062          # 3.1  MATHEMATICAL SANS-SERIF SMALL B\r
++1D5BC         ; mapped                 ; 0063          # 3.1  MATHEMATICAL SANS-SERIF SMALL C\r
++1D5BD         ; mapped                 ; 0064          # 3.1  MATHEMATICAL SANS-SERIF SMALL D\r
++1D5BE         ; mapped                 ; 0065          # 3.1  MATHEMATICAL SANS-SERIF SMALL E\r
++1D5BF         ; mapped                 ; 0066          # 3.1  MATHEMATICAL SANS-SERIF SMALL F\r
++1D5C0         ; mapped                 ; 0067          # 3.1  MATHEMATICAL SANS-SERIF SMALL G\r
++1D5C1         ; mapped                 ; 0068          # 3.1  MATHEMATICAL SANS-SERIF SMALL H\r
++1D5C2         ; mapped                 ; 0069          # 3.1  MATHEMATICAL SANS-SERIF SMALL I\r
++1D5C3         ; mapped                 ; 006A          # 3.1  MATHEMATICAL SANS-SERIF SMALL J\r
++1D5C4         ; mapped                 ; 006B          # 3.1  MATHEMATICAL SANS-SERIF SMALL K\r
++1D5C5         ; mapped                 ; 006C          # 3.1  MATHEMATICAL SANS-SERIF SMALL L\r
++1D5C6         ; mapped                 ; 006D          # 3.1  MATHEMATICAL SANS-SERIF SMALL M\r
++1D5C7         ; mapped                 ; 006E          # 3.1  MATHEMATICAL SANS-SERIF SMALL N\r
++1D5C8         ; mapped                 ; 006F          # 3.1  MATHEMATICAL SANS-SERIF SMALL O\r
++1D5C9         ; mapped                 ; 0070          # 3.1  MATHEMATICAL SANS-SERIF SMALL P\r
++1D5CA         ; mapped                 ; 0071          # 3.1  MATHEMATICAL SANS-SERIF SMALL Q\r
++1D5CB         ; mapped                 ; 0072          # 3.1  MATHEMATICAL SANS-SERIF SMALL R\r
++1D5CC         ; mapped                 ; 0073          # 3.1  MATHEMATICAL SANS-SERIF SMALL S\r
++1D5CD         ; mapped                 ; 0074          # 3.1  MATHEMATICAL SANS-SERIF SMALL T\r
++1D5CE         ; mapped                 ; 0075          # 3.1  MATHEMATICAL SANS-SERIF SMALL U\r
++1D5CF         ; mapped                 ; 0076          # 3.1  MATHEMATICAL SANS-SERIF SMALL V\r
++1D5D0         ; mapped                 ; 0077          # 3.1  MATHEMATICAL SANS-SERIF SMALL W\r
++1D5D1         ; mapped                 ; 0078          # 3.1  MATHEMATICAL SANS-SERIF SMALL X\r
++1D5D2         ; mapped                 ; 0079          # 3.1  MATHEMATICAL SANS-SERIF SMALL Y\r
++1D5D3         ; mapped                 ; 007A          # 3.1  MATHEMATICAL SANS-SERIF SMALL Z\r
++1D5D4         ; mapped                 ; 0061          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL A\r
++1D5D5         ; mapped                 ; 0062          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL B\r
++1D5D6         ; mapped                 ; 0063          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL C\r
++1D5D7         ; mapped                 ; 0064          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL D\r
++1D5D8         ; mapped                 ; 0065          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL E\r
++1D5D9         ; mapped                 ; 0066          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL F\r
++1D5DA         ; mapped                 ; 0067          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL G\r
++1D5DB         ; mapped                 ; 0068          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL H\r
++1D5DC         ; mapped                 ; 0069          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL I\r
++1D5DD         ; mapped                 ; 006A          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL J\r
++1D5DE         ; mapped                 ; 006B          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL K\r
++1D5DF         ; mapped                 ; 006C          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL L\r
++1D5E0         ; mapped                 ; 006D          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL M\r
++1D5E1         ; mapped                 ; 006E          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL N\r
++1D5E2         ; mapped                 ; 006F          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL O\r
++1D5E3         ; mapped                 ; 0070          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL P\r
++1D5E4         ; mapped                 ; 0071          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL Q\r
++1D5E5         ; mapped                 ; 0072          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL R\r
++1D5E6         ; mapped                 ; 0073          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL S\r
++1D5E7         ; mapped                 ; 0074          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL T\r
++1D5E8         ; mapped                 ; 0075          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL U\r
++1D5E9         ; mapped                 ; 0076          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL V\r
++1D5EA         ; mapped                 ; 0077          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL W\r
++1D5EB         ; mapped                 ; 0078          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL X\r
++1D5EC         ; mapped                 ; 0079          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL Y\r
++1D5ED         ; mapped                 ; 007A          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL Z\r
++1D5EE         ; mapped                 ; 0061          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL A\r
++1D5EF         ; mapped                 ; 0062          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL B\r
++1D5F0         ; mapped                 ; 0063          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL C\r
++1D5F1         ; mapped                 ; 0064          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL D\r
++1D5F2         ; mapped                 ; 0065          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL E\r
++1D5F3         ; mapped                 ; 0066          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL F\r
++1D5F4         ; mapped                 ; 0067          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL G\r
++1D5F5         ; mapped                 ; 0068          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL H\r
++1D5F6         ; mapped                 ; 0069          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL I\r
++1D5F7         ; mapped                 ; 006A          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL J\r
++1D5F8         ; mapped                 ; 006B          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL K\r
++1D5F9         ; mapped                 ; 006C          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL L\r
++1D5FA         ; mapped                 ; 006D          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL M\r
++1D5FB         ; mapped                 ; 006E          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL N\r
++1D5FC         ; mapped                 ; 006F          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL O\r
++1D5FD         ; mapped                 ; 0070          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL P\r
++1D5FE         ; mapped                 ; 0071          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL Q\r
++1D5FF         ; mapped                 ; 0072          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL R\r
++1D600         ; mapped                 ; 0073          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL S\r
++1D601         ; mapped                 ; 0074          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL T\r
++1D602         ; mapped                 ; 0075          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL U\r
++1D603         ; mapped                 ; 0076          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL V\r
++1D604         ; mapped                 ; 0077          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL W\r
++1D605         ; mapped                 ; 0078          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL X\r
++1D606         ; mapped                 ; 0079          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL Y\r
++1D607         ; mapped                 ; 007A          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL Z\r
++1D608         ; mapped                 ; 0061          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL A\r
++1D609         ; mapped                 ; 0062          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL B\r
++1D60A         ; mapped                 ; 0063          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL C\r
++1D60B         ; mapped                 ; 0064          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL D\r
++1D60C         ; mapped                 ; 0065          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL E\r
++1D60D         ; mapped                 ; 0066          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL F\r
++1D60E         ; mapped                 ; 0067          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL G\r
++1D60F         ; mapped                 ; 0068          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL H\r
++1D610         ; mapped                 ; 0069          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL I\r
++1D611         ; mapped                 ; 006A          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL J\r
++1D612         ; mapped                 ; 006B          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL K\r
++1D613         ; mapped                 ; 006C          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL L\r
++1D614         ; mapped                 ; 006D          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL M\r
++1D615         ; mapped                 ; 006E          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL N\r
++1D616         ; mapped                 ; 006F          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL O\r
++1D617         ; mapped                 ; 0070          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL P\r
++1D618         ; mapped                 ; 0071          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL Q\r
++1D619         ; mapped                 ; 0072          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL R\r
++1D61A         ; mapped                 ; 0073          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL S\r
++1D61B         ; mapped                 ; 0074          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL T\r
++1D61C         ; mapped                 ; 0075          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL U\r
++1D61D         ; mapped                 ; 0076          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL V\r
++1D61E         ; mapped                 ; 0077          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL W\r
++1D61F         ; mapped                 ; 0078          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL X\r
++1D620         ; mapped                 ; 0079          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL Y\r
++1D621         ; mapped                 ; 007A          # 3.1  MATHEMATICAL SANS-SERIF ITALIC CAPITAL Z\r
++1D622         ; mapped                 ; 0061          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL A\r
++1D623         ; mapped                 ; 0062          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL B\r
++1D624         ; mapped                 ; 0063          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL C\r
++1D625         ; mapped                 ; 0064          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL D\r
++1D626         ; mapped                 ; 0065          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL E\r
++1D627         ; mapped                 ; 0066          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL F\r
++1D628         ; mapped                 ; 0067          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL G\r
++1D629         ; mapped                 ; 0068          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL H\r
++1D62A         ; mapped                 ; 0069          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL I\r
++1D62B         ; mapped                 ; 006A          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL J\r
++1D62C         ; mapped                 ; 006B          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL K\r
++1D62D         ; mapped                 ; 006C          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL L\r
++1D62E         ; mapped                 ; 006D          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL M\r
++1D62F         ; mapped                 ; 006E          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL N\r
++1D630         ; mapped                 ; 006F          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL O\r
++1D631         ; mapped                 ; 0070          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL P\r
++1D632         ; mapped                 ; 0071          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL Q\r
++1D633         ; mapped                 ; 0072          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL R\r
++1D634         ; mapped                 ; 0073          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL S\r
++1D635         ; mapped                 ; 0074          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL T\r
++1D636         ; mapped                 ; 0075          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL U\r
++1D637         ; mapped                 ; 0076          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL V\r
++1D638         ; mapped                 ; 0077          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL W\r
++1D639         ; mapped                 ; 0078          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL X\r
++1D63A         ; mapped                 ; 0079          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL Y\r
++1D63B         ; mapped                 ; 007A          # 3.1  MATHEMATICAL SANS-SERIF ITALIC SMALL Z\r
++1D63C         ; mapped                 ; 0061          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL A\r
++1D63D         ; mapped                 ; 0062          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL B\r
++1D63E         ; mapped                 ; 0063          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL C\r
++1D63F         ; mapped                 ; 0064          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL D\r
++1D640         ; mapped                 ; 0065          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL E\r
++1D641         ; mapped                 ; 0066          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL F\r
++1D642         ; mapped                 ; 0067          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL G\r
++1D643         ; mapped                 ; 0068          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL H\r
++1D644         ; mapped                 ; 0069          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL I\r
++1D645         ; mapped                 ; 006A          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL J\r
++1D646         ; mapped                 ; 006B          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL K\r
++1D647         ; mapped                 ; 006C          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL L\r
++1D648         ; mapped                 ; 006D          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL M\r
++1D649         ; mapped                 ; 006E          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL N\r
++1D64A         ; mapped                 ; 006F          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL O\r
++1D64B         ; mapped                 ; 0070          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL P\r
++1D64C         ; mapped                 ; 0071          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Q\r
++1D64D         ; mapped                 ; 0072          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL R\r
++1D64E         ; mapped                 ; 0073          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL S\r
++1D64F         ; mapped                 ; 0074          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL T\r
++1D650         ; mapped                 ; 0075          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL U\r
++1D651         ; mapped                 ; 0076          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL V\r
++1D652         ; mapped                 ; 0077          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL W\r
++1D653         ; mapped                 ; 0078          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL X\r
++1D654         ; mapped                 ; 0079          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Y\r
++1D655         ; mapped                 ; 007A          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Z\r
++1D656         ; mapped                 ; 0061          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL A\r
++1D657         ; mapped                 ; 0062          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL B\r
++1D658         ; mapped                 ; 0063          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL C\r
++1D659         ; mapped                 ; 0064          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL D\r
++1D65A         ; mapped                 ; 0065          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL E\r
++1D65B         ; mapped                 ; 0066          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL F\r
++1D65C         ; mapped                 ; 0067          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL G\r
++1D65D         ; mapped                 ; 0068          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL H\r
++1D65E         ; mapped                 ; 0069          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL I\r
++1D65F         ; mapped                 ; 006A          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL J\r
++1D660         ; mapped                 ; 006B          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL K\r
++1D661         ; mapped                 ; 006C          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL L\r
++1D662         ; mapped                 ; 006D          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL M\r
++1D663         ; mapped                 ; 006E          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL N\r
++1D664         ; mapped                 ; 006F          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL O\r
++1D665         ; mapped                 ; 0070          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL P\r
++1D666         ; mapped                 ; 0071          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Q\r
++1D667         ; mapped                 ; 0072          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL R\r
++1D668         ; mapped                 ; 0073          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL S\r
++1D669         ; mapped                 ; 0074          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL T\r
++1D66A         ; mapped                 ; 0075          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL U\r
++1D66B         ; mapped                 ; 0076          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL V\r
++1D66C         ; mapped                 ; 0077          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL W\r
++1D66D         ; mapped                 ; 0078          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL X\r
++1D66E         ; mapped                 ; 0079          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Y\r
++1D66F         ; mapped                 ; 007A          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Z\r
++1D670         ; mapped                 ; 0061          # 3.1  MATHEMATICAL MONOSPACE CAPITAL A\r
++1D671         ; mapped                 ; 0062          # 3.1  MATHEMATICAL MONOSPACE CAPITAL B\r
++1D672         ; mapped                 ; 0063          # 3.1  MATHEMATICAL MONOSPACE CAPITAL C\r
++1D673         ; mapped                 ; 0064          # 3.1  MATHEMATICAL MONOSPACE CAPITAL D\r
++1D674         ; mapped                 ; 0065          # 3.1  MATHEMATICAL MONOSPACE CAPITAL E\r
++1D675         ; mapped                 ; 0066          # 3.1  MATHEMATICAL MONOSPACE CAPITAL F\r
++1D676         ; mapped                 ; 0067          # 3.1  MATHEMATICAL MONOSPACE CAPITAL G\r
++1D677         ; mapped                 ; 0068          # 3.1  MATHEMATICAL MONOSPACE CAPITAL H\r
++1D678         ; mapped                 ; 0069          # 3.1  MATHEMATICAL MONOSPACE CAPITAL I\r
++1D679         ; mapped                 ; 006A          # 3.1  MATHEMATICAL MONOSPACE CAPITAL J\r
++1D67A         ; mapped                 ; 006B          # 3.1  MATHEMATICAL MONOSPACE CAPITAL K\r
++1D67B         ; mapped                 ; 006C          # 3.1  MATHEMATICAL MONOSPACE CAPITAL L\r
++1D67C         ; mapped                 ; 006D          # 3.1  MATHEMATICAL MONOSPACE CAPITAL M\r
++1D67D         ; mapped                 ; 006E          # 3.1  MATHEMATICAL MONOSPACE CAPITAL N\r
++1D67E         ; mapped                 ; 006F          # 3.1  MATHEMATICAL MONOSPACE CAPITAL O\r
++1D67F         ; mapped                 ; 0070          # 3.1  MATHEMATICAL MONOSPACE CAPITAL P\r
++1D680         ; mapped                 ; 0071          # 3.1  MATHEMATICAL MONOSPACE CAPITAL Q\r
++1D681         ; mapped                 ; 0072          # 3.1  MATHEMATICAL MONOSPACE CAPITAL R\r
++1D682         ; mapped                 ; 0073          # 3.1  MATHEMATICAL MONOSPACE CAPITAL S\r
++1D683         ; mapped                 ; 0074          # 3.1  MATHEMATICAL MONOSPACE CAPITAL T\r
++1D684         ; mapped                 ; 0075          # 3.1  MATHEMATICAL MONOSPACE CAPITAL U\r
++1D685         ; mapped                 ; 0076          # 3.1  MATHEMATICAL MONOSPACE CAPITAL V\r
++1D686         ; mapped                 ; 0077          # 3.1  MATHEMATICAL MONOSPACE CAPITAL W\r
++1D687         ; mapped                 ; 0078          # 3.1  MATHEMATICAL MONOSPACE CAPITAL X\r
++1D688         ; mapped                 ; 0079          # 3.1  MATHEMATICAL MONOSPACE CAPITAL Y\r
++1D689         ; mapped                 ; 007A          # 3.1  MATHEMATICAL MONOSPACE CAPITAL Z\r
++1D68A         ; mapped                 ; 0061          # 3.1  MATHEMATICAL MONOSPACE SMALL A\r
++1D68B         ; mapped                 ; 0062          # 3.1  MATHEMATICAL MONOSPACE SMALL B\r
++1D68C         ; mapped                 ; 0063          # 3.1  MATHEMATICAL MONOSPACE SMALL C\r
++1D68D         ; mapped                 ; 0064          # 3.1  MATHEMATICAL MONOSPACE SMALL D\r
++1D68E         ; mapped                 ; 0065          # 3.1  MATHEMATICAL MONOSPACE SMALL E\r
++1D68F         ; mapped                 ; 0066          # 3.1  MATHEMATICAL MONOSPACE SMALL F\r
++1D690         ; mapped                 ; 0067          # 3.1  MATHEMATICAL MONOSPACE SMALL G\r
++1D691         ; mapped                 ; 0068          # 3.1  MATHEMATICAL MONOSPACE SMALL H\r
++1D692         ; mapped                 ; 0069          # 3.1  MATHEMATICAL MONOSPACE SMALL I\r
++1D693         ; mapped                 ; 006A          # 3.1  MATHEMATICAL MONOSPACE SMALL J\r
++1D694         ; mapped                 ; 006B          # 3.1  MATHEMATICAL MONOSPACE SMALL K\r
++1D695         ; mapped                 ; 006C          # 3.1  MATHEMATICAL MONOSPACE SMALL L\r
++1D696         ; mapped                 ; 006D          # 3.1  MATHEMATICAL MONOSPACE SMALL M\r
++1D697         ; mapped                 ; 006E          # 3.1  MATHEMATICAL MONOSPACE SMALL N\r
++1D698         ; mapped                 ; 006F          # 3.1  MATHEMATICAL MONOSPACE SMALL O\r
++1D699         ; mapped                 ; 0070          # 3.1  MATHEMATICAL MONOSPACE SMALL P\r
++1D69A         ; mapped                 ; 0071          # 3.1  MATHEMATICAL MONOSPACE SMALL Q\r
++1D69B         ; mapped                 ; 0072          # 3.1  MATHEMATICAL MONOSPACE SMALL R\r
++1D69C         ; mapped                 ; 0073          # 3.1  MATHEMATICAL MONOSPACE SMALL S\r
++1D69D         ; mapped                 ; 0074          # 3.1  MATHEMATICAL MONOSPACE SMALL T\r
++1D69E         ; mapped                 ; 0075          # 3.1  MATHEMATICAL MONOSPACE SMALL U\r
++1D69F         ; mapped                 ; 0076          # 3.1  MATHEMATICAL MONOSPACE SMALL V\r
++1D6A0         ; mapped                 ; 0077          # 3.1  MATHEMATICAL MONOSPACE SMALL W\r
++1D6A1         ; mapped                 ; 0078          # 3.1  MATHEMATICAL MONOSPACE SMALL X\r
++1D6A2         ; mapped                 ; 0079          # 3.1  MATHEMATICAL MONOSPACE SMALL Y\r
++1D6A3         ; mapped                 ; 007A          # 3.1  MATHEMATICAL MONOSPACE SMALL Z\r
++1D6A4         ; mapped                 ; 0131          # 4.1  MATHEMATICAL ITALIC SMALL DOTLESS I\r
++1D6A5         ; mapped                 ; 0237          # 4.1  MATHEMATICAL ITALIC SMALL DOTLESS J\r
++1D6A6..1D6A7  ; disallowed                             # NA   <reserved-1D6A6>..<reserved-1D6A7>\r
++1D6A8         ; mapped                 ; 03B1          # 3.1  MATHEMATICAL BOLD CAPITAL ALPHA\r
++1D6A9         ; mapped                 ; 03B2          # 3.1  MATHEMATICAL BOLD CAPITAL BETA\r
++1D6AA         ; mapped                 ; 03B3          # 3.1  MATHEMATICAL BOLD CAPITAL GAMMA\r
++1D6AB         ; mapped                 ; 03B4          # 3.1  MATHEMATICAL BOLD CAPITAL DELTA\r
++1D6AC         ; mapped                 ; 03B5          # 3.1  MATHEMATICAL BOLD CAPITAL EPSILON\r
++1D6AD         ; mapped                 ; 03B6          # 3.1  MATHEMATICAL BOLD CAPITAL ZETA\r
++1D6AE         ; mapped                 ; 03B7          # 3.1  MATHEMATICAL BOLD CAPITAL ETA\r
++1D6AF         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL BOLD CAPITAL THETA\r
++1D6B0         ; mapped                 ; 03B9          # 3.1  MATHEMATICAL BOLD CAPITAL IOTA\r
++1D6B1         ; mapped                 ; 03BA          # 3.1  MATHEMATICAL BOLD CAPITAL KAPPA\r
++1D6B2         ; mapped                 ; 03BB          # 3.1  MATHEMATICAL BOLD CAPITAL LAMDA\r
++1D6B3         ; mapped                 ; 03BC          # 3.1  MATHEMATICAL BOLD CAPITAL MU\r
++1D6B4         ; mapped                 ; 03BD          # 3.1  MATHEMATICAL BOLD CAPITAL NU\r
++1D6B5         ; mapped                 ; 03BE          # 3.1  MATHEMATICAL BOLD CAPITAL XI\r
++1D6B6         ; mapped                 ; 03BF          # 3.1  MATHEMATICAL BOLD CAPITAL OMICRON\r
++1D6B7         ; mapped                 ; 03C0          # 3.1  MATHEMATICAL BOLD CAPITAL PI\r
++1D6B8         ; mapped                 ; 03C1          # 3.1  MATHEMATICAL BOLD CAPITAL RHO\r
++1D6B9         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL BOLD CAPITAL THETA SYMBOL\r
++1D6BA         ; mapped                 ; 03C3          # 3.1  MATHEMATICAL BOLD CAPITAL SIGMA\r
++1D6BB         ; mapped                 ; 03C4          # 3.1  MATHEMATICAL BOLD CAPITAL TAU\r
++1D6BC         ; mapped                 ; 03C5          # 3.1  MATHEMATICAL BOLD CAPITAL UPSILON\r
++1D6BD         ; mapped                 ; 03C6          # 3.1  MATHEMATICAL BOLD CAPITAL PHI\r
++1D6BE         ; mapped                 ; 03C7          # 3.1  MATHEMATICAL BOLD CAPITAL CHI\r
++1D6BF         ; mapped                 ; 03C8          # 3.1  MATHEMATICAL BOLD CAPITAL PSI\r
++1D6C0         ; mapped                 ; 03C9          # 3.1  MATHEMATICAL BOLD CAPITAL OMEGA\r
++1D6C1         ; mapped                 ; 2207          # 3.1  MATHEMATICAL BOLD NABLA\r
++1D6C2         ; mapped                 ; 03B1          # 3.1  MATHEMATICAL BOLD SMALL ALPHA\r
++1D6C3         ; mapped                 ; 03B2          # 3.1  MATHEMATICAL BOLD SMALL BETA\r
++1D6C4         ; mapped                 ; 03B3          # 3.1  MATHEMATICAL BOLD SMALL GAMMA\r
++1D6C5         ; mapped                 ; 03B4          # 3.1  MATHEMATICAL BOLD SMALL DELTA\r
++1D6C6         ; mapped                 ; 03B5          # 3.1  MATHEMATICAL BOLD SMALL EPSILON\r
++1D6C7         ; mapped                 ; 03B6          # 3.1  MATHEMATICAL BOLD SMALL ZETA\r
++1D6C8         ; mapped                 ; 03B7          # 3.1  MATHEMATICAL BOLD SMALL ETA\r
++1D6C9         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL BOLD SMALL THETA\r
++1D6CA         ; mapped                 ; 03B9          # 3.1  MATHEMATICAL BOLD SMALL IOTA\r
++1D6CB         ; mapped                 ; 03BA          # 3.1  MATHEMATICAL BOLD SMALL KAPPA\r
++1D6CC         ; mapped                 ; 03BB          # 3.1  MATHEMATICAL BOLD SMALL LAMDA\r
++1D6CD         ; mapped                 ; 03BC          # 3.1  MATHEMATICAL BOLD SMALL MU\r
++1D6CE         ; mapped                 ; 03BD          # 3.1  MATHEMATICAL BOLD SMALL NU\r
++1D6CF         ; mapped                 ; 03BE          # 3.1  MATHEMATICAL BOLD SMALL XI\r
++1D6D0         ; mapped                 ; 03BF          # 3.1  MATHEMATICAL BOLD SMALL OMICRON\r
++1D6D1         ; mapped                 ; 03C0          # 3.1  MATHEMATICAL BOLD SMALL PI\r
++1D6D2         ; mapped                 ; 03C1          # 3.1  MATHEMATICAL BOLD SMALL RHO\r
++1D6D3..1D6D4  ; mapped                 ; 03C3          # 3.1  MATHEMATICAL BOLD SMALL FINAL SIGMA..MATHEMATICAL BOLD SMALL SIGMA\r
++1D6D5         ; mapped                 ; 03C4          # 3.1  MATHEMATICAL BOLD SMALL TAU\r
++1D6D6         ; mapped                 ; 03C5          # 3.1  MATHEMATICAL BOLD SMALL UPSILON\r
++1D6D7         ; mapped                 ; 03C6          # 3.1  MATHEMATICAL BOLD SMALL PHI\r
++1D6D8         ; mapped                 ; 03C7          # 3.1  MATHEMATICAL BOLD SMALL CHI\r
++1D6D9         ; mapped                 ; 03C8          # 3.1  MATHEMATICAL BOLD SMALL PSI\r
++1D6DA         ; mapped                 ; 03C9          # 3.1  MATHEMATICAL BOLD SMALL OMEGA\r
++1D6DB         ; mapped                 ; 2202          # 3.1  MATHEMATICAL BOLD PARTIAL DIFFERENTIAL\r
++1D6DC         ; mapped                 ; 03B5          # 3.1  MATHEMATICAL BOLD EPSILON SYMBOL\r
++1D6DD         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL BOLD THETA SYMBOL\r
++1D6DE         ; mapped                 ; 03BA          # 3.1  MATHEMATICAL BOLD KAPPA SYMBOL\r
++1D6DF         ; mapped                 ; 03C6          # 3.1  MATHEMATICAL BOLD PHI SYMBOL\r
++1D6E0         ; mapped                 ; 03C1          # 3.1  MATHEMATICAL BOLD RHO SYMBOL\r
++1D6E1         ; mapped                 ; 03C0          # 3.1  MATHEMATICAL BOLD PI SYMBOL\r
++1D6E2         ; mapped                 ; 03B1          # 3.1  MATHEMATICAL ITALIC CAPITAL ALPHA\r
++1D6E3         ; mapped                 ; 03B2          # 3.1  MATHEMATICAL ITALIC CAPITAL BETA\r
++1D6E4         ; mapped                 ; 03B3          # 3.1  MATHEMATICAL ITALIC CAPITAL GAMMA\r
++1D6E5         ; mapped                 ; 03B4          # 3.1  MATHEMATICAL ITALIC CAPITAL DELTA\r
++1D6E6         ; mapped                 ; 03B5          # 3.1  MATHEMATICAL ITALIC CAPITAL EPSILON\r
++1D6E7         ; mapped                 ; 03B6          # 3.1  MATHEMATICAL ITALIC CAPITAL ZETA\r
++1D6E8         ; mapped                 ; 03B7          # 3.1  MATHEMATICAL ITALIC CAPITAL ETA\r
++1D6E9         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL ITALIC CAPITAL THETA\r
++1D6EA         ; mapped                 ; 03B9          # 3.1  MATHEMATICAL ITALIC CAPITAL IOTA\r
++1D6EB         ; mapped                 ; 03BA          # 3.1  MATHEMATICAL ITALIC CAPITAL KAPPA\r
++1D6EC         ; mapped                 ; 03BB          # 3.1  MATHEMATICAL ITALIC CAPITAL LAMDA\r
++1D6ED         ; mapped                 ; 03BC          # 3.1  MATHEMATICAL ITALIC CAPITAL MU\r
++1D6EE         ; mapped                 ; 03BD          # 3.1  MATHEMATICAL ITALIC CAPITAL NU\r
++1D6EF         ; mapped                 ; 03BE          # 3.1  MATHEMATICAL ITALIC CAPITAL XI\r
++1D6F0         ; mapped                 ; 03BF          # 3.1  MATHEMATICAL ITALIC CAPITAL OMICRON\r
++1D6F1         ; mapped                 ; 03C0          # 3.1  MATHEMATICAL ITALIC CAPITAL PI\r
++1D6F2         ; mapped                 ; 03C1          # 3.1  MATHEMATICAL ITALIC CAPITAL RHO\r
++1D6F3         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL ITALIC CAPITAL THETA SYMBOL\r
++1D6F4         ; mapped                 ; 03C3          # 3.1  MATHEMATICAL ITALIC CAPITAL SIGMA\r
++1D6F5         ; mapped                 ; 03C4          # 3.1  MATHEMATICAL ITALIC CAPITAL TAU\r
++1D6F6         ; mapped                 ; 03C5          # 3.1  MATHEMATICAL ITALIC CAPITAL UPSILON\r
++1D6F7         ; mapped                 ; 03C6          # 3.1  MATHEMATICAL ITALIC CAPITAL PHI\r
++1D6F8         ; mapped                 ; 03C7          # 3.1  MATHEMATICAL ITALIC CAPITAL CHI\r
++1D6F9         ; mapped                 ; 03C8          # 3.1  MATHEMATICAL ITALIC CAPITAL PSI\r
++1D6FA         ; mapped                 ; 03C9          # 3.1  MATHEMATICAL ITALIC CAPITAL OMEGA\r
++1D6FB         ; mapped                 ; 2207          # 3.1  MATHEMATICAL ITALIC NABLA\r
++1D6FC         ; mapped                 ; 03B1          # 3.1  MATHEMATICAL ITALIC SMALL ALPHA\r
++1D6FD         ; mapped                 ; 03B2          # 3.1  MATHEMATICAL ITALIC SMALL BETA\r
++1D6FE         ; mapped                 ; 03B3          # 3.1  MATHEMATICAL ITALIC SMALL GAMMA\r
++1D6FF         ; mapped                 ; 03B4          # 3.1  MATHEMATICAL ITALIC SMALL DELTA\r
++1D700         ; mapped                 ; 03B5          # 3.1  MATHEMATICAL ITALIC SMALL EPSILON\r
++1D701         ; mapped                 ; 03B6          # 3.1  MATHEMATICAL ITALIC SMALL ZETA\r
++1D702         ; mapped                 ; 03B7          # 3.1  MATHEMATICAL ITALIC SMALL ETA\r
++1D703         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL ITALIC SMALL THETA\r
++1D704         ; mapped                 ; 03B9          # 3.1  MATHEMATICAL ITALIC SMALL IOTA\r
++1D705         ; mapped                 ; 03BA          # 3.1  MATHEMATICAL ITALIC SMALL KAPPA\r
++1D706         ; mapped                 ; 03BB          # 3.1  MATHEMATICAL ITALIC SMALL LAMDA\r
++1D707         ; mapped                 ; 03BC          # 3.1  MATHEMATICAL ITALIC SMALL MU\r
++1D708         ; mapped                 ; 03BD          # 3.1  MATHEMATICAL ITALIC SMALL NU\r
++1D709         ; mapped                 ; 03BE          # 3.1  MATHEMATICAL ITALIC SMALL XI\r
++1D70A         ; mapped                 ; 03BF          # 3.1  MATHEMATICAL ITALIC SMALL OMICRON\r
++1D70B         ; mapped                 ; 03C0          # 3.1  MATHEMATICAL ITALIC SMALL PI\r
++1D70C         ; mapped                 ; 03C1          # 3.1  MATHEMATICAL ITALIC SMALL RHO\r
++1D70D..1D70E  ; mapped                 ; 03C3          # 3.1  MATHEMATICAL ITALIC SMALL FINAL SIGMA..MATHEMATICAL ITALIC SMALL SIGMA\r
++1D70F         ; mapped                 ; 03C4          # 3.1  MATHEMATICAL ITALIC SMALL TAU\r
++1D710         ; mapped                 ; 03C5          # 3.1  MATHEMATICAL ITALIC SMALL UPSILON\r
++1D711         ; mapped                 ; 03C6          # 3.1  MATHEMATICAL ITALIC SMALL PHI\r
++1D712         ; mapped                 ; 03C7          # 3.1  MATHEMATICAL ITALIC SMALL CHI\r
++1D713         ; mapped                 ; 03C8          # 3.1  MATHEMATICAL ITALIC SMALL PSI\r
++1D714         ; mapped                 ; 03C9          # 3.1  MATHEMATICAL ITALIC SMALL OMEGA\r
++1D715         ; mapped                 ; 2202          # 3.1  MATHEMATICAL ITALIC PARTIAL DIFFERENTIAL\r
++1D716         ; mapped                 ; 03B5          # 3.1  MATHEMATICAL ITALIC EPSILON SYMBOL\r
++1D717         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL ITALIC THETA SYMBOL\r
++1D718         ; mapped                 ; 03BA          # 3.1  MATHEMATICAL ITALIC KAPPA SYMBOL\r
++1D719         ; mapped                 ; 03C6          # 3.1  MATHEMATICAL ITALIC PHI SYMBOL\r
++1D71A         ; mapped                 ; 03C1          # 3.1  MATHEMATICAL ITALIC RHO SYMBOL\r
++1D71B         ; mapped                 ; 03C0          # 3.1  MATHEMATICAL ITALIC PI SYMBOL\r
++1D71C         ; mapped                 ; 03B1          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL ALPHA\r
++1D71D         ; mapped                 ; 03B2          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL BETA\r
++1D71E         ; mapped                 ; 03B3          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL GAMMA\r
++1D71F         ; mapped                 ; 03B4          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL DELTA\r
++1D720         ; mapped                 ; 03B5          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL EPSILON\r
++1D721         ; mapped                 ; 03B6          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL ZETA\r
++1D722         ; mapped                 ; 03B7          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL ETA\r
++1D723         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL THETA\r
++1D724         ; mapped                 ; 03B9          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL IOTA\r
++1D725         ; mapped                 ; 03BA          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL KAPPA\r
++1D726         ; mapped                 ; 03BB          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL LAMDA\r
++1D727         ; mapped                 ; 03BC          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL MU\r
++1D728         ; mapped                 ; 03BD          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL NU\r
++1D729         ; mapped                 ; 03BE          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL XI\r
++1D72A         ; mapped                 ; 03BF          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL OMICRON\r
++1D72B         ; mapped                 ; 03C0          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL PI\r
++1D72C         ; mapped                 ; 03C1          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL RHO\r
++1D72D         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL THETA SYMBOL\r
++1D72E         ; mapped                 ; 03C3          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL SIGMA\r
++1D72F         ; mapped                 ; 03C4          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL TAU\r
++1D730         ; mapped                 ; 03C5          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL UPSILON\r
++1D731         ; mapped                 ; 03C6          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL PHI\r
++1D732         ; mapped                 ; 03C7          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL CHI\r
++1D733         ; mapped                 ; 03C8          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL PSI\r
++1D734         ; mapped                 ; 03C9          # 3.1  MATHEMATICAL BOLD ITALIC CAPITAL OMEGA\r
++1D735         ; mapped                 ; 2207          # 3.1  MATHEMATICAL BOLD ITALIC NABLA\r
++1D736         ; mapped                 ; 03B1          # 3.1  MATHEMATICAL BOLD ITALIC SMALL ALPHA\r
++1D737         ; mapped                 ; 03B2          # 3.1  MATHEMATICAL BOLD ITALIC SMALL BETA\r
++1D738         ; mapped                 ; 03B3          # 3.1  MATHEMATICAL BOLD ITALIC SMALL GAMMA\r
++1D739         ; mapped                 ; 03B4          # 3.1  MATHEMATICAL BOLD ITALIC SMALL DELTA\r
++1D73A         ; mapped                 ; 03B5          # 3.1  MATHEMATICAL BOLD ITALIC SMALL EPSILON\r
++1D73B         ; mapped                 ; 03B6          # 3.1  MATHEMATICAL BOLD ITALIC SMALL ZETA\r
++1D73C         ; mapped                 ; 03B7          # 3.1  MATHEMATICAL BOLD ITALIC SMALL ETA\r
++1D73D         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL BOLD ITALIC SMALL THETA\r
++1D73E         ; mapped                 ; 03B9          # 3.1  MATHEMATICAL BOLD ITALIC SMALL IOTA\r
++1D73F         ; mapped                 ; 03BA          # 3.1  MATHEMATICAL BOLD ITALIC SMALL KAPPA\r
++1D740         ; mapped                 ; 03BB          # 3.1  MATHEMATICAL BOLD ITALIC SMALL LAMDA\r
++1D741         ; mapped                 ; 03BC          # 3.1  MATHEMATICAL BOLD ITALIC SMALL MU\r
++1D742         ; mapped                 ; 03BD          # 3.1  MATHEMATICAL BOLD ITALIC SMALL NU\r
++1D743         ; mapped                 ; 03BE          # 3.1  MATHEMATICAL BOLD ITALIC SMALL XI\r
++1D744         ; mapped                 ; 03BF          # 3.1  MATHEMATICAL BOLD ITALIC SMALL OMICRON\r
++1D745         ; mapped                 ; 03C0          # 3.1  MATHEMATICAL BOLD ITALIC SMALL PI\r
++1D746         ; mapped                 ; 03C1          # 3.1  MATHEMATICAL BOLD ITALIC SMALL RHO\r
++1D747..1D748  ; mapped                 ; 03C3          # 3.1  MATHEMATICAL BOLD ITALIC SMALL FINAL SIGMA..MATHEMATICAL BOLD ITALIC SMALL SIGMA\r
++1D749         ; mapped                 ; 03C4          # 3.1  MATHEMATICAL BOLD ITALIC SMALL TAU\r
++1D74A         ; mapped                 ; 03C5          # 3.1  MATHEMATICAL BOLD ITALIC SMALL UPSILON\r
++1D74B         ; mapped                 ; 03C6          # 3.1  MATHEMATICAL BOLD ITALIC SMALL PHI\r
++1D74C         ; mapped                 ; 03C7          # 3.1  MATHEMATICAL BOLD ITALIC SMALL CHI\r
++1D74D         ; mapped                 ; 03C8          # 3.1  MATHEMATICAL BOLD ITALIC SMALL PSI\r
++1D74E         ; mapped                 ; 03C9          # 3.1  MATHEMATICAL BOLD ITALIC SMALL OMEGA\r
++1D74F         ; mapped                 ; 2202          # 3.1  MATHEMATICAL BOLD ITALIC PARTIAL DIFFERENTIAL\r
++1D750         ; mapped                 ; 03B5          # 3.1  MATHEMATICAL BOLD ITALIC EPSILON SYMBOL\r
++1D751         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL BOLD ITALIC THETA SYMBOL\r
++1D752         ; mapped                 ; 03BA          # 3.1  MATHEMATICAL BOLD ITALIC KAPPA SYMBOL\r
++1D753         ; mapped                 ; 03C6          # 3.1  MATHEMATICAL BOLD ITALIC PHI SYMBOL\r
++1D754         ; mapped                 ; 03C1          # 3.1  MATHEMATICAL BOLD ITALIC RHO SYMBOL\r
++1D755         ; mapped                 ; 03C0          # 3.1  MATHEMATICAL BOLD ITALIC PI SYMBOL\r
++1D756         ; mapped                 ; 03B1          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL ALPHA\r
++1D757         ; mapped                 ; 03B2          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL BETA\r
++1D758         ; mapped                 ; 03B3          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL GAMMA\r
++1D759         ; mapped                 ; 03B4          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL DELTA\r
++1D75A         ; mapped                 ; 03B5          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL EPSILON\r
++1D75B         ; mapped                 ; 03B6          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL ZETA\r
++1D75C         ; mapped                 ; 03B7          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL ETA\r
++1D75D         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL THETA\r
++1D75E         ; mapped                 ; 03B9          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL IOTA\r
++1D75F         ; mapped                 ; 03BA          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL KAPPA\r
++1D760         ; mapped                 ; 03BB          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL LAMDA\r
++1D761         ; mapped                 ; 03BC          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL MU\r
++1D762         ; mapped                 ; 03BD          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL NU\r
++1D763         ; mapped                 ; 03BE          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL XI\r
++1D764         ; mapped                 ; 03BF          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL OMICRON\r
++1D765         ; mapped                 ; 03C0          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL PI\r
++1D766         ; mapped                 ; 03C1          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL RHO\r
++1D767         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL THETA SYMBOL\r
++1D768         ; mapped                 ; 03C3          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL SIGMA\r
++1D769         ; mapped                 ; 03C4          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL TAU\r
++1D76A         ; mapped                 ; 03C5          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL UPSILON\r
++1D76B         ; mapped                 ; 03C6          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL PHI\r
++1D76C         ; mapped                 ; 03C7          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL CHI\r
++1D76D         ; mapped                 ; 03C8          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL PSI\r
++1D76E         ; mapped                 ; 03C9          # 3.1  MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA\r
++1D76F         ; mapped                 ; 2207          # 3.1  MATHEMATICAL SANS-SERIF BOLD NABLA\r
++1D770         ; mapped                 ; 03B1          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL ALPHA\r
++1D771         ; mapped                 ; 03B2          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL BETA\r
++1D772         ; mapped                 ; 03B3          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL GAMMA\r
++1D773         ; mapped                 ; 03B4          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL DELTA\r
++1D774         ; mapped                 ; 03B5          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL EPSILON\r
++1D775         ; mapped                 ; 03B6          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL ZETA\r
++1D776         ; mapped                 ; 03B7          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL ETA\r
++1D777         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL THETA\r
++1D778         ; mapped                 ; 03B9          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL IOTA\r
++1D779         ; mapped                 ; 03BA          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL KAPPA\r
++1D77A         ; mapped                 ; 03BB          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL LAMDA\r
++1D77B         ; mapped                 ; 03BC          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL MU\r
++1D77C         ; mapped                 ; 03BD          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL NU\r
++1D77D         ; mapped                 ; 03BE          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL XI\r
++1D77E         ; mapped                 ; 03BF          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL OMICRON\r
++1D77F         ; mapped                 ; 03C0          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL PI\r
++1D780         ; mapped                 ; 03C1          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL RHO\r
++1D781..1D782  ; mapped                 ; 03C3          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL FINAL SIGMA..MATHEMATICAL SANS-SERIF BOLD SMALL SIGMA\r
++1D783         ; mapped                 ; 03C4          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL TAU\r
++1D784         ; mapped                 ; 03C5          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL UPSILON\r
++1D785         ; mapped                 ; 03C6          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL PHI\r
++1D786         ; mapped                 ; 03C7          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL CHI\r
++1D787         ; mapped                 ; 03C8          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL PSI\r
++1D788         ; mapped                 ; 03C9          # 3.1  MATHEMATICAL SANS-SERIF BOLD SMALL OMEGA\r
++1D789         ; mapped                 ; 2202          # 3.1  MATHEMATICAL SANS-SERIF BOLD PARTIAL DIFFERENTIAL\r
++1D78A         ; mapped                 ; 03B5          # 3.1  MATHEMATICAL SANS-SERIF BOLD EPSILON SYMBOL\r
++1D78B         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL SANS-SERIF BOLD THETA SYMBOL\r
++1D78C         ; mapped                 ; 03BA          # 3.1  MATHEMATICAL SANS-SERIF BOLD KAPPA SYMBOL\r
++1D78D         ; mapped                 ; 03C6          # 3.1  MATHEMATICAL SANS-SERIF BOLD PHI SYMBOL\r
++1D78E         ; mapped                 ; 03C1          # 3.1  MATHEMATICAL SANS-SERIF BOLD RHO SYMBOL\r
++1D78F         ; mapped                 ; 03C0          # 3.1  MATHEMATICAL SANS-SERIF BOLD PI SYMBOL\r
++1D790         ; mapped                 ; 03B1          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ALPHA\r
++1D791         ; mapped                 ; 03B2          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL BETA\r
++1D792         ; mapped                 ; 03B3          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL GAMMA\r
++1D793         ; mapped                 ; 03B4          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL DELTA\r
++1D794         ; mapped                 ; 03B5          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL EPSILON\r
++1D795         ; mapped                 ; 03B6          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ZETA\r
++1D796         ; mapped                 ; 03B7          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ETA\r
++1D797         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL THETA\r
++1D798         ; mapped                 ; 03B9          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL IOTA\r
++1D799         ; mapped                 ; 03BA          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL KAPPA\r
++1D79A         ; mapped                 ; 03BB          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL LAMDA\r
++1D79B         ; mapped                 ; 03BC          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL MU\r
++1D79C         ; mapped                 ; 03BD          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL NU\r
++1D79D         ; mapped                 ; 03BE          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL XI\r
++1D79E         ; mapped                 ; 03BF          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMICRON\r
++1D79F         ; mapped                 ; 03C0          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PI\r
++1D7A0         ; mapped                 ; 03C1          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL RHO\r
++1D7A1         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL THETA SYMBOL\r
++1D7A2         ; mapped                 ; 03C3          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL SIGMA\r
++1D7A3         ; mapped                 ; 03C4          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL TAU\r
++1D7A4         ; mapped                 ; 03C5          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL UPSILON\r
++1D7A5         ; mapped                 ; 03C6          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PHI\r
++1D7A6         ; mapped                 ; 03C7          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL CHI\r
++1D7A7         ; mapped                 ; 03C8          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PSI\r
++1D7A8         ; mapped                 ; 03C9          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA\r
++1D7A9         ; mapped                 ; 2207          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC NABLA\r
++1D7AA         ; mapped                 ; 03B1          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ALPHA\r
++1D7AB         ; mapped                 ; 03B2          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL BETA\r
++1D7AC         ; mapped                 ; 03B3          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL GAMMA\r
++1D7AD         ; mapped                 ; 03B4          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL DELTA\r
++1D7AE         ; mapped                 ; 03B5          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL EPSILON\r
++1D7AF         ; mapped                 ; 03B6          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ZETA\r
++1D7B0         ; mapped                 ; 03B7          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ETA\r
++1D7B1         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL THETA\r
++1D7B2         ; mapped                 ; 03B9          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL IOTA\r
++1D7B3         ; mapped                 ; 03BA          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL KAPPA\r
++1D7B4         ; mapped                 ; 03BB          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL LAMDA\r
++1D7B5         ; mapped                 ; 03BC          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL MU\r
++1D7B6         ; mapped                 ; 03BD          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL NU\r
++1D7B7         ; mapped                 ; 03BE          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL XI\r
++1D7B8         ; mapped                 ; 03BF          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMICRON\r
++1D7B9         ; mapped                 ; 03C0          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL PI\r
++1D7BA         ; mapped                 ; 03C1          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL RHO\r
++1D7BB..1D7BC  ; mapped                 ; 03C3          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL FINAL SIGMA..MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL SIGMA\r
++1D7BD         ; mapped                 ; 03C4          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL TAU\r
++1D7BE         ; mapped                 ; 03C5          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL UPSILON\r
++1D7BF         ; mapped                 ; 03C6          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL PHI\r
++1D7C0         ; mapped                 ; 03C7          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL CHI\r
++1D7C1         ; mapped                 ; 03C8          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL PSI\r
++1D7C2         ; mapped                 ; 03C9          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMEGA\r
++1D7C3         ; mapped                 ; 2202          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC PARTIAL DIFFERENTIAL\r
++1D7C4         ; mapped                 ; 03B5          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC EPSILON SYMBOL\r
++1D7C5         ; mapped                 ; 03B8          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC THETA SYMBOL\r
++1D7C6         ; mapped                 ; 03BA          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC KAPPA SYMBOL\r
++1D7C7         ; mapped                 ; 03C6          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC PHI SYMBOL\r
++1D7C8         ; mapped                 ; 03C1          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC RHO SYMBOL\r
++1D7C9         ; mapped                 ; 03C0          # 3.1  MATHEMATICAL SANS-SERIF BOLD ITALIC PI SYMBOL\r
++1D7CA..1D7CB  ; mapped                 ; 03DD          # 5.0  MATHEMATICAL BOLD CAPITAL DIGAMMA..MATHEMATICAL BOLD SMALL DIGAMMA\r
++1D7CC..1D7CD  ; disallowed                             # NA   <reserved-1D7CC>..<reserved-1D7CD>\r
++1D7CE         ; mapped                 ; 0030          # 3.1  MATHEMATICAL BOLD DIGIT ZERO\r
++1D7CF         ; mapped                 ; 0031          # 3.1  MATHEMATICAL BOLD DIGIT ONE\r
++1D7D0         ; mapped                 ; 0032          # 3.1  MATHEMATICAL BOLD DIGIT TWO\r
++1D7D1         ; mapped                 ; 0033          # 3.1  MATHEMATICAL BOLD DIGIT THREE\r
++1D7D2         ; mapped                 ; 0034          # 3.1  MATHEMATICAL BOLD DIGIT FOUR\r
++1D7D3         ; mapped                 ; 0035          # 3.1  MATHEMATICAL BOLD DIGIT FIVE\r
++1D7D4         ; mapped                 ; 0036          # 3.1  MATHEMATICAL BOLD DIGIT SIX\r
++1D7D5         ; mapped                 ; 0037          # 3.1  MATHEMATICAL BOLD DIGIT SEVEN\r
++1D7D6         ; mapped                 ; 0038          # 3.1  MATHEMATICAL BOLD DIGIT EIGHT\r
++1D7D7         ; mapped                 ; 0039          # 3.1  MATHEMATICAL BOLD DIGIT NINE\r
++1D7D8         ; mapped                 ; 0030          # 3.1  MATHEMATICAL DOUBLE-STRUCK DIGIT ZERO\r
++1D7D9         ; mapped                 ; 0031          # 3.1  MATHEMATICAL DOUBLE-STRUCK DIGIT ONE\r
++1D7DA         ; mapped                 ; 0032          # 3.1  MATHEMATICAL DOUBLE-STRUCK DIGIT TWO\r
++1D7DB         ; mapped                 ; 0033          # 3.1  MATHEMATICAL DOUBLE-STRUCK DIGIT THREE\r
++1D7DC         ; mapped                 ; 0034          # 3.1  MATHEMATICAL DOUBLE-STRUCK DIGIT FOUR\r
++1D7DD         ; mapped                 ; 0035          # 3.1  MATHEMATICAL DOUBLE-STRUCK DIGIT FIVE\r
++1D7DE         ; mapped                 ; 0036          # 3.1  MATHEMATICAL DOUBLE-STRUCK DIGIT SIX\r
++1D7DF         ; mapped                 ; 0037          # 3.1  MATHEMATICAL DOUBLE-STRUCK DIGIT SEVEN\r
++1D7E0         ; mapped                 ; 0038          # 3.1  MATHEMATICAL DOUBLE-STRUCK DIGIT EIGHT\r
++1D7E1         ; mapped                 ; 0039          # 3.1  MATHEMATICAL DOUBLE-STRUCK DIGIT NINE\r
++1D7E2         ; mapped                 ; 0030          # 3.1  MATHEMATICAL SANS-SERIF DIGIT ZERO\r
++1D7E3         ; mapped                 ; 0031          # 3.1  MATHEMATICAL SANS-SERIF DIGIT ONE\r
++1D7E4         ; mapped                 ; 0032          # 3.1  MATHEMATICAL SANS-SERIF DIGIT TWO\r
++1D7E5         ; mapped                 ; 0033          # 3.1  MATHEMATICAL SANS-SERIF DIGIT THREE\r
++1D7E6         ; mapped                 ; 0034          # 3.1  MATHEMATICAL SANS-SERIF DIGIT FOUR\r
++1D7E7         ; mapped                 ; 0035          # 3.1  MATHEMATICAL SANS-SERIF DIGIT FIVE\r
++1D7E8         ; mapped                 ; 0036          # 3.1  MATHEMATICAL SANS-SERIF DIGIT SIX\r
++1D7E9         ; mapped                 ; 0037          # 3.1  MATHEMATICAL SANS-SERIF DIGIT SEVEN\r
++1D7EA         ; mapped                 ; 0038          # 3.1  MATHEMATICAL SANS-SERIF DIGIT EIGHT\r
++1D7EB         ; mapped                 ; 0039          # 3.1  MATHEMATICAL SANS-SERIF DIGIT NINE\r
++1D7EC         ; mapped                 ; 0030          # 3.1  MATHEMATICAL SANS-SERIF BOLD DIGIT ZERO\r
++1D7ED         ; mapped                 ; 0031          # 3.1  MATHEMATICAL SANS-SERIF BOLD DIGIT ONE\r
++1D7EE         ; mapped                 ; 0032          # 3.1  MATHEMATICAL SANS-SERIF BOLD DIGIT TWO\r
++1D7EF         ; mapped                 ; 0033          # 3.1  MATHEMATICAL SANS-SERIF BOLD DIGIT THREE\r
++1D7F0         ; mapped                 ; 0034          # 3.1  MATHEMATICAL SANS-SERIF BOLD DIGIT FOUR\r
++1D7F1         ; mapped                 ; 0035          # 3.1  MATHEMATICAL SANS-SERIF BOLD DIGIT FIVE\r
++1D7F2         ; mapped                 ; 0036          # 3.1  MATHEMATICAL SANS-SERIF BOLD DIGIT SIX\r
++1D7F3         ; mapped                 ; 0037          # 3.1  MATHEMATICAL SANS-SERIF BOLD DIGIT SEVEN\r
++1D7F4         ; mapped                 ; 0038          # 3.1  MATHEMATICAL SANS-SERIF BOLD DIGIT EIGHT\r
++1D7F5         ; mapped                 ; 0039          # 3.1  MATHEMATICAL SANS-SERIF BOLD DIGIT NINE\r
++1D7F6         ; mapped                 ; 0030          # 3.1  MATHEMATICAL MONOSPACE DIGIT ZERO\r
++1D7F7         ; mapped                 ; 0031          # 3.1  MATHEMATICAL MONOSPACE DIGIT ONE\r
++1D7F8         ; mapped                 ; 0032          # 3.1  MATHEMATICAL MONOSPACE DIGIT TWO\r
++1D7F9         ; mapped                 ; 0033          # 3.1  MATHEMATICAL MONOSPACE DIGIT THREE\r
++1D7FA         ; mapped                 ; 0034          # 3.1  MATHEMATICAL MONOSPACE DIGIT FOUR\r
++1D7FB         ; mapped                 ; 0035          # 3.1  MATHEMATICAL MONOSPACE DIGIT FIVE\r
++1D7FC         ; mapped                 ; 0036          # 3.1  MATHEMATICAL MONOSPACE DIGIT SIX\r
++1D7FD         ; mapped                 ; 0037          # 3.1  MATHEMATICAL MONOSPACE DIGIT SEVEN\r
++1D7FE         ; mapped                 ; 0038          # 3.1  MATHEMATICAL MONOSPACE DIGIT EIGHT\r
++1D7FF         ; mapped                 ; 0039          # 3.1  MATHEMATICAL MONOSPACE DIGIT NINE\r
++1D800..1D9FF  ; valid                  ;      ; NV8    # 8.0  SIGNWRITING HAND-FIST INDEX..SIGNWRITING HEAD\r
++1DA00..1DA36  ; valid                                  # 8.0  SIGNWRITING HEAD RIM..SIGNWRITING AIR SUCKING IN\r
++1DA37..1DA3A  ; valid                  ;      ; NV8    # 8.0  SIGNWRITING AIR BLOW SMALL ROTATIONS..SIGNWRITING BREATH EXHALE\r
++1DA3B..1DA6C  ; valid                                  # 8.0  SIGNWRITING MOUTH CLOSED NEUTRAL..SIGNWRITING EXCITEMENT\r
++1DA6D..1DA74  ; valid                  ;      ; NV8    # 8.0  SIGNWRITING SHOULDER HIP SPINE..SIGNWRITING TORSO-FLOORPLANE TWISTING\r
++1DA75         ; valid                                  # 8.0  SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS\r
++1DA76..1DA83  ; valid                  ;      ; NV8    # 8.0  SIGNWRITING LIMB COMBINATION..SIGNWRITING LOCATION DEPTH\r
++1DA84         ; valid                                  # 8.0  SIGNWRITING LOCATION HEAD NECK\r
++1DA85..1DA8B  ; valid                  ;      ; NV8    # 8.0  SIGNWRITING LOCATION TORSO..SIGNWRITING PARENTHESIS\r
++1DA8C..1DA9A  ; disallowed                             # NA   <reserved-1DA8C>..<reserved-1DA9A>\r
++1DA9B..1DA9F  ; valid                                  # 8.0  SIGNWRITING FILL MODIFIER-2..SIGNWRITING FILL MODIFIER-6\r
++1DAA0         ; disallowed                             # NA   <reserved-1DAA0>\r
++1DAA1..1DAAF  ; valid                                  # 8.0  SIGNWRITING ROTATION MODIFIER-2..SIGNWRITING ROTATION MODIFIER-16\r
++1DAB0..1DFFF  ; disallowed                             # NA   <reserved-1DAB0>..<reserved-1DFFF>\r
++1E000..1E006  ; valid                                  # 9.0  COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE\r
++1E007         ; disallowed                             # NA   <reserved-1E007>\r
++1E008..1E018  ; valid                                  # 9.0  COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU\r
++1E019..1E01A  ; disallowed                             # NA   <reserved-1E019>..<reserved-1E01A>\r
++1E01B..1E021  ; valid                                  # 9.0  COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI\r
++1E022         ; disallowed                             # NA   <reserved-1E022>\r
++1E023..1E024  ; valid                                  # 9.0  COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS\r
++1E025         ; disallowed                             # NA   <reserved-1E025>\r
++1E026..1E02A  ; valid                                  # 9.0  COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA\r
++1E02B..1E7FF  ; disallowed                             # NA   <reserved-1E02B>..<reserved-1E7FF>\r
++1E800..1E8C4  ; valid                                  # 7.0  MENDE KIKAKUI SYLLABLE M001 KI..MENDE KIKAKUI SYLLABLE M060 NYON\r
++1E8C5..1E8C6  ; disallowed                             # NA   <reserved-1E8C5>..<reserved-1E8C6>\r
++1E8C7..1E8CF  ; valid                  ;      ; NV8    # 7.0  MENDE KIKAKUI DIGIT ONE..MENDE KIKAKUI DIGIT NINE\r
++1E8D0..1E8D6  ; valid                                  # 7.0  MENDE KIKAKUI COMBINING NUMBER TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS\r
++1E8D7..1E8FF  ; disallowed                             # NA   <reserved-1E8D7>..<reserved-1E8FF>\r
++1E900         ; mapped                 ; 1E922         # 9.0  ADLAM CAPITAL LETTER ALIF\r
++1E901         ; mapped                 ; 1E923         # 9.0  ADLAM CAPITAL LETTER DAALI\r
++1E902         ; mapped                 ; 1E924         # 9.0  ADLAM CAPITAL LETTER LAAM\r
++1E903         ; mapped                 ; 1E925         # 9.0  ADLAM CAPITAL LETTER MIIM\r
++1E904         ; mapped                 ; 1E926         # 9.0  ADLAM CAPITAL LETTER BA\r
++1E905         ; mapped                 ; 1E927         # 9.0  ADLAM CAPITAL LETTER SINNYIIYHE\r
++1E906         ; mapped                 ; 1E928         # 9.0  ADLAM CAPITAL LETTER PE\r
++1E907         ; mapped                 ; 1E929         # 9.0  ADLAM CAPITAL LETTER BHE\r
++1E908         ; mapped                 ; 1E92A         # 9.0  ADLAM CAPITAL LETTER RA\r
++1E909         ; mapped                 ; 1E92B         # 9.0  ADLAM CAPITAL LETTER E\r
++1E90A         ; mapped                 ; 1E92C         # 9.0  ADLAM CAPITAL LETTER FA\r
++1E90B         ; mapped                 ; 1E92D         # 9.0  ADLAM CAPITAL LETTER I\r
++1E90C         ; mapped                 ; 1E92E         # 9.0  ADLAM CAPITAL LETTER O\r
++1E90D         ; mapped                 ; 1E92F         # 9.0  ADLAM CAPITAL LETTER DHA\r
++1E90E         ; mapped                 ; 1E930         # 9.0  ADLAM CAPITAL LETTER YHE\r
++1E90F         ; mapped                 ; 1E931         # 9.0  ADLAM CAPITAL LETTER WAW\r
++1E910         ; mapped                 ; 1E932         # 9.0  ADLAM CAPITAL LETTER NUN\r
++1E911         ; mapped                 ; 1E933         # 9.0  ADLAM CAPITAL LETTER KAF\r
++1E912         ; mapped                 ; 1E934         # 9.0  ADLAM CAPITAL LETTER YA\r
++1E913         ; mapped                 ; 1E935         # 9.0  ADLAM CAPITAL LETTER U\r
++1E914         ; mapped                 ; 1E936         # 9.0  ADLAM CAPITAL LETTER JIIM\r
++1E915         ; mapped                 ; 1E937         # 9.0  ADLAM CAPITAL LETTER CHI\r
++1E916         ; mapped                 ; 1E938         # 9.0  ADLAM CAPITAL LETTER HA\r
++1E917         ; mapped                 ; 1E939         # 9.0  ADLAM CAPITAL LETTER QAAF\r
++1E918         ; mapped                 ; 1E93A         # 9.0  ADLAM CAPITAL LETTER GA\r
++1E919         ; mapped                 ; 1E93B         # 9.0  ADLAM CAPITAL LETTER NYA\r
++1E91A         ; mapped                 ; 1E93C         # 9.0  ADLAM CAPITAL LETTER TU\r
++1E91B         ; mapped                 ; 1E93D         # 9.0  ADLAM CAPITAL LETTER NHA\r
++1E91C         ; mapped                 ; 1E93E         # 9.0  ADLAM CAPITAL LETTER VA\r
++1E91D         ; mapped                 ; 1E93F         # 9.0  ADLAM CAPITAL LETTER KHA\r
++1E91E         ; mapped                 ; 1E940         # 9.0  ADLAM CAPITAL LETTER GBE\r
++1E91F         ; mapped                 ; 1E941         # 9.0  ADLAM CAPITAL LETTER ZAL\r
++1E920         ; mapped                 ; 1E942         # 9.0  ADLAM CAPITAL LETTER KPO\r
++1E921         ; mapped                 ; 1E943         # 9.0  ADLAM CAPITAL LETTER SHA\r
++1E922..1E94A  ; valid                                  # 9.0  ADLAM SMALL LETTER ALIF..ADLAM NUKTA\r
++1E94B..1E94F  ; disallowed                             # NA   <reserved-1E94B>..<reserved-1E94F>\r
++1E950..1E959  ; valid                                  # 9.0  ADLAM DIGIT ZERO..ADLAM DIGIT NINE\r
++1E95A..1E95D  ; disallowed                             # NA   <reserved-1E95A>..<reserved-1E95D>\r
++1E95E..1E95F  ; valid                  ;      ; NV8    # 9.0  ADLAM INITIAL EXCLAMATION MARK..ADLAM INITIAL QUESTION MARK\r
++1E960..1EDFF  ; disallowed                             # NA   <reserved-1E960>..<reserved-1EDFF>\r
++1EE00         ; mapped                 ; 0627          # 6.1  ARABIC MATHEMATICAL ALEF\r
++1EE01         ; mapped                 ; 0628          # 6.1  ARABIC MATHEMATICAL BEH\r
++1EE02         ; mapped                 ; 062C          # 6.1  ARABIC MATHEMATICAL JEEM\r
++1EE03         ; mapped                 ; 062F          # 6.1  ARABIC MATHEMATICAL DAL\r
++1EE04         ; disallowed                             # NA   <reserved-1EE04>\r
++1EE05         ; mapped                 ; 0648          # 6.1  ARABIC MATHEMATICAL WAW\r
++1EE06         ; mapped                 ; 0632          # 6.1  ARABIC MATHEMATICAL ZAIN\r
++1EE07         ; mapped                 ; 062D          # 6.1  ARABIC MATHEMATICAL HAH\r
++1EE08         ; mapped                 ; 0637          # 6.1  ARABIC MATHEMATICAL TAH\r
++1EE09         ; mapped                 ; 064A          # 6.1  ARABIC MATHEMATICAL YEH\r
++1EE0A         ; mapped                 ; 0643          # 6.1  ARABIC MATHEMATICAL KAF\r
++1EE0B         ; mapped                 ; 0644          # 6.1  ARABIC MATHEMATICAL LAM\r
++1EE0C         ; mapped                 ; 0645          # 6.1  ARABIC MATHEMATICAL MEEM\r
++1EE0D         ; mapped                 ; 0646          # 6.1  ARABIC MATHEMATICAL NOON\r
++1EE0E         ; mapped                 ; 0633          # 6.1  ARABIC MATHEMATICAL SEEN\r
++1EE0F         ; mapped                 ; 0639          # 6.1  ARABIC MATHEMATICAL AIN\r
++1EE10         ; mapped                 ; 0641          # 6.1  ARABIC MATHEMATICAL FEH\r
++1EE11         ; mapped                 ; 0635          # 6.1  ARABIC MATHEMATICAL SAD\r
++1EE12         ; mapped                 ; 0642          # 6.1  ARABIC MATHEMATICAL QAF\r
++1EE13         ; mapped                 ; 0631          # 6.1  ARABIC MATHEMATICAL REH\r
++1EE14         ; mapped                 ; 0634          # 6.1  ARABIC MATHEMATICAL SHEEN\r
++1EE15         ; mapped                 ; 062A          # 6.1  ARABIC MATHEMATICAL TEH\r
++1EE16         ; mapped                 ; 062B          # 6.1  ARABIC MATHEMATICAL THEH\r
++1EE17         ; mapped                 ; 062E          # 6.1  ARABIC MATHEMATICAL KHAH\r
++1EE18         ; mapped                 ; 0630          # 6.1  ARABIC MATHEMATICAL THAL\r
++1EE19         ; mapped                 ; 0636          # 6.1  ARABIC MATHEMATICAL DAD\r
++1EE1A         ; mapped                 ; 0638          # 6.1  ARABIC MATHEMATICAL ZAH\r
++1EE1B         ; mapped                 ; 063A          # 6.1  ARABIC MATHEMATICAL GHAIN\r
++1EE1C         ; mapped                 ; 066E          # 6.1  ARABIC MATHEMATICAL DOTLESS BEH\r
++1EE1D         ; mapped                 ; 06BA          # 6.1  ARABIC MATHEMATICAL DOTLESS NOON\r
++1EE1E         ; mapped                 ; 06A1          # 6.1  ARABIC MATHEMATICAL DOTLESS FEH\r
++1EE1F         ; mapped                 ; 066F          # 6.1  ARABIC MATHEMATICAL DOTLESS QAF\r
++1EE20         ; disallowed                             # NA   <reserved-1EE20>\r
++1EE21         ; mapped                 ; 0628          # 6.1  ARABIC MATHEMATICAL INITIAL BEH\r
++1EE22         ; mapped                 ; 062C          # 6.1  ARABIC MATHEMATICAL INITIAL JEEM\r
++1EE23         ; disallowed                             # NA   <reserved-1EE23>\r
++1EE24         ; mapped                 ; 0647          # 6.1  ARABIC MATHEMATICAL INITIAL HEH\r
++1EE25..1EE26  ; disallowed                             # NA   <reserved-1EE25>..<reserved-1EE26>\r
++1EE27         ; mapped                 ; 062D          # 6.1  ARABIC MATHEMATICAL INITIAL HAH\r
++1EE28         ; disallowed                             # NA   <reserved-1EE28>\r
++1EE29         ; mapped                 ; 064A          # 6.1  ARABIC MATHEMATICAL INITIAL YEH\r
++1EE2A         ; mapped                 ; 0643          # 6.1  ARABIC MATHEMATICAL INITIAL KAF\r
++1EE2B         ; mapped                 ; 0644          # 6.1  ARABIC MATHEMATICAL INITIAL LAM\r
++1EE2C         ; mapped                 ; 0645          # 6.1  ARABIC MATHEMATICAL INITIAL MEEM\r
++1EE2D         ; mapped                 ; 0646          # 6.1  ARABIC MATHEMATICAL INITIAL NOON\r
++1EE2E         ; mapped                 ; 0633          # 6.1  ARABIC MATHEMATICAL INITIAL SEEN\r
++1EE2F         ; mapped                 ; 0639          # 6.1  ARABIC MATHEMATICAL INITIAL AIN\r
++1EE30         ; mapped                 ; 0641          # 6.1  ARABIC MATHEMATICAL INITIAL FEH\r
++1EE31         ; mapped                 ; 0635          # 6.1  ARABIC MATHEMATICAL INITIAL SAD\r
++1EE32         ; mapped                 ; 0642          # 6.1  ARABIC MATHEMATICAL INITIAL QAF\r
++1EE33         ; disallowed                             # NA   <reserved-1EE33>\r
++1EE34         ; mapped                 ; 0634          # 6.1  ARABIC MATHEMATICAL INITIAL SHEEN\r
++1EE35         ; mapped                 ; 062A          # 6.1  ARABIC MATHEMATICAL INITIAL TEH\r
++1EE36         ; mapped                 ; 062B          # 6.1  ARABIC MATHEMATICAL INITIAL THEH\r
++1EE37         ; mapped                 ; 062E          # 6.1  ARABIC MATHEMATICAL INITIAL KHAH\r
++1EE38         ; disallowed                             # NA   <reserved-1EE38>\r
++1EE39         ; mapped                 ; 0636          # 6.1  ARABIC MATHEMATICAL INITIAL DAD\r
++1EE3A         ; disallowed                             # NA   <reserved-1EE3A>\r
++1EE3B         ; mapped                 ; 063A          # 6.1  ARABIC MATHEMATICAL INITIAL GHAIN\r
++1EE3C..1EE41  ; disallowed                             # NA   <reserved-1EE3C>..<reserved-1EE41>\r
++1EE42         ; mapped                 ; 062C          # 6.1  ARABIC MATHEMATICAL TAILED JEEM\r
++1EE43..1EE46  ; disallowed                             # NA   <reserved-1EE43>..<reserved-1EE46>\r
++1EE47         ; mapped                 ; 062D          # 6.1  ARABIC MATHEMATICAL TAILED HAH\r
++1EE48         ; disallowed                             # NA   <reserved-1EE48>\r
++1EE49         ; mapped                 ; 064A          # 6.1  ARABIC MATHEMATICAL TAILED YEH\r
++1EE4A         ; disallowed                             # NA   <reserved-1EE4A>\r
++1EE4B         ; mapped                 ; 0644          # 6.1  ARABIC MATHEMATICAL TAILED LAM\r
++1EE4C         ; disallowed                             # NA   <reserved-1EE4C>\r
++1EE4D         ; mapped                 ; 0646          # 6.1  ARABIC MATHEMATICAL TAILED NOON\r
++1EE4E         ; mapped                 ; 0633          # 6.1  ARABIC MATHEMATICAL TAILED SEEN\r
++1EE4F         ; mapped                 ; 0639          # 6.1  ARABIC MATHEMATICAL TAILED AIN\r
++1EE50         ; disallowed                             # NA   <reserved-1EE50>\r
++1EE51         ; mapped                 ; 0635          # 6.1  ARABIC MATHEMATICAL TAILED SAD\r
++1EE52         ; mapped                 ; 0642          # 6.1  ARABIC MATHEMATICAL TAILED QAF\r
++1EE53         ; disallowed                             # NA   <reserved-1EE53>\r
++1EE54         ; mapped                 ; 0634          # 6.1  ARABIC MATHEMATICAL TAILED SHEEN\r
++1EE55..1EE56  ; disallowed                             # NA   <reserved-1EE55>..<reserved-1EE56>\r
++1EE57         ; mapped                 ; 062E          # 6.1  ARABIC MATHEMATICAL TAILED KHAH\r
++1EE58         ; disallowed                             # NA   <reserved-1EE58>\r
++1EE59         ; mapped                 ; 0636          # 6.1  ARABIC MATHEMATICAL TAILED DAD\r
++1EE5A         ; disallowed                             # NA   <reserved-1EE5A>\r
++1EE5B         ; mapped                 ; 063A          # 6.1  ARABIC MATHEMATICAL TAILED GHAIN\r
++1EE5C         ; disallowed                             # NA   <reserved-1EE5C>\r
++1EE5D         ; mapped                 ; 06BA          # 6.1  ARABIC MATHEMATICAL TAILED DOTLESS NOON\r
++1EE5E         ; disallowed                             # NA   <reserved-1EE5E>\r
++1EE5F         ; mapped                 ; 066F          # 6.1  ARABIC MATHEMATICAL TAILED DOTLESS QAF\r
++1EE60         ; disallowed                             # NA   <reserved-1EE60>\r
++1EE61         ; mapped                 ; 0628          # 6.1  ARABIC MATHEMATICAL STRETCHED BEH\r
++1EE62         ; mapped                 ; 062C          # 6.1  ARABIC MATHEMATICAL STRETCHED JEEM\r
++1EE63         ; disallowed                             # NA   <reserved-1EE63>\r
++1EE64         ; mapped                 ; 0647          # 6.1  ARABIC MATHEMATICAL STRETCHED HEH\r
++1EE65..1EE66  ; disallowed                             # NA   <reserved-1EE65>..<reserved-1EE66>\r
++1EE67         ; mapped                 ; 062D          # 6.1  ARABIC MATHEMATICAL STRETCHED HAH\r
++1EE68         ; mapped                 ; 0637          # 6.1  ARABIC MATHEMATICAL STRETCHED TAH\r
++1EE69         ; mapped                 ; 064A          # 6.1  ARABIC MATHEMATICAL STRETCHED YEH\r
++1EE6A         ; mapped                 ; 0643          # 6.1  ARABIC MATHEMATICAL STRETCHED KAF\r
++1EE6B         ; disallowed                             # NA   <reserved-1EE6B>\r
++1EE6C         ; mapped                 ; 0645          # 6.1  ARABIC MATHEMATICAL STRETCHED MEEM\r
++1EE6D         ; mapped                 ; 0646          # 6.1  ARABIC MATHEMATICAL STRETCHED NOON\r
++1EE6E         ; mapped                 ; 0633          # 6.1  ARABIC MATHEMATICAL STRETCHED SEEN\r
++1EE6F         ; mapped                 ; 0639          # 6.1  ARABIC MATHEMATICAL STRETCHED AIN\r
++1EE70         ; mapped                 ; 0641          # 6.1  ARABIC MATHEMATICAL STRETCHED FEH\r
++1EE71         ; mapped                 ; 0635          # 6.1  ARABIC MATHEMATICAL STRETCHED SAD\r
++1EE72         ; mapped                 ; 0642          # 6.1  ARABIC MATHEMATICAL STRETCHED QAF\r
++1EE73         ; disallowed                             # NA   <reserved-1EE73>\r
++1EE74         ; mapped                 ; 0634          # 6.1  ARABIC MATHEMATICAL STRETCHED SHEEN\r
++1EE75         ; mapped                 ; 062A          # 6.1  ARABIC MATHEMATICAL STRETCHED TEH\r
++1EE76         ; mapped                 ; 062B          # 6.1  ARABIC MATHEMATICAL STRETCHED THEH\r
++1EE77         ; mapped                 ; 062E          # 6.1  ARABIC MATHEMATICAL STRETCHED KHAH\r
++1EE78         ; disallowed                             # NA   <reserved-1EE78>\r
++1EE79         ; mapped                 ; 0636          # 6.1  ARABIC MATHEMATICAL STRETCHED DAD\r
++1EE7A         ; mapped                 ; 0638          # 6.1  ARABIC MATHEMATICAL STRETCHED ZAH\r
++1EE7B         ; mapped                 ; 063A          # 6.1  ARABIC MATHEMATICAL STRETCHED GHAIN\r
++1EE7C         ; mapped                 ; 066E          # 6.1  ARABIC MATHEMATICAL STRETCHED DOTLESS BEH\r
++1EE7D         ; disallowed                             # NA   <reserved-1EE7D>\r
++1EE7E         ; mapped                 ; 06A1          # 6.1  ARABIC MATHEMATICAL STRETCHED DOTLESS FEH\r
++1EE7F         ; disallowed                             # NA   <reserved-1EE7F>\r
++1EE80         ; mapped                 ; 0627          # 6.1  ARABIC MATHEMATICAL LOOPED ALEF\r
++1EE81         ; mapped                 ; 0628          # 6.1  ARABIC MATHEMATICAL LOOPED BEH\r
++1EE82         ; mapped                 ; 062C          # 6.1  ARABIC MATHEMATICAL LOOPED JEEM\r
++1EE83         ; mapped                 ; 062F          # 6.1  ARABIC MATHEMATICAL LOOPED DAL\r
++1EE84         ; mapped                 ; 0647          # 6.1  ARABIC MATHEMATICAL LOOPED HEH\r
++1EE85         ; mapped                 ; 0648          # 6.1  ARABIC MATHEMATICAL LOOPED WAW\r
++1EE86         ; mapped                 ; 0632          # 6.1  ARABIC MATHEMATICAL LOOPED ZAIN\r
++1EE87         ; mapped                 ; 062D          # 6.1  ARABIC MATHEMATICAL LOOPED HAH\r
++1EE88         ; mapped                 ; 0637          # 6.1  ARABIC MATHEMATICAL LOOPED TAH\r
++1EE89         ; mapped                 ; 064A          # 6.1  ARABIC MATHEMATICAL LOOPED YEH\r
++1EE8A         ; disallowed                             # NA   <reserved-1EE8A>\r
++1EE8B         ; mapped                 ; 0644          # 6.1  ARABIC MATHEMATICAL LOOPED LAM\r
++1EE8C         ; mapped                 ; 0645          # 6.1  ARABIC MATHEMATICAL LOOPED MEEM\r
++1EE8D         ; mapped                 ; 0646          # 6.1  ARABIC MATHEMATICAL LOOPED NOON\r
++1EE8E         ; mapped                 ; 0633          # 6.1  ARABIC MATHEMATICAL LOOPED SEEN\r
++1EE8F         ; mapped                 ; 0639          # 6.1  ARABIC MATHEMATICAL LOOPED AIN\r
++1EE90         ; mapped                 ; 0641          # 6.1  ARABIC MATHEMATICAL LOOPED FEH\r
++1EE91         ; mapped                 ; 0635          # 6.1  ARABIC MATHEMATICAL LOOPED SAD\r
++1EE92         ; mapped                 ; 0642          # 6.1  ARABIC MATHEMATICAL LOOPED QAF\r
++1EE93         ; mapped                 ; 0631          # 6.1  ARABIC MATHEMATICAL LOOPED REH\r
++1EE94         ; mapped                 ; 0634          # 6.1  ARABIC MATHEMATICAL LOOPED SHEEN\r
++1EE95         ; mapped                 ; 062A          # 6.1  ARABIC MATHEMATICAL LOOPED TEH\r
++1EE96         ; mapped                 ; 062B          # 6.1  ARABIC MATHEMATICAL LOOPED THEH\r
++1EE97         ; mapped                 ; 062E          # 6.1  ARABIC MATHEMATICAL LOOPED KHAH\r
++1EE98         ; mapped                 ; 0630          # 6.1  ARABIC MATHEMATICAL LOOPED THAL\r
++1EE99         ; mapped                 ; 0636          # 6.1  ARABIC MATHEMATICAL LOOPED DAD\r
++1EE9A         ; mapped                 ; 0638          # 6.1  ARABIC MATHEMATICAL LOOPED ZAH\r
++1EE9B         ; mapped                 ; 063A          # 6.1  ARABIC MATHEMATICAL LOOPED GHAIN\r
++1EE9C..1EEA0  ; disallowed                             # NA   <reserved-1EE9C>..<reserved-1EEA0>\r
++1EEA1         ; mapped                 ; 0628          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK BEH\r
++1EEA2         ; mapped                 ; 062C          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK JEEM\r
++1EEA3         ; mapped                 ; 062F          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK DAL\r
++1EEA4         ; disallowed                             # NA   <reserved-1EEA4>\r
++1EEA5         ; mapped                 ; 0648          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK WAW\r
++1EEA6         ; mapped                 ; 0632          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK ZAIN\r
++1EEA7         ; mapped                 ; 062D          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK HAH\r
++1EEA8         ; mapped                 ; 0637          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK TAH\r
++1EEA9         ; mapped                 ; 064A          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK YEH\r
++1EEAA         ; disallowed                             # NA   <reserved-1EEAA>\r
++1EEAB         ; mapped                 ; 0644          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK LAM\r
++1EEAC         ; mapped                 ; 0645          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK MEEM\r
++1EEAD         ; mapped                 ; 0646          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK NOON\r
++1EEAE         ; mapped                 ; 0633          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK SEEN\r
++1EEAF         ; mapped                 ; 0639          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK AIN\r
++1EEB0         ; mapped                 ; 0641          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK FEH\r
++1EEB1         ; mapped                 ; 0635          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK SAD\r
++1EEB2         ; mapped                 ; 0642          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK QAF\r
++1EEB3         ; mapped                 ; 0631          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK REH\r
++1EEB4         ; mapped                 ; 0634          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK SHEEN\r
++1EEB5         ; mapped                 ; 062A          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK TEH\r
++1EEB6         ; mapped                 ; 062B          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK THEH\r
++1EEB7         ; mapped                 ; 062E          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK KHAH\r
++1EEB8         ; mapped                 ; 0630          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK THAL\r
++1EEB9         ; mapped                 ; 0636          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK DAD\r
++1EEBA         ; mapped                 ; 0638          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK ZAH\r
++1EEBB         ; mapped                 ; 063A          # 6.1  ARABIC MATHEMATICAL DOUBLE-STRUCK GHAIN\r
++1EEBC..1EEEF  ; disallowed                             # NA   <reserved-1EEBC>..<reserved-1EEEF>\r
++1EEF0..1EEF1  ; valid                  ;      ; NV8    # 6.1  ARABIC MATHEMATICAL OPERATOR MEEM WITH HAH WITH TATWEEL..ARABIC MATHEMATICAL OPERATOR HAH WITH DAL\r
++1EEF2..1EFFF  ; disallowed                             # NA   <reserved-1EEF2>..<reserved-1EFFF>\r
++1F000..1F02B  ; valid                  ;      ; NV8    # 5.1  MAHJONG TILE EAST WIND..MAHJONG TILE BACK\r
++1F02C..1F02F  ; disallowed                             # NA   <reserved-1F02C>..<reserved-1F02F>\r
++1F030..1F093  ; valid                  ;      ; NV8    # 5.1  DOMINO TILE HORIZONTAL BACK..DOMINO TILE VERTICAL-06-06\r
++1F094..1F09F  ; disallowed                             # NA   <reserved-1F094>..<reserved-1F09F>\r
++1F0A0..1F0AE  ; valid                  ;      ; NV8    # 6.0  PLAYING CARD BACK..PLAYING CARD KING OF SPADES\r
++1F0AF..1F0B0  ; disallowed                             # NA   <reserved-1F0AF>..<reserved-1F0B0>\r
++1F0B1..1F0BE  ; valid                  ;      ; NV8    # 6.0  PLAYING CARD ACE OF HEARTS..PLAYING CARD KING OF HEARTS\r
++1F0BF         ; valid                  ;      ; NV8    # 7.0  PLAYING CARD RED JOKER\r
++1F0C0         ; disallowed                             # NA   <reserved-1F0C0>\r
++1F0C1..1F0CF  ; valid                  ;      ; NV8    # 6.0  PLAYING CARD ACE OF DIAMONDS..PLAYING CARD BLACK JOKER\r
++1F0D0         ; disallowed                             # NA   <reserved-1F0D0>\r
++1F0D1..1F0DF  ; valid                  ;      ; NV8    # 6.0  PLAYING CARD ACE OF CLUBS..PLAYING CARD WHITE JOKER\r
++1F0E0..1F0F5  ; valid                  ;      ; NV8    # 7.0  PLAYING CARD FOOL..PLAYING CARD TRUMP-21\r
++1F0F6..1F0FF  ; disallowed                             # NA   <reserved-1F0F6>..<reserved-1F0FF>\r
++1F100         ; disallowed                             # 5.2  DIGIT ZERO FULL STOP\r
++1F101         ; disallowed_STD3_mapped ; 0030 002C     # 5.2  DIGIT ZERO COMMA\r
++1F102         ; disallowed_STD3_mapped ; 0031 002C     # 5.2  DIGIT ONE COMMA\r
++1F103         ; disallowed_STD3_mapped ; 0032 002C     # 5.2  DIGIT TWO COMMA\r
++1F104         ; disallowed_STD3_mapped ; 0033 002C     # 5.2  DIGIT THREE COMMA\r
++1F105         ; disallowed_STD3_mapped ; 0034 002C     # 5.2  DIGIT FOUR COMMA\r
++1F106         ; disallowed_STD3_mapped ; 0035 002C     # 5.2  DIGIT FIVE COMMA\r
++1F107         ; disallowed_STD3_mapped ; 0036 002C     # 5.2  DIGIT SIX COMMA\r
++1F108         ; disallowed_STD3_mapped ; 0037 002C     # 5.2  DIGIT SEVEN COMMA\r
++1F109         ; disallowed_STD3_mapped ; 0038 002C     # 5.2  DIGIT EIGHT COMMA\r
++1F10A         ; disallowed_STD3_mapped ; 0039 002C     # 5.2  DIGIT NINE COMMA\r
++1F10B..1F10C  ; valid                  ;      ; NV8    # 7.0  DINGBAT CIRCLED SANS-SERIF DIGIT ZERO..DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ZERO\r
++1F10D..1F10F  ; disallowed                             # NA   <reserved-1F10D>..<reserved-1F10F>\r
++1F110         ; disallowed_STD3_mapped ; 0028 0061 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER A\r
++1F111         ; disallowed_STD3_mapped ; 0028 0062 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER B\r
++1F112         ; disallowed_STD3_mapped ; 0028 0063 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER C\r
++1F113         ; disallowed_STD3_mapped ; 0028 0064 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER D\r
++1F114         ; disallowed_STD3_mapped ; 0028 0065 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER E\r
++1F115         ; disallowed_STD3_mapped ; 0028 0066 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER F\r
++1F116         ; disallowed_STD3_mapped ; 0028 0067 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER G\r
++1F117         ; disallowed_STD3_mapped ; 0028 0068 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER H\r
++1F118         ; disallowed_STD3_mapped ; 0028 0069 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER I\r
++1F119         ; disallowed_STD3_mapped ; 0028 006A 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER J\r
++1F11A         ; disallowed_STD3_mapped ; 0028 006B 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER K\r
++1F11B         ; disallowed_STD3_mapped ; 0028 006C 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER L\r
++1F11C         ; disallowed_STD3_mapped ; 0028 006D 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER M\r
++1F11D         ; disallowed_STD3_mapped ; 0028 006E 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER N\r
++1F11E         ; disallowed_STD3_mapped ; 0028 006F 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER O\r
++1F11F         ; disallowed_STD3_mapped ; 0028 0070 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER P\r
++1F120         ; disallowed_STD3_mapped ; 0028 0071 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER Q\r
++1F121         ; disallowed_STD3_mapped ; 0028 0072 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER R\r
++1F122         ; disallowed_STD3_mapped ; 0028 0073 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER S\r
++1F123         ; disallowed_STD3_mapped ; 0028 0074 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER T\r
++1F124         ; disallowed_STD3_mapped ; 0028 0075 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER U\r
++1F125         ; disallowed_STD3_mapped ; 0028 0076 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER V\r
++1F126         ; disallowed_STD3_mapped ; 0028 0077 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER W\r
++1F127         ; disallowed_STD3_mapped ; 0028 0078 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER X\r
++1F128         ; disallowed_STD3_mapped ; 0028 0079 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER Y\r
++1F129         ; disallowed_STD3_mapped ; 0028 007A 0029 #5.2  PARENTHESIZED LATIN CAPITAL LETTER Z\r
++1F12A         ; mapped                 ; 3014 0073 3015 #5.2  TORTOISE SHELL BRACKETED LATIN CAPITAL LETTER S\r
++1F12B         ; mapped                 ; 0063          # 5.2  CIRCLED ITALIC LATIN CAPITAL LETTER C\r
++1F12C         ; mapped                 ; 0072          # 5.2  CIRCLED ITALIC LATIN CAPITAL LETTER R\r
++1F12D         ; mapped                 ; 0063 0064     # 5.2  CIRCLED CD\r
++1F12E         ; mapped                 ; 0077 007A     # 5.2  CIRCLED WZ\r
++1F12F         ; disallowed                             # NA   <reserved-1F12F>\r
++1F130         ; mapped                 ; 0061          # 6.0  SQUARED LATIN CAPITAL LETTER A\r
++1F131         ; mapped                 ; 0062          # 5.2  SQUARED LATIN CAPITAL LETTER B\r
++1F132         ; mapped                 ; 0063          # 6.0  SQUARED LATIN CAPITAL LETTER C\r
++1F133         ; mapped                 ; 0064          # 6.0  SQUARED LATIN CAPITAL LETTER D\r
++1F134         ; mapped                 ; 0065          # 6.0  SQUARED LATIN CAPITAL LETTER E\r
++1F135         ; mapped                 ; 0066          # 6.0  SQUARED LATIN CAPITAL LETTER F\r
++1F136         ; mapped                 ; 0067          # 6.0  SQUARED LATIN CAPITAL LETTER G\r
++1F137         ; mapped                 ; 0068          # 6.0  SQUARED LATIN CAPITAL LETTER H\r
++1F138         ; mapped                 ; 0069          # 6.0  SQUARED LATIN CAPITAL LETTER I\r
++1F139         ; mapped                 ; 006A          # 6.0  SQUARED LATIN CAPITAL LETTER J\r
++1F13A         ; mapped                 ; 006B          # 6.0  SQUARED LATIN CAPITAL LETTER K\r
++1F13B         ; mapped                 ; 006C          # 6.0  SQUARED LATIN CAPITAL LETTER L\r
++1F13C         ; mapped                 ; 006D          # 6.0  SQUARED LATIN CAPITAL LETTER M\r
++1F13D         ; mapped                 ; 006E          # 5.2  SQUARED LATIN CAPITAL LETTER N\r
++1F13E         ; mapped                 ; 006F          # 6.0  SQUARED LATIN CAPITAL LETTER O\r
++1F13F         ; mapped                 ; 0070          # 5.2  SQUARED LATIN CAPITAL LETTER P\r
++1F140         ; mapped                 ; 0071          # 6.0  SQUARED LATIN CAPITAL LETTER Q\r
++1F141         ; mapped                 ; 0072          # 6.0  SQUARED LATIN CAPITAL LETTER R\r
++1F142         ; mapped                 ; 0073          # 5.2  SQUARED LATIN CAPITAL LETTER S\r
++1F143         ; mapped                 ; 0074          # 6.0  SQUARED LATIN CAPITAL LETTER T\r
++1F144         ; mapped                 ; 0075          # 6.0  SQUARED LATIN CAPITAL LETTER U\r
++1F145         ; mapped                 ; 0076          # 6.0  SQUARED LATIN CAPITAL LETTER V\r
++1F146         ; mapped                 ; 0077          # 5.2  SQUARED LATIN CAPITAL LETTER W\r
++1F147         ; mapped                 ; 0078          # 6.0  SQUARED LATIN CAPITAL LETTER X\r
++1F148         ; mapped                 ; 0079          # 6.0  SQUARED LATIN CAPITAL LETTER Y\r
++1F149         ; mapped                 ; 007A          # 6.0  SQUARED LATIN CAPITAL LETTER Z\r
++1F14A         ; mapped                 ; 0068 0076     # 5.2  SQUARED HV\r
++1F14B         ; mapped                 ; 006D 0076     # 5.2  SQUARED MV\r
++1F14C         ; mapped                 ; 0073 0064     # 5.2  SQUARED SD\r
++1F14D         ; mapped                 ; 0073 0073     # 5.2  SQUARED SS\r
++1F14E         ; mapped                 ; 0070 0070 0076 #5.2  SQUARED PPV\r
++1F14F         ; mapped                 ; 0077 0063     # 6.0  SQUARED WC\r
++1F150..1F156  ; valid                  ;      ; NV8    # 6.0  NEGATIVE CIRCLED LATIN CAPITAL LETTER A..NEGATIVE CIRCLED LATIN CAPITAL LETTER G\r
++1F157         ; valid                  ;      ; NV8    # 5.2  NEGATIVE CIRCLED LATIN CAPITAL LETTER H\r
++1F158..1F15E  ; valid                  ;      ; NV8    # 6.0  NEGATIVE CIRCLED LATIN CAPITAL LETTER I..NEGATIVE CIRCLED LATIN CAPITAL LETTER O\r
++1F15F         ; valid                  ;      ; NV8    # 5.2  NEGATIVE CIRCLED LATIN CAPITAL LETTER P\r
++1F160..1F169  ; valid                  ;      ; NV8    # 6.0  NEGATIVE CIRCLED LATIN CAPITAL LETTER Q..NEGATIVE CIRCLED LATIN CAPITAL LETTER Z\r
++1F16A         ; mapped                 ; 006D 0063     # 6.1  RAISED MC SIGN\r
++1F16B         ; mapped                 ; 006D 0064     # 6.1  RAISED MD SIGN\r
++1F16C..1F16F  ; disallowed                             # NA   <reserved-1F16C>..<reserved-1F16F>\r
++1F170..1F178  ; valid                  ;      ; NV8    # 6.0  NEGATIVE SQUARED LATIN CAPITAL LETTER A..NEGATIVE SQUARED LATIN CAPITAL LETTER I\r
++1F179         ; valid                  ;      ; NV8    # 5.2  NEGATIVE SQUARED LATIN CAPITAL LETTER J\r
++1F17A         ; valid                  ;      ; NV8    # 6.0  NEGATIVE SQUARED LATIN CAPITAL LETTER K\r
++1F17B..1F17C  ; valid                  ;      ; NV8    # 5.2  NEGATIVE SQUARED LATIN CAPITAL LETTER L..NEGATIVE SQUARED LATIN CAPITAL LETTER M\r
++1F17D..1F17E  ; valid                  ;      ; NV8    # 6.0  NEGATIVE SQUARED LATIN CAPITAL LETTER N..NEGATIVE SQUARED LATIN CAPITAL LETTER O\r
++1F17F         ; valid                  ;      ; NV8    # 5.2  NEGATIVE SQUARED LATIN CAPITAL LETTER P\r
++1F180..1F189  ; valid                  ;      ; NV8    # 6.0  NEGATIVE SQUARED LATIN CAPITAL LETTER Q..NEGATIVE SQUARED LATIN CAPITAL LETTER Z\r
++1F18A..1F18D  ; valid                  ;      ; NV8    # 5.2  CROSSED NEGATIVE SQUARED LATIN CAPITAL LETTER P..NEGATIVE SQUARED SA\r
++1F18E..1F18F  ; valid                  ;      ; NV8    # 6.0  NEGATIVE SQUARED AB..NEGATIVE SQUARED WC\r
++1F190         ; mapped                 ; 0064 006A     # 5.2  SQUARE DJ\r
++1F191..1F19A  ; valid                  ;      ; NV8    # 6.0  SQUARED CL..SQUARED VS\r
++1F19B..1F1AC  ; valid                  ;      ; NV8    # 9.0  SQUARED THREE D..SQUARED VOD\r
++1F1AD..1F1E5  ; disallowed                             # NA   <reserved-1F1AD>..<reserved-1F1E5>\r
++1F1E6..1F1FF  ; valid                  ;      ; NV8    # 6.0  REGIONAL INDICATOR SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z\r
++1F200         ; mapped                 ; 307B 304B     # 5.2  SQUARE HIRAGANA HOKA\r
++1F201         ; mapped                 ; 30B3 30B3     # 6.0  SQUARED KATAKANA KOKO\r
++1F202         ; mapped                 ; 30B5          # 6.0  SQUARED KATAKANA SA\r
++1F203..1F20F  ; disallowed                             # NA   <reserved-1F203>..<reserved-1F20F>\r
++1F210         ; mapped                 ; 624B          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-624B\r
++1F211         ; mapped                 ; 5B57          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-5B57\r
++1F212         ; mapped                 ; 53CC          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-53CC\r
++1F213         ; mapped                 ; 30C7          # 5.2  SQUARED KATAKANA DE\r
++1F214         ; mapped                 ; 4E8C          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-4E8C\r
++1F215         ; mapped                 ; 591A          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-591A\r
++1F216         ; mapped                 ; 89E3          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-89E3\r
++1F217         ; mapped                 ; 5929          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-5929\r
++1F218         ; mapped                 ; 4EA4          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-4EA4\r
++1F219         ; mapped                 ; 6620          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-6620\r
++1F21A         ; mapped                 ; 7121          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-7121\r
++1F21B         ; mapped                 ; 6599          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-6599\r
++1F21C         ; mapped                 ; 524D          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-524D\r
++1F21D         ; mapped                 ; 5F8C          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-5F8C\r
++1F21E         ; mapped                 ; 518D          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-518D\r
++1F21F         ; mapped                 ; 65B0          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-65B0\r
++1F220         ; mapped                 ; 521D          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-521D\r
++1F221         ; mapped                 ; 7D42          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-7D42\r
++1F222         ; mapped                 ; 751F          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-751F\r
++1F223         ; mapped                 ; 8CA9          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-8CA9\r
++1F224         ; mapped                 ; 58F0          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-58F0\r
++1F225         ; mapped                 ; 5439          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-5439\r
++1F226         ; mapped                 ; 6F14          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-6F14\r
++1F227         ; mapped                 ; 6295          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-6295\r
++1F228         ; mapped                 ; 6355          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-6355\r
++1F229         ; mapped                 ; 4E00          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-4E00\r
++1F22A         ; mapped                 ; 4E09          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-4E09\r
++1F22B         ; mapped                 ; 904A          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-904A\r
++1F22C         ; mapped                 ; 5DE6          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-5DE6\r
++1F22D         ; mapped                 ; 4E2D          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-4E2D\r
++1F22E         ; mapped                 ; 53F3          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-53F3\r
++1F22F         ; mapped                 ; 6307          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-6307\r
++1F230         ; mapped                 ; 8D70          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-8D70\r
++1F231         ; mapped                 ; 6253          # 5.2  SQUARED CJK UNIFIED IDEOGRAPH-6253\r
++1F232         ; mapped                 ; 7981          # 6.0  SQUARED CJK UNIFIED IDEOGRAPH-7981\r
++1F233         ; mapped                 ; 7A7A          # 6.0  SQUARED CJK UNIFIED IDEOGRAPH-7A7A\r
++1F234         ; mapped                 ; 5408          # 6.0  SQUARED CJK UNIFIED IDEOGRAPH-5408\r
++1F235         ; mapped                 ; 6E80          # 6.0  SQUARED CJK UNIFIED IDEOGRAPH-6E80\r
++1F236         ; mapped                 ; 6709          # 6.0  SQUARED CJK UNIFIED IDEOGRAPH-6709\r
++1F237         ; mapped                 ; 6708          # 6.0  SQUARED CJK UNIFIED IDEOGRAPH-6708\r
++1F238         ; mapped                 ; 7533          # 6.0  SQUARED CJK UNIFIED IDEOGRAPH-7533\r
++1F239         ; mapped                 ; 5272          # 6.0  SQUARED CJK UNIFIED IDEOGRAPH-5272\r
++1F23A         ; mapped                 ; 55B6          # 6.0  SQUARED CJK UNIFIED IDEOGRAPH-55B6\r
++1F23B         ; mapped                 ; 914D          # 9.0  SQUARED CJK UNIFIED IDEOGRAPH-914D\r
++1F23C..1F23F  ; disallowed                             # NA   <reserved-1F23C>..<reserved-1F23F>\r
++1F240         ; mapped                 ; 3014 672C 3015 #5.2  TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-672C\r
++1F241         ; mapped                 ; 3014 4E09 3015 #5.2  TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-4E09\r
++1F242         ; mapped                 ; 3014 4E8C 3015 #5.2  TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-4E8C\r
++1F243         ; mapped                 ; 3014 5B89 3015 #5.2  TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-5B89\r
++1F244         ; mapped                 ; 3014 70B9 3015 #5.2  TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-70B9\r
++1F245         ; mapped                 ; 3014 6253 3015 #5.2  TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-6253\r
++1F246         ; mapped                 ; 3014 76D7 3015 #5.2  TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-76D7\r
++1F247         ; mapped                 ; 3014 52DD 3015 #5.2  TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-52DD\r
++1F248         ; mapped                 ; 3014 6557 3015 #5.2  TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-6557\r
++1F249..1F24F  ; disallowed                             # NA   <reserved-1F249>..<reserved-1F24F>\r
++1F250         ; mapped                 ; 5F97          # 6.0  CIRCLED IDEOGRAPH ADVANTAGE\r
++1F251         ; mapped                 ; 53EF          # 6.0  CIRCLED IDEOGRAPH ACCEPT\r
++1F252..1F25F  ; disallowed                             # NA   <reserved-1F252>..<reserved-1F25F>\r
++1F260..1F265  ; valid                  ;      ; NV8    # 10.0 ROUNDED SYMBOL FOR FU..ROUNDED SYMBOL FOR CAI\r
++1F266..1F2FF  ; disallowed                             # NA   <reserved-1F266>..<reserved-1F2FF>\r
++1F300..1F320  ; valid                  ;      ; NV8    # 6.0  CYCLONE..SHOOTING STAR\r
++1F321..1F32C  ; valid                  ;      ; NV8    # 7.0  THERMOMETER..WIND BLOWING FACE\r
++1F32D..1F32F  ; valid                  ;      ; NV8    # 8.0  HOT DOG..BURRITO\r
++1F330..1F335  ; valid                  ;      ; NV8    # 6.0  CHESTNUT..CACTUS\r
++1F336         ; valid                  ;      ; NV8    # 7.0  HOT PEPPER\r
++1F337..1F37C  ; valid                  ;      ; NV8    # 6.0  TULIP..BABY BOTTLE\r
++1F37D         ; valid                  ;      ; NV8    # 7.0  FORK AND KNIFE WITH PLATE\r
++1F37E..1F37F  ; valid                  ;      ; NV8    # 8.0  BOTTLE WITH POPPING CORK..POPCORN\r
++1F380..1F393  ; valid                  ;      ; NV8    # 6.0  RIBBON..GRADUATION CAP\r
++1F394..1F39F  ; valid                  ;      ; NV8    # 7.0  HEART WITH TIP ON THE LEFT..ADMISSION TICKETS\r
++1F3A0..1F3C4  ; valid                  ;      ; NV8    # 6.0  CAROUSEL HORSE..SURFER\r
++1F3C5         ; valid                  ;      ; NV8    # 7.0  SPORTS MEDAL\r
++1F3C6..1F3CA  ; valid                  ;      ; NV8    # 6.0  TROPHY..SWIMMER\r
++1F3CB..1F3CE  ; valid                  ;      ; NV8    # 7.0  WEIGHT LIFTER..RACING CAR\r
++1F3CF..1F3D3  ; valid                  ;      ; NV8    # 8.0  CRICKET BAT AND BALL..TABLE TENNIS PADDLE AND BALL\r
++1F3D4..1F3DF  ; valid                  ;      ; NV8    # 7.0  SNOW CAPPED MOUNTAIN..STADIUM\r
++1F3E0..1F3F0  ; valid                  ;      ; NV8    # 6.0  HOUSE BUILDING..EUROPEAN CASTLE\r
++1F3F1..1F3F7  ; valid                  ;      ; NV8    # 7.0  WHITE PENNANT..LABEL\r
++1F3F8..1F3FF  ; valid                  ;      ; NV8    # 8.0  BADMINTON RACQUET AND SHUTTLECOCK..EMOJI MODIFIER FITZPATRICK TYPE-6\r
++1F400..1F43E  ; valid                  ;      ; NV8    # 6.0  RAT..PAW PRINTS\r
++1F43F         ; valid                  ;      ; NV8    # 7.0  CHIPMUNK\r
++1F440         ; valid                  ;      ; NV8    # 6.0  EYES\r
++1F441         ; valid                  ;      ; NV8    # 7.0  EYE\r
++1F442..1F4F7  ; valid                  ;      ; NV8    # 6.0  EAR..CAMERA\r
++1F4F8         ; valid                  ;      ; NV8    # 7.0  CAMERA WITH FLASH\r
++1F4F9..1F4FC  ; valid                  ;      ; NV8    # 6.0  VIDEO CAMERA..VIDEOCASSETTE\r
++1F4FD..1F4FE  ; valid                  ;      ; NV8    # 7.0  FILM PROJECTOR..PORTABLE STEREO\r
++1F4FF         ; valid                  ;      ; NV8    # 8.0  PRAYER BEADS\r
++1F500..1F53D  ; valid                  ;      ; NV8    # 6.0  TWISTED RIGHTWARDS ARROWS..DOWN-POINTING SMALL RED TRIANGLE\r
++1F53E..1F53F  ; valid                  ;      ; NV8    # 7.0  LOWER RIGHT SHADOWED WHITE CIRCLE..UPPER RIGHT SHADOWED WHITE CIRCLE\r
++1F540..1F543  ; valid                  ;      ; NV8    # 6.1  CIRCLED CROSS POMMEE..NOTCHED LEFT SEMICIRCLE WITH THREE DOTS\r
++1F544..1F54A  ; valid                  ;      ; NV8    # 7.0  NOTCHED RIGHT SEMICIRCLE WITH THREE DOTS..DOVE OF PEACE\r
++1F54B..1F54F  ; valid                  ;      ; NV8    # 8.0  KAABA..BOWL OF HYGIEIA\r
++1F550..1F567  ; valid                  ;      ; NV8    # 6.0  CLOCK FACE ONE OCLOCK..CLOCK FACE TWELVE-THIRTY\r
++1F568..1F579  ; valid                  ;      ; NV8    # 7.0  RIGHT SPEAKER..JOYSTICK\r
++1F57A         ; valid                  ;      ; NV8    # 9.0  MAN DANCING\r
++1F57B..1F5A3  ; valid                  ;      ; NV8    # 7.0  LEFT HAND TELEPHONE RECEIVER..BLACK DOWN POINTING BACKHAND INDEX\r
++1F5A4         ; valid                  ;      ; NV8    # 9.0  BLACK HEART\r
++1F5A5..1F5FA  ; valid                  ;      ; NV8    # 7.0  DESKTOP COMPUTER..WORLD MAP\r
++1F5FB..1F5FF  ; valid                  ;      ; NV8    # 6.0  MOUNT FUJI..MOYAI\r
++1F600         ; valid                  ;      ; NV8    # 6.1  GRINNING FACE\r
++1F601..1F610  ; valid                  ;      ; NV8    # 6.0  GRINNING FACE WITH SMILING EYES..NEUTRAL FACE\r
++1F611         ; valid                  ;      ; NV8    # 6.1  EXPRESSIONLESS FACE\r
++1F612..1F614  ; valid                  ;      ; NV8    # 6.0  UNAMUSED FACE..PENSIVE FACE\r
++1F615         ; valid                  ;      ; NV8    # 6.1  CONFUSED FACE\r
++1F616         ; valid                  ;      ; NV8    # 6.0  CONFOUNDED FACE\r
++1F617         ; valid                  ;      ; NV8    # 6.1  KISSING FACE\r
++1F618         ; valid                  ;      ; NV8    # 6.0  FACE THROWING A KISS\r
++1F619         ; valid                  ;      ; NV8    # 6.1  KISSING FACE WITH SMILING EYES\r
++1F61A         ; valid                  ;      ; NV8    # 6.0  KISSING FACE WITH CLOSED EYES\r
++1F61B         ; valid                  ;      ; NV8    # 6.1  FACE WITH STUCK-OUT TONGUE\r
++1F61C..1F61E  ; valid                  ;      ; NV8    # 6.0  FACE WITH STUCK-OUT TONGUE AND WINKING EYE..DISAPPOINTED FACE\r
++1F61F         ; valid                  ;      ; NV8    # 6.1  WORRIED FACE\r
++1F620..1F625  ; valid                  ;      ; NV8    # 6.0  ANGRY FACE..DISAPPOINTED BUT RELIEVED FACE\r
++1F626..1F627  ; valid                  ;      ; NV8    # 6.1  FROWNING FACE WITH OPEN MOUTH..ANGUISHED FACE\r
++1F628..1F62B  ; valid                  ;      ; NV8    # 6.0  FEARFUL FACE..TIRED FACE\r
++1F62C         ; valid                  ;      ; NV8    # 6.1  GRIMACING FACE\r
++1F62D         ; valid                  ;      ; NV8    # 6.0  LOUDLY CRYING FACE\r
++1F62E..1F62F  ; valid                  ;      ; NV8    # 6.1  FACE WITH OPEN MOUTH..HUSHED FACE\r
++1F630..1F633  ; valid                  ;      ; NV8    # 6.0  FACE WITH OPEN MOUTH AND COLD SWEAT..FLUSHED FACE\r
++1F634         ; valid                  ;      ; NV8    # 6.1  SLEEPING FACE\r
++1F635..1F640  ; valid                  ;      ; NV8    # 6.0  DIZZY FACE..WEARY CAT FACE\r
++1F641..1F642  ; valid                  ;      ; NV8    # 7.0  SLIGHTLY FROWNING FACE..SLIGHTLY SMILING FACE\r
++1F643..1F644  ; valid                  ;      ; NV8    # 8.0  UPSIDE-DOWN FACE..FACE WITH ROLLING EYES\r
++1F645..1F64F  ; valid                  ;      ; NV8    # 6.0  FACE WITH NO GOOD GESTURE..PERSON WITH FOLDED HANDS\r
++1F650..1F67F  ; valid                  ;      ; NV8    # 7.0  NORTH WEST POINTING LEAF..REVERSE CHECKER BOARD\r
++1F680..1F6C5  ; valid                  ;      ; NV8    # 6.0  ROCKET..LEFT LUGGAGE\r
++1F6C6..1F6CF  ; valid                  ;      ; NV8    # 7.0  TRIANGLE WITH ROUNDED CORNERS..BED\r
++1F6D0         ; valid                  ;      ; NV8    # 8.0  PLACE OF WORSHIP\r
++1F6D1..1F6D2  ; valid                  ;      ; NV8    # 9.0  OCTAGONAL SIGN..SHOPPING TROLLEY\r
++1F6D3..1F6D4  ; valid                  ;      ; NV8    # 10.0 STUPA..PAGODA\r
++1F6D5..1F6DF  ; disallowed                             # NA   <reserved-1F6D5>..<reserved-1F6DF>\r
++1F6E0..1F6EC  ; valid                  ;      ; NV8    # 7.0  HAMMER AND WRENCH..AIRPLANE ARRIVING\r
++1F6ED..1F6EF  ; disallowed                             # NA   <reserved-1F6ED>..<reserved-1F6EF>\r
++1F6F0..1F6F3  ; valid                  ;      ; NV8    # 7.0  SATELLITE..PASSENGER SHIP\r
++1F6F4..1F6F6  ; valid                  ;      ; NV8    # 9.0  SCOOTER..CANOE\r
++1F6F7..1F6F8  ; valid                  ;      ; NV8    # 10.0 SLED..FLYING SAUCER\r
++1F6F9..1F6FF  ; disallowed                             # NA   <reserved-1F6F9>..<reserved-1F6FF>\r
++1F700..1F773  ; valid                  ;      ; NV8    # 6.0  ALCHEMICAL SYMBOL FOR QUINTESSENCE..ALCHEMICAL SYMBOL FOR HALF OUNCE\r
++1F774..1F77F  ; disallowed                             # NA   <reserved-1F774>..<reserved-1F77F>\r
++1F780..1F7D4  ; valid                  ;      ; NV8    # 7.0  BLACK LEFT-POINTING ISOSCELES RIGHT TRIANGLE..HEAVY TWELVE POINTED PINWHEEL STAR\r
++1F7D5..1F7FF  ; disallowed                             # NA   <reserved-1F7D5>..<reserved-1F7FF>\r
++1F800..1F80B  ; valid                  ;      ; NV8    # 7.0  LEFTWARDS ARROW WITH SMALL TRIANGLE ARROWHEAD..DOWNWARDS ARROW WITH LARGE TRIANGLE ARROWHEAD\r
++1F80C..1F80F  ; disallowed                             # NA   <reserved-1F80C>..<reserved-1F80F>\r
++1F810..1F847  ; valid                  ;      ; NV8    # 7.0  LEFTWARDS ARROW WITH SMALL EQUILATERAL ARROWHEAD..DOWNWARDS HEAVY ARROW\r
++1F848..1F84F  ; disallowed                             # NA   <reserved-1F848>..<reserved-1F84F>\r
++1F850..1F859  ; valid                  ;      ; NV8    # 7.0  LEFTWARDS SANS-SERIF ARROW..UP DOWN SANS-SERIF ARROW\r
++1F85A..1F85F  ; disallowed                             # NA   <reserved-1F85A>..<reserved-1F85F>\r
++1F860..1F887  ; valid                  ;      ; NV8    # 7.0  WIDE-HEADED LEFTWARDS LIGHT BARB ARROW..WIDE-HEADED SOUTH WEST VERY HEAVY BARB ARROW\r
++1F888..1F88F  ; disallowed                             # NA   <reserved-1F888>..<reserved-1F88F>\r
++1F890..1F8AD  ; valid                  ;      ; NV8    # 7.0  LEFTWARDS TRIANGLE ARROWHEAD..WHITE ARROW SHAFT WIDTH TWO THIRDS\r
++1F8AE..1F8FF  ; disallowed                             # NA   <reserved-1F8AE>..<reserved-1F8FF>\r
++1F900..1F90B  ; valid                  ;      ; NV8    # 10.0 CIRCLED CROSS FORMEE WITH FOUR DOTS..DOWNWARD FACING NOTCHED HOOK WITH DOT\r
++1F90C..1F90F  ; disallowed                             # NA   <reserved-1F90C>..<reserved-1F90F>\r
++1F910..1F918  ; valid                  ;      ; NV8    # 8.0  ZIPPER-MOUTH FACE..SIGN OF THE HORNS\r
++1F919..1F91E  ; valid                  ;      ; NV8    # 9.0  CALL ME HAND..HAND WITH INDEX AND MIDDLE FINGERS CROSSED\r
++1F91F         ; valid                  ;      ; NV8    # 10.0 I LOVE YOU HAND SIGN\r
++1F920..1F927  ; valid                  ;      ; NV8    # 9.0  FACE WITH COWBOY HAT..SNEEZING FACE\r
++1F928..1F92F  ; valid                  ;      ; NV8    # 10.0 FACE WITH ONE EYEBROW RAISED..SHOCKED FACE WITH EXPLODING HEAD\r
++1F930         ; valid                  ;      ; NV8    # 9.0  PREGNANT WOMAN\r
++1F931..1F932  ; valid                  ;      ; NV8    # 10.0 BREAST-FEEDING..PALMS UP TOGETHER\r
++1F933..1F93E  ; valid                  ;      ; NV8    # 9.0  SELFIE..HANDBALL\r
++1F93F         ; disallowed                             # NA   <reserved-1F93F>\r
++1F940..1F94B  ; valid                  ;      ; NV8    # 9.0  WILTED FLOWER..MARTIAL ARTS UNIFORM\r
++1F94C         ; valid                  ;      ; NV8    # 10.0 CURLING STONE\r
++1F94D..1F94F  ; disallowed                             # NA   <reserved-1F94D>..<reserved-1F94F>\r
++1F950..1F95E  ; valid                  ;      ; NV8    # 9.0  CROISSANT..PANCAKES\r
++1F95F..1F96B  ; valid                  ;      ; NV8    # 10.0 DUMPLING..CANNED FOOD\r
++1F96C..1F97F  ; disallowed                             # NA   <reserved-1F96C>..<reserved-1F97F>\r
++1F980..1F984  ; valid                  ;      ; NV8    # 8.0  CRAB..UNICORN FACE\r
++1F985..1F991  ; valid                  ;      ; NV8    # 9.0  EAGLE..SQUID\r
++1F992..1F997  ; valid                  ;      ; NV8    # 10.0 GIRAFFE FACE..CRICKET\r
++1F998..1F9BF  ; disallowed                             # NA   <reserved-1F998>..<reserved-1F9BF>\r
++1F9C0         ; valid                  ;      ; NV8    # 8.0  CHEESE WEDGE\r
++1F9C1..1F9CF  ; disallowed                             # NA   <reserved-1F9C1>..<reserved-1F9CF>\r
++1F9D0..1F9E6  ; valid                  ;      ; NV8    # 10.0 FACE WITH MONOCLE..SOCKS\r
++1F9E7..1FFFD  ; disallowed                             # NA   <reserved-1F9E7>..<reserved-1FFFD>\r
++1FFFE..1FFFF  ; disallowed                             # 2.0  <noncharacter-1FFFE>..<noncharacter-1FFFF>\r
++20000..2A6D6  ; valid                                  # 3.1  CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6\r
++2A6D7..2A6FF  ; disallowed                             # NA   <reserved-2A6D7>..<reserved-2A6FF>\r
++2A700..2B734  ; valid                                  # 5.2  CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734\r
++2B735..2B73F  ; disallowed                             # NA   <reserved-2B735>..<reserved-2B73F>\r
++2B740..2B81D  ; valid                                  # 6.0  CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D\r
++2B81E..2B81F  ; disallowed                             # NA   <reserved-2B81E>..<reserved-2B81F>\r
++2B820..2CEA1  ; valid                                  # 8.0  CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1\r
++2CEA2..2CEAF  ; disallowed                             # NA   <reserved-2CEA2>..<reserved-2CEAF>\r
++2CEB0..2EBE0  ; valid                                  # 10.0 CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0\r
++2EBE1..2F7FF  ; disallowed                             # NA   <reserved-2EBE1>..<reserved-2F7FF>\r
++2F800         ; mapped                 ; 4E3D          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F800\r
++2F801         ; mapped                 ; 4E38          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F801\r
++2F802         ; mapped                 ; 4E41          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F802\r
++2F803         ; mapped                 ; 20122         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F803\r
++2F804         ; mapped                 ; 4F60          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F804\r
++2F805         ; mapped                 ; 4FAE          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F805\r
++2F806         ; mapped                 ; 4FBB          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F806\r
++2F807         ; mapped                 ; 5002          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F807\r
++2F808         ; mapped                 ; 507A          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F808\r
++2F809         ; mapped                 ; 5099          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F809\r
++2F80A         ; mapped                 ; 50E7          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F80A\r
++2F80B         ; mapped                 ; 50CF          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F80B\r
++2F80C         ; mapped                 ; 349E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F80C\r
++2F80D         ; mapped                 ; 2063A         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F80D\r
++2F80E         ; mapped                 ; 514D          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F80E\r
++2F80F         ; mapped                 ; 5154          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F80F\r
++2F810         ; mapped                 ; 5164          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F810\r
++2F811         ; mapped                 ; 5177          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F811\r
++2F812         ; mapped                 ; 2051C         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F812\r
++2F813         ; mapped                 ; 34B9          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F813\r
++2F814         ; mapped                 ; 5167          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F814\r
++2F815         ; mapped                 ; 518D          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F815\r
++2F816         ; mapped                 ; 2054B         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F816\r
++2F817         ; mapped                 ; 5197          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F817\r
++2F818         ; mapped                 ; 51A4          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F818\r
++2F819         ; mapped                 ; 4ECC          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F819\r
++2F81A         ; mapped                 ; 51AC          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F81A\r
++2F81B         ; mapped                 ; 51B5          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F81B\r
++2F81C         ; mapped                 ; 291DF         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F81C\r
++2F81D         ; mapped                 ; 51F5          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F81D\r
++2F81E         ; mapped                 ; 5203          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F81E\r
++2F81F         ; mapped                 ; 34DF          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F81F\r
++2F820         ; mapped                 ; 523B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F820\r
++2F821         ; mapped                 ; 5246          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F821\r
++2F822         ; mapped                 ; 5272          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F822\r
++2F823         ; mapped                 ; 5277          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F823\r
++2F824         ; mapped                 ; 3515          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F824\r
++2F825         ; mapped                 ; 52C7          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F825\r
++2F826         ; mapped                 ; 52C9          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F826\r
++2F827         ; mapped                 ; 52E4          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F827\r
++2F828         ; mapped                 ; 52FA          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F828\r
++2F829         ; mapped                 ; 5305          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F829\r
++2F82A         ; mapped                 ; 5306          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F82A\r
++2F82B         ; mapped                 ; 5317          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F82B\r
++2F82C         ; mapped                 ; 5349          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F82C\r
++2F82D         ; mapped                 ; 5351          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F82D\r
++2F82E         ; mapped                 ; 535A          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F82E\r
++2F82F         ; mapped                 ; 5373          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F82F\r
++2F830         ; mapped                 ; 537D          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F830\r
++2F831..2F833  ; mapped                 ; 537F          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F831..CJK COMPATIBILITY IDEOGRAPH-2F833\r
++2F834         ; mapped                 ; 20A2C         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F834\r
++2F835         ; mapped                 ; 7070          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F835\r
++2F836         ; mapped                 ; 53CA          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F836\r
++2F837         ; mapped                 ; 53DF          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F837\r
++2F838         ; mapped                 ; 20B63         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F838\r
++2F839         ; mapped                 ; 53EB          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F839\r
++2F83A         ; mapped                 ; 53F1          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F83A\r
++2F83B         ; mapped                 ; 5406          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F83B\r
++2F83C         ; mapped                 ; 549E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F83C\r
++2F83D         ; mapped                 ; 5438          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F83D\r
++2F83E         ; mapped                 ; 5448          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F83E\r
++2F83F         ; mapped                 ; 5468          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F83F\r
++2F840         ; mapped                 ; 54A2          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F840\r
++2F841         ; mapped                 ; 54F6          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F841\r
++2F842         ; mapped                 ; 5510          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F842\r
++2F843         ; mapped                 ; 5553          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F843\r
++2F844         ; mapped                 ; 5563          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F844\r
++2F845..2F846  ; mapped                 ; 5584          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F845..CJK COMPATIBILITY IDEOGRAPH-2F846\r
++2F847         ; mapped                 ; 5599          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F847\r
++2F848         ; mapped                 ; 55AB          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F848\r
++2F849         ; mapped                 ; 55B3          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F849\r
++2F84A         ; mapped                 ; 55C2          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F84A\r
++2F84B         ; mapped                 ; 5716          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F84B\r
++2F84C         ; mapped                 ; 5606          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F84C\r
++2F84D         ; mapped                 ; 5717          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F84D\r
++2F84E         ; mapped                 ; 5651          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F84E\r
++2F84F         ; mapped                 ; 5674          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F84F\r
++2F850         ; mapped                 ; 5207          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F850\r
++2F851         ; mapped                 ; 58EE          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F851\r
++2F852         ; mapped                 ; 57CE          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F852\r
++2F853         ; mapped                 ; 57F4          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F853\r
++2F854         ; mapped                 ; 580D          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F854\r
++2F855         ; mapped                 ; 578B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F855\r
++2F856         ; mapped                 ; 5832          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F856\r
++2F857         ; mapped                 ; 5831          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F857\r
++2F858         ; mapped                 ; 58AC          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F858\r
++2F859         ; mapped                 ; 214E4         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F859\r
++2F85A         ; mapped                 ; 58F2          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F85A\r
++2F85B         ; mapped                 ; 58F7          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F85B\r
++2F85C         ; mapped                 ; 5906          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F85C\r
++2F85D         ; mapped                 ; 591A          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F85D\r
++2F85E         ; mapped                 ; 5922          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F85E\r
++2F85F         ; mapped                 ; 5962          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F85F\r
++2F860         ; mapped                 ; 216A8         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F860\r
++2F861         ; mapped                 ; 216EA         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F861\r
++2F862         ; mapped                 ; 59EC          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F862\r
++2F863         ; mapped                 ; 5A1B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F863\r
++2F864         ; mapped                 ; 5A27          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F864\r
++2F865         ; mapped                 ; 59D8          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F865\r
++2F866         ; mapped                 ; 5A66          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F866\r
++2F867         ; mapped                 ; 36EE          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F867\r
++2F868         ; disallowed                             # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F868\r
++2F869         ; mapped                 ; 5B08          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F869\r
++2F86A..2F86B  ; mapped                 ; 5B3E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F86A..CJK COMPATIBILITY IDEOGRAPH-2F86B\r
++2F86C         ; mapped                 ; 219C8         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F86C\r
++2F86D         ; mapped                 ; 5BC3          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F86D\r
++2F86E         ; mapped                 ; 5BD8          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F86E\r
++2F86F         ; mapped                 ; 5BE7          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F86F\r
++2F870         ; mapped                 ; 5BF3          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F870\r
++2F871         ; mapped                 ; 21B18         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F871\r
++2F872         ; mapped                 ; 5BFF          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F872\r
++2F873         ; mapped                 ; 5C06          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F873\r
++2F874         ; disallowed                             # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F874\r
++2F875         ; mapped                 ; 5C22          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F875\r
++2F876         ; mapped                 ; 3781          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F876\r
++2F877         ; mapped                 ; 5C60          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F877\r
++2F878         ; mapped                 ; 5C6E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F878\r
++2F879         ; mapped                 ; 5CC0          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F879\r
++2F87A         ; mapped                 ; 5C8D          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F87A\r
++2F87B         ; mapped                 ; 21DE4         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F87B\r
++2F87C         ; mapped                 ; 5D43          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F87C\r
++2F87D         ; mapped                 ; 21DE6         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F87D\r
++2F87E         ; mapped                 ; 5D6E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F87E\r
++2F87F         ; mapped                 ; 5D6B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F87F\r
++2F880         ; mapped                 ; 5D7C          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F880\r
++2F881         ; mapped                 ; 5DE1          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F881\r
++2F882         ; mapped                 ; 5DE2          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F882\r
++2F883         ; mapped                 ; 382F          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F883\r
++2F884         ; mapped                 ; 5DFD          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F884\r
++2F885         ; mapped                 ; 5E28          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F885\r
++2F886         ; mapped                 ; 5E3D          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F886\r
++2F887         ; mapped                 ; 5E69          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F887\r
++2F888         ; mapped                 ; 3862          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F888\r
++2F889         ; mapped                 ; 22183         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F889\r
++2F88A         ; mapped                 ; 387C          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F88A\r
++2F88B         ; mapped                 ; 5EB0          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F88B\r
++2F88C         ; mapped                 ; 5EB3          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F88C\r
++2F88D         ; mapped                 ; 5EB6          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F88D\r
++2F88E         ; mapped                 ; 5ECA          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F88E\r
++2F88F         ; mapped                 ; 2A392         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F88F\r
++2F890         ; mapped                 ; 5EFE          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F890\r
++2F891..2F892  ; mapped                 ; 22331         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F891..CJK COMPATIBILITY IDEOGRAPH-2F892\r
++2F893         ; mapped                 ; 8201          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F893\r
++2F894..2F895  ; mapped                 ; 5F22          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F894..CJK COMPATIBILITY IDEOGRAPH-2F895\r
++2F896         ; mapped                 ; 38C7          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F896\r
++2F897         ; mapped                 ; 232B8         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F897\r
++2F898         ; mapped                 ; 261DA         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F898\r
++2F899         ; mapped                 ; 5F62          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F899\r
++2F89A         ; mapped                 ; 5F6B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F89A\r
++2F89B         ; mapped                 ; 38E3          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F89B\r
++2F89C         ; mapped                 ; 5F9A          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F89C\r
++2F89D         ; mapped                 ; 5FCD          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F89D\r
++2F89E         ; mapped                 ; 5FD7          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F89E\r
++2F89F         ; mapped                 ; 5FF9          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F89F\r
++2F8A0         ; mapped                 ; 6081          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8A0\r
++2F8A1         ; mapped                 ; 393A          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8A1\r
++2F8A2         ; mapped                 ; 391C          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8A2\r
++2F8A3         ; mapped                 ; 6094          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8A3\r
++2F8A4         ; mapped                 ; 226D4         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8A4\r
++2F8A5         ; mapped                 ; 60C7          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8A5\r
++2F8A6         ; mapped                 ; 6148          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8A6\r
++2F8A7         ; mapped                 ; 614C          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8A7\r
++2F8A8         ; mapped                 ; 614E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8A8\r
++2F8A9         ; mapped                 ; 614C          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8A9\r
++2F8AA         ; mapped                 ; 617A          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8AA\r
++2F8AB         ; mapped                 ; 618E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8AB\r
++2F8AC         ; mapped                 ; 61B2          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8AC\r
++2F8AD         ; mapped                 ; 61A4          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8AD\r
++2F8AE         ; mapped                 ; 61AF          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8AE\r
++2F8AF         ; mapped                 ; 61DE          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8AF\r
++2F8B0         ; mapped                 ; 61F2          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8B0\r
++2F8B1         ; mapped                 ; 61F6          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8B1\r
++2F8B2         ; mapped                 ; 6210          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8B2\r
++2F8B3         ; mapped                 ; 621B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8B3\r
++2F8B4         ; mapped                 ; 625D          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8B4\r
++2F8B5         ; mapped                 ; 62B1          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8B5\r
++2F8B6         ; mapped                 ; 62D4          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8B6\r
++2F8B7         ; mapped                 ; 6350          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8B7\r
++2F8B8         ; mapped                 ; 22B0C         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8B8\r
++2F8B9         ; mapped                 ; 633D          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8B9\r
++2F8BA         ; mapped                 ; 62FC          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8BA\r
++2F8BB         ; mapped                 ; 6368          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8BB\r
++2F8BC         ; mapped                 ; 6383          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8BC\r
++2F8BD         ; mapped                 ; 63E4          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8BD\r
++2F8BE         ; mapped                 ; 22BF1         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8BE\r
++2F8BF         ; mapped                 ; 6422          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8BF\r
++2F8C0         ; mapped                 ; 63C5          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8C0\r
++2F8C1         ; mapped                 ; 63A9          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8C1\r
++2F8C2         ; mapped                 ; 3A2E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8C2\r
++2F8C3         ; mapped                 ; 6469          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8C3\r
++2F8C4         ; mapped                 ; 647E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8C4\r
++2F8C5         ; mapped                 ; 649D          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8C5\r
++2F8C6         ; mapped                 ; 6477          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8C6\r
++2F8C7         ; mapped                 ; 3A6C          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8C7\r
++2F8C8         ; mapped                 ; 654F          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8C8\r
++2F8C9         ; mapped                 ; 656C          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8C9\r
++2F8CA         ; mapped                 ; 2300A         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8CA\r
++2F8CB         ; mapped                 ; 65E3          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8CB\r
++2F8CC         ; mapped                 ; 66F8          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8CC\r
++2F8CD         ; mapped                 ; 6649          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8CD\r
++2F8CE         ; mapped                 ; 3B19          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8CE\r
++2F8CF         ; mapped                 ; 6691          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8CF\r
++2F8D0         ; mapped                 ; 3B08          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8D0\r
++2F8D1         ; mapped                 ; 3AE4          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8D1\r
++2F8D2         ; mapped                 ; 5192          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8D2\r
++2F8D3         ; mapped                 ; 5195          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8D3\r
++2F8D4         ; mapped                 ; 6700          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8D4\r
++2F8D5         ; mapped                 ; 669C          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8D5\r
++2F8D6         ; mapped                 ; 80AD          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8D6\r
++2F8D7         ; mapped                 ; 43D9          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8D7\r
++2F8D8         ; mapped                 ; 6717          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8D8\r
++2F8D9         ; mapped                 ; 671B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8D9\r
++2F8DA         ; mapped                 ; 6721          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8DA\r
++2F8DB         ; mapped                 ; 675E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8DB\r
++2F8DC         ; mapped                 ; 6753          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8DC\r
++2F8DD         ; mapped                 ; 233C3         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8DD\r
++2F8DE         ; mapped                 ; 3B49          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8DE\r
++2F8DF         ; mapped                 ; 67FA          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8DF\r
++2F8E0         ; mapped                 ; 6785          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8E0\r
++2F8E1         ; mapped                 ; 6852          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8E1\r
++2F8E2         ; mapped                 ; 6885          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8E2\r
++2F8E3         ; mapped                 ; 2346D         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8E3\r
++2F8E4         ; mapped                 ; 688E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8E4\r
++2F8E5         ; mapped                 ; 681F          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8E5\r
++2F8E6         ; mapped                 ; 6914          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8E6\r
++2F8E7         ; mapped                 ; 3B9D          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8E7\r
++2F8E8         ; mapped                 ; 6942          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8E8\r
++2F8E9         ; mapped                 ; 69A3          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8E9\r
++2F8EA         ; mapped                 ; 69EA          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8EA\r
++2F8EB         ; mapped                 ; 6AA8          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8EB\r
++2F8EC         ; mapped                 ; 236A3         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8EC\r
++2F8ED         ; mapped                 ; 6ADB          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8ED\r
++2F8EE         ; mapped                 ; 3C18          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8EE\r
++2F8EF         ; mapped                 ; 6B21          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8EF\r
++2F8F0         ; mapped                 ; 238A7         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8F0\r
++2F8F1         ; mapped                 ; 6B54          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8F1\r
++2F8F2         ; mapped                 ; 3C4E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8F2\r
++2F8F3         ; mapped                 ; 6B72          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8F3\r
++2F8F4         ; mapped                 ; 6B9F          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8F4\r
++2F8F5         ; mapped                 ; 6BBA          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8F5\r
++2F8F6         ; mapped                 ; 6BBB          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8F6\r
++2F8F7         ; mapped                 ; 23A8D         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8F7\r
++2F8F8         ; mapped                 ; 21D0B         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8F8\r
++2F8F9         ; mapped                 ; 23AFA         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8F9\r
++2F8FA         ; mapped                 ; 6C4E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8FA\r
++2F8FB         ; mapped                 ; 23CBC         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8FB\r
++2F8FC         ; mapped                 ; 6CBF          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8FC\r
++2F8FD         ; mapped                 ; 6CCD          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8FD\r
++2F8FE         ; mapped                 ; 6C67          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8FE\r
++2F8FF         ; mapped                 ; 6D16          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F8FF\r
++2F900         ; mapped                 ; 6D3E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F900\r
++2F901         ; mapped                 ; 6D77          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F901\r
++2F902         ; mapped                 ; 6D41          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F902\r
++2F903         ; mapped                 ; 6D69          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F903\r
++2F904         ; mapped                 ; 6D78          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F904\r
++2F905         ; mapped                 ; 6D85          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F905\r
++2F906         ; mapped                 ; 23D1E         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F906\r
++2F907         ; mapped                 ; 6D34          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F907\r
++2F908         ; mapped                 ; 6E2F          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F908\r
++2F909         ; mapped                 ; 6E6E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F909\r
++2F90A         ; mapped                 ; 3D33          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F90A\r
++2F90B         ; mapped                 ; 6ECB          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F90B\r
++2F90C         ; mapped                 ; 6EC7          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F90C\r
++2F90D         ; mapped                 ; 23ED1         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F90D\r
++2F90E         ; mapped                 ; 6DF9          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F90E\r
++2F90F         ; mapped                 ; 6F6E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F90F\r
++2F910         ; mapped                 ; 23F5E         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F910\r
++2F911         ; mapped                 ; 23F8E         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F911\r
++2F912         ; mapped                 ; 6FC6          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F912\r
++2F913         ; mapped                 ; 7039          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F913\r
++2F914         ; mapped                 ; 701E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F914\r
++2F915         ; mapped                 ; 701B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F915\r
++2F916         ; mapped                 ; 3D96          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F916\r
++2F917         ; mapped                 ; 704A          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F917\r
++2F918         ; mapped                 ; 707D          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F918\r
++2F919         ; mapped                 ; 7077          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F919\r
++2F91A         ; mapped                 ; 70AD          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F91A\r
++2F91B         ; mapped                 ; 20525         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F91B\r
++2F91C         ; mapped                 ; 7145          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F91C\r
++2F91D         ; mapped                 ; 24263         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F91D\r
++2F91E         ; mapped                 ; 719C          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F91E\r
++2F91F         ; disallowed                             # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F91F\r
++2F920         ; mapped                 ; 7228          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F920\r
++2F921         ; mapped                 ; 7235          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F921\r
++2F922         ; mapped                 ; 7250          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F922\r
++2F923         ; mapped                 ; 24608         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F923\r
++2F924         ; mapped                 ; 7280          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F924\r
++2F925         ; mapped                 ; 7295          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F925\r
++2F926         ; mapped                 ; 24735         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F926\r
++2F927         ; mapped                 ; 24814         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F927\r
++2F928         ; mapped                 ; 737A          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F928\r
++2F929         ; mapped                 ; 738B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F929\r
++2F92A         ; mapped                 ; 3EAC          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F92A\r
++2F92B         ; mapped                 ; 73A5          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F92B\r
++2F92C..2F92D  ; mapped                 ; 3EB8          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F92C..CJK COMPATIBILITY IDEOGRAPH-2F92D\r
++2F92E         ; mapped                 ; 7447          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F92E\r
++2F92F         ; mapped                 ; 745C          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F92F\r
++2F930         ; mapped                 ; 7471          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F930\r
++2F931         ; mapped                 ; 7485          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F931\r
++2F932         ; mapped                 ; 74CA          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F932\r
++2F933         ; mapped                 ; 3F1B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F933\r
++2F934         ; mapped                 ; 7524          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F934\r
++2F935         ; mapped                 ; 24C36         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F935\r
++2F936         ; mapped                 ; 753E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F936\r
++2F937         ; mapped                 ; 24C92         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F937\r
++2F938         ; mapped                 ; 7570          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F938\r
++2F939         ; mapped                 ; 2219F         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F939\r
++2F93A         ; mapped                 ; 7610          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F93A\r
++2F93B         ; mapped                 ; 24FA1         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F93B\r
++2F93C         ; mapped                 ; 24FB8         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F93C\r
++2F93D         ; mapped                 ; 25044         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F93D\r
++2F93E         ; mapped                 ; 3FFC          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F93E\r
++2F93F         ; mapped                 ; 4008          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F93F\r
++2F940         ; mapped                 ; 76F4          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F940\r
++2F941         ; mapped                 ; 250F3         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F941\r
++2F942         ; mapped                 ; 250F2         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F942\r
++2F943         ; mapped                 ; 25119         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F943\r
++2F944         ; mapped                 ; 25133         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F944\r
++2F945         ; mapped                 ; 771E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F945\r
++2F946..2F947  ; mapped                 ; 771F          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F946..CJK COMPATIBILITY IDEOGRAPH-2F947\r
++2F948         ; mapped                 ; 774A          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F948\r
++2F949         ; mapped                 ; 4039          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F949\r
++2F94A         ; mapped                 ; 778B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F94A\r
++2F94B         ; mapped                 ; 4046          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F94B\r
++2F94C         ; mapped                 ; 4096          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F94C\r
++2F94D         ; mapped                 ; 2541D         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F94D\r
++2F94E         ; mapped                 ; 784E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F94E\r
++2F94F         ; mapped                 ; 788C          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F94F\r
++2F950         ; mapped                 ; 78CC          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F950\r
++2F951         ; mapped                 ; 40E3          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F951\r
++2F952         ; mapped                 ; 25626         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F952\r
++2F953         ; mapped                 ; 7956          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F953\r
++2F954         ; mapped                 ; 2569A         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F954\r
++2F955         ; mapped                 ; 256C5         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F955\r
++2F956         ; mapped                 ; 798F          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F956\r
++2F957         ; mapped                 ; 79EB          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F957\r
++2F958         ; mapped                 ; 412F          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F958\r
++2F959         ; mapped                 ; 7A40          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F959\r
++2F95A         ; mapped                 ; 7A4A          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F95A\r
++2F95B         ; mapped                 ; 7A4F          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F95B\r
++2F95C         ; mapped                 ; 2597C         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F95C\r
++2F95D..2F95E  ; mapped                 ; 25AA7         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F95D..CJK COMPATIBILITY IDEOGRAPH-2F95E\r
++2F95F         ; disallowed                             # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F95F\r
++2F960         ; mapped                 ; 4202          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F960\r
++2F961         ; mapped                 ; 25BAB         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F961\r
++2F962         ; mapped                 ; 7BC6          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F962\r
++2F963         ; mapped                 ; 7BC9          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F963\r
++2F964         ; mapped                 ; 4227          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F964\r
++2F965         ; mapped                 ; 25C80         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F965\r
++2F966         ; mapped                 ; 7CD2          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F966\r
++2F967         ; mapped                 ; 42A0          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F967\r
++2F968         ; mapped                 ; 7CE8          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F968\r
++2F969         ; mapped                 ; 7CE3          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F969\r
++2F96A         ; mapped                 ; 7D00          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F96A\r
++2F96B         ; mapped                 ; 25F86         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F96B\r
++2F96C         ; mapped                 ; 7D63          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F96C\r
++2F96D         ; mapped                 ; 4301          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F96D\r
++2F96E         ; mapped                 ; 7DC7          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F96E\r
++2F96F         ; mapped                 ; 7E02          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F96F\r
++2F970         ; mapped                 ; 7E45          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F970\r
++2F971         ; mapped                 ; 4334          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F971\r
++2F972         ; mapped                 ; 26228         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F972\r
++2F973         ; mapped                 ; 26247         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F973\r
++2F974         ; mapped                 ; 4359          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F974\r
++2F975         ; mapped                 ; 262D9         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F975\r
++2F976         ; mapped                 ; 7F7A          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F976\r
++2F977         ; mapped                 ; 2633E         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F977\r
++2F978         ; mapped                 ; 7F95          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F978\r
++2F979         ; mapped                 ; 7FFA          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F979\r
++2F97A         ; mapped                 ; 8005          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F97A\r
++2F97B         ; mapped                 ; 264DA         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F97B\r
++2F97C         ; mapped                 ; 26523         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F97C\r
++2F97D         ; mapped                 ; 8060          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F97D\r
++2F97E         ; mapped                 ; 265A8         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F97E\r
++2F97F         ; mapped                 ; 8070          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F97F\r
++2F980         ; mapped                 ; 2335F         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F980\r
++2F981         ; mapped                 ; 43D5          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F981\r
++2F982         ; mapped                 ; 80B2          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F982\r
++2F983         ; mapped                 ; 8103          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F983\r
++2F984         ; mapped                 ; 440B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F984\r
++2F985         ; mapped                 ; 813E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F985\r
++2F986         ; mapped                 ; 5AB5          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F986\r
++2F987         ; mapped                 ; 267A7         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F987\r
++2F988         ; mapped                 ; 267B5         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F988\r
++2F989         ; mapped                 ; 23393         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F989\r
++2F98A         ; mapped                 ; 2339C         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F98A\r
++2F98B         ; mapped                 ; 8201          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F98B\r
++2F98C         ; mapped                 ; 8204          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F98C\r
++2F98D         ; mapped                 ; 8F9E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F98D\r
++2F98E         ; mapped                 ; 446B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F98E\r
++2F98F         ; mapped                 ; 8291          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F98F\r
++2F990         ; mapped                 ; 828B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F990\r
++2F991         ; mapped                 ; 829D          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F991\r
++2F992         ; mapped                 ; 52B3          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F992\r
++2F993         ; mapped                 ; 82B1          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F993\r
++2F994         ; mapped                 ; 82B3          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F994\r
++2F995         ; mapped                 ; 82BD          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F995\r
++2F996         ; mapped                 ; 82E6          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F996\r
++2F997         ; mapped                 ; 26B3C         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F997\r
++2F998         ; mapped                 ; 82E5          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F998\r
++2F999         ; mapped                 ; 831D          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F999\r
++2F99A         ; mapped                 ; 8363          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F99A\r
++2F99B         ; mapped                 ; 83AD          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F99B\r
++2F99C         ; mapped                 ; 8323          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F99C\r
++2F99D         ; mapped                 ; 83BD          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F99D\r
++2F99E         ; mapped                 ; 83E7          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F99E\r
++2F99F         ; mapped                 ; 8457          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F99F\r
++2F9A0         ; mapped                 ; 8353          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9A0\r
++2F9A1         ; mapped                 ; 83CA          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9A1\r
++2F9A2         ; mapped                 ; 83CC          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9A2\r
++2F9A3         ; mapped                 ; 83DC          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9A3\r
++2F9A4         ; mapped                 ; 26C36         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9A4\r
++2F9A5         ; mapped                 ; 26D6B         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9A5\r
++2F9A6         ; mapped                 ; 26CD5         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9A6\r
++2F9A7         ; mapped                 ; 452B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9A7\r
++2F9A8         ; mapped                 ; 84F1          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9A8\r
++2F9A9         ; mapped                 ; 84F3          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9A9\r
++2F9AA         ; mapped                 ; 8516          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9AA\r
++2F9AB         ; mapped                 ; 273CA         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9AB\r
++2F9AC         ; mapped                 ; 8564          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9AC\r
++2F9AD         ; mapped                 ; 26F2C         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9AD\r
++2F9AE         ; mapped                 ; 455D          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9AE\r
++2F9AF         ; mapped                 ; 4561          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9AF\r
++2F9B0         ; mapped                 ; 26FB1         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9B0\r
++2F9B1         ; mapped                 ; 270D2         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9B1\r
++2F9B2         ; mapped                 ; 456B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9B2\r
++2F9B3         ; mapped                 ; 8650          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9B3\r
++2F9B4         ; mapped                 ; 865C          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9B4\r
++2F9B5         ; mapped                 ; 8667          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9B5\r
++2F9B6         ; mapped                 ; 8669          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9B6\r
++2F9B7         ; mapped                 ; 86A9          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9B7\r
++2F9B8         ; mapped                 ; 8688          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9B8\r
++2F9B9         ; mapped                 ; 870E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9B9\r
++2F9BA         ; mapped                 ; 86E2          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9BA\r
++2F9BB         ; mapped                 ; 8779          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9BB\r
++2F9BC         ; mapped                 ; 8728          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9BC\r
++2F9BD         ; mapped                 ; 876B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9BD\r
++2F9BE         ; mapped                 ; 8786          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9BE\r
++2F9BF         ; disallowed                             # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9BF\r
++2F9C0         ; mapped                 ; 87E1          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9C0\r
++2F9C1         ; mapped                 ; 8801          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9C1\r
++2F9C2         ; mapped                 ; 45F9          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9C2\r
++2F9C3         ; mapped                 ; 8860          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9C3\r
++2F9C4         ; mapped                 ; 8863          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9C4\r
++2F9C5         ; mapped                 ; 27667         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9C5\r
++2F9C6         ; mapped                 ; 88D7          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9C6\r
++2F9C7         ; mapped                 ; 88DE          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9C7\r
++2F9C8         ; mapped                 ; 4635          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9C8\r
++2F9C9         ; mapped                 ; 88FA          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9C9\r
++2F9CA         ; mapped                 ; 34BB          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9CA\r
++2F9CB         ; mapped                 ; 278AE         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9CB\r
++2F9CC         ; mapped                 ; 27966         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9CC\r
++2F9CD         ; mapped                 ; 46BE          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9CD\r
++2F9CE         ; mapped                 ; 46C7          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9CE\r
++2F9CF         ; mapped                 ; 8AA0          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9CF\r
++2F9D0         ; mapped                 ; 8AED          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9D0\r
++2F9D1         ; mapped                 ; 8B8A          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9D1\r
++2F9D2         ; mapped                 ; 8C55          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9D2\r
++2F9D3         ; mapped                 ; 27CA8         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9D3\r
++2F9D4         ; mapped                 ; 8CAB          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9D4\r
++2F9D5         ; mapped                 ; 8CC1          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9D5\r
++2F9D6         ; mapped                 ; 8D1B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9D6\r
++2F9D7         ; mapped                 ; 8D77          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9D7\r
++2F9D8         ; mapped                 ; 27F2F         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9D8\r
++2F9D9         ; mapped                 ; 20804         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9D9\r
++2F9DA         ; mapped                 ; 8DCB          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9DA\r
++2F9DB         ; mapped                 ; 8DBC          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9DB\r
++2F9DC         ; mapped                 ; 8DF0          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9DC\r
++2F9DD         ; mapped                 ; 208DE         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9DD\r
++2F9DE         ; mapped                 ; 8ED4          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9DE\r
++2F9DF         ; mapped                 ; 8F38          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9DF\r
++2F9E0         ; mapped                 ; 285D2         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9E0\r
++2F9E1         ; mapped                 ; 285ED         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9E1\r
++2F9E2         ; mapped                 ; 9094          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9E2\r
++2F9E3         ; mapped                 ; 90F1          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9E3\r
++2F9E4         ; mapped                 ; 9111          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9E4\r
++2F9E5         ; mapped                 ; 2872E         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9E5\r
++2F9E6         ; mapped                 ; 911B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9E6\r
++2F9E7         ; mapped                 ; 9238          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9E7\r
++2F9E8         ; mapped                 ; 92D7          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9E8\r
++2F9E9         ; mapped                 ; 92D8          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9E9\r
++2F9EA         ; mapped                 ; 927C          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9EA\r
++2F9EB         ; mapped                 ; 93F9          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9EB\r
++2F9EC         ; mapped                 ; 9415          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9EC\r
++2F9ED         ; mapped                 ; 28BFA         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9ED\r
++2F9EE         ; mapped                 ; 958B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9EE\r
++2F9EF         ; mapped                 ; 4995          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9EF\r
++2F9F0         ; mapped                 ; 95B7          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9F0\r
++2F9F1         ; mapped                 ; 28D77         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9F1\r
++2F9F2         ; mapped                 ; 49E6          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9F2\r
++2F9F3         ; mapped                 ; 96C3          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9F3\r
++2F9F4         ; mapped                 ; 5DB2          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9F4\r
++2F9F5         ; mapped                 ; 9723          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9F5\r
++2F9F6         ; mapped                 ; 29145         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9F6\r
++2F9F7         ; mapped                 ; 2921A         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9F7\r
++2F9F8         ; mapped                 ; 4A6E          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9F8\r
++2F9F9         ; mapped                 ; 4A76          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9F9\r
++2F9FA         ; mapped                 ; 97E0          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9FA\r
++2F9FB         ; mapped                 ; 2940A         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9FB\r
++2F9FC         ; mapped                 ; 4AB2          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9FC\r
++2F9FD         ; mapped                 ; 29496         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9FD\r
++2F9FE..2F9FF  ; mapped                 ; 980B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2F9FE..CJK COMPATIBILITY IDEOGRAPH-2F9FF\r
++2FA00         ; mapped                 ; 9829          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA00\r
++2FA01         ; mapped                 ; 295B6         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA01\r
++2FA02         ; mapped                 ; 98E2          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA02\r
++2FA03         ; mapped                 ; 4B33          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA03\r
++2FA04         ; mapped                 ; 9929          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA04\r
++2FA05         ; mapped                 ; 99A7          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA05\r
++2FA06         ; mapped                 ; 99C2          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA06\r
++2FA07         ; mapped                 ; 99FE          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA07\r
++2FA08         ; mapped                 ; 4BCE          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA08\r
++2FA09         ; mapped                 ; 29B30         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA09\r
++2FA0A         ; mapped                 ; 9B12          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA0A\r
++2FA0B         ; mapped                 ; 9C40          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA0B\r
++2FA0C         ; mapped                 ; 9CFD          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA0C\r
++2FA0D         ; mapped                 ; 4CCE          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA0D\r
++2FA0E         ; mapped                 ; 4CED          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA0E\r
++2FA0F         ; mapped                 ; 9D67          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA0F\r
++2FA10         ; mapped                 ; 2A0CE         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA10\r
++2FA11         ; mapped                 ; 4CF8          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA11\r
++2FA12         ; mapped                 ; 2A105         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA12\r
++2FA13         ; mapped                 ; 2A20E         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA13\r
++2FA14         ; mapped                 ; 2A291         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA14\r
++2FA15         ; mapped                 ; 9EBB          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA15\r
++2FA16         ; mapped                 ; 4D56          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA16\r
++2FA17         ; mapped                 ; 9EF9          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA17\r
++2FA18         ; mapped                 ; 9EFE          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA18\r
++2FA19         ; mapped                 ; 9F05          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA19\r
++2FA1A         ; mapped                 ; 9F0F          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA1A\r
++2FA1B         ; mapped                 ; 9F16          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA1B\r
++2FA1C         ; mapped                 ; 9F3B          # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA1C\r
++2FA1D         ; mapped                 ; 2A600         # 3.1  CJK COMPATIBILITY IDEOGRAPH-2FA1D\r
++2FA1E..2FFFD  ; disallowed                             # NA   <reserved-2FA1E>..<reserved-2FFFD>\r
++2FFFE..2FFFF  ; disallowed                             # 2.0  <noncharacter-2FFFE>..<noncharacter-2FFFF>\r
++30000..3FFFD  ; disallowed                             # NA   <reserved-30000>..<reserved-3FFFD>\r
++3FFFE..3FFFF  ; disallowed                             # 2.0  <noncharacter-3FFFE>..<noncharacter-3FFFF>\r
++40000..4FFFD  ; disallowed                             # NA   <reserved-40000>..<reserved-4FFFD>\r
++4FFFE..4FFFF  ; disallowed                             # 2.0  <noncharacter-4FFFE>..<noncharacter-4FFFF>\r
++50000..5FFFD  ; disallowed                             # NA   <reserved-50000>..<reserved-5FFFD>\r
++5FFFE..5FFFF  ; disallowed                             # 2.0  <noncharacter-5FFFE>..<noncharacter-5FFFF>\r
++60000..6FFFD  ; disallowed                             # NA   <reserved-60000>..<reserved-6FFFD>\r
++6FFFE..6FFFF  ; disallowed                             # 2.0  <noncharacter-6FFFE>..<noncharacter-6FFFF>\r
++70000..7FFFD  ; disallowed                             # NA   <reserved-70000>..<reserved-7FFFD>\r
++7FFFE..7FFFF  ; disallowed                             # 2.0  <noncharacter-7FFFE>..<noncharacter-7FFFF>\r
++80000..8FFFD  ; disallowed                             # NA   <reserved-80000>..<reserved-8FFFD>\r
++8FFFE..8FFFF  ; disallowed                             # 2.0  <noncharacter-8FFFE>..<noncharacter-8FFFF>\r
++90000..9FFFD  ; disallowed                             # NA   <reserved-90000>..<reserved-9FFFD>\r
++9FFFE..9FFFF  ; disallowed                             # 2.0  <noncharacter-9FFFE>..<noncharacter-9FFFF>\r
++A0000..AFFFD  ; disallowed                             # NA   <reserved-A0000>..<reserved-AFFFD>\r
++AFFFE..AFFFF  ; disallowed                             # 2.0  <noncharacter-AFFFE>..<noncharacter-AFFFF>\r
++B0000..BFFFD  ; disallowed                             # NA   <reserved-B0000>..<reserved-BFFFD>\r
++BFFFE..BFFFF  ; disallowed                             # 2.0  <noncharacter-BFFFE>..<noncharacter-BFFFF>\r
++C0000..CFFFD  ; disallowed                             # NA   <reserved-C0000>..<reserved-CFFFD>\r
++CFFFE..CFFFF  ; disallowed                             # 2.0  <noncharacter-CFFFE>..<noncharacter-CFFFF>\r
++D0000..DFFFD  ; disallowed                             # NA   <reserved-D0000>..<reserved-DFFFD>\r
++DFFFE..DFFFF  ; disallowed                             # 2.0  <noncharacter-DFFFE>..<noncharacter-DFFFF>\r
++E0000         ; disallowed                             # NA   <reserved-E0000>\r
++E0001         ; disallowed                             # 3.1  LANGUAGE TAG\r
++E0002..E001F  ; disallowed                             # NA   <reserved-E0002>..<reserved-E001F>\r
++E0020..E007F  ; disallowed                             # 3.1  TAG SPACE..CANCEL TAG\r
++E0080..E00FF  ; disallowed                             # NA   <reserved-E0080>..<reserved-E00FF>\r
++E0100..E01EF  ; ignored                                # 4.0  VARIATION SELECTOR-17..VARIATION SELECTOR-256\r
++E01F0..EFFFD  ; disallowed                             # NA   <reserved-E01F0>..<reserved-EFFFD>\r
++EFFFE..EFFFF  ; disallowed                             # 2.0  <noncharacter-EFFFE>..<noncharacter-EFFFF>\r
++F0000..FFFFD  ; disallowed                             # 2.0  <private-use-F0000>..<private-use-FFFFD>\r
++FFFFE..FFFFF  ; disallowed                             # 2.0  <noncharacter-FFFFE>..<noncharacter-FFFFF>\r
++100000..10FFFD; disallowed                             # 2.0  <private-use-100000>..<private-use-10FFFD>\r
++10FFFE..10FFFF; disallowed                             # 2.0  <noncharacter-10FFFE>..<noncharacter-10FFFF>\r
++\r
++# Total code points: 1114112\r
++\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bdeafe448554db9c3e3852dd71cff4d47fba1beb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,73 @@@
++// Copyright 2016 The rust-url developers.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! This Rust crate implements IDNA
++//! [per the WHATWG URL Standard](https://url.spec.whatwg.org/#idna).
++//!
++//! It also exposes the underlying algorithms from [*Unicode IDNA Compatibility Processing*
++//! (Unicode Technical Standard #46)](http://www.unicode.org/reports/tr46/)
++//! and [Punycode (RFC 3492)](https://tools.ietf.org/html/rfc3492).
++//!
++//! Quoting from [UTS #46’s introduction](http://www.unicode.org/reports/tr46/#Introduction):
++//!
++//! > Initially, domain names were restricted to ASCII characters.
++//! > A system was introduced in 2003 for internationalized domain names (IDN).
++//! > This system is called Internationalizing Domain Names for Applications,
++//! > or IDNA2003 for short.
++//! > This mechanism supports IDNs by means of a client software transformation
++//! > into a format known as Punycode.
++//! > A revision of IDNA was approved in 2010 (IDNA2008).
++//! > This revision has a number of incompatibilities with IDNA2003.
++//! >
++//! > The incompatibilities force implementers of client software,
++//! > such as browsers and emailers,
++//! > to face difficult choices during the transition period
++//! > as registries shift from IDNA2003 to IDNA2008.
++//! > This document specifies a mechanism
++//! > that minimizes the impact of this transition for client software,
++//! > allowing client software to access domains that are valid under either system.
++
++#[macro_use] extern crate matches;
++extern crate unicode_bidi;
++extern crate unicode_normalization;
++
++pub mod punycode;
++pub mod uts46;
++
++/// The [domain to ASCII](https://url.spec.whatwg.org/#concept-domain-to-ascii) algorithm.
++///
++/// Return the ASCII representation a domain name,
++/// normalizing characters (upper-case to lower-case and other kinds of equivalence)
++/// and using Punycode as necessary.
++///
++/// This process may fail.
++pub fn domain_to_ascii(domain: &str) -> Result<String, uts46::Errors> {
++    uts46::to_ascii(domain, uts46::Flags {
++        use_std3_ascii_rules: false,
++        transitional_processing: true, // XXX: switch when Firefox does
++        verify_dns_length: false,
++    })
++}
++
++/// The [domain to Unicode](https://url.spec.whatwg.org/#concept-domain-to-unicode) algorithm.
++///
++/// Return the Unicode representation of a domain name,
++/// normalizing characters (upper-case to lower-case and other kinds of equivalence)
++/// and decoding Punycode as necessary.
++///
++/// This may indicate [syntax violations](https://url.spec.whatwg.org/#syntax-violation)
++/// but always returns a string for the mapped domain.
++pub fn domain_to_unicode(domain: &str) -> (String, Result<(), uts46::Errors>) {
++    uts46::to_unicode(domain, uts46::Flags {
++        use_std3_ascii_rules: false,
++
++        // Unused:
++        transitional_processing: true,
++        verify_dns_length: false,
++    })
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1a977443366c8561195054404b1e655947ab0bc0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,139 @@@
++# Copyright 2013-2014 The rust-url developers.
++#
++# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++# option. This file may not be copied, modified, or distributed
++# except according to those terms.
++
++# Run as: python make_uts46_mapping_table.py IdnaMappingTable.txt > uts46_mapping_table.rs
++# You can get the latest idna table from
++# http://www.unicode.org/Public/idna/latest/IdnaMappingTable.txt
++
++import collections
++import itertools
++
++print('''\
++// Copyright 2013-2014 The rust-url developers.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++// Generated by make_idna_table.py
++
++static TABLE: &'static [Range] = &[
++''')
++
++txt = open("IdnaMappingTable.txt")
++
++def escape_char(c):
++    return "\\u{%x}" % ord(c[0])
++
++def char(s):
++    return unichr(int(s, 16))
++
++strtab = collections.OrderedDict()
++strtab_offset = 0
++
++def strtab_slice(s):
++    global strtab, strtab_offset
++
++    if s in strtab:
++        return strtab[s]
++    else:
++        utf8_len = len(s.encode('utf8'))
++        c = (strtab_offset, utf8_len)
++        strtab[s] = c
++        strtab_offset += utf8_len
++        return c
++
++def rust_slice(s):
++    start = s[0]
++    length = s[1]
++    start_lo = start & 0xff
++    start_hi = start >> 8
++    assert length <= 255
++    assert start_hi <= 255
++    return "(StringTableSlice { byte_start_lo: %d, byte_start_hi: %d, byte_len: %d })" % (start_lo, start_hi, length)
++
++ranges = []
++
++for line in txt:
++    # remove comments
++    line, _, _ = line.partition('#')
++    # skip empty lines
++    if len(line.strip()) == 0:
++        continue
++    fields = line.split(';')
++    if fields[0].strip() == 'D800..DFFF':
++        continue  # Surrogates don't occur in Rust strings.
++    first, _, last = fields[0].strip().partition('..')
++    if not last:
++        last = first
++    mapping = fields[1].strip().replace('_', ' ').title().replace(' ', '')
++    unicode_str = None
++    if len(fields) > 2:
++        if fields[2].strip():
++            unicode_str = u''.join(char(c) for c in fields[2].strip().split(' '))
++        elif mapping == "Deviation":
++            unicode_str = u''
++    ranges.append((first, last, mapping, unicode_str))
++
++def mergeable_key(r):
++    mapping = r[2]
++    # These types have associated data, so we should not merge them.
++    if mapping in ('Mapped', 'Deviation', 'DisallowedStd3Mapped'):
++        return r
++    assert mapping in ('Valid', 'Ignored', 'Disallowed', 'DisallowedStd3Valid')
++    return mapping
++
++grouped_ranges = itertools.groupby(ranges, key=mergeable_key)
++
++optimized_ranges = []
++
++for (k, g) in grouped_ranges:
++    group = list(g)
++    if len(group) == 1:
++        optimized_ranges.append(group[0])
++        continue
++    # Assert that nothing in the group has an associated unicode string.
++    for g in group:
++        if g[3] is not None and len(g[3]) > 2:
++            assert not g[3][2].strip()
++    # Assert that consecutive members of the group don't leave gaps in
++    # the codepoint space.
++    a, b = itertools.tee(group)
++    next(b, None)
++    for (g1, g2) in itertools.izip(a, b):
++        last_char = int(g1[1], 16)
++        next_char = int(g2[0], 16)
++        if last_char + 1 == next_char:
++            continue
++        # There's a gap where surrogates would appear, but we don't have to
++        # worry about that gap, as surrogates never appear in Rust strings.
++        # Assert we're seeing the surrogate case here.
++        assert last_char == 0xd7ff
++        assert next_char == 0xe000
++    first = group[0][0]
++    last = group[-1][1]
++    mapping = group[0][2]
++    unicode_str = group[0][3]
++    optimized_ranges.append((first, last, mapping, unicode_str))
++
++for (first, last, mapping, unicode_str) in optimized_ranges:
++    if unicode_str is not None:
++        mapping += rust_slice(strtab_slice(unicode_str))
++    print("    Range { from: '%s', to: '%s', mapping: %s }," % (escape_char(char(first)),
++                                                                escape_char(char(last)),
++                                                                mapping))
++
++print("];\n")
++
++def escape_str(s):
++    return [escape_char(c) for c in s]
++
++print("static STRING_TABLE: &'static str = \"%s\";"
++      % '\\\n  '.join(itertools.chain(*[escape_str(s) for s in strtab.iterkeys()])))
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..75bb1d6e8b77df8ae09922e76c3df956f5cbca48
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,212 @@@
++// Copyright 2013 The rust-url developers.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Punycode ([RFC 3492](http://tools.ietf.org/html/rfc3492)) implementation.
++//!
++//! Since Punycode fundamentally works on unicode code points,
++//! `encode` and `decode` take and return slices and vectors of `char`.
++//! `encode_str` and `decode_to_string` provide convenience wrappers
++//! that convert from and to Rust’s UTF-8 based `str` and `String` types.
++
++use std::u32;
++use std::char;
++use std::ascii::AsciiExt;
++
++// Bootstring parameters for Punycode
++static BASE: u32 = 36;
++static T_MIN: u32 = 1;
++static T_MAX: u32 = 26;
++static SKEW: u32 = 38;
++static DAMP: u32 = 700;
++static INITIAL_BIAS: u32 = 72;
++static INITIAL_N: u32 = 0x80;
++static DELIMITER: char = '-';
++
++
++#[inline]
++fn adapt(mut delta: u32, num_points: u32, first_time: bool) -> u32 {
++    delta /= if first_time { DAMP } else { 2 };
++    delta += delta / num_points;
++    let mut k = 0;
++    while delta > ((BASE - T_MIN) * T_MAX) / 2 {
++        delta /= BASE - T_MIN;
++        k += BASE;
++    }
++    k + (((BASE - T_MIN + 1) * delta) / (delta + SKEW))
++}
++
++
++/// Convert Punycode to an Unicode `String`.
++///
++/// This is a convenience wrapper around `decode`.
++#[inline]
++pub fn decode_to_string(input: &str) -> Option<String> {
++    decode(input).map(|chars| chars.into_iter().collect())
++}
++
++
++/// Convert Punycode to Unicode.
++///
++/// Return None on malformed input or overflow.
++/// Overflow can only happen on inputs that take more than
++/// 63 encoded bytes, the DNS limit on domain name labels.
++pub fn decode(input: &str) -> Option<Vec<char>> {
++    // Handle "basic" (ASCII) code points.
++    // They are encoded as-is before the last delimiter, if any.
++    let (mut output, input) = match input.rfind(DELIMITER) {
++        None => (Vec::new(), input),
++        Some(position) => (
++            input[..position].chars().collect(),
++            if position > 0 { &input[position + 1..] } else { input }
++        )
++    };
++    let mut code_point = INITIAL_N;
++    let mut bias = INITIAL_BIAS;
++    let mut i = 0;
++    let mut iter = input.bytes();
++    loop {
++        let previous_i = i;
++        let mut weight = 1;
++        let mut k = BASE;
++        let mut byte = match iter.next() {
++            None => break,
++            Some(byte) => byte,
++        };
++        // Decode a generalized variable-length integer into delta,
++        // which gets added to i.
++        loop {
++            let digit = match byte {
++                byte @ b'0' ... b'9' => byte - b'0' + 26,
++                byte @ b'A' ... b'Z' => byte - b'A',
++                byte @ b'a' ... b'z' => byte - b'a',
++                _ => return None
++            } as u32;
++            if digit > (u32::MAX - i) / weight {
++                return None  // Overflow
++            }
++            i += digit * weight;
++            let t = if k <= bias { T_MIN }
++                    else if k >= bias + T_MAX { T_MAX }
++                    else { k - bias };
++            if digit < t {
++                break
++            }
++            if weight > u32::MAX / (BASE - t) {
++                return None  // Overflow
++            }
++            weight *= BASE - t;
++            k += BASE;
++            byte = match iter.next() {
++                None => return None,  // End of input before the end of this delta
++                Some(byte) => byte,
++            };
++        }
++        let length = output.len() as u32;
++        bias = adapt(i - previous_i, length + 1, previous_i == 0);
++        if i / (length + 1) > u32::MAX - code_point {
++            return None  // Overflow
++        }
++        // i was supposed to wrap around from length+1 to 0,
++        // incrementing code_point each time.
++        code_point += i / (length + 1);
++        i %= length + 1;
++        let c = match char::from_u32(code_point) {
++            Some(c) => c,
++            None => return None
++        };
++        output.insert(i as usize, c);
++        i += 1;
++    }
++    Some(output)
++}
++
++
++/// Convert an Unicode `str` to Punycode.
++///
++/// This is a convenience wrapper around `encode`.
++#[inline]
++pub fn encode_str(input: &str) -> Option<String> {
++    encode(&input.chars().collect::<Vec<char>>())
++}
++
++
++/// Convert Unicode to Punycode.
++///
++/// Return None on overflow, which can only happen on inputs that would take more than
++/// 63 encoded bytes, the DNS limit on domain name labels.
++pub fn encode(input: &[char]) -> Option<String> {
++    // Handle "basic" (ASCII) code points. They are encoded as-is.
++    let output_bytes = input.iter().filter_map(|&c|
++        if c.is_ascii() { Some(c as u8) } else { None }
++    ).collect();
++    let mut output = unsafe { String::from_utf8_unchecked(output_bytes) };
++    let basic_length = output.len() as u32;
++    if basic_length > 0 {
++        output.push_str("-")
++    }
++    let mut code_point = INITIAL_N;
++    let mut delta = 0;
++    let mut bias = INITIAL_BIAS;
++    let mut processed = basic_length;
++    let input_length = input.len() as u32;
++    while processed < input_length {
++        // All code points < code_point have been handled already.
++        // Find the next larger one.
++        let min_code_point = input.iter().map(|&c| c as u32)
++                                  .filter(|&c| c >= code_point).min().unwrap();
++        if min_code_point - code_point > (u32::MAX - delta) / (processed + 1) {
++            return None  // Overflow
++        }
++        // Increase delta to advance the decoder’s <code_point,i> state to <min_code_point,0>
++        delta += (min_code_point - code_point) * (processed + 1);
++        code_point = min_code_point;
++        for &c in input {
++            let c = c as u32;
++            if c < code_point {
++                delta += 1;
++                if delta == 0 {
++                    return None  // Overflow
++                }
++            }
++            if c == code_point {
++                // Represent delta as a generalized variable-length integer:
++                let mut q = delta;
++                let mut k = BASE;
++                loop {
++                    let t = if k <= bias { T_MIN }
++                            else if k >= bias + T_MAX { T_MAX }
++                            else { k - bias };
++                    if q < t {
++                        break
++                    }
++                    let value = t + ((q - t) % (BASE - t));
++                    output.push(value_to_digit(value));
++                    q = (q - t) / (BASE - t);
++                    k += BASE;
++                }
++                output.push(value_to_digit(q));
++                bias = adapt(delta, processed + 1, processed == basic_length);
++                delta = 0;
++                processed += 1;
++            }
++        }
++        delta += 1;
++        code_point += 1;
++    }
++    Some(output)
++}
++
++
++#[inline]
++fn value_to_digit(value: u32) -> char {
++    match value {
++        0 ... 25 => (value as u8 + 'a' as u8) as char,  // a..z
++        26 ... 35 => (value as u8 - 26 + '0' as u8) as char,  // 0..9
++        _ => panic!()
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7115bd8ff712b5607a3b3e4421bb16c790d8a02d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,415 @@@
++// Copyright 2013-2014 The rust-url developers.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! [*Unicode IDNA Compatibility Processing*
++//! (Unicode Technical Standard #46)](http://www.unicode.org/reports/tr46/)
++
++use self::Mapping::*;
++use punycode;
++use std::ascii::AsciiExt;
++use std::cmp::Ordering::{Equal, Less, Greater};
++use unicode_bidi::{BidiClass, bidi_class};
++use unicode_normalization::UnicodeNormalization;
++use unicode_normalization::char::is_combining_mark;
++
++include!("uts46_mapping_table.rs");
++
++
++pub static PUNYCODE_PREFIX: &'static str = "xn--";
++
++
++#[derive(Debug)]
++struct StringTableSlice {
++    // Store these as separate fields so the structure will have an
++    // alignment of 1 and thus pack better into the Mapping enum, below.
++    byte_start_lo: u8,
++    byte_start_hi: u8,
++    byte_len: u8,
++}
++
++fn decode_slice(slice: &StringTableSlice) -> &'static str {
++    let lo = slice.byte_start_lo as usize;
++    let hi = slice.byte_start_hi as usize;
++    let start = (hi << 8) | lo;
++    let len = slice.byte_len as usize;
++    &STRING_TABLE[start..(start + len)]
++}
++
++#[repr(u8)]
++#[derive(Debug)]
++enum Mapping {
++    Valid,
++    Ignored,
++    Mapped(StringTableSlice),
++    Deviation(StringTableSlice),
++    Disallowed,
++    DisallowedStd3Valid,
++    DisallowedStd3Mapped(StringTableSlice),
++}
++
++struct Range {
++    from: char,
++    to: char,
++    mapping: Mapping,
++}
++
++fn find_char(codepoint: char) -> &'static Mapping {
++    let r = TABLE.binary_search_by(|ref range| {
++        if codepoint > range.to {
++            Less
++        } else if codepoint < range.from {
++            Greater
++        } else {
++            Equal
++        }
++    });
++    r.ok().map(|i| &TABLE[i].mapping).unwrap()
++}
++
++fn map_char(codepoint: char, flags: Flags, output: &mut String, errors: &mut Vec<Error>) {
++    match *find_char(codepoint) {
++        Mapping::Valid => output.push(codepoint),
++        Mapping::Ignored => {},
++        Mapping::Mapped(ref slice) => output.push_str(decode_slice(slice)),
++        Mapping::Deviation(ref slice) => {
++            if flags.transitional_processing {
++                output.push_str(decode_slice(slice))
++            } else {
++                output.push(codepoint)
++            }
++        }
++        Mapping::Disallowed => {
++            errors.push(Error::DissallowedCharacter);
++            output.push(codepoint);
++        }
++        Mapping::DisallowedStd3Valid => {
++            if flags.use_std3_ascii_rules {
++                errors.push(Error::DissallowedByStd3AsciiRules);
++            }
++            output.push(codepoint)
++        }
++        Mapping::DisallowedStd3Mapped(ref slice) => {
++            if flags.use_std3_ascii_rules {
++                errors.push(Error::DissallowedMappedInStd3);
++            }
++            output.push_str(decode_slice(slice))
++        }
++    }
++}
++
++// http://tools.ietf.org/html/rfc5893#section-2
++fn passes_bidi(label: &str, is_bidi_domain: bool) -> bool {
++    // Rule 0: Bidi Rules apply to Bidi Domain Names: a name with at least one RTL label.  A label
++    // is RTL if it contains at least one character of bidi class R, AL or AN.
++    if !is_bidi_domain {
++        return true;
++    }
++
++    let mut chars = label.chars();
++    let first_char_class = match chars.next() {
++        Some(c) => bidi_class(c),
++        None => return true, // empty string
++    };
++
++    match first_char_class {
++        // LTR label
++        BidiClass::L => {
++            // Rule 5
++            loop {
++                match chars.next() {
++                    Some(c) => {
++                        if !matches!(bidi_class(c),
++                                     BidiClass::L | BidiClass::EN |
++                                     BidiClass::ES | BidiClass::CS |
++                                     BidiClass::ET | BidiClass::ON |
++                                     BidiClass::BN | BidiClass::NSM
++                                    ) {
++                            return false;
++                        }
++                    },
++                    None => { break; },
++                }
++            }
++
++            // Rule 6
++            // must end in L or EN followed by 0 or more NSM
++            let mut rev_chars = label.chars().rev();
++            let mut last_non_nsm = rev_chars.next();
++            loop {
++                match last_non_nsm {
++                    Some(c) if bidi_class(c) == BidiClass::NSM => {
++                        last_non_nsm = rev_chars.next();
++                        continue;
++                    }
++                    _ => { break; },
++                }
++            }
++            match last_non_nsm {
++                Some(c) if bidi_class(c) == BidiClass::L
++                    || bidi_class(c) == BidiClass::EN => {},
++                Some(_) => { return false; },
++                _ => {}
++            }
++
++        }
++
++        // RTL label
++        BidiClass::R | BidiClass::AL => {
++            let mut found_en = false;
++            let mut found_an = false;
++
++            // Rule 2
++            loop {
++                match chars.next() {
++                    Some(c) => {
++                        let char_class = bidi_class(c);
++
++                        if char_class == BidiClass::EN {
++                            found_en = true;
++                        }
++                        if char_class == BidiClass::AN {
++                            found_an = true;
++                        }
++
++                        if !matches!(char_class, BidiClass::R | BidiClass::AL |
++                                     BidiClass::AN | BidiClass::EN |
++                                     BidiClass::ES | BidiClass::CS |
++                                     BidiClass::ET | BidiClass::ON |
++                                     BidiClass::BN | BidiClass::NSM) {
++                            return false;
++                        }
++                    },
++                    None => { break; },
++                }
++            }
++            // Rule 3
++            let mut rev_chars = label.chars().rev();
++            let mut last = rev_chars.next();
++            loop { // must end in L or EN followed by 0 or more NSM
++                match last {
++                    Some(c) if bidi_class(c) == BidiClass::NSM => {
++                        last = rev_chars.next();
++                        continue;
++                    }
++                    _ => { break; },
++                }
++            }
++            match last {
++                Some(c) if matches!(bidi_class(c), BidiClass::R | BidiClass::AL |
++                                    BidiClass::EN | BidiClass::AN) => {},
++                _ => { return false; }
++            }
++
++            // Rule 4
++            if found_an && found_en {
++                return false;
++            }
++        }
++
++        // Rule 1: Should start with L or R/AL
++        _ => {
++            return false;
++        }
++    }
++
++    return true;
++}
++
++/// http://www.unicode.org/reports/tr46/#Validity_Criteria
++fn validate(label: &str, is_bidi_domain: bool, flags: Flags, errors: &mut Vec<Error>) {
++    let first_char = label.chars().next();
++    if first_char == None {
++        // Empty string, pass
++    }
++
++    // V1: Must be in NFC form.
++    else if label.nfc().ne(label.chars()) {
++        errors.push(Error::ValidityCriteria);
++    }
++
++    // V2: No U+002D HYPHEN-MINUS in both third and fourth positions.
++    //
++    // NOTE: Spec says that the label must not contain a HYPHEN-MINUS character in both the
++    // third and fourth positions. But nobody follows this criteria. See the spec issue below:
++    // https://github.com/whatwg/url/issues/53
++    //
++    // TODO: Add *CheckHyphens* flag.
++
++    // V3: neither begin nor end with a U+002D HYPHEN-MINUS
++    else if label.starts_with("-") || label.ends_with("-") {
++        errors.push(Error::ValidityCriteria);
++    }
++
++    // V4: not contain a U+002E FULL STOP
++    //
++    // Here, label can't contain '.' since the input is from .split('.')
++
++    // V5: not begin with a GC=Mark
++    else if is_combining_mark(first_char.unwrap()) {
++        errors.push(Error::ValidityCriteria);
++    }
++
++    // V6: Check against Mapping Table
++    else if label.chars().any(|c| match *find_char(c) {
++        Mapping::Valid => false,
++        Mapping::Deviation(_) => flags.transitional_processing,
++        Mapping::DisallowedStd3Valid => flags.use_std3_ascii_rules,
++        _ => true,
++    }) {
++        errors.push(Error::ValidityCriteria);
++    }
++
++    // V7: ContextJ rules
++    //
++    // TODO: Implement rules and add *CheckJoiners* flag.
++
++    // V8: Bidi rules
++    //
++    // TODO: Add *CheckBidi* flag
++    else if !passes_bidi(label, is_bidi_domain)
++    {
++        errors.push(Error::ValidityCriteria);
++    }
++}
++
++/// http://www.unicode.org/reports/tr46/#Processing
++fn processing(domain: &str, flags: Flags, errors: &mut Vec<Error>) -> String {
++    let mut mapped = String::new();
++    for c in domain.chars() {
++        map_char(c, flags, &mut mapped, errors)
++    }
++    let normalized: String = mapped.nfc().collect();
++
++    // Find out if it's a Bidi Domain Name
++    //
++    // First, check for literal bidi chars
++    let mut is_bidi_domain = domain.chars().any(|c|
++        matches!(bidi_class(c), BidiClass::R | BidiClass::AL | BidiClass::AN)
++    );
++    if !is_bidi_domain {
++        // Then check for punycode-encoded bidi chars
++        for label in normalized.split('.') {
++            if label.starts_with(PUNYCODE_PREFIX) {
++                match punycode::decode_to_string(&label[PUNYCODE_PREFIX.len()..]) {
++                    Some(decoded_label) => {
++                        if decoded_label.chars().any(|c|
++                            matches!(bidi_class(c), BidiClass::R | BidiClass::AL | BidiClass::AN)
++                        ) {
++                            is_bidi_domain = true;
++                        }
++                    }
++                    None => {
++                        is_bidi_domain = true;
++                    }
++                }
++            }
++        }
++    }
++
++    let mut validated = String::new();
++    let mut first = true;
++    for label in normalized.split('.') {
++        if !first {
++            validated.push('.');
++        }
++        first = false;
++        if label.starts_with(PUNYCODE_PREFIX) {
++            match punycode::decode_to_string(&label[PUNYCODE_PREFIX.len()..]) {
++                Some(decoded_label) => {
++                    let flags = Flags { transitional_processing: false, ..flags };
++                    validate(&decoded_label, is_bidi_domain, flags, errors);
++                    validated.push_str(&decoded_label)
++                }
++                None => errors.push(Error::PunycodeError)
++            }
++        } else {
++            validate(label, is_bidi_domain, flags, errors);
++            validated.push_str(label)
++        }
++    }
++    validated
++}
++
++#[derive(Copy, Clone)]
++pub struct Flags {
++   pub use_std3_ascii_rules: bool,
++   pub transitional_processing: bool,
++   pub verify_dns_length: bool,
++}
++
++#[derive(PartialEq, Eq, Clone, Copy, Debug)]
++enum Error {
++    PunycodeError,
++    ValidityCriteria,
++    DissallowedByStd3AsciiRules,
++    DissallowedMappedInStd3,
++    DissallowedCharacter,
++    TooLongForDns,
++    TooShortForDns,
++}
++
++/// Errors recorded during UTS #46 processing.
++///
++/// This is opaque for now, only indicating the presence of at least one error.
++/// More details may be exposed in the future.
++#[derive(Debug)]
++pub struct Errors(Vec<Error>);
++
++/// http://www.unicode.org/reports/tr46/#ToASCII
++pub fn to_ascii(domain: &str, flags: Flags) -> Result<String, Errors> {
++    let mut errors = Vec::new();
++    let mut result = String::new();
++    let mut first = true;
++    for label in processing(domain, flags, &mut errors).split('.') {
++        if !first {
++            result.push('.');
++        }
++        first = false;
++        if label.is_ascii() {
++            result.push_str(label);
++        } else {
++            match punycode::encode_str(label) {
++                Some(x) => {
++                    result.push_str(PUNYCODE_PREFIX);
++                    result.push_str(&x);
++                },
++                None => errors.push(Error::PunycodeError)
++            }
++        }
++    }
++
++    if flags.verify_dns_length {
++        let domain = if result.ends_with(".") { &result[..result.len()-1]  } else { &*result };
++        if domain.len() < 1 || domain.split('.').any(|label| label.len() < 1) {
++            errors.push(Error::TooShortForDns)
++        }
++        if domain.len() > 253 || domain.split('.').any(|label| label.len() > 63) {
++            errors.push(Error::TooLongForDns)
++        }
++    }
++    if errors.is_empty() {
++        Ok(result)
++    } else {
++        Err(Errors(errors))
++    }
++}
++
++/// http://www.unicode.org/reports/tr46/#ToUnicode
++///
++/// Only `use_std3_ascii_rules` is used in `flags`.
++pub fn to_unicode(domain: &str, mut flags: Flags) -> (String, Result<(), Errors>) {
++    flags.transitional_processing = false;
++    let mut errors = Vec::new();
++    let domain = processing(domain, flags, &mut errors);
++    let errors = if errors.is_empty() {
++        Ok(())
++    } else {
++        Err(Errors(errors))
++    };
++    (domain, errors)
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4801e6a44c19982eb8d20f0c70e77f1923c0ccf4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12844 @@@
++// Copyright 2013-2014 The rust-url developers.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++// Generated by make_idna_table.py
++
++static TABLE: &'static [Range] = &[
++
++    Range { from: '\u{0}', to: '\u{2c}', mapping: DisallowedStd3Valid },
++    Range { from: '\u{2d}', to: '\u{2e}', mapping: Valid },
++    Range { from: '\u{2f}', to: '\u{2f}', mapping: DisallowedStd3Valid },
++    Range { from: '\u{30}', to: '\u{39}', mapping: Valid },
++    Range { from: '\u{3a}', to: '\u{40}', mapping: DisallowedStd3Valid },
++    Range { from: '\u{41}', to: '\u{41}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{42}', to: '\u{42}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{43}', to: '\u{43}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{44}', to: '\u{44}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{45}', to: '\u{45}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{46}', to: '\u{46}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{47}', to: '\u{47}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{48}', to: '\u{48}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{49}', to: '\u{49}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{4a}', to: '\u{4a}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{4b}', to: '\u{4b}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{4c}', to: '\u{4c}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{4d}', to: '\u{4d}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{4e}', to: '\u{4e}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{4f}', to: '\u{4f}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{50}', to: '\u{50}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{51}', to: '\u{51}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{52}', to: '\u{52}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{53}', to: '\u{53}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{54}', to: '\u{54}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{55}', to: '\u{55}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{56}', to: '\u{56}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{57}', to: '\u{57}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{58}', to: '\u{58}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{59}', to: '\u{59}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{5a}', to: '\u{5a}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{5b}', to: '\u{60}', mapping: DisallowedStd3Valid },
++    Range { from: '\u{61}', to: '\u{7a}', mapping: Valid },
++    Range { from: '\u{7b}', to: '\u{7f}', mapping: DisallowedStd3Valid },
++    Range { from: '\u{80}', to: '\u{9f}', mapping: Disallowed },
++    Range { from: '\u{a0}', to: '\u{a0}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{a1}', to: '\u{a7}', mapping: Valid },
++    Range { from: '\u{a8}', to: '\u{a8}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 27, byte_start_hi: 0, byte_len: 3 }) },
++    Range { from: '\u{a9}', to: '\u{a9}', mapping: Valid },
++    Range { from: '\u{aa}', to: '\u{aa}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ab}', to: '\u{ac}', mapping: Valid },
++    Range { from: '\u{ad}', to: '\u{ad}', mapping: Ignored },
++    Range { from: '\u{ae}', to: '\u{ae}', mapping: Valid },
++    Range { from: '\u{af}', to: '\u{af}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 0, byte_len: 3 }) },
++    Range { from: '\u{b0}', to: '\u{b1}', mapping: Valid },
++    Range { from: '\u{b2}', to: '\u{b2}', mapping: Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{b3}', to: '\u{b3}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{b4}', to: '\u{b4}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 35, byte_start_hi: 0, byte_len: 3 }) },
++    Range { from: '\u{b5}', to: '\u{b5}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{b6}', to: '\u{b7}', mapping: Valid },
++    Range { from: '\u{b8}', to: '\u{b8}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 0, byte_len: 3 }) },
++    Range { from: '\u{b9}', to: '\u{b9}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ba}', to: '\u{ba}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{bb}', to: '\u{bb}', mapping: Valid },
++    Range { from: '\u{bc}', to: '\u{bc}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 0, byte_len: 5 }) },
++    Range { from: '\u{bd}', to: '\u{bd}', mapping: Mapped(StringTableSlice { byte_start_lo: 49, byte_start_hi: 0, byte_len: 5 }) },
++    Range { from: '\u{be}', to: '\u{be}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 0, byte_len: 5 }) },
++    Range { from: '\u{bf}', to: '\u{bf}', mapping: Valid },
++    Range { from: '\u{c0}', to: '\u{c0}', mapping: Mapped(StringTableSlice { byte_start_lo: 59, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{c1}', to: '\u{c1}', mapping: Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{c2}', to: '\u{c2}', mapping: Mapped(StringTableSlice { byte_start_lo: 63, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{c3}', to: '\u{c3}', mapping: Mapped(StringTableSlice { byte_start_lo: 65, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{c4}', to: '\u{c4}', mapping: Mapped(StringTableSlice { byte_start_lo: 67, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{c5}', to: '\u{c5}', mapping: Mapped(StringTableSlice { byte_start_lo: 69, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{c6}', to: '\u{c6}', mapping: Mapped(StringTableSlice { byte_start_lo: 71, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{c7}', to: '\u{c7}', mapping: Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{c8}', to: '\u{c8}', mapping: Mapped(StringTableSlice { byte_start_lo: 75, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{c9}', to: '\u{c9}', mapping: Mapped(StringTableSlice { byte_start_lo: 77, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{ca}', to: '\u{ca}', mapping: Mapped(StringTableSlice { byte_start_lo: 79, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{cb}', to: '\u{cb}', mapping: Mapped(StringTableSlice { byte_start_lo: 81, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{cc}', to: '\u{cc}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{cd}', to: '\u{cd}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{ce}', to: '\u{ce}', mapping: Mapped(StringTableSlice { byte_start_lo: 87, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{cf}', to: '\u{cf}', mapping: Mapped(StringTableSlice { byte_start_lo: 89, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{d0}', to: '\u{d0}', mapping: Mapped(StringTableSlice { byte_start_lo: 91, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{d1}', to: '\u{d1}', mapping: Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{d2}', to: '\u{d2}', mapping: Mapped(StringTableSlice { byte_start_lo: 95, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{d3}', to: '\u{d3}', mapping: Mapped(StringTableSlice { byte_start_lo: 97, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{d4}', to: '\u{d4}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{d5}', to: '\u{d5}', mapping: Mapped(StringTableSlice { byte_start_lo: 101, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{d6}', to: '\u{d6}', mapping: Mapped(StringTableSlice { byte_start_lo: 103, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{d7}', to: '\u{d7}', mapping: Valid },
++    Range { from: '\u{d8}', to: '\u{d8}', mapping: Mapped(StringTableSlice { byte_start_lo: 105, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{d9}', to: '\u{d9}', mapping: Mapped(StringTableSlice { byte_start_lo: 107, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{da}', to: '\u{da}', mapping: Mapped(StringTableSlice { byte_start_lo: 109, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{db}', to: '\u{db}', mapping: Mapped(StringTableSlice { byte_start_lo: 111, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{dc}', to: '\u{dc}', mapping: Mapped(StringTableSlice { byte_start_lo: 113, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{dd}', to: '\u{dd}', mapping: Mapped(StringTableSlice { byte_start_lo: 115, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{de}', to: '\u{de}', mapping: Mapped(StringTableSlice { byte_start_lo: 117, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{df}', to: '\u{df}', mapping: Deviation(StringTableSlice { byte_start_lo: 119, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{e0}', to: '\u{ff}', mapping: Valid },
++    Range { from: '\u{100}', to: '\u{100}', mapping: Mapped(StringTableSlice { byte_start_lo: 121, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{101}', to: '\u{101}', mapping: Valid },
++    Range { from: '\u{102}', to: '\u{102}', mapping: Mapped(StringTableSlice { byte_start_lo: 123, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{103}', to: '\u{103}', mapping: Valid },
++    Range { from: '\u{104}', to: '\u{104}', mapping: Mapped(StringTableSlice { byte_start_lo: 125, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{105}', to: '\u{105}', mapping: Valid },
++    Range { from: '\u{106}', to: '\u{106}', mapping: Mapped(StringTableSlice { byte_start_lo: 127, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{107}', to: '\u{107}', mapping: Valid },
++    Range { from: '\u{108}', to: '\u{108}', mapping: Mapped(StringTableSlice { byte_start_lo: 129, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{109}', to: '\u{109}', mapping: Valid },
++    Range { from: '\u{10a}', to: '\u{10a}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{10b}', to: '\u{10b}', mapping: Valid },
++    Range { from: '\u{10c}', to: '\u{10c}', mapping: Mapped(StringTableSlice { byte_start_lo: 133, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{10d}', to: '\u{10d}', mapping: Valid },
++    Range { from: '\u{10e}', to: '\u{10e}', mapping: Mapped(StringTableSlice { byte_start_lo: 135, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{10f}', to: '\u{10f}', mapping: Valid },
++    Range { from: '\u{110}', to: '\u{110}', mapping: Mapped(StringTableSlice { byte_start_lo: 137, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{111}', to: '\u{111}', mapping: Valid },
++    Range { from: '\u{112}', to: '\u{112}', mapping: Mapped(StringTableSlice { byte_start_lo: 139, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{113}', to: '\u{113}', mapping: Valid },
++    Range { from: '\u{114}', to: '\u{114}', mapping: Mapped(StringTableSlice { byte_start_lo: 141, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{115}', to: '\u{115}', mapping: Valid },
++    Range { from: '\u{116}', to: '\u{116}', mapping: Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{117}', to: '\u{117}', mapping: Valid },
++    Range { from: '\u{118}', to: '\u{118}', mapping: Mapped(StringTableSlice { byte_start_lo: 145, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{119}', to: '\u{119}', mapping: Valid },
++    Range { from: '\u{11a}', to: '\u{11a}', mapping: Mapped(StringTableSlice { byte_start_lo: 147, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{11b}', to: '\u{11b}', mapping: Valid },
++    Range { from: '\u{11c}', to: '\u{11c}', mapping: Mapped(StringTableSlice { byte_start_lo: 149, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{11d}', to: '\u{11d}', mapping: Valid },
++    Range { from: '\u{11e}', to: '\u{11e}', mapping: Mapped(StringTableSlice { byte_start_lo: 151, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{11f}', to: '\u{11f}', mapping: Valid },
++    Range { from: '\u{120}', to: '\u{120}', mapping: Mapped(StringTableSlice { byte_start_lo: 153, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{121}', to: '\u{121}', mapping: Valid },
++    Range { from: '\u{122}', to: '\u{122}', mapping: Mapped(StringTableSlice { byte_start_lo: 155, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{123}', to: '\u{123}', mapping: Valid },
++    Range { from: '\u{124}', to: '\u{124}', mapping: Mapped(StringTableSlice { byte_start_lo: 157, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{125}', to: '\u{125}', mapping: Valid },
++    Range { from: '\u{126}', to: '\u{126}', mapping: Mapped(StringTableSlice { byte_start_lo: 159, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{127}', to: '\u{127}', mapping: Valid },
++    Range { from: '\u{128}', to: '\u{128}', mapping: Mapped(StringTableSlice { byte_start_lo: 161, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{129}', to: '\u{129}', mapping: Valid },
++    Range { from: '\u{12a}', to: '\u{12a}', mapping: Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{12b}', to: '\u{12b}', mapping: Valid },
++    Range { from: '\u{12c}', to: '\u{12c}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{12d}', to: '\u{12d}', mapping: Valid },
++    Range { from: '\u{12e}', to: '\u{12e}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{12f}', to: '\u{12f}', mapping: Valid },
++    Range { from: '\u{130}', to: '\u{130}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 0, byte_len: 3 }) },
++    Range { from: '\u{131}', to: '\u{131}', mapping: Valid },
++    Range { from: '\u{132}', to: '\u{133}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{134}', to: '\u{134}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{135}', to: '\u{135}', mapping: Valid },
++    Range { from: '\u{136}', to: '\u{136}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{137}', to: '\u{138}', mapping: Valid },
++    Range { from: '\u{139}', to: '\u{139}', mapping: Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{13a}', to: '\u{13a}', mapping: Valid },
++    Range { from: '\u{13b}', to: '\u{13b}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{13c}', to: '\u{13c}', mapping: Valid },
++    Range { from: '\u{13d}', to: '\u{13d}', mapping: Mapped(StringTableSlice { byte_start_lo: 182, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{13e}', to: '\u{13e}', mapping: Valid },
++    Range { from: '\u{13f}', to: '\u{140}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 0, byte_len: 3 }) },
++    Range { from: '\u{141}', to: '\u{141}', mapping: Mapped(StringTableSlice { byte_start_lo: 187, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{142}', to: '\u{142}', mapping: Valid },
++    Range { from: '\u{143}', to: '\u{143}', mapping: Mapped(StringTableSlice { byte_start_lo: 189, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{144}', to: '\u{144}', mapping: Valid },
++    Range { from: '\u{145}', to: '\u{145}', mapping: Mapped(StringTableSlice { byte_start_lo: 191, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{146}', to: '\u{146}', mapping: Valid },
++    Range { from: '\u{147}', to: '\u{147}', mapping: Mapped(StringTableSlice { byte_start_lo: 193, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{148}', to: '\u{148}', mapping: Valid },
++    Range { from: '\u{149}', to: '\u{149}', mapping: Mapped(StringTableSlice { byte_start_lo: 195, byte_start_hi: 0, byte_len: 3 }) },
++    Range { from: '\u{14a}', to: '\u{14a}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{14b}', to: '\u{14b}', mapping: Valid },
++    Range { from: '\u{14c}', to: '\u{14c}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{14d}', to: '\u{14d}', mapping: Valid },
++    Range { from: '\u{14e}', to: '\u{14e}', mapping: Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{14f}', to: '\u{14f}', mapping: Valid },
++    Range { from: '\u{150}', to: '\u{150}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{151}', to: '\u{151}', mapping: Valid },
++    Range { from: '\u{152}', to: '\u{152}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{153}', to: '\u{153}', mapping: Valid },
++    Range { from: '\u{154}', to: '\u{154}', mapping: Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{155}', to: '\u{155}', mapping: Valid },
++    Range { from: '\u{156}', to: '\u{156}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{157}', to: '\u{157}', mapping: Valid },
++    Range { from: '\u{158}', to: '\u{158}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{159}', to: '\u{159}', mapping: Valid },
++    Range { from: '\u{15a}', to: '\u{15a}', mapping: Mapped(StringTableSlice { byte_start_lo: 214, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{15b}', to: '\u{15b}', mapping: Valid },
++    Range { from: '\u{15c}', to: '\u{15c}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{15d}', to: '\u{15d}', mapping: Valid },
++    Range { from: '\u{15e}', to: '\u{15e}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{15f}', to: '\u{15f}', mapping: Valid },
++    Range { from: '\u{160}', to: '\u{160}', mapping: Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{161}', to: '\u{161}', mapping: Valid },
++    Range { from: '\u{162}', to: '\u{162}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{163}', to: '\u{163}', mapping: Valid },
++    Range { from: '\u{164}', to: '\u{164}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{165}', to: '\u{165}', mapping: Valid },
++    Range { from: '\u{166}', to: '\u{166}', mapping: Mapped(StringTableSlice { byte_start_lo: 226, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{167}', to: '\u{167}', mapping: Valid },
++    Range { from: '\u{168}', to: '\u{168}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{169}', to: '\u{169}', mapping: Valid },
++    Range { from: '\u{16a}', to: '\u{16a}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{16b}', to: '\u{16b}', mapping: Valid },
++    Range { from: '\u{16c}', to: '\u{16c}', mapping: Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{16d}', to: '\u{16d}', mapping: Valid },
++    Range { from: '\u{16e}', to: '\u{16e}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{16f}', to: '\u{16f}', mapping: Valid },
++    Range { from: '\u{170}', to: '\u{170}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{171}', to: '\u{171}', mapping: Valid },
++    Range { from: '\u{172}', to: '\u{172}', mapping: Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{173}', to: '\u{173}', mapping: Valid },
++    Range { from: '\u{174}', to: '\u{174}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{175}', to: '\u{175}', mapping: Valid },
++    Range { from: '\u{176}', to: '\u{176}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{177}', to: '\u{177}', mapping: Valid },
++    Range { from: '\u{178}', to: '\u{178}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{179}', to: '\u{179}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{17a}', to: '\u{17a}', mapping: Valid },
++    Range { from: '\u{17b}', to: '\u{17b}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{17c}', to: '\u{17c}', mapping: Valid },
++    Range { from: '\u{17d}', to: '\u{17d}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{17e}', to: '\u{17e}', mapping: Valid },
++    Range { from: '\u{17f}', to: '\u{17f}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{180}', to: '\u{180}', mapping: Valid },
++    Range { from: '\u{181}', to: '\u{181}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{182}', to: '\u{182}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{183}', to: '\u{183}', mapping: Valid },
++    Range { from: '\u{184}', to: '\u{184}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{185}', to: '\u{185}', mapping: Valid },
++    Range { from: '\u{186}', to: '\u{186}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{187}', to: '\u{187}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{188}', to: '\u{188}', mapping: Valid },
++    Range { from: '\u{189}', to: '\u{189}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{18a}', to: '\u{18a}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{18b}', to: '\u{18b}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{18c}', to: '\u{18d}', mapping: Valid },
++    Range { from: '\u{18e}', to: '\u{18e}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{18f}', to: '\u{18f}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{190}', to: '\u{190}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{191}', to: '\u{191}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{192}', to: '\u{192}', mapping: Valid },
++    Range { from: '\u{193}', to: '\u{193}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{194}', to: '\u{194}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{195}', to: '\u{195}', mapping: Valid },
++    Range { from: '\u{196}', to: '\u{196}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{197}', to: '\u{197}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{198}', to: '\u{198}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{199}', to: '\u{19b}', mapping: Valid },
++    Range { from: '\u{19c}', to: '\u{19c}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{19d}', to: '\u{19d}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{19e}', to: '\u{19e}', mapping: Valid },
++    Range { from: '\u{19f}', to: '\u{19f}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1a0}', to: '\u{1a0}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1a1}', to: '\u{1a1}', mapping: Valid },
++    Range { from: '\u{1a2}', to: '\u{1a2}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1a3}', to: '\u{1a3}', mapping: Valid },
++    Range { from: '\u{1a4}', to: '\u{1a4}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1a5}', to: '\u{1a5}', mapping: Valid },
++    Range { from: '\u{1a6}', to: '\u{1a6}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1a7}', to: '\u{1a7}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1a8}', to: '\u{1a8}', mapping: Valid },
++    Range { from: '\u{1a9}', to: '\u{1a9}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1aa}', to: '\u{1ab}', mapping: Valid },
++    Range { from: '\u{1ac}', to: '\u{1ac}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1ad}', to: '\u{1ad}', mapping: Valid },
++    Range { from: '\u{1ae}', to: '\u{1ae}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1af}', to: '\u{1af}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1b0}', to: '\u{1b0}', mapping: Valid },
++    Range { from: '\u{1b1}', to: '\u{1b1}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1b2}', to: '\u{1b2}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1b3}', to: '\u{1b3}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1b4}', to: '\u{1b4}', mapping: Valid },
++    Range { from: '\u{1b5}', to: '\u{1b5}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1b6}', to: '\u{1b6}', mapping: Valid },
++    Range { from: '\u{1b7}', to: '\u{1b7}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1b8}', to: '\u{1b8}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1b9}', to: '\u{1bb}', mapping: Valid },
++    Range { from: '\u{1bc}', to: '\u{1bc}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1bd}', to: '\u{1c3}', mapping: Valid },
++    Range { from: '\u{1c4}', to: '\u{1c6}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 1, byte_len: 3 }) },
++    Range { from: '\u{1c7}', to: '\u{1c9}', mapping: Mapped(StringTableSlice { byte_start_lo: 71, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1ca}', to: '\u{1cc}', mapping: Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1cd}', to: '\u{1cd}', mapping: Mapped(StringTableSlice { byte_start_lo: 75, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1ce}', to: '\u{1ce}', mapping: Valid },
++    Range { from: '\u{1cf}', to: '\u{1cf}', mapping: Mapped(StringTableSlice { byte_start_lo: 77, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d0}', to: '\u{1d0}', mapping: Valid },
++    Range { from: '\u{1d1}', to: '\u{1d1}', mapping: Mapped(StringTableSlice { byte_start_lo: 79, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d2}', to: '\u{1d2}', mapping: Valid },
++    Range { from: '\u{1d3}', to: '\u{1d3}', mapping: Mapped(StringTableSlice { byte_start_lo: 81, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d4}', to: '\u{1d4}', mapping: Valid },
++    Range { from: '\u{1d5}', to: '\u{1d5}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d6}', to: '\u{1d6}', mapping: Valid },
++    Range { from: '\u{1d7}', to: '\u{1d7}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d8}', to: '\u{1d8}', mapping: Valid },
++    Range { from: '\u{1d9}', to: '\u{1d9}', mapping: Mapped(StringTableSlice { byte_start_lo: 87, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1da}', to: '\u{1da}', mapping: Valid },
++    Range { from: '\u{1db}', to: '\u{1db}', mapping: Mapped(StringTableSlice { byte_start_lo: 89, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1dc}', to: '\u{1dd}', mapping: Valid },
++    Range { from: '\u{1de}', to: '\u{1de}', mapping: Mapped(StringTableSlice { byte_start_lo: 91, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1df}', to: '\u{1df}', mapping: Valid },
++    Range { from: '\u{1e0}', to: '\u{1e0}', mapping: Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1e1}', to: '\u{1e1}', mapping: Valid },
++    Range { from: '\u{1e2}', to: '\u{1e2}', mapping: Mapped(StringTableSlice { byte_start_lo: 95, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1e3}', to: '\u{1e3}', mapping: Valid },
++    Range { from: '\u{1e4}', to: '\u{1e4}', mapping: Mapped(StringTableSlice { byte_start_lo: 97, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1e5}', to: '\u{1e5}', mapping: Valid },
++    Range { from: '\u{1e6}', to: '\u{1e6}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1e7}', to: '\u{1e7}', mapping: Valid },
++    Range { from: '\u{1e8}', to: '\u{1e8}', mapping: Mapped(StringTableSlice { byte_start_lo: 101, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1e9}', to: '\u{1e9}', mapping: Valid },
++    Range { from: '\u{1ea}', to: '\u{1ea}', mapping: Mapped(StringTableSlice { byte_start_lo: 103, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1eb}', to: '\u{1eb}', mapping: Valid },
++    Range { from: '\u{1ec}', to: '\u{1ec}', mapping: Mapped(StringTableSlice { byte_start_lo: 105, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1ed}', to: '\u{1ed}', mapping: Valid },
++    Range { from: '\u{1ee}', to: '\u{1ee}', mapping: Mapped(StringTableSlice { byte_start_lo: 107, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1ef}', to: '\u{1f0}', mapping: Valid },
++    Range { from: '\u{1f1}', to: '\u{1f3}', mapping: Mapped(StringTableSlice { byte_start_lo: 109, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1f4}', to: '\u{1f4}', mapping: Mapped(StringTableSlice { byte_start_lo: 111, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1f5}', to: '\u{1f5}', mapping: Valid },
++    Range { from: '\u{1f6}', to: '\u{1f6}', mapping: Mapped(StringTableSlice { byte_start_lo: 113, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1f7}', to: '\u{1f7}', mapping: Mapped(StringTableSlice { byte_start_lo: 115, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1f8}', to: '\u{1f8}', mapping: Mapped(StringTableSlice { byte_start_lo: 117, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1f9}', to: '\u{1f9}', mapping: Valid },
++    Range { from: '\u{1fa}', to: '\u{1fa}', mapping: Mapped(StringTableSlice { byte_start_lo: 119, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1fb}', to: '\u{1fb}', mapping: Valid },
++    Range { from: '\u{1fc}', to: '\u{1fc}', mapping: Mapped(StringTableSlice { byte_start_lo: 121, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1fd}', to: '\u{1fd}', mapping: Valid },
++    Range { from: '\u{1fe}', to: '\u{1fe}', mapping: Mapped(StringTableSlice { byte_start_lo: 123, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1ff}', to: '\u{1ff}', mapping: Valid },
++    Range { from: '\u{200}', to: '\u{200}', mapping: Mapped(StringTableSlice { byte_start_lo: 125, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{201}', to: '\u{201}', mapping: Valid },
++    Range { from: '\u{202}', to: '\u{202}', mapping: Mapped(StringTableSlice { byte_start_lo: 127, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{203}', to: '\u{203}', mapping: Valid },
++    Range { from: '\u{204}', to: '\u{204}', mapping: Mapped(StringTableSlice { byte_start_lo: 129, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{205}', to: '\u{205}', mapping: Valid },
++    Range { from: '\u{206}', to: '\u{206}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{207}', to: '\u{207}', mapping: Valid },
++    Range { from: '\u{208}', to: '\u{208}', mapping: Mapped(StringTableSlice { byte_start_lo: 133, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{209}', to: '\u{209}', mapping: Valid },
++    Range { from: '\u{20a}', to: '\u{20a}', mapping: Mapped(StringTableSlice { byte_start_lo: 135, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{20b}', to: '\u{20b}', mapping: Valid },
++    Range { from: '\u{20c}', to: '\u{20c}', mapping: Mapped(StringTableSlice { byte_start_lo: 137, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{20d}', to: '\u{20d}', mapping: Valid },
++    Range { from: '\u{20e}', to: '\u{20e}', mapping: Mapped(StringTableSlice { byte_start_lo: 139, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{20f}', to: '\u{20f}', mapping: Valid },
++    Range { from: '\u{210}', to: '\u{210}', mapping: Mapped(StringTableSlice { byte_start_lo: 141, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{211}', to: '\u{211}', mapping: Valid },
++    Range { from: '\u{212}', to: '\u{212}', mapping: Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{213}', to: '\u{213}', mapping: Valid },
++    Range { from: '\u{214}', to: '\u{214}', mapping: Mapped(StringTableSlice { byte_start_lo: 145, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{215}', to: '\u{215}', mapping: Valid },
++    Range { from: '\u{216}', to: '\u{216}', mapping: Mapped(StringTableSlice { byte_start_lo: 147, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{217}', to: '\u{217}', mapping: Valid },
++    Range { from: '\u{218}', to: '\u{218}', mapping: Mapped(StringTableSlice { byte_start_lo: 149, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{219}', to: '\u{219}', mapping: Valid },
++    Range { from: '\u{21a}', to: '\u{21a}', mapping: Mapped(StringTableSlice { byte_start_lo: 151, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{21b}', to: '\u{21b}', mapping: Valid },
++    Range { from: '\u{21c}', to: '\u{21c}', mapping: Mapped(StringTableSlice { byte_start_lo: 153, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{21d}', to: '\u{21d}', mapping: Valid },
++    Range { from: '\u{21e}', to: '\u{21e}', mapping: Mapped(StringTableSlice { byte_start_lo: 155, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{21f}', to: '\u{21f}', mapping: Valid },
++    Range { from: '\u{220}', to: '\u{220}', mapping: Mapped(StringTableSlice { byte_start_lo: 157, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{221}', to: '\u{221}', mapping: Valid },
++    Range { from: '\u{222}', to: '\u{222}', mapping: Mapped(StringTableSlice { byte_start_lo: 159, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{223}', to: '\u{223}', mapping: Valid },
++    Range { from: '\u{224}', to: '\u{224}', mapping: Mapped(StringTableSlice { byte_start_lo: 161, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{225}', to: '\u{225}', mapping: Valid },
++    Range { from: '\u{226}', to: '\u{226}', mapping: Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{227}', to: '\u{227}', mapping: Valid },
++    Range { from: '\u{228}', to: '\u{228}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{229}', to: '\u{229}', mapping: Valid },
++    Range { from: '\u{22a}', to: '\u{22a}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{22b}', to: '\u{22b}', mapping: Valid },
++    Range { from: '\u{22c}', to: '\u{22c}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{22d}', to: '\u{22d}', mapping: Valid },
++    Range { from: '\u{22e}', to: '\u{22e}', mapping: Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{22f}', to: '\u{22f}', mapping: Valid },
++    Range { from: '\u{230}', to: '\u{230}', mapping: Mapped(StringTableSlice { byte_start_lo: 173, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{231}', to: '\u{231}', mapping: Valid },
++    Range { from: '\u{232}', to: '\u{232}', mapping: Mapped(StringTableSlice { byte_start_lo: 175, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{233}', to: '\u{239}', mapping: Valid },
++    Range { from: '\u{23a}', to: '\u{23a}', mapping: Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 1, byte_len: 3 }) },
++    Range { from: '\u{23b}', to: '\u{23b}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{23c}', to: '\u{23c}', mapping: Valid },
++    Range { from: '\u{23d}', to: '\u{23d}', mapping: Mapped(StringTableSlice { byte_start_lo: 182, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{23e}', to: '\u{23e}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 1, byte_len: 3 }) },
++    Range { from: '\u{23f}', to: '\u{240}', mapping: Valid },
++    Range { from: '\u{241}', to: '\u{241}', mapping: Mapped(StringTableSlice { byte_start_lo: 187, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{242}', to: '\u{242}', mapping: Valid },
++    Range { from: '\u{243}', to: '\u{243}', mapping: Mapped(StringTableSlice { byte_start_lo: 189, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{244}', to: '\u{244}', mapping: Mapped(StringTableSlice { byte_start_lo: 191, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{245}', to: '\u{245}', mapping: Mapped(StringTableSlice { byte_start_lo: 193, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{246}', to: '\u{246}', mapping: Mapped(StringTableSlice { byte_start_lo: 195, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{247}', to: '\u{247}', mapping: Valid },
++    Range { from: '\u{248}', to: '\u{248}', mapping: Mapped(StringTableSlice { byte_start_lo: 197, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{249}', to: '\u{249}', mapping: Valid },
++    Range { from: '\u{24a}', to: '\u{24a}', mapping: Mapped(StringTableSlice { byte_start_lo: 199, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{24b}', to: '\u{24b}', mapping: Valid },
++    Range { from: '\u{24c}', to: '\u{24c}', mapping: Mapped(StringTableSlice { byte_start_lo: 201, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{24d}', to: '\u{24d}', mapping: Valid },
++    Range { from: '\u{24e}', to: '\u{24e}', mapping: Mapped(StringTableSlice { byte_start_lo: 203, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{24f}', to: '\u{2af}', mapping: Valid },
++    Range { from: '\u{2b0}', to: '\u{2b0}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2b1}', to: '\u{2b1}', mapping: Mapped(StringTableSlice { byte_start_lo: 205, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{2b2}', to: '\u{2b2}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2b3}', to: '\u{2b3}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2b4}', to: '\u{2b4}', mapping: Mapped(StringTableSlice { byte_start_lo: 207, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{2b5}', to: '\u{2b5}', mapping: Mapped(StringTableSlice { byte_start_lo: 209, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{2b6}', to: '\u{2b6}', mapping: Mapped(StringTableSlice { byte_start_lo: 211, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{2b7}', to: '\u{2b7}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2b8}', to: '\u{2b8}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2b9}', to: '\u{2d7}', mapping: Valid },
++    Range { from: '\u{2d8}', to: '\u{2d8}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 1, byte_len: 3 }) },
++    Range { from: '\u{2d9}', to: '\u{2d9}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 1, byte_len: 3 }) },
++    Range { from: '\u{2da}', to: '\u{2da}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 219, byte_start_hi: 1, byte_len: 3 }) },
++    Range { from: '\u{2db}', to: '\u{2db}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 1, byte_len: 3 }) },
++    Range { from: '\u{2dc}', to: '\u{2dc}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 225, byte_start_hi: 1, byte_len: 3 }) },
++    Range { from: '\u{2dd}', to: '\u{2dd}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 1, byte_len: 3 }) },
++    Range { from: '\u{2de}', to: '\u{2df}', mapping: Valid },
++    Range { from: '\u{2e0}', to: '\u{2e0}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{2e1}', to: '\u{2e1}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2e2}', to: '\u{2e2}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2e3}', to: '\u{2e3}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2e4}', to: '\u{2e4}', mapping: Mapped(StringTableSlice { byte_start_lo: 231, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{2e5}', to: '\u{33f}', mapping: Valid },
++    Range { from: '\u{340}', to: '\u{340}', mapping: Mapped(StringTableSlice { byte_start_lo: 233, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{341}', to: '\u{341}', mapping: Mapped(StringTableSlice { byte_start_lo: 235, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{342}', to: '\u{342}', mapping: Valid },
++    Range { from: '\u{343}', to: '\u{343}', mapping: Mapped(StringTableSlice { byte_start_lo: 237, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{344}', to: '\u{344}', mapping: Mapped(StringTableSlice { byte_start_lo: 239, byte_start_hi: 1, byte_len: 4 }) },
++    Range { from: '\u{345}', to: '\u{345}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{346}', to: '\u{34e}', mapping: Valid },
++    Range { from: '\u{34f}', to: '\u{34f}', mapping: Ignored },
++    Range { from: '\u{350}', to: '\u{36f}', mapping: Valid },
++    Range { from: '\u{370}', to: '\u{370}', mapping: Mapped(StringTableSlice { byte_start_lo: 245, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{371}', to: '\u{371}', mapping: Valid },
++    Range { from: '\u{372}', to: '\u{372}', mapping: Mapped(StringTableSlice { byte_start_lo: 247, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{373}', to: '\u{373}', mapping: Valid },
++    Range { from: '\u{374}', to: '\u{374}', mapping: Mapped(StringTableSlice { byte_start_lo: 249, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{375}', to: '\u{375}', mapping: Valid },
++    Range { from: '\u{376}', to: '\u{376}', mapping: Mapped(StringTableSlice { byte_start_lo: 251, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{377}', to: '\u{377}', mapping: Valid },
++    Range { from: '\u{378}', to: '\u{379}', mapping: Disallowed },
++    Range { from: '\u{37a}', to: '\u{37a}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 253, byte_start_hi: 1, byte_len: 3 }) },
++    Range { from: '\u{37b}', to: '\u{37d}', mapping: Valid },
++    Range { from: '\u{37e}', to: '\u{37e}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 2, byte_len: 1 }) },
++    Range { from: '\u{37f}', to: '\u{37f}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{380}', to: '\u{383}', mapping: Disallowed },
++    Range { from: '\u{384}', to: '\u{384}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 35, byte_start_hi: 0, byte_len: 3 }) },
++    Range { from: '\u{385}', to: '\u{385}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 2, byte_len: 5 }) },
++    Range { from: '\u{386}', to: '\u{386}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{387}', to: '\u{387}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{388}', to: '\u{388}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{389}', to: '\u{389}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{38a}', to: '\u{38a}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{38b}', to: '\u{38b}', mapping: Disallowed },
++    Range { from: '\u{38c}', to: '\u{38c}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{38d}', to: '\u{38d}', mapping: Disallowed },
++    Range { from: '\u{38e}', to: '\u{38e}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{38f}', to: '\u{38f}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{390}', to: '\u{390}', mapping: Valid },
++    Range { from: '\u{391}', to: '\u{391}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{392}', to: '\u{392}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{393}', to: '\u{393}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{394}', to: '\u{394}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{395}', to: '\u{395}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{396}', to: '\u{396}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{397}', to: '\u{397}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{398}', to: '\u{398}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{399}', to: '\u{399}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{39a}', to: '\u{39a}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{39b}', to: '\u{39b}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{39c}', to: '\u{39c}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{39d}', to: '\u{39d}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{39e}', to: '\u{39e}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{39f}', to: '\u{39f}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3a0}', to: '\u{3a0}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3a1}', to: '\u{3a1}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3a2}', to: '\u{3a2}', mapping: Disallowed },
++    Range { from: '\u{3a3}', to: '\u{3a3}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3a4}', to: '\u{3a4}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3a5}', to: '\u{3a5}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3a6}', to: '\u{3a6}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3a7}', to: '\u{3a7}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3a8}', to: '\u{3a8}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3a9}', to: '\u{3a9}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3aa}', to: '\u{3aa}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3ab}', to: '\u{3ab}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3ac}', to: '\u{3c1}', mapping: Valid },
++    Range { from: '\u{3c2}', to: '\u{3c2}', mapping: Deviation(StringTableSlice { byte_start_lo: 54, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3c3}', to: '\u{3ce}', mapping: Valid },
++    Range { from: '\u{3cf}', to: '\u{3cf}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3d0}', to: '\u{3d0}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3d1}', to: '\u{3d1}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3d2}', to: '\u{3d2}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3d3}', to: '\u{3d3}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3d4}', to: '\u{3d4}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3d5}', to: '\u{3d5}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3d6}', to: '\u{3d6}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3d7}', to: '\u{3d7}', mapping: Valid },
++    Range { from: '\u{3d8}', to: '\u{3d8}', mapping: Mapped(StringTableSlice { byte_start_lo: 74, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3d9}', to: '\u{3d9}', mapping: Valid },
++    Range { from: '\u{3da}', to: '\u{3da}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3db}', to: '\u{3db}', mapping: Valid },
++    Range { from: '\u{3dc}', to: '\u{3dc}', mapping: Mapped(StringTableSlice { byte_start_lo: 78, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3dd}', to: '\u{3dd}', mapping: Valid },
++    Range { from: '\u{3de}', to: '\u{3de}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3df}', to: '\u{3df}', mapping: Valid },
++    Range { from: '\u{3e0}', to: '\u{3e0}', mapping: Mapped(StringTableSlice { byte_start_lo: 82, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3e1}', to: '\u{3e1}', mapping: Valid },
++    Range { from: '\u{3e2}', to: '\u{3e2}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3e3}', to: '\u{3e3}', mapping: Valid },
++    Range { from: '\u{3e4}', to: '\u{3e4}', mapping: Mapped(StringTableSlice { byte_start_lo: 86, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3e5}', to: '\u{3e5}', mapping: Valid },
++    Range { from: '\u{3e6}', to: '\u{3e6}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3e7}', to: '\u{3e7}', mapping: Valid },
++    Range { from: '\u{3e8}', to: '\u{3e8}', mapping: Mapped(StringTableSlice { byte_start_lo: 90, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3e9}', to: '\u{3e9}', mapping: Valid },
++    Range { from: '\u{3ea}', to: '\u{3ea}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3eb}', to: '\u{3eb}', mapping: Valid },
++    Range { from: '\u{3ec}', to: '\u{3ec}', mapping: Mapped(StringTableSlice { byte_start_lo: 94, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3ed}', to: '\u{3ed}', mapping: Valid },
++    Range { from: '\u{3ee}', to: '\u{3ee}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3ef}', to: '\u{3ef}', mapping: Valid },
++    Range { from: '\u{3f0}', to: '\u{3f0}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3f1}', to: '\u{3f1}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3f2}', to: '\u{3f2}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3f3}', to: '\u{3f3}', mapping: Valid },
++    Range { from: '\u{3f4}', to: '\u{3f4}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3f5}', to: '\u{3f5}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3f6}', to: '\u{3f6}', mapping: Valid },
++    Range { from: '\u{3f7}', to: '\u{3f7}', mapping: Mapped(StringTableSlice { byte_start_lo: 98, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3f8}', to: '\u{3f8}', mapping: Valid },
++    Range { from: '\u{3f9}', to: '\u{3f9}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3fa}', to: '\u{3fa}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3fb}', to: '\u{3fc}', mapping: Valid },
++    Range { from: '\u{3fd}', to: '\u{3fd}', mapping: Mapped(StringTableSlice { byte_start_lo: 102, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3fe}', to: '\u{3fe}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{3ff}', to: '\u{3ff}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{400}', to: '\u{400}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{401}', to: '\u{401}', mapping: Mapped(StringTableSlice { byte_start_lo: 110, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{402}', to: '\u{402}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{403}', to: '\u{403}', mapping: Mapped(StringTableSlice { byte_start_lo: 114, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{404}', to: '\u{404}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{405}', to: '\u{405}', mapping: Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{406}', to: '\u{406}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{407}', to: '\u{407}', mapping: Mapped(StringTableSlice { byte_start_lo: 122, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{408}', to: '\u{408}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{409}', to: '\u{409}', mapping: Mapped(StringTableSlice { byte_start_lo: 126, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{40a}', to: '\u{40a}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{40b}', to: '\u{40b}', mapping: Mapped(StringTableSlice { byte_start_lo: 130, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{40c}', to: '\u{40c}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{40d}', to: '\u{40d}', mapping: Mapped(StringTableSlice { byte_start_lo: 134, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{40e}', to: '\u{40e}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{40f}', to: '\u{40f}', mapping: Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{410}', to: '\u{410}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{411}', to: '\u{411}', mapping: Mapped(StringTableSlice { byte_start_lo: 142, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{412}', to: '\u{412}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{413}', to: '\u{413}', mapping: Mapped(StringTableSlice { byte_start_lo: 146, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{414}', to: '\u{414}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{415}', to: '\u{415}', mapping: Mapped(StringTableSlice { byte_start_lo: 150, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{416}', to: '\u{416}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{417}', to: '\u{417}', mapping: Mapped(StringTableSlice { byte_start_lo: 154, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{418}', to: '\u{418}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{419}', to: '\u{419}', mapping: Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{41a}', to: '\u{41a}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{41b}', to: '\u{41b}', mapping: Mapped(StringTableSlice { byte_start_lo: 162, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{41c}', to: '\u{41c}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{41d}', to: '\u{41d}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{41e}', to: '\u{41e}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{41f}', to: '\u{41f}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{420}', to: '\u{420}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{421}', to: '\u{421}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{422}', to: '\u{422}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{423}', to: '\u{423}', mapping: Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{424}', to: '\u{424}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{425}', to: '\u{425}', mapping: Mapped(StringTableSlice { byte_start_lo: 182, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{426}', to: '\u{426}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{427}', to: '\u{427}', mapping: Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{428}', to: '\u{428}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{429}', to: '\u{429}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{42a}', to: '\u{42a}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{42b}', to: '\u{42b}', mapping: Mapped(StringTableSlice { byte_start_lo: 194, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{42c}', to: '\u{42c}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{42d}', to: '\u{42d}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{42e}', to: '\u{42e}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{42f}', to: '\u{42f}', mapping: Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{430}', to: '\u{45f}', mapping: Valid },
++    Range { from: '\u{460}', to: '\u{460}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{461}', to: '\u{461}', mapping: Valid },
++    Range { from: '\u{462}', to: '\u{462}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{463}', to: '\u{463}', mapping: Valid },
++    Range { from: '\u{464}', to: '\u{464}', mapping: Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{465}', to: '\u{465}', mapping: Valid },
++    Range { from: '\u{466}', to: '\u{466}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{467}', to: '\u{467}', mapping: Valid },
++    Range { from: '\u{468}', to: '\u{468}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{469}', to: '\u{469}', mapping: Valid },
++    Range { from: '\u{46a}', to: '\u{46a}', mapping: Mapped(StringTableSlice { byte_start_lo: 214, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{46b}', to: '\u{46b}', mapping: Valid },
++    Range { from: '\u{46c}', to: '\u{46c}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{46d}', to: '\u{46d}', mapping: Valid },
++    Range { from: '\u{46e}', to: '\u{46e}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{46f}', to: '\u{46f}', mapping: Valid },
++    Range { from: '\u{470}', to: '\u{470}', mapping: Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{471}', to: '\u{471}', mapping: Valid },
++    Range { from: '\u{472}', to: '\u{472}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{473}', to: '\u{473}', mapping: Valid },
++    Range { from: '\u{474}', to: '\u{474}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{475}', to: '\u{475}', mapping: Valid },
++    Range { from: '\u{476}', to: '\u{476}', mapping: Mapped(StringTableSlice { byte_start_lo: 226, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{477}', to: '\u{477}', mapping: Valid },
++    Range { from: '\u{478}', to: '\u{478}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{479}', to: '\u{479}', mapping: Valid },
++    Range { from: '\u{47a}', to: '\u{47a}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{47b}', to: '\u{47b}', mapping: Valid },
++    Range { from: '\u{47c}', to: '\u{47c}', mapping: Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{47d}', to: '\u{47d}', mapping: Valid },
++    Range { from: '\u{47e}', to: '\u{47e}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{47f}', to: '\u{47f}', mapping: Valid },
++    Range { from: '\u{480}', to: '\u{480}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{481}', to: '\u{489}', mapping: Valid },
++    Range { from: '\u{48a}', to: '\u{48a}', mapping: Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{48b}', to: '\u{48b}', mapping: Valid },
++    Range { from: '\u{48c}', to: '\u{48c}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{48d}', to: '\u{48d}', mapping: Valid },
++    Range { from: '\u{48e}', to: '\u{48e}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{48f}', to: '\u{48f}', mapping: Valid },
++    Range { from: '\u{490}', to: '\u{490}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{491}', to: '\u{491}', mapping: Valid },
++    Range { from: '\u{492}', to: '\u{492}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{493}', to: '\u{493}', mapping: Valid },
++    Range { from: '\u{494}', to: '\u{494}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{495}', to: '\u{495}', mapping: Valid },
++    Range { from: '\u{496}', to: '\u{496}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{497}', to: '\u{497}', mapping: Valid },
++    Range { from: '\u{498}', to: '\u{498}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{499}', to: '\u{499}', mapping: Valid },
++    Range { from: '\u{49a}', to: '\u{49a}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{49b}', to: '\u{49b}', mapping: Valid },
++    Range { from: '\u{49c}', to: '\u{49c}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{49d}', to: '\u{49d}', mapping: Valid },
++    Range { from: '\u{49e}', to: '\u{49e}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{49f}', to: '\u{49f}', mapping: Valid },
++    Range { from: '\u{4a0}', to: '\u{4a0}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4a1}', to: '\u{4a1}', mapping: Valid },
++    Range { from: '\u{4a2}', to: '\u{4a2}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4a3}', to: '\u{4a3}', mapping: Valid },
++    Range { from: '\u{4a4}', to: '\u{4a4}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4a5}', to: '\u{4a5}', mapping: Valid },
++    Range { from: '\u{4a6}', to: '\u{4a6}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4a7}', to: '\u{4a7}', mapping: Valid },
++    Range { from: '\u{4a8}', to: '\u{4a8}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4a9}', to: '\u{4a9}', mapping: Valid },
++    Range { from: '\u{4aa}', to: '\u{4aa}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4ab}', to: '\u{4ab}', mapping: Valid },
++    Range { from: '\u{4ac}', to: '\u{4ac}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4ad}', to: '\u{4ad}', mapping: Valid },
++    Range { from: '\u{4ae}', to: '\u{4ae}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4af}', to: '\u{4af}', mapping: Valid },
++    Range { from: '\u{4b0}', to: '\u{4b0}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4b1}', to: '\u{4b1}', mapping: Valid },
++    Range { from: '\u{4b2}', to: '\u{4b2}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4b3}', to: '\u{4b3}', mapping: Valid },
++    Range { from: '\u{4b4}', to: '\u{4b4}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4b5}', to: '\u{4b5}', mapping: Valid },
++    Range { from: '\u{4b6}', to: '\u{4b6}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4b7}', to: '\u{4b7}', mapping: Valid },
++    Range { from: '\u{4b8}', to: '\u{4b8}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4b9}', to: '\u{4b9}', mapping: Valid },
++    Range { from: '\u{4ba}', to: '\u{4ba}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4bb}', to: '\u{4bb}', mapping: Valid },
++    Range { from: '\u{4bc}', to: '\u{4bc}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4bd}', to: '\u{4bd}', mapping: Valid },
++    Range { from: '\u{4be}', to: '\u{4be}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4bf}', to: '\u{4bf}', mapping: Valid },
++    Range { from: '\u{4c0}', to: '\u{4c0}', mapping: Disallowed },
++    Range { from: '\u{4c1}', to: '\u{4c1}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4c2}', to: '\u{4c2}', mapping: Valid },
++    Range { from: '\u{4c3}', to: '\u{4c3}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4c4}', to: '\u{4c4}', mapping: Valid },
++    Range { from: '\u{4c5}', to: '\u{4c5}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4c6}', to: '\u{4c6}', mapping: Valid },
++    Range { from: '\u{4c7}', to: '\u{4c7}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4c8}', to: '\u{4c8}', mapping: Valid },
++    Range { from: '\u{4c9}', to: '\u{4c9}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4ca}', to: '\u{4ca}', mapping: Valid },
++    Range { from: '\u{4cb}', to: '\u{4cb}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4cc}', to: '\u{4cc}', mapping: Valid },
++    Range { from: '\u{4cd}', to: '\u{4cd}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4ce}', to: '\u{4cf}', mapping: Valid },
++    Range { from: '\u{4d0}', to: '\u{4d0}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4d1}', to: '\u{4d1}', mapping: Valid },
++    Range { from: '\u{4d2}', to: '\u{4d2}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4d3}', to: '\u{4d3}', mapping: Valid },
++    Range { from: '\u{4d4}', to: '\u{4d4}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4d5}', to: '\u{4d5}', mapping: Valid },
++    Range { from: '\u{4d6}', to: '\u{4d6}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4d7}', to: '\u{4d7}', mapping: Valid },
++    Range { from: '\u{4d8}', to: '\u{4d8}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4d9}', to: '\u{4d9}', mapping: Valid },
++    Range { from: '\u{4da}', to: '\u{4da}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4db}', to: '\u{4db}', mapping: Valid },
++    Range { from: '\u{4dc}', to: '\u{4dc}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4dd}', to: '\u{4dd}', mapping: Valid },
++    Range { from: '\u{4de}', to: '\u{4de}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4df}', to: '\u{4df}', mapping: Valid },
++    Range { from: '\u{4e0}', to: '\u{4e0}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4e1}', to: '\u{4e1}', mapping: Valid },
++    Range { from: '\u{4e2}', to: '\u{4e2}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4e3}', to: '\u{4e3}', mapping: Valid },
++    Range { from: '\u{4e4}', to: '\u{4e4}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4e5}', to: '\u{4e5}', mapping: Valid },
++    Range { from: '\u{4e6}', to: '\u{4e6}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4e7}', to: '\u{4e7}', mapping: Valid },
++    Range { from: '\u{4e8}', to: '\u{4e8}', mapping: Mapped(StringTableSlice { byte_start_lo: 74, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4e9}', to: '\u{4e9}', mapping: Valid },
++    Range { from: '\u{4ea}', to: '\u{4ea}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4eb}', to: '\u{4eb}', mapping: Valid },
++    Range { from: '\u{4ec}', to: '\u{4ec}', mapping: Mapped(StringTableSlice { byte_start_lo: 78, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4ed}', to: '\u{4ed}', mapping: Valid },
++    Range { from: '\u{4ee}', to: '\u{4ee}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4ef}', to: '\u{4ef}', mapping: Valid },
++    Range { from: '\u{4f0}', to: '\u{4f0}', mapping: Mapped(StringTableSlice { byte_start_lo: 82, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4f1}', to: '\u{4f1}', mapping: Valid },
++    Range { from: '\u{4f2}', to: '\u{4f2}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4f3}', to: '\u{4f3}', mapping: Valid },
++    Range { from: '\u{4f4}', to: '\u{4f4}', mapping: Mapped(StringTableSlice { byte_start_lo: 86, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4f5}', to: '\u{4f5}', mapping: Valid },
++    Range { from: '\u{4f6}', to: '\u{4f6}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4f7}', to: '\u{4f7}', mapping: Valid },
++    Range { from: '\u{4f8}', to: '\u{4f8}', mapping: Mapped(StringTableSlice { byte_start_lo: 90, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4f9}', to: '\u{4f9}', mapping: Valid },
++    Range { from: '\u{4fa}', to: '\u{4fa}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4fb}', to: '\u{4fb}', mapping: Valid },
++    Range { from: '\u{4fc}', to: '\u{4fc}', mapping: Mapped(StringTableSlice { byte_start_lo: 94, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4fd}', to: '\u{4fd}', mapping: Valid },
++    Range { from: '\u{4fe}', to: '\u{4fe}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{4ff}', to: '\u{4ff}', mapping: Valid },
++    Range { from: '\u{500}', to: '\u{500}', mapping: Mapped(StringTableSlice { byte_start_lo: 98, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{501}', to: '\u{501}', mapping: Valid },
++    Range { from: '\u{502}', to: '\u{502}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{503}', to: '\u{503}', mapping: Valid },
++    Range { from: '\u{504}', to: '\u{504}', mapping: Mapped(StringTableSlice { byte_start_lo: 102, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{505}', to: '\u{505}', mapping: Valid },
++    Range { from: '\u{506}', to: '\u{506}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{507}', to: '\u{507}', mapping: Valid },
++    Range { from: '\u{508}', to: '\u{508}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{509}', to: '\u{509}', mapping: Valid },
++    Range { from: '\u{50a}', to: '\u{50a}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{50b}', to: '\u{50b}', mapping: Valid },
++    Range { from: '\u{50c}', to: '\u{50c}', mapping: Mapped(StringTableSlice { byte_start_lo: 110, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{50d}', to: '\u{50d}', mapping: Valid },
++    Range { from: '\u{50e}', to: '\u{50e}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{50f}', to: '\u{50f}', mapping: Valid },
++    Range { from: '\u{510}', to: '\u{510}', mapping: Mapped(StringTableSlice { byte_start_lo: 114, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{511}', to: '\u{511}', mapping: Valid },
++    Range { from: '\u{512}', to: '\u{512}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{513}', to: '\u{513}', mapping: Valid },
++    Range { from: '\u{514}', to: '\u{514}', mapping: Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{515}', to: '\u{515}', mapping: Valid },
++    Range { from: '\u{516}', to: '\u{516}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{517}', to: '\u{517}', mapping: Valid },
++    Range { from: '\u{518}', to: '\u{518}', mapping: Mapped(StringTableSlice { byte_start_lo: 122, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{519}', to: '\u{519}', mapping: Valid },
++    Range { from: '\u{51a}', to: '\u{51a}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{51b}', to: '\u{51b}', mapping: Valid },
++    Range { from: '\u{51c}', to: '\u{51c}', mapping: Mapped(StringTableSlice { byte_start_lo: 126, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{51d}', to: '\u{51d}', mapping: Valid },
++    Range { from: '\u{51e}', to: '\u{51e}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{51f}', to: '\u{51f}', mapping: Valid },
++    Range { from: '\u{520}', to: '\u{520}', mapping: Mapped(StringTableSlice { byte_start_lo: 130, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{521}', to: '\u{521}', mapping: Valid },
++    Range { from: '\u{522}', to: '\u{522}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{523}', to: '\u{523}', mapping: Valid },
++    Range { from: '\u{524}', to: '\u{524}', mapping: Mapped(StringTableSlice { byte_start_lo: 134, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{525}', to: '\u{525}', mapping: Valid },
++    Range { from: '\u{526}', to: '\u{526}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{527}', to: '\u{527}', mapping: Valid },
++    Range { from: '\u{528}', to: '\u{528}', mapping: Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{529}', to: '\u{529}', mapping: Valid },
++    Range { from: '\u{52a}', to: '\u{52a}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{52b}', to: '\u{52b}', mapping: Valid },
++    Range { from: '\u{52c}', to: '\u{52c}', mapping: Mapped(StringTableSlice { byte_start_lo: 142, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{52d}', to: '\u{52d}', mapping: Valid },
++    Range { from: '\u{52e}', to: '\u{52e}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{52f}', to: '\u{52f}', mapping: Valid },
++    Range { from: '\u{530}', to: '\u{530}', mapping: Disallowed },
++    Range { from: '\u{531}', to: '\u{531}', mapping: Mapped(StringTableSlice { byte_start_lo: 146, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{532}', to: '\u{532}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{533}', to: '\u{533}', mapping: Mapped(StringTableSlice { byte_start_lo: 150, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{534}', to: '\u{534}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{535}', to: '\u{535}', mapping: Mapped(StringTableSlice { byte_start_lo: 154, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{536}', to: '\u{536}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{537}', to: '\u{537}', mapping: Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{538}', to: '\u{538}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{539}', to: '\u{539}', mapping: Mapped(StringTableSlice { byte_start_lo: 162, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{53a}', to: '\u{53a}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{53b}', to: '\u{53b}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{53c}', to: '\u{53c}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{53d}', to: '\u{53d}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{53e}', to: '\u{53e}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{53f}', to: '\u{53f}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{540}', to: '\u{540}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{541}', to: '\u{541}', mapping: Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{542}', to: '\u{542}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{543}', to: '\u{543}', mapping: Mapped(StringTableSlice { byte_start_lo: 182, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{544}', to: '\u{544}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{545}', to: '\u{545}', mapping: Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{546}', to: '\u{546}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{547}', to: '\u{547}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{548}', to: '\u{548}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{549}', to: '\u{549}', mapping: Mapped(StringTableSlice { byte_start_lo: 194, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{54a}', to: '\u{54a}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{54b}', to: '\u{54b}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{54c}', to: '\u{54c}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{54d}', to: '\u{54d}', mapping: Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{54e}', to: '\u{54e}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{54f}', to: '\u{54f}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{550}', to: '\u{550}', mapping: Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{551}', to: '\u{551}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{552}', to: '\u{552}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{553}', to: '\u{553}', mapping: Mapped(StringTableSlice { byte_start_lo: 214, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{554}', to: '\u{554}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{555}', to: '\u{555}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{556}', to: '\u{556}', mapping: Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 3, byte_len: 2 }) },
++    Range { from: '\u{557}', to: '\u{558}', mapping: Disallowed },
++    Range { from: '\u{559}', to: '\u{55f}', mapping: Valid },
++    Range { from: '\u{560}', to: '\u{560}', mapping: Disallowed },
++    Range { from: '\u{561}', to: '\u{586}', mapping: Valid },
++    Range { from: '\u{587}', to: '\u{587}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 3, byte_len: 4 }) },
++    Range { from: '\u{588}', to: '\u{588}', mapping: Disallowed },
++    Range { from: '\u{589}', to: '\u{58a}', mapping: Valid },
++    Range { from: '\u{58b}', to: '\u{58c}', mapping: Disallowed },
++    Range { from: '\u{58d}', to: '\u{58f}', mapping: Valid },
++    Range { from: '\u{590}', to: '\u{590}', mapping: Disallowed },
++    Range { from: '\u{591}', to: '\u{5c7}', mapping: Valid },
++    Range { from: '\u{5c8}', to: '\u{5cf}', mapping: Disallowed },
++    Range { from: '\u{5d0}', to: '\u{5ea}', mapping: Valid },
++    Range { from: '\u{5eb}', to: '\u{5ef}', mapping: Disallowed },
++    Range { from: '\u{5f0}', to: '\u{5f4}', mapping: Valid },
++    Range { from: '\u{5f5}', to: '\u{605}', mapping: Disallowed },
++    Range { from: '\u{606}', to: '\u{61b}', mapping: Valid },
++    Range { from: '\u{61c}', to: '\u{61d}', mapping: Disallowed },
++    Range { from: '\u{61e}', to: '\u{674}', mapping: Valid },
++    Range { from: '\u{675}', to: '\u{675}', mapping: Mapped(StringTableSlice { byte_start_lo: 226, byte_start_hi: 3, byte_len: 4 }) },
++    Range { from: '\u{676}', to: '\u{676}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 3, byte_len: 4 }) },
++    Range { from: '\u{677}', to: '\u{677}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 3, byte_len: 4 }) },
++    Range { from: '\u{678}', to: '\u{678}', mapping: Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 3, byte_len: 4 }) },
++    Range { from: '\u{679}', to: '\u{6dc}', mapping: Valid },
++    Range { from: '\u{6dd}', to: '\u{6dd}', mapping: Disallowed },
++    Range { from: '\u{6de}', to: '\u{70d}', mapping: Valid },
++    Range { from: '\u{70e}', to: '\u{70f}', mapping: Disallowed },
++    Range { from: '\u{710}', to: '\u{74a}', mapping: Valid },
++    Range { from: '\u{74b}', to: '\u{74c}', mapping: Disallowed },
++    Range { from: '\u{74d}', to: '\u{7b1}', mapping: Valid },
++    Range { from: '\u{7b2}', to: '\u{7bf}', mapping: Disallowed },
++    Range { from: '\u{7c0}', to: '\u{7fa}', mapping: Valid },
++    Range { from: '\u{7fb}', to: '\u{7ff}', mapping: Disallowed },
++    Range { from: '\u{800}', to: '\u{82d}', mapping: Valid },
++    Range { from: '\u{82e}', to: '\u{82f}', mapping: Disallowed },
++    Range { from: '\u{830}', to: '\u{83e}', mapping: Valid },
++    Range { from: '\u{83f}', to: '\u{83f}', mapping: Disallowed },
++    Range { from: '\u{840}', to: '\u{85b}', mapping: Valid },
++    Range { from: '\u{85c}', to: '\u{85d}', mapping: Disallowed },
++    Range { from: '\u{85e}', to: '\u{85e}', mapping: Valid },
++    Range { from: '\u{85f}', to: '\u{85f}', mapping: Disallowed },
++    Range { from: '\u{860}', to: '\u{86a}', mapping: Valid },
++    Range { from: '\u{86b}', to: '\u{89f}', mapping: Disallowed },
++    Range { from: '\u{8a0}', to: '\u{8b4}', mapping: Valid },
++    Range { from: '\u{8b5}', to: '\u{8b5}', mapping: Disallowed },
++    Range { from: '\u{8b6}', to: '\u{8bd}', mapping: Valid },
++    Range { from: '\u{8be}', to: '\u{8d3}', mapping: Disallowed },
++    Range { from: '\u{8d4}', to: '\u{8e1}', mapping: Valid },
++    Range { from: '\u{8e2}', to: '\u{8e2}', mapping: Disallowed },
++    Range { from: '\u{8e3}', to: '\u{957}', mapping: Valid },
++    Range { from: '\u{958}', to: '\u{958}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 3, byte_len: 6 }) },
++    Range { from: '\u{959}', to: '\u{959}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 3, byte_len: 6 }) },
++    Range { from: '\u{95a}', to: '\u{95a}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 3, byte_len: 6 }) },
++    Range { from: '\u{95b}', to: '\u{95b}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{95c}', to: '\u{95c}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{95d}', to: '\u{95d}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{95e}', to: '\u{95e}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{95f}', to: '\u{95f}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{960}', to: '\u{983}', mapping: Valid },
++    Range { from: '\u{984}', to: '\u{984}', mapping: Disallowed },
++    Range { from: '\u{985}', to: '\u{98c}', mapping: Valid },
++    Range { from: '\u{98d}', to: '\u{98e}', mapping: Disallowed },
++    Range { from: '\u{98f}', to: '\u{990}', mapping: Valid },
++    Range { from: '\u{991}', to: '\u{992}', mapping: Disallowed },
++    Range { from: '\u{993}', to: '\u{9a8}', mapping: Valid },
++    Range { from: '\u{9a9}', to: '\u{9a9}', mapping: Disallowed },
++    Range { from: '\u{9aa}', to: '\u{9b0}', mapping: Valid },
++    Range { from: '\u{9b1}', to: '\u{9b1}', mapping: Disallowed },
++    Range { from: '\u{9b2}', to: '\u{9b2}', mapping: Valid },
++    Range { from: '\u{9b3}', to: '\u{9b5}', mapping: Disallowed },
++    Range { from: '\u{9b6}', to: '\u{9b9}', mapping: Valid },
++    Range { from: '\u{9ba}', to: '\u{9bb}', mapping: Disallowed },
++    Range { from: '\u{9bc}', to: '\u{9c4}', mapping: Valid },
++    Range { from: '\u{9c5}', to: '\u{9c6}', mapping: Disallowed },
++    Range { from: '\u{9c7}', to: '\u{9c8}', mapping: Valid },
++    Range { from: '\u{9c9}', to: '\u{9ca}', mapping: Disallowed },
++    Range { from: '\u{9cb}', to: '\u{9ce}', mapping: Valid },
++    Range { from: '\u{9cf}', to: '\u{9d6}', mapping: Disallowed },
++    Range { from: '\u{9d7}', to: '\u{9d7}', mapping: Valid },
++    Range { from: '\u{9d8}', to: '\u{9db}', mapping: Disallowed },
++    Range { from: '\u{9dc}', to: '\u{9dc}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{9dd}', to: '\u{9dd}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{9de}', to: '\u{9de}', mapping: Disallowed },
++    Range { from: '\u{9df}', to: '\u{9df}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{9e0}', to: '\u{9e3}', mapping: Valid },
++    Range { from: '\u{9e4}', to: '\u{9e5}', mapping: Disallowed },
++    Range { from: '\u{9e6}', to: '\u{9fd}', mapping: Valid },
++    Range { from: '\u{9fe}', to: '\u{a00}', mapping: Disallowed },
++    Range { from: '\u{a01}', to: '\u{a03}', mapping: Valid },
++    Range { from: '\u{a04}', to: '\u{a04}', mapping: Disallowed },
++    Range { from: '\u{a05}', to: '\u{a0a}', mapping: Valid },
++    Range { from: '\u{a0b}', to: '\u{a0e}', mapping: Disallowed },
++    Range { from: '\u{a0f}', to: '\u{a10}', mapping: Valid },
++    Range { from: '\u{a11}', to: '\u{a12}', mapping: Disallowed },
++    Range { from: '\u{a13}', to: '\u{a28}', mapping: Valid },
++    Range { from: '\u{a29}', to: '\u{a29}', mapping: Disallowed },
++    Range { from: '\u{a2a}', to: '\u{a30}', mapping: Valid },
++    Range { from: '\u{a31}', to: '\u{a31}', mapping: Disallowed },
++    Range { from: '\u{a32}', to: '\u{a32}', mapping: Valid },
++    Range { from: '\u{a33}', to: '\u{a33}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{a34}', to: '\u{a34}', mapping: Disallowed },
++    Range { from: '\u{a35}', to: '\u{a35}', mapping: Valid },
++    Range { from: '\u{a36}', to: '\u{a36}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{a37}', to: '\u{a37}', mapping: Disallowed },
++    Range { from: '\u{a38}', to: '\u{a39}', mapping: Valid },
++    Range { from: '\u{a3a}', to: '\u{a3b}', mapping: Disallowed },
++    Range { from: '\u{a3c}', to: '\u{a3c}', mapping: Valid },
++    Range { from: '\u{a3d}', to: '\u{a3d}', mapping: Disallowed },
++    Range { from: '\u{a3e}', to: '\u{a42}', mapping: Valid },
++    Range { from: '\u{a43}', to: '\u{a46}', mapping: Disallowed },
++    Range { from: '\u{a47}', to: '\u{a48}', mapping: Valid },
++    Range { from: '\u{a49}', to: '\u{a4a}', mapping: Disallowed },
++    Range { from: '\u{a4b}', to: '\u{a4d}', mapping: Valid },
++    Range { from: '\u{a4e}', to: '\u{a50}', mapping: Disallowed },
++    Range { from: '\u{a51}', to: '\u{a51}', mapping: Valid },
++    Range { from: '\u{a52}', to: '\u{a58}', mapping: Disallowed },
++    Range { from: '\u{a59}', to: '\u{a59}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{a5a}', to: '\u{a5a}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{a5b}', to: '\u{a5b}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{a5c}', to: '\u{a5c}', mapping: Valid },
++    Range { from: '\u{a5d}', to: '\u{a5d}', mapping: Disallowed },
++    Range { from: '\u{a5e}', to: '\u{a5e}', mapping: Mapped(StringTableSlice { byte_start_lo: 82, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{a5f}', to: '\u{a65}', mapping: Disallowed },
++    Range { from: '\u{a66}', to: '\u{a75}', mapping: Valid },
++    Range { from: '\u{a76}', to: '\u{a80}', mapping: Disallowed },
++    Range { from: '\u{a81}', to: '\u{a83}', mapping: Valid },
++    Range { from: '\u{a84}', to: '\u{a84}', mapping: Disallowed },
++    Range { from: '\u{a85}', to: '\u{a8d}', mapping: Valid },
++    Range { from: '\u{a8e}', to: '\u{a8e}', mapping: Disallowed },
++    Range { from: '\u{a8f}', to: '\u{a91}', mapping: Valid },
++    Range { from: '\u{a92}', to: '\u{a92}', mapping: Disallowed },
++    Range { from: '\u{a93}', to: '\u{aa8}', mapping: Valid },
++    Range { from: '\u{aa9}', to: '\u{aa9}', mapping: Disallowed },
++    Range { from: '\u{aaa}', to: '\u{ab0}', mapping: Valid },
++    Range { from: '\u{ab1}', to: '\u{ab1}', mapping: Disallowed },
++    Range { from: '\u{ab2}', to: '\u{ab3}', mapping: Valid },
++    Range { from: '\u{ab4}', to: '\u{ab4}', mapping: Disallowed },
++    Range { from: '\u{ab5}', to: '\u{ab9}', mapping: Valid },
++    Range { from: '\u{aba}', to: '\u{abb}', mapping: Disallowed },
++    Range { from: '\u{abc}', to: '\u{ac5}', mapping: Valid },
++    Range { from: '\u{ac6}', to: '\u{ac6}', mapping: Disallowed },
++    Range { from: '\u{ac7}', to: '\u{ac9}', mapping: Valid },
++    Range { from: '\u{aca}', to: '\u{aca}', mapping: Disallowed },
++    Range { from: '\u{acb}', to: '\u{acd}', mapping: Valid },
++    Range { from: '\u{ace}', to: '\u{acf}', mapping: Disallowed },
++    Range { from: '\u{ad0}', to: '\u{ad0}', mapping: Valid },
++    Range { from: '\u{ad1}', to: '\u{adf}', mapping: Disallowed },
++    Range { from: '\u{ae0}', to: '\u{ae3}', mapping: Valid },
++    Range { from: '\u{ae4}', to: '\u{ae5}', mapping: Disallowed },
++    Range { from: '\u{ae6}', to: '\u{af1}', mapping: Valid },
++    Range { from: '\u{af2}', to: '\u{af8}', mapping: Disallowed },
++    Range { from: '\u{af9}', to: '\u{aff}', mapping: Valid },
++    Range { from: '\u{b00}', to: '\u{b00}', mapping: Disallowed },
++    Range { from: '\u{b01}', to: '\u{b03}', mapping: Valid },
++    Range { from: '\u{b04}', to: '\u{b04}', mapping: Disallowed },
++    Range { from: '\u{b05}', to: '\u{b0c}', mapping: Valid },
++    Range { from: '\u{b0d}', to: '\u{b0e}', mapping: Disallowed },
++    Range { from: '\u{b0f}', to: '\u{b10}', mapping: Valid },
++    Range { from: '\u{b11}', to: '\u{b12}', mapping: Disallowed },
++    Range { from: '\u{b13}', to: '\u{b28}', mapping: Valid },
++    Range { from: '\u{b29}', to: '\u{b29}', mapping: Disallowed },
++    Range { from: '\u{b2a}', to: '\u{b30}', mapping: Valid },
++    Range { from: '\u{b31}', to: '\u{b31}', mapping: Disallowed },
++    Range { from: '\u{b32}', to: '\u{b33}', mapping: Valid },
++    Range { from: '\u{b34}', to: '\u{b34}', mapping: Disallowed },
++    Range { from: '\u{b35}', to: '\u{b39}', mapping: Valid },
++    Range { from: '\u{b3a}', to: '\u{b3b}', mapping: Disallowed },
++    Range { from: '\u{b3c}', to: '\u{b44}', mapping: Valid },
++    Range { from: '\u{b45}', to: '\u{b46}', mapping: Disallowed },
++    Range { from: '\u{b47}', to: '\u{b48}', mapping: Valid },
++    Range { from: '\u{b49}', to: '\u{b4a}', mapping: Disallowed },
++    Range { from: '\u{b4b}', to: '\u{b4d}', mapping: Valid },
++    Range { from: '\u{b4e}', to: '\u{b55}', mapping: Disallowed },
++    Range { from: '\u{b56}', to: '\u{b57}', mapping: Valid },
++    Range { from: '\u{b58}', to: '\u{b5b}', mapping: Disallowed },
++    Range { from: '\u{b5c}', to: '\u{b5c}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{b5d}', to: '\u{b5d}', mapping: Mapped(StringTableSlice { byte_start_lo: 94, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{b5e}', to: '\u{b5e}', mapping: Disallowed },
++    Range { from: '\u{b5f}', to: '\u{b63}', mapping: Valid },
++    Range { from: '\u{b64}', to: '\u{b65}', mapping: Disallowed },
++    Range { from: '\u{b66}', to: '\u{b77}', mapping: Valid },
++    Range { from: '\u{b78}', to: '\u{b81}', mapping: Disallowed },
++    Range { from: '\u{b82}', to: '\u{b83}', mapping: Valid },
++    Range { from: '\u{b84}', to: '\u{b84}', mapping: Disallowed },
++    Range { from: '\u{b85}', to: '\u{b8a}', mapping: Valid },
++    Range { from: '\u{b8b}', to: '\u{b8d}', mapping: Disallowed },
++    Range { from: '\u{b8e}', to: '\u{b90}', mapping: Valid },
++    Range { from: '\u{b91}', to: '\u{b91}', mapping: Disallowed },
++    Range { from: '\u{b92}', to: '\u{b95}', mapping: Valid },
++    Range { from: '\u{b96}', to: '\u{b98}', mapping: Disallowed },
++    Range { from: '\u{b99}', to: '\u{b9a}', mapping: Valid },
++    Range { from: '\u{b9b}', to: '\u{b9b}', mapping: Disallowed },
++    Range { from: '\u{b9c}', to: '\u{b9c}', mapping: Valid },
++    Range { from: '\u{b9d}', to: '\u{b9d}', mapping: Disallowed },
++    Range { from: '\u{b9e}', to: '\u{b9f}', mapping: Valid },
++    Range { from: '\u{ba0}', to: '\u{ba2}', mapping: Disallowed },
++    Range { from: '\u{ba3}', to: '\u{ba4}', mapping: Valid },
++    Range { from: '\u{ba5}', to: '\u{ba7}', mapping: Disallowed },
++    Range { from: '\u{ba8}', to: '\u{baa}', mapping: Valid },
++    Range { from: '\u{bab}', to: '\u{bad}', mapping: Disallowed },
++    Range { from: '\u{bae}', to: '\u{bb9}', mapping: Valid },
++    Range { from: '\u{bba}', to: '\u{bbd}', mapping: Disallowed },
++    Range { from: '\u{bbe}', to: '\u{bc2}', mapping: Valid },
++    Range { from: '\u{bc3}', to: '\u{bc5}', mapping: Disallowed },
++    Range { from: '\u{bc6}', to: '\u{bc8}', mapping: Valid },
++    Range { from: '\u{bc9}', to: '\u{bc9}', mapping: Disallowed },
++    Range { from: '\u{bca}', to: '\u{bcd}', mapping: Valid },
++    Range { from: '\u{bce}', to: '\u{bcf}', mapping: Disallowed },
++    Range { from: '\u{bd0}', to: '\u{bd0}', mapping: Valid },
++    Range { from: '\u{bd1}', to: '\u{bd6}', mapping: Disallowed },
++    Range { from: '\u{bd7}', to: '\u{bd7}', mapping: Valid },
++    Range { from: '\u{bd8}', to: '\u{be5}', mapping: Disallowed },
++    Range { from: '\u{be6}', to: '\u{bfa}', mapping: Valid },
++    Range { from: '\u{bfb}', to: '\u{bff}', mapping: Disallowed },
++    Range { from: '\u{c00}', to: '\u{c03}', mapping: Valid },
++    Range { from: '\u{c04}', to: '\u{c04}', mapping: Disallowed },
++    Range { from: '\u{c05}', to: '\u{c0c}', mapping: Valid },
++    Range { from: '\u{c0d}', to: '\u{c0d}', mapping: Disallowed },
++    Range { from: '\u{c0e}', to: '\u{c10}', mapping: Valid },
++    Range { from: '\u{c11}', to: '\u{c11}', mapping: Disallowed },
++    Range { from: '\u{c12}', to: '\u{c28}', mapping: Valid },
++    Range { from: '\u{c29}', to: '\u{c29}', mapping: Disallowed },
++    Range { from: '\u{c2a}', to: '\u{c39}', mapping: Valid },
++    Range { from: '\u{c3a}', to: '\u{c3c}', mapping: Disallowed },
++    Range { from: '\u{c3d}', to: '\u{c44}', mapping: Valid },
++    Range { from: '\u{c45}', to: '\u{c45}', mapping: Disallowed },
++    Range { from: '\u{c46}', to: '\u{c48}', mapping: Valid },
++    Range { from: '\u{c49}', to: '\u{c49}', mapping: Disallowed },
++    Range { from: '\u{c4a}', to: '\u{c4d}', mapping: Valid },
++    Range { from: '\u{c4e}', to: '\u{c54}', mapping: Disallowed },
++    Range { from: '\u{c55}', to: '\u{c56}', mapping: Valid },
++    Range { from: '\u{c57}', to: '\u{c57}', mapping: Disallowed },
++    Range { from: '\u{c58}', to: '\u{c5a}', mapping: Valid },
++    Range { from: '\u{c5b}', to: '\u{c5f}', mapping: Disallowed },
++    Range { from: '\u{c60}', to: '\u{c63}', mapping: Valid },
++    Range { from: '\u{c64}', to: '\u{c65}', mapping: Disallowed },
++    Range { from: '\u{c66}', to: '\u{c6f}', mapping: Valid },
++    Range { from: '\u{c70}', to: '\u{c77}', mapping: Disallowed },
++    Range { from: '\u{c78}', to: '\u{c83}', mapping: Valid },
++    Range { from: '\u{c84}', to: '\u{c84}', mapping: Disallowed },
++    Range { from: '\u{c85}', to: '\u{c8c}', mapping: Valid },
++    Range { from: '\u{c8d}', to: '\u{c8d}', mapping: Disallowed },
++    Range { from: '\u{c8e}', to: '\u{c90}', mapping: Valid },
++    Range { from: '\u{c91}', to: '\u{c91}', mapping: Disallowed },
++    Range { from: '\u{c92}', to: '\u{ca8}', mapping: Valid },
++    Range { from: '\u{ca9}', to: '\u{ca9}', mapping: Disallowed },
++    Range { from: '\u{caa}', to: '\u{cb3}', mapping: Valid },
++    Range { from: '\u{cb4}', to: '\u{cb4}', mapping: Disallowed },
++    Range { from: '\u{cb5}', to: '\u{cb9}', mapping: Valid },
++    Range { from: '\u{cba}', to: '\u{cbb}', mapping: Disallowed },
++    Range { from: '\u{cbc}', to: '\u{cc4}', mapping: Valid },
++    Range { from: '\u{cc5}', to: '\u{cc5}', mapping: Disallowed },
++    Range { from: '\u{cc6}', to: '\u{cc8}', mapping: Valid },
++    Range { from: '\u{cc9}', to: '\u{cc9}', mapping: Disallowed },
++    Range { from: '\u{cca}', to: '\u{ccd}', mapping: Valid },
++    Range { from: '\u{cce}', to: '\u{cd4}', mapping: Disallowed },
++    Range { from: '\u{cd5}', to: '\u{cd6}', mapping: Valid },
++    Range { from: '\u{cd7}', to: '\u{cdd}', mapping: Disallowed },
++    Range { from: '\u{cde}', to: '\u{cde}', mapping: Valid },
++    Range { from: '\u{cdf}', to: '\u{cdf}', mapping: Disallowed },
++    Range { from: '\u{ce0}', to: '\u{ce3}', mapping: Valid },
++    Range { from: '\u{ce4}', to: '\u{ce5}', mapping: Disallowed },
++    Range { from: '\u{ce6}', to: '\u{cef}', mapping: Valid },
++    Range { from: '\u{cf0}', to: '\u{cf0}', mapping: Disallowed },
++    Range { from: '\u{cf1}', to: '\u{cf2}', mapping: Valid },
++    Range { from: '\u{cf3}', to: '\u{cff}', mapping: Disallowed },
++    Range { from: '\u{d00}', to: '\u{d03}', mapping: Valid },
++    Range { from: '\u{d04}', to: '\u{d04}', mapping: Disallowed },
++    Range { from: '\u{d05}', to: '\u{d0c}', mapping: Valid },
++    Range { from: '\u{d0d}', to: '\u{d0d}', mapping: Disallowed },
++    Range { from: '\u{d0e}', to: '\u{d10}', mapping: Valid },
++    Range { from: '\u{d11}', to: '\u{d11}', mapping: Disallowed },
++    Range { from: '\u{d12}', to: '\u{d44}', mapping: Valid },
++    Range { from: '\u{d45}', to: '\u{d45}', mapping: Disallowed },
++    Range { from: '\u{d46}', to: '\u{d48}', mapping: Valid },
++    Range { from: '\u{d49}', to: '\u{d49}', mapping: Disallowed },
++    Range { from: '\u{d4a}', to: '\u{d4f}', mapping: Valid },
++    Range { from: '\u{d50}', to: '\u{d53}', mapping: Disallowed },
++    Range { from: '\u{d54}', to: '\u{d63}', mapping: Valid },
++    Range { from: '\u{d64}', to: '\u{d65}', mapping: Disallowed },
++    Range { from: '\u{d66}', to: '\u{d7f}', mapping: Valid },
++    Range { from: '\u{d80}', to: '\u{d81}', mapping: Disallowed },
++    Range { from: '\u{d82}', to: '\u{d83}', mapping: Valid },
++    Range { from: '\u{d84}', to: '\u{d84}', mapping: Disallowed },
++    Range { from: '\u{d85}', to: '\u{d96}', mapping: Valid },
++    Range { from: '\u{d97}', to: '\u{d99}', mapping: Disallowed },
++    Range { from: '\u{d9a}', to: '\u{db1}', mapping: Valid },
++    Range { from: '\u{db2}', to: '\u{db2}', mapping: Disallowed },
++    Range { from: '\u{db3}', to: '\u{dbb}', mapping: Valid },
++    Range { from: '\u{dbc}', to: '\u{dbc}', mapping: Disallowed },
++    Range { from: '\u{dbd}', to: '\u{dbd}', mapping: Valid },
++    Range { from: '\u{dbe}', to: '\u{dbf}', mapping: Disallowed },
++    Range { from: '\u{dc0}', to: '\u{dc6}', mapping: Valid },
++    Range { from: '\u{dc7}', to: '\u{dc9}', mapping: Disallowed },
++    Range { from: '\u{dca}', to: '\u{dca}', mapping: Valid },
++    Range { from: '\u{dcb}', to: '\u{dce}', mapping: Disallowed },
++    Range { from: '\u{dcf}', to: '\u{dd4}', mapping: Valid },
++    Range { from: '\u{dd5}', to: '\u{dd5}', mapping: Disallowed },
++    Range { from: '\u{dd6}', to: '\u{dd6}', mapping: Valid },
++    Range { from: '\u{dd7}', to: '\u{dd7}', mapping: Disallowed },
++    Range { from: '\u{dd8}', to: '\u{ddf}', mapping: Valid },
++    Range { from: '\u{de0}', to: '\u{de5}', mapping: Disallowed },
++    Range { from: '\u{de6}', to: '\u{def}', mapping: Valid },
++    Range { from: '\u{df0}', to: '\u{df1}', mapping: Disallowed },
++    Range { from: '\u{df2}', to: '\u{df4}', mapping: Valid },
++    Range { from: '\u{df5}', to: '\u{e00}', mapping: Disallowed },
++    Range { from: '\u{e01}', to: '\u{e32}', mapping: Valid },
++    Range { from: '\u{e33}', to: '\u{e33}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{e34}', to: '\u{e3a}', mapping: Valid },
++    Range { from: '\u{e3b}', to: '\u{e3e}', mapping: Disallowed },
++    Range { from: '\u{e3f}', to: '\u{e5b}', mapping: Valid },
++    Range { from: '\u{e5c}', to: '\u{e80}', mapping: Disallowed },
++    Range { from: '\u{e81}', to: '\u{e82}', mapping: Valid },
++    Range { from: '\u{e83}', to: '\u{e83}', mapping: Disallowed },
++    Range { from: '\u{e84}', to: '\u{e84}', mapping: Valid },
++    Range { from: '\u{e85}', to: '\u{e86}', mapping: Disallowed },
++    Range { from: '\u{e87}', to: '\u{e88}', mapping: Valid },
++    Range { from: '\u{e89}', to: '\u{e89}', mapping: Disallowed },
++    Range { from: '\u{e8a}', to: '\u{e8a}', mapping: Valid },
++    Range { from: '\u{e8b}', to: '\u{e8c}', mapping: Disallowed },
++    Range { from: '\u{e8d}', to: '\u{e8d}', mapping: Valid },
++    Range { from: '\u{e8e}', to: '\u{e93}', mapping: Disallowed },
++    Range { from: '\u{e94}', to: '\u{e97}', mapping: Valid },
++    Range { from: '\u{e98}', to: '\u{e98}', mapping: Disallowed },
++    Range { from: '\u{e99}', to: '\u{e9f}', mapping: Valid },
++    Range { from: '\u{ea0}', to: '\u{ea0}', mapping: Disallowed },
++    Range { from: '\u{ea1}', to: '\u{ea3}', mapping: Valid },
++    Range { from: '\u{ea4}', to: '\u{ea4}', mapping: Disallowed },
++    Range { from: '\u{ea5}', to: '\u{ea5}', mapping: Valid },
++    Range { from: '\u{ea6}', to: '\u{ea6}', mapping: Disallowed },
++    Range { from: '\u{ea7}', to: '\u{ea7}', mapping: Valid },
++    Range { from: '\u{ea8}', to: '\u{ea9}', mapping: Disallowed },
++    Range { from: '\u{eaa}', to: '\u{eab}', mapping: Valid },
++    Range { from: '\u{eac}', to: '\u{eac}', mapping: Disallowed },
++    Range { from: '\u{ead}', to: '\u{eb2}', mapping: Valid },
++    Range { from: '\u{eb3}', to: '\u{eb3}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{eb4}', to: '\u{eb9}', mapping: Valid },
++    Range { from: '\u{eba}', to: '\u{eba}', mapping: Disallowed },
++    Range { from: '\u{ebb}', to: '\u{ebd}', mapping: Valid },
++    Range { from: '\u{ebe}', to: '\u{ebf}', mapping: Disallowed },
++    Range { from: '\u{ec0}', to: '\u{ec4}', mapping: Valid },
++    Range { from: '\u{ec5}', to: '\u{ec5}', mapping: Disallowed },
++    Range { from: '\u{ec6}', to: '\u{ec6}', mapping: Valid },
++    Range { from: '\u{ec7}', to: '\u{ec7}', mapping: Disallowed },
++    Range { from: '\u{ec8}', to: '\u{ecd}', mapping: Valid },
++    Range { from: '\u{ece}', to: '\u{ecf}', mapping: Disallowed },
++    Range { from: '\u{ed0}', to: '\u{ed9}', mapping: Valid },
++    Range { from: '\u{eda}', to: '\u{edb}', mapping: Disallowed },
++    Range { from: '\u{edc}', to: '\u{edc}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{edd}', to: '\u{edd}', mapping: Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{ede}', to: '\u{edf}', mapping: Valid },
++    Range { from: '\u{ee0}', to: '\u{eff}', mapping: Disallowed },
++    Range { from: '\u{f00}', to: '\u{f0b}', mapping: Valid },
++    Range { from: '\u{f0c}', to: '\u{f0c}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 4, byte_len: 3 }) },
++    Range { from: '\u{f0d}', to: '\u{f42}', mapping: Valid },
++    Range { from: '\u{f43}', to: '\u{f43}', mapping: Mapped(StringTableSlice { byte_start_lo: 127, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{f44}', to: '\u{f47}', mapping: Valid },
++    Range { from: '\u{f48}', to: '\u{f48}', mapping: Disallowed },
++    Range { from: '\u{f49}', to: '\u{f4c}', mapping: Valid },
++    Range { from: '\u{f4d}', to: '\u{f4d}', mapping: Mapped(StringTableSlice { byte_start_lo: 133, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{f4e}', to: '\u{f51}', mapping: Valid },
++    Range { from: '\u{f52}', to: '\u{f52}', mapping: Mapped(StringTableSlice { byte_start_lo: 139, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{f53}', to: '\u{f56}', mapping: Valid },
++    Range { from: '\u{f57}', to: '\u{f57}', mapping: Mapped(StringTableSlice { byte_start_lo: 145, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{f58}', to: '\u{f5b}', mapping: Valid },
++    Range { from: '\u{f5c}', to: '\u{f5c}', mapping: Mapped(StringTableSlice { byte_start_lo: 151, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{f5d}', to: '\u{f68}', mapping: Valid },
++    Range { from: '\u{f69}', to: '\u{f69}', mapping: Mapped(StringTableSlice { byte_start_lo: 157, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{f6a}', to: '\u{f6c}', mapping: Valid },
++    Range { from: '\u{f6d}', to: '\u{f70}', mapping: Disallowed },
++    Range { from: '\u{f71}', to: '\u{f72}', mapping: Valid },
++    Range { from: '\u{f73}', to: '\u{f73}', mapping: Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{f74}', to: '\u{f74}', mapping: Valid },
++    Range { from: '\u{f75}', to: '\u{f75}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{f76}', to: '\u{f76}', mapping: Mapped(StringTableSlice { byte_start_lo: 175, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{f77}', to: '\u{f77}', mapping: Mapped(StringTableSlice { byte_start_lo: 181, byte_start_hi: 4, byte_len: 9 }) },
++    Range { from: '\u{f78}', to: '\u{f78}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{f79}', to: '\u{f79}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 4, byte_len: 9 }) },
++    Range { from: '\u{f7a}', to: '\u{f80}', mapping: Valid },
++    Range { from: '\u{f81}', to: '\u{f81}', mapping: Mapped(StringTableSlice { byte_start_lo: 205, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{f82}', to: '\u{f92}', mapping: Valid },
++    Range { from: '\u{f93}', to: '\u{f93}', mapping: Mapped(StringTableSlice { byte_start_lo: 211, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{f94}', to: '\u{f97}', mapping: Valid },
++    Range { from: '\u{f98}', to: '\u{f98}', mapping: Disallowed },
++    Range { from: '\u{f99}', to: '\u{f9c}', mapping: Valid },
++    Range { from: '\u{f9d}', to: '\u{f9d}', mapping: Mapped(StringTableSlice { byte_start_lo: 217, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{f9e}', to: '\u{fa1}', mapping: Valid },
++    Range { from: '\u{fa2}', to: '\u{fa2}', mapping: Mapped(StringTableSlice { byte_start_lo: 223, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{fa3}', to: '\u{fa6}', mapping: Valid },
++    Range { from: '\u{fa7}', to: '\u{fa7}', mapping: Mapped(StringTableSlice { byte_start_lo: 229, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{fa8}', to: '\u{fab}', mapping: Valid },
++    Range { from: '\u{fac}', to: '\u{fac}', mapping: Mapped(StringTableSlice { byte_start_lo: 235, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{fad}', to: '\u{fb8}', mapping: Valid },
++    Range { from: '\u{fb9}', to: '\u{fb9}', mapping: Mapped(StringTableSlice { byte_start_lo: 241, byte_start_hi: 4, byte_len: 6 }) },
++    Range { from: '\u{fba}', to: '\u{fbc}', mapping: Valid },
++    Range { from: '\u{fbd}', to: '\u{fbd}', mapping: Disallowed },
++    Range { from: '\u{fbe}', to: '\u{fcc}', mapping: Valid },
++    Range { from: '\u{fcd}', to: '\u{fcd}', mapping: Disallowed },
++    Range { from: '\u{fce}', to: '\u{fda}', mapping: Valid },
++    Range { from: '\u{fdb}', to: '\u{fff}', mapping: Disallowed },
++    Range { from: '\u{1000}', to: '\u{109f}', mapping: Valid },
++    Range { from: '\u{10a0}', to: '\u{10c6}', mapping: Disallowed },
++    Range { from: '\u{10c7}', to: '\u{10c7}', mapping: Mapped(StringTableSlice { byte_start_lo: 247, byte_start_hi: 4, byte_len: 3 }) },
++    Range { from: '\u{10c8}', to: '\u{10cc}', mapping: Disallowed },
++    Range { from: '\u{10cd}', to: '\u{10cd}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 4, byte_len: 3 }) },
++    Range { from: '\u{10ce}', to: '\u{10cf}', mapping: Disallowed },
++    Range { from: '\u{10d0}', to: '\u{10fb}', mapping: Valid },
++    Range { from: '\u{10fc}', to: '\u{10fc}', mapping: Mapped(StringTableSlice { byte_start_lo: 253, byte_start_hi: 4, byte_len: 3 }) },
++    Range { from: '\u{10fd}', to: '\u{115e}', mapping: Valid },
++    Range { from: '\u{115f}', to: '\u{1160}', mapping: Disallowed },
++    Range { from: '\u{1161}', to: '\u{1248}', mapping: Valid },
++    Range { from: '\u{1249}', to: '\u{1249}', mapping: Disallowed },
++    Range { from: '\u{124a}', to: '\u{124d}', mapping: Valid },
++    Range { from: '\u{124e}', to: '\u{124f}', mapping: Disallowed },
++    Range { from: '\u{1250}', to: '\u{1256}', mapping: Valid },
++    Range { from: '\u{1257}', to: '\u{1257}', mapping: Disallowed },
++    Range { from: '\u{1258}', to: '\u{1258}', mapping: Valid },
++    Range { from: '\u{1259}', to: '\u{1259}', mapping: Disallowed },
++    Range { from: '\u{125a}', to: '\u{125d}', mapping: Valid },
++    Range { from: '\u{125e}', to: '\u{125f}', mapping: Disallowed },
++    Range { from: '\u{1260}', to: '\u{1288}', mapping: Valid },
++    Range { from: '\u{1289}', to: '\u{1289}', mapping: Disallowed },
++    Range { from: '\u{128a}', to: '\u{128d}', mapping: Valid },
++    Range { from: '\u{128e}', to: '\u{128f}', mapping: Disallowed },
++    Range { from: '\u{1290}', to: '\u{12b0}', mapping: Valid },
++    Range { from: '\u{12b1}', to: '\u{12b1}', mapping: Disallowed },
++    Range { from: '\u{12b2}', to: '\u{12b5}', mapping: Valid },
++    Range { from: '\u{12b6}', to: '\u{12b7}', mapping: Disallowed },
++    Range { from: '\u{12b8}', to: '\u{12be}', mapping: Valid },
++    Range { from: '\u{12bf}', to: '\u{12bf}', mapping: Disallowed },
++    Range { from: '\u{12c0}', to: '\u{12c0}', mapping: Valid },
++    Range { from: '\u{12c1}', to: '\u{12c1}', mapping: Disallowed },
++    Range { from: '\u{12c2}', to: '\u{12c5}', mapping: Valid },
++    Range { from: '\u{12c6}', to: '\u{12c7}', mapping: Disallowed },
++    Range { from: '\u{12c8}', to: '\u{12d6}', mapping: Valid },
++    Range { from: '\u{12d7}', to: '\u{12d7}', mapping: Disallowed },
++    Range { from: '\u{12d8}', to: '\u{1310}', mapping: Valid },
++    Range { from: '\u{1311}', to: '\u{1311}', mapping: Disallowed },
++    Range { from: '\u{1312}', to: '\u{1315}', mapping: Valid },
++    Range { from: '\u{1316}', to: '\u{1317}', mapping: Disallowed },
++    Range { from: '\u{1318}', to: '\u{135a}', mapping: Valid },
++    Range { from: '\u{135b}', to: '\u{135c}', mapping: Disallowed },
++    Range { from: '\u{135d}', to: '\u{137c}', mapping: Valid },
++    Range { from: '\u{137d}', to: '\u{137f}', mapping: Disallowed },
++    Range { from: '\u{1380}', to: '\u{1399}', mapping: Valid },
++    Range { from: '\u{139a}', to: '\u{139f}', mapping: Disallowed },
++    Range { from: '\u{13a0}', to: '\u{13f5}', mapping: Valid },
++    Range { from: '\u{13f6}', to: '\u{13f7}', mapping: Disallowed },
++    Range { from: '\u{13f8}', to: '\u{13f8}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{13f9}', to: '\u{13f9}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{13fa}', to: '\u{13fa}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{13fb}', to: '\u{13fb}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{13fc}', to: '\u{13fc}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{13fd}', to: '\u{13fd}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{13fe}', to: '\u{13ff}', mapping: Disallowed },
++    Range { from: '\u{1400}', to: '\u{167f}', mapping: Valid },
++    Range { from: '\u{1680}', to: '\u{1680}', mapping: Disallowed },
++    Range { from: '\u{1681}', to: '\u{169c}', mapping: Valid },
++    Range { from: '\u{169d}', to: '\u{169f}', mapping: Disallowed },
++    Range { from: '\u{16a0}', to: '\u{16f8}', mapping: Valid },
++    Range { from: '\u{16f9}', to: '\u{16ff}', mapping: Disallowed },
++    Range { from: '\u{1700}', to: '\u{170c}', mapping: Valid },
++    Range { from: '\u{170d}', to: '\u{170d}', mapping: Disallowed },
++    Range { from: '\u{170e}', to: '\u{1714}', mapping: Valid },
++    Range { from: '\u{1715}', to: '\u{171f}', mapping: Disallowed },
++    Range { from: '\u{1720}', to: '\u{1736}', mapping: Valid },
++    Range { from: '\u{1737}', to: '\u{173f}', mapping: Disallowed },
++    Range { from: '\u{1740}', to: '\u{1753}', mapping: Valid },
++    Range { from: '\u{1754}', to: '\u{175f}', mapping: Disallowed },
++    Range { from: '\u{1760}', to: '\u{176c}', mapping: Valid },
++    Range { from: '\u{176d}', to: '\u{176d}', mapping: Disallowed },
++    Range { from: '\u{176e}', to: '\u{1770}', mapping: Valid },
++    Range { from: '\u{1771}', to: '\u{1771}', mapping: Disallowed },
++    Range { from: '\u{1772}', to: '\u{1773}', mapping: Valid },
++    Range { from: '\u{1774}', to: '\u{177f}', mapping: Disallowed },
++    Range { from: '\u{1780}', to: '\u{17b3}', mapping: Valid },
++    Range { from: '\u{17b4}', to: '\u{17b5}', mapping: Disallowed },
++    Range { from: '\u{17b6}', to: '\u{17dd}', mapping: Valid },
++    Range { from: '\u{17de}', to: '\u{17df}', mapping: Disallowed },
++    Range { from: '\u{17e0}', to: '\u{17e9}', mapping: Valid },
++    Range { from: '\u{17ea}', to: '\u{17ef}', mapping: Disallowed },
++    Range { from: '\u{17f0}', to: '\u{17f9}', mapping: Valid },
++    Range { from: '\u{17fa}', to: '\u{17ff}', mapping: Disallowed },
++    Range { from: '\u{1800}', to: '\u{1805}', mapping: Valid },
++    Range { from: '\u{1806}', to: '\u{1806}', mapping: Disallowed },
++    Range { from: '\u{1807}', to: '\u{180a}', mapping: Valid },
++    Range { from: '\u{180b}', to: '\u{180d}', mapping: Ignored },
++    Range { from: '\u{180e}', to: '\u{180f}', mapping: Disallowed },
++    Range { from: '\u{1810}', to: '\u{1819}', mapping: Valid },
++    Range { from: '\u{181a}', to: '\u{181f}', mapping: Disallowed },
++    Range { from: '\u{1820}', to: '\u{1877}', mapping: Valid },
++    Range { from: '\u{1878}', to: '\u{187f}', mapping: Disallowed },
++    Range { from: '\u{1880}', to: '\u{18aa}', mapping: Valid },
++    Range { from: '\u{18ab}', to: '\u{18af}', mapping: Disallowed },
++    Range { from: '\u{18b0}', to: '\u{18f5}', mapping: Valid },
++    Range { from: '\u{18f6}', to: '\u{18ff}', mapping: Disallowed },
++    Range { from: '\u{1900}', to: '\u{191e}', mapping: Valid },
++    Range { from: '\u{191f}', to: '\u{191f}', mapping: Disallowed },
++    Range { from: '\u{1920}', to: '\u{192b}', mapping: Valid },
++    Range { from: '\u{192c}', to: '\u{192f}', mapping: Disallowed },
++    Range { from: '\u{1930}', to: '\u{193b}', mapping: Valid },
++    Range { from: '\u{193c}', to: '\u{193f}', mapping: Disallowed },
++    Range { from: '\u{1940}', to: '\u{1940}', mapping: Valid },
++    Range { from: '\u{1941}', to: '\u{1943}', mapping: Disallowed },
++    Range { from: '\u{1944}', to: '\u{196d}', mapping: Valid },
++    Range { from: '\u{196e}', to: '\u{196f}', mapping: Disallowed },
++    Range { from: '\u{1970}', to: '\u{1974}', mapping: Valid },
++    Range { from: '\u{1975}', to: '\u{197f}', mapping: Disallowed },
++    Range { from: '\u{1980}', to: '\u{19ab}', mapping: Valid },
++    Range { from: '\u{19ac}', to: '\u{19af}', mapping: Disallowed },
++    Range { from: '\u{19b0}', to: '\u{19c9}', mapping: Valid },
++    Range { from: '\u{19ca}', to: '\u{19cf}', mapping: Disallowed },
++    Range { from: '\u{19d0}', to: '\u{19da}', mapping: Valid },
++    Range { from: '\u{19db}', to: '\u{19dd}', mapping: Disallowed },
++    Range { from: '\u{19de}', to: '\u{1a1b}', mapping: Valid },
++    Range { from: '\u{1a1c}', to: '\u{1a1d}', mapping: Disallowed },
++    Range { from: '\u{1a1e}', to: '\u{1a5e}', mapping: Valid },
++    Range { from: '\u{1a5f}', to: '\u{1a5f}', mapping: Disallowed },
++    Range { from: '\u{1a60}', to: '\u{1a7c}', mapping: Valid },
++    Range { from: '\u{1a7d}', to: '\u{1a7e}', mapping: Disallowed },
++    Range { from: '\u{1a7f}', to: '\u{1a89}', mapping: Valid },
++    Range { from: '\u{1a8a}', to: '\u{1a8f}', mapping: Disallowed },
++    Range { from: '\u{1a90}', to: '\u{1a99}', mapping: Valid },
++    Range { from: '\u{1a9a}', to: '\u{1a9f}', mapping: Disallowed },
++    Range { from: '\u{1aa0}', to: '\u{1aad}', mapping: Valid },
++    Range { from: '\u{1aae}', to: '\u{1aaf}', mapping: Disallowed },
++    Range { from: '\u{1ab0}', to: '\u{1abe}', mapping: Valid },
++    Range { from: '\u{1abf}', to: '\u{1aff}', mapping: Disallowed },
++    Range { from: '\u{1b00}', to: '\u{1b4b}', mapping: Valid },
++    Range { from: '\u{1b4c}', to: '\u{1b4f}', mapping: Disallowed },
++    Range { from: '\u{1b50}', to: '\u{1b7c}', mapping: Valid },
++    Range { from: '\u{1b7d}', to: '\u{1b7f}', mapping: Disallowed },
++    Range { from: '\u{1b80}', to: '\u{1bf3}', mapping: Valid },
++    Range { from: '\u{1bf4}', to: '\u{1bfb}', mapping: Disallowed },
++    Range { from: '\u{1bfc}', to: '\u{1c37}', mapping: Valid },
++    Range { from: '\u{1c38}', to: '\u{1c3a}', mapping: Disallowed },
++    Range { from: '\u{1c3b}', to: '\u{1c49}', mapping: Valid },
++    Range { from: '\u{1c4a}', to: '\u{1c4c}', mapping: Disallowed },
++    Range { from: '\u{1c4d}', to: '\u{1c7f}', mapping: Valid },
++    Range { from: '\u{1c80}', to: '\u{1c80}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1c81}', to: '\u{1c81}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1c82}', to: '\u{1c82}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1c83}', to: '\u{1c83}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1c84}', to: '\u{1c85}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1c86}', to: '\u{1c86}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1c87}', to: '\u{1c87}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1c88}', to: '\u{1c88}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1c89}', to: '\u{1cbf}', mapping: Disallowed },
++    Range { from: '\u{1cc0}', to: '\u{1cc7}', mapping: Valid },
++    Range { from: '\u{1cc8}', to: '\u{1ccf}', mapping: Disallowed },
++    Range { from: '\u{1cd0}', to: '\u{1cf9}', mapping: Valid },
++    Range { from: '\u{1cfa}', to: '\u{1cff}', mapping: Disallowed },
++    Range { from: '\u{1d00}', to: '\u{1d2b}', mapping: Valid },
++    Range { from: '\u{1d2c}', to: '\u{1d2c}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d2d}', to: '\u{1d2d}', mapping: Mapped(StringTableSlice { byte_start_lo: 71, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{1d2e}', to: '\u{1d2e}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d2f}', to: '\u{1d2f}', mapping: Valid },
++    Range { from: '\u{1d30}', to: '\u{1d30}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d31}', to: '\u{1d31}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d32}', to: '\u{1d32}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d33}', to: '\u{1d33}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d34}', to: '\u{1d34}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d35}', to: '\u{1d35}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d36}', to: '\u{1d36}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d37}', to: '\u{1d37}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d38}', to: '\u{1d38}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d39}', to: '\u{1d39}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d3a}', to: '\u{1d3a}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d3b}', to: '\u{1d3b}', mapping: Valid },
++    Range { from: '\u{1d3c}', to: '\u{1d3c}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d3d}', to: '\u{1d3d}', mapping: Mapped(StringTableSlice { byte_start_lo: 159, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d3e}', to: '\u{1d3e}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d3f}', to: '\u{1d3f}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d40}', to: '\u{1d40}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d41}', to: '\u{1d41}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d42}', to: '\u{1d42}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d43}', to: '\u{1d43}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d44}', to: '\u{1d44}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1d45}', to: '\u{1d45}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1d46}', to: '\u{1d46}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1d47}', to: '\u{1d47}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d48}', to: '\u{1d48}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d49}', to: '\u{1d49}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4a}', to: '\u{1d4a}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d4b}', to: '\u{1d4b}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d4c}', to: '\u{1d4c}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1d4d}', to: '\u{1d4d}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4e}', to: '\u{1d4e}', mapping: Valid },
++    Range { from: '\u{1d4f}', to: '\u{1d4f}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d50}', to: '\u{1d50}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d51}', to: '\u{1d51}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{1d52}', to: '\u{1d52}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d53}', to: '\u{1d53}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d54}', to: '\u{1d54}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1d55}', to: '\u{1d55}', mapping: Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1d56}', to: '\u{1d56}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d57}', to: '\u{1d57}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d58}', to: '\u{1d58}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d59}', to: '\u{1d59}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1d5a}', to: '\u{1d5a}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d5b}', to: '\u{1d5b}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5c}', to: '\u{1d5c}', mapping: Mapped(StringTableSlice { byte_start_lo: 39, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1d5d}', to: '\u{1d5d}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d5e}', to: '\u{1d5e}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d5f}', to: '\u{1d5f}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d60}', to: '\u{1d60}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d61}', to: '\u{1d61}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d62}', to: '\u{1d62}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d63}', to: '\u{1d63}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d64}', to: '\u{1d64}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d65}', to: '\u{1d65}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d66}', to: '\u{1d66}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d67}', to: '\u{1d67}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d68}', to: '\u{1d68}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d69}', to: '\u{1d69}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6a}', to: '\u{1d6a}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6b}', to: '\u{1d77}', mapping: Valid },
++    Range { from: '\u{1d78}', to: '\u{1d78}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d79}', to: '\u{1d9a}', mapping: Valid },
++    Range { from: '\u{1d9b}', to: '\u{1d9b}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1d9c}', to: '\u{1d9c}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d9d}', to: '\u{1d9d}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1d9e}', to: '\u{1d9e}', mapping: Mapped(StringTableSlice { byte_start_lo: 91, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{1d9f}', to: '\u{1d9f}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1da0}', to: '\u{1da0}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1da1}', to: '\u{1da1}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1da2}', to: '\u{1da2}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1da3}', to: '\u{1da3}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1da4}', to: '\u{1da4}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1da5}', to: '\u{1da5}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1da6}', to: '\u{1da6}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1da7}', to: '\u{1da7}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1da8}', to: '\u{1da8}', mapping: Mapped(StringTableSlice { byte_start_lo: 57, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1da9}', to: '\u{1da9}', mapping: Mapped(StringTableSlice { byte_start_lo: 59, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1daa}', to: '\u{1daa}', mapping: Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1dab}', to: '\u{1dab}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1dac}', to: '\u{1dac}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1dad}', to: '\u{1dad}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1dae}', to: '\u{1dae}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1daf}', to: '\u{1daf}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1db0}', to: '\u{1db0}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1db1}', to: '\u{1db1}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1db2}', to: '\u{1db2}', mapping: Mapped(StringTableSlice { byte_start_lo: 74, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1db3}', to: '\u{1db3}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1db4}', to: '\u{1db4}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1db5}', to: '\u{1db5}', mapping: Mapped(StringTableSlice { byte_start_lo: 78, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1db6}', to: '\u{1db6}', mapping: Mapped(StringTableSlice { byte_start_lo: 191, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1db7}', to: '\u{1db7}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1db8}', to: '\u{1db8}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1db9}', to: '\u{1db9}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1dba}', to: '\u{1dba}', mapping: Mapped(StringTableSlice { byte_start_lo: 193, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1dbb}', to: '\u{1dbb}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1dbc}', to: '\u{1dbc}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1dbd}', to: '\u{1dbd}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{1dbe}', to: '\u{1dbe}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1dbf}', to: '\u{1dbf}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1dc0}', to: '\u{1df9}', mapping: Valid },
++    Range { from: '\u{1dfa}', to: '\u{1dfa}', mapping: Disallowed },
++    Range { from: '\u{1dfb}', to: '\u{1dff}', mapping: Valid },
++    Range { from: '\u{1e00}', to: '\u{1e00}', mapping: Mapped(StringTableSlice { byte_start_lo: 87, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e01}', to: '\u{1e01}', mapping: Valid },
++    Range { from: '\u{1e02}', to: '\u{1e02}', mapping: Mapped(StringTableSlice { byte_start_lo: 90, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e03}', to: '\u{1e03}', mapping: Valid },
++    Range { from: '\u{1e04}', to: '\u{1e04}', mapping: Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e05}', to: '\u{1e05}', mapping: Valid },
++    Range { from: '\u{1e06}', to: '\u{1e06}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e07}', to: '\u{1e07}', mapping: Valid },
++    Range { from: '\u{1e08}', to: '\u{1e08}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e09}', to: '\u{1e09}', mapping: Valid },
++    Range { from: '\u{1e0a}', to: '\u{1e0a}', mapping: Mapped(StringTableSlice { byte_start_lo: 102, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e0b}', to: '\u{1e0b}', mapping: Valid },
++    Range { from: '\u{1e0c}', to: '\u{1e0c}', mapping: Mapped(StringTableSlice { byte_start_lo: 105, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e0d}', to: '\u{1e0d}', mapping: Valid },
++    Range { from: '\u{1e0e}', to: '\u{1e0e}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e0f}', to: '\u{1e0f}', mapping: Valid },
++    Range { from: '\u{1e10}', to: '\u{1e10}', mapping: Mapped(StringTableSlice { byte_start_lo: 111, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e11}', to: '\u{1e11}', mapping: Valid },
++    Range { from: '\u{1e12}', to: '\u{1e12}', mapping: Mapped(StringTableSlice { byte_start_lo: 114, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e13}', to: '\u{1e13}', mapping: Valid },
++    Range { from: '\u{1e14}', to: '\u{1e14}', mapping: Mapped(StringTableSlice { byte_start_lo: 117, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e15}', to: '\u{1e15}', mapping: Valid },
++    Range { from: '\u{1e16}', to: '\u{1e16}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e17}', to: '\u{1e17}', mapping: Valid },
++    Range { from: '\u{1e18}', to: '\u{1e18}', mapping: Mapped(StringTableSlice { byte_start_lo: 123, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e19}', to: '\u{1e19}', mapping: Valid },
++    Range { from: '\u{1e1a}', to: '\u{1e1a}', mapping: Mapped(StringTableSlice { byte_start_lo: 126, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e1b}', to: '\u{1e1b}', mapping: Valid },
++    Range { from: '\u{1e1c}', to: '\u{1e1c}', mapping: Mapped(StringTableSlice { byte_start_lo: 129, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e1d}', to: '\u{1e1d}', mapping: Valid },
++    Range { from: '\u{1e1e}', to: '\u{1e1e}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e1f}', to: '\u{1e1f}', mapping: Valid },
++    Range { from: '\u{1e20}', to: '\u{1e20}', mapping: Mapped(StringTableSlice { byte_start_lo: 135, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e21}', to: '\u{1e21}', mapping: Valid },
++    Range { from: '\u{1e22}', to: '\u{1e22}', mapping: Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e23}', to: '\u{1e23}', mapping: Valid },
++    Range { from: '\u{1e24}', to: '\u{1e24}', mapping: Mapped(StringTableSlice { byte_start_lo: 141, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e25}', to: '\u{1e25}', mapping: Valid },
++    Range { from: '\u{1e26}', to: '\u{1e26}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e27}', to: '\u{1e27}', mapping: Valid },
++    Range { from: '\u{1e28}', to: '\u{1e28}', mapping: Mapped(StringTableSlice { byte_start_lo: 147, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e29}', to: '\u{1e29}', mapping: Valid },
++    Range { from: '\u{1e2a}', to: '\u{1e2a}', mapping: Mapped(StringTableSlice { byte_start_lo: 150, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e2b}', to: '\u{1e2b}', mapping: Valid },
++    Range { from: '\u{1e2c}', to: '\u{1e2c}', mapping: Mapped(StringTableSlice { byte_start_lo: 153, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e2d}', to: '\u{1e2d}', mapping: Valid },
++    Range { from: '\u{1e2e}', to: '\u{1e2e}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e2f}', to: '\u{1e2f}', mapping: Valid },
++    Range { from: '\u{1e30}', to: '\u{1e30}', mapping: Mapped(StringTableSlice { byte_start_lo: 159, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e31}', to: '\u{1e31}', mapping: Valid },
++    Range { from: '\u{1e32}', to: '\u{1e32}', mapping: Mapped(StringTableSlice { byte_start_lo: 162, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e33}', to: '\u{1e33}', mapping: Valid },
++    Range { from: '\u{1e34}', to: '\u{1e34}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e35}', to: '\u{1e35}', mapping: Valid },
++    Range { from: '\u{1e36}', to: '\u{1e36}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e37}', to: '\u{1e37}', mapping: Valid },
++    Range { from: '\u{1e38}', to: '\u{1e38}', mapping: Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e39}', to: '\u{1e39}', mapping: Valid },
++    Range { from: '\u{1e3a}', to: '\u{1e3a}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e3b}', to: '\u{1e3b}', mapping: Valid },
++    Range { from: '\u{1e3c}', to: '\u{1e3c}', mapping: Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e3d}', to: '\u{1e3d}', mapping: Valid },
++    Range { from: '\u{1e3e}', to: '\u{1e3e}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e3f}', to: '\u{1e3f}', mapping: Valid },
++    Range { from: '\u{1e40}', to: '\u{1e40}', mapping: Mapped(StringTableSlice { byte_start_lo: 183, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e41}', to: '\u{1e41}', mapping: Valid },
++    Range { from: '\u{1e42}', to: '\u{1e42}', mapping: Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e43}', to: '\u{1e43}', mapping: Valid },
++    Range { from: '\u{1e44}', to: '\u{1e44}', mapping: Mapped(StringTableSlice { byte_start_lo: 189, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e45}', to: '\u{1e45}', mapping: Valid },
++    Range { from: '\u{1e46}', to: '\u{1e46}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e47}', to: '\u{1e47}', mapping: Valid },
++    Range { from: '\u{1e48}', to: '\u{1e48}', mapping: Mapped(StringTableSlice { byte_start_lo: 195, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e49}', to: '\u{1e49}', mapping: Valid },
++    Range { from: '\u{1e4a}', to: '\u{1e4a}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e4b}', to: '\u{1e4b}', mapping: Valid },
++    Range { from: '\u{1e4c}', to: '\u{1e4c}', mapping: Mapped(StringTableSlice { byte_start_lo: 201, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e4d}', to: '\u{1e4d}', mapping: Valid },
++    Range { from: '\u{1e4e}', to: '\u{1e4e}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e4f}', to: '\u{1e4f}', mapping: Valid },
++    Range { from: '\u{1e50}', to: '\u{1e50}', mapping: Mapped(StringTableSlice { byte_start_lo: 207, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e51}', to: '\u{1e51}', mapping: Valid },
++    Range { from: '\u{1e52}', to: '\u{1e52}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e53}', to: '\u{1e53}', mapping: Valid },
++    Range { from: '\u{1e54}', to: '\u{1e54}', mapping: Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e55}', to: '\u{1e55}', mapping: Valid },
++    Range { from: '\u{1e56}', to: '\u{1e56}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e57}', to: '\u{1e57}', mapping: Valid },
++    Range { from: '\u{1e58}', to: '\u{1e58}', mapping: Mapped(StringTableSlice { byte_start_lo: 219, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e59}', to: '\u{1e59}', mapping: Valid },
++    Range { from: '\u{1e5a}', to: '\u{1e5a}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e5b}', to: '\u{1e5b}', mapping: Valid },
++    Range { from: '\u{1e5c}', to: '\u{1e5c}', mapping: Mapped(StringTableSlice { byte_start_lo: 225, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e5d}', to: '\u{1e5d}', mapping: Valid },
++    Range { from: '\u{1e5e}', to: '\u{1e5e}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e5f}', to: '\u{1e5f}', mapping: Valid },
++    Range { from: '\u{1e60}', to: '\u{1e60}', mapping: Mapped(StringTableSlice { byte_start_lo: 231, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e61}', to: '\u{1e61}', mapping: Valid },
++    Range { from: '\u{1e62}', to: '\u{1e62}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e63}', to: '\u{1e63}', mapping: Valid },
++    Range { from: '\u{1e64}', to: '\u{1e64}', mapping: Mapped(StringTableSlice { byte_start_lo: 237, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e65}', to: '\u{1e65}', mapping: Valid },
++    Range { from: '\u{1e66}', to: '\u{1e66}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e67}', to: '\u{1e67}', mapping: Valid },
++    Range { from: '\u{1e68}', to: '\u{1e68}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e69}', to: '\u{1e69}', mapping: Valid },
++    Range { from: '\u{1e6a}', to: '\u{1e6a}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e6b}', to: '\u{1e6b}', mapping: Valid },
++    Range { from: '\u{1e6c}', to: '\u{1e6c}', mapping: Mapped(StringTableSlice { byte_start_lo: 249, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e6d}', to: '\u{1e6d}', mapping: Valid },
++    Range { from: '\u{1e6e}', to: '\u{1e6e}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e6f}', to: '\u{1e6f}', mapping: Valid },
++    Range { from: '\u{1e70}', to: '\u{1e70}', mapping: Mapped(StringTableSlice { byte_start_lo: 255, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e71}', to: '\u{1e71}', mapping: Valid },
++    Range { from: '\u{1e72}', to: '\u{1e72}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e73}', to: '\u{1e73}', mapping: Valid },
++    Range { from: '\u{1e74}', to: '\u{1e74}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e75}', to: '\u{1e75}', mapping: Valid },
++    Range { from: '\u{1e76}', to: '\u{1e76}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e77}', to: '\u{1e77}', mapping: Valid },
++    Range { from: '\u{1e78}', to: '\u{1e78}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e79}', to: '\u{1e79}', mapping: Valid },
++    Range { from: '\u{1e7a}', to: '\u{1e7a}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e7b}', to: '\u{1e7b}', mapping: Valid },
++    Range { from: '\u{1e7c}', to: '\u{1e7c}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e7d}', to: '\u{1e7d}', mapping: Valid },
++    Range { from: '\u{1e7e}', to: '\u{1e7e}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e7f}', to: '\u{1e7f}', mapping: Valid },
++    Range { from: '\u{1e80}', to: '\u{1e80}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e81}', to: '\u{1e81}', mapping: Valid },
++    Range { from: '\u{1e82}', to: '\u{1e82}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e83}', to: '\u{1e83}', mapping: Valid },
++    Range { from: '\u{1e84}', to: '\u{1e84}', mapping: Mapped(StringTableSlice { byte_start_lo: 29, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e85}', to: '\u{1e85}', mapping: Valid },
++    Range { from: '\u{1e86}', to: '\u{1e86}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e87}', to: '\u{1e87}', mapping: Valid },
++    Range { from: '\u{1e88}', to: '\u{1e88}', mapping: Mapped(StringTableSlice { byte_start_lo: 35, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e89}', to: '\u{1e89}', mapping: Valid },
++    Range { from: '\u{1e8a}', to: '\u{1e8a}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e8b}', to: '\u{1e8b}', mapping: Valid },
++    Range { from: '\u{1e8c}', to: '\u{1e8c}', mapping: Mapped(StringTableSlice { byte_start_lo: 41, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e8d}', to: '\u{1e8d}', mapping: Valid },
++    Range { from: '\u{1e8e}', to: '\u{1e8e}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e8f}', to: '\u{1e8f}', mapping: Valid },
++    Range { from: '\u{1e90}', to: '\u{1e90}', mapping: Mapped(StringTableSlice { byte_start_lo: 47, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e91}', to: '\u{1e91}', mapping: Valid },
++    Range { from: '\u{1e92}', to: '\u{1e92}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e93}', to: '\u{1e93}', mapping: Valid },
++    Range { from: '\u{1e94}', to: '\u{1e94}', mapping: Mapped(StringTableSlice { byte_start_lo: 53, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e95}', to: '\u{1e99}', mapping: Valid },
++    Range { from: '\u{1e9a}', to: '\u{1e9a}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1e9b}', to: '\u{1e9b}', mapping: Mapped(StringTableSlice { byte_start_lo: 231, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{1e9c}', to: '\u{1e9d}', mapping: Valid },
++    Range { from: '\u{1e9e}', to: '\u{1e9e}', mapping: Mapped(StringTableSlice { byte_start_lo: 119, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{1e9f}', to: '\u{1e9f}', mapping: Valid },
++    Range { from: '\u{1ea0}', to: '\u{1ea0}', mapping: Mapped(StringTableSlice { byte_start_lo: 59, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ea1}', to: '\u{1ea1}', mapping: Valid },
++    Range { from: '\u{1ea2}', to: '\u{1ea2}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ea3}', to: '\u{1ea3}', mapping: Valid },
++    Range { from: '\u{1ea4}', to: '\u{1ea4}', mapping: Mapped(StringTableSlice { byte_start_lo: 65, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ea5}', to: '\u{1ea5}', mapping: Valid },
++    Range { from: '\u{1ea6}', to: '\u{1ea6}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ea7}', to: '\u{1ea7}', mapping: Valid },
++    Range { from: '\u{1ea8}', to: '\u{1ea8}', mapping: Mapped(StringTableSlice { byte_start_lo: 71, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ea9}', to: '\u{1ea9}', mapping: Valid },
++    Range { from: '\u{1eaa}', to: '\u{1eaa}', mapping: Mapped(StringTableSlice { byte_start_lo: 74, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1eab}', to: '\u{1eab}', mapping: Valid },
++    Range { from: '\u{1eac}', to: '\u{1eac}', mapping: Mapped(StringTableSlice { byte_start_lo: 77, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ead}', to: '\u{1ead}', mapping: Valid },
++    Range { from: '\u{1eae}', to: '\u{1eae}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1eaf}', to: '\u{1eaf}', mapping: Valid },
++    Range { from: '\u{1eb0}', to: '\u{1eb0}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1eb1}', to: '\u{1eb1}', mapping: Valid },
++    Range { from: '\u{1eb2}', to: '\u{1eb2}', mapping: Mapped(StringTableSlice { byte_start_lo: 86, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1eb3}', to: '\u{1eb3}', mapping: Valid },
++    Range { from: '\u{1eb4}', to: '\u{1eb4}', mapping: Mapped(StringTableSlice { byte_start_lo: 89, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1eb5}', to: '\u{1eb5}', mapping: Valid },
++    Range { from: '\u{1eb6}', to: '\u{1eb6}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1eb7}', to: '\u{1eb7}', mapping: Valid },
++    Range { from: '\u{1eb8}', to: '\u{1eb8}', mapping: Mapped(StringTableSlice { byte_start_lo: 95, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1eb9}', to: '\u{1eb9}', mapping: Valid },
++    Range { from: '\u{1eba}', to: '\u{1eba}', mapping: Mapped(StringTableSlice { byte_start_lo: 98, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ebb}', to: '\u{1ebb}', mapping: Valid },
++    Range { from: '\u{1ebc}', to: '\u{1ebc}', mapping: Mapped(StringTableSlice { byte_start_lo: 101, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ebd}', to: '\u{1ebd}', mapping: Valid },
++    Range { from: '\u{1ebe}', to: '\u{1ebe}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ebf}', to: '\u{1ebf}', mapping: Valid },
++    Range { from: '\u{1ec0}', to: '\u{1ec0}', mapping: Mapped(StringTableSlice { byte_start_lo: 107, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ec1}', to: '\u{1ec1}', mapping: Valid },
++    Range { from: '\u{1ec2}', to: '\u{1ec2}', mapping: Mapped(StringTableSlice { byte_start_lo: 110, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ec3}', to: '\u{1ec3}', mapping: Valid },
++    Range { from: '\u{1ec4}', to: '\u{1ec4}', mapping: Mapped(StringTableSlice { byte_start_lo: 113, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ec5}', to: '\u{1ec5}', mapping: Valid },
++    Range { from: '\u{1ec6}', to: '\u{1ec6}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ec7}', to: '\u{1ec7}', mapping: Valid },
++    Range { from: '\u{1ec8}', to: '\u{1ec8}', mapping: Mapped(StringTableSlice { byte_start_lo: 119, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ec9}', to: '\u{1ec9}', mapping: Valid },
++    Range { from: '\u{1eca}', to: '\u{1eca}', mapping: Mapped(StringTableSlice { byte_start_lo: 122, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ecb}', to: '\u{1ecb}', mapping: Valid },
++    Range { from: '\u{1ecc}', to: '\u{1ecc}', mapping: Mapped(StringTableSlice { byte_start_lo: 125, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ecd}', to: '\u{1ecd}', mapping: Valid },
++    Range { from: '\u{1ece}', to: '\u{1ece}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ecf}', to: '\u{1ecf}', mapping: Valid },
++    Range { from: '\u{1ed0}', to: '\u{1ed0}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ed1}', to: '\u{1ed1}', mapping: Valid },
++    Range { from: '\u{1ed2}', to: '\u{1ed2}', mapping: Mapped(StringTableSlice { byte_start_lo: 134, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ed3}', to: '\u{1ed3}', mapping: Valid },
++    Range { from: '\u{1ed4}', to: '\u{1ed4}', mapping: Mapped(StringTableSlice { byte_start_lo: 137, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ed5}', to: '\u{1ed5}', mapping: Valid },
++    Range { from: '\u{1ed6}', to: '\u{1ed6}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ed7}', to: '\u{1ed7}', mapping: Valid },
++    Range { from: '\u{1ed8}', to: '\u{1ed8}', mapping: Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ed9}', to: '\u{1ed9}', mapping: Valid },
++    Range { from: '\u{1eda}', to: '\u{1eda}', mapping: Mapped(StringTableSlice { byte_start_lo: 146, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1edb}', to: '\u{1edb}', mapping: Valid },
++    Range { from: '\u{1edc}', to: '\u{1edc}', mapping: Mapped(StringTableSlice { byte_start_lo: 149, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1edd}', to: '\u{1edd}', mapping: Valid },
++    Range { from: '\u{1ede}', to: '\u{1ede}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1edf}', to: '\u{1edf}', mapping: Valid },
++    Range { from: '\u{1ee0}', to: '\u{1ee0}', mapping: Mapped(StringTableSlice { byte_start_lo: 155, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ee1}', to: '\u{1ee1}', mapping: Valid },
++    Range { from: '\u{1ee2}', to: '\u{1ee2}', mapping: Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ee3}', to: '\u{1ee3}', mapping: Valid },
++    Range { from: '\u{1ee4}', to: '\u{1ee4}', mapping: Mapped(StringTableSlice { byte_start_lo: 161, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ee5}', to: '\u{1ee5}', mapping: Valid },
++    Range { from: '\u{1ee6}', to: '\u{1ee6}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ee7}', to: '\u{1ee7}', mapping: Valid },
++    Range { from: '\u{1ee8}', to: '\u{1ee8}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ee9}', to: '\u{1ee9}', mapping: Valid },
++    Range { from: '\u{1eea}', to: '\u{1eea}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1eeb}', to: '\u{1eeb}', mapping: Valid },
++    Range { from: '\u{1eec}', to: '\u{1eec}', mapping: Mapped(StringTableSlice { byte_start_lo: 173, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1eed}', to: '\u{1eed}', mapping: Valid },
++    Range { from: '\u{1eee}', to: '\u{1eee}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1eef}', to: '\u{1eef}', mapping: Valid },
++    Range { from: '\u{1ef0}', to: '\u{1ef0}', mapping: Mapped(StringTableSlice { byte_start_lo: 179, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ef1}', to: '\u{1ef1}', mapping: Valid },
++    Range { from: '\u{1ef2}', to: '\u{1ef2}', mapping: Mapped(StringTableSlice { byte_start_lo: 182, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ef3}', to: '\u{1ef3}', mapping: Valid },
++    Range { from: '\u{1ef4}', to: '\u{1ef4}', mapping: Mapped(StringTableSlice { byte_start_lo: 185, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ef5}', to: '\u{1ef5}', mapping: Valid },
++    Range { from: '\u{1ef6}', to: '\u{1ef6}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ef7}', to: '\u{1ef7}', mapping: Valid },
++    Range { from: '\u{1ef8}', to: '\u{1ef8}', mapping: Mapped(StringTableSlice { byte_start_lo: 191, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1ef9}', to: '\u{1ef9}', mapping: Valid },
++    Range { from: '\u{1efa}', to: '\u{1efa}', mapping: Mapped(StringTableSlice { byte_start_lo: 194, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1efb}', to: '\u{1efb}', mapping: Valid },
++    Range { from: '\u{1efc}', to: '\u{1efc}', mapping: Mapped(StringTableSlice { byte_start_lo: 197, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1efd}', to: '\u{1efd}', mapping: Valid },
++    Range { from: '\u{1efe}', to: '\u{1efe}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1eff}', to: '\u{1f07}', mapping: Valid },
++    Range { from: '\u{1f08}', to: '\u{1f08}', mapping: Mapped(StringTableSlice { byte_start_lo: 203, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f09}', to: '\u{1f09}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f0a}', to: '\u{1f0a}', mapping: Mapped(StringTableSlice { byte_start_lo: 209, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f0b}', to: '\u{1f0b}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f0c}', to: '\u{1f0c}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f0d}', to: '\u{1f0d}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f0e}', to: '\u{1f0e}', mapping: Mapped(StringTableSlice { byte_start_lo: 221, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f0f}', to: '\u{1f0f}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f10}', to: '\u{1f15}', mapping: Valid },
++    Range { from: '\u{1f16}', to: '\u{1f17}', mapping: Disallowed },
++    Range { from: '\u{1f18}', to: '\u{1f18}', mapping: Mapped(StringTableSlice { byte_start_lo: 227, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f19}', to: '\u{1f19}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f1a}', to: '\u{1f1a}', mapping: Mapped(StringTableSlice { byte_start_lo: 233, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f1b}', to: '\u{1f1b}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f1c}', to: '\u{1f1c}', mapping: Mapped(StringTableSlice { byte_start_lo: 239, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f1d}', to: '\u{1f1d}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f1e}', to: '\u{1f1f}', mapping: Disallowed },
++    Range { from: '\u{1f20}', to: '\u{1f27}', mapping: Valid },
++    Range { from: '\u{1f28}', to: '\u{1f28}', mapping: Mapped(StringTableSlice { byte_start_lo: 245, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f29}', to: '\u{1f29}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f2a}', to: '\u{1f2a}', mapping: Mapped(StringTableSlice { byte_start_lo: 251, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f2b}', to: '\u{1f2b}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 6, byte_len: 3 }) },
++    Range { from: '\u{1f2c}', to: '\u{1f2c}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f2d}', to: '\u{1f2d}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f2e}', to: '\u{1f2e}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f2f}', to: '\u{1f2f}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f30}', to: '\u{1f37}', mapping: Valid },
++    Range { from: '\u{1f38}', to: '\u{1f38}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f39}', to: '\u{1f39}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f3a}', to: '\u{1f3a}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f3b}', to: '\u{1f3b}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f3c}', to: '\u{1f3c}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f3d}', to: '\u{1f3d}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f3e}', to: '\u{1f3e}', mapping: Mapped(StringTableSlice { byte_start_lo: 31, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f3f}', to: '\u{1f3f}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f40}', to: '\u{1f45}', mapping: Valid },
++    Range { from: '\u{1f46}', to: '\u{1f47}', mapping: Disallowed },
++    Range { from: '\u{1f48}', to: '\u{1f48}', mapping: Mapped(StringTableSlice { byte_start_lo: 37, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f49}', to: '\u{1f49}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f4a}', to: '\u{1f4a}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f4b}', to: '\u{1f4b}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f4c}', to: '\u{1f4c}', mapping: Mapped(StringTableSlice { byte_start_lo: 49, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f4d}', to: '\u{1f4d}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f4e}', to: '\u{1f4f}', mapping: Disallowed },
++    Range { from: '\u{1f50}', to: '\u{1f57}', mapping: Valid },
++    Range { from: '\u{1f58}', to: '\u{1f58}', mapping: Disallowed },
++    Range { from: '\u{1f59}', to: '\u{1f59}', mapping: Mapped(StringTableSlice { byte_start_lo: 55, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f5a}', to: '\u{1f5a}', mapping: Disallowed },
++    Range { from: '\u{1f5b}', to: '\u{1f5b}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f5c}', to: '\u{1f5c}', mapping: Disallowed },
++    Range { from: '\u{1f5d}', to: '\u{1f5d}', mapping: Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f5e}', to: '\u{1f5e}', mapping: Disallowed },
++    Range { from: '\u{1f5f}', to: '\u{1f5f}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f60}', to: '\u{1f67}', mapping: Valid },
++    Range { from: '\u{1f68}', to: '\u{1f68}', mapping: Mapped(StringTableSlice { byte_start_lo: 67, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f69}', to: '\u{1f69}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f6a}', to: '\u{1f6a}', mapping: Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f6b}', to: '\u{1f6b}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f6c}', to: '\u{1f6c}', mapping: Mapped(StringTableSlice { byte_start_lo: 79, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f6d}', to: '\u{1f6d}', mapping: Mapped(StringTableSlice { byte_start_lo: 82, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f6e}', to: '\u{1f6e}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f6f}', to: '\u{1f6f}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1f70}', to: '\u{1f70}', mapping: Valid },
++    Range { from: '\u{1f71}', to: '\u{1f71}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1f72}', to: '\u{1f72}', mapping: Valid },
++    Range { from: '\u{1f73}', to: '\u{1f73}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1f74}', to: '\u{1f74}', mapping: Valid },
++    Range { from: '\u{1f75}', to: '\u{1f75}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1f76}', to: '\u{1f76}', mapping: Valid },
++    Range { from: '\u{1f77}', to: '\u{1f77}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1f78}', to: '\u{1f78}', mapping: Valid },
++    Range { from: '\u{1f79}', to: '\u{1f79}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1f7a}', to: '\u{1f7a}', mapping: Valid },
++    Range { from: '\u{1f7b}', to: '\u{1f7b}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1f7c}', to: '\u{1f7c}', mapping: Valid },
++    Range { from: '\u{1f7d}', to: '\u{1f7d}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1f7e}', to: '\u{1f7f}', mapping: Disallowed },
++    Range { from: '\u{1f80}', to: '\u{1f80}', mapping: Mapped(StringTableSlice { byte_start_lo: 91, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f81}', to: '\u{1f81}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f82}', to: '\u{1f82}', mapping: Mapped(StringTableSlice { byte_start_lo: 101, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f83}', to: '\u{1f83}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f84}', to: '\u{1f84}', mapping: Mapped(StringTableSlice { byte_start_lo: 111, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f85}', to: '\u{1f85}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f86}', to: '\u{1f86}', mapping: Mapped(StringTableSlice { byte_start_lo: 121, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f87}', to: '\u{1f87}', mapping: Mapped(StringTableSlice { byte_start_lo: 126, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f88}', to: '\u{1f88}', mapping: Mapped(StringTableSlice { byte_start_lo: 91, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f89}', to: '\u{1f89}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f8a}', to: '\u{1f8a}', mapping: Mapped(StringTableSlice { byte_start_lo: 101, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f8b}', to: '\u{1f8b}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f8c}', to: '\u{1f8c}', mapping: Mapped(StringTableSlice { byte_start_lo: 111, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f8d}', to: '\u{1f8d}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f8e}', to: '\u{1f8e}', mapping: Mapped(StringTableSlice { byte_start_lo: 121, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f8f}', to: '\u{1f8f}', mapping: Mapped(StringTableSlice { byte_start_lo: 126, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f90}', to: '\u{1f90}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f91}', to: '\u{1f91}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f92}', to: '\u{1f92}', mapping: Mapped(StringTableSlice { byte_start_lo: 141, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f93}', to: '\u{1f93}', mapping: Mapped(StringTableSlice { byte_start_lo: 146, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f94}', to: '\u{1f94}', mapping: Mapped(StringTableSlice { byte_start_lo: 151, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f95}', to: '\u{1f95}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f96}', to: '\u{1f96}', mapping: Mapped(StringTableSlice { byte_start_lo: 161, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f97}', to: '\u{1f97}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f98}', to: '\u{1f98}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f99}', to: '\u{1f99}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f9a}', to: '\u{1f9a}', mapping: Mapped(StringTableSlice { byte_start_lo: 141, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f9b}', to: '\u{1f9b}', mapping: Mapped(StringTableSlice { byte_start_lo: 146, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f9c}', to: '\u{1f9c}', mapping: Mapped(StringTableSlice { byte_start_lo: 151, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f9d}', to: '\u{1f9d}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f9e}', to: '\u{1f9e}', mapping: Mapped(StringTableSlice { byte_start_lo: 161, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1f9f}', to: '\u{1f9f}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fa0}', to: '\u{1fa0}', mapping: Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fa1}', to: '\u{1fa1}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fa2}', to: '\u{1fa2}', mapping: Mapped(StringTableSlice { byte_start_lo: 181, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fa3}', to: '\u{1fa3}', mapping: Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fa4}', to: '\u{1fa4}', mapping: Mapped(StringTableSlice { byte_start_lo: 191, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fa5}', to: '\u{1fa5}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fa6}', to: '\u{1fa6}', mapping: Mapped(StringTableSlice { byte_start_lo: 201, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fa7}', to: '\u{1fa7}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fa8}', to: '\u{1fa8}', mapping: Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fa9}', to: '\u{1fa9}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1faa}', to: '\u{1faa}', mapping: Mapped(StringTableSlice { byte_start_lo: 181, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fab}', to: '\u{1fab}', mapping: Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fac}', to: '\u{1fac}', mapping: Mapped(StringTableSlice { byte_start_lo: 191, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fad}', to: '\u{1fad}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fae}', to: '\u{1fae}', mapping: Mapped(StringTableSlice { byte_start_lo: 201, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1faf}', to: '\u{1faf}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fb0}', to: '\u{1fb1}', mapping: Valid },
++    Range { from: '\u{1fb2}', to: '\u{1fb2}', mapping: Mapped(StringTableSlice { byte_start_lo: 211, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fb3}', to: '\u{1fb3}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 7, byte_len: 4 }) },
++    Range { from: '\u{1fb4}', to: '\u{1fb4}', mapping: Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 7, byte_len: 4 }) },
++    Range { from: '\u{1fb5}', to: '\u{1fb5}', mapping: Disallowed },
++    Range { from: '\u{1fb6}', to: '\u{1fb6}', mapping: Valid },
++    Range { from: '\u{1fb7}', to: '\u{1fb7}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fb8}', to: '\u{1fb8}', mapping: Mapped(StringTableSlice { byte_start_lo: 229, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1fb9}', to: '\u{1fb9}', mapping: Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1fba}', to: '\u{1fba}', mapping: Mapped(StringTableSlice { byte_start_lo: 235, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1fbb}', to: '\u{1fbb}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1fbc}', to: '\u{1fbc}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 7, byte_len: 4 }) },
++    Range { from: '\u{1fbd}', to: '\u{1fbd}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1fbe}', to: '\u{1fbe}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1fbf}', to: '\u{1fbf}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1fc0}', to: '\u{1fc0}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 241, byte_start_hi: 7, byte_len: 3 }) },
++    Range { from: '\u{1fc1}', to: '\u{1fc1}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fc2}', to: '\u{1fc2}', mapping: Mapped(StringTableSlice { byte_start_lo: 249, byte_start_hi: 7, byte_len: 5 }) },
++    Range { from: '\u{1fc3}', to: '\u{1fc3}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 7, byte_len: 4 }) },
++    Range { from: '\u{1fc4}', to: '\u{1fc4}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 8, byte_len: 4 }) },
++    Range { from: '\u{1fc5}', to: '\u{1fc5}', mapping: Disallowed },
++    Range { from: '\u{1fc6}', to: '\u{1fc6}', mapping: Valid },
++    Range { from: '\u{1fc7}', to: '\u{1fc7}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 8, byte_len: 5 }) },
++    Range { from: '\u{1fc8}', to: '\u{1fc8}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{1fc9}', to: '\u{1fc9}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1fca}', to: '\u{1fca}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{1fcb}', to: '\u{1fcb}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1fcc}', to: '\u{1fcc}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 7, byte_len: 4 }) },
++    Range { from: '\u{1fcd}', to: '\u{1fcd}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 8, byte_len: 5 }) },
++    Range { from: '\u{1fce}', to: '\u{1fce}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 8, byte_len: 5 }) },
++    Range { from: '\u{1fcf}', to: '\u{1fcf}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 27, byte_start_hi: 8, byte_len: 5 }) },
++    Range { from: '\u{1fd0}', to: '\u{1fd2}', mapping: Valid },
++    Range { from: '\u{1fd3}', to: '\u{1fd3}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 8, byte_len: 2 }) },
++    Range { from: '\u{1fd4}', to: '\u{1fd5}', mapping: Disallowed },
++    Range { from: '\u{1fd6}', to: '\u{1fd7}', mapping: Valid },
++    Range { from: '\u{1fd8}', to: '\u{1fd8}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{1fd9}', to: '\u{1fd9}', mapping: Mapped(StringTableSlice { byte_start_lo: 37, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{1fda}', to: '\u{1fda}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{1fdb}', to: '\u{1fdb}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1fdc}', to: '\u{1fdc}', mapping: Disallowed },
++    Range { from: '\u{1fdd}', to: '\u{1fdd}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 8, byte_len: 5 }) },
++    Range { from: '\u{1fde}', to: '\u{1fde}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 8, byte_len: 5 }) },
++    Range { from: '\u{1fdf}', to: '\u{1fdf}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 53, byte_start_hi: 8, byte_len: 5 }) },
++    Range { from: '\u{1fe0}', to: '\u{1fe2}', mapping: Valid },
++    Range { from: '\u{1fe3}', to: '\u{1fe3}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 8, byte_len: 2 }) },
++    Range { from: '\u{1fe4}', to: '\u{1fe7}', mapping: Valid },
++    Range { from: '\u{1fe8}', to: '\u{1fe8}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{1fe9}', to: '\u{1fe9}', mapping: Mapped(StringTableSlice { byte_start_lo: 63, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{1fea}', to: '\u{1fea}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{1feb}', to: '\u{1feb}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1fec}', to: '\u{1fec}', mapping: Mapped(StringTableSlice { byte_start_lo: 69, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{1fed}', to: '\u{1fed}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 8, byte_len: 5 }) },
++    Range { from: '\u{1fee}', to: '\u{1fee}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 2, byte_len: 5 }) },
++    Range { from: '\u{1fef}', to: '\u{1fef}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 77, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1ff0}', to: '\u{1ff1}', mapping: Disallowed },
++    Range { from: '\u{1ff2}', to: '\u{1ff2}', mapping: Mapped(StringTableSlice { byte_start_lo: 78, byte_start_hi: 8, byte_len: 5 }) },
++    Range { from: '\u{1ff3}', to: '\u{1ff3}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 8, byte_len: 4 }) },
++    Range { from: '\u{1ff4}', to: '\u{1ff4}', mapping: Mapped(StringTableSlice { byte_start_lo: 87, byte_start_hi: 8, byte_len: 4 }) },
++    Range { from: '\u{1ff5}', to: '\u{1ff5}', mapping: Disallowed },
++    Range { from: '\u{1ff6}', to: '\u{1ff6}', mapping: Valid },
++    Range { from: '\u{1ff7}', to: '\u{1ff7}', mapping: Mapped(StringTableSlice { byte_start_lo: 91, byte_start_hi: 8, byte_len: 5 }) },
++    Range { from: '\u{1ff8}', to: '\u{1ff8}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{1ff9}', to: '\u{1ff9}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1ffa}', to: '\u{1ffa}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{1ffb}', to: '\u{1ffb}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1ffc}', to: '\u{1ffc}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 8, byte_len: 4 }) },
++    Range { from: '\u{1ffd}', to: '\u{1ffd}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 35, byte_start_hi: 0, byte_len: 3 }) },
++    Range { from: '\u{1ffe}', to: '\u{1ffe}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 102, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{1fff}', to: '\u{1fff}', mapping: Disallowed },
++    Range { from: '\u{2000}', to: '\u{200a}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{200b}', to: '\u{200b}', mapping: Ignored },
++    Range { from: '\u{200c}', to: '\u{200d}', mapping: Deviation(StringTableSlice { byte_start_lo: 105, byte_start_hi: 8, byte_len: 0 }) },
++    Range { from: '\u{200e}', to: '\u{200f}', mapping: Disallowed },
++    Range { from: '\u{2010}', to: '\u{2010}', mapping: Valid },
++    Range { from: '\u{2011}', to: '\u{2011}', mapping: Mapped(StringTableSlice { byte_start_lo: 105, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{2012}', to: '\u{2016}', mapping: Valid },
++    Range { from: '\u{2017}', to: '\u{2017}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{2018}', to: '\u{2023}', mapping: Valid },
++    Range { from: '\u{2024}', to: '\u{2026}', mapping: Disallowed },
++    Range { from: '\u{2027}', to: '\u{2027}', mapping: Valid },
++    Range { from: '\u{2028}', to: '\u{202e}', mapping: Disallowed },
++    Range { from: '\u{202f}', to: '\u{202f}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2030}', to: '\u{2032}', mapping: Valid },
++    Range { from: '\u{2033}', to: '\u{2033}', mapping: Mapped(StringTableSlice { byte_start_lo: 111, byte_start_hi: 8, byte_len: 6 }) },
++    Range { from: '\u{2034}', to: '\u{2034}', mapping: Mapped(StringTableSlice { byte_start_lo: 117, byte_start_hi: 8, byte_len: 9 }) },
++    Range { from: '\u{2035}', to: '\u{2035}', mapping: Valid },
++    Range { from: '\u{2036}', to: '\u{2036}', mapping: Mapped(StringTableSlice { byte_start_lo: 126, byte_start_hi: 8, byte_len: 6 }) },
++    Range { from: '\u{2037}', to: '\u{2037}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 8, byte_len: 9 }) },
++    Range { from: '\u{2038}', to: '\u{203b}', mapping: Valid },
++    Range { from: '\u{203c}', to: '\u{203c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 141, byte_start_hi: 8, byte_len: 2 }) },
++    Range { from: '\u{203d}', to: '\u{203d}', mapping: Valid },
++    Range { from: '\u{203e}', to: '\u{203e}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{203f}', to: '\u{2046}', mapping: Valid },
++    Range { from: '\u{2047}', to: '\u{2047}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 146, byte_start_hi: 8, byte_len: 2 }) },
++    Range { from: '\u{2048}', to: '\u{2048}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 8, byte_len: 2 }) },
++    Range { from: '\u{2049}', to: '\u{2049}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 150, byte_start_hi: 8, byte_len: 2 }) },
++    Range { from: '\u{204a}', to: '\u{2056}', mapping: Valid },
++    Range { from: '\u{2057}', to: '\u{2057}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 8, byte_len: 12 }) },
++    Range { from: '\u{2058}', to: '\u{205e}', mapping: Valid },
++    Range { from: '\u{205f}', to: '\u{205f}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2060}', to: '\u{2060}', mapping: Ignored },
++    Range { from: '\u{2061}', to: '\u{2063}', mapping: Disallowed },
++    Range { from: '\u{2064}', to: '\u{2064}', mapping: Ignored },
++    Range { from: '\u{2065}', to: '\u{206f}', mapping: Disallowed },
++    Range { from: '\u{2070}', to: '\u{2070}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2071}', to: '\u{2071}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2072}', to: '\u{2073}', mapping: Disallowed },
++    Range { from: '\u{2074}', to: '\u{2074}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2075}', to: '\u{2075}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2076}', to: '\u{2076}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2077}', to: '\u{2077}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2078}', to: '\u{2078}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2079}', to: '\u{2079}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{207a}', to: '\u{207a}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{207b}', to: '\u{207b}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{207c}', to: '\u{207c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 175, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{207d}', to: '\u{207d}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{207e}', to: '\u{207e}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{207f}', to: '\u{207f}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2080}', to: '\u{2080}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2081}', to: '\u{2081}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2082}', to: '\u{2082}', mapping: Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2083}', to: '\u{2083}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2084}', to: '\u{2084}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2085}', to: '\u{2085}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2086}', to: '\u{2086}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2087}', to: '\u{2087}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2088}', to: '\u{2088}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2089}', to: '\u{2089}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{208a}', to: '\u{208a}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{208b}', to: '\u{208b}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{208c}', to: '\u{208c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 175, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{208d}', to: '\u{208d}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{208e}', to: '\u{208e}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{208f}', to: '\u{208f}', mapping: Disallowed },
++    Range { from: '\u{2090}', to: '\u{2090}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2091}', to: '\u{2091}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2092}', to: '\u{2092}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2093}', to: '\u{2093}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2094}', to: '\u{2094}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{2095}', to: '\u{2095}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2096}', to: '\u{2096}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2097}', to: '\u{2097}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2098}', to: '\u{2098}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2099}', to: '\u{2099}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{209a}', to: '\u{209a}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{209b}', to: '\u{209b}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{209c}', to: '\u{209c}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{209d}', to: '\u{209f}', mapping: Disallowed },
++    Range { from: '\u{20a0}', to: '\u{20a7}', mapping: Valid },
++    Range { from: '\u{20a8}', to: '\u{20a8}', mapping: Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 8, byte_len: 2 }) },
++    Range { from: '\u{20a9}', to: '\u{20bf}', mapping: Valid },
++    Range { from: '\u{20c0}', to: '\u{20cf}', mapping: Disallowed },
++    Range { from: '\u{20d0}', to: '\u{20f0}', mapping: Valid },
++    Range { from: '\u{20f1}', to: '\u{20ff}', mapping: Disallowed },
++    Range { from: '\u{2100}', to: '\u{2100}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{2101}', to: '\u{2101}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 183, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{2102}', to: '\u{2102}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2103}', to: '\u{2103}', mapping: Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{2104}', to: '\u{2104}', mapping: Valid },
++    Range { from: '\u{2105}', to: '\u{2105}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 189, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{2106}', to: '\u{2106}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{2107}', to: '\u{2107}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{2108}', to: '\u{2108}', mapping: Valid },
++    Range { from: '\u{2109}', to: '\u{2109}', mapping: Mapped(StringTableSlice { byte_start_lo: 195, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{210a}', to: '\u{210a}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{210b}', to: '\u{210e}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{210f}', to: '\u{210f}', mapping: Mapped(StringTableSlice { byte_start_lo: 159, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{2110}', to: '\u{2111}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2112}', to: '\u{2113}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2114}', to: '\u{2114}', mapping: Valid },
++    Range { from: '\u{2115}', to: '\u{2115}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2116}', to: '\u{2116}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 8, byte_len: 2 }) },
++    Range { from: '\u{2117}', to: '\u{2118}', mapping: Valid },
++    Range { from: '\u{2119}', to: '\u{2119}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{211a}', to: '\u{211a}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{211b}', to: '\u{211d}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{211e}', to: '\u{211f}', mapping: Valid },
++    Range { from: '\u{2120}', to: '\u{2120}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 8, byte_len: 2 }) },
++    Range { from: '\u{2121}', to: '\u{2121}', mapping: Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{2122}', to: '\u{2122}', mapping: Mapped(StringTableSlice { byte_start_lo: 205, byte_start_hi: 8, byte_len: 2 }) },
++    Range { from: '\u{2123}', to: '\u{2123}', mapping: Valid },
++    Range { from: '\u{2124}', to: '\u{2124}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2125}', to: '\u{2125}', mapping: Valid },
++    Range { from: '\u{2126}', to: '\u{2126}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{2127}', to: '\u{2127}', mapping: Valid },
++    Range { from: '\u{2128}', to: '\u{2128}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2129}', to: '\u{2129}', mapping: Valid },
++    Range { from: '\u{212a}', to: '\u{212a}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{212b}', to: '\u{212b}', mapping: Mapped(StringTableSlice { byte_start_lo: 69, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{212c}', to: '\u{212c}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{212d}', to: '\u{212d}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{212e}', to: '\u{212e}', mapping: Valid },
++    Range { from: '\u{212f}', to: '\u{2130}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2131}', to: '\u{2131}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2132}', to: '\u{2132}', mapping: Disallowed },
++    Range { from: '\u{2133}', to: '\u{2133}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2134}', to: '\u{2134}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2135}', to: '\u{2135}', mapping: Mapped(StringTableSlice { byte_start_lo: 207, byte_start_hi: 8, byte_len: 2 }) },
++    Range { from: '\u{2136}', to: '\u{2136}', mapping: Mapped(StringTableSlice { byte_start_lo: 209, byte_start_hi: 8, byte_len: 2 }) },
++    Range { from: '\u{2137}', to: '\u{2137}', mapping: Mapped(StringTableSlice { byte_start_lo: 211, byte_start_hi: 8, byte_len: 2 }) },
++    Range { from: '\u{2138}', to: '\u{2138}', mapping: Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 8, byte_len: 2 }) },
++    Range { from: '\u{2139}', to: '\u{2139}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{213a}', to: '\u{213a}', mapping: Valid },
++    Range { from: '\u{213b}', to: '\u{213b}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{213c}', to: '\u{213c}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{213d}', to: '\u{213e}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{213f}', to: '\u{213f}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{2140}', to: '\u{2140}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{2141}', to: '\u{2144}', mapping: Valid },
++    Range { from: '\u{2145}', to: '\u{2146}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2147}', to: '\u{2147}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2148}', to: '\u{2148}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2149}', to: '\u{2149}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{214a}', to: '\u{214f}', mapping: Valid },
++    Range { from: '\u{2150}', to: '\u{2150}', mapping: Mapped(StringTableSlice { byte_start_lo: 221, byte_start_hi: 8, byte_len: 5 }) },
++    Range { from: '\u{2151}', to: '\u{2151}', mapping: Mapped(StringTableSlice { byte_start_lo: 226, byte_start_hi: 8, byte_len: 5 }) },
++    Range { from: '\u{2152}', to: '\u{2152}', mapping: Mapped(StringTableSlice { byte_start_lo: 231, byte_start_hi: 8, byte_len: 6 }) },
++    Range { from: '\u{2153}', to: '\u{2153}', mapping: Mapped(StringTableSlice { byte_start_lo: 237, byte_start_hi: 8, byte_len: 5 }) },
++    Range { from: '\u{2154}', to: '\u{2154}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 8, byte_len: 5 }) },
++    Range { from: '\u{2155}', to: '\u{2155}', mapping: Mapped(StringTableSlice { byte_start_lo: 247, byte_start_hi: 8, byte_len: 5 }) },
++    Range { from: '\u{2156}', to: '\u{2156}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 8, byte_len: 5 }) },
++    Range { from: '\u{2157}', to: '\u{2157}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 9, byte_len: 5 }) },
++    Range { from: '\u{2158}', to: '\u{2158}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 9, byte_len: 5 }) },
++    Range { from: '\u{2159}', to: '\u{2159}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 9, byte_len: 5 }) },
++    Range { from: '\u{215a}', to: '\u{215a}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 9, byte_len: 5 }) },
++    Range { from: '\u{215b}', to: '\u{215b}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 9, byte_len: 5 }) },
++    Range { from: '\u{215c}', to: '\u{215c}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 9, byte_len: 5 }) },
++    Range { from: '\u{215d}', to: '\u{215d}', mapping: Mapped(StringTableSlice { byte_start_lo: 31, byte_start_hi: 9, byte_len: 5 }) },
++    Range { from: '\u{215e}', to: '\u{215e}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 9, byte_len: 5 }) },
++    Range { from: '\u{215f}', to: '\u{215f}', mapping: Mapped(StringTableSlice { byte_start_lo: 41, byte_start_hi: 9, byte_len: 4 }) },
++    Range { from: '\u{2160}', to: '\u{2160}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2161}', to: '\u{2161}', mapping: Mapped(StringTableSlice { byte_start_lo: 45, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{2162}', to: '\u{2162}', mapping: Mapped(StringTableSlice { byte_start_lo: 47, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{2163}', to: '\u{2163}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{2164}', to: '\u{2164}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2165}', to: '\u{2165}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{2166}', to: '\u{2166}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{2167}', to: '\u{2167}', mapping: Mapped(StringTableSlice { byte_start_lo: 57, byte_start_hi: 9, byte_len: 4 }) },
++    Range { from: '\u{2168}', to: '\u{2168}', mapping: Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{2169}', to: '\u{2169}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{216a}', to: '\u{216a}', mapping: Mapped(StringTableSlice { byte_start_lo: 63, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{216b}', to: '\u{216b}', mapping: Mapped(StringTableSlice { byte_start_lo: 65, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{216c}', to: '\u{216c}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{216d}', to: '\u{216d}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{216e}', to: '\u{216e}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{216f}', to: '\u{216f}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2170}', to: '\u{2170}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2171}', to: '\u{2171}', mapping: Mapped(StringTableSlice { byte_start_lo: 45, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{2172}', to: '\u{2172}', mapping: Mapped(StringTableSlice { byte_start_lo: 47, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{2173}', to: '\u{2173}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{2174}', to: '\u{2174}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2175}', to: '\u{2175}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{2176}', to: '\u{2176}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{2177}', to: '\u{2177}', mapping: Mapped(StringTableSlice { byte_start_lo: 57, byte_start_hi: 9, byte_len: 4 }) },
++    Range { from: '\u{2178}', to: '\u{2178}', mapping: Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{2179}', to: '\u{2179}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{217a}', to: '\u{217a}', mapping: Mapped(StringTableSlice { byte_start_lo: 63, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{217b}', to: '\u{217b}', mapping: Mapped(StringTableSlice { byte_start_lo: 65, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{217c}', to: '\u{217c}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{217d}', to: '\u{217d}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{217e}', to: '\u{217e}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{217f}', to: '\u{217f}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2180}', to: '\u{2182}', mapping: Valid },
++    Range { from: '\u{2183}', to: '\u{2183}', mapping: Disallowed },
++    Range { from: '\u{2184}', to: '\u{2188}', mapping: Valid },
++    Range { from: '\u{2189}', to: '\u{2189}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 9, byte_len: 5 }) },
++    Range { from: '\u{218a}', to: '\u{218b}', mapping: Valid },
++    Range { from: '\u{218c}', to: '\u{218f}', mapping: Disallowed },
++    Range { from: '\u{2190}', to: '\u{222b}', mapping: Valid },
++    Range { from: '\u{222c}', to: '\u{222c}', mapping: Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 9, byte_len: 6 }) },
++    Range { from: '\u{222d}', to: '\u{222d}', mapping: Mapped(StringTableSlice { byte_start_lo: 79, byte_start_hi: 9, byte_len: 9 }) },
++    Range { from: '\u{222e}', to: '\u{222e}', mapping: Valid },
++    Range { from: '\u{222f}', to: '\u{222f}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 9, byte_len: 6 }) },
++    Range { from: '\u{2230}', to: '\u{2230}', mapping: Mapped(StringTableSlice { byte_start_lo: 94, byte_start_hi: 9, byte_len: 9 }) },
++    Range { from: '\u{2231}', to: '\u{225f}', mapping: Valid },
++    Range { from: '\u{2260}', to: '\u{2260}', mapping: DisallowedStd3Valid },
++    Range { from: '\u{2261}', to: '\u{226d}', mapping: Valid },
++    Range { from: '\u{226e}', to: '\u{226f}', mapping: DisallowedStd3Valid },
++    Range { from: '\u{2270}', to: '\u{2328}', mapping: Valid },
++    Range { from: '\u{2329}', to: '\u{2329}', mapping: Mapped(StringTableSlice { byte_start_lo: 103, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{232a}', to: '\u{232a}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{232b}', to: '\u{2426}', mapping: Valid },
++    Range { from: '\u{2427}', to: '\u{243f}', mapping: Disallowed },
++    Range { from: '\u{2440}', to: '\u{244a}', mapping: Valid },
++    Range { from: '\u{244b}', to: '\u{245f}', mapping: Disallowed },
++    Range { from: '\u{2460}', to: '\u{2460}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2461}', to: '\u{2461}', mapping: Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2462}', to: '\u{2462}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2463}', to: '\u{2463}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2464}', to: '\u{2464}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2465}', to: '\u{2465}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2466}', to: '\u{2466}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2467}', to: '\u{2467}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2468}', to: '\u{2468}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{2469}', to: '\u{2469}', mapping: Mapped(StringTableSlice { byte_start_lo: 109, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{246a}', to: '\u{246a}', mapping: Mapped(StringTableSlice { byte_start_lo: 111, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{246b}', to: '\u{246b}', mapping: Mapped(StringTableSlice { byte_start_lo: 113, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{246c}', to: '\u{246c}', mapping: Mapped(StringTableSlice { byte_start_lo: 115, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{246d}', to: '\u{246d}', mapping: Mapped(StringTableSlice { byte_start_lo: 117, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{246e}', to: '\u{246e}', mapping: Mapped(StringTableSlice { byte_start_lo: 119, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{246f}', to: '\u{246f}', mapping: Mapped(StringTableSlice { byte_start_lo: 121, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{2470}', to: '\u{2470}', mapping: Mapped(StringTableSlice { byte_start_lo: 123, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{2471}', to: '\u{2471}', mapping: Mapped(StringTableSlice { byte_start_lo: 125, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{2472}', to: '\u{2472}', mapping: Mapped(StringTableSlice { byte_start_lo: 127, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{2473}', to: '\u{2473}', mapping: Mapped(StringTableSlice { byte_start_lo: 129, byte_start_hi: 9, byte_len: 2 }) },
++    Range { from: '\u{2474}', to: '\u{2474}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{2475}', to: '\u{2475}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 134, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{2476}', to: '\u{2476}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 137, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{2477}', to: '\u{2477}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{2478}', to: '\u{2478}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{2479}', to: '\u{2479}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 146, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{247a}', to: '\u{247a}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 149, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{247b}', to: '\u{247b}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{247c}', to: '\u{247c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 155, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{247d}', to: '\u{247d}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 9, byte_len: 4 }) },
++    Range { from: '\u{247e}', to: '\u{247e}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 162, byte_start_hi: 9, byte_len: 4 }) },
++    Range { from: '\u{247f}', to: '\u{247f}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 9, byte_len: 4 }) },
++    Range { from: '\u{2480}', to: '\u{2480}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 9, byte_len: 4 }) },
++    Range { from: '\u{2481}', to: '\u{2481}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 9, byte_len: 4 }) },
++    Range { from: '\u{2482}', to: '\u{2482}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 9, byte_len: 4 }) },
++    Range { from: '\u{2483}', to: '\u{2483}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 182, byte_start_hi: 9, byte_len: 4 }) },
++    Range { from: '\u{2484}', to: '\u{2484}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 9, byte_len: 4 }) },
++    Range { from: '\u{2485}', to: '\u{2485}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 9, byte_len: 4 }) },
++    Range { from: '\u{2486}', to: '\u{2486}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 194, byte_start_hi: 9, byte_len: 4 }) },
++    Range { from: '\u{2487}', to: '\u{2487}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 9, byte_len: 4 }) },
++    Range { from: '\u{2488}', to: '\u{249b}', mapping: Disallowed },
++    Range { from: '\u{249c}', to: '\u{249c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{249d}', to: '\u{249d}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 205, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{249e}', to: '\u{249e}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{249f}', to: '\u{249f}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 211, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{24a0}', to: '\u{24a0}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 214, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{24a1}', to: '\u{24a1}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 217, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{24a2}', to: '\u{24a2}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{24a3}', to: '\u{24a3}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 223, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{24a4}', to: '\u{24a4}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 226, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{24a5}', to: '\u{24a5}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 229, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{24a6}', to: '\u{24a6}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{24a7}', to: '\u{24a7}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 235, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{24a8}', to: '\u{24a8}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{24a9}', to: '\u{24a9}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 241, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{24aa}', to: '\u{24aa}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{24ab}', to: '\u{24ab}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 247, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{24ac}', to: '\u{24ac}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{24ad}', to: '\u{24ad}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 253, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{24ae}', to: '\u{24ae}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{24af}', to: '\u{24af}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{24b0}', to: '\u{24b0}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{24b1}', to: '\u{24b1}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{24b2}', to: '\u{24b2}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{24b3}', to: '\u{24b3}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{24b4}', to: '\u{24b4}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{24b5}', to: '\u{24b5}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{24b6}', to: '\u{24b6}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24b7}', to: '\u{24b7}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24b8}', to: '\u{24b8}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24b9}', to: '\u{24b9}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24ba}', to: '\u{24ba}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24bb}', to: '\u{24bb}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24bc}', to: '\u{24bc}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24bd}', to: '\u{24bd}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24be}', to: '\u{24be}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24bf}', to: '\u{24bf}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24c0}', to: '\u{24c0}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24c1}', to: '\u{24c1}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24c2}', to: '\u{24c2}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24c3}', to: '\u{24c3}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24c4}', to: '\u{24c4}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24c5}', to: '\u{24c5}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24c6}', to: '\u{24c6}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24c7}', to: '\u{24c7}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24c8}', to: '\u{24c8}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24c9}', to: '\u{24c9}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24ca}', to: '\u{24ca}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24cb}', to: '\u{24cb}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24cc}', to: '\u{24cc}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24cd}', to: '\u{24cd}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24ce}', to: '\u{24ce}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24cf}', to: '\u{24cf}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24d0}', to: '\u{24d0}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24d1}', to: '\u{24d1}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24d2}', to: '\u{24d2}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24d3}', to: '\u{24d3}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24d4}', to: '\u{24d4}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24d5}', to: '\u{24d5}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24d6}', to: '\u{24d6}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24d7}', to: '\u{24d7}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24d8}', to: '\u{24d8}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24d9}', to: '\u{24d9}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24da}', to: '\u{24da}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24db}', to: '\u{24db}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24dc}', to: '\u{24dc}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24dd}', to: '\u{24dd}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24de}', to: '\u{24de}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24df}', to: '\u{24df}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24e0}', to: '\u{24e0}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24e1}', to: '\u{24e1}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24e2}', to: '\u{24e2}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24e3}', to: '\u{24e3}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24e4}', to: '\u{24e4}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24e5}', to: '\u{24e5}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24e6}', to: '\u{24e6}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24e7}', to: '\u{24e7}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24e8}', to: '\u{24e8}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24e9}', to: '\u{24e9}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{24ea}', to: '\u{24ea}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{24eb}', to: '\u{2a0b}', mapping: Valid },
++    Range { from: '\u{2a0c}', to: '\u{2a0c}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 10, byte_len: 12 }) },
++    Range { from: '\u{2a0d}', to: '\u{2a73}', mapping: Valid },
++    Range { from: '\u{2a74}', to: '\u{2a74}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2a75}', to: '\u{2a75}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 39, byte_start_hi: 10, byte_len: 2 }) },
++    Range { from: '\u{2a76}', to: '\u{2a76}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 41, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2a77}', to: '\u{2adb}', mapping: Valid },
++    Range { from: '\u{2adc}', to: '\u{2adc}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 10, byte_len: 5 }) },
++    Range { from: '\u{2add}', to: '\u{2b73}', mapping: Valid },
++    Range { from: '\u{2b74}', to: '\u{2b75}', mapping: Disallowed },
++    Range { from: '\u{2b76}', to: '\u{2b95}', mapping: Valid },
++    Range { from: '\u{2b96}', to: '\u{2b97}', mapping: Disallowed },
++    Range { from: '\u{2b98}', to: '\u{2bb9}', mapping: Valid },
++    Range { from: '\u{2bba}', to: '\u{2bbc}', mapping: Disallowed },
++    Range { from: '\u{2bbd}', to: '\u{2bc8}', mapping: Valid },
++    Range { from: '\u{2bc9}', to: '\u{2bc9}', mapping: Disallowed },
++    Range { from: '\u{2bca}', to: '\u{2bd2}', mapping: Valid },
++    Range { from: '\u{2bd3}', to: '\u{2beb}', mapping: Disallowed },
++    Range { from: '\u{2bec}', to: '\u{2bef}', mapping: Valid },
++    Range { from: '\u{2bf0}', to: '\u{2bff}', mapping: Disallowed },
++    Range { from: '\u{2c00}', to: '\u{2c00}', mapping: Mapped(StringTableSlice { byte_start_lo: 49, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c01}', to: '\u{2c01}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c02}', to: '\u{2c02}', mapping: Mapped(StringTableSlice { byte_start_lo: 55, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c03}', to: '\u{2c03}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c04}', to: '\u{2c04}', mapping: Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c05}', to: '\u{2c05}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c06}', to: '\u{2c06}', mapping: Mapped(StringTableSlice { byte_start_lo: 67, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c07}', to: '\u{2c07}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c08}', to: '\u{2c08}', mapping: Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c09}', to: '\u{2c09}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c0a}', to: '\u{2c0a}', mapping: Mapped(StringTableSlice { byte_start_lo: 79, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c0b}', to: '\u{2c0b}', mapping: Mapped(StringTableSlice { byte_start_lo: 82, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c0c}', to: '\u{2c0c}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c0d}', to: '\u{2c0d}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c0e}', to: '\u{2c0e}', mapping: Mapped(StringTableSlice { byte_start_lo: 91, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c0f}', to: '\u{2c0f}', mapping: Mapped(StringTableSlice { byte_start_lo: 94, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c10}', to: '\u{2c10}', mapping: Mapped(StringTableSlice { byte_start_lo: 97, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c11}', to: '\u{2c11}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c12}', to: '\u{2c12}', mapping: Mapped(StringTableSlice { byte_start_lo: 103, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c13}', to: '\u{2c13}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c14}', to: '\u{2c14}', mapping: Mapped(StringTableSlice { byte_start_lo: 109, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c15}', to: '\u{2c15}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c16}', to: '\u{2c16}', mapping: Mapped(StringTableSlice { byte_start_lo: 115, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c17}', to: '\u{2c17}', mapping: Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c18}', to: '\u{2c18}', mapping: Mapped(StringTableSlice { byte_start_lo: 121, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c19}', to: '\u{2c19}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c1a}', to: '\u{2c1a}', mapping: Mapped(StringTableSlice { byte_start_lo: 127, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c1b}', to: '\u{2c1b}', mapping: Mapped(StringTableSlice { byte_start_lo: 130, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c1c}', to: '\u{2c1c}', mapping: Mapped(StringTableSlice { byte_start_lo: 133, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c1d}', to: '\u{2c1d}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c1e}', to: '\u{2c1e}', mapping: Mapped(StringTableSlice { byte_start_lo: 139, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c1f}', to: '\u{2c1f}', mapping: Mapped(StringTableSlice { byte_start_lo: 142, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c20}', to: '\u{2c20}', mapping: Mapped(StringTableSlice { byte_start_lo: 145, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c21}', to: '\u{2c21}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c22}', to: '\u{2c22}', mapping: Mapped(StringTableSlice { byte_start_lo: 151, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c23}', to: '\u{2c23}', mapping: Mapped(StringTableSlice { byte_start_lo: 154, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c24}', to: '\u{2c24}', mapping: Mapped(StringTableSlice { byte_start_lo: 157, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c25}', to: '\u{2c25}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c26}', to: '\u{2c26}', mapping: Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c27}', to: '\u{2c27}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c28}', to: '\u{2c28}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c29}', to: '\u{2c29}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c2a}', to: '\u{2c2a}', mapping: Mapped(StringTableSlice { byte_start_lo: 175, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c2b}', to: '\u{2c2b}', mapping: Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c2c}', to: '\u{2c2c}', mapping: Mapped(StringTableSlice { byte_start_lo: 181, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c2d}', to: '\u{2c2d}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c2e}', to: '\u{2c2e}', mapping: Mapped(StringTableSlice { byte_start_lo: 187, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c2f}', to: '\u{2c2f}', mapping: Disallowed },
++    Range { from: '\u{2c30}', to: '\u{2c5e}', mapping: Valid },
++    Range { from: '\u{2c5f}', to: '\u{2c5f}', mapping: Disallowed },
++    Range { from: '\u{2c60}', to: '\u{2c60}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c61}', to: '\u{2c61}', mapping: Valid },
++    Range { from: '\u{2c62}', to: '\u{2c62}', mapping: Mapped(StringTableSlice { byte_start_lo: 193, byte_start_hi: 10, byte_len: 2 }) },
++    Range { from: '\u{2c63}', to: '\u{2c63}', mapping: Mapped(StringTableSlice { byte_start_lo: 195, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c64}', to: '\u{2c64}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 10, byte_len: 2 }) },
++    Range { from: '\u{2c65}', to: '\u{2c66}', mapping: Valid },
++    Range { from: '\u{2c67}', to: '\u{2c67}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c68}', to: '\u{2c68}', mapping: Valid },
++    Range { from: '\u{2c69}', to: '\u{2c69}', mapping: Mapped(StringTableSlice { byte_start_lo: 203, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c6a}', to: '\u{2c6a}', mapping: Valid },
++    Range { from: '\u{2c6b}', to: '\u{2c6b}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c6c}', to: '\u{2c6c}', mapping: Valid },
++    Range { from: '\u{2c6d}', to: '\u{2c6d}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{2c6e}', to: '\u{2c6e}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{2c6f}', to: '\u{2c6f}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{2c70}', to: '\u{2c70}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{2c71}', to: '\u{2c71}', mapping: Valid },
++    Range { from: '\u{2c72}', to: '\u{2c72}', mapping: Mapped(StringTableSlice { byte_start_lo: 209, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c73}', to: '\u{2c74}', mapping: Valid },
++    Range { from: '\u{2c75}', to: '\u{2c75}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c76}', to: '\u{2c7b}', mapping: Valid },
++    Range { from: '\u{2c7c}', to: '\u{2c7c}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2c7d}', to: '\u{2c7d}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{2c7e}', to: '\u{2c7e}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 10, byte_len: 2 }) },
++    Range { from: '\u{2c7f}', to: '\u{2c7f}', mapping: Mapped(StringTableSlice { byte_start_lo: 217, byte_start_hi: 10, byte_len: 2 }) },
++    Range { from: '\u{2c80}', to: '\u{2c80}', mapping: Mapped(StringTableSlice { byte_start_lo: 219, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c81}', to: '\u{2c81}', mapping: Valid },
++    Range { from: '\u{2c82}', to: '\u{2c82}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c83}', to: '\u{2c83}', mapping: Valid },
++    Range { from: '\u{2c84}', to: '\u{2c84}', mapping: Mapped(StringTableSlice { byte_start_lo: 225, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c85}', to: '\u{2c85}', mapping: Valid },
++    Range { from: '\u{2c86}', to: '\u{2c86}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c87}', to: '\u{2c87}', mapping: Valid },
++    Range { from: '\u{2c88}', to: '\u{2c88}', mapping: Mapped(StringTableSlice { byte_start_lo: 231, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c89}', to: '\u{2c89}', mapping: Valid },
++    Range { from: '\u{2c8a}', to: '\u{2c8a}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c8b}', to: '\u{2c8b}', mapping: Valid },
++    Range { from: '\u{2c8c}', to: '\u{2c8c}', mapping: Mapped(StringTableSlice { byte_start_lo: 237, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c8d}', to: '\u{2c8d}', mapping: Valid },
++    Range { from: '\u{2c8e}', to: '\u{2c8e}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c8f}', to: '\u{2c8f}', mapping: Valid },
++    Range { from: '\u{2c90}', to: '\u{2c90}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c91}', to: '\u{2c91}', mapping: Valid },
++    Range { from: '\u{2c92}', to: '\u{2c92}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c93}', to: '\u{2c93}', mapping: Valid },
++    Range { from: '\u{2c94}', to: '\u{2c94}', mapping: Mapped(StringTableSlice { byte_start_lo: 249, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c95}', to: '\u{2c95}', mapping: Valid },
++    Range { from: '\u{2c96}', to: '\u{2c96}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c97}', to: '\u{2c97}', mapping: Valid },
++    Range { from: '\u{2c98}', to: '\u{2c98}', mapping: Mapped(StringTableSlice { byte_start_lo: 255, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{2c99}', to: '\u{2c99}', mapping: Valid },
++    Range { from: '\u{2c9a}', to: '\u{2c9a}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2c9b}', to: '\u{2c9b}', mapping: Valid },
++    Range { from: '\u{2c9c}', to: '\u{2c9c}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2c9d}', to: '\u{2c9d}', mapping: Valid },
++    Range { from: '\u{2c9e}', to: '\u{2c9e}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2c9f}', to: '\u{2c9f}', mapping: Valid },
++    Range { from: '\u{2ca0}', to: '\u{2ca0}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2ca1}', to: '\u{2ca1}', mapping: Valid },
++    Range { from: '\u{2ca2}', to: '\u{2ca2}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2ca3}', to: '\u{2ca3}', mapping: Valid },
++    Range { from: '\u{2ca4}', to: '\u{2ca4}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2ca5}', to: '\u{2ca5}', mapping: Valid },
++    Range { from: '\u{2ca6}', to: '\u{2ca6}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2ca7}', to: '\u{2ca7}', mapping: Valid },
++    Range { from: '\u{2ca8}', to: '\u{2ca8}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2ca9}', to: '\u{2ca9}', mapping: Valid },
++    Range { from: '\u{2caa}', to: '\u{2caa}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cab}', to: '\u{2cab}', mapping: Valid },
++    Range { from: '\u{2cac}', to: '\u{2cac}', mapping: Mapped(StringTableSlice { byte_start_lo: 29, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cad}', to: '\u{2cad}', mapping: Valid },
++    Range { from: '\u{2cae}', to: '\u{2cae}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2caf}', to: '\u{2caf}', mapping: Valid },
++    Range { from: '\u{2cb0}', to: '\u{2cb0}', mapping: Mapped(StringTableSlice { byte_start_lo: 35, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cb1}', to: '\u{2cb1}', mapping: Valid },
++    Range { from: '\u{2cb2}', to: '\u{2cb2}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cb3}', to: '\u{2cb3}', mapping: Valid },
++    Range { from: '\u{2cb4}', to: '\u{2cb4}', mapping: Mapped(StringTableSlice { byte_start_lo: 41, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cb5}', to: '\u{2cb5}', mapping: Valid },
++    Range { from: '\u{2cb6}', to: '\u{2cb6}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cb7}', to: '\u{2cb7}', mapping: Valid },
++    Range { from: '\u{2cb8}', to: '\u{2cb8}', mapping: Mapped(StringTableSlice { byte_start_lo: 47, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cb9}', to: '\u{2cb9}', mapping: Valid },
++    Range { from: '\u{2cba}', to: '\u{2cba}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cbb}', to: '\u{2cbb}', mapping: Valid },
++    Range { from: '\u{2cbc}', to: '\u{2cbc}', mapping: Mapped(StringTableSlice { byte_start_lo: 53, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cbd}', to: '\u{2cbd}', mapping: Valid },
++    Range { from: '\u{2cbe}', to: '\u{2cbe}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cbf}', to: '\u{2cbf}', mapping: Valid },
++    Range { from: '\u{2cc0}', to: '\u{2cc0}', mapping: Mapped(StringTableSlice { byte_start_lo: 59, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cc1}', to: '\u{2cc1}', mapping: Valid },
++    Range { from: '\u{2cc2}', to: '\u{2cc2}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cc3}', to: '\u{2cc3}', mapping: Valid },
++    Range { from: '\u{2cc4}', to: '\u{2cc4}', mapping: Mapped(StringTableSlice { byte_start_lo: 65, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cc5}', to: '\u{2cc5}', mapping: Valid },
++    Range { from: '\u{2cc6}', to: '\u{2cc6}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cc7}', to: '\u{2cc7}', mapping: Valid },
++    Range { from: '\u{2cc8}', to: '\u{2cc8}', mapping: Mapped(StringTableSlice { byte_start_lo: 71, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cc9}', to: '\u{2cc9}', mapping: Valid },
++    Range { from: '\u{2cca}', to: '\u{2cca}', mapping: Mapped(StringTableSlice { byte_start_lo: 74, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2ccb}', to: '\u{2ccb}', mapping: Valid },
++    Range { from: '\u{2ccc}', to: '\u{2ccc}', mapping: Mapped(StringTableSlice { byte_start_lo: 77, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2ccd}', to: '\u{2ccd}', mapping: Valid },
++    Range { from: '\u{2cce}', to: '\u{2cce}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2ccf}', to: '\u{2ccf}', mapping: Valid },
++    Range { from: '\u{2cd0}', to: '\u{2cd0}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cd1}', to: '\u{2cd1}', mapping: Valid },
++    Range { from: '\u{2cd2}', to: '\u{2cd2}', mapping: Mapped(StringTableSlice { byte_start_lo: 86, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cd3}', to: '\u{2cd3}', mapping: Valid },
++    Range { from: '\u{2cd4}', to: '\u{2cd4}', mapping: Mapped(StringTableSlice { byte_start_lo: 89, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cd5}', to: '\u{2cd5}', mapping: Valid },
++    Range { from: '\u{2cd6}', to: '\u{2cd6}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cd7}', to: '\u{2cd7}', mapping: Valid },
++    Range { from: '\u{2cd8}', to: '\u{2cd8}', mapping: Mapped(StringTableSlice { byte_start_lo: 95, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cd9}', to: '\u{2cd9}', mapping: Valid },
++    Range { from: '\u{2cda}', to: '\u{2cda}', mapping: Mapped(StringTableSlice { byte_start_lo: 98, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cdb}', to: '\u{2cdb}', mapping: Valid },
++    Range { from: '\u{2cdc}', to: '\u{2cdc}', mapping: Mapped(StringTableSlice { byte_start_lo: 101, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cdd}', to: '\u{2cdd}', mapping: Valid },
++    Range { from: '\u{2cde}', to: '\u{2cde}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cdf}', to: '\u{2cdf}', mapping: Valid },
++    Range { from: '\u{2ce0}', to: '\u{2ce0}', mapping: Mapped(StringTableSlice { byte_start_lo: 107, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2ce1}', to: '\u{2ce1}', mapping: Valid },
++    Range { from: '\u{2ce2}', to: '\u{2ce2}', mapping: Mapped(StringTableSlice { byte_start_lo: 110, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2ce3}', to: '\u{2cea}', mapping: Valid },
++    Range { from: '\u{2ceb}', to: '\u{2ceb}', mapping: Mapped(StringTableSlice { byte_start_lo: 113, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cec}', to: '\u{2cec}', mapping: Valid },
++    Range { from: '\u{2ced}', to: '\u{2ced}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cee}', to: '\u{2cf1}', mapping: Valid },
++    Range { from: '\u{2cf2}', to: '\u{2cf2}', mapping: Mapped(StringTableSlice { byte_start_lo: 119, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2cf3}', to: '\u{2cf3}', mapping: Valid },
++    Range { from: '\u{2cf4}', to: '\u{2cf8}', mapping: Disallowed },
++    Range { from: '\u{2cf9}', to: '\u{2d25}', mapping: Valid },
++    Range { from: '\u{2d26}', to: '\u{2d26}', mapping: Disallowed },
++    Range { from: '\u{2d27}', to: '\u{2d27}', mapping: Valid },
++    Range { from: '\u{2d28}', to: '\u{2d2c}', mapping: Disallowed },
++    Range { from: '\u{2d2d}', to: '\u{2d2d}', mapping: Valid },
++    Range { from: '\u{2d2e}', to: '\u{2d2f}', mapping: Disallowed },
++    Range { from: '\u{2d30}', to: '\u{2d67}', mapping: Valid },
++    Range { from: '\u{2d68}', to: '\u{2d6e}', mapping: Disallowed },
++    Range { from: '\u{2d6f}', to: '\u{2d6f}', mapping: Mapped(StringTableSlice { byte_start_lo: 122, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2d70}', to: '\u{2d70}', mapping: Valid },
++    Range { from: '\u{2d71}', to: '\u{2d7e}', mapping: Disallowed },
++    Range { from: '\u{2d7f}', to: '\u{2d96}', mapping: Valid },
++    Range { from: '\u{2d97}', to: '\u{2d9f}', mapping: Disallowed },
++    Range { from: '\u{2da0}', to: '\u{2da6}', mapping: Valid },
++    Range { from: '\u{2da7}', to: '\u{2da7}', mapping: Disallowed },
++    Range { from: '\u{2da8}', to: '\u{2dae}', mapping: Valid },
++    Range { from: '\u{2daf}', to: '\u{2daf}', mapping: Disallowed },
++    Range { from: '\u{2db0}', to: '\u{2db6}', mapping: Valid },
++    Range { from: '\u{2db7}', to: '\u{2db7}', mapping: Disallowed },
++    Range { from: '\u{2db8}', to: '\u{2dbe}', mapping: Valid },
++    Range { from: '\u{2dbf}', to: '\u{2dbf}', mapping: Disallowed },
++    Range { from: '\u{2dc0}', to: '\u{2dc6}', mapping: Valid },
++    Range { from: '\u{2dc7}', to: '\u{2dc7}', mapping: Disallowed },
++    Range { from: '\u{2dc8}', to: '\u{2dce}', mapping: Valid },
++    Range { from: '\u{2dcf}', to: '\u{2dcf}', mapping: Disallowed },
++    Range { from: '\u{2dd0}', to: '\u{2dd6}', mapping: Valid },
++    Range { from: '\u{2dd7}', to: '\u{2dd7}', mapping: Disallowed },
++    Range { from: '\u{2dd8}', to: '\u{2dde}', mapping: Valid },
++    Range { from: '\u{2ddf}', to: '\u{2ddf}', mapping: Disallowed },
++    Range { from: '\u{2de0}', to: '\u{2e49}', mapping: Valid },
++    Range { from: '\u{2e4a}', to: '\u{2e7f}', mapping: Disallowed },
++    Range { from: '\u{2e80}', to: '\u{2e99}', mapping: Valid },
++    Range { from: '\u{2e9a}', to: '\u{2e9a}', mapping: Disallowed },
++    Range { from: '\u{2e9b}', to: '\u{2e9e}', mapping: Valid },
++    Range { from: '\u{2e9f}', to: '\u{2e9f}', mapping: Mapped(StringTableSlice { byte_start_lo: 125, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2ea0}', to: '\u{2ef2}', mapping: Valid },
++    Range { from: '\u{2ef3}', to: '\u{2ef3}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2ef4}', to: '\u{2eff}', mapping: Disallowed },
++    Range { from: '\u{2f00}', to: '\u{2f00}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f01}', to: '\u{2f01}', mapping: Mapped(StringTableSlice { byte_start_lo: 134, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f02}', to: '\u{2f02}', mapping: Mapped(StringTableSlice { byte_start_lo: 137, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f03}', to: '\u{2f03}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f04}', to: '\u{2f04}', mapping: Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f05}', to: '\u{2f05}', mapping: Mapped(StringTableSlice { byte_start_lo: 146, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f06}', to: '\u{2f06}', mapping: Mapped(StringTableSlice { byte_start_lo: 149, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f07}', to: '\u{2f07}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f08}', to: '\u{2f08}', mapping: Mapped(StringTableSlice { byte_start_lo: 155, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f09}', to: '\u{2f09}', mapping: Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f0a}', to: '\u{2f0a}', mapping: Mapped(StringTableSlice { byte_start_lo: 161, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f0b}', to: '\u{2f0b}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f0c}', to: '\u{2f0c}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f0d}', to: '\u{2f0d}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f0e}', to: '\u{2f0e}', mapping: Mapped(StringTableSlice { byte_start_lo: 173, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f0f}', to: '\u{2f0f}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f10}', to: '\u{2f10}', mapping: Mapped(StringTableSlice { byte_start_lo: 179, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f11}', to: '\u{2f11}', mapping: Mapped(StringTableSlice { byte_start_lo: 182, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f12}', to: '\u{2f12}', mapping: Mapped(StringTableSlice { byte_start_lo: 185, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f13}', to: '\u{2f13}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f14}', to: '\u{2f14}', mapping: Mapped(StringTableSlice { byte_start_lo: 191, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f15}', to: '\u{2f15}', mapping: Mapped(StringTableSlice { byte_start_lo: 194, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f16}', to: '\u{2f16}', mapping: Mapped(StringTableSlice { byte_start_lo: 197, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f17}', to: '\u{2f17}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f18}', to: '\u{2f18}', mapping: Mapped(StringTableSlice { byte_start_lo: 203, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f19}', to: '\u{2f19}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f1a}', to: '\u{2f1a}', mapping: Mapped(StringTableSlice { byte_start_lo: 209, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f1b}', to: '\u{2f1b}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f1c}', to: '\u{2f1c}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f1d}', to: '\u{2f1d}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f1e}', to: '\u{2f1e}', mapping: Mapped(StringTableSlice { byte_start_lo: 221, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f1f}', to: '\u{2f1f}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f20}', to: '\u{2f20}', mapping: Mapped(StringTableSlice { byte_start_lo: 227, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f21}', to: '\u{2f21}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f22}', to: '\u{2f22}', mapping: Mapped(StringTableSlice { byte_start_lo: 233, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f23}', to: '\u{2f23}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f24}', to: '\u{2f24}', mapping: Mapped(StringTableSlice { byte_start_lo: 239, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f25}', to: '\u{2f25}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f26}', to: '\u{2f26}', mapping: Mapped(StringTableSlice { byte_start_lo: 245, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f27}', to: '\u{2f27}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f28}', to: '\u{2f28}', mapping: Mapped(StringTableSlice { byte_start_lo: 251, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f29}', to: '\u{2f29}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f2a}', to: '\u{2f2a}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f2b}', to: '\u{2f2b}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f2c}', to: '\u{2f2c}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f2d}', to: '\u{2f2d}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f2e}', to: '\u{2f2e}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f2f}', to: '\u{2f2f}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f30}', to: '\u{2f30}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f31}', to: '\u{2f31}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f32}', to: '\u{2f32}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f33}', to: '\u{2f33}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f34}', to: '\u{2f34}', mapping: Mapped(StringTableSlice { byte_start_lo: 31, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f35}', to: '\u{2f35}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f36}', to: '\u{2f36}', mapping: Mapped(StringTableSlice { byte_start_lo: 37, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f37}', to: '\u{2f37}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f38}', to: '\u{2f38}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f39}', to: '\u{2f39}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f3a}', to: '\u{2f3a}', mapping: Mapped(StringTableSlice { byte_start_lo: 49, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f3b}', to: '\u{2f3b}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f3c}', to: '\u{2f3c}', mapping: Mapped(StringTableSlice { byte_start_lo: 55, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f3d}', to: '\u{2f3d}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f3e}', to: '\u{2f3e}', mapping: Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f3f}', to: '\u{2f3f}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f40}', to: '\u{2f40}', mapping: Mapped(StringTableSlice { byte_start_lo: 67, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f41}', to: '\u{2f41}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f42}', to: '\u{2f42}', mapping: Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f43}', to: '\u{2f43}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f44}', to: '\u{2f44}', mapping: Mapped(StringTableSlice { byte_start_lo: 79, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f45}', to: '\u{2f45}', mapping: Mapped(StringTableSlice { byte_start_lo: 82, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f46}', to: '\u{2f46}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f47}', to: '\u{2f47}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f48}', to: '\u{2f48}', mapping: Mapped(StringTableSlice { byte_start_lo: 91, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f49}', to: '\u{2f49}', mapping: Mapped(StringTableSlice { byte_start_lo: 94, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f4a}', to: '\u{2f4a}', mapping: Mapped(StringTableSlice { byte_start_lo: 97, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f4b}', to: '\u{2f4b}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f4c}', to: '\u{2f4c}', mapping: Mapped(StringTableSlice { byte_start_lo: 103, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f4d}', to: '\u{2f4d}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f4e}', to: '\u{2f4e}', mapping: Mapped(StringTableSlice { byte_start_lo: 109, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f4f}', to: '\u{2f4f}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f50}', to: '\u{2f50}', mapping: Mapped(StringTableSlice { byte_start_lo: 115, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f51}', to: '\u{2f51}', mapping: Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f52}', to: '\u{2f52}', mapping: Mapped(StringTableSlice { byte_start_lo: 121, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f53}', to: '\u{2f53}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f54}', to: '\u{2f54}', mapping: Mapped(StringTableSlice { byte_start_lo: 127, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f55}', to: '\u{2f55}', mapping: Mapped(StringTableSlice { byte_start_lo: 130, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f56}', to: '\u{2f56}', mapping: Mapped(StringTableSlice { byte_start_lo: 133, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f57}', to: '\u{2f57}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f58}', to: '\u{2f58}', mapping: Mapped(StringTableSlice { byte_start_lo: 139, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f59}', to: '\u{2f59}', mapping: Mapped(StringTableSlice { byte_start_lo: 142, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f5a}', to: '\u{2f5a}', mapping: Mapped(StringTableSlice { byte_start_lo: 145, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f5b}', to: '\u{2f5b}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f5c}', to: '\u{2f5c}', mapping: Mapped(StringTableSlice { byte_start_lo: 151, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f5d}', to: '\u{2f5d}', mapping: Mapped(StringTableSlice { byte_start_lo: 154, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f5e}', to: '\u{2f5e}', mapping: Mapped(StringTableSlice { byte_start_lo: 157, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f5f}', to: '\u{2f5f}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f60}', to: '\u{2f60}', mapping: Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f61}', to: '\u{2f61}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f62}', to: '\u{2f62}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f63}', to: '\u{2f63}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f64}', to: '\u{2f64}', mapping: Mapped(StringTableSlice { byte_start_lo: 175, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f65}', to: '\u{2f65}', mapping: Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f66}', to: '\u{2f66}', mapping: Mapped(StringTableSlice { byte_start_lo: 181, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f67}', to: '\u{2f67}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f68}', to: '\u{2f68}', mapping: Mapped(StringTableSlice { byte_start_lo: 187, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f69}', to: '\u{2f69}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f6a}', to: '\u{2f6a}', mapping: Mapped(StringTableSlice { byte_start_lo: 193, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f6b}', to: '\u{2f6b}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f6c}', to: '\u{2f6c}', mapping: Mapped(StringTableSlice { byte_start_lo: 199, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f6d}', to: '\u{2f6d}', mapping: Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f6e}', to: '\u{2f6e}', mapping: Mapped(StringTableSlice { byte_start_lo: 205, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f6f}', to: '\u{2f6f}', mapping: Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f70}', to: '\u{2f70}', mapping: Mapped(StringTableSlice { byte_start_lo: 211, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f71}', to: '\u{2f71}', mapping: Mapped(StringTableSlice { byte_start_lo: 214, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f72}', to: '\u{2f72}', mapping: Mapped(StringTableSlice { byte_start_lo: 217, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f73}', to: '\u{2f73}', mapping: Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f74}', to: '\u{2f74}', mapping: Mapped(StringTableSlice { byte_start_lo: 223, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f75}', to: '\u{2f75}', mapping: Mapped(StringTableSlice { byte_start_lo: 226, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f76}', to: '\u{2f76}', mapping: Mapped(StringTableSlice { byte_start_lo: 229, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f77}', to: '\u{2f77}', mapping: Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f78}', to: '\u{2f78}', mapping: Mapped(StringTableSlice { byte_start_lo: 235, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f79}', to: '\u{2f79}', mapping: Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f7a}', to: '\u{2f7a}', mapping: Mapped(StringTableSlice { byte_start_lo: 241, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f7b}', to: '\u{2f7b}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f7c}', to: '\u{2f7c}', mapping: Mapped(StringTableSlice { byte_start_lo: 247, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f7d}', to: '\u{2f7d}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f7e}', to: '\u{2f7e}', mapping: Mapped(StringTableSlice { byte_start_lo: 253, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f7f}', to: '\u{2f7f}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f80}', to: '\u{2f80}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f81}', to: '\u{2f81}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f82}', to: '\u{2f82}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f83}', to: '\u{2f83}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f84}', to: '\u{2f84}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f85}', to: '\u{2f85}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f86}', to: '\u{2f86}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f87}', to: '\u{2f87}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f88}', to: '\u{2f88}', mapping: Mapped(StringTableSlice { byte_start_lo: 27, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f89}', to: '\u{2f89}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f8a}', to: '\u{2f8a}', mapping: Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f8b}', to: '\u{2f8b}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f8c}', to: '\u{2f8c}', mapping: Mapped(StringTableSlice { byte_start_lo: 39, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f8d}', to: '\u{2f8d}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f8e}', to: '\u{2f8e}', mapping: Mapped(StringTableSlice { byte_start_lo: 45, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f8f}', to: '\u{2f8f}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f90}', to: '\u{2f90}', mapping: Mapped(StringTableSlice { byte_start_lo: 51, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f91}', to: '\u{2f91}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f92}', to: '\u{2f92}', mapping: Mapped(StringTableSlice { byte_start_lo: 57, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f93}', to: '\u{2f93}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f94}', to: '\u{2f94}', mapping: Mapped(StringTableSlice { byte_start_lo: 63, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f95}', to: '\u{2f95}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f96}', to: '\u{2f96}', mapping: Mapped(StringTableSlice { byte_start_lo: 69, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f97}', to: '\u{2f97}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f98}', to: '\u{2f98}', mapping: Mapped(StringTableSlice { byte_start_lo: 75, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f99}', to: '\u{2f99}', mapping: Mapped(StringTableSlice { byte_start_lo: 78, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f9a}', to: '\u{2f9a}', mapping: Mapped(StringTableSlice { byte_start_lo: 81, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f9b}', to: '\u{2f9b}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f9c}', to: '\u{2f9c}', mapping: Mapped(StringTableSlice { byte_start_lo: 87, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f9d}', to: '\u{2f9d}', mapping: Mapped(StringTableSlice { byte_start_lo: 90, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f9e}', to: '\u{2f9e}', mapping: Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f9f}', to: '\u{2f9f}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fa0}', to: '\u{2fa0}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fa1}', to: '\u{2fa1}', mapping: Mapped(StringTableSlice { byte_start_lo: 102, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fa2}', to: '\u{2fa2}', mapping: Mapped(StringTableSlice { byte_start_lo: 105, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fa3}', to: '\u{2fa3}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fa4}', to: '\u{2fa4}', mapping: Mapped(StringTableSlice { byte_start_lo: 111, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fa5}', to: '\u{2fa5}', mapping: Mapped(StringTableSlice { byte_start_lo: 114, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fa6}', to: '\u{2fa6}', mapping: Mapped(StringTableSlice { byte_start_lo: 117, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fa7}', to: '\u{2fa7}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fa8}', to: '\u{2fa8}', mapping: Mapped(StringTableSlice { byte_start_lo: 123, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fa9}', to: '\u{2fa9}', mapping: Mapped(StringTableSlice { byte_start_lo: 126, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2faa}', to: '\u{2faa}', mapping: Mapped(StringTableSlice { byte_start_lo: 129, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fab}', to: '\u{2fab}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fac}', to: '\u{2fac}', mapping: Mapped(StringTableSlice { byte_start_lo: 135, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fad}', to: '\u{2fad}', mapping: Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fae}', to: '\u{2fae}', mapping: Mapped(StringTableSlice { byte_start_lo: 141, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2faf}', to: '\u{2faf}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fb0}', to: '\u{2fb0}', mapping: Mapped(StringTableSlice { byte_start_lo: 147, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fb1}', to: '\u{2fb1}', mapping: Mapped(StringTableSlice { byte_start_lo: 150, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fb2}', to: '\u{2fb2}', mapping: Mapped(StringTableSlice { byte_start_lo: 153, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fb3}', to: '\u{2fb3}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fb4}', to: '\u{2fb4}', mapping: Mapped(StringTableSlice { byte_start_lo: 159, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fb5}', to: '\u{2fb5}', mapping: Mapped(StringTableSlice { byte_start_lo: 162, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fb6}', to: '\u{2fb6}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fb7}', to: '\u{2fb7}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fb8}', to: '\u{2fb8}', mapping: Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fb9}', to: '\u{2fb9}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fba}', to: '\u{2fba}', mapping: Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fbb}', to: '\u{2fbb}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fbc}', to: '\u{2fbc}', mapping: Mapped(StringTableSlice { byte_start_lo: 183, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fbd}', to: '\u{2fbd}', mapping: Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fbe}', to: '\u{2fbe}', mapping: Mapped(StringTableSlice { byte_start_lo: 189, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fbf}', to: '\u{2fbf}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fc0}', to: '\u{2fc0}', mapping: Mapped(StringTableSlice { byte_start_lo: 195, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fc1}', to: '\u{2fc1}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fc2}', to: '\u{2fc2}', mapping: Mapped(StringTableSlice { byte_start_lo: 201, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fc3}', to: '\u{2fc3}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fc4}', to: '\u{2fc4}', mapping: Mapped(StringTableSlice { byte_start_lo: 207, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fc5}', to: '\u{2fc5}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fc6}', to: '\u{2fc6}', mapping: Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fc7}', to: '\u{2fc7}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fc8}', to: '\u{2fc8}', mapping: Mapped(StringTableSlice { byte_start_lo: 219, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fc9}', to: '\u{2fc9}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fca}', to: '\u{2fca}', mapping: Mapped(StringTableSlice { byte_start_lo: 225, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fcb}', to: '\u{2fcb}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fcc}', to: '\u{2fcc}', mapping: Mapped(StringTableSlice { byte_start_lo: 231, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fcd}', to: '\u{2fcd}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fce}', to: '\u{2fce}', mapping: Mapped(StringTableSlice { byte_start_lo: 237, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fcf}', to: '\u{2fcf}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fd0}', to: '\u{2fd0}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fd1}', to: '\u{2fd1}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fd2}', to: '\u{2fd2}', mapping: Mapped(StringTableSlice { byte_start_lo: 249, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fd3}', to: '\u{2fd3}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fd4}', to: '\u{2fd4}', mapping: Mapped(StringTableSlice { byte_start_lo: 255, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fd5}', to: '\u{2fd5}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{2fd6}', to: '\u{2fff}', mapping: Disallowed },
++    Range { from: '\u{3000}', to: '\u{3000}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{3001}', to: '\u{3001}', mapping: Valid },
++    Range { from: '\u{3002}', to: '\u{3002}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 14, byte_len: 1 }) },
++    Range { from: '\u{3003}', to: '\u{3035}', mapping: Valid },
++    Range { from: '\u{3036}', to: '\u{3036}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3037}', to: '\u{3037}', mapping: Valid },
++    Range { from: '\u{3038}', to: '\u{3038}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{3039}', to: '\u{3039}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{303a}', to: '\u{303a}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{303b}', to: '\u{303f}', mapping: Valid },
++    Range { from: '\u{3040}', to: '\u{3040}', mapping: Disallowed },
++    Range { from: '\u{3041}', to: '\u{3096}', mapping: Valid },
++    Range { from: '\u{3097}', to: '\u{3098}', mapping: Disallowed },
++    Range { from: '\u{3099}', to: '\u{309a}', mapping: Valid },
++    Range { from: '\u{309b}', to: '\u{309b}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 14, byte_len: 4 }) },
++    Range { from: '\u{309c}', to: '\u{309c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 14, byte_len: 4 }) },
++    Range { from: '\u{309d}', to: '\u{309e}', mapping: Valid },
++    Range { from: '\u{309f}', to: '\u{309f}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 14, byte_len: 6 }) },
++    Range { from: '\u{30a0}', to: '\u{30fe}', mapping: Valid },
++    Range { from: '\u{30ff}', to: '\u{30ff}', mapping: Mapped(StringTableSlice { byte_start_lo: 29, byte_start_hi: 14, byte_len: 6 }) },
++    Range { from: '\u{3100}', to: '\u{3104}', mapping: Disallowed },
++    Range { from: '\u{3105}', to: '\u{312e}', mapping: Valid },
++    Range { from: '\u{312f}', to: '\u{3130}', mapping: Disallowed },
++    Range { from: '\u{3131}', to: '\u{3131}', mapping: Mapped(StringTableSlice { byte_start_lo: 35, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3132}', to: '\u{3132}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3133}', to: '\u{3133}', mapping: Mapped(StringTableSlice { byte_start_lo: 41, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3134}', to: '\u{3134}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3135}', to: '\u{3135}', mapping: Mapped(StringTableSlice { byte_start_lo: 47, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3136}', to: '\u{3136}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3137}', to: '\u{3137}', mapping: Mapped(StringTableSlice { byte_start_lo: 53, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3138}', to: '\u{3138}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3139}', to: '\u{3139}', mapping: Mapped(StringTableSlice { byte_start_lo: 59, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{313a}', to: '\u{313a}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{313b}', to: '\u{313b}', mapping: Mapped(StringTableSlice { byte_start_lo: 65, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{313c}', to: '\u{313c}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{313d}', to: '\u{313d}', mapping: Mapped(StringTableSlice { byte_start_lo: 71, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{313e}', to: '\u{313e}', mapping: Mapped(StringTableSlice { byte_start_lo: 74, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{313f}', to: '\u{313f}', mapping: Mapped(StringTableSlice { byte_start_lo: 77, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3140}', to: '\u{3140}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3141}', to: '\u{3141}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3142}', to: '\u{3142}', mapping: Mapped(StringTableSlice { byte_start_lo: 86, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3143}', to: '\u{3143}', mapping: Mapped(StringTableSlice { byte_start_lo: 89, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3144}', to: '\u{3144}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3145}', to: '\u{3145}', mapping: Mapped(StringTableSlice { byte_start_lo: 95, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3146}', to: '\u{3146}', mapping: Mapped(StringTableSlice { byte_start_lo: 98, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3147}', to: '\u{3147}', mapping: Mapped(StringTableSlice { byte_start_lo: 101, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3148}', to: '\u{3148}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3149}', to: '\u{3149}', mapping: Mapped(StringTableSlice { byte_start_lo: 107, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{314a}', to: '\u{314a}', mapping: Mapped(StringTableSlice { byte_start_lo: 110, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{314b}', to: '\u{314b}', mapping: Mapped(StringTableSlice { byte_start_lo: 113, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{314c}', to: '\u{314c}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{314d}', to: '\u{314d}', mapping: Mapped(StringTableSlice { byte_start_lo: 119, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{314e}', to: '\u{314e}', mapping: Mapped(StringTableSlice { byte_start_lo: 122, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{314f}', to: '\u{314f}', mapping: Mapped(StringTableSlice { byte_start_lo: 125, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3150}', to: '\u{3150}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3151}', to: '\u{3151}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3152}', to: '\u{3152}', mapping: Mapped(StringTableSlice { byte_start_lo: 134, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3153}', to: '\u{3153}', mapping: Mapped(StringTableSlice { byte_start_lo: 137, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3154}', to: '\u{3154}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3155}', to: '\u{3155}', mapping: Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3156}', to: '\u{3156}', mapping: Mapped(StringTableSlice { byte_start_lo: 146, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3157}', to: '\u{3157}', mapping: Mapped(StringTableSlice { byte_start_lo: 149, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3158}', to: '\u{3158}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3159}', to: '\u{3159}', mapping: Mapped(StringTableSlice { byte_start_lo: 155, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{315a}', to: '\u{315a}', mapping: Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{315b}', to: '\u{315b}', mapping: Mapped(StringTableSlice { byte_start_lo: 161, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{315c}', to: '\u{315c}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{315d}', to: '\u{315d}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{315e}', to: '\u{315e}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{315f}', to: '\u{315f}', mapping: Mapped(StringTableSlice { byte_start_lo: 173, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3160}', to: '\u{3160}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3161}', to: '\u{3161}', mapping: Mapped(StringTableSlice { byte_start_lo: 179, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3162}', to: '\u{3162}', mapping: Mapped(StringTableSlice { byte_start_lo: 182, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3163}', to: '\u{3163}', mapping: Mapped(StringTableSlice { byte_start_lo: 185, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3164}', to: '\u{3164}', mapping: Disallowed },
++    Range { from: '\u{3165}', to: '\u{3165}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3166}', to: '\u{3166}', mapping: Mapped(StringTableSlice { byte_start_lo: 191, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3167}', to: '\u{3167}', mapping: Mapped(StringTableSlice { byte_start_lo: 194, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3168}', to: '\u{3168}', mapping: Mapped(StringTableSlice { byte_start_lo: 197, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3169}', to: '\u{3169}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{316a}', to: '\u{316a}', mapping: Mapped(StringTableSlice { byte_start_lo: 203, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{316b}', to: '\u{316b}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{316c}', to: '\u{316c}', mapping: Mapped(StringTableSlice { byte_start_lo: 209, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{316d}', to: '\u{316d}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{316e}', to: '\u{316e}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{316f}', to: '\u{316f}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3170}', to: '\u{3170}', mapping: Mapped(StringTableSlice { byte_start_lo: 221, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3171}', to: '\u{3171}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3172}', to: '\u{3172}', mapping: Mapped(StringTableSlice { byte_start_lo: 227, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3173}', to: '\u{3173}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3174}', to: '\u{3174}', mapping: Mapped(StringTableSlice { byte_start_lo: 233, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3175}', to: '\u{3175}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3176}', to: '\u{3176}', mapping: Mapped(StringTableSlice { byte_start_lo: 239, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3177}', to: '\u{3177}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3178}', to: '\u{3178}', mapping: Mapped(StringTableSlice { byte_start_lo: 245, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3179}', to: '\u{3179}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{317a}', to: '\u{317a}', mapping: Mapped(StringTableSlice { byte_start_lo: 251, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{317b}', to: '\u{317b}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{317c}', to: '\u{317c}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{317d}', to: '\u{317d}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{317e}', to: '\u{317e}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{317f}', to: '\u{317f}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3180}', to: '\u{3180}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3181}', to: '\u{3181}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3182}', to: '\u{3182}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3183}', to: '\u{3183}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3184}', to: '\u{3184}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3185}', to: '\u{3185}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3186}', to: '\u{3186}', mapping: Mapped(StringTableSlice { byte_start_lo: 31, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3187}', to: '\u{3187}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3188}', to: '\u{3188}', mapping: Mapped(StringTableSlice { byte_start_lo: 37, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3189}', to: '\u{3189}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{318a}', to: '\u{318a}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{318b}', to: '\u{318b}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{318c}', to: '\u{318c}', mapping: Mapped(StringTableSlice { byte_start_lo: 49, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{318d}', to: '\u{318d}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{318e}', to: '\u{318e}', mapping: Mapped(StringTableSlice { byte_start_lo: 55, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{318f}', to: '\u{318f}', mapping: Disallowed },
++    Range { from: '\u{3190}', to: '\u{3191}', mapping: Valid },
++    Range { from: '\u{3192}', to: '\u{3192}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{3193}', to: '\u{3193}', mapping: Mapped(StringTableSlice { byte_start_lo: 149, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{3194}', to: '\u{3194}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3195}', to: '\u{3195}', mapping: Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3196}', to: '\u{3196}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3197}', to: '\u{3197}', mapping: Mapped(StringTableSlice { byte_start_lo: 67, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3198}', to: '\u{3198}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3199}', to: '\u{3199}', mapping: Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{319a}', to: '\u{319a}', mapping: Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{319b}', to: '\u{319b}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{319c}', to: '\u{319c}', mapping: Mapped(StringTableSlice { byte_start_lo: 79, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{319d}', to: '\u{319d}', mapping: Mapped(StringTableSlice { byte_start_lo: 82, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{319e}', to: '\u{319e}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{319f}', to: '\u{319f}', mapping: Mapped(StringTableSlice { byte_start_lo: 155, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{31a0}', to: '\u{31ba}', mapping: Valid },
++    Range { from: '\u{31bb}', to: '\u{31bf}', mapping: Disallowed },
++    Range { from: '\u{31c0}', to: '\u{31e3}', mapping: Valid },
++    Range { from: '\u{31e4}', to: '\u{31ef}', mapping: Disallowed },
++    Range { from: '\u{31f0}', to: '\u{31ff}', mapping: Valid },
++    Range { from: '\u{3200}', to: '\u{3200}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3201}', to: '\u{3201}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3202}', to: '\u{3202}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 98, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3203}', to: '\u{3203}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 103, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3204}', to: '\u{3204}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3205}', to: '\u{3205}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 113, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3206}', to: '\u{3206}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3207}', to: '\u{3207}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 123, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3208}', to: '\u{3208}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3209}', to: '\u{3209}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 133, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{320a}', to: '\u{320a}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{320b}', to: '\u{320b}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{320c}', to: '\u{320c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{320d}', to: '\u{320d}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 153, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{320e}', to: '\u{320e}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{320f}', to: '\u{320f}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3210}', to: '\u{3210}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3211}', to: '\u{3211}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 173, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3212}', to: '\u{3212}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3213}', to: '\u{3213}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 183, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3214}', to: '\u{3214}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3215}', to: '\u{3215}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 193, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3216}', to: '\u{3216}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3217}', to: '\u{3217}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 203, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3218}', to: '\u{3218}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3219}', to: '\u{3219}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{321a}', to: '\u{321a}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{321b}', to: '\u{321b}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 223, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{321c}', to: '\u{321c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{321d}', to: '\u{321d}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 233, byte_start_hi: 15, byte_len: 8 }) },
++    Range { from: '\u{321e}', to: '\u{321e}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 241, byte_start_hi: 15, byte_len: 8 }) },
++    Range { from: '\u{321f}', to: '\u{321f}', mapping: Disallowed },
++    Range { from: '\u{3220}', to: '\u{3220}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 249, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3221}', to: '\u{3221}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 15, byte_len: 5 }) },
++    Range { from: '\u{3222}', to: '\u{3222}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3223}', to: '\u{3223}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3224}', to: '\u{3224}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3225}', to: '\u{3225}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3226}', to: '\u{3226}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3227}', to: '\u{3227}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3228}', to: '\u{3228}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3229}', to: '\u{3229}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{322a}', to: '\u{322a}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{322b}', to: '\u{322b}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{322c}', to: '\u{322c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 53, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{322d}', to: '\u{322d}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{322e}', to: '\u{322e}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 63, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{322f}', to: '\u{322f}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3230}', to: '\u{3230}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3231}', to: '\u{3231}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 78, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3232}', to: '\u{3232}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3233}', to: '\u{3233}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3234}', to: '\u{3234}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3235}', to: '\u{3235}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 98, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3236}', to: '\u{3236}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 103, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3237}', to: '\u{3237}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3238}', to: '\u{3238}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 113, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3239}', to: '\u{3239}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{323a}', to: '\u{323a}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 123, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{323b}', to: '\u{323b}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{323c}', to: '\u{323c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 133, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{323d}', to: '\u{323d}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{323e}', to: '\u{323e}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{323f}', to: '\u{323f}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3240}', to: '\u{3240}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 153, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3241}', to: '\u{3241}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3242}', to: '\u{3242}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3243}', to: '\u{3243}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 16, byte_len: 5 }) },
++    Range { from: '\u{3244}', to: '\u{3244}', mapping: Mapped(StringTableSlice { byte_start_lo: 173, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{3245}', to: '\u{3245}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{3246}', to: '\u{3246}', mapping: Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{3247}', to: '\u{3247}', mapping: Mapped(StringTableSlice { byte_start_lo: 179, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{3248}', to: '\u{324f}', mapping: Valid },
++    Range { from: '\u{3250}', to: '\u{3250}', mapping: Mapped(StringTableSlice { byte_start_lo: 182, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{3251}', to: '\u{3251}', mapping: Mapped(StringTableSlice { byte_start_lo: 185, byte_start_hi: 16, byte_len: 2 }) },
++    Range { from: '\u{3252}', to: '\u{3252}', mapping: Mapped(StringTableSlice { byte_start_lo: 187, byte_start_hi: 16, byte_len: 2 }) },
++    Range { from: '\u{3253}', to: '\u{3253}', mapping: Mapped(StringTableSlice { byte_start_lo: 189, byte_start_hi: 16, byte_len: 2 }) },
++    Range { from: '\u{3254}', to: '\u{3254}', mapping: Mapped(StringTableSlice { byte_start_lo: 191, byte_start_hi: 16, byte_len: 2 }) },
++    Range { from: '\u{3255}', to: '\u{3255}', mapping: Mapped(StringTableSlice { byte_start_lo: 193, byte_start_hi: 16, byte_len: 2 }) },
++    Range { from: '\u{3256}', to: '\u{3256}', mapping: Mapped(StringTableSlice { byte_start_lo: 195, byte_start_hi: 16, byte_len: 2 }) },
++    Range { from: '\u{3257}', to: '\u{3257}', mapping: Mapped(StringTableSlice { byte_start_lo: 197, byte_start_hi: 16, byte_len: 2 }) },
++    Range { from: '\u{3258}', to: '\u{3258}', mapping: Mapped(StringTableSlice { byte_start_lo: 199, byte_start_hi: 16, byte_len: 2 }) },
++    Range { from: '\u{3259}', to: '\u{3259}', mapping: Mapped(StringTableSlice { byte_start_lo: 201, byte_start_hi: 16, byte_len: 2 }) },
++    Range { from: '\u{325a}', to: '\u{325a}', mapping: Mapped(StringTableSlice { byte_start_lo: 203, byte_start_hi: 16, byte_len: 2 }) },
++    Range { from: '\u{325b}', to: '\u{325b}', mapping: Mapped(StringTableSlice { byte_start_lo: 205, byte_start_hi: 16, byte_len: 2 }) },
++    Range { from: '\u{325c}', to: '\u{325c}', mapping: Mapped(StringTableSlice { byte_start_lo: 207, byte_start_hi: 16, byte_len: 2 }) },
++    Range { from: '\u{325d}', to: '\u{325d}', mapping: Mapped(StringTableSlice { byte_start_lo: 209, byte_start_hi: 16, byte_len: 2 }) },
++    Range { from: '\u{325e}', to: '\u{325e}', mapping: Mapped(StringTableSlice { byte_start_lo: 211, byte_start_hi: 16, byte_len: 2 }) },
++    Range { from: '\u{325f}', to: '\u{325f}', mapping: Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 16, byte_len: 2 }) },
++    Range { from: '\u{3260}', to: '\u{3260}', mapping: Mapped(StringTableSlice { byte_start_lo: 35, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3261}', to: '\u{3261}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3262}', to: '\u{3262}', mapping: Mapped(StringTableSlice { byte_start_lo: 53, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3263}', to: '\u{3263}', mapping: Mapped(StringTableSlice { byte_start_lo: 59, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3264}', to: '\u{3264}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3265}', to: '\u{3265}', mapping: Mapped(StringTableSlice { byte_start_lo: 86, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3266}', to: '\u{3266}', mapping: Mapped(StringTableSlice { byte_start_lo: 95, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3267}', to: '\u{3267}', mapping: Mapped(StringTableSlice { byte_start_lo: 101, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3268}', to: '\u{3268}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{3269}', to: '\u{3269}', mapping: Mapped(StringTableSlice { byte_start_lo: 110, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{326a}', to: '\u{326a}', mapping: Mapped(StringTableSlice { byte_start_lo: 113, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{326b}', to: '\u{326b}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{326c}', to: '\u{326c}', mapping: Mapped(StringTableSlice { byte_start_lo: 119, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{326d}', to: '\u{326d}', mapping: Mapped(StringTableSlice { byte_start_lo: 122, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{326e}', to: '\u{326e}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{326f}', to: '\u{326f}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{3270}', to: '\u{3270}', mapping: Mapped(StringTableSlice { byte_start_lo: 221, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{3271}', to: '\u{3271}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{3272}', to: '\u{3272}', mapping: Mapped(StringTableSlice { byte_start_lo: 227, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{3273}', to: '\u{3273}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{3274}', to: '\u{3274}', mapping: Mapped(StringTableSlice { byte_start_lo: 233, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{3275}', to: '\u{3275}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{3276}', to: '\u{3276}', mapping: Mapped(StringTableSlice { byte_start_lo: 239, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{3277}', to: '\u{3277}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{3278}', to: '\u{3278}', mapping: Mapped(StringTableSlice { byte_start_lo: 245, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{3279}', to: '\u{3279}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{327a}', to: '\u{327a}', mapping: Mapped(StringTableSlice { byte_start_lo: 251, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{327b}', to: '\u{327b}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 16, byte_len: 3 }) },
++    Range { from: '\u{327c}', to: '\u{327c}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 17, byte_len: 6 }) },
++    Range { from: '\u{327d}', to: '\u{327d}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 17, byte_len: 6 }) },
++    Range { from: '\u{327e}', to: '\u{327e}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{327f}', to: '\u{327f}', mapping: Valid },
++    Range { from: '\u{3280}', to: '\u{3280}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{3281}', to: '\u{3281}', mapping: Mapped(StringTableSlice { byte_start_lo: 149, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{3282}', to: '\u{3282}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3283}', to: '\u{3283}', mapping: Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{3284}', to: '\u{3284}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{3285}', to: '\u{3285}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{3286}', to: '\u{3286}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{3287}', to: '\u{3287}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{3288}', to: '\u{3288}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{3289}', to: '\u{3289}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{328a}', to: '\u{328a}', mapping: Mapped(StringTableSlice { byte_start_lo: 94, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{328b}', to: '\u{328b}', mapping: Mapped(StringTableSlice { byte_start_lo: 130, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{328c}', to: '\u{328c}', mapping: Mapped(StringTableSlice { byte_start_lo: 127, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{328d}', to: '\u{328d}', mapping: Mapped(StringTableSlice { byte_start_lo: 97, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{328e}', to: '\u{328e}', mapping: Mapped(StringTableSlice { byte_start_lo: 117, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{328f}', to: '\u{328f}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{3290}', to: '\u{3290}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{3291}', to: '\u{3291}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{3292}', to: '\u{3292}', mapping: Mapped(StringTableSlice { byte_start_lo: 31, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{3293}', to: '\u{3293}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{3294}', to: '\u{3294}', mapping: Mapped(StringTableSlice { byte_start_lo: 37, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{3295}', to: '\u{3295}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{3296}', to: '\u{3296}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{3297}', to: '\u{3297}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{3298}', to: '\u{3298}', mapping: Mapped(StringTableSlice { byte_start_lo: 49, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{3299}', to: '\u{3299}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{329a}', to: '\u{329a}', mapping: Mapped(StringTableSlice { byte_start_lo: 55, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{329b}', to: '\u{329b}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{329c}', to: '\u{329c}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{329d}', to: '\u{329d}', mapping: Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{329e}', to: '\u{329e}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{329f}', to: '\u{329f}', mapping: Mapped(StringTableSlice { byte_start_lo: 67, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32a0}', to: '\u{32a0}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32a1}', to: '\u{32a1}', mapping: Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32a2}', to: '\u{32a2}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32a3}', to: '\u{32a3}', mapping: Mapped(StringTableSlice { byte_start_lo: 79, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32a4}', to: '\u{32a4}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{32a5}', to: '\u{32a5}', mapping: Mapped(StringTableSlice { byte_start_lo: 67, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{32a6}', to: '\u{32a6}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{32a7}', to: '\u{32a7}', mapping: Mapped(StringTableSlice { byte_start_lo: 82, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32a8}', to: '\u{32a8}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32a9}', to: '\u{32a9}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32aa}', to: '\u{32aa}', mapping: Mapped(StringTableSlice { byte_start_lo: 91, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32ab}', to: '\u{32ab}', mapping: Mapped(StringTableSlice { byte_start_lo: 94, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32ac}', to: '\u{32ac}', mapping: Mapped(StringTableSlice { byte_start_lo: 97, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32ad}', to: '\u{32ad}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32ae}', to: '\u{32ae}', mapping: Mapped(StringTableSlice { byte_start_lo: 103, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32af}', to: '\u{32af}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32b0}', to: '\u{32b0}', mapping: Mapped(StringTableSlice { byte_start_lo: 109, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32b1}', to: '\u{32b1}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32b2}', to: '\u{32b2}', mapping: Mapped(StringTableSlice { byte_start_lo: 114, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32b3}', to: '\u{32b3}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32b4}', to: '\u{32b4}', mapping: Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32b5}', to: '\u{32b5}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32b6}', to: '\u{32b6}', mapping: Mapped(StringTableSlice { byte_start_lo: 122, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32b7}', to: '\u{32b7}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32b8}', to: '\u{32b8}', mapping: Mapped(StringTableSlice { byte_start_lo: 126, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32b9}', to: '\u{32b9}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32ba}', to: '\u{32ba}', mapping: Mapped(StringTableSlice { byte_start_lo: 130, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32bb}', to: '\u{32bb}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32bc}', to: '\u{32bc}', mapping: Mapped(StringTableSlice { byte_start_lo: 134, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32bd}', to: '\u{32bd}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32be}', to: '\u{32be}', mapping: Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32bf}', to: '\u{32bf}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32c0}', to: '\u{32c0}', mapping: Mapped(StringTableSlice { byte_start_lo: 142, byte_start_hi: 17, byte_len: 4 }) },
++    Range { from: '\u{32c1}', to: '\u{32c1}', mapping: Mapped(StringTableSlice { byte_start_lo: 146, byte_start_hi: 17, byte_len: 4 }) },
++    Range { from: '\u{32c2}', to: '\u{32c2}', mapping: Mapped(StringTableSlice { byte_start_lo: 150, byte_start_hi: 17, byte_len: 4 }) },
++    Range { from: '\u{32c3}', to: '\u{32c3}', mapping: Mapped(StringTableSlice { byte_start_lo: 154, byte_start_hi: 17, byte_len: 4 }) },
++    Range { from: '\u{32c4}', to: '\u{32c4}', mapping: Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 17, byte_len: 4 }) },
++    Range { from: '\u{32c5}', to: '\u{32c5}', mapping: Mapped(StringTableSlice { byte_start_lo: 162, byte_start_hi: 17, byte_len: 4 }) },
++    Range { from: '\u{32c6}', to: '\u{32c6}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 17, byte_len: 4 }) },
++    Range { from: '\u{32c7}', to: '\u{32c7}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 17, byte_len: 4 }) },
++    Range { from: '\u{32c8}', to: '\u{32c8}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 17, byte_len: 4 }) },
++    Range { from: '\u{32c9}', to: '\u{32c9}', mapping: Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 17, byte_len: 5 }) },
++    Range { from: '\u{32ca}', to: '\u{32ca}', mapping: Mapped(StringTableSlice { byte_start_lo: 183, byte_start_hi: 17, byte_len: 5 }) },
++    Range { from: '\u{32cb}', to: '\u{32cb}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 17, byte_len: 5 }) },
++    Range { from: '\u{32cc}', to: '\u{32cc}', mapping: Mapped(StringTableSlice { byte_start_lo: 193, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32cd}', to: '\u{32cd}', mapping: Mapped(StringTableSlice { byte_start_lo: 195, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32ce}', to: '\u{32ce}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 17, byte_len: 2 }) },
++    Range { from: '\u{32cf}', to: '\u{32cf}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32d0}', to: '\u{32d0}', mapping: Mapped(StringTableSlice { byte_start_lo: 203, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32d1}', to: '\u{32d1}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32d2}', to: '\u{32d2}', mapping: Mapped(StringTableSlice { byte_start_lo: 209, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32d3}', to: '\u{32d3}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32d4}', to: '\u{32d4}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32d5}', to: '\u{32d5}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32d6}', to: '\u{32d6}', mapping: Mapped(StringTableSlice { byte_start_lo: 221, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32d7}', to: '\u{32d7}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32d8}', to: '\u{32d8}', mapping: Mapped(StringTableSlice { byte_start_lo: 227, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32d9}', to: '\u{32d9}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32da}', to: '\u{32da}', mapping: Mapped(StringTableSlice { byte_start_lo: 233, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32db}', to: '\u{32db}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32dc}', to: '\u{32dc}', mapping: Mapped(StringTableSlice { byte_start_lo: 239, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32dd}', to: '\u{32dd}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32de}', to: '\u{32de}', mapping: Mapped(StringTableSlice { byte_start_lo: 245, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32df}', to: '\u{32df}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32e0}', to: '\u{32e0}', mapping: Mapped(StringTableSlice { byte_start_lo: 251, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32e1}', to: '\u{32e1}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{32e2}', to: '\u{32e2}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32e3}', to: '\u{32e3}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32e4}', to: '\u{32e4}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32e5}', to: '\u{32e5}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32e6}', to: '\u{32e6}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32e7}', to: '\u{32e7}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32e8}', to: '\u{32e8}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32e9}', to: '\u{32e9}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32ea}', to: '\u{32ea}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32eb}', to: '\u{32eb}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32ec}', to: '\u{32ec}', mapping: Mapped(StringTableSlice { byte_start_lo: 31, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32ed}', to: '\u{32ed}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32ee}', to: '\u{32ee}', mapping: Mapped(StringTableSlice { byte_start_lo: 37, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32ef}', to: '\u{32ef}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32f0}', to: '\u{32f0}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32f1}', to: '\u{32f1}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32f2}', to: '\u{32f2}', mapping: Mapped(StringTableSlice { byte_start_lo: 49, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32f3}', to: '\u{32f3}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32f4}', to: '\u{32f4}', mapping: Mapped(StringTableSlice { byte_start_lo: 55, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32f5}', to: '\u{32f5}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32f6}', to: '\u{32f6}', mapping: Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32f7}', to: '\u{32f7}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32f8}', to: '\u{32f8}', mapping: Mapped(StringTableSlice { byte_start_lo: 67, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32f9}', to: '\u{32f9}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32fa}', to: '\u{32fa}', mapping: Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32fb}', to: '\u{32fb}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32fc}', to: '\u{32fc}', mapping: Mapped(StringTableSlice { byte_start_lo: 79, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32fd}', to: '\u{32fd}', mapping: Mapped(StringTableSlice { byte_start_lo: 82, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32fe}', to: '\u{32fe}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{32ff}', to: '\u{32ff}', mapping: Disallowed },
++    Range { from: '\u{3300}', to: '\u{3300}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 18, byte_len: 12 }) },
++    Range { from: '\u{3301}', to: '\u{3301}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 18, byte_len: 12 }) },
++    Range { from: '\u{3302}', to: '\u{3302}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 18, byte_len: 12 }) },
++    Range { from: '\u{3303}', to: '\u{3303}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 18, byte_len: 9 }) },
++    Range { from: '\u{3304}', to: '\u{3304}', mapping: Mapped(StringTableSlice { byte_start_lo: 133, byte_start_hi: 18, byte_len: 12 }) },
++    Range { from: '\u{3305}', to: '\u{3305}', mapping: Mapped(StringTableSlice { byte_start_lo: 145, byte_start_hi: 18, byte_len: 9 }) },
++    Range { from: '\u{3306}', to: '\u{3306}', mapping: Mapped(StringTableSlice { byte_start_lo: 154, byte_start_hi: 18, byte_len: 9 }) },
++    Range { from: '\u{3307}', to: '\u{3307}', mapping: Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 18, byte_len: 15 }) },
++    Range { from: '\u{3308}', to: '\u{3308}', mapping: Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 18, byte_len: 12 }) },
++    Range { from: '\u{3309}', to: '\u{3309}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 18, byte_len: 9 }) },
++    Range { from: '\u{330a}', to: '\u{330a}', mapping: Mapped(StringTableSlice { byte_start_lo: 199, byte_start_hi: 18, byte_len: 9 }) },
++    Range { from: '\u{330b}', to: '\u{330b}', mapping: Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 18, byte_len: 9 }) },
++    Range { from: '\u{330c}', to: '\u{330c}', mapping: Mapped(StringTableSlice { byte_start_lo: 217, byte_start_hi: 18, byte_len: 12 }) },
++    Range { from: '\u{330d}', to: '\u{330d}', mapping: Mapped(StringTableSlice { byte_start_lo: 229, byte_start_hi: 18, byte_len: 12 }) },
++    Range { from: '\u{330e}', to: '\u{330e}', mapping: Mapped(StringTableSlice { byte_start_lo: 241, byte_start_hi: 18, byte_len: 9 }) },
++    Range { from: '\u{330f}', to: '\u{330f}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 18, byte_len: 9 }) },
++    Range { from: '\u{3310}', to: '\u{3310}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 19, byte_len: 6 }) },
++    Range { from: '\u{3311}', to: '\u{3311}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 19, byte_len: 9 }) },
++    Range { from: '\u{3312}', to: '\u{3312}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 19, byte_len: 12 }) },
++    Range { from: '\u{3313}', to: '\u{3313}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 19, byte_len: 12 }) },
++    Range { from: '\u{3314}', to: '\u{3314}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 19, byte_len: 6 }) },
++    Range { from: '\u{3315}', to: '\u{3315}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 19, byte_len: 15 }) },
++    Range { from: '\u{3316}', to: '\u{3316}', mapping: Mapped(StringTableSlice { byte_start_lo: 63, byte_start_hi: 19, byte_len: 18 }) },
++    Range { from: '\u{3317}', to: '\u{3317}', mapping: Mapped(StringTableSlice { byte_start_lo: 81, byte_start_hi: 19, byte_len: 15 }) },
++    Range { from: '\u{3318}', to: '\u{3318}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 19, byte_len: 9 }) },
++    Range { from: '\u{3319}', to: '\u{3319}', mapping: Mapped(StringTableSlice { byte_start_lo: 105, byte_start_hi: 19, byte_len: 15 }) },
++    Range { from: '\u{331a}', to: '\u{331a}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 19, byte_len: 15 }) },
++    Range { from: '\u{331b}', to: '\u{331b}', mapping: Mapped(StringTableSlice { byte_start_lo: 135, byte_start_hi: 19, byte_len: 12 }) },
++    Range { from: '\u{331c}', to: '\u{331c}', mapping: Mapped(StringTableSlice { byte_start_lo: 147, byte_start_hi: 19, byte_len: 9 }) },
++    Range { from: '\u{331d}', to: '\u{331d}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 19, byte_len: 9 }) },
++    Range { from: '\u{331e}', to: '\u{331e}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 19, byte_len: 9 }) },
++    Range { from: '\u{331f}', to: '\u{331f}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 19, byte_len: 12 }) },
++    Range { from: '\u{3320}', to: '\u{3320}', mapping: Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 19, byte_len: 15 }) },
++    Range { from: '\u{3321}', to: '\u{3321}', mapping: Mapped(StringTableSlice { byte_start_lo: 201, byte_start_hi: 19, byte_len: 12 }) },
++    Range { from: '\u{3322}', to: '\u{3322}', mapping: Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 19, byte_len: 9 }) },
++    Range { from: '\u{3323}', to: '\u{3323}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 19, byte_len: 9 }) },
++    Range { from: '\u{3324}', to: '\u{3324}', mapping: Mapped(StringTableSlice { byte_start_lo: 231, byte_start_hi: 19, byte_len: 9 }) },
++    Range { from: '\u{3325}', to: '\u{3325}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 19, byte_len: 6 }) },
++    Range { from: '\u{3326}', to: '\u{3326}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 19, byte_len: 6 }) },
++    Range { from: '\u{3327}', to: '\u{3327}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 19, byte_len: 6 }) },
++    Range { from: '\u{3328}', to: '\u{3328}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 20, byte_len: 6 }) },
++    Range { from: '\u{3329}', to: '\u{3329}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 20, byte_len: 9 }) },
++    Range { from: '\u{332a}', to: '\u{332a}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 20, byte_len: 9 }) },
++    Range { from: '\u{332b}', to: '\u{332b}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 20, byte_len: 15 }) },
++    Range { from: '\u{332c}', to: '\u{332c}', mapping: Mapped(StringTableSlice { byte_start_lo: 41, byte_start_hi: 20, byte_len: 9 }) },
++    Range { from: '\u{332d}', to: '\u{332d}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 20, byte_len: 12 }) },
++    Range { from: '\u{332e}', to: '\u{332e}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 20, byte_len: 15 }) },
++    Range { from: '\u{332f}', to: '\u{332f}', mapping: Mapped(StringTableSlice { byte_start_lo: 77, byte_start_hi: 20, byte_len: 9 }) },
++    Range { from: '\u{3330}', to: '\u{3330}', mapping: Mapped(StringTableSlice { byte_start_lo: 86, byte_start_hi: 20, byte_len: 6 }) },
++    Range { from: '\u{3331}', to: '\u{3331}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 20, byte_len: 6 }) },
++    Range { from: '\u{3332}', to: '\u{3332}', mapping: Mapped(StringTableSlice { byte_start_lo: 98, byte_start_hi: 20, byte_len: 15 }) },
++    Range { from: '\u{3333}', to: '\u{3333}', mapping: Mapped(StringTableSlice { byte_start_lo: 113, byte_start_hi: 20, byte_len: 12 }) },
++    Range { from: '\u{3334}', to: '\u{3334}', mapping: Mapped(StringTableSlice { byte_start_lo: 125, byte_start_hi: 20, byte_len: 15 }) },
++    Range { from: '\u{3335}', to: '\u{3335}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 20, byte_len: 9 }) },
++    Range { from: '\u{3336}', to: '\u{3336}', mapping: Mapped(StringTableSlice { byte_start_lo: 149, byte_start_hi: 20, byte_len: 15 }) },
++    Range { from: '\u{3337}', to: '\u{3337}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 20, byte_len: 6 }) },
++    Range { from: '\u{3338}', to: '\u{3338}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 20, byte_len: 9 }) },
++    Range { from: '\u{3339}', to: '\u{3339}', mapping: Mapped(StringTableSlice { byte_start_lo: 179, byte_start_hi: 20, byte_len: 9 }) },
++    Range { from: '\u{333a}', to: '\u{333a}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 20, byte_len: 9 }) },
++    Range { from: '\u{333b}', to: '\u{333b}', mapping: Mapped(StringTableSlice { byte_start_lo: 197, byte_start_hi: 20, byte_len: 9 }) },
++    Range { from: '\u{333c}', to: '\u{333c}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 20, byte_len: 9 }) },
++    Range { from: '\u{333d}', to: '\u{333d}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 20, byte_len: 12 }) },
++    Range { from: '\u{333e}', to: '\u{333e}', mapping: Mapped(StringTableSlice { byte_start_lo: 227, byte_start_hi: 20, byte_len: 9 }) },
++    Range { from: '\u{333f}', to: '\u{333f}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 20, byte_len: 6 }) },
++    Range { from: '\u{3340}', to: '\u{3340}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 20, byte_len: 9 }) },
++    Range { from: '\u{3341}', to: '\u{3341}', mapping: Mapped(StringTableSlice { byte_start_lo: 251, byte_start_hi: 20, byte_len: 9 }) },
++    Range { from: '\u{3342}', to: '\u{3342}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 21, byte_len: 9 }) },
++    Range { from: '\u{3343}', to: '\u{3343}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 21, byte_len: 12 }) },
++    Range { from: '\u{3344}', to: '\u{3344}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 21, byte_len: 9 }) },
++    Range { from: '\u{3345}', to: '\u{3345}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 21, byte_len: 9 }) },
++    Range { from: '\u{3346}', to: '\u{3346}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 21, byte_len: 9 }) },
++    Range { from: '\u{3347}', to: '\u{3347}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 21, byte_len: 15 }) },
++    Range { from: '\u{3348}', to: '\u{3348}', mapping: Mapped(StringTableSlice { byte_start_lo: 67, byte_start_hi: 21, byte_len: 12 }) },
++    Range { from: '\u{3349}', to: '\u{3349}', mapping: Mapped(StringTableSlice { byte_start_lo: 79, byte_start_hi: 21, byte_len: 6 }) },
++    Range { from: '\u{334a}', to: '\u{334a}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 21, byte_len: 15 }) },
++    Range { from: '\u{334b}', to: '\u{334b}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 21, byte_len: 6 }) },
++    Range { from: '\u{334c}', to: '\u{334c}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 21, byte_len: 12 }) },
++    Range { from: '\u{334d}', to: '\u{334d}', mapping: Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 21, byte_len: 12 }) },
++    Range { from: '\u{334e}', to: '\u{334e}', mapping: Mapped(StringTableSlice { byte_start_lo: 130, byte_start_hi: 21, byte_len: 9 }) },
++    Range { from: '\u{334f}', to: '\u{334f}', mapping: Mapped(StringTableSlice { byte_start_lo: 139, byte_start_hi: 21, byte_len: 9 }) },
++    Range { from: '\u{3350}', to: '\u{3350}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 21, byte_len: 9 }) },
++    Range { from: '\u{3351}', to: '\u{3351}', mapping: Mapped(StringTableSlice { byte_start_lo: 157, byte_start_hi: 21, byte_len: 12 }) },
++    Range { from: '\u{3352}', to: '\u{3352}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 21, byte_len: 6 }) },
++    Range { from: '\u{3353}', to: '\u{3353}', mapping: Mapped(StringTableSlice { byte_start_lo: 175, byte_start_hi: 21, byte_len: 9 }) },
++    Range { from: '\u{3354}', to: '\u{3354}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 21, byte_len: 12 }) },
++    Range { from: '\u{3355}', to: '\u{3355}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 21, byte_len: 6 }) },
++    Range { from: '\u{3356}', to: '\u{3356}', mapping: Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 21, byte_len: 15 }) },
++    Range { from: '\u{3357}', to: '\u{3357}', mapping: Mapped(StringTableSlice { byte_start_lo: 217, byte_start_hi: 21, byte_len: 9 }) },
++    Range { from: '\u{3358}', to: '\u{3358}', mapping: Mapped(StringTableSlice { byte_start_lo: 226, byte_start_hi: 21, byte_len: 4 }) },
++    Range { from: '\u{3359}', to: '\u{3359}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 21, byte_len: 4 }) },
++    Range { from: '\u{335a}', to: '\u{335a}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 21, byte_len: 4 }) },
++    Range { from: '\u{335b}', to: '\u{335b}', mapping: Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 21, byte_len: 4 }) },
++    Range { from: '\u{335c}', to: '\u{335c}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 21, byte_len: 4 }) },
++    Range { from: '\u{335d}', to: '\u{335d}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 21, byte_len: 4 }) },
++    Range { from: '\u{335e}', to: '\u{335e}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 21, byte_len: 4 }) },
++    Range { from: '\u{335f}', to: '\u{335f}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 21, byte_len: 4 }) },
++    Range { from: '\u{3360}', to: '\u{3360}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 22, byte_len: 4 }) },
++    Range { from: '\u{3361}', to: '\u{3361}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 22, byte_len: 4 }) },
++    Range { from: '\u{3362}', to: '\u{3362}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 22, byte_len: 5 }) },
++    Range { from: '\u{3363}', to: '\u{3363}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 22, byte_len: 5 }) },
++    Range { from: '\u{3364}', to: '\u{3364}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 22, byte_len: 5 }) },
++    Range { from: '\u{3365}', to: '\u{3365}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 22, byte_len: 5 }) },
++    Range { from: '\u{3366}', to: '\u{3366}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 22, byte_len: 5 }) },
++    Range { from: '\u{3367}', to: '\u{3367}', mapping: Mapped(StringTableSlice { byte_start_lo: 35, byte_start_hi: 22, byte_len: 5 }) },
++    Range { from: '\u{3368}', to: '\u{3368}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 22, byte_len: 5 }) },
++    Range { from: '\u{3369}', to: '\u{3369}', mapping: Mapped(StringTableSlice { byte_start_lo: 45, byte_start_hi: 22, byte_len: 5 }) },
++    Range { from: '\u{336a}', to: '\u{336a}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 22, byte_len: 5 }) },
++    Range { from: '\u{336b}', to: '\u{336b}', mapping: Mapped(StringTableSlice { byte_start_lo: 55, byte_start_hi: 22, byte_len: 5 }) },
++    Range { from: '\u{336c}', to: '\u{336c}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 22, byte_len: 5 }) },
++    Range { from: '\u{336d}', to: '\u{336d}', mapping: Mapped(StringTableSlice { byte_start_lo: 65, byte_start_hi: 22, byte_len: 5 }) },
++    Range { from: '\u{336e}', to: '\u{336e}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 22, byte_len: 5 }) },
++    Range { from: '\u{336f}', to: '\u{336f}', mapping: Mapped(StringTableSlice { byte_start_lo: 75, byte_start_hi: 22, byte_len: 5 }) },
++    Range { from: '\u{3370}', to: '\u{3370}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 22, byte_len: 5 }) },
++    Range { from: '\u{3371}', to: '\u{3371}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{3372}', to: '\u{3372}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3373}', to: '\u{3373}', mapping: Mapped(StringTableSlice { byte_start_lo: 90, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3374}', to: '\u{3374}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{3375}', to: '\u{3375}', mapping: Mapped(StringTableSlice { byte_start_lo: 95, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3376}', to: '\u{3376}', mapping: Mapped(StringTableSlice { byte_start_lo: 97, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3377}', to: '\u{3377}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3378}', to: '\u{3378}', mapping: Mapped(StringTableSlice { byte_start_lo: 101, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{3379}', to: '\u{3379}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{337a}', to: '\u{337a}', mapping: Mapped(StringTableSlice { byte_start_lo: 107, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{337b}', to: '\u{337b}', mapping: Mapped(StringTableSlice { byte_start_lo: 109, byte_start_hi: 22, byte_len: 6 }) },
++    Range { from: '\u{337c}', to: '\u{337c}', mapping: Mapped(StringTableSlice { byte_start_lo: 115, byte_start_hi: 22, byte_len: 6 }) },
++    Range { from: '\u{337d}', to: '\u{337d}', mapping: Mapped(StringTableSlice { byte_start_lo: 121, byte_start_hi: 22, byte_len: 6 }) },
++    Range { from: '\u{337e}', to: '\u{337e}', mapping: Mapped(StringTableSlice { byte_start_lo: 127, byte_start_hi: 22, byte_len: 6 }) },
++    Range { from: '\u{337f}', to: '\u{337f}', mapping: Mapped(StringTableSlice { byte_start_lo: 133, byte_start_hi: 22, byte_len: 12 }) },
++    Range { from: '\u{3380}', to: '\u{3380}', mapping: Mapped(StringTableSlice { byte_start_lo: 145, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3381}', to: '\u{3381}', mapping: Mapped(StringTableSlice { byte_start_lo: 147, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3382}', to: '\u{3382}', mapping: Mapped(StringTableSlice { byte_start_lo: 149, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{3383}', to: '\u{3383}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3384}', to: '\u{3384}', mapping: Mapped(StringTableSlice { byte_start_lo: 154, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3385}', to: '\u{3385}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3386}', to: '\u{3386}', mapping: Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3387}', to: '\u{3387}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3388}', to: '\u{3388}', mapping: Mapped(StringTableSlice { byte_start_lo: 162, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{3389}', to: '\u{3389}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 22, byte_len: 4 }) },
++    Range { from: '\u{338a}', to: '\u{338a}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{338b}', to: '\u{338b}', mapping: Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{338c}', to: '\u{338c}', mapping: Mapped(StringTableSlice { byte_start_lo: 173, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{338d}', to: '\u{338d}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{338e}', to: '\u{338e}', mapping: Mapped(StringTableSlice { byte_start_lo: 179, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{338f}', to: '\u{338f}', mapping: Mapped(StringTableSlice { byte_start_lo: 181, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3390}', to: '\u{3390}', mapping: Mapped(StringTableSlice { byte_start_lo: 183, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3391}', to: '\u{3391}', mapping: Mapped(StringTableSlice { byte_start_lo: 185, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{3392}', to: '\u{3392}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{3393}', to: '\u{3393}', mapping: Mapped(StringTableSlice { byte_start_lo: 191, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{3394}', to: '\u{3394}', mapping: Mapped(StringTableSlice { byte_start_lo: 194, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{3395}', to: '\u{3395}', mapping: Mapped(StringTableSlice { byte_start_lo: 197, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{3396}', to: '\u{3396}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3397}', to: '\u{3397}', mapping: Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3398}', to: '\u{3398}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{3399}', to: '\u{3399}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{339a}', to: '\u{339a}', mapping: Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{339b}', to: '\u{339b}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{339c}', to: '\u{339c}', mapping: Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{339d}', to: '\u{339d}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{339e}', to: '\u{339e}', mapping: Mapped(StringTableSlice { byte_start_lo: 217, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{339f}', to: '\u{339f}', mapping: Mapped(StringTableSlice { byte_start_lo: 219, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{33a0}', to: '\u{33a0}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{33a1}', to: '\u{33a1}', mapping: Mapped(StringTableSlice { byte_start_lo: 225, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{33a2}', to: '\u{33a2}', mapping: Mapped(StringTableSlice { byte_start_lo: 227, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{33a3}', to: '\u{33a3}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{33a4}', to: '\u{33a4}', mapping: Mapped(StringTableSlice { byte_start_lo: 233, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{33a5}', to: '\u{33a5}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{33a6}', to: '\u{33a6}', mapping: Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{33a7}', to: '\u{33a7}', mapping: Mapped(StringTableSlice { byte_start_lo: 241, byte_start_hi: 22, byte_len: 5 }) },
++    Range { from: '\u{33a8}', to: '\u{33a8}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 22, byte_len: 6 }) },
++    Range { from: '\u{33a9}', to: '\u{33a9}', mapping: Mapped(StringTableSlice { byte_start_lo: 145, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{33aa}', to: '\u{33aa}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{33ab}', to: '\u{33ab}', mapping: Mapped(StringTableSlice { byte_start_lo: 255, byte_start_hi: 22, byte_len: 3 }) },
++    Range { from: '\u{33ac}', to: '\u{33ac}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 23, byte_len: 3 }) },
++    Range { from: '\u{33ad}', to: '\u{33ad}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 23, byte_len: 3 }) },
++    Range { from: '\u{33ae}', to: '\u{33ae}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 23, byte_len: 7 }) },
++    Range { from: '\u{33af}', to: '\u{33af}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 23, byte_len: 8 }) },
++    Range { from: '\u{33b0}', to: '\u{33b0}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33b1}', to: '\u{33b1}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33b2}', to: '\u{33b2}', mapping: Mapped(StringTableSlice { byte_start_lo: 27, byte_start_hi: 23, byte_len: 3 }) },
++    Range { from: '\u{33b3}', to: '\u{33b3}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33b4}', to: '\u{33b4}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33b5}', to: '\u{33b5}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33b6}', to: '\u{33b6}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 23, byte_len: 3 }) },
++    Range { from: '\u{33b7}', to: '\u{33b7}', mapping: Mapped(StringTableSlice { byte_start_lo: 39, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33b8}', to: '\u{33b8}', mapping: Mapped(StringTableSlice { byte_start_lo: 41, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33b9}', to: '\u{33b9}', mapping: Mapped(StringTableSlice { byte_start_lo: 39, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33ba}', to: '\u{33ba}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33bb}', to: '\u{33bb}', mapping: Mapped(StringTableSlice { byte_start_lo: 45, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33bc}', to: '\u{33bc}', mapping: Mapped(StringTableSlice { byte_start_lo: 47, byte_start_hi: 23, byte_len: 3 }) },
++    Range { from: '\u{33bd}', to: '\u{33bd}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33be}', to: '\u{33be}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33bf}', to: '\u{33bf}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33c0}', to: '\u{33c0}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 23, byte_len: 3 }) },
++    Range { from: '\u{33c1}', to: '\u{33c1}', mapping: Mapped(StringTableSlice { byte_start_lo: 57, byte_start_hi: 23, byte_len: 3 }) },
++    Range { from: '\u{33c2}', to: '\u{33c2}', mapping: Disallowed },
++    Range { from: '\u{33c3}', to: '\u{33c3}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33c4}', to: '\u{33c4}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33c5}', to: '\u{33c5}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33c6}', to: '\u{33c6}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 23, byte_len: 6 }) },
++    Range { from: '\u{33c7}', to: '\u{33c7}', mapping: Disallowed },
++    Range { from: '\u{33c8}', to: '\u{33c8}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33c9}', to: '\u{33c9}', mapping: Mapped(StringTableSlice { byte_start_lo: 74, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33ca}', to: '\u{33ca}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33cb}', to: '\u{33cb}', mapping: Mapped(StringTableSlice { byte_start_lo: 78, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33cc}', to: '\u{33cc}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33cd}', to: '\u{33cd}', mapping: Mapped(StringTableSlice { byte_start_lo: 82, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33ce}', to: '\u{33ce}', mapping: Mapped(StringTableSlice { byte_start_lo: 217, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{33cf}', to: '\u{33cf}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33d0}', to: '\u{33d0}', mapping: Mapped(StringTableSlice { byte_start_lo: 86, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33d1}', to: '\u{33d1}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33d2}', to: '\u{33d2}', mapping: Mapped(StringTableSlice { byte_start_lo: 90, byte_start_hi: 23, byte_len: 3 }) },
++    Range { from: '\u{33d3}', to: '\u{33d3}', mapping: Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33d4}', to: '\u{33d4}', mapping: Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 22, byte_len: 2 }) },
++    Range { from: '\u{33d5}', to: '\u{33d5}', mapping: Mapped(StringTableSlice { byte_start_lo: 95, byte_start_hi: 23, byte_len: 3 }) },
++    Range { from: '\u{33d6}', to: '\u{33d6}', mapping: Mapped(StringTableSlice { byte_start_lo: 98, byte_start_hi: 23, byte_len: 3 }) },
++    Range { from: '\u{33d7}', to: '\u{33d7}', mapping: Mapped(StringTableSlice { byte_start_lo: 101, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33d8}', to: '\u{33d8}', mapping: Disallowed },
++    Range { from: '\u{33d9}', to: '\u{33d9}', mapping: Mapped(StringTableSlice { byte_start_lo: 103, byte_start_hi: 23, byte_len: 3 }) },
++    Range { from: '\u{33da}', to: '\u{33da}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33db}', to: '\u{33db}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33dc}', to: '\u{33dc}', mapping: Mapped(StringTableSlice { byte_start_lo: 110, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33dd}', to: '\u{33dd}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{33de}', to: '\u{33de}', mapping: Mapped(StringTableSlice { byte_start_lo: 114, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33df}', to: '\u{33df}', mapping: Mapped(StringTableSlice { byte_start_lo: 119, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33e0}', to: '\u{33e0}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 23, byte_len: 4 }) },
++    Range { from: '\u{33e1}', to: '\u{33e1}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 23, byte_len: 4 }) },
++    Range { from: '\u{33e2}', to: '\u{33e2}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 23, byte_len: 4 }) },
++    Range { from: '\u{33e3}', to: '\u{33e3}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 23, byte_len: 4 }) },
++    Range { from: '\u{33e4}', to: '\u{33e4}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 23, byte_len: 4 }) },
++    Range { from: '\u{33e5}', to: '\u{33e5}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 23, byte_len: 4 }) },
++    Range { from: '\u{33e6}', to: '\u{33e6}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 23, byte_len: 4 }) },
++    Range { from: '\u{33e7}', to: '\u{33e7}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 23, byte_len: 4 }) },
++    Range { from: '\u{33e8}', to: '\u{33e8}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 23, byte_len: 4 }) },
++    Range { from: '\u{33e9}', to: '\u{33e9}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33ea}', to: '\u{33ea}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33eb}', to: '\u{33eb}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33ec}', to: '\u{33ec}', mapping: Mapped(StringTableSlice { byte_start_lo: 175, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33ed}', to: '\u{33ed}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33ee}', to: '\u{33ee}', mapping: Mapped(StringTableSlice { byte_start_lo: 185, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33ef}', to: '\u{33ef}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33f0}', to: '\u{33f0}', mapping: Mapped(StringTableSlice { byte_start_lo: 195, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33f1}', to: '\u{33f1}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33f2}', to: '\u{33f2}', mapping: Mapped(StringTableSlice { byte_start_lo: 205, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33f3}', to: '\u{33f3}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33f4}', to: '\u{33f4}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33f5}', to: '\u{33f5}', mapping: Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33f6}', to: '\u{33f6}', mapping: Mapped(StringTableSlice { byte_start_lo: 225, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33f7}', to: '\u{33f7}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33f8}', to: '\u{33f8}', mapping: Mapped(StringTableSlice { byte_start_lo: 235, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33f9}', to: '\u{33f9}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33fa}', to: '\u{33fa}', mapping: Mapped(StringTableSlice { byte_start_lo: 245, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33fb}', to: '\u{33fb}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33fc}', to: '\u{33fc}', mapping: Mapped(StringTableSlice { byte_start_lo: 255, byte_start_hi: 23, byte_len: 5 }) },
++    Range { from: '\u{33fd}', to: '\u{33fd}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 24, byte_len: 5 }) },
++    Range { from: '\u{33fe}', to: '\u{33fe}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 24, byte_len: 5 }) },
++    Range { from: '\u{33ff}', to: '\u{33ff}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{3400}', to: '\u{4db5}', mapping: Valid },
++    Range { from: '\u{4db6}', to: '\u{4dbf}', mapping: Disallowed },
++    Range { from: '\u{4dc0}', to: '\u{9fea}', mapping: Valid },
++    Range { from: '\u{9feb}', to: '\u{9fff}', mapping: Disallowed },
++    Range { from: '\u{a000}', to: '\u{a48c}', mapping: Valid },
++    Range { from: '\u{a48d}', to: '\u{a48f}', mapping: Disallowed },
++    Range { from: '\u{a490}', to: '\u{a4c6}', mapping: Valid },
++    Range { from: '\u{a4c7}', to: '\u{a4cf}', mapping: Disallowed },
++    Range { from: '\u{a4d0}', to: '\u{a62b}', mapping: Valid },
++    Range { from: '\u{a62c}', to: '\u{a63f}', mapping: Disallowed },
++    Range { from: '\u{a640}', to: '\u{a640}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a641}', to: '\u{a641}', mapping: Valid },
++    Range { from: '\u{a642}', to: '\u{a642}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a643}', to: '\u{a643}', mapping: Valid },
++    Range { from: '\u{a644}', to: '\u{a644}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a645}', to: '\u{a645}', mapping: Valid },
++    Range { from: '\u{a646}', to: '\u{a646}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a647}', to: '\u{a647}', mapping: Valid },
++    Range { from: '\u{a648}', to: '\u{a648}', mapping: Mapped(StringTableSlice { byte_start_lo: 29, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a649}', to: '\u{a649}', mapping: Valid },
++    Range { from: '\u{a64a}', to: '\u{a64a}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 5, byte_len: 3 }) },
++    Range { from: '\u{a64b}', to: '\u{a64b}', mapping: Valid },
++    Range { from: '\u{a64c}', to: '\u{a64c}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a64d}', to: '\u{a64d}', mapping: Valid },
++    Range { from: '\u{a64e}', to: '\u{a64e}', mapping: Mapped(StringTableSlice { byte_start_lo: 35, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a64f}', to: '\u{a64f}', mapping: Valid },
++    Range { from: '\u{a650}', to: '\u{a650}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a651}', to: '\u{a651}', mapping: Valid },
++    Range { from: '\u{a652}', to: '\u{a652}', mapping: Mapped(StringTableSlice { byte_start_lo: 41, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a653}', to: '\u{a653}', mapping: Valid },
++    Range { from: '\u{a654}', to: '\u{a654}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a655}', to: '\u{a655}', mapping: Valid },
++    Range { from: '\u{a656}', to: '\u{a656}', mapping: Mapped(StringTableSlice { byte_start_lo: 47, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a657}', to: '\u{a657}', mapping: Valid },
++    Range { from: '\u{a658}', to: '\u{a658}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a659}', to: '\u{a659}', mapping: Valid },
++    Range { from: '\u{a65a}', to: '\u{a65a}', mapping: Mapped(StringTableSlice { byte_start_lo: 53, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a65b}', to: '\u{a65b}', mapping: Valid },
++    Range { from: '\u{a65c}', to: '\u{a65c}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a65d}', to: '\u{a65d}', mapping: Valid },
++    Range { from: '\u{a65e}', to: '\u{a65e}', mapping: Mapped(StringTableSlice { byte_start_lo: 59, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a65f}', to: '\u{a65f}', mapping: Valid },
++    Range { from: '\u{a660}', to: '\u{a660}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a661}', to: '\u{a661}', mapping: Valid },
++    Range { from: '\u{a662}', to: '\u{a662}', mapping: Mapped(StringTableSlice { byte_start_lo: 65, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a663}', to: '\u{a663}', mapping: Valid },
++    Range { from: '\u{a664}', to: '\u{a664}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a665}', to: '\u{a665}', mapping: Valid },
++    Range { from: '\u{a666}', to: '\u{a666}', mapping: Mapped(StringTableSlice { byte_start_lo: 71, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a667}', to: '\u{a667}', mapping: Valid },
++    Range { from: '\u{a668}', to: '\u{a668}', mapping: Mapped(StringTableSlice { byte_start_lo: 74, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a669}', to: '\u{a669}', mapping: Valid },
++    Range { from: '\u{a66a}', to: '\u{a66a}', mapping: Mapped(StringTableSlice { byte_start_lo: 77, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a66b}', to: '\u{a66b}', mapping: Valid },
++    Range { from: '\u{a66c}', to: '\u{a66c}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a66d}', to: '\u{a67f}', mapping: Valid },
++    Range { from: '\u{a680}', to: '\u{a680}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a681}', to: '\u{a681}', mapping: Valid },
++    Range { from: '\u{a682}', to: '\u{a682}', mapping: Mapped(StringTableSlice { byte_start_lo: 86, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a683}', to: '\u{a683}', mapping: Valid },
++    Range { from: '\u{a684}', to: '\u{a684}', mapping: Mapped(StringTableSlice { byte_start_lo: 89, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a685}', to: '\u{a685}', mapping: Valid },
++    Range { from: '\u{a686}', to: '\u{a686}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a687}', to: '\u{a687}', mapping: Valid },
++    Range { from: '\u{a688}', to: '\u{a688}', mapping: Mapped(StringTableSlice { byte_start_lo: 95, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a689}', to: '\u{a689}', mapping: Valid },
++    Range { from: '\u{a68a}', to: '\u{a68a}', mapping: Mapped(StringTableSlice { byte_start_lo: 98, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a68b}', to: '\u{a68b}', mapping: Valid },
++    Range { from: '\u{a68c}', to: '\u{a68c}', mapping: Mapped(StringTableSlice { byte_start_lo: 101, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a68d}', to: '\u{a68d}', mapping: Valid },
++    Range { from: '\u{a68e}', to: '\u{a68e}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a68f}', to: '\u{a68f}', mapping: Valid },
++    Range { from: '\u{a690}', to: '\u{a690}', mapping: Mapped(StringTableSlice { byte_start_lo: 107, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a691}', to: '\u{a691}', mapping: Valid },
++    Range { from: '\u{a692}', to: '\u{a692}', mapping: Mapped(StringTableSlice { byte_start_lo: 110, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a693}', to: '\u{a693}', mapping: Valid },
++    Range { from: '\u{a694}', to: '\u{a694}', mapping: Mapped(StringTableSlice { byte_start_lo: 113, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a695}', to: '\u{a695}', mapping: Valid },
++    Range { from: '\u{a696}', to: '\u{a696}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a697}', to: '\u{a697}', mapping: Valid },
++    Range { from: '\u{a698}', to: '\u{a698}', mapping: Mapped(StringTableSlice { byte_start_lo: 119, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a699}', to: '\u{a699}', mapping: Valid },
++    Range { from: '\u{a69a}', to: '\u{a69a}', mapping: Mapped(StringTableSlice { byte_start_lo: 122, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a69b}', to: '\u{a69b}', mapping: Valid },
++    Range { from: '\u{a69c}', to: '\u{a69c}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{a69d}', to: '\u{a69d}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{a69e}', to: '\u{a6f7}', mapping: Valid },
++    Range { from: '\u{a6f8}', to: '\u{a6ff}', mapping: Disallowed },
++    Range { from: '\u{a700}', to: '\u{a721}', mapping: Valid },
++    Range { from: '\u{a722}', to: '\u{a722}', mapping: Mapped(StringTableSlice { byte_start_lo: 125, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a723}', to: '\u{a723}', mapping: Valid },
++    Range { from: '\u{a724}', to: '\u{a724}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a725}', to: '\u{a725}', mapping: Valid },
++    Range { from: '\u{a726}', to: '\u{a726}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a727}', to: '\u{a727}', mapping: Valid },
++    Range { from: '\u{a728}', to: '\u{a728}', mapping: Mapped(StringTableSlice { byte_start_lo: 134, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a729}', to: '\u{a729}', mapping: Valid },
++    Range { from: '\u{a72a}', to: '\u{a72a}', mapping: Mapped(StringTableSlice { byte_start_lo: 137, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a72b}', to: '\u{a72b}', mapping: Valid },
++    Range { from: '\u{a72c}', to: '\u{a72c}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a72d}', to: '\u{a72d}', mapping: Valid },
++    Range { from: '\u{a72e}', to: '\u{a72e}', mapping: Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a72f}', to: '\u{a731}', mapping: Valid },
++    Range { from: '\u{a732}', to: '\u{a732}', mapping: Mapped(StringTableSlice { byte_start_lo: 146, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a733}', to: '\u{a733}', mapping: Valid },
++    Range { from: '\u{a734}', to: '\u{a734}', mapping: Mapped(StringTableSlice { byte_start_lo: 149, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a735}', to: '\u{a735}', mapping: Valid },
++    Range { from: '\u{a736}', to: '\u{a736}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a737}', to: '\u{a737}', mapping: Valid },
++    Range { from: '\u{a738}', to: '\u{a738}', mapping: Mapped(StringTableSlice { byte_start_lo: 155, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a739}', to: '\u{a739}', mapping: Valid },
++    Range { from: '\u{a73a}', to: '\u{a73a}', mapping: Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a73b}', to: '\u{a73b}', mapping: Valid },
++    Range { from: '\u{a73c}', to: '\u{a73c}', mapping: Mapped(StringTableSlice { byte_start_lo: 161, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a73d}', to: '\u{a73d}', mapping: Valid },
++    Range { from: '\u{a73e}', to: '\u{a73e}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a73f}', to: '\u{a73f}', mapping: Valid },
++    Range { from: '\u{a740}', to: '\u{a740}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a741}', to: '\u{a741}', mapping: Valid },
++    Range { from: '\u{a742}', to: '\u{a742}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a743}', to: '\u{a743}', mapping: Valid },
++    Range { from: '\u{a744}', to: '\u{a744}', mapping: Mapped(StringTableSlice { byte_start_lo: 173, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a745}', to: '\u{a745}', mapping: Valid },
++    Range { from: '\u{a746}', to: '\u{a746}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a747}', to: '\u{a747}', mapping: Valid },
++    Range { from: '\u{a748}', to: '\u{a748}', mapping: Mapped(StringTableSlice { byte_start_lo: 179, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a749}', to: '\u{a749}', mapping: Valid },
++    Range { from: '\u{a74a}', to: '\u{a74a}', mapping: Mapped(StringTableSlice { byte_start_lo: 182, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a74b}', to: '\u{a74b}', mapping: Valid },
++    Range { from: '\u{a74c}', to: '\u{a74c}', mapping: Mapped(StringTableSlice { byte_start_lo: 185, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a74d}', to: '\u{a74d}', mapping: Valid },
++    Range { from: '\u{a74e}', to: '\u{a74e}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a74f}', to: '\u{a74f}', mapping: Valid },
++    Range { from: '\u{a750}', to: '\u{a750}', mapping: Mapped(StringTableSlice { byte_start_lo: 191, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a751}', to: '\u{a751}', mapping: Valid },
++    Range { from: '\u{a752}', to: '\u{a752}', mapping: Mapped(StringTableSlice { byte_start_lo: 194, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a753}', to: '\u{a753}', mapping: Valid },
++    Range { from: '\u{a754}', to: '\u{a754}', mapping: Mapped(StringTableSlice { byte_start_lo: 197, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a755}', to: '\u{a755}', mapping: Valid },
++    Range { from: '\u{a756}', to: '\u{a756}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a757}', to: '\u{a757}', mapping: Valid },
++    Range { from: '\u{a758}', to: '\u{a758}', mapping: Mapped(StringTableSlice { byte_start_lo: 203, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a759}', to: '\u{a759}', mapping: Valid },
++    Range { from: '\u{a75a}', to: '\u{a75a}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a75b}', to: '\u{a75b}', mapping: Valid },
++    Range { from: '\u{a75c}', to: '\u{a75c}', mapping: Mapped(StringTableSlice { byte_start_lo: 209, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a75d}', to: '\u{a75d}', mapping: Valid },
++    Range { from: '\u{a75e}', to: '\u{a75e}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a75f}', to: '\u{a75f}', mapping: Valid },
++    Range { from: '\u{a760}', to: '\u{a760}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a761}', to: '\u{a761}', mapping: Valid },
++    Range { from: '\u{a762}', to: '\u{a762}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a763}', to: '\u{a763}', mapping: Valid },
++    Range { from: '\u{a764}', to: '\u{a764}', mapping: Mapped(StringTableSlice { byte_start_lo: 221, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a765}', to: '\u{a765}', mapping: Valid },
++    Range { from: '\u{a766}', to: '\u{a766}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a767}', to: '\u{a767}', mapping: Valid },
++    Range { from: '\u{a768}', to: '\u{a768}', mapping: Mapped(StringTableSlice { byte_start_lo: 227, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a769}', to: '\u{a769}', mapping: Valid },
++    Range { from: '\u{a76a}', to: '\u{a76a}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a76b}', to: '\u{a76b}', mapping: Valid },
++    Range { from: '\u{a76c}', to: '\u{a76c}', mapping: Mapped(StringTableSlice { byte_start_lo: 233, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a76d}', to: '\u{a76d}', mapping: Valid },
++    Range { from: '\u{a76e}', to: '\u{a76e}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a76f}', to: '\u{a76f}', mapping: Valid },
++    Range { from: '\u{a770}', to: '\u{a770}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a771}', to: '\u{a778}', mapping: Valid },
++    Range { from: '\u{a779}', to: '\u{a779}', mapping: Mapped(StringTableSlice { byte_start_lo: 239, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a77a}', to: '\u{a77a}', mapping: Valid },
++    Range { from: '\u{a77b}', to: '\u{a77b}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a77c}', to: '\u{a77c}', mapping: Valid },
++    Range { from: '\u{a77d}', to: '\u{a77d}', mapping: Mapped(StringTableSlice { byte_start_lo: 245, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a77e}', to: '\u{a77e}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a77f}', to: '\u{a77f}', mapping: Valid },
++    Range { from: '\u{a780}', to: '\u{a780}', mapping: Mapped(StringTableSlice { byte_start_lo: 251, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a781}', to: '\u{a781}', mapping: Valid },
++    Range { from: '\u{a782}', to: '\u{a782}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{a783}', to: '\u{a783}', mapping: Valid },
++    Range { from: '\u{a784}', to: '\u{a784}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a785}', to: '\u{a785}', mapping: Valid },
++    Range { from: '\u{a786}', to: '\u{a786}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a787}', to: '\u{a78a}', mapping: Valid },
++    Range { from: '\u{a78b}', to: '\u{a78b}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a78c}', to: '\u{a78c}', mapping: Valid },
++    Range { from: '\u{a78d}', to: '\u{a78d}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{a78e}', to: '\u{a78f}', mapping: Valid },
++    Range { from: '\u{a790}', to: '\u{a790}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a791}', to: '\u{a791}', mapping: Valid },
++    Range { from: '\u{a792}', to: '\u{a792}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a793}', to: '\u{a795}', mapping: Valid },
++    Range { from: '\u{a796}', to: '\u{a796}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a797}', to: '\u{a797}', mapping: Valid },
++    Range { from: '\u{a798}', to: '\u{a798}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a799}', to: '\u{a799}', mapping: Valid },
++    Range { from: '\u{a79a}', to: '\u{a79a}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a79b}', to: '\u{a79b}', mapping: Valid },
++    Range { from: '\u{a79c}', to: '\u{a79c}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a79d}', to: '\u{a79d}', mapping: Valid },
++    Range { from: '\u{a79e}', to: '\u{a79e}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a79f}', to: '\u{a79f}', mapping: Valid },
++    Range { from: '\u{a7a0}', to: '\u{a7a0}', mapping: Mapped(StringTableSlice { byte_start_lo: 31, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a7a1}', to: '\u{a7a1}', mapping: Valid },
++    Range { from: '\u{a7a2}', to: '\u{a7a2}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a7a3}', to: '\u{a7a3}', mapping: Valid },
++    Range { from: '\u{a7a4}', to: '\u{a7a4}', mapping: Mapped(StringTableSlice { byte_start_lo: 37, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a7a5}', to: '\u{a7a5}', mapping: Valid },
++    Range { from: '\u{a7a6}', to: '\u{a7a6}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a7a7}', to: '\u{a7a7}', mapping: Valid },
++    Range { from: '\u{a7a8}', to: '\u{a7a8}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a7a9}', to: '\u{a7a9}', mapping: Valid },
++    Range { from: '\u{a7aa}', to: '\u{a7aa}', mapping: Mapped(StringTableSlice { byte_start_lo: 205, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{a7ab}', to: '\u{a7ab}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{a7ac}', to: '\u{a7ac}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{a7ad}', to: '\u{a7ad}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 25, byte_len: 2 }) },
++    Range { from: '\u{a7ae}', to: '\u{a7ae}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{a7af}', to: '\u{a7af}', mapping: Disallowed },
++    Range { from: '\u{a7b0}', to: '\u{a7b0}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 25, byte_len: 2 }) },
++    Range { from: '\u{a7b1}', to: '\u{a7b1}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 25, byte_len: 2 }) },
++    Range { from: '\u{a7b2}', to: '\u{a7b2}', mapping: Mapped(StringTableSlice { byte_start_lo: 57, byte_start_hi: 5, byte_len: 2 }) },
++    Range { from: '\u{a7b3}', to: '\u{a7b3}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a7b4}', to: '\u{a7b4}', mapping: Mapped(StringTableSlice { byte_start_lo: 55, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a7b5}', to: '\u{a7b5}', mapping: Valid },
++    Range { from: '\u{a7b6}', to: '\u{a7b6}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{a7b7}', to: '\u{a7b7}', mapping: Valid },
++    Range { from: '\u{a7b8}', to: '\u{a7f6}', mapping: Disallowed },
++    Range { from: '\u{a7f7}', to: '\u{a7f7}', mapping: Valid },
++    Range { from: '\u{a7f8}', to: '\u{a7f8}', mapping: Mapped(StringTableSlice { byte_start_lo: 159, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{a7f9}', to: '\u{a7f9}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{a7fa}', to: '\u{a82b}', mapping: Valid },
++    Range { from: '\u{a82c}', to: '\u{a82f}', mapping: Disallowed },
++    Range { from: '\u{a830}', to: '\u{a839}', mapping: Valid },
++    Range { from: '\u{a83a}', to: '\u{a83f}', mapping: Disallowed },
++    Range { from: '\u{a840}', to: '\u{a877}', mapping: Valid },
++    Range { from: '\u{a878}', to: '\u{a87f}', mapping: Disallowed },
++    Range { from: '\u{a880}', to: '\u{a8c5}', mapping: Valid },
++    Range { from: '\u{a8c6}', to: '\u{a8cd}', mapping: Disallowed },
++    Range { from: '\u{a8ce}', to: '\u{a8d9}', mapping: Valid },
++    Range { from: '\u{a8da}', to: '\u{a8df}', mapping: Disallowed },
++    Range { from: '\u{a8e0}', to: '\u{a8fd}', mapping: Valid },
++    Range { from: '\u{a8fe}', to: '\u{a8ff}', mapping: Disallowed },
++    Range { from: '\u{a900}', to: '\u{a953}', mapping: Valid },
++    Range { from: '\u{a954}', to: '\u{a95e}', mapping: Disallowed },
++    Range { from: '\u{a95f}', to: '\u{a97c}', mapping: Valid },
++    Range { from: '\u{a97d}', to: '\u{a97f}', mapping: Disallowed },
++    Range { from: '\u{a980}', to: '\u{a9cd}', mapping: Valid },
++    Range { from: '\u{a9ce}', to: '\u{a9ce}', mapping: Disallowed },
++    Range { from: '\u{a9cf}', to: '\u{a9d9}', mapping: Valid },
++    Range { from: '\u{a9da}', to: '\u{a9dd}', mapping: Disallowed },
++    Range { from: '\u{a9de}', to: '\u{a9fe}', mapping: Valid },
++    Range { from: '\u{a9ff}', to: '\u{a9ff}', mapping: Disallowed },
++    Range { from: '\u{aa00}', to: '\u{aa36}', mapping: Valid },
++    Range { from: '\u{aa37}', to: '\u{aa3f}', mapping: Disallowed },
++    Range { from: '\u{aa40}', to: '\u{aa4d}', mapping: Valid },
++    Range { from: '\u{aa4e}', to: '\u{aa4f}', mapping: Disallowed },
++    Range { from: '\u{aa50}', to: '\u{aa59}', mapping: Valid },
++    Range { from: '\u{aa5a}', to: '\u{aa5b}', mapping: Disallowed },
++    Range { from: '\u{aa5c}', to: '\u{aac2}', mapping: Valid },
++    Range { from: '\u{aac3}', to: '\u{aada}', mapping: Disallowed },
++    Range { from: '\u{aadb}', to: '\u{aaf6}', mapping: Valid },
++    Range { from: '\u{aaf7}', to: '\u{ab00}', mapping: Disallowed },
++    Range { from: '\u{ab01}', to: '\u{ab06}', mapping: Valid },
++    Range { from: '\u{ab07}', to: '\u{ab08}', mapping: Disallowed },
++    Range { from: '\u{ab09}', to: '\u{ab0e}', mapping: Valid },
++    Range { from: '\u{ab0f}', to: '\u{ab10}', mapping: Disallowed },
++    Range { from: '\u{ab11}', to: '\u{ab16}', mapping: Valid },
++    Range { from: '\u{ab17}', to: '\u{ab1f}', mapping: Disallowed },
++    Range { from: '\u{ab20}', to: '\u{ab26}', mapping: Valid },
++    Range { from: '\u{ab27}', to: '\u{ab27}', mapping: Disallowed },
++    Range { from: '\u{ab28}', to: '\u{ab2e}', mapping: Valid },
++    Range { from: '\u{ab2f}', to: '\u{ab2f}', mapping: Disallowed },
++    Range { from: '\u{ab30}', to: '\u{ab5b}', mapping: Valid },
++    Range { from: '\u{ab5c}', to: '\u{ab5c}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 24, byte_len: 3 }) },
++    Range { from: '\u{ab5d}', to: '\u{ab5d}', mapping: Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab5e}', to: '\u{ab5e}', mapping: Mapped(StringTableSlice { byte_start_lo: 193, byte_start_hi: 10, byte_len: 2 }) },
++    Range { from: '\u{ab5f}', to: '\u{ab5f}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab60}', to: '\u{ab65}', mapping: Valid },
++    Range { from: '\u{ab66}', to: '\u{ab6f}', mapping: Disallowed },
++    Range { from: '\u{ab70}', to: '\u{ab70}', mapping: Mapped(StringTableSlice { byte_start_lo: 67, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab71}', to: '\u{ab71}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab72}', to: '\u{ab72}', mapping: Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab73}', to: '\u{ab73}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab74}', to: '\u{ab74}', mapping: Mapped(StringTableSlice { byte_start_lo: 79, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab75}', to: '\u{ab75}', mapping: Mapped(StringTableSlice { byte_start_lo: 82, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab76}', to: '\u{ab76}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab77}', to: '\u{ab77}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab78}', to: '\u{ab78}', mapping: Mapped(StringTableSlice { byte_start_lo: 91, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab79}', to: '\u{ab79}', mapping: Mapped(StringTableSlice { byte_start_lo: 94, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab7a}', to: '\u{ab7a}', mapping: Mapped(StringTableSlice { byte_start_lo: 97, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab7b}', to: '\u{ab7b}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab7c}', to: '\u{ab7c}', mapping: Mapped(StringTableSlice { byte_start_lo: 103, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab7d}', to: '\u{ab7d}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab7e}', to: '\u{ab7e}', mapping: Mapped(StringTableSlice { byte_start_lo: 109, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab7f}', to: '\u{ab7f}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab80}', to: '\u{ab80}', mapping: Mapped(StringTableSlice { byte_start_lo: 115, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab81}', to: '\u{ab81}', mapping: Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab82}', to: '\u{ab82}', mapping: Mapped(StringTableSlice { byte_start_lo: 121, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab83}', to: '\u{ab83}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab84}', to: '\u{ab84}', mapping: Mapped(StringTableSlice { byte_start_lo: 127, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab85}', to: '\u{ab85}', mapping: Mapped(StringTableSlice { byte_start_lo: 130, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab86}', to: '\u{ab86}', mapping: Mapped(StringTableSlice { byte_start_lo: 133, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab87}', to: '\u{ab87}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab88}', to: '\u{ab88}', mapping: Mapped(StringTableSlice { byte_start_lo: 139, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab89}', to: '\u{ab89}', mapping: Mapped(StringTableSlice { byte_start_lo: 142, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab8a}', to: '\u{ab8a}', mapping: Mapped(StringTableSlice { byte_start_lo: 145, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab8b}', to: '\u{ab8b}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab8c}', to: '\u{ab8c}', mapping: Mapped(StringTableSlice { byte_start_lo: 151, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab8d}', to: '\u{ab8d}', mapping: Mapped(StringTableSlice { byte_start_lo: 154, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab8e}', to: '\u{ab8e}', mapping: Mapped(StringTableSlice { byte_start_lo: 157, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab8f}', to: '\u{ab8f}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab90}', to: '\u{ab90}', mapping: Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab91}', to: '\u{ab91}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab92}', to: '\u{ab92}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab93}', to: '\u{ab93}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab94}', to: '\u{ab94}', mapping: Mapped(StringTableSlice { byte_start_lo: 175, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab95}', to: '\u{ab95}', mapping: Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab96}', to: '\u{ab96}', mapping: Mapped(StringTableSlice { byte_start_lo: 181, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab97}', to: '\u{ab97}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab98}', to: '\u{ab98}', mapping: Mapped(StringTableSlice { byte_start_lo: 187, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab99}', to: '\u{ab99}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab9a}', to: '\u{ab9a}', mapping: Mapped(StringTableSlice { byte_start_lo: 193, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab9b}', to: '\u{ab9b}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab9c}', to: '\u{ab9c}', mapping: Mapped(StringTableSlice { byte_start_lo: 199, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab9d}', to: '\u{ab9d}', mapping: Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab9e}', to: '\u{ab9e}', mapping: Mapped(StringTableSlice { byte_start_lo: 205, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{ab9f}', to: '\u{ab9f}', mapping: Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{aba0}', to: '\u{aba0}', mapping: Mapped(StringTableSlice { byte_start_lo: 211, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{aba1}', to: '\u{aba1}', mapping: Mapped(StringTableSlice { byte_start_lo: 214, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{aba2}', to: '\u{aba2}', mapping: Mapped(StringTableSlice { byte_start_lo: 217, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{aba3}', to: '\u{aba3}', mapping: Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{aba4}', to: '\u{aba4}', mapping: Mapped(StringTableSlice { byte_start_lo: 223, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{aba5}', to: '\u{aba5}', mapping: Mapped(StringTableSlice { byte_start_lo: 226, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{aba6}', to: '\u{aba6}', mapping: Mapped(StringTableSlice { byte_start_lo: 229, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{aba7}', to: '\u{aba7}', mapping: Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{aba8}', to: '\u{aba8}', mapping: Mapped(StringTableSlice { byte_start_lo: 235, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{aba9}', to: '\u{aba9}', mapping: Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{abaa}', to: '\u{abaa}', mapping: Mapped(StringTableSlice { byte_start_lo: 241, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{abab}', to: '\u{abab}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{abac}', to: '\u{abac}', mapping: Mapped(StringTableSlice { byte_start_lo: 247, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{abad}', to: '\u{abad}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{abae}', to: '\u{abae}', mapping: Mapped(StringTableSlice { byte_start_lo: 253, byte_start_hi: 25, byte_len: 3 }) },
++    Range { from: '\u{abaf}', to: '\u{abaf}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abb0}', to: '\u{abb0}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abb1}', to: '\u{abb1}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abb2}', to: '\u{abb2}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abb3}', to: '\u{abb3}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abb4}', to: '\u{abb4}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abb5}', to: '\u{abb5}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abb6}', to: '\u{abb6}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abb7}', to: '\u{abb7}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abb8}', to: '\u{abb8}', mapping: Mapped(StringTableSlice { byte_start_lo: 27, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abb9}', to: '\u{abb9}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abba}', to: '\u{abba}', mapping: Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abbb}', to: '\u{abbb}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abbc}', to: '\u{abbc}', mapping: Mapped(StringTableSlice { byte_start_lo: 39, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abbd}', to: '\u{abbd}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abbe}', to: '\u{abbe}', mapping: Mapped(StringTableSlice { byte_start_lo: 45, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abbf}', to: '\u{abbf}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{abc0}', to: '\u{abed}', mapping: Valid },
++    Range { from: '\u{abee}', to: '\u{abef}', mapping: Disallowed },
++    Range { from: '\u{abf0}', to: '\u{abf9}', mapping: Valid },
++    Range { from: '\u{abfa}', to: '\u{abff}', mapping: Disallowed },
++    Range { from: '\u{ac00}', to: '\u{d7a3}', mapping: Valid },
++    Range { from: '\u{d7a4}', to: '\u{d7af}', mapping: Disallowed },
++    Range { from: '\u{d7b0}', to: '\u{d7c6}', mapping: Valid },
++    Range { from: '\u{d7c7}', to: '\u{d7ca}', mapping: Disallowed },
++    Range { from: '\u{d7cb}', to: '\u{d7fb}', mapping: Valid },
++    Range { from: '\u{d7fc}', to: '\u{f8ff}', mapping: Disallowed },
++    Range { from: '\u{f900}', to: '\u{f900}', mapping: Mapped(StringTableSlice { byte_start_lo: 51, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f901}', to: '\u{f901}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f902}', to: '\u{f902}', mapping: Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{f903}', to: '\u{f903}', mapping: Mapped(StringTableSlice { byte_start_lo: 57, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f904}', to: '\u{f904}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f905}', to: '\u{f905}', mapping: Mapped(StringTableSlice { byte_start_lo: 63, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f906}', to: '\u{f906}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f907}', to: '\u{f908}', mapping: Mapped(StringTableSlice { byte_start_lo: 255, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{f909}', to: '\u{f909}', mapping: Mapped(StringTableSlice { byte_start_lo: 69, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f90a}', to: '\u{f90a}', mapping: Mapped(StringTableSlice { byte_start_lo: 117, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{f90b}', to: '\u{f90b}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f90c}', to: '\u{f90c}', mapping: Mapped(StringTableSlice { byte_start_lo: 75, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f90d}', to: '\u{f90d}', mapping: Mapped(StringTableSlice { byte_start_lo: 78, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f90e}', to: '\u{f90e}', mapping: Mapped(StringTableSlice { byte_start_lo: 81, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f90f}', to: '\u{f90f}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f910}', to: '\u{f910}', mapping: Mapped(StringTableSlice { byte_start_lo: 87, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f911}', to: '\u{f911}', mapping: Mapped(StringTableSlice { byte_start_lo: 90, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f912}', to: '\u{f912}', mapping: Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f913}', to: '\u{f913}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f914}', to: '\u{f914}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f915}', to: '\u{f915}', mapping: Mapped(StringTableSlice { byte_start_lo: 102, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f916}', to: '\u{f916}', mapping: Mapped(StringTableSlice { byte_start_lo: 105, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f917}', to: '\u{f917}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f918}', to: '\u{f918}', mapping: Mapped(StringTableSlice { byte_start_lo: 111, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f919}', to: '\u{f919}', mapping: Mapped(StringTableSlice { byte_start_lo: 114, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f91a}', to: '\u{f91a}', mapping: Mapped(StringTableSlice { byte_start_lo: 117, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f91b}', to: '\u{f91b}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f91c}', to: '\u{f91c}', mapping: Mapped(StringTableSlice { byte_start_lo: 123, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f91d}', to: '\u{f91d}', mapping: Mapped(StringTableSlice { byte_start_lo: 126, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f91e}', to: '\u{f91e}', mapping: Mapped(StringTableSlice { byte_start_lo: 129, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f91f}', to: '\u{f91f}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f920}', to: '\u{f920}', mapping: Mapped(StringTableSlice { byte_start_lo: 135, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f921}', to: '\u{f921}', mapping: Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f922}', to: '\u{f922}', mapping: Mapped(StringTableSlice { byte_start_lo: 141, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f923}', to: '\u{f923}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f924}', to: '\u{f924}', mapping: Mapped(StringTableSlice { byte_start_lo: 147, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f925}', to: '\u{f925}', mapping: Mapped(StringTableSlice { byte_start_lo: 150, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f926}', to: '\u{f926}', mapping: Mapped(StringTableSlice { byte_start_lo: 153, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f927}', to: '\u{f927}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f928}', to: '\u{f928}', mapping: Mapped(StringTableSlice { byte_start_lo: 159, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f929}', to: '\u{f929}', mapping: Mapped(StringTableSlice { byte_start_lo: 162, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f92a}', to: '\u{f92a}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f92b}', to: '\u{f92b}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f92c}', to: '\u{f92c}', mapping: Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f92d}', to: '\u{f92d}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f92e}', to: '\u{f92e}', mapping: Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f92f}', to: '\u{f92f}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f930}', to: '\u{f930}', mapping: Mapped(StringTableSlice { byte_start_lo: 183, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f931}', to: '\u{f931}', mapping: Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f932}', to: '\u{f932}', mapping: Mapped(StringTableSlice { byte_start_lo: 189, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f933}', to: '\u{f933}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f934}', to: '\u{f934}', mapping: Mapped(StringTableSlice { byte_start_lo: 247, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{f935}', to: '\u{f935}', mapping: Mapped(StringTableSlice { byte_start_lo: 195, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f936}', to: '\u{f936}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f937}', to: '\u{f937}', mapping: Mapped(StringTableSlice { byte_start_lo: 201, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f938}', to: '\u{f938}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f939}', to: '\u{f939}', mapping: Mapped(StringTableSlice { byte_start_lo: 207, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f93a}', to: '\u{f93a}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f93b}', to: '\u{f93b}', mapping: Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f93c}', to: '\u{f93c}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f93d}', to: '\u{f93d}', mapping: Mapped(StringTableSlice { byte_start_lo: 219, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f93e}', to: '\u{f93e}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f93f}', to: '\u{f93f}', mapping: Mapped(StringTableSlice { byte_start_lo: 225, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f940}', to: '\u{f940}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{f941}', to: '\u{f941}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f942}', to: '\u{f942}', mapping: Mapped(StringTableSlice { byte_start_lo: 231, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f943}', to: '\u{f943}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f944}', to: '\u{f944}', mapping: Mapped(StringTableSlice { byte_start_lo: 237, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f945}', to: '\u{f945}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f946}', to: '\u{f946}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f947}', to: '\u{f947}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f948}', to: '\u{f948}', mapping: Mapped(StringTableSlice { byte_start_lo: 249, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f949}', to: '\u{f949}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f94a}', to: '\u{f94a}', mapping: Mapped(StringTableSlice { byte_start_lo: 255, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f94b}', to: '\u{f94b}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f94c}', to: '\u{f94c}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f94d}', to: '\u{f94d}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f94e}', to: '\u{f94e}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f94f}', to: '\u{f94f}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f950}', to: '\u{f950}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f951}', to: '\u{f951}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f952}', to: '\u{f952}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f953}', to: '\u{f953}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f954}', to: '\u{f954}', mapping: Mapped(StringTableSlice { byte_start_lo: 29, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f955}', to: '\u{f955}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f956}', to: '\u{f956}', mapping: Mapped(StringTableSlice { byte_start_lo: 35, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f957}', to: '\u{f957}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f958}', to: '\u{f958}', mapping: Mapped(StringTableSlice { byte_start_lo: 41, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f959}', to: '\u{f959}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f95a}', to: '\u{f95a}', mapping: Mapped(StringTableSlice { byte_start_lo: 47, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f95b}', to: '\u{f95b}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f95c}', to: '\u{f95c}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f95d}', to: '\u{f95d}', mapping: Mapped(StringTableSlice { byte_start_lo: 53, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f95e}', to: '\u{f95e}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f95f}', to: '\u{f95f}', mapping: Mapped(StringTableSlice { byte_start_lo: 59, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f960}', to: '\u{f960}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f961}', to: '\u{f961}', mapping: Mapped(StringTableSlice { byte_start_lo: 65, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f962}', to: '\u{f962}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f963}', to: '\u{f963}', mapping: Mapped(StringTableSlice { byte_start_lo: 71, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f964}', to: '\u{f964}', mapping: Mapped(StringTableSlice { byte_start_lo: 74, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f965}', to: '\u{f965}', mapping: Mapped(StringTableSlice { byte_start_lo: 77, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f966}', to: '\u{f966}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f967}', to: '\u{f967}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f968}', to: '\u{f968}', mapping: Mapped(StringTableSlice { byte_start_lo: 86, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f969}', to: '\u{f969}', mapping: Mapped(StringTableSlice { byte_start_lo: 89, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f96a}', to: '\u{f96a}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f96b}', to: '\u{f96b}', mapping: Mapped(StringTableSlice { byte_start_lo: 95, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f96c}', to: '\u{f96c}', mapping: Mapped(StringTableSlice { byte_start_lo: 98, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f96d}', to: '\u{f96d}', mapping: Mapped(StringTableSlice { byte_start_lo: 101, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f96e}', to: '\u{f96e}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f96f}', to: '\u{f96f}', mapping: Mapped(StringTableSlice { byte_start_lo: 107, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f970}', to: '\u{f970}', mapping: Mapped(StringTableSlice { byte_start_lo: 110, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f971}', to: '\u{f971}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{f972}', to: '\u{f972}', mapping: Mapped(StringTableSlice { byte_start_lo: 113, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f973}', to: '\u{f973}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f974}', to: '\u{f974}', mapping: Mapped(StringTableSlice { byte_start_lo: 119, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f975}', to: '\u{f975}', mapping: Mapped(StringTableSlice { byte_start_lo: 122, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f976}', to: '\u{f976}', mapping: Mapped(StringTableSlice { byte_start_lo: 125, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f977}', to: '\u{f977}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f978}', to: '\u{f978}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f979}', to: '\u{f979}', mapping: Mapped(StringTableSlice { byte_start_lo: 134, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f97a}', to: '\u{f97a}', mapping: Mapped(StringTableSlice { byte_start_lo: 137, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f97b}', to: '\u{f97b}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f97c}', to: '\u{f97c}', mapping: Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f97d}', to: '\u{f97d}', mapping: Mapped(StringTableSlice { byte_start_lo: 146, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f97e}', to: '\u{f97e}', mapping: Mapped(StringTableSlice { byte_start_lo: 149, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f97f}', to: '\u{f97f}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f980}', to: '\u{f980}', mapping: Mapped(StringTableSlice { byte_start_lo: 155, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f981}', to: '\u{f981}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{f982}', to: '\u{f982}', mapping: Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f983}', to: '\u{f983}', mapping: Mapped(StringTableSlice { byte_start_lo: 161, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f984}', to: '\u{f984}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f985}', to: '\u{f985}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f986}', to: '\u{f986}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f987}', to: '\u{f987}', mapping: Mapped(StringTableSlice { byte_start_lo: 173, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f988}', to: '\u{f988}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f989}', to: '\u{f989}', mapping: Mapped(StringTableSlice { byte_start_lo: 179, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f98a}', to: '\u{f98a}', mapping: Mapped(StringTableSlice { byte_start_lo: 185, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{f98b}', to: '\u{f98b}', mapping: Mapped(StringTableSlice { byte_start_lo: 182, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f98c}', to: '\u{f98c}', mapping: Mapped(StringTableSlice { byte_start_lo: 185, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f98d}', to: '\u{f98d}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f98e}', to: '\u{f98e}', mapping: Mapped(StringTableSlice { byte_start_lo: 191, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f98f}', to: '\u{f98f}', mapping: Mapped(StringTableSlice { byte_start_lo: 194, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f990}', to: '\u{f990}', mapping: Mapped(StringTableSlice { byte_start_lo: 197, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f991}', to: '\u{f991}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f992}', to: '\u{f992}', mapping: Mapped(StringTableSlice { byte_start_lo: 203, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f993}', to: '\u{f993}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f994}', to: '\u{f994}', mapping: Mapped(StringTableSlice { byte_start_lo: 209, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f995}', to: '\u{f995}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f996}', to: '\u{f996}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f997}', to: '\u{f997}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f998}', to: '\u{f998}', mapping: Mapped(StringTableSlice { byte_start_lo: 221, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f999}', to: '\u{f999}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f99a}', to: '\u{f99a}', mapping: Mapped(StringTableSlice { byte_start_lo: 227, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f99b}', to: '\u{f99b}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f99c}', to: '\u{f99c}', mapping: Mapped(StringTableSlice { byte_start_lo: 233, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f99d}', to: '\u{f99d}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f99e}', to: '\u{f99e}', mapping: Mapped(StringTableSlice { byte_start_lo: 239, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f99f}', to: '\u{f99f}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f9a0}', to: '\u{f9a0}', mapping: Mapped(StringTableSlice { byte_start_lo: 245, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f9a1}', to: '\u{f9a1}', mapping: Mapped(StringTableSlice { byte_start_lo: 107, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f9a2}', to: '\u{f9a2}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f9a3}', to: '\u{f9a3}', mapping: Mapped(StringTableSlice { byte_start_lo: 251, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f9a4}', to: '\u{f9a4}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f9a5}', to: '\u{f9a5}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9a6}', to: '\u{f9a6}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9a7}', to: '\u{f9a7}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9a8}', to: '\u{f9a8}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9a9}', to: '\u{f9a9}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9aa}', to: '\u{f9aa}', mapping: Mapped(StringTableSlice { byte_start_lo: 59, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f9ab}', to: '\u{f9ab}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9ac}', to: '\u{f9ac}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9ad}', to: '\u{f9ad}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9ae}', to: '\u{f9ae}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9af}', to: '\u{f9af}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9b0}', to: '\u{f9b0}', mapping: Mapped(StringTableSlice { byte_start_lo: 31, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9b1}', to: '\u{f9b1}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9b2}', to: '\u{f9b2}', mapping: Mapped(StringTableSlice { byte_start_lo: 37, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9b3}', to: '\u{f9b3}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9b4}', to: '\u{f9b4}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9b5}', to: '\u{f9b5}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9b6}', to: '\u{f9b6}', mapping: Mapped(StringTableSlice { byte_start_lo: 49, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9b7}', to: '\u{f9b7}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9b8}', to: '\u{f9b8}', mapping: Mapped(StringTableSlice { byte_start_lo: 55, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9b9}', to: '\u{f9b9}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9ba}', to: '\u{f9ba}', mapping: Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9bb}', to: '\u{f9bb}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9bc}', to: '\u{f9bc}', mapping: Mapped(StringTableSlice { byte_start_lo: 67, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9bd}', to: '\u{f9bd}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9be}', to: '\u{f9be}', mapping: Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9bf}', to: '\u{f9bf}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{f9c0}', to: '\u{f9c0}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9c1}', to: '\u{f9c1}', mapping: Mapped(StringTableSlice { byte_start_lo: 79, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9c2}', to: '\u{f9c2}', mapping: Mapped(StringTableSlice { byte_start_lo: 82, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9c3}', to: '\u{f9c3}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9c4}', to: '\u{f9c4}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{f9c5}', to: '\u{f9c5}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9c6}', to: '\u{f9c6}', mapping: Mapped(StringTableSlice { byte_start_lo: 91, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9c7}', to: '\u{f9c7}', mapping: Mapped(StringTableSlice { byte_start_lo: 94, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9c8}', to: '\u{f9c8}', mapping: Mapped(StringTableSlice { byte_start_lo: 97, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9c9}', to: '\u{f9c9}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9ca}', to: '\u{f9ca}', mapping: Mapped(StringTableSlice { byte_start_lo: 103, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9cb}', to: '\u{f9cb}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9cc}', to: '\u{f9cc}', mapping: Mapped(StringTableSlice { byte_start_lo: 109, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9cd}', to: '\u{f9cd}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9ce}', to: '\u{f9ce}', mapping: Mapped(StringTableSlice { byte_start_lo: 115, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9cf}', to: '\u{f9cf}', mapping: Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9d0}', to: '\u{f9d0}', mapping: Mapped(StringTableSlice { byte_start_lo: 121, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9d1}', to: '\u{f9d1}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{f9d2}', to: '\u{f9d2}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9d3}', to: '\u{f9d3}', mapping: Mapped(StringTableSlice { byte_start_lo: 127, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9d4}', to: '\u{f9d4}', mapping: Mapped(StringTableSlice { byte_start_lo: 130, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9d5}', to: '\u{f9d5}', mapping: Mapped(StringTableSlice { byte_start_lo: 133, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9d6}', to: '\u{f9d6}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9d7}', to: '\u{f9d7}', mapping: Mapped(StringTableSlice { byte_start_lo: 139, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9d8}', to: '\u{f9d8}', mapping: Mapped(StringTableSlice { byte_start_lo: 142, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9d9}', to: '\u{f9d9}', mapping: Mapped(StringTableSlice { byte_start_lo: 145, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9da}', to: '\u{f9da}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9db}', to: '\u{f9db}', mapping: Mapped(StringTableSlice { byte_start_lo: 65, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{f9dc}', to: '\u{f9dc}', mapping: Mapped(StringTableSlice { byte_start_lo: 151, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9dd}', to: '\u{f9dd}', mapping: Mapped(StringTableSlice { byte_start_lo: 154, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9de}', to: '\u{f9de}', mapping: Mapped(StringTableSlice { byte_start_lo: 157, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9df}', to: '\u{f9df}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9e0}', to: '\u{f9e0}', mapping: Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9e1}', to: '\u{f9e1}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9e2}', to: '\u{f9e2}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9e3}', to: '\u{f9e3}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9e4}', to: '\u{f9e4}', mapping: Mapped(StringTableSlice { byte_start_lo: 175, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9e5}', to: '\u{f9e5}', mapping: Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9e6}', to: '\u{f9e6}', mapping: Mapped(StringTableSlice { byte_start_lo: 181, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9e7}', to: '\u{f9e7}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9e8}', to: '\u{f9e8}', mapping: Mapped(StringTableSlice { byte_start_lo: 187, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9e9}', to: '\u{f9e9}', mapping: Mapped(StringTableSlice { byte_start_lo: 114, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{f9ea}', to: '\u{f9ea}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9eb}', to: '\u{f9eb}', mapping: Mapped(StringTableSlice { byte_start_lo: 193, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9ec}', to: '\u{f9ec}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9ed}', to: '\u{f9ed}', mapping: Mapped(StringTableSlice { byte_start_lo: 199, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9ee}', to: '\u{f9ee}', mapping: Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9ef}', to: '\u{f9ef}', mapping: Mapped(StringTableSlice { byte_start_lo: 205, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9f0}', to: '\u{f9f0}', mapping: Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9f1}', to: '\u{f9f1}', mapping: Mapped(StringTableSlice { byte_start_lo: 211, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9f2}', to: '\u{f9f2}', mapping: Mapped(StringTableSlice { byte_start_lo: 214, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9f3}', to: '\u{f9f3}', mapping: Mapped(StringTableSlice { byte_start_lo: 217, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9f4}', to: '\u{f9f4}', mapping: Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9f5}', to: '\u{f9f5}', mapping: Mapped(StringTableSlice { byte_start_lo: 223, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9f6}', to: '\u{f9f6}', mapping: Mapped(StringTableSlice { byte_start_lo: 226, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9f7}', to: '\u{f9f7}', mapping: Mapped(StringTableSlice { byte_start_lo: 223, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{f9f8}', to: '\u{f9f8}', mapping: Mapped(StringTableSlice { byte_start_lo: 229, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9f9}', to: '\u{f9f9}', mapping: Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9fa}', to: '\u{f9fa}', mapping: Mapped(StringTableSlice { byte_start_lo: 235, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9fb}', to: '\u{f9fb}', mapping: Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9fc}', to: '\u{f9fc}', mapping: Mapped(StringTableSlice { byte_start_lo: 241, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9fd}', to: '\u{f9fd}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9fe}', to: '\u{f9fe}', mapping: Mapped(StringTableSlice { byte_start_lo: 247, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{f9ff}', to: '\u{f9ff}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{fa00}', to: '\u{fa00}', mapping: Mapped(StringTableSlice { byte_start_lo: 253, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{fa01}', to: '\u{fa01}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa02}', to: '\u{fa02}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa03}', to: '\u{fa03}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa04}', to: '\u{fa04}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa05}', to: '\u{fa05}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa06}', to: '\u{fa06}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa07}', to: '\u{fa07}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa08}', to: '\u{fa08}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{fa09}', to: '\u{fa09}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa0a}', to: '\u{fa0a}', mapping: Mapped(StringTableSlice { byte_start_lo: 57, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{fa0b}', to: '\u{fa0b}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa0c}', to: '\u{fa0c}', mapping: Mapped(StringTableSlice { byte_start_lo: 27, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa0d}', to: '\u{fa0d}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa0e}', to: '\u{fa0f}', mapping: Valid },
++    Range { from: '\u{fa10}', to: '\u{fa10}', mapping: Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa11}', to: '\u{fa11}', mapping: Valid },
++    Range { from: '\u{fa12}', to: '\u{fa12}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa13}', to: '\u{fa14}', mapping: Valid },
++    Range { from: '\u{fa15}', to: '\u{fa15}', mapping: Mapped(StringTableSlice { byte_start_lo: 39, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa16}', to: '\u{fa16}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa17}', to: '\u{fa17}', mapping: Mapped(StringTableSlice { byte_start_lo: 45, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa18}', to: '\u{fa18}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa19}', to: '\u{fa19}', mapping: Mapped(StringTableSlice { byte_start_lo: 51, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa1a}', to: '\u{fa1a}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa1b}', to: '\u{fa1b}', mapping: Mapped(StringTableSlice { byte_start_lo: 57, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa1c}', to: '\u{fa1c}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa1d}', to: '\u{fa1d}', mapping: Mapped(StringTableSlice { byte_start_lo: 63, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa1e}', to: '\u{fa1e}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{fa1f}', to: '\u{fa1f}', mapping: Valid },
++    Range { from: '\u{fa20}', to: '\u{fa20}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa21}', to: '\u{fa21}', mapping: Valid },
++    Range { from: '\u{fa22}', to: '\u{fa22}', mapping: Mapped(StringTableSlice { byte_start_lo: 69, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa23}', to: '\u{fa24}', mapping: Valid },
++    Range { from: '\u{fa25}', to: '\u{fa25}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa26}', to: '\u{fa26}', mapping: Mapped(StringTableSlice { byte_start_lo: 75, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa27}', to: '\u{fa29}', mapping: Valid },
++    Range { from: '\u{fa2a}', to: '\u{fa2a}', mapping: Mapped(StringTableSlice { byte_start_lo: 78, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa2b}', to: '\u{fa2b}', mapping: Mapped(StringTableSlice { byte_start_lo: 81, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa2c}', to: '\u{fa2c}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa2d}', to: '\u{fa2d}', mapping: Mapped(StringTableSlice { byte_start_lo: 87, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa2e}', to: '\u{fa2e}', mapping: Mapped(StringTableSlice { byte_start_lo: 90, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa2f}', to: '\u{fa2f}', mapping: Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa30}', to: '\u{fa30}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa31}', to: '\u{fa31}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa32}', to: '\u{fa32}', mapping: Mapped(StringTableSlice { byte_start_lo: 102, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa33}', to: '\u{fa33}', mapping: Mapped(StringTableSlice { byte_start_lo: 105, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa34}', to: '\u{fa34}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa35}', to: '\u{fa35}', mapping: Mapped(StringTableSlice { byte_start_lo: 111, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa36}', to: '\u{fa36}', mapping: Mapped(StringTableSlice { byte_start_lo: 114, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa37}', to: '\u{fa37}', mapping: Mapped(StringTableSlice { byte_start_lo: 117, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa38}', to: '\u{fa38}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa39}', to: '\u{fa39}', mapping: Mapped(StringTableSlice { byte_start_lo: 123, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa3a}', to: '\u{fa3a}', mapping: Mapped(StringTableSlice { byte_start_lo: 126, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa3b}', to: '\u{fa3b}', mapping: Mapped(StringTableSlice { byte_start_lo: 129, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa3c}', to: '\u{fa3c}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{fa3d}', to: '\u{fa3d}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa3e}', to: '\u{fa3e}', mapping: Mapped(StringTableSlice { byte_start_lo: 135, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa3f}', to: '\u{fa3f}', mapping: Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa40}', to: '\u{fa40}', mapping: Mapped(StringTableSlice { byte_start_lo: 141, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa41}', to: '\u{fa41}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa42}', to: '\u{fa42}', mapping: Mapped(StringTableSlice { byte_start_lo: 147, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa43}', to: '\u{fa43}', mapping: Mapped(StringTableSlice { byte_start_lo: 150, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa44}', to: '\u{fa44}', mapping: Mapped(StringTableSlice { byte_start_lo: 153, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa45}', to: '\u{fa45}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa46}', to: '\u{fa46}', mapping: Mapped(StringTableSlice { byte_start_lo: 159, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa47}', to: '\u{fa47}', mapping: Mapped(StringTableSlice { byte_start_lo: 162, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa48}', to: '\u{fa48}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa49}', to: '\u{fa49}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa4a}', to: '\u{fa4a}', mapping: Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa4b}', to: '\u{fa4b}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa4c}', to: '\u{fa4c}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{fa4d}', to: '\u{fa4d}', mapping: Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa4e}', to: '\u{fa4e}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa4f}', to: '\u{fa4f}', mapping: Mapped(StringTableSlice { byte_start_lo: 183, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa50}', to: '\u{fa50}', mapping: Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa51}', to: '\u{fa51}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{fa52}', to: '\u{fa52}', mapping: Mapped(StringTableSlice { byte_start_lo: 189, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa53}', to: '\u{fa53}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa54}', to: '\u{fa54}', mapping: Mapped(StringTableSlice { byte_start_lo: 195, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa55}', to: '\u{fa55}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa56}', to: '\u{fa56}', mapping: Mapped(StringTableSlice { byte_start_lo: 201, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa57}', to: '\u{fa57}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{fa58}', to: '\u{fa58}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa59}', to: '\u{fa59}', mapping: Mapped(StringTableSlice { byte_start_lo: 207, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa5a}', to: '\u{fa5a}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa5b}', to: '\u{fa5b}', mapping: Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa5c}', to: '\u{fa5c}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa5d}', to: '\u{fa5e}', mapping: Mapped(StringTableSlice { byte_start_lo: 219, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa5f}', to: '\u{fa5f}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa60}', to: '\u{fa60}', mapping: Mapped(StringTableSlice { byte_start_lo: 225, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa61}', to: '\u{fa61}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa62}', to: '\u{fa62}', mapping: Mapped(StringTableSlice { byte_start_lo: 231, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa63}', to: '\u{fa63}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa64}', to: '\u{fa64}', mapping: Mapped(StringTableSlice { byte_start_lo: 237, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa65}', to: '\u{fa65}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa66}', to: '\u{fa66}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa67}', to: '\u{fa67}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa68}', to: '\u{fa68}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa69}', to: '\u{fa69}', mapping: Mapped(StringTableSlice { byte_start_lo: 249, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa6a}', to: '\u{fa6a}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa6b}', to: '\u{fa6b}', mapping: Mapped(StringTableSlice { byte_start_lo: 255, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa6c}', to: '\u{fa6c}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 30, byte_len: 4 }) },
++    Range { from: '\u{fa6d}', to: '\u{fa6d}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa6e}', to: '\u{fa6f}', mapping: Disallowed },
++    Range { from: '\u{fa70}', to: '\u{fa70}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa71}', to: '\u{fa71}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa72}', to: '\u{fa72}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa73}', to: '\u{fa73}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa74}', to: '\u{fa74}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa75}', to: '\u{fa75}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa76}', to: '\u{fa76}', mapping: Mapped(StringTableSlice { byte_start_lo: 27, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa77}', to: '\u{fa77}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa78}', to: '\u{fa78}', mapping: Mapped(StringTableSlice { byte_start_lo: 114, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa79}', to: '\u{fa79}', mapping: Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa7a}', to: '\u{fa7a}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa7b}', to: '\u{fa7b}', mapping: Mapped(StringTableSlice { byte_start_lo: 39, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa7c}', to: '\u{fa7c}', mapping: Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa7d}', to: '\u{fa7d}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa7e}', to: '\u{fa7e}', mapping: Mapped(StringTableSlice { byte_start_lo: 45, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa7f}', to: '\u{fa7f}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa80}', to: '\u{fa80}', mapping: Mapped(StringTableSlice { byte_start_lo: 51, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa81}', to: '\u{fa81}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa82}', to: '\u{fa82}', mapping: Mapped(StringTableSlice { byte_start_lo: 57, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa83}', to: '\u{fa83}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa84}', to: '\u{fa84}', mapping: Mapped(StringTableSlice { byte_start_lo: 63, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa85}', to: '\u{fa85}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa86}', to: '\u{fa86}', mapping: Mapped(StringTableSlice { byte_start_lo: 69, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa87}', to: '\u{fa87}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa88}', to: '\u{fa88}', mapping: Mapped(StringTableSlice { byte_start_lo: 75, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa89}', to: '\u{fa89}', mapping: Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa8a}', to: '\u{fa8a}', mapping: Mapped(StringTableSlice { byte_start_lo: 78, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa8b}', to: '\u{fa8b}', mapping: Mapped(StringTableSlice { byte_start_lo: 141, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa8c}', to: '\u{fa8c}', mapping: Mapped(StringTableSlice { byte_start_lo: 81, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa8d}', to: '\u{fa8d}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa8e}', to: '\u{fa8e}', mapping: Mapped(StringTableSlice { byte_start_lo: 87, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa8f}', to: '\u{fa8f}', mapping: Mapped(StringTableSlice { byte_start_lo: 90, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa90}', to: '\u{fa90}', mapping: Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa91}', to: '\u{fa91}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa92}', to: '\u{fa92}', mapping: Mapped(StringTableSlice { byte_start_lo: 162, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{fa93}', to: '\u{fa93}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa94}', to: '\u{fa94}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa95}', to: '\u{fa95}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{fa96}', to: '\u{fa96}', mapping: Mapped(StringTableSlice { byte_start_lo: 110, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{fa97}', to: '\u{fa97}', mapping: Mapped(StringTableSlice { byte_start_lo: 103, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{fa98}', to: '\u{fa98}', mapping: Mapped(StringTableSlice { byte_start_lo: 102, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa99}', to: '\u{fa99}', mapping: Mapped(StringTableSlice { byte_start_lo: 105, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa9a}', to: '\u{fa9a}', mapping: Mapped(StringTableSlice { byte_start_lo: 162, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa9b}', to: '\u{fa9b}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa9c}', to: '\u{fa9c}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fa9d}', to: '\u{fa9d}', mapping: Mapped(StringTableSlice { byte_start_lo: 111, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa9e}', to: '\u{fa9e}', mapping: Mapped(StringTableSlice { byte_start_lo: 114, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fa9f}', to: '\u{fa9f}', mapping: Mapped(StringTableSlice { byte_start_lo: 117, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{faa0}', to: '\u{faa0}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{faa1}', to: '\u{faa1}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{faa2}', to: '\u{faa2}', mapping: Mapped(StringTableSlice { byte_start_lo: 123, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{faa3}', to: '\u{faa3}', mapping: Mapped(StringTableSlice { byte_start_lo: 126, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{faa4}', to: '\u{faa4}', mapping: Mapped(StringTableSlice { byte_start_lo: 129, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{faa5}', to: '\u{faa5}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{faa6}', to: '\u{faa6}', mapping: Mapped(StringTableSlice { byte_start_lo: 45, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{faa7}', to: '\u{faa7}', mapping: Mapped(StringTableSlice { byte_start_lo: 135, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{faa8}', to: '\u{faa8}', mapping: Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{faa9}', to: '\u{faa9}', mapping: Mapped(StringTableSlice { byte_start_lo: 141, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{faaa}', to: '\u{faaa}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{faab}', to: '\u{faab}', mapping: Mapped(StringTableSlice { byte_start_lo: 147, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{faac}', to: '\u{faac}', mapping: Mapped(StringTableSlice { byte_start_lo: 150, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{faad}', to: '\u{faad}', mapping: Mapped(StringTableSlice { byte_start_lo: 201, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{faae}', to: '\u{faae}', mapping: Mapped(StringTableSlice { byte_start_lo: 153, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{faaf}', to: '\u{faaf}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fab0}', to: '\u{fab0}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{fab1}', to: '\u{fab1}', mapping: Mapped(StringTableSlice { byte_start_lo: 159, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fab2}', to: '\u{fab2}', mapping: Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fab3}', to: '\u{fab3}', mapping: Mapped(StringTableSlice { byte_start_lo: 162, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fab4}', to: '\u{fab4}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fab5}', to: '\u{fab5}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fab6}', to: '\u{fab6}', mapping: Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fab7}', to: '\u{fab7}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fab8}', to: '\u{fab8}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fab9}', to: '\u{fab9}', mapping: Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{faba}', to: '\u{faba}', mapping: Mapped(StringTableSlice { byte_start_lo: 69, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fabb}', to: '\u{fabb}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fabc}', to: '\u{fabc}', mapping: Mapped(StringTableSlice { byte_start_lo: 231, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fabd}', to: '\u{fabd}', mapping: Mapped(StringTableSlice { byte_start_lo: 53, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{fabe}', to: '\u{fabe}', mapping: Mapped(StringTableSlice { byte_start_lo: 183, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fabf}', to: '\u{fabf}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fac0}', to: '\u{fac0}', mapping: Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fac1}', to: '\u{fac1}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fac2}', to: '\u{fac2}', mapping: Mapped(StringTableSlice { byte_start_lo: 189, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fac3}', to: '\u{fac3}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fac4}', to: '\u{fac4}', mapping: Mapped(StringTableSlice { byte_start_lo: 195, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fac5}', to: '\u{fac5}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fac6}', to: '\u{fac6}', mapping: Mapped(StringTableSlice { byte_start_lo: 201, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fac7}', to: '\u{fac7}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fac8}', to: '\u{fac8}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{fac9}', to: '\u{fac9}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{faca}', to: '\u{faca}', mapping: Mapped(StringTableSlice { byte_start_lo: 249, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{facb}', to: '\u{facb}', mapping: Mapped(StringTableSlice { byte_start_lo: 207, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{facc}', to: '\u{facc}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{facd}', to: '\u{facd}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{face}', to: '\u{face}', mapping: Mapped(StringTableSlice { byte_start_lo: 255, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{facf}', to: '\u{facf}', mapping: Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 30, byte_len: 4 }) },
++    Range { from: '\u{fad0}', to: '\u{fad0}', mapping: Mapped(StringTableSlice { byte_start_lo: 217, byte_start_hi: 30, byte_len: 4 }) },
++    Range { from: '\u{fad1}', to: '\u{fad1}', mapping: Mapped(StringTableSlice { byte_start_lo: 221, byte_start_hi: 30, byte_len: 4 }) },
++    Range { from: '\u{fad2}', to: '\u{fad2}', mapping: Mapped(StringTableSlice { byte_start_lo: 225, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fad3}', to: '\u{fad3}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fad4}', to: '\u{fad4}', mapping: Mapped(StringTableSlice { byte_start_lo: 231, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fad5}', to: '\u{fad5}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 30, byte_len: 4 }) },
++    Range { from: '\u{fad6}', to: '\u{fad6}', mapping: Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 30, byte_len: 4 }) },
++    Range { from: '\u{fad7}', to: '\u{fad7}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 30, byte_len: 4 }) },
++    Range { from: '\u{fad8}', to: '\u{fad8}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fad9}', to: '\u{fad9}', mapping: Mapped(StringTableSlice { byte_start_lo: 249, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{fada}', to: '\u{faff}', mapping: Disallowed },
++    Range { from: '\u{fb00}', to: '\u{fb00}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 30, byte_len: 2 }) },
++    Range { from: '\u{fb01}', to: '\u{fb01}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 30, byte_len: 2 }) },
++    Range { from: '\u{fb02}', to: '\u{fb02}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb03}', to: '\u{fb03}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 31, byte_len: 3 }) },
++    Range { from: '\u{fb04}', to: '\u{fb04}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 31, byte_len: 3 }) },
++    Range { from: '\u{fb05}', to: '\u{fb06}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb07}', to: '\u{fb12}', mapping: Disallowed },
++    Range { from: '\u{fb13}', to: '\u{fb13}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb14}', to: '\u{fb14}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb15}', to: '\u{fb15}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb16}', to: '\u{fb16}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb17}', to: '\u{fb17}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb18}', to: '\u{fb1c}', mapping: Disallowed },
++    Range { from: '\u{fb1d}', to: '\u{fb1d}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb1e}', to: '\u{fb1e}', mapping: Valid },
++    Range { from: '\u{fb1f}', to: '\u{fb1f}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb20}', to: '\u{fb20}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb21}', to: '\u{fb21}', mapping: Mapped(StringTableSlice { byte_start_lo: 207, byte_start_hi: 8, byte_len: 2 }) },
++    Range { from: '\u{fb22}', to: '\u{fb22}', mapping: Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 8, byte_len: 2 }) },
++    Range { from: '\u{fb23}', to: '\u{fb23}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb24}', to: '\u{fb24}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb25}', to: '\u{fb25}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb26}', to: '\u{fb26}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb27}', to: '\u{fb27}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb28}', to: '\u{fb28}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb29}', to: '\u{fb29}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{fb2a}', to: '\u{fb2a}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb2b}', to: '\u{fb2b}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb2c}', to: '\u{fb2c}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 31, byte_len: 6 }) },
++    Range { from: '\u{fb2d}', to: '\u{fb2d}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 31, byte_len: 6 }) },
++    Range { from: '\u{fb2e}', to: '\u{fb2e}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb2f}', to: '\u{fb2f}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb30}', to: '\u{fb30}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb31}', to: '\u{fb31}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb32}', to: '\u{fb32}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb33}', to: '\u{fb33}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb34}', to: '\u{fb34}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb35}', to: '\u{fb35}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb36}', to: '\u{fb36}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb37}', to: '\u{fb37}', mapping: Disallowed },
++    Range { from: '\u{fb38}', to: '\u{fb38}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb39}', to: '\u{fb39}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb3a}', to: '\u{fb3a}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb3b}', to: '\u{fb3b}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb3c}', to: '\u{fb3c}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb3d}', to: '\u{fb3d}', mapping: Disallowed },
++    Range { from: '\u{fb3e}', to: '\u{fb3e}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb3f}', to: '\u{fb3f}', mapping: Disallowed },
++    Range { from: '\u{fb40}', to: '\u{fb40}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb41}', to: '\u{fb41}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb42}', to: '\u{fb42}', mapping: Disallowed },
++    Range { from: '\u{fb43}', to: '\u{fb43}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb44}', to: '\u{fb44}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb45}', to: '\u{fb45}', mapping: Disallowed },
++    Range { from: '\u{fb46}', to: '\u{fb46}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb47}', to: '\u{fb47}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb48}', to: '\u{fb48}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb49}', to: '\u{fb49}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb4a}', to: '\u{fb4a}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb4b}', to: '\u{fb4b}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb4c}', to: '\u{fb4c}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb4d}', to: '\u{fb4d}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb4e}', to: '\u{fb4e}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb4f}', to: '\u{fb4f}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 31, byte_len: 4 }) },
++    Range { from: '\u{fb50}', to: '\u{fb51}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb52}', to: '\u{fb55}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb56}', to: '\u{fb59}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb5a}', to: '\u{fb5d}', mapping: Mapped(StringTableSlice { byte_start_lo: 194, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb5e}', to: '\u{fb61}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb62}', to: '\u{fb65}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb66}', to: '\u{fb69}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb6a}', to: '\u{fb6d}', mapping: Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb6e}', to: '\u{fb71}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb72}', to: '\u{fb75}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb76}', to: '\u{fb79}', mapping: Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb7a}', to: '\u{fb7d}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb7e}', to: '\u{fb81}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb82}', to: '\u{fb83}', mapping: Mapped(StringTableSlice { byte_start_lo: 214, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb84}', to: '\u{fb85}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb86}', to: '\u{fb87}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb88}', to: '\u{fb89}', mapping: Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb8a}', to: '\u{fb8b}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb8c}', to: '\u{fb8d}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb8e}', to: '\u{fb91}', mapping: Mapped(StringTableSlice { byte_start_lo: 226, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb92}', to: '\u{fb95}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb96}', to: '\u{fb99}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb9a}', to: '\u{fb9d}', mapping: Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fb9e}', to: '\u{fb9f}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fba0}', to: '\u{fba3}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fba4}', to: '\u{fba5}', mapping: Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fba6}', to: '\u{fba9}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fbaa}', to: '\u{fbad}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fbae}', to: '\u{fbaf}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fbb0}', to: '\u{fbb1}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fbb2}', to: '\u{fbc1}', mapping: Valid },
++    Range { from: '\u{fbc2}', to: '\u{fbd2}', mapping: Disallowed },
++    Range { from: '\u{fbd3}', to: '\u{fbd6}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fbd7}', to: '\u{fbd8}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fbd9}', to: '\u{fbda}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fbdb}', to: '\u{fbdc}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{fbdd}', to: '\u{fbdd}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 3, byte_len: 4 }) },
++    Range { from: '\u{fbde}', to: '\u{fbdf}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 32, byte_len: 2 }) },
++    Range { from: '\u{fbe0}', to: '\u{fbe1}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 32, byte_len: 2 }) },
++    Range { from: '\u{fbe2}', to: '\u{fbe3}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 32, byte_len: 2 }) },
++    Range { from: '\u{fbe4}', to: '\u{fbe7}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 32, byte_len: 2 }) },
++    Range { from: '\u{fbe8}', to: '\u{fbe9}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 32, byte_len: 2 }) },
++    Range { from: '\u{fbea}', to: '\u{fbeb}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fbec}', to: '\u{fbed}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fbee}', to: '\u{fbef}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fbf0}', to: '\u{fbf1}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fbf2}', to: '\u{fbf3}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fbf4}', to: '\u{fbf5}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fbf6}', to: '\u{fbf8}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fbf9}', to: '\u{fbfb}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fbfc}', to: '\u{fbff}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 32, byte_len: 2 }) },
++    Range { from: '\u{fc00}', to: '\u{fc00}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc01}', to: '\u{fc01}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc02}', to: '\u{fc02}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc03}', to: '\u{fc03}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc04}', to: '\u{fc04}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc05}', to: '\u{fc05}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc06}', to: '\u{fc06}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc07}', to: '\u{fc07}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc08}', to: '\u{fc08}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc09}', to: '\u{fc09}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc0a}', to: '\u{fc0a}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc0b}', to: '\u{fc0b}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc0c}', to: '\u{fc0c}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc0d}', to: '\u{fc0d}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc0e}', to: '\u{fc0e}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc0f}', to: '\u{fc0f}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc10}', to: '\u{fc10}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc11}', to: '\u{fc11}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc12}', to: '\u{fc12}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc13}', to: '\u{fc13}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc14}', to: '\u{fc14}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc15}', to: '\u{fc15}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc16}', to: '\u{fc16}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc17}', to: '\u{fc17}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc18}', to: '\u{fc18}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc19}', to: '\u{fc19}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc1a}', to: '\u{fc1a}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc1b}', to: '\u{fc1b}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc1c}', to: '\u{fc1c}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc1d}', to: '\u{fc1d}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc1e}', to: '\u{fc1e}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc1f}', to: '\u{fc1f}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc20}', to: '\u{fc20}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc21}', to: '\u{fc21}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc22}', to: '\u{fc22}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc23}', to: '\u{fc23}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc24}', to: '\u{fc24}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc25}', to: '\u{fc25}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc26}', to: '\u{fc26}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc27}', to: '\u{fc27}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc28}', to: '\u{fc28}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc29}', to: '\u{fc29}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc2a}', to: '\u{fc2a}', mapping: Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc2b}', to: '\u{fc2b}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc2c}', to: '\u{fc2c}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc2d}', to: '\u{fc2d}', mapping: Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc2e}', to: '\u{fc2e}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc2f}', to: '\u{fc2f}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc30}', to: '\u{fc30}', mapping: Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc31}', to: '\u{fc31}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc32}', to: '\u{fc32}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc33}', to: '\u{fc33}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc34}', to: '\u{fc34}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc35}', to: '\u{fc35}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc36}', to: '\u{fc36}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc37}', to: '\u{fc37}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc38}', to: '\u{fc38}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc39}', to: '\u{fc39}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc3a}', to: '\u{fc3a}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc3b}', to: '\u{fc3b}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc3c}', to: '\u{fc3c}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc3d}', to: '\u{fc3d}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc3e}', to: '\u{fc3e}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc3f}', to: '\u{fc3f}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc40}', to: '\u{fc40}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc41}', to: '\u{fc41}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc42}', to: '\u{fc42}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc43}', to: '\u{fc43}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc44}', to: '\u{fc44}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc45}', to: '\u{fc45}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc46}', to: '\u{fc46}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc47}', to: '\u{fc47}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc48}', to: '\u{fc48}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc49}', to: '\u{fc49}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc4a}', to: '\u{fc4a}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc4b}', to: '\u{fc4b}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc4c}', to: '\u{fc4c}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc4d}', to: '\u{fc4d}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc4e}', to: '\u{fc4e}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc4f}', to: '\u{fc4f}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc50}', to: '\u{fc50}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc51}', to: '\u{fc51}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc52}', to: '\u{fc52}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc53}', to: '\u{fc53}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc54}', to: '\u{fc54}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc55}', to: '\u{fc55}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc56}', to: '\u{fc56}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc57}', to: '\u{fc57}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc58}', to: '\u{fc58}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc59}', to: '\u{fc59}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc5a}', to: '\u{fc5a}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc5b}', to: '\u{fc5b}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc5c}', to: '\u{fc5c}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc5d}', to: '\u{fc5d}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc5e}', to: '\u{fc5e}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 33, byte_len: 5 }) },
++    Range { from: '\u{fc5f}', to: '\u{fc5f}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 33, byte_len: 5 }) },
++    Range { from: '\u{fc60}', to: '\u{fc60}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 33, byte_len: 5 }) },
++    Range { from: '\u{fc61}', to: '\u{fc61}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 175, byte_start_hi: 33, byte_len: 5 }) },
++    Range { from: '\u{fc62}', to: '\u{fc62}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 33, byte_len: 5 }) },
++    Range { from: '\u{fc63}', to: '\u{fc63}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 185, byte_start_hi: 33, byte_len: 5 }) },
++    Range { from: '\u{fc64}', to: '\u{fc64}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc65}', to: '\u{fc65}', mapping: Mapped(StringTableSlice { byte_start_lo: 194, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc66}', to: '\u{fc66}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc67}', to: '\u{fc67}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc68}', to: '\u{fc68}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc69}', to: '\u{fc69}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc6a}', to: '\u{fc6a}', mapping: Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc6b}', to: '\u{fc6b}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc6c}', to: '\u{fc6c}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc6d}', to: '\u{fc6d}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc6e}', to: '\u{fc6e}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc6f}', to: '\u{fc6f}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc70}', to: '\u{fc70}', mapping: Mapped(StringTableSlice { byte_start_lo: 214, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc71}', to: '\u{fc71}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc72}', to: '\u{fc72}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc73}', to: '\u{fc73}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc74}', to: '\u{fc74}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc75}', to: '\u{fc75}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc76}', to: '\u{fc76}', mapping: Mapped(StringTableSlice { byte_start_lo: 226, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc77}', to: '\u{fc77}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc78}', to: '\u{fc78}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc79}', to: '\u{fc79}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc7a}', to: '\u{fc7a}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc7b}', to: '\u{fc7b}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc7c}', to: '\u{fc7c}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc7d}', to: '\u{fc7d}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc7e}', to: '\u{fc7e}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc7f}', to: '\u{fc7f}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc80}', to: '\u{fc80}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc81}', to: '\u{fc81}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc82}', to: '\u{fc82}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc83}', to: '\u{fc83}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc84}', to: '\u{fc84}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc85}', to: '\u{fc85}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc86}', to: '\u{fc86}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc87}', to: '\u{fc87}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc88}', to: '\u{fc88}', mapping: Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc89}', to: '\u{fc89}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc8a}', to: '\u{fc8a}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc8b}', to: '\u{fc8b}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc8c}', to: '\u{fc8c}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc8d}', to: '\u{fc8d}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc8e}', to: '\u{fc8e}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc8f}', to: '\u{fc8f}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc90}', to: '\u{fc90}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc91}', to: '\u{fc91}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc92}', to: '\u{fc92}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fc93}', to: '\u{fc93}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc94}', to: '\u{fc94}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fc95}', to: '\u{fc95}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc96}', to: '\u{fc96}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fc97}', to: '\u{fc97}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc98}', to: '\u{fc98}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc99}', to: '\u{fc99}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fc9a}', to: '\u{fc9a}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc9b}', to: '\u{fc9b}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fc9c}', to: '\u{fc9c}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc9d}', to: '\u{fc9d}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc9e}', to: '\u{fc9e}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fc9f}', to: '\u{fc9f}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fca0}', to: '\u{fca0}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fca1}', to: '\u{fca1}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fca2}', to: '\u{fca2}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fca3}', to: '\u{fca3}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fca4}', to: '\u{fca4}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fca5}', to: '\u{fca5}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fca6}', to: '\u{fca6}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fca7}', to: '\u{fca7}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fca8}', to: '\u{fca8}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fca9}', to: '\u{fca9}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcaa}', to: '\u{fcaa}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcab}', to: '\u{fcab}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcac}', to: '\u{fcac}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcad}', to: '\u{fcad}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcae}', to: '\u{fcae}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcaf}', to: '\u{fcaf}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcb0}', to: '\u{fcb0}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcb1}', to: '\u{fcb1}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcb2}', to: '\u{fcb2}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcb3}', to: '\u{fcb3}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcb4}', to: '\u{fcb4}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcb5}', to: '\u{fcb5}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcb6}', to: '\u{fcb6}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcb7}', to: '\u{fcb7}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcb8}', to: '\u{fcb8}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcb9}', to: '\u{fcb9}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcba}', to: '\u{fcba}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcbb}', to: '\u{fcbb}', mapping: Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcbc}', to: '\u{fcbc}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcbd}', to: '\u{fcbd}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcbe}', to: '\u{fcbe}', mapping: Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcbf}', to: '\u{fcbf}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcc0}', to: '\u{fcc0}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcc1}', to: '\u{fcc1}', mapping: Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcc2}', to: '\u{fcc2}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcc3}', to: '\u{fcc3}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fcc4}', to: '\u{fcc4}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcc5}', to: '\u{fcc5}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcc6}', to: '\u{fcc6}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcc7}', to: '\u{fcc7}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcc8}', to: '\u{fcc8}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcc9}', to: '\u{fcc9}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcca}', to: '\u{fcca}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fccb}', to: '\u{fccb}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fccc}', to: '\u{fccc}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fccd}', to: '\u{fccd}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcce}', to: '\u{fcce}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fccf}', to: '\u{fccf}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcd0}', to: '\u{fcd0}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcd1}', to: '\u{fcd1}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcd2}', to: '\u{fcd2}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcd3}', to: '\u{fcd3}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcd4}', to: '\u{fcd4}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcd5}', to: '\u{fcd5}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcd6}', to: '\u{fcd6}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcd7}', to: '\u{fcd7}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcd8}', to: '\u{fcd8}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcd9}', to: '\u{fcd9}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcda}', to: '\u{fcda}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcdb}', to: '\u{fcdb}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcdc}', to: '\u{fcdc}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcdd}', to: '\u{fcdd}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcde}', to: '\u{fcde}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcdf}', to: '\u{fcdf}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fce0}', to: '\u{fce0}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fce1}', to: '\u{fce1}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fce2}', to: '\u{fce2}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fce3}', to: '\u{fce3}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fce4}', to: '\u{fce4}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fce5}', to: '\u{fce5}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fce6}', to: '\u{fce6}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fce7}', to: '\u{fce7}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fce8}', to: '\u{fce8}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fce9}', to: '\u{fce9}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcea}', to: '\u{fcea}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fceb}', to: '\u{fceb}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcec}', to: '\u{fcec}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fced}', to: '\u{fced}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcee}', to: '\u{fcee}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcef}', to: '\u{fcef}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcf0}', to: '\u{fcf0}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 33, byte_len: 4 }) },
++    Range { from: '\u{fcf1}', to: '\u{fcf1}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcf2}', to: '\u{fcf2}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 34, byte_len: 6 }) },
++    Range { from: '\u{fcf3}', to: '\u{fcf3}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 34, byte_len: 6 }) },
++    Range { from: '\u{fcf4}', to: '\u{fcf4}', mapping: Mapped(StringTableSlice { byte_start_lo: 74, byte_start_hi: 34, byte_len: 6 }) },
++    Range { from: '\u{fcf5}', to: '\u{fcf5}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcf6}', to: '\u{fcf6}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcf7}', to: '\u{fcf7}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcf8}', to: '\u{fcf8}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcf9}', to: '\u{fcf9}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcfa}', to: '\u{fcfa}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcfb}', to: '\u{fcfb}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcfc}', to: '\u{fcfc}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcfd}', to: '\u{fcfd}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcfe}', to: '\u{fcfe}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fcff}', to: '\u{fcff}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd00}', to: '\u{fd00}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd01}', to: '\u{fd01}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd02}', to: '\u{fd02}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd03}', to: '\u{fd03}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd04}', to: '\u{fd04}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd05}', to: '\u{fd05}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd06}', to: '\u{fd06}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd07}', to: '\u{fd07}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd08}', to: '\u{fd08}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd09}', to: '\u{fd09}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd0a}', to: '\u{fd0a}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd0b}', to: '\u{fd0b}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd0c}', to: '\u{fd0c}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd0d}', to: '\u{fd0d}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd0e}', to: '\u{fd0e}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd0f}', to: '\u{fd0f}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd10}', to: '\u{fd10}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd11}', to: '\u{fd11}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd12}', to: '\u{fd12}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd13}', to: '\u{fd13}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd14}', to: '\u{fd14}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd15}', to: '\u{fd15}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd16}', to: '\u{fd16}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd17}', to: '\u{fd17}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd18}', to: '\u{fd18}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd19}', to: '\u{fd19}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd1a}', to: '\u{fd1a}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd1b}', to: '\u{fd1b}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd1c}', to: '\u{fd1c}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd1d}', to: '\u{fd1d}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd1e}', to: '\u{fd1e}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd1f}', to: '\u{fd1f}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd20}', to: '\u{fd20}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd21}', to: '\u{fd21}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd22}', to: '\u{fd22}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd23}', to: '\u{fd23}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd24}', to: '\u{fd24}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd25}', to: '\u{fd25}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd26}', to: '\u{fd26}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd27}', to: '\u{fd27}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd28}', to: '\u{fd28}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd29}', to: '\u{fd29}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd2a}', to: '\u{fd2a}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd2b}', to: '\u{fd2b}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd2c}', to: '\u{fd2c}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd2d}', to: '\u{fd2d}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd2e}', to: '\u{fd2e}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd2f}', to: '\u{fd2f}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd30}', to: '\u{fd30}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd31}', to: '\u{fd31}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd32}', to: '\u{fd32}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd33}', to: '\u{fd33}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fd34}', to: '\u{fd34}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fd35}', to: '\u{fd35}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fd36}', to: '\u{fd36}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fd37}', to: '\u{fd37}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd38}', to: '\u{fd38}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd39}', to: '\u{fd39}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd3a}', to: '\u{fd3a}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fd3b}', to: '\u{fd3b}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 32, byte_len: 4 }) },
++    Range { from: '\u{fd3c}', to: '\u{fd3d}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 34, byte_len: 4 }) },
++    Range { from: '\u{fd3e}', to: '\u{fd3f}', mapping: Valid },
++    Range { from: '\u{fd40}', to: '\u{fd4f}', mapping: Disallowed },
++    Range { from: '\u{fd50}', to: '\u{fd50}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 34, byte_len: 6 }) },
++    Range { from: '\u{fd51}', to: '\u{fd52}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 34, byte_len: 6 }) },
++    Range { from: '\u{fd53}', to: '\u{fd53}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 34, byte_len: 6 }) },
++    Range { from: '\u{fd54}', to: '\u{fd54}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 34, byte_len: 6 }) },
++    Range { from: '\u{fd55}', to: '\u{fd55}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 34, byte_len: 6 }) },
++    Range { from: '\u{fd56}', to: '\u{fd56}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 34, byte_len: 6 }) },
++    Range { from: '\u{fd57}', to: '\u{fd57}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 34, byte_len: 6 }) },
++    Range { from: '\u{fd58}', to: '\u{fd59}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 34, byte_len: 6 }) },
++    Range { from: '\u{fd5a}', to: '\u{fd5a}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 34, byte_len: 6 }) },
++    Range { from: '\u{fd5b}', to: '\u{fd5b}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 34, byte_len: 6 }) },
++    Range { from: '\u{fd5c}', to: '\u{fd5c}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 34, byte_len: 6 }) },
++    Range { from: '\u{fd5d}', to: '\u{fd5d}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd5e}', to: '\u{fd5e}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd5f}', to: '\u{fd60}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd61}', to: '\u{fd61}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd62}', to: '\u{fd63}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd64}', to: '\u{fd65}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd66}', to: '\u{fd66}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd67}', to: '\u{fd68}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd69}', to: '\u{fd69}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd6a}', to: '\u{fd6b}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd6c}', to: '\u{fd6d}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd6e}', to: '\u{fd6e}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd6f}', to: '\u{fd70}', mapping: Mapped(StringTableSlice { byte_start_lo: 74, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd71}', to: '\u{fd72}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd73}', to: '\u{fd73}', mapping: Mapped(StringTableSlice { byte_start_lo: 86, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd74}', to: '\u{fd74}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd75}', to: '\u{fd75}', mapping: Mapped(StringTableSlice { byte_start_lo: 98, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd76}', to: '\u{fd77}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd78}', to: '\u{fd78}', mapping: Mapped(StringTableSlice { byte_start_lo: 110, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd79}', to: '\u{fd79}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd7a}', to: '\u{fd7a}', mapping: Mapped(StringTableSlice { byte_start_lo: 122, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd7b}', to: '\u{fd7b}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd7c}', to: '\u{fd7d}', mapping: Mapped(StringTableSlice { byte_start_lo: 134, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd7e}', to: '\u{fd7e}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd7f}', to: '\u{fd7f}', mapping: Mapped(StringTableSlice { byte_start_lo: 146, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd80}', to: '\u{fd80}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd81}', to: '\u{fd81}', mapping: Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd82}', to: '\u{fd82}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd83}', to: '\u{fd84}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd85}', to: '\u{fd86}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd87}', to: '\u{fd88}', mapping: Mapped(StringTableSlice { byte_start_lo: 182, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd89}', to: '\u{fd89}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd8a}', to: '\u{fd8a}', mapping: Mapped(StringTableSlice { byte_start_lo: 194, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd8b}', to: '\u{fd8b}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd8c}', to: '\u{fd8c}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd8d}', to: '\u{fd8d}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd8e}', to: '\u{fd8e}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd8f}', to: '\u{fd8f}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd90}', to: '\u{fd91}', mapping: Disallowed },
++    Range { from: '\u{fd92}', to: '\u{fd92}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd93}', to: '\u{fd93}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd94}', to: '\u{fd94}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd95}', to: '\u{fd95}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd96}', to: '\u{fd96}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fd97}', to: '\u{fd98}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fd99}', to: '\u{fd99}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fd9a}', to: '\u{fd9a}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fd9b}', to: '\u{fd9b}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fd9c}', to: '\u{fd9d}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fd9e}', to: '\u{fd9e}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fd9f}', to: '\u{fd9f}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fda0}', to: '\u{fda0}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fda1}', to: '\u{fda1}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fda2}', to: '\u{fda2}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fda3}', to: '\u{fda3}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fda4}', to: '\u{fda4}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fda5}', to: '\u{fda5}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fda6}', to: '\u{fda6}', mapping: Mapped(StringTableSlice { byte_start_lo: 82, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fda7}', to: '\u{fda7}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fda8}', to: '\u{fda8}', mapping: Mapped(StringTableSlice { byte_start_lo: 94, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fda9}', to: '\u{fda9}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdaa}', to: '\u{fdaa}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdab}', to: '\u{fdab}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdac}', to: '\u{fdac}', mapping: Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdad}', to: '\u{fdad}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdae}', to: '\u{fdae}', mapping: Mapped(StringTableSlice { byte_start_lo: 130, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdaf}', to: '\u{fdaf}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdb0}', to: '\u{fdb0}', mapping: Mapped(StringTableSlice { byte_start_lo: 142, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdb1}', to: '\u{fdb1}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdb2}', to: '\u{fdb2}', mapping: Mapped(StringTableSlice { byte_start_lo: 154, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdb3}', to: '\u{fdb3}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdb4}', to: '\u{fdb4}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fdb5}', to: '\u{fdb5}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fdb6}', to: '\u{fdb6}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdb7}', to: '\u{fdb7}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdb8}', to: '\u{fdb8}', mapping: Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdb9}', to: '\u{fdb9}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdba}', to: '\u{fdba}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdbb}', to: '\u{fdbb}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdbc}', to: '\u{fdbc}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdbd}', to: '\u{fdbd}', mapping: Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdbe}', to: '\u{fdbe}', mapping: Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdbf}', to: '\u{fdbf}', mapping: Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdc0}', to: '\u{fdc0}', mapping: Mapped(StringTableSlice { byte_start_lo: 214, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdc1}', to: '\u{fdc1}', mapping: Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdc2}', to: '\u{fdc2}', mapping: Mapped(StringTableSlice { byte_start_lo: 226, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdc3}', to: '\u{fdc3}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdc4}', to: '\u{fdc4}', mapping: Mapped(StringTableSlice { byte_start_lo: 98, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fdc5}', to: '\u{fdc5}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 35, byte_len: 6 }) },
++    Range { from: '\u{fdc6}', to: '\u{fdc6}', mapping: Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdc7}', to: '\u{fdc7}', mapping: Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdc8}', to: '\u{fdef}', mapping: Disallowed },
++    Range { from: '\u{fdf0}', to: '\u{fdf0}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdf1}', to: '\u{fdf1}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 36, byte_len: 6 }) },
++    Range { from: '\u{fdf2}', to: '\u{fdf2}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 37, byte_len: 8 }) },
++    Range { from: '\u{fdf3}', to: '\u{fdf3}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 37, byte_len: 8 }) },
++    Range { from: '\u{fdf4}', to: '\u{fdf4}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 37, byte_len: 8 }) },
++    Range { from: '\u{fdf5}', to: '\u{fdf5}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 37, byte_len: 8 }) },
++    Range { from: '\u{fdf6}', to: '\u{fdf6}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 37, byte_len: 8 }) },
++    Range { from: '\u{fdf7}', to: '\u{fdf7}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 37, byte_len: 8 }) },
++    Range { from: '\u{fdf8}', to: '\u{fdf8}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 37, byte_len: 8 }) },
++    Range { from: '\u{fdf9}', to: '\u{fdf9}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 37, byte_len: 6 }) },
++    Range { from: '\u{fdfa}', to: '\u{fdfa}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 37, byte_len: 33 }) },
++    Range { from: '\u{fdfb}', to: '\u{fdfb}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 95, byte_start_hi: 37, byte_len: 15 }) },
++    Range { from: '\u{fdfc}', to: '\u{fdfc}', mapping: Mapped(StringTableSlice { byte_start_lo: 110, byte_start_hi: 37, byte_len: 8 }) },
++    Range { from: '\u{fdfd}', to: '\u{fdfd}', mapping: Valid },
++    Range { from: '\u{fdfe}', to: '\u{fdff}', mapping: Disallowed },
++    Range { from: '\u{fe00}', to: '\u{fe0f}', mapping: Ignored },
++    Range { from: '\u{fe10}', to: '\u{fe10}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe11}', to: '\u{fe11}', mapping: Mapped(StringTableSlice { byte_start_lo: 119, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe12}', to: '\u{fe12}', mapping: Disallowed },
++    Range { from: '\u{fe13}', to: '\u{fe13}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 122, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe14}', to: '\u{fe14}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 2, byte_len: 1 }) },
++    Range { from: '\u{fe15}', to: '\u{fe15}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 123, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe16}', to: '\u{fe16}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe17}', to: '\u{fe17}', mapping: Mapped(StringTableSlice { byte_start_lo: 125, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe18}', to: '\u{fe18}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe19}', to: '\u{fe1f}', mapping: Disallowed },
++    Range { from: '\u{fe20}', to: '\u{fe2f}', mapping: Valid },
++    Range { from: '\u{fe30}', to: '\u{fe30}', mapping: Disallowed },
++    Range { from: '\u{fe31}', to: '\u{fe31}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe32}', to: '\u{fe32}', mapping: Mapped(StringTableSlice { byte_start_lo: 134, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe33}', to: '\u{fe34}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 137, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe35}', to: '\u{fe35}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{fe36}', to: '\u{fe36}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{fe37}', to: '\u{fe37}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe38}', to: '\u{fe38}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 139, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe39}', to: '\u{fe39}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe3a}', to: '\u{fe3a}', mapping: Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe3b}', to: '\u{fe3b}', mapping: Mapped(StringTableSlice { byte_start_lo: 146, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe3c}', to: '\u{fe3c}', mapping: Mapped(StringTableSlice { byte_start_lo: 149, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe3d}', to: '\u{fe3d}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe3e}', to: '\u{fe3e}', mapping: Mapped(StringTableSlice { byte_start_lo: 155, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe3f}', to: '\u{fe3f}', mapping: Mapped(StringTableSlice { byte_start_lo: 103, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{fe40}', to: '\u{fe40}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{fe41}', to: '\u{fe41}', mapping: Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe42}', to: '\u{fe42}', mapping: Mapped(StringTableSlice { byte_start_lo: 161, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe43}', to: '\u{fe43}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe44}', to: '\u{fe44}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe45}', to: '\u{fe46}', mapping: Valid },
++    Range { from: '\u{fe47}', to: '\u{fe47}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe48}', to: '\u{fe48}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe49}', to: '\u{fe4c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 8, byte_len: 3 }) },
++    Range { from: '\u{fe4d}', to: '\u{fe4f}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 137, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe50}', to: '\u{fe50}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe51}', to: '\u{fe51}', mapping: Mapped(StringTableSlice { byte_start_lo: 119, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe52}', to: '\u{fe53}', mapping: Disallowed },
++    Range { from: '\u{fe54}', to: '\u{fe54}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 2, byte_len: 1 }) },
++    Range { from: '\u{fe55}', to: '\u{fe55}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 122, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe56}', to: '\u{fe56}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe57}', to: '\u{fe57}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 123, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe58}', to: '\u{fe58}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe59}', to: '\u{fe59}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{fe5a}', to: '\u{fe5a}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{fe5b}', to: '\u{fe5b}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe5c}', to: '\u{fe5c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 139, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe5d}', to: '\u{fe5d}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe5e}', to: '\u{fe5e}', mapping: Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe5f}', to: '\u{fe5f}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe60}', to: '\u{fe60}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 173, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe61}', to: '\u{fe61}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe62}', to: '\u{fe62}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{fe63}', to: '\u{fe63}', mapping: Mapped(StringTableSlice { byte_start_lo: 175, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe64}', to: '\u{fe64}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe65}', to: '\u{fe65}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe66}', to: '\u{fe66}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 175, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{fe67}', to: '\u{fe67}', mapping: Disallowed },
++    Range { from: '\u{fe68}', to: '\u{fe68}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe69}', to: '\u{fe69}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 179, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe6a}', to: '\u{fe6a}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe6b}', to: '\u{fe6b}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 181, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{fe6c}', to: '\u{fe6f}', mapping: Disallowed },
++    Range { from: '\u{fe70}', to: '\u{fe70}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 182, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe71}', to: '\u{fe71}', mapping: Mapped(StringTableSlice { byte_start_lo: 185, byte_start_hi: 37, byte_len: 4 }) },
++    Range { from: '\u{fe72}', to: '\u{fe72}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 189, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe73}', to: '\u{fe73}', mapping: Valid },
++    Range { from: '\u{fe74}', to: '\u{fe74}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe75}', to: '\u{fe75}', mapping: Disallowed },
++    Range { from: '\u{fe76}', to: '\u{fe76}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 195, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe77}', to: '\u{fe77}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 37, byte_len: 4 }) },
++    Range { from: '\u{fe78}', to: '\u{fe78}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe79}', to: '\u{fe79}', mapping: Mapped(StringTableSlice { byte_start_lo: 205, byte_start_hi: 37, byte_len: 4 }) },
++    Range { from: '\u{fe7a}', to: '\u{fe7a}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 209, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe7b}', to: '\u{fe7b}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 37, byte_len: 4 }) },
++    Range { from: '\u{fe7c}', to: '\u{fe7c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe7d}', to: '\u{fe7d}', mapping: Mapped(StringTableSlice { byte_start_lo: 219, byte_start_hi: 37, byte_len: 4 }) },
++    Range { from: '\u{fe7e}', to: '\u{fe7e}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 223, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{fe7f}', to: '\u{fe7f}', mapping: Mapped(StringTableSlice { byte_start_lo: 226, byte_start_hi: 37, byte_len: 4 }) },
++    Range { from: '\u{fe80}', to: '\u{fe80}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{fe81}', to: '\u{fe82}', mapping: Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{fe83}', to: '\u{fe84}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{fe85}', to: '\u{fe86}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{fe87}', to: '\u{fe88}', mapping: Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{fe89}', to: '\u{fe8c}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{fe8d}', to: '\u{fe8e}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{fe8f}', to: '\u{fe92}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{fe93}', to: '\u{fe94}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{fe95}', to: '\u{fe98}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{fe99}', to: '\u{fe9c}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{fe9d}', to: '\u{fea0}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{fea1}', to: '\u{fea4}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{fea5}', to: '\u{fea8}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{fea9}', to: '\u{feaa}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{feab}', to: '\u{feac}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{fead}', to: '\u{feae}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{feaf}', to: '\u{feb0}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{feb1}', to: '\u{feb4}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{feb5}', to: '\u{feb8}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{feb9}', to: '\u{febc}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{febd}', to: '\u{fec0}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{fec1}', to: '\u{fec4}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{fec5}', to: '\u{fec8}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{fec9}', to: '\u{fecc}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{fecd}', to: '\u{fed0}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{fed1}', to: '\u{fed4}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{fed5}', to: '\u{fed8}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{fed9}', to: '\u{fedc}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{fedd}', to: '\u{fee0}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{fee1}', to: '\u{fee4}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{fee5}', to: '\u{fee8}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{fee9}', to: '\u{feec}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{feed}', to: '\u{feee}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{feef}', to: '\u{fef0}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 32, byte_len: 2 }) },
++    Range { from: '\u{fef1}', to: '\u{fef4}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{fef5}', to: '\u{fef6}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{fef7}', to: '\u{fef8}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{fef9}', to: '\u{fefa}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{fefb}', to: '\u{fefc}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{fefd}', to: '\u{fefe}', mapping: Disallowed },
++    Range { from: '\u{feff}', to: '\u{feff}', mapping: Ignored },
++    Range { from: '\u{ff00}', to: '\u{ff00}', mapping: Disallowed },
++    Range { from: '\u{ff01}', to: '\u{ff01}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 123, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff02}', to: '\u{ff02}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 38, byte_len: 1 }) },
++    Range { from: '\u{ff03}', to: '\u{ff03}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff04}', to: '\u{ff04}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 179, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff05}', to: '\u{ff05}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff06}', to: '\u{ff06}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 173, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff07}', to: '\u{ff07}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 38, byte_len: 1 }) },
++    Range { from: '\u{ff08}', to: '\u{ff08}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{ff09}', to: '\u{ff09}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{ff0a}', to: '\u{ff0a}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff0b}', to: '\u{ff0b}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{ff0c}', to: '\u{ff0c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff0d}', to: '\u{ff0d}', mapping: Mapped(StringTableSlice { byte_start_lo: 175, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff0e}', to: '\u{ff0e}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 14, byte_len: 1 }) },
++    Range { from: '\u{ff0f}', to: '\u{ff0f}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 38, byte_len: 1 }) },
++    Range { from: '\u{ff10}', to: '\u{ff10}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{ff11}', to: '\u{ff11}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff12}', to: '\u{ff12}', mapping: Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff13}', to: '\u{ff13}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff14}', to: '\u{ff14}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{ff15}', to: '\u{ff15}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{ff16}', to: '\u{ff16}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{ff17}', to: '\u{ff17}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{ff18}', to: '\u{ff18}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{ff19}', to: '\u{ff19}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{ff1a}', to: '\u{ff1a}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 122, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff1b}', to: '\u{ff1b}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 2, byte_len: 1 }) },
++    Range { from: '\u{ff1c}', to: '\u{ff1c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff1d}', to: '\u{ff1d}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 175, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{ff1e}', to: '\u{ff1e}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff1f}', to: '\u{ff1f}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff20}', to: '\u{ff20}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 181, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff21}', to: '\u{ff21}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff22}', to: '\u{ff22}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff23}', to: '\u{ff23}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff24}', to: '\u{ff24}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff25}', to: '\u{ff25}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff26}', to: '\u{ff26}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff27}', to: '\u{ff27}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff28}', to: '\u{ff28}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff29}', to: '\u{ff29}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff2a}', to: '\u{ff2a}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff2b}', to: '\u{ff2b}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff2c}', to: '\u{ff2c}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff2d}', to: '\u{ff2d}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff2e}', to: '\u{ff2e}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff2f}', to: '\u{ff2f}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff30}', to: '\u{ff30}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff31}', to: '\u{ff31}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff32}', to: '\u{ff32}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff33}', to: '\u{ff33}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff34}', to: '\u{ff34}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff35}', to: '\u{ff35}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff36}', to: '\u{ff36}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff37}', to: '\u{ff37}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff38}', to: '\u{ff38}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff39}', to: '\u{ff39}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff3a}', to: '\u{ff3a}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff3b}', to: '\u{ff3b}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff3c}', to: '\u{ff3c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff3d}', to: '\u{ff3d}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff3e}', to: '\u{ff3e}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 63, byte_start_hi: 38, byte_len: 1 }) },
++    Range { from: '\u{ff3f}', to: '\u{ff3f}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 137, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff40}', to: '\u{ff40}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 77, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{ff41}', to: '\u{ff41}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff42}', to: '\u{ff42}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff43}', to: '\u{ff43}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff44}', to: '\u{ff44}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff45}', to: '\u{ff45}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff46}', to: '\u{ff46}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff47}', to: '\u{ff47}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff48}', to: '\u{ff48}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff49}', to: '\u{ff49}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff4a}', to: '\u{ff4a}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff4b}', to: '\u{ff4b}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff4c}', to: '\u{ff4c}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff4d}', to: '\u{ff4d}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff4e}', to: '\u{ff4e}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff4f}', to: '\u{ff4f}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff50}', to: '\u{ff50}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff51}', to: '\u{ff51}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff52}', to: '\u{ff52}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff53}', to: '\u{ff53}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff54}', to: '\u{ff54}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff55}', to: '\u{ff55}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff56}', to: '\u{ff56}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff57}', to: '\u{ff57}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff58}', to: '\u{ff58}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff59}', to: '\u{ff59}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff5a}', to: '\u{ff5a}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{ff5b}', to: '\u{ff5b}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff5c}', to: '\u{ff5c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 38, byte_len: 1 }) },
++    Range { from: '\u{ff5d}', to: '\u{ff5d}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 139, byte_start_hi: 37, byte_len: 1 }) },
++    Range { from: '\u{ff5e}', to: '\u{ff5e}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 65, byte_start_hi: 38, byte_len: 1 }) },
++    Range { from: '\u{ff5f}', to: '\u{ff5f}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ff60}', to: '\u{ff60}', mapping: Mapped(StringTableSlice { byte_start_lo: 69, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ff61}', to: '\u{ff61}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 14, byte_len: 1 }) },
++    Range { from: '\u{ff62}', to: '\u{ff62}', mapping: Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{ff63}', to: '\u{ff63}', mapping: Mapped(StringTableSlice { byte_start_lo: 161, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{ff64}', to: '\u{ff64}', mapping: Mapped(StringTableSlice { byte_start_lo: 119, byte_start_hi: 37, byte_len: 3 }) },
++    Range { from: '\u{ff65}', to: '\u{ff65}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ff66}', to: '\u{ff66}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff67}', to: '\u{ff67}', mapping: Mapped(StringTableSlice { byte_start_lo: 75, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ff68}', to: '\u{ff68}', mapping: Mapped(StringTableSlice { byte_start_lo: 78, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ff69}', to: '\u{ff69}', mapping: Mapped(StringTableSlice { byte_start_lo: 81, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ff6a}', to: '\u{ff6a}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ff6b}', to: '\u{ff6b}', mapping: Mapped(StringTableSlice { byte_start_lo: 87, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ff6c}', to: '\u{ff6c}', mapping: Mapped(StringTableSlice { byte_start_lo: 90, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ff6d}', to: '\u{ff6d}', mapping: Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ff6e}', to: '\u{ff6e}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ff6f}', to: '\u{ff6f}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ff70}', to: '\u{ff70}', mapping: Mapped(StringTableSlice { byte_start_lo: 102, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ff71}', to: '\u{ff71}', mapping: Mapped(StringTableSlice { byte_start_lo: 203, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff72}', to: '\u{ff72}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff73}', to: '\u{ff73}', mapping: Mapped(StringTableSlice { byte_start_lo: 209, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff74}', to: '\u{ff74}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff75}', to: '\u{ff75}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff76}', to: '\u{ff76}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff77}', to: '\u{ff77}', mapping: Mapped(StringTableSlice { byte_start_lo: 221, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff78}', to: '\u{ff78}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff79}', to: '\u{ff79}', mapping: Mapped(StringTableSlice { byte_start_lo: 227, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff7a}', to: '\u{ff7a}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff7b}', to: '\u{ff7b}', mapping: Mapped(StringTableSlice { byte_start_lo: 233, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff7c}', to: '\u{ff7c}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff7d}', to: '\u{ff7d}', mapping: Mapped(StringTableSlice { byte_start_lo: 239, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff7e}', to: '\u{ff7e}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff7f}', to: '\u{ff7f}', mapping: Mapped(StringTableSlice { byte_start_lo: 245, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff80}', to: '\u{ff80}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff81}', to: '\u{ff81}', mapping: Mapped(StringTableSlice { byte_start_lo: 251, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff82}', to: '\u{ff82}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{ff83}', to: '\u{ff83}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff84}', to: '\u{ff84}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff85}', to: '\u{ff85}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff86}', to: '\u{ff86}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff87}', to: '\u{ff87}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff88}', to: '\u{ff88}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff89}', to: '\u{ff89}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff8a}', to: '\u{ff8a}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff8b}', to: '\u{ff8b}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff8c}', to: '\u{ff8c}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff8d}', to: '\u{ff8d}', mapping: Mapped(StringTableSlice { byte_start_lo: 31, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff8e}', to: '\u{ff8e}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff8f}', to: '\u{ff8f}', mapping: Mapped(StringTableSlice { byte_start_lo: 37, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff90}', to: '\u{ff90}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff91}', to: '\u{ff91}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff92}', to: '\u{ff92}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff93}', to: '\u{ff93}', mapping: Mapped(StringTableSlice { byte_start_lo: 49, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff94}', to: '\u{ff94}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff95}', to: '\u{ff95}', mapping: Mapped(StringTableSlice { byte_start_lo: 55, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff96}', to: '\u{ff96}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff97}', to: '\u{ff97}', mapping: Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff98}', to: '\u{ff98}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff99}', to: '\u{ff99}', mapping: Mapped(StringTableSlice { byte_start_lo: 67, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff9a}', to: '\u{ff9a}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff9b}', to: '\u{ff9b}', mapping: Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff9c}', to: '\u{ff9c}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 18, byte_len: 3 }) },
++    Range { from: '\u{ff9d}', to: '\u{ff9d}', mapping: Mapped(StringTableSlice { byte_start_lo: 105, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ff9e}', to: '\u{ff9e}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ff9f}', to: '\u{ff9f}', mapping: Mapped(StringTableSlice { byte_start_lo: 111, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ffa0}', to: '\u{ffa0}', mapping: Disallowed },
++    Range { from: '\u{ffa1}', to: '\u{ffa1}', mapping: Mapped(StringTableSlice { byte_start_lo: 35, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffa2}', to: '\u{ffa2}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffa3}', to: '\u{ffa3}', mapping: Mapped(StringTableSlice { byte_start_lo: 41, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffa4}', to: '\u{ffa4}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffa5}', to: '\u{ffa5}', mapping: Mapped(StringTableSlice { byte_start_lo: 47, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffa6}', to: '\u{ffa6}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffa7}', to: '\u{ffa7}', mapping: Mapped(StringTableSlice { byte_start_lo: 53, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffa8}', to: '\u{ffa8}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffa9}', to: '\u{ffa9}', mapping: Mapped(StringTableSlice { byte_start_lo: 59, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffaa}', to: '\u{ffaa}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffab}', to: '\u{ffab}', mapping: Mapped(StringTableSlice { byte_start_lo: 65, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffac}', to: '\u{ffac}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffad}', to: '\u{ffad}', mapping: Mapped(StringTableSlice { byte_start_lo: 71, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffae}', to: '\u{ffae}', mapping: Mapped(StringTableSlice { byte_start_lo: 74, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffaf}', to: '\u{ffaf}', mapping: Mapped(StringTableSlice { byte_start_lo: 77, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffb0}', to: '\u{ffb0}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffb1}', to: '\u{ffb1}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffb2}', to: '\u{ffb2}', mapping: Mapped(StringTableSlice { byte_start_lo: 86, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffb3}', to: '\u{ffb3}', mapping: Mapped(StringTableSlice { byte_start_lo: 89, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffb4}', to: '\u{ffb4}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffb5}', to: '\u{ffb5}', mapping: Mapped(StringTableSlice { byte_start_lo: 95, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffb6}', to: '\u{ffb6}', mapping: Mapped(StringTableSlice { byte_start_lo: 98, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffb7}', to: '\u{ffb7}', mapping: Mapped(StringTableSlice { byte_start_lo: 101, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffb8}', to: '\u{ffb8}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffb9}', to: '\u{ffb9}', mapping: Mapped(StringTableSlice { byte_start_lo: 107, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffba}', to: '\u{ffba}', mapping: Mapped(StringTableSlice { byte_start_lo: 110, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffbb}', to: '\u{ffbb}', mapping: Mapped(StringTableSlice { byte_start_lo: 113, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffbc}', to: '\u{ffbc}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffbd}', to: '\u{ffbd}', mapping: Mapped(StringTableSlice { byte_start_lo: 119, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffbe}', to: '\u{ffbe}', mapping: Mapped(StringTableSlice { byte_start_lo: 122, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffbf}', to: '\u{ffc1}', mapping: Disallowed },
++    Range { from: '\u{ffc2}', to: '\u{ffc2}', mapping: Mapped(StringTableSlice { byte_start_lo: 125, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffc3}', to: '\u{ffc3}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffc4}', to: '\u{ffc4}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffc5}', to: '\u{ffc5}', mapping: Mapped(StringTableSlice { byte_start_lo: 134, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffc6}', to: '\u{ffc6}', mapping: Mapped(StringTableSlice { byte_start_lo: 137, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffc7}', to: '\u{ffc7}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffc8}', to: '\u{ffc9}', mapping: Disallowed },
++    Range { from: '\u{ffca}', to: '\u{ffca}', mapping: Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffcb}', to: '\u{ffcb}', mapping: Mapped(StringTableSlice { byte_start_lo: 146, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffcc}', to: '\u{ffcc}', mapping: Mapped(StringTableSlice { byte_start_lo: 149, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffcd}', to: '\u{ffcd}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffce}', to: '\u{ffce}', mapping: Mapped(StringTableSlice { byte_start_lo: 155, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffcf}', to: '\u{ffcf}', mapping: Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffd0}', to: '\u{ffd1}', mapping: Disallowed },
++    Range { from: '\u{ffd2}', to: '\u{ffd2}', mapping: Mapped(StringTableSlice { byte_start_lo: 161, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffd3}', to: '\u{ffd3}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffd4}', to: '\u{ffd4}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffd5}', to: '\u{ffd5}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffd6}', to: '\u{ffd6}', mapping: Mapped(StringTableSlice { byte_start_lo: 173, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffd7}', to: '\u{ffd7}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffd8}', to: '\u{ffd9}', mapping: Disallowed },
++    Range { from: '\u{ffda}', to: '\u{ffda}', mapping: Mapped(StringTableSlice { byte_start_lo: 179, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffdb}', to: '\u{ffdb}', mapping: Mapped(StringTableSlice { byte_start_lo: 182, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffdc}', to: '\u{ffdc}', mapping: Mapped(StringTableSlice { byte_start_lo: 185, byte_start_hi: 14, byte_len: 3 }) },
++    Range { from: '\u{ffdd}', to: '\u{ffdf}', mapping: Disallowed },
++    Range { from: '\u{ffe0}', to: '\u{ffe0}', mapping: Mapped(StringTableSlice { byte_start_lo: 114, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{ffe1}', to: '\u{ffe1}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{ffe2}', to: '\u{ffe2}', mapping: Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{ffe3}', to: '\u{ffe3}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 0, byte_len: 3 }) },
++    Range { from: '\u{ffe4}', to: '\u{ffe4}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{ffe5}', to: '\u{ffe5}', mapping: Mapped(StringTableSlice { byte_start_lo: 122, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{ffe6}', to: '\u{ffe6}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ffe7}', to: '\u{ffe7}', mapping: Disallowed },
++    Range { from: '\u{ffe8}', to: '\u{ffe8}', mapping: Mapped(StringTableSlice { byte_start_lo: 127, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ffe9}', to: '\u{ffe9}', mapping: Mapped(StringTableSlice { byte_start_lo: 130, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ffea}', to: '\u{ffea}', mapping: Mapped(StringTableSlice { byte_start_lo: 133, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ffeb}', to: '\u{ffeb}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ffec}', to: '\u{ffec}', mapping: Mapped(StringTableSlice { byte_start_lo: 139, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ffed}', to: '\u{ffed}', mapping: Mapped(StringTableSlice { byte_start_lo: 142, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ffee}', to: '\u{ffee}', mapping: Mapped(StringTableSlice { byte_start_lo: 145, byte_start_hi: 38, byte_len: 3 }) },
++    Range { from: '\u{ffef}', to: '\u{ffff}', mapping: Disallowed },
++    Range { from: '\u{10000}', to: '\u{1000b}', mapping: Valid },
++    Range { from: '\u{1000c}', to: '\u{1000c}', mapping: Disallowed },
++    Range { from: '\u{1000d}', to: '\u{10026}', mapping: Valid },
++    Range { from: '\u{10027}', to: '\u{10027}', mapping: Disallowed },
++    Range { from: '\u{10028}', to: '\u{1003a}', mapping: Valid },
++    Range { from: '\u{1003b}', to: '\u{1003b}', mapping: Disallowed },
++    Range { from: '\u{1003c}', to: '\u{1003d}', mapping: Valid },
++    Range { from: '\u{1003e}', to: '\u{1003e}', mapping: Disallowed },
++    Range { from: '\u{1003f}', to: '\u{1004d}', mapping: Valid },
++    Range { from: '\u{1004e}', to: '\u{1004f}', mapping: Disallowed },
++    Range { from: '\u{10050}', to: '\u{1005d}', mapping: Valid },
++    Range { from: '\u{1005e}', to: '\u{1007f}', mapping: Disallowed },
++    Range { from: '\u{10080}', to: '\u{100fa}', mapping: Valid },
++    Range { from: '\u{100fb}', to: '\u{100ff}', mapping: Disallowed },
++    Range { from: '\u{10100}', to: '\u{10102}', mapping: Valid },
++    Range { from: '\u{10103}', to: '\u{10106}', mapping: Disallowed },
++    Range { from: '\u{10107}', to: '\u{10133}', mapping: Valid },
++    Range { from: '\u{10134}', to: '\u{10136}', mapping: Disallowed },
++    Range { from: '\u{10137}', to: '\u{1018e}', mapping: Valid },
++    Range { from: '\u{1018f}', to: '\u{1018f}', mapping: Disallowed },
++    Range { from: '\u{10190}', to: '\u{1019b}', mapping: Valid },
++    Range { from: '\u{1019c}', to: '\u{1019f}', mapping: Disallowed },
++    Range { from: '\u{101a0}', to: '\u{101a0}', mapping: Valid },
++    Range { from: '\u{101a1}', to: '\u{101cf}', mapping: Disallowed },
++    Range { from: '\u{101d0}', to: '\u{101fd}', mapping: Valid },
++    Range { from: '\u{101fe}', to: '\u{1027f}', mapping: Disallowed },
++    Range { from: '\u{10280}', to: '\u{1029c}', mapping: Valid },
++    Range { from: '\u{1029d}', to: '\u{1029f}', mapping: Disallowed },
++    Range { from: '\u{102a0}', to: '\u{102d0}', mapping: Valid },
++    Range { from: '\u{102d1}', to: '\u{102df}', mapping: Disallowed },
++    Range { from: '\u{102e0}', to: '\u{102fb}', mapping: Valid },
++    Range { from: '\u{102fc}', to: '\u{102ff}', mapping: Disallowed },
++    Range { from: '\u{10300}', to: '\u{10323}', mapping: Valid },
++    Range { from: '\u{10324}', to: '\u{1032c}', mapping: Disallowed },
++    Range { from: '\u{1032d}', to: '\u{1034a}', mapping: Valid },
++    Range { from: '\u{1034b}', to: '\u{1034f}', mapping: Disallowed },
++    Range { from: '\u{10350}', to: '\u{1037a}', mapping: Valid },
++    Range { from: '\u{1037b}', to: '\u{1037f}', mapping: Disallowed },
++    Range { from: '\u{10380}', to: '\u{1039d}', mapping: Valid },
++    Range { from: '\u{1039e}', to: '\u{1039e}', mapping: Disallowed },
++    Range { from: '\u{1039f}', to: '\u{103c3}', mapping: Valid },
++    Range { from: '\u{103c4}', to: '\u{103c7}', mapping: Disallowed },
++    Range { from: '\u{103c8}', to: '\u{103d5}', mapping: Valid },
++    Range { from: '\u{103d6}', to: '\u{103ff}', mapping: Disallowed },
++    Range { from: '\u{10400}', to: '\u{10400}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10401}', to: '\u{10401}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10402}', to: '\u{10402}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10403}', to: '\u{10403}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10404}', to: '\u{10404}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10405}', to: '\u{10405}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10406}', to: '\u{10406}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10407}', to: '\u{10407}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10408}', to: '\u{10408}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10409}', to: '\u{10409}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{1040a}', to: '\u{1040a}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{1040b}', to: '\u{1040b}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{1040c}', to: '\u{1040c}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{1040d}', to: '\u{1040d}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{1040e}', to: '\u{1040e}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{1040f}', to: '\u{1040f}', mapping: Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10410}', to: '\u{10410}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10411}', to: '\u{10411}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10412}', to: '\u{10412}', mapping: Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10413}', to: '\u{10413}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10414}', to: '\u{10414}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10415}', to: '\u{10415}', mapping: Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10416}', to: '\u{10416}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10417}', to: '\u{10417}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10418}', to: '\u{10418}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{10419}', to: '\u{10419}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{1041a}', to: '\u{1041a}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 38, byte_len: 4 }) },
++    Range { from: '\u{1041b}', to: '\u{1041b}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{1041c}', to: '\u{1041c}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{1041d}', to: '\u{1041d}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{1041e}', to: '\u{1041e}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{1041f}', to: '\u{1041f}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10420}', to: '\u{10420}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10421}', to: '\u{10421}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10422}', to: '\u{10422}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10423}', to: '\u{10423}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10424}', to: '\u{10424}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10425}', to: '\u{10425}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10426}', to: '\u{10426}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10427}', to: '\u{10427}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10428}', to: '\u{1049d}', mapping: Valid },
++    Range { from: '\u{1049e}', to: '\u{1049f}', mapping: Disallowed },
++    Range { from: '\u{104a0}', to: '\u{104a9}', mapping: Valid },
++    Range { from: '\u{104aa}', to: '\u{104af}', mapping: Disallowed },
++    Range { from: '\u{104b0}', to: '\u{104b0}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104b1}', to: '\u{104b1}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104b2}', to: '\u{104b2}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104b3}', to: '\u{104b3}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104b4}', to: '\u{104b4}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104b5}', to: '\u{104b5}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104b6}', to: '\u{104b6}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104b7}', to: '\u{104b7}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104b8}', to: '\u{104b8}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104b9}', to: '\u{104b9}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104ba}', to: '\u{104ba}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104bb}', to: '\u{104bb}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104bc}', to: '\u{104bc}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104bd}', to: '\u{104bd}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104be}', to: '\u{104be}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104bf}', to: '\u{104bf}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104c0}', to: '\u{104c0}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104c1}', to: '\u{104c1}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104c2}', to: '\u{104c2}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104c3}', to: '\u{104c3}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104c4}', to: '\u{104c4}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104c5}', to: '\u{104c5}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104c6}', to: '\u{104c6}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104c7}', to: '\u{104c7}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104c8}', to: '\u{104c8}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104c9}', to: '\u{104c9}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104ca}', to: '\u{104ca}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104cb}', to: '\u{104cb}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104cc}', to: '\u{104cc}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104cd}', to: '\u{104cd}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104ce}', to: '\u{104ce}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104cf}', to: '\u{104cf}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104d0}', to: '\u{104d0}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104d1}', to: '\u{104d1}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104d2}', to: '\u{104d2}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104d3}', to: '\u{104d3}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{104d4}', to: '\u{104d7}', mapping: Disallowed },
++    Range { from: '\u{104d8}', to: '\u{104fb}', mapping: Valid },
++    Range { from: '\u{104fc}', to: '\u{104ff}', mapping: Disallowed },
++    Range { from: '\u{10500}', to: '\u{10527}', mapping: Valid },
++    Range { from: '\u{10528}', to: '\u{1052f}', mapping: Disallowed },
++    Range { from: '\u{10530}', to: '\u{10563}', mapping: Valid },
++    Range { from: '\u{10564}', to: '\u{1056e}', mapping: Disallowed },
++    Range { from: '\u{1056f}', to: '\u{1056f}', mapping: Valid },
++    Range { from: '\u{10570}', to: '\u{105ff}', mapping: Disallowed },
++    Range { from: '\u{10600}', to: '\u{10736}', mapping: Valid },
++    Range { from: '\u{10737}', to: '\u{1073f}', mapping: Disallowed },
++    Range { from: '\u{10740}', to: '\u{10755}', mapping: Valid },
++    Range { from: '\u{10756}', to: '\u{1075f}', mapping: Disallowed },
++    Range { from: '\u{10760}', to: '\u{10767}', mapping: Valid },
++    Range { from: '\u{10768}', to: '\u{107ff}', mapping: Disallowed },
++    Range { from: '\u{10800}', to: '\u{10805}', mapping: Valid },
++    Range { from: '\u{10806}', to: '\u{10807}', mapping: Disallowed },
++    Range { from: '\u{10808}', to: '\u{10808}', mapping: Valid },
++    Range { from: '\u{10809}', to: '\u{10809}', mapping: Disallowed },
++    Range { from: '\u{1080a}', to: '\u{10835}', mapping: Valid },
++    Range { from: '\u{10836}', to: '\u{10836}', mapping: Disallowed },
++    Range { from: '\u{10837}', to: '\u{10838}', mapping: Valid },
++    Range { from: '\u{10839}', to: '\u{1083b}', mapping: Disallowed },
++    Range { from: '\u{1083c}', to: '\u{1083c}', mapping: Valid },
++    Range { from: '\u{1083d}', to: '\u{1083e}', mapping: Disallowed },
++    Range { from: '\u{1083f}', to: '\u{10855}', mapping: Valid },
++    Range { from: '\u{10856}', to: '\u{10856}', mapping: Disallowed },
++    Range { from: '\u{10857}', to: '\u{1089e}', mapping: Valid },
++    Range { from: '\u{1089f}', to: '\u{108a6}', mapping: Disallowed },
++    Range { from: '\u{108a7}', to: '\u{108af}', mapping: Valid },
++    Range { from: '\u{108b0}', to: '\u{108df}', mapping: Disallowed },
++    Range { from: '\u{108e0}', to: '\u{108f2}', mapping: Valid },
++    Range { from: '\u{108f3}', to: '\u{108f3}', mapping: Disallowed },
++    Range { from: '\u{108f4}', to: '\u{108f5}', mapping: Valid },
++    Range { from: '\u{108f6}', to: '\u{108fa}', mapping: Disallowed },
++    Range { from: '\u{108fb}', to: '\u{1091b}', mapping: Valid },
++    Range { from: '\u{1091c}', to: '\u{1091e}', mapping: Disallowed },
++    Range { from: '\u{1091f}', to: '\u{10939}', mapping: Valid },
++    Range { from: '\u{1093a}', to: '\u{1093e}', mapping: Disallowed },
++    Range { from: '\u{1093f}', to: '\u{1093f}', mapping: Valid },
++    Range { from: '\u{10940}', to: '\u{1097f}', mapping: Disallowed },
++    Range { from: '\u{10980}', to: '\u{109b7}', mapping: Valid },
++    Range { from: '\u{109b8}', to: '\u{109bb}', mapping: Disallowed },
++    Range { from: '\u{109bc}', to: '\u{109cf}', mapping: Valid },
++    Range { from: '\u{109d0}', to: '\u{109d1}', mapping: Disallowed },
++    Range { from: '\u{109d2}', to: '\u{10a03}', mapping: Valid },
++    Range { from: '\u{10a04}', to: '\u{10a04}', mapping: Disallowed },
++    Range { from: '\u{10a05}', to: '\u{10a06}', mapping: Valid },
++    Range { from: '\u{10a07}', to: '\u{10a0b}', mapping: Disallowed },
++    Range { from: '\u{10a0c}', to: '\u{10a13}', mapping: Valid },
++    Range { from: '\u{10a14}', to: '\u{10a14}', mapping: Disallowed },
++    Range { from: '\u{10a15}', to: '\u{10a17}', mapping: Valid },
++    Range { from: '\u{10a18}', to: '\u{10a18}', mapping: Disallowed },
++    Range { from: '\u{10a19}', to: '\u{10a33}', mapping: Valid },
++    Range { from: '\u{10a34}', to: '\u{10a37}', mapping: Disallowed },
++    Range { from: '\u{10a38}', to: '\u{10a3a}', mapping: Valid },
++    Range { from: '\u{10a3b}', to: '\u{10a3e}', mapping: Disallowed },
++    Range { from: '\u{10a3f}', to: '\u{10a47}', mapping: Valid },
++    Range { from: '\u{10a48}', to: '\u{10a4f}', mapping: Disallowed },
++    Range { from: '\u{10a50}', to: '\u{10a58}', mapping: Valid },
++    Range { from: '\u{10a59}', to: '\u{10a5f}', mapping: Disallowed },
++    Range { from: '\u{10a60}', to: '\u{10a9f}', mapping: Valid },
++    Range { from: '\u{10aa0}', to: '\u{10abf}', mapping: Disallowed },
++    Range { from: '\u{10ac0}', to: '\u{10ae6}', mapping: Valid },
++    Range { from: '\u{10ae7}', to: '\u{10aea}', mapping: Disallowed },
++    Range { from: '\u{10aeb}', to: '\u{10af6}', mapping: Valid },
++    Range { from: '\u{10af7}', to: '\u{10aff}', mapping: Disallowed },
++    Range { from: '\u{10b00}', to: '\u{10b35}', mapping: Valid },
++    Range { from: '\u{10b36}', to: '\u{10b38}', mapping: Disallowed },
++    Range { from: '\u{10b39}', to: '\u{10b55}', mapping: Valid },
++    Range { from: '\u{10b56}', to: '\u{10b57}', mapping: Disallowed },
++    Range { from: '\u{10b58}', to: '\u{10b72}', mapping: Valid },
++    Range { from: '\u{10b73}', to: '\u{10b77}', mapping: Disallowed },
++    Range { from: '\u{10b78}', to: '\u{10b91}', mapping: Valid },
++    Range { from: '\u{10b92}', to: '\u{10b98}', mapping: Disallowed },
++    Range { from: '\u{10b99}', to: '\u{10b9c}', mapping: Valid },
++    Range { from: '\u{10b9d}', to: '\u{10ba8}', mapping: Disallowed },
++    Range { from: '\u{10ba9}', to: '\u{10baf}', mapping: Valid },
++    Range { from: '\u{10bb0}', to: '\u{10bff}', mapping: Disallowed },
++    Range { from: '\u{10c00}', to: '\u{10c48}', mapping: Valid },
++    Range { from: '\u{10c49}', to: '\u{10c7f}', mapping: Disallowed },
++    Range { from: '\u{10c80}', to: '\u{10c80}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10c81}', to: '\u{10c81}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10c82}', to: '\u{10c82}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10c83}', to: '\u{10c83}', mapping: Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10c84}', to: '\u{10c84}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10c85}', to: '\u{10c85}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10c86}', to: '\u{10c86}', mapping: Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10c87}', to: '\u{10c87}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10c88}', to: '\u{10c88}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10c89}', to: '\u{10c89}', mapping: Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10c8a}', to: '\u{10c8a}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10c8b}', to: '\u{10c8b}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10c8c}', to: '\u{10c8c}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10c8d}', to: '\u{10c8d}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10c8e}', to: '\u{10c8e}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 39, byte_len: 4 }) },
++    Range { from: '\u{10c8f}', to: '\u{10c8f}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10c90}', to: '\u{10c90}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10c91}', to: '\u{10c91}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10c92}', to: '\u{10c92}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10c93}', to: '\u{10c93}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10c94}', to: '\u{10c94}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10c95}', to: '\u{10c95}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10c96}', to: '\u{10c96}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10c97}', to: '\u{10c97}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10c98}', to: '\u{10c98}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10c99}', to: '\u{10c99}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10c9a}', to: '\u{10c9a}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10c9b}', to: '\u{10c9b}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10c9c}', to: '\u{10c9c}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10c9d}', to: '\u{10c9d}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10c9e}', to: '\u{10c9e}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10c9f}', to: '\u{10c9f}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10ca0}', to: '\u{10ca0}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10ca1}', to: '\u{10ca1}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10ca2}', to: '\u{10ca2}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10ca3}', to: '\u{10ca3}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10ca4}', to: '\u{10ca4}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10ca5}', to: '\u{10ca5}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10ca6}', to: '\u{10ca6}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10ca7}', to: '\u{10ca7}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10ca8}', to: '\u{10ca8}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10ca9}', to: '\u{10ca9}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10caa}', to: '\u{10caa}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10cab}', to: '\u{10cab}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10cac}', to: '\u{10cac}', mapping: Mapped(StringTableSlice { byte_start_lo: 116, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10cad}', to: '\u{10cad}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10cae}', to: '\u{10cae}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10caf}', to: '\u{10caf}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10cb0}', to: '\u{10cb0}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10cb1}', to: '\u{10cb1}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10cb2}', to: '\u{10cb2}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{10cb3}', to: '\u{10cbf}', mapping: Disallowed },
++    Range { from: '\u{10cc0}', to: '\u{10cf2}', mapping: Valid },
++    Range { from: '\u{10cf3}', to: '\u{10cf9}', mapping: Disallowed },
++    Range { from: '\u{10cfa}', to: '\u{10cff}', mapping: Valid },
++    Range { from: '\u{10d00}', to: '\u{10e5f}', mapping: Disallowed },
++    Range { from: '\u{10e60}', to: '\u{10e7e}', mapping: Valid },
++    Range { from: '\u{10e7f}', to: '\u{10fff}', mapping: Disallowed },
++    Range { from: '\u{11000}', to: '\u{1104d}', mapping: Valid },
++    Range { from: '\u{1104e}', to: '\u{11051}', mapping: Disallowed },
++    Range { from: '\u{11052}', to: '\u{1106f}', mapping: Valid },
++    Range { from: '\u{11070}', to: '\u{1107e}', mapping: Disallowed },
++    Range { from: '\u{1107f}', to: '\u{110bc}', mapping: Valid },
++    Range { from: '\u{110bd}', to: '\u{110bd}', mapping: Disallowed },
++    Range { from: '\u{110be}', to: '\u{110c1}', mapping: Valid },
++    Range { from: '\u{110c2}', to: '\u{110cf}', mapping: Disallowed },
++    Range { from: '\u{110d0}', to: '\u{110e8}', mapping: Valid },
++    Range { from: '\u{110e9}', to: '\u{110ef}', mapping: Disallowed },
++    Range { from: '\u{110f0}', to: '\u{110f9}', mapping: Valid },
++    Range { from: '\u{110fa}', to: '\u{110ff}', mapping: Disallowed },
++    Range { from: '\u{11100}', to: '\u{11134}', mapping: Valid },
++    Range { from: '\u{11135}', to: '\u{11135}', mapping: Disallowed },
++    Range { from: '\u{11136}', to: '\u{11143}', mapping: Valid },
++    Range { from: '\u{11144}', to: '\u{1114f}', mapping: Disallowed },
++    Range { from: '\u{11150}', to: '\u{11176}', mapping: Valid },
++    Range { from: '\u{11177}', to: '\u{1117f}', mapping: Disallowed },
++    Range { from: '\u{11180}', to: '\u{111cd}', mapping: Valid },
++    Range { from: '\u{111ce}', to: '\u{111cf}', mapping: Disallowed },
++    Range { from: '\u{111d0}', to: '\u{111df}', mapping: Valid },
++    Range { from: '\u{111e0}', to: '\u{111e0}', mapping: Disallowed },
++    Range { from: '\u{111e1}', to: '\u{111f4}', mapping: Valid },
++    Range { from: '\u{111f5}', to: '\u{111ff}', mapping: Disallowed },
++    Range { from: '\u{11200}', to: '\u{11211}', mapping: Valid },
++    Range { from: '\u{11212}', to: '\u{11212}', mapping: Disallowed },
++    Range { from: '\u{11213}', to: '\u{1123e}', mapping: Valid },
++    Range { from: '\u{1123f}', to: '\u{1127f}', mapping: Disallowed },
++    Range { from: '\u{11280}', to: '\u{11286}', mapping: Valid },
++    Range { from: '\u{11287}', to: '\u{11287}', mapping: Disallowed },
++    Range { from: '\u{11288}', to: '\u{11288}', mapping: Valid },
++    Range { from: '\u{11289}', to: '\u{11289}', mapping: Disallowed },
++    Range { from: '\u{1128a}', to: '\u{1128d}', mapping: Valid },
++    Range { from: '\u{1128e}', to: '\u{1128e}', mapping: Disallowed },
++    Range { from: '\u{1128f}', to: '\u{1129d}', mapping: Valid },
++    Range { from: '\u{1129e}', to: '\u{1129e}', mapping: Disallowed },
++    Range { from: '\u{1129f}', to: '\u{112a9}', mapping: Valid },
++    Range { from: '\u{112aa}', to: '\u{112af}', mapping: Disallowed },
++    Range { from: '\u{112b0}', to: '\u{112ea}', mapping: Valid },
++    Range { from: '\u{112eb}', to: '\u{112ef}', mapping: Disallowed },
++    Range { from: '\u{112f0}', to: '\u{112f9}', mapping: Valid },
++    Range { from: '\u{112fa}', to: '\u{112ff}', mapping: Disallowed },
++    Range { from: '\u{11300}', to: '\u{11303}', mapping: Valid },
++    Range { from: '\u{11304}', to: '\u{11304}', mapping: Disallowed },
++    Range { from: '\u{11305}', to: '\u{1130c}', mapping: Valid },
++    Range { from: '\u{1130d}', to: '\u{1130e}', mapping: Disallowed },
++    Range { from: '\u{1130f}', to: '\u{11310}', mapping: Valid },
++    Range { from: '\u{11311}', to: '\u{11312}', mapping: Disallowed },
++    Range { from: '\u{11313}', to: '\u{11328}', mapping: Valid },
++    Range { from: '\u{11329}', to: '\u{11329}', mapping: Disallowed },
++    Range { from: '\u{1132a}', to: '\u{11330}', mapping: Valid },
++    Range { from: '\u{11331}', to: '\u{11331}', mapping: Disallowed },
++    Range { from: '\u{11332}', to: '\u{11333}', mapping: Valid },
++    Range { from: '\u{11334}', to: '\u{11334}', mapping: Disallowed },
++    Range { from: '\u{11335}', to: '\u{11339}', mapping: Valid },
++    Range { from: '\u{1133a}', to: '\u{1133b}', mapping: Disallowed },
++    Range { from: '\u{1133c}', to: '\u{11344}', mapping: Valid },
++    Range { from: '\u{11345}', to: '\u{11346}', mapping: Disallowed },
++    Range { from: '\u{11347}', to: '\u{11348}', mapping: Valid },
++    Range { from: '\u{11349}', to: '\u{1134a}', mapping: Disallowed },
++    Range { from: '\u{1134b}', to: '\u{1134d}', mapping: Valid },
++    Range { from: '\u{1134e}', to: '\u{1134f}', mapping: Disallowed },
++    Range { from: '\u{11350}', to: '\u{11350}', mapping: Valid },
++    Range { from: '\u{11351}', to: '\u{11356}', mapping: Disallowed },
++    Range { from: '\u{11357}', to: '\u{11357}', mapping: Valid },
++    Range { from: '\u{11358}', to: '\u{1135c}', mapping: Disallowed },
++    Range { from: '\u{1135d}', to: '\u{11363}', mapping: Valid },
++    Range { from: '\u{11364}', to: '\u{11365}', mapping: Disallowed },
++    Range { from: '\u{11366}', to: '\u{1136c}', mapping: Valid },
++    Range { from: '\u{1136d}', to: '\u{1136f}', mapping: Disallowed },
++    Range { from: '\u{11370}', to: '\u{11374}', mapping: Valid },
++    Range { from: '\u{11375}', to: '\u{113ff}', mapping: Disallowed },
++    Range { from: '\u{11400}', to: '\u{11459}', mapping: Valid },
++    Range { from: '\u{1145a}', to: '\u{1145a}', mapping: Disallowed },
++    Range { from: '\u{1145b}', to: '\u{1145b}', mapping: Valid },
++    Range { from: '\u{1145c}', to: '\u{1145c}', mapping: Disallowed },
++    Range { from: '\u{1145d}', to: '\u{1145d}', mapping: Valid },
++    Range { from: '\u{1145e}', to: '\u{1147f}', mapping: Disallowed },
++    Range { from: '\u{11480}', to: '\u{114c7}', mapping: Valid },
++    Range { from: '\u{114c8}', to: '\u{114cf}', mapping: Disallowed },
++    Range { from: '\u{114d0}', to: '\u{114d9}', mapping: Valid },
++    Range { from: '\u{114da}', to: '\u{1157f}', mapping: Disallowed },
++    Range { from: '\u{11580}', to: '\u{115b5}', mapping: Valid },
++    Range { from: '\u{115b6}', to: '\u{115b7}', mapping: Disallowed },
++    Range { from: '\u{115b8}', to: '\u{115dd}', mapping: Valid },
++    Range { from: '\u{115de}', to: '\u{115ff}', mapping: Disallowed },
++    Range { from: '\u{11600}', to: '\u{11644}', mapping: Valid },
++    Range { from: '\u{11645}', to: '\u{1164f}', mapping: Disallowed },
++    Range { from: '\u{11650}', to: '\u{11659}', mapping: Valid },
++    Range { from: '\u{1165a}', to: '\u{1165f}', mapping: Disallowed },
++    Range { from: '\u{11660}', to: '\u{1166c}', mapping: Valid },
++    Range { from: '\u{1166d}', to: '\u{1167f}', mapping: Disallowed },
++    Range { from: '\u{11680}', to: '\u{116b7}', mapping: Valid },
++    Range { from: '\u{116b8}', to: '\u{116bf}', mapping: Disallowed },
++    Range { from: '\u{116c0}', to: '\u{116c9}', mapping: Valid },
++    Range { from: '\u{116ca}', to: '\u{116ff}', mapping: Disallowed },
++    Range { from: '\u{11700}', to: '\u{11719}', mapping: Valid },
++    Range { from: '\u{1171a}', to: '\u{1171c}', mapping: Disallowed },
++    Range { from: '\u{1171d}', to: '\u{1172b}', mapping: Valid },
++    Range { from: '\u{1172c}', to: '\u{1172f}', mapping: Disallowed },
++    Range { from: '\u{11730}', to: '\u{1173f}', mapping: Valid },
++    Range { from: '\u{11740}', to: '\u{1189f}', mapping: Disallowed },
++    Range { from: '\u{118a0}', to: '\u{118a0}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118a1}', to: '\u{118a1}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118a2}', to: '\u{118a2}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118a3}', to: '\u{118a3}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118a4}', to: '\u{118a4}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118a5}', to: '\u{118a5}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118a6}', to: '\u{118a6}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118a7}', to: '\u{118a7}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118a8}', to: '\u{118a8}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118a9}', to: '\u{118a9}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118aa}', to: '\u{118aa}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118ab}', to: '\u{118ab}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118ac}', to: '\u{118ac}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118ad}', to: '\u{118ad}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118ae}', to: '\u{118ae}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118af}', to: '\u{118af}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118b0}', to: '\u{118b0}', mapping: Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118b1}', to: '\u{118b1}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118b2}', to: '\u{118b2}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118b3}', to: '\u{118b3}', mapping: Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118b4}', to: '\u{118b4}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118b5}', to: '\u{118b5}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118b6}', to: '\u{118b6}', mapping: Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118b7}', to: '\u{118b7}', mapping: Mapped(StringTableSlice { byte_start_lo: 236, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118b8}', to: '\u{118b8}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118b9}', to: '\u{118b9}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118ba}', to: '\u{118ba}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118bb}', to: '\u{118bb}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 40, byte_len: 4 }) },
++    Range { from: '\u{118bc}', to: '\u{118bc}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{118bd}', to: '\u{118bd}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{118be}', to: '\u{118be}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{118bf}', to: '\u{118bf}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{118c0}', to: '\u{118f2}', mapping: Valid },
++    Range { from: '\u{118f3}', to: '\u{118fe}', mapping: Disallowed },
++    Range { from: '\u{118ff}', to: '\u{118ff}', mapping: Valid },
++    Range { from: '\u{11900}', to: '\u{119ff}', mapping: Disallowed },
++    Range { from: '\u{11a00}', to: '\u{11a47}', mapping: Valid },
++    Range { from: '\u{11a48}', to: '\u{11a4f}', mapping: Disallowed },
++    Range { from: '\u{11a50}', to: '\u{11a83}', mapping: Valid },
++    Range { from: '\u{11a84}', to: '\u{11a85}', mapping: Disallowed },
++    Range { from: '\u{11a86}', to: '\u{11a9c}', mapping: Valid },
++    Range { from: '\u{11a9d}', to: '\u{11a9d}', mapping: Disallowed },
++    Range { from: '\u{11a9e}', to: '\u{11aa2}', mapping: Valid },
++    Range { from: '\u{11aa3}', to: '\u{11abf}', mapping: Disallowed },
++    Range { from: '\u{11ac0}', to: '\u{11af8}', mapping: Valid },
++    Range { from: '\u{11af9}', to: '\u{11bff}', mapping: Disallowed },
++    Range { from: '\u{11c00}', to: '\u{11c08}', mapping: Valid },
++    Range { from: '\u{11c09}', to: '\u{11c09}', mapping: Disallowed },
++    Range { from: '\u{11c0a}', to: '\u{11c36}', mapping: Valid },
++    Range { from: '\u{11c37}', to: '\u{11c37}', mapping: Disallowed },
++    Range { from: '\u{11c38}', to: '\u{11c45}', mapping: Valid },
++    Range { from: '\u{11c46}', to: '\u{11c4f}', mapping: Disallowed },
++    Range { from: '\u{11c50}', to: '\u{11c6c}', mapping: Valid },
++    Range { from: '\u{11c6d}', to: '\u{11c6f}', mapping: Disallowed },
++    Range { from: '\u{11c70}', to: '\u{11c8f}', mapping: Valid },
++    Range { from: '\u{11c90}', to: '\u{11c91}', mapping: Disallowed },
++    Range { from: '\u{11c92}', to: '\u{11ca7}', mapping: Valid },
++    Range { from: '\u{11ca8}', to: '\u{11ca8}', mapping: Disallowed },
++    Range { from: '\u{11ca9}', to: '\u{11cb6}', mapping: Valid },
++    Range { from: '\u{11cb7}', to: '\u{11cff}', mapping: Disallowed },
++    Range { from: '\u{11d00}', to: '\u{11d06}', mapping: Valid },
++    Range { from: '\u{11d07}', to: '\u{11d07}', mapping: Disallowed },
++    Range { from: '\u{11d08}', to: '\u{11d09}', mapping: Valid },
++    Range { from: '\u{11d0a}', to: '\u{11d0a}', mapping: Disallowed },
++    Range { from: '\u{11d0b}', to: '\u{11d36}', mapping: Valid },
++    Range { from: '\u{11d37}', to: '\u{11d39}', mapping: Disallowed },
++    Range { from: '\u{11d3a}', to: '\u{11d3a}', mapping: Valid },
++    Range { from: '\u{11d3b}', to: '\u{11d3b}', mapping: Disallowed },
++    Range { from: '\u{11d3c}', to: '\u{11d3d}', mapping: Valid },
++    Range { from: '\u{11d3e}', to: '\u{11d3e}', mapping: Disallowed },
++    Range { from: '\u{11d3f}', to: '\u{11d47}', mapping: Valid },
++    Range { from: '\u{11d48}', to: '\u{11d4f}', mapping: Disallowed },
++    Range { from: '\u{11d50}', to: '\u{11d59}', mapping: Valid },
++    Range { from: '\u{11d5a}', to: '\u{11fff}', mapping: Disallowed },
++    Range { from: '\u{12000}', to: '\u{12399}', mapping: Valid },
++    Range { from: '\u{1239a}', to: '\u{123ff}', mapping: Disallowed },
++    Range { from: '\u{12400}', to: '\u{1246e}', mapping: Valid },
++    Range { from: '\u{1246f}', to: '\u{1246f}', mapping: Disallowed },
++    Range { from: '\u{12470}', to: '\u{12474}', mapping: Valid },
++    Range { from: '\u{12475}', to: '\u{1247f}', mapping: Disallowed },
++    Range { from: '\u{12480}', to: '\u{12543}', mapping: Valid },
++    Range { from: '\u{12544}', to: '\u{12fff}', mapping: Disallowed },
++    Range { from: '\u{13000}', to: '\u{1342e}', mapping: Valid },
++    Range { from: '\u{1342f}', to: '\u{143ff}', mapping: Disallowed },
++    Range { from: '\u{14400}', to: '\u{14646}', mapping: Valid },
++    Range { from: '\u{14647}', to: '\u{167ff}', mapping: Disallowed },
++    Range { from: '\u{16800}', to: '\u{16a38}', mapping: Valid },
++    Range { from: '\u{16a39}', to: '\u{16a3f}', mapping: Disallowed },
++    Range { from: '\u{16a40}', to: '\u{16a5e}', mapping: Valid },
++    Range { from: '\u{16a5f}', to: '\u{16a5f}', mapping: Disallowed },
++    Range { from: '\u{16a60}', to: '\u{16a69}', mapping: Valid },
++    Range { from: '\u{16a6a}', to: '\u{16a6d}', mapping: Disallowed },
++    Range { from: '\u{16a6e}', to: '\u{16a6f}', mapping: Valid },
++    Range { from: '\u{16a70}', to: '\u{16acf}', mapping: Disallowed },
++    Range { from: '\u{16ad0}', to: '\u{16aed}', mapping: Valid },
++    Range { from: '\u{16aee}', to: '\u{16aef}', mapping: Disallowed },
++    Range { from: '\u{16af0}', to: '\u{16af5}', mapping: Valid },
++    Range { from: '\u{16af6}', to: '\u{16aff}', mapping: Disallowed },
++    Range { from: '\u{16b00}', to: '\u{16b45}', mapping: Valid },
++    Range { from: '\u{16b46}', to: '\u{16b4f}', mapping: Disallowed },
++    Range { from: '\u{16b50}', to: '\u{16b59}', mapping: Valid },
++    Range { from: '\u{16b5a}', to: '\u{16b5a}', mapping: Disallowed },
++    Range { from: '\u{16b5b}', to: '\u{16b61}', mapping: Valid },
++    Range { from: '\u{16b62}', to: '\u{16b62}', mapping: Disallowed },
++    Range { from: '\u{16b63}', to: '\u{16b77}', mapping: Valid },
++    Range { from: '\u{16b78}', to: '\u{16b7c}', mapping: Disallowed },
++    Range { from: '\u{16b7d}', to: '\u{16b8f}', mapping: Valid },
++    Range { from: '\u{16b90}', to: '\u{16eff}', mapping: Disallowed },
++    Range { from: '\u{16f00}', to: '\u{16f44}', mapping: Valid },
++    Range { from: '\u{16f45}', to: '\u{16f4f}', mapping: Disallowed },
++    Range { from: '\u{16f50}', to: '\u{16f7e}', mapping: Valid },
++    Range { from: '\u{16f7f}', to: '\u{16f8e}', mapping: Disallowed },
++    Range { from: '\u{16f8f}', to: '\u{16f9f}', mapping: Valid },
++    Range { from: '\u{16fa0}', to: '\u{16fdf}', mapping: Disallowed },
++    Range { from: '\u{16fe0}', to: '\u{16fe1}', mapping: Valid },
++    Range { from: '\u{16fe2}', to: '\u{16fff}', mapping: Disallowed },
++    Range { from: '\u{17000}', to: '\u{187ec}', mapping: Valid },
++    Range { from: '\u{187ed}', to: '\u{187ff}', mapping: Disallowed },
++    Range { from: '\u{18800}', to: '\u{18af2}', mapping: Valid },
++    Range { from: '\u{18af3}', to: '\u{1afff}', mapping: Disallowed },
++    Range { from: '\u{1b000}', to: '\u{1b11e}', mapping: Valid },
++    Range { from: '\u{1b11f}', to: '\u{1b16f}', mapping: Disallowed },
++    Range { from: '\u{1b170}', to: '\u{1b2fb}', mapping: Valid },
++    Range { from: '\u{1b2fc}', to: '\u{1bbff}', mapping: Disallowed },
++    Range { from: '\u{1bc00}', to: '\u{1bc6a}', mapping: Valid },
++    Range { from: '\u{1bc6b}', to: '\u{1bc6f}', mapping: Disallowed },
++    Range { from: '\u{1bc70}', to: '\u{1bc7c}', mapping: Valid },
++    Range { from: '\u{1bc7d}', to: '\u{1bc7f}', mapping: Disallowed },
++    Range { from: '\u{1bc80}', to: '\u{1bc88}', mapping: Valid },
++    Range { from: '\u{1bc89}', to: '\u{1bc8f}', mapping: Disallowed },
++    Range { from: '\u{1bc90}', to: '\u{1bc99}', mapping: Valid },
++    Range { from: '\u{1bc9a}', to: '\u{1bc9b}', mapping: Disallowed },
++    Range { from: '\u{1bc9c}', to: '\u{1bc9f}', mapping: Valid },
++    Range { from: '\u{1bca0}', to: '\u{1bca3}', mapping: Ignored },
++    Range { from: '\u{1bca4}', to: '\u{1cfff}', mapping: Disallowed },
++    Range { from: '\u{1d000}', to: '\u{1d0f5}', mapping: Valid },
++    Range { from: '\u{1d0f6}', to: '\u{1d0ff}', mapping: Disallowed },
++    Range { from: '\u{1d100}', to: '\u{1d126}', mapping: Valid },
++    Range { from: '\u{1d127}', to: '\u{1d128}', mapping: Disallowed },
++    Range { from: '\u{1d129}', to: '\u{1d15d}', mapping: Valid },
++    Range { from: '\u{1d15e}', to: '\u{1d15e}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 41, byte_len: 8 }) },
++    Range { from: '\u{1d15f}', to: '\u{1d15f}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 41, byte_len: 8 }) },
++    Range { from: '\u{1d160}', to: '\u{1d160}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 41, byte_len: 12 }) },
++    Range { from: '\u{1d161}', to: '\u{1d161}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 41, byte_len: 12 }) },
++    Range { from: '\u{1d162}', to: '\u{1d162}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 41, byte_len: 12 }) },
++    Range { from: '\u{1d163}', to: '\u{1d163}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 41, byte_len: 12 }) },
++    Range { from: '\u{1d164}', to: '\u{1d164}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 41, byte_len: 12 }) },
++    Range { from: '\u{1d165}', to: '\u{1d172}', mapping: Valid },
++    Range { from: '\u{1d173}', to: '\u{1d17a}', mapping: Disallowed },
++    Range { from: '\u{1d17b}', to: '\u{1d1ba}', mapping: Valid },
++    Range { from: '\u{1d1bb}', to: '\u{1d1bb}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 41, byte_len: 8 }) },
++    Range { from: '\u{1d1bc}', to: '\u{1d1bc}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 41, byte_len: 8 }) },
++    Range { from: '\u{1d1bd}', to: '\u{1d1bd}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 41, byte_len: 12 }) },
++    Range { from: '\u{1d1be}', to: '\u{1d1be}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 41, byte_len: 12 }) },
++    Range { from: '\u{1d1bf}', to: '\u{1d1bf}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 41, byte_len: 12 }) },
++    Range { from: '\u{1d1c0}', to: '\u{1d1c0}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 41, byte_len: 12 }) },
++    Range { from: '\u{1d1c1}', to: '\u{1d1e8}', mapping: Valid },
++    Range { from: '\u{1d1e9}', to: '\u{1d1ff}', mapping: Disallowed },
++    Range { from: '\u{1d200}', to: '\u{1d245}', mapping: Valid },
++    Range { from: '\u{1d246}', to: '\u{1d2ff}', mapping: Disallowed },
++    Range { from: '\u{1d300}', to: '\u{1d356}', mapping: Valid },
++    Range { from: '\u{1d357}', to: '\u{1d35f}', mapping: Disallowed },
++    Range { from: '\u{1d360}', to: '\u{1d371}', mapping: Valid },
++    Range { from: '\u{1d372}', to: '\u{1d3ff}', mapping: Disallowed },
++    Range { from: '\u{1d400}', to: '\u{1d400}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d401}', to: '\u{1d401}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d402}', to: '\u{1d402}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d403}', to: '\u{1d403}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d404}', to: '\u{1d404}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d405}', to: '\u{1d405}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d406}', to: '\u{1d406}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d407}', to: '\u{1d407}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d408}', to: '\u{1d408}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d409}', to: '\u{1d409}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d40a}', to: '\u{1d40a}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d40b}', to: '\u{1d40b}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d40c}', to: '\u{1d40c}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d40d}', to: '\u{1d40d}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d40e}', to: '\u{1d40e}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d40f}', to: '\u{1d40f}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d410}', to: '\u{1d410}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d411}', to: '\u{1d411}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d412}', to: '\u{1d412}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d413}', to: '\u{1d413}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d414}', to: '\u{1d414}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d415}', to: '\u{1d415}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d416}', to: '\u{1d416}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d417}', to: '\u{1d417}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d418}', to: '\u{1d418}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d419}', to: '\u{1d419}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d41a}', to: '\u{1d41a}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d41b}', to: '\u{1d41b}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d41c}', to: '\u{1d41c}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d41d}', to: '\u{1d41d}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d41e}', to: '\u{1d41e}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d41f}', to: '\u{1d41f}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d420}', to: '\u{1d420}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d421}', to: '\u{1d421}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d422}', to: '\u{1d422}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d423}', to: '\u{1d423}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d424}', to: '\u{1d424}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d425}', to: '\u{1d425}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d426}', to: '\u{1d426}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d427}', to: '\u{1d427}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d428}', to: '\u{1d428}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d429}', to: '\u{1d429}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d42a}', to: '\u{1d42a}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d42b}', to: '\u{1d42b}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d42c}', to: '\u{1d42c}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d42d}', to: '\u{1d42d}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d42e}', to: '\u{1d42e}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d42f}', to: '\u{1d42f}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d430}', to: '\u{1d430}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d431}', to: '\u{1d431}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d432}', to: '\u{1d432}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d433}', to: '\u{1d433}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d434}', to: '\u{1d434}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d435}', to: '\u{1d435}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d436}', to: '\u{1d436}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d437}', to: '\u{1d437}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d438}', to: '\u{1d438}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d439}', to: '\u{1d439}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d43a}', to: '\u{1d43a}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d43b}', to: '\u{1d43b}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d43c}', to: '\u{1d43c}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d43d}', to: '\u{1d43d}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d43e}', to: '\u{1d43e}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d43f}', to: '\u{1d43f}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d440}', to: '\u{1d440}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d441}', to: '\u{1d441}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d442}', to: '\u{1d442}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d443}', to: '\u{1d443}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d444}', to: '\u{1d444}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d445}', to: '\u{1d445}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d446}', to: '\u{1d446}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d447}', to: '\u{1d447}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d448}', to: '\u{1d448}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d449}', to: '\u{1d449}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d44a}', to: '\u{1d44a}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d44b}', to: '\u{1d44b}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d44c}', to: '\u{1d44c}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d44d}', to: '\u{1d44d}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d44e}', to: '\u{1d44e}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d44f}', to: '\u{1d44f}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d450}', to: '\u{1d450}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d451}', to: '\u{1d451}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d452}', to: '\u{1d452}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d453}', to: '\u{1d453}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d454}', to: '\u{1d454}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d455}', to: '\u{1d455}', mapping: Disallowed },
++    Range { from: '\u{1d456}', to: '\u{1d456}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d457}', to: '\u{1d457}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d458}', to: '\u{1d458}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d459}', to: '\u{1d459}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d45a}', to: '\u{1d45a}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d45b}', to: '\u{1d45b}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d45c}', to: '\u{1d45c}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d45d}', to: '\u{1d45d}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d45e}', to: '\u{1d45e}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d45f}', to: '\u{1d45f}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d460}', to: '\u{1d460}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d461}', to: '\u{1d461}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d462}', to: '\u{1d462}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d463}', to: '\u{1d463}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d464}', to: '\u{1d464}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d465}', to: '\u{1d465}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d466}', to: '\u{1d466}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d467}', to: '\u{1d467}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d468}', to: '\u{1d468}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d469}', to: '\u{1d469}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d46a}', to: '\u{1d46a}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d46b}', to: '\u{1d46b}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d46c}', to: '\u{1d46c}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d46d}', to: '\u{1d46d}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d46e}', to: '\u{1d46e}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d46f}', to: '\u{1d46f}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d470}', to: '\u{1d470}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d471}', to: '\u{1d471}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d472}', to: '\u{1d472}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d473}', to: '\u{1d473}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d474}', to: '\u{1d474}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d475}', to: '\u{1d475}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d476}', to: '\u{1d476}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d477}', to: '\u{1d477}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d478}', to: '\u{1d478}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d479}', to: '\u{1d479}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d47a}', to: '\u{1d47a}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d47b}', to: '\u{1d47b}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d47c}', to: '\u{1d47c}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d47d}', to: '\u{1d47d}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d47e}', to: '\u{1d47e}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d47f}', to: '\u{1d47f}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d480}', to: '\u{1d480}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d481}', to: '\u{1d481}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d482}', to: '\u{1d482}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d483}', to: '\u{1d483}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d484}', to: '\u{1d484}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d485}', to: '\u{1d485}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d486}', to: '\u{1d486}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d487}', to: '\u{1d487}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d488}', to: '\u{1d488}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d489}', to: '\u{1d489}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d48a}', to: '\u{1d48a}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d48b}', to: '\u{1d48b}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d48c}', to: '\u{1d48c}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d48d}', to: '\u{1d48d}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d48e}', to: '\u{1d48e}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d48f}', to: '\u{1d48f}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d490}', to: '\u{1d490}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d491}', to: '\u{1d491}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d492}', to: '\u{1d492}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d493}', to: '\u{1d493}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d494}', to: '\u{1d494}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d495}', to: '\u{1d495}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d496}', to: '\u{1d496}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d497}', to: '\u{1d497}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d498}', to: '\u{1d498}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d499}', to: '\u{1d499}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d49a}', to: '\u{1d49a}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d49b}', to: '\u{1d49b}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d49c}', to: '\u{1d49c}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d49d}', to: '\u{1d49d}', mapping: Disallowed },
++    Range { from: '\u{1d49e}', to: '\u{1d49e}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d49f}', to: '\u{1d49f}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4a0}', to: '\u{1d4a1}', mapping: Disallowed },
++    Range { from: '\u{1d4a2}', to: '\u{1d4a2}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4a3}', to: '\u{1d4a4}', mapping: Disallowed },
++    Range { from: '\u{1d4a5}', to: '\u{1d4a5}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4a6}', to: '\u{1d4a6}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4a7}', to: '\u{1d4a8}', mapping: Disallowed },
++    Range { from: '\u{1d4a9}', to: '\u{1d4a9}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4aa}', to: '\u{1d4aa}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4ab}', to: '\u{1d4ab}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4ac}', to: '\u{1d4ac}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4ad}', to: '\u{1d4ad}', mapping: Disallowed },
++    Range { from: '\u{1d4ae}', to: '\u{1d4ae}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4af}', to: '\u{1d4af}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4b0}', to: '\u{1d4b0}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4b1}', to: '\u{1d4b1}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4b2}', to: '\u{1d4b2}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4b3}', to: '\u{1d4b3}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4b4}', to: '\u{1d4b4}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4b5}', to: '\u{1d4b5}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4b6}', to: '\u{1d4b6}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4b7}', to: '\u{1d4b7}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4b8}', to: '\u{1d4b8}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4b9}', to: '\u{1d4b9}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4ba}', to: '\u{1d4ba}', mapping: Disallowed },
++    Range { from: '\u{1d4bb}', to: '\u{1d4bb}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4bc}', to: '\u{1d4bc}', mapping: Disallowed },
++    Range { from: '\u{1d4bd}', to: '\u{1d4bd}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4be}', to: '\u{1d4be}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4bf}', to: '\u{1d4bf}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4c0}', to: '\u{1d4c0}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4c1}', to: '\u{1d4c1}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4c2}', to: '\u{1d4c2}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4c3}', to: '\u{1d4c3}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4c4}', to: '\u{1d4c4}', mapping: Disallowed },
++    Range { from: '\u{1d4c5}', to: '\u{1d4c5}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4c6}', to: '\u{1d4c6}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4c7}', to: '\u{1d4c7}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4c8}', to: '\u{1d4c8}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4c9}', to: '\u{1d4c9}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4ca}', to: '\u{1d4ca}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4cb}', to: '\u{1d4cb}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4cc}', to: '\u{1d4cc}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4cd}', to: '\u{1d4cd}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4ce}', to: '\u{1d4ce}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4cf}', to: '\u{1d4cf}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4d0}', to: '\u{1d4d0}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4d1}', to: '\u{1d4d1}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4d2}', to: '\u{1d4d2}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4d3}', to: '\u{1d4d3}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4d4}', to: '\u{1d4d4}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4d5}', to: '\u{1d4d5}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4d6}', to: '\u{1d4d6}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4d7}', to: '\u{1d4d7}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4d8}', to: '\u{1d4d8}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4d9}', to: '\u{1d4d9}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4da}', to: '\u{1d4da}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4db}', to: '\u{1d4db}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4dc}', to: '\u{1d4dc}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4dd}', to: '\u{1d4dd}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4de}', to: '\u{1d4de}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4df}', to: '\u{1d4df}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4e0}', to: '\u{1d4e0}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4e1}', to: '\u{1d4e1}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4e2}', to: '\u{1d4e2}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4e3}', to: '\u{1d4e3}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4e4}', to: '\u{1d4e4}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4e5}', to: '\u{1d4e5}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4e6}', to: '\u{1d4e6}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4e7}', to: '\u{1d4e7}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4e8}', to: '\u{1d4e8}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4e9}', to: '\u{1d4e9}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4ea}', to: '\u{1d4ea}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4eb}', to: '\u{1d4eb}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4ec}', to: '\u{1d4ec}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4ed}', to: '\u{1d4ed}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4ee}', to: '\u{1d4ee}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4ef}', to: '\u{1d4ef}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4f0}', to: '\u{1d4f0}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4f1}', to: '\u{1d4f1}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4f2}', to: '\u{1d4f2}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4f3}', to: '\u{1d4f3}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4f4}', to: '\u{1d4f4}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4f5}', to: '\u{1d4f5}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4f6}', to: '\u{1d4f6}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4f7}', to: '\u{1d4f7}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4f8}', to: '\u{1d4f8}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4f9}', to: '\u{1d4f9}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4fa}', to: '\u{1d4fa}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4fb}', to: '\u{1d4fb}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4fc}', to: '\u{1d4fc}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4fd}', to: '\u{1d4fd}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4fe}', to: '\u{1d4fe}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d4ff}', to: '\u{1d4ff}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d500}', to: '\u{1d500}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d501}', to: '\u{1d501}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d502}', to: '\u{1d502}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d503}', to: '\u{1d503}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d504}', to: '\u{1d504}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d505}', to: '\u{1d505}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d506}', to: '\u{1d506}', mapping: Disallowed },
++    Range { from: '\u{1d507}', to: '\u{1d507}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d508}', to: '\u{1d508}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d509}', to: '\u{1d509}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d50a}', to: '\u{1d50a}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d50b}', to: '\u{1d50c}', mapping: Disallowed },
++    Range { from: '\u{1d50d}', to: '\u{1d50d}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d50e}', to: '\u{1d50e}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d50f}', to: '\u{1d50f}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d510}', to: '\u{1d510}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d511}', to: '\u{1d511}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d512}', to: '\u{1d512}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d513}', to: '\u{1d513}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d514}', to: '\u{1d514}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d515}', to: '\u{1d515}', mapping: Disallowed },
++    Range { from: '\u{1d516}', to: '\u{1d516}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d517}', to: '\u{1d517}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d518}', to: '\u{1d518}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d519}', to: '\u{1d519}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d51a}', to: '\u{1d51a}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d51b}', to: '\u{1d51b}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d51c}', to: '\u{1d51c}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d51d}', to: '\u{1d51d}', mapping: Disallowed },
++    Range { from: '\u{1d51e}', to: '\u{1d51e}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d51f}', to: '\u{1d51f}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d520}', to: '\u{1d520}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d521}', to: '\u{1d521}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d522}', to: '\u{1d522}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d523}', to: '\u{1d523}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d524}', to: '\u{1d524}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d525}', to: '\u{1d525}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d526}', to: '\u{1d526}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d527}', to: '\u{1d527}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d528}', to: '\u{1d528}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d529}', to: '\u{1d529}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d52a}', to: '\u{1d52a}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d52b}', to: '\u{1d52b}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d52c}', to: '\u{1d52c}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d52d}', to: '\u{1d52d}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d52e}', to: '\u{1d52e}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d52f}', to: '\u{1d52f}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d530}', to: '\u{1d530}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d531}', to: '\u{1d531}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d532}', to: '\u{1d532}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d533}', to: '\u{1d533}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d534}', to: '\u{1d534}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d535}', to: '\u{1d535}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d536}', to: '\u{1d536}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d537}', to: '\u{1d537}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d538}', to: '\u{1d538}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d539}', to: '\u{1d539}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d53a}', to: '\u{1d53a}', mapping: Disallowed },
++    Range { from: '\u{1d53b}', to: '\u{1d53b}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d53c}', to: '\u{1d53c}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d53d}', to: '\u{1d53d}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d53e}', to: '\u{1d53e}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d53f}', to: '\u{1d53f}', mapping: Disallowed },
++    Range { from: '\u{1d540}', to: '\u{1d540}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d541}', to: '\u{1d541}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d542}', to: '\u{1d542}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d543}', to: '\u{1d543}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d544}', to: '\u{1d544}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d545}', to: '\u{1d545}', mapping: Disallowed },
++    Range { from: '\u{1d546}', to: '\u{1d546}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d547}', to: '\u{1d549}', mapping: Disallowed },
++    Range { from: '\u{1d54a}', to: '\u{1d54a}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d54b}', to: '\u{1d54b}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d54c}', to: '\u{1d54c}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d54d}', to: '\u{1d54d}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d54e}', to: '\u{1d54e}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d54f}', to: '\u{1d54f}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d550}', to: '\u{1d550}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d551}', to: '\u{1d551}', mapping: Disallowed },
++    Range { from: '\u{1d552}', to: '\u{1d552}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d553}', to: '\u{1d553}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d554}', to: '\u{1d554}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d555}', to: '\u{1d555}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d556}', to: '\u{1d556}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d557}', to: '\u{1d557}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d558}', to: '\u{1d558}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d559}', to: '\u{1d559}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d55a}', to: '\u{1d55a}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d55b}', to: '\u{1d55b}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d55c}', to: '\u{1d55c}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d55d}', to: '\u{1d55d}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d55e}', to: '\u{1d55e}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d55f}', to: '\u{1d55f}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d560}', to: '\u{1d560}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d561}', to: '\u{1d561}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d562}', to: '\u{1d562}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d563}', to: '\u{1d563}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d564}', to: '\u{1d564}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d565}', to: '\u{1d565}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d566}', to: '\u{1d566}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d567}', to: '\u{1d567}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d568}', to: '\u{1d568}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d569}', to: '\u{1d569}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d56a}', to: '\u{1d56a}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d56b}', to: '\u{1d56b}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d56c}', to: '\u{1d56c}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d56d}', to: '\u{1d56d}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d56e}', to: '\u{1d56e}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d56f}', to: '\u{1d56f}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d570}', to: '\u{1d570}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d571}', to: '\u{1d571}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d572}', to: '\u{1d572}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d573}', to: '\u{1d573}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d574}', to: '\u{1d574}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d575}', to: '\u{1d575}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d576}', to: '\u{1d576}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d577}', to: '\u{1d577}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d578}', to: '\u{1d578}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d579}', to: '\u{1d579}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d57a}', to: '\u{1d57a}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d57b}', to: '\u{1d57b}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d57c}', to: '\u{1d57c}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d57d}', to: '\u{1d57d}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d57e}', to: '\u{1d57e}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d57f}', to: '\u{1d57f}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d580}', to: '\u{1d580}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d581}', to: '\u{1d581}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d582}', to: '\u{1d582}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d583}', to: '\u{1d583}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d584}', to: '\u{1d584}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d585}', to: '\u{1d585}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d586}', to: '\u{1d586}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d587}', to: '\u{1d587}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d588}', to: '\u{1d588}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d589}', to: '\u{1d589}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d58a}', to: '\u{1d58a}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d58b}', to: '\u{1d58b}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d58c}', to: '\u{1d58c}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d58d}', to: '\u{1d58d}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d58e}', to: '\u{1d58e}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d58f}', to: '\u{1d58f}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d590}', to: '\u{1d590}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d591}', to: '\u{1d591}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d592}', to: '\u{1d592}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d593}', to: '\u{1d593}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d594}', to: '\u{1d594}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d595}', to: '\u{1d595}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d596}', to: '\u{1d596}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d597}', to: '\u{1d597}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d598}', to: '\u{1d598}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d599}', to: '\u{1d599}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d59a}', to: '\u{1d59a}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d59b}', to: '\u{1d59b}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d59c}', to: '\u{1d59c}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d59d}', to: '\u{1d59d}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d59e}', to: '\u{1d59e}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d59f}', to: '\u{1d59f}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5a0}', to: '\u{1d5a0}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5a1}', to: '\u{1d5a1}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5a2}', to: '\u{1d5a2}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5a3}', to: '\u{1d5a3}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5a4}', to: '\u{1d5a4}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5a5}', to: '\u{1d5a5}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5a6}', to: '\u{1d5a6}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5a7}', to: '\u{1d5a7}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5a8}', to: '\u{1d5a8}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5a9}', to: '\u{1d5a9}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5aa}', to: '\u{1d5aa}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5ab}', to: '\u{1d5ab}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5ac}', to: '\u{1d5ac}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5ad}', to: '\u{1d5ad}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5ae}', to: '\u{1d5ae}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5af}', to: '\u{1d5af}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5b0}', to: '\u{1d5b0}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5b1}', to: '\u{1d5b1}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5b2}', to: '\u{1d5b2}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5b3}', to: '\u{1d5b3}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5b4}', to: '\u{1d5b4}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5b5}', to: '\u{1d5b5}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5b6}', to: '\u{1d5b6}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5b7}', to: '\u{1d5b7}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5b8}', to: '\u{1d5b8}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5b9}', to: '\u{1d5b9}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5ba}', to: '\u{1d5ba}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5bb}', to: '\u{1d5bb}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5bc}', to: '\u{1d5bc}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5bd}', to: '\u{1d5bd}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5be}', to: '\u{1d5be}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5bf}', to: '\u{1d5bf}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5c0}', to: '\u{1d5c0}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5c1}', to: '\u{1d5c1}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5c2}', to: '\u{1d5c2}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5c3}', to: '\u{1d5c3}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5c4}', to: '\u{1d5c4}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5c5}', to: '\u{1d5c5}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5c6}', to: '\u{1d5c6}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5c7}', to: '\u{1d5c7}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5c8}', to: '\u{1d5c8}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5c9}', to: '\u{1d5c9}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5ca}', to: '\u{1d5ca}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5cb}', to: '\u{1d5cb}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5cc}', to: '\u{1d5cc}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5cd}', to: '\u{1d5cd}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5ce}', to: '\u{1d5ce}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5cf}', to: '\u{1d5cf}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5d0}', to: '\u{1d5d0}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5d1}', to: '\u{1d5d1}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5d2}', to: '\u{1d5d2}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5d3}', to: '\u{1d5d3}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5d4}', to: '\u{1d5d4}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5d5}', to: '\u{1d5d5}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5d6}', to: '\u{1d5d6}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5d7}', to: '\u{1d5d7}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5d8}', to: '\u{1d5d8}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5d9}', to: '\u{1d5d9}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5da}', to: '\u{1d5da}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5db}', to: '\u{1d5db}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5dc}', to: '\u{1d5dc}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5dd}', to: '\u{1d5dd}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5de}', to: '\u{1d5de}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5df}', to: '\u{1d5df}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5e0}', to: '\u{1d5e0}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5e1}', to: '\u{1d5e1}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5e2}', to: '\u{1d5e2}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5e3}', to: '\u{1d5e3}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5e4}', to: '\u{1d5e4}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5e5}', to: '\u{1d5e5}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5e6}', to: '\u{1d5e6}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5e7}', to: '\u{1d5e7}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5e8}', to: '\u{1d5e8}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5e9}', to: '\u{1d5e9}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5ea}', to: '\u{1d5ea}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5eb}', to: '\u{1d5eb}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5ec}', to: '\u{1d5ec}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5ed}', to: '\u{1d5ed}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5ee}', to: '\u{1d5ee}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5ef}', to: '\u{1d5ef}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5f0}', to: '\u{1d5f0}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5f1}', to: '\u{1d5f1}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5f2}', to: '\u{1d5f2}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5f3}', to: '\u{1d5f3}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5f4}', to: '\u{1d5f4}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5f5}', to: '\u{1d5f5}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5f6}', to: '\u{1d5f6}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5f7}', to: '\u{1d5f7}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5f8}', to: '\u{1d5f8}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5f9}', to: '\u{1d5f9}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5fa}', to: '\u{1d5fa}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5fb}', to: '\u{1d5fb}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5fc}', to: '\u{1d5fc}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5fd}', to: '\u{1d5fd}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5fe}', to: '\u{1d5fe}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d5ff}', to: '\u{1d5ff}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d600}', to: '\u{1d600}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d601}', to: '\u{1d601}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d602}', to: '\u{1d602}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d603}', to: '\u{1d603}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d604}', to: '\u{1d604}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d605}', to: '\u{1d605}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d606}', to: '\u{1d606}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d607}', to: '\u{1d607}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d608}', to: '\u{1d608}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d609}', to: '\u{1d609}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d60a}', to: '\u{1d60a}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d60b}', to: '\u{1d60b}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d60c}', to: '\u{1d60c}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d60d}', to: '\u{1d60d}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d60e}', to: '\u{1d60e}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d60f}', to: '\u{1d60f}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d610}', to: '\u{1d610}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d611}', to: '\u{1d611}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d612}', to: '\u{1d612}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d613}', to: '\u{1d613}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d614}', to: '\u{1d614}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d615}', to: '\u{1d615}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d616}', to: '\u{1d616}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d617}', to: '\u{1d617}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d618}', to: '\u{1d618}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d619}', to: '\u{1d619}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d61a}', to: '\u{1d61a}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d61b}', to: '\u{1d61b}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d61c}', to: '\u{1d61c}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d61d}', to: '\u{1d61d}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d61e}', to: '\u{1d61e}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d61f}', to: '\u{1d61f}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d620}', to: '\u{1d620}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d621}', to: '\u{1d621}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d622}', to: '\u{1d622}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d623}', to: '\u{1d623}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d624}', to: '\u{1d624}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d625}', to: '\u{1d625}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d626}', to: '\u{1d626}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d627}', to: '\u{1d627}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d628}', to: '\u{1d628}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d629}', to: '\u{1d629}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d62a}', to: '\u{1d62a}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d62b}', to: '\u{1d62b}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d62c}', to: '\u{1d62c}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d62d}', to: '\u{1d62d}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d62e}', to: '\u{1d62e}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d62f}', to: '\u{1d62f}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d630}', to: '\u{1d630}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d631}', to: '\u{1d631}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d632}', to: '\u{1d632}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d633}', to: '\u{1d633}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d634}', to: '\u{1d634}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d635}', to: '\u{1d635}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d636}', to: '\u{1d636}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d637}', to: '\u{1d637}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d638}', to: '\u{1d638}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d639}', to: '\u{1d639}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d63a}', to: '\u{1d63a}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d63b}', to: '\u{1d63b}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d63c}', to: '\u{1d63c}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d63d}', to: '\u{1d63d}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d63e}', to: '\u{1d63e}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d63f}', to: '\u{1d63f}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d640}', to: '\u{1d640}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d641}', to: '\u{1d641}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d642}', to: '\u{1d642}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d643}', to: '\u{1d643}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d644}', to: '\u{1d644}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d645}', to: '\u{1d645}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d646}', to: '\u{1d646}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d647}', to: '\u{1d647}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d648}', to: '\u{1d648}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d649}', to: '\u{1d649}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d64a}', to: '\u{1d64a}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d64b}', to: '\u{1d64b}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d64c}', to: '\u{1d64c}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d64d}', to: '\u{1d64d}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d64e}', to: '\u{1d64e}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d64f}', to: '\u{1d64f}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d650}', to: '\u{1d650}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d651}', to: '\u{1d651}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d652}', to: '\u{1d652}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d653}', to: '\u{1d653}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d654}', to: '\u{1d654}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d655}', to: '\u{1d655}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d656}', to: '\u{1d656}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d657}', to: '\u{1d657}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d658}', to: '\u{1d658}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d659}', to: '\u{1d659}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d65a}', to: '\u{1d65a}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d65b}', to: '\u{1d65b}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d65c}', to: '\u{1d65c}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d65d}', to: '\u{1d65d}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d65e}', to: '\u{1d65e}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d65f}', to: '\u{1d65f}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d660}', to: '\u{1d660}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d661}', to: '\u{1d661}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d662}', to: '\u{1d662}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d663}', to: '\u{1d663}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d664}', to: '\u{1d664}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d665}', to: '\u{1d665}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d666}', to: '\u{1d666}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d667}', to: '\u{1d667}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d668}', to: '\u{1d668}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d669}', to: '\u{1d669}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d66a}', to: '\u{1d66a}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d66b}', to: '\u{1d66b}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d66c}', to: '\u{1d66c}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d66d}', to: '\u{1d66d}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d66e}', to: '\u{1d66e}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d66f}', to: '\u{1d66f}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d670}', to: '\u{1d670}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d671}', to: '\u{1d671}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d672}', to: '\u{1d672}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d673}', to: '\u{1d673}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d674}', to: '\u{1d674}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d675}', to: '\u{1d675}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d676}', to: '\u{1d676}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d677}', to: '\u{1d677}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d678}', to: '\u{1d678}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d679}', to: '\u{1d679}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d67a}', to: '\u{1d67a}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d67b}', to: '\u{1d67b}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d67c}', to: '\u{1d67c}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d67d}', to: '\u{1d67d}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d67e}', to: '\u{1d67e}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d67f}', to: '\u{1d67f}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d680}', to: '\u{1d680}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d681}', to: '\u{1d681}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d682}', to: '\u{1d682}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d683}', to: '\u{1d683}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d684}', to: '\u{1d684}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d685}', to: '\u{1d685}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d686}', to: '\u{1d686}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d687}', to: '\u{1d687}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d688}', to: '\u{1d688}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d689}', to: '\u{1d689}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d68a}', to: '\u{1d68a}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d68b}', to: '\u{1d68b}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d68c}', to: '\u{1d68c}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d68d}', to: '\u{1d68d}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d68e}', to: '\u{1d68e}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d68f}', to: '\u{1d68f}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d690}', to: '\u{1d690}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d691}', to: '\u{1d691}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d692}', to: '\u{1d692}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d693}', to: '\u{1d693}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d694}', to: '\u{1d694}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d695}', to: '\u{1d695}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d696}', to: '\u{1d696}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d697}', to: '\u{1d697}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d698}', to: '\u{1d698}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d699}', to: '\u{1d699}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d69a}', to: '\u{1d69a}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d69b}', to: '\u{1d69b}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d69c}', to: '\u{1d69c}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d69d}', to: '\u{1d69d}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d69e}', to: '\u{1d69e}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d69f}', to: '\u{1d69f}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d6a0}', to: '\u{1d6a0}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d6a1}', to: '\u{1d6a1}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d6a2}', to: '\u{1d6a2}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d6a3}', to: '\u{1d6a3}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d6a4}', to: '\u{1d6a4}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 41, byte_len: 2 }) },
++    Range { from: '\u{1d6a5}', to: '\u{1d6a5}', mapping: Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 41, byte_len: 2 }) },
++    Range { from: '\u{1d6a6}', to: '\u{1d6a7}', mapping: Disallowed },
++    Range { from: '\u{1d6a8}', to: '\u{1d6a8}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6a9}', to: '\u{1d6a9}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6aa}', to: '\u{1d6aa}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6ab}', to: '\u{1d6ab}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6ac}', to: '\u{1d6ac}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6ad}', to: '\u{1d6ad}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6ae}', to: '\u{1d6ae}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6af}', to: '\u{1d6af}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6b0}', to: '\u{1d6b0}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d6b1}', to: '\u{1d6b1}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6b2}', to: '\u{1d6b2}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6b3}', to: '\u{1d6b3}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{1d6b4}', to: '\u{1d6b4}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6b5}', to: '\u{1d6b5}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6b6}', to: '\u{1d6b6}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6b7}', to: '\u{1d6b7}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6b8}', to: '\u{1d6b8}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6b9}', to: '\u{1d6b9}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6ba}', to: '\u{1d6ba}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6bb}', to: '\u{1d6bb}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6bc}', to: '\u{1d6bc}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6bd}', to: '\u{1d6bd}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6be}', to: '\u{1d6be}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6bf}', to: '\u{1d6bf}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6c0}', to: '\u{1d6c0}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6c1}', to: '\u{1d6c1}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 41, byte_len: 3 }) },
++    Range { from: '\u{1d6c2}', to: '\u{1d6c2}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6c3}', to: '\u{1d6c3}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6c4}', to: '\u{1d6c4}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6c5}', to: '\u{1d6c5}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6c6}', to: '\u{1d6c6}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6c7}', to: '\u{1d6c7}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6c8}', to: '\u{1d6c8}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6c9}', to: '\u{1d6c9}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6ca}', to: '\u{1d6ca}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d6cb}', to: '\u{1d6cb}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6cc}', to: '\u{1d6cc}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6cd}', to: '\u{1d6cd}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{1d6ce}', to: '\u{1d6ce}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6cf}', to: '\u{1d6cf}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6d0}', to: '\u{1d6d0}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6d1}', to: '\u{1d6d1}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6d2}', to: '\u{1d6d2}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6d3}', to: '\u{1d6d4}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6d5}', to: '\u{1d6d5}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6d6}', to: '\u{1d6d6}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6d7}', to: '\u{1d6d7}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6d8}', to: '\u{1d6d8}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6d9}', to: '\u{1d6d9}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6da}', to: '\u{1d6da}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6db}', to: '\u{1d6db}', mapping: Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 41, byte_len: 3 }) },
++    Range { from: '\u{1d6dc}', to: '\u{1d6dc}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6dd}', to: '\u{1d6dd}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6de}', to: '\u{1d6de}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6df}', to: '\u{1d6df}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6e0}', to: '\u{1d6e0}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6e1}', to: '\u{1d6e1}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6e2}', to: '\u{1d6e2}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6e3}', to: '\u{1d6e3}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6e4}', to: '\u{1d6e4}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6e5}', to: '\u{1d6e5}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6e6}', to: '\u{1d6e6}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6e7}', to: '\u{1d6e7}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6e8}', to: '\u{1d6e8}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6e9}', to: '\u{1d6e9}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6ea}', to: '\u{1d6ea}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d6eb}', to: '\u{1d6eb}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6ec}', to: '\u{1d6ec}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6ed}', to: '\u{1d6ed}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{1d6ee}', to: '\u{1d6ee}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6ef}', to: '\u{1d6ef}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6f0}', to: '\u{1d6f0}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6f1}', to: '\u{1d6f1}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6f2}', to: '\u{1d6f2}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6f3}', to: '\u{1d6f3}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6f4}', to: '\u{1d6f4}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6f5}', to: '\u{1d6f5}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6f6}', to: '\u{1d6f6}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6f7}', to: '\u{1d6f7}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6f8}', to: '\u{1d6f8}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6f9}', to: '\u{1d6f9}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6fa}', to: '\u{1d6fa}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6fb}', to: '\u{1d6fb}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 41, byte_len: 3 }) },
++    Range { from: '\u{1d6fc}', to: '\u{1d6fc}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6fd}', to: '\u{1d6fd}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6fe}', to: '\u{1d6fe}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d6ff}', to: '\u{1d6ff}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d700}', to: '\u{1d700}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d701}', to: '\u{1d701}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d702}', to: '\u{1d702}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d703}', to: '\u{1d703}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d704}', to: '\u{1d704}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d705}', to: '\u{1d705}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d706}', to: '\u{1d706}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d707}', to: '\u{1d707}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{1d708}', to: '\u{1d708}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d709}', to: '\u{1d709}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d70a}', to: '\u{1d70a}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d70b}', to: '\u{1d70b}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d70c}', to: '\u{1d70c}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d70d}', to: '\u{1d70e}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d70f}', to: '\u{1d70f}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d710}', to: '\u{1d710}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d711}', to: '\u{1d711}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d712}', to: '\u{1d712}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d713}', to: '\u{1d713}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d714}', to: '\u{1d714}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d715}', to: '\u{1d715}', mapping: Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 41, byte_len: 3 }) },
++    Range { from: '\u{1d716}', to: '\u{1d716}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d717}', to: '\u{1d717}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d718}', to: '\u{1d718}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d719}', to: '\u{1d719}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d71a}', to: '\u{1d71a}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d71b}', to: '\u{1d71b}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d71c}', to: '\u{1d71c}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d71d}', to: '\u{1d71d}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d71e}', to: '\u{1d71e}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d71f}', to: '\u{1d71f}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d720}', to: '\u{1d720}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d721}', to: '\u{1d721}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d722}', to: '\u{1d722}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d723}', to: '\u{1d723}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d724}', to: '\u{1d724}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d725}', to: '\u{1d725}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d726}', to: '\u{1d726}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d727}', to: '\u{1d727}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{1d728}', to: '\u{1d728}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d729}', to: '\u{1d729}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d72a}', to: '\u{1d72a}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d72b}', to: '\u{1d72b}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d72c}', to: '\u{1d72c}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d72d}', to: '\u{1d72d}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d72e}', to: '\u{1d72e}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d72f}', to: '\u{1d72f}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d730}', to: '\u{1d730}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d731}', to: '\u{1d731}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d732}', to: '\u{1d732}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d733}', to: '\u{1d733}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d734}', to: '\u{1d734}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d735}', to: '\u{1d735}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 41, byte_len: 3 }) },
++    Range { from: '\u{1d736}', to: '\u{1d736}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d737}', to: '\u{1d737}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d738}', to: '\u{1d738}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d739}', to: '\u{1d739}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d73a}', to: '\u{1d73a}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d73b}', to: '\u{1d73b}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d73c}', to: '\u{1d73c}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d73d}', to: '\u{1d73d}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d73e}', to: '\u{1d73e}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d73f}', to: '\u{1d73f}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d740}', to: '\u{1d740}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d741}', to: '\u{1d741}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{1d742}', to: '\u{1d742}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d743}', to: '\u{1d743}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d744}', to: '\u{1d744}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d745}', to: '\u{1d745}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d746}', to: '\u{1d746}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d747}', to: '\u{1d748}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d749}', to: '\u{1d749}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d74a}', to: '\u{1d74a}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d74b}', to: '\u{1d74b}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d74c}', to: '\u{1d74c}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d74d}', to: '\u{1d74d}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d74e}', to: '\u{1d74e}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d74f}', to: '\u{1d74f}', mapping: Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 41, byte_len: 3 }) },
++    Range { from: '\u{1d750}', to: '\u{1d750}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d751}', to: '\u{1d751}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d752}', to: '\u{1d752}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d753}', to: '\u{1d753}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d754}', to: '\u{1d754}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d755}', to: '\u{1d755}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d756}', to: '\u{1d756}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d757}', to: '\u{1d757}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d758}', to: '\u{1d758}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d759}', to: '\u{1d759}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d75a}', to: '\u{1d75a}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d75b}', to: '\u{1d75b}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d75c}', to: '\u{1d75c}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d75d}', to: '\u{1d75d}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d75e}', to: '\u{1d75e}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d75f}', to: '\u{1d75f}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d760}', to: '\u{1d760}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d761}', to: '\u{1d761}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{1d762}', to: '\u{1d762}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d763}', to: '\u{1d763}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d764}', to: '\u{1d764}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d765}', to: '\u{1d765}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d766}', to: '\u{1d766}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d767}', to: '\u{1d767}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d768}', to: '\u{1d768}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d769}', to: '\u{1d769}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d76a}', to: '\u{1d76a}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d76b}', to: '\u{1d76b}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d76c}', to: '\u{1d76c}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d76d}', to: '\u{1d76d}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d76e}', to: '\u{1d76e}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d76f}', to: '\u{1d76f}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 41, byte_len: 3 }) },
++    Range { from: '\u{1d770}', to: '\u{1d770}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d771}', to: '\u{1d771}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d772}', to: '\u{1d772}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d773}', to: '\u{1d773}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d774}', to: '\u{1d774}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d775}', to: '\u{1d775}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d776}', to: '\u{1d776}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d777}', to: '\u{1d777}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d778}', to: '\u{1d778}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d779}', to: '\u{1d779}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d77a}', to: '\u{1d77a}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d77b}', to: '\u{1d77b}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{1d77c}', to: '\u{1d77c}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d77d}', to: '\u{1d77d}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d77e}', to: '\u{1d77e}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d77f}', to: '\u{1d77f}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d780}', to: '\u{1d780}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d781}', to: '\u{1d782}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d783}', to: '\u{1d783}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d784}', to: '\u{1d784}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d785}', to: '\u{1d785}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d786}', to: '\u{1d786}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d787}', to: '\u{1d787}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d788}', to: '\u{1d788}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d789}', to: '\u{1d789}', mapping: Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 41, byte_len: 3 }) },
++    Range { from: '\u{1d78a}', to: '\u{1d78a}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d78b}', to: '\u{1d78b}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d78c}', to: '\u{1d78c}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d78d}', to: '\u{1d78d}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d78e}', to: '\u{1d78e}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d78f}', to: '\u{1d78f}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d790}', to: '\u{1d790}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d791}', to: '\u{1d791}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d792}', to: '\u{1d792}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d793}', to: '\u{1d793}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d794}', to: '\u{1d794}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d795}', to: '\u{1d795}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d796}', to: '\u{1d796}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d797}', to: '\u{1d797}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d798}', to: '\u{1d798}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d799}', to: '\u{1d799}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d79a}', to: '\u{1d79a}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d79b}', to: '\u{1d79b}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{1d79c}', to: '\u{1d79c}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d79d}', to: '\u{1d79d}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d79e}', to: '\u{1d79e}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d79f}', to: '\u{1d79f}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7a0}', to: '\u{1d7a0}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7a1}', to: '\u{1d7a1}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7a2}', to: '\u{1d7a2}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7a3}', to: '\u{1d7a3}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7a4}', to: '\u{1d7a4}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7a5}', to: '\u{1d7a5}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7a6}', to: '\u{1d7a6}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7a7}', to: '\u{1d7a7}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7a8}', to: '\u{1d7a8}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7a9}', to: '\u{1d7a9}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 41, byte_len: 3 }) },
++    Range { from: '\u{1d7aa}', to: '\u{1d7aa}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7ab}', to: '\u{1d7ab}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7ac}', to: '\u{1d7ac}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7ad}', to: '\u{1d7ad}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7ae}', to: '\u{1d7ae}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7af}', to: '\u{1d7af}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7b0}', to: '\u{1d7b0}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7b1}', to: '\u{1d7b1}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7b2}', to: '\u{1d7b2}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 1, byte_len: 2 }) },
++    Range { from: '\u{1d7b3}', to: '\u{1d7b3}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7b4}', to: '\u{1d7b4}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7b5}', to: '\u{1d7b5}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{1d7b6}', to: '\u{1d7b6}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7b7}', to: '\u{1d7b7}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7b8}', to: '\u{1d7b8}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7b9}', to: '\u{1d7b9}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7ba}', to: '\u{1d7ba}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7bb}', to: '\u{1d7bc}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7bd}', to: '\u{1d7bd}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7be}', to: '\u{1d7be}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7bf}', to: '\u{1d7bf}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7c0}', to: '\u{1d7c0}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7c1}', to: '\u{1d7c1}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7c2}', to: '\u{1d7c2}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7c3}', to: '\u{1d7c3}', mapping: Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 41, byte_len: 3 }) },
++    Range { from: '\u{1d7c4}', to: '\u{1d7c4}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7c5}', to: '\u{1d7c5}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7c6}', to: '\u{1d7c6}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7c7}', to: '\u{1d7c7}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7c8}', to: '\u{1d7c8}', mapping: Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7c9}', to: '\u{1d7c9}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7ca}', to: '\u{1d7cb}', mapping: Mapped(StringTableSlice { byte_start_lo: 78, byte_start_hi: 2, byte_len: 2 }) },
++    Range { from: '\u{1d7cc}', to: '\u{1d7cd}', mapping: Disallowed },
++    Range { from: '\u{1d7ce}', to: '\u{1d7ce}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7cf}', to: '\u{1d7cf}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d7d0}', to: '\u{1d7d0}', mapping: Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d7d1}', to: '\u{1d7d1}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d7d2}', to: '\u{1d7d2}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7d3}', to: '\u{1d7d3}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7d4}', to: '\u{1d7d4}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7d5}', to: '\u{1d7d5}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7d6}', to: '\u{1d7d6}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7d7}', to: '\u{1d7d7}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7d8}', to: '\u{1d7d8}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7d9}', to: '\u{1d7d9}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d7da}', to: '\u{1d7da}', mapping: Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d7db}', to: '\u{1d7db}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d7dc}', to: '\u{1d7dc}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7dd}', to: '\u{1d7dd}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7de}', to: '\u{1d7de}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7df}', to: '\u{1d7df}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7e0}', to: '\u{1d7e0}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7e1}', to: '\u{1d7e1}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7e2}', to: '\u{1d7e2}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7e3}', to: '\u{1d7e3}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d7e4}', to: '\u{1d7e4}', mapping: Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d7e5}', to: '\u{1d7e5}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d7e6}', to: '\u{1d7e6}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7e7}', to: '\u{1d7e7}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7e8}', to: '\u{1d7e8}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7e9}', to: '\u{1d7e9}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7ea}', to: '\u{1d7ea}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7eb}', to: '\u{1d7eb}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7ec}', to: '\u{1d7ec}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7ed}', to: '\u{1d7ed}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d7ee}', to: '\u{1d7ee}', mapping: Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d7ef}', to: '\u{1d7ef}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d7f0}', to: '\u{1d7f0}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7f1}', to: '\u{1d7f1}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7f2}', to: '\u{1d7f2}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7f3}', to: '\u{1d7f3}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7f4}', to: '\u{1d7f4}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7f5}', to: '\u{1d7f5}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7f6}', to: '\u{1d7f6}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7f7}', to: '\u{1d7f7}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d7f8}', to: '\u{1d7f8}', mapping: Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d7f9}', to: '\u{1d7f9}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1d7fa}', to: '\u{1d7fa}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7fb}', to: '\u{1d7fb}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7fc}', to: '\u{1d7fc}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7fd}', to: '\u{1d7fd}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7fe}', to: '\u{1d7fe}', mapping: Mapped(StringTableSlice { byte_start_lo: 169, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d7ff}', to: '\u{1d7ff}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 8, byte_len: 1 }) },
++    Range { from: '\u{1d800}', to: '\u{1da8b}', mapping: Valid },
++    Range { from: '\u{1da8c}', to: '\u{1da9a}', mapping: Disallowed },
++    Range { from: '\u{1da9b}', to: '\u{1da9f}', mapping: Valid },
++    Range { from: '\u{1daa0}', to: '\u{1daa0}', mapping: Disallowed },
++    Range { from: '\u{1daa1}', to: '\u{1daaf}', mapping: Valid },
++    Range { from: '\u{1dab0}', to: '\u{1dfff}', mapping: Disallowed },
++    Range { from: '\u{1e000}', to: '\u{1e006}', mapping: Valid },
++    Range { from: '\u{1e007}', to: '\u{1e007}', mapping: Disallowed },
++    Range { from: '\u{1e008}', to: '\u{1e018}', mapping: Valid },
++    Range { from: '\u{1e019}', to: '\u{1e01a}', mapping: Disallowed },
++    Range { from: '\u{1e01b}', to: '\u{1e021}', mapping: Valid },
++    Range { from: '\u{1e022}', to: '\u{1e022}', mapping: Disallowed },
++    Range { from: '\u{1e023}', to: '\u{1e024}', mapping: Valid },
++    Range { from: '\u{1e025}', to: '\u{1e025}', mapping: Disallowed },
++    Range { from: '\u{1e026}', to: '\u{1e02a}', mapping: Valid },
++    Range { from: '\u{1e02b}', to: '\u{1e7ff}', mapping: Disallowed },
++    Range { from: '\u{1e800}', to: '\u{1e8c4}', mapping: Valid },
++    Range { from: '\u{1e8c5}', to: '\u{1e8c6}', mapping: Disallowed },
++    Range { from: '\u{1e8c7}', to: '\u{1e8d6}', mapping: Valid },
++    Range { from: '\u{1e8d7}', to: '\u{1e8ff}', mapping: Disallowed },
++    Range { from: '\u{1e900}', to: '\u{1e900}', mapping: Mapped(StringTableSlice { byte_start_lo: 166, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e901}', to: '\u{1e901}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e902}', to: '\u{1e902}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e903}', to: '\u{1e903}', mapping: Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e904}', to: '\u{1e904}', mapping: Mapped(StringTableSlice { byte_start_lo: 182, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e905}', to: '\u{1e905}', mapping: Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e906}', to: '\u{1e906}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e907}', to: '\u{1e907}', mapping: Mapped(StringTableSlice { byte_start_lo: 194, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e908}', to: '\u{1e908}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e909}', to: '\u{1e909}', mapping: Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e90a}', to: '\u{1e90a}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e90b}', to: '\u{1e90b}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e90c}', to: '\u{1e90c}', mapping: Mapped(StringTableSlice { byte_start_lo: 214, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e90d}', to: '\u{1e90d}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e90e}', to: '\u{1e90e}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e90f}', to: '\u{1e90f}', mapping: Mapped(StringTableSlice { byte_start_lo: 226, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e910}', to: '\u{1e910}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e911}', to: '\u{1e911}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e912}', to: '\u{1e912}', mapping: Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e913}', to: '\u{1e913}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e914}', to: '\u{1e914}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e915}', to: '\u{1e915}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e916}', to: '\u{1e916}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 41, byte_len: 4 }) },
++    Range { from: '\u{1e917}', to: '\u{1e917}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 42, byte_len: 4 }) },
++    Range { from: '\u{1e918}', to: '\u{1e918}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 42, byte_len: 4 }) },
++    Range { from: '\u{1e919}', to: '\u{1e919}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 42, byte_len: 4 }) },
++    Range { from: '\u{1e91a}', to: '\u{1e91a}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 42, byte_len: 4 }) },
++    Range { from: '\u{1e91b}', to: '\u{1e91b}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 42, byte_len: 4 }) },
++    Range { from: '\u{1e91c}', to: '\u{1e91c}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 42, byte_len: 4 }) },
++    Range { from: '\u{1e91d}', to: '\u{1e91d}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 42, byte_len: 4 }) },
++    Range { from: '\u{1e91e}', to: '\u{1e91e}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 42, byte_len: 4 }) },
++    Range { from: '\u{1e91f}', to: '\u{1e91f}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 42, byte_len: 4 }) },
++    Range { from: '\u{1e920}', to: '\u{1e920}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 42, byte_len: 4 }) },
++    Range { from: '\u{1e921}', to: '\u{1e921}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 42, byte_len: 4 }) },
++    Range { from: '\u{1e922}', to: '\u{1e94a}', mapping: Valid },
++    Range { from: '\u{1e94b}', to: '\u{1e94f}', mapping: Disallowed },
++    Range { from: '\u{1e950}', to: '\u{1e959}', mapping: Valid },
++    Range { from: '\u{1e95a}', to: '\u{1e95d}', mapping: Disallowed },
++    Range { from: '\u{1e95e}', to: '\u{1e95f}', mapping: Valid },
++    Range { from: '\u{1e960}', to: '\u{1edff}', mapping: Disallowed },
++    Range { from: '\u{1ee00}', to: '\u{1ee00}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee01}', to: '\u{1ee01}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee02}', to: '\u{1ee02}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee03}', to: '\u{1ee03}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee04}', to: '\u{1ee04}', mapping: Disallowed },
++    Range { from: '\u{1ee05}', to: '\u{1ee05}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee06}', to: '\u{1ee06}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee07}', to: '\u{1ee07}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee08}', to: '\u{1ee08}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee09}', to: '\u{1ee09}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee0a}', to: '\u{1ee0a}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee0b}', to: '\u{1ee0b}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee0c}', to: '\u{1ee0c}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee0d}', to: '\u{1ee0d}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee0e}', to: '\u{1ee0e}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee0f}', to: '\u{1ee0f}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee10}', to: '\u{1ee10}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee11}', to: '\u{1ee11}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee12}', to: '\u{1ee12}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee13}', to: '\u{1ee13}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee14}', to: '\u{1ee14}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee15}', to: '\u{1ee15}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee16}', to: '\u{1ee16}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee17}', to: '\u{1ee17}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee18}', to: '\u{1ee18}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee19}', to: '\u{1ee19}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee1a}', to: '\u{1ee1a}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee1b}', to: '\u{1ee1b}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee1c}', to: '\u{1ee1c}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1ee1d}', to: '\u{1ee1d}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{1ee1e}', to: '\u{1ee1e}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1ee1f}', to: '\u{1ee1f}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1ee20}', to: '\u{1ee20}', mapping: Disallowed },
++    Range { from: '\u{1ee21}', to: '\u{1ee21}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee22}', to: '\u{1ee22}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee23}', to: '\u{1ee23}', mapping: Disallowed },
++    Range { from: '\u{1ee24}', to: '\u{1ee24}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee25}', to: '\u{1ee26}', mapping: Disallowed },
++    Range { from: '\u{1ee27}', to: '\u{1ee27}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee28}', to: '\u{1ee28}', mapping: Disallowed },
++    Range { from: '\u{1ee29}', to: '\u{1ee29}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee2a}', to: '\u{1ee2a}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee2b}', to: '\u{1ee2b}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee2c}', to: '\u{1ee2c}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee2d}', to: '\u{1ee2d}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee2e}', to: '\u{1ee2e}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee2f}', to: '\u{1ee2f}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee30}', to: '\u{1ee30}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee31}', to: '\u{1ee31}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee32}', to: '\u{1ee32}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee33}', to: '\u{1ee33}', mapping: Disallowed },
++    Range { from: '\u{1ee34}', to: '\u{1ee34}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee35}', to: '\u{1ee35}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee36}', to: '\u{1ee36}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee37}', to: '\u{1ee37}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee38}', to: '\u{1ee38}', mapping: Disallowed },
++    Range { from: '\u{1ee39}', to: '\u{1ee39}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee3a}', to: '\u{1ee3a}', mapping: Disallowed },
++    Range { from: '\u{1ee3b}', to: '\u{1ee3b}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee3c}', to: '\u{1ee41}', mapping: Disallowed },
++    Range { from: '\u{1ee42}', to: '\u{1ee42}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee43}', to: '\u{1ee46}', mapping: Disallowed },
++    Range { from: '\u{1ee47}', to: '\u{1ee47}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee48}', to: '\u{1ee48}', mapping: Disallowed },
++    Range { from: '\u{1ee49}', to: '\u{1ee49}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee4a}', to: '\u{1ee4a}', mapping: Disallowed },
++    Range { from: '\u{1ee4b}', to: '\u{1ee4b}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee4c}', to: '\u{1ee4c}', mapping: Disallowed },
++    Range { from: '\u{1ee4d}', to: '\u{1ee4d}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee4e}', to: '\u{1ee4e}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee4f}', to: '\u{1ee4f}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee50}', to: '\u{1ee50}', mapping: Disallowed },
++    Range { from: '\u{1ee51}', to: '\u{1ee51}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee52}', to: '\u{1ee52}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee53}', to: '\u{1ee53}', mapping: Disallowed },
++    Range { from: '\u{1ee54}', to: '\u{1ee54}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee55}', to: '\u{1ee56}', mapping: Disallowed },
++    Range { from: '\u{1ee57}', to: '\u{1ee57}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee58}', to: '\u{1ee58}', mapping: Disallowed },
++    Range { from: '\u{1ee59}', to: '\u{1ee59}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee5a}', to: '\u{1ee5a}', mapping: Disallowed },
++    Range { from: '\u{1ee5b}', to: '\u{1ee5b}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee5c}', to: '\u{1ee5c}', mapping: Disallowed },
++    Range { from: '\u{1ee5d}', to: '\u{1ee5d}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 31, byte_len: 2 }) },
++    Range { from: '\u{1ee5e}', to: '\u{1ee5e}', mapping: Disallowed },
++    Range { from: '\u{1ee5f}', to: '\u{1ee5f}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1ee60}', to: '\u{1ee60}', mapping: Disallowed },
++    Range { from: '\u{1ee61}', to: '\u{1ee61}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee62}', to: '\u{1ee62}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee63}', to: '\u{1ee63}', mapping: Disallowed },
++    Range { from: '\u{1ee64}', to: '\u{1ee64}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee65}', to: '\u{1ee66}', mapping: Disallowed },
++    Range { from: '\u{1ee67}', to: '\u{1ee67}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee68}', to: '\u{1ee68}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee69}', to: '\u{1ee69}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee6a}', to: '\u{1ee6a}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee6b}', to: '\u{1ee6b}', mapping: Disallowed },
++    Range { from: '\u{1ee6c}', to: '\u{1ee6c}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee6d}', to: '\u{1ee6d}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee6e}', to: '\u{1ee6e}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee6f}', to: '\u{1ee6f}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee70}', to: '\u{1ee70}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee71}', to: '\u{1ee71}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee72}', to: '\u{1ee72}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee73}', to: '\u{1ee73}', mapping: Disallowed },
++    Range { from: '\u{1ee74}', to: '\u{1ee74}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee75}', to: '\u{1ee75}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee76}', to: '\u{1ee76}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee77}', to: '\u{1ee77}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee78}', to: '\u{1ee78}', mapping: Disallowed },
++    Range { from: '\u{1ee79}', to: '\u{1ee79}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee7a}', to: '\u{1ee7a}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee7b}', to: '\u{1ee7b}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee7c}', to: '\u{1ee7c}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1ee7d}', to: '\u{1ee7d}', mapping: Disallowed },
++    Range { from: '\u{1ee7e}', to: '\u{1ee7e}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1ee7f}', to: '\u{1ee7f}', mapping: Disallowed },
++    Range { from: '\u{1ee80}', to: '\u{1ee80}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee81}', to: '\u{1ee81}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee82}', to: '\u{1ee82}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee83}', to: '\u{1ee83}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee84}', to: '\u{1ee84}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee85}', to: '\u{1ee85}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee86}', to: '\u{1ee86}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee87}', to: '\u{1ee87}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee88}', to: '\u{1ee88}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee89}', to: '\u{1ee89}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee8a}', to: '\u{1ee8a}', mapping: Disallowed },
++    Range { from: '\u{1ee8b}', to: '\u{1ee8b}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee8c}', to: '\u{1ee8c}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee8d}', to: '\u{1ee8d}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee8e}', to: '\u{1ee8e}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee8f}', to: '\u{1ee8f}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee90}', to: '\u{1ee90}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee91}', to: '\u{1ee91}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee92}', to: '\u{1ee92}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee93}', to: '\u{1ee93}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee94}', to: '\u{1ee94}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee95}', to: '\u{1ee95}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee96}', to: '\u{1ee96}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1ee97}', to: '\u{1ee97}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee98}', to: '\u{1ee98}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee99}', to: '\u{1ee99}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee9a}', to: '\u{1ee9a}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee9b}', to: '\u{1ee9b}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1ee9c}', to: '\u{1eea0}', mapping: Disallowed },
++    Range { from: '\u{1eea1}', to: '\u{1eea1}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1eea2}', to: '\u{1eea2}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1eea3}', to: '\u{1eea3}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eea4}', to: '\u{1eea4}', mapping: Disallowed },
++    Range { from: '\u{1eea5}', to: '\u{1eea5}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eea6}', to: '\u{1eea6}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eea7}', to: '\u{1eea7}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1eea8}', to: '\u{1eea8}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eea9}', to: '\u{1eea9}', mapping: Mapped(StringTableSlice { byte_start_lo: 42, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eeaa}', to: '\u{1eeaa}', mapping: Disallowed },
++    Range { from: '\u{1eeab}', to: '\u{1eeab}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eeac}', to: '\u{1eeac}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eead}', to: '\u{1eead}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eeae}', to: '\u{1eeae}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eeaf}', to: '\u{1eeaf}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eeb0}', to: '\u{1eeb0}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eeb1}', to: '\u{1eeb1}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eeb2}', to: '\u{1eeb2}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eeb3}', to: '\u{1eeb3}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eeb4}', to: '\u{1eeb4}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eeb5}', to: '\u{1eeb5}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1eeb6}', to: '\u{1eeb6}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 37, byte_len: 2 }) },
++    Range { from: '\u{1eeb7}', to: '\u{1eeb7}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eeb8}', to: '\u{1eeb8}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eeb9}', to: '\u{1eeb9}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eeba}', to: '\u{1eeba}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eebb}', to: '\u{1eebb}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 38, byte_len: 2 }) },
++    Range { from: '\u{1eebc}', to: '\u{1eeef}', mapping: Disallowed },
++    Range { from: '\u{1eef0}', to: '\u{1eef1}', mapping: Valid },
++    Range { from: '\u{1eef2}', to: '\u{1efff}', mapping: Disallowed },
++    Range { from: '\u{1f000}', to: '\u{1f02b}', mapping: Valid },
++    Range { from: '\u{1f02c}', to: '\u{1f02f}', mapping: Disallowed },
++    Range { from: '\u{1f030}', to: '\u{1f093}', mapping: Valid },
++    Range { from: '\u{1f094}', to: '\u{1f09f}', mapping: Disallowed },
++    Range { from: '\u{1f0a0}', to: '\u{1f0ae}', mapping: Valid },
++    Range { from: '\u{1f0af}', to: '\u{1f0b0}', mapping: Disallowed },
++    Range { from: '\u{1f0b1}', to: '\u{1f0bf}', mapping: Valid },
++    Range { from: '\u{1f0c0}', to: '\u{1f0c0}', mapping: Disallowed },
++    Range { from: '\u{1f0c1}', to: '\u{1f0cf}', mapping: Valid },
++    Range { from: '\u{1f0d0}', to: '\u{1f0d0}', mapping: Disallowed },
++    Range { from: '\u{1f0d1}', to: '\u{1f0f5}', mapping: Valid },
++    Range { from: '\u{1f0f6}', to: '\u{1f100}', mapping: Disallowed },
++    Range { from: '\u{1f101}', to: '\u{1f101}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 52, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f102}', to: '\u{1f102}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f103}', to: '\u{1f103}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f104}', to: '\u{1f104}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f105}', to: '\u{1f105}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f106}', to: '\u{1f106}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f107}', to: '\u{1f107}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f108}', to: '\u{1f108}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f109}', to: '\u{1f109}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f10a}', to: '\u{1f10a}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f10b}', to: '\u{1f10c}', mapping: Valid },
++    Range { from: '\u{1f10d}', to: '\u{1f10f}', mapping: Disallowed },
++    Range { from: '\u{1f110}', to: '\u{1f110}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f111}', to: '\u{1f111}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 205, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f112}', to: '\u{1f112}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 208, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f113}', to: '\u{1f113}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 211, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f114}', to: '\u{1f114}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 214, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f115}', to: '\u{1f115}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 217, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f116}', to: '\u{1f116}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 220, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f117}', to: '\u{1f117}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 223, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f118}', to: '\u{1f118}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 226, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f119}', to: '\u{1f119}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 229, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f11a}', to: '\u{1f11a}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f11b}', to: '\u{1f11b}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 235, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f11c}', to: '\u{1f11c}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f11d}', to: '\u{1f11d}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 241, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f11e}', to: '\u{1f11e}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f11f}', to: '\u{1f11f}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 247, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f120}', to: '\u{1f120}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f121}', to: '\u{1f121}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 253, byte_start_hi: 9, byte_len: 3 }) },
++    Range { from: '\u{1f122}', to: '\u{1f122}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{1f123}', to: '\u{1f123}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{1f124}', to: '\u{1f124}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{1f125}', to: '\u{1f125}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{1f126}', to: '\u{1f126}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{1f127}', to: '\u{1f127}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{1f128}', to: '\u{1f128}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{1f129}', to: '\u{1f129}', mapping: DisallowedStd3Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 10, byte_len: 3 }) },
++    Range { from: '\u{1f12a}', to: '\u{1f12a}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 42, byte_len: 7 }) },
++    Range { from: '\u{1f12b}', to: '\u{1f12b}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f12c}', to: '\u{1f12c}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f12d}', to: '\u{1f12d}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{1f12e}', to: '\u{1f12e}', mapping: Mapped(StringTableSlice { byte_start_lo: 79, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f12f}', to: '\u{1f12f}', mapping: Disallowed },
++    Range { from: '\u{1f130}', to: '\u{1f130}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f131}', to: '\u{1f131}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f132}', to: '\u{1f132}', mapping: Mapped(StringTableSlice { byte_start_lo: 2, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f133}', to: '\u{1f133}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f134}', to: '\u{1f134}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f135}', to: '\u{1f135}', mapping: Mapped(StringTableSlice { byte_start_lo: 5, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f136}', to: '\u{1f136}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f137}', to: '\u{1f137}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f138}', to: '\u{1f138}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f139}', to: '\u{1f139}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f13a}', to: '\u{1f13a}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f13b}', to: '\u{1f13b}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f13c}', to: '\u{1f13c}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f13d}', to: '\u{1f13d}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f13e}', to: '\u{1f13e}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f13f}', to: '\u{1f13f}', mapping: Mapped(StringTableSlice { byte_start_lo: 15, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f140}', to: '\u{1f140}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f141}', to: '\u{1f141}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f142}', to: '\u{1f142}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f143}', to: '\u{1f143}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f144}', to: '\u{1f144}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f145}', to: '\u{1f145}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f146}', to: '\u{1f146}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f147}', to: '\u{1f147}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f148}', to: '\u{1f148}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f149}', to: '\u{1f149}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 0, byte_len: 1 }) },
++    Range { from: '\u{1f14a}', to: '\u{1f14a}', mapping: Mapped(StringTableSlice { byte_start_lo: 81, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f14b}', to: '\u{1f14b}', mapping: Mapped(StringTableSlice { byte_start_lo: 39, byte_start_hi: 23, byte_len: 2 }) },
++    Range { from: '\u{1f14c}', to: '\u{1f14c}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f14d}', to: '\u{1f14d}', mapping: Mapped(StringTableSlice { byte_start_lo: 119, byte_start_hi: 0, byte_len: 2 }) },
++    Range { from: '\u{1f14e}', to: '\u{1f14e}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f14f}', to: '\u{1f14f}', mapping: Mapped(StringTableSlice { byte_start_lo: 88, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f150}', to: '\u{1f169}', mapping: Valid },
++    Range { from: '\u{1f16a}', to: '\u{1f16a}', mapping: Mapped(StringTableSlice { byte_start_lo: 90, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f16b}', to: '\u{1f16b}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f16c}', to: '\u{1f16f}', mapping: Disallowed },
++    Range { from: '\u{1f170}', to: '\u{1f18f}', mapping: Valid },
++    Range { from: '\u{1f190}', to: '\u{1f190}', mapping: Mapped(StringTableSlice { byte_start_lo: 94, byte_start_hi: 42, byte_len: 2 }) },
++    Range { from: '\u{1f191}', to: '\u{1f1ac}', mapping: Valid },
++    Range { from: '\u{1f1ad}', to: '\u{1f1e5}', mapping: Disallowed },
++    Range { from: '\u{1f1e6}', to: '\u{1f1ff}', mapping: Valid },
++    Range { from: '\u{1f200}', to: '\u{1f200}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 42, byte_len: 6 }) },
++    Range { from: '\u{1f201}', to: '\u{1f201}', mapping: Mapped(StringTableSlice { byte_start_lo: 102, byte_start_hi: 42, byte_len: 6 }) },
++    Range { from: '\u{1f202}', to: '\u{1f202}', mapping: Mapped(StringTableSlice { byte_start_lo: 233, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{1f203}', to: '\u{1f20f}', mapping: Disallowed },
++    Range { from: '\u{1f210}', to: '\u{1f210}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{1f211}', to: '\u{1f211}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f212}', to: '\u{1f212}', mapping: Mapped(StringTableSlice { byte_start_lo: 111, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f213}', to: '\u{1f213}', mapping: Mapped(StringTableSlice { byte_start_lo: 114, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f214}', to: '\u{1f214}', mapping: Mapped(StringTableSlice { byte_start_lo: 149, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{1f215}', to: '\u{1f215}', mapping: Mapped(StringTableSlice { byte_start_lo: 117, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f216}', to: '\u{1f216}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f217}', to: '\u{1f217}', mapping: Mapped(StringTableSlice { byte_start_lo: 82, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{1f218}', to: '\u{1f218}', mapping: Mapped(StringTableSlice { byte_start_lo: 123, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f219}', to: '\u{1f219}', mapping: Mapped(StringTableSlice { byte_start_lo: 126, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f21a}', to: '\u{1f21a}', mapping: Mapped(StringTableSlice { byte_start_lo: 129, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f21b}', to: '\u{1f21b}', mapping: Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{1f21c}', to: '\u{1f21c}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f21d}', to: '\u{1f21d}', mapping: Mapped(StringTableSlice { byte_start_lo: 135, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f21e}', to: '\u{1f21e}', mapping: Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f21f}', to: '\u{1f21f}', mapping: Mapped(StringTableSlice { byte_start_lo: 141, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f220}', to: '\u{1f220}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f221}', to: '\u{1f221}', mapping: Mapped(StringTableSlice { byte_start_lo: 147, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f222}', to: '\u{1f222}', mapping: Mapped(StringTableSlice { byte_start_lo: 172, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{1f223}', to: '\u{1f223}', mapping: Mapped(StringTableSlice { byte_start_lo: 150, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f224}', to: '\u{1f224}', mapping: Mapped(StringTableSlice { byte_start_lo: 153, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f225}', to: '\u{1f225}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f226}', to: '\u{1f226}', mapping: Mapped(StringTableSlice { byte_start_lo: 159, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f227}', to: '\u{1f227}', mapping: Mapped(StringTableSlice { byte_start_lo: 162, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f228}', to: '\u{1f228}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f229}', to: '\u{1f229}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{1f22a}', to: '\u{1f22a}', mapping: Mapped(StringTableSlice { byte_start_lo: 58, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{1f22b}', to: '\u{1f22b}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f22c}', to: '\u{1f22c}', mapping: Mapped(StringTableSlice { byte_start_lo: 82, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{1f22d}', to: '\u{1f22d}', mapping: Mapped(StringTableSlice { byte_start_lo: 67, byte_start_hi: 15, byte_len: 3 }) },
++    Range { from: '\u{1f22e}', to: '\u{1f22e}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{1f22f}', to: '\u{1f22f}', mapping: Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f230}', to: '\u{1f230}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{1f231}', to: '\u{1f231}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f232}', to: '\u{1f232}', mapping: Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f233}', to: '\u{1f233}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f234}', to: '\u{1f234}', mapping: Mapped(StringTableSlice { byte_start_lo: 183, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f235}', to: '\u{1f235}', mapping: Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f236}', to: '\u{1f236}', mapping: Mapped(StringTableSlice { byte_start_lo: 31, byte_start_hi: 17, byte_len: 3 }) },
++    Range { from: '\u{1f237}', to: '\u{1f237}', mapping: Mapped(StringTableSlice { byte_start_lo: 94, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{1f238}', to: '\u{1f238}', mapping: Mapped(StringTableSlice { byte_start_lo: 189, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f239}', to: '\u{1f239}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f23a}', to: '\u{1f23a}', mapping: Mapped(StringTableSlice { byte_start_lo: 195, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f23b}', to: '\u{1f23b}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{1f23c}', to: '\u{1f23f}', mapping: Disallowed },
++    Range { from: '\u{1f240}', to: '\u{1f240}', mapping: Mapped(StringTableSlice { byte_start_lo: 201, byte_start_hi: 42, byte_len: 9 }) },
++    Range { from: '\u{1f241}', to: '\u{1f241}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 42, byte_len: 9 }) },
++    Range { from: '\u{1f242}', to: '\u{1f242}', mapping: Mapped(StringTableSlice { byte_start_lo: 219, byte_start_hi: 42, byte_len: 9 }) },
++    Range { from: '\u{1f243}', to: '\u{1f243}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 42, byte_len: 9 }) },
++    Range { from: '\u{1f244}', to: '\u{1f244}', mapping: Mapped(StringTableSlice { byte_start_lo: 237, byte_start_hi: 42, byte_len: 9 }) },
++    Range { from: '\u{1f245}', to: '\u{1f245}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 42, byte_len: 9 }) },
++    Range { from: '\u{1f246}', to: '\u{1f246}', mapping: Mapped(StringTableSlice { byte_start_lo: 255, byte_start_hi: 42, byte_len: 9 }) },
++    Range { from: '\u{1f247}', to: '\u{1f247}', mapping: Mapped(StringTableSlice { byte_start_lo: 8, byte_start_hi: 43, byte_len: 9 }) },
++    Range { from: '\u{1f248}', to: '\u{1f248}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 43, byte_len: 9 }) },
++    Range { from: '\u{1f249}', to: '\u{1f24f}', mapping: Disallowed },
++    Range { from: '\u{1f250}', to: '\u{1f250}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{1f251}', to: '\u{1f251}', mapping: Mapped(StringTableSlice { byte_start_lo: 29, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{1f252}', to: '\u{1f25f}', mapping: Disallowed },
++    Range { from: '\u{1f260}', to: '\u{1f265}', mapping: Valid },
++    Range { from: '\u{1f266}', to: '\u{1f2ff}', mapping: Disallowed },
++    Range { from: '\u{1f300}', to: '\u{1f6d4}', mapping: Valid },
++    Range { from: '\u{1f6d5}', to: '\u{1f6df}', mapping: Disallowed },
++    Range { from: '\u{1f6e0}', to: '\u{1f6ec}', mapping: Valid },
++    Range { from: '\u{1f6ed}', to: '\u{1f6ef}', mapping: Disallowed },
++    Range { from: '\u{1f6f0}', to: '\u{1f6f8}', mapping: Valid },
++    Range { from: '\u{1f6f9}', to: '\u{1f6ff}', mapping: Disallowed },
++    Range { from: '\u{1f700}', to: '\u{1f773}', mapping: Valid },
++    Range { from: '\u{1f774}', to: '\u{1f77f}', mapping: Disallowed },
++    Range { from: '\u{1f780}', to: '\u{1f7d4}', mapping: Valid },
++    Range { from: '\u{1f7d5}', to: '\u{1f7ff}', mapping: Disallowed },
++    Range { from: '\u{1f800}', to: '\u{1f80b}', mapping: Valid },
++    Range { from: '\u{1f80c}', to: '\u{1f80f}', mapping: Disallowed },
++    Range { from: '\u{1f810}', to: '\u{1f847}', mapping: Valid },
++    Range { from: '\u{1f848}', to: '\u{1f84f}', mapping: Disallowed },
++    Range { from: '\u{1f850}', to: '\u{1f859}', mapping: Valid },
++    Range { from: '\u{1f85a}', to: '\u{1f85f}', mapping: Disallowed },
++    Range { from: '\u{1f860}', to: '\u{1f887}', mapping: Valid },
++    Range { from: '\u{1f888}', to: '\u{1f88f}', mapping: Disallowed },
++    Range { from: '\u{1f890}', to: '\u{1f8ad}', mapping: Valid },
++    Range { from: '\u{1f8ae}', to: '\u{1f8ff}', mapping: Disallowed },
++    Range { from: '\u{1f900}', to: '\u{1f90b}', mapping: Valid },
++    Range { from: '\u{1f90c}', to: '\u{1f90f}', mapping: Disallowed },
++    Range { from: '\u{1f910}', to: '\u{1f93e}', mapping: Valid },
++    Range { from: '\u{1f93f}', to: '\u{1f93f}', mapping: Disallowed },
++    Range { from: '\u{1f940}', to: '\u{1f94c}', mapping: Valid },
++    Range { from: '\u{1f94d}', to: '\u{1f94f}', mapping: Disallowed },
++    Range { from: '\u{1f950}', to: '\u{1f96b}', mapping: Valid },
++    Range { from: '\u{1f96c}', to: '\u{1f97f}', mapping: Disallowed },
++    Range { from: '\u{1f980}', to: '\u{1f997}', mapping: Valid },
++    Range { from: '\u{1f998}', to: '\u{1f9bf}', mapping: Disallowed },
++    Range { from: '\u{1f9c0}', to: '\u{1f9c0}', mapping: Valid },
++    Range { from: '\u{1f9c1}', to: '\u{1f9cf}', mapping: Disallowed },
++    Range { from: '\u{1f9d0}', to: '\u{1f9e6}', mapping: Valid },
++    Range { from: '\u{1f9e7}', to: '\u{1ffff}', mapping: Disallowed },
++    Range { from: '\u{20000}', to: '\u{2a6d6}', mapping: Valid },
++    Range { from: '\u{2a6d7}', to: '\u{2a6ff}', mapping: Disallowed },
++    Range { from: '\u{2a700}', to: '\u{2b734}', mapping: Valid },
++    Range { from: '\u{2b735}', to: '\u{2b73f}', mapping: Disallowed },
++    Range { from: '\u{2b740}', to: '\u{2b81d}', mapping: Valid },
++    Range { from: '\u{2b81e}', to: '\u{2b81f}', mapping: Disallowed },
++    Range { from: '\u{2b820}', to: '\u{2cea1}', mapping: Valid },
++    Range { from: '\u{2cea2}', to: '\u{2ceaf}', mapping: Disallowed },
++    Range { from: '\u{2ceb0}', to: '\u{2ebe0}', mapping: Valid },
++    Range { from: '\u{2ebe1}', to: '\u{2f7ff}', mapping: Disallowed },
++    Range { from: '\u{2f800}', to: '\u{2f800}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f801}', to: '\u{2f801}', mapping: Mapped(StringTableSlice { byte_start_lo: 35, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f802}', to: '\u{2f802}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f803}', to: '\u{2f803}', mapping: Mapped(StringTableSlice { byte_start_lo: 41, byte_start_hi: 43, byte_len: 4 }) },
++    Range { from: '\u{2f804}', to: '\u{2f804}', mapping: Mapped(StringTableSlice { byte_start_lo: 45, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f805}', to: '\u{2f805}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f806}', to: '\u{2f806}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f807}', to: '\u{2f807}', mapping: Mapped(StringTableSlice { byte_start_lo: 51, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f808}', to: '\u{2f808}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f809}', to: '\u{2f809}', mapping: Mapped(StringTableSlice { byte_start_lo: 57, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f80a}', to: '\u{2f80a}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f80b}', to: '\u{2f80b}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f80c}', to: '\u{2f80c}', mapping: Mapped(StringTableSlice { byte_start_lo: 63, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f80d}', to: '\u{2f80d}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 43, byte_len: 4 }) },
++    Range { from: '\u{2f80e}', to: '\u{2f80e}', mapping: Mapped(StringTableSlice { byte_start_lo: 102, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f80f}', to: '\u{2f80f}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f810}', to: '\u{2f810}', mapping: Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f811}', to: '\u{2f811}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f812}', to: '\u{2f812}', mapping: Mapped(StringTableSlice { byte_start_lo: 79, byte_start_hi: 43, byte_len: 4 }) },
++    Range { from: '\u{2f813}', to: '\u{2f813}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f814}', to: '\u{2f814}', mapping: Mapped(StringTableSlice { byte_start_lo: 86, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f815}', to: '\u{2f815}', mapping: Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{2f816}', to: '\u{2f816}', mapping: Mapped(StringTableSlice { byte_start_lo: 89, byte_start_hi: 43, byte_len: 4 }) },
++    Range { from: '\u{2f817}', to: '\u{2f817}', mapping: Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f818}', to: '\u{2f818}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f819}', to: '\u{2f819}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f81a}', to: '\u{2f81a}', mapping: Mapped(StringTableSlice { byte_start_lo: 102, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f81b}', to: '\u{2f81b}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f81c}', to: '\u{2f81c}', mapping: Mapped(StringTableSlice { byte_start_lo: 105, byte_start_hi: 43, byte_len: 4 }) },
++    Range { from: '\u{2f81d}', to: '\u{2f81d}', mapping: Mapped(StringTableSlice { byte_start_lo: 179, byte_start_hi: 11, byte_len: 3 }) },
++    Range { from: '\u{2f81e}', to: '\u{2f81e}', mapping: Mapped(StringTableSlice { byte_start_lo: 109, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f81f}', to: '\u{2f81f}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f820}', to: '\u{2f820}', mapping: Mapped(StringTableSlice { byte_start_lo: 115, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f821}', to: '\u{2f821}', mapping: Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f822}', to: '\u{2f822}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{2f823}', to: '\u{2f823}', mapping: Mapped(StringTableSlice { byte_start_lo: 121, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f824}', to: '\u{2f824}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f825}', to: '\u{2f825}', mapping: Mapped(StringTableSlice { byte_start_lo: 27, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f826}', to: '\u{2f826}', mapping: Mapped(StringTableSlice { byte_start_lo: 105, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f827}', to: '\u{2f827}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f828}', to: '\u{2f828}', mapping: Mapped(StringTableSlice { byte_start_lo: 30, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f829}', to: '\u{2f829}', mapping: Mapped(StringTableSlice { byte_start_lo: 127, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f82a}', to: '\u{2f82a}', mapping: Mapped(StringTableSlice { byte_start_lo: 130, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f82b}', to: '\u{2f82b}', mapping: Mapped(StringTableSlice { byte_start_lo: 71, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{2f82c}', to: '\u{2f82c}', mapping: Mapped(StringTableSlice { byte_start_lo: 133, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f82d}', to: '\u{2f82d}', mapping: Mapped(StringTableSlice { byte_start_lo: 111, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f82e}', to: '\u{2f82e}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f82f}', to: '\u{2f82f}', mapping: Mapped(StringTableSlice { byte_start_lo: 139, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f830}', to: '\u{2f830}', mapping: Mapped(StringTableSlice { byte_start_lo: 142, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f831}', to: '\u{2f833}', mapping: Mapped(StringTableSlice { byte_start_lo: 145, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f834}', to: '\u{2f834}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 43, byte_len: 4 }) },
++    Range { from: '\u{2f835}', to: '\u{2f835}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f836}', to: '\u{2f836}', mapping: Mapped(StringTableSlice { byte_start_lo: 155, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f837}', to: '\u{2f837}', mapping: Mapped(StringTableSlice { byte_start_lo: 158, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f838}', to: '\u{2f838}', mapping: Mapped(StringTableSlice { byte_start_lo: 161, byte_start_hi: 43, byte_len: 4 }) },
++    Range { from: '\u{2f839}', to: '\u{2f839}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f83a}', to: '\u{2f83a}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f83b}', to: '\u{2f83b}', mapping: Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f83c}', to: '\u{2f83c}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f83d}', to: '\u{2f83d}', mapping: Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f83e}', to: '\u{2f83e}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f83f}', to: '\u{2f83f}', mapping: Mapped(StringTableSlice { byte_start_lo: 183, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f840}', to: '\u{2f840}', mapping: Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f841}', to: '\u{2f841}', mapping: Mapped(StringTableSlice { byte_start_lo: 189, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f842}', to: '\u{2f842}', mapping: Mapped(StringTableSlice { byte_start_lo: 192, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f843}', to: '\u{2f843}', mapping: Mapped(StringTableSlice { byte_start_lo: 195, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f844}', to: '\u{2f844}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f845}', to: '\u{2f846}', mapping: Mapped(StringTableSlice { byte_start_lo: 201, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f847}', to: '\u{2f847}', mapping: Mapped(StringTableSlice { byte_start_lo: 36, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f848}', to: '\u{2f848}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f849}', to: '\u{2f849}', mapping: Mapped(StringTableSlice { byte_start_lo: 207, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f84a}', to: '\u{2f84a}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f84b}', to: '\u{2f84b}', mapping: Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f84c}', to: '\u{2f84c}', mapping: Mapped(StringTableSlice { byte_start_lo: 117, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f84d}', to: '\u{2f84d}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f84e}', to: '\u{2f84e}', mapping: Mapped(StringTableSlice { byte_start_lo: 219, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f84f}', to: '\u{2f84f}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f850}', to: '\u{2f850}', mapping: Mapped(StringTableSlice { byte_start_lo: 253, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{2f851}', to: '\u{2f851}', mapping: Mapped(StringTableSlice { byte_start_lo: 225, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f852}', to: '\u{2f852}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f853}', to: '\u{2f853}', mapping: Mapped(StringTableSlice { byte_start_lo: 231, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f854}', to: '\u{2f854}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f855}', to: '\u{2f855}', mapping: Mapped(StringTableSlice { byte_start_lo: 237, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f856}', to: '\u{2f856}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f857}', to: '\u{2f857}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f858}', to: '\u{2f858}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f859}', to: '\u{2f859}', mapping: Mapped(StringTableSlice { byte_start_lo: 249, byte_start_hi: 43, byte_len: 4 }) },
++    Range { from: '\u{2f85a}', to: '\u{2f85a}', mapping: Mapped(StringTableSlice { byte_start_lo: 253, byte_start_hi: 43, byte_len: 3 }) },
++    Range { from: '\u{2f85b}', to: '\u{2f85b}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f85c}', to: '\u{2f85c}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f85d}', to: '\u{2f85d}', mapping: Mapped(StringTableSlice { byte_start_lo: 117, byte_start_hi: 42, byte_len: 3 }) },
++    Range { from: '\u{2f85e}', to: '\u{2f85e}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f85f}', to: '\u{2f85f}', mapping: Mapped(StringTableSlice { byte_start_lo: 9, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f860}', to: '\u{2f860}', mapping: Mapped(StringTableSlice { byte_start_lo: 12, byte_start_hi: 44, byte_len: 4 }) },
++    Range { from: '\u{2f861}', to: '\u{2f861}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 44, byte_len: 4 }) },
++    Range { from: '\u{2f862}', to: '\u{2f862}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f863}', to: '\u{2f863}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f864}', to: '\u{2f864}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f865}', to: '\u{2f865}', mapping: Mapped(StringTableSlice { byte_start_lo: 29, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f866}', to: '\u{2f866}', mapping: Mapped(StringTableSlice { byte_start_lo: 32, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f867}', to: '\u{2f867}', mapping: Mapped(StringTableSlice { byte_start_lo: 35, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f868}', to: '\u{2f868}', mapping: Disallowed },
++    Range { from: '\u{2f869}', to: '\u{2f869}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f86a}', to: '\u{2f86b}', mapping: Mapped(StringTableSlice { byte_start_lo: 41, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f86c}', to: '\u{2f86c}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 44, byte_len: 4 }) },
++    Range { from: '\u{2f86d}', to: '\u{2f86d}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f86e}', to: '\u{2f86e}', mapping: Mapped(StringTableSlice { byte_start_lo: 51, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f86f}', to: '\u{2f86f}', mapping: Mapped(StringTableSlice { byte_start_lo: 59, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{2f870}', to: '\u{2f870}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f871}', to: '\u{2f871}', mapping: Mapped(StringTableSlice { byte_start_lo: 57, byte_start_hi: 44, byte_len: 4 }) },
++    Range { from: '\u{2f872}', to: '\u{2f872}', mapping: Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f873}', to: '\u{2f873}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f874}', to: '\u{2f874}', mapping: Disallowed },
++    Range { from: '\u{2f875}', to: '\u{2f875}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f876}', to: '\u{2f876}', mapping: Mapped(StringTableSlice { byte_start_lo: 67, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f877}', to: '\u{2f877}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f878}', to: '\u{2f878}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f879}', to: '\u{2f879}', mapping: Mapped(StringTableSlice { byte_start_lo: 73, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f87a}', to: '\u{2f87a}', mapping: Mapped(StringTableSlice { byte_start_lo: 76, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f87b}', to: '\u{2f87b}', mapping: Mapped(StringTableSlice { byte_start_lo: 79, byte_start_hi: 44, byte_len: 4 }) },
++    Range { from: '\u{2f87c}', to: '\u{2f87c}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f87d}', to: '\u{2f87d}', mapping: Mapped(StringTableSlice { byte_start_lo: 86, byte_start_hi: 44, byte_len: 4 }) },
++    Range { from: '\u{2f87e}', to: '\u{2f87e}', mapping: Mapped(StringTableSlice { byte_start_lo: 90, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f87f}', to: '\u{2f87f}', mapping: Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f880}', to: '\u{2f880}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f881}', to: '\u{2f881}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f882}', to: '\u{2f882}', mapping: Mapped(StringTableSlice { byte_start_lo: 102, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f883}', to: '\u{2f883}', mapping: Mapped(StringTableSlice { byte_start_lo: 105, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f884}', to: '\u{2f884}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f885}', to: '\u{2f885}', mapping: Mapped(StringTableSlice { byte_start_lo: 111, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f886}', to: '\u{2f886}', mapping: Mapped(StringTableSlice { byte_start_lo: 114, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f887}', to: '\u{2f887}', mapping: Mapped(StringTableSlice { byte_start_lo: 117, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f888}', to: '\u{2f888}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f889}', to: '\u{2f889}', mapping: Mapped(StringTableSlice { byte_start_lo: 123, byte_start_hi: 44, byte_len: 4 }) },
++    Range { from: '\u{2f88a}', to: '\u{2f88a}', mapping: Mapped(StringTableSlice { byte_start_lo: 127, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f88b}', to: '\u{2f88b}', mapping: Mapped(StringTableSlice { byte_start_lo: 130, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f88c}', to: '\u{2f88c}', mapping: Mapped(StringTableSlice { byte_start_lo: 133, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f88d}', to: '\u{2f88d}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f88e}', to: '\u{2f88e}', mapping: Mapped(StringTableSlice { byte_start_lo: 159, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{2f88f}', to: '\u{2f88f}', mapping: Mapped(StringTableSlice { byte_start_lo: 139, byte_start_hi: 44, byte_len: 4 }) },
++    Range { from: '\u{2f890}', to: '\u{2f890}', mapping: Mapped(StringTableSlice { byte_start_lo: 37, byte_start_hi: 12, byte_len: 3 }) },
++    Range { from: '\u{2f891}', to: '\u{2f892}', mapping: Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 44, byte_len: 4 }) },
++    Range { from: '\u{2f893}', to: '\u{2f893}', mapping: Mapped(StringTableSlice { byte_start_lo: 147, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f894}', to: '\u{2f895}', mapping: Mapped(StringTableSlice { byte_start_lo: 150, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f896}', to: '\u{2f896}', mapping: Mapped(StringTableSlice { byte_start_lo: 153, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f897}', to: '\u{2f897}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 44, byte_len: 4 }) },
++    Range { from: '\u{2f898}', to: '\u{2f898}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 44, byte_len: 4 }) },
++    Range { from: '\u{2f899}', to: '\u{2f899}', mapping: Mapped(StringTableSlice { byte_start_lo: 164, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f89a}', to: '\u{2f89a}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f89b}', to: '\u{2f89b}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f89c}', to: '\u{2f89c}', mapping: Mapped(StringTableSlice { byte_start_lo: 173, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f89d}', to: '\u{2f89d}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f89e}', to: '\u{2f89e}', mapping: Mapped(StringTableSlice { byte_start_lo: 179, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f89f}', to: '\u{2f89f}', mapping: Mapped(StringTableSlice { byte_start_lo: 182, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8a0}', to: '\u{2f8a0}', mapping: Mapped(StringTableSlice { byte_start_lo: 185, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8a1}', to: '\u{2f8a1}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8a2}', to: '\u{2f8a2}', mapping: Mapped(StringTableSlice { byte_start_lo: 191, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8a3}', to: '\u{2f8a3}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f8a4}', to: '\u{2f8a4}', mapping: Mapped(StringTableSlice { byte_start_lo: 194, byte_start_hi: 44, byte_len: 4 }) },
++    Range { from: '\u{2f8a5}', to: '\u{2f8a5}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8a6}', to: '\u{2f8a6}', mapping: Mapped(StringTableSlice { byte_start_lo: 201, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8a7}', to: '\u{2f8a7}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8a8}', to: '\u{2f8a8}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f8a9}', to: '\u{2f8a9}', mapping: Mapped(StringTableSlice { byte_start_lo: 204, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8aa}', to: '\u{2f8aa}', mapping: Mapped(StringTableSlice { byte_start_lo: 207, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8ab}', to: '\u{2f8ab}', mapping: Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f8ac}', to: '\u{2f8ac}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8ad}', to: '\u{2f8ad}', mapping: Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8ae}', to: '\u{2f8ae}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8af}', to: '\u{2f8af}', mapping: Mapped(StringTableSlice { byte_start_lo: 219, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8b0}', to: '\u{2f8b0}', mapping: Mapped(StringTableSlice { byte_start_lo: 141, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f8b1}', to: '\u{2f8b1}', mapping: Mapped(StringTableSlice { byte_start_lo: 78, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{2f8b2}', to: '\u{2f8b2}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8b3}', to: '\u{2f8b3}', mapping: Mapped(StringTableSlice { byte_start_lo: 225, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8b4}', to: '\u{2f8b4}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8b5}', to: '\u{2f8b5}', mapping: Mapped(StringTableSlice { byte_start_lo: 231, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8b6}', to: '\u{2f8b6}', mapping: Mapped(StringTableSlice { byte_start_lo: 234, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8b7}', to: '\u{2f8b7}', mapping: Mapped(StringTableSlice { byte_start_lo: 237, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8b8}', to: '\u{2f8b8}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 44, byte_len: 4 }) },
++    Range { from: '\u{2f8b9}', to: '\u{2f8b9}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8ba}', to: '\u{2f8ba}', mapping: Mapped(StringTableSlice { byte_start_lo: 247, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8bb}', to: '\u{2f8bb}', mapping: Mapped(StringTableSlice { byte_start_lo: 250, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8bc}', to: '\u{2f8bc}', mapping: Mapped(StringTableSlice { byte_start_lo: 253, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f8bd}', to: '\u{2f8bd}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8be}', to: '\u{2f8be}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 45, byte_len: 4 }) },
++    Range { from: '\u{2f8bf}', to: '\u{2f8bf}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8c0}', to: '\u{2f8c0}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8c1}', to: '\u{2f8c1}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8c2}', to: '\u{2f8c2}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8c3}', to: '\u{2f8c3}', mapping: Mapped(StringTableSlice { byte_start_lo: 19, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8c4}', to: '\u{2f8c4}', mapping: Mapped(StringTableSlice { byte_start_lo: 22, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8c5}', to: '\u{2f8c5}', mapping: Mapped(StringTableSlice { byte_start_lo: 25, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8c6}', to: '\u{2f8c6}', mapping: Mapped(StringTableSlice { byte_start_lo: 28, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8c7}', to: '\u{2f8c7}', mapping: Mapped(StringTableSlice { byte_start_lo: 31, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8c8}', to: '\u{2f8c8}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f8c9}', to: '\u{2f8c9}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8ca}', to: '\u{2f8ca}', mapping: Mapped(StringTableSlice { byte_start_lo: 37, byte_start_hi: 45, byte_len: 4 }) },
++    Range { from: '\u{2f8cb}', to: '\u{2f8cb}', mapping: Mapped(StringTableSlice { byte_start_lo: 41, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8cc}', to: '\u{2f8cc}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8cd}', to: '\u{2f8cd}', mapping: Mapped(StringTableSlice { byte_start_lo: 47, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8ce}', to: '\u{2f8ce}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8cf}', to: '\u{2f8cf}', mapping: Mapped(StringTableSlice { byte_start_lo: 150, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f8d0}', to: '\u{2f8d0}', mapping: Mapped(StringTableSlice { byte_start_lo: 53, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8d1}', to: '\u{2f8d1}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8d2}', to: '\u{2f8d2}', mapping: Mapped(StringTableSlice { byte_start_lo: 59, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8d3}', to: '\u{2f8d3}', mapping: Mapped(StringTableSlice { byte_start_lo: 62, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8d4}', to: '\u{2f8d4}', mapping: Mapped(StringTableSlice { byte_start_lo: 65, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8d5}', to: '\u{2f8d5}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8d6}', to: '\u{2f8d6}', mapping: Mapped(StringTableSlice { byte_start_lo: 71, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8d7}', to: '\u{2f8d7}', mapping: Mapped(StringTableSlice { byte_start_lo: 74, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8d8}', to: '\u{2f8d8}', mapping: Mapped(StringTableSlice { byte_start_lo: 162, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{2f8d9}', to: '\u{2f8d9}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f8da}', to: '\u{2f8da}', mapping: Mapped(StringTableSlice { byte_start_lo: 77, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8db}', to: '\u{2f8db}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8dc}', to: '\u{2f8dc}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8dd}', to: '\u{2f8dd}', mapping: Mapped(StringTableSlice { byte_start_lo: 86, byte_start_hi: 45, byte_len: 4 }) },
++    Range { from: '\u{2f8de}', to: '\u{2f8de}', mapping: Mapped(StringTableSlice { byte_start_lo: 90, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8df}', to: '\u{2f8df}', mapping: Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8e0}', to: '\u{2f8e0}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8e1}', to: '\u{2f8e1}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8e2}', to: '\u{2f8e2}', mapping: Mapped(StringTableSlice { byte_start_lo: 153, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f8e3}', to: '\u{2f8e3}', mapping: Mapped(StringTableSlice { byte_start_lo: 102, byte_start_hi: 45, byte_len: 4 }) },
++    Range { from: '\u{2f8e4}', to: '\u{2f8e4}', mapping: Mapped(StringTableSlice { byte_start_lo: 106, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8e5}', to: '\u{2f8e5}', mapping: Mapped(StringTableSlice { byte_start_lo: 109, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8e6}', to: '\u{2f8e6}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8e7}', to: '\u{2f8e7}', mapping: Mapped(StringTableSlice { byte_start_lo: 225, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f8e8}', to: '\u{2f8e8}', mapping: Mapped(StringTableSlice { byte_start_lo: 115, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8e9}', to: '\u{2f8e9}', mapping: Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8ea}', to: '\u{2f8ea}', mapping: Mapped(StringTableSlice { byte_start_lo: 121, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8eb}', to: '\u{2f8eb}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8ec}', to: '\u{2f8ec}', mapping: Mapped(StringTableSlice { byte_start_lo: 127, byte_start_hi: 45, byte_len: 4 }) },
++    Range { from: '\u{2f8ed}', to: '\u{2f8ed}', mapping: Mapped(StringTableSlice { byte_start_lo: 131, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8ee}', to: '\u{2f8ee}', mapping: Mapped(StringTableSlice { byte_start_lo: 134, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8ef}', to: '\u{2f8ef}', mapping: Mapped(StringTableSlice { byte_start_lo: 137, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8f0}', to: '\u{2f8f0}', mapping: Mapped(StringTableSlice { byte_start_lo: 140, byte_start_hi: 45, byte_len: 4 }) },
++    Range { from: '\u{2f8f1}', to: '\u{2f8f1}', mapping: Mapped(StringTableSlice { byte_start_lo: 144, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8f2}', to: '\u{2f8f2}', mapping: Mapped(StringTableSlice { byte_start_lo: 147, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8f3}', to: '\u{2f8f3}', mapping: Mapped(StringTableSlice { byte_start_lo: 150, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8f4}', to: '\u{2f8f4}', mapping: Mapped(StringTableSlice { byte_start_lo: 153, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8f5}', to: '\u{2f8f5}', mapping: Mapped(StringTableSlice { byte_start_lo: 110, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{2f8f6}', to: '\u{2f8f6}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8f7}', to: '\u{2f8f7}', mapping: Mapped(StringTableSlice { byte_start_lo: 159, byte_start_hi: 45, byte_len: 4 }) },
++    Range { from: '\u{2f8f8}', to: '\u{2f8f8}', mapping: Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 45, byte_len: 4 }) },
++    Range { from: '\u{2f8f9}', to: '\u{2f8f9}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 45, byte_len: 4 }) },
++    Range { from: '\u{2f8fa}', to: '\u{2f8fa}', mapping: Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8fb}', to: '\u{2f8fb}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 45, byte_len: 4 }) },
++    Range { from: '\u{2f8fc}', to: '\u{2f8fc}', mapping: Mapped(StringTableSlice { byte_start_lo: 178, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8fd}', to: '\u{2f8fd}', mapping: Mapped(StringTableSlice { byte_start_lo: 181, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8fe}', to: '\u{2f8fe}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f8ff}', to: '\u{2f8ff}', mapping: Mapped(StringTableSlice { byte_start_lo: 187, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f900}', to: '\u{2f900}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f901}', to: '\u{2f901}', mapping: Mapped(StringTableSlice { byte_start_lo: 156, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f902}', to: '\u{2f902}', mapping: Mapped(StringTableSlice { byte_start_lo: 103, byte_start_hi: 28, byte_len: 3 }) },
++    Range { from: '\u{2f903}', to: '\u{2f903}', mapping: Mapped(StringTableSlice { byte_start_lo: 193, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f904}', to: '\u{2f904}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f905}', to: '\u{2f905}', mapping: Mapped(StringTableSlice { byte_start_lo: 199, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f906}', to: '\u{2f906}', mapping: Mapped(StringTableSlice { byte_start_lo: 202, byte_start_hi: 45, byte_len: 4 }) },
++    Range { from: '\u{2f907}', to: '\u{2f907}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f908}', to: '\u{2f908}', mapping: Mapped(StringTableSlice { byte_start_lo: 209, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f909}', to: '\u{2f909}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f90a}', to: '\u{2f90a}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f90b}', to: '\u{2f90b}', mapping: Mapped(StringTableSlice { byte_start_lo: 105, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f90c}', to: '\u{2f90c}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f90d}', to: '\u{2f90d}', mapping: Mapped(StringTableSlice { byte_start_lo: 221, byte_start_hi: 45, byte_len: 4 }) },
++    Range { from: '\u{2f90e}', to: '\u{2f90e}', mapping: Mapped(StringTableSlice { byte_start_lo: 225, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f90f}', to: '\u{2f90f}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f910}', to: '\u{2f910}', mapping: Mapped(StringTableSlice { byte_start_lo: 231, byte_start_hi: 45, byte_len: 4 }) },
++    Range { from: '\u{2f911}', to: '\u{2f911}', mapping: Mapped(StringTableSlice { byte_start_lo: 235, byte_start_hi: 45, byte_len: 4 }) },
++    Range { from: '\u{2f912}', to: '\u{2f912}', mapping: Mapped(StringTableSlice { byte_start_lo: 239, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f913}', to: '\u{2f913}', mapping: Mapped(StringTableSlice { byte_start_lo: 242, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f914}', to: '\u{2f914}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f915}', to: '\u{2f915}', mapping: Mapped(StringTableSlice { byte_start_lo: 245, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f916}', to: '\u{2f916}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f917}', to: '\u{2f917}', mapping: Mapped(StringTableSlice { byte_start_lo: 251, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f918}', to: '\u{2f918}', mapping: Mapped(StringTableSlice { byte_start_lo: 254, byte_start_hi: 45, byte_len: 3 }) },
++    Range { from: '\u{2f919}', to: '\u{2f919}', mapping: Mapped(StringTableSlice { byte_start_lo: 1, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f91a}', to: '\u{2f91a}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f91b}', to: '\u{2f91b}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f91c}', to: '\u{2f91c}', mapping: Mapped(StringTableSlice { byte_start_lo: 11, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f91d}', to: '\u{2f91d}', mapping: Mapped(StringTableSlice { byte_start_lo: 14, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f91e}', to: '\u{2f91e}', mapping: Mapped(StringTableSlice { byte_start_lo: 18, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f91f}', to: '\u{2f91f}', mapping: Disallowed },
++    Range { from: '\u{2f920}', to: '\u{2f920}', mapping: Mapped(StringTableSlice { byte_start_lo: 21, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f921}', to: '\u{2f921}', mapping: Mapped(StringTableSlice { byte_start_lo: 114, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f922}', to: '\u{2f922}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f923}', to: '\u{2f923}', mapping: Mapped(StringTableSlice { byte_start_lo: 27, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f924}', to: '\u{2f924}', mapping: Mapped(StringTableSlice { byte_start_lo: 31, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f925}', to: '\u{2f925}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f926}', to: '\u{2f926}', mapping: Mapped(StringTableSlice { byte_start_lo: 37, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f927}', to: '\u{2f927}', mapping: Mapped(StringTableSlice { byte_start_lo: 41, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f928}', to: '\u{2f928}', mapping: Mapped(StringTableSlice { byte_start_lo: 45, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f929}', to: '\u{2f929}', mapping: Mapped(StringTableSlice { byte_start_lo: 48, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f92a}', to: '\u{2f92a}', mapping: Mapped(StringTableSlice { byte_start_lo: 51, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f92b}', to: '\u{2f92b}', mapping: Mapped(StringTableSlice { byte_start_lo: 54, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f92c}', to: '\u{2f92d}', mapping: Mapped(StringTableSlice { byte_start_lo: 57, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f92e}', to: '\u{2f92e}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f92f}', to: '\u{2f92f}', mapping: Mapped(StringTableSlice { byte_start_lo: 63, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f930}', to: '\u{2f930}', mapping: Mapped(StringTableSlice { byte_start_lo: 120, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f931}', to: '\u{2f931}', mapping: Mapped(StringTableSlice { byte_start_lo: 66, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f932}', to: '\u{2f932}', mapping: Mapped(StringTableSlice { byte_start_lo: 69, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f933}', to: '\u{2f933}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f934}', to: '\u{2f934}', mapping: Mapped(StringTableSlice { byte_start_lo: 75, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f935}', to: '\u{2f935}', mapping: Mapped(StringTableSlice { byte_start_lo: 78, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f936}', to: '\u{2f936}', mapping: Mapped(StringTableSlice { byte_start_lo: 82, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f937}', to: '\u{2f937}', mapping: Mapped(StringTableSlice { byte_start_lo: 85, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f938}', to: '\u{2f938}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{2f939}', to: '\u{2f939}', mapping: Mapped(StringTableSlice { byte_start_lo: 89, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f93a}', to: '\u{2f93a}', mapping: Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f93b}', to: '\u{2f93b}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f93c}', to: '\u{2f93c}', mapping: Mapped(StringTableSlice { byte_start_lo: 100, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f93d}', to: '\u{2f93d}', mapping: Mapped(StringTableSlice { byte_start_lo: 104, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f93e}', to: '\u{2f93e}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f93f}', to: '\u{2f93f}', mapping: Mapped(StringTableSlice { byte_start_lo: 111, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f940}', to: '\u{2f940}', mapping: Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f941}', to: '\u{2f941}', mapping: Mapped(StringTableSlice { byte_start_lo: 114, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f942}', to: '\u{2f942}', mapping: Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f943}', to: '\u{2f943}', mapping: Mapped(StringTableSlice { byte_start_lo: 122, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f944}', to: '\u{2f944}', mapping: Mapped(StringTableSlice { byte_start_lo: 126, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f945}', to: '\u{2f945}', mapping: Mapped(StringTableSlice { byte_start_lo: 130, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f946}', to: '\u{2f947}', mapping: Mapped(StringTableSlice { byte_start_lo: 133, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f948}', to: '\u{2f948}', mapping: Mapped(StringTableSlice { byte_start_lo: 141, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f949}', to: '\u{2f949}', mapping: Mapped(StringTableSlice { byte_start_lo: 231, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f94a}', to: '\u{2f94a}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f94b}', to: '\u{2f94b}', mapping: Mapped(StringTableSlice { byte_start_lo: 139, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f94c}', to: '\u{2f94c}', mapping: Mapped(StringTableSlice { byte_start_lo: 142, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f94d}', to: '\u{2f94d}', mapping: Mapped(StringTableSlice { byte_start_lo: 145, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f94e}', to: '\u{2f94e}', mapping: Mapped(StringTableSlice { byte_start_lo: 149, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f94f}', to: '\u{2f94f}', mapping: Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{2f950}', to: '\u{2f950}', mapping: Mapped(StringTableSlice { byte_start_lo: 147, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f951}', to: '\u{2f951}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f952}', to: '\u{2f952}', mapping: Mapped(StringTableSlice { byte_start_lo: 155, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f953}', to: '\u{2f953}', mapping: Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f954}', to: '\u{2f954}', mapping: Mapped(StringTableSlice { byte_start_lo: 159, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f955}', to: '\u{2f955}', mapping: Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f956}', to: '\u{2f956}', mapping: Mapped(StringTableSlice { byte_start_lo: 57, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f957}', to: '\u{2f957}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f958}', to: '\u{2f958}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f959}', to: '\u{2f959}', mapping: Mapped(StringTableSlice { byte_start_lo: 195, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f95a}', to: '\u{2f95a}', mapping: Mapped(StringTableSlice { byte_start_lo: 173, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f95b}', to: '\u{2f95b}', mapping: Mapped(StringTableSlice { byte_start_lo: 176, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f95c}', to: '\u{2f95c}', mapping: Mapped(StringTableSlice { byte_start_lo: 179, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f95d}', to: '\u{2f95e}', mapping: Mapped(StringTableSlice { byte_start_lo: 183, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f95f}', to: '\u{2f95f}', mapping: Disallowed },
++    Range { from: '\u{2f960}', to: '\u{2f960}', mapping: Mapped(StringTableSlice { byte_start_lo: 187, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f961}', to: '\u{2f961}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f962}', to: '\u{2f962}', mapping: Mapped(StringTableSlice { byte_start_lo: 194, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f963}', to: '\u{2f963}', mapping: Mapped(StringTableSlice { byte_start_lo: 197, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f964}', to: '\u{2f964}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f965}', to: '\u{2f965}', mapping: Mapped(StringTableSlice { byte_start_lo: 203, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f966}', to: '\u{2f966}', mapping: Mapped(StringTableSlice { byte_start_lo: 207, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f967}', to: '\u{2f967}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f968}', to: '\u{2f968}', mapping: Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f969}', to: '\u{2f969}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f96a}', to: '\u{2f96a}', mapping: Mapped(StringTableSlice { byte_start_lo: 219, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f96b}', to: '\u{2f96b}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f96c}', to: '\u{2f96c}', mapping: Mapped(StringTableSlice { byte_start_lo: 226, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f96d}', to: '\u{2f96d}', mapping: Mapped(StringTableSlice { byte_start_lo: 229, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f96e}', to: '\u{2f96e}', mapping: Mapped(StringTableSlice { byte_start_lo: 232, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f96f}', to: '\u{2f96f}', mapping: Mapped(StringTableSlice { byte_start_lo: 235, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f970}', to: '\u{2f970}', mapping: Mapped(StringTableSlice { byte_start_lo: 238, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f971}', to: '\u{2f971}', mapping: Mapped(StringTableSlice { byte_start_lo: 241, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f972}', to: '\u{2f972}', mapping: Mapped(StringTableSlice { byte_start_lo: 244, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f973}', to: '\u{2f973}', mapping: Mapped(StringTableSlice { byte_start_lo: 248, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f974}', to: '\u{2f974}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 46, byte_len: 3 }) },
++    Range { from: '\u{2f975}', to: '\u{2f975}', mapping: Mapped(StringTableSlice { byte_start_lo: 255, byte_start_hi: 46, byte_len: 4 }) },
++    Range { from: '\u{2f976}', to: '\u{2f976}', mapping: Mapped(StringTableSlice { byte_start_lo: 3, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f977}', to: '\u{2f977}', mapping: Mapped(StringTableSlice { byte_start_lo: 6, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f978}', to: '\u{2f978}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f979}', to: '\u{2f979}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f97a}', to: '\u{2f97a}', mapping: Mapped(StringTableSlice { byte_start_lo: 213, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f97b}', to: '\u{2f97b}', mapping: Mapped(StringTableSlice { byte_start_lo: 16, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f97c}', to: '\u{2f97c}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f97d}', to: '\u{2f97d}', mapping: Mapped(StringTableSlice { byte_start_lo: 24, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f97e}', to: '\u{2f97e}', mapping: Mapped(StringTableSlice { byte_start_lo: 27, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f97f}', to: '\u{2f97f}', mapping: Mapped(StringTableSlice { byte_start_lo: 31, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f980}', to: '\u{2f980}', mapping: Mapped(StringTableSlice { byte_start_lo: 34, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f981}', to: '\u{2f981}', mapping: Mapped(StringTableSlice { byte_start_lo: 38, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f982}', to: '\u{2f982}', mapping: Mapped(StringTableSlice { byte_start_lo: 41, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f983}', to: '\u{2f983}', mapping: Mapped(StringTableSlice { byte_start_lo: 44, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f984}', to: '\u{2f984}', mapping: Mapped(StringTableSlice { byte_start_lo: 47, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f985}', to: '\u{2f985}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f986}', to: '\u{2f986}', mapping: Mapped(StringTableSlice { byte_start_lo: 53, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f987}', to: '\u{2f987}', mapping: Mapped(StringTableSlice { byte_start_lo: 56, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f988}', to: '\u{2f988}', mapping: Mapped(StringTableSlice { byte_start_lo: 60, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f989}', to: '\u{2f989}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f98a}', to: '\u{2f98a}', mapping: Mapped(StringTableSlice { byte_start_lo: 68, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f98b}', to: '\u{2f98b}', mapping: Mapped(StringTableSlice { byte_start_lo: 147, byte_start_hi: 44, byte_len: 3 }) },
++    Range { from: '\u{2f98c}', to: '\u{2f98c}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f98d}', to: '\u{2f98d}', mapping: Mapped(StringTableSlice { byte_start_lo: 75, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f98e}', to: '\u{2f98e}', mapping: Mapped(StringTableSlice { byte_start_lo: 78, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f98f}', to: '\u{2f98f}', mapping: Mapped(StringTableSlice { byte_start_lo: 81, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f990}', to: '\u{2f990}', mapping: Mapped(StringTableSlice { byte_start_lo: 84, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f991}', to: '\u{2f991}', mapping: Mapped(StringTableSlice { byte_start_lo: 87, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f992}', to: '\u{2f992}', mapping: Mapped(StringTableSlice { byte_start_lo: 90, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f993}', to: '\u{2f993}', mapping: Mapped(StringTableSlice { byte_start_lo: 93, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f994}', to: '\u{2f994}', mapping: Mapped(StringTableSlice { byte_start_lo: 96, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f995}', to: '\u{2f995}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f996}', to: '\u{2f996}', mapping: Mapped(StringTableSlice { byte_start_lo: 102, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f997}', to: '\u{2f997}', mapping: Mapped(StringTableSlice { byte_start_lo: 105, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f998}', to: '\u{2f998}', mapping: Mapped(StringTableSlice { byte_start_lo: 119, byte_start_hi: 27, byte_len: 3 }) },
++    Range { from: '\u{2f999}', to: '\u{2f999}', mapping: Mapped(StringTableSlice { byte_start_lo: 109, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f99a}', to: '\u{2f99a}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f99b}', to: '\u{2f99b}', mapping: Mapped(StringTableSlice { byte_start_lo: 115, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f99c}', to: '\u{2f99c}', mapping: Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f99d}', to: '\u{2f99d}', mapping: Mapped(StringTableSlice { byte_start_lo: 121, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f99e}', to: '\u{2f99e}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f99f}', to: '\u{2f99f}', mapping: Mapped(StringTableSlice { byte_start_lo: 222, byte_start_hi: 29, byte_len: 3 }) },
++    Range { from: '\u{2f9a0}', to: '\u{2f9a0}', mapping: Mapped(StringTableSlice { byte_start_lo: 127, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9a1}', to: '\u{2f9a1}', mapping: Mapped(StringTableSlice { byte_start_lo: 130, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9a2}', to: '\u{2f9a2}', mapping: Mapped(StringTableSlice { byte_start_lo: 133, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9a3}', to: '\u{2f9a3}', mapping: Mapped(StringTableSlice { byte_start_lo: 136, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9a4}', to: '\u{2f9a4}', mapping: Mapped(StringTableSlice { byte_start_lo: 139, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f9a5}', to: '\u{2f9a5}', mapping: Mapped(StringTableSlice { byte_start_lo: 143, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f9a6}', to: '\u{2f9a6}', mapping: Mapped(StringTableSlice { byte_start_lo: 147, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f9a7}', to: '\u{2f9a7}', mapping: Mapped(StringTableSlice { byte_start_lo: 151, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9a8}', to: '\u{2f9a8}', mapping: Mapped(StringTableSlice { byte_start_lo: 154, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9a9}', to: '\u{2f9a9}', mapping: Mapped(StringTableSlice { byte_start_lo: 157, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9aa}', to: '\u{2f9aa}', mapping: Mapped(StringTableSlice { byte_start_lo: 160, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9ab}', to: '\u{2f9ab}', mapping: Mapped(StringTableSlice { byte_start_lo: 163, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f9ac}', to: '\u{2f9ac}', mapping: Mapped(StringTableSlice { byte_start_lo: 167, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9ad}', to: '\u{2f9ad}', mapping: Mapped(StringTableSlice { byte_start_lo: 170, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f9ae}', to: '\u{2f9ae}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9af}', to: '\u{2f9af}', mapping: Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9b0}', to: '\u{2f9b0}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f9b1}', to: '\u{2f9b1}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f9b2}', to: '\u{2f9b2}', mapping: Mapped(StringTableSlice { byte_start_lo: 188, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9b3}', to: '\u{2f9b3}', mapping: Mapped(StringTableSlice { byte_start_lo: 191, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9b4}', to: '\u{2f9b4}', mapping: Mapped(StringTableSlice { byte_start_lo: 198, byte_start_hi: 26, byte_len: 3 }) },
++    Range { from: '\u{2f9b5}', to: '\u{2f9b5}', mapping: Mapped(StringTableSlice { byte_start_lo: 194, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9b6}', to: '\u{2f9b6}', mapping: Mapped(StringTableSlice { byte_start_lo: 197, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9b7}', to: '\u{2f9b7}', mapping: Mapped(StringTableSlice { byte_start_lo: 200, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9b8}', to: '\u{2f9b8}', mapping: Mapped(StringTableSlice { byte_start_lo: 203, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9b9}', to: '\u{2f9b9}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9ba}', to: '\u{2f9ba}', mapping: Mapped(StringTableSlice { byte_start_lo: 209, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9bb}', to: '\u{2f9bb}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f9bc}', to: '\u{2f9bc}', mapping: Mapped(StringTableSlice { byte_start_lo: 212, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9bd}', to: '\u{2f9bd}', mapping: Mapped(StringTableSlice { byte_start_lo: 215, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9be}', to: '\u{2f9be}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9bf}', to: '\u{2f9bf}', mapping: Disallowed },
++    Range { from: '\u{2f9c0}', to: '\u{2f9c0}', mapping: Mapped(StringTableSlice { byte_start_lo: 221, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9c1}', to: '\u{2f9c1}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9c2}', to: '\u{2f9c2}', mapping: Mapped(StringTableSlice { byte_start_lo: 227, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9c3}', to: '\u{2f9c3}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9c4}', to: '\u{2f9c4}', mapping: Mapped(StringTableSlice { byte_start_lo: 51, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f9c5}', to: '\u{2f9c5}', mapping: Mapped(StringTableSlice { byte_start_lo: 233, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f9c6}', to: '\u{2f9c6}', mapping: Mapped(StringTableSlice { byte_start_lo: 237, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9c7}', to: '\u{2f9c7}', mapping: Mapped(StringTableSlice { byte_start_lo: 240, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9c8}', to: '\u{2f9c8}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9c9}', to: '\u{2f9c9}', mapping: Mapped(StringTableSlice { byte_start_lo: 246, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9ca}', to: '\u{2f9ca}', mapping: Mapped(StringTableSlice { byte_start_lo: 249, byte_start_hi: 47, byte_len: 3 }) },
++    Range { from: '\u{2f9cb}', to: '\u{2f9cb}', mapping: Mapped(StringTableSlice { byte_start_lo: 252, byte_start_hi: 47, byte_len: 4 }) },
++    Range { from: '\u{2f9cc}', to: '\u{2f9cc}', mapping: Mapped(StringTableSlice { byte_start_lo: 0, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2f9cd}', to: '\u{2f9cd}', mapping: Mapped(StringTableSlice { byte_start_lo: 4, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9ce}', to: '\u{2f9ce}', mapping: Mapped(StringTableSlice { byte_start_lo: 7, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9cf}', to: '\u{2f9cf}', mapping: Mapped(StringTableSlice { byte_start_lo: 10, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9d0}', to: '\u{2f9d0}', mapping: Mapped(StringTableSlice { byte_start_lo: 183, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f9d1}', to: '\u{2f9d1}', mapping: Mapped(StringTableSlice { byte_start_lo: 186, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f9d2}', to: '\u{2f9d2}', mapping: Mapped(StringTableSlice { byte_start_lo: 72, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2f9d3}', to: '\u{2f9d3}', mapping: Mapped(StringTableSlice { byte_start_lo: 13, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2f9d4}', to: '\u{2f9d4}', mapping: Mapped(StringTableSlice { byte_start_lo: 17, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9d5}', to: '\u{2f9d5}', mapping: Mapped(StringTableSlice { byte_start_lo: 20, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9d6}', to: '\u{2f9d6}', mapping: Mapped(StringTableSlice { byte_start_lo: 23, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9d7}', to: '\u{2f9d7}', mapping: Mapped(StringTableSlice { byte_start_lo: 26, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9d8}', to: '\u{2f9d8}', mapping: Mapped(StringTableSlice { byte_start_lo: 29, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2f9d9}', to: '\u{2f9d9}', mapping: Mapped(StringTableSlice { byte_start_lo: 33, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2f9da}', to: '\u{2f9da}', mapping: Mapped(StringTableSlice { byte_start_lo: 37, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9db}', to: '\u{2f9db}', mapping: Mapped(StringTableSlice { byte_start_lo: 40, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9dc}', to: '\u{2f9dc}', mapping: Mapped(StringTableSlice { byte_start_lo: 43, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9dd}', to: '\u{2f9dd}', mapping: Mapped(StringTableSlice { byte_start_lo: 46, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2f9de}', to: '\u{2f9de}', mapping: Mapped(StringTableSlice { byte_start_lo: 50, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9df}', to: '\u{2f9df}', mapping: Mapped(StringTableSlice { byte_start_lo: 189, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2f9e0}', to: '\u{2f9e0}', mapping: Mapped(StringTableSlice { byte_start_lo: 53, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2f9e1}', to: '\u{2f9e1}', mapping: Mapped(StringTableSlice { byte_start_lo: 57, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2f9e2}', to: '\u{2f9e2}', mapping: Mapped(StringTableSlice { byte_start_lo: 61, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9e3}', to: '\u{2f9e3}', mapping: Mapped(StringTableSlice { byte_start_lo: 64, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9e4}', to: '\u{2f9e4}', mapping: Mapped(StringTableSlice { byte_start_lo: 67, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9e5}', to: '\u{2f9e5}', mapping: Mapped(StringTableSlice { byte_start_lo: 70, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2f9e6}', to: '\u{2f9e6}', mapping: Mapped(StringTableSlice { byte_start_lo: 74, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9e7}', to: '\u{2f9e7}', mapping: Mapped(StringTableSlice { byte_start_lo: 77, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9e8}', to: '\u{2f9e8}', mapping: Mapped(StringTableSlice { byte_start_lo: 80, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9e9}', to: '\u{2f9e9}', mapping: Mapped(StringTableSlice { byte_start_lo: 83, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9ea}', to: '\u{2f9ea}', mapping: Mapped(StringTableSlice { byte_start_lo: 86, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9eb}', to: '\u{2f9eb}', mapping: Mapped(StringTableSlice { byte_start_lo: 89, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9ec}', to: '\u{2f9ec}', mapping: Mapped(StringTableSlice { byte_start_lo: 92, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9ed}', to: '\u{2f9ed}', mapping: Mapped(StringTableSlice { byte_start_lo: 95, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2f9ee}', to: '\u{2f9ee}', mapping: Mapped(StringTableSlice { byte_start_lo: 99, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9ef}', to: '\u{2f9ef}', mapping: Mapped(StringTableSlice { byte_start_lo: 102, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9f0}', to: '\u{2f9f0}', mapping: Mapped(StringTableSlice { byte_start_lo: 105, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9f1}', to: '\u{2f9f1}', mapping: Mapped(StringTableSlice { byte_start_lo: 108, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2f9f2}', to: '\u{2f9f2}', mapping: Mapped(StringTableSlice { byte_start_lo: 112, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9f3}', to: '\u{2f9f3}', mapping: Mapped(StringTableSlice { byte_start_lo: 115, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9f4}', to: '\u{2f9f4}', mapping: Mapped(StringTableSlice { byte_start_lo: 118, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9f5}', to: '\u{2f9f5}', mapping: Mapped(StringTableSlice { byte_start_lo: 121, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9f6}', to: '\u{2f9f6}', mapping: Mapped(StringTableSlice { byte_start_lo: 124, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2f9f7}', to: '\u{2f9f7}', mapping: Mapped(StringTableSlice { byte_start_lo: 128, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2f9f8}', to: '\u{2f9f8}', mapping: Mapped(StringTableSlice { byte_start_lo: 132, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9f9}', to: '\u{2f9f9}', mapping: Mapped(StringTableSlice { byte_start_lo: 135, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9fa}', to: '\u{2f9fa}', mapping: Mapped(StringTableSlice { byte_start_lo: 138, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9fb}', to: '\u{2f9fb}', mapping: Mapped(StringTableSlice { byte_start_lo: 141, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2f9fc}', to: '\u{2f9fc}', mapping: Mapped(StringTableSlice { byte_start_lo: 145, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2f9fd}', to: '\u{2f9fd}', mapping: Mapped(StringTableSlice { byte_start_lo: 148, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2f9fe}', to: '\u{2f9ff}', mapping: Mapped(StringTableSlice { byte_start_lo: 207, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2fa00}', to: '\u{2fa00}', mapping: Mapped(StringTableSlice { byte_start_lo: 152, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa01}', to: '\u{2fa01}', mapping: Mapped(StringTableSlice { byte_start_lo: 155, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2fa02}', to: '\u{2fa02}', mapping: Mapped(StringTableSlice { byte_start_lo: 159, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa03}', to: '\u{2fa03}', mapping: Mapped(StringTableSlice { byte_start_lo: 162, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa04}', to: '\u{2fa04}', mapping: Mapped(StringTableSlice { byte_start_lo: 165, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa05}', to: '\u{2fa05}', mapping: Mapped(StringTableSlice { byte_start_lo: 168, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa06}', to: '\u{2fa06}', mapping: Mapped(StringTableSlice { byte_start_lo: 171, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa07}', to: '\u{2fa07}', mapping: Mapped(StringTableSlice { byte_start_lo: 174, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa08}', to: '\u{2fa08}', mapping: Mapped(StringTableSlice { byte_start_lo: 177, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa09}', to: '\u{2fa09}', mapping: Mapped(StringTableSlice { byte_start_lo: 180, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2fa0a}', to: '\u{2fa0a}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 30, byte_len: 3 }) },
++    Range { from: '\u{2fa0b}', to: '\u{2fa0b}', mapping: Mapped(StringTableSlice { byte_start_lo: 184, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa0c}', to: '\u{2fa0c}', mapping: Mapped(StringTableSlice { byte_start_lo: 187, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa0d}', to: '\u{2fa0d}', mapping: Mapped(StringTableSlice { byte_start_lo: 190, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa0e}', to: '\u{2fa0e}', mapping: Mapped(StringTableSlice { byte_start_lo: 193, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa0f}', to: '\u{2fa0f}', mapping: Mapped(StringTableSlice { byte_start_lo: 196, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa10}', to: '\u{2fa10}', mapping: Mapped(StringTableSlice { byte_start_lo: 199, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2fa11}', to: '\u{2fa11}', mapping: Mapped(StringTableSlice { byte_start_lo: 203, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa12}', to: '\u{2fa12}', mapping: Mapped(StringTableSlice { byte_start_lo: 206, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2fa13}', to: '\u{2fa13}', mapping: Mapped(StringTableSlice { byte_start_lo: 210, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2fa14}', to: '\u{2fa14}', mapping: Mapped(StringTableSlice { byte_start_lo: 214, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2fa15}', to: '\u{2fa15}', mapping: Mapped(StringTableSlice { byte_start_lo: 216, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fa16}', to: '\u{2fa16}', mapping: Mapped(StringTableSlice { byte_start_lo: 218, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa17}', to: '\u{2fa17}', mapping: Mapped(StringTableSlice { byte_start_lo: 228, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fa18}', to: '\u{2fa18}', mapping: Mapped(StringTableSlice { byte_start_lo: 221, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa19}', to: '\u{2fa19}', mapping: Mapped(StringTableSlice { byte_start_lo: 224, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa1a}', to: '\u{2fa1a}', mapping: Mapped(StringTableSlice { byte_start_lo: 227, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa1b}', to: '\u{2fa1b}', mapping: Mapped(StringTableSlice { byte_start_lo: 230, byte_start_hi: 48, byte_len: 3 }) },
++    Range { from: '\u{2fa1c}', to: '\u{2fa1c}', mapping: Mapped(StringTableSlice { byte_start_lo: 243, byte_start_hi: 13, byte_len: 3 }) },
++    Range { from: '\u{2fa1d}', to: '\u{2fa1d}', mapping: Mapped(StringTableSlice { byte_start_lo: 233, byte_start_hi: 48, byte_len: 4 }) },
++    Range { from: '\u{2fa1e}', to: '\u{e00ff}', mapping: Disallowed },
++    Range { from: '\u{e0100}', to: '\u{e01ef}', mapping: Ignored },
++    Range { from: '\u{e01f0}', to: '\u{10ffff}', mapping: Disallowed },
++];
++
++static STRING_TABLE: &'static str = "\u{61}\
++  \u{62}\
++  \u{63}\
++  \u{64}\
++  \u{65}\
++  \u{66}\
++  \u{67}\
++  \u{68}\
++  \u{69}\
++  \u{6a}\
++  \u{6b}\
++  \u{6c}\
++  \u{6d}\
++  \u{6e}\
++  \u{6f}\
++  \u{70}\
++  \u{71}\
++  \u{72}\
++  \u{73}\
++  \u{74}\
++  \u{75}\
++  \u{76}\
++  \u{77}\
++  \u{78}\
++  \u{79}\
++  \u{7a}\
++  \u{20}\
++  \u{20}\
++  \u{308}\
++  \u{20}\
++  \u{304}\
++  \u{32}\
++  \u{33}\
++  \u{20}\
++  \u{301}\
++  \u{3bc}\
++  \u{20}\
++  \u{327}\
++  \u{31}\
++  \u{31}\
++  \u{2044}\
++  \u{34}\
++  \u{31}\
++  \u{2044}\
++  \u{32}\
++  \u{33}\
++  \u{2044}\
++  \u{34}\
++  \u{e0}\
++  \u{e1}\
++  \u{e2}\
++  \u{e3}\
++  \u{e4}\
++  \u{e5}\
++  \u{e6}\
++  \u{e7}\
++  \u{e8}\
++  \u{e9}\
++  \u{ea}\
++  \u{eb}\
++  \u{ec}\
++  \u{ed}\
++  \u{ee}\
++  \u{ef}\
++  \u{f0}\
++  \u{f1}\
++  \u{f2}\
++  \u{f3}\
++  \u{f4}\
++  \u{f5}\
++  \u{f6}\
++  \u{f8}\
++  \u{f9}\
++  \u{fa}\
++  \u{fb}\
++  \u{fc}\
++  \u{fd}\
++  \u{fe}\
++  \u{73}\
++  \u{73}\
++  \u{101}\
++  \u{103}\
++  \u{105}\
++  \u{107}\
++  \u{109}\
++  \u{10b}\
++  \u{10d}\
++  \u{10f}\
++  \u{111}\
++  \u{113}\
++  \u{115}\
++  \u{117}\
++  \u{119}\
++  \u{11b}\
++  \u{11d}\
++  \u{11f}\
++  \u{121}\
++  \u{123}\
++  \u{125}\
++  \u{127}\
++  \u{129}\
++  \u{12b}\
++  \u{12d}\
++  \u{12f}\
++  \u{69}\
++  \u{307}\
++  \u{69}\
++  \u{6a}\
++  \u{135}\
++  \u{137}\
++  \u{13a}\
++  \u{13c}\
++  \u{13e}\
++  \u{6c}\
++  \u{b7}\
++  \u{142}\
++  \u{144}\
++  \u{146}\
++  \u{148}\
++  \u{2bc}\
++  \u{6e}\
++  \u{14b}\
++  \u{14d}\
++  \u{14f}\
++  \u{151}\
++  \u{153}\
++  \u{155}\
++  \u{157}\
++  \u{159}\
++  \u{15b}\
++  \u{15d}\
++  \u{15f}\
++  \u{161}\
++  \u{163}\
++  \u{165}\
++  \u{167}\
++  \u{169}\
++  \u{16b}\
++  \u{16d}\
++  \u{16f}\
++  \u{171}\
++  \u{173}\
++  \u{175}\
++  \u{177}\
++  \u{ff}\
++  \u{17a}\
++  \u{17c}\
++  \u{17e}\
++  \u{253}\
++  \u{183}\
++  \u{185}\
++  \u{254}\
++  \u{188}\
++  \u{256}\
++  \u{257}\
++  \u{18c}\
++  \u{1dd}\
++  \u{259}\
++  \u{25b}\
++  \u{192}\
++  \u{260}\
++  \u{263}\
++  \u{269}\
++  \u{268}\
++  \u{199}\
++  \u{26f}\
++  \u{272}\
++  \u{275}\
++  \u{1a1}\
++  \u{1a3}\
++  \u{1a5}\
++  \u{280}\
++  \u{1a8}\
++  \u{283}\
++  \u{1ad}\
++  \u{288}\
++  \u{1b0}\
++  \u{28a}\
++  \u{28b}\
++  \u{1b4}\
++  \u{1b6}\
++  \u{292}\
++  \u{1b9}\
++  \u{1bd}\
++  \u{64}\
++  \u{17e}\
++  \u{6c}\
++  \u{6a}\
++  \u{6e}\
++  \u{6a}\
++  \u{1ce}\
++  \u{1d0}\
++  \u{1d2}\
++  \u{1d4}\
++  \u{1d6}\
++  \u{1d8}\
++  \u{1da}\
++  \u{1dc}\
++  \u{1df}\
++  \u{1e1}\
++  \u{1e3}\
++  \u{1e5}\
++  \u{1e7}\
++  \u{1e9}\
++  \u{1eb}\
++  \u{1ed}\
++  \u{1ef}\
++  \u{64}\
++  \u{7a}\
++  \u{1f5}\
++  \u{195}\
++  \u{1bf}\
++  \u{1f9}\
++  \u{1fb}\
++  \u{1fd}\
++  \u{1ff}\
++  \u{201}\
++  \u{203}\
++  \u{205}\
++  \u{207}\
++  \u{209}\
++  \u{20b}\
++  \u{20d}\
++  \u{20f}\
++  \u{211}\
++  \u{213}\
++  \u{215}\
++  \u{217}\
++  \u{219}\
++  \u{21b}\
++  \u{21d}\
++  \u{21f}\
++  \u{19e}\
++  \u{223}\
++  \u{225}\
++  \u{227}\
++  \u{229}\
++  \u{22b}\
++  \u{22d}\
++  \u{22f}\
++  \u{231}\
++  \u{233}\
++  \u{2c65}\
++  \u{23c}\
++  \u{19a}\
++  \u{2c66}\
++  \u{242}\
++  \u{180}\
++  \u{289}\
++  \u{28c}\
++  \u{247}\
++  \u{249}\
++  \u{24b}\
++  \u{24d}\
++  \u{24f}\
++  \u{266}\
++  \u{279}\
++  \u{27b}\
++  \u{281}\
++  \u{20}\
++  \u{306}\
++  \u{20}\
++  \u{307}\
++  \u{20}\
++  \u{30a}\
++  \u{20}\
++  \u{328}\
++  \u{20}\
++  \u{303}\
++  \u{20}\
++  \u{30b}\
++  \u{295}\
++  \u{300}\
++  \u{301}\
++  \u{313}\
++  \u{308}\
++  \u{301}\
++  \u{3b9}\
++  \u{371}\
++  \u{373}\
++  \u{2b9}\
++  \u{377}\
++  \u{20}\
++  \u{3b9}\
++  \u{3b}\
++  \u{3f3}\
++  \u{20}\
++  \u{308}\
++  \u{301}\
++  \u{3ac}\
++  \u{b7}\
++  \u{3ad}\
++  \u{3ae}\
++  \u{3af}\
++  \u{3cc}\
++  \u{3cd}\
++  \u{3ce}\
++  \u{3b1}\
++  \u{3b2}\
++  \u{3b3}\
++  \u{3b4}\
++  \u{3b5}\
++  \u{3b6}\
++  \u{3b7}\
++  \u{3b8}\
++  \u{3ba}\
++  \u{3bb}\
++  \u{3bd}\
++  \u{3be}\
++  \u{3bf}\
++  \u{3c0}\
++  \u{3c1}\
++  \u{3c3}\
++  \u{3c4}\
++  \u{3c5}\
++  \u{3c6}\
++  \u{3c7}\
++  \u{3c8}\
++  \u{3c9}\
++  \u{3ca}\
++  \u{3cb}\
++  \u{3d7}\
++  \u{3d9}\
++  \u{3db}\
++  \u{3dd}\
++  \u{3df}\
++  \u{3e1}\
++  \u{3e3}\
++  \u{3e5}\
++  \u{3e7}\
++  \u{3e9}\
++  \u{3eb}\
++  \u{3ed}\
++  \u{3ef}\
++  \u{3f8}\
++  \u{3fb}\
++  \u{37b}\
++  \u{37c}\
++  \u{37d}\
++  \u{450}\
++  \u{451}\
++  \u{452}\
++  \u{453}\
++  \u{454}\
++  \u{455}\
++  \u{456}\
++  \u{457}\
++  \u{458}\
++  \u{459}\
++  \u{45a}\
++  \u{45b}\
++  \u{45c}\
++  \u{45d}\
++  \u{45e}\
++  \u{45f}\
++  \u{430}\
++  \u{431}\
++  \u{432}\
++  \u{433}\
++  \u{434}\
++  \u{435}\
++  \u{436}\
++  \u{437}\
++  \u{438}\
++  \u{439}\
++  \u{43a}\
++  \u{43b}\
++  \u{43c}\
++  \u{43d}\
++  \u{43e}\
++  \u{43f}\
++  \u{440}\
++  \u{441}\
++  \u{442}\
++  \u{443}\
++  \u{444}\
++  \u{445}\
++  \u{446}\
++  \u{447}\
++  \u{448}\
++  \u{449}\
++  \u{44a}\
++  \u{44b}\
++  \u{44c}\
++  \u{44d}\
++  \u{44e}\
++  \u{44f}\
++  \u{461}\
++  \u{463}\
++  \u{465}\
++  \u{467}\
++  \u{469}\
++  \u{46b}\
++  \u{46d}\
++  \u{46f}\
++  \u{471}\
++  \u{473}\
++  \u{475}\
++  \u{477}\
++  \u{479}\
++  \u{47b}\
++  \u{47d}\
++  \u{47f}\
++  \u{481}\
++  \u{48b}\
++  \u{48d}\
++  \u{48f}\
++  \u{491}\
++  \u{493}\
++  \u{495}\
++  \u{497}\
++  \u{499}\
++  \u{49b}\
++  \u{49d}\
++  \u{49f}\
++  \u{4a1}\
++  \u{4a3}\
++  \u{4a5}\
++  \u{4a7}\
++  \u{4a9}\
++  \u{4ab}\
++  \u{4ad}\
++  \u{4af}\
++  \u{4b1}\
++  \u{4b3}\
++  \u{4b5}\
++  \u{4b7}\
++  \u{4b9}\
++  \u{4bb}\
++  \u{4bd}\
++  \u{4bf}\
++  \u{4c2}\
++  \u{4c4}\
++  \u{4c6}\
++  \u{4c8}\
++  \u{4ca}\
++  \u{4cc}\
++  \u{4ce}\
++  \u{4d1}\
++  \u{4d3}\
++  \u{4d5}\
++  \u{4d7}\
++  \u{4d9}\
++  \u{4db}\
++  \u{4dd}\
++  \u{4df}\
++  \u{4e1}\
++  \u{4e3}\
++  \u{4e5}\
++  \u{4e7}\
++  \u{4e9}\
++  \u{4eb}\
++  \u{4ed}\
++  \u{4ef}\
++  \u{4f1}\
++  \u{4f3}\
++  \u{4f5}\
++  \u{4f7}\
++  \u{4f9}\
++  \u{4fb}\
++  \u{4fd}\
++  \u{4ff}\
++  \u{501}\
++  \u{503}\
++  \u{505}\
++  \u{507}\
++  \u{509}\
++  \u{50b}\
++  \u{50d}\
++  \u{50f}\
++  \u{511}\
++  \u{513}\
++  \u{515}\
++  \u{517}\
++  \u{519}\
++  \u{51b}\
++  \u{51d}\
++  \u{51f}\
++  \u{521}\
++  \u{523}\
++  \u{525}\
++  \u{527}\
++  \u{529}\
++  \u{52b}\
++  \u{52d}\
++  \u{52f}\
++  \u{561}\
++  \u{562}\
++  \u{563}\
++  \u{564}\
++  \u{565}\
++  \u{566}\
++  \u{567}\
++  \u{568}\
++  \u{569}\
++  \u{56a}\
++  \u{56b}\
++  \u{56c}\
++  \u{56d}\
++  \u{56e}\
++  \u{56f}\
++  \u{570}\
++  \u{571}\
++  \u{572}\
++  \u{573}\
++  \u{574}\
++  \u{575}\
++  \u{576}\
++  \u{577}\
++  \u{578}\
++  \u{579}\
++  \u{57a}\
++  \u{57b}\
++  \u{57c}\
++  \u{57d}\
++  \u{57e}\
++  \u{57f}\
++  \u{580}\
++  \u{581}\
++  \u{582}\
++  \u{583}\
++  \u{584}\
++  \u{585}\
++  \u{586}\
++  \u{565}\
++  \u{582}\
++  \u{627}\
++  \u{674}\
++  \u{648}\
++  \u{674}\
++  \u{6c7}\
++  \u{674}\
++  \u{64a}\
++  \u{674}\
++  \u{915}\
++  \u{93c}\
++  \u{916}\
++  \u{93c}\
++  \u{917}\
++  \u{93c}\
++  \u{91c}\
++  \u{93c}\
++  \u{921}\
++  \u{93c}\
++  \u{922}\
++  \u{93c}\
++  \u{92b}\
++  \u{93c}\
++  \u{92f}\
++  \u{93c}\
++  \u{9a1}\
++  \u{9bc}\
++  \u{9a2}\
++  \u{9bc}\
++  \u{9af}\
++  \u{9bc}\
++  \u{a32}\
++  \u{a3c}\
++  \u{a38}\
++  \u{a3c}\
++  \u{a16}\
++  \u{a3c}\
++  \u{a17}\
++  \u{a3c}\
++  \u{a1c}\
++  \u{a3c}\
++  \u{a2b}\
++  \u{a3c}\
++  \u{b21}\
++  \u{b3c}\
++  \u{b22}\
++  \u{b3c}\
++  \u{e4d}\
++  \u{e32}\
++  \u{ecd}\
++  \u{eb2}\
++  \u{eab}\
++  \u{e99}\
++  \u{eab}\
++  \u{ea1}\
++  \u{f0b}\
++  \u{f42}\
++  \u{fb7}\
++  \u{f4c}\
++  \u{fb7}\
++  \u{f51}\
++  \u{fb7}\
++  \u{f56}\
++  \u{fb7}\
++  \u{f5b}\
++  \u{fb7}\
++  \u{f40}\
++  \u{fb5}\
++  \u{f71}\
++  \u{f72}\
++  \u{f71}\
++  \u{f74}\
++  \u{fb2}\
++  \u{f80}\
++  \u{fb2}\
++  \u{f71}\
++  \u{f80}\
++  \u{fb3}\
++  \u{f80}\
++  \u{fb3}\
++  \u{f71}\
++  \u{f80}\
++  \u{f71}\
++  \u{f80}\
++  \u{f92}\
++  \u{fb7}\
++  \u{f9c}\
++  \u{fb7}\
++  \u{fa1}\
++  \u{fb7}\
++  \u{fa6}\
++  \u{fb7}\
++  \u{fab}\
++  \u{fb7}\
++  \u{f90}\
++  \u{fb5}\
++  \u{2d27}\
++  \u{2d2d}\
++  \u{10dc}\
++  \u{13f0}\
++  \u{13f1}\
++  \u{13f2}\
++  \u{13f3}\
++  \u{13f4}\
++  \u{13f5}\
++  \u{a64b}\
++  \u{250}\
++  \u{251}\
++  \u{1d02}\
++  \u{25c}\
++  \u{1d16}\
++  \u{1d17}\
++  \u{1d1d}\
++  \u{1d25}\
++  \u{252}\
++  \u{255}\
++  \u{25f}\
++  \u{261}\
++  \u{265}\
++  \u{26a}\
++  \u{1d7b}\
++  \u{29d}\
++  \u{26d}\
++  \u{1d85}\
++  \u{29f}\
++  \u{271}\
++  \u{270}\
++  \u{273}\
++  \u{274}\
++  \u{278}\
++  \u{282}\
++  \u{1ab}\
++  \u{1d1c}\
++  \u{290}\
++  \u{291}\
++  \u{1e01}\
++  \u{1e03}\
++  \u{1e05}\
++  \u{1e07}\
++  \u{1e09}\
++  \u{1e0b}\
++  \u{1e0d}\
++  \u{1e0f}\
++  \u{1e11}\
++  \u{1e13}\
++  \u{1e15}\
++  \u{1e17}\
++  \u{1e19}\
++  \u{1e1b}\
++  \u{1e1d}\
++  \u{1e1f}\
++  \u{1e21}\
++  \u{1e23}\
++  \u{1e25}\
++  \u{1e27}\
++  \u{1e29}\
++  \u{1e2b}\
++  \u{1e2d}\
++  \u{1e2f}\
++  \u{1e31}\
++  \u{1e33}\
++  \u{1e35}\
++  \u{1e37}\
++  \u{1e39}\
++  \u{1e3b}\
++  \u{1e3d}\
++  \u{1e3f}\
++  \u{1e41}\
++  \u{1e43}\
++  \u{1e45}\
++  \u{1e47}\
++  \u{1e49}\
++  \u{1e4b}\
++  \u{1e4d}\
++  \u{1e4f}\
++  \u{1e51}\
++  \u{1e53}\
++  \u{1e55}\
++  \u{1e57}\
++  \u{1e59}\
++  \u{1e5b}\
++  \u{1e5d}\
++  \u{1e5f}\
++  \u{1e61}\
++  \u{1e63}\
++  \u{1e65}\
++  \u{1e67}\
++  \u{1e69}\
++  \u{1e6b}\
++  \u{1e6d}\
++  \u{1e6f}\
++  \u{1e71}\
++  \u{1e73}\
++  \u{1e75}\
++  \u{1e77}\
++  \u{1e79}\
++  \u{1e7b}\
++  \u{1e7d}\
++  \u{1e7f}\
++  \u{1e81}\
++  \u{1e83}\
++  \u{1e85}\
++  \u{1e87}\
++  \u{1e89}\
++  \u{1e8b}\
++  \u{1e8d}\
++  \u{1e8f}\
++  \u{1e91}\
++  \u{1e93}\
++  \u{1e95}\
++  \u{61}\
++  \u{2be}\
++  \u{1ea1}\
++  \u{1ea3}\
++  \u{1ea5}\
++  \u{1ea7}\
++  \u{1ea9}\
++  \u{1eab}\
++  \u{1ead}\
++  \u{1eaf}\
++  \u{1eb1}\
++  \u{1eb3}\
++  \u{1eb5}\
++  \u{1eb7}\
++  \u{1eb9}\
++  \u{1ebb}\
++  \u{1ebd}\
++  \u{1ebf}\
++  \u{1ec1}\
++  \u{1ec3}\
++  \u{1ec5}\
++  \u{1ec7}\
++  \u{1ec9}\
++  \u{1ecb}\
++  \u{1ecd}\
++  \u{1ecf}\
++  \u{1ed1}\
++  \u{1ed3}\
++  \u{1ed5}\
++  \u{1ed7}\
++  \u{1ed9}\
++  \u{1edb}\
++  \u{1edd}\
++  \u{1edf}\
++  \u{1ee1}\
++  \u{1ee3}\
++  \u{1ee5}\
++  \u{1ee7}\
++  \u{1ee9}\
++  \u{1eeb}\
++  \u{1eed}\
++  \u{1eef}\
++  \u{1ef1}\
++  \u{1ef3}\
++  \u{1ef5}\
++  \u{1ef7}\
++  \u{1ef9}\
++  \u{1efb}\
++  \u{1efd}\
++  \u{1eff}\
++  \u{1f00}\
++  \u{1f01}\
++  \u{1f02}\
++  \u{1f03}\
++  \u{1f04}\
++  \u{1f05}\
++  \u{1f06}\
++  \u{1f07}\
++  \u{1f10}\
++  \u{1f11}\
++  \u{1f12}\
++  \u{1f13}\
++  \u{1f14}\
++  \u{1f15}\
++  \u{1f20}\
++  \u{1f21}\
++  \u{1f22}\
++  \u{1f23}\
++  \u{1f24}\
++  \u{1f25}\
++  \u{1f26}\
++  \u{1f27}\
++  \u{1f30}\
++  \u{1f31}\
++  \u{1f32}\
++  \u{1f33}\
++  \u{1f34}\
++  \u{1f35}\
++  \u{1f36}\
++  \u{1f37}\
++  \u{1f40}\
++  \u{1f41}\
++  \u{1f42}\
++  \u{1f43}\
++  \u{1f44}\
++  \u{1f45}\
++  \u{1f51}\
++  \u{1f53}\
++  \u{1f55}\
++  \u{1f57}\
++  \u{1f60}\
++  \u{1f61}\
++  \u{1f62}\
++  \u{1f63}\
++  \u{1f64}\
++  \u{1f65}\
++  \u{1f66}\
++  \u{1f67}\
++  \u{1f00}\
++  \u{3b9}\
++  \u{1f01}\
++  \u{3b9}\
++  \u{1f02}\
++  \u{3b9}\
++  \u{1f03}\
++  \u{3b9}\
++  \u{1f04}\
++  \u{3b9}\
++  \u{1f05}\
++  \u{3b9}\
++  \u{1f06}\
++  \u{3b9}\
++  \u{1f07}\
++  \u{3b9}\
++  \u{1f20}\
++  \u{3b9}\
++  \u{1f21}\
++  \u{3b9}\
++  \u{1f22}\
++  \u{3b9}\
++  \u{1f23}\
++  \u{3b9}\
++  \u{1f24}\
++  \u{3b9}\
++  \u{1f25}\
++  \u{3b9}\
++  \u{1f26}\
++  \u{3b9}\
++  \u{1f27}\
++  \u{3b9}\
++  \u{1f60}\
++  \u{3b9}\
++  \u{1f61}\
++  \u{3b9}\
++  \u{1f62}\
++  \u{3b9}\
++  \u{1f63}\
++  \u{3b9}\
++  \u{1f64}\
++  \u{3b9}\
++  \u{1f65}\
++  \u{3b9}\
++  \u{1f66}\
++  \u{3b9}\
++  \u{1f67}\
++  \u{3b9}\
++  \u{1f70}\
++  \u{3b9}\
++  \u{3b1}\
++  \u{3b9}\
++  \u{3ac}\
++  \u{3b9}\
++  \u{1fb6}\
++  \u{3b9}\
++  \u{1fb0}\
++  \u{1fb1}\
++  \u{1f70}\
++  \u{20}\
++  \u{313}\
++  \u{20}\
++  \u{342}\
++  \u{20}\
++  \u{308}\
++  \u{342}\
++  \u{1f74}\
++  \u{3b9}\
++  \u{3b7}\
++  \u{3b9}\
++  \u{3ae}\
++  \u{3b9}\
++  \u{1fc6}\
++  \u{3b9}\
++  \u{1f72}\
++  \u{1f74}\
++  \u{20}\
++  \u{313}\
++  \u{300}\
++  \u{20}\
++  \u{313}\
++  \u{301}\
++  \u{20}\
++  \u{313}\
++  \u{342}\
++  \u{390}\
++  \u{1fd0}\
++  \u{1fd1}\
++  \u{1f76}\
++  \u{20}\
++  \u{314}\
++  \u{300}\
++  \u{20}\
++  \u{314}\
++  \u{301}\
++  \u{20}\
++  \u{314}\
++  \u{342}\
++  \u{3b0}\
++  \u{1fe0}\
++  \u{1fe1}\
++  \u{1f7a}\
++  \u{1fe5}\
++  \u{20}\
++  \u{308}\
++  \u{300}\
++  \u{60}\
++  \u{1f7c}\
++  \u{3b9}\
++  \u{3c9}\
++  \u{3b9}\
++  \u{3ce}\
++  \u{3b9}\
++  \u{1ff6}\
++  \u{3b9}\
++  \u{1f78}\
++  \u{1f7c}\
++  \u{20}\
++  \u{314}\
++  \u{2010}\
++  \u{20}\
++  \u{333}\
++  \u{2032}\
++  \u{2032}\
++  \u{2032}\
++  \u{2032}\
++  \u{2032}\
++  \u{2035}\
++  \u{2035}\
++  \u{2035}\
++  \u{2035}\
++  \u{2035}\
++  \u{21}\
++  \u{21}\
++  \u{20}\
++  \u{305}\
++  \u{3f}\
++  \u{3f}\
++  \u{3f}\
++  \u{21}\
++  \u{21}\
++  \u{3f}\
++  \u{2032}\
++  \u{2032}\
++  \u{2032}\
++  \u{2032}\
++  \u{30}\
++  \u{34}\
++  \u{35}\
++  \u{36}\
++  \u{37}\
++  \u{38}\
++  \u{39}\
++  \u{2b}\
++  \u{2212}\
++  \u{3d}\
++  \u{28}\
++  \u{29}\
++  \u{72}\
++  \u{73}\
++  \u{61}\
++  \u{2f}\
++  \u{63}\
++  \u{61}\
++  \u{2f}\
++  \u{73}\
++  \u{b0}\
++  \u{63}\
++  \u{63}\
++  \u{2f}\
++  \u{6f}\
++  \u{63}\
++  \u{2f}\
++  \u{75}\
++  \u{b0}\
++  \u{66}\
++  \u{6e}\
++  \u{6f}\
++  \u{73}\
++  \u{6d}\
++  \u{74}\
++  \u{65}\
++  \u{6c}\
++  \u{74}\
++  \u{6d}\
++  \u{5d0}\
++  \u{5d1}\
++  \u{5d2}\
++  \u{5d3}\
++  \u{66}\
++  \u{61}\
++  \u{78}\
++  \u{2211}\
++  \u{31}\
++  \u{2044}\
++  \u{37}\
++  \u{31}\
++  \u{2044}\
++  \u{39}\
++  \u{31}\
++  \u{2044}\
++  \u{31}\
++  \u{30}\
++  \u{31}\
++  \u{2044}\
++  \u{33}\
++  \u{32}\
++  \u{2044}\
++  \u{33}\
++  \u{31}\
++  \u{2044}\
++  \u{35}\
++  \u{32}\
++  \u{2044}\
++  \u{35}\
++  \u{33}\
++  \u{2044}\
++  \u{35}\
++  \u{34}\
++  \u{2044}\
++  \u{35}\
++  \u{31}\
++  \u{2044}\
++  \u{36}\
++  \u{35}\
++  \u{2044}\
++  \u{36}\
++  \u{31}\
++  \u{2044}\
++  \u{38}\
++  \u{33}\
++  \u{2044}\
++  \u{38}\
++  \u{35}\
++  \u{2044}\
++  \u{38}\
++  \u{37}\
++  \u{2044}\
++  \u{38}\
++  \u{31}\
++  \u{2044}\
++  \u{69}\
++  \u{69}\
++  \u{69}\
++  \u{69}\
++  \u{69}\
++  \u{69}\
++  \u{76}\
++  \u{76}\
++  \u{69}\
++  \u{76}\
++  \u{69}\
++  \u{69}\
++  \u{76}\
++  \u{69}\
++  \u{69}\
++  \u{69}\
++  \u{69}\
++  \u{78}\
++  \u{78}\
++  \u{69}\
++  \u{78}\
++  \u{69}\
++  \u{69}\
++  \u{30}\
++  \u{2044}\
++  \u{33}\
++  \u{222b}\
++  \u{222b}\
++  \u{222b}\
++  \u{222b}\
++  \u{222b}\
++  \u{222e}\
++  \u{222e}\
++  \u{222e}\
++  \u{222e}\
++  \u{222e}\
++  \u{3008}\
++  \u{3009}\
++  \u{31}\
++  \u{30}\
++  \u{31}\
++  \u{31}\
++  \u{31}\
++  \u{32}\
++  \u{31}\
++  \u{33}\
++  \u{31}\
++  \u{34}\
++  \u{31}\
++  \u{35}\
++  \u{31}\
++  \u{36}\
++  \u{31}\
++  \u{37}\
++  \u{31}\
++  \u{38}\
++  \u{31}\
++  \u{39}\
++  \u{32}\
++  \u{30}\
++  \u{28}\
++  \u{31}\
++  \u{29}\
++  \u{28}\
++  \u{32}\
++  \u{29}\
++  \u{28}\
++  \u{33}\
++  \u{29}\
++  \u{28}\
++  \u{34}\
++  \u{29}\
++  \u{28}\
++  \u{35}\
++  \u{29}\
++  \u{28}\
++  \u{36}\
++  \u{29}\
++  \u{28}\
++  \u{37}\
++  \u{29}\
++  \u{28}\
++  \u{38}\
++  \u{29}\
++  \u{28}\
++  \u{39}\
++  \u{29}\
++  \u{28}\
++  \u{31}\
++  \u{30}\
++  \u{29}\
++  \u{28}\
++  \u{31}\
++  \u{31}\
++  \u{29}\
++  \u{28}\
++  \u{31}\
++  \u{32}\
++  \u{29}\
++  \u{28}\
++  \u{31}\
++  \u{33}\
++  \u{29}\
++  \u{28}\
++  \u{31}\
++  \u{34}\
++  \u{29}\
++  \u{28}\
++  \u{31}\
++  \u{35}\
++  \u{29}\
++  \u{28}\
++  \u{31}\
++  \u{36}\
++  \u{29}\
++  \u{28}\
++  \u{31}\
++  \u{37}\
++  \u{29}\
++  \u{28}\
++  \u{31}\
++  \u{38}\
++  \u{29}\
++  \u{28}\
++  \u{31}\
++  \u{39}\
++  \u{29}\
++  \u{28}\
++  \u{32}\
++  \u{30}\
++  \u{29}\
++  \u{28}\
++  \u{61}\
++  \u{29}\
++  \u{28}\
++  \u{62}\
++  \u{29}\
++  \u{28}\
++  \u{63}\
++  \u{29}\
++  \u{28}\
++  \u{64}\
++  \u{29}\
++  \u{28}\
++  \u{65}\
++  \u{29}\
++  \u{28}\
++  \u{66}\
++  \u{29}\
++  \u{28}\
++  \u{67}\
++  \u{29}\
++  \u{28}\
++  \u{68}\
++  \u{29}\
++  \u{28}\
++  \u{69}\
++  \u{29}\
++  \u{28}\
++  \u{6a}\
++  \u{29}\
++  \u{28}\
++  \u{6b}\
++  \u{29}\
++  \u{28}\
++  \u{6c}\
++  \u{29}\
++  \u{28}\
++  \u{6d}\
++  \u{29}\
++  \u{28}\
++  \u{6e}\
++  \u{29}\
++  \u{28}\
++  \u{6f}\
++  \u{29}\
++  \u{28}\
++  \u{70}\
++  \u{29}\
++  \u{28}\
++  \u{71}\
++  \u{29}\
++  \u{28}\
++  \u{72}\
++  \u{29}\
++  \u{28}\
++  \u{73}\
++  \u{29}\
++  \u{28}\
++  \u{74}\
++  \u{29}\
++  \u{28}\
++  \u{75}\
++  \u{29}\
++  \u{28}\
++  \u{76}\
++  \u{29}\
++  \u{28}\
++  \u{77}\
++  \u{29}\
++  \u{28}\
++  \u{78}\
++  \u{29}\
++  \u{28}\
++  \u{79}\
++  \u{29}\
++  \u{28}\
++  \u{7a}\
++  \u{29}\
++  \u{222b}\
++  \u{222b}\
++  \u{222b}\
++  \u{222b}\
++  \u{3a}\
++  \u{3a}\
++  \u{3d}\
++  \u{3d}\
++  \u{3d}\
++  \u{3d}\
++  \u{3d}\
++  \u{3d}\
++  \u{2add}\
++  \u{338}\
++  \u{2c30}\
++  \u{2c31}\
++  \u{2c32}\
++  \u{2c33}\
++  \u{2c34}\
++  \u{2c35}\
++  \u{2c36}\
++  \u{2c37}\
++  \u{2c38}\
++  \u{2c39}\
++  \u{2c3a}\
++  \u{2c3b}\
++  \u{2c3c}\
++  \u{2c3d}\
++  \u{2c3e}\
++  \u{2c3f}\
++  \u{2c40}\
++  \u{2c41}\
++  \u{2c42}\
++  \u{2c43}\
++  \u{2c44}\
++  \u{2c45}\
++  \u{2c46}\
++  \u{2c47}\
++  \u{2c48}\
++  \u{2c49}\
++  \u{2c4a}\
++  \u{2c4b}\
++  \u{2c4c}\
++  \u{2c4d}\
++  \u{2c4e}\
++  \u{2c4f}\
++  \u{2c50}\
++  \u{2c51}\
++  \u{2c52}\
++  \u{2c53}\
++  \u{2c54}\
++  \u{2c55}\
++  \u{2c56}\
++  \u{2c57}\
++  \u{2c58}\
++  \u{2c59}\
++  \u{2c5a}\
++  \u{2c5b}\
++  \u{2c5c}\
++  \u{2c5d}\
++  \u{2c5e}\
++  \u{2c61}\
++  \u{26b}\
++  \u{1d7d}\
++  \u{27d}\
++  \u{2c68}\
++  \u{2c6a}\
++  \u{2c6c}\
++  \u{2c73}\
++  \u{2c76}\
++  \u{23f}\
++  \u{240}\
++  \u{2c81}\
++  \u{2c83}\
++  \u{2c85}\
++  \u{2c87}\
++  \u{2c89}\
++  \u{2c8b}\
++  \u{2c8d}\
++  \u{2c8f}\
++  \u{2c91}\
++  \u{2c93}\
++  \u{2c95}\
++  \u{2c97}\
++  \u{2c99}\
++  \u{2c9b}\
++  \u{2c9d}\
++  \u{2c9f}\
++  \u{2ca1}\
++  \u{2ca3}\
++  \u{2ca5}\
++  \u{2ca7}\
++  \u{2ca9}\
++  \u{2cab}\
++  \u{2cad}\
++  \u{2caf}\
++  \u{2cb1}\
++  \u{2cb3}\
++  \u{2cb5}\
++  \u{2cb7}\
++  \u{2cb9}\
++  \u{2cbb}\
++  \u{2cbd}\
++  \u{2cbf}\
++  \u{2cc1}\
++  \u{2cc3}\
++  \u{2cc5}\
++  \u{2cc7}\
++  \u{2cc9}\
++  \u{2ccb}\
++  \u{2ccd}\
++  \u{2ccf}\
++  \u{2cd1}\
++  \u{2cd3}\
++  \u{2cd5}\
++  \u{2cd7}\
++  \u{2cd9}\
++  \u{2cdb}\
++  \u{2cdd}\
++  \u{2cdf}\
++  \u{2ce1}\
++  \u{2ce3}\
++  \u{2cec}\
++  \u{2cee}\
++  \u{2cf3}\
++  \u{2d61}\
++  \u{6bcd}\
++  \u{9f9f}\
++  \u{4e00}\
++  \u{4e28}\
++  \u{4e36}\
++  \u{4e3f}\
++  \u{4e59}\
++  \u{4e85}\
++  \u{4e8c}\
++  \u{4ea0}\
++  \u{4eba}\
++  \u{513f}\
++  \u{5165}\
++  \u{516b}\
++  \u{5182}\
++  \u{5196}\
++  \u{51ab}\
++  \u{51e0}\
++  \u{51f5}\
++  \u{5200}\
++  \u{529b}\
++  \u{52f9}\
++  \u{5315}\
++  \u{531a}\
++  \u{5338}\
++  \u{5341}\
++  \u{535c}\
++  \u{5369}\
++  \u{5382}\
++  \u{53b6}\
++  \u{53c8}\
++  \u{53e3}\
++  \u{56d7}\
++  \u{571f}\
++  \u{58eb}\
++  \u{5902}\
++  \u{590a}\
++  \u{5915}\
++  \u{5927}\
++  \u{5973}\
++  \u{5b50}\
++  \u{5b80}\
++  \u{5bf8}\
++  \u{5c0f}\
++  \u{5c22}\
++  \u{5c38}\
++  \u{5c6e}\
++  \u{5c71}\
++  \u{5ddb}\
++  \u{5de5}\
++  \u{5df1}\
++  \u{5dfe}\
++  \u{5e72}\
++  \u{5e7a}\
++  \u{5e7f}\
++  \u{5ef4}\
++  \u{5efe}\
++  \u{5f0b}\
++  \u{5f13}\
++  \u{5f50}\
++  \u{5f61}\
++  \u{5f73}\
++  \u{5fc3}\
++  \u{6208}\
++  \u{6236}\
++  \u{624b}\
++  \u{652f}\
++  \u{6534}\
++  \u{6587}\
++  \u{6597}\
++  \u{65a4}\
++  \u{65b9}\
++  \u{65e0}\
++  \u{65e5}\
++  \u{66f0}\
++  \u{6708}\
++  \u{6728}\
++  \u{6b20}\
++  \u{6b62}\
++  \u{6b79}\
++  \u{6bb3}\
++  \u{6bcb}\
++  \u{6bd4}\
++  \u{6bdb}\
++  \u{6c0f}\
++  \u{6c14}\
++  \u{6c34}\
++  \u{706b}\
++  \u{722a}\
++  \u{7236}\
++  \u{723b}\
++  \u{723f}\
++  \u{7247}\
++  \u{7259}\
++  \u{725b}\
++  \u{72ac}\
++  \u{7384}\
++  \u{7389}\
++  \u{74dc}\
++  \u{74e6}\
++  \u{7518}\
++  \u{751f}\
++  \u{7528}\
++  \u{7530}\
++  \u{758b}\
++  \u{7592}\
++  \u{7676}\
++  \u{767d}\
++  \u{76ae}\
++  \u{76bf}\
++  \u{76ee}\
++  \u{77db}\
++  \u{77e2}\
++  \u{77f3}\
++  \u{793a}\
++  \u{79b8}\
++  \u{79be}\
++  \u{7a74}\
++  \u{7acb}\
++  \u{7af9}\
++  \u{7c73}\
++  \u{7cf8}\
++  \u{7f36}\
++  \u{7f51}\
++  \u{7f8a}\
++  \u{7fbd}\
++  \u{8001}\
++  \u{800c}\
++  \u{8012}\
++  \u{8033}\
++  \u{807f}\
++  \u{8089}\
++  \u{81e3}\
++  \u{81ea}\
++  \u{81f3}\
++  \u{81fc}\
++  \u{820c}\
++  \u{821b}\
++  \u{821f}\
++  \u{826e}\
++  \u{8272}\
++  \u{8278}\
++  \u{864d}\
++  \u{866b}\
++  \u{8840}\
++  \u{884c}\
++  \u{8863}\
++  \u{897e}\
++  \u{898b}\
++  \u{89d2}\
++  \u{8a00}\
++  \u{8c37}\
++  \u{8c46}\
++  \u{8c55}\
++  \u{8c78}\
++  \u{8c9d}\
++  \u{8d64}\
++  \u{8d70}\
++  \u{8db3}\
++  \u{8eab}\
++  \u{8eca}\
++  \u{8f9b}\
++  \u{8fb0}\
++  \u{8fb5}\
++  \u{9091}\
++  \u{9149}\
++  \u{91c6}\
++  \u{91cc}\
++  \u{91d1}\
++  \u{9577}\
++  \u{9580}\
++  \u{961c}\
++  \u{96b6}\
++  \u{96b9}\
++  \u{96e8}\
++  \u{9751}\
++  \u{975e}\
++  \u{9762}\
++  \u{9769}\
++  \u{97cb}\
++  \u{97ed}\
++  \u{97f3}\
++  \u{9801}\
++  \u{98a8}\
++  \u{98db}\
++  \u{98df}\
++  \u{9996}\
++  \u{9999}\
++  \u{99ac}\
++  \u{9aa8}\
++  \u{9ad8}\
++  \u{9adf}\
++  \u{9b25}\
++  \u{9b2f}\
++  \u{9b32}\
++  \u{9b3c}\
++  \u{9b5a}\
++  \u{9ce5}\
++  \u{9e75}\
++  \u{9e7f}\
++  \u{9ea5}\
++  \u{9ebb}\
++  \u{9ec3}\
++  \u{9ecd}\
++  \u{9ed1}\
++  \u{9ef9}\
++  \u{9efd}\
++  \u{9f0e}\
++  \u{9f13}\
++  \u{9f20}\
++  \u{9f3b}\
++  \u{9f4a}\
++  \u{9f52}\
++  \u{9f8d}\
++  \u{9f9c}\
++  \u{9fa0}\
++  \u{2e}\
++  \u{3012}\
++  \u{5344}\
++  \u{5345}\
++  \u{20}\
++  \u{3099}\
++  \u{20}\
++  \u{309a}\
++  \u{3088}\
++  \u{308a}\
++  \u{30b3}\
++  \u{30c8}\
++  \u{1100}\
++  \u{1101}\
++  \u{11aa}\
++  \u{1102}\
++  \u{11ac}\
++  \u{11ad}\
++  \u{1103}\
++  \u{1104}\
++  \u{1105}\
++  \u{11b0}\
++  \u{11b1}\
++  \u{11b2}\
++  \u{11b3}\
++  \u{11b4}\
++  \u{11b5}\
++  \u{111a}\
++  \u{1106}\
++  \u{1107}\
++  \u{1108}\
++  \u{1121}\
++  \u{1109}\
++  \u{110a}\
++  \u{110b}\
++  \u{110c}\
++  \u{110d}\
++  \u{110e}\
++  \u{110f}\
++  \u{1110}\
++  \u{1111}\
++  \u{1112}\
++  \u{1161}\
++  \u{1162}\
++  \u{1163}\
++  \u{1164}\
++  \u{1165}\
++  \u{1166}\
++  \u{1167}\
++  \u{1168}\
++  \u{1169}\
++  \u{116a}\
++  \u{116b}\
++  \u{116c}\
++  \u{116d}\
++  \u{116e}\
++  \u{116f}\
++  \u{1170}\
++  \u{1171}\
++  \u{1172}\
++  \u{1173}\
++  \u{1174}\
++  \u{1175}\
++  \u{1114}\
++  \u{1115}\
++  \u{11c7}\
++  \u{11c8}\
++  \u{11cc}\
++  \u{11ce}\
++  \u{11d3}\
++  \u{11d7}\
++  \u{11d9}\
++  \u{111c}\
++  \u{11dd}\
++  \u{11df}\
++  \u{111d}\
++  \u{111e}\
++  \u{1120}\
++  \u{1122}\
++  \u{1123}\
++  \u{1127}\
++  \u{1129}\
++  \u{112b}\
++  \u{112c}\
++  \u{112d}\
++  \u{112e}\
++  \u{112f}\
++  \u{1132}\
++  \u{1136}\
++  \u{1140}\
++  \u{1147}\
++  \u{114c}\
++  \u{11f1}\
++  \u{11f2}\
++  \u{1157}\
++  \u{1158}\
++  \u{1159}\
++  \u{1184}\
++  \u{1185}\
++  \u{1188}\
++  \u{1191}\
++  \u{1192}\
++  \u{1194}\
++  \u{119e}\
++  \u{11a1}\
++  \u{4e09}\
++  \u{56db}\
++  \u{4e0a}\
++  \u{4e2d}\
++  \u{4e0b}\
++  \u{7532}\
++  \u{4e19}\
++  \u{4e01}\
++  \u{5929}\
++  \u{5730}\
++  \u{28}\
++  \u{1100}\
++  \u{29}\
++  \u{28}\
++  \u{1102}\
++  \u{29}\
++  \u{28}\
++  \u{1103}\
++  \u{29}\
++  \u{28}\
++  \u{1105}\
++  \u{29}\
++  \u{28}\
++  \u{1106}\
++  \u{29}\
++  \u{28}\
++  \u{1107}\
++  \u{29}\
++  \u{28}\
++  \u{1109}\
++  \u{29}\
++  \u{28}\
++  \u{110b}\
++  \u{29}\
++  \u{28}\
++  \u{110c}\
++  \u{29}\
++  \u{28}\
++  \u{110e}\
++  \u{29}\
++  \u{28}\
++  \u{110f}\
++  \u{29}\
++  \u{28}\
++  \u{1110}\
++  \u{29}\
++  \u{28}\
++  \u{1111}\
++  \u{29}\
++  \u{28}\
++  \u{1112}\
++  \u{29}\
++  \u{28}\
++  \u{ac00}\
++  \u{29}\
++  \u{28}\
++  \u{b098}\
++  \u{29}\
++  \u{28}\
++  \u{b2e4}\
++  \u{29}\
++  \u{28}\
++  \u{b77c}\
++  \u{29}\
++  \u{28}\
++  \u{b9c8}\
++  \u{29}\
++  \u{28}\
++  \u{bc14}\
++  \u{29}\
++  \u{28}\
++  \u{c0ac}\
++  \u{29}\
++  \u{28}\
++  \u{c544}\
++  \u{29}\
++  \u{28}\
++  \u{c790}\
++  \u{29}\
++  \u{28}\
++  \u{cc28}\
++  \u{29}\
++  \u{28}\
++  \u{ce74}\
++  \u{29}\
++  \u{28}\
++  \u{d0c0}\
++  \u{29}\
++  \u{28}\
++  \u{d30c}\
++  \u{29}\
++  \u{28}\
++  \u{d558}\
++  \u{29}\
++  \u{28}\
++  \u{c8fc}\
++  \u{29}\
++  \u{28}\
++  \u{c624}\
++  \u{c804}\
++  \u{29}\
++  \u{28}\
++  \u{c624}\
++  \u{d6c4}\
++  \u{29}\
++  \u{28}\
++  \u{4e00}\
++  \u{29}\
++  \u{28}\
++  \u{4e8c}\
++  \u{29}\
++  \u{28}\
++  \u{4e09}\
++  \u{29}\
++  \u{28}\
++  \u{56db}\
++  \u{29}\
++  \u{28}\
++  \u{4e94}\
++  \u{29}\
++  \u{28}\
++  \u{516d}\
++  \u{29}\
++  \u{28}\
++  \u{4e03}\
++  \u{29}\
++  \u{28}\
++  \u{516b}\
++  \u{29}\
++  \u{28}\
++  \u{4e5d}\
++  \u{29}\
++  \u{28}\
++  \u{5341}\
++  \u{29}\
++  \u{28}\
++  \u{6708}\
++  \u{29}\
++  \u{28}\
++  \u{706b}\
++  \u{29}\
++  \u{28}\
++  \u{6c34}\
++  \u{29}\
++  \u{28}\
++  \u{6728}\
++  \u{29}\
++  \u{28}\
++  \u{91d1}\
++  \u{29}\
++  \u{28}\
++  \u{571f}\
++  \u{29}\
++  \u{28}\
++  \u{65e5}\
++  \u{29}\
++  \u{28}\
++  \u{682a}\
++  \u{29}\
++  \u{28}\
++  \u{6709}\
++  \u{29}\
++  \u{28}\
++  \u{793e}\
++  \u{29}\
++  \u{28}\
++  \u{540d}\
++  \u{29}\
++  \u{28}\
++  \u{7279}\
++  \u{29}\
++  \u{28}\
++  \u{8ca1}\
++  \u{29}\
++  \u{28}\
++  \u{795d}\
++  \u{29}\
++  \u{28}\
++  \u{52b4}\
++  \u{29}\
++  \u{28}\
++  \u{4ee3}\
++  \u{29}\
++  \u{28}\
++  \u{547c}\
++  \u{29}\
++  \u{28}\
++  \u{5b66}\
++  \u{29}\
++  \u{28}\
++  \u{76e3}\
++  \u{29}\
++  \u{28}\
++  \u{4f01}\
++  \u{29}\
++  \u{28}\
++  \u{8cc7}\
++  \u{29}\
++  \u{28}\
++  \u{5354}\
++  \u{29}\
++  \u{28}\
++  \u{796d}\
++  \u{29}\
++  \u{28}\
++  \u{4f11}\
++  \u{29}\
++  \u{28}\
++  \u{81ea}\
++  \u{29}\
++  \u{28}\
++  \u{81f3}\
++  \u{29}\
++  \u{554f}\
++  \u{5e7c}\
++  \u{7b8f}\
++  \u{70}\
++  \u{74}\
++  \u{65}\
++  \u{32}\
++  \u{31}\
++  \u{32}\
++  \u{32}\
++  \u{32}\
++  \u{33}\
++  \u{32}\
++  \u{34}\
++  \u{32}\
++  \u{35}\
++  \u{32}\
++  \u{36}\
++  \u{32}\
++  \u{37}\
++  \u{32}\
++  \u{38}\
++  \u{32}\
++  \u{39}\
++  \u{33}\
++  \u{30}\
++  \u{33}\
++  \u{31}\
++  \u{33}\
++  \u{32}\
++  \u{33}\
++  \u{33}\
++  \u{33}\
++  \u{34}\
++  \u{33}\
++  \u{35}\
++  \u{ac00}\
++  \u{b098}\
++  \u{b2e4}\
++  \u{b77c}\
++  \u{b9c8}\
++  \u{bc14}\
++  \u{c0ac}\
++  \u{c544}\
++  \u{c790}\
++  \u{cc28}\
++  \u{ce74}\
++  \u{d0c0}\
++  \u{d30c}\
++  \u{d558}\
++  \u{cc38}\
++  \u{ace0}\
++  \u{c8fc}\
++  \u{c758}\
++  \u{c6b0}\
++  \u{4e94}\
++  \u{516d}\
++  \u{4e03}\
++  \u{4e5d}\
++  \u{682a}\
++  \u{6709}\
++  \u{793e}\
++  \u{540d}\
++  \u{7279}\
++  \u{8ca1}\
++  \u{795d}\
++  \u{52b4}\
++  \u{79d8}\
++  \u{7537}\
++  \u{9069}\
++  \u{512a}\
++  \u{5370}\
++  \u{6ce8}\
++  \u{9805}\
++  \u{4f11}\
++  \u{5199}\
++  \u{6b63}\
++  \u{5de6}\
++  \u{53f3}\
++  \u{533b}\
++  \u{5b97}\
++  \u{5b66}\
++  \u{76e3}\
++  \u{4f01}\
++  \u{8cc7}\
++  \u{5354}\
++  \u{591c}\
++  \u{33}\
++  \u{36}\
++  \u{33}\
++  \u{37}\
++  \u{33}\
++  \u{38}\
++  \u{33}\
++  \u{39}\
++  \u{34}\
++  \u{30}\
++  \u{34}\
++  \u{31}\
++  \u{34}\
++  \u{32}\
++  \u{34}\
++  \u{33}\
++  \u{34}\
++  \u{34}\
++  \u{34}\
++  \u{35}\
++  \u{34}\
++  \u{36}\
++  \u{34}\
++  \u{37}\
++  \u{34}\
++  \u{38}\
++  \u{34}\
++  \u{39}\
++  \u{35}\
++  \u{30}\
++  \u{31}\
++  \u{6708}\
++  \u{32}\
++  \u{6708}\
++  \u{33}\
++  \u{6708}\
++  \u{34}\
++  \u{6708}\
++  \u{35}\
++  \u{6708}\
++  \u{36}\
++  \u{6708}\
++  \u{37}\
++  \u{6708}\
++  \u{38}\
++  \u{6708}\
++  \u{39}\
++  \u{6708}\
++  \u{31}\
++  \u{30}\
++  \u{6708}\
++  \u{31}\
++  \u{31}\
++  \u{6708}\
++  \u{31}\
++  \u{32}\
++  \u{6708}\
++  \u{68}\
++  \u{67}\
++  \u{65}\
++  \u{72}\
++  \u{67}\
++  \u{65}\
++  \u{76}\
++  \u{6c}\
++  \u{74}\
++  \u{64}\
++  \u{30a2}\
++  \u{30a4}\
++  \u{30a6}\
++  \u{30a8}\
++  \u{30aa}\
++  \u{30ab}\
++  \u{30ad}\
++  \u{30af}\
++  \u{30b1}\
++  \u{30b3}\
++  \u{30b5}\
++  \u{30b7}\
++  \u{30b9}\
++  \u{30bb}\
++  \u{30bd}\
++  \u{30bf}\
++  \u{30c1}\
++  \u{30c4}\
++  \u{30c6}\
++  \u{30c8}\
++  \u{30ca}\
++  \u{30cb}\
++  \u{30cc}\
++  \u{30cd}\
++  \u{30ce}\
++  \u{30cf}\
++  \u{30d2}\
++  \u{30d5}\
++  \u{30d8}\
++  \u{30db}\
++  \u{30de}\
++  \u{30df}\
++  \u{30e0}\
++  \u{30e1}\
++  \u{30e2}\
++  \u{30e4}\
++  \u{30e6}\
++  \u{30e8}\
++  \u{30e9}\
++  \u{30ea}\
++  \u{30eb}\
++  \u{30ec}\
++  \u{30ed}\
++  \u{30ef}\
++  \u{30f0}\
++  \u{30f1}\
++  \u{30f2}\
++  \u{30a2}\
++  \u{30d1}\
++  \u{30fc}\
++  \u{30c8}\
++  \u{30a2}\
++  \u{30eb}\
++  \u{30d5}\
++  \u{30a1}\
++  \u{30a2}\
++  \u{30f3}\
++  \u{30da}\
++  \u{30a2}\
++  \u{30a2}\
++  \u{30fc}\
++  \u{30eb}\
++  \u{30a4}\
++  \u{30cb}\
++  \u{30f3}\
++  \u{30b0}\
++  \u{30a4}\
++  \u{30f3}\
++  \u{30c1}\
++  \u{30a6}\
++  \u{30a9}\
++  \u{30f3}\
++  \u{30a8}\
++  \u{30b9}\
++  \u{30af}\
++  \u{30fc}\
++  \u{30c9}\
++  \u{30a8}\
++  \u{30fc}\
++  \u{30ab}\
++  \u{30fc}\
++  \u{30aa}\
++  \u{30f3}\
++  \u{30b9}\
++  \u{30aa}\
++  \u{30fc}\
++  \u{30e0}\
++  \u{30ab}\
++  \u{30a4}\
++  \u{30ea}\
++  \u{30ab}\
++  \u{30e9}\
++  \u{30c3}\
++  \u{30c8}\
++  \u{30ab}\
++  \u{30ed}\
++  \u{30ea}\
++  \u{30fc}\
++  \u{30ac}\
++  \u{30ed}\
++  \u{30f3}\
++  \u{30ac}\
++  \u{30f3}\
++  \u{30de}\
++  \u{30ae}\
++  \u{30ac}\
++  \u{30ae}\
++  \u{30cb}\
++  \u{30fc}\
++  \u{30ad}\
++  \u{30e5}\
++  \u{30ea}\
++  \u{30fc}\
++  \u{30ae}\
++  \u{30eb}\
++  \u{30c0}\
++  \u{30fc}\
++  \u{30ad}\
++  \u{30ed}\
++  \u{30ad}\
++  \u{30ed}\
++  \u{30b0}\
++  \u{30e9}\
++  \u{30e0}\
++  \u{30ad}\
++  \u{30ed}\
++  \u{30e1}\
++  \u{30fc}\
++  \u{30c8}\
++  \u{30eb}\
++  \u{30ad}\
++  \u{30ed}\
++  \u{30ef}\
++  \u{30c3}\
++  \u{30c8}\
++  \u{30b0}\
++  \u{30e9}\
++  \u{30e0}\
++  \u{30b0}\
++  \u{30e9}\
++  \u{30e0}\
++  \u{30c8}\
++  \u{30f3}\
++  \u{30af}\
++  \u{30eb}\
++  \u{30bc}\
++  \u{30a4}\
++  \u{30ed}\
++  \u{30af}\
++  \u{30ed}\
++  \u{30fc}\
++  \u{30cd}\
++  \u{30b1}\
++  \u{30fc}\
++  \u{30b9}\
++  \u{30b3}\
++  \u{30eb}\
++  \u{30ca}\
++  \u{30b3}\
++  \u{30fc}\
++  \u{30dd}\
++  \u{30b5}\
++  \u{30a4}\
++  \u{30af}\
++  \u{30eb}\
++  \u{30b5}\
++  \u{30f3}\
++  \u{30c1}\
++  \u{30fc}\
++  \u{30e0}\
++  \u{30b7}\
++  \u{30ea}\
++  \u{30f3}\
++  \u{30b0}\
++  \u{30bb}\
++  \u{30f3}\
++  \u{30c1}\
++  \u{30bb}\
++  \u{30f3}\
++  \u{30c8}\
++  \u{30c0}\
++  \u{30fc}\
++  \u{30b9}\
++  \u{30c7}\
++  \u{30b7}\
++  \u{30c9}\
++  \u{30eb}\
++  \u{30c8}\
++  \u{30f3}\
++  \u{30ca}\
++  \u{30ce}\
++  \u{30ce}\
++  \u{30c3}\
++  \u{30c8}\
++  \u{30cf}\
++  \u{30a4}\
++  \u{30c4}\
++  \u{30d1}\
++  \u{30fc}\
++  \u{30bb}\
++  \u{30f3}\
++  \u{30c8}\
++  \u{30d1}\
++  \u{30fc}\
++  \u{30c4}\
++  \u{30d0}\
++  \u{30fc}\
++  \u{30ec}\
++  \u{30eb}\
++  \u{30d4}\
++  \u{30a2}\
++  \u{30b9}\
++  \u{30c8}\
++  \u{30eb}\
++  \u{30d4}\
++  \u{30af}\
++  \u{30eb}\
++  \u{30d4}\
++  \u{30b3}\
++  \u{30d3}\
++  \u{30eb}\
++  \u{30d5}\
++  \u{30a1}\
++  \u{30e9}\
++  \u{30c3}\
++  \u{30c9}\
++  \u{30d5}\
++  \u{30a3}\
++  \u{30fc}\
++  \u{30c8}\
++  \u{30d6}\
++  \u{30c3}\
++  \u{30b7}\
++  \u{30a7}\
++  \u{30eb}\
++  \u{30d5}\
++  \u{30e9}\
++  \u{30f3}\
++  \u{30d8}\
++  \u{30af}\
++  \u{30bf}\
++  \u{30fc}\
++  \u{30eb}\
++  \u{30da}\
++  \u{30bd}\
++  \u{30da}\
++  \u{30cb}\
++  \u{30d2}\
++  \u{30d8}\
++  \u{30eb}\
++  \u{30c4}\
++  \u{30da}\
++  \u{30f3}\
++  \u{30b9}\
++  \u{30da}\
++  \u{30fc}\
++  \u{30b8}\
++  \u{30d9}\
++  \u{30fc}\
++  \u{30bf}\
++  \u{30dd}\
++  \u{30a4}\
++  \u{30f3}\
++  \u{30c8}\
++  \u{30dc}\
++  \u{30eb}\
++  \u{30c8}\
++  \u{30db}\
++  \u{30f3}\
++  \u{30dd}\
++  \u{30f3}\
++  \u{30c9}\
++  \u{30db}\
++  \u{30fc}\
++  \u{30eb}\
++  \u{30db}\
++  \u{30fc}\
++  \u{30f3}\
++  \u{30de}\
++  \u{30a4}\
++  \u{30af}\
++  \u{30ed}\
++  \u{30de}\
++  \u{30a4}\
++  \u{30eb}\
++  \u{30de}\
++  \u{30c3}\
++  \u{30cf}\
++  \u{30de}\
++  \u{30eb}\
++  \u{30af}\
++  \u{30de}\
++  \u{30f3}\
++  \u{30b7}\
++  \u{30e7}\
++  \u{30f3}\
++  \u{30df}\
++  \u{30af}\
++  \u{30ed}\
++  \u{30f3}\
++  \u{30df}\
++  \u{30ea}\
++  \u{30df}\
++  \u{30ea}\
++  \u{30d0}\
++  \u{30fc}\
++  \u{30eb}\
++  \u{30e1}\
++  \u{30ac}\
++  \u{30e1}\
++  \u{30ac}\
++  \u{30c8}\
++  \u{30f3}\
++  \u{30e1}\
++  \u{30fc}\
++  \u{30c8}\
++  \u{30eb}\
++  \u{30e4}\
++  \u{30fc}\
++  \u{30c9}\
++  \u{30e4}\
++  \u{30fc}\
++  \u{30eb}\
++  \u{30e6}\
++  \u{30a2}\
++  \u{30f3}\
++  \u{30ea}\
++  \u{30c3}\
++  \u{30c8}\
++  \u{30eb}\
++  \u{30ea}\
++  \u{30e9}\
++  \u{30eb}\
++  \u{30d4}\
++  \u{30fc}\
++  \u{30eb}\
++  \u{30fc}\
++  \u{30d6}\
++  \u{30eb}\
++  \u{30ec}\
++  \u{30e0}\
++  \u{30ec}\
++  \u{30f3}\
++  \u{30c8}\
++  \u{30b2}\
++  \u{30f3}\
++  \u{30ef}\
++  \u{30c3}\
++  \u{30c8}\
++  \u{30}\
++  \u{70b9}\
++  \u{31}\
++  \u{70b9}\
++  \u{32}\
++  \u{70b9}\
++  \u{33}\
++  \u{70b9}\
++  \u{34}\
++  \u{70b9}\
++  \u{35}\
++  \u{70b9}\
++  \u{36}\
++  \u{70b9}\
++  \u{37}\
++  \u{70b9}\
++  \u{38}\
++  \u{70b9}\
++  \u{39}\
++  \u{70b9}\
++  \u{31}\
++  \u{30}\
++  \u{70b9}\
++  \u{31}\
++  \u{31}\
++  \u{70b9}\
++  \u{31}\
++  \u{32}\
++  \u{70b9}\
++  \u{31}\
++  \u{33}\
++  \u{70b9}\
++  \u{31}\
++  \u{34}\
++  \u{70b9}\
++  \u{31}\
++  \u{35}\
++  \u{70b9}\
++  \u{31}\
++  \u{36}\
++  \u{70b9}\
++  \u{31}\
++  \u{37}\
++  \u{70b9}\
++  \u{31}\
++  \u{38}\
++  \u{70b9}\
++  \u{31}\
++  \u{39}\
++  \u{70b9}\
++  \u{32}\
++  \u{30}\
++  \u{70b9}\
++  \u{32}\
++  \u{31}\
++  \u{70b9}\
++  \u{32}\
++  \u{32}\
++  \u{70b9}\
++  \u{32}\
++  \u{33}\
++  \u{70b9}\
++  \u{32}\
++  \u{34}\
++  \u{70b9}\
++  \u{68}\
++  \u{70}\
++  \u{61}\
++  \u{64}\
++  \u{61}\
++  \u{61}\
++  \u{75}\
++  \u{62}\
++  \u{61}\
++  \u{72}\
++  \u{6f}\
++  \u{76}\
++  \u{70}\
++  \u{63}\
++  \u{64}\
++  \u{6d}\
++  \u{64}\
++  \u{6d}\
++  \u{32}\
++  \u{64}\
++  \u{6d}\
++  \u{33}\
++  \u{69}\
++  \u{75}\
++  \u{5e73}\
++  \u{6210}\
++  \u{662d}\
++  \u{548c}\
++  \u{5927}\
++  \u{6b63}\
++  \u{660e}\
++  \u{6cbb}\
++  \u{682a}\
++  \u{5f0f}\
++  \u{4f1a}\
++  \u{793e}\
++  \u{70}\
++  \u{61}\
++  \u{6e}\
++  \u{61}\
++  \u{3bc}\
++  \u{61}\
++  \u{6d}\
++  \u{61}\
++  \u{6b}\
++  \u{61}\
++  \u{6b}\
++  \u{62}\
++  \u{6d}\
++  \u{62}\
++  \u{67}\
++  \u{62}\
++  \u{63}\
++  \u{61}\
++  \u{6c}\
++  \u{6b}\
++  \u{63}\
++  \u{61}\
++  \u{6c}\
++  \u{70}\
++  \u{66}\
++  \u{6e}\
++  \u{66}\
++  \u{3bc}\
++  \u{66}\
++  \u{3bc}\
++  \u{67}\
++  \u{6d}\
++  \u{67}\
++  \u{6b}\
++  \u{67}\
++  \u{68}\
++  \u{7a}\
++  \u{6b}\
++  \u{68}\
++  \u{7a}\
++  \u{6d}\
++  \u{68}\
++  \u{7a}\
++  \u{67}\
++  \u{68}\
++  \u{7a}\
++  \u{74}\
++  \u{68}\
++  \u{7a}\
++  \u{3bc}\
++  \u{6c}\
++  \u{6d}\
++  \u{6c}\
++  \u{64}\
++  \u{6c}\
++  \u{6b}\
++  \u{6c}\
++  \u{66}\
++  \u{6d}\
++  \u{6e}\
++  \u{6d}\
++  \u{3bc}\
++  \u{6d}\
++  \u{6d}\
++  \u{6d}\
++  \u{63}\
++  \u{6d}\
++  \u{6b}\
++  \u{6d}\
++  \u{6d}\
++  \u{6d}\
++  \u{32}\
++  \u{63}\
++  \u{6d}\
++  \u{32}\
++  \u{6d}\
++  \u{32}\
++  \u{6b}\
++  \u{6d}\
++  \u{32}\
++  \u{6d}\
++  \u{6d}\
++  \u{33}\
++  \u{63}\
++  \u{6d}\
++  \u{33}\
++  \u{6d}\
++  \u{33}\
++  \u{6b}\
++  \u{6d}\
++  \u{33}\
++  \u{6d}\
++  \u{2215}\
++  \u{73}\
++  \u{6d}\
++  \u{2215}\
++  \u{73}\
++  \u{32}\
++  \u{6b}\
++  \u{70}\
++  \u{61}\
++  \u{6d}\
++  \u{70}\
++  \u{61}\
++  \u{67}\
++  \u{70}\
++  \u{61}\
++  \u{72}\
++  \u{61}\
++  \u{64}\
++  \u{72}\
++  \u{61}\
++  \u{64}\
++  \u{2215}\
++  \u{73}\
++  \u{72}\
++  \u{61}\
++  \u{64}\
++  \u{2215}\
++  \u{73}\
++  \u{32}\
++  \u{70}\
++  \u{73}\
++  \u{6e}\
++  \u{73}\
++  \u{3bc}\
++  \u{73}\
++  \u{6d}\
++  \u{73}\
++  \u{70}\
++  \u{76}\
++  \u{6e}\
++  \u{76}\
++  \u{3bc}\
++  \u{76}\
++  \u{6d}\
++  \u{76}\
++  \u{6b}\
++  \u{76}\
++  \u{70}\
++  \u{77}\
++  \u{6e}\
++  \u{77}\
++  \u{3bc}\
++  \u{77}\
++  \u{6d}\
++  \u{77}\
++  \u{6b}\
++  \u{77}\
++  \u{6b}\
++  \u{3c9}\
++  \u{6d}\
++  \u{3c9}\
++  \u{62}\
++  \u{71}\
++  \u{63}\
++  \u{63}\
++  \u{63}\
++  \u{64}\
++  \u{63}\
++  \u{2215}\
++  \u{6b}\
++  \u{67}\
++  \u{64}\
++  \u{62}\
++  \u{67}\
++  \u{79}\
++  \u{68}\
++  \u{61}\
++  \u{68}\
++  \u{70}\
++  \u{69}\
++  \u{6e}\
++  \u{6b}\
++  \u{6b}\
++  \u{6b}\
++  \u{74}\
++  \u{6c}\
++  \u{6d}\
++  \u{6c}\
++  \u{6e}\
++  \u{6c}\
++  \u{6f}\
++  \u{67}\
++  \u{6c}\
++  \u{78}\
++  \u{6d}\
++  \u{69}\
++  \u{6c}\
++  \u{6d}\
++  \u{6f}\
++  \u{6c}\
++  \u{70}\
++  \u{68}\
++  \u{70}\
++  \u{70}\
++  \u{6d}\
++  \u{70}\
++  \u{72}\
++  \u{73}\
++  \u{72}\
++  \u{73}\
++  \u{76}\
++  \u{77}\
++  \u{62}\
++  \u{76}\
++  \u{2215}\
++  \u{6d}\
++  \u{61}\
++  \u{2215}\
++  \u{6d}\
++  \u{31}\
++  \u{65e5}\
++  \u{32}\
++  \u{65e5}\
++  \u{33}\
++  \u{65e5}\
++  \u{34}\
++  \u{65e5}\
++  \u{35}\
++  \u{65e5}\
++  \u{36}\
++  \u{65e5}\
++  \u{37}\
++  \u{65e5}\
++  \u{38}\
++  \u{65e5}\
++  \u{39}\
++  \u{65e5}\
++  \u{31}\
++  \u{30}\
++  \u{65e5}\
++  \u{31}\
++  \u{31}\
++  \u{65e5}\
++  \u{31}\
++  \u{32}\
++  \u{65e5}\
++  \u{31}\
++  \u{33}\
++  \u{65e5}\
++  \u{31}\
++  \u{34}\
++  \u{65e5}\
++  \u{31}\
++  \u{35}\
++  \u{65e5}\
++  \u{31}\
++  \u{36}\
++  \u{65e5}\
++  \u{31}\
++  \u{37}\
++  \u{65e5}\
++  \u{31}\
++  \u{38}\
++  \u{65e5}\
++  \u{31}\
++  \u{39}\
++  \u{65e5}\
++  \u{32}\
++  \u{30}\
++  \u{65e5}\
++  \u{32}\
++  \u{31}\
++  \u{65e5}\
++  \u{32}\
++  \u{32}\
++  \u{65e5}\
++  \u{32}\
++  \u{33}\
++  \u{65e5}\
++  \u{32}\
++  \u{34}\
++  \u{65e5}\
++  \u{32}\
++  \u{35}\
++  \u{65e5}\
++  \u{32}\
++  \u{36}\
++  \u{65e5}\
++  \u{32}\
++  \u{37}\
++  \u{65e5}\
++  \u{32}\
++  \u{38}\
++  \u{65e5}\
++  \u{32}\
++  \u{39}\
++  \u{65e5}\
++  \u{33}\
++  \u{30}\
++  \u{65e5}\
++  \u{33}\
++  \u{31}\
++  \u{65e5}\
++  \u{67}\
++  \u{61}\
++  \u{6c}\
++  \u{a641}\
++  \u{a643}\
++  \u{a645}\
++  \u{a647}\
++  \u{a649}\
++  \u{a64d}\
++  \u{a64f}\
++  \u{a651}\
++  \u{a653}\
++  \u{a655}\
++  \u{a657}\
++  \u{a659}\
++  \u{a65b}\
++  \u{a65d}\
++  \u{a65f}\
++  \u{a661}\
++  \u{a663}\
++  \u{a665}\
++  \u{a667}\
++  \u{a669}\
++  \u{a66b}\
++  \u{a66d}\
++  \u{a681}\
++  \u{a683}\
++  \u{a685}\
++  \u{a687}\
++  \u{a689}\
++  \u{a68b}\
++  \u{a68d}\
++  \u{a68f}\
++  \u{a691}\
++  \u{a693}\
++  \u{a695}\
++  \u{a697}\
++  \u{a699}\
++  \u{a69b}\
++  \u{a723}\
++  \u{a725}\
++  \u{a727}\
++  \u{a729}\
++  \u{a72b}\
++  \u{a72d}\
++  \u{a72f}\
++  \u{a733}\
++  \u{a735}\
++  \u{a737}\
++  \u{a739}\
++  \u{a73b}\
++  \u{a73d}\
++  \u{a73f}\
++  \u{a741}\
++  \u{a743}\
++  \u{a745}\
++  \u{a747}\
++  \u{a749}\
++  \u{a74b}\
++  \u{a74d}\
++  \u{a74f}\
++  \u{a751}\
++  \u{a753}\
++  \u{a755}\
++  \u{a757}\
++  \u{a759}\
++  \u{a75b}\
++  \u{a75d}\
++  \u{a75f}\
++  \u{a761}\
++  \u{a763}\
++  \u{a765}\
++  \u{a767}\
++  \u{a769}\
++  \u{a76b}\
++  \u{a76d}\
++  \u{a76f}\
++  \u{a77a}\
++  \u{a77c}\
++  \u{1d79}\
++  \u{a77f}\
++  \u{a781}\
++  \u{a783}\
++  \u{a785}\
++  \u{a787}\
++  \u{a78c}\
++  \u{a791}\
++  \u{a793}\
++  \u{a797}\
++  \u{a799}\
++  \u{a79b}\
++  \u{a79d}\
++  \u{a79f}\
++  \u{a7a1}\
++  \u{a7a3}\
++  \u{a7a5}\
++  \u{a7a7}\
++  \u{a7a9}\
++  \u{26c}\
++  \u{29e}\
++  \u{287}\
++  \u{ab53}\
++  \u{a7b5}\
++  \u{a7b7}\
++  \u{ab37}\
++  \u{ab52}\
++  \u{13a0}\
++  \u{13a1}\
++  \u{13a2}\
++  \u{13a3}\
++  \u{13a4}\
++  \u{13a5}\
++  \u{13a6}\
++  \u{13a7}\
++  \u{13a8}\
++  \u{13a9}\
++  \u{13aa}\
++  \u{13ab}\
++  \u{13ac}\
++  \u{13ad}\
++  \u{13ae}\
++  \u{13af}\
++  \u{13b0}\
++  \u{13b1}\
++  \u{13b2}\
++  \u{13b3}\
++  \u{13b4}\
++  \u{13b5}\
++  \u{13b6}\
++  \u{13b7}\
++  \u{13b8}\
++  \u{13b9}\
++  \u{13ba}\
++  \u{13bb}\
++  \u{13bc}\
++  \u{13bd}\
++  \u{13be}\
++  \u{13bf}\
++  \u{13c0}\
++  \u{13c1}\
++  \u{13c2}\
++  \u{13c3}\
++  \u{13c4}\
++  \u{13c5}\
++  \u{13c6}\
++  \u{13c7}\
++  \u{13c8}\
++  \u{13c9}\
++  \u{13ca}\
++  \u{13cb}\
++  \u{13cc}\
++  \u{13cd}\
++  \u{13ce}\
++  \u{13cf}\
++  \u{13d0}\
++  \u{13d1}\
++  \u{13d2}\
++  \u{13d3}\
++  \u{13d4}\
++  \u{13d5}\
++  \u{13d6}\
++  \u{13d7}\
++  \u{13d8}\
++  \u{13d9}\
++  \u{13da}\
++  \u{13db}\
++  \u{13dc}\
++  \u{13dd}\
++  \u{13de}\
++  \u{13df}\
++  \u{13e0}\
++  \u{13e1}\
++  \u{13e2}\
++  \u{13e3}\
++  \u{13e4}\
++  \u{13e5}\
++  \u{13e6}\
++  \u{13e7}\
++  \u{13e8}\
++  \u{13e9}\
++  \u{13ea}\
++  \u{13eb}\
++  \u{13ec}\
++  \u{13ed}\
++  \u{13ee}\
++  \u{13ef}\
++  \u{8c48}\
++  \u{66f4}\
++  \u{8cc8}\
++  \u{6ed1}\
++  \u{4e32}\
++  \u{53e5}\
++  \u{5951}\
++  \u{5587}\
++  \u{5948}\
++  \u{61f6}\
++  \u{7669}\
++  \u{7f85}\
++  \u{863f}\
++  \u{87ba}\
++  \u{88f8}\
++  \u{908f}\
++  \u{6a02}\
++  \u{6d1b}\
++  \u{70d9}\
++  \u{73de}\
++  \u{843d}\
++  \u{916a}\
++  \u{99f1}\
++  \u{4e82}\
++  \u{5375}\
++  \u{6b04}\
++  \u{721b}\
++  \u{862d}\
++  \u{9e1e}\
++  \u{5d50}\
++  \u{6feb}\
++  \u{85cd}\
++  \u{8964}\
++  \u{62c9}\
++  \u{81d8}\
++  \u{881f}\
++  \u{5eca}\
++  \u{6717}\
++  \u{6d6a}\
++  \u{72fc}\
++  \u{90ce}\
++  \u{4f86}\
++  \u{51b7}\
++  \u{52de}\
++  \u{64c4}\
++  \u{6ad3}\
++  \u{7210}\
++  \u{76e7}\
++  \u{8606}\
++  \u{865c}\
++  \u{8def}\
++  \u{9732}\
++  \u{9b6f}\
++  \u{9dfa}\
++  \u{788c}\
++  \u{797f}\
++  \u{7da0}\
++  \u{83c9}\
++  \u{9304}\
++  \u{8ad6}\
++  \u{58df}\
++  \u{5f04}\
++  \u{7c60}\
++  \u{807e}\
++  \u{7262}\
++  \u{78ca}\
++  \u{8cc2}\
++  \u{96f7}\
++  \u{58d8}\
++  \u{5c62}\
++  \u{6a13}\
++  \u{6dda}\
++  \u{6f0f}\
++  \u{7d2f}\
++  \u{7e37}\
++  \u{964b}\
++  \u{52d2}\
++  \u{808b}\
++  \u{51dc}\
++  \u{51cc}\
++  \u{7a1c}\
++  \u{7dbe}\
++  \u{83f1}\
++  \u{9675}\
++  \u{8b80}\
++  \u{62cf}\
++  \u{8afe}\
++  \u{4e39}\
++  \u{5be7}\
++  \u{6012}\
++  \u{7387}\
++  \u{7570}\
++  \u{5317}\
++  \u{78fb}\
++  \u{4fbf}\
++  \u{5fa9}\
++  \u{4e0d}\
++  \u{6ccc}\
++  \u{6578}\
++  \u{7d22}\
++  \u{53c3}\
++  \u{585e}\
++  \u{7701}\
++  \u{8449}\
++  \u{8aaa}\
++  \u{6bba}\
++  \u{6c88}\
++  \u{62fe}\
++  \u{82e5}\
++  \u{63a0}\
++  \u{7565}\
++  \u{4eae}\
++  \u{5169}\
++  \u{51c9}\
++  \u{6881}\
++  \u{7ce7}\
++  \u{826f}\
++  \u{8ad2}\
++  \u{91cf}\
++  \u{52f5}\
++  \u{5442}\
++  \u{5eec}\
++  \u{65c5}\
++  \u{6ffe}\
++  \u{792a}\
++  \u{95ad}\
++  \u{9a6a}\
++  \u{9e97}\
++  \u{9ece}\
++  \u{66c6}\
++  \u{6b77}\
++  \u{8f62}\
++  \u{5e74}\
++  \u{6190}\
++  \u{6200}\
++  \u{649a}\
++  \u{6f23}\
++  \u{7149}\
++  \u{7489}\
++  \u{79ca}\
++  \u{7df4}\
++  \u{806f}\
++  \u{8f26}\
++  \u{84ee}\
++  \u{9023}\
++  \u{934a}\
++  \u{5217}\
++  \u{52a3}\
++  \u{54bd}\
++  \u{70c8}\
++  \u{88c2}\
++  \u{5ec9}\
++  \u{5ff5}\
++  \u{637b}\
++  \u{6bae}\
++  \u{7c3e}\
++  \u{7375}\
++  \u{4ee4}\
++  \u{56f9}\
++  \u{5dba}\
++  \u{601c}\
++  \u{73b2}\
++  \u{7469}\
++  \u{7f9a}\
++  \u{8046}\
++  \u{9234}\
++  \u{96f6}\
++  \u{9748}\
++  \u{9818}\
++  \u{4f8b}\
++  \u{79ae}\
++  \u{91b4}\
++  \u{96b8}\
++  \u{60e1}\
++  \u{4e86}\
++  \u{50da}\
++  \u{5bee}\
++  \u{5c3f}\
++  \u{6599}\
++  \u{71ce}\
++  \u{7642}\
++  \u{84fc}\
++  \u{907c}\
++  \u{6688}\
++  \u{962e}\
++  \u{5289}\
++  \u{677b}\
++  \u{67f3}\
++  \u{6d41}\
++  \u{6e9c}\
++  \u{7409}\
++  \u{7559}\
++  \u{786b}\
++  \u{7d10}\
++  \u{985e}\
++  \u{622e}\
++  \u{9678}\
++  \u{502b}\
++  \u{5d19}\
++  \u{6dea}\
++  \u{8f2a}\
++  \u{5f8b}\
++  \u{6144}\
++  \u{6817}\
++  \u{9686}\
++  \u{5229}\
++  \u{540f}\
++  \u{5c65}\
++  \u{6613}\
++  \u{674e}\
++  \u{68a8}\
++  \u{6ce5}\
++  \u{7406}\
++  \u{75e2}\
++  \u{7f79}\
++  \u{88cf}\
++  \u{88e1}\
++  \u{96e2}\
++  \u{533f}\
++  \u{6eba}\
++  \u{541d}\
++  \u{71d0}\
++  \u{7498}\
++  \u{85fa}\
++  \u{96a3}\
++  \u{9c57}\
++  \u{9e9f}\
++  \u{6797}\
++  \u{6dcb}\
++  \u{81e8}\
++  \u{7b20}\
++  \u{7c92}\
++  \u{72c0}\
++  \u{7099}\
++  \u{8b58}\
++  \u{4ec0}\
++  \u{8336}\
++  \u{523a}\
++  \u{5207}\
++  \u{5ea6}\
++  \u{62d3}\
++  \u{7cd6}\
++  \u{5b85}\
++  \u{6d1e}\
++  \u{66b4}\
++  \u{8f3b}\
++  \u{964d}\
++  \u{5ed3}\
++  \u{5140}\
++  \u{55c0}\
++  \u{585a}\
++  \u{6674}\
++  \u{51de}\
++  \u{732a}\
++  \u{76ca}\
++  \u{793c}\
++  \u{795e}\
++  \u{7965}\
++  \u{798f}\
++  \u{9756}\
++  \u{7cbe}\
++  \u{8612}\
++  \u{8af8}\
++  \u{9038}\
++  \u{90fd}\
++  \u{98ef}\
++  \u{98fc}\
++  \u{9928}\
++  \u{9db4}\
++  \u{90de}\
++  \u{96b7}\
++  \u{4fae}\
++  \u{50e7}\
++  \u{514d}\
++  \u{52c9}\
++  \u{52e4}\
++  \u{5351}\
++  \u{559d}\
++  \u{5606}\
++  \u{5668}\
++  \u{5840}\
++  \u{58a8}\
++  \u{5c64}\
++  \u{6094}\
++  \u{6168}\
++  \u{618e}\
++  \u{61f2}\
++  \u{654f}\
++  \u{65e2}\
++  \u{6691}\
++  \u{6885}\
++  \u{6d77}\
++  \u{6e1a}\
++  \u{6f22}\
++  \u{716e}\
++  \u{722b}\
++  \u{7422}\
++  \u{7891}\
++  \u{7949}\
++  \u{7948}\
++  \u{7950}\
++  \u{7956}\
++  \u{798d}\
++  \u{798e}\
++  \u{7a40}\
++  \u{7a81}\
++  \u{7bc0}\
++  \u{7e09}\
++  \u{7e41}\
++  \u{7f72}\
++  \u{8005}\
++  \u{81ed}\
++  \u{8279}\
++  \u{8457}\
++  \u{8910}\
++  \u{8996}\
++  \u{8b01}\
++  \u{8b39}\
++  \u{8cd3}\
++  \u{8d08}\
++  \u{8fb6}\
++  \u{96e3}\
++  \u{97ff}\
++  \u{983b}\
++  \u{6075}\
++  \u{242ee}\
++  \u{8218}\
++  \u{4e26}\
++  \u{51b5}\
++  \u{5168}\
++  \u{4f80}\
++  \u{5145}\
++  \u{5180}\
++  \u{52c7}\
++  \u{52fa}\
++  \u{5555}\
++  \u{5599}\
++  \u{55e2}\
++  \u{58b3}\
++  \u{5944}\
++  \u{5954}\
++  \u{5a62}\
++  \u{5b28}\
++  \u{5ed2}\
++  \u{5ed9}\
++  \u{5f69}\
++  \u{5fad}\
++  \u{60d8}\
++  \u{614e}\
++  \u{6108}\
++  \u{6160}\
++  \u{6234}\
++  \u{63c4}\
++  \u{641c}\
++  \u{6452}\
++  \u{6556}\
++  \u{671b}\
++  \u{6756}\
++  \u{6edb}\
++  \u{6ecb}\
++  \u{701e}\
++  \u{77a7}\
++  \u{7235}\
++  \u{72af}\
++  \u{7471}\
++  \u{7506}\
++  \u{753b}\
++  \u{761d}\
++  \u{761f}\
++  \u{76db}\
++  \u{76f4}\
++  \u{774a}\
++  \u{7740}\
++  \u{78cc}\
++  \u{7ab1}\
++  \u{7c7b}\
++  \u{7d5b}\
++  \u{7f3e}\
++  \u{8352}\
++  \u{83ef}\
++  \u{8779}\
++  \u{8941}\
++  \u{8986}\
++  \u{8abf}\
++  \u{8acb}\
++  \u{8aed}\
++  \u{8b8a}\
++  \u{8f38}\
++  \u{9072}\
++  \u{9199}\
++  \u{9276}\
++  \u{967c}\
++  \u{97db}\
++  \u{980b}\
++  \u{9b12}\
++  \u{2284a}\
++  \u{22844}\
++  \u{233d5}\
++  \u{3b9d}\
++  \u{4018}\
++  \u{4039}\
++  \u{25249}\
++  \u{25cd0}\
++  \u{27ed3}\
++  \u{9f43}\
++  \u{9f8e}\
++  \u{66}\
++  \u{66}\
++  \u{66}\
++  \u{69}\
++  \u{66}\
++  \u{6c}\
++  \u{66}\
++  \u{66}\
++  \u{69}\
++  \u{66}\
++  \u{66}\
++  \u{6c}\
++  \u{73}\
++  \u{74}\
++  \u{574}\
++  \u{576}\
++  \u{574}\
++  \u{565}\
++  \u{574}\
++  \u{56b}\
++  \u{57e}\
++  \u{576}\
++  \u{574}\
++  \u{56d}\
++  \u{5d9}\
++  \u{5b4}\
++  \u{5f2}\
++  \u{5b7}\
++  \u{5e2}\
++  \u{5d4}\
++  \u{5db}\
++  \u{5dc}\
++  \u{5dd}\
++  \u{5e8}\
++  \u{5ea}\
++  \u{5e9}\
++  \u{5c1}\
++  \u{5e9}\
++  \u{5c2}\
++  \u{5e9}\
++  \u{5bc}\
++  \u{5c1}\
++  \u{5e9}\
++  \u{5bc}\
++  \u{5c2}\
++  \u{5d0}\
++  \u{5b7}\
++  \u{5d0}\
++  \u{5b8}\
++  \u{5d0}\
++  \u{5bc}\
++  \u{5d1}\
++  \u{5bc}\
++  \u{5d2}\
++  \u{5bc}\
++  \u{5d3}\
++  \u{5bc}\
++  \u{5d4}\
++  \u{5bc}\
++  \u{5d5}\
++  \u{5bc}\
++  \u{5d6}\
++  \u{5bc}\
++  \u{5d8}\
++  \u{5bc}\
++  \u{5d9}\
++  \u{5bc}\
++  \u{5da}\
++  \u{5bc}\
++  \u{5db}\
++  \u{5bc}\
++  \u{5dc}\
++  \u{5bc}\
++  \u{5de}\
++  \u{5bc}\
++  \u{5e0}\
++  \u{5bc}\
++  \u{5e1}\
++  \u{5bc}\
++  \u{5e3}\
++  \u{5bc}\
++  \u{5e4}\
++  \u{5bc}\
++  \u{5e6}\
++  \u{5bc}\
++  \u{5e7}\
++  \u{5bc}\
++  \u{5e8}\
++  \u{5bc}\
++  \u{5e9}\
++  \u{5bc}\
++  \u{5ea}\
++  \u{5bc}\
++  \u{5d5}\
++  \u{5b9}\
++  \u{5d1}\
++  \u{5bf}\
++  \u{5db}\
++  \u{5bf}\
++  \u{5e4}\
++  \u{5bf}\
++  \u{5d0}\
++  \u{5dc}\
++  \u{671}\
++  \u{67b}\
++  \u{67e}\
++  \u{680}\
++  \u{67a}\
++  \u{67f}\
++  \u{679}\
++  \u{6a4}\
++  \u{6a6}\
++  \u{684}\
++  \u{683}\
++  \u{686}\
++  \u{687}\
++  \u{68d}\
++  \u{68c}\
++  \u{68e}\
++  \u{688}\
++  \u{698}\
++  \u{691}\
++  \u{6a9}\
++  \u{6af}\
++  \u{6b3}\
++  \u{6b1}\
++  \u{6ba}\
++  \u{6bb}\
++  \u{6c0}\
++  \u{6c1}\
++  \u{6be}\
++  \u{6d2}\
++  \u{6d3}\
++  \u{6ad}\
++  \u{6c7}\
++  \u{6c6}\
++  \u{6c8}\
++  \u{6cb}\
++  \u{6c5}\
++  \u{6c9}\
++  \u{6d0}\
++  \u{649}\
++  \u{626}\
++  \u{627}\
++  \u{626}\
++  \u{6d5}\
++  \u{626}\
++  \u{648}\
++  \u{626}\
++  \u{6c7}\
++  \u{626}\
++  \u{6c6}\
++  \u{626}\
++  \u{6c8}\
++  \u{626}\
++  \u{6d0}\
++  \u{626}\
++  \u{649}\
++  \u{6cc}\
++  \u{626}\
++  \u{62c}\
++  \u{626}\
++  \u{62d}\
++  \u{626}\
++  \u{645}\
++  \u{626}\
++  \u{64a}\
++  \u{628}\
++  \u{62c}\
++  \u{628}\
++  \u{62d}\
++  \u{628}\
++  \u{62e}\
++  \u{628}\
++  \u{645}\
++  \u{628}\
++  \u{649}\
++  \u{628}\
++  \u{64a}\
++  \u{62a}\
++  \u{62c}\
++  \u{62a}\
++  \u{62d}\
++  \u{62a}\
++  \u{62e}\
++  \u{62a}\
++  \u{645}\
++  \u{62a}\
++  \u{649}\
++  \u{62a}\
++  \u{64a}\
++  \u{62b}\
++  \u{62c}\
++  \u{62b}\
++  \u{645}\
++  \u{62b}\
++  \u{649}\
++  \u{62b}\
++  \u{64a}\
++  \u{62c}\
++  \u{62d}\
++  \u{62c}\
++  \u{645}\
++  \u{62d}\
++  \u{62c}\
++  \u{62d}\
++  \u{645}\
++  \u{62e}\
++  \u{62c}\
++  \u{62e}\
++  \u{62d}\
++  \u{62e}\
++  \u{645}\
++  \u{633}\
++  \u{62c}\
++  \u{633}\
++  \u{62d}\
++  \u{633}\
++  \u{62e}\
++  \u{633}\
++  \u{645}\
++  \u{635}\
++  \u{62d}\
++  \u{635}\
++  \u{645}\
++  \u{636}\
++  \u{62c}\
++  \u{636}\
++  \u{62d}\
++  \u{636}\
++  \u{62e}\
++  \u{636}\
++  \u{645}\
++  \u{637}\
++  \u{62d}\
++  \u{637}\
++  \u{645}\
++  \u{638}\
++  \u{645}\
++  \u{639}\
++  \u{62c}\
++  \u{639}\
++  \u{645}\
++  \u{63a}\
++  \u{62c}\
++  \u{63a}\
++  \u{645}\
++  \u{641}\
++  \u{62c}\
++  \u{641}\
++  \u{62d}\
++  \u{641}\
++  \u{62e}\
++  \u{641}\
++  \u{645}\
++  \u{641}\
++  \u{649}\
++  \u{641}\
++  \u{64a}\
++  \u{642}\
++  \u{62d}\
++  \u{642}\
++  \u{645}\
++  \u{642}\
++  \u{649}\
++  \u{642}\
++  \u{64a}\
++  \u{643}\
++  \u{627}\
++  \u{643}\
++  \u{62c}\
++  \u{643}\
++  \u{62d}\
++  \u{643}\
++  \u{62e}\
++  \u{643}\
++  \u{644}\
++  \u{643}\
++  \u{645}\
++  \u{643}\
++  \u{649}\
++  \u{643}\
++  \u{64a}\
++  \u{644}\
++  \u{62c}\
++  \u{644}\
++  \u{62d}\
++  \u{644}\
++  \u{62e}\
++  \u{644}\
++  \u{645}\
++  \u{644}\
++  \u{649}\
++  \u{644}\
++  \u{64a}\
++  \u{645}\
++  \u{62c}\
++  \u{645}\
++  \u{62d}\
++  \u{645}\
++  \u{62e}\
++  \u{645}\
++  \u{645}\
++  \u{645}\
++  \u{649}\
++  \u{645}\
++  \u{64a}\
++  \u{646}\
++  \u{62c}\
++  \u{646}\
++  \u{62d}\
++  \u{646}\
++  \u{62e}\
++  \u{646}\
++  \u{645}\
++  \u{646}\
++  \u{649}\
++  \u{646}\
++  \u{64a}\
++  \u{647}\
++  \u{62c}\
++  \u{647}\
++  \u{645}\
++  \u{647}\
++  \u{649}\
++  \u{647}\
++  \u{64a}\
++  \u{64a}\
++  \u{62c}\
++  \u{64a}\
++  \u{62d}\
++  \u{64a}\
++  \u{62e}\
++  \u{64a}\
++  \u{645}\
++  \u{64a}\
++  \u{649}\
++  \u{64a}\
++  \u{64a}\
++  \u{630}\
++  \u{670}\
++  \u{631}\
++  \u{670}\
++  \u{649}\
++  \u{670}\
++  \u{20}\
++  \u{64c}\
++  \u{651}\
++  \u{20}\
++  \u{64d}\
++  \u{651}\
++  \u{20}\
++  \u{64e}\
++  \u{651}\
++  \u{20}\
++  \u{64f}\
++  \u{651}\
++  \u{20}\
++  \u{650}\
++  \u{651}\
++  \u{20}\
++  \u{651}\
++  \u{670}\
++  \u{626}\
++  \u{631}\
++  \u{626}\
++  \u{632}\
++  \u{626}\
++  \u{646}\
++  \u{628}\
++  \u{631}\
++  \u{628}\
++  \u{632}\
++  \u{628}\
++  \u{646}\
++  \u{62a}\
++  \u{631}\
++  \u{62a}\
++  \u{632}\
++  \u{62a}\
++  \u{646}\
++  \u{62b}\
++  \u{631}\
++  \u{62b}\
++  \u{632}\
++  \u{62b}\
++  \u{646}\
++  \u{645}\
++  \u{627}\
++  \u{646}\
++  \u{631}\
++  \u{646}\
++  \u{632}\
++  \u{646}\
++  \u{646}\
++  \u{64a}\
++  \u{631}\
++  \u{64a}\
++  \u{632}\
++  \u{64a}\
++  \u{646}\
++  \u{626}\
++  \u{62e}\
++  \u{626}\
++  \u{647}\
++  \u{628}\
++  \u{647}\
++  \u{62a}\
++  \u{647}\
++  \u{635}\
++  \u{62e}\
++  \u{644}\
++  \u{647}\
++  \u{646}\
++  \u{647}\
++  \u{647}\
++  \u{670}\
++  \u{64a}\
++  \u{647}\
++  \u{62b}\
++  \u{647}\
++  \u{633}\
++  \u{647}\
++  \u{634}\
++  \u{645}\
++  \u{634}\
++  \u{647}\
++  \u{640}\
++  \u{64e}\
++  \u{651}\
++  \u{640}\
++  \u{64f}\
++  \u{651}\
++  \u{640}\
++  \u{650}\
++  \u{651}\
++  \u{637}\
++  \u{649}\
++  \u{637}\
++  \u{64a}\
++  \u{639}\
++  \u{649}\
++  \u{639}\
++  \u{64a}\
++  \u{63a}\
++  \u{649}\
++  \u{63a}\
++  \u{64a}\
++  \u{633}\
++  \u{649}\
++  \u{633}\
++  \u{64a}\
++  \u{634}\
++  \u{649}\
++  \u{634}\
++  \u{64a}\
++  \u{62d}\
++  \u{649}\
++  \u{62d}\
++  \u{64a}\
++  \u{62c}\
++  \u{649}\
++  \u{62c}\
++  \u{64a}\
++  \u{62e}\
++  \u{649}\
++  \u{62e}\
++  \u{64a}\
++  \u{635}\
++  \u{649}\
++  \u{635}\
++  \u{64a}\
++  \u{636}\
++  \u{649}\
++  \u{636}\
++  \u{64a}\
++  \u{634}\
++  \u{62c}\
++  \u{634}\
++  \u{62d}\
++  \u{634}\
++  \u{62e}\
++  \u{634}\
++  \u{631}\
++  \u{633}\
++  \u{631}\
++  \u{635}\
++  \u{631}\
++  \u{636}\
++  \u{631}\
++  \u{627}\
++  \u{64b}\
++  \u{62a}\
++  \u{62c}\
++  \u{645}\
++  \u{62a}\
++  \u{62d}\
++  \u{62c}\
++  \u{62a}\
++  \u{62d}\
++  \u{645}\
++  \u{62a}\
++  \u{62e}\
++  \u{645}\
++  \u{62a}\
++  \u{645}\
++  \u{62c}\
++  \u{62a}\
++  \u{645}\
++  \u{62d}\
++  \u{62a}\
++  \u{645}\
++  \u{62e}\
++  \u{62c}\
++  \u{645}\
++  \u{62d}\
++  \u{62d}\
++  \u{645}\
++  \u{64a}\
++  \u{62d}\
++  \u{645}\
++  \u{649}\
++  \u{633}\
++  \u{62d}\
++  \u{62c}\
++  \u{633}\
++  \u{62c}\
++  \u{62d}\
++  \u{633}\
++  \u{62c}\
++  \u{649}\
++  \u{633}\
++  \u{645}\
++  \u{62d}\
++  \u{633}\
++  \u{645}\
++  \u{62c}\
++  \u{633}\
++  \u{645}\
++  \u{645}\
++  \u{635}\
++  \u{62d}\
++  \u{62d}\
++  \u{635}\
++  \u{645}\
++  \u{645}\
++  \u{634}\
++  \u{62d}\
++  \u{645}\
++  \u{634}\
++  \u{62c}\
++  \u{64a}\
++  \u{634}\
++  \u{645}\
++  \u{62e}\
++  \u{634}\
++  \u{645}\
++  \u{645}\
++  \u{636}\
++  \u{62d}\
++  \u{649}\
++  \u{636}\
++  \u{62e}\
++  \u{645}\
++  \u{637}\
++  \u{645}\
++  \u{62d}\
++  \u{637}\
++  \u{645}\
++  \u{645}\
++  \u{637}\
++  \u{645}\
++  \u{64a}\
++  \u{639}\
++  \u{62c}\
++  \u{645}\
++  \u{639}\
++  \u{645}\
++  \u{645}\
++  \u{639}\
++  \u{645}\
++  \u{649}\
++  \u{63a}\
++  \u{645}\
++  \u{645}\
++  \u{63a}\
++  \u{645}\
++  \u{64a}\
++  \u{63a}\
++  \u{645}\
++  \u{649}\
++  \u{641}\
++  \u{62e}\
++  \u{645}\
++  \u{642}\
++  \u{645}\
++  \u{62d}\
++  \u{642}\
++  \u{645}\
++  \u{645}\
++  \u{644}\
++  \u{62d}\
++  \u{645}\
++  \u{644}\
++  \u{62d}\
++  \u{64a}\
++  \u{644}\
++  \u{62d}\
++  \u{649}\
++  \u{644}\
++  \u{62c}\
++  \u{62c}\
++  \u{644}\
++  \u{62e}\
++  \u{645}\
++  \u{644}\
++  \u{645}\
++  \u{62d}\
++  \u{645}\
++  \u{62d}\
++  \u{62c}\
++  \u{645}\
++  \u{62d}\
++  \u{645}\
++  \u{645}\
++  \u{62d}\
++  \u{64a}\
++  \u{645}\
++  \u{62c}\
++  \u{62d}\
++  \u{645}\
++  \u{62c}\
++  \u{645}\
++  \u{645}\
++  \u{62e}\
++  \u{62c}\
++  \u{645}\
++  \u{62e}\
++  \u{645}\
++  \u{645}\
++  \u{62c}\
++  \u{62e}\
++  \u{647}\
++  \u{645}\
++  \u{62c}\
++  \u{647}\
++  \u{645}\
++  \u{645}\
++  \u{646}\
++  \u{62d}\
++  \u{645}\
++  \u{646}\
++  \u{62d}\
++  \u{649}\
++  \u{646}\
++  \u{62c}\
++  \u{645}\
++  \u{646}\
++  \u{62c}\
++  \u{649}\
++  \u{646}\
++  \u{645}\
++  \u{64a}\
++  \u{646}\
++  \u{645}\
++  \u{649}\
++  \u{64a}\
++  \u{645}\
++  \u{645}\
++  \u{628}\
++  \u{62e}\
++  \u{64a}\
++  \u{62a}\
++  \u{62c}\
++  \u{64a}\
++  \u{62a}\
++  \u{62c}\
++  \u{649}\
++  \u{62a}\
++  \u{62e}\
++  \u{64a}\
++  \u{62a}\
++  \u{62e}\
++  \u{649}\
++  \u{62a}\
++  \u{645}\
++  \u{64a}\
++  \u{62a}\
++  \u{645}\
++  \u{649}\
++  \u{62c}\
++  \u{645}\
++  \u{64a}\
++  \u{62c}\
++  \u{62d}\
++  \u{649}\
++  \u{62c}\
++  \u{645}\
++  \u{649}\
++  \u{633}\
++  \u{62e}\
++  \u{649}\
++  \u{635}\
++  \u{62d}\
++  \u{64a}\
++  \u{634}\
++  \u{62d}\
++  \u{64a}\
++  \u{636}\
++  \u{62d}\
++  \u{64a}\
++  \u{644}\
++  \u{62c}\
++  \u{64a}\
++  \u{644}\
++  \u{645}\
++  \u{64a}\
++  \u{64a}\
++  \u{62d}\
++  \u{64a}\
++  \u{64a}\
++  \u{62c}\
++  \u{64a}\
++  \u{64a}\
++  \u{645}\
++  \u{64a}\
++  \u{645}\
++  \u{645}\
++  \u{64a}\
++  \u{642}\
++  \u{645}\
++  \u{64a}\
++  \u{646}\
++  \u{62d}\
++  \u{64a}\
++  \u{639}\
++  \u{645}\
++  \u{64a}\
++  \u{643}\
++  \u{645}\
++  \u{64a}\
++  \u{646}\
++  \u{62c}\
++  \u{62d}\
++  \u{645}\
++  \u{62e}\
++  \u{64a}\
++  \u{644}\
++  \u{62c}\
++  \u{645}\
++  \u{643}\
++  \u{645}\
++  \u{645}\
++  \u{62c}\
++  \u{62d}\
++  \u{64a}\
++  \u{62d}\
++  \u{62c}\
++  \u{64a}\
++  \u{645}\
++  \u{62c}\
++  \u{64a}\
++  \u{641}\
++  \u{645}\
++  \u{64a}\
++  \u{628}\
++  \u{62d}\
++  \u{64a}\
++  \u{633}\
++  \u{62e}\
++  \u{64a}\
++  \u{646}\
++  \u{62c}\
++  \u{64a}\
++  \u{635}\
++  \u{644}\
++  \u{6d2}\
++  \u{642}\
++  \u{644}\
++  \u{6d2}\
++  \u{627}\
++  \u{644}\
++  \u{644}\
++  \u{647}\
++  \u{627}\
++  \u{643}\
++  \u{628}\
++  \u{631}\
++  \u{645}\
++  \u{62d}\
++  \u{645}\
++  \u{62f}\
++  \u{635}\
++  \u{644}\
++  \u{639}\
++  \u{645}\
++  \u{631}\
++  \u{633}\
++  \u{648}\
++  \u{644}\
++  \u{639}\
++  \u{644}\
++  \u{64a}\
++  \u{647}\
++  \u{648}\
++  \u{633}\
++  \u{644}\
++  \u{645}\
++  \u{635}\
++  \u{644}\
++  \u{649}\
++  \u{635}\
++  \u{644}\
++  \u{649}\
++  \u{20}\
++  \u{627}\
++  \u{644}\
++  \u{644}\
++  \u{647}\
++  \u{20}\
++  \u{639}\
++  \u{644}\
++  \u{64a}\
++  \u{647}\
++  \u{20}\
++  \u{648}\
++  \u{633}\
++  \u{644}\
++  \u{645}\
++  \u{62c}\
++  \u{644}\
++  \u{20}\
++  \u{62c}\
++  \u{644}\
++  \u{627}\
++  \u{644}\
++  \u{647}\
++  \u{631}\
++  \u{6cc}\
++  \u{627}\
++  \u{644}\
++  \u{2c}\
++  \u{3001}\
++  \u{3a}\
++  \u{21}\
++  \u{3f}\
++  \u{3016}\
++  \u{3017}\
++  \u{2014}\
++  \u{2013}\
++  \u{5f}\
++  \u{7b}\
++  \u{7d}\
++  \u{3014}\
++  \u{3015}\
++  \u{3010}\
++  \u{3011}\
++  \u{300a}\
++  \u{300b}\
++  \u{300c}\
++  \u{300d}\
++  \u{300e}\
++  \u{300f}\
++  \u{5b}\
++  \u{5d}\
++  \u{23}\
++  \u{26}\
++  \u{2a}\
++  \u{2d}\
++  \u{3c}\
++  \u{3e}\
++  \u{5c}\
++  \u{24}\
++  \u{25}\
++  \u{40}\
++  \u{20}\
++  \u{64b}\
++  \u{640}\
++  \u{64b}\
++  \u{20}\
++  \u{64c}\
++  \u{20}\
++  \u{64d}\
++  \u{20}\
++  \u{64e}\
++  \u{640}\
++  \u{64e}\
++  \u{20}\
++  \u{64f}\
++  \u{640}\
++  \u{64f}\
++  \u{20}\
++  \u{650}\
++  \u{640}\
++  \u{650}\
++  \u{20}\
++  \u{651}\
++  \u{640}\
++  \u{651}\
++  \u{20}\
++  \u{652}\
++  \u{640}\
++  \u{652}\
++  \u{621}\
++  \u{622}\
++  \u{623}\
++  \u{624}\
++  \u{625}\
++  \u{626}\
++  \u{627}\
++  \u{628}\
++  \u{629}\
++  \u{62a}\
++  \u{62b}\
++  \u{62c}\
++  \u{62d}\
++  \u{62e}\
++  \u{62f}\
++  \u{630}\
++  \u{631}\
++  \u{632}\
++  \u{633}\
++  \u{634}\
++  \u{635}\
++  \u{636}\
++  \u{637}\
++  \u{638}\
++  \u{639}\
++  \u{63a}\
++  \u{641}\
++  \u{642}\
++  \u{643}\
++  \u{644}\
++  \u{645}\
++  \u{646}\
++  \u{647}\
++  \u{648}\
++  \u{64a}\
++  \u{644}\
++  \u{622}\
++  \u{644}\
++  \u{623}\
++  \u{644}\
++  \u{625}\
++  \u{644}\
++  \u{627}\
++  \u{22}\
++  \u{27}\
++  \u{2f}\
++  \u{5e}\
++  \u{7c}\
++  \u{7e}\
++  \u{2985}\
++  \u{2986}\
++  \u{30fb}\
++  \u{30a1}\
++  \u{30a3}\
++  \u{30a5}\
++  \u{30a7}\
++  \u{30a9}\
++  \u{30e3}\
++  \u{30e5}\
++  \u{30e7}\
++  \u{30c3}\
++  \u{30fc}\
++  \u{30f3}\
++  \u{3099}\
++  \u{309a}\
++  \u{a2}\
++  \u{a3}\
++  \u{ac}\
++  \u{a6}\
++  \u{a5}\
++  \u{20a9}\
++  \u{2502}\
++  \u{2190}\
++  \u{2191}\
++  \u{2192}\
++  \u{2193}\
++  \u{25a0}\
++  \u{25cb}\
++  \u{10428}\
++  \u{10429}\
++  \u{1042a}\
++  \u{1042b}\
++  \u{1042c}\
++  \u{1042d}\
++  \u{1042e}\
++  \u{1042f}\
++  \u{10430}\
++  \u{10431}\
++  \u{10432}\
++  \u{10433}\
++  \u{10434}\
++  \u{10435}\
++  \u{10436}\
++  \u{10437}\
++  \u{10438}\
++  \u{10439}\
++  \u{1043a}\
++  \u{1043b}\
++  \u{1043c}\
++  \u{1043d}\
++  \u{1043e}\
++  \u{1043f}\
++  \u{10440}\
++  \u{10441}\
++  \u{10442}\
++  \u{10443}\
++  \u{10444}\
++  \u{10445}\
++  \u{10446}\
++  \u{10447}\
++  \u{10448}\
++  \u{10449}\
++  \u{1044a}\
++  \u{1044b}\
++  \u{1044c}\
++  \u{1044d}\
++  \u{1044e}\
++  \u{1044f}\
++  \u{104d8}\
++  \u{104d9}\
++  \u{104da}\
++  \u{104db}\
++  \u{104dc}\
++  \u{104dd}\
++  \u{104de}\
++  \u{104df}\
++  \u{104e0}\
++  \u{104e1}\
++  \u{104e2}\
++  \u{104e3}\
++  \u{104e4}\
++  \u{104e5}\
++  \u{104e6}\
++  \u{104e7}\
++  \u{104e8}\
++  \u{104e9}\
++  \u{104ea}\
++  \u{104eb}\
++  \u{104ec}\
++  \u{104ed}\
++  \u{104ee}\
++  \u{104ef}\
++  \u{104f0}\
++  \u{104f1}\
++  \u{104f2}\
++  \u{104f3}\
++  \u{104f4}\
++  \u{104f5}\
++  \u{104f6}\
++  \u{104f7}\
++  \u{104f8}\
++  \u{104f9}\
++  \u{104fa}\
++  \u{104fb}\
++  \u{10cc0}\
++  \u{10cc1}\
++  \u{10cc2}\
++  \u{10cc3}\
++  \u{10cc4}\
++  \u{10cc5}\
++  \u{10cc6}\
++  \u{10cc7}\
++  \u{10cc8}\
++  \u{10cc9}\
++  \u{10cca}\
++  \u{10ccb}\
++  \u{10ccc}\
++  \u{10ccd}\
++  \u{10cce}\
++  \u{10ccf}\
++  \u{10cd0}\
++  \u{10cd1}\
++  \u{10cd2}\
++  \u{10cd3}\
++  \u{10cd4}\
++  \u{10cd5}\
++  \u{10cd6}\
++  \u{10cd7}\
++  \u{10cd8}\
++  \u{10cd9}\
++  \u{10cda}\
++  \u{10cdb}\
++  \u{10cdc}\
++  \u{10cdd}\
++  \u{10cde}\
++  \u{10cdf}\
++  \u{10ce0}\
++  \u{10ce1}\
++  \u{10ce2}\
++  \u{10ce3}\
++  \u{10ce4}\
++  \u{10ce5}\
++  \u{10ce6}\
++  \u{10ce7}\
++  \u{10ce8}\
++  \u{10ce9}\
++  \u{10cea}\
++  \u{10ceb}\
++  \u{10cec}\
++  \u{10ced}\
++  \u{10cee}\
++  \u{10cef}\
++  \u{10cf0}\
++  \u{10cf1}\
++  \u{10cf2}\
++  \u{118c0}\
++  \u{118c1}\
++  \u{118c2}\
++  \u{118c3}\
++  \u{118c4}\
++  \u{118c5}\
++  \u{118c6}\
++  \u{118c7}\
++  \u{118c8}\
++  \u{118c9}\
++  \u{118ca}\
++  \u{118cb}\
++  \u{118cc}\
++  \u{118cd}\
++  \u{118ce}\
++  \u{118cf}\
++  \u{118d0}\
++  \u{118d1}\
++  \u{118d2}\
++  \u{118d3}\
++  \u{118d4}\
++  \u{118d5}\
++  \u{118d6}\
++  \u{118d7}\
++  \u{118d8}\
++  \u{118d9}\
++  \u{118da}\
++  \u{118db}\
++  \u{118dc}\
++  \u{118dd}\
++  \u{118de}\
++  \u{118df}\
++  \u{1d157}\
++  \u{1d165}\
++  \u{1d158}\
++  \u{1d165}\
++  \u{1d158}\
++  \u{1d165}\
++  \u{1d16e}\
++  \u{1d158}\
++  \u{1d165}\
++  \u{1d16f}\
++  \u{1d158}\
++  \u{1d165}\
++  \u{1d170}\
++  \u{1d158}\
++  \u{1d165}\
++  \u{1d171}\
++  \u{1d158}\
++  \u{1d165}\
++  \u{1d172}\
++  \u{1d1b9}\
++  \u{1d165}\
++  \u{1d1ba}\
++  \u{1d165}\
++  \u{1d1b9}\
++  \u{1d165}\
++  \u{1d16e}\
++  \u{1d1ba}\
++  \u{1d165}\
++  \u{1d16e}\
++  \u{1d1b9}\
++  \u{1d165}\
++  \u{1d16f}\
++  \u{1d1ba}\
++  \u{1d165}\
++  \u{1d16f}\
++  \u{131}\
++  \u{237}\
++  \u{2207}\
++  \u{2202}\
++  \u{1e922}\
++  \u{1e923}\
++  \u{1e924}\
++  \u{1e925}\
++  \u{1e926}\
++  \u{1e927}\
++  \u{1e928}\
++  \u{1e929}\
++  \u{1e92a}\
++  \u{1e92b}\
++  \u{1e92c}\
++  \u{1e92d}\
++  \u{1e92e}\
++  \u{1e92f}\
++  \u{1e930}\
++  \u{1e931}\
++  \u{1e932}\
++  \u{1e933}\
++  \u{1e934}\
++  \u{1e935}\
++  \u{1e936}\
++  \u{1e937}\
++  \u{1e938}\
++  \u{1e939}\
++  \u{1e93a}\
++  \u{1e93b}\
++  \u{1e93c}\
++  \u{1e93d}\
++  \u{1e93e}\
++  \u{1e93f}\
++  \u{1e940}\
++  \u{1e941}\
++  \u{1e942}\
++  \u{1e943}\
++  \u{66e}\
++  \u{6a1}\
++  \u{66f}\
++  \u{30}\
++  \u{2c}\
++  \u{31}\
++  \u{2c}\
++  \u{32}\
++  \u{2c}\
++  \u{33}\
++  \u{2c}\
++  \u{34}\
++  \u{2c}\
++  \u{35}\
++  \u{2c}\
++  \u{36}\
++  \u{2c}\
++  \u{37}\
++  \u{2c}\
++  \u{38}\
++  \u{2c}\
++  \u{39}\
++  \u{2c}\
++  \u{3014}\
++  \u{73}\
++  \u{3015}\
++  \u{77}\
++  \u{7a}\
++  \u{68}\
++  \u{76}\
++  \u{73}\
++  \u{64}\
++  \u{70}\
++  \u{70}\
++  \u{76}\
++  \u{77}\
++  \u{63}\
++  \u{6d}\
++  \u{63}\
++  \u{6d}\
++  \u{64}\
++  \u{64}\
++  \u{6a}\
++  \u{307b}\
++  \u{304b}\
++  \u{30b3}\
++  \u{30b3}\
++  \u{5b57}\
++  \u{53cc}\
++  \u{30c7}\
++  \u{591a}\
++  \u{89e3}\
++  \u{4ea4}\
++  \u{6620}\
++  \u{7121}\
++  \u{524d}\
++  \u{5f8c}\
++  \u{518d}\
++  \u{65b0}\
++  \u{521d}\
++  \u{7d42}\
++  \u{8ca9}\
++  \u{58f0}\
++  \u{5439}\
++  \u{6f14}\
++  \u{6295}\
++  \u{6355}\
++  \u{904a}\
++  \u{6307}\
++  \u{6253}\
++  \u{7981}\
++  \u{7a7a}\
++  \u{5408}\
++  \u{6e80}\
++  \u{7533}\
++  \u{5272}\
++  \u{55b6}\
++  \u{914d}\
++  \u{3014}\
++  \u{672c}\
++  \u{3015}\
++  \u{3014}\
++  \u{4e09}\
++  \u{3015}\
++  \u{3014}\
++  \u{4e8c}\
++  \u{3015}\
++  \u{3014}\
++  \u{5b89}\
++  \u{3015}\
++  \u{3014}\
++  \u{70b9}\
++  \u{3015}\
++  \u{3014}\
++  \u{6253}\
++  \u{3015}\
++  \u{3014}\
++  \u{76d7}\
++  \u{3015}\
++  \u{3014}\
++  \u{52dd}\
++  \u{3015}\
++  \u{3014}\
++  \u{6557}\
++  \u{3015}\
++  \u{5f97}\
++  \u{53ef}\
++  \u{4e3d}\
++  \u{4e38}\
++  \u{4e41}\
++  \u{20122}\
++  \u{4f60}\
++  \u{4fbb}\
++  \u{5002}\
++  \u{507a}\
++  \u{5099}\
++  \u{50cf}\
++  \u{349e}\
++  \u{2063a}\
++  \u{5154}\
++  \u{5164}\
++  \u{5177}\
++  \u{2051c}\
++  \u{34b9}\
++  \u{5167}\
++  \u{2054b}\
++  \u{5197}\
++  \u{51a4}\
++  \u{4ecc}\
++  \u{51ac}\
++  \u{291df}\
++  \u{5203}\
++  \u{34df}\
++  \u{523b}\
++  \u{5246}\
++  \u{5277}\
++  \u{3515}\
++  \u{5305}\
++  \u{5306}\
++  \u{5349}\
++  \u{535a}\
++  \u{5373}\
++  \u{537d}\
++  \u{537f}\
++  \u{20a2c}\
++  \u{7070}\
++  \u{53ca}\
++  \u{53df}\
++  \u{20b63}\
++  \u{53eb}\
++  \u{53f1}\
++  \u{5406}\
++  \u{549e}\
++  \u{5438}\
++  \u{5448}\
++  \u{5468}\
++  \u{54a2}\
++  \u{54f6}\
++  \u{5510}\
++  \u{5553}\
++  \u{5563}\
++  \u{5584}\
++  \u{55ab}\
++  \u{55b3}\
++  \u{55c2}\
++  \u{5716}\
++  \u{5717}\
++  \u{5651}\
++  \u{5674}\
++  \u{58ee}\
++  \u{57ce}\
++  \u{57f4}\
++  \u{580d}\
++  \u{578b}\
++  \u{5832}\
++  \u{5831}\
++  \u{58ac}\
++  \u{214e4}\
++  \u{58f2}\
++  \u{58f7}\
++  \u{5906}\
++  \u{5922}\
++  \u{5962}\
++  \u{216a8}\
++  \u{216ea}\
++  \u{59ec}\
++  \u{5a1b}\
++  \u{5a27}\
++  \u{59d8}\
++  \u{5a66}\
++  \u{36ee}\
++  \u{5b08}\
++  \u{5b3e}\
++  \u{219c8}\
++  \u{5bc3}\
++  \u{5bd8}\
++  \u{5bf3}\
++  \u{21b18}\
++  \u{5bff}\
++  \u{5c06}\
++  \u{3781}\
++  \u{5c60}\
++  \u{5cc0}\
++  \u{5c8d}\
++  \u{21de4}\
++  \u{5d43}\
++  \u{21de6}\
++  \u{5d6e}\
++  \u{5d6b}\
++  \u{5d7c}\
++  \u{5de1}\
++  \u{5de2}\
++  \u{382f}\
++  \u{5dfd}\
++  \u{5e28}\
++  \u{5e3d}\
++  \u{5e69}\
++  \u{3862}\
++  \u{22183}\
++  \u{387c}\
++  \u{5eb0}\
++  \u{5eb3}\
++  \u{5eb6}\
++  \u{2a392}\
++  \u{22331}\
++  \u{8201}\
++  \u{5f22}\
++  \u{38c7}\
++  \u{232b8}\
++  \u{261da}\
++  \u{5f62}\
++  \u{5f6b}\
++  \u{38e3}\
++  \u{5f9a}\
++  \u{5fcd}\
++  \u{5fd7}\
++  \u{5ff9}\
++  \u{6081}\
++  \u{393a}\
++  \u{391c}\
++  \u{226d4}\
++  \u{60c7}\
++  \u{6148}\
++  \u{614c}\
++  \u{617a}\
++  \u{61b2}\
++  \u{61a4}\
++  \u{61af}\
++  \u{61de}\
++  \u{6210}\
++  \u{621b}\
++  \u{625d}\
++  \u{62b1}\
++  \u{62d4}\
++  \u{6350}\
++  \u{22b0c}\
++  \u{633d}\
++  \u{62fc}\
++  \u{6368}\
++  \u{6383}\
++  \u{63e4}\
++  \u{22bf1}\
++  \u{6422}\
++  \u{63c5}\
++  \u{63a9}\
++  \u{3a2e}\
++  \u{6469}\
++  \u{647e}\
++  \u{649d}\
++  \u{6477}\
++  \u{3a6c}\
++  \u{656c}\
++  \u{2300a}\
++  \u{65e3}\
++  \u{66f8}\
++  \u{6649}\
++  \u{3b19}\
++  \u{3b08}\
++  \u{3ae4}\
++  \u{5192}\
++  \u{5195}\
++  \u{6700}\
++  \u{669c}\
++  \u{80ad}\
++  \u{43d9}\
++  \u{6721}\
++  \u{675e}\
++  \u{6753}\
++  \u{233c3}\
++  \u{3b49}\
++  \u{67fa}\
++  \u{6785}\
++  \u{6852}\
++  \u{2346d}\
++  \u{688e}\
++  \u{681f}\
++  \u{6914}\
++  \u{6942}\
++  \u{69a3}\
++  \u{69ea}\
++  \u{6aa8}\
++  \u{236a3}\
++  \u{6adb}\
++  \u{3c18}\
++  \u{6b21}\
++  \u{238a7}\
++  \u{6b54}\
++  \u{3c4e}\
++  \u{6b72}\
++  \u{6b9f}\
++  \u{6bbb}\
++  \u{23a8d}\
++  \u{21d0b}\
++  \u{23afa}\
++  \u{6c4e}\
++  \u{23cbc}\
++  \u{6cbf}\
++  \u{6ccd}\
++  \u{6c67}\
++  \u{6d16}\
++  \u{6d3e}\
++  \u{6d69}\
++  \u{6d78}\
++  \u{6d85}\
++  \u{23d1e}\
++  \u{6d34}\
++  \u{6e2f}\
++  \u{6e6e}\
++  \u{3d33}\
++  \u{6ec7}\
++  \u{23ed1}\
++  \u{6df9}\
++  \u{6f6e}\
++  \u{23f5e}\
++  \u{23f8e}\
++  \u{6fc6}\
++  \u{7039}\
++  \u{701b}\
++  \u{3d96}\
++  \u{704a}\
++  \u{707d}\
++  \u{7077}\
++  \u{70ad}\
++  \u{20525}\
++  \u{7145}\
++  \u{24263}\
++  \u{719c}\
++  \u{7228}\
++  \u{7250}\
++  \u{24608}\
++  \u{7280}\
++  \u{7295}\
++  \u{24735}\
++  \u{24814}\
++  \u{737a}\
++  \u{738b}\
++  \u{3eac}\
++  \u{73a5}\
++  \u{3eb8}\
++  \u{7447}\
++  \u{745c}\
++  \u{7485}\
++  \u{74ca}\
++  \u{3f1b}\
++  \u{7524}\
++  \u{24c36}\
++  \u{753e}\
++  \u{24c92}\
++  \u{2219f}\
++  \u{7610}\
++  \u{24fa1}\
++  \u{24fb8}\
++  \u{25044}\
++  \u{3ffc}\
++  \u{4008}\
++  \u{250f3}\
++  \u{250f2}\
++  \u{25119}\
++  \u{25133}\
++  \u{771e}\
++  \u{771f}\
++  \u{778b}\
++  \u{4046}\
++  \u{4096}\
++  \u{2541d}\
++  \u{784e}\
++  \u{40e3}\
++  \u{25626}\
++  \u{2569a}\
++  \u{256c5}\
++  \u{79eb}\
++  \u{412f}\
++  \u{7a4a}\
++  \u{7a4f}\
++  \u{2597c}\
++  \u{25aa7}\
++  \u{4202}\
++  \u{25bab}\
++  \u{7bc6}\
++  \u{7bc9}\
++  \u{4227}\
++  \u{25c80}\
++  \u{7cd2}\
++  \u{42a0}\
++  \u{7ce8}\
++  \u{7ce3}\
++  \u{7d00}\
++  \u{25f86}\
++  \u{7d63}\
++  \u{4301}\
++  \u{7dc7}\
++  \u{7e02}\
++  \u{7e45}\
++  \u{4334}\
++  \u{26228}\
++  \u{26247}\
++  \u{4359}\
++  \u{262d9}\
++  \u{7f7a}\
++  \u{2633e}\
++  \u{7f95}\
++  \u{7ffa}\
++  \u{264da}\
++  \u{26523}\
++  \u{8060}\
++  \u{265a8}\
++  \u{8070}\
++  \u{2335f}\
++  \u{43d5}\
++  \u{80b2}\
++  \u{8103}\
++  \u{440b}\
++  \u{813e}\
++  \u{5ab5}\
++  \u{267a7}\
++  \u{267b5}\
++  \u{23393}\
++  \u{2339c}\
++  \u{8204}\
++  \u{8f9e}\
++  \u{446b}\
++  \u{8291}\
++  \u{828b}\
++  \u{829d}\
++  \u{52b3}\
++  \u{82b1}\
++  \u{82b3}\
++  \u{82bd}\
++  \u{82e6}\
++  \u{26b3c}\
++  \u{831d}\
++  \u{8363}\
++  \u{83ad}\
++  \u{8323}\
++  \u{83bd}\
++  \u{83e7}\
++  \u{8353}\
++  \u{83ca}\
++  \u{83cc}\
++  \u{83dc}\
++  \u{26c36}\
++  \u{26d6b}\
++  \u{26cd5}\
++  \u{452b}\
++  \u{84f1}\
++  \u{84f3}\
++  \u{8516}\
++  \u{273ca}\
++  \u{8564}\
++  \u{26f2c}\
++  \u{455d}\
++  \u{4561}\
++  \u{26fb1}\
++  \u{270d2}\
++  \u{456b}\
++  \u{8650}\
++  \u{8667}\
++  \u{8669}\
++  \u{86a9}\
++  \u{8688}\
++  \u{870e}\
++  \u{86e2}\
++  \u{8728}\
++  \u{876b}\
++  \u{8786}\
++  \u{87e1}\
++  \u{8801}\
++  \u{45f9}\
++  \u{8860}\
++  \u{27667}\
++  \u{88d7}\
++  \u{88de}\
++  \u{4635}\
++  \u{88fa}\
++  \u{34bb}\
++  \u{278ae}\
++  \u{27966}\
++  \u{46be}\
++  \u{46c7}\
++  \u{8aa0}\
++  \u{27ca8}\
++  \u{8cab}\
++  \u{8cc1}\
++  \u{8d1b}\
++  \u{8d77}\
++  \u{27f2f}\
++  \u{20804}\
++  \u{8dcb}\
++  \u{8dbc}\
++  \u{8df0}\
++  \u{208de}\
++  \u{8ed4}\
++  \u{285d2}\
++  \u{285ed}\
++  \u{9094}\
++  \u{90f1}\
++  \u{9111}\
++  \u{2872e}\
++  \u{911b}\
++  \u{9238}\
++  \u{92d7}\
++  \u{92d8}\
++  \u{927c}\
++  \u{93f9}\
++  \u{9415}\
++  \u{28bfa}\
++  \u{958b}\
++  \u{4995}\
++  \u{95b7}\
++  \u{28d77}\
++  \u{49e6}\
++  \u{96c3}\
++  \u{5db2}\
++  \u{9723}\
++  \u{29145}\
++  \u{2921a}\
++  \u{4a6e}\
++  \u{4a76}\
++  \u{97e0}\
++  \u{2940a}\
++  \u{4ab2}\
++  \u{29496}\
++  \u{9829}\
++  \u{295b6}\
++  \u{98e2}\
++  \u{4b33}\
++  \u{9929}\
++  \u{99a7}\
++  \u{99c2}\
++  \u{99fe}\
++  \u{4bce}\
++  \u{29b30}\
++  \u{9c40}\
++  \u{9cfd}\
++  \u{4cce}\
++  \u{4ced}\
++  \u{9d67}\
++  \u{2a0ce}\
++  \u{4cf8}\
++  \u{2a105}\
++  \u{2a20e}\
++  \u{2a291}\
++  \u{4d56}\
++  \u{9efe}\
++  \u{9f05}\
++  \u{9f0f}\
++  \u{9f16}\
++  \u{2a600}";
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..123a1f0617432a66375b037a515ae9abce74fb56
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7848 @@@
++# IdnaTest.txt\r
++# Date: 2017-06-02, 14:19:52 GMT\r
++# © 2017 Unicode®, Inc.\r
++# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.\r
++# For terms of use, see http://www.unicode.org/terms_of_use.html\r
++#\r
++# Contains test cases for verifying UTS46 conformance. For more information,\r
++# see http://www.unicode.org/reports/tr46/\r
++#\r
++# FORMAT:\r
++#\r
++# This file is in UTF8, with certain characters escaped using the \uXXXX or \x{XXXX}\r
++# convention where they could otherwise have a confusing display.\r
++# These characters include:\r
++# \r
++# - General Categories C, Z, and M\r
++# - Default ignorable characters\r
++# - Bidi categories R, AL, AN\r
++# \r
++# Columns (c1, c2,...) are separated by semicolons.\r
++# Leading and trailing spaces and tabs in each column are ignored.\r
++# Comments are indicated with hash marks.\r
++#\r
++#  Column 1: type -       T for transitional, N for nontransitional, B for both\r
++#  Column 2: source -     The source string to be tested\r
++#  Column 3: toUnicode -  The result of applying toUnicode to the source, using nontransitional. \r
++#                         A blank value means the same as the source value; a value in [...] is a set of error codes.\r
++#  Column 4: toASCII -    The result of applying toASCII to the source, using the specified type: T, N, or B.\r
++#                         A blank value means the same as the toUnicode value; a value in [...] is a set of error codes.\r
++#  Column 5: idna2008 -   NV8 is only present if the status is valid but the character is excluded by IDNA2008\r
++#                         from all domain names for all versions of Unicode.\r
++#                         XV8 is present when the character is excluded by IDNA2008 for the current version of Unicode. \r
++#                         These are informative values only.\r
++#\r
++# If the value of toUnicode is the same as source, the column will be blank.\r
++# The line comments currently show visible characters that have been escaped \r
++# (after removing default-ignorables and controls, except for whitespace)\r
++#\r
++# The test is performed with the following flag settings:\r
++#\r
++# VerifyDnsLength:   true\r
++# CheckHyphens:      true\r
++# CheckBidi:         true\r
++# CheckJoiners:      true\r
++# UseSTD3ASCIIRules: true\r
++#\r
++# An error in toUnicode or toASCII is indicated by a value in square brackets, such as "[B5 B6]".\r
++# In such a case, the contents is a list of error codes based on the step numbers in UTS46 and IDNA2008,\r
++# with the following formats:\r
++#\r
++#   Pn for Section 4 Processing step n\r
++#   Vn for 4.1 Validity Criteria step n\r
++#   An for 4.2 ToASCII step n\r
++#   Bn for Bidi (in IDNA2008)\r
++#   Cn for ContextJ (in IDNA2008)\r
++#\r
++# However, these particular error codes are only informative;\r
++# the important feature is whether or not there is an error.\r
++#\r
++# CONFORMANCE:\r
++#\r
++# To test for conformance to UTS46, an implementation must first perform the toUnicode operation\r
++# on the source string, then the toASCII operation (with the indicated type) on the source string. \r
++# Implementations may be more strict than UTS46; thus they may have errors where the file indicates results.\r
++# In particular, an implementation conformant to IDNA2008 would disallow the input for lines marked with NV8.\r
++#\r
++# Moreover, the error codes in the file are informative; implementations need only record that there is an error:\r
++# they need not reproduce those codes. Thus to then verify conformance for the toASCII and toUnicode columns:\r
++#\r
++# - If the file indicates an error, the implementation must also have an error.\r
++# - If the file does not indicate an error, then the implementation must either have an error, \r
++#   or must have a matching result.\r
++#\r
++# ====================================================================================================\r
++B;    fass.de;        ;       \r
++T;    faß.de;        ;       fass.de\r
++N;    faß.de;        ;       xn--fa-hia.de\r
++T;    Faß.de;        faß.de;        fass.de\r
++N;    Faß.de;        faß.de;        xn--fa-hia.de\r
++B;    xn--fa-hia.de;  faß.de;        xn--fa-hia.de\r
++\r
++# BIDI TESTS\r
++\r
++B;    à\u05D0;       [B5 B6];        [B5 B6] #       àא\r
++B;    a\u0300\u05D0;  [B5 B6];        [B5 B6] #       àא\r
++B;    A\u0300\u05D0;  [B5 B6];        [B5 B6] #       àא\r
++B;    À\u05D0;       [B5 B6];        [B5 B6] #       àא\r
++B;    xn--0ca24w;     [B5 B6];        [B5 B6] #       àא\r
++B;    0à.\u05D0;     [B1];   [B1]    #       0à.א\r
++B;    0a\u0300.\u05D0;        [B1];   [B1]    #       0à.א\r
++B;    0A\u0300.\u05D0;        [B1];   [B1]    #       0à.א\r
++B;    0À.\u05D0;     [B1];   [B1]    #       0à.א\r
++B;    xn--0-sfa.xn--4db;      [B1];   [B1]    #       0à.א\r
++B;    à.\u05D0\u0308;        ;       xn--0ca.xn--ssa73l      #       à.א̈\r
++B;    a\u0300.\u05D0\u0308;   à.\u05D0\u0308;        xn--0ca.xn--ssa73l      #       à.א̈\r
++B;    A\u0300.\u05D0\u0308;   à.\u05D0\u0308;        xn--0ca.xn--ssa73l      #       à.א̈\r
++B;    À.\u05D0\u0308;        à.\u05D0\u0308;        xn--0ca.xn--ssa73l      #       à.א̈\r
++B;    xn--0ca.xn--ssa73l;     à.\u05D0\u0308;        xn--0ca.xn--ssa73l      #       à.א̈\r
++B;    à.\u05D00\u0660\u05D0; [B4];   [B4]    #       à.א0٠א\r
++B;    a\u0300.\u05D00\u0660\u05D0;    [B4];   [B4]    #       à.א0٠א\r
++B;    A\u0300.\u05D00\u0660\u05D0;    [B4];   [B4]    #       à.א0٠א\r
++B;    À.\u05D00\u0660\u05D0; [B4];   [B4]    #       à.א0٠א\r
++B;    xn--0ca.xn--0-zhcb98c;  [B4];   [B4]    #       à.א0٠א\r
++B;    \u0308.\u05D0;  [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ̈.א\r
++B;    xn--ssa.xn--4db;        [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ̈.א\r
++B;    à.\u05D00\u0660;       [B4];   [B4]    #       à.א0٠\r
++B;    a\u0300.\u05D00\u0660;  [B4];   [B4]    #       à.א0٠\r
++B;    A\u0300.\u05D00\u0660;  [B4];   [B4]    #       à.א0٠\r
++B;    À.\u05D00\u0660;       [B4];   [B4]    #       à.א0٠\r
++B;    xn--0ca.xn--0-zhc74b;   [B4];   [B4]    #       à.א0٠\r
++B;    àˇ.\u05D0;    [B6];   [B6]    #       àˇ.א\r
++B;    a\u0300ˇ.\u05D0;       [B6];   [B6]    #       àˇ.א\r
++B;    A\u0300ˇ.\u05D0;       [B6];   [B6]    #       àˇ.א\r
++B;    Àˇ.\u05D0;    [B6];   [B6]    #       àˇ.א\r
++B;    xn--0ca88g.xn--4db;     [B6];   [B6]    #       àˇ.א\r
++B;    à\u0308.\u05D0;        ;       xn--0ca81i.xn--4db      #       à̈.א\r
++B;    a\u0300\u0308.\u05D0;   à\u0308.\u05D0;        xn--0ca81i.xn--4db      #       à̈.א\r
++B;    A\u0300\u0308.\u05D0;   à\u0308.\u05D0;        xn--0ca81i.xn--4db      #       à̈.א\r
++B;    À\u0308.\u05D0;        à\u0308.\u05D0;        xn--0ca81i.xn--4db      #       à̈.א\r
++B;    xn--0ca81i.xn--4db;     à\u0308.\u05D0;        xn--0ca81i.xn--4db      #       à̈.א\r
++\r
++# CONTEXT TESTS\r
++\r
++T;    a\u200Cb;       [C1];   ab      #       ab\r
++N;    a\u200Cb;       [C1];   [C1]    #       ab\r
++T;    A\u200CB;       [C1];   ab      #       ab\r
++N;    A\u200CB;       [C1];   [C1]    #       ab\r
++T;    A\u200Cb;       [C1];   ab      #       ab\r
++N;    A\u200Cb;       [C1];   [C1]    #       ab\r
++B;    ab;     ;       \r
++B;    xn--ab-j1t;     [C1];   [C1]    #       ab\r
++T;    a\u094D\u200Cb; ;       xn--ab-fsf      #       a्b\r
++N;    a\u094D\u200Cb; ;       xn--ab-fsf604u  #       a्b\r
++T;    A\u094D\u200CB; a\u094D\u200Cb; xn--ab-fsf      #       a्b\r
++N;    A\u094D\u200CB; a\u094D\u200Cb; xn--ab-fsf604u  #       a्b\r
++T;    A\u094D\u200Cb; a\u094D\u200Cb; xn--ab-fsf      #       a्b\r
++N;    A\u094D\u200Cb; a\u094D\u200Cb; xn--ab-fsf604u  #       a्b\r
++B;    xn--ab-fsf;     a\u094Db;       xn--ab-fsf      #       a्b\r
++B;    a\u094Db;       ;       xn--ab-fsf      #       a्b\r
++B;    A\u094DB;       a\u094Db;       xn--ab-fsf      #       a्b\r
++B;    A\u094Db;       a\u094Db;       xn--ab-fsf      #       a्b\r
++B;    xn--ab-fsf604u; a\u094D\u200Cb; xn--ab-fsf604u  #       a्b\r
++T;    \u0308\u200C\u0308\u0628b;      [B1 C1 V5];     [B1 V5] #       ̈̈بb\r
++N;    \u0308\u200C\u0308\u0628b;      [B1 C1 V5];     [B1 C1 V5]      #       ̈̈بb\r
++T;    \u0308\u200C\u0308\u0628B;      [B1 C1 V5];     [B1 V5] #       ̈̈بb\r
++N;    \u0308\u200C\u0308\u0628B;      [B1 C1 V5];     [B1 C1 V5]      #       ̈̈بb\r
++B;    xn--b-bcba413a; [B1 V5];        [B1 V5] #       ̈̈بb\r
++B;    xn--b-bcba413a2w8b;     [B1 C1 V5];     [B1 C1 V5]      #       ̈̈بb\r
++T;    a\u0628\u0308\u200C\u0308;      [B5 B6 C1];     [B5 B6] #       aب̈̈\r
++N;    a\u0628\u0308\u200C\u0308;      [B5 B6 C1];     [B5 B6 C1]      #       aب̈̈\r
++T;    A\u0628\u0308\u200C\u0308;      [B5 B6 C1];     [B5 B6] #       aب̈̈\r
++N;    A\u0628\u0308\u200C\u0308;      [B5 B6 C1];     [B5 B6 C1]      #       aب̈̈\r
++B;    xn--a-ccba213a; [B5 B6];        [B5 B6] #       aب̈̈\r
++B;    xn--a-ccba213a5w8b;     [B5 B6 C1];     [B5 B6 C1]      #       aب̈̈\r
++T;    a\u0628\u0308\u200C\u0308\u0628b;       [B5];   [B5]    #       aب̈̈بb\r
++N;    a\u0628\u0308\u200C\u0308\u0628b;       [B5];   [B5]    #       aب̈̈بb\r
++T;    A\u0628\u0308\u200C\u0308\u0628B;       [B5];   [B5]    #       aب̈̈بb\r
++N;    A\u0628\u0308\u200C\u0308\u0628B;       [B5];   [B5]    #       aب̈̈بb\r
++T;    A\u0628\u0308\u200C\u0308\u0628b;       [B5];   [B5]    #       aب̈̈بb\r
++N;    A\u0628\u0308\u200C\u0308\u0628b;       [B5];   [B5]    #       aب̈̈بb\r
++B;    xn--ab-uuba211bca;      [B5];   [B5]    #       aب̈̈بb\r
++B;    xn--ab-uuba211bca8057b; [B5];   [B5]    #       aب̈̈بb\r
++T;    a\u200Db;       [C2];   ab      #       ab\r
++N;    a\u200Db;       [C2];   [C2]    #       ab\r
++T;    A\u200DB;       [C2];   ab      #       ab\r
++N;    A\u200DB;       [C2];   [C2]    #       ab\r
++T;    A\u200Db;       [C2];   ab      #       ab\r
++N;    A\u200Db;       [C2];   [C2]    #       ab\r
++B;    xn--ab-m1t;     [C2];   [C2]    #       ab\r
++T;    a\u094D\u200Db; ;       xn--ab-fsf      #       a्b\r
++N;    a\u094D\u200Db; ;       xn--ab-fsf014u  #       a्b\r
++T;    A\u094D\u200DB; a\u094D\u200Db; xn--ab-fsf      #       a्b\r
++N;    A\u094D\u200DB; a\u094D\u200Db; xn--ab-fsf014u  #       a्b\r
++T;    A\u094D\u200Db; a\u094D\u200Db; xn--ab-fsf      #       a्b\r
++N;    A\u094D\u200Db; a\u094D\u200Db; xn--ab-fsf014u  #       a्b\r
++B;    xn--ab-fsf014u; a\u094D\u200Db; xn--ab-fsf014u  #       a्b\r
++T;    \u0308\u200D\u0308\u0628b;      [B1 C2 V5];     [B1 V5] #       ̈̈بb\r
++N;    \u0308\u200D\u0308\u0628b;      [B1 C2 V5];     [B1 C2 V5]      #       ̈̈بb\r
++T;    \u0308\u200D\u0308\u0628B;      [B1 C2 V5];     [B1 V5] #       ̈̈بb\r
++N;    \u0308\u200D\u0308\u0628B;      [B1 C2 V5];     [B1 C2 V5]      #       ̈̈بb\r
++B;    xn--b-bcba413a7w8b;     [B1 C2 V5];     [B1 C2 V5]      #       ̈̈بb\r
++T;    a\u0628\u0308\u200D\u0308;      [B5 B6 C2];     [B5 B6] #       aب̈̈\r
++N;    a\u0628\u0308\u200D\u0308;      [B5 B6 C2];     [B5 B6 C2]      #       aب̈̈\r
++T;    A\u0628\u0308\u200D\u0308;      [B5 B6 C2];     [B5 B6] #       aب̈̈\r
++N;    A\u0628\u0308\u200D\u0308;      [B5 B6 C2];     [B5 B6 C2]      #       aب̈̈\r
++B;    xn--a-ccba213abx8b;     [B5 B6 C2];     [B5 B6 C2]      #       aب̈̈\r
++T;    a\u0628\u0308\u200D\u0308\u0628b;       [B5 C2];        [B5]    #       aب̈̈بb\r
++N;    a\u0628\u0308\u200D\u0308\u0628b;       [B5 C2];        [B5 C2] #       aب̈̈بb\r
++T;    A\u0628\u0308\u200D\u0308\u0628B;       [B5 C2];        [B5]    #       aب̈̈بb\r
++N;    A\u0628\u0308\u200D\u0308\u0628B;       [B5 C2];        [B5 C2] #       aب̈̈بb\r
++T;    A\u0628\u0308\u200D\u0308\u0628b;       [B5 C2];        [B5]    #       aب̈̈بb\r
++N;    A\u0628\u0308\u200D\u0308\u0628b;       [B5 C2];        [B5 C2] #       aب̈̈بb\r
++B;    xn--ab-uuba211bca5157b; [B5 C2];        [B5 C2] #       aب̈̈بb\r
++\r
++# SELECTED TESTS\r
++\r
++B;    ¡;     ;       xn--7a; NV8\r
++B;    xn--7a; ¡;     xn--7a; NV8\r
++B;    ᧚;    ;       xn--pkf;        XV8\r
++B;    xn--pkf;        ᧚;    xn--pkf;        XV8\r
++B;    。;    [A4_2]; [A4_2]\r
++B;    .;      [A4_2]; [A4_2]\r
++B;    ꭠ;    ;       xn--3y9a\r
++B;    xn--3y9a;       ꭠ;    xn--3y9a\r
++B;    1234567890ä1234567890123456789012345678901234567890123456;     ;       [A4_2]\r
++B;    1234567890a\u03081234567890123456789012345678901234567890123456;        1234567890ä1234567890123456789012345678901234567890123456;     [A4_2]\r
++B;    1234567890A\u03081234567890123456789012345678901234567890123456;        1234567890ä1234567890123456789012345678901234567890123456;     [A4_2]\r
++B;    1234567890Ä1234567890123456789012345678901234567890123456;     1234567890ä1234567890123456789012345678901234567890123456;     [A4_2]\r
++B;    xn--12345678901234567890123456789012345678901234567890123456-fxe;       1234567890ä1234567890123456789012345678901234567890123456;     [A4_2]\r
++B;    www.eXample.cOm;        www.example.com;        \r
++B;    Bücher.de;     bücher.de;     xn--bcher-kva.de\r
++B;    Bu\u0308cher.de;        bücher.de;     xn--bcher-kva.de\r
++B;    bu\u0308cher.de;        bücher.de;     xn--bcher-kva.de\r
++B;    bücher.de;     ;       xn--bcher-kva.de\r
++B;    BÜCHER.DE;     bücher.de;     xn--bcher-kva.de\r
++B;    BU\u0308CHER.DE;        bücher.de;     xn--bcher-kva.de\r
++B;    xn--bcher-kva.de;       bücher.de;     xn--bcher-kva.de\r
++B;    ÖBB;   öbb;   xn--bb-eka\r
++B;    O\u0308BB;      öbb;   xn--bb-eka\r
++B;    o\u0308bb;      öbb;   xn--bb-eka\r
++B;    öbb;   ;       xn--bb-eka\r
++B;    Öbb;   öbb;   xn--bb-eka\r
++B;    O\u0308bb;      öbb;   xn--bb-eka\r
++B;    xn--bb-eka;     öbb;   xn--bb-eka\r
++T;    βόλος.com; ;       xn--nxasmq6b.com\r
++N;    βόλος.com; ;       xn--nxasmm1c.com\r
++T;    βο\u0301λος.com;   βόλος.com; xn--nxasmq6b.com\r
++N;    βο\u0301λος.com;   βόλος.com; xn--nxasmm1c.com\r
++B;    ΒΟ\u0301ΛΟΣ.COM;   βόλοσ.com; xn--nxasmq6b.com\r
++B;    ΒΌΛΟΣ.COM; βόλοσ.com; xn--nxasmq6b.com\r
++B;    βόλοσ.com; ;       xn--nxasmq6b.com\r
++B;    βο\u0301λοσ.com;   βόλοσ.com; xn--nxasmq6b.com\r
++B;    Βο\u0301λοσ.com;   βόλοσ.com; xn--nxasmq6b.com\r
++B;    Βόλοσ.com; βόλοσ.com; xn--nxasmq6b.com\r
++B;    xn--nxasmq6b.com;       βόλοσ.com; xn--nxasmq6b.com\r
++T;    Βο\u0301λος.com;   βόλος.com; xn--nxasmq6b.com\r
++N;    Βο\u0301λος.com;   βόλος.com; xn--nxasmm1c.com\r
++T;    Βόλος.com; βόλος.com; xn--nxasmq6b.com\r
++N;    Βόλος.com; βόλος.com; xn--nxasmm1c.com\r
++B;    xn--nxasmm1c.com;       βόλος.com; xn--nxasmm1c.com\r
++B;    xn--nxasmm1c;   βόλος;     xn--nxasmm1c\r
++T;    βόλος;     ;       xn--nxasmq6b\r
++N;    βόλος;     ;       xn--nxasmm1c\r
++T;    βο\u0301λος;       βόλος;     xn--nxasmq6b\r
++N;    βο\u0301λος;       βόλος;     xn--nxasmm1c\r
++B;    ΒΟ\u0301ΛΟΣ;       βόλοσ;     xn--nxasmq6b\r
++B;    ΒΌΛΟΣ;     βόλοσ;     xn--nxasmq6b\r
++B;    βόλοσ;     ;       xn--nxasmq6b\r
++B;    βο\u0301λοσ;       βόλοσ;     xn--nxasmq6b\r
++B;    Βο\u0301λοσ;       βόλοσ;     xn--nxasmq6b\r
++B;    Βόλοσ;     βόλοσ;     xn--nxasmq6b\r
++B;    xn--nxasmq6b;   βόλοσ;     xn--nxasmq6b\r
++T;    Βόλος;     βόλος;     xn--nxasmq6b\r
++N;    Βόλος;     βόλος;     xn--nxasmm1c\r
++T;    Βο\u0301λος;       βόλος;     xn--nxasmq6b\r
++N;    Βο\u0301λος;       βόλος;     xn--nxasmm1c\r
++T;    www.ශ\u0DCA\u200Dර\u0DD3.com;       ;       www.xn--10cl1a0b.com    #       www.ශ්රී.com\r
++N;    www.ශ\u0DCA\u200Dර\u0DD3.com;       ;       www.xn--10cl1a0b660p.com        #       www.ශ්රී.com\r
++T;    WWW.ශ\u0DCA\u200Dර\u0DD3.COM;       www.ශ\u0DCA\u200Dර\u0DD3.com;       www.xn--10cl1a0b.com    #       www.ශ්රී.com\r
++N;    WWW.ශ\u0DCA\u200Dර\u0DD3.COM;       www.ශ\u0DCA\u200Dර\u0DD3.com;       www.xn--10cl1a0b660p.com        #       www.ශ්රී.com\r
++T;    Www.ශ\u0DCA\u200Dර\u0DD3.com;       www.ශ\u0DCA\u200Dර\u0DD3.com;       www.xn--10cl1a0b.com    #       www.ශ්රී.com\r
++N;    Www.ශ\u0DCA\u200Dර\u0DD3.com;       www.ශ\u0DCA\u200Dර\u0DD3.com;       www.xn--10cl1a0b660p.com        #       www.ශ්රී.com\r
++B;    www.xn--10cl1a0b.com;   www.ශ\u0DCAර\u0DD3.com;     www.xn--10cl1a0b.com    #       www.ශ්රී.com\r
++B;    www.ශ\u0DCAර\u0DD3.com;     ;       www.xn--10cl1a0b.com    #       www.ශ්රී.com\r
++B;    WWW.ශ\u0DCAර\u0DD3.COM;     www.ශ\u0DCAර\u0DD3.com;     www.xn--10cl1a0b.com    #       www.ශ්රී.com\r
++B;    Www.ශ\u0DCAර\u0DD3.com;     www.ශ\u0DCAර\u0DD3.com;     www.xn--10cl1a0b.com    #       www.ශ්රී.com\r
++B;    www.xn--10cl1a0b660p.com;       www.ශ\u0DCA\u200Dර\u0DD3.com;       www.xn--10cl1a0b660p.com        #       www.ශ්රී.com\r
++T;    \u0646\u0627\u0645\u0647\u200C\u0627\u06CC;     ;       xn--mgba3gch31f #       نامهای\r
++N;    \u0646\u0627\u0645\u0647\u200C\u0627\u06CC;     ;       xn--mgba3gch31f060k     #       نامهای\r
++B;    xn--mgba3gch31f;        \u0646\u0627\u0645\u0647\u0627\u06CC;   xn--mgba3gch31f #       نامهای\r
++B;    \u0646\u0627\u0645\u0647\u0627\u06CC;   ;       xn--mgba3gch31f #       نامهای\r
++B;    xn--mgba3gch31f060k;    \u0646\u0627\u0645\u0647\u200C\u0627\u06CC;     xn--mgba3gch31f060k     #       نامهای\r
++B;    xn--mgba3gch31f060k.com;        \u0646\u0627\u0645\u0647\u200C\u0627\u06CC.com; xn--mgba3gch31f060k.com #       نامهای.com\r
++T;    \u0646\u0627\u0645\u0647\u200C\u0627\u06CC.com; ;       xn--mgba3gch31f.com     #       نامهای.com\r
++N;    \u0646\u0627\u0645\u0647\u200C\u0627\u06CC.com; ;       xn--mgba3gch31f060k.com #       نامهای.com\r
++T;    \u0646\u0627\u0645\u0647\u200C\u0627\u06CC.COM; \u0646\u0627\u0645\u0647\u200C\u0627\u06CC.com; xn--mgba3gch31f.com     #       نامهای.com\r
++N;    \u0646\u0627\u0645\u0647\u200C\u0627\u06CC.COM; \u0646\u0627\u0645\u0647\u200C\u0627\u06CC.com; xn--mgba3gch31f060k.com #       نامهای.com\r
++T;    \u0646\u0627\u0645\u0647\u200C\u0627\u06CC.Com; \u0646\u0627\u0645\u0647\u200C\u0627\u06CC.com; xn--mgba3gch31f.com     #       نامهای.com\r
++N;    \u0646\u0627\u0645\u0647\u200C\u0627\u06CC.Com; \u0646\u0627\u0645\u0647\u200C\u0627\u06CC.com; xn--mgba3gch31f060k.com #       نامهای.com\r
++B;    xn--mgba3gch31f.com;    \u0646\u0627\u0645\u0647\u0627\u06CC.com;       xn--mgba3gch31f.com     #       نامهای.com\r
++B;    \u0646\u0627\u0645\u0647\u0627\u06CC.com;       ;       xn--mgba3gch31f.com     #       نامهای.com\r
++B;    \u0646\u0627\u0645\u0647\u0627\u06CC.COM;       \u0646\u0627\u0645\u0647\u0627\u06CC.com;       xn--mgba3gch31f.com     #       نامهای.com\r
++B;    \u0646\u0627\u0645\u0647\u0627\u06CC.Com;       \u0646\u0627\u0645\u0647\u0627\u06CC.com;       xn--mgba3gch31f.com     #       نامهای.com\r
++B;    a.b.c。d。; a.b.c.d.;       \r
++B;    a.b.c。d。;   a.b.c.d.;       \r
++B;    A.B.C。D。;   a.b.c.d.;       \r
++B;    A.b.c。D。;   a.b.c.d.;       \r
++B;    a.b.c.d.;       ;       \r
++B;    A.B.C。D。; a.b.c.d.;       \r
++B;    A.b.c。D。; a.b.c.d.;       \r
++B;    U\u0308.xn--tda;        ü.ü;  xn--tda.xn--tda\r
++B;    Ü.xn--tda;     ü.ü;  xn--tda.xn--tda\r
++B;    ü.xn--tda;     ü.ü;  xn--tda.xn--tda\r
++B;    u\u0308.xn--tda;        ü.ü;  xn--tda.xn--tda\r
++B;    U\u0308.XN--TDA;        ü.ü;  xn--tda.xn--tda\r
++B;    Ü.XN--TDA;     ü.ü;  xn--tda.xn--tda\r
++B;    Ü.xn--Tda;     ü.ü;  xn--tda.xn--tda\r
++B;    U\u0308.xn--Tda;        ü.ü;  xn--tda.xn--tda\r
++B;    xn--tda.xn--tda;        ü.ü;  xn--tda.xn--tda\r
++B;    ü.ü;  ;       xn--tda.xn--tda\r
++B;    u\u0308.u\u0308;        ü.ü;  xn--tda.xn--tda\r
++B;    U\u0308.U\u0308;        ü.ü;  xn--tda.xn--tda\r
++B;    Ü.Ü;  ü.ü;  xn--tda.xn--tda\r
++B;    Ü.ü;  ü.ü;  xn--tda.xn--tda\r
++B;    U\u0308.u\u0308;        ü.ü;  xn--tda.xn--tda\r
++B;    xn--u-ccb;      [V1];   [V1]    #       ü\r
++B;    a⒈com;        [P1 V6];        [P1 V6]\r
++B;    a1.com; ;       \r
++B;    A⒈COM;        [P1 V6];        [P1 V6]\r
++B;    A⒈Com;        [P1 V6];        [P1 V6]\r
++B;    xn--acom-0w1b;  [V6];   [V6]\r
++B;    xn--a-ecp.ru;   [V6];   [V6]\r
++B;    xn--0.pt;       [A3];   [A3]\r
++B;    xn--a.pt;       [V6];   [V6]    #       .pt\r
++B;    xn--a-Ä.pt;    [A3];   [A3]\r
++B;    xn--a-A\u0308.pt;       [A3];   [A3]\r
++B;    xn--a-a\u0308.pt;       [A3];   [A3]\r
++B;    xn--a-ä.pt;    [A3];   [A3]\r
++B;    XN--A-Ä.PT;    [A3];   [A3]\r
++B;    XN--A-A\u0308.PT;       [A3];   [A3]\r
++B;    Xn--A-A\u0308.pt;       [A3];   [A3]\r
++B;    Xn--A-Ä.pt;    [A3];   [A3]\r
++B;    xn--xn--a--gua.pt;      [V2];   [V2]\r
++B;    日本語。JP;     日本語.jp;   xn--wgv71a119e.jp\r
++B;    日本語。JP; 日本語.jp;   xn--wgv71a119e.jp\r
++B;    日本語。jp; 日本語.jp;   xn--wgv71a119e.jp\r
++B;    日本語。Jp; 日本語.jp;   xn--wgv71a119e.jp\r
++B;    xn--wgv71a119e.jp;      日本語.jp;   xn--wgv71a119e.jp\r
++B;    日本語.jp;   ;       xn--wgv71a119e.jp\r
++B;    日本語.JP;   日本語.jp;   xn--wgv71a119e.jp\r
++B;    日本語.Jp;   日本語.jp;   xn--wgv71a119e.jp\r
++B;    日本語。jp;     日本語.jp;   xn--wgv71a119e.jp\r
++B;    日本語。Jp;     日本語.jp;   xn--wgv71a119e.jp\r
++B;    ☕;    ;       xn--53h;        NV8\r
++B;    xn--53h;        ☕;    xn--53h;        NV8\r
++T;    1.aß\u200C\u200Db\u200C\u200Dcßßßßdςσßßßßßßßßeßßßßßßßßßßxßßßßßßßßßßyßßßßßßßß\u0302ßz;       [C1 C2];        [A4_2]  #       1.aßbcßßßßdςσßßßßßßßßeßßßßßßßßßßxßßßßßßßßßßyßßßßßßßß̂ßz\r
++N;    1.aß\u200C\u200Db\u200C\u200Dcßßßßdςσßßßßßßßßeßßßßßßßßßßxßßßßßßßßßßyßßßßßßßß\u0302ßz;       [C1 C2];        [C1 C2 A4_2]    #       1.aßbcßßßßdςσßßßßßßßßeßßßßßßßßßßxßßßßßßßßßßyßßßßßßßß̂ßz\r
++T;    1.ASS\u200C\u200DB\u200C\u200DCSSSSSSSSDΣΣSSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSSS\u0302SSZ;       [C1 C2];        [A4_2]  #       1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\r
++N;    1.ASS\u200C\u200DB\u200C\u200DCSSSSSSSSDΣΣSSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSSS\u0302SSZ;       [C1 C2];        [C1 C2 A4_2]    #       1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\r
++T;    1.ASS\u200C\u200DB\u200C\u200DCSSSSSSSSDΣΣSSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSSŜSSZ;    [C1 C2];        [A4_2]  #       1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\r
++N;    1.ASS\u200C\u200DB\u200C\u200DCSSSSSSSSDΣΣSSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSSŜSSZ;    [C1 C2];        [C1 C2 A4_2]    #       1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\r
++T;    1.ass\u200C\u200Db\u200C\u200Dcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz;    [C1 C2];        [A4_2]  #       1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\r
++N;    1.ass\u200C\u200Db\u200C\u200Dcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz;    [C1 C2];        [C1 C2 A4_2]    #       1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\r
++T;    1.ass\u200C\u200Db\u200C\u200Dcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssyssssssssssssssss\u0302ssz;       [C1 C2];        [A4_2]  #       1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\r
++N;    1.ass\u200C\u200Db\u200C\u200Dcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssyssssssssssssssss\u0302ssz;       [C1 C2];        [C1 C2 A4_2]    #       1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\r
++T;    1.Ass\u200C\u200Db\u200C\u200Dcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssyssssssssssssssss\u0302ssz;       [C1 C2];        [A4_2]  #       1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\r
++N;    1.Ass\u200C\u200Db\u200C\u200Dcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssyssssssssssssssss\u0302ssz;       [C1 C2];        [C1 C2 A4_2]    #       1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\r
++T;    1.Ass\u200C\u200Db\u200C\u200Dcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz;    [C1 C2];        [A4_2]  #       1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\r
++N;    1.Ass\u200C\u200Db\u200C\u200Dcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz;    [C1 C2];        [C1 C2 A4_2]    #       1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\r
++B;    1.xn--assbcssssssssdssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssssz-pxq1419aa;    1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz;    [A4_2]\r
++B;    1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz;    ;       [A4_2]\r
++B;    1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssyssssssssssssssss\u0302ssz;       1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz;    [A4_2]\r
++B;    1.ASSBCSSSSSSSSDΣΣSSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSSS\u0302SSZ;       1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz;    [A4_2]\r
++B;    1.ASSBCSSSSSSSSDΣΣSSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSSŜSSZ;    1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz;    [A4_2]\r
++B;    1.Assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz;    1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz;    [A4_2]\r
++B;    1.Assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssyssssssssssssssss\u0302ssz;       1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz;    [A4_2]\r
++B;    1.xn--assbcssssssssdssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssssz-pxq1419aa69989dba9gc; [C1 C2];        [C1 C2 A4_2]    #       1.assbcssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\r
++T;    1.Aß\u200C\u200Db\u200C\u200Dcßßßßdςσßßßßßßßßeßßßßßßßßßßxßßßßßßßßßßyßßßßßßßß\u0302ßz;       [C1 C2];        [A4_2]  #       1.aßbcßßßßdςσßßßßßßßßeßßßßßßßßßßxßßßßßßßßßßyßßßßßßßß̂ßz\r
++N;    1.Aß\u200C\u200Db\u200C\u200Dcßßßßdςσßßßßßßßßeßßßßßßßßßßxßßßßßßßßßßyßßßßßßßß\u0302ßz;       [C1 C2];        [C1 C2 A4_2]    #       1.aßbcßßßßdςσßßßßßßßßeßßßßßßßßßßxßßßßßßßßßßyßßßßßßßß̂ßz\r
++B;    1.xn--abcdexyz-qyacaaabaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaa010ze2isb1140zba8cc; [C1 C2];        [C1 C2 A4_2]    #       1.aßbcßßßßdςσßßßßßßßßeßßßßßßßßßßxßßßßßßßßßßyßßßßßßßß̂ßz\r
++T;    \u200Cx\u200Dn\u200C-\u200D-bß;        [C1 C2];        xn--bss #       xn--bß\r
++N;    \u200Cx\u200Dn\u200C-\u200D-bß;        [C1 C2];        [C1 C2] #       xn--bß\r
++T;    \u200CX\u200DN\u200C-\u200D-BSS;        [C1 C2];        xn--bss #       xn--bss\r
++N;    \u200CX\u200DN\u200C-\u200D-BSS;        [C1 C2];        [C1 C2] #       xn--bss\r
++T;    \u200Cx\u200Dn\u200C-\u200D-bss;        [C1 C2];        xn--bss #       xn--bss\r
++N;    \u200Cx\u200Dn\u200C-\u200D-bss;        [C1 C2];        [C1 C2] #       xn--bss\r
++T;    \u200CX\u200Dn\u200C-\u200D-Bss;        [C1 C2];        xn--bss #       xn--bss\r
++N;    \u200CX\u200Dn\u200C-\u200D-Bss;        [C1 C2];        [C1 C2] #       xn--bss\r
++B;    xn--bss;        夙;    xn--bss\r
++B;    夙;    ;       xn--bss\r
++B;    xn--xn--bss-7z6ccid;    [C1 C2];        [C1 C2] #       xn--bss\r
++T;    \u200CX\u200Dn\u200C-\u200D-Bß;        [C1 C2];        xn--bss #       xn--bß\r
++N;    \u200CX\u200Dn\u200C-\u200D-Bß;        [C1 C2];        [C1 C2] #       xn--bß\r
++B;    xn--xn--b-pqa5796ccahd; [C1 C2];        [C1 C2] #       xn--bß\r
++B;    ˣ\u034Fℕ\u200B﹣\u00AD-\u180Cℬ\uFE00ſ\u2064𝔰󠇯ffl;        夡夞夜夙;   xn--bssffl\r
++B;    x\u034FN\u200B-\u00AD-\u180CB\uFE00s\u2064s󠇯ffl;     夡夞夜夙;   xn--bssffl\r
++B;    x\u034Fn\u200B-\u00AD-\u180Cb\uFE00s\u2064s󠇯ffl;     夡夞夜夙;   xn--bssffl\r
++B;    X\u034FN\u200B-\u00AD-\u180CB\uFE00S\u2064S󠇯FFL;     夡夞夜夙;   xn--bssffl\r
++B;    X\u034Fn\u200B-\u00AD-\u180CB\uFE00s\u2064s󠇯ffl;     夡夞夜夙;   xn--bssffl\r
++B;    xn--bssffl;     夡夞夜夙;   xn--bssffl\r
++B;    夡夞夜夙;   ;       xn--bssffl\r
++B;    ˣ\u034Fℕ\u200B﹣\u00AD-\u180Cℬ\uFE00S\u2064𝔰󠇯FFL; 夡夞夜夙;   xn--bssffl\r
++B;    x\u034FN\u200B-\u00AD-\u180CB\uFE00S\u2064s󠇯FFL;     夡夞夜夙;   xn--bssffl\r
++B;    ˣ\u034Fℕ\u200B﹣\u00AD-\u180Cℬ\uFE00s\u2064𝔰󠇯ffl; 夡夞夜夙;   xn--bssffl\r
++B;    123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;  ;       \r
++B;    123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901.; ;       \r
++B;    123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789012; ;       [A4_1]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901234.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890;  ;       [A4_2]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901234.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890.; ;       [A4_2]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901234.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901; ;       [A4_1 A4_2]\r
++B;    ä1234567890123456789012345678901234567890123456789012345;      ;       xn--1234567890123456789012345678901234567890123456789012345-9te\r
++B;    a\u03081234567890123456789012345678901234567890123456789012345; ä1234567890123456789012345678901234567890123456789012345;      xn--1234567890123456789012345678901234567890123456789012345-9te\r
++B;    A\u03081234567890123456789012345678901234567890123456789012345; ä1234567890123456789012345678901234567890123456789012345;      xn--1234567890123456789012345678901234567890123456789012345-9te\r
++B;    Ä1234567890123456789012345678901234567890123456789012345;      ä1234567890123456789012345678901234567890123456789012345;      xn--1234567890123456789012345678901234567890123456789012345-9te\r
++B;    xn--1234567890123456789012345678901234567890123456789012345-9te;        ä1234567890123456789012345678901234567890123456789012345;      xn--1234567890123456789012345678901234567890123456789012345-9te\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;        ;       123456789012345678901234567890123456789012345678901234567890123.xn--1234567890123456789012345678901234567890123456789012345-kue.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890a\u0308123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;   123456789012345678901234567890123456789012345678901234567890123.1234567890ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;        123456789012345678901234567890123456789012345678901234567890123.xn--1234567890123456789012345678901234567890123456789012345-kue.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890A\u0308123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;   123456789012345678901234567890123456789012345678901234567890123.1234567890ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;        123456789012345678901234567890123456789012345678901234567890123.xn--1234567890123456789012345678901234567890123456789012345-kue.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890Ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;        123456789012345678901234567890123456789012345678901234567890123.1234567890ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;        123456789012345678901234567890123456789012345678901234567890123.xn--1234567890123456789012345678901234567890123456789012345-kue.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901\r
++B;    123456789012345678901234567890123456789012345678901234567890123.xn--1234567890123456789012345678901234567890123456789012345-kue.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;  123456789012345678901234567890123456789012345678901234567890123.1234567890ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;        123456789012345678901234567890123456789012345678901234567890123.xn--1234567890123456789012345678901234567890123456789012345-kue.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901.;       ;       123456789012345678901234567890123456789012345678901234567890123.xn--1234567890123456789012345678901234567890123456789012345-kue.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901.\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890a\u0308123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901.;  123456789012345678901234567890123456789012345678901234567890123.1234567890ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901.;       123456789012345678901234567890123456789012345678901234567890123.xn--1234567890123456789012345678901234567890123456789012345-kue.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901.\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890A\u0308123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901.;  123456789012345678901234567890123456789012345678901234567890123.1234567890ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901.;       123456789012345678901234567890123456789012345678901234567890123.xn--1234567890123456789012345678901234567890123456789012345-kue.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901.\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890Ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901.;       123456789012345678901234567890123456789012345678901234567890123.1234567890ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901.;       123456789012345678901234567890123456789012345678901234567890123.xn--1234567890123456789012345678901234567890123456789012345-kue.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901.\r
++B;    123456789012345678901234567890123456789012345678901234567890123.xn--1234567890123456789012345678901234567890123456789012345-kue.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901.; 123456789012345678901234567890123456789012345678901234567890123.1234567890ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901.;       123456789012345678901234567890123456789012345678901234567890123.xn--1234567890123456789012345678901234567890123456789012345-kue.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901.\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789012;       ;       [A4_1]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890a\u0308123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789012;  123456789012345678901234567890123456789012345678901234567890123.1234567890ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789012;       [A4_1]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890A\u0308123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789012;  123456789012345678901234567890123456789012345678901234567890123.1234567890ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789012;       [A4_1]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890Ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789012;       123456789012345678901234567890123456789012345678901234567890123.1234567890ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789012;       [A4_1]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.xn--1234567890123456789012345678901234567890123456789012345-kue.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789012; 123456789012345678901234567890123456789012345678901234567890123.1234567890ä123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345678901234567890123.12345678901234567890123456789012345678901234567890123456789012;       [A4_1]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890;        ;       [A4_2]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890a\u03081234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890;   123456789012345678901234567890123456789012345678901234567890123.1234567890ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890;        [A4_2]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890A\u03081234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890;   123456789012345678901234567890123456789012345678901234567890123.1234567890ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890;        [A4_2]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890Ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890;        123456789012345678901234567890123456789012345678901234567890123.1234567890ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890;        [A4_2]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.xn--12345678901234567890123456789012345678901234567890123456-fxe.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890;  123456789012345678901234567890123456789012345678901234567890123.1234567890ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890;        [A4_2]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890.;       ;       [A4_2]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890a\u03081234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890.;  123456789012345678901234567890123456789012345678901234567890123.1234567890ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890.;       [A4_2]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890A\u03081234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890.;  123456789012345678901234567890123456789012345678901234567890123.1234567890ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890.;       [A4_2]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890Ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890.;       123456789012345678901234567890123456789012345678901234567890123.1234567890ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890.;       [A4_2]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.xn--12345678901234567890123456789012345678901234567890123456-fxe.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890.; 123456789012345678901234567890123456789012345678901234567890123.1234567890ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.123456789012345678901234567890123456789012345678901234567890.;       [A4_2]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;       ;       [A4_1 A4_2]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890a\u03081234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;  123456789012345678901234567890123456789012345678901234567890123.1234567890ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;       [A4_1 A4_2]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890A\u03081234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;  123456789012345678901234567890123456789012345678901234567890123.1234567890ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;       [A4_1 A4_2]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.1234567890Ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;       123456789012345678901234567890123456789012345678901234567890123.1234567890ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;       [A4_1 A4_2]\r
++B;    123456789012345678901234567890123456789012345678901234567890123.xn--12345678901234567890123456789012345678901234567890123456-fxe.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901; 123456789012345678901234567890123456789012345678901234567890123.1234567890ä1234567890123456789012345678901234567890123456.123456789012345678901234567890123456789012345678901234567890123.1234567890123456789012345678901234567890123456789012345678901;       [A4_1 A4_2]\r
++B;    a.b..-q--a-.e;  [V2 V3 A4_2];   [V2 V3 A4_2]\r
++B;    a.b..-q--ä-.e; [V2 V3 A4_2];   [V2 V3 A4_2]\r
++B;    a.b..-q--a\u0308-.e;    [V2 V3 A4_2];   [V2 V3 A4_2]\r
++B;    A.B..-Q--A\u0308-.E;    [V2 V3 A4_2];   [V2 V3 A4_2]\r
++B;    A.B..-Q--Ä-.E; [V2 V3 A4_2];   [V2 V3 A4_2]\r
++B;    A.b..-Q--Ä-.E; [V2 V3 A4_2];   [V2 V3 A4_2]\r
++B;    A.b..-Q--A\u0308-.E;    [V2 V3 A4_2];   [V2 V3 A4_2]\r
++B;    a.b..xn---q----jra.e;   [V2 V3 A4_2];   [V2 V3 A4_2]\r
++B;    a..c;   [A4_2]; [A4_2]\r
++B;    a.-b.;  [V3];   [V3]\r
++B;    a.b-.c; [V3];   [V3]\r
++B;    a.-.c;  [V3];   [V3]\r
++B;    a.bc--de.f;     [V2];   [V2]\r
++B;    ä.\u00AD.c;    [A4_2]; [A4_2]\r
++B;    a\u0308.\u00AD.c;       [A4_2]; [A4_2]\r
++B;    A\u0308.\u00AD.C;       [A4_2]; [A4_2]\r
++B;    Ä.\u00AD.C;    [A4_2]; [A4_2]\r
++B;    xn--4ca..c;     [A4_2]; [A4_2]\r
++B;    ä.-b.; [V3];   [V3]\r
++B;    a\u0308.-b.;    [V3];   [V3]\r
++B;    A\u0308.-B.;    [V3];   [V3]\r
++B;    Ä.-B.; [V3];   [V3]\r
++B;    xn--4ca.-b.;    [V3];   [V3]\r
++B;    ä.b-.c;        [V3];   [V3]\r
++B;    a\u0308.b-.c;   [V3];   [V3]\r
++B;    A\u0308.B-.C;   [V3];   [V3]\r
++B;    Ä.B-.C;        [V3];   [V3]\r
++B;    Ä.b-.C;        [V3];   [V3]\r
++B;    A\u0308.b-.C;   [V3];   [V3]\r
++B;    xn--4ca.b-.c;   [V3];   [V3]\r
++B;    ä.-.c; [V3];   [V3]\r
++B;    a\u0308.-.c;    [V3];   [V3]\r
++B;    A\u0308.-.C;    [V3];   [V3]\r
++B;    Ä.-.C; [V3];   [V3]\r
++B;    xn--4ca.-.c;    [V3];   [V3]\r
++B;    ä.bc--de.f;    [V2];   [V2]\r
++B;    a\u0308.bc--de.f;       [V2];   [V2]\r
++B;    A\u0308.BC--DE.F;       [V2];   [V2]\r
++B;    Ä.BC--DE.F;    [V2];   [V2]\r
++B;    Ä.bc--De.f;    [V2];   [V2]\r
++B;    A\u0308.bc--De.f;       [V2];   [V2]\r
++B;    xn--4ca.bc--de.f;       [V2];   [V2]\r
++B;    a.b.\u0308c.d;  [V5];   [V5]    #       a.b.̈c.d\r
++B;    A.B.\u0308C.D;  [V5];   [V5]    #       a.b.̈c.d\r
++B;    A.b.\u0308c.d;  [V5];   [V5]    #       a.b.̈c.d\r
++B;    a.b.xn--c-bcb.d;        [V5];   [V5]    #       a.b.̈c.d\r
++B;    A0;     a0;     \r
++B;    0A;     0a;     \r
++B;    0A.\u05D0;      [B1];   [B1]    #       0a.א\r
++B;    0a.\u05D0;      [B1];   [B1]    #       0a.א\r
++B;    0a.xn--4db;     [B1];   [B1]    #       0a.א\r
++B;    c.xn--0-eha.xn--4db;    [B1];   [B1]    #       c.0ü.א\r
++B;    b-.\u05D0;      [B6 V3];        [B6 V3] #       b-.א\r
++B;    B-.\u05D0;      [B6 V3];        [B6 V3] #       b-.א\r
++B;    b-.xn--4db;     [B6 V3];        [B6 V3] #       b-.א\r
++B;    d.xn----dha.xn--4db;    [B6 V3];        [B6 V3] #       d.ü-.א\r
++B;    a\u05D0;        [B5 B6];        [B5 B6] #       aא\r
++B;    A\u05D0;        [B5 B6];        [B5 B6] #       aא\r
++B;    xn--a-0hc;      [B5 B6];        [B5 B6] #       aא\r
++B;    \u05D0\u05C7;   ;       xn--vdbr        #       אׇ\r
++B;    xn--vdbr;       \u05D0\u05C7;   xn--vdbr        #       אׇ\r
++B;    \u05D09\u05C7;  ;       xn--9-ihcz      #       א9ׇ\r
++B;    xn--9-ihcz;     \u05D09\u05C7;  xn--9-ihcz      #       א9ׇ\r
++B;    \u05D0a\u05C7;  [B2 B3];        [B2 B3] #       אaׇ\r
++B;    \u05D0A\u05C7;  [B2 B3];        [B2 B3] #       אaׇ\r
++B;    xn--a-ihcz;     [B2 B3];        [B2 B3] #       אaׇ\r
++B;    \u05D0\u05EA;   ;       xn--4db6c       #       את\r
++B;    xn--4db6c;      \u05D0\u05EA;   xn--4db6c       #       את\r
++B;    \u05D0\u05F3\u05EA;     ;       xn--4db6c0a     #       א׳ת\r
++B;    xn--4db6c0a;    \u05D0\u05F3\u05EA;     xn--4db6c0a     #       א׳ת\r
++B;    a\u05D0Tz;      [B5];   [B5]    #       aאtz\r
++B;    a\u05D0tz;      [B5];   [B5]    #       aאtz\r
++B;    A\u05D0TZ;      [B5];   [B5]    #       aאtz\r
++B;    A\u05D0tz;      [B5];   [B5]    #       aאtz\r
++B;    xn--atz-qpe;    [B5];   [B5]    #       aאtz\r
++B;    \u05D0T\u05EA;  [B2];   [B2]    #       אtת\r
++B;    \u05D0t\u05EA;  [B2];   [B2]    #       אtת\r
++B;    xn--t-zhc3f;    [B2];   [B2]    #       אtת\r
++B;    \u05D07\u05EA;  ;       xn--7-zhc3f     #       א7ת\r
++B;    xn--7-zhc3f;    \u05D07\u05EA;  xn--7-zhc3f     #       א7ת\r
++B;    \u05D0\u0667\u05EA;     ;       xn--4db6c6t     #       א٧ת\r
++B;    xn--4db6c6t;    \u05D0\u0667\u05EA;     xn--4db6c6t     #       א٧ת\r
++B;    a7\u0667z;      [B5];   [B5]    #       a7٧z\r
++B;    A7\u0667Z;      [B5];   [B5]    #       a7٧z\r
++B;    A7\u0667z;      [B5];   [B5]    #       a7٧z\r
++B;    xn--a7z-06e;    [B5];   [B5]    #       a7٧z\r
++B;    \u05D07\u0667\u05EA;    [B4];   [B4]    #       א7٧ת\r
++B;    xn--7-zhc3fty;  [B4];   [B4]    #       א7٧ת\r
++T;    ஹ\u0BCD\u200D;        ;       xn--dmc4b       #       ஹ்\r
++N;    ஹ\u0BCD\u200D;        ;       xn--dmc4b194h   #       ஹ்\r
++B;    xn--dmc4b;      ஹ\u0BCD;      xn--dmc4b       #       ஹ்\r
++B;    ஹ\u0BCD;      ;       xn--dmc4b       #       ஹ்\r
++B;    xn--dmc4b194h;  ஹ\u0BCD\u200D;        xn--dmc4b194h   #       ஹ்\r
++T;    ஹ\u200D;      [C2];   xn--dmc #       ஹ\r
++N;    ஹ\u200D;      [C2];   [C2]    #       ஹ\r
++B;    xn--dmc;        ஹ;    xn--dmc\r
++B;    ஹ;    ;       xn--dmc\r
++B;    xn--dmc225h;    [C2];   [C2]    #       ஹ\r
++T;    \u200D; [C2];   [A4_2]  #       \r
++N;    \u200D; [C2];   [C2]    #       \r
++B;    ;       [A4_2]; [A4_2]\r
++B;    xn--1ug;        [C2];   [C2]    #       \r
++T;    ஹ\u0BCD\u200C;        ;       xn--dmc4b       #       ஹ்\r
++N;    ஹ\u0BCD\u200C;        ;       xn--dmc4by94h   #       ஹ்\r
++B;    xn--dmc4by94h;  ஹ\u0BCD\u200C;        xn--dmc4by94h   #       ஹ்\r
++T;    ஹ\u200C;      [C1];   xn--dmc #       ஹ\r
++N;    ஹ\u200C;      [C1];   [C1]    #       ஹ\r
++B;    xn--dmc025h;    [C1];   [C1]    #       ஹ\r
++T;    \u200C; [C1];   [A4_2]  #       \r
++N;    \u200C; [C1];   [C1]    #       \r
++B;    xn--0ug;        [C1];   [C1]    #       \r
++T;    \u0644\u0670\u200C\u06ED\u06EF; ;       xn--ghb2gxqia   #       لٰۭۯ\r
++N;    \u0644\u0670\u200C\u06ED\u06EF; ;       xn--ghb2gxqia7523a      #       لٰۭۯ\r
++B;    xn--ghb2gxqia;  \u0644\u0670\u06ED\u06EF;       xn--ghb2gxqia   #       لٰۭۯ\r
++B;    \u0644\u0670\u06ED\u06EF;       ;       xn--ghb2gxqia   #       لٰۭۯ\r
++B;    xn--ghb2gxqia7523a;     \u0644\u0670\u200C\u06ED\u06EF; xn--ghb2gxqia7523a      #       لٰۭۯ\r
++T;    \u0644\u0670\u200C\u06EF;       ;       xn--ghb2g3q     #       لٰۯ\r
++N;    \u0644\u0670\u200C\u06EF;       ;       xn--ghb2g3qq34f #       لٰۯ\r
++B;    xn--ghb2g3q;    \u0644\u0670\u06EF;     xn--ghb2g3q     #       لٰۯ\r
++B;    \u0644\u0670\u06EF;     ;       xn--ghb2g3q     #       لٰۯ\r
++B;    xn--ghb2g3qq34f;        \u0644\u0670\u200C\u06EF;       xn--ghb2g3qq34f #       لٰۯ\r
++T;    \u0644\u200C\u06ED\u06EF;       ;       xn--ghb25aga    #       لۭۯ\r
++N;    \u0644\u200C\u06ED\u06EF;       ;       xn--ghb25aga828w        #       لۭۯ\r
++B;    xn--ghb25aga;   \u0644\u06ED\u06EF;     xn--ghb25aga    #       لۭۯ\r
++B;    \u0644\u06ED\u06EF;     ;       xn--ghb25aga    #       لۭۯ\r
++B;    xn--ghb25aga828w;       \u0644\u200C\u06ED\u06EF;       xn--ghb25aga828w        #       لۭۯ\r
++T;    \u0644\u200C\u06EF;     ;       xn--ghb65a      #       لۯ\r
++N;    \u0644\u200C\u06EF;     ;       xn--ghb65a953d  #       لۯ\r
++B;    xn--ghb65a;     \u0644\u06EF;   xn--ghb65a      #       لۯ\r
++B;    \u0644\u06EF;   ;       xn--ghb65a      #       لۯ\r
++B;    xn--ghb65a953d; \u0644\u200C\u06EF;     xn--ghb65a953d  #       لۯ\r
++T;    \u0644\u0670\u200C\u06ED;       [B3 C1];        xn--ghb2gxq     #       لٰۭ\r
++N;    \u0644\u0670\u200C\u06ED;       [B3 C1];        [B3 C1] #       لٰۭ\r
++B;    xn--ghb2gxq;    \u0644\u0670\u06ED;     xn--ghb2gxq     #       لٰۭ\r
++B;    \u0644\u0670\u06ED;     ;       xn--ghb2gxq     #       لٰۭ\r
++B;    xn--ghb2gxqy34f;        [B3 C1];        [B3 C1] #       لٰۭ\r
++T;    \u06EF\u200C\u06EF;     [C1];   xn--cmba        #       ۯۯ\r
++N;    \u06EF\u200C\u06EF;     [C1];   [C1]    #       ۯۯ\r
++B;    xn--cmba;       \u06EF\u06EF;   xn--cmba        #       ۯۯ\r
++B;    \u06EF\u06EF;   ;       xn--cmba        #       ۯۯ\r
++B;    xn--cmba004q;   [C1];   [C1]    #       ۯۯ\r
++T;    \u0644\u200C;   [B3 C1];        xn--ghb #       ل\r
++N;    \u0644\u200C;   [B3 C1];        [B3 C1] #       ل\r
++B;    xn--ghb;        \u0644; xn--ghb #       ل\r
++B;    \u0644; ;       xn--ghb #       ل\r
++B;    xn--ghb413k;    [B3 C1];        [B3 C1] #       ل\r
++B;    a。。b;       [A4_2]; [A4_2]\r
++B;    A。。B;       [A4_2]; [A4_2]\r
++B;    a..b;   [A4_2]; [A4_2]\r
++T;    \u200D。。\u06B9\u200C;       [B1 B3 C1 C2 A4_2];     [A4_2]  #       ..ڹ\r
++N;    \u200D。。\u06B9\u200C;       [B1 B3 C1 C2 A4_2];     [B1 B3 C1 C2 A4_2]      #       ..ڹ\r
++B;    ..xn--skb;      [A4_2]; [A4_2]  #       ..ڹ\r
++B;    xn--1ug..xn--skb080k;   [B1 B3 C1 C2 A4_2];     [B1 B3 C1 C2 A4_2]      #       ..ڹ\r
++B;    \u05D00\u0660;  [B4];   [B4]    #       א0٠\r
++B;    xn--0-zhc74b;   [B4];   [B4]    #       א0٠\r
++B;    $;      [P1 V6];        [P1 V6]\r
++\r
++# RANDOMIZED TESTS\r
++\r
++B;    c.0ü.\u05D0;   [B1];   [B1]    #       c.0ü.א\r
++B;    c.0u\u0308.\u05D0;      [B1];   [B1]    #       c.0ü.א\r
++B;    C.0U\u0308.\u05D0;      [B1];   [B1]    #       c.0ü.א\r
++B;    C.0Ü.\u05D0;   [B1];   [B1]    #       c.0ü.א\r
++B;    ⒕∝\u065F򓤦.-󠄯;       [P1 V3 V6];     [P1 V3 V6]      #       ⒕∝ٟ.-\r
++B;    14.∝\u065F򓤦.-󠄯; [P1 V3 V6];     [P1 V3 V6]      #       14.∝ٟ.-\r
++B;    14.xn--7hb713l3v90n.-;  [V3 V6];        [V3 V6] #       14.∝ٟ.-\r
++B;    xn--7hb713lfwbi1311b.-; [V3 V6];        [V3 V6] #       ⒕∝ٟ.-\r
++B;    ꡣ.\u07CF;     ;       xn--8c9a.xn--qsb        #       ꡣ.ߏ\r
++B;    xn--8c9a.xn--qsb;       ꡣ.\u07CF;     xn--8c9a.xn--qsb        #       ꡣ.ߏ\r
++B;    ≯\u0603。-;  [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ≯.-\r
++B;    >\u0338\u0603。-;      [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ≯.-\r
++B;    ≯\u0603。-;  [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ≯.-\r
++B;    >\u0338\u0603。-;      [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ≯.-\r
++B;    xn--lfb566l.-;  [B1 V3 V6];     [B1 V3 V6]      #       ≯.-\r
++T;    ⾛𐹧⾕.\u115F󠗰ςႭ;     [B5 P1 V6];     [B5 P1 V6]      #       走𐹧谷.ςႭ\r
++N;    ⾛𐹧⾕.\u115F󠗰ςႭ;     [B5 P1 V6];     [B5 P1 V6]      #       走𐹧谷.ςႭ\r
++T;    走𐹧谷.\u115F󠗰ςႭ;     [B5 P1 V6];     [B5 P1 V6]      #       走𐹧谷.ςႭ\r
++N;    走𐹧谷.\u115F󠗰ςႭ;     [B5 P1 V6];     [B5 P1 V6]      #       走𐹧谷.ςႭ\r
++T;    走𐹧谷.\u115F󠗰ςⴍ;     [B5 P1 V6];     [B5 P1 V6]      #       走𐹧谷.ςⴍ\r
++N;    走𐹧谷.\u115F󠗰ςⴍ;     [B5 P1 V6];     [B5 P1 V6]      #       走𐹧谷.ςⴍ\r
++B;    走𐹧谷.\u115F󠗰ΣႭ;     [B5 P1 V6];     [B5 P1 V6]      #       走𐹧谷.σႭ\r
++B;    走𐹧谷.\u115F󠗰σⴍ;     [B5 P1 V6];     [B5 P1 V6]      #       走𐹧谷.σⴍ\r
++B;    走𐹧谷.\u115F󠗰Σⴍ;     [B5 P1 V6];     [B5 P1 V6]      #       走𐹧谷.σⴍ\r
++B;    xn--6g3a1x434z.xn--4xa180eotvh7453a;    [B5 V6];        [B5 V6] #       走𐹧谷.σⴍ\r
++B;    xn--6g3a1x434z.xn--4xa627dhpae6345i;    [B5 V6];        [B5 V6] #       走𐹧谷.σႭ\r
++B;    xn--6g3a1x434z.xn--3xa380eotvh7453a;    [B5 V6];        [B5 V6] #       走𐹧谷.ςⴍ\r
++B;    xn--6g3a1x434z.xn--3xa827dhpae6345i;    [B5 V6];        [B5 V6] #       走𐹧谷.ςႭ\r
++T;    ⾛𐹧⾕.\u115F󠗰ςⴍ;     [B5 P1 V6];     [B5 P1 V6]      #       走𐹧谷.ςⴍ\r
++N;    ⾛𐹧⾕.\u115F󠗰ςⴍ;     [B5 P1 V6];     [B5 P1 V6]      #       走𐹧谷.ςⴍ\r
++B;    ⾛𐹧⾕.\u115F󠗰ΣႭ;     [B5 P1 V6];     [B5 P1 V6]      #       走𐹧谷.σႭ\r
++B;    ⾛𐹧⾕.\u115F󠗰σⴍ;     [B5 P1 V6];     [B5 P1 V6]      #       走𐹧谷.σⴍ\r
++B;    ⾛𐹧⾕.\u115F󠗰Σⴍ;     [B5 P1 V6];     [B5 P1 V6]      #       走𐹧谷.σⴍ\r
++T;    \u200D≠ᢙ≯.솣-ᡴႠ;     [C2 P1 V6];     [P1 V6] #       ≠ᢙ≯.솣-ᡴႠ\r
++N;    \u200D≠ᢙ≯.솣-ᡴႠ;     [C2 P1 V6];     [C2 P1 V6]      #       ≠ᢙ≯.솣-ᡴႠ\r
++T;    \u200D=\u0338ᢙ>\u0338.솣-ᡴႠ;       [C2 P1 V6];     [P1 V6] #       ≠ᢙ≯.솣-ᡴႠ\r
++N;    \u200D=\u0338ᢙ>\u0338.솣-ᡴႠ;       [C2 P1 V6];     [C2 P1 V6]      #       ≠ᢙ≯.솣-ᡴႠ\r
++T;    \u200D=\u0338ᢙ>\u0338.솣-ᡴⴀ;       [C2 P1 V6];     [P1 V6] #       ≠ᢙ≯.솣-ᡴⴀ\r
++N;    \u200D=\u0338ᢙ>\u0338.솣-ᡴⴀ;       [C2 P1 V6];     [C2 P1 V6]      #       ≠ᢙ≯.솣-ᡴⴀ\r
++T;    \u200D≠ᢙ≯.솣-ᡴⴀ;     [C2 P1 V6];     [P1 V6] #       ≠ᢙ≯.솣-ᡴⴀ\r
++N;    \u200D≠ᢙ≯.솣-ᡴⴀ;     [C2 P1 V6];     [C2 P1 V6]      #       ≠ᢙ≯.솣-ᡴⴀ\r
++B;    xn--jbf911clb.xn----p9j493ivi4l;        [V6];   [V6]\r
++B;    xn--jbf929a90b0b.xn----p9j493ivi4l;     [C2 V6];        [C2 V6] #       ≠ᢙ≯.솣-ᡴⴀ\r
++B;    xn--jbf911clb.xn----6zg521d196p;        [V6];   [V6]\r
++B;    xn--jbf929a90b0b.xn----6zg521d196p;     [C2 V6];        [C2 V6] #       ≠ᢙ≯.솣-ᡴႠ\r
++B;    񯞜.𐿇\u0FA2\u077D\u0600;  [P1 V6];        [P1 V6] #       .ྡྷݽ\r
++B;    񯞜.𐿇\u0FA1\u0FB7\u077D\u0600;    [P1 V6];        [P1 V6] #       .ྡྷݽ\r
++B;    񯞜.𐿇\u0FA1\u0FB7\u077D\u0600;      [P1 V6];        [P1 V6] #       .ྡྷݽ\r
++B;    xn--gw68a.xn--ifb57ev2psc6027m; [V6];   [V6]    #       .ྡྷݽ\r
++B;    𣳔\u0303.𑓂;        [V5];   [V5]    #       𣳔̃.𑓂\r
++B;    xn--nsa95820a.xn--wz1d; [V5];   [V5]    #       𣳔̃.𑓂\r
++B;    𞤀𞥅񘐱。󠄌Ⴣꡥ;      [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    𞤢𞥅񘐱。󠄌ⴣꡥ;      [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    xn--9d6hgcy3556a.xn--rlju750b;  [B2 B3 V6];     [B2 B3 V6]\r
++B;    xn--9d6hgcy3556a.xn--7nd0578e;  [B2 B3 V6];     [B2 B3 V6]\r
++B;    𞤀𞥅񘐱。󠄌ⴣꡥ;      [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++T;    \u08E2𑁿ς𖬱。󠅡렧;     [B1 P1 V6];     [B1 P1 V6]      #       𑁿ς𖬱.렧\r
++N;    \u08E2𑁿ς𖬱。󠅡렧;     [B1 P1 V6];     [B1 P1 V6]      #       𑁿ς𖬱.렧\r
++T;    \u08E2𑁿ς𖬱。󠅡렧;       [B1 P1 V6];     [B1 P1 V6]      #       𑁿ς𖬱.렧\r
++N;    \u08E2𑁿ς𖬱。󠅡렧;       [B1 P1 V6];     [B1 P1 V6]      #       𑁿ς𖬱.렧\r
++B;    \u08E2𑁿Σ𖬱。󠅡렧;       [B1 P1 V6];     [B1 P1 V6]      #       𑁿σ𖬱.렧\r
++B;    \u08E2𑁿Σ𖬱。󠅡렧;     [B1 P1 V6];     [B1 P1 V6]      #       𑁿σ𖬱.렧\r
++B;    \u08E2𑁿σ𖬱。󠅡렧;     [B1 P1 V6];     [B1 P1 V6]      #       𑁿σ𖬱.렧\r
++B;    \u08E2𑁿σ𖬱。󠅡렧;       [B1 P1 V6];     [B1 P1 V6]      #       𑁿σ𖬱.렧\r
++B;    xn--4xa53xp48ys2xc.xn--kn2b;    [B1 V6];        [B1 V6] #       𑁿σ𖬱.렧\r
++B;    xn--3xa73xp48ys2xc.xn--kn2b;    [B1 V6];        [B1 V6] #       𑁿ς𖬱.렧\r
++T;    -\u200D。𞤍\u200C\u200D⒈;  [B1 C1 C2 P1 V3 V6];    [B1 P1 V3 V6]   #       -.𞤯⒈\r
++N;    -\u200D。𞤍\u200C\u200D⒈;  [B1 C1 C2 P1 V3 V6];    [B1 C1 C2 P1 V3 V6]     #       -.𞤯⒈\r
++T;    -\u200D。𞤍\u200C\u200D1.;   [B1 C1 C2 V3];  [B1 V3] #       -.𞤯1.\r
++N;    -\u200D。𞤍\u200C\u200D1.;   [B1 C1 C2 V3];  [B1 C1 C2 V3]   #       -.𞤯1.\r
++T;    -\u200D。𞤯\u200C\u200D1.;   [B1 C1 C2 V3];  [B1 V3] #       -.𞤯1.\r
++N;    -\u200D。𞤯\u200C\u200D1.;   [B1 C1 C2 V3];  [B1 C1 C2 V3]   #       -.𞤯1.\r
++B;    -.xn--1-0i8r.;  [B1 V3];        [B1 V3]\r
++B;    xn----ugn.xn--1-rgnd61297b.;    [B1 C1 C2 V3];  [B1 C1 C2 V3]   #       -.𞤯1.\r
++T;    -\u200D。𞤯\u200C\u200D⒈;  [B1 C1 C2 P1 V3 V6];    [B1 P1 V3 V6]   #       -.𞤯⒈\r
++N;    -\u200D。𞤯\u200C\u200D⒈;  [B1 C1 C2 P1 V3 V6];    [B1 C1 C2 P1 V3 V6]     #       -.𞤯⒈\r
++B;    -.xn--tsh3666n; [B1 V3 V6];     [B1 V3 V6]\r
++B;    xn----ugn.xn--0ugc555aiv51d;    [B1 C1 C2 V3 V6];       [B1 C1 C2 V3 V6]        #       -.𞤯⒈\r
++T;    \u200C򅎭.Ⴒ𑇀;     [C1 P1 V6];     [P1 V6] #       .Ⴒ𑇀\r
++N;    \u200C򅎭.Ⴒ𑇀;     [C1 P1 V6];     [C1 P1 V6]      #       .Ⴒ𑇀\r
++T;    \u200C򅎭.ⴒ𑇀;     [C1 P1 V6];     [P1 V6] #       .ⴒ𑇀\r
++N;    \u200C򅎭.ⴒ𑇀;     [C1 P1 V6];     [C1 P1 V6]      #       .ⴒ𑇀\r
++B;    xn--bn95b.xn--9kj2034e; [V6];   [V6]\r
++B;    xn--0ug15083f.xn--9kj2034e;     [C1 V6];        [C1 V6] #       .ⴒ𑇀\r
++B;    xn--bn95b.xn--qnd6272k; [V6];   [V6]\r
++B;    xn--0ug15083f.xn--qnd6272k;     [C1 V6];        [C1 V6] #       .Ⴒ𑇀\r
++T;    繱𑖿\u200D.8︒;   [P1 V6];        [P1 V6] #       繱𑖿.8︒\r
++N;    繱𑖿\u200D.8︒;   [P1 V6];        [P1 V6] #       繱𑖿.8︒\r
++T;    繱𑖿\u200D.8。;     繱𑖿\u200D.8.;       xn--gl0as212a.8.        #       繱𑖿.8.\r
++N;    繱𑖿\u200D.8。;     繱𑖿\u200D.8.;       xn--1ug6928ac48e.8.     #       繱𑖿.8.\r
++B;    xn--gl0as212a.8.;       繱𑖿.8.;     xn--gl0as212a.8.\r
++B;    繱𑖿.8.;     ;       xn--gl0as212a.8.\r
++B;    xn--1ug6928ac48e.8.;    繱𑖿\u200D.8.;       xn--1ug6928ac48e.8.     #       繱𑖿.8.\r
++T;    繱𑖿\u200D.8.;       ;       xn--gl0as212a.8.        #       繱𑖿.8.\r
++N;    繱𑖿\u200D.8.;       ;       xn--1ug6928ac48e.8.     #       繱𑖿.8.\r
++B;    xn--gl0as212a.xn--8-o89h;       [V6];   [V6]\r
++B;    xn--1ug6928ac48e.xn--8-o89h;    [V6];   [V6]    #       繱𑖿.8︒\r
++B;    󠆾.𞀈;    [V5 A4_2];      [V5 A4_2]\r
++B;    󠆾.𞀈;      [V5 A4_2];      [V5 A4_2]\r
++B;    .xn--ph4h;      [V5 A4_2];      [V5 A4_2]\r
++T;    ß\u06EB。\u200D;      [C2];   xn--ss-59d.     #       ß۫.\r
++N;    ß\u06EB。\u200D;      [C2];   [C2]    #       ß۫.\r
++T;    SS\u06EB。\u200D;      [C2];   xn--ss-59d.     #       ss۫.\r
++N;    SS\u06EB。\u200D;      [C2];   [C2]    #       ss۫.\r
++T;    ss\u06EB。\u200D;      [C2];   xn--ss-59d.     #       ss۫.\r
++N;    ss\u06EB。\u200D;      [C2];   [C2]    #       ss۫.\r
++T;    Ss\u06EB。\u200D;      [C2];   xn--ss-59d.     #       ss۫.\r
++N;    Ss\u06EB。\u200D;      [C2];   [C2]    #       ss۫.\r
++B;    xn--ss-59d.;    ss\u06EB.;      xn--ss-59d.     #       ss۫.\r
++B;    ss\u06EB.;      ;       xn--ss-59d.     #       ss۫.\r
++B;    SS\u06EB.;      ss\u06EB.;      xn--ss-59d.     #       ss۫.\r
++B;    Ss\u06EB.;      ss\u06EB.;      xn--ss-59d.     #       ss۫.\r
++B;    xn--ss-59d.xn--1ug;     [C2];   [C2]    #       ss۫.\r
++B;    xn--zca012a.xn--1ug;    [C2];   [C2]    #       ß۫.\r
++T;    󠐵\u200C⒈.󠎇;   [C1 P1 V6];     [P1 V6] #       ⒈.\r
++N;    󠐵\u200C⒈.󠎇;   [C1 P1 V6];     [C1 P1 V6]      #       ⒈.\r
++T;    󠐵\u200C1..󠎇;      [C1 P1 V6 A4_2];        [P1 V6 A4_2]    #       1..\r
++N;    󠐵\u200C1..󠎇;      [C1 P1 V6 A4_2];        [C1 P1 V6 A4_2] #       1..\r
++B;    xn--1-bs31m..xn--tv36e; [V6 A4_2];      [V6 A4_2]\r
++B;    xn--1-rgn37671n..xn--tv36e;     [C1 V6 A4_2];   [C1 V6 A4_2]    #       1..\r
++B;    xn--tshz2001k.xn--tv36e;        [V6];   [V6]\r
++B;    xn--0ug88o47900b.xn--tv36e;     [C1 V6];        [C1 V6] #       ⒈.\r
++T;    󟈣\u065F\uAAB2ß。󌓧;      [P1 V6];        [P1 V6] #       ٟꪲß.\r
++N;    󟈣\u065F\uAAB2ß。󌓧;      [P1 V6];        [P1 V6] #       ٟꪲß.\r
++B;    󟈣\u065F\uAAB2SS。󌓧;      [P1 V6];        [P1 V6] #       ٟꪲss.\r
++B;    󟈣\u065F\uAAB2ss。󌓧;      [P1 V6];        [P1 V6] #       ٟꪲss.\r
++B;    󟈣\u065F\uAAB2Ss。󌓧;      [P1 V6];        [P1 V6] #       ٟꪲss.\r
++B;    xn--ss-3xd2839nncy1m.xn--bb79d; [V6];   [V6]    #       ٟꪲss.\r
++B;    xn--zca92z0t7n5w96j.xn--bb79d;  [V6];   [V6]    #       ٟꪲß.\r
++T;    \u0774\u200C𞤿。𽘐䉜\u200D񿤼;   [C1 C2 P1 V6];  [P1 V6] #       ݴ𞤿.䉜\r
++N;    \u0774\u200C𞤿。𽘐䉜\u200D񿤼;   [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       ݴ𞤿.䉜\r
++T;    \u0774\u200C𞤝。𽘐䉜\u200D񿤼;   [C1 C2 P1 V6];  [P1 V6] #       ݴ𞤿.䉜\r
++N;    \u0774\u200C𞤝。𽘐䉜\u200D񿤼;   [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       ݴ𞤿.䉜\r
++B;    xn--4pb2977v.xn--z0nt555ukbnv;  [V6];   [V6]    #       ݴ𞤿.䉜\r
++B;    xn--4pb607jjt73a.xn--1ug236ke314donv1a; [C1 C2 V6];     [C1 C2 V6]      #       ݴ𞤿.䉜\r
++T;    򔭜ςᡱ⒈.≮𑄳\u200D𐮍; [B1 P1 V6];     [B1 P1 V6]      #       ςᡱ⒈.≮𑄳𐮍\r
++N;    򔭜ςᡱ⒈.≮𑄳\u200D𐮍; [B1 P1 V6];     [B1 P1 V6]      #       ςᡱ⒈.≮𑄳𐮍\r
++T;    򔭜ςᡱ⒈.<\u0338𑄳\u200D𐮍;     [B1 P1 V6];     [B1 P1 V6]      #       ςᡱ⒈.≮𑄳𐮍\r
++N;    򔭜ςᡱ⒈.<\u0338𑄳\u200D𐮍;     [B1 P1 V6];     [B1 P1 V6]      #       ςᡱ⒈.≮𑄳𐮍\r
++T;    򔭜ςᡱ1..≮𑄳\u200D𐮍;  [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       ςᡱ1..≮𑄳𐮍\r
++N;    򔭜ςᡱ1..≮𑄳\u200D𐮍;  [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       ςᡱ1..≮𑄳𐮍\r
++T;    򔭜ςᡱ1..<\u0338𑄳\u200D𐮍;      [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       ςᡱ1..≮𑄳𐮍\r
++N;    򔭜ςᡱ1..<\u0338𑄳\u200D𐮍;      [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       ςᡱ1..≮𑄳𐮍\r
++T;    򔭜Σᡱ1..<\u0338𑄳\u200D𐮍;      [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       σᡱ1..≮𑄳𐮍\r
++N;    򔭜Σᡱ1..<\u0338𑄳\u200D𐮍;      [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       σᡱ1..≮𑄳𐮍\r
++T;    򔭜Σᡱ1..≮𑄳\u200D𐮍;  [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       σᡱ1..≮𑄳𐮍\r
++N;    򔭜Σᡱ1..≮𑄳\u200D𐮍;  [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       σᡱ1..≮𑄳𐮍\r
++T;    򔭜σᡱ1..≮𑄳\u200D𐮍;  [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       σᡱ1..≮𑄳𐮍\r
++N;    򔭜σᡱ1..≮𑄳\u200D𐮍;  [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       σᡱ1..≮𑄳𐮍\r
++T;    򔭜σᡱ1..<\u0338𑄳\u200D𐮍;      [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       σᡱ1..≮𑄳𐮍\r
++N;    򔭜σᡱ1..<\u0338𑄳\u200D𐮍;      [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       σᡱ1..≮𑄳𐮍\r
++B;    xn--1-zmb699meq63t..xn--gdh5392g6sd;    [B1 V6 A4_2];   [B1 V6 A4_2]\r
++B;    xn--1-zmb699meq63t..xn--1ug85gn777ahze; [B1 V6 A4_2];   [B1 V6 A4_2]    #       σᡱ1..≮𑄳𐮍\r
++B;    xn--1-xmb999meq63t..xn--1ug85gn777ahze; [B1 V6 A4_2];   [B1 V6 A4_2]    #       ςᡱ1..≮𑄳𐮍\r
++T;    򔭜Σᡱ⒈.<\u0338𑄳\u200D𐮍;     [B1 P1 V6];     [B1 P1 V6]      #       σᡱ⒈.≮𑄳𐮍\r
++N;    򔭜Σᡱ⒈.<\u0338𑄳\u200D𐮍;     [B1 P1 V6];     [B1 P1 V6]      #       σᡱ⒈.≮𑄳𐮍\r
++T;    򔭜Σᡱ⒈.≮𑄳\u200D𐮍; [B1 P1 V6];     [B1 P1 V6]      #       σᡱ⒈.≮𑄳𐮍\r
++N;    򔭜Σᡱ⒈.≮𑄳\u200D𐮍; [B1 P1 V6];     [B1 P1 V6]      #       σᡱ⒈.≮𑄳𐮍\r
++T;    򔭜σᡱ⒈.≮𑄳\u200D𐮍; [B1 P1 V6];     [B1 P1 V6]      #       σᡱ⒈.≮𑄳𐮍\r
++N;    򔭜σᡱ⒈.≮𑄳\u200D𐮍; [B1 P1 V6];     [B1 P1 V6]      #       σᡱ⒈.≮𑄳𐮍\r
++T;    򔭜σᡱ⒈.<\u0338𑄳\u200D𐮍;     [B1 P1 V6];     [B1 P1 V6]      #       σᡱ⒈.≮𑄳𐮍\r
++N;    򔭜σᡱ⒈.<\u0338𑄳\u200D𐮍;     [B1 P1 V6];     [B1 P1 V6]      #       σᡱ⒈.≮𑄳𐮍\r
++B;    xn--4xa207hkzinr77u.xn--gdh5392g6sd;    [B1 V6];        [B1 V6]\r
++B;    xn--4xa207hkzinr77u.xn--1ug85gn777ahze; [B1 V6];        [B1 V6] #       σᡱ⒈.≮𑄳𐮍\r
++B;    xn--3xa407hkzinr77u.xn--1ug85gn777ahze; [B1 V6];        [B1 V6] #       ςᡱ⒈.≮𑄳𐮍\r
++B;    \u3164\u094DႠ\u17D0.\u180B;   [P1 V6];        [P1 V6] #       ्Ⴀ័.\r
++B;    \u1160\u094DႠ\u17D0.\u180B;   [P1 V6];        [P1 V6] #       ्Ⴀ័.\r
++B;    \u1160\u094Dⴀ\u17D0.\u180B;   [P1 V6];        [P1 V6] #       ्ⴀ័.\r
++B;    xn--n3b742bkqf4ty.;     [V6];   [V6]    #       ्ⴀ័.\r
++B;    xn--n3b468aoqa89r.;     [V6];   [V6]    #       ्Ⴀ័.\r
++B;    \u3164\u094Dⴀ\u17D0.\u180B;   [P1 V6];        [P1 V6] #       ्ⴀ័.\r
++B;    xn--n3b445e53po6d.;     [V6];   [V6]    #       ्ⴀ័.\r
++B;    xn--n3b468azngju2a.;    [V6];   [V6]    #       ्Ⴀ័.\r
++T;    ❣\u200D.\u09CD𑰽\u0612\uA929;     [C2 V5];        [V5]    #       ❣.্𑰽ؒꤩ\r
++N;    ❣\u200D.\u09CD𑰽\u0612\uA929;     [C2 V5];        [C2 V5] #       ❣.্𑰽ؒꤩ\r
++T;    ❣\u200D.\u09CD𑰽\u0612\uA929;       [C2 V5];        [V5]    #       ❣.্𑰽ؒꤩ\r
++N;    ❣\u200D.\u09CD𑰽\u0612\uA929;       [C2 V5];        [C2 V5] #       ❣.্𑰽ؒꤩ\r
++B;    xn--pei.xn--0fb32q3w7q2g4d;     [V5];   [V5]    #       ❣.্𑰽ؒꤩ\r
++B;    xn--1ugy10a.xn--0fb32q3w7q2g4d; [C2 V5];        [C2 V5] #       ❣.্𑰽ؒꤩ\r
++B;    ≮𐳺𐹄.≯񪮸ꡅ; [B1 P1 V6];     [B1 P1 V6]\r
++B;    <\u0338𐳺𐹄.>\u0338񪮸ꡅ; [B1 P1 V6];     [B1 P1 V6]\r
++B;    xn--gdh7943gk2a.xn--hdh1383c5e36c;      [B1 V6];        [B1 V6]\r
++B;    \u0CCC𐧅𐳏󠲺。\u0CCDᠦ; [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ೌ𐧅𐳏.್ᠦ\r
++B;    \u0CCC𐧅𐳏󠲺。\u0CCDᠦ; [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ೌ𐧅𐳏.್ᠦ\r
++B;    \u0CCC𐧅𐲏󠲺。\u0CCDᠦ; [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ೌ𐧅𐳏.್ᠦ\r
++B;    xn--7tc6360ky5bn2732c.xn--8tc429c;      [B1 V5 V6];     [B1 V5 V6]      #       ೌ𐧅𐳏.್ᠦ\r
++B;    \u0CCC𐧅𐲏󠲺。\u0CCDᠦ; [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ೌ𐧅𐳏.್ᠦ\r
++B;    \u0349。𧡫;  [V5];   [V5]    #       ͉.𧡫\r
++B;    xn--nua.xn--bc6k;       [V5];   [V5]    #       ͉.𧡫\r
++B;    𑰿󠅦.\u1160;      [P1 V5 V6];     [P1 V5 V6]      #       𑰿.\r
++B;    𑰿󠅦.\u1160;        [P1 V5 V6];     [P1 V5 V6]      #       𑰿.\r
++B;    xn--ok3d.xn--psd;       [V5 V6];        [V5 V6] #       𑰿.\r
++T;    -𞤆\u200D。󸼄𞳒; [B1 B5 B6 C2 P1 V3 V6]; [B1 B5 B6 P1 V3 V6]     #       -𞤨.\r
++N;    -𞤆\u200D。󸼄𞳒; [B1 B5 B6 C2 P1 V3 V6]; [B1 B5 B6 C2 P1 V3 V6]  #       -𞤨.\r
++T;    -𞤨\u200D。󸼄𞳒; [B1 B5 B6 C2 P1 V3 V6]; [B1 B5 B6 P1 V3 V6]     #       -𞤨.\r
++N;    -𞤨\u200D。󸼄𞳒; [B1 B5 B6 C2 P1 V3 V6]; [B1 B5 B6 C2 P1 V3 V6]  #       -𞤨.\r
++B;    xn----ni8r.xn--846h96596c;      [B1 B5 B6 V3 V6];       [B1 B5 B6 V3 V6]\r
++B;    xn----ugnx367r.xn--846h96596c;  [B1 B5 B6 C2 V3 V6];    [B1 B5 B6 C2 V3 V6]     #       -𞤨.\r
++B;    ꡏ󠇶≯𳾽。\u1DFD⾇滸𐹰;      [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ꡏ≯.᷽舛滸𐹰\r
++B;    ꡏ󠇶>\u0338𳾽。\u1DFD⾇滸𐹰;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ꡏ≯.᷽舛滸𐹰\r
++B;    ꡏ󠇶≯𳾽。\u1DFD舛滸𐹰;      [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ꡏ≯.᷽舛滸𐹰\r
++B;    ꡏ󠇶>\u0338𳾽。\u1DFD舛滸𐹰;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ꡏ≯.᷽舛滸𐹰\r
++B;    xn--hdh7483cu6twwki8e.xn--yfg0765a58l0n6k;      [B1 V5 V6];     [B1 V5 V6]      #       ꡏ≯.᷽舛滸𐹰\r
++B;    蔏。𑰺;     [V5];   [V5]\r
++B;    蔏。𑰺;     [V5];   [V5]\r
++B;    xn--uy1a.xn--jk3d;      [V5];   [V5]\r
++B;    𝟿𐮋。󠄊;        [B1];   [B1]\r
++B;    9𐮋。󠄊;   [B1];   [B1]\r
++B;    xn--9-rv5i.;    [B1];   [B1]\r
++B;    󟇇-䟖F。\u07CB⒈\u0662;    [B4 P1 V6];     [B4 P1 V6]      #       -䟖f.ߋ⒈٢\r
++B;    󟇇-䟖F。\u07CB1.\u0662;     [B1 P1 V6];     [B1 P1 V6]      #       -䟖f.ߋ1.٢\r
++B;    󟇇-䟖f。\u07CB1.\u0662;     [B1 P1 V6];     [B1 P1 V6]      #       -䟖f.ߋ1.٢\r
++B;    xn---f-mz8b08788k.xn--1-ybd.xn--bib;    [B1 V6];        [B1 V6] #       -䟖f.ߋ1.٢\r
++B;    󟇇-䟖f。\u07CB⒈\u0662;    [B4 P1 V6];     [B4 P1 V6]      #       -䟖f.ߋ⒈٢\r
++B;    xn---f-mz8b08788k.xn--bib53ev44d;       [B4 V6];        [B4 V6] #       -䟖f.ߋ⒈٢\r
++T;    \u200C。𐹺;  [B1 C1];        [B1 A4_2]       #       .𐹺\r
++N;    \u200C。𐹺;  [B1 C1];        [B1 C1] #       .𐹺\r
++T;    \u200C。𐹺;  [B1 C1];        [B1 A4_2]       #       .𐹺\r
++N;    \u200C。𐹺;  [B1 C1];        [B1 C1] #       .𐹺\r
++B;    .xn--yo0d;      [B1 A4_2];      [B1 A4_2]\r
++B;    xn--0ug.xn--yo0d;       [B1 C1];        [B1 C1] #       .𐹺\r
++T;    𐡆.≯\u200C-𞥀;    [B1 C1 P1 V6];  [B1 P1 V6]      #       𐡆.≯-𞥀\r
++N;    𐡆.≯\u200C-𞥀;    [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐡆.≯-𞥀\r
++T;    𐡆.>\u0338\u200C-𞥀;        [B1 C1 P1 V6];  [B1 P1 V6]      #       𐡆.≯-𞥀\r
++N;    𐡆.>\u0338\u200C-𞥀;        [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐡆.≯-𞥀\r
++T;    𐡆.>\u0338\u200C-𞤞;        [B1 C1 P1 V6];  [B1 P1 V6]      #       𐡆.≯-𞥀\r
++N;    𐡆.>\u0338\u200C-𞤞;        [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐡆.≯-𞥀\r
++T;    𐡆.≯\u200C-𞤞;    [B1 C1 P1 V6];  [B1 P1 V6]      #       𐡆.≯-𞥀\r
++N;    𐡆.≯\u200C-𞤞;    [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐡆.≯-𞥀\r
++B;    xn--le9c.xn----ogo9956r;        [B1 V6];        [B1 V6]\r
++B;    xn--le9c.xn----rgn40iy359e;     [B1 C1 V6];     [B1 C1 V6]      #       𐡆.≯-𞥀\r
++B;    󠁀-。≠\uFCD7;      [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -.≠هج\r
++B;    󠁀-。=\u0338\uFCD7;  [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -.≠هج\r
++B;    󠁀-。≠\u0647\u062C;        [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -.≠هج\r
++B;    󠁀-。=\u0338\u0647\u062C;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -.≠هج\r
++B;    xn----f411m.xn--rgb7c611j;      [B1 V3 V6];     [B1 V3 V6]      #       -.≠هج\r
++T;    񻬹𑈵。\u200D𞨶;  [B1 C2 P1 V6];  [P1 V6] #       𑈵.\r
++N;    񻬹𑈵。\u200D𞨶;  [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       𑈵.\r
++B;    xn--8g1d12120a.xn--5l6h;        [V6];   [V6]\r
++B;    xn--8g1d12120a.xn--1ug6651p;    [B1 C2 V6];     [B1 C2 V6]      #       𑈵.\r
++B;    𑋧\uA9C02。㧉򒖄;  [P1 V5 V6];     [P1 V5 V6]      #       𑋧꧀2.㧉\r
++B;    𑋧\uA9C02。㧉򒖄;  [P1 V5 V6];     [P1 V5 V6]      #       𑋧꧀2.㧉\r
++B;    xn--2-5z4eu89y.xn--97l02706d;   [V5 V6];        [V5 V6] #       𑋧꧀2.㧉\r
++T;    \u200C𽬄𐹴𞩥。≯6;      [B1 C1 P1 V6];  [B1 B5 B6 P1 V6]        #       𐹴.≯6\r
++N;    \u200C𽬄𐹴𞩥。≯6;      [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹴.≯6\r
++T;    \u200C𽬄𐹴𞩥。>\u03386;  [B1 C1 P1 V6];  [B1 B5 B6 P1 V6]        #       𐹴.≯6\r
++N;    \u200C𽬄𐹴𞩥。>\u03386;  [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹴.≯6\r
++B;    xn--so0du768aim9m.xn--6-ogo;    [B1 B5 B6 V6];  [B1 B5 B6 V6]\r
++B;    xn--0ug7105gf5wfxepq.xn--6-ogo; [B1 C1 V6];     [B1 C1 V6]      #       𐹴.≯6\r
++T;    𑁿.𐹦𻞵-\u200D; [B1 B3 B6 C2 P1 V5 V6]; [B1 B3 B6 P1 V3 V5 V6]  #       𑁿.𐹦-\r
++N;    𑁿.𐹦𻞵-\u200D; [B1 B3 B6 C2 P1 V5 V6]; [B1 B3 B6 C2 P1 V5 V6]  #       𑁿.𐹦-\r
++T;    𑁿.𐹦𻞵-\u200D;   [B1 B3 B6 C2 P1 V5 V6]; [B1 B3 B6 P1 V3 V5 V6]  #       𑁿.𐹦-\r
++N;    𑁿.𐹦𻞵-\u200D;   [B1 B3 B6 C2 P1 V5 V6]; [B1 B3 B6 C2 P1 V5 V6]  #       𑁿.𐹦-\r
++B;    xn--q30d.xn----i26i1299n;       [B1 B3 B6 V3 V5 V6];    [B1 B3 B6 V3 V5 V6]\r
++B;    xn--q30d.xn----ugn1088hfsxv;    [B1 B3 B6 C2 V5 V6];    [B1 B3 B6 C2 V5 V6]     #       𑁿.𐹦-\r
++T;    ⤸ς𺱀。\uFFA0;     [P1 V6];        [P1 V6] #       ⤸ς.\r
++N;    ⤸ς𺱀。\uFFA0;     [P1 V6];        [P1 V6] #       ⤸ς.\r
++T;    ⤸ς𺱀。\u1160;     [P1 V6];        [P1 V6] #       ⤸ς.\r
++N;    ⤸ς𺱀。\u1160;     [P1 V6];        [P1 V6] #       ⤸ς.\r
++B;    ⤸Σ𺱀。\u1160;     [P1 V6];        [P1 V6] #       ⤸σ.\r
++B;    ⤸σ𺱀。\u1160;     [P1 V6];        [P1 V6] #       ⤸σ.\r
++B;    xn--4xa192qmp03d.xn--psd;       [V6];   [V6]    #       ⤸σ.\r
++B;    xn--3xa392qmp03d.xn--psd;       [V6];   [V6]    #       ⤸ς.\r
++B;    ⤸Σ𺱀。\uFFA0;     [P1 V6];        [P1 V6] #       ⤸σ.\r
++B;    ⤸σ𺱀。\uFFA0;     [P1 V6];        [P1 V6] #       ⤸σ.\r
++B;    xn--4xa192qmp03d.xn--cl7c;      [V6];   [V6]    #       ⤸σ.\r
++B;    xn--3xa392qmp03d.xn--cl7c;      [V6];   [V6]    #       ⤸ς.\r
++B;    \u0765\u1035𐫔\u06D5.𐦬𑋪Ⴃ;     [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ݥဵ𐫔ە.𐦬𑋪Ⴃ\r
++B;    \u0765\u1035𐫔\u06D5.𐦬𑋪ⴃ;     [B2 B3];        [B2 B3] #       ݥဵ𐫔ە.𐦬𑋪ⴃ\r
++B;    xn--llb10as9tqp5y.xn--ukj7371e21f;      [B2 B3];        [B2 B3] #       ݥဵ𐫔ە.𐦬𑋪ⴃ\r
++B;    xn--llb10as9tqp5y.xn--bnd9168j21f;      [B2 B3 V6];     [B2 B3 V6]      #       ݥဵ𐫔ە.𐦬𑋪Ⴃ\r
++B;    \u0661\u1B44-킼.\u1BAA\u0616\u066C≯; [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ١᭄-킼.᮪ؖ٬≯\r
++B;    \u0661\u1B44-킼.\u1BAA\u0616\u066C>\u0338;       [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ١᭄-킼.᮪ؖ٬≯\r
++B;    xn----9pc551nk39n.xn--4fb6o571degg;     [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       ١᭄-킼.᮪ؖ٬≯\r
++B;    -。\u06C2\u0604򅖡𑓂;       [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       -.ۂ𑓂\r
++B;    -。\u06C1\u0654\u0604򅖡𑓂; [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       -.ۂ𑓂\r
++B;    -.xn--mfb39a7208dzgs3d; [B1 B2 B3 V3 V6];       [B1 B2 B3 V3 V6]        #       -.ۂ𑓂\r
++T;    \u200D󯑖󠁐.\u05BD𙮰ꡝ𐋡;     [C2 P1 V5 V6];  [P1 V5 V6]      #       .ֽꡝ𐋡\r
++N;    \u200D󯑖󠁐.\u05BD𙮰ꡝ𐋡;     [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       .ֽꡝ𐋡\r
++T;    \u200D󯑖󠁐.\u05BD𙮰ꡝ𐋡;       [C2 P1 V5 V6];  [P1 V5 V6]      #       .ֽꡝ𐋡\r
++N;    \u200D󯑖󠁐.\u05BD𙮰ꡝ𐋡;       [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       .ֽꡝ𐋡\r
++B;    xn--b726ey18m.xn--ldb8734fg0qcyzzg;     [V5 V6];        [V5 V6] #       .ֽꡝ𐋡\r
++B;    xn--1ug66101lt8me.xn--ldb8734fg0qcyzzg; [C2 V5 V6];     [C2 V5 V6]      #       .ֽꡝ𐋡\r
++T;    ︒􃈵ς񀠇。𐮈;   [B1 P1 V6];     [B1 P1 V6]\r
++N;    ︒􃈵ς񀠇。𐮈;   [B1 P1 V6];     [B1 P1 V6]\r
++T;    。􃈵ς񀠇。𐮈;   [P1 V6 A4_2];   [P1 V6 A4_2]\r
++N;    。􃈵ς񀠇。𐮈;   [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    。􃈵Σ񀠇。𐮈;   [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    。􃈵σ񀠇。𐮈;   [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    .xn--4xa68573c7n64d.xn--f29c;   [V6 A4_2];      [V6 A4_2]\r
++B;    .xn--3xa88573c7n64d.xn--f29c;   [V6 A4_2];      [V6 A4_2]\r
++B;    ︒􃈵Σ񀠇。𐮈;   [B1 P1 V6];     [B1 P1 V6]\r
++B;    ︒􃈵σ񀠇。𐮈;   [B1 P1 V6];     [B1 P1 V6]\r
++B;    xn--4xa1729jwz5t7gl5f.xn--f29c; [B1 V6];        [B1 V6]\r
++B;    xn--3xa3729jwz5t7gl5f.xn--f29c; [B1 V6];        [B1 V6]\r
++B;    \u07D9.\u06EE󆾃≯󠅲;     [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ߙ.ۮ≯\r
++B;    \u07D9.\u06EE󆾃>\u0338󠅲; [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ߙ.ۮ≯\r
++B;    \u07D9.\u06EE󆾃≯󠅲;       [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ߙ.ۮ≯\r
++B;    \u07D9.\u06EE󆾃>\u0338󠅲;   [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ߙ.ۮ≯\r
++B;    xn--0sb.xn--bmb691l0524t;       [B2 B3 V6];     [B2 B3 V6]      #       ߙ.ۮ≯\r
++B;    \u1A73󚙸.𐭍;        [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ᩳ.𐭍\r
++B;    xn--2of22352n.xn--q09c; [B1 V5 V6];     [B1 V5 V6]      #       ᩳ.𐭍\r
++B;    ⒉󠊓≠。Ⴟ⬣Ⴈ; [P1 V6];        [P1 V6]\r
++B;    ⒉󠊓=\u0338。Ⴟ⬣Ⴈ;     [P1 V6];        [P1 V6]\r
++B;    2.󠊓≠。Ⴟ⬣Ⴈ;  [P1 V6];        [P1 V6]\r
++B;    2.󠊓=\u0338。Ⴟ⬣Ⴈ;      [P1 V6];        [P1 V6]\r
++B;    2.󠊓=\u0338。ⴟ⬣ⴈ;      [P1 V6];        [P1 V6]\r
++B;    2.󠊓≠。ⴟ⬣ⴈ;  [P1 V6];        [P1 V6]\r
++B;    2.xn--1chz4101l.xn--45iz7d6b;   [V6];   [V6]\r
++B;    2.xn--1chz4101l.xn--gnd9b297j;  [V6];   [V6]\r
++B;    ⒉󠊓=\u0338。ⴟ⬣ⴈ;     [P1 V6];        [P1 V6]\r
++B;    ⒉󠊓≠。ⴟ⬣ⴈ; [P1 V6];        [P1 V6]\r
++B;    xn--1ch07f91401d.xn--45iz7d6b;  [V6];   [V6]\r
++B;    xn--1ch07f91401d.xn--gnd9b297j; [V6];   [V6]\r
++B;    -󠉱\u0FB8Ⴥ。-𐹽\u0774𞣑;       [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ྸჅ.-𐹽ݴ𞣑\r
++B;    -󠉱\u0FB8ⴥ。-𐹽\u0774𞣑;       [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ྸⴥ.-𐹽ݴ𞣑\r
++B;    xn----xmg317tgv352a.xn----05c4213ryr0g; [B1 V3 V6];     [B1 V3 V6]      #       -ྸⴥ.-𐹽ݴ𞣑\r
++B;    xn----xmg12fm2555h.xn----05c4213ryr0g;  [B1 V3 V6];     [B1 V3 V6]      #       -ྸჅ.-𐹽ݴ𞣑\r
++B;    \u0659。𑄴︒\u0627\u07DD;   [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       ٙ.𑄴︒اߝ\r
++B;    \u0659。𑄴。\u0627\u07DD;   [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ٙ.𑄴.اߝ\r
++B;    xn--1hb.xn--w80d.xn--mgb09f;    [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ٙ.𑄴.اߝ\r
++B;    xn--1hb.xn--mgb09fp820c08pa;    [B1 B3 B6 V5 V6];       [B1 B3 B6 V5 V6]        #       ٙ.𑄴︒اߝ\r
++T;    Ⴙ\u0638.󠆓\u200D;   [B1 B5 B6 C2 P1 V6];    [B5 B6 P1 V6]   #       Ⴙظ.\r
++N;    Ⴙ\u0638.󠆓\u200D;   [B1 B5 B6 C2 P1 V6];    [B1 B5 B6 C2 P1 V6]     #       Ⴙظ.\r
++T;    ⴙ\u0638.󠆓\u200D;   [B1 B5 B6 C2];  [B5 B6] #       ⴙظ.\r
++N;    ⴙ\u0638.󠆓\u200D;   [B1 B5 B6 C2];  [B1 B5 B6 C2]   #       ⴙظ.\r
++B;    xn--3gb910r.;   [B5 B6];        [B5 B6] #       ⴙظ.\r
++B;    xn--3gb910r.xn--1ug;    [B1 B5 B6 C2];  [B1 B5 B6 C2]   #       ⴙظ.\r
++B;    xn--3gb194c.;   [B5 B6 V6];     [B5 B6 V6]      #       Ⴙظ.\r
++B;    xn--3gb194c.xn--1ug;    [B1 B5 B6 C2 V6];       [B1 B5 B6 C2 V6]        #       Ⴙظ.\r
++B;    󠆸。₆0𐺧\u0756;        [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       .60ݖ\r
++B;    󠆸。60𐺧\u0756;    [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       .60ݖ\r
++B;    .xn--60-cke9470y;       [B1 V6 A4_2];   [B1 V6 A4_2]    #       .60ݖ\r
++B;    6\u084F。-𑈴;        [B1 V3];        [B1 V3] #       6ࡏ.-𑈴\r
++B;    6\u084F。-𑈴;        [B1 V3];        [B1 V3] #       6ࡏ.-𑈴\r
++B;    xn--6-jjd.xn----6n8i;   [B1 V3];        [B1 V3] #       6ࡏ.-𑈴\r
++T;    \u200D񋌿𐹰。\u0ACDς𞰎\u08D6;    [B1 C2 P1 V5 V6];       [B1 B5 B6 P1 V5 V6]     #       𐹰.્ςࣖ\r
++N;    \u200D񋌿𐹰。\u0ACDς𞰎\u08D6;    [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       𐹰.્ςࣖ\r
++T;    \u200D񋌿𐹰。\u0ACDς𞰎\u08D6;    [B1 C2 P1 V5 V6];       [B1 B5 B6 P1 V5 V6]     #       𐹰.્ςࣖ\r
++N;    \u200D񋌿𐹰。\u0ACDς𞰎\u08D6;    [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       𐹰.્ςࣖ\r
++T;    \u200D񋌿𐹰。\u0ACDΣ𞰎\u08D6;    [B1 C2 P1 V5 V6];       [B1 B5 B6 P1 V5 V6]     #       𐹰.્σࣖ\r
++N;    \u200D񋌿𐹰。\u0ACDΣ𞰎\u08D6;    [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       𐹰.્σࣖ\r
++T;    \u200D񋌿𐹰。\u0ACDσ𞰎\u08D6;    [B1 C2 P1 V5 V6];       [B1 B5 B6 P1 V5 V6]     #       𐹰.્σࣖ\r
++N;    \u200D񋌿𐹰。\u0ACDσ𞰎\u08D6;    [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       𐹰.્σࣖ\r
++B;    xn--oo0d1330n.xn--4xa21xcwbfz15g;       [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       𐹰.્σࣖ\r
++B;    xn--1ugx105gq26y.xn--4xa21xcwbfz15g;    [B1 C2 V5 V6];  [B1 C2 V5 V6]   #       𐹰.્σࣖ\r
++B;    xn--1ugx105gq26y.xn--3xa41xcwbfz15g;    [B1 C2 V5 V6];  [B1 C2 V5 V6]   #       𐹰.્ςࣖ\r
++T;    \u200D񋌿𐹰。\u0ACDΣ𞰎\u08D6;    [B1 C2 P1 V5 V6];       [B1 B5 B6 P1 V5 V6]     #       𐹰.્σࣖ\r
++N;    \u200D񋌿𐹰。\u0ACDΣ𞰎\u08D6;    [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       𐹰.્σࣖ\r
++T;    \u200D񋌿𐹰。\u0ACDσ𞰎\u08D6;    [B1 C2 P1 V5 V6];       [B1 B5 B6 P1 V5 V6]     #       𐹰.્σࣖ\r
++N;    \u200D񋌿𐹰。\u0ACDσ𞰎\u08D6;    [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       𐹰.્σࣖ\r
++B;    ⒈񟄜Ⴓ⒪.\u0DCA򘘶\u088B𐹢;   [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ⒈Ⴓ⒪.්𐹢\r
++B;    1.񟄜Ⴓ(o).\u0DCA򘘶\u088B𐹢;      [B1 B6 P1 V5 V6];       [B1 B6 P1 V5 V6]        #       1.Ⴓ(o).්𐹢\r
++B;    1.񟄜ⴓ(o).\u0DCA򘘶\u088B𐹢;      [B1 B6 P1 V5 V6];       [B1 B6 P1 V5 V6]        #       1.ⴓ(o).්𐹢\r
++B;    1.񟄜Ⴓ(O).\u0DCA򘘶\u088B𐹢;      [B1 B6 P1 V5 V6];       [B1 B6 P1 V5 V6]        #       1.Ⴓ(o).්𐹢\r
++B;    1.xn--(o)-7sn88849j.xn--3xb99xpx1yoes3e;        [B1 B6 P1 V5 V6];       [B1 B6 P1 V5 V6]        #       1.Ⴓ(o).්𐹢\r
++B;    1.xn--(o)-ej1bu5389e.xn--3xb99xpx1yoes3e;       [B1 B6 P1 V5 V6];       [B1 B6 P1 V5 V6]        #       1.ⴓ(o).්𐹢\r
++B;    ⒈񟄜ⴓ⒪.\u0DCA򘘶\u088B𐹢;   [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ⒈ⴓ⒪.්𐹢\r
++B;    xn--tsh0ds63atl31n.xn--3xb99xpx1yoes3e; [B1 V5 V6];     [B1 V5 V6]      #       ⒈ⴓ⒪.්𐹢\r
++B;    xn--rnd762h7cx3027d.xn--3xb99xpx1yoes3e;        [B1 V5 V6];     [B1 V5 V6]      #       ⒈Ⴓ⒪.්𐹢\r
++B;    𞤷.𐮐𞢁𐹠\u0624;        ;       xn--ve6h.xn--jgb1694kz0b2176a;  NV8     #       𞤷.𐮐𞢁𐹠ؤ\r
++B;    𞤷.𐮐𞢁𐹠\u0648\u0654;  𞤷.𐮐𞢁𐹠\u0624;        xn--ve6h.xn--jgb1694kz0b2176a;  NV8     #       𞤷.𐮐𞢁𐹠ؤ\r
++B;    𞤕.𐮐𞢁𐹠\u0648\u0654;  𞤷.𐮐𞢁𐹠\u0624;        xn--ve6h.xn--jgb1694kz0b2176a;  NV8     #       𞤷.𐮐𞢁𐹠ؤ\r
++B;    𞤕.𐮐𞢁𐹠\u0624;        𞤷.𐮐𞢁𐹠\u0624;        xn--ve6h.xn--jgb1694kz0b2176a;  NV8     #       𞤷.𐮐𞢁𐹠ؤ\r
++B;    xn--ve6h.xn--jgb1694kz0b2176a;  𞤷.𐮐𞢁𐹠\u0624;        xn--ve6h.xn--jgb1694kz0b2176a;  NV8     #       𞤷.𐮐𞢁𐹠ؤ\r
++B;    𐲈-。𑄳񢌻;       [B1 B3 P1 V3 V5 V6];    [B1 B3 P1 V3 V5 V6]\r
++B;    𐲈-。𑄳񢌻;       [B1 B3 P1 V3 V5 V6];    [B1 B3 P1 V3 V5 V6]\r
++B;    𐳈-。𑄳񢌻;       [B1 B3 P1 V3 V5 V6];    [B1 B3 P1 V3 V5 V6]\r
++B;    xn----ue6i.xn--v80d6662t;       [B1 B3 V3 V5 V6];       [B1 B3 V3 V5 V6]\r
++B;    𐳈-。𑄳񢌻;       [B1 B3 P1 V3 V5 V6];    [B1 B3 P1 V3 V5 V6]\r
++B;    -󠉖ꡧ.󠊂񇆃🄉;        [P1 V3 V6];     [P1 V3 V6]\r
++B;    -󠉖ꡧ.󠊂񇆃8,;    [P1 V3 V6];     [P1 V3 V6]\r
++B;    xn----hg4ei0361g.xn--8,-k362evu488a;    [P1 V3 V6];     [P1 V3 V6]\r
++B;    xn----hg4ei0361g.xn--207ht163h7m94c;    [V3 V6];        [V3 V6]\r
++B;    󠾛󠈴臯𧔤.\u0768𝟝;     [B1 P1 V6];     [B1 P1 V6]      #       臯𧔤.ݨ5\r
++B;    󠾛󠈴臯𧔤.\u07685;        [B1 P1 V6];     [B1 P1 V6]      #       臯𧔤.ݨ5\r
++B;    xn--zb1at733hm579ddhla.xn--5-b5c;       [B1 V6];        [B1 V6] #       臯𧔤.ݨ5\r
++B;    ≮𐹣.𝨿; [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]\r
++B;    <\u0338𐹣.𝨿;     [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]\r
++B;    ≮𐹣.𝨿;   [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]\r
++B;    <\u0338𐹣.𝨿;       [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]\r
++B;    xn--gdh1504g.xn--e92h;  [B1 B3 B6 V5 V6];       [B1 B3 B6 V5 V6]\r
++B;    𐹯ᯛ\u0A4D。脥;    [B1];   [B1]    #       𐹯ᯛ੍.脥\r
++B;    𐹯ᯛ\u0A4D。脥;    [B1];   [B1]    #       𐹯ᯛ੍.脥\r
++B;    xn--ybc101g3m1p.xn--740a;       [B1];   [B1]    #       𐹯ᯛ੍.脥\r
++B;    \u1B44\u115F𞷿򃀍.-; [B1 B5 P1 V3 V5 V6];    [B1 B5 P1 V3 V5 V6]     #       ᭄.-\r
++B;    xn--osd971cpx70btgt8b.-;        [B1 B5 V3 V5 V6];       [B1 B5 V3 V5 V6]        #       ᭄.-\r
++T;    \u200C。\u0354;        [C1 V5];        [V5 A4_2]       #       .͔\r
++N;    \u200C。\u0354;        [C1 V5];        [C1 V5] #       .͔\r
++T;    \u200C。\u0354;        [C1 V5];        [V5 A4_2]       #       .͔\r
++N;    \u200C。\u0354;        [C1 V5];        [C1 V5] #       .͔\r
++B;    .xn--yua;       [V5 A4_2];      [V5 A4_2]       #       .͔\r
++B;    xn--0ug.xn--yua;        [C1 V5];        [C1 V5] #       .͔\r
++B;    𞤥󠅮.ᡄႮ;      [P1 V6];        [P1 V6]\r
++B;    𞤥󠅮.ᡄႮ;        [P1 V6];        [P1 V6]\r
++B;    𞤥󠅮.ᡄⴎ;        𞤥.ᡄⴎ;    xn--de6h.xn--37e857h\r
++B;    𞤃󠅮.ᡄႮ;        [P1 V6];        [P1 V6]\r
++B;    𞤃󠅮.ᡄⴎ;        𞤥.ᡄⴎ;    xn--de6h.xn--37e857h\r
++B;    xn--de6h.xn--37e857h;   𞤥.ᡄⴎ;    xn--de6h.xn--37e857h\r
++B;    𞤥.ᡄⴎ;    ;       xn--de6h.xn--37e857h\r
++B;    𞤃.ᡄႮ;    [P1 V6];        [P1 V6]\r
++B;    𞤃.ᡄⴎ;    𞤥.ᡄⴎ;    xn--de6h.xn--37e857h\r
++B;    xn--de6h.xn--mnd799a;   [V6];   [V6]\r
++B;    𞤥󠅮.ᡄⴎ;      𞤥.ᡄⴎ;    xn--de6h.xn--37e857h\r
++B;    𞤃󠅮.ᡄႮ;      [P1 V6];        [P1 V6]\r
++B;    𞤃󠅮.ᡄⴎ;      𞤥.ᡄⴎ;    xn--de6h.xn--37e857h\r
++B;    𞤥.ᡄႮ;    [P1 V6];        [P1 V6]\r
++B;    𞤧𝨨Ξ.𪺏㛨❸;        [B2 B3 B6];     [B2 B3 B6]\r
++B;    𞤧𝨨Ξ.𪺏㛨❸;  [B2 B3 B6];     [B2 B3 B6]\r
++B;    𞤧𝨨ξ.𪺏㛨❸;  [B2 B3 B6];     [B2 B3 B6]\r
++B;    𞤅𝨨Ξ.𪺏㛨❸;  [B2 B3 B6];     [B2 B3 B6]\r
++B;    𞤅𝨨ξ.𪺏㛨❸;  [B2 B3 B6];     [B2 B3 B6]\r
++B;    xn--zxa5691vboja.xn--bfi293ci119b;      [B2 B3 B6];     [B2 B3 B6]\r
++B;    𞤧𝨨ξ.𪺏㛨❸;        [B2 B3 B6];     [B2 B3 B6]\r
++B;    𞤅𝨨Ξ.𪺏㛨❸;        [B2 B3 B6];     [B2 B3 B6]\r
++B;    𞤅𝨨ξ.𪺏㛨❸;        [B2 B3 B6];     [B2 B3 B6]\r
++T;    ᠆몆\u200C-。Ⴛ𐦅︒;     [B1 B5 B6 C1 P1 V3 V6]; [B1 B5 B6 P1 V3 V6]     #       ᠆몆-.Ⴛ𐦅︒\r
++N;    ᠆몆\u200C-。Ⴛ𐦅︒;     [B1 B5 B6 C1 P1 V3 V6]; [B1 B5 B6 C1 P1 V3 V6]  #       ᠆몆-.Ⴛ𐦅︒\r
++T;    ᠆몆\u200C-。Ⴛ𐦅︒;       [B1 B5 B6 C1 P1 V3 V6]; [B1 B5 B6 P1 V3 V6]     #       ᠆몆-.Ⴛ𐦅︒\r
++N;    ᠆몆\u200C-。Ⴛ𐦅︒;       [B1 B5 B6 C1 P1 V3 V6]; [B1 B5 B6 C1 P1 V3 V6]  #       ᠆몆-.Ⴛ𐦅︒\r
++T;    ᠆몆\u200C-。Ⴛ𐦅。;     [B1 B5 B6 C1 P1 V3 V6]; [B1 B5 B6 P1 V3 V6]     #       ᠆몆-.Ⴛ𐦅.\r
++N;    ᠆몆\u200C-。Ⴛ𐦅。;     [B1 B5 B6 C1 P1 V3 V6]; [B1 B5 B6 C1 P1 V3 V6]  #       ᠆몆-.Ⴛ𐦅.\r
++T;    ᠆몆\u200C-。Ⴛ𐦅。;       [B1 B5 B6 C1 P1 V3 V6]; [B1 B5 B6 P1 V3 V6]     #       ᠆몆-.Ⴛ𐦅.\r
++N;    ᠆몆\u200C-。Ⴛ𐦅。;       [B1 B5 B6 C1 P1 V3 V6]; [B1 B5 B6 C1 P1 V3 V6]  #       ᠆몆-.Ⴛ𐦅.\r
++T;    ᠆몆\u200C-。ⴛ𐦅。;       [B1 B5 B6 C1 P1 V3 V6]; [B1 B5 B6 P1 V3 V6]     #       ᠆몆-.ⴛ𐦅.\r
++N;    ᠆몆\u200C-。ⴛ𐦅。;       [B1 B5 B6 C1 P1 V3 V6]; [B1 B5 B6 C1 P1 V3 V6]  #       ᠆몆-.ⴛ𐦅.\r
++T;    ᠆몆\u200C-。ⴛ𐦅。;     [B1 B5 B6 C1 P1 V3 V6]; [B1 B5 B6 P1 V3 V6]     #       ᠆몆-.ⴛ𐦅.\r
++N;    ᠆몆\u200C-。ⴛ𐦅。;     [B1 B5 B6 C1 P1 V3 V6]; [B1 B5 B6 C1 P1 V3 V6]  #       ᠆몆-.ⴛ𐦅.\r
++B;    xn----e3j6620g.xn--jlju661e.;   [B1 B5 B6 V3 V6];       [B1 B5 B6 V3 V6]\r
++B;    xn----e3j425bsk1o.xn--jlju661e.;        [B1 B5 B6 C1 V3 V6];    [B1 B5 B6 C1 V3 V6]     #       ᠆몆-.ⴛ𐦅.\r
++B;    xn----e3j6620g.xn--znd4948j.;   [B1 B5 B6 V3 V6];       [B1 B5 B6 V3 V6]\r
++B;    xn----e3j425bsk1o.xn--znd4948j.;        [B1 B5 B6 C1 V3 V6];    [B1 B5 B6 C1 V3 V6]     #       ᠆몆-.Ⴛ𐦅.\r
++T;    ᠆몆\u200C-。ⴛ𐦅︒;       [B1 B5 B6 C1 P1 V3 V6]; [B1 B5 B6 P1 V3 V6]     #       ᠆몆-.ⴛ𐦅︒\r
++N;    ᠆몆\u200C-。ⴛ𐦅︒;       [B1 B5 B6 C1 P1 V3 V6]; [B1 B5 B6 C1 P1 V3 V6]  #       ᠆몆-.ⴛ𐦅︒\r
++T;    ᠆몆\u200C-。ⴛ𐦅︒;     [B1 B5 B6 C1 P1 V3 V6]; [B1 B5 B6 P1 V3 V6]     #       ᠆몆-.ⴛ𐦅︒\r
++N;    ᠆몆\u200C-。ⴛ𐦅︒;     [B1 B5 B6 C1 P1 V3 V6]; [B1 B5 B6 C1 P1 V3 V6]  #       ᠆몆-.ⴛ𐦅︒\r
++B;    xn----e3j6620g.xn--jlj4997dhgh; [B1 B5 B6 V3 V6];       [B1 B5 B6 V3 V6]\r
++B;    xn----e3j425bsk1o.xn--jlj4997dhgh;      [B1 B5 B6 C1 V3 V6];    [B1 B5 B6 C1 V3 V6]     #       ᠆몆-.ⴛ𐦅︒\r
++B;    xn----e3j6620g.xn--znd2362jhgh; [B1 B5 B6 V3 V6];       [B1 B5 B6 V3 V6]\r
++B;    xn----e3j425bsk1o.xn--znd2362jhgh;      [B1 B5 B6 C1 V3 V6];    [B1 B5 B6 C1 V3 V6]     #       ᠆몆-.Ⴛ𐦅︒\r
++T;    󠾳.︒⥱\u200C𐹬;  [B1 C1 P1 V6];  [B1 P1 V6]      #       .︒⥱𐹬\r
++N;    󠾳.︒⥱\u200C𐹬;  [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       .︒⥱𐹬\r
++T;    󠾳.。⥱\u200C𐹬;  [B1 C1 P1 V6 A4_2];     [B1 P1 V6 A4_2] #       ..⥱𐹬\r
++N;    󠾳.。⥱\u200C𐹬;  [B1 C1 P1 V6 A4_2];     [B1 C1 P1 V6 A4_2]      #       ..⥱𐹬\r
++B;    xn--uf66e..xn--qti2829e;        [B1 V6 A4_2];   [B1 V6 A4_2]\r
++B;    xn--uf66e..xn--0ugz28as66q;     [B1 C1 V6 A4_2];        [B1 C1 V6 A4_2] #       ..⥱𐹬\r
++B;    xn--uf66e.xn--qtiz073e3ik;      [B1 V6];        [B1 V6]\r
++B;    xn--uf66e.xn--0ugz28axl3pqxna;  [B1 C1 V6];     [B1 C1 V6]      #       .︒⥱𐹬\r
++B;    𐯖.𐹠Ⴑ񚇜𐫊;   [B1 P1 V6];     [B1 P1 V6]\r
++B;    𐯖.𐹠ⴑ񚇜𐫊;   [B1 P1 V6];     [B1 P1 V6]\r
++B;    xn--n49c.xn--8kj8702ewicl862o;  [B1 V6];        [B1 V6]\r
++B;    xn--n49c.xn--pnd4619jwicl862o;  [B1 V6];        [B1 V6]\r
++B;    \u0FA4񱤯.𝟭Ⴛ;   [P1 V5 V6];     [P1 V5 V6]      #       ྤ.1Ⴛ\r
++B;    \u0FA4񱤯.1Ⴛ;        [P1 V5 V6];     [P1 V5 V6]      #       ྤ.1Ⴛ\r
++B;    \u0FA4񱤯.1ⴛ;        [P1 V5 V6];     [P1 V5 V6]      #       ྤ.1ⴛ\r
++B;    xn--0fd40533g.xn--1-tws;        [V5 V6];        [V5 V6] #       ྤ.1ⴛ\r
++B;    xn--0fd40533g.xn--1-q1g;        [V5 V6];        [V5 V6] #       ྤ.1Ⴛ\r
++B;    \u0FA4񱤯.𝟭ⴛ;   [P1 V5 V6];     [P1 V5 V6]      #       ྤ.1ⴛ\r
++B;    -\u0826齀。릿𐸋;   [B1 B5 B6 P1 V3 V6];    [B1 B5 B6 P1 V3 V6]     #       -ࠦ齀.릿\r
++B;    -\u0826齀。릿𐸋;     [B1 B5 B6 P1 V3 V6];    [B1 B5 B6 P1 V3 V6]     #       -ࠦ齀.릿\r
++B;    xn----6gd0617i.xn--7y2bm55m;    [B1 B5 B6 V3 V6];       [B1 B5 B6 V3 V6]        #       -ࠦ齀.릿\r
++T;    󠔊\u071C鹝꾗。񾵐\u200D\u200D⏃; [B1 B6 C2 P1 V6];       [B1 B6 P1 V6]   #       ܜ鹝꾗.⏃\r
++N;    󠔊\u071C鹝꾗。񾵐\u200D\u200D⏃; [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       ܜ鹝꾗.⏃\r
++T;    󠔊\u071C鹝꾗。񾵐\u200D\u200D⏃;   [B1 B6 C2 P1 V6];       [B1 B6 P1 V6]   #       ܜ鹝꾗.⏃\r
++N;    󠔊\u071C鹝꾗。񾵐\u200D\u200D⏃;   [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       ܜ鹝꾗.⏃\r
++B;    xn--mnb6558e91kyq533a.xn--6mh27269e;    [B1 B6 V6];     [B1 B6 V6]      #       ܜ鹝꾗.⏃\r
++B;    xn--mnb6558e91kyq533a.xn--1uga46zs309y; [B1 B6 C2 V6];  [B1 B6 C2 V6]   #       ܜ鹝꾗.⏃\r
++B;    ≮.-\u0708--;        [B1 P1 V2 V3 V6];       [B1 P1 V2 V3 V6]        #       ≮.-܈--\r
++B;    <\u0338.-\u0708--;    [B1 P1 V2 V3 V6];       [B1 P1 V2 V3 V6]        #       ≮.-܈--\r
++B;    ≮.-\u0708--;  [B1 P1 V2 V3 V6];       [B1 P1 V2 V3 V6]        #       ≮.-܈--\r
++B;    <\u0338.-\u0708--;      [B1 P1 V2 V3 V6];       [B1 P1 V2 V3 V6]        #       ≮.-܈--\r
++B;    xn--gdh.xn------eqf;    [B1 V2 V3 V6];  [B1 V2 V3 V6]   #       ≮.-܈--\r
++T;    𐹸󠋳。\u200Dς𝟩;        [B1 C2 P1 V6];  [B1 P1 V6]      #       𐹸.ς7\r
++N;    𐹸󠋳。\u200Dς𝟩;        [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       𐹸.ς7\r
++T;    𐹸󠋳。\u200Dς7;   [B1 C2 P1 V6];  [B1 P1 V6]      #       𐹸.ς7\r
++N;    𐹸󠋳。\u200Dς7;   [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       𐹸.ς7\r
++T;    𐹸󠋳。\u200DΣ7;   [B1 C2 P1 V6];  [B1 P1 V6]      #       𐹸.σ7\r
++N;    𐹸󠋳。\u200DΣ7;   [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       𐹸.σ7\r
++T;    𐹸󠋳。\u200Dσ7;   [B1 C2 P1 V6];  [B1 P1 V6]      #       𐹸.σ7\r
++N;    𐹸󠋳。\u200Dσ7;   [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       𐹸.σ7\r
++B;    xn--wo0di5177c.xn--7-zmb;       [B1 V6];        [B1 V6]\r
++B;    xn--wo0di5177c.xn--7-zmb938s;   [B1 C2 V6];     [B1 C2 V6]      #       𐹸.σ7\r
++B;    xn--wo0di5177c.xn--7-xmb248s;   [B1 C2 V6];     [B1 C2 V6]      #       𐹸.ς7\r
++T;    𐹸󠋳。\u200DΣ𝟩;        [B1 C2 P1 V6];  [B1 P1 V6]      #       𐹸.σ7\r
++N;    𐹸󠋳。\u200DΣ𝟩;        [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       𐹸.σ7\r
++T;    𐹸󠋳。\u200Dσ𝟩;        [B1 C2 P1 V6];  [B1 P1 V6]      #       𐹸.σ7\r
++N;    𐹸󠋳。\u200Dσ𝟩;        [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       𐹸.σ7\r
++T;    ς򅜌8.𞭤; [P1 V6];        [P1 V6]\r
++N;    ς򅜌8.𞭤; [P1 V6];        [P1 V6]\r
++T;    ς򅜌8.𞭤;   [P1 V6];        [P1 V6]\r
++N;    ς򅜌8.𞭤;   [P1 V6];        [P1 V6]\r
++B;    Σ򅜌8.𞭤;   [P1 V6];        [P1 V6]\r
++B;    σ򅜌8.𞭤;   [P1 V6];        [P1 V6]\r
++B;    xn--8-zmb14974n.xn--su6h;       [V6];   [V6]\r
++B;    xn--8-xmb44974n.xn--su6h;       [V6];   [V6]\r
++B;    Σ򅜌8.𞭤; [P1 V6];        [P1 V6]\r
++B;    σ򅜌8.𞭤; [P1 V6];        [P1 V6]\r
++T;    \u200Cᡑ🄀\u0684.-𐫄𑲤;        [B1 C1 P1 V3 V6];       [B1 B5 B6 P1 V3 V6]     #       ᡑ🄀ڄ.-𐫄𑲤\r
++N;    \u200Cᡑ🄀\u0684.-𐫄𑲤;        [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       ᡑ🄀ڄ.-𐫄𑲤\r
++T;    \u200Cᡑ0.\u0684.-𐫄𑲤;    [B1 C1 V3];     [B1 V3] #       ᡑ0.ڄ.-𐫄𑲤\r
++N;    \u200Cᡑ0.\u0684.-𐫄𑲤;    [B1 C1 V3];     [B1 C1 V3]      #       ᡑ0.ڄ.-𐫄𑲤\r
++B;    xn--0-o7j.xn--9ib.xn----ek5i065b;       [B1 V3];        [B1 V3] #       ᡑ0.ڄ.-𐫄𑲤\r
++B;    xn--0-o7j263b.xn--9ib.xn----ek5i065b;   [B1 C1 V3];     [B1 C1 V3]      #       ᡑ0.ڄ.-𐫄𑲤\r
++B;    xn--9ib722gbw95a.xn----ek5i065b;        [B1 B5 B6 V3 V6];       [B1 B5 B6 V3 V6]        #       ᡑ🄀ڄ.-𐫄𑲤\r
++B;    xn--9ib722gvtfi563c.xn----ek5i065b;     [B1 C1 V3 V6];  [B1 C1 V3 V6]   #       ᡑ🄀ڄ.-𐫄𑲤\r
++B;    𖠍。𐪿넯򞵲;     [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    𖠍。𐪿넯򞵲;       [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    xn--4e9e.xn--l60bj21opd57g;     [B2 B3 V6];     [B2 B3 V6]\r
++B;    ᠇Ⴘ。\u0603Ⴈ𝆊; [B1 P1 V6];     [B1 P1 V6]      #       ᠇Ⴘ.Ⴈ𝆊\r
++B;    ᠇ⴘ。\u0603ⴈ𝆊; [B1 P1 V6];     [B1 P1 V6]      #       ᠇ⴘ.ⴈ𝆊\r
++B;    xn--d6e009h.xn--lfb290rfu3z;    [B1 V6];        [B1 V6] #       ᠇ⴘ.ⴈ𝆊\r
++B;    xn--wnd558a.xn--lfb465c1v87a;   [B1 V6];        [B1 V6] #       ᠇Ⴘ.Ⴈ𝆊\r
++B;    ⒚󠋑𞤰。牣\u0667Ⴜᣥ;  [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       ⒚𞤰.牣٧Ⴜᣥ\r
++B;    19.󠋑𞤰。牣\u0667Ⴜᣥ;  [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       19.𞤰.牣٧Ⴜᣥ\r
++B;    19.󠋑𞤰。牣\u0667ⴜᣥ;  [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       19.𞤰.牣٧ⴜᣥ\r
++B;    19.󠋑𞤎。牣\u0667Ⴜᣥ;  [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       19.𞤰.牣٧Ⴜᣥ\r
++B;    19.xn--oe6h75760c.xn--gib404ccxgh00h;   [B1 B5 V6];     [B1 B5 V6]      #       19.𞤰.牣٧Ⴜᣥ\r
++B;    19.xn--oe6h75760c.xn--gib285gtxo2l9d;   [B1 B5 V6];     [B1 B5 V6]      #       19.𞤰.牣٧ⴜᣥ\r
++B;    ⒚󠋑𞤰。牣\u0667ⴜᣥ;  [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       ⒚𞤰.牣٧ⴜᣥ\r
++B;    ⒚󠋑𞤎。牣\u0667Ⴜᣥ;  [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       ⒚𞤰.牣٧Ⴜᣥ\r
++B;    xn--cthy466n29j3e.xn--gib404ccxgh00h;   [B1 B5 V6];     [B1 B5 V6]      #       ⒚𞤰.牣٧Ⴜᣥ\r
++B;    xn--cthy466n29j3e.xn--gib285gtxo2l9d;   [B1 B5 V6];     [B1 B5 V6]      #       ⒚𞤰.牣٧ⴜᣥ\r
++B;    -𐋱𐰽⒈.Ⴓ;       [B1 P1 V3 V6];  [B1 P1 V3 V6]\r
++B;    -𐋱𐰽1..Ⴓ;        [B1 P1 V3 V6 A4_2];     [B1 P1 V3 V6 A4_2]\r
++B;    -𐋱𐰽1..ⴓ;        [B1 V3 A4_2];   [B1 V3 A4_2]\r
++B;    xn---1-895nq11a..xn--blj;       [B1 V3 A4_2];   [B1 V3 A4_2]\r
++B;    xn---1-895nq11a..xn--rnd;       [B1 V3 V6 A4_2];        [B1 V3 V6 A4_2]\r
++B;    -𐋱𐰽⒈.ⴓ;       [B1 P1 V3 V6];  [B1 P1 V3 V6]\r
++B;    xn----ecp0206g90h.xn--blj;      [B1 V3 V6];     [B1 V3 V6]\r
++B;    xn----ecp0206g90h.xn--rnd;      [B1 V3 V6];     [B1 V3 V6]\r
++T;    \u200C긃.榶-; [C1 V3];        [V3]    #       긃.榶-\r
++N;    \u200C긃.榶-; [C1 V3];        [C1 V3] #       긃.榶-\r
++T;    \u200C긃.榶-;   [C1 V3];        [V3]    #       긃.榶-\r
++N;    \u200C긃.榶-;   [C1 V3];        [C1 V3] #       긃.榶-\r
++B;    xn--ej0b.xn----d87b;    [V3];   [V3]\r
++B;    xn--0ug3307c.xn----d87b;        [C1 V3];        [C1 V3] #       긃.榶-\r
++T;    뉓泓𜵽.\u09CD\u200D;        [P1 V5 V6];     [P1 V5 V6]      #       뉓泓.্\r
++N;    뉓泓𜵽.\u09CD\u200D;        [P1 V5 V6];     [P1 V5 V6]      #       뉓泓.্\r
++T;    뉓泓𜵽.\u09CD\u200D;  [P1 V5 V6];     [P1 V5 V6]      #       뉓泓.্\r
++N;    뉓泓𜵽.\u09CD\u200D;  [P1 V5 V6];     [P1 V5 V6]      #       뉓泓.্\r
++B;    xn--lwwp69lqs7m.xn--b7b;        [V5 V6];        [V5 V6] #       뉓泓.্\r
++B;    xn--lwwp69lqs7m.xn--b7b605i;    [V5 V6];        [V5 V6] #       뉓泓.্\r
++T;    \u200D𐹴ß。\u0EB4\u2B75񪅌;        [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       𐹴ß.ິ\r
++N;    \u200D𐹴ß。\u0EB4\u2B75񪅌;        [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       𐹴ß.ິ\r
++T;    \u200D𐹴ß。\u0EB4\u2B75񪅌;        [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       𐹴ß.ິ\r
++N;    \u200D𐹴ß。\u0EB4\u2B75񪅌;        [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       𐹴ß.ິ\r
++T;    \u200D𐹴SS。\u0EB4\u2B75񪅌;        [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       𐹴ss.ິ\r
++N;    \u200D𐹴SS。\u0EB4\u2B75񪅌;        [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       𐹴ss.ິ\r
++T;    \u200D𐹴ss。\u0EB4\u2B75񪅌;        [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       𐹴ss.ິ\r
++N;    \u200D𐹴ss。\u0EB4\u2B75񪅌;        [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       𐹴ss.ິ\r
++T;    \u200D𐹴Ss。\u0EB4\u2B75񪅌;        [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       𐹴ss.ິ\r
++N;    \u200D𐹴Ss。\u0EB4\u2B75񪅌;        [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       𐹴ss.ິ\r
++B;    xn--ss-ti3o.xn--57c638l8774i;   [B1 V5 V6];     [B1 V5 V6]      #       𐹴ss.ິ\r
++B;    xn--ss-l1t5169j.xn--57c638l8774i;       [B1 C2 V5 V6];  [B1 C2 V5 V6]   #       𐹴ss.ິ\r
++B;    xn--zca770nip7n.xn--57c638l8774i;       [B1 C2 V5 V6];  [B1 C2 V5 V6]   #       𐹴ß.ິ\r
++T;    \u200D𐹴SS。\u0EB4\u2B75񪅌;        [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       𐹴ss.ິ\r
++N;    \u200D𐹴SS。\u0EB4\u2B75񪅌;        [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       𐹴ss.ິ\r
++T;    \u200D𐹴ss。\u0EB4\u2B75񪅌;        [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       𐹴ss.ິ\r
++N;    \u200D𐹴ss。\u0EB4\u2B75񪅌;        [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       𐹴ss.ິ\r
++T;    \u200D𐹴Ss。\u0EB4\u2B75񪅌;        [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       𐹴ss.ິ\r
++N;    \u200D𐹴Ss。\u0EB4\u2B75񪅌;        [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       𐹴ss.ິ\r
++B;    \u1B44.\u1BAA-≮≠; [P1 V5 V6];     [P1 V5 V6]      #       ᭄.᮪-≮≠\r
++B;    \u1B44.\u1BAA-<\u0338=\u0338; [P1 V5 V6];     [P1 V5 V6]      #       ᭄.᮪-≮≠\r
++B;    \u1B44.\u1BAA-≮≠;   [P1 V5 V6];     [P1 V5 V6]      #       ᭄.᮪-≮≠\r
++B;    \u1B44.\u1BAA-<\u0338=\u0338;   [P1 V5 V6];     [P1 V5 V6]      #       ᭄.᮪-≮≠\r
++B;    xn--1uf.xn----nmlz65aub;        [V5 V6];        [V5 V6] #       ᭄.᮪-≮≠\r
++B;    \u1BF3Ⴑ\u115F.𑄴Ⅎ;      [P1 V5 V6];     [P1 V5 V6]      #       ᯳Ⴑ.𑄴Ⅎ\r
++B;    \u1BF3Ⴑ\u115F.𑄴Ⅎ;        [P1 V5 V6];     [P1 V5 V6]      #       ᯳Ⴑ.𑄴Ⅎ\r
++B;    \u1BF3ⴑ\u115F.𑄴ⅎ;        [P1 V5 V6];     [P1 V5 V6]      #       ᯳ⴑ.𑄴ⅎ\r
++B;    \u1BF3Ⴑ\u115F.𑄴ⅎ;        [P1 V5 V6];     [P1 V5 V6]      #       ᯳Ⴑ.𑄴ⅎ\r
++B;    xn--pnd26a55x.xn--73g3065g;     [V5 V6];        [V5 V6] #       ᯳Ⴑ.𑄴ⅎ\r
++B;    xn--osd925cvyn.xn--73g3065g;    [V5 V6];        [V5 V6] #       ᯳ⴑ.𑄴ⅎ\r
++B;    xn--pnd26a55x.xn--f3g7465g;     [V5 V6];        [V5 V6] #       ᯳Ⴑ.𑄴Ⅎ\r
++B;    \u1BF3ⴑ\u115F.𑄴ⅎ;      [P1 V5 V6];     [P1 V5 V6]      #       ᯳ⴑ.𑄴ⅎ\r
++B;    \u1BF3Ⴑ\u115F.𑄴ⅎ;      [P1 V5 V6];     [P1 V5 V6]      #       ᯳Ⴑ.𑄴ⅎ\r
++B;    𜉆。Ⴃ𐴣𐹹똯;  [B5 P1 V6];     [B5 P1 V6]\r
++B;    𜉆。Ⴃ𐴣𐹹똯;    [B5 P1 V6];     [B5 P1 V6]\r
++B;    𜉆。ⴃ𐴣𐹹똯;    [B5 P1 V6];     [B5 P1 V6]\r
++B;    𜉆。ⴃ𐴣𐹹똯;  [B5 P1 V6];     [B5 P1 V6]\r
++B;    xn--187g.xn--ukjy205b8rscdeb;   [B5 V6];        [B5 V6]\r
++B;    xn--187g.xn--bnd4785f8r8bdeb;   [B5 V6];        [B5 V6]\r
++B;    𐫀。⳻󠙾󠄷\u3164;       [B1 P1 V6];     [B1 P1 V6]      #       𐫀.⳻\r
++B;    𐫀。⳻󠙾󠄷\u1160;       [B1 P1 V6];     [B1 P1 V6]      #       𐫀.⳻\r
++B;    xn--pw9c.xn--psd742lxt32w;      [B1 V6];        [B1 V6] #       𐫀.⳻\r
++B;    xn--pw9c.xn--mkj83l4v899a;      [B1 V6];        [B1 V6] #       𐫀.⳻\r
++B;    \u079A⾇.\u071E-𐋰;        [B2 B3];        [B2 B3] #       ޚ舛.ܞ-𐋰\r
++B;    \u079A舛.\u071E-𐋰;  [B2 B3];        [B2 B3] #       ޚ舛.ܞ-𐋰\r
++B;    xn--7qb6383d.xn----20c3154q;    [B2 B3];        [B2 B3] #       ޚ舛.ܞ-𐋰\r
++B;    Ⴉ猕󹛫≮.︒;    [P1 V6];        [P1 V6]\r
++B;    Ⴉ猕󹛫<\u0338.︒;        [P1 V6];        [P1 V6]\r
++B;    Ⴉ猕󹛫≮.。;      [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    Ⴉ猕󹛫<\u0338.。;  [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    ⴉ猕󹛫<\u0338.。;  [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    ⴉ猕󹛫≮.。;      [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    xn--gdh892bbz0d5438s..; [V6 A4_2];      [V6 A4_2]\r
++B;    xn--hnd212gz32d54x5r..; [V6 A4_2];      [V6 A4_2]\r
++B;    ⴉ猕󹛫<\u0338.︒;        [P1 V6];        [P1 V6]\r
++B;    ⴉ猕󹛫≮.︒;    [P1 V6];        [P1 V6]\r
++B;    xn--gdh892bbz0d5438s.xn--y86c;  [V6];   [V6]\r
++B;    xn--hnd212gz32d54x5r.xn--y86c;  [V6];   [V6]\r
++B;    🏮。\u062B鳳\u07E2󠅉;     [B1 B2];        [B1 B2] #       🏮.ث鳳ߢ\r
++B;    🏮。\u062B鳳\u07E2󠅉;     [B1 B2];        [B1 B2] #       🏮.ث鳳ߢ\r
++B;    xn--8m8h.xn--qgb29f6z90a;       [B1 B2];        [B1 B2] #       🏮.ث鳳ߢ\r
++T;    \u200D𐹶。ß;        [B1 C2];        [B1]    #       𐹶.ß\r
++N;    \u200D𐹶。ß;        [B1 C2];        [B1 C2] #       𐹶.ß\r
++T;    \u200D𐹶。SS;        [B1 C2];        [B1]    #       𐹶.ss\r
++N;    \u200D𐹶。SS;        [B1 C2];        [B1 C2] #       𐹶.ss\r
++T;    \u200D𐹶。ss;        [B1 C2];        [B1]    #       𐹶.ss\r
++N;    \u200D𐹶。ss;        [B1 C2];        [B1 C2] #       𐹶.ss\r
++T;    \u200D𐹶。Ss;        [B1 C2];        [B1]    #       𐹶.ss\r
++N;    \u200D𐹶。Ss;        [B1 C2];        [B1 C2] #       𐹶.ss\r
++B;    xn--uo0d.ss;    [B1];   [B1]\r
++B;    xn--1ug9105g.ss;        [B1 C2];        [B1 C2] #       𐹶.ss\r
++B;    xn--1ug9105g.xn--zca;   [B1 C2];        [B1 C2] #       𐹶.ß\r
++T;    Å둄-.\u200C;        [C1 V3];        [V3]    #       å둄-.\r
++N;    Å둄-.\u200C;        [C1 V3];        [C1 V3] #       å둄-.\r
++T;    A\u030A둄-.\u200C;     [C1 V3];        [V3]    #       å둄-.\r
++N;    A\u030A둄-.\u200C;     [C1 V3];        [C1 V3] #       å둄-.\r
++T;    Å둄-.\u200C;  [C1 V3];        [V3]    #       å둄-.\r
++N;    Å둄-.\u200C;  [C1 V3];        [C1 V3] #       å둄-.\r
++T;    A\u030A둄-.\u200C;       [C1 V3];        [V3]    #       å둄-.\r
++N;    A\u030A둄-.\u200C;       [C1 V3];        [C1 V3] #       å둄-.\r
++T;    a\u030A둄-.\u200C;       [C1 V3];        [V3]    #       å둄-.\r
++N;    a\u030A둄-.\u200C;       [C1 V3];        [C1 V3] #       å둄-.\r
++T;    å둄-.\u200C;  [C1 V3];        [V3]    #       å둄-.\r
++N;    å둄-.\u200C;  [C1 V3];        [C1 V3] #       å둄-.\r
++B;    xn----1fa1788k.;        [V3];   [V3]\r
++B;    xn----1fa1788k.xn--0ug; [C1 V3];        [C1 V3] #       å둄-.\r
++T;    a\u030A둄-.\u200C;     [C1 V3];        [V3]    #       å둄-.\r
++N;    a\u030A둄-.\u200C;     [C1 V3];        [C1 V3] #       å둄-.\r
++T;    å둄-.\u200C;        [C1 V3];        [V3]    #       å둄-.\r
++N;    å둄-.\u200C;        [C1 V3];        [C1 V3] #       å둄-.\r
++B;    \u3099򬎑\u1DD7𞤀.򱲢-\u0953;       [B1 B6 P1 V5 V6];       [B1 B6 P1 V5 V6]        #       ゙ᷗ𞤢.-॓\r
++B;    \u3099򬎑\u1DD7𞤢.򱲢-\u0953;       [B1 B6 P1 V5 V6];       [B1 B6 P1 V5 V6]        #       ゙ᷗ𞤢.-॓\r
++B;    xn--veg121fwg63altj9d.xn----eyd92688s;  [B1 B6 V5 V6];  [B1 B6 V5 V6]   #       ゙ᷗ𞤢.-॓\r
++T;    ς.ß񴱄\u06DD\u2D7F;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ς.ß⵿\r
++N;    ς.ß񴱄\u06DD\u2D7F;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ς.ß⵿\r
++B;    Σ.SS񴱄\u06DD\u2D7F;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       σ.ss⵿\r
++B;    σ.ss񴱄\u06DD\u2D7F;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       σ.ss⵿\r
++B;    Σ.ss񴱄\u06DD\u2D7F;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       σ.ss⵿\r
++B;    xn--4xa.xn--ss-y8d4760biv60n;   [B5 B6 V6];     [B5 B6 V6]      #       σ.ss⵿\r
++T;    Σ.ß񴱄\u06DD\u2D7F;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       σ.ß⵿\r
++N;    Σ.ß񴱄\u06DD\u2D7F;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       σ.ß⵿\r
++T;    σ.ß񴱄\u06DD\u2D7F;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       σ.ß⵿\r
++N;    σ.ß񴱄\u06DD\u2D7F;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       σ.ß⵿\r
++B;    xn--4xa.xn--zca281az71b8x73m;   [B5 B6 V6];     [B5 B6 V6]      #       σ.ß⵿\r
++B;    xn--3xa.xn--zca281az71b8x73m;   [B5 B6 V6];     [B5 B6 V6]      #       ς.ß⵿\r
++B;    ꡀ𞀟。\u066B\u0599; [B1];   [B1]    #       ꡀ𞀟.٫֙\r
++B;    ꡀ𞀟。\u066B\u0599; [B1];   [B1]    #       ꡀ𞀟.٫֙\r
++B;    xn--8b9a1720d.xn--kcb33b;       [B1];   [B1]    #       ꡀ𞀟.٫֙\r
++T;    򈛉\u200C\u08A9。⧅񘘡-𐭡;        [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 P1 V6]        #       ࢩ.⧅-𐭡\r
++N;    򈛉\u200C\u08A9。⧅񘘡-𐭡;        [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       ࢩ.⧅-𐭡\r
++T;    򈛉\u200C\u08A9。⧅񘘡-𐭡;        [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 P1 V6]        #       ࢩ.⧅-𐭡\r
++N;    򈛉\u200C\u08A9。⧅񘘡-𐭡;        [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       ࢩ.⧅-𐭡\r
++B;    xn--yyb56242i.xn----zir1232guu71b;      [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       ࢩ.⧅-𐭡\r
++B;    xn--yyb780jll63m.xn----zir1232guu71b;   [B1 B5 B6 C1 V6];       [B1 B5 B6 C1 V6]        #       ࢩ.⧅-𐭡\r
++T;    룱\u200D𰍨\u200C。𝨖︒;  [C1 C2 P1 V5 V6];       [P1 V5 V6]      #       룱.𝨖︒\r
++N;    룱\u200D𰍨\u200C。𝨖︒;  [C1 C2 P1 V5 V6];       [C1 C2 P1 V5 V6]        #       룱.𝨖︒\r
++T;    룱\u200D𰍨\u200C。𝨖︒;    [C1 C2 P1 V5 V6];       [P1 V5 V6]      #       룱.𝨖︒\r
++N;    룱\u200D𰍨\u200C。𝨖︒;    [C1 C2 P1 V5 V6];       [C1 C2 P1 V5 V6]        #       룱.𝨖︒\r
++T;    룱\u200D𰍨\u200C。𝨖。;  [C1 C2 P1 V5 V6];       [P1 V5 V6]      #       룱.𝨖.\r
++N;    룱\u200D𰍨\u200C。𝨖。;  [C1 C2 P1 V5 V6];       [C1 C2 P1 V5 V6]        #       룱.𝨖.\r
++T;    룱\u200D𰍨\u200C。𝨖。;    [C1 C2 P1 V5 V6];       [P1 V5 V6]      #       룱.𝨖.\r
++N;    룱\u200D𰍨\u200C。𝨖。;    [C1 C2 P1 V5 V6];       [C1 C2 P1 V5 V6]        #       룱.𝨖.\r
++B;    xn--ct2b0738h.xn--772h.;        [V5 V6];        [V5 V6]\r
++B;    xn--0ugb3358ili2v.xn--772h.;    [C1 C2 V5 V6];  [C1 C2 V5 V6]   #       룱.𝨖.\r
++B;    xn--ct2b0738h.xn--y86cl899a;    [V5 V6];        [V5 V6]\r
++B;    xn--0ugb3358ili2v.xn--y86cl899a;        [C1 C2 V5 V6];  [C1 C2 V5 V6]   #       룱.𝨖︒\r
++T;    🄄.\u1CDC⒈ß;     [P1 V5 V6];     [P1 V5 V6]      #       🄄.᳜⒈ß\r
++N;    🄄.\u1CDC⒈ß;     [P1 V5 V6];     [P1 V5 V6]      #       🄄.᳜⒈ß\r
++T;    3,.\u1CDC1.ß;  [P1 V5 V6];     [P1 V5 V6]      #       3,.᳜1.ß\r
++N;    3,.\u1CDC1.ß;  [P1 V5 V6];     [P1 V5 V6]      #       3,.᳜1.ß\r
++B;    3,.\u1CDC1.SS;  [P1 V5 V6];     [P1 V5 V6]      #       3,.᳜1.ss\r
++B;    3,.\u1CDC1.ss;  [P1 V5 V6];     [P1 V5 V6]      #       3,.᳜1.ss\r
++B;    3,.\u1CDC1.Ss;  [P1 V5 V6];     [P1 V5 V6]      #       3,.᳜1.ss\r
++B;    3,.xn--1-43l.ss;        [P1 V5 V6];     [P1 V5 V6]      #       3,.᳜1.ss\r
++B;    3,.xn--1-43l.xn--zca;   [P1 V5 V6];     [P1 V5 V6]      #       3,.᳜1.ß\r
++B;    🄄.\u1CDC⒈SS;     [P1 V5 V6];     [P1 V5 V6]      #       🄄.᳜⒈ss\r
++B;    🄄.\u1CDC⒈ss;     [P1 V5 V6];     [P1 V5 V6]      #       🄄.᳜⒈ss\r
++B;    🄄.\u1CDC⒈Ss;     [P1 V5 V6];     [P1 V5 V6]      #       🄄.᳜⒈ss\r
++B;    xn--x07h.xn--ss-k1r094b;        [V5 V6];        [V5 V6] #       🄄.᳜⒈ss\r
++B;    xn--x07h.xn--zca344lmif;        [V5 V6];        [V5 V6] #       🄄.᳜⒈ß\r
++B;    񇌍\u2D7F。𞼓򡄨𑐺;      [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ⵿.𑐺\r
++B;    񇌍\u2D7F。𞼓򡄨𑐺;      [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ⵿.𑐺\r
++B;    xn--eoj16016a.xn--0v1d3848a3lr0d;       [B2 B3 V6];     [B2 B3 V6]      #       ⵿.𑐺\r
++T;    \u1DFD\u103A\u094D.≠\u200D㇛;      [C2 P1 V5 V6];  [P1 V5 V6]      #       ်्᷽.≠㇛\r
++N;    \u1DFD\u103A\u094D.≠\u200D㇛;      [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ်्᷽.≠㇛\r
++T;    \u103A\u094D\u1DFD.≠\u200D㇛;      [C2 P1 V5 V6];  [P1 V5 V6]      #       ်्᷽.≠㇛\r
++N;    \u103A\u094D\u1DFD.≠\u200D㇛;      [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ်्᷽.≠㇛\r
++T;    \u103A\u094D\u1DFD.=\u0338\u200D㇛;  [C2 P1 V5 V6];  [P1 V5 V6]      #       ်्᷽.≠㇛\r
++N;    \u103A\u094D\u1DFD.=\u0338\u200D㇛;  [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ်्᷽.≠㇛\r
++T;    \u103A\u094D\u1DFD.≠\u200D㇛;        [C2 P1 V5 V6];  [P1 V5 V6]      #       ်्᷽.≠㇛\r
++N;    \u103A\u094D\u1DFD.≠\u200D㇛;        [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ်्᷽.≠㇛\r
++T;    \u103A\u094D\u1DFD.=\u0338\u200D㇛;    [C2 P1 V5 V6];  [P1 V5 V6]      #       ်्᷽.≠㇛\r
++N;    \u103A\u094D\u1DFD.=\u0338\u200D㇛;    [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ်्᷽.≠㇛\r
++B;    xn--n3b956a9zm.xn--1ch912d;     [V5 V6];        [V5 V6] #       ်्᷽.≠㇛\r
++B;    xn--n3b956a9zm.xn--1ug63gz5w;   [C2 V5 V6];     [C2 V5 V6]      #       ်्᷽.≠㇛\r
++T;    Ⴁ𐋨娤.\u200D\u033C\u0662𑖿;      [B1 C2 P1 V6];  [B1 P1 V5 V6]   #       Ⴁ𐋨娤.̼٢𑖿\r
++N;    Ⴁ𐋨娤.\u200D\u033C\u0662𑖿;      [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       Ⴁ𐋨娤.̼٢𑖿\r
++T;    ⴁ𐋨娤.\u200D\u033C\u0662𑖿;      [B1 C2];        [B1 V5] #       ⴁ𐋨娤.̼٢𑖿\r
++N;    ⴁ𐋨娤.\u200D\u033C\u0662𑖿;      [B1 C2];        [B1 C2] #       ⴁ𐋨娤.̼٢𑖿\r
++B;    xn--skjw75lg29h.xn--9ta62nrv36a;        [B1 V5];        [B1 V5] #       ⴁ𐋨娤.̼٢𑖿\r
++B;    xn--skjw75lg29h.xn--9ta62ngt6aou8t;     [B1 C2];        [B1 C2] #       ⴁ𐋨娤.̼٢𑖿\r
++B;    xn--8md2578ag21g.xn--9ta62nrv36a;       [B1 V5 V6];     [B1 V5 V6]      #       Ⴁ𐋨娤.̼٢𑖿\r
++B;    xn--8md2578ag21g.xn--9ta62ngt6aou8t;    [B1 C2 V6];     [B1 C2 V6]      #       Ⴁ𐋨娤.̼٢𑖿\r
++T;    🄀Ⴄ\u0669\u0820。⒈\u0FB6ß;      [B1 P1 V6];     [B1 P1 V6]      #       🄀Ⴄ٩ࠠ.⒈ྶß\r
++N;    🄀Ⴄ\u0669\u0820。⒈\u0FB6ß;      [B1 P1 V6];     [B1 P1 V6]      #       🄀Ⴄ٩ࠠ.⒈ྶß\r
++T;    0.Ⴄ\u0669\u0820。1.\u0FB6ß; [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       0.Ⴄ٩ࠠ.1.ྶß\r
++N;    0.Ⴄ\u0669\u0820。1.\u0FB6ß; [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       0.Ⴄ٩ࠠ.1.ྶß\r
++T;    0.ⴄ\u0669\u0820。1.\u0FB6ß; [B1 B5 B6 V5];  [B1 B5 B6 V5]   #       0.ⴄ٩ࠠ.1.ྶß\r
++N;    0.ⴄ\u0669\u0820。1.\u0FB6ß; [B1 B5 B6 V5];  [B1 B5 B6 V5]   #       0.ⴄ٩ࠠ.1.ྶß\r
++B;    0.Ⴄ\u0669\u0820。1.\u0FB6SS; [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       0.Ⴄ٩ࠠ.1.ྶss\r
++B;    0.ⴄ\u0669\u0820。1.\u0FB6ss; [B1 B5 B6 V5];  [B1 B5 B6 V5]   #       0.ⴄ٩ࠠ.1.ྶss\r
++B;    0.Ⴄ\u0669\u0820。1.\u0FB6Ss; [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       0.Ⴄ٩ࠠ.1.ྶss\r
++B;    0.xn--iib29f26o.1.xn--ss-1sj;   [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       0.Ⴄ٩ࠠ.1.ྶss\r
++B;    0.xn--iib29fp25e.1.xn--ss-1sj;  [B1 B5 B6 V5];  [B1 B5 B6 V5]   #       0.ⴄ٩ࠠ.1.ྶss\r
++B;    0.xn--iib29fp25e.1.xn--zca117e; [B1 B5 B6 V5];  [B1 B5 B6 V5]   #       0.ⴄ٩ࠠ.1.ྶß\r
++B;    0.xn--iib29f26o.1.xn--zca117e;  [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       0.Ⴄ٩ࠠ.1.ྶß\r
++T;    🄀ⴄ\u0669\u0820。⒈\u0FB6ß;      [B1 P1 V6];     [B1 P1 V6]      #       🄀ⴄ٩ࠠ.⒈ྶß\r
++N;    🄀ⴄ\u0669\u0820。⒈\u0FB6ß;      [B1 P1 V6];     [B1 P1 V6]      #       🄀ⴄ٩ࠠ.⒈ྶß\r
++B;    🄀Ⴄ\u0669\u0820。⒈\u0FB6SS;      [B1 P1 V6];     [B1 P1 V6]      #       🄀Ⴄ٩ࠠ.⒈ྶss\r
++B;    🄀ⴄ\u0669\u0820。⒈\u0FB6ss;      [B1 P1 V6];     [B1 P1 V6]      #       🄀ⴄ٩ࠠ.⒈ྶss\r
++B;    🄀Ⴄ\u0669\u0820。⒈\u0FB6Ss;      [B1 P1 V6];     [B1 P1 V6]      #       🄀Ⴄ٩ࠠ.⒈ྶss\r
++B;    xn--iib29f26o6n43c.xn--ss-1sj588o;      [B1 V6];        [B1 V6] #       🄀Ⴄ٩ࠠ.⒈ྶss\r
++B;    xn--iib29fp25e0219a.xn--ss-1sj588o;     [B1 V6];        [B1 V6] #       🄀ⴄ٩ࠠ.⒈ྶss\r
++B;    xn--iib29fp25e0219a.xn--zca117e3vp;     [B1 V6];        [B1 V6] #       🄀ⴄ٩ࠠ.⒈ྶß\r
++B;    xn--iib29f26o6n43c.xn--zca117e3vp;      [B1 V6];        [B1 V6] #       🄀Ⴄ٩ࠠ.⒈ྶß\r
++T;    ≠.\u200C-\u066B;      [B1 C1 P1 V6];  [B1 P1 V3 V6]   #       ≠.-٫\r
++N;    ≠.\u200C-\u066B;      [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ≠.-٫\r
++T;    =\u0338.\u200C-\u066B;  [B1 C1 P1 V6];  [B1 P1 V3 V6]   #       ≠.-٫\r
++N;    =\u0338.\u200C-\u066B;  [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ≠.-٫\r
++B;    xn--1ch.xn----vqc;      [B1 V3 V6];     [B1 V3 V6]      #       ≠.-٫\r
++B;    xn--1ch.xn----vqc597q;  [B1 C1 V6];     [B1 C1 V6]      #       ≠.-٫\r
++B;    \u0660۱。󠳶𞠁\u0665;      [B1 P1 V6];     [B1 P1 V6]      #       ٠۱.𞠁٥\r
++B;    \u0660۱。󠳶𞠁\u0665;      [B1 P1 V6];     [B1 P1 V6]      #       ٠۱.𞠁٥\r
++B;    xn--8hb40a.xn--eib7967vner3e;   [B1 V6];        [B1 V6] #       ٠۱.𞠁٥\r
++T;    \u200C\u0663⒖。󱅉𽷛\u1BF3;       [B1 C1 P1 V6];  [B1 P1 V6]      #       ٣⒖.᯳\r
++N;    \u200C\u0663⒖。󱅉𽷛\u1BF3;       [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ٣⒖.᯳\r
++T;    \u200C\u066315.。󱅉𽷛\u1BF3;       [B1 C1 P1 V6 A4_2];     [B1 P1 V6 A4_2] #       ٣15..᯳\r
++N;    \u200C\u066315.。󱅉𽷛\u1BF3;       [B1 C1 P1 V6 A4_2];     [B1 C1 P1 V6 A4_2]      #       ٣15..᯳\r
++B;    xn--15-gyd..xn--1zf13512buy41d; [B1 V6 A4_2];   [B1 V6 A4_2]    #       ٣15..᯳\r
++B;    xn--15-gyd983x..xn--1zf13512buy41d;     [B1 C1 V6 A4_2];        [B1 C1 V6 A4_2] #       ٣15..᯳\r
++B;    xn--cib675m.xn--1zf13512buy41d; [B1 V6];        [B1 V6] #       ٣⒖.᯳\r
++B;    xn--cib152kwgd.xn--1zf13512buy41d;      [B1 C1 V6];     [B1 C1 V6]      #       ٣⒖.᯳\r
++B;    \u1BF3.-逋񳦭󙙮;    [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       ᯳.-逋\r
++B;    xn--1zf.xn----483d46987byr50b;  [V3 V5 V6];     [V3 V5 V6]      #       ᯳.-逋\r
++T;    \u0756。\u3164\u200Dς;        [C2 P1 V6];     [P1 V6] #       ݖ.ς\r
++N;    \u0756。\u3164\u200Dς;        [C2 P1 V6];     [C2 P1 V6]      #       ݖ.ς\r
++T;    \u0756。\u1160\u200Dς;        [C2 P1 V6];     [P1 V6] #       ݖ.ς\r
++N;    \u0756。\u1160\u200Dς;        [C2 P1 V6];     [C2 P1 V6]      #       ݖ.ς\r
++T;    \u0756。\u1160\u200DΣ;        [C2 P1 V6];     [P1 V6] #       ݖ.σ\r
++N;    \u0756。\u1160\u200DΣ;        [C2 P1 V6];     [C2 P1 V6]      #       ݖ.σ\r
++T;    \u0756。\u1160\u200Dσ;        [C2 P1 V6];     [P1 V6] #       ݖ.σ\r
++N;    \u0756。\u1160\u200Dσ;        [C2 P1 V6];     [C2 P1 V6]      #       ݖ.σ\r
++B;    xn--9ob.xn--4xa380e;    [V6];   [V6]    #       ݖ.σ\r
++B;    xn--9ob.xn--4xa380ebol; [C2 V6];        [C2 V6] #       ݖ.σ\r
++B;    xn--9ob.xn--3xa580ebol; [C2 V6];        [C2 V6] #       ݖ.ς\r
++T;    \u0756。\u3164\u200DΣ;        [C2 P1 V6];     [P1 V6] #       ݖ.σ\r
++N;    \u0756。\u3164\u200DΣ;        [C2 P1 V6];     [C2 P1 V6]      #       ݖ.σ\r
++T;    \u0756。\u3164\u200Dσ;        [C2 P1 V6];     [P1 V6] #       ݖ.σ\r
++N;    \u0756。\u3164\u200Dσ;        [C2 P1 V6];     [C2 P1 V6]      #       ݖ.σ\r
++B;    xn--9ob.xn--4xa574u;    [V6];   [V6]    #       ݖ.σ\r
++B;    xn--9ob.xn--4xa795lq2l; [C2 V6];        [C2 V6] #       ݖ.σ\r
++B;    xn--9ob.xn--3xa995lq2l; [C2 V6];        [C2 V6] #       ݖ.ς\r
++T;    ᡆႣ。󞢧\u0315\u200D\u200D;        [C2 P1 V6];     [P1 V6] #       ᡆႣ.̕\r
++N;    ᡆႣ。󞢧\u0315\u200D\u200D;        [C2 P1 V6];     [C2 P1 V6]      #       ᡆႣ.̕\r
++T;    ᡆႣ。󞢧\u0315\u200D\u200D;        [C2 P1 V6];     [P1 V6] #       ᡆႣ.̕\r
++N;    ᡆႣ。󞢧\u0315\u200D\u200D;        [C2 P1 V6];     [C2 P1 V6]      #       ᡆႣ.̕\r
++T;    ᡆⴃ。󞢧\u0315\u200D\u200D;        [C2 P1 V6];     [P1 V6] #       ᡆⴃ.̕\r
++N;    ᡆⴃ。󞢧\u0315\u200D\u200D;        [C2 P1 V6];     [C2 P1 V6]      #       ᡆⴃ.̕\r
++B;    xn--57e237h.xn--5sa98523p;      [V6];   [V6]    #       ᡆⴃ.̕\r
++B;    xn--57e237h.xn--5sa649la993427a;        [C2 V6];        [C2 V6] #       ᡆⴃ.̕\r
++B;    xn--bnd320b.xn--5sa98523p;      [V6];   [V6]    #       ᡆႣ.̕\r
++B;    xn--bnd320b.xn--5sa649la993427a;        [C2 V6];        [C2 V6] #       ᡆႣ.̕\r
++T;    ᡆⴃ。󞢧\u0315\u200D\u200D;        [C2 P1 V6];     [P1 V6] #       ᡆⴃ.̕\r
++N;    ᡆⴃ。󞢧\u0315\u200D\u200D;        [C2 P1 V6];     [C2 P1 V6]      #       ᡆⴃ.̕\r
++T;    㭄\u200D\u084F𑚵.ς𐮮\u200C\u200D;       [B5 B6 C1 C2];  [B5 B6] #       㭄ࡏ𑚵.ς𐮮\r
++N;    㭄\u200D\u084F𑚵.ς𐮮\u200C\u200D;       [B5 B6 C1 C2];  [B5 B6 C1 C2]   #       㭄ࡏ𑚵.ς𐮮\r
++T;    㭄\u200D\u084F𑚵.ς𐮮\u200C\u200D; [B5 B6 C1 C2];  [B5 B6] #       㭄ࡏ𑚵.ς𐮮\r
++N;    㭄\u200D\u084F𑚵.ς𐮮\u200C\u200D; [B5 B6 C1 C2];  [B5 B6 C1 C2]   #       㭄ࡏ𑚵.ς𐮮\r
++T;    㭄\u200D\u084F𑚵.Σ𐮮\u200C\u200D; [B5 B6 C1 C2];  [B5 B6] #       㭄ࡏ𑚵.σ𐮮\r
++N;    㭄\u200D\u084F𑚵.Σ𐮮\u200C\u200D; [B5 B6 C1 C2];  [B5 B6 C1 C2]   #       㭄ࡏ𑚵.σ𐮮\r
++T;    㭄\u200D\u084F𑚵.σ𐮮\u200C\u200D; [B5 B6 C1 C2];  [B5 B6] #       㭄ࡏ𑚵.σ𐮮\r
++N;    㭄\u200D\u084F𑚵.σ𐮮\u200C\u200D; [B5 B6 C1 C2];  [B5 B6 C1 C2]   #       㭄ࡏ𑚵.σ𐮮\r
++B;    xn--ewb302xhu1l.xn--4xa0426k;   [B5 B6];        [B5 B6] #       㭄ࡏ𑚵.σ𐮮\r
++B;    xn--ewb962jfitku4r.xn--4xa695lda6932v;  [B5 B6 C1 C2];  [B5 B6 C1 C2]   #       㭄ࡏ𑚵.σ𐮮\r
++B;    xn--ewb962jfitku4r.xn--3xa895lda6932v;  [B5 B6 C1 C2];  [B5 B6 C1 C2]   #       㭄ࡏ𑚵.ς𐮮\r
++T;    㭄\u200D\u084F𑚵.Σ𐮮\u200C\u200D;       [B5 B6 C1 C2];  [B5 B6] #       㭄ࡏ𑚵.σ𐮮\r
++N;    㭄\u200D\u084F𑚵.Σ𐮮\u200C\u200D;       [B5 B6 C1 C2];  [B5 B6 C1 C2]   #       㭄ࡏ𑚵.σ𐮮\r
++T;    㭄\u200D\u084F𑚵.σ𐮮\u200C\u200D;       [B5 B6 C1 C2];  [B5 B6] #       㭄ࡏ𑚵.σ𐮮\r
++N;    㭄\u200D\u084F𑚵.σ𐮮\u200C\u200D;       [B5 B6 C1 C2];  [B5 B6 C1 C2]   #       㭄ࡏ𑚵.σ𐮮\r
++B;    \u17B5。𞯸ꡀ🄋;   [B1 B2 B3 B6 P1 V5 V6]; [B1 B2 B3 B6 P1 V5 V6]  #       .ꡀ🄋\r
++B;    xn--03e.xn--8b9ar252dngd;       [B1 B2 B3 B6 V5 V6];    [B1 B2 B3 B6 V5 V6]     #       .ꡀ🄋\r
++B;    󐪺暑.⾑\u0668;    [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       暑.襾٨\r
++B;    󐪺暑.襾\u0668;      [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       暑.襾٨\r
++B;    xn--tlvq3513e.xn--hib9228d;     [B5 B6 V6];     [B5 B6 V6]      #       暑.襾٨\r
++B;    󠄚≯ꡢ。\u0891\u1DFF;      [B1 P1 V6];     [B1 P1 V6]      #       ≯ꡢ.᷿\r
++B;    󠄚>\u0338ꡢ。\u0891\u1DFF;  [B1 P1 V6];     [B1 P1 V6]      #       ≯ꡢ.᷿\r
++B;    xn--hdh7783c.xn--9xb680i;       [B1 V6];        [B1 V6] #       ≯ꡢ.᷿\r
++B;    \uFDC3𮁱\u0B4D𐨿.󐧤Ⴗ;   [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       كمم𮁱୍𐨿.Ⴗ\r
++B;    \u0643\u0645\u0645𮁱\u0B4D𐨿.󐧤Ⴗ;       [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       كمم𮁱୍𐨿.Ⴗ\r
++B;    \u0643\u0645\u0645𮁱\u0B4D𐨿.󐧤ⴗ;       [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       كمم𮁱୍𐨿.ⴗ\r
++B;    xn--fhbea662czx68a2tju.xn--fljz2846h;   [B2 B3 V6];     [B2 B3 V6]      #       كمم𮁱୍𐨿.ⴗ\r
++B;    xn--fhbea662czx68a2tju.xn--vnd55511o;   [B2 B3 V6];     [B2 B3 V6]      #       كمم𮁱୍𐨿.Ⴗ\r
++B;    \uFDC3𮁱\u0B4D𐨿.󐧤ⴗ;   [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       كمم𮁱୍𐨿.ⴗ\r
++B;    𞀨。\u1B44򡛨𞎇;  [P1 V5 V6];     [P1 V5 V6]      #       𞀨.᭄\r
++B;    𞀨。\u1B44򡛨𞎇;  [P1 V5 V6];     [P1 V5 V6]      #       𞀨.᭄\r
++B;    xn--mi4h.xn--1uf6843smg20c;     [V5 V6];        [V5 V6] #       𞀨.᭄\r
++T;    󠣼\u200C.𐺰\u200Cᡟ;     [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 P1 V6]        #       .ᡟ\r
++N;    󠣼\u200C.𐺰\u200Cᡟ;     [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       .ᡟ\r
++T;    󠣼\u200C.𐺰\u200Cᡟ;       [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 P1 V6]        #       .ᡟ\r
++N;    󠣼\u200C.𐺰\u200Cᡟ;       [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       .ᡟ\r
++B;    xn--q046e.xn--v8e7227j; [B1 B2 B3 V6];  [B1 B2 B3 V6]\r
++B;    xn--0ug18531l.xn--v8e340bp21t;  [B1 B2 B3 C1 V6];       [B1 B2 B3 C1 V6]        #       .ᡟ\r
++T;    ᢛ󨅟ß.ጧ;  [P1 V6];        [P1 V6]\r
++N;    ᢛ󨅟ß.ጧ;  [P1 V6];        [P1 V6]\r
++B;    ᢛ󨅟SS.ጧ;  [P1 V6];        [P1 V6]\r
++B;    ᢛ󨅟ss.ጧ;  [P1 V6];        [P1 V6]\r
++B;    ᢛ󨅟Ss.ጧ;  [P1 V6];        [P1 V6]\r
++B;    xn--ss-7dp66033t.xn--p5d;       [V6];   [V6]\r
++B;    xn--zca562jc642x.xn--p5d;       [V6];   [V6]\r
++T;    ⮒\u200C.񒚗\u200C;   [C1 P1 V6];     [P1 V6] #       ⮒.\r
++N;    ⮒\u200C.񒚗\u200C;   [C1 P1 V6];     [C1 P1 V6]      #       ⮒.\r
++B;    xn--b9i.xn--5p9y;       [V6];   [V6]\r
++B;    xn--0ugx66b.xn--0ugz2871c;      [C1 V6];        [C1 V6] #       ⮒.\r
++B;    𞤂񹞁𐹯。Ⴜ;     [B2 P1 V6];     [B2 P1 V6]\r
++B;    𞤤񹞁𐹯。ⴜ;     [B2 P1 V6];     [B2 P1 V6]\r
++B;    xn--no0dr648a51o3b.xn--klj;     [B2 V6];        [B2 V6]\r
++B;    xn--no0dr648a51o3b.xn--0nd;     [B2 V6];        [B2 V6]\r
++B;    𞤂񹞁𐹯。ⴜ;     [B2 P1 V6];     [B2 P1 V6]\r
++T;    𐹵⮣\u200C𑄰。񷴿\uFCB7; [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 P1 V6]        #       𐹵⮣𑄰.ضم\r
++N;    𐹵⮣\u200C𑄰。񷴿\uFCB7; [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       𐹵⮣𑄰.ضم\r
++T;    𐹵⮣\u200C𑄰。񷴿\u0636\u0645;   [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 P1 V6]        #       𐹵⮣𑄰.ضم\r
++N;    𐹵⮣\u200C𑄰。񷴿\u0636\u0645;   [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       𐹵⮣𑄰.ضم\r
++B;    xn--s9i5458e7yb.xn--1gb4a66004i;        [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       𐹵⮣𑄰.ضم\r
++B;    xn--0ug586bcj8p7jc.xn--1gb4a66004i;     [B1 B5 B6 C1 V6];       [B1 B5 B6 C1 V6]        #       𐹵⮣𑄰.ضم\r
++T;    Ⴒ。デß𞤵\u0C4D;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴒ.デß𞤵్\r
++N;    Ⴒ。デß𞤵\u0C4D;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴒ.デß𞤵్\r
++T;    Ⴒ。テ\u3099ß𞤵\u0C4D;    [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴒ.デß𞤵్\r
++N;    Ⴒ。テ\u3099ß𞤵\u0C4D;    [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴒ.デß𞤵్\r
++T;    ⴒ。テ\u3099ß𞤵\u0C4D;    [B5 B6];        [B5 B6] #       ⴒ.デß𞤵్\r
++N;    ⴒ。テ\u3099ß𞤵\u0C4D;    [B5 B6];        [B5 B6] #       ⴒ.デß𞤵్\r
++T;    ⴒ。デß𞤵\u0C4D;  [B5 B6];        [B5 B6] #       ⴒ.デß𞤵్\r
++N;    ⴒ。デß𞤵\u0C4D;  [B5 B6];        [B5 B6] #       ⴒ.デß𞤵్\r
++B;    Ⴒ。デSS𞤓\u0C4D;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴒ.デss𞤵్\r
++B;    Ⴒ。テ\u3099SS𞤓\u0C4D;    [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴒ.デss𞤵్\r
++B;    ⴒ。テ\u3099ss𞤵\u0C4D;    [B5 B6];        [B5 B6] #       ⴒ.デss𞤵్\r
++B;    ⴒ。デss𞤵\u0C4D;  [B5 B6];        [B5 B6] #       ⴒ.デss𞤵్\r
++B;    Ⴒ。デSs𞤵\u0C4D;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴒ.デss𞤵్\r
++B;    Ⴒ。テ\u3099Ss𞤵\u0C4D;    [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴒ.デss𞤵్\r
++B;    xn--qnd.xn--ss-9nh3648ahh20b;   [B5 B6 V6];     [B5 B6 V6]      #       Ⴒ.デss𞤵్\r
++B;    xn--9kj.xn--ss-9nh3648ahh20b;   [B5 B6];        [B5 B6] #       ⴒ.デss𞤵్\r
++B;    xn--9kj.xn--zca669cmr3a0f28a;   [B5 B6];        [B5 B6] #       ⴒ.デß𞤵్\r
++B;    xn--qnd.xn--zca669cmr3a0f28a;   [B5 B6 V6];     [B5 B6 V6]      #       Ⴒ.デß𞤵్\r
++B;    Ⴒ。デSS𞤵\u0C4D;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴒ.デss𞤵్\r
++B;    Ⴒ。テ\u3099SS𞤵\u0C4D;    [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴒ.デss𞤵్\r
++B;    𑁿\u0D4D.7-\u07D2;        [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       𑁿്.7-ߒ\r
++B;    𑁿\u0D4D.7-\u07D2;    [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       𑁿്.7-ߒ\r
++B;    xn--wxc1283k.xn--7--yue;        [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       𑁿്.7-ߒ\r
++B;    ≯𑜫󠭇.\u1734񒞤𑍬ᢧ;  [P1 V5 V6];     [P1 V5 V6]      #       ≯𑜫.᜴𑍬ᢧ\r
++B;    >\u0338𑜫󠭇.\u1734񒞤𑍬ᢧ;      [P1 V5 V6];     [P1 V5 V6]      #       ≯𑜫.᜴𑍬ᢧ\r
++B;    xn--hdhx157g68o0g.xn--c0e65eu616c34o7a; [V5 V6];        [V5 V6] #       ≯𑜫.᜴𑍬ᢧ\r
++B;    \u1DDB򎐙Ⴗ쏔。\u0781;      [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ᷛႷ쏔.ށ\r
++B;    \u1DDB򎐙Ⴗ쏔。\u0781;        [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ᷛႷ쏔.ށ\r
++B;    \u1DDB򎐙ⴗ쏔。\u0781;        [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ᷛⴗ쏔.ށ\r
++B;    \u1DDB򎐙ⴗ쏔。\u0781;      [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ᷛⴗ쏔.ށ\r
++B;    xn--zegy26dw47iy6w2f.xn--iqb;   [B1 V5 V6];     [B1 V5 V6]      #       ᷛⴗ쏔.ށ\r
++B;    xn--vnd148d733ky6n9e.xn--iqb;   [B1 V5 V6];     [B1 V5 V6]      #       ᷛႷ쏔.ށ\r
++T;    ß。𐋳Ⴌ\u0FB8;     [P1 V6];        [P1 V6] #       ß.𐋳Ⴌྸ\r
++N;    ß。𐋳Ⴌ\u0FB8;     [P1 V6];        [P1 V6] #       ß.𐋳Ⴌྸ\r
++T;    ß。𐋳Ⴌ\u0FB8;     [P1 V6];        [P1 V6] #       ß.𐋳Ⴌྸ\r
++N;    ß。𐋳Ⴌ\u0FB8;     [P1 V6];        [P1 V6] #       ß.𐋳Ⴌྸ\r
++T;    ß。𐋳ⴌ\u0FB8;     ß.𐋳ⴌ\u0FB8;       ss.xn--lgd921mvv0m;     NV8     #       ß.𐋳ⴌྸ\r
++N;    ß。𐋳ⴌ\u0FB8;     ß.𐋳ⴌ\u0FB8;       xn--zca.xn--lgd921mvv0m;        NV8     #       ß.𐋳ⴌྸ\r
++B;    SS。𐋳Ⴌ\u0FB8;     [P1 V6];        [P1 V6] #       ss.𐋳Ⴌྸ\r
++B;    ss。𐋳ⴌ\u0FB8;     ss.𐋳ⴌ\u0FB8;       ss.xn--lgd921mvv0m;     NV8     #       ss.𐋳ⴌྸ\r
++B;    Ss。𐋳Ⴌ\u0FB8;     [P1 V6];        [P1 V6] #       ss.𐋳Ⴌྸ\r
++B;    ss.xn--lgd10cu829c;     [V6];   [V6]    #       ss.𐋳Ⴌྸ\r
++B;    ss.xn--lgd921mvv0m;     ss.𐋳ⴌ\u0FB8;       ss.xn--lgd921mvv0m;     NV8     #       ss.𐋳ⴌྸ\r
++B;    ss.𐋳ⴌ\u0FB8;       ;       ss.xn--lgd921mvv0m;     NV8     #       ss.𐋳ⴌྸ\r
++B;    SS.𐋳Ⴌ\u0FB8;       [P1 V6];        [P1 V6] #       ss.𐋳Ⴌྸ\r
++B;    Ss.𐋳Ⴌ\u0FB8;       [P1 V6];        [P1 V6] #       ss.𐋳Ⴌྸ\r
++B;    xn--zca.xn--lgd921mvv0m;        ß.𐋳ⴌ\u0FB8;       xn--zca.xn--lgd921mvv0m;        NV8     #       ß.𐋳ⴌྸ\r
++T;    ß.𐋳ⴌ\u0FB8;       ;       ss.xn--lgd921mvv0m;     NV8     #       ß.𐋳ⴌྸ\r
++N;    ß.𐋳ⴌ\u0FB8;       ;       xn--zca.xn--lgd921mvv0m;        NV8     #       ß.𐋳ⴌྸ\r
++B;    xn--zca.xn--lgd10cu829c;        [V6];   [V6]    #       ß.𐋳Ⴌྸ\r
++T;    ß。𐋳ⴌ\u0FB8;     ß.𐋳ⴌ\u0FB8;       ss.xn--lgd921mvv0m;     NV8     #       ß.𐋳ⴌྸ\r
++N;    ß。𐋳ⴌ\u0FB8;     ß.𐋳ⴌ\u0FB8;       xn--zca.xn--lgd921mvv0m;        NV8     #       ß.𐋳ⴌྸ\r
++B;    SS。𐋳Ⴌ\u0FB8;     [P1 V6];        [P1 V6] #       ss.𐋳Ⴌྸ\r
++B;    ss。𐋳ⴌ\u0FB8;     ss.𐋳ⴌ\u0FB8;       ss.xn--lgd921mvv0m;     NV8     #       ss.𐋳ⴌྸ\r
++B;    Ss。𐋳Ⴌ\u0FB8;     [P1 V6];        [P1 V6] #       ss.𐋳Ⴌྸ\r
++T;    -\u069E𐶡.\u200C⾝\u09CD;    [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       -ڞ.身্\r
++N;    -\u069E𐶡.\u200C⾝\u09CD;    [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       -ڞ.身্\r
++T;    -\u069E𐶡.\u200C身\u09CD;    [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       -ڞ.身্\r
++N;    -\u069E𐶡.\u200C身\u09CD;    [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       -ڞ.身্\r
++B;    xn----stc7013r.xn--b7b1419d;    [B1 V3 V6];     [B1 V3 V6]      #       -ڞ.身্\r
++B;    xn----stc7013r.xn--b7b305imj2f; [B1 C1 V3 V6];  [B1 C1 V3 V6]   #       -ڞ.身্\r
++T;    😮\u0764𑈵𞀖.💅\u200D;  [B1 C2];        [B1]    #       😮ݤ𑈵𞀖.💅\r
++N;    😮\u0764𑈵𞀖.💅\u200D;  [B1 C2];        [B1 C2] #       😮ݤ𑈵𞀖.💅\r
++T;    😮\u0764𑈵𞀖.💅\u200D;  [B1 C2];        [B1]    #       😮ݤ𑈵𞀖.💅\r
++N;    😮\u0764𑈵𞀖.💅\u200D;  [B1 C2];        [B1 C2] #       😮ݤ𑈵𞀖.💅\r
++B;    xn--opb4277kuc7elqsa.xn--kr8h;  [B1];   [B1]    #       😮ݤ𑈵𞀖.💅\r
++B;    xn--opb4277kuc7elqsa.xn--1ug5265p;      [B1 C2];        [B1 C2] #       😮ݤ𑈵𞀖.💅\r
++T;    \u08F2\u200D꙳\u0712.ᢏ\u200C󠍄;    [B1 B6 C1 C2 P1 V5 V6]; [B1 B6 P1 V5 V6]        #       ࣲ꙳ܒ.ᢏ\r
++N;    \u08F2\u200D꙳\u0712.ᢏ\u200C󠍄;    [B1 B6 C1 C2 P1 V5 V6]; [B1 B6 C1 C2 P1 V5 V6]  #       ࣲ꙳ܒ.ᢏ\r
++B;    xn--cnb37gdy00a.xn--89e02253p;  [B1 B6 V5 V6];  [B1 B6 V5 V6]   #       ࣲ꙳ܒ.ᢏ\r
++B;    xn--cnb37g904be26j.xn--89e849ax9363a;   [B1 B6 C1 C2 V5 V6];    [B1 B6 C1 C2 V5 V6]     #       ࣲ꙳ܒ.ᢏ\r
++B;    Ⴑ.\u06BF𞯓ᠲ;    [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       Ⴑ.ڿᠲ\r
++B;    Ⴑ.\u06BF𞯓ᠲ;      [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       Ⴑ.ڿᠲ\r
++B;    ⴑ.\u06BF𞯓ᠲ;      [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ⴑ.ڿᠲ\r
++B;    xn--8kj.xn--ykb840gd555a;       [B2 B3 V6];     [B2 B3 V6]      #       ⴑ.ڿᠲ\r
++B;    xn--pnd.xn--ykb840gd555a;       [B2 B3 V6];     [B2 B3 V6]      #       Ⴑ.ڿᠲ\r
++B;    ⴑ.\u06BF𞯓ᠲ;    [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ⴑ.ڿᠲ\r
++B;    \u1A5A𛦝\u0C4D。𚝬𝟵;    [P1 V5 V6];     [P1 V5 V6]      #       ᩚ్.9\r
++B;    \u1A5A𛦝\u0C4D。𚝬9;       [P1 V5 V6];     [P1 V5 V6]      #       ᩚ్.9\r
++B;    xn--lqc703ebm93a.xn--9-000p;    [V5 V6];        [V5 V6] #       ᩚ్.9\r
++T;    \u200C\u06A0𿺆𝟗。Ⴣ꒘\uFCD0񐘖;        [B1 B5 C1 P1 V6];       [B2 B5 P1 V6]   #       ڠ9.Ⴣ꒘مخ\r
++N;    \u200C\u06A0𿺆𝟗。Ⴣ꒘\uFCD0񐘖;        [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       ڠ9.Ⴣ꒘مخ\r
++T;    \u200C\u06A0𿺆9。Ⴣ꒘\u0645\u062E񐘖;     [B1 B5 C1 P1 V6];       [B2 B5 P1 V6]   #       ڠ9.Ⴣ꒘مخ\r
++N;    \u200C\u06A0𿺆9。Ⴣ꒘\u0645\u062E񐘖;     [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       ڠ9.Ⴣ꒘مخ\r
++T;    \u200C\u06A0𿺆9。ⴣ꒘\u0645\u062E񐘖;     [B1 B5 C1 P1 V6];       [B2 B5 P1 V6]   #       ڠ9.ⴣ꒘مخ\r
++N;    \u200C\u06A0𿺆9。ⴣ꒘\u0645\u062E񐘖;     [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       ڠ9.ⴣ꒘مخ\r
++B;    xn--9-vtc42319e.xn--tgb9bz87p833hw316c; [B2 B5 V6];     [B2 B5 V6]      #       ڠ9.ⴣ꒘مخ\r
++B;    xn--9-vtc736qts91g.xn--tgb9bz87p833hw316c;      [B1 B5 C1 V6];  [B1 B5 C1 V6]   #       ڠ9.ⴣ꒘مخ\r
++B;    xn--9-vtc42319e.xn--tgb9bz61cfn8mw3t2c; [B2 B5 V6];     [B2 B5 V6]      #       ڠ9.Ⴣ꒘مخ\r
++B;    xn--9-vtc736qts91g.xn--tgb9bz61cfn8mw3t2c;      [B1 B5 C1 V6];  [B1 B5 C1 V6]   #       ڠ9.Ⴣ꒘مخ\r
++T;    \u200C\u06A0𿺆𝟗。ⴣ꒘\uFCD0񐘖;        [B1 B5 C1 P1 V6];       [B2 B5 P1 V6]   #       ڠ9.ⴣ꒘مخ\r
++N;    \u200C\u06A0𿺆𝟗。ⴣ꒘\uFCD0񐘖;        [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       ڠ9.ⴣ꒘مخ\r
++B;    ᡖ。\u031F񗛨\u0B82-;        [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       ᡖ.̟ஂ-\r
++B;    ᡖ。\u031F񗛨\u0B82-;        [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       ᡖ.̟ஂ-\r
++B;    xn--m8e.xn----mdb555dkk71m;     [V3 V5 V6];     [V3 V5 V6]      #       ᡖ.̟ஂ-\r
++B;    𞠠浘。絧𞀀;      [B2 B3];        [B2 B3]\r
++B;    xn--e0wp491f.xn--ud0a3573e;     [B2 B3];        [B2 B3]\r
++B;    \u0596Ⴋ.𝟳≯︒\uFE0A;   [P1 V5 V6];     [P1 V5 V6]      #       ֖Ⴋ.7≯︒\r
++B;    \u0596Ⴋ.𝟳>\u0338︒\uFE0A;       [P1 V5 V6];     [P1 V5 V6]      #       ֖Ⴋ.7≯︒\r
++B;    \u0596Ⴋ.7≯。\uFE0A;        [P1 V5 V6];     [P1 V5 V6]      #       ֖Ⴋ.7≯.\r
++B;    \u0596Ⴋ.7>\u0338。\uFE0A;    [P1 V5 V6];     [P1 V5 V6]      #       ֖Ⴋ.7≯.\r
++B;    \u0596ⴋ.7>\u0338。\uFE0A;    [P1 V5 V6];     [P1 V5 V6]      #       ֖ⴋ.7≯.\r
++B;    \u0596ⴋ.7≯。\uFE0A;        [P1 V5 V6];     [P1 V5 V6]      #       ֖ⴋ.7≯.\r
++B;    xn--hcb613r.xn--7-pgo.; [V5 V6];        [V5 V6] #       ֖ⴋ.7≯.\r
++B;    xn--hcb887c.xn--7-pgo.; [V5 V6];        [V5 V6] #       ֖Ⴋ.7≯.\r
++B;    \u0596ⴋ.𝟳>\u0338︒\uFE0A;       [P1 V5 V6];     [P1 V5 V6]      #       ֖ⴋ.7≯︒\r
++B;    \u0596ⴋ.𝟳≯︒\uFE0A;   [P1 V5 V6];     [P1 V5 V6]      #       ֖ⴋ.7≯︒\r
++B;    xn--hcb613r.xn--7-pgoy530h;     [V5 V6];        [V5 V6] #       ֖ⴋ.7≯︒\r
++B;    xn--hcb887c.xn--7-pgoy530h;     [V5 V6];        [V5 V6] #       ֖Ⴋ.7≯︒\r
++T;    \u200DF𑓂。󠺨︒\u077E𐹢;        [B1 C2 P1 V6];  [B1 P1 V6]      #       f𑓂.︒ݾ𐹢\r
++N;    \u200DF𑓂。󠺨︒\u077E𐹢;        [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       f𑓂.︒ݾ𐹢\r
++T;    \u200DF𑓂。󠺨。\u077E𐹢;        [B1 C2 P1 V6];  [B1 P1 V6]      #       f𑓂..ݾ𐹢\r
++N;    \u200DF𑓂。󠺨。\u077E𐹢;        [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       f𑓂..ݾ𐹢\r
++T;    \u200Df𑓂。󠺨。\u077E𐹢;        [B1 C2 P1 V6];  [B1 P1 V6]      #       f𑓂..ݾ𐹢\r
++N;    \u200Df𑓂。󠺨。\u077E𐹢;        [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       f𑓂..ݾ𐹢\r
++B;    xn--f-kq9i.xn--7656e.xn--fqb4175k;      [B1 V6];        [B1 V6] #       f𑓂..ݾ𐹢\r
++B;    xn--f-tgn9761i.xn--7656e.xn--fqb4175k;  [B1 C2 V6];     [B1 C2 V6]      #       f𑓂..ݾ𐹢\r
++T;    \u200Df𑓂。󠺨︒\u077E𐹢;        [B1 C2 P1 V6];  [B1 P1 V6]      #       f𑓂.︒ݾ𐹢\r
++N;    \u200Df𑓂。󠺨︒\u077E𐹢;        [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       f𑓂.︒ݾ𐹢\r
++B;    xn--f-kq9i.xn--fqb1637j8hky9452a;       [B1 V6];        [B1 V6] #       f𑓂.︒ݾ𐹢\r
++B;    xn--f-tgn9761i.xn--fqb1637j8hky9452a;   [B1 C2 V6];     [B1 C2 V6]      #       f𑓂.︒ݾ𐹢\r
++B;    \u0845🄇𐼗︒。𐹻𑜫;   [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       ࡅ🄇︒.𐹻𑜫\r
++B;    \u08456,𐼗。。𐹻𑜫;     [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       ࡅ6,..𐹻𑜫\r
++B;    xn--6,-r4e4420y..xn--zo0di2m;   [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       ࡅ6,..𐹻𑜫\r
++B;    xn--3vb4696jpxkjh7s.xn--zo0di2m;        [B1 B3 V6];     [B1 B3 V6]      #       ࡅ🄇︒.𐹻𑜫\r
++B;    𐹈.\u1DC0𑈱𐦭;    [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       .᷀𑈱𐦭\r
++B;    xn--jn0d.xn--7dg0871h3lf;       [B1 V5 V6];     [B1 V5 V6]      #       .᷀𑈱𐦭\r
++B;    Ⴂ䠺。𞤃񅏎󙮦\u0693;    [B2 P1 V6];     [B2 P1 V6]      #       Ⴂ䠺.𞤥ړ\r
++B;    ⴂ䠺。𞤥񅏎󙮦\u0693;    [B2 P1 V6];     [B2 P1 V6]      #       ⴂ䠺.𞤥ړ\r
++B;    xn--tkj638f.xn--pjb9818vg4xno967d;      [B2 V6];        [B2 V6] #       ⴂ䠺.𞤥ړ\r
++B;    xn--9md875z.xn--pjb9818vg4xno967d;      [B2 V6];        [B2 V6] #       Ⴂ䠺.𞤥ړ\r
++B;    ⴂ䠺。𞤃񅏎󙮦\u0693;    [B2 P1 V6];     [B2 P1 V6]      #       ⴂ䠺.𞤥ړ\r
++B;    🄇伐︒.𜙚\uA8C4;  [P1 V6];        [P1 V6] #       🄇伐︒.꣄\r
++B;    6,伐。.𜙚\uA8C4;    [P1 V6 A4_2];   [P1 V6 A4_2]    #       6,伐..꣄\r
++B;    xn--6,-7i3c..xn--0f9ao925c;     [P1 V6 A4_2];   [P1 V6 A4_2]    #       6,伐..꣄\r
++B;    xn--woqs083bel0g.xn--0f9ao925c; [V6];   [V6]    #       🄇伐︒.꣄\r
++T;    \u200D𐹠\uABED\uFFFB。\u200D𐫓Ⴚ𑂹;     [B1 C2 P1 V6];  [B1 B2 B3 P1 V6]        #       𐹠꯭.𐫓Ⴚ𑂹\r
++N;    \u200D𐹠\uABED\uFFFB。\u200D𐫓Ⴚ𑂹;     [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       𐹠꯭.𐫓Ⴚ𑂹\r
++T;    \u200D𐹠\uABED\uFFFB。\u200D𐫓ⴚ𑂹;     [B1 C2 P1 V6];  [B1 B2 B3 P1 V6]        #       𐹠꯭.𐫓ⴚ𑂹\r
++N;    \u200D𐹠\uABED\uFFFB。\u200D𐫓ⴚ𑂹;     [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       𐹠꯭.𐫓ⴚ𑂹\r
++B;    xn--429az70n29i.xn--ilj7702eqyd;        [B1 B2 B3 V6];  [B1 B2 B3 V6]   #       𐹠꯭.𐫓ⴚ𑂹\r
++B;    xn--1ugz126coy7bdbm.xn--1ug062chv7ov6e; [B1 C2 V6];     [B1 C2 V6]      #       𐹠꯭.𐫓ⴚ𑂹\r
++B;    xn--429az70n29i.xn--ynd3619jqyd;        [B1 B2 B3 V6];  [B1 B2 B3 V6]   #       𐹠꯭.𐫓Ⴚ𑂹\r
++B;    xn--1ugz126coy7bdbm.xn--ynd959evs1pv6e; [B1 C2 V6];     [B1 C2 V6]      #       𐹠꯭.𐫓Ⴚ𑂹\r
++B;    󠆠.񷐴󌟈;        [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    󠆠.񷐴󌟈;  [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    .xn--rx21bhv12i;        [V6 A4_2];      [V6 A4_2]\r
++T;    𐫃\u200CႦ.≠𞷙;  [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 P1 V6]        #       𐫃Ⴆ.≠\r
++N;    𐫃\u200CႦ.≠𞷙;  [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       𐫃Ⴆ.≠\r
++T;    𐫃\u200CႦ.=\u0338𞷙;      [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 P1 V6]        #       𐫃Ⴆ.≠\r
++N;    𐫃\u200CႦ.=\u0338𞷙;      [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       𐫃Ⴆ.≠\r
++T;    𐫃\u200Cⴆ.=\u0338𞷙;      [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 P1 V6]        #       𐫃ⴆ.≠\r
++N;    𐫃\u200Cⴆ.=\u0338𞷙;      [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       𐫃ⴆ.≠\r
++T;    𐫃\u200Cⴆ.≠𞷙;  [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 P1 V6]        #       𐫃ⴆ.≠\r
++N;    𐫃\u200Cⴆ.≠𞷙;  [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       𐫃ⴆ.≠\r
++B;    xn--xkjz802e.xn--1ch2802p;      [B1 B2 B3 V6];  [B1 B2 B3 V6]\r
++B;    xn--0ug132csv7o.xn--1ch2802p;   [B1 B2 B3 C1 V6];       [B1 B2 B3 C1 V6]        #       𐫃ⴆ.≠\r
++B;    xn--end1719j.xn--1ch2802p;      [B1 B2 B3 V6];  [B1 B2 B3 V6]\r
++B;    xn--end799ekr1p.xn--1ch2802p;   [B1 B2 B3 C1 V6];       [B1 B2 B3 C1 V6]        #       𐫃Ⴆ.≠\r
++B;    󠁲𙩢𝟥ꘌ.\u0841;       [B1 P1 V6];     [B1 P1 V6]      #       3ꘌ.ࡁ\r
++B;    󠁲𙩢3ꘌ.\u0841;    [B1 P1 V6];     [B1 P1 V6]      #       3ꘌ.ࡁ\r
++B;    xn--3-0g3es485d8i15h.xn--zvb;   [B1 V6];        [B1 V6] #       3ꘌ.ࡁ\r
++B;    -.\u1886󡲣-;  [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       -.ᢆ-\r
++B;    -.xn----pbkx6497q;      [V3 V5 V6];     [V3 V5 V6]      #       -.ᢆ-\r
++T;    󲚗\u200C。\u200C𞰆ς;      [B1 B6 C1 P1 V6];       [B2 B3 P1 V6]   #       .ς\r
++N;    󲚗\u200C。\u200C𞰆ς;      [B1 B6 C1 P1 V6];       [B1 B6 C1 P1 V6]        #       .ς\r
++T;    󲚗\u200C。\u200C𞰆ς;      [B1 B6 C1 P1 V6];       [B2 B3 P1 V6]   #       .ς\r
++N;    󲚗\u200C。\u200C𞰆ς;      [B1 B6 C1 P1 V6];       [B1 B6 C1 P1 V6]        #       .ς\r
++T;    󲚗\u200C。\u200C𞰆Σ;      [B1 B6 C1 P1 V6];       [B2 B3 P1 V6]   #       .σ\r
++N;    󲚗\u200C。\u200C𞰆Σ;      [B1 B6 C1 P1 V6];       [B1 B6 C1 P1 V6]        #       .σ\r
++T;    󲚗\u200C。\u200C𞰆σ;      [B1 B6 C1 P1 V6];       [B2 B3 P1 V6]   #       .σ\r
++N;    󲚗\u200C。\u200C𞰆σ;      [B1 B6 C1 P1 V6];       [B1 B6 C1 P1 V6]        #       .σ\r
++B;    xn--qp42f.xn--4xa3011w; [B2 B3 V6];     [B2 B3 V6]\r
++B;    xn--0ug76062m.xn--4xa595lhn92a; [B1 B6 C1 V6];  [B1 B6 C1 V6]   #       .σ\r
++B;    xn--0ug76062m.xn--3xa795lhn92a; [B1 B6 C1 V6];  [B1 B6 C1 V6]   #       .ς\r
++T;    󲚗\u200C。\u200C𞰆Σ;      [B1 B6 C1 P1 V6];       [B2 B3 P1 V6]   #       .σ\r
++N;    󲚗\u200C。\u200C𞰆Σ;      [B1 B6 C1 P1 V6];       [B1 B6 C1 P1 V6]        #       .σ\r
++T;    󲚗\u200C。\u200C𞰆σ;      [B1 B6 C1 P1 V6];       [B2 B3 P1 V6]   #       .σ\r
++N;    󲚗\u200C。\u200C𞰆σ;      [B1 B6 C1 P1 V6];       [B1 B6 C1 P1 V6]        #       .σ\r
++T;    堕𑓂\u1B02。𐮇𞤽\u200C-;        [B3 C1 V3];     [B3 V3] #       堕𑓂ᬂ.𐮇𞤽-\r
++N;    堕𑓂\u1B02。𐮇𞤽\u200C-;        [B3 C1 V3];     [B3 C1 V3]      #       堕𑓂ᬂ.𐮇𞤽-\r
++T;    堕𑓂\u1B02。𐮇𞤛\u200C-;        [B3 C1 V3];     [B3 V3] #       堕𑓂ᬂ.𐮇𞤽-\r
++N;    堕𑓂\u1B02。𐮇𞤛\u200C-;        [B3 C1 V3];     [B3 C1 V3]      #       堕𑓂ᬂ.𐮇𞤽-\r
++B;    xn--5sf345zdk8h.xn----iv5iw606c;        [B3 V3];        [B3 V3] #       堕𑓂ᬂ.𐮇𞤽-\r
++B;    xn--5sf345zdk8h.xn----rgnt157hwl9g;     [B3 C1 V3];     [B3 C1 V3]      #       堕𑓂ᬂ.𐮇𞤽-\r
++T;    𐹶𑁆ᡕ𞤢。ᡥς\u062Aς;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥςتς\r
++N;    𐹶𑁆ᡕ𞤢。ᡥς\u062Aς;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥςتς\r
++T;    𐹶𑁆ᡕ𞤢。ᡥς\u062Aς;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥςتς\r
++N;    𐹶𑁆ᡕ𞤢。ᡥς\u062Aς;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥςتς\r
++B;    𐹶𑁆ᡕ𞤀。ᡥΣ\u062AΣ;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتσ\r
++B;    𐹶𑁆ᡕ𞤢。ᡥσ\u062Aσ;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتσ\r
++B;    𐹶𑁆ᡕ𞤀。ᡥΣ\u062Aσ;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتσ\r
++B;    xn--l8e1317j1ebz456b.xn--4xaa85plx4a;   [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتσ\r
++T;    𐹶𑁆ᡕ𞤀。ᡥΣ\u062Aς;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتς\r
++N;    𐹶𑁆ᡕ𞤀。ᡥΣ\u062Aς;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتς\r
++T;    𐹶𑁆ᡕ𞤢。ᡥσ\u062Aς;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتς\r
++N;    𐹶𑁆ᡕ𞤢。ᡥσ\u062Aς;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتς\r
++B;    xn--l8e1317j1ebz456b.xn--3xab95plx4a;   [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتς\r
++B;    xn--l8e1317j1ebz456b.xn--3xaa16plx4a;   [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥςتς\r
++B;    𐹶𑁆ᡕ𞤀。ᡥΣ\u062AΣ;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتσ\r
++B;    𐹶𑁆ᡕ𞤢。ᡥσ\u062Aσ;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتσ\r
++B;    𐹶𑁆ᡕ𞤀。ᡥΣ\u062Aσ;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتσ\r
++T;    𐹶𑁆ᡕ𞤀。ᡥΣ\u062Aς;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتς\r
++N;    𐹶𑁆ᡕ𞤀。ᡥΣ\u062Aς;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتς\r
++T;    𐹶𑁆ᡕ𞤢。ᡥσ\u062Aς;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتς\r
++N;    𐹶𑁆ᡕ𞤢。ᡥσ\u062Aς;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتς\r
++B;    𐹶𑁆ᡕ𞤢。ᡥΣ\u062AΣ;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتσ\r
++B;    𐹶𑁆ᡕ𞤢。ᡥΣ\u062Aσ;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتσ\r
++T;    𐹶𑁆ᡕ𞤢。ᡥΣ\u062Aς;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتς\r
++N;    𐹶𑁆ᡕ𞤢。ᡥΣ\u062Aς;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتς\r
++B;    𐹶𑁆ᡕ𞤢。ᡥΣ\u062AΣ;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتσ\r
++B;    𐹶𑁆ᡕ𞤢。ᡥΣ\u062Aσ;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتσ\r
++T;    𐹶𑁆ᡕ𞤢。ᡥΣ\u062Aς;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتς\r
++N;    𐹶𑁆ᡕ𞤢。ᡥΣ\u062Aς;        [B1 B5];        [B1 B5] #       𐹶𑁆ᡕ𞤢.ᡥσتς\r
++T;    󏒰.-𝟻ß; [P1 V3 V6];     [P1 V3 V6]\r
++N;    󏒰.-𝟻ß; [P1 V3 V6];     [P1 V3 V6]\r
++T;    󏒰.-5ß;      [P1 V3 V6];     [P1 V3 V6]\r
++N;    󏒰.-5ß;      [P1 V3 V6];     [P1 V3 V6]\r
++B;    󏒰.-5SS;      [P1 V3 V6];     [P1 V3 V6]\r
++B;    󏒰.-5ss;      [P1 V3 V6];     [P1 V3 V6]\r
++B;    󏒰.-5Ss;      [P1 V3 V6];     [P1 V3 V6]\r
++B;    xn--t960e.-5ss; [V3 V6];        [V3 V6]\r
++B;    xn--t960e.xn---5-hia;   [V3 V6];        [V3 V6]\r
++B;    󏒰.-𝟻SS; [P1 V3 V6];     [P1 V3 V6]\r
++B;    󏒰.-𝟻ss; [P1 V3 V6];     [P1 V3 V6]\r
++B;    󏒰.-𝟻Ss; [P1 V3 V6];     [P1 V3 V6]\r
++T;    \u200D𐨿.🤒Ⴥ򑮶; [C2 P1 V6];     [P1 V5 V6]      #       𐨿.🤒Ⴥ\r
++N;    \u200D𐨿.🤒Ⴥ򑮶; [C2 P1 V6];     [C2 P1 V6]      #       𐨿.🤒Ⴥ\r
++T;    \u200D𐨿.🤒ⴥ򑮶; [C2 P1 V6];     [P1 V5 V6]      #       𐨿.🤒ⴥ\r
++N;    \u200D𐨿.🤒ⴥ򑮶; [C2 P1 V6];     [C2 P1 V6]      #       𐨿.🤒ⴥ\r
++B;    xn--0s9c.xn--tljz038l0gz4b;     [V5 V6];        [V5 V6]\r
++B;    xn--1ug9533g.xn--tljz038l0gz4b; [C2 V6];        [C2 V6] #       𐨿.🤒ⴥ\r
++B;    xn--0s9c.xn--9nd3211w0gz4b;     [V5 V6];        [V5 V6]\r
++B;    xn--1ug9533g.xn--9nd3211w0gz4b; [C2 V6];        [C2 V6] #       𐨿.🤒Ⴥ\r
++T;    𵋅。ß𬵩\u200D;    [C2 P1 V6];     [P1 V6] #       .ß𬵩\r
++N;    𵋅。ß𬵩\u200D;    [C2 P1 V6];     [C2 P1 V6]      #       .ß𬵩\r
++T;    𵋅。SS𬵩\u200D;    [C2 P1 V6];     [P1 V6] #       .ss𬵩\r
++N;    𵋅。SS𬵩\u200D;    [C2 P1 V6];     [C2 P1 V6]      #       .ss𬵩\r
++T;    𵋅。ss𬵩\u200D;    [C2 P1 V6];     [P1 V6] #       .ss𬵩\r
++N;    𵋅。ss𬵩\u200D;    [C2 P1 V6];     [C2 P1 V6]      #       .ss𬵩\r
++T;    𵋅。Ss𬵩\u200D;    [C2 P1 V6];     [P1 V6] #       .ss𬵩\r
++N;    𵋅。Ss𬵩\u200D;    [C2 P1 V6];     [C2 P1 V6]      #       .ss𬵩\r
++B;    xn--ey1p.xn--ss-eq36b;  [V6];   [V6]\r
++B;    xn--ey1p.xn--ss-n1tx0508a;      [C2 V6];        [C2 V6] #       .ss𬵩\r
++B;    xn--ey1p.xn--zca870nz438b;      [C2 V6];        [C2 V6] #       .ß𬵩\r
++T;    \u200C𭉝。\u07F1\u0301𞹻;  [B1 C1 V5];     [B1 V5] #       𭉝.߱́غ\r
++N;    \u200C𭉝。\u07F1\u0301𞹻;  [B1 C1 V5];     [B1 C1 V5]      #       𭉝.߱́غ\r
++T;    \u200C𭉝。\u07F1\u0301\u063A;        [B1 C1 V5];     [B1 V5] #       𭉝.߱́غ\r
++N;    \u200C𭉝。\u07F1\u0301\u063A;        [B1 C1 V5];     [B1 C1 V5]      #       𭉝.߱́غ\r
++B;    xn--634m.xn--lsa46nuub; [B1 V5];        [B1 V5] #       𭉝.߱́غ\r
++B;    xn--0ugy003y.xn--lsa46nuub;     [B1 C1 V5];     [B1 C1 V5]      #       𭉝.߱́غ\r
++T;    𞼌\u200C𑈶。𐹡;  [B1 B3 C1 P1 V6];       [B1 P1 V6]      #       𑈶.𐹡\r
++N;    𞼌\u200C𑈶。𐹡;  [B1 B3 C1 P1 V6];       [B1 B3 C1 P1 V6]        #       𑈶.𐹡\r
++B;    xn--9g1d1288a.xn--8n0d; [B1 V6];        [B1 V6]\r
++B;    xn--0ug7946gzpxf.xn--8n0d;      [B1 B3 C1 V6];  [B1 B3 C1 V6]   #       𑈶.𐹡\r
++T;    󠅯򇽭\u200C🜭。𑖿\u1ABBς≠;   [C1 P1 V5 V6];  [P1 V5 V6]      #       🜭.𑖿᪻ς≠\r
++N;    󠅯򇽭\u200C🜭。𑖿\u1ABBς≠;   [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       🜭.𑖿᪻ς≠\r
++T;    󠅯򇽭\u200C🜭。𑖿\u1ABBς=\u0338;       [C1 P1 V5 V6];  [P1 V5 V6]      #       🜭.𑖿᪻ς≠\r
++N;    󠅯򇽭\u200C🜭。𑖿\u1ABBς=\u0338;       [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       🜭.𑖿᪻ς≠\r
++T;    󠅯򇽭\u200C🜭。𑖿\u1ABBς≠;   [C1 P1 V5 V6];  [P1 V5 V6]      #       🜭.𑖿᪻ς≠\r
++N;    󠅯򇽭\u200C🜭。𑖿\u1ABBς≠;   [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       🜭.𑖿᪻ς≠\r
++T;    󠅯򇽭\u200C🜭。𑖿\u1ABBς=\u0338;       [C1 P1 V5 V6];  [P1 V5 V6]      #       🜭.𑖿᪻ς≠\r
++N;    󠅯򇽭\u200C🜭。𑖿\u1ABBς=\u0338;       [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       🜭.𑖿᪻ς≠\r
++T;    󠅯򇽭\u200C🜭。𑖿\u1ABBΣ=\u0338;       [C1 P1 V5 V6];  [P1 V5 V6]      #       🜭.𑖿᪻σ≠\r
++N;    󠅯򇽭\u200C🜭。𑖿\u1ABBΣ=\u0338;       [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       🜭.𑖿᪻σ≠\r
++T;    󠅯򇽭\u200C🜭。𑖿\u1ABBΣ≠;   [C1 P1 V5 V6];  [P1 V5 V6]      #       🜭.𑖿᪻σ≠\r
++N;    󠅯򇽭\u200C🜭。𑖿\u1ABBΣ≠;   [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       🜭.𑖿᪻σ≠\r
++T;    󠅯򇽭\u200C🜭。𑖿\u1ABBσ≠;   [C1 P1 V5 V6];  [P1 V5 V6]      #       🜭.𑖿᪻σ≠\r
++N;    󠅯򇽭\u200C🜭。𑖿\u1ABBσ≠;   [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       🜭.𑖿᪻σ≠\r
++T;    󠅯򇽭\u200C🜭。𑖿\u1ABBσ=\u0338;       [C1 P1 V5 V6];  [P1 V5 V6]      #       🜭.𑖿᪻σ≠\r
++N;    󠅯򇽭\u200C🜭。𑖿\u1ABBσ=\u0338;       [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       🜭.𑖿᪻σ≠\r
++B;    xn--zb9h5968x.xn--4xa378i1mfjw7y;       [V5 V6];        [V5 V6] #       🜭.𑖿᪻σ≠\r
++B;    xn--0ug3766p5nm1b.xn--4xa378i1mfjw7y;   [C1 V5 V6];     [C1 V5 V6]      #       🜭.𑖿᪻σ≠\r
++B;    xn--0ug3766p5nm1b.xn--3xa578i1mfjw7y;   [C1 V5 V6];     [C1 V5 V6]      #       🜭.𑖿᪻ς≠\r
++T;    󠅯򇽭\u200C🜭。𑖿\u1ABBΣ=\u0338;       [C1 P1 V5 V6];  [P1 V5 V6]      #       🜭.𑖿᪻σ≠\r
++N;    󠅯򇽭\u200C🜭。𑖿\u1ABBΣ=\u0338;       [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       🜭.𑖿᪻σ≠\r
++T;    󠅯򇽭\u200C🜭。𑖿\u1ABBΣ≠;   [C1 P1 V5 V6];  [P1 V5 V6]      #       🜭.𑖿᪻σ≠\r
++N;    󠅯򇽭\u200C🜭。𑖿\u1ABBΣ≠;   [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       🜭.𑖿᪻σ≠\r
++T;    󠅯򇽭\u200C🜭。𑖿\u1ABBσ≠;   [C1 P1 V5 V6];  [P1 V5 V6]      #       🜭.𑖿᪻σ≠\r
++N;    󠅯򇽭\u200C🜭。𑖿\u1ABBσ≠;   [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       🜭.𑖿᪻σ≠\r
++T;    󠅯򇽭\u200C🜭。𑖿\u1ABBσ=\u0338;       [C1 P1 V5 V6];  [P1 V5 V6]      #       🜭.𑖿᪻σ≠\r
++N;    󠅯򇽭\u200C🜭。𑖿\u1ABBσ=\u0338;       [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       🜭.𑖿᪻σ≠\r
++T;    ⒋。⒈\u200D򳴢;    [C2 P1 V6];     [P1 V6] #       ⒋.⒈\r
++N;    ⒋。⒈\u200D򳴢;    [C2 P1 V6];     [C2 P1 V6]      #       ⒋.⒈\r
++T;    4.。1.\u200D򳴢;      [C2 P1 V6 A4_2];        [P1 V6 A4_2]    #       4..1.\r
++N;    4.。1.\u200D򳴢;      [C2 P1 V6 A4_2];        [C2 P1 V6 A4_2] #       4..1.\r
++B;    4..1.xn--sf51d; [V6 A4_2];      [V6 A4_2]\r
++B;    4..1.xn--1ug64613i;     [C2 V6 A4_2];   [C2 V6 A4_2]    #       4..1.\r
++B;    xn--wsh.xn--tsh07994h;  [V6];   [V6]\r
++B;    xn--wsh.xn--1ug58o74922a;       [C2 V6];        [C2 V6] #       ⒋.⒈\r
++T;    \u0644ß。𐇽\u1A60򾅢𞤾;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لß.᩠𐇽𞤾\r
++N;    \u0644ß。𐇽\u1A60򾅢𞤾;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لß.᩠𐇽𞤾\r
++T;    \u0644ß。\u1A60𐇽򾅢𞤾;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لß.᩠𐇽𞤾\r
++N;    \u0644ß。\u1A60𐇽򾅢𞤾;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لß.᩠𐇽𞤾\r
++T;    \u0644ß。\u1A60𐇽򾅢𞤾;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لß.᩠𐇽𞤾\r
++N;    \u0644ß。\u1A60𐇽򾅢𞤾;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لß.᩠𐇽𞤾\r
++B;    \u0644SS。\u1A60𐇽򾅢𞤜;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لss.᩠𐇽𞤾\r
++B;    \u0644ss。\u1A60𐇽򾅢𞤾;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لss.᩠𐇽𞤾\r
++B;    \u0644Ss。\u1A60𐇽򾅢𞤜;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لss.᩠𐇽𞤾\r
++B;    xn--ss-svd.xn--jof2298hn83fln78f;       [B1 B2 B3 V5 V6];       [B1 B2 B3 V5 V6]        #       لss.᩠𐇽𞤾\r
++B;    xn--zca57y.xn--jof2298hn83fln78f;       [B1 B2 B3 V5 V6];       [B1 B2 B3 V5 V6]        #       لß.᩠𐇽𞤾\r
++B;    \u0644SS。\u1A60𐇽򾅢𞤜;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لss.᩠𐇽𞤾\r
++B;    \u0644ss。\u1A60𐇽򾅢𞤾;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لss.᩠𐇽𞤾\r
++B;    \u0644Ss。\u1A60𐇽򾅢𞤜;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لss.᩠𐇽𞤾\r
++B;    \u0644SS。𐇽\u1A60򾅢𞤜;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لss.᩠𐇽𞤾\r
++B;    \u0644ss。𐇽\u1A60򾅢𞤾;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لss.᩠𐇽𞤾\r
++B;    \u0644Ss。𐇽\u1A60򾅢𞤜;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لss.᩠𐇽𞤾\r
++B;    \u0644SS。\u1A60𐇽򾅢𞤾;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لss.᩠𐇽𞤾\r
++B;    \u0644Ss。\u1A60𐇽򾅢𞤾;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لss.᩠𐇽𞤾\r
++B;    \u0644SS。\u1A60𐇽򾅢𞤾;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لss.᩠𐇽𞤾\r
++B;    \u0644Ss。\u1A60𐇽򾅢𞤾;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لss.᩠𐇽𞤾\r
++B;    \u0644SS。𐇽\u1A60򾅢𞤾;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لss.᩠𐇽𞤾\r
++B;    \u0644Ss。𐇽\u1A60򾅢𞤾;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       لss.᩠𐇽𞤾\r
++B;    𐹽𑄳񼜲.\u1DDF\u17B8\uA806𑜫;    [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       𐹽𑄳.ᷟី꠆𑜫\r
++B;    xn--1o0di0c0652w.xn--33e362arr1l153d;   [B1 B3 B6 V5 V6];       [B1 B3 B6 V5 V6]        #       𐹽𑄳.ᷟី꠆𑜫\r
++T;    Ⴓ𑜫\u200D򗭓.\u06A7𑰶; [P1 V6];        [P1 V6] #       Ⴓ𑜫.ڧ𑰶\r
++N;    Ⴓ𑜫\u200D򗭓.\u06A7𑰶; [P1 V6];        [P1 V6] #       Ⴓ𑜫.ڧ𑰶\r
++T;    Ⴓ𑜫\u200D򗭓.\u06A7𑰶;   [P1 V6];        [P1 V6] #       Ⴓ𑜫.ڧ𑰶\r
++N;    Ⴓ𑜫\u200D򗭓.\u06A7𑰶;   [P1 V6];        [P1 V6] #       Ⴓ𑜫.ڧ𑰶\r
++T;    ⴓ𑜫\u200D򗭓.\u06A7𑰶;   [P1 V6];        [P1 V6] #       ⴓ𑜫.ڧ𑰶\r
++N;    ⴓ𑜫\u200D򗭓.\u06A7𑰶;   [P1 V6];        [P1 V6] #       ⴓ𑜫.ڧ𑰶\r
++B;    xn--blj6306ey091d.xn--9jb4223l; [V6];   [V6]    #       ⴓ𑜫.ڧ𑰶\r
++B;    xn--1ugy52cym7p7xu5e.xn--9jb4223l;      [V6];   [V6]    #       ⴓ𑜫.ڧ𑰶\r
++B;    xn--rnd8945ky009c.xn--9jb4223l; [V6];   [V6]    #       Ⴓ𑜫.ڧ𑰶\r
++B;    xn--rnd479ep20q7x12e.xn--9jb4223l;      [V6];   [V6]    #       Ⴓ𑜫.ڧ𑰶\r
++T;    ⴓ𑜫\u200D򗭓.\u06A7𑰶; [P1 V6];        [P1 V6] #       ⴓ𑜫.ڧ𑰶\r
++N;    ⴓ𑜫\u200D򗭓.\u06A7𑰶; [P1 V6];        [P1 V6] #       ⴓ𑜫.ڧ𑰶\r
++B;    𐨿.🄆—;   [P1 V5 V6];     [P1 V5 V6]\r
++B;    𐨿.5,—;     [P1 V5 V6];     [P1 V5 V6]\r
++B;    xn--0s9c.xn--5,-81t;    [P1 V5 V6];     [P1 V5 V6]\r
++B;    xn--0s9c.xn--8ug8324p;  [V5 V6];        [V5 V6]\r
++B;    򔊱񁦮۸。󠾭-;     [P1 V3 V6];     [P1 V3 V6]\r
++B;    xn--lmb18944c0g2z.xn----2k81m;  [V3 V6];        [V3 V6]\r
++B;    𼗸\u07CD𐹮。\u06DDᡎᠴ;  [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       ߍ𐹮.ᡎᠴ\r
++B;    xn--osb0855kcc2r.xn--tlb299fhc; [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       ߍ𐹮.ᡎᠴ\r
++T;    \u200DᠮႾ🄂.🚗\u0841𮹌\u200C;  [B1 C1 C2 P1 V6];       [B1 P1 V6]      #       ᠮႾ🄂.🚗ࡁ\r
++N;    \u200DᠮႾ🄂.🚗\u0841𮹌\u200C;  [B1 C1 C2 P1 V6];       [B1 C1 C2 P1 V6]        #       ᠮႾ🄂.🚗ࡁ\r
++T;    \u200DᠮႾ1,.🚗\u0841𮹌\u200C;    [B1 C1 C2 P1 V6];       [B1 B6 P1 V6]   #       ᠮႾ1,.🚗ࡁ\r
++N;    \u200DᠮႾ1,.🚗\u0841𮹌\u200C;    [B1 C1 C2 P1 V6];       [B1 C1 C2 P1 V6]        #       ᠮႾ1,.🚗ࡁ\r
++T;    \u200Dᠮⴞ1,.🚗\u0841𮹌\u200C;    [B1 C1 C2 P1 V6];       [B1 B6 P1 V6]   #       ᠮⴞ1,.🚗ࡁ\r
++N;    \u200Dᠮⴞ1,.🚗\u0841𮹌\u200C;    [B1 C1 C2 P1 V6];       [B1 C1 C2 P1 V6]        #       ᠮⴞ1,.🚗ࡁ\r
++B;    xn--1,-v3o625k.xn--zvb3124wpkpf;        [B1 B6 P1 V6];  [B1 B6 P1 V6]   #       ᠮⴞ1,.🚗ࡁ\r
++B;    xn--1,-v3o161c53q.xn--zvb692j9664aic1g; [B1 C1 C2 P1 V6];       [B1 C1 C2 P1 V6]        #       ᠮⴞ1,.🚗ࡁ\r
++B;    xn--1,-ogkx89c.xn--zvb3124wpkpf;        [B1 B6 P1 V6];  [B1 B6 P1 V6]   #       ᠮႾ1,.🚗ࡁ\r
++B;    xn--1,-ogkx89c39j.xn--zvb692j9664aic1g; [B1 C1 C2 P1 V6];       [B1 C1 C2 P1 V6]        #       ᠮႾ1,.🚗ࡁ\r
++T;    \u200Dᠮⴞ🄂.🚗\u0841𮹌\u200C;  [B1 C1 C2 P1 V6];       [B1 P1 V6]      #       ᠮⴞ🄂.🚗ࡁ\r
++N;    \u200Dᠮⴞ🄂.🚗\u0841𮹌\u200C;  [B1 C1 C2 P1 V6];       [B1 C1 C2 P1 V6]        #       ᠮⴞ🄂.🚗ࡁ\r
++B;    xn--h7e438h1p44a.xn--zvb3124wpkpf;      [B1 V6];        [B1 V6] #       ᠮⴞ🄂.🚗ࡁ\r
++B;    xn--h7e341b0wlbv45b.xn--zvb692j9664aic1g;       [B1 C1 C2 V6];  [B1 C1 C2 V6]   #       ᠮⴞ🄂.🚗ࡁ\r
++B;    xn--2nd129ai554b.xn--zvb3124wpkpf;      [B1 V6];        [B1 V6] #       ᠮႾ🄂.🚗ࡁ\r
++B;    xn--2nd129ay2gnw71c.xn--zvb692j9664aic1g;       [B1 C1 C2 V6];  [B1 C1 C2 V6]   #       ᠮႾ🄂.🚗ࡁ\r
++B;    \u0601\u0697.𑚶񼡷⾆;     [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ڗ.𑚶舌\r
++B;    \u0601\u0697.𑚶񼡷舌;       [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ڗ.𑚶舌\r
++B;    xn--jfb41a.xn--tc1ap851axo39c;  [B1 V5 V6];     [B1 V5 V6]      #       ڗ.𑚶舌\r
++B;    🞅󠳡󜍙.񲖷;      [P1 V6];        [P1 V6]\r
++B;    xn--ie9hi1349bqdlb.xn--oj69a;   [V6];   [V6]\r
++T;    \u20E7񯡎-򫣝.4Ⴄ\u200C;     [C1 P1 V5 V6];  [P1 V5 V6]      #       ⃧-.4Ⴄ\r
++N;    \u20E7񯡎-򫣝.4Ⴄ\u200C;     [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ⃧-.4Ⴄ\r
++T;    \u20E7񯡎-򫣝.4ⴄ\u200C;     [C1 P1 V5 V6];  [P1 V5 V6]      #       ⃧-.4ⴄ\r
++N;    \u20E7񯡎-򫣝.4ⴄ\u200C;     [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ⃧-.4ⴄ\r
++B;    xn----9snu5320fi76w.xn--4-ivs;  [V5 V6];        [V5 V6] #       ⃧-.4ⴄ\r
++B;    xn----9snu5320fi76w.xn--4-sgn589c;      [C1 V5 V6];     [C1 V5 V6]      #       ⃧-.4ⴄ\r
++B;    xn----9snu5320fi76w.xn--4-f0g;  [V5 V6];        [V5 V6] #       ⃧-.4Ⴄ\r
++B;    xn----9snu5320fi76w.xn--4-f0g649i;      [C1 V5 V6];     [C1 V5 V6]      #       ⃧-.4Ⴄ\r
++T;    ᚭ。𝌠ß𖫱;       ᚭ.𝌠ß𖫱; xn--hwe.xn--ss-ci1ub261a;       NV8\r
++N;    ᚭ。𝌠ß𖫱;       ᚭ.𝌠ß𖫱; xn--hwe.xn--zca4946pblnc;       NV8\r
++T;    ᚭ。𝌠ß𖫱;       ᚭ.𝌠ß𖫱; xn--hwe.xn--ss-ci1ub261a;       NV8\r
++N;    ᚭ。𝌠ß𖫱;       ᚭ.𝌠ß𖫱; xn--hwe.xn--zca4946pblnc;       NV8\r
++B;    ᚭ。𝌠SS𖫱;       ᚭ.𝌠ss𖫱; xn--hwe.xn--ss-ci1ub261a;       NV8\r
++B;    ᚭ。𝌠ss𖫱;       ᚭ.𝌠ss𖫱; xn--hwe.xn--ss-ci1ub261a;       NV8\r
++B;    ᚭ。𝌠Ss𖫱;       ᚭ.𝌠ss𖫱; xn--hwe.xn--ss-ci1ub261a;       NV8\r
++B;    xn--hwe.xn--ss-ci1ub261a;       ᚭ.𝌠ss𖫱; xn--hwe.xn--ss-ci1ub261a;       NV8\r
++B;    ᚭ.𝌠ss𖫱; ;       xn--hwe.xn--ss-ci1ub261a;       NV8\r
++B;    ᚭ.𝌠SS𖫱; ᚭ.𝌠ss𖫱; xn--hwe.xn--ss-ci1ub261a;       NV8\r
++B;    ᚭ.𝌠Ss𖫱; ᚭ.𝌠ss𖫱; xn--hwe.xn--ss-ci1ub261a;       NV8\r
++B;    xn--hwe.xn--zca4946pblnc;       ᚭ.𝌠ß𖫱; xn--hwe.xn--zca4946pblnc;       NV8\r
++T;    ᚭ.𝌠ß𖫱; ;       xn--hwe.xn--ss-ci1ub261a;       NV8\r
++N;    ᚭ.𝌠ß𖫱; ;       xn--hwe.xn--zca4946pblnc;       NV8\r
++B;    ᚭ。𝌠SS𖫱;       ᚭ.𝌠ss𖫱; xn--hwe.xn--ss-ci1ub261a;       NV8\r
++B;    ᚭ。𝌠ss𖫱;       ᚭ.𝌠ss𖫱; xn--hwe.xn--ss-ci1ub261a;       NV8\r
++B;    ᚭ。𝌠Ss𖫱;       ᚭ.𝌠ss𖫱; xn--hwe.xn--ss-ci1ub261a;       NV8\r
++B;    ₁。𞤫ꡪ;  [B1 B2 B3];     [B1 B2 B3]\r
++B;    1。𞤫ꡪ;    [B1 B2 B3];     [B1 B2 B3]\r
++B;    1。𞤉ꡪ;    [B1 B2 B3];     [B1 B2 B3]\r
++B;    1.xn--gd9al691d;        [B1 B2 B3];     [B1 B2 B3]\r
++B;    ₁。𞤉ꡪ;  [B1 B2 B3];     [B1 B2 B3]\r
++T;    𯻼\u200C.𞶞򻙤񥘇;        [B2 B3 B6 C1 P1 V6];    [B2 B3 P1 V6]   #       .\r
++N;    𯻼\u200C.𞶞򻙤񥘇;        [B2 B3 B6 C1 P1 V6];    [B2 B3 B6 C1 P1 V6]     #       .\r
++B;    xn--kg4n.xn--2b7hs861pl540a;    [B2 B3 V6];     [B2 B3 V6]\r
++B;    xn--0ug27500a.xn--2b7hs861pl540a;       [B2 B3 B6 C1 V6];       [B2 B3 B6 C1 V6]        #       .\r
++B;    𑑄≯。𑜤; [P1 V5 V6];     [P1 V5 V6]\r
++B;    𑑄>\u0338。𑜤;     [P1 V5 V6];     [P1 V5 V6]\r
++B;    𑑄≯。𑜤; [P1 V5 V6];     [P1 V5 V6]\r
++B;    𑑄>\u0338。𑜤;     [P1 V5 V6];     [P1 V5 V6]\r
++B;    xn--hdh5636g.xn--ci2d;  [V5 V6];        [V5 V6]\r
++T;    Ⴋ≮𱲆。\u200D\u07A7𐋣;  [C2 P1 V6];     [P1 V5 V6]      #       Ⴋ≮.ާ𐋣\r
++N;    Ⴋ≮𱲆。\u200D\u07A7𐋣;  [C2 P1 V6];     [C2 P1 V6]      #       Ⴋ≮.ާ𐋣\r
++T;    Ⴋ<\u0338𱲆。\u200D\u07A7𐋣;      [C2 P1 V6];     [P1 V5 V6]      #       Ⴋ≮.ާ𐋣\r
++N;    Ⴋ<\u0338𱲆。\u200D\u07A7𐋣;      [C2 P1 V6];     [C2 P1 V6]      #       Ⴋ≮.ާ𐋣\r
++T;    ⴋ<\u0338𱲆。\u200D\u07A7𐋣;      [C2 P1 V6];     [P1 V5 V6]      #       ⴋ≮.ާ𐋣\r
++N;    ⴋ<\u0338𱲆。\u200D\u07A7𐋣;      [C2 P1 V6];     [C2 P1 V6]      #       ⴋ≮.ާ𐋣\r
++T;    ⴋ≮𱲆。\u200D\u07A7𐋣;  [C2 P1 V6];     [P1 V5 V6]      #       ⴋ≮.ާ𐋣\r
++N;    ⴋ≮𱲆。\u200D\u07A7𐋣;  [C2 P1 V6];     [C2 P1 V6]      #       ⴋ≮.ާ𐋣\r
++B;    xn--gdhz03bxt42d.xn--lrb6479j;  [V5 V6];        [V5 V6] #       ⴋ≮.ާ𐋣\r
++B;    xn--gdhz03bxt42d.xn--lrb506jqr4n;       [C2 V6];        [C2 V6] #       ⴋ≮.ާ𐋣\r
++B;    xn--jnd802gsm17c.xn--lrb6479j;  [V5 V6];        [V5 V6] #       Ⴋ≮.ާ𐋣\r
++B;    xn--jnd802gsm17c.xn--lrb506jqr4n;       [C2 V6];        [C2 V6] #       Ⴋ≮.ާ𐋣\r
++B;    \u17D2.򆽒≯; [P1 V5 V6];     [P1 V5 V6]      #       ្.≯\r
++B;    \u17D2.򆽒>\u0338;     [P1 V5 V6];     [P1 V5 V6]      #       ្.≯\r
++B;    xn--u4e.xn--hdhx0084f;  [V5 V6];        [V5 V6] #       ្.≯\r
++B;    񏁇\u1734.𐨺É⬓𑄴;     [P1 V5 V6];     [P1 V5 V6]      #       ᜴.𐨺é⬓𑄴\r
++B;    񏁇\u1734.𐨺E\u0301⬓𑄴;        [P1 V5 V6];     [P1 V5 V6]      #       ᜴.𐨺é⬓𑄴\r
++B;    񏁇\u1734.𐨺É⬓𑄴;       [P1 V5 V6];     [P1 V5 V6]      #       ᜴.𐨺é⬓𑄴\r
++B;    񏁇\u1734.𐨺E\u0301⬓𑄴;  [P1 V5 V6];     [P1 V5 V6]      #       ᜴.𐨺é⬓𑄴\r
++B;    񏁇\u1734.𐨺e\u0301⬓𑄴;  [P1 V5 V6];     [P1 V5 V6]      #       ᜴.𐨺é⬓𑄴\r
++B;    񏁇\u1734.𐨺é⬓𑄴;       [P1 V5 V6];     [P1 V5 V6]      #       ᜴.𐨺é⬓𑄴\r
++B;    xn--c0e34564d.xn--9ca207st53lg3f;       [V5 V6];        [V5 V6] #       ᜴.𐨺é⬓𑄴\r
++B;    񏁇\u1734.𐨺e\u0301⬓𑄴;        [P1 V5 V6];     [P1 V5 V6]      #       ᜴.𐨺é⬓𑄴\r
++B;    񏁇\u1734.𐨺é⬓𑄴;     [P1 V5 V6];     [P1 V5 V6]      #       ᜴.𐨺é⬓𑄴\r
++T;    ᢇ\u200D\uA8C4。︒𞤺;      [B1 B6 C2 P1 V6];       [B1 P1 V6]      #       ᢇ꣄.︒𞤺\r
++N;    ᢇ\u200D\uA8C4。︒𞤺;      [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       ᢇ꣄.︒𞤺\r
++T;    ᢇ\u200D\uA8C4。。𞤺;      [B6 C2 A4_2];   [A4_2]  #       ᢇ꣄..𞤺\r
++N;    ᢇ\u200D\uA8C4。。𞤺;      [B6 C2 A4_2];   [B6 C2 A4_2]    #       ᢇ꣄..𞤺\r
++T;    ᢇ\u200D\uA8C4。。𞤘;      [B6 C2 A4_2];   [A4_2]  #       ᢇ꣄..𞤺\r
++N;    ᢇ\u200D\uA8C4。。𞤘;      [B6 C2 A4_2];   [B6 C2 A4_2]    #       ᢇ꣄..𞤺\r
++B;    xn--09e4694e..xn--ye6h; [A4_2]; [A4_2]  #       ᢇ꣄..𞤺\r
++B;    xn--09e669a6x8j..xn--ye6h;      [B6 C2 A4_2];   [B6 C2 A4_2]    #       ᢇ꣄..𞤺\r
++T;    ᢇ\u200D\uA8C4。︒𞤘;      [B1 B6 C2 P1 V6];       [B1 P1 V6]      #       ᢇ꣄.︒𞤺\r
++N;    ᢇ\u200D\uA8C4。︒𞤘;      [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       ᢇ꣄.︒𞤺\r
++B;    xn--09e4694e.xn--y86cv562b;     [B1 V6];        [B1 V6] #       ᢇ꣄.︒𞤺\r
++B;    xn--09e669a6x8j.xn--y86cv562b;  [B1 B6 C2 V6];  [B1 B6 C2 V6]   #       ᢇ꣄.︒𞤺\r
++T;    𞩬򖙱\u1714\u200C。\u0631\u07AA≮; [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ᜔.رު≮\r
++N;    𞩬򖙱\u1714\u200C。\u0631\u07AA≮; [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ᜔.رު≮\r
++T;    𞩬򖙱\u1714\u200C。\u0631\u07AA<\u0338;     [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ᜔.رު≮\r
++N;    𞩬򖙱\u1714\u200C。\u0631\u07AA<\u0338;     [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ᜔.رު≮\r
++T;    𞩬򖙱\u1714\u200C。\u0631\u07AA≮; [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ᜔.رު≮\r
++N;    𞩬򖙱\u1714\u200C。\u0631\u07AA≮; [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ᜔.رު≮\r
++T;    𞩬򖙱\u1714\u200C。\u0631\u07AA<\u0338;     [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ᜔.رު≮\r
++N;    𞩬򖙱\u1714\u200C。\u0631\u07AA<\u0338;     [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ᜔.رު≮\r
++B;    xn--fze3930v7hz6b.xn--wgb86el10d;       [B2 B3 V6];     [B2 B3 V6]      #       ᜔.رު≮\r
++B;    xn--fze607b9651bjwl7c.xn--wgb86el10d;   [B2 B3 V6];     [B2 B3 V6]      #       ᜔.رު≮\r
++B;    Ⴣ.\u0653ᢤ;        [P1 V5 V6];     [P1 V5 V6]      #       Ⴣ.ٓᢤ\r
++B;    Ⴣ.\u0653ᢤ;  [P1 V5 V6];     [P1 V5 V6]      #       Ⴣ.ٓᢤ\r
++B;    ⴣ.\u0653ᢤ;  [V5];   [V5]    #       ⴣ.ٓᢤ\r
++B;    xn--rlj.xn--vhb294g;    [V5];   [V5]    #       ⴣ.ٓᢤ\r
++B;    xn--7nd.xn--vhb294g;    [V5 V6];        [V5 V6] #       Ⴣ.ٓᢤ\r
++B;    ⴣ.\u0653ᢤ;        [V5];   [V5]    #       ⴣ.ٓᢤ\r
++B;    󠄈\u0813.싉򄆻Ⴤ򂡐;    [P1 V6];        [P1 V6] #       ࠓ.싉Ⴤ\r
++B;    󠄈\u0813.싉򄆻Ⴤ򂡐;      [P1 V6];        [P1 V6] #       ࠓ.싉Ⴤ\r
++B;    󠄈\u0813.싉򄆻Ⴤ򂡐;      [P1 V6];        [P1 V6] #       ࠓ.싉Ⴤ\r
++B;    󠄈\u0813.싉򄆻Ⴤ򂡐;        [P1 V6];        [P1 V6] #       ࠓ.싉Ⴤ\r
++B;    󠄈\u0813.싉򄆻ⴤ򂡐;        [P1 V6];        [P1 V6] #       ࠓ.싉ⴤ\r
++B;    󠄈\u0813.싉򄆻ⴤ򂡐;      [P1 V6];        [P1 V6] #       ࠓ.싉ⴤ\r
++B;    xn--oub.xn--sljz109bpe25dviva;  [V6];   [V6]    #       ࠓ.싉ⴤ\r
++B;    xn--oub.xn--8nd9522gpe69cviva;  [V6];   [V6]    #       ࠓ.싉Ⴤ\r
++B;    󠄈\u0813.싉򄆻ⴤ򂡐;      [P1 V6];        [P1 V6] #       ࠓ.싉ⴤ\r
++B;    󠄈\u0813.싉򄆻ⴤ򂡐;    [P1 V6];        [P1 V6] #       ࠓ.싉ⴤ\r
++B;    \uAA2C𑲫≮.⤂;    [P1 V5 V6];     [P1 V5 V6]      #       ꨬ𑲫≮.⤂\r
++B;    \uAA2C𑲫<\u0338.⤂;        [P1 V5 V6];     [P1 V5 V6]      #       ꨬ𑲫≮.⤂\r
++B;    \uAA2C𑲫≮.⤂;      [P1 V5 V6];     [P1 V5 V6]      #       ꨬ𑲫≮.⤂\r
++B;    \uAA2C𑲫<\u0338.⤂;  [P1 V5 V6];     [P1 V5 V6]      #       ꨬ𑲫≮.⤂\r
++B;    xn--gdh1854cn19c.xn--kqi;       [V5 V6];        [V5 V6] #       ꨬ𑲫≮.⤂\r
++B;    \u0604𐩔≮Ⴢ.Ⴃ; [B1 P1 V6];     [B1 P1 V6]      #       𐩔≮Ⴢ.Ⴃ\r
++B;    \u0604𐩔<\u0338Ⴢ.Ⴃ;     [B1 P1 V6];     [B1 P1 V6]      #       𐩔≮Ⴢ.Ⴃ\r
++B;    \u0604𐩔≮Ⴢ.Ⴃ;   [B1 P1 V6];     [B1 P1 V6]      #       𐩔≮Ⴢ.Ⴃ\r
++B;    \u0604𐩔<\u0338Ⴢ.Ⴃ;       [B1 P1 V6];     [B1 P1 V6]      #       𐩔≮Ⴢ.Ⴃ\r
++B;    \u0604𐩔<\u0338ⴢ.ⴃ;       [B1 P1 V6];     [B1 P1 V6]      #       𐩔≮ⴢ.ⴃ\r
++B;    \u0604𐩔≮ⴢ.ⴃ;   [B1 P1 V6];     [B1 P1 V6]      #       𐩔≮ⴢ.ⴃ\r
++B;    \u0604𐩔≮Ⴢ.ⴃ;   [B1 P1 V6];     [B1 P1 V6]      #       𐩔≮Ⴢ.ⴃ\r
++B;    \u0604𐩔<\u0338Ⴢ.ⴃ;       [B1 P1 V6];     [B1 P1 V6]      #       𐩔≮Ⴢ.ⴃ\r
++B;    xn--mfb416c0jox02t.xn--ukj;     [B1 V6];        [B1 V6] #       𐩔≮Ⴢ.ⴃ\r
++B;    xn--mfb266l4khr54u.xn--ukj;     [B1 V6];        [B1 V6] #       𐩔≮ⴢ.ⴃ\r
++B;    xn--mfb416c0jox02t.xn--bnd;     [B1 V6];        [B1 V6] #       𐩔≮Ⴢ.Ⴃ\r
++B;    \u0604𐩔<\u0338ⴢ.ⴃ;     [B1 P1 V6];     [B1 P1 V6]      #       𐩔≮ⴢ.ⴃ\r
++B;    \u0604𐩔≮ⴢ.ⴃ; [B1 P1 V6];     [B1 P1 V6]      #       𐩔≮ⴢ.ⴃ\r
++B;    \u0604𐩔≮Ⴢ.ⴃ; [B1 P1 V6];     [B1 P1 V6]      #       𐩔≮Ⴢ.ⴃ\r
++B;    \u0604𐩔<\u0338Ⴢ.ⴃ;     [B1 P1 V6];     [B1 P1 V6]      #       𐩔≮Ⴢ.ⴃ\r
++B;    𑁅。-;       [V3 V5];        [V3 V5]\r
++B;    xn--210d.-;     [V3 V5];        [V3 V5]\r
++B;    \u0DCA򕸽󠧱。饈≠\u0664;  [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ්.饈≠٤\r
++B;    \u0DCA򕸽󠧱。饈=\u0338\u0664;      [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ්.饈≠٤\r
++B;    \u0DCA򕸽󠧱。饈≠\u0664;  [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ්.饈≠٤\r
++B;    \u0DCA򕸽󠧱。饈=\u0338\u0664;      [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ්.饈≠٤\r
++B;    xn--h1c25913jfwov.xn--dib144ler5f;      [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       ්.饈≠٤\r
++B;    𞥃ᠠ⁷。≯邅⬻4;        [B1 B2 P1 V6];  [B1 B2 P1 V6]\r
++B;    𞥃ᠠ⁷。>\u0338邅⬻4;    [B1 B2 P1 V6];  [B1 B2 P1 V6]\r
++B;    𞥃ᠠ7。≯邅⬻4;  [B1 B2 P1 V6];  [B1 B2 P1 V6]\r
++B;    𞥃ᠠ7。>\u0338邅⬻4;      [B1 B2 P1 V6];  [B1 B2 P1 V6]\r
++B;    𞤡ᠠ7。>\u0338邅⬻4;      [B1 B2 P1 V6];  [B1 B2 P1 V6]\r
++B;    𞤡ᠠ7。≯邅⬻4;  [B1 B2 P1 V6];  [B1 B2 P1 V6]\r
++B;    xn--7-v4j2826w.xn--4-ogoy01bou3i;       [B1 B2 V6];     [B1 B2 V6]\r
++B;    𞤡ᠠ⁷。>\u0338邅⬻4;    [B1 B2 P1 V6];  [B1 B2 P1 V6]\r
++B;    𞤡ᠠ⁷。≯邅⬻4;        [B1 B2 P1 V6];  [B1 B2 P1 V6]\r
++B;    򠿯ᡳ-𑐻.𐹴𐋫\u0605󑎳;        [B1 B6 P1 V6];  [B1 B6 P1 V6]   #       ᡳ-𑐻.𐹴𐋫\r
++B;    xn----m9j3429kxmy7e.xn--nfb7950kdihrp812a;      [B1 B6 V6];     [B1 B6 V6]      #       ᡳ-𑐻.𐹴𐋫\r
++B;    򠶆\u0845\u0A51.넨-󶧈;      [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ࡅੑ.넨-\r
++B;    򠶆\u0845\u0A51.넨-󶧈;        [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ࡅੑ.넨-\r
++B;    xn--3vb26hb6834b.xn----i37ez0957g;      [B5 B6 V6];     [B5 B6 V6]      #       ࡅੑ.넨-\r
++T;    ꡦᡑ\u200D⒈。𐋣-;        [C2 P1 V3 V6];  [P1 V3 V6]      #       ꡦᡑ⒈.𐋣-\r
++N;    ꡦᡑ\u200D⒈。𐋣-;        [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       ꡦᡑ⒈.𐋣-\r
++T;    ꡦᡑ\u200D1.。𐋣-; [C2 V3 A4_2];   [V3 A4_2]       #       ꡦᡑ1..𐋣-\r
++N;    ꡦᡑ\u200D1.。𐋣-; [C2 V3 A4_2];   [C2 V3 A4_2]    #       ꡦᡑ1..𐋣-\r
++B;    xn--1-o7j0610f..xn----381i;     [V3 A4_2];      [V3 A4_2]\r
++B;    xn--1-o7j663bdl7m..xn----381i;  [C2 V3 A4_2];   [C2 V3 A4_2]    #       ꡦᡑ1..𐋣-\r
++B;    xn--h8e863drj7h.xn----381i;     [V3 V6];        [V3 V6]\r
++B;    xn--h8e470bl0d838o.xn----381i;  [C2 V3 V6];     [C2 V3 V6]      #       ꡦᡑ⒈.𐋣-\r
++B;    Ⴌ。􍼠\uFB69;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴌ.ٹ\r
++B;    Ⴌ。􍼠\u0679;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴌ.ٹ\r
++B;    ⴌ。􍼠\u0679;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ⴌ.ٹ\r
++B;    xn--3kj.xn--yib19191t;  [B5 B6 V6];     [B5 B6 V6]      #       ⴌ.ٹ\r
++B;    xn--knd.xn--yib19191t;  [B5 B6 V6];     [B5 B6 V6]      #       Ⴌ.ٹ\r
++B;    ⴌ。􍼠\uFB69;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ⴌ.ٹ\r
++B;    𐮁𐭱.\u0F84\u135E-\u1CFA;   [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𐮁𐭱.྄፞-\r
++B;    xn--r19c5a.xn----xjg270ag3m;    [B1 V5 V6];     [B1 V5 V6]      #       𐮁𐭱.྄፞-\r
++T;    ⒈䰹\u200D-。웈;    [C2 P1 V3 V6];  [P1 V3 V6]      #       ⒈䰹-.웈\r
++N;    ⒈䰹\u200D-。웈;    [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       ⒈䰹-.웈\r
++T;    ⒈䰹\u200D-。웈;      [C2 P1 V3 V6];  [P1 V3 V6]      #       ⒈䰹-.웈\r
++N;    ⒈䰹\u200D-。웈;      [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       ⒈䰹-.웈\r
++T;    1.䰹\u200D-。웈;     [C2 V3];        [V3]    #       1.䰹-.웈\r
++N;    1.䰹\u200D-。웈;     [C2 V3];        [C2 V3] #       1.䰹-.웈\r
++T;    1.䰹\u200D-。웈;       [C2 V3];        [V3]    #       1.䰹-.웈\r
++N;    1.䰹\u200D-。웈;       [C2 V3];        [C2 V3] #       1.䰹-.웈\r
++B;    1.xn----zw5a.xn--kp5b;  [V3];   [V3]\r
++B;    1.xn----tgnz80r.xn--kp5b;       [C2 V3];        [C2 V3] #       1.䰹-.웈\r
++B;    xn----dcp160o.xn--kp5b; [V3 V6];        [V3 V6]\r
++B;    xn----tgnx5rjr6c.xn--kp5b;      [C2 V3 V6];     [C2 V3 V6]      #       ⒈䰹-.웈\r
++T;    て。\u200C󠳽\u07F3; [C1 P1 V6];     [P1 V6] #       て.߳\r
++N;    て。\u200C󠳽\u07F3; [C1 P1 V6];     [C1 P1 V6]      #       て.߳\r
++B;    xn--m9j.xn--rtb10784p;  [V6];   [V6]    #       て.߳\r
++B;    xn--m9j.xn--rtb154j9l73w;       [C1 V6];        [C1 V6] #       て.߳\r
++T;    ς。\uA9C0\u06E7;      [V5];   [V5]    #       ς.꧀ۧ\r
++N;    ς。\uA9C0\u06E7;      [V5];   [V5]    #       ς.꧀ۧ\r
++T;    ς。\uA9C0\u06E7;      [V5];   [V5]    #       ς.꧀ۧ\r
++N;    ς。\uA9C0\u06E7;      [V5];   [V5]    #       ς.꧀ۧ\r
++B;    Σ。\uA9C0\u06E7;      [V5];   [V5]    #       σ.꧀ۧ\r
++B;    σ。\uA9C0\u06E7;      [V5];   [V5]    #       σ.꧀ۧ\r
++B;    xn--4xa.xn--3lb1944f;   [V5];   [V5]    #       σ.꧀ۧ\r
++B;    xn--3xa.xn--3lb1944f;   [V5];   [V5]    #       ς.꧀ۧ\r
++B;    Σ。\uA9C0\u06E7;      [V5];   [V5]    #       σ.꧀ۧ\r
++B;    σ。\uA9C0\u06E7;      [V5];   [V5]    #       σ.꧀ۧ\r
++B;    \u0BCD󥫅򌉑.ႢႵ;  [P1 V5 V6];     [P1 V5 V6]      #       ்.ႢႵ\r
++B;    \u0BCD󥫅򌉑.ⴂⴕ;  [P1 V5 V6];     [P1 V5 V6]      #       ்.ⴂⴕ\r
++B;    \u0BCD󥫅򌉑.Ⴂⴕ;  [P1 V5 V6];     [P1 V5 V6]      #       ்.Ⴂⴕ\r
++B;    xn--xmc83135idcxza.xn--9md086l; [V5 V6];        [V5 V6] #       ்.Ⴂⴕ\r
++B;    xn--xmc83135idcxza.xn--tkjwb;   [V5 V6];        [V5 V6] #       ்.ⴂⴕ\r
++B;    xn--xmc83135idcxza.xn--9md2b;   [V5 V6];        [V5 V6] #       ்.ႢႵ\r
++T;    \u1C32🄈⾛\u05A6.\u200D򯥤\u07FD; [B1 C2 P1 V5 V6];       [B1 B5 B6 P1 V5 V6]     #       ᰲ🄈走֦.\r
++N;    \u1C32🄈⾛\u05A6.\u200D򯥤\u07FD; [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       ᰲ🄈走֦.\r
++T;    \u1C327,走\u05A6.\u200D򯥤\u07FD;     [B1 C2 P1 V5 V6];       [B1 B5 B6 P1 V5 V6]     #       ᰲ7,走֦.\r
++N;    \u1C327,走\u05A6.\u200D򯥤\u07FD;     [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       ᰲ7,走֦.\r
++B;    xn--7,-bid991urn3k.xn--1tb13454l;       [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ᰲ7,走֦.\r
++B;    xn--7,-bid991urn3k.xn--1tb334j1197q;    [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       ᰲ7,走֦.\r
++B;    xn--xcb756i493fwi5o.xn--1tb13454l;      [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       ᰲ🄈走֦.\r
++B;    xn--xcb756i493fwi5o.xn--1tb334j1197q;   [B1 C2 V5 V6];  [B1 C2 V5 V6]   #       ᰲ🄈走֦.\r
++B;    ᢗ。Ӏ񝄻;   [P1 V6];        [P1 V6]\r
++B;    ᢗ。Ӏ񝄻;   [P1 V6];        [P1 V6]\r
++B;    ᢗ。ӏ񝄻;   [P1 V6];        [P1 V6]\r
++B;    xn--hbf.xn--s5a83117e;  [V6];   [V6]\r
++B;    xn--hbf.xn--d5a86117e;  [V6];   [V6]\r
++B;    ᢗ。ӏ񝄻;   [P1 V6];        [P1 V6]\r
++B;    \u0668-。񠏇🝆ᄾ;  [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ٨-.🝆ᄾ\r
++B;    xn----oqc.xn--qrd1699v327w;     [B1 V3 V6];     [B1 V3 V6]      #       ٨-.🝆ᄾ\r
++B;    -𐋷𖾑。󠆬;       [V3];   [V3]\r
++B;    xn----991iq40y.;        [V3];   [V3]\r
++T;    \u200C𐹳🐴멈.\uABED񐡼;   [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       𐹳🐴멈.꯭\r
++N;    \u200C𐹳🐴멈.\uABED񐡼;   [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       𐹳🐴멈.꯭\r
++T;    \u200C𐹳🐴멈.\uABED񐡼;     [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       𐹳🐴멈.꯭\r
++N;    \u200C𐹳🐴멈.\uABED񐡼;     [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       𐹳🐴멈.꯭\r
++B;    xn--422b325mqb6i.xn--429a8682s; [B1 V5 V6];     [B1 V5 V6]      #       𐹳🐴멈.꯭\r
++B;    xn--0ug6681d406b7bwk.xn--429a8682s;     [B1 C1 V5 V6];  [B1 C1 V5 V6]   #       𐹳🐴멈.꯭\r
++B;    ≮.\u0769\u0603;       [B1 P1 V6];     [B1 P1 V6]      #       ≮.ݩ\r
++B;    <\u0338.\u0769\u0603;   [B1 P1 V6];     [B1 P1 V6]      #       ≮.ݩ\r
++B;    xn--gdh.xn--lfb92e;     [B1 V6];        [B1 V6] #       ≮.ݩ\r
++T;    𐶭⾆。\u200C𑚶򟱃𞰘;   [B1 B2 B3 C1 P1 V6];    [B2 B3 B5 B6 P1 V5 V6]  #       舌.𑚶\r
++N;    𐶭⾆。\u200C𑚶򟱃𞰘;   [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       舌.𑚶\r
++T;    𐶭舌。\u200C𑚶򟱃𞰘;   [B1 B2 B3 C1 P1 V6];    [B2 B3 B5 B6 P1 V5 V6]  #       舌.𑚶\r
++N;    𐶭舌。\u200C𑚶򟱃𞰘;   [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       舌.𑚶\r
++B;    xn--tc1ao37z.xn--6e2dw557azds2d;        [B2 B3 B5 B6 V5 V6];    [B2 B3 B5 B6 V5 V6]\r
++B;    xn--tc1ao37z.xn--0ugx728gi1nfwqz2e;     [B1 B2 B3 C1 V6];       [B1 B2 B3 C1 V6]        #       舌.𑚶\r
++T;    \u200CჀ-.𝟷ς𞴺ς;        [B1 C1 P1 V3 V6];       [B1 B6 P1 V3 V6]        #       Ⴠ-.1ςς\r
++N;    \u200CჀ-.𝟷ς𞴺ς;        [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       Ⴠ-.1ςς\r
++T;    \u200CჀ-.1ς𞴺ς;   [B1 C1 P1 V3 V6];       [B1 B6 P1 V3 V6]        #       Ⴠ-.1ςς\r
++N;    \u200CჀ-.1ς𞴺ς;   [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       Ⴠ-.1ςς\r
++T;    \u200Cⴠ-.1ς𞴺ς;   [B1 C1 P1 V3 V6];       [B1 B6 P1 V3 V6]        #       ⴠ-.1ςς\r
++N;    \u200Cⴠ-.1ς𞴺ς;   [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       ⴠ-.1ςς\r
++T;    \u200CჀ-.1Σ𞴺Σ;   [B1 C1 P1 V3 V6];       [B1 B6 P1 V3 V6]        #       Ⴠ-.1σσ\r
++N;    \u200CჀ-.1Σ𞴺Σ;   [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       Ⴠ-.1σσ\r
++T;    \u200Cⴠ-.1σ𞴺σ;   [B1 C1 P1 V3 V6];       [B1 B6 P1 V3 V6]        #       ⴠ-.1σσ\r
++N;    \u200Cⴠ-.1σ𞴺σ;   [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       ⴠ-.1σσ\r
++B;    xn----2ws.xn--1-0mba52321c;     [B1 B6 V3 V6];  [B1 B6 V3 V6]\r
++B;    xn----rgn530d.xn--1-0mba52321c; [B1 C1 V3 V6];  [B1 C1 V3 V6]   #       ⴠ-.1σσ\r
++B;    xn----z1g.xn--1-0mba52321c;     [B1 B6 V3 V6];  [B1 B6 V3 V6]\r
++B;    xn----z1g168i.xn--1-0mba52321c; [B1 C1 V3 V6];  [B1 C1 V3 V6]   #       Ⴠ-.1σσ\r
++B;    xn----rgn530d.xn--1-ymba92321c; [B1 C1 V3 V6];  [B1 C1 V3 V6]   #       ⴠ-.1ςς\r
++B;    xn----z1g168i.xn--1-ymba92321c; [B1 C1 V3 V6];  [B1 C1 V3 V6]   #       Ⴠ-.1ςς\r
++T;    \u200Cⴠ-.𝟷ς𞴺ς;        [B1 C1 P1 V3 V6];       [B1 B6 P1 V3 V6]        #       ⴠ-.1ςς\r
++N;    \u200Cⴠ-.𝟷ς𞴺ς;        [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       ⴠ-.1ςς\r
++T;    \u200CჀ-.𝟷Σ𞴺Σ;        [B1 C1 P1 V3 V6];       [B1 B6 P1 V3 V6]        #       Ⴠ-.1σσ\r
++N;    \u200CჀ-.𝟷Σ𞴺Σ;        [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       Ⴠ-.1σσ\r
++T;    \u200Cⴠ-.𝟷σ𞴺σ;        [B1 C1 P1 V3 V6];       [B1 B6 P1 V3 V6]        #       ⴠ-.1σσ\r
++N;    \u200Cⴠ-.𝟷σ𞴺σ;        [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       ⴠ-.1σσ\r
++B;    𑲘󠄒𓑡。𝟪Ⴜ; [P1 V5 V6];     [P1 V5 V6]\r
++B;    𑲘󠄒𓑡。8Ⴜ;    [P1 V5 V6];     [P1 V5 V6]\r
++B;    𑲘󠄒𓑡。8ⴜ;    [P1 V5 V6];     [P1 V5 V6]\r
++B;    xn--7m3d291b.xn--8-vws; [V5 V6];        [V5 V6]\r
++B;    xn--7m3d291b.xn--8-s1g; [V5 V6];        [V5 V6]\r
++B;    𑲘󠄒𓑡。𝟪ⴜ; [P1 V5 V6];     [P1 V5 V6]\r
++B;    䪏\u06AB\u07E0\u0941。뭕ᢝ\u17B9;   [B5 B6];        [B5 B6] #       䪏ګߠु.뭕ᢝឹ\r
++B;    䪏\u06AB\u07E0\u0941。뭕ᢝ\u17B9;     [B5 B6];        [B5 B6] #       䪏ګߠु.뭕ᢝឹ\r
++B;    䪏\u06AB\u07E0\u0941。뭕ᢝ\u17B9;   [B5 B6];        [B5 B6] #       䪏ګߠु.뭕ᢝឹ\r
++B;    䪏\u06AB\u07E0\u0941。뭕ᢝ\u17B9;     [B5 B6];        [B5 B6] #       䪏ګߠु.뭕ᢝឹ\r
++B;    xn--ekb23dj4at01n.xn--43e96bh910b;      [B5 B6];        [B5 B6] #       䪏ګߠु.뭕ᢝឹ\r
++B;    \u1BAB。🂉󠁰;      [P1 V5 V6];     [P1 V5 V6]      #       ᮫.🂉\r
++B;    \u1BAB。🂉󠁰;      [P1 V5 V6];     [P1 V5 V6]      #       ᮫.🂉\r
++B;    xn--zxf.xn--fx7ho0250c; [V5 V6];        [V5 V6] #       ᮫.🂉\r
++T;    󩎃\u0AC4。ς\u200D𐹮𑈵;  [B5 C2 P1 V6];  [B5 P1 V6]      #       ૄ.ς𐹮𑈵\r
++N;    󩎃\u0AC4。ς\u200D𐹮𑈵;  [B5 C2 P1 V6];  [B5 C2 P1 V6]   #       ૄ.ς𐹮𑈵\r
++T;    󩎃\u0AC4。Σ\u200D𐹮𑈵;  [B5 C2 P1 V6];  [B5 P1 V6]      #       ૄ.σ𐹮𑈵\r
++N;    󩎃\u0AC4。Σ\u200D𐹮𑈵;  [B5 C2 P1 V6];  [B5 C2 P1 V6]   #       ૄ.σ𐹮𑈵\r
++T;    󩎃\u0AC4。σ\u200D𐹮𑈵;  [B5 C2 P1 V6];  [B5 P1 V6]      #       ૄ.σ𐹮𑈵\r
++N;    󩎃\u0AC4。σ\u200D𐹮𑈵;  [B5 C2 P1 V6];  [B5 C2 P1 V6]   #       ૄ.σ𐹮𑈵\r
++B;    xn--dfc53161q.xn--4xa8467k5mc;  [B5 V6];        [B5 V6] #       ૄ.σ𐹮𑈵\r
++B;    xn--dfc53161q.xn--4xa895lzo7nsfd;       [B5 C2 V6];     [B5 C2 V6]      #       ૄ.σ𐹮𑈵\r
++B;    xn--dfc53161q.xn--3xa006lzo7nsfd;       [B5 C2 V6];     [B5 C2 V6]      #       ૄ.ς𐹮𑈵\r
++B;    𐫀ᡂ𑜫.𑘿;     [B1 B2 B3 B6 V5];       [B1 B2 B3 B6 V5]\r
++B;    𐫀ᡂ𑜫.𑘿;       [B1 B2 B3 B6 V5];       [B1 B2 B3 B6 V5]\r
++B;    xn--17e9625js1h.xn--sb2d;       [B1 B2 B3 B6 V5];       [B1 B2 B3 B6 V5]\r
++T;    󬚶󸋖򖩰-。\u200C; [C1 P1 V3 V6];  [P1 V3 V6]      #       -.\r
++N;    󬚶󸋖򖩰-。\u200C; [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       -.\r
++B;    xn----7i12hu122k9ire.;  [V3 V6];        [V3 V6]\r
++B;    xn----7i12hu122k9ire.xn--0ug;   [C1 V3 V6];     [C1 V3 V6]      #       -.\r
++B;    𐹣.\u07C2;  [B1];   [B1]    #       𐹣.߂\r
++B;    𐹣.\u07C2;    [B1];   [B1]    #       𐹣.߂\r
++B;    xn--bo0d.xn--dsb;       [B1];   [B1]    #       𐹣.߂\r
++B;    -\u07E1。Ↄ;  [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ߡ.Ↄ\r
++B;    -\u07E1。Ↄ;  [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ߡ.Ↄ\r
++B;    -\u07E1。ↄ;  [B1 V3];        [B1 V3] #       -ߡ.ↄ\r
++B;    xn----8cd.xn--r5g;      [B1 V3];        [B1 V3] #       -ߡ.ↄ\r
++B;    xn----8cd.xn--q5g;      [B1 V3 V6];     [B1 V3 V6]      #       -ߡ.Ↄ\r
++B;    -\u07E1。ↄ;  [B1 V3];        [B1 V3] #       -ߡ.ↄ\r
++T;    \u200D-︒󠄄。ß哑\u200C𐵿;       [B1 B5 B6 C1 C2 P1 V6]; [B1 B5 B6 P1 V3 V6]     #       -︒.ß哑\r
++N;    \u200D-︒󠄄。ß哑\u200C𐵿;       [B1 B5 B6 C1 C2 P1 V6]; [B1 B5 B6 C1 C2 P1 V6]  #       -︒.ß哑\r
++T;    \u200D-。󠄄。ß哑\u200C𐵿;       [B1 B5 B6 C1 C2 P1 V3 V6 A4_2]; [B1 B5 B6 P1 V3 V6 A4_2]        #       -..ß哑\r
++N;    \u200D-。󠄄。ß哑\u200C𐵿;       [B1 B5 B6 C1 C2 P1 V3 V6 A4_2]; [B1 B5 B6 C1 C2 P1 V3 V6 A4_2]  #       -..ß哑\r
++T;    \u200D-。󠄄。SS哑\u200C𐵿;       [B1 B5 B6 C1 C2 P1 V3 V6 A4_2]; [B1 B5 B6 P1 V3 V6 A4_2]        #       -..ss哑\r
++N;    \u200D-。󠄄。SS哑\u200C𐵿;       [B1 B5 B6 C1 C2 P1 V3 V6 A4_2]; [B1 B5 B6 C1 C2 P1 V3 V6 A4_2]  #       -..ss哑\r
++T;    \u200D-。󠄄。ss哑\u200C𐵿;       [B1 B5 B6 C1 C2 P1 V3 V6 A4_2]; [B1 B5 B6 P1 V3 V6 A4_2]        #       -..ss哑\r
++N;    \u200D-。󠄄。ss哑\u200C𐵿;       [B1 B5 B6 C1 C2 P1 V3 V6 A4_2]; [B1 B5 B6 C1 C2 P1 V3 V6 A4_2]  #       -..ss哑\r
++T;    \u200D-。󠄄。Ss哑\u200C𐵿;       [B1 B5 B6 C1 C2 P1 V3 V6 A4_2]; [B1 B5 B6 P1 V3 V6 A4_2]        #       -..ss哑\r
++N;    \u200D-。󠄄。Ss哑\u200C𐵿;       [B1 B5 B6 C1 C2 P1 V3 V6 A4_2]; [B1 B5 B6 C1 C2 P1 V3 V6 A4_2]  #       -..ss哑\r
++B;    -..xn--ss-h46c5711e;    [B1 B5 B6 V3 V6 A4_2];  [B1 B5 B6 V3 V6 A4_2]\r
++B;    xn----tgn..xn--ss-k1ts75zb8ym;  [B1 B5 B6 C1 C2 V3 V6 A4_2];    [B1 B5 B6 C1 C2 V3 V6 A4_2]     #       -..ss哑\r
++B;    xn----tgn..xn--zca670n5f0binyk; [B1 B5 B6 C1 C2 V3 V6 A4_2];    [B1 B5 B6 C1 C2 V3 V6 A4_2]     #       -..ß哑\r
++T;    \u200D-︒󠄄。SS哑\u200C𐵿;       [B1 B5 B6 C1 C2 P1 V6]; [B1 B5 B6 P1 V3 V6]     #       -︒.ss哑\r
++N;    \u200D-︒󠄄。SS哑\u200C𐵿;       [B1 B5 B6 C1 C2 P1 V6]; [B1 B5 B6 C1 C2 P1 V6]  #       -︒.ss哑\r
++T;    \u200D-︒󠄄。ss哑\u200C𐵿;       [B1 B5 B6 C1 C2 P1 V6]; [B1 B5 B6 P1 V3 V6]     #       -︒.ss哑\r
++N;    \u200D-︒󠄄。ss哑\u200C𐵿;       [B1 B5 B6 C1 C2 P1 V6]; [B1 B5 B6 C1 C2 P1 V6]  #       -︒.ss哑\r
++T;    \u200D-︒󠄄。Ss哑\u200C𐵿;       [B1 B5 B6 C1 C2 P1 V6]; [B1 B5 B6 P1 V3 V6]     #       -︒.ss哑\r
++N;    \u200D-︒󠄄。Ss哑\u200C𐵿;       [B1 B5 B6 C1 C2 P1 V6]; [B1 B5 B6 C1 C2 P1 V6]  #       -︒.ss哑\r
++B;    xn----o89h.xn--ss-h46c5711e;    [B1 B5 B6 V3 V6];       [B1 B5 B6 V3 V6]\r
++B;    xn----tgnt341h.xn--ss-k1ts75zb8ym;      [B1 B5 B6 C1 C2 V6];    [B1 B5 B6 C1 C2 V6]     #       -︒.ss哑\r
++B;    xn----tgnt341h.xn--zca670n5f0binyk;     [B1 B5 B6 C1 C2 V6];    [B1 B5 B6 C1 C2 V6]     #       -︒.ß哑\r
++B;    ︒.\uFE2F𑑂;       [P1 V5 V6];     [P1 V5 V6]      #       ︒.𑑂︯\r
++B;    ︒.𑑂\uFE2F;       [P1 V5 V6];     [P1 V5 V6]      #       ︒.𑑂︯\r
++B;    。.𑑂\uFE2F; [V5 A4_2];      [V5 A4_2]       #       ..𑑂︯\r
++B;    ..xn--s96cu30b; [V5 A4_2];      [V5 A4_2]       #       ..𑑂︯\r
++B;    xn--y86c.xn--s96cu30b;  [V5 V6];        [V5 V6] #       ︒.𑑂︯\r
++T;    \uA92C。\u200D;        [C2 V5];        [V5]    #       ꤬.\r
++N;    \uA92C。\u200D;        [C2 V5];        [C2 V5] #       ꤬.\r
++B;    xn--zi9a.;      [V5];   [V5]    #       ꤬.\r
++B;    xn--zi9a.xn--1ug;       [C2 V5];        [C2 V5] #       ꤬.\r
++T;    \u200D󠸡。\uFCD7;    [B1 C2 P1 V6];  [B1 P1 V6]      #       .هج\r
++N;    \u200D󠸡。\uFCD7;    [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       .هج\r
++T;    \u200D󠸡。\u0647\u062C;      [B1 C2 P1 V6];  [B1 P1 V6]      #       .هج\r
++N;    \u200D󠸡。\u0647\u062C;      [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       .هج\r
++B;    xn--d356e.xn--rgb7c;    [B1 V6];        [B1 V6] #       .هج\r
++B;    xn--1ug80651l.xn--rgb7c;        [B1 C2 V6];     [B1 C2 V6]      #       .هج\r
++T;    -Ⴄ𝟢\u0663.𑍴ς;        [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       -Ⴄ0٣.𑍴ς\r
++N;    -Ⴄ𝟢\u0663.𑍴ς;        [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       -Ⴄ0٣.𑍴ς\r
++T;    -Ⴄ0\u0663.𑍴ς;     [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       -Ⴄ0٣.𑍴ς\r
++N;    -Ⴄ0\u0663.𑍴ς;     [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       -Ⴄ0٣.𑍴ς\r
++T;    -ⴄ0\u0663.𑍴ς;     [B1 V3 V5];     [B1 V3 V5]      #       -ⴄ0٣.𑍴ς\r
++N;    -ⴄ0\u0663.𑍴ς;     [B1 V3 V5];     [B1 V3 V5]      #       -ⴄ0٣.𑍴ς\r
++B;    -Ⴄ0\u0663.𑍴Σ;     [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       -Ⴄ0٣.𑍴σ\r
++B;    -ⴄ0\u0663.𑍴σ;     [B1 V3 V5];     [B1 V3 V5]      #       -ⴄ0٣.𑍴σ\r
++B;    xn---0-iyd8660b.xn--4xa9120l;   [B1 V3 V5];     [B1 V3 V5]      #       -ⴄ0٣.𑍴σ\r
++B;    xn---0-iyd216h.xn--4xa9120l;    [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       -Ⴄ0٣.𑍴σ\r
++B;    xn---0-iyd8660b.xn--3xa1220l;   [B1 V3 V5];     [B1 V3 V5]      #       -ⴄ0٣.𑍴ς\r
++B;    xn---0-iyd216h.xn--3xa1220l;    [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       -Ⴄ0٣.𑍴ς\r
++T;    -ⴄ𝟢\u0663.𑍴ς;        [B1 V3 V5];     [B1 V3 V5]      #       -ⴄ0٣.𑍴ς\r
++N;    -ⴄ𝟢\u0663.𑍴ς;        [B1 V3 V5];     [B1 V3 V5]      #       -ⴄ0٣.𑍴ς\r
++B;    -Ⴄ𝟢\u0663.𑍴Σ;        [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       -Ⴄ0٣.𑍴σ\r
++B;    -ⴄ𝟢\u0663.𑍴σ;        [B1 V3 V5];     [B1 V3 V5]      #       -ⴄ0٣.𑍴σ\r
++B;    󦈄。-;       [P1 V3 V6];     [P1 V3 V6]\r
++B;    xn--xm38e.-;    [V3 V6];        [V3 V6]\r
++T;    ⋠𐋮.򶈮\u0F18ß≯;      [P1 V6];        [P1 V6] #       ⋠𐋮.༘ß≯\r
++N;    ⋠𐋮.򶈮\u0F18ß≯;      [P1 V6];        [P1 V6] #       ⋠𐋮.༘ß≯\r
++T;    ≼\u0338𐋮.򶈮\u0F18ß>\u0338;    [P1 V6];        [P1 V6] #       ⋠𐋮.༘ß≯\r
++N;    ≼\u0338𐋮.򶈮\u0F18ß>\u0338;    [P1 V6];        [P1 V6] #       ⋠𐋮.༘ß≯\r
++T;    ⋠𐋮.򶈮\u0F18ß≯;        [P1 V6];        [P1 V6] #       ⋠𐋮.༘ß≯\r
++N;    ⋠𐋮.򶈮\u0F18ß≯;        [P1 V6];        [P1 V6] #       ⋠𐋮.༘ß≯\r
++T;    ≼\u0338𐋮.򶈮\u0F18ß>\u0338;      [P1 V6];        [P1 V6] #       ⋠𐋮.༘ß≯\r
++N;    ≼\u0338𐋮.򶈮\u0F18ß>\u0338;      [P1 V6];        [P1 V6] #       ⋠𐋮.༘ß≯\r
++B;    ≼\u0338𐋮.򶈮\u0F18SS>\u0338;      [P1 V6];        [P1 V6] #       ⋠𐋮.༘ss≯\r
++B;    ⋠𐋮.򶈮\u0F18SS≯;        [P1 V6];        [P1 V6] #       ⋠𐋮.༘ss≯\r
++B;    ⋠𐋮.򶈮\u0F18ss≯;        [P1 V6];        [P1 V6] #       ⋠𐋮.༘ss≯\r
++B;    ≼\u0338𐋮.򶈮\u0F18ss>\u0338;      [P1 V6];        [P1 V6] #       ⋠𐋮.༘ss≯\r
++B;    ≼\u0338𐋮.򶈮\u0F18Ss>\u0338;      [P1 V6];        [P1 V6] #       ⋠𐋮.༘ss≯\r
++B;    ⋠𐋮.򶈮\u0F18Ss≯;        [P1 V6];        [P1 V6] #       ⋠𐋮.༘ss≯\r
++B;    xn--pgh4639f.xn--ss-ifj426nle504a;      [V6];   [V6]    #       ⋠𐋮.༘ss≯\r
++B;    xn--pgh4639f.xn--zca593eo6oc013y;       [V6];   [V6]    #       ⋠𐋮.༘ß≯\r
++B;    ≼\u0338𐋮.򶈮\u0F18SS>\u0338;    [P1 V6];        [P1 V6] #       ⋠𐋮.༘ss≯\r
++B;    ⋠𐋮.򶈮\u0F18SS≯;      [P1 V6];        [P1 V6] #       ⋠𐋮.༘ss≯\r
++B;    ⋠𐋮.򶈮\u0F18ss≯;      [P1 V6];        [P1 V6] #       ⋠𐋮.༘ss≯\r
++B;    ≼\u0338𐋮.򶈮\u0F18ss>\u0338;    [P1 V6];        [P1 V6] #       ⋠𐋮.༘ss≯\r
++B;    ≼\u0338𐋮.򶈮\u0F18Ss>\u0338;    [P1 V6];        [P1 V6] #       ⋠𐋮.༘ss≯\r
++B;    ⋠𐋮.򶈮\u0F18Ss≯;      [P1 V6];        [P1 V6] #       ⋠𐋮.༘ss≯\r
++B;    1𐋸\u0664。󠢮\uFBA4񷝊;   [B1 P1 V6];     [B1 P1 V6]      #       1𐋸٤.ۀ\r
++B;    1𐋸\u0664。󠢮\u06C0񷝊;   [B1 P1 V6];     [B1 P1 V6]      #       1𐋸٤.ۀ\r
++B;    1𐋸\u0664。󠢮\u06D5\u0654񷝊;     [B1 P1 V6];     [B1 P1 V6]      #       1𐋸٤.ۀ\r
++B;    xn--1-hqc3905q.xn--zkb83268gqee4a;      [B1 V6];        [B1 V6] #       1𐋸٤.ۀ\r
++T;    儭-。𐹴Ⴢ񥳠\u200C;       [B1 B6 C1 P1 V3 V6];    [B1 B6 P1 V3 V6]        #       儭-.𐹴Ⴢ\r
++N;    儭-。𐹴Ⴢ񥳠\u200C;       [B1 B6 C1 P1 V3 V6];    [B1 B6 C1 P1 V3 V6]     #       儭-.𐹴Ⴢ\r
++T;    儭-。𐹴Ⴢ񥳠\u200C;       [B1 B6 C1 P1 V3 V6];    [B1 B6 P1 V3 V6]        #       儭-.𐹴Ⴢ\r
++N;    儭-。𐹴Ⴢ񥳠\u200C;       [B1 B6 C1 P1 V3 V6];    [B1 B6 C1 P1 V3 V6]     #       儭-.𐹴Ⴢ\r
++T;    儭-。𐹴ⴢ񥳠\u200C;       [B1 B6 C1 P1 V3 V6];    [B1 B6 P1 V3 V6]        #       儭-.𐹴ⴢ\r
++N;    儭-。𐹴ⴢ񥳠\u200C;       [B1 B6 C1 P1 V3 V6];    [B1 B6 C1 P1 V3 V6]     #       儭-.𐹴ⴢ\r
++B;    xn----gz7a.xn--qlj9223eywx0b;   [B1 B6 V3 V6];  [B1 B6 V3 V6]\r
++B;    xn----gz7a.xn--0ug472cfq0pus98b;        [B1 B6 C1 V3 V6];       [B1 B6 C1 V3 V6]        #       儭-.𐹴ⴢ\r
++B;    xn----gz7a.xn--6nd5001kyw98a;   [B1 B6 V3 V6];  [B1 B6 V3 V6]\r
++B;    xn----gz7a.xn--6nd249ejl4pusr7b;        [B1 B6 C1 V3 V6];       [B1 B6 C1 V3 V6]        #       儭-.𐹴Ⴢ\r
++T;    儭-。𐹴ⴢ񥳠\u200C;       [B1 B6 C1 P1 V3 V6];    [B1 B6 P1 V3 V6]        #       儭-.𐹴ⴢ\r
++N;    儭-。𐹴ⴢ񥳠\u200C;       [B1 B6 C1 P1 V3 V6];    [B1 B6 C1 P1 V3 V6]     #       儭-.𐹴ⴢ\r
++B;    𝟺𐋷\u06B9.𞤭򿍡;      [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]        #       4𐋷ڹ.𞤭\r
++B;    4𐋷\u06B9.𞤭򿍡;   [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]        #       4𐋷ڹ.𞤭\r
++B;    4𐋷\u06B9.𞤋򿍡;   [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]        #       4𐋷ڹ.𞤭\r
++B;    xn--4-cvc5384q.xn--le6hi7322b;  [B1 B2 B3 V6];  [B1 B2 B3 V6]   #       4𐋷ڹ.𞤭\r
++B;    𝟺𐋷\u06B9.𞤋򿍡;      [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]        #       4𐋷ڹ.𞤭\r
++B;    ≯-ꡋ𑲣.⒈𐹭;    [B1 P1 V6];     [B1 P1 V6]\r
++B;    >\u0338-ꡋ𑲣.⒈𐹭;        [B1 P1 V6];     [B1 P1 V6]\r
++B;    ≯-ꡋ𑲣.1.𐹭;     [B1 P1 V6];     [B1 P1 V6]\r
++B;    >\u0338-ꡋ𑲣.1.𐹭; [B1 P1 V6];     [B1 P1 V6]\r
++B;    xn----ogox061d5i8d.1.xn--lo0d;  [B1 V6];        [B1 V6]\r
++B;    xn----ogox061d5i8d.xn--tsh0666f;        [B1 V6];        [B1 V6]\r
++B;    \u0330.󰜱蚀;       [P1 V5 V6];     [P1 V5 V6]      #       ̰.蚀\r
++B;    \u0330.󰜱蚀; [P1 V5 V6];     [P1 V5 V6]      #       ̰.蚀\r
++B;    xn--xta.xn--e91aw9417e; [V5 V6];        [V5 V6] #       ̰.蚀\r
++T;    \uFB39Ⴘ.𞡼𑇀ß\u20D7;     [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       יּႸ.𞡼𑇀ß⃗\r
++N;    \uFB39Ⴘ.𞡼𑇀ß\u20D7;     [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       יּႸ.𞡼𑇀ß⃗\r
++T;    \u05D9\u05BCႸ.𞡼𑇀ß\u20D7;       [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       יּႸ.𞡼𑇀ß⃗\r
++N;    \u05D9\u05BCႸ.𞡼𑇀ß\u20D7;       [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       יּႸ.𞡼𑇀ß⃗\r
++T;    \u05D9\u05BCⴘ.𞡼𑇀ß\u20D7;       [B2 B3];        [B2 B3] #       יּⴘ.𞡼𑇀ß⃗\r
++N;    \u05D9\u05BCⴘ.𞡼𑇀ß\u20D7;       [B2 B3];        [B2 B3] #       יּⴘ.𞡼𑇀ß⃗\r
++B;    \u05D9\u05BCႸ.𞡼𑇀SS\u20D7;       [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       יּႸ.𞡼𑇀ss⃗\r
++B;    \u05D9\u05BCⴘ.𞡼𑇀ss\u20D7;       [B2 B3];        [B2 B3] #       יּⴘ.𞡼𑇀ss⃗\r
++B;    \u05D9\u05BCႸ.𞡼𑇀ss\u20D7;       [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       יּႸ.𞡼𑇀ss⃗\r
++B;    xn--kdb1d867b.xn--ss-yju5690ken9h;      [B2 B3 V6];     [B2 B3 V6]      #       יּႸ.𞡼𑇀ss⃗\r
++B;    xn--kdb1d278n.xn--ss-yju5690ken9h;      [B2 B3];        [B2 B3] #       יּⴘ.𞡼𑇀ss⃗\r
++B;    xn--kdb1d278n.xn--zca284nhg9nrrxg;      [B2 B3];        [B2 B3] #       יּⴘ.𞡼𑇀ß⃗\r
++B;    xn--kdb1d867b.xn--zca284nhg9nrrxg;      [B2 B3 V6];     [B2 B3 V6]      #       יּႸ.𞡼𑇀ß⃗\r
++T;    \uFB39ⴘ.𞡼𑇀ß\u20D7;     [B2 B3];        [B2 B3] #       יּⴘ.𞡼𑇀ß⃗\r
++N;    \uFB39ⴘ.𞡼𑇀ß\u20D7;     [B2 B3];        [B2 B3] #       יּⴘ.𞡼𑇀ß⃗\r
++B;    \uFB39Ⴘ.𞡼𑇀SS\u20D7;     [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       יּႸ.𞡼𑇀ss⃗\r
++B;    \uFB39ⴘ.𞡼𑇀ss\u20D7;     [B2 B3];        [B2 B3] #       יּⴘ.𞡼𑇀ss⃗\r
++B;    \uFB39Ⴘ.𞡼𑇀ss\u20D7;     [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       יּႸ.𞡼𑇀ss⃗\r
++B;    \u1BA3𐹰򁱓。凬;   [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ᮣ𐹰.凬\r
++B;    \u1BA3𐹰򁱓。凬;   [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ᮣ𐹰.凬\r
++B;    xn--rxfz314ilg20c.xn--t9q;      [B1 V5 V6];     [B1 V5 V6]      #       ᮣ𐹰.凬\r
++T;    🢟🄈\u200Dꡎ。\u0F84;     [C2 P1 V5 V6];  [P1 V5 V6]      #       🢟🄈ꡎ.྄\r
++N;    🢟🄈\u200Dꡎ。\u0F84;     [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       🢟🄈ꡎ.྄\r
++T;    🢟7,\u200Dꡎ。\u0F84;       [C2 P1 V5 V6];  [P1 V5 V6]      #       🢟7,ꡎ.྄\r
++N;    🢟7,\u200Dꡎ。\u0F84;       [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       🢟7,ꡎ.྄\r
++B;    xn--7,-gh9hg322i.xn--3ed;       [P1 V5 V6];     [P1 V5 V6]      #       🢟7,ꡎ.྄\r
++B;    xn--7,-n1t0654eqo3o.xn--3ed;    [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       🢟7,ꡎ.྄\r
++B;    xn--nc9aq743ds0e.xn--3ed;       [V5 V6];        [V5 V6] #       🢟🄈ꡎ.྄\r
++B;    xn--1ug4874cfd0kbmg.xn--3ed;    [C2 V5 V6];     [C2 V5 V6]      #       🢟🄈ꡎ.྄\r
++B;    ꡔ。\u1039ᢇ;        [V5];   [V5]    #       ꡔ.္ᢇ\r
++B;    xn--tc9a.xn--9jd663b;   [V5];   [V5]    #       ꡔ.္ᢇ\r
++B;    \u20EB≮.𝨖; [P1 V5 V6];     [P1 V5 V6]      #       ⃫≮.𝨖\r
++B;    \u20EB<\u0338.𝨖;     [P1 V5 V6];     [P1 V5 V6]      #       ⃫≮.𝨖\r
++B;    xn--e1g71d.xn--772h;    [V5 V6];        [V5 V6] #       ⃫≮.𝨖\r
++B;    Ⴢ≯褦.ᠪ\u07EAႾ\u0767; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴢ≯褦.ᠪߪႾݧ\r
++B;    Ⴢ>\u0338褦.ᠪ\u07EAႾ\u0767;     [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴢ≯褦.ᠪߪႾݧ\r
++B;    Ⴢ≯褦.ᠪ\u07EAႾ\u0767;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴢ≯褦.ᠪߪႾݧ\r
++B;    Ⴢ>\u0338褦.ᠪ\u07EAႾ\u0767;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴢ≯褦.ᠪߪႾݧ\r
++B;    ⴢ>\u0338褦.ᠪ\u07EAⴞ\u0767;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ⴢ≯褦.ᠪߪⴞݧ\r
++B;    ⴢ≯褦.ᠪ\u07EAⴞ\u0767;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ⴢ≯褦.ᠪߪⴞݧ\r
++B;    xn--hdh433bev8e.xn--rpb5x392bcyt;       [B5 B6 V6];     [B5 B6 V6]      #       ⴢ≯褦.ᠪߪⴞݧ\r
++B;    xn--6nd461g478e.xn--rpb5x49td2h;        [B5 B6 V6];     [B5 B6 V6]      #       Ⴢ≯褦.ᠪߪႾݧ\r
++B;    ⴢ>\u0338褦.ᠪ\u07EAⴞ\u0767;     [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ⴢ≯褦.ᠪߪⴞݧ\r
++B;    ⴢ≯褦.ᠪ\u07EAⴞ\u0767; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ⴢ≯褦.ᠪߪⴞݧ\r
++T;    򊉆󠆒\u200C\uA953。𞤙\u067Bꡘ;   [B2 B3 C1 P1 V6];       [B2 B3 P1 V6]   #       ꥓.𞤻ٻꡘ\r
++N;    򊉆󠆒\u200C\uA953。𞤙\u067Bꡘ;   [B2 B3 C1 P1 V6];       [B2 B3 C1 P1 V6]        #       ꥓.𞤻ٻꡘ\r
++T;    򊉆󠆒\u200C\uA953。𞤻\u067Bꡘ;   [B2 B3 C1 P1 V6];       [B2 B3 P1 V6]   #       ꥓.𞤻ٻꡘ\r
++N;    򊉆󠆒\u200C\uA953。𞤻\u067Bꡘ;   [B2 B3 C1 P1 V6];       [B2 B3 C1 P1 V6]        #       ꥓.𞤻ٻꡘ\r
++B;    xn--3j9al6189a.xn--0ib8893fegvj;        [B2 B3 V6];     [B2 B3 V6]      #       ꥓.𞤻ٻꡘ\r
++B;    xn--0ug8815chtz0e.xn--0ib8893fegvj;     [B2 B3 C1 V6];  [B2 B3 C1 V6]   #       ꥓.𞤻ٻꡘ\r
++T;    \u200C.≯;     [C1 P1 V6];     [P1 V6 A4_2]    #       .≯\r
++N;    \u200C.≯;     [C1 P1 V6];     [C1 P1 V6]      #       .≯\r
++T;    \u200C.>\u0338; [C1 P1 V6];     [P1 V6 A4_2]    #       .≯\r
++N;    \u200C.>\u0338; [C1 P1 V6];     [C1 P1 V6]      #       .≯\r
++B;    .xn--hdh;       [V6 A4_2];      [V6 A4_2]\r
++B;    xn--0ug.xn--hdh;        [C1 V6];        [C1 V6] #       .≯\r
++B;    𰅧񣩠-.\uABED-悜; [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       -.꯭-悜\r
++B;    𰅧񣩠-.\uABED-悜;   [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       -.꯭-悜\r
++B;    xn----7m53aj640l.xn----8f4br83t;        [V3 V5 V6];     [V3 V5 V6]      #       -.꯭-悜\r
++T;    ᡉ𶓧⬞ᢜ.-\u200D𞣑\u202E;        [C2 P1 V3 V6];  [P1 V3 V6]      #       ᡉ⬞ᢜ.-𞣑\r
++N;    ᡉ𶓧⬞ᢜ.-\u200D𞣑\u202E;        [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       ᡉ⬞ᢜ.-𞣑\r
++B;    xn--87e0ol04cdl39e.xn----qinu247r;      [V3 V6];        [V3 V6] #       ᡉ⬞ᢜ.-𞣑\r
++B;    xn--87e0ol04cdl39e.xn----ugn5e3763s;    [C2 V3 V6];     [C2 V3 V6]      #       ᡉ⬞ᢜ.-𞣑\r
++T;    ⒐\u200C衃Ⴝ.\u0682Ⴔ;      [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 P1 V6]        #       ⒐衃Ⴝ.ڂႴ\r
++N;    ⒐\u200C衃Ⴝ.\u0682Ⴔ;      [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       ⒐衃Ⴝ.ڂႴ\r
++T;    9.\u200C衃Ⴝ.\u0682Ⴔ;       [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 P1 V6]        #       9.衃Ⴝ.ڂႴ\r
++N;    9.\u200C衃Ⴝ.\u0682Ⴔ;       [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       9.衃Ⴝ.ڂႴ\r
++T;    9.\u200C衃ⴝ.\u0682ⴔ;       [B1 B2 B3 C1];  [B1 B2 B3]      #       9.衃ⴝ.ڂⴔ\r
++N;    9.\u200C衃ⴝ.\u0682ⴔ;       [B1 B2 B3 C1];  [B1 B2 B3 C1]   #       9.衃ⴝ.ڂⴔ\r
++T;    9.\u200C衃Ⴝ.\u0682ⴔ;       [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 P1 V6]        #       9.衃Ⴝ.ڂⴔ\r
++N;    9.\u200C衃Ⴝ.\u0682ⴔ;       [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       9.衃Ⴝ.ڂⴔ\r
++B;    9.xn--1nd9032d.xn--7ib268q;     [B1 B2 B3 V6];  [B1 B2 B3 V6]   #       9.衃Ⴝ.ڂⴔ\r
++B;    9.xn--1nd159e1y2f.xn--7ib268q;  [B1 B2 B3 C1 V6];       [B1 B2 B3 C1 V6]        #       9.衃Ⴝ.ڂⴔ\r
++B;    9.xn--llj1920a.xn--7ib268q;     [B1 B2 B3];     [B1 B2 B3]      #       9.衃ⴝ.ڂⴔ\r
++B;    9.xn--0ug862cbm5e.xn--7ib268q;  [B1 B2 B3 C1];  [B1 B2 B3 C1]   #       9.衃ⴝ.ڂⴔ\r
++B;    9.xn--1nd9032d.xn--7ib433c;     [B1 B2 B3 V6];  [B1 B2 B3 V6]   #       9.衃Ⴝ.ڂႴ\r
++B;    9.xn--1nd159e1y2f.xn--7ib433c;  [B1 B2 B3 C1 V6];       [B1 B2 B3 C1 V6]        #       9.衃Ⴝ.ڂႴ\r
++T;    ⒐\u200C衃ⴝ.\u0682ⴔ;      [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 P1 V6]        #       ⒐衃ⴝ.ڂⴔ\r
++N;    ⒐\u200C衃ⴝ.\u0682ⴔ;      [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       ⒐衃ⴝ.ڂⴔ\r
++T;    ⒐\u200C衃Ⴝ.\u0682ⴔ;      [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 P1 V6]        #       ⒐衃Ⴝ.ڂⴔ\r
++N;    ⒐\u200C衃Ⴝ.\u0682ⴔ;      [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       ⒐衃Ⴝ.ڂⴔ\r
++B;    xn--1nd362hy16e.xn--7ib268q;    [B1 B2 B3 V6];  [B1 B2 B3 V6]   #       ⒐衃Ⴝ.ڂⴔ\r
++B;    xn--1nd159ecmd785k.xn--7ib268q; [B1 B2 B3 C1 V6];       [B1 B2 B3 C1 V6]        #       ⒐衃Ⴝ.ڂⴔ\r
++B;    xn--1shy52abz3f.xn--7ib268q;    [B1 B2 B3 V6];  [B1 B2 B3 V6]   #       ⒐衃ⴝ.ڂⴔ\r
++B;    xn--0ugx0px1izu2h.xn--7ib268q;  [B1 B2 B3 C1 V6];       [B1 B2 B3 C1 V6]        #       ⒐衃ⴝ.ڂⴔ\r
++B;    xn--1nd362hy16e.xn--7ib433c;    [B1 B2 B3 V6];  [B1 B2 B3 V6]   #       ⒐衃Ⴝ.ڂႴ\r
++B;    xn--1nd159ecmd785k.xn--7ib433c; [B1 B2 B3 C1 V6];       [B1 B2 B3 C1 V6]        #       ⒐衃Ⴝ.ڂႴ\r
++T;    \u07E1\u200C。--⸬;   [B1 B3 C1 V3];  [B1 V3] #       ߡ.--⸬\r
++N;    \u07E1\u200C。--⸬;   [B1 B3 C1 V3];  [B1 B3 C1 V3]   #       ߡ.--⸬\r
++B;    xn--8sb.xn-----iw2a;    [B1 V3];        [B1 V3] #       ߡ.--⸬\r
++B;    xn--8sb884j.xn-----iw2a;        [B1 B3 C1 V3];  [B1 B3 C1 V3]   #       ߡ.--⸬\r
++B;    𞥓.\u0718;  𞥓.\u0718;    xn--of6h.xn--inb        #       𞥓.ܘ\r
++B;    𞥓.\u0718;    ;       xn--of6h.xn--inb        #       𞥓.ܘ\r
++B;    xn--of6h.xn--inb;       𞥓.\u0718;    xn--of6h.xn--inb        #       𞥓.ܘ\r
++B;    󠄽-.-\u0DCA;        [V3];   [V3]    #       -.-්\r
++B;    󠄽-.-\u0DCA;  [V3];   [V3]    #       -.-්\r
++B;    -.xn----ptf;    [V3];   [V3]    #       -.-්\r
++B;    󠇝\u075B-.\u1927;     [B1 B3 B6 V3 V5];       [B1 B3 B6 V3 V5]        #       ݛ-.ᤧ\r
++B;    xn----k4c.xn--lff;      [B1 B3 B6 V3 V5];       [B1 B3 B6 V3 V5]        #       ݛ-.ᤧ\r
++B;    𞤴󠆹⦉𐹺.\uA806⒌󘤸;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𞤴⦉𐹺.꠆⒌\r
++B;    𞤴󠆹⦉𐹺.\uA8065.󘤸;   [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𞤴⦉𐹺.꠆5.\r
++B;    𞤒󠆹⦉𐹺.\uA8065.󘤸;   [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𞤴⦉𐹺.꠆5.\r
++B;    xn--fuix729epewf.xn--5-w93e.xn--7b83e;  [B1 V5 V6];     [B1 V5 V6]      #       𞤴⦉𐹺.꠆5.\r
++B;    𞤒󠆹⦉𐹺.\uA806⒌󘤸;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𞤴⦉𐹺.꠆⒌\r
++B;    xn--fuix729epewf.xn--xsh5029b6e77i;     [B1 V5 V6];     [B1 V5 V6]      #       𞤴⦉𐹺.꠆⒌\r
++T;    󠄸₀。𑖿\u200C𐦂\u200D; [B1 C2 V5];     [B1 V5] #       0.𑖿𐦂\r
++N;    󠄸₀。𑖿\u200C𐦂\u200D; [B1 C2 V5];     [B1 C2 V5]      #       0.𑖿𐦂\r
++T;    󠄸0。𑖿\u200C𐦂\u200D;   [B1 C2 V5];     [B1 V5] #       0.𑖿𐦂\r
++N;    󠄸0。𑖿\u200C𐦂\u200D;   [B1 C2 V5];     [B1 C2 V5]      #       0.𑖿𐦂\r
++B;    0.xn--mn9cz2s;  [B1 V5];        [B1 V5]\r
++B;    0.xn--0ugc8040p9hk;     [B1 C2 V5];     [B1 C2 V5]      #       0.𑖿𐦂\r
++B;    Ⴚ𐋸󠄄。𝟝ퟶ\u103A;    [P1 V6];        [P1 V6] #       Ⴚ𐋸.5ퟶ်\r
++B;    Ⴚ𐋸󠄄。5ퟶ\u103A;       [P1 V6];        [P1 V6] #       Ⴚ𐋸.5ퟶ်\r
++B;    ⴚ𐋸󠄄。5ퟶ\u103A;       ⴚ𐋸.5ퟶ\u103A;     xn--ilj2659d.xn--5-dug9054m;    NV8     #       ⴚ𐋸.5ퟶ်\r
++B;    xn--ilj2659d.xn--5-dug9054m;    ⴚ𐋸.5ퟶ\u103A;     xn--ilj2659d.xn--5-dug9054m;    NV8     #       ⴚ𐋸.5ퟶ်\r
++B;    ⴚ𐋸.5ퟶ\u103A;     ;       xn--ilj2659d.xn--5-dug9054m;    NV8     #       ⴚ𐋸.5ퟶ်\r
++B;    Ⴚ𐋸.5ퟶ\u103A;     [P1 V6];        [P1 V6] #       Ⴚ𐋸.5ퟶ်\r
++B;    xn--ynd2415j.xn--5-dug9054m;    [V6];   [V6]    #       Ⴚ𐋸.5ퟶ်\r
++B;    ⴚ𐋸󠄄。𝟝ퟶ\u103A;    ⴚ𐋸.5ퟶ\u103A;     xn--ilj2659d.xn--5-dug9054m;    NV8     #       ⴚ𐋸.5ퟶ်\r
++T;    \u200D-ᠹ﹪.\u1DE1\u1922;     [C2 P1 V5 V6];  [P1 V3 V5 V6]   #       -ᠹ﹪.ᷡᤢ\r
++N;    \u200D-ᠹ﹪.\u1DE1\u1922;     [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       -ᠹ﹪.ᷡᤢ\r
++T;    \u200D-ᠹ%.\u1DE1\u1922;       [C2 P1 V5 V6];  [P1 V3 V5 V6]   #       -ᠹ%.ᷡᤢ\r
++N;    \u200D-ᠹ%.\u1DE1\u1922;       [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       -ᠹ%.ᷡᤢ\r
++B;    xn---%-u4o.xn--gff52t;  [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       -ᠹ%.ᷡᤢ\r
++B;    xn---%-u4oy48b.xn--gff52t;      [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       -ᠹ%.ᷡᤢ\r
++B;    xn----c6jx047j.xn--gff52t;      [V3 V5 V6];     [V3 V5 V6]      #       -ᠹ﹪.ᷡᤢ\r
++B;    xn----c6j614b1z4v.xn--gff52t;   [C2 V5 V6];     [C2 V5 V6]      #       -ᠹ﹪.ᷡᤢ\r
++B;    ≠.ᠿ;        [P1 V6];        [P1 V6]\r
++B;    =\u0338.ᠿ;    [P1 V6];        [P1 V6]\r
++B;    xn--1ch.xn--y7e;        [V6];   [V6]\r
++B;    \u0723\u05A3。㌪;     \u0723\u05A3.ハイツ; xn--ucb18e.xn--eck4c5a  #       ܣ֣.ハイツ\r
++B;    \u0723\u05A3。ハイツ;       \u0723\u05A3.ハイツ; xn--ucb18e.xn--eck4c5a  #       ܣ֣.ハイツ\r
++B;    xn--ucb18e.xn--eck4c5a; \u0723\u05A3.ハイツ; xn--ucb18e.xn--eck4c5a  #       ܣ֣.ハイツ\r
++B;    \u0723\u05A3.ハイツ; ;       xn--ucb18e.xn--eck4c5a  #       ܣ֣.ハイツ\r
++B;    𞷥󠆀≮.\u2D7F-;    [B1 B3 P1 V3 V5 V6];    [B1 B3 P1 V3 V5 V6]     #       ≮.⵿-\r
++B;    𞷥󠆀<\u0338.\u2D7F-;        [B1 B3 P1 V3 V5 V6];    [B1 B3 P1 V3 V5 V6]     #       ≮.⵿-\r
++B;    xn--gdhx802p.xn----i2s; [B1 B3 V3 V5 V6];       [B1 B3 V3 V5 V6]        #       ≮.⵿-\r
++B;    ₆榎򦖎\u0D4D。𞤅\u06ED\uFC5A󠮨;        [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       6榎്.𞤧ۭيي\r
++B;    6榎򦖎\u0D4D。𞤅\u06ED\u064A\u064A󠮨;    [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       6榎്.𞤧ۭيي\r
++B;    6榎򦖎\u0D4D。𞤧\u06ED\u064A\u064A󠮨;    [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       6榎്.𞤧ۭيي\r
++B;    xn--6-kmf4691ejv41j.xn--mhba10ch545mn8v8h;      [B1 B3 V6];     [B1 B3 V6]      #       6榎്.𞤧ۭيي\r
++B;    ₆榎򦖎\u0D4D。𞤧\u06ED\uFC5A󠮨;        [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       6榎്.𞤧ۭيي\r
++B;    𣩫.򌑲;    [P1 V6];        [P1 V6]\r
++B;    𣩫.򌑲;      [P1 V6];        [P1 V6]\r
++B;    xn--td3j.xn--4628b;     [V6];   [V6]\r
++T;    \u200D︒。\u06B9\u200C;       [B1 B3 C1 C2 P1 V6];    [B1 P1 V6]      #       ︒.ڹ\r
++N;    \u200D︒。\u06B9\u200C;       [B1 B3 C1 C2 P1 V6];    [B1 B3 C1 C2 P1 V6]     #       ︒.ڹ\r
++B;    xn--y86c.xn--skb;       [B1 V6];        [B1 V6] #       ︒.ڹ\r
++B;    xn--1ug2658f.xn--skb080k;       [B1 B3 C1 C2 V6];       [B1 B3 C1 C2 V6]        #       ︒.ڹ\r
++B;    xn--skb;        \u06B9; xn--skb #       ڹ\r
++B;    \u06B9; ;       xn--skb #       ڹ\r
++T;    𐹦\u200C𐹶。\u206D;        [B1 C1 P1 V6];  [B1 P1 V6]      #       𐹦𐹶.\r
++N;    𐹦\u200C𐹶。\u206D;        [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹦𐹶.\r
++B;    xn--eo0d6a.xn--sxg;     [B1 V6];        [B1 V6] #       𐹦𐹶.\r
++B;    xn--0ug4994goba.xn--sxg;        [B1 C1 V6];     [B1 C1 V6]      #       𐹦𐹶.\r
++B;    \u0C4D𝨾\u05A9𝟭。-𑜨;   [V3 V5];        [V3 V5] #       ్𝨾֩1.-𑜨\r
++B;    \u0C4D𝨾\u05A91。-𑜨;      [V3 V5];        [V3 V5] #       ్𝨾֩1.-𑜨\r
++B;    xn--1-rfc312cdp45c.xn----nq0j;  [V3 V5];        [V3 V5] #       ్𝨾֩1.-𑜨\r
++B;    򣿈。뙏;     [P1 V6];        [P1 V6]\r
++B;    򣿈。뙏;       [P1 V6];        [P1 V6]\r
++B;    xn--ph26c.xn--281b;     [V6];   [V6]\r
++B;    񕨚󠄌󑽀ᡀ.\u08B6; [P1 V6];        [P1 V6] #       ᡀ.ࢶ\r
++B;    xn--z7e98100evc01b.xn--czb;     [V6];   [V6]    #       ᡀ.ࢶ\r
++T;    \u200D。񅁛;  [C2 P1 V6];     [P1 V6 A4_2]    #       .\r
++N;    \u200D。񅁛;  [C2 P1 V6];     [C2 P1 V6]      #       .\r
++T;    \u200D。񅁛;  [C2 P1 V6];     [P1 V6 A4_2]    #       .\r
++N;    \u200D。񅁛;  [C2 P1 V6];     [C2 P1 V6]      #       .\r
++B;    .xn--6x4u;      [V6 A4_2];      [V6 A4_2]\r
++B;    xn--1ug.xn--6x4u;       [C2 V6];        [C2 V6] #       .\r
++B;    \u084B皥.-;  [B1 B2 B3 V3];  [B1 B2 B3 V3]   #       ࡋ皥.-\r
++B;    \u084B皥.-;    [B1 B2 B3 V3];  [B1 B2 B3 V3]   #       ࡋ皥.-\r
++B;    xn--9vb4167c.-; [B1 B2 B3 V3];  [B1 B2 B3 V3]   #       ࡋ皥.-\r
++B;    𐣸\u0315𐮇.⒈ꡦ;        [B1 P1 V6];     [B1 P1 V6]      #       ̕𐮇.⒈ꡦ\r
++B;    𐣸\u0315𐮇.1.ꡦ;   [B1 P1 V6];     [B1 P1 V6]      #       ̕𐮇.1.ꡦ\r
++B;    xn--5sa9915kgvb.1.xn--cd9a;     [B1 V6];        [B1 V6] #       ̕𐮇.1.ꡦ\r
++B;    xn--5sa9915kgvb.xn--tshw539b;   [B1 V6];        [B1 V6] #       ̕𐮇.⒈ꡦ\r
++T;    Ⴛ\u200C\u05A2\u200D。\uFFA0ā𐹦;   [B5 B6 C1 C2 P1 V6];    [B5 B6 P1 V6]   #       Ⴛ֢.ā𐹦\r
++N;    Ⴛ\u200C\u05A2\u200D。\uFFA0ā𐹦;   [B5 B6 C1 C2 P1 V6];    [B5 B6 C1 C2 P1 V6]     #       Ⴛ֢.ā𐹦\r
++T;    Ⴛ\u200C\u05A2\u200D。\uFFA0a\u0304𐹦;      [B5 B6 C1 C2 P1 V6];    [B5 B6 P1 V6]   #       Ⴛ֢.ā𐹦\r
++N;    Ⴛ\u200C\u05A2\u200D。\uFFA0a\u0304𐹦;      [B5 B6 C1 C2 P1 V6];    [B5 B6 C1 C2 P1 V6]     #       Ⴛ֢.ā𐹦\r
++T;    Ⴛ\u200C\u05A2\u200D。\u1160ā𐹦;   [B5 B6 C1 C2 P1 V6];    [B5 B6 P1 V6]   #       Ⴛ֢.ā𐹦\r
++N;    Ⴛ\u200C\u05A2\u200D。\u1160ā𐹦;   [B5 B6 C1 C2 P1 V6];    [B5 B6 C1 C2 P1 V6]     #       Ⴛ֢.ā𐹦\r
++T;    Ⴛ\u200C\u05A2\u200D。\u1160a\u0304𐹦;      [B5 B6 C1 C2 P1 V6];    [B5 B6 P1 V6]   #       Ⴛ֢.ā𐹦\r
++N;    Ⴛ\u200C\u05A2\u200D。\u1160a\u0304𐹦;      [B5 B6 C1 C2 P1 V6];    [B5 B6 C1 C2 P1 V6]     #       Ⴛ֢.ā𐹦\r
++T;    ⴛ\u200C\u05A2\u200D。\u1160a\u0304𐹦;      [B5 B6 C1 C2 P1 V6];    [B5 B6 P1 V6]   #       ⴛ֢.ā𐹦\r
++N;    ⴛ\u200C\u05A2\u200D。\u1160a\u0304𐹦;      [B5 B6 C1 C2 P1 V6];    [B5 B6 C1 C2 P1 V6]     #       ⴛ֢.ā𐹦\r
++T;    ⴛ\u200C\u05A2\u200D。\u1160ā𐹦;   [B5 B6 C1 C2 P1 V6];    [B5 B6 P1 V6]   #       ⴛ֢.ā𐹦\r
++N;    ⴛ\u200C\u05A2\u200D。\u1160ā𐹦;   [B5 B6 C1 C2 P1 V6];    [B5 B6 C1 C2 P1 V6]     #       ⴛ֢.ā𐹦\r
++T;    Ⴛ\u200C\u05A2\u200D。\u1160Ā𐹦;   [B5 B6 C1 C2 P1 V6];    [B5 B6 P1 V6]   #       Ⴛ֢.ā𐹦\r
++N;    Ⴛ\u200C\u05A2\u200D。\u1160Ā𐹦;   [B5 B6 C1 C2 P1 V6];    [B5 B6 C1 C2 P1 V6]     #       Ⴛ֢.ā𐹦\r
++T;    Ⴛ\u200C\u05A2\u200D。\u1160A\u0304𐹦;      [B5 B6 C1 C2 P1 V6];    [B5 B6 P1 V6]   #       Ⴛ֢.ā𐹦\r
++N;    Ⴛ\u200C\u05A2\u200D。\u1160A\u0304𐹦;      [B5 B6 C1 C2 P1 V6];    [B5 B6 C1 C2 P1 V6]     #       Ⴛ֢.ā𐹦\r
++B;    xn--tcb597c.xn--yda594fdn5q;    [B5 B6 V6];     [B5 B6 V6]      #       Ⴛ֢.ā𐹦\r
++B;    xn--tcb597cdmmfa.xn--yda594fdn5q;       [B5 B6 C1 C2 V6];       [B5 B6 C1 C2 V6]        #       Ⴛ֢.ā𐹦\r
++B;    xn--tcb323r.xn--yda594fdn5q;    [B5 B6 V6];     [B5 B6 V6]      #       ⴛ֢.ā𐹦\r
++B;    xn--tcb736kea974k.xn--yda594fdn5q;      [B5 B6 C1 C2 V6];       [B5 B6 C1 C2 V6]        #       ⴛ֢.ā𐹦\r
++T;    ⴛ\u200C\u05A2\u200D。\uFFA0a\u0304𐹦;      [B5 B6 C1 C2 P1 V6];    [B5 B6 P1 V6]   #       ⴛ֢.ā𐹦\r
++N;    ⴛ\u200C\u05A2\u200D。\uFFA0a\u0304𐹦;      [B5 B6 C1 C2 P1 V6];    [B5 B6 C1 C2 P1 V6]     #       ⴛ֢.ā𐹦\r
++T;    ⴛ\u200C\u05A2\u200D。\uFFA0ā𐹦;   [B5 B6 C1 C2 P1 V6];    [B5 B6 P1 V6]   #       ⴛ֢.ā𐹦\r
++N;    ⴛ\u200C\u05A2\u200D。\uFFA0ā𐹦;   [B5 B6 C1 C2 P1 V6];    [B5 B6 C1 C2 P1 V6]     #       ⴛ֢.ā𐹦\r
++T;    Ⴛ\u200C\u05A2\u200D。\uFFA0Ā𐹦;   [B5 B6 C1 C2 P1 V6];    [B5 B6 P1 V6]   #       Ⴛ֢.ā𐹦\r
++N;    Ⴛ\u200C\u05A2\u200D。\uFFA0Ā𐹦;   [B5 B6 C1 C2 P1 V6];    [B5 B6 C1 C2 P1 V6]     #       Ⴛ֢.ā𐹦\r
++T;    Ⴛ\u200C\u05A2\u200D。\uFFA0A\u0304𐹦;      [B5 B6 C1 C2 P1 V6];    [B5 B6 P1 V6]   #       Ⴛ֢.ā𐹦\r
++N;    Ⴛ\u200C\u05A2\u200D。\uFFA0A\u0304𐹦;      [B5 B6 C1 C2 P1 V6];    [B5 B6 C1 C2 P1 V6]     #       Ⴛ֢.ā𐹦\r
++B;    xn--tcb597c.xn--yda9741khjj;    [B5 B6 V6];     [B5 B6 V6]      #       Ⴛ֢.ā𐹦\r
++B;    xn--tcb597cdmmfa.xn--yda9741khjj;       [B5 B6 C1 C2 V6];       [B5 B6 C1 C2 V6]        #       Ⴛ֢.ā𐹦\r
++B;    xn--tcb323r.xn--yda9741khjj;    [B5 B6 V6];     [B5 B6 V6]      #       ⴛ֢.ā𐹦\r
++B;    xn--tcb736kea974k.xn--yda9741khjj;      [B5 B6 C1 C2 V6];       [B5 B6 C1 C2 V6]        #       ⴛ֢.ā𐹦\r
++T;    \uFFF9\u200C。曳⾑𐋰≯;   [C1 P1 V6];     [P1 V6] #       .曳襾𐋰≯\r
++N;    \uFFF9\u200C。曳⾑𐋰≯;   [C1 P1 V6];     [C1 P1 V6]      #       .曳襾𐋰≯\r
++T;    \uFFF9\u200C。曳⾑𐋰>\u0338;       [C1 P1 V6];     [P1 V6] #       .曳襾𐋰≯\r
++N;    \uFFF9\u200C。曳⾑𐋰>\u0338;       [C1 P1 V6];     [C1 P1 V6]      #       .曳襾𐋰≯\r
++T;    \uFFF9\u200C。曳襾𐋰≯;   [C1 P1 V6];     [P1 V6] #       .曳襾𐋰≯\r
++N;    \uFFF9\u200C。曳襾𐋰≯;   [C1 P1 V6];     [C1 P1 V6]      #       .曳襾𐋰≯\r
++T;    \uFFF9\u200C。曳襾𐋰>\u0338;       [C1 P1 V6];     [P1 V6] #       .曳襾𐋰≯\r
++N;    \uFFF9\u200C。曳襾𐋰>\u0338;       [C1 P1 V6];     [C1 P1 V6]      #       .曳襾𐋰≯\r
++B;    xn--vn7c.xn--hdh501y8wvfs5h;    [V6];   [V6]    #       .曳襾𐋰≯\r
++B;    xn--0ug2139f.xn--hdh501y8wvfs5h;        [C1 V6];        [C1 V6] #       .曳襾𐋰≯\r
++T;    ≯⒈。ß;    [P1 V6];        [P1 V6]\r
++N;    ≯⒈。ß;    [P1 V6];        [P1 V6]\r
++T;    >\u0338⒈。ß;        [P1 V6];        [P1 V6]\r
++N;    >\u0338⒈。ß;        [P1 V6];        [P1 V6]\r
++T;    ≯1.。ß;     [P1 V6 A4_2];   [P1 V6 A4_2]\r
++N;    ≯1.。ß;     [P1 V6 A4_2];   [P1 V6 A4_2]\r
++T;    >\u03381.。ß; [P1 V6 A4_2];   [P1 V6 A4_2]\r
++N;    >\u03381.。ß; [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    >\u03381.。SS; [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    ≯1.。SS;     [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    ≯1.。ss;     [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    >\u03381.。ss; [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    >\u03381.。Ss; [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    ≯1.。Ss;     [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    xn--1-ogo..ss;  [V6 A4_2];      [V6 A4_2]\r
++B;    xn--1-ogo..xn--zca;     [V6 A4_2];      [V6 A4_2]\r
++B;    >\u0338⒈。SS;        [P1 V6];        [P1 V6]\r
++B;    ≯⒈。SS;    [P1 V6];        [P1 V6]\r
++B;    ≯⒈。ss;    [P1 V6];        [P1 V6]\r
++B;    >\u0338⒈。ss;        [P1 V6];        [P1 V6]\r
++B;    >\u0338⒈。Ss;        [P1 V6];        [P1 V6]\r
++B;    ≯⒈。Ss;    [P1 V6];        [P1 V6]\r
++B;    xn--hdh84f.ss;  [V6];   [V6]\r
++B;    xn--hdh84f.xn--zca;     [V6];   [V6]\r
++T;    \u0667\u200D\uFB96。\u07DA-₆Ⴙ;     [B1 B2 B3 C2 P1 V6];    [B1 B2 B3 P1 V6]        #       ٧ڳ.ߚ-6Ⴙ\r
++N;    \u0667\u200D\uFB96。\u07DA-₆Ⴙ;     [B1 B2 B3 C2 P1 V6];    [B1 B2 B3 C2 P1 V6]     #       ٧ڳ.ߚ-6Ⴙ\r
++T;    \u0667\u200D\u06B3。\u07DA-6Ⴙ;       [B1 B2 B3 C2 P1 V6];    [B1 B2 B3 P1 V6]        #       ٧ڳ.ߚ-6Ⴙ\r
++N;    \u0667\u200D\u06B3。\u07DA-6Ⴙ;       [B1 B2 B3 C2 P1 V6];    [B1 B2 B3 C2 P1 V6]     #       ٧ڳ.ߚ-6Ⴙ\r
++T;    \u0667\u200D\u06B3。\u07DA-6ⴙ;       [B1 B2 B3 C2];  [B1 B2 B3]      #       ٧ڳ.ߚ-6ⴙ\r
++N;    \u0667\u200D\u06B3。\u07DA-6ⴙ;       [B1 B2 B3 C2];  [B1 B2 B3 C2]   #       ٧ڳ.ߚ-6ⴙ\r
++B;    xn--gib6m.xn---6-lve6529a;      [B1 B2 B3];     [B1 B2 B3]      #       ٧ڳ.ߚ-6ⴙ\r
++B;    xn--gib6m343e.xn---6-lve6529a;  [B1 B2 B3 C2];  [B1 B2 B3 C2]   #       ٧ڳ.ߚ-6ⴙ\r
++B;    xn--gib6m.xn---6-lve002g;       [B1 B2 B3 V6];  [B1 B2 B3 V6]   #       ٧ڳ.ߚ-6Ⴙ\r
++B;    xn--gib6m343e.xn---6-lve002g;   [B1 B2 B3 C2 V6];       [B1 B2 B3 C2 V6]        #       ٧ڳ.ߚ-6Ⴙ\r
++T;    \u0667\u200D\uFB96。\u07DA-₆ⴙ;     [B1 B2 B3 C2];  [B1 B2 B3]      #       ٧ڳ.ߚ-6ⴙ\r
++N;    \u0667\u200D\uFB96。\u07DA-₆ⴙ;     [B1 B2 B3 C2];  [B1 B2 B3 C2]   #       ٧ڳ.ߚ-6ⴙ\r
++T;    \u200C。≠;   [C1 P1 V6];     [P1 V6 A4_2]    #       .≠\r
++N;    \u200C。≠;   [C1 P1 V6];     [C1 P1 V6]      #       .≠\r
++T;    \u200C。=\u0338;       [C1 P1 V6];     [P1 V6 A4_2]    #       .≠\r
++N;    \u200C。=\u0338;       [C1 P1 V6];     [C1 P1 V6]      #       .≠\r
++T;    \u200C。≠;   [C1 P1 V6];     [P1 V6 A4_2]    #       .≠\r
++N;    \u200C。≠;   [C1 P1 V6];     [C1 P1 V6]      #       .≠\r
++T;    \u200C。=\u0338;       [C1 P1 V6];     [P1 V6 A4_2]    #       .≠\r
++N;    \u200C。=\u0338;       [C1 P1 V6];     [C1 P1 V6]      #       .≠\r
++B;    .xn--1ch;       [V6 A4_2];      [V6 A4_2]\r
++B;    xn--0ug.xn--1ch;        [C1 V6];        [C1 V6] #       .≠\r
++T;    𑖿𝨔.ᡟ𑖿\u1B42\u200C;   [C1 V5];        [V5]    #       𑖿𝨔.ᡟ𑖿ᭂ\r
++N;    𑖿𝨔.ᡟ𑖿\u1B42\u200C;   [C1 V5];        [C1 V5] #       𑖿𝨔.ᡟ𑖿ᭂ\r
++B;    xn--461dw464a.xn--v8e29loy65a;  [V5];   [V5]    #       𑖿𝨔.ᡟ𑖿ᭂ\r
++B;    xn--461dw464a.xn--v8e29ldzfo952a;       [C1 V5];        [C1 V5] #       𑖿𝨔.ᡟ𑖿ᭂ\r
++T;    򔣳\u200D򑝱.𖬴Ↄ≠-;     [C2 P1 V3 V5 V6];       [P1 V3 V5 V6]   #       .𖬴Ↄ≠-\r
++N;    򔣳\u200D򑝱.𖬴Ↄ≠-;     [C2 P1 V3 V5 V6];       [C2 P1 V3 V5 V6]        #       .𖬴Ↄ≠-\r
++T;    򔣳\u200D򑝱.𖬴Ↄ=\u0338-; [C2 P1 V3 V5 V6];       [P1 V3 V5 V6]   #       .𖬴Ↄ≠-\r
++N;    򔣳\u200D򑝱.𖬴Ↄ=\u0338-; [C2 P1 V3 V5 V6];       [C2 P1 V3 V5 V6]        #       .𖬴Ↄ≠-\r
++T;    򔣳\u200D򑝱.𖬴ↄ=\u0338-; [C2 P1 V3 V5 V6];       [P1 V3 V5 V6]   #       .𖬴ↄ≠-\r
++N;    򔣳\u200D򑝱.𖬴ↄ=\u0338-; [C2 P1 V3 V5 V6];       [C2 P1 V3 V5 V6]        #       .𖬴ↄ≠-\r
++T;    򔣳\u200D򑝱.𖬴ↄ≠-;     [C2 P1 V3 V5 V6];       [P1 V3 V5 V6]   #       .𖬴ↄ≠-\r
++N;    򔣳\u200D򑝱.𖬴ↄ≠-;     [C2 P1 V3 V5 V6];       [C2 P1 V3 V5 V6]        #       .𖬴ↄ≠-\r
++B;    xn--6j00chy9a.xn----81n51bt713h;        [V3 V5 V6];     [V3 V5 V6]\r
++B;    xn--1ug15151gkb5a.xn----81n51bt713h;    [C2 V3 V5 V6];  [C2 V3 V5 V6]   #       .𖬴ↄ≠-\r
++B;    xn--6j00chy9a.xn----61n81bt713h;        [V3 V5 V6];     [V3 V5 V6]\r
++B;    xn--1ug15151gkb5a.xn----61n81bt713h;    [C2 V3 V5 V6];  [C2 V3 V5 V6]   #       .𖬴Ↄ≠-\r
++T;    \u07E2ς\u200D𝟳。蔑򛖢;   [B2 C2 P1 V6];  [B2 P1 V6]      #       ߢς7.蔑\r
++N;    \u07E2ς\u200D𝟳。蔑򛖢;   [B2 C2 P1 V6];  [B2 C2 P1 V6]   #       ߢς7.蔑\r
++T;    \u07E2ς\u200D7。蔑򛖢;      [B2 C2 P1 V6];  [B2 P1 V6]      #       ߢς7.蔑\r
++N;    \u07E2ς\u200D7。蔑򛖢;      [B2 C2 P1 V6];  [B2 C2 P1 V6]   #       ߢς7.蔑\r
++T;    \u07E2Σ\u200D7。蔑򛖢;      [B2 C2 P1 V6];  [B2 P1 V6]      #       ߢσ7.蔑\r
++N;    \u07E2Σ\u200D7。蔑򛖢;      [B2 C2 P1 V6];  [B2 C2 P1 V6]   #       ߢσ7.蔑\r
++T;    \u07E2σ\u200D7。蔑򛖢;      [B2 C2 P1 V6];  [B2 P1 V6]      #       ߢσ7.蔑\r
++N;    \u07E2σ\u200D7。蔑򛖢;      [B2 C2 P1 V6];  [B2 C2 P1 V6]   #       ߢσ7.蔑\r
++B;    xn--7-zmb872a.xn--wy1ao4929b;   [B2 V6];        [B2 V6] #       ߢσ7.蔑\r
++B;    xn--7-zmb872aez5a.xn--wy1ao4929b;       [B2 C2 V6];     [B2 C2 V6]      #       ߢσ7.蔑\r
++B;    xn--7-xmb182aez5a.xn--wy1ao4929b;       [B2 C2 V6];     [B2 C2 V6]      #       ߢς7.蔑\r
++T;    \u07E2Σ\u200D𝟳。蔑򛖢;   [B2 C2 P1 V6];  [B2 P1 V6]      #       ߢσ7.蔑\r
++N;    \u07E2Σ\u200D𝟳。蔑򛖢;   [B2 C2 P1 V6];  [B2 C2 P1 V6]   #       ߢσ7.蔑\r
++T;    \u07E2σ\u200D𝟳。蔑򛖢;   [B2 C2 P1 V6];  [B2 P1 V6]      #       ߢσ7.蔑\r
++N;    \u07E2σ\u200D𝟳。蔑򛖢;   [B2 C2 P1 V6];  [B2 C2 P1 V6]   #       ߢσ7.蔑\r
++B;    𐹰.\u0600;    [B1 P1 V6];     [B1 P1 V6]      #       𐹰.\r
++B;    xn--oo0d.xn--ifb;       [B1 V6];        [B1 V6] #       𐹰.\r
++B;    -\u08A8.𱠖;   [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ࢨ.\r
++B;    xn----mod.xn--5o9n;     [B1 V3 V6];     [B1 V3 V6]      #       -ࢨ.\r
++B;    ≯𞱸󠇀。誆⒈;   [B1 P1 V6];     [B1 P1 V6]\r
++B;    >\u0338𞱸󠇀。誆⒈;       [B1 P1 V6];     [B1 P1 V6]\r
++B;    ≯𞱸󠇀。誆1.;    [B1 P1 V6];     [B1 P1 V6]\r
++B;    >\u0338𞱸󠇀。誆1.;        [B1 P1 V6];     [B1 P1 V6]\r
++B;    xn--hdh7151p.xn--1-dy1d.;       [B1 V6];        [B1 V6]\r
++B;    xn--hdh7151p.xn--tsh1248a;      [B1 V6];        [B1 V6]\r
++B;    \u0616𞥙䐊\u0650.︒\u0645↺\u069C;       [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ؖ𞥙䐊ِ.︒م↺ڜ\r
++B;    \u0616𞥙䐊\u0650.。\u0645↺\u069C; [B1 V5 A4_2];   [B1 V5 A4_2]    #       ؖ𞥙䐊ِ..م↺ڜ\r
++B;    xn--4fb0j490qjg4x..xn--hhb8o948e;       [B1 V5 A4_2];   [B1 V5 A4_2]    #       ؖ𞥙䐊ِ..م↺ڜ\r
++B;    xn--4fb0j490qjg4x.xn--hhb8o948euo5r;    [B1 V5 V6];     [B1 V5 V6]      #       ؖ𞥙䐊ِ.︒م↺ڜ\r
++T;    퀬-\uDF7E񶳒.\u200C\u0AC5󩸤۴;      [C1 P1 V6];     [P1 V5 V6 A3]   #       퀬-.ૅ۴\r
++N;    퀬-\uDF7E񶳒.\u200C\u0AC5󩸤۴;      [C1 P1 V6];     [C1 P1 V6 A3]   #       퀬-.ૅ۴\r
++T;    퀬-\uDF7E񶳒.\u200C\u0AC5󩸤۴;        [C1 P1 V6];     [P1 V5 V6 A3]   #       퀬-.ૅ۴\r
++N;    퀬-\uDF7E񶳒.\u200C\u0AC5󩸤۴;        [C1 P1 V6];     [C1 P1 V6 A3]   #       퀬-.ૅ۴\r
++B;    퀬-\uDF7E񶳒.xn--hmb76q74166b;        [P1 V5 V6];     [P1 V5 V6 A3]   #       퀬-.ૅ۴\r
++B;    퀬-\uDF7E񶳒.xn--hmb76q74166b;  [P1 V5 V6];     [P1 V5 V6 A3]   #       퀬-.ૅ۴\r
++B;    퀬-\uDF7E񶳒.XN--HMB76Q74166B;  [P1 V5 V6];     [P1 V5 V6 A3]   #       퀬-.ૅ۴\r
++B;    퀬-\uDF7E񶳒.XN--HMB76Q74166B;        [P1 V5 V6];     [P1 V5 V6 A3]   #       퀬-.ૅ۴\r
++B;    퀬-\uDF7E񶳒.Xn--Hmb76q74166b;        [P1 V5 V6];     [P1 V5 V6 A3]   #       퀬-.ૅ۴\r
++B;    퀬-\uDF7E񶳒.Xn--Hmb76q74166b;  [P1 V5 V6];     [P1 V5 V6 A3]   #       퀬-.ૅ۴\r
++B;    퀬-\uDF7E񶳒.xn--hmb76q48y18505a;     [C1 P1 V6];     [C1 P1 V6 A3]   #       퀬-.ૅ۴\r
++B;    퀬-\uDF7E񶳒.xn--hmb76q48y18505a;       [C1 P1 V6];     [C1 P1 V6 A3]   #       퀬-.ૅ۴\r
++B;    퀬-\uDF7E񶳒.XN--HMB76Q48Y18505A;       [C1 P1 V6];     [C1 P1 V6 A3]   #       퀬-.ૅ۴\r
++B;    퀬-\uDF7E񶳒.XN--HMB76Q48Y18505A;     [C1 P1 V6];     [C1 P1 V6 A3]   #       퀬-.ૅ۴\r
++B;    퀬-\uDF7E񶳒.Xn--Hmb76q48y18505a;     [C1 P1 V6];     [C1 P1 V6 A3]   #       퀬-.ૅ۴\r
++B;    퀬-\uDF7E񶳒.Xn--Hmb76q48y18505a;       [C1 P1 V6];     [C1 P1 V6 A3]   #       퀬-.ૅ۴\r
++B;    Ⴌ.𐹾︒𑁿𞾄;    [B1 P1 V6];     [B1 P1 V6]\r
++B;    Ⴌ.𐹾。𑁿𞾄;    [B1 P1 V5 V6];  [B1 P1 V5 V6]\r
++B;    ⴌ.𐹾。𑁿𞾄;    [B1 P1 V5 V6];  [B1 P1 V5 V6]\r
++B;    xn--3kj.xn--2o0d.xn--q30dg029a; [B1 V5 V6];     [B1 V5 V6]\r
++B;    xn--knd.xn--2o0d.xn--q30dg029a; [B1 V5 V6];     [B1 V5 V6]\r
++B;    ⴌ.𐹾︒𑁿𞾄;    [B1 P1 V6];     [B1 P1 V6]\r
++B;    xn--3kj.xn--y86c030a9ob6374b;   [B1 V6];        [B1 V6]\r
++B;    xn--knd.xn--y86c030a9ob6374b;   [B1 V6];        [B1 V6]\r
++B;    񧞿╏。𞩕󠁾;     [B3 B6 P1 V6];  [B3 B6 P1 V6]\r
++B;    xn--iyh90030d.xn--1m6hs0260c;   [B3 B6 V6];     [B3 B6 V6]\r
++T;    \u200D┮󠇐.\u0C00\u0C4D\u1734\u200D;       [C2 V5];        [V5]    #       ┮.ఀ్᜴\r
++N;    \u200D┮󠇐.\u0C00\u0C4D\u1734\u200D;       [C2 V5];        [C2 V5] #       ┮.ఀ్᜴\r
++T;    \u200D┮󠇐.\u0C00\u0C4D\u1734\u200D; [C2 V5];        [V5]    #       ┮.ఀ్᜴\r
++N;    \u200D┮󠇐.\u0C00\u0C4D\u1734\u200D; [C2 V5];        [C2 V5] #       ┮.ఀ్᜴\r
++B;    xn--kxh.xn--eoc8m432a;  [V5];   [V5]    #       ┮.ఀ్᜴\r
++B;    xn--1ug04r.xn--eoc8m432a40i;    [C2 V5];        [C2 V5] #       ┮.ఀ్᜴\r
++B;    򹚪。🄂;    [P1 V6];        [P1 V6]\r
++B;    򹚪。1,;      [P1 V6];        [P1 V6]\r
++B;    xn--n433d.1,;   [P1 V6];        [P1 V6]\r
++B;    xn--n433d.xn--v07h;     [V6];   [V6]\r
++B;    𑍨刍.🛦;   [V5];   [V5]\r
++B;    xn--rbry728b.xn--y88h;  [V5];   [V5]\r
++B;    󠌏3。\u1BF1𝟒;     [P1 V5 V6];     [P1 V5 V6]      #       3.ᯱ4\r
++B;    󠌏3。\u1BF14;        [P1 V5 V6];     [P1 V5 V6]      #       3.ᯱ4\r
++B;    xn--3-ib31m.xn--4-pql;  [V5 V6];        [V5 V6] #       3.ᯱ4\r
++T;    \u06876Ⴔ辘.\uFD22\u0687\u200C;     [B2 B3 C1 P1 V6];       [B2 B3 P1 V6]   #       ڇ6Ⴔ辘.صيڇ\r
++N;    \u06876Ⴔ辘.\uFD22\u0687\u200C;     [B2 B3 C1 P1 V6];       [B2 B3 C1 P1 V6]        #       ڇ6Ⴔ辘.صيڇ\r
++T;    \u06876Ⴔ辘.\u0635\u064A\u0687\u200C; [B2 B3 C1 P1 V6];       [B2 B3 P1 V6]   #       ڇ6Ⴔ辘.صيڇ\r
++N;    \u06876Ⴔ辘.\u0635\u064A\u0687\u200C; [B2 B3 C1 P1 V6];       [B2 B3 C1 P1 V6]        #       ڇ6Ⴔ辘.صيڇ\r
++T;    \u06876ⴔ辘.\u0635\u064A\u0687\u200C; [B2 B3 C1];     [B2 B3] #       ڇ6ⴔ辘.صيڇ\r
++N;    \u06876ⴔ辘.\u0635\u064A\u0687\u200C; [B2 B3 C1];     [B2 B3 C1]      #       ڇ6ⴔ辘.صيڇ\r
++B;    xn--6-gsc2270akm6f.xn--0gb6bxk; [B2 B3];        [B2 B3] #       ڇ6ⴔ辘.صيڇ\r
++B;    xn--6-gsc2270akm6f.xn--0gb6bxkx18g;     [B2 B3 C1];     [B2 B3 C1]      #       ڇ6ⴔ辘.صيڇ\r
++B;    xn--6-gsc039eqq6k.xn--0gb6bxk;  [B2 B3 V6];     [B2 B3 V6]      #       ڇ6Ⴔ辘.صيڇ\r
++B;    xn--6-gsc039eqq6k.xn--0gb6bxkx18g;      [B2 B3 C1 V6];  [B2 B3 C1 V6]   #       ڇ6Ⴔ辘.صيڇ\r
++T;    \u06876ⴔ辘.\uFD22\u0687\u200C;     [B2 B3 C1];     [B2 B3] #       ڇ6ⴔ辘.صيڇ\r
++N;    \u06876ⴔ辘.\uFD22\u0687\u200C;     [B2 B3 C1];     [B2 B3 C1]      #       ڇ6ⴔ辘.صيڇ\r
++B;    󠄍.𐮭𞰬򻫞۹;    [B2 P1 V6 A4_2];        [B2 P1 V6 A4_2]\r
++B;    .xn--mmb3954kd0uf1zx7f; [B2 V6 A4_2];   [B2 V6 A4_2]\r
++B;    \uA87D≯.򻲀򒳄;   [P1 V6];        [P1 V6] #       ≯.\r
++B;    \uA87D>\u0338.򻲀򒳄;       [P1 V6];        [P1 V6] #       ≯.\r
++B;    \uA87D≯.򻲀򒳄;     [P1 V6];        [P1 V6] #       ≯.\r
++B;    \uA87D>\u0338.򻲀򒳄; [P1 V6];        [P1 V6] #       ≯.\r
++B;    xn--hdh8193c.xn--5z40cp629b;    [V6];   [V6]    #       ≯.\r
++T;    ςო\u067B.ς\u0714;   [B5 B6];        [B5 B6] #       ςოٻ.ςܔ\r
++N;    ςო\u067B.ς\u0714;   [B5 B6];        [B5 B6] #       ςოٻ.ςܔ\r
++B;    Σო\u067B.Σ\u0714;   [B5 B6];        [B5 B6] #       σოٻ.σܔ\r
++B;    σო\u067B.σ\u0714;   [B5 B6];        [B5 B6] #       σოٻ.σܔ\r
++B;    Σო\u067B.σ\u0714;   [B5 B6];        [B5 B6] #       σოٻ.σܔ\r
++B;    xn--4xa60l26n.xn--4xa21o;       [B5 B6];        [B5 B6] #       σოٻ.σܔ\r
++T;    Σო\u067B.ς\u0714;   [B5 B6];        [B5 B6] #       σოٻ.ςܔ\r
++N;    Σო\u067B.ς\u0714;   [B5 B6];        [B5 B6] #       σოٻ.ςܔ\r
++T;    σო\u067B.ς\u0714;   [B5 B6];        [B5 B6] #       σოٻ.ςܔ\r
++N;    σო\u067B.ς\u0714;   [B5 B6];        [B5 B6] #       σოٻ.ςܔ\r
++B;    xn--4xa60l26n.xn--3xa41o;       [B5 B6];        [B5 B6] #       σოٻ.ςܔ\r
++B;    xn--3xa80l26n.xn--3xa41o;       [B5 B6];        [B5 B6] #       ςოٻ.ςܔ\r
++B;    򄖚\u0748𠄯\u075F。󠛩;    [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       ݈𠄯ݟ.\r
++B;    򄖚\u0748𠄯\u075F。󠛩;    [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       ݈𠄯ݟ.\r
++B;    xn--vob0c4369twfv8b.xn--kl46e;  [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       ݈𠄯ݟ.\r
++T;    󠳛.\u200D䤫≠Ⴞ; [C2 P1 V6];     [P1 V6] #       .䤫≠Ⴞ\r
++N;    󠳛.\u200D䤫≠Ⴞ; [C2 P1 V6];     [C2 P1 V6]      #       .䤫≠Ⴞ\r
++T;    󠳛.\u200D䤫=\u0338Ⴞ;     [C2 P1 V6];     [P1 V6] #       .䤫≠Ⴞ\r
++N;    󠳛.\u200D䤫=\u0338Ⴞ;     [C2 P1 V6];     [C2 P1 V6]      #       .䤫≠Ⴞ\r
++T;    󠳛.\u200D䤫≠Ⴞ;   [C2 P1 V6];     [P1 V6] #       .䤫≠Ⴞ\r
++N;    󠳛.\u200D䤫≠Ⴞ;   [C2 P1 V6];     [C2 P1 V6]      #       .䤫≠Ⴞ\r
++T;    󠳛.\u200D䤫=\u0338Ⴞ;       [C2 P1 V6];     [P1 V6] #       .䤫≠Ⴞ\r
++N;    󠳛.\u200D䤫=\u0338Ⴞ;       [C2 P1 V6];     [C2 P1 V6]      #       .䤫≠Ⴞ\r
++T;    󠳛.\u200D䤫=\u0338ⴞ;       [C2 P1 V6];     [P1 V6] #       .䤫≠ⴞ\r
++N;    󠳛.\u200D䤫=\u0338ⴞ;       [C2 P1 V6];     [C2 P1 V6]      #       .䤫≠ⴞ\r
++T;    󠳛.\u200D䤫≠ⴞ;   [C2 P1 V6];     [P1 V6] #       .䤫≠ⴞ\r
++N;    󠳛.\u200D䤫≠ⴞ;   [C2 P1 V6];     [C2 P1 V6]      #       .䤫≠ⴞ\r
++B;    xn--1t56e.xn--1ch153bqvw;       [V6];   [V6]\r
++B;    xn--1t56e.xn--1ug73gzzpwi3a;    [C2 V6];        [C2 V6] #       .䤫≠ⴞ\r
++B;    xn--1t56e.xn--2nd141ghl2a;      [V6];   [V6]\r
++B;    xn--1t56e.xn--2nd159e9vb743e;   [C2 V6];        [C2 V6] #       .䤫≠Ⴞ\r
++T;    󠳛.\u200D䤫=\u0338ⴞ;     [C2 P1 V6];     [P1 V6] #       .䤫≠ⴞ\r
++N;    󠳛.\u200D䤫=\u0338ⴞ;     [C2 P1 V6];     [C2 P1 V6]      #       .䤫≠ⴞ\r
++T;    󠳛.\u200D䤫≠ⴞ; [C2 P1 V6];     [P1 V6] #       .䤫≠ⴞ\r
++N;    󠳛.\u200D䤫≠ⴞ; [C2 P1 V6];     [C2 P1 V6]      #       .䤫≠ⴞ\r
++B;    𐽘𑈵.𐹣🕥;    [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]\r
++B;    𐽘𑈵.𐹣🕥;      [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]\r
++B;    xn--bv0d02c.xn--bo0dq650b;      [B1 B2 B3 V6];  [B1 B2 B3 V6]\r
++B;    ⒊⒈𑁄。9; [P1 V6];        [P1 V6]\r
++B;    3.1.𑁄。9;   [V5];   [V5]\r
++B;    3.1.xn--110d.9; [V5];   [V5]\r
++B;    xn--tshd3512p.9;        [V6];   [V6]\r
++T;    -\u200C\u2DF1≮.𐹱򭏴4₉;        [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       -ⷱ≮.𐹱49\r
++N;    -\u200C\u2DF1≮.𐹱򭏴4₉;        [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       -ⷱ≮.𐹱49\r
++T;    -\u200C\u2DF1<\u0338.𐹱򭏴4₉;    [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       -ⷱ≮.𐹱49\r
++N;    -\u200C\u2DF1<\u0338.𐹱򭏴4₉;    [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       -ⷱ≮.𐹱49\r
++T;    -\u200C\u2DF1≮.𐹱򭏴49;    [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       -ⷱ≮.𐹱49\r
++N;    -\u200C\u2DF1≮.𐹱򭏴49;    [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       -ⷱ≮.𐹱49\r
++T;    -\u200C\u2DF1<\u0338.𐹱򭏴49;        [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       -ⷱ≮.𐹱49\r
++N;    -\u200C\u2DF1<\u0338.𐹱򭏴49;        [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       -ⷱ≮.𐹱49\r
++B;    xn----ngo823c.xn--49-ki3om2611f;        [B1 V3 V6];     [B1 V3 V6]      #       -ⷱ≮.𐹱49\r
++B;    xn----sgn20i14s.xn--49-ki3om2611f;      [B1 C1 V3 V6];  [B1 C1 V3 V6]   #       -ⷱ≮.𐹱49\r
++B;    -≯딾。\u0847;       [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -≯딾.ࡇ\r
++B;    ->\u0338딾。\u0847;     [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -≯딾.ࡇ\r
++B;    -≯딾。\u0847;       [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -≯딾.ࡇ\r
++B;    ->\u0338딾。\u0847;     [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -≯딾.ࡇ\r
++B;    xn----pgow547d.xn--5vb; [B1 V3 V6];     [B1 V3 V6]      #       -≯딾.ࡇ\r
++T;    𑙢⒈𐹠-。󠗐\u200C;      [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       𑙢⒈𐹠-.\r
++N;    𑙢⒈𐹠-。󠗐\u200C;      [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       𑙢⒈𐹠-.\r
++T;    𑙢1.𐹠-。󠗐\u200C;       [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       𑙢1.𐹠-.\r
++N;    𑙢1.𐹠-。󠗐\u200C;       [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       𑙢1.𐹠-.\r
++B;    xn--1-bf0j.xn----516i.xn--jd46e;        [B1 V3 V6];     [B1 V3 V6]\r
++B;    xn--1-bf0j.xn----516i.xn--0ug23321l;    [B1 C1 V3 V6];  [B1 C1 V3 V6]   #       𑙢1.𐹠-.\r
++B;    xn----dcpy090hiyg.xn--jd46e;    [B1 V3 V6];     [B1 V3 V6]\r
++B;    xn----dcpy090hiyg.xn--0ug23321l;        [B1 C1 V3 V6];  [B1 C1 V3 V6]   #       𑙢⒈𐹠-.\r
++B;    \u034A.𐨎;  [V5];   [V5]    #       ͊.𐨎\r
++B;    \u034A.𐨎;    [V5];   [V5]    #       ͊.𐨎\r
++B;    xn--oua.xn--mr9c;       [V5];   [V5]    #       ͊.𐨎\r
++B;    훉≮。\u0E34;        [P1 V5 V6];     [P1 V5 V6]      #       훉≮.ิ\r
++B;    훉<\u0338。\u0E34;      [P1 V5 V6];     [P1 V5 V6]      #       훉≮.ิ\r
++B;    훉≮。\u0E34;        [P1 V5 V6];     [P1 V5 V6]      #       훉≮.ิ\r
++B;    훉<\u0338。\u0E34;      [P1 V5 V6];     [P1 V5 V6]      #       훉≮.ิ\r
++B;    xn--gdh2512e.xn--i4c;   [V5 V6];        [V5 V6] #       훉≮.ิ\r
++B;    \u2DF7򞣉🃘.𴈇𝟸\u0659𞤯;    [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ⷷ🃘.2ٙ𞤯\r
++B;    \u2DF7򞣉🃘.𴈇2\u0659𞤯; [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ⷷ🃘.2ٙ𞤯\r
++B;    \u2DF7򞣉🃘.𴈇2\u0659𞤍; [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ⷷ🃘.2ٙ𞤯\r
++B;    xn--trj8045le6s9b.xn--2-upc23918acjsj;  [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       ⷷ🃘.2ٙ𞤯\r
++B;    \u2DF7򞣉🃘.𴈇𝟸\u0659𞤍;    [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ⷷ🃘.2ٙ𞤯\r
++T;    󗇩ßᢞ\u200C。\u0660𞷻\uFCD4-;    [B1 B6 C1 P1 V3 V6];    [B1 P1 V3 V6]   #       ßᢞ.٠نخ-\r
++N;    󗇩ßᢞ\u200C。\u0660𞷻\uFCD4-;    [B1 B6 C1 P1 V3 V6];    [B1 B6 C1 P1 V3 V6]     #       ßᢞ.٠نخ-\r
++T;    󗇩ßᢞ\u200C。\u0660𞷻\u0646\u062E-;      [B1 B6 C1 P1 V3 V6];    [B1 P1 V3 V6]   #       ßᢞ.٠نخ-\r
++N;    󗇩ßᢞ\u200C。\u0660𞷻\u0646\u062E-;      [B1 B6 C1 P1 V3 V6];    [B1 B6 C1 P1 V3 V6]     #       ßᢞ.٠نخ-\r
++T;    󗇩SSᢞ\u200C。\u0660𞷻\u0646\u062E-;      [B1 B6 C1 P1 V3 V6];    [B1 P1 V3 V6]   #       ssᢞ.٠نخ-\r
++N;    󗇩SSᢞ\u200C。\u0660𞷻\u0646\u062E-;      [B1 B6 C1 P1 V3 V6];    [B1 B6 C1 P1 V3 V6]     #       ssᢞ.٠نخ-\r
++T;    󗇩ssᢞ\u200C。\u0660𞷻\u0646\u062E-;      [B1 B6 C1 P1 V3 V6];    [B1 P1 V3 V6]   #       ssᢞ.٠نخ-\r
++N;    󗇩ssᢞ\u200C。\u0660𞷻\u0646\u062E-;      [B1 B6 C1 P1 V3 V6];    [B1 B6 C1 P1 V3 V6]     #       ssᢞ.٠نخ-\r
++T;    󗇩Ssᢞ\u200C。\u0660𞷻\u0646\u062E-;      [B1 B6 C1 P1 V3 V6];    [B1 P1 V3 V6]   #       ssᢞ.٠نخ-\r
++N;    󗇩Ssᢞ\u200C。\u0660𞷻\u0646\u062E-;      [B1 B6 C1 P1 V3 V6];    [B1 B6 C1 P1 V3 V6]     #       ssᢞ.٠نخ-\r
++B;    xn--ss-jepz4596r.xn----dnc5e1er384z;    [B1 V3 V6];     [B1 V3 V6]      #       ssᢞ.٠نخ-\r
++B;    xn--ss-jep006bqt765b.xn----dnc5e1er384z;        [B1 B6 C1 V3 V6];       [B1 B6 C1 V3 V6]        #       ssᢞ.٠نخ-\r
++B;    xn--zca272jbif10059a.xn----dnc5e1er384z;        [B1 B6 C1 V3 V6];       [B1 B6 C1 V3 V6]        #       ßᢞ.٠نخ-\r
++T;    󗇩SSᢞ\u200C。\u0660𞷻\uFCD4-;    [B1 B6 C1 P1 V3 V6];    [B1 P1 V3 V6]   #       ssᢞ.٠نخ-\r
++N;    󗇩SSᢞ\u200C。\u0660𞷻\uFCD4-;    [B1 B6 C1 P1 V3 V6];    [B1 B6 C1 P1 V3 V6]     #       ssᢞ.٠نخ-\r
++T;    󗇩ssᢞ\u200C。\u0660𞷻\uFCD4-;    [B1 B6 C1 P1 V3 V6];    [B1 P1 V3 V6]   #       ssᢞ.٠نخ-\r
++N;    󗇩ssᢞ\u200C。\u0660𞷻\uFCD4-;    [B1 B6 C1 P1 V3 V6];    [B1 B6 C1 P1 V3 V6]     #       ssᢞ.٠نخ-\r
++T;    󗇩Ssᢞ\u200C。\u0660𞷻\uFCD4-;    [B1 B6 C1 P1 V3 V6];    [B1 P1 V3 V6]   #       ssᢞ.٠نخ-\r
++N;    󗇩Ssᢞ\u200C。\u0660𞷻\uFCD4-;    [B1 B6 C1 P1 V3 V6];    [B1 B6 C1 P1 V3 V6]     #       ssᢞ.٠نخ-\r
++B;    ꡆ。Ↄ\u0FB5놮-;    [P1 V3 V6];     [P1 V3 V6]      #       ꡆ.Ↄྵ놮-\r
++B;    ꡆ。Ↄ\u0FB5놮-;      [P1 V3 V6];     [P1 V3 V6]      #       ꡆ.Ↄྵ놮-\r
++B;    ꡆ。ↄ\u0FB5놮-;      [V3];   [V3]    #       ꡆ.ↄྵ놮-\r
++B;    ꡆ。ↄ\u0FB5놮-;    [V3];   [V3]    #       ꡆ.ↄྵ놮-\r
++B;    xn--fc9a.xn----qmg097k469k;     [V3];   [V3]    #       ꡆ.ↄྵ놮-\r
++B;    xn--fc9a.xn----qmg787k869k;     [V3 V6];        [V3 V6] #       ꡆ.Ↄྵ놮-\r
++T;    \uFDAD\u200D.񥰌\u06A9;        [B3 B5 B6 C2 P1 V6];    [B5 B6 P1 V6]   #       لمي.ک\r
++N;    \uFDAD\u200D.񥰌\u06A9;        [B3 B5 B6 C2 P1 V6];    [B3 B5 B6 C2 P1 V6]     #       لمي.ک\r
++T;    \u0644\u0645\u064A\u200D.񥰌\u06A9;    [B3 B5 B6 C2 P1 V6];    [B5 B6 P1 V6]   #       لمي.ک\r
++N;    \u0644\u0645\u064A\u200D.񥰌\u06A9;    [B3 B5 B6 C2 P1 V6];    [B3 B5 B6 C2 P1 V6]     #       لمي.ک\r
++B;    xn--ghbcp.xn--ckb36214f;        [B5 B6 V6];     [B5 B6 V6]      #       لمي.ک\r
++B;    xn--ghbcp494x.xn--ckb36214f;    [B3 B5 B6 C2 V6];       [B3 B5 B6 C2 V6]        #       لمي.ک\r
++B;    Ⴜ\u1C2F𐳒≯。\u06E0\u1732\u0FBA;  [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       Ⴜᰯ𐳒≯.۠ᜲྺ\r
++B;    Ⴜ\u1C2F𐳒>\u0338。\u06E0\u1732\u0FBA;      [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       Ⴜᰯ𐳒≯.۠ᜲྺ\r
++B;    ⴜ\u1C2F𐳒>\u0338。\u06E0\u1732\u0FBA;      [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ⴜᰯ𐳒≯.۠ᜲྺ\r
++B;    ⴜ\u1C2F𐳒≯。\u06E0\u1732\u0FBA;  [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ⴜᰯ𐳒≯.۠ᜲྺ\r
++B;    Ⴜ\u1C2F𐲒≯。\u06E0\u1732\u0FBA;  [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       Ⴜᰯ𐳒≯.۠ᜲྺ\r
++B;    Ⴜ\u1C2F𐲒>\u0338。\u06E0\u1732\u0FBA;      [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       Ⴜᰯ𐳒≯.۠ᜲྺ\r
++B;    xn--0nd679cf3eq67y.xn--wlb646b4ng;      [B1 B3 B5 B6 V5 V6];    [B1 B3 B5 B6 V5 V6]     #       Ⴜᰯ𐳒≯.۠ᜲྺ\r
++B;    xn--r1f68xh1jgv7u.xn--wlb646b4ng;       [B1 B3 B5 B6 V5 V6];    [B1 B3 B5 B6 V5 V6]     #       ⴜᰯ𐳒≯.۠ᜲྺ\r
++B;    𐋵。\uFCEC;  [B1];   [B1]    #       𐋵.كم\r
++B;    𐋵。\u0643\u0645;    [B1];   [B1]    #       𐋵.كم\r
++B;    xn--p97c.xn--fhbe;      [B1];   [B1]    #       𐋵.كم\r
++B;    𐋵.\u0643\u0645;      [B1];   [B1]    #       𐋵.كم\r
++B;    ≮𝅶.񱲁\uAAEC⹈󰥭;    [P1 V6];        [P1 V6] #       ≮.ꫬ⹈\r
++B;    <\u0338𝅶.񱲁\uAAEC⹈󰥭;        [P1 V6];        [P1 V6] #       ≮.ꫬ⹈\r
++B;    ≮𝅶.񱲁\uAAEC⹈󰥭;      [P1 V6];        [P1 V6] #       ≮.ꫬ⹈\r
++B;    <\u0338𝅶.񱲁\uAAEC⹈󰥭;  [P1 V6];        [P1 V6] #       ≮.ꫬ⹈\r
++B;    xn--gdh0880o.xn--4tjx101bsg00ds9pyc;    [V6];   [V6]    #       ≮.ꫬ⹈\r
++B;    \u2DF0\u0358ᢕ.\u0361𐹷󠴍;       [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ⷰ͘ᢕ.͡𐹷\r
++B;    \u2DF0\u0358ᢕ.\u0361𐹷󠴍; [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ⷰ͘ᢕ.͡𐹷\r
++B;    xn--2ua889htsp.xn--cva2687k2tv0g;       [B1 V5 V6];     [B1 V5 V6]      #       ⷰ͘ᢕ.͡𐹷\r
++T;    \uFD79ᡐ\u200C\u06AD.𑋪\u05C7;     [B1 B2 B3 B6 V5];       [B1 B2 B3 B6 V5]        #       غممᡐڭ.𑋪ׇ\r
++N;    \uFD79ᡐ\u200C\u06AD.𑋪\u05C7;     [B1 B2 B3 B6 V5];       [B1 B2 B3 B6 V5]        #       غممᡐڭ.𑋪ׇ\r
++T;    \u063A\u0645\u0645ᡐ\u200C\u06AD.𑋪\u05C7;   [B1 B2 B3 B6 V5];       [B1 B2 B3 B6 V5]        #       غممᡐڭ.𑋪ׇ\r
++N;    \u063A\u0645\u0645ᡐ\u200C\u06AD.𑋪\u05C7;   [B1 B2 B3 B6 V5];       [B1 B2 B3 B6 V5]        #       غممᡐڭ.𑋪ׇ\r
++B;    xn--5gbwa03bg24e.xn--vdb1198k;  [B1 B2 B3 B6 V5];       [B1 B2 B3 B6 V5]        #       غممᡐڭ.𑋪ׇ\r
++B;    xn--5gbwa03bg24eptk.xn--vdb1198k;       [B1 B2 B3 B6 V5];       [B1 B2 B3 B6 V5]        #       غممᡐڭ.𑋪ׇ\r
++T;    𑑂。\u200D󥞀🞕򥁔;      [C2 P1 V5 V6];  [P1 V5 V6]      #       𑑂.🞕\r
++N;    𑑂。\u200D󥞀🞕򥁔;      [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       𑑂.🞕\r
++T;    𑑂。\u200D󥞀🞕򥁔;      [C2 P1 V5 V6];  [P1 V5 V6]      #       𑑂.🞕\r
++N;    𑑂。\u200D󥞀🞕򥁔;      [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       𑑂.🞕\r
++B;    xn--8v1d.xn--ye9h41035a2qqs;    [V5 V6];        [V5 V6]\r
++B;    xn--8v1d.xn--1ug1386plvx1cd8vya;        [C2 V5 V6];     [C2 V5 V6]      #       𑑂.🞕\r
++B;    -\u05E9。⒚;  [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ש.⒚\r
++B;    -\u05E9。19.;  [B1 V3];        [B1 V3] #       -ש.19.\r
++B;    xn----gjc.19.;  [B1 V3];        [B1 V3] #       -ש.19.\r
++B;    xn----gjc.xn--cth;      [B1 V3 V6];     [B1 V3 V6]      #       -ש.⒚\r
++T;    􊾻\u0845\u200C。ᢎ\u200D;   [B5 B6 C1 C2 P1 V6];    [B5 B6 P1 V6]   #       ࡅ.ᢎ\r
++N;    􊾻\u0845\u200C。ᢎ\u200D;   [B5 B6 C1 C2 P1 V6];    [B5 B6 C1 C2 P1 V6]     #       ࡅ.ᢎ\r
++T;    􊾻\u0845\u200C。ᢎ\u200D;   [B5 B6 C1 C2 P1 V6];    [B5 B6 P1 V6]   #       ࡅ.ᢎ\r
++N;    􊾻\u0845\u200C。ᢎ\u200D;   [B5 B6 C1 C2 P1 V6];    [B5 B6 C1 C2 P1 V6]     #       ࡅ.ᢎ\r
++B;    xn--3vb50049s.xn--79e;  [B5 B6 V6];     [B5 B6 V6]      #       ࡅ.ᢎ\r
++B;    xn--3vb882jz4411a.xn--79e259a;  [B5 B6 C1 C2 V6];       [B5 B6 C1 C2 V6]        #       ࡅ.ᢎ\r
++T;    ß\u09C1\u1DED。\u06208₅;    ß\u09C1\u1DED.\u062085;        xn--ss-e2f077r.xn--85-psd       #       ßুᷭ.ؠ85\r
++N;    ß\u09C1\u1DED。\u06208₅;    ß\u09C1\u1DED.\u062085;        xn--zca266bwrr.xn--85-psd       #       ßুᷭ.ؠ85\r
++T;    ß\u09C1\u1DED。\u062085;      ß\u09C1\u1DED.\u062085;        xn--ss-e2f077r.xn--85-psd       #       ßুᷭ.ؠ85\r
++N;    ß\u09C1\u1DED。\u062085;      ß\u09C1\u1DED.\u062085;        xn--zca266bwrr.xn--85-psd       #       ßুᷭ.ؠ85\r
++B;    SS\u09C1\u1DED。\u062085;      ss\u09C1\u1DED.\u062085;        xn--ss-e2f077r.xn--85-psd       #       ssুᷭ.ؠ85\r
++B;    ss\u09C1\u1DED。\u062085;      ss\u09C1\u1DED.\u062085;        xn--ss-e2f077r.xn--85-psd       #       ssুᷭ.ؠ85\r
++B;    Ss\u09C1\u1DED。\u062085;      ss\u09C1\u1DED.\u062085;        xn--ss-e2f077r.xn--85-psd       #       ssুᷭ.ؠ85\r
++B;    xn--ss-e2f077r.xn--85-psd;      ss\u09C1\u1DED.\u062085;        xn--ss-e2f077r.xn--85-psd       #       ssুᷭ.ؠ85\r
++B;    ss\u09C1\u1DED.\u062085;        ;       xn--ss-e2f077r.xn--85-psd       #       ssুᷭ.ؠ85\r
++B;    SS\u09C1\u1DED.\u062085;        ss\u09C1\u1DED.\u062085;        xn--ss-e2f077r.xn--85-psd       #       ssুᷭ.ؠ85\r
++B;    Ss\u09C1\u1DED.\u062085;        ss\u09C1\u1DED.\u062085;        xn--ss-e2f077r.xn--85-psd       #       ssুᷭ.ؠ85\r
++B;    xn--zca266bwrr.xn--85-psd;      ß\u09C1\u1DED.\u062085;        xn--zca266bwrr.xn--85-psd       #       ßুᷭ.ؠ85\r
++T;    ß\u09C1\u1DED.\u062085;        ;       xn--ss-e2f077r.xn--85-psd       #       ßুᷭ.ؠ85\r
++N;    ß\u09C1\u1DED.\u062085;        ;       xn--zca266bwrr.xn--85-psd       #       ßুᷭ.ؠ85\r
++B;    SS\u09C1\u1DED。\u06208₅;    ss\u09C1\u1DED.\u062085;        xn--ss-e2f077r.xn--85-psd       #       ssুᷭ.ؠ85\r
++B;    ss\u09C1\u1DED。\u06208₅;    ss\u09C1\u1DED.\u062085;        xn--ss-e2f077r.xn--85-psd       #       ssুᷭ.ؠ85\r
++B;    Ss\u09C1\u1DED。\u06208₅;    ss\u09C1\u1DED.\u062085;        xn--ss-e2f077r.xn--85-psd       #       ssুᷭ.ؠ85\r
++T;    \u0ACD\u0484魅𝟣.₃𐹥ß;        [B1 V5];        [B1 V5] #       ્҄魅1.3𐹥ß\r
++N;    \u0ACD\u0484魅𝟣.₃𐹥ß;        [B1 V5];        [B1 V5] #       ્҄魅1.3𐹥ß\r
++T;    \u0ACD\u0484魅1.3𐹥ß;       [B1 V5];        [B1 V5] #       ્҄魅1.3𐹥ß\r
++N;    \u0ACD\u0484魅1.3𐹥ß;       [B1 V5];        [B1 V5] #       ્҄魅1.3𐹥ß\r
++B;    \u0ACD\u0484魅1.3𐹥SS;       [B1 V5];        [B1 V5] #       ્҄魅1.3𐹥ss\r
++B;    \u0ACD\u0484魅1.3𐹥ss;       [B1 V5];        [B1 V5] #       ્҄魅1.3𐹥ss\r
++B;    \u0ACD\u0484魅1.3𐹥Ss;       [B1 V5];        [B1 V5] #       ્҄魅1.3𐹥ss\r
++B;    xn--1-0xb049b102o.xn--3ss-nv9t; [B1 V5];        [B1 V5] #       ્҄魅1.3𐹥ss\r
++B;    xn--1-0xb049b102o.xn--3-qfa7018r;       [B1 V5];        [B1 V5] #       ્҄魅1.3𐹥ß\r
++B;    \u0ACD\u0484魅𝟣.₃𐹥SS;        [B1 V5];        [B1 V5] #       ્҄魅1.3𐹥ss\r
++B;    \u0ACD\u0484魅𝟣.₃𐹥ss;        [B1 V5];        [B1 V5] #       ્҄魅1.3𐹥ss\r
++B;    \u0ACD\u0484魅𝟣.₃𐹥Ss;        [B1 V5];        [B1 V5] #       ્҄魅1.3𐹥ss\r
++B;    \u072B。𑓂⒈𑜫󠿻;       [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ܫ.𑓂⒈𑜫\r
++B;    \u072B。𑓂1.𑜫󠿻;        [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ܫ.𑓂1.𑜫\r
++B;    xn--1nb.xn--1-jq9i.xn--ji2dg9877c;      [B1 V5 V6];     [B1 V5 V6]      #       ܫ.𑓂1.𑜫\r
++B;    xn--1nb.xn--tsh7798f6rbrt828c;  [B1 V5 V6];     [B1 V5 V6]      #       ܫ.𑓂⒈𑜫\r
++B;    \uFE0Dછ。嵨;        છ.嵨;        xn--6dc.xn--tot\r
++B;    xn--6dc.xn--tot;        છ.嵨;        xn--6dc.xn--tot\r
++B;    છ.嵨;        ;       xn--6dc.xn--tot\r
++B;    Ⴔ≠Ⴀ.𐹥𐹰;     [B1 P1 V6];     [B1 P1 V6]\r
++B;    Ⴔ=\u0338Ⴀ.𐹥𐹰; [B1 P1 V6];     [B1 P1 V6]\r
++B;    ⴔ=\u0338ⴀ.𐹥𐹰; [B1 P1 V6];     [B1 P1 V6]\r
++B;    ⴔ≠ⴀ.𐹥𐹰;     [B1 P1 V6];     [B1 P1 V6]\r
++B;    xn--1ch603bxb.xn--do0dwa;       [B1 V6];        [B1 V6]\r
++B;    xn--7md3b171g.xn--do0dwa;       [B1 V6];        [B1 V6]\r
++T;    -\u200C⒙𐫥。𝨵;  [C1 P1 V3 V5 V6];       [P1 V3 V5 V6]   #       -⒙𐫥.𝨵\r
++N;    -\u200C⒙𐫥。𝨵;  [C1 P1 V3 V5 V6];       [C1 P1 V3 V5 V6]        #       -⒙𐫥.𝨵\r
++T;    -\u200C18.𐫥。𝨵;  [C1 V3 V5];     [V3 V5] #       -18.𐫥.𝨵\r
++N;    -\u200C18.𐫥。𝨵;  [C1 V3 V5];     [C1 V3 V5]      #       -18.𐫥.𝨵\r
++B;    -18.xn--rx9c.xn--382h;  [V3 V5];        [V3 V5]\r
++B;    xn---18-9m0a.xn--rx9c.xn--382h; [C1 V3 V5];     [C1 V3 V5]      #       -18.𐫥.𝨵\r
++B;    xn----ddps939g.xn--382h;        [V3 V5 V6];     [V3 V5 V6]\r
++B;    xn----sgn18r3191a.xn--382h;     [C1 V3 V5 V6];  [C1 V3 V5 V6]   #       -⒙𐫥.𝨵\r
++B;    ︒.ʌᠣ-𐹽; [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]\r
++B;    。.ʌᠣ-𐹽; [B5 B6 A4_2];   [B5 B6 A4_2]\r
++B;    。.Ʌᠣ-𐹽; [B5 B6 A4_2];   [B5 B6 A4_2]\r
++B;    ..xn----73a596nuh9t;    [B5 B6 A4_2];   [B5 B6 A4_2]\r
++B;    ︒.Ʌᠣ-𐹽; [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]\r
++B;    xn--y86c.xn----73a596nuh9t;     [B1 B5 B6 V6];  [B1 B5 B6 V6]\r
++B;    \uFE05︒。𦀾\u1CE0; [P1 V6];        [P1 V6] #       ︒.𦀾᳠\r
++B;    \uFE05。。𦀾\u1CE0; [A4_2]; [A4_2]  #       ..𦀾᳠\r
++B;    ..xn--t6f5138v; [A4_2]; [A4_2]  #       ..𦀾᳠\r
++B;    xn--y86c.xn--t6f5138v;  [V6];   [V6]    #       ︒.𦀾᳠\r
++B;    xn--t6f5138v;   𦀾\u1CE0;     xn--t6f5138v    #       𦀾᳠\r
++B;    𦀾\u1CE0;     ;       xn--t6f5138v    #       𦀾᳠\r
++T;    𞮑ß􏞞。ᡁ;       [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++N;    𞮑ß􏞞。ᡁ;       [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    𞮑SS􏞞。ᡁ;       [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    𞮑ss􏞞。ᡁ;       [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    𞮑Ss􏞞。ᡁ;       [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    xn--ss-o412ac6305g.xn--07e;     [B2 B3 V6];     [B2 B3 V6]\r
++B;    xn--zca9432wb989f.xn--07e;      [B2 B3 V6];     [B2 B3 V6]\r
++T;    \uA953\u200D\u062C\u066C。𱆎󻡟\u200C󠅆;  [B5 B6 C1 P1 V5 V6];    [B5 B6 P1 V5 V6]        #       ꥓ج٬.\r
++N;    \uA953\u200D\u062C\u066C。𱆎󻡟\u200C󠅆;  [B5 B6 C1 P1 V5 V6];    [B5 B6 C1 P1 V5 V6]     #       ꥓ج٬.\r
++B;    xn--rgb2k6711c.xn--ec8nj3948b;  [B5 B6 V5 V6];  [B5 B6 V5 V6]   #       ꥓ج٬.\r
++B;    xn--rgb2k500fhq9j.xn--0ug78870a5sp9d;   [B5 B6 C1 V5 V6];       [B5 B6 C1 V5 V6]        #       ꥓ج٬.\r
++T;    󠕏.-ß\u200C≠;    [C1 P1 V3 V6];  [P1 V3 V6]      #       .-ß≠\r
++N;    󠕏.-ß\u200C≠;    [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .-ß≠\r
++T;    󠕏.-ß\u200C=\u0338;        [C1 P1 V3 V6];  [P1 V3 V6]      #       .-ß≠\r
++N;    󠕏.-ß\u200C=\u0338;        [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .-ß≠\r
++T;    󠕏.-ß\u200C≠;      [C1 P1 V3 V6];  [P1 V3 V6]      #       .-ß≠\r
++N;    󠕏.-ß\u200C≠;      [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .-ß≠\r
++T;    󠕏.-ß\u200C=\u0338;  [C1 P1 V3 V6];  [P1 V3 V6]      #       .-ß≠\r
++N;    󠕏.-ß\u200C=\u0338;  [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .-ß≠\r
++T;    󠕏.-SS\u200C=\u0338;  [C1 P1 V3 V6];  [P1 V3 V6]      #       .-ss≠\r
++N;    󠕏.-SS\u200C=\u0338;  [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .-ss≠\r
++T;    󠕏.-SS\u200C≠;      [C1 P1 V3 V6];  [P1 V3 V6]      #       .-ss≠\r
++N;    󠕏.-SS\u200C≠;      [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .-ss≠\r
++T;    󠕏.-ss\u200C≠;      [C1 P1 V3 V6];  [P1 V3 V6]      #       .-ss≠\r
++N;    󠕏.-ss\u200C≠;      [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .-ss≠\r
++T;    󠕏.-ss\u200C=\u0338;  [C1 P1 V3 V6];  [P1 V3 V6]      #       .-ss≠\r
++N;    󠕏.-ss\u200C=\u0338;  [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .-ss≠\r
++T;    󠕏.-Ss\u200C=\u0338;  [C1 P1 V3 V6];  [P1 V3 V6]      #       .-ss≠\r
++N;    󠕏.-Ss\u200C=\u0338;  [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .-ss≠\r
++T;    󠕏.-Ss\u200C≠;      [C1 P1 V3 V6];  [P1 V3 V6]      #       .-ss≠\r
++N;    󠕏.-Ss\u200C≠;      [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .-ss≠\r
++B;    xn--u836e.xn---ss-gl2a; [V3 V6];        [V3 V6]\r
++B;    xn--u836e.xn---ss-cn0at5l;      [C1 V3 V6];     [C1 V3 V6]      #       .-ss≠\r
++B;    xn--u836e.xn----qfa750ve7b;     [C1 V3 V6];     [C1 V3 V6]      #       .-ß≠\r
++T;    󠕏.-SS\u200C=\u0338;        [C1 P1 V3 V6];  [P1 V3 V6]      #       .-ss≠\r
++N;    󠕏.-SS\u200C=\u0338;        [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .-ss≠\r
++T;    󠕏.-SS\u200C≠;    [C1 P1 V3 V6];  [P1 V3 V6]      #       .-ss≠\r
++N;    󠕏.-SS\u200C≠;    [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .-ss≠\r
++T;    󠕏.-ss\u200C≠;    [C1 P1 V3 V6];  [P1 V3 V6]      #       .-ss≠\r
++N;    󠕏.-ss\u200C≠;    [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .-ss≠\r
++T;    󠕏.-ss\u200C=\u0338;        [C1 P1 V3 V6];  [P1 V3 V6]      #       .-ss≠\r
++N;    󠕏.-ss\u200C=\u0338;        [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .-ss≠\r
++T;    󠕏.-Ss\u200C=\u0338;        [C1 P1 V3 V6];  [P1 V3 V6]      #       .-ss≠\r
++N;    󠕏.-Ss\u200C=\u0338;        [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .-ss≠\r
++T;    󠕏.-Ss\u200C≠;    [C1 P1 V3 V6];  [P1 V3 V6]      #       .-ss≠\r
++N;    󠕏.-Ss\u200C≠;    [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .-ss≠\r
++T;    ᡙ\u200C。≯𐋲≠; [C1 P1 V6];     [P1 V6] #       ᡙ.≯𐋲≠\r
++N;    ᡙ\u200C。≯𐋲≠; [C1 P1 V6];     [C1 P1 V6]      #       ᡙ.≯𐋲≠\r
++T;    ᡙ\u200C。>\u0338𐋲=\u0338; [C1 P1 V6];     [P1 V6] #       ᡙ.≯𐋲≠\r
++N;    ᡙ\u200C。>\u0338𐋲=\u0338; [C1 P1 V6];     [C1 P1 V6]      #       ᡙ.≯𐋲≠\r
++T;    ᡙ\u200C。≯𐋲≠; [C1 P1 V6];     [P1 V6] #       ᡙ.≯𐋲≠\r
++N;    ᡙ\u200C。≯𐋲≠; [C1 P1 V6];     [C1 P1 V6]      #       ᡙ.≯𐋲≠\r
++T;    ᡙ\u200C。>\u0338𐋲=\u0338; [C1 P1 V6];     [P1 V6] #       ᡙ.≯𐋲≠\r
++N;    ᡙ\u200C。>\u0338𐋲=\u0338; [C1 P1 V6];     [C1 P1 V6]      #       ᡙ.≯𐋲≠\r
++B;    xn--p8e.xn--1ch3a7084l; [V6];   [V6]\r
++B;    xn--p8e650b.xn--1ch3a7084l;     [C1 V6];        [C1 V6] #       ᡙ.≯𐋲≠\r
++B;    𐹧𞲄󠁭񆼩。\u034E🄀;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𐹧.͎🄀\r
++B;    𐹧𞲄󠁭񆼩。\u034E0.;    [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𐹧.͎0.\r
++B;    xn--fo0dw409aq58qrn69d.xn--0-bgb.;      [B1 V5 V6];     [B1 V5 V6]      #       𐹧.͎0.\r
++B;    xn--fo0dw409aq58qrn69d.xn--sua6883w;    [B1 V5 V6];     [B1 V5 V6]      #       𐹧.͎🄀\r
++T;    Ⴄ.\u200D\u0721󻣋ς;       [B1 C2 P1 V6];  [B2 B3 P1 V6]   #       Ⴄ.ܡς\r
++N;    Ⴄ.\u200D\u0721󻣋ς;       [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       Ⴄ.ܡς\r
++T;    Ⴄ.\u200D\u0721󻣋ς; [B1 C2 P1 V6];  [B2 B3 P1 V6]   #       Ⴄ.ܡς\r
++N;    Ⴄ.\u200D\u0721󻣋ς; [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       Ⴄ.ܡς\r
++T;    ⴄ.\u200D\u0721󻣋ς; [B1 C2 P1 V6];  [B2 B3 P1 V6]   #       ⴄ.ܡς\r
++N;    ⴄ.\u200D\u0721󻣋ς; [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       ⴄ.ܡς\r
++T;    Ⴄ.\u200D\u0721󻣋Σ; [B1 C2 P1 V6];  [B2 B3 P1 V6]   #       Ⴄ.ܡσ\r
++N;    Ⴄ.\u200D\u0721󻣋Σ; [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       Ⴄ.ܡσ\r
++T;    ⴄ.\u200D\u0721󻣋σ; [B1 C2 P1 V6];  [B2 B3 P1 V6]   #       ⴄ.ܡσ\r
++N;    ⴄ.\u200D\u0721󻣋σ; [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       ⴄ.ܡσ\r
++B;    xn--vkj.xn--4xa73ob5892c;       [B2 B3 V6];     [B2 B3 V6]      #       ⴄ.ܡσ\r
++B;    xn--vkj.xn--4xa73o3t5ajq467a;   [B1 C2 V6];     [B1 C2 V6]      #       ⴄ.ܡσ\r
++B;    xn--cnd.xn--4xa73ob5892c;       [B2 B3 V6];     [B2 B3 V6]      #       Ⴄ.ܡσ\r
++B;    xn--cnd.xn--4xa73o3t5ajq467a;   [B1 C2 V6];     [B1 C2 V6]      #       Ⴄ.ܡσ\r
++B;    xn--vkj.xn--3xa93o3t5ajq467a;   [B1 C2 V6];     [B1 C2 V6]      #       ⴄ.ܡς\r
++B;    xn--cnd.xn--3xa93o3t5ajq467a;   [B1 C2 V6];     [B1 C2 V6]      #       Ⴄ.ܡς\r
++T;    ⴄ.\u200D\u0721󻣋ς;       [B1 C2 P1 V6];  [B2 B3 P1 V6]   #       ⴄ.ܡς\r
++N;    ⴄ.\u200D\u0721󻣋ς;       [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       ⴄ.ܡς\r
++T;    Ⴄ.\u200D\u0721󻣋Σ;       [B1 C2 P1 V6];  [B2 B3 P1 V6]   #       Ⴄ.ܡσ\r
++N;    Ⴄ.\u200D\u0721󻣋Σ;       [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       Ⴄ.ܡσ\r
++T;    ⴄ.\u200D\u0721󻣋σ;       [B1 C2 P1 V6];  [B2 B3 P1 V6]   #       ⴄ.ܡσ\r
++N;    ⴄ.\u200D\u0721󻣋σ;       [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       ⴄ.ܡσ\r
++B;    򮵛\u0613.Ⴕ; [P1 V6];        [P1 V6] #       ؓ.Ⴕ\r
++B;    򮵛\u0613.ⴕ; [P1 V6];        [P1 V6] #       ؓ.ⴕ\r
++B;    xn--1fb94204l.xn--dlj;  [V6];   [V6]    #       ؓ.ⴕ\r
++B;    xn--1fb94204l.xn--tnd;  [V6];   [V6]    #       ؓ.Ⴕ\r
++T;    ≯\u1DF3𞤥。\u200C\uA8C4󠪉\u200D; [B1 C1 C2 P1 V6];       [B1 P1 V5 V6]   #       ≯ᷳ𞤥.꣄\r
++N;    ≯\u1DF3𞤥。\u200C\uA8C4󠪉\u200D; [B1 C1 C2 P1 V6];       [B1 C1 C2 P1 V6]        #       ≯ᷳ𞤥.꣄\r
++T;    >\u0338\u1DF3𞤥。\u200C\uA8C4󠪉\u200D;     [B1 C1 C2 P1 V6];       [B1 P1 V5 V6]   #       ≯ᷳ𞤥.꣄\r
++N;    >\u0338\u1DF3𞤥。\u200C\uA8C4󠪉\u200D;     [B1 C1 C2 P1 V6];       [B1 C1 C2 P1 V6]        #       ≯ᷳ𞤥.꣄\r
++T;    >\u0338\u1DF3𞤃。\u200C\uA8C4󠪉\u200D;     [B1 C1 C2 P1 V6];       [B1 P1 V5 V6]   #       ≯ᷳ𞤥.꣄\r
++N;    >\u0338\u1DF3𞤃。\u200C\uA8C4󠪉\u200D;     [B1 C1 C2 P1 V6];       [B1 C1 C2 P1 V6]        #       ≯ᷳ𞤥.꣄\r
++T;    ≯\u1DF3𞤃。\u200C\uA8C4󠪉\u200D; [B1 C1 C2 P1 V6];       [B1 P1 V5 V6]   #       ≯ᷳ𞤥.꣄\r
++N;    ≯\u1DF3𞤃。\u200C\uA8C4󠪉\u200D; [B1 C1 C2 P1 V6];       [B1 C1 C2 P1 V6]        #       ≯ᷳ𞤥.꣄\r
++B;    xn--ofg13qyr21c.xn--0f9au6706d; [B1 V5 V6];     [B1 V5 V6]      #       ≯ᷳ𞤥.꣄\r
++B;    xn--ofg13qyr21c.xn--0ugc0116hix29k;     [B1 C1 C2 V6];  [B1 C1 C2 V6]   #       ≯ᷳ𞤥.꣄\r
++T;    \u200C󠄷。򒑁;      [C1 P1 V6];     [P1 V6 A4_2]    #       .\r
++N;    \u200C󠄷。򒑁;      [C1 P1 V6];     [C1 P1 V6]      #       .\r
++T;    \u200C󠄷。򒑁;      [C1 P1 V6];     [P1 V6 A4_2]    #       .\r
++N;    \u200C󠄷。򒑁;      [C1 P1 V6];     [C1 P1 V6]      #       .\r
++B;    .xn--w720c;     [V6 A4_2];      [V6 A4_2]\r
++B;    xn--0ug.xn--w720c;      [C1 V6];        [C1 V6] #       .\r
++T;    ⒈\u0DD6焅.󗡙\u200Dꡟ;     [C2 P1 V6];     [P1 V6] #       ⒈ූ焅.ꡟ\r
++N;    ⒈\u0DD6焅.󗡙\u200Dꡟ;     [C2 P1 V6];     [C2 P1 V6]      #       ⒈ූ焅.ꡟ\r
++T;    1.\u0DD6焅.󗡙\u200Dꡟ;      [C2 P1 V5 V6];  [P1 V5 V6]      #       1.ූ焅.ꡟ\r
++N;    1.\u0DD6焅.󗡙\u200Dꡟ;      [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       1.ූ焅.ꡟ\r
++B;    1.xn--t1c6981c.xn--4c9a21133d;  [V5 V6];        [V5 V6] #       1.ූ焅.ꡟ\r
++B;    1.xn--t1c6981c.xn--1ugz184c9lw7i;       [C2 V5 V6];     [C2 V5 V6]      #       1.ූ焅.ꡟ\r
++B;    xn--t1c337io97c.xn--4c9a21133d; [V6];   [V6]    #       ⒈ූ焅.ꡟ\r
++B;    xn--t1c337io97c.xn--1ugz184c9lw7i;      [C2 V6];        [C2 V6] #       ⒈ූ焅.ꡟ\r
++T;    \u1DCDς≮.ς𝪦𞤕0;        [B1 B5 P1 V5 V6];       [B1 B5 P1 V5 V6]        #       ᷍ς≮.ς𝪦𞤷0\r
++N;    \u1DCDς≮.ς𝪦𞤕0;        [B1 B5 P1 V5 V6];       [B1 B5 P1 V5 V6]        #       ᷍ς≮.ς𝪦𞤷0\r
++T;    \u1DCDς<\u0338.ς𝪦𞤕0;    [B1 B5 P1 V5 V6];       [B1 B5 P1 V5 V6]        #       ᷍ς≮.ς𝪦𞤷0\r
++N;    \u1DCDς<\u0338.ς𝪦𞤕0;    [B1 B5 P1 V5 V6];       [B1 B5 P1 V5 V6]        #       ᷍ς≮.ς𝪦𞤷0\r
++T;    \u1DCDς<\u0338.ς𝪦𞤷0;    [B1 B5 P1 V5 V6];       [B1 B5 P1 V5 V6]        #       ᷍ς≮.ς𝪦𞤷0\r
++N;    \u1DCDς<\u0338.ς𝪦𞤷0;    [B1 B5 P1 V5 V6];       [B1 B5 P1 V5 V6]        #       ᷍ς≮.ς𝪦𞤷0\r
++T;    \u1DCDς≮.ς𝪦𞤷0;        [B1 B5 P1 V5 V6];       [B1 B5 P1 V5 V6]        #       ᷍ς≮.ς𝪦𞤷0\r
++N;    \u1DCDς≮.ς𝪦𞤷0;        [B1 B5 P1 V5 V6];       [B1 B5 P1 V5 V6]        #       ᷍ς≮.ς𝪦𞤷0\r
++B;    \u1DCDΣ≮.Σ𝪦𞤕0;        [B1 B5 P1 V5 V6];       [B1 B5 P1 V5 V6]        #       ᷍σ≮.σ𝪦𞤷0\r
++B;    \u1DCDΣ<\u0338.Σ𝪦𞤕0;    [B1 B5 P1 V5 V6];       [B1 B5 P1 V5 V6]        #       ᷍σ≮.σ𝪦𞤷0\r
++B;    \u1DCDσ<\u0338.σ𝪦𞤷0;    [B1 B5 P1 V5 V6];       [B1 B5 P1 V5 V6]        #       ᷍σ≮.σ𝪦𞤷0\r
++B;    \u1DCDσ≮.σ𝪦𞤷0;        [B1 B5 P1 V5 V6];       [B1 B5 P1 V5 V6]        #       ᷍σ≮.σ𝪦𞤷0\r
++B;    \u1DCDΣ≮.Σ𝪦𞤷0;        [B1 B5 P1 V5 V6];       [B1 B5 P1 V5 V6]        #       ᷍σ≮.σ𝪦𞤷0\r
++B;    \u1DCDΣ<\u0338.Σ𝪦𞤷0;    [B1 B5 P1 V5 V6];       [B1 B5 P1 V5 V6]        #       ᷍σ≮.σ𝪦𞤷0\r
++B;    xn--4xa544kvid.xn--0-zmb55727aggma;     [B1 B5 V5 V6];  [B1 B5 V5 V6]   #       ᷍σ≮.σ𝪦𞤷0\r
++B;    xn--3xa744kvid.xn--0-xmb85727aggma;     [B1 B5 V5 V6];  [B1 B5 V5 V6]   #       ᷍ς≮.ς𝪦𞤷0\r
++B;    \u1DCDσ≮.σ𝪦𞤕0;        [B1 B5 P1 V5 V6];       [B1 B5 P1 V5 V6]        #       ᷍σ≮.σ𝪦𞤷0\r
++B;    \u1DCDσ<\u0338.σ𝪦𞤕0;    [B1 B5 P1 V5 V6];       [B1 B5 P1 V5 V6]        #       ᷍σ≮.σ𝪦𞤷0\r
++T;    򢦾ß\u05B9𐫙.\u05AD\u08A1;  [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ßֹ𐫙.֭ࢡ\r
++N;    򢦾ß\u05B9𐫙.\u05AD\u08A1;  [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ßֹ𐫙.֭ࢡ\r
++B;    򢦾SS\u05B9𐫙.\u05AD\u08A1;  [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ssֹ𐫙.֭ࢡ\r
++B;    򢦾ss\u05B9𐫙.\u05AD\u08A1;  [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ssֹ𐫙.֭ࢡ\r
++B;    򢦾Ss\u05B9𐫙.\u05AD\u08A1;  [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ssֹ𐫙.֭ࢡ\r
++B;    xn--ss-xjd6058xlz50g.xn--4cb62m;        [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       ssֹ𐫙.֭ࢡ\r
++B;    xn--zca89v339zj118e.xn--4cb62m; [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       ßֹ𐫙.֭ࢡ\r
++B;    -𞣄。⒈;    [B1 P1 V3 V6];  [B1 P1 V3 V6]\r
++B;    -𞣄。1.;     [B1 V3];        [B1 V3]\r
++B;    xn----xc8r.1.;  [B1 V3];        [B1 V3]\r
++B;    xn----xc8r.xn--tsh;     [B1 V3 V6];     [B1 V3 V6]\r
++B;    񈠢𐫖𝟡。\u063E𑘿;      [B5 P1 V6];     [B5 P1 V6]      #       𐫖9.ؾ𑘿\r
++B;    񈠢𐫖9。\u063E𑘿; [B5 P1 V6];     [B5 P1 V6]      #       𐫖9.ؾ𑘿\r
++B;    xn--9-el5iv442t.xn--9gb0830l;   [B5 V6];        [B5 V6] #       𐫖9.ؾ𑘿\r
++T;    \u0668\uFC8C\u0668\u1A5D.\u200D;        [B1 C2];        [B1]    #       ٨نم٨ᩝ.\r
++N;    \u0668\uFC8C\u0668\u1A5D.\u200D;        [B1 C2];        [B1 C2] #       ٨نم٨ᩝ.\r
++T;    \u0668\u0646\u0645\u0668\u1A5D.\u200D;  [B1 C2];        [B1]    #       ٨نم٨ᩝ.\r
++N;    \u0668\u0646\u0645\u0668\u1A5D.\u200D;  [B1 C2];        [B1 C2] #       ٨نم٨ᩝ.\r
++B;    xn--hhbb5hc956w.;       [B1];   [B1]    #       ٨نم٨ᩝ.\r
++B;    xn--hhbb5hc956w.xn--1ug;        [B1 C2];        [B1 C2] #       ٨نم٨ᩝ.\r
++B;    𝟘.Ⴇ󀳑\uFD50񫃱;       [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       0.Ⴇتجم\r
++B;    0.Ⴇ󀳑\u062A\u062C\u0645񫃱;        [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       0.Ⴇتجم\r
++B;    0.ⴇ󀳑\u062A\u062C\u0645񫃱;        [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       0.ⴇتجم\r
++B;    0.xn--pgbe9ez79qd207lvff8b;     [B1 B5 V6];     [B1 B5 V6]      #       0.ⴇتجم\r
++B;    0.xn--pgbe9e344c2725svff8b;     [B1 B5 V6];     [B1 B5 V6]      #       0.Ⴇتجم\r
++B;    𝟘.ⴇ󀳑\uFD50񫃱;       [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       0.ⴇتجم\r
++B;    𑇀▍.⁞ᠰ; [V5];   [V5]\r
++B;    xn--9zh3057f.xn--j7e103b;       [V5];   [V5]\r
++T;    \u200D-\u067A.򏯩;     [B1 C2 P1 V6];  [B1 P1 V3 V6]   #       -ٺ.\r
++N;    \u200D-\u067A.򏯩;     [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       -ٺ.\r
++B;    xn----qrc.xn--ts49b;    [B1 V3 V6];     [B1 V3 V6]      #       -ٺ.\r
++B;    xn----qrc357q.xn--ts49b;        [B1 C2 V6];     [B1 C2 V6]      #       -ٺ.\r
++T;    ᠢ𐮂𐫘寐。\u200C≯✳;  [B1 B5 C1 P1 V6];       [B1 B5 P1 V6]   #       ᠢ𐮂𐫘寐.≯✳\r
++N;    ᠢ𐮂𐫘寐。\u200C≯✳;  [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       ᠢ𐮂𐫘寐.≯✳\r
++T;    ᠢ𐮂𐫘寐。\u200C>\u0338✳;      [B1 B5 C1 P1 V6];       [B1 B5 P1 V6]   #       ᠢ𐮂𐫘寐.≯✳\r
++N;    ᠢ𐮂𐫘寐。\u200C>\u0338✳;      [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       ᠢ𐮂𐫘寐.≯✳\r
++T;    ᠢ𐮂𐫘寐。\u200C≯✳;  [B1 B5 C1 P1 V6];       [B1 B5 P1 V6]   #       ᠢ𐮂𐫘寐.≯✳\r
++N;    ᠢ𐮂𐫘寐。\u200C≯✳;  [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       ᠢ𐮂𐫘寐.≯✳\r
++T;    ᠢ𐮂𐫘寐。\u200C>\u0338✳;      [B1 B5 C1 P1 V6];       [B1 B5 P1 V6]   #       ᠢ𐮂𐫘寐.≯✳\r
++N;    ᠢ𐮂𐫘寐。\u200C>\u0338✳;      [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       ᠢ𐮂𐫘寐.≯✳\r
++B;    xn--46e6675axzzhota.xn--hdh99p; [B1 B5 V6];     [B1 B5 V6]\r
++B;    xn--46e6675axzzhota.xn--0ug06gu8f;      [B1 B5 C1 V6];  [B1 B5 C1 V6]   #       ᠢ𐮂𐫘寐.≯✳\r
++T;    \u200D。󸲜ႺႴ𞨇;        [B1 B5 B6 C2 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .ႺႴ\r
++N;    \u200D。󸲜ႺႴ𞨇;        [B1 B5 B6 C2 P1 V6];    [B1 B5 B6 C2 P1 V6]     #       .ႺႴ\r
++T;    \u200D。󸲜ႺႴ𞨇;        [B1 B5 B6 C2 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .ႺႴ\r
++N;    \u200D。󸲜ႺႴ𞨇;        [B1 B5 B6 C2 P1 V6];    [B1 B5 B6 C2 P1 V6]     #       .ႺႴ\r
++T;    \u200D。󸲜ⴚⴔ𞨇;        [B1 B5 B6 C2 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .ⴚⴔ\r
++N;    \u200D。󸲜ⴚⴔ𞨇;        [B1 B5 B6 C2 P1 V6];    [B1 B5 B6 C2 P1 V6]     #       .ⴚⴔ\r
++T;    \u200D。󸲜Ⴚⴔ𞨇;        [B1 B5 B6 C2 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .Ⴚⴔ\r
++N;    \u200D。󸲜Ⴚⴔ𞨇;        [B1 B5 B6 C2 P1 V6];    [B1 B5 B6 C2 P1 V6]     #       .Ⴚⴔ\r
++B;    .xn--ynd036lq981an3r4h; [B5 B6 V6 A4_2];        [B5 B6 V6 A4_2]\r
++B;    xn--1ug.xn--ynd036lq981an3r4h;  [B1 B5 B6 C2 V6];       [B1 B5 B6 C2 V6]        #       .Ⴚⴔ\r
++B;    .xn--cljl81825an3r4h;   [B5 B6 V6 A4_2];        [B5 B6 V6 A4_2]\r
++B;    xn--1ug.xn--cljl81825an3r4h;    [B1 B5 B6 C2 V6];       [B1 B5 B6 C2 V6]        #       .ⴚⴔ\r
++B;    .xn--sndl01647an3h1h;   [B5 B6 V6 A4_2];        [B5 B6 V6 A4_2]\r
++B;    xn--1ug.xn--sndl01647an3h1h;    [B1 B5 B6 C2 V6];       [B1 B5 B6 C2 V6]        #       .ႺႴ\r
++T;    \u200D。󸲜ⴚⴔ𞨇;        [B1 B5 B6 C2 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .ⴚⴔ\r
++N;    \u200D。󸲜ⴚⴔ𞨇;        [B1 B5 B6 C2 P1 V6];    [B1 B5 B6 C2 P1 V6]     #       .ⴚⴔ\r
++T;    \u200D。󸲜Ⴚⴔ𞨇;        [B1 B5 B6 C2 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .Ⴚⴔ\r
++N;    \u200D。󸲜Ⴚⴔ𞨇;        [B1 B5 B6 C2 P1 V6];    [B1 B5 B6 C2 P1 V6]     #       .Ⴚⴔ\r
++T;    -3.\u200Dヌᢕ;        [C2 V3];        [V3]    #       -3.ヌᢕ\r
++N;    -3.\u200Dヌᢕ;        [C2 V3];        [C2 V3] #       -3.ヌᢕ\r
++B;    -3.xn--fbf115j; [V3];   [V3]\r
++B;    -3.xn--fbf739aq5o;      [C2 V3];        [C2 V3] #       -3.ヌᢕ\r
++T;    🂃\u0666ß\u200D。󠠂򭰍𞩒-;     [B1 C2 P1 V3 V6];       [B1 P1 V3 V6]   #       🂃٦ß.-\r
++N;    🂃\u0666ß\u200D。󠠂򭰍𞩒-;     [B1 C2 P1 V3 V6];       [B1 C2 P1 V3 V6]        #       🂃٦ß.-\r
++T;    🂃\u0666SS\u200D。󠠂򭰍𞩒-;     [B1 C2 P1 V3 V6];       [B1 P1 V3 V6]   #       🂃٦ss.-\r
++N;    🂃\u0666SS\u200D。󠠂򭰍𞩒-;     [B1 C2 P1 V3 V6];       [B1 C2 P1 V3 V6]        #       🂃٦ss.-\r
++T;    🂃\u0666ss\u200D。󠠂򭰍𞩒-;     [B1 C2 P1 V3 V6];       [B1 P1 V3 V6]   #       🂃٦ss.-\r
++N;    🂃\u0666ss\u200D。󠠂򭰍𞩒-;     [B1 C2 P1 V3 V6];       [B1 C2 P1 V3 V6]        #       🂃٦ss.-\r
++T;    🂃\u0666Ss\u200D。󠠂򭰍𞩒-;     [B1 C2 P1 V3 V6];       [B1 P1 V3 V6]   #       🂃٦ss.-\r
++N;    🂃\u0666Ss\u200D。󠠂򭰍𞩒-;     [B1 C2 P1 V3 V6];       [B1 C2 P1 V3 V6]        #       🂃٦ss.-\r
++B;    xn--ss-pyd98921c.xn----nz8rh7531csznt;  [B1 V3 V6];     [B1 V3 V6]      #       🂃٦ss.-\r
++B;    xn--ss-pyd483x5k99b.xn----nz8rh7531csznt;       [B1 C2 V3 V6];  [B1 C2 V3 V6]   #       🂃٦ss.-\r
++B;    xn--zca34z68yzu83b.xn----nz8rh7531csznt;        [B1 C2 V3 V6];  [B1 C2 V3 V6]   #       🂃٦ß.-\r
++T;    ꇟ-𐾺\u069F。򰀺\u200C;    [B5 B6 C1 P1 V6];       [B5 B6 P1 V6]   #       ꇟ-ڟ.\r
++N;    ꇟ-𐾺\u069F。򰀺\u200C;    [B5 B6 C1 P1 V6];       [B5 B6 C1 P1 V6]        #       ꇟ-ڟ.\r
++B;    xn----utc4430jd3zd.xn--bp20d;   [B5 B6 V6];     [B5 B6 V6]      #       ꇟ-ڟ.\r
++B;    xn----utc4430jd3zd.xn--0ugx6670i;       [B5 B6 C1 V6];  [B5 B6 C1 V6]   #       ꇟ-ڟ.\r
++B;    \u0665.\u0484𐨗𝩋𴤃;      [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ٥.҄𐨗𝩋\r
++B;    xn--eib.xn--n3a0405kus8eft5l;   [B1 V5 V6];     [B1 V5 V6]      #       ٥.҄𐨗𝩋\r
++B;    -.񱼓\u0649𐨿;       [B1 B5 B6 P1 V3 V6];    [B1 B5 B6 P1 V3 V6]     #       -.ى𐨿\r
++B;    -.xn--lhb4124khbq4b;    [B1 B5 B6 V3 V6];       [B1 B5 B6 V3 V6]        #       -.ى𐨿\r
++T;    󾬨ς.𞶙녫ß;       [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++N;    󾬨ς.𞶙녫ß;       [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++T;    󾬨ς.𞶙녫ß; [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++N;    󾬨ς.𞶙녫ß; [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    󾬨Σ.𞶙녫SS; [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    󾬨Σ.𞶙녫SS;       [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    󾬨σ.𞶙녫ss;       [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    󾬨σ.𞶙녫ss; [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    󾬨Σ.𞶙녫Ss; [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    󾬨Σ.𞶙녫Ss;       [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    xn--4xa76659r.xn--ss-d64i8755h; [B2 B3 V6];     [B2 B3 V6]\r
++B;    xn--3xa96659r.xn--zca5051g4h4i; [B2 B3 V6];     [B2 B3 V6]\r
++T;    Ⅎ\u17D2\u200D。≠\u200D\u200C;      [C1 C2 P1 V6];  [P1 V6] #       Ⅎ្.≠\r
++N;    Ⅎ\u17D2\u200D。≠\u200D\u200C;      [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       Ⅎ្.≠\r
++T;    Ⅎ\u17D2\u200D。=\u0338\u200D\u200C;  [C1 C2 P1 V6];  [P1 V6] #       Ⅎ្.≠\r
++N;    Ⅎ\u17D2\u200D。=\u0338\u200D\u200C;  [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       Ⅎ្.≠\r
++T;    Ⅎ\u17D2\u200D。≠\u200D\u200C;      [C1 C2 P1 V6];  [P1 V6] #       Ⅎ្.≠\r
++N;    Ⅎ\u17D2\u200D。≠\u200D\u200C;      [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       Ⅎ្.≠\r
++T;    Ⅎ\u17D2\u200D。=\u0338\u200D\u200C;  [C1 C2 P1 V6];  [P1 V6] #       Ⅎ្.≠\r
++N;    Ⅎ\u17D2\u200D。=\u0338\u200D\u200C;  [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       Ⅎ្.≠\r
++T;    ⅎ\u17D2\u200D。=\u0338\u200D\u200C;  [C1 C2 P1 V6];  [P1 V6] #       ⅎ្.≠\r
++N;    ⅎ\u17D2\u200D。=\u0338\u200D\u200C;  [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       ⅎ្.≠\r
++T;    ⅎ\u17D2\u200D。≠\u200D\u200C;      [C1 C2 P1 V6];  [P1 V6] #       ⅎ្.≠\r
++N;    ⅎ\u17D2\u200D。≠\u200D\u200C;      [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       ⅎ្.≠\r
++B;    xn--u4e969b.xn--1ch;    [V6];   [V6]    #       ⅎ្.≠\r
++B;    xn--u4e823bq1a.xn--0ugb89o;     [C1 C2 V6];     [C1 C2 V6]      #       ⅎ្.≠\r
++B;    xn--u4e319b.xn--1ch;    [V6];   [V6]    #       Ⅎ្.≠\r
++B;    xn--u4e823bcza.xn--0ugb89o;     [C1 C2 V6];     [C1 C2 V6]      #       Ⅎ្.≠\r
++T;    ⅎ\u17D2\u200D。=\u0338\u200D\u200C;  [C1 C2 P1 V6];  [P1 V6] #       ⅎ្.≠\r
++N;    ⅎ\u17D2\u200D。=\u0338\u200D\u200C;  [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       ⅎ្.≠\r
++T;    ⅎ\u17D2\u200D。≠\u200D\u200C;      [C1 C2 P1 V6];  [P1 V6] #       ⅎ្.≠\r
++N;    ⅎ\u17D2\u200D。≠\u200D\u200C;      [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       ⅎ្.≠\r
++T;    𐋺\uAAF6\uA953󧦉.\u200C\u1714\u068F;      [B1 C1 P1 V6];  [B1 P1 V5 V6]   #       𐋺꫶꥓.᜔ڏ\r
++N;    𐋺\uAAF6\uA953󧦉.\u200C\u1714\u068F;      [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐋺꫶꥓.᜔ڏ\r
++T;    𐋺\uAAF6\uA953󧦉.\u200C\u1714\u068F;        [B1 C1 P1 V6];  [B1 P1 V5 V6]   #       𐋺꫶꥓.᜔ڏ\r
++N;    𐋺\uAAF6\uA953󧦉.\u200C\u1714\u068F;        [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐋺꫶꥓.᜔ڏ\r
++B;    xn--3j9a14ak27osbz2o.xn--ljb175f;       [B1 V5 V6];     [B1 V5 V6]      #       𐋺꫶꥓.᜔ڏ\r
++B;    xn--3j9a14ak27osbz2o.xn--ljb175f1wg;    [B1 C1 V6];     [B1 C1 V6]      #       𐋺꫶꥓.᜔ڏ\r
++B;    񺔯\u0FA8.≯;       [P1 V6];        [P1 V6] #       ྨ.≯\r
++B;    񺔯\u0FA8.>\u0338;   [P1 V6];        [P1 V6] #       ྨ.≯\r
++B;    񺔯\u0FA8.≯; [P1 V6];        [P1 V6] #       ྨ.≯\r
++B;    񺔯\u0FA8.>\u0338;     [P1 V6];        [P1 V6] #       ྨ.≯\r
++B;    xn--4fd57150h.xn--hdh;  [V6];   [V6]    #       ྨ.≯\r
++T;    \u200D𞡄Ⴓ.𐇽;   [B1 B3 B6 C2 P1 V5 V6]; [B1 B2 B3 B6 P1 V5 V6]  #       𞡄Ⴓ.𐇽\r
++N;    \u200D𞡄Ⴓ.𐇽;   [B1 B3 B6 C2 P1 V5 V6]; [B1 B3 B6 C2 P1 V5 V6]  #       𞡄Ⴓ.𐇽\r
++T;    \u200D𞡄Ⴓ.𐇽;     [B1 B3 B6 C2 P1 V5 V6]; [B1 B2 B3 B6 P1 V5 V6]  #       𞡄Ⴓ.𐇽\r
++N;    \u200D𞡄Ⴓ.𐇽;     [B1 B3 B6 C2 P1 V5 V6]; [B1 B3 B6 C2 P1 V5 V6]  #       𞡄Ⴓ.𐇽\r
++T;    \u200D𞡄ⴓ.𐇽;     [B1 B3 B6 C2 V5];       [B1 B2 B3 B6 V5]        #       𞡄ⴓ.𐇽\r
++N;    \u200D𞡄ⴓ.𐇽;     [B1 B3 B6 C2 V5];       [B1 B3 B6 C2 V5]        #       𞡄ⴓ.𐇽\r
++B;    xn--blj7492l.xn--m27c;  [B1 B2 B3 B6 V5];       [B1 B2 B3 B6 V5]\r
++B;    xn--1ugz52c4i16a.xn--m27c;      [B1 B3 B6 C2 V5];       [B1 B3 B6 C2 V5]        #       𞡄ⴓ.𐇽\r
++B;    xn--rnd5552v.xn--m27c;  [B1 B2 B3 B6 V5 V6];    [B1 B2 B3 B6 V5 V6]\r
++B;    xn--rnd379ex885a.xn--m27c;      [B1 B3 B6 C2 V5 V6];    [B1 B3 B6 C2 V5 V6]     #       𞡄Ⴓ.𐇽\r
++T;    \u200D𞡄ⴓ.𐇽;   [B1 B3 B6 C2 V5];       [B1 B2 B3 B6 V5]        #       𞡄ⴓ.𐇽\r
++N;    \u200D𞡄ⴓ.𐇽;   [B1 B3 B6 C2 V5];       [B1 B3 B6 C2 V5]        #       𞡄ⴓ.𐇽\r
++T;    𐪒ß\uA8EA.ᡤ;     [B2 B3];        [B2 B3] #       𐪒ß꣪.ᡤ\r
++N;    𐪒ß\uA8EA.ᡤ;     [B2 B3];        [B2 B3] #       𐪒ß꣪.ᡤ\r
++T;    𐪒ß\uA8EA.ᡤ;       [B2 B3];        [B2 B3] #       𐪒ß꣪.ᡤ\r
++N;    𐪒ß\uA8EA.ᡤ;       [B2 B3];        [B2 B3] #       𐪒ß꣪.ᡤ\r
++B;    𐪒SS\uA8EA.ᡤ;       [B2 B3];        [B2 B3] #       𐪒ss꣪.ᡤ\r
++B;    𐪒ss\uA8EA.ᡤ;       [B2 B3];        [B2 B3] #       𐪒ss꣪.ᡤ\r
++B;    𐪒Ss\uA8EA.ᡤ;       [B2 B3];        [B2 B3] #       𐪒ss꣪.ᡤ\r
++B;    xn--ss-tu9hw933a.xn--08e;       [B2 B3];        [B2 B3] #       𐪒ss꣪.ᡤ\r
++B;    xn--zca2517f2hvc.xn--08e;       [B2 B3];        [B2 B3] #       𐪒ß꣪.ᡤ\r
++B;    𐪒SS\uA8EA.ᡤ;     [B2 B3];        [B2 B3] #       𐪒ss꣪.ᡤ\r
++B;    𐪒ss\uA8EA.ᡤ;     [B2 B3];        [B2 B3] #       𐪒ss꣪.ᡤ\r
++B;    𐪒Ss\uA8EA.ᡤ;     [B2 B3];        [B2 B3] #       𐪒ss꣪.ᡤ\r
++T;    𐨿󠆌鸮𑚶.ς;     [V5];   [V5]\r
++N;    𐨿󠆌鸮𑚶.ς;     [V5];   [V5]\r
++B;    𐨿󠆌鸮𑚶.Σ;     [V5];   [V5]\r
++B;    𐨿󠆌鸮𑚶.σ;     [V5];   [V5]\r
++B;    xn--l76a726rt2h.xn--4xa;        [V5];   [V5]\r
++B;    xn--l76a726rt2h.xn--3xa;        [V5];   [V5]\r
++B;    ⒗𞤬。-𑚶;        [B1 P1 V3 V6];  [B1 P1 V3 V6]\r
++B;    16.𞤬。-𑚶;        [B1 V3];        [B1 V3]\r
++B;    16.𞤊。-𑚶;        [B1 V3];        [B1 V3]\r
++B;    16.xn--ke6h.xn----4j0j; [B1 V3];        [B1 V3]\r
++B;    ⒗𞤊。-𑚶;        [B1 P1 V3 V6];  [B1 P1 V3 V6]\r
++B;    xn--8shw466n.xn----4j0j;        [B1 V3 V6];     [B1 V3 V6]\r
++B;    \u08B3𞤿⾫。𐹣\u068F⒈;  [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]        #       ࢳ𞤿隹.𐹣ڏ⒈\r
++B;    \u08B3𞤿隹。𐹣\u068F1.;   [B1 B2 B3];     [B1 B2 B3]      #       ࢳ𞤿隹.𐹣ڏ1.\r
++B;    \u08B3𞤝隹。𐹣\u068F1.;   [B1 B2 B3];     [B1 B2 B3]      #       ࢳ𞤿隹.𐹣ڏ1.\r
++B;    xn--8yb0383efiwk.xn--1-wsc3373r.;       [B1 B2 B3];     [B1 B2 B3]      #       ࢳ𞤿隹.𐹣ڏ1.\r
++B;    \u08B3𞤝⾫。𐹣\u068F⒈;  [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]        #       ࢳ𞤿隹.𐹣ڏ⒈\r
++B;    xn--8yb0383efiwk.xn--ljb064mol4n;       [B1 B2 B3 V6];  [B1 B2 B3 V6]   #       ࢳ𞤿隹.𐹣ڏ⒈\r
++B;    \u2433𚎛𝟧\u0661.ᡢ8\u0F72\u0600;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       5١.ᡢ8ི\r
++B;    \u2433𚎛5\u0661.ᡢ8\u0F72\u0600;     [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       5١.ᡢ8ི\r
++B;    xn--5-bqc410un435a.xn--8-rkc763epjj;    [B5 B6 V6];     [B5 B6 V6]      #       5١.ᡢ8ི\r
++B;    𐹠.🄀⒒-󨰈;      [B1 P1 V6];     [B1 P1 V6]\r
++B;    𐹠.0.11.-󨰈;        [B1 P1 V3 V6];  [B1 P1 V3 V6]\r
++B;    xn--7n0d.0.11.xn----8j07m;      [B1 V3 V6];     [B1 V3 V6]\r
++B;    xn--7n0d.xn----xcp9757q1s13g;   [B1 V6];        [B1 V6]\r
++T;    ς-。\u200C𝟭-;      [C1 V3];        [V3]    #       ς-.1-\r
++N;    ς-。\u200C𝟭-;      [C1 V3];        [C1 V3] #       ς-.1-\r
++T;    ς-。\u200C1-; [C1 V3];        [V3]    #       ς-.1-\r
++N;    ς-。\u200C1-; [C1 V3];        [C1 V3] #       ς-.1-\r
++T;    Σ-。\u200C1-; [C1 V3];        [V3]    #       σ-.1-\r
++N;    Σ-。\u200C1-; [C1 V3];        [C1 V3] #       σ-.1-\r
++T;    σ-。\u200C1-; [C1 V3];        [V3]    #       σ-.1-\r
++N;    σ-。\u200C1-; [C1 V3];        [C1 V3] #       σ-.1-\r
++B;    xn----zmb.1-;   [V3];   [V3]\r
++B;    xn----zmb.xn--1--i1t;   [C1 V3];        [C1 V3] #       σ-.1-\r
++B;    xn----xmb.xn--1--i1t;   [C1 V3];        [C1 V3] #       ς-.1-\r
++T;    Σ-。\u200C𝟭-;      [C1 V3];        [V3]    #       σ-.1-\r
++N;    Σ-。\u200C𝟭-;      [C1 V3];        [C1 V3] #       σ-.1-\r
++T;    σ-。\u200C𝟭-;      [C1 V3];        [V3]    #       σ-.1-\r
++N;    σ-。\u200C𝟭-;      [C1 V3];        [C1 V3] #       σ-.1-\r
++B;    \u1734-\u0CE2.󠄩Ⴄ;        [P1 V5 V6];     [P1 V5 V6]      #       ᜴-ೢ.Ⴄ\r
++B;    \u1734-\u0CE2.󠄩Ⴄ;  [P1 V5 V6];     [P1 V5 V6]      #       ᜴-ೢ.Ⴄ\r
++B;    \u1734-\u0CE2.󠄩ⴄ;  [V5];   [V5]    #       ᜴-ೢ.ⴄ\r
++B;    xn----ggf830f.xn--vkj;  [V5];   [V5]    #       ᜴-ೢ.ⴄ\r
++B;    xn----ggf830f.xn--cnd;  [V5 V6];        [V5 V6] #       ᜴-ೢ.Ⴄ\r
++B;    \u1734-\u0CE2.󠄩ⴄ;        [V5];   [V5]    #       ᜴-ೢ.ⴄ\r
++B;    򭈗♋\u06BB𐦥。\u0954⒈;  [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ♋ڻ𐦥.॔⒈\r
++B;    򭈗♋\u06BB𐦥。\u09541.;   [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ♋ڻ𐦥.॔1.\r
++B;    xn--ukb372n129m3rs7f.xn--1-fyd.;        [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       ♋ڻ𐦥.॔1.\r
++B;    xn--ukb372n129m3rs7f.xn--u3b240l;       [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       ♋ڻ𐦥.॔⒈\r
++T;    \u05A4.\u06C1\u1AB3\u200C;    [B1 B3 B6 C1 V5];       [B1 B3 B6 V5]   #       ֤.ہ᪳\r
++N;    \u05A4.\u06C1\u1AB3\u200C;    [B1 B3 B6 C1 V5];       [B1 B3 B6 C1 V5]        #       ֤.ہ᪳\r
++T;    \u05A4.\u06C1\u1AB3\u200C;      [B1 B3 B6 C1 V5];       [B1 B3 B6 V5]   #       ֤.ہ᪳\r
++N;    \u05A4.\u06C1\u1AB3\u200C;      [B1 B3 B6 C1 V5];       [B1 B3 B6 C1 V5]        #       ֤.ہ᪳\r
++B;    xn--vcb.xn--0kb623h;    [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ֤.ہ᪳\r
++B;    xn--vcb.xn--0kb623hm1d; [B1 B3 B6 C1 V5];       [B1 B3 B6 C1 V5]        #       ֤.ہ᪳\r
++B;    񢭏\u0846≮\u0ACD.𞦊;     [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ࡆ≮્.\r
++B;    񢭏\u0846<\u0338\u0ACD.𞦊; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ࡆ≮્.\r
++B;    񢭏\u0846≮\u0ACD.𞦊;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ࡆ≮્.\r
++B;    񢭏\u0846<\u0338\u0ACD.𞦊;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ࡆ≮્.\r
++B;    xn--4vb80kq29ayo62l.xn--8g6h;   [B5 B6 V6];     [B5 B6 V6]      #       ࡆ≮્.\r
++T;    \u200D。𞀘⒈ꡍ擉; [C2 P1 V5 V6];  [P1 V5 V6 A4_2] #       .𞀘⒈ꡍ擉\r
++N;    \u200D。𞀘⒈ꡍ擉; [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       .𞀘⒈ꡍ擉\r
++T;    \u200D。𞀘1.ꡍ擉;  [C2 V5];        [V5 A4_2]       #       .𞀘1.ꡍ擉\r
++N;    \u200D。𞀘1.ꡍ擉;  [C2 V5];        [C2 V5] #       .𞀘1.ꡍ擉\r
++B;    .xn--1-1p4r.xn--s7uv61m;        [V5 A4_2];      [V5 A4_2]\r
++B;    xn--1ug.xn--1-1p4r.xn--s7uv61m; [C2 V5];        [C2 V5] #       .𞀘1.ꡍ擉\r
++B;    .xn--tsh026uql4bew9p;   [V5 V6 A4_2];   [V5 V6 A4_2]\r
++B;    xn--1ug.xn--tsh026uql4bew9p;    [C2 V5 V6];     [C2 V5 V6]      #       .𞀘⒈ꡍ擉\r
++B;    ₈\u07CB.\uFB64≠;  [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       8ߋ.ٿ≠\r
++B;    ₈\u07CB.\uFB64=\u0338;      [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       8ߋ.ٿ≠\r
++B;    8\u07CB.\u067F≠;      [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       8ߋ.ٿ≠\r
++B;    8\u07CB.\u067F=\u0338;  [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       8ߋ.ٿ≠\r
++B;    xn--8-zbd.xn--4ib883l;  [B1 B3 V6];     [B1 B3 V6]      #       8ߋ.ٿ≠\r
++B;    ᢡ\u07DE򹐣.⒒\u0642𑍦;    [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       ᢡߞ.⒒ق𑍦\r
++B;    ᢡ\u07DE򹐣.11.\u0642𑍦;    [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       ᢡߞ.11.ق𑍦\r
++B;    xn--5sb596fi873t.11.xn--ehb4198k;       [B1 B5 V6];     [B1 B5 V6]      #       ᢡߞ.11.ق𑍦\r
++B;    xn--5sb596fi873t.xn--ehb336mvy7n;       [B1 B5 V6];     [B1 B5 V6]      #       ᢡߞ.⒒ق𑍦\r
++B;    \u0E48-𐹺𝟜.\u0363\u06E1⒏;        [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ่-𐹺4.ͣۡ⒏\r
++B;    \u0E48-𐹺4.\u0363\u06E18.;    [B1 V5];        [B1 V5] #       ่-𐹺4.ͣۡ8.\r
++B;    xn---4-owiz479s.xn--8-ihb69x.;  [B1 V5];        [B1 V5] #       ่-𐹺4.ͣۡ8.\r
++B;    xn---4-owiz479s.xn--eva20pjv9a; [B1 V5 V6];     [B1 V5 V6]      #       ่-𐹺4.ͣۡ⒏\r
++B;    ⫐。Ⴠ-󃐢; [P1 V6];        [P1 V6]\r
++B;    ⫐。Ⴠ-󃐢; [P1 V6];        [P1 V6]\r
++B;    ⫐。ⴠ-󃐢; [P1 V6];        [P1 V6]\r
++B;    xn--r3i.xn----2wst7439i;        [V6];   [V6]\r
++B;    xn--r3i.xn----z1g58579u;        [V6];   [V6]\r
++B;    ⫐。ⴠ-󃐢; [P1 V6];        [P1 V6]\r
++B;    𑑂◊.⦟∠;       [V5];   [V5]\r
++B;    𑑂◊.⦟∠; [V5];   [V5]\r
++B;    xn--01h3338f.xn--79g270a;       [V5];   [V5]\r
++B;    𿌰-\u0662。󋸛ꡂ;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       -٢.ꡂ\r
++B;    xn----dqc20828e.xn--bc9an2879c; [B5 B6 V6];     [B5 B6 V6]      #       -٢.ꡂ\r
++B;    \u0678。󠏬\u0741𞪭𐹪;    [B1 P1 V6];     [B1 P1 V6]      #       يٴ.݁𐹪\r
++B;    \u064A\u0674。󠏬\u0741𞪭𐹪;      [B1 P1 V6];     [B1 P1 V6]      #       يٴ.݁𐹪\r
++B;    xn--mhb8f.xn--oob2585kfdsfsbo7h;        [B1 V6];        [B1 V6] #       يٴ.݁𐹪\r
++T;    𐫆ꌄ。\u200Dᣬ;    [B1 B2 B3 C2];  [B2 B3] #       𐫆ꌄ.ᣬ\r
++N;    𐫆ꌄ。\u200Dᣬ;    [B1 B2 B3 C2];  [B1 B2 B3 C2]   #       𐫆ꌄ.ᣬ\r
++T;    𐫆ꌄ。\u200Dᣬ;    [B1 B2 B3 C2];  [B2 B3] #       𐫆ꌄ.ᣬ\r
++N;    𐫆ꌄ。\u200Dᣬ;    [B1 B2 B3 C2];  [B1 B2 B3 C2]   #       𐫆ꌄ.ᣬ\r
++B;    xn--y77ao18q.xn--wdf;   [B2 B3];        [B2 B3]\r
++B;    xn--y77ao18q.xn--wdf367a;       [B1 B2 B3 C2];  [B1 B2 B3 C2]   #       𐫆ꌄ.ᣬ\r
++B;    ₀\u0662。󅪞≯-;   [B1 B6 P1 V3 V6];       [B1 B6 P1 V3 V6]        #       0٢.≯-\r
++B;    ₀\u0662。󅪞>\u0338-;       [B1 B6 P1 V3 V6];       [B1 B6 P1 V3 V6]        #       0٢.≯-\r
++B;    0\u0662。󅪞≯-;     [B1 B6 P1 V3 V6];       [B1 B6 P1 V3 V6]        #       0٢.≯-\r
++B;    0\u0662。󅪞>\u0338-; [B1 B6 P1 V3 V6];       [B1 B6 P1 V3 V6]        #       0٢.≯-\r
++B;    xn--0-dqc.xn----ogov3342l;      [B1 B6 V3 V6];  [B1 B6 V3 V6]   #       0٢.≯-\r
++B;    \u031C𐹫-𞯃.𐋤\u0845;     [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ̜𐹫-.𐋤ࡅ\r
++B;    xn----gdb7046r692g.xn--3vb1349j;        [B1 V5 V6];     [B1 V5 V6]      #       ̜𐹫-.𐋤ࡅ\r
++B;    ≠。𝩑𐹩Ⴡ\u0594;        [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≠.𝩑𐹩Ⴡ֔\r
++B;    =\u0338。𝩑𐹩Ⴡ\u0594;    [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≠.𝩑𐹩Ⴡ֔\r
++B;    ≠。𝩑𐹩Ⴡ\u0594;        [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≠.𝩑𐹩Ⴡ֔\r
++B;    =\u0338。𝩑𐹩Ⴡ\u0594;    [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≠.𝩑𐹩Ⴡ֔\r
++B;    =\u0338。𝩑𐹩ⴡ\u0594;    [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≠.𝩑𐹩ⴡ֔\r
++B;    ≠。𝩑𐹩ⴡ\u0594;        [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≠.𝩑𐹩ⴡ֔\r
++B;    xn--1ch.xn--fcb363rk03mypug;    [B1 V5 V6];     [B1 V5 V6]      #       ≠.𝩑𐹩ⴡ֔\r
++B;    xn--1ch.xn--fcb538c649rypog;    [B1 V5 V6];     [B1 V5 V6]      #       ≠.𝩑𐹩Ⴡ֔\r
++B;    =\u0338。𝩑𐹩ⴡ\u0594;    [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≠.𝩑𐹩ⴡ֔\r
++B;    ≠。𝩑𐹩ⴡ\u0594;        [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≠.𝩑𐹩ⴡ֔\r
++B;    𖫳≠.Ⴀ𐮀;        [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]\r
++B;    𖫳=\u0338.Ⴀ𐮀;    [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]\r
++B;    𖫳=\u0338.ⴀ𐮀;    [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]\r
++B;    𖫳≠.ⴀ𐮀;        [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]\r
++B;    xn--1ch9250k.xn--rkj6232e;      [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]\r
++B;    xn--1ch9250k.xn--7md2659j;      [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]\r
++B;    󠅾\u0736\u0726.ᢚ閪\u08E2𝩟;    [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ܶܦ.ᢚ閪𝩟\r
++B;    󠅾\u0736\u0726.ᢚ閪\u08E2𝩟;      [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ܶܦ.ᢚ閪𝩟\r
++B;    xn--wnb5a.xn--l0b161fis8gbp5m;  [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       ܶܦ.ᢚ閪𝩟\r
++T;    \u200D󠇜\u06CB\uA8E9。\u20DD\u0FB0-ᛟ;      [B1 C2 V5];     [B1 V5] #       ۋ꣩.⃝ྰ-ᛟ\r
++N;    \u200D󠇜\u06CB\uA8E9。\u20DD\u0FB0-ᛟ;      [B1 C2 V5];     [B1 C2 V5]      #       ۋ꣩.⃝ྰ-ᛟ\r
++T;    \u200D󠇜\u06CB\uA8E9。\u20DD\u0FB0-ᛟ;      [B1 C2 V5];     [B1 V5] #       ۋ꣩.⃝ྰ-ᛟ\r
++N;    \u200D󠇜\u06CB\uA8E9。\u20DD\u0FB0-ᛟ;      [B1 C2 V5];     [B1 C2 V5]      #       ۋ꣩.⃝ྰ-ᛟ\r
++B;    xn--blb8114f.xn----gmg236cj6k;  [B1 V5];        [B1 V5] #       ۋ꣩.⃝ྰ-ᛟ\r
++B;    xn--blb540ke10h.xn----gmg236cj6k;       [B1 C2 V5];     [B1 C2 V5]      #       ۋ꣩.⃝ྰ-ᛟ\r
++B;    헁󘖙\u0E3A󚍚。\u06BA𝟜; [P1 V6];        [P1 V6] #       헁ฺ.ں4\r
++B;    헁󘖙\u0E3A󚍚。\u06BA𝟜;   [P1 V6];        [P1 V6] #       헁ฺ.ں4\r
++B;    헁󘖙\u0E3A󚍚。\u06BA4;    [P1 V6];        [P1 V6] #       헁ฺ.ں4\r
++B;    헁󘖙\u0E3A󚍚。\u06BA4;      [P1 V6];        [P1 V6] #       헁ฺ.ں4\r
++B;    xn--o4c1723h8g85gt4ya.xn--4-dvc;        [V6];   [V6]    #       헁ฺ.ں4\r
++T;    𐹭。󃱂\u200CႾ;   [B1 C1 P1 V6];  [B1 P1 V6]      #       𐹭.Ⴞ\r
++N;    𐹭。󃱂\u200CႾ;   [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹭.Ⴞ\r
++T;    𐹭。󃱂\u200CႾ;   [B1 C1 P1 V6];  [B1 P1 V6]      #       𐹭.Ⴞ\r
++N;    𐹭。󃱂\u200CႾ;   [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹭.Ⴞ\r
++T;    𐹭。󃱂\u200Cⴞ;   [B1 C1 P1 V6];  [B1 P1 V6]      #       𐹭.ⴞ\r
++N;    𐹭。󃱂\u200Cⴞ;   [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹭.ⴞ\r
++B;    xn--lo0d.xn--mljx1099g; [B1 V6];        [B1 V6]\r
++B;    xn--lo0d.xn--0ugx72cwi33v;      [B1 C1 V6];     [B1 C1 V6]      #       𐹭.ⴞ\r
++B;    xn--lo0d.xn--2nd75260n; [B1 V6];        [B1 V6]\r
++B;    xn--lo0d.xn--2nd949eqw95u;      [B1 C1 V6];     [B1 C1 V6]      #       𐹭.Ⴞ\r
++T;    𐹭。󃱂\u200Cⴞ;   [B1 C1 P1 V6];  [B1 P1 V6]      #       𐹭.ⴞ\r
++N;    𐹭。󃱂\u200Cⴞ;   [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹭.ⴞ\r
++B;    \uA953.\u033D𑂽馋;   [P1 V5 V6];     [P1 V5 V6]      #       ꥓.̽馋\r
++B;    xn--3j9a.xn--bua0708eqzrd;      [V5 V6];        [V5 V6] #       ꥓.̽馋\r
++T;    󈫝򪛸\u200D。䜖;   [C2 P1 V6];     [P1 V6] #       .䜖\r
++N;    󈫝򪛸\u200D。䜖;   [C2 P1 V6];     [C2 P1 V6]      #       .䜖\r
++T;    󈫝򪛸\u200D。䜖;   [C2 P1 V6];     [P1 V6] #       .䜖\r
++N;    󈫝򪛸\u200D。䜖;   [C2 P1 V6];     [C2 P1 V6]      #       .䜖\r
++B;    xn--g138cxw05a.xn--k0o; [V6];   [V6]\r
++B;    xn--1ug30527h9mxi.xn--k0o;      [C2 V6];        [C2 V6] #       .䜖\r
++T;    ᡯ⚉姶🄉.۷\u200D🎪\u200D;     [C2 P1 V6];     [P1 V6] #       ᡯ⚉姶🄉.۷🎪\r
++N;    ᡯ⚉姶🄉.۷\u200D🎪\u200D;     [C2 P1 V6];     [C2 P1 V6]      #       ᡯ⚉姶🄉.۷🎪\r
++T;    ᡯ⚉姶8,.۷\u200D🎪\u200D; [C2 P1 V6];     [P1 V6] #       ᡯ⚉姶8,.۷🎪\r
++N;    ᡯ⚉姶8,.۷\u200D🎪\u200D; [C2 P1 V6];     [C2 P1 V6]      #       ᡯ⚉姶8,.۷🎪\r
++B;    xn--8,-g9oy26fzu4d.xn--kmb6733w;        [P1 V6];        [P1 V6]\r
++B;    xn--8,-g9oy26fzu4d.xn--kmb859ja94998b;  [C2 P1 V6];     [C2 P1 V6]      #       ᡯ⚉姶8,.۷🎪\r
++B;    xn--c9e433epi4b3j20a.xn--kmb6733w;      [V6];   [V6]\r
++B;    xn--c9e433epi4b3j20a.xn--kmb859ja94998b;        [C2 V6];        [C2 V6] #       ᡯ⚉姶🄉.۷🎪\r
++B;    𞽀.𐹸🚖\u0E3A;    [B1 P1 V6];     [B1 P1 V6]      #       .𐹸🚖ฺ\r
++B;    xn--0n7h.xn--o4c9032klszf;      [B1 V6];        [B1 V6] #       .𐹸🚖ฺ\r
++B;    Ⴔᠵ。𐹧\u0747۹;  [B1 P1 V6];     [B1 P1 V6]      #       Ⴔᠵ.𐹧݇۹\r
++B;    Ⴔᠵ。𐹧\u0747۹;  [B1 P1 V6];     [B1 P1 V6]      #       Ⴔᠵ.𐹧݇۹\r
++B;    ⴔᠵ。𐹧\u0747۹;  [B1];   [B1]    #       ⴔᠵ.𐹧݇۹\r
++B;    xn--o7e997h.xn--mmb9ml895e;     [B1];   [B1]    #       ⴔᠵ.𐹧݇۹\r
++B;    xn--snd659a.xn--mmb9ml895e;     [B1 V6];        [B1 V6] #       Ⴔᠵ.𐹧݇۹\r
++B;    ⴔᠵ。𐹧\u0747۹;  [B1];   [B1]    #       ⴔᠵ.𐹧݇۹\r
++T;    \u135Fᡈ\u200C.︒-𖾐-;    [C1 P1 V3 V5 V6];       [P1 V3 V5 V6]   #       ፟ᡈ.︒-𖾐-\r
++N;    \u135Fᡈ\u200C.︒-𖾐-;    [C1 P1 V3 V5 V6];       [C1 P1 V3 V5 V6]        #       ፟ᡈ.︒-𖾐-\r
++T;    \u135Fᡈ\u200C.。-𖾐-;      [C1 V3 V5 A4_2];        [V3 V5 A4_2]    #       ፟ᡈ..-𖾐-\r
++N;    \u135Fᡈ\u200C.。-𖾐-;      [C1 V3 V5 A4_2];        [C1 V3 V5 A4_2] #       ፟ᡈ..-𖾐-\r
++B;    xn--b7d82w..xn-----pe4u;        [V3 V5 A4_2];   [V3 V5 A4_2]    #       ፟ᡈ..-𖾐-\r
++B;    xn--b7d82wo4h..xn-----pe4u;     [C1 V3 V5 A4_2];        [C1 V3 V5 A4_2] #       ፟ᡈ..-𖾐-\r
++B;    xn--b7d82w.xn-----c82nz547a;    [V3 V5 V6];     [V3 V5 V6]      #       ፟ᡈ.︒-𖾐-\r
++B;    xn--b7d82wo4h.xn-----c82nz547a; [C1 V3 V5 V6];  [C1 V3 V5 V6]   #       ፟ᡈ.︒-𖾐-\r
++T;    ⒈\u0601⒖\u200C.\u1DF0\u07DB;        [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       ⒈⒖.ᷰߛ\r
++N;    ⒈\u0601⒖\u200C.\u1DF0\u07DB;        [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       ⒈⒖.ᷰߛ\r
++T;    1.\u060115.\u200C.\u1DF0\u07DB; [B1 C1 P1 V5 V6];       [B1 P1 V5 V6 A4_2]      #       1.15..ᷰߛ\r
++N;    1.\u060115.\u200C.\u1DF0\u07DB; [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       1.15..ᷰߛ\r
++B;    1.xn--15-1pd..xn--2sb914i;      [B1 V5 V6 A4_2];        [B1 V5 V6 A4_2] #       1.15..ᷰߛ\r
++B;    1.xn--15-1pd.xn--0ug.xn--2sb914i;       [B1 C1 V5 V6];  [B1 C1 V5 V6]   #       1.15..ᷰߛ\r
++B;    xn--jfb347mib.xn--2sb914i;      [B1 V5 V6];     [B1 V5 V6]      #       ⒈⒖.ᷰߛ\r
++B;    xn--jfb844kmfdwb.xn--2sb914i;   [B1 C1 V5 V6];  [B1 C1 V5 V6]   #       ⒈⒖.ᷰߛ\r
++B;    𝩜。-\u0B4DႫ;      [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       𝩜.-୍Ⴋ\r
++B;    𝩜。-\u0B4Dⴋ;      [V3 V5];        [V3 V5] #       𝩜.-୍ⴋ\r
++B;    xn--792h.xn----bse820x; [V3 V5];        [V3 V5] #       𝩜.-୍ⴋ\r
++B;    xn--792h.xn----bse632b; [V3 V5 V6];     [V3 V5 V6]      #       𝩜.-୍Ⴋ\r
++T;    ßჀ.\u0620刯Ⴝ;     [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ßჀ.ؠ刯Ⴝ\r
++N;    ßჀ.\u0620刯Ⴝ;     [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ßჀ.ؠ刯Ⴝ\r
++T;    ßⴠ.\u0620刯ⴝ;     [B2 B3];        [B2 B3] #       ßⴠ.ؠ刯ⴝ\r
++N;    ßⴠ.\u0620刯ⴝ;     [B2 B3];        [B2 B3] #       ßⴠ.ؠ刯ⴝ\r
++B;    SSჀ.\u0620刯Ⴝ;     [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ssჀ.ؠ刯Ⴝ\r
++B;    ssⴠ.\u0620刯ⴝ;     [B2 B3];        [B2 B3] #       ssⴠ.ؠ刯ⴝ\r
++B;    Ssⴠ.\u0620刯Ⴝ;     [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ssⴠ.ؠ刯Ⴝ\r
++B;    xn--ss-j81a.xn--fgb845cb66c;    [B2 B3 V6];     [B2 B3 V6]      #       ssⴠ.ؠ刯Ⴝ\r
++B;    xn--ss-j81a.xn--fgb670rovy;     [B2 B3];        [B2 B3] #       ssⴠ.ؠ刯ⴝ\r
++B;    xn--ss-wgk.xn--fgb845cb66c;     [B2 B3 V6];     [B2 B3 V6]      #       ssჀ.ؠ刯Ⴝ\r
++B;    xn--zca277t.xn--fgb670rovy;     [B2 B3];        [B2 B3] #       ßⴠ.ؠ刯ⴝ\r
++B;    xn--zca442f.xn--fgb845cb66c;    [B2 B3 V6];     [B2 B3 V6]      #       ßჀ.ؠ刯Ⴝ\r
++B;    \u1BAAႣℲ。ᠳ툻\u0673;    [B5 B6 P1 V5 V6];       [B5 B6 P1 V5 V6]        #       ᮪ႣℲ.ᠳ툻ٳ\r
++B;    \u1BAAႣℲ。ᠳ툻\u0673;      [B5 B6 P1 V5 V6];       [B5 B6 P1 V5 V6]        #       ᮪ႣℲ.ᠳ툻ٳ\r
++B;    \u1BAAႣℲ。ᠳ툻\u0673;    [B5 B6 P1 V5 V6];       [B5 B6 P1 V5 V6]        #       ᮪ႣℲ.ᠳ툻ٳ\r
++B;    \u1BAAႣℲ。ᠳ툻\u0673;      [B5 B6 P1 V5 V6];       [B5 B6 P1 V5 V6]        #       ᮪ႣℲ.ᠳ툻ٳ\r
++B;    \u1BAAⴃⅎ。ᠳ툻\u0673;      [B5 B6 V5];     [B5 B6 V5]      #       ᮪ⴃⅎ.ᠳ툻ٳ\r
++B;    \u1BAAⴃⅎ。ᠳ툻\u0673;    [B5 B6 V5];     [B5 B6 V5]      #       ᮪ⴃⅎ.ᠳ툻ٳ\r
++B;    \u1BAAႣⅎ。ᠳ툻\u0673;    [B5 B6 P1 V5 V6];       [B5 B6 P1 V5 V6]        #       ᮪Ⴃⅎ.ᠳ툻ٳ\r
++B;    \u1BAAႣⅎ。ᠳ툻\u0673;      [B5 B6 P1 V5 V6];       [B5 B6 P1 V5 V6]        #       ᮪Ⴃⅎ.ᠳ툻ٳ\r
++B;    xn--bnd957c2pe.xn--sib102gc69k; [B5 B6 V5 V6];  [B5 B6 V5 V6]   #       ᮪Ⴃⅎ.ᠳ툻ٳ\r
++B;    xn--yxf24x4ol.xn--sib102gc69k;  [B5 B6 V5];     [B5 B6 V5]      #       ᮪ⴃⅎ.ᠳ툻ٳ\r
++B;    xn--bnd957cone.xn--sib102gc69k; [B5 B6 V5 V6];  [B5 B6 V5 V6]   #       ᮪ႣℲ.ᠳ툻ٳ\r
++B;    \u1BAAⴃⅎ。ᠳ툻\u0673;      [B5 B6 V5];     [B5 B6 V5]      #       ᮪ⴃⅎ.ᠳ툻ٳ\r
++B;    \u1BAAⴃⅎ。ᠳ툻\u0673;    [B5 B6 V5];     [B5 B6 V5]      #       ᮪ⴃⅎ.ᠳ툻ٳ\r
++B;    \u1BAAႣⅎ。ᠳ툻\u0673;    [B5 B6 P1 V5 V6];       [B5 B6 P1 V5 V6]        #       ᮪Ⴃⅎ.ᠳ툻ٳ\r
++B;    \u1BAAႣⅎ。ᠳ툻\u0673;      [B5 B6 P1 V5 V6];       [B5 B6 P1 V5 V6]        #       ᮪Ⴃⅎ.ᠳ툻ٳ\r
++B;    \u06EC.\u08A2𐹫\u067C;        [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ۬.ࢢ𐹫ټ\r
++B;    xn--8lb.xn--1ib31ily45b;        [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ۬.ࢢ𐹫ټ\r
++B;    \u06B6\u06DF。₇\uA806;       [B1];   [B1]    #       ڶ۟.7꠆\r
++B;    \u06B6\u06DF。7\uA806; [B1];   [B1]    #       ڶ۟.7꠆\r
++B;    xn--pkb6f.xn--7-x93e;   [B1];   [B1]    #       ڶ۟.7꠆\r
++B;    \u06B6\u06DF.7\uA806;   [B1];   [B1]    #       ڶ۟.7꠆\r
++T;    Ⴣ𐹻.\u200C𝪣≮󠩉;      [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 P1 V5 V6]     #       Ⴣ𐹻.𝪣≮\r
++N;    Ⴣ𐹻.\u200C𝪣≮󠩉;      [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       Ⴣ𐹻.𝪣≮\r
++T;    Ⴣ𐹻.\u200C𝪣<\u0338󠩉;  [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 P1 V5 V6]     #       Ⴣ𐹻.𝪣≮\r
++N;    Ⴣ𐹻.\u200C𝪣<\u0338󠩉;  [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       Ⴣ𐹻.𝪣≮\r
++T;    ⴣ𐹻.\u200C𝪣<\u0338󠩉;  [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 P1 V5 V6]     #       ⴣ𐹻.𝪣≮\r
++N;    ⴣ𐹻.\u200C𝪣<\u0338󠩉;  [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       ⴣ𐹻.𝪣≮\r
++T;    ⴣ𐹻.\u200C𝪣≮󠩉;      [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 P1 V5 V6]     #       ⴣ𐹻.𝪣≮\r
++N;    ⴣ𐹻.\u200C𝪣≮󠩉;      [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       ⴣ𐹻.𝪣≮\r
++B;    xn--rlj6323e.xn--gdh4944ob3x3e; [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]\r
++B;    xn--rlj6323e.xn--0ugy6gn120eb103g;      [B1 B5 B6 C1 V6];       [B1 B5 B6 C1 V6]        #       ⴣ𐹻.𝪣≮\r
++B;    xn--7nd8101k.xn--gdh4944ob3x3e; [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]\r
++B;    xn--7nd8101k.xn--0ugy6gn120eb103g;      [B1 B5 B6 C1 V6];       [B1 B5 B6 C1 V6]        #       Ⴣ𐹻.𝪣≮\r
++T;    𝟵隁⯮.\u180D\u200C;      [C1];   xn--9-mfs8024b. #       9隁⯮.\r
++N;    𝟵隁⯮.\u180D\u200C;      [C1];   [C1]    #       9隁⯮.\r
++T;    9隁⯮.\u180D\u200C;   [C1];   xn--9-mfs8024b. #       9隁⯮.\r
++N;    9隁⯮.\u180D\u200C;   [C1];   [C1]    #       9隁⯮.\r
++B;    xn--9-mfs8024b.;        9隁⯮.;       xn--9-mfs8024b.;        NV8\r
++B;    9隁⯮.;       ;       xn--9-mfs8024b.;        NV8\r
++B;    xn--9-mfs8024b.xn--0ug; [C1];   [C1]    #       9隁⯮.\r
++B;    ⒏𐹧。Ⴣ\u0F84彦; [B1 P1 V6];     [B1 P1 V6]      #       ⒏𐹧.Ⴣ྄彦\r
++B;    8.𐹧。Ⴣ\u0F84彦;  [B1 P1 V6];     [B1 P1 V6]      #       8.𐹧.Ⴣ྄彦\r
++B;    8.𐹧。ⴣ\u0F84彦;  [B1];   [B1]    #       8.𐹧.ⴣ྄彦\r
++B;    8.xn--fo0d.xn--3ed972m6o8a;     [B1];   [B1]    #       8.𐹧.ⴣ྄彦\r
++B;    8.xn--fo0d.xn--3ed15dt93o;      [B1 V6];        [B1 V6] #       8.𐹧.Ⴣ྄彦\r
++B;    ⒏𐹧。ⴣ\u0F84彦; [B1 P1 V6];     [B1 P1 V6]      #       ⒏𐹧.ⴣ྄彦\r
++B;    xn--0sh2466f.xn--3ed972m6o8a;   [B1 V6];        [B1 V6] #       ⒏𐹧.ⴣ྄彦\r
++B;    xn--0sh2466f.xn--3ed15dt93o;    [B1 V6];        [B1 V6] #       ⒏𐹧.Ⴣ྄彦\r
++B;    -问񬰔⒛。\u0604-񜗉橬;   [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -问⒛.-橬\r
++B;    -问񬰔20.。\u0604-񜗉橬;   [B1 P1 V3 V6 A4_2];     [B1 P1 V3 V6 A4_2]      #       -问20..-橬\r
++B;    xn---20-658jx1776d..xn----ykc7228efm46d;        [B1 V3 V6 A4_2];        [B1 V3 V6 A4_2] #       -问20..-橬\r
++B;    xn----hdpu849bhis3e.xn----ykc7228efm46d;        [B1 V3 V6];     [B1 V3 V6]      #       -问⒛.-橬\r
++T;    \u1BACႬ\u200C\u0325。𝟸;   [C1 P1 V5 V6];  [P1 V5 V6]      #       ᮬႬ̥.2\r
++N;    \u1BACႬ\u200C\u0325。𝟸;   [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ᮬႬ̥.2\r
++T;    \u1BACႬ\u200C\u0325。2;      [C1 P1 V5 V6];  [P1 V5 V6]      #       ᮬႬ̥.2\r
++N;    \u1BACႬ\u200C\u0325。2;      [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ᮬႬ̥.2\r
++T;    \u1BACⴌ\u200C\u0325。2;      [C1 V5];        [V5]    #       ᮬⴌ̥.2\r
++N;    \u1BACⴌ\u200C\u0325。2;      [C1 V5];        [C1 V5] #       ᮬⴌ̥.2\r
++B;    xn--mta176jjjm.2;       [V5];   [V5]    #       ᮬⴌ̥.2\r
++B;    xn--mta176j97cl2q.2;    [C1 V5];        [C1 V5] #       ᮬⴌ̥.2\r
++B;    xn--mta930emri.2;       [V5 V6];        [V5 V6] #       ᮬႬ̥.2\r
++B;    xn--mta930emribme.2;    [C1 V5 V6];     [C1 V5 V6]      #       ᮬႬ̥.2\r
++T;    \u1BACⴌ\u200C\u0325。𝟸;   [C1 V5];        [V5]    #       ᮬⴌ̥.2\r
++N;    \u1BACⴌ\u200C\u0325。𝟸;   [C1 V5];        [C1 V5] #       ᮬⴌ̥.2\r
++B;    \uDC5F。\uA806\u0669󠒩;      [B1 P1 V5 V6];  [B1 P1 V5 V6 A3]        #       .꠆٩\r
++B;    \uDC5F.xn--iib9583fusy0i;       [B1 P1 V5 V6];  [B1 P1 V5 V6 A3]        #       .꠆٩\r
++B;    \uDC5F.XN--IIB9583FUSY0I;       [B1 P1 V5 V6];  [B1 P1 V5 V6 A3]        #       .꠆٩\r
++B;    \uDC5F.Xn--Iib9583fusy0i;       [B1 P1 V5 V6];  [B1 P1 V5 V6 A3]        #       .꠆٩\r
++B;    󠄁\u035F⾶。₇︒눇≮;   [P1 V5 V6];     [P1 V5 V6]      #       ͟飛.7︒눇≮\r
++B;    󠄁\u035F⾶。₇︒눇<\u0338; [P1 V5 V6];     [P1 V5 V6]      #       ͟飛.7︒눇≮\r
++B;    󠄁\u035F飛。7。눇≮;     [P1 V5 V6];     [P1 V5 V6]      #       ͟飛.7.눇≮\r
++B;    󠄁\u035F飛。7。눇<\u0338;   [P1 V5 V6];     [P1 V5 V6]      #       ͟飛.7.눇≮\r
++B;    xn--9ua0567e.7.xn--gdh6767c;    [V5 V6];        [V5 V6] #       ͟飛.7.눇≮\r
++B;    xn--9ua0567e.xn--7-ngou006d1ttc;        [V5 V6];        [V5 V6] #       ͟飛.7︒눇≮\r
++T;    \u200C\uFE09𐹴\u200D.\u200C⿃;     [B1 C1 C2];     [B1]    #       𐹴.鳥\r
++N;    \u200C\uFE09𐹴\u200D.\u200C⿃;     [B1 C1 C2];     [B1 C1 C2]      #       𐹴.鳥\r
++T;    \u200C\uFE09𐹴\u200D.\u200C鳥;       [B1 C1 C2];     [B1]    #       𐹴.鳥\r
++N;    \u200C\uFE09𐹴\u200D.\u200C鳥;       [B1 C1 C2];     [B1 C1 C2]      #       𐹴.鳥\r
++B;    xn--so0d.xn--6x6a;      [B1];   [B1]\r
++B;    xn--0ugc6024p.xn--0ug1920c;     [B1 C1 C2];     [B1 C1 C2]      #       𐹴.鳥\r
++T;    🍮.\u200D󠗒𐦁𝨝;      [B1 C2 P1 V6];  [B1 P1 V6]      #       🍮.𐦁𝨝\r
++N;    🍮.\u200D󠗒𐦁𝨝;      [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       🍮.𐦁𝨝\r
++T;    🍮.\u200D󠗒𐦁𝨝;        [B1 C2 P1 V6];  [B1 P1 V6]      #       🍮.𐦁𝨝\r
++N;    🍮.\u200D󠗒𐦁𝨝;        [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       🍮.𐦁𝨝\r
++B;    xn--lj8h.xn--ln9ci476aqmr2g;    [B1 V6];        [B1 V6]\r
++B;    xn--lj8h.xn--1ug6603gr1pfwq37h; [B1 C2 V6];     [B1 C2 V6]      #       🍮.𐦁𝨝\r
++T;    \u067D\u0943.𞤓\u200D;        [B3 C2];        xn--2ib43l.xn--te6h     #       ٽृ.𞤵\r
++N;    \u067D\u0943.𞤓\u200D;        [B3 C2];        [B3 C2] #       ٽृ.𞤵\r
++T;    \u067D\u0943.𞤵\u200D;        [B3 C2];        xn--2ib43l.xn--te6h     #       ٽृ.𞤵\r
++N;    \u067D\u0943.𞤵\u200D;        [B3 C2];        [B3 C2] #       ٽृ.𞤵\r
++B;    xn--2ib43l.xn--te6h;    \u067D\u0943.𞤵;      xn--2ib43l.xn--te6h     #       ٽृ.𞤵\r
++B;    \u067D\u0943.𞤵;      ;       xn--2ib43l.xn--te6h     #       ٽृ.𞤵\r
++B;    \u067D\u0943.𞤓;      \u067D\u0943.𞤵;      xn--2ib43l.xn--te6h     #       ٽृ.𞤵\r
++B;    xn--2ib43l.xn--1ugy711p;        [B3 C2];        [B3 C2] #       ٽृ.𞤵\r
++B;    \u0664\u0A4D-.󥜽\u1039񦦐; [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ٤੍-.္\r
++B;    \u0664\u0A4D-.󥜽\u1039񦦐;   [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ٤੍-.္\r
++B;    xn----gqc711a.xn--9jd88234f3qm0b;       [B1 V3 V6];     [B1 V3 V6]      #       ٤੍-.္\r
++T;    4\u103A-𐹸。\uAA29\u200C𐹴≮;     [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       4်-𐹸.ꨩ𐹴≮\r
++N;    4\u103A-𐹸。\uAA29\u200C𐹴≮;     [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       4်-𐹸.ꨩ𐹴≮\r
++T;    4\u103A-𐹸。\uAA29\u200C𐹴<\u0338; [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       4်-𐹸.ꨩ𐹴≮\r
++N;    4\u103A-𐹸。\uAA29\u200C𐹴<\u0338; [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       4်-𐹸.ꨩ𐹴≮\r
++T;    4\u103A-𐹸。\uAA29\u200C𐹴≮;     [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       4်-𐹸.ꨩ𐹴≮\r
++N;    4\u103A-𐹸。\uAA29\u200C𐹴≮;     [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       4်-𐹸.ꨩ𐹴≮\r
++T;    4\u103A-𐹸。\uAA29\u200C𐹴<\u0338; [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       4်-𐹸.ꨩ𐹴≮\r
++N;    4\u103A-𐹸。\uAA29\u200C𐹴<\u0338; [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       4်-𐹸.ꨩ𐹴≮\r
++B;    xn--4--e4j7831r.xn--gdh8754cz40c;       [B1 V5 V6];     [B1 V5 V6]      #       4်-𐹸.ꨩ𐹴≮\r
++B;    xn--4--e4j7831r.xn--0ugy6gjy5sl3ud;     [B1 C1 V5 V6];  [B1 C1 V5 V6]   #       4်-𐹸.ꨩ𐹴≮\r
++T;    \u200C。\uFFA0\u0F84\u0F96;    [C1 P1 V6];     [P1 V6 A4_2]    #       .྄ྖ\r
++N;    \u200C。\uFFA0\u0F84\u0F96;    [C1 P1 V6];     [C1 P1 V6]      #       .྄ྖ\r
++T;    \u200C。\u1160\u0F84\u0F96;    [C1 P1 V6];     [P1 V6 A4_2]    #       .྄ྖ\r
++N;    \u200C。\u1160\u0F84\u0F96;    [C1 P1 V6];     [C1 P1 V6]      #       .྄ྖ\r
++B;    .xn--3ed0b20h;  [V6 A4_2];      [V6 A4_2]       #       .྄ྖ\r
++B;    xn--0ug.xn--3ed0b20h;   [C1 V6];        [C1 V6] #       .྄ྖ\r
++B;    .xn--3ed0by082k;        [V6 A4_2];      [V6 A4_2]       #       .྄ྖ\r
++B;    xn--0ug.xn--3ed0by082k; [C1 V6];        [C1 V6] #       .྄ྖ\r
++T;    ≯򍘅.\u200D𐅼򲇛;       [C2 P1 V6];     [P1 V6] #       ≯.𐅼\r
++N;    ≯򍘅.\u200D𐅼򲇛;       [C2 P1 V6];     [C2 P1 V6]      #       ≯.𐅼\r
++T;    >\u0338򍘅.\u200D𐅼򲇛;   [C2 P1 V6];     [P1 V6] #       ≯.𐅼\r
++N;    >\u0338򍘅.\u200D𐅼򲇛;   [C2 P1 V6];     [C2 P1 V6]      #       ≯.𐅼\r
++T;    ≯򍘅.\u200D𐅼򲇛; [C2 P1 V6];     [P1 V6] #       ≯.𐅼\r
++N;    ≯򍘅.\u200D𐅼򲇛; [C2 P1 V6];     [C2 P1 V6]      #       ≯.𐅼\r
++T;    >\u0338򍘅.\u200D𐅼򲇛;     [C2 P1 V6];     [P1 V6] #       ≯.𐅼\r
++N;    >\u0338򍘅.\u200D𐅼򲇛;     [C2 P1 V6];     [C2 P1 V6]      #       ≯.𐅼\r
++B;    xn--hdh84488f.xn--xy7cw2886b;   [V6];   [V6]\r
++B;    xn--hdh84488f.xn--1ug8099fbjp4e;        [C2 V6];        [C2 V6] #       ≯.𐅼\r
++T;    \u0641ß𐰯。𝟕𐫫;        [B1 B2];        [B1 B2] #       فß𐰯.7𐫫\r
++N;    \u0641ß𐰯。𝟕𐫫;        [B1 B2];        [B1 B2] #       فß𐰯.7𐫫\r
++T;    \u0641ß𐰯。7𐫫;   [B1 B2];        [B1 B2] #       فß𐰯.7𐫫\r
++N;    \u0641ß𐰯。7𐫫;   [B1 B2];        [B1 B2] #       فß𐰯.7𐫫\r
++B;    \u0641SS𐰯。7𐫫;   [B1 B2];        [B1 B2] #       فss𐰯.7𐫫\r
++B;    \u0641ss𐰯。7𐫫;   [B1 B2];        [B1 B2] #       فss𐰯.7𐫫\r
++B;    \u0641Ss𐰯。7𐫫;   [B1 B2];        [B1 B2] #       فss𐰯.7𐫫\r
++B;    xn--ss-jvd2339x.xn--7-mm5i;     [B1 B2];        [B1 B2] #       فss𐰯.7𐫫\r
++B;    xn--zca96ys96y.xn--7-mm5i;      [B1 B2];        [B1 B2] #       فß𐰯.7𐫫\r
++B;    \u0641SS𐰯。𝟕𐫫;        [B1 B2];        [B1 B2] #       فss𐰯.7𐫫\r
++B;    \u0641ss𐰯。𝟕𐫫;        [B1 B2];        [B1 B2] #       فss𐰯.7𐫫\r
++B;    \u0641Ss𐰯。𝟕𐫫;        [B1 B2];        [B1 B2] #       فss𐰯.7𐫫\r
++T;    ß\u07AC\u07A7\u08B1。𐭁􅮙𐹲;    [B2 B5 B6 P1 V6];       [B2 B5 B6 P1 V6]        #       ßެާࢱ.𐭁𐹲\r
++N;    ß\u07AC\u07A7\u08B1。𐭁􅮙𐹲;    [B2 B5 B6 P1 V6];       [B2 B5 B6 P1 V6]        #       ßެާࢱ.𐭁𐹲\r
++B;    SS\u07AC\u07A7\u08B1。𐭁􅮙𐹲;    [B2 B5 B6 P1 V6];       [B2 B5 B6 P1 V6]        #       ssެާࢱ.𐭁𐹲\r
++B;    ss\u07AC\u07A7\u08B1。𐭁􅮙𐹲;    [B2 B5 B6 P1 V6];       [B2 B5 B6 P1 V6]        #       ssެާࢱ.𐭁𐹲\r
++B;    Ss\u07AC\u07A7\u08B1。𐭁􅮙𐹲;    [B2 B5 B6 P1 V6];       [B2 B5 B6 P1 V6]        #       ssެާࢱ.𐭁𐹲\r
++B;    xn--ss-9qet02k.xn--e09co8cr9861c;       [B2 B5 B6 V6];  [B2 B5 B6 V6]   #       ssެާࢱ.𐭁𐹲\r
++B;    xn--zca685aoa95h.xn--e09co8cr9861c;     [B2 B5 B6 V6];  [B2 B5 B6 V6]   #       ßެާࢱ.𐭁𐹲\r
++B;    -。󠉗⒌𞯛;        [B1 P1 V3 V6];  [B1 P1 V3 V6]\r
++B;    -。󠉗5.𞯛; [B1 P1 V3 V6];  [B1 P1 V3 V6]\r
++B;    -.xn--5-zz21m.xn--6x6h; [B1 V3 V6];     [B1 V3 V6]\r
++B;    -.xn--xsh6367n1bi3e;    [B1 V3 V6];     [B1 V3 V6]\r
++T;    𼎏ς.-≮\uFCAB;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ς.-≮خج\r
++N;    𼎏ς.-≮\uFCAB;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ς.-≮خج\r
++T;    𼎏ς.-<\u0338\uFCAB;        [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ς.-≮خج\r
++N;    𼎏ς.-<\u0338\uFCAB;        [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ς.-≮خج\r
++T;    𼎏ς.-≮\u062E\u062C;        [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ς.-≮خج\r
++N;    𼎏ς.-≮\u062E\u062C;        [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ς.-≮خج\r
++T;    𼎏ς.-<\u0338\u062E\u062C;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ς.-≮خج\r
++N;    𼎏ς.-<\u0338\u062E\u062C;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ς.-≮خج\r
++B;    𼎏Σ.-<\u0338\u062E\u062C;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       σ.-≮خج\r
++B;    𼎏Σ.-≮\u062E\u062C;        [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       σ.-≮خج\r
++B;    𼎏σ.-≮\u062E\u062C;        [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       σ.-≮خج\r
++B;    𼎏σ.-<\u0338\u062E\u062C;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       σ.-≮خج\r
++B;    xn--4xa92520c.xn----9mcf1400a;  [B1 V3 V6];     [B1 V3 V6]      #       σ.-≮خج\r
++B;    xn--3xa13520c.xn----9mcf1400a;  [B1 V3 V6];     [B1 V3 V6]      #       ς.-≮خج\r
++B;    𼎏Σ.-<\u0338\uFCAB;        [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       σ.-≮خج\r
++B;    𼎏Σ.-≮\uFCAB;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       σ.-≮خج\r
++B;    𼎏σ.-≮\uFCAB;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       σ.-≮خج\r
++B;    𼎏σ.-<\u0338\uFCAB;        [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       σ.-≮خج\r
++B;    ꡗ\u08B8\u0719.񔤔󠛙\u0C4D\uFC3E; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ꡗࢸܙ.్كي\r
++B;    ꡗ\u08B8\u0719.񔤔󠛙\u0C4D\u0643\u064A;     [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ꡗࢸܙ.్كي\r
++B;    xn--jnb34fs003a.xn--fhbo927bk128mpi24d; [B5 B6 V6];     [B5 B6 V6]      #       ꡗࢸܙ.్كي\r
++B;    𐠰\u08B7𞤌𐫭。𐋦\u17CD𝩃;    [B1];   [B1]    #       𐠰ࢷ𞤮𐫭.𐋦៍𝩃\r
++B;    𐠰\u08B7𞤮𐫭。𐋦\u17CD𝩃;    [B1];   [B1]    #       𐠰ࢷ𞤮𐫭.𐋦៍𝩃\r
++B;    xn--dzb5191kezbrw47a.xn--p4e3841jz9tf;  [B1];   [B1]    #       𐠰ࢷ𞤮𐫭.𐋦៍𝩃\r
++B;    𐠰\u08B7𞤮𐫭.𐋦\u17CD𝩃;      [B1];   [B1]    #       𐠰ࢷ𞤮𐫭.𐋦៍𝩃\r
++B;    𐠰\u08B7𞤌𐫭.𐋦\u17CD𝩃;      [B1];   [B1]    #       𐠰ࢷ𞤮𐫭.𐋦៍𝩃\r
++T;    ₂㘷--。\u06D3\u200C𐫆𑖿;        [B1 C1 V2 V3];  [B1 V2 V3]      #       2㘷--.ۓ𐫆𑖿\r
++N;    ₂㘷--。\u06D3\u200C𐫆𑖿;        [B1 C1 V2 V3];  [B1 C1 V2 V3]   #       2㘷--.ۓ𐫆𑖿\r
++T;    ₂㘷--。\u06D2\u0654\u200C𐫆𑖿;  [B1 C1 V2 V3];  [B1 V2 V3]      #       2㘷--.ۓ𐫆𑖿\r
++N;    ₂㘷--。\u06D2\u0654\u200C𐫆𑖿;  [B1 C1 V2 V3];  [B1 C1 V2 V3]   #       2㘷--.ۓ𐫆𑖿\r
++T;    2㘷--。\u06D3\u200C𐫆𑖿;  [B1 C1 V2 V3];  [B1 V2 V3]      #       2㘷--.ۓ𐫆𑖿\r
++N;    2㘷--。\u06D3\u200C𐫆𑖿;  [B1 C1 V2 V3];  [B1 C1 V2 V3]   #       2㘷--.ۓ𐫆𑖿\r
++T;    2㘷--。\u06D2\u0654\u200C𐫆𑖿;    [B1 C1 V2 V3];  [B1 V2 V3]      #       2㘷--.ۓ𐫆𑖿\r
++N;    2㘷--。\u06D2\u0654\u200C𐫆𑖿;    [B1 C1 V2 V3];  [B1 C1 V2 V3]   #       2㘷--.ۓ𐫆𑖿\r
++B;    xn--2---u58b.xn--jlb8024k14g;   [B1 V2 V3];     [B1 V2 V3]      #       2㘷--.ۓ𐫆𑖿\r
++B;    xn--2---u58b.xn--jlb820ku99nbgj;        [B1 C1 V2 V3];  [B1 C1 V2 V3]   #       2㘷--.ۓ𐫆𑖿\r
++B;    -𘊻.ᡮ\u062D-;     [B1 B5 B6 V3];  [B1 B5 B6 V3]   #       -𘊻.ᡮح-\r
++B;    -𘊻.ᡮ\u062D-;       [B1 B5 B6 V3];  [B1 B5 B6 V3]   #       -𘊻.ᡮح-\r
++B;    xn----bp5n.xn----bnc231l;       [B1 B5 B6 V3];  [B1 B5 B6 V3]   #       -𘊻.ᡮح-\r
++T;    \u200C-ß。ᢣ𐹭\u063F;      [B1 B5 B6 C1];  [B1 B5 B6 V3]   #       -ß.ᢣ𐹭ؿ\r
++N;    \u200C-ß。ᢣ𐹭\u063F;      [B1 B5 B6 C1];  [B1 B5 B6 C1]   #       -ß.ᢣ𐹭ؿ\r
++T;    \u200C-ß。ᢣ𐹭\u063F;      [B1 B5 B6 C1];  [B1 B5 B6 V3]   #       -ß.ᢣ𐹭ؿ\r
++N;    \u200C-ß。ᢣ𐹭\u063F;      [B1 B5 B6 C1];  [B1 B5 B6 C1]   #       -ß.ᢣ𐹭ؿ\r
++T;    \u200C-SS。ᢣ𐹭\u063F;      [B1 B5 B6 C1];  [B1 B5 B6 V3]   #       -ss.ᢣ𐹭ؿ\r
++N;    \u200C-SS。ᢣ𐹭\u063F;      [B1 B5 B6 C1];  [B1 B5 B6 C1]   #       -ss.ᢣ𐹭ؿ\r
++T;    \u200C-ss。ᢣ𐹭\u063F;      [B1 B5 B6 C1];  [B1 B5 B6 V3]   #       -ss.ᢣ𐹭ؿ\r
++N;    \u200C-ss。ᢣ𐹭\u063F;      [B1 B5 B6 C1];  [B1 B5 B6 C1]   #       -ss.ᢣ𐹭ؿ\r
++T;    \u200C-Ss。ᢣ𐹭\u063F;      [B1 B5 B6 C1];  [B1 B5 B6 V3]   #       -ss.ᢣ𐹭ؿ\r
++N;    \u200C-Ss。ᢣ𐹭\u063F;      [B1 B5 B6 C1];  [B1 B5 B6 C1]   #       -ss.ᢣ𐹭ؿ\r
++B;    -ss.xn--bhb925glx3p;    [B1 B5 B6 V3];  [B1 B5 B6 V3]   #       -ss.ᢣ𐹭ؿ\r
++B;    xn---ss-8m0a.xn--bhb925glx3p;   [B1 B5 B6 C1];  [B1 B5 B6 C1]   #       -ss.ᢣ𐹭ؿ\r
++B;    xn----qfa550v.xn--bhb925glx3p;  [B1 B5 B6 C1];  [B1 B5 B6 C1]   #       -ß.ᢣ𐹭ؿ\r
++T;    \u200C-SS。ᢣ𐹭\u063F;      [B1 B5 B6 C1];  [B1 B5 B6 V3]   #       -ss.ᢣ𐹭ؿ\r
++N;    \u200C-SS。ᢣ𐹭\u063F;      [B1 B5 B6 C1];  [B1 B5 B6 C1]   #       -ss.ᢣ𐹭ؿ\r
++T;    \u200C-ss。ᢣ𐹭\u063F;      [B1 B5 B6 C1];  [B1 B5 B6 V3]   #       -ss.ᢣ𐹭ؿ\r
++N;    \u200C-ss。ᢣ𐹭\u063F;      [B1 B5 B6 C1];  [B1 B5 B6 C1]   #       -ss.ᢣ𐹭ؿ\r
++T;    \u200C-Ss。ᢣ𐹭\u063F;      [B1 B5 B6 C1];  [B1 B5 B6 V3]   #       -ss.ᢣ𐹭ؿ\r
++N;    \u200C-Ss。ᢣ𐹭\u063F;      [B1 B5 B6 C1];  [B1 B5 B6 C1]   #       -ss.ᢣ𐹭ؿ\r
++B;    ꧐Ӏ\u1BAA\u08F6.눵;        [P1 V6];        [P1 V6] #       ꧐Ӏ᮪ࣶ.눵\r
++B;    ꧐Ӏ\u1BAA\u08F6.눵;  [P1 V6];        [P1 V6] #       ꧐Ӏ᮪ࣶ.눵\r
++B;    ꧐Ӏ\u1BAA\u08F6.눵;  [P1 V6];        [P1 V6] #       ꧐Ӏ᮪ࣶ.눵\r
++B;    ꧐Ӏ\u1BAA\u08F6.눵;    [P1 V6];        [P1 V6] #       ꧐Ӏ᮪ࣶ.눵\r
++B;    ꧐ӏ\u1BAA\u08F6.눵;    ꧐ӏ\u1BAA\u08F6.눵;  xn--s5a04sn4u297k.xn--2e1b      #       ꧐ӏ᮪ࣶ.눵\r
++B;    ꧐ӏ\u1BAA\u08F6.눵;  ;       xn--s5a04sn4u297k.xn--2e1b      #       ꧐ӏ᮪ࣶ.눵\r
++B;    xn--s5a04sn4u297k.xn--2e1b;     ꧐ӏ\u1BAA\u08F6.눵;  xn--s5a04sn4u297k.xn--2e1b      #       ꧐ӏ᮪ࣶ.눵\r
++B;    xn--d5a07sn4u297k.xn--2e1b;     [V6];   [V6]    #       ꧐Ӏ᮪ࣶ.눵\r
++B;    ꧐ӏ\u1BAA\u08F6.눵;  ꧐ӏ\u1BAA\u08F6.눵;  xn--s5a04sn4u297k.xn--2e1b      #       ꧐ӏ᮪ࣶ.눵\r
++B;    ꧐ӏ\u1BAA\u08F6.눵;        ꧐ӏ\u1BAA\u08F6.눵;  xn--s5a04sn4u297k.xn--2e1b      #       ꧐ӏ᮪ࣶ.눵\r
++B;    \uA8EA。𖄿𑆾󠇗;  [P1 V5 V6];     [P1 V5 V6]      #       ꣪.𑆾\r
++B;    \uA8EA。𖄿𑆾󠇗;  [P1 V5 V6];     [P1 V5 V6]      #       ꣪.𑆾\r
++B;    xn--3g9a.xn--ud1dz07k;  [V5 V6];        [V5 V6] #       ꣪.𑆾\r
++B;    󇓓𑚳。񐷿≯⾇;  [P1 V6];        [P1 V6]\r
++B;    󇓓𑚳。񐷿>\u0338⾇;      [P1 V6];        [P1 V6]\r
++B;    󇓓𑚳。񐷿≯舛;  [P1 V6];        [P1 V6]\r
++B;    󇓓𑚳。񐷿>\u0338舛;      [P1 V6];        [P1 V6]\r
++B;    xn--3e2d79770c.xn--hdh0088abyy1c;       [V6];   [V6]\r
++T;    𐫇\u0661\u200C.\u200D\u200C;        [B1 B3 C1 C2];  xn--9hb7344k.   #       𐫇١.\r
++N;    𐫇\u0661\u200C.\u200D\u200C;        [B1 B3 C1 C2];  [B1 B3 C1 C2]   #       𐫇١.\r
++T;    𐫇\u0661\u200C.\u200D\u200C;  [B1 B3 C1 C2];  xn--9hb7344k.   #       𐫇١.\r
++N;    𐫇\u0661\u200C.\u200D\u200C;  [B1 B3 C1 C2];  [B1 B3 C1 C2]   #       𐫇١.\r
++B;    xn--9hb7344k.;  𐫇\u0661.;    xn--9hb7344k.   #       𐫇١.\r
++B;    𐫇\u0661.;    ;       xn--9hb7344k.   #       𐫇١.\r
++B;    xn--9hb652kv99n.xn--0ugb;       [B1 B3 C1 C2];  [B1 B3 C1 C2]   #       𐫇١.\r
++T;    񡅈砪≯ᢑ。≯𝩚򓴔\u200C;      [C1 P1 V6];     [P1 V6] #       砪≯ᢑ.≯𝩚\r
++N;    񡅈砪≯ᢑ。≯𝩚򓴔\u200C;      [C1 P1 V6];     [C1 P1 V6]      #       砪≯ᢑ.≯𝩚\r
++T;    񡅈砪>\u0338ᢑ。>\u0338𝩚򓴔\u200C;      [C1 P1 V6];     [P1 V6] #       砪≯ᢑ.≯𝩚\r
++N;    񡅈砪>\u0338ᢑ。>\u0338𝩚򓴔\u200C;      [C1 P1 V6];     [C1 P1 V6]      #       砪≯ᢑ.≯𝩚\r
++T;    񡅈砪≯ᢑ。≯𝩚򓴔\u200C;      [C1 P1 V6];     [P1 V6] #       砪≯ᢑ.≯𝩚\r
++N;    񡅈砪≯ᢑ。≯𝩚򓴔\u200C;      [C1 P1 V6];     [C1 P1 V6]      #       砪≯ᢑ.≯𝩚\r
++T;    񡅈砪>\u0338ᢑ。>\u0338𝩚򓴔\u200C;      [C1 P1 V6];     [P1 V6] #       砪≯ᢑ.≯𝩚\r
++N;    񡅈砪>\u0338ᢑ。>\u0338𝩚򓴔\u200C;      [C1 P1 V6];     [C1 P1 V6]      #       砪≯ᢑ.≯𝩚\r
++B;    xn--bbf561cf95e57y3e.xn--hdh0834o7mj6b; [V6];   [V6]\r
++B;    xn--bbf561cf95e57y3e.xn--0ugz6gc910ejro8c;      [C1 V6];        [C1 V6] #       砪≯ᢑ.≯𝩚\r
++B;    Ⴥ.𑄳㊸;    [P1 V5 V6];     [P1 V5 V6]\r
++B;    Ⴥ.𑄳43;     [P1 V5 V6];     [P1 V5 V6]\r
++B;    ⴥ.𑄳43;     [V5];   [V5]\r
++B;    xn--tlj.xn--43-274o;    [V5];   [V5]\r
++B;    xn--9nd.xn--43-274o;    [V5 V6];        [V5 V6]\r
++B;    ⴥ.𑄳㊸;    [V5];   [V5]\r
++B;    𝟎\u0663。Ⴒᡇ\u08F2𐹠;  [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       0٣.Ⴒᡇࣲ𐹠\r
++B;    0\u0663。Ⴒᡇ\u08F2𐹠;     [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       0٣.Ⴒᡇࣲ𐹠\r
++B;    0\u0663。ⴒᡇ\u08F2𐹠;     [B1 B5 B6];     [B1 B5 B6]      #       0٣.ⴒᡇࣲ𐹠\r
++B;    xn--0-fqc.xn--10b369eivp359r;   [B1 B5 B6];     [B1 B5 B6]      #       0٣.ⴒᡇࣲ𐹠\r
++B;    xn--0-fqc.xn--10b180bnwgfy0z;   [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       0٣.Ⴒᡇࣲ𐹠\r
++B;    𝟎\u0663。ⴒᡇ\u08F2𐹠;  [B1 B5 B6];     [B1 B5 B6]      #       0٣.ⴒᡇࣲ𐹠\r
++B;    񗪨󠄉\uFFA0\u0FB7.񸞰\uA953;        [P1 V6];        [P1 V6] #       ྷ.꥓\r
++B;    񗪨󠄉\u1160\u0FB7.񸞰\uA953;        [P1 V6];        [P1 V6] #       ྷ.꥓\r
++B;    xn--kgd36f9z57y.xn--3j9au7544a; [V6];   [V6]    #       ྷ.꥓\r
++B;    xn--kgd7493jee34a.xn--3j9au7544a;       [V6];   [V6]    #       ྷ.꥓\r
++T;    \u0618.۳\u200C\uA953;  [C1 V5];        [V5]    #       ؘ.۳꥓\r
++N;    \u0618.۳\u200C\uA953;  [C1 V5];        [C1 V5] #       ؘ.۳꥓\r
++B;    xn--6fb.xn--gmb0524f;   [V5];   [V5]    #       ؘ.۳꥓\r
++B;    xn--6fb.xn--gmb469jjf1h;        [C1 V5];        [C1 V5] #       ؘ.۳꥓\r
++B;    ᡌ.︒ᢑ;   [P1 V6];        [P1 V6]\r
++B;    ᡌ.。ᢑ;     [A4_2]; [A4_2]\r
++B;    xn--c8e..xn--bbf;       [A4_2]; [A4_2]\r
++B;    xn--c8e.xn--bbf9168i;   [V6];   [V6]\r
++B;    𑋪\u1073。𞽧;      [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       𑋪ၳ.\r
++B;    𑋪\u1073。𞽧;      [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       𑋪ၳ.\r
++B;    xn--xld7443k.xn--4o7h;  [B1 B3 B6 V5 V6];       [B1 B3 B6 V5 V6]        #       𑋪ၳ.\r
++B;    𞷏。ᠢ򓘆; [P1 V6];        [P1 V6]\r
++B;    xn--hd7h.xn--46e66060j; [V6];   [V6]\r
++T;    𑄳㴼.\u200C𐹡\u20EB񫺦; [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       𑄳㴼.𐹡⃫\r
++N;    𑄳㴼.\u200C𐹡\u20EB񫺦; [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       𑄳㴼.𐹡⃫\r
++T;    𑄳㴼.\u200C𐹡\u20EB񫺦;   [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       𑄳㴼.𐹡⃫\r
++N;    𑄳㴼.\u200C𐹡\u20EB񫺦;   [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       𑄳㴼.𐹡⃫\r
++B;    xn--iym9428c.xn--e1g3464g08p3b; [B1 V5 V6];     [B1 V5 V6]      #       𑄳㴼.𐹡⃫\r
++B;    xn--iym9428c.xn--0ug46a7218cllv0c;      [B1 C1 V5 V6];  [B1 C1 V5 V6]   #       𑄳㴼.𐹡⃫\r
++B;    񠻟𐹳𑈯。\u031D;  [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       𐹳𑈯.̝\r
++B;    񠻟𐹳𑈯。\u031D;  [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       𐹳𑈯.̝\r
++B;    xn--ro0dw7dey96m.xn--eta;       [B1 B3 B5 B6 V5 V6];    [B1 B3 B5 B6 V5 V6]     #       𐹳𑈯.̝\r
++B;    ᢊ뾜󠱴𑚶。\u089D𐹥;    [P1 V6];        [P1 V6] #       ᢊ뾜𑚶.𐹥\r
++B;    ᢊ뾜󠱴𑚶。\u089D𐹥;      [P1 V6];        [P1 V6] #       ᢊ뾜𑚶.𐹥\r
++B;    xn--39e4566fjv8bwmt6n.xn--myb6415k;     [V6];   [V6]    #       ᢊ뾜𑚶.𐹥\r
++T;    𐹥≠。𐋲󠧠\u200C;       [B1 C1 P1 V6];  [B1 P1 V6]      #       𐹥≠.𐋲\r
++N;    𐹥≠。𐋲󠧠\u200C;       [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹥≠.𐋲\r
++T;    𐹥=\u0338。𐋲󠧠\u200C;   [B1 C1 P1 V6];  [B1 P1 V6]      #       𐹥≠.𐋲\r
++N;    𐹥=\u0338。𐋲󠧠\u200C;   [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹥≠.𐋲\r
++T;    𐹥≠。𐋲󠧠\u200C;       [B1 C1 P1 V6];  [B1 P1 V6]      #       𐹥≠.𐋲\r
++N;    𐹥≠。𐋲󠧠\u200C;       [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹥≠.𐋲\r
++T;    𐹥=\u0338。𐋲󠧠\u200C;   [B1 C1 P1 V6];  [B1 P1 V6]      #       𐹥≠.𐋲\r
++N;    𐹥=\u0338。𐋲󠧠\u200C;   [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹥≠.𐋲\r
++B;    xn--1ch6704g.xn--m97cw2999c;    [B1 V6];        [B1 V6]\r
++B;    xn--1ch6704g.xn--0ug3840g51u4g; [B1 C1 V6];     [B1 C1 V6]      #       𐹥≠.𐋲\r
++T;    \u115F񙯠\u094D.\u200D\uA953𐪤;    [B1 C2 P1 V6];  [B5 B6 P1 V5 V6]        #       ्.꥓\r
++N;    \u115F񙯠\u094D.\u200D\uA953𐪤;    [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       ्.꥓\r
++T;    \u115F񙯠\u094D.\u200D\uA953𐪤;      [B1 C2 P1 V6];  [B5 B6 P1 V5 V6]        #       ्.꥓\r
++N;    \u115F񙯠\u094D.\u200D\uA953𐪤;      [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       ्.꥓\r
++B;    xn--n3b542bb085j.xn--3j9al95p;  [B5 B6 V5 V6];  [B5 B6 V5 V6]   #       ्.꥓\r
++B;    xn--n3b542bb085j.xn--1ug6815co9wc;      [B1 C2 V6];     [B1 C2 V6]      #       ्.꥓\r
++B;    򌋔󠆎󠆗𑲕。≮; [P1 V6];        [P1 V6]\r
++B;    򌋔󠆎󠆗𑲕。<\u0338;     [P1 V6];        [P1 V6]\r
++B;    xn--4m3dv4354a.xn--gdh; [V6];   [V6]\r
++B;    󠆦.\u08E3暀≠;      [P1 V5 V6 A4_2];        [P1 V5 V6 A4_2] #       .ࣣ暀≠\r
++B;    󠆦.\u08E3暀=\u0338;  [P1 V5 V6 A4_2];        [P1 V5 V6 A4_2] #       .ࣣ暀≠\r
++B;    .xn--m0b461k3g2c;       [V5 V6 A4_2];   [V5 V6 A4_2]    #       .ࣣ暀≠\r
++B;    𐡤\uABED。\uFD30򜖅\u1DF0;  [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       𐡤꯭.شمᷰ\r
++B;    𐡤\uABED。\u0634\u0645򜖅\u1DF0;    [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       𐡤꯭.شمᷰ\r
++B;    xn--429ak76o.xn--zgb8a701kox37t;        [B2 B3 V6];     [B2 B3 V6]      #       𐡤꯭.شمᷰ\r
++T;    𝉃\u200D⒈。Ⴌ𞱓;        [B1 B5 B6 C2 P1 V5 V6]; [B1 B5 B6 P1 V5 V6]     #       𝉃⒈.Ⴌ\r
++N;    𝉃\u200D⒈。Ⴌ𞱓;        [B1 B5 B6 C2 P1 V5 V6]; [B1 B5 B6 C2 P1 V5 V6]  #       𝉃⒈.Ⴌ\r
++T;    𝉃\u200D1.。Ⴌ𞱓; [B1 B5 B6 C2 P1 V5 V6 A4_2];    [B1 B5 B6 P1 V5 V6 A4_2]        #       𝉃1..Ⴌ\r
++N;    𝉃\u200D1.。Ⴌ𞱓; [B1 B5 B6 C2 P1 V5 V6 A4_2];    [B1 B5 B6 C2 P1 V5 V6 A4_2]     #       𝉃1..Ⴌ\r
++T;    𝉃\u200D1.。ⴌ𞱓; [B1 B5 B6 C2 P1 V5 V6 A4_2];    [B1 B5 B6 P1 V5 V6 A4_2]        #       𝉃1..ⴌ\r
++N;    𝉃\u200D1.。ⴌ𞱓; [B1 B5 B6 C2 P1 V5 V6 A4_2];    [B1 B5 B6 C2 P1 V5 V6 A4_2]     #       𝉃1..ⴌ\r
++B;    xn--1-px8q..xn--3kj4524l;       [B1 B5 B6 V5 V6 A4_2];  [B1 B5 B6 V5 V6 A4_2]\r
++B;    xn--1-tgn9827q..xn--3kj4524l;   [B1 B5 B6 C2 V5 V6 A4_2];       [B1 B5 B6 C2 V5 V6 A4_2]        #       𝉃1..ⴌ\r
++B;    xn--1-px8q..xn--knd8464v;       [B1 B5 B6 V5 V6 A4_2];  [B1 B5 B6 V5 V6 A4_2]\r
++B;    xn--1-tgn9827q..xn--knd8464v;   [B1 B5 B6 C2 V5 V6 A4_2];       [B1 B5 B6 C2 V5 V6 A4_2]        #       𝉃1..Ⴌ\r
++T;    𝉃\u200D⒈。ⴌ𞱓;        [B1 B5 B6 C2 P1 V5 V6]; [B1 B5 B6 P1 V5 V6]     #       𝉃⒈.ⴌ\r
++N;    𝉃\u200D⒈。ⴌ𞱓;        [B1 B5 B6 C2 P1 V5 V6]; [B1 B5 B6 C2 P1 V5 V6]  #       𝉃⒈.ⴌ\r
++B;    xn--tshz828m.xn--3kj4524l;      [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]\r
++B;    xn--1ug68oq348b.xn--3kj4524l;   [B1 B5 B6 C2 V5 V6];    [B1 B5 B6 C2 V5 V6]     #       𝉃⒈.ⴌ\r
++B;    xn--tshz828m.xn--knd8464v;      [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]\r
++B;    xn--1ug68oq348b.xn--knd8464v;   [B1 B5 B6 C2 V5 V6];    [B1 B5 B6 C2 V5 V6]     #       𝉃⒈.Ⴌ\r
++T;    󠣙\u0A4D𱫘𞤸.ς񵯞􈰔;  [B1 P1 V6];     [B1 P1 V6]      #       ੍𞤸.ς\r
++N;    󠣙\u0A4D𱫘𞤸.ς񵯞􈰔;  [B1 P1 V6];     [B1 P1 V6]      #       ੍𞤸.ς\r
++B;    󠣙\u0A4D𱫘𞤖.Σ񵯞􈰔;  [B1 P1 V6];     [B1 P1 V6]      #       ੍𞤸.σ\r
++B;    󠣙\u0A4D𱫘𞤸.σ񵯞􈰔;  [B1 P1 V6];     [B1 P1 V6]      #       ੍𞤸.σ\r
++B;    󠣙\u0A4D𱫘𞤖.σ񵯞􈰔;  [B1 P1 V6];     [B1 P1 V6]      #       ੍𞤸.σ\r
++B;    xn--ybc0236vjvxgt5q0g.xn--4xa82737giye6b;       [B1 V6];        [B1 V6] #       ੍𞤸.σ\r
++T;    󠣙\u0A4D𱫘𞤖.ς񵯞􈰔;  [B1 P1 V6];     [B1 P1 V6]      #       ੍𞤸.ς\r
++N;    󠣙\u0A4D𱫘𞤖.ς񵯞􈰔;  [B1 P1 V6];     [B1 P1 V6]      #       ੍𞤸.ς\r
++B;    xn--ybc0236vjvxgt5q0g.xn--3xa03737giye6b;       [B1 V6];        [B1 V6] #       ੍𞤸.ς\r
++B;    󠣙\u0A4D𱫘𞤸.Σ񵯞􈰔;  [B1 P1 V6];     [B1 P1 V6]      #       ੍𞤸.σ\r
++T;    \u07D3。\u200C𐫀򞭱;        [B1 C1 P1 V6];  [B2 B3 P1 V6]   #       ߓ.𐫀\r
++N;    \u07D3。\u200C𐫀򞭱;        [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ߓ.𐫀\r
++B;    xn--usb.xn--pw9ci1099a; [B2 B3 V6];     [B2 B3 V6]      #       ߓ.𐫀\r
++B;    xn--usb.xn--0ug9553gm3v5d;      [B1 C1 V6];     [B1 C1 V6]      #       ߓ.𐫀\r
++B;    \u1C2E𞀝.\u05A6ꡟ𞤕󠆖;   [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ᰮ𞀝.֦ꡟ𞤷\r
++B;    \u1C2E𞀝.\u05A6ꡟ𞤷󠆖;   [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ᰮ𞀝.֦ꡟ𞤷\r
++B;    xn--q1f4493q.xn--xcb8244fifvj;  [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ᰮ𞀝.֦ꡟ𞤷\r
++T;    䂹󾖅𐋦.\u200D;   [C2 P1 V6];     [P1 V6] #       䂹𐋦.\r
++N;    䂹󾖅𐋦.\u200D;   [C2 P1 V6];     [C2 P1 V6]      #       䂹𐋦.\r
++T;    䂹󾖅𐋦.\u200D;     [C2 P1 V6];     [P1 V6] #       䂹𐋦.\r
++N;    䂹󾖅𐋦.\u200D;     [C2 P1 V6];     [C2 P1 V6]      #       䂹𐋦.\r
++B;    xn--0on3543c5981i.;     [V6];   [V6]\r
++B;    xn--0on3543c5981i.xn--1ug;      [C2 V6];        [C2 V6] #       䂹𐋦.\r
++T;    \uA9C0\u200C𐹲\u200C。\u0767🄉;    [B5 B6 C1 P1 V5 V6];    [B5 B6 P1 V5 V6]        #       ꧀𐹲.ݧ🄉\r
++N;    \uA9C0\u200C𐹲\u200C。\u0767🄉;    [B5 B6 C1 P1 V5 V6];    [B5 B6 C1 P1 V5 V6]     #       ꧀𐹲.ݧ🄉\r
++T;    \uA9C0\u200C𐹲\u200C。\u07678,;      [B3 B5 B6 C1 P1 V5 V6]; [B3 B5 B6 P1 V5 V6]     #       ꧀𐹲.ݧ8,\r
++N;    \uA9C0\u200C𐹲\u200C。\u07678,;      [B3 B5 B6 C1 P1 V5 V6]; [B3 B5 B6 C1 P1 V5 V6]  #       ꧀𐹲.ݧ8,\r
++B;    xn--7m9an32q.xn--8,-qle;        [B3 B5 B6 P1 V5 V6];    [B3 B5 B6 P1 V5 V6]     #       ꧀𐹲.ݧ8,\r
++B;    xn--0uga8686hdgvd.xn--8,-qle;   [B3 B5 B6 C1 P1 V5 V6]; [B3 B5 B6 C1 P1 V5 V6]  #       ꧀𐹲.ݧ8,\r
++B;    xn--7m9an32q.xn--rpb6081w;      [B5 B6 V5 V6];  [B5 B6 V5 V6]   #       ꧀𐹲.ݧ🄉\r
++B;    xn--0uga8686hdgvd.xn--rpb6081w; [B5 B6 C1 V5 V6];       [B5 B6 C1 V5 V6]        #       ꧀𐹲.ݧ🄉\r
++B;    ︒。Ⴃ≯;   [P1 V6];        [P1 V6]\r
++B;    ︒。Ⴃ>\u0338;       [P1 V6];        [P1 V6]\r
++B;    。。Ⴃ≯;   [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    。。Ⴃ>\u0338;       [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    。。ⴃ>\u0338;       [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    。。ⴃ≯;   [P1 V6 A4_2];   [P1 V6 A4_2]\r
++B;    ..xn--hdh782b;  [V6 A4_2];      [V6 A4_2]\r
++B;    ..xn--bnd622g;  [V6 A4_2];      [V6 A4_2]\r
++B;    ︒。ⴃ>\u0338;       [P1 V6];        [P1 V6]\r
++B;    ︒。ⴃ≯;   [P1 V6];        [P1 V6]\r
++B;    xn--y86c.xn--hdh782b;   [V6];   [V6]\r
++B;    xn--y86c.xn--bnd622g;   [V6];   [V6]\r
++T;    𐹮。󠢼\u200D;      [B1 C2 P1 V6];  [B1 P1 V6]      #       𐹮.\r
++N;    𐹮。󠢼\u200D;      [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       𐹮.\r
++T;    𐹮。󠢼\u200D;      [B1 C2 P1 V6];  [B1 P1 V6]      #       𐹮.\r
++N;    𐹮。󠢼\u200D;      [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       𐹮.\r
++B;    xn--mo0d.xn--wy46e;     [B1 V6];        [B1 V6]\r
++B;    xn--mo0d.xn--1ug18431l; [B1 C2 V6];     [B1 C2 V6]      #       𐹮.\r
++T;    Ⴞ𐹨。︒\u077D\u200DႯ;   [B1 B5 B6 C2 P1 V6];    [B1 B5 B6 P1 V6]        #       Ⴞ𐹨.︒ݽႯ\r
++N;    Ⴞ𐹨。︒\u077D\u200DႯ;   [B1 B5 B6 C2 P1 V6];    [B1 B5 B6 C2 P1 V6]     #       Ⴞ𐹨.︒ݽႯ\r
++T;    Ⴞ𐹨。。\u077D\u200DႯ;   [B2 B3 B5 B6 C2 P1 V6 A4_2];    [B2 B3 B5 B6 P1 V6 A4_2]        #       Ⴞ𐹨..ݽႯ\r
++N;    Ⴞ𐹨。。\u077D\u200DႯ;   [B2 B3 B5 B6 C2 P1 V6 A4_2];    [B2 B3 B5 B6 C2 P1 V6 A4_2]     #       Ⴞ𐹨..ݽႯ\r
++T;    ⴞ𐹨。。\u077D\u200Dⴏ;   [B2 B3 B5 B6 C2 A4_2];  [B2 B3 B5 B6 A4_2]      #       ⴞ𐹨..ݽⴏ\r
++N;    ⴞ𐹨。。\u077D\u200Dⴏ;   [B2 B3 B5 B6 C2 A4_2];  [B2 B3 B5 B6 C2 A4_2]   #       ⴞ𐹨..ݽⴏ\r
++B;    xn--mlju223e..xn--eqb053q;      [B2 B3 B5 B6 A4_2];     [B2 B3 B5 B6 A4_2]      #       ⴞ𐹨..ݽⴏ\r
++B;    xn--mlju223e..xn--eqb096jpgj;   [B2 B3 B5 B6 C2 A4_2];  [B2 B3 B5 B6 C2 A4_2]   #       ⴞ𐹨..ݽⴏ\r
++B;    xn--2nd0990k..xn--eqb228b;      [B2 B3 B5 B6 V6 A4_2];  [B2 B3 B5 B6 V6 A4_2]   #       Ⴞ𐹨..ݽႯ\r
++B;    xn--2nd0990k..xn--eqb228bgzm;   [B2 B3 B5 B6 C2 V6 A4_2];       [B2 B3 B5 B6 C2 V6 A4_2]        #       Ⴞ𐹨..ݽႯ\r
++T;    ⴞ𐹨。︒\u077D\u200Dⴏ;   [B1 B5 B6 C2 P1 V6];    [B1 B5 B6 P1 V6]        #       ⴞ𐹨.︒ݽⴏ\r
++N;    ⴞ𐹨。︒\u077D\u200Dⴏ;   [B1 B5 B6 C2 P1 V6];    [B1 B5 B6 C2 P1 V6]     #       ⴞ𐹨.︒ݽⴏ\r
++B;    xn--mlju223e.xn--eqb053qjk7l;   [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       ⴞ𐹨.︒ݽⴏ\r
++B;    xn--mlju223e.xn--eqb096jpgj9y7r;        [B1 B5 B6 C2 V6];       [B1 B5 B6 C2 V6]        #       ⴞ𐹨.︒ݽⴏ\r
++B;    xn--2nd0990k.xn--eqb228b583r;   [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       Ⴞ𐹨.︒ݽႯ\r
++B;    xn--2nd0990k.xn--eqb228bgzmvp0t;        [B1 B5 B6 C2 V6];       [B1 B5 B6 C2 V6]        #       Ⴞ𐹨.︒ݽႯ\r
++T;    \u200CႦ𝟹。-\u20D2-\u07D1; [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       Ⴆ3.-⃒-ߑ\r
++N;    \u200CႦ𝟹。-\u20D2-\u07D1; [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       Ⴆ3.-⃒-ߑ\r
++T;    \u200CႦ3。-\u20D2-\u07D1;    [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       Ⴆ3.-⃒-ߑ\r
++N;    \u200CႦ3。-\u20D2-\u07D1;    [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       Ⴆ3.-⃒-ߑ\r
++T;    \u200Cⴆ3。-\u20D2-\u07D1;    [B1 C1 V3];     [B1 V3] #       ⴆ3.-⃒-ߑ\r
++N;    \u200Cⴆ3。-\u20D2-\u07D1;    [B1 C1 V3];     [B1 C1 V3]      #       ⴆ3.-⃒-ߑ\r
++B;    xn--3-lvs.xn-----vue617w;       [B1 V3];        [B1 V3] #       ⴆ3.-⃒-ߑ\r
++B;    xn--3-rgnv99c.xn-----vue617w;   [B1 C1 V3];     [B1 C1 V3]      #       ⴆ3.-⃒-ߑ\r
++B;    xn--3-i0g.xn-----vue617w;       [B1 V3 V6];     [B1 V3 V6]      #       Ⴆ3.-⃒-ߑ\r
++B;    xn--3-i0g939i.xn-----vue617w;   [B1 C1 V3 V6];  [B1 C1 V3 V6]   #       Ⴆ3.-⃒-ߑ\r
++T;    \u200Cⴆ𝟹。-\u20D2-\u07D1; [B1 C1 V3];     [B1 V3] #       ⴆ3.-⃒-ߑ\r
++N;    \u200Cⴆ𝟹。-\u20D2-\u07D1; [B1 C1 V3];     [B1 C1 V3]      #       ⴆ3.-⃒-ߑ\r
++B;    箃Ⴡ-󠁝。≠-🤖; [P1 V6];        [P1 V6]\r
++B;    箃Ⴡ-󠁝。=\u0338-🤖;     [P1 V6];        [P1 V6]\r
++B;    箃Ⴡ-󠁝。≠-🤖; [P1 V6];        [P1 V6]\r
++B;    箃Ⴡ-󠁝。=\u0338-🤖;     [P1 V6];        [P1 V6]\r
++B;    箃ⴡ-󠁝。=\u0338-🤖;     [P1 V6];        [P1 V6]\r
++B;    箃ⴡ-󠁝。≠-🤖; [P1 V6];        [P1 V6]\r
++B;    xn----4wsr321ay823p.xn----tfot873s;     [V6];   [V6]\r
++B;    xn----11g3013fy8x5m.xn----tfot873s;     [V6];   [V6]\r
++B;    箃ⴡ-󠁝。=\u0338-🤖;     [P1 V6];        [P1 V6]\r
++B;    箃ⴡ-󠁝。≠-🤖; [P1 V6];        [P1 V6]\r
++B;    \u07E5.\u06B5;  ;       xn--dtb.xn--okb #       ߥ.ڵ\r
++B;    xn--dtb.xn--okb;        \u07E5.\u06B5;  xn--dtb.xn--okb #       ߥ.ڵ\r
++T;    \u200C\u200D.𞤿;      [B1 C1 C2];     [A4_2]  #       .𞤿\r
++N;    \u200C\u200D.𞤿;      [B1 C1 C2];     [B1 C1 C2]      #       .𞤿\r
++T;    \u200C\u200D.𞤝;      [B1 C1 C2];     [A4_2]  #       .𞤿\r
++N;    \u200C\u200D.𞤝;      [B1 C1 C2];     [B1 C1 C2]      #       .𞤿\r
++B;    .xn--3e6h;      [A4_2]; [A4_2]\r
++B;    xn--0ugc.xn--3e6h;      [B1 C1 C2];     [B1 C1 C2]      #       .𞤿\r
++B;    xn--3e6h;       𞤿;   xn--3e6h\r
++B;    𞤿;   ;       xn--3e6h\r
++B;    𞤝;   𞤿;   xn--3e6h\r
++T;    🜑𐹧\u0639.ς𑍍蜹;       [B1];   [B1]    #       🜑𐹧ع.ς𑍍蜹\r
++N;    🜑𐹧\u0639.ς𑍍蜹;       [B1];   [B1]    #       🜑𐹧ع.ς𑍍蜹\r
++B;    🜑𐹧\u0639.Σ𑍍蜹;       [B1];   [B1]    #       🜑𐹧ع.σ𑍍蜹\r
++B;    🜑𐹧\u0639.σ𑍍蜹;       [B1];   [B1]    #       🜑𐹧ع.σ𑍍蜹\r
++B;    xn--4gb3736kk4zf.xn--4xa2248dy27d;      [B1];   [B1]    #       🜑𐹧ع.σ𑍍蜹\r
++B;    xn--4gb3736kk4zf.xn--3xa4248dy27d;      [B1];   [B1]    #       🜑𐹧ع.ς𑍍蜹\r
++B;    򫠐ス􆟤\u0669.󚃟;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ス٩.\r
++B;    򫠐ス􆟤\u0669.󚃟; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ス٩.\r
++B;    xn--iib777sp230oo708a.xn--7824e;        [B5 B6 V6];     [B5 B6 V6]      #       ス٩.\r
++B;    𝪣򕡝.\u059A\uD850\u06C2;  [B1 P1 V5 V6];  [B1 P1 V5 V6 A3]        #       𝪣.֚ۂ\r
++B;    𝪣򕡝.\u059A\uD850\u06C1\u0654;    [B1 P1 V5 V6];  [B1 P1 V5 V6 A3]        #       𝪣.֚ۂ\r
++B;    𝪣򕡝.\u059A\uD850\u06C2;    [B1 P1 V5 V6];  [B1 P1 V5 V6 A3]        #       𝪣.֚ۂ\r
++B;    𝪣򕡝.\u059A\uD850\u06C1\u0654;      [B1 P1 V5 V6];  [B1 P1 V5 V6 A3]        #       𝪣.֚ۂ\r
++B;    xn--8c3hu7971a.\u059A\uD850\u06C2;      [B1 P1 V5 V6];  [B1 P1 V5 V6 A3]        #       𝪣.֚ۂ\r
++B;    xn--8c3hu7971a.\u059A\uD850\u06C1\u0654;        [B1 P1 V5 V6];  [B1 P1 V5 V6 A3]        #       𝪣.֚ۂ\r
++B;    XN--8C3HU7971A.\u059A\uD850\u06C1\u0654;        [B1 P1 V5 V6];  [B1 P1 V5 V6 A3]        #       𝪣.֚ۂ\r
++B;    XN--8C3HU7971A.\u059A\uD850\u06C2;      [B1 P1 V5 V6];  [B1 P1 V5 V6 A3]        #       𝪣.֚ۂ\r
++B;    Xn--8C3hu7971a.\u059A\uD850\u06C2;      [B1 P1 V5 V6];  [B1 P1 V5 V6 A3]        #       𝪣.֚ۂ\r
++B;    Xn--8C3hu7971a.\u059A\uD850\u06C1\u0654;        [B1 P1 V5 V6];  [B1 P1 V5 V6 A3]        #       𝪣.֚ۂ\r
++T;    \u0660򪓵\u200C。\u0757;      [B1 C1 P1 V6];  [B1 P1 V6]      #       ٠.ݗ\r
++N;    \u0660򪓵\u200C。\u0757;      [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ٠.ݗ\r
++B;    xn--8hb82030l.xn--bpb;  [B1 V6];        [B1 V6] #       ٠.ݗ\r
++B;    xn--8hb852ke991q.xn--bpb;       [B1 C1 V6];     [B1 C1 V6]      #       ٠.ݗ\r
++T;    \u103A\u200D\u200C。-\u200C;   [C1 V3 V5];     [V3 V5] #       ်.-\r
++N;    \u103A\u200D\u200C。-\u200C;   [C1 V3 V5];     [C1 V3 V5]      #       ်.-\r
++B;    xn--bkd.-;      [V3 V5];        [V3 V5] #       ်.-\r
++B;    xn--bkd412fca.xn----sgn;        [C1 V3 V5];     [C1 V3 V5]      #       ်.-\r
++B;    ︒。\u1B44ᡉ;        [P1 V5 V6];     [P1 V5 V6]      #       ︒.᭄ᡉ\r
++B;    。。\u1B44ᡉ;        [V5 A4_2];      [V5 A4_2]       #       ..᭄ᡉ\r
++B;    ..xn--87e93m;   [V5 A4_2];      [V5 A4_2]       #       ..᭄ᡉ\r
++B;    xn--y86c.xn--87e93m;    [V5 V6];        [V5 V6] #       ︒.᭄ᡉ\r
++T;    \u0758ß。ጫᢊ\u0768𝟐;    [B2 B3 B5];     [B2 B3 B5]      #       ݘß.ጫᢊݨ2\r
++N;    \u0758ß。ጫᢊ\u0768𝟐;    [B2 B3 B5];     [B2 B3 B5]      #       ݘß.ጫᢊݨ2\r
++T;    \u0758ß。ጫᢊ\u07682;       [B2 B3 B5];     [B2 B3 B5]      #       ݘß.ጫᢊݨ2\r
++N;    \u0758ß。ጫᢊ\u07682;       [B2 B3 B5];     [B2 B3 B5]      #       ݘß.ጫᢊݨ2\r
++B;    \u0758SS。ጫᢊ\u07682;       [B2 B3 B5];     [B2 B3 B5]      #       ݘss.ጫᢊݨ2\r
++B;    \u0758ss。ጫᢊ\u07682;       [B2 B3 B5];     [B2 B3 B5]      #       ݘss.ጫᢊݨ2\r
++B;    \u0758Ss。ጫᢊ\u07682;       [B2 B3 B5];     [B2 B3 B5]      #       ݘss.ጫᢊݨ2\r
++B;    xn--ss-gke.xn--2-b5c641gfmf;    [B2 B3 B5];     [B2 B3 B5]      #       ݘss.ጫᢊݨ2\r
++B;    xn--zca724a.xn--2-b5c641gfmf;   [B2 B3 B5];     [B2 B3 B5]      #       ݘß.ጫᢊݨ2\r
++B;    \u0758SS。ጫᢊ\u0768𝟐;    [B2 B3 B5];     [B2 B3 B5]      #       ݘss.ጫᢊݨ2\r
++B;    \u0758ss。ጫᢊ\u0768𝟐;    [B2 B3 B5];     [B2 B3 B5]      #       ݘss.ጫᢊݨ2\r
++B;    \u0758Ss。ጫᢊ\u0768𝟐;    [B2 B3 B5];     [B2 B3 B5]      #       ݘss.ጫᢊݨ2\r
++B;    \u07C3𞶇ᚲ.\u0902\u0353𝟚\u09CD;   [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       ߃ᚲ.ं͓2্\r
++B;    \u07C3𞶇ᚲ.\u0902\u03532\u09CD;      [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       ߃ᚲ.ं͓2্\r
++B;    xn--esb067enh07a.xn--2-lgb874bjxa;      [B1 B2 B3 V5 V6];       [B1 B2 B3 V5 V6]        #       ߃ᚲ.ं͓2্\r
++T;    -\u1BAB︒\u200D.񒶈񥹓;      [C2 P1 V3 V6];  [P1 V3 V6]      #       -᮫︒.\r
++N;    -\u1BAB︒\u200D.񒶈񥹓;      [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       -᮫︒.\r
++T;    -\u1BAB。\u200D.񒶈񥹓;      [C2 P1 V3 V6];  [P1 V3 V6 A4_2] #       -᮫..\r
++N;    -\u1BAB。\u200D.񒶈񥹓;      [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       -᮫..\r
++B;    xn----qml..xn--x50zy803a;       [V3 V6 A4_2];   [V3 V6 A4_2]    #       -᮫..\r
++B;    xn----qml.xn--1ug.xn--x50zy803a;        [C2 V3 V6];     [C2 V3 V6]      #       -᮫..\r
++B;    xn----qml1407i.xn--x50zy803a;   [V3 V6];        [V3 V6] #       -᮫︒.\r
++B;    xn----qmlv7tw180a.xn--x50zy803a;        [C2 V3 V6];     [C2 V3 V6]      #       -᮫︒.\r
++B;    󠦮.≯𞀆;   [P1 V6];        [P1 V6]\r
++B;    󠦮.>\u0338𞀆;       [P1 V6];        [P1 V6]\r
++B;    xn--t546e.xn--hdh5166o; [V6];   [V6]\r
++B;    -𑄳󠊗𐹩。𞮱;   [B1 P1 V3 V6];  [B1 P1 V3 V6]\r
++B;    xn----p26i72em2894c.xn--zw6h;   [B1 V3 V6];     [B1 V3 V6]\r
++B;    \u06B9.ᡳ\u115F;     [P1 V6];        [P1 V6] #       ڹ.ᡳ\r
++B;    \u06B9.ᡳ\u115F;       [P1 V6];        [P1 V6] #       ڹ.ᡳ\r
++B;    xn--skb.xn--osd737a;    [V6];   [V6]    #       ڹ.ᡳ\r
++B;    㨛𘱎.︒𝟕\u0D01;  [P1 V6];        [P1 V6] #       㨛.︒7ഁ\r
++B;    㨛𘱎.。7\u0D01;     [P1 V6 A4_2];   [P1 V6 A4_2]    #       㨛..7ഁ\r
++B;    xn--mbm8237g..xn--7-7hf;        [V6 A4_2];      [V6 A4_2]       #       㨛..7ഁ\r
++B;    xn--mbm8237g.xn--7-7hf1526p;    [V6];   [V6]    #       㨛.︒7ഁ\r
++B;    \u06DD𻱧-。𞷁\u2064𞤣≮;        [B1 B3 P1 V3 V6];       [B1 B3 P1 V3 V6]        #       -.𞤣≮\r
++B;    \u06DD𻱧-。𞷁\u2064𞤣<\u0338;    [B1 B3 P1 V3 V6];       [B1 B3 P1 V3 V6]        #       -.𞤣≮\r
++B;    \u06DD𻱧-。𞷁\u2064𞤣≮;        [B1 B3 P1 V3 V6];       [B1 B3 P1 V3 V6]        #       -.𞤣≮\r
++B;    \u06DD𻱧-。𞷁\u2064𞤣<\u0338;    [B1 B3 P1 V3 V6];       [B1 B3 P1 V3 V6]        #       -.𞤣≮\r
++B;    \u06DD𻱧-。𞷁\u2064𞤁<\u0338;    [B1 B3 P1 V3 V6];       [B1 B3 P1 V3 V6]        #       -.𞤣≮\r
++B;    \u06DD𻱧-。𞷁\u2064𞤁≮;        [B1 B3 P1 V3 V6];       [B1 B3 P1 V3 V6]        #       -.𞤣≮\r
++B;    xn----dxc06304e.xn--gdh5020pk5c;        [B1 B3 V3 V6];  [B1 B3 V3 V6]   #       -.𞤣≮\r
++B;    \u06DD𻱧-。𞷁\u2064𞤁<\u0338;    [B1 B3 P1 V3 V6];       [B1 B3 P1 V3 V6]        #       -.𞤣≮\r
++B;    \u06DD𻱧-。𞷁\u2064𞤁≮;        [B1 B3 P1 V3 V6];       [B1 B3 P1 V3 V6]        #       -.𞤣≮\r
++T;    ß\u200C\uAAF6ᢥ.⊶ჁႶ;  [C1 P1 V6];     [P1 V6] #       ß꫶ᢥ.⊶ჁႶ\r
++N;    ß\u200C\uAAF6ᢥ.⊶ჁႶ;  [C1 P1 V6];     [C1 P1 V6]      #       ß꫶ᢥ.⊶ჁႶ\r
++T;    ß\u200C\uAAF6ᢥ.⊶ჁႶ;    [C1 P1 V6];     [P1 V6] #       ß꫶ᢥ.⊶ჁႶ\r
++N;    ß\u200C\uAAF6ᢥ.⊶ჁႶ;    [C1 P1 V6];     [C1 P1 V6]      #       ß꫶ᢥ.⊶ჁႶ\r
++T;    ß\u200C\uAAF6ᢥ.⊶ⴡⴖ;    [C1];   xn--ss-4epx629f.xn--ifh802b6a   #       ß꫶ᢥ.⊶ⴡⴖ\r
++N;    ß\u200C\uAAF6ᢥ.⊶ⴡⴖ;    [C1];   [C1]    #       ß꫶ᢥ.⊶ⴡⴖ\r
++T;    SS\u200C\uAAF6ᢥ.⊶ჁႶ;    [C1 P1 V6];     [P1 V6] #       ss꫶ᢥ.⊶ჁႶ\r
++N;    SS\u200C\uAAF6ᢥ.⊶ჁႶ;    [C1 P1 V6];     [C1 P1 V6]      #       ss꫶ᢥ.⊶ჁႶ\r
++T;    ss\u200C\uAAF6ᢥ.⊶ⴡⴖ;    [C1];   xn--ss-4epx629f.xn--ifh802b6a   #       ss꫶ᢥ.⊶ⴡⴖ\r
++N;    ss\u200C\uAAF6ᢥ.⊶ⴡⴖ;    [C1];   [C1]    #       ss꫶ᢥ.⊶ⴡⴖ\r
++T;    Ss\u200C\uAAF6ᢥ.⊶Ⴡⴖ;    [C1 P1 V6];     [P1 V6] #       ss꫶ᢥ.⊶Ⴡⴖ\r
++N;    Ss\u200C\uAAF6ᢥ.⊶Ⴡⴖ;    [C1 P1 V6];     [C1 P1 V6]      #       ss꫶ᢥ.⊶Ⴡⴖ\r
++B;    xn--ss-4epx629f.xn--5nd703gyrh; [V6];   [V6]    #       ss꫶ᢥ.⊶Ⴡⴖ\r
++B;    xn--ss-4ep585bkm5p.xn--5nd703gyrh;      [C1 V6];        [C1 V6] #       ss꫶ᢥ.⊶Ⴡⴖ\r
++B;    xn--ss-4epx629f.xn--ifh802b6a;  ss\uAAF6ᢥ.⊶ⴡⴖ;  xn--ss-4epx629f.xn--ifh802b6a;  NV8     #       ss꫶ᢥ.⊶ⴡⴖ\r
++B;    ss\uAAF6ᢥ.⊶ⴡⴖ;  ;       xn--ss-4epx629f.xn--ifh802b6a;  NV8     #       ss꫶ᢥ.⊶ⴡⴖ\r
++B;    SS\uAAF6ᢥ.⊶ჁႶ;  [P1 V6];        [P1 V6] #       ss꫶ᢥ.⊶ჁႶ\r
++B;    Ss\uAAF6ᢥ.⊶Ⴡⴖ;  [P1 V6];        [P1 V6] #       ss꫶ᢥ.⊶Ⴡⴖ\r
++B;    xn--ss-4epx629f.xn--undv409k;   [V6];   [V6]    #       ss꫶ᢥ.⊶ჁႶ\r
++B;    xn--ss-4ep585bkm5p.xn--ifh802b6a;       [C1];   [C1]    #       ss꫶ᢥ.⊶ⴡⴖ\r
++B;    xn--ss-4ep585bkm5p.xn--undv409k;        [C1 V6];        [C1 V6] #       ss꫶ᢥ.⊶ჁႶ\r
++B;    xn--zca682johfi89m.xn--ifh802b6a;       [C1];   [C1]    #       ß꫶ᢥ.⊶ⴡⴖ\r
++B;    xn--zca682johfi89m.xn--undv409k;        [C1 V6];        [C1 V6] #       ß꫶ᢥ.⊶ჁႶ\r
++T;    ß\u200C\uAAF6ᢥ.⊶ⴡⴖ;  [C1];   xn--ss-4epx629f.xn--ifh802b6a   #       ß꫶ᢥ.⊶ⴡⴖ\r
++N;    ß\u200C\uAAF6ᢥ.⊶ⴡⴖ;  [C1];   [C1]    #       ß꫶ᢥ.⊶ⴡⴖ\r
++T;    SS\u200C\uAAF6ᢥ.⊶ჁႶ;  [C1 P1 V6];     [P1 V6] #       ss꫶ᢥ.⊶ჁႶ\r
++N;    SS\u200C\uAAF6ᢥ.⊶ჁႶ;  [C1 P1 V6];     [C1 P1 V6]      #       ss꫶ᢥ.⊶ჁႶ\r
++T;    ss\u200C\uAAF6ᢥ.⊶ⴡⴖ;  [C1];   xn--ss-4epx629f.xn--ifh802b6a   #       ss꫶ᢥ.⊶ⴡⴖ\r
++N;    ss\u200C\uAAF6ᢥ.⊶ⴡⴖ;  [C1];   [C1]    #       ss꫶ᢥ.⊶ⴡⴖ\r
++T;    Ss\u200C\uAAF6ᢥ.⊶Ⴡⴖ;  [C1 P1 V6];     [P1 V6] #       ss꫶ᢥ.⊶Ⴡⴖ\r
++N;    Ss\u200C\uAAF6ᢥ.⊶Ⴡⴖ;  [C1 P1 V6];     [C1 P1 V6]      #       ss꫶ᢥ.⊶Ⴡⴖ\r
++T;    \u200D。ς󠁉;        [C2 P1 V6];     [P1 V6 A4_2]    #       .ς\r
++N;    \u200D。ς󠁉;        [C2 P1 V6];     [C2 P1 V6]      #       .ς\r
++T;    \u200D。Σ󠁉;        [C2 P1 V6];     [P1 V6 A4_2]    #       .σ\r
++N;    \u200D。Σ󠁉;        [C2 P1 V6];     [C2 P1 V6]      #       .σ\r
++T;    \u200D。σ󠁉;        [C2 P1 V6];     [P1 V6 A4_2]    #       .σ\r
++N;    \u200D。σ󠁉;        [C2 P1 V6];     [C2 P1 V6]      #       .σ\r
++B;    .xn--4xa24344p; [V6 A4_2];      [V6 A4_2]\r
++B;    xn--1ug.xn--4xa24344p;  [C2 V6];        [C2 V6] #       .σ\r
++B;    xn--1ug.xn--3xa44344p;  [C2 V6];        [C2 V6] #       .ς\r
++T;    𞵑ß.\u0751\u200D𞤛-;       [B2 B3 C2 P1 V3 V6];    [B2 B3 P1 V3 V6]        #       ß.ݑ𞤽-\r
++N;    𞵑ß.\u0751\u200D𞤛-;       [B2 B3 C2 P1 V3 V6];    [B2 B3 C2 P1 V3 V6]     #       ß.ݑ𞤽-\r
++T;    𞵑ß.\u0751\u200D𞤽-;       [B2 B3 C2 P1 V3 V6];    [B2 B3 P1 V3 V6]        #       ß.ݑ𞤽-\r
++N;    𞵑ß.\u0751\u200D𞤽-;       [B2 B3 C2 P1 V3 V6];    [B2 B3 C2 P1 V3 V6]     #       ß.ݑ𞤽-\r
++T;    𞵑SS.\u0751\u200D𞤛-;       [B2 B3 C2 P1 V3 V6];    [B2 B3 P1 V3 V6]        #       ss.ݑ𞤽-\r
++N;    𞵑SS.\u0751\u200D𞤛-;       [B2 B3 C2 P1 V3 V6];    [B2 B3 C2 P1 V3 V6]     #       ss.ݑ𞤽-\r
++T;    𞵑ss.\u0751\u200D𞤽-;       [B2 B3 C2 P1 V3 V6];    [B2 B3 P1 V3 V6]        #       ss.ݑ𞤽-\r
++N;    𞵑ss.\u0751\u200D𞤽-;       [B2 B3 C2 P1 V3 V6];    [B2 B3 C2 P1 V3 V6]     #       ss.ݑ𞤽-\r
++T;    𞵑Ss.\u0751\u200D𞤽-;       [B2 B3 C2 P1 V3 V6];    [B2 B3 P1 V3 V6]        #       ss.ݑ𞤽-\r
++N;    𞵑Ss.\u0751\u200D𞤽-;       [B2 B3 C2 P1 V3 V6];    [B2 B3 C2 P1 V3 V6]     #       ss.ݑ𞤽-\r
++B;    xn--ss-2722a.xn----z3c03218a;   [B2 B3 V3 V6];  [B2 B3 V3 V6]   #       ss.ݑ𞤽-\r
++B;    xn--ss-2722a.xn----z3c011q9513b;        [B2 B3 C2 V3 V6];       [B2 B3 C2 V3 V6]        #       ss.ݑ𞤽-\r
++B;    xn--zca5423w.xn----z3c011q9513b;        [B2 B3 C2 V3 V6];       [B2 B3 C2 V3 V6]        #       ß.ݑ𞤽-\r
++T;    𞵑ss.\u0751\u200D𞤛-;       [B2 B3 C2 P1 V3 V6];    [B2 B3 P1 V3 V6]        #       ss.ݑ𞤽-\r
++N;    𞵑ss.\u0751\u200D𞤛-;       [B2 B3 C2 P1 V3 V6];    [B2 B3 C2 P1 V3 V6]     #       ss.ݑ𞤽-\r
++T;    𞵑Ss.\u0751\u200D𞤛-;       [B2 B3 C2 P1 V3 V6];    [B2 B3 P1 V3 V6]        #       ss.ݑ𞤽-\r
++N;    𞵑Ss.\u0751\u200D𞤛-;       [B2 B3 C2 P1 V3 V6];    [B2 B3 C2 P1 V3 V6]     #       ss.ݑ𞤽-\r
++T;    𑘽\u200D𞤧.𐹧󡦪-;     [B1 C2 P1 V3 V5 V6];    [B1 P1 V3 V5 V6]        #       𑘽𞤧.𐹧-\r
++N;    𑘽\u200D𞤧.𐹧󡦪-;     [B1 C2 P1 V3 V5 V6];    [B1 C2 P1 V3 V5 V6]     #       𑘽𞤧.𐹧-\r
++T;    𑘽\u200D𞤧.𐹧󡦪-;       [B1 C2 P1 V3 V5 V6];    [B1 P1 V3 V5 V6]        #       𑘽𞤧.𐹧-\r
++N;    𑘽\u200D𞤧.𐹧󡦪-;       [B1 C2 P1 V3 V5 V6];    [B1 C2 P1 V3 V5 V6]     #       𑘽𞤧.𐹧-\r
++T;    𑘽\u200D𞤅.𐹧󡦪-;       [B1 C2 P1 V3 V5 V6];    [B1 P1 V3 V5 V6]        #       𑘽𞤧.𐹧-\r
++N;    𑘽\u200D𞤅.𐹧󡦪-;       [B1 C2 P1 V3 V5 V6];    [B1 C2 P1 V3 V5 V6]     #       𑘽𞤧.𐹧-\r
++B;    xn--qb2ds317a.xn----k26iq1483f; [B1 V3 V5 V6];  [B1 V3 V5 V6]\r
++B;    xn--1ugz808gdimf.xn----k26iq1483f;      [B1 C2 V3 V5 V6];       [B1 C2 V3 V5 V6]        #       𑘽𞤧.𐹧-\r
++T;    𑘽\u200D𞤅.𐹧󡦪-;     [B1 C2 P1 V3 V5 V6];    [B1 P1 V3 V5 V6]        #       𑘽𞤧.𐹧-\r
++N;    𑘽\u200D𞤅.𐹧󡦪-;     [B1 C2 P1 V3 V5 V6];    [B1 C2 P1 V3 V5 V6]     #       𑘽𞤧.𐹧-\r
++B;    ⒒򨘙򳳠𑓀.-󞡊;  [P1 V3 V6];     [P1 V3 V6]\r
++B;    11.򨘙򳳠𑓀.-󞡊;  [P1 V3 V6];     [P1 V3 V6]\r
++B;    11.xn--uz1d59632bxujd.xn----x310m;      [V3 V6];        [V3 V6]\r
++B;    xn--3shy698frsu9dt1me.xn----x310m;      [V3 V6];        [V3 V6]\r
++T;    -。\u200D;     [C2 V3];        [V3]    #       -.\r
++N;    -。\u200D;     [C2 V3];        [C2 V3] #       -.\r
++T;    -。\u200D;     [C2 V3];        [V3]    #       -.\r
++N;    -。\u200D;     [C2 V3];        [C2 V3] #       -.\r
++B;    -.;     [V3];   [V3]\r
++B;    -.xn--1ug;      [C2 V3];        [C2 V3] #       -.\r
++T;    ≮ᡬ.ς¹-\uDB09;   [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.ς1-\r
++N;    ≮ᡬ.ς¹-\uDB09;   [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.ς1-\r
++T;    <\u0338ᡬ.ς¹-\uDB09;       [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.ς1-\r
++N;    <\u0338ᡬ.ς¹-\uDB09;       [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.ς1-\r
++T;    ≮ᡬ.ς1-\uDB09;      [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.ς1-\r
++N;    ≮ᡬ.ς1-\uDB09;      [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.ς1-\r
++T;    <\u0338ᡬ.ς1-\uDB09;  [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.ς1-\r
++N;    <\u0338ᡬ.ς1-\uDB09;  [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.ς1-\r
++B;    <\u0338ᡬ.Σ1-\uDB09;  [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.σ1-\r
++B;    ≮ᡬ.Σ1-\uDB09;      [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.σ1-\r
++B;    ≮ᡬ.σ1-\uDB09;      [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.σ1-\r
++B;    <\u0338ᡬ.σ1-\uDB09;  [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.σ1-\r
++B;    xn--88e732c.σ1-\uDB09; [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.σ1-\r
++B;    XN--88E732C.Σ1-\uDB09; [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.σ1-\r
++T;    xn--88e732c.ς1-\uDB09; [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.ς1-\r
++N;    xn--88e732c.ς1-\uDB09; [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.ς1-\r
++T;    Xn--88E732c.ς1-\uDB09; [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.ς1-\r
++N;    Xn--88E732c.ς1-\uDB09; [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.ς1-\r
++B;    Xn--88E732c.σ1-\uDB09; [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.σ1-\r
++B;    <\u0338ᡬ.Σ¹-\uDB09;       [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.σ1-\r
++B;    ≮ᡬ.Σ¹-\uDB09;   [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.σ1-\r
++B;    ≮ᡬ.σ¹-\uDB09;   [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.σ1-\r
++B;    <\u0338ᡬ.σ¹-\uDB09;       [P1 V6];        [P1 V6 A3]      #       ≮ᡬ.σ1-\r
++B;    ቬ򔠼񁗶。𐨬𝟠; [P1 V6];        [P1 V6]\r
++B;    ቬ򔠼񁗶。𐨬8;    [P1 V6];        [P1 V6]\r
++B;    xn--d0d41273c887z.xn--8-ob5i;   [V6];   [V6]\r
++B;    𐱲。蔫\u0766;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       .蔫ݦ\r
++B;    xn--389c.xn--qpb7055d;  [B5 B6 V6];     [B5 B6 V6]      #       .蔫ݦ\r
++B;    򒲧₃。ꡚ𛇑󠄳\u0647;    [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       3.ꡚ𛇑ه\r
++B;    򒲧3。ꡚ𛇑󠄳\u0647;      [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       3.ꡚ𛇑ه\r
++B;    xn--3-ep59g.xn--jhb5904fcp0h;   [B5 B6 V6];     [B5 B6 V6]      #       3.ꡚ𛇑ه\r
++T;    蓸\u0642≠.ß;        [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       蓸ق≠.ß\r
++N;    蓸\u0642≠.ß;        [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       蓸ق≠.ß\r
++T;    蓸\u0642=\u0338.ß;    [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       蓸ق≠.ß\r
++N;    蓸\u0642=\u0338.ß;    [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       蓸ق≠.ß\r
++B;    蓸\u0642=\u0338.SS;    [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       蓸ق≠.ss\r
++B;    蓸\u0642≠.SS;        [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       蓸ق≠.ss\r
++B;    蓸\u0642≠.ss;        [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       蓸ق≠.ss\r
++B;    蓸\u0642=\u0338.ss;    [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       蓸ق≠.ss\r
++B;    蓸\u0642=\u0338.Ss;    [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       蓸ق≠.ss\r
++B;    蓸\u0642≠.Ss;        [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       蓸ق≠.ss\r
++B;    xn--ehb015lnt1e.ss;     [B5 B6 V6];     [B5 B6 V6]      #       蓸ق≠.ss\r
++B;    xn--ehb015lnt1e.xn--zca;        [B5 B6 V6];     [B5 B6 V6]      #       蓸ق≠.ß\r
++T;    \u084E\u067A\u0DD3⒊.𐹹𞱩󠃪\u200C;       [B1 C1 P1 V6];  [B1 P1 V6]      #       ࡎٺී⒊.𐹹\r
++N;    \u084E\u067A\u0DD3⒊.𐹹𞱩󠃪\u200C;       [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ࡎٺී⒊.𐹹\r
++T;    \u084E\u067A\u0DD33..𐹹𞱩󠃪\u200C;        [B1 C1 P1 V6 A4_2];     [B1 P1 V6 A4_2] #       ࡎٺී3..𐹹\r
++N;    \u084E\u067A\u0DD33..𐹹𞱩󠃪\u200C;        [B1 C1 P1 V6 A4_2];     [B1 C1 P1 V6 A4_2]      #       ࡎٺී3..𐹹\r
++B;    xn--3-prc71ls9j..xn--xo0dw109an237f;    [B1 V6 A4_2];   [B1 V6 A4_2]    #       ࡎٺී3..𐹹\r
++B;    xn--3-prc71ls9j..xn--0ug3205g7eyf3c96h; [B1 C1 V6 A4_2];        [B1 C1 V6 A4_2] #       ࡎٺී3..𐹹\r
++B;    xn--zib94gfziuq1a.xn--xo0dw109an237f;   [B1 V6];        [B1 V6] #       ࡎٺී⒊.𐹹\r
++B;    xn--zib94gfziuq1a.xn--0ug3205g7eyf3c96h;        [B1 C1 V6];     [B1 C1 V6]      #       ࡎٺී⒊.𐹹\r
++T;    ς\u200D-.Ⴣ𦟙;      [C2 P1 V3 V6];  [P1 V3 V6]      #       ς-.Ⴣ𦟙\r
++N;    ς\u200D-.Ⴣ𦟙;      [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       ς-.Ⴣ𦟙\r
++T;    ς\u200D-.ⴣ𦟙;      [C2 V3];        [V3]    #       ς-.ⴣ𦟙\r
++N;    ς\u200D-.ⴣ𦟙;      [C2 V3];        [C2 V3] #       ς-.ⴣ𦟙\r
++T;    Σ\u200D-.Ⴣ𦟙;      [C2 P1 V3 V6];  [P1 V3 V6]      #       σ-.Ⴣ𦟙\r
++N;    Σ\u200D-.Ⴣ𦟙;      [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       σ-.Ⴣ𦟙\r
++T;    σ\u200D-.ⴣ𦟙;      [C2 V3];        [V3]    #       σ-.ⴣ𦟙\r
++N;    σ\u200D-.ⴣ𦟙;      [C2 V3];        [C2 V3] #       σ-.ⴣ𦟙\r
++B;    xn----zmb.xn--rlj2573p; [V3];   [V3]\r
++B;    xn----zmb048s.xn--rlj2573p;     [C2 V3];        [C2 V3] #       σ-.ⴣ𦟙\r
++B;    xn----zmb.xn--7nd64871a;        [V3 V6];        [V3 V6]\r
++B;    xn----zmb048s.xn--7nd64871a;    [C2 V3 V6];     [C2 V3 V6]      #       σ-.Ⴣ𦟙\r
++B;    xn----xmb348s.xn--rlj2573p;     [C2 V3];        [C2 V3] #       ς-.ⴣ𦟙\r
++B;    xn----xmb348s.xn--7nd64871a;    [C2 V3 V6];     [C2 V3 V6]      #       ς-.Ⴣ𦟙\r
++B;    ≠。🞳𝟲; [P1 V6];        [P1 V6]\r
++B;    =\u0338。🞳𝟲;     [P1 V6];        [P1 V6]\r
++B;    ≠。🞳6;    [P1 V6];        [P1 V6]\r
++B;    =\u0338。🞳6;        [P1 V6];        [P1 V6]\r
++B;    xn--1ch.xn--6-dl4s;     [V6];   [V6]\r
++B;    󅬽.蠔;       [P1 V6];        [P1 V6]\r
++B;    xn--g747d.xn--xl2a;     [V6];   [V6]\r
++T;    \u08E6\u200D.뼽;     [C2 V5];        [V5]    #       ࣦ.뼽\r
++N;    \u08E6\u200D.뼽;     [C2 V5];        [C2 V5] #       ࣦ.뼽\r
++T;    \u08E6\u200D.뼽;       [C2 V5];        [V5]    #       ࣦ.뼽\r
++N;    \u08E6\u200D.뼽;       [C2 V5];        [C2 V5] #       ࣦ.뼽\r
++T;    \u08E6\u200D.뼽;       [C2 V5];        [V5]    #       ࣦ.뼽\r
++N;    \u08E6\u200D.뼽;       [C2 V5];        [C2 V5] #       ࣦ.뼽\r
++T;    \u08E6\u200D.뼽; [C2 V5];        [V5]    #       ࣦ.뼽\r
++N;    \u08E6\u200D.뼽; [C2 V5];        [C2 V5] #       ࣦ.뼽\r
++B;    xn--p0b.xn--e43b;       [V5];   [V5]    #       ࣦ.뼽\r
++B;    xn--p0b869i.xn--e43b;   [C2 V5];        [C2 V5] #       ࣦ.뼽\r
++B;    ₇\u0BCD􃂷\u06D2。👖\u0675-𞪑;  [B1 P1 V6];     [B1 P1 V6]      #       7்ے.👖اٴ-\r
++B;    7\u0BCD􃂷\u06D2。👖\u0627\u0674-𞪑;      [B1 P1 V6];     [B1 P1 V6]      #       7்ے.👖اٴ-\r
++B;    xn--7-rwc839aj3073c.xn----ymc5uv818oghka;       [B1 V6];        [B1 V6] #       7்ے.👖اٴ-\r
++B;    -。\u077B;     [B1 V3];        [B1 V3] #       -.ݻ\r
++B;    -。\u077B;     [B1 V3];        [B1 V3] #       -.ݻ\r
++B;    -.xn--cqb;      [B1 V3];        [B1 V3] #       -.ݻ\r
++B;    𑇌𵛓。-⒈ꡏ\u072B;       [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       𑇌.-⒈ꡏܫ\r
++B;    𑇌𵛓。-1.ꡏ\u072B;        [B1 B5 B6 P1 V3 V5 V6]; [B1 B5 B6 P1 V3 V5 V6]  #       𑇌.-1.ꡏܫ\r
++B;    xn--8d1dg030h.-1.xn--1nb7163f;  [B1 B5 B6 V3 V5 V6];    [B1 B5 B6 V3 V5 V6]     #       𑇌.-1.ꡏܫ\r
++B;    xn--8d1dg030h.xn----u1c466tp10j;        [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       𑇌.-⒈ꡏܫ\r
++B;    璛\u1734\u06AF.-;      [B1 B5 B6 V3];  [B1 B5 B6 V3]   #       璛᜴گ.-\r
++B;    xn--ikb175frt4e.-;      [B1 B5 B6 V3];  [B1 B5 B6 V3]   #       璛᜴گ.-\r
++B;    󠆰\u08A1\u0A4D샕.𐹲휁;  [B1 B2 B3];     [B1 B2 B3]      #       ࢡ੍샕.𐹲휁\r
++B;    󠆰\u08A1\u0A4D샕.𐹲휁;      [B1 B2 B3];     [B1 B2 B3]      #       ࢡ੍샕.𐹲휁\r
++B;    󠆰\u08A1\u0A4D샕.𐹲휁;    [B1 B2 B3];     [B1 B2 B3]      #       ࢡ੍샕.𐹲휁\r
++B;    󠆰\u08A1\u0A4D샕.𐹲휁;        [B1 B2 B3];     [B1 B2 B3]      #       ࢡ੍샕.𐹲휁\r
++B;    xn--qyb07fj857a.xn--728bv72h;   [B1 B2 B3];     [B1 B2 B3]      #       ࢡ੍샕.𐹲휁\r
++B;    񍨽.񋸕;    [P1 V6];        [P1 V6]\r
++B;    񍨽.񋸕;      [P1 V6];        [P1 V6]\r
++B;    xn--pr3x.xn--rv7w;      [V6];   [V6]\r
++B;    \u067D𞥕。𑑂𞤶Ⴍ-;      [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ٽ𞥕.𑑂𞤶Ⴍ-\r
++B;    \u067D𞥕。𑑂𞤶Ⴍ-;      [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ٽ𞥕.𑑂𞤶Ⴍ-\r
++B;    \u067D𞥕。𑑂𞤶ⴍ-;      [B1 V3 V5];     [B1 V3 V5]      #       ٽ𞥕.𑑂𞤶ⴍ-\r
++B;    \u067D𞥕。𑑂𞤔Ⴍ-;      [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ٽ𞥕.𑑂𞤶Ⴍ-\r
++B;    \u067D𞥕。𑑂𞤔ⴍ-;      [B1 V3 V5];     [B1 V3 V5]      #       ٽ𞥕.𑑂𞤶ⴍ-\r
++B;    xn--2ib0338v.xn----zvs0199fo91g;        [B1 V3 V5];     [B1 V3 V5]      #       ٽ𞥕.𑑂𞤶ⴍ-\r
++B;    xn--2ib0338v.xn----w0g2740ro9vg;        [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       ٽ𞥕.𑑂𞤶Ⴍ-\r
++B;    \u067D𞥕。𑑂𞤶ⴍ-;      [B1 V3 V5];     [B1 V3 V5]      #       ٽ𞥕.𑑂𞤶ⴍ-\r
++B;    \u067D𞥕。𑑂𞤔Ⴍ-;      [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ٽ𞥕.𑑂𞤶Ⴍ-\r
++B;    \u067D𞥕。𑑂𞤔ⴍ-;      [B1 V3 V5];     [B1 V3 V5]      #       ٽ𞥕.𑑂𞤶ⴍ-\r
++B;    𐯀𐸉𞧏。񢚧₄Ⴋ񂹫;  [P1 V6];        [P1 V6]\r
++B;    𐯀𐸉𞧏。񢚧4Ⴋ񂹫;    [P1 V6];        [P1 V6]\r
++B;    𐯀𐸉𞧏。񢚧4ⴋ񂹫;    [P1 V6];        [P1 V6]\r
++B;    xn--039c42bq865a.xn--4-wvs27840bnrzm;   [V6];   [V6]\r
++B;    xn--039c42bq865a.xn--4-t0g49302fnrzm;   [V6];   [V6]\r
++B;    𐯀𐸉𞧏。񢚧₄ⴋ񂹫;  [P1 V6];        [P1 V6]\r
++B;    4\u06BD︒󠑥.≠;     [B1 P1 V6];     [B1 P1 V6]      #       4ڽ︒.≠\r
++B;    4\u06BD︒󠑥.=\u0338; [B1 P1 V6];     [B1 P1 V6]      #       4ڽ︒.≠\r
++B;    4\u06BD。󠑥.≠;     [B1 P1 V6];     [B1 P1 V6]      #       4ڽ..≠\r
++B;    4\u06BD。󠑥.=\u0338; [B1 P1 V6];     [B1 P1 V6]      #       4ڽ..≠\r
++B;    xn--4-kvc.xn--5136e.xn--1ch;    [B1 V6];        [B1 V6] #       4ڽ..≠\r
++B;    xn--4-kvc5601q2h50i.xn--1ch;    [B1 V6];        [B1 V6] #       4ڽ︒.≠\r
++B;    𝟓。\u06D7;  [V5];   [V5]    #       5.ۗ\r
++B;    5。\u06D7;     [V5];   [V5]    #       5.ۗ\r
++B;    5.xn--nlb;      [V5];   [V5]    #       5.ۗ\r
++T;    \u200C򺸩.⾕; [C1 P1 V6];     [P1 V6] #       .谷\r
++N;    \u200C򺸩.⾕; [C1 P1 V6];     [C1 P1 V6]      #       .谷\r
++T;    \u200C򺸩.谷; [C1 P1 V6];     [P1 V6] #       .谷\r
++N;    \u200C򺸩.谷; [C1 P1 V6];     [C1 P1 V6]      #       .谷\r
++B;    xn--i183d.xn--6g3a;     [V6];   [V6]\r
++B;    xn--0ug26167i.xn--6g3a; [C1 V6];        [C1 V6] #       .谷\r
++T;    ︒󎰇\u200D.-\u073C\u200C;    [C1 C2 P1 V3 V6];       [P1 V3 V6]      #       ︒.-ܼ\r
++N;    ︒󎰇\u200D.-\u073C\u200C;    [C1 C2 P1 V3 V6];       [C1 C2 P1 V3 V6]        #       ︒.-ܼ\r
++T;    。󎰇\u200D.-\u073C\u200C;    [C1 C2 P1 V3 V6 A4_2];  [P1 V3 V6 A4_2] #       ..-ܼ\r
++N;    。󎰇\u200D.-\u073C\u200C;    [C1 C2 P1 V3 V6 A4_2];  [C1 C2 P1 V3 V6 A4_2]   #       ..-ܼ\r
++B;    .xn--hh50e.xn----t2c;   [V3 V6 A4_2];   [V3 V6 A4_2]    #       ..-ܼ\r
++B;    .xn--1ug05310k.xn----t2c071q;   [C1 C2 V3 V6 A4_2];     [C1 C2 V3 V6 A4_2]      #       ..-ܼ\r
++B;    xn--y86c71305c.xn----t2c;       [V3 V6];        [V3 V6] #       ︒.-ܼ\r
++B;    xn--1ug1658ftw26f.xn----t2c071q;        [C1 C2 V3 V6];  [C1 C2 V3 V6]   #       ︒.-ܼ\r
++B;    ≯𞤟。ᡨ;  [B1 P1 V6];     [B1 P1 V6]\r
++B;    >\u0338𞤟。ᡨ;      [B1 P1 V6];     [B1 P1 V6]\r
++B;    >\u0338𞥁。ᡨ;      [B1 P1 V6];     [B1 P1 V6]\r
++B;    ≯𞥁。ᡨ;  [B1 P1 V6];     [B1 P1 V6]\r
++B;    xn--hdhz520p.xn--48e;   [B1 V6];        [B1 V6]\r
++B;    \u0F74𫫰𝨄。\u0713𐹦;    [B1 V5];        [B1 V5] #       ུ𫫰𝨄.ܓ𐹦\r
++B;    xn--ned8985uo92e.xn--dnb6395k;  [B1 V5];        [B1 V5] #       ུ𫫰𝨄.ܓ𐹦\r
++B;    \u033C\u07DB⁷𝟹。𝟬;     [B1 V5];        [B1 V5] #       ̼ߛ73.0\r
++B;    \u033C\u07DB73。0;     [B1 V5];        [B1 V5] #       ̼ߛ73.0\r
++B;    xn--73-9yb648b.0;       [B1 V5];        [B1 V5] #       ̼ߛ73.0\r
++T;    \u200D.𝟗;  [C2];   [A4_2]  #       .9\r
++N;    \u200D.𝟗;  [C2];   [C2]    #       .9\r
++T;    \u200D.9;       [C2];   [A4_2]  #       .9\r
++N;    \u200D.9;       [C2];   [C2]    #       .9\r
++B;    .9;     [A4_2]; [A4_2]\r
++B;    xn--1ug.9;      [C2];   [C2]    #       .9\r
++B;    9;      ;       \r
++B;    \u0779ᡭ𪕈。\u06B6\u08D9;   [B2 B3];        [B2 B3] #       ݹᡭ𪕈.ڶࣙ\r
++B;    xn--9pb497fs270c.xn--pkb80i;    [B2 B3];        [B2 B3] #       ݹᡭ𪕈.ڶࣙ\r
++B;    \u07265\u07E2겙。\u1CF4𐷚;        [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       ܦ5ߢ겙.᳴\r
++B;    \u07265\u07E2겙。\u1CF4𐷚;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       ܦ5ߢ겙.᳴\r
++B;    \u07265\u07E2겙。\u1CF4𐷚;  [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       ܦ5ߢ겙.᳴\r
++B;    \u07265\u07E2겙。\u1CF4𐷚;    [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       ܦ5ߢ겙.᳴\r
++B;    xn--5-j1c97c2483c.xn--e7f2093h; [B1 B2 B3 V5 V6];       [B1 B2 B3 V5 V6]        #       ܦ5ߢ겙.᳴\r
++T;    Ⴍ𿣍ꡨ\u05AE。Ⴞ\u200C\u200C;     [C1 P1 V6];     [P1 V6] #       Ⴍꡨ֮.Ⴞ\r
++N;    Ⴍ𿣍ꡨ\u05AE。Ⴞ\u200C\u200C;     [C1 P1 V6];     [C1 P1 V6]      #       Ⴍꡨ֮.Ⴞ\r
++T;    ⴍ𿣍ꡨ\u05AE。ⴞ\u200C\u200C;     [C1 P1 V6];     [P1 V6] #       ⴍꡨ֮.ⴞ\r
++N;    ⴍ𿣍ꡨ\u05AE。ⴞ\u200C\u200C;     [C1 P1 V6];     [C1 P1 V6]      #       ⴍꡨ֮.ⴞ\r
++B;    xn--5cb172r175fug38a.xn--mlj;   [V6];   [V6]    #       ⴍꡨ֮.ⴞ\r
++B;    xn--5cb172r175fug38a.xn--0uga051h;      [C1 V6];        [C1 V6] #       ⴍꡨ֮.ⴞ\r
++B;    xn--5cb347co96jug15a.xn--2nd;   [V6];   [V6]    #       Ⴍꡨ֮.Ⴞ\r
++B;    xn--5cb347co96jug15a.xn--2nd059ea;      [C1 V6];        [C1 V6] #       Ⴍꡨ֮.Ⴞ\r
++B;    𐋰。󑓱;    [P1 V6];        [P1 V6]\r
++B;    xn--k97c.xn--q031e;     [V6];   [V6]\r
++B;    󡎦\u17B4\u0B4D.𐹾;  [B1 P1 V6];     [B1 P1 V6]      #       ୍.𐹾\r
++B;    xn--9ic364dho91z.xn--2o0d;      [B1 V6];        [B1 V6] #       ୍.𐹾\r
++B;    \u08DFႫ𶿸귤.򠅼𝟢휪\u0AE3;   [P1 V5 V6];     [P1 V5 V6]      #       ࣟႫ귤.0휪ૣ\r
++B;    \u08DFႫ𶿸귤.򠅼𝟢휪\u0AE3;       [P1 V5 V6];     [P1 V5 V6]      #       ࣟႫ귤.0휪ૣ\r
++B;    \u08DFႫ𶿸귤.򠅼0휪\u0AE3;        [P1 V5 V6];     [P1 V5 V6]      #       ࣟႫ귤.0휪ૣ\r
++B;    \u08DFႫ𶿸귤.򠅼0휪\u0AE3;    [P1 V5 V6];     [P1 V5 V6]      #       ࣟႫ귤.0휪ૣ\r
++B;    \u08DFⴋ𶿸귤.򠅼0휪\u0AE3;    [P1 V5 V6];     [P1 V5 V6]      #       ࣟⴋ귤.0휪ૣ\r
++B;    \u08DFⴋ𶿸귤.򠅼0휪\u0AE3;        [P1 V5 V6];     [P1 V5 V6]      #       ࣟⴋ귤.0휪ૣ\r
++B;    xn--i0b436pkl2g2h42a.xn--0-8le8997mulr5f;       [V5 V6];        [V5 V6] #       ࣟⴋ귤.0휪ૣ\r
++B;    xn--i0b601b6r7l2hs0a.xn--0-8le8997mulr5f;       [V5 V6];        [V5 V6] #       ࣟႫ귤.0휪ૣ\r
++B;    \u08DFⴋ𶿸귤.򠅼𝟢휪\u0AE3;       [P1 V5 V6];     [P1 V5 V6]      #       ࣟⴋ귤.0휪ૣ\r
++B;    \u08DFⴋ𶿸귤.򠅼𝟢휪\u0AE3;   [P1 V5 V6];     [P1 V5 V6]      #       ࣟⴋ귤.0휪ૣ\r
++B;    \u0784.𞡝\u0601;    [P1 V6];        [P1 V6] #       ބ.𞡝\r
++B;    \u0784.𞡝\u0601;      [P1 V6];        [P1 V6] #       ބ.𞡝\r
++B;    xn--lqb.xn--jfb1808v;   [V6];   [V6]    #       ބ.𞡝\r
++T;    \u0ACD₃.8\uA8C4\u200D🃤;    [V5];   [V5]    #       ્3.8꣄🃤\r
++N;    \u0ACD₃.8\uA8C4\u200D🃤;    [V5];   [V5]    #       ્3.8꣄🃤\r
++T;    \u0ACD3.8\uA8C4\u200D🃤;      [V5];   [V5]    #       ્3.8꣄🃤\r
++N;    \u0ACD3.8\uA8C4\u200D🃤;      [V5];   [V5]    #       ્3.8꣄🃤\r
++B;    xn--3-yke.xn--8-sl4et308f;      [V5];   [V5]    #       ્3.8꣄🃤\r
++B;    xn--3-yke.xn--8-ugnv982dbkwm;   [V5];   [V5]    #       ્3.8꣄🃤\r
++B;    ℻⩷𝆆。𞤠󠆁\u180C;    [B6];   [B6]\r
++B;    FAX⩷𝆆。𞤠󠆁\u180C;    [B6];   [B6]\r
++B;    fax⩷𝆆。𞥂󠆁\u180C;    [B6];   [B6]\r
++B;    Fax⩷𝆆。𞤠󠆁\u180C;    [B6];   [B6]\r
++B;    xn--fax-4c9a1676t.xn--6e6h;     [B6];   [B6]\r
++B;    ℻⩷𝆆。𞥂󠆁\u180C;    [B6];   [B6]\r
++B;    FAX⩷𝆆。𞥂󠆁\u180C;    [B6];   [B6]\r
++B;    fax⩷𝆆。𞤠󠆁\u180C;    [B6];   [B6]\r
++B;    fax⩷𝆆.𞥂;        [B6];   [B6]\r
++B;    FAX⩷𝆆.𞤠;        [B6];   [B6]\r
++B;    Fax⩷𝆆.𞤠;        [B6];   [B6]\r
++B;    FAX⩷𝆆.𞥂;        [B6];   [B6]\r
++B;    Fax⩷𝆆.𞥂;        [B6];   [B6]\r
++B;    ꡕ≠\u105E󮿱。𐵧󠄫\uFFA0;      [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ꡕ≠ၞ.\r
++B;    ꡕ=\u0338\u105E󮿱。𐵧󠄫\uFFA0;  [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ꡕ≠ၞ.\r
++B;    ꡕ≠\u105E󮿱。𐵧󠄫\u1160;      [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ꡕ≠ၞ.\r
++B;    ꡕ=\u0338\u105E󮿱。𐵧󠄫\u1160;  [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ꡕ≠ၞ.\r
++B;    xn--cld333gn31h0158l.xn--psd1510k;      [B2 B3 V6];     [B2 B3 V6]      #       ꡕ≠ၞ.\r
++B;    xn--cld333gn31h0158l.xn--cl7c96v;       [B2 B3 V6];     [B2 B3 V6]      #       ꡕ≠ၞ.\r
++T;    鱊。\u200C;   [C1];   xn--rt6a.       #       鱊.\r
++N;    鱊。\u200C;   [C1];   [C1]    #       鱊.\r
++B;    xn--rt6a.;      鱊.;   xn--rt6a.\r
++B;    鱊.;   ;       xn--rt6a.\r
++B;    xn--rt6a.xn--0ug;       [C1];   [C1]    #       鱊.\r
++B;    8𐹣.𑍨;   [B1 B3 B6 V5];  [B1 B3 B6 V5]\r
++B;    8𐹣.𑍨;     [B1 B3 B6 V5];  [B1 B3 B6 V5]\r
++B;    xn--8-d26i.xn--0p1d;    [B1 B3 B6 V5];  [B1 B3 B6 V5]\r
++B;    ⏹𐧀.𐫯; [B1];   [B1]\r
++B;    ⏹𐧀.𐫯;   [B1];   [B1]\r
++B;    xn--qoh9161g.xn--1x9c;  [B1];   [B1]\r
++T;    𞤺\u07CC4.\u200D;   [B1 C2];        xn--4-0bd15808a.        #       𞤺ߌ4.\r
++N;    𞤺\u07CC4.\u200D;   [B1 C2];        [B1 C2] #       𞤺ߌ4.\r
++T;    𞤺\u07CC4.\u200D;     [B1 C2];        xn--4-0bd15808a.        #       𞤺ߌ4.\r
++N;    𞤺\u07CC4.\u200D;     [B1 C2];        [B1 C2] #       𞤺ߌ4.\r
++T;    𞤘\u07CC4.\u200D;     [B1 C2];        xn--4-0bd15808a.        #       𞤺ߌ4.\r
++N;    𞤘\u07CC4.\u200D;     [B1 C2];        [B1 C2] #       𞤺ߌ4.\r
++B;    xn--4-0bd15808a.;       𞤺\u07CC4.;   xn--4-0bd15808a.        #       𞤺ߌ4.\r
++B;    𞤺\u07CC4.;   ;       xn--4-0bd15808a.        #       𞤺ߌ4.\r
++B;    𞤘\u07CC4.;   𞤺\u07CC4.;   xn--4-0bd15808a.        #       𞤺ߌ4.\r
++B;    xn--4-0bd15808a.xn--1ug;        [B1 C2];        [B1 C2] #       𞤺ߌ4.\r
++T;    𞤘\u07CC4.\u200D;   [B1 C2];        xn--4-0bd15808a.        #       𞤺ߌ4.\r
++N;    𞤘\u07CC4.\u200D;   [B1 C2];        [B1 C2] #       𞤺ߌ4.\r
++B;    ⒗\u0981\u20EF-.\u08E2•;     [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ⒗ঁ⃯-.•\r
++B;    16.\u0981\u20EF-.\u08E2•;     [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       16.ঁ⃯-.•\r
++B;    16.xn----z0d801p.xn--l0b810j;   [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       16.ঁ⃯-.•\r
++B;    xn----z0d801p6kd.xn--l0b810j;   [B1 V3 V6];     [B1 V3 V6]      #       ⒗ঁ⃯-.•\r
++B;    -。䏛;        [V3];   [V3]\r
++B;    -。䏛;        [V3];   [V3]\r
++B;    -.xn--xco;      [V3];   [V3]\r
++T;    \u200C񒃠.\u200D;    [C1 C2 P1 V6];  [P1 V6] #       .\r
++N;    \u200C񒃠.\u200D;    [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       .\r
++T;    \u200C񒃠.\u200D;      [C1 C2 P1 V6];  [P1 V6] #       .\r
++N;    \u200C񒃠.\u200D;      [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       .\r
++B;    xn--dj8y.;      [V6];   [V6]\r
++B;    xn--0ugz7551c.xn--1ug;  [C1 C2 V6];     [C1 C2 V6]      #       .\r
++T;    ⒈⓰󥣇。𐹠\u200D򗷦Ⴕ; [B1 C2 P1 V6];  [B1 P1 V6]      #       ⒈⓰.𐹠Ⴕ\r
++N;    ⒈⓰󥣇。𐹠\u200D򗷦Ⴕ; [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       ⒈⓰.𐹠Ⴕ\r
++T;    1.⓰󥣇。𐹠\u200D򗷦Ⴕ;  [B1 C2 P1 V6];  [B1 P1 V6]      #       1.⓰.𐹠Ⴕ\r
++N;    1.⓰󥣇。𐹠\u200D򗷦Ⴕ;  [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       1.⓰.𐹠Ⴕ\r
++T;    1.⓰󥣇。𐹠\u200D򗷦ⴕ;  [B1 C2 P1 V6];  [B1 P1 V6]      #       1.⓰.𐹠ⴕ\r
++N;    1.⓰󥣇。𐹠\u200D򗷦ⴕ;  [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       1.⓰.𐹠ⴕ\r
++B;    1.xn--svh00804k.xn--dljv223ee5t2d;      [B1 V6];        [B1 V6]\r
++B;    1.xn--svh00804k.xn--1ug352csp0psg45e;   [B1 C2 V6];     [B1 C2 V6]      #       1.⓰.𐹠ⴕ\r
++B;    1.xn--svh00804k.xn--tnd1990ke579c;      [B1 V6];        [B1 V6]\r
++B;    1.xn--svh00804k.xn--tnd969erj4psgl3e;   [B1 C2 V6];     [B1 C2 V6]      #       1.⓰.𐹠Ⴕ\r
++T;    ⒈⓰󥣇。𐹠\u200D򗷦ⴕ; [B1 C2 P1 V6];  [B1 P1 V6]      #       ⒈⓰.𐹠ⴕ\r
++N;    ⒈⓰󥣇。𐹠\u200D򗷦ⴕ; [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       ⒈⓰.𐹠ⴕ\r
++B;    xn--tsh0nz9380h.xn--dljv223ee5t2d;      [B1 V6];        [B1 V6]\r
++B;    xn--tsh0nz9380h.xn--1ug352csp0psg45e;   [B1 C2 V6];     [B1 C2 V6]      #       ⒈⓰.𐹠ⴕ\r
++B;    xn--tsh0nz9380h.xn--tnd1990ke579c;      [B1 V6];        [B1 V6]\r
++B;    xn--tsh0nz9380h.xn--tnd969erj4psgl3e;   [B1 C2 V6];     [B1 C2 V6]      #       ⒈⓰.𐹠Ⴕ\r
++T;    𞠊ᠮ-ß。\u1CD0効\u0601𷣭;       [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       𞠊ᠮ-ß.᳐効\r
++N;    𞠊ᠮ-ß。\u1CD0効\u0601𷣭;       [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       𞠊ᠮ-ß.᳐効\r
++T;    𞠊ᠮ-ß。\u1CD0効\u0601𷣭;       [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       𞠊ᠮ-ß.᳐効\r
++N;    𞠊ᠮ-ß。\u1CD0効\u0601𷣭;       [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       𞠊ᠮ-ß.᳐効\r
++B;    𞠊ᠮ-SS。\u1CD0効\u0601𷣭;       [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       𞠊ᠮ-ss.᳐効\r
++B;    𞠊ᠮ-ss。\u1CD0効\u0601𷣭;       [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       𞠊ᠮ-ss.᳐効\r
++B;    𞠊ᠮ-Ss。\u1CD0効\u0601𷣭;       [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       𞠊ᠮ-ss.᳐効\r
++B;    xn---ss-21t18904a.xn--jfb197i791bi6x4c; [B1 B2 B3 V5 V6];       [B1 B2 B3 V5 V6]        #       𞠊ᠮ-ss.᳐効\r
++B;    xn----qfa310pg973b.xn--jfb197i791bi6x4c;        [B1 B2 B3 V5 V6];       [B1 B2 B3 V5 V6]        #       𞠊ᠮ-ß.᳐効\r
++B;    𞠊ᠮ-SS。\u1CD0効\u0601𷣭;       [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       𞠊ᠮ-ss.᳐効\r
++B;    𞠊ᠮ-ss。\u1CD0効\u0601𷣭;       [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       𞠊ᠮ-ss.᳐効\r
++B;    𞠊ᠮ-Ss。\u1CD0効\u0601𷣭;       [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       𞠊ᠮ-ss.᳐効\r
++B;    𑇀.󠨱;      [P1 V5 V6];     [P1 V5 V6]\r
++B;    xn--wd1d.xn--k946e;     [V5 V6];        [V5 V6]\r
++B;    ␒3\uFB88。𝟘𐨿𐹆;      [B1 P1 V6];     [B1 P1 V6]      #       ␒3ڈ.0𐨿\r
++B;    ␒3\u0688。0𐨿𐹆; [B1 P1 V6];     [B1 P1 V6]      #       ␒3ڈ.0𐨿\r
++B;    xn--3-jsc897t.xn--0-sc5iy3h;    [B1 V6];        [B1 V6] #       ␒3ڈ.0𐨿\r
++B;    \u076B6\u0A81\u08A6。\u1DE3; [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ݫ6ઁࢦ.ᷣ\r
++B;    \u076B6\u0A81\u08A6。\u1DE3;   [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ݫ6ઁࢦ.ᷣ\r
++B;    xn--6-h5c06gj6c.xn--7eg;        [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ݫ6ઁࢦ.ᷣ\r
++T;    \u0605-𽤞Ⴂ。򅤶\u200D;    [B1 B6 C2 P1 V6];       [B1 P1 V6]      #       -Ⴂ.\r
++N;    \u0605-𽤞Ⴂ。򅤶\u200D;    [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       -Ⴂ.\r
++T;    \u0605-𽤞ⴂ。򅤶\u200D;    [B1 B6 C2 P1 V6];       [B1 P1 V6]      #       -ⴂ.\r
++N;    \u0605-𽤞ⴂ。򅤶\u200D;    [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       -ⴂ.\r
++B;    xn----0kc8501a5399e.xn--ss06b;  [B1 V6];        [B1 V6] #       -ⴂ.\r
++B;    xn----0kc8501a5399e.xn--1ugy3204f;      [B1 B6 C2 V6];  [B1 B6 C2 V6]   #       -ⴂ.\r
++B;    xn----0kc662fc152h.xn--ss06b;   [B1 V6];        [B1 V6] #       -Ⴂ.\r
++B;    xn----0kc662fc152h.xn--1ugy3204f;       [B1 B6 C2 V6];  [B1 B6 C2 V6]   #       -Ⴂ.\r
++T;    ⾆.ꡈ5≯ß;      [P1 V6];        [P1 V6]\r
++N;    ⾆.ꡈ5≯ß;      [P1 V6];        [P1 V6]\r
++T;    ⾆.ꡈ5>\u0338ß;  [P1 V6];        [P1 V6]\r
++N;    ⾆.ꡈ5>\u0338ß;  [P1 V6];        [P1 V6]\r
++T;    舌.ꡈ5≯ß;  [P1 V6];        [P1 V6]\r
++N;    舌.ꡈ5≯ß;  [P1 V6];        [P1 V6]\r
++T;    舌.ꡈ5>\u0338ß;      [P1 V6];        [P1 V6]\r
++N;    舌.ꡈ5>\u0338ß;      [P1 V6];        [P1 V6]\r
++B;    舌.ꡈ5>\u0338SS;      [P1 V6];        [P1 V6]\r
++B;    舌.ꡈ5≯SS;  [P1 V6];        [P1 V6]\r
++B;    舌.ꡈ5≯ss;  [P1 V6];        [P1 V6]\r
++B;    舌.ꡈ5>\u0338ss;      [P1 V6];        [P1 V6]\r
++B;    舌.ꡈ5>\u0338Ss;      [P1 V6];        [P1 V6]\r
++B;    舌.ꡈ5≯Ss;  [P1 V6];        [P1 V6]\r
++B;    xn--tc1a.xn--5ss-3m2a5009e;     [V6];   [V6]\r
++B;    xn--tc1a.xn--5-qfa988w745i;     [V6];   [V6]\r
++B;    ⾆.ꡈ5>\u0338SS;  [P1 V6];        [P1 V6]\r
++B;    ⾆.ꡈ5≯SS;      [P1 V6];        [P1 V6]\r
++B;    ⾆.ꡈ5≯ss;      [P1 V6];        [P1 V6]\r
++B;    ⾆.ꡈ5>\u0338ss;  [P1 V6];        [P1 V6]\r
++B;    ⾆.ꡈ5>\u0338Ss;  [P1 V6];        [P1 V6]\r
++B;    ⾆.ꡈ5≯Ss;      [P1 V6];        [P1 V6]\r
++T;    \u0ACD8\u200D.򾂈\u075C;     [B1 B5 B6 C2 P1 V5 V6]; [B1 B5 B6 P1 V5 V6]     #       ્8.ݜ\r
++N;    \u0ACD8\u200D.򾂈\u075C;     [B1 B5 B6 C2 P1 V5 V6]; [B1 B5 B6 C2 P1 V5 V6]  #       ્8.ݜ\r
++T;    \u0ACD8\u200D.򾂈\u075C;       [B1 B5 B6 C2 P1 V5 V6]; [B1 B5 B6 P1 V5 V6]     #       ્8.ݜ\r
++N;    \u0ACD8\u200D.򾂈\u075C;       [B1 B5 B6 C2 P1 V5 V6]; [B1 B5 B6 C2 P1 V5 V6]  #       ્8.ݜ\r
++B;    xn--8-yke.xn--gpb79046m;        [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       ્8.ݜ\r
++B;    xn--8-yke534n.xn--gpb79046m;    [B1 B5 B6 C2 V5 V6];    [B1 B5 B6 C2 V5 V6]     #       ્8.ݜ\r
++B;    򸷆\u0A70≮򹓙.񞎧⁷󠯙\u06B6;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ੰ≮.7ڶ\r
++B;    򸷆\u0A70<\u0338򹓙.񞎧⁷󠯙\u06B6;      [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ੰ≮.7ڶ\r
++B;    򸷆\u0A70≮򹓙.񞎧7󠯙\u06B6;      [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ੰ≮.7ڶ\r
++B;    򸷆\u0A70<\u0338򹓙.񞎧7󠯙\u06B6;  [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ੰ≮.7ڶ\r
++B;    xn--ycc893jqh38rb6fa.xn--7-5uc53836ixt41c;      [B5 B6 V6];     [B5 B6 V6]      #       ੰ≮.7ڶ\r
++T;    𞤪.ς;        ;       xn--ie6h.xn--4xa\r
++N;    𞤪.ς;        ;       xn--ie6h.xn--3xa\r
++B;    𞤈.Σ;        𞤪.σ;        xn--ie6h.xn--4xa\r
++B;    𞤪.σ;        ;       xn--ie6h.xn--4xa\r
++B;    𞤈.σ;        𞤪.σ;        xn--ie6h.xn--4xa\r
++B;    xn--ie6h.xn--4xa;       𞤪.σ;        xn--ie6h.xn--4xa\r
++T;    𞤈.ς;        𞤪.ς;        xn--ie6h.xn--4xa\r
++N;    𞤈.ς;        𞤪.ς;        xn--ie6h.xn--3xa\r
++B;    xn--ie6h.xn--3xa;       𞤪.ς;        xn--ie6h.xn--3xa\r
++B;    𞤪.Σ;        𞤪.σ;        xn--ie6h.xn--4xa\r
++T;    \u200CႺ。ς; [C1 P1 V6];     [P1 V6] #       Ⴚ.ς\r
++N;    \u200CႺ。ς; [C1 P1 V6];     [C1 P1 V6]      #       Ⴚ.ς\r
++T;    \u200CႺ。ς; [C1 P1 V6];     [P1 V6] #       Ⴚ.ς\r
++N;    \u200CႺ。ς; [C1 P1 V6];     [C1 P1 V6]      #       Ⴚ.ς\r
++T;    \u200Cⴚ。ς; [C1];   xn--ilj.xn--4xa #       ⴚ.ς\r
++N;    \u200Cⴚ。ς; [C1];   [C1]    #       ⴚ.ς\r
++T;    \u200CႺ。Σ; [C1 P1 V6];     [P1 V6] #       Ⴚ.σ\r
++N;    \u200CႺ。Σ; [C1 P1 V6];     [C1 P1 V6]      #       Ⴚ.σ\r
++T;    \u200Cⴚ。σ; [C1];   xn--ilj.xn--4xa #       ⴚ.σ\r
++N;    \u200Cⴚ。σ; [C1];   [C1]    #       ⴚ.σ\r
++B;    xn--ilj.xn--4xa;        ⴚ.σ; xn--ilj.xn--4xa\r
++B;    ⴚ.σ; ;       xn--ilj.xn--4xa\r
++B;    Ⴚ.Σ; [P1 V6];        [P1 V6]\r
++T;    ⴚ.ς; ;       xn--ilj.xn--4xa\r
++N;    ⴚ.ς; ;       xn--ilj.xn--3xa\r
++T;    Ⴚ.ς; [P1 V6];        [P1 V6]\r
++N;    Ⴚ.ς; [P1 V6];        [P1 V6]\r
++B;    xn--ynd.xn--4xa;        [V6];   [V6]\r
++B;    xn--ynd.xn--3xa;        [V6];   [V6]\r
++B;    xn--ilj.xn--3xa;        ⴚ.ς; xn--ilj.xn--3xa\r
++B;    Ⴚ.σ; [P1 V6];        [P1 V6]\r
++B;    xn--0ug262c.xn--4xa;    [C1];   [C1]    #       ⴚ.σ\r
++B;    xn--ynd759e.xn--4xa;    [C1 V6];        [C1 V6] #       Ⴚ.σ\r
++B;    xn--0ug262c.xn--3xa;    [C1];   [C1]    #       ⴚ.ς\r
++B;    xn--ynd759e.xn--3xa;    [C1 V6];        [C1 V6] #       Ⴚ.ς\r
++T;    \u200Cⴚ。ς; [C1];   xn--ilj.xn--4xa #       ⴚ.ς\r
++N;    \u200Cⴚ。ς; [C1];   [C1]    #       ⴚ.ς\r
++T;    \u200CႺ。Σ; [C1 P1 V6];     [P1 V6] #       Ⴚ.σ\r
++N;    \u200CႺ。Σ; [C1 P1 V6];     [C1 P1 V6]      #       Ⴚ.σ\r
++T;    \u200Cⴚ。σ; [C1];   xn--ilj.xn--4xa #       ⴚ.σ\r
++N;    \u200Cⴚ。σ; [C1];   [C1]    #       ⴚ.σ\r
++B;    𞤃.𐹦;    [B1];   [B1]\r
++B;    𞤃.𐹦;      [B1];   [B1]\r
++B;    𞤥.𐹦;      [B1];   [B1]\r
++B;    xn--de6h.xn--eo0d;      [B1];   [B1]\r
++B;    𞤥.𐹦;    [B1];   [B1]\r
++T;    \u200D⾕。\u200C\u0310\uA953ꡎ;      [C1 C2];        [V5]    #       谷.꥓̐ꡎ\r
++N;    \u200D⾕。\u200C\u0310\uA953ꡎ;      [C1 C2];        [C1 C2] #       谷.꥓̐ꡎ\r
++T;    \u200D⾕。\u200C\uA953\u0310ꡎ;      [C1 C2];        [V5]    #       谷.꥓̐ꡎ\r
++N;    \u200D⾕。\u200C\uA953\u0310ꡎ;      [C1 C2];        [C1 C2] #       谷.꥓̐ꡎ\r
++T;    \u200D谷。\u200C\uA953\u0310ꡎ;      [C1 C2];        [V5]    #       谷.꥓̐ꡎ\r
++N;    \u200D谷。\u200C\uA953\u0310ꡎ;      [C1 C2];        [C1 C2] #       谷.꥓̐ꡎ\r
++B;    xn--6g3a.xn--0sa8175flwa;       [V5];   [V5]    #       谷.꥓̐ꡎ\r
++B;    xn--1ug0273b.xn--0sa359l6n7g13a;        [C1 C2];        [C1 C2] #       谷.꥓̐ꡎ\r
++T;    \u06AA-뉔.𞤐\u200C;        [B2 B3 C1];     [B2 B3] #       ڪ-뉔.𞤲\r
++N;    \u06AA-뉔.𞤐\u200C;        [B2 B3 C1];     [B2 B3 C1]      #       ڪ-뉔.𞤲\r
++T;    \u06AA-뉔.𞤐\u200C;  [B2 B3 C1];     [B2 B3] #       ڪ-뉔.𞤲\r
++N;    \u06AA-뉔.𞤐\u200C;  [B2 B3 C1];     [B2 B3 C1]      #       ڪ-뉔.𞤲\r
++T;    \u06AA-뉔.𞤐\u200C;  [B2 B3 C1];     [B2 B3] #       ڪ-뉔.𞤲\r
++N;    \u06AA-뉔.𞤐\u200C;  [B2 B3 C1];     [B2 B3 C1]      #       ڪ-뉔.𞤲\r
++T;    \u06AA-뉔.𞤐\u200C;    [B2 B3 C1];     [B2 B3] #       ڪ-뉔.𞤲\r
++N;    \u06AA-뉔.𞤐\u200C;    [B2 B3 C1];     [B2 B3 C1]      #       ڪ-뉔.𞤲\r
++T;    \u06AA-뉔.𞤲\u200C;    [B2 B3 C1];     [B2 B3] #       ڪ-뉔.𞤲\r
++N;    \u06AA-뉔.𞤲\u200C;    [B2 B3 C1];     [B2 B3 C1]      #       ڪ-뉔.𞤲\r
++T;    \u06AA-뉔.𞤲\u200C;  [B2 B3 C1];     [B2 B3] #       ڪ-뉔.𞤲\r
++N;    \u06AA-뉔.𞤲\u200C;  [B2 B3 C1];     [B2 B3 C1]      #       ڪ-뉔.𞤲\r
++B;    xn----guc3592k.xn--qe6h;        [B2 B3];        [B2 B3] #       ڪ-뉔.𞤲\r
++B;    xn----guc3592k.xn--0ug7611p;    [B2 B3 C1];     [B2 B3 C1]      #       ڪ-뉔.𞤲\r
++T;    \u06AA-뉔.𞤲\u200C;  [B2 B3 C1];     [B2 B3] #       ڪ-뉔.𞤲\r
++N;    \u06AA-뉔.𞤲\u200C;  [B2 B3 C1];     [B2 B3 C1]      #       ڪ-뉔.𞤲\r
++T;    \u06AA-뉔.𞤲\u200C;        [B2 B3 C1];     [B2 B3] #       ڪ-뉔.𞤲\r
++N;    \u06AA-뉔.𞤲\u200C;        [B2 B3 C1];     [B2 B3 C1]      #       ڪ-뉔.𞤲\r
++T;    񔲵5ᦛς.\uA8C4\u077B\u1CD2\u0738;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       5ᦛς.꣄ݻܸ᳒\r
++N;    񔲵5ᦛς.\uA8C4\u077B\u1CD2\u0738;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       5ᦛς.꣄ݻܸ᳒\r
++T;    񔲵5ᦛς.\uA8C4\u077B\u0738\u1CD2;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       5ᦛς.꣄ݻܸ᳒\r
++N;    񔲵5ᦛς.\uA8C4\u077B\u0738\u1CD2;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       5ᦛς.꣄ݻܸ᳒\r
++T;    񔲵5ᦛς.\uA8C4\u077B\u0738\u1CD2;    [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       5ᦛς.꣄ݻܸ᳒\r
++N;    񔲵5ᦛς.\uA8C4\u077B\u0738\u1CD2;    [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       5ᦛς.꣄ݻܸ᳒\r
++B;    񔲵5ᦛΣ.\uA8C4\u077B\u0738\u1CD2;    [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       5ᦛσ.꣄ݻܸ᳒\r
++B;    񔲵5ᦛσ.\uA8C4\u077B\u0738\u1CD2;    [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       5ᦛσ.꣄ݻܸ᳒\r
++B;    xn--5-0mb988ng603j.xn--fob7kk44dl41k;   [B1 V5 V6];     [B1 V5 V6]      #       5ᦛσ.꣄ݻܸ᳒\r
++B;    xn--5-ymb298ng603j.xn--fob7kk44dl41k;   [B1 V5 V6];     [B1 V5 V6]      #       5ᦛς.꣄ݻܸ᳒\r
++B;    񔲵5ᦛΣ.\uA8C4\u077B\u0738\u1CD2;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       5ᦛσ.꣄ݻܸ᳒\r
++B;    񔲵5ᦛσ.\uA8C4\u077B\u0738\u1CD2;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       5ᦛσ.꣄ݻܸ᳒\r
++B;    񔲵5ᦛΣ.\uA8C4\u077B\u1CD2\u0738;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       5ᦛσ.꣄ݻܸ᳒\r
++B;    񔲵5ᦛσ.\uA8C4\u077B\u1CD2\u0738;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       5ᦛσ.꣄ݻܸ᳒\r
++B;    淽。ᠾ;      淽.ᠾ;        xn--34w.xn--x7e\r
++B;    xn--34w.xn--x7e;        淽.ᠾ;        xn--34w.xn--x7e\r
++B;    淽.ᠾ;        ;       xn--34w.xn--x7e\r
++B;    𐹴𑘷。-;   [B1 V3];        [B1 V3]\r
++B;    xn--so0do6k.-;  [B1 V3];        [B1 V3]\r
++B;    򬨩Ⴓ❓。𑄨;      [P1 V5 V6];     [P1 V5 V6]\r
++B;    򬨩Ⴓ❓。𑄨;      [P1 V5 V6];     [P1 V5 V6]\r
++B;    򬨩ⴓ❓。𑄨;      [P1 V5 V6];     [P1 V5 V6]\r
++B;    xn--8di78qvw32y.xn--k80d;       [V5 V6];        [V5 V6]\r
++B;    xn--rnd896i0j14q.xn--k80d;      [V5 V6];        [V5 V6]\r
++B;    򬨩ⴓ❓。𑄨;      [P1 V5 V6];     [P1 V5 V6]\r
++T;    \u200C𐹡𞤌Ⴇ。ßႣ;      [B1 C1 P1 V6];  [B1 P1 V6]      #       𐹡𞤮Ⴇ.ßႣ\r
++N;    \u200C𐹡𞤌Ⴇ。ßႣ;      [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹡𞤮Ⴇ.ßႣ\r
++T;    \u200C𐹡𞤌Ⴇ。ßႣ;      [B1 C1 P1 V6];  [B1 P1 V6]      #       𐹡𞤮Ⴇ.ßႣ\r
++N;    \u200C𐹡𞤌Ⴇ。ßႣ;      [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹡𞤮Ⴇ.ßႣ\r
++T;    \u200C𐹡𞤮ⴇ。ßⴃ;      [B1 C1];        [B1]    #       𐹡𞤮ⴇ.ßⴃ\r
++N;    \u200C𐹡𞤮ⴇ。ßⴃ;      [B1 C1];        [B1 C1] #       𐹡𞤮ⴇ.ßⴃ\r
++T;    \u200C𐹡𞤌Ⴇ。SSႣ;      [B1 C1 P1 V6];  [B1 P1 V6]      #       𐹡𞤮Ⴇ.ssႣ\r
++N;    \u200C𐹡𞤌Ⴇ。SSႣ;      [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹡𞤮Ⴇ.ssႣ\r
++T;    \u200C𐹡𞤮ⴇ。ssⴃ;      [B1 C1];        [B1]    #       𐹡𞤮ⴇ.ssⴃ\r
++N;    \u200C𐹡𞤮ⴇ。ssⴃ;      [B1 C1];        [B1 C1] #       𐹡𞤮ⴇ.ssⴃ\r
++T;    \u200C𐹡𞤌ⴇ。Ssⴃ;      [B1 C1];        [B1]    #       𐹡𞤮ⴇ.ssⴃ\r
++N;    \u200C𐹡𞤌ⴇ。Ssⴃ;      [B1 C1];        [B1 C1] #       𐹡𞤮ⴇ.ssⴃ\r
++B;    xn--ykj9323eegwf.xn--ss-151a;   [B1];   [B1]\r
++B;    xn--0ug332c3q0pr56g.xn--ss-151a;        [B1 C1];        [B1 C1] #       𐹡𞤮ⴇ.ssⴃ\r
++B;    xn--fnd1201kegrf.xn--ss-fek;    [B1 V6];        [B1 V6]\r
++B;    xn--fnd599eyj4pr50g.xn--ss-fek; [B1 C1 V6];     [B1 C1 V6]      #       𐹡𞤮Ⴇ.ssႣ\r
++B;    xn--0ug332c3q0pr56g.xn--zca417t;        [B1 C1];        [B1 C1] #       𐹡𞤮ⴇ.ßⴃ\r
++B;    xn--fnd599eyj4pr50g.xn--zca681f;        [B1 C1 V6];     [B1 C1 V6]      #       𐹡𞤮Ⴇ.ßႣ\r
++T;    \u200C𐹡𞤮ⴇ。ßⴃ;      [B1 C1];        [B1]    #       𐹡𞤮ⴇ.ßⴃ\r
++N;    \u200C𐹡𞤮ⴇ。ßⴃ;      [B1 C1];        [B1 C1] #       𐹡𞤮ⴇ.ßⴃ\r
++T;    \u200C𐹡𞤌Ⴇ。SSႣ;      [B1 C1 P1 V6];  [B1 P1 V6]      #       𐹡𞤮Ⴇ.ssႣ\r
++N;    \u200C𐹡𞤌Ⴇ。SSႣ;      [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹡𞤮Ⴇ.ssႣ\r
++T;    \u200C𐹡𞤮ⴇ。ssⴃ;      [B1 C1];        [B1]    #       𐹡𞤮ⴇ.ssⴃ\r
++N;    \u200C𐹡𞤮ⴇ。ssⴃ;      [B1 C1];        [B1 C1] #       𐹡𞤮ⴇ.ssⴃ\r
++T;    \u200C𐹡𞤌ⴇ。Ssⴃ;      [B1 C1];        [B1]    #       𐹡𞤮ⴇ.ssⴃ\r
++N;    \u200C𐹡𞤌ⴇ。Ssⴃ;      [B1 C1];        [B1 C1] #       𐹡𞤮ⴇ.ssⴃ\r
++T;    \u200C𐹡𞤌ⴇ。ßⴃ;      [B1 C1];        [B1]    #       𐹡𞤮ⴇ.ßⴃ\r
++N;    \u200C𐹡𞤌ⴇ。ßⴃ;      [B1 C1];        [B1 C1] #       𐹡𞤮ⴇ.ßⴃ\r
++T;    \u200C𐹡𞤌ⴇ。ssⴃ;      [B1 C1];        [B1]    #       𐹡𞤮ⴇ.ssⴃ\r
++N;    \u200C𐹡𞤌ⴇ。ssⴃ;      [B1 C1];        [B1 C1] #       𐹡𞤮ⴇ.ssⴃ\r
++T;    \u200C𐹡𞤌Ⴇ。Ssⴃ;      [B1 C1 P1 V6];  [B1 P1 V6]      #       𐹡𞤮Ⴇ.ssⴃ\r
++N;    \u200C𐹡𞤌Ⴇ。Ssⴃ;      [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹡𞤮Ⴇ.ssⴃ\r
++B;    xn--fnd1201kegrf.xn--ss-151a;   [B1 V6];        [B1 V6]\r
++B;    xn--fnd599eyj4pr50g.xn--ss-151a;        [B1 C1 V6];     [B1 C1 V6]      #       𐹡𞤮Ⴇ.ssⴃ\r
++T;    \u200C𐹡𞤌ⴇ。ßⴃ;      [B1 C1];        [B1]    #       𐹡𞤮ⴇ.ßⴃ\r
++N;    \u200C𐹡𞤌ⴇ。ßⴃ;      [B1 C1];        [B1 C1] #       𐹡𞤮ⴇ.ßⴃ\r
++T;    \u200C𐹡𞤌ⴇ。ssⴃ;      [B1 C1];        [B1]    #       𐹡𞤮ⴇ.ssⴃ\r
++N;    \u200C𐹡𞤌ⴇ。ssⴃ;      [B1 C1];        [B1 C1] #       𐹡𞤮ⴇ.ssⴃ\r
++T;    \u200C𐹡𞤌Ⴇ。Ssⴃ;      [B1 C1 P1 V6];  [B1 P1 V6]      #       𐹡𞤮Ⴇ.ssⴃ\r
++N;    \u200C𐹡𞤌Ⴇ。Ssⴃ;      [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹡𞤮Ⴇ.ssⴃ\r
++B;    \u17FF。𞬳;  [P1 V6];        [P1 V6] #       .\r
++B;    \u17FF。𞬳;  [P1 V6];        [P1 V6] #       .\r
++B;    xn--45e.xn--et6h;       [V6];   [V6]    #       .\r
++T;    \u0652\u200D。\u0CCD𑚳;      [C2 V5];        [V5]    #       ْ.್𑚳\r
++N;    \u0652\u200D。\u0CCD𑚳;      [C2 V5];        [C2 V5] #       ْ.್𑚳\r
++T;    \u0652\u200D。\u0CCD𑚳;      [C2 V5];        [V5]    #       ْ.್𑚳\r
++N;    \u0652\u200D。\u0CCD𑚳;      [C2 V5];        [C2 V5] #       ْ.್𑚳\r
++B;    xn--uhb.xn--8tc4527k;   [V5];   [V5]    #       ْ.್𑚳\r
++B;    xn--uhb882k.xn--8tc4527k;       [C2 V5];        [C2 V5] #       ْ.್𑚳\r
++B;    -≠ᠻ.\u076D𞥃≮󟷺;    [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       -≠ᠻ.ݭ𞥃≮\r
++B;    -=\u0338ᠻ.\u076D𞥃<\u0338󟷺;    [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       -≠ᠻ.ݭ𞥃≮\r
++B;    -≠ᠻ.\u076D𞥃≮󟷺;      [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       -≠ᠻ.ݭ𞥃≮\r
++B;    -=\u0338ᠻ.\u076D𞥃<\u0338󟷺;      [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       -≠ᠻ.ݭ𞥃≮\r
++B;    -=\u0338ᠻ.\u076D𞤡<\u0338󟷺;      [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       -≠ᠻ.ݭ𞥃≮\r
++B;    -≠ᠻ.\u076D𞤡≮󟷺;      [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       -≠ᠻ.ݭ𞥃≮\r
++B;    xn----g6j886c.xn--xpb049kk353abj99f;    [B1 B2 B3 V3 V6];       [B1 B2 B3 V3 V6]        #       -≠ᠻ.ݭ𞥃≮\r
++B;    -=\u0338ᠻ.\u076D𞤡<\u0338󟷺;    [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       -≠ᠻ.ݭ𞥃≮\r
++B;    -≠ᠻ.\u076D𞤡≮󟷺;    [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       -≠ᠻ.ݭ𞥃≮\r
++B;    󠰆≯\u07B5𐻪.򊥕≮𑁆\u084C;  [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       ≯.≮𑁆ࡌ\r
++B;    󠰆>\u0338\u07B5𐻪.򊥕<\u0338𑁆\u084C;  [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       ≯.≮𑁆ࡌ\r
++B;    󠰆≯\u07B5𐻪.򊥕≮𑁆\u084C;    [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       ≯.≮𑁆ࡌ\r
++B;    󠰆>\u0338\u07B5𐻪.򊥕<\u0338𑁆\u084C;    [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       ≯.≮𑁆ࡌ\r
++B;    xn--zrb797kdm1oes34i.xn--bwb394k8k2o25n6d;      [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       ≯.≮𑁆ࡌ\r
++B;    ≠󦋂.\u0600\u0BCD-\u06B9;    [B1 P1 V6];     [B1 P1 V6]      #       ≠.்-ڹ\r
++B;    =\u0338󦋂.\u0600\u0BCD-\u06B9;        [B1 P1 V6];     [B1 P1 V6]      #       ≠.்-ڹ\r
++B;    xn--1ch22084l.xn----qkc07co6n;  [B1 V6];        [B1 V6] #       ≠.்-ڹ\r
++B;    \u17DD󠁣≠。𐹼𐋤;       [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ៝≠.𐹼𐋤\r
++B;    \u17DD󠁣=\u0338。𐹼𐋤;   [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ៝≠.𐹼𐋤\r
++B;    \u17DD󠁣≠。𐹼𐋤;       [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ៝≠.𐹼𐋤\r
++B;    \u17DD󠁣=\u0338。𐹼𐋤;   [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ៝≠.𐹼𐋤\r
++B;    xn--54e694cn389z.xn--787ct8r;   [B1 V5 V6];     [B1 V5 V6]      #       ៝≠.𐹼𐋤\r
++T;    ß𰀻񆬗。𝩨🕮ß;        [P1 V5 V6];     [P1 V5 V6]\r
++N;    ß𰀻񆬗。𝩨🕮ß;        [P1 V5 V6];     [P1 V5 V6]\r
++T;    ß𰀻񆬗。𝩨🕮ß;        [P1 V5 V6];     [P1 V5 V6]\r
++N;    ß𰀻񆬗。𝩨🕮ß;        [P1 V5 V6];     [P1 V5 V6]\r
++B;    SS𰀻񆬗。𝩨🕮SS;        [P1 V5 V6];     [P1 V5 V6]\r
++B;    ss𰀻񆬗。𝩨🕮ss;        [P1 V5 V6];     [P1 V5 V6]\r
++B;    Ss𰀻񆬗。𝩨🕮Ss;        [P1 V5 V6];     [P1 V5 V6]\r
++B;    xn--ss-jl59biy67d.xn--ss-4d11aw87d;     [V5 V6];        [V5 V6]\r
++B;    xn--zca20040bgrkh.xn--zca3653v86qa;     [V5 V6];        [V5 V6]\r
++B;    SS𰀻񆬗。𝩨🕮SS;        [P1 V5 V6];     [P1 V5 V6]\r
++B;    ss𰀻񆬗。𝩨🕮ss;        [P1 V5 V6];     [P1 V5 V6]\r
++B;    Ss𰀻񆬗。𝩨🕮Ss;        [P1 V5 V6];     [P1 V5 V6]\r
++T;    \u200D。\u200C;        [C1 C2];        [A4_2]  #       .\r
++N;    \u200D。\u200C;        [C1 C2];        [C1 C2] #       .\r
++B;    xn--1ug.xn--0ug;        [C1 C2];        [C1 C2] #       .\r
++T;    \u0483𐭞\u200D.\u17B9𞯌򟩚;        [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       ҃𐭞.ឹ\r
++N;    \u0483𐭞\u200D.\u17B9𞯌򟩚;        [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       ҃𐭞.ឹ\r
++B;    xn--m3a6965k.xn--43e8670vmd79b; [B1 V5 V6];     [B1 V5 V6]      #       ҃𐭞.ឹ\r
++B;    xn--m3a412lrr0o.xn--43e8670vmd79b;      [B1 C2 V5 V6];  [B1 C2 V5 V6]   #       ҃𐭞.ឹ\r
++T;    \u200C𐠨\u200C临。ꡢ򄷞ⶏ𐹣;   [B1 B5 B6 C1 P1 V6];    [B2 B3 B5 B6 P1 V6]     #       𐠨临.ꡢⶏ𐹣\r
++N;    \u200C𐠨\u200C临。ꡢ򄷞ⶏ𐹣;   [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       𐠨临.ꡢⶏ𐹣\r
++B;    xn--miq9646b.xn--uojv340bk71c99u9f;     [B2 B3 B5 B6 V6];       [B2 B3 B5 B6 V6]\r
++B;    xn--0uga2656aop9k.xn--uojv340bk71c99u9f;        [B1 B5 B6 C1 V6];       [B1 B5 B6 C1 V6]        #       𐠨临.ꡢⶏ𐹣\r
++B;    󠑘.󠄮;    [P1 V6];        [P1 V6]\r
++B;    󠑘.󠄮;      [P1 V6];        [P1 V6]\r
++B;    xn--s136e.;     [V6];   [V6]\r
++B;    𐫄\u0D4D.\uAAF6;    [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       𐫄്.꫶\r
++B;    𐫄\u0D4D.\uAAF6;      [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       𐫄്.꫶\r
++B;    xn--wxc7880k.xn--2v9a;  [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       𐫄്.꫶\r
++B;    \uA9B7󝵙멹。⒛󠨇;        [P1 V5 V6];     [P1 V5 V6]      #       ꦷ멹.⒛\r
++B;    \uA9B7󝵙멹。⒛󠨇;  [P1 V5 V6];     [P1 V5 V6]      #       ꦷ멹.⒛\r
++B;    \uA9B7󝵙멹。20.󠨇;        [P1 V5 V6];     [P1 V5 V6]      #       ꦷ멹.20.\r
++B;    \uA9B7󝵙멹。20.󠨇;  [P1 V5 V6];     [P1 V5 V6]      #       ꦷ멹.20.\r
++B;    xn--ym9av13acp85w.20.xn--d846e; [V5 V6];        [V5 V6] #       ꦷ멹.20.\r
++B;    xn--ym9av13acp85w.xn--dth22121k;        [V5 V6];        [V5 V6] #       ꦷ멹.⒛\r
++B;    Ⴅ󲬹릖󠶚.\u0777𐹳⒊;   [B4 B6 P1 V6];  [B4 B6 P1 V6]   #       Ⴅ릖.ݷ𐹳⒊\r
++B;    Ⴅ󲬹릖󠶚.\u0777𐹳⒊;     [B4 B6 P1 V6];  [B4 B6 P1 V6]   #       Ⴅ릖.ݷ𐹳⒊\r
++B;    Ⴅ󲬹릖󠶚.\u0777𐹳3.;    [B4 B6 P1 V6];  [B4 B6 P1 V6]   #       Ⴅ릖.ݷ𐹳3.\r
++B;    Ⴅ󲬹릖󠶚.\u0777𐹳3.;      [B4 B6 P1 V6];  [B4 B6 P1 V6]   #       Ⴅ릖.ݷ𐹳3.\r
++B;    ⴅ󲬹릖󠶚.\u0777𐹳3.;      [B4 B6 P1 V6];  [B4 B6 P1 V6]   #       ⴅ릖.ݷ𐹳3.\r
++B;    ⴅ󲬹릖󠶚.\u0777𐹳3.;    [B4 B6 P1 V6];  [B4 B6 P1 V6]   #       ⴅ릖.ݷ𐹳3.\r
++B;    xn--wkj8016bne45io02g.xn--3-55c6803r.;  [B4 B6 V6];     [B4 B6 V6]      #       ⴅ릖.ݷ𐹳3.\r
++B;    xn--dnd2167fnet0io02g.xn--3-55c6803r.;  [B4 B6 V6];     [B4 B6 V6]      #       Ⴅ릖.ݷ𐹳3.\r
++B;    ⴅ󲬹릖󠶚.\u0777𐹳⒊;     [B4 B6 P1 V6];  [B4 B6 P1 V6]   #       ⴅ릖.ݷ𐹳⒊\r
++B;    ⴅ󲬹릖󠶚.\u0777𐹳⒊;   [B4 B6 P1 V6];  [B4 B6 P1 V6]   #       ⴅ릖.ݷ𐹳⒊\r
++B;    xn--wkj8016bne45io02g.xn--7pb000mwm4n;  [B4 B6 V6];     [B4 B6 V6]      #       ⴅ릖.ݷ𐹳⒊\r
++B;    xn--dnd2167fnet0io02g.xn--7pb000mwm4n;  [B4 B6 V6];     [B4 B6 V6]      #       Ⴅ릖.ݷ𐹳⒊\r
++T;    \u200C。︒;   [C1 P1 V6];     [P1 V6 A4_2]    #       .︒\r
++N;    \u200C。︒;   [C1 P1 V6];     [C1 P1 V6]      #       .︒\r
++T;    \u200C。。;   [C1 A4_2];      [A4_2]  #       ..\r
++N;    \u200C。。;   [C1 A4_2];      [C1 A4_2]       #       ..\r
++B;    ..;     [A4_2]; [A4_2]\r
++B;    xn--0ug..;      [C1 A4_2];      [C1 A4_2]       #       ..\r
++B;    .xn--y86c;      [V6 A4_2];      [V6 A4_2]\r
++B;    xn--0ug.xn--y86c;       [C1 V6];        [C1 V6] #       .︒\r
++B;    ≯\u076D.₄;        [B1 P1 V6];     [B1 P1 V6]      #       ≯ݭ.4\r
++B;    >\u0338\u076D.₄;    [B1 P1 V6];     [B1 P1 V6]      #       ≯ݭ.4\r
++B;    ≯\u076D.4;    [B1 P1 V6];     [B1 P1 V6]      #       ≯ݭ.4\r
++B;    >\u0338\u076D.4;        [B1 P1 V6];     [B1 P1 V6]      #       ≯ݭ.4\r
++B;    xn--xpb149k.4;  [B1 V6];        [B1 V6] #       ≯ݭ.4\r
++T;    ᡲ-𝟹.ß-\u200C-;    [C1 V3];        [V2 V3] #       ᡲ-3.ß--\r
++N;    ᡲ-𝟹.ß-\u200C-;    [C1 V3];        [C1 V3] #       ᡲ-3.ß--\r
++T;    ᡲ-3.ß-\u200C-;       [C1 V3];        [V2 V3] #       ᡲ-3.ß--\r
++N;    ᡲ-3.ß-\u200C-;       [C1 V3];        [C1 V3] #       ᡲ-3.ß--\r
++T;    ᡲ-3.SS-\u200C-;       [C1 V3];        [V2 V3] #       ᡲ-3.ss--\r
++N;    ᡲ-3.SS-\u200C-;       [C1 V3];        [C1 V3] #       ᡲ-3.ss--\r
++T;    ᡲ-3.ss-\u200C-;       [C1 V3];        [V2 V3] #       ᡲ-3.ss--\r
++N;    ᡲ-3.ss-\u200C-;       [C1 V3];        [C1 V3] #       ᡲ-3.ss--\r
++T;    ᡲ-3.Ss-\u200C-;       [C1 V3];        [V2 V3] #       ᡲ-3.ss--\r
++N;    ᡲ-3.Ss-\u200C-;       [C1 V3];        [C1 V3] #       ᡲ-3.ss--\r
++B;    xn---3-p9o.ss--;        [V2 V3];        [V2 V3]\r
++B;    xn---3-p9o.xn--ss---276a;       [C1 V3];        [C1 V3] #       ᡲ-3.ss--\r
++B;    xn---3-p9o.xn-----fia9303a;     [C1 V3];        [C1 V3] #       ᡲ-3.ß--\r
++T;    ᡲ-𝟹.SS-\u200C-;    [C1 V3];        [V2 V3] #       ᡲ-3.ss--\r
++N;    ᡲ-𝟹.SS-\u200C-;    [C1 V3];        [C1 V3] #       ᡲ-3.ss--\r
++T;    ᡲ-𝟹.ss-\u200C-;    [C1 V3];        [V2 V3] #       ᡲ-3.ss--\r
++N;    ᡲ-𝟹.ss-\u200C-;    [C1 V3];        [C1 V3] #       ᡲ-3.ss--\r
++T;    ᡲ-𝟹.Ss-\u200C-;    [C1 V3];        [V2 V3] #       ᡲ-3.ss--\r
++N;    ᡲ-𝟹.Ss-\u200C-;    [C1 V3];        [C1 V3] #       ᡲ-3.ss--\r
++B;    \uFD08𝟦\u0647󎊯。Ӏ;      [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ضي4ه.Ӏ\r
++B;    \u0636\u064A4\u0647󎊯。Ӏ;   [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ضي4ه.Ӏ\r
++B;    \u0636\u064A4\u0647󎊯。ӏ;   [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ضي4ه.ӏ\r
++B;    xn--4-tnc6ck183523b.xn--s5a;    [B2 B3 V6];     [B2 B3 V6]      #       ضي4ه.ӏ\r
++B;    xn--4-tnc6ck183523b.xn--d5a;    [B2 B3 V6];     [B2 B3 V6]      #       ضي4ه.Ӏ\r
++B;    \uFD08𝟦\u0647󎊯。ӏ;      [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ضي4ه.ӏ\r
++B;    -.\u0602\u0622𑆾🐹; [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -.آ𑆾🐹\r
++B;    -.\u0602\u0627\u0653𑆾🐹;   [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -.آ𑆾🐹\r
++B;    -.xn--kfb8dy983hgl7g;   [B1 V3 V6];     [B1 V3 V6]      #       -.آ𑆾🐹\r
++B;    󙶜ᢘ。\u1A7F⺢;    [P1 V5 V6];     [P1 V5 V6]      #       ᢘ.᩿⺢\r
++B;    xn--ibf35138o.xn--fpfz94g;      [V5 V6];        [V5 V6] #       ᢘ.᩿⺢\r
++B;    ≠ႷᠤႫ。\uD907\u034C\u0633觴;   [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠ႷᠤႫ.͌س觴\r
++B;    =\u0338ႷᠤႫ。\uD907\u034C\u0633觴;       [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠ႷᠤႫ.͌س觴\r
++B;    ≠ႷᠤႫ。\uD907\u034C\u0633觴;   [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠ႷᠤႫ.͌س觴\r
++B;    =\u0338ႷᠤႫ。\uD907\u034C\u0633觴;       [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠ႷᠤႫ.͌س觴\r
++B;    =\u0338ⴗᠤⴋ。\uD907\u034C\u0633觴;       [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠ⴗᠤⴋ.͌س觴\r
++B;    ≠ⴗᠤⴋ。\uD907\u034C\u0633觴;   [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠ⴗᠤⴋ.͌س觴\r
++B;    ≠Ⴗᠤⴋ。\uD907\u034C\u0633觴;   [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠Ⴗᠤⴋ.͌س觴\r
++B;    =\u0338Ⴗᠤⴋ。\uD907\u034C\u0633觴;       [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠Ⴗᠤⴋ.͌س觴\r
++B;    xn--vnd619as6ig6k.\uD907\u034C\u0633觴;        [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠Ⴗᠤⴋ.͌س觴\r
++B;    XN--VND619AS6IG6K.\uD907\u034C\u0633觴;        [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠Ⴗᠤⴋ.͌س觴\r
++B;    Xn--Vnd619as6ig6k.\uD907\u034C\u0633觴;        [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠Ⴗᠤⴋ.͌س觴\r
++B;    xn--66e353ce0ilb.\uD907\u034C\u0633觴; [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠ⴗᠤⴋ.͌س觴\r
++B;    XN--66E353CE0ILB.\uD907\u034C\u0633觴; [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠ⴗᠤⴋ.͌س觴\r
++B;    Xn--66E353ce0ilb.\uD907\u034C\u0633觴; [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠ⴗᠤⴋ.͌س觴\r
++B;    xn--jndx718cnnl.\uD907\u034C\u0633觴;  [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠ႷᠤႫ.͌س觴\r
++B;    XN--JNDX718CNNL.\uD907\u034C\u0633觴;  [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠ႷᠤႫ.͌س觴\r
++B;    Xn--Jndx718cnnl.\uD907\u034C\u0633觴;  [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠ႷᠤႫ.͌س觴\r
++B;    =\u0338ⴗᠤⴋ。\uD907\u034C\u0633觴;       [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠ⴗᠤⴋ.͌س觴\r
++B;    ≠ⴗᠤⴋ。\uD907\u034C\u0633觴;   [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠ⴗᠤⴋ.͌س觴\r
++B;    ≠Ⴗᠤⴋ。\uD907\u034C\u0633觴;   [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠Ⴗᠤⴋ.͌س觴\r
++B;    =\u0338Ⴗᠤⴋ。\uD907\u034C\u0633觴;       [B1 B5 P1 V6];  [B1 B5 P1 V6 A3]        #       ≠Ⴗᠤⴋ.͌س觴\r
++B;    \u0667.𐥨;    [B1 P1 V6];     [B1 P1 V6]      #       ٧.\r
++B;    xn--gib.xn--vm9c;       [B1 V6];        [B1 V6] #       ٧.\r
++T;    \uA9C0𝟯。\u200D񼑥𐹪\u1BF3;      [B1 C2 P1 V5 V6];       [B5 P1 V5 V6]   #       ꧀3.𐹪᯳\r
++N;    \uA9C0𝟯。\u200D񼑥𐹪\u1BF3;      [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       ꧀3.𐹪᯳\r
++T;    \uA9C03。\u200D񼑥𐹪\u1BF3; [B1 C2 P1 V5 V6];       [B5 P1 V5 V6]   #       ꧀3.𐹪᯳\r
++N;    \uA9C03。\u200D񼑥𐹪\u1BF3; [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       ꧀3.𐹪᯳\r
++B;    xn--3-5z4e.xn--1zfz754hncv8b;   [B5 V5 V6];     [B5 V5 V6]      #       ꧀3.𐹪᯳\r
++B;    xn--3-5z4e.xn--1zf96ony8ygd68c; [B1 C2 V5 V6];  [B1 C2 V5 V6]   #       ꧀3.𐹪᯳\r
++B;    򣕄4񠖽.≯\u0664𑀾󠸌;    [B1 P1 V6];     [B1 P1 V6]      #       4.≯٤𑀾\r
++B;    򣕄4񠖽.>\u0338\u0664𑀾󠸌;        [B1 P1 V6];     [B1 P1 V6]      #       4.≯٤𑀾\r
++B;    xn--4-fg85dl688i.xn--dib174li86ntdy0i;  [B1 V6];        [B1 V6] #       4.≯٤𑀾\r
++B;    򗆧𝟯。⒈\u1A76𝟚򠘌;   [P1 V6];        [P1 V6] #       3.⒈᩶2\r
++B;    򗆧3。1.\u1A762򠘌;  [P1 V5 V6];     [P1 V5 V6]      #       3.1.᩶2\r
++B;    xn--3-rj42h.1.xn--2-13k96240l;  [V5 V6];        [V5 V6] #       3.1.᩶2\r
++B;    xn--3-rj42h.xn--2-13k746cq465x; [V6];   [V6]    #       3.⒈᩶2\r
++T;    \u200D₅⒈。≯𝟴\u200D;   [C2 P1 V6];     [P1 V6] #       5⒈.≯8\r
++N;    \u200D₅⒈。≯𝟴\u200D;   [C2 P1 V6];     [C2 P1 V6]      #       5⒈.≯8\r
++T;    \u200D₅⒈。>\u0338𝟴\u200D;       [C2 P1 V6];     [P1 V6] #       5⒈.≯8\r
++N;    \u200D₅⒈。>\u0338𝟴\u200D;       [C2 P1 V6];     [C2 P1 V6]      #       5⒈.≯8\r
++T;    \u200D51.。≯8\u200D; [C2 P1 V6 A4_2];        [P1 V6 A4_2]    #       51..≯8\r
++N;    \u200D51.。≯8\u200D; [C2 P1 V6 A4_2];        [C2 P1 V6 A4_2] #       51..≯8\r
++T;    \u200D51.。>\u03388\u200D;     [C2 P1 V6 A4_2];        [P1 V6 A4_2]    #       51..≯8\r
++N;    \u200D51.。>\u03388\u200D;     [C2 P1 V6 A4_2];        [C2 P1 V6 A4_2] #       51..≯8\r
++B;    51..xn--8-ogo;  [V6 A4_2];      [V6 A4_2]\r
++B;    xn--51-l1t..xn--8-ugn00i;       [C2 V6 A4_2];   [C2 V6 A4_2]    #       51..≯8\r
++B;    xn--5-ecp.xn--8-ogo;    [V6];   [V6]\r
++B;    xn--5-tgnz5r.xn--8-ugn00i;      [C2 V6];        [C2 V6] #       5⒈.≯8\r
++T;    ꡰ\u0697\u1086.򪘙\u072F≠\u200C;  [B5 B6 C1 P1 V6];       [B5 B6 P1 V6]   #       ꡰڗႆ.ܯ≠\r
++N;    ꡰ\u0697\u1086.򪘙\u072F≠\u200C;  [B5 B6 C1 P1 V6];       [B5 B6 C1 P1 V6]        #       ꡰڗႆ.ܯ≠\r
++T;    ꡰ\u0697\u1086.򪘙\u072F=\u0338\u200C;      [B5 B6 C1 P1 V6];       [B5 B6 P1 V6]   #       ꡰڗႆ.ܯ≠\r
++N;    ꡰ\u0697\u1086.򪘙\u072F=\u0338\u200C;      [B5 B6 C1 P1 V6];       [B5 B6 C1 P1 V6]        #       ꡰڗႆ.ܯ≠\r
++T;    ꡰ\u0697\u1086.򪘙\u072F≠\u200C;    [B5 B6 C1 P1 V6];       [B5 B6 P1 V6]   #       ꡰڗႆ.ܯ≠\r
++N;    ꡰ\u0697\u1086.򪘙\u072F≠\u200C;    [B5 B6 C1 P1 V6];       [B5 B6 C1 P1 V6]        #       ꡰڗႆ.ܯ≠\r
++T;    ꡰ\u0697\u1086.򪘙\u072F=\u0338\u200C;        [B5 B6 C1 P1 V6];       [B5 B6 P1 V6]   #       ꡰڗႆ.ܯ≠\r
++N;    ꡰ\u0697\u1086.򪘙\u072F=\u0338\u200C;        [B5 B6 C1 P1 V6];       [B5 B6 C1 P1 V6]        #       ꡰڗႆ.ܯ≠\r
++B;    xn--tjb002cn51k.xn--5nb630lbj91q;       [B5 B6 V6];     [B5 B6 V6]      #       ꡰڗႆ.ܯ≠\r
++B;    xn--tjb002cn51k.xn--5nb448jcubcz547b;   [B5 B6 C1 V6];  [B5 B6 C1 V6]   #       ꡰڗႆ.ܯ≠\r
++B;    𑄱。򪌿𐹵;        [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]\r
++B;    𑄱。򪌿𐹵;        [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]\r
++B;    xn--t80d.xn--to0d14792b;        [B1 B3 B5 B6 V5 V6];    [B1 B3 B5 B6 V5 V6]\r
++B;    𝟥\u0600。\u073D;    [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       3.ܽ\r
++B;    3\u0600。\u073D;       [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       3.ܽ\r
++B;    xn--3-rkc.xn--kob;      [B1 B3 B6 V5 V6];       [B1 B3 B6 V5 V6]        #       3.ܽ\r
++B;    \u0637𐹣\u0666.\u076D긷;     [B2 B3];        [B2 B3] #       ط𐹣٦.ݭ긷\r
++B;    \u0637𐹣\u0666.\u076D긷;       [B2 B3];        [B2 B3] #       ط𐹣٦.ݭ긷\r
++B;    xn--2gb8gu829f.xn--xpb0156f;    [B2 B3];        [B2 B3] #       ط𐹣٦.ݭ긷\r
++B;    ︒Ↄ\u2DE7򾀃.Ⴗ𐣞;     [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       ︒Ↄⷧ.Ⴗ\r
++B;    。Ↄ\u2DE7򾀃.Ⴗ𐣞;       [B5 B6 P1 V6 A4_2];     [B5 B6 P1 V6 A4_2]      #       .Ↄⷧ.Ⴗ\r
++B;    。ↄ\u2DE7򾀃.ⴗ𐣞;       [B5 B6 P1 V6 A4_2];     [B5 B6 P1 V6 A4_2]      #       .ↄⷧ.ⴗ\r
++B;    .xn--r5gy00cll06u.xn--flj4541e; [B5 B6 V6 A4_2];        [B5 B6 V6 A4_2] #       .ↄⷧ.ⴗ\r
++B;    .xn--q5g000cll06u.xn--vnd8618j; [B5 B6 V6 A4_2];        [B5 B6 V6 A4_2] #       .Ↄⷧ.Ⴗ\r
++B;    ︒ↄ\u2DE7򾀃.ⴗ𐣞;     [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       ︒ↄⷧ.ⴗ\r
++B;    xn--r5gy00c056n0226g.xn--flj4541e;      [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       ︒ↄⷧ.ⴗ\r
++B;    xn--q5g000c056n0226g.xn--vnd8618j;      [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       ︒Ↄⷧ.Ⴗ\r
++B;    \u0600.\u05B1;  [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       .ֱ\r
++B;    xn--ifb.xn--8cb;        [B1 B3 B6 V5 V6];       [B1 B3 B6 V5 V6]        #       .ֱ\r
++T;    ς≯。𐹽;   [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++N;    ς≯。𐹽;   [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++T;    ς>\u0338。𐹽;       [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++N;    ς>\u0338。𐹽;       [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++T;    ς≯。𐹽;   [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++N;    ς≯。𐹽;   [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++T;    ς>\u0338。𐹽;       [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++N;    ς>\u0338。𐹽;       [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++B;    Σ>\u0338。𐹽;       [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++B;    Σ≯。𐹽;   [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++B;    σ≯。𐹽;   [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++B;    σ>\u0338。𐹽;       [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++B;    xn--4xa818m.xn--1o0d;   [B1 B6 V6];     [B1 B6 V6]\r
++B;    xn--3xa028m.xn--1o0d;   [B1 B6 V6];     [B1 B6 V6]\r
++B;    Σ>\u0338。𐹽;       [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++B;    Σ≯。𐹽;   [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++B;    σ≯。𐹽;   [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++B;    σ>\u0338。𐹽;       [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++T;    \u17D2\u200D\u075F。𐹶;      [B1 V5];        [B1 V5] #       ្ݟ.𐹶\r
++N;    \u17D2\u200D\u075F。𐹶;      [B1 V5];        [B1 V5] #       ្ݟ.𐹶\r
++B;    xn--jpb535f.xn--uo0d;   [B1 V5];        [B1 V5] #       ្ݟ.𐹶\r
++B;    xn--jpb535fv9f.xn--uo0d;        [B1 V5];        [B1 V5] #       ្ݟ.𐹶\r
++B;    𾷂\u0A42Ⴊ񂂟.≮;  [P1 V6];        [P1 V6] #       ੂႪ.≮\r
++B;    𾷂\u0A42Ⴊ񂂟.<\u0338;      [P1 V6];        [P1 V6] #       ੂႪ.≮\r
++B;    𾷂\u0A42ⴊ񂂟.<\u0338;      [P1 V6];        [P1 V6] #       ੂⴊ.≮\r
++B;    𾷂\u0A42ⴊ񂂟.≮;  [P1 V6];        [P1 V6] #       ੂⴊ.≮\r
++B;    xn--nbc229o4y27dgskb.xn--gdh;   [V6];   [V6]    #       ੂⴊ.≮\r
++B;    xn--nbc493aro75ggskb.xn--gdh;   [V6];   [V6]    #       ੂႪ.≮\r
++B;    ꡠ.۲;       ꡠ.۲; xn--5c9a.xn--fmb\r
++B;    ꡠ.۲; ;       xn--5c9a.xn--fmb\r
++B;    xn--5c9a.xn--fmb;       ꡠ.۲; xn--5c9a.xn--fmb\r
++B;    𐹣񄷄。ꡬ🄄;     [B1 P1 V6];     [B1 P1 V6]\r
++B;    𐹣񄷄。ꡬ3,;       [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++B;    xn--bo0d0203l.xn--3,-yj9h;      [B1 B6 P1 V6];  [B1 B6 P1 V6]\r
++B;    xn--bo0d0203l.xn--id9a4443d;    [B1 V6];        [B1 V6]\r
++T;    -\u0C4D𞾀𑲓。\u200D\u0D4D; [B1 C2 P1 V3 V6];       [B1 B3 B6 P1 V3 V5 V6]  #       -్𑲓.്\r
++N;    -\u0C4D𞾀𑲓。\u200D\u0D4D; [B1 C2 P1 V3 V6];       [B1 C2 P1 V3 V6]        #       -్𑲓.്\r
++T;    -\u0C4D𞾀𑲓。\u200D\u0D4D; [B1 C2 P1 V3 V6];       [B1 B3 B6 P1 V3 V5 V6]  #       -్𑲓.്\r
++N;    -\u0C4D𞾀𑲓。\u200D\u0D4D; [B1 C2 P1 V3 V6];       [B1 C2 P1 V3 V6]        #       -్𑲓.്\r
++B;    xn----x6e0220sclug.xn--wxc;     [B1 B3 B6 V3 V5 V6];    [B1 B3 B6 V3 V5 V6]     #       -్𑲓.്\r
++B;    xn----x6e0220sclug.xn--wxc317g; [B1 C2 V3 V6];  [B1 C2 V3 V6]   #       -్𑲓.്\r
++T;    \uA67D\u200C霣🄆。\u200C𑁂\u1B01;        [C1 P1 V5 V6];  [P1 V5 V6]      #       ꙽霣🄆.𑁂ᬁ\r
++N;    \uA67D\u200C霣🄆。\u200C𑁂\u1B01;        [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ꙽霣🄆.𑁂ᬁ\r
++T;    \uA67D\u200C霣🄆。\u200C𑁂\u1B01; [C1 P1 V5 V6];  [P1 V5 V6]      #       ꙽霣🄆.𑁂ᬁ\r
++N;    \uA67D\u200C霣🄆。\u200C𑁂\u1B01; [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ꙽霣🄆.𑁂ᬁ\r
++T;    \uA67D\u200C霣5,。\u200C𑁂\u1B01;   [C1 P1 V5 V6];  [P1 V5 V6]      #       ꙽霣5,.𑁂ᬁ\r
++N;    \uA67D\u200C霣5,。\u200C𑁂\u1B01;   [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ꙽霣5,.𑁂ᬁ\r
++B;    xn--5,-op8g373c.xn--4sf0725i;   [P1 V5 V6];     [P1 V5 V6]      #       ꙽霣5,.𑁂ᬁ\r
++B;    xn--5,-i1tz135dnbqa.xn--4sf36u6u4w;     [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ꙽霣5,.𑁂ᬁ\r
++B;    xn--2q5a751a653w.xn--4sf0725i;  [V5 V6];        [V5 V6] #       ꙽霣🄆.𑁂ᬁ\r
++B;    xn--0ug4208b2vjuk63a.xn--4sf36u6u4w;    [C1 V5 V6];     [C1 V5 V6]      #       ꙽霣🄆.𑁂ᬁ\r
++B;    兎。ᠼ󠴜𑚶𑰿;  [P1 V6];        [P1 V6]\r
++B;    兎。ᠼ󠴜𑚶𑰿;  [P1 V6];        [P1 V6]\r
++B;    xn--b5q.xn--v7e6041kqqd4m251b;  [V6];   [V6]\r
++T;    𝟙。\u200D𝟸\u200D⁷;     [C2];   1.27    #       1.27\r
++N;    𝟙。\u200D𝟸\u200D⁷;     [C2];   [C2]    #       1.27\r
++T;    1。\u200D2\u200D7;     [C2];   1.27    #       1.27\r
++N;    1。\u200D2\u200D7;     [C2];   [C2]    #       1.27\r
++B;    1.27;   ;       \r
++B;    1.xn--27-l1tb;  [C2];   [C2]    #       1.27\r
++B;    ᡨ-。󠻋𝟷;        [P1 V3 V6];     [P1 V3 V6]\r
++B;    ᡨ-。󠻋1;   [P1 V3 V6];     [P1 V3 V6]\r
++B;    xn----z8j.xn--1-5671m;  [V3 V6];        [V3 V6]\r
++B;    𑰻񵀐𐫚.\u0668⁹;       [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𑰻𐫚.٨9\r
++B;    𑰻񵀐𐫚.\u06689;   [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𑰻𐫚.٨9\r
++B;    xn--gx9cr01aul57i.xn--9-oqc;    [B1 V5 V6];     [B1 V5 V6]      #       𑰻𐫚.٨9\r
++T;    Ⴜ򈷭\u0F80⾇。Ⴏ♀\u200C\u200C;  [C1 P1 V6];     [P1 V6] #       Ⴜྀ舛.Ⴏ♀\r
++N;    Ⴜ򈷭\u0F80⾇。Ⴏ♀\u200C\u200C;  [C1 P1 V6];     [C1 P1 V6]      #       Ⴜྀ舛.Ⴏ♀\r
++T;    Ⴜ򈷭\u0F80舛。Ⴏ♀\u200C\u200C;  [C1 P1 V6];     [P1 V6] #       Ⴜྀ舛.Ⴏ♀\r
++N;    Ⴜ򈷭\u0F80舛。Ⴏ♀\u200C\u200C;  [C1 P1 V6];     [C1 P1 V6]      #       Ⴜྀ舛.Ⴏ♀\r
++T;    ⴜ򈷭\u0F80舛。ⴏ♀\u200C\u200C;  [C1 P1 V6];     [P1 V6] #       ⴜྀ舛.ⴏ♀\r
++N;    ⴜ򈷭\u0F80舛。ⴏ♀\u200C\u200C;  [C1 P1 V6];     [C1 P1 V6]      #       ⴜྀ舛.ⴏ♀\r
++B;    xn--zed372mdj2do3v4h.xn--e5h11w;        [V6];   [V6]    #       ⴜྀ舛.ⴏ♀\r
++B;    xn--zed372mdj2do3v4h.xn--0uga678bgyh;   [C1 V6];        [C1 V6] #       ⴜྀ舛.ⴏ♀\r
++B;    xn--zed54dz10wo343g.xn--nnd651i;        [V6];   [V6]    #       Ⴜྀ舛.Ⴏ♀\r
++B;    xn--zed54dz10wo343g.xn--nnd089ea464d;   [C1 V6];        [C1 V6] #       Ⴜྀ舛.Ⴏ♀\r
++T;    ⴜ򈷭\u0F80⾇。ⴏ♀\u200C\u200C;  [C1 P1 V6];     [P1 V6] #       ⴜྀ舛.ⴏ♀\r
++N;    ⴜ򈷭\u0F80⾇。ⴏ♀\u200C\u200C;  [C1 P1 V6];     [C1 P1 V6]      #       ⴜྀ舛.ⴏ♀\r
++T;    𑁆𝟰.\u200D;        [C2 V5];        [V5]    #       𑁆4.\r
++N;    𑁆𝟰.\u200D;        [C2 V5];        [C2 V5] #       𑁆4.\r
++T;    𑁆4.\u200D;   [C2 V5];        [V5]    #       𑁆4.\r
++N;    𑁆4.\u200D;   [C2 V5];        [C2 V5] #       𑁆4.\r
++B;    xn--4-xu7i.;    [V5];   [V5]\r
++B;    xn--4-xu7i.xn--1ug;     [C2 V5];        [C2 V5] #       𑁆4.\r
++T;    񮴘Ⴞ癀。𑘿\u200D\u200C붼;       [C1 P1 V5 V6];  [P1 V5 V6]      #       Ⴞ癀.𑘿붼\r
++N;    񮴘Ⴞ癀。𑘿\u200D\u200C붼;       [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       Ⴞ癀.𑘿붼\r
++T;    񮴘Ⴞ癀。𑘿\u200D\u200C붼; [C1 P1 V5 V6];  [P1 V5 V6]      #       Ⴞ癀.𑘿붼\r
++N;    񮴘Ⴞ癀。𑘿\u200D\u200C붼; [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       Ⴞ癀.𑘿붼\r
++T;    񮴘Ⴞ癀。𑘿\u200D\u200C붼;       [C1 P1 V5 V6];  [P1 V5 V6]      #       Ⴞ癀.𑘿붼\r
++N;    񮴘Ⴞ癀。𑘿\u200D\u200C붼;       [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       Ⴞ癀.𑘿붼\r
++T;    񮴘Ⴞ癀。𑘿\u200D\u200C붼; [C1 P1 V5 V6];  [P1 V5 V6]      #       Ⴞ癀.𑘿붼\r
++N;    񮴘Ⴞ癀。𑘿\u200D\u200C붼; [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       Ⴞ癀.𑘿붼\r
++T;    񮴘ⴞ癀。𑘿\u200D\u200C붼; [C1 P1 V5 V6];  [P1 V5 V6]      #       ⴞ癀.𑘿붼\r
++N;    񮴘ⴞ癀。𑘿\u200D\u200C붼; [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ⴞ癀.𑘿붼\r
++T;    񮴘ⴞ癀。𑘿\u200D\u200C붼;       [C1 P1 V5 V6];  [P1 V5 V6]      #       ⴞ癀.𑘿붼\r
++N;    񮴘ⴞ癀。𑘿\u200D\u200C붼;       [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ⴞ癀.𑘿붼\r
++B;    xn--mlju35u7qx2f.xn--et3bn23n;  [V5 V6];        [V5 V6]\r
++B;    xn--mlju35u7qx2f.xn--0ugb6122js83c;     [C1 V5 V6];     [C1 V5 V6]      #       ⴞ癀.𑘿붼\r
++B;    xn--2nd6803c7q37d.xn--et3bn23n; [V5 V6];        [V5 V6]\r
++B;    xn--2nd6803c7q37d.xn--0ugb6122js83c;    [C1 V5 V6];     [C1 V5 V6]      #       Ⴞ癀.𑘿붼\r
++T;    񮴘ⴞ癀。𑘿\u200D\u200C붼; [C1 P1 V5 V6];  [P1 V5 V6]      #       ⴞ癀.𑘿붼\r
++N;    񮴘ⴞ癀。𑘿\u200D\u200C붼; [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ⴞ癀.𑘿붼\r
++T;    񮴘ⴞ癀。𑘿\u200D\u200C붼;       [C1 P1 V5 V6];  [P1 V5 V6]      #       ⴞ癀.𑘿붼\r
++N;    񮴘ⴞ癀。𑘿\u200D\u200C붼;       [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ⴞ癀.𑘿붼\r
++B;    󚀅-\u0BCD。\u06B9;   [B6 P1 V6];     [B6 P1 V6]      #       -்.ڹ\r
++B;    xn----mze84808x.xn--skb;        [B6 V6];        [B6 V6] #       -்.ڹ\r
++B;    ᡃ𝟧≯ᠣ.氁񨏱ꁫ;     [P1 V6];        [P1 V6]\r
++B;    ᡃ𝟧>\u0338ᠣ.氁񨏱ꁫ; [P1 V6];        [P1 V6]\r
++B;    ᡃ5≯ᠣ.氁񨏱ꁫ;  [P1 V6];        [P1 V6]\r
++B;    ᡃ5>\u0338ᠣ.氁񨏱ꁫ;      [P1 V6];        [P1 V6]\r
++B;    xn--5-24jyf768b.xn--lqw213ime95g;       [V6];   [V6]\r
++B;    𐹬𝩇.\u0F76;      [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       𐹬𝩇.ྲྀ\r
++B;    𐹬𝩇.\u0FB2\u0F80;        [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       𐹬𝩇.ྲྀ\r
++B;    𐹬𝩇.\u0FB2\u0F80;  [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       𐹬𝩇.ྲྀ\r
++B;    xn--ko0d8295a.xn--zed3h;        [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       𐹬𝩇.ྲྀ\r
++B;    -𑈶⒏.⒎𰛢󠎭; [P1 V3 V6];     [P1 V3 V6]\r
++B;    -𑈶8..7.𰛢󠎭;     [P1 V3 V6 A4_2];        [P1 V3 V6 A4_2]\r
++B;    xn---8-bv5o..7.xn--c35nf1622b;  [V3 V6 A4_2];   [V3 V6 A4_2]\r
++B;    xn----scp6252h.xn--zshy411yzpx2d;       [V3 V6];        [V3 V6]\r
++T;    \u200CႡ畝\u200D.≮;       [C1 C2 P1 V6];  [P1 V6] #       Ⴁ畝.≮\r
++N;    \u200CႡ畝\u200D.≮;       [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       Ⴁ畝.≮\r
++T;    \u200CႡ畝\u200D.<\u0338;   [C1 C2 P1 V6];  [P1 V6] #       Ⴁ畝.≮\r
++N;    \u200CႡ畝\u200D.<\u0338;   [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       Ⴁ畝.≮\r
++T;    \u200CႡ畝\u200D.≮; [C1 C2 P1 V6];  [P1 V6] #       Ⴁ畝.≮\r
++N;    \u200CႡ畝\u200D.≮; [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       Ⴁ畝.≮\r
++T;    \u200CႡ畝\u200D.<\u0338;     [C1 C2 P1 V6];  [P1 V6] #       Ⴁ畝.≮\r
++N;    \u200CႡ畝\u200D.<\u0338;     [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       Ⴁ畝.≮\r
++T;    \u200Cⴁ畝\u200D.<\u0338;     [C1 C2 P1 V6];  [P1 V6] #       ⴁ畝.≮\r
++N;    \u200Cⴁ畝\u200D.<\u0338;     [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       ⴁ畝.≮\r
++T;    \u200Cⴁ畝\u200D.≮; [C1 C2 P1 V6];  [P1 V6] #       ⴁ畝.≮\r
++N;    \u200Cⴁ畝\u200D.≮; [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       ⴁ畝.≮\r
++B;    xn--skjy82u.xn--gdh;    [V6];   [V6]\r
++B;    xn--0ugc160hb36e.xn--gdh;       [C1 C2 V6];     [C1 C2 V6]      #       ⴁ畝.≮\r
++B;    xn--8md0962c.xn--gdh;   [V6];   [V6]\r
++B;    xn--8md700fea3748f.xn--gdh;     [C1 C2 V6];     [C1 C2 V6]      #       Ⴁ畝.≮\r
++T;    \u200Cⴁ畝\u200D.<\u0338;   [C1 C2 P1 V6];  [P1 V6] #       ⴁ畝.≮\r
++N;    \u200Cⴁ畝\u200D.<\u0338;   [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       ⴁ畝.≮\r
++T;    \u200Cⴁ畝\u200D.≮;       [C1 C2 P1 V6];  [P1 V6] #       ⴁ畝.≮\r
++N;    \u200Cⴁ畝\u200D.≮;       [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       ⴁ畝.≮\r
++T;    歷。𐹻≯󳛽\u200D;        [B1 C2 P1 V6];  [B1 P1 V6]      #       歷.𐹻≯\r
++N;    歷。𐹻≯󳛽\u200D;        [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       歷.𐹻≯\r
++T;    歷。𐹻>\u0338󳛽\u200D;    [B1 C2 P1 V6];  [B1 P1 V6]      #       歷.𐹻≯\r
++N;    歷。𐹻>\u0338󳛽\u200D;    [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       歷.𐹻≯\r
++T;    歷。𐹻≯󳛽\u200D;        [B1 C2 P1 V6];  [B1 P1 V6]      #       歷.𐹻≯\r
++N;    歷。𐹻≯󳛽\u200D;        [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       歷.𐹻≯\r
++T;    歷。𐹻>\u0338󳛽\u200D;    [B1 C2 P1 V6];  [B1 P1 V6]      #       歷.𐹻≯\r
++N;    歷。𐹻>\u0338󳛽\u200D;    [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       歷.𐹻≯\r
++B;    xn--nmw.xn--hdh7804gdms2h;      [B1 V6];        [B1 V6]\r
++B;    xn--nmw.xn--1ugx6gs128a1134j;   [B1 C2 V6];     [B1 C2 V6]      #       歷.𐹻≯\r
++T;    \u0ECB\u200D.鎁󠰑; [C2 P1 V5 V6];  [P1 V5 V6]      #       ໋.鎁\r
++N;    \u0ECB\u200D.鎁󠰑; [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ໋.鎁\r
++T;    \u0ECB\u200D.鎁󠰑;   [C2 P1 V5 V6];  [P1 V5 V6]      #       ໋.鎁\r
++N;    \u0ECB\u200D.鎁󠰑;   [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ໋.鎁\r
++B;    xn--t8c.xn--iz4a43209d; [V5 V6];        [V5 V6] #       ໋.鎁\r
++B;    xn--t8c059f.xn--iz4a43209d;     [C2 V5 V6];     [C2 V5 V6]      #       ໋.鎁\r
++T;    \u200D\u200C𞤀。𱘅𐶃;    [B1 B5 B6 C1 C2 P1 V6]; [B5 B6 P1 V6]   #       𞤢.\r
++N;    \u200D\u200C𞤀。𱘅𐶃;    [B1 B5 B6 C1 C2 P1 V6]; [B1 B5 B6 C1 C2 P1 V6]  #       𞤢.\r
++T;    \u200D\u200C𞤀。𱘅𐶃;    [B1 B5 B6 C1 C2 P1 V6]; [B5 B6 P1 V6]   #       𞤢.\r
++N;    \u200D\u200C𞤀。𱘅𐶃;    [B1 B5 B6 C1 C2 P1 V6]; [B1 B5 B6 C1 C2 P1 V6]  #       𞤢.\r
++T;    \u200D\u200C𞤢。𱘅𐶃;    [B1 B5 B6 C1 C2 P1 V6]; [B5 B6 P1 V6]   #       𞤢.\r
++N;    \u200D\u200C𞤢。𱘅𐶃;    [B1 B5 B6 C1 C2 P1 V6]; [B1 B5 B6 C1 C2 P1 V6]  #       𞤢.\r
++B;    xn--9d6h.xn--wh0dj799f; [B5 B6 V6];     [B5 B6 V6]\r
++B;    xn--0ugb45126a.xn--wh0dj799f;   [B1 B5 B6 C1 C2 V6];    [B1 B5 B6 C1 C2 V6]     #       𞤢.\r
++T;    \u200D\u200C𞤢。𱘅𐶃;    [B1 B5 B6 C1 C2 P1 V6]; [B5 B6 P1 V6]   #       𞤢.\r
++N;    \u200D\u200C𞤢。𱘅𐶃;    [B1 B5 B6 C1 C2 P1 V6]; [B1 B5 B6 C1 C2 P1 V6]  #       𞤢.\r
++T;    \u0628≠𝟫-.ς⒍𐹦≠;    [B3 B5 B6 P1 V3 V6];    [B3 B5 B6 P1 V3 V6]     #       ب≠9-.ς⒍𐹦≠\r
++N;    \u0628≠𝟫-.ς⒍𐹦≠;    [B3 B5 B6 P1 V3 V6];    [B3 B5 B6 P1 V3 V6]     #       ب≠9-.ς⒍𐹦≠\r
++T;    \u0628=\u0338𝟫-.ς⒍𐹦=\u0338;    [B3 B5 B6 P1 V3 V6];    [B3 B5 B6 P1 V3 V6]     #       ب≠9-.ς⒍𐹦≠\r
++N;    \u0628=\u0338𝟫-.ς⒍𐹦=\u0338;    [B3 B5 B6 P1 V3 V6];    [B3 B5 B6 P1 V3 V6]     #       ب≠9-.ς⒍𐹦≠\r
++T;    \u0628≠9-.ς6.𐹦≠;        [B1 B3 P1 V3 V6];       [B1 B3 P1 V3 V6]        #       ب≠9-.ς6.𐹦≠\r
++N;    \u0628≠9-.ς6.𐹦≠;        [B1 B3 P1 V3 V6];       [B1 B3 P1 V3 V6]        #       ب≠9-.ς6.𐹦≠\r
++T;    \u0628=\u03389-.ς6.𐹦=\u0338;        [B1 B3 P1 V3 V6];       [B1 B3 P1 V3 V6]        #       ب≠9-.ς6.𐹦≠\r
++N;    \u0628=\u03389-.ς6.𐹦=\u0338;        [B1 B3 P1 V3 V6];       [B1 B3 P1 V3 V6]        #       ب≠9-.ς6.𐹦≠\r
++B;    \u0628=\u03389-.Σ6.𐹦=\u0338;        [B1 B3 P1 V3 V6];       [B1 B3 P1 V3 V6]        #       ب≠9-.σ6.𐹦≠\r
++B;    \u0628≠9-.Σ6.𐹦≠;        [B1 B3 P1 V3 V6];       [B1 B3 P1 V3 V6]        #       ب≠9-.σ6.𐹦≠\r
++B;    \u0628≠9-.σ6.𐹦≠;        [B1 B3 P1 V3 V6];       [B1 B3 P1 V3 V6]        #       ب≠9-.σ6.𐹦≠\r
++B;    \u0628=\u03389-.σ6.𐹦=\u0338;        [B1 B3 P1 V3 V6];       [B1 B3 P1 V3 V6]        #       ب≠9-.σ6.𐹦≠\r
++B;    xn--9--etd0100a.xn--6-zmb.xn--1ch8704g; [B1 B3 V3 V6];  [B1 B3 V3 V6]   #       ب≠9-.σ6.𐹦≠\r
++B;    xn--9--etd0100a.xn--6-xmb.xn--1ch8704g; [B1 B3 V3 V6];  [B1 B3 V3 V6]   #       ب≠9-.ς6.𐹦≠\r
++B;    \u0628=\u0338𝟫-.Σ⒍𐹦=\u0338;    [B3 B5 B6 P1 V3 V6];    [B3 B5 B6 P1 V3 V6]     #       ب≠9-.σ⒍𐹦≠\r
++B;    \u0628≠𝟫-.Σ⒍𐹦≠;    [B3 B5 B6 P1 V3 V6];    [B3 B5 B6 P1 V3 V6]     #       ب≠9-.σ⒍𐹦≠\r
++B;    \u0628≠𝟫-.σ⒍𐹦≠;    [B3 B5 B6 P1 V3 V6];    [B3 B5 B6 P1 V3 V6]     #       ب≠9-.σ⒍𐹦≠\r
++B;    \u0628=\u0338𝟫-.σ⒍𐹦=\u0338;    [B3 B5 B6 P1 V3 V6];    [B3 B5 B6 P1 V3 V6]     #       ب≠9-.σ⒍𐹦≠\r
++B;    xn--9--etd0100a.xn--4xa887mzpbzz04b;    [B3 B5 B6 V3 V6];       [B3 B5 B6 V3 V6]        #       ب≠9-.σ⒍𐹦≠\r
++B;    xn--9--etd0100a.xn--3xa097mzpbzz04b;    [B3 B5 B6 V3 V6];       [B3 B5 B6 V3 V6]        #       ب≠9-.ς⒍𐹦≠\r
++B;    򉛴.-ᡢ\u0592𝨠;    [P1 V3 V6];     [P1 V3 V6]      #       .-ᡢ֒𝨠\r
++B;    xn--ep37b.xn----hec165lho83b;   [V3 V6];        [V3 V6] #       .-ᡢ֒𝨠\r
++T;    \u06CB⒈ß󠄽。񷋍-;        [B2 B3 B6 P1 V3 V6];    [B2 B3 B6 P1 V3 V6]     #       ۋ⒈ß.-\r
++N;    \u06CB⒈ß󠄽。񷋍-;        [B2 B3 B6 P1 V3 V6];    [B2 B3 B6 P1 V3 V6]     #       ۋ⒈ß.-\r
++T;    \u06CB1.ß󠄽。񷋍-; [B6 P1 V3 V6];  [B6 P1 V3 V6]   #       ۋ1.ß.-\r
++N;    \u06CB1.ß󠄽。񷋍-; [B6 P1 V3 V6];  [B6 P1 V3 V6]   #       ۋ1.ß.-\r
++B;    \u06CB1.SS󠄽。񷋍-; [B6 P1 V3 V6];  [B6 P1 V3 V6]   #       ۋ1.ss.-\r
++B;    \u06CB1.ss󠄽。񷋍-; [B6 P1 V3 V6];  [B6 P1 V3 V6]   #       ۋ1.ss.-\r
++B;    \u06CB1.Ss󠄽。񷋍-; [B6 P1 V3 V6];  [B6 P1 V3 V6]   #       ۋ1.ss.-\r
++B;    xn--1-cwc.ss.xn----q001f;       [B6 V3 V6];     [B6 V3 V6]      #       ۋ1.ss.-\r
++B;    xn--1-cwc.xn--zca.xn----q001f;  [B6 V3 V6];     [B6 V3 V6]      #       ۋ1.ß.-\r
++B;    \u06CB⒈SS󠄽。񷋍-;        [B2 B3 B6 P1 V3 V6];    [B2 B3 B6 P1 V3 V6]     #       ۋ⒈ss.-\r
++B;    \u06CB⒈ss󠄽。񷋍-;        [B2 B3 B6 P1 V3 V6];    [B2 B3 B6 P1 V3 V6]     #       ۋ⒈ss.-\r
++B;    \u06CB⒈Ss󠄽。񷋍-;        [B2 B3 B6 P1 V3 V6];    [B2 B3 B6 P1 V3 V6]     #       ۋ⒈ss.-\r
++B;    xn--ss-d7d6651a.xn----q001f;    [B2 B3 B6 V3 V6];       [B2 B3 B6 V3 V6]        #       ۋ⒈ss.-\r
++B;    xn--zca541ato3a.xn----q001f;    [B2 B3 B6 V3 V6];       [B2 B3 B6 V3 V6]        #       ۋ⒈ß.-\r
++T;    𿀫.\u1BAAςႦ\u200D;       [C2 P1 V5 V6];  [P1 V5 V6]      #       .᮪ςႦ\r
++N;    𿀫.\u1BAAςႦ\u200D;       [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       .᮪ςႦ\r
++T;    𿀫.\u1BAAςႦ\u200D; [C2 P1 V5 V6];  [P1 V5 V6]      #       .᮪ςႦ\r
++N;    𿀫.\u1BAAςႦ\u200D; [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       .᮪ςႦ\r
++T;    𿀫.\u1BAAςⴆ\u200D; [C2 P1 V5 V6];  [P1 V5 V6]      #       .᮪ςⴆ\r
++N;    𿀫.\u1BAAςⴆ\u200D; [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       .᮪ςⴆ\r
++T;    𿀫.\u1BAAΣႦ\u200D; [C2 P1 V5 V6];  [P1 V5 V6]      #       .᮪σႦ\r
++N;    𿀫.\u1BAAΣႦ\u200D; [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       .᮪σႦ\r
++T;    𿀫.\u1BAAσⴆ\u200D; [C2 P1 V5 V6];  [P1 V5 V6]      #       .᮪σⴆ\r
++N;    𿀫.\u1BAAσⴆ\u200D; [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       .᮪σⴆ\r
++T;    𿀫.\u1BAAΣⴆ\u200D; [C2 P1 V5 V6];  [P1 V5 V6]      #       .᮪σⴆ\r
++N;    𿀫.\u1BAAΣⴆ\u200D; [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       .᮪σⴆ\r
++B;    xn--nu4s.xn--4xa153j7im;        [V5 V6];        [V5 V6] #       .᮪σⴆ\r
++B;    xn--nu4s.xn--4xa153jk8cs1q;     [C2 V5 V6];     [C2 V5 V6]      #       .᮪σⴆ\r
++B;    xn--nu4s.xn--4xa217dxri;        [V5 V6];        [V5 V6] #       .᮪σႦ\r
++B;    xn--nu4s.xn--4xa217dxriome;     [C2 V5 V6];     [C2 V5 V6]      #       .᮪σႦ\r
++B;    xn--nu4s.xn--3xa353jk8cs1q;     [C2 V5 V6];     [C2 V5 V6]      #       .᮪ςⴆ\r
++B;    xn--nu4s.xn--3xa417dxriome;     [C2 V5 V6];     [C2 V5 V6]      #       .᮪ςႦ\r
++T;    𿀫.\u1BAAςⴆ\u200D;       [C2 P1 V5 V6];  [P1 V5 V6]      #       .᮪ςⴆ\r
++N;    𿀫.\u1BAAςⴆ\u200D;       [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       .᮪ςⴆ\r
++T;    𿀫.\u1BAAΣႦ\u200D;       [C2 P1 V5 V6];  [P1 V5 V6]      #       .᮪σႦ\r
++N;    𿀫.\u1BAAΣႦ\u200D;       [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       .᮪σႦ\r
++T;    𿀫.\u1BAAσⴆ\u200D;       [C2 P1 V5 V6];  [P1 V5 V6]      #       .᮪σⴆ\r
++N;    𿀫.\u1BAAσⴆ\u200D;       [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       .᮪σⴆ\r
++T;    𿀫.\u1BAAΣⴆ\u200D;       [C2 P1 V5 V6];  [P1 V5 V6]      #       .᮪σⴆ\r
++N;    𿀫.\u1BAAΣⴆ\u200D;       [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       .᮪σⴆ\r
++B;    ⾆\u08E2.𝈴; [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       舌.𝈴\r
++B;    舌\u08E2.𝈴; [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       舌.𝈴\r
++B;    xn--l0b9413d.xn--kl1h;  [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       舌.𝈴\r
++B;    ⫞𐹶𖫴。⭠⒈;   [B1 P1 V6];     [B1 P1 V6]\r
++B;    ⫞𐹶𖫴。⭠1.;    [B1];   [B1]\r
++B;    xn--53ix188et88b.xn--1-h6r.;    [B1];   [B1]\r
++B;    xn--53ix188et88b.xn--tsh52w;    [B1 V6];        [B1 V6]\r
++T;    ⒈\u200C\uAAEC︒.\u0ACD;    [C1 P1 V5 V6];  [P1 V5 V6]      #       ⒈ꫬ︒.્\r
++N;    ⒈\u200C\uAAEC︒.\u0ACD;    [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ⒈ꫬ︒.્\r
++T;    1.\u200C\uAAEC。.\u0ACD;       [C1 V5 A4_2];   [V5 A4_2]       #       1.ꫬ..્\r
++N;    1.\u200C\uAAEC。.\u0ACD;       [C1 V5 A4_2];   [C1 V5 A4_2]    #       1.ꫬ..્\r
++B;    1.xn--sv9a..xn--mfc;    [V5 A4_2];      [V5 A4_2]       #       1.ꫬ..્\r
++B;    1.xn--0ug7185c..xn--mfc;        [C1 V5 A4_2];   [C1 V5 A4_2]    #       1.ꫬ..્\r
++B;    xn--tsh0720cse8b.xn--mfc;       [V5 V6];        [V5 V6] #       ⒈ꫬ︒.્\r
++B;    xn--0ug78o720myr1c.xn--mfc;     [C1 V5 V6];     [C1 V5 V6]      #       ⒈ꫬ︒.્\r
++B;    \u0C46。䰀\u0668𞭅󠅼;     [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ె.䰀٨\r
++B;    xn--eqc.xn--hib5476aim6t;       [B1 B3 B5 B6 V5 V6];    [B1 B3 B5 B6 V5 V6]     #       ె.䰀٨\r
++T;    ß\u200D.\u1BF2񄾼;    [C2 P1 V5 V6];  [P1 V5 V6]      #       ß.᯲\r
++N;    ß\u200D.\u1BF2񄾼;    [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ß.᯲\r
++T;    SS\u200D.\u1BF2񄾼;    [C2 P1 V5 V6];  [P1 V5 V6]      #       ss.᯲\r
++N;    SS\u200D.\u1BF2񄾼;    [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ss.᯲\r
++T;    ss\u200D.\u1BF2񄾼;    [C2 P1 V5 V6];  [P1 V5 V6]      #       ss.᯲\r
++N;    ss\u200D.\u1BF2񄾼;    [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ss.᯲\r
++T;    Ss\u200D.\u1BF2񄾼;    [C2 P1 V5 V6];  [P1 V5 V6]      #       ss.᯲\r
++N;    Ss\u200D.\u1BF2񄾼;    [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ss.᯲\r
++B;    ss.xn--0zf22107b;       [V5 V6];        [V5 V6] #       ss.᯲\r
++B;    xn--ss-n1t.xn--0zf22107b;       [C2 V5 V6];     [C2 V5 V6]      #       ss.᯲\r
++B;    xn--zca870n.xn--0zf22107b;      [C2 V5 V6];     [C2 V5 V6]      #       ß.᯲\r
++T;    𑓂\u200C≮.≮;      [P1 V5 V6];     [P1 V5 V6]      #       𑓂≮.≮\r
++N;    𑓂\u200C≮.≮;      [P1 V5 V6];     [P1 V5 V6]      #       𑓂≮.≮\r
++T;    𑓂\u200C<\u0338.<\u0338;      [P1 V5 V6];     [P1 V5 V6]      #       𑓂≮.≮\r
++N;    𑓂\u200C<\u0338.<\u0338;      [P1 V5 V6];     [P1 V5 V6]      #       𑓂≮.≮\r
++B;    xn--gdhz656g.xn--gdh;   [V5 V6];        [V5 V6]\r
++B;    xn--0ugy6glz29a.xn--gdh;        [V5 V6];        [V5 V6] #       𑓂≮.≮\r
++B;    🕼.\uFFA0;  [P1 V6];        [P1 V6] #       🕼.\r
++B;    🕼.\u1160;    [P1 V6];        [P1 V6] #       🕼.\r
++B;    xn--my8h.xn--psd;       [V6];   [V6]    #       🕼.\r
++B;    xn--my8h.xn--cl7c;      [V6];   [V6]    #       🕼.\r
++B;    ᡔ\uFD82。񷘎;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ᡔلحى.\r
++B;    ᡔ\u0644\u062D\u0649。񷘎;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ᡔلحى.\r
++B;    xn--sgb9bq785p.xn--bc31b;       [B5 B6 V6];     [B5 B6 V6]      #       ᡔلحى.\r
++B;    爕򳙑.𝟰気;      [P1 V6];        [P1 V6]\r
++B;    爕򳙑.4気;   [P1 V6];        [P1 V6]\r
++B;    xn--1zxq3199c.xn--4-678b;       [V6];   [V6]\r
++B;    ⒋𑍍Ⴝ-.𞬪\u0DCA\u05B5; [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ⒋𑍍Ⴝ-.්ֵ\r
++B;    4.𑍍Ⴝ-.𞬪\u0DCA\u05B5;    [B1 B6 P1 V3 V5 V6];    [B1 B6 P1 V3 V5 V6]     #       4.𑍍Ⴝ-.්ֵ\r
++B;    4.𑍍ⴝ-.𞬪\u0DCA\u05B5;    [B1 B6 P1 V3 V5 V6];    [B1 B6 P1 V3 V5 V6]     #       4.𑍍ⴝ-.්ֵ\r
++B;    4.xn----wwsx259f.xn--ddb152b7y23b;      [B1 B6 V3 V5 V6];       [B1 B6 V3 V5 V6]        #       4.𑍍ⴝ-.්ֵ\r
++B;    4.xn----t1g9869q.xn--ddb152b7y23b;      [B1 B6 V3 V5 V6];       [B1 B6 V3 V5 V6]        #       4.𑍍Ⴝ-.්ֵ\r
++B;    ⒋𑍍ⴝ-.𞬪\u0DCA\u05B5; [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ⒋𑍍ⴝ-.්ֵ\r
++B;    xn----jcp487avl3w.xn--ddb152b7y23b;     [B1 V3 V6];     [B1 V3 V6]      #       ⒋𑍍ⴝ-.්ֵ\r
++B;    xn----t1g323mnk9t.xn--ddb152b7y23b;     [B1 V3 V6];     [B1 V3 V6]      #       ⒋𑍍Ⴝ-.්ֵ\r
++B;    󞝃。򑆃񉢗--;      [P1 V2 V3 V6];  [P1 V2 V3 V6]\r
++B;    xn--2y75e.xn-----1l15eer88n;    [V2 V3 V6];     [V2 V3 V6]\r
++T;    \u200D\u07DF。\u200C\uABED;    [B1 C1 C2];     [B1 B3 B6 V5]   #       ߟ.꯭\r
++N;    \u200D\u07DF。\u200C\uABED;    [B1 C1 C2];     [B1 C1 C2]      #       ߟ.꯭\r
++T;    \u200D\u07DF。\u200C\uABED;    [B1 C1 C2];     [B1 B3 B6 V5]   #       ߟ.꯭\r
++N;    \u200D\u07DF。\u200C\uABED;    [B1 C1 C2];     [B1 C1 C2]      #       ߟ.꯭\r
++B;    xn--6sb.xn--429a;       [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ߟ.꯭\r
++B;    xn--6sb394j.xn--0ug1126c;       [B1 C1 C2];     [B1 C1 C2]      #       ߟ.꯭\r
++B;    𞮽\u07FF\u084E。ᢍ򝹁𐫘; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ࡎ.ᢍ𐫘\r
++B;    𞮽\u07FF\u084E。ᢍ򝹁𐫘; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ࡎ.ᢍ𐫘\r
++B;    xn--3tb2nz468k.xn--69e8615j5rn5d;       [B5 B6 V6];     [B5 B6 V6]      #       ࡎ.ᢍ𐫘\r
++B;    \u06ED𞺌𑄚\u1714.ꡞ\u08B7; [B1 B5 B6 V5];  [B1 B5 B6 V5]   #       ۭم𑄚᜔.ꡞࢷ\r
++B;    \u06ED\u0645𑄚\u1714.ꡞ\u08B7;       [B1 B5 B6 V5];  [B1 B5 B6 V5]   #       ۭم𑄚᜔.ꡞࢷ\r
++B;    xn--hhb94ag41b739u.xn--dzb5582f;        [B1 B5 B6 V5];  [B1 B5 B6 V5]   #       ۭم𑄚᜔.ꡞࢷ\r
++T;    񻂵킃𑘶\u07DC。ς\u063Cς; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.ςؼς\r
++N;    񻂵킃𑘶\u07DC。ς\u063Cς; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.ςؼς\r
++T;    񻂵킃𑘶\u07DC。ς\u063Cς;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.ςؼς\r
++N;    񻂵킃𑘶\u07DC。ς\u063Cς;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.ςؼς\r
++T;    񻂵킃𑘶\u07DC。ς\u063Cς; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.ςؼς\r
++N;    񻂵킃𑘶\u07DC。ς\u063Cς; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.ςؼς\r
++T;    񻂵킃𑘶\u07DC。ς\u063Cς;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.ςؼς\r
++N;    񻂵킃𑘶\u07DC。ς\u063Cς;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.ςؼς\r
++B;    񻂵킃𑘶\u07DC。Σ\u063CΣ;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼσ\r
++B;    񻂵킃𑘶\u07DC。Σ\u063CΣ; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼσ\r
++B;    񻂵킃𑘶\u07DC。σ\u063Cσ; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼσ\r
++B;    񻂵킃𑘶\u07DC。σ\u063Cσ;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼσ\r
++B;    񻂵킃𑘶\u07DC。Σ\u063Cσ;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼσ\r
++B;    񻂵킃𑘶\u07DC。Σ\u063Cσ; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼσ\r
++B;    xn--3sb7483hoyvbbe76g.xn--4xaa21q;      [B5 B6 V6];     [B5 B6 V6]      #       킃𑘶ߜ.σؼσ\r
++T;    񻂵킃𑘶\u07DC。Σ\u063Cς;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼς\r
++N;    񻂵킃𑘶\u07DC。Σ\u063Cς;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼς\r
++T;    񻂵킃𑘶\u07DC。Σ\u063Cς; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼς\r
++N;    񻂵킃𑘶\u07DC。Σ\u063Cς; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼς\r
++T;    񻂵킃𑘶\u07DC。σ\u063Cς; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼς\r
++N;    񻂵킃𑘶\u07DC。σ\u063Cς; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼς\r
++T;    񻂵킃𑘶\u07DC。σ\u063Cς;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼς\r
++N;    񻂵킃𑘶\u07DC。σ\u063Cς;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼς\r
++B;    xn--3sb7483hoyvbbe76g.xn--3xab31q;      [B5 B6 V6];     [B5 B6 V6]      #       킃𑘶ߜ.σؼς\r
++B;    xn--3sb7483hoyvbbe76g.xn--3xaa51q;      [B5 B6 V6];     [B5 B6 V6]      #       킃𑘶ߜ.ςؼς\r
++B;    񻂵킃𑘶\u07DC。Σ\u063CΣ;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼσ\r
++B;    񻂵킃𑘶\u07DC。Σ\u063CΣ; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼσ\r
++B;    񻂵킃𑘶\u07DC。σ\u063Cσ; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼσ\r
++B;    񻂵킃𑘶\u07DC。σ\u063Cσ;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼσ\r
++B;    񻂵킃𑘶\u07DC。Σ\u063Cσ;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼσ\r
++B;    񻂵킃𑘶\u07DC。Σ\u063Cσ; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼσ\r
++T;    񻂵킃𑘶\u07DC。Σ\u063Cς;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼς\r
++N;    񻂵킃𑘶\u07DC。Σ\u063Cς;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼς\r
++T;    񻂵킃𑘶\u07DC。Σ\u063Cς; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼς\r
++N;    񻂵킃𑘶\u07DC。Σ\u063Cς; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼς\r
++T;    񻂵킃𑘶\u07DC。σ\u063Cς; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼς\r
++N;    񻂵킃𑘶\u07DC。σ\u063Cς; [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼς\r
++T;    񻂵킃𑘶\u07DC。σ\u063Cς;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼς\r
++N;    񻂵킃𑘶\u07DC。σ\u063Cς;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       킃𑘶ߜ.σؼς\r
++B;    蔰。󠁹\u08DD-𑈵;  [P1 V6];        [P1 V6] #       蔰.ࣝ-𑈵\r
++B;    xn--sz1a.xn----mrd9984r3dl0i;   [V6];   [V6]    #       蔰.ࣝ-𑈵\r
++T;    ςჅ。\u075A; [P1 V6];        [P1 V6] #       ςჅ.ݚ\r
++N;    ςჅ。\u075A; [P1 V6];        [P1 V6] #       ςჅ.ݚ\r
++T;    ςⴥ。\u075A; ςⴥ.\u075A;   xn--4xa203s.xn--epb     #       ςⴥ.ݚ\r
++N;    ςⴥ。\u075A; ςⴥ.\u075A;   xn--3xa403s.xn--epb     #       ςⴥ.ݚ\r
++B;    ΣჅ。\u075A; [P1 V6];        [P1 V6] #       σჅ.ݚ\r
++B;    σⴥ。\u075A; σⴥ.\u075A;   xn--4xa203s.xn--epb     #       σⴥ.ݚ\r
++B;    Σⴥ。\u075A; σⴥ.\u075A;   xn--4xa203s.xn--epb     #       σⴥ.ݚ\r
++B;    xn--4xa203s.xn--epb;    σⴥ.\u075A;   xn--4xa203s.xn--epb     #       σⴥ.ݚ\r
++B;    σⴥ.\u075A;   ;       xn--4xa203s.xn--epb     #       σⴥ.ݚ\r
++B;    ΣჅ.\u075A;   [P1 V6];        [P1 V6] #       σჅ.ݚ\r
++B;    Σⴥ.\u075A;   σⴥ.\u075A;   xn--4xa203s.xn--epb     #       σⴥ.ݚ\r
++B;    xn--4xa477d.xn--epb;    [V6];   [V6]    #       σჅ.ݚ\r
++B;    xn--3xa403s.xn--epb;    ςⴥ.\u075A;   xn--3xa403s.xn--epb     #       ςⴥ.ݚ\r
++T;    ςⴥ.\u075A;   ;       xn--4xa203s.xn--epb     #       ςⴥ.ݚ\r
++N;    ςⴥ.\u075A;   ;       xn--3xa403s.xn--epb     #       ςⴥ.ݚ\r
++B;    xn--3xa677d.xn--epb;    [V6];   [V6]    #       ςჅ.ݚ\r
++B;    \u0C4DႩ𞰓.\u1B72; [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       ్Ⴉ.᭲\r
++B;    \u0C4DႩ𞰓.\u1B72;   [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       ్Ⴉ.᭲\r
++B;    \u0C4Dⴉ𞰓.\u1B72;   [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       ్ⴉ.᭲\r
++B;    xn--lqc478nlr02a.xn--dwf;       [B1 B3 B6 V5 V6];       [B1 B3 B6 V5 V6]        #       ్ⴉ.᭲\r
++B;    xn--lqc64t7t26c.xn--dwf;        [B1 B3 B6 V5 V6];       [B1 B3 B6 V5 V6]        #       ్Ⴉ.᭲\r
++B;    \u0C4Dⴉ𞰓.\u1B72; [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       ్ⴉ.᭲\r
++B;    ⮷≮񎈴󠄟。𐠄;  [B1 P1 V6];     [B1 P1 V6]\r
++B;    ⮷<\u0338񎈴󠄟。𐠄;      [B1 P1 V6];     [B1 P1 V6]\r
++B;    xn--gdh877a3513h.xn--pc9c;      [B1 V6];        [B1 V6]\r
++T;    \u06BC。\u200Dẏ\u200Cᡤ;    [B1 C1 C2];     xn--vkb.xn--08e172a     #       ڼ.ẏᡤ\r
++N;    \u06BC。\u200Dẏ\u200Cᡤ;    [B1 C1 C2];     [B1 C1 C2]      #       ڼ.ẏᡤ\r
++T;    \u06BC。\u200Dy\u0307\u200Cᡤ;        [B1 C1 C2];     xn--vkb.xn--08e172a     #       ڼ.ẏᡤ\r
++N;    \u06BC。\u200Dy\u0307\u200Cᡤ;        [B1 C1 C2];     [B1 C1 C2]      #       ڼ.ẏᡤ\r
++T;    \u06BC。\u200Dẏ\u200Cᡤ;    [B1 C1 C2];     xn--vkb.xn--08e172a     #       ڼ.ẏᡤ\r
++N;    \u06BC。\u200Dẏ\u200Cᡤ;    [B1 C1 C2];     [B1 C1 C2]      #       ڼ.ẏᡤ\r
++T;    \u06BC。\u200Dy\u0307\u200Cᡤ;        [B1 C1 C2];     xn--vkb.xn--08e172a     #       ڼ.ẏᡤ\r
++N;    \u06BC。\u200Dy\u0307\u200Cᡤ;        [B1 C1 C2];     [B1 C1 C2]      #       ڼ.ẏᡤ\r
++T;    \u06BC。\u200DY\u0307\u200Cᡤ;        [B1 C1 C2];     xn--vkb.xn--08e172a     #       ڼ.ẏᡤ\r
++N;    \u06BC。\u200DY\u0307\u200Cᡤ;        [B1 C1 C2];     [B1 C1 C2]      #       ڼ.ẏᡤ\r
++T;    \u06BC。\u200DẎ\u200Cᡤ;    [B1 C1 C2];     xn--vkb.xn--08e172a     #       ڼ.ẏᡤ\r
++N;    \u06BC。\u200DẎ\u200Cᡤ;    [B1 C1 C2];     [B1 C1 C2]      #       ڼ.ẏᡤ\r
++B;    xn--vkb.xn--08e172a;    \u06BC.ẏᡤ;  xn--vkb.xn--08e172a     #       ڼ.ẏᡤ\r
++B;    \u06BC.ẏᡤ;  ;       xn--vkb.xn--08e172a     #       ڼ.ẏᡤ\r
++B;    \u06BC.y\u0307ᡤ;      \u06BC.ẏᡤ;  xn--vkb.xn--08e172a     #       ڼ.ẏᡤ\r
++B;    \u06BC.Y\u0307ᡤ;      \u06BC.ẏᡤ;  xn--vkb.xn--08e172a     #       ڼ.ẏᡤ\r
++B;    \u06BC.Ẏᡤ;  \u06BC.ẏᡤ;  xn--vkb.xn--08e172a     #       ڼ.ẏᡤ\r
++B;    xn--vkb.xn--08e172ax6aca;       [B1 C1 C2];     [B1 C1 C2]      #       ڼ.ẏᡤ\r
++T;    \u06BC。\u200DY\u0307\u200Cᡤ;        [B1 C1 C2];     xn--vkb.xn--08e172a     #       ڼ.ẏᡤ\r
++N;    \u06BC。\u200DY\u0307\u200Cᡤ;        [B1 C1 C2];     [B1 C1 C2]      #       ڼ.ẏᡤ\r
++T;    \u06BC。\u200DẎ\u200Cᡤ;    [B1 C1 C2];     xn--vkb.xn--08e172a     #       ڼ.ẏᡤ\r
++N;    \u06BC。\u200DẎ\u200Cᡤ;    [B1 C1 C2];     [B1 C1 C2]      #       ڼ.ẏᡤ\r
++B;    𐹹𑲛。񑂐\u0DCA;  [B1 P1 V6];     [B1 P1 V6]      #       𐹹𑲛.්\r
++B;    xn--xo0dg5v.xn--h1c39876d;      [B1 V6];        [B1 V6] #       𐹹𑲛.්\r
++B;    -≠𑈵。嵕\uFEF1۴\uA953;   [B1 B5 P1 V3 V6];       [B1 B5 P1 V3 V6]        #       -≠𑈵.嵕ي۴꥓\r
++B;    -=\u0338𑈵。嵕\uFEF1۴\uA953;       [B1 B5 P1 V3 V6];       [B1 B5 P1 V3 V6]        #       -≠𑈵.嵕ي۴꥓\r
++B;    -≠𑈵。嵕\u064A۴\uA953;   [B1 B5 P1 V3 V6];       [B1 B5 P1 V3 V6]        #       -≠𑈵.嵕ي۴꥓\r
++B;    -=\u0338𑈵。嵕\u064A۴\uA953;       [B1 B5 P1 V3 V6];       [B1 B5 P1 V3 V6]        #       -≠𑈵.嵕ي۴꥓\r
++B;    xn----ufo4749h.xn--mhb45a235sns3c;      [B1 B5 V3 V6];  [B1 B5 V3 V6]   #       -≠𑈵.嵕ي۴꥓\r
++T;    \u200C񍸰𐹶\u076E.\u06C1\u200D≯\u200D;   [B1 B3 C1 C2 P1 V6];    [B3 B5 B6 P1 V6]        #       𐹶ݮ.ہ≯\r
++N;    \u200C񍸰𐹶\u076E.\u06C1\u200D≯\u200D;   [B1 B3 C1 C2 P1 V6];    [B1 B3 C1 C2 P1 V6]     #       𐹶ݮ.ہ≯\r
++T;    \u200C񍸰𐹶\u076E.\u06C1\u200D>\u0338\u200D;       [B1 B3 C1 C2 P1 V6];    [B3 B5 B6 P1 V6]        #       𐹶ݮ.ہ≯\r
++N;    \u200C񍸰𐹶\u076E.\u06C1\u200D>\u0338\u200D;       [B1 B3 C1 C2 P1 V6];    [B1 B3 C1 C2 P1 V6]     #       𐹶ݮ.ہ≯\r
++T;    \u200C񍸰𐹶\u076E.\u06C1\u200D≯\u200D;     [B1 B3 C1 C2 P1 V6];    [B3 B5 B6 P1 V6]        #       𐹶ݮ.ہ≯\r
++N;    \u200C񍸰𐹶\u076E.\u06C1\u200D≯\u200D;     [B1 B3 C1 C2 P1 V6];    [B1 B3 C1 C2 P1 V6]     #       𐹶ݮ.ہ≯\r
++T;    \u200C񍸰𐹶\u076E.\u06C1\u200D>\u0338\u200D; [B1 B3 C1 C2 P1 V6];    [B3 B5 B6 P1 V6]        #       𐹶ݮ.ہ≯\r
++N;    \u200C񍸰𐹶\u076E.\u06C1\u200D>\u0338\u200D; [B1 B3 C1 C2 P1 V6];    [B1 B3 C1 C2 P1 V6]     #       𐹶ݮ.ہ≯\r
++B;    xn--ypb5875khz9y.xn--0kb682l;   [B3 B5 B6 V6];  [B3 B5 B6 V6]   #       𐹶ݮ.ہ≯\r
++B;    xn--ypb717jrx2o7v94a.xn--0kb660ka35v;   [B1 B3 C1 C2 V6];       [B1 B3 C1 C2 V6]        #       𐹶ݮ.ہ≯\r
++B;    ≮.\u17B5\u0855𐫔; [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≮.ࡕ𐫔\r
++B;    <\u0338.\u17B5\u0855𐫔;     [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≮.ࡕ𐫔\r
++B;    ≮.\u17B5\u0855𐫔;   [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≮.ࡕ𐫔\r
++B;    <\u0338.\u17B5\u0855𐫔;       [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≮.ࡕ𐫔\r
++B;    xn--gdh.xn--kwb589e217p;        [B1 V5 V6];     [B1 V5 V6]      #       ≮.ࡕ𐫔\r
++T;    𐩗\u200D。ႩႵ;    [B3 C2 P1 V6];  [P1 V6] #       𐩗.ႩႵ\r
++N;    𐩗\u200D。ႩႵ;    [B3 C2 P1 V6];  [B3 C2 P1 V6]   #       𐩗.ႩႵ\r
++T;    𐩗\u200D。ႩႵ;    [B3 C2 P1 V6];  [P1 V6] #       𐩗.ႩႵ\r
++N;    𐩗\u200D。ႩႵ;    [B3 C2 P1 V6];  [B3 C2 P1 V6]   #       𐩗.ႩႵ\r
++T;    𐩗\u200D。ⴉⴕ;    [B3 C2];        xn--pt9c.xn--0kjya      #       𐩗.ⴉⴕ\r
++N;    𐩗\u200D。ⴉⴕ;    [B3 C2];        [B3 C2] #       𐩗.ⴉⴕ\r
++T;    𐩗\u200D。Ⴉⴕ;    [B3 C2 P1 V6];  [P1 V6] #       𐩗.Ⴉⴕ\r
++N;    𐩗\u200D。Ⴉⴕ;    [B3 C2 P1 V6];  [B3 C2 P1 V6]   #       𐩗.Ⴉⴕ\r
++B;    xn--pt9c.xn--hnd666l;   [V6];   [V6]\r
++B;    xn--1ug4933g.xn--hnd666l;       [B3 C2 V6];     [B3 C2 V6]      #       𐩗.Ⴉⴕ\r
++B;    xn--pt9c.xn--0kjya;     𐩗.ⴉⴕ;    xn--pt9c.xn--0kjya;     NV8\r
++B;    𐩗.ⴉⴕ;    ;       xn--pt9c.xn--0kjya;     NV8\r
++B;    𐩗.ႩႵ;    [P1 V6];        [P1 V6]\r
++B;    𐩗.Ⴉⴕ;    [P1 V6];        [P1 V6]\r
++B;    xn--pt9c.xn--hndy;      [V6];   [V6]\r
++B;    xn--1ug4933g.xn--0kjya; [B3 C2];        [B3 C2] #       𐩗.ⴉⴕ\r
++B;    xn--1ug4933g.xn--hndy;  [B3 C2 V6];     [B3 C2 V6]      #       𐩗.ႩႵ\r
++T;    𐩗\u200D。ⴉⴕ;    [B3 C2];        xn--pt9c.xn--0kjya      #       𐩗.ⴉⴕ\r
++N;    𐩗\u200D。ⴉⴕ;    [B3 C2];        [B3 C2] #       𐩗.ⴉⴕ\r
++T;    𐩗\u200D。Ⴉⴕ;    [B3 C2 P1 V6];  [P1 V6] #       𐩗.Ⴉⴕ\r
++N;    𐩗\u200D。Ⴉⴕ;    [B3 C2 P1 V6];  [B3 C2 P1 V6]   #       𐩗.Ⴉⴕ\r
++T;    \u200C\u200Cㄤ.\u032E󕨑\u09C2;     [C1 P1 V5 V6];  [P1 V5 V6]      #       ㄤ.̮ূ\r
++N;    \u200C\u200Cㄤ.\u032E󕨑\u09C2;     [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ㄤ.̮ূ\r
++T;    \u200C\u200Cㄤ.\u032E󕨑\u09C2;       [C1 P1 V5 V6];  [P1 V5 V6]      #       ㄤ.̮ূ\r
++N;    \u200C\u200Cㄤ.\u032E󕨑\u09C2;       [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ㄤ.̮ূ\r
++B;    xn--1fk.xn--vta284a9o563a;      [V5 V6];        [V5 V6] #       ㄤ.̮ূ\r
++B;    xn--0uga242k.xn--vta284a9o563a; [C1 V5 V6];     [C1 V5 V6]      #       ㄤ.̮ূ\r
++T;    𐋻。-\u200C𐫄Ⴗ;  [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       𐋻.-𐫄Ⴗ\r
++N;    𐋻。-\u200C𐫄Ⴗ;  [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       𐋻.-𐫄Ⴗ\r
++T;    𐋻。-\u200C𐫄Ⴗ;  [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       𐋻.-𐫄Ⴗ\r
++N;    𐋻。-\u200C𐫄Ⴗ;  [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       𐋻.-𐫄Ⴗ\r
++T;    𐋻。-\u200C𐫄ⴗ;  [B1 C1 V3];     [B1 V3] #       𐋻.-𐫄ⴗ\r
++N;    𐋻。-\u200C𐫄ⴗ;  [B1 C1 V3];     [B1 C1 V3]      #       𐋻.-𐫄ⴗ\r
++B;    xn--v97c.xn----lws0526f;        [B1 V3];        [B1 V3]\r
++B;    xn--v97c.xn----sgnv20du99s;     [B1 C1 V3];     [B1 C1 V3]      #       𐋻.-𐫄ⴗ\r
++B;    xn--v97c.xn----i1g2513q;        [B1 V3 V6];     [B1 V3 V6]\r
++B;    xn--v97c.xn----i1g888ih12u;     [B1 C1 V3 V6];  [B1 C1 V3 V6]   #       𐋻.-𐫄Ⴗ\r
++T;    𐋻。-\u200C𐫄ⴗ;  [B1 C1 V3];     [B1 V3] #       𐋻.-𐫄ⴗ\r
++N;    𐋻。-\u200C𐫄ⴗ;  [B1 C1 V3];     [B1 C1 V3]      #       𐋻.-𐫄ⴗ\r
++T;    🙑𐷺.≠\u200C;   [B1 C1 P1 V6];  [B1 P1 V6]      #       🙑.≠\r
++N;    🙑𐷺.≠\u200C;   [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       🙑.≠\r
++T;    🙑𐷺.=\u0338\u200C;       [B1 C1 P1 V6];  [B1 P1 V6]      #       🙑.≠\r
++N;    🙑𐷺.=\u0338\u200C;       [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       🙑.≠\r
++T;    🙑𐷺.≠\u200C;     [B1 C1 P1 V6];  [B1 P1 V6]      #       🙑.≠\r
++N;    🙑𐷺.≠\u200C;     [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       🙑.≠\r
++T;    🙑𐷺.=\u0338\u200C; [B1 C1 P1 V6];  [B1 P1 V6]      #       🙑.≠\r
++N;    🙑𐷺.=\u0338\u200C; [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       🙑.≠\r
++B;    xn--bl0dh970b.xn--1ch;  [B1 V6];        [B1 V6]\r
++B;    xn--bl0dh970b.xn--0ug83g;       [B1 C1 V6];     [B1 C1 V6]      #       🙑.≠\r
++B;    \u064C\u1CD2。𞮞\u2D7F⧎;   [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       ٌ᳒.⵿⧎\r
++B;    \u064C\u1CD2。𞮞\u2D7F⧎;   [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       ٌ᳒.⵿⧎\r
++B;    xn--ohb646i.xn--ewi38jf765c;    [B1 B3 B6 V5 V6];       [B1 B3 B6 V5 V6]        #       ٌ᳒.⵿⧎\r
++B;    Ⴔ𝨨₃󠁦.𝟳𑂹\u0B82;        [P1 V6];        [P1 V6] #       Ⴔ𝨨3.7𑂹ஂ\r
++B;    Ⴔ𝨨3󠁦.7𑂹\u0B82;       [P1 V6];        [P1 V6] #       Ⴔ𝨨3.7𑂹ஂ\r
++B;    ⴔ𝨨3󠁦.7𑂹\u0B82;       [P1 V6];        [P1 V6] #       ⴔ𝨨3.7𑂹ஂ\r
++B;    xn--3-ews6985n35s3g.xn--7-cve6271r;     [V6];   [V6]    #       ⴔ𝨨3.7𑂹ஂ\r
++B;    xn--3-b1g83426a35t0g.xn--7-cve6271r;    [V6];   [V6]    #       Ⴔ𝨨3.7𑂹ஂ\r
++B;    ⴔ𝨨₃󠁦.𝟳𑂹\u0B82;        [P1 V6];        [P1 V6] #       ⴔ𝨨3.7𑂹ஂ\r
++T;    䏈\u200C。\u200C⒈񱢕;      [C1 P1 V6];     [P1 V6] #       䏈.⒈\r
++N;    䏈\u200C。\u200C⒈񱢕;      [C1 P1 V6];     [C1 P1 V6]      #       䏈.⒈\r
++T;    䏈\u200C。\u200C1.񱢕;       [C1 P1 V6];     [P1 V6] #       䏈.1.\r
++N;    䏈\u200C。\u200C1.񱢕;       [C1 P1 V6];     [C1 P1 V6]      #       䏈.1.\r
++B;    xn--eco.1.xn--ms39a;    [V6];   [V6]\r
++B;    xn--0ug491l.xn--1-rgn.xn--ms39a;        [C1 V6];        [C1 V6] #       䏈.1.\r
++B;    xn--eco.xn--tsh21126d;  [V6];   [V6]\r
++B;    xn--0ug491l.xn--0ug88oot66q;    [C1 V6];        [C1 V6] #       䏈.⒈\r
++T;    1\uAAF6ß𑲥。\u1DD8;       [V5];   [V5]    #       1꫶ß𑲥.ᷘ\r
++N;    1\uAAF6ß𑲥。\u1DD8;       [V5];   [V5]    #       1꫶ß𑲥.ᷘ\r
++T;    1\uAAF6ß𑲥。\u1DD8; [V5];   [V5]    #       1꫶ß𑲥.ᷘ\r
++N;    1\uAAF6ß𑲥。\u1DD8; [V5];   [V5]    #       1꫶ß𑲥.ᷘ\r
++B;    1\uAAF6SS𑲥。\u1DD8; [V5];   [V5]    #       1꫶ss𑲥.ᷘ\r
++B;    1\uAAF6ss𑲥。\u1DD8; [V5];   [V5]    #       1꫶ss𑲥.ᷘ\r
++B;    1\uAAF6Ss𑲥。\u1DD8; [V5];   [V5]    #       1꫶ss𑲥.ᷘ\r
++B;    xn--1ss-ir6ln166b.xn--weg;      [V5];   [V5]    #       1꫶ss𑲥.ᷘ\r
++B;    xn--1-qfa2471kdb0d.xn--weg;     [V5];   [V5]    #       1꫶ß𑲥.ᷘ\r
++B;    1\uAAF6SS𑲥。\u1DD8;       [V5];   [V5]    #       1꫶ss𑲥.ᷘ\r
++B;    1\uAAF6ss𑲥。\u1DD8;       [V5];   [V5]    #       1꫶ss𑲥.ᷘ\r
++B;    1\uAAF6Ss𑲥。\u1DD8;       [V5];   [V5]    #       1꫶ss𑲥.ᷘ\r
++T;    \u200D񫶩𞪯\u0CCD。\u077C⒈;       [B1 C2 P1 V6];  [B5 B6 P1 V6]   #       ್.ݼ⒈\r
++N;    \u200D񫶩𞪯\u0CCD。\u077C⒈;       [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       ್.ݼ⒈\r
++T;    \u200D񫶩𞪯\u0CCD。\u077C1.;        [B1 C2 P1 V6];  [B5 B6 P1 V6]   #       ್.ݼ1.\r
++N;    \u200D񫶩𞪯\u0CCD。\u077C1.;        [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       ್.ݼ1.\r
++B;    xn--8tc9875v5is1a.xn--1-g6c.;   [B5 B6 V6];     [B5 B6 V6]      #       ್.ݼ1.\r
++B;    xn--8tc969gzn94a4lm8a.xn--1-g6c.;       [B1 C2 V6];     [B1 C2 V6]      #       ್.ݼ1.\r
++B;    xn--8tc9875v5is1a.xn--dqb689l;  [B5 B6 V6];     [B5 B6 V6]      #       ್.ݼ⒈\r
++B;    xn--8tc969gzn94a4lm8a.xn--dqb689l;      [B1 C2 V6];     [B1 C2 V6]      #       ್.ݼ⒈\r
++B;    \u1AB6.𞤳򓢖򻉒\u07D7;    [B1 B2 B3 B6 P1 V5 V6]; [B1 B2 B3 B6 P1 V5 V6]  #       ᪶.𞤳ߗ\r
++B;    \u1AB6.𞤳򓢖򻉒\u07D7;      [B1 B2 B3 B6 P1 V5 V6]; [B1 B2 B3 B6 P1 V5 V6]  #       ᪶.𞤳ߗ\r
++B;    \u1AB6.𞤑򓢖򻉒\u07D7;      [B1 B2 B3 B6 P1 V5 V6]; [B1 B2 B3 B6 P1 V5 V6]  #       ᪶.𞤳ߗ\r
++B;    xn--zqf.xn--ysb9657vuiz5bj0ep;  [B1 B2 B3 B6 V5 V6];    [B1 B2 B3 B6 V5 V6]     #       ᪶.𞤳ߗ\r
++B;    \u1AB6.𞤑򓢖򻉒\u07D7;    [B1 B2 B3 B6 P1 V5 V6]; [B1 B2 B3 B6 P1 V5 V6]  #       ᪶.𞤳ߗ\r
++B;    \u0842𞩚⒈.󠬌8򏳏\u0770;      [B1 P1 V6];     [B1 P1 V6]      #       ࡂ⒈.8ݰ\r
++B;    \u0842𞩚1..󠬌8򏳏\u0770;   [B1 P1 V6 A4_2];        [B1 P1 V6 A4_2] #       ࡂ1..8ݰ\r
++B;    xn--1-rid26318a..xn--8-s5c22427ox454a;  [B1 V6 A4_2];   [B1 V6 A4_2]    #       ࡂ1..8ݰ\r
++B;    xn--0vb095ldg52a.xn--8-s5c22427ox454a;  [B1 V6];        [B1 V6] #       ࡂ⒈.8ݰ\r
++B;    \u0361𐫫\u0369ᡷ。-󠰛鞰; [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ͡𐫫ͩᡷ.-鞰\r
++B;    xn--cvaq482npv5t.xn----yg7dt1332g;      [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       ͡𐫫ͩᡷ.-鞰\r
++T;    -.\u0ACD剘ß𐫃;      [B1 V3 V5];     [B1 V3 V5]      #       -.્剘ß𐫃\r
++N;    -.\u0ACD剘ß𐫃;      [B1 V3 V5];     [B1 V3 V5]      #       -.્剘ß𐫃\r
++B;    -.\u0ACD剘SS𐫃;      [B1 V3 V5];     [B1 V3 V5]      #       -.્剘ss𐫃\r
++B;    -.\u0ACD剘ss𐫃;      [B1 V3 V5];     [B1 V3 V5]      #       -.્剘ss𐫃\r
++B;    -.\u0ACD剘Ss𐫃;      [B1 V3 V5];     [B1 V3 V5]      #       -.્剘ss𐫃\r
++B;    -.xn--ss-bqg4734erywk;  [B1 V3 V5];     [B1 V3 V5]      #       -.્剘ss𐫃\r
++B;    -.xn--zca791c493duf8i;  [B1 V3 V5];     [B1 V3 V5]      #       -.્剘ß𐫃\r
++B;    \u08FB𞵸。-; [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ࣻ.-\r
++B;    \u08FB𞵸。-; [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ࣻ.-\r
++B;    xn--b1b2719v.-; [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       ࣻ.-\r
++B;    ⒈󠈻𐹲。≠\u0603𐹽;    [B1 P1 V6];     [B1 P1 V6]      #       ⒈𐹲.≠𐹽\r
++B;    ⒈󠈻𐹲。=\u0338\u0603𐹽;        [B1 P1 V6];     [B1 P1 V6]      #       ⒈𐹲.≠𐹽\r
++B;    1.󠈻𐹲。≠\u0603𐹽;     [B1 P1 V6];     [B1 P1 V6]      #       1.𐹲.≠𐹽\r
++B;    1.󠈻𐹲。=\u0338\u0603𐹽; [B1 P1 V6];     [B1 P1 V6]      #       1.𐹲.≠𐹽\r
++B;    1.xn--qo0dl3077c.xn--lfb536lb35n;       [B1 V6];        [B1 V6] #       1.𐹲.≠𐹽\r
++B;    xn--tshw766f1153g.xn--lfb536lb35n;      [B1 V6];        [B1 V6] #       ⒈𐹲.≠𐹽\r
++T;    𐹢󠈚Ⴎ\u200C.㖾𐹡;      [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 P1 V6]        #       𐹢Ⴎ.㖾𐹡\r
++N;    𐹢󠈚Ⴎ\u200C.㖾𐹡;      [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       𐹢Ⴎ.㖾𐹡\r
++T;    𐹢󠈚ⴎ\u200C.㖾𐹡;      [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 P1 V6]        #       𐹢ⴎ.㖾𐹡\r
++N;    𐹢󠈚ⴎ\u200C.㖾𐹡;      [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       𐹢ⴎ.㖾𐹡\r
++B;    xn--5kjx323em053g.xn--pelu572d; [B1 B5 B6 V6];  [B1 B5 B6 V6]\r
++B;    xn--0ug342clq0pqxv4i.xn--pelu572d;      [B1 B5 B6 C1 V6];       [B1 B5 B6 C1 V6]        #       𐹢ⴎ.㖾𐹡\r
++B;    xn--mnd9001km0o0g.xn--pelu572d; [B1 B5 B6 V6];  [B1 B5 B6 V6]\r
++B;    xn--mnd289ezj4pqxp0i.xn--pelu572d;      [B1 B5 B6 C1 V6];       [B1 B5 B6 C1 V6]        #       𐹢Ⴎ.㖾𐹡\r
++B;    򩼗.\u07C7ᡖႳႧ; [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       .߇ᡖႳႧ\r
++B;    򩼗.\u07C7ᡖႳႧ;   [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       .߇ᡖႳႧ\r
++B;    򩼗.\u07C7ᡖⴓⴇ;   [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       .߇ᡖⴓⴇ\r
++B;    򩼗.\u07C7ᡖႳⴇ;   [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       .߇ᡖႳⴇ\r
++B;    xn--te28c.xn--isb286btrgo7w;    [B2 B3 V6];     [B2 B3 V6]      #       .߇ᡖႳⴇ\r
++B;    xn--te28c.xn--isb295fbtpmb;     [B2 B3 V6];     [B2 B3 V6]      #       .߇ᡖⴓⴇ\r
++B;    xn--te28c.xn--isb856b9a631d;    [B2 B3 V6];     [B2 B3 V6]      #       .߇ᡖႳႧ\r
++B;    򩼗.\u07C7ᡖⴓⴇ; [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       .߇ᡖⴓⴇ\r
++B;    򩼗.\u07C7ᡖႳⴇ; [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       .߇ᡖႳⴇ\r
++T;    \u200D􅍉.\u06B3\u0775;        [B1 C2 P1 V6];  [P1 V6] #       .ڳݵ\r
++N;    \u200D􅍉.\u06B3\u0775;        [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       .ڳݵ\r
++B;    xn--3j78f.xn--mkb20b;   [V6];   [V6]    #       .ڳݵ\r
++B;    xn--1ug39444n.xn--mkb20b;       [B1 C2 V6];     [B1 C2 V6]      #       .ڳݵ\r
++B;    𲤱⒛⾳.ꡦ⒈;    [P1 V6];        [P1 V6]\r
++B;    𲤱20.音.ꡦ1.;       [P1 V6];        [P1 V6]\r
++B;    xn--20-9802c.xn--0w5a.xn--1-eg4e.;      [V6];   [V6]\r
++B;    xn--dth6033bzbvx.xn--tsh9439b;  [V6];   [V6]\r
++B;    \u07DC8񳦓-。򞲙𑁿𐩥\u09CD;    [B2 B3 B5 B6 P1 V3 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       ߜ8-.𑁿𐩥্\r
++B;    \u07DC8񳦓-。򞲙𑁿𐩥\u09CD;      [B2 B3 B5 B6 P1 V3 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       ߜ8-.𑁿𐩥্\r
++B;    xn--8--rve13079p.xn--b7b9842k42df776x;  [B2 B3 B5 B6 V3 V6];    [B2 B3 B5 B6 V3 V6]     #       ߜ8-.𑁿𐩥্\r
++T;    Ⴕ。۰≮ß\u0745;    [P1 V6];        [P1 V6] #       Ⴕ.۰≮ß݅\r
++N;    Ⴕ。۰≮ß\u0745;    [P1 V6];        [P1 V6] #       Ⴕ.۰≮ß݅\r
++T;    Ⴕ。۰<\u0338ß\u0745;        [P1 V6];        [P1 V6] #       Ⴕ.۰≮ß݅\r
++N;    Ⴕ。۰<\u0338ß\u0745;        [P1 V6];        [P1 V6] #       Ⴕ.۰≮ß݅\r
++T;    ⴕ。۰<\u0338ß\u0745;        [P1 V6];        [P1 V6] #       ⴕ.۰≮ß݅\r
++N;    ⴕ。۰<\u0338ß\u0745;        [P1 V6];        [P1 V6] #       ⴕ.۰≮ß݅\r
++T;    ⴕ。۰≮ß\u0745;    [P1 V6];        [P1 V6] #       ⴕ.۰≮ß݅\r
++N;    ⴕ。۰≮ß\u0745;    [P1 V6];        [P1 V6] #       ⴕ.۰≮ß݅\r
++B;    Ⴕ。۰≮SS\u0745;    [P1 V6];        [P1 V6] #       Ⴕ.۰≮ss݅\r
++B;    Ⴕ。۰<\u0338SS\u0745;        [P1 V6];        [P1 V6] #       Ⴕ.۰≮ss݅\r
++B;    ⴕ。۰<\u0338ss\u0745;        [P1 V6];        [P1 V6] #       ⴕ.۰≮ss݅\r
++B;    ⴕ。۰≮ss\u0745;    [P1 V6];        [P1 V6] #       ⴕ.۰≮ss݅\r
++B;    Ⴕ。۰≮Ss\u0745;    [P1 V6];        [P1 V6] #       Ⴕ.۰≮ss݅\r
++B;    Ⴕ。۰<\u0338Ss\u0745;        [P1 V6];        [P1 V6] #       Ⴕ.۰≮ss݅\r
++B;    xn--tnd.xn--ss-jbe65aw27i;      [V6];   [V6]    #       Ⴕ.۰≮ss݅\r
++B;    xn--dlj.xn--ss-jbe65aw27i;      [V6];   [V6]    #       ⴕ.۰≮ss݅\r
++B;    xn--dlj.xn--zca912alh227g;      [V6];   [V6]    #       ⴕ.۰≮ß݅\r
++B;    xn--tnd.xn--zca912alh227g;      [V6];   [V6]    #       Ⴕ.۰≮ß݅\r
++B;    \u07E9-.𝨗꒱\u1B72;  [B1 B3 V3 V5];  [B1 B3 V3 V5]   #       ߩ-.𝨗꒱᭲\r
++B;    xn----odd.xn--dwf8994dc8wj;     [B1 B3 V3 V5];  [B1 B3 V3 V5]   #       ߩ-.𝨗꒱᭲\r
++T;    𞼸\u200C.≯䕵⫧;   [B1 B3 C1 P1 V6];       [B1 P1 V6]      #       .≯䕵⫧\r
++N;    𞼸\u200C.≯䕵⫧;   [B1 B3 C1 P1 V6];       [B1 B3 C1 P1 V6]        #       .≯䕵⫧\r
++T;    𞼸\u200C.>\u0338䕵⫧;       [B1 B3 C1 P1 V6];       [B1 P1 V6]      #       .≯䕵⫧\r
++N;    𞼸\u200C.>\u0338䕵⫧;       [B1 B3 C1 P1 V6];       [B1 B3 C1 P1 V6]        #       .≯䕵⫧\r
++B;    xn--sn7h.xn--hdh754ax6w;        [B1 V6];        [B1 V6]\r
++B;    xn--0ugx453p.xn--hdh754ax6w;    [B1 B3 C1 V6];  [B1 B3 C1 V6]   #       .≯䕵⫧\r
++T;    𐨅ß\uFC57.\u06AC۳︒;       [B1 B3 P1 V5 V6];       [B1 B3 P1 V5 V6]        #       𐨅ßيخ.ڬ۳︒\r
++N;    𐨅ß\uFC57.\u06AC۳︒;       [B1 B3 P1 V5 V6];       [B1 B3 P1 V5 V6]        #       𐨅ßيخ.ڬ۳︒\r
++T;    𐨅ß\u064A\u062E.\u06AC۳。; [B1 V5];        [B1 V5] #       𐨅ßيخ.ڬ۳.\r
++N;    𐨅ß\u064A\u062E.\u06AC۳。; [B1 V5];        [B1 V5] #       𐨅ßيخ.ڬ۳.\r
++B;    𐨅SS\u064A\u062E.\u06AC۳。; [B1 V5];        [B1 V5] #       𐨅ssيخ.ڬ۳.\r
++B;    𐨅ss\u064A\u062E.\u06AC۳。; [B1 V5];        [B1 V5] #       𐨅ssيخ.ڬ۳.\r
++B;    𐨅Ss\u064A\u062E.\u06AC۳。; [B1 V5];        [B1 V5] #       𐨅ssيخ.ڬ۳.\r
++B;    xn--ss-ytd5i7765l.xn--fkb6l.;   [B1 V5];        [B1 V5] #       𐨅ssيخ.ڬ۳.\r
++B;    xn--zca23yncs877j.xn--fkb6l.;   [B1 V5];        [B1 V5] #       𐨅ßيخ.ڬ۳.\r
++B;    𐨅SS\uFC57.\u06AC۳︒;       [B1 B3 P1 V5 V6];       [B1 B3 P1 V5 V6]        #       𐨅ssيخ.ڬ۳︒\r
++B;    𐨅ss\uFC57.\u06AC۳︒;       [B1 B3 P1 V5 V6];       [B1 B3 P1 V5 V6]        #       𐨅ssيخ.ڬ۳︒\r
++B;    𐨅Ss\uFC57.\u06AC۳︒;       [B1 B3 P1 V5 V6];       [B1 B3 P1 V5 V6]        #       𐨅ssيخ.ڬ۳︒\r
++B;    xn--ss-ytd5i7765l.xn--fkb6lp314e;       [B1 B3 V5 V6];  [B1 B3 V5 V6]   #       𐨅ssيخ.ڬ۳︒\r
++B;    xn--zca23yncs877j.xn--fkb6lp314e;       [B1 B3 V5 V6];  [B1 B3 V5 V6]   #       𐨅ßيخ.ڬ۳︒\r
++B;    -≮🡒\u1CED.񏿾Ⴁ\u0714;   [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -≮🡒᳭.Ⴁܔ\r
++B;    -<\u0338🡒\u1CED.񏿾Ⴁ\u0714;       [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -≮🡒᳭.Ⴁܔ\r
++B;    -<\u0338🡒\u1CED.񏿾ⴁ\u0714;       [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -≮🡒᳭.ⴁܔ\r
++B;    -≮🡒\u1CED.񏿾ⴁ\u0714;   [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -≮🡒᳭.ⴁܔ\r
++B;    xn----44l04zxt68c.xn--enb135qf106f;     [B1 V3 V6];     [B1 V3 V6]      #       -≮🡒᳭.ⴁܔ\r
++B;    xn----44l04zxt68c.xn--enb300c1597h;     [B1 V3 V6];     [B1 V3 V6]      #       -≮🡒᳭.Ⴁܔ\r
++T;    𞤨。ꡏ\u200D\u200C; [B6 C1 C2];     xn--ge6h.xn--oc9a       #       𞤨.ꡏ\r
++N;    𞤨。ꡏ\u200D\u200C; [B6 C1 C2];     [B6 C1 C2]      #       𞤨.ꡏ\r
++T;    𞤨。ꡏ\u200D\u200C; [B6 C1 C2];     xn--ge6h.xn--oc9a       #       𞤨.ꡏ\r
++N;    𞤨。ꡏ\u200D\u200C; [B6 C1 C2];     [B6 C1 C2]      #       𞤨.ꡏ\r
++T;    𞤆。ꡏ\u200D\u200C; [B6 C1 C2];     xn--ge6h.xn--oc9a       #       𞤨.ꡏ\r
++N;    𞤆。ꡏ\u200D\u200C; [B6 C1 C2];     [B6 C1 C2]      #       𞤨.ꡏ\r
++B;    xn--ge6h.xn--oc9a;      𞤨.ꡏ;       xn--ge6h.xn--oc9a\r
++B;    𞤨.ꡏ;       ;       xn--ge6h.xn--oc9a\r
++B;    𞤆.ꡏ;       𞤨.ꡏ;       xn--ge6h.xn--oc9a\r
++B;    xn--ge6h.xn--0ugb9575h; [B6 C1 C2];     [B6 C1 C2]      #       𞤨.ꡏ\r
++T;    𞤆。ꡏ\u200D\u200C; [B6 C1 C2];     xn--ge6h.xn--oc9a       #       𞤨.ꡏ\r
++N;    𞤆。ꡏ\u200D\u200C; [B6 C1 C2];     [B6 C1 C2]      #       𞤨.ꡏ\r
++B;    󠅹𑂶.ᢌ𑂹\u0669;       [B1 B3 B5 B6 V5];       [B1 B3 B5 B6 V5]        #       𑂶.ᢌ𑂹٩\r
++B;    󠅹𑂶.ᢌ𑂹\u0669; [B1 B3 B5 B6 V5];       [B1 B3 B5 B6 V5]        #       𑂶.ᢌ𑂹٩\r
++B;    xn--b50d.xn--iib993gyp5p;       [B1 B3 B5 B6 V5];       [B1 B3 B5 B6 V5]        #       𑂶.ᢌ𑂹٩\r
++B;    Ⅎ󠅺񝵒。≯⾑;   [P1 V6];        [P1 V6]\r
++B;    Ⅎ󠅺񝵒。>\u0338⾑;       [P1 V6];        [P1 V6]\r
++B;    Ⅎ󠅺񝵒。≯襾;   [P1 V6];        [P1 V6]\r
++B;    Ⅎ󠅺񝵒。>\u0338襾;       [P1 V6];        [P1 V6]\r
++B;    ⅎ󠅺񝵒。>\u0338襾;       [P1 V6];        [P1 V6]\r
++B;    ⅎ󠅺񝵒。≯襾;   [P1 V6];        [P1 V6]\r
++B;    xn--73g39298c.xn--hdhz171b;     [V6];   [V6]\r
++B;    xn--f3g73398c.xn--hdhz171b;     [V6];   [V6]\r
++B;    ⅎ󠅺񝵒。>\u0338⾑;       [P1 V6];        [P1 V6]\r
++B;    ⅎ󠅺񝵒。≯⾑;   [P1 V6];        [P1 V6]\r
++T;    ς\u200D\u0DD4\u0660。-;       [B1 B5 B6 C2 V3];       [B1 B5 B6 V3]   #       ςු٠.-\r
++N;    ς\u200D\u0DD4\u0660。-;       [B1 B5 B6 C2 V3];       [B1 B5 B6 C2 V3]        #       ςු٠.-\r
++T;    ς\u200D\u0DD4\u0660。-;       [B1 B5 B6 C2 V3];       [B1 B5 B6 V3]   #       ςු٠.-\r
++N;    ς\u200D\u0DD4\u0660。-;       [B1 B5 B6 C2 V3];       [B1 B5 B6 C2 V3]        #       ςු٠.-\r
++T;    Σ\u200D\u0DD4\u0660。-;       [B1 B5 B6 C2 V3];       [B1 B5 B6 V3]   #       σු٠.-\r
++N;    Σ\u200D\u0DD4\u0660。-;       [B1 B5 B6 C2 V3];       [B1 B5 B6 C2 V3]        #       σු٠.-\r
++T;    σ\u200D\u0DD4\u0660。-;       [B1 B5 B6 C2 V3];       [B1 B5 B6 V3]   #       σු٠.-\r
++N;    σ\u200D\u0DD4\u0660。-;       [B1 B5 B6 C2 V3];       [B1 B5 B6 C2 V3]        #       σු٠.-\r
++B;    xn--4xa25ks2j.-;        [B1 B5 B6 V3];  [B1 B5 B6 V3]   #       σු٠.-\r
++B;    xn--4xa25ks2jenu.-;     [B1 B5 B6 C2 V3];       [B1 B5 B6 C2 V3]        #       σු٠.-\r
++B;    xn--3xa45ks2jenu.-;     [B1 B5 B6 C2 V3];       [B1 B5 B6 C2 V3]        #       ςු٠.-\r
++T;    Σ\u200D\u0DD4\u0660。-;       [B1 B5 B6 C2 V3];       [B1 B5 B6 V3]   #       σු٠.-\r
++N;    Σ\u200D\u0DD4\u0660。-;       [B1 B5 B6 C2 V3];       [B1 B5 B6 C2 V3]        #       σු٠.-\r
++T;    σ\u200D\u0DD4\u0660。-;       [B1 B5 B6 C2 V3];       [B1 B5 B6 V3]   #       σු٠.-\r
++N;    σ\u200D\u0DD4\u0660。-;       [B1 B5 B6 C2 V3];       [B1 B5 B6 C2 V3]        #       σු٠.-\r
++T;    \u200C.ßႩ-;  [C1 P1 V3 V6];  [P1 V3 V6 A4_2] #       .ßႩ-\r
++N;    \u200C.ßႩ-;  [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .ßႩ-\r
++T;    \u200C.ßⴉ-;  [C1 V3];        [V3 A4_2]       #       .ßⴉ-\r
++N;    \u200C.ßⴉ-;  [C1 V3];        [C1 V3] #       .ßⴉ-\r
++T;    \u200C.SSႩ-;  [C1 P1 V3 V6];  [P1 V3 V6 A4_2] #       .ssႩ-\r
++N;    \u200C.SSႩ-;  [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       .ssႩ-\r
++T;    \u200C.ssⴉ-;  [C1 V3];        [V3 A4_2]       #       .ssⴉ-\r
++N;    \u200C.ssⴉ-;  [C1 V3];        [C1 V3] #       .ssⴉ-\r
++T;    \u200C.Ssⴉ-;  [C1 V3];        [V3 A4_2]       #       .ssⴉ-\r
++N;    \u200C.Ssⴉ-;  [C1 V3];        [C1 V3] #       .ssⴉ-\r
++B;    .xn--ss--bi1b;  [V3 A4_2];      [V3 A4_2]\r
++B;    xn--0ug.xn--ss--bi1b;   [C1 V3];        [C1 V3] #       .ssⴉ-\r
++B;    .xn--ss--4rn;   [V3 V6 A4_2];   [V3 V6 A4_2]\r
++B;    xn--0ug.xn--ss--4rn;    [C1 V3 V6];     [C1 V3 V6]      #       .ssႩ-\r
++B;    xn--0ug.xn----pfa2305a; [C1 V3];        [C1 V3] #       .ßⴉ-\r
++B;    xn--0ug.xn----pfa042j;  [C1 V3 V6];     [C1 V3 V6]      #       .ßႩ-\r
++B;    󍭲𐫍㓱。⾑;      [B5 P1 V6];     [B5 P1 V6]\r
++B;    󍭲𐫍㓱。襾;      [B5 P1 V6];     [B5 P1 V6]\r
++B;    xn--u7kt691dlj09f.xn--9v2a;     [B5 V6];        [B5 V6]\r
++T;    \u06A0𐮋𐹰≮。≯󠦗\u200D;      [B1 B3 C2 P1 V6];       [B1 B3 P1 V6]   #       ڠ𐮋𐹰≮.≯\r
++N;    \u06A0𐮋𐹰≮。≯󠦗\u200D;      [B1 B3 C2 P1 V6];       [B1 B3 C2 P1 V6]        #       ڠ𐮋𐹰≮.≯\r
++T;    \u06A0𐮋𐹰<\u0338。>\u0338󠦗\u200D;      [B1 B3 C2 P1 V6];       [B1 B3 P1 V6]   #       ڠ𐮋𐹰≮.≯\r
++N;    \u06A0𐮋𐹰<\u0338。>\u0338󠦗\u200D;      [B1 B3 C2 P1 V6];       [B1 B3 C2 P1 V6]        #       ڠ𐮋𐹰≮.≯\r
++B;    xn--2jb053lf13nyoc.xn--hdh08821l;       [B1 B3 V6];     [B1 B3 V6]      #       ڠ𐮋𐹰≮.≯\r
++B;    xn--2jb053lf13nyoc.xn--1ugx6gc8096c;    [B1 B3 C2 V6];  [B1 B3 C2 V6]   #       ڠ𐮋𐹰≮.≯\r
++B;    𝟞。񃰶\u0777\u08B0⩋;     [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       6.ݷࢰ⩋\r
++B;    6。񃰶\u0777\u08B0⩋;        [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       6.ݷࢰ⩋\r
++B;    6.xn--7pb04do15eq748f;  [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       6.ݷࢰ⩋\r
++B;    -\uFCFD。𑇀𑍴;     [B1 V3 V5];     [B1 V3 V5]      #       -شى.𑇀𑍴\r
++B;    -\uFCFD。𑇀𑍴;     [B1 V3 V5];     [B1 V3 V5]      #       -شى.𑇀𑍴\r
++B;    -\u0634\u0649。𑇀𑍴;       [B1 V3 V5];     [B1 V3 V5]      #       -شى.𑇀𑍴\r
++B;    xn----qnc7d.xn--wd1d62a;        [B1 V3 V5];     [B1 V3 V5]      #       -شى.𑇀𑍴\r
++T;    \u200C󠊶𝟏.\u0D43򪥐𐹬󊓶;      [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       1.ൃ𐹬\r
++N;    \u200C󠊶𝟏.\u0D43򪥐𐹬󊓶;      [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       1.ൃ𐹬\r
++T;    \u200C󠊶1.\u0D43򪥐𐹬󊓶; [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       1.ൃ𐹬\r
++N;    \u200C󠊶1.\u0D43򪥐𐹬󊓶; [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       1.ൃ𐹬\r
++B;    xn--1-f521m.xn--mxc0872kcu37dnmem;      [B1 V5 V6];     [B1 V5 V6]      #       1.ൃ𐹬\r
++B;    xn--1-rgnu0071n.xn--mxc0872kcu37dnmem;  [B1 C1 V5 V6];  [B1 C1 V5 V6]   #       1.ൃ𐹬\r
++T;    齙--𝟰.ß;   齙--4.ß;      xn----4-p16k.ss\r
++N;    齙--𝟰.ß;   齙--4.ß;      xn----4-p16k.xn--zca\r
++T;    齙--4.ß;      ;       xn----4-p16k.ss\r
++N;    齙--4.ß;      ;       xn----4-p16k.xn--zca\r
++B;    齙--4.SS;      齙--4.ss;      xn----4-p16k.ss\r
++B;    齙--4.ss;      ;       xn----4-p16k.ss\r
++B;    齙--4.Ss;      齙--4.ss;      xn----4-p16k.ss\r
++B;    xn----4-p16k.ss;        齙--4.ss;      xn----4-p16k.ss\r
++B;    xn----4-p16k.xn--zca;   齙--4.ß;      xn----4-p16k.xn--zca\r
++B;    齙--𝟰.SS;   齙--4.ss;      xn----4-p16k.ss\r
++B;    齙--𝟰.ss;   齙--4.ss;      xn----4-p16k.ss\r
++B;    齙--𝟰.Ss;   齙--4.ss;      xn----4-p16k.ss\r
++T;    \u1BF2.𐹢𞀖\u200C;  [B1 C1 V5];     [B1 V5] #       ᯲.𐹢𞀖\r
++N;    \u1BF2.𐹢𞀖\u200C;  [B1 C1 V5];     [B1 C1 V5]      #       ᯲.𐹢𞀖\r
++B;    xn--0zf.xn--9n0d2296a;  [B1 V5];        [B1 V5] #       ᯲.𐹢𞀖\r
++B;    xn--0zf.xn--0ug9894grqqf;       [B1 C1 V5];     [B1 C1 V5]      #       ᯲.𐹢𞀖\r
++T;    󃲙󠋘。\uDEDE-\u200D;       [C2 P1 V6];     [P1 V3 V6 A3]   #       .-\r
++N;    󃲙󠋘。\uDEDE-\u200D;       [C2 P1 V6];     [C2 P1 V6 A3]   #       .-\r
++T;    󃲙󠋘。\uDEDE-\u200D;       [C2 P1 V6];     [P1 V3 V6 A3]   #       .-\r
++N;    󃲙󠋘。\uDEDE-\u200D;       [C2 P1 V6];     [C2 P1 V6 A3]   #       .-\r
++B;    xn--ct86d8w51a.\uDEDE-; [P1 V3 V6];     [P1 V3 V6 A3]   #       .-\r
++B;    XN--CT86D8W51A.\uDEDE-; [P1 V3 V6];     [P1 V3 V6 A3]   #       .-\r
++B;    Xn--Ct86d8w51a.\uDEDE-; [P1 V3 V6];     [P1 V3 V6 A3]   #       .-\r
++T;    xn--ct86d8w51a.\uDEDE-\u200D;   [C2 P1 V6];     [P1 V3 V6 A3]   #       .-\r
++N;    xn--ct86d8w51a.\uDEDE-\u200D;   [C2 P1 V6];     [C2 P1 V6 A3]   #       .-\r
++T;    XN--CT86D8W51A.\uDEDE-\u200D;   [C2 P1 V6];     [P1 V3 V6 A3]   #       .-\r
++N;    XN--CT86D8W51A.\uDEDE-\u200D;   [C2 P1 V6];     [C2 P1 V6 A3]   #       .-\r
++T;    Xn--Ct86d8w51a.\uDEDE-\u200D;   [C2 P1 V6];     [P1 V3 V6 A3]   #       .-\r
++N;    Xn--Ct86d8w51a.\uDEDE-\u200D;   [C2 P1 V6];     [C2 P1 V6 A3]   #       .-\r
++B;    \u1A60.𞵷-𝪩悎;  [B1 B2 B3 B6 P1 V5 V6]; [B1 B2 B3 B6 P1 V5 V6]  #       ᩠.-𝪩悎\r
++B;    \u1A60.𞵷-𝪩悎;    [B1 B2 B3 B6 P1 V5 V6]; [B1 B2 B3 B6 P1 V5 V6]  #       ᩠.-𝪩悎\r
++B;    xn--jof.xn----gf4bq282iezpa;    [B1 B2 B3 B6 V5 V6];    [B1 B2 B3 B6 V5 V6]     #       ᩠.-𝪩悎\r
++B;    𛜯󠊛.𞤳񏥾;    [B2 B3 B6 P1 V6];       [B2 B3 B6 P1 V6]\r
++B;    𛜯󠊛.𞤳񏥾;      [B2 B3 B6 P1 V6];       [B2 B3 B6 P1 V6]\r
++B;    𛜯󠊛.𞤑񏥾;      [B2 B3 B6 P1 V6];       [B2 B3 B6 P1 V6]\r
++B;    xn--xx5gy2741c.xn--re6hw266j;   [B2 B3 B6 V6];  [B2 B3 B6 V6]\r
++B;    𛜯󠊛.𞤑񏥾;    [B2 B3 B6 P1 V6];       [B2 B3 B6 P1 V6]\r
++B;    \u071C𐫒\u062E.𐋲;  [B1];   [B1]    #       ܜ𐫒خ.𐋲\r
++B;    xn--tgb98b8643d.xn--m97c;       [B1];   [B1]    #       ܜ𐫒خ.𐋲\r
++B;    𐼑𞤓\u0637\u08E2.\uDF56;    [P1 V6];        [P1 V6 A3]      #       𞤵ط.\r
++B;    𐼑𞤵\u0637\u08E2.\uDF56;    [P1 V6];        [P1 V6 A3]      #       𞤵ط.\r
++B;    xn--2gb08k9w69agm0g.\uDF56;     [P1 V6];        [P1 V6 A3]      #       𞤵ط.\r
++B;    XN--2GB08K9W69AGM0G.\uDF56;     [P1 V6];        [P1 V6 A3]      #       𞤵ط.\r
++B;    Xn--2Gb08k9w69agm0g.\uDF56;     [P1 V6];        [P1 V6 A3]      #       𞤵ط.\r
++B;    Ↄ。\u0A4D\u1CD4𞷣; [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       Ↄ.᳔੍\r
++B;    Ↄ。\u1CD4\u0A4D𞷣; [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       Ↄ.᳔੍\r
++B;    ↄ。\u1CD4\u0A4D𞷣; [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ↄ.᳔੍\r
++B;    xn--r5g.xn--ybc995g0835a;       [B1 V5 V6];     [B1 V5 V6]      #       ↄ.᳔੍\r
++B;    xn--q5g.xn--ybc995g0835a;       [B1 V5 V6];     [B1 V5 V6]      #       Ↄ.᳔੍\r
++B;    ↄ。\u0A4D\u1CD4𞷣; [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ↄ.᳔੍\r
++B;    󠪢-。򛂏≮𑜫;    [P1 V3 V6];     [P1 V3 V6]\r
++B;    󠪢-。򛂏<\u0338𑜫;        [P1 V3 V6];     [P1 V3 V6]\r
++B;    xn----bh61m.xn--gdhz157g0em1d;  [V3 V6];        [V3 V6]\r
++T;    \u200C󠉹\u200D。򌿧≮Ⴉ;  [C1 C2 P1 V6];  [P1 V6] #       .≮Ⴉ\r
++N;    \u200C󠉹\u200D。򌿧≮Ⴉ;  [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       .≮Ⴉ\r
++T;    \u200C󠉹\u200D。򌿧<\u0338Ⴉ;      [C1 C2 P1 V6];  [P1 V6] #       .≮Ⴉ\r
++N;    \u200C󠉹\u200D。򌿧<\u0338Ⴉ;      [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       .≮Ⴉ\r
++T;    \u200C󠉹\u200D。򌿧<\u0338ⴉ;      [C1 C2 P1 V6];  [P1 V6] #       .≮ⴉ\r
++N;    \u200C󠉹\u200D。򌿧<\u0338ⴉ;      [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       .≮ⴉ\r
++T;    \u200C󠉹\u200D。򌿧≮ⴉ;  [C1 C2 P1 V6];  [P1 V6] #       .≮ⴉ\r
++N;    \u200C󠉹\u200D。򌿧≮ⴉ;  [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       .≮ⴉ\r
++B;    xn--3n36e.xn--gdh992byu01p;     [V6];   [V6]\r
++B;    xn--0ugc90904y.xn--gdh992byu01p;        [C1 C2 V6];     [C1 C2 V6]      #       .≮ⴉ\r
++B;    xn--3n36e.xn--hnd112gpz83n;     [V6];   [V6]\r
++B;    xn--0ugc90904y.xn--hnd112gpz83n;        [C1 C2 V6];     [C1 C2 V6]      #       .≮Ⴉ\r
++B;    𐹯-𑄴\u08BC。︒䖐⾆;    [B1 P1 V6];     [B1 P1 V6]      #       𐹯-𑄴ࢼ.︒䖐舌\r
++B;    𐹯-𑄴\u08BC。。䖐舌;    [B1 A4_2];      [B1 A4_2]       #       𐹯-𑄴ࢼ..䖐舌\r
++B;    xn----rpd7902rclc..xn--fpo216m; [B1 A4_2];      [B1 A4_2]       #       𐹯-𑄴ࢼ..䖐舌\r
++B;    xn----rpd7902rclc.xn--fpo216mn07e;      [B1 V6];        [B1 V6] #       𐹯-𑄴ࢼ.︒䖐舌\r
++B;    𝪞Ⴐ。쪡;  [P1 V5 V6];     [P1 V5 V6]\r
++B;    𝪞Ⴐ。쪡;    [P1 V5 V6];     [P1 V5 V6]\r
++B;    𝪞Ⴐ。쪡;  [P1 V5 V6];     [P1 V5 V6]\r
++B;    𝪞Ⴐ。쪡;    [P1 V5 V6];     [P1 V5 V6]\r
++B;    𝪞ⴐ。쪡;    [V5];   [V5]\r
++B;    𝪞ⴐ。쪡;  [V5];   [V5]\r
++B;    xn--7kj1858k.xn--pi6b;  [V5];   [V5]\r
++B;    xn--ond3755u.xn--pi6b;  [V5 V6];        [V5 V6]\r
++B;    𝪞ⴐ。쪡;    [V5];   [V5]\r
++B;    𝪞ⴐ。쪡;  [V5];   [V5]\r
++B;    \u0E3A쩁𐹬.􋉳;     [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ฺ쩁𐹬.\r
++B;    \u0E3A쩁𐹬.􋉳;       [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ฺ쩁𐹬.\r
++B;    xn--o4c4837g2zvb.xn--5f70g;     [B1 V5 V6];     [B1 V5 V6]      #       ฺ쩁𐹬.\r
++T;    ᡅ0\u200C。⎢󤨄; [C1 P1 V6];     [P1 V6] #       ᡅ0.⎢\r
++N;    ᡅ0\u200C。⎢󤨄; [C1 P1 V6];     [C1 P1 V6]      #       ᡅ0.⎢\r
++T;    ᡅ0\u200C。⎢󤨄;   [C1 P1 V6];     [P1 V6] #       ᡅ0.⎢\r
++N;    ᡅ0\u200C。⎢󤨄;   [C1 P1 V6];     [C1 P1 V6]      #       ᡅ0.⎢\r
++B;    xn--0-z6j.xn--8lh28773l;        [V6];   [V6]\r
++B;    xn--0-z6jy93b.xn--8lh28773l;    [C1 V6];        [C1 V6] #       ᡅ0.⎢\r
++T;    𲮚9ꍩ\u17D3.\u200Dß;    [C2 P1 V6];     [P1 V6] #       9ꍩ៓.ß\r
++N;    𲮚9ꍩ\u17D3.\u200Dß;    [C2 P1 V6];     [C2 P1 V6]      #       9ꍩ៓.ß\r
++T;    𲮚9ꍩ\u17D3.\u200Dß;        [C2 P1 V6];     [P1 V6] #       9ꍩ៓.ß\r
++N;    𲮚9ꍩ\u17D3.\u200Dß;        [C2 P1 V6];     [C2 P1 V6]      #       9ꍩ៓.ß\r
++T;    𲮚9ꍩ\u17D3.\u200DSS;        [C2 P1 V6];     [P1 V6] #       9ꍩ៓.ss\r
++N;    𲮚9ꍩ\u17D3.\u200DSS;        [C2 P1 V6];     [C2 P1 V6]      #       9ꍩ៓.ss\r
++T;    𲮚9ꍩ\u17D3.\u200Dss;        [C2 P1 V6];     [P1 V6] #       9ꍩ៓.ss\r
++N;    𲮚9ꍩ\u17D3.\u200Dss;        [C2 P1 V6];     [C2 P1 V6]      #       9ꍩ៓.ss\r
++T;    𲮚9ꍩ\u17D3.\u200DSs;        [C2 P1 V6];     [P1 V6] #       9ꍩ៓.ss\r
++N;    𲮚9ꍩ\u17D3.\u200DSs;        [C2 P1 V6];     [C2 P1 V6]      #       9ꍩ៓.ss\r
++B;    xn--9-i0j5967eg3qz.ss;  [V6];   [V6]    #       9ꍩ៓.ss\r
++B;    xn--9-i0j5967eg3qz.xn--ss-l1t;  [C2 V6];        [C2 V6] #       9ꍩ៓.ss\r
++B;    xn--9-i0j5967eg3qz.xn--zca770n; [C2 V6];        [C2 V6] #       9ꍩ៓.ß\r
++T;    𲮚9ꍩ\u17D3.\u200DSS;    [C2 P1 V6];     [P1 V6] #       9ꍩ៓.ss\r
++N;    𲮚9ꍩ\u17D3.\u200DSS;    [C2 P1 V6];     [C2 P1 V6]      #       9ꍩ៓.ss\r
++T;    𲮚9ꍩ\u17D3.\u200Dss;    [C2 P1 V6];     [P1 V6] #       9ꍩ៓.ss\r
++N;    𲮚9ꍩ\u17D3.\u200Dss;    [C2 P1 V6];     [C2 P1 V6]      #       9ꍩ៓.ss\r
++T;    𲮚9ꍩ\u17D3.\u200DSs;    [C2 P1 V6];     [P1 V6] #       9ꍩ៓.ss\r
++N;    𲮚9ꍩ\u17D3.\u200DSs;    [C2 P1 V6];     [C2 P1 V6]      #       9ꍩ៓.ss\r
++B;    ꗷ𑆀.\u075D𐩒;     ;       xn--ju8a625r.xn--hpb0073k;      NV8     #       ꗷ𑆀.ݝ𐩒\r
++B;    xn--ju8a625r.xn--hpb0073k;      ꗷ𑆀.\u075D𐩒;     xn--ju8a625r.xn--hpb0073k;      NV8     #       ꗷ𑆀.ݝ𐩒\r
++B;    ⒐≯-。︒򩑣-񞛠; [P1 V3 V6];     [P1 V3 V6]\r
++B;    ⒐>\u0338-。︒򩑣-񞛠;     [P1 V3 V6];     [P1 V3 V6]\r
++B;    9.≯-。。򩑣-񞛠;  [P1 V3 V6 A4_2];        [P1 V3 V6 A4_2]\r
++B;    9.>\u0338-。。򩑣-񞛠;      [P1 V3 V6 A4_2];        [P1 V3 V6 A4_2]\r
++B;    9.xn----ogo..xn----xj54d1s69k;  [V3 V6 A4_2];   [V3 V6 A4_2]\r
++B;    xn----ogot9g.xn----n89hl0522az9u2a;     [V3 V6];        [V3 V6]\r
++B;    򈪚\u0CE3Ⴡ󠢏.\u061D;     [B6 P1 V6];     [B6 P1 V6]      #       ೣჁ.\r
++B;    򈪚\u0CE3Ⴡ󠢏.\u061D;       [B6 P1 V6];     [B6 P1 V6]      #       ೣჁ.\r
++B;    򈪚\u0CE3ⴡ󠢏.\u061D;       [B6 P1 V6];     [B6 P1 V6]      #       ೣⴡ.\r
++B;    xn--vuc226n8n28lmju7a.xn--cgb;  [B6 V6];        [B6 V6] #       ೣⴡ.\r
++B;    xn--vuc49qvu85xmju7a.xn--cgb;   [B6 V6];        [B6 V6] #       ೣჁ.\r
++B;    򈪚\u0CE3ⴡ󠢏.\u061D;     [B6 P1 V6];     [B6 P1 V6]      #       ೣⴡ.\r
++B;    \u1DEB。𐋩\u0638-𐫮;       [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ᷫ.𐋩ظ-𐫮\r
++B;    xn--gfg.xn----xnc0815qyyg;      [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ᷫ.𐋩ظ-𐫮\r
++B;    싇。⾇𐳋Ⴝ;       [B5 P1 V6];     [B5 P1 V6]\r
++B;    싇。⾇𐳋Ⴝ; [B5 P1 V6];     [B5 P1 V6]\r
++B;    싇。舛𐳋Ⴝ;       [B5 P1 V6];     [B5 P1 V6]\r
++B;    싇。舛𐳋Ⴝ; [B5 P1 V6];     [B5 P1 V6]\r
++B;    싇。舛𐳋ⴝ; [B5];   [B5]\r
++B;    싇。舛𐳋ⴝ;       [B5];   [B5]\r
++B;    싇。舛𐲋Ⴝ;       [B5 P1 V6];     [B5 P1 V6]\r
++B;    싇。舛𐲋Ⴝ; [B5 P1 V6];     [B5 P1 V6]\r
++B;    싇。舛𐲋ⴝ; [B5];   [B5]\r
++B;    싇。舛𐲋ⴝ;       [B5];   [B5]\r
++B;    xn--9u4b.xn--llj123yh74e;       [B5];   [B5]\r
++B;    xn--9u4b.xn--1nd7519ch79d;      [B5 V6];        [B5 V6]\r
++B;    싇。⾇𐳋ⴝ; [B5];   [B5]\r
++B;    싇。⾇𐳋ⴝ;       [B5];   [B5]\r
++B;    싇。⾇𐲋Ⴝ;       [B5 P1 V6];     [B5 P1 V6]\r
++B;    싇。⾇𐲋Ⴝ; [B5 P1 V6];     [B5 P1 V6]\r
++B;    싇。⾇𐲋ⴝ; [B5];   [B5]\r
++B;    싇。⾇𐲋ⴝ;       [B5];   [B5]\r
++T;    𐹠ς。\u200C\u06BFჀ;       [B1 C1 P1 V6];  [B1 B2 B3 P1 V6]        #       𐹠ς.ڿჀ\r
++N;    𐹠ς。\u200C\u06BFჀ;       [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹠ς.ڿჀ\r
++T;    𐹠ς。\u200C\u06BFⴠ;       [B1 C1];        [B1 B2 B3]      #       𐹠ς.ڿⴠ\r
++N;    𐹠ς。\u200C\u06BFⴠ;       [B1 C1];        [B1 C1] #       𐹠ς.ڿⴠ\r
++T;    𐹠Σ。\u200C\u06BFჀ;       [B1 C1 P1 V6];  [B1 B2 B3 P1 V6]        #       𐹠σ.ڿჀ\r
++N;    𐹠Σ。\u200C\u06BFჀ;       [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       𐹠σ.ڿჀ\r
++T;    𐹠σ。\u200C\u06BFⴠ;       [B1 C1];        [B1 B2 B3]      #       𐹠σ.ڿⴠ\r
++N;    𐹠σ。\u200C\u06BFⴠ;       [B1 C1];        [B1 C1] #       𐹠σ.ڿⴠ\r
++B;    xn--4xa9167k.xn--ykb467q;       [B1 B2 B3];     [B1 B2 B3]      #       𐹠σ.ڿⴠ\r
++B;    xn--4xa9167k.xn--ykb760k9hj;    [B1 C1];        [B1 C1] #       𐹠σ.ڿⴠ\r
++B;    xn--4xa9167k.xn--ykb632c;       [B1 B2 B3 V6];  [B1 B2 B3 V6]   #       𐹠σ.ڿჀ\r
++B;    xn--4xa9167k.xn--ykb632cvxm;    [B1 C1 V6];     [B1 C1 V6]      #       𐹠σ.ڿჀ\r
++B;    xn--3xa1267k.xn--ykb760k9hj;    [B1 C1];        [B1 C1] #       𐹠ς.ڿⴠ\r
++B;    xn--3xa1267k.xn--ykb632cvxm;    [B1 C1 V6];     [B1 C1 V6]      #       𐹠ς.ڿჀ\r
++T;    򇒐\u200C\u0604.\u069A-ß;     [B2 B3 B5 B6 C1 P1 V6]; [B2 B3 B5 B6 P1 V6]     #       .ښ-ß\r
++N;    򇒐\u200C\u0604.\u069A-ß;     [B2 B3 B5 B6 C1 P1 V6]; [B2 B3 B5 B6 C1 P1 V6]  #       .ښ-ß\r
++T;    򇒐\u200C\u0604.\u069A-SS;     [B2 B3 B5 B6 C1 P1 V6]; [B2 B3 B5 B6 P1 V6]     #       .ښ-ss\r
++N;    򇒐\u200C\u0604.\u069A-SS;     [B2 B3 B5 B6 C1 P1 V6]; [B2 B3 B5 B6 C1 P1 V6]  #       .ښ-ss\r
++T;    򇒐\u200C\u0604.\u069A-ss;     [B2 B3 B5 B6 C1 P1 V6]; [B2 B3 B5 B6 P1 V6]     #       .ښ-ss\r
++N;    򇒐\u200C\u0604.\u069A-ss;     [B2 B3 B5 B6 C1 P1 V6]; [B2 B3 B5 B6 C1 P1 V6]  #       .ښ-ss\r
++T;    򇒐\u200C\u0604.\u069A-Ss;     [B2 B3 B5 B6 C1 P1 V6]; [B2 B3 B5 B6 P1 V6]     #       .ښ-ss\r
++N;    򇒐\u200C\u0604.\u069A-Ss;     [B2 B3 B5 B6 C1 P1 V6]; [B2 B3 B5 B6 C1 P1 V6]  #       .ښ-ss\r
++B;    xn--mfb98261i.xn---ss-sdf;      [B2 B3 B5 B6 V6];       [B2 B3 B5 B6 V6]        #       .ښ-ss\r
++B;    xn--mfb144kqo32m.xn---ss-sdf;   [B2 B3 B5 B6 C1 V6];    [B2 B3 B5 B6 C1 V6]     #       .ښ-ss\r
++B;    xn--mfb144kqo32m.xn----qfa315b; [B2 B3 B5 B6 C1 V6];    [B2 B3 B5 B6 C1 V6]     #       .ښ-ß\r
++T;    \u200C\u200D\u17B5\u067A.-\uFBB0󅄞𐸚;       [B1 C1 C2 P1 V3 V6];    [B1 P1 V3 V5 V6]        #       ٺ.-ۓ\r
++N;    \u200C\u200D\u17B5\u067A.-\uFBB0󅄞𐸚;       [B1 C1 C2 P1 V3 V6];    [B1 C1 C2 P1 V3 V6]     #       ٺ.-ۓ\r
++T;    \u200C\u200D\u17B5\u067A.-\u06D3󅄞𐸚;       [B1 C1 C2 P1 V3 V6];    [B1 P1 V3 V5 V6]        #       ٺ.-ۓ\r
++N;    \u200C\u200D\u17B5\u067A.-\u06D3󅄞𐸚;       [B1 C1 C2 P1 V3 V6];    [B1 C1 C2 P1 V3 V6]     #       ٺ.-ۓ\r
++T;    \u200C\u200D\u17B5\u067A.-\u06D2\u0654󅄞𐸚; [B1 C1 C2 P1 V3 V6];    [B1 P1 V3 V5 V6]        #       ٺ.-ۓ\r
++N;    \u200C\u200D\u17B5\u067A.-\u06D2\u0654󅄞𐸚; [B1 C1 C2 P1 V3 V6];    [B1 C1 C2 P1 V3 V6]     #       ٺ.-ۓ\r
++B;    xn--zib539f.xn----twc1133r17r6g;        [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       ٺ.-ۓ\r
++B;    xn--zib539f8igea.xn----twc1133r17r6g;   [B1 C1 C2 V3 V6];       [B1 C1 C2 V3 V6]        #       ٺ.-ۓ\r
++B;    򡶱。𐮬≠; [B3 P1 V6];     [B3 P1 V6]\r
++B;    򡶱。𐮬=\u0338;     [B3 P1 V6];     [B3 P1 V6]\r
++B;    򡶱。𐮬≠; [B3 P1 V6];     [B3 P1 V6]\r
++B;    򡶱。𐮬=\u0338;     [B3 P1 V6];     [B3 P1 V6]\r
++B;    xn--dd55c.xn--1ch3003g; [B3 V6];        [B3 V6]\r
++B;    \u0FB2𞶅。𐹮𐹷덝۵;     [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ྲ.𐹮𐹷덝۵\r
++B;    \u0FB2𞶅。𐹮𐹷덝۵;       [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ྲ.𐹮𐹷덝۵\r
++B;    \u0FB2𞶅。𐹮𐹷덝۵;     [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ྲ.𐹮𐹷덝۵\r
++B;    \u0FB2𞶅。𐹮𐹷덝۵;       [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ྲ.𐹮𐹷덝۵\r
++B;    xn--fgd0675v.xn--imb5839fidpcbba;       [B1 V5 V6];     [B1 V5 V6]      #       ྲ.𐹮𐹷덝۵\r
++T;    Ⴏ󠅋-.\u200DႩ;   [C2 P1 V3 V6];  [P1 V3 V6]      #       Ⴏ-.Ⴉ\r
++N;    Ⴏ󠅋-.\u200DႩ;   [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       Ⴏ-.Ⴉ\r
++T;    Ⴏ󠅋-.\u200DႩ;     [C2 P1 V3 V6];  [P1 V3 V6]      #       Ⴏ-.Ⴉ\r
++N;    Ⴏ󠅋-.\u200DႩ;     [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       Ⴏ-.Ⴉ\r
++T;    ⴏ󠅋-.\u200Dⴉ;     [C2 V3];        [V3]    #       ⴏ-.ⴉ\r
++N;    ⴏ󠅋-.\u200Dⴉ;     [C2 V3];        [C2 V3] #       ⴏ-.ⴉ\r
++B;    xn----3vs.xn--0kj;      [V3];   [V3]\r
++B;    xn----3vs.xn--1ug532c;  [C2 V3];        [C2 V3] #       ⴏ-.ⴉ\r
++B;    xn----00g.xn--hnd;      [V3 V6];        [V3 V6]\r
++B;    xn----00g.xn--hnd399e;  [C2 V3 V6];     [C2 V3 V6]      #       Ⴏ-.Ⴉ\r
++T;    ⴏ󠅋-.\u200Dⴉ;   [C2 V3];        [V3]    #       ⴏ-.ⴉ\r
++N;    ⴏ󠅋-.\u200Dⴉ;   [C2 V3];        [C2 V3] #       ⴏ-.ⴉ\r
++B;    ⇧𐨏󠾈󯶅。\u0600󠈵󠆉;       [B1 P1 V6];     [B1 P1 V6]      #       ⇧𐨏.\r
++B;    xn--l8g5552g64t4g46xf.xn--ifb08144p;    [B1 V6];        [B1 V6] #       ⇧𐨏.\r
++B;    ≠𐮂.↑🄇⒈;     [B1 P1 V6];     [B1 P1 V6]\r
++B;    =\u0338𐮂.↑🄇⒈; [B1 P1 V6];     [B1 P1 V6]\r
++B;    ≠𐮂.↑6,1.;        [B1 P1 V6];     [B1 P1 V6]\r
++B;    =\u0338𐮂.↑6,1.;    [B1 P1 V6];     [B1 P1 V6]\r
++B;    xn--1chy492g.xn--6,1-pw1a.;     [B1 P1 V6];     [B1 P1 V6]\r
++B;    xn--1chy492g.xn--45gx9iuy44d;   [B1 V6];        [B1 V6]\r
++T;    𝩏󠲉ß.ᢤ򄦌\u200C𐹫;   [B1 B5 B6 C1 P1 V5 V6]; [B1 B5 B6 P1 V5 V6]     #       𝩏ß.ᢤ𐹫\r
++N;    𝩏󠲉ß.ᢤ򄦌\u200C𐹫;   [B1 B5 B6 C1 P1 V5 V6]; [B1 B5 B6 C1 P1 V5 V6]  #       𝩏ß.ᢤ𐹫\r
++T;    𝩏󠲉SS.ᢤ򄦌\u200C𐹫;   [B1 B5 B6 C1 P1 V5 V6]; [B1 B5 B6 P1 V5 V6]     #       𝩏ss.ᢤ𐹫\r
++N;    𝩏󠲉SS.ᢤ򄦌\u200C𐹫;   [B1 B5 B6 C1 P1 V5 V6]; [B1 B5 B6 C1 P1 V5 V6]  #       𝩏ss.ᢤ𐹫\r
++T;    𝩏󠲉ss.ᢤ򄦌\u200C𐹫;   [B1 B5 B6 C1 P1 V5 V6]; [B1 B5 B6 P1 V5 V6]     #       𝩏ss.ᢤ𐹫\r
++N;    𝩏󠲉ss.ᢤ򄦌\u200C𐹫;   [B1 B5 B6 C1 P1 V5 V6]; [B1 B5 B6 C1 P1 V5 V6]  #       𝩏ss.ᢤ𐹫\r
++T;    𝩏󠲉Ss.ᢤ򄦌\u200C𐹫;   [B1 B5 B6 C1 P1 V5 V6]; [B1 B5 B6 P1 V5 V6]     #       𝩏ss.ᢤ𐹫\r
++N;    𝩏󠲉Ss.ᢤ򄦌\u200C𐹫;   [B1 B5 B6 C1 P1 V5 V6]; [B1 B5 B6 C1 P1 V5 V6]  #       𝩏ss.ᢤ𐹫\r
++B;    xn--ss-zb11ap1427e.xn--ubf2596jbt61c;   [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]\r
++B;    xn--ss-zb11ap1427e.xn--ubf609atw1tynn3d;        [B1 B5 B6 C1 V5 V6];    [B1 B5 B6 C1 V5 V6]     #       𝩏ss.ᢤ𐹫\r
++B;    xn--zca3153vupz3e.xn--ubf609atw1tynn3d; [B1 B5 B6 C1 V5 V6];    [B1 B5 B6 C1 V5 V6]     #       𝩏ß.ᢤ𐹫\r
++T;    ß𐵳񗘁Ⴇ。\uA67A; [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ßႧ.ꙺ\r
++N;    ß𐵳񗘁Ⴇ。\uA67A; [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ßႧ.ꙺ\r
++T;    ß𐵳񗘁Ⴇ。\uA67A; [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ßႧ.ꙺ\r
++N;    ß𐵳񗘁Ⴇ。\uA67A; [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ßႧ.ꙺ\r
++T;    ß𐵳񗘁ⴇ。\uA67A; [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ßⴇ.ꙺ\r
++N;    ß𐵳񗘁ⴇ。\uA67A; [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ßⴇ.ꙺ\r
++B;    SS𐵳񗘁Ⴇ。\uA67A; [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ssႧ.ꙺ\r
++B;    ss𐵳񗘁ⴇ。\uA67A; [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ssⴇ.ꙺ\r
++B;    Ss𐵳񗘁Ⴇ。\uA67A; [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ssႧ.ꙺ\r
++B;    xn--ss-rek7420r4hs7b.xn--9x8a;  [B1 B3 B5 B6 V5 V6];    [B1 B3 B5 B6 V5 V6]     #       ssႧ.ꙺ\r
++B;    xn--ss-e61ar955h4hs7b.xn--9x8a; [B1 B3 B5 B6 V5 V6];    [B1 B3 B5 B6 V5 V6]     #       ssⴇ.ꙺ\r
++B;    xn--zca227tpy4lkns1b.xn--9x8a;  [B1 B3 B5 B6 V5 V6];    [B1 B3 B5 B6 V5 V6]     #       ßⴇ.ꙺ\r
++B;    xn--zca491fci5qkn79a.xn--9x8a;  [B1 B3 B5 B6 V5 V6];    [B1 B3 B5 B6 V5 V6]     #       ßႧ.ꙺ\r
++T;    ß𐵳񗘁ⴇ。\uA67A; [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ßⴇ.ꙺ\r
++N;    ß𐵳񗘁ⴇ。\uA67A; [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ßⴇ.ꙺ\r
++B;    SS𐵳񗘁Ⴇ。\uA67A; [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ssႧ.ꙺ\r
++B;    ss𐵳񗘁ⴇ。\uA67A; [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ssⴇ.ꙺ\r
++B;    Ss𐵳񗘁Ⴇ。\uA67A; [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       ssႧ.ꙺ\r
++B;    \u1714。󠆣-𑋪;     [V3 V5];        [V3 V5] #       ᜔.-𑋪\r
++B;    xn--fze.xn----ly8i;     [V3 V5];        [V3 V5] #       ᜔.-𑋪\r
++T;    \uABE8-.򨏜\u05BDß; [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       ꯨ-.ֽß\r
++N;    \uABE8-.򨏜\u05BDß; [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       ꯨ-.ֽß\r
++T;    \uABE8-.򨏜\u05BDß;   [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       ꯨ-.ֽß\r
++N;    \uABE8-.򨏜\u05BDß;   [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       ꯨ-.ֽß\r
++B;    \uABE8-.򨏜\u05BDSS;   [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       ꯨ-.ֽss\r
++B;    \uABE8-.򨏜\u05BDss;   [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       ꯨ-.ֽss\r
++B;    \uABE8-.򨏜\u05BDSs;   [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       ꯨ-.ֽss\r
++B;    xn----pw5e.xn--ss-7jd10716y;    [V3 V5 V6];     [V3 V5 V6]      #       ꯨ-.ֽss\r
++B;    xn----pw5e.xn--zca50wfv060a;    [V3 V5 V6];     [V3 V5 V6]      #       ꯨ-.ֽß\r
++B;    \uABE8-.򨏜\u05BDSS; [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       ꯨ-.ֽss\r
++B;    \uABE8-.򨏜\u05BDss; [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       ꯨ-.ֽss\r
++B;    \uABE8-.򨏜\u05BDSs; [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       ꯨ-.ֽss\r
++B;    ᡓ-≮。\u066B󠅱ᡄ;        [B1 B6 P1 V6];  [B1 B6 P1 V6]   #       ᡓ-≮.٫ᡄ\r
++B;    ᡓ-<\u0338。\u066B󠅱ᡄ;    [B1 B6 P1 V6];  [B1 B6 P1 V6]   #       ᡓ-≮.٫ᡄ\r
++B;    xn----s7j866c.xn--kib252g;      [B1 B6 V6];     [B1 B6 V6]      #       ᡓ-≮.٫ᡄ\r
++B;    𝟥♮𑜫\u08ED.\u17D2𑜫8󠆏;    [V5];   [V5]    #       3♮𑜫࣭.្𑜫8\r
++B;    3♮𑜫\u08ED.\u17D2𑜫8󠆏; [V5];   [V5]    #       3♮𑜫࣭.្𑜫8\r
++B;    xn--3-ksd277tlo7s.xn--8-f0jx021l;       [V5];   [V5]    #       3♮𑜫࣭.្𑜫8\r
++T;    -。򕌀\u200D❡;      [C2 P1 V3 V6];  [P1 V3 V6]      #       -.❡\r
++N;    -。򕌀\u200D❡;      [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       -.❡\r
++T;    -。򕌀\u200D❡;      [C2 P1 V3 V6];  [P1 V3 V6]      #       -.❡\r
++N;    -。򕌀\u200D❡;      [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       -.❡\r
++B;    -.xn--nei54421f;        [V3 V6];        [V3 V6]\r
++B;    -.xn--1ug800aq795s;     [C2 V3 V6];     [C2 V3 V6]      #       -.❡\r
++B;    𝟓☱𝟐򥰵。𝪮񐡳;     [P1 V5 V6];     [P1 V5 V6]\r
++B;    5☱2򥰵。𝪮񐡳;   [P1 V5 V6];     [P1 V5 V6]\r
++B;    xn--52-dwx47758j.xn--kd3hk431k; [V5 V6];        [V5 V6]\r
++B;    -.-├򖦣;     [P1 V3 V6];     [P1 V3 V6]\r
++B;    -.xn----ukp70432h;      [V3 V6];        [V3 V6]\r
++T;    \u05A5\u076D。\u200D󠀘;      [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       ֥ݭ.\r
++N;    \u05A5\u076D。\u200D󠀘;      [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       ֥ݭ.\r
++T;    \u05A5\u076D。\u200D󠀘;      [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       ֥ݭ.\r
++N;    \u05A5\u076D。\u200D󠀘;      [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       ֥ݭ.\r
++B;    xn--wcb62g.xn--p526e;   [B1 V5 V6];     [B1 V5 V6]      #       ֥ݭ.\r
++B;    xn--wcb62g.xn--1ugy8001l;       [B1 C2 V5 V6];  [B1 C2 V5 V6]   #       ֥ݭ.\r
++T;    쥥󔏉Ⴎ.\u200C⒈⒈𐫒;  [B1 C1 P1 V6];  [B1 P1 V6]      #       쥥Ⴎ.⒈⒈𐫒\r
++N;    쥥󔏉Ⴎ.\u200C⒈⒈𐫒;  [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       쥥Ⴎ.⒈⒈𐫒\r
++T;    쥥󔏉Ⴎ.\u200C⒈⒈𐫒;    [B1 C1 P1 V6];  [B1 P1 V6]      #       쥥Ⴎ.⒈⒈𐫒\r
++N;    쥥󔏉Ⴎ.\u200C⒈⒈𐫒;    [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       쥥Ⴎ.⒈⒈𐫒\r
++T;    쥥󔏉Ⴎ.\u200C1.1.𐫒;      [B1 C1 P1 V6];  [B1 P1 V6]      #       쥥Ⴎ.1.1.𐫒\r
++N;    쥥󔏉Ⴎ.\u200C1.1.𐫒;      [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       쥥Ⴎ.1.1.𐫒\r
++T;    쥥󔏉Ⴎ.\u200C1.1.𐫒;        [B1 C1 P1 V6];  [B1 P1 V6]      #       쥥Ⴎ.1.1.𐫒\r
++N;    쥥󔏉Ⴎ.\u200C1.1.𐫒;        [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       쥥Ⴎ.1.1.𐫒\r
++T;    쥥󔏉ⴎ.\u200C1.1.𐫒;        [B1 C1 P1 V6];  [B1 P1 V6]      #       쥥ⴎ.1.1.𐫒\r
++N;    쥥󔏉ⴎ.\u200C1.1.𐫒;        [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       쥥ⴎ.1.1.𐫒\r
++T;    쥥󔏉ⴎ.\u200C1.1.𐫒;      [B1 C1 P1 V6];  [B1 P1 V6]      #       쥥ⴎ.1.1.𐫒\r
++N;    쥥󔏉ⴎ.\u200C1.1.𐫒;      [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       쥥ⴎ.1.1.𐫒\r
++B;    xn--5kj3511ccyw3h.1.1.xn--7w9c; [B1 V6];        [B1 V6]\r
++B;    xn--5kj3511ccyw3h.xn--1-rgn.1.xn--7w9c; [B1 C1 V6];     [B1 C1 V6]      #       쥥ⴎ.1.1.𐫒\r
++B;    xn--mnd7865gcy28g.1.1.xn--7w9c; [B1 V6];        [B1 V6]\r
++B;    xn--mnd7865gcy28g.xn--1-rgn.1.xn--7w9c; [B1 C1 V6];     [B1 C1 V6]      #       쥥Ⴎ.1.1.𐫒\r
++T;    쥥󔏉ⴎ.\u200C⒈⒈𐫒;    [B1 C1 P1 V6];  [B1 P1 V6]      #       쥥ⴎ.⒈⒈𐫒\r
++N;    쥥󔏉ⴎ.\u200C⒈⒈𐫒;    [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       쥥ⴎ.⒈⒈𐫒\r
++T;    쥥󔏉ⴎ.\u200C⒈⒈𐫒;  [B1 C1 P1 V6];  [B1 P1 V6]      #       쥥ⴎ.⒈⒈𐫒\r
++N;    쥥󔏉ⴎ.\u200C⒈⒈𐫒;  [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       쥥ⴎ.⒈⒈𐫒\r
++B;    xn--5kj3511ccyw3h.xn--tsha6797o;        [B1 V6];        [B1 V6]\r
++B;    xn--5kj3511ccyw3h.xn--0ug88oa0396u;     [B1 C1 V6];     [B1 C1 V6]      #       쥥ⴎ.⒈⒈𐫒\r
++B;    xn--mnd7865gcy28g.xn--tsha6797o;        [B1 V6];        [B1 V6]\r
++B;    xn--mnd7865gcy28g.xn--0ug88oa0396u;     [B1 C1 V6];     [B1 C1 V6]      #       쥥Ⴎ.⒈⒈𐫒\r
++B;    \u0827𝟶\u06A0-。𑄳;       [B1 B3 B6 V3 V5];       [B1 B3 B6 V3 V5]        #       ࠧ0ڠ-.𑄳\r
++B;    \u08270\u06A0-。𑄳;  [B1 B3 B6 V3 V5];       [B1 B3 B6 V3 V5]        #       ࠧ0ڠ-.𑄳\r
++B;    xn--0--p3d67m.xn--v80d; [B1 B3 B6 V3 V5];       [B1 B3 B6 V3 V5]        #       ࠧ0ڠ-.𑄳\r
++T;    ς.\uFDC1🞛⒈;     [P1 V6];        [P1 V6] #       ς.فمي🞛⒈\r
++N;    ς.\uFDC1🞛⒈;     [P1 V6];        [P1 V6] #       ς.فمي🞛⒈\r
++T;    ς.\u0641\u0645\u064A🞛1.;    ;       xn--4xa.xn--1-gocmu97674d.;     NV8     #       ς.فمي🞛1.\r
++N;    ς.\u0641\u0645\u064A🞛1.;    ;       xn--3xa.xn--1-gocmu97674d.;     NV8     #       ς.فمي🞛1.\r
++B;    Σ.\u0641\u0645\u064A🞛1.;    σ.\u0641\u0645\u064A🞛1.;    xn--4xa.xn--1-gocmu97674d.;     NV8     #       σ.فمي🞛1.\r
++B;    σ.\u0641\u0645\u064A🞛1.;    ;       xn--4xa.xn--1-gocmu97674d.;     NV8     #       σ.فمي🞛1.\r
++B;    xn--4xa.xn--1-gocmu97674d.;     σ.\u0641\u0645\u064A🞛1.;    xn--4xa.xn--1-gocmu97674d.;     NV8     #       σ.فمي🞛1.\r
++B;    xn--3xa.xn--1-gocmu97674d.;     ς.\u0641\u0645\u064A🞛1.;    xn--3xa.xn--1-gocmu97674d.;     NV8     #       ς.فمي🞛1.\r
++B;    Σ.\uFDC1🞛⒈;     [P1 V6];        [P1 V6] #       σ.فمي🞛⒈\r
++B;    σ.\uFDC1🞛⒈;     [P1 V6];        [P1 V6] #       σ.فمي🞛⒈\r
++B;    xn--4xa.xn--dhbip2802atb20c;    [V6];   [V6]    #       σ.فمي🞛⒈\r
++B;    xn--3xa.xn--dhbip2802atb20c;    [V6];   [V6]    #       ς.فمي🞛⒈\r
++B;    🗩-。𐹻󐞆񥉮;   [B1 P1 V3 V6];  [B1 P1 V3 V6]\r
++B;    🗩-。𐹻󐞆񥉮;   [B1 P1 V3 V6];  [B1 P1 V3 V6]\r
++B;    xn----6t3s.xn--zo0d4811u6ru6a;  [B1 V3 V6];     [B1 V3 V6]\r
++T;    𐡜-🔪。𝟻\u200C𐿀;     [B1 B3 C1 P1 V6];       [B1 B3 P1 V6]   #       𐡜-🔪.5\r
++N;    𐡜-🔪。𝟻\u200C𐿀;     [B1 B3 C1 P1 V6];       [B1 B3 C1 P1 V6]        #       𐡜-🔪.5\r
++T;    𐡜-🔪。5\u200C𐿀;        [B1 B3 C1 P1 V6];       [B1 B3 P1 V6]   #       𐡜-🔪.5\r
++N;    𐡜-🔪。5\u200C𐿀;        [B1 B3 C1 P1 V6];       [B1 B3 C1 P1 V6]        #       𐡜-🔪.5\r
++B;    xn----5j4iv089c.xn--5-bn7i;     [B1 B3 V6];     [B1 B3 V6]\r
++B;    xn----5j4iv089c.xn--5-sgn7149h; [B1 B3 C1 V6];  [B1 B3 C1 V6]   #       𐡜-🔪.5\r
++T;    𐹣늿\u200Dß.\u07CF0\u05BC;        [B1 C2];        [B1]    #       𐹣늿ß.ߏ0ּ\r
++N;    𐹣늿\u200Dß.\u07CF0\u05BC;        [B1 C2];        [B1 C2] #       𐹣늿ß.ߏ0ּ\r
++T;    𐹣늿\u200Dß.\u07CF0\u05BC;  [B1 C2];        [B1]    #       𐹣늿ß.ߏ0ּ\r
++N;    𐹣늿\u200Dß.\u07CF0\u05BC;  [B1 C2];        [B1 C2] #       𐹣늿ß.ߏ0ּ\r
++T;    𐹣늿\u200Dß.\u07CF0\u05BC;  [B1 C2];        [B1]    #       𐹣늿ß.ߏ0ּ\r
++N;    𐹣늿\u200Dß.\u07CF0\u05BC;  [B1 C2];        [B1 C2] #       𐹣늿ß.ߏ0ּ\r
++T;    𐹣늿\u200Dß.\u07CF0\u05BC;    [B1 C2];        [B1]    #       𐹣늿ß.ߏ0ּ\r
++N;    𐹣늿\u200Dß.\u07CF0\u05BC;    [B1 C2];        [B1 C2] #       𐹣늿ß.ߏ0ּ\r
++T;    𐹣늿\u200DSS.\u07CF0\u05BC;    [B1 C2];        [B1]    #       𐹣늿ss.ߏ0ּ\r
++N;    𐹣늿\u200DSS.\u07CF0\u05BC;    [B1 C2];        [B1 C2] #       𐹣늿ss.ߏ0ּ\r
++T;    𐹣늿\u200DSS.\u07CF0\u05BC;  [B1 C2];        [B1]    #       𐹣늿ss.ߏ0ּ\r
++N;    𐹣늿\u200DSS.\u07CF0\u05BC;  [B1 C2];        [B1 C2] #       𐹣늿ss.ߏ0ּ\r
++T;    𐹣늿\u200Dss.\u07CF0\u05BC;  [B1 C2];        [B1]    #       𐹣늿ss.ߏ0ּ\r
++N;    𐹣늿\u200Dss.\u07CF0\u05BC;  [B1 C2];        [B1 C2] #       𐹣늿ss.ߏ0ּ\r
++T;    𐹣늿\u200Dss.\u07CF0\u05BC;    [B1 C2];        [B1]    #       𐹣늿ss.ߏ0ּ\r
++N;    𐹣늿\u200Dss.\u07CF0\u05BC;    [B1 C2];        [B1 C2] #       𐹣늿ss.ߏ0ּ\r
++T;    𐹣늿\u200DSs.\u07CF0\u05BC;    [B1 C2];        [B1]    #       𐹣늿ss.ߏ0ּ\r
++N;    𐹣늿\u200DSs.\u07CF0\u05BC;    [B1 C2];        [B1 C2] #       𐹣늿ss.ߏ0ּ\r
++T;    𐹣늿\u200DSs.\u07CF0\u05BC;  [B1 C2];        [B1]    #       𐹣늿ss.ߏ0ּ\r
++N;    𐹣늿\u200DSs.\u07CF0\u05BC;  [B1 C2];        [B1 C2] #       𐹣늿ss.ߏ0ּ\r
++B;    xn--ss-i05i7041a.xn--0-vgc50n;  [B1];   [B1]    #       𐹣늿ss.ߏ0ּ\r
++B;    xn--ss-l1tu910fo0xd.xn--0-vgc50n;       [B1 C2];        [B1 C2] #       𐹣늿ss.ߏ0ּ\r
++B;    xn--zca770n5s4hev6c.xn--0-vgc50n;       [B1 C2];        [B1 C2] #       𐹣늿ß.ߏ0ּ\r
++T;    𐹣늿\u200DSS.\u07CF0\u05BC;  [B1 C2];        [B1]    #       𐹣늿ss.ߏ0ּ\r
++N;    𐹣늿\u200DSS.\u07CF0\u05BC;  [B1 C2];        [B1 C2] #       𐹣늿ss.ߏ0ּ\r
++T;    𐹣늿\u200DSS.\u07CF0\u05BC;        [B1 C2];        [B1]    #       𐹣늿ss.ߏ0ּ\r
++N;    𐹣늿\u200DSS.\u07CF0\u05BC;        [B1 C2];        [B1 C2] #       𐹣늿ss.ߏ0ּ\r
++T;    𐹣늿\u200Dss.\u07CF0\u05BC;        [B1 C2];        [B1]    #       𐹣늿ss.ߏ0ּ\r
++N;    𐹣늿\u200Dss.\u07CF0\u05BC;        [B1 C2];        [B1 C2] #       𐹣늿ss.ߏ0ּ\r
++T;    𐹣늿\u200Dss.\u07CF0\u05BC;  [B1 C2];        [B1]    #       𐹣늿ss.ߏ0ּ\r
++N;    𐹣늿\u200Dss.\u07CF0\u05BC;  [B1 C2];        [B1 C2] #       𐹣늿ss.ߏ0ּ\r
++T;    𐹣늿\u200DSs.\u07CF0\u05BC;  [B1 C2];        [B1]    #       𐹣늿ss.ߏ0ּ\r
++N;    𐹣늿\u200DSs.\u07CF0\u05BC;  [B1 C2];        [B1 C2] #       𐹣늿ss.ߏ0ּ\r
++T;    𐹣늿\u200DSs.\u07CF0\u05BC;        [B1 C2];        [B1]    #       𐹣늿ss.ߏ0ּ\r
++N;    𐹣늿\u200DSs.\u07CF0\u05BC;        [B1 C2];        [B1 C2] #       𐹣늿ss.ߏ0ּ\r
++B;    9󠇥.󪴴ᢓ;        [P1 V6];        [P1 V6]\r
++B;    9󠇥.󪴴ᢓ;  [P1 V6];        [P1 V6]\r
++B;    9.xn--dbf91222q;        [V6];   [V6]\r
++T;    \u200C\uFFA0.𐫭🠗ß⽟;     [B1 B2 B3 C1 P1 V6];    [B2 B3 P1 V6]   #       .𐫭🠗ß玉\r
++N;    \u200C\uFFA0.𐫭🠗ß⽟;     [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       .𐫭🠗ß玉\r
++T;    \u200C\u1160.𐫭🠗ß玉;     [B1 B2 B3 C1 P1 V6];    [B2 B3 P1 V6]   #       .𐫭🠗ß玉\r
++N;    \u200C\u1160.𐫭🠗ß玉;     [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       .𐫭🠗ß玉\r
++T;    \u200C\u1160.𐫭🠗SS玉;     [B1 B2 B3 C1 P1 V6];    [B2 B3 P1 V6]   #       .𐫭🠗ss玉\r
++N;    \u200C\u1160.𐫭🠗SS玉;     [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       .𐫭🠗ss玉\r
++T;    \u200C\u1160.𐫭🠗ss玉;     [B1 B2 B3 C1 P1 V6];    [B2 B3 P1 V6]   #       .𐫭🠗ss玉\r
++N;    \u200C\u1160.𐫭🠗ss玉;     [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       .𐫭🠗ss玉\r
++T;    \u200C\u1160.𐫭🠗Ss玉;     [B1 B2 B3 C1 P1 V6];    [B2 B3 P1 V6]   #       .𐫭🠗ss玉\r
++N;    \u200C\u1160.𐫭🠗Ss玉;     [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       .𐫭🠗ss玉\r
++B;    xn--psd.xn--ss-je6eq954cp25j;   [B2 B3 V6];     [B2 B3 V6]      #       .𐫭🠗ss玉\r
++B;    xn--psd526e.xn--ss-je6eq954cp25j;       [B1 B2 B3 C1 V6];       [B1 B2 B3 C1 V6]        #       .𐫭🠗ss玉\r
++B;    xn--psd526e.xn--zca2289c550e0iwi;       [B1 B2 B3 C1 V6];       [B1 B2 B3 C1 V6]        #       .𐫭🠗ß玉\r
++T;    \u200C\uFFA0.𐫭🠗SS⽟;     [B1 B2 B3 C1 P1 V6];    [B2 B3 P1 V6]   #       .𐫭🠗ss玉\r
++N;    \u200C\uFFA0.𐫭🠗SS⽟;     [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       .𐫭🠗ss玉\r
++T;    \u200C\uFFA0.𐫭🠗ss⽟;     [B1 B2 B3 C1 P1 V6];    [B2 B3 P1 V6]   #       .𐫭🠗ss玉\r
++N;    \u200C\uFFA0.𐫭🠗ss⽟;     [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       .𐫭🠗ss玉\r
++T;    \u200C\uFFA0.𐫭🠗Ss⽟;     [B1 B2 B3 C1 P1 V6];    [B2 B3 P1 V6]   #       .𐫭🠗ss玉\r
++N;    \u200C\uFFA0.𐫭🠗Ss⽟;     [B1 B2 B3 C1 P1 V6];    [B1 B2 B3 C1 P1 V6]     #       .𐫭🠗ss玉\r
++B;    xn--cl7c.xn--ss-je6eq954cp25j;  [B2 B3 V6];     [B2 B3 V6]      #       .𐫭🠗ss玉\r
++B;    xn--0ug7719f.xn--ss-je6eq954cp25j;      [B1 B2 B3 C1 V6];       [B1 B2 B3 C1 V6]        #       .𐫭🠗ss玉\r
++B;    xn--0ug7719f.xn--zca2289c550e0iwi;      [B1 B2 B3 C1 V6];       [B1 B2 B3 C1 V6]        #       .𐫭🠗ß玉\r
++T;    ︒Ⴖ\u0366.\u200C;  [C1 P1 V6];     [P1 V6] #       ︒Ⴖͦ.\r
++N;    ︒Ⴖ\u0366.\u200C;  [C1 P1 V6];     [C1 P1 V6]      #       ︒Ⴖͦ.\r
++T;    。Ⴖ\u0366.\u200C;    [C1 P1 V6 A4_2];        [P1 V6 A4_2]    #       .Ⴖͦ.\r
++N;    。Ⴖ\u0366.\u200C;    [C1 P1 V6 A4_2];        [C1 P1 V6 A4_2] #       .Ⴖͦ.\r
++T;    。ⴖ\u0366.\u200C;    [C1 A4_2];      [A4_2]  #       .ⴖͦ.\r
++N;    。ⴖ\u0366.\u200C;    [C1 A4_2];      [C1 A4_2]       #       .ⴖͦ.\r
++B;    .xn--hva754s.;  [A4_2]; [A4_2]  #       .ⴖͦ.\r
++B;    .xn--hva754s.xn--0ug;   [C1 A4_2];      [C1 A4_2]       #       .ⴖͦ.\r
++B;    .xn--hva929d.;  [V6 A4_2];      [V6 A4_2]       #       .Ⴖͦ.\r
++B;    .xn--hva929d.xn--0ug;   [C1 V6 A4_2];   [C1 V6 A4_2]    #       .Ⴖͦ.\r
++T;    ︒ⴖ\u0366.\u200C;  [C1 P1 V6];     [P1 V6] #       ︒ⴖͦ.\r
++N;    ︒ⴖ\u0366.\u200C;  [C1 P1 V6];     [C1 P1 V6]      #       ︒ⴖͦ.\r
++B;    xn--hva754sy94k.;       [V6];   [V6]    #       ︒ⴖͦ.\r
++B;    xn--hva754sy94k.xn--0ug;        [C1 V6];        [C1 V6] #       ︒ⴖͦ.\r
++B;    xn--hva929dl29p.;       [V6];   [V6]    #       ︒Ⴖͦ.\r
++B;    xn--hva929dl29p.xn--0ug;        [C1 V6];        [C1 V6] #       ︒Ⴖͦ.\r
++B;    xn--hva754s.;   ⴖ\u0366.;     xn--hva754s.    #       ⴖͦ.\r
++B;    ⴖ\u0366.;     ;       xn--hva754s.    #       ⴖͦ.\r
++B;    Ⴖ\u0366.;     [P1 V6];        [P1 V6] #       Ⴖͦ.\r
++B;    xn--hva929d.;   [V6];   [V6]    #       Ⴖͦ.\r
++T;    \u08BB.\u200CႣ𞀒; [B1 C1 P1 V6];  [P1 V6] #       ࢻ.Ⴃ𞀒\r
++N;    \u08BB.\u200CႣ𞀒; [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ࢻ.Ⴃ𞀒\r
++T;    \u08BB.\u200CႣ𞀒;   [B1 C1 P1 V6];  [P1 V6] #       ࢻ.Ⴃ𞀒\r
++N;    \u08BB.\u200CႣ𞀒;   [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ࢻ.Ⴃ𞀒\r
++T;    \u08BB.\u200Cⴃ𞀒;   [B1 C1];        xn--hzb.xn--ukj4430l    #       ࢻ.ⴃ𞀒\r
++N;    \u08BB.\u200Cⴃ𞀒;   [B1 C1];        [B1 C1] #       ࢻ.ⴃ𞀒\r
++B;    xn--hzb.xn--ukj4430l;   \u08BB.ⴃ𞀒; xn--hzb.xn--ukj4430l    #       ࢻ.ⴃ𞀒\r
++B;    \u08BB.ⴃ𞀒; ;       xn--hzb.xn--ukj4430l    #       ࢻ.ⴃ𞀒\r
++B;    \u08BB.Ⴃ𞀒; [P1 V6];        [P1 V6] #       ࢻ.Ⴃ𞀒\r
++B;    xn--hzb.xn--bnd2938u;   [V6];   [V6]    #       ࢻ.Ⴃ𞀒\r
++B;    xn--hzb.xn--0ug822cp045a;       [B1 C1];        [B1 C1] #       ࢻ.ⴃ𞀒\r
++B;    xn--hzb.xn--bnd300f7225a;       [B1 C1 V6];     [B1 C1 V6]      #       ࢻ.Ⴃ𞀒\r
++T;    \u08BB.\u200Cⴃ𞀒; [B1 C1];        xn--hzb.xn--ukj4430l    #       ࢻ.ⴃ𞀒\r
++N;    \u08BB.\u200Cⴃ𞀒; [B1 C1];        [B1 C1] #       ࢻ.ⴃ𞀒\r
++T;    \u200D\u200C。2䫷󠧷;      [C1 C2 P1 V6];  [P1 V6 A4_2]    #       .2䫷\r
++N;    \u200D\u200C。2䫷󠧷;      [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       .2䫷\r
++T;    \u200D\u200C。2䫷󠧷;        [C1 C2 P1 V6];  [P1 V6 A4_2]    #       .2䫷\r
++N;    \u200D\u200C。2䫷󠧷;        [C1 C2 P1 V6];  [C1 C2 P1 V6]   #       .2䫷\r
++B;    .xn--2-me5ay1273i;      [V6 A4_2];      [V6 A4_2]\r
++B;    xn--0ugb.xn--2-me5ay1273i;      [C1 C2 V6];     [C1 C2 V6]      #       .2䫷\r
++B;    -𞀤󜠐。򈬖;       [P1 V3 V6];     [P1 V3 V6]\r
++B;    xn----rq4re4997d.xn--l707b;     [V3 V6];        [V3 V6]\r
++T;    󳛂︒\u200C㟀.\u0624⒈;   [C1 P1 V6];     [P1 V6] #       ︒㟀.ؤ⒈\r
++N;    󳛂︒\u200C㟀.\u0624⒈;   [C1 P1 V6];     [C1 P1 V6]      #       ︒㟀.ؤ⒈\r
++T;    󳛂︒\u200C㟀.\u0648\u0654⒈;     [C1 P1 V6];     [P1 V6] #       ︒㟀.ؤ⒈\r
++N;    󳛂︒\u200C㟀.\u0648\u0654⒈;     [C1 P1 V6];     [C1 P1 V6]      #       ︒㟀.ؤ⒈\r
++T;    󳛂。\u200C㟀.\u06241.;      [B1 C1 P1 V6];  [P1 V6] #       .㟀.ؤ1.\r
++N;    󳛂。\u200C㟀.\u06241.;      [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       .㟀.ؤ1.\r
++T;    󳛂。\u200C㟀.\u0648\u06541.;        [B1 C1 P1 V6];  [P1 V6] #       .㟀.ؤ1.\r
++N;    󳛂。\u200C㟀.\u0648\u06541.;        [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       .㟀.ؤ1.\r
++B;    xn--z272f.xn--etl.xn--1-smc.;   [V6];   [V6]    #       .㟀.ؤ1.\r
++B;    xn--z272f.xn--0ug754g.xn--1-smc.;       [B1 C1 V6];     [B1 C1 V6]      #       .㟀.ؤ1.\r
++B;    xn--etlt457ccrq7h.xn--jgb476m;  [V6];   [V6]    #       ︒㟀.ؤ⒈\r
++B;    xn--0ug754gxl4ldlt0k.xn--jgb476m;       [C1 V6];        [C1 V6] #       ︒㟀.ؤ⒈\r
++T;    𑲜\u07CA𝅼。-\u200D;       [B1 C2 V3 V5];  [B1 V3 V5]      #       𑲜ߊ𝅼.-\r
++N;    𑲜\u07CA𝅼。-\u200D;       [B1 C2 V3 V5];  [B1 C2 V3 V5]   #       𑲜ߊ𝅼.-\r
++B;    xn--lsb5482l7nre.-;     [B1 V3 V5];     [B1 V3 V5]      #       𑲜ߊ𝅼.-\r
++B;    xn--lsb5482l7nre.xn----ugn;     [B1 C2 V3 V5];  [B1 C2 V3 V5]   #       𑲜ߊ𝅼.-\r
++T;    \u200C.Ⴉ≠𐫶;    [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .Ⴉ≠𐫶\r
++N;    \u200C.Ⴉ≠𐫶;    [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .Ⴉ≠𐫶\r
++T;    \u200C.Ⴉ=\u0338𐫶;        [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .Ⴉ≠𐫶\r
++N;    \u200C.Ⴉ=\u0338𐫶;        [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .Ⴉ≠𐫶\r
++T;    \u200C.Ⴉ≠𐫶;      [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .Ⴉ≠𐫶\r
++N;    \u200C.Ⴉ≠𐫶;      [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .Ⴉ≠𐫶\r
++T;    \u200C.Ⴉ=\u0338𐫶;  [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .Ⴉ≠𐫶\r
++N;    \u200C.Ⴉ=\u0338𐫶;  [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .Ⴉ≠𐫶\r
++T;    \u200C.ⴉ=\u0338𐫶;  [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .ⴉ≠𐫶\r
++N;    \u200C.ⴉ=\u0338𐫶;  [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .ⴉ≠𐫶\r
++T;    \u200C.ⴉ≠𐫶;      [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .ⴉ≠𐫶\r
++N;    \u200C.ⴉ≠𐫶;      [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .ⴉ≠𐫶\r
++B;    .xn--1chx23bzj4p;       [B5 B6 V6 A4_2];        [B5 B6 V6 A4_2]\r
++B;    xn--0ug.xn--1chx23bzj4p;        [B1 B5 B6 C1 V6];       [B1 B5 B6 C1 V6]        #       .ⴉ≠𐫶\r
++B;    .xn--hnd481gv73o;       [B5 B6 V6 A4_2];        [B5 B6 V6 A4_2]\r
++B;    xn--0ug.xn--hnd481gv73o;        [B1 B5 B6 C1 V6];       [B1 B5 B6 C1 V6]        #       .Ⴉ≠𐫶\r
++T;    \u200C.ⴉ=\u0338𐫶;        [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .ⴉ≠𐫶\r
++N;    \u200C.ⴉ=\u0338𐫶;        [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .ⴉ≠𐫶\r
++T;    \u200C.ⴉ≠𐫶;    [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .ⴉ≠𐫶\r
++N;    \u200C.ⴉ≠𐫶;    [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .ⴉ≠𐫶\r
++T;    \u0750。≯ς; [B1 P1 V6];     [B1 P1 V6]      #       ݐ.≯ς\r
++N;    \u0750。≯ς; [B1 P1 V6];     [B1 P1 V6]      #       ݐ.≯ς\r
++T;    \u0750。>\u0338ς;     [B1 P1 V6];     [B1 P1 V6]      #       ݐ.≯ς\r
++N;    \u0750。>\u0338ς;     [B1 P1 V6];     [B1 P1 V6]      #       ݐ.≯ς\r
++B;    \u0750。>\u0338Σ;     [B1 P1 V6];     [B1 P1 V6]      #       ݐ.≯σ\r
++B;    \u0750。≯Σ; [B1 P1 V6];     [B1 P1 V6]      #       ݐ.≯σ\r
++B;    \u0750。≯σ; [B1 P1 V6];     [B1 P1 V6]      #       ݐ.≯σ\r
++B;    \u0750。>\u0338σ;     [B1 P1 V6];     [B1 P1 V6]      #       ݐ.≯σ\r
++B;    xn--3ob.xn--4xa718m;    [B1 V6];        [B1 V6] #       ݐ.≯σ\r
++B;    xn--3ob.xn--3xa918m;    [B1 V6];        [B1 V6] #       ݐ.≯ς\r
++B;    \u07FC𐸆.𓖏︒񊨩Ⴐ;      [P1 V6];        [P1 V6] #       .︒Ⴐ\r
++B;    \u07FC𐸆.𓖏。񊨩Ⴐ;      [P1 V6];        [P1 V6] #       ..Ⴐ\r
++B;    \u07FC𐸆.𓖏。񊨩ⴐ;      [P1 V6];        [P1 V6] #       ..ⴐ\r
++B;    xn--0tb8725k.xn--tu8d.xn--7kj73887a;    [V6];   [V6]    #       ..ⴐ\r
++B;    xn--0tb8725k.xn--tu8d.xn--ond97931d;    [V6];   [V6]    #       ..Ⴐ\r
++B;    \u07FC𐸆.𓖏︒񊨩ⴐ;      [P1 V6];        [P1 V6] #       .︒ⴐ\r
++B;    xn--0tb8725k.xn--7kj9008dt18a7py9c;     [V6];   [V6]    #       .︒ⴐ\r
++B;    xn--0tb8725k.xn--ond3562jt18a7py9c;     [V6];   [V6]    #       .︒Ⴐ\r
++B;    Ⴥ⚭󠖫⋃。𑌼;   [P1 V5 V6];     [P1 V5 V6]\r
++B;    Ⴥ⚭󠖫⋃。𑌼;   [P1 V5 V6];     [P1 V5 V6]\r
++B;    ⴥ⚭󠖫⋃。𑌼;   [P1 V5 V6];     [P1 V5 V6]\r
++B;    xn--vfh16m67gx1162b.xn--ro1d;   [V5 V6];        [V5 V6]\r
++B;    xn--9nd623g4zc5z060c.xn--ro1d;  [V5 V6];        [V5 V6]\r
++B;    ⴥ⚭󠖫⋃。𑌼;   [P1 V5 V6];     [P1 V5 V6]\r
++B;    🄈。󠷳\u0844;      [B1 P1 V6];     [B1 P1 V6]      #       🄈.ࡄ\r
++B;    7,。󠷳\u0844;        [B1 P1 V6];     [B1 P1 V6]      #       7,.ࡄ\r
++B;    7,.xn--2vb13094p;       [B1 P1 V6];     [B1 P1 V6]      #       7,.ࡄ\r
++B;    xn--107h.xn--2vb13094p; [B1 V6];        [B1 V6] #       🄈.ࡄ\r
++T;    ≮\u0846。섖쮖ß;   [B1 P1 V6];     [B1 P1 V6]      #       ≮ࡆ.섖쮖ß\r
++N;    ≮\u0846。섖쮖ß;   [B1 P1 V6];     [B1 P1 V6]      #       ≮ࡆ.섖쮖ß\r
++T;    <\u0338\u0846。섖쮖ß;   [B1 P1 V6];     [B1 P1 V6]      #       ≮ࡆ.섖쮖ß\r
++N;    <\u0338\u0846。섖쮖ß;   [B1 P1 V6];     [B1 P1 V6]      #       ≮ࡆ.섖쮖ß\r
++B;    <\u0338\u0846。섖쮖SS;   [B1 P1 V6];     [B1 P1 V6]      #       ≮ࡆ.섖쮖ss\r
++B;    ≮\u0846。섖쮖SS;   [B1 P1 V6];     [B1 P1 V6]      #       ≮ࡆ.섖쮖ss\r
++B;    ≮\u0846。섖쮖ss;   [B1 P1 V6];     [B1 P1 V6]      #       ≮ࡆ.섖쮖ss\r
++B;    <\u0338\u0846。섖쮖ss;   [B1 P1 V6];     [B1 P1 V6]      #       ≮ࡆ.섖쮖ss\r
++B;    <\u0338\u0846。섖쮖Ss;   [B1 P1 V6];     [B1 P1 V6]      #       ≮ࡆ.섖쮖ss\r
++B;    ≮\u0846。섖쮖Ss;   [B1 P1 V6];     [B1 P1 V6]      #       ≮ࡆ.섖쮖ss\r
++B;    xn--4vb505k.xn--ss-5z4j006a;    [B1 V6];        [B1 V6] #       ≮ࡆ.섖쮖ss\r
++B;    xn--4vb505k.xn--zca7259goug;    [B1 V6];        [B1 V6] #       ≮ࡆ.섖쮖ß\r
++B;    󠆓⛏-。ꡒ; [V3];   [V3]\r
++B;    xn----o9p.xn--rc9a;     [V3];   [V3]\r
++T;    \u07BB𐹳\u0626𑁆。\u08A7\u06B0\u200Cᢒ;   [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       𐹳ئ𑁆.ࢧڰᢒ\r
++N;    \u07BB𐹳\u0626𑁆。\u08A7\u06B0\u200Cᢒ;   [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       𐹳ئ𑁆.ࢧڰᢒ\r
++T;    \u07BB𐹳\u064A𑁆\u0654。\u08A7\u06B0\u200Cᢒ;     [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       𐹳ئ𑁆.ࢧڰᢒ\r
++N;    \u07BB𐹳\u064A𑁆\u0654。\u08A7\u06B0\u200Cᢒ;     [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       𐹳ئ𑁆.ࢧڰᢒ\r
++B;    xn--lgb32f2753cosb.xn--jkb91hlz1a;      [B2 B3 V6];     [B2 B3 V6]      #       𐹳ئ𑁆.ࢧڰᢒ\r
++B;    xn--lgb32f2753cosb.xn--jkb91hlz1azih;   [B2 B3 V6];     [B2 B3 V6]      #       𐹳ئ𑁆.ࢧڰᢒ\r
++B;    \u0816.𐨕𚚕;        [B1 B2 B3 B6 P1 V5 V6]; [B1 B2 B3 B6 P1 V5 V6]  #       ࠖ.𐨕\r
++B;    xn--rub.xn--tr9c248x;   [B1 B2 B3 B6 V5 V6];    [B1 B2 B3 B6 V5 V6]     #       ࠖ.𐨕\r
++B;    --。𽊆\u0767𐽋𞠬;        [B1 B5 B6 P1 V3 V6];    [B1 B5 B6 P1 V3 V6]     #       --.ݧ𞠬\r
++B;    --.xn--rpb6226k77pfh58p;        [B1 B5 B6 V3 V6];       [B1 B5 B6 V3 V6]        #       --.ݧ𞠬\r
++B;    򛭦𐋥𹸐.≯\u08B0\u08A6󔛣;       [B1 P1 V6];     [B1 P1 V6]      #       𐋥.≯ࢰࢦ\r
++B;    򛭦𐋥𹸐.>\u0338\u08B0\u08A6󔛣;   [B1 P1 V6];     [B1 P1 V6]      #       𐋥.≯ࢰࢦ\r
++B;    xn--887c2298i5mv6a.xn--vybt688qm8981a;  [B1 V6];        [B1 V6] #       𐋥.≯ࢰࢦ\r
++B;    䔛󠇒򤸞𐹧.-䤷; [B1 B5 B6 P1 V3 V6];    [B1 B5 B6 P1 V3 V6]\r
++B;    䔛󠇒򤸞𐹧.-䤷;   [B1 B5 B6 P1 V3 V6];    [B1 B5 B6 P1 V3 V6]\r
++B;    xn--2loy662coo60e.xn----0n4a;   [B1 B5 B6 V3 V6];       [B1 B5 B6 V3 V6]\r
++T;    𐹩.\u200D-; [B1 C2 V3];     [B1 V3] #       𐹩.-\r
++N;    𐹩.\u200D-; [B1 C2 V3];     [B1 C2 V3]      #       𐹩.-\r
++T;    𐹩.\u200D-;   [B1 C2 V3];     [B1 V3] #       𐹩.-\r
++N;    𐹩.\u200D-;   [B1 C2 V3];     [B1 C2 V3]      #       𐹩.-\r
++B;    xn--ho0d.-;     [B1 V3];        [B1 V3]\r
++B;    xn--ho0d.xn----tgn;     [B1 C2 V3];     [B1 C2 V3]      #       𐹩.-\r
++B;    񂈦帷。≯萺\u1DC8-;        [P1 V3 V6];     [P1 V3 V6]      #       帷.≯萺᷈-\r
++B;    񂈦帷。>\u0338萺\u1DC8-;    [P1 V3 V6];     [P1 V3 V6]      #       帷.≯萺᷈-\r
++B;    񂈦帷。≯萺\u1DC8-;        [P1 V3 V6];     [P1 V3 V6]      #       帷.≯萺᷈-\r
++B;    񂈦帷。>\u0338萺\u1DC8-;    [P1 V3 V6];     [P1 V3 V6]      #       帷.≯萺᷈-\r
++B;    xn--qutw175s.xn----mimu6tf67j;  [V3 V6];        [V3 V6] #       帷.≯萺᷈-\r
++T;    \u200D攌\uABED。ᢖ-Ⴘ;      [C2 P1 V6];     [P1 V6] #       攌꯭.ᢖ-Ⴘ\r
++N;    \u200D攌\uABED。ᢖ-Ⴘ;      [C2 P1 V6];     [C2 P1 V6]      #       攌꯭.ᢖ-Ⴘ\r
++T;    \u200D攌\uABED。ᢖ-ⴘ;      [C2];   xn--p9ut19m.xn----mck373i       #       攌꯭.ᢖ-ⴘ\r
++N;    \u200D攌\uABED。ᢖ-ⴘ;      [C2];   [C2]    #       攌꯭.ᢖ-ⴘ\r
++B;    xn--p9ut19m.xn----mck373i;      攌\uABED.ᢖ-ⴘ;      xn--p9ut19m.xn----mck373i       #       攌꯭.ᢖ-ⴘ\r
++B;    攌\uABED.ᢖ-ⴘ;      ;       xn--p9ut19m.xn----mck373i       #       攌꯭.ᢖ-ⴘ\r
++B;    攌\uABED.ᢖ-Ⴘ;      [P1 V6];        [P1 V6] #       攌꯭.ᢖ-Ⴘ\r
++B;    xn--p9ut19m.xn----k1g451d;      [V6];   [V6]    #       攌꯭.ᢖ-Ⴘ\r
++B;    xn--1ug592ykp6b.xn----mck373i;  [C2];   [C2]    #       攌꯭.ᢖ-ⴘ\r
++B;    xn--1ug592ykp6b.xn----k1g451d;  [C2 V6];        [C2 V6] #       攌꯭.ᢖ-Ⴘ\r
++T;    \u200Cꖨ.⒗3툒۳;        [C1 P1 V6];     [P1 V6] #       ꖨ.⒗3툒۳\r
++N;    \u200Cꖨ.⒗3툒۳;        [C1 P1 V6];     [C1 P1 V6]      #       ꖨ.⒗3툒۳\r
++T;    \u200Cꖨ.⒗3툒۳;  [C1 P1 V6];     [P1 V6] #       ꖨ.⒗3툒۳\r
++N;    \u200Cꖨ.⒗3툒۳;  [C1 P1 V6];     [C1 P1 V6]      #       ꖨ.⒗3툒۳\r
++T;    \u200Cꖨ.16.3툒۳;    [C1];   xn--9r8a.16.xn--3-nyc0117m      #       ꖨ.16.3툒۳\r
++N;    \u200Cꖨ.16.3툒۳;    [C1];   [C1]    #       ꖨ.16.3툒۳\r
++T;    \u200Cꖨ.16.3툒۳;      [C1];   xn--9r8a.16.xn--3-nyc0117m      #       ꖨ.16.3툒۳\r
++N;    \u200Cꖨ.16.3툒۳;      [C1];   [C1]    #       ꖨ.16.3툒۳\r
++B;    xn--9r8a.16.xn--3-nyc0117m;     ꖨ.16.3툒۳;  xn--9r8a.16.xn--3-nyc0117m\r
++B;    ꖨ.16.3툒۳;  ;       xn--9r8a.16.xn--3-nyc0117m\r
++B;    ꖨ.16.3툒۳;    ꖨ.16.3툒۳;  xn--9r8a.16.xn--3-nyc0117m\r
++B;    xn--0ug2473c.16.xn--3-nyc0117m; [C1];   [C1]    #       ꖨ.16.3툒۳\r
++B;    xn--9r8a.xn--3-nyc678tu07m;     [V6];   [V6]\r
++B;    xn--0ug2473c.xn--3-nyc678tu07m; [C1 V6];        [C1 V6] #       ꖨ.⒗3툒۳\r
++B;    ⒈걾6.𐱁\u06D0;     [B1 P1 V6];     [B1 P1 V6]      #       ⒈걾6.𐱁ې\r
++B;    ⒈걾6.𐱁\u06D0;       [B1 P1 V6];     [B1 P1 V6]      #       ⒈걾6.𐱁ې\r
++B;    1.걾6.𐱁\u06D0;      [B1];   [B1]    #       1.걾6.𐱁ې\r
++B;    1.걾6.𐱁\u06D0;        [B1];   [B1]    #       1.걾6.𐱁ې\r
++B;    1.xn--6-945e.xn--glb1794k;      [B1];   [B1]    #       1.걾6.𐱁ې\r
++B;    xn--6-dcps419c.xn--glb1794k;    [B1 V6];        [B1 V6] #       ⒈걾6.𐱁ې\r
++B;    𐲞𝟶≮≮.󠀧\u0639;      [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       𐳞0≮≮.ع\r
++B;    𐲞𝟶<\u0338<\u0338.󠀧\u0639;      [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       𐳞0≮≮.ع\r
++B;    𐲞0≮≮.󠀧\u0639; [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       𐳞0≮≮.ع\r
++B;    𐲞0<\u0338<\u0338.󠀧\u0639; [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       𐳞0≮≮.ع\r
++B;    𐳞0<\u0338<\u0338.󠀧\u0639; [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       𐳞0≮≮.ع\r
++B;    𐳞0≮≮.󠀧\u0639; [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       𐳞0≮≮.ع\r
++B;    xn--0-ngoa5711v.xn--4gb31034p;  [B1 B3 V6];     [B1 B3 V6]      #       𐳞0≮≮.ع\r
++B;    𐳞𝟶<\u0338<\u0338.󠀧\u0639;      [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       𐳞0≮≮.ع\r
++B;    𐳞𝟶≮≮.󠀧\u0639;      [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       𐳞0≮≮.ع\r
++B;    \u0AE3.𐹺\u115F;      [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       ૣ.𐹺\r
++B;    xn--8fc.xn--osd3070k;   [B1 B3 B6 V5 V6];       [B1 B3 B6 V5 V6]        #       ૣ.𐹺\r
++T;    𝟏𝨙⸖.\u200D;     [C2];   xn--1-5bt6845n. #       1𝨙⸖.\r
++N;    𝟏𝨙⸖.\u200D;     [C2];   [C2]    #       1𝨙⸖.\r
++T;    1𝨙⸖.\u200D;        [C2];   xn--1-5bt6845n. #       1𝨙⸖.\r
++N;    1𝨙⸖.\u200D;        [C2];   [C2]    #       1𝨙⸖.\r
++B;    xn--1-5bt6845n.;        1𝨙⸖.;      xn--1-5bt6845n.;        NV8\r
++B;    1𝨙⸖.;      ;       xn--1-5bt6845n.;        NV8\r
++B;    xn--1-5bt6845n.xn--1ug; [C2];   [C2]    #       1𝨙⸖.\r
++T;    𞤐≠\u0726\u1A60。-\u200C\u07D5;    [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       𞤲≠ܦ᩠.-ߕ\r
++N;    𞤐≠\u0726\u1A60。-\u200C\u07D5;    [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       𞤲≠ܦ᩠.-ߕ\r
++T;    𞤐=\u0338\u0726\u1A60。-\u200C\u07D5;        [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       𞤲≠ܦ᩠.-ߕ\r
++N;    𞤐=\u0338\u0726\u1A60。-\u200C\u07D5;        [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       𞤲≠ܦ᩠.-ߕ\r
++T;    𞤐≠\u0726\u1A60。-\u200C\u07D5;    [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       𞤲≠ܦ᩠.-ߕ\r
++N;    𞤐≠\u0726\u1A60。-\u200C\u07D5;    [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       𞤲≠ܦ᩠.-ߕ\r
++T;    𞤐=\u0338\u0726\u1A60。-\u200C\u07D5;        [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       𞤲≠ܦ᩠.-ߕ\r
++N;    𞤐=\u0338\u0726\u1A60。-\u200C\u07D5;        [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       𞤲≠ܦ᩠.-ߕ\r
++T;    𞤲=\u0338\u0726\u1A60。-\u200C\u07D5;        [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       𞤲≠ܦ᩠.-ߕ\r
++N;    𞤲=\u0338\u0726\u1A60。-\u200C\u07D5;        [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       𞤲≠ܦ᩠.-ߕ\r
++T;    𞤲≠\u0726\u1A60。-\u200C\u07D5;    [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       𞤲≠ܦ᩠.-ߕ\r
++N;    𞤲≠\u0726\u1A60。-\u200C\u07D5;    [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       𞤲≠ܦ᩠.-ߕ\r
++B;    xn--wnb859grzfzw60c.xn----kcd;  [B1 V3 V6];     [B1 V3 V6]      #       𞤲≠ܦ᩠.-ߕ\r
++B;    xn--wnb859grzfzw60c.xn----kcd017p;      [B1 C1 V3 V6];  [B1 C1 V3 V6]   #       𞤲≠ܦ᩠.-ߕ\r
++T;    𞤲=\u0338\u0726\u1A60。-\u200C\u07D5;        [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       𞤲≠ܦ᩠.-ߕ\r
++N;    𞤲=\u0338\u0726\u1A60。-\u200C\u07D5;        [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       𞤲≠ܦ᩠.-ߕ\r
++T;    𞤲≠\u0726\u1A60。-\u200C\u07D5;    [B1 C1 P1 V3 V6];       [B1 P1 V3 V6]   #       𞤲≠ܦ᩠.-ߕ\r
++N;    𞤲≠\u0726\u1A60。-\u200C\u07D5;    [B1 C1 P1 V3 V6];       [B1 C1 P1 V3 V6]        #       𞤲≠ܦ᩠.-ߕ\r
++B;    𐹰\u0368-ꡧ。\u0675;        [B1];   [B1]    #       𐹰ͨ-ꡧ.اٴ\r
++B;    𐹰\u0368-ꡧ。\u0627\u0674;  [B1];   [B1]    #       𐹰ͨ-ꡧ.اٴ\r
++B;    xn----shb2387jgkqd.xn--mgb8m;   [B1];   [B1]    #       𐹰ͨ-ꡧ.اٴ\r
++B;    F󠅟。򏗅♚;        [P1 V6];        [P1 V6]\r
++B;    F󠅟。򏗅♚;        [P1 V6];        [P1 V6]\r
++B;    f󠅟。򏗅♚;        [P1 V6];        [P1 V6]\r
++B;    f.xn--45hz6953f;        [V6];   [V6]\r
++B;    f󠅟。򏗅♚;        [P1 V6];        [P1 V6]\r
++B;    \u0B4D𑄴\u1DE9。𝟮Ⴘ𞀨񃥇;     [P1 V5 V6];     [P1 V5 V6]      #       ୍𑄴ᷩ.2Ⴘ𞀨\r
++B;    \u0B4D𑄴\u1DE9。2Ⴘ𞀨񃥇;        [P1 V5 V6];     [P1 V5 V6]      #       ୍𑄴ᷩ.2Ⴘ𞀨\r
++B;    \u0B4D𑄴\u1DE9。2ⴘ𞀨񃥇;        [P1 V5 V6];     [P1 V5 V6]      #       ୍𑄴ᷩ.2ⴘ𞀨\r
++B;    xn--9ic246gs21p.xn--2-nws2918ndrjr;     [V5 V6];        [V5 V6] #       ୍𑄴ᷩ.2ⴘ𞀨\r
++B;    xn--9ic246gs21p.xn--2-k1g43076adrwq;    [V5 V6];        [V5 V6] #       ୍𑄴ᷩ.2Ⴘ𞀨\r
++B;    \u0B4D𑄴\u1DE9。𝟮ⴘ𞀨񃥇;     [P1 V5 V6];     [P1 V5 V6]      #       ୍𑄴ᷩ.2ⴘ𞀨\r
++T;    򓠭\u200C\u200C⒈。勉𑁅;  [C1 P1 V6];     [P1 V6] #       ⒈.勉𑁅\r
++N;    򓠭\u200C\u200C⒈。勉𑁅;  [C1 P1 V6];     [C1 P1 V6]      #       ⒈.勉𑁅\r
++T;    򓠭\u200C\u200C1.。勉𑁅;   [C1 P1 V6 A4_2];        [P1 V6 A4_2]    #       1..勉𑁅\r
++N;    򓠭\u200C\u200C1.。勉𑁅;   [C1 P1 V6 A4_2];        [C1 P1 V6 A4_2] #       1..勉𑁅\r
++B;    xn--1-yi00h..xn--4grs325b;      [V6 A4_2];      [V6 A4_2]\r
++B;    xn--1-rgna61159u..xn--4grs325b; [C1 V6 A4_2];   [C1 V6 A4_2]    #       1..勉𑁅\r
++B;    xn--tsh11906f.xn--4grs325b;     [V6];   [V6]\r
++B;    xn--0uga855aez302a.xn--4grs325b;        [C1 V6];        [C1 V6] #       ⒈.勉𑁅\r
++B;    ᡃ.玿񫈜󕞐;        [P1 V6];        [P1 V6]\r
++B;    xn--27e.xn--7cy81125a0yq4a;     [V6];   [V6]\r
++T;    \u200C\u200C。⒈≯𝟵;      [C1 P1 V6];     [P1 V6 A4_2]    #       .⒈≯9\r
++N;    \u200C\u200C。⒈≯𝟵;      [C1 P1 V6];     [C1 P1 V6]      #       .⒈≯9\r
++T;    \u200C\u200C。⒈>\u0338𝟵;  [C1 P1 V6];     [P1 V6 A4_2]    #       .⒈≯9\r
++N;    \u200C\u200C。⒈>\u0338𝟵;  [C1 P1 V6];     [C1 P1 V6]      #       .⒈≯9\r
++T;    \u200C\u200C。1.≯9;  [C1 P1 V6];     [P1 V6 A4_2]    #       .1.≯9\r
++N;    \u200C\u200C。1.≯9;  [C1 P1 V6];     [C1 P1 V6]      #       .1.≯9\r
++T;    \u200C\u200C。1.>\u03389;      [C1 P1 V6];     [P1 V6 A4_2]    #       .1.≯9\r
++N;    \u200C\u200C。1.>\u03389;      [C1 P1 V6];     [C1 P1 V6]      #       .1.≯9\r
++B;    .1.xn--9-ogo;   [V6 A4_2];      [V6 A4_2]\r
++B;    xn--0uga.1.xn--9-ogo;   [C1 V6];        [C1 V6] #       .1.≯9\r
++B;    .xn--9-ogo37g;  [V6 A4_2];      [V6 A4_2]\r
++B;    xn--0uga.xn--9-ogo37g;  [C1 V6];        [C1 V6] #       .⒈≯9\r
++B;    \u115F\u1DE0򐀁.𺻆≯𐮁;   [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ᷠ.≯𐮁\r
++B;    \u115F\u1DE0򐀁.𺻆>\u0338𐮁;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ᷠ.≯𐮁\r
++B;    xn--osd615d5659o.xn--hdh5192gkm6r;      [B5 B6 V6];     [B5 B6 V6]      #       ᷠ.≯𐮁\r
++T;    󠄫𝩤\u200D\u063E.𝩩-\u081E󑼩;   [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       𝩤ؾ.𝩩-ࠞ\r
++N;    󠄫𝩤\u200D\u063E.𝩩-\u081E󑼩;   [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       𝩤ؾ.𝩩-ࠞ\r
++B;    xn--9gb5080v.xn----qgd52296avol4f;      [B1 V5 V6];     [B1 V5 V6]      #       𝩤ؾ.𝩩-ࠞ\r
++B;    xn--9gb723kg862a.xn----qgd52296avol4f;  [B1 C2 V5 V6];  [B1 C2 V5 V6]   #       𝩤ؾ.𝩩-ࠞ\r
++B;    \u20DA.𑘿-; [V3 V5];        [V3 V5] #       ⃚.𑘿-\r
++B;    \u20DA.𑘿-;   [V3 V5];        [V3 V5] #       ⃚.𑘿-\r
++B;    xn--w0g.xn----bd0j;     [V3 V5];        [V3 V5] #       ⃚.𑘿-\r
++T;    䮸ß.󠵟󠭎紙\u08A8;        [B1 P1 V6];     [B1 P1 V6]      #       䮸ß.紙ࢨ\r
++N;    䮸ß.󠵟󠭎紙\u08A8;        [B1 P1 V6];     [B1 P1 V6]      #       䮸ß.紙ࢨ\r
++B;    䮸SS.󠵟󠭎紙\u08A8;        [B1 P1 V6];     [B1 P1 V6]      #       䮸ss.紙ࢨ\r
++B;    䮸ss.󠵟󠭎紙\u08A8;        [B1 P1 V6];     [B1 P1 V6]      #       䮸ss.紙ࢨ\r
++B;    䮸Ss.󠵟󠭎紙\u08A8;        [B1 P1 V6];     [B1 P1 V6]      #       䮸ss.紙ࢨ\r
++B;    xn--ss-sf1c.xn--xyb1370div70kpzba;      [B1 V6];        [B1 V6] #       䮸ss.紙ࢨ\r
++B;    xn--zca5349a.xn--xyb1370div70kpzba;     [B1 V6];        [B1 V6] #       䮸ß.紙ࢨ\r
++B;    -Ⴞ.-𝩨⅔𐦕;      [B1 P1 V3 V6];  [B1 P1 V3 V6]\r
++B;    -Ⴞ.-𝩨2⁄3𐦕;    [B1 P1 V3 V6];  [B1 P1 V3 V6]\r
++B;    -ⴞ.-𝩨2⁄3𐦕;    [B1 V3];        [B1 V3]\r
++B;    xn----zws.xn---23-pt0a0433lk3jj;        [B1 V3];        [B1 V3]\r
++B;    xn----w1g.xn---23-pt0a0433lk3jj;        [B1 V3 V6];     [B1 V3 V6]\r
++B;    -ⴞ.-𝩨⅔𐦕;      [B1 V3];        [B1 V3]\r
++B;    󧈯𐹯\u0AC2。򖢨𐮁񇼖ᡂ;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       𐹯ૂ.𐮁ᡂ\r
++B;    󧈯𐹯\u0AC2。򖢨𐮁񇼖ᡂ;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       𐹯ૂ.𐮁ᡂ\r
++B;    xn--bfc7604kv8m3g.xn--17e5565jl7zw4h16a;        [B5 B6 V6];     [B5 B6 V6]      #       𐹯ૂ.𐮁ᡂ\r
++T;    \u1082-\u200D\uA8EA.ꡊ\u200D񼸳;    [C2 P1 V5 V6];  [P1 V5 V6]      #       ႂ-꣪.ꡊ\r
++N;    \u1082-\u200D\uA8EA.ꡊ\u200D񼸳;    [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ႂ-꣪.ꡊ\r
++T;    \u1082-\u200D\uA8EA.ꡊ\u200D񼸳;      [C2 P1 V5 V6];  [P1 V5 V6]      #       ႂ-꣪.ꡊ\r
++N;    \u1082-\u200D\uA8EA.ꡊ\u200D񼸳;      [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ႂ-꣪.ꡊ\r
++B;    xn----gyg3618i.xn--jc9ao4185a;  [V5 V6];        [V5 V6] #       ႂ-꣪.ꡊ\r
++B;    xn----gyg250jio7k.xn--1ug8774cri56d;    [C2 V5 V6];     [C2 V5 V6]      #       ႂ-꣪.ꡊ\r
++B;    ۱。≠\u0668; [B1 P1 V6];     [B1 P1 V6]      #       ۱.≠٨\r
++B;    ۱。=\u0338\u0668;     [B1 P1 V6];     [B1 P1 V6]      #       ۱.≠٨\r
++B;    xn--emb.xn--hib334l;    [B1 V6];        [B1 V6] #       ۱.≠٨\r
++B;    𑈵廊.𐠍;   [V5];   [V5]\r
++B;    xn--xytw701b.xn--yc9c;  [V5];   [V5]\r
++T;    \u200D\u0356-.-Ⴐ\u0661;     [B1 C2 P1 V3 V6];       [B1 P1 V3 V5 V6]        #       ͖-.-Ⴐ١\r
++N;    \u200D\u0356-.-Ⴐ\u0661;     [B1 C2 P1 V3 V6];       [B1 C2 P1 V3 V6]        #       ͖-.-Ⴐ١\r
++T;    \u200D\u0356-.-Ⴐ\u0661;       [B1 C2 P1 V3 V6];       [B1 P1 V3 V5 V6]        #       ͖-.-Ⴐ١\r
++N;    \u200D\u0356-.-Ⴐ\u0661;       [B1 C2 P1 V3 V6];       [B1 C2 P1 V3 V6]        #       ͖-.-Ⴐ١\r
++T;    \u200D\u0356-.-ⴐ\u0661;       [B1 C2 V3];     [B1 V3 V5]      #       ͖-.-ⴐ١\r
++N;    \u200D\u0356-.-ⴐ\u0661;       [B1 C2 V3];     [B1 C2 V3]      #       ͖-.-ⴐ١\r
++B;    xn----rgb.xn----bqc2280a;       [B1 V3 V5];     [B1 V3 V5]      #       ͖-.-ⴐ١\r
++B;    xn----rgb661t.xn----bqc2280a;   [B1 C2 V3];     [B1 C2 V3]      #       ͖-.-ⴐ١\r
++B;    xn----rgb.xn----bqc030f;        [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       ͖-.-Ⴐ١\r
++B;    xn----rgb661t.xn----bqc030f;    [B1 C2 V3 V6];  [B1 C2 V3 V6]   #       ͖-.-Ⴐ١\r
++T;    \u200D\u0356-.-ⴐ\u0661;     [B1 C2 V3];     [B1 V3 V5]      #       ͖-.-ⴐ١\r
++N;    \u200D\u0356-.-ⴐ\u0661;     [B1 C2 V3];     [B1 C2 V3]      #       ͖-.-ⴐ١\r
++B;    \u063A\u0661挏󾯐.-;  [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       غ١挏.-\r
++B;    xn--5gb2f4205aqi47p.-;  [B1 B2 B3 V3 V6];       [B1 B2 B3 V3 V6]        #       غ١挏.-\r
++B;    \u06EF。𐹧𞤽;      [B1];   [B1]    #       ۯ.𐹧𞤽\r
++B;    \u06EF。𐹧𞤽;      [B1];   [B1]    #       ۯ.𐹧𞤽\r
++B;    \u06EF。𐹧𞤛;      [B1];   [B1]    #       ۯ.𐹧𞤽\r
++B;    xn--cmb.xn--fo0dy848a;  [B1];   [B1]    #       ۯ.𐹧𞤽\r
++B;    \u06EF。𐹧𞤛;      [B1];   [B1]    #       ۯ.𐹧𞤽\r
++B;    Ⴞ𶛀𛗻.ᢗ릫;   [P1 V6];        [P1 V6]\r
++B;    Ⴞ𶛀𛗻.ᢗ릫;     [P1 V6];        [P1 V6]\r
++B;    Ⴞ𶛀𛗻.ᢗ릫;     [P1 V6];        [P1 V6]\r
++B;    Ⴞ𶛀𛗻.ᢗ릫;       [P1 V6];        [P1 V6]\r
++B;    ⴞ𶛀𛗻.ᢗ릫;       [P1 V6];        [P1 V6]\r
++B;    ⴞ𶛀𛗻.ᢗ릫;     [P1 V6];        [P1 V6]\r
++B;    xn--mlj0486jgl2j.xn--hbf6853f;  [V6];   [V6]\r
++B;    xn--2nd8876sgl2j.xn--hbf6853f;  [V6];   [V6]\r
++B;    ⴞ𶛀𛗻.ᢗ릫;     [P1 V6];        [P1 V6]\r
++B;    ⴞ𶛀𛗻.ᢗ릫;   [P1 V6];        [P1 V6]\r
++T;    󠎃󗭞\u06B7𐹷。≯\u200C\u1DFE;   [B1 C1 P1 V6];  [B1 P1 V6]      #       ڷ𐹷.≯᷾\r
++N;    󠎃󗭞\u06B7𐹷。≯\u200C\u1DFE;   [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ڷ𐹷.≯᷾\r
++T;    󠎃󗭞\u06B7𐹷。>\u0338\u200C\u1DFE;       [B1 C1 P1 V6];  [B1 P1 V6]      #       ڷ𐹷.≯᷾\r
++N;    󠎃󗭞\u06B7𐹷。>\u0338\u200C\u1DFE;       [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ڷ𐹷.≯᷾\r
++T;    󠎃󗭞\u06B7𐹷。≯\u200C\u1DFE;   [B1 C1 P1 V6];  [B1 P1 V6]      #       ڷ𐹷.≯᷾\r
++N;    󠎃󗭞\u06B7𐹷。≯\u200C\u1DFE;   [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ڷ𐹷.≯᷾\r
++T;    󠎃󗭞\u06B7𐹷。>\u0338\u200C\u1DFE;       [B1 C1 P1 V6];  [B1 P1 V6]      #       ڷ𐹷.≯᷾\r
++N;    󠎃󗭞\u06B7𐹷。>\u0338\u200C\u1DFE;       [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ڷ𐹷.≯᷾\r
++B;    xn--qkb4516kbi06fg2id.xn--zfg31q;       [B1 V6];        [B1 V6] #       ڷ𐹷.≯᷾\r
++B;    xn--qkb4516kbi06fg2id.xn--zfg59fm0c;    [B1 C1 V6];     [B1 C1 V6]      #       ڷ𐹷.≯᷾\r
++T;    ᛎ󠅍󠐕\u200D。𐹾𐹪𐻝-;      [B1 B6 C2 P1 V3 V6];    [B1 B6 P1 V3 V6]        #       ᛎ.𐹾𐹪-\r
++N;    ᛎ󠅍󠐕\u200D。𐹾𐹪𐻝-;      [B1 B6 C2 P1 V3 V6];    [B1 B6 C2 P1 V3 V6]     #       ᛎ.𐹾𐹪-\r
++T;    ᛎ󠅍󠐕\u200D。𐹾𐹪𐻝-;      [B1 B6 C2 P1 V3 V6];    [B1 B6 P1 V3 V6]        #       ᛎ.𐹾𐹪-\r
++N;    ᛎ󠅍󠐕\u200D。𐹾𐹪𐻝-;      [B1 B6 C2 P1 V3 V6];    [B1 B6 C2 P1 V3 V6]     #       ᛎ.𐹾𐹪-\r
++B;    xn--fxe63563p.xn----q26i2bvu;   [B1 B6 V3 V6];  [B1 B6 V3 V6]\r
++B;    xn--fxe848bq3411a.xn----q26i2bvu;       [B1 B6 C2 V3 V6];       [B1 B6 C2 V3 V6]        #       ᛎ.𐹾𐹪-\r
++B;    𐹶.𐫂;      [B1];   [B1]\r
++B;    xn--uo0d.xn--rw9c;      [B1];   [B1]\r
++T;    ß\u200D\u103A。⒈;   [C2 P1 V6];     [P1 V6] #       ß်.⒈\r
++N;    ß\u200D\u103A。⒈;   [C2 P1 V6];     [C2 P1 V6]      #       ß်.⒈\r
++T;    ß\u200D\u103A。1.;    [C2];   xn--ss-f4j.1.   #       ß်.1.\r
++N;    ß\u200D\u103A。1.;    [C2];   [C2]    #       ß်.1.\r
++T;    SS\u200D\u103A。1.;    [C2];   xn--ss-f4j.1.   #       ss်.1.\r
++N;    SS\u200D\u103A。1.;    [C2];   [C2]    #       ss်.1.\r
++T;    ss\u200D\u103A。1.;    [C2];   xn--ss-f4j.1.   #       ss်.1.\r
++N;    ss\u200D\u103A。1.;    [C2];   [C2]    #       ss်.1.\r
++T;    Ss\u200D\u103A。1.;    [C2];   xn--ss-f4j.1.   #       ss်.1.\r
++N;    Ss\u200D\u103A。1.;    [C2];   [C2]    #       ss်.1.\r
++B;    xn--ss-f4j.1.;  ss\u103A.1.;    xn--ss-f4j.1.   #       ss်.1.\r
++B;    ss\u103A.1.;    ;       xn--ss-f4j.1.   #       ss်.1.\r
++B;    SS\u103A.1.;    ss\u103A.1.;    xn--ss-f4j.1.   #       ss်.1.\r
++B;    Ss\u103A.1.;    ss\u103A.1.;    xn--ss-f4j.1.   #       ss်.1.\r
++B;    xn--ss-f4j585j.1.;      [C2];   [C2]    #       ss်.1.\r
++B;    xn--zca679eh2l.1.;      [C2];   [C2]    #       ß်.1.\r
++T;    SS\u200D\u103A。⒈;   [C2 P1 V6];     [P1 V6] #       ss်.⒈\r
++N;    SS\u200D\u103A。⒈;   [C2 P1 V6];     [C2 P1 V6]      #       ss်.⒈\r
++T;    ss\u200D\u103A。⒈;   [C2 P1 V6];     [P1 V6] #       ss်.⒈\r
++N;    ss\u200D\u103A。⒈;   [C2 P1 V6];     [C2 P1 V6]      #       ss်.⒈\r
++T;    Ss\u200D\u103A。⒈;   [C2 P1 V6];     [P1 V6] #       ss်.⒈\r
++N;    Ss\u200D\u103A。⒈;   [C2 P1 V6];     [C2 P1 V6]      #       ss်.⒈\r
++B;    xn--ss-f4j.xn--tsh;     [V6];   [V6]    #       ss်.⒈\r
++B;    xn--ss-f4j585j.xn--tsh; [C2 V6];        [C2 V6] #       ss်.⒈\r
++B;    xn--zca679eh2l.xn--tsh; [C2 V6];        [C2 V6] #       ß်.⒈\r
++T;    \u0B4D\u200C𙶵𞻘。\u200D;  [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       ୍.\r
++N;    \u0B4D\u200C𙶵𞻘。\u200D;  [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       ୍.\r
++B;    xn--9ic6417rn4xb.;      [B1 V5 V6];     [B1 V5 V6]      #       ୍.\r
++B;    xn--9ic637hz82z32jc.xn--1ug;    [B1 C2 V5 V6];  [B1 C2 V5 V6]   #       ୍.\r
++B;    𐮅。\u06BC🁕;      [B3];   [B3]    #       𐮅.ڼ🁕\r
++B;    𐮅。\u06BC🁕;      [B3];   [B3]    #       𐮅.ڼ🁕\r
++B;    xn--c29c.xn--vkb8871w;  [B3];   [B3]    #       𐮅.ڼ🁕\r
++T;    \u0620\u17D2。𐫔󠀧\u200C𑈵;      [B2 B3 C1 P1 V6];       [B2 B3 P1 V6]   #       ؠ្.𐫔𑈵\r
++N;    \u0620\u17D2。𐫔󠀧\u200C𑈵;      [B2 B3 C1 P1 V6];       [B2 B3 C1 P1 V6]        #       ؠ្.𐫔𑈵\r
++B;    xn--fgb471g.xn--9w9c29jw3931a;  [B2 B3 V6];     [B2 B3 V6]      #       ؠ្.𐫔𑈵\r
++B;    xn--fgb471g.xn--0ug9853g7verp838a;      [B2 B3 C1 V6];  [B2 B3 C1 V6]   #       ؠ្.𐫔𑈵\r
++B;    񋉕.𞣕𞤊;  [B1 P1 V5 V6];  [B1 P1 V5 V6]\r
++B;    񋉕.𞣕𞤬;  [B1 P1 V5 V6];  [B1 P1 V5 V6]\r
++B;    xn--tf5w.xn--2b6hof;    [B1 V5 V6];     [B1 V5 V6]\r
++T;    \u06CC𐨿.ß\u0F84𑍬;      \u06CC𐨿.ß\u0F84𑍬;        xn--clb2593k.xn--ss-toj6092t    #       ی𐨿.ß྄𑍬\r
++N;    \u06CC𐨿.ß\u0F84𑍬;      \u06CC𐨿.ß\u0F84𑍬;        xn--clb2593k.xn--zca216edt0r    #       ی𐨿.ß྄𑍬\r
++T;    \u06CC𐨿.ß\u0F84𑍬;        ;       xn--clb2593k.xn--ss-toj6092t    #       ی𐨿.ß྄𑍬\r
++N;    \u06CC𐨿.ß\u0F84𑍬;        ;       xn--clb2593k.xn--zca216edt0r    #       ی𐨿.ß྄𑍬\r
++B;    \u06CC𐨿.SS\u0F84𑍬;        \u06CC𐨿.ss\u0F84𑍬;        xn--clb2593k.xn--ss-toj6092t    #       ی𐨿.ss྄𑍬\r
++B;    \u06CC𐨿.ss\u0F84𑍬;        ;       xn--clb2593k.xn--ss-toj6092t    #       ی𐨿.ss྄𑍬\r
++B;    \u06CC𐨿.Ss\u0F84𑍬;        \u06CC𐨿.ss\u0F84𑍬;        xn--clb2593k.xn--ss-toj6092t    #       ی𐨿.ss྄𑍬\r
++B;    xn--clb2593k.xn--ss-toj6092t;   \u06CC𐨿.ss\u0F84𑍬;        xn--clb2593k.xn--ss-toj6092t    #       ی𐨿.ss྄𑍬\r
++B;    xn--clb2593k.xn--zca216edt0r;   \u06CC𐨿.ß\u0F84𑍬;        xn--clb2593k.xn--zca216edt0r    #       ی𐨿.ß྄𑍬\r
++B;    \u06CC𐨿.SS\u0F84𑍬;      \u06CC𐨿.ss\u0F84𑍬;        xn--clb2593k.xn--ss-toj6092t    #       ی𐨿.ss྄𑍬\r
++B;    \u06CC𐨿.ss\u0F84𑍬;      \u06CC𐨿.ss\u0F84𑍬;        xn--clb2593k.xn--ss-toj6092t    #       ی𐨿.ss྄𑍬\r
++B;    \u06CC𐨿.Ss\u0F84𑍬;      \u06CC𐨿.ss\u0F84𑍬;        xn--clb2593k.xn--ss-toj6092t    #       ی𐨿.ss྄𑍬\r
++T;    𝟠≮\u200C。󠅱\u17B4;     [C1 P1 V5 V6];  [P1 V5 V6]      #       8≮.\r
++N;    𝟠≮\u200C。󠅱\u17B4;     [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       8≮.\r
++T;    𝟠<\u0338\u200C。󠅱\u17B4; [C1 P1 V5 V6];  [P1 V5 V6]      #       8≮.\r
++N;    𝟠<\u0338\u200C。󠅱\u17B4; [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       8≮.\r
++T;    8≮\u200C。󠅱\u17B4;        [C1 P1 V5 V6];  [P1 V5 V6]      #       8≮.\r
++N;    8≮\u200C。󠅱\u17B4;        [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       8≮.\r
++T;    8<\u0338\u200C。󠅱\u17B4;    [C1 P1 V5 V6];  [P1 V5 V6]      #       8≮.\r
++N;    8<\u0338\u200C。󠅱\u17B4;    [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       8≮.\r
++B;    xn--8-ngo.xn--z3e;      [V5 V6];        [V5 V6] #       8≮.\r
++B;    xn--8-sgn10i.xn--z3e;   [C1 V5 V6];     [C1 V5 V6]      #       8≮.\r
++B;    ᢕ≯︒񄂯.Ⴀ;    [P1 V6];        [P1 V6]\r
++B;    ᢕ>\u0338︒񄂯.Ⴀ;        [P1 V6];        [P1 V6]\r
++B;    ᢕ≯。񄂯.Ⴀ;      [P1 V6];        [P1 V6]\r
++B;    ᢕ>\u0338。񄂯.Ⴀ;  [P1 V6];        [P1 V6]\r
++B;    ᢕ>\u0338。񄂯.ⴀ;  [P1 V6];        [P1 V6]\r
++B;    ᢕ≯。񄂯.ⴀ;      [P1 V6];        [P1 V6]\r
++B;    xn--fbf851c.xn--ko1u.xn--rkj;   [V6];   [V6]\r
++B;    xn--fbf851c.xn--ko1u.xn--7md;   [V6];   [V6]\r
++B;    ᢕ>\u0338︒񄂯.ⴀ;        [P1 V6];        [P1 V6]\r
++B;    ᢕ≯︒񄂯.ⴀ;    [P1 V6];        [P1 V6]\r
++B;    xn--fbf851cq98poxw1a.xn--rkj;   [V6];   [V6]\r
++B;    xn--fbf851cq98poxw1a.xn--7md;   [V6];   [V6]\r
++B;    \u0F9F.-\u082A;       [V3 V5];        [V3 V5] #       ྟ.-ࠪ\r
++B;    \u0F9F.-\u082A; [V3 V5];        [V3 V5] #       ྟ.-ࠪ\r
++B;    xn--vfd.xn----fhd;      [V3 V5];        [V3 V5] #       ྟ.-ࠪ\r
++B;    ᵬ󠆠.핒⒒⒈􈄦;        [P1 V6];        [P1 V6]\r
++B;    ᵬ󠆠.핒⒒⒈􈄦;  [P1 V6];        [P1 V6]\r
++B;    ᵬ󠆠.핒11.1.􈄦;   [P1 V6];        [P1 V6]\r
++B;    ᵬ󠆠.핒11.1.􈄦;     [P1 V6];        [P1 V6]\r
++B;    xn--tbg.xn--11-5o7k.1.xn--k469f;        [V6];   [V6]\r
++B;    xn--tbg.xn--tsht7586kyts9l;     [V6];   [V6]\r
++T;    ς𑓂𐋢.\u0668;    [B1];   [B1]    #       ς𑓂𐋢.٨\r
++N;    ς𑓂𐋢.\u0668;    [B1];   [B1]    #       ς𑓂𐋢.٨\r
++T;    ς𑓂𐋢.\u0668;      [B1];   [B1]    #       ς𑓂𐋢.٨\r
++N;    ς𑓂𐋢.\u0668;      [B1];   [B1]    #       ς𑓂𐋢.٨\r
++B;    Σ𑓂𐋢.\u0668;      [B1];   [B1]    #       σ𑓂𐋢.٨\r
++B;    σ𑓂𐋢.\u0668;      [B1];   [B1]    #       σ𑓂𐋢.٨\r
++B;    xn--4xa6371khhl.xn--hib;        [B1];   [B1]    #       σ𑓂𐋢.٨\r
++B;    xn--3xa8371khhl.xn--hib;        [B1];   [B1]    #       ς𑓂𐋢.٨\r
++B;    Σ𑓂𐋢.\u0668;    [B1];   [B1]    #       σ𑓂𐋢.٨\r
++B;    σ𑓂𐋢.\u0668;    [B1];   [B1]    #       σ𑓂𐋢.٨\r
++T;    \uA953\u200C𐋻\u200D.\u2DF8𞿄𐹲;  [B1 B6 C2 P1 V5 V6];    [B1 P1 V5 V6]   #       ꥓𐋻.ⷸ𐹲\r
++N;    \uA953\u200C𐋻\u200D.\u2DF8𞿄𐹲;  [B1 B6 C2 P1 V5 V6];    [B1 B6 C2 P1 V5 V6]     #       ꥓𐋻.ⷸ𐹲\r
++B;    xn--3j9a531o.xn--urju692efj0f;  [B1 V5 V6];     [B1 V5 V6]      #       ꥓𐋻.ⷸ𐹲\r
++B;    xn--0ugc8356he76c.xn--urju692efj0f;     [B1 B6 C2 V5 V6];       [B1 B6 C2 V5 V6]        #       ꥓𐋻.ⷸ𐹲\r
++B;    ⊼。񪧖\u0695;       [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       ⊼.ڕ\r
++B;    xn--ofh.xn--rjb13118f;  [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       ⊼.ڕ\r
++B;    𐯬񖋔。󜳥;        [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    xn--949co370q.xn--7g25e;        [B2 B3 V6];     [B2 B3 V6]\r
++T;    \u0601𑍧\u07DD。ς򬍘🀞\u17B5;    [B1 B6 P1 V6];  [B1 B6 P1 V6]   #       𑍧ߝ.ς🀞\r
++N;    \u0601𑍧\u07DD。ς򬍘🀞\u17B5;    [B1 B6 P1 V6];  [B1 B6 P1 V6]   #       𑍧ߝ.ς🀞\r
++B;    \u0601𑍧\u07DD。Σ򬍘🀞\u17B5;    [B1 B6 P1 V6];  [B1 B6 P1 V6]   #       𑍧ߝ.σ🀞\r
++B;    \u0601𑍧\u07DD。σ򬍘🀞\u17B5;    [B1 B6 P1 V6];  [B1 B6 P1 V6]   #       𑍧ߝ.σ🀞\r
++B;    xn--jfb66gt010c.xn--4xa623h9p95ars26d;  [B1 B6 V6];     [B1 B6 V6]      #       𑍧ߝ.σ🀞\r
++B;    xn--jfb66gt010c.xn--3xa823h9p95ars26d;  [B1 B6 V6];     [B1 B6 V6]      #       𑍧ߝ.ς🀞\r
++B;    -𐳲\u0646󠺐。\uABED𝟥;   [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       -𐳲ن.꯭3\r
++B;    -𐳲\u0646󠺐。\uABED3;      [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       -𐳲ن.꯭3\r
++B;    -𐲲\u0646󠺐。\uABED3;      [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       -𐳲ن.꯭3\r
++B;    xn----roc5482rek10i.xn--3-zw5e; [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       -𐳲ن.꯭3\r
++B;    -𐲲\u0646󠺐。\uABED𝟥;   [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       -𐳲ن.꯭3\r
++T;    \u200C󠴦。񲨕≮𐦜;       [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 P1 V6]        #       .≮𐦜\r
++N;    \u200C󠴦。񲨕≮𐦜;       [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .≮𐦜\r
++T;    \u200C󠴦。񲨕<\u0338𐦜;   [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 P1 V6]        #       .≮𐦜\r
++N;    \u200C󠴦。񲨕<\u0338𐦜;   [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .≮𐦜\r
++T;    \u200C󠴦。񲨕≮𐦜;       [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 P1 V6]        #       .≮𐦜\r
++N;    \u200C󠴦。񲨕≮𐦜;       [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .≮𐦜\r
++T;    \u200C󠴦。񲨕<\u0338𐦜;   [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 P1 V6]        #       .≮𐦜\r
++N;    \u200C󠴦。񲨕<\u0338𐦜;   [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .≮𐦜\r
++B;    xn--6v56e.xn--gdhz712gzlr6b;    [B1 B5 B6 V6];  [B1 B5 B6 V6]\r
++B;    xn--0ug22251l.xn--gdhz712gzlr6b;        [B1 B5 B6 C1 V6];       [B1 B5 B6 C1 V6]        #       .≮𐦜\r
++B;    ⒈✌򟬟.𝟡񠱣;  [P1 V6];        [P1 V6]\r
++B;    1.✌򟬟.9񠱣;        [P1 V6];        [P1 V6]\r
++B;    1.xn--7bi44996f.xn--9-o706d;    [V6];   [V6]\r
++B;    xn--tsh24g49550b.xn--9-o706d;   [V6];   [V6]\r
++B;    𑆾𞤬𐮆.\u0666\u1DD4;      [B1 V5];        [B1 V5] #       𑆾𞤬𐮆.٦ᷔ\r
++B;    𑆾𞤊𐮆.\u0666\u1DD4;      [B1 V5];        [B1 V5] #       𑆾𞤬𐮆.٦ᷔ\r
++B;    xn--d29c79hf98r.xn--fib011j;    [B1 V5];        [B1 V5] #       𑆾𞤬𐮆.٦ᷔ\r
++T;    ς.\uA9C0\uA8C4;      [V5];   [V5]    #       ς.꧀꣄\r
++N;    ς.\uA9C0\uA8C4;      [V5];   [V5]    #       ς.꧀꣄\r
++T;    ς.\uA9C0\uA8C4;        [V5];   [V5]    #       ς.꧀꣄\r
++N;    ς.\uA9C0\uA8C4;        [V5];   [V5]    #       ς.꧀꣄\r
++B;    Σ.\uA9C0\uA8C4;        [V5];   [V5]    #       σ.꧀꣄\r
++B;    σ.\uA9C0\uA8C4;        [V5];   [V5]    #       σ.꧀꣄\r
++B;    xn--4xa.xn--0f9ars;     [V5];   [V5]    #       σ.꧀꣄\r
++B;    xn--3xa.xn--0f9ars;     [V5];   [V5]    #       ς.꧀꣄\r
++B;    Σ.\uA9C0\uA8C4;      [V5];   [V5]    #       σ.꧀꣄\r
++B;    σ.\uA9C0\uA8C4;      [V5];   [V5]    #       σ.꧀꣄\r
++T;    𑰶\u200C≯𐳐.\u085B;     [B1 B3 B6 C1 P1 V5 V6]; [B1 B3 B6 P1 V5 V6]     #       𑰶≯𐳐.࡛\r
++N;    𑰶\u200C≯𐳐.\u085B;     [B1 B3 B6 C1 P1 V5 V6]; [B1 B3 B6 C1 P1 V5 V6]  #       𑰶≯𐳐.࡛\r
++T;    𑰶\u200C>\u0338𐳐.\u085B; [B1 B3 B6 C1 P1 V5 V6]; [B1 B3 B6 P1 V5 V6]     #       𑰶≯𐳐.࡛\r
++N;    𑰶\u200C>\u0338𐳐.\u085B; [B1 B3 B6 C1 P1 V5 V6]; [B1 B3 B6 C1 P1 V5 V6]  #       𑰶≯𐳐.࡛\r
++T;    𑰶\u200C≯𐳐.\u085B;       [B1 B3 B6 C1 P1 V5 V6]; [B1 B3 B6 P1 V5 V6]     #       𑰶≯𐳐.࡛\r
++N;    𑰶\u200C≯𐳐.\u085B;       [B1 B3 B6 C1 P1 V5 V6]; [B1 B3 B6 C1 P1 V5 V6]  #       𑰶≯𐳐.࡛\r
++T;    𑰶\u200C>\u0338𐳐.\u085B;   [B1 B3 B6 C1 P1 V5 V6]; [B1 B3 B6 P1 V5 V6]     #       𑰶≯𐳐.࡛\r
++N;    𑰶\u200C>\u0338𐳐.\u085B;   [B1 B3 B6 C1 P1 V5 V6]; [B1 B3 B6 C1 P1 V5 V6]  #       𑰶≯𐳐.࡛\r
++T;    𑰶\u200C>\u0338𐲐.\u085B;   [B1 B3 B6 C1 P1 V5 V6]; [B1 B3 B6 P1 V5 V6]     #       𑰶≯𐳐.࡛\r
++N;    𑰶\u200C>\u0338𐲐.\u085B;   [B1 B3 B6 C1 P1 V5 V6]; [B1 B3 B6 C1 P1 V5 V6]  #       𑰶≯𐳐.࡛\r
++T;    𑰶\u200C≯𐲐.\u085B;       [B1 B3 B6 C1 P1 V5 V6]; [B1 B3 B6 P1 V5 V6]     #       𑰶≯𐳐.࡛\r
++N;    𑰶\u200C≯𐲐.\u085B;       [B1 B3 B6 C1 P1 V5 V6]; [B1 B3 B6 C1 P1 V5 V6]  #       𑰶≯𐳐.࡛\r
++B;    xn--hdhz343g3wj.xn--qwb;        [B1 B3 B6 V5 V6];       [B1 B3 B6 V5 V6]        #       𑰶≯𐳐.࡛\r
++B;    xn--0ug06g7697ap4ma.xn--qwb;    [B1 B3 B6 C1 V5 V6];    [B1 B3 B6 C1 V5 V6]     #       𑰶≯𐳐.࡛\r
++T;    𑰶\u200C>\u0338𐲐.\u085B; [B1 B3 B6 C1 P1 V5 V6]; [B1 B3 B6 P1 V5 V6]     #       𑰶≯𐳐.࡛\r
++N;    𑰶\u200C>\u0338𐲐.\u085B; [B1 B3 B6 C1 P1 V5 V6]; [B1 B3 B6 C1 P1 V5 V6]  #       𑰶≯𐳐.࡛\r
++T;    𑰶\u200C≯𐲐.\u085B;     [B1 B3 B6 C1 P1 V5 V6]; [B1 B3 B6 P1 V5 V6]     #       𑰶≯𐳐.࡛\r
++N;    𑰶\u200C≯𐲐.\u085B;     [B1 B3 B6 C1 P1 V5 V6]; [B1 B3 B6 C1 P1 V5 V6]  #       𑰶≯𐳐.࡛\r
++B;    羚。≯;      [P1 V6];        [P1 V6]\r
++B;    羚。>\u0338;  [P1 V6];        [P1 V6]\r
++B;    羚。≯;      [P1 V6];        [P1 V6]\r
++B;    羚。>\u0338;  [P1 V6];        [P1 V6]\r
++B;    xn--xt0a.xn--hdh;       [V6];   [V6]\r
++B;    𑓂\u1759.\u08A8;    [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𑓂.ࢨ\r
++B;    𑓂\u1759.\u08A8;      [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𑓂.ࢨ\r
++B;    xn--e1e9580k.xn--xyb;   [B1 V5 V6];     [B1 V5 V6]      #       𑓂.ࢨ\r
++T;    󨣿󠇀\u200D。\u0663ҠჀ𝟑;       [B1 B6 C2 P1 V6];       [B1 P1 V6]      #       .٣ҡჀ3\r
++N;    󨣿󠇀\u200D。\u0663ҠჀ𝟑;       [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       .٣ҡჀ3\r
++T;    󨣿󠇀\u200D。\u0663ҠჀ3;  [B1 B6 C2 P1 V6];       [B1 P1 V6]      #       .٣ҡჀ3\r
++N;    󨣿󠇀\u200D。\u0663ҠჀ3;  [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       .٣ҡჀ3\r
++T;    󨣿󠇀\u200D。\u0663ҡⴠ3;  [B1 B6 C2 P1 V6];       [B1 P1 V6]      #       .٣ҡⴠ3\r
++N;    󨣿󠇀\u200D。\u0663ҡⴠ3;  [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       .٣ҡⴠ3\r
++T;    󨣿󠇀\u200D。\u0663Ҡⴠ3;  [B1 B6 C2 P1 V6];       [B1 P1 V6]      #       .٣ҡⴠ3\r
++N;    󨣿󠇀\u200D。\u0663Ҡⴠ3;  [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       .٣ҡⴠ3\r
++B;    xn--1r19e.xn--3-ozb36ko13f;     [B1 V6];        [B1 V6] #       .٣ҡⴠ3\r
++B;    xn--1ug89936l.xn--3-ozb36ko13f; [B1 B6 C2 V6];  [B1 B6 C2 V6]   #       .٣ҡⴠ3\r
++B;    xn--1r19e.xn--3-ozb36kixu;      [B1 V6];        [B1 V6] #       .٣ҡჀ3\r
++B;    xn--1ug89936l.xn--3-ozb36kixu;  [B1 B6 C2 V6];  [B1 B6 C2 V6]   #       .٣ҡჀ3\r
++T;    󨣿󠇀\u200D。\u0663ҡⴠ𝟑;       [B1 B6 C2 P1 V6];       [B1 P1 V6]      #       .٣ҡⴠ3\r
++N;    󨣿󠇀\u200D。\u0663ҡⴠ𝟑;       [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       .٣ҡⴠ3\r
++T;    󨣿󠇀\u200D。\u0663Ҡⴠ𝟑;       [B1 B6 C2 P1 V6];       [B1 P1 V6]      #       .٣ҡⴠ3\r
++N;    󨣿󠇀\u200D。\u0663Ҡⴠ𝟑;       [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       .٣ҡⴠ3\r
++B;    ᡷ。𐹢\u08E0;       [B1];   [B1]    #       ᡷ.𐹢࣠\r
++B;    xn--k9e.xn--j0b5005k;   [B1];   [B1]    #       ᡷ.𐹢࣠\r
++T;    򕮇\u1BF3。\u0666񗜼\u17D2ß;        [B1 P1 V6];     [B1 P1 V6]      #       ᯳.٦្ß\r
++N;    򕮇\u1BF3。\u0666񗜼\u17D2ß;        [B1 P1 V6];     [B1 P1 V6]      #       ᯳.٦្ß\r
++T;    򕮇\u1BF3。\u0666񗜼\u17D2ß;        [B1 P1 V6];     [B1 P1 V6]      #       ᯳.٦្ß\r
++N;    򕮇\u1BF3。\u0666񗜼\u17D2ß;        [B1 P1 V6];     [B1 P1 V6]      #       ᯳.٦្ß\r
++B;    򕮇\u1BF3。\u0666񗜼\u17D2SS;        [B1 P1 V6];     [B1 P1 V6]      #       ᯳.٦្ss\r
++B;    򕮇\u1BF3。\u0666񗜼\u17D2ss;        [B1 P1 V6];     [B1 P1 V6]      #       ᯳.٦្ss\r
++B;    򕮇\u1BF3。\u0666񗜼\u17D2Ss;        [B1 P1 V6];     [B1 P1 V6]      #       ᯳.٦្ss\r
++B;    xn--1zf58212h.xn--ss-pyd459o3258m;      [B1 V6];        [B1 V6] #       ᯳.٦្ss\r
++B;    xn--1zf58212h.xn--zca34zk4qx711k;       [B1 V6];        [B1 V6] #       ᯳.٦្ß\r
++B;    򕮇\u1BF3。\u0666񗜼\u17D2SS;        [B1 P1 V6];     [B1 P1 V6]      #       ᯳.٦្ss\r
++B;    򕮇\u1BF3。\u0666񗜼\u17D2ss;        [B1 P1 V6];     [B1 P1 V6]      #       ᯳.٦្ss\r
++B;    򕮇\u1BF3。\u0666񗜼\u17D2Ss;        [B1 P1 V6];     [B1 P1 V6]      #       ᯳.٦្ss\r
++B;    \u0664򤽎𑲛.󠔢︒≠;      [B1 P1 V6];     [B1 P1 V6]      #       ٤𑲛.︒≠\r
++B;    \u0664򤽎𑲛.󠔢︒=\u0338;  [B1 P1 V6];     [B1 P1 V6]      #       ٤𑲛.︒≠\r
++B;    \u0664򤽎𑲛.󠔢。≠;      [B1 P1 V6];     [B1 P1 V6]      #       ٤𑲛..≠\r
++B;    \u0664򤽎𑲛.󠔢。=\u0338;  [B1 P1 V6];     [B1 P1 V6]      #       ٤𑲛..≠\r
++B;    xn--dib0653l2i02d.xn--k736e.xn--1ch;    [B1 V6];        [B1 V6] #       ٤𑲛..≠\r
++B;    xn--dib0653l2i02d.xn--1ch7467f14u4g;    [B1 V6];        [B1 V6] #       ٤𑲛.︒≠\r
++B;    ➆񷧕ỗ⒈.򑬒񡘮\u085B𝟫;     [P1 V6];        [P1 V6] #       ➆ỗ⒈.࡛9\r
++B;    ➆񷧕o\u0302\u0303⒈.򑬒񡘮\u085B𝟫;   [P1 V6];        [P1 V6] #       ➆ỗ⒈.࡛9\r
++B;    ➆񷧕ỗ1..򑬒񡘮\u085B9;   [P1 V6 A4_2];   [P1 V6 A4_2]    #       ➆ỗ1..࡛9\r
++B;    ➆񷧕o\u0302\u03031..򑬒񡘮\u085B9; [P1 V6 A4_2];   [P1 V6 A4_2]    #       ➆ỗ1..࡛9\r
++B;    ➆񷧕O\u0302\u03031..򑬒񡘮\u085B9; [P1 V6 A4_2];   [P1 V6 A4_2]    #       ➆ỗ1..࡛9\r
++B;    ➆񷧕Ỗ1..򑬒񡘮\u085B9;   [P1 V6 A4_2];   [P1 V6 A4_2]    #       ➆ỗ1..࡛9\r
++B;    xn--1-3xm292b6044r..xn--9-6jd87310jtcqs;        [V6 A4_2];      [V6 A4_2]       #       ➆ỗ1..࡛9\r
++B;    ➆񷧕O\u0302\u0303⒈.򑬒񡘮\u085B𝟫;   [P1 V6];        [P1 V6] #       ➆ỗ⒈.࡛9\r
++B;    ➆񷧕Ỗ⒈.򑬒񡘮\u085B𝟫;     [P1 V6];        [P1 V6] #       ➆ỗ⒈.࡛9\r
++B;    xn--6lg26tvvc6v99z.xn--9-6jd87310jtcqs; [V6];   [V6]    #       ➆ỗ⒈.࡛9\r
++T;    \u200D。𞤘;  [B1 C2];        [A4_2]  #       .𞤺\r
++N;    \u200D。𞤘;  [B1 C2];        [B1 C2] #       .𞤺\r
++T;    \u200D。𞤘;  [B1 C2];        [A4_2]  #       .𞤺\r
++N;    \u200D。𞤘;  [B1 C2];        [B1 C2] #       .𞤺\r
++T;    \u200D。𞤺;  [B1 C2];        [A4_2]  #       .𞤺\r
++N;    \u200D。𞤺;  [B1 C2];        [B1 C2] #       .𞤺\r
++B;    .xn--ye6h;      [A4_2]; [A4_2]\r
++B;    xn--1ug.xn--ye6h;       [B1 C2];        [B1 C2] #       .𞤺\r
++T;    \u200D。𞤺;  [B1 C2];        [A4_2]  #       .𞤺\r
++N;    \u200D。𞤺;  [B1 C2];        [B1 C2] #       .𞤺\r
++B;    xn--ye6h;       𞤺;   xn--ye6h\r
++B;    𞤺;   ;       xn--ye6h\r
++B;    𞤘;   𞤺;   xn--ye6h\r
++B;    \u0829\u0724.ᢣ;       [B1 V5];        [B1 V5] #       ࠩܤ.ᢣ\r
++B;    xn--unb53c.xn--tbf;     [B1 V5];        [B1 V5] #       ࠩܤ.ᢣ\r
++T;    \u073C\u200C-。𓐾ß; [C1 P1 V3 V5 V6];       [P1 V3 V5 V6]   #       ܼ-.ß\r
++N;    \u073C\u200C-。𓐾ß; [C1 P1 V3 V5 V6];       [C1 P1 V3 V5 V6]        #       ܼ-.ß\r
++T;    \u073C\u200C-。𓐾SS; [C1 P1 V3 V5 V6];       [P1 V3 V5 V6]   #       ܼ-.ss\r
++N;    \u073C\u200C-。𓐾SS; [C1 P1 V3 V5 V6];       [C1 P1 V3 V5 V6]        #       ܼ-.ss\r
++T;    \u073C\u200C-。𓐾ss; [C1 P1 V3 V5 V6];       [P1 V3 V5 V6]   #       ܼ-.ss\r
++N;    \u073C\u200C-。𓐾ss; [C1 P1 V3 V5 V6];       [C1 P1 V3 V5 V6]        #       ܼ-.ss\r
++T;    \u073C\u200C-。𓐾Ss; [C1 P1 V3 V5 V6];       [P1 V3 V5 V6]   #       ܼ-.ss\r
++N;    \u073C\u200C-。𓐾Ss; [C1 P1 V3 V5 V6];       [C1 P1 V3 V5 V6]        #       ܼ-.ss\r
++B;    xn----s2c.xn--ss-066q;  [V3 V5 V6];     [V3 V5 V6]      #       ܼ-.ss\r
++B;    xn----s2c071q.xn--ss-066q;      [C1 V3 V5 V6];  [C1 V3 V5 V6]   #       ܼ-.ss\r
++B;    xn----s2c071q.xn--zca7848m;     [C1 V3 V5 V6];  [C1 V3 V5 V6]   #       ܼ-.ß\r
++T;    \u200Cς🃡⒗.\u0CC6仧\u0756;        [B1 B5 B6 C1 P1 V5 V6]; [B5 B6 P1 V5 V6]        #       ς🃡⒗.ೆ仧ݖ\r
++N;    \u200Cς🃡⒗.\u0CC6仧\u0756;        [B1 B5 B6 C1 P1 V5 V6]; [B1 B5 B6 C1 P1 V5 V6]  #       ς🃡⒗.ೆ仧ݖ\r
++T;    \u200Cς🃡16..\u0CC6仧\u0756;        [B1 B5 B6 C1 V5 A4_2];  [B5 B6 V5 A4_2] #       ς🃡16..ೆ仧ݖ\r
++N;    \u200Cς🃡16..\u0CC6仧\u0756;        [B1 B5 B6 C1 V5 A4_2];  [B1 B5 B6 C1 V5 A4_2]   #       ς🃡16..ೆ仧ݖ\r
++T;    \u200CΣ🃡16..\u0CC6仧\u0756;        [B1 B5 B6 C1 V5 A4_2];  [B5 B6 V5 A4_2] #       σ🃡16..ೆ仧ݖ\r
++N;    \u200CΣ🃡16..\u0CC6仧\u0756;        [B1 B5 B6 C1 V5 A4_2];  [B1 B5 B6 C1 V5 A4_2]   #       σ🃡16..ೆ仧ݖ\r
++T;    \u200Cσ🃡16..\u0CC6仧\u0756;        [B1 B5 B6 C1 V5 A4_2];  [B5 B6 V5 A4_2] #       σ🃡16..ೆ仧ݖ\r
++N;    \u200Cσ🃡16..\u0CC6仧\u0756;        [B1 B5 B6 C1 V5 A4_2];  [B1 B5 B6 C1 V5 A4_2]   #       σ🃡16..ೆ仧ݖ\r
++B;    xn--16-ubc66061c..xn--9ob79ycx2e;       [B5 B6 V5 A4_2];        [B5 B6 V5 A4_2] #       σ🃡16..ೆ仧ݖ\r
++B;    xn--16-ubc7700avy99b..xn--9ob79ycx2e;   [B1 B5 B6 C1 V5 A4_2];  [B1 B5 B6 C1 V5 A4_2]   #       σ🃡16..ೆ仧ݖ\r
++B;    xn--16-rbc1800avy99b..xn--9ob79ycx2e;   [B1 B5 B6 C1 V5 A4_2];  [B1 B5 B6 C1 V5 A4_2]   #       ς🃡16..ೆ仧ݖ\r
++T;    \u200CΣ🃡⒗.\u0CC6仧\u0756;        [B1 B5 B6 C1 P1 V5 V6]; [B5 B6 P1 V5 V6]        #       σ🃡⒗.ೆ仧ݖ\r
++N;    \u200CΣ🃡⒗.\u0CC6仧\u0756;        [B1 B5 B6 C1 P1 V5 V6]; [B1 B5 B6 C1 P1 V5 V6]  #       σ🃡⒗.ೆ仧ݖ\r
++T;    \u200Cσ🃡⒗.\u0CC6仧\u0756;        [B1 B5 B6 C1 P1 V5 V6]; [B5 B6 P1 V5 V6]        #       σ🃡⒗.ೆ仧ݖ\r
++N;    \u200Cσ🃡⒗.\u0CC6仧\u0756;        [B1 B5 B6 C1 P1 V5 V6]; [B1 B5 B6 C1 P1 V5 V6]  #       σ🃡⒗.ೆ仧ݖ\r
++B;    xn--4xa229nbu92a.xn--9ob79ycx2e;        [B5 B6 V5 V6];  [B5 B6 V5 V6]   #       σ🃡⒗.ೆ仧ݖ\r
++B;    xn--4xa595lz9czy52d.xn--9ob79ycx2e;     [B1 B5 B6 C1 V5 V6];    [B1 B5 B6 C1 V5 V6]     #       σ🃡⒗.ೆ仧ݖ\r
++B;    xn--3xa795lz9czy52d.xn--9ob79ycx2e;     [B1 B5 B6 C1 V5 V6];    [B1 B5 B6 C1 V5 V6]     #       ς🃡⒗.ೆ仧ݖ\r
++B;    -.𞸚; [B1 V3];        [B1 V3] #       -.ظ\r
++B;    -.\u0638;       [B1 V3];        [B1 V3] #       -.ظ\r
++B;    -.xn--3gb;      [B1 V3];        [B1 V3] #       -.ظ\r
++B;    򏛓\u0683.\u0F7E\u0634;        [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ڃ.ཾش\r
++B;    xn--8ib92728i.xn--zgb968b;      [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       ڃ.ཾش\r
++B;    \u0FE6\u0843񽶬.𐮏;  [B5 P1 V6];     [B5 P1 V6]      #       ࡃ.𐮏\r
++B;    xn--1vb320b5m04p.xn--m29c;      [B5 V6];        [B5 V6] #       ࡃ.𐮏\r
++T;    2񎨠\u07CBß。ᠽ;    [B1 P1 V6];     [B1 P1 V6]      #       2ߋß.ᠽ\r
++N;    2񎨠\u07CBß。ᠽ;    [B1 P1 V6];     [B1 P1 V6]      #       2ߋß.ᠽ\r
++B;    2񎨠\u07CBSS。ᠽ;    [B1 P1 V6];     [B1 P1 V6]      #       2ߋss.ᠽ\r
++B;    2񎨠\u07CBss。ᠽ;    [B1 P1 V6];     [B1 P1 V6]      #       2ߋss.ᠽ\r
++B;    2񎨠\u07CBSs。ᠽ;    [B1 P1 V6];     [B1 P1 V6]      #       2ߋss.ᠽ\r
++B;    xn--2ss-odg83511n.xn--w7e;      [B1 V6];        [B1 V6] #       2ߋss.ᠽ\r
++B;    xn--2-qfa924cez02l.xn--w7e;     [B1 V6];        [B1 V6] #       2ߋß.ᠽ\r
++T;    㸳\u07CA≮.\u06CEß-\u200D; [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       㸳ߊ≮.ێß-\r
++N;    㸳\u07CA≮.\u06CEß-\u200D; [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       㸳ߊ≮.ێß-\r
++T;    㸳\u07CA<\u0338.\u06CEß-\u200D;     [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       㸳ߊ≮.ێß-\r
++N;    㸳\u07CA<\u0338.\u06CEß-\u200D;     [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       㸳ߊ≮.ێß-\r
++T;    㸳\u07CA≮.\u06CEß-\u200D;   [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       㸳ߊ≮.ێß-\r
++N;    㸳\u07CA≮.\u06CEß-\u200D;   [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       㸳ߊ≮.ێß-\r
++T;    㸳\u07CA<\u0338.\u06CEß-\u200D;       [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       㸳ߊ≮.ێß-\r
++N;    㸳\u07CA<\u0338.\u06CEß-\u200D;       [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       㸳ߊ≮.ێß-\r
++T;    㸳\u07CA<\u0338.\u06CESS-\u200D;       [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       㸳ߊ≮.ێss-\r
++N;    㸳\u07CA<\u0338.\u06CESS-\u200D;       [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       㸳ߊ≮.ێss-\r
++T;    㸳\u07CA≮.\u06CESS-\u200D;   [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       㸳ߊ≮.ێss-\r
++N;    㸳\u07CA≮.\u06CESS-\u200D;   [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       㸳ߊ≮.ێss-\r
++T;    㸳\u07CA≮.\u06CEss-\u200D;   [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       㸳ߊ≮.ێss-\r
++N;    㸳\u07CA≮.\u06CEss-\u200D;   [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       㸳ߊ≮.ێss-\r
++T;    㸳\u07CA<\u0338.\u06CEss-\u200D;       [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       㸳ߊ≮.ێss-\r
++N;    㸳\u07CA<\u0338.\u06CEss-\u200D;       [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       㸳ߊ≮.ێss-\r
++T;    㸳\u07CA<\u0338.\u06CESs-\u200D;       [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       㸳ߊ≮.ێss-\r
++N;    㸳\u07CA<\u0338.\u06CESs-\u200D;       [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       㸳ߊ≮.ێss-\r
++T;    㸳\u07CA≮.\u06CESs-\u200D;   [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       㸳ߊ≮.ێss-\r
++N;    㸳\u07CA≮.\u06CESs-\u200D;   [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       㸳ߊ≮.ێss-\r
++B;    xn--lsb457kkut.xn--ss--qjf;     [B2 B3 B5 B6 V3 V6];    [B2 B3 B5 B6 V3 V6]     #       㸳ߊ≮.ێss-\r
++B;    xn--lsb457kkut.xn--ss--qjf2343a;        [B2 B3 B5 B6 C2 V6];    [B2 B3 B5 B6 C2 V6]     #       㸳ߊ≮.ێss-\r
++B;    xn--lsb457kkut.xn----pfa076bys4a;       [B2 B3 B5 B6 C2 V6];    [B2 B3 B5 B6 C2 V6]     #       㸳ߊ≮.ێß-\r
++T;    㸳\u07CA<\u0338.\u06CESS-\u200D;     [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       㸳ߊ≮.ێss-\r
++N;    㸳\u07CA<\u0338.\u06CESS-\u200D;     [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       㸳ߊ≮.ێss-\r
++T;    㸳\u07CA≮.\u06CESS-\u200D; [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       㸳ߊ≮.ێss-\r
++N;    㸳\u07CA≮.\u06CESS-\u200D; [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       㸳ߊ≮.ێss-\r
++T;    㸳\u07CA≮.\u06CEss-\u200D; [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       㸳ߊ≮.ێss-\r
++N;    㸳\u07CA≮.\u06CEss-\u200D; [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       㸳ߊ≮.ێss-\r
++T;    㸳\u07CA<\u0338.\u06CEss-\u200D;     [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       㸳ߊ≮.ێss-\r
++N;    㸳\u07CA<\u0338.\u06CEss-\u200D;     [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       㸳ߊ≮.ێss-\r
++T;    㸳\u07CA<\u0338.\u06CESs-\u200D;     [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       㸳ߊ≮.ێss-\r
++N;    㸳\u07CA<\u0338.\u06CESs-\u200D;     [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       㸳ߊ≮.ێss-\r
++T;    㸳\u07CA≮.\u06CESs-\u200D; [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V3 V6]  #       㸳ߊ≮.ێss-\r
++N;    㸳\u07CA≮.\u06CESs-\u200D; [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       㸳ߊ≮.ێss-\r
++B;    -򷝬\u135E𑜧.\u1DEB-︒;     [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       -፞𑜧.ᷫ-︒\r
++B;    -򷝬\u135E𑜧.\u1DEB-。;     [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       -፞𑜧.ᷫ-.\r
++B;    xn----b5h1837n2ok9f.xn----mkm.; [V3 V5 V6];     [V3 V5 V6]      #       -፞𑜧.ᷫ-.\r
++B;    xn----b5h1837n2ok9f.xn----mkmw278h;     [V3 V5 V6];     [V3 V5 V6]      #       -፞𑜧.ᷫ-︒\r
++B;    ︒.򚠡\u1A59; [P1 V6];        [P1 V6] #       ︒.ᩙ\r
++B;    。.򚠡\u1A59; [P1 V6 A4_2];   [P1 V6 A4_2]    #       ..ᩙ\r
++B;    ..xn--cof61594i;        [V6 A4_2];      [V6 A4_2]       #       ..ᩙ\r
++B;    xn--y86c.xn--cof61594i; [V6];   [V6]    #       ︒.ᩙ\r
++T;    \u0323\u2DE1。\u200C⓾\u200C\u06B9;   [B1 B3 B6 C1 V5];       [B1 B3 B6 V5]   #       ̣ⷡ.⓾ڹ\r
++N;    \u0323\u2DE1。\u200C⓾\u200C\u06B9;   [B1 B3 B6 C1 V5];       [B1 B3 B6 C1 V5]        #       ̣ⷡ.⓾ڹ\r
++B;    xn--kta899s.xn--skb116m;        [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ̣ⷡ.⓾ڹ\r
++B;    xn--kta899s.xn--skb970ka771c;   [B1 B3 B6 C1 V5];       [B1 B3 B6 C1 V5]        #       ̣ⷡ.⓾ڹ\r
++B;    𞠶ᠴ\u06DD。\u1074𞤵󠅦; [B1 B2 P1 V5 V6];       [B1 B2 P1 V5 V6]        #       𞠶ᠴ.ၴ𞤵\r
++B;    𞠶ᠴ\u06DD。\u1074𞤵󠅦; [B1 B2 P1 V5 V6];       [B1 B2 P1 V5 V6]        #       𞠶ᠴ.ၴ𞤵\r
++B;    𞠶ᠴ\u06DD。\u1074𞤓󠅦; [B1 B2 P1 V5 V6];       [B1 B2 P1 V5 V6]        #       𞠶ᠴ.ၴ𞤵\r
++B;    xn--tlb199fwl35a.xn--yld4613v;  [B1 B2 V5 V6];  [B1 B2 V5 V6]   #       𞠶ᠴ.ၴ𞤵\r
++B;    𞠶ᠴ\u06DD。\u1074𞤓󠅦; [B1 B2 P1 V5 V6];       [B1 B2 P1 V5 V6]        #       𞠶ᠴ.ၴ𞤵\r
++B;    𑰺.-򑟏;     [P1 V3 V5 V6];  [P1 V3 V5 V6]\r
++B;    xn--jk3d.xn----iz68g;   [V3 V5 V6];     [V3 V5 V6]\r
++B;    󠻩.赏;     [P1 V6];        [P1 V6]\r
++B;    󠻩.赏;       [P1 V6];        [P1 V6]\r
++B;    xn--2856e.xn--6o3a;     [V6];   [V6]\r
++B;    \u06B0ᠡ。Ⴁ;        [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ڰᠡ.Ⴁ\r
++B;    \u06B0ᠡ。Ⴁ;        [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       ڰᠡ.Ⴁ\r
++B;    \u06B0ᠡ。ⴁ;        [B2 B3];        [B2 B3] #       ڰᠡ.ⴁ\r
++B;    xn--jkb440g.xn--skj;    [B2 B3];        [B2 B3] #       ڰᠡ.ⴁ\r
++B;    xn--jkb440g.xn--8md;    [B2 B3 V6];     [B2 B3 V6]      #       ڰᠡ.Ⴁ\r
++B;    \u06B0ᠡ。ⴁ;        [B2 B3];        [B2 B3] #       ڰᠡ.ⴁ\r
++T;    \u20DEႪ\u06BBς。-;  [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ⃞Ⴊڻς.-\r
++N;    \u20DEႪ\u06BBς。-;  [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ⃞Ⴊڻς.-\r
++T;    \u20DEႪ\u06BBς。-;  [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ⃞Ⴊڻς.-\r
++N;    \u20DEႪ\u06BBς。-;  [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ⃞Ⴊڻς.-\r
++T;    \u20DEⴊ\u06BBς。-;  [B1 V3 V5];     [B1 V3 V5]      #       ⃞ⴊڻς.-\r
++N;    \u20DEⴊ\u06BBς。-;  [B1 V3 V5];     [B1 V3 V5]      #       ⃞ⴊڻς.-\r
++B;    \u20DEႪ\u06BBΣ。-;  [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ⃞Ⴊڻσ.-\r
++B;    \u20DEⴊ\u06BBσ。-;  [B1 V3 V5];     [B1 V3 V5]      #       ⃞ⴊڻσ.-\r
++B;    \u20DEႪ\u06BBσ。-;  [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ⃞Ⴊڻσ.-\r
++B;    xn--4xa33m7zmb0q.-;     [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       ⃞Ⴊڻσ.-\r
++B;    xn--4xa33mr38aeel.-;    [B1 V3 V5];     [B1 V3 V5]      #       ⃞ⴊڻσ.-\r
++B;    xn--3xa53mr38aeel.-;    [B1 V3 V5];     [B1 V3 V5]      #       ⃞ⴊڻς.-\r
++B;    xn--3xa53m7zmb0q.-;     [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       ⃞Ⴊڻς.-\r
++T;    \u20DEⴊ\u06BBς。-;  [B1 V3 V5];     [B1 V3 V5]      #       ⃞ⴊڻς.-\r
++N;    \u20DEⴊ\u06BBς。-;  [B1 V3 V5];     [B1 V3 V5]      #       ⃞ⴊڻς.-\r
++B;    \u20DEႪ\u06BBΣ。-;  [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ⃞Ⴊڻσ.-\r
++B;    \u20DEⴊ\u06BBσ。-;  [B1 V3 V5];     [B1 V3 V5]      #       ⃞ⴊڻσ.-\r
++B;    \u20DEႪ\u06BBσ。-;  [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ⃞Ⴊڻσ.-\r
++T;    Ⴍ.񍇦\u200C;       [C1 P1 V6];     [P1 V6] #       Ⴍ.\r
++N;    Ⴍ.񍇦\u200C;       [C1 P1 V6];     [C1 P1 V6]      #       Ⴍ.\r
++T;    Ⴍ.񍇦\u200C; [C1 P1 V6];     [P1 V6] #       Ⴍ.\r
++N;    Ⴍ.񍇦\u200C; [C1 P1 V6];     [C1 P1 V6]      #       Ⴍ.\r
++T;    ⴍ.񍇦\u200C; [C1 P1 V6];     [P1 V6] #       ⴍ.\r
++N;    ⴍ.񍇦\u200C; [C1 P1 V6];     [C1 P1 V6]      #       ⴍ.\r
++B;    xn--4kj.xn--p01x;       [V6];   [V6]\r
++B;    xn--4kj.xn--0ug56448b;  [C1 V6];        [C1 V6] #       ⴍ.\r
++B;    xn--lnd.xn--p01x;       [V6];   [V6]\r
++B;    xn--lnd.xn--0ug56448b;  [C1 V6];        [C1 V6] #       Ⴍ.\r
++T;    ⴍ.񍇦\u200C;       [C1 P1 V6];     [P1 V6] #       ⴍ.\r
++N;    ⴍ.񍇦\u200C;       [C1 P1 V6];     [C1 P1 V6]      #       ⴍ.\r
++B;    򉟂󠵣.𐫫\u1A60󴺖\u1B44;  [B2 B3 B6 P1 V6];       [B2 B3 B6 P1 V6]        #       .𐫫᩠᭄\r
++B;    xn--9u37blu98h.xn--jof13bt568cork1j;    [B2 B3 B6 V6];  [B2 B3 B6 V6]   #       .𐫫᩠᭄\r
++B;    ≯❊ᠯ。𐹱⺨;    [B1 P1 V6];     [B1 P1 V6]\r
++B;    >\u0338❊ᠯ。𐹱⺨;        [B1 P1 V6];     [B1 P1 V6]\r
++B;    ≯❊ᠯ。𐹱⺨;    [B1 P1 V6];     [B1 P1 V6]\r
++B;    >\u0338❊ᠯ。𐹱⺨;        [B1 P1 V6];     [B1 P1 V6]\r
++B;    xn--i7e163ct2d.xn--vwj7372e;    [B1 V6];        [B1 V6]\r
++B;    􁕜𐹧𞭁𐹩。Ⴈ𐫮Ⴏ;  [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++B;    􁕜𐹧𞭁𐹩。ⴈ𐫮ⴏ;  [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++B;    xn--fo0de1270ope54j.xn--zkjo0151o;      [B5 B6 V6];     [B5 B6 V6]\r
++B;    xn--fo0de1270ope54j.xn--gndo2033q;      [B5 B6 V6];     [B5 B6 V6]\r
++B;    𞠂。\uA926;  [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       𞠂.ꤦ\r
++B;    xn--145h.xn--ti9a;      [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       𞠂.ꤦ\r
++B;    𝟔𐹫.\u0733\u10379ꡇ;  [B1 V5];        [B1 V5] #       6𐹫.့ܳ9ꡇ\r
++B;    𝟔𐹫.\u1037\u07339ꡇ;  [B1 V5];        [B1 V5] #       6𐹫.့ܳ9ꡇ\r
++B;    6𐹫.\u1037\u07339ꡇ; [B1 V5];        [B1 V5] #       6𐹫.့ܳ9ꡇ\r
++B;    xn--6-t26i.xn--9-91c730e8u8n;   [B1 V5];        [B1 V5] #       6𐹫.့ܳ9ꡇ\r
++B;    \u0724\u0603𞲶.\u06D8;      [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       ܤ.ۘ\r
++B;    \u0724\u0603𞲶.\u06D8;        [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       ܤ.ۘ\r
++B;    xn--lfb19ct414i.xn--olb;        [B1 B3 B6 V5 V6];       [B1 B3 B6 V5 V6]        #       ܤ.ۘ\r
++T;    ✆񱔩ꡋ.\u0632\u200D𞣴;  [B1 C2 P1 V6];  [B1 P1 V6]      #       ✆ꡋ.ز\r
++N;    ✆񱔩ꡋ.\u0632\u200D𞣴;  [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       ✆ꡋ.ز\r
++T;    ✆񱔩ꡋ.\u0632\u200D𞣴;    [B1 C2 P1 V6];  [B1 P1 V6]      #       ✆ꡋ.ز\r
++N;    ✆񱔩ꡋ.\u0632\u200D𞣴;    [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       ✆ꡋ.ز\r
++B;    xn--1biv525bcix0d.xn--xgb6828v; [B1 V6];        [B1 V6] #       ✆ꡋ.ز\r
++B;    xn--1biv525bcix0d.xn--xgb253k0m73a;     [B1 C2 V6];     [B1 C2 V6]      #       ✆ꡋ.ز\r
++B;    \u0845񃾰𞸍-.≠򃁟𑋪;  [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       ࡅن-.≠𑋪\r
++B;    \u0845񃾰𞸍-.=\u0338򃁟𑋪;      [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       ࡅن-.≠𑋪\r
++B;    \u0845񃾰\u0646-.≠򃁟𑋪;  [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       ࡅن-.≠𑋪\r
++B;    \u0845񃾰\u0646-.=\u0338򃁟𑋪;      [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       ࡅن-.≠𑋪\r
++B;    xn----qoc64my971s.xn--1ch7585g76o3c;    [B1 B2 B3 V3 V6];       [B1 B2 B3 V3 V6]        #       ࡅن-.≠𑋪\r
++B;    𝟛.笠;     3.笠;  3.xn--6vz\r
++B;    𝟛.笠;     3.笠;  3.xn--6vz\r
++B;    3.笠;  ;       3.xn--6vz\r
++B;    3.xn--6vz;      3.笠;  3.xn--6vz\r
++T;    -\u200D.Ⴞ𐋷;        [C2 P1 V3 V6];  [P1 V3 V6]      #       -.Ⴞ𐋷\r
++N;    -\u200D.Ⴞ𐋷;        [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       -.Ⴞ𐋷\r
++T;    -\u200D.ⴞ𐋷;        [C2 V3];        [V3]    #       -.ⴞ𐋷\r
++N;    -\u200D.ⴞ𐋷;        [C2 V3];        [C2 V3] #       -.ⴞ𐋷\r
++B;    -.xn--mlj8559d; [V3];   [V3]\r
++B;    xn----ugn.xn--mlj8559d; [C2 V3];        [C2 V3] #       -.ⴞ𐋷\r
++B;    -.xn--2nd2315j; [V3 V6];        [V3 V6]\r
++B;    xn----ugn.xn--2nd2315j; [C2 V3 V6];     [C2 V3 V6]      #       -.Ⴞ𐋷\r
++T;    \u200Dςß\u0731.\u0BCD;      [C2 V5];        [V5]    #       ςßܱ.்\r
++N;    \u200Dςß\u0731.\u0BCD;      [C2 V5];        [C2 V5] #       ςßܱ.்\r
++T;    \u200Dςß\u0731.\u0BCD;        [C2 V5];        [V5]    #       ςßܱ.்\r
++N;    \u200Dςß\u0731.\u0BCD;        [C2 V5];        [C2 V5] #       ςßܱ.்\r
++T;    \u200DΣSS\u0731.\u0BCD;        [C2 V5];        [V5]    #       σssܱ.்\r
++N;    \u200DΣSS\u0731.\u0BCD;        [C2 V5];        [C2 V5] #       σssܱ.்\r
++T;    \u200Dσss\u0731.\u0BCD;        [C2 V5];        [V5]    #       σssܱ.்\r
++N;    \u200Dσss\u0731.\u0BCD;        [C2 V5];        [C2 V5] #       σssܱ.்\r
++T;    \u200DΣss\u0731.\u0BCD;        [C2 V5];        [V5]    #       σssܱ.்\r
++N;    \u200DΣss\u0731.\u0BCD;        [C2 V5];        [C2 V5] #       σssܱ.்\r
++B;    xn--ss-ubc826a.xn--xmc; [V5];   [V5]    #       σssܱ.்\r
++B;    xn--ss-ubc826ab34b.xn--xmc;     [C2 V5];        [C2 V5] #       σssܱ.்\r
++T;    \u200DΣß\u0731.\u0BCD;        [C2 V5];        [V5]    #       σßܱ.்\r
++N;    \u200DΣß\u0731.\u0BCD;        [C2 V5];        [C2 V5] #       σßܱ.்\r
++T;    \u200Dσß\u0731.\u0BCD;        [C2 V5];        [V5]    #       σßܱ.்\r
++N;    \u200Dσß\u0731.\u0BCD;        [C2 V5];        [C2 V5] #       σßܱ.்\r
++B;    xn--zca39lk1di19a.xn--xmc;      [C2 V5];        [C2 V5] #       σßܱ.்\r
++B;    xn--zca19ln1di19a.xn--xmc;      [C2 V5];        [C2 V5] #       ςßܱ.்\r
++T;    \u200DΣSS\u0731.\u0BCD;      [C2 V5];        [V5]    #       σssܱ.்\r
++N;    \u200DΣSS\u0731.\u0BCD;      [C2 V5];        [C2 V5] #       σssܱ.்\r
++T;    \u200Dσss\u0731.\u0BCD;      [C2 V5];        [V5]    #       σssܱ.்\r
++N;    \u200Dσss\u0731.\u0BCD;      [C2 V5];        [C2 V5] #       σssܱ.்\r
++T;    \u200DΣss\u0731.\u0BCD;      [C2 V5];        [V5]    #       σssܱ.்\r
++N;    \u200DΣss\u0731.\u0BCD;      [C2 V5];        [C2 V5] #       σssܱ.்\r
++T;    \u200DΣß\u0731.\u0BCD;      [C2 V5];        [V5]    #       σßܱ.்\r
++N;    \u200DΣß\u0731.\u0BCD;      [C2 V5];        [C2 V5] #       σßܱ.்\r
++T;    \u200Dσß\u0731.\u0BCD;      [C2 V5];        [V5]    #       σßܱ.்\r
++N;    \u200Dσß\u0731.\u0BCD;      [C2 V5];        [C2 V5] #       σßܱ.்\r
++T;    ≠.\u200D;   [C2 P1 V6];     [P1 V6] #       ≠.\r
++N;    ≠.\u200D;   [C2 P1 V6];     [C2 P1 V6]      #       ≠.\r
++T;    =\u0338.\u200D;       [C2 P1 V6];     [P1 V6] #       ≠.\r
++N;    =\u0338.\u200D;       [C2 P1 V6];     [C2 P1 V6]      #       ≠.\r
++T;    ≠.\u200D;     [C2 P1 V6];     [P1 V6] #       ≠.\r
++N;    ≠.\u200D;     [C2 P1 V6];     [C2 P1 V6]      #       ≠.\r
++T;    =\u0338.\u200D; [C2 P1 V6];     [P1 V6] #       ≠.\r
++N;    =\u0338.\u200D; [C2 P1 V6];     [C2 P1 V6]      #       ≠.\r
++B;    xn--1ch.;       [V6];   [V6]\r
++B;    xn--1ch.xn--1ug;        [C2 V6];        [C2 V6] #       ≠.\r
++B;    \uFC01。\u0C81ᠼ▗򒁋;      [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ئح.ಁᠼ▗\r
++B;    \u0626\u062D。\u0C81ᠼ▗򒁋;        [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ئح.ಁᠼ▗\r
++B;    \u064A\u0654\u062D。\u0C81ᠼ▗򒁋;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ئح.ಁᠼ▗\r
++B;    xn--lgbo.xn--2rc021dcxkrx55t;   [B1 V5 V6];     [B1 V5 V6]      #       ئح.ಁᠼ▗\r
++T;    󧋵\u09CDς.ς𐨿;  [P1 V6];        [P1 V6] #       ্ς.ς𐨿\r
++N;    󧋵\u09CDς.ς𐨿;  [P1 V6];        [P1 V6] #       ্ς.ς𐨿\r
++T;    󧋵\u09CDς.ς𐨿;    [P1 V6];        [P1 V6] #       ্ς.ς𐨿\r
++N;    󧋵\u09CDς.ς𐨿;    [P1 V6];        [P1 V6] #       ্ς.ς𐨿\r
++B;    󧋵\u09CDΣ.Σ𐨿;    [P1 V6];        [P1 V6] #       ্σ.σ𐨿\r
++T;    󧋵\u09CDσ.ς𐨿;    [P1 V6];        [P1 V6] #       ্σ.ς𐨿\r
++N;    󧋵\u09CDσ.ς𐨿;    [P1 V6];        [P1 V6] #       ্σ.ς𐨿\r
++B;    󧋵\u09CDσ.σ𐨿;    [P1 V6];        [P1 V6] #       ্σ.σ𐨿\r
++B;    󧋵\u09CDΣ.σ𐨿;    [P1 V6];        [P1 V6] #       ্σ.σ𐨿\r
++B;    xn--4xa502av8297a.xn--4xa6055k; [V6];   [V6]    #       ্σ.σ𐨿\r
++T;    󧋵\u09CDΣ.ς𐨿;    [P1 V6];        [P1 V6] #       ্σ.ς𐨿\r
++N;    󧋵\u09CDΣ.ς𐨿;    [P1 V6];        [P1 V6] #       ্σ.ς𐨿\r
++B;    xn--4xa502av8297a.xn--3xa8055k; [V6];   [V6]    #       ্σ.ς𐨿\r
++B;    xn--3xa702av8297a.xn--3xa8055k; [V6];   [V6]    #       ্ς.ς𐨿\r
++B;    󧋵\u09CDΣ.Σ𐨿;  [P1 V6];        [P1 V6] #       ্σ.σ𐨿\r
++T;    󧋵\u09CDσ.ς𐨿;  [P1 V6];        [P1 V6] #       ্σ.ς𐨿\r
++N;    󧋵\u09CDσ.ς𐨿;  [P1 V6];        [P1 V6] #       ্σ.ς𐨿\r
++B;    󧋵\u09CDσ.σ𐨿;  [P1 V6];        [P1 V6] #       ্σ.σ𐨿\r
++B;    󧋵\u09CDΣ.σ𐨿;  [P1 V6];        [P1 V6] #       ্σ.σ𐨿\r
++T;    󧋵\u09CDΣ.ς𐨿;  [P1 V6];        [P1 V6] #       ্σ.ς𐨿\r
++N;    󧋵\u09CDΣ.ς𐨿;  [P1 V6];        [P1 V6] #       ্σ.ς𐨿\r
++B;    𐫓\u07D8牅\u08F8。𞦤\u1A17򱍰Ⴙ;        [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       𐫓ߘ牅ࣸ.ᨗႹ\r
++B;    𐫓\u07D8牅\u08F8。𞦤\u1A17򱍰Ⴙ;        [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       𐫓ߘ牅ࣸ.ᨗႹ\r
++B;    𐫓\u07D8牅\u08F8。𞦤\u1A17򱍰ⴙ;        [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       𐫓ߘ牅ࣸ.ᨗⴙ\r
++B;    xn--zsb09cu46vjs6f.xn--gmf469fr883am5r1e;       [B2 B3 V6];     [B2 B3 V6]      #       𐫓ߘ牅ࣸ.ᨗⴙ\r
++B;    xn--zsb09cu46vjs6f.xn--xnd909bv540bm5k9d;       [B2 B3 V6];     [B2 B3 V6]      #       𐫓ߘ牅ࣸ.ᨗႹ\r
++B;    𐫓\u07D8牅\u08F8。𞦤\u1A17򱍰ⴙ;        [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       𐫓ߘ牅ࣸ.ᨗⴙ\r
++B;    񣤒。륧;     [P1 V6];        [P1 V6]\r
++B;    񣤒。륧;       [P1 V6];        [P1 V6]\r
++B;    񣤒。륧;     [P1 V6];        [P1 V6]\r
++B;    񣤒。륧;       [P1 V6];        [P1 V6]\r
++B;    xn--s264a.xn--pw2b;     [V6];   [V6]\r
++T;    𐹷\u200D。󉵢;      [B1 C2 P1 V6];  [B1 P1 V6]      #       𐹷.\r
++N;    𐹷\u200D。󉵢;      [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       𐹷.\r
++B;    xn--vo0d.xn--8088d;     [B1 V6];        [B1 V6]\r
++B;    xn--1ugx205g.xn--8088d; [B1 C2 V6];     [B1 C2 V6]      #       𐹷.\r
++B;    Ⴘ\u06C2𑲭。-;      [B1 B5 B6 P1 V3 V6];    [B1 B5 B6 P1 V3 V6]     #       Ⴘۂ𑲭.-\r
++B;    Ⴘ\u06C1\u0654𑲭。-;        [B1 B5 B6 P1 V3 V6];    [B1 B5 B6 P1 V3 V6]     #       Ⴘۂ𑲭.-\r
++B;    Ⴘ\u06C2𑲭。-;      [B1 B5 B6 P1 V3 V6];    [B1 B5 B6 P1 V3 V6]     #       Ⴘۂ𑲭.-\r
++B;    Ⴘ\u06C1\u0654𑲭。-;        [B1 B5 B6 P1 V3 V6];    [B1 B5 B6 P1 V3 V6]     #       Ⴘۂ𑲭.-\r
++B;    ⴘ\u06C1\u0654𑲭。-;        [B1 B5 B6 V3];  [B1 B5 B6 V3]   #       ⴘۂ𑲭.-\r
++B;    ⴘ\u06C2𑲭。-;      [B1 B5 B6 V3];  [B1 B5 B6 V3]   #       ⴘۂ𑲭.-\r
++B;    xn--1kb147qfk3n.-;      [B1 B5 B6 V3];  [B1 B5 B6 V3]   #       ⴘۂ𑲭.-\r
++B;    xn--1kb312c139t.-;      [B1 B5 B6 V3 V6];       [B1 B5 B6 V3 V6]        #       Ⴘۂ𑲭.-\r
++B;    ⴘ\u06C1\u0654𑲭。-;        [B1 B5 B6 V3];  [B1 B5 B6 V3]   #       ⴘۂ𑲭.-\r
++B;    ⴘ\u06C2𑲭。-;      [B1 B5 B6 V3];  [B1 B5 B6 V3]   #       ⴘۂ𑲭.-\r
++B;    \uA806\u067B₆ᡐ。🛇\uFCDD;        [B1 V5];        [B1 V5] #       ꠆ٻ6ᡐ.🛇يم\r
++B;    \uA806\u067B6ᡐ。🛇\u064A\u0645;    [B1 V5];        [B1 V5] #       ꠆ٻ6ᡐ.🛇يم\r
++B;    xn--6-rrc018krt9k.xn--hhbj61429a;       [B1 V5];        [B1 V5] #       ꠆ٻ6ᡐ.🛇يم\r
++B;    򸍂.㇄ᡟ𐫂\u0622;  [B1 P1 V6];     [B1 P1 V6]      #       .㇄ᡟ𐫂آ\r
++B;    򸍂.㇄ᡟ𐫂\u0627\u0653;    [B1 P1 V6];     [B1 P1 V6]      #       .㇄ᡟ𐫂آ\r
++B;    xn--p292d.xn--hgb154ghrsvm2r;   [B1 V6];        [B1 V6] #       .㇄ᡟ𐫂آ\r
++B;    \u07DF򵚌。-\u07E9;   [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       ߟ.-ߩ\r
++B;    xn--6sb88139l.xn----pdd;        [B1 B2 B3 V3 V6];       [B1 B2 B3 V3 V6]        #       ߟ.-ߩ\r
++T;    ς\u0643⾑.\u200Cᢟ\u200C⒈;       [B1 B5 C1 P1 V6];       [B5 P1 V6]      #       ςك襾.ᢟ⒈\r
++N;    ς\u0643⾑.\u200Cᢟ\u200C⒈;       [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       ςك襾.ᢟ⒈\r
++T;    ς\u0643襾.\u200Cᢟ\u200C1.;  [B1 B5 C1];     [B5]    #       ςك襾.ᢟ1.\r
++N;    ς\u0643襾.\u200Cᢟ\u200C1.;  [B1 B5 C1];     [B1 B5 C1]      #       ςك襾.ᢟ1.\r
++T;    Σ\u0643襾.\u200Cᢟ\u200C1.;  [B1 B5 C1];     [B5]    #       σك襾.ᢟ1.\r
++N;    Σ\u0643襾.\u200Cᢟ\u200C1.;  [B1 B5 C1];     [B1 B5 C1]      #       σك襾.ᢟ1.\r
++T;    σ\u0643襾.\u200Cᢟ\u200C1.;  [B1 B5 C1];     [B5]    #       σك襾.ᢟ1.\r
++N;    σ\u0643襾.\u200Cᢟ\u200C1.;  [B1 B5 C1];     [B1 B5 C1]      #       σك襾.ᢟ1.\r
++B;    xn--4xa49jux8r.xn--1-4ck.;      [B5];   [B5]    #       σك襾.ᢟ1.\r
++B;    xn--4xa49jux8r.xn--1-4ck691bba.;        [B1 B5 C1];     [B1 B5 C1]      #       σك襾.ᢟ1.\r
++B;    xn--3xa69jux8r.xn--1-4ck691bba.;        [B1 B5 C1];     [B1 B5 C1]      #       ςك襾.ᢟ1.\r
++T;    Σ\u0643⾑.\u200Cᢟ\u200C⒈;       [B1 B5 C1 P1 V6];       [B5 P1 V6]      #       σك襾.ᢟ⒈\r
++N;    Σ\u0643⾑.\u200Cᢟ\u200C⒈;       [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       σك襾.ᢟ⒈\r
++T;    σ\u0643⾑.\u200Cᢟ\u200C⒈;       [B1 B5 C1 P1 V6];       [B5 P1 V6]      #       σك襾.ᢟ⒈\r
++N;    σ\u0643⾑.\u200Cᢟ\u200C⒈;       [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       σك襾.ᢟ⒈\r
++B;    xn--4xa49jux8r.xn--pbf212d;     [B5 V6];        [B5 V6] #       σك襾.ᢟ⒈\r
++B;    xn--4xa49jux8r.xn--pbf519aba607b;       [B1 B5 C1 V6];  [B1 B5 C1 V6]   #       σك襾.ᢟ⒈\r
++B;    xn--3xa69jux8r.xn--pbf519aba607b;       [B1 B5 C1 V6];  [B1 B5 C1 V6]   #       ςك襾.ᢟ⒈\r
++B;    ᡆ𑓝.𞵆; [P1 V6];        [P1 V6]\r
++B;    ᡆ𑓝.𞵆;   [P1 V6];        [P1 V6]\r
++B;    xn--57e0440k.xn--k86h;  [V6];   [V6]\r
++T;    \u0A4D𦍓\u1DEE。\u200C\u08BD񝹲;    [B1 C1 P1 V5 V6];       [B1 B2 B3 P1 V5 V6]     #       ੍𦍓ᷮ.ࢽ\r
++N;    \u0A4D𦍓\u1DEE。\u200C\u08BD񝹲;    [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       ੍𦍓ᷮ.ࢽ\r
++T;    \u0A4D𦍓\u1DEE。\u200C\u08BD񝹲;    [B1 C1 P1 V5 V6];       [B1 B2 B3 P1 V5 V6]     #       ੍𦍓ᷮ.ࢽ\r
++N;    \u0A4D𦍓\u1DEE。\u200C\u08BD񝹲;    [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       ੍𦍓ᷮ.ࢽ\r
++B;    xn--ybc461hph93b.xn--jzb29857e; [B1 B2 B3 V5 V6];       [B1 B2 B3 V5 V6]        #       ੍𦍓ᷮ.ࢽ\r
++B;    xn--ybc461hph93b.xn--jzb740j1y45h;      [B1 C1 V5 V6];  [B1 C1 V5 V6]   #       ੍𦍓ᷮ.ࢽ\r
++T;    \u062E\u0748񅪪-.\u200C먿;  [B1 B2 B3 C1 P1 V3 V6]; [B2 B3 P1 V3 V6]        #       خ݈-.먿\r
++N;    \u062E\u0748񅪪-.\u200C먿;  [B1 B2 B3 C1 P1 V3 V6]; [B1 B2 B3 C1 P1 V3 V6]  #       خ݈-.먿\r
++T;    \u062E\u0748񅪪-.\u200C먿;    [B1 B2 B3 C1 P1 V3 V6]; [B2 B3 P1 V3 V6]        #       خ݈-.먿\r
++N;    \u062E\u0748񅪪-.\u200C먿;    [B1 B2 B3 C1 P1 V3 V6]; [B1 B2 B3 C1 P1 V3 V6]  #       خ݈-.먿\r
++T;    \u062E\u0748񅪪-.\u200C먿;    [B1 B2 B3 C1 P1 V3 V6]; [B2 B3 P1 V3 V6]        #       خ݈-.먿\r
++N;    \u062E\u0748񅪪-.\u200C먿;    [B1 B2 B3 C1 P1 V3 V6]; [B1 B2 B3 C1 P1 V3 V6]  #       خ݈-.먿\r
++T;    \u062E\u0748񅪪-.\u200C먿;      [B1 B2 B3 C1 P1 V3 V6]; [B2 B3 P1 V3 V6]        #       خ݈-.먿\r
++N;    \u062E\u0748񅪪-.\u200C먿;      [B1 B2 B3 C1 P1 V3 V6]; [B1 B2 B3 C1 P1 V3 V6]  #       خ݈-.먿\r
++B;    xn----dnc06f42153a.xn--v22b;    [B2 B3 V3 V6];  [B2 B3 V3 V6]   #       خ݈-.먿\r
++B;    xn----dnc06f42153a.xn--0ug1581d;        [B1 B2 B3 C1 V3 V6];    [B1 B2 B3 C1 V3 V6]     #       خ݈-.먿\r
++B;    􋿦。ᠽ;     [P1 V6];        [P1 V6]\r
++B;    􋿦。ᠽ;     [P1 V6];        [P1 V6]\r
++B;    xn--j890g.xn--w7e;      [V6];   [V6]\r
++T;    嬃𝍌.\u200D\u0B44; [C2];   [V5]    #       嬃𝍌.ୄ\r
++N;    嬃𝍌.\u200D\u0B44; [C2];   [C2]    #       嬃𝍌.ୄ\r
++T;    嬃𝍌.\u200D\u0B44;   [C2];   [V5]    #       嬃𝍌.ୄ\r
++N;    嬃𝍌.\u200D\u0B44;   [C2];   [C2]    #       嬃𝍌.ୄ\r
++B;    xn--b6s0078f.xn--0ic;   [V5];   [V5]    #       嬃𝍌.ୄ\r
++B;    xn--b6s0078f.xn--0ic557h;       [C2];   [C2]    #       嬃𝍌.ୄ\r
++B;    \u0602𝌪≯.𚋲򵁨;       [B1 P1 V6];     [B1 P1 V6]      #       𝌪≯.\r
++B;    \u0602𝌪>\u0338.𚋲򵁨;   [B1 P1 V6];     [B1 P1 V6]      #       𝌪≯.\r
++B;    \u0602𝌪≯.𚋲򵁨; [B1 P1 V6];     [B1 P1 V6]      #       𝌪≯.\r
++B;    \u0602𝌪>\u0338.𚋲򵁨;     [B1 P1 V6];     [B1 P1 V6]      #       𝌪≯.\r
++B;    xn--kfb866llx01a.xn--wp1gm3570b;        [B1 V6];        [B1 V6] #       𝌪≯.\r
++B;    򫾥\u08B7\u17CC\uA9C0.𞼠;    [B5 P1 V6];     [B5 P1 V6]      #       ࢷ៌꧀.\r
++B;    xn--dzb638ewm4i1iy1h.xn--3m7h;  [B5 V6];        [B5 V6] #       ࢷ៌꧀.\r
++T;    \u200C.񟛤;    [C1 P1 V6];     [P1 V6 A4_2]    #       .\r
++N;    \u200C.񟛤;    [C1 P1 V6];     [C1 P1 V6]      #       .\r
++B;    .xn--q823a;     [V6 A4_2];      [V6 A4_2]\r
++B;    xn--0ug.xn--q823a;      [C1 V6];        [C1 V6] #       .\r
++B;    򺛕Ⴃ䠅.𐸑;      [P1 V6];        [P1 V6]\r
++B;    򺛕Ⴃ䠅.𐸑;        [P1 V6];        [P1 V6]\r
++B;    򺛕ⴃ䠅.𐸑;        [P1 V6];        [P1 V6]\r
++B;    xn--ukju77frl47r.xn--yl0d;      [V6];   [V6]\r
++B;    xn--bnd074zr557n.xn--yl0d;      [V6];   [V6]\r
++B;    򺛕ⴃ䠅.𐸑;      [P1 V6];        [P1 V6]\r
++B;    \u1BF1𐹳𐹵𞤚。𝟨Ⴅ;   [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ᯱ𐹳𐹵𞤼.6Ⴅ\r
++B;    \u1BF1𐹳𐹵𞤚。6Ⴅ;      [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ᯱ𐹳𐹵𞤼.6Ⴅ\r
++B;    \u1BF1𐹳𐹵𞤼。6ⴅ;      [B1 V5];        [B1 V5] #       ᯱ𐹳𐹵𞤼.6ⴅ\r
++B;    xn--zzfy954hga2415t.xn--6-kvs;  [B1 V5];        [B1 V5] #       ᯱ𐹳𐹵𞤼.6ⴅ\r
++B;    xn--zzfy954hga2415t.xn--6-h0g;  [B1 V5 V6];     [B1 V5 V6]      #       ᯱ𐹳𐹵𞤼.6Ⴅ\r
++B;    \u1BF1𐹳𐹵𞤼。𝟨ⴅ;   [B1 V5];        [B1 V5] #       ᯱ𐹳𐹵𞤼.6ⴅ\r
++B;    \u1BF1𐹳𐹵𞤚。6ⴅ;      [B1 V5];        [B1 V5] #       ᯱ𐹳𐹵𞤼.6ⴅ\r
++B;    \u1BF1𐹳𐹵𞤚。𝟨ⴅ;   [B1 V5];        [B1 V5] #       ᯱ𐹳𐹵𞤼.6ⴅ\r
++B;    -。︒;        [P1 V3 V6];     [P1 V3 V6]\r
++B;    -。。;        [V3 A4_2];      [V3 A4_2]\r
++B;    -..;    [V3 A4_2];      [V3 A4_2]\r
++B;    -.xn--y86c;     [V3 V6];        [V3 V6]\r
++B;    \u07DBჀ。-⁵--;     [B1 B2 B3 P1 V2 V3 V6]; [B1 B2 B3 P1 V2 V3 V6]  #       ߛჀ.-5--\r
++B;    \u07DBჀ。-5--;       [B1 B2 B3 P1 V2 V3 V6]; [B1 B2 B3 P1 V2 V3 V6]  #       ߛჀ.-5--\r
++B;    \u07DBⴠ。-5--;       [B1 B2 B3 V2 V3];       [B1 B2 B3 V2 V3]        #       ߛⴠ.-5--\r
++B;    xn--2sb691q.-5--;       [B1 B2 B3 V2 V3];       [B1 B2 B3 V2 V3]        #       ߛⴠ.-5--\r
++B;    xn--2sb866b.-5--;       [B1 B2 B3 V2 V3 V6];    [B1 B2 B3 V2 V3 V6]     #       ߛჀ.-5--\r
++B;    \u07DBⴠ。-⁵--;     [B1 B2 B3 V2 V3];       [B1 B2 B3 V2 V3]        #       ߛⴠ.-5--\r
++B;    ≯\uD8DD󠑕。𐹷𐹻≯𐷒;        [B1 P1 V6];     [B1 P1 V6 A3]   #       ≯.𐹷𐹻≯\r
++B;    >\u0338\uD8DD󠑕。𐹷𐹻>\u0338𐷒;        [B1 P1 V6];     [B1 P1 V6 A3]   #       ≯.𐹷𐹻≯\r
++B;    ≯\uD8DD󠑕。𐹷𐹻≯𐷒;        [B1 P1 V6];     [B1 P1 V6 A3]   #       ≯.𐹷𐹻≯\r
++B;    >\u0338\uD8DD󠑕。𐹷𐹻>\u0338𐷒;        [B1 P1 V6];     [B1 P1 V6 A3]   #       ≯.𐹷𐹻≯\r
++B;    ≯\uD8DD󠑕.xn--hdh8283gdoaqa;        [B1 P1 V6];     [B1 P1 V6 A3]   #       ≯.𐹷𐹻≯\r
++B;    >\u0338\uD8DD󠑕.xn--hdh8283gdoaqa;    [B1 P1 V6];     [B1 P1 V6 A3]   #       ≯.𐹷𐹻≯\r
++B;    >\u0338\uD8DD󠑕.XN--HDH8283GDOAQA;    [B1 P1 V6];     [B1 P1 V6 A3]   #       ≯.𐹷𐹻≯\r
++B;    ≯\uD8DD󠑕.XN--HDH8283GDOAQA;        [B1 P1 V6];     [B1 P1 V6 A3]   #       ≯.𐹷𐹻≯\r
++B;    ≯\uD8DD󠑕.Xn--Hdh8283gdoaqa;        [B1 P1 V6];     [B1 P1 V6 A3]   #       ≯.𐹷𐹻≯\r
++B;    >\u0338\uD8DD󠑕.Xn--Hdh8283gdoaqa;    [B1 P1 V6];     [B1 P1 V6 A3]   #       ≯.𐹷𐹻≯\r
++T;    ㍔\u08E6\u077C\u200D。\u0346򁳊𝅶\u0604;   [B1 B5 B6 C2 P1 V5 V6]; [B1 B5 B6 P1 V5 V6]     #       ルーブルࣦݼ.͆\r
++N;    ㍔\u08E6\u077C\u200D。\u0346򁳊𝅶\u0604;   [B1 B5 B6 C2 P1 V5 V6]; [B1 B5 B6 C2 P1 V5 V6]  #       ルーブルࣦݼ.͆\r
++T;    ルーブル\u08E6\u077C\u200D。\u0346򁳊𝅶\u0604;  [B1 B5 B6 C2 P1 V5 V6]; [B1 B5 B6 P1 V5 V6]     #       ルーブルࣦݼ.͆\r
++N;    ルーブル\u08E6\u077C\u200D。\u0346򁳊𝅶\u0604;  [B1 B5 B6 C2 P1 V5 V6]; [B1 B5 B6 C2 P1 V5 V6]  #       ルーブルࣦݼ.͆\r
++T;    ルーフ\u3099ル\u08E6\u077C\u200D。\u0346򁳊𝅶\u0604;    [B1 B5 B6 C2 P1 V5 V6]; [B1 B5 B6 P1 V5 V6]     #       ルーブルࣦݼ.͆\r
++N;    ルーフ\u3099ル\u08E6\u077C\u200D。\u0346򁳊𝅶\u0604;    [B1 B5 B6 C2 P1 V5 V6]; [B1 B5 B6 C2 P1 V5 V6]  #       ルーブルࣦݼ.͆\r
++B;    xn--dqb73el09fncab4h.xn--kua81ls548d3608b;      [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       ルーブルࣦݼ.͆\r
++B;    xn--dqb73ec22c9kp8cb1j.xn--kua81ls548d3608b;    [B1 B5 B6 C2 V5 V6];    [B1 B5 B6 C2 V5 V6]     #       ルーブルࣦݼ.͆\r
++T;    \u200D.F;       [C2];   [A4_2]  #       .f\r
++N;    \u200D.F;       [C2];   [C2]    #       .f\r
++T;    \u200D.f;       [C2];   [A4_2]  #       .f\r
++N;    \u200D.f;       [C2];   [C2]    #       .f\r
++B;    .f;     [A4_2]; [A4_2]\r
++B;    xn--1ug.f;      [C2];   [C2]    #       .f\r
++B;    f;      ;       \r
++T;    \u200D㨲。ß; [C2];   xn--9bm.ss      #       㨲.ß\r
++N;    \u200D㨲。ß; [C2];   [C2]    #       㨲.ß\r
++T;    \u200D㨲。ß; [C2];   xn--9bm.ss      #       㨲.ß\r
++N;    \u200D㨲。ß; [C2];   [C2]    #       㨲.ß\r
++T;    \u200D㨲。SS; [C2];   xn--9bm.ss      #       㨲.ss\r
++N;    \u200D㨲。SS; [C2];   [C2]    #       㨲.ss\r
++T;    \u200D㨲。ss; [C2];   xn--9bm.ss      #       㨲.ss\r
++N;    \u200D㨲。ss; [C2];   [C2]    #       㨲.ss\r
++T;    \u200D㨲。Ss; [C2];   xn--9bm.ss      #       㨲.ss\r
++N;    \u200D㨲。Ss; [C2];   [C2]    #       㨲.ss\r
++B;    xn--9bm.ss;     㨲.ss; xn--9bm.ss\r
++B;    㨲.ss; ;       xn--9bm.ss\r
++B;    㨲.SS; 㨲.ss; xn--9bm.ss\r
++B;    㨲.Ss; 㨲.ss; xn--9bm.ss\r
++B;    xn--1ug914h.ss; [C2];   [C2]    #       㨲.ss\r
++B;    xn--1ug914h.xn--zca;    [C2];   [C2]    #       㨲.ß\r
++T;    \u200D㨲。SS; [C2];   xn--9bm.ss      #       㨲.ss\r
++N;    \u200D㨲。SS; [C2];   [C2]    #       㨲.ss\r
++T;    \u200D㨲。ss; [C2];   xn--9bm.ss      #       㨲.ss\r
++N;    \u200D㨲。ss; [C2];   [C2]    #       㨲.ss\r
++T;    \u200D㨲。Ss; [C2];   xn--9bm.ss      #       㨲.ss\r
++N;    \u200D㨲。Ss; [C2];   [C2]    #       㨲.ss\r
++B;    \u0605\u067E。\u08A8;  [B1 P1 V6];     [B1 P1 V6]      #       پ.ࢨ\r
++B;    \u0605\u067E。\u08A8;  [B1 P1 V6];     [B1 P1 V6]      #       پ.ࢨ\r
++B;    xn--nfb6v.xn--xyb;      [B1 V6];        [B1 V6] #       پ.ࢨ\r
++B;    ⾑\u0753𞤁。𐹵\u0682;     [B1 B5 B6];     [B1 B5 B6]      #       襾ݓ𞤣.𐹵ڂ\r
++B;    襾\u0753𞤁。𐹵\u0682;     [B1 B5 B6];     [B1 B5 B6]      #       襾ݓ𞤣.𐹵ڂ\r
++B;    襾\u0753𞤣。𐹵\u0682;     [B1 B5 B6];     [B1 B5 B6]      #       襾ݓ𞤣.𐹵ڂ\r
++B;    xn--6ob9577deqwl.xn--7ib5526k;  [B1 B5 B6];     [B1 B5 B6]      #       襾ݓ𞤣.𐹵ڂ\r
++B;    ⾑\u0753𞤣。𐹵\u0682;     [B1 B5 B6];     [B1 B5 B6]      #       襾ݓ𞤣.𐹵ڂ\r
++T;    񦴻ς-\u20EB。\u0754-ꡛ;     [B2 B3 B6 P1 V6];       [B2 B3 B6 P1 V6]        #       ς-⃫.ݔ-ꡛ\r
++N;    񦴻ς-\u20EB。\u0754-ꡛ;     [B2 B3 B6 P1 V6];       [B2 B3 B6 P1 V6]        #       ς-⃫.ݔ-ꡛ\r
++T;    񦴻ς-\u20EB。\u0754-ꡛ;     [B2 B3 B6 P1 V6];       [B2 B3 B6 P1 V6]        #       ς-⃫.ݔ-ꡛ\r
++N;    񦴻ς-\u20EB。\u0754-ꡛ;     [B2 B3 B6 P1 V6];       [B2 B3 B6 P1 V6]        #       ς-⃫.ݔ-ꡛ\r
++B;    񦴻Σ-\u20EB。\u0754-ꡛ;     [B2 B3 B6 P1 V6];       [B2 B3 B6 P1 V6]        #       σ-⃫.ݔ-ꡛ\r
++B;    񦴻σ-\u20EB。\u0754-ꡛ;     [B2 B3 B6 P1 V6];       [B2 B3 B6 P1 V6]        #       σ-⃫.ݔ-ꡛ\r
++B;    xn----zmb705tuo34l.xn----53c4874j;      [B2 B3 B6 V6];  [B2 B3 B6 V6]   #       σ-⃫.ݔ-ꡛ\r
++B;    xn----xmb015tuo34l.xn----53c4874j;      [B2 B3 B6 V6];  [B2 B3 B6 V6]   #       ς-⃫.ݔ-ꡛ\r
++B;    񦴻Σ-\u20EB。\u0754-ꡛ;     [B2 B3 B6 P1 V6];       [B2 B3 B6 P1 V6]        #       σ-⃫.ݔ-ꡛ\r
++B;    񦴻σ-\u20EB。\u0754-ꡛ;     [B2 B3 B6 P1 V6];       [B2 B3 B6 P1 V6]        #       σ-⃫.ݔ-ꡛ\r
++T;    \u200D.􀸨;  [C2 P1 V6];     [P1 V6 A4_2]    #       .\r
++N;    \u200D.􀸨;  [C2 P1 V6];     [C2 P1 V6]      #       .\r
++T;    \u200D.􀸨;    [C2 P1 V6];     [P1 V6 A4_2]    #       .\r
++N;    \u200D.􀸨;    [C2 P1 V6];     [C2 P1 V6]      #       .\r
++B;    .xn--h327f;     [V6 A4_2];      [V6 A4_2]\r
++B;    xn--1ug.xn--h327f;      [C2 V6];        [C2 V6] #       .\r
++B;    񣭻񌥁。≠𝟲;     [P1 V6];        [P1 V6]\r
++B;    񣭻񌥁。=\u0338𝟲; [P1 V6];        [P1 V6]\r
++B;    񣭻񌥁。≠6;        [P1 V6];        [P1 V6]\r
++B;    񣭻񌥁。=\u03386;    [P1 V6];        [P1 V6]\r
++B;    xn--h79w4z99a.xn--6-tfo;        [V6];   [V6]\r
++T;    󠅊ᡭ\u200D.𐥡;     [B6 C2 P1 V6];  [P1 V6] #       ᡭ.\r
++N;    󠅊ᡭ\u200D.𐥡;     [B6 C2 P1 V6];  [B6 C2 P1 V6]   #       ᡭ.\r
++B;    xn--98e.xn--om9c;       [V6];   [V6]\r
++B;    xn--98e810b.xn--om9c;   [B6 C2 V6];     [B6 C2 V6]      #       ᡭ.\r
++B;    \u0C40\u0855𐥛𑄴.󭰵;    [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ీࡕ𑄴.\r
++B;    \u0C40\u0855𐥛𑄴.󭰵;      [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ీࡕ𑄴.\r
++B;    xn--kwb91r5112avtg.xn--o580f;   [B1 V5 V6];     [B1 V5 V6]      #       ీࡕ𑄴.\r
++T;    𞤮。𑇊\u200C≯\u1CE6;     [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       𞤮.𑇊≯᳦\r
++N;    𞤮。𑇊\u200C≯\u1CE6;     [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       𞤮.𑇊≯᳦\r
++T;    𞤮。𑇊\u200C>\u0338\u1CE6; [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       𞤮.𑇊≯᳦\r
++N;    𞤮。𑇊\u200C>\u0338\u1CE6; [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       𞤮.𑇊≯᳦\r
++T;    𞤌。𑇊\u200C>\u0338\u1CE6; [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       𞤮.𑇊≯᳦\r
++N;    𞤌。𑇊\u200C>\u0338\u1CE6; [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       𞤮.𑇊≯᳦\r
++T;    𞤌。𑇊\u200C≯\u1CE6;     [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       𞤮.𑇊≯᳦\r
++N;    𞤌。𑇊\u200C≯\u1CE6;     [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       𞤮.𑇊≯᳦\r
++B;    xn--me6h.xn--z6fz8ueq2v;        [B1 V5 V6];     [B1 V5 V6]      #       𞤮.𑇊≯᳦\r
++B;    xn--me6h.xn--z6f16kn9b2642b;    [B1 C1 V5 V6];  [B1 C1 V5 V6]   #       𞤮.𑇊≯᳦\r
++B;    󠄀𝟕.𞤌񛗓Ⴉ;   [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]\r
++B;    󠄀7.𞤌񛗓Ⴉ;      [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]\r
++B;    󠄀7.𞤮񛗓ⴉ;      [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]\r
++B;    7.xn--0kjz523lv1vv;     [B1 B2 B3 V6];  [B1 B2 B3 V6]\r
++B;    7.xn--hnd3403vv1vv;     [B1 B2 B3 V6];  [B1 B2 B3 V6]\r
++B;    󠄀𝟕.𞤮񛗓ⴉ;   [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]\r
++B;    󠄀7.𞤌񛗓ⴉ;      [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]\r
++B;    󠄀𝟕.𞤌񛗓ⴉ;   [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]\r
++B;    閃9𝩍。Ↄ\u0669\u08B1\u0B4D;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       閃9𝩍.Ↄ٩ࢱ୍\r
++B;    閃9𝩍。ↄ\u0669\u08B1\u0B4D;       [B5 B6];        [B5 B6] #       閃9𝩍.ↄ٩ࢱ୍\r
++B;    xn--9-3j6dk517f.xn--iib28ij3c4t9a;      [B5 B6];        [B5 B6] #       閃9𝩍.ↄ٩ࢱ୍\r
++B;    xn--9-3j6dk517f.xn--iib28ij3c0t9a;      [B5 B6 V6];     [B5 B6 V6]      #       閃9𝩍.Ↄ٩ࢱ୍\r
++B;    \uAAF6ᢏ\u0E3A2.𐋢\u0745\u0F9F︒; [P1 V5 V6];     [P1 V5 V6]      #       ꫶ᢏฺ2.𐋢݅ྟ︒\r
++B;    \uAAF6ᢏ\u0E3A2.𐋢\u0745\u0F9F。;   [V5];   [V5]    #       ꫶ᢏฺ2.𐋢݅ྟ.\r
++B;    xn--2-2zf840fk16m.xn--sob093b2m7s.;     [V5];   [V5]    #       ꫶ᢏฺ2.𐋢݅ྟ.\r
++B;    xn--2-2zf840fk16m.xn--sob093bj62sz9d;   [V5 V6];        [V5 V6] #       ꫶ᢏฺ2.𐋢݅ྟ︒\r
++B;    󅴧。≠-󠙄⾛;     [P1 V6];        [P1 V6]\r
++B;    󅴧。=\u0338-󠙄⾛; [P1 V6];        [P1 V6]\r
++B;    󅴧。≠-󠙄走;     [P1 V6];        [P1 V6]\r
++B;    󅴧。=\u0338-󠙄走; [P1 V6];        [P1 V6]\r
++B;    xn--gm57d.xn----tfo4949b3664m;  [V6];   [V6]\r
++B;    \u076E\u0604Ⴊ。-≠\u1160;   [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       ݮႪ.-≠\r
++B;    \u076E\u0604Ⴊ。-=\u0338\u1160;       [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       ݮႪ.-≠\r
++B;    \u076E\u0604ⴊ。-=\u0338\u1160;       [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       ݮⴊ.-≠\r
++B;    \u076E\u0604ⴊ。-≠\u1160;   [B1 B2 B3 P1 V3 V6];    [B1 B2 B3 P1 V3 V6]     #       ݮⴊ.-≠\r
++B;    xn--mfb73ek93f.xn----5bh589i;   [B1 B2 B3 V3 V6];       [B1 B2 B3 V3 V6]        #       ݮⴊ.-≠\r
++B;    xn--mfb73ex6r.xn----5bh589i;    [B1 B2 B3 V3 V6];       [B1 B2 B3 V3 V6]        #       ݮႪ.-≠\r
++T;    \uFB4F𐹧𝟒≯。\u200C;     [B1 B3 B4 C1 P1 V6];    [B3 B4 P1 V6]   #       אל𐹧4≯.\r
++N;    \uFB4F𐹧𝟒≯。\u200C;     [B1 B3 B4 C1 P1 V6];    [B1 B3 B4 C1 P1 V6]     #       אל𐹧4≯.\r
++T;    \uFB4F𐹧𝟒>\u0338。\u200C; [B1 B3 B4 C1 P1 V6];    [B3 B4 P1 V6]   #       אל𐹧4≯.\r
++N;    \uFB4F𐹧𝟒>\u0338。\u200C; [B1 B3 B4 C1 P1 V6];    [B1 B3 B4 C1 P1 V6]     #       אל𐹧4≯.\r
++T;    \u05D0\u05DC𐹧4≯。\u200C;  [B1 B3 B4 C1 P1 V6];    [B3 B4 P1 V6]   #       אל𐹧4≯.\r
++N;    \u05D0\u05DC𐹧4≯。\u200C;  [B1 B3 B4 C1 P1 V6];    [B1 B3 B4 C1 P1 V6]     #       אל𐹧4≯.\r
++T;    \u05D0\u05DC𐹧4>\u0338。\u200C;      [B1 B3 B4 C1 P1 V6];    [B3 B4 P1 V6]   #       אל𐹧4≯.\r
++N;    \u05D0\u05DC𐹧4>\u0338。\u200C;      [B1 B3 B4 C1 P1 V6];    [B1 B3 B4 C1 P1 V6]     #       אל𐹧4≯.\r
++B;    xn--4-zhc0by36txt0w.;   [B3 B4 V6];     [B3 B4 V6]      #       אל𐹧4≯.\r
++B;    xn--4-zhc0by36txt0w.xn--0ug;    [B1 B3 B4 C1 V6];       [B1 B3 B4 C1 V6]        #       אל𐹧4≯.\r
++B;    𝟎。甯;     0.甯;  0.xn--qny\r
++B;    0。甯;        0.甯;  0.xn--qny\r
++B;    0.xn--qny;      0.甯;  0.xn--qny\r
++B;    0.甯;  ;       0.xn--qny\r
++B;    -⾆.\uAAF6;  [V3 V5];        [V3 V5] #       -舌.꫶\r
++B;    -舌.\uAAF6;    [V3 V5];        [V3 V5] #       -舌.꫶\r
++B;    xn----ef8c.xn--2v9a;    [V3 V5];        [V3 V5] #       -舌.꫶\r
++B;    -。ᢘ;        [V3];   [V3]\r
++B;    -。ᢘ;        [V3];   [V3]\r
++B;    -.xn--ibf;      [V3];   [V3]\r
++B;    🂴Ⴋ.≮;    [P1 V6];        [P1 V6]\r
++B;    🂴Ⴋ.<\u0338;        [P1 V6];        [P1 V6]\r
++B;    🂴ⴋ.<\u0338;        [P1 V6];        [P1 V6]\r
++B;    🂴ⴋ.≮;    [P1 V6];        [P1 V6]\r
++B;    xn--2kj7565l.xn--gdh;   [V6];   [V6]\r
++B;    xn--jnd1986v.xn--gdh;   [V6];   [V6]\r
++T;    璼𝨭。\u200C󠇟;   [C1];   xn--gky8837e.   #       璼𝨭.\r
++N;    璼𝨭。\u200C󠇟;   [C1];   [C1]    #       璼𝨭.\r
++T;    璼𝨭。\u200C󠇟;   [C1];   xn--gky8837e.   #       璼𝨭.\r
++N;    璼𝨭。\u200C󠇟;   [C1];   [C1]    #       璼𝨭.\r
++B;    xn--gky8837e.;  璼𝨭.;       xn--gky8837e.\r
++B;    璼𝨭.;       ;       xn--gky8837e.\r
++B;    xn--gky8837e.xn--0ug;   [C1];   [C1]    #       璼𝨭.\r
++B;    \u06698񂍽。-5🞥;   [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ٩8.-5🞥\r
++B;    \u06698񂍽。-5🞥;   [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ٩8.-5🞥\r
++B;    xn--8-qqc97891f.xn---5-rp92a;   [B1 V3 V6];     [B1 V3 V6]      #       ٩8.-5🞥\r
++T;    \u200C.\u200C;  [C1];   [A4_2]  #       .\r
++N;    \u200C.\u200C;  [C1];   [C1]    #       .\r
++B;    xn--0ug.xn--0ug;        [C1];   [C1]    #       .\r
++T;    \u200D튛.\u0716;       [B1 C2];        xn--157b.xn--gnb        #       튛.ܖ\r
++N;    \u200D튛.\u0716;       [B1 C2];        [B1 C2] #       튛.ܖ\r
++T;    \u200D튛.\u0716; [B1 C2];        xn--157b.xn--gnb        #       튛.ܖ\r
++N;    \u200D튛.\u0716; [B1 C2];        [B1 C2] #       튛.ܖ\r
++B;    xn--157b.xn--gnb;       튛.\u0716;     xn--157b.xn--gnb        #       튛.ܖ\r
++B;    튛.\u0716;     ;       xn--157b.xn--gnb        #       튛.ܖ\r
++B;    튛.\u0716;       튛.\u0716;     xn--157b.xn--gnb        #       튛.ܖ\r
++B;    xn--1ug4441e.xn--gnb;   [B1 C2];        [B1 C2] #       튛.ܖ\r
++B;    ᡋ𐹰𞽳.\u0779ⴞ;  [B2 B3 B5 B6 P1 V6];    [B2 B3 B5 B6 P1 V6]     #       ᡋ𐹰.ݹⴞ\r
++B;    ᡋ𐹰𞽳.\u0779Ⴞ;  [B2 B3 B5 B6 P1 V6];    [B2 B3 B5 B6 P1 V6]     #       ᡋ𐹰.ݹႾ\r
++B;    xn--b8e0417jocvf.xn--9pb068b;   [B2 B3 B5 B6 V6];       [B2 B3 B5 B6 V6]        #       ᡋ𐹰.ݹႾ\r
++B;    xn--b8e0417jocvf.xn--9pb883q;   [B2 B3 B5 B6 V6];       [B2 B3 B5 B6 V6]        #       ᡋ𐹰.ݹⴞ\r
++B;    𐷃\u0662𝅻𝟧.𐹮𐹬Ⴇ;       [B1 B4 P1 V6];  [B1 B4 P1 V6]   #       ٢𝅻5.𐹮𐹬Ⴇ\r
++B;    𐷃\u0662𝅻5.𐹮𐹬Ⴇ;    [B1 B4 P1 V6];  [B1 B4 P1 V6]   #       ٢𝅻5.𐹮𐹬Ⴇ\r
++B;    𐷃\u0662𝅻5.𐹮𐹬ⴇ;    [B1 B4 P1 V6];  [B1 B4 P1 V6]   #       ٢𝅻5.𐹮𐹬ⴇ\r
++B;    xn--5-cqc8833rhv7f.xn--ykjz523efa;      [B1 B4 V6];     [B1 B4 V6]      #       ٢𝅻5.𐹮𐹬ⴇ\r
++B;    xn--5-cqc8833rhv7f.xn--fnd3401kfa;      [B1 B4 V6];     [B1 B4 V6]      #       ٢𝅻5.𐹮𐹬Ⴇ\r
++B;    𐷃\u0662𝅻𝟧.𐹮𐹬ⴇ;       [B1 B4 P1 V6];  [B1 B4 P1 V6]   #       ٢𝅻5.𐹮𐹬ⴇ\r
++B;    Ⴗ.\u05C2𑄴\uA9B7񘃨;     [P1 V5 V6];     [P1 V5 V6]      #       Ⴗ.𑄴ׂꦷ\r
++B;    Ⴗ.𑄴\u05C2\uA9B7񘃨;     [P1 V5 V6];     [P1 V5 V6]      #       Ⴗ.𑄴ׂꦷ\r
++B;    Ⴗ.𑄴\u05C2\uA9B7񘃨;       [P1 V5 V6];     [P1 V5 V6]      #       Ⴗ.𑄴ׂꦷ\r
++B;    ⴗ.𑄴\u05C2\uA9B7񘃨;       [P1 V5 V6];     [P1 V5 V6]      #       ⴗ.𑄴ׂꦷ\r
++B;    xn--flj.xn--qdb0605f14ycrms3c;  [V5 V6];        [V5 V6] #       ⴗ.𑄴ׂꦷ\r
++B;    xn--vnd.xn--qdb0605f14ycrms3c;  [V5 V6];        [V5 V6] #       Ⴗ.𑄴ׂꦷ\r
++B;    ⴗ.𑄴\u05C2\uA9B7񘃨;     [P1 V5 V6];     [P1 V5 V6]      #       ⴗ.𑄴ׂꦷ\r
++B;    ⴗ.\u05C2𑄴\uA9B7񘃨;     [P1 V5 V6];     [P1 V5 V6]      #       ⴗ.𑄴ׂꦷ\r
++B;    𝟾𾤘.򇕛\u066C;  [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       8.٬\r
++B;    8𾤘.򇕛\u066C;       [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       8.٬\r
++B;    xn--8-kh23b.xn--lib78461i;      [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       8.٬\r
++B;    ⒈酫︒。\u08D6;     [P1 V5 V6];     [P1 V5 V6]      #       ⒈酫︒.ࣖ\r
++B;    1.酫。。\u08D6;      [V5 A4_2];      [V5 A4_2]       #       1.酫..ࣖ\r
++B;    1.xn--8j4a..xn--8zb;    [V5 A4_2];      [V5 A4_2]       #       1.酫..ࣖ\r
++B;    xn--tsh4490bfe8c.xn--8zb;       [V5 V6];        [V5 V6] #       ⒈酫︒.ࣖ\r
++T;    \u2DE3\u200C≮\u1A6B.\u200C\u0E3A;     [C1 P1 V5 V6];  [P1 V5 V6]      #       ⷣ≮ᩫ.ฺ\r
++N;    \u2DE3\u200C≮\u1A6B.\u200C\u0E3A;     [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ⷣ≮ᩫ.ฺ\r
++T;    \u2DE3\u200C<\u0338\u1A6B.\u200C\u0E3A; [C1 P1 V5 V6];  [P1 V5 V6]      #       ⷣ≮ᩫ.ฺ\r
++N;    \u2DE3\u200C<\u0338\u1A6B.\u200C\u0E3A; [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       ⷣ≮ᩫ.ฺ\r
++B;    xn--uof548an0j.xn--o4c; [V5 V6];        [V5 V6] #       ⷣ≮ᩫ.ฺ\r
++B;    xn--uof63xk4bf3s.xn--o4c732g;   [C1 V5 V6];     [C1 V5 V6]      #       ⷣ≮ᩫ.ฺ\r
++T;    𞪂。ႷႽ¹\u200D;  [B6 C2 P1 V6];  [P1 V6] #       .ႷႽ1\r
++N;    𞪂。ႷႽ¹\u200D;  [B6 C2 P1 V6];  [B6 C2 P1 V6]   #       .ႷႽ1\r
++T;    𞪂。ႷႽ1\u200D;   [B6 C2 P1 V6];  [P1 V6] #       .ႷႽ1\r
++N;    𞪂。ႷႽ1\u200D;   [B6 C2 P1 V6];  [B6 C2 P1 V6]   #       .ႷႽ1\r
++T;    𞪂。ⴗⴝ1\u200D;   [B6 C2 P1 V6];  [P1 V6] #       .ⴗⴝ1\r
++N;    𞪂。ⴗⴝ1\u200D;   [B6 C2 P1 V6];  [B6 C2 P1 V6]   #       .ⴗⴝ1\r
++T;    𞪂。Ⴗⴝ1\u200D;   [B6 C2 P1 V6];  [P1 V6] #       .Ⴗⴝ1\r
++N;    𞪂。Ⴗⴝ1\u200D;   [B6 C2 P1 V6];  [B6 C2 P1 V6]   #       .Ⴗⴝ1\r
++B;    xn--co6h.xn--1-h1g429s; [V6];   [V6]\r
++B;    xn--co6h.xn--1-h1g398iewm;      [B6 C2 V6];     [B6 C2 V6]      #       .Ⴗⴝ1\r
++B;    xn--co6h.xn--1-kwssa;   [V6];   [V6]\r
++B;    xn--co6h.xn--1-ugn710dya;       [B6 C2 V6];     [B6 C2 V6]      #       .ⴗⴝ1\r
++B;    xn--co6h.xn--1-h1gs;    [V6];   [V6]\r
++B;    xn--co6h.xn--1-h1gs597m;        [B6 C2 V6];     [B6 C2 V6]      #       .ႷႽ1\r
++T;    𞪂。ⴗⴝ¹\u200D;  [B6 C2 P1 V6];  [P1 V6] #       .ⴗⴝ1\r
++N;    𞪂。ⴗⴝ¹\u200D;  [B6 C2 P1 V6];  [B6 C2 P1 V6]   #       .ⴗⴝ1\r
++T;    𞪂。Ⴗⴝ¹\u200D;  [B6 C2 P1 V6];  [P1 V6] #       .Ⴗⴝ1\r
++N;    𞪂。Ⴗⴝ¹\u200D;  [B6 C2 P1 V6];  [B6 C2 P1 V6]   #       .Ⴗⴝ1\r
++B;    𑄴𑄳2.𞳿󠀳-;    [B1 B3 P1 V3 V5 V6];    [B1 B3 P1 V3 V5 V6]\r
++B;    xn--2-h87ic.xn----s39r33498d;   [B1 B3 V3 V5 V6];       [B1 B3 V3 V5 V6]\r
++B;    󠕲󟶶\u0665。񀁁𑄳𞤃\u0710;    [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       ٥.𑄳𞤥ܐ\r
++B;    󠕲󟶶\u0665。񀁁𑄳𞤃\u0710;    [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       ٥.𑄳𞤥ܐ\r
++B;    󠕲󟶶\u0665。񀁁𑄳𞤥\u0710;    [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       ٥.𑄳𞤥ܐ\r
++B;    xn--eib57614py3ea.xn--9mb5737kqnpfzkwr; [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       ٥.𑄳𞤥ܐ\r
++B;    󠕲󟶶\u0665。񀁁𑄳𞤥\u0710;    [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       ٥.𑄳𞤥ܐ\r
++T;    \u0720򲠽𐹢\u17BB。ςᢈ🝭\u200C; [B2 B6 C1 P1 V6];       [B2 B6 P1 V6]   #       ܠ𐹢ុ.ςᢈ🝭\r
++N;    \u0720򲠽𐹢\u17BB。ςᢈ🝭\u200C; [B2 B6 C1 P1 V6];       [B2 B6 C1 P1 V6]        #       ܠ𐹢ុ.ςᢈ🝭\r
++T;    \u0720򲠽𐹢\u17BB。ςᢈ🝭\u200C; [B2 B6 C1 P1 V6];       [B2 B6 P1 V6]   #       ܠ𐹢ុ.ςᢈ🝭\r
++N;    \u0720򲠽𐹢\u17BB。ςᢈ🝭\u200C; [B2 B6 C1 P1 V6];       [B2 B6 C1 P1 V6]        #       ܠ𐹢ុ.ςᢈ🝭\r
++T;    \u0720򲠽𐹢\u17BB。Σᢈ🝭\u200C; [B2 B6 C1 P1 V6];       [B2 B6 P1 V6]   #       ܠ𐹢ុ.σᢈ🝭\r
++N;    \u0720򲠽𐹢\u17BB。Σᢈ🝭\u200C; [B2 B6 C1 P1 V6];       [B2 B6 C1 P1 V6]        #       ܠ𐹢ុ.σᢈ🝭\r
++T;    \u0720򲠽𐹢\u17BB。σᢈ🝭\u200C; [B2 B6 C1 P1 V6];       [B2 B6 P1 V6]   #       ܠ𐹢ុ.σᢈ🝭\r
++N;    \u0720򲠽𐹢\u17BB。σᢈ🝭\u200C; [B2 B6 C1 P1 V6];       [B2 B6 C1 P1 V6]        #       ܠ𐹢ុ.σᢈ🝭\r
++B;    xn--qnb616fis0qzt36f.xn--4xa847hli46a;  [B2 B6 V6];     [B2 B6 V6]      #       ܠ𐹢ុ.σᢈ🝭\r
++B;    xn--qnb616fis0qzt36f.xn--4xa847h6ofgl44c;       [B2 B6 C1 V6];  [B2 B6 C1 V6]   #       ܠ𐹢ុ.σᢈ🝭\r
++B;    xn--qnb616fis0qzt36f.xn--3xa057h6ofgl44c;       [B2 B6 C1 V6];  [B2 B6 C1 V6]   #       ܠ𐹢ុ.ςᢈ🝭\r
++T;    \u0720򲠽𐹢\u17BB。Σᢈ🝭\u200C; [B2 B6 C1 P1 V6];       [B2 B6 P1 V6]   #       ܠ𐹢ុ.σᢈ🝭\r
++N;    \u0720򲠽𐹢\u17BB。Σᢈ🝭\u200C; [B2 B6 C1 P1 V6];       [B2 B6 C1 P1 V6]        #       ܠ𐹢ុ.σᢈ🝭\r
++T;    \u0720򲠽𐹢\u17BB。σᢈ🝭\u200C; [B2 B6 C1 P1 V6];       [B2 B6 P1 V6]   #       ܠ𐹢ុ.σᢈ🝭\r
++N;    \u0720򲠽𐹢\u17BB。σᢈ🝭\u200C; [B2 B6 C1 P1 V6];       [B2 B6 C1 P1 V6]        #       ܠ𐹢ុ.σᢈ🝭\r
++T;    \u200D--≮。𐹧;     [B1 C2 P1 V6];  [B1 P1 V3 V6]   #       --≮.𐹧\r
++N;    \u200D--≮。𐹧;     [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       --≮.𐹧\r
++T;    \u200D--<\u0338。𐹧; [B1 C2 P1 V6];  [B1 P1 V3 V6]   #       --≮.𐹧\r
++N;    \u200D--<\u0338。𐹧; [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       --≮.𐹧\r
++B;    xn-----ujv.xn--fo0d;    [B1 V3 V6];     [B1 V3 V6]\r
++B;    xn-----l1tz1k.xn--fo0d; [B1 C2 V6];     [B1 C2 V6]      #       --≮.𐹧\r
++B;    \uA806。𻚏\u0FB0⒕; [P1 V5 V6];     [P1 V5 V6]      #       ꠆.ྰ⒕\r
++B;    \uA806。𻚏\u0FB014.; [P1 V5 V6];     [P1 V5 V6]      #       ꠆.ྰ14.\r
++B;    xn--l98a.xn--14-jsj57880f.;     [V5 V6];        [V5 V6] #       ꠆.ྰ14.\r
++B;    xn--l98a.xn--dgd218hhp28d;      [V5 V6];        [V5 V6] #       ꠆.ྰ⒕\r
++B;    򮉂\u06BC.𑆺\u0669;        [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ڼ.𑆺٩\r
++B;    򮉂\u06BC.𑆺\u0669;  [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       ڼ.𑆺٩\r
++B;    xn--vkb92243l.xn--iib9797k;     [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       ڼ.𑆺٩\r
++B;    󠁎\u06D0-。𞤴;     [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ې-.𞤴\r
++B;    󠁎\u06D0-。𞤒;     [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ې-.𞤴\r
++B;    xn----mwc72685y.xn--se6h;       [B1 V3 V6];     [B1 V3 V6]      #       ې-.𞤴\r
++T;    𝟠4󠇗𝈻.\u200D𐋵⛧\u200D;    [C2];   xn--84-s850a.xn--59h6326e       #       84𝈻.𐋵⛧\r
++N;    𝟠4󠇗𝈻.\u200D𐋵⛧\u200D;    [C2];   [C2]    #       84𝈻.𐋵⛧\r
++T;    84󠇗𝈻.\u200D𐋵⛧\u200D; [C2];   xn--84-s850a.xn--59h6326e       #       84𝈻.𐋵⛧\r
++N;    84󠇗𝈻.\u200D𐋵⛧\u200D; [C2];   [C2]    #       84𝈻.𐋵⛧\r
++B;    xn--84-s850a.xn--59h6326e;      84𝈻.𐋵⛧; xn--84-s850a.xn--59h6326e;      NV8\r
++B;    84𝈻.𐋵⛧; ;       xn--84-s850a.xn--59h6326e;      NV8\r
++B;    xn--84-s850a.xn--1uga573cfq1w;  [C2];   [C2]    #       84𝈻.𐋵⛧\r
++B;    -\u0601。ᡪ;  [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -.ᡪ\r
++B;    -\u0601。ᡪ;  [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -.ᡪ\r
++B;    xn----tkc.xn--68e;      [B1 V3 V6];     [B1 V3 V6]      #       -.ᡪ\r
++T;    ≮𝟕.謖ß≯;     [P1 V6];        [P1 V6]\r
++N;    ≮𝟕.謖ß≯;     [P1 V6];        [P1 V6]\r
++T;    <\u0338𝟕.謖ß>\u0338;     [P1 V6];        [P1 V6]\r
++N;    <\u0338𝟕.謖ß>\u0338;     [P1 V6];        [P1 V6]\r
++T;    ≮7.謖ß≯;  [P1 V6];        [P1 V6]\r
++N;    ≮7.謖ß≯;  [P1 V6];        [P1 V6]\r
++T;    <\u03387.謖ß>\u0338;  [P1 V6];        [P1 V6]\r
++N;    <\u03387.謖ß>\u0338;  [P1 V6];        [P1 V6]\r
++B;    <\u03387.謖SS>\u0338;  [P1 V6];        [P1 V6]\r
++B;    ≮7.謖SS≯;  [P1 V6];        [P1 V6]\r
++B;    ≮7.謖ss≯;  [P1 V6];        [P1 V6]\r
++B;    <\u03387.謖ss>\u0338;  [P1 V6];        [P1 V6]\r
++B;    <\u03387.謖Ss>\u0338;  [P1 V6];        [P1 V6]\r
++B;    ≮7.謖Ss≯;  [P1 V6];        [P1 V6]\r
++B;    xn--7-mgo.xn--ss-xjvv174c;      [V6];   [V6]\r
++B;    xn--7-mgo.xn--zca892oly5e;      [V6];   [V6]\r
++B;    <\u0338𝟕.謖SS>\u0338;     [P1 V6];        [P1 V6]\r
++B;    ≮𝟕.謖SS≯;     [P1 V6];        [P1 V6]\r
++B;    ≮𝟕.謖ss≯;     [P1 V6];        [P1 V6]\r
++B;    <\u0338𝟕.謖ss>\u0338;     [P1 V6];        [P1 V6]\r
++B;    <\u0338𝟕.謖Ss>\u0338;     [P1 V6];        [P1 V6]\r
++B;    ≮𝟕.謖Ss≯;     [P1 V6];        [P1 V6]\r
++B;    朶Ⴉ𞪡.𝨽\u0825📻-;     [B1 B5 B6 P1 V3 V5 V6]; [B1 B5 B6 P1 V3 V5 V6]  #       朶Ⴉ.𝨽ࠥ📻-\r
++B;    朶ⴉ𞪡.𝨽\u0825📻-;     [B1 B5 B6 P1 V3 V5 V6]; [B1 B5 B6 P1 V3 V5 V6]  #       朶ⴉ.𝨽ࠥ📻-\r
++B;    xn--0kjz47pd57t.xn----3gd37096apmwa;    [B1 B5 B6 V3 V5 V6];    [B1 B5 B6 V3 V5 V6]     #       朶ⴉ.𝨽ࠥ📻-\r
++B;    xn--hnd7245bd56p.xn----3gd37096apmwa;   [B1 B5 B6 V3 V5 V6];    [B1 B5 B6 V3 V5 V6]     #       朶Ⴉ.𝨽ࠥ📻-\r
++T;    𐤎。󑿰\u200C≮\u200D;     [B6 C1 C2 P1 V6];       [B6 P1 V6]      #       𐤎.≮\r
++N;    𐤎。󑿰\u200C≮\u200D;     [B6 C1 C2 P1 V6];       [B6 C1 C2 P1 V6]        #       𐤎.≮\r
++T;    𐤎。󑿰\u200C<\u0338\u200D; [B6 C1 C2 P1 V6];       [B6 P1 V6]      #       𐤎.≮\r
++N;    𐤎。󑿰\u200C<\u0338\u200D; [B6 C1 C2 P1 V6];       [B6 C1 C2 P1 V6]        #       𐤎.≮\r
++B;    xn--bk9c.xn--gdhx6802k; [B6 V6];        [B6 V6]\r
++B;    xn--bk9c.xn--0ugc04p2u638c;     [B6 C1 C2 V6];  [B6 C1 C2 V6]   #       𐤎.≮\r
++T;    񭜎⒈。\u200C𝟤;   [C1 P1 V6];     [P1 V6] #       ⒈.2\r
++N;    񭜎⒈。\u200C𝟤;   [C1 P1 V6];     [C1 P1 V6]      #       ⒈.2\r
++T;    񭜎1.。\u200C2;       [C1 P1 V6 A4_2];        [P1 V6 A4_2]    #       1..2\r
++N;    񭜎1.。\u200C2;       [C1 P1 V6 A4_2];        [C1 P1 V6 A4_2] #       1..2\r
++B;    xn--1-ex54e..2; [V6 A4_2];      [V6 A4_2]\r
++B;    xn--1-ex54e..xn--2-rgn; [C1 V6 A4_2];   [C1 V6 A4_2]    #       1..2\r
++B;    xn--tsh94183d.2;        [V6];   [V6]\r
++B;    xn--tsh94183d.xn--2-rgn;        [C1 V6];        [C1 V6] #       ⒈.2\r
++T;    󠟊𐹤\u200D.𐹳󙄵𐹶;  [B1 C2 P1 V6];  [B1 P1 V6]      #       𐹤.𐹳𐹶\r
++N;    󠟊𐹤\u200D.𐹳󙄵𐹶;  [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       𐹤.𐹳𐹶\r
++T;    󠟊𐹤\u200D.𐹳󙄵𐹶;    [B1 C2 P1 V6];  [B1 P1 V6]      #       𐹤.𐹳𐹶\r
++N;    󠟊𐹤\u200D.𐹳󙄵𐹶;    [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       𐹤.𐹳𐹶\r
++B;    xn--co0d98977c.xn--ro0dga22807v;        [B1 V6];        [B1 V6]\r
++B;    xn--1ugy994g7k93g.xn--ro0dga22807v;     [B1 C2 V6];     [B1 C2 V6]      #       𐹤.𐹳𐹶\r
++B;    𞤴𐹻𑓂𐭝.\u094D\uFE07􉛯;    [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𞤴𐹻𑓂𐭝.्\r
++B;    𞤴𐹻𑓂𐭝.\u094D\uFE07􉛯;      [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𞤴𐹻𑓂𐭝.्\r
++B;    𞤒𐹻𑓂𐭝.\u094D\uFE07􉛯;      [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𞤴𐹻𑓂𐭝.्\r
++B;    xn--609c96c09grp2w.xn--n3b28708s;       [B1 V5 V6];     [B1 V5 V6]      #       𞤴𐹻𑓂𐭝.्\r
++B;    𞤒𐹻𑓂𐭝.\u094D\uFE07􉛯;    [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𞤴𐹻𑓂𐭝.्\r
++B;    \u0668。𐹠𐹽񗮶;  [B1 P1 V6];     [B1 P1 V6]      #       ٨.𐹠𐹽\r
++B;    \u0668。𐹠𐹽񗮶;  [B1 P1 V6];     [B1 P1 V6]      #       ٨.𐹠𐹽\r
++B;    xn--hib.xn--7n0d2bu9196b;       [B1 V6];        [B1 V6] #       ٨.𐹠𐹽\r
++B;    \u1160񍀜.8򶾵\u069C; [B1 P1 V6];     [B1 P1 V6]      #       .8ڜ\r
++B;    xn--psd85033d.xn--8-otc61545t;  [B1 V6];        [B1 V6] #       .8ڜ\r
++T;    \u200D\u200C󠆪。ß𑓃;      [C1 C2];        [A4_2]  #       .ß𑓃\r
++N;    \u200D\u200C󠆪。ß𑓃;      [C1 C2];        [C1 C2] #       .ß𑓃\r
++T;    \u200D\u200C󠆪。ß𑓃;      [C1 C2];        [A4_2]  #       .ß𑓃\r
++N;    \u200D\u200C󠆪。ß𑓃;      [C1 C2];        [C1 C2] #       .ß𑓃\r
++T;    \u200D\u200C󠆪。SS𑓃;      [C1 C2];        [A4_2]  #       .ss𑓃\r
++N;    \u200D\u200C󠆪。SS𑓃;      [C1 C2];        [C1 C2] #       .ss𑓃\r
++T;    \u200D\u200C󠆪。ss𑓃;      [C1 C2];        [A4_2]  #       .ss𑓃\r
++N;    \u200D\u200C󠆪。ss𑓃;      [C1 C2];        [C1 C2] #       .ss𑓃\r
++T;    \u200D\u200C󠆪。Ss𑓃;      [C1 C2];        [A4_2]  #       .ss𑓃\r
++N;    \u200D\u200C󠆪。Ss𑓃;      [C1 C2];        [C1 C2] #       .ss𑓃\r
++B;    .xn--ss-bh7o;   [A4_2]; [A4_2]\r
++B;    xn--0ugb.xn--ss-bh7o;   [C1 C2];        [C1 C2] #       .ss𑓃\r
++B;    xn--0ugb.xn--zca0732l;  [C1 C2];        [C1 C2] #       .ß𑓃\r
++T;    \u200D\u200C󠆪。SS𑓃;      [C1 C2];        [A4_2]  #       .ss𑓃\r
++N;    \u200D\u200C󠆪。SS𑓃;      [C1 C2];        [C1 C2] #       .ss𑓃\r
++T;    \u200D\u200C󠆪。ss𑓃;      [C1 C2];        [A4_2]  #       .ss𑓃\r
++N;    \u200D\u200C󠆪。ss𑓃;      [C1 C2];        [C1 C2] #       .ss𑓃\r
++T;    \u200D\u200C󠆪。Ss𑓃;      [C1 C2];        [A4_2]  #       .ss𑓃\r
++N;    \u200D\u200C󠆪。Ss𑓃;      [C1 C2];        [C1 C2] #       .ss𑓃\r
++B;    xn--ss-bh7o;    ss𑓃; xn--ss-bh7o\r
++B;    ss𑓃; ;       xn--ss-bh7o\r
++B;    SS𑓃; ss𑓃; xn--ss-bh7o\r
++B;    Ss𑓃; ss𑓃; xn--ss-bh7o\r
++T;    ︒\u200Cヶ䒩.ꡪ;    [C1 P1 V6];     [P1 V6] #       ︒ヶ䒩.ꡪ\r
++N;    ︒\u200Cヶ䒩.ꡪ;    [C1 P1 V6];     [C1 P1 V6]      #       ︒ヶ䒩.ꡪ\r
++T;    。\u200Cヶ䒩.ꡪ;    [C1 A4_2];      [A4_2]  #       .ヶ䒩.ꡪ\r
++N;    。\u200Cヶ䒩.ꡪ;    [C1 A4_2];      [C1 A4_2]       #       .ヶ䒩.ꡪ\r
++B;    .xn--qekw60d.xn--gd9a;  [A4_2]; [A4_2]\r
++B;    .xn--0ug287dj0o.xn--gd9a;       [C1 A4_2];      [C1 A4_2]       #       .ヶ䒩.ꡪ\r
++B;    xn--qekw60dns9k.xn--gd9a;       [V6];   [V6]\r
++B;    xn--0ug287dj0or48o.xn--gd9a;    [C1 V6];        [C1 V6] #       ︒ヶ䒩.ꡪ\r
++B;    xn--qekw60d.xn--gd9a;   ヶ䒩.ꡪ;     xn--qekw60d.xn--gd9a\r
++B;    ヶ䒩.ꡪ;     ;       xn--qekw60d.xn--gd9a\r
++T;    \u200C⒈𤮍.󢓋\u1A60;       [C1 P1 V6];     [P1 V6] #       ⒈𤮍.᩠\r
++N;    \u200C⒈𤮍.󢓋\u1A60;       [C1 P1 V6];     [C1 P1 V6]      #       ⒈𤮍.᩠\r
++T;    \u200C1.𤮍.󢓋\u1A60;        [C1 P1 V6];     [P1 V6] #       1.𤮍.᩠\r
++N;    \u200C1.𤮍.󢓋\u1A60;        [C1 P1 V6];     [C1 P1 V6]      #       1.𤮍.᩠\r
++B;    1.xn--4x6j.xn--jof45148n;       [V6];   [V6]    #       1.𤮍.᩠\r
++B;    xn--1-rgn.xn--4x6j.xn--jof45148n;       [C1 V6];        [C1 V6] #       1.𤮍.᩠\r
++B;    xn--tshw462r.xn--jof45148n;     [V6];   [V6]    #       ⒈𤮍.᩠\r
++B;    xn--0ug88o7471d.xn--jof45148n;  [C1 V6];        [C1 V6] #       ⒈𤮍.᩠\r
++T;    ⒈\u200C𐫓󠀺。\u1A60񤰵\u200D;   [B1 C1 C2 P1 V5 V6];    [B1 P1 V5 V6]   #       ⒈𐫓.᩠\r
++N;    ⒈\u200C𐫓󠀺。\u1A60񤰵\u200D;   [B1 C1 C2 P1 V5 V6];    [B1 C1 C2 P1 V5 V6]     #       ⒈𐫓.᩠\r
++T;    1.\u200C𐫓󠀺。\u1A60񤰵\u200D;    [B1 C1 C2 P1 V5 V6];    [B1 B3 P1 V5 V6]        #       1.𐫓.᩠\r
++N;    1.\u200C𐫓󠀺。\u1A60񤰵\u200D;    [B1 C1 C2 P1 V5 V6];    [B1 C1 C2 P1 V5 V6]     #       1.𐫓.᩠\r
++B;    1.xn--8w9c40377c.xn--jofz5294e; [B1 B3 V5 V6];  [B1 B3 V5 V6]   #       1.𐫓.᩠\r
++B;    1.xn--0ug8853gk263g.xn--jof95xex98m;    [B1 C1 C2 V5 V6];       [B1 C1 C2 V5 V6]        #       1.𐫓.᩠\r
++B;    xn--tsh4435fk263g.xn--jofz5294e;        [B1 V5 V6];     [B1 V5 V6]      #       ⒈𐫓.᩠\r
++B;    xn--0ug78ol75wzcx4i.xn--jof95xex98m;    [B1 C1 C2 V5 V6];       [B1 C1 C2 V5 V6]        #       ⒈𐫓.᩠\r
++B;    𝅵。𝟫𞀈䬺⒈;  [P1 V6];        [P1 V6]\r
++B;    𝅵。9𞀈䬺1.;      [P1 V6];        [P1 V6]\r
++B;    xn--3f1h.xn--91-030c1650n.;     [V6];   [V6]\r
++B;    xn--3f1h.xn--9-ecp936non25a;    [V6];   [V6]\r
++B;    򡼺≯。盚\u0635;    [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ≯.盚ص\r
++B;    򡼺>\u0338。盚\u0635;        [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ≯.盚ص\r
++B;    xn--hdh30181h.xn--0gb7878c;     [B5 B6 V6];     [B5 B6 V6]      #       ≯.盚ص\r
++B;    -񿰭\u05B4。-󠁊𐢸≯;     [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ִ.-≯\r
++B;    -񿰭\u05B4。-󠁊𐢸>\u0338; [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ִ.-≯\r
++B;    xn----fgc06667m.xn----pgoy615he5y4i;    [B1 V3 V6];     [B1 V3 V6]      #       -ִ.-≯\r
++T;    󿭓\u1B44\u200C\u0A4D.𐭛񳋔;      [B2 B3 B6 P1 V6];       [B2 B3 P1 V6]   #       ᭄੍.𐭛\r
++N;    󿭓\u1B44\u200C\u0A4D.𐭛񳋔;      [B2 B3 B6 P1 V6];       [B2 B3 B6 P1 V6]        #       ᭄੍.𐭛\r
++T;    󿭓\u1B44\u200C\u0A4D.𐭛񳋔;        [B2 B3 B6 P1 V6];       [B2 B3 P1 V6]   #       ᭄੍.𐭛\r
++N;    󿭓\u1B44\u200C\u0A4D.𐭛񳋔;        [B2 B3 B6 P1 V6];       [B2 B3 B6 P1 V6]        #       ᭄੍.𐭛\r
++B;    xn--ybc997fb5881a.xn--409c6100y;        [B2 B3 V6];     [B2 B3 V6]      #       ᭄੍.𐭛\r
++B;    xn--ybc997f6rd2n772c.xn--409c6100y;     [B2 B3 B6 V6];  [B2 B3 B6 V6]   #       ᭄੍.𐭛\r
++T;    ⾇.\u067D𞤴\u06BB\u200D;     [B3 C2];        xn--8c1a.xn--2ib8jn539l #       舛.ٽ𞤴ڻ\r
++N;    ⾇.\u067D𞤴\u06BB\u200D;     [B3 C2];        [B3 C2] #       舛.ٽ𞤴ڻ\r
++T;    舛.\u067D𞤴\u06BB\u200D;     [B3 C2];        xn--8c1a.xn--2ib8jn539l #       舛.ٽ𞤴ڻ\r
++N;    舛.\u067D𞤴\u06BB\u200D;     [B3 C2];        [B3 C2] #       舛.ٽ𞤴ڻ\r
++T;    舛.\u067D𞤒\u06BB\u200D;     [B3 C2];        xn--8c1a.xn--2ib8jn539l #       舛.ٽ𞤴ڻ\r
++N;    舛.\u067D𞤒\u06BB\u200D;     [B3 C2];        [B3 C2] #       舛.ٽ𞤴ڻ\r
++B;    xn--8c1a.xn--2ib8jn539l;        舛.\u067D𞤴\u06BB;   xn--8c1a.xn--2ib8jn539l #       舛.ٽ𞤴ڻ\r
++B;    舛.\u067D𞤴\u06BB;   ;       xn--8c1a.xn--2ib8jn539l #       舛.ٽ𞤴ڻ\r
++B;    舛.\u067D𞤒\u06BB;   舛.\u067D𞤴\u06BB;   xn--8c1a.xn--2ib8jn539l #       舛.ٽ𞤴ڻ\r
++B;    xn--8c1a.xn--2ib8jv19e6413b;    [B3 C2];        [B3 C2] #       舛.ٽ𞤴ڻ\r
++T;    ⾇.\u067D𞤒\u06BB\u200D;     [B3 C2];        xn--8c1a.xn--2ib8jn539l #       舛.ٽ𞤴ڻ\r
++N;    ⾇.\u067D𞤒\u06BB\u200D;     [B3 C2];        [B3 C2] #       舛.ٽ𞤴ڻ\r
++B;    4򭆥。\u0767≯;      [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       4.ݧ≯\r
++B;    4򭆥。\u0767>\u0338;  [B1 B3 P1 V6];  [B1 B3 P1 V6]   #       4.ݧ≯\r
++B;    xn--4-xn17i.xn--rpb459k;        [B1 B3 V6];     [B1 B3 V6]      #       4.ݧ≯\r
++B;    𲔏𞫨񺿂硲.\u06AD;       [B5 P1 V6];     [B5 P1 V6]      #       硲.ڭ\r
++B;    𲔏𞫨񺿂硲.\u06AD; [B5 P1 V6];     [B5 P1 V6]      #       硲.ڭ\r
++B;    xn--lcz1610fn78gk609a.xn--gkb;  [B5 V6];        [B5 V6] #       硲.ڭ\r
++T;    \u200C.\uFE08\u0666Ⴆ℮;      [B1 C1 P1 V6];  [B1 P1 V6 A4_2] #       .٦Ⴆ℮\r
++N;    \u200C.\uFE08\u0666Ⴆ℮;      [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       .٦Ⴆ℮\r
++T;    \u200C.\uFE08\u0666ⴆ℮;      [B1 C1];        [B1 A4_2]       #       .٦ⴆ℮\r
++N;    \u200C.\uFE08\u0666ⴆ℮;      [B1 C1];        [B1 C1] #       .٦ⴆ℮\r
++B;    .xn--fib628k4li;        [B1 A4_2];      [B1 A4_2]       #       .٦ⴆ℮\r
++B;    xn--0ug.xn--fib628k4li; [B1 C1];        [B1 C1] #       .٦ⴆ℮\r
++B;    .xn--fib263c0yn;        [B1 V6 A4_2];   [B1 V6 A4_2]    #       .٦Ⴆ℮\r
++B;    xn--0ug.xn--fib263c0yn; [B1 C1 V6];     [B1 C1 V6]      #       .٦Ⴆ℮\r
++T;    \u06A3.\u0D4D\u200DϞ;        [B1 V5];        [B1 V5] #       ڣ.്ϟ\r
++N;    \u06A3.\u0D4D\u200DϞ;        [B1 V5];        [B1 V5] #       ڣ.്ϟ\r
++T;    \u06A3.\u0D4D\u200DϞ;  [B1 V5];        [B1 V5] #       ڣ.്ϟ\r
++N;    \u06A3.\u0D4D\u200DϞ;  [B1 V5];        [B1 V5] #       ڣ.്ϟ\r
++T;    \u06A3.\u0D4D\u200Dϟ;  [B1 V5];        [B1 V5] #       ڣ.്ϟ\r
++N;    \u06A3.\u0D4D\u200Dϟ;  [B1 V5];        [B1 V5] #       ڣ.്ϟ\r
++B;    xn--5jb.xn--xya149b;    [B1 V5];        [B1 V5] #       ڣ.്ϟ\r
++B;    xn--5jb.xn--xya149bpvp; [B1 V5];        [B1 V5] #       ڣ.്ϟ\r
++T;    \u06A3.\u0D4D\u200Dϟ;        [B1 V5];        [B1 V5] #       ڣ.്ϟ\r
++N;    \u06A3.\u0D4D\u200Dϟ;        [B1 V5];        [B1 V5] #       ڣ.്ϟ\r
++T;    \u200C𞸇𑘿。\u0623𐮂-腍;        [B1 B2 B3 C1];  [B2 B3] #       ح𑘿.أ𐮂-腍\r
++N;    \u200C𞸇𑘿。\u0623𐮂-腍;        [B1 B2 B3 C1];  [B1 B2 B3 C1]   #       ح𑘿.أ𐮂-腍\r
++T;    \u200C𞸇𑘿。\u0627\u0654𐮂-腍;  [B1 B2 B3 C1];  [B2 B3] #       ح𑘿.أ𐮂-腍\r
++N;    \u200C𞸇𑘿。\u0627\u0654𐮂-腍;  [B1 B2 B3 C1];  [B1 B2 B3 C1]   #       ح𑘿.أ𐮂-腍\r
++T;    \u200C\u062D𑘿。\u0623𐮂-腍;      [B1 B2 B3 C1];  [B2 B3] #       ح𑘿.أ𐮂-腍\r
++N;    \u200C\u062D𑘿。\u0623𐮂-腍;      [B1 B2 B3 C1];  [B1 B2 B3 C1]   #       ح𑘿.أ𐮂-腍\r
++T;    \u200C\u062D𑘿。\u0627\u0654𐮂-腍;        [B1 B2 B3 C1];  [B2 B3] #       ح𑘿.أ𐮂-腍\r
++N;    \u200C\u062D𑘿。\u0627\u0654𐮂-腍;        [B1 B2 B3 C1];  [B1 B2 B3 C1]   #       ح𑘿.أ𐮂-腍\r
++B;    xn--sgb4140l.xn----qmc5075grs9e;        [B2 B3];        [B2 B3] #       ح𑘿.أ𐮂-腍\r
++B;    xn--sgb953kmi8o.xn----qmc5075grs9e;     [B1 B2 B3 C1];  [B1 B2 B3 C1]   #       ح𑘿.أ𐮂-腍\r
++B;    -򭷙\u066B纛。𝟛񭤇🄅;  [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -٫纛.3🄅\r
++B;    -򭷙\u066B纛。3񭤇4,;       [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -٫纛.34,\r
++B;    xn----vqc8143g0tt4i.xn--34,-8787l;      [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -٫纛.34,\r
++B;    xn----vqc8143g0tt4i.xn--3-os1sn476y;    [B1 V3 V6];     [B1 V3 V6]      #       -٫纛.3🄅\r
++B;    🔔.Ⴂ\u07CC\u0BCD𐋮;     [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       🔔.Ⴂߌ்𐋮\r
++B;    🔔.Ⴂ\u07CC\u0BCD𐋮;       [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       🔔.Ⴂߌ்𐋮\r
++B;    🔔.ⴂ\u07CC\u0BCD𐋮;       [B1 B5];        [B1 B5] #       🔔.ⴂߌ்𐋮\r
++B;    xn--nv8h.xn--nsb46rvz1b222p;    [B1 B5];        [B1 B5] #       🔔.ⴂߌ்𐋮\r
++B;    xn--nv8h.xn--nsb46r83e8112a;    [B1 B5 V6];     [B1 B5 V6]      #       🔔.Ⴂߌ்𐋮\r
++B;    🔔.ⴂ\u07CC\u0BCD𐋮;     [B1 B5];        [B1 B5] #       🔔.ⴂߌ்𐋮\r
++B;    軥\u06B3.-𖬵;        [B1 B5 B6 V3];  [B1 B5 B6 V3]   #       軥ڳ.-𖬵\r
++B;    xn--mkb5480e.xn----6u5m;        [B1 B5 B6 V3];  [B1 B5 B6 V3]   #       軥ڳ.-𖬵\r
++B;    𐹤\u07CA\u06B6.𐨂-; [B1 V3 V5];     [B1 V3 V5]      #       𐹤ߊڶ.𐨂-\r
++B;    xn--pkb56cn614d.xn----974i;     [B1 V3 V5];     [B1 V3 V5]      #       𐹤ߊڶ.𐨂-\r
++B;    -󠅱0。\u17CF\u1DFD톇십;    [V3 V5];        [V3 V5] #       -0.៏᷽톇십\r
++B;    -󠅱0。\u17CF\u1DFD톇십;        [V3 V5];        [V3 V5] #       -0.៏᷽톇십\r
++B;    -󠅱0。\u17CF\u1DFD톇십;    [V3 V5];        [V3 V5] #       -0.៏᷽톇십\r
++B;    -󠅱0。\u17CF\u1DFD톇십;        [V3 V5];        [V3 V5] #       -0.៏᷽톇십\r
++B;    -0.xn--r4e872ah77nghm;  [V3 V5];        [V3 V5] #       -0.៏᷽톇십\r
++B;    ꡰ︒--。\u17CC靈𐹢񘳮;   [B1 B6 P1 V2 V3 V5 V6]; [B1 B6 P1 V2 V3 V5 V6]  #       ꡰ︒--.៌靈𐹢\r
++B;    ꡰ。--。\u17CC靈𐹢񘳮;   [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ꡰ.--.៌靈𐹢\r
++B;    xn--md9a.--.xn--o4e6836dpxudz0v1c;      [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       ꡰ.--.៌靈𐹢\r
++B;    xn-----bk9hu24z.xn--o4e6836dpxudz0v1c;  [B1 B6 V2 V3 V5 V6];    [B1 B6 V2 V3 V5 V6]     #       ꡰ︒--.៌靈𐹢\r
++B;    \u115FႿႵრ。\u0B4D;       [P1 V5 V6];     [P1 V5 V6]      #       ႿႵრ.୍\r
++B;    \u115FႿႵრ。\u0B4D;       [P1 V5 V6];     [P1 V5 V6]      #       ႿႵრ.୍\r
++B;    \u115Fⴟⴕრ。\u0B4D;       [P1 V5 V6];     [P1 V5 V6]      #       ⴟⴕრ.୍\r
++B;    \u115FႿⴕრ。\u0B4D;       [P1 V5 V6];     [P1 V5 V6]      #       Ⴟⴕრ.୍\r
++B;    xn--3nd0etsm92g.xn--9ic;        [V5 V6];        [V5 V6] #       Ⴟⴕრ.୍\r
++B;    xn--1od7wz74eeb.xn--9ic;        [V5 V6];        [V5 V6] #       ⴟⴕრ.୍\r
++B;    xn--tndt4hvw.xn--9ic;   [V5 V6];        [V5 V6] #       ႿႵრ.୍\r
++B;    \u115Fⴟⴕრ。\u0B4D;       [P1 V5 V6];     [P1 V5 V6]      #       ⴟⴕრ.୍\r
++B;    \u115FႿⴕრ。\u0B4D;       [P1 V5 V6];     [P1 V5 V6]      #       Ⴟⴕრ.୍\r
++B;    🄃𐹠.\u0664󠅇;    [B1 P1 V6];     [B1 P1 V6]      #       🄃𐹠.٤\r
++B;    2,𐹠.\u0664󠅇;      [B1 P1 V6];     [B1 P1 V6]      #       2,𐹠.٤\r
++B;    xn--2,-5g3o.xn--dib;    [B1 P1 V6];     [B1 P1 V6]      #       2,𐹠.٤\r
++B;    xn--7n0d1189a.xn--dib;  [B1 V6];        [B1 V6] #       🄃𐹠.٤\r
++T;    򻲼\u200C\uFC5B.\u07D2\u0848\u1BF3;  [B2 B3 B5 B6 C1 P1 V6]; [B2 B3 B5 B6 P1 V6]     #       ذٰ.ߒࡈ᯳\r
++N;    򻲼\u200C\uFC5B.\u07D2\u0848\u1BF3;  [B2 B3 B5 B6 C1 P1 V6]; [B2 B3 B5 B6 C1 P1 V6]  #       ذٰ.ߒࡈ᯳\r
++T;    򻲼\u200C\u0630\u0670.\u07D2\u0848\u1BF3;      [B2 B3 B5 B6 C1 P1 V6]; [B2 B3 B5 B6 P1 V6]     #       ذٰ.ߒࡈ᯳\r
++N;    򻲼\u200C\u0630\u0670.\u07D2\u0848\u1BF3;      [B2 B3 B5 B6 C1 P1 V6]; [B2 B3 B5 B6 C1 P1 V6]  #       ذٰ.ߒࡈ᯳\r
++B;    xn--vgb2kp1223g.xn--tsb0vz43c;  [B2 B3 B5 B6 V6];       [B2 B3 B5 B6 V6]        #       ذٰ.ߒࡈ᯳\r
++B;    xn--vgb2kq00fl213y.xn--tsb0vz43c;       [B2 B3 B5 B6 C1 V6];    [B2 B3 B5 B6 C1 V6]     #       ذٰ.ߒࡈ᯳\r
++T;    \u200D\u200D𞵪\u200C。ᡘ𑲭\u17B5; [B1 C1 C2 P1 V6];       [P1 V6] #       .ᡘ𑲭\r
++N;    \u200D\u200D𞵪\u200C。ᡘ𑲭\u17B5; [B1 C1 C2 P1 V6];       [B1 C1 C2 P1 V6]        #       .ᡘ𑲭\r
++B;    xn--l96h.xn--03e93aq365d;       [V6];   [V6]    #       .ᡘ𑲭\r
++B;    xn--0ugba05538b.xn--03e93aq365d;        [B1 C1 C2 V6];  [B1 C1 C2 V6]   #       .ᡘ𑲭\r
++B;    𞷻。⚄񗑇𑁿;     [B1 P1 V6];     [B1 P1 V6]\r
++B;    xn--qe7h.xn--c7h2966f7so4a;     [B1 V6];        [B1 V6]\r
++B;    \uA8C4≠.𞠨\u0667; [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ꣄≠.𞠨٧\r
++B;    \uA8C4=\u0338.𞠨\u0667;     [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ꣄≠.𞠨٧\r
++B;    \uA8C4≠.𞠨\u0667;   [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ꣄≠.𞠨٧\r
++B;    \uA8C4=\u0338.𞠨\u0667;       [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ꣄≠.𞠨٧\r
++B;    xn--1chy504c.xn--gib1777v;      [B1 V5 V6];     [B1 V5 V6]      #       ꣄≠.𞠨٧\r
++B;    𝟛𝆪\uA8C4。\uA8EA-;       [V3 V5];        [V3 V5] #       3꣄𝆪.꣪-\r
++B;    𝟛\uA8C4𝆪。\uA8EA-;       [V3 V5];        [V3 V5] #       3꣄𝆪.꣪-\r
++B;    3\uA8C4𝆪。\uA8EA-;  [V3 V5];        [V3 V5] #       3꣄𝆪.꣪-\r
++B;    xn--3-sl4eu679e.xn----xn4e;     [V3 V5];        [V3 V5] #       3꣄𝆪.꣪-\r
++B;    \u075F\u1BA2\u103AႧ.4;        [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]        #       ݟᮢ်Ⴇ.4\r
++B;    \u075F\u1BA2\u103Aⴇ.4;        [B1 B2 B3];     [B1 B2 B3]      #       ݟᮢ်ⴇ.4\r
++B;    xn--jpb846bjzj7pr.4;    [B1 B2 B3];     [B1 B2 B3]      #       ݟᮢ်ⴇ.4\r
++B;    xn--jpb846bmjw88a.4;    [B1 B2 B3 V6];  [B1 B2 B3 V6]   #       ݟᮢ်Ⴇ.4\r
++B;    ᄹ。\u0ECA򠯤󠄞;   [P1 V5 V6];     [P1 V5 V6]      #       ᄹ.໊\r
++B;    ᄹ。\u0ECA򠯤󠄞;   [P1 V5 V6];     [P1 V5 V6]      #       ᄹ.໊\r
++B;    xn--lrd.xn--s8c05302k;  [V5 V6];        [V5 V6] #       ᄹ.໊\r
++B;    Ⴆ򻢩.󠆡\uFE09𞤍;       [P1 V6];        [P1 V6]\r
++B;    Ⴆ򻢩.󠆡\uFE09𞤍; [P1 V6];        [P1 V6]\r
++B;    ⴆ򻢩.󠆡\uFE09𞤯; [P1 V6];        [P1 V6]\r
++B;    xn--xkjw3965g.xn--ne6h; [V6];   [V6]\r
++B;    xn--end82983m.xn--ne6h; [V6];   [V6]\r
++B;    ⴆ򻢩.󠆡\uFE09𞤯;       [P1 V6];        [P1 V6]\r
++B;    ⴆ򻢩.󠆡\uFE09𞤍; [P1 V6];        [P1 V6]\r
++B;    ⴆ򻢩.󠆡\uFE09𞤍;       [P1 V6];        [P1 V6]\r
++T;    ß\u080B︒\u067B.帼F∬\u200C;      [B5 B6 C1 P1 V6];       [B5 B6 P1 V6]   #       ßࠋ︒ٻ.帼f∫∫\r
++N;    ß\u080B︒\u067B.帼F∬\u200C;      [B5 B6 C1 P1 V6];       [B5 B6 C1 P1 V6]        #       ßࠋ︒ٻ.帼f∫∫\r
++T;    ß\u080B。\u067B.帼F∫∫\u200C;     [B5 B6 C1];     [B5 B6] #       ßࠋ.ٻ.帼f∫∫\r
++N;    ß\u080B。\u067B.帼F∫∫\u200C;     [B5 B6 C1];     [B5 B6 C1]      #       ßࠋ.ٻ.帼f∫∫\r
++T;    ß\u080B。\u067B.帼f∫∫\u200C;     [B5 B6 C1];     [B5 B6] #       ßࠋ.ٻ.帼f∫∫\r
++N;    ß\u080B。\u067B.帼f∫∫\u200C;     [B5 B6 C1];     [B5 B6 C1]      #       ßࠋ.ٻ.帼f∫∫\r
++T;    SS\u080B。\u067B.帼F∫∫\u200C;     [B5 B6 C1];     [B5 B6] #       ssࠋ.ٻ.帼f∫∫\r
++N;    SS\u080B。\u067B.帼F∫∫\u200C;     [B5 B6 C1];     [B5 B6 C1]      #       ssࠋ.ٻ.帼f∫∫\r
++T;    ss\u080B。\u067B.帼f∫∫\u200C;     [B5 B6 C1];     [B5 B6] #       ssࠋ.ٻ.帼f∫∫\r
++N;    ss\u080B。\u067B.帼f∫∫\u200C;     [B5 B6 C1];     [B5 B6 C1]      #       ssࠋ.ٻ.帼f∫∫\r
++T;    Ss\u080B。\u067B.帼F∫∫\u200C;     [B5 B6 C1];     [B5 B6] #       ssࠋ.ٻ.帼f∫∫\r
++N;    Ss\u080B。\u067B.帼F∫∫\u200C;     [B5 B6 C1];     [B5 B6 C1]      #       ssࠋ.ٻ.帼f∫∫\r
++B;    xn--ss-uze.xn--0ib.xn--f-tcoa9162d;     [B5 B6];        [B5 B6] #       ssࠋ.ٻ.帼f∫∫\r
++B;    xn--ss-uze.xn--0ib.xn--f-sgn48ga6997e;  [B5 B6 C1];     [B5 B6 C1]      #       ssࠋ.ٻ.帼f∫∫\r
++B;    xn--zca687a.xn--0ib.xn--f-sgn48ga6997e; [B5 B6 C1];     [B5 B6 C1]      #       ßࠋ.ٻ.帼f∫∫\r
++T;    ß\u080B︒\u067B.帼f∬\u200C;      [B5 B6 C1 P1 V6];       [B5 B6 P1 V6]   #       ßࠋ︒ٻ.帼f∫∫\r
++N;    ß\u080B︒\u067B.帼f∬\u200C;      [B5 B6 C1 P1 V6];       [B5 B6 C1 P1 V6]        #       ßࠋ︒ٻ.帼f∫∫\r
++T;    SS\u080B︒\u067B.帼F∬\u200C;      [B5 B6 C1 P1 V6];       [B5 B6 P1 V6]   #       ssࠋ︒ٻ.帼f∫∫\r
++N;    SS\u080B︒\u067B.帼F∬\u200C;      [B5 B6 C1 P1 V6];       [B5 B6 C1 P1 V6]        #       ssࠋ︒ٻ.帼f∫∫\r
++T;    ss\u080B︒\u067B.帼f∬\u200C;      [B5 B6 C1 P1 V6];       [B5 B6 P1 V6]   #       ssࠋ︒ٻ.帼f∫∫\r
++N;    ss\u080B︒\u067B.帼f∬\u200C;      [B5 B6 C1 P1 V6];       [B5 B6 C1 P1 V6]        #       ssࠋ︒ٻ.帼f∫∫\r
++T;    Ss\u080B︒\u067B.帼F∬\u200C;      [B5 B6 C1 P1 V6];       [B5 B6 P1 V6]   #       ssࠋ︒ٻ.帼f∫∫\r
++N;    Ss\u080B︒\u067B.帼F∬\u200C;      [B5 B6 C1 P1 V6];       [B5 B6 C1 P1 V6]        #       ssࠋ︒ٻ.帼f∫∫\r
++B;    xn--ss-k0d31nu121d.xn--f-tcoa9162d;     [B5 B6 V6];     [B5 B6 V6]      #       ssࠋ︒ٻ.帼f∫∫\r
++B;    xn--ss-k0d31nu121d.xn--f-sgn48ga6997e;  [B5 B6 C1 V6];  [B5 B6 C1 V6]   #       ssࠋ︒ٻ.帼f∫∫\r
++B;    xn--zca68zj8ac956c.xn--f-sgn48ga6997e;  [B5 B6 C1 V6];  [B5 B6 C1 V6]   #       ßࠋ︒ٻ.帼f∫∫\r
++T;    󘪗。𐹴𞨌\u200D;  [B1 C2 P1 V6];  [B1 P1 V6]      #       .𐹴\r
++N;    󘪗。𐹴𞨌\u200D;  [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       .𐹴\r
++T;    󘪗。𐹴𞨌\u200D;  [B1 C2 P1 V6];  [B1 P1 V6]      #       .𐹴\r
++N;    󘪗。𐹴𞨌\u200D;  [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       .𐹴\r
++B;    xn--8l83e.xn--so0dw168a;        [B1 V6];        [B1 V6]\r
++B;    xn--8l83e.xn--1ug4105gsxwf;     [B1 C2 V6];     [B1 C2 V6]      #       .𐹴\r
++B;    񗛨.򅟢𝟨\uA8C4;    [P1 V6];        [P1 V6] #       .6꣄\r
++B;    񗛨.򅟢6\uA8C4;       [P1 V6];        [P1 V6] #       .6꣄\r
++B;    xn--mi60a.xn--6-sl4es8023c;     [V6];   [V6]    #       .6꣄\r
++B;    \u1AB2\uFD8E。-۹ႱႨ;       [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ᪲مخج.-۹ႱႨ\r
++B;    \u1AB2\u0645\u062E\u062C。-۹ႱႨ;   [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ᪲مخج.-۹ႱႨ\r
++B;    \u1AB2\u0645\u062E\u062C。-۹ⴑⴈ;   [B1 V3 V5];     [B1 V3 V5]      #       ᪲مخج.-۹ⴑⴈ\r
++B;    \u1AB2\u0645\u062E\u062C。-۹Ⴑⴈ;   [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ᪲مخج.-۹Ⴑⴈ\r
++B;    xn--rgbd2e831i.xn----zyc875efr3a;       [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       ᪲مخج.-۹Ⴑⴈ\r
++B;    xn--rgbd2e831i.xn----zyc3430a9a;        [B1 V3 V5];     [B1 V3 V5]      #       ᪲مخج.-۹ⴑⴈ\r
++B;    xn--rgbd2e831i.xn----zyc155e9a; [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       ᪲مخج.-۹ႱႨ\r
++B;    \u1AB2\uFD8E。-۹ⴑⴈ;       [B1 V3 V5];     [B1 V3 V5]      #       ᪲مخج.-۹ⴑⴈ\r
++B;    \u1AB2\uFD8E。-۹Ⴑⴈ;       [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ᪲مخج.-۹Ⴑⴈ\r
++B;    𞤤.-\u08A3︒;      [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       𞤤.-ࢣ︒\r
++B;    𞤤.-\u08A3。;        [B1 V3];        [B1 V3] #       𞤤.-ࢣ.\r
++B;    𞤂.-\u08A3。;        [B1 V3];        [B1 V3] #       𞤤.-ࢣ.\r
++B;    xn--ce6h.xn----cod.;    [B1 V3];        [B1 V3] #       𞤤.-ࢣ.\r
++B;    𞤂.-\u08A3︒;      [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       𞤤.-ࢣ︒\r
++B;    xn--ce6h.xn----cod7069p;        [B1 V3 V6];     [B1 V3 V6]      #       𞤤.-ࢣ︒\r
++T;    \u200C𐺨.\u0859--;    [B1 C1 P1 V3 V5 V6];    [B1 P1 V3 V5 V6]        #       .࡙--\r
++N;    \u200C𐺨.\u0859--;    [B1 C1 P1 V3 V5 V6];    [B1 C1 P1 V3 V5 V6]     #       .࡙--\r
++B;    xn--9p0d.xn-----h6e;    [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       .࡙--\r
++B;    xn--0ug7905g.xn-----h6e;        [B1 C1 V3 V5 V6];       [B1 C1 V3 V5 V6]        #       .࡙--\r
++B;    𐋸󮘋Ⴢ.Ⴁ;        [P1 V6];        [P1 V6]\r
++B;    𐋸󮘋ⴢ.ⴁ;        [P1 V6];        [P1 V6]\r
++B;    𐋸󮘋Ⴢ.ⴁ;        [P1 V6];        [P1 V6]\r
++B;    xn--6nd5215jr2u0h.xn--skj;      [V6];   [V6]\r
++B;    xn--qlj1559dr224h.xn--skj;      [V6];   [V6]\r
++B;    xn--6nd5215jr2u0h.xn--8md;      [V6];   [V6]\r
++T;    񗑿\uA806₄򩞆。𲩧󠒹ς; [P1 V6];        [P1 V6] #       ꠆4.ς\r
++N;    񗑿\uA806₄򩞆。𲩧󠒹ς; [P1 V6];        [P1 V6] #       ꠆4.ς\r
++T;    񗑿\uA8064򩞆。𲩧󠒹ς;   [P1 V6];        [P1 V6] #       ꠆4.ς\r
++N;    񗑿\uA8064򩞆。𲩧󠒹ς;   [P1 V6];        [P1 V6] #       ꠆4.ς\r
++B;    񗑿\uA8064򩞆。𲩧󠒹Σ;   [P1 V6];        [P1 V6] #       ꠆4.σ\r
++B;    񗑿\uA8064򩞆。𲩧󠒹σ;   [P1 V6];        [P1 V6] #       ꠆4.σ\r
++B;    xn--4-w93ej7463a9io5a.xn--4xa31142bk3f0d;       [V6];   [V6]    #       ꠆4.σ\r
++B;    xn--4-w93ej7463a9io5a.xn--3xa51142bk3f0d;       [V6];   [V6]    #       ꠆4.ς\r
++B;    񗑿\uA806₄򩞆。𲩧󠒹Σ; [P1 V6];        [P1 V6] #       ꠆4.σ\r
++B;    񗑿\uA806₄򩞆。𲩧󠒹σ; [P1 V6];        [P1 V6] #       ꠆4.σ\r
++B;    󠆀\u0723。\u1DF4\u0775;      [B1 V5];        [B1 V5] #       ܣ.ᷴݵ\r
++B;    xn--tnb.xn--5pb136i;    [B1 V5];        [B1 V5] #       ܣ.ᷴݵ\r
++T;    𐹱\u0842𝪨。𬼖Ⴑ\u200D; [B1 B6 C2 P1 V6];       [B1 P1 V6]      #       𐹱ࡂ𝪨.𬼖Ⴑ\r
++N;    𐹱\u0842𝪨。𬼖Ⴑ\u200D; [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       𐹱ࡂ𝪨.𬼖Ⴑ\r
++T;    𐹱\u0842𝪨。𬼖Ⴑ\u200D; [B1 B6 C2 P1 V6];       [B1 P1 V6]      #       𐹱ࡂ𝪨.𬼖Ⴑ\r
++N;    𐹱\u0842𝪨。𬼖Ⴑ\u200D; [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       𐹱ࡂ𝪨.𬼖Ⴑ\r
++T;    𐹱\u0842𝪨。𬼖ⴑ\u200D; [B1 B6 C2];     [B1]    #       𐹱ࡂ𝪨.𬼖ⴑ\r
++N;    𐹱\u0842𝪨。𬼖ⴑ\u200D; [B1 B6 C2];     [B1 B6 C2]      #       𐹱ࡂ𝪨.𬼖ⴑ\r
++B;    xn--0vb1535kdb6e.xn--8kjz186s;  [B1];   [B1]    #       𐹱ࡂ𝪨.𬼖ⴑ\r
++B;    xn--0vb1535kdb6e.xn--1ug742c5714c;      [B1 B6 C2];     [B1 B6 C2]      #       𐹱ࡂ𝪨.𬼖ⴑ\r
++B;    xn--0vb1535kdb6e.xn--pnd93707a; [B1 V6];        [B1 V6] #       𐹱ࡂ𝪨.𬼖Ⴑ\r
++B;    xn--0vb1535kdb6e.xn--pnd879eqy33c;      [B1 B6 C2 V6];  [B1 B6 C2 V6]   #       𐹱ࡂ𝪨.𬼖Ⴑ\r
++T;    𐹱\u0842𝪨。𬼖ⴑ\u200D; [B1 B6 C2];     [B1]    #       𐹱ࡂ𝪨.𬼖ⴑ\r
++N;    𐹱\u0842𝪨。𬼖ⴑ\u200D; [B1 B6 C2];     [B1 B6 C2]      #       𐹱ࡂ𝪨.𬼖ⴑ\r
++T;    \u1714𐭪󠙘\u200D。-𐹴;   [B1 C2 P1 V3 V5 V6];    [B1 P1 V3 V5 V6]        #       ᜔𐭪.-𐹴\r
++N;    \u1714𐭪󠙘\u200D。-𐹴;   [B1 C2 P1 V3 V5 V6];    [B1 C2 P1 V3 V5 V6]     #       ᜔𐭪.-𐹴\r
++T;    \u1714𐭪󠙘\u200D。-𐹴;   [B1 C2 P1 V3 V5 V6];    [B1 P1 V3 V5 V6]        #       ᜔𐭪.-𐹴\r
++N;    \u1714𐭪󠙘\u200D。-𐹴;   [B1 C2 P1 V3 V5 V6];    [B1 C2 P1 V3 V5 V6]     #       ᜔𐭪.-𐹴\r
++B;    xn--fze4126jujt0g.xn----c36i;   [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       ᜔𐭪.-𐹴\r
++B;    xn--fze807bso0spy14i.xn----c36i;        [B1 C2 V3 V5 V6];       [B1 C2 V3 V5 V6]        #       ᜔𐭪.-𐹴\r
++B;    𾢬。\u0729︒쯙𝟧;        [B2 P1 V6];     [B2 P1 V6]      #       .ܩ︒쯙5\r
++B;    𾢬。\u0729︒쯙𝟧;  [B2 P1 V6];     [B2 P1 V6]      #       .ܩ︒쯙5\r
++B;    𾢬。\u0729。쯙5;   [P1 V6];        [P1 V6] #       .ܩ.쯙5\r
++B;    𾢬。\u0729。쯙5;     [P1 V6];        [P1 V6] #       .ܩ.쯙5\r
++B;    xn--t92s.xn--znb.xn--5-y88f;    [V6];   [V6]    #       .ܩ.쯙5\r
++B;    xn--t92s.xn--5-p1c0712mm8rb;    [B2 V6];        [B2 V6] #       .ܩ︒쯙5\r
++B;    𞤟-。\u0762≮뻐;   [B2 B3 P1 V3 V6];       [B2 B3 P1 V3 V6]        #       𞥁-.ݢ≮뻐\r
++B;    𞤟-。\u0762<\u0338뻐;    [B2 B3 P1 V3 V6];       [B2 B3 P1 V3 V6]        #       𞥁-.ݢ≮뻐\r
++B;    𞥁-。\u0762<\u0338뻐;    [B2 B3 P1 V3 V6];       [B2 B3 P1 V3 V6]        #       𞥁-.ݢ≮뻐\r
++B;    𞥁-。\u0762≮뻐;   [B2 B3 P1 V3 V6];       [B2 B3 P1 V3 V6]        #       𞥁-.ݢ≮뻐\r
++B;    xn----1j8r.xn--mpb269krv4i;     [B2 B3 V3 V6];  [B2 B3 V3 V6]   #       𞥁-.ݢ≮뻐\r
++B;    𞥩-򊫠.\u08B4≠;  [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       -.ࢴ≠\r
++B;    𞥩-򊫠.\u08B4=\u0338;      [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       -.ࢴ≠\r
++B;    𞥩-򊫠.\u08B4≠;    [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       -.ࢴ≠\r
++B;    𞥩-򊫠.\u08B4=\u0338;        [B2 B3 P1 V6];  [B2 B3 P1 V6]   #       -.ࢴ≠\r
++B;    xn----cm8rp3609a.xn--9yb852k;   [B2 B3 V6];     [B2 B3 V6]      #       -.ࢴ≠\r
++T;    -񅂏ςႼ.\u0661;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ςႼ.١\r
++N;    -񅂏ςႼ.\u0661;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ςႼ.١\r
++T;    -񅂏ςႼ.\u0661;      [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ςႼ.١\r
++N;    -񅂏ςႼ.\u0661;      [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ςႼ.١\r
++T;    -񅂏ςⴜ.\u0661;      [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ςⴜ.١\r
++N;    -񅂏ςⴜ.\u0661;      [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ςⴜ.١\r
++B;    -񅂏ΣႼ.\u0661;      [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -σႼ.١\r
++B;    -񅂏σⴜ.\u0661;      [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -σⴜ.١\r
++B;    -񅂏Σⴜ.\u0661;      [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -σⴜ.١\r
++B;    xn----0mb9682aov12f.xn--9hb;    [B1 V3 V6];     [B1 V3 V6]      #       -σⴜ.١\r
++B;    xn----0mb770hun11i.xn--9hb;     [B1 V3 V6];     [B1 V3 V6]      #       -σႼ.١\r
++B;    xn----ymb2782aov12f.xn--9hb;    [B1 V3 V6];     [B1 V3 V6]      #       -ςⴜ.١\r
++B;    xn----ymb080hun11i.xn--9hb;     [B1 V3 V6];     [B1 V3 V6]      #       -ςႼ.١\r
++T;    -񅂏ςⴜ.\u0661;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ςⴜ.١\r
++N;    -񅂏ςⴜ.\u0661;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ςⴜ.١\r
++B;    -񅂏ΣႼ.\u0661;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -σႼ.١\r
++B;    -񅂏σⴜ.\u0661;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -σⴜ.١\r
++B;    -񅂏Σⴜ.\u0661;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -σⴜ.١\r
++T;    \u17CA.\u200D𝟮𑀿;  [C2 V5];        [V5]    #       ៊.2𑀿\r
++N;    \u17CA.\u200D𝟮𑀿;  [C2 V5];        [C2 V5] #       ៊.2𑀿\r
++T;    \u17CA.\u200D2𑀿;     [C2 V5];        [V5]    #       ៊.2𑀿\r
++N;    \u17CA.\u200D2𑀿;     [C2 V5];        [C2 V5] #       ៊.2𑀿\r
++B;    xn--m4e.xn--2-ku7i;     [V5];   [V5]    #       ៊.2𑀿\r
++B;    xn--m4e.xn--2-tgnv469h; [C2 V5];        [C2 V5] #       ៊.2𑀿\r
++B;    ≯𝟖。\u1A60𐫓򟇑;       [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≯8.᩠𐫓\r
++B;    >\u0338𝟖。\u1A60𐫓򟇑;   [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≯8.᩠𐫓\r
++B;    ≯8。\u1A60𐫓򟇑;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≯8.᩠𐫓\r
++B;    >\u03388。\u1A60𐫓򟇑;      [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≯8.᩠𐫓\r
++B;    xn--8-ogo.xn--jof5303iv1z5d;    [B1 V5 V6];     [B1 V5 V6]      #       ≯8.᩠𐫓\r
++T;    𑲫Ↄ\u0664。\u200C; [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       𑲫Ↄ٤.\r
++N;    𑲫Ↄ\u0664。\u200C; [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       𑲫Ↄ٤.\r
++T;    𑲫Ↄ\u0664。\u200C; [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       𑲫Ↄ٤.\r
++N;    𑲫Ↄ\u0664。\u200C; [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       𑲫Ↄ٤.\r
++T;    𑲫ↄ\u0664。\u200C; [B1 C1 V5];     [B1 V5] #       𑲫ↄ٤.\r
++N;    𑲫ↄ\u0664。\u200C; [B1 C1 V5];     [B1 C1 V5]      #       𑲫ↄ٤.\r
++B;    xn--dib100l8x1p.;       [B1 V5];        [B1 V5] #       𑲫ↄ٤.\r
++B;    xn--dib100l8x1p.xn--0ug;        [B1 C1 V5];     [B1 C1 V5]      #       𑲫ↄ٤.\r
++B;    xn--dib999kcy1p.;       [B1 V5 V6];     [B1 V5 V6]      #       𑲫Ↄ٤.\r
++B;    xn--dib999kcy1p.xn--0ug;        [B1 C1 V5 V6];  [B1 C1 V5 V6]   #       𑲫Ↄ٤.\r
++T;    𑲫ↄ\u0664。\u200C; [B1 C1 V5];     [B1 V5] #       𑲫ↄ٤.\r
++N;    𑲫ↄ\u0664。\u200C; [B1 C1 V5];     [B1 C1 V5]      #       𑲫ↄ٤.\r
++T;    \u0C00𝟵\u200D\uFC9D.\u200D\u0750⒈; [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       ఀ9بح.ݐ⒈\r
++N;    \u0C00𝟵\u200D\uFC9D.\u200D\u0750⒈; [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       ఀ9بح.ݐ⒈\r
++T;    \u0C009\u200D\u0628\u062D.\u200D\u07501.;       [B1 C2 V5];     [B1 V5] #       ఀ9بح.ݐ1.\r
++N;    \u0C009\u200D\u0628\u062D.\u200D\u07501.;       [B1 C2 V5];     [B1 C2 V5]      #       ఀ9بح.ݐ1.\r
++B;    xn--9-1mcp570d.xn--1-x3c.;      [B1 V5];        [B1 V5] #       ఀ9بح.ݐ1.\r
++B;    xn--9-1mcp570dl51a.xn--1-x3c211q.;      [B1 C2 V5];     [B1 C2 V5]      #       ఀ9بح.ݐ1.\r
++B;    xn--9-1mcp570d.xn--3ob470m;     [B1 V5 V6];     [B1 V5 V6]      #       ఀ9بح.ݐ⒈\r
++B;    xn--9-1mcp570dl51a.xn--3ob977jmfd;      [B1 C2 V5 V6];  [B1 C2 V5 V6]   #       ఀ9بح.ݐ⒈\r
++T;    \uAAF6。嬶ß葽;      [V5];   [V5]    #       ꫶.嬶ß葽\r
++N;    \uAAF6。嬶ß葽;      [V5];   [V5]    #       ꫶.嬶ß葽\r
++B;    \uAAF6。嬶SS葽;      [V5];   [V5]    #       ꫶.嬶ss葽\r
++B;    \uAAF6。嬶ss葽;      [V5];   [V5]    #       ꫶.嬶ss葽\r
++B;    \uAAF6。嬶Ss葽;      [V5];   [V5]    #       ꫶.嬶ss葽\r
++B;    xn--2v9a.xn--ss-q40dp97m;       [V5];   [V5]    #       ꫶.嬶ss葽\r
++B;    xn--2v9a.xn--zca7637b14za;      [V5];   [V5]    #       ꫶.嬶ß葽\r
++B;    𑚶⒈。񞻡𐹺;     [B5 B6 P1 V5 V6];       [B5 B6 P1 V5 V6]\r
++B;    𑚶1.。񞻡𐹺;      [B5 B6 P1 V5 V6 A4_2];  [B5 B6 P1 V5 V6 A4_2]\r
++B;    xn--1-3j0j..xn--yo0d5914s;      [B5 B6 V5 V6 A4_2];     [B5 B6 V5 V6 A4_2]\r
++B;    xn--tshz969f.xn--yo0d5914s;     [B5 B6 V5 V6];  [B5 B6 V5 V6]\r
++B;    𑜤︒≮.񚕽\u05D8𞾩;    [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       𑜤︒≮.ט\r
++B;    𑜤︒<\u0338.񚕽\u05D8𞾩;        [B1 B5 B6 P1 V5 V6];    [B1 B5 B6 P1 V5 V6]     #       𑜤︒≮.ט\r
++B;    𑜤。≮.񚕽\u05D8𞾩;      [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       𑜤.≮.ט\r
++B;    𑜤。<\u0338.񚕽\u05D8𞾩;  [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       𑜤.≮.ט\r
++B;    xn--ci2d.xn--gdh.xn--deb0091w5q9u;      [B1 B3 B5 B6 V5 V6];    [B1 B3 B5 B6 V5 V6]     #       𑜤.≮.ט\r
++B;    xn--gdh5267fdzpa.xn--deb0091w5q9u;      [B1 B5 B6 V5 V6];       [B1 B5 B6 V5 V6]        #       𑜤︒≮.ט\r
++T;    󠆋\u0603񏦤.⇁ς򏋈򺇥;   [B1 P1 V6];     [B1 P1 V6]      #       .⇁ς\r
++N;    󠆋\u0603񏦤.⇁ς򏋈򺇥;   [B1 P1 V6];     [B1 P1 V6]      #       .⇁ς\r
++B;    󠆋\u0603񏦤.⇁Σ򏋈򺇥;   [B1 P1 V6];     [B1 P1 V6]      #       .⇁σ\r
++B;    󠆋\u0603񏦤.⇁σ򏋈򺇥;   [B1 P1 V6];     [B1 P1 V6]      #       .⇁σ\r
++B;    xn--lfb04106d.xn--4xa964mxv16m8moq;     [B1 V6];        [B1 V6] #       .⇁σ\r
++B;    xn--lfb04106d.xn--3xa174mxv16m8moq;     [B1 V6];        [B1 V6] #       .⇁ς\r
++T;    ς𑐽𵢈𑜫。𞬩\u200C𐫄;        [C1 P1 V6];     [P1 V6] #       ς𑐽𑜫.𐫄\r
++N;    ς𑐽𵢈𑜫。𞬩\u200C𐫄;        [C1 P1 V6];     [C1 P1 V6]      #       ς𑐽𑜫.𐫄\r
++T;    ς𑐽𵢈𑜫。𞬩\u200C𐫄;        [C1 P1 V6];     [P1 V6] #       ς𑐽𑜫.𐫄\r
++N;    ς𑐽𵢈𑜫。𞬩\u200C𐫄;        [C1 P1 V6];     [C1 P1 V6]      #       ς𑐽𑜫.𐫄\r
++T;    Σ𑐽𵢈𑜫。𞬩\u200C𐫄;        [C1 P1 V6];     [P1 V6] #       σ𑐽𑜫.𐫄\r
++N;    Σ𑐽𵢈𑜫。𞬩\u200C𐫄;        [C1 P1 V6];     [C1 P1 V6]      #       σ𑐽𑜫.𐫄\r
++T;    σ𑐽𵢈𑜫。𞬩\u200C𐫄;        [C1 P1 V6];     [P1 V6] #       σ𑐽𑜫.𐫄\r
++N;    σ𑐽𵢈𑜫。𞬩\u200C𐫄;        [C1 P1 V6];     [C1 P1 V6]      #       σ𑐽𑜫.𐫄\r
++B;    xn--4xa2260lk3b8z15g.xn--tw9ct349a;     [V6];   [V6]\r
++B;    xn--4xa2260lk3b8z15g.xn--0ug4653g2xzf;  [C1 V6];        [C1 V6] #       σ𑐽𑜫.𐫄\r
++B;    xn--3xa4260lk3b8z15g.xn--0ug4653g2xzf;  [C1 V6];        [C1 V6] #       ς𑐽𑜫.𐫄\r
++T;    Σ𑐽𵢈𑜫。𞬩\u200C𐫄;        [C1 P1 V6];     [P1 V6] #       σ𑐽𑜫.𐫄\r
++N;    Σ𑐽𵢈𑜫。𞬩\u200C𐫄;        [C1 P1 V6];     [C1 P1 V6]      #       σ𑐽𑜫.𐫄\r
++T;    σ𑐽𵢈𑜫。𞬩\u200C𐫄;        [C1 P1 V6];     [P1 V6] #       σ𑐽𑜫.𐫄\r
++N;    σ𑐽𵢈𑜫。𞬩\u200C𐫄;        [C1 P1 V6];     [C1 P1 V6]      #       σ𑐽𑜫.𐫄\r
++B;    -򵏽。-\uFC4C\u075B;  [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -.-نحݛ\r
++B;    -򵏽。-\u0646\u062D\u075B;    [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -.-نحݛ\r
++B;    xn----o452j.xn----cnc8e38c;     [B1 V3 V6];     [B1 V3 V6]      #       -.-نحݛ\r
++T;    ⺢򇺅𝟤。\u200D🚷;       [C2 P1 V6];     [P1 V6] #       ⺢2.🚷\r
++N;    ⺢򇺅𝟤。\u200D🚷;       [C2 P1 V6];     [C2 P1 V6]      #       ⺢2.🚷\r
++T;    ⺢򇺅2。\u200D🚷;  [C2 P1 V6];     [P1 V6] #       ⺢2.🚷\r
++N;    ⺢򇺅2。\u200D🚷;  [C2 P1 V6];     [C2 P1 V6]      #       ⺢2.🚷\r
++B;    xn--2-4jtr4282f.xn--m78h;       [V6];   [V6]\r
++B;    xn--2-4jtr4282f.xn--1ugz946p;   [C2 V6];        [C2 V6] #       ⺢2.🚷\r
++T;    \u0CF8\u200D\u2DFE𐹲。򤐶;  [B5 B6 C2 P1 V6];       [B5 B6 P1 V6]   #       ⷾ𐹲.\r
++N;    \u0CF8\u200D\u2DFE𐹲。򤐶;  [B5 B6 C2 P1 V6];       [B5 B6 C2 P1 V6]        #       ⷾ𐹲.\r
++T;    \u0CF8\u200D\u2DFE𐹲。򤐶;  [B5 B6 C2 P1 V6];       [B5 B6 P1 V6]   #       ⷾ𐹲.\r
++N;    \u0CF8\u200D\u2DFE𐹲。򤐶;  [B5 B6 C2 P1 V6];       [B5 B6 C2 P1 V6]        #       ⷾ𐹲.\r
++B;    xn--hvc220of37m.xn--3e36c;      [B5 B6 V6];     [B5 B6 V6]      #       ⷾ𐹲.\r
++B;    xn--hvc488g69j402t.xn--3e36c;   [B5 B6 C2 V6];  [B5 B6 C2 V6]   #       ⷾ𐹲.\r
++B;    𐹢.Ⴍ₉⁸;       [B1 P1 V6];     [B1 P1 V6]\r
++B;    𐹢.Ⴍ98;     [B1 P1 V6];     [B1 P1 V6]\r
++B;    𐹢.ⴍ98;     [B1];   [B1]\r
++B;    xn--9n0d.xn--98-u61a;   [B1];   [B1]\r
++B;    xn--9n0d.xn--98-7ek;    [B1 V6];        [B1 V6]\r
++B;    𐹢.ⴍ₉⁸;       [B1];   [B1]\r
++T;    \u200C\u034F。ß\u08E2⒚≯;  [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .ß⒚≯\r
++N;    \u200C\u034F。ß\u08E2⒚≯;  [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .ß⒚≯\r
++T;    \u200C\u034F。ß\u08E2⒚>\u0338;      [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .ß⒚≯\r
++N;    \u200C\u034F。ß\u08E2⒚>\u0338;      [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .ß⒚≯\r
++T;    \u200C\u034F。ß\u08E219.≯;  [B1 B5 C1 P1 V6];       [B1 B5 P1 V6 A4_2]      #       .ß19.≯\r
++N;    \u200C\u034F。ß\u08E219.≯;  [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       .ß19.≯\r
++T;    \u200C\u034F。ß\u08E219.>\u0338;      [B1 B5 C1 P1 V6];       [B1 B5 P1 V6 A4_2]      #       .ß19.≯\r
++N;    \u200C\u034F。ß\u08E219.>\u0338;      [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       .ß19.≯\r
++T;    \u200C\u034F。SS\u08E219.>\u0338;      [B1 B5 C1 P1 V6];       [B1 B5 P1 V6 A4_2]      #       .ss19.≯\r
++N;    \u200C\u034F。SS\u08E219.>\u0338;      [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       .ss19.≯\r
++T;    \u200C\u034F。SS\u08E219.≯;  [B1 B5 C1 P1 V6];       [B1 B5 P1 V6 A4_2]      #       .ss19.≯\r
++N;    \u200C\u034F。SS\u08E219.≯;  [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       .ss19.≯\r
++T;    \u200C\u034F。ss\u08E219.≯;  [B1 B5 C1 P1 V6];       [B1 B5 P1 V6 A4_2]      #       .ss19.≯\r
++N;    \u200C\u034F。ss\u08E219.≯;  [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       .ss19.≯\r
++T;    \u200C\u034F。ss\u08E219.>\u0338;      [B1 B5 C1 P1 V6];       [B1 B5 P1 V6 A4_2]      #       .ss19.≯\r
++N;    \u200C\u034F。ss\u08E219.>\u0338;      [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       .ss19.≯\r
++T;    \u200C\u034F。Ss\u08E219.>\u0338;      [B1 B5 C1 P1 V6];       [B1 B5 P1 V6 A4_2]      #       .ss19.≯\r
++N;    \u200C\u034F。Ss\u08E219.>\u0338;      [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       .ss19.≯\r
++T;    \u200C\u034F。Ss\u08E219.≯;  [B1 B5 C1 P1 V6];       [B1 B5 P1 V6 A4_2]      #       .ss19.≯\r
++N;    \u200C\u034F。Ss\u08E219.≯;  [B1 B5 C1 P1 V6];       [B1 B5 C1 P1 V6]        #       .ss19.≯\r
++B;    .xn--ss19-w0i.xn--hdh;  [B1 B5 V6 A4_2];        [B1 B5 V6 A4_2] #       .ss19.≯\r
++B;    xn--0ug.xn--ss19-w0i.xn--hdh;   [B1 B5 C1 V6];  [B1 B5 C1 V6]   #       .ss19.≯\r
++B;    xn--0ug.xn--19-fia813f.xn--hdh; [B1 B5 C1 V6];  [B1 B5 C1 V6]   #       .ß19.≯\r
++T;    \u200C\u034F。SS\u08E2⒚>\u0338;      [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .ss⒚≯\r
++N;    \u200C\u034F。SS\u08E2⒚>\u0338;      [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .ss⒚≯\r
++T;    \u200C\u034F。SS\u08E2⒚≯;  [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .ss⒚≯\r
++N;    \u200C\u034F。SS\u08E2⒚≯;  [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .ss⒚≯\r
++T;    \u200C\u034F。ss\u08E2⒚≯;  [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .ss⒚≯\r
++N;    \u200C\u034F。ss\u08E2⒚≯;  [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .ss⒚≯\r
++T;    \u200C\u034F。ss\u08E2⒚>\u0338;      [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .ss⒚≯\r
++N;    \u200C\u034F。ss\u08E2⒚>\u0338;      [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .ss⒚≯\r
++T;    \u200C\u034F。Ss\u08E2⒚>\u0338;      [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .ss⒚≯\r
++N;    \u200C\u034F。Ss\u08E2⒚>\u0338;      [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .ss⒚≯\r
++T;    \u200C\u034F。Ss\u08E2⒚≯;  [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6 A4_2]      #       .ss⒚≯\r
++N;    \u200C\u034F。Ss\u08E2⒚≯;  [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       .ss⒚≯\r
++B;    .xn--ss-9if872xjjc;     [B5 B6 V6 A4_2];        [B5 B6 V6 A4_2] #       .ss⒚≯\r
++B;    xn--0ug.xn--ss-9if872xjjc;      [B1 B5 B6 C1 V6];       [B1 B5 B6 C1 V6]        #       .ss⒚≯\r
++B;    xn--0ug.xn--zca612bx9vo5b;      [B1 B5 B6 C1 V6];       [B1 B5 B6 C1 V6]        #       .ß⒚≯\r
++T;    \u200C𞥍ᡌ.𣃔;   [B1 C1 P1 V6];  [B2 B3 P1 V6]   #       ᡌ.𣃔\r
++N;    \u200C𞥍ᡌ.𣃔;   [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ᡌ.𣃔\r
++T;    \u200C𞥍ᡌ.𣃔;     [B1 C1 P1 V6];  [B2 B3 P1 V6]   #       ᡌ.𣃔\r
++N;    \u200C𞥍ᡌ.𣃔;     [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ᡌ.𣃔\r
++B;    xn--c8e5919u.xn--od1j;  [B2 B3 V6];     [B2 B3 V6]\r
++B;    xn--c8e180bqz13b.xn--od1j;      [B1 C1 V6];     [B1 C1 V6]      #       ᡌ.𣃔\r
++B;    \u07D0򜬝-񡢬。\u0FA0Ⴛ𞷏𝆬;    [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       ߐ-.ྠႻ𝆬\r
++B;    \u07D0򜬝-񡢬。\u0FA0ⴛ𞷏𝆬;    [B1 B2 B3 P1 V5 V6];    [B1 B2 B3 P1 V5 V6]     #       ߐ-.ྠⴛ𝆬\r
++B;    xn----8bd11730jefvw.xn--wfd802mpm20agsxa;       [B1 B2 B3 V5 V6];       [B1 B2 B3 V5 V6]        #       ߐ-.ྠⴛ𝆬\r
++B;    xn----8bd11730jefvw.xn--wfd08cd265hgsxa;        [B1 B2 B3 V5 V6];       [B1 B2 B3 V5 V6]        #       ߐ-.ྠႻ𝆬\r
++B;    𝨥。⫟𑈾; [V5];   [V5]\r
++B;    xn--n82h.xn--63iw010f;  [V5];   [V5]\r
++T;    ⾛\u0753.Ⴕ𞠬\u0604\u200D;  [B5 B6 C2 P1 V6];       [B5 B6 P1 V6]   #       走ݓ.Ⴕ𞠬\r
++N;    ⾛\u0753.Ⴕ𞠬\u0604\u200D;  [B5 B6 C2 P1 V6];       [B5 B6 C2 P1 V6]        #       走ݓ.Ⴕ𞠬\r
++T;    走\u0753.Ⴕ𞠬\u0604\u200D;  [B5 B6 C2 P1 V6];       [B5 B6 P1 V6]   #       走ݓ.Ⴕ𞠬\r
++N;    走\u0753.Ⴕ𞠬\u0604\u200D;  [B5 B6 C2 P1 V6];       [B5 B6 C2 P1 V6]        #       走ݓ.Ⴕ𞠬\r
++T;    走\u0753.ⴕ𞠬\u0604\u200D;  [B5 B6 C2 P1 V6];       [B5 B6 P1 V6]   #       走ݓ.ⴕ𞠬\r
++N;    走\u0753.ⴕ𞠬\u0604\u200D;  [B5 B6 C2 P1 V6];       [B5 B6 C2 P1 V6]        #       走ݓ.ⴕ𞠬\r
++B;    xn--6ob9779d.xn--mfb511rxu80a;  [B5 B6 V6];     [B5 B6 V6]      #       走ݓ.ⴕ𞠬\r
++B;    xn--6ob9779d.xn--mfb444k5gjt754b;       [B5 B6 C2 V6];  [B5 B6 C2 V6]   #       走ݓ.ⴕ𞠬\r
++B;    xn--6ob9779d.xn--mfb785ck569a;  [B5 B6 V6];     [B5 B6 V6]      #       走ݓ.Ⴕ𞠬\r
++B;    xn--6ob9779d.xn--mfb785czmm0y85b;       [B5 B6 C2 V6];  [B5 B6 C2 V6]   #       走ݓ.Ⴕ𞠬\r
++T;    ⾛\u0753.ⴕ𞠬\u0604\u200D;  [B5 B6 C2 P1 V6];       [B5 B6 P1 V6]   #       走ݓ.ⴕ𞠬\r
++N;    ⾛\u0753.ⴕ𞠬\u0604\u200D;  [B5 B6 C2 P1 V6];       [B5 B6 C2 P1 V6]        #       走ݓ.ⴕ𞠬\r
++T;    -ᢗ\u200C🄄.𑜢;    [C1 P1 V3 V5 V6];       [P1 V3 V5 V6]   #       -ᢗ🄄.𑜢\r
++N;    -ᢗ\u200C🄄.𑜢;    [C1 P1 V3 V5 V6];       [C1 P1 V3 V5 V6]        #       -ᢗ🄄.𑜢\r
++T;    -ᢗ\u200C3,.𑜢;      [C1 P1 V3 V5 V6];       [P1 V3 V5 V6]   #       -ᢗ3,.𑜢\r
++N;    -ᢗ\u200C3,.𑜢;      [C1 P1 V3 V5 V6];       [C1 P1 V3 V5 V6]        #       -ᢗ3,.𑜢\r
++B;    xn---3,-3eu.xn--9h2d;   [P1 V3 V5 V6];  [P1 V3 V5 V6]\r
++B;    xn---3,-3eu051c.xn--9h2d;       [C1 P1 V3 V5 V6];       [C1 P1 V3 V5 V6]        #       -ᢗ3,.𑜢\r
++B;    xn----pck1820x.xn--9h2d;        [V3 V5 V6];     [V3 V5 V6]\r
++B;    xn----pck312bx563c.xn--9h2d;    [C1 V3 V5 V6];  [C1 V3 V5 V6]   #       -ᢗ🄄.𑜢\r
++T;    ≠𐸁𹏁\u200C.Ⴚ򳄠;      [B1 C1 P1 V6];  [B1 P1 V6]      #       ≠.Ⴚ\r
++N;    ≠𐸁𹏁\u200C.Ⴚ򳄠;      [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ≠.Ⴚ\r
++T;    =\u0338𐸁𹏁\u200C.Ⴚ򳄠;  [B1 C1 P1 V6];  [B1 P1 V6]      #       ≠.Ⴚ\r
++N;    =\u0338𐸁𹏁\u200C.Ⴚ򳄠;  [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ≠.Ⴚ\r
++T;    =\u0338𐸁𹏁\u200C.ⴚ򳄠;  [B1 C1 P1 V6];  [B1 P1 V6]      #       ≠.ⴚ\r
++N;    =\u0338𐸁𹏁\u200C.ⴚ򳄠;  [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ≠.ⴚ\r
++T;    ≠𐸁𹏁\u200C.ⴚ򳄠;      [B1 C1 P1 V6];  [B1 P1 V6]      #       ≠.ⴚ\r
++N;    ≠𐸁𹏁\u200C.ⴚ򳄠;      [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       ≠.ⴚ\r
++B;    xn--1ch2293gv3nr.xn--ilj23531g; [B1 V6];        [B1 V6]\r
++B;    xn--0ug83gn618a21ov.xn--ilj23531g;      [B1 C1 V6];     [B1 C1 V6]      #       ≠.ⴚ\r
++B;    xn--1ch2293gv3nr.xn--ynd49496l; [B1 V6];        [B1 V6]\r
++B;    xn--0ug83gn618a21ov.xn--ynd49496l;      [B1 C1 V6];     [B1 C1 V6]      #       ≠.Ⴚ\r
++B;    \u0669。󠇀𑇊;      [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ٩.𑇊\r
++B;    \u0669。󠇀𑇊;      [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ٩.𑇊\r
++B;    xn--iib.xn--6d1d;       [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ٩.𑇊\r
++B;    \u1086𞶀≯⒍。-;   [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ႆ≯⒍.-\r
++B;    \u1086𞶀>\u0338⒍。-;       [B1 P1 V3 V5 V6];       [B1 P1 V3 V5 V6]        #       ႆ≯⒍.-\r
++B;    \u1086𞶀≯6.。-;    [B1 P1 V3 V5 V6 A4_2];  [B1 P1 V3 V5 V6 A4_2]   #       ႆ≯6..-\r
++B;    \u1086𞶀>\u03386.。-;        [B1 P1 V3 V5 V6 A4_2];  [B1 P1 V3 V5 V6 A4_2]   #       ႆ≯6..-\r
++B;    xn--6-oyg968k7h74b..-;  [B1 V3 V5 V6 A4_2];     [B1 V3 V5 V6 A4_2]      #       ႆ≯6..-\r
++B;    xn--hmd482gqqb8730g.-;  [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       ႆ≯⒍.-\r
++B;    \u17B4.쮇-;    [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       .쮇-\r
++B;    \u17B4.쮇-;      [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       .쮇-\r
++B;    xn--z3e.xn----938f;     [V3 V5 V6];     [V3 V5 V6]      #       .쮇-\r
++T;    \u200C𑓂。⒈-􀪛;  [C1 P1 V6];     [P1 V5 V6]      #       𑓂.⒈-\r
++N;    \u200C𑓂。⒈-􀪛;  [C1 P1 V6];     [C1 P1 V6]      #       𑓂.⒈-\r
++T;    \u200C𑓂。1.-􀪛;   [C1 P1 V3 V6];  [P1 V3 V5 V6]   #       𑓂.1.-\r
++N;    \u200C𑓂。1.-􀪛;   [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       𑓂.1.-\r
++B;    xn--wz1d.1.xn----rg03o; [V3 V5 V6];     [V3 V5 V6]\r
++B;    xn--0ugy057g.1.xn----rg03o;     [C1 V3 V6];     [C1 V3 V6]      #       𑓂.1.-\r
++B;    xn--wz1d.xn----dcp29674o;       [V5 V6];        [V5 V6]\r
++B;    xn--0ugy057g.xn----dcp29674o;   [C1 V6];        [C1 V6] #       𑓂.⒈-\r
++T;    ⒈\uFEAE\u200C。\u20E9🖞\u200C𖬴; [B1 C1 P1 V5 V6];       [B1 P1 V5 V6]   #       ⒈ر.⃩🖞𖬴\r
++N;    ⒈\uFEAE\u200C。\u20E9🖞\u200C𖬴; [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       ⒈ر.⃩🖞𖬴\r
++T;    1.\u0631\u200C。\u20E9🖞\u200C𖬴;  [B1 B3 C1 V5];  [B1 V5] #       1.ر.⃩🖞𖬴\r
++N;    1.\u0631\u200C。\u20E9🖞\u200C𖬴;  [B1 B3 C1 V5];  [B1 B3 C1 V5]   #       1.ر.⃩🖞𖬴\r
++B;    1.xn--wgb.xn--c1g6021kg18c;     [B1 V5];        [B1 V5] #       1.ر.⃩🖞𖬴\r
++B;    1.xn--wgb253k.xn--0ugz6a8040fty5d;      [B1 B3 C1 V5];  [B1 B3 C1 V5]   #       1.ر.⃩🖞𖬴\r
++B;    xn--wgb746m.xn--c1g6021kg18c;   [B1 V5 V6];     [B1 V5 V6]      #       ⒈ر.⃩🖞𖬴\r
++B;    xn--wgb253kmfd.xn--0ugz6a8040fty5d;     [B1 C1 V5 V6];  [B1 C1 V5 V6]   #       ⒈ر.⃩🖞𖬴\r
++B;    󌭇。𝟐\u1BA8\u07D4;        [B1 P1 V6];     [B1 P1 V6]      #       .2ᮨߔ\r
++B;    󌭇。2\u1BA8\u07D4;   [B1 P1 V6];     [B1 P1 V6]      #       .2ᮨߔ\r
++B;    xn--xm89d.xn--2-icd143m;        [B1 V6];        [B1 V6] #       .2ᮨߔ\r
++T;    \uFD8F򫳺.ς\u200D𐹷;        [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V6]     #       مخم.ς𐹷\r
++N;    \uFD8F򫳺.ς\u200D𐹷;        [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       مخم.ς𐹷\r
++T;    \u0645\u062E\u0645򫳺.ς\u200D𐹷;    [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V6]     #       مخم.ς𐹷\r
++N;    \u0645\u062E\u0645򫳺.ς\u200D𐹷;    [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       مخم.ς𐹷\r
++T;    \u0645\u062E\u0645򫳺.Σ\u200D𐹷;    [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V6]     #       مخم.σ𐹷\r
++N;    \u0645\u062E\u0645򫳺.Σ\u200D𐹷;    [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       مخم.σ𐹷\r
++T;    \u0645\u062E\u0645򫳺.σ\u200D𐹷;    [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V6]     #       مخم.σ𐹷\r
++N;    \u0645\u062E\u0645򫳺.σ\u200D𐹷;    [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       مخم.σ𐹷\r
++B;    xn--tgb9bb64691z.xn--4xa6667k;  [B2 B3 B5 B6 V6];       [B2 B3 B5 B6 V6]        #       مخم.σ𐹷\r
++B;    xn--tgb9bb64691z.xn--4xa895lrp7n;       [B2 B3 B5 B6 C2 V6];    [B2 B3 B5 B6 C2 V6]     #       مخم.σ𐹷\r
++B;    xn--tgb9bb64691z.xn--3xa006lrp7n;       [B2 B3 B5 B6 C2 V6];    [B2 B3 B5 B6 C2 V6]     #       مخم.ς𐹷\r
++T;    \uFD8F򫳺.Σ\u200D𐹷;        [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V6]     #       مخم.σ𐹷\r
++N;    \uFD8F򫳺.Σ\u200D𐹷;        [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       مخم.σ𐹷\r
++T;    \uFD8F򫳺.σ\u200D𐹷;        [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V6]     #       مخم.σ𐹷\r
++N;    \uFD8F򫳺.σ\u200D𐹷;        [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       مخم.σ𐹷\r
++B;    ⒎\u06C1\u0605。\uAAF6۵𐇽; [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ⒎ہ.꫶۵𐇽\r
++B;    7.\u06C1\u0605。\uAAF6۵𐇽;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       7.ہ.꫶۵𐇽\r
++B;    7.xn--nfb98a.xn--imb3805fxt8b;  [B1 V5 V6];     [B1 V5 V6]      #       7.ہ.꫶۵𐇽\r
++B;    xn--nfb98ai25e.xn--imb3805fxt8b;        [B1 V5 V6];     [B1 V5 V6]      #       ⒎ہ.꫶۵𐇽\r
++B;    -ᡥ᠆󍲭。\u0605\u1A5D𐹡; [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       -ᡥ᠆.ᩝ𐹡\r
++B;    xn----f3j6s87156i.xn--nfb035hoo2p;      [B1 V3 V6];     [B1 V3 V6]      #       -ᡥ᠆.ᩝ𐹡\r
++T;    \u200D.\u06BD\u0663\u0596;      [B1 C2];        [A4_2]  #       .ڽ٣֖\r
++N;    \u200D.\u06BD\u0663\u0596;      [B1 C2];        [B1 C2] #       .ڽ٣֖\r
++B;    .xn--hcb32bni;  [A4_2]; [A4_2]  #       .ڽ٣֖\r
++B;    xn--1ug.xn--hcb32bni;   [B1 C2];        [B1 C2] #       .ڽ٣֖\r
++B;    xn--hcb32bni;   \u06BD\u0663\u0596;     xn--hcb32bni    #       ڽ٣֖\r
++B;    \u06BD\u0663\u0596;     ;       xn--hcb32bni    #       ڽ٣֖\r
++T;    㒧۱.Ⴚ\u0678\u200D;  [B5 B6 C2 P1 V6];       [B5 B6 P1 V6]   #       㒧۱.Ⴚيٴ\r
++N;    㒧۱.Ⴚ\u0678\u200D;  [B5 B6 C2 P1 V6];       [B5 B6 C2 P1 V6]        #       㒧۱.Ⴚيٴ\r
++T;    㒧۱.Ⴚ\u064A\u0674\u200D;    [B5 B6 C2 P1 V6];       [B5 B6 P1 V6]   #       㒧۱.Ⴚيٴ\r
++N;    㒧۱.Ⴚ\u064A\u0674\u200D;    [B5 B6 C2 P1 V6];       [B5 B6 C2 P1 V6]        #       㒧۱.Ⴚيٴ\r
++T;    㒧۱.ⴚ\u064A\u0674\u200D;    [B5 B6 C2];     [B5 B6] #       㒧۱.ⴚيٴ\r
++N;    㒧۱.ⴚ\u064A\u0674\u200D;    [B5 B6 C2];     [B5 B6 C2]      #       㒧۱.ⴚيٴ\r
++B;    xn--emb715u.xn--mhb8fy26k;      [B5 B6];        [B5 B6] #       㒧۱.ⴚيٴ\r
++B;    xn--emb715u.xn--mhb8f960g03l;   [B5 B6 C2];     [B5 B6 C2]      #       㒧۱.ⴚيٴ\r
++B;    xn--emb715u.xn--mhb8f817a;      [B5 B6 V6];     [B5 B6 V6]      #       㒧۱.Ⴚيٴ\r
++B;    xn--emb715u.xn--mhb8f817ao2p;   [B5 B6 C2 V6];  [B5 B6 C2 V6]   #       㒧۱.Ⴚيٴ\r
++T;    㒧۱.ⴚ\u0678\u200D;  [B5 B6 C2];     [B5 B6] #       㒧۱.ⴚيٴ\r
++N;    㒧۱.ⴚ\u0678\u200D;  [B5 B6 C2];     [B5 B6 C2]      #       㒧۱.ⴚيٴ\r
++B;    \u0F94ꡋ-.-𖬴;     [V3 V5];        [V3 V5] #       ྔꡋ-.-𖬴\r
++B;    \u0F94ꡋ-.-𖬴;       [V3 V5];        [V3 V5] #       ྔꡋ-.-𖬴\r
++B;    xn----ukg9938i.xn----4u5m;      [V3 V5];        [V3 V5] #       ྔꡋ-.-𖬴\r
++T;    񿒳-⋢\u200C.标-;  [C1 P1 V3 V6];  [P1 V3 V6]      #       -⋢.标-\r
++N;    񿒳-⋢\u200C.标-;  [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       -⋢.标-\r
++T;    񿒳-⊑\u0338\u200C.标-;    [C1 P1 V3 V6];  [P1 V3 V6]      #       -⋢.标-\r
++N;    񿒳-⊑\u0338\u200C.标-;    [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       -⋢.标-\r
++T;    񿒳-⋢\u200C.标-;    [C1 P1 V3 V6];  [P1 V3 V6]      #       -⋢.标-\r
++N;    񿒳-⋢\u200C.标-;    [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       -⋢.标-\r
++T;    񿒳-⊑\u0338\u200C.标-;      [C1 P1 V3 V6];  [P1 V3 V6]      #       -⋢.标-\r
++N;    񿒳-⊑\u0338\u200C.标-;      [C1 P1 V3 V6];  [C1 P1 V3 V6]   #       -⋢.标-\r
++B;    xn----9mo67451g.xn----qj7b;     [V3 V6];        [V3 V6]\r
++B;    xn----sgn90kn5663a.xn----qj7b;  [C1 V3 V6];     [C1 V3 V6]      #       -⋢.标-\r
++T;    \u0671.ς\u07DC;      [B5 B6];        [B5 B6] #       ٱ.ςߜ\r
++N;    \u0671.ς\u07DC;      [B5 B6];        [B5 B6] #       ٱ.ςߜ\r
++T;    \u0671.ς\u07DC;        [B5 B6];        [B5 B6] #       ٱ.ςߜ\r
++N;    \u0671.ς\u07DC;        [B5 B6];        [B5 B6] #       ٱ.ςߜ\r
++B;    \u0671.Σ\u07DC;        [B5 B6];        [B5 B6] #       ٱ.σߜ\r
++B;    \u0671.σ\u07DC;        [B5 B6];        [B5 B6] #       ٱ.σߜ\r
++B;    xn--qib.xn--4xa21s;     [B5 B6];        [B5 B6] #       ٱ.σߜ\r
++B;    xn--qib.xn--3xa41s;     [B5 B6];        [B5 B6] #       ٱ.ςߜ\r
++B;    \u0671.Σ\u07DC;      [B5 B6];        [B5 B6] #       ٱ.σߜ\r
++B;    \u0671.σ\u07DC;      [B5 B6];        [B5 B6] #       ٱ.σߜ\r
++T;    񼈶\u0605.\u08C1\u200D𑑂𱼱;      [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V6]     #       .𑑂\r
++N;    񼈶\u0605.\u08C1\u200D𑑂𱼱;      [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       .𑑂\r
++T;    񼈶\u0605.\u08C1\u200D𑑂𱼱;        [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 P1 V6]     #       .𑑂\r
++N;    񼈶\u0605.\u08C1\u200D𑑂𱼱;        [B2 B3 B5 B6 C2 P1 V6]; [B2 B3 B5 B6 C2 P1 V6]  #       .𑑂\r
++B;    xn--nfb17942h.xn--nzb6708kx3pn; [B2 B3 B5 B6 V6];       [B2 B3 B5 B6 V6]        #       .𑑂\r
++B;    xn--nfb17942h.xn--nzb240jv06otevq;      [B2 B3 B5 B6 C2 V6];    [B2 B3 B5 B6 C2 V6]     #       .𑑂\r
++B;    𐹾𐋩𞵜。\u1BF2;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𐹾𐋩.᯲\r
++B;    𐹾𐋩𞵜。\u1BF2;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𐹾𐋩.᯲\r
++B;    xn--d97cn8rn44p.xn--0zf;        [B1 V5 V6];     [B1 V5 V6]      #       𐹾𐋩.᯲\r
++T;    6\u1160\u1C33󠸧.򟜊锰\u072Cς;      [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       6ᰳ.锰ܬς\r
++N;    6\u1160\u1C33󠸧.򟜊锰\u072Cς;      [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       6ᰳ.锰ܬς\r
++B;    6\u1160\u1C33󠸧.򟜊锰\u072CΣ;      [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       6ᰳ.锰ܬσ\r
++B;    6\u1160\u1C33󠸧.򟜊锰\u072Cσ;      [B1 B5 P1 V6];  [B1 B5 P1 V6]   #       6ᰳ.锰ܬσ\r
++B;    xn--6-5bh476ewr517a.xn--4xa95ohw6pk078g;        [B1 B5 V6];     [B1 B5 V6]      #       6ᰳ.锰ܬσ\r
++B;    xn--6-5bh476ewr517a.xn--3xa16ohw6pk078g;        [B1 B5 V6];     [B1 B5 V6]      #       6ᰳ.锰ܬς\r
++B;    \u06B3\uFE04񅎦𝟽。𐹽;    [B1 B2 P1 V6];  [B1 B2 P1 V6]   #       ڳ7.𐹽\r
++B;    \u06B3\uFE04񅎦7。𐹽;       [B1 B2 P1 V6];  [B1 B2 P1 V6]   #       ڳ7.𐹽\r
++B;    xn--7-yuc34665f.xn--1o0d;       [B1 B2 V6];     [B1 B2 V6]      #       ڳ7.𐹽\r
++T;    𞮧.\u200C⫞;       [B1 C1 P1 V6];  [B1 P1 V6]      #       .⫞\r
++N;    𞮧.\u200C⫞;       [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       .⫞\r
++T;    𞮧.\u200C⫞; [B1 C1 P1 V6];  [B1 P1 V6]      #       .⫞\r
++N;    𞮧.\u200C⫞; [B1 C1 P1 V6];  [B1 C1 P1 V6]   #       .⫞\r
++B;    xn--pw6h.xn--53i;       [B1 V6];        [B1 V6]\r
++B;    xn--pw6h.xn--0ug283b;   [B1 C1 V6];     [B1 C1 V6]      #       .⫞\r
++B;    -񕉴.\u06E0ᢚ-;       [P1 V3 V5 V6];  [P1 V3 V5 V6]   #       -.۠ᢚ-\r
++B;    xn----qi38c.xn----jxc827k;      [V3 V5 V6];     [V3 V5 V6]      #       -.۠ᢚ-\r
++T;    ⌁\u200D𑄴.\u200C𝟩\u066C;       [B1 C1 C2];     [B1]    #       ⌁𑄴.7٬\r
++N;    ⌁\u200D𑄴.\u200C𝟩\u066C;       [B1 C1 C2];     [B1 C1 C2]      #       ⌁𑄴.7٬\r
++T;    ⌁\u200D𑄴.\u200C7\u066C;    [B1 C1 C2];     [B1]    #       ⌁𑄴.7٬\r
++N;    ⌁\u200D𑄴.\u200C7\u066C;    [B1 C1 C2];     [B1 C1 C2]      #       ⌁𑄴.7٬\r
++B;    xn--nhh5394g.xn--7-xqc; [B1];   [B1]    #       ⌁𑄴.7٬\r
++B;    xn--1ug38i2093a.xn--7-xqc297q;  [B1 C1 C2];     [B1 C1 C2]      #       ⌁𑄴.7٬\r
++B;    ︒\uFD05\u0E37\uFEFC。岓\u1BF2󠾃ᡂ;       [B1 P1 V6];     [B1 P1 V6]      #       ︒صىืلا.岓᯲ᡂ\r
++B;    。\u0635\u0649\u0E37\u0644\u0627。岓\u1BF2󠾃ᡂ;   [P1 V6 A4_2];   [P1 V6 A4_2]    #       .صىืلا.岓᯲ᡂ\r
++B;    .xn--mgb1a7bt462h.xn--17e10qe61f9r71s;  [V6 A4_2];      [V6 A4_2]       #       .صىืلا.岓᯲ᡂ\r
++B;    xn--mgb1a7bt462hf267a.xn--17e10qe61f9r71s;      [B1 V6];        [B1 V6] #       ︒صىืلا.岓᯲ᡂ\r
++B;    𐹨。8𑁆;   [B1];   [B1]\r
++B;    xn--go0d.xn--8-yu7i;    [B1];   [B1]\r
++B;    𞀕\u0D43.ꡚ\u08FA𐹰\u0D44;       [B1 B3 B5 B6 V5];       [B1 B3 B5 B6 V5]        #       𞀕ൃ.ꡚࣺ𐹰ൄ\r
++B;    𞀕\u0D43.ꡚ\u08FA𐹰\u0D44; [B1 B3 B5 B6 V5];       [B1 B3 B5 B6 V5]        #       𞀕ൃ.ꡚࣺ𐹰ൄ\r
++B;    xn--mxc5210v.xn--90b01t8u2p1ltd;        [B1 B3 B5 B6 V5];       [B1 B3 B5 B6 V5]        #       𞀕ൃ.ꡚࣺ𐹰ൄ\r
++B;    󆩏𐦹\u0303。󠍅;  [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       ̃.\r
++B;    󆩏𐦹\u0303。󠍅;  [B1 B5 B6 P1 V6];       [B1 B5 B6 P1 V6]        #       ̃.\r
++B;    xn--nsa1265kp9z9e.xn--xt36e;    [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       ̃.\r
++B;    ᢌ.-\u085A;  [V3];   [V3]    #       ᢌ.-࡚\r
++B;    ᢌ.-\u085A;    [V3];   [V3]    #       ᢌ.-࡚\r
++B;    xn--59e.xn----5jd;      [V3];   [V3]    #       ᢌ.-࡚\r
++B;    𥛛𑘶。𐹬𐲸\u0BCD;      [B1 P1 V6];     [B1 P1 V6]      #       𥛛𑘶.𐹬்\r
++B;    𥛛𑘶。𐹬𐲸\u0BCD;      [B1 P1 V6];     [B1 P1 V6]      #       𥛛𑘶.𐹬்\r
++B;    xn--jb2dj685c.xn--xmc5562kmcb;  [B1 V6];        [B1 V6] #       𥛛𑘶.𐹬்\r
++T;    Ⴐ\u077F.\u200C;     [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6]   #       Ⴐݿ.\r
++N;    Ⴐ\u077F.\u200C;     [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       Ⴐݿ.\r
++T;    Ⴐ\u077F.\u200C;       [B1 B5 B6 C1 P1 V6];    [B5 B6 P1 V6]   #       Ⴐݿ.\r
++N;    Ⴐ\u077F.\u200C;       [B1 B5 B6 C1 P1 V6];    [B1 B5 B6 C1 P1 V6]     #       Ⴐݿ.\r
++T;    ⴐ\u077F.\u200C;       [B1 B5 B6 C1];  [B5 B6] #       ⴐݿ.\r
++N;    ⴐ\u077F.\u200C;       [B1 B5 B6 C1];  [B1 B5 B6 C1]   #       ⴐݿ.\r
++B;    xn--gqb743q.;   [B5 B6];        [B5 B6] #       ⴐݿ.\r
++B;    xn--gqb743q.xn--0ug;    [B1 B5 B6 C1];  [B1 B5 B6 C1]   #       ⴐݿ.\r
++B;    xn--gqb918b.;   [B5 B6 V6];     [B5 B6 V6]      #       Ⴐݿ.\r
++B;    xn--gqb918b.xn--0ug;    [B1 B5 B6 C1 V6];       [B1 B5 B6 C1 V6]        #       Ⴐݿ.\r
++T;    ⴐ\u077F.\u200C;     [B1 B5 B6 C1];  [B5 B6] #       ⴐݿ.\r
++N;    ⴐ\u077F.\u200C;     [B1 B5 B6 C1];  [B1 B5 B6 C1]   #       ⴐݿ.\r
++T;    🄅𑲞-⒈。\u200Dᠩ\u06A5; [B1 C2 P1 V6];  [B1 B5 B6 P1 V6]        #       🄅𑲞-⒈.ᠩڥ\r
++N;    🄅𑲞-⒈。\u200Dᠩ\u06A5; [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       🄅𑲞-⒈.ᠩڥ\r
++T;    4,𑲞-1.。\u200Dᠩ\u06A5;    [B1 C2 P1 V6 A4_2];     [B1 B5 B6 P1 V6 A4_2]   #       4,𑲞-1..ᠩڥ\r
++N;    4,𑲞-1.。\u200Dᠩ\u06A5;    [B1 C2 P1 V6 A4_2];     [B1 C2 P1 V6 A4_2]      #       4,𑲞-1..ᠩڥ\r
++B;    xn--4,-1-w401a..xn--7jb180g;    [B1 B5 B6 P1 V6 A4_2];  [B1 B5 B6 P1 V6 A4_2]   #       4,𑲞-1..ᠩڥ\r
++B;    xn--4,-1-w401a..xn--7jb180gexf; [B1 C2 P1 V6 A4_2];     [B1 C2 P1 V6 A4_2]      #       4,𑲞-1..ᠩڥ\r
++B;    xn----ecp8796hjtvg.xn--7jb180g; [B1 B5 B6 V6];  [B1 B5 B6 V6]   #       🄅𑲞-⒈.ᠩڥ\r
++B;    xn----ecp8796hjtvg.xn--7jb180gexf;      [B1 C2 V6];     [B1 C2 V6]      #       🄅𑲞-⒈.ᠩڥ\r
++B;    񗀤。𞤪򮿋;        [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    񗀤。𞤈򮿋;        [B2 B3 P1 V6];  [B2 B3 P1 V6]\r
++B;    xn--4240a.xn--ie6h83808a;       [B2 B3 V6];     [B2 B3 V6]\r
++B;    \u05C1۲。𐮊\u066C𝨊鄨;   [B1 B2 B3 V5];  [B1 B2 B3 V5]   #       ׁ۲.𐮊٬𝨊鄨\r
++B;    \u05C1۲。𐮊\u066C𝨊鄨;   [B1 B2 B3 V5];  [B1 B2 B3 V5]   #       ׁ۲.𐮊٬𝨊鄨\r
++B;    xn--pdb42d.xn--lib6412enztdwv6h;        [B1 B2 B3 V5];  [B1 B2 B3 V5]   #       ׁ۲.𐮊٬𝨊鄨\r
++B;    𞭳-ꡁ。\u1A69\u0BCD-;       [B1 B2 B3 P1 V3 V5 V6]; [B1 B2 B3 P1 V3 V5 V6]  #       -ꡁ.ᩩ்-\r
++B;    xn----be4e4276f.xn----lze333i;  [B1 B2 B3 V3 V5 V6];    [B1 B2 B3 V3 V5 V6]     #       -ꡁ.ᩩ்-\r
++T;    \u1039-𚮭🞢.ß;   [P1 V5 V6];     [P1 V5 V6]      #       ္-🞢.ß\r
++N;    \u1039-𚮭🞢.ß;   [P1 V5 V6];     [P1 V5 V6]      #       ္-🞢.ß\r
++T;    \u1039-𚮭🞢.ß;     [P1 V5 V6];     [P1 V5 V6]      #       ္-🞢.ß\r
++N;    \u1039-𚮭🞢.ß;     [P1 V5 V6];     [P1 V5 V6]      #       ္-🞢.ß\r
++B;    \u1039-𚮭🞢.SS;     [P1 V5 V6];     [P1 V5 V6]      #       ္-🞢.ss\r
++B;    \u1039-𚮭🞢.ss;     [P1 V5 V6];     [P1 V5 V6]      #       ္-🞢.ss\r
++B;    \u1039-𚮭🞢.Ss;     [P1 V5 V6];     [P1 V5 V6]      #       ္-🞢.ss\r
++B;    xn----9tg11172akr8b.ss; [V5 V6];        [V5 V6] #       ္-🞢.ss\r
++B;    xn----9tg11172akr8b.xn--zca;    [V5 V6];        [V5 V6] #       ္-🞢.ß\r
++B;    \u1039-𚮭🞢.SS;   [P1 V5 V6];     [P1 V5 V6]      #       ္-🞢.ss\r
++B;    \u1039-𚮭🞢.ss;   [P1 V5 V6];     [P1 V5 V6]      #       ္-🞢.ss\r
++B;    \u1039-𚮭🞢.Ss;   [P1 V5 V6];     [P1 V5 V6]      #       ္-🞢.ss\r
++T;    \uFCF2-\u200C。Ⴟ\u200C␣;   [B3 B6 C1 P1 V6];       [B3 B6 P1 V3 V6]        #       ـَّ-.Ⴟ␣\r
++N;    \uFCF2-\u200C。Ⴟ\u200C␣;   [B3 B6 C1 P1 V6];       [B3 B6 C1 P1 V6]        #       ـَّ-.Ⴟ␣\r
++T;    \u0640\u064E\u0651-\u200C。Ⴟ\u200C␣;       [B3 B6 C1 P1 V6];       [B3 B6 P1 V3 V6]        #       ـَّ-.Ⴟ␣\r
++N;    \u0640\u064E\u0651-\u200C。Ⴟ\u200C␣;       [B3 B6 C1 P1 V6];       [B3 B6 C1 P1 V6]        #       ـَّ-.Ⴟ␣\r
++T;    \u0640\u064E\u0651-\u200C。ⴟ\u200C␣;       [B3 B6 C1];     [B3 B6 V3]      #       ـَّ-.ⴟ␣\r
++N;    \u0640\u064E\u0651-\u200C。ⴟ\u200C␣;       [B3 B6 C1];     [B3 B6 C1]      #       ـَّ-.ⴟ␣\r
++B;    xn----eoc6bm.xn--xph904a;       [B3 B6 V3];     [B3 B6 V3]      #       ـَّ-.ⴟ␣\r
++B;    xn----eoc6bm0504a.xn--0ug13nd0j;        [B3 B6 C1];     [B3 B6 C1]      #       ـَّ-.ⴟ␣\r
++B;    xn----eoc6bm.xn--3nd240h;       [B3 B6 V3 V6];  [B3 B6 V3 V6]   #       ـَّ-.Ⴟ␣\r
++B;    xn----eoc6bm0504a.xn--3nd849e05c;       [B3 B6 C1 V6];  [B3 B6 C1 V6]   #       ـَّ-.Ⴟ␣\r
++T;    \uFCF2-\u200C。ⴟ\u200C␣;   [B3 B6 C1];     [B3 B6 V3]      #       ـَّ-.ⴟ␣\r
++N;    \uFCF2-\u200C。ⴟ\u200C␣;   [B3 B6 C1];     [B3 B6 C1]      #       ـَّ-.ⴟ␣\r
++T;    \u0D4D-\u200D\u200C。񥞧₅≠;       [C1 C2 P1 V5 V6];       [P1 V3 V5 V6]   #       ്-.5≠\r
++N;    \u0D4D-\u200D\u200C。񥞧₅≠;       [C1 C2 P1 V5 V6];       [C1 C2 P1 V5 V6]        #       ്-.5≠\r
++T;    \u0D4D-\u200D\u200C。񥞧₅=\u0338;   [C1 C2 P1 V5 V6];       [P1 V3 V5 V6]   #       ്-.5≠\r
++N;    \u0D4D-\u200D\u200C。񥞧₅=\u0338;   [C1 C2 P1 V5 V6];       [C1 C2 P1 V5 V6]        #       ്-.5≠\r
++T;    \u0D4D-\u200D\u200C。񥞧5≠; [C1 C2 P1 V5 V6];       [P1 V3 V5 V6]   #       ്-.5≠\r
++N;    \u0D4D-\u200D\u200C。񥞧5≠; [C1 C2 P1 V5 V6];       [C1 C2 P1 V5 V6]        #       ്-.5≠\r
++T;    \u0D4D-\u200D\u200C。񥞧5=\u0338;     [C1 C2 P1 V5 V6];       [P1 V3 V5 V6]   #       ്-.5≠\r
++N;    \u0D4D-\u200D\u200C。񥞧5=\u0338;     [C1 C2 P1 V5 V6];       [C1 C2 P1 V5 V6]        #       ്-.5≠\r
++B;    xn----jmf.xn--5-ufo50192e;      [V3 V5 V6];     [V3 V5 V6]      #       ്-.5≠\r
++B;    xn----jmf215lda.xn--5-ufo50192e;        [C1 C2 V5 V6];  [C1 C2 V5 V6]   #       ്-.5≠\r
++B;    锣。\u0A4D󠘻󠚆;   [P1 V5 V6];     [P1 V5 V6]      #       锣.੍\r
++B;    xn--gc5a.xn--ybc83044ppga;      [V5 V6];        [V5 V6] #       锣.੍\r
++T;    \u063D𑈾.\u0649\u200D\uA92B;        [B3 C2];        xn--8gb2338k.xn--lhb0154f       #       ؽ𑈾.ى꤫\r
++N;    \u063D𑈾.\u0649\u200D\uA92B;        [B3 C2];        [B3 C2] #       ؽ𑈾.ى꤫\r
++T;    \u063D𑈾.\u0649\u200D\uA92B;  [B3 C2];        xn--8gb2338k.xn--lhb0154f       #       ؽ𑈾.ى꤫\r
++N;    \u063D𑈾.\u0649\u200D\uA92B;  [B3 C2];        [B3 C2] #       ؽ𑈾.ى꤫\r
++B;    xn--8gb2338k.xn--lhb0154f;      \u063D𑈾.\u0649\uA92B;        xn--8gb2338k.xn--lhb0154f       #       ؽ𑈾.ى꤫\r
++B;    \u063D𑈾.\u0649\uA92B;        ;       xn--8gb2338k.xn--lhb0154f       #       ؽ𑈾.ى꤫\r
++B;    xn--8gb2338k.xn--lhb603k060h;   [B3 C2];        [B3 C2] #       ؽ𑈾.ى꤫\r
++T;    \u0666⁴Ⴅ.\u08BD\u200C;    [B1 B3 C1 P1 V6];       [B1 P1 V6]      #       ٦4Ⴅ.ࢽ\r
++N;    \u0666⁴Ⴅ.\u08BD\u200C;    [B1 B3 C1 P1 V6];       [B1 B3 C1 P1 V6]        #       ٦4Ⴅ.ࢽ\r
++T;    \u06664Ⴅ.\u08BD\u200C;        [B1 B3 C1 P1 V6];       [B1 P1 V6]      #       ٦4Ⴅ.ࢽ\r
++N;    \u06664Ⴅ.\u08BD\u200C;        [B1 B3 C1 P1 V6];       [B1 B3 C1 P1 V6]        #       ٦4Ⴅ.ࢽ\r
++T;    \u06664ⴅ.\u08BD\u200C;        [B1 B3 C1];     [B1]    #       ٦4ⴅ.ࢽ\r
++N;    \u06664ⴅ.\u08BD\u200C;        [B1 B3 C1];     [B1 B3 C1]      #       ٦4ⴅ.ࢽ\r
++B;    xn--4-kqc6770a.xn--jzb; [B1];   [B1]    #       ٦4ⴅ.ࢽ\r
++B;    xn--4-kqc6770a.xn--jzb840j;     [B1 B3 C1];     [B1 B3 C1]      #       ٦4ⴅ.ࢽ\r
++B;    xn--4-kqc489e.xn--jzb;  [B1 V6];        [B1 V6] #       ٦4Ⴅ.ࢽ\r
++B;    xn--4-kqc489e.xn--jzb840j;      [B1 B3 C1 V6];  [B1 B3 C1 V6]   #       ٦4Ⴅ.ࢽ\r
++T;    \u0666⁴ⴅ.\u08BD\u200C;    [B1 B3 C1];     [B1]    #       ٦4ⴅ.ࢽ\r
++N;    \u0666⁴ⴅ.\u08BD\u200C;    [B1 B3 C1];     [B1 B3 C1]      #       ٦4ⴅ.ࢽ\r
++T;    ჁႱ6\u0318。ß\u1B03;       [P1 V6];        [P1 V6] #       ჁႱ6̘.ßᬃ\r
++N;    ჁႱ6\u0318。ß\u1B03;       [P1 V6];        [P1 V6] #       ჁႱ6̘.ßᬃ\r
++T;    ⴡⴑ6\u0318。ß\u1B03;       ⴡⴑ6\u0318.ß\u1B03; xn--6-8cb7433a2ba.xn--ss-2vq    #       ⴡⴑ6̘.ßᬃ\r
++N;    ⴡⴑ6\u0318。ß\u1B03;       ⴡⴑ6\u0318.ß\u1B03; xn--6-8cb7433a2ba.xn--zca894k   #       ⴡⴑ6̘.ßᬃ\r
++B;    ჁႱ6\u0318。SS\u1B03;       [P1 V6];        [P1 V6] #       ჁႱ6̘.ssᬃ\r
++B;    ⴡⴑ6\u0318。ss\u1B03;       ⴡⴑ6\u0318.ss\u1B03; xn--6-8cb7433a2ba.xn--ss-2vq    #       ⴡⴑ6̘.ssᬃ\r
++B;    Ⴡⴑ6\u0318。Ss\u1B03;       [P1 V6];        [P1 V6] #       Ⴡⴑ6̘.ssᬃ\r
++B;    xn--6-8cb306hms1a.xn--ss-2vq;   [V6];   [V6]    #       Ⴡⴑ6̘.ssᬃ\r
++B;    xn--6-8cb7433a2ba.xn--ss-2vq;   ⴡⴑ6\u0318.ss\u1B03; xn--6-8cb7433a2ba.xn--ss-2vq    #       ⴡⴑ6̘.ssᬃ\r
++B;    ⴡⴑ6\u0318.ss\u1B03; ;       xn--6-8cb7433a2ba.xn--ss-2vq    #       ⴡⴑ6̘.ssᬃ\r
++B;    ჁႱ6\u0318.SS\u1B03; [P1 V6];        [P1 V6] #       ჁႱ6̘.ssᬃ\r
++B;    Ⴡⴑ6\u0318.Ss\u1B03; [P1 V6];        [P1 V6] #       Ⴡⴑ6̘.ssᬃ\r
++B;    xn--6-8cb555h2b.xn--ss-2vq;     [V6];   [V6]    #       ჁႱ6̘.ssᬃ\r
++B;    xn--6-8cb7433a2ba.xn--zca894k;  ⴡⴑ6\u0318.ß\u1B03; xn--6-8cb7433a2ba.xn--zca894k   #       ⴡⴑ6̘.ßᬃ\r
++T;    ⴡⴑ6\u0318.ß\u1B03; ;       xn--6-8cb7433a2ba.xn--ss-2vq    #       ⴡⴑ6̘.ßᬃ\r
++N;    ⴡⴑ6\u0318.ß\u1B03; ;       xn--6-8cb7433a2ba.xn--zca894k   #       ⴡⴑ6̘.ßᬃ\r
++B;    xn--6-8cb555h2b.xn--zca894k;    [V6];   [V6]    #       ჁႱ6̘.ßᬃ\r
++B;    򋡐。≯𑋪; [P1 V6];        [P1 V6]\r
++B;    򋡐。>\u0338𑋪;     [P1 V6];        [P1 V6]\r
++B;    򋡐。≯𑋪; [P1 V6];        [P1 V6]\r
++B;    򋡐。>\u0338𑋪;     [P1 V6];        [P1 V6]\r
++B;    xn--eo08b.xn--hdh3385g; [V6];   [V6]\r
++T;    \u065A۲。\u200C-\u1BF3\u08E2; [B1 C1 P1 V5 V6];       [B1 P1 V3 V5 V6]        #       ٚ۲.-᯳\r
++N;    \u065A۲。\u200C-\u1BF3\u08E2; [B1 C1 P1 V5 V6];       [B1 C1 P1 V5 V6]        #       ٚ۲.-᯳\r
++B;    xn--2hb81a.xn----xrd657l;       [B1 V3 V5 V6];  [B1 V3 V5 V6]   #       ٚ۲.-᯳\r
++B;    xn--2hb81a.xn----xrd657l30d;    [B1 C1 V5 V6];  [B1 C1 V5 V6]   #       ٚ۲.-᯳\r
++B;    󠄏𖬴󠲽。\uFFA0;  [P1 V5 V6];     [P1 V5 V6]      #       𖬴.\r
++B;    󠄏𖬴󠲽。\u1160;  [P1 V5 V6];     [P1 V5 V6]      #       𖬴.\r
++B;    xn--619ep9154c.xn--psd; [V5 V6];        [V5 V6] #       𖬴.\r
++B;    xn--619ep9154c.xn--cl7c;        [V5 V6];        [V5 V6] #       𖬴.\r
++T;    ß⒈\u0760\uD7AE.􉖲󠅄\u0605򉔯; [B5 P1 V6];     [B5 P1 V6]      #       ß⒈ݠ.\r
++N;    ß⒈\u0760\uD7AE.􉖲󠅄\u0605򉔯; [B5 P1 V6];     [B5 P1 V6]      #       ß⒈ݠ.\r
++T;    ß1.\u0760\uD7AE.􉖲󠅄\u0605򉔯;    [B2 B3 B5 P1 V6];       [B2 B3 B5 P1 V6]        #       ß1.ݠ.\r
++N;    ß1.\u0760\uD7AE.􉖲󠅄\u0605򉔯;    [B2 B3 B5 P1 V6];       [B2 B3 B5 P1 V6]        #       ß1.ݠ.\r
++B;    SS1.\u0760\uD7AE.􉖲󠅄\u0605򉔯;    [B2 B3 B5 P1 V6];       [B2 B3 B5 P1 V6]        #       ss1.ݠ.\r
++B;    ss1.\u0760\uD7AE.􉖲󠅄\u0605򉔯;    [B2 B3 B5 P1 V6];       [B2 B3 B5 P1 V6]        #       ss1.ݠ.\r
++B;    Ss1.\u0760\uD7AE.􉖲󠅄\u0605򉔯;    [B2 B3 B5 P1 V6];       [B2 B3 B5 P1 V6]        #       ss1.ݠ.\r
++B;    ss1.xn--kpb6677h.xn--nfb09923ifkyyb;    [B2 B3 B5 V6];  [B2 B3 B5 V6]   #       ss1.ݠ.\r
++B;    xn--1-pfa.xn--kpb6677h.xn--nfb09923ifkyyb;      [B2 B3 B5 V6];  [B2 B3 B5 V6]   #       ß1.ݠ.\r
++B;    SS⒈\u0760\uD7AE.􉖲󠅄\u0605򉔯; [B5 P1 V6];     [B5 P1 V6]      #       ss⒈ݠ.\r
++B;    ss⒈\u0760\uD7AE.􉖲󠅄\u0605򉔯; [B5 P1 V6];     [B5 P1 V6]      #       ss⒈ݠ.\r
++B;    Ss⒈\u0760\uD7AE.􉖲󠅄\u0605򉔯; [B5 P1 V6];     [B5 P1 V6]      #       ss⒈ݠ.\r
++B;    xn--ss-6ke9690a0g1q.xn--nfb09923ifkyyb; [B5 V6];        [B5 V6] #       ss⒈ݠ.\r
++B;    xn--zca444a0s1ao12n.xn--nfb09923ifkyyb; [B5 V6];        [B5 V6] #       ß⒈ݠ.\r
++B;    󠭔.𐋱₂;   [P1 V6];        [P1 V6]\r
++B;    󠭔.𐋱2;     [P1 V6];        [P1 V6]\r
++B;    xn--vi56e.xn--2-w91i;   [V6];   [V6]\r
++T;    \u0716\u0947。-ß\u06A5\u200C; [B1 C1 V3];     [B1 V3] #       ܖे.-ßڥ\r
++N;    \u0716\u0947。-ß\u06A5\u200C; [B1 C1 V3];     [B1 C1 V3]      #       ܖे.-ßڥ\r
++T;    \u0716\u0947。-SS\u06A5\u200C; [B1 C1 V3];     [B1 V3] #       ܖे.-ssڥ\r
++N;    \u0716\u0947。-SS\u06A5\u200C; [B1 C1 V3];     [B1 C1 V3]      #       ܖे.-ssڥ\r
++T;    \u0716\u0947。-ss\u06A5\u200C; [B1 C1 V3];     [B1 V3] #       ܖे.-ssڥ\r
++N;    \u0716\u0947。-ss\u06A5\u200C; [B1 C1 V3];     [B1 C1 V3]      #       ܖे.-ssڥ\r
++T;    \u0716\u0947。-Ss\u06A5\u200C; [B1 C1 V3];     [B1 V3] #       ܖे.-ssڥ\r
++N;    \u0716\u0947。-Ss\u06A5\u200C; [B1 C1 V3];     [B1 C1 V3]      #       ܖे.-ssڥ\r
++B;    xn--gnb63i.xn---ss-4ef; [B1 V3];        [B1 V3] #       ܖे.-ssڥ\r
++B;    xn--gnb63i.xn---ss-4ef9263a;    [B1 C1 V3];     [B1 C1 V3]      #       ܖे.-ssڥ\r
++B;    xn--gnb63i.xn----qfa845bhx4a;   [B1 C1 V3];     [B1 C1 V3]      #       ܖे.-ßڥ\r
++T;    \u1BA9\u200D\u062A񡚈.\u1CD5䷉Ⴡ;  [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       ᮩت.᳕䷉Ⴡ\r
++N;    \u1BA9\u200D\u062A񡚈.\u1CD5䷉Ⴡ;  [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       ᮩت.᳕䷉Ⴡ\r
++T;    \u1BA9\u200D\u062A񡚈.\u1CD5䷉Ⴡ;    [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       ᮩت.᳕䷉Ⴡ\r
++N;    \u1BA9\u200D\u062A񡚈.\u1CD5䷉Ⴡ;    [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       ᮩت.᳕䷉Ⴡ\r
++T;    \u1BA9\u200D\u062A񡚈.\u1CD5䷉ⴡ;    [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       ᮩت.᳕䷉ⴡ\r
++N;    \u1BA9\u200D\u062A񡚈.\u1CD5䷉ⴡ;    [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       ᮩت.᳕䷉ⴡ\r
++B;    xn--pgb911izv33i.xn--i6f270etuy;        [B1 V5 V6];     [B1 V5 V6]      #       ᮩت.᳕䷉ⴡ\r
++B;    xn--pgb911imgdrw34r.xn--i6f270etuy;     [B1 C2 V5 V6];  [B1 C2 V5 V6]   #       ᮩت.᳕䷉ⴡ\r
++B;    xn--pgb911izv33i.xn--5nd792dgv3b;       [B1 V5 V6];     [B1 V5 V6]      #       ᮩت.᳕䷉Ⴡ\r
++B;    xn--pgb911imgdrw34r.xn--5nd792dgv3b;    [B1 C2 V5 V6];  [B1 C2 V5 V6]   #       ᮩت.᳕䷉Ⴡ\r
++T;    \u1BA9\u200D\u062A񡚈.\u1CD5䷉ⴡ;  [B1 C2 P1 V5 V6];       [B1 P1 V5 V6]   #       ᮩت.᳕䷉ⴡ\r
++N;    \u1BA9\u200D\u062A񡚈.\u1CD5䷉ⴡ;  [B1 C2 P1 V5 V6];       [B1 C2 P1 V5 V6]        #       ᮩت.᳕䷉ⴡ\r
++T;    \u2DBF.ß\u200D;        [C2 P1 V6];     [P1 V6] #       .ß\r
++N;    \u2DBF.ß\u200D;        [C2 P1 V6];     [C2 P1 V6]      #       .ß\r
++T;    \u2DBF.SS\u200D;        [C2 P1 V6];     [P1 V6] #       .ss\r
++N;    \u2DBF.SS\u200D;        [C2 P1 V6];     [C2 P1 V6]      #       .ss\r
++T;    \u2DBF.ss\u200D;        [C2 P1 V6];     [P1 V6] #       .ss\r
++N;    \u2DBF.ss\u200D;        [C2 P1 V6];     [C2 P1 V6]      #       .ss\r
++T;    \u2DBF.Ss\u200D;        [C2 P1 V6];     [P1 V6] #       .ss\r
++N;    \u2DBF.Ss\u200D;        [C2 P1 V6];     [C2 P1 V6]      #       .ss\r
++B;    xn--7pj.ss;     [V6];   [V6]    #       .ss\r
++B;    xn--7pj.xn--ss-n1t;     [C2 V6];        [C2 V6] #       .ss\r
++B;    xn--7pj.xn--zca870n;    [C2 V6];        [C2 V6] #       .ß\r
++B;    \u1BF3︒.\u062A≯ꡂ; [B2 B3 B6 P1 V5 V6];    [B2 B3 B6 P1 V5 V6]     #       ᯳︒.ت≯ꡂ\r
++B;    \u1BF3︒.\u062A>\u0338ꡂ;     [B2 B3 B6 P1 V5 V6];    [B2 B3 B6 P1 V5 V6]     #       ᯳︒.ت≯ꡂ\r
++B;    \u1BF3。.\u062A≯ꡂ; [B2 B3 P1 V5 V6 A4_2];  [B2 B3 P1 V5 V6 A4_2]   #       ᯳..ت≯ꡂ\r
++B;    \u1BF3。.\u062A>\u0338ꡂ;     [B2 B3 P1 V5 V6 A4_2];  [B2 B3 P1 V5 V6 A4_2]   #       ᯳..ت≯ꡂ\r
++B;    xn--1zf..xn--pgb885lry5g;       [B2 B3 V5 V6 A4_2];     [B2 B3 V5 V6 A4_2]      #       ᯳..ت≯ꡂ\r
++B;    xn--1zf8957g.xn--pgb885lry5g;   [B2 B3 B6 V5 V6];       [B2 B3 B6 V5 V6]        #       ᯳︒.ت≯ꡂ\r
++B;    ≮≠񏻃。-𫠆\u06B7𐹪;   [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ≮≠.-𫠆ڷ𐹪\r
++B;    <\u0338=\u0338񏻃。-𫠆\u06B7𐹪;   [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ≮≠.-𫠆ڷ𐹪\r
++B;    ≮≠񏻃。-𫠆\u06B7𐹪;   [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ≮≠.-𫠆ڷ𐹪\r
++B;    <\u0338=\u0338񏻃。-𫠆\u06B7𐹪;   [B1 P1 V3 V6];  [B1 P1 V3 V6]   #       ≮≠.-𫠆ڷ𐹪\r
++B;    xn--1ch1a29470f.xn----7uc5363rc1rn;     [B1 V3 V6];     [B1 V3 V6]      #       ≮≠.-𫠆ڷ𐹪\r
++B;    𐹡\u0777。ꡂ;       [B1];   [B1]    #       𐹡ݷ.ꡂ\r
++B;    xn--7pb5275k.xn--bc9a;  [B1];   [B1]    #       𐹡ݷ.ꡂ\r
++T;    Ⴉ𝆅񔻅\u0619.ß𐧦𐹳\u0775;     [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴉؙ𝆅.ß𐧦𐹳ݵ\r
++N;    Ⴉ𝆅񔻅\u0619.ß𐧦𐹳\u0775;     [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴉؙ𝆅.ß𐧦𐹳ݵ\r
++T;    ⴉ𝆅񔻅\u0619.ß𐧦𐹳\u0775;     [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ⴉؙ𝆅.ß𐧦𐹳ݵ\r
++N;    ⴉ𝆅񔻅\u0619.ß𐧦𐹳\u0775;     [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ⴉؙ𝆅.ß𐧦𐹳ݵ\r
++B;    Ⴉ𝆅񔻅\u0619.SS𐧦𐹳\u0775;     [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴉؙ𝆅.ss𐧦𐹳ݵ\r
++B;    ⴉ𝆅񔻅\u0619.ss𐧦𐹳\u0775;     [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       ⴉؙ𝆅.ss𐧦𐹳ݵ\r
++B;    Ⴉ𝆅񔻅\u0619.Ss𐧦𐹳\u0775;     [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       Ⴉؙ𝆅.ss𐧦𐹳ݵ\r
++B;    xn--7fb125cjv87a7xvz.xn--ss-zme7575xp0e;        [B5 B6 V6];     [B5 B6 V6]      #       Ⴉؙ𝆅.ss𐧦𐹳ݵ\r
++B;    xn--7fb940rwt3z7xvz.xn--ss-zme7575xp0e; [B5 B6 V6];     [B5 B6 V6]      #       ⴉؙ𝆅.ss𐧦𐹳ݵ\r
++B;    xn--7fb940rwt3z7xvz.xn--zca684a699vf2d; [B5 B6 V6];     [B5 B6 V6]      #       ⴉؙ𝆅.ß𐧦𐹳ݵ\r
++B;    xn--7fb125cjv87a7xvz.xn--zca684a699vf2d;        [B5 B6 V6];     [B5 B6 V6]      #       Ⴉؙ𝆅.ß𐧦𐹳ݵ\r
++T;    \u200D\u0643𐧾↙.񊽡;       [B1 C2 P1 V6];  [B3 P1 V6]      #       ك𐧾↙.\r
++N;    \u200D\u0643𐧾↙.񊽡;       [B1 C2 P1 V6];  [B1 C2 P1 V6]   #       ك𐧾↙.\r
++B;    xn--fhb011lnp8n.xn--7s4w;       [B3 V6];        [B3 V6] #       ك𐧾↙.\r
++B;    xn--fhb713k87ag053c.xn--7s4w;   [B1 C2 V6];     [B1 C2 V6]      #       ك𐧾↙.\r
++T;    梉。\u200C;   [C1];   xn--7zv.        #       梉.\r
++N;    梉。\u200C;   [C1];   [C1]    #       梉.\r
++B;    xn--7zv.;       梉.;   xn--7zv.\r
++B;    梉.;   ;       xn--7zv.\r
++B;    xn--7zv.xn--0ug;        [C1];   [C1]    #       梉.\r
++T;    ꡣ-≠.\u200D𞤗𐅢Ↄ;      [B1 B6 C2 P1 V6];       [B2 B3 B6 P1 V6]        #       ꡣ-≠.𞤹𐅢Ↄ\r
++N;    ꡣ-≠.\u200D𞤗𐅢Ↄ;      [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       ꡣ-≠.𞤹𐅢Ↄ\r
++T;    ꡣ-=\u0338.\u200D𞤗𐅢Ↄ;  [B1 B6 C2 P1 V6];       [B2 B3 B6 P1 V6]        #       ꡣ-≠.𞤹𐅢Ↄ\r
++N;    ꡣ-=\u0338.\u200D𞤗𐅢Ↄ;  [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       ꡣ-≠.𞤹𐅢Ↄ\r
++T;    ꡣ-=\u0338.\u200D𞤹𐅢ↄ;  [B1 B6 C2 P1 V6];       [B2 B3 B6 P1 V6]        #       ꡣ-≠.𞤹𐅢ↄ\r
++N;    ꡣ-=\u0338.\u200D𞤹𐅢ↄ;  [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       ꡣ-≠.𞤹𐅢ↄ\r
++T;    ꡣ-≠.\u200D𞤹𐅢ↄ;      [B1 B6 C2 P1 V6];       [B2 B3 B6 P1 V6]        #       ꡣ-≠.𞤹𐅢ↄ\r
++N;    ꡣ-≠.\u200D𞤹𐅢ↄ;      [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       ꡣ-≠.𞤹𐅢ↄ\r
++T;    ꡣ-≠.\u200D𞤗𐅢ↄ;      [B1 B6 C2 P1 V6];       [B2 B3 B6 P1 V6]        #       ꡣ-≠.𞤹𐅢ↄ\r
++N;    ꡣ-≠.\u200D𞤗𐅢ↄ;      [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       ꡣ-≠.𞤹𐅢ↄ\r
++T;    ꡣ-=\u0338.\u200D𞤗𐅢ↄ;  [B1 B6 C2 P1 V6];       [B2 B3 B6 P1 V6]        #       ꡣ-≠.𞤹𐅢ↄ\r
++N;    ꡣ-=\u0338.\u200D𞤗𐅢ↄ;  [B1 B6 C2 P1 V6];       [B1 B6 C2 P1 V6]        #       ꡣ-≠.𞤹𐅢ↄ\r
++B;    xn----ufo9661d.xn--r5gy929fhm4f;        [B2 B3 B6 V6];  [B2 B3 B6 V6]\r
++B;    xn----ufo9661d.xn--1ug99cj620c71sh;     [B1 B6 C2 V6];  [B1 B6 C2 V6]   #       ꡣ-≠.𞤹𐅢ↄ\r
++B;    xn----ufo9661d.xn--q5g0929fhm4f;        [B2 B3 B6 V6];  [B2 B3 B6 V6]\r
++B;    xn----ufo9661d.xn--1ug79cm620c71sh;     [B1 B6 C2 V6];  [B1 B6 C2 V6]   #       ꡣ-≠.𞤹𐅢Ↄ\r
++T;    ς⒐𝆫⸵。𐱢🄊𝟳;    [B6 P1 V6];     [B6 P1 V6]\r
++N;    ς⒐𝆫⸵。𐱢🄊𝟳;    [B6 P1 V6];     [B6 P1 V6]\r
++T;    ς9.𝆫⸵。𐱢9,7;  [B1 P1 V5 V6];  [B1 P1 V5 V6]\r
++N;    ς9.𝆫⸵。𐱢9,7;  [B1 P1 V5 V6];  [B1 P1 V5 V6]\r
++B;    Σ9.𝆫⸵。𐱢9,7;  [B1 P1 V5 V6];  [B1 P1 V5 V6]\r
++B;    σ9.𝆫⸵。𐱢9,7;  [B1 P1 V5 V6];  [B1 P1 V5 V6]\r
++B;    xn--9-zmb.xn--ltj1535k.xn--9,7-r67t;    [B1 P1 V5 V6];  [B1 P1 V5 V6]\r
++B;    xn--9-xmb.xn--ltj1535k.xn--9,7-r67t;    [B1 P1 V5 V6];  [B1 P1 V5 V6]\r
++B;    Σ⒐𝆫⸵。𐱢🄊𝟳;    [B6 P1 V6];     [B6 P1 V6]\r
++B;    σ⒐𝆫⸵。𐱢🄊𝟳;    [B6 P1 V6];     [B6 P1 V6]\r
++B;    xn--4xa809nwtghi25b.xn--7-075iy877c;    [B6 V6];        [B6 V6]\r
++B;    xn--3xa019nwtghi25b.xn--7-075iy877c;    [B6 V6];        [B6 V6]\r
++T;    \u0853.\u200Cß;      [B1 C1];        xn--iwb.ss      #       ࡓ.ß\r
++N;    \u0853.\u200Cß;      [B1 C1];        [B1 C1] #       ࡓ.ß\r
++T;    \u0853.\u200Cß;        [B1 C1];        xn--iwb.ss      #       ࡓ.ß\r
++N;    \u0853.\u200Cß;        [B1 C1];        [B1 C1] #       ࡓ.ß\r
++T;    \u0853.\u200CSS;        [B1 C1];        xn--iwb.ss      #       ࡓ.ss\r
++N;    \u0853.\u200CSS;        [B1 C1];        [B1 C1] #       ࡓ.ss\r
++T;    \u0853.\u200Css;        [B1 C1];        xn--iwb.ss      #       ࡓ.ss\r
++N;    \u0853.\u200Css;        [B1 C1];        [B1 C1] #       ࡓ.ss\r
++T;    \u0853.\u200CSs;        [B1 C1];        xn--iwb.ss      #       ࡓ.ss\r
++N;    \u0853.\u200CSs;        [B1 C1];        [B1 C1] #       ࡓ.ss\r
++B;    xn--iwb.ss;     \u0853.ss;      xn--iwb.ss      #       ࡓ.ss\r
++B;    \u0853.ss;      ;       xn--iwb.ss      #       ࡓ.ss\r
++B;    \u0853.SS;      \u0853.ss;      xn--iwb.ss      #       ࡓ.ss\r
++B;    \u0853.Ss;      \u0853.ss;      xn--iwb.ss      #       ࡓ.ss\r
++B;    xn--iwb.xn--ss-i1t;     [B1 C1];        [B1 C1] #       ࡓ.ss\r
++B;    xn--iwb.xn--zca570n;    [B1 C1];        [B1 C1] #       ࡓ.ß\r
++T;    \u0853.\u200CSS;      [B1 C1];        xn--iwb.ss      #       ࡓ.ss\r
++N;    \u0853.\u200CSS;      [B1 C1];        [B1 C1] #       ࡓ.ss\r
++T;    \u0853.\u200Css;      [B1 C1];        xn--iwb.ss      #       ࡓ.ss\r
++N;    \u0853.\u200Css;      [B1 C1];        [B1 C1] #       ࡓ.ss\r
++T;    \u0853.\u200CSs;      [B1 C1];        xn--iwb.ss      #       ࡓ.ss\r
++N;    \u0853.\u200CSs;      [B1 C1];        [B1 C1] #       ࡓ.ss\r
++T;    񯶣-.\u200D\u074E\uA94D󠻨;   [B1 B6 C2 P1 V3 V6];    [B3 B6 P1 V3 V6]        #       -.ݎꥍ\r
++N;    񯶣-.\u200D\u074E\uA94D󠻨;   [B1 B6 C2 P1 V3 V6];    [B1 B6 C2 P1 V3 V6]     #       -.ݎꥍ\r
++B;    xn----s116e.xn--1ob6504fmf40i;  [B3 B6 V3 V6];  [B3 B6 V3 V6]   #       -.ݎꥍ\r
++B;    xn----s116e.xn--1ob387jy90hq459k;       [B1 B6 C2 V3 V6];       [B1 B6 C2 V3 V6]        #       -.ݎꥍ\r
++B;    䃚蟥-。-񽒘⒈;     [P1 V3 V6];     [P1 V3 V6]\r
++B;    䃚蟥-。-񽒘1.;      [P1 V3 V6];     [P1 V3 V6]\r
++B;    xn----n50a258u.xn---1-up07j.;   [V3 V6];        [V3 V6]\r
++B;    xn----n50a258u.xn----ecp33805f; [V3 V6];        [V3 V6]\r
++B;    𐹸䚵-ꡡ。⺇;      [B1];   [B1]\r
++B;    xn----bm3an932a1l5d.xn--xvj;    [B1];   [B1]\r
++B;    𑄳。\u1ADC𐹻;      [B1 B3 B5 B6 P1 V5 V6]; [B1 B3 B5 B6 P1 V5 V6]  #       𑄳.𐹻\r
++B;    xn--v80d.xn--2rf1154i;  [B1 B3 B5 B6 V5 V6];    [B1 B3 B5 B6 V5 V6]     #       𑄳.𐹻\r
++B;    ≮𐹻.⒎𑂵\u06BA\u0602;    [B1 P1 V6];     [B1 P1 V6]      #       ≮𐹻.⒎𑂵ں\r
++B;    <\u0338𐹻.⒎𑂵\u06BA\u0602;        [B1 P1 V6];     [B1 P1 V6]      #       ≮𐹻.⒎𑂵ں\r
++B;    ≮𐹻.7.𑂵\u06BA\u0602;     [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≮𐹻.7.𑂵ں\r
++B;    <\u0338𐹻.7.𑂵\u06BA\u0602; [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       ≮𐹻.7.𑂵ں\r
++B;    xn--gdhx904g.7.xn--kfb18an307d; [B1 V5 V6];     [B1 V5 V6]      #       ≮𐹻.7.𑂵ں\r
++B;    xn--gdhx904g.xn--kfb18a325efm3s;        [B1 V6];        [B1 V6] #       ≮𐹻.⒎𑂵ں\r
++T;    ᢔ≠􋉂.\u200D𐋢;  [C2 P1 V6];     [P1 V6] #       ᢔ≠.𐋢\r
++N;    ᢔ≠􋉂.\u200D𐋢;  [C2 P1 V6];     [C2 P1 V6]      #       ᢔ≠.𐋢\r
++T;    ᢔ=\u0338􋉂.\u200D𐋢;      [C2 P1 V6];     [P1 V6] #       ᢔ≠.𐋢\r
++N;    ᢔ=\u0338􋉂.\u200D𐋢;      [C2 P1 V6];     [C2 P1 V6]      #       ᢔ≠.𐋢\r
++B;    xn--ebf031cf7196a.xn--587c;     [V6];   [V6]\r
++B;    xn--ebf031cf7196a.xn--1ug9540g; [C2 V6];        [C2 V6] #       ᢔ≠.𐋢\r
++B;    𐩁≮񣊛≯.\u066C𞵕⳿; [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]        #       𐩁≮≯.٬⳿\r
++B;    𐩁<\u0338񣊛>\u0338.\u066C𞵕⳿; [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]        #       𐩁≮≯.٬⳿\r
++B;    𐩁≮񣊛≯.\u066C𞵕⳿;   [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]        #       𐩁≮≯.٬⳿\r
++B;    𐩁<\u0338񣊛>\u0338.\u066C𞵕⳿;   [B1 B2 B3 P1 V6];       [B1 B2 B3 P1 V6]        #       𐩁≮≯.٬⳿\r
++B;    xn--gdhc0519o0y27b.xn--lib468q0d21a;    [B1 B2 B3 V6];  [B1 B2 B3 V6]   #       𐩁≮≯.٬⳿\r
++B;    -。⺐;        [V3];   [V3]\r
++B;    -。⺐;        [V3];   [V3]\r
++B;    -.xn--6vj;      [V3];   [V3]\r
++B;    󠰩𑲬.\u065C;      [P1 V5 V6];     [P1 V5 V6]      #       𑲬.ٜ\r
++B;    󠰩𑲬.\u065C;        [P1 V5 V6];     [P1 V5 V6]      #       𑲬.ٜ\r
++B;    xn--sn3d59267c.xn--4hb; [V5 V6];        [V5 V6] #       𑲬.ٜ\r
++T;    𐍺.񚇃\u200C;        [C1 P1 V5 V6];  [P1 V5 V6]      #       𐍺.\r
++N;    𐍺.񚇃\u200C;        [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       𐍺.\r
++B;    xn--ie8c.xn--2g51a;     [V5 V6];        [V5 V6]\r
++B;    xn--ie8c.xn--0ug03366c; [C1 V5 V6];     [C1 V5 V6]      #       𐍺.\r
++B;    \u063D\u06E3.𐨎;      [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ؽۣ.𐨎\r
++B;    xn--8gb64a.xn--mr9c;    [B1 B3 B6 V5];  [B1 B3 B6 V5]   #       ؽۣ.𐨎\r
++T;    漦Ⴙς.񡻀𐴄;      [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++N;    漦Ⴙς.񡻀𐴄;      [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++T;    漦ⴙς.񡻀𐴄;      [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++N;    漦ⴙς.񡻀𐴄;      [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++B;    漦ႹΣ.񡻀𐴄;      [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++B;    漦ⴙσ.񡻀𐴄;      [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++B;    漦Ⴙσ.񡻀𐴄;      [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++B;    xn--4xa947d717e.xn--9d0d3162t;  [B5 B6 V6];     [B5 B6 V6]\r
++B;    xn--4xa772sl47b.xn--9d0d3162t;  [B5 B6 V6];     [B5 B6 V6]\r
++B;    xn--3xa972sl47b.xn--9d0d3162t;  [B5 B6 V6];     [B5 B6 V6]\r
++B;    xn--3xa157d717e.xn--9d0d3162t;  [B5 B6 V6];     [B5 B6 V6]\r
++B;    𐹫踧\u0CCD򫚇.󜀃⒈𝨤;  [B1 P1 V6];     [B1 P1 V6]      #       𐹫踧್.⒈𝨤\r
++B;    𐹫踧\u0CCD򫚇.󜀃1.𝨤;   [B1 B3 B6 P1 V5 V6];    [B1 B3 B6 P1 V5 V6]     #       𐹫踧್.1.𝨤\r
++B;    xn--8tc1437dro0d6q06h.xn--1-p948l.xn--m82h;     [B1 B3 B6 V5 V6];       [B1 B3 B6 V5 V6]        #       𐹫踧್.1.𝨤\r
++B;    xn--8tc1437dro0d6q06h.xn--tsh2611ncu71e;        [B1 V6];        [B1 V6] #       𐹫踧್.⒈𝨤\r
++T;    \u200D≮.󠟪𹫏-;  [C2 P1 V3 V6];  [P1 V3 V6]      #       ≮.-\r
++N;    \u200D≮.󠟪𹫏-;  [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       ≮.-\r
++T;    \u200D<\u0338.󠟪𹫏-;      [C2 P1 V3 V6];  [P1 V3 V6]      #       ≮.-\r
++N;    \u200D<\u0338.󠟪𹫏-;      [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       ≮.-\r
++T;    \u200D≮.󠟪𹫏-;    [C2 P1 V3 V6];  [P1 V3 V6]      #       ≮.-\r
++N;    \u200D≮.󠟪𹫏-;    [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       ≮.-\r
++T;    \u200D<\u0338.󠟪𹫏-;        [C2 P1 V3 V6];  [P1 V3 V6]      #       ≮.-\r
++N;    \u200D<\u0338.󠟪𹫏-;        [C2 P1 V3 V6];  [C2 P1 V3 V6]   #       ≮.-\r
++B;    xn--gdh.xn----cr99a1w710b;      [V3 V6];        [V3 V6]\r
++B;    xn--1ug95g.xn----cr99a1w710b;   [C2 V3 V6];     [C2 V3 V6]      #       ≮.-\r
++T;    \u200D\u200D襔。Ⴜ5ꡮ񵝏;  [C2 P1 V6];     [P1 V6] #       襔.Ⴜ5ꡮ\r
++N;    \u200D\u200D襔。Ⴜ5ꡮ񵝏;  [C2 P1 V6];     [C2 P1 V6]      #       襔.Ⴜ5ꡮ\r
++T;    \u200D\u200D襔。ⴜ5ꡮ񵝏;  [C2 P1 V6];     [P1 V6] #       襔.ⴜ5ꡮ\r
++N;    \u200D\u200D襔。ⴜ5ꡮ񵝏;  [C2 P1 V6];     [C2 P1 V6]      #       襔.ⴜ5ꡮ\r
++B;    xn--2u2a.xn--5-uws5848bpf44e;   [V6];   [V6]\r
++B;    xn--1uga7691f.xn--5-uws5848bpf44e;      [C2 V6];        [C2 V6] #       襔.ⴜ5ꡮ\r
++B;    xn--2u2a.xn--5-r1g7167ipfw8d;   [V6];   [V6]\r
++B;    xn--1uga7691f.xn--5-r1g7167ipfw8d;      [C2 V6];        [C2 V6] #       襔.Ⴜ5ꡮ\r
++T;    𐫜𑌼\u200D.婀;   [B3 C2];        xn--ix9c26l.xn--q0s     #       𐫜𑌼.婀\r
++N;    𐫜𑌼\u200D.婀;   [B3 C2];        [B3 C2] #       𐫜𑌼.婀\r
++T;    𐫜𑌼\u200D.婀;     [B3 C2];        xn--ix9c26l.xn--q0s     #       𐫜𑌼.婀\r
++N;    𐫜𑌼\u200D.婀;     [B3 C2];        [B3 C2] #       𐫜𑌼.婀\r
++B;    xn--ix9c26l.xn--q0s;    𐫜𑌼.婀;   xn--ix9c26l.xn--q0s\r
++B;    𐫜𑌼.婀;   ;       xn--ix9c26l.xn--q0s\r
++B;    xn--1ugx063g1if.xn--q0s;        [B3 C2];        [B3 C2] #       𐫜𑌼.婀\r
++B;    󠅽︒︒𐹯。⬳\u1A78;     [B1 P1 V6];     [B1 P1 V6]      #       ︒︒𐹯.⬳᩸\r
++B;    󠅽。。𐹯。⬳\u1A78;     [B1 A4_2];      [B1 A4_2]       #       ..𐹯.⬳᩸\r
++B;    ..xn--no0d.xn--7of309e; [B1 A4_2];      [B1 A4_2]       #       ..𐹯.⬳᩸\r
++B;    xn--y86ca186j.xn--7of309e;      [B1 V6];        [B1 V6] #       ︒︒𐹯.⬳᩸\r
++T;    𝟖ß.󠄐-\uDBDAႯ;        [P1 V3 V6];     [P1 V3 V6 A3]   #       8ß.-Ⴏ\r
++N;    𝟖ß.󠄐-\uDBDAႯ;        [P1 V3 V6];     [P1 V3 V6 A3]   #       8ß.-Ⴏ\r
++T;    8ß.󠄐-\uDBDAႯ;     [P1 V3 V6];     [P1 V3 V6 A3]   #       8ß.-Ⴏ\r
++N;    8ß.󠄐-\uDBDAႯ;     [P1 V3 V6];     [P1 V3 V6 A3]   #       8ß.-Ⴏ\r
++T;    8ß.󠄐-\uDBDAⴏ;     [P1 V3 V6];     [P1 V3 V6 A3]   #       8ß.-ⴏ\r
++N;    8ß.󠄐-\uDBDAⴏ;     [P1 V3 V6];     [P1 V3 V6 A3]   #       8ß.-ⴏ\r
++B;    8SS.󠄐-\uDBDAႯ;     [P1 V3 V6];     [P1 V3 V6 A3]   #       8ss.-Ⴏ\r
++B;    8ss.󠄐-\uDBDAⴏ;     [P1 V3 V6];     [P1 V3 V6 A3]   #       8ss.-ⴏ\r
++B;    8Ss.󠄐-\uDBDAႯ;     [P1 V3 V6];     [P1 V3 V6 A3]   #       8ss.-Ⴏ\r
++B;    8ss.-\uDBDAႯ; [P1 V3 V6];     [P1 V3 V6 A3]   #       8ss.-Ⴏ\r
++B;    8ss.-\uDBDAⴏ; [P1 V3 V6];     [P1 V3 V6 A3]   #       8ss.-ⴏ\r
++B;    8SS.-\uDBDAႯ; [P1 V3 V6];     [P1 V3 V6 A3]   #       8ss.-Ⴏ\r
++B;    8Ss.-\uDBDAႯ; [P1 V3 V6];     [P1 V3 V6 A3]   #       8ss.-Ⴏ\r
++B;    xn--8-qfa.-\uDBDAⴏ;   [P1 V3 V6];     [P1 V3 V6 A3]   #       8ß.-ⴏ\r
++B;    XN--8-QFA.-\uDBDAႯ;   [P1 V3 V6];     [P1 V3 V6 A3]   #       8ß.-Ⴏ\r
++B;    Xn--8-Qfa.-\uDBDAႯ;   [P1 V3 V6];     [P1 V3 V6 A3]   #       8ß.-Ⴏ\r
++B;    xn--8-qfa.-\uDBDAႯ;   [P1 V3 V6];     [P1 V3 V6 A3]   #       8ß.-Ⴏ\r
++T;    𝟖ß.󠄐-\uDBDAⴏ;        [P1 V3 V6];     [P1 V3 V6 A3]   #       8ß.-ⴏ\r
++N;    𝟖ß.󠄐-\uDBDAⴏ;        [P1 V3 V6];     [P1 V3 V6 A3]   #       8ß.-ⴏ\r
++B;    𝟖SS.󠄐-\uDBDAႯ;        [P1 V3 V6];     [P1 V3 V6 A3]   #       8ss.-Ⴏ\r
++B;    𝟖ss.󠄐-\uDBDAⴏ;        [P1 V3 V6];     [P1 V3 V6 A3]   #       8ss.-ⴏ\r
++B;    𝟖Ss.󠄐-\uDBDAႯ;        [P1 V3 V6];     [P1 V3 V6 A3]   #       8ss.-Ⴏ\r
++T;    -\u200D󠋟.\u200C𐹣Ⴅ;      [B1 C1 C2 P1 V3 V6];    [B1 P1 V3 V6]   #       -.𐹣Ⴅ\r
++N;    -\u200D󠋟.\u200C𐹣Ⴅ;      [B1 C1 C2 P1 V3 V6];    [B1 C1 C2 P1 V3 V6]     #       -.𐹣Ⴅ\r
++T;    -\u200D󠋟.\u200C𐹣ⴅ;      [B1 C1 C2 P1 V3 V6];    [B1 P1 V3 V6]   #       -.𐹣ⴅ\r
++N;    -\u200D󠋟.\u200C𐹣ⴅ;      [B1 C1 C2 P1 V3 V6];    [B1 C1 C2 P1 V3 V6]     #       -.𐹣ⴅ\r
++B;    xn----s721m.xn--wkj1423e;       [B1 V3 V6];     [B1 V3 V6]\r
++B;    xn----ugnv7071n.xn--0ugz32cgr0p;        [B1 C1 C2 V3 V6];       [B1 C1 C2 V3 V6]        #       -.𐹣ⴅ\r
++B;    xn----s721m.xn--dnd9201k;       [B1 V3 V6];     [B1 V3 V6]\r
++B;    xn----ugnv7071n.xn--dnd999e4j4p;        [B1 C1 C2 V3 V6];       [B1 C1 C2 V3 V6]        #       -.𐹣Ⴅ\r
++T;    \uA9B9\u200D큷𻶡。₂;      [C2 P1 V5 V6];  [P1 V5 V6]      #       ꦹ큷.2\r
++N;    \uA9B9\u200D큷𻶡。₂;      [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ꦹ큷.2\r
++T;    \uA9B9\u200D큷𻶡。₂;        [C2 P1 V5 V6];  [P1 V5 V6]      #       ꦹ큷.2\r
++N;    \uA9B9\u200D큷𻶡。₂;        [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ꦹ큷.2\r
++T;    \uA9B9\u200D큷𻶡。2;        [C2 P1 V5 V6];  [P1 V5 V6]      #       ꦹ큷.2\r
++N;    \uA9B9\u200D큷𻶡。2;        [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ꦹ큷.2\r
++T;    \uA9B9\u200D큷𻶡。2;  [C2 P1 V5 V6];  [P1 V5 V6]      #       ꦹ큷.2\r
++N;    \uA9B9\u200D큷𻶡。2;  [C2 P1 V5 V6];  [C2 P1 V5 V6]   #       ꦹ큷.2\r
++B;    xn--0m9as84e2e21c.2;    [V5 V6];        [V5 V6] #       ꦹ큷.2\r
++B;    xn--1ug1435cfkyaoi04d.2;        [C2 V5 V6];     [C2 V5 V6]      #       ꦹ큷.2\r
++B;    \uDF4D.🄄𞯘;        [B1 P1 V6];     [B1 P1 V6 A3]   #       .🄄\r
++B;    \uDF4D.3,𞯘;  [B1 P1 V6];     [B1 P1 V6 A3]   #       .3,\r
++B;    \uDF4D.xn--3,-tb22a;    [B1 P1 V6];     [B1 P1 V6 A3]   #       .3,\r
++B;    \uDF4D.XN--3,-TB22A;    [B1 P1 V6];     [B1 P1 V6 A3]   #       .3,\r
++B;    \uDF4D.Xn--3,-Tb22a;    [B1 P1 V6];     [B1 P1 V6 A3]   #       .3,\r
++B;    \uDF4D.xn--3x6hx6f;     [B1 P1 V6];     [B1 P1 V6 A3]   #       .🄄\r
++B;    \uDF4D.XN--3X6HX6F;     [B1 P1 V6];     [B1 P1 V6 A3]   #       .🄄\r
++B;    \uDF4D.Xn--3X6hx6f;     [B1 P1 V6];     [B1 P1 V6 A3]   #       .🄄\r
++B;    𝨖𐩙。\u06DD󀡶\uA8C5⒈; [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𝨖.ꣅ⒈\r
++B;    𝨖𐩙。\u06DD󀡶\uA8C51.;  [B1 P1 V5 V6];  [B1 P1 V5 V6]   #       𝨖.ꣅ1.\r
++B;    xn--rt9cl956a.xn--1-dxc8545j0693i.;     [B1 V5 V6];     [B1 V5 V6]      #       𝨖.ꣅ1.\r
++B;    xn--rt9cl956a.xn--tlb403mxv4g06s9i;     [B1 V5 V6];     [B1 V5 V6]      #       𝨖.ꣅ⒈\r
++T;    򒈣\u05E1\u06B8。Ⴈ\u200D;   [B5 B6 C2 P1 V6];       [B5 B6 P1 V6]   #       סڸ.Ⴈ\r
++N;    򒈣\u05E1\u06B8。Ⴈ\u200D;   [B5 B6 C2 P1 V6];       [B5 B6 C2 P1 V6]        #       סڸ.Ⴈ\r
++T;    򒈣\u05E1\u06B8。ⴈ\u200D;   [B5 B6 C2 P1 V6];       [B5 B6 P1 V6]   #       סڸ.ⴈ\r
++N;    򒈣\u05E1\u06B8。ⴈ\u200D;   [B5 B6 C2 P1 V6];       [B5 B6 C2 P1 V6]        #       סڸ.ⴈ\r
++B;    xn--meb44b57607c.xn--zkj;       [B5 B6 V6];     [B5 B6 V6]      #       סڸ.ⴈ\r
++B;    xn--meb44b57607c.xn--1ug232c;   [B5 B6 C2 V6];  [B5 B6 C2 V6]   #       סڸ.ⴈ\r
++B;    xn--meb44b57607c.xn--gnd;       [B5 B6 V6];     [B5 B6 V6]      #       סڸ.Ⴈ\r
++B;    xn--meb44b57607c.xn--gnd699e;   [B5 B6 C2 V6];  [B5 B6 C2 V6]   #       סڸ.Ⴈ\r
++T;    󀚶𝨱\u07E6⒈.𑗝髯\u200C;      [B1 B5 C1 P1 V5 V6];    [B1 B5 P1 V5 V6]        #       𝨱ߦ⒈.𑗝髯\r
++N;    󀚶𝨱\u07E6⒈.𑗝髯\u200C;      [B1 B5 C1 P1 V5 V6];    [B1 B5 C1 P1 V5 V6]     #       𝨱ߦ⒈.𑗝髯\r
++T;    󀚶𝨱\u07E61..𑗝髯\u200C; [B1 B5 C1 P1 V5 V6 A4_2];       [B1 B5 P1 V5 V6 A4_2]   #       𝨱ߦ1..𑗝髯\r
++N;    󀚶𝨱\u07E61..𑗝髯\u200C; [B1 B5 C1 P1 V5 V6 A4_2];       [B1 B5 C1 P1 V5 V6 A4_2]        #       𝨱ߦ1..𑗝髯\r
++B;    xn--1-idd62296a1fr6e..xn--uj6at43v;     [B1 B5 V5 V6 A4_2];     [B1 B5 V5 V6 A4_2]      #       𝨱ߦ1..𑗝髯\r
++B;    xn--1-idd62296a1fr6e..xn--0ugx259bocxd; [B1 B5 C1 V5 V6 A4_2];  [B1 B5 C1 V5 V6 A4_2]   #       𝨱ߦ1..𑗝髯\r
++B;    xn--etb477lq931a1f58e.xn--uj6at43v;     [B1 B5 V5 V6];  [B1 B5 V5 V6]   #       𝨱ߦ⒈.𑗝髯\r
++B;    xn--etb477lq931a1f58e.xn--0ugx259bocxd; [B1 B5 C1 V5 V6];       [B1 B5 C1 V5 V6]        #       𝨱ߦ⒈.𑗝髯\r
++B;    𐫀.\u0689𑌀;      𐫀.\u0689𑌀;        xn--pw9c.xn--fjb8658k   #       𐫀.ډ𑌀\r
++B;    𐫀.\u0689𑌀;        ;       xn--pw9c.xn--fjb8658k   #       𐫀.ډ𑌀\r
++B;    xn--pw9c.xn--fjb8658k;  𐫀.\u0689𑌀;        xn--pw9c.xn--fjb8658k   #       𐫀.ډ𑌀\r
++B;    𑋪.𐳝;    [B1 B3 B6 V5];  [B1 B3 B6 V5]\r
++B;    𑋪.𐳝;      [B1 B3 B6 V5];  [B1 B3 B6 V5]\r
++B;    𑋪.𐲝;      [B1 B3 B6 V5];  [B1 B3 B6 V5]\r
++B;    xn--fm1d.xn--5c0d;      [B1 B3 B6 V5];  [B1 B3 B6 V5]\r
++B;    𑋪.𐲝;    [B1 B3 B6 V5];  [B1 B3 B6 V5]\r
++B;    ≠膣。\u0F83;        [P1 V5 V6];     [P1 V5 V6]      #       ≠膣.ྃ\r
++B;    =\u0338膣。\u0F83;    [P1 V5 V6];     [P1 V5 V6]      #       ≠膣.ྃ\r
++B;    xn--1chy468a.xn--2ed;   [V5 V6];        [V5 V6] #       ≠膣.ྃ\r
++T;    񰀎-\u077D。ß;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       -ݽ.ß\r
++N;    񰀎-\u077D。ß;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       -ݽ.ß\r
++T;    񰀎-\u077D。ß;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       -ݽ.ß\r
++N;    񰀎-\u077D。ß;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       -ݽ.ß\r
++B;    񰀎-\u077D。SS;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       -ݽ.ss\r
++B;    񰀎-\u077D。ss;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       -ݽ.ss\r
++B;    񰀎-\u077D。Ss;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       -ݽ.ss\r
++B;    xn----j6c95618k.ss;     [B5 B6 V6];     [B5 B6 V6]      #       -ݽ.ss\r
++B;    xn----j6c95618k.xn--zca;        [B5 B6 V6];     [B5 B6 V6]      #       -ݽ.ß\r
++B;    񰀎-\u077D。SS;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       -ݽ.ss\r
++B;    񰀎-\u077D。ss;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       -ݽ.ss\r
++B;    񰀎-\u077D。Ss;       [B5 B6 P1 V6];  [B5 B6 P1 V6]   #       -ݽ.ss\r
++T;    ς𐹠ᡚ𑄳.⾭𐹽𽐖𐫜;        [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++N;    ς𐹠ᡚ𑄳.⾭𐹽𽐖𐫜;        [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++T;    ς𐹠ᡚ𑄳.靑𐹽𽐖𐫜;  [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++N;    ς𐹠ᡚ𑄳.靑𐹽𽐖𐫜;  [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++B;    Σ𐹠ᡚ𑄳.靑𐹽𽐖𐫜;  [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++B;    σ𐹠ᡚ𑄳.靑𐹽𽐖𐫜;  [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++B;    xn--4xa656hp23pxmc.xn--es5a888tvjc2u15h;        [B5 B6 V6];     [B5 B6 V6]\r
++B;    xn--3xa856hp23pxmc.xn--es5a888tvjc2u15h;        [B5 B6 V6];     [B5 B6 V6]\r
++B;    Σ𐹠ᡚ𑄳.⾭𐹽𽐖𐫜;        [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++B;    σ𐹠ᡚ𑄳.⾭𐹽𽐖𐫜;        [B5 B6 P1 V6];  [B5 B6 P1 V6]\r
++T;    𐋷。\u200D;  [C2];   xn--r97c.       #       𐋷.\r
++N;    𐋷。\u200D;  [C2];   [C2]    #       𐋷.\r
++B;    xn--r97c.;      𐋷.;  xn--r97c.;      NV8\r
++B;    𐋷.;  ;       xn--r97c.;      NV8\r
++B;    xn--r97c.xn--1ug;       [C2];   [C2]    #       𐋷.\r
++B;    𑰳𑈯。⥪; [V5];   [V5]\r
++B;    xn--2g1d14o.xn--jti;    [V5];   [V5]\r
++T;    𑆀䁴񤧣.Ⴕ𝟜\u200C\u0348;      [C1 P1 V5 V6];  [P1 V5 V6]      #       𑆀䁴.Ⴕ4͈\r
++N;    𑆀䁴񤧣.Ⴕ𝟜\u200C\u0348;      [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       𑆀䁴.Ⴕ4͈\r
++T;    𑆀䁴񤧣.Ⴕ4\u200C\u0348;   [C1 P1 V5 V6];  [P1 V5 V6]      #       𑆀䁴.Ⴕ4͈\r
++N;    𑆀䁴񤧣.Ⴕ4\u200C\u0348;   [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       𑆀䁴.Ⴕ4͈\r
++T;    𑆀䁴񤧣.ⴕ4\u200C\u0348;   [C1 P1 V5 V6];  [P1 V5 V6]      #       𑆀䁴.ⴕ4͈\r
++N;    𑆀䁴񤧣.ⴕ4\u200C\u0348;   [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       𑆀䁴.ⴕ4͈\r
++B;    xn--1mnx647cg3x1b.xn--4-zfb5123a;       [V5 V6];        [V5 V6] #       𑆀䁴.ⴕ4͈\r
++B;    xn--1mnx647cg3x1b.xn--4-zfb502tlsl;     [C1 V5 V6];     [C1 V5 V6]      #       𑆀䁴.ⴕ4͈\r
++B;    xn--1mnx647cg3x1b.xn--4-zfb324h;        [V5 V6];        [V5 V6] #       𑆀䁴.Ⴕ4͈\r
++B;    xn--1mnx647cg3x1b.xn--4-zfb324h32o;     [C1 V5 V6];     [C1 V5 V6]      #       𑆀䁴.Ⴕ4͈\r
++T;    𑆀䁴񤧣.ⴕ𝟜\u200C\u0348;      [C1 P1 V5 V6];  [P1 V5 V6]      #       𑆀䁴.ⴕ4͈\r
++N;    𑆀䁴񤧣.ⴕ𝟜\u200C\u0348;      [C1 P1 V5 V6];  [C1 P1 V5 V6]   #       𑆀䁴.ⴕ4͈\r
++T;    憡\uDF1F\u200CႴ.𐋮\u200D≠;       [C1 C2 P1 V6];  [P1 V6 A3]      #       憡Ⴔ.𐋮≠\r
++N;    憡\uDF1F\u200CႴ.𐋮\u200D≠;       [C1 C2 P1 V6];  [C1 C2 P1 V6 A3]        #       憡Ⴔ.𐋮≠\r
++T;    憡\uDF1F\u200CႴ.𐋮\u200D=\u0338;   [C1 C2 P1 V6];  [P1 V6 A3]      #       憡Ⴔ.𐋮≠\r
++N;    憡\uDF1F\u200CႴ.𐋮\u200D=\u0338;   [C1 C2 P1 V6];  [C1 C2 P1 V6 A3]        #       憡Ⴔ.𐋮≠\r
++T;    憡\uDF1F\u200Cⴔ.𐋮\u200D=\u0338;   [C1 C2 P1 V6];  [P1 V6 A3]      #       憡ⴔ.𐋮≠\r
++N;    憡\uDF1F\u200Cⴔ.𐋮\u200D=\u0338;   [C1 C2 P1 V6];  [C1 C2 P1 V6 A3]        #       憡ⴔ.𐋮≠\r
++T;    憡\uDF1F\u200Cⴔ.𐋮\u200D≠;       [C1 C2 P1 V6];  [P1 V6 A3]      #       憡ⴔ.𐋮≠\r
++N;    憡\uDF1F\u200Cⴔ.𐋮\u200D≠;       [C1 C2 P1 V6];  [C1 C2 P1 V6 A3]        #       憡ⴔ.𐋮≠\r
++B;    憡\uDF1Fⴔ.xn--1chz659f;      [P1 V6];        [P1 V6 A3]      #       憡ⴔ.𐋮≠\r
++B;    憡\uDF1FႴ.XN--1CHZ659F;      [P1 V6];        [P1 V6 A3]      #       憡Ⴔ.𐋮≠\r
++B;    憡\uDF1FႴ.xn--1Chz659f;      [P1 V6];        [P1 V6 A3]      #       憡Ⴔ.𐋮≠\r
++B;    憡\uDF1FႴ.xn--1chz659f;      [P1 V6];        [P1 V6 A3]      #       憡Ⴔ.𐋮≠\r
++T;    憡\uDF1F\u200Cⴔ.xn--1ug73gl146a;     [C1 C2 P1 V6];  [C2 P1 V6 A3]   #       憡ⴔ.𐋮≠\r
++N;    憡\uDF1F\u200Cⴔ.xn--1ug73gl146a;     [C1 C2 P1 V6];  [C1 C2 P1 V6 A3]        #       憡ⴔ.𐋮≠\r
++T;    憡\uDF1F\u200CႴ.XN--1UG73GL146A;     [C1 C2 P1 V6];  [C2 P1 V6 A3]   #       憡Ⴔ.𐋮≠\r
++N;    憡\uDF1F\u200CႴ.XN--1UG73GL146A;     [C1 C2 P1 V6];  [C1 C2 P1 V6 A3]        #       憡Ⴔ.𐋮≠\r
++T;    憡\uDF1F\u200CႴ.xn--1Ug73gl146a;     [C1 C2 P1 V6];  [C2 P1 V6 A3]   #       憡Ⴔ.𐋮≠\r
++N;    憡\uDF1F\u200CႴ.xn--1Ug73gl146a;     [C1 C2 P1 V6];  [C1 C2 P1 V6 A3]        #       憡Ⴔ.𐋮≠\r
++B;    憡\uDF1FႴ.xn--1ug73gl146a;   [C2 P1 V6];     [C2 P1 V6 A3]   #       憡Ⴔ.𐋮≠\r
++B;    憡\uDF1Fⴔ.xn--1ug73gl146a;   [C2 P1 V6];     [C2 P1 V6 A3]   #       憡ⴔ.𐋮≠\r
++B;    憡\uDF1FႴ.XN--1UG73GL146A;   [C2 P1 V6];     [C2 P1 V6 A3]   #       憡Ⴔ.𐋮≠\r
++B;    憡\uDF1FႴ.xn--1Ug73gl146a;   [C2 P1 V6];     [C2 P1 V6 A3]   #       憡Ⴔ.𐋮≠\r
++T;    憡\uDF1F\u200CႴ.xn--1ug73gl146a;     [C1 C2 P1 V6];  [C2 P1 V6 A3]   #       憡Ⴔ.𐋮≠\r
++N;    憡\uDF1F\u200CႴ.xn--1ug73gl146a;     [C1 C2 P1 V6];  [C1 C2 P1 V6 A3]        #       憡Ⴔ.𐋮≠\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..67988e80c384aad5cf519e8be496581a8c026791
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,65 @@@
++// Copyright 2013 The rust-url developers.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use idna::punycode::{decode, encode_str};
++use rustc_serialize::json::{Json, Object};
++use test::TestFn;
++
++fn one_test(decoded: &str, encoded: &str) {
++    match decode(encoded) {
++        None => panic!("Decoding {} failed.", encoded),
++        Some(result) => {
++            let result = result.into_iter().collect::<String>();
++            assert!(result == decoded,
++                    format!("Incorrect decoding of \"{}\":\n   \"{}\"\n!= \"{}\"\n",
++                            encoded, result, decoded))
++        }
++    }
++
++    match encode_str(decoded) {
++        None => panic!("Encoding {} failed.", decoded),
++        Some(result) => {
++            assert!(result == encoded,
++                    format!("Incorrect encoding of \"{}\":\n   \"{}\"\n!= \"{}\"\n",
++                            decoded, result, encoded))
++        }
++    }
++}
++
++fn get_string<'a>(map: &'a Object, key: &str) -> &'a str {
++    match map.get(&key.to_string()) {
++        Some(&Json::String(ref s)) => s,
++        None => "",
++        _ => panic!(),
++    }
++}
++
++pub fn collect_tests<F: FnMut(String, TestFn)>(add_test: &mut F) {
++    match Json::from_str(include_str!("punycode_tests.json")) {
++        Ok(Json::Array(tests)) => for (i, test) in tests.into_iter().enumerate() {
++            match test {
++                Json::Object(o) => {
++                    let test_name = {
++                        let desc = get_string(&o, "description");
++                            if desc.is_empty() {
++                            format!("Punycode {}", i + 1)
++                        } else {
++                            format!("Punycode {}: {}", i + 1, desc)
++                        }
++                    };
++                    add_test(test_name, TestFn::dyn_test_fn(move || one_test(
++                        get_string(&o, "decoded"),
++                        get_string(&o, "encoded"),
++                    )))
++                }
++                _ => panic!(),
++            }
++        },
++        other => panic!("{:?}", other)
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..86785b1243f927bc0d963499c2f32fc2a70b5e02
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,120 @@@
++[
++{
++    "description": "These tests are copied from https://github.com/bestiejs/punycode.js/blob/master/tests/tests.js , used under the MIT license.",
++    "decoded": "",
++    "encoded": ""
++},
++{
++    "description": "a single basic code point",
++    "decoded": "Bach",
++    "encoded": "Bach-"
++},
++{
++    "description": "a single non-ASCII character",
++    "decoded": "\u00FC",
++    "encoded": "tda"
++},
++{
++    "description": "multiple non-ASCII characters",
++    "decoded": "\u00FC\u00EB\u00E4\u00F6\u2665",
++    "encoded": "4can8av2009b"
++},
++{
++    "description": "mix of ASCII and non-ASCII characters",
++    "decoded": "b\u00FCcher",
++    "encoded": "bcher-kva"
++},
++{
++    "description": "long string with both ASCII and non-ASCII characters",
++    "decoded": "Willst du die Bl\u00FCthe des fr\u00FChen, die Fr\u00FCchte des sp\u00E4teren Jahres",
++    "encoded": "Willst du die Blthe des frhen, die Frchte des spteren Jahres-x9e96lkal"
++},
++{
++    "description": "Arabic (Egyptian)",
++    "decoded": "\u0644\u064A\u0647\u0645\u0627\u0628\u062A\u0643\u0644\u0645\u0648\u0634\u0639\u0631\u0628\u064A\u061F",
++    "encoded": "egbpdaj6bu4bxfgehfvwxn"
++},
++{
++    "description": "Chinese (simplified)",
++    "decoded": "\u4ED6\u4EEC\u4E3A\u4EC0\u4E48\u4E0D\u8BF4\u4E2d\u6587",
++    "encoded": "ihqwcrb4cv8a8dqg056pqjye"
++},
++{
++    "description": "Chinese (traditional)",
++    "decoded": "\u4ED6\u5011\u7232\u4EC0\u9EBD\u4E0D\u8AAA\u4E2D\u6587",
++    "encoded": "ihqwctvzc91f659drss3x8bo0yb"
++},
++{
++    "description": "Czech",
++    "decoded": "Pro\u010Dprost\u011Bnemluv\u00ED\u010Desky",
++    "encoded": "Proprostnemluvesky-uyb24dma41a"
++},
++{
++    "description": "Hebrew",
++    "decoded": "\u05DC\u05DE\u05D4\u05D4\u05DD\u05E4\u05E9\u05D5\u05D8\u05DC\u05D0\u05DE\u05D3\u05D1\u05E8\u05D9\u05DD\u05E2\u05D1\u05E8\u05D9\u05EA",
++    "encoded": "4dbcagdahymbxekheh6e0a7fei0b"
++},
++{
++    "description": "Hindi (Devanagari)",
++    "decoded": "\u092F\u0939\u0932\u094B\u0917\u0939\u093F\u0928\u094D\u0926\u0940\u0915\u094D\u092F\u094B\u0902\u0928\u0939\u0940\u0902\u092C\u094B\u0932\u0938\u0915\u0924\u0947\u0939\u0948\u0902",
++    "encoded": "i1baa7eci9glrd9b2ae1bj0hfcgg6iyaf8o0a1dig0cd"
++},
++{
++    "description": "Japanese (kanji and hiragana)",
++    "decoded": "\u306A\u305C\u307F\u3093\u306A\u65E5\u672C\u8A9E\u3092\u8A71\u3057\u3066\u304F\u308C\u306A\u3044\u306E\u304B",
++    "encoded": "n8jok5ay5dzabd5bym9f0cm5685rrjetr6pdxa"
++},
++{
++    "description": "Korean (Hangul syllables)",
++    "decoded": "\uC138\uACC4\uC758\uBAA8\uB4E0\uC0AC\uB78C\uB4E4\uC774\uD55C\uAD6D\uC5B4\uB97C\uC774\uD574\uD55C\uB2E4\uBA74\uC5BC\uB9C8\uB098\uC88B\uC744\uAE4C",
++    "encoded": "989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5jpsd879ccm6fea98c"
++},
++{
++    "description": "Russian (Cyrillic)",
++    "decoded": "\u043F\u043E\u0447\u0435\u043C\u0443\u0436\u0435\u043E\u043D\u0438\u043D\u0435\u0433\u043E\u0432\u043E\u0440\u044F\u0442\u043F\u043E\u0440\u0443\u0441\u0441\u043A\u0438",
++    "encoded": "b1abfaaepdrnnbgefbadotcwatmq2g4l"
++},
++{
++    "description": "Spanish",
++    "decoded": "Porqu\u00E9nopuedensimplementehablarenEspa\u00F1ol",
++    "encoded": "PorqunopuedensimplementehablarenEspaol-fmd56a"
++},
++{
++    "description": "Vietnamese",
++    "decoded": "T\u1EA1isaoh\u1ECDkh\u00F4ngth\u1EC3ch\u1EC9n\u00F3iti\u1EBFngVi\u1EC7t",
++    "encoded": "TisaohkhngthchnitingVit-kjcr8268qyxafd2f1b9g"
++},
++{
++    "decoded": "3\u5E74B\u7D44\u91D1\u516B\u5148\u751F",
++    "encoded": "3B-ww4c5e180e575a65lsy2b"
++},
++{
++    "decoded": "\u5B89\u5BA4\u5948\u7F8E\u6075-with-SUPER-MONKEYS",
++    "encoded": "-with-SUPER-MONKEYS-pc58ag80a8qai00g7n9n"
++},
++{
++    "decoded": "Hello-Another-Way-\u305D\u308C\u305E\u308C\u306E\u5834\u6240",
++    "encoded": "Hello-Another-Way--fc4qua05auwb3674vfr0b"
++},
++{
++    "decoded": "\u3072\u3068\u3064\u5C4B\u6839\u306E\u4E0B2",
++    "encoded": "2-u9tlzr9756bt3uc0v"
++},
++{
++    "decoded": "Maji\u3067Koi\u3059\u308B5\u79D2\u524D",
++    "encoded": "MajiKoi5-783gue6qz075azm5e"
++},
++{
++    "decoded": "\u30D1\u30D5\u30A3\u30FCde\u30EB\u30F3\u30D0",
++    "encoded": "de-jg4avhby1noc0d"
++},
++{
++    "decoded": "\u305D\u306E\u30B9\u30D4\u30FC\u30C9\u3067",
++    "encoded": "d9juau41awczczp"
++},
++{
++    "description": "ASCII string that breaks the existing rules for host-name labels (It's not a realistic example for IDNA, because IDNA never encodes pure ASCII labels.)",
++    "decoded": "-> $1.00 <-",
++    "encoded": "-> $1.00 <--"
++}
++]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8ca218595b235fd472e0da579c8a9220d0ac2a35
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++extern crate idna;
++extern crate rustc_serialize;
++extern crate test;
++
++mod punycode;
++mod uts46;
++
++fn main() {
++    let mut tests = Vec::new();
++    {
++        let mut add_test = |name, run| {
++            tests.push(test::TestDescAndFn {
++                desc: test::TestDesc::new(test::DynTestName(name)),
++                testfn: run,
++            })
++        };
++        punycode::collect_tests(&mut add_test);
++        uts46::collect_tests(&mut add_test);
++    }
++    test::test_main(&std::env::args().collect::<Vec<_>>(), tests)
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a7d158d5c4d048541c7030515e00a617a3966209
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,40 @@@
++extern crate idna;
++extern crate unicode_normalization;
++
++use idna::uts46;
++use unicode_normalization::char::is_combining_mark;
++
++
++fn _to_ascii(domain: &str) -> Result<String, uts46::Errors> {
++    uts46::to_ascii(domain, uts46::Flags {
++        transitional_processing: false,
++        use_std3_ascii_rules: true,
++        verify_dns_length: true,
++    })
++}
++
++#[test]
++fn test_v5() {
++    // IdnaTest:784 蔏。𑰺
++    assert!(is_combining_mark('\u{11C3A}'));
++    assert!(_to_ascii("\u{11C3A}").is_err());
++    assert!(_to_ascii("\u{850f}.\u{11C3A}").is_err());
++    assert!(_to_ascii("\u{850f}\u{ff61}\u{11C3A}").is_err());
++}
++
++#[test]
++fn test_v8_bidi_rules() {
++    assert_eq!(_to_ascii("abc").unwrap(), "abc");
++    assert_eq!(_to_ascii("123").unwrap(), "123");
++    assert_eq!(_to_ascii("אבּג").unwrap(), "xn--kdb3bdf");
++    assert_eq!(_to_ascii("ابج").unwrap(), "xn--mgbcm");
++    assert_eq!(_to_ascii("abc.ابج").unwrap(), "abc.xn--mgbcm");
++    assert_eq!(_to_ascii("אבּג.ابج").unwrap(), "xn--kdb3bdf.xn--mgbcm");
++
++    // Bidi domain names cannot start with digits
++    assert!(_to_ascii("0a.\u{05D0}").is_err());
++    assert!(_to_ascii("0à.\u{05D0}").is_err());
++
++    // Bidi chars may be punycode-encoded
++    assert!(_to_ascii("xn--0ca24w").is_err());
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ddc8af9892f95870412ded8b5f68b506d80cc30e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,124 @@@
++// Copyright 2013-2014 The rust-url developers.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use std::char;
++use idna::uts46;
++use test::TestFn;
++
++pub fn collect_tests<F: FnMut(String, TestFn)>(add_test: &mut F) {
++    // http://www.unicode.org/Public/idna/latest/IdnaTest.txt
++    for (i, line) in include_str!("IdnaTest.txt").lines().enumerate() {
++        if line == "" || line.starts_with("#") {
++            continue
++        }
++        // Remove comments
++        let mut line = match line.find("#") {
++            Some(index) => &line[0..index],
++            None => line
++        };
++
++        let mut expected_failure = false;
++        if line.starts_with("XFAIL") {
++            expected_failure = true;
++            line = &line[5..line.len()];
++        };
++
++        let mut pieces = line.split(';').map(|x| x.trim()).collect::<Vec<&str>>();
++
++        let test_type = pieces.remove(0);
++        let original = pieces.remove(0);
++        let source = unescape(original);
++        let to_unicode = pieces.remove(0);
++        let to_ascii = pieces.remove(0);
++        let nv8 = if pieces.len() > 0 { pieces.remove(0) } else { "" };
++
++        if expected_failure {
++            continue;
++        }
++
++        let test_name = format!("UTS #46 line {}", i + 1);
++        add_test(test_name, TestFn::dyn_test_fn(move || {
++            let result = uts46::to_ascii(&source, uts46::Flags {
++                use_std3_ascii_rules: true,
++                transitional_processing: test_type == "T",
++                verify_dns_length: true,
++            });
++
++            if to_ascii.starts_with("[") {
++                if to_ascii.starts_with("[C") {
++                    // http://unicode.org/reports/tr46/#Deviations
++                    // applications that perform IDNA2008 lookup are not required to check
++                    // for these contexts
++                    return;
++                }
++                if to_ascii == "[V2]" {
++                    // Everybody ignores V2
++                    // https://github.com/servo/rust-url/pull/240
++                    // https://github.com/whatwg/url/issues/53#issuecomment-181528158
++                    // http://www.unicode.org/review/pri317/
++                    return;
++                }
++                let res = result.ok();
++                assert!(res == None, "Expected error. result: {} | original: {} | source: {}",
++                        res.unwrap(), original, source);
++                return;
++            }
++
++            let to_ascii = if to_ascii.len() > 0 {
++                to_ascii.to_string()
++            } else {
++                if to_unicode.len() > 0 {
++                    to_unicode.to_string()
++                } else {
++                    source.clone()
++                }
++            };
++
++            if nv8 == "NV8" {
++                // This result isn't valid under IDNA2008. Skip it
++                return;
++            }
++
++            assert!(result.is_ok(), "Couldn't parse {} | original: {} | error: {:?}",
++                    source, original, result.err());
++            let output = result.ok().unwrap();
++            assert!(output == to_ascii, "result: {} | expected: {} | original: {} | source: {}",
++                    output, to_ascii, original, source);
++        }))
++    }
++}
++
++fn unescape(input: &str) -> String {
++    let mut output = String::new();
++    let mut chars = input.chars();
++    loop {
++        match chars.next() {
++            None => return output,
++            Some(c) =>
++                if c == '\\' {
++                    match chars.next().unwrap() {
++                        '\\' => output.push('\\'),
++                        'u' => {
++                            let c1 = chars.next().unwrap().to_digit(16).unwrap();
++                            let c2 = chars.next().unwrap().to_digit(16).unwrap();
++                            let c3 = chars.next().unwrap().to_digit(16).unwrap();
++                            let c4 = chars.next().unwrap().to_digit(16).unwrap();
++                            match char::from_u32((((c1 * 16 + c2) * 16 + c3) * 16 + c4))
++                            {
++                                Some(c) => output.push(c),
++                                None => { output.push_str(&format!("\\u{:X}{:X}{:X}{:X}",c1,c2,c3,c4)); }
++                            };
++                        }
++                        _ => panic!("Invalid test data input"),
++                    }
++                } else {
++                    output.push(c);
++                }
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e5f0dcf15a5884bbaa02e4e0694b904e7d4898d7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"b3fcaf2365eb14b28ec7603c98c06cc531f19de9eb283d89a3dff8417c8c99f5"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bb9c20a094e41b7632d63bcff20c0b4b95e80777
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++This project is dual-licensed under the Unlicense and MIT licenses.
++
++You may use this code under the terms of either license.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a866aebc0ceef79914a82ab834d31d2688883442
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,57 @@@
++# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
++#
++# When uploading crates to the registry Cargo will automatically
++# "normalize" Cargo.toml files for maximal compatibility
++# with all versions of Cargo and also rewrite `path` dependencies
++# to registry (e.g. crates.io) dependencies
++#
++# If you believe there's an error in this file please file an
++# issue against the rust-lang/cargo repository. If you're
++# editing this file be aware that the upstream Cargo.toml
++# will likely look very different (and much more reasonable)
++
++[package]
++name = "ignore"
++version = "0.2.2"
++authors = ["Andrew Gallant <jamslam@gmail.com>"]
++description = "A fast library for efficiently matching ignore files such as `.gitignore`\nagainst file paths.\n"
++homepage = "https://github.com/BurntSushi/ripgrep/tree/master/ignore"
++documentation = "https://docs.rs/ignore"
++readme = "README.md"
++keywords = ["glob", "ignore", "gitignore", "pattern", "file"]
++license = "Unlicense/MIT"
++repository = "https://github.com/BurntSushi/ripgrep/tree/master/ignore"
++[profile.release]
++debug = true
++
++[lib]
++name = "ignore"
++bench = false
++[dependencies.memchr]
++version = "1"
++
++[dependencies.walkdir]
++version = "1.0.7"
++
++[dependencies.crossbeam]
++version = "0.2"
++
++[dependencies.log]
++version = "0.3"
++
++[dependencies.regex]
++version = "0.2.1"
++
++[dependencies.thread_local]
++version = "0.3.2"
++
++[dependencies.globset]
++version = "0.2.0"
++
++[dependencies.lazy_static]
++version = "0.2"
++[dev-dependencies.tempdir]
++version = "0.3.5"
++
++[features]
++simd-accel = ["globset/simd-accel"]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3b0a5dc09c1e16357459ddc9182a50f360f3cdba
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++The MIT License (MIT)
++
++Copyright (c) 2015 Andrew Gallant
++
++Permission is hereby granted, free of charge, to any person obtaining a copy
++of this software and associated documentation files (the "Software"), to deal
++in the Software without restriction, including without limitation the rights
++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++copies of the Software, and to permit persons to whom the Software is
++furnished to do so, subject to the following conditions:
++
++The above copyright notice and this permission notice shall be included in
++all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6759b2d6827983b13630e6f5a66960d50d4f2568
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,66 @@@
++ignore
++======
++The ignore crate provides a fast recursive directory iterator that respects
++various filters such as globs, file types and `.gitignore` files. This crate
++also provides lower level direct access to gitignore and file type matchers.
++
++[![Linux build status](https://api.travis-ci.org/BurntSushi/ripgrep.png)](https://travis-ci.org/BurntSushi/ripgrep)
++[![Windows build status](https://ci.appveyor.com/api/projects/status/github/BurntSushi/ripgrep?svg=true)](https://ci.appveyor.com/project/BurntSushi/ripgrep)
++[![](https://img.shields.io/crates/v/ignore.svg)](https://crates.io/crates/ignore)
++
++Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
++
++### Documentation
++
++[https://docs.rs/ignore](https://docs.rs/ignore)
++
++### Usage
++
++Add this to your `Cargo.toml`:
++
++```toml
++[dependencies]
++ignore = "0.2"
++```
++
++and this to your crate root:
++
++```rust
++extern crate ignore;
++```
++
++### Example
++
++This example shows the most basic usage of this crate. This code will
++recursively traverse the current directory while automatically filtering out
++files and directories according to ignore globs found in files like
++`.ignore` and `.gitignore`:
++
++
++```rust,no_run
++use ignore::Walk;
++
++for result in Walk::new("./") {
++    // Each item yielded by the iterator is either a directory entry or an
++    // error, so either print the path or the error.
++    match result {
++        Ok(entry) => println!("{}", entry.path().display()),
++        Err(err) => println!("ERROR: {}", err),
++    }
++}
++```
++
++### Example: advanced
++
++By default, the recursive directory iterator will ignore hidden files and
++directories. This can be disabled by building the iterator with `WalkBuilder`:
++
++```rust,no_run
++use ignore::WalkBuilder;
++
++for result in WalkBuilder::new("./").hidden(false).build() {
++    println!("{:?}", result);
++}
++```
++
++See the documentation for `WalkBuilder` for many other options.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..68a49daad8ff7e35068f2b7a97d643aab440eaec
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++This is free and unencumbered software released into the public domain.
++
++Anyone is free to copy, modify, publish, use, compile, sell, or
++distribute this software, either in source code form or as a compiled
++binary, for any purpose, commercial or non-commercial, and by any
++means.
++
++In jurisdictions that recognize copyright laws, the author or authors
++of this software dedicate any and all copyright interest in the
++software to the public domain. We make this dedication for the benefit
++of the public at large and to the detriment of our heirs and
++successors. We intend this dedication to be an overt act of
++relinquishment in perpetuity of all present and future rights to this
++software under copyright law.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
++OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
++ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++OTHER DEALINGS IN THE SOFTWARE.
++
++For more information, please refer to <http://unlicense.org/>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0ff4ea94ee1359065acdc18f4dad5573e9f87e04
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,92 @@@
++#![allow(dead_code, unused_imports, unused_mut, unused_variables)]
++
++extern crate crossbeam;
++extern crate ignore;
++extern crate walkdir;
++
++use std::env;
++use std::io::{self, Write};
++use std::path::Path;
++use std::sync::Arc;
++use std::sync::atomic::{AtomicUsize, Ordering};
++use std::thread;
++
++use crossbeam::sync::MsQueue;
++use ignore::WalkBuilder;
++use walkdir::WalkDir;
++
++fn main() {
++    let mut path = env::args().nth(1).unwrap();
++    let mut parallel = false;
++    let mut simple = false;
++    let queue: Arc<MsQueue<Option<DirEntry>>> = Arc::new(MsQueue::new());
++    if path == "parallel" {
++        path = env::args().nth(2).unwrap();
++        parallel = true;
++    } else if path == "walkdir" {
++        path = env::args().nth(2).unwrap();
++        simple = true;
++    }
++
++    let stdout_queue = queue.clone();
++    let stdout_thread = thread::spawn(move || {
++        let mut stdout = io::BufWriter::new(io::stdout());
++        while let Some(dent) = stdout_queue.pop() {
++            write_path(&mut stdout, dent.path());
++        }
++    });
++
++    if parallel {
++        let walker = WalkBuilder::new(path).threads(6).build_parallel();
++        walker.run(|| {
++            let queue = queue.clone();
++            Box::new(move |result| {
++                use ignore::WalkState::*;
++
++                queue.push(Some(DirEntry::Y(result.unwrap())));
++                Continue
++            })
++        });
++    } else if simple {
++        let mut stdout = io::BufWriter::new(io::stdout());
++        let walker = WalkDir::new(path);
++        for result in walker {
++            queue.push(Some(DirEntry::X(result.unwrap())));
++        }
++    } else {
++        let mut stdout = io::BufWriter::new(io::stdout());
++        let walker = WalkBuilder::new(path).build();
++        for result in walker {
++            queue.push(Some(DirEntry::Y(result.unwrap())));
++        }
++    }
++    queue.push(None);
++    stdout_thread.join().unwrap();
++}
++
++enum DirEntry {
++    X(walkdir::DirEntry),
++    Y(ignore::DirEntry),
++}
++
++impl DirEntry {
++    fn path(&self) -> &Path {
++        match *self {
++            DirEntry::X(ref x) => x.path(),
++            DirEntry::Y(ref y) => y.path(),
++        }
++    }
++}
++
++#[cfg(unix)]
++fn write_path<W: Write>(mut wtr: W, path: &Path) {
++    use std::os::unix::ffi::OsStrExt;
++    wtr.write(path.as_os_str().as_bytes()).unwrap();
++    wtr.write(b"\n").unwrap();
++}
++
++#[cfg(not(unix))]
++fn write_path<W: Write>(mut wtr: W, path: &Path) {
++    wtr.write(path.to_string_lossy().as_bytes()).unwrap();
++    wtr.write(b"\n").unwrap();
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..95c7184824b4a8b6a335e6ad79385c50a45c438d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,800 @@@
++// This module provides a data structure, `Ignore`, that connects "directory
++// traversal" with "ignore matchers." Specifically, it knows about gitignore
++// semantics and precedence, and is organized based on directory hierarchy.
++// Namely, every matcher logically corresponds to ignore rules from a single
++// directory, and points to the matcher for its corresponding parent directory.
++// In this sense, `Ignore` is a *persistent* data structure.
++//
++// This design was specifically chosen to make it possible to use this data
++// structure in a parallel directory iterator.
++//
++// My initial intention was to expose this module as part of this crate's
++// public API, but I think the data structure's public API is too complicated
++// with non-obvious failure modes. Alas, such things haven't been documented
++// well.
++
++use std::collections::HashMap;
++use std::ffi::OsString;
++use std::path::{Path, PathBuf};
++use std::sync::{Arc, RwLock};
++
++use gitignore::{self, Gitignore, GitignoreBuilder};
++use pathutil::{is_hidden, strip_prefix};
++use overrides::{self, Override};
++use types::{self, Types};
++use {Error, Match, PartialErrorBuilder};
++
++/// IgnoreMatch represents information about where a match came from when using
++/// the `Ignore` matcher.
++#[derive(Clone, Debug)]
++pub struct IgnoreMatch<'a>(IgnoreMatchInner<'a>);
++
++/// IgnoreMatchInner describes precisely where the match information came from.
++/// This is private to allow expansion to more matchers in the future.
++#[derive(Clone, Debug)]
++enum IgnoreMatchInner<'a> {
++    Override(overrides::Glob<'a>),
++    Gitignore(&'a gitignore::Glob),
++    Types(types::Glob<'a>),
++    Hidden,
++}
++
++impl<'a> IgnoreMatch<'a> {
++    fn overrides(x: overrides::Glob<'a>) -> IgnoreMatch<'a> {
++        IgnoreMatch(IgnoreMatchInner::Override(x))
++    }
++
++    fn gitignore(x: &'a gitignore::Glob) -> IgnoreMatch<'a> {
++        IgnoreMatch(IgnoreMatchInner::Gitignore(x))
++    }
++
++    fn types(x: types::Glob<'a>) -> IgnoreMatch<'a> {
++        IgnoreMatch(IgnoreMatchInner::Types(x))
++    }
++
++    fn hidden() -> IgnoreMatch<'static> {
++        IgnoreMatch(IgnoreMatchInner::Hidden)
++    }
++}
++
++/// Options for the ignore matcher, shared between the matcher itself and the
++/// builder.
++#[derive(Clone, Copy, Debug)]
++struct IgnoreOptions {
++    /// Whether to ignore hidden file paths or not.
++    hidden: bool,
++    /// Whether to read .ignore files.
++    ignore: bool,
++    /// Whether to read git's global gitignore file.
++    git_global: bool,
++    /// Whether to read .gitignore files.
++    git_ignore: bool,
++    /// Whether to read .git/info/exclude files.
++    git_exclude: bool,
++}
++
++impl IgnoreOptions {
++    /// Returns true if at least one type of ignore rules should be matched.
++    fn has_any_ignore_options(&self) -> bool {
++        self.ignore || self.git_global || self.git_ignore || self.git_exclude
++    }
++}
++
++/// Ignore is a matcher useful for recursively walking one or more directories.
++#[derive(Clone, Debug)]
++pub struct Ignore(Arc<IgnoreInner>);
++
++#[derive(Clone, Debug)]
++struct IgnoreInner {
++    /// A map of all existing directories that have already been
++    /// compiled into matchers.
++    ///
++    /// Note that this is never used during matching, only when adding new
++    /// parent directory matchers. This avoids needing to rebuild glob sets for
++    /// parent directories if many paths are being searched.
++    compiled: Arc<RwLock<HashMap<OsString, Ignore>>>,
++    /// The path to the directory that this matcher was built from.
++    dir: PathBuf,
++    /// An override matcher (default is empty).
++    overrides: Arc<Override>,
++    /// A file type matcher.
++    types: Arc<Types>,
++    /// The parent directory to match next.
++    ///
++    /// If this is the root directory or there are otherwise no more
++    /// directories to match, then `parent` is `None`.
++    parent: Option<Ignore>,
++    /// Whether this is an absolute parent matcher, as added by add_parent.
++    is_absolute_parent: bool,
++    /// The absolute base path of this matcher. Populated only if parent
++    /// directories are added.
++    absolute_base: Option<Arc<PathBuf>>,
++    /// Explicit ignore matchers specified by the caller.
++    explicit_ignores: Arc<Vec<Gitignore>>,
++    /// The matcher for .ignore files.
++    ignore_matcher: Gitignore,
++    /// A global gitignore matcher, usually from $XDG_CONFIG_HOME/git/ignore.
++    git_global_matcher: Arc<Gitignore>,
++    /// The matcher for .gitignore files.
++    git_ignore_matcher: Gitignore,
++    /// Special matcher for `.git/info/exclude` files.
++    git_exclude_matcher: Gitignore,
++    /// Whether this directory contains a .git sub-directory.
++    has_git: bool,
++    /// Ignore config.
++    opts: IgnoreOptions,
++}
++
++impl Ignore {
++    /// Return the directory path of this matcher.
++    #[allow(dead_code)]
++    pub fn path(&self) -> &Path {
++        &self.0.dir
++    }
++
++    /// Return true if this matcher has no parent.
++    pub fn is_root(&self) -> bool {
++        self.0.parent.is_none()
++    }
++
++    /// Returns true if this matcher was added via the `add_parents` method.
++    pub fn is_absolute_parent(&self) -> bool {
++        self.0.is_absolute_parent
++    }
++
++    /// Return this matcher's parent, if one exists.
++    pub fn parent(&self) -> Option<Ignore> {
++        self.0.parent.clone()
++    }
++
++    /// Create a new `Ignore` matcher with the parent directories of `dir`.
++    ///
++    /// Note that this can only be called on an `Ignore` matcher with no
++    /// parents (i.e., `is_root` returns `true`). This will panic otherwise.
++    pub fn add_parents<P: AsRef<Path>>(
++        &self,
++        path: P,
++    ) -> (Ignore, Option<Error>) {
++        if !self.is_root() {
++            panic!("Ignore::add_parents called on non-root matcher");
++        }
++        let absolute_base = match path.as_ref().canonicalize() {
++            Ok(path) => Arc::new(path),
++            Err(_) => {
++                // There's not much we can do here, so just return our
++                // existing matcher. We drop the error to be consistent
++                // with our general pattern of ignoring I/O errors when
++                // processing ignore files.
++                return (self.clone(), None);
++            }
++        };
++        // List of parents, from child to root.
++        let mut parents = vec![];
++        let mut path = &**absolute_base;
++        while let Some(parent) = path.parent() {
++            parents.push(parent);
++            path = parent;
++        }
++        let mut errs = PartialErrorBuilder::default();
++        let mut ig = self.clone();
++        for parent in parents.into_iter().rev() {
++            let mut compiled = self.0.compiled.write().unwrap();
++            if let Some(prebuilt) = compiled.get(parent.as_os_str()) {
++                ig = prebuilt.clone();
++                continue;
++            }
++            let (mut igtmp, err) = ig.add_child_path(parent);
++            errs.maybe_push(err);
++            igtmp.is_absolute_parent = true;
++            igtmp.absolute_base = Some(absolute_base.clone());
++            ig = Ignore(Arc::new(igtmp));
++            compiled.insert(parent.as_os_str().to_os_string(), ig.clone());
++        }
++        (ig, errs.into_error_option())
++    }
++
++    /// Create a new `Ignore` matcher for the given child directory.
++    ///
++    /// Since building the matcher may require reading from multiple
++    /// files, it's possible that this method partially succeeds. Therefore,
++    /// a matcher is always returned (which may match nothing) and an error is
++    /// returned if it exists.
++    ///
++    /// Note that all I/O errors are completely ignored.
++    pub fn add_child<P: AsRef<Path>>(
++        &self,
++        dir: P,
++    ) -> (Ignore, Option<Error>) {
++        let (ig, err) = self.add_child_path(dir.as_ref());
++        (Ignore(Arc::new(ig)), err)
++    }
++
++    /// Like add_child, but takes a full path and returns an IgnoreInner.
++    fn add_child_path(&self, dir: &Path) -> (IgnoreInner, Option<Error>) {
++        static IG_NAMES: &'static [&'static str] = &[".rgignore", ".ignore"];
++
++        let mut errs = PartialErrorBuilder::default();
++        let ig_matcher =
++            if !self.0.opts.ignore {
++                Gitignore::empty()
++            } else {
++                let (m, err) = create_gitignore(&dir, IG_NAMES);
++                errs.maybe_push(err);
++                m
++            };
++        let gi_matcher =
++            if !self.0.opts.git_ignore {
++                Gitignore::empty()
++            } else {
++                let (m, err) = create_gitignore(&dir, &[".gitignore"]);
++                errs.maybe_push(err);
++                m
++            };
++        let gi_exclude_matcher =
++            if !self.0.opts.git_exclude {
++                Gitignore::empty()
++            } else {
++                let (m, err) = create_gitignore(&dir, &[".git/info/exclude"]);
++                errs.maybe_push(err);
++                m
++            };
++        let ig = IgnoreInner {
++            compiled: self.0.compiled.clone(),
++            dir: dir.to_path_buf(),
++            overrides: self.0.overrides.clone(),
++            types: self.0.types.clone(),
++            parent: Some(self.clone()),
++            is_absolute_parent: false,
++            absolute_base: self.0.absolute_base.clone(),
++            explicit_ignores: self.0.explicit_ignores.clone(),
++            ignore_matcher: ig_matcher,
++            git_global_matcher: self.0.git_global_matcher.clone(),
++            git_ignore_matcher: gi_matcher,
++            git_exclude_matcher: gi_exclude_matcher,
++            has_git: dir.join(".git").is_dir(),
++            opts: self.0.opts,
++        };
++        (ig, errs.into_error_option())
++    }
++
++    /// Returns a match indicating whether the given file path should be
++    /// ignored or not.
++    ///
++    /// The match contains information about its origin.
++    pub fn matched<'a, P: AsRef<Path>>(
++        &'a self,
++        path: P,
++        is_dir: bool,
++    ) -> Match<IgnoreMatch<'a>> {
++        // We need to be careful with our path. If it has a leading ./, then
++        // strip it because it causes nothing but trouble.
++        let mut path = path.as_ref();
++        if let Some(p) = strip_prefix("./", path) {
++            path = p;
++        }
++        // Match against the override patterns. If an override matches
++        // regardless of whether it's whitelist/ignore, then we quit and
++        // return that result immediately. Overrides have the highest
++        // precedence.
++        if !self.0.overrides.is_empty() {
++            let mat =
++                self.0.overrides.matched(path, is_dir)
++                    .map(IgnoreMatch::overrides);
++            if !mat.is_none() {
++                return mat;
++            }
++        }
++        let mut whitelisted = Match::None;
++        if self.0.opts.has_any_ignore_options() {
++            let mat = self.matched_ignore(path, is_dir);
++            if mat.is_ignore() {
++                return mat;
++            } else if mat.is_whitelist() {
++                whitelisted = mat;
++            }
++        }
++        if !self.0.types.is_empty() {
++            let mat =
++                self.0.types.matched(path, is_dir).map(IgnoreMatch::types);
++            if mat.is_ignore() {
++                return mat;
++            } else if mat.is_whitelist() {
++                whitelisted = mat;
++            }
++        }
++        if whitelisted.is_none() && self.0.opts.hidden && is_hidden(path) {
++            return Match::Ignore(IgnoreMatch::hidden());
++        }
++        whitelisted
++    }
++
++    /// Performs matching only on the ignore files for this directory and
++    /// all parent directories.
++    fn matched_ignore<'a>(
++        &'a self,
++        path: &Path,
++        is_dir: bool,
++    ) -> Match<IgnoreMatch<'a>> {
++        let (mut m_ignore, mut m_gi, mut m_gi_exclude, mut m_explicit) =
++            (Match::None, Match::None, Match::None, Match::None);
++        let mut saw_git = false;
++        for ig in self.parents().take_while(|ig| !ig.0.is_absolute_parent) {
++            if m_ignore.is_none() {
++                m_ignore =
++                    ig.0.ignore_matcher.matched(path, is_dir)
++                      .map(IgnoreMatch::gitignore);
++            }
++            if !saw_git && m_gi.is_none() {
++                m_gi =
++                    ig.0.git_ignore_matcher.matched(path, is_dir)
++                      .map(IgnoreMatch::gitignore);
++            }
++            if !saw_git && m_gi_exclude.is_none() {
++                m_gi_exclude =
++                    ig.0.git_exclude_matcher.matched(path, is_dir)
++                      .map(IgnoreMatch::gitignore);
++            }
++            saw_git = saw_git || ig.0.has_git;
++        }
++        if let Some(abs_parent_path) = self.absolute_base() {
++            let path = abs_parent_path.join(path);
++            for ig in self.parents().skip_while(|ig|!ig.0.is_absolute_parent) {
++                if m_ignore.is_none() {
++                    m_ignore =
++                        ig.0.ignore_matcher.matched(&path, is_dir)
++                          .map(IgnoreMatch::gitignore);
++                }
++                if !saw_git && m_gi.is_none() {
++                    m_gi =
++                        ig.0.git_ignore_matcher.matched(&path, is_dir)
++                          .map(IgnoreMatch::gitignore);
++                }
++                if !saw_git && m_gi_exclude.is_none() {
++                    m_gi_exclude =
++                        ig.0.git_exclude_matcher.matched(&path, is_dir)
++                          .map(IgnoreMatch::gitignore);
++                }
++                saw_git = saw_git || ig.0.has_git;
++            }
++        }
++        for gi in self.0.explicit_ignores.iter().rev() {
++            if !m_explicit.is_none() {
++                break;
++            }
++            m_explicit = gi.matched(&path, is_dir).map(IgnoreMatch::gitignore);
++        }
++        let m_global = self.0.git_global_matcher.matched(&path, is_dir)
++                           .map(IgnoreMatch::gitignore);
++
++        m_ignore.or(m_gi).or(m_gi_exclude).or(m_global).or(m_explicit)
++    }
++
++    /// Returns an iterator over parent ignore matchers, including this one.
++    pub fn parents(&self) -> Parents {
++        Parents(Some(self))
++    }
++
++    /// Returns the first absolute path of the first absolute parent, if
++    /// one exists.
++    fn absolute_base(&self) -> Option<&Path> {
++        self.0.absolute_base.as_ref().map(|p| &***p)
++    }
++}
++
++/// An iterator over all parents of an ignore matcher, including itself.
++///
++/// The lifetime `'a` refers to the lifetime of the initial `Ignore` matcher.
++pub struct Parents<'a>(Option<&'a Ignore>);
++
++impl<'a> Iterator for Parents<'a> {
++    type Item = &'a Ignore;
++
++    fn next(&mut self) -> Option<&'a Ignore> {
++        match self.0.take() {
++            None => None,
++            Some(ig) => {
++                self.0 = ig.0.parent.as_ref();
++                Some(ig)
++            }
++        }
++    }
++}
++
++/// A builder for creating an Ignore matcher.
++#[derive(Clone, Debug)]
++pub struct IgnoreBuilder {
++    /// The root directory path for this ignore matcher.
++    dir: PathBuf,
++    /// An override matcher (default is empty).
++    overrides: Arc<Override>,
++    /// A type matcher (default is empty).
++    types: Arc<Types>,
++    /// Explicit ignore matchers.
++    explicit_ignores: Vec<Gitignore>,
++    /// Ignore config.
++    opts: IgnoreOptions,
++}
++
++impl IgnoreBuilder {
++    /// Create a new builder for an `Ignore` matcher.
++    ///
++    /// All relative file paths are resolved with respect to the current
++    /// working directory.
++    pub fn new() -> IgnoreBuilder {
++        IgnoreBuilder {
++            dir: Path::new("").to_path_buf(),
++            overrides: Arc::new(Override::empty()),
++            types: Arc::new(Types::empty()),
++            explicit_ignores: vec![],
++            opts: IgnoreOptions {
++                hidden: true,
++                ignore: true,
++                git_global: true,
++                git_ignore: true,
++                git_exclude: true,
++            },
++        }
++    }
++
++    /// Builds a new `Ignore` matcher.
++    ///
++    /// The matcher returned won't match anything until ignore rules from
++    /// directories are added to it.
++    pub fn build(&self) -> Ignore {
++        let git_global_matcher =
++            if !self.opts.git_global {
++                Gitignore::empty()
++            } else {
++                let (gi, err) = Gitignore::global();
++                if let Some(err) = err {
++                    debug!("{}", err);
++                }
++                gi
++            };
++        Ignore(Arc::new(IgnoreInner {
++            compiled: Arc::new(RwLock::new(HashMap::new())),
++            dir: self.dir.clone(),
++            overrides: self.overrides.clone(),
++            types: self.types.clone(),
++            parent: None,
++            is_absolute_parent: true,
++            absolute_base: None,
++            explicit_ignores: Arc::new(self.explicit_ignores.clone()),
++            ignore_matcher: Gitignore::empty(),
++            git_global_matcher: Arc::new(git_global_matcher),
++            git_ignore_matcher: Gitignore::empty(),
++            git_exclude_matcher: Gitignore::empty(),
++            has_git: false,
++            opts: self.opts,
++        }))
++    }
++
++    /// Add an override matcher.
++    ///
++    /// By default, no override matcher is used.
++    ///
++    /// This overrides any previous setting.
++    pub fn overrides(&mut self, overrides: Override) -> &mut IgnoreBuilder {
++        self.overrides = Arc::new(overrides);
++        self
++    }
++
++    /// Add a file type matcher.
++    ///
++    /// By default, no file type matcher is used.
++    ///
++    /// This overrides any previous setting.
++    pub fn types(&mut self, types: Types) -> &mut IgnoreBuilder {
++        self.types = Arc::new(types);
++        self
++    }
++
++    /// Adds a new global ignore matcher from the ignore file path given.
++    pub fn add_ignore(&mut self, ig: Gitignore) -> &mut IgnoreBuilder {
++        self.explicit_ignores.push(ig);
++        self
++    }
++
++    /// Enables ignoring hidden files.
++    ///
++    /// This is enabled by default.
++    pub fn hidden(&mut self, yes: bool) -> &mut IgnoreBuilder {
++        self.opts.hidden = yes;
++        self
++    }
++
++    /// Enables reading `.ignore` files.
++    ///
++    /// `.ignore` files have the same semantics as `gitignore` files and are
++    /// supported by search tools such as ripgrep and The Silver Searcher.
++    ///
++    /// This is enabled by default.
++    pub fn ignore(&mut self, yes: bool) -> &mut IgnoreBuilder {
++        self.opts.ignore = yes;
++        self
++    }
++
++    /// Add a global gitignore matcher.
++    ///
++    /// Its precedence is lower than both normal `.gitignore` files and
++    /// `.git/info/exclude` files.
++    ///
++    /// This overwrites any previous global gitignore setting.
++    ///
++    /// This is enabled by default.
++    pub fn git_global(&mut self, yes: bool) -> &mut IgnoreBuilder {
++        self.opts.git_global = yes;
++        self
++    }
++
++    /// Enables reading `.gitignore` files.
++    ///
++    /// `.gitignore` files have match semantics as described in the `gitignore`
++    /// man page.
++    ///
++    /// This is enabled by default.
++    pub fn git_ignore(&mut self, yes: bool) -> &mut IgnoreBuilder {
++        self.opts.git_ignore = yes;
++        self
++    }
++
++    /// Enables reading `.git/info/exclude` files.
++    ///
++    /// `.git/info/exclude` files have match semantics as described in the
++    /// `gitignore` man page.
++    ///
++    /// This is enabled by default.
++    pub fn git_exclude(&mut self, yes: bool) -> &mut IgnoreBuilder {
++        self.opts.git_exclude = yes;
++        self
++    }
++}
++
++/// Creates a new gitignore matcher for the directory given.
++///
++/// Ignore globs are extracted from each of the file names in `dir` in the
++/// order given (earlier names have lower precedence than later names).
++///
++/// I/O errors are ignored.
++pub fn create_gitignore(
++    dir: &Path,
++    names: &[&str],
++) -> (Gitignore, Option<Error>) {
++    let mut builder = GitignoreBuilder::new(dir);
++    let mut errs = PartialErrorBuilder::default();
++    for name in names {
++        let gipath = dir.join(name);
++        errs.maybe_push_ignore_io(builder.add(gipath));
++    }
++    let gi = match builder.build() {
++        Ok(gi) => gi,
++        Err(err) => {
++            errs.push(err);
++            GitignoreBuilder::new(dir).build().unwrap()
++        }
++    };
++    (gi, errs.into_error_option())
++}
++
++#[cfg(test)]
++mod tests {
++    use std::fs::{self, File};
++    use std::io::Write;
++    use std::path::Path;
++
++    use tempdir::TempDir;
++
++    use dir::IgnoreBuilder;
++    use gitignore::Gitignore;
++    use Error;
++
++    fn wfile<P: AsRef<Path>>(path: P, contents: &str) {
++        let mut file = File::create(path).unwrap();
++        file.write_all(contents.as_bytes()).unwrap();
++    }
++
++    fn mkdirp<P: AsRef<Path>>(path: P) {
++        fs::create_dir_all(path).unwrap();
++    }
++
++    fn partial(err: Error) -> Vec<Error> {
++        match err {
++            Error::Partial(errs) => errs,
++            _ => panic!("expected partial error but got {:?}", err),
++        }
++    }
++
++    #[test]
++    fn explicit_ignore() {
++        let td = TempDir::new("ignore-test-").unwrap();
++        wfile(td.path().join("not-an-ignore"), "foo\n!bar");
++
++        let (gi, err) = Gitignore::new(td.path().join("not-an-ignore"));
++        assert!(err.is_none());
++        let (ig, err) = IgnoreBuilder::new()
++            .add_ignore(gi).build().add_child(td.path());
++        assert!(err.is_none());
++        assert!(ig.matched("foo", false).is_ignore());
++        assert!(ig.matched("bar", false).is_whitelist());
++        assert!(ig.matched("baz", false).is_none());
++    }
++
++    #[test]
++    fn git_exclude() {
++        let td = TempDir::new("ignore-test-").unwrap();
++        mkdirp(td.path().join(".git/info"));
++        wfile(td.path().join(".git/info/exclude"), "foo\n!bar");
++
++        let (ig, err) = IgnoreBuilder::new().build().add_child(td.path());
++        assert!(err.is_none());
++        assert!(ig.matched("foo", false).is_ignore());
++        assert!(ig.matched("bar", false).is_whitelist());
++        assert!(ig.matched("baz", false).is_none());
++    }
++
++    #[test]
++    fn gitignore() {
++        let td = TempDir::new("ignore-test-").unwrap();
++        wfile(td.path().join(".gitignore"), "foo\n!bar");
++
++        let (ig, err) = IgnoreBuilder::new().build().add_child(td.path());
++        assert!(err.is_none());
++        assert!(ig.matched("foo", false).is_ignore());
++        assert!(ig.matched("bar", false).is_whitelist());
++        assert!(ig.matched("baz", false).is_none());
++    }
++
++    #[test]
++    fn ignore() {
++        let td = TempDir::new("ignore-test-").unwrap();
++        wfile(td.path().join(".ignore"), "foo\n!bar");
++
++        let (ig, err) = IgnoreBuilder::new().build().add_child(td.path());
++        assert!(err.is_none());
++        assert!(ig.matched("foo", false).is_ignore());
++        assert!(ig.matched("bar", false).is_whitelist());
++        assert!(ig.matched("baz", false).is_none());
++    }
++
++    // Tests that an .ignore will override a .gitignore.
++    #[test]
++    fn ignore_over_gitignore() {
++        let td = TempDir::new("ignore-test-").unwrap();
++        wfile(td.path().join(".gitignore"), "foo");
++        wfile(td.path().join(".ignore"), "!foo");
++
++        let (ig, err) = IgnoreBuilder::new().build().add_child(td.path());
++        assert!(err.is_none());
++        assert!(ig.matched("foo", false).is_whitelist());
++    }
++
++    // Tests that exclude has lower precedent than both .ignore and .gitignore.
++    #[test]
++    fn exclude_lowest() {
++        let td = TempDir::new("ignore-test-").unwrap();
++        wfile(td.path().join(".gitignore"), "!foo");
++        wfile(td.path().join(".ignore"), "!bar");
++        mkdirp(td.path().join(".git/info"));
++        wfile(td.path().join(".git/info/exclude"), "foo\nbar\nbaz");
++
++        let (ig, err) = IgnoreBuilder::new().build().add_child(td.path());
++        assert!(err.is_none());
++        assert!(ig.matched("baz", false).is_ignore());
++        assert!(ig.matched("foo", false).is_whitelist());
++        assert!(ig.matched("bar", false).is_whitelist());
++    }
++
++    #[test]
++    fn errored() {
++        let td = TempDir::new("ignore-test-").unwrap();
++        wfile(td.path().join(".gitignore"), "f**oo");
++
++        let (_, err) = IgnoreBuilder::new().build().add_child(td.path());
++        assert!(err.is_some());
++    }
++
++    #[test]
++    fn errored_both() {
++        let td = TempDir::new("ignore-test-").unwrap();
++        wfile(td.path().join(".gitignore"), "f**oo");
++        wfile(td.path().join(".ignore"), "fo**o");
++
++        let (_, err) = IgnoreBuilder::new().build().add_child(td.path());
++        assert_eq!(2, partial(err.expect("an error")).len());
++    }
++
++    #[test]
++    fn errored_partial() {
++        let td = TempDir::new("ignore-test-").unwrap();
++        wfile(td.path().join(".gitignore"), "f**oo\nbar");
++
++        let (ig, err) = IgnoreBuilder::new().build().add_child(td.path());
++        assert!(err.is_some());
++        assert!(ig.matched("bar", false).is_ignore());
++    }
++
++    #[test]
++    fn errored_partial_and_ignore() {
++        let td = TempDir::new("ignore-test-").unwrap();
++        wfile(td.path().join(".gitignore"), "f**oo\nbar");
++        wfile(td.path().join(".ignore"), "!bar");
++
++        let (ig, err) = IgnoreBuilder::new().build().add_child(td.path());
++        assert!(err.is_some());
++        assert!(ig.matched("bar", false).is_whitelist());
++    }
++
++    #[test]
++    fn not_present_empty() {
++        let td = TempDir::new("ignore-test-").unwrap();
++
++        let (_, err) = IgnoreBuilder::new().build().add_child(td.path());
++        assert!(err.is_none());
++    }
++
++    #[test]
++    fn stops_at_git_dir() {
++        // This tests that .gitignore files beyond a .git barrier aren't
++        // matched, but .ignore files are.
++        let td = TempDir::new("ignore-test-").unwrap();
++        mkdirp(td.path().join(".git"));
++        mkdirp(td.path().join("foo/.git"));
++        wfile(td.path().join(".gitignore"), "foo");
++        wfile(td.path().join(".ignore"), "bar");
++
++        let ig0 = IgnoreBuilder::new().build();
++        let (ig1, err) = ig0.add_child(td.path());
++        assert!(err.is_none());
++        let (ig2, err) = ig1.add_child(ig1.path().join("foo"));
++        assert!(err.is_none());
++
++        assert!(ig1.matched("foo", false).is_ignore());
++        assert!(ig2.matched("foo", false).is_none());
++
++        assert!(ig1.matched("bar", false).is_ignore());
++        assert!(ig2.matched("bar", false).is_ignore());
++    }
++
++    #[test]
++    fn absolute_parent() {
++        let td = TempDir::new("ignore-test-").unwrap();
++        mkdirp(td.path().join(".git"));
++        mkdirp(td.path().join("foo"));
++        wfile(td.path().join(".gitignore"), "bar");
++
++        // First, check that the parent gitignore file isn't detected if the
++        // parent isn't added. This establishes a baseline.
++        let ig0 = IgnoreBuilder::new().build();
++        let (ig1, err) = ig0.add_child(td.path().join("foo"));
++        assert!(err.is_none());
++        assert!(ig1.matched("bar", false).is_none());
++
++        // Second, check that adding a parent directory actually works.
++        let ig0 = IgnoreBuilder::new().build();
++        let (ig1, err) = ig0.add_parents(td.path().join("foo"));
++        assert!(err.is_none());
++        let (ig2, err) = ig1.add_child(td.path().join("foo"));
++        assert!(err.is_none());
++        assert!(ig2.matched("bar", false).is_ignore());
++    }
++
++    #[test]
++    fn absolute_parent_anchored() {
++        let td = TempDir::new("ignore-test-").unwrap();
++        mkdirp(td.path().join(".git"));
++        mkdirp(td.path().join("src/llvm"));
++        wfile(td.path().join(".gitignore"), "/llvm/\nfoo");
++
++        let ig0 = IgnoreBuilder::new().build();
++        let (ig1, err) = ig0.add_parents(td.path().join("src"));
++        assert!(err.is_none());
++        let (ig2, err) = ig1.add_child("src");
++        assert!(err.is_none());
++
++        assert!(ig1.matched("llvm", true).is_none());
++        assert!(ig2.matched("llvm", true).is_none());
++        assert!(ig2.matched("src/llvm", true).is_none());
++        assert!(ig2.matched("foo", false).is_ignore());
++        assert!(ig2.matched("src/foo", false).is_ignore());
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..85109559c17b6b70f4c0bbb3ae706dfe63c96fad
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,692 @@@
++/*!
++The gitignore module provides a way to match globs from a gitignore file
++against file paths.
++
++Note that this module implements the specification as described in the
++`gitignore` man page from scratch. That is, this module does *not* shell out to
++the `git` command line tool.
++*/
++
++use std::cell::RefCell;
++use std::env;
++use std::fs::File;
++use std::io::{self, BufRead, Read};
++use std::path::{Path, PathBuf};
++use std::str;
++use std::sync::Arc;
++
++use globset::{Candidate, GlobBuilder, GlobSet, GlobSetBuilder};
++use regex::bytes::Regex;
++use thread_local::ThreadLocal;
++
++use pathutil::{is_file_name, strip_prefix};
++use {Error, Match, PartialErrorBuilder};
++
++/// Glob represents a single glob in a gitignore file.
++///
++/// This is used to report information about the highest precedent glob that
++/// matched in one or more gitignore files.
++#[derive(Clone, Debug)]
++pub struct Glob {
++    /// The file path that this glob was extracted from.
++    from: Option<PathBuf>,
++    /// The original glob string.
++    original: String,
++    /// The actual glob string used to convert to a regex.
++    actual: String,
++    /// Whether this is a whitelisted glob or not.
++    is_whitelist: bool,
++    /// Whether this glob should only match directories or not.
++    is_only_dir: bool,
++}
++
++impl Glob {
++    /// Returns the file path that defined this glob.
++    pub fn from(&self) -> Option<&Path> {
++        self.from.as_ref().map(|p| &**p)
++    }
++
++    /// The original glob as it was defined in a gitignore file.
++    pub fn original(&self) -> &str {
++        &self.original
++    }
++
++    /// The actual glob that was compiled to respect gitignore
++    /// semantics.
++    pub fn actual(&self) -> &str {
++        &self.actual
++    }
++
++    /// Whether this was a whitelisted glob or not.
++    pub fn is_whitelist(&self) -> bool {
++        self.is_whitelist
++    }
++
++    /// Whether this glob must match a directory or not.
++    pub fn is_only_dir(&self) -> bool {
++        self.is_only_dir
++    }
++}
++
++/// Gitignore is a matcher for the globs in one or more gitignore files
++/// in the same directory.
++#[derive(Clone, Debug)]
++pub struct Gitignore {
++    set: GlobSet,
++    root: PathBuf,
++    globs: Vec<Glob>,
++    num_ignores: u64,
++    num_whitelists: u64,
++    matches: Arc<ThreadLocal<RefCell<Vec<usize>>>>,
++}
++
++impl Gitignore {
++    /// Creates a new gitignore matcher from the gitignore file path given.
++    ///
++    /// If it's desirable to include multiple gitignore files in a single
++    /// matcher, or read gitignore globs from a different source, then
++    /// use `GitignoreBuilder`.
++    ///
++    /// This always returns a valid matcher, even if it's empty. In particular,
++    /// a Gitignore file can be partially valid, e.g., when one glob is invalid
++    /// but the rest aren't.
++    ///
++    /// Note that I/O errors are ignored. For more granular control over
++    /// errors, use `GitignoreBuilder`.
++    pub fn new<P: AsRef<Path>>(
++        gitignore_path: P,
++    ) -> (Gitignore, Option<Error>) {
++        let path = gitignore_path.as_ref();
++        let parent = path.parent().unwrap_or(Path::new("/"));
++        let mut builder = GitignoreBuilder::new(parent);
++        let mut errs = PartialErrorBuilder::default();
++        errs.maybe_push_ignore_io(builder.add(path));
++        match builder.build() {
++            Ok(gi) => (gi, errs.into_error_option()),
++            Err(err) => {
++                errs.push(err);
++                (Gitignore::empty(), errs.into_error_option())
++            }
++        }
++    }
++
++    /// Creates a new gitignore matcher from the global ignore file, if one
++    /// exists.
++    ///
++    /// The global config file path is specified by git's `core.excludesFile`
++    /// config option.
++    ///
++    /// Git's config file location is `$HOME/.gitconfig`. If `$HOME/.gitconfig`
++    /// does not exist or does not specify `core.excludesFile`, then
++    /// `$XDG_CONFIG_HOME/git/ignore` is read. If `$XDG_CONFIG_HOME` is not
++    /// set or is empty, then `$HOME/.config/git/ignore` is used instead.
++    pub fn global() -> (Gitignore, Option<Error>) {
++        match gitconfig_excludes_path() {
++            None => (Gitignore::empty(), None),
++            Some(path) => {
++                if !path.is_file() {
++                    (Gitignore::empty(), None)
++                } else {
++                    Gitignore::new(path)
++                }
++            }
++        }
++    }
++
++    /// Creates a new empty gitignore matcher that never matches anything.
++    ///
++    /// Its path is empty.
++    pub fn empty() -> Gitignore {
++        GitignoreBuilder::new("").build().unwrap()
++    }
++
++    /// Returns the directory containing this gitignore matcher.
++    ///
++    /// All matches are done relative to this path.
++    pub fn path(&self) -> &Path {
++        &*self.root
++    }
++
++    /// Returns true if and only if this gitignore has zero globs, and
++    /// therefore never matches any file path.
++    pub fn is_empty(&self) -> bool {
++        self.set.is_empty()
++    }
++
++    /// Returns the total number of globs, which should be equivalent to
++    /// `num_ignores + num_whitelists`.
++    pub fn len(&self) -> usize {
++        self.set.len()
++    }
++
++    /// Returns the total number of ignore globs.
++    pub fn num_ignores(&self) -> u64 {
++        self.num_ignores
++    }
++
++    /// Returns the total number of whitelisted globs.
++    pub fn num_whitelists(&self) -> u64 {
++        self.num_whitelists
++    }
++
++    /// Returns whether the given path (file or directory) matched a pattern in
++    /// this gitignore matcher.
++    ///
++    /// `is_dir` should be true if the path refers to a directory and false
++    /// otherwise.
++    ///
++    /// The given path is matched relative to the path given when building
++    /// the matcher. Specifically, before matching `path`, its prefix (as
++    /// determined by a common suffix of the directory containing this
++    /// gitignore) is stripped. If there is no common suffix/prefix overlap,
++    /// then `path` is assumed to be relative to this matcher.
++    pub fn matched<P: AsRef<Path>>(
++        &self,
++        path: P,
++        is_dir: bool,
++    ) -> Match<&Glob> {
++        if self.is_empty() {
++            return Match::None;
++        }
++        self.matched_stripped(self.strip(path.as_ref()), is_dir)
++    }
++
++    /// Returns whether the given path (file or directory, and expected to be
++    /// under the root) or any of its parent directories (up to the root)
++    /// matched a pattern in this gitignore matcher.
++    ///
++    /// NOTE: This method is more expensive than walking the directory hierarchy
++    /// top-to-bottom and matching the entries. But, is easier to use in cases
++    /// when a list of paths are available without a hierarchy.
++    ///
++    /// `is_dir` should be true if the path refers to a directory and false
++    /// otherwise.
++    ///
++    /// The given path is matched relative to the path given when building
++    /// the matcher. Specifically, before matching `path`, its prefix (as
++    /// determined by a common suffix of the directory containing this
++    /// gitignore) is stripped. If there is no common suffix/prefix overlap,
++    /// then `path` is assumed to be relative to this matcher.
++    pub fn matched_path_or_any_parents<P: AsRef<Path>>(
++        &self,
++        path: P,
++        is_dir: bool,
++    ) -> Match<&Glob> {
++        if self.is_empty() {
++            return Match::None;
++        }
++        let mut path = self.strip(path.as_ref());
++        debug_assert!(
++            !path.has_root(),
++            "path is expect to be under the root"
++        );
++        match self.matched_stripped(path, is_dir) {
++            Match::None => (), // walk up
++            a_match => return a_match,
++        }
++        while let Some(parent) = path.parent() {
++            match self.matched_stripped(parent, /* is_dir */ true) {
++                Match::None => path = parent, // walk up
++                a_match => return a_match,
++            }
++        }
++        Match::None
++    }
++
++    /// Like matched, but takes a path that has already been stripped.
++    fn matched_stripped<P: AsRef<Path>>(
++        &self,
++        path: P,
++        is_dir: bool,
++    ) -> Match<&Glob> {
++        if self.is_empty() {
++            return Match::None;
++        }
++        let path = path.as_ref();
++        let _matches = self.matches.get_default();
++        let mut matches = _matches.borrow_mut();
++        let candidate = Candidate::new(path);
++        self.set.matches_candidate_into(&candidate, &mut *matches);
++        for &i in matches.iter().rev() {
++            let glob = &self.globs[i];
++            if !glob.is_only_dir() || is_dir {
++                return if glob.is_whitelist() {
++                    Match::Whitelist(glob)
++                } else {
++                    Match::Ignore(glob)
++                };
++            }
++        }
++        Match::None
++    }
++
++    /// Strips the given path such that it's suitable for matching with this
++    /// gitignore matcher.
++    fn strip<'a, P: 'a + AsRef<Path> + ?Sized>(
++        &'a self,
++        path: &'a P,
++    ) -> &'a Path {
++        let mut path = path.as_ref();
++        // A leading ./ is completely superfluous. We also strip it from
++        // our gitignore root path, so we need to strip it from our candidate
++        // path too.
++        if let Some(p) = strip_prefix("./", path) {
++            path = p;
++        }
++        // Strip any common prefix between the candidate path and the root
++        // of the gitignore, to make sure we get relative matching right.
++        // BUT, a file name might not have any directory components to it,
++        // in which case, we don't want to accidentally strip any part of the
++        // file name.
++        if !is_file_name(path) {
++            if let Some(p) = strip_prefix(&self.root, path) {
++                path = p;
++                // If we're left with a leading slash, get rid of it.
++                if let Some(p) = strip_prefix("/", path) {
++                    path = p;
++                }
++            }
++        }
++        path
++    }
++}
++
++/// Builds a matcher for a single set of globs from a .gitignore file.
++pub struct GitignoreBuilder {
++    builder: GlobSetBuilder,
++    root: PathBuf,
++    globs: Vec<Glob>,
++    case_insensitive: bool,
++}
++
++impl GitignoreBuilder {
++    /// Create a new builder for a gitignore file.
++    ///
++    /// The path given should be the path at which the globs for this gitignore
++    /// file should be matched. Note that paths are always matched relative
++    /// to the root path given here. Generally, the root path should correspond
++    /// to the *directory* containing a `.gitignore` file.
++    pub fn new<P: AsRef<Path>>(root: P) -> GitignoreBuilder {
++        let root = root.as_ref();
++        GitignoreBuilder {
++            builder: GlobSetBuilder::new(),
++            root: strip_prefix("./", root).unwrap_or(root).to_path_buf(),
++            globs: vec![],
++            case_insensitive: false,
++        }
++    }
++
++    /// Builds a new matcher from the globs added so far.
++    ///
++    /// Once a matcher is built, no new globs can be added to it.
++    pub fn build(&self) -> Result<Gitignore, Error> {
++        let nignore = self.globs.iter().filter(|g| !g.is_whitelist()).count();
++        let nwhite = self.globs.iter().filter(|g| g.is_whitelist()).count();
++        let set = try!(
++            self.builder.build().map_err(|err| {
++                Error::Glob {
++                    glob: None,
++                    err: err.to_string(),
++                }
++            }));
++        Ok(Gitignore {
++            set: set,
++            root: self.root.clone(),
++            globs: self.globs.clone(),
++            num_ignores: nignore as u64,
++            num_whitelists: nwhite as u64,
++            matches: Arc::new(ThreadLocal::default()),
++        })
++    }
++
++    /// Add each glob from the file path given.
++    ///
++    /// The file given should be formatted as a `gitignore` file.
++    ///
++    /// Note that partial errors can be returned. For example, if there was
++    /// a problem adding one glob, an error for that will be returned, but
++    /// all other valid globs will still be added.
++    pub fn add<P: AsRef<Path>>(&mut self, path: P) -> Option<Error> {
++        let path = path.as_ref();
++        let file = match File::open(path) {
++            Err(err) => return Some(Error::Io(err).with_path(path)),
++            Ok(file) => file,
++        };
++        let rdr = io::BufReader::new(file);
++        let mut errs = PartialErrorBuilder::default();
++        for (i, line) in rdr.lines().enumerate() {
++            let lineno = (i + 1) as u64;
++            let line = match line {
++                Ok(line) => line,
++                Err(err) => {
++                    errs.push(Error::Io(err).tagged(path, lineno));
++                    break;
++                }
++            };
++            if let Err(err) = self.add_line(Some(path.to_path_buf()), &line) {
++                errs.push(err.tagged(path, lineno));
++            }
++        }
++        errs.into_error_option()
++    }
++
++    /// Add each glob line from the string given.
++    ///
++    /// If this string came from a particular `gitignore` file, then its path
++    /// should be provided here.
++    ///
++    /// The string given should be formatted as a `gitignore` file.
++    #[cfg(test)]
++    fn add_str(
++        &mut self,
++        from: Option<PathBuf>,
++        gitignore: &str,
++    ) -> Result<&mut GitignoreBuilder, Error> {
++        for line in gitignore.lines() {
++            try!(self.add_line(from.clone(), line));
++        }
++        Ok(self)
++    }
++
++    /// Add a line from a gitignore file to this builder.
++    ///
++    /// If this line came from a particular `gitignore` file, then its path
++    /// should be provided here.
++    ///
++    /// If the line could not be parsed as a glob, then an error is returned.
++    pub fn add_line(
++        &mut self,
++        from: Option<PathBuf>,
++        mut line: &str,
++    ) -> Result<&mut GitignoreBuilder, Error> {
++        if line.starts_with("#") {
++            return Ok(self);
++        }
++        if !line.ends_with("\\ ") {
++            line = line.trim_right();
++        }
++        if line.is_empty() {
++            return Ok(self);
++        }
++        let mut glob = Glob {
++            from: from,
++            original: line.to_string(),
++            actual: String::new(),
++            is_whitelist: false,
++            is_only_dir: false,
++        };
++        let mut literal_separator = false;
++        let has_slash = line.chars().any(|c| c == '/');
++        let mut is_absolute = false;
++        if line.starts_with("\\!") || line.starts_with("\\#") {
++            line = &line[1..];
++            is_absolute = line.chars().nth(0) == Some('/');
++        } else {
++            if line.starts_with("!") {
++                glob.is_whitelist = true;
++                line = &line[1..];
++            }
++            if line.starts_with("/") {
++                // `man gitignore` says that if a glob starts with a slash,
++                // then the glob can only match the beginning of a path
++                // (relative to the location of gitignore). We achieve this by
++                // simply banning wildcards from matching /.
++                literal_separator = true;
++                line = &line[1..];
++                is_absolute = true;
++            }
++        }
++        // If it ends with a slash, then this should only match directories,
++        // but the slash should otherwise not be used while globbing.
++        if let Some((i, c)) = line.char_indices().rev().nth(0) {
++            if c == '/' {
++                glob.is_only_dir = true;
++                line = &line[..i];
++            }
++        }
++        // If there is a literal slash, then we note that so that globbing
++        // doesn't let wildcards match slashes.
++        glob.actual = line.to_string();
++        if has_slash {
++            literal_separator = true;
++        }
++        // If there was a leading slash, then this is a glob that must
++        // match the entire path name. Otherwise, we should let it match
++        // anywhere, so use a **/ prefix.
++        if !is_absolute {
++            // ... but only if we don't already have a **/ prefix.
++            if !glob.actual.starts_with("**/") {
++                glob.actual = format!("**/{}", glob.actual);
++            }
++        }
++        // If the glob ends with `/**`, then we should only match everything
++        // inside a directory, but not the directory itself. Standard globs
++        // will match the directory. So we add `/*` to force the issue.
++        if glob.actual.ends_with("/**") {
++            glob.actual = format!("{}/*", glob.actual);
++        }
++        let parsed = try!(
++            GlobBuilder::new(&glob.actual)
++                .literal_separator(literal_separator)
++                .case_insensitive(self.case_insensitive)
++                .build()
++                .map_err(|err| {
++                    Error::Glob {
++                        glob: Some(glob.original.clone()),
++                        err: err.kind().to_string(),
++                    }
++                }));
++        self.builder.add(parsed);
++        self.globs.push(glob);
++        Ok(self)
++    }
++
++    /// Toggle whether the globs should be matched case insensitively or not.
++    ///
++    /// This is disabled by default.
++    pub fn case_insensitive(
++        &mut self, yes: bool
++    ) -> Result<&mut GitignoreBuilder, Error> {
++        self.case_insensitive = yes;
++        Ok(self)
++    }
++}
++
++/// Return the file path of the current environment's global gitignore file.
++///
++/// Note that the file path returned may not exist.
++fn gitconfig_excludes_path() -> Option<PathBuf> {
++    gitconfig_contents()
++        .and_then(|data| parse_excludes_file(&data))
++        .or_else(excludes_file_default)
++}
++
++/// Returns the file contents of git's global config file, if one exists.
++fn gitconfig_contents() -> Option<Vec<u8>> {
++    let home = match env::var_os("HOME") {
++        None => return None,
++        Some(home) => PathBuf::from(home),
++    };
++    let mut file = match File::open(home.join(".gitconfig")) {
++        Err(_) => return None,
++        Ok(file) => io::BufReader::new(file),
++    };
++    let mut contents = vec![];
++    file.read_to_end(&mut contents).ok().map(|_| contents)
++}
++
++/// Returns the default file path for a global .gitignore file.
++///
++/// Specifically, this respects XDG_CONFIG_HOME.
++fn excludes_file_default() -> Option<PathBuf> {
++    env::var_os("XDG_CONFIG_HOME")
++        .and_then(|x| if x.is_empty() { None } else { Some(PathBuf::from(x)) })
++        .or_else(|| env::home_dir().map(|p| p.join(".config")))
++        .map(|x| x.join("git/ignore"))
++}
++
++/// Extract git's `core.excludesfile` config setting from the raw file contents
++/// given.
++fn parse_excludes_file(data: &[u8]) -> Option<PathBuf> {
++    // N.B. This is the lazy approach, and isn't technically correct, but
++    // probably works in more circumstances. I guess we would ideally have
++    // a full INI parser. Yuck.
++    lazy_static! {
++        static ref RE: Regex = Regex::new(
++            r"(?ium)^\s*excludesfile\s*=\s*(.+)\s*$").unwrap();
++    };
++    let caps = match RE.captures(data) {
++        None => return None,
++        Some(caps) => caps,
++    };
++    str::from_utf8(&caps[1]).ok().map(|s| PathBuf::from(expand_tilde(s)))
++}
++
++/// Expands ~ in file paths to the value of $HOME.
++fn expand_tilde(path: &str) -> String {
++    let home = match env::var("HOME") {
++        Err(_) => return path.to_string(),
++        Ok(home) => home,
++    };
++    path.replace("~", &home)
++}
++
++#[cfg(test)]
++mod tests {
++    use std::path::Path;
++    use super::{Gitignore, GitignoreBuilder};
++
++    fn gi_from_str<P: AsRef<Path>>(root: P, s: &str) -> Gitignore {
++        let mut builder = GitignoreBuilder::new(root);
++        builder.add_str(None, s).unwrap();
++        builder.build().unwrap()
++    }
++
++    macro_rules! ignored {
++        ($name:ident, $root:expr, $gi:expr, $path:expr) => {
++            ignored!($name, $root, $gi, $path, false);
++        };
++        ($name:ident, $root:expr, $gi:expr, $path:expr, $is_dir:expr) => {
++            #[test]
++            fn $name() {
++                let gi = gi_from_str($root, $gi);
++                assert!(gi.matched($path, $is_dir).is_ignore());
++            }
++        };
++    }
++
++    macro_rules! not_ignored {
++        ($name:ident, $root:expr, $gi:expr, $path:expr) => {
++            not_ignored!($name, $root, $gi, $path, false);
++        };
++        ($name:ident, $root:expr, $gi:expr, $path:expr, $is_dir:expr) => {
++            #[test]
++            fn $name() {
++                let gi = gi_from_str($root, $gi);
++                assert!(!gi.matched($path, $is_dir).is_ignore());
++            }
++        };
++    }
++
++    const ROOT: &'static str = "/home/foobar/rust/rg";
++
++    ignored!(ig1, ROOT, "months", "months");
++    ignored!(ig2, ROOT, "*.lock", "Cargo.lock");
++    ignored!(ig3, ROOT, "*.rs", "src/main.rs");
++    ignored!(ig4, ROOT, "src/*.rs", "src/main.rs");
++    ignored!(ig5, ROOT, "/*.c", "cat-file.c");
++    ignored!(ig6, ROOT, "/src/*.rs", "src/main.rs");
++    ignored!(ig7, ROOT, "!src/main.rs\n*.rs", "src/main.rs");
++    ignored!(ig8, ROOT, "foo/", "foo", true);
++    ignored!(ig9, ROOT, "**/foo", "foo");
++    ignored!(ig10, ROOT, "**/foo", "src/foo");
++    ignored!(ig11, ROOT, "**/foo/**", "src/foo/bar");
++    ignored!(ig12, ROOT, "**/foo/**", "wat/src/foo/bar/baz");
++    ignored!(ig13, ROOT, "**/foo/bar", "foo/bar");
++    ignored!(ig14, ROOT, "**/foo/bar", "src/foo/bar");
++    ignored!(ig15, ROOT, "abc/**", "abc/x");
++    ignored!(ig16, ROOT, "abc/**", "abc/x/y");
++    ignored!(ig17, ROOT, "abc/**", "abc/x/y/z");
++    ignored!(ig18, ROOT, "a/**/b", "a/b");
++    ignored!(ig19, ROOT, "a/**/b", "a/x/b");
++    ignored!(ig20, ROOT, "a/**/b", "a/x/y/b");
++    ignored!(ig21, ROOT, r"\!xy", "!xy");
++    ignored!(ig22, ROOT, r"\#foo", "#foo");
++    ignored!(ig23, ROOT, "foo", "./foo");
++    ignored!(ig24, ROOT, "target", "grep/target");
++    ignored!(ig25, ROOT, "Cargo.lock", "./tabwriter-bin/Cargo.lock");
++    ignored!(ig26, ROOT, "/foo/bar/baz", "./foo/bar/baz");
++    ignored!(ig27, ROOT, "foo/", "xyz/foo", true);
++    ignored!(ig28, ROOT, "src/*.rs", "src/grep/src/main.rs");
++    ignored!(ig29, "./src", "/llvm/", "./src/llvm", true);
++    ignored!(ig30, ROOT, "node_modules/ ", "node_modules", true);
++
++    not_ignored!(ignot1, ROOT, "amonths", "months");
++    not_ignored!(ignot2, ROOT, "monthsa", "months");
++    not_ignored!(ignot3, ROOT, "/src/*.rs", "src/grep/src/main.rs");
++    not_ignored!(ignot4, ROOT, "/*.c", "mozilla-sha1/sha1.c");
++    not_ignored!(ignot5, ROOT, "/src/*.rs", "src/grep/src/main.rs");
++    not_ignored!(ignot6, ROOT, "*.rs\n!src/main.rs", "src/main.rs");
++    not_ignored!(ignot7, ROOT, "foo/", "foo", false);
++    not_ignored!(ignot8, ROOT, "**/foo/**", "wat/src/afoo/bar/baz");
++    not_ignored!(ignot9, ROOT, "**/foo/**", "wat/src/fooa/bar/baz");
++    not_ignored!(ignot10, ROOT, "**/foo/bar", "foo/src/bar");
++    not_ignored!(ignot11, ROOT, "#foo", "#foo");
++    not_ignored!(ignot12, ROOT, "\n\n\n", "foo");
++    not_ignored!(ignot13, ROOT, "foo/**", "foo", true);
++    not_ignored!(
++        ignot14, "./third_party/protobuf", "m4/ltoptions.m4",
++        "./third_party/protobuf/csharp/src/packages/repositories.config");
++    not_ignored!(ignot15, ROOT, "!/bar", "foo/bar");
++
++    fn bytes(s: &str) -> Vec<u8> {
++        s.to_string().into_bytes()
++    }
++
++    fn path_string<P: AsRef<Path>>(path: P) -> String {
++        path.as_ref().to_str().unwrap().to_string()
++    }
++
++    #[test]
++    fn parse_excludes_file1() {
++        let data = bytes("[core]\nexcludesFile = /foo/bar");
++        let got = super::parse_excludes_file(&data).unwrap();
++        assert_eq!(path_string(got), "/foo/bar");
++    }
++
++    #[test]
++    fn parse_excludes_file2() {
++        let data = bytes("[core]\nexcludesFile = ~/foo/bar");
++        let got = super::parse_excludes_file(&data).unwrap();
++        assert_eq!(path_string(got), super::expand_tilde("~/foo/bar"));
++    }
++
++    #[test]
++    fn parse_excludes_file3() {
++        let data = bytes("[core]\nexcludeFile = /foo/bar");
++        assert!(super::parse_excludes_file(&data).is_none());
++    }
++
++    // See: https://github.com/BurntSushi/ripgrep/issues/106
++    #[test]
++    fn regression_106() {
++        gi_from_str("/", " ");
++    }
++
++    #[test]
++    fn case_insensitive() {
++        let gi = GitignoreBuilder::new(ROOT)
++            .case_insensitive(true).unwrap()
++            .add_str(None, "*.html").unwrap()
++            .build().unwrap();
++        assert!(gi.matched("foo.html", false).is_ignore());
++        assert!(gi.matched("foo.HTML", false).is_ignore());
++        assert!(!gi.matched("foo.htm", false).is_ignore());
++        assert!(!gi.matched("foo.HTM", false).is_ignore());
++    }
++
++    ignored!(cs1, ROOT, "*.html", "foo.html");
++    not_ignored!(cs2, ROOT, "*.html", "foo.HTML");
++    not_ignored!(cs3, ROOT, "*.html", "foo.htm");
++    not_ignored!(cs4, ROOT, "*.html", "foo.HTM");
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d053014cc0f86857c6a82e673f55e209466f189d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,404 @@@
++/*!
++The ignore crate provides a fast recursive directory iterator that respects
++various filters such as globs, file types and `.gitignore` files. The precise
++matching rules and precedence is explained in the documentation for
++`WalkBuilder`.
++
++Secondarily, this crate exposes gitignore and file type matchers for use cases
++that demand more fine-grained control.
++
++# Example
++
++This example shows the most basic usage of this crate. This code will
++recursively traverse the current directory while automatically filtering out
++files and directories according to ignore globs found in files like
++`.ignore` and `.gitignore`:
++
++
++```rust,no_run
++use ignore::Walk;
++
++for result in Walk::new("./") {
++    // Each item yielded by the iterator is either a directory entry or an
++    // error, so either print the path or the error.
++    match result {
++        Ok(entry) => println!("{}", entry.path().display()),
++        Err(err) => println!("ERROR: {}", err),
++    }
++}
++```
++
++# Example: advanced
++
++By default, the recursive directory iterator will ignore hidden files and
++directories. This can be disabled by building the iterator with `WalkBuilder`:
++
++```rust,no_run
++use ignore::WalkBuilder;
++
++for result in WalkBuilder::new("./").hidden(false).build() {
++    println!("{:?}", result);
++}
++```
++
++See the documentation for `WalkBuilder` for many other options.
++*/
++
++#![deny(missing_docs)]
++
++extern crate crossbeam;
++extern crate globset;
++#[macro_use]
++extern crate lazy_static;
++#[macro_use]
++extern crate log;
++extern crate memchr;
++extern crate regex;
++#[cfg(test)]
++extern crate tempdir;
++extern crate thread_local;
++extern crate walkdir;
++
++use std::error;
++use std::fmt;
++use std::io;
++use std::path::{Path, PathBuf};
++
++pub use walk::{DirEntry, Walk, WalkBuilder, WalkParallel, WalkState};
++
++mod dir;
++pub mod gitignore;
++mod pathutil;
++pub mod overrides;
++pub mod types;
++mod walk;
++
++/// Represents an error that can occur when parsing a gitignore file.
++#[derive(Debug)]
++pub enum Error {
++    /// A collection of "soft" errors. These occur when adding an ignore
++    /// file partially succeeded.
++    Partial(Vec<Error>),
++    /// An error associated with a specific line number.
++    WithLineNumber {
++        /// The line number.
++        line: u64,
++        /// The underlying error.
++        err: Box<Error>,
++    },
++    /// An error associated with a particular file path.
++    WithPath {
++        /// The file path.
++        path: PathBuf,
++        /// The underlying error.
++        err: Box<Error>,
++    },
++    /// An error associated with a particular directory depth when recursively
++    /// walking a directory.
++    WithDepth {
++        /// The directory depth.
++        depth: usize,
++        /// The underlying error.
++        err: Box<Error>,
++    },
++    /// An error that occurs when a file loop is detected when traversing
++    /// symbolic links.
++    Loop {
++        /// The ancestor file path in the loop.
++        ancestor: PathBuf,
++        /// The child file path in the loop.
++        child: PathBuf,
++    },
++    /// An error that occurs when doing I/O, such as reading an ignore file.
++    Io(io::Error),
++    /// An error that occurs when trying to parse a glob.
++    Glob {
++        /// The original glob that caused this error. This glob, when
++        /// available, always corresponds to the glob provided by an end user.
++        /// e.g., It is the glob as writtein in a `.gitignore` file.
++        ///
++        /// (This glob may be distinct from the glob that is actually
++        /// compiled, after accounting for `gitignore` semantics.)
++        glob: Option<String>,
++        /// The underlying glob error as a string.
++        err: String,
++    },
++    /// A type selection for a file type that is not defined.
++    UnrecognizedFileType(String),
++    /// A user specified file type definition could not be parsed.
++    InvalidDefinition,
++}
++
++impl Error {
++    /// Returns true if this is a partial error.
++    ///
++    /// A partial error occurs when only some operations failed while others
++    /// may have succeeded. For example, an ignore file may contain an invalid
++    /// glob among otherwise valid globs.
++    pub fn is_partial(&self) -> bool {
++        match *self {
++            Error::Partial(_) => true,
++            Error::WithLineNumber { ref err, .. } => err.is_partial(),
++            Error::WithPath { ref err, .. } => err.is_partial(),
++            Error::WithDepth { ref err, .. } => err.is_partial(),
++            _ => false,
++        }
++    }
++
++    /// Returns true if this error is exclusively an I/O error.
++    pub fn is_io(&self) -> bool {
++        match *self {
++            Error::Partial(ref errs) => errs.len() == 1 && errs[0].is_io(),
++            Error::WithLineNumber { ref err, .. } => err.is_io(),
++            Error::WithPath { ref err, .. } => err.is_io(),
++            Error::WithDepth { ref err, .. } => err.is_io(),
++            Error::Loop { .. } => false,
++            Error::Io(_) => true,
++            Error::Glob { .. } => false,
++            Error::UnrecognizedFileType(_) => false,
++            Error::InvalidDefinition => false,
++        }
++    }
++
++    /// Returns a depth associated with recursively walking a directory (if
++    /// this error was generated from a recursive directory iterator).
++    pub fn depth(&self) -> Option<usize> {
++        match *self {
++            Error::WithPath { ref err, .. } => err.depth(),
++            Error::WithDepth { depth, .. } => Some(depth),
++            _ => None,
++        }
++    }
++
++    /// Turn an error into a tagged error with the given file path.
++    fn with_path<P: AsRef<Path>>(self, path: P) -> Error {
++        Error::WithPath {
++            path: path.as_ref().to_path_buf(),
++            err: Box::new(self),
++        }
++    }
++
++    /// Turn an error into a tagged error with the given depth.
++    fn with_depth(self, depth: usize) -> Error {
++        Error::WithDepth {
++            depth: depth,
++            err: Box::new(self),
++        }
++    }
++
++    /// Turn an error into a tagged error with the given file path and line
++    /// number. If path is empty, then it is omitted from the error.
++    fn tagged<P: AsRef<Path>>(self, path: P, lineno: u64) -> Error {
++        let errline = Error::WithLineNumber {
++            line: lineno,
++            err: Box::new(self),
++        };
++        if path.as_ref().as_os_str().is_empty() {
++            return errline;
++        }
++        errline.with_path(path)
++    }
++}
++
++impl error::Error for Error {
++    fn description(&self) -> &str {
++        match *self {
++            Error::Partial(_) => "partial error",
++            Error::WithLineNumber { ref err, .. } => err.description(),
++            Error::WithPath { ref err, .. } => err.description(),
++            Error::WithDepth { ref err, .. } => err.description(),
++            Error::Loop { .. } => "file system loop found",
++            Error::Io(ref err) => err.description(),
++            Error::Glob { ref err, .. } => err,
++            Error::UnrecognizedFileType(_) => "unrecognized file type",
++            Error::InvalidDefinition => "invalid definition",
++        }
++    }
++}
++
++impl fmt::Display for Error {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        match *self {
++            Error::Partial(ref errs) => {
++                let msgs: Vec<String> =
++                    errs.iter().map(|err| err.to_string()).collect();
++                write!(f, "{}", msgs.join("\n"))
++            }
++            Error::WithLineNumber { line, ref err } => {
++                write!(f, "line {}: {}", line, err)
++            }
++            Error::WithPath { ref path, ref err } => {
++                write!(f, "{}: {}", path.display(), err)
++            }
++            Error::WithDepth { ref err, .. } => err.fmt(f),
++            Error::Loop { ref ancestor, ref child } => {
++                write!(f, "File system loop found: \
++                           {} points to an ancestor {}",
++                          child.display(), ancestor.display())
++            }
++            Error::Io(ref err) => err.fmt(f),
++            Error::Glob { glob: None, ref err } => write!(f, "{}", err),
++            Error::Glob { glob: Some(ref glob), ref err } => {
++                write!(f, "error parsing glob '{}': {}", glob, err)
++            }
++            Error::UnrecognizedFileType(ref ty) => {
++                write!(f, "unrecognized file type: {}", ty)
++            }
++            Error::InvalidDefinition => {
++                write!(f, "invalid definition (format is type:glob, e.g., \
++                           html:*.html)")
++            }
++        }
++    }
++}
++
++impl From<io::Error> for Error {
++    fn from(err: io::Error) -> Error {
++        Error::Io(err)
++    }
++}
++
++impl From<walkdir::Error> for Error {
++    fn from(err: walkdir::Error) -> Error {
++        let depth = err.depth();
++        if let (Some(anc), Some(child)) = (err.loop_ancestor(), err.path()) {
++            return Error::WithDepth {
++                depth: depth,
++                err: Box::new(Error::Loop {
++                    ancestor: anc.to_path_buf(),
++                    child: child.to_path_buf(),
++                }),
++            };
++        }
++        let path = err.path().map(|p| p.to_path_buf());
++        let mut ig_err = Error::Io(io::Error::from(err));
++        if let Some(path) = path {
++            ig_err = Error::WithPath {
++                path: path,
++                err: Box::new(ig_err),
++            };
++        }
++        ig_err
++    }
++}
++
++#[derive(Debug, Default)]
++struct PartialErrorBuilder(Vec<Error>);
++
++impl PartialErrorBuilder {
++    fn push(&mut self, err: Error) {
++        self.0.push(err);
++    }
++
++    fn push_ignore_io(&mut self, err: Error) {
++        if !err.is_io() {
++            self.push(err);
++        }
++    }
++
++    fn maybe_push(&mut self, err: Option<Error>) {
++        if let Some(err) = err {
++            self.push(err);
++        }
++    }
++
++    fn maybe_push_ignore_io(&mut self, err: Option<Error>) {
++        if let Some(err) = err {
++            self.push_ignore_io(err);
++        }
++    }
++
++    fn into_error_option(mut self) -> Option<Error> {
++        if self.0.is_empty() {
++            None
++        } else if self.0.len() == 1 {
++            Some(self.0.pop().unwrap())
++        } else {
++            Some(Error::Partial(self.0))
++        }
++    }
++}
++
++/// The result of a glob match.
++///
++/// The type parameter `T` typically refers to a type that provides more
++/// information about a particular match. For example, it might identify
++/// the specific gitignore file and the specific glob pattern that caused
++/// the match.
++#[derive(Clone, Debug)]
++pub enum Match<T> {
++    /// The path didn't match any glob.
++    None,
++    /// The highest precedent glob matched indicates the path should be
++    /// ignored.
++    Ignore(T),
++    /// The highest precedent glob matched indicates the path should be
++    /// whitelisted.
++    Whitelist(T),
++}
++
++impl<T> Match<T> {
++    /// Returns true if the match result didn't match any globs.
++    pub fn is_none(&self) -> bool {
++        match *self {
++            Match::None => true,
++            Match::Ignore(_) | Match::Whitelist(_) => false,
++        }
++    }
++
++    /// Returns true if the match result implies the path should be ignored.
++    pub fn is_ignore(&self) -> bool {
++        match *self {
++            Match::Ignore(_) => true,
++            Match::None | Match::Whitelist(_) => false,
++        }
++    }
++
++    /// Returns true if the match result implies the path should be
++    /// whitelisted.
++    pub fn is_whitelist(&self) -> bool {
++        match *self {
++            Match::Whitelist(_) => true,
++            Match::None | Match::Ignore(_) => false,
++        }
++    }
++
++    /// Inverts the match so that `Ignore` becomes `Whitelist` and
++    /// `Whitelist` becomes `Ignore`. A non-match remains the same.
++    pub fn invert(self) -> Match<T> {
++        match self {
++            Match::None => Match::None,
++            Match::Ignore(t) => Match::Whitelist(t),
++            Match::Whitelist(t) => Match::Ignore(t),
++        }
++    }
++
++    /// Return the value inside this match if it exists.
++    pub fn inner(&self) -> Option<&T> {
++        match *self {
++            Match::None => None,
++            Match::Ignore(ref t) => Some(t),
++            Match::Whitelist(ref t) => Some(t),
++        }
++    }
++
++    /// Apply the given function to the value inside this match.
++    ///
++    /// If the match has no value, then return the match unchanged.
++    pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Match<U> {
++        match self {
++            Match::None => Match::None,
++            Match::Ignore(t) => Match::Ignore(f(t)),
++            Match::Whitelist(t) => Match::Whitelist(f(t)),
++        }
++    }
++
++    /// Return the match if it is not none. Otherwise, return other.
++    pub fn or(self, other: Self) -> Self {
++        if self.is_none() {
++            other
++        } else {
++            self
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..453066f9357491d017e1f3c8ad469a4e66475d21
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,256 @@@
++/*!
++The overrides module provides a way to specify a set of override globs.
++This provides functionality similar to `--include` or `--exclude` in command
++line tools.
++*/
++
++use std::path::Path;
++
++use gitignore::{self, Gitignore, GitignoreBuilder};
++use {Error, Match};
++
++/// Glob represents a single glob in an override matcher.
++///
++/// This is used to report information about the highest precedent glob
++/// that matched.
++///
++/// Note that not all matches necessarily correspond to a specific glob. For
++/// example, if there are one or more whitelist globs and a file path doesn't
++/// match any glob in the set, then the file path is considered to be ignored.
++///
++/// The lifetime `'a` refers to the lifetime of the matcher that produced
++/// this glob.
++#[derive(Clone, Debug)]
++pub struct Glob<'a>(GlobInner<'a>);
++
++#[derive(Clone, Debug)]
++enum GlobInner<'a> {
++    /// No glob matched, but the file path should still be ignored.
++    UnmatchedIgnore,
++    /// A glob matched.
++    Matched(&'a gitignore::Glob),
++}
++
++impl<'a> Glob<'a> {
++    fn unmatched() -> Glob<'a> {
++        Glob(GlobInner::UnmatchedIgnore)
++    }
++}
++
++/// Manages a set of overrides provided explicitly by the end user.
++#[derive(Clone, Debug)]
++pub struct Override(Gitignore);
++
++impl Override {
++    /// Returns an empty matcher that never matches any file path.
++    pub fn empty() -> Override {
++        Override(Gitignore::empty())
++    }
++
++    /// Returns the directory of this override set.
++    ///
++    /// All matches are done relative to this path.
++    pub fn path(&self) -> &Path {
++        self.0.path()
++    }
++
++    /// Returns true if and only if this matcher is empty.
++    ///
++    /// When a matcher is empty, it will never match any file path.
++    pub fn is_empty(&self) -> bool {
++        self.0.is_empty()
++    }
++
++    /// Returns the total number of ignore globs.
++    pub fn num_ignores(&self) -> u64 {
++        self.0.num_whitelists()
++    }
++
++    /// Returns the total number of whitelisted globs.
++    pub fn num_whitelists(&self) -> u64 {
++        self.0.num_ignores()
++    }
++
++    /// Returns whether the given file path matched a pattern in this override
++    /// matcher.
++    ///
++    /// `is_dir` should be true if the path refers to a directory and false
++    /// otherwise.
++    ///
++    /// If there are no overrides, then this always returns `Match::None`.
++    ///
++    /// If there is at least one whitelist override and `is_dir` is false, then
++    /// this never returns `Match::None`, since non-matches are interpreted as
++    /// ignored.
++    ///
++    /// The given path is matched to the globs relative to the path given
++    /// when building the override matcher. Specifically, before matching
++    /// `path`, its prefix (as determined by a common suffix of the directory
++    /// given) is stripped. If there is no common suffix/prefix overlap, then
++    /// `path` is assumed to reside in the same directory as the root path for
++    /// this set of overrides.
++    pub fn matched<'a, P: AsRef<Path>>(
++        &'a self,
++        path: P,
++        is_dir: bool,
++    ) -> Match<Glob<'a>> {
++        if self.is_empty() {
++            return Match::None;
++        }
++        let mat = self.0.matched(path, is_dir).invert();
++        if mat.is_none() && self.num_whitelists() > 0 && !is_dir {
++            return Match::Ignore(Glob::unmatched());
++        }
++        mat.map(move |giglob| Glob(GlobInner::Matched(giglob)))
++    }
++}
++
++/// Builds a matcher for a set of glob overrides.
++pub struct OverrideBuilder {
++    builder: GitignoreBuilder,
++}
++
++impl OverrideBuilder {
++    /// Create a new override builder.
++    ///
++    /// Matching is done relative to the directory path provided.
++    pub fn new<P: AsRef<Path>>(path: P) -> OverrideBuilder {
++        OverrideBuilder {
++            builder: GitignoreBuilder::new(path),
++        }
++    }
++
++    /// Builds a new override matcher from the globs added so far.
++    ///
++    /// Once a matcher is built, no new globs can be added to it.
++    pub fn build(&self) -> Result<Override, Error> {
++        Ok(Override(try!(self.builder.build())))
++    }
++
++    /// Add a glob to the set of overrides.
++    ///
++    /// Globs provided here have precisely the same semantics as a single
++    /// line in a `gitignore` file, where the meaning of `!` is inverted:
++    /// namely, `!` at the beginning of a glob will ignore a file. Without `!`,
++    /// all matches of the glob provided are treated as whitelist matches.
++    pub fn add(&mut self, glob: &str) -> Result<&mut OverrideBuilder, Error> {
++        try!(self.builder.add_line(None, glob));
++        Ok(self)
++    }
++
++    /// Toggle whether the globs should be matched case insensitively or not.
++    /// 
++    /// This is disabled by default.
++    pub fn case_insensitive(
++        &mut self, yes: bool
++    ) -> Result<&mut OverrideBuilder, Error> {
++        try!(self.builder.case_insensitive(yes));
++        Ok(self)
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use super::{Override, OverrideBuilder};
++
++    const ROOT: &'static str = "/home/andrew/foo";
++
++    fn ov(globs: &[&str]) -> Override {
++        let mut builder = OverrideBuilder::new(ROOT);
++        for glob in globs {
++            builder.add(glob).unwrap();
++        }
++        builder.build().unwrap()
++    }
++
++    #[test]
++    fn empty() {
++        let ov = ov(&[]);
++        assert!(ov.matched("a.foo", false).is_none());
++        assert!(ov.matched("a", false).is_none());
++        assert!(ov.matched("", false).is_none());
++    }
++
++    #[test]
++    fn simple() {
++        let ov = ov(&["*.foo", "!*.bar"]);
++        assert!(ov.matched("a.foo", false).is_whitelist());
++        assert!(ov.matched("a.foo", true).is_whitelist());
++        assert!(ov.matched("a.rs", false).is_ignore());
++        assert!(ov.matched("a.rs", true).is_none());
++        assert!(ov.matched("a.bar", false).is_ignore());
++        assert!(ov.matched("a.bar", true).is_ignore());
++    }
++
++    #[test]
++    fn only_ignores() {
++        let ov = ov(&["!*.bar"]);
++        assert!(ov.matched("a.rs", false).is_none());
++        assert!(ov.matched("a.rs", true).is_none());
++        assert!(ov.matched("a.bar", false).is_ignore());
++        assert!(ov.matched("a.bar", true).is_ignore());
++    }
++
++    #[test]
++    fn precedence() {
++        let ov = ov(&["*.foo", "!*.bar.foo"]);
++        assert!(ov.matched("a.foo", false).is_whitelist());
++        assert!(ov.matched("a.baz", false).is_ignore());
++        assert!(ov.matched("a.bar.foo", false).is_ignore());
++    }
++
++    #[test]
++    fn gitignore() {
++        let ov = ov(&["/foo", "bar/*.rs", "baz/**"]);
++        assert!(ov.matched("bar/wat/lib.rs", false).is_ignore());
++        assert!(ov.matched("wat/bar/lib.rs", false).is_whitelist());
++        assert!(ov.matched("foo", false).is_whitelist());
++        assert!(ov.matched("wat/foo", false).is_ignore());
++        assert!(ov.matched("baz", false).is_ignore());
++        assert!(ov.matched("baz/a", false).is_whitelist());
++        assert!(ov.matched("baz/a/b", false).is_whitelist());
++    }
++
++    #[test]
++    fn allow_directories() {
++        // This tests that directories are NOT ignored when they are unmatched.
++        let ov = ov(&["*.rs"]);
++        assert!(ov.matched("foo.rs", false).is_whitelist());
++        assert!(ov.matched("foo.c", false).is_ignore());
++        assert!(ov.matched("foo", false).is_ignore());
++        assert!(ov.matched("foo", true).is_none());
++        assert!(ov.matched("src/foo.rs", false).is_whitelist());
++        assert!(ov.matched("src/foo.c", false).is_ignore());
++        assert!(ov.matched("src/foo", false).is_ignore());
++        assert!(ov.matched("src/foo", true).is_none());
++    }
++
++    #[test]
++    fn absolute_path() {
++        let ov = ov(&["!/bar"]);
++        assert!(ov.matched("./foo/bar", false).is_none());
++    }
++
++    #[test]
++    fn case_insensitive() {
++        let ov = OverrideBuilder::new(ROOT)
++            .case_insensitive(true).unwrap()
++            .add("*.html").unwrap()
++            .build().unwrap();
++        assert!(ov.matched("foo.html", false).is_whitelist());
++        assert!(ov.matched("foo.HTML", false).is_whitelist());
++        assert!(ov.matched("foo.htm", false).is_ignore());
++        assert!(ov.matched("foo.HTM", false).is_ignore());
++    }
++
++    #[test]
++    fn default_case_sensitive() {
++        let ov = OverrideBuilder::new(ROOT)
++            .add("*.html").unwrap()
++            .build().unwrap();
++        assert!(ov.matched("foo.html", false).is_whitelist());
++        assert!(ov.matched("foo.HTML", false).is_ignore());
++        assert!(ov.matched("foo.htm", false).is_ignore());
++        assert!(ov.matched("foo.HTM", false).is_ignore());
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bfd43de3e7a6cd7e545c5fa6e6cc2fd01e51f7e0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,108 @@@
++use std::ffi::OsStr;
++use std::path::Path;
++
++/// Returns true if and only if this file path is considered to be hidden.
++#[cfg(unix)]
++pub fn is_hidden<P: AsRef<Path>>(path: P) -> bool {
++    use std::os::unix::ffi::OsStrExt;
++
++    if let Some(name) = file_name(path.as_ref()) {
++        name.as_bytes().get(0) == Some(&b'.')
++    } else {
++        false
++    }
++}
++
++/// Returns true if and only if this file path is considered to be hidden.
++#[cfg(not(unix))]
++pub fn is_hidden<P: AsRef<Path>>(path: P) -> bool {
++    if let Some(name) = file_name(path.as_ref()) {
++        name.to_str().map(|s| s.starts_with(".")).unwrap_or(false)
++    } else {
++        false
++    }
++}
++
++/// Strip `prefix` from the `path` and return the remainder.
++///
++/// If `path` doesn't have a prefix `prefix`, then return `None`.
++#[cfg(unix)]
++pub fn strip_prefix<'a, P: AsRef<Path> + ?Sized>(
++    prefix: &'a P,
++    path: &'a Path,
++) -> Option<&'a Path> {
++    use std::os::unix::ffi::OsStrExt;
++
++    let prefix = prefix.as_ref().as_os_str().as_bytes();
++    let path = path.as_os_str().as_bytes();
++    if prefix.len() > path.len() || prefix != &path[0..prefix.len()] {
++        None
++    } else {
++        Some(&Path::new(OsStr::from_bytes(&path[prefix.len()..])))
++    }
++}
++
++/// Strip `prefix` from the `path` and return the remainder.
++///
++/// If `path` doesn't have a prefix `prefix`, then return `None`.
++#[cfg(not(unix))]
++pub fn strip_prefix<'a, P: AsRef<Path> + ?Sized>(
++    prefix: &'a P,
++    path: &'a Path,
++) -> Option<&'a Path> {
++    path.strip_prefix(prefix).ok()
++}
++
++/// Returns true if this file path is just a file name. i.e., Its parent is
++/// the empty string.
++#[cfg(unix)]
++pub fn is_file_name<P: AsRef<Path>>(path: P) -> bool {
++    use std::os::unix::ffi::OsStrExt;
++    use memchr::memchr;
++
++    let path = path.as_ref().as_os_str().as_bytes();
++    memchr(b'/', path).is_none()
++}
++
++/// Returns true if this file path is just a file name. i.e., Its parent is
++/// the empty string.
++#[cfg(not(unix))]
++pub fn is_file_name<P: AsRef<Path>>(path: P) -> bool {
++    path.as_ref().parent().map(|p| p.as_os_str().is_empty()).unwrap_or(false)
++}
++
++/// The final component of the path, if it is a normal file.
++///
++/// If the path terminates in ., .., or consists solely of a root of prefix,
++/// file_name will return None.
++#[cfg(unix)]
++pub fn file_name<'a, P: AsRef<Path> + ?Sized>(
++    path: &'a P,
++) -> Option<&'a OsStr> {
++    use std::os::unix::ffi::OsStrExt;
++    use memchr::memrchr;
++
++    let path = path.as_ref().as_os_str().as_bytes();
++    if path.is_empty() {
++        return None;
++    } else if path.len() == 1 && path[0] == b'.' {
++        return None;
++    } else if path.last() == Some(&b'.') {
++        return None;
++    } else if path.len() >= 2 && &path[path.len() - 2..] == &b".."[..] {
++        return None;
++    }
++    let last_slash = memrchr(b'/', path).map(|i| i + 1).unwrap_or(0);
++    Some(OsStr::from_bytes(&path[last_slash..]))
++}
++
++/// The final component of the path, if it is a normal file.
++///
++/// If the path terminates in ., .., or consists solely of a root of prefix,
++/// file_name will return None.
++#[cfg(not(unix))]
++pub fn file_name<'a, P: AsRef<Path> + ?Sized>(
++    path: &'a P,
++) -> Option<&'a OsStr> {
++    path.as_ref().file_name()
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..791008ffcbe984492f0b7880b1cbe2a59efe2c22
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,686 @@@
++/*!
++The types module provides a way of associating globs on file names to file
++types.
++
++This can be used to match specific types of files. For example, among
++the default file types provided, the Rust file type is defined to be `*.rs`
++with name `rust`. Similarly, the C file type is defined to be `*.{c,h}` with
++name `c`.
++
++Note that the set of default types may change over time.
++
++# Example
++
++This shows how to create and use a simple file type matcher using the default
++file types defined in this crate.
++
++```
++use ignore::types::TypesBuilder;
++
++let mut builder = TypesBuilder::new();
++builder.add_defaults();
++builder.select("rust");
++let matcher = builder.build().unwrap();
++
++assert!(matcher.matched("foo.rs", false).is_whitelist());
++assert!(matcher.matched("foo.c", false).is_ignore());
++```
++
++# Example: negation
++
++This is like the previous example, but shows how negating a file type works.
++That is, this will let us match file paths that *don't* correspond to a
++particular file type.
++
++```
++use ignore::types::TypesBuilder;
++
++let mut builder = TypesBuilder::new();
++builder.add_defaults();
++builder.negate("c");
++let matcher = builder.build().unwrap();
++
++assert!(matcher.matched("foo.rs", false).is_none());
++assert!(matcher.matched("foo.c", false).is_ignore());
++```
++
++# Example: custom file type definitions
++
++This shows how to extend this library default file type definitions with
++your own.
++
++```
++use ignore::types::TypesBuilder;
++
++let mut builder = TypesBuilder::new();
++builder.add_defaults();
++builder.add("foo", "*.foo");
++// Another way of adding a file type definition.
++// This is useful when accepting input from an end user.
++builder.add_def("bar:*.bar");
++// Note: we only select `foo`, not `bar`.
++builder.select("foo");
++let matcher = builder.build().unwrap();
++
++assert!(matcher.matched("x.foo", false).is_whitelist());
++// This is ignored because we only selected the `foo` file type.
++assert!(matcher.matched("x.bar", false).is_ignore());
++```
++
++We can also add file type definitions based on other definitions.
++
++```
++use ignore::types::TypesBuilder;
++
++let mut builder = TypesBuilder::new();
++builder.add_defaults();
++builder.add("foo", "*.foo");
++builder.add_def("bar:include:foo,cpp");
++builder.select("bar");
++let matcher = builder.build().unwrap();
++
++assert!(matcher.matched("x.foo", false).is_whitelist());
++assert!(matcher.matched("y.cpp", false).is_whitelist());
++```
++*/
++
++use std::cell::RefCell;
++use std::collections::HashMap;
++use std::path::Path;
++use std::sync::Arc;
++
++use globset::{GlobBuilder, GlobSet, GlobSetBuilder};
++use regex::Regex;
++use thread_local::ThreadLocal;
++
++use pathutil::file_name;
++use {Error, Match};
++
++const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[
++    ("agda", &["*.agda", "*.lagda"]),
++    ("asciidoc", &["*.adoc", "*.asc", "*.asciidoc"]),
++    ("asm", &["*.asm", "*.s", "*.S"]),
++    ("awk", &["*.awk"]),
++    ("c", &["*.c", "*.h", "*.H"]),
++    ("cabal", &["*.cabal"]),
++    ("cbor", &["*.cbor"]),
++    ("ceylon", &["*.ceylon"]),
++    ("clojure", &["*.clj", "*.cljc", "*.cljs", "*.cljx"]),
++    ("cmake", &["*.cmake", "CMakeLists.txt"]),
++    ("coffeescript", &["*.coffee"]),
++    ("creole", &["*.creole"]),
++    ("config", &["*.config"]),
++    ("cpp", &[
++        "*.C", "*.cc", "*.cpp", "*.cxx",
++        "*.h", "*.H", "*.hh", "*.hpp", "*.inl",
++    ]),
++    ("crystal", &["Projectfile", "*.cr"]),
++    ("cs", &["*.cs"]),
++    ("csharp", &["*.cs"]),
++    ("cshtml", &["*.cshtml"]),
++    ("css", &["*.css", "*.scss"]),
++    ("cython", &["*.pyx"]),
++    ("dart", &["*.dart"]),
++    ("d", &["*.d"]),
++    ("elisp", &["*.el"]),
++    ("elixir", &["*.ex", "*.eex", "*.exs"]),
++    ("erlang", &["*.erl", "*.hrl"]),
++    ("fish", &["*.fish"]),
++    ("fortran", &[
++        "*.f", "*.F", "*.f77", "*.F77", "*.pfo",
++        "*.f90", "*.F90", "*.f95", "*.F95",
++    ]),
++    ("fsharp", &["*.fs", "*.fsx", "*.fsi"]),
++    ("go", &["*.go"]),
++    ("groovy", &["*.groovy", "*.gradle"]),
++    ("h", &["*.h", "*.hpp"]),
++    ("hbs", &["*.hbs"]),
++    ("haskell", &["*.hs", "*.lhs"]),
++    ("html", &["*.htm", "*.html", "*.ejs"]),
++    ("java", &["*.java"]),
++    ("jinja", &["*.jinja", "*.jinja2"]),
++    ("js", &[
++        "*.js", "*.jsx", "*.vue",
++    ]),
++    ("json", &["*.json"]),
++    ("jsonl", &["*.jsonl"]),
++    ("julia", &["*.jl"]),
++    ("kotlin", &["*.kt", "*.kts"]),
++    ("less", &["*.less"]),
++    ("lisp", &["*.el", "*.jl", "*.lisp", "*.lsp", "*.sc", "*.scm"]),
++    ("log", &["*.log"]),
++    ("lua", &["*.lua"]),
++    ("m4", &["*.ac", "*.m4"]),
++    ("make", &["gnumakefile", "Gnumakefile", "makefile", "Makefile", "*.mk", "*.mak"]),
++    ("markdown", &["*.markdown", "*.md", "*.mdown", "*.mkdn"]),
++    ("md", &["*.markdown", "*.md", "*.mdown", "*.mkdn"]),
++    ("matlab", &["*.m"]),
++    ("mk", &["mkfile"]),
++    ("ml", &["*.ml"]),
++    ("msbuild", &["*.csproj", "*.fsproj", "*.vcxproj", "*.proj", "*.props", "*.targets"]),
++    ("nim", &["*.nim"]),
++    ("nix", &["*.nix"]),
++    ("objc", &["*.h", "*.m"]),
++    ("objcpp", &["*.h", "*.mm"]),
++    ("ocaml", &["*.ml", "*.mli", "*.mll", "*.mly"]),
++    ("org", &["*.org"]),
++    ("perl", &["*.perl", "*.pl", "*.PL", "*.plh", "*.plx", "*.pm", "*.t"]),
++    ("pdf", &["*.pdf"]),
++    ("php", &["*.php", "*.php3", "*.php4", "*.php5", "*.phtml"]),
++    ("pod", &["*.pod"]),
++    ("ps", &["*.cdxml", "*.ps1", "*.ps1xml", "*.psd1", "*.psm1"]),
++    ("py", &["*.py"]),
++    ("qmake", &["*.pro", "*.pri"]),
++    ("readme", &["README*", "*README"]),
++    ("r", &["*.R", "*.r", "*.Rmd", "*.Rnw"]),
++    ("rdoc", &["*.rdoc"]),
++    ("rst", &["*.rst"]),
++    ("ruby", &["Gemfile", "*.gemspec", ".irbrc", "Rakefile", "*.rb"]),
++    ("rust", &["*.rs"]),
++    ("sass", &["*.sass", "*.scss"]),
++    ("scala", &["*.scala"]),
++    ("sh", &["*.bash", "*.csh", "*.ksh", "*.sh", "*.tcsh"]),
++    ("spark", &["*.spark"]),
++    ("stylus", &["*.styl"]),
++    ("sql", &["*.sql"]),
++    ("sv", &["*.v", "*.vg", "*.sv", "*.svh", "*.h"]),
++    ("svg", &["*.svg"]),
++    ("swift", &["*.swift"]),
++    ("swig", &["*.def", "*.i"]),
++    ("taskpaper", &["*.taskpaper"]),
++    ("tcl", &["*.tcl"]),
++    ("tex", &["*.tex", "*.ltx", "*.cls", "*.sty", "*.bib"]),
++    ("textile", &["*.textile"]),
++    ("ts", &["*.ts", "*.tsx"]),
++    ("txt", &["*.txt"]),
++    ("toml", &["*.toml", "Cargo.lock"]),
++    ("twig", &["*.twig"]),
++    ("vala", &["*.vala"]),
++    ("vb", &["*.vb"]),
++    ("vim", &["*.vim"]),
++    ("vimscript", &["*.vim"]),
++    ("wiki", &["*.mediawiki", "*.wiki"]),
++    ("xml", &["*.xml"]),
++    ("yacc", &["*.y"]),
++    ("yaml", &["*.yaml", "*.yml"]),
++    ("yocto", &["*.bb", "*.bbappend", "*.bbclass"]),
++    ("zsh", &["zshenv", ".zshenv", "zprofile", ".zprofile", "zshrc", ".zshrc", "zlogin", ".zlogin", "zlogout", ".zlogout", "*.zsh"]),
++];
++
++/// Glob represents a single glob in a set of file type definitions.
++///
++/// There may be more than one glob for a particular file type.
++///
++/// This is used to report information about the highest precedent glob
++/// that matched.
++///
++/// Note that not all matches necessarily correspond to a specific glob.
++/// For example, if there are one or more selections and a file path doesn't
++/// match any of those selections, then the file path is considered to be
++/// ignored.
++///
++/// The lifetime `'a` refers to the lifetime of the underlying file type
++/// definition, which corresponds to the lifetime of the file type matcher.
++#[derive(Clone, Debug)]
++pub struct Glob<'a>(GlobInner<'a>);
++
++#[derive(Clone, Debug)]
++enum GlobInner<'a> {
++    /// No glob matched, but the file path should still be ignored.
++    UnmatchedIgnore,
++    /// A glob matched.
++    Matched {
++        /// The file type definition which provided the glob.
++        def: &'a FileTypeDef,
++        /// The index of the glob that matched inside the file type definition.
++        which: usize,
++        /// Whether the selection was negated or not.
++        negated: bool,
++    }
++}
++
++impl<'a> Glob<'a> {
++    fn unmatched() -> Glob<'a> {
++        Glob(GlobInner::UnmatchedIgnore)
++    }
++}
++
++/// A single file type definition.
++///
++/// File type definitions can be retrieved in aggregate from a file type
++/// matcher. File type definitions are also reported when its responsible
++/// for a match.
++#[derive(Clone, Debug, Eq, PartialEq)]
++pub struct FileTypeDef {
++    name: String,
++    globs: Vec<String>,
++}
++
++impl FileTypeDef {
++    /// Return the name of this file type.
++    pub fn name(&self) -> &str {
++        &self.name
++    }
++
++    /// Return the globs used to recognize this file type.
++    pub fn globs(&self) -> &[String] {
++        &self.globs
++    }
++}
++
++/// Types is a file type matcher.
++#[derive(Clone, Debug)]
++pub struct Types {
++    /// All of the file type definitions, sorted lexicographically by name.
++    defs: Vec<FileTypeDef>,
++    /// All of the selections made by the user.
++    selections: Vec<Selection<FileTypeDef>>,
++    /// Whether there is at least one Selection::Select in our selections.
++    /// When this is true, a Match::None is converted to Match::Ignore.
++    has_selected: bool,
++    /// A mapping from glob index in the set to two indices. The first is an
++    /// index into `selections` and the second is an index into the
++    /// corresponding file type definition's list of globs.
++    glob_to_selection: Vec<(usize, usize)>,
++    /// The set of all glob selections, used for actual matching.
++    set: GlobSet,
++    /// Temporary storage for globs that match.
++    matches: Arc<ThreadLocal<RefCell<Vec<usize>>>>,
++}
++
++/// Indicates the type of a selection for a particular file type.
++#[derive(Clone, Debug)]
++enum Selection<T> {
++    Select(String, T),
++    Negate(String, T),
++}
++
++impl<T> Selection<T> {
++    fn is_negated(&self) -> bool {
++        match *self {
++            Selection::Select(..) => false,
++            Selection::Negate(..) => true,
++        }
++    }
++
++    fn name(&self) -> &str {
++        match *self {
++            Selection::Select(ref name, _) => name,
++            Selection::Negate(ref name, _) => name,
++        }
++    }
++
++    fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Selection<U> {
++        match self {
++            Selection::Select(name, inner) => {
++                Selection::Select(name, f(inner))
++            }
++            Selection::Negate(name, inner) => {
++                Selection::Negate(name, f(inner))
++            }
++        }
++    }
++
++    fn inner(&self) -> &T {
++        match *self {
++            Selection::Select(_, ref inner) => inner,
++            Selection::Negate(_, ref inner) => inner,
++        }
++    }
++}
++
++impl Types {
++    /// Creates a new file type matcher that never matches any path and
++    /// contains no file type definitions.
++    pub fn empty() -> Types {
++        Types {
++            defs: vec![],
++            selections: vec![],
++            has_selected: false,
++            glob_to_selection: vec![],
++            set: GlobSetBuilder::new().build().unwrap(),
++            matches: Arc::new(ThreadLocal::default()),
++        }
++    }
++
++    /// Returns true if and only if this matcher has zero selections.
++    pub fn is_empty(&self) -> bool {
++        self.selections.is_empty()
++    }
++
++    /// Returns the number of selections used in this matcher.
++    pub fn len(&self) -> usize {
++        self.selections.len()
++    }
++
++    /// Return the set of current file type definitions.
++    ///
++    /// Definitions and globs are sorted.
++    pub fn definitions(&self) -> &[FileTypeDef] {
++        &self.defs
++    }
++
++    /// Returns a match for the given path against this file type matcher.
++    ///
++    /// The path is considered whitelisted if it matches a selected file type.
++    /// The path is considered ignored if it matches a negated file type.
++    /// If at least one file type is selected and `path` doesn't match, then
++    /// the path is also considered ignored.
++    pub fn matched<'a, P: AsRef<Path>>(
++        &'a self,
++        path: P,
++        is_dir: bool,
++    ) -> Match<Glob<'a>> {
++        // File types don't apply to directories, and we can't do anything
++        // if our glob set is empty.
++        if is_dir || self.set.is_empty() {
++            return Match::None;
++        }
++        // We only want to match against the file name, so extract it.
++        // If one doesn't exist, then we can't match it.
++        let name = match file_name(path.as_ref()) {
++            Some(name) => name,
++            None if self.has_selected => {
++                return Match::Ignore(Glob::unmatched());
++            }
++            None => {
++                return Match::None;
++            }
++        };
++        let mut matches = self.matches.get_default().borrow_mut();
++        self.set.matches_into(name, &mut *matches);
++        // The highest precedent match is the last one.
++        if let Some(&i) = matches.last() {
++            let (isel, iglob) = self.glob_to_selection[i];
++            let sel = &self.selections[isel];
++            let glob = Glob(GlobInner::Matched {
++                def: sel.inner(),
++                which: iglob,
++                negated: sel.is_negated(),
++            });
++            return if sel.is_negated() {
++                Match::Ignore(glob)
++            } else {
++                Match::Whitelist(glob)
++            };
++        }
++        if self.has_selected {
++            Match::Ignore(Glob::unmatched())
++        } else {
++            Match::None
++        }
++    }
++}
++
++/// TypesBuilder builds a type matcher from a set of file type definitions and
++/// a set of file type selections.
++pub struct TypesBuilder {
++    types: HashMap<String, FileTypeDef>,
++    selections: Vec<Selection<()>>,
++}
++
++impl TypesBuilder {
++    /// Create a new builder for a file type matcher.
++    ///
++    /// The builder contains *no* type definitions to start with. A set
++    /// of default type definitions can be added with `add_defaults`, and
++    /// additional type definitions can be added with `select` and `negate`.
++    pub fn new() -> TypesBuilder {
++        TypesBuilder {
++            types: HashMap::new(),
++            selections: vec![],
++        }
++    }
++
++    /// Build the current set of file type definitions *and* selections into
++    /// a file type matcher.
++    pub fn build(&self) -> Result<Types, Error> {
++        let defs = self.definitions();
++        let has_selected = self.selections.iter().any(|s| !s.is_negated());
++
++        let mut selections = vec![];
++        let mut glob_to_selection = vec![];
++        let mut build_set = GlobSetBuilder::new();
++        for (isel, selection) in self.selections.iter().enumerate() {
++            let def = match self.types.get(selection.name()) {
++                Some(def) => def.clone(),
++                None => {
++                    let name = selection.name().to_string();
++                    return Err(Error::UnrecognizedFileType(name));
++                }
++            };
++            for (iglob, glob) in def.globs.iter().enumerate() {
++                build_set.add(try!(
++                    GlobBuilder::new(glob)
++                        .literal_separator(true)
++                        .build()
++                        .map_err(|err| {
++                            Error::Glob {
++                                glob: Some(glob.to_string()),
++                                err: err.kind().to_string(),
++                            }
++                        })));
++                glob_to_selection.push((isel, iglob));
++            }
++            selections.push(selection.clone().map(move |_| def));
++        }
++        let set = try!(build_set.build().map_err(|err| {
++            Error::Glob { glob: None, err: err.to_string() }
++        }));
++        Ok(Types {
++            defs: defs,
++            selections: selections,
++            has_selected: has_selected,
++            glob_to_selection: glob_to_selection,
++            set: set,
++            matches: Arc::new(ThreadLocal::default()),
++        })
++    }
++
++    /// Return the set of current file type definitions.
++    ///
++    /// Definitions and globs are sorted.
++    pub fn definitions(&self) -> Vec<FileTypeDef> {
++        let mut defs = vec![];
++        for def in self.types.values() {
++            let mut def = def.clone();
++            def.globs.sort();
++            defs.push(def);
++        }
++        defs.sort_by(|def1, def2| def1.name().cmp(def2.name()));
++        defs
++    }
++
++    /// Select the file type given by `name`.
++    ///
++    /// If `name` is `all`, then all file types currently defined are selected.
++    pub fn select(&mut self, name: &str) -> &mut TypesBuilder {
++        if name == "all" {
++            for name in self.types.keys() {
++                self.selections.push(Selection::Select(name.to_string(), ()));
++            }
++        } else {
++            self.selections.push(Selection::Select(name.to_string(), ()));
++        }
++        self
++    }
++
++    /// Ignore the file type given by `name`.
++    ///
++    /// If `name` is `all`, then all file types currently defined are negated.
++    pub fn negate(&mut self, name: &str) -> &mut TypesBuilder {
++        if name == "all" {
++            for name in self.types.keys() {
++                self.selections.push(Selection::Negate(name.to_string(), ()));
++            }
++        } else {
++            self.selections.push(Selection::Negate(name.to_string(), ()));
++        }
++        self
++    }
++
++    /// Clear any file type definitions for the type name given.
++    pub fn clear(&mut self, name: &str) -> &mut TypesBuilder {
++        self.types.remove(name);
++        self
++    }
++
++    /// Add a new file type definition. `name` can be arbitrary and `pat`
++    /// should be a glob recognizing file paths belonging to the `name` type.
++    ///
++    /// If `name` is `all` or otherwise contains any character that is not a
++    /// Unicode letter or number, then an error is returned.
++    pub fn add(&mut self, name: &str, glob: &str) -> Result<(), Error> {
++        lazy_static! {
++            static ref RE: Regex = Regex::new(r"^[\pL\pN]+$").unwrap();
++        };
++        if name == "all" || !RE.is_match(name) {
++            return Err(Error::InvalidDefinition);
++        }
++        let (key, glob) = (name.to_string(), glob.to_string());
++        self.types.entry(key).or_insert_with(|| {
++            FileTypeDef { name: name.to_string(), globs: vec![] }
++        }).globs.push(glob);
++        Ok(())
++    }
++
++    /// Add a new file type definition specified in string form. There are two
++    /// valid formats:
++    /// 1. `{name}:{glob}`.  This defines a 'root' definition that associates the
++    ///     given name with the given glob.
++    /// 2. `{name}:include:{comma-separated list of already defined names}.
++    ///     This defines an 'include' definition that associates the given name
++    ///     with the definitions of the given existing types.
++    /// Names may not include any characters that are not
++    /// Unicode letters or numbers.
++    pub fn add_def(&mut self, def: &str) -> Result<(), Error> {
++        let parts: Vec<&str> = def.split(':').collect();
++        match parts.len() {
++            2 => {
++                let name = parts[0];
++                let glob = parts[1];
++                if name.is_empty() || glob.is_empty() {
++                    return Err(Error::InvalidDefinition);
++                }
++                self.add(name, glob)
++            }
++            3 => {
++                let name = parts[0];
++                let types_string = parts[2];
++                if name.is_empty() || parts[1] != "include" || types_string.is_empty() {
++                    return Err(Error::InvalidDefinition);
++                }
++                let types = types_string.split(',');
++                // Check ahead of time to ensure that all types specified are
++                // present and fail fast if not.
++                if types.clone().any(|t| !self.types.contains_key(t)) {
++                    return Err(Error::InvalidDefinition);
++                }
++                for type_name in types {
++                    let globs = self.types.get(type_name).unwrap().globs.clone();
++                    for glob in globs {
++                        try!(self.add(name, &glob));
++                    }
++                }
++                Ok(())
++            }
++            _ => Err(Error::InvalidDefinition)
++        }
++    }
++
++    /// Add a set of default file type definitions.
++    pub fn add_defaults(&mut self) -> &mut TypesBuilder {
++        static MSG: &'static str = "adding a default type should never fail";
++        for &(name, exts) in DEFAULT_TYPES {
++            for ext in exts {
++                self.add(name, ext).expect(MSG);
++            }
++        }
++        self
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use super::TypesBuilder;
++
++    macro_rules! matched {
++        ($name:ident, $types:expr, $sel:expr, $selnot:expr,
++         $path:expr) => {
++            matched!($name, $types, $sel, $selnot, $path, true);
++        };
++        (not, $name:ident, $types:expr, $sel:expr, $selnot:expr,
++         $path:expr) => {
++            matched!($name, $types, $sel, $selnot, $path, false);
++        };
++        ($name:ident, $types:expr, $sel:expr, $selnot:expr,
++         $path:expr, $matched:expr) => {
++            #[test]
++            fn $name() {
++                let mut btypes = TypesBuilder::new();
++                for tydef in $types {
++                    btypes.add_def(tydef).unwrap();
++                }
++                for sel in $sel {
++                    btypes.select(sel);
++                }
++                for selnot in $selnot {
++                    btypes.negate(selnot);
++                }
++                let types = btypes.build().unwrap();
++                let mat = types.matched($path, false);
++                assert_eq!($matched, !mat.is_ignore());
++            }
++        };
++    }
++
++    fn types() -> Vec<&'static str> {
++        vec![
++            "html:*.html",
++            "html:*.htm",
++            "rust:*.rs",
++            "js:*.js",
++            "foo:*.{rs,foo}",
++            "combo:include:html,rust"
++        ]
++    }
++
++    matched!(match1, types(), vec!["rust"], vec![], "lib.rs");
++    matched!(match2, types(), vec!["html"], vec![], "index.html");
++    matched!(match3, types(), vec!["html"], vec![], "index.htm");
++    matched!(match4, types(), vec!["html", "rust"], vec![], "main.rs");
++    matched!(match5, types(), vec![], vec![], "index.html");
++    matched!(match6, types(), vec![], vec!["rust"], "index.html");
++    matched!(match7, types(), vec!["foo"], vec!["rust"], "main.foo");
++    matched!(match8, types(), vec!["combo"], vec![], "index.html");
++    matched!(match9, types(), vec!["combo"], vec![], "lib.rs");
++
++    matched!(not, matchnot1, types(), vec!["rust"], vec![], "index.html");
++    matched!(not, matchnot2, types(), vec![], vec!["rust"], "main.rs");
++    matched!(not, matchnot3, types(), vec!["foo"], vec!["rust"], "main.rs");
++    matched!(not, matchnot4, types(), vec!["rust"], vec!["foo"], "main.rs");
++    matched!(not, matchnot5, types(), vec!["rust"], vec!["foo"], "main.foo");
++    matched!(not, matchnot6, types(), vec!["combo"], vec![], "leftpad.js");
++
++    #[test]
++    fn test_invalid_defs() {
++        let mut btypes = TypesBuilder::new();
++        for tydef in types() {
++            btypes.add_def(tydef).unwrap();
++        }
++        // Preserve the original definitions for later comparison.
++        let original_defs = btypes.definitions();
++        let bad_defs = vec![
++            // Reference to type that does not exist
++            "combo:include:html,python",
++            // Bad format
++            "combo:foobar:html,rust",
++            ""
++        ];
++        for def in bad_defs {
++            assert!(btypes.add_def(def).is_err());
++            // Ensure that nothing changed, even if some of the includes were valid.
++            assert_eq!(btypes.definitions(), original_defs);
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fdb1283236f48c3a0cdf00f776b52b0cb471595d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1565 @@@
++use std::cmp;
++use std::ffi::{OsStr, OsString};
++use std::fmt;
++use std::fs::{self, FileType, Metadata};
++use std::io;
++use std::path::{Path, PathBuf};
++use std::sync::Arc;
++use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
++use std::thread;
++use std::time::Duration;
++use std::vec;
++
++use crossbeam::sync::MsQueue;
++use walkdir::{self, WalkDir, WalkDirIterator, is_same_file};
++
++use dir::{Ignore, IgnoreBuilder};
++use gitignore::GitignoreBuilder;
++use overrides::Override;
++use types::Types;
++use {Error, PartialErrorBuilder};
++
++/// A directory entry with a possible error attached.
++///
++/// The error typically refers to a problem parsing ignore files in a
++/// particular directory.
++#[derive(Debug)]
++pub struct DirEntry {
++    dent: DirEntryInner,
++    err: Option<Error>,
++}
++
++impl DirEntry {
++    /// The full path that this entry represents.
++    pub fn path(&self) -> &Path {
++        self.dent.path()
++    }
++
++    /// Whether this entry corresponds to a symbolic link or not.
++    pub fn path_is_symbolic_link(&self) -> bool {
++        self.dent.path_is_symbolic_link()
++    }
++
++    /// Returns true if and only if this entry corresponds to stdin.
++    ///
++    /// i.e., The entry has depth 0 and its file name is `-`.
++    pub fn is_stdin(&self) -> bool {
++        self.dent.is_stdin()
++    }
++
++    /// Return the metadata for the file that this entry points to.
++    pub fn metadata(&self) -> Result<Metadata, Error> {
++        self.dent.metadata()
++    }
++
++    /// Return the file type for the file that this entry points to.
++    ///
++    /// This entry doesn't have a file type if it corresponds to stdin.
++    pub fn file_type(&self) -> Option<FileType> {
++        self.dent.file_type()
++    }
++
++    /// Return the file name of this entry.
++    ///
++    /// If this entry has no file name (e.g., `/`), then the full path is
++    /// returned.
++    pub fn file_name(&self) -> &OsStr {
++        self.dent.file_name()
++    }
++
++    /// Returns the depth at which this entry was created relative to the root.
++    pub fn depth(&self) -> usize {
++        self.dent.depth()
++    }
++
++    /// Returns the underlying inode number if one exists.
++    ///
++    /// If this entry doesn't have an inode number, then `None` is returned.
++    #[cfg(unix)]
++    pub fn ino(&self) -> Option<u64> {
++        self.dent.ino()
++    }
++
++    /// Returns an error, if one exists, associated with processing this entry.
++    ///
++    /// An example of an error is one that occurred while parsing an ignore
++    /// file.
++    pub fn error(&self) -> Option<&Error> {
++        self.err.as_ref()
++    }
++
++    fn new_stdin() -> DirEntry {
++        DirEntry {
++            dent: DirEntryInner::Stdin,
++            err: None,
++        }
++    }
++
++    fn new_walkdir(dent: walkdir::DirEntry, err: Option<Error>) -> DirEntry {
++        DirEntry {
++            dent: DirEntryInner::Walkdir(dent),
++            err: err,
++        }
++    }
++
++    fn new_raw(dent: DirEntryRaw, err: Option<Error>) -> DirEntry {
++        DirEntry {
++            dent: DirEntryInner::Raw(dent),
++            err: err,
++        }
++    }
++}
++
++/// DirEntryInner is the implementation of DirEntry.
++///
++/// It specifically represents three distinct sources of directory entries:
++///
++/// 1. From the walkdir crate.
++/// 2. Special entries that represent things like stdin.
++/// 3. From a path.
++///
++/// Specifically, (3) has to essentially re-create the DirEntry implementation
++/// from WalkDir.
++#[derive(Debug)]
++enum DirEntryInner {
++    Stdin,
++    Walkdir(walkdir::DirEntry),
++    Raw(DirEntryRaw),
++}
++
++impl DirEntryInner {
++    fn path(&self) -> &Path {
++        use self::DirEntryInner::*;
++        match *self {
++            Stdin => Path::new("<stdin>"),
++            Walkdir(ref x) => x.path(),
++            Raw(ref x) => x.path(),
++        }
++    }
++
++    fn path_is_symbolic_link(&self) -> bool {
++        use self::DirEntryInner::*;
++        match *self {
++            Stdin => false,
++            Walkdir(ref x) => x.path_is_symbolic_link(),
++            Raw(ref x) => x.path_is_symbolic_link(),
++        }
++    }
++
++    fn is_stdin(&self) -> bool {
++        match *self {
++            DirEntryInner::Stdin => true,
++            _ => false,
++        }
++    }
++
++    fn metadata(&self) -> Result<Metadata, Error> {
++        use self::DirEntryInner::*;
++        match *self {
++            Stdin => {
++                let err = Error::Io(io::Error::new(
++                    io::ErrorKind::Other, "<stdin> has no metadata"));
++                Err(err.with_path("<stdin>"))
++            }
++            Walkdir(ref x) => {
++                x.metadata().map_err(|err| {
++                    Error::Io(io::Error::from(err)).with_path(x.path())
++                })
++            }
++            Raw(ref x) => x.metadata(),
++        }
++    }
++
++    fn file_type(&self) -> Option<FileType> {
++        use self::DirEntryInner::*;
++        match *self {
++            Stdin => None,
++            Walkdir(ref x) => Some(x.file_type()),
++            Raw(ref x) => Some(x.file_type()),
++        }
++    }
++
++    fn file_name(&self) -> &OsStr {
++        use self::DirEntryInner::*;
++        match *self {
++            Stdin => OsStr::new("<stdin>"),
++            Walkdir(ref x) => x.file_name(),
++            Raw(ref x) => x.file_name(),
++        }
++    }
++
++    fn depth(&self) -> usize {
++        use self::DirEntryInner::*;
++        match *self {
++            Stdin => 0,
++            Walkdir(ref x) => x.depth(),
++            Raw(ref x) => x.depth(),
++        }
++    }
++
++    #[cfg(unix)]
++    fn ino(&self) -> Option<u64> {
++        use self::DirEntryInner::*;
++        match *self {
++            Stdin => None,
++            Walkdir(ref x) => Some(x.ino()),
++            Raw(ref x) => Some(x.ino()),
++        }
++    }
++}
++
++/// DirEntryRaw is essentially copied from the walkdir crate so that we can
++/// build `DirEntry`s from whole cloth in the parallel iterator.
++struct DirEntryRaw {
++    /// The path as reported by the `fs::ReadDir` iterator (even if it's a
++    /// symbolic link).
++    path: PathBuf,
++    /// The file type. Necessary for recursive iteration, so store it.
++    ty: FileType,
++    /// Is set when this entry was created from a symbolic link and the user
++    /// expects the iterator to follow symbolic links.
++    follow_link: bool,
++    /// The depth at which this entry was generated relative to the root.
++    depth: usize,
++    /// The underlying inode number (Unix only).
++    #[cfg(unix)]
++    ino: u64,
++}
++
++impl fmt::Debug for DirEntryRaw {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        // Leaving out FileType because it doesn't have a debug impl
++        // in Rust 1.9. We could add it if we really wanted to by manually
++        // querying each possibly file type. Meh. ---AG
++        f.debug_struct("DirEntryRaw")
++            .field("path", &self.path)
++            .field("follow_link", &self.follow_link)
++            .field("depth", &self.depth)
++            .finish()
++    }
++}
++
++impl DirEntryRaw {
++    fn path(&self) -> &Path {
++        &self.path
++    }
++
++    fn path_is_symbolic_link(&self) -> bool {
++        self.ty.is_symlink() || self.follow_link
++    }
++
++    fn metadata(&self) -> Result<Metadata, Error> {
++        if self.follow_link {
++            fs::metadata(&self.path)
++        } else {
++            fs::symlink_metadata(&self.path)
++        }.map_err(|err| Error::Io(io::Error::from(err)).with_path(&self.path))
++    }
++
++    fn file_type(&self) -> FileType {
++        self.ty
++    }
++
++    fn file_name(&self) -> &OsStr {
++        self.path.file_name().unwrap_or_else(|| self.path.as_os_str())
++    }
++
++    fn depth(&self) -> usize {
++        self.depth
++    }
++
++    #[cfg(unix)]
++    fn ino(&self) -> u64 {
++        self.ino
++    }
++
++    fn from_entry(
++        depth: usize,
++        ent: &fs::DirEntry,
++    ) -> Result<DirEntryRaw, Error> {
++        let ty = try!(ent.file_type().map_err(|err| {
++            let err = Error::Io(io::Error::from(err)).with_path(ent.path());
++            Error::WithDepth {
++                depth: depth,
++                err: Box::new(err),
++            }
++        }));
++        Ok(DirEntryRaw::from_entry_os(depth, ent, ty))
++    }
++
++    #[cfg(not(unix))]
++    fn from_entry_os(
++        depth: usize,
++        ent: &fs::DirEntry,
++        ty: fs::FileType,
++    ) -> DirEntryRaw {
++        DirEntryRaw {
++            path: ent.path(),
++            ty: ty,
++            follow_link: false,
++            depth: depth,
++        }
++    }
++
++    #[cfg(unix)]
++    fn from_entry_os(
++        depth: usize,
++        ent: &fs::DirEntry,
++        ty: fs::FileType,
++    ) -> DirEntryRaw {
++        use std::os::unix::fs::DirEntryExt;
++
++        DirEntryRaw {
++            path: ent.path(),
++            ty: ty,
++            follow_link: false,
++            depth: depth,
++            ino: ent.ino(),
++        }
++    }
++
++    #[cfg(not(unix))]
++    fn from_link(depth: usize, pb: PathBuf) -> Result<DirEntryRaw, Error> {
++        let md = try!(fs::metadata(&pb).map_err(|err| {
++            Error::Io(err).with_path(&pb)
++        }));
++        Ok(DirEntryRaw {
++            path: pb,
++            ty: md.file_type(),
++            follow_link: true,
++            depth: depth,
++        })
++    }
++
++    #[cfg(unix)]
++    fn from_link(depth: usize, pb: PathBuf) -> Result<DirEntryRaw, Error> {
++        use std::os::unix::fs::MetadataExt;
++
++        let md = try!(fs::metadata(&pb).map_err(|err| {
++            Error::Io(err).with_path(&pb)
++        }));
++        Ok(DirEntryRaw {
++            path: pb,
++            ty: md.file_type(),
++            follow_link: true,
++            depth: depth,
++            ino: md.ino(),
++        })
++    }
++}
++
++/// WalkBuilder builds a recursive directory iterator.
++///
++/// The builder supports a large number of configurable options. This includes
++/// specific glob overrides, file type matching, toggling whether hidden
++/// files are ignored or not, and of course, support for respecting gitignore
++/// files.
++///
++/// By default, all ignore files found are respected. This includes `.ignore`,
++/// `.gitignore`, `.git/info/exclude` and even your global gitignore
++/// globs, usually found in `$XDG_CONFIG_HOME/git/ignore`.
++///
++/// Some standard recursive directory options are also supported, such as
++/// limiting the recursive depth or whether to follow symbolic links (disabled
++/// by default).
++///
++/// # Ignore rules
++///
++/// There are many rules that influence whether a particular file or directory
++/// is skipped by this iterator. Those rules are documented here. Note that
++/// the rules assume a default configuration.
++///
++/// * First, glob overrides are checked. If a path matches a glob override,
++/// then matching stops. The path is then only skipped if the glob that matched
++/// the path is an ignore glob. (An override glob is a whitelist glob unless it
++/// starts with a `!`, in which case it is an ignore glob.)
++/// * Second, ignore files are checked. Ignore files currently only come from
++/// git ignore files (`.gitignore`, `.git/info/exclude` and the configured
++/// global gitignore file), plain `.ignore` files, which have the same format
++/// as gitignore files, or explicitly added ignore files. The precedence order
++/// is: `.ignore`, `.gitignore`, `.git/info/exclude`, global gitignore and
++/// finally explicitly added ignore files. Note that precedence between
++/// different types of ignore files is not impacted by the directory hierarchy;
++/// any `.ignore` file overrides all `.gitignore` files. Within each precedence
++/// level, more nested ignore files have a higher precedence than less nested
++/// ignore files.
++/// * Third, if the previous step yields an ignore match, then all matching
++/// is stopped and the path is skipped. If it yields a whitelist match, then
++/// matching continues. A whitelist match can be overridden by a later matcher.
++/// * Fourth, unless the path is a directory, the file type matcher is run on
++/// the path. As above, if it yields an ignore match, then all matching is
++/// stopped and the path is skipped. If it yields a whitelist match, then
++/// matching continues.
++/// * Fifth, if the path hasn't been whitelisted and it is hidden, then the
++/// path is skipped.
++/// * Sixth, unless the path is a directory, the size of the file is compared
++/// against the max filesize limit. If it exceeds the limit, it is skipped.
++/// * Seventh, if the path has made it this far then it is yielded in the
++/// iterator.
++#[derive(Clone)]
++pub struct WalkBuilder {
++    paths: Vec<PathBuf>,
++    ig_builder: IgnoreBuilder,
++    parents: bool,
++    max_depth: Option<usize>,
++    max_filesize: Option<u64>,
++    follow_links: bool,
++    sorter: Option<Arc<Fn(&OsString, &OsString) -> cmp::Ordering + 'static>>,
++    threads: usize,
++}
++
++impl fmt::Debug for WalkBuilder {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.debug_struct("WalkBuilder")
++            .field("paths", &self.paths)
++            .field("ig_builder", &self.ig_builder)
++            .field("parents", &self.parents)
++            .field("max_depth", &self.max_depth)
++            .field("max_filesize", &self.max_filesize)
++            .field("follow_links", &self.follow_links)
++            .field("threads", &self.threads)
++            .finish()
++    }
++}
++
++impl WalkBuilder {
++    /// Create a new builder for a recursive directory iterator for the
++    /// directory given.
++    ///
++    /// Note that if you want to traverse multiple different directories, it
++    /// is better to call `add` on this builder than to create multiple
++    /// `Walk` values.
++    pub fn new<P: AsRef<Path>>(path: P) -> WalkBuilder {
++        WalkBuilder {
++            paths: vec![path.as_ref().to_path_buf()],
++            ig_builder: IgnoreBuilder::new(),
++            parents: true,
++            max_depth: None,
++            max_filesize: None,
++            follow_links: false,
++            sorter: None,
++            threads: 0,
++        }
++    }
++
++    /// Build a new `Walk` iterator.
++    pub fn build(&self) -> Walk {
++        let follow_links = self.follow_links;
++        let max_depth = self.max_depth;
++        let cmp = self.sorter.clone();
++        let its = self.paths.iter().map(move |p| {
++            if p == Path::new("-") {
++                (p.to_path_buf(), None)
++            } else {
++                let mut wd = WalkDir::new(p);
++                wd = wd.follow_links(follow_links || p.is_file());
++                if let Some(max_depth) = max_depth {
++                    wd = wd.max_depth(max_depth);
++                }
++                if let Some(ref cmp) = cmp {
++                    let cmp = cmp.clone();
++                    wd = wd.sort_by(move |a, b| cmp(a, b));
++                }
++                (p.to_path_buf(), Some(WalkEventIter::from(wd)))
++            }
++        }).collect::<Vec<_>>().into_iter();
++        let ig_root = self.ig_builder.build();
++        Walk {
++            its: its,
++            it: None,
++            ig_root: ig_root.clone(),
++            ig: ig_root.clone(),
++            max_filesize: self.max_filesize,
++            parents: self.parents,
++        }
++    }
++
++    /// Build a new `WalkParallel` iterator.
++    ///
++    /// Note that this *doesn't* return something that implements `Iterator`.
++    /// Instead, the returned value must be run with a closure. e.g.,
++    /// `builder.build_parallel().run(|| |path| println!("{:?}", path))`.
++    pub fn build_parallel(&self) -> WalkParallel {
++        WalkParallel {
++            paths: self.paths.clone().into_iter(),
++            ig_root: self.ig_builder.build(),
++            max_depth: self.max_depth,
++            max_filesize: self.max_filesize,
++            follow_links: self.follow_links,
++            parents: self.parents,
++            threads: self.threads,
++        }
++    }
++
++    /// Add a file path to the iterator.
++    ///
++    /// Each additional file path added is traversed recursively. This should
++    /// be preferred over building multiple `Walk` iterators since this
++    /// enables reusing resources across iteration.
++    pub fn add<P: AsRef<Path>>(&mut self, path: P) -> &mut WalkBuilder {
++        self.paths.push(path.as_ref().to_path_buf());
++        self
++    }
++
++    /// The maximum depth to recurse.
++    ///
++    /// The default, `None`, imposes no depth restriction.
++    pub fn max_depth(&mut self, depth: Option<usize>) -> &mut WalkBuilder {
++        self.max_depth = depth;
++        self
++    }
++
++    /// Whether to follow symbolic links or not.
++    pub fn follow_links(&mut self, yes: bool) -> &mut WalkBuilder {
++        self.follow_links = yes;
++        self
++    }
++
++    /// Whether to ignore files above the specified limit.
++    pub fn max_filesize(&mut self, filesize: Option<u64>) -> &mut WalkBuilder {
++        self.max_filesize = filesize;
++        self
++    }
++
++    /// The number of threads to use for traversal.
++    ///
++    /// Note that this only has an effect when using `build_parallel`.
++    ///
++    /// The default setting is `0`, which chooses the number of threads
++    /// automatically using heuristics.
++    pub fn threads(&mut self, n: usize) -> &mut WalkBuilder {
++        self.threads = n;
++        self
++    }
++
++    /// Add an ignore file to the matcher.
++    ///
++    /// This has lower precedence than all other sources of ignore rules.
++    ///
++    /// If there was a problem adding the ignore file, then an error is
++    /// returned. Note that the error may indicate *partial* failure. For
++    /// example, if an ignore file contains an invalid glob, all other globs
++    /// are still applied.
++    pub fn add_ignore<P: AsRef<Path>>(&mut self, path: P) -> Option<Error> {
++        let mut builder = GitignoreBuilder::new("");
++        let mut errs = PartialErrorBuilder::default();
++        errs.maybe_push(builder.add(path));
++        match builder.build() {
++            Ok(gi) => { self.ig_builder.add_ignore(gi); }
++            Err(err) => { errs.push(err); }
++        }
++        errs.into_error_option()
++    }
++
++    /// Add an override matcher.
++    ///
++    /// By default, no override matcher is used.
++    ///
++    /// This overrides any previous setting.
++    pub fn overrides(&mut self, overrides: Override) -> &mut WalkBuilder {
++        self.ig_builder.overrides(overrides);
++        self
++    }
++
++    /// Add a file type matcher.
++    ///
++    /// By default, no file type matcher is used.
++    ///
++    /// This overrides any previous setting.
++    pub fn types(&mut self, types: Types) -> &mut WalkBuilder {
++        self.ig_builder.types(types);
++        self
++    }
++
++    /// Enables ignoring hidden files.
++    ///
++    /// This is enabled by default.
++    pub fn hidden(&mut self, yes: bool) -> &mut WalkBuilder {
++        self.ig_builder.hidden(yes);
++        self
++    }
++
++    /// Enables reading ignore files from parent directories.
++    ///
++    /// If this is enabled, then the parent directories of each file path given
++    /// are traversed for ignore files (subject to the ignore settings on
++    /// this builder). Note that file paths are canonicalized with respect to
++    /// the current working directory in order to determine parent directories.
++    ///
++    /// This is enabled by default.
++    pub fn parents(&mut self, yes: bool) -> &mut WalkBuilder {
++        self.parents = yes;
++        self
++    }
++
++    /// Enables reading `.ignore` files.
++    ///
++    /// `.ignore` files have the same semantics as `gitignore` files and are
++    /// supported by search tools such as ripgrep and The Silver Searcher.
++    ///
++    /// This is enabled by default.
++    pub fn ignore(&mut self, yes: bool) -> &mut WalkBuilder {
++        self.ig_builder.ignore(yes);
++        self
++    }
++
++    /// Enables reading a global gitignore file, whose path is specified in
++    /// git's `core.excludesFile` config option.
++    ///
++    /// Git's config file location is `$HOME/.gitconfig`. If `$HOME/.gitconfig`
++    /// does not exist or does not specify `core.excludesFile`, then
++    /// `$XDG_CONFIG_HOME/git/ignore` is read. If `$XDG_CONFIG_HOME` is not
++    /// set or is empty, then `$HOME/.config/git/ignore` is used instead.
++    pub fn git_global(&mut self, yes: bool) -> &mut WalkBuilder {
++        self.ig_builder.git_global(yes);
++        self
++    }
++
++    /// Enables reading `.gitignore` files.
++    ///
++    /// `.gitignore` files have match semantics as described in the `gitignore`
++    /// man page.
++    ///
++    /// This is enabled by default.
++    pub fn git_ignore(&mut self, yes: bool) -> &mut WalkBuilder {
++        self.ig_builder.git_ignore(yes);
++        self
++    }
++
++    /// Enables reading `.git/info/exclude` files.
++    ///
++    /// `.git/info/exclude` files have match semantics as described in the
++    /// `gitignore` man page.
++    ///
++    /// This is enabled by default.
++    pub fn git_exclude(&mut self, yes: bool) -> &mut WalkBuilder {
++        self.ig_builder.git_exclude(yes);
++        self
++    }
++
++    /// Set a function for sorting directory entries.
++    ///
++    /// If a compare function is set, the resulting iterator will return all
++    /// paths in sorted order. The compare function will be called to compare
++    /// names from entries from the same directory using only the name of the
++    /// entry.
++    ///
++    /// Note that this is not used in the parallel iterator.
++    pub fn sort_by<F>(&mut self, cmp: F) -> &mut WalkBuilder
++            where F: Fn(&OsString, &OsString) -> cmp::Ordering + 'static {
++        self.sorter = Some(Arc::new(cmp));
++        self
++    }
++}
++
++/// Walk is a recursive directory iterator over file paths in one or more
++/// directories.
++///
++/// Only file and directory paths matching the rules are returned. By default,
++/// ignore files like `.gitignore` are respected. The precise matching rules
++/// and precedence is explained in the documentation for `WalkBuilder`.
++pub struct Walk {
++    its: vec::IntoIter<(PathBuf, Option<WalkEventIter>)>,
++    it: Option<WalkEventIter>,
++    ig_root: Ignore,
++    ig: Ignore,
++    max_filesize: Option<u64>,
++    parents: bool,
++}
++
++impl Walk {
++    /// Creates a new recursive directory iterator for the file path given.
++    ///
++    /// Note that this uses default settings, which include respecting
++    /// `.gitignore` files. To configure the iterator, use `WalkBuilder`
++    /// instead.
++    pub fn new<P: AsRef<Path>>(path: P) -> Walk {
++        WalkBuilder::new(path).build()
++    }
++
++    fn skip_entry(&self, ent: &walkdir::DirEntry) -> bool {
++        if ent.depth() == 0 {
++            return false;
++        }
++
++        let is_dir = ent.file_type().is_dir();
++        let max_size = self.max_filesize;
++        let should_skip_path = skip_path(&self.ig, ent.path(), is_dir);
++        let should_skip_filesize = if !is_dir && max_size.is_some() {
++            skip_filesize(max_size.unwrap(), ent.path(), &ent.metadata().ok())
++        } else {
++            false
++        };
++
++        should_skip_path || should_skip_filesize
++    }
++}
++
++impl Iterator for Walk {
++    type Item = Result<DirEntry, Error>;
++
++    #[inline(always)]
++    fn next(&mut self) -> Option<Result<DirEntry, Error>> {
++        loop {
++            let ev = match self.it.as_mut().and_then(|it| it.next()) {
++                Some(ev) => ev,
++                None => {
++                    match self.its.next() {
++                        None => return None,
++                        Some((_, None)) => {
++                            return Some(Ok(DirEntry::new_stdin()));
++                        }
++                        Some((path, Some(it))) => {
++                            self.it = Some(it);
++                            if self.parents && path.is_dir() {
++                                let (ig, err) = self.ig_root.add_parents(path);
++                                self.ig = ig;
++                                if let Some(err) = err {
++                                    return Some(Err(err));
++                                }
++                            } else {
++                                self.ig = self.ig_root.clone();
++                            }
++                        }
++                    }
++                    continue;
++                }
++            };
++            match ev {
++                Err(err) => {
++                    return Some(Err(Error::from(err)));
++                }
++                Ok(WalkEvent::Exit) => {
++                    self.ig = self.ig.parent().unwrap();
++                }
++                Ok(WalkEvent::Dir(ent)) => {
++                    if self.skip_entry(&ent) {
++                        self.it.as_mut().unwrap().it.skip_current_dir();
++                        // Still need to push this on the stack because
++                        // we'll get a WalkEvent::Exit event for this dir.
++                        // We don't care if it errors though.
++                        let (igtmp, _) = self.ig.add_child(ent.path());
++                        self.ig = igtmp;
++                        continue;
++                    }
++                    let (igtmp, err) = self.ig.add_child(ent.path());
++                    self.ig = igtmp;
++                    return Some(Ok(DirEntry::new_walkdir(ent, err)));
++                }
++                Ok(WalkEvent::File(ent)) => {
++                    if self.skip_entry(&ent) {
++                        continue;
++                    }
++                    return Some(Ok(DirEntry::new_walkdir(ent, None)));
++                }
++            }
++        }
++    }
++}
++
++/// WalkEventIter transforms a WalkDir iterator into an iterator that more
++/// accurately describes the directory tree. Namely, it emits events that are
++/// one of three types: directory, file or "exit." An "exit" event means that
++/// the entire contents of a directory have been enumerated.
++struct WalkEventIter {
++    depth: usize,
++    it: walkdir::Iter,
++    next: Option<Result<walkdir::DirEntry, walkdir::Error>>,
++}
++
++#[derive(Debug)]
++enum WalkEvent {
++    Dir(walkdir::DirEntry),
++    File(walkdir::DirEntry),
++    Exit,
++}
++
++impl From<WalkDir> for WalkEventIter {
++    fn from(it: WalkDir) -> WalkEventIter {
++        WalkEventIter { depth: 0, it: it.into_iter(), next: None }
++    }
++}
++
++impl Iterator for WalkEventIter {
++    type Item = walkdir::Result<WalkEvent>;
++
++    #[inline(always)]
++    fn next(&mut self) -> Option<walkdir::Result<WalkEvent>> {
++        let dent = self.next.take().or_else(|| self.it.next());
++        let depth = match dent {
++            None => 0,
++            Some(Ok(ref dent)) => dent.depth(),
++            Some(Err(ref err)) => err.depth(),
++        };
++        if depth < self.depth {
++            self.depth -= 1;
++            self.next = dent;
++            return Some(Ok(WalkEvent::Exit));
++        }
++        self.depth = depth;
++        match dent {
++            None => None,
++            Some(Err(err)) => Some(Err(err)),
++            Some(Ok(dent)) => {
++                if dent.file_type().is_dir() {
++                    self.depth += 1;
++                    Some(Ok(WalkEvent::Dir(dent)))
++                } else {
++                    Some(Ok(WalkEvent::File(dent)))
++                }
++            }
++        }
++    }
++}
++
++/// WalkState is used in the parallel recursive directory iterator to indicate
++/// whether walking should continue as normal, skip descending into a
++/// particular directory or quit the walk entirely.
++#[derive(Clone, Copy, Debug, Eq, PartialEq)]
++pub enum WalkState {
++    /// Continue walking as normal.
++    Continue,
++    /// If the directory entry given is a directory, don't descend into it.
++    /// In all other cases, this has no effect.
++    Skip,
++    /// Quit the entire iterator as soon as possible.
++    ///
++    /// Note that this is an inherently asynchronous action. It is possible
++    /// for more entries to be yielded even after instructing the iterator
++    /// to quit.
++    Quit,
++}
++
++impl WalkState {
++    fn is_quit(&self) -> bool {
++        *self == WalkState::Quit
++    }
++}
++
++/// WalkParallel is a parallel recursive directory iterator over files paths
++/// in one or more directories.
++///
++/// Only file and directory paths matching the rules are returned. By default,
++/// ignore files like `.gitignore` are respected. The precise matching rules
++/// and precedence is explained in the documentation for `WalkBuilder`.
++///
++/// Unlike `Walk`, this uses multiple threads for traversing a directory.
++pub struct WalkParallel {
++    paths: vec::IntoIter<PathBuf>,
++    ig_root: Ignore,
++    parents: bool,
++    max_filesize: Option<u64>,
++    max_depth: Option<usize>,
++    follow_links: bool,
++    threads: usize,
++}
++
++impl WalkParallel {
++    /// Execute the parallel recursive directory iterator. `mkf` is called
++    /// for each thread used for iteration. The function produced by `mkf`
++    /// is then in turn called for each visited file path.
++    pub fn run<F>(
++        self,
++        mut mkf: F,
++    ) where F: FnMut() -> Box<FnMut(Result<DirEntry, Error>) -> WalkState + Send + 'static> {
++        let mut f = mkf();
++        let threads = self.threads();
++        let queue = Arc::new(MsQueue::new());
++        let mut any_work = false;
++        // Send the initial set of root paths to the pool of workers.
++        // Note that we only send directories. For files, we send to them the
++        // callback directly.
++        for path in self.paths {
++            let dent =
++                if path == Path::new("-") {
++                    DirEntry::new_stdin()
++                } else {
++                    match DirEntryRaw::from_link(0, path) {
++                        Ok(dent) => DirEntry::new_raw(dent, None),
++                        Err(err) => {
++                            if f(Err(err)).is_quit() {
++                                return;
++                            }
++                            continue;
++                        }
++                    }
++                };
++            queue.push(Message::Work(Work {
++                dent: dent,
++                ignore: self.ig_root.clone(),
++            }));
++            any_work = true;
++        }
++        // ... but there's no need to start workers if we don't need them.
++        if !any_work {
++            return;
++        }
++        // Create the workers and then wait for them to finish.
++        let num_waiting = Arc::new(AtomicUsize::new(0));
++        let num_quitting = Arc::new(AtomicUsize::new(0));
++        let quit_now = Arc::new(AtomicBool::new(false));
++        let mut handles = vec![];
++        for _ in 0..threads {
++            let worker = Worker {
++                f: mkf(),
++                queue: queue.clone(),
++                quit_now: quit_now.clone(),
++                is_waiting: false,
++                is_quitting: false,
++                num_waiting: num_waiting.clone(),
++                num_quitting: num_quitting.clone(),
++                threads: threads,
++                parents: self.parents,
++                max_depth: self.max_depth,
++                max_filesize: self.max_filesize,
++                follow_links: self.follow_links,
++            };
++            handles.push(thread::spawn(|| worker.run()));
++        }
++        for handle in handles {
++            handle.join().unwrap();
++        }
++    }
++
++    fn threads(&self) -> usize {
++        if self.threads == 0 {
++            2
++        } else {
++            self.threads
++        }
++    }
++}
++
++/// Message is the set of instructions that a worker knows how to process.
++enum Message {
++    /// A work item corresponds to a directory that should be descended into.
++    /// Work items for entries that should be skipped or ignored should not
++    /// be produced.
++    Work(Work),
++    /// This instruction indicates that the worker should start quitting.
++    Quit,
++}
++
++/// A unit of work for each worker to process.
++///
++/// Each unit of work corresponds to a directory that should be descended
++/// into.
++struct Work {
++    /// The directory entry.
++    dent: DirEntry,
++    /// Any ignore matchers that have been built for this directory's parents.
++    ignore: Ignore,
++}
++
++impl Work {
++    /// Returns true if and only if this work item is a directory.
++    fn is_dir(&self) -> bool {
++        self.dent.file_type().map_or(false, |t| t.is_dir())
++    }
++
++    /// Adds ignore rules for parent directories.
++    ///
++    /// Note that this only applies to entries at depth 0. On all other
++    /// entries, this is a no-op.
++    fn add_parents(&mut self) -> Option<Error> {
++        if self.dent.depth() > 0 {
++            return None;
++        }
++        // At depth 0, the path of this entry is a root path, so we can
++        // use it directly to add parent ignore rules.
++        let (ig, err) = self.ignore.add_parents(self.dent.path());
++        self.ignore = ig;
++        err
++    }
++
++    /// Reads the directory contents of this work item and adds ignore
++    /// rules for this directory.
++    ///
++    /// If there was a problem with reading the directory contents, then
++    /// an error is returned. If there was a problem reading the ignore
++    /// rules for this directory, then the error is attached to this
++    /// work item's directory entry.
++    fn read_dir(&mut self) -> Result<fs::ReadDir, Error> {
++        let readdir = match fs::read_dir(self.dent.path()) {
++            Ok(readdir) => readdir,
++            Err(err) => {
++                let err = Error::from(err)
++                    .with_path(self.dent.path())
++                    .with_depth(self.dent.depth());
++                return Err(err);
++            }
++        };
++        let (ig, err) = self.ignore.add_child(self.dent.path());
++        self.ignore = ig;
++        self.dent.err = err;
++        Ok(readdir)
++    }
++}
++
++/// A worker is responsible for descending into directories, updating the
++/// ignore matchers, producing new work and invoking the caller's callback.
++///
++/// Note that a worker is *both* a producer and a consumer.
++struct Worker {
++    /// The caller's callback.
++    f: Box<FnMut(Result<DirEntry, Error>) -> WalkState + Send + 'static>,
++    /// A queue of work items. This is multi-producer and multi-consumer.
++    queue: Arc<MsQueue<Message>>,
++    /// Whether all workers should quit at the next opportunity. Note that
++    /// this is distinct from quitting because of exhausting the contents of
++    /// a directory. Instead, this is used when the caller's callback indicates
++    /// that the iterator should quit immediately.
++    quit_now: Arc<AtomicBool>,
++    /// Whether this worker is waiting for more work.
++    is_waiting: bool,
++    /// Whether this worker has started to quit.
++    is_quitting: bool,
++    /// The number of workers waiting for more work.
++    num_waiting: Arc<AtomicUsize>,
++    /// The number of workers waiting to quit.
++    num_quitting: Arc<AtomicUsize>,
++    /// The total number of workers.
++    threads: usize,
++    /// Whether to create ignore matchers for parents of caller specified
++    /// directories.
++    parents: bool,
++    /// The maximum depth of directories to descend. A value of `0` means no
++    /// descension at all.
++    max_depth: Option<usize>,
++    /// The maximum size a searched file can be (in bytes). If a file exceeds
++    /// this size it will be skipped.
++    max_filesize: Option<u64>,
++    /// Whether to follow symbolic links or not. When this is enabled, loop
++    /// detection is performed.
++    follow_links: bool,
++}
++
++impl Worker {
++    /// Runs this worker until there is no more work left to do.
++    ///
++    /// The worker will call the caller's callback for all entries that aren't
++    /// skipped by the ignore matcher.
++    fn run(mut self) {
++        while let Some(mut work) = self.get_work() {
++            // If the work is not a directory, then we can just execute the
++            // caller's callback immediately and move on.
++            if !work.is_dir() {
++                if (self.f)(Ok(work.dent)).is_quit() {
++                    self.quit_now();
++                    return;
++                }
++                continue;
++            }
++            if self.parents {
++                if let Some(err) = work.add_parents() {
++                    if (self.f)(Err(err)).is_quit() {
++                        self.quit_now();
++                        return;
++                    }
++                }
++            }
++            let readdir = match work.read_dir() {
++                Ok(readdir) => readdir,
++                Err(err) => {
++                    if (self.f)(Err(err)).is_quit() {
++                        self.quit_now();
++                        return;
++                    }
++                    continue;
++                }
++            };
++            let depth = work.dent.depth();
++            match (self.f)(Ok(work.dent)) {
++                WalkState::Continue => {}
++                WalkState::Skip => continue,
++                WalkState::Quit => {
++                    self.quit_now();
++                    return;
++                }
++            }
++            if self.max_depth.map_or(false, |max| depth >= max) {
++                continue;
++            }
++            for result in readdir {
++                if self.run_one(&work.ignore, depth + 1, result).is_quit() {
++                    self.quit_now();
++                    return;
++                }
++            }
++        }
++    }
++
++    /// Runs the worker on a single entry from a directory iterator.
++    ///
++    /// If the entry is a path that should be ignored, then this is a no-op.
++    /// Otherwise, the entry is pushed on to the queue. (The actual execution
++    /// of the callback happens in `run`.)
++    ///
++    /// If an error occurs while reading the entry, then it is sent to the
++    /// caller's callback.
++    ///
++    /// `ig` is the `Ignore` matcher for the parent directory. `depth` should
++    /// be the depth of this entry. `result` should be the item yielded by
++    /// a directory iterator.
++    fn run_one(
++        &mut self,
++        ig: &Ignore,
++        depth: usize,
++        result: Result<fs::DirEntry, io::Error>,
++    ) -> WalkState {
++        let fs_dent = match result {
++            Ok(fs_dent) => fs_dent,
++            Err(err) => {
++                return (self.f)(Err(Error::from(err).with_depth(depth)));
++            }
++        };
++        let mut dent = match DirEntryRaw::from_entry(depth, &fs_dent) {
++            Ok(dent) => DirEntry::new_raw(dent, None),
++            Err(err) => {
++                return (self.f)(Err(err));
++            }
++        };
++        let is_symlink = dent.file_type().map_or(false, |ft| ft.is_symlink());
++        if self.follow_links && is_symlink {
++            let path = dent.path().to_path_buf();
++            dent = match DirEntryRaw::from_link(depth, path) {
++                Ok(dent) => DirEntry::new_raw(dent, None),
++                Err(err) => {
++                    return (self.f)(Err(err));
++                }
++            };
++            if dent.file_type().map_or(false, |ft| ft.is_dir()) {
++                if let Err(err) = check_symlink_loop(ig, dent.path(), depth) {
++                    return (self.f)(Err(err));
++                }
++            }
++        }
++        let is_dir = dent.file_type().map_or(false, |ft| ft.is_dir());
++        let max_size = self.max_filesize;
++        let should_skip_path = skip_path(ig, dent.path(), is_dir);
++        let should_skip_filesize = if !is_dir && max_size.is_some() {
++            skip_filesize(max_size.unwrap(), dent.path(), &dent.metadata().ok())
++        } else {
++            false
++        };
++
++        if !should_skip_path && !should_skip_filesize {
++            self.queue.push(Message::Work(Work {
++                dent: dent,
++                ignore: ig.clone(),
++            }));
++        }
++        WalkState::Continue
++    }
++
++    /// Returns the next directory to descend into.
++    ///
++    /// If all work has been exhausted, then this returns None. The worker
++    /// should then subsequently quit.
++    fn get_work(&mut self) -> Option<Work> {
++        loop {
++            if self.is_quit_now() {
++                return None;
++            }
++            match self.queue.try_pop() {
++                Some(Message::Work(work)) => {
++                    self.waiting(false);
++                    self.quitting(false);
++                    return Some(work);
++                }
++                Some(Message::Quit) => {
++                    // We can't just quit because a Message::Quit could be
++                    // spurious. For example, it's possible to observe that
++                    // all workers are waiting even if there's more work to
++                    // be done.
++                    //
++                    // Therefore, we do a bit of a dance to wait until all
++                    // workers have signaled that they're ready to quit before
++                    // actually quitting.
++                    //
++                    // If the Quit message turns out to be spurious, then the
++                    // loop below will break and we'll go back to looking for
++                    // more work.
++                    self.waiting(true);
++                    self.quitting(true);
++                    while !self.is_quit_now() {
++                        let nwait = self.num_waiting();
++                        let nquit = self.num_quitting();
++                        // If the number of waiting workers dropped, then
++                        // abort our attempt to quit.
++                        if nwait < self.threads {
++                            break;
++                        }
++                        // If all workers are in this quit loop, then we
++                        // can stop.
++                        if nquit == self.threads {
++                            return None;
++                        }
++                        // Otherwise, spin.
++                    }
++                }
++                None => {
++                    self.waiting(true);
++                    self.quitting(false);
++                    if self.num_waiting() == self.threads {
++                        for _ in 0..self.threads {
++                            self.queue.push(Message::Quit);
++                        }
++                    } else {
++                        // You're right to consider this suspicious, but it's
++                        // a useful heuristic to permit producers to catch up
++                        // to consumers without burning the CPU. It is also
++                        // useful as a means to prevent burning the CPU if only
++                        // one worker is left doing actual work. It's not
++                        // perfect and it doesn't leave the CPU completely
++                        // idle, but it's not clear what else we can do. :-/
++                        thread::sleep(Duration::from_millis(1));
++                    }
++                }
++            }
++        }
++    }
++
++    /// Indicates that all workers should quit immediately.
++    fn quit_now(&self) {
++        self.quit_now.store(true, Ordering::SeqCst);
++    }
++
++    /// Returns true if this worker should quit immediately.
++    fn is_quit_now(&self) -> bool {
++        self.quit_now.load(Ordering::SeqCst)
++    }
++
++    /// Returns the total number of workers waiting for work.
++    fn num_waiting(&self) -> usize {
++        self.num_waiting.load(Ordering::SeqCst)
++    }
++
++    /// Returns the total number of workers ready to quit.
++    fn num_quitting(&self) -> usize {
++        self.num_quitting.load(Ordering::SeqCst)
++    }
++
++    /// Sets this worker's "quitting" state to the value of `yes`.
++    fn quitting(&mut self, yes: bool) {
++        if yes {
++            if !self.is_quitting {
++                self.is_quitting = true;
++                self.num_quitting.fetch_add(1, Ordering::SeqCst);
++            }
++        } else {
++            if self.is_quitting {
++                self.is_quitting = false;
++                self.num_quitting.fetch_sub(1, Ordering::SeqCst);
++            }
++        }
++    }
++
++    /// Sets this worker's "waiting" state to the value of `yes`.
++    fn waiting(&mut self, yes: bool) {
++        if yes {
++            if !self.is_waiting {
++                self.is_waiting = true;
++                self.num_waiting.fetch_add(1, Ordering::SeqCst);
++            }
++        } else {
++            if self.is_waiting {
++                self.is_waiting = false;
++                self.num_waiting.fetch_sub(1, Ordering::SeqCst);
++            }
++        }
++    }
++}
++
++fn check_symlink_loop(
++    ig_parent: &Ignore,
++    child_path: &Path,
++    child_depth: usize,
++) -> Result<(), Error> {
++    for ig in ig_parent.parents().take_while(|ig| !ig.is_absolute_parent()) {
++        let same = try!(is_same_file(ig.path(), child_path).map_err(|err| {
++            Error::from(err).with_path(child_path).with_depth(child_depth)
++        }));
++        if same {
++            return Err(Error::Loop {
++                ancestor: ig.path().to_path_buf(),
++                child: child_path.to_path_buf(),
++            }.with_depth(child_depth));
++        }
++    }
++    Ok(())
++}
++
++// Before calling this function, make sure that you ensure that is really
++// necessary as the arguments imply a file stat.
++fn skip_filesize(
++    max_filesize: u64,
++    path: &Path,
++    ent: &Option<Metadata>
++) -> bool {
++    let filesize = match *ent {
++        Some(ref md) => Some(md.len()),
++        None => None
++    };
++
++    if let Some(fs) = filesize {
++        if fs > max_filesize {
++            debug!("ignoring {}: {} bytes", path.display(), fs);
++            true
++        } else {
++            false
++        }
++    } else {
++        false
++    }
++}
++
++fn skip_path(ig: &Ignore, path: &Path, is_dir: bool) -> bool {
++    let m = ig.matched(path, is_dir);
++    if m.is_ignore() {
++        debug!("ignoring {}: {:?}", path.display(), m);
++        true
++    } else if m.is_whitelist() {
++        debug!("whitelisting {}: {:?}", path.display(), m);
++        false
++    } else {
++        false
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use std::fs::{self, File};
++    use std::io::Write;
++    use std::path::Path;
++    use std::sync::{Arc, Mutex};
++
++    use tempdir::TempDir;
++
++    use super::{WalkBuilder, WalkState};
++
++    fn wfile<P: AsRef<Path>>(path: P, contents: &str) {
++        let mut file = File::create(path).unwrap();
++        file.write_all(contents.as_bytes()).unwrap();
++    }
++
++    fn wfile_size<P: AsRef<Path>>(path: P, size: u64) {
++        let file = File::create(path).unwrap();
++        file.set_len(size).unwrap();
++    }
++
++    #[cfg(unix)]
++    fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) {
++        use std::os::unix::fs::symlink;
++        symlink(src, dst).unwrap();
++    }
++
++    fn mkdirp<P: AsRef<Path>>(path: P) {
++        fs::create_dir_all(path).unwrap();
++    }
++
++    fn normal_path(unix: &str) -> String {
++        if cfg!(windows) {
++            unix.replace("\\", "/")
++        } else {
++            unix.to_string()
++        }
++    }
++
++    fn walk_collect(prefix: &Path, builder: &WalkBuilder) -> Vec<String> {
++        let mut paths = vec![];
++        for result in builder.build() {
++            let dent = match result {
++                Err(_) => continue,
++                Ok(dent) => dent,
++            };
++            let path = dent.path().strip_prefix(prefix).unwrap();
++            if path.as_os_str().is_empty() {
++                continue;
++            }
++            paths.push(normal_path(path.to_str().unwrap()));
++        }
++        paths.sort();
++        paths
++    }
++
++    fn walk_collect_parallel(
++        prefix: &Path,
++        builder: &WalkBuilder,
++    ) -> Vec<String> {
++        let paths = Arc::new(Mutex::new(vec![]));
++        let prefix = Arc::new(prefix.to_path_buf());
++        builder.build_parallel().run(|| {
++            let paths = paths.clone();
++            let prefix = prefix.clone();
++            Box::new(move |result| {
++                let dent = match result {
++                    Err(_) => return WalkState::Continue,
++                    Ok(dent) => dent,
++                };
++                let path = dent.path().strip_prefix(&**prefix).unwrap();
++                if path.as_os_str().is_empty() {
++                    return WalkState::Continue;
++                }
++                let mut paths = paths.lock().unwrap();
++                paths.push(normal_path(path.to_str().unwrap()));
++                WalkState::Continue
++            })
++        });
++        let mut paths = paths.lock().unwrap();
++        paths.sort();
++        paths.to_vec()
++    }
++
++    fn mkpaths(paths: &[&str]) -> Vec<String> {
++        let mut paths: Vec<_> = paths.iter().map(|s| s.to_string()).collect();
++        paths.sort();
++        paths
++    }
++
++    fn assert_paths(
++        prefix: &Path,
++        builder: &WalkBuilder,
++        expected: &[&str],
++    ) {
++        let got = walk_collect(prefix, builder);
++        assert_eq!(got, mkpaths(expected));
++        let got = walk_collect_parallel(prefix, builder);
++        assert_eq!(got, mkpaths(expected));
++    }
++
++    #[test]
++    fn no_ignores() {
++        let td = TempDir::new("walk-test-").unwrap();
++        mkdirp(td.path().join("a/b/c"));
++        mkdirp(td.path().join("x/y"));
++        wfile(td.path().join("a/b/foo"), "");
++        wfile(td.path().join("x/y/foo"), "");
++
++        assert_paths(td.path(), &WalkBuilder::new(td.path()), &[
++            "x", "x/y", "x/y/foo", "a", "a/b", "a/b/foo", "a/b/c",
++        ]);
++    }
++
++    #[test]
++    fn gitignore() {
++        let td = TempDir::new("walk-test-").unwrap();
++        mkdirp(td.path().join("a"));
++        wfile(td.path().join(".gitignore"), "foo");
++        wfile(td.path().join("foo"), "");
++        wfile(td.path().join("a/foo"), "");
++        wfile(td.path().join("bar"), "");
++        wfile(td.path().join("a/bar"), "");
++
++        assert_paths(td.path(), &WalkBuilder::new(td.path()), &[
++            "bar", "a", "a/bar",
++        ]);
++    }
++
++    #[test]
++    fn explicit_ignore() {
++        let td = TempDir::new("walk-test-").unwrap();
++        let igpath = td.path().join(".not-an-ignore");
++        mkdirp(td.path().join("a"));
++        wfile(&igpath, "foo");
++        wfile(td.path().join("foo"), "");
++        wfile(td.path().join("a/foo"), "");
++        wfile(td.path().join("bar"), "");
++        wfile(td.path().join("a/bar"), "");
++
++        let mut builder = WalkBuilder::new(td.path());
++        assert!(builder.add_ignore(&igpath).is_none());
++        assert_paths(td.path(), &builder, &["bar", "a", "a/bar"]);
++    }
++
++    #[test]
++    fn gitignore_parent() {
++        let td = TempDir::new("walk-test-").unwrap();
++        mkdirp(td.path().join("a"));
++        wfile(td.path().join(".gitignore"), "foo");
++        wfile(td.path().join("a/foo"), "");
++        wfile(td.path().join("a/bar"), "");
++
++        let root = td.path().join("a");
++        assert_paths(&root, &WalkBuilder::new(&root), &["bar"]);
++    }
++
++    #[test]
++    fn max_depth() {
++        let td = TempDir::new("walk-test-").unwrap();
++        mkdirp(td.path().join("a/b/c"));
++        wfile(td.path().join("foo"), "");
++        wfile(td.path().join("a/foo"), "");
++        wfile(td.path().join("a/b/foo"), "");
++        wfile(td.path().join("a/b/c/foo"), "");
++
++        let mut builder = WalkBuilder::new(td.path());
++        assert_paths(td.path(), &builder, &[
++            "a", "a/b", "a/b/c", "foo", "a/foo", "a/b/foo", "a/b/c/foo",
++        ]);
++        assert_paths(td.path(), builder.max_depth(Some(0)), &[]);
++        assert_paths(td.path(), builder.max_depth(Some(1)), &["a", "foo"]);
++        assert_paths(td.path(), builder.max_depth(Some(2)), &[
++            "a", "a/b", "foo", "a/foo",
++        ]);
++    }
++
++    #[test]
++    fn max_filesize() {
++        let td = TempDir::new("walk-test-").unwrap();
++        mkdirp(td.path().join("a/b"));
++        wfile_size(td.path().join("foo"), 0);
++        wfile_size(td.path().join("bar"), 400);
++        wfile_size(td.path().join("baz"), 600);
++        wfile_size(td.path().join("a/foo"), 600);
++        wfile_size(td.path().join("a/bar"), 500);
++        wfile_size(td.path().join("a/baz"), 200);
++
++        let mut builder = WalkBuilder::new(td.path());
++        assert_paths(td.path(), &builder, &[
++            "a", "a/b", "foo", "bar", "baz", "a/foo", "a/bar", "a/baz",
++        ]);
++        assert_paths(td.path(), builder.max_filesize(Some(0)), &[
++            "a", "a/b", "foo"
++        ]);
++        assert_paths(td.path(), builder.max_filesize(Some(500)), &[
++            "a", "a/b", "foo", "bar", "a/bar", "a/baz"
++        ]);
++        assert_paths(td.path(), builder.max_filesize(Some(50000)), &[
++            "a", "a/b", "foo", "bar", "baz", "a/foo", "a/bar", "a/baz",
++        ]);
++    }
++
++    #[cfg(unix)] // because symlinks on windows are weird
++    #[test]
++    fn symlinks() {
++        let td = TempDir::new("walk-test-").unwrap();
++        mkdirp(td.path().join("a/b"));
++        symlink(td.path().join("a/b"), td.path().join("z"));
++        wfile(td.path().join("a/b/foo"), "");
++
++        let mut builder = WalkBuilder::new(td.path());
++        assert_paths(td.path(), &builder, &[
++            "a", "a/b", "a/b/foo", "z",
++        ]);
++        assert_paths(td.path(), &builder.follow_links(true), &[
++            "a", "a/b", "a/b/foo", "z", "z/foo",
++        ]);
++    }
++
++    #[cfg(unix)] // because symlinks on windows are weird
++    #[test]
++    fn symlink_loop() {
++        let td = TempDir::new("walk-test-").unwrap();
++        mkdirp(td.path().join("a/b"));
++        symlink(td.path().join("a"), td.path().join("a/b/c"));
++
++        let mut builder = WalkBuilder::new(td.path());
++        assert_paths(td.path(), &builder, &[
++            "a", "a/b", "a/b/c",
++        ]);
++        assert_paths(td.path(), &builder.follow_links(true), &[
++            "a", "a/b",
++        ]);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ac09e12f7abaadf6f802f48573a5aa155cf57e69
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,216 @@@
++# Based on https://github.com/behnam/gitignore-test/blob/master/.gitignore
++
++### file in root
++
++# MATCH /file_root_1
++file_root_00
++
++# NO_MATCH
++file_root_01/
++
++# NO_MATCH
++file_root_02/*
++
++# NO_MATCH
++file_root_03/**
++
++
++# MATCH /file_root_10
++/file_root_10
++
++# NO_MATCH
++/file_root_11/
++
++# NO_MATCH
++/file_root_12/*
++
++# NO_MATCH
++/file_root_13/**
++
++
++# NO_MATCH
++*/file_root_20
++
++# NO_MATCH
++*/file_root_21/
++
++# NO_MATCH
++*/file_root_22/*
++
++# NO_MATCH
++*/file_root_23/**
++
++
++# MATCH /file_root_30
++**/file_root_30
++
++# NO_MATCH
++**/file_root_31/
++
++# NO_MATCH
++**/file_root_32/*
++
++# NO_MATCH
++**/file_root_33/**
++
++
++### file in sub-dir
++
++# MATCH /parent_dir/file_deep_1
++file_deep_00
++
++# NO_MATCH
++file_deep_01/
++
++# NO_MATCH
++file_deep_02/*
++
++# NO_MATCH
++file_deep_03/**
++
++
++# NO_MATCH
++/file_deep_10
++
++# NO_MATCH
++/file_deep_11/
++
++# NO_MATCH
++/file_deep_12/*
++
++# NO_MATCH
++/file_deep_13/**
++
++
++# MATCH /parent_dir/file_deep_20
++*/file_deep_20
++
++# NO_MATCH
++*/file_deep_21/
++
++# NO_MATCH
++*/file_deep_22/*
++
++# NO_MATCH
++*/file_deep_23/**
++
++
++# MATCH /parent_dir/file_deep_30
++**/file_deep_30
++
++# NO_MATCH
++**/file_deep_31/
++
++# NO_MATCH
++**/file_deep_32/*
++
++# NO_MATCH
++**/file_deep_33/**
++
++
++### dir in root
++
++# MATCH /dir_root_00
++dir_root_00
++
++# MATCH /dir_root_01
++dir_root_01/
++
++# MATCH /dir_root_02
++dir_root_02/*
++
++# MATCH /dir_root_03
++dir_root_03/**
++
++
++# MATCH /dir_root_10
++/dir_root_10
++
++# MATCH /dir_root_11
++/dir_root_11/
++
++# MATCH /dir_root_12
++/dir_root_12/*
++
++# MATCH /dir_root_13
++/dir_root_13/**
++
++
++# NO_MATCH
++*/dir_root_20
++
++# NO_MATCH
++*/dir_root_21/
++
++# NO_MATCH
++*/dir_root_22/*
++
++# NO_MATCH
++*/dir_root_23/**
++
++
++# MATCH /dir_root_30
++**/dir_root_30
++
++# MATCH /dir_root_31
++**/dir_root_31/
++
++# MATCH /dir_root_32
++**/dir_root_32/*
++
++# MATCH /dir_root_33
++**/dir_root_33/**
++
++
++### dir in sub-dir
++
++# MATCH /parent_dir/dir_deep_00
++dir_deep_00
++
++# MATCH /parent_dir/dir_deep_01
++dir_deep_01/
++
++# NO_MATCH
++dir_deep_02/*
++
++# NO_MATCH
++dir_deep_03/**
++
++
++# NO_MATCH
++/dir_deep_10
++
++# NO_MATCH
++/dir_deep_11/
++
++# NO_MATCH
++/dir_deep_12/*
++
++# NO_MATCH
++/dir_deep_13/**
++
++
++# MATCH /parent_dir/dir_deep_20
++*/dir_deep_20
++
++# MATCH /parent_dir/dir_deep_21
++*/dir_deep_21/
++
++# MATCH /parent_dir/dir_deep_22
++*/dir_deep_22/*
++
++# MATCH /parent_dir/dir_deep_23
++*/dir_deep_23/**
++
++
++# MATCH /parent_dir/dir_deep_30
++**/dir_deep_30
++
++# MATCH /parent_dir/dir_deep_31
++**/dir_deep_31/
++
++# MATCH /parent_dir/dir_deep_32
++**/dir_deep_32/*
++
++# MATCH /parent_dir/dir_deep_33
++**/dir_deep_33/**
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c76ee2d1f563ca7c2a701470f1ee630a53cfad14
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,297 @@@
++extern crate ignore;
++
++
++use std::path::Path;
++
++use ignore::gitignore::{Gitignore, GitignoreBuilder};
++
++
++const IGNORE_FILE: &'static str = "tests/gitignore_matched_path_or_any_parents_tests.gitignore";
++
++
++fn get_gitignore() -> Gitignore {
++    let mut builder = GitignoreBuilder::new("ROOT");
++    let error = builder.add(IGNORE_FILE);
++    assert!(error.is_none(), "failed to open gitignore file");
++    builder.build().unwrap()
++}
++
++
++#[test]
++#[should_panic(expected = "path is expect to be under the root")]
++fn test_path_should_be_under_root() {
++    let gitignore = get_gitignore();
++    let path = "/tmp/some_file";
++    gitignore.matched_path_or_any_parents(Path::new(path), false);
++    assert!(false);
++}
++
++
++#[test]
++fn test_files_in_root() {
++    let gitignore = get_gitignore();
++    let m = |path: &str| gitignore.matched_path_or_any_parents(Path::new(path), false);
++
++    // 0x
++    assert!(m("ROOT/file_root_00").is_ignore());
++    assert!(m("ROOT/file_root_01").is_none());
++    assert!(m("ROOT/file_root_02").is_none());
++    assert!(m("ROOT/file_root_03").is_none());
++
++    // 1x
++    assert!(m("ROOT/file_root_10").is_ignore());
++    assert!(m("ROOT/file_root_11").is_none());
++    assert!(m("ROOT/file_root_12").is_none());
++    assert!(m("ROOT/file_root_13").is_none());
++
++    // 2x
++    assert!(m("ROOT/file_root_20").is_none());
++    assert!(m("ROOT/file_root_21").is_none());
++    assert!(m("ROOT/file_root_22").is_none());
++    assert!(m("ROOT/file_root_23").is_none());
++
++    // 3x
++    assert!(m("ROOT/file_root_30").is_ignore());
++    assert!(m("ROOT/file_root_31").is_none());
++    assert!(m("ROOT/file_root_32").is_none());
++    assert!(m("ROOT/file_root_33").is_none());
++}
++
++
++#[test]
++fn test_files_in_deep() {
++    let gitignore = get_gitignore();
++    let m = |path: &str| gitignore.matched_path_or_any_parents(Path::new(path), false);
++
++    // 0x
++    assert!(m("ROOT/parent_dir/file_deep_00").is_ignore());
++    assert!(m("ROOT/parent_dir/file_deep_01").is_none());
++    assert!(m("ROOT/parent_dir/file_deep_02").is_none());
++    assert!(m("ROOT/parent_dir/file_deep_03").is_none());
++
++    // 1x
++    assert!(m("ROOT/parent_dir/file_deep_10").is_none());
++    assert!(m("ROOT/parent_dir/file_deep_11").is_none());
++    assert!(m("ROOT/parent_dir/file_deep_12").is_none());
++    assert!(m("ROOT/parent_dir/file_deep_13").is_none());
++
++    // 2x
++    assert!(m("ROOT/parent_dir/file_deep_20").is_ignore());
++    assert!(m("ROOT/parent_dir/file_deep_21").is_none());
++    assert!(m("ROOT/parent_dir/file_deep_22").is_none());
++    assert!(m("ROOT/parent_dir/file_deep_23").is_none());
++
++    // 3x
++    assert!(m("ROOT/parent_dir/file_deep_30").is_ignore());
++    assert!(m("ROOT/parent_dir/file_deep_31").is_none());
++    assert!(m("ROOT/parent_dir/file_deep_32").is_none());
++    assert!(m("ROOT/parent_dir/file_deep_33").is_none());
++}
++
++
++#[test]
++fn test_dirs_in_root() {
++    let gitignore = get_gitignore();
++    let m =
++        |path: &str, is_dir: bool| gitignore.matched_path_or_any_parents(Path::new(path), is_dir);
++
++    // 00
++    assert!(m("ROOT/dir_root_00", true).is_ignore());
++    assert!(m("ROOT/dir_root_00/file", false).is_ignore());
++    assert!(m("ROOT/dir_root_00/child_dir", true).is_ignore());
++    assert!(m("ROOT/dir_root_00/child_dir/file", false).is_ignore());
++
++    // 01
++    assert!(m("ROOT/dir_root_01", true).is_ignore());
++    assert!(m("ROOT/dir_root_01/file", false).is_ignore());
++    assert!(m("ROOT/dir_root_01/child_dir", true).is_ignore());
++    assert!(m("ROOT/dir_root_01/child_dir/file", false).is_ignore());
++
++    // 02
++    assert!(m("ROOT/dir_root_02", true).is_none()); // dir itself doesn't match
++    assert!(m("ROOT/dir_root_02/file", false).is_ignore());
++    assert!(m("ROOT/dir_root_02/child_dir", true).is_ignore());
++    assert!(m("ROOT/dir_root_02/child_dir/file", false).is_ignore());
++
++    // 03
++    assert!(m("ROOT/dir_root_03", true).is_none()); // dir itself doesn't match
++    assert!(m("ROOT/dir_root_03/file", false).is_ignore());
++    assert!(m("ROOT/dir_root_03/child_dir", true).is_ignore());
++    assert!(m("ROOT/dir_root_03/child_dir/file", false).is_ignore());
++
++    // 10
++    assert!(m("ROOT/dir_root_10", true).is_ignore());
++    assert!(m("ROOT/dir_root_10/file", false).is_ignore());
++    assert!(m("ROOT/dir_root_10/child_dir", true).is_ignore());
++    assert!(m("ROOT/dir_root_10/child_dir/file", false).is_ignore());
++
++    // 11
++    assert!(m("ROOT/dir_root_11", true).is_ignore());
++    assert!(m("ROOT/dir_root_11/file", false).is_ignore());
++    assert!(m("ROOT/dir_root_11/child_dir", true).is_ignore());
++    assert!(m("ROOT/dir_root_11/child_dir/file", false).is_ignore());
++
++    // 12
++    assert!(m("ROOT/dir_root_12", true).is_none()); // dir itself doesn't match
++    assert!(m("ROOT/dir_root_12/file", false).is_ignore());
++    assert!(m("ROOT/dir_root_12/child_dir", true).is_ignore());
++    assert!(m("ROOT/dir_root_12/child_dir/file", false).is_ignore());
++
++    // 13
++    assert!(m("ROOT/dir_root_13", true).is_none());
++    assert!(m("ROOT/dir_root_13/file", false).is_ignore());
++    assert!(m("ROOT/dir_root_13/child_dir", true).is_ignore());
++    assert!(m("ROOT/dir_root_13/child_dir/file", false).is_ignore());
++
++    // 20
++    assert!(m("ROOT/dir_root_20", true).is_none());
++    assert!(m("ROOT/dir_root_20/file", false).is_none());
++    assert!(m("ROOT/dir_root_20/child_dir", true).is_none());
++    assert!(m("ROOT/dir_root_20/child_dir/file", false).is_none());
++
++    // 21
++    assert!(m("ROOT/dir_root_21", true).is_none());
++    assert!(m("ROOT/dir_root_21/file", false).is_none());
++    assert!(m("ROOT/dir_root_21/child_dir", true).is_none());
++    assert!(m("ROOT/dir_root_21/child_dir/file", false).is_none());
++
++    // 22
++    assert!(m("ROOT/dir_root_22", true).is_none());
++    assert!(m("ROOT/dir_root_22/file", false).is_none());
++    assert!(m("ROOT/dir_root_22/child_dir", true).is_none());
++    assert!(m("ROOT/dir_root_22/child_dir/file", false).is_none());
++
++    // 23
++    assert!(m("ROOT/dir_root_23", true).is_none());
++    assert!(m("ROOT/dir_root_23/file", false).is_none());
++    assert!(m("ROOT/dir_root_23/child_dir", true).is_none());
++    assert!(m("ROOT/dir_root_23/child_dir/file", false).is_none());
++
++    // 30
++    assert!(m("ROOT/dir_root_30", true).is_ignore());
++    assert!(m("ROOT/dir_root_30/file", false).is_ignore());
++    assert!(m("ROOT/dir_root_30/child_dir", true).is_ignore());
++    assert!(m("ROOT/dir_root_30/child_dir/file", false).is_ignore());
++
++    // 31
++    assert!(m("ROOT/dir_root_31", true).is_ignore());
++    assert!(m("ROOT/dir_root_31/file", false).is_ignore());
++    assert!(m("ROOT/dir_root_31/child_dir", true).is_ignore());
++    assert!(m("ROOT/dir_root_31/child_dir/file", false).is_ignore());
++
++    // 32
++    assert!(m("ROOT/dir_root_32", true).is_none()); // dir itself doesn't match
++    assert!(m("ROOT/dir_root_32/file", false).is_ignore());
++    assert!(m("ROOT/dir_root_32/child_dir", true).is_ignore());
++    assert!(m("ROOT/dir_root_32/child_dir/file", false).is_ignore());
++
++    // 33
++    assert!(m("ROOT/dir_root_33", true).is_none()); // dir itself doesn't match
++    assert!(m("ROOT/dir_root_33/file", false).is_ignore());
++    assert!(m("ROOT/dir_root_33/child_dir", true).is_ignore());
++    assert!(m("ROOT/dir_root_33/child_dir/file", false).is_ignore());
++}
++
++
++#[test]
++fn test_dirs_in_deep() {
++    let gitignore = get_gitignore();
++    let m =
++        |path: &str, is_dir: bool| gitignore.matched_path_or_any_parents(Path::new(path), is_dir);
++
++    // 00
++    assert!(m("ROOT/parent_dir/dir_deep_00", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_00/file", false).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_00/child_dir", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_00/child_dir/file", false).is_ignore());
++
++    // 01
++    assert!(m("ROOT/parent_dir/dir_deep_01", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_01/file", false).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_01/child_dir", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_01/child_dir/file", false).is_ignore());
++
++    // 02
++    assert!(m("ROOT/parent_dir/dir_deep_02", true).is_none()); // dir itself doesn't match
++    assert!(m("ROOT/parent_dir/dir_deep_02/file", false).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_02/child_dir", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_02/child_dir/file", false).is_ignore());
++
++    // 03
++    assert!(m("ROOT/parent_dir/dir_deep_03", true).is_none()); // dir itself doesn't match
++    assert!(m("ROOT/parent_dir/dir_deep_03/file", false).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_03/child_dir", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_03/child_dir/file", false).is_ignore());
++
++    // 10
++    assert!(m("ROOT/parent_dir/dir_deep_10", true).is_none());
++    assert!(m("ROOT/parent_dir/dir_deep_10/file", false).is_none());
++    assert!(m("ROOT/parent_dir/dir_deep_10/child_dir", true).is_none());
++    assert!(m("ROOT/parent_dir/dir_deep_10/child_dir/file", false).is_none());
++
++    // 11
++    assert!(m("ROOT/parent_dir/dir_deep_11", true).is_none());
++    assert!(m("ROOT/parent_dir/dir_deep_11/file", false).is_none());
++    assert!(m("ROOT/parent_dir/dir_deep_11/child_dir", true).is_none());
++    assert!(m("ROOT/parent_dir/dir_deep_11/child_dir/file", false).is_none());
++
++    // 12
++    assert!(m("ROOT/parent_dir/dir_deep_12", true).is_none());
++    assert!(m("ROOT/parent_dir/dir_deep_12/file", false).is_none());
++    assert!(m("ROOT/parent_dir/dir_deep_12/child_dir", true).is_none());
++    assert!(m("ROOT/parent_dir/dir_deep_12/child_dir/file", false).is_none());
++
++    // 13
++    assert!(m("ROOT/parent_dir/dir_deep_13", true).is_none());
++    assert!(m("ROOT/parent_dir/dir_deep_13/file", false).is_none());
++    assert!(m("ROOT/parent_dir/dir_deep_13/child_dir", true).is_none());
++    assert!(m("ROOT/parent_dir/dir_deep_13/child_dir/file", false).is_none());
++
++    // 20
++    assert!(m("ROOT/parent_dir/dir_deep_20", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_20/file", false).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_20/child_dir", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_20/child_dir/file", false).is_ignore());
++
++    // 21
++    assert!(m("ROOT/parent_dir/dir_deep_21", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_21/file", false).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_21/child_dir", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_21/child_dir/file", false).is_ignore());
++
++    // 22
++    assert!(m("ROOT/parent_dir/dir_deep_22", true).is_none()); // dir itself doesn't match
++    assert!(m("ROOT/parent_dir/dir_deep_22/file", false).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_22/child_dir", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_22/child_dir/file", false).is_ignore());
++
++    // 23
++    assert!(m("ROOT/parent_dir/dir_deep_23", true).is_none()); // dir itself doesn't match
++    assert!(m("ROOT/parent_dir/dir_deep_23/file", false).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_23/child_dir", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_23/child_dir/file", false).is_ignore());
++
++    // 30
++    assert!(m("ROOT/parent_dir/dir_deep_30", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_30/file", false).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_30/child_dir", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_30/child_dir/file", false).is_ignore());
++
++    // 31
++    assert!(m("ROOT/parent_dir/dir_deep_31", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_31/file", false).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_31/child_dir", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_31/child_dir/file", false).is_ignore());
++
++    // 32
++    assert!(m("ROOT/parent_dir/dir_deep_32", true).is_none()); // dir itself doesn't match
++    assert!(m("ROOT/parent_dir/dir_deep_32/file", false).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_32/child_dir", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_32/child_dir/file", false).is_ignore());
++
++    // 33
++    assert!(m("ROOT/parent_dir/dir_deep_33", true).is_none()); // dir itself doesn't match
++    assert!(m("ROOT/parent_dir/dir_deep_33/file", false).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_33/child_dir", true).is_ignore());
++    assert!(m("ROOT/parent_dir/dir_deep_33/child_dir/file", false).is_ignore());
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d49603eaf1ad66a6387cf3fc113c89b91f9c5993
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"bb7b49972ee23d8aa1026c365a5b440ba08e35075f18c459980c7395c221ec48"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4a397979424b63bede2cd256023b3767d2744abd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,91 @@@
++language: rust
++rust: stable
++sudo: required
++dist: trusty
++services:
++  - docker
++install:
++  - if [ -z "$NO_ADD" ]; then rustup target add $TARGET; fi
++script:
++  - cargo build
++  - cargo build --no-default-features
++  - cargo generate-lockfile --manifest-path libc-test/Cargo.toml
++  - if [[ $TRAVIS_OS_NAME = "linux" ]]; then
++      sh ci/run-docker.sh $TARGET;
++    else
++      export CARGO_TARGET_DIR=`pwd`/target;
++      sh ci/run.sh $TARGET;
++    fi
++  - rustc ci/style.rs && ./style src
++env:
++  global:
++    secure: "e2/3QjgRN9atOuSHp22TrYG7QVKcYUWY48Hi9b60w+r1+BhPkTseIJLte7WefRhdXtqpjjUJTooKDhnurFOeHaCT+nmBgiv+FPU893sBl4bhesY4m0vgUJVbNZcs6lTImYekWVb+aqjGdgV/XAgCw7c3kPmrZV0MzGDWL64Xaps="
++matrix:
++  include:
++    # 1.0.0 compat
++    - env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
++      rust: 1.0.0
++      script: cargo build
++      install:
++
++    # build documentation
++    - env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
++      rust: nightly
++      script: sh ci/dox.sh
++
++    # stable compat
++    - env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
++    - env: TARGET=i686-unknown-linux-gnu
++    - os: osx
++      env: TARGET=x86_64-apple-darwin NO_ADD=1
++    - os: osx
++      env: TARGET=i686-apple-darwin
++    - env: TARGET=arm-linux-androideabi
++    - env: TARGET=aarch64-linux-android
++    - env: TARGET=i686-linux-android
++    - env: TARGET=x86_64-linux-android
++    - env: TARGET=x86_64-unknown-linux-musl
++    - env: TARGET=i686-unknown-linux-musl
++    - env: TARGET=arm-unknown-linux-gnueabihf
++    - env: TARGET=aarch64-unknown-linux-gnu
++    - os: osx
++      osx_image: xcode8.2
++      env: TARGET=i386-apple-ios
++    - os: osx
++      osx_image: xcode8.2
++      env: TARGET=x86_64-apple-ios
++    - env: TARGET=x86_64-rumprun-netbsd
++    - env: TARGET=powerpc-unknown-linux-gnu
++    - env: TARGET=powerpc64-unknown-linux-gnu
++    - env: TARGET=mips-unknown-linux-musl
++    - env: TARGET=mipsel-unknown-linux-musl
++    - env: TARGET=mips64-unknown-linux-gnuabi64
++    - env: TARGET=mips-unknown-linux-gnu
++    - env: TARGET=s390x-unknown-linux-gnu
++
++    # beta
++    - env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
++      rust: beta
++    - os: osx
++      env: TARGET=x86_64-apple-darwin NO_ADD=1
++      rust: beta
++
++    # nightly
++    - env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
++      rust: nightly
++    - os: osx
++      env: TARGET=x86_64-apple-darwin NO_ADD=1
++      rust: nightly
++
++    # QEMU based targets that compile in an emulator
++    - env: TARGET=x86_64-unknown-freebsd
++    - env: TARGET=x86_64-unknown-openbsd QEMU=openbsd.qcow2
++      script: sh ci/run-docker.sh $TARGET
++      install:
++
++cache: cargo
++
++notifications:
++  email:
++    on_success: never
++  webhooks: https://buildbot.rust-lang.org/homu/travis
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..63d4b6465161225bbcfeeab775f34e320b7e4980
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,26 @@@
++# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
++#
++# When uploading crates to the registry Cargo will automatically
++# "normalize" Cargo.toml files for maximal compatibility
++# with all versions of Cargo and also rewrite `path` dependencies
++# to registry (e.g. crates.io) dependencies
++#
++# If you believe there's an error in this file please file an
++# issue against the rust-lang/cargo repository. If you're
++# editing this file be aware that the upstream Cargo.toml
++# will likely look very different (and much more reasonable)
++
++[package]
++name = "libc"
++version = "0.2.28"
++authors = ["The Rust Project Developers"]
++description = "A library for types and bindings to native C functions often found in libc or\nother common platform libraries.\n"
++homepage = "https://github.com/rust-lang/libc"
++documentation = "http://doc.rust-lang.org/libc"
++readme = "README.md"
++license = "MIT/Apache-2.0"
++repository = "https://github.com/rust-lang/libc"
++
++[features]
++default = ["use_std"]
++use_std = []
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16fe87b06e802f094b3fbb0894b137bca2b16ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++                              Apache License
++                        Version 2.0, January 2004
++                     http://www.apache.org/licenses/
++
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++1. Definitions.
++
++   "License" shall mean the terms and conditions for use, reproduction,
++   and distribution as defined by Sections 1 through 9 of this document.
++
++   "Licensor" shall mean the copyright owner or entity authorized by
++   the copyright owner that is granting the License.
++
++   "Legal Entity" shall mean the union of the acting entity and all
++   other entities that control, are controlled by, or are under common
++   control with that entity. For the purposes of this definition,
++   "control" means (i) the power, direct or indirect, to cause the
++   direction or management of such entity, whether by contract or
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the
++   outstanding shares, or (iii) beneficial ownership of such entity.
++
++   "You" (or "Your") shall mean an individual or Legal Entity
++   exercising permissions granted by this License.
++
++   "Source" form shall mean the preferred form for making modifications,
++   including but not limited to software source code, documentation
++   source, and configuration files.
++
++   "Object" form shall mean any form resulting from mechanical
++   transformation or translation of a Source form, including but
++   not limited to compiled object code, generated documentation,
++   and conversions to other media types.
++
++   "Work" shall mean the work of authorship, whether in Source or
++   Object form, made available under the License, as indicated by a
++   copyright notice that is included in or attached to the work
++   (an example is provided in the Appendix below).
++
++   "Derivative Works" shall mean any work, whether in Source or Object
++   form, that is based on (or derived from) the Work and for which the
++   editorial revisions, annotations, elaborations, or other modifications
++   represent, as a whole, an original work of authorship. For the purposes
++   of this License, Derivative Works shall not include works that remain
++   separable from, or merely link (or bind by name) to the interfaces of,
++   the Work and Derivative Works thereof.
++
++   "Contribution" shall mean any work of authorship, including
++   the original version of the Work and any modifications or additions
++   to that Work or Derivative Works thereof, that is intentionally
++   submitted to Licensor for inclusion in the Work by the copyright owner
++   or by an individual or Legal Entity authorized to submit on behalf of
++   the copyright owner. For the purposes of this definition, "submitted"
++   means any form of electronic, verbal, or written communication sent
++   to the Licensor or its representatives, including but not limited to
++   communication on electronic mailing lists, source code control systems,
++   and issue tracking systems that are managed by, or on behalf of, the
++   Licensor for the purpose of discussing and improving the Work, but
++   excluding communication that is conspicuously marked or otherwise
++   designated in writing by the copyright owner as "Not a Contribution."
++
++   "Contributor" shall mean Licensor and any individual or Legal Entity
++   on behalf of whom a Contribution has been received by Licensor and
++   subsequently incorporated within the Work.
++
++2. Grant of Copyright License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   copyright license to reproduce, prepare Derivative Works of,
++   publicly display, publicly perform, sublicense, and distribute the
++   Work and such Derivative Works in Source or Object form.
++
++3. Grant of Patent License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   (except as stated in this section) patent license to make, have made,
++   use, offer to sell, sell, import, and otherwise transfer the Work,
++   where such license applies only to those patent claims licensable
++   by such Contributor that are necessarily infringed by their
++   Contribution(s) alone or by combination of their Contribution(s)
++   with the Work to which such Contribution(s) was submitted. If You
++   institute patent litigation against any entity (including a
++   cross-claim or counterclaim in a lawsuit) alleging that the Work
++   or a Contribution incorporated within the Work constitutes direct
++   or contributory patent infringement, then any patent licenses
++   granted to You under this License for that Work shall terminate
++   as of the date such litigation is filed.
++
++4. Redistribution. You may reproduce and distribute copies of the
++   Work or Derivative Works thereof in any medium, with or without
++   modifications, and in Source or Object form, provided that You
++   meet the following conditions:
++
++   (a) You must give any other recipients of the Work or
++       Derivative Works a copy of this License; and
++
++   (b) You must cause any modified files to carry prominent notices
++       stating that You changed the files; and
++
++   (c) You must retain, in the Source form of any Derivative Works
++       that You distribute, all copyright, patent, trademark, and
++       attribution notices from the Source form of the Work,
++       excluding those notices that do not pertain to any part of
++       the Derivative Works; and
++
++   (d) If the Work includes a "NOTICE" text file as part of its
++       distribution, then any Derivative Works that You distribute must
++       include a readable copy of the attribution notices contained
++       within such NOTICE file, excluding those notices that do not
++       pertain to any part of the Derivative Works, in at least one
++       of the following places: within a NOTICE text file distributed
++       as part of the Derivative Works; within the Source form or
++       documentation, if provided along with the Derivative Works; or,
++       within a display generated by the Derivative Works, if and
++       wherever such third-party notices normally appear. The contents
++       of the NOTICE file are for informational purposes only and
++       do not modify the License. You may add Your own attribution
++       notices within Derivative Works that You distribute, alongside
++       or as an addendum to the NOTICE text from the Work, provided
++       that such additional attribution notices cannot be construed
++       as modifying the License.
++
++   You may add Your own copyright statement to Your modifications and
++   may provide additional or different license terms and conditions
++   for use, reproduction, or distribution of Your modifications, or
++   for any such Derivative Works as a whole, provided Your use,
++   reproduction, and distribution of the Work otherwise complies with
++   the conditions stated in this License.
++
++5. Submission of Contributions. Unless You explicitly state otherwise,
++   any Contribution intentionally submitted for inclusion in the Work
++   by You to the Licensor shall be under the terms and conditions of
++   this License, without any additional terms or conditions.
++   Notwithstanding the above, nothing herein shall supersede or modify
++   the terms of any separate license agreement you may have executed
++   with Licensor regarding such Contributions.
++
++6. Trademarks. This License does not grant permission to use the trade
++   names, trademarks, service marks, or product names of the Licensor,
++   except as required for reasonable and customary use in describing the
++   origin of the Work and reproducing the content of the NOTICE file.
++
++7. Disclaimer of Warranty. Unless required by applicable law or
++   agreed to in writing, Licensor provides the Work (and each
++   Contributor provides its Contributions) on an "AS IS" BASIS,
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++   implied, including, without limitation, any warranties or conditions
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++   PARTICULAR PURPOSE. You are solely responsible for determining the
++   appropriateness of using or redistributing the Work and assume any
++   risks associated with Your exercise of permissions under this License.
++
++8. Limitation of Liability. In no event and under no legal theory,
++   whether in tort (including negligence), contract, or otherwise,
++   unless required by applicable law (such as deliberate and grossly
++   negligent acts) or agreed to in writing, shall any Contributor be
++   liable to You for damages, including any direct, indirect, special,
++   incidental, or consequential damages of any character arising as a
++   result of this License or out of the use or inability to use the
++   Work (including but not limited to damages for loss of goodwill,
++   work stoppage, computer failure or malfunction, or any and all
++   other commercial damages or losses), even if such Contributor
++   has been advised of the possibility of such damages.
++
++9. Accepting Warranty or Additional Liability. While redistributing
++   the Work or Derivative Works thereof, You may choose to offer,
++   and charge a fee for, acceptance of support, warranty, indemnity,
++   or other liability obligations and/or rights consistent with this
++   License. However, in accepting such obligations, You may act only
++   on Your own behalf and on Your sole responsibility, not on behalf
++   of any other Contributor, and only if You agree to indemnify,
++   defend, and hold each Contributor harmless for any liability
++   incurred by, or claims asserted against, such Contributor by reason
++   of your accepting any such warranty or additional liability.
++
++END OF TERMS AND CONDITIONS
++
++APPENDIX: How to apply the Apache License to your work.
++
++   To apply the Apache License to your work, attach the following
++   boilerplate notice, with the fields enclosed by brackets "[]"
++   replaced with your own identifying information. (Don't include
++   the brackets!)  The text should be enclosed in the appropriate
++   comment syntax for the file format. We also recommend that a
++   file or class name and description of purpose be included on the
++   same "printed page" as the copyright notice for easier
++   identification within third-party archives.
++
++Copyright [yyyy] [name of copyright owner]
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++      http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39d4bdb5acd313c1a92dbeaa1c379aaf0596a315
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2014 The Rust Project Developers
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..67535d211e9c0f39b1aa31bd354ae9f31f70cf3c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,156 @@@
++libc
++====
++
++A Rust library with native bindings to the types and functions commonly found on
++various systems, including libc.
++
++[![Build Status](https://travis-ci.org/rust-lang/libc.svg?branch=master)](https://travis-ci.org/rust-lang/libc)
++[![Build status](https://ci.appveyor.com/api/projects/status/github/rust-lang/libc?svg=true)](https://ci.appveyor.com/project/rust-lang-libs/libc)
++
++[Documentation](#platforms-and-documentation)
++
++## Usage
++
++First, add the following to your `Cargo.toml`:
++
++```toml
++[dependencies]
++libc = "0.2"
++```
++
++Next, add this to your crate root:
++
++```rust
++extern crate libc;
++```
++
++Currently libc by default links to the standard library, but if you would
++instead like to use libc in a `#![no_std]` situation or crate you can request
++this via:
++
++```toml
++[dependencies]
++libc = { version = "0.2", default-features = false }
++```
++
++## What is libc?
++
++The primary purpose of this crate is to provide all of the definitions necessary
++to easily interoperate with C code (or "C-like" code) on each of the platforms
++that Rust supports. This includes type definitions (e.g. `c_int`), constants
++(e.g. `EINVAL`) as well as function headers (e.g. `malloc`).
++
++This crate does not strive to have any form of compatibility across platforms,
++but rather it is simply a straight binding to the system libraries on the
++platform in question.
++
++## Public API
++
++This crate exports all underlying platform types, functions, and constants under
++the crate root, so all items are accessible as `libc::foo`. The types and values
++of all the exported APIs match the platform that libc is compiled for.
++
++More detailed information about the design of this library can be found in its
++[associated RFC][rfc].
++
++[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1291-promote-libc.md
++
++## Adding an API
++
++Want to use an API which currently isn't bound in `libc`? It's quite easy to add
++one!
++
++The internal structure of this crate is designed to minimize the number of
++`#[cfg]` attributes in order to easily be able to add new items which apply
++to all platforms in the future. As a result, the crate is organized
++hierarchically based on platform. Each module has a number of `#[cfg]`'d
++children, but only one is ever actually compiled. Each module then reexports all
++the contents of its children.
++
++This means that for each platform that libc supports, the path from a
++leaf module to the root will contain all bindings for the platform in question.
++Consequently, this indicates where an API should be added! Adding an API at a
++particular level in the hierarchy means that it is supported on all the child
++platforms of that level. For example, when adding a Unix API it should be added
++to `src/unix/mod.rs`, but when adding a Linux-only API it should be added to
++`src/unix/notbsd/linux/mod.rs`.
++
++If you're not 100% sure at what level of the hierarchy an API should be added
++at, fear not! This crate has CI support which tests any binding against all
++platforms supported, so you'll see failures if an API is added at the wrong
++level or has different signatures across platforms.
++
++With that in mind, the steps for adding a new API are:
++
++1. Determine where in the module hierarchy your API should be added.
++2. Add the API.
++3. Send a PR to this repo.
++4. Wait for CI to pass, fixing errors.
++5. Wait for a merge!
++
++### Test before you commit
++
++We have two automated tests running on [Travis](https://travis-ci.org/rust-lang/libc):
++
++1. [`libc-test`](https://github.com/alexcrichton/ctest)
++  - `cd libc-test && cargo run`
++  - Use the `skip_*()` functions in `build.rs` if you really need a workaround.
++2. Style checker
++  - `rustc ci/style.rs && ./style src`
++
++### Releasing your change to crates.io
++
++Now that you've done the amazing job of landing your new API or your new
++platform in this crate, the next step is to get that sweet, sweet usage from
++crates.io! The only next step is to bump the version of libc and then publish
++it. If you'd like to get a release out ASAP you can follow these steps:
++
++1. Update the version number in `Cargo.toml`, you'll just be bumping the patch
++   version number.
++2. Run `cargo update` to regenerate the lockfile to encode your version bump in
++   the lock file. You may pull in some other updated dependencies, that's ok.
++3. Send a PR to this repository. It should [look like this][example], but it'd
++   also be nice to fill out the description with a small rationale for the
++   release (any rationale is ok though!)
++4. Once merged the release will be tagged and published by one of the libc crate
++   maintainers.
++
++[example]: https://github.com/rust-lang/libc/pull/583
++
++## Platforms and Documentation
++
++The following platforms are currently tested and have documentation available:
++
++Tested:
++  * [`i686-pc-windows-msvc`](https://doc.rust-lang.org/libc/i686-pc-windows-msvc/libc/)
++  * [`x86_64-pc-windows-msvc`](https://doc.rust-lang.org/libc/x86_64-pc-windows-msvc/libc/)
++    (Windows)
++  * [`i686-pc-windows-gnu`](https://doc.rust-lang.org/libc/i686-pc-windows-gnu/libc/)
++  * [`x86_64-pc-windows-gnu`](https://doc.rust-lang.org/libc/x86_64-pc-windows-gnu/libc/)
++  * [`i686-apple-darwin`](https://doc.rust-lang.org/libc/i686-apple-darwin/libc/)
++  * [`x86_64-apple-darwin`](https://doc.rust-lang.org/libc/x86_64-apple-darwin/libc/)
++    (OSX)
++  * `i386-apple-ios`
++  * `x86_64-apple-ios`
++  * [`i686-unknown-linux-gnu`](https://doc.rust-lang.org/libc/i686-unknown-linux-gnu/libc/)
++  * [`x86_64-unknown-linux-gnu`](https://doc.rust-lang.org/libc/x86_64-unknown-linux-gnu/libc/)
++    (Linux)
++  * [`x86_64-unknown-linux-musl`](https://doc.rust-lang.org/libc/x86_64-unknown-linux-musl/libc/)
++    (Linux MUSL)
++  * [`aarch64-unknown-linux-gnu`](https://doc.rust-lang.org/libc/aarch64-unknown-linux-gnu/libc/)
++  * [`mips-unknown-linux-gnu`](https://doc.rust-lang.org/libc/mips-unknown-linux-gnu/libc/)
++  * [`arm-unknown-linux-gnueabihf`](https://doc.rust-lang.org/libc/arm-unknown-linux-gnueabihf/libc/)
++  * [`arm-linux-androideabi`](https://doc.rust-lang.org/libc/arm-linux-androideabi/libc/)
++    (Android)
++  * [`x86_64-unknown-freebsd`](https://doc.rust-lang.org/libc/x86_64-unknown-freebsd/libc/)
++  * [`x86_64-unknown-openbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-openbsd/libc/)
++  * [`x86_64-rumprun-netbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-netbsd/libc/)
++
++The following may be supported, but are not guaranteed to always work:
++
++  * `i686-unknown-freebsd`
++  * [`x86_64-unknown-bitrig`](https://doc.rust-lang.org/libc/x86_64-unknown-bitrig/libc/)
++  * [`x86_64-unknown-dragonfly`](https://doc.rust-lang.org/libc/x86_64-unknown-dragonfly/libc/)
++  * `i686-unknown-haiku`
++  * `x86_64-unknown-haiku`
++  * [`x86_64-unknown-netbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-netbsd/libc/)
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..22ef8a5601f50851d56a6edfe3aebfdff9e88201
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,31 @@@
++environment:
++  # When this was added there were revocation check failures when using the
++  # libcurl backend as libcurl checks by default, but rustup doesn't provide the
++  # switch to turn this off. Switch to Hyper which looks to not check for
++  # revocation by default like libcurl does.
++  RUSTUP_USE_HYPER: 1
++  CARGO_HTTP_CHECK_REVOKE: false
++  matrix:
++  - TARGET: x86_64-pc-windows-gnu
++    MSYS2_BITS: 64
++  - TARGET: i686-pc-windows-gnu
++    MSYS2_BITS: 32
++  - TARGET: x86_64-pc-windows-msvc
++  - TARGET: i686-pc-windows-msvc
++install:
++  - appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
++  - rustup-init.exe -y --default-host %TARGET%
++  - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
++  - if defined MSYS2_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS2_BITS%\bin
++  - rustc -V
++  - cargo -V
++
++build: false
++
++test_script:
++  - cargo test --target %TARGET%
++  - cargo run --manifest-path libc-test/Cargo.toml --target %TARGET%
++
++cache:
++  - target
++  - C:\Users\appveyor\.cargo\registry
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..13c7c8da52fc5d622a4ec1249a985f46e6309c9c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,203 @@@
++The goal of the libc crate is to have CI running everywhere to have the
++strongest guarantees about the definitions that this library contains, and as a
++result the CI is pretty complicated and also pretty large! Hopefully this can
++serve as a guide through the sea of scripts in this directory and elsewhere in
++this project.
++
++# Files
++
++First up, let's talk about the files in this directory:
++
++* `run-travis.sh` - a shell script run by all Travis builders, this is
++  responsible for setting up the rest of the environment such as installing new
++  packages, downloading Rust target libraries, etc.
++
++* `run.sh` - the actual script which runs tests for a particular architecture.
++  Called from the `run-travis.sh` script this will run all tests for the target
++  specified.
++
++* `cargo-config` - Cargo configuration of linkers to use copied into place by
++  the `run-travis.sh` script before builds are run.
++
++* `dox.sh` - script called from `run-travis.sh` on only the linux 64-bit nightly
++  Travis bots to build documentation for this crate.
++
++* `landing-page-*.html` - used by `dox.sh` to generate a landing page for all
++  architectures' documentation.
++
++* `run-qemu.sh` - see discussion about QEMU below
++
++* `mips`, `rumprun` - instructions to build the docker image for each respective
++  CI target
++
++# CI Systems
++
++Currently this repository leverages a combination of Travis CI and AppVeyor for
++running tests. The triples tested are:
++
++* AppVeyor
++  * `{i686,x86_64}-pc-windows-{msvc,gnu}`
++* Travis
++  * `{i686,x86_64,mips,aarch64}-unknown-linux-gnu`
++  * `x86_64-unknown-linux-musl`
++  * `arm-unknown-linux-gnueabihf`
++  * `arm-linux-androideabi`
++  * `{i686,x86_64}-apple-{darwin,ios}`
++  * `x86_64-rumprun-netbsd`
++  * `x86_64-unknown-freebsd`
++  * `x86_64-unknown-openbsd`
++
++The Windows triples are all pretty standard, they just set up their environment
++then run tests, no need for downloading any extra target libs (we just download
++the right installer). The Intel Linux/OSX builds are similar in that we just
++download the right target libs and run tests. Note that the Intel Linux/OSX
++builds are run on stable/beta/nightly, but are the only ones that do so.
++
++The remaining architectures look like:
++
++* Android runs in a [docker image][android-docker] with an emulator, the NDK,
++  and the SDK already set up. The entire build happens within the docker image.
++* The MIPS, ARM, and AArch64 builds all use the QEMU userspace emulator to run
++  the generated binary to actually verify the tests pass.
++* The MUSL build just has to download a MUSL compiler and target libraries and
++  then otherwise runs tests normally.
++* iOS builds need an extra linker flag currently, but beyond that they're built
++  as standard as everything else.
++* The rumprun target builds an entire kernel from the test suite and then runs
++  it inside QEMU using the serial console to test whether it succeeded or
++  failed.
++* The BSD builds, currently OpenBSD and FreeBSD, use QEMU to boot up a system
++  and compile/run tests. More information on that below.
++
++[android-docker]: https://github.com/rust-lang/rust-buildbot/blob/master/slaves/android/Dockerfile
++
++## QEMU
++
++Lots of the architectures tested here use QEMU in the tests, so it's worth going
++over all the crazy capabilities QEMU has and the various flavors in which we use
++it!
++
++First up, QEMU has userspace emulation where it doesn't boot a full kernel, it
++just runs a binary from another architecture (using the `qemu-<arch>` wrappers).
++We provide it the runtime path for the dynamically loaded system libraries,
++however. This strategy is used for all Linux architectures that aren't intel.
++Note that one downside of this QEMU system is that threads are barely
++implemented, so we're careful to not spawn many threads.
++
++For the rumprun target the only output is a kernel image, so we just use that
++plus the `rumpbake` command to create a full kernel image which is then run from
++within QEMU.
++
++Finally, the fun part, the BSDs. Quite a few hoops are jumped through to get CI
++working for these platforms, but the gist of it looks like:
++
++* Cross compiling from Linux to any of the BSDs seems to be quite non-standard.
++  We may be able to get it working but it might be difficult at that point to
++  ensure that the libc definitions align with what you'd get on the BSD itself.
++  As a result, we try to do compiles within the BSD distro.
++* On Travis we can't run a VM-in-a-VM, so we resort to userspace emulation
++  (QEMU).
++* Unfortunately on Travis we also can't use KVM, so the emulation is super slow.
++
++With all that in mind, the way BSD is tested looks like:
++
++1. Download a pre-prepared image for the OS being tested.
++2. Generate the tests for the OS being tested. This involves running the `ctest`
++   library over libc to generate a Rust file and a C file which will then be
++   compiled into the final test.
++3. Generate a disk image which will later be mounted by the OS being tested.
++   This image is mostly just the libc directory, but some modifications are made
++   to compile the generated files from step 2.
++4. The kernel is booted in QEMU, and it is configured to detect the libc-test
++   image being available, run the test script, and then shut down afterwards.
++5. Look for whether the tests passed in the serial console output of the kernel.
++
++There's some pretty specific instructions for setting up each image (detailed
++below), but the main gist of this is that we must avoid a vanilla `cargo run`
++inside of the `libc-test` directory (which is what it's intended for) because
++that would compile `syntex_syntax`, a large library, with userspace emulation.
++This invariably times out on Travis, so we can't do that.
++
++Once all those hoops are jumped through, however, we can be happy that we're
++testing almost everything!
++
++Below are some details of how to set up the initial OS images which are
++downloaded. Each image must be enabled have input/output over the serial
++console, log in automatically at the serial console, detect if a second drive in
++QEMU is available, and if so mount it, run a script (it'll specifically be
++`run-qemu.sh` in this folder which is copied into the generated image talked
++about above), and then shut down.
++
++### QEMU setup - FreeBSD
++
++1. Download CD installer (most minimal is fine)
++2. `qemu-img create -f qcow2 foo.qcow2 2G`
++3. `qemu -cdrom foo.iso -drive if=virtio,file=foo.qcow2 -net nic,model=virtio -net user`
++4. run installer
++5. `echo 'console="comconsole"' >> /boot/loader.conf`
++6. `echo 'autoboot_delay="0"' >> /boot/loader.conf`
++7. look at /etc/ttys, see what getty argument is for ttyu0
++8. edit /etc/gettytab, look for ttyu0 argument, prepend `:al=root` to line
++   beneath
++
++(note that the current image has a `freebsd` user, but this isn't really
++necessary)
++
++Once that's done, arrange for this script to run at login:
++
++```
++#!/bin/sh
++
++sudo kldload ext2fs
++[ -e /dev/vtbd1 ] || exit 0
++sudo mount -t ext2fs /dev/vtbd1 /mnt
++sh /mnt/run.sh /mnt
++sudo poweroff
++```
++
++Helpful links
++
++* https://en.wikibooks.org/wiki/QEMU/Images
++* https://blog.nekoconeko.nl/blog/2015/06/04/creating-an-openstack-freebsd-image.html
++* https://www.freebsd.org/doc/handbook/serialconsole-setup.html
++
++
++### QEMU setup - OpenBSD
++
++1. Download CD installer
++2. `qemu-img create -f qcow2 foo.qcow2 2G`
++3. `qemu -cdrom foo.iso -drive if=virtio,file=foo.qcow2 -net nic,model=virtio -net user`
++4. run installer
++5. `echo 'set tty com0' >> /etc/boot.conf`
++6. `echo 'boot' >> /etc/boot.conf`
++7. Modify /etc/ttys, change the `tty00` at the end from 'unknown off' to
++   'vt220 on secure'
++8. Modify same line in /etc/ttys to have `"/root/foo.sh"` as the shell
++9. Add this script to `/root/foo.sh`
++
++```
++#!/bin/sh
++exec 1>/dev/tty00
++exec 2>&1
++
++if mount -t ext2fs /dev/sd1c /mnt; then
++  sh /mnt/run.sh /mnt
++  shutdown -ph now
++fi
++
++# limited shell...
++exec /bin/sh < /dev/tty00
++```
++
++10. `chmod +x /root/foo.sh`
++
++Helpful links:
++
++* https://en.wikibooks.org/wiki/QEMU/Images
++* http://www.openbsd.org/faq/faq7.html#SerCon
++
++# Questions?
++
++Hopefully that's at least somewhat of an introduction to everything going on
++here, and feel free to ping @alexcrichton with questions!
++
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8d8f60a5ec2604606571cdb6a7d231d5754aa38f
new file mode 100755 (executable)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++#!/usr/bin/expect -f
++# ignore-license
++
++set timeout 1800
++set cmd [lindex $argv 0]
++set licenses [lindex $argv 1]
++
++spawn {*}$cmd
++expect {
++  "Do you accept the license '*'*" {
++        exp_send "y\r"
++        exp_continue
++  }
++  eof
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..873f6c52c8f189c8de42edf4c0c3c3f406a7e394
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,37 @@@
++#!/bin/sh
++# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
++# file at the top-level directory of this distribution and at
++# http://rust-lang.org/COPYRIGHT.
++#
++# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++# option. This file may not be copied, modified, or distributed
++# except according to those terms.
++
++set -ex
++
++curl -O https://dl.google.com/android/repository/android-ndk-r15b-linux-x86_64.zip
++unzip -q android-ndk-r15b-linux-x86_64.zip
++
++case "$1" in
++  aarch64)
++    arch=arm64
++    ;;
++
++  i686)
++    arch=x86
++    ;;
++
++  *)
++    arch=$1
++    ;;
++esac;
++
++android-ndk-r15b/build/tools/make_standalone_toolchain.py \
++        --unified-headers \
++        --install-dir /android/ndk-$1 \
++        --arch $arch \
++        --api 24
++
++rm -rf ./android-ndk-r15b-linux-x86_64.zip ./android-ndk-r15b
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d03b7623bf78544bd9adf50162767b09a288bffa
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,57 @@@
++#!/bin/sh
++# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
++# file at the top-level directory of this distribution and at
++# http://rust-lang.org/COPYRIGHT.
++#
++# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++# option. This file may not be copied, modified, or distributed
++# except according to those terms.
++
++set -ex
++
++# Prep the SDK and emulator
++#
++# Note that the update process requires that we accept a bunch of licenses, and
++# we can't just pipe `yes` into it for some reason, so we take the same strategy
++# located in https://github.com/appunite/docker by just wrapping it in a script
++# which apparently magically accepts the licenses.
++
++mkdir sdk
++curl https://dl.google.com/android/repository/tools_r25.2.5-linux.zip -O
++unzip -d sdk tools_r25.2.5-linux.zip
++
++filter="platform-tools,android-24"
++
++case "$1" in
++  arm | armv7)
++    abi=armeabi-v7a
++    ;;
++
++  aarch64)
++    abi=arm64-v8a
++    ;;
++
++  i686)
++    abi=x86
++    ;;
++
++  x86_64)
++    abi=x86_64
++    ;;
++
++  *)
++    echo "invalid arch: $1"
++    exit 1
++    ;;
++esac;
++
++filter="$filter,sys-img-$abi-android-24"
++
++./android-accept-licenses.sh "android - update sdk -a --no-ui --filter $filter"
++
++echo "no" | android create avd \
++                --name $1 \
++                --target android-24 \
++                --abi $abi
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9611dfeb0d529ee7c19ac7e8316f5b8c5ba8a373
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,52 @@@
++# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
++# file at the top-level directory of this distribution and at
++# http://rust-lang.org/COPYRIGHT.
++#
++# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++# option. This file may not be copied, modified, or distributed
++# except according to those terms.
++
++set -ex
++
++URL=https://dl.google.com/android/repository/sys-img/android
++
++main() {
++    local arch=$1
++    local name=$2
++    local dest=/system
++    local td=$(mktemp -d)
++
++    apt-get install --no-install-recommends e2tools
++
++    pushd $td
++    curl -O $URL/$name
++    unzip -q $name
++
++    local system=$(find . -name system.img)
++    mkdir -p $dest/{bin,lib,lib64}
++
++    # Extract android linker and libraries to /system
++    # This allows android executables to be run directly (or with qemu)
++    if [ $arch = "x86_64" -o $arch = "arm64" ]; then
++        e2cp -p $system:/bin/linker64 $dest/bin/
++        e2cp -p $system:/lib64/libdl.so $dest/lib64/
++        e2cp -p $system:/lib64/libc.so $dest/lib64/
++        e2cp -p $system:/lib64/libm.so $dest/lib64/
++    else
++        e2cp -p $system:/bin/linker $dest/bin/
++        e2cp -p $system:/lib/libdl.so $dest/lib/
++        e2cp -p $system:/lib/libc.so $dest/lib/
++        e2cp -p $system:/lib/libm.so $dest/lib/
++    fi
++
++    # clean up
++    apt-get purge --auto-remove -y e2tools
++
++    popd
++
++    rm -rf $td
++}
++
++main "${@}"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7ad84926bf82b2106223640759135558cbf6dff0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,32 @@@
++FROM ubuntu:16.04
++
++RUN dpkg --add-architecture i386 && \
++    apt-get update && \
++    apt-get install -y --no-install-recommends \
++  file \
++  curl \
++  ca-certificates \
++  python \
++  unzip \
++  expect \
++  openjdk-9-jre \
++  libstdc++6:i386 \
++  libpulse0 \
++  gcc \
++  libc6-dev
++
++WORKDIR /android/
++COPY android* /android/
++
++ENV ANDROID_ARCH=aarch64
++ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools
++
++RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
++RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
++RUN mv /root/.android /tmp
++RUN chmod 777 -R /tmp/.android
++RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
++
++ENV PATH=$PATH:/rust/bin \
++    CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android-gcc \
++    HOME=/tmp
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2a02f632103f00f32359550f00c87dbd9ff494ad
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7 @@@
++FROM ubuntu:17.10
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++  gcc libc6-dev ca-certificates \
++  gcc-aarch64-linux-gnu libc6-dev-arm64-cross qemu-user
++ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
++    PATH=$PATH:/rust/bin
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..054941416dfb501ebe7363740205a3bf64599ee0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,32 @@@
++FROM ubuntu:16.04
++
++RUN dpkg --add-architecture i386 && \
++    apt-get update && \
++    apt-get install -y --no-install-recommends \
++  file \
++  curl \
++  ca-certificates \
++  python \
++  unzip \
++  expect \
++  openjdk-9-jre \
++  libstdc++6:i386 \
++  libpulse0 \
++  gcc \
++  libc6-dev
++
++WORKDIR /android/
++COPY android* /android/
++
++ENV ANDROID_ARCH=arm
++ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools
++
++RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
++RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
++RUN mv /root/.android /tmp
++RUN chmod 777 -R /tmp/.android
++RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
++
++ENV PATH=$PATH:/rust/bin \
++    CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \
++    HOME=/tmp
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..53da39825c2d37cd6cbfdca2a31f784b917e4d3b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7 @@@
++FROM ubuntu:17.10
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++  gcc libc6-dev ca-certificates \
++  gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user
++ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
++    PATH=$PATH:/rust/bin
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bee904379645f7c32f52414189a412f3dbe7c8ba
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,32 @@@
++FROM ubuntu:16.04
++
++RUN dpkg --add-architecture i386 && \
++    apt-get update && \
++    apt-get install -y --no-install-recommends \
++  file \
++  curl \
++  ca-certificates \
++  python \
++  unzip \
++  expect \
++  openjdk-9-jre \
++  libstdc++6:i386 \
++  libpulse0 \
++  gcc \
++  libc6-dev
++
++WORKDIR /android/
++COPY android* /android/
++
++ENV ANDROID_ARCH=i686
++ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools
++
++RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
++RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
++RUN mv /root/.android /tmp
++RUN chmod 777 -R /tmp/.android
++RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
++
++ENV PATH=$PATH:/rust/bin \
++    CARGO_TARGET_I686_LINUX_ANDROID_LINKER=i686-linux-android-gcc \
++    HOME=/tmp
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a5a4b8e36cfb394bda2e6c41606ff2215b204546
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++FROM ubuntu:17.10
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++  gcc-multilib libc6-dev ca-certificates
++ENV PATH=$PATH:/rust/bin
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3adb9200408471cdd56bd7f5a7626df4f0a4a488
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++FROM ubuntu:17.10
++
++RUN dpkg --add-architecture i386
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++  gcc-multilib make libc6-dev git curl ca-certificates libc6:i386
++# Below we're cross-compiling musl for i686 using the system compiler on an
++# x86_64 system. This is an awkward thing to be doing and so we have to jump
++# through a couple hoops to get musl to be happy. In particular:
++#
++# * We specifically pass -m32 in CFLAGS and override CC when running ./configure,
++#   since otherwise the script will fail to find a compiler.
++# * We manually unset CROSS_COMPILE when running make; otherwise the makefile
++#   will call the non-existent binary 'i686-ar'.
++RUN curl https://www.musl-libc.org/releases/musl-1.1.15.tar.gz | \
++    tar xzf - && \
++    cd musl-1.1.15 && \
++    CC=gcc CFLAGS=-m32 ./configure --prefix=/musl-i686 --disable-shared --target=i686 && \
++    make CROSS_COMPILE= install -j4 && \
++    cd .. && \
++    rm -rf musl-1.1.15 && \
++# Install linux kernel headers sanitized for use with musl
++    curl -L  https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-5.tar.gz | \
++    tar xzf - && \
++    cd kernel-headers-3.12.6-5 && \
++    make ARCH=i386 prefix=/musl-i686 install -j4 && \
++    cd .. && \
++    rm -rf kernel-headers-3.12.6-5
++ENV PATH=$PATH:/musl-i686/bin:/rust/bin \
++    CC_i686_unknown_linux_musl=musl-gcc
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f4997a702f61baa7d4af3e0cbfa814db63ecf352
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,10 @@@
++FROM ubuntu:17.10
++
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++        gcc libc6-dev qemu-user ca-certificates \
++        gcc-mips-linux-gnu libc6-dev-mips-cross \
++        qemu-system-mips
++
++ENV CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc \
++    PATH=$PATH:/rust/bin
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ba8e34642f61a94fd968fe073d9af77839e7c20e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++FROM ubuntu:17.10
++
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++        gcc libc6-dev qemu-user ca-certificates qemu-system-mips curl \
++        bzip2
++
++RUN mkdir /toolchain
++
++# Note that this originally came from:
++# https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
++RUN curl -L https://s3.amazonaws.com/rust-lang-ci/libc/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
++      tar xjf - -C /toolchain --strip-components=1
++
++ENV PATH=$PATH:/rust/bin:/toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15/bin \
++    CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \
++    CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_LINKER=mips-openwrt-linux-gcc
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a864a31ccee8f55c4d2ef19915c55cb16760f8c5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,11 @@@
++FROM ubuntu:17.10
++
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++        gcc libc6-dev qemu-user ca-certificates \
++        gcc-mips64-linux-gnuabi64 libc6-dev-mips64-cross \
++        qemu-system-mips64
++
++ENV CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_LINKER=mips64-linux-gnuabi64-gcc \
++    CC_mips64_unknown_linux_gnuabi64=mips64-linux-gnuabi64-gcc \
++    PATH=$PATH:/rust/bin
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..36666743fb40c750fcf3c3e347fb1497361466f4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++FROM ubuntu:17.10
++
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++        gcc libc6-dev qemu-user ca-certificates qemu-system-mips curl \
++        bzip2
++
++RUN mkdir /toolchain
++
++# Note that this originally came from:
++# https://downloads.openwrt.org/snapshots/trunk/malta/generic/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
++RUN curl -L https://s3.amazonaws.com/rust-lang-ci/libc/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
++      tar xjf - -C /toolchain --strip-components=2
++
++ENV PATH=$PATH:/rust/bin:/toolchain/bin \
++    CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
++    CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_LINKER=mipsel-openwrt-linux-gcc
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..489f8dd57faa927c5a6615c0a53171abedcdb877
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,10 @@@
++FROM ubuntu:17.10
++
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++        gcc libc6-dev qemu-user ca-certificates \
++        gcc-powerpc-linux-gnu libc6-dev-powerpc-cross \
++        qemu-system-ppc
++
++ENV CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_LINKER=powerpc-linux-gnu-gcc \
++    PATH=$PATH:/rust/bin
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..51ebcca7e8165d99f55ef643b38dd4e841d12697
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,11 @@@
++FROM ubuntu:17.10
++
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++        gcc libc6-dev qemu-user ca-certificates \
++        gcc-powerpc64-linux-gnu libc6-dev-ppc64-cross \
++        qemu-system-ppc
++
++ENV CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_LINKER=powerpc64-linux-gnu-gcc \
++    CC=powerpc64-linux-gnu-gcc \
++    PATH=$PATH:/rust/bin
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4cd9d4ae4faed7334a21ece02c64c3b0115b762b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,9 @@@
++FROM ubuntu:17.10
++
++RUN apt-get update && apt-get install -y --no-install-recommends \
++        gcc libc6-dev qemu-user ca-certificates \
++        gcc-s390x-linux-gnu libc6-dev-s390x-cross
++
++ENV CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER=s390x-linux-gnu-gcc \
++    CC_s390x_unknown_linux_gnu=s390x-linux-gnu-gcc \
++    PATH=$PATH:/rust/bin
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0cfbc4820903a908227e4463efd404a32a61b682
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,26 @@@
++FROM ubuntu:16.04
++
++RUN apt-get update && \
++    apt-get install -y --no-install-recommends \
++  ca-certificates \
++  curl \
++  gcc \
++  libc-dev \
++  python \
++  unzip
++
++WORKDIR /android/
++ENV ANDROID_ARCH=x86_64
++COPY android-install-ndk.sh /android/
++RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
++
++# We do not run x86_64-linux-android tests on an android emulator.
++# See ci/android-sysimage.sh for informations about how tests are run.
++COPY android-sysimage.sh /android/
++RUN bash /android/android-sysimage.sh x86_64 x86_64-24_r07.zip
++
++ENV PATH=$PATH:/rust/bin:/android/ndk-$ANDROID_ARCH/bin \
++    CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER=x86_64-linux-android-gcc \
++    CC_x86_64_linux_android=x86_64-linux-android-gcc \
++    CXX_x86_64_linux_android=x86_64-linux-android-g++ \
++    HOME=/tmp
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..129771e76b74d7b843ca9e30f378146ea97e2ec2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++FROM mato/rumprun-toolchain-hw-x86_64
++USER root
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++  qemu
++ENV PATH=$PATH:/rust/bin
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..12b0bdffcc81e21d6bfa3c28a9b422de96dc2360
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++FROM alexcrichton/rust-slave-linux-cross:2016-04-15
++USER root
++
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++  qemu genext2fs
++
++ENTRYPOINT ["sh"]
++
++ENV PATH=$PATH:/rust/bin \
++    QEMU=2016-11-06/freebsd.qcow2.gz \
++    CAN_CROSS=1 \
++    CARGO_TARGET_X86_64_UNKNOWN_FREEBSD_LINKER=x86_64-unknown-freebsd10-gcc
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ca60edecea7836fcb00814c6cd98f81f159f0a5e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++FROM ubuntu:17.10
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++  gcc libc6-dev ca-certificates
++ENV PATH=$PATH:/rust/bin
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d9d651138661d55d36cd7161cecc4a69d9ba16a0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,20 @@@
++FROM ubuntu:17.10
++
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++  gcc make libc6-dev git curl ca-certificates
++RUN curl https://www.musl-libc.org/releases/musl-1.1.15.tar.gz | \
++    tar xzf - && \
++    cd musl-1.1.15 && \
++    ./configure --prefix=/musl-x86_64 && \
++    make install -j4 && \
++    cd .. && \
++    rm -rf musl-1.1.15 && \
++# Install linux kernel headers sanitized for use with musl
++    curl -L  https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-5.tar.gz | \
++    tar xzf - && \
++    cd kernel-headers-3.12.6-5 && \
++    make ARCH=x86_64 prefix=/musl-x86_64 install -j4 && \
++    cd .. && \
++    rm -rf kernel-headers-3.12.6-5
++ENV PATH=$PATH:/musl-x86_64/bin:/rust/bin
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..518baf8702e3e1539134acccbdd6d6fc6760976d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,8 @@@
++FROM ubuntu:16.10
++
++RUN apt-get update
++RUN apt-get install -y --no-install-recommends \
++  gcc libc6-dev qemu curl ca-certificates \
++  genext2fs
++ENV PATH=$PATH:/rust/bin \
++    QEMU=2016-11-06/openbsd-6.0-without-pkgs.qcow2
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..85e92439484c6a80db71b7039e3a3184cac0f3bb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,33 @@@
++#!/bin/sh
++
++# Builds documentation for all target triples that we have a registered URL for
++# in liblibc. This scrapes the list of triples to document from `src/lib.rs`
++# which has a bunch of `html_root_url` directives we pick up.
++
++set -e
++
++TARGETS=`grep html_root_url src/lib.rs | sed 's/.*".*\/\(.*\)"/\1/'`
++
++rm -rf target/doc
++mkdir -p target/doc
++
++cp ci/landing-page-head.html target/doc/index.html
++
++for target in $TARGETS; do
++  echo documenting $target
++
++  rustdoc -o target/doc/$target --target $target src/lib.rs --cfg dox \
++    --crate-name libc
++
++  echo "<li><a href="/libc/$target/libc/index.html">$target</a></li>" \
++    >> target/doc/index.html
++done
++
++cat ci/landing-page-footer.html >> target/doc/index.html
++
++# If we're on travis, not a PR, and on the right branch, publish!
++if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
++  pip install ghp_import --install-option="--prefix=$HOME/.local"
++  $HOME/.local/bin/ghp-import -n target/doc
++  git push -qf https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
++fi
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b14615036d02ac8d6fb5707a3ef562143ce0ad81
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,171 @@@
++// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++// This is a script to deploy and execute a binary on an iOS simulator.
++// The primary use of this is to be able to run unit tests on the simulator and
++// retrieve the results.
++//
++// To do this through Cargo instead, use Dinghy
++// (https://github.com/snipsco/dinghy): cargo dinghy install, then cargo dinghy
++// test.
++
++use std::env;
++use std::fs::{self, File};
++use std::io::Write;
++use std::path::Path;
++use std::process;
++use std::process::Command;
++
++macro_rules! t {
++    ($e:expr) => (match $e {
++        Ok(e) => e,
++        Err(e) => panic!("{} failed with: {}", stringify!($e), e),
++    })
++}
++
++// Step one: Wrap as an app
++fn package_as_simulator_app(crate_name: &str, test_binary_path: &Path) {
++    println!("Packaging simulator app");
++    drop(fs::remove_dir_all("ios_simulator_app"));
++    t!(fs::create_dir("ios_simulator_app"));
++    t!(fs::copy(test_binary_path,
++                Path::new("ios_simulator_app").join(crate_name)));
++
++    let mut f = t!(File::create("ios_simulator_app/Info.plist"));
++    t!(f.write_all(format!(r#"
++        <?xml version="1.0" encoding="UTF-8"?>
++        <!DOCTYPE plist PUBLIC
++                "-//Apple//DTD PLIST 1.0//EN"
++                "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
++        <plist version="1.0">
++            <dict>
++                <key>CFBundleExecutable</key>
++                <string>{}</string>
++                <key>CFBundleIdentifier</key>
++                <string>com.rust.unittests</string>
++            </dict>
++        </plist>
++    "#, crate_name).as_bytes()));
++}
++
++// Step two: Start the iOS simulator
++fn start_simulator() {
++    println!("Looking for iOS simulator");
++    let output = t!(Command::new("xcrun").arg("simctl").arg("list").output());
++    assert!(output.status.success());
++    let mut simulator_exists = false;
++    let mut simulator_booted = false;
++    let mut found_rust_sim = false;
++    let stdout = t!(String::from_utf8(output.stdout));
++    for line in stdout.lines() {
++        if line.contains("rust_ios") {
++            if found_rust_sim {
++                panic!("Duplicate rust_ios simulators found. Please \
++                        double-check xcrun simctl list.");
++            }
++            simulator_exists = true;
++            simulator_booted = line.contains("(Booted)");
++            found_rust_sim = true;
++        }
++    }
++
++    if simulator_exists == false {
++        println!("Creating iOS simulator");
++        Command::new("xcrun")
++                .arg("simctl")
++                .arg("create")
++                .arg("rust_ios")
++                .arg("com.apple.CoreSimulator.SimDeviceType.iPhone-SE")
++                .arg("com.apple.CoreSimulator.SimRuntime.iOS-10-2")
++                .check_status();
++    } else if simulator_booted == true {
++        println!("Shutting down already-booted simulator");
++        Command::new("xcrun")
++                .arg("simctl")
++                .arg("shutdown")
++                .arg("rust_ios")
++                .check_status();
++    }
++
++    println!("Starting iOS simulator");
++    // We can't uninstall the app (if present) as that will hang if the
++    // simulator isn't completely booted; just erase the simulator instead.
++    Command::new("xcrun").arg("simctl").arg("erase").arg("rust_ios").check_status();
++    Command::new("xcrun").arg("simctl").arg("boot").arg("rust_ios").check_status();
++}
++
++// Step three: Install the app
++fn install_app_to_simulator() {
++    println!("Installing app to simulator");
++    Command::new("xcrun")
++            .arg("simctl")
++            .arg("install")
++            .arg("booted")
++            .arg("ios_simulator_app/")
++            .check_status();
++}
++
++// Step four: Run the app
++fn run_app_on_simulator() {
++    println!("Running app");
++    let output = t!(Command::new("xcrun")
++                    .arg("simctl")
++                    .arg("launch")
++                    .arg("--console")
++                    .arg("booted")
++                    .arg("com.rust.unittests")
++                    .output());
++
++    println!("stdout --\n{}\n", String::from_utf8_lossy(&output.stdout));
++    println!("stderr --\n{}\n", String::from_utf8_lossy(&output.stderr));
++
++    let stdout = String::from_utf8_lossy(&output.stdout);
++    let passed = stdout.lines()
++                       .find(|l| l.contains("PASSED"))
++                       .map(|l| l.contains("tests"))
++                       .unwrap_or(false);
++
++    println!("Shutting down simulator");
++    Command::new("xcrun")
++        .arg("simctl")
++        .arg("shutdown")
++        .arg("rust_ios")
++        .check_status();
++    if !passed {
++        panic!("tests didn't pass");
++    }
++}
++
++trait CheckStatus {
++    fn check_status(&mut self);
++}
++
++impl CheckStatus for Command {
++    fn check_status(&mut self) {
++        println!("\trunning: {:?}", self);
++        assert!(t!(self.status()).success());
++    }
++}
++
++fn main() {
++    let args: Vec<String> = env::args().collect();
++    if args.len() != 2 {
++        println!("Usage: {} <executable>", args[0]);
++        process::exit(-1);
++    }
++
++    let test_binary_path = Path::new(&args[1]);
++    let crate_name = test_binary_path.file_name().unwrap();
++
++    package_as_simulator_app(crate_name.to_str().unwrap(), test_binary_path);
++    start_simulator();
++    install_app_to_simulator();
++    run_app_on_simulator();
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..941cc8d2b40307cc0a5911984505cf6b48cd82aa
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++    </ul>
++  </body>
++</html>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fc69fa88eb5ce6fc8724ac195827278df5cdcdbd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7 @@@
++<!DOCTYPE html>
++<html lang="en">
++  <head>
++    <meta charset="utf-8">
++  </head>
++  <body>
++    <ul>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..deafa99226666792ad27f8b8782e190c8e734774
new file mode 100755 (executable)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,35 @@@
++# Small script to run tests for a target (or all targets) inside all the
++# respective docker images.
++
++set -ex
++
++run() {
++    echo $1
++    # use -f so we can use ci/ as build context
++    docker build -t libc -f ci/docker/$1/Dockerfile ci/
++    mkdir -p target
++    if [ -w /dev/kvm ]; then
++      kvm="--volume /dev/kvm:/dev/kvm"
++    fi
++    docker run \
++      --user `id -u`:`id -g` \
++      --rm \
++      --volume $HOME/.cargo:/cargo \
++      $kvm \
++      --env CARGO_HOME=/cargo \
++      --volume `rustc --print sysroot`:/rust:ro \
++      --volume `pwd`:/checkout:ro \
++      --volume `pwd`/target:/checkout/target \
++      --env CARGO_TARGET_DIR=/checkout/target \
++      --workdir /checkout \
++      libc \
++      ci/run.sh $1
++}
++
++if [ -z "$1" ]; then
++  for d in `ls ci/docker/`; do
++    run $d
++  done
++else
++  run $1
++fi
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b2f457df916f85688dce328af91b06543fad6ff6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,32 @@@
++# Initial script which is run inside of all qemu images. The first argument to
++# this script (as arranged by the qemu image itself) is the path to where the
++# libc crate is mounted.
++#
++# For qemu images we currently need to install Rust manually as this wasn't done
++# by the initial run-travis.sh script
++#
++# FIXME: feels like run-travis.sh should be responsible for downloading the
++#        compiler.
++
++set -ex
++
++ROOT=$1
++cp -r $ROOT/libc /tmp/libc
++cd /tmp/libc
++
++TARGET=$(cat $ROOT/TARGET)
++export CARGO_TARGET_DIR=/tmp
++
++case $TARGET in
++  *-openbsd)
++    pkg_add cargo gcc%4.9 rust
++    export CC=egcc
++    ;;
++
++  *)
++    echo "Unknown target: $TARGET"
++    exit 1
++    ;;
++esac
++
++exec sh ci/run.sh $TARGET
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..54e2129f8ddcc2cbe5bc5a9b931640b8a70f3a28
new file mode 100755 (executable)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,187 @@@
++#!/bin/sh
++
++# Builds and runs tests for a particular target passed as an argument to this
++# script.
++
++set -ex
++
++TARGET=$1
++
++# If we're going to run tests inside of a qemu image, then we don't need any of
++# the scripts below. Instead, download the image, prepare a filesystem which has
++# the current state of this repository, and then run the image.
++#
++# It's assume that all images, when run with two disks, will run the `run.sh`
++# script from the second which we place inside.
++if [ "$QEMU" != "" ]; then
++  tmpdir=/tmp/qemu-img-creation
++  mkdir -p $tmpdir
++
++  if [ -z "${QEMU#*.gz}" ]; then
++    # image is .gz : download and uncompress it
++    qemufile=$(echo ${QEMU%.gz} | sed 's/\//__/g')
++    if [ ! -f $tmpdir/$qemufile ]; then
++      curl https://s3.amazonaws.com/rust-lang-ci/libc/$QEMU | \
++        gunzip -d > $tmpdir/$qemufile
++    fi
++  else
++    # plain qcow2 image: just download it
++    qemufile=$(echo ${QEMU} | sed 's/\//__/g')
++    if [ ! -f $tmpdir/$qemufile ]; then
++      curl https://s3.amazonaws.com/rust-lang-ci/libc/$QEMU \
++        > $tmpdir/$qemufile
++    fi
++  fi
++
++  # Create a mount a fresh new filesystem image that we'll later pass to QEMU.
++  # This will have a `run.sh` script will which use the artifacts inside to run
++  # on the host.
++  rm -f $tmpdir/libc-test.img
++  mkdir $tmpdir/mount
++
++  # If we have a cross compiler, then we just do the standard rigamarole of
++  # cross-compiling an executable and then the script to run just executes the
++  # binary.
++  #
++  # If we don't have a cross-compiler, however, then we need to do some crazy
++  # acrobatics to get this to work.  Generate all.{c,rs} on the host which will
++  # be compiled inside QEMU. Do this here because compiling syntex_syntax in
++  # QEMU would time out basically everywhere.
++  if [ "$CAN_CROSS" = "1" ]; then
++    cargo build --manifest-path libc-test/Cargo.toml --target $TARGET
++    cp $CARGO_TARGET_DIR/$TARGET/debug/libc-test $tmpdir/mount/
++    echo 'exec $1/libc-test' > $tmpdir/mount/run.sh
++  else
++    rm -rf $tmpdir/generated
++    mkdir -p $tmpdir/generated
++    cargo build --manifest-path libc-test/generate-files/Cargo.toml
++    (cd libc-test && TARGET=$TARGET OUT_DIR=$tmpdir/generated SKIP_COMPILE=1 \
++      $CARGO_TARGET_DIR/debug/generate-files)
++
++    # Copy this folder into the mounted image, the `run.sh` entry point, and
++    # overwrite the standard libc-test Cargo.toml with the overlay one which will
++    # assume the all.{c,rs} test files have already been generated
++    mkdir $tmpdir/mount/libc
++    cp -r Cargo.* libc-test src ci $tmpdir/mount/libc/
++    ln -s libc-test/target $tmpdir/mount/libc/target
++    cp ci/run-qemu.sh $tmpdir/mount/run.sh
++    echo $TARGET | tee -a $tmpdir/mount/TARGET
++    cp $tmpdir/generated/* $tmpdir/mount/libc/libc-test
++    cp libc-test/run-generated-Cargo.toml $tmpdir/mount/libc/libc-test/Cargo.toml
++  fi
++
++  du -sh $tmpdir/mount
++  genext2fs \
++      --root $tmpdir/mount \
++      --size-in-blocks 100000 \
++      $tmpdir/libc-test.img
++
++  # Pass -snapshot to prevent tampering with the disk images, this helps when
++  # running this script in development. The two drives are then passed next,
++  # first is the OS and second is the one we just made. Next the network is
++  # configured to work (I'm not entirely sure how), and then finally we turn off
++  # graphics and redirect the serial console output to out.log.
++  qemu-system-x86_64 \
++    -m 1024 \
++    -snapshot \
++    -drive if=virtio,file=$tmpdir/$qemufile \
++    -drive if=virtio,file=$tmpdir/libc-test.img \
++    -net nic,model=virtio \
++    -net user \
++    -nographic \
++    -vga none 2>&1 | tee $CARGO_TARGET_DIR/out.log
++  exec grep "^PASSED .* tests" $CARGO_TARGET_DIR/out.log
++fi
++
++case "$TARGET" in
++  *-apple-ios)
++    cargo rustc --manifest-path libc-test/Cargo.toml --target $TARGET -- \
++        -C link-args=-mios-simulator-version-min=7.0
++    ;;
++
++  *)
++    cargo build --manifest-path libc-test/Cargo.toml --target $TARGET
++    ;;
++esac
++
++case "$TARGET" in
++  # Android emulator for x86_64 does not work on travis (missing hardware
++  # acceleration). Tests are run on case *). See ci/android-sysimage.sh for
++  # informations about how tests are run.
++  arm-linux-androideabi | aarch64-linux-android | i686-linux-android)
++    # set SHELL so android can detect a 64bits system, see
++    # http://stackoverflow.com/a/41789144
++    # https://issues.jenkins-ci.org/browse/JENKINS-26930?focusedCommentId=230791&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-230791
++    export SHELL=/bin/dash
++    arch=$(echo $TARGET | cut -d- -f1)
++    accel="-no-accel"
++    if emulator -accel-check; then
++      accel=""
++    fi
++    emulator @$arch -no-window $accel &
++    adb wait-for-device
++    adb push $CARGO_TARGET_DIR/$TARGET/debug/libc-test /data/local/tmp/libc-test
++    adb shell /data/local/tmp/libc-test 2>&1 | tee /tmp/out
++    grep "^PASSED .* tests" /tmp/out
++    ;;
++
++  i386-apple-ios)
++    rustc -O ./ci/ios/deploy_and_run_on_ios_simulator.rs
++    ./deploy_and_run_on_ios_simulator $CARGO_TARGET_DIR/$TARGET/debug/libc-test
++    ;;
++
++  x86_64-apple-ios)
++    rustc -O ./ci/ios/deploy_and_run_on_ios_simulator.rs
++    ./deploy_and_run_on_ios_simulator $CARGO_TARGET_DIR/$TARGET/debug/libc-test
++    ;;
++
++  arm-unknown-linux-gnueabihf)
++    qemu-arm -L /usr/arm-linux-gnueabihf $CARGO_TARGET_DIR/$TARGET/debug/libc-test
++    ;;
++
++  mips-unknown-linux-gnu)
++    qemu-mips -L /usr/mips-linux-gnu $CARGO_TARGET_DIR/$TARGET/debug/libc-test
++    ;;
++
++  mips64-unknown-linux-gnuabi64)
++    qemu-mips64 -L /usr/mips64-linux-gnuabi64 $CARGO_TARGET_DIR/$TARGET/debug/libc-test
++    ;;
++
++  mips-unknown-linux-musl)
++    qemu-mips -L /toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15 \
++              $CARGO_TARGET_DIR/$TARGET/debug/libc-test
++    ;;
++
++  mipsel-unknown-linux-musl)
++      qemu-mipsel -L /toolchain $CARGO_TARGET_DIR/$TARGET/debug/libc-test
++      ;;
++
++  powerpc-unknown-linux-gnu)
++    qemu-ppc -L /usr/powerpc-linux-gnu $CARGO_TARGET_DIR/$TARGET/debug/libc-test
++    ;;
++
++  powerpc64-unknown-linux-gnu)
++    qemu-ppc64 -L /usr/powerpc64-linux-gnu $CARGO_TARGET_DIR/$TARGET/debug/libc-test
++    ;;
++
++  aarch64-unknown-linux-gnu)
++    qemu-aarch64 -L /usr/aarch64-linux-gnu/ $CARGO_TARGET_DIR/$TARGET/debug/libc-test
++    ;;
++
++  s390x-unknown-linux-gnu)
++    # TODO: in theory we should execute this, but qemu segfaults immediately :(
++    # qemu-s390x -L /usr/s390x-linux-gnu/ $CARGO_TARGET_DIR/$TARGET/debug/libc-test
++    ;;
++
++  *-rumprun-netbsd)
++    rumprun-bake hw_virtio /tmp/libc-test.img $CARGO_TARGET_DIR/$TARGET/debug/libc-test
++    qemu-system-x86_64 -nographic -vga none -m 64 \
++        -kernel /tmp/libc-test.img 2>&1 | tee /tmp/out &
++    sleep 5
++    grep "^PASSED .* tests" /tmp/out
++    ;;
++
++  *)
++    $CARGO_TARGET_DIR/$TARGET/debug/libc-test
++    ;;
++esac
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..32e4ba772c5b73c293ab4936937176bde0f71d0c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,204 @@@
++//! Simple script to verify the coding style of this library
++//!
++//! ## How to run
++//!
++//! The first argument to this script is the directory to run on, so running
++//! this script should be as simple as:
++//!
++//! ```notrust
++//! rustc ci/style.rs
++//! ./style src
++//! ```
++//!
++//! ## Guidelines
++//!
++//! The current style is:
++//!
++//! * No trailing whitespace
++//! * No tabs
++//! * 80-character lines
++//! * `extern` instead of `extern "C"`
++//! * Specific module layout:
++//!     1. use directives
++//!     2. typedefs
++//!     3. structs
++//!     4. constants
++//!     5. f! { ... } functions
++//!     6. extern functions
++//!     7. modules + pub use
++//!
++//! Things not verified:
++//!
++//! * alignment
++//! * 4-space tabs
++//! * leading colons on paths
++
++use std::env;
++use std::fs;
++use std::io::prelude::*;
++use std::path::Path;
++
++macro_rules! t {
++    ($e:expr) => (match $e {
++        Ok(e) => e,
++        Err(e) => panic!("{} failed with {}", stringify!($e), e),
++    })
++}
++
++fn main() {
++    let arg = env::args().skip(1).next().unwrap_or(".".to_string());
++
++    let mut errors = Errors { errs: false };
++    walk(Path::new(&arg), &mut errors);
++
++    if errors.errs {
++        panic!("found some lint errors");
++    } else {
++        println!("good style!");
++    }
++}
++
++fn walk(path: &Path, err: &mut Errors) {
++    for entry in t!(path.read_dir()).map(|e| t!(e)) {
++        let path = entry.path();
++        if t!(entry.file_type()).is_dir() {
++            walk(&path, err);
++            continue
++        }
++
++        let name = entry.file_name().into_string().unwrap();
++        match &name[..] {
++            n if !n.ends_with(".rs") => continue,
++
++            "dox.rs" |
++            "lib.rs" |
++            "macros.rs" => continue,
++
++            _ => {}
++        }
++
++        let mut contents = String::new();
++        t!(t!(fs::File::open(&path)).read_to_string(&mut contents));
++
++        check_style(&contents, &path, err);
++    }
++}
++
++struct Errors {
++    errs: bool,
++}
++
++#[derive(Clone, Copy, PartialEq)]
++enum State {
++    Start,
++    Imports,
++    Typedefs,
++    Structs,
++    Constants,
++    FunctionDefinitions,
++    Functions,
++    Modules,
++}
++
++fn check_style(file: &str, path: &Path, err: &mut Errors) {
++    let mut state = State::Start;
++    let mut s_macros = 0;
++    let mut f_macros = 0;
++    let mut prev_blank = false;
++
++    for (i, line) in file.lines().enumerate() {
++        if line == "" {
++            if prev_blank {
++                err.error(path, i, "double blank line");
++            }
++            prev_blank = true;
++        } else {
++            prev_blank = false;
++        }
++        if line != line.trim_right() {
++            err.error(path, i, "trailing whitespace");
++        }
++        if line.contains("\t") {
++            err.error(path, i, "tab character");
++        }
++        if line.len() > 80 {
++            err.error(path, i, "line longer than 80 chars");
++        }
++        if line.contains("extern \"C\"") {
++            err.error(path, i, "use `extern` instead of `extern \"C\"");
++        }
++        if line.contains("#[cfg(") && !line.contains(" if ") {
++            if state != State::Structs {
++                err.error(path, i, "use cfg_if! and submodules \
++                                    instead of #[cfg]");
++            }
++        }
++
++        let line = line.trim_left();
++        let is_pub = line.starts_with("pub ");
++        let line = if is_pub {&line[4..]} else {line};
++
++        let line_state = if line.starts_with("use ") {
++            if is_pub {
++                State::Modules
++            } else {
++                State::Imports
++            }
++        } else if line.starts_with("const ") {
++            State::Constants
++        } else if line.starts_with("type ") {
++            State::Typedefs
++        } else if line.starts_with("s! {") {
++            s_macros += 1;
++            State::Structs
++        } else if line.starts_with("f! {") {
++            f_macros += 1;
++            State::FunctionDefinitions
++        } else if line.starts_with("extern ") {
++            State::Functions
++        } else if line.starts_with("mod ") {
++            State::Modules
++        } else {
++            continue
++        };
++
++        if state as usize > line_state as usize {
++            err.error(path, i, &format!("{} found after {} when \
++                                         it belongs before",
++                                        line_state.desc(), state.desc()));
++        }
++
++        if f_macros == 2 {
++            f_macros += 1;
++            err.error(path, i, "multiple f! macros in one module");
++        }
++        if s_macros == 2 {
++            s_macros += 1;
++            err.error(path, i, "multiple s! macros in one module");
++        }
++
++        state = line_state;
++    }
++}
++
++impl State {
++    fn desc(&self) -> &str {
++        match *self {
++            State::Start => "start",
++            State::Imports => "import",
++            State::Typedefs => "typedef",
++            State::Structs => "struct",
++            State::Constants => "constant",
++            State::FunctionDefinitions => "function definition",
++            State::Functions => "extern function",
++            State::Modules => "module",
++        }
++    }
++}
++
++impl Errors {
++    fn error(&mut self, path: &Path, line: usize, msg: &str) {
++        self.errs = true;
++        println!("{}:{} - {}", path.display(), line + 1, msg);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..41aac385f47b85e54f1d8ea38e67f1f152795c23
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,175 @@@
++pub use self::imp::*;
++
++#[cfg(not(dox))]
++mod imp {
++    pub use core::option::Option;
++    pub use core::clone::Clone;
++    pub use core::marker::Copy;
++    pub use core::mem;
++}
++
++#[cfg(dox)]
++mod imp {
++    pub enum Option<T> {
++        Some(T),
++        None,
++    }
++    impl<T: Copy> Copy for Option<T> {}
++    impl<T: Clone> Clone for Option<T> {
++        fn clone(&self) -> Option<T> { loop {} }
++    }
++
++    pub trait Clone {
++        fn clone(&self) -> Self;
++    }
++
++    #[lang = "copy"]
++    pub trait Copy {}
++
++    #[lang = "freeze"]
++    pub trait Freeze {}
++
++    #[lang = "sync"]
++    pub trait Sync {}
++    impl<T> Sync for T {}
++
++    #[lang = "sized"]
++    pub trait Sized {}
++
++    macro_rules! each_int {
++        ($mac:ident) => (
++            $mac!(u8);
++            $mac!(u16);
++            $mac!(u32);
++            $mac!(u64);
++            $mac!(usize);
++            each_signed_int!($mac);
++        )
++    }
++
++    macro_rules! each_signed_int {
++        ($mac:ident) => (
++            $mac!(i8);
++            $mac!(i16);
++            $mac!(i32);
++            $mac!(i64);
++            $mac!(isize);
++        )
++    }
++
++    #[lang = "div"]
++    pub trait Div<RHS> {
++        type Output;
++        fn div(self, rhs: RHS) -> Self::Output;
++    }
++
++    macro_rules! impl_div {
++        ($($i:ident)*) => ($(
++            impl Div<$i> for $i {
++                type Output = $i;
++                fn div(self, rhs: $i) -> $i { self / rhs }
++            }
++        )*)
++    }
++    each_int!(impl_div);
++
++    #[lang = "shl"]
++    pub trait Shl<RHS> {
++        type Output;
++        fn shl(self, rhs: RHS) -> Self::Output;
++    }
++
++    macro_rules! impl_shl {
++        ($($i:ident)*) => ($(
++            impl Shl<$i> for $i {
++                type Output = $i;
++                fn shl(self, rhs: $i) -> $i { self << rhs }
++            }
++        )*)
++    }
++    each_int!(impl_shl);
++
++    #[lang = "mul"]
++    pub trait Mul<RHS=Self> {
++        type Output;
++        fn mul(self, rhs: RHS) -> Self::Output;
++    }
++
++    macro_rules! impl_mul {
++        ($($i:ident)*) => ($(
++            impl Mul for $i {
++                type Output = $i;
++                fn mul(self, rhs: $i) -> $i { self * rhs }
++            }
++        )*)
++    }
++    each_int!(impl_mul);
++
++    #[lang = "sub"]
++    pub trait Sub<RHS=Self> {
++        type Output;
++        fn sub(self, rhs: RHS) -> Self::Output;
++    }
++
++    macro_rules! impl_sub {
++        ($($i:ident)*) => ($(
++            impl Sub for $i {
++                type Output = $i;
++                fn sub(self, rhs: $i) -> $i { self - rhs }
++            }
++        )*)
++    }
++    each_int!(impl_sub);
++
++    #[lang = "bitor"]
++    pub trait Bitor<RHS=Self> {
++        type Output;
++        fn bitor(self, rhs: RHS) -> Self::Output;
++    }
++
++    macro_rules! impl_bitor {
++        ($($i:ident)*) => ($(
++            impl Bitor for $i {
++                type Output = $i;
++                fn bitor(self, rhs: $i) -> $i { self | rhs }
++            }
++        )*)
++    }
++    each_int!(impl_bitor);
++
++    #[lang = "neg"]
++    pub trait Neg {
++        type Output;
++        fn neg(self) -> Self::Output;
++    }
++
++    macro_rules! impl_neg {
++        ($($i:ident)*) => ($(
++            impl Neg for $i {
++                type Output = $i;
++                fn neg(self) -> $i { -self }
++            }
++        )*)
++    }
++    each_signed_int!(impl_neg);
++
++    #[lang = "not"]
++    pub trait Not {
++        type Output;
++        fn not(self) -> Self::Output;
++    }
++
++    macro_rules! impl_not {
++        ($($i:ident)*) => ($(
++            impl Not for $i {
++                type Output = $i;
++                fn not(self) -> $i { !self }
++            }
++        )*)
++    }
++    each_int!(impl_not);
++
++    pub mod mem {
++        pub fn size_of_val<T>(_: &T) -> usize { 4 }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c17a504787db6a6a3f3921d53de0bd17ee6961ab
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,279 @@@
++// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Crate docs
++
++#![allow(bad_style, overflowing_literals, improper_ctypes)]
++#![crate_type = "rlib"]
++#![crate_name = "libc"]
++#![cfg_attr(dox, feature(no_core, lang_items))]
++#![cfg_attr(dox, no_core)]
++#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
++       html_favicon_url = "https://doc.rust-lang.org/favicon.ico")]
++
++#![cfg_attr(all(target_os = "linux", target_arch = "x86_64"), doc(
++    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-linux-gnu"
++))]
++#![cfg_attr(all(target_os = "linux", target_arch = "x86"), doc(
++    html_root_url = "https://doc.rust-lang.org/libc/i686-unknown-linux-gnu"
++))]
++#![cfg_attr(all(target_os = "linux", target_arch = "arm"), doc(
++    html_root_url = "https://doc.rust-lang.org/libc/arm-unknown-linux-gnueabihf"
++))]
++#![cfg_attr(all(target_os = "linux", target_arch = "mips"), doc(
++    html_root_url = "https://doc.rust-lang.org/libc/mips-unknown-linux-gnu"
++))]
++#![cfg_attr(all(target_os = "linux", target_arch = "aarch64"), doc(
++    html_root_url = "https://doc.rust-lang.org/libc/aarch64-unknown-linux-gnu"
++))]
++#![cfg_attr(all(target_os = "linux", target_env = "musl"), doc(
++    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-linux-musl"
++))]
++#![cfg_attr(all(target_os = "macos", target_arch = "x86_64"), doc(
++    html_root_url = "https://doc.rust-lang.org/libc/x86_64-apple-darwin"
++))]
++#![cfg_attr(all(target_os = "macos", target_arch = "x86"), doc(
++    html_root_url = "https://doc.rust-lang.org/libc/i686-apple-darwin"
++))]
++#![cfg_attr(all(windows, target_arch = "x86_64", target_env = "gnu"), doc(
++    html_root_url = "https://doc.rust-lang.org/libc/x86_64-pc-windows-gnu"
++))]
++#![cfg_attr(all(windows, target_arch = "x86", target_env = "gnu"), doc(
++    html_root_url = "https://doc.rust-lang.org/libc/i686-pc-windows-gnu"
++))]
++#![cfg_attr(all(windows, target_arch = "x86_64", target_env = "msvc"), doc(
++    html_root_url = "https://doc.rust-lang.org/libc/x86_64-pc-windows-msvc"
++))]
++#![cfg_attr(all(windows, target_arch = "x86", target_env = "msvc"), doc(
++    html_root_url = "https://doc.rust-lang.org/libc/i686-pc-windows-msvc"
++))]
++#![cfg_attr(target_os = "android", doc(
++    html_root_url = "https://doc.rust-lang.org/libc/arm-linux-androideabi"
++))]
++#![cfg_attr(target_os = "freebsd", doc(
++    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-freebsd"
++))]
++#![cfg_attr(target_os = "openbsd", doc(
++    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-openbsd"
++))]
++#![cfg_attr(target_os = "bitrig", doc(
++    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-bitrig"
++))]
++#![cfg_attr(target_os = "netbsd", doc(
++    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-netbsd"
++))]
++#![cfg_attr(target_os = "dragonfly", doc(
++    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-dragonfly"
++))]
++
++// Attributes needed when building as part of the standard library
++#![cfg_attr(stdbuild, feature(no_std, core, core_slice_ext, staged_api, custom_attribute, cfg_target_vendor))]
++#![cfg_attr(stdbuild, feature(link_cfg))]
++#![cfg_attr(stdbuild, no_std)]
++#![cfg_attr(stdbuild, staged_api)]
++#![cfg_attr(stdbuild, allow(warnings))]
++#![cfg_attr(stdbuild, unstable(feature = "libc",
++                               reason = "use `libc` from crates.io",
++                               issue = "27783"))]
++
++#![cfg_attr(not(feature = "use_std"), no_std)]
++
++#[cfg(all(not(stdbuild), not(dox), feature = "use_std"))]
++extern crate std as core;
++
++#[macro_use] mod macros;
++mod dox;
++
++// Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help enable
++// more optimization opportunities around it recognizing things like
++// malloc/free.
++#[repr(u8)]
++pub enum c_void {
++    // Two dummy variants so the #[repr] attribute can be used.
++    #[doc(hidden)]
++    __variant1,
++    #[doc(hidden)]
++    __variant2,
++}
++
++pub type int8_t = i8;
++pub type int16_t = i16;
++pub type int32_t = i32;
++pub type int64_t = i64;
++pub type uint8_t = u8;
++pub type uint16_t = u16;
++pub type uint32_t = u32;
++pub type uint64_t = u64;
++
++pub type c_schar = i8;
++pub type c_uchar = u8;
++pub type c_short = i16;
++pub type c_ushort = u16;
++pub type c_int = i32;
++pub type c_uint = u32;
++pub type c_float = f32;
++pub type c_double = f64;
++pub type c_longlong = i64;
++pub type c_ulonglong = u64;
++pub type intmax_t = i64;
++pub type uintmax_t = u64;
++
++pub type size_t = usize;
++pub type ptrdiff_t = isize;
++pub type intptr_t = isize;
++pub type uintptr_t = usize;
++pub type ssize_t = isize;
++
++pub enum FILE {}
++pub enum fpos_t {} // TODO: fill this out with a struct
++
++extern {
++    pub fn isalnum(c: c_int) -> c_int;
++    pub fn isalpha(c: c_int) -> c_int;
++    pub fn iscntrl(c: c_int) -> c_int;
++    pub fn isdigit(c: c_int) -> c_int;
++    pub fn isgraph(c: c_int) -> c_int;
++    pub fn islower(c: c_int) -> c_int;
++    pub fn isprint(c: c_int) -> c_int;
++    pub fn ispunct(c: c_int) -> c_int;
++    pub fn isspace(c: c_int) -> c_int;
++    pub fn isupper(c: c_int) -> c_int;
++    pub fn isxdigit(c: c_int) -> c_int;
++    pub fn tolower(c: c_int) -> c_int;
++    pub fn toupper(c: c_int) -> c_int;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "fopen$UNIX2003")]
++    pub fn fopen(filename: *const c_char,
++                 mode: *const c_char) -> *mut FILE;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "freopen$UNIX2003")]
++    pub fn freopen(filename: *const c_char, mode: *const c_char,
++                   file: *mut FILE) -> *mut FILE;
++    pub fn fflush(file: *mut FILE) -> c_int;
++    pub fn fclose(file: *mut FILE) -> c_int;
++    pub fn remove(filename: *const c_char) -> c_int;
++    pub fn rename(oldname: *const c_char, newname: *const c_char) -> c_int;
++    pub fn tmpfile() -> *mut FILE;
++    pub fn setvbuf(stream: *mut FILE,
++                   buffer: *mut c_char,
++                   mode: c_int,
++                   size: size_t) -> c_int;
++    pub fn setbuf(stream: *mut FILE, buf: *mut c_char);
++    pub fn getchar() -> c_int;
++    pub fn putchar(c: c_int) -> c_int;
++    pub fn fgetc(stream: *mut FILE) -> c_int;
++    pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE) -> *mut c_char;
++    pub fn fputc(c: c_int, stream: *mut FILE) -> c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "fputs$UNIX2003")]
++    pub fn fputs(s: *const c_char, stream: *mut FILE)-> c_int;
++    pub fn puts(s: *const c_char) -> c_int;
++    pub fn ungetc(c: c_int, stream: *mut FILE) -> c_int;
++    pub fn fread(ptr: *mut c_void,
++                 size: size_t,
++                 nobj: size_t,
++                 stream: *mut FILE)
++                 -> size_t;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "fwrite$UNIX2003")]
++    pub fn fwrite(ptr: *const c_void,
++                  size: size_t,
++                  nobj: size_t,
++                  stream: *mut FILE)
++                  -> size_t;
++    pub fn fseek(stream: *mut FILE, offset: c_long, whence: c_int) -> c_int;
++    pub fn ftell(stream: *mut FILE) -> c_long;
++    pub fn rewind(stream: *mut FILE);
++    #[cfg_attr(target_os = "netbsd", link_name = "__fgetpos50")]
++    pub fn fgetpos(stream: *mut FILE, ptr: *mut fpos_t) -> c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__fsetpos50")]
++    pub fn fsetpos(stream: *mut FILE, ptr: *const fpos_t) -> c_int;
++    pub fn feof(stream: *mut FILE) -> c_int;
++    pub fn ferror(stream: *mut FILE) -> c_int;
++    pub fn perror(s: *const c_char);
++    pub fn atoi(s: *const c_char) -> c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "strtod$UNIX2003")]
++    pub fn strtod(s: *const c_char, endp: *mut *mut c_char) -> c_double;
++    pub fn strtol(s: *const c_char,
++                  endp: *mut *mut c_char, base: c_int) -> c_long;
++    pub fn strtoul(s: *const c_char, endp: *mut *mut c_char,
++                   base: c_int) -> c_ulong;
++    pub fn calloc(nobj: size_t, size: size_t) -> *mut c_void;
++    pub fn malloc(size: size_t) -> *mut c_void;
++    pub fn realloc(p: *mut c_void, size: size_t) -> *mut c_void;
++    pub fn free(p: *mut c_void);
++    pub fn abort() -> !;
++    pub fn exit(status: c_int) -> !;
++    pub fn _exit(status: c_int) -> !;
++    pub fn atexit(cb: extern fn()) -> c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "system$UNIX2003")]
++    pub fn system(s: *const c_char) -> c_int;
++    pub fn getenv(s: *const c_char) -> *mut c_char;
++
++    pub fn strcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char;
++    pub fn strncpy(dst: *mut c_char, src: *const c_char, n: size_t)
++                   -> *mut c_char;
++    pub fn strcat(s: *mut c_char, ct: *const c_char) -> *mut c_char;
++    pub fn strncat(s: *mut c_char, ct: *const c_char, n: size_t) -> *mut c_char;
++    pub fn strcmp(cs: *const c_char, ct: *const c_char) -> c_int;
++    pub fn strncmp(cs: *const c_char, ct: *const c_char, n: size_t) -> c_int;
++    pub fn strcoll(cs: *const c_char, ct: *const c_char) -> c_int;
++    pub fn strchr(cs: *const c_char, c: c_int) -> *mut c_char;
++    pub fn strrchr(cs: *const c_char, c: c_int) -> *mut c_char;
++    pub fn strspn(cs: *const c_char, ct: *const c_char) -> size_t;
++    pub fn strcspn(cs: *const c_char, ct: *const c_char) -> size_t;
++    pub fn strdup(cs: *const c_char) -> *mut c_char;
++    pub fn strpbrk(cs: *const c_char, ct: *const c_char) -> *mut c_char;
++    pub fn strstr(cs: *const c_char, ct: *const c_char) -> *mut c_char;
++    pub fn strlen(cs: *const c_char) -> size_t;
++    pub fn strnlen(cs: *const c_char, maxlen: size_t) -> size_t;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "strerror$UNIX2003")]
++    pub fn strerror(n: c_int) -> *mut c_char;
++    pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char;
++    pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t;
++    pub fn wcslen(buf: *const wchar_t) -> size_t;
++    pub fn wcstombs(dest: *mut c_char, src: *const wchar_t, n: size_t) -> ::size_t;
++
++    pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void;
++    pub fn memcmp(cx: *const c_void, ct: *const c_void, n: size_t) -> c_int;
++    pub fn memcpy(dest: *mut c_void, src: *const c_void, n: size_t) -> *mut c_void;
++    pub fn memmove(dest: *mut c_void, src: *const c_void, n: size_t) -> *mut c_void;
++    pub fn memset(dest: *mut c_void, c: c_int, n: size_t) -> *mut c_void;
++}
++
++// These are all inline functions on android, so they end up just being entirely
++// missing on that platform.
++#[cfg(not(target_os = "android"))]
++extern {
++    pub fn abs(i: c_int) -> c_int;
++    pub fn atof(s: *const c_char) -> c_double;
++    pub fn labs(i: c_long) -> c_long;
++    pub fn rand() -> c_int;
++    pub fn srand(seed: c_uint);
++}
++
++cfg_if! {
++    if #[cfg(windows)] {
++        mod windows;
++        pub use windows::*;
++    } else if #[cfg(target_os = "redox")] {
++        mod redox;
++        pub use redox::*;
++    } else if #[cfg(unix)] {
++        mod unix;
++        pub use unix::*;
++    } else {
++        // Unknown target_family
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5811c84c3aaa541010b7e363b52ffb311d1cd5f2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,108 @@@
++/// A macro for defining #[cfg] if-else statements.
++///
++/// This is similar to the `if/elif` C preprocessor macro by allowing definition
++/// of a cascade of `#[cfg]` cases, emitting the implementation which matches
++/// first.
++///
++/// This allows you to conveniently provide a long list #[cfg]'d blocks of code
++/// without having to rewrite each clause multiple times.
++macro_rules! cfg_if {
++    ($(
++        if #[cfg($($meta:meta),*)] { $($it:item)* }
++    ) else * else {
++        $($it2:item)*
++    }) => {
++        __cfg_if_items! {
++            () ;
++            $( ( ($($meta),*) ($($it)*) ), )*
++            ( () ($($it2)*) ),
++        }
++    }
++}
++
++macro_rules! __cfg_if_items {
++    (($($not:meta,)*) ; ) => {};
++    (($($not:meta,)*) ; ( ($($m:meta),*) ($($it:item)*) ), $($rest:tt)*) => {
++        __cfg_if_apply! { cfg(all(not(any($($not),*)), $($m,)*)), $($it)* }
++        __cfg_if_items! { ($($not,)* $($m,)*) ; $($rest)* }
++    }
++}
++
++macro_rules! __cfg_if_apply {
++    ($m:meta, $($it:item)*) => {
++        $(#[$m] $it)*
++    }
++}
++
++macro_rules! s {
++    ($($(#[$attr:meta])* pub struct $i:ident { $($field:tt)* })*) => ($(
++        __item! {
++            #[repr(C)]
++            $(#[$attr])*
++            pub struct $i { $($field)* }
++        }
++        impl ::dox::Copy for $i {}
++        impl ::dox::Clone for $i {
++            fn clone(&self) -> $i { *self }
++        }
++    )*)
++}
++
++macro_rules! f {
++    ($(pub fn $i:ident($($arg:ident: $argty:ty),*) -> $ret:ty {
++        $($body:stmt);*
++    })*) => ($(
++        #[inline]
++        #[cfg(not(dox))]
++        pub unsafe extern fn $i($($arg: $argty),*) -> $ret {
++            $($body);*
++        }
++
++        #[cfg(dox)]
++        #[allow(dead_code)]
++        pub unsafe extern fn $i($($arg: $argty),*) -> $ret {
++            loop {}
++        }
++    )*)
++}
++
++macro_rules! __item {
++    ($i:item) => ($i)
++}
++
++#[cfg(test)]
++mod tests {
++    cfg_if! {
++        if #[cfg(test)] {
++            use std::option::Option as Option2;
++            fn works1() -> Option2<u32> { Some(1) }
++        } else {
++            fn works1() -> Option<u32> { None }
++        }
++    }
++
++    cfg_if! {
++        if #[cfg(foo)] {
++            fn works2() -> bool { false }
++        } else if #[cfg(test)] {
++            fn works2() -> bool { true }
++        } else {
++            fn works2() -> bool { false }
++        }
++    }
++
++    cfg_if! {
++        if #[cfg(foo)] {
++            fn works3() -> bool { false }
++        } else {
++            fn works3() -> bool { true }
++        }
++    }
++
++    #[test]
++    fn it_works() {
++        assert!(works1().is_some());
++        assert!(works2());
++        assert!(works3());
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f4f6178cfc31ed0a3e62b8320e5f566542da2fe3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,65 @@@
++pub type c_char = i8;
++pub type c_long = i64;
++pub type c_ulong = u64;
++
++pub type wchar_t = i16;
++
++pub type off_t = c_long;
++pub type mode_t = u16;
++pub type time_t = i64;
++pub type pid_t = usize;
++pub type gid_t = usize;
++pub type uid_t = usize;
++
++pub type in_addr_t = u32;
++pub type in_port_t = u16;
++
++pub type socklen_t = u32;
++pub type sa_family_t = u16;
++
++s! {
++    pub struct in_addr {
++        pub s_addr: in_addr_t,
++    }
++
++    pub struct in6_addr {
++        pub s6_addr: [u8; 16],
++        __align: [u32; 0],
++    }
++
++    pub struct sockaddr {
++        pub sa_family: sa_family_t,
++        pub sa_data: [::c_char; 14],
++    }
++
++    pub struct sockaddr_in {
++        pub sin_family: sa_family_t,
++        pub sin_port: ::in_port_t,
++        pub sin_addr: ::in_addr,
++        pub sin_zero: [u8; 8],
++    }
++
++    pub struct sockaddr_in6 {
++        pub sin6_family: sa_family_t,
++        pub sin6_port: in_port_t,
++        pub sin6_flowinfo: u32,
++        pub sin6_addr: ::in6_addr,
++        pub sin6_scope_id: u32,
++    }
++}
++
++pub const STDIN_FILENO: ::c_int = 0;
++pub const STDOUT_FILENO: ::c_int = 1;
++pub const STDERR_FILENO: ::c_int = 2;
++
++extern {
++    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
++    pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t)
++                -> ::ssize_t;
++    pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t)
++                 -> ::ssize_t;
++}
++
++#[link(name = "c")]
++#[link(name = "m")]
++extern {}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..53fc0ae19df15a992344d9b28550793cf74d386d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,53 @@@
++//! 32-bit specific Apple (ios/darwin) definitions
++
++pub type c_long = i32;
++pub type c_ulong = u32;
++pub type boolean_t = ::c_int;
++
++s! {
++    pub struct pthread_attr_t {
++        __sig: c_long,
++        __opaque: [::c_char; 36]
++    }
++
++    pub struct if_data {
++        pub ifi_type: ::c_uchar,
++        pub ifi_typelen: ::c_uchar,
++        pub ifi_physical: ::c_uchar,
++        pub ifi_addrlen: ::c_uchar,
++        pub ifi_hdrlen: ::c_uchar,
++        pub ifi_recvquota: ::c_uchar,
++        pub ifi_xmitquota: ::c_uchar,
++        pub ifi_unused1: ::c_uchar,
++        pub ifi_mtu: u32,
++        pub ifi_metric: u32,
++        pub ifi_baudrate: u32,
++        pub ifi_ipackets: u32,
++        pub ifi_ierrors: u32,
++        pub ifi_opackets: u32,
++        pub ifi_oerrors: u32,
++        pub ifi_collisions: u32,
++        pub ifi_ibytes: u32,
++        pub ifi_obytes: u32,
++        pub ifi_imcasts: u32,
++        pub ifi_omcasts: u32,
++        pub ifi_iqdrops: u32,
++        pub ifi_noproto: u32,
++        pub ifi_recvtiming: u32,
++        pub ifi_xmittiming: u32,
++        pub ifi_lastchange: ::timeval,
++        pub ifi_unused2: u32,
++        pub ifi_hwassist: u32,
++        pub ifi_reserved1: u32,
++        pub ifi_reserved2: u32,
++    }
++}
++
++pub const __PTHREAD_MUTEX_SIZE__: usize = 40;
++pub const __PTHREAD_COND_SIZE__: usize = 24;
++pub const __PTHREAD_CONDATTR_SIZE__: usize = 4;
++pub const __PTHREAD_RWLOCK_SIZE__: usize = 124;
++pub const __PTHREAD_RWLOCKATTR_SIZE__: usize = 12;
++
++pub const TIOCTIMESTAMP: ::c_ulong = 0x40087459;
++pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40087458;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e4a39819412853eea6cbdf2738b3dc138cc48af9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,60 @@@
++//! 64-bit specific Apple (ios/darwin) definitions
++
++pub type c_long = i64;
++pub type c_ulong = u64;
++pub type boolean_t = ::c_uint;
++
++s! {
++    pub struct pthread_attr_t {
++        __sig: c_long,
++        __opaque: [::c_char; 56]
++    }
++
++    pub struct timeval32 {
++        pub tv_sec: i32,
++        pub tv_usec: i32,
++    }
++
++    pub struct if_data {
++        pub ifi_type: ::c_uchar,
++        pub ifi_typelen: ::c_uchar,
++        pub ifi_physical: ::c_uchar,
++        pub ifi_addrlen: ::c_uchar,
++        pub ifi_hdrlen: ::c_uchar,
++        pub ifi_recvquota: ::c_uchar,
++        pub ifi_xmitquota: ::c_uchar,
++        pub ifi_unused1: ::c_uchar,
++        pub ifi_mtu: u32,
++        pub ifi_metric: u32,
++        pub ifi_baudrate: u32,
++        pub ifi_ipackets: u32,
++        pub ifi_ierrors: u32,
++        pub ifi_opackets: u32,
++        pub ifi_oerrors: u32,
++        pub ifi_collisions: u32,
++        pub ifi_ibytes: u32,
++        pub ifi_obytes: u32,
++        pub ifi_imcasts: u32,
++        pub ifi_omcasts: u32,
++        pub ifi_iqdrops: u32,
++        pub ifi_noproto: u32,
++        pub ifi_recvtiming: u32,
++        pub ifi_xmittiming: u32,
++        pub ifi_lastchange: timeval32,
++        pub ifi_unused2: u32,
++        pub ifi_hwassist: u32,
++        pub ifi_reserved1: u32,
++        pub ifi_reserved2: u32,
++    }
++}
++
++pub const __PTHREAD_MUTEX_SIZE__: usize = 56;
++pub const __PTHREAD_COND_SIZE__: usize = 40;
++pub const __PTHREAD_CONDATTR_SIZE__: usize = 8;
++pub const __PTHREAD_RWLOCK_SIZE__: usize = 192;
++pub const __PTHREAD_RWLOCKATTR_SIZE__: usize = 16;
++
++pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459;
++pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40107458;
++
++pub const FIONREAD: ::c_ulong = 0x4004667f;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9b36e78133d11547abfccd74b3b5de2472e427f2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1822 @@@
++//! Apple (ios/darwin)-specific definitions
++//!
++//! This covers *-apple-* triples currently
++
++pub type clock_t = c_ulong;
++pub type time_t = c_long;
++pub type suseconds_t = i32;
++pub type dev_t = i32;
++pub type ino_t = u64;
++pub type mode_t = u16;
++pub type nlink_t = u16;
++pub type blksize_t = i32;
++pub type rlim_t = u64;
++pub type mach_timebase_info_data_t = mach_timebase_info;
++pub type pthread_key_t = c_ulong;
++pub type sigset_t = u32;
++pub type fsblkcnt_t = ::c_uint;
++pub type fsfilcnt_t = ::c_uint;
++pub type speed_t = ::c_ulong;
++pub type tcflag_t = ::c_ulong;
++pub type nl_item = ::c_int;
++pub type id_t = ::c_uint;
++pub type sem_t = ::c_int;
++pub type idtype_t = ::c_uint;
++
++pub enum timezone {}
++
++s! {
++    pub struct aiocb {
++        pub aio_fildes: ::c_int,
++        pub aio_offset: ::off_t,
++        pub aio_buf: *mut ::c_void,
++        pub aio_nbytes: ::size_t,
++        pub aio_reqprio: ::c_int,
++        pub aio_sigevent: sigevent,
++        pub aio_lio_opcode: ::c_int
++    }
++
++    pub struct utmpx {
++        pub ut_user: [::c_char; _UTX_USERSIZE],
++        pub ut_id: [::c_char; _UTX_IDSIZE],
++        pub ut_line: [::c_char; _UTX_LINESIZE],
++        pub ut_pid: ::pid_t,
++        pub ut_type: ::c_short,
++        pub ut_tv: ::timeval,
++        pub ut_host: [::c_char; _UTX_HOSTSIZE],
++        ut_pad: [::uint32_t; 16],
++    }
++
++    pub struct glob_t {
++        pub gl_pathc:  ::size_t,
++        __unused1: ::c_int,
++        pub gl_offs:   ::size_t,
++        __unused2: ::c_int,
++        pub gl_pathv:  *mut *mut ::c_char,
++
++        __unused3: *mut ::c_void,
++
++        __unused4: *mut ::c_void,
++        __unused5: *mut ::c_void,
++        __unused6: *mut ::c_void,
++        __unused7: *mut ::c_void,
++        __unused8: *mut ::c_void,
++    }
++
++    pub struct sockaddr_storage {
++        pub ss_len: u8,
++        pub ss_family: ::sa_family_t,
++        __ss_pad1: [u8; 6],
++        __ss_align: i64,
++        __ss_pad2: [u8; 112],
++    }
++
++    pub struct addrinfo {
++        pub ai_flags: ::c_int,
++        pub ai_family: ::c_int,
++        pub ai_socktype: ::c_int,
++        pub ai_protocol: ::c_int,
++        pub ai_addrlen: ::socklen_t,
++        pub ai_canonname: *mut ::c_char,
++        pub ai_addr: *mut ::sockaddr,
++        pub ai_next: *mut addrinfo,
++    }
++
++    pub struct mach_timebase_info {
++        pub numer: u32,
++        pub denom: u32,
++    }
++
++    pub struct stat {
++        pub st_dev: dev_t,
++        pub st_mode: mode_t,
++        pub st_nlink: nlink_t,
++        pub st_ino: ino_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: dev_t,
++        pub st_atime: time_t,
++        pub st_atime_nsec: c_long,
++        pub st_mtime: time_t,
++        pub st_mtime_nsec: c_long,
++        pub st_ctime: time_t,
++        pub st_ctime_nsec: c_long,
++        pub st_birthtime: time_t,
++        pub st_birthtime_nsec: c_long,
++        pub st_size: ::off_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_blksize: blksize_t,
++        pub st_flags: ::uint32_t,
++        pub st_gen: ::uint32_t,
++        pub st_lspare: ::int32_t,
++        pub st_qspare: [::int64_t; 2],
++    }
++
++    pub struct dirent {
++        pub d_ino: u64,
++        pub d_seekoff: u64,
++        pub d_reclen: u16,
++        pub d_namlen: u16,
++        pub d_type: u8,
++        pub d_name: [::c_char; 1024],
++    }
++
++    pub struct pthread_mutex_t {
++        __sig: ::c_long,
++        __opaque: [u8; __PTHREAD_MUTEX_SIZE__],
++    }
++
++    pub struct pthread_mutexattr_t {
++        __sig: ::c_long,
++        __opaque: [u8; 8],
++    }
++
++    pub struct pthread_cond_t {
++        __sig: ::c_long,
++        __opaque: [u8; __PTHREAD_COND_SIZE__],
++    }
++
++    pub struct pthread_condattr_t {
++        __sig: ::c_long,
++        __opaque: [u8; __PTHREAD_CONDATTR_SIZE__],
++    }
++
++    pub struct pthread_rwlock_t {
++        __sig: ::c_long,
++        __opaque: [u8; __PTHREAD_RWLOCK_SIZE__],
++    }
++
++    pub struct pthread_rwlockattr_t {
++        __sig: ::c_long,
++        __opaque: [u8; __PTHREAD_RWLOCKATTR_SIZE__],
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_errno: ::c_int,
++        pub si_code: ::c_int,
++        pub si_pid: ::pid_t,
++        pub si_uid: ::uid_t,
++        pub si_status: ::c_int,
++        pub si_addr: *mut ::c_void,
++        _pad: [usize; 9],
++    }
++
++    pub struct sigaction {
++        pub sa_sigaction: ::sighandler_t,
++        pub sa_mask: sigset_t,
++        pub sa_flags: ::c_int,
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_size: ::size_t,
++        pub ss_flags: ::c_int,
++    }
++
++    pub struct fstore_t {
++        pub fst_flags: ::c_uint,
++        pub fst_posmode: ::c_int,
++        pub fst_offset: ::off_t,
++        pub fst_length: ::off_t,
++        pub fst_bytesalloc: ::off_t,
++    }
++
++    pub struct radvisory {
++        pub ra_offset: ::off_t,
++        pub ra_count: ::c_int,
++    }
++
++    pub struct statvfs {
++        pub f_bsize: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_favail: ::fsfilcnt_t,
++        pub f_fsid: ::c_ulong,
++        pub f_flag: ::c_ulong,
++        pub f_namemax: ::c_ulong,
++    }
++
++    pub struct Dl_info {
++        pub dli_fname: *const ::c_char,
++        pub dli_fbase: *mut ::c_void,
++        pub dli_sname: *const ::c_char,
++        pub dli_saddr: *mut ::c_void,
++    }
++
++    pub struct sockaddr_in {
++        pub sin_len: u8,
++        pub sin_family: ::sa_family_t,
++        pub sin_port: ::in_port_t,
++        pub sin_addr: ::in_addr,
++        pub sin_zero: [::c_char; 8],
++    }
++
++    pub struct statfs {
++        pub f_bsize: ::uint32_t,
++        pub f_iosize: ::int32_t,
++        pub f_blocks: ::uint64_t,
++        pub f_bfree: ::uint64_t,
++        pub f_bavail: ::uint64_t,
++        pub f_files: ::uint64_t,
++        pub f_ffree: ::uint64_t,
++        pub f_fsid: ::fsid_t,
++        pub f_owner: ::uid_t,
++        pub f_type: ::uint32_t,
++        pub f_flags: ::uint32_t,
++        pub f_fssubtype: ::uint32_t,
++        pub f_fstypename: [::c_char; 16],
++        pub f_mntonname: [::c_char; 1024],
++        pub f_mntfromname: [::c_char; 1024],
++        pub f_reserved: [::uint32_t; 8],
++    }
++
++    // FIXME: this should have align 4 but it's got align 8 on 64-bit
++    pub struct kevent {
++        pub ident: ::uintptr_t,
++        pub filter: ::int16_t,
++        pub flags: ::uint16_t,
++        pub fflags: ::uint32_t,
++        pub data: ::intptr_t,
++        pub udata: *mut ::c_void,
++    }
++
++    pub struct kevent64_s {
++        pub ident: ::uint64_t,
++        pub filter: ::int16_t,
++        pub flags: ::uint16_t,
++        pub fflags: ::uint32_t,
++        pub data: ::int64_t,
++        pub udata: ::uint64_t,
++        pub ext: [::uint64_t; 2],
++    }
++
++    pub struct dqblk {
++        pub dqb_bhardlimit: ::uint64_t,
++        pub dqb_bsoftlimit: ::uint64_t,
++        pub dqb_curbytes: ::uint64_t,
++        pub dqb_ihardlimit: ::uint32_t,
++        pub dqb_isoftlimit: ::uint32_t,
++        pub dqb_curinodes: ::uint32_t,
++        pub dqb_btime: ::uint32_t,
++        pub dqb_itime: ::uint32_t,
++        pub dqb_id: ::uint32_t,
++        pub dqb_spare: [::uint32_t; 4],
++    }
++
++    pub struct if_msghdr {
++        pub ifm_msglen: ::c_ushort,
++        pub ifm_version: ::c_uchar,
++        pub ifm_type: ::c_uchar,
++        pub ifm_addrs: ::c_int,
++        pub ifm_flags: ::c_int,
++        pub ifm_index: ::c_ushort,
++        pub ifm_data: if_data,
++    }
++
++    pub struct termios {
++        pub c_iflag: ::tcflag_t,
++        pub c_oflag: ::tcflag_t,
++        pub c_cflag: ::tcflag_t,
++        pub c_lflag: ::tcflag_t,
++        pub c_cc: [::cc_t; ::NCCS],
++        pub c_ispeed: ::speed_t,
++        pub c_ospeed: ::speed_t,
++    }
++
++    pub struct flock {
++        pub l_start: ::off_t,
++        pub l_len: ::off_t,
++        pub l_pid: ::pid_t,
++        pub l_type: ::c_short,
++        pub l_whence: ::c_short,
++    }
++
++    pub struct sf_hdtr {
++        pub headers: *mut ::iovec,
++        pub hdr_cnt: ::c_int,
++        pub trailers: *mut ::iovec,
++        pub trl_cnt: ::c_int,
++    }
++
++    pub struct lconv {
++        pub decimal_point: *mut ::c_char,
++        pub thousands_sep: *mut ::c_char,
++        pub grouping: *mut ::c_char,
++        pub int_curr_symbol: *mut ::c_char,
++        pub currency_symbol: *mut ::c_char,
++        pub mon_decimal_point: *mut ::c_char,
++        pub mon_thousands_sep: *mut ::c_char,
++        pub mon_grouping: *mut ::c_char,
++        pub positive_sign: *mut ::c_char,
++        pub negative_sign: *mut ::c_char,
++        pub int_frac_digits: ::c_char,
++        pub frac_digits: ::c_char,
++        pub p_cs_precedes: ::c_char,
++        pub p_sep_by_space: ::c_char,
++        pub n_cs_precedes: ::c_char,
++        pub n_sep_by_space: ::c_char,
++        pub p_sign_posn: ::c_char,
++        pub n_sign_posn: ::c_char,
++        pub int_p_cs_precedes: ::c_char,
++        pub int_n_cs_precedes: ::c_char,
++        pub int_p_sep_by_space: ::c_char,
++        pub int_n_sep_by_space: ::c_char,
++        pub int_p_sign_posn: ::c_char,
++        pub int_n_sign_posn: ::c_char,
++    }
++
++    pub struct sigevent {
++        pub sigev_notify: ::c_int,
++        pub sigev_signo: ::c_int,
++        pub sigev_value: ::sigval,
++        __unused1: *mut ::c_void,       //actually a function pointer
++        pub sigev_notify_attributes: *mut ::pthread_attr_t
++    }
++
++    pub struct proc_taskinfo {
++        pub pti_virtual_size: u64,
++        pub pti_resident_size: u64,
++        pub pti_total_user: u64,
++        pub pti_total_system: u64,
++        pub pti_threads_user: u64,
++        pub pti_threads_system: u64,
++        pub pti_policy: i32,
++        pub pti_faults: i32,
++        pub pti_pageins: i32,
++        pub pti_cow_faults: i32,
++        pub pti_messages_sent: i32,
++        pub pti_messages_received: i32,
++        pub pti_syscalls_mach: i32,
++        pub pti_syscalls_unix: i32,
++        pub pti_csw: i32,
++        pub pti_threadnum: i32,
++        pub pti_numrunning: i32,
++        pub pti_priority: i32,
++    }
++
++    pub struct proc_bsdinfo {
++        pub pbi_flags: u32,
++        pub pbi_status: u32,
++        pub pbi_xstatus: u32,
++        pub pbi_pid: u32,
++        pub pbi_ppid: u32,
++        pub pbi_uid: ::uid_t,
++        pub pbi_gid: ::gid_t,
++        pub pbi_ruid: ::uid_t,
++        pub pbi_rgid: ::gid_t,
++        pub pbi_svuid: ::uid_t,
++        pub pbi_svgid: ::gid_t,
++        pub rfu_1: u32,
++        pub pbi_comm: [::c_char; MAXCOMLEN],
++        pub pbi_name: [::c_char; 32], // MAXCOMLEN * 2, but macro isn't happy...
++        pub pbi_nfiles: u32,
++        pub pbi_pgid: u32,
++        pub pbi_pjobc: u32,
++        pub e_tdev: u32,
++        pub e_tpgid: u32,
++        pub pbi_nice: i32,
++        pub pbi_start_tvsec: u64,
++        pub pbi_start_tvusec: u64,
++    }
++
++    pub struct proc_taskallinfo {
++        pub pbsd: proc_bsdinfo,
++        pub ptinfo: proc_taskinfo,
++    }
++
++    pub struct proc_threadinfo {
++        pub pth_user_time: u64,
++        pub pth_system_time: u64,
++        pub pth_cpu_usage: i32,
++        pub pth_policy: i32,
++        pub pth_run_state: i32,
++        pub pth_flags: i32,
++        pub pth_sleep_time: i32,
++        pub pth_curpri: i32,
++        pub pth_priority: i32,
++        pub pth_maxpriority: i32,
++        pub pth_name: [::c_char; MAXTHREADNAMESIZE],
++    }
++
++    pub struct xsw_usage {
++        pub xsu_total: u64,
++        pub xsu_avail: u64,
++        pub xsu_used: u64,
++        pub xsu_pagesize: u32,
++        pub xsu_encrypted: ::boolean_t,
++    }
++}
++
++pub const _UTX_USERSIZE: usize = 256;
++pub const _UTX_LINESIZE: usize = 32;
++pub const _UTX_IDSIZE: usize = 4;
++pub const _UTX_HOSTSIZE: usize = 256;
++
++pub const EMPTY: ::c_short = 0;
++pub const RUN_LVL: ::c_short = 1;
++pub const BOOT_TIME: ::c_short = 2;
++pub const OLD_TIME: ::c_short = 3;
++pub const NEW_TIME: ::c_short = 4;
++pub const INIT_PROCESS: ::c_short = 5;
++pub const LOGIN_PROCESS: ::c_short = 6;
++pub const USER_PROCESS: ::c_short = 7;
++pub const DEAD_PROCESS: ::c_short = 8;
++pub const ACCOUNTING: ::c_short = 9;
++pub const SIGNATURE: ::c_short = 10;
++pub const SHUTDOWN_TIME: ::c_short = 11;
++
++pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
++pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
++pub const LC_MESSAGES_MASK: ::c_int = (1 << 2);
++pub const LC_MONETARY_MASK: ::c_int = (1 << 3);
++pub const LC_NUMERIC_MASK: ::c_int = (1 << 4);
++pub const LC_TIME_MASK: ::c_int = (1 << 5);
++pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
++                               | LC_CTYPE_MASK
++                               | LC_MESSAGES_MASK
++                               | LC_MONETARY_MASK
++                               | LC_NUMERIC_MASK
++                               | LC_TIME_MASK;
++
++pub const CODESET: ::nl_item = 0;
++pub const D_T_FMT: ::nl_item = 1;
++pub const D_FMT: ::nl_item = 2;
++pub const T_FMT: ::nl_item = 3;
++pub const T_FMT_AMPM: ::nl_item = 4;
++pub const AM_STR: ::nl_item = 5;
++pub const PM_STR: ::nl_item = 6;
++
++pub const DAY_1: ::nl_item = 7;
++pub const DAY_2: ::nl_item = 8;
++pub const DAY_3: ::nl_item = 9;
++pub const DAY_4: ::nl_item = 10;
++pub const DAY_5: ::nl_item = 11;
++pub const DAY_6: ::nl_item = 12;
++pub const DAY_7: ::nl_item = 13;
++
++pub const ABDAY_1: ::nl_item = 14;
++pub const ABDAY_2: ::nl_item = 15;
++pub const ABDAY_3: ::nl_item = 16;
++pub const ABDAY_4: ::nl_item = 17;
++pub const ABDAY_5: ::nl_item = 18;
++pub const ABDAY_6: ::nl_item = 19;
++pub const ABDAY_7: ::nl_item = 20;
++
++pub const MON_1: ::nl_item = 21;
++pub const MON_2: ::nl_item = 22;
++pub const MON_3: ::nl_item = 23;
++pub const MON_4: ::nl_item = 24;
++pub const MON_5: ::nl_item = 25;
++pub const MON_6: ::nl_item = 26;
++pub const MON_7: ::nl_item = 27;
++pub const MON_8: ::nl_item = 28;
++pub const MON_9: ::nl_item = 29;
++pub const MON_10: ::nl_item = 30;
++pub const MON_11: ::nl_item = 31;
++pub const MON_12: ::nl_item = 32;
++
++pub const ABMON_1: ::nl_item = 33;
++pub const ABMON_2: ::nl_item = 34;
++pub const ABMON_3: ::nl_item = 35;
++pub const ABMON_4: ::nl_item = 36;
++pub const ABMON_5: ::nl_item = 37;
++pub const ABMON_6: ::nl_item = 38;
++pub const ABMON_7: ::nl_item = 39;
++pub const ABMON_8: ::nl_item = 40;
++pub const ABMON_9: ::nl_item = 41;
++pub const ABMON_10: ::nl_item = 42;
++pub const ABMON_11: ::nl_item = 43;
++pub const ABMON_12: ::nl_item = 44;
++
++pub const ERA: ::nl_item = 45;
++pub const ERA_D_FMT: ::nl_item = 46;
++pub const ERA_D_T_FMT: ::nl_item = 47;
++pub const ERA_T_FMT: ::nl_item = 48;
++pub const ALT_DIGITS: ::nl_item = 49;
++
++pub const RADIXCHAR: ::nl_item = 50;
++pub const THOUSEP: ::nl_item = 51;
++
++pub const YESEXPR: ::nl_item = 52;
++pub const NOEXPR: ::nl_item = 53;
++
++pub const YESSTR: ::nl_item = 54;
++pub const NOSTR: ::nl_item = 55;
++
++pub const CRNCYSTR: ::nl_item = 56;
++
++pub const D_MD_ORDER: ::nl_item = 57;
++
++pub const EXIT_FAILURE: ::c_int = 1;
++pub const EXIT_SUCCESS: ::c_int = 0;
++pub const RAND_MAX: ::c_int = 2147483647;
++pub const EOF: ::c_int = -1;
++pub const SEEK_SET: ::c_int = 0;
++pub const SEEK_CUR: ::c_int = 1;
++pub const SEEK_END: ::c_int = 2;
++pub const _IOFBF: ::c_int = 0;
++pub const _IONBF: ::c_int = 2;
++pub const _IOLBF: ::c_int = 1;
++pub const BUFSIZ: ::c_uint = 1024;
++pub const FOPEN_MAX: ::c_uint = 20;
++pub const FILENAME_MAX: ::c_uint = 1024;
++pub const L_tmpnam: ::c_uint = 1024;
++pub const TMP_MAX: ::c_uint = 308915776;
++pub const _PC_LINK_MAX: ::c_int = 1;
++pub const _PC_MAX_CANON: ::c_int = 2;
++pub const _PC_MAX_INPUT: ::c_int = 3;
++pub const _PC_NAME_MAX: ::c_int = 4;
++pub const _PC_PATH_MAX: ::c_int = 5;
++pub const _PC_PIPE_BUF: ::c_int = 6;
++pub const _PC_CHOWN_RESTRICTED: ::c_int = 7;
++pub const _PC_NO_TRUNC: ::c_int = 8;
++pub const _PC_VDISABLE: ::c_int = 9;
++pub const O_DSYNC: ::c_int = 0x400000;
++pub const O_NOCTTY: ::c_int = 0x20000;
++pub const O_CLOEXEC: ::c_int = 0x1000000;
++pub const O_DIRECTORY: ::c_int = 0x100000;
++pub const S_IFIFO: mode_t = 4096;
++pub const S_IFCHR: mode_t = 8192;
++pub const S_IFBLK: mode_t = 24576;
++pub const S_IFDIR: mode_t = 16384;
++pub const S_IFREG: mode_t = 32768;
++pub const S_IFLNK: mode_t = 40960;
++pub const S_IFSOCK: mode_t = 49152;
++pub const S_IFMT: mode_t = 61440;
++pub const S_IEXEC: mode_t = 64;
++pub const S_IWRITE: mode_t = 128;
++pub const S_IREAD: mode_t = 256;
++pub const S_IRWXU: mode_t = 448;
++pub const S_IXUSR: mode_t = 64;
++pub const S_IWUSR: mode_t = 128;
++pub const S_IRUSR: mode_t = 256;
++pub const S_IRWXG: mode_t = 56;
++pub const S_IXGRP: mode_t = 8;
++pub const S_IWGRP: mode_t = 16;
++pub const S_IRGRP: mode_t = 32;
++pub const S_IRWXO: mode_t = 7;
++pub const S_IXOTH: mode_t = 1;
++pub const S_IWOTH: mode_t = 2;
++pub const S_IROTH: mode_t = 4;
++pub const F_OK: ::c_int = 0;
++pub const R_OK: ::c_int = 4;
++pub const W_OK: ::c_int = 2;
++pub const X_OK: ::c_int = 1;
++pub const STDIN_FILENO: ::c_int = 0;
++pub const STDOUT_FILENO: ::c_int = 1;
++pub const STDERR_FILENO: ::c_int = 2;
++pub const F_LOCK: ::c_int = 1;
++pub const F_TEST: ::c_int = 3;
++pub const F_TLOCK: ::c_int = 2;
++pub const F_ULOCK: ::c_int = 0;
++pub const F_GETLK: ::c_int = 7;
++pub const F_SETLK: ::c_int = 8;
++pub const F_SETLKW: ::c_int = 9;
++pub const SIGHUP: ::c_int = 1;
++pub const SIGINT: ::c_int = 2;
++pub const SIGQUIT: ::c_int = 3;
++pub const SIGILL: ::c_int = 4;
++pub const SIGABRT: ::c_int = 6;
++pub const SIGEMT: ::c_int = 7;
++pub const SIGFPE: ::c_int = 8;
++pub const SIGKILL: ::c_int = 9;
++pub const SIGSEGV: ::c_int = 11;
++pub const SIGPIPE: ::c_int = 13;
++pub const SIGALRM: ::c_int = 14;
++pub const SIGTERM: ::c_int = 15;
++
++pub const PROT_NONE: ::c_int = 0;
++pub const PROT_READ: ::c_int = 1;
++pub const PROT_WRITE: ::c_int = 2;
++pub const PROT_EXEC: ::c_int = 4;
++
++pub const MAP_FILE: ::c_int = 0x0000;
++pub const MAP_SHARED: ::c_int = 0x0001;
++pub const MAP_PRIVATE: ::c_int = 0x0002;
++pub const MAP_FIXED: ::c_int = 0x0010;
++pub const MAP_ANON: ::c_int = 0x1000;
++
++pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
++
++pub const MCL_CURRENT: ::c_int = 0x0001;
++pub const MCL_FUTURE: ::c_int = 0x0002;
++
++pub const MS_ASYNC: ::c_int = 0x0001;
++pub const MS_INVALIDATE: ::c_int = 0x0002;
++pub const MS_SYNC: ::c_int = 0x0010;
++
++pub const MS_KILLPAGES: ::c_int = 0x0004;
++pub const MS_DEACTIVATE: ::c_int = 0x0008;
++
++pub const EPERM: ::c_int = 1;
++pub const ENOENT: ::c_int = 2;
++pub const ESRCH: ::c_int = 3;
++pub const EINTR: ::c_int = 4;
++pub const EIO: ::c_int = 5;
++pub const ENXIO: ::c_int = 6;
++pub const E2BIG: ::c_int = 7;
++pub const ENOEXEC: ::c_int = 8;
++pub const EBADF: ::c_int = 9;
++pub const ECHILD: ::c_int = 10;
++pub const EDEADLK: ::c_int = 11;
++pub const ENOMEM: ::c_int = 12;
++pub const EACCES: ::c_int = 13;
++pub const EFAULT: ::c_int = 14;
++pub const ENOTBLK: ::c_int = 15;
++pub const EBUSY: ::c_int = 16;
++pub const EEXIST: ::c_int = 17;
++pub const EXDEV: ::c_int = 18;
++pub const ENODEV: ::c_int = 19;
++pub const ENOTDIR: ::c_int = 20;
++pub const EISDIR: ::c_int = 21;
++pub const EINVAL: ::c_int = 22;
++pub const ENFILE: ::c_int = 23;
++pub const EMFILE: ::c_int = 24;
++pub const ENOTTY: ::c_int = 25;
++pub const ETXTBSY: ::c_int = 26;
++pub const EFBIG: ::c_int = 27;
++pub const ENOSPC: ::c_int = 28;
++pub const ESPIPE: ::c_int = 29;
++pub const EROFS: ::c_int = 30;
++pub const EMLINK: ::c_int = 31;
++pub const EPIPE: ::c_int = 32;
++pub const EDOM: ::c_int = 33;
++pub const ERANGE: ::c_int = 34;
++pub const EAGAIN: ::c_int = 35;
++pub const EWOULDBLOCK: ::c_int = EAGAIN;
++pub const EINPROGRESS: ::c_int = 36;
++pub const EALREADY: ::c_int = 37;
++pub const ENOTSOCK: ::c_int = 38;
++pub const EDESTADDRREQ: ::c_int = 39;
++pub const EMSGSIZE: ::c_int = 40;
++pub const EPROTOTYPE: ::c_int = 41;
++pub const ENOPROTOOPT: ::c_int = 42;
++pub const EPROTONOSUPPORT: ::c_int = 43;
++pub const ESOCKTNOSUPPORT: ::c_int = 44;
++pub const ENOTSUP: ::c_int = 45;
++pub const EPFNOSUPPORT: ::c_int = 46;
++pub const EAFNOSUPPORT: ::c_int = 47;
++pub const EADDRINUSE: ::c_int = 48;
++pub const EADDRNOTAVAIL: ::c_int = 49;
++pub const ENETDOWN: ::c_int = 50;
++pub const ENETUNREACH: ::c_int = 51;
++pub const ENETRESET: ::c_int = 52;
++pub const ECONNABORTED: ::c_int = 53;
++pub const ECONNRESET: ::c_int = 54;
++pub const ENOBUFS: ::c_int = 55;
++pub const EISCONN: ::c_int = 56;
++pub const ENOTCONN: ::c_int = 57;
++pub const ESHUTDOWN: ::c_int = 58;
++pub const ETOOMANYREFS: ::c_int = 59;
++pub const ETIMEDOUT: ::c_int = 60;
++pub const ECONNREFUSED: ::c_int = 61;
++pub const ELOOP: ::c_int = 62;
++pub const ENAMETOOLONG: ::c_int = 63;
++pub const EHOSTDOWN: ::c_int = 64;
++pub const EHOSTUNREACH: ::c_int = 65;
++pub const ENOTEMPTY: ::c_int = 66;
++pub const EPROCLIM: ::c_int = 67;
++pub const EUSERS: ::c_int = 68;
++pub const EDQUOT: ::c_int = 69;
++pub const ESTALE: ::c_int = 70;
++pub const EREMOTE: ::c_int = 71;
++pub const EBADRPC: ::c_int = 72;
++pub const ERPCMISMATCH: ::c_int = 73;
++pub const EPROGUNAVAIL: ::c_int = 74;
++pub const EPROGMISMATCH: ::c_int = 75;
++pub const EPROCUNAVAIL: ::c_int = 76;
++pub const ENOLCK: ::c_int = 77;
++pub const ENOSYS: ::c_int = 78;
++pub const EFTYPE: ::c_int = 79;
++pub const EAUTH: ::c_int = 80;
++pub const ENEEDAUTH: ::c_int = 81;
++pub const EPWROFF: ::c_int = 82;
++pub const EDEVERR: ::c_int = 83;
++pub const EOVERFLOW: ::c_int = 84;
++pub const EBADEXEC: ::c_int = 85;
++pub const EBADARCH: ::c_int = 86;
++pub const ESHLIBVERS: ::c_int = 87;
++pub const EBADMACHO: ::c_int = 88;
++pub const ECANCELED: ::c_int = 89;
++pub const EIDRM: ::c_int = 90;
++pub const ENOMSG: ::c_int = 91;
++pub const EILSEQ: ::c_int = 92;
++pub const ENOATTR: ::c_int = 93;
++pub const EBADMSG: ::c_int = 94;
++pub const EMULTIHOP: ::c_int = 95;
++pub const ENODATA: ::c_int = 96;
++pub const ENOLINK: ::c_int = 97;
++pub const ENOSR: ::c_int = 98;
++pub const ENOSTR: ::c_int = 99;
++pub const EPROTO: ::c_int = 100;
++pub const ETIME: ::c_int = 101;
++pub const EOPNOTSUPP: ::c_int = 102;
++pub const ENOPOLICY: ::c_int = 103;
++pub const ENOTRECOVERABLE: ::c_int = 104;
++pub const EOWNERDEAD: ::c_int = 105;
++pub const EQFULL: ::c_int = 106;
++pub const ELAST: ::c_int = 106;
++
++pub const EAI_SYSTEM: ::c_int = 11;
++
++pub const F_DUPFD: ::c_int = 0;
++pub const F_DUPFD_CLOEXEC: ::c_int = 67;
++pub const F_GETFD: ::c_int = 1;
++pub const F_SETFD: ::c_int = 2;
++pub const F_GETFL: ::c_int = 3;
++pub const F_SETFL: ::c_int = 4;
++pub const F_PREALLOCATE: ::c_int = 42;
++pub const F_RDADVISE: ::c_int = 44;
++pub const F_RDAHEAD: ::c_int = 45;
++pub const F_NOCACHE: ::c_int = 48;
++pub const F_GETPATH: ::c_int = 50;
++pub const F_FULLFSYNC: ::c_int = 51;
++pub const F_FREEZE_FS: ::c_int = 53;
++pub const F_THAW_FS: ::c_int = 54;
++pub const F_GLOBAL_NOCACHE: ::c_int = 55;
++pub const F_NODIRECT: ::c_int = 62;
++
++pub const F_ALLOCATECONTIG: ::c_uint = 0x02;
++pub const F_ALLOCATEALL: ::c_uint = 0x04;
++
++pub const F_PEOFPOSMODE: ::c_int = 3;
++pub const F_VOLPOSMODE: ::c_int = 4;
++
++pub const AT_FDCWD: ::c_int = -2;
++pub const AT_EACCESS: ::c_int = 0x0010;
++pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x0020;
++pub const AT_SYMLINK_FOLLOW: ::c_int = 0x0040;
++pub const AT_REMOVEDIR: ::c_int = 0x0080;
++
++pub const TIOCMODG: ::c_ulong = 0x40047403;
++pub const TIOCMODS: ::c_ulong = 0x80047404;
++pub const TIOCM_LE: ::c_int = 0x1;
++pub const TIOCM_DTR: ::c_int = 0x2;
++pub const TIOCM_RTS: ::c_int = 0x4;
++pub const TIOCM_ST: ::c_int = 0x8;
++pub const TIOCM_SR: ::c_int = 0x10;
++pub const TIOCM_CTS: ::c_int = 0x20;
++pub const TIOCM_CAR: ::c_int = 0x40;
++pub const TIOCM_CD: ::c_int = 0x40;
++pub const TIOCM_RNG: ::c_int = 0x80;
++pub const TIOCM_RI: ::c_int = 0x80;
++pub const TIOCM_DSR: ::c_int = 0x100;
++pub const TIOCEXCL: ::c_int = 0x2000740d;
++pub const TIOCNXCL: ::c_int = 0x2000740e;
++pub const TIOCFLUSH: ::c_ulong = 0x80047410;
++pub const TIOCGETD: ::c_ulong = 0x4004741a;
++pub const TIOCSETD: ::c_ulong = 0x8004741b;
++pub const TIOCIXON: ::c_uint = 0x20007481;
++pub const TIOCIXOFF: ::c_uint = 0x20007480;
++pub const TIOCSBRK: ::c_uint = 0x2000747b;
++pub const TIOCCBRK: ::c_uint = 0x2000747a;
++pub const TIOCSDTR: ::c_uint = 0x20007479;
++pub const TIOCCDTR: ::c_uint = 0x20007478;
++pub const TIOCGPGRP: ::c_ulong = 0x40047477;
++pub const TIOCSPGRP: ::c_ulong = 0x80047476;
++pub const TIOCOUTQ: ::c_ulong = 0x40047473;
++pub const TIOCSTI: ::c_ulong = 0x80017472;
++pub const TIOCNOTTY: ::c_uint = 0x20007471;
++pub const TIOCPKT: ::c_ulong = 0x80047470;
++pub const TIOCPKT_DATA: ::c_int = 0x0;
++pub const TIOCPKT_FLUSHREAD: ::c_int = 0x1;
++pub const TIOCPKT_FLUSHWRITE: ::c_int = 0x2;
++pub const TIOCPKT_STOP: ::c_int = 0x4;
++pub const TIOCPKT_START: ::c_int = 0x8;
++pub const TIOCPKT_NOSTOP: ::c_int = 0x10;
++pub const TIOCPKT_DOSTOP: ::c_int = 0x20;
++pub const TIOCPKT_IOCTL: ::c_int = 0x40;
++pub const TIOCSTOP: ::c_uint = 0x2000746f;
++pub const TIOCSTART: ::c_uint = 0x2000746e;
++pub const TIOCMSET: ::c_ulong = 0x8004746d;
++pub const TIOCMBIS: ::c_ulong = 0x8004746c;
++pub const TIOCMBIC: ::c_ulong = 0x8004746b;
++pub const TIOCMGET: ::c_ulong = 0x4004746a;
++pub const TIOCREMOTE: ::c_ulong = 0x80047469;
++pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
++pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
++pub const TIOCUCNTL: ::c_ulong = 0x80047466;
++pub const TIOCSTAT: ::c_uint = 0x20007465;
++pub const TIOCSCONS: ::c_uint = 0x20007463;
++pub const TIOCCONS: ::c_ulong = 0x80047462;
++pub const TIOCSCTTY: ::c_uint = 0x20007461;
++pub const TIOCEXT: ::c_ulong = 0x80047460;
++pub const TIOCSIG: ::c_uint = 0x2000745f;
++pub const TIOCDRAIN: ::c_uint = 0x2000745e;
++pub const TIOCMSDTRWAIT: ::c_ulong = 0x8004745b;
++pub const TIOCMGDTRWAIT: ::c_ulong = 0x4004745a;
++pub const TIOCSDRAINWAIT: ::c_ulong = 0x80047457;
++pub const TIOCGDRAINWAIT: ::c_ulong = 0x40047456;
++pub const TIOCDSIMICROCODE: ::c_uint = 0x20007455;
++pub const TIOCPTYGRANT: ::c_uint = 0x20007454;
++pub const TIOCPTYGNAME: ::c_uint = 0x40807453;
++pub const TIOCPTYUNLK: ::c_uint = 0x20007452;
++
++pub const B0: speed_t = 0;
++pub const B50: speed_t = 50;
++pub const B75: speed_t = 75;
++pub const B110: speed_t = 110;
++pub const B134: speed_t = 134;
++pub const B150: speed_t = 150;
++pub const B200: speed_t = 200;
++pub const B300: speed_t = 300;
++pub const B600: speed_t = 600;
++pub const B1200: speed_t = 1200;
++pub const B1800: speed_t = 1800;
++pub const B2400: speed_t = 2400;
++pub const B4800: speed_t = 4800;
++pub const B9600: speed_t = 9600;
++pub const B19200: speed_t = 19200;
++pub const B38400: speed_t = 38400;
++pub const B7200: speed_t = 7200;
++pub const B14400: speed_t = 14400;
++pub const B28800: speed_t = 28800;
++pub const B57600: speed_t = 57600;
++pub const B76800: speed_t = 76800;
++pub const B115200: speed_t = 115200;
++pub const B230400: speed_t = 230400;
++pub const EXTA: speed_t = 19200;
++pub const EXTB: speed_t = 38400;
++
++pub const SIGTRAP: ::c_int = 5;
++
++pub const GLOB_APPEND  : ::c_int = 0x0001;
++pub const GLOB_DOOFFS  : ::c_int = 0x0002;
++pub const GLOB_ERR     : ::c_int = 0x0004;
++pub const GLOB_MARK    : ::c_int = 0x0008;
++pub const GLOB_NOCHECK : ::c_int = 0x0010;
++pub const GLOB_NOSORT  : ::c_int = 0x0020;
++pub const GLOB_NOESCAPE: ::c_int = 0x2000;
++
++pub const GLOB_NOSPACE : ::c_int = -1;
++pub const GLOB_ABORTED : ::c_int = -2;
++pub const GLOB_NOMATCH : ::c_int = -3;
++
++pub const POSIX_MADV_NORMAL: ::c_int = 0;
++pub const POSIX_MADV_RANDOM: ::c_int = 1;
++pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
++pub const POSIX_MADV_WILLNEED: ::c_int = 3;
++pub const POSIX_MADV_DONTNEED: ::c_int = 4;
++
++pub const _SC_IOV_MAX: ::c_int = 56;
++pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70;
++pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71;
++pub const _SC_LOGIN_NAME_MAX: ::c_int = 73;
++pub const _SC_MQ_PRIO_MAX: ::c_int = 75;
++pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82;
++pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83;
++pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85;
++pub const _SC_THREAD_KEYS_MAX: ::c_int = 86;
++pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 87;
++pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88;
++pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89;
++pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90;
++pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91;
++pub const _SC_THREAD_STACK_MIN: ::c_int = 93;
++pub const _SC_THREAD_THREADS_MAX: ::c_int = 94;
++pub const _SC_THREADS: ::c_int = 96;
++pub const _SC_TTY_NAME_MAX: ::c_int = 101;
++pub const _SC_ATEXIT_MAX: ::c_int = 107;
++pub const _SC_XOPEN_CRYPT: ::c_int = 108;
++pub const _SC_XOPEN_ENH_I18N: ::c_int = 109;
++pub const _SC_XOPEN_LEGACY: ::c_int = 110;
++pub const _SC_XOPEN_REALTIME: ::c_int = 111;
++pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112;
++pub const _SC_XOPEN_SHM: ::c_int = 113;
++pub const _SC_XOPEN_UNIX: ::c_int = 115;
++pub const _SC_XOPEN_VERSION: ::c_int = 116;
++pub const _SC_XOPEN_XCU_VERSION: ::c_int = 121;
++
++pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 2;
++pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
++pub const PTHREAD_CREATE_JOINABLE: ::c_int = 1;
++pub const PTHREAD_CREATE_DETACHED: ::c_int = 2;
++pub const PTHREAD_STACK_MIN: ::size_t = 8192;
++
++pub const RLIMIT_CPU: ::c_int = 0;
++pub const RLIMIT_FSIZE: ::c_int = 1;
++pub const RLIMIT_DATA: ::c_int = 2;
++pub const RLIMIT_STACK: ::c_int = 3;
++pub const RLIMIT_CORE: ::c_int = 4;
++pub const RLIMIT_AS: ::c_int = 5;
++pub const RLIMIT_RSS: ::c_int = RLIMIT_AS;
++pub const RLIMIT_MEMLOCK: ::c_int = 6;
++pub const RLIMIT_NPROC: ::c_int = 7;
++pub const RLIMIT_NOFILE: ::c_int = 8;
++pub const RLIM_NLIMITS: ::c_int = 9;
++pub const _RLIMIT_POSIX_FLAG: ::c_int = 0x1000;
++
++pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff;
++
++pub const RUSAGE_SELF: ::c_int = 0;
++pub const RUSAGE_CHILDREN: ::c_int = -1;
++
++pub const MADV_NORMAL: ::c_int = 0;
++pub const MADV_RANDOM: ::c_int = 1;
++pub const MADV_SEQUENTIAL: ::c_int = 2;
++pub const MADV_WILLNEED: ::c_int = 3;
++pub const MADV_DONTNEED: ::c_int = 4;
++pub const MADV_FREE: ::c_int = 5;
++pub const MADV_ZERO_WIRED_PAGES: ::c_int = 6;
++pub const MADV_FREE_REUSABLE: ::c_int = 7;
++pub const MADV_FREE_REUSE: ::c_int = 8;
++pub const MADV_CAN_REUSE: ::c_int = 9;
++
++pub const MINCORE_INCORE: ::c_int =  0x1;
++pub const MINCORE_REFERENCED: ::c_int = 0x2;
++pub const MINCORE_MODIFIED: ::c_int = 0x4;
++pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8;
++pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10;
++
++pub const AF_UNSPEC: ::c_int = 0;
++pub const AF_LOCAL: ::c_int = 1;
++pub const AF_UNIX: ::c_int = AF_LOCAL;
++pub const AF_INET: ::c_int = 2;
++pub const AF_IMPLINK: ::c_int = 3;
++pub const AF_PUP: ::c_int = 4;
++pub const AF_CHAOS: ::c_int = 5;
++pub const AF_NS: ::c_int = 6;
++pub const AF_ISO: ::c_int = 7;
++pub const AF_OSI: ::c_int = AF_ISO;
++pub const AF_ECMA: ::c_int = 8;
++pub const AF_DATAKIT: ::c_int = 9;
++pub const AF_CCITT: ::c_int = 10;
++pub const AF_SNA: ::c_int = 11;
++pub const AF_DECnet: ::c_int = 12;
++pub const AF_DLI: ::c_int = 13;
++pub const AF_LAT: ::c_int = 14;
++pub const AF_HYLINK: ::c_int = 15;
++pub const AF_APPLETALK: ::c_int = 16;
++pub const AF_ROUTE: ::c_int = 17;
++pub const AF_LINK: ::c_int = 18;
++pub const pseudo_AF_XTP: ::c_int = 19;
++pub const AF_COIP: ::c_int = 20;
++pub const AF_CNT: ::c_int = 21;
++pub const pseudo_AF_RTIP: ::c_int = 22;
++pub const AF_IPX: ::c_int = 23;
++pub const AF_SIP: ::c_int = 24;
++pub const pseudo_AF_PIP: ::c_int = 25;
++pub const AF_ISDN: ::c_int = 28;
++pub const AF_E164: ::c_int = AF_ISDN;
++pub const pseudo_AF_KEY: ::c_int = 29;
++pub const AF_INET6: ::c_int = 30;
++pub const AF_NATM: ::c_int = 31;
++pub const AF_SYSTEM: ::c_int = 32;
++pub const AF_NETBIOS: ::c_int = 33;
++pub const AF_PPP: ::c_int = 34;
++pub const pseudo_AF_HDRCMPLT: ::c_int = 35;
++#[doc(hidden)]
++pub const AF_MAX: ::c_int = 40;
++pub const AF_SYS_CONTROL: ::c_int = 2;
++
++pub const SYSPROTO_EVENT: ::c_int = 1;
++pub const SYSPROTO_CONTROL: ::c_int = 2;
++
++pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
++pub const PF_LOCAL: ::c_int = AF_LOCAL;
++pub const PF_UNIX: ::c_int =  PF_LOCAL;
++pub const PF_INET: ::c_int =  AF_INET;
++pub const PF_IMPLINK: ::c_int = AF_IMPLINK;
++pub const PF_PUP: ::c_int =  AF_PUP;
++pub const PF_CHAOS: ::c_int = AF_CHAOS;
++pub const PF_NS: ::c_int =  AF_NS;
++pub const PF_ISO: ::c_int =  AF_ISO;
++pub const PF_OSI: ::c_int =  AF_ISO;
++pub const PF_ECMA: ::c_int =  AF_ECMA;
++pub const PF_DATAKIT: ::c_int = AF_DATAKIT;
++pub const PF_CCITT: ::c_int = AF_CCITT;
++pub const PF_SNA: ::c_int =  AF_SNA;
++pub const PF_DECnet: ::c_int = AF_DECnet;
++pub const PF_DLI: ::c_int =  AF_DLI;
++pub const PF_LAT: ::c_int =  AF_LAT;
++pub const PF_HYLINK: ::c_int = AF_HYLINK;
++pub const PF_APPLETALK: ::c_int = AF_APPLETALK;
++pub const PF_ROUTE: ::c_int = AF_ROUTE;
++pub const PF_LINK: ::c_int =  AF_LINK;
++pub const PF_XTP: ::c_int =  pseudo_AF_XTP;
++pub const PF_COIP: ::c_int =  AF_COIP;
++pub const PF_CNT: ::c_int =  AF_CNT;
++pub const PF_SIP: ::c_int =  AF_SIP;
++pub const PF_IPX: ::c_int =  AF_IPX;
++pub const PF_RTIP: ::c_int =  pseudo_AF_RTIP;
++pub const PF_PIP: ::c_int =  pseudo_AF_PIP;
++pub const PF_ISDN: ::c_int =  AF_ISDN;
++pub const PF_KEY: ::c_int =  pseudo_AF_KEY;
++pub const PF_INET6: ::c_int = AF_INET6;
++pub const PF_NATM: ::c_int =  AF_NATM;
++pub const PF_SYSTEM: ::c_int = AF_SYSTEM;
++pub const PF_NETBIOS: ::c_int = AF_NETBIOS;
++pub const PF_PPP: ::c_int =  AF_PPP;
++#[doc(hidden)]
++pub const PF_MAX: ::c_int =  AF_MAX;
++
++#[doc(hidden)]
++pub const NET_MAXID: ::c_int = AF_MAX;
++
++pub const NET_RT_DUMP: ::c_int = 1;
++pub const NET_RT_FLAGS: ::c_int = 2;
++pub const NET_RT_IFLIST: ::c_int = 3;
++#[doc(hidden)]
++pub const NET_RT_MAXID: ::c_int = 10;
++
++pub const SOMAXCONN: ::c_int = 128;
++
++pub const SOCK_MAXADDRLEN: ::c_int = 255;
++
++pub const SOCK_STREAM: ::c_int = 1;
++pub const SOCK_DGRAM: ::c_int = 2;
++pub const SOCK_RAW: ::c_int = 3;
++pub const SOCK_RDM: ::c_int = 4;
++pub const SOCK_SEQPACKET: ::c_int = 5;
++pub const IP_TTL: ::c_int = 4;
++pub const IP_HDRINCL: ::c_int = 2;
++pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
++pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
++pub const IPV6_JOIN_GROUP: ::c_int = 12;
++pub const IPV6_LEAVE_GROUP: ::c_int = 13;
++
++pub const TCP_NODELAY: ::c_int = 0x01;
++pub const TCP_KEEPALIVE: ::c_int = 0x10;
++pub const SOL_SOCKET: ::c_int = 0xffff;
++
++pub const SO_DEBUG: ::c_int = 0x01;
++pub const SO_ACCEPTCONN: ::c_int = 0x0002;
++pub const SO_REUSEADDR: ::c_int = 0x0004;
++pub const SO_KEEPALIVE: ::c_int = 0x0008;
++pub const SO_DONTROUTE: ::c_int = 0x0010;
++pub const SO_BROADCAST: ::c_int = 0x0020;
++pub const SO_USELOOPBACK: ::c_int = 0x0040;
++pub const SO_LINGER: ::c_int = 0x0080;
++pub const SO_OOBINLINE: ::c_int = 0x0100;
++pub const SO_REUSEPORT: ::c_int = 0x0200;
++pub const SO_TIMESTAMP: ::c_int = 0x0400;
++pub const SO_TIMESTAMP_MONOTONIC: ::c_int = 0x0800;
++pub const SO_DONTTRUNC: ::c_int = 0x2000;
++pub const SO_WANTMORE: ::c_int = 0x4000;
++pub const SO_WANTOOBFLAG: ::c_int = 0x8000;
++pub const SO_SNDBUF: ::c_int = 0x1001;
++pub const SO_RCVBUF: ::c_int = 0x1002;
++pub const SO_SNDLOWAT: ::c_int = 0x1003;
++pub const SO_RCVLOWAT: ::c_int = 0x1004;
++pub const SO_SNDTIMEO: ::c_int = 0x1005;
++pub const SO_RCVTIMEO: ::c_int = 0x1006;
++pub const SO_ERROR: ::c_int = 0x1007;
++pub const SO_TYPE: ::c_int = 0x1008;
++pub const SO_LABEL: ::c_int = 0x1010;
++pub const SO_PEERLABEL: ::c_int = 0x1011;
++pub const SO_NREAD: ::c_int = 0x1020;
++pub const SO_NKE: ::c_int = 0x1021;
++pub const SO_NOSIGPIPE: ::c_int = 0x1022;
++pub const SO_NOADDRERR: ::c_int = 0x1023;
++pub const SO_NWRITE: ::c_int = 0x1024;
++pub const SO_REUSESHAREUID: ::c_int = 0x1025;
++pub const SO_NOTIFYCONFLICT: ::c_int = 0x1026;
++pub const SO_RANDOMPORT: ::c_int = 0x1082;
++pub const SO_NP_EXTENSIONS: ::c_int = 0x1083;
++
++pub const MSG_OOB: ::c_int =  0x1;
++pub const MSG_PEEK: ::c_int = 0x2;
++pub const MSG_DONTROUTE: ::c_int = 0x4;
++pub const MSG_EOR: ::c_int =  0x8;
++pub const MSG_TRUNC: ::c_int = 0x10;
++pub const MSG_CTRUNC: ::c_int = 0x20;
++pub const MSG_WAITALL: ::c_int = 0x40;
++pub const MSG_DONTWAIT: ::c_int = 0x80;
++pub const MSG_EOF: ::c_int =  0x100;
++pub const MSG_FLUSH: ::c_int = 0x400;
++pub const MSG_HOLD: ::c_int = 0x800;
++pub const MSG_SEND: ::c_int = 0x1000;
++pub const MSG_HAVEMORE: ::c_int = 0x2000;
++pub const MSG_RCVMORE: ::c_int = 0x4000;
++// pub const MSG_COMPAT: ::c_int = 0x8000;
++
++pub const SCM_TIMESTAMP: ::c_int = 0x02;
++pub const SCM_CREDS: ::c_int = 0x03;
++
++pub const IFF_LOOPBACK: ::c_int = 0x8;
++
++pub const SHUT_RD: ::c_int = 0;
++pub const SHUT_WR: ::c_int = 1;
++pub const SHUT_RDWR: ::c_int = 2;
++
++pub const LOCK_SH: ::c_int = 1;
++pub const LOCK_EX: ::c_int = 2;
++pub const LOCK_NB: ::c_int = 4;
++pub const LOCK_UN: ::c_int = 8;
++
++pub const MAP_COPY: ::c_int = 0x0002;
++pub const MAP_RENAME: ::c_int = 0x0020;
++pub const MAP_NORESERVE: ::c_int = 0x0040;
++pub const MAP_NOEXTEND: ::c_int = 0x0100;
++pub const MAP_HASSEMAPHORE: ::c_int = 0x0200;
++pub const MAP_NOCACHE: ::c_int = 0x0400;
++pub const MAP_JIT: ::c_int = 0x0800;
++
++pub const IPPROTO_RAW: ::c_int = 255;
++
++pub const _SC_ARG_MAX: ::c_int = 1;
++pub const _SC_CHILD_MAX: ::c_int = 2;
++pub const _SC_CLK_TCK: ::c_int = 3;
++pub const _SC_NGROUPS_MAX: ::c_int = 4;
++pub const _SC_OPEN_MAX: ::c_int = 5;
++pub const _SC_JOB_CONTROL: ::c_int = 6;
++pub const _SC_SAVED_IDS: ::c_int = 7;
++pub const _SC_VERSION: ::c_int = 8;
++pub const _SC_BC_BASE_MAX: ::c_int = 9;
++pub const _SC_BC_DIM_MAX: ::c_int = 10;
++pub const _SC_BC_SCALE_MAX: ::c_int = 11;
++pub const _SC_BC_STRING_MAX: ::c_int = 12;
++pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 13;
++pub const _SC_EXPR_NEST_MAX: ::c_int = 14;
++pub const _SC_LINE_MAX: ::c_int = 15;
++pub const _SC_RE_DUP_MAX: ::c_int = 16;
++pub const _SC_2_VERSION: ::c_int = 17;
++pub const _SC_2_C_BIND: ::c_int = 18;
++pub const _SC_2_C_DEV: ::c_int = 19;
++pub const _SC_2_CHAR_TERM: ::c_int = 20;
++pub const _SC_2_FORT_DEV: ::c_int = 21;
++pub const _SC_2_FORT_RUN: ::c_int = 22;
++pub const _SC_2_LOCALEDEF: ::c_int = 23;
++pub const _SC_2_SW_DEV: ::c_int = 24;
++pub const _SC_2_UPE: ::c_int = 25;
++pub const _SC_STREAM_MAX: ::c_int = 26;
++pub const _SC_TZNAME_MAX: ::c_int = 27;
++pub const _SC_ASYNCHRONOUS_IO: ::c_int = 28;
++pub const _SC_PAGESIZE: ::c_int = 29;
++pub const _SC_MEMLOCK: ::c_int = 30;
++pub const _SC_MEMLOCK_RANGE: ::c_int = 31;
++pub const _SC_MEMORY_PROTECTION: ::c_int = 32;
++pub const _SC_MESSAGE_PASSING: ::c_int = 33;
++pub const _SC_PRIORITIZED_IO: ::c_int = 34;
++pub const _SC_PRIORITY_SCHEDULING: ::c_int = 35;
++pub const _SC_REALTIME_SIGNALS: ::c_int = 36;
++pub const _SC_SEMAPHORES: ::c_int = 37;
++pub const _SC_FSYNC: ::c_int = 38;
++pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 39;
++pub const _SC_SYNCHRONIZED_IO: ::c_int = 40;
++pub const _SC_TIMERS: ::c_int = 41;
++pub const _SC_AIO_LISTIO_MAX: ::c_int = 42;
++pub const _SC_AIO_MAX: ::c_int = 43;
++pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 44;
++pub const _SC_DELAYTIMER_MAX: ::c_int = 45;
++pub const _SC_MQ_OPEN_MAX: ::c_int = 46;
++pub const _SC_MAPPED_FILES: ::c_int = 47;
++pub const _SC_RTSIG_MAX: ::c_int = 48;
++pub const _SC_SEM_NSEMS_MAX: ::c_int = 49;
++pub const _SC_SEM_VALUE_MAX: ::c_int = 50;
++pub const _SC_SIGQUEUE_MAX: ::c_int = 51;
++pub const _SC_TIMER_MAX: ::c_int = 52;
++pub const _SC_NPROCESSORS_CONF: ::c_int = 57;
++pub const _SC_NPROCESSORS_ONLN: ::c_int = 58;
++pub const _SC_2_PBS: ::c_int = 59;
++pub const _SC_2_PBS_ACCOUNTING: ::c_int = 60;
++pub const _SC_2_PBS_CHECKPOINT: ::c_int = 61;
++pub const _SC_2_PBS_LOCATE: ::c_int = 62;
++pub const _SC_2_PBS_MESSAGE: ::c_int = 63;
++pub const _SC_2_PBS_TRACK: ::c_int = 64;
++pub const _SC_ADVISORY_INFO: ::c_int = 65;
++pub const _SC_BARRIERS: ::c_int = 66;
++pub const _SC_CLOCK_SELECTION: ::c_int = 67;
++pub const _SC_CPUTIME: ::c_int = 68;
++pub const _SC_FILE_LOCKING: ::c_int = 69;
++pub const _SC_HOST_NAME_MAX: ::c_int = 72;
++pub const _SC_MONOTONIC_CLOCK: ::c_int = 74;
++pub const _SC_READER_WRITER_LOCKS: ::c_int = 76;
++pub const _SC_REGEXP: ::c_int = 77;
++pub const _SC_SHELL: ::c_int = 78;
++pub const _SC_SPAWN: ::c_int = 79;
++pub const _SC_SPIN_LOCKS: ::c_int = 80;
++pub const _SC_SPORADIC_SERVER: ::c_int = 81;
++pub const _SC_THREAD_CPUTIME: ::c_int = 84;
++pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 92;
++pub const _SC_TIMEOUTS: ::c_int = 95;
++pub const _SC_TRACE: ::c_int = 97;
++pub const _SC_TRACE_EVENT_FILTER: ::c_int = 98;
++pub const _SC_TRACE_INHERIT: ::c_int = 99;
++pub const _SC_TRACE_LOG: ::c_int = 100;
++pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 102;
++pub const _SC_V6_ILP32_OFF32: ::c_int = 103;
++pub const _SC_V6_ILP32_OFFBIG: ::c_int = 104;
++pub const _SC_V6_LP64_OFF64: ::c_int = 105;
++pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 106;
++pub const _SC_IPV6: ::c_int = 118;
++pub const _SC_RAW_SOCKETS: ::c_int = 119;
++pub const _SC_SYMLOOP_MAX: ::c_int = 120;
++pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
++pub const _SC_XOPEN_STREAMS: ::c_int = 114;
++pub const _SC_XBS5_ILP32_OFF32: ::c_int = 122;
++pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 123;
++pub const _SC_XBS5_LP64_OFF64: ::c_int = 124;
++pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 125;
++pub const _SC_SS_REPL_MAX: ::c_int = 126;
++pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 127;
++pub const _SC_TRACE_NAME_MAX: ::c_int = 128;
++pub const _SC_TRACE_SYS_MAX: ::c_int = 129;
++pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 130;
++pub const _SC_PASS_MAX: ::c_int = 131;
++
++pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
++pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
++pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
++pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
++pub const _PTHREAD_MUTEX_SIG_init: ::c_long = 0x32AAABA7;
++pub const _PTHREAD_COND_SIG_init: ::c_long = 0x3CB0B1BB;
++pub const _PTHREAD_RWLOCK_SIG_init: ::c_long = 0x2DA8B3B4;
++pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
++    __sig: _PTHREAD_MUTEX_SIG_init,
++    __opaque: [0; __PTHREAD_MUTEX_SIZE__],
++};
++pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
++    __sig: _PTHREAD_COND_SIG_init,
++    __opaque: [0; __PTHREAD_COND_SIZE__],
++};
++pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
++    __sig: _PTHREAD_RWLOCK_SIG_init,
++    __opaque: [0; __PTHREAD_RWLOCK_SIZE__],
++};
++
++pub const SIGSTKSZ: ::size_t = 131072;
++
++pub const FD_SETSIZE: usize = 1024;
++
++pub const ST_NOSUID: ::c_ulong = 2;
++
++pub const EVFILT_READ: ::int16_t = -1;
++pub const EVFILT_WRITE: ::int16_t = -2;
++pub const EVFILT_AIO: ::int16_t = -3;
++pub const EVFILT_VNODE: ::int16_t = -4;
++pub const EVFILT_PROC: ::int16_t = -5;
++pub const EVFILT_SIGNAL: ::int16_t = -6;
++pub const EVFILT_TIMER: ::int16_t = -7;
++pub const EVFILT_MACHPORT: ::int16_t = -8;
++pub const EVFILT_FS: ::int16_t = -9;
++pub const EVFILT_USER: ::int16_t = -10;
++pub const EVFILT_VM: ::int16_t = -12;
++
++pub const EV_ADD: ::uint16_t = 0x1;
++pub const EV_DELETE: ::uint16_t = 0x2;
++pub const EV_ENABLE: ::uint16_t = 0x4;
++pub const EV_DISABLE: ::uint16_t = 0x8;
++pub const EV_ONESHOT: ::uint16_t = 0x10;
++pub const EV_CLEAR: ::uint16_t = 0x20;
++pub const EV_RECEIPT: ::uint16_t = 0x40;
++pub const EV_DISPATCH: ::uint16_t = 0x80;
++pub const EV_FLAG0: ::uint16_t = 0x1000;
++pub const EV_POLL: ::uint16_t = 0x1000;
++pub const EV_FLAG1: ::uint16_t = 0x2000;
++pub const EV_OOBAND: ::uint16_t = 0x2000;
++pub const EV_ERROR: ::uint16_t = 0x4000;
++pub const EV_EOF: ::uint16_t = 0x8000;
++pub const EV_SYSFLAGS: ::uint16_t = 0xf000;
++
++pub const NOTE_TRIGGER: ::uint32_t = 0x01000000;
++pub const NOTE_FFNOP: ::uint32_t = 0x00000000;
++pub const NOTE_FFAND: ::uint32_t = 0x40000000;
++pub const NOTE_FFOR: ::uint32_t = 0x80000000;
++pub const NOTE_FFCOPY: ::uint32_t = 0xc0000000;
++pub const NOTE_FFCTRLMASK: ::uint32_t = 0xc0000000;
++pub const NOTE_FFLAGSMASK: ::uint32_t = 0x00ffffff;
++pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
++pub const NOTE_DELETE: ::uint32_t = 0x00000001;
++pub const NOTE_WRITE: ::uint32_t = 0x00000002;
++pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
++pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
++pub const NOTE_LINK: ::uint32_t = 0x00000010;
++pub const NOTE_RENAME: ::uint32_t = 0x00000020;
++pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
++pub const NOTE_NONE: ::uint32_t = 0x00000080;
++pub const NOTE_EXIT: ::uint32_t = 0x80000000;
++pub const NOTE_FORK: ::uint32_t = 0x40000000;
++pub const NOTE_EXEC: ::uint32_t = 0x20000000;
++pub const NOTE_REAP: ::uint32_t = 0x10000000;
++pub const NOTE_SIGNAL: ::uint32_t = 0x08000000;
++pub const NOTE_EXITSTATUS: ::uint32_t = 0x04000000;
++pub const NOTE_EXIT_DETAIL: ::uint32_t = 0x02000000;
++pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
++pub const NOTE_PCTRLMASK: ::uint32_t = 0xfff00000;
++pub const NOTE_EXIT_REPARENTED: ::uint32_t = 0x00080000;
++pub const NOTE_EXIT_DETAIL_MASK: ::uint32_t = 0x00070000;
++pub const NOTE_EXIT_DECRYPTFAIL: ::uint32_t = 0x00010000;
++pub const NOTE_EXIT_MEMORY: ::uint32_t = 0x00020000;
++pub const NOTE_EXIT_CSERROR: ::uint32_t = 0x00040000;
++pub const NOTE_VM_PRESSURE: ::uint32_t = 0x80000000;
++pub const NOTE_VM_PRESSURE_TERMINATE: ::uint32_t = 0x40000000;
++pub const NOTE_VM_PRESSURE_SUDDEN_TERMINATE: ::uint32_t = 0x20000000;
++pub const NOTE_VM_ERROR: ::uint32_t = 0x10000000;
++pub const NOTE_SECONDS: ::uint32_t = 0x00000001;
++pub const NOTE_USECONDS: ::uint32_t = 0x00000002;
++pub const NOTE_NSECONDS: ::uint32_t = 0x00000004;
++pub const NOTE_ABSOLUTE: ::uint32_t = 0x00000008;
++pub const NOTE_LEEWAY: ::uint32_t = 0x00000010;
++pub const NOTE_CRITICAL: ::uint32_t = 0x00000020;
++pub const NOTE_BACKGROUND: ::uint32_t = 0x00000040;
++pub const NOTE_TRACK: ::uint32_t = 0x00000001;
++pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
++pub const NOTE_CHILD: ::uint32_t = 0x00000004;
++
++pub const OCRNL: ::c_int = 0x00000010;
++pub const ONOCR: ::c_int = 0x00000020;
++pub const ONLRET: ::c_int = 0x00000040;
++pub const OFILL: ::c_int = 0x00000080;
++pub const NLDLY: ::c_int = 0x00000300;
++pub const TABDLY: ::c_int = 0x00000c04;
++pub const CRDLY: ::c_int = 0x00003000;
++pub const FFDLY: ::c_int = 0x00004000;
++pub const BSDLY: ::c_int = 0x00008000;
++pub const VTDLY: ::c_int = 0x00010000;
++pub const OFDEL: ::c_int = 0x00020000;
++
++pub const NL0: ::c_int  = 0x00000000;
++pub const NL1: ::c_int  = 0x00000100;
++pub const TAB0: ::c_int = 0x00000000;
++pub const TAB1: ::c_int = 0x00000400;
++pub const TAB2: ::c_int = 0x00000800;
++pub const CR0: ::c_int  = 0x00000000;
++pub const CR1: ::c_int  = 0x00001000;
++pub const CR2: ::c_int  = 0x00002000;
++pub const CR3: ::c_int  = 0x00003000;
++pub const FF0: ::c_int  = 0x00000000;
++pub const FF1: ::c_int  = 0x00004000;
++pub const BS0: ::c_int  = 0x00000000;
++pub const BS1: ::c_int  = 0x00008000;
++pub const TAB3: ::c_int = 0x00000004;
++pub const VT0: ::c_int  = 0x00000000;
++pub const VT1: ::c_int  = 0x00010000;
++pub const IUTF8: ::tcflag_t = 0x00004000;
++pub const CRTSCTS: ::tcflag_t = 0x00030000;
++
++pub const NI_MAXHOST: ::socklen_t = 1025;
++
++pub const Q_GETQUOTA: ::c_int = 0x300;
++pub const Q_SETQUOTA: ::c_int = 0x400;
++
++pub const RTLD_LOCAL: ::c_int = 0x4;
++pub const RTLD_FIRST: ::c_int = 0x100;
++pub const RTLD_NODELETE: ::c_int = 0x80;
++pub const RTLD_NOLOAD: ::c_int = 0x10;
++pub const RTLD_GLOBAL: ::c_int = 0x8;
++
++pub const _WSTOPPED: ::c_int = 0o177;
++
++pub const LOG_NETINFO: ::c_int = 12 << 3;
++pub const LOG_REMOTEAUTH: ::c_int = 13 << 3;
++pub const LOG_INSTALL: ::c_int = 14 << 3;
++pub const LOG_RAS: ::c_int = 15 << 3;
++pub const LOG_LAUNCHD: ::c_int = 24 << 3;
++pub const LOG_NFACILITIES: ::c_int = 25;
++
++pub const CTLTYPE: ::c_int = 0xf;
++pub const CTLTYPE_NODE: ::c_int = 1;
++pub const CTLTYPE_INT: ::c_int = 2;
++pub const CTLTYPE_STRING: ::c_int = 3;
++pub const CTLTYPE_QUAD: ::c_int = 4;
++pub const CTLTYPE_OPAQUE: ::c_int = 5;
++pub const CTLTYPE_STRUCT: ::c_int = CTLTYPE_OPAQUE;
++pub const CTLFLAG_RD: ::c_int = 0x80000000;
++pub const CTLFLAG_WR: ::c_int = 0x40000000;
++pub const CTLFLAG_RW: ::c_int = CTLFLAG_RD | CTLFLAG_WR;
++pub const CTLFLAG_NOLOCK: ::c_int = 0x20000000;
++pub const CTLFLAG_ANYBODY: ::c_int = 0x10000000;
++pub const CTLFLAG_SECURE: ::c_int = 0x08000000;
++pub const CTLFLAG_MASKED: ::c_int = 0x04000000;
++pub const CTLFLAG_NOAUTO: ::c_int = 0x02000000;
++pub const CTLFLAG_KERN: ::c_int = 0x01000000;
++pub const CTLFLAG_LOCKED: ::c_int = 0x00800000;
++pub const CTLFLAG_OID2: ::c_int = 0x00400000;
++pub const CTL_UNSPEC: ::c_int = 0;
++pub const CTL_KERN: ::c_int = 1;
++pub const CTL_VM: ::c_int = 2;
++pub const CTL_VFS: ::c_int = 3;
++pub const CTL_NET: ::c_int = 4;
++pub const CTL_DEBUG: ::c_int = 5;
++pub const CTL_HW: ::c_int = 6;
++pub const CTL_MACHDEP: ::c_int = 7;
++pub const CTL_USER: ::c_int = 8;
++pub const CTL_MAXID: ::c_int = 9;
++pub const KERN_OSTYPE: ::c_int = 1;
++pub const KERN_OSRELEASE: ::c_int = 2;
++pub const KERN_OSREV: ::c_int = 3;
++pub const KERN_VERSION: ::c_int = 4;
++pub const KERN_MAXVNODES: ::c_int = 5;
++pub const KERN_MAXPROC: ::c_int = 6;
++pub const KERN_MAXFILES: ::c_int = 7;
++pub const KERN_ARGMAX: ::c_int = 8;
++pub const KERN_SECURELVL: ::c_int = 9;
++pub const KERN_HOSTNAME: ::c_int = 10;
++pub const KERN_HOSTID: ::c_int = 11;
++pub const KERN_CLOCKRATE: ::c_int = 12;
++pub const KERN_VNODE: ::c_int = 13;
++pub const KERN_PROC: ::c_int = 14;
++pub const KERN_FILE: ::c_int = 15;
++pub const KERN_PROF: ::c_int = 16;
++pub const KERN_POSIX1: ::c_int = 17;
++pub const KERN_NGROUPS: ::c_int = 18;
++pub const KERN_JOB_CONTROL: ::c_int = 19;
++pub const KERN_SAVED_IDS: ::c_int = 20;
++pub const KERN_BOOTTIME: ::c_int = 21;
++pub const KERN_NISDOMAINNAME: ::c_int = 22;
++pub const KERN_DOMAINNAME: ::c_int = KERN_NISDOMAINNAME;
++pub const KERN_MAXPARTITIONS: ::c_int = 23;
++pub const KERN_KDEBUG: ::c_int = 24;
++pub const KERN_UPDATEINTERVAL: ::c_int = 25;
++pub const KERN_OSRELDATE: ::c_int = 26;
++pub const KERN_NTP_PLL: ::c_int = 27;
++pub const KERN_BOOTFILE: ::c_int = 28;
++pub const KERN_MAXFILESPERPROC: ::c_int = 29;
++pub const KERN_MAXPROCPERUID: ::c_int = 30;
++pub const KERN_DUMPDEV: ::c_int = 31;
++pub const KERN_IPC: ::c_int = 32;
++pub const KERN_DUMMY: ::c_int = 33;
++pub const KERN_PS_STRINGS: ::c_int = 34;
++pub const KERN_USRSTACK32: ::c_int = 35;
++pub const KERN_LOGSIGEXIT: ::c_int = 36;
++pub const KERN_SYMFILE: ::c_int = 37;
++pub const KERN_PROCARGS: ::c_int = 38;
++pub const KERN_NETBOOT: ::c_int = 40;
++pub const KERN_SYSV: ::c_int = 42;
++pub const KERN_AFFINITY: ::c_int = 43;
++pub const KERN_TRANSLATE: ::c_int = 44;
++pub const KERN_CLASSIC: ::c_int = KERN_TRANSLATE;
++pub const KERN_EXEC: ::c_int = 45;
++pub const KERN_CLASSICHANDLER: ::c_int = KERN_EXEC;
++pub const KERN_AIOMAX: ::c_int = 46;
++pub const KERN_AIOPROCMAX: ::c_int = 47;
++pub const KERN_AIOTHREADS: ::c_int = 48;
++pub const KERN_COREFILE: ::c_int = 50;
++pub const KERN_COREDUMP: ::c_int = 51;
++pub const KERN_SUGID_COREDUMP: ::c_int = 52;
++pub const KERN_PROCDELAYTERM: ::c_int = 53;
++pub const KERN_SHREG_PRIVATIZABLE: ::c_int = 54;
++pub const KERN_LOW_PRI_WINDOW: ::c_int = 56;
++pub const KERN_LOW_PRI_DELAY: ::c_int = 57;
++pub const KERN_POSIX: ::c_int = 58;
++pub const KERN_USRSTACK64: ::c_int = 59;
++pub const KERN_NX_PROTECTION: ::c_int = 60;
++pub const KERN_TFP: ::c_int = 61;
++pub const KERN_PROCNAME: ::c_int = 62;
++pub const KERN_THALTSTACK: ::c_int = 63;
++pub const KERN_SPECULATIVE_READS: ::c_int = 64;
++pub const KERN_OSVERSION: ::c_int = 65;
++pub const KERN_SAFEBOOT: ::c_int = 66;
++pub const KERN_RAGEVNODE: ::c_int = 68;
++pub const KERN_TTY: ::c_int = 69;
++pub const KERN_CHECKOPENEVT: ::c_int = 70;
++pub const KERN_THREADNAME: ::c_int = 71;
++pub const KERN_MAXID: ::c_int = 72;
++pub const KERN_RAGE_PROC: ::c_int = 1;
++pub const KERN_RAGE_THREAD: ::c_int = 2;
++pub const KERN_UNRAGE_PROC: ::c_int = 3;
++pub const KERN_UNRAGE_THREAD: ::c_int = 4;
++pub const KERN_OPENEVT_PROC: ::c_int = 1;
++pub const KERN_UNOPENEVT_PROC: ::c_int = 2;
++pub const KERN_TFP_POLICY: ::c_int = 1;
++pub const KERN_TFP_POLICY_DENY: ::c_int = 0;
++pub const KERN_TFP_POLICY_DEFAULT: ::c_int = 2;
++pub const KERN_KDEFLAGS: ::c_int = 1;
++pub const KERN_KDDFLAGS: ::c_int = 2;
++pub const KERN_KDENABLE: ::c_int = 3;
++pub const KERN_KDSETBUF: ::c_int = 4;
++pub const KERN_KDGETBUF: ::c_int = 5;
++pub const KERN_KDSETUP: ::c_int = 6;
++pub const KERN_KDREMOVE: ::c_int = 7;
++pub const KERN_KDSETREG: ::c_int = 8;
++pub const KERN_KDGETREG: ::c_int = 9;
++pub const KERN_KDREADTR: ::c_int = 10;
++pub const KERN_KDPIDTR: ::c_int = 11;
++pub const KERN_KDTHRMAP: ::c_int = 12;
++pub const KERN_KDPIDEX: ::c_int = 14;
++pub const KERN_KDSETRTCDEC: ::c_int = 15;
++pub const KERN_KDGETENTROPY: ::c_int = 16;
++pub const KERN_KDWRITETR: ::c_int = 17;
++pub const KERN_KDWRITEMAP: ::c_int = 18;
++pub const KERN_KDENABLE_BG_TRACE: ::c_int = 19;
++pub const KERN_KDDISABLE_BG_TRACE: ::c_int = 20;
++pub const KERN_KDREADCURTHRMAP: ::c_int = 21;
++pub const KERN_KDSET_TYPEFILTER: ::c_int = 22;
++pub const KERN_KDBUFWAIT: ::c_int = 23;
++pub const KERN_KDCPUMAP: ::c_int = 24;
++pub const KERN_PROC_ALL: ::c_int = 0;
++pub const KERN_PROC_PID: ::c_int = 1;
++pub const KERN_PROC_PGRP: ::c_int = 2;
++pub const KERN_PROC_SESSION: ::c_int = 3;
++pub const KERN_PROC_TTY: ::c_int = 4;
++pub const KERN_PROC_UID: ::c_int = 5;
++pub const KERN_PROC_RUID: ::c_int = 6;
++pub const KERN_PROC_LCID: ::c_int = 7;
++pub const KIPC_MAXSOCKBUF: ::c_int = 1;
++pub const KIPC_SOCKBUF_WASTE: ::c_int = 2;
++pub const KIPC_SOMAXCONN: ::c_int = 3;
++pub const KIPC_MAX_LINKHDR: ::c_int = 4;
++pub const KIPC_MAX_PROTOHDR: ::c_int = 5;
++pub const KIPC_MAX_HDR: ::c_int = 6;
++pub const KIPC_MAX_DATALEN: ::c_int = 7;
++pub const KIPC_MBSTAT: ::c_int = 8;
++pub const KIPC_NMBCLUSTERS: ::c_int = 9;
++pub const KIPC_SOQLIMITCOMPAT: ::c_int = 10;
++pub const VM_METER: ::c_int = 1;
++pub const VM_LOADAVG: ::c_int = 2;
++pub const VM_MACHFACTOR: ::c_int = 4;
++pub const VM_SWAPUSAGE: ::c_int = 5;
++pub const VM_MAXID: ::c_int = 6;
++pub const HW_MACHINE: ::c_int = 1;
++pub const HW_MODEL: ::c_int = 2;
++pub const HW_NCPU: ::c_int = 3;
++pub const HW_BYTEORDER: ::c_int = 4;
++pub const HW_PHYSMEM: ::c_int = 5;
++pub const HW_USERMEM: ::c_int = 6;
++pub const HW_PAGESIZE: ::c_int = 7;
++pub const HW_DISKNAMES: ::c_int = 8;
++pub const HW_DISKSTATS: ::c_int = 9;
++pub const HW_EPOCH: ::c_int = 10;
++pub const HW_FLOATINGPT: ::c_int = 11;
++pub const HW_MACHINE_ARCH: ::c_int = 12;
++pub const HW_VECTORUNIT: ::c_int = 13;
++pub const HW_BUS_FREQ: ::c_int = 14;
++pub const HW_CPU_FREQ: ::c_int = 15;
++pub const HW_CACHELINE: ::c_int = 16;
++pub const HW_L1ICACHESIZE: ::c_int = 17;
++pub const HW_L1DCACHESIZE: ::c_int = 18;
++pub const HW_L2SETTINGS: ::c_int = 19;
++pub const HW_L2CACHESIZE: ::c_int = 20;
++pub const HW_L3SETTINGS: ::c_int = 21;
++pub const HW_L3CACHESIZE: ::c_int = 22;
++pub const HW_TB_FREQ: ::c_int = 23;
++pub const HW_MEMSIZE: ::c_int = 24;
++pub const HW_AVAILCPU: ::c_int = 25;
++pub const HW_MAXID: ::c_int = 26;
++pub const USER_CS_PATH: ::c_int = 1;
++pub const USER_BC_BASE_MAX: ::c_int = 2;
++pub const USER_BC_DIM_MAX: ::c_int = 3;
++pub const USER_BC_SCALE_MAX: ::c_int = 4;
++pub const USER_BC_STRING_MAX: ::c_int = 5;
++pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6;
++pub const USER_EXPR_NEST_MAX: ::c_int = 7;
++pub const USER_LINE_MAX: ::c_int = 8;
++pub const USER_RE_DUP_MAX: ::c_int = 9;
++pub const USER_POSIX2_VERSION: ::c_int = 10;
++pub const USER_POSIX2_C_BIND: ::c_int = 11;
++pub const USER_POSIX2_C_DEV: ::c_int = 12;
++pub const USER_POSIX2_CHAR_TERM: ::c_int = 13;
++pub const USER_POSIX2_FORT_DEV: ::c_int = 14;
++pub const USER_POSIX2_FORT_RUN: ::c_int = 15;
++pub const USER_POSIX2_LOCALEDEF: ::c_int = 16;
++pub const USER_POSIX2_SW_DEV: ::c_int = 17;
++pub const USER_POSIX2_UPE: ::c_int = 18;
++pub const USER_STREAM_MAX: ::c_int = 19;
++pub const USER_TZNAME_MAX: ::c_int = 20;
++pub const USER_MAXID: ::c_int = 21;
++pub const CTL_DEBUG_NAME: ::c_int = 0;
++pub const CTL_DEBUG_VALUE: ::c_int = 1;
++pub const CTL_DEBUG_MAXID: ::c_int = 20;
++
++pub const PRIO_DARWIN_THREAD: ::c_int = 3;
++pub const PRIO_DARWIN_PROCESS: ::c_int = 4;
++pub const PRIO_DARWIN_BG: ::c_int = 0x1000;
++pub const PRIO_DARWIN_NONUI: ::c_int = 0x1001;
++
++pub const SEM_FAILED: *mut sem_t = -1isize as *mut ::sem_t;
++
++pub const SIGEV_NONE: ::c_int = 0;
++pub const SIGEV_SIGNAL: ::c_int = 1;
++pub const SIGEV_THREAD: ::c_int = 3;
++
++pub const AIO_CANCELED: ::c_int = 2;
++pub const AIO_NOTCANCELED: ::c_int = 4;
++pub const AIO_ALLDONE: ::c_int = 1;
++pub const AIO_LISTIO_MAX: ::c_int = 16;
++pub const LIO_NOP: ::c_int = 0;
++pub const LIO_WRITE: ::c_int = 2;
++pub const LIO_READ: ::c_int = 1;
++pub const LIO_WAIT: ::c_int = 2;
++pub const LIO_NOWAIT: ::c_int = 1;
++
++pub const WEXITED: ::c_int = 0x00000004;
++pub const WSTOPPED: ::c_int = 0x00000008;
++pub const WCONTINUED: ::c_int = 0x00000010;
++pub const WNOWAIT: ::c_int = 0x00000020;
++
++pub const P_ALL: idtype_t = 0;
++pub const P_PID: idtype_t = 1;
++pub const P_PGID: idtype_t = 2;
++
++pub const XATTR_NOFOLLOW: ::c_int = 0x0001;
++pub const XATTR_CREATE: ::c_int = 0x0002;
++pub const XATTR_REPLACE: ::c_int = 0x0004;
++pub const XATTR_NOSECURITY: ::c_int = 0x0008;
++pub const XATTR_NODEFAULT: ::c_int = 0x0010;
++pub const XATTR_SHOWCOMPRESSION: ::c_int = 0x0020;
++
++pub const NET_RT_IFLIST2: ::c_int = 0x0006;
++pub const RTM_IFINFO2: ::c_int = 0x0012;
++
++pub const KERN_PROCARGS2: ::c_int = 49;
++
++pub const PROC_PIDTASKALLINFO: ::c_int = 2;
++pub const PROC_PIDTASKINFO: ::c_int = 4;
++pub const PROC_PIDTHREADINFO: ::c_int = 5;
++pub const MAXCOMLEN: usize = 16;
++pub const MAXTHREADNAMESIZE: usize = 64;
++
++f! {
++    pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
++        status >> 8
++    }
++
++    pub fn _WSTATUS(status: ::c_int) -> ::c_int {
++        status & 0x7f
++    }
++
++    pub fn WIFCONTINUED(status: ::c_int) -> bool {
++        _WSTATUS(status) == _WSTOPPED && WSTOPSIG(status) == 0x13
++    }
++
++    pub fn WIFSIGNALED(status: ::c_int) -> bool {
++        _WSTATUS(status) != _WSTOPPED && _WSTATUS(status) != 0
++    }
++
++    pub fn WIFSTOPPED(status: ::c_int) -> bool {
++        _WSTATUS(status) == _WSTOPPED && WSTOPSIG(status) != 0x13
++    }
++}
++
++extern {
++    pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
++    pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
++    pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
++    pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
++    pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "aio_suspend$UNIX2003")]
++    pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
++                       timeout: *const ::timespec) -> ::c_int;
++    pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
++    pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
++                      nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
++
++    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
++
++    pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
++
++    pub fn getutxent() -> *mut utmpx;
++    pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
++    pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
++    pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
++    pub fn setutxent();
++    pub fn endutxent();
++    pub fn utmpxname(file: *const ::c_char) -> ::c_int;
++
++    pub fn getnameinfo(sa: *const ::sockaddr,
++                       salen: ::socklen_t,
++                       host: *mut ::c_char,
++                       hostlen: ::socklen_t,
++                       serv: *mut ::c_char,
++                       sevlen: ::socklen_t,
++                       flags: ::c_int) -> ::c_int;
++    pub fn mincore(addr: *const ::c_void, len: ::size_t,
++                   vec: *mut ::c_char) -> ::c_int;
++    pub fn sysctlnametomib(name: *const ::c_char,
++                           mibp: *mut ::c_int,
++                           sizep: *mut ::size_t)
++                           -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "mprotect$UNIX2003")]
++    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
++                    -> ::c_int;
++    pub fn shm_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::c_int;
++    pub fn sysctl(name: *mut ::c_int,
++                  namelen: ::c_uint,
++                  oldp: *mut ::c_void,
++                  oldlenp: *mut ::size_t,
++                  newp: *mut ::c_void,
++                  newlen: ::size_t)
++                  -> ::c_int;
++    pub fn sysctlbyname(name: *const ::c_char,
++                        oldp: *mut ::c_void,
++                        oldlenp: *mut ::size_t,
++                        newp: *mut ::c_void,
++                        newlen: ::size_t)
++                        -> ::c_int;
++    pub fn mach_absolute_time() -> u64;
++    pub fn mach_timebase_info(info: *mut ::mach_timebase_info) -> ::c_int;
++    pub fn pthread_setname_np(name: *const ::c_char) -> ::c_int;
++    pub fn pthread_get_stackaddr_np(thread: ::pthread_t) -> *mut ::c_void;
++    pub fn pthread_get_stacksize_np(thread: ::pthread_t) -> ::size_t;
++    pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
++                                       pshared: ::c_int) -> ::c_int;
++    pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
++                                       pshared: *mut ::c_int) -> ::c_int;
++    pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
++                                        pshared: ::c_int) -> ::c_int;
++    pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
++                                        pshared: *mut ::c_int) -> ::c_int;
++    pub fn pthread_rwlockattr_getpshared(attr: *const pthread_rwlockattr_t,
++                                         val: *mut ::c_int) -> ::c_int;
++    pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t,
++                                         val: ::c_int) -> ::c_int;
++    pub fn __error() -> *mut ::c_int;
++    pub fn backtrace(buf: *mut *mut ::c_void,
++                     sz: ::c_int) -> ::c_int;
++    #[cfg_attr(target_os = "macos", link_name = "statfs$INODE64")]
++    pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
++    #[cfg_attr(target_os = "macos", link_name = "fstatfs$INODE64")]
++    pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
++    pub fn kevent(kq: ::c_int,
++                  changelist: *const ::kevent,
++                  nchanges: ::c_int,
++                  eventlist: *mut ::kevent,
++                  nevents: ::c_int,
++                  timeout: *const ::timespec) -> ::c_int;
++    pub fn kevent64(kq: ::c_int,
++                    changelist: *const ::kevent64_s,
++                    nchanges: ::c_int,
++                    eventlist: *mut ::kevent64_s,
++                    nevents: ::c_int,
++                    flags: ::c_uint,
++                    timeout: *const ::timespec) -> ::c_int;
++    pub fn mount(src: *const ::c_char,
++                 target: *const ::c_char,
++                 flags: ::c_int,
++                 data: *mut ::c_void) -> ::c_int;
++    pub fn ptrace(requeset: ::c_int,
++                  pid: ::pid_t,
++                  addr: *mut ::c_char,
++                  data: ::c_int) -> ::c_int;
++    pub fn quotactl(special: *const ::c_char,
++                    cmd: ::c_int,
++                    id: ::c_int,
++                    data: *mut ::c_char) -> ::c_int;
++    pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int;
++    pub fn sendfile(fd: ::c_int,
++                    s: ::c_int,
++                    offset: ::off_t,
++                    len: *mut ::off_t,
++                    hdtr: *mut ::sf_hdtr,
++                    flags: ::c_int) -> ::c_int;
++    pub fn openpty(amaster: *mut ::c_int,
++                   aslave: *mut ::c_int,
++                   name: *mut ::c_char,
++                   termp: *mut termios,
++                   winp: *mut ::winsize) -> ::c_int;
++    pub fn forkpty(amaster: *mut ::c_int,
++                   name: *mut ::c_char,
++                   termp: *mut termios,
++                   winp: *mut ::winsize) -> ::pid_t;
++    pub fn duplocale(base: ::locale_t) -> ::locale_t;
++    pub fn freelocale(loc: ::locale_t) -> ::c_int;
++    pub fn localeconv_l(loc: ::locale_t) -> *mut lconv;
++    pub fn newlocale(mask: ::c_int,
++                     locale: *const ::c_char,
++                     base: ::locale_t) -> ::locale_t;
++    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
++    pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char;
++    pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
++    pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
++
++    pub fn getxattr(path: *const ::c_char, name: *const ::c_char,
++                    value: *mut ::c_void, size: ::size_t, position: u32,
++                    flags: ::c_int) -> ::ssize_t;
++    pub fn fgetxattr(filedes: ::c_int, name: *const ::c_char,
++                     value: *mut ::c_void, size: ::size_t, position: u32,
++                     flags: ::c_int) -> ::ssize_t;
++    pub fn setxattr(path: *const ::c_char, name: *const ::c_char,
++                    value: *const ::c_void, size: ::size_t, position: u32,
++                    flags: ::c_int) -> ::c_int;
++    pub fn fsetxattr(filedes: ::c_int, name: *const ::c_char,
++                     value: *const ::c_void, size: ::size_t, position: u32,
++                     flags: ::c_int) -> ::c_int;
++    pub fn listxattr(path: *const ::c_char, list: *mut ::c_char,
++                     size: ::size_t, flags: ::c_int) -> ::ssize_t;
++    pub fn flistxattr(filedes: ::c_int, list: *mut ::c_char,
++                      size: ::size_t, flags: ::c_int) -> ::ssize_t;
++    pub fn removexattr(path: *const ::c_char, name: *const ::c_char,
++                       flags: ::c_int) -> ::c_int;
++    pub fn fremovexattr(filedes: ::c_int, name: *const ::c_char,
++                        flags: ::c_int) -> ::c_int;
++
++    pub fn initgroups(user: *const ::c_char, basegroup: ::c_int) -> ::c_int;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "waitid$UNIX2003")]
++    pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
++                  options: ::c_int) -> ::c_int;
++    pub fn brk(addr: *const ::c_void) -> *mut ::c_void;
++    pub fn sbrk(increment: ::c_int) -> *mut ::c_void;
++    pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
++}
++
++cfg_if! {
++    if #[cfg(any(target_arch = "arm", target_arch = "x86"))] {
++        mod b32;
++        pub use self::b32::*;
++    } else if #[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))] {
++        mod b64;
++        pub use self::b64::*;
++    } else {
++        // Unknown target_arch
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c694b6e90c72264c6f96c291578ade30091f93d2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,477 @@@
++pub type clock_t = u64;
++pub type ino_t = u64;
++pub type nlink_t = u32;
++pub type blksize_t = i64;
++pub type clockid_t = ::c_ulong;
++
++pub type c_long = i64;
++pub type c_ulong = u64;
++pub type time_t = i64;
++pub type suseconds_t = i64;
++
++pub type uuid_t = ::uuid;
++
++pub type fsblkcnt_t = u64;
++pub type fsfilcnt_t = u64;
++
++pub type sem_t = *mut sem;
++
++pub enum sem {}
++
++s! {
++
++    pub struct exit_status {
++        pub e_termination: u16,
++        pub e_exit: u16
++    }
++
++    pub struct utmpx {
++        pub ut_name: [::c_char; 32],
++        pub ut_id: [::c_char; 4],
++
++        pub ut_line: [::c_char; 32],
++        pub ut_host: [::c_char; 256],
++
++        pub ut_unused: [u8; 16],
++        pub ut_session: u16,
++        pub ut_type: u16,
++        pub ut_pid: ::pid_t,
++        ut_exit: exit_status,
++        ut_ss: ::sockaddr_storage,
++        pub ut_tv: ::timeval,
++        pub ut_unused2: [u8; 16],
++    }
++
++    pub struct aiocb {
++        pub aio_fildes: ::c_int,
++        pub aio_offset: ::off_t,
++        pub aio_buf: *mut ::c_void,
++        pub aio_nbytes: ::size_t,
++        pub aio_sigevent: sigevent,
++        pub aio_lio_opcode: ::c_int,
++        pub aio_reqprio: ::c_int,
++        _aio_val: ::c_int,
++        _aio_err: ::c_int
++    }
++
++    pub struct dirent {
++        pub d_fileno: ::ino_t,
++        pub d_namlen: u16,
++        pub d_type: u8,
++        __unused1: u8,
++        __unused2: u32,
++        pub d_name: [::c_char; 256],
++    }
++
++    pub struct uuid {
++        pub time_low: u32,
++        pub time_mid: u16,
++        pub time_hi_and_version: u16,
++        pub clock_seq_hi_and_reserved: u8,
++        pub clock_seq_low: u8,
++        pub node: [u8; 6],
++    }
++
++    pub struct sigevent {
++        pub sigev_notify: ::c_int,
++        // The union is 8-byte in size, so it is aligned at a 8-byte offset.
++        #[cfg(target_pointer_width = "64")]
++        __unused1: ::c_int,
++        pub sigev_signo: ::c_int,       //actually a union
++        // pad the union
++        #[cfg(target_pointer_width = "64")]
++        __unused2: ::c_int,
++        pub sigev_value: ::sigval,
++        __unused3: *mut ::c_void        //actually a function pointer
++    }
++
++    pub struct statvfs {
++        pub f_bsize: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_favail: ::fsfilcnt_t,
++        pub f_fsid: ::c_ulong,
++        pub f_flag: ::c_ulong,
++        pub f_namemax: ::c_ulong,
++        pub f_owner: ::uid_t,
++        pub f_type: ::c_uint,
++        pub f_syncreads: u64,
++        pub f_syncwrites: u64,
++        pub f_asyncreads: u64,
++        pub f_asyncwrites: u64,
++        pub f_fsid_uuid: ::uuid_t,
++        pub f_uid_uuid: ::uuid_t,
++    }
++
++    pub struct stat {
++        pub st_ino: ::ino_t,
++        pub st_nlink: ::nlink_t,
++        pub st_dev: ::dev_t,
++        pub st_mode: ::mode_t,
++        pub st_padding1: ::uint16_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_size: ::off_t,
++        pub st_blocks: ::int64_t,
++        pub st_blksize: ::uint32_t,
++        pub st_flags: ::uint32_t,
++        pub st_gen: ::uint32_t,
++        pub st_lspare: ::int32_t,
++        pub st_qspare1: ::int64_t,
++        pub st_qspare2: ::int64_t,
++    }
++
++    pub struct if_data {
++        pub ifi_type: ::c_uchar,
++        pub ifi_physical: ::c_uchar,
++        pub ifi_addrlen: ::c_uchar,
++        pub ifi_hdrlen: ::c_uchar,
++        pub ifi_recvquota: ::c_uchar,
++        pub ifi_xmitquota: ::c_uchar,
++        pub ifi_mtu: ::c_ulong,
++        pub ifi_metric: ::c_ulong,
++        pub ifi_link_state: ::c_ulong,
++        pub ifi_baudrate: u64,
++        pub ifi_ipackets: ::c_ulong,
++        pub ifi_ierrors: ::c_ulong,
++        pub ifi_opackets: ::c_ulong,
++        pub ifi_oerrors: ::c_ulong,
++        pub ifi_collisions: ::c_ulong,
++        pub ifi_ibytes: ::c_ulong,
++        pub ifi_obytes: ::c_ulong,
++        pub ifi_imcasts: ::c_ulong,
++        pub ifi_omcasts: ::c_ulong,
++        pub ifi_iqdrops: ::c_ulong,
++        pub ifi_noproto: ::c_ulong,
++        pub ifi_hwassist: ::c_ulong,
++        pub ifi_oqdrops: ::c_ulong,
++        pub ifi_lastchange: ::timeval,
++    }
++
++    pub struct if_msghdr {
++        pub ifm_msglen: ::c_ushort,
++        pub ifm_version: ::c_uchar,
++        pub ifm_type: ::c_uchar,
++        pub ifm_addrs: ::c_int,
++        pub ifm_flags: ::c_int,
++        pub ifm_index: ::c_ushort,
++        pub ifm_data: if_data,
++    }
++}
++
++pub const RAND_MAX: ::c_int = 0x7fff_ffff;
++pub const PTHREAD_STACK_MIN: ::size_t = 16384;
++pub const SIGSTKSZ: ::size_t = 40960;
++pub const MADV_INVAL: ::c_int = 10;
++pub const O_CLOEXEC: ::c_int = 0x00020000;
++pub const O_DIRECTORY: ::c_int = 0x08000000;
++pub const F_GETLK: ::c_int = 7;
++pub const F_SETLK: ::c_int = 8;
++pub const F_SETLKW: ::c_int = 9;
++pub const ELAST: ::c_int = 99;
++pub const RLIMIT_POSIXLOCKS: ::c_int = 11;
++pub const RLIM_NLIMITS: ::rlim_t = 12;
++
++pub const Q_GETQUOTA: ::c_int = 0x300;
++pub const Q_SETQUOTA: ::c_int = 0x400;
++
++pub const CLOCK_REALTIME: clockid_t = 0;
++pub const CLOCK_VIRTUAL: clockid_t = 1;
++pub const CLOCK_PROF: clockid_t = 2;
++pub const CLOCK_MONOTONIC: clockid_t = 4;
++pub const CLOCK_UPTIME: clockid_t = 5;
++pub const CLOCK_UPTIME_PRECISE: clockid_t = 7;
++pub const CLOCK_UPTIME_FAST: clockid_t = 8;
++pub const CLOCK_REALTIME_PRECISE: clockid_t = 9;
++pub const CLOCK_REALTIME_FAST: clockid_t = 10;
++pub const CLOCK_MONOTONIC_PRECISE: clockid_t = 11;
++pub const CLOCK_MONOTONIC_FAST: clockid_t = 12;
++pub const CLOCK_SECOND: clockid_t = 13;
++pub const CLOCK_THREAD_CPUTIME_ID: clockid_t = 14;
++pub const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 15;
++
++pub const CTL_UNSPEC: ::c_int = 0;
++pub const CTL_KERN: ::c_int = 1;
++pub const CTL_VM: ::c_int = 2;
++pub const CTL_VFS: ::c_int = 3;
++pub const CTL_NET: ::c_int = 4;
++pub const CTL_DEBUG: ::c_int = 5;
++pub const CTL_HW: ::c_int = 6;
++pub const CTL_MACHDEP: ::c_int = 7;
++pub const CTL_USER: ::c_int = 8;
++pub const CTL_P1003_1B: ::c_int = 9;
++pub const CTL_LWKT: ::c_int = 10;
++pub const CTL_MAXID: ::c_int = 11;
++pub const KERN_OSTYPE: ::c_int = 1;
++pub const KERN_OSRELEASE: ::c_int = 2;
++pub const KERN_OSREV: ::c_int = 3;
++pub const KERN_VERSION: ::c_int = 4;
++pub const KERN_MAXVNODES: ::c_int = 5;
++pub const KERN_MAXPROC: ::c_int = 6;
++pub const KERN_MAXFILES: ::c_int = 7;
++pub const KERN_ARGMAX: ::c_int = 8;
++pub const KERN_SECURELVL: ::c_int = 9;
++pub const KERN_HOSTNAME: ::c_int = 10;
++pub const KERN_HOSTID: ::c_int = 11;
++pub const KERN_CLOCKRATE: ::c_int = 12;
++pub const KERN_VNODE: ::c_int = 13;
++pub const KERN_PROC: ::c_int = 14;
++pub const KERN_FILE: ::c_int = 15;
++pub const KERN_PROF: ::c_int = 16;
++pub const KERN_POSIX1: ::c_int = 17;
++pub const KERN_NGROUPS: ::c_int = 18;
++pub const KERN_JOB_CONTROL: ::c_int = 19;
++pub const KERN_SAVED_IDS: ::c_int = 20;
++pub const KERN_BOOTTIME: ::c_int = 21;
++pub const KERN_NISDOMAINNAME: ::c_int = 22;
++pub const KERN_UPDATEINTERVAL: ::c_int = 23;
++pub const KERN_OSRELDATE: ::c_int = 24;
++pub const KERN_NTP_PLL: ::c_int = 25;
++pub const KERN_BOOTFILE: ::c_int = 26;
++pub const KERN_MAXFILESPERPROC: ::c_int = 27;
++pub const KERN_MAXPROCPERUID: ::c_int = 28;
++pub const KERN_DUMPDEV: ::c_int = 29;
++pub const KERN_IPC: ::c_int = 30;
++pub const KERN_DUMMY: ::c_int = 31;
++pub const KERN_PS_STRINGS: ::c_int = 32;
++pub const KERN_USRSTACK: ::c_int = 33;
++pub const KERN_LOGSIGEXIT: ::c_int = 34;
++pub const KERN_IOV_MAX: ::c_int = 35;
++pub const KERN_MAXPOSIXLOCKSPERUID: ::c_int = 36;
++pub const KERN_MAXID: ::c_int = 37;
++pub const KERN_PROC_ALL: ::c_int = 0;
++pub const KERN_PROC_PID: ::c_int = 1;
++pub const KERN_PROC_PGRP: ::c_int = 2;
++pub const KERN_PROC_SESSION: ::c_int = 3;
++pub const KERN_PROC_TTY: ::c_int = 4;
++pub const KERN_PROC_UID: ::c_int = 5;
++pub const KERN_PROC_RUID: ::c_int = 6;
++pub const KERN_PROC_ARGS: ::c_int = 7;
++pub const KERN_PROC_CWD: ::c_int = 8;
++pub const KERN_PROC_PATHNAME: ::c_int = 9;
++pub const KERN_PROC_FLAGMASK: ::c_int = 0x10;
++pub const KERN_PROC_FLAG_LWP: ::c_int = 0x10;
++pub const KIPC_MAXSOCKBUF: ::c_int = 1;
++pub const KIPC_SOCKBUF_WASTE: ::c_int = 2;
++pub const KIPC_SOMAXCONN: ::c_int = 3;
++pub const KIPC_MAX_LINKHDR: ::c_int = 4;
++pub const KIPC_MAX_PROTOHDR: ::c_int = 5;
++pub const KIPC_MAX_HDR: ::c_int = 6;
++pub const KIPC_MAX_DATALEN: ::c_int = 7;
++pub const KIPC_MBSTAT: ::c_int = 8;
++pub const KIPC_NMBCLUSTERS: ::c_int = 9;
++pub const HW_MACHINE: ::c_int = 1;
++pub const HW_MODEL: ::c_int = 2;
++pub const HW_NCPU: ::c_int = 3;
++pub const HW_BYTEORDER: ::c_int = 4;
++pub const HW_PHYSMEM: ::c_int = 5;
++pub const HW_USERMEM: ::c_int = 6;
++pub const HW_PAGESIZE: ::c_int = 7;
++pub const HW_DISKNAMES: ::c_int = 8;
++pub const HW_DISKSTATS: ::c_int = 9;
++pub const HW_FLOATINGPT: ::c_int = 10;
++pub const HW_MACHINE_ARCH: ::c_int = 11;
++pub const HW_MACHINE_PLATFORM: ::c_int = 12;
++pub const HW_SENSORS: ::c_int = 13;
++pub const HW_MAXID: ::c_int = 14;
++pub const USER_CS_PATH: ::c_int = 1;
++pub const USER_BC_BASE_MAX: ::c_int = 2;
++pub const USER_BC_DIM_MAX: ::c_int = 3;
++pub const USER_BC_SCALE_MAX: ::c_int = 4;
++pub const USER_BC_STRING_MAX: ::c_int = 5;
++pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6;
++pub const USER_EXPR_NEST_MAX: ::c_int = 7;
++pub const USER_LINE_MAX: ::c_int = 8;
++pub const USER_RE_DUP_MAX: ::c_int = 9;
++pub const USER_POSIX2_VERSION: ::c_int = 10;
++pub const USER_POSIX2_C_BIND: ::c_int = 11;
++pub const USER_POSIX2_C_DEV: ::c_int = 12;
++pub const USER_POSIX2_CHAR_TERM: ::c_int = 13;
++pub const USER_POSIX2_FORT_DEV: ::c_int = 14;
++pub const USER_POSIX2_FORT_RUN: ::c_int = 15;
++pub const USER_POSIX2_LOCALEDEF: ::c_int = 16;
++pub const USER_POSIX2_SW_DEV: ::c_int = 17;
++pub const USER_POSIX2_UPE: ::c_int = 18;
++pub const USER_STREAM_MAX: ::c_int = 19;
++pub const USER_TZNAME_MAX: ::c_int = 20;
++pub const USER_MAXID: ::c_int = 21;
++pub const CTL_P1003_1B_ASYNCHRONOUS_IO: ::c_int = 1;
++pub const CTL_P1003_1B_MAPPED_FILES: ::c_int = 2;
++pub const CTL_P1003_1B_MEMLOCK: ::c_int = 3;
++pub const CTL_P1003_1B_MEMLOCK_RANGE: ::c_int = 4;
++pub const CTL_P1003_1B_MEMORY_PROTECTION: ::c_int = 5;
++pub const CTL_P1003_1B_MESSAGE_PASSING: ::c_int = 6;
++pub const CTL_P1003_1B_PRIORITIZED_IO: ::c_int = 7;
++pub const CTL_P1003_1B_PRIORITY_SCHEDULING: ::c_int = 8;
++pub const CTL_P1003_1B_REALTIME_SIGNALS: ::c_int = 9;
++pub const CTL_P1003_1B_SEMAPHORES: ::c_int = 10;
++pub const CTL_P1003_1B_FSYNC: ::c_int = 11;
++pub const CTL_P1003_1B_SHARED_MEMORY_OBJECTS: ::c_int = 12;
++pub const CTL_P1003_1B_SYNCHRONIZED_IO: ::c_int = 13;
++pub const CTL_P1003_1B_TIMERS: ::c_int = 14;
++pub const CTL_P1003_1B_AIO_LISTIO_MAX: ::c_int = 15;
++pub const CTL_P1003_1B_AIO_MAX: ::c_int = 16;
++pub const CTL_P1003_1B_AIO_PRIO_DELTA_MAX: ::c_int = 17;
++pub const CTL_P1003_1B_DELAYTIMER_MAX: ::c_int = 18;
++pub const CTL_P1003_1B_UNUSED1: ::c_int = 19;
++pub const CTL_P1003_1B_PAGESIZE: ::c_int = 20;
++pub const CTL_P1003_1B_RTSIG_MAX: ::c_int = 21;
++pub const CTL_P1003_1B_SEM_NSEMS_MAX: ::c_int = 22;
++pub const CTL_P1003_1B_SEM_VALUE_MAX: ::c_int = 23;
++pub const CTL_P1003_1B_SIGQUEUE_MAX: ::c_int = 24;
++pub const CTL_P1003_1B_TIMER_MAX: ::c_int = 25;
++pub const CTL_P1003_1B_MAXID: ::c_int = 26;
++
++pub const EVFILT_READ: ::int16_t = -1;
++pub const EVFILT_WRITE: ::int16_t = -2;
++pub const EVFILT_AIO: ::int16_t = -3;
++pub const EVFILT_VNODE: ::int16_t = -4;
++pub const EVFILT_PROC: ::int16_t = -5;
++pub const EVFILT_SIGNAL: ::int16_t = -6;
++pub const EVFILT_TIMER: ::int16_t = -7;
++pub const EVFILT_USER: ::int16_t = -9;
++pub const EVFILT_FS: ::int16_t = -10;
++
++pub const EV_ADD: ::uint16_t = 0x1;
++pub const EV_DELETE: ::uint16_t = 0x2;
++pub const EV_ENABLE: ::uint16_t = 0x4;
++pub const EV_DISABLE: ::uint16_t = 0x8;
++pub const EV_ONESHOT: ::uint16_t = 0x10;
++pub const EV_CLEAR: ::uint16_t = 0x20;
++pub const EV_RECEIPT: ::uint16_t = 0x40;
++pub const EV_DISPATCH: ::uint16_t = 0x80;
++pub const EV_NODATA: ::uint16_t = 0x1000;
++pub const EV_FLAG1: ::uint16_t = 0x2000;
++pub const EV_ERROR: ::uint16_t = 0x4000;
++pub const EV_EOF: ::uint16_t = 0x8000;
++pub const EV_SYSFLAGS: ::uint16_t = 0xf000;
++
++pub const NOTE_TRIGGER: ::uint32_t = 0x01000000;
++pub const NOTE_FFNOP: ::uint32_t = 0x00000000;
++pub const NOTE_FFAND: ::uint32_t = 0x40000000;
++pub const NOTE_FFOR: ::uint32_t = 0x80000000;
++pub const NOTE_FFCOPY: ::uint32_t = 0xc0000000;
++pub const NOTE_FFCTRLMASK: ::uint32_t = 0xc0000000;
++pub const NOTE_FFLAGSMASK: ::uint32_t = 0x00ffffff;
++pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
++pub const NOTE_OOB: ::uint32_t = 0x00000002;
++pub const NOTE_DELETE: ::uint32_t = 0x00000001;
++pub const NOTE_WRITE: ::uint32_t = 0x00000002;
++pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
++pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
++pub const NOTE_LINK: ::uint32_t = 0x00000010;
++pub const NOTE_RENAME: ::uint32_t = 0x00000020;
++pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
++pub const NOTE_EXIT: ::uint32_t = 0x80000000;
++pub const NOTE_FORK: ::uint32_t = 0x40000000;
++pub const NOTE_EXEC: ::uint32_t = 0x20000000;
++pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
++pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
++pub const NOTE_TRACK: ::uint32_t = 0x00000001;
++pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
++pub const NOTE_CHILD: ::uint32_t = 0x00000004;
++
++pub const SO_SNDSPACE: ::c_int = 0x100a;
++pub const SO_CPUHINT: ::c_int = 0x1030;
++
++pub const AF_BLUETOOTH: ::c_int = 33;
++pub const AF_MPLS: ::c_int = 34;
++pub const AF_IEEE80211: ::c_int = 35;
++pub const AF_MAX: ::c_int = 36;
++
++pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
++pub const PF_MAX: ::c_int = AF_MAX;
++
++pub const NET_RT_DUMP: ::c_int = 1;
++pub const NET_RT_FLAGS: ::c_int = 2;
++pub const NET_RT_IFLIST: ::c_int = 3;
++pub const NET_RT_MAXID: ::c_int = 4;
++
++pub const SOMAXOPT_SIZE: ::c_int = 65536;
++
++#[doc(hidden)]
++pub const NET_MAXID: ::c_int = AF_MAX;
++
++pub const MSG_UNUSED09: ::c_int = 0x00000200;
++pub const MSG_NOSIGNAL: ::c_int = 0x00000400;
++pub const MSG_SYNC: ::c_int = 0x00000800;
++pub const MSG_CMSG_CLOEXEC: ::c_int = 0x00001000;
++pub const MSG_FBLOCKING: ::c_int = 0x00010000;
++pub const MSG_FNONBLOCKING: ::c_int = 0x00020000;
++pub const MSG_FMASK: ::c_int = 0xFFFF0000;
++
++pub const EMPTY: ::c_short = 0;
++pub const RUN_LVL: ::c_short = 1;
++pub const BOOT_TIME: ::c_short = 2;
++pub const OLD_TIME: ::c_short = 3;
++pub const NEW_TIME: ::c_short = 4;
++pub const INIT_PROCESS: ::c_short = 5;
++pub const LOGIN_PROCESS: ::c_short = 6;
++pub const USER_PROCESS: ::c_short = 7;
++pub const DEAD_PROCESS: ::c_short = 8;
++
++pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
++pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
++pub const LC_MONETARY_MASK: ::c_int = (1 << 2);
++pub const LC_NUMERIC_MASK: ::c_int = (1 << 3);
++pub const LC_TIME_MASK: ::c_int = (1 << 4);
++pub const LC_MESSAGES_MASK: ::c_int = (1 << 5);
++pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
++                               | LC_CTYPE_MASK
++                               | LC_MESSAGES_MASK
++                               | LC_MONETARY_MASK
++                               | LC_NUMERIC_MASK
++                               | LC_TIME_MASK;
++
++pub const TIOCSIG: ::c_uint = 0x2000745f;
++pub const BTUARTDISC: ::c_int = 0x7;
++pub const TIOCDCDTIMESTAMP: ::c_uint = 0x40107458;
++pub const TIOCISPTMASTER: ::c_uint = 0x20007455;
++pub const TIOCMODG: ::c_uint = 0x40047403;
++pub const TIOCMODS: ::c_ulong = 0x80047404;
++pub const TIOCREMOTE: ::c_ulong = 0x80047469;
++
++// Constants used by "at" family of system calls.
++pub const AT_FDCWD:            ::c_int = 0xFFFAFDCD; // invalid file descriptor
++pub const AT_SYMLINK_NOFOLLOW: ::c_int = 1;
++pub const AT_REMOVEDIR:        ::c_int = 2;
++pub const AT_EACCESS:          ::c_int = 4;
++pub const AT_SYMLINK_FOLLOW:   ::c_int = 8;
++
++pub const VCHECKPT: usize = 19;
++
++pub const _PC_2_SYMLINKS: ::c_int = 22;
++pub const _PC_TIMESTAMP_RESOLUTION: ::c_int = 23;
++
++pub const _SC_V7_ILP32_OFF32: ::c_int = 122;
++pub const _SC_V7_ILP32_OFFBIG: ::c_int = 123;
++pub const _SC_V7_LP64_OFF64: ::c_int = 124;
++pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 125;
++pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 126;
++pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 127;
++
++extern {
++    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
++                    -> ::c_int;
++    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
++    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
++    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
++
++    pub fn setutxdb(_type: ::c_uint, file: *mut ::c_char) -> ::c_int;
++
++    pub fn aio_waitcomplete(iocbp: *mut *mut aiocb,
++                            timeout: *mut ::timespec) -> ::c_int;
++
++    pub fn freelocale(loc: ::locale_t);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a2da8452c4d341f0d43736c244226fd723b6f55d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++pub type c_long = i64;
++pub type c_ulong = u64;
++pub type time_t = i64;
++pub type suseconds_t = i64;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_size: ::off_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_blksize: ::blksize_t,
++        pub st_flags: ::fflags_t,
++        pub st_gen: ::uint32_t,
++        pub st_lspare: ::int32_t,
++        pub st_birthtime: ::time_t,
++        pub st_birthtime_nsec: ::c_long,
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e570e38bd9e7a9f3dac0eb3080d2d69523f34d0c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,595 @@@
++pub type fflags_t = u32;
++pub type clock_t = i32;
++pub type ino_t = u32;
++pub type lwpid_t = i32;
++pub type nlink_t = u16;
++pub type blksize_t = u32;
++pub type clockid_t = ::c_int;
++pub type sem_t = _sem;
++
++pub type fsblkcnt_t = ::uint64_t;
++pub type fsfilcnt_t = ::uint64_t;
++pub type idtype_t = ::c_uint;
++
++pub type key_t = ::c_long;
++pub type msglen_t = ::c_ulong;
++pub type msgqnum_t = ::c_ulong;
++
++s! {
++    pub struct utmpx {
++        pub ut_type: ::c_short,
++        pub ut_tv: ::timeval,
++        pub ut_id: [::c_char; 8],
++        pub ut_pid: ::pid_t,
++        pub ut_user: [::c_char; 32],
++        pub ut_line: [::c_char; 16],
++        pub ut_host: [::c_char; 128],
++        pub __ut_spare: [::c_char; 64],
++    }
++
++    pub struct aiocb {
++        pub aio_fildes: ::c_int,
++        pub aio_offset: ::off_t,
++        pub aio_buf: *mut ::c_void,
++        pub aio_nbytes: ::size_t,
++        __unused1: [::c_int; 2],
++        __unused2: *mut ::c_void,
++        pub aio_lio_opcode: ::c_int,
++        pub aio_reqprio: ::c_int,
++        // unused 3 through 5 are the __aiocb_private structure
++        __unused3: ::c_long,
++        __unused4: ::c_long,
++        __unused5: *mut ::c_void,
++        pub aio_sigevent: sigevent
++    }
++
++    pub struct dirent {
++        pub d_fileno: u32,
++        pub d_reclen: u16,
++        pub d_type: u8,
++        pub d_namlen: u8,
++        pub d_name: [::c_char; 256],
++    }
++
++    pub struct jail {
++        pub version: u32,
++        pub path: *mut ::c_char,
++        pub hostname: *mut ::c_char,
++        pub jailname: *mut ::c_char,
++        pub ip4s: ::c_uint,
++        pub ip6s: ::c_uint,
++        pub ip4: *mut ::in_addr,
++        pub ip6: *mut ::in6_addr,
++    }
++
++    pub struct sigevent {
++        pub sigev_notify: ::c_int,
++        pub sigev_signo: ::c_int,
++        pub sigev_value: ::sigval,
++        //The rest of the structure is actually a union.  We expose only
++        //sigev_notify_thread_id because it's the most useful union member.
++        pub sigev_notify_thread_id: ::lwpid_t,
++        #[cfg(target_pointer_width = "64")]
++        __unused1: ::c_int,
++        __unused2: [::c_long; 7]
++    }
++
++    pub struct statvfs {
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_favail: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_bsize: ::c_ulong,
++        pub f_flag: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_fsid: ::c_ulong,
++        pub f_namemax: ::c_ulong,
++    }
++
++    // internal structure has changed over time
++    pub struct _sem {
++        data: [u32; 4],
++    }
++
++    pub struct ipc_perm {
++        pub cuid: ::uid_t,
++        pub cgid: ::gid_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++        pub mode: ::mode_t,
++        pub seq: ::c_ushort,
++        pub key: ::key_t,
++    }
++
++    pub struct msqid_ds {
++        pub msg_perm: ::ipc_perm,
++        __unused1: *mut ::c_void,
++        __unused2: *mut ::c_void,
++        pub msg_cbytes: ::msglen_t,
++        pub msg_qnum: ::msgqnum_t,
++        pub msg_qbytes: ::msglen_t,
++        pub msg_lspid: ::pid_t,
++        pub msg_lrpid: ::pid_t,
++        pub msg_stime: ::time_t,
++        pub msg_rtime: ::time_t,
++        pub msg_ctime: ::time_t,
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_segsz: ::size_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_cpid: ::pid_t,
++        pub shm_nattch: ::c_int,
++        pub shm_atime: ::time_t,
++        pub shm_dtime: ::time_t,
++        pub shm_ctime: ::time_t,
++    }
++}
++
++pub const SIGEV_THREAD_ID: ::c_int = 4;
++
++pub const RAND_MAX: ::c_int = 0x7fff_fffd;
++pub const PTHREAD_STACK_MIN: ::size_t = 2048;
++pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 4;
++pub const SIGSTKSZ: ::size_t = 34816;
++pub const SF_NODISKIO: ::c_int = 0x00000001;
++pub const SF_MNOWAIT: ::c_int = 0x00000002;
++pub const SF_SYNC: ::c_int = 0x00000004;
++pub const O_CLOEXEC: ::c_int = 0x00100000;
++pub const O_DIRECTORY: ::c_int = 0x00020000;
++pub const O_EXEC: ::c_int = 0x00040000;
++pub const O_TTY_INIT: ::c_int = 0x00080000;
++pub const F_GETLK: ::c_int = 11;
++pub const F_SETLK: ::c_int = 12;
++pub const F_SETLKW: ::c_int = 13;
++pub const ELAST: ::c_int = 96;
++pub const RLIMIT_NPTS: ::c_int = 11;
++pub const RLIMIT_SWAP: ::c_int = 12;
++pub const RLIM_NLIMITS: ::rlim_t = 13;
++
++pub const Q_GETQUOTA: ::c_int = 0x700;
++pub const Q_SETQUOTA: ::c_int = 0x800;
++
++pub const POSIX_FADV_NORMAL: ::c_int = 0;
++pub const POSIX_FADV_RANDOM: ::c_int = 1;
++pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2;
++pub const POSIX_FADV_WILLNEED: ::c_int = 3;
++pub const POSIX_FADV_DONTNEED: ::c_int = 4;
++pub const POSIX_FADV_NOREUSE: ::c_int = 5;
++
++pub const EVFILT_READ: ::int16_t = -1;
++pub const EVFILT_WRITE: ::int16_t = -2;
++pub const EVFILT_AIO: ::int16_t = -3;
++pub const EVFILT_VNODE: ::int16_t = -4;
++pub const EVFILT_PROC: ::int16_t = -5;
++pub const EVFILT_SIGNAL: ::int16_t = -6;
++pub const EVFILT_TIMER: ::int16_t = -7;
++pub const EVFILT_FS: ::int16_t = -9;
++pub const EVFILT_LIO: ::int16_t = -10;
++pub const EVFILT_USER: ::int16_t = -11;
++
++pub const EV_ADD: ::uint16_t = 0x1;
++pub const EV_DELETE: ::uint16_t = 0x2;
++pub const EV_ENABLE: ::uint16_t = 0x4;
++pub const EV_DISABLE: ::uint16_t = 0x8;
++pub const EV_ONESHOT: ::uint16_t = 0x10;
++pub const EV_CLEAR: ::uint16_t = 0x20;
++pub const EV_RECEIPT: ::uint16_t = 0x40;
++pub const EV_DISPATCH: ::uint16_t = 0x80;
++pub const EV_DROP: ::uint16_t = 0x1000;
++pub const EV_FLAG1: ::uint16_t = 0x2000;
++pub const EV_ERROR: ::uint16_t = 0x4000;
++pub const EV_EOF: ::uint16_t = 0x8000;
++pub const EV_SYSFLAGS: ::uint16_t = 0xf000;
++
++pub const NOTE_TRIGGER: ::uint32_t = 0x01000000;
++pub const NOTE_FFNOP: ::uint32_t = 0x00000000;
++pub const NOTE_FFAND: ::uint32_t = 0x40000000;
++pub const NOTE_FFOR: ::uint32_t = 0x80000000;
++pub const NOTE_FFCOPY: ::uint32_t = 0xc0000000;
++pub const NOTE_FFCTRLMASK: ::uint32_t = 0xc0000000;
++pub const NOTE_FFLAGSMASK: ::uint32_t = 0x00ffffff;
++pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
++pub const NOTE_DELETE: ::uint32_t = 0x00000001;
++pub const NOTE_WRITE: ::uint32_t = 0x00000002;
++pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
++pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
++pub const NOTE_LINK: ::uint32_t = 0x00000010;
++pub const NOTE_RENAME: ::uint32_t = 0x00000020;
++pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
++pub const NOTE_EXIT: ::uint32_t = 0x80000000;
++pub const NOTE_FORK: ::uint32_t = 0x40000000;
++pub const NOTE_EXEC: ::uint32_t = 0x20000000;
++pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
++pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
++pub const NOTE_TRACK: ::uint32_t = 0x00000001;
++pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
++pub const NOTE_CHILD: ::uint32_t = 0x00000004;
++pub const NOTE_SECONDS: ::uint32_t = 0x00000001;
++pub const NOTE_MSECONDS: ::uint32_t = 0x00000002;
++pub const NOTE_USECONDS: ::uint32_t = 0x00000004;
++pub const NOTE_NSECONDS: ::uint32_t = 0x00000008;
++
++pub const MADV_PROTECT: ::c_int = 10;
++pub const RUSAGE_THREAD: ::c_int = 1;
++
++pub const CLOCK_REALTIME: clockid_t = 0;
++pub const CLOCK_VIRTUAL: clockid_t = 1;
++pub const CLOCK_PROF: clockid_t = 2;
++pub const CLOCK_MONOTONIC: clockid_t = 4;
++pub const CLOCK_UPTIME: clockid_t = 5;
++pub const CLOCK_UPTIME_PRECISE: clockid_t = 7;
++pub const CLOCK_UPTIME_FAST: clockid_t = 8;
++pub const CLOCK_REALTIME_PRECISE: clockid_t = 9;
++pub const CLOCK_REALTIME_FAST: clockid_t = 10;
++pub const CLOCK_MONOTONIC_PRECISE: clockid_t = 11;
++pub const CLOCK_MONOTONIC_FAST: clockid_t = 12;
++pub const CLOCK_SECOND: clockid_t = 13;
++pub const CLOCK_THREAD_CPUTIME_ID: clockid_t = 14;
++pub const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 15;
++
++pub const CTL_UNSPEC: ::c_int = 0;
++pub const CTL_KERN: ::c_int = 1;
++pub const CTL_VM: ::c_int = 2;
++pub const CTL_VFS: ::c_int = 3;
++pub const CTL_NET: ::c_int = 4;
++pub const CTL_DEBUG: ::c_int = 5;
++pub const CTL_HW: ::c_int = 6;
++pub const CTL_MACHDEP: ::c_int = 7;
++pub const CTL_USER: ::c_int = 8;
++pub const CTL_P1003_1B: ::c_int = 9;
++pub const KERN_OSTYPE: ::c_int = 1;
++pub const KERN_OSRELEASE: ::c_int = 2;
++pub const KERN_OSREV: ::c_int = 3;
++pub const KERN_VERSION: ::c_int = 4;
++pub const KERN_MAXVNODES: ::c_int = 5;
++pub const KERN_MAXPROC: ::c_int = 6;
++pub const KERN_MAXFILES: ::c_int = 7;
++pub const KERN_ARGMAX: ::c_int = 8;
++pub const KERN_SECURELVL: ::c_int = 9;
++pub const KERN_HOSTNAME: ::c_int = 10;
++pub const KERN_HOSTID: ::c_int = 11;
++pub const KERN_CLOCKRATE: ::c_int = 12;
++pub const KERN_VNODE: ::c_int = 13;
++pub const KERN_PROC: ::c_int = 14;
++pub const KERN_FILE: ::c_int = 15;
++pub const KERN_PROF: ::c_int = 16;
++pub const KERN_POSIX1: ::c_int = 17;
++pub const KERN_NGROUPS: ::c_int = 18;
++pub const KERN_JOB_CONTROL: ::c_int = 19;
++pub const KERN_SAVED_IDS: ::c_int = 20;
++pub const KERN_BOOTTIME: ::c_int = 21;
++pub const KERN_NISDOMAINNAME: ::c_int = 22;
++pub const KERN_UPDATEINTERVAL: ::c_int = 23;
++pub const KERN_OSRELDATE: ::c_int = 24;
++pub const KERN_NTP_PLL: ::c_int = 25;
++pub const KERN_BOOTFILE: ::c_int = 26;
++pub const KERN_MAXFILESPERPROC: ::c_int = 27;
++pub const KERN_MAXPROCPERUID: ::c_int = 28;
++pub const KERN_DUMPDEV: ::c_int = 29;
++pub const KERN_IPC: ::c_int = 30;
++pub const KERN_DUMMY: ::c_int = 31;
++pub const KERN_PS_STRINGS: ::c_int = 32;
++pub const KERN_USRSTACK: ::c_int = 33;
++pub const KERN_LOGSIGEXIT: ::c_int = 34;
++pub const KERN_IOV_MAX: ::c_int = 35;
++pub const KERN_HOSTUUID: ::c_int = 36;
++pub const KERN_ARND: ::c_int = 37;
++pub const KERN_PROC_ALL: ::c_int = 0;
++pub const KERN_PROC_PID: ::c_int = 1;
++pub const KERN_PROC_PGRP: ::c_int = 2;
++pub const KERN_PROC_SESSION: ::c_int = 3;
++pub const KERN_PROC_TTY: ::c_int = 4;
++pub const KERN_PROC_UID: ::c_int = 5;
++pub const KERN_PROC_RUID: ::c_int = 6;
++pub const KERN_PROC_ARGS: ::c_int = 7;
++pub const KERN_PROC_PROC: ::c_int = 8;
++pub const KERN_PROC_SV_NAME: ::c_int = 9;
++pub const KERN_PROC_RGID: ::c_int = 10;
++pub const KERN_PROC_GID: ::c_int = 11;
++pub const KERN_PROC_PATHNAME: ::c_int = 12;
++pub const KERN_PROC_OVMMAP: ::c_int = 13;
++pub const KERN_PROC_OFILEDESC: ::c_int = 14;
++pub const KERN_PROC_KSTACK: ::c_int = 15;
++pub const KERN_PROC_INC_THREAD: ::c_int = 0x10;
++pub const KERN_PROC_VMMAP: ::c_int = 32;
++pub const KERN_PROC_FILEDESC: ::c_int = 33;
++pub const KERN_PROC_GROUPS: ::c_int = 34;
++pub const KERN_PROC_ENV: ::c_int = 35;
++pub const KERN_PROC_AUXV: ::c_int = 36;
++pub const KERN_PROC_RLIMIT: ::c_int = 37;
++pub const KERN_PROC_PS_STRINGS: ::c_int = 38;
++pub const KERN_PROC_UMASK: ::c_int = 39;
++pub const KERN_PROC_OSREL: ::c_int = 40;
++pub const KERN_PROC_SIGTRAMP: ::c_int = 41;
++pub const KIPC_MAXSOCKBUF: ::c_int = 1;
++pub const KIPC_SOCKBUF_WASTE: ::c_int = 2;
++pub const KIPC_SOMAXCONN: ::c_int = 3;
++pub const KIPC_MAX_LINKHDR: ::c_int = 4;
++pub const KIPC_MAX_PROTOHDR: ::c_int = 5;
++pub const KIPC_MAX_HDR: ::c_int = 6;
++pub const KIPC_MAX_DATALEN: ::c_int = 7;
++pub const HW_MACHINE: ::c_int = 1;
++pub const HW_MODEL: ::c_int = 2;
++pub const HW_NCPU: ::c_int = 3;
++pub const HW_BYTEORDER: ::c_int = 4;
++pub const HW_PHYSMEM: ::c_int = 5;
++pub const HW_USERMEM: ::c_int = 6;
++pub const HW_PAGESIZE: ::c_int = 7;
++pub const HW_DISKNAMES: ::c_int = 8;
++pub const HW_DISKSTATS: ::c_int = 9;
++pub const HW_FLOATINGPT: ::c_int = 10;
++pub const HW_MACHINE_ARCH: ::c_int = 11;
++pub const HW_REALMEM: ::c_int = 12;
++pub const USER_CS_PATH: ::c_int = 1;
++pub const USER_BC_BASE_MAX: ::c_int = 2;
++pub const USER_BC_DIM_MAX: ::c_int = 3;
++pub const USER_BC_SCALE_MAX: ::c_int = 4;
++pub const USER_BC_STRING_MAX: ::c_int = 5;
++pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6;
++pub const USER_EXPR_NEST_MAX: ::c_int = 7;
++pub const USER_LINE_MAX: ::c_int = 8;
++pub const USER_RE_DUP_MAX: ::c_int = 9;
++pub const USER_POSIX2_VERSION: ::c_int = 10;
++pub const USER_POSIX2_C_BIND: ::c_int = 11;
++pub const USER_POSIX2_C_DEV: ::c_int = 12;
++pub const USER_POSIX2_CHAR_TERM: ::c_int = 13;
++pub const USER_POSIX2_FORT_DEV: ::c_int = 14;
++pub const USER_POSIX2_FORT_RUN: ::c_int = 15;
++pub const USER_POSIX2_LOCALEDEF: ::c_int = 16;
++pub const USER_POSIX2_SW_DEV: ::c_int = 17;
++pub const USER_POSIX2_UPE: ::c_int = 18;
++pub const USER_STREAM_MAX: ::c_int = 19;
++pub const USER_TZNAME_MAX: ::c_int = 20;
++pub const CTL_P1003_1B_ASYNCHRONOUS_IO: ::c_int = 1;
++pub const CTL_P1003_1B_MAPPED_FILES: ::c_int = 2;
++pub const CTL_P1003_1B_MEMLOCK: ::c_int = 3;
++pub const CTL_P1003_1B_MEMLOCK_RANGE: ::c_int = 4;
++pub const CTL_P1003_1B_MEMORY_PROTECTION: ::c_int = 5;
++pub const CTL_P1003_1B_MESSAGE_PASSING: ::c_int = 6;
++pub const CTL_P1003_1B_PRIORITIZED_IO: ::c_int = 7;
++pub const CTL_P1003_1B_PRIORITY_SCHEDULING: ::c_int = 8;
++pub const CTL_P1003_1B_REALTIME_SIGNALS: ::c_int = 9;
++pub const CTL_P1003_1B_SEMAPHORES: ::c_int = 10;
++pub const CTL_P1003_1B_FSYNC: ::c_int = 11;
++pub const CTL_P1003_1B_SHARED_MEMORY_OBJECTS: ::c_int = 12;
++pub const CTL_P1003_1B_SYNCHRONIZED_IO: ::c_int = 13;
++pub const CTL_P1003_1B_TIMERS: ::c_int = 14;
++pub const CTL_P1003_1B_AIO_LISTIO_MAX: ::c_int = 15;
++pub const CTL_P1003_1B_AIO_MAX: ::c_int = 16;
++pub const CTL_P1003_1B_AIO_PRIO_DELTA_MAX: ::c_int = 17;
++pub const CTL_P1003_1B_DELAYTIMER_MAX: ::c_int = 18;
++pub const CTL_P1003_1B_MQ_OPEN_MAX: ::c_int = 19;
++pub const CTL_P1003_1B_PAGESIZE: ::c_int = 20;
++pub const CTL_P1003_1B_RTSIG_MAX: ::c_int = 21;
++pub const CTL_P1003_1B_SEM_NSEMS_MAX: ::c_int = 22;
++pub const CTL_P1003_1B_SEM_VALUE_MAX: ::c_int = 23;
++pub const CTL_P1003_1B_SIGQUEUE_MAX: ::c_int = 24;
++pub const CTL_P1003_1B_TIMER_MAX: ::c_int = 25;
++pub const TIOCGPTN: ::c_uint = 0x4004740f;
++pub const TIOCPTMASTER: ::c_uint = 0x2000741c;
++pub const TIOCSIG: ::c_uint = 0x2004745f;
++pub const TIOCM_DCD: ::c_int = 0x40;
++pub const H4DISC: ::c_int = 0x7;
++
++pub const JAIL_API_VERSION: u32 = 2;
++pub const JAIL_CREATE: ::c_int = 0x01;
++pub const JAIL_UPDATE: ::c_int = 0x02;
++pub const JAIL_ATTACH: ::c_int = 0x04;
++pub const JAIL_DYING: ::c_int = 0x08;
++pub const JAIL_SET_MASK: ::c_int = 0x0f;
++pub const JAIL_GET_MASK: ::c_int = 0x08;
++pub const JAIL_SYS_DISABLE: ::c_int = 0;
++pub const JAIL_SYS_NEW: ::c_int = 1;
++pub const JAIL_SYS_INHERIT: ::c_int = 2;
++
++pub const SO_BINTIME: ::c_int = 0x2000;
++pub const SO_NO_OFFLOAD: ::c_int = 0x4000;
++pub const SO_NO_DDP: ::c_int = 0x8000;
++pub const SO_LABEL: ::c_int = 0x1009;
++pub const SO_PEERLABEL: ::c_int = 0x1010;
++pub const SO_LISTENQLIMIT: ::c_int = 0x1011;
++pub const SO_LISTENQLEN: ::c_int = 0x1012;
++pub const SO_LISTENINCQLEN: ::c_int = 0x1013;
++pub const SO_SETFIB: ::c_int = 0x1014;
++pub const SO_USER_COOKIE: ::c_int = 0x1015;
++pub const SO_PROTOCOL: ::c_int = 0x1016;
++pub const SO_PROTOTYPE: ::c_int = SO_PROTOCOL;
++pub const SO_VENDOR: ::c_int = 0x80000000;
++
++pub const AF_SLOW: ::c_int = 33;
++pub const AF_SCLUSTER: ::c_int = 34;
++pub const AF_ARP: ::c_int = 35;
++pub const AF_BLUETOOTH: ::c_int = 36;
++pub const AF_IEEE80211: ::c_int = 37;
++pub const AF_INET_SDP: ::c_int = 40;
++pub const AF_INET6_SDP: ::c_int = 42;
++#[doc(hidden)]
++pub const AF_MAX: ::c_int = 42;
++
++pub const IPPROTO_DIVERT: ::c_int = 258;
++
++pub const PF_SLOW: ::c_int = AF_SLOW;
++pub const PF_SCLUSTER: ::c_int = AF_SCLUSTER;
++pub const PF_ARP: ::c_int = AF_ARP;
++pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
++pub const PF_IEEE80211: ::c_int = AF_IEEE80211;
++pub const PF_INET_SDP: ::c_int = AF_INET_SDP;
++pub const PF_INET6_SDP: ::c_int = AF_INET6_SDP;
++#[doc(hidden)]
++pub const PF_MAX: ::c_int = AF_MAX;
++
++pub const NET_RT_DUMP: ::c_int = 1;
++pub const NET_RT_FLAGS: ::c_int = 2;
++pub const NET_RT_IFLIST: ::c_int = 3;
++pub const NET_RT_IFMALIST: ::c_int = 4;
++pub const NET_RT_IFLISTL: ::c_int = 5;
++
++// System V IPC
++pub const IPC_PRIVATE: ::key_t = 0;
++pub const IPC_CREAT: ::c_int = 0o1000;
++pub const IPC_EXCL: ::c_int = 0o2000;
++pub const IPC_NOWAIT: ::c_int = 0o4000;
++pub const IPC_RMID: ::c_int = 0;
++pub const IPC_SET: ::c_int = 1;
++pub const IPC_STAT: ::c_int = 2;
++pub const IPC_INFO: ::c_int = 3;
++pub const IPC_R : ::c_int = 0o400;
++pub const IPC_W : ::c_int = 0o200;
++pub const IPC_M : ::c_int = 0o10000;
++pub const MSG_NOERROR: ::c_int = 0o10000;
++pub const SHM_RDONLY: ::c_int = 0o10000;
++pub const SHM_RND: ::c_int = 0o20000;
++pub const SHM_R: ::c_int = 0o400;
++pub const SHM_W: ::c_int = 0o200;
++pub const SHM_LOCK: ::c_int = 11;
++pub const SHM_UNLOCK: ::c_int = 12;
++pub const SHM_STAT: ::c_int = 13;
++pub const SHM_INFO: ::c_int = 14;
++
++// The *_MAXID constants never should've been used outside of the
++// FreeBSD base system.  And with the exception of CTL_P1003_1B_MAXID,
++// they were all removed in svn r262489.  They remain here for backwards
++// compatibility only, and are scheduled to be removed in libc 1.0.0.
++#[doc(hidden)]
++pub const NET_MAXID: ::c_int = AF_MAX;
++#[doc(hidden)]
++pub const CTL_MAXID: ::c_int = 10;
++#[doc(hidden)]
++pub const KERN_MAXID: ::c_int = 38;
++#[doc(hidden)]
++pub const HW_MAXID: ::c_int = 13;
++#[doc(hidden)]
++pub const USER_MAXID: ::c_int = 21;
++#[doc(hidden)]
++pub const CTL_P1003_1B_MAXID: ::c_int = 26;
++
++pub const MSG_NOTIFICATION: ::c_int = 0x00002000;
++pub const MSG_NBIO: ::c_int = 0x00004000;
++pub const MSG_COMPAT: ::c_int = 0x00008000;
++pub const MSG_CMSG_CLOEXEC: ::c_int = 0x00040000;
++pub const MSG_NOSIGNAL: ::c_int = 0x20000;
++
++pub const EMPTY: ::c_short = 0;
++pub const BOOT_TIME: ::c_short = 1;
++pub const OLD_TIME: ::c_short = 2;
++pub const NEW_TIME: ::c_short = 3;
++pub const USER_PROCESS: ::c_short = 4;
++pub const INIT_PROCESS: ::c_short = 5;
++pub const LOGIN_PROCESS: ::c_short = 6;
++pub const DEAD_PROCESS: ::c_short = 7;
++pub const SHUTDOWN_TIME: ::c_short = 8;
++
++pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
++pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
++pub const LC_MESSAGES_MASK: ::c_int = (1 << 2);
++pub const LC_MONETARY_MASK: ::c_int = (1 << 3);
++pub const LC_NUMERIC_MASK: ::c_int = (1 << 4);
++pub const LC_TIME_MASK: ::c_int = (1 << 5);
++pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
++                               | LC_CTYPE_MASK
++                               | LC_MESSAGES_MASK
++                               | LC_MONETARY_MASK
++                               | LC_NUMERIC_MASK
++                               | LC_TIME_MASK;
++
++pub const WSTOPPED: ::c_int = 2; // same as WUNTRACED
++pub const WCONTINUED: ::c_int = 4;
++pub const WNOWAIT: ::c_int = 8;
++pub const WEXITED: ::c_int = 16;
++pub const WTRAPPED: ::c_int = 32;
++
++// FreeBSD defines a great many more of these, we only expose the
++// standardized ones.
++pub const P_PID: idtype_t = 0;
++pub const P_PGID: idtype_t = 2;
++pub const P_ALL: idtype_t = 7;
++
++pub const B460800: ::speed_t = 460800;
++pub const B921600: ::speed_t = 921600;
++
++pub const AT_FDCWD: ::c_int = -100;
++pub const AT_EACCESS: ::c_int = 0x100;
++pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x200;
++pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
++pub const AT_REMOVEDIR: ::c_int = 0x800;
++
++pub const TABDLY: ::tcflag_t = 0x00000004;
++pub const TAB0: ::tcflag_t = 0x00000000;
++pub const TAB3: ::tcflag_t = 0x00000004;
++
++pub const _PC_ACL_NFS4: ::c_int = 64;
++
++pub const _SC_CPUSET_SIZE: ::c_int = 122;
++
++extern {
++    pub fn __error() -> *mut ::c_int;
++
++    pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
++                    -> ::c_int;
++
++    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
++    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
++    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
++
++    pub fn jail(jail: *mut ::jail) -> ::c_int;
++    pub fn jail_attach(jid: ::c_int) -> ::c_int;
++    pub fn jail_remove(jid: ::c_int) -> ::c_int;
++    pub fn jail_get(iov: *mut ::iovec, niov: ::c_uint, flags: ::c_int)
++                    -> ::c_int;
++    pub fn jail_set(iov: *mut ::iovec, niov: ::c_uint, flags: ::c_int)
++                    -> ::c_int;
++
++    pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
++                           len: ::off_t) -> ::c_int;
++    pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t,
++                         advise: ::c_int) -> ::c_int;
++    pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
++    pub fn mkostemps(template: *mut ::c_char,
++                     suffixlen: ::c_int,
++                     flags: ::c_int) -> ::c_int;
++
++    pub fn getutxuser(user: *const ::c_char) -> *mut utmpx;
++    pub fn setutxdb(_type: ::c_int, file: *const ::c_char) -> ::c_int;
++
++    pub fn aio_waitcomplete(iocbp: *mut *mut aiocb,
++                            timeout: *mut ::timespec) -> ::ssize_t;
++
++    pub fn freelocale(loc: ::locale_t) -> ::c_int;
++    pub fn waitid(idtype: idtype_t, id: ::id_t, infop: *mut ::siginfo_t,
++                  options: ::c_int) -> ::c_int;
++
++    pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t;
++    pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int;
++    pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void,
++        shmflg: ::c_int) -> *mut ::c_void;
++    pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int;
++    pub fn shmctl(shmid: ::c_int, cmd: ::c_int,
++        buf: *mut ::shmid_ds) -> ::c_int;
++    pub fn msgctl(msqid: ::c_int, cmd: ::c_int,
++        buf: *mut ::msqid_ds) -> ::c_int;
++    pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int;
++    pub fn msgrcv(msqid: ::c_int, msgp: *mut ::c_void, msgsz: ::size_t,
++        msgtyp: ::c_long, msgflg: ::c_int) -> ::c_int;
++    pub fn msgsnd(msqid: ::c_int, msgp: *const ::c_void, msgsz: ::size_t,
++        msgflg: ::c_int) -> ::c_int;
++    pub fn cfmakesane(termios: *mut ::termios);
++}
++
++cfg_if! {
++    if #[cfg(target_arch = "x86")] {
++        mod x86;
++        pub use self::x86::*;
++    } else if #[cfg(target_arch = "x86_64")] {
++        mod x86_64;
++        pub use self::x86_64::*;
++    } else if #[cfg(target_arch = "aarch64")] {
++        mod aarch64;
++        pub use self::aarch64::*;
++    } else {
++        // Unknown target_arch
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8a5e5f9fb8d28fb9b624e02af35b244b95a4f7c0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,31 @@@
++pub type c_long = i32;
++pub type c_ulong = u32;
++pub type time_t = i32;
++pub type suseconds_t = i32;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_size: ::off_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_blksize: ::blksize_t,
++        pub st_flags: ::fflags_t,
++        pub st_gen: ::uint32_t,
++        pub st_lspare: ::int32_t,
++        pub st_birthtime: ::time_t,
++        pub st_birthtime_nsec: ::c_long,
++        __unused: [u8; 8],
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a2da8452c4d341f0d43736c244226fd723b6f55d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++pub type c_long = i64;
++pub type c_ulong = u64;
++pub type time_t = i64;
++pub type suseconds_t = i64;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_size: ::off_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_blksize: ::blksize_t,
++        pub st_flags: ::fflags_t,
++        pub st_gen: ::uint32_t,
++        pub st_lspare: ::int32_t,
++        pub st_birthtime: ::time_t,
++        pub st_birthtime_nsec: ::c_long,
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..44c9e004e6c2b3cace7ef366e7171cfa5326ae50
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1108 @@@
++pub type dev_t = u32;
++pub type mode_t = u16;
++pub type pthread_attr_t = *mut ::c_void;
++pub type rlim_t = i64;
++pub type pthread_mutex_t = *mut ::c_void;
++pub type pthread_mutexattr_t = *mut ::c_void;
++pub type pthread_cond_t = *mut ::c_void;
++pub type pthread_condattr_t = *mut ::c_void;
++pub type pthread_rwlock_t = *mut ::c_void;
++pub type pthread_rwlockattr_t = *mut ::c_void;
++pub type pthread_key_t = ::c_int;
++pub type tcflag_t = ::c_uint;
++pub type speed_t = ::c_uint;
++pub type nl_item = ::c_int;
++pub type id_t = i64;
++
++pub enum timezone {}
++
++s! {
++    pub struct glob_t {
++        pub gl_pathc:  ::size_t,
++        pub gl_matchc: ::size_t,
++        pub gl_offs:   ::size_t,
++        pub gl_flags:  ::c_int,
++        pub gl_pathv:  *mut *mut ::c_char,
++        __unused3: *mut ::c_void,
++        __unused4: *mut ::c_void,
++        __unused5: *mut ::c_void,
++        __unused6: *mut ::c_void,
++        __unused7: *mut ::c_void,
++        __unused8: *mut ::c_void,
++    }
++
++    pub struct kevent {
++        pub ident: ::uintptr_t,
++        pub filter: ::c_short,
++        pub flags: ::c_ushort,
++        pub fflags: ::c_uint,
++        pub data: ::intptr_t,
++        pub udata: *mut ::c_void,
++    }
++
++    pub struct sockaddr_storage {
++        pub ss_len: u8,
++        pub ss_family: ::sa_family_t,
++        __ss_pad1: [u8; 6],
++        __ss_align: i64,
++        __ss_pad2: [u8; 112],
++    }
++
++    pub struct addrinfo {
++        pub ai_flags: ::c_int,
++        pub ai_family: ::c_int,
++        pub ai_socktype: ::c_int,
++        pub ai_protocol: ::c_int,
++        pub ai_addrlen: ::socklen_t,
++        pub ai_canonname: *mut ::c_char,
++        pub ai_addr: *mut ::sockaddr,
++        pub ai_next: *mut addrinfo,
++    }
++
++    pub struct sigset_t {
++        bits: [u32; 4],
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_errno: ::c_int,
++        pub si_code: ::c_int,
++        pub si_pid: ::pid_t,
++        pub si_uid: ::uid_t,
++        pub si_status: ::c_int,
++        pub si_addr: *mut ::c_void,
++        _pad: [::c_int; 12],
++    }
++
++    pub struct sigaction {
++        pub sa_sigaction: ::sighandler_t,
++        pub sa_flags: ::c_int,
++        pub sa_mask: sigset_t,
++    }
++
++    pub struct stack_t {
++        // In FreeBSD 11 and later, ss_sp is actually a void*
++        pub ss_sp: *mut ::c_char,
++        pub ss_size: ::size_t,
++        pub ss_flags: ::c_int,
++    }
++
++    pub struct sched_param {
++        pub sched_priority: ::c_int,
++    }
++
++    pub struct Dl_info {
++        pub dli_fname: *const ::c_char,
++        pub dli_fbase: *mut ::c_void,
++        pub dli_sname: *const ::c_char,
++        pub dli_saddr: *mut ::c_void,
++    }
++
++    pub struct sockaddr_in {
++        pub sin_len: u8,
++        pub sin_family: ::sa_family_t,
++        pub sin_port: ::in_port_t,
++        pub sin_addr: ::in_addr,
++        pub sin_zero: [::c_char; 8],
++    }
++
++    pub struct termios {
++        pub c_iflag: ::tcflag_t,
++        pub c_oflag: ::tcflag_t,
++        pub c_cflag: ::tcflag_t,
++        pub c_lflag: ::tcflag_t,
++        pub c_cc: [::cc_t; ::NCCS],
++        pub c_ispeed: ::speed_t,
++        pub c_ospeed: ::speed_t,
++    }
++
++    pub struct flock {
++        pub l_start: ::off_t,
++        pub l_len: ::off_t,
++        pub l_pid: ::pid_t,
++        pub l_type: ::c_short,
++        pub l_whence: ::c_short,
++        #[cfg(not(target_os = "dragonfly"))]
++        pub l_sysid: ::c_int,
++    }
++
++    pub struct sf_hdtr {
++        pub headers: *mut ::iovec,
++        pub hdr_cnt: ::c_int,
++        pub trailers: *mut ::iovec,
++        pub trl_cnt: ::c_int,
++    }
++
++    pub struct lconv {
++        pub decimal_point: *mut ::c_char,
++        pub thousands_sep: *mut ::c_char,
++        pub grouping: *mut ::c_char,
++        pub int_curr_symbol: *mut ::c_char,
++        pub currency_symbol: *mut ::c_char,
++        pub mon_decimal_point: *mut ::c_char,
++        pub mon_thousands_sep: *mut ::c_char,
++        pub mon_grouping: *mut ::c_char,
++        pub positive_sign: *mut ::c_char,
++        pub negative_sign: *mut ::c_char,
++        pub int_frac_digits: ::c_char,
++        pub frac_digits: ::c_char,
++        pub p_cs_precedes: ::c_char,
++        pub p_sep_by_space: ::c_char,
++        pub n_cs_precedes: ::c_char,
++        pub n_sep_by_space: ::c_char,
++        pub p_sign_posn: ::c_char,
++        pub n_sign_posn: ::c_char,
++        pub int_p_cs_precedes: ::c_char,
++        pub int_n_cs_precedes: ::c_char,
++        pub int_p_sep_by_space: ::c_char,
++        pub int_n_sep_by_space: ::c_char,
++        pub int_p_sign_posn: ::c_char,
++        pub int_n_sign_posn: ::c_char,
++    }
++}
++
++pub const AIO_LISTIO_MAX: ::c_int = 16;
++pub const AIO_CANCELED: ::c_int = 1;
++pub const AIO_NOTCANCELED: ::c_int = 2;
++pub const AIO_ALLDONE: ::c_int = 3;
++pub const LIO_NOP: ::c_int = 0;
++pub const LIO_WRITE: ::c_int = 1;
++pub const LIO_READ: ::c_int = 2;
++pub const LIO_WAIT: ::c_int = 1;
++pub const LIO_NOWAIT: ::c_int = 0;
++
++pub const SIGEV_NONE: ::c_int = 0;
++pub const SIGEV_SIGNAL: ::c_int = 1;
++pub const SIGEV_THREAD: ::c_int = 2;
++pub const SIGEV_KEVENT: ::c_int = 3;
++
++pub const CODESET: ::nl_item = 0;
++pub const D_T_FMT: ::nl_item = 1;
++pub const D_FMT: ::nl_item = 2;
++pub const T_FMT: ::nl_item = 3;
++pub const T_FMT_AMPM: ::nl_item = 4;
++pub const AM_STR: ::nl_item = 5;
++pub const PM_STR: ::nl_item = 6;
++
++pub const DAY_1: ::nl_item = 7;
++pub const DAY_2: ::nl_item = 8;
++pub const DAY_3: ::nl_item = 9;
++pub const DAY_4: ::nl_item = 10;
++pub const DAY_5: ::nl_item = 11;
++pub const DAY_6: ::nl_item = 12;
++pub const DAY_7: ::nl_item = 13;
++
++pub const ABDAY_1: ::nl_item = 14;
++pub const ABDAY_2: ::nl_item = 15;
++pub const ABDAY_3: ::nl_item = 16;
++pub const ABDAY_4: ::nl_item = 17;
++pub const ABDAY_5: ::nl_item = 18;
++pub const ABDAY_6: ::nl_item = 19;
++pub const ABDAY_7: ::nl_item = 20;
++
++pub const MON_1: ::nl_item = 21;
++pub const MON_2: ::nl_item = 22;
++pub const MON_3: ::nl_item = 23;
++pub const MON_4: ::nl_item = 24;
++pub const MON_5: ::nl_item = 25;
++pub const MON_6: ::nl_item = 26;
++pub const MON_7: ::nl_item = 27;
++pub const MON_8: ::nl_item = 28;
++pub const MON_9: ::nl_item = 29;
++pub const MON_10: ::nl_item = 30;
++pub const MON_11: ::nl_item = 31;
++pub const MON_12: ::nl_item = 32;
++
++pub const ABMON_1: ::nl_item = 33;
++pub const ABMON_2: ::nl_item = 34;
++pub const ABMON_3: ::nl_item = 35;
++pub const ABMON_4: ::nl_item = 36;
++pub const ABMON_5: ::nl_item = 37;
++pub const ABMON_6: ::nl_item = 38;
++pub const ABMON_7: ::nl_item = 39;
++pub const ABMON_8: ::nl_item = 40;
++pub const ABMON_9: ::nl_item = 41;
++pub const ABMON_10: ::nl_item = 42;
++pub const ABMON_11: ::nl_item = 43;
++pub const ABMON_12: ::nl_item = 44;
++
++pub const ERA: ::nl_item = 45;
++pub const ERA_D_FMT: ::nl_item = 46;
++pub const ERA_D_T_FMT: ::nl_item = 47;
++pub const ERA_T_FMT: ::nl_item = 48;
++pub const ALT_DIGITS: ::nl_item = 49;
++
++pub const RADIXCHAR: ::nl_item = 50;
++pub const THOUSEP: ::nl_item = 51;
++
++pub const YESEXPR: ::nl_item = 52;
++pub const NOEXPR: ::nl_item = 53;
++
++pub const YESSTR: ::nl_item = 54;
++pub const NOSTR: ::nl_item = 55;
++
++pub const CRNCYSTR: ::nl_item = 56;
++
++pub const D_MD_ORDER: ::nl_item = 57;
++
++pub const ALTMON_1: ::nl_item = 58;
++pub const ALTMON_2: ::nl_item = 59;
++pub const ALTMON_3: ::nl_item = 60;
++pub const ALTMON_4: ::nl_item = 61;
++pub const ALTMON_5: ::nl_item = 62;
++pub const ALTMON_6: ::nl_item = 63;
++pub const ALTMON_7: ::nl_item = 64;
++pub const ALTMON_8: ::nl_item = 65;
++pub const ALTMON_9: ::nl_item = 66;
++pub const ALTMON_10: ::nl_item = 67;
++pub const ALTMON_11: ::nl_item = 68;
++pub const ALTMON_12: ::nl_item = 69;
++
++pub const EXIT_FAILURE: ::c_int = 1;
++pub const EXIT_SUCCESS: ::c_int = 0;
++pub const EOF: ::c_int = -1;
++pub const SEEK_SET: ::c_int = 0;
++pub const SEEK_CUR: ::c_int = 1;
++pub const SEEK_END: ::c_int = 2;
++pub const _IOFBF: ::c_int = 0;
++pub const _IONBF: ::c_int = 2;
++pub const _IOLBF: ::c_int = 1;
++pub const BUFSIZ: ::c_uint = 1024;
++pub const FOPEN_MAX: ::c_uint = 20;
++pub const FILENAME_MAX: ::c_uint = 1024;
++pub const L_tmpnam: ::c_uint = 1024;
++pub const TMP_MAX: ::c_uint = 308915776;
++
++pub const O_NOCTTY: ::c_int = 32768;
++pub const O_DIRECT: ::c_int = 0x00010000;
++
++pub const S_IFIFO: mode_t = 4096;
++pub const S_IFCHR: mode_t = 8192;
++pub const S_IFBLK: mode_t = 24576;
++pub const S_IFDIR: mode_t = 16384;
++pub const S_IFREG: mode_t = 32768;
++pub const S_IFLNK: mode_t = 40960;
++pub const S_IFSOCK: mode_t = 49152;
++pub const S_IFMT: mode_t = 61440;
++pub const S_IEXEC: mode_t = 64;
++pub const S_IWRITE: mode_t = 128;
++pub const S_IREAD: mode_t = 256;
++pub const S_IRWXU: mode_t = 448;
++pub const S_IXUSR: mode_t = 64;
++pub const S_IWUSR: mode_t = 128;
++pub const S_IRUSR: mode_t = 256;
++pub const S_IRWXG: mode_t = 56;
++pub const S_IXGRP: mode_t = 8;
++pub const S_IWGRP: mode_t = 16;
++pub const S_IRGRP: mode_t = 32;
++pub const S_IRWXO: mode_t = 7;
++pub const S_IXOTH: mode_t = 1;
++pub const S_IWOTH: mode_t = 2;
++pub const S_IROTH: mode_t = 4;
++pub const F_OK: ::c_int = 0;
++pub const R_OK: ::c_int = 4;
++pub const W_OK: ::c_int = 2;
++pub const X_OK: ::c_int = 1;
++pub const STDIN_FILENO: ::c_int = 0;
++pub const STDOUT_FILENO: ::c_int = 1;
++pub const STDERR_FILENO: ::c_int = 2;
++pub const F_LOCK: ::c_int = 1;
++pub const F_TEST: ::c_int = 3;
++pub const F_TLOCK: ::c_int = 2;
++pub const F_ULOCK: ::c_int = 0;
++pub const F_DUPFD_CLOEXEC: ::c_int = 17;
++pub const SIGHUP: ::c_int = 1;
++pub const SIGINT: ::c_int = 2;
++pub const SIGQUIT: ::c_int = 3;
++pub const SIGILL: ::c_int = 4;
++pub const SIGABRT: ::c_int = 6;
++pub const SIGEMT: ::c_int = 7;
++pub const SIGFPE: ::c_int = 8;
++pub const SIGKILL: ::c_int = 9;
++pub const SIGSEGV: ::c_int = 11;
++pub const SIGPIPE: ::c_int = 13;
++pub const SIGALRM: ::c_int = 14;
++pub const SIGTERM: ::c_int = 15;
++
++pub const PROT_NONE: ::c_int = 0;
++pub const PROT_READ: ::c_int = 1;
++pub const PROT_WRITE: ::c_int = 2;
++pub const PROT_EXEC: ::c_int = 4;
++
++pub const MAP_FILE: ::c_int = 0x0000;
++pub const MAP_SHARED: ::c_int = 0x0001;
++pub const MAP_PRIVATE: ::c_int = 0x0002;
++pub const MAP_FIXED: ::c_int = 0x0010;
++pub const MAP_ANON: ::c_int = 0x1000;
++
++pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
++
++pub const MCL_CURRENT: ::c_int = 0x0001;
++pub const MCL_FUTURE: ::c_int = 0x0002;
++
++pub const MS_SYNC: ::c_int = 0x0000;
++pub const MS_ASYNC: ::c_int = 0x0001;
++pub const MS_INVALIDATE: ::c_int = 0x0002;
++
++pub const EPERM: ::c_int = 1;
++pub const ENOENT: ::c_int = 2;
++pub const ESRCH: ::c_int = 3;
++pub const EINTR: ::c_int = 4;
++pub const EIO: ::c_int = 5;
++pub const ENXIO: ::c_int = 6;
++pub const E2BIG: ::c_int = 7;
++pub const ENOEXEC: ::c_int = 8;
++pub const EBADF: ::c_int = 9;
++pub const ECHILD: ::c_int = 10;
++pub const EDEADLK: ::c_int = 11;
++pub const ENOMEM: ::c_int = 12;
++pub const EACCES: ::c_int = 13;
++pub const EFAULT: ::c_int = 14;
++pub const ENOTBLK: ::c_int = 15;
++pub const EBUSY: ::c_int = 16;
++pub const EEXIST: ::c_int = 17;
++pub const EXDEV: ::c_int = 18;
++pub const ENODEV: ::c_int = 19;
++pub const ENOTDIR: ::c_int = 20;
++pub const EISDIR: ::c_int = 21;
++pub const EINVAL: ::c_int = 22;
++pub const ENFILE: ::c_int = 23;
++pub const EMFILE: ::c_int = 24;
++pub const ENOTTY: ::c_int = 25;
++pub const ETXTBSY: ::c_int = 26;
++pub const EFBIG: ::c_int = 27;
++pub const ENOSPC: ::c_int = 28;
++pub const ESPIPE: ::c_int = 29;
++pub const EROFS: ::c_int = 30;
++pub const EMLINK: ::c_int = 31;
++pub const EPIPE: ::c_int = 32;
++pub const EDOM: ::c_int = 33;
++pub const ERANGE: ::c_int = 34;
++pub const EAGAIN: ::c_int = 35;
++pub const EWOULDBLOCK: ::c_int = 35;
++pub const EINPROGRESS: ::c_int = 36;
++pub const EALREADY: ::c_int = 37;
++pub const ENOTSOCK: ::c_int = 38;
++pub const EDESTADDRREQ: ::c_int = 39;
++pub const EMSGSIZE: ::c_int = 40;
++pub const EPROTOTYPE: ::c_int = 41;
++pub const ENOPROTOOPT: ::c_int = 42;
++pub const EPROTONOSUPPORT: ::c_int = 43;
++pub const ESOCKTNOSUPPORT: ::c_int = 44;
++pub const EOPNOTSUPP: ::c_int = 45;
++pub const ENOTSUP: ::c_int = EOPNOTSUPP;
++pub const EPFNOSUPPORT: ::c_int = 46;
++pub const EAFNOSUPPORT: ::c_int = 47;
++pub const EADDRINUSE: ::c_int = 48;
++pub const EADDRNOTAVAIL: ::c_int = 49;
++pub const ENETDOWN: ::c_int = 50;
++pub const ENETUNREACH: ::c_int = 51;
++pub const ENETRESET: ::c_int = 52;
++pub const ECONNABORTED: ::c_int = 53;
++pub const ECONNRESET: ::c_int = 54;
++pub const ENOBUFS: ::c_int = 55;
++pub const EISCONN: ::c_int = 56;
++pub const ENOTCONN: ::c_int = 57;
++pub const ESHUTDOWN: ::c_int = 58;
++pub const ETOOMANYREFS: ::c_int = 59;
++pub const ETIMEDOUT: ::c_int = 60;
++pub const ECONNREFUSED: ::c_int = 61;
++pub const ELOOP: ::c_int = 62;
++pub const ENAMETOOLONG: ::c_int = 63;
++pub const EHOSTDOWN: ::c_int = 64;
++pub const EHOSTUNREACH: ::c_int = 65;
++pub const ENOTEMPTY: ::c_int = 66;
++pub const EPROCLIM: ::c_int = 67;
++pub const EUSERS: ::c_int = 68;
++pub const EDQUOT: ::c_int = 69;
++pub const ESTALE: ::c_int = 70;
++pub const EREMOTE: ::c_int = 71;
++pub const EBADRPC: ::c_int = 72;
++pub const ERPCMISMATCH: ::c_int = 73;
++pub const EPROGUNAVAIL: ::c_int = 74;
++pub const EPROGMISMATCH: ::c_int = 75;
++pub const EPROCUNAVAIL: ::c_int = 76;
++pub const ENOLCK: ::c_int = 77;
++pub const ENOSYS: ::c_int = 78;
++pub const EFTYPE: ::c_int = 79;
++pub const EAUTH: ::c_int = 80;
++pub const ENEEDAUTH: ::c_int = 81;
++pub const EIDRM: ::c_int = 82;
++pub const ENOMSG: ::c_int = 83;
++pub const EOVERFLOW: ::c_int = 84;
++pub const ECANCELED: ::c_int = 85;
++pub const EILSEQ: ::c_int = 86;
++pub const ENOATTR: ::c_int = 87;
++pub const EDOOFUS: ::c_int = 88;
++pub const EBADMSG: ::c_int = 89;
++pub const EMULTIHOP: ::c_int = 90;
++pub const ENOLINK: ::c_int = 91;
++pub const EPROTO: ::c_int = 92;
++
++pub const EAI_SYSTEM: ::c_int = 11;
++
++pub const F_DUPFD: ::c_int = 0;
++pub const F_GETFD: ::c_int = 1;
++pub const F_SETFD: ::c_int = 2;
++pub const F_GETFL: ::c_int = 3;
++pub const F_SETFL: ::c_int = 4;
++
++pub const SIGTRAP: ::c_int = 5;
++
++pub const GLOB_APPEND  : ::c_int = 0x0001;
++pub const GLOB_DOOFFS  : ::c_int = 0x0002;
++pub const GLOB_ERR     : ::c_int = 0x0004;
++pub const GLOB_MARK    : ::c_int = 0x0008;
++pub const GLOB_NOCHECK : ::c_int = 0x0010;
++pub const GLOB_NOSORT  : ::c_int = 0x0020;
++pub const GLOB_NOESCAPE: ::c_int = 0x2000;
++
++pub const GLOB_NOSPACE : ::c_int = -1;
++pub const GLOB_ABORTED : ::c_int = -2;
++pub const GLOB_NOMATCH : ::c_int = -3;
++
++pub const POSIX_MADV_NORMAL: ::c_int = 0;
++pub const POSIX_MADV_RANDOM: ::c_int = 1;
++pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
++pub const POSIX_MADV_WILLNEED: ::c_int = 3;
++pub const POSIX_MADV_DONTNEED: ::c_int = 4;
++
++pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0;
++pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
++pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
++pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
++
++pub const RLIMIT_CPU: ::c_int = 0;
++pub const RLIMIT_FSIZE: ::c_int = 1;
++pub const RLIMIT_DATA: ::c_int = 2;
++pub const RLIMIT_STACK: ::c_int = 3;
++pub const RLIMIT_CORE: ::c_int = 4;
++pub const RLIMIT_RSS: ::c_int = 5;
++pub const RLIMIT_MEMLOCK: ::c_int = 6;
++pub const RLIMIT_NPROC: ::c_int = 7;
++pub const RLIMIT_NOFILE: ::c_int = 8;
++pub const RLIMIT_SBSIZE: ::c_int = 9;
++pub const RLIMIT_VMEM: ::c_int = 10;
++pub const RLIMIT_AS: ::c_int = RLIMIT_VMEM;
++pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff;
++
++pub const RUSAGE_SELF: ::c_int = 0;
++pub const RUSAGE_CHILDREN: ::c_int = -1;
++
++pub const MADV_NORMAL: ::c_int = 0;
++pub const MADV_RANDOM: ::c_int = 1;
++pub const MADV_SEQUENTIAL: ::c_int = 2;
++pub const MADV_WILLNEED: ::c_int = 3;
++pub const MADV_DONTNEED: ::c_int = 4;
++pub const MADV_FREE: ::c_int = 5;
++pub const MADV_NOSYNC: ::c_int = 6;
++pub const MADV_AUTOSYNC: ::c_int = 7;
++pub const MADV_NOCORE: ::c_int = 8;
++pub const MADV_CORE: ::c_int = 9;
++
++pub const MINCORE_INCORE: ::c_int =  0x1;
++pub const MINCORE_REFERENCED: ::c_int = 0x2;
++pub const MINCORE_MODIFIED: ::c_int = 0x4;
++pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8;
++pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10;
++pub const MINCORE_SUPER: ::c_int = 0x20;
++
++pub const AF_UNSPEC: ::c_int = 0;
++pub const AF_LOCAL: ::c_int = 1;
++pub const AF_UNIX: ::c_int = AF_LOCAL;
++pub const AF_INET: ::c_int = 2;
++pub const AF_IMPLINK: ::c_int = 3;
++pub const AF_PUP: ::c_int = 4;
++pub const AF_CHAOS: ::c_int = 5;
++pub const AF_NETBIOS: ::c_int = 6;
++pub const AF_ISO: ::c_int = 7;
++pub const AF_OSI: ::c_int = AF_ISO;
++pub const AF_ECMA: ::c_int = 8;
++pub const AF_DATAKIT: ::c_int = 9;
++pub const AF_CCITT: ::c_int = 10;
++pub const AF_SNA: ::c_int = 11;
++pub const AF_DECnet: ::c_int = 12;
++pub const AF_DLI: ::c_int = 13;
++pub const AF_LAT: ::c_int = 14;
++pub const AF_HYLINK: ::c_int = 15;
++pub const AF_APPLETALK: ::c_int = 16;
++pub const AF_ROUTE: ::c_int = 17;
++pub const AF_LINK: ::c_int = 18;
++pub const pseudo_AF_XTP: ::c_int = 19;
++pub const AF_COIP: ::c_int = 20;
++pub const AF_CNT: ::c_int = 21;
++pub const pseudo_AF_RTIP: ::c_int = 22;
++pub const AF_IPX: ::c_int = 23;
++pub const AF_SIP: ::c_int = 24;
++pub const pseudo_AF_PIP: ::c_int = 25;
++pub const AF_ISDN: ::c_int = 26;
++pub const AF_E164: ::c_int = AF_ISDN;
++pub const pseudo_AF_KEY: ::c_int = 27;
++pub const AF_INET6: ::c_int = 28;
++pub const AF_NATM: ::c_int = 29;
++pub const AF_ATM: ::c_int = 30;
++pub const pseudo_AF_HDRCMPLT: ::c_int = 31;
++pub const AF_NETGRAPH: ::c_int = 32;
++
++pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
++pub const PF_LOCAL: ::c_int = AF_LOCAL;
++pub const PF_UNIX: ::c_int = PF_LOCAL;
++pub const PF_INET: ::c_int = AF_INET;
++pub const PF_IMPLINK: ::c_int = AF_IMPLINK;
++pub const PF_PUP: ::c_int = AF_PUP;
++pub const PF_CHAOS: ::c_int = AF_CHAOS;
++pub const PF_NETBIOS: ::c_int = AF_NETBIOS;
++pub const PF_ISO: ::c_int = AF_ISO;
++pub const PF_OSI: ::c_int = AF_ISO;
++pub const PF_ECMA: ::c_int = AF_ECMA;
++pub const PF_DATAKIT: ::c_int = AF_DATAKIT;
++pub const PF_CCITT: ::c_int = AF_CCITT;
++pub const PF_SNA: ::c_int = AF_SNA;
++pub const PF_DECnet: ::c_int = AF_DECnet;
++pub const PF_DLI: ::c_int = AF_DLI;
++pub const PF_LAT: ::c_int = AF_LAT;
++pub const PF_HYLINK: ::c_int = AF_HYLINK;
++pub const PF_APPLETALK: ::c_int = AF_APPLETALK;
++pub const PF_ROUTE: ::c_int = AF_ROUTE;
++pub const PF_LINK: ::c_int = AF_LINK;
++pub const PF_XTP: ::c_int = pseudo_AF_XTP;
++pub const PF_COIP: ::c_int = AF_COIP;
++pub const PF_CNT: ::c_int = AF_CNT;
++pub const PF_SIP: ::c_int = AF_SIP;
++pub const PF_IPX: ::c_int = AF_IPX;
++pub const PF_RTIP: ::c_int = pseudo_AF_RTIP;
++pub const PF_PIP: ::c_int = pseudo_AF_PIP;
++pub const PF_ISDN: ::c_int = AF_ISDN;
++pub const PF_KEY: ::c_int = pseudo_AF_KEY;
++pub const PF_INET6: ::c_int = AF_INET6;
++pub const PF_NATM: ::c_int = AF_NATM;
++pub const PF_ATM: ::c_int = AF_ATM;
++pub const PF_NETGRAPH: ::c_int = AF_NETGRAPH;
++
++pub const SOMAXCONN: ::c_int = 128;
++
++pub const MSG_OOB: ::c_int = 0x00000001;
++pub const MSG_PEEK: ::c_int = 0x00000002;
++pub const MSG_DONTROUTE: ::c_int = 0x00000004;
++pub const MSG_EOR: ::c_int =  0x00000008;
++pub const MSG_TRUNC: ::c_int = 0x00000010;
++pub const MSG_CTRUNC: ::c_int = 0x00000020;
++pub const MSG_WAITALL: ::c_int = 0x00000040;
++pub const MSG_DONTWAIT: ::c_int = 0x00000080;
++pub const MSG_EOF: ::c_int = 0x00000100;
++
++pub const SCM_TIMESTAMP: ::c_int = 0x02;
++
++pub const SOCK_STREAM: ::c_int = 1;
++pub const SOCK_DGRAM: ::c_int = 2;
++pub const SOCK_RAW: ::c_int = 3;
++pub const SOCK_RDM: ::c_int = 4;
++pub const SOCK_SEQPACKET: ::c_int = 5;
++pub const SOCK_CLOEXEC: ::c_int = 0x10000000;
++pub const SOCK_NONBLOCK: ::c_int = 0x20000000;
++pub const SOCK_MAXADDRLEN: ::c_int = 255;
++pub const IP_TTL: ::c_int = 4;
++pub const IP_HDRINCL: ::c_int = 2;
++pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
++pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
++pub const IPV6_JOIN_GROUP: ::c_int = 12;
++pub const IPV6_LEAVE_GROUP: ::c_int = 13;
++
++pub const TCP_NODELAY: ::c_int = 1;
++pub const TCP_KEEPIDLE: ::c_int = 256;
++pub const SOL_SOCKET: ::c_int = 0xffff;
++pub const SO_DEBUG: ::c_int = 0x01;
++pub const SO_ACCEPTCONN: ::c_int = 0x0002;
++pub const SO_REUSEADDR: ::c_int = 0x0004;
++pub const SO_KEEPALIVE: ::c_int = 0x0008;
++pub const SO_DONTROUTE: ::c_int = 0x0010;
++pub const SO_BROADCAST: ::c_int = 0x0020;
++pub const SO_USELOOPBACK: ::c_int = 0x0040;
++pub const SO_LINGER: ::c_int = 0x0080;
++pub const SO_OOBINLINE: ::c_int = 0x0100;
++pub const SO_REUSEPORT: ::c_int = 0x0200;
++pub const SO_TIMESTAMP: ::c_int = 0x0400;
++pub const SO_NOSIGPIPE: ::c_int = 0x0800;
++pub const SO_ACCEPTFILTER: ::c_int = 0x1000;
++pub const SO_SNDBUF: ::c_int = 0x1001;
++pub const SO_RCVBUF: ::c_int = 0x1002;
++pub const SO_SNDLOWAT: ::c_int = 0x1003;
++pub const SO_RCVLOWAT: ::c_int = 0x1004;
++pub const SO_SNDTIMEO: ::c_int = 0x1005;
++pub const SO_RCVTIMEO: ::c_int = 0x1006;
++pub const SO_ERROR: ::c_int = 0x1007;
++pub const SO_TYPE: ::c_int = 0x1008;
++
++pub const IFF_LOOPBACK: ::c_int = 0x8;
++
++pub const SHUT_RD: ::c_int = 0;
++pub const SHUT_WR: ::c_int = 1;
++pub const SHUT_RDWR: ::c_int = 2;
++
++pub const LOCK_SH: ::c_int = 1;
++pub const LOCK_EX: ::c_int = 2;
++pub const LOCK_NB: ::c_int = 4;
++pub const LOCK_UN: ::c_int = 8;
++
++pub const MAP_COPY: ::c_int = 0x0002;
++pub const MAP_RENAME: ::c_int = 0x0020;
++pub const MAP_NORESERVE: ::c_int = 0x0040;
++pub const MAP_HASSEMAPHORE: ::c_int = 0x0200;
++pub const MAP_STACK: ::c_int = 0x0400;
++pub const MAP_NOSYNC: ::c_int = 0x0800;
++pub const MAP_NOCORE: ::c_int = 0x020000;
++
++pub const IPPROTO_RAW: ::c_int = 255;
++
++pub const _PC_LINK_MAX: ::c_int = 1;
++pub const _PC_MAX_CANON: ::c_int = 2;
++pub const _PC_MAX_INPUT: ::c_int = 3;
++pub const _PC_NAME_MAX: ::c_int = 4;
++pub const _PC_PATH_MAX: ::c_int = 5;
++pub const _PC_PIPE_BUF: ::c_int = 6;
++pub const _PC_CHOWN_RESTRICTED: ::c_int = 7;
++pub const _PC_NO_TRUNC: ::c_int = 8;
++pub const _PC_VDISABLE: ::c_int = 9;
++pub const _PC_ALLOC_SIZE_MIN: ::c_int = 10;
++pub const _PC_FILESIZEBITS: ::c_int = 12;
++pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14;
++pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15;
++pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16;
++pub const _PC_REC_XFER_ALIGN: ::c_int = 17;
++pub const _PC_SYMLINK_MAX: ::c_int = 18;
++pub const _PC_MIN_HOLE_SIZE: ::c_int = 21;
++pub const _PC_ASYNC_IO: ::c_int = 53;
++pub const _PC_PRIO_IO: ::c_int = 54;
++pub const _PC_SYNC_IO: ::c_int = 55;
++pub const _PC_ACL_EXTENDED: ::c_int = 59;
++pub const _PC_ACL_PATH_MAX: ::c_int = 60;
++pub const _PC_CAP_PRESENT: ::c_int = 61;
++pub const _PC_INF_PRESENT: ::c_int = 62;
++pub const _PC_MAC_PRESENT: ::c_int = 63;
++
++pub const _SC_ARG_MAX: ::c_int = 1;
++pub const _SC_CHILD_MAX: ::c_int = 2;
++pub const _SC_CLK_TCK: ::c_int = 3;
++pub const _SC_NGROUPS_MAX: ::c_int = 4;
++pub const _SC_OPEN_MAX: ::c_int = 5;
++pub const _SC_JOB_CONTROL: ::c_int = 6;
++pub const _SC_SAVED_IDS: ::c_int = 7;
++pub const _SC_VERSION: ::c_int = 8;
++pub const _SC_BC_BASE_MAX: ::c_int = 9;
++pub const _SC_BC_DIM_MAX: ::c_int = 10;
++pub const _SC_BC_SCALE_MAX: ::c_int = 11;
++pub const _SC_BC_STRING_MAX: ::c_int = 12;
++pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 13;
++pub const _SC_EXPR_NEST_MAX: ::c_int = 14;
++pub const _SC_LINE_MAX: ::c_int = 15;
++pub const _SC_RE_DUP_MAX: ::c_int = 16;
++pub const _SC_2_VERSION: ::c_int = 17;
++pub const _SC_2_C_BIND: ::c_int = 18;
++pub const _SC_2_C_DEV: ::c_int = 19;
++pub const _SC_2_CHAR_TERM: ::c_int = 20;
++pub const _SC_2_FORT_DEV: ::c_int = 21;
++pub const _SC_2_FORT_RUN: ::c_int = 22;
++pub const _SC_2_LOCALEDEF: ::c_int = 23;
++pub const _SC_2_SW_DEV: ::c_int = 24;
++pub const _SC_2_UPE: ::c_int = 25;
++pub const _SC_STREAM_MAX: ::c_int = 26;
++pub const _SC_TZNAME_MAX: ::c_int = 27;
++pub const _SC_ASYNCHRONOUS_IO: ::c_int = 28;
++pub const _SC_MAPPED_FILES: ::c_int = 29;
++pub const _SC_MEMLOCK: ::c_int = 30;
++pub const _SC_MEMLOCK_RANGE: ::c_int = 31;
++pub const _SC_MEMORY_PROTECTION: ::c_int = 32;
++pub const _SC_MESSAGE_PASSING: ::c_int = 33;
++pub const _SC_PRIORITIZED_IO: ::c_int = 34;
++pub const _SC_PRIORITY_SCHEDULING: ::c_int = 35;
++pub const _SC_REALTIME_SIGNALS: ::c_int = 36;
++pub const _SC_SEMAPHORES: ::c_int = 37;
++pub const _SC_FSYNC: ::c_int = 38;
++pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 39;
++pub const _SC_SYNCHRONIZED_IO: ::c_int = 40;
++pub const _SC_TIMERS: ::c_int = 41;
++pub const _SC_AIO_LISTIO_MAX: ::c_int = 42;
++pub const _SC_AIO_MAX: ::c_int = 43;
++pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 44;
++pub const _SC_DELAYTIMER_MAX: ::c_int = 45;
++pub const _SC_MQ_OPEN_MAX: ::c_int = 46;
++pub const _SC_PAGESIZE: ::c_int = 47;
++pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
++pub const _SC_RTSIG_MAX: ::c_int = 48;
++pub const _SC_SEM_NSEMS_MAX: ::c_int = 49;
++pub const _SC_SEM_VALUE_MAX: ::c_int = 50;
++pub const _SC_SIGQUEUE_MAX: ::c_int = 51;
++pub const _SC_TIMER_MAX: ::c_int = 52;
++pub const _SC_IOV_MAX: ::c_int = 56;
++pub const _SC_NPROCESSORS_CONF: ::c_int = 57;
++pub const _SC_2_PBS: ::c_int = 59;
++pub const _SC_2_PBS_ACCOUNTING: ::c_int = 60;
++pub const _SC_2_PBS_CHECKPOINT: ::c_int = 61;
++pub const _SC_2_PBS_LOCATE: ::c_int = 62;
++pub const _SC_2_PBS_MESSAGE: ::c_int = 63;
++pub const _SC_2_PBS_TRACK: ::c_int = 64;
++pub const _SC_ADVISORY_INFO: ::c_int = 65;
++pub const _SC_BARRIERS: ::c_int = 66;
++pub const _SC_CLOCK_SELECTION: ::c_int = 67;
++pub const _SC_CPUTIME: ::c_int = 68;
++pub const _SC_FILE_LOCKING: ::c_int = 69;
++pub const _SC_NPROCESSORS_ONLN: ::c_int = 58;
++pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70;
++pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71;
++pub const _SC_HOST_NAME_MAX: ::c_int = 72;
++pub const _SC_LOGIN_NAME_MAX: ::c_int = 73;
++pub const _SC_MONOTONIC_CLOCK: ::c_int = 74;
++pub const _SC_MQ_PRIO_MAX: ::c_int = 75;
++pub const _SC_READER_WRITER_LOCKS: ::c_int = 76;
++pub const _SC_REGEXP: ::c_int = 77;
++pub const _SC_SHELL: ::c_int = 78;
++pub const _SC_SPAWN: ::c_int = 79;
++pub const _SC_SPIN_LOCKS: ::c_int = 80;
++pub const _SC_SPORADIC_SERVER: ::c_int = 81;
++pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82;
++pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83;
++pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85;
++pub const _SC_THREAD_KEYS_MAX: ::c_int = 86;
++pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 87;
++pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88;
++pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89;
++pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90;
++pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91;
++pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 92;
++pub const _SC_THREAD_STACK_MIN: ::c_int = 93;
++pub const _SC_THREAD_THREADS_MAX: ::c_int = 94;
++pub const _SC_TIMEOUTS: ::c_int = 95;
++pub const _SC_THREADS: ::c_int = 96;
++pub const _SC_TRACE: ::c_int = 97;
++pub const _SC_TRACE_EVENT_FILTER: ::c_int = 98;
++pub const _SC_TRACE_INHERIT: ::c_int = 99;
++pub const _SC_TRACE_LOG: ::c_int = 100;
++pub const _SC_TTY_NAME_MAX: ::c_int = 101;
++pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 102;
++pub const _SC_V6_ILP32_OFF32: ::c_int = 103;
++pub const _SC_V6_ILP32_OFFBIG: ::c_int = 104;
++pub const _SC_V6_LP64_OFF64: ::c_int = 105;
++pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 106;
++pub const _SC_ATEXIT_MAX: ::c_int = 107;
++pub const _SC_XOPEN_CRYPT: ::c_int = 108;
++pub const _SC_XOPEN_ENH_I18N: ::c_int = 109;
++pub const _SC_XOPEN_LEGACY: ::c_int = 110;
++pub const _SC_XOPEN_REALTIME: ::c_int = 111;
++pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112;
++pub const _SC_XOPEN_SHM: ::c_int = 113;
++pub const _SC_XOPEN_STREAMS: ::c_int = 114;
++pub const _SC_XOPEN_UNIX: ::c_int = 115;
++pub const _SC_XOPEN_VERSION: ::c_int = 116;
++pub const _SC_XOPEN_XCU_VERSION: ::c_int = 117;
++pub const _SC_IPV6: ::c_int = 118;
++pub const _SC_RAW_SOCKETS: ::c_int = 119;
++pub const _SC_SYMLOOP_MAX: ::c_int = 120;
++pub const _SC_PHYS_PAGES: ::c_int = 121;
++
++pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _;
++pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _;
++pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _;
++pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
++pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
++pub const PTHREAD_MUTEX_NORMAL: ::c_int = 3;
++pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_ERRORCHECK;
++
++pub const SCHED_FIFO: ::c_int = 1;
++pub const SCHED_OTHER: ::c_int = 2;
++pub const SCHED_RR: ::c_int = 3;
++
++pub const FD_SETSIZE: usize = 1024;
++
++pub const ST_NOSUID: ::c_ulong = 2;
++
++pub const NI_MAXHOST: ::size_t = 1025;
++
++pub const RTLD_LOCAL: ::c_int = 0;
++pub const RTLD_NODELETE: ::c_int = 0x1000;
++pub const RTLD_NOLOAD: ::c_int = 0x2000;
++pub const RTLD_GLOBAL: ::c_int = 0x100;
++
++pub const LOG_NTP: ::c_int = 12 << 3;
++pub const LOG_SECURITY: ::c_int = 13 << 3;
++pub const LOG_CONSOLE: ::c_int = 14 << 3;
++pub const LOG_NFACILITIES: ::c_int = 24;
++
++pub const TIOCEXCL: ::c_uint = 0x2000740d;
++pub const TIOCNXCL: ::c_uint = 0x2000740e;
++pub const TIOCFLUSH: ::c_ulong = 0x80047410;
++pub const TIOCGETA: ::c_uint = 0x402c7413;
++pub const TIOCSETA: ::c_ulong = 0x802c7414;
++pub const TIOCSETAW: ::c_ulong = 0x802c7415;
++pub const TIOCSETAF: ::c_ulong = 0x802c7416;
++pub const TIOCGETD: ::c_uint = 0x4004741a;
++pub const TIOCSETD: ::c_ulong = 0x8004741b;
++pub const TIOCGDRAINWAIT: ::c_uint = 0x40047456;
++pub const TIOCSDRAINWAIT: ::c_ulong = 0x80047457;
++pub const TIOCTIMESTAMP: ::c_uint = 0x40107459;
++pub const TIOCMGDTRWAIT: ::c_uint = 0x4004745a;
++pub const TIOCMSDTRWAIT: ::c_ulong = 0x8004745b;
++pub const TIOCDRAIN: ::c_uint = 0x2000745e;
++pub const TIOCEXT: ::c_ulong = 0x80047460;
++pub const TIOCSCTTY: ::c_uint = 0x20007461;
++pub const TIOCCONS: ::c_ulong = 0x80047462;
++pub const TIOCGSID: ::c_uint = 0x40047463;
++pub const TIOCSTAT: ::c_uint = 0x20007465;
++pub const TIOCUCNTL: ::c_ulong = 0x80047466;
++pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
++pub const TIOCGWINSZ: ::c_uint = 0x40087468;
++pub const TIOCMGET: ::c_uint = 0x4004746a;
++pub const TIOCM_LE: ::c_int = 0x1;
++pub const TIOCM_DTR: ::c_int = 0x2;
++pub const TIOCM_RTS: ::c_int = 0x4;
++pub const TIOCM_ST: ::c_int = 0x8;
++pub const TIOCM_SR: ::c_int = 0x10;
++pub const TIOCM_CTS: ::c_int = 0x20;
++pub const TIOCM_RI: ::c_int = 0x80;
++pub const TIOCM_DSR: ::c_int = 0x100;
++pub const TIOCM_CD: ::c_int = 0x40;
++pub const TIOCM_CAR: ::c_int = 0x40;
++pub const TIOCM_RNG: ::c_int = 0x80;
++pub const TIOCMBIC: ::c_ulong = 0x8004746b;
++pub const TIOCMBIS: ::c_ulong = 0x8004746c;
++pub const TIOCMSET: ::c_ulong = 0x8004746d;
++pub const TIOCSTART: ::c_uint = 0x2000746e;
++pub const TIOCSTOP: ::c_uint = 0x2000746f;
++pub const TIOCPKT: ::c_ulong = 0x80047470;
++pub const TIOCPKT_DATA: ::c_int = 0x0;
++pub const TIOCPKT_FLUSHREAD: ::c_int = 0x1;
++pub const TIOCPKT_FLUSHWRITE: ::c_int = 0x2;
++pub const TIOCPKT_STOP: ::c_int = 0x4;
++pub const TIOCPKT_START: ::c_int = 0x8;
++pub const TIOCPKT_NOSTOP: ::c_int = 0x10;
++pub const TIOCPKT_DOSTOP: ::c_int = 0x20;
++pub const TIOCPKT_IOCTL: ::c_int = 0x40;
++pub const TIOCNOTTY: ::c_uint = 0x20007471;
++pub const TIOCSTI: ::c_ulong = 0x80017472;
++pub const TIOCOUTQ: ::c_uint = 0x40047473;
++pub const TIOCSPGRP: ::c_ulong = 0x80047476;
++pub const TIOCGPGRP: ::c_uint = 0x40047477;
++pub const TIOCCDTR: ::c_uint = 0x20007478;
++pub const TIOCSDTR: ::c_uint = 0x20007479;
++pub const TIOCCBRK: ::c_uint = 0x2000747a;
++pub const TIOCSBRK: ::c_uint = 0x2000747b;
++pub const TTYDISC: ::c_int = 0x0;
++pub const SLIPDISC: ::c_int = 0x4;
++pub const PPPDISC: ::c_int = 0x5;
++pub const NETGRAPHDISC: ::c_int = 0x6;
++
++pub const B0: speed_t = 0;
++pub const B50: speed_t = 50;
++pub const B75: speed_t = 75;
++pub const B110: speed_t = 110;
++pub const B134: speed_t = 134;
++pub const B150: speed_t = 150;
++pub const B200: speed_t = 200;
++pub const B300: speed_t = 300;
++pub const B600: speed_t = 600;
++pub const B1200: speed_t = 1200;
++pub const B1800: speed_t = 1800;
++pub const B2400: speed_t = 2400;
++pub const B4800: speed_t = 4800;
++pub const B9600: speed_t = 9600;
++pub const B19200: speed_t = 19200;
++pub const B38400: speed_t = 38400;
++pub const B7200: speed_t = 7200;
++pub const B14400: speed_t = 14400;
++pub const B28800: speed_t = 28800;
++pub const B57600: speed_t = 57600;
++pub const B76800: speed_t = 76800;
++pub const B115200: speed_t = 115200;
++pub const B230400: speed_t = 230400;
++pub const EXTA: speed_t = 19200;
++pub const EXTB: speed_t = 38400;
++
++pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
++
++pub const CRTSCTS: ::tcflag_t = 0x00030000;
++pub const CCTS_OFLOW: ::tcflag_t = 0x00010000;
++pub const CRTS_IFLOW: ::tcflag_t = 0x00020000;
++pub const CDTR_IFLOW: ::tcflag_t = 0x00040000;
++pub const CDSR_OFLOW: ::tcflag_t = 0x00080000;
++pub const CCAR_OFLOW: ::tcflag_t = 0x00100000;
++pub const VERASE2: usize = 7;
++pub const OCRNL: ::tcflag_t = 0x10;
++pub const ONOCR: ::tcflag_t = 0x20;
++pub const ONLRET: ::tcflag_t = 0x40;
++
++f! {
++    pub fn WIFCONTINUED(status: ::c_int) -> bool {
++        status == 0x13
++    }
++
++    pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
++        status >> 8
++    }
++
++    pub fn WIFSIGNALED(status: ::c_int) -> bool {
++        (status & 0o177) != 0o177 && (status & 0o177) != 0
++    }
++
++    pub fn WIFSTOPPED(status: ::c_int) -> bool {
++        (status & 0o177) == 0o177
++    }
++}
++
++extern {
++    pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
++    pub fn endutxent();
++    pub fn getutxent() -> *mut utmpx;
++    pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
++    pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
++    pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
++    pub fn setutxent();
++}
++
++#[link(name = "util")]
++extern {
++    pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
++    pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
++    pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
++    pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
++    pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
++    pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
++                       timeout: *const ::timespec) -> ::c_int;
++    pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
++    pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
++                      nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
++    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
++    pub fn getnameinfo(sa: *const ::sockaddr,
++                       salen: ::socklen_t,
++                       host: *mut ::c_char,
++                       hostlen: ::size_t,
++                       serv: *mut ::c_char,
++                       servlen: ::size_t,
++                       flags: ::c_int) -> ::c_int;
++    pub fn kevent(kq: ::c_int,
++                  changelist: *const ::kevent,
++                  nchanges: ::c_int,
++                  eventlist: *mut ::kevent,
++                  nevents: ::c_int,
++                  timeout: *const ::timespec) -> ::c_int;
++    pub fn mincore(addr: *const ::c_void, len: ::size_t,
++                   vec: *mut ::c_char) -> ::c_int;
++    pub fn pwritev(fd: ::c_int,
++                   iov: *const ::iovec,
++                   iovcnt: ::c_int,
++                   offset: ::off_t) -> ::ssize_t;
++    pub fn preadv(fd: ::c_int,
++                  iov: *const ::iovec,
++                  iovcnt: ::c_int,
++                  offset: ::off_t) -> ::ssize_t;
++    pub fn sysctlnametomib(name: *const ::c_char,
++                           mibp: *mut ::c_int,
++                           sizep: *mut ::size_t)
++                           -> ::c_int;
++    pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t)
++                    -> ::c_int;
++    pub fn sysctl(name: *const ::c_int,
++                  namelen: ::c_uint,
++                  oldp: *mut ::c_void,
++                  oldlenp: *mut ::size_t,
++                  newp: *const ::c_void,
++                  newlen: ::size_t)
++                  -> ::c_int;
++    pub fn sysctlbyname(name: *const ::c_char,
++                        oldp: *mut ::c_void,
++                        oldlenp: *mut ::size_t,
++                        newp: *const ::c_void,
++                        newlen: ::size_t)
++                        -> ::c_int;
++    pub fn sched_setscheduler(pid: ::pid_t,
++                              policy: ::c_int,
++                              param: *const sched_param) -> ::c_int;
++    pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
++    pub fn memrchr(cx: *const ::c_void,
++                   c: ::c_int,
++                   n: ::size_t) -> *mut ::c_void;
++    pub fn sendfile(fd: ::c_int,
++                    s: ::c_int,
++                    offset: ::off_t,
++                    nbytes: ::size_t,
++                    hdtr: *mut ::sf_hdtr,
++                    sbytes: *mut ::off_t,
++                    flags: ::c_int) -> ::c_int;
++    pub fn sigtimedwait(set: *const sigset_t,
++                        info: *mut siginfo_t,
++                        timeout: *const ::timespec) -> ::c_int;
++    pub fn sigwaitinfo(set: *const sigset_t,
++                       info: *mut siginfo_t) -> ::c_int;
++    pub fn openpty(amaster: *mut ::c_int,
++                   aslave: *mut ::c_int,
++                   name: *mut ::c_char,
++                   termp: *mut termios,
++                   winp: *mut ::winsize) -> ::c_int;
++    pub fn forkpty(amaster: *mut ::c_int,
++                   name: *mut ::c_char,
++                   termp: *mut termios,
++                   winp: *mut ::winsize) -> ::pid_t;
++    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
++    pub fn duplocale(base: ::locale_t) -> ::locale_t;
++    pub fn newlocale(mask: ::c_int,
++                     locale: *const ::c_char,
++                     base: ::locale_t) -> ::locale_t;
++    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
++    pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char;
++    pub fn accept4(s: ::c_int, addr: *mut ::sockaddr,
++                   addrlen: *mut ::socklen_t, flags: ::c_int) -> ::c_int;
++    pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
++    pub fn pthread_attr_get_np(tid: ::pthread_t,
++                               attr: *mut ::pthread_attr_t) -> ::c_int;
++    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
++                                     guardsize: *mut ::size_t) -> ::c_int;
++    pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
++                                 stackaddr: *mut *mut ::c_void,
++                                 stacksize: *mut ::size_t) -> ::c_int;
++    pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
++                                       pshared: ::c_int) -> ::c_int;
++    pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
++                                       pshared: *mut ::c_int) -> ::c_int;
++    pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
++                                        pshared: ::c_int) -> ::c_int;
++    pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
++                                        pshared: *mut ::c_int) -> ::c_int;
++    pub fn pthread_rwlockattr_getpshared(attr: *const pthread_rwlockattr_t,
++                                         val: *mut ::c_int) -> ::c_int;
++    pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t,
++                                         val: ::c_int) -> ::c_int;
++    pub fn getpriority(which: ::c_int, who: ::c_int) -> ::c_int;
++    pub fn setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) -> ::c_int;
++
++    pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
++
++    pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
++                  mode: ::mode_t, dev: dev_t) -> ::c_int;
++    pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
++                    mode: ::mode_t) -> ::c_int;
++    pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
++                                     clock_id: *mut clockid_t) -> ::c_int;
++    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
++                                     clock_id: clockid_t) -> ::c_int;
++    pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int;
++    pub fn sem_timedwait(sem: *mut sem_t,
++                         abstime: *const ::timespec) -> ::c_int;
++    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
++                                   abstime: *const ::timespec) -> ::c_int;
++    pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
++    pub fn ppoll(fds: *mut ::pollfd,
++                 nfds: ::nfds_t,
++                 timeout: *const ::timespec,
++                 sigmask: *const sigset_t) -> ::c_int;
++    pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
++}
++
++cfg_if! {
++    if #[cfg(target_os = "freebsd")] {
++        mod freebsd;
++        pub use self::freebsd::*;
++    } else if #[cfg(target_os = "dragonfly")] {
++        mod dragonfly;
++        pub use self::dragonfly::*;
++    } else {
++        // ...
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d5b05db6135aec2f684d66aed0a011ee9a4d1e8a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,485 @@@
++use dox::{mem, Option};
++
++pub type c_char = i8;
++pub type wchar_t = i32;
++pub type off_t = i64;
++pub type useconds_t = u32;
++pub type blkcnt_t = i64;
++pub type socklen_t = u32;
++pub type sa_family_t = u8;
++pub type pthread_t = ::uintptr_t;
++pub type nfds_t = ::c_uint;
++
++s! {
++    pub struct sockaddr {
++        pub sa_len: u8,
++        pub sa_family: sa_family_t,
++        pub sa_data: [::c_char; 14],
++    }
++
++    pub struct sockaddr_in6 {
++        pub sin6_len: u8,
++        pub sin6_family: sa_family_t,
++        pub sin6_port: ::in_port_t,
++        pub sin6_flowinfo: u32,
++        pub sin6_addr: ::in6_addr,
++        pub sin6_scope_id: u32,
++    }
++
++    pub struct sockaddr_un {
++        pub sun_len: u8,
++        pub sun_family: sa_family_t,
++        pub sun_path: [c_char; 104]
++    }
++
++    pub struct passwd {
++        pub pw_name: *mut ::c_char,
++        pub pw_passwd: *mut ::c_char,
++        pub pw_uid: ::uid_t,
++        pub pw_gid: ::gid_t,
++        pub pw_change: ::time_t,
++        pub pw_class: *mut ::c_char,
++        pub pw_gecos: *mut ::c_char,
++        pub pw_dir: *mut ::c_char,
++        pub pw_shell: *mut ::c_char,
++        pub pw_expire: ::time_t,
++
++        #[cfg(not(any(target_os = "macos",
++                      target_os = "ios",
++                      target_os = "netbsd",
++                      target_os = "openbsd")))]
++        pub pw_fields: ::c_int,
++    }
++
++    pub struct ifaddrs {
++        pub ifa_next: *mut ifaddrs,
++        pub ifa_name: *mut ::c_char,
++        pub ifa_flags: ::c_uint,
++        pub ifa_addr: *mut ::sockaddr,
++        pub ifa_netmask: *mut ::sockaddr,
++        pub ifa_dstaddr: *mut ::sockaddr,
++        pub ifa_data: *mut ::c_void
++    }
++
++    pub struct fd_set {
++        #[cfg(all(target_pointer_width = "64",
++                  any(target_os = "freebsd", target_os = "dragonfly")))]
++        fds_bits: [i64; FD_SETSIZE / 64],
++        #[cfg(not(all(target_pointer_width = "64",
++                      any(target_os = "freebsd", target_os = "dragonfly"))))]
++        fds_bits: [i32; FD_SETSIZE / 32],
++    }
++
++    pub struct tm {
++        pub tm_sec: ::c_int,
++        pub tm_min: ::c_int,
++        pub tm_hour: ::c_int,
++        pub tm_mday: ::c_int,
++        pub tm_mon: ::c_int,
++        pub tm_year: ::c_int,
++        pub tm_wday: ::c_int,
++        pub tm_yday: ::c_int,
++        pub tm_isdst: ::c_int,
++        pub tm_gmtoff: ::c_long,
++        pub tm_zone: *mut ::c_char,
++    }
++
++    pub struct utsname {
++        #[cfg(not(target_os = "dragonfly"))]
++        pub sysname: [::c_char; 256],
++        #[cfg(target_os = "dragonfly")]
++        pub sysname: [::c_char; 32],
++        #[cfg(not(target_os = "dragonfly"))]
++        pub nodename: [::c_char; 256],
++        #[cfg(target_os = "dragonfly")]
++        pub nodename: [::c_char; 32],
++        #[cfg(not(target_os = "dragonfly"))]
++        pub release: [::c_char; 256],
++        #[cfg(target_os = "dragonfly")]
++        pub release: [::c_char; 32],
++        #[cfg(not(target_os = "dragonfly"))]
++        pub version: [::c_char; 256],
++        #[cfg(target_os = "dragonfly")]
++        pub version: [::c_char; 32],
++        #[cfg(not(target_os = "dragonfly"))]
++        pub machine: [::c_char; 256],
++        #[cfg(target_os = "dragonfly")]
++        pub machine: [::c_char; 32],
++    }
++
++    pub struct msghdr {
++        pub msg_name: *mut ::c_void,
++        pub msg_namelen: ::socklen_t,
++        pub msg_iov: *mut ::iovec,
++        pub msg_iovlen: ::c_int,
++        pub msg_control: *mut ::c_void,
++        pub msg_controllen: ::socklen_t,
++        pub msg_flags: ::c_int,
++    }
++
++    pub struct cmsghdr {
++        pub cmsg_len: ::socklen_t,
++        pub cmsg_level: ::c_int,
++        pub cmsg_type: ::c_int,
++    }
++
++    pub struct fsid_t {
++        __fsid_val: [::int32_t; 2],
++    }
++
++    pub struct if_nameindex {
++        pub if_index: ::c_uint,
++        pub if_name: *mut ::c_char,
++    }
++}
++
++pub const LC_ALL: ::c_int = 0;
++pub const LC_COLLATE: ::c_int = 1;
++pub const LC_CTYPE: ::c_int = 2;
++pub const LC_MONETARY: ::c_int = 3;
++pub const LC_NUMERIC: ::c_int = 4;
++pub const LC_TIME: ::c_int = 5;
++pub const LC_MESSAGES: ::c_int = 6;
++
++pub const FIOCLEX: ::c_ulong = 0x20006601;
++pub const FIONBIO: ::c_ulong = 0x8004667e;
++
++pub const PATH_MAX: ::c_int = 1024;
++
++pub const SA_ONSTACK: ::c_int = 0x0001;
++pub const SA_SIGINFO: ::c_int = 0x0040;
++pub const SA_RESTART: ::c_int = 0x0002;
++pub const SA_RESETHAND: ::c_int = 0x0004;
++pub const SA_NOCLDSTOP: ::c_int = 0x0008;
++pub const SA_NODEFER: ::c_int = 0x0010;
++pub const SA_NOCLDWAIT: ::c_int = 0x0020;
++
++pub const SS_ONSTACK: ::c_int = 1;
++pub const SS_DISABLE: ::c_int = 4;
++
++pub const SIGCHLD: ::c_int = 20;
++pub const SIGBUS: ::c_int = 10;
++pub const SIGUSR1: ::c_int = 30;
++pub const SIGUSR2: ::c_int = 31;
++pub const SIGCONT: ::c_int = 19;
++pub const SIGSTOP: ::c_int = 17;
++pub const SIGTSTP: ::c_int = 18;
++pub const SIGURG: ::c_int = 16;
++pub const SIGIO: ::c_int = 23;
++pub const SIGSYS: ::c_int = 12;
++pub const SIGTTIN: ::c_int = 21;
++pub const SIGTTOU: ::c_int = 22;
++pub const SIGXCPU: ::c_int = 24;
++pub const SIGXFSZ: ::c_int = 25;
++pub const SIGVTALRM: ::c_int = 26;
++pub const SIGPROF: ::c_int = 27;
++pub const SIGWINCH: ::c_int = 28;
++pub const SIGINFO: ::c_int = 29;
++
++pub const SIG_SETMASK: ::c_int = 3;
++pub const SIG_BLOCK: ::c_int = 0x1;
++pub const SIG_UNBLOCK: ::c_int = 0x2;
++
++pub const IP_MULTICAST_IF: ::c_int = 9;
++pub const IP_MULTICAST_TTL: ::c_int = 10;
++pub const IP_MULTICAST_LOOP: ::c_int = 11;
++
++pub const IPV6_MULTICAST_LOOP: ::c_int = 11;
++pub const IPV6_V6ONLY: ::c_int = 27;
++
++pub const ST_RDONLY: ::c_ulong = 1;
++
++pub const SCM_RIGHTS: ::c_int = 0x01;
++
++pub const NCCS: usize = 20;
++
++pub const O_ACCMODE: ::c_int = 0x3;
++pub const O_RDONLY: ::c_int = 0;
++pub const O_WRONLY: ::c_int = 1;
++pub const O_RDWR: ::c_int = 2;
++pub const O_APPEND: ::c_int = 8;
++pub const O_CREAT: ::c_int = 512;
++pub const O_TRUNC: ::c_int = 1024;
++pub const O_EXCL: ::c_int = 2048;
++pub const O_ASYNC: ::c_int = 0x40;
++pub const O_SYNC: ::c_int = 0x80;
++pub const O_NONBLOCK: ::c_int = 0x4;
++pub const O_NOFOLLOW: ::c_int = 0x100;
++pub const O_SHLOCK: ::c_int = 0x10;
++pub const O_EXLOCK: ::c_int = 0x20;
++pub const O_FSYNC: ::c_int = O_SYNC;
++pub const O_NDELAY: ::c_int = O_NONBLOCK;
++
++pub const F_GETOWN: ::c_int = 5;
++pub const F_SETOWN: ::c_int = 6;
++
++pub const MNT_FORCE: ::c_int = 0x80000;
++
++pub const Q_SYNC: ::c_int = 0x600;
++pub const Q_QUOTAON: ::c_int = 0x100;
++pub const Q_QUOTAOFF: ::c_int = 0x200;
++
++pub const TCIOFF: ::c_int = 3;
++pub const TCION: ::c_int = 4;
++pub const TCOOFF: ::c_int = 1;
++pub const TCOON: ::c_int = 2;
++pub const TCIFLUSH: ::c_int = 1;
++pub const TCOFLUSH: ::c_int = 2;
++pub const TCIOFLUSH: ::c_int = 3;
++pub const TCSANOW: ::c_int = 0;
++pub const TCSADRAIN: ::c_int = 1;
++pub const TCSAFLUSH: ::c_int = 2;
++pub const VEOF: usize = 0;
++pub const VEOL: usize = 1;
++pub const VEOL2: usize = 2;
++pub const VERASE: usize = 3;
++pub const VWERASE: usize = 4;
++pub const VKILL: usize = 5;
++pub const VREPRINT: usize = 6;
++pub const VINTR: usize = 8;
++pub const VQUIT: usize = 9;
++pub const VSUSP: usize = 10;
++pub const VDSUSP: usize = 11;
++pub const VSTART: usize = 12;
++pub const VSTOP: usize = 13;
++pub const VLNEXT: usize = 14;
++pub const VDISCARD: usize = 15;
++pub const VMIN: usize = 16;
++pub const VTIME: usize = 17;
++pub const VSTATUS: usize = 18;
++pub const _POSIX_VDISABLE: ::cc_t = 0xff;
++pub const IGNBRK: ::tcflag_t = 0x00000001;
++pub const BRKINT: ::tcflag_t = 0x00000002;
++pub const IGNPAR: ::tcflag_t = 0x00000004;
++pub const PARMRK: ::tcflag_t = 0x00000008;
++pub const INPCK: ::tcflag_t = 0x00000010;
++pub const ISTRIP: ::tcflag_t = 0x00000020;
++pub const INLCR: ::tcflag_t = 0x00000040;
++pub const IGNCR: ::tcflag_t = 0x00000080;
++pub const ICRNL: ::tcflag_t = 0x00000100;
++pub const IXON: ::tcflag_t = 0x00000200;
++pub const IXOFF: ::tcflag_t = 0x00000400;
++pub const IXANY: ::tcflag_t = 0x00000800;
++pub const IMAXBEL: ::tcflag_t = 0x00002000;
++pub const OPOST: ::tcflag_t = 0x1;
++pub const ONLCR: ::tcflag_t = 0x2;
++pub const OXTABS: ::tcflag_t = 0x4;
++pub const ONOEOT: ::tcflag_t = 0x8;
++pub const CIGNORE: ::tcflag_t = 0x00000001;
++pub const CSIZE: ::tcflag_t = 0x00000300;
++pub const CS5: ::tcflag_t = 0x00000000;
++pub const CS6: ::tcflag_t = 0x00000100;
++pub const CS7: ::tcflag_t = 0x00000200;
++pub const CS8: ::tcflag_t = 0x00000300;
++pub const CSTOPB: ::tcflag_t = 0x00000400;
++pub const CREAD: ::tcflag_t = 0x00000800;
++pub const PARENB: ::tcflag_t = 0x00001000;
++pub const PARODD: ::tcflag_t = 0x00002000;
++pub const HUPCL: ::tcflag_t = 0x00004000;
++pub const CLOCAL: ::tcflag_t = 0x00008000;
++pub const ECHOKE: ::tcflag_t = 0x00000001;
++pub const ECHOE: ::tcflag_t = 0x00000002;
++pub const ECHOK: ::tcflag_t = 0x00000004;
++pub const ECHO: ::tcflag_t = 0x00000008;
++pub const ECHONL: ::tcflag_t = 0x00000010;
++pub const ECHOPRT: ::tcflag_t = 0x00000020;
++pub const ECHOCTL: ::tcflag_t = 0x00000040;
++pub const ISIG: ::tcflag_t = 0x00000080;
++pub const ICANON: ::tcflag_t = 0x00000100;
++pub const ALTWERASE: ::tcflag_t = 0x00000200;
++pub const IEXTEN: ::tcflag_t = 0x00000400;
++pub const EXTPROC: ::tcflag_t = 0x00000800;
++pub const TOSTOP: ::tcflag_t = 0x00400000;
++pub const FLUSHO: ::tcflag_t = 0x00800000;
++pub const NOKERNINFO: ::tcflag_t = 0x02000000;
++pub const PENDIN: ::tcflag_t = 0x20000000;
++pub const NOFLSH: ::tcflag_t = 0x80000000;
++pub const MDMBUF: ::tcflag_t = 0x00100000;
++
++pub const WNOHANG: ::c_int = 0x00000001;
++pub const WUNTRACED: ::c_int = 0x00000002;
++
++pub const RTLD_NOW: ::c_int = 0x2;
++pub const RTLD_NEXT: *mut ::c_void = -1isize as *mut ::c_void;
++pub const RTLD_DEFAULT: *mut ::c_void = -2isize as *mut ::c_void;
++pub const RTLD_SELF: *mut ::c_void = -3isize as *mut ::c_void;
++
++pub const LOG_CRON: ::c_int = 9 << 3;
++pub const LOG_AUTHPRIV: ::c_int = 10 << 3;
++pub const LOG_FTP: ::c_int = 11 << 3;
++pub const LOG_PERROR: ::c_int = 0x20;
++
++pub const TCP_MAXSEG: ::c_int = 2;
++
++pub const PIPE_BUF: usize = 512;
++
++pub const POLLRDNORM: ::c_short = 0x040;
++pub const POLLWRNORM: ::c_short = 0x004;
++pub const POLLRDBAND: ::c_short = 0x080;
++pub const POLLWRBAND: ::c_short = 0x100;
++
++f! {
++    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
++        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        let fd = fd as usize;
++        (*set).fds_bits[fd / bits] &= !(1 << (fd % bits));
++        return
++    }
++
++    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
++        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        let fd = fd as usize;
++        return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0
++    }
++
++    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
++        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        let fd = fd as usize;
++        (*set).fds_bits[fd / bits] |= 1 << (fd % bits);
++        return
++    }
++
++    pub fn FD_ZERO(set: *mut fd_set) -> () {
++        for slot in (*set).fds_bits.iter_mut() {
++            *slot = 0;
++        }
++    }
++
++    pub fn WTERMSIG(status: ::c_int) -> ::c_int {
++        status & 0o177
++    }
++
++    pub fn WIFEXITED(status: ::c_int) -> bool {
++        (status & 0o177) == 0
++    }
++
++    pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
++        status >> 8
++    }
++
++    pub fn WCOREDUMP(status: ::c_int) -> bool {
++        (status & 0o200) != 0
++    }
++}
++
++extern {
++    pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
++    pub fn freeifaddrs(ifa: *mut ::ifaddrs);
++    pub fn setgroups(ngroups: ::c_int,
++                     ptr: *const ::gid_t) -> ::c_int;
++    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
++    pub fn kqueue() -> ::c_int;
++    pub fn unmount(target: *const ::c_char, arg: ::c_int) -> ::c_int;
++    pub fn syscall(num: ::c_int, ...) -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
++    pub fn getpwnam_r(name: *const ::c_char,
++                      pwd: *mut passwd,
++                      buf: *mut ::c_char,
++                      buflen: ::size_t,
++                      result: *mut *mut passwd) -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
++    pub fn getpwuid_r(uid: ::uid_t,
++                      pwd: *mut passwd,
++                      buf: *mut ::c_char,
++                      buflen: ::size_t,
++                      result: *mut *mut passwd) -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__getpwent50")]
++    pub fn getpwent() -> *mut passwd;
++    pub fn setpwent();
++    pub fn getprogname() -> *const ::c_char;
++    pub fn setprogname(name: *const ::c_char);
++    pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
++    pub fn if_nameindex() -> *mut if_nameindex;
++    pub fn if_freenameindex(ptr: *mut if_nameindex);
++
++    pub fn getpeereid(socket: ::c_int,
++                      euid: *mut ::uid_t,
++                      egid: *mut ::gid_t) -> ::c_int;
++
++    #[cfg_attr(target_os = "macos", link_name = "glob$INODE64")]
++    #[cfg_attr(target_os = "netbsd", link_name = "__glob30")]
++    pub fn glob(pattern: *const ::c_char,
++                flags: ::c_int,
++                errfunc: Option<extern fn(epath: *const ::c_char,
++                                          errno: ::c_int) -> ::c_int>,
++                pglob: *mut ::glob_t) -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__globfree30")]
++    pub fn globfree(pglob: *mut ::glob_t);
++
++    pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
++                         -> ::c_int;
++
++    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
++               link_name = "seekdir$INODE64")]
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "seekdir$INODE64$UNIX2003")]
++    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
++               link_name = "telldir$INODE64")]
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "telldir$INODE64$UNIX2003")]
++    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
++    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
++                  -> ::c_int;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "msync$UNIX2003")]
++    #[cfg_attr(target_os = "netbsd", link_name = "__msync13")]
++    pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "recvfrom$UNIX2003")]
++    pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
++                    flags: ::c_int, addr: *mut ::sockaddr,
++                    addrlen: *mut ::socklen_t) -> ::ssize_t;
++    pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
++    pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int;
++    pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "bind$UNIX2003")]
++    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
++                address_len: ::socklen_t) -> ::c_int;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "writev$UNIX2003")]
++    pub fn writev(fd: ::c_int,
++                  iov: *const ::iovec,
++                  iovcnt: ::c_int) -> ::ssize_t;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "readv$UNIX2003")]
++    pub fn readv(fd: ::c_int,
++                 iov: *const ::iovec,
++                 iovcnt: ::c_int) -> ::ssize_t;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "sendmsg$UNIX2003")]
++    pub fn sendmsg(fd: ::c_int,
++                   msg: *const ::msghdr,
++                   flags: ::c_int) -> ::ssize_t;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "recvmsg$UNIX2003")]
++    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
++                   -> ::ssize_t;
++
++    pub fn sync();
++}
++
++cfg_if! {
++    if #[cfg(any(target_os = "macos", target_os = "ios"))] {
++        mod apple;
++        pub use self::apple::*;
++    } else if #[cfg(any(target_os = "openbsd", target_os = "netbsd",
++                        target_os = "bitrig"))] {
++        mod netbsdlike;
++        pub use self::netbsdlike::*;
++    } else if #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))] {
++        mod freebsdlike;
++        pub use self::freebsdlike::*;
++    } else {
++        // Unknown target_os
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..87756ff6fa295193a468134c42289a74c38e5145
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,631 @@@
++pub type time_t = i64;
++pub type mode_t = u32;
++pub type nlink_t = ::uint32_t;
++pub type ino_t = ::uint64_t;
++pub type pthread_key_t = ::c_int;
++pub type rlim_t = u64;
++pub type speed_t = ::c_uint;
++pub type tcflag_t = ::c_uint;
++pub type nl_item = c_long;
++pub type clockid_t = ::c_int;
++pub type id_t = ::uint32_t;
++pub type sem_t = *mut sem;
++
++pub enum timezone {}
++pub enum sem {}
++
++s! {
++    pub struct sigaction {
++        pub sa_sigaction: ::sighandler_t,
++        pub sa_mask: ::sigset_t,
++        pub sa_flags: ::c_int,
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_size: ::size_t,
++        pub ss_flags: ::c_int,
++    }
++
++    pub struct sockaddr_in {
++        pub sin_len: u8,
++        pub sin_family: ::sa_family_t,
++        pub sin_port: ::in_port_t,
++        pub sin_addr: ::in_addr,
++        pub sin_zero: [::int8_t; 8],
++    }
++
++    pub struct termios {
++        pub c_iflag: ::tcflag_t,
++        pub c_oflag: ::tcflag_t,
++        pub c_cflag: ::tcflag_t,
++        pub c_lflag: ::tcflag_t,
++        pub c_cc: [::cc_t; ::NCCS],
++        pub c_ispeed: ::c_int,
++        pub c_ospeed: ::c_int,
++    }
++
++    pub struct flock {
++        pub l_start: ::off_t,
++        pub l_len: ::off_t,
++        pub l_pid: ::pid_t,
++        pub l_type: ::c_short,
++        pub l_whence: ::c_short,
++    }
++}
++
++pub const D_T_FMT: ::nl_item = 0;
++pub const D_FMT: ::nl_item = 1;
++pub const T_FMT: ::nl_item = 2;
++pub const T_FMT_AMPM: ::nl_item = 3;
++pub const AM_STR: ::nl_item = 4;
++pub const PM_STR: ::nl_item = 5;
++
++pub const DAY_1: ::nl_item = 6;
++pub const DAY_2: ::nl_item = 7;
++pub const DAY_3: ::nl_item = 8;
++pub const DAY_4: ::nl_item = 9;
++pub const DAY_5: ::nl_item = 10;
++pub const DAY_6: ::nl_item = 11;
++pub const DAY_7: ::nl_item = 12;
++
++pub const ABDAY_1: ::nl_item = 13;
++pub const ABDAY_2: ::nl_item = 14;
++pub const ABDAY_3: ::nl_item = 15;
++pub const ABDAY_4: ::nl_item = 16;
++pub const ABDAY_5: ::nl_item = 17;
++pub const ABDAY_6: ::nl_item = 18;
++pub const ABDAY_7: ::nl_item = 19;
++
++pub const MON_1: ::nl_item = 20;
++pub const MON_2: ::nl_item = 21;
++pub const MON_3: ::nl_item = 22;
++pub const MON_4: ::nl_item = 23;
++pub const MON_5: ::nl_item = 24;
++pub const MON_6: ::nl_item = 25;
++pub const MON_7: ::nl_item = 26;
++pub const MON_8: ::nl_item = 27;
++pub const MON_9: ::nl_item = 28;
++pub const MON_10: ::nl_item = 29;
++pub const MON_11: ::nl_item = 30;
++pub const MON_12: ::nl_item = 31;
++
++pub const ABMON_1: ::nl_item = 32;
++pub const ABMON_2: ::nl_item = 33;
++pub const ABMON_3: ::nl_item = 34;
++pub const ABMON_4: ::nl_item = 35;
++pub const ABMON_5: ::nl_item = 36;
++pub const ABMON_6: ::nl_item = 37;
++pub const ABMON_7: ::nl_item = 38;
++pub const ABMON_8: ::nl_item = 39;
++pub const ABMON_9: ::nl_item = 40;
++pub const ABMON_10: ::nl_item = 41;
++pub const ABMON_11: ::nl_item = 42;
++pub const ABMON_12: ::nl_item = 43;
++
++pub const RADIXCHAR: ::nl_item = 44;
++pub const THOUSEP: ::nl_item = 45;
++pub const YESSTR: ::nl_item = 46;
++pub const YESEXPR: ::nl_item = 47;
++pub const NOSTR: ::nl_item = 48;
++pub const NOEXPR: ::nl_item = 49;
++pub const CRNCYSTR: ::nl_item = 50;
++
++pub const CODESET: ::nl_item = 51;
++
++pub const EXIT_FAILURE : ::c_int = 1;
++pub const EXIT_SUCCESS : ::c_int = 0;
++pub const RAND_MAX : ::c_int = 2147483647;
++pub const EOF : ::c_int = -1;
++pub const SEEK_SET : ::c_int = 0;
++pub const SEEK_CUR : ::c_int = 1;
++pub const SEEK_END : ::c_int = 2;
++pub const _IOFBF : ::c_int = 0;
++pub const _IONBF : ::c_int = 2;
++pub const _IOLBF : ::c_int = 1;
++pub const BUFSIZ : ::c_uint = 1024;
++pub const FOPEN_MAX : ::c_uint = 20;
++pub const FILENAME_MAX : ::c_uint = 1024;
++pub const L_tmpnam : ::c_uint = 1024;
++pub const O_NOCTTY : ::c_int = 32768;
++pub const S_IFIFO : mode_t = 4096;
++pub const S_IFCHR : mode_t = 8192;
++pub const S_IFBLK : mode_t = 24576;
++pub const S_IFDIR : mode_t = 16384;
++pub const S_IFREG : mode_t = 32768;
++pub const S_IFLNK : mode_t = 40960;
++pub const S_IFSOCK : mode_t = 49152;
++pub const S_IFMT : mode_t = 61440;
++pub const S_IEXEC : mode_t = 64;
++pub const S_IWRITE : mode_t = 128;
++pub const S_IREAD : mode_t = 256;
++pub const S_IRWXU : mode_t = 448;
++pub const S_IXUSR : mode_t = 64;
++pub const S_IWUSR : mode_t = 128;
++pub const S_IRUSR : mode_t = 256;
++pub const S_IRWXG : mode_t = 56;
++pub const S_IXGRP : mode_t = 8;
++pub const S_IWGRP : mode_t = 16;
++pub const S_IRGRP : mode_t = 32;
++pub const S_IRWXO : mode_t = 7;
++pub const S_IXOTH : mode_t = 1;
++pub const S_IWOTH : mode_t = 2;
++pub const S_IROTH : mode_t = 4;
++pub const F_OK : ::c_int = 0;
++pub const R_OK : ::c_int = 4;
++pub const W_OK : ::c_int = 2;
++pub const X_OK : ::c_int = 1;
++pub const STDIN_FILENO : ::c_int = 0;
++pub const STDOUT_FILENO : ::c_int = 1;
++pub const STDERR_FILENO : ::c_int = 2;
++pub const F_LOCK : ::c_int = 1;
++pub const F_TEST : ::c_int = 3;
++pub const F_TLOCK : ::c_int = 2;
++pub const F_ULOCK : ::c_int = 0;
++pub const F_GETLK: ::c_int = 7;
++pub const F_SETLK: ::c_int = 8;
++pub const F_SETLKW: ::c_int = 9;
++pub const SIGHUP : ::c_int = 1;
++pub const SIGINT : ::c_int = 2;
++pub const SIGQUIT : ::c_int = 3;
++pub const SIGILL : ::c_int = 4;
++pub const SIGABRT : ::c_int = 6;
++pub const SIGEMT: ::c_int = 7;
++pub const SIGFPE : ::c_int = 8;
++pub const SIGKILL : ::c_int = 9;
++pub const SIGSEGV : ::c_int = 11;
++pub const SIGPIPE : ::c_int = 13;
++pub const SIGALRM : ::c_int = 14;
++pub const SIGTERM : ::c_int = 15;
++pub const SIGSTKSZ : ::size_t = 40960;
++
++pub const PROT_NONE : ::c_int = 0;
++pub const PROT_READ : ::c_int = 1;
++pub const PROT_WRITE : ::c_int = 2;
++pub const PROT_EXEC : ::c_int = 4;
++
++pub const MAP_FILE : ::c_int = 0x0000;
++pub const MAP_SHARED : ::c_int = 0x0001;
++pub const MAP_PRIVATE : ::c_int = 0x0002;
++pub const MAP_FIXED : ::c_int = 0x0010;
++pub const MAP_ANON : ::c_int = 0x1000;
++
++pub const MAP_FAILED : *mut ::c_void = !0 as *mut ::c_void;
++
++pub const MCL_CURRENT : ::c_int = 0x0001;
++pub const MCL_FUTURE : ::c_int = 0x0002;
++
++pub const MS_ASYNC : ::c_int = 0x0001;
++
++pub const EPERM : ::c_int = 1;
++pub const ENOENT : ::c_int = 2;
++pub const ESRCH : ::c_int = 3;
++pub const EINTR : ::c_int = 4;
++pub const EIO : ::c_int = 5;
++pub const ENXIO : ::c_int = 6;
++pub const E2BIG : ::c_int = 7;
++pub const ENOEXEC : ::c_int = 8;
++pub const EBADF : ::c_int = 9;
++pub const ECHILD : ::c_int = 10;
++pub const EDEADLK : ::c_int = 11;
++pub const ENOMEM : ::c_int = 12;
++pub const EACCES : ::c_int = 13;
++pub const EFAULT : ::c_int = 14;
++pub const ENOTBLK : ::c_int = 15;
++pub const EBUSY : ::c_int = 16;
++pub const EEXIST : ::c_int = 17;
++pub const EXDEV : ::c_int = 18;
++pub const ENODEV : ::c_int = 19;
++pub const ENOTDIR : ::c_int = 20;
++pub const EISDIR : ::c_int = 21;
++pub const EINVAL : ::c_int = 22;
++pub const ENFILE : ::c_int = 23;
++pub const EMFILE : ::c_int = 24;
++pub const ENOTTY : ::c_int = 25;
++pub const ETXTBSY : ::c_int = 26;
++pub const EFBIG : ::c_int = 27;
++pub const ENOSPC : ::c_int = 28;
++pub const ESPIPE : ::c_int = 29;
++pub const EROFS : ::c_int = 30;
++pub const EMLINK : ::c_int = 31;
++pub const EPIPE : ::c_int = 32;
++pub const EDOM : ::c_int = 33;
++pub const ERANGE : ::c_int = 34;
++pub const EAGAIN : ::c_int = 35;
++pub const EWOULDBLOCK : ::c_int = 35;
++pub const EINPROGRESS : ::c_int = 36;
++pub const EALREADY : ::c_int = 37;
++pub const ENOTSOCK : ::c_int = 38;
++pub const EDESTADDRREQ : ::c_int = 39;
++pub const EMSGSIZE : ::c_int = 40;
++pub const EPROTOTYPE : ::c_int = 41;
++pub const ENOPROTOOPT : ::c_int = 42;
++pub const EPROTONOSUPPORT : ::c_int = 43;
++pub const ESOCKTNOSUPPORT : ::c_int = 44;
++pub const EOPNOTSUPP : ::c_int = 45;
++pub const EPFNOSUPPORT : ::c_int = 46;
++pub const EAFNOSUPPORT : ::c_int = 47;
++pub const EADDRINUSE : ::c_int = 48;
++pub const EADDRNOTAVAIL : ::c_int = 49;
++pub const ENETDOWN : ::c_int = 50;
++pub const ENETUNREACH : ::c_int = 51;
++pub const ENETRESET : ::c_int = 52;
++pub const ECONNABORTED : ::c_int = 53;
++pub const ECONNRESET : ::c_int = 54;
++pub const ENOBUFS : ::c_int = 55;
++pub const EISCONN : ::c_int = 56;
++pub const ENOTCONN : ::c_int = 57;
++pub const ESHUTDOWN : ::c_int = 58;
++pub const ETOOMANYREFS : ::c_int = 59;
++pub const ETIMEDOUT : ::c_int = 60;
++pub const ECONNREFUSED : ::c_int = 61;
++pub const ELOOP : ::c_int = 62;
++pub const ENAMETOOLONG : ::c_int = 63;
++pub const EHOSTDOWN : ::c_int = 64;
++pub const EHOSTUNREACH : ::c_int = 65;
++pub const ENOTEMPTY : ::c_int = 66;
++pub const EPROCLIM : ::c_int = 67;
++pub const EUSERS : ::c_int = 68;
++pub const EDQUOT : ::c_int = 69;
++pub const ESTALE : ::c_int = 70;
++pub const EREMOTE : ::c_int = 71;
++pub const EBADRPC : ::c_int = 72;
++pub const ERPCMISMATCH : ::c_int = 73;
++pub const EPROGUNAVAIL : ::c_int = 74;
++pub const EPROGMISMATCH : ::c_int = 75;
++pub const EPROCUNAVAIL : ::c_int = 76;
++pub const ENOLCK : ::c_int = 77;
++pub const ENOSYS : ::c_int = 78;
++pub const EFTYPE : ::c_int = 79;
++pub const EAUTH : ::c_int = 80;
++pub const ENEEDAUTH : ::c_int = 81;
++
++pub const F_DUPFD : ::c_int = 0;
++pub const F_GETFD : ::c_int = 1;
++pub const F_SETFD : ::c_int = 2;
++pub const F_GETFL : ::c_int = 3;
++pub const F_SETFL : ::c_int = 4;
++
++pub const SIGTRAP : ::c_int = 5;
++
++pub const GLOB_APPEND   : ::c_int = 0x0001;
++pub const GLOB_DOOFFS   : ::c_int = 0x0002;
++pub const GLOB_ERR      : ::c_int = 0x0004;
++pub const GLOB_MARK     : ::c_int = 0x0008;
++pub const GLOB_NOCHECK  : ::c_int = 0x0010;
++pub const GLOB_NOSORT   : ::c_int = 0x0020;
++pub const GLOB_NOESCAPE : ::c_int = 0x1000;
++
++pub const GLOB_NOSPACE  : ::c_int = -1;
++pub const GLOB_ABORTED  : ::c_int = -2;
++pub const GLOB_NOMATCH  : ::c_int = -3;
++pub const GLOB_NOSYS : ::c_int = -4;
++
++pub const POSIX_MADV_NORMAL : ::c_int = 0;
++pub const POSIX_MADV_RANDOM : ::c_int = 1;
++pub const POSIX_MADV_SEQUENTIAL : ::c_int = 2;
++pub const POSIX_MADV_WILLNEED : ::c_int = 3;
++pub const POSIX_MADV_DONTNEED : ::c_int = 4;
++
++pub const PTHREAD_CREATE_JOINABLE : ::c_int = 0;
++pub const PTHREAD_CREATE_DETACHED : ::c_int = 1;
++
++// http://man.openbsd.org/OpenBSD-current/man2/clock_getres.2
++// The man page says clock_gettime(3) can accept various values as clockid_t but
++// http://fxr.watson.org/fxr/source/kern/kern_time.c?v=OPENBSD;im=excerpts#L161
++// the implementation rejects anything other than the below two
++//
++// http://netbsd.gw.com/cgi-bin/man-cgi?clock_gettime
++// https://github.com/jsonn/src/blob/HEAD/sys/kern/subr_time.c#L222
++// Basically the same goes for NetBSD
++pub const CLOCK_REALTIME: clockid_t = 0;
++pub const CLOCK_MONOTONIC: clockid_t = 3;
++
++pub const RLIMIT_CPU: ::c_int = 0;
++pub const RLIMIT_FSIZE: ::c_int = 1;
++pub const RLIMIT_DATA: ::c_int = 2;
++pub const RLIMIT_STACK: ::c_int = 3;
++pub const RLIMIT_CORE: ::c_int = 4;
++pub const RLIMIT_RSS: ::c_int = 5;
++pub const RLIMIT_MEMLOCK: ::c_int = 6;
++pub const RLIMIT_NPROC: ::c_int = 7;
++pub const RLIMIT_NOFILE: ::c_int = 8;
++
++pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff;
++pub const RLIM_SAVED_MAX: rlim_t = RLIM_INFINITY;
++pub const RLIM_SAVED_CUR: rlim_t = RLIM_INFINITY;
++
++pub const RUSAGE_SELF: ::c_int = 0;
++pub const RUSAGE_CHILDREN: ::c_int = -1;
++
++pub const MADV_NORMAL : ::c_int = 0;
++pub const MADV_RANDOM : ::c_int = 1;
++pub const MADV_SEQUENTIAL : ::c_int = 2;
++pub const MADV_WILLNEED : ::c_int = 3;
++pub const MADV_DONTNEED : ::c_int = 4;
++pub const MADV_FREE : ::c_int = 6;
++
++pub const AF_UNSPEC: ::c_int = 0;
++pub const AF_LOCAL: ::c_int = 1;
++pub const AF_UNIX: ::c_int = AF_LOCAL;
++pub const AF_INET: ::c_int = 2;
++pub const AF_IMPLINK: ::c_int = 3;
++pub const AF_PUP: ::c_int = 4;
++pub const AF_CHAOS: ::c_int = 5;
++pub const AF_NS: ::c_int = 6;
++pub const AF_ISO: ::c_int = 7;
++pub const AF_OSI: ::c_int = AF_ISO;
++pub const AF_DATAKIT: ::c_int = 9;
++pub const AF_CCITT: ::c_int = 10;
++pub const AF_SNA: ::c_int = 11;
++pub const AF_DECnet: ::c_int = 12;
++pub const AF_DLI: ::c_int = 13;
++pub const AF_LAT: ::c_int = 14;
++pub const AF_HYLINK: ::c_int = 15;
++pub const AF_APPLETALK: ::c_int = 16;
++pub const AF_LINK: ::c_int = 18;
++pub const pseudo_AF_XTP: ::c_int = 19;
++pub const AF_COIP: ::c_int = 20;
++pub const AF_CNT: ::c_int = 21;
++pub const pseudo_AF_RTIP: ::c_int = 22;
++pub const AF_IPX: ::c_int = 23;
++pub const AF_INET6: ::c_int = 24;
++pub const pseudo_AF_PIP: ::c_int = 25;
++pub const AF_ISDN: ::c_int = 26;
++pub const AF_E164: ::c_int = AF_ISDN;
++pub const AF_NATM: ::c_int = 27;
++
++pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
++pub const PF_LOCAL: ::c_int = AF_LOCAL;
++pub const PF_UNIX: ::c_int = PF_LOCAL;
++pub const PF_INET: ::c_int = AF_INET;
++pub const PF_IMPLINK: ::c_int = AF_IMPLINK;
++pub const PF_PUP: ::c_int = AF_PUP;
++pub const PF_CHAOS: ::c_int = AF_CHAOS;
++pub const PF_NS: ::c_int = AF_NS;
++pub const PF_ISO: ::c_int = AF_ISO;
++pub const PF_OSI: ::c_int = AF_ISO;
++pub const PF_DATAKIT: ::c_int = AF_DATAKIT;
++pub const PF_CCITT: ::c_int = AF_CCITT;
++pub const PF_SNA: ::c_int = AF_SNA;
++pub const PF_DECnet: ::c_int = AF_DECnet;
++pub const PF_DLI: ::c_int = AF_DLI;
++pub const PF_LAT: ::c_int = AF_LAT;
++pub const PF_HYLINK: ::c_int = AF_HYLINK;
++pub const PF_APPLETALK: ::c_int = AF_APPLETALK;
++pub const PF_LINK: ::c_int = AF_LINK;
++pub const PF_XTP: ::c_int = pseudo_AF_XTP;
++pub const PF_COIP: ::c_int = AF_COIP;
++pub const PF_CNT: ::c_int = AF_CNT;
++pub const PF_IPX: ::c_int = AF_IPX;
++pub const PF_INET6: ::c_int = AF_INET6;
++pub const PF_RTIP: ::c_int = pseudo_AF_RTIP;
++pub const PF_PIP: ::c_int = pseudo_AF_PIP;
++pub const PF_ISDN: ::c_int = AF_ISDN;
++pub const PF_NATM: ::c_int = AF_NATM;
++
++pub const SOCK_STREAM: ::c_int = 1;
++pub const SOCK_DGRAM: ::c_int = 2;
++pub const SOCK_RAW: ::c_int = 3;
++pub const SOCK_RDM: ::c_int = 4;
++pub const SOCK_SEQPACKET: ::c_int = 5;
++pub const IP_TTL: ::c_int = 4;
++pub const IP_HDRINCL: ::c_int = 2;
++pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
++pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
++
++pub const TCP_NODELAY: ::c_int = 0x01;
++pub const SOL_SOCKET: ::c_int = 0xffff;
++pub const SO_DEBUG: ::c_int = 0x01;
++pub const SO_ACCEPTCONN: ::c_int = 0x0002;
++pub const SO_REUSEADDR: ::c_int = 0x0004;
++pub const SO_KEEPALIVE: ::c_int = 0x0008;
++pub const SO_DONTROUTE: ::c_int = 0x0010;
++pub const SO_BROADCAST: ::c_int = 0x0020;
++pub const SO_USELOOPBACK: ::c_int = 0x0040;
++pub const SO_LINGER: ::c_int = 0x0080;
++pub const SO_OOBINLINE: ::c_int = 0x0100;
++pub const SO_REUSEPORT: ::c_int = 0x0200;
++pub const SO_SNDBUF: ::c_int = 0x1001;
++pub const SO_RCVBUF: ::c_int = 0x1002;
++pub const SO_SNDLOWAT: ::c_int = 0x1003;
++pub const SO_RCVLOWAT: ::c_int = 0x1004;
++pub const SO_ERROR: ::c_int = 0x1007;
++pub const SO_TYPE: ::c_int = 0x1008;
++
++pub const SOMAXCONN: ::c_int = 128;
++
++pub const MSG_OOB: ::c_int = 0x1;
++pub const MSG_PEEK: ::c_int = 0x2;
++pub const MSG_DONTROUTE: ::c_int = 0x4;
++pub const MSG_EOR: ::c_int = 0x8;
++pub const MSG_TRUNC: ::c_int = 0x10;
++pub const MSG_CTRUNC: ::c_int = 0x20;
++pub const MSG_WAITALL: ::c_int = 0x40;
++pub const MSG_DONTWAIT: ::c_int = 0x80;
++pub const MSG_BCAST: ::c_int = 0x100;
++pub const MSG_MCAST: ::c_int = 0x200;
++pub const MSG_NOSIGNAL: ::c_int = 0x400;
++pub const MSG_CMSG_CLOEXEC: ::c_int = 0x800;
++
++pub const IFF_LOOPBACK: ::c_int = 0x8;
++
++pub const SHUT_RD: ::c_int = 0;
++pub const SHUT_WR: ::c_int = 1;
++pub const SHUT_RDWR: ::c_int = 2;
++
++pub const LOCK_SH: ::c_int = 1;
++pub const LOCK_EX: ::c_int = 2;
++pub const LOCK_NB: ::c_int = 4;
++pub const LOCK_UN: ::c_int = 8;
++
++pub const IPPROTO_RAW : ::c_int = 255;
++
++pub const _SC_ARG_MAX : ::c_int = 1;
++pub const _SC_CHILD_MAX : ::c_int = 2;
++pub const _SC_NGROUPS_MAX : ::c_int = 4;
++pub const _SC_OPEN_MAX : ::c_int = 5;
++pub const _SC_JOB_CONTROL : ::c_int = 6;
++pub const _SC_SAVED_IDS : ::c_int = 7;
++pub const _SC_VERSION : ::c_int = 8;
++pub const _SC_BC_BASE_MAX : ::c_int = 9;
++pub const _SC_BC_DIM_MAX : ::c_int = 10;
++pub const _SC_BC_SCALE_MAX : ::c_int = 11;
++pub const _SC_BC_STRING_MAX : ::c_int = 12;
++pub const _SC_COLL_WEIGHTS_MAX : ::c_int = 13;
++pub const _SC_EXPR_NEST_MAX : ::c_int = 14;
++pub const _SC_LINE_MAX : ::c_int = 15;
++pub const _SC_RE_DUP_MAX : ::c_int = 16;
++pub const _SC_2_VERSION : ::c_int = 17;
++pub const _SC_2_C_BIND : ::c_int = 18;
++pub const _SC_2_C_DEV : ::c_int = 19;
++pub const _SC_2_CHAR_TERM : ::c_int = 20;
++pub const _SC_2_FORT_DEV : ::c_int = 21;
++pub const _SC_2_FORT_RUN : ::c_int = 22;
++pub const _SC_2_LOCALEDEF : ::c_int = 23;
++pub const _SC_2_SW_DEV : ::c_int = 24;
++pub const _SC_2_UPE : ::c_int = 25;
++pub const _SC_STREAM_MAX : ::c_int = 26;
++pub const _SC_TZNAME_MAX : ::c_int = 27;
++pub const _SC_PAGESIZE : ::c_int = 28;
++pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
++pub const _SC_FSYNC : ::c_int = 29;
++pub const _SC_XOPEN_SHM : ::c_int = 30;
++
++pub const Q_GETQUOTA: ::c_int = 0x300;
++pub const Q_SETQUOTA: ::c_int = 0x400;
++
++pub const RTLD_GLOBAL: ::c_int = 0x100;
++
++pub const LOG_NFACILITIES: ::c_int = 24;
++
++pub const HW_NCPU: ::c_int = 3;
++
++pub const B0: speed_t = 0;
++pub const B50: speed_t = 50;
++pub const B75: speed_t = 75;
++pub const B110: speed_t = 110;
++pub const B134: speed_t = 134;
++pub const B150: speed_t = 150;
++pub const B200: speed_t = 200;
++pub const B300: speed_t = 300;
++pub const B600: speed_t = 600;
++pub const B1200: speed_t = 1200;
++pub const B1800: speed_t = 1800;
++pub const B2400: speed_t = 2400;
++pub const B4800: speed_t = 4800;
++pub const B9600: speed_t = 9600;
++pub const B19200: speed_t = 19200;
++pub const B38400: speed_t = 38400;
++pub const B7200: speed_t = 7200;
++pub const B14400: speed_t = 14400;
++pub const B28800: speed_t = 28800;
++pub const B57600: speed_t = 57600;
++pub const B76800: speed_t = 76800;
++pub const B115200: speed_t = 115200;
++pub const B230400: speed_t = 230400;
++pub const EXTA: speed_t = 19200;
++pub const EXTB: speed_t = 38400;
++
++pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
++
++pub const CRTSCTS: ::tcflag_t = 0x00010000;
++pub const CRTS_IFLOW: ::tcflag_t = CRTSCTS;
++pub const CCTS_OFLOW: ::tcflag_t = CRTSCTS;
++pub const OCRNL: ::tcflag_t = 0x10;
++
++pub const TIOCM_LE: ::c_int = 0o0001;
++pub const TIOCM_DTR: ::c_int = 0o0002;
++pub const TIOCM_RTS: ::c_int = 0o0004;
++pub const TIOCM_ST: ::c_int = 0o0010;
++pub const TIOCM_SR: ::c_int = 0o0020;
++pub const TIOCM_CTS: ::c_int = 0o0040;
++pub const TIOCM_CAR: ::c_int = 0o0100;
++pub const TIOCM_RNG: ::c_int = 0o0200;
++pub const TIOCM_DSR: ::c_int = 0o0400;
++pub const TIOCM_CD: ::c_int = TIOCM_CAR;
++pub const TIOCM_RI: ::c_int = TIOCM_RNG;
++
++f! {
++    pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
++        status >> 8
++    }
++
++    pub fn WIFSIGNALED(status: ::c_int) -> bool {
++        (status & 0o177) != 0o177 && (status & 0o177) != 0
++    }
++
++    pub fn WIFSTOPPED(status: ::c_int) -> bool {
++        (status & 0o177) == 0o177
++    }
++}
++
++#[link(name = "util")]
++extern {
++    pub fn mincore(addr: *mut ::c_void, len: ::size_t,
++                   vec: *mut ::c_char) -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__clock_getres50")]
++    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__clock_gettime50")]
++    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__clock_settime50")]
++    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
++    pub fn __errno() -> *mut ::c_int;
++    pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t)
++                    -> ::c_int;
++    pub fn memrchr(cx: *const ::c_void,
++                   c: ::c_int,
++                   n: ::size_t) -> *mut ::c_void;
++    pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
++    pub fn mkostemps(template: *mut ::c_char,
++                     suffixlen: ::c_int,
++                     flags: ::c_int) -> ::c_int;
++    pub fn pwritev(fd: ::c_int,
++                   iov: *const ::iovec,
++                   iovcnt: ::c_int,
++                   offset: ::off_t) -> ::ssize_t;
++    pub fn preadv(fd: ::c_int,
++                  iov: *const ::iovec,
++                  iovcnt: ::c_int,
++                  offset: ::off_t) -> ::ssize_t;
++    pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
++    pub fn fdatasync(fd: ::c_int) -> ::c_int;
++    pub fn openpty(amaster: *mut ::c_int,
++                   aslave: *mut ::c_int,
++                   name: *mut ::c_char,
++                   termp: *mut termios,
++                   winp: *mut ::winsize) -> ::c_int;
++    pub fn forkpty(amaster: *mut ::c_int,
++                   name: *mut ::c_char,
++                   termp: *mut termios,
++                   winp: *mut ::winsize) -> ::pid_t;
++    pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
++    pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
++
++    pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
++
++    pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
++                   mode: ::mode_t, dev: dev_t) -> ::c_int;
++    pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
++                    mode: ::mode_t) -> ::c_int;
++    pub fn sem_timedwait(sem: *mut sem_t,
++                         abstime: *const ::timespec) -> ::c_int;
++    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
++                                     clock_id: clockid_t) -> ::c_int;
++    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
++    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
++                                   abstime: *const ::timespec) -> ::c_int;
++    pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
++}
++
++cfg_if! {
++    if #[cfg(target_os = "netbsd")] {
++        mod netbsd;
++        pub use self::netbsd::*;
++    } else if #[cfg(any(target_os = "openbsd", target_os = "bitrig"))] {
++        mod openbsdlike;
++        pub use self::openbsdlike::*;
++    } else {
++        // Unknown target_os
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0472b5c8b0f19dcceba3c6e2c7c2415dd7c94927
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,825 @@@
++pub type clock_t = ::c_uint;
++pub type suseconds_t = ::c_int;
++pub type dev_t = u64;
++pub type blksize_t = ::int32_t;
++pub type fsblkcnt_t = ::uint64_t;
++pub type fsfilcnt_t = ::uint64_t;
++pub type idtype_t = ::c_int;
++
++s! {
++    pub struct aiocb {
++        pub aio_offset: ::off_t,
++        pub aio_buf: *mut ::c_void,
++        pub aio_nbytes: ::size_t,
++        pub aio_fildes: ::c_int,
++        pub aio_lio_opcode: ::c_int,
++        pub aio_reqprio: ::c_int,
++        pub aio_sigevent: ::sigevent,
++        _state: ::c_int,
++        _errno: ::c_int,
++        _retval: ::ssize_t
++    }
++
++    pub struct dirent {
++        pub d_fileno: ::ino_t,
++        pub d_reclen: u16,
++        pub d_namlen: u16,
++        pub d_type: u8,
++        pub d_name: [::c_char; 512],
++    }
++
++    pub struct glob_t {
++        pub gl_pathc:   ::size_t,
++        pub gl_matchc:  ::size_t,
++        pub gl_offs:    ::size_t,
++        pub gl_flags:   ::c_int,
++        pub gl_pathv:   *mut *mut ::c_char,
++
++        __unused3: *mut ::c_void,
++
++        __unused4: *mut ::c_void,
++        __unused5: *mut ::c_void,
++        __unused6: *mut ::c_void,
++        __unused7: *mut ::c_void,
++        __unused8: *mut ::c_void,
++    }
++
++    pub struct sigevent {
++        pub sigev_notify: ::c_int,
++        pub sigev_signo: ::c_int,
++        pub sigev_value: ::sigval,
++        __unused1: *mut ::c_void,       //actually a function pointer
++        pub sigev_notify_attributes: *mut ::c_void
++    }
++
++    pub struct sigset_t {
++        __bits: [u32; 4],
++    }
++
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        pub st_mode: ::mode_t,
++        pub st_ino: ::ino_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        pub st_atime: ::time_t,
++        pub st_atimensec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtimensec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctimensec: ::c_long,
++        pub st_birthtime: ::time_t,
++        pub st_birthtimensec: ::c_long,
++        pub st_size: ::off_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_blksize: ::blksize_t,
++        pub st_flags: ::uint32_t,
++        pub st_gen: ::uint32_t,
++        pub st_spare: [::uint32_t; 2],
++    }
++
++    pub struct statvfs {
++        pub f_flag: ::c_ulong,
++        pub f_bsize: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_iosize: ::c_ulong,
++
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_bresvd: ::fsblkcnt_t,
++
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_favail: ::fsfilcnt_t,
++        pub f_fresvd: ::fsfilcnt_t,
++
++        pub f_syncreads: ::uint64_t,
++        pub f_syncwrites: ::uint64_t,
++
++        pub f_asyncreads: ::uint64_t,
++        pub f_asyncwrites: ::uint64_t,
++
++        pub f_fsidx: ::fsid_t,
++        pub f_fsid: ::c_ulong,
++        pub f_namemax: ::c_ulong,
++        pub f_owner: ::uid_t,
++
++        pub f_spare: [::uint32_t; 4],
++
++        pub f_fstypename: [::c_char; 32],
++        pub f_mntonname: [::c_char; 1024],
++        pub f_mntfromname: [::c_char; 1024],
++    }
++
++    pub struct addrinfo {
++        pub ai_flags: ::c_int,
++        pub ai_family: ::c_int,
++        pub ai_socktype: ::c_int,
++        pub ai_protocol: ::c_int,
++        pub ai_addrlen: ::socklen_t,
++        pub ai_canonname: *mut ::c_char,
++        pub ai_addr: *mut ::sockaddr,
++        pub ai_next: *mut ::addrinfo,
++    }
++
++    pub struct sockaddr_storage {
++        pub ss_len: u8,
++        pub ss_family: ::sa_family_t,
++        __ss_pad1: [u8; 6],
++        __ss_pad2: i64,
++        __ss_pad3: [u8; 112],
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_code: ::c_int,
++        pub si_errno: ::c_int,
++        __pad1: ::c_int,
++        pub si_addr: *mut ::c_void,
++        __pad2: [u64; 13],
++    }
++
++    pub struct pthread_attr_t {
++        pta_magic: ::c_uint,
++        pta_flags: ::c_int,
++        pta_private: *mut ::c_void,
++    }
++
++    pub struct pthread_mutex_t {
++        ptm_magic: ::c_uint,
++        ptm_errorcheck: ::c_uchar,
++        ptm_pad1: [u8; 3],
++        ptm_interlock: ::c_uchar,
++        ptm_pad2: [u8; 3],
++        ptm_owner: ::pthread_t,
++        ptm_waiters: *mut u8,
++        ptm_recursed: ::c_uint,
++        ptm_spare2: *mut ::c_void,
++    }
++
++    pub struct pthread_mutexattr_t {
++        ptma_magic: ::c_uint,
++        ptma_private: *mut ::c_void,
++    }
++
++    pub struct pthread_rwlockattr_t {
++        ptra_magic: ::c_uint,
++        ptra_private: *mut ::c_void,
++    }
++
++    pub struct pthread_cond_t {
++        ptc_magic: ::c_uint,
++        ptc_lock: ::c_uchar,
++        ptc_waiters_first: *mut u8,
++        ptc_waiters_last: *mut u8,
++        ptc_mutex: *mut ::pthread_mutex_t,
++        ptc_private: *mut ::c_void,
++    }
++
++    pub struct pthread_condattr_t {
++        ptca_magic: ::c_uint,
++        ptca_private: *mut ::c_void,
++    }
++
++    pub struct pthread_rwlock_t {
++        ptr_magic: ::c_uint,
++        ptr_interlock: ::c_uchar,
++        ptr_rblocked_first: *mut u8,
++        ptr_rblocked_last: *mut u8,
++        ptr_wblocked_first: *mut u8,
++        ptr_wblocked_last: *mut u8,
++        ptr_nreaders: ::c_uint,
++        ptr_owner: ::pthread_t,
++        ptr_private: *mut ::c_void,
++    }
++
++    pub struct kevent {
++        pub ident: ::uintptr_t,
++        pub filter: ::uint32_t,
++        pub flags: ::uint32_t,
++        pub fflags: ::uint32_t,
++        pub data: ::int64_t,
++        pub udata: ::intptr_t,
++    }
++
++    pub struct dqblk {
++        pub dqb_bhardlimit: ::uint32_t,
++        pub dqb_bsoftlimit: ::uint32_t,
++        pub dqb_curblocks: ::uint32_t,
++        pub dqb_ihardlimit: ::uint32_t,
++        pub dqb_isoftlimit: ::uint32_t,
++        pub dqb_curinodes: ::uint32_t,
++        pub dqb_btime: ::int32_t,
++        pub dqb_itime: ::int32_t,
++    }
++
++    pub struct Dl_info {
++        pub dli_fname: *const ::c_char,
++        pub dli_fbase: *mut ::c_void,
++        pub dli_sname: *const ::c_char,
++        pub dli_saddr: *const ::c_void,
++    }
++
++    pub struct lconv {
++        pub decimal_point: *mut ::c_char,
++        pub thousands_sep: *mut ::c_char,
++        pub grouping: *mut ::c_char,
++        pub int_curr_symbol: *mut ::c_char,
++        pub currency_symbol: *mut ::c_char,
++        pub mon_decimal_point: *mut ::c_char,
++        pub mon_thousands_sep: *mut ::c_char,
++        pub mon_grouping: *mut ::c_char,
++        pub positive_sign: *mut ::c_char,
++        pub negative_sign: *mut ::c_char,
++        pub int_frac_digits: ::c_char,
++        pub frac_digits: ::c_char,
++        pub p_cs_precedes: ::c_char,
++        pub p_sep_by_space: ::c_char,
++        pub n_cs_precedes: ::c_char,
++        pub n_sep_by_space: ::c_char,
++        pub p_sign_posn: ::c_char,
++        pub n_sign_posn: ::c_char,
++        pub int_p_cs_precedes: ::c_char,
++        pub int_n_cs_precedes: ::c_char,
++        pub int_p_sep_by_space: ::c_char,
++        pub int_n_sep_by_space: ::c_char,
++        pub int_p_sign_posn: ::c_char,
++        pub int_n_sign_posn: ::c_char,
++    }
++
++    pub struct if_data {
++        pub ifi_type: ::c_uchar,
++        pub ifi_addrlen: ::c_uchar,
++        pub ifi_hdrlen: ::c_uchar,
++        pub ifi_link_state: ::c_int,
++        pub ifi_mtu: u64,
++        pub ifi_metric: u64,
++        pub ifi_baudrate: u64,
++        pub ifi_ipackets: u64,
++        pub ifi_ierrors: u64,
++        pub ifi_opackets: u64,
++        pub ifi_oerrors: u64,
++        pub ifi_collisions: u64,
++        pub ifi_ibytes: u64,
++        pub ifi_obytes: u64,
++        pub ifi_imcasts: u64,
++        pub ifi_omcasts: u64,
++        pub ifi_iqdrops: u64,
++        pub ifi_noproto: u64,
++        pub ifi_lastchange: ::timespec,
++    }
++
++    pub struct if_msghdr {
++        pub ifm_msglen: ::c_ushort,
++        pub ifm_version: ::c_uchar,
++        pub ifm_type: ::c_uchar,
++        pub ifm_addrs: ::c_int,
++        pub ifm_flags: ::c_int,
++        pub ifm_index: ::c_ushort,
++        pub ifm_data: if_data,
++    }
++}
++
++pub const AT_FDCWD: ::c_int = -100;
++pub const AT_EACCESS: ::c_int = 0x100;
++pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x200;
++pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
++pub const AT_REMOVEDIR: ::c_int = 0x800;
++
++pub const LC_COLLATE_MASK: ::c_int = (1 << ::LC_COLLATE);
++pub const LC_CTYPE_MASK: ::c_int = (1 << ::LC_CTYPE);
++pub const LC_MONETARY_MASK: ::c_int = (1 << ::LC_MONETARY);
++pub const LC_NUMERIC_MASK: ::c_int = (1 << ::LC_NUMERIC);
++pub const LC_TIME_MASK: ::c_int = (1 << ::LC_TIME);
++pub const LC_MESSAGES_MASK: ::c_int = (1 << ::LC_MESSAGES);
++pub const LC_ALL_MASK: ::c_int = !0;
++
++pub const ERA: ::nl_item = 52;
++pub const ERA_D_FMT: ::nl_item = 53;
++pub const ERA_D_T_FMT: ::nl_item = 54;
++pub const ERA_T_FMT: ::nl_item = 55;
++pub const ALT_DIGITS: ::nl_item = 56;
++
++pub const O_CLOEXEC: ::c_int = 0x400000;
++pub const O_ALT_IO: ::c_int = 0x40000;
++pub const O_NOSIGPIPE: ::c_int = 0x1000000;
++pub const O_SEARCH: ::c_int = 0x800000;
++pub const O_DIRECTORY: ::c_int = 0x200000;
++pub const O_DIRECT : ::c_int = 0x00080000;
++pub const O_RSYNC : ::c_int = 0x00020000;
++
++pub const MS_SYNC : ::c_int = 0x4;
++pub const MS_INVALIDATE : ::c_int = 0x2;
++
++pub const RLIM_NLIMITS: ::c_int = 12;
++
++pub const ENOATTR : ::c_int = 93;
++pub const EILSEQ : ::c_int = 85;
++pub const EOVERFLOW : ::c_int = 84;
++pub const ECANCELED : ::c_int = 87;
++pub const EIDRM : ::c_int = 82;
++pub const ENOMSG : ::c_int = 83;
++pub const ENOTSUP : ::c_int = 86;
++pub const ELAST : ::c_int = 96;
++
++pub const F_DUPFD_CLOEXEC : ::c_int = 12;
++pub const F_CLOSEM: ::c_int = 10;
++pub const F_GETNOSIGPIPE: ::c_int = 13;
++pub const F_SETNOSIGPIPE: ::c_int = 14;
++pub const F_MAXFD: ::c_int = 11;
++
++pub const IPV6_JOIN_GROUP: ::c_int = 12;
++pub const IPV6_LEAVE_GROUP: ::c_int = 13;
++
++pub const SOCK_CONN_DGRAM: ::c_int = 6;
++pub const SOCK_DCCP: ::c_int = SOCK_CONN_DGRAM;
++pub const SOCK_NOSIGPIPE: ::c_int = 0x40000000;
++pub const SOCK_FLAGS_MASK: ::c_int = 0xf0000000;
++
++pub const SO_SNDTIMEO: ::c_int = 0x100b;
++pub const SO_RCVTIMEO: ::c_int = 0x100c;
++pub const SO_ACCEPTFILTER: ::c_int = 0x1000;
++pub const SO_TIMESTAMP: ::c_int = 0x2000;
++pub const SO_OVERFLOWED: ::c_int = 0x1009;
++pub const SO_NOHEADER: ::c_int = 0x100a;
++
++pub const AF_OROUTE: ::c_int = 17;
++pub const AF_ARP: ::c_int = 28;
++pub const pseudo_AF_KEY: ::c_int = 29;
++pub const pseudo_AF_HDRCMPLT: ::c_int = 30;
++pub const AF_BLUETOOTH: ::c_int = 31;
++pub const AF_IEEE80211: ::c_int = 32;
++pub const AF_MPLS: ::c_int = 33;
++pub const AF_ROUTE: ::c_int = 34;
++pub const AF_MAX: ::c_int = 35;
++
++pub const NET_MAXID: ::c_int = AF_MAX;
++pub const NET_RT_DUMP: ::c_int = 1;
++pub const NET_RT_FLAGS: ::c_int = 2;
++pub const NET_RT_OOIFLIST: ::c_int = 3;
++pub const NET_RT_OIFLIST: ::c_int = 4;
++pub const NET_RT_IFLIST: ::c_int = 5;
++pub const NET_RT_MAXID: ::c_int = 6;
++
++pub const PF_OROUTE: ::c_int = AF_OROUTE;
++pub const PF_ARP: ::c_int = AF_ARP;
++pub const PF_KEY: ::c_int = pseudo_AF_KEY;
++pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
++pub const PF_MPLS: ::c_int = AF_MPLS;
++pub const PF_ROUTE: ::c_int = AF_ROUTE;
++pub const PF_MAX: ::c_int = AF_MAX;
++
++pub const MSG_NBIO: ::c_int = 0x1000;
++pub const MSG_WAITFORONE: ::c_int = 0x2000;
++pub const MSG_NOTIFICATION: ::c_int = 0x4000;
++
++pub const SCM_TIMESTAMP: ::c_int = 0x08;
++pub const SCM_CREDS: ::c_int = 0x10;
++
++pub const O_DSYNC : ::c_int = 0x10000;
++
++pub const MAP_RENAME : ::c_int = 0x20;
++pub const MAP_NORESERVE : ::c_int = 0x40;
++pub const MAP_HASSEMAPHORE : ::c_int = 0x200;
++pub const MAP_WIRED: ::c_int = 0x800;
++
++pub const _PC_LINK_MAX : ::c_int = 1;
++pub const _PC_MAX_CANON : ::c_int = 2;
++pub const _PC_MAX_INPUT : ::c_int = 3;
++pub const _PC_NAME_MAX : ::c_int = 4;
++pub const _PC_PATH_MAX : ::c_int = 5;
++pub const _PC_PIPE_BUF : ::c_int = 6;
++pub const _PC_CHOWN_RESTRICTED : ::c_int = 7;
++pub const _PC_NO_TRUNC : ::c_int = 8;
++pub const _PC_VDISABLE : ::c_int = 9;
++pub const _PC_SYNC_IO : ::c_int = 10;
++pub const _PC_FILESIZEBITS : ::c_int = 11;
++pub const _PC_SYMLINK_MAX : ::c_int = 12;
++pub const _PC_2_SYMLINKS : ::c_int = 13;
++pub const _PC_ACL_EXTENDED : ::c_int = 14;
++pub const _PC_MIN_HOLE_SIZE : ::c_int = 15;
++
++pub const _SC_SYNCHRONIZED_IO : ::c_int = 31;
++pub const _SC_IOV_MAX : ::c_int = 32;
++pub const _SC_MAPPED_FILES : ::c_int = 33;
++pub const _SC_MEMLOCK : ::c_int = 34;
++pub const _SC_MEMLOCK_RANGE : ::c_int = 35;
++pub const _SC_MEMORY_PROTECTION : ::c_int = 36;
++pub const _SC_LOGIN_NAME_MAX : ::c_int = 37;
++pub const _SC_MONOTONIC_CLOCK : ::c_int = 38;
++pub const _SC_CLK_TCK : ::c_int = 39;
++pub const _SC_ATEXIT_MAX : ::c_int = 40;
++pub const _SC_THREADS : ::c_int = 41;
++pub const _SC_SEMAPHORES : ::c_int = 42;
++pub const _SC_BARRIERS : ::c_int = 43;
++pub const _SC_TIMERS : ::c_int = 44;
++pub const _SC_SPIN_LOCKS : ::c_int = 45;
++pub const _SC_READER_WRITER_LOCKS : ::c_int = 46;
++pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 47;
++pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 48;
++pub const _SC_CLOCK_SELECTION : ::c_int = 49;
++pub const _SC_ASYNCHRONOUS_IO : ::c_int = 50;
++pub const _SC_AIO_LISTIO_MAX : ::c_int = 51;
++pub const _SC_AIO_MAX : ::c_int = 52;
++pub const _SC_MESSAGE_PASSING : ::c_int = 53;
++pub const _SC_MQ_OPEN_MAX : ::c_int = 54;
++pub const _SC_MQ_PRIO_MAX : ::c_int = 55;
++pub const _SC_PRIORITY_SCHEDULING : ::c_int = 56;
++pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 57;
++pub const _SC_THREAD_KEYS_MAX : ::c_int = 58;
++pub const _SC_THREAD_STACK_MIN : ::c_int = 59;
++pub const _SC_THREAD_THREADS_MAX : ::c_int = 60;
++pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 61;
++pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 62;
++pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 63;
++pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 64;
++pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 65;
++pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 66;
++pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 67;
++pub const _SC_TTY_NAME_MAX : ::c_int = 68;
++pub const _SC_HOST_NAME_MAX : ::c_int = 69;
++pub const _SC_PASS_MAX : ::c_int = 70;
++pub const _SC_REGEXP : ::c_int = 71;
++pub const _SC_SHELL : ::c_int = 72;
++pub const _SC_SYMLOOP_MAX : ::c_int = 73;
++pub const _SC_V6_ILP32_OFF32 : ::c_int = 74;
++pub const _SC_V6_ILP32_OFFBIG : ::c_int = 75;
++pub const _SC_V6_LP64_OFF64 : ::c_int = 76;
++pub const _SC_V6_LPBIG_OFFBIG : ::c_int = 77;
++pub const _SC_2_PBS : ::c_int = 80;
++pub const _SC_2_PBS_ACCOUNTING : ::c_int = 81;
++pub const _SC_2_PBS_CHECKPOINT : ::c_int = 82;
++pub const _SC_2_PBS_LOCATE : ::c_int = 83;
++pub const _SC_2_PBS_MESSAGE : ::c_int = 84;
++pub const _SC_2_PBS_TRACK : ::c_int = 85;
++pub const _SC_SPAWN : ::c_int = 86;
++pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 87;
++pub const _SC_TIMER_MAX : ::c_int = 88;
++pub const _SC_SEM_NSEMS_MAX : ::c_int = 89;
++pub const _SC_CPUTIME : ::c_int = 90;
++pub const _SC_THREAD_CPUTIME : ::c_int = 91;
++pub const _SC_DELAYTIMER_MAX : ::c_int = 92;
++// These two variables will be supported in NetBSD 8.0
++// pub const _SC_SIGQUEUE_MAX : ::c_int = 93;
++// pub const _SC_REALTIME_SIGNALS : ::c_int = 94;
++pub const _SC_PHYS_PAGES : ::c_int = 121;
++pub const _SC_NPROCESSORS_CONF : ::c_int = 1001;
++pub const _SC_NPROCESSORS_ONLN : ::c_int = 1002;
++pub const _SC_SCHED_RT_TS : ::c_int = 2001;
++pub const _SC_SCHED_PRI_MIN : ::c_int = 2002;
++pub const _SC_SCHED_PRI_MAX : ::c_int = 2003;
++
++pub const FD_SETSIZE: usize = 0x100;
++
++pub const ST_NOSUID: ::c_ulong = 8;
++
++pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
++    ptm_magic: 0x33330003,
++    ptm_errorcheck: 0,
++    ptm_interlock: 0,
++    ptm_waiters: 0 as *mut _,
++    ptm_owner: 0,
++    ptm_pad1: [0; 3],
++    ptm_pad2: [0; 3],
++    ptm_recursed: 0,
++    ptm_spare2: 0 as *mut _,
++};
++pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
++    ptc_magic: 0x55550005,
++    ptc_lock: 0,
++    ptc_waiters_first: 0 as *mut _,
++    ptc_waiters_last: 0 as *mut _,
++    ptc_mutex: 0 as *mut _,
++    ptc_private: 0 as *mut _,
++};
++pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
++    ptr_magic: 0x99990009,
++    ptr_interlock: 0,
++    ptr_rblocked_first: 0 as *mut _,
++    ptr_rblocked_last: 0 as *mut _,
++    ptr_wblocked_first: 0 as *mut _,
++    ptr_wblocked_last: 0 as *mut _,
++    ptr_nreaders: 0,
++    ptr_owner: 0,
++    ptr_private: 0 as *mut _,
++};
++pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
++pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
++pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
++pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
++
++pub const EVFILT_AIO: ::int32_t = 2;
++pub const EVFILT_PROC: ::int32_t = 4;
++pub const EVFILT_READ: ::int32_t = 0;
++pub const EVFILT_SIGNAL: ::int32_t = 5;
++pub const EVFILT_TIMER: ::int32_t = 6;
++pub const EVFILT_VNODE: ::int32_t = 3;
++pub const EVFILT_WRITE: ::int32_t = 1;
++
++pub const EV_ADD: ::uint32_t = 0x1;
++pub const EV_DELETE: ::uint32_t = 0x2;
++pub const EV_ENABLE: ::uint32_t = 0x4;
++pub const EV_DISABLE: ::uint32_t = 0x8;
++pub const EV_ONESHOT: ::uint32_t = 0x10;
++pub const EV_CLEAR: ::uint32_t = 0x20;
++pub const EV_RECEIPT: ::uint32_t = 0x40;
++pub const EV_DISPATCH: ::uint32_t = 0x80;
++pub const EV_FLAG1: ::uint32_t = 0x2000;
++pub const EV_ERROR: ::uint32_t = 0x4000;
++pub const EV_EOF: ::uint32_t = 0x8000;
++pub const EV_SYSFLAGS: ::uint32_t = 0xf000;
++
++pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
++pub const NOTE_DELETE: ::uint32_t = 0x00000001;
++pub const NOTE_WRITE: ::uint32_t = 0x00000002;
++pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
++pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
++pub const NOTE_LINK: ::uint32_t = 0x00000010;
++pub const NOTE_RENAME: ::uint32_t = 0x00000020;
++pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
++pub const NOTE_EXIT: ::uint32_t = 0x80000000;
++pub const NOTE_FORK: ::uint32_t = 0x40000000;
++pub const NOTE_EXEC: ::uint32_t = 0x20000000;
++pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
++pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
++pub const NOTE_TRACK: ::uint32_t = 0x00000001;
++pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
++pub const NOTE_CHILD: ::uint32_t = 0x00000004;
++
++pub const TMP_MAX : ::c_uint = 308915776;
++
++pub const NI_MAXHOST: ::socklen_t = 1025;
++
++pub const RTLD_NOLOAD: ::c_int = 0x2000;
++pub const RTLD_LOCAL: ::c_int = 0x200;
++
++pub const CTL_MAXNAME: ::c_int = 12;
++pub const SYSCTL_NAMELEN: ::c_int = 32;
++pub const SYSCTL_DEFSIZE: ::c_int = 8;
++pub const CTLTYPE_NODE: ::c_int = 1;
++pub const CTLTYPE_INT: ::c_int = 2;
++pub const CTLTYPE_STRING: ::c_int = 3;
++pub const CTLTYPE_QUAD: ::c_int = 4;
++pub const CTLTYPE_STRUCT: ::c_int = 5;
++pub const CTLTYPE_BOOL: ::c_int = 6;
++pub const CTLFLAG_READONLY: ::c_int = 0x00000000;
++pub const CTLFLAG_READWRITE: ::c_int = 0x00000070;
++pub const CTLFLAG_ANYWRITE: ::c_int = 0x00000080;
++pub const CTLFLAG_PRIVATE: ::c_int = 0x00000100;
++pub const CTLFLAG_PERMANENT: ::c_int = 0x00000200;
++pub const CTLFLAG_OWNDATA: ::c_int = 0x00000400;
++pub const CTLFLAG_IMMEDIATE: ::c_int = 0x00000800;
++pub const CTLFLAG_HEX: ::c_int = 0x00001000;
++pub const CTLFLAG_ROOT: ::c_int = 0x00002000;
++pub const CTLFLAG_ANYNUMBER: ::c_int = 0x00004000;
++pub const CTLFLAG_HIDDEN: ::c_int = 0x00008000;
++pub const CTLFLAG_ALIAS: ::c_int = 0x00010000;
++pub const CTLFLAG_MMAP: ::c_int = 0x00020000;
++pub const CTLFLAG_OWNDESC: ::c_int = 0x00040000;
++pub const CTLFLAG_UNSIGNED: ::c_int = 0x00080000;
++pub const SYSCTL_VERS_MASK: ::c_int = 0xff000000;
++pub const SYSCTL_VERS_0: ::c_int = 0x00000000;
++pub const SYSCTL_VERS_1: ::c_int = 0x01000000;
++pub const SYSCTL_VERSION: ::c_int = SYSCTL_VERS_1;
++pub const CTL_EOL: ::c_int = -1;
++pub const CTL_QUERY: ::c_int = -2;
++pub const CTL_CREATE: ::c_int = -3;
++pub const CTL_CREATESYM: ::c_int = -4;
++pub const CTL_DESTROY: ::c_int = -5;
++pub const CTL_MMAP: ::c_int = -6;
++pub const CTL_DESCRIBE: ::c_int = -7;
++pub const CTL_UNSPEC: ::c_int = 0;
++pub const CTL_KERN: ::c_int = 1;
++pub const CTL_VM: ::c_int = 2;
++pub const CTL_VFS: ::c_int = 3;
++pub const CTL_NET: ::c_int = 4;
++pub const CTL_DEBUG: ::c_int = 5;
++pub const CTL_HW: ::c_int = 6;
++pub const CTL_MACHDEP: ::c_int = 7;
++pub const CTL_USER: ::c_int = 8;
++pub const CTL_DDB: ::c_int = 9;
++pub const CTL_PROC: ::c_int = 10;
++pub const CTL_VENDOR: ::c_int = 11;
++pub const CTL_EMUL: ::c_int = 12;
++pub const CTL_SECURITY: ::c_int = 13;
++pub const CTL_MAXID: ::c_int = 14;
++pub const KERN_OSTYPE: ::c_int = 1;
++pub const KERN_OSRELEASE: ::c_int = 2;
++pub const KERN_OSREV: ::c_int = 3;
++pub const KERN_VERSION: ::c_int = 4;
++pub const KERN_MAXVNODES: ::c_int = 5;
++pub const KERN_MAXPROC: ::c_int = 6;
++pub const KERN_MAXFILES: ::c_int = 7;
++pub const KERN_ARGMAX: ::c_int = 8;
++pub const KERN_SECURELVL: ::c_int = 9;
++pub const KERN_HOSTNAME: ::c_int = 10;
++pub const KERN_HOSTID: ::c_int = 11;
++pub const KERN_CLOCKRATE: ::c_int = 12;
++pub const KERN_VNODE: ::c_int = 13;
++pub const KERN_PROC: ::c_int = 14;
++pub const KERN_FILE: ::c_int = 15;
++pub const KERN_PROF: ::c_int = 16;
++pub const KERN_POSIX1: ::c_int = 17;
++pub const KERN_NGROUPS: ::c_int = 18;
++pub const KERN_JOB_CONTROL: ::c_int = 19;
++pub const KERN_SAVED_IDS: ::c_int = 20;
++pub const KERN_OBOOTTIME: ::c_int = 21;
++pub const KERN_DOMAINNAME: ::c_int = 22;
++pub const KERN_MAXPARTITIONS: ::c_int = 23;
++pub const KERN_RAWPARTITION: ::c_int = 24;
++pub const KERN_NTPTIME: ::c_int = 25;
++pub const KERN_TIMEX: ::c_int = 26;
++pub const KERN_AUTONICETIME: ::c_int = 27;
++pub const KERN_AUTONICEVAL: ::c_int = 28;
++pub const KERN_RTC_OFFSET: ::c_int = 29;
++pub const KERN_ROOT_DEVICE: ::c_int = 30;
++pub const KERN_MSGBUFSIZE: ::c_int = 31;
++pub const KERN_FSYNC: ::c_int = 32;
++pub const KERN_OLDSYSVMSG: ::c_int = 33;
++pub const KERN_OLDSYSVSEM: ::c_int = 34;
++pub const KERN_OLDSYSVSHM: ::c_int = 35;
++pub const KERN_OLDSHORTCORENAME: ::c_int = 36;
++pub const KERN_SYNCHRONIZED_IO: ::c_int = 37;
++pub const KERN_IOV_MAX: ::c_int = 38;
++pub const KERN_MBUF: ::c_int = 39;
++pub const KERN_MAPPED_FILES: ::c_int = 40;
++pub const KERN_MEMLOCK: ::c_int = 41;
++pub const KERN_MEMLOCK_RANGE: ::c_int = 42;
++pub const KERN_MEMORY_PROTECTION: ::c_int = 43;
++pub const KERN_LOGIN_NAME_MAX: ::c_int = 44;
++pub const KERN_DEFCORENAME: ::c_int = 45;
++pub const KERN_LOGSIGEXIT: ::c_int = 46;
++pub const KERN_PROC2: ::c_int = 47;
++pub const KERN_PROC_ARGS: ::c_int = 48;
++pub const KERN_FSCALE: ::c_int = 49;
++pub const KERN_CCPU: ::c_int = 50;
++pub const KERN_CP_TIME: ::c_int = 51;
++pub const KERN_OLDSYSVIPC_INFO: ::c_int = 52;
++pub const KERN_MSGBUF: ::c_int = 53;
++pub const KERN_CONSDEV: ::c_int = 54;
++pub const KERN_MAXPTYS: ::c_int = 55;
++pub const KERN_PIPE: ::c_int = 56;
++pub const KERN_MAXPHYS: ::c_int = 57;
++pub const KERN_SBMAX: ::c_int = 58;
++pub const KERN_TKSTAT: ::c_int = 59;
++pub const KERN_MONOTONIC_CLOCK: ::c_int = 60;
++pub const KERN_URND: ::c_int = 61;
++pub const KERN_LABELSECTOR: ::c_int = 62;
++pub const KERN_LABELOFFSET: ::c_int = 63;
++pub const KERN_LWP: ::c_int = 64;
++pub const KERN_FORKFSLEEP: ::c_int = 65;
++pub const KERN_POSIX_THREADS: ::c_int = 66;
++pub const KERN_POSIX_SEMAPHORES: ::c_int = 67;
++pub const KERN_POSIX_BARRIERS: ::c_int = 68;
++pub const KERN_POSIX_TIMERS: ::c_int = 69;
++pub const KERN_POSIX_SPIN_LOCKS: ::c_int = 70;
++pub const KERN_POSIX_READER_WRITER_LOCKS: ::c_int = 71;
++pub const KERN_DUMP_ON_PANIC: ::c_int = 72;
++pub const KERN_SOMAXKVA: ::c_int = 73;
++pub const KERN_ROOT_PARTITION: ::c_int = 74;
++pub const KERN_DRIVERS: ::c_int = 75;
++pub const KERN_BUF: ::c_int = 76;
++pub const KERN_FILE2: ::c_int = 77;
++pub const KERN_VERIEXEC: ::c_int = 78;
++pub const KERN_CP_ID: ::c_int = 79;
++pub const KERN_HARDCLOCK_TICKS: ::c_int = 80;
++pub const KERN_ARND: ::c_int = 81;
++pub const KERN_SYSVIPC: ::c_int = 82;
++pub const KERN_BOOTTIME: ::c_int = 83;
++pub const KERN_EVCNT: ::c_int = 84;
++pub const KERN_MAXID: ::c_int = 85;
++pub const KERN_PROC_ALL: ::c_int = 0;
++pub const KERN_PROC_PID: ::c_int = 1;
++pub const KERN_PROC_PGRP: ::c_int = 2;
++pub const KERN_PROC_SESSION: ::c_int = 3;
++pub const KERN_PROC_TTY: ::c_int = 4;
++pub const KERN_PROC_UID: ::c_int = 5;
++pub const KERN_PROC_RUID: ::c_int = 6;
++pub const KERN_PROC_GID: ::c_int = 7;
++pub const KERN_PROC_RGID: ::c_int = 8;
++
++pub const EAI_SYSTEM: ::c_int = 11;
++
++pub const AIO_CANCELED: ::c_int = 1;
++pub const AIO_NOTCANCELED: ::c_int = 2;
++pub const AIO_ALLDONE: ::c_int = 3;
++pub const LIO_NOP: ::c_int = 0;
++pub const LIO_WRITE: ::c_int = 1;
++pub const LIO_READ: ::c_int = 2;
++pub const LIO_WAIT: ::c_int = 1;
++pub const LIO_NOWAIT: ::c_int = 0;
++
++pub const SIGEV_NONE: ::c_int = 0;
++pub const SIGEV_SIGNAL: ::c_int = 1;
++pub const SIGEV_THREAD: ::c_int = 2;
++
++pub const WSTOPPED: ::c_int = 0x00000002; // same as WUNTRACED
++pub const WCONTINUED: ::c_int = 0x00000010;
++pub const WEXITED: ::c_int = 0x000000020;
++pub const WNOWAIT: ::c_int = 0x00010000;
++
++pub const P_ALL: idtype_t = 0;
++pub const P_PID: idtype_t = 1;
++pub const P_PGID: idtype_t = 4;
++
++pub const B460800: ::speed_t = 460800;
++pub const B921600: ::speed_t = 921600;
++
++pub const ONOCR: ::tcflag_t = 0x20;
++pub const ONLRET: ::tcflag_t = 0x40;
++pub const CDTRCTS: ::tcflag_t = 0x00020000;
++pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS | ::CDTRCTS;
++
++// dirfd() is a macro on netbsd to access
++// the first field of the struct where dirp points to:
++// http://cvsweb.netbsd.org/bsdweb.cgi/src/include/dirent.h?rev=1.36
++f! {
++    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int {
++        unsafe { *(dirp as *const ::c_int) }
++    }
++}
++
++extern {
++    pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
++    pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
++    pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
++    pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
++    pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
++    #[link_name = "__aio_suspend50"]
++    pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
++                       timeout: *const ::timespec) -> ::c_int;
++    pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
++    pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
++                      nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
++
++    pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
++    pub fn getnameinfo(sa: *const ::sockaddr,
++                       salen: ::socklen_t,
++                       host: *mut ::c_char,
++                       hostlen: ::socklen_t,
++                       serv: *mut ::c_char,
++                       sevlen: ::socklen_t,
++                       flags: ::c_int) -> ::c_int;
++    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
++                    -> ::c_int;
++    pub fn sysctl(name: *const ::c_int,
++                  namelen: ::c_uint,
++                  oldp: *mut ::c_void,
++                  oldlenp: *mut ::size_t,
++                  newp: *const ::c_void,
++                  newlen: ::size_t)
++                  -> ::c_int;
++    pub fn sysctlbyname(name: *const ::c_char,
++                        oldp: *mut ::c_void,
++                        oldlenp: *mut ::size_t,
++                        newp: *const ::c_void,
++                        newlen: ::size_t)
++                        -> ::c_int;
++    #[link_name = "__kevent50"]
++    pub fn kevent(kq: ::c_int,
++                  changelist: *const ::kevent,
++                  nchanges: ::size_t,
++                  eventlist: *mut ::kevent,
++                  nevents: ::size_t,
++                  timeout: *const ::timespec) -> ::c_int;
++    #[link_name = "__mount50"]
++    pub fn mount(src: *const ::c_char,
++                 target: *const ::c_char,
++                 flags: ::c_int,
++                 data: *mut ::c_void,
++                 size: ::size_t) -> ::c_int;
++    pub fn ptrace(requeset: ::c_int,
++                  pid: ::pid_t,
++                  addr: *mut ::c_void,
++                  data: ::c_int) -> ::c_int;
++    pub fn pthread_setname_np(t: ::pthread_t,
++                              name: *const ::c_char,
++                              arg: *mut ::c_void) -> ::c_int;
++    pub fn pthread_getattr_np(native: ::pthread_t,
++                              attr: *mut ::pthread_attr_t) -> ::c_int;
++    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
++                                     guardsize: *mut ::size_t) -> ::c_int;
++    pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
++                                 stackaddr: *mut *mut ::c_void,
++                                 stacksize: *mut ::size_t) -> ::c_int;
++    #[link_name = "__sigtimedwait50"]
++    pub fn sigtimedwait(set: *const sigset_t,
++                        info: *mut siginfo_t,
++                        timeout: *const ::timespec) -> ::c_int;
++    pub fn sigwaitinfo(set: *const sigset_t,
++                       info: *mut siginfo_t) -> ::c_int;
++    pub fn duplocale(base: ::locale_t) -> ::locale_t;
++    pub fn freelocale(loc: ::locale_t);
++    pub fn localeconv_l(loc: ::locale_t) -> *mut lconv;
++    pub fn newlocale(mask: ::c_int,
++                     locale: *const ::c_char,
++                     base: ::locale_t) -> ::locale_t;
++    #[link_name = "__settimeofday50"]
++    pub fn settimeofday(tv: *const ::timeval, tz: *const ::c_void) -> ::c_int;
++}
++
++mod other;
++pub use self::other::*;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9b0b338b91e5b52050c6d0edab5b3d5ea0263037
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++pub type c_long = i32;
++pub type c_ulong = u32;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b07c476aa49d963c7476fa17418927e5ffc9c2e4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++pub type c_long = i64;
++pub type c_ulong = u64;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3a9bf0866c0bc7b03e8c3316922a5e1e107154cf
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++cfg_if! {
++    if #[cfg(any(target_arch = "sparc64",
++                 target_arch = "x86_64"))] {
++        mod b64;
++        pub use self::b64::*;
++    } else if #[cfg(any(target_arch = "arm",
++                        target_arch = "powerpc",
++                        target_arch = "x86"))] {
++        mod b32;
++        pub use self::b32::*;
++    } else {
++        // Unknown target_arch
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..695cf68dc5a4e9ac87c2962674a1c3990ffab01d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,75 @@@
++s! {
++    pub struct lconv {
++        pub decimal_point: *mut ::c_char,
++        pub thousands_sep: *mut ::c_char,
++        pub grouping: *mut ::c_char,
++        pub int_curr_symbol: *mut ::c_char,
++        pub currency_symbol: *mut ::c_char,
++        pub mon_decimal_point: *mut ::c_char,
++        pub mon_thousands_sep: *mut ::c_char,
++        pub mon_grouping: *mut ::c_char,
++        pub positive_sign: *mut ::c_char,
++        pub negative_sign: *mut ::c_char,
++        pub int_frac_digits: ::c_char,
++        pub frac_digits: ::c_char,
++        pub p_cs_precedes: ::c_char,
++        pub p_sep_by_space: ::c_char,
++        pub n_cs_precedes: ::c_char,
++        pub n_sep_by_space: ::c_char,
++        pub p_sign_posn: ::c_char,
++        pub n_sign_posn: ::c_char,
++        pub int_p_cs_precedes: ::c_char,
++        pub int_n_cs_precedes: ::c_char,
++        pub int_p_sep_by_space: ::c_char,
++        pub int_n_sep_by_space: ::c_char,
++        pub int_p_sign_posn: ::c_char,
++        pub int_n_sign_posn: ::c_char,
++    }
++}
++
++pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
++pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
++pub const LC_MESSAGES_MASK: ::c_int = (1 << 2);
++pub const LC_MONETARY_MASK: ::c_int = (1 << 3);
++pub const LC_NUMERIC_MASK: ::c_int = (1 << 4);
++pub const LC_TIME_MASK: ::c_int = (1 << 5);
++pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
++                               | LC_CTYPE_MASK
++                               | LC_MESSAGES_MASK
++                               | LC_MONETARY_MASK
++                               | LC_NUMERIC_MASK
++                               | LC_TIME_MASK;
++
++pub const ERA: ::nl_item = 52;
++pub const ERA_D_FMT: ::nl_item = 53;
++pub const ERA_D_T_FMT: ::nl_item = 54;
++pub const ERA_T_FMT: ::nl_item = 55;
++pub const ALT_DIGITS: ::nl_item = 56;
++
++pub const D_MD_ORDER: ::nl_item = 57;
++
++pub const ALTMON_1: ::nl_item = 58;
++pub const ALTMON_2: ::nl_item = 59;
++pub const ALTMON_3: ::nl_item = 60;
++pub const ALTMON_4: ::nl_item = 61;
++pub const ALTMON_5: ::nl_item = 62;
++pub const ALTMON_6: ::nl_item = 63;
++pub const ALTMON_7: ::nl_item = 64;
++pub const ALTMON_8: ::nl_item = 65;
++pub const ALTMON_9: ::nl_item = 66;
++pub const ALTMON_10: ::nl_item = 67;
++pub const ALTMON_11: ::nl_item = 68;
++pub const ALTMON_12: ::nl_item = 69;
++
++pub const KERN_RND: ::c_int = 31;
++
++extern {
++    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
++    pub fn duplocale(base: ::locale_t) -> ::locale_t;
++    pub fn freelocale(loc: ::locale_t) -> ::c_int;
++    pub fn newlocale(mask: ::c_int,
++                     locale: *const ::c_char,
++                     base: ::locale_t) -> ::locale_t;
++    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
++    pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ad364128de4371ac52ec169eb5334be56039f610
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,625 @@@
++use unix::bsd::O_SYNC;
++
++pub type clock_t = i64;
++pub type suseconds_t = ::c_long;
++pub type dev_t = i32;
++pub type sigset_t = ::c_uint;
++pub type blksize_t = ::int32_t;
++pub type fsblkcnt_t = ::uint64_t;
++pub type fsfilcnt_t = ::uint64_t;
++pub type pthread_attr_t = *mut ::c_void;
++pub type pthread_mutex_t = *mut ::c_void;
++pub type pthread_mutexattr_t = *mut ::c_void;
++pub type pthread_cond_t = *mut ::c_void;
++pub type pthread_condattr_t = *mut ::c_void;
++pub type pthread_rwlock_t = *mut ::c_void;
++pub type pthread_rwlockattr_t = *mut ::c_void;
++
++s! {
++    pub struct dirent {
++        pub d_fileno: ::ino_t,
++        pub d_off: ::off_t,
++        pub d_reclen: u16,
++        pub d_type: u8,
++        pub d_namlen: u8,
++        __d_padding: [u8; 4],
++        pub d_name: [::c_char; 256],
++    }
++
++    pub struct glob_t {
++        pub gl_pathc:   ::c_int,
++        pub gl_matchc:  ::c_int,
++        pub gl_offs:    ::c_int,
++        pub gl_flags:   ::c_int,
++        pub gl_pathv:   *mut *mut ::c_char,
++        __unused1: *mut ::c_void,
++        __unused2: *mut ::c_void,
++        __unused3: *mut ::c_void,
++        __unused4: *mut ::c_void,
++        __unused5: *mut ::c_void,
++        __unused6: *mut ::c_void,
++        __unused7: *mut ::c_void,
++    }
++
++    pub struct kevent {
++        pub ident: ::uintptr_t,
++        pub filter: ::c_short,
++        pub flags: ::c_ushort,
++        pub fflags: ::c_uint,
++        pub data: ::int64_t,
++        pub udata: *mut ::c_void,
++    }
++
++    pub struct stat {
++        pub st_mode: ::mode_t,
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_size: ::off_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_blksize: ::blksize_t,
++        pub st_flags: ::uint32_t,
++        pub st_gen: ::uint32_t,
++        pub st_birthtime: ::time_t,
++        pub st_birthtime_nsec: ::c_long,
++    }
++
++    pub struct statvfs {
++        pub f_bsize: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_favail: ::fsfilcnt_t,
++        pub f_fsid: ::c_ulong,
++        pub f_flag: ::c_ulong,
++        pub f_namemax: ::c_ulong,
++    }
++
++    pub struct addrinfo {
++        pub ai_flags: ::c_int,
++        pub ai_family: ::c_int,
++        pub ai_socktype: ::c_int,
++        pub ai_protocol: ::c_int,
++        pub ai_addrlen: ::socklen_t,
++        pub ai_addr: *mut ::sockaddr,
++        pub ai_canonname: *mut ::c_char,
++        pub ai_next: *mut ::addrinfo,
++    }
++
++    pub struct sockaddr_storage {
++        pub ss_len: u8,
++        pub ss_family: ::sa_family_t,
++        __ss_pad1: [u8; 6],
++        __ss_pad2: i64,
++        __ss_pad3: [u8; 240],
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_code: ::c_int,
++        pub si_errno: ::c_int,
++        pub si_addr: *mut ::c_char,
++        #[cfg(target_pointer_width = "32")]
++        __pad: [u8; 112],
++        #[cfg(target_pointer_width = "64")]
++        __pad: [u8; 108],
++    }
++
++    pub struct Dl_info {
++        pub dli_fname: *const ::c_char,
++        pub dli_fbase: *mut ::c_void,
++        pub dli_sname: *const ::c_char,
++        pub dli_saddr: *mut ::c_void,
++    }
++
++    pub struct lastlog {
++        ll_time: ::time_t,
++        ll_line: [::c_char; UT_LINESIZE],
++        ll_host: [::c_char; UT_HOSTSIZE],
++    }
++
++    pub struct utmp {
++        pub ut_line: [::c_char; UT_LINESIZE],
++        pub ut_name: [::c_char; UT_NAMESIZE],
++        pub ut_host: [::c_char; UT_HOSTSIZE],
++        pub ut_time: ::time_t,
++    }
++
++    pub struct if_data {
++        pub ifi_type: ::c_uchar,
++        pub ifi_addrlen: ::c_uchar,
++        pub ifi_hdrlen: ::c_uchar,
++        pub ifi_link_state: ::c_uchar,
++        pub ifi_mtu: u32,
++        pub ifi_metric: u32,
++        pub ifi_rdomain: u32,
++        pub ifi_baudrate: u64,
++        pub ifi_ipackets: u64,
++        pub ifi_ierrors: u64,
++        pub ifi_opackets: u64,
++        pub ifi_oerrors: u64,
++        pub ifi_collisions: u64,
++        pub ifi_ibytes: u64,
++        pub ifi_obytes: u64,
++        pub ifi_imcasts: u64,
++        pub ifi_omcasts: u64,
++        pub ifi_iqdrops: u64,
++        pub ifi_oqdrops: u64,
++        pub ifi_noproto: u64,
++        pub ifi_capabilities: u32,
++        pub ifi_lastchange: ::timeval,
++    }
++
++    pub struct if_msghdr {
++        pub ifm_msglen: ::c_ushort,
++        pub ifm_version: ::c_uchar,
++        pub ifm_type: ::c_uchar,
++        pub ifm_hdrlen: ::c_ushort,
++        pub ifm_index: ::c_ushort,
++        pub ifm_tableid: ::c_ushort,
++        pub ifm_pad1: ::c_uchar,
++        pub ifm_pad2: ::c_uchar,
++        pub ifm_addrs: ::c_int,
++        pub ifm_flags: ::c_int,
++        pub ifm_xflags: ::c_int,
++        pub ifm_data: if_data,
++    }
++}
++
++pub const UT_NAMESIZE: usize = 32;
++pub const UT_LINESIZE: usize = 8;
++pub const UT_HOSTSIZE: usize = 256;
++
++pub const O_CLOEXEC: ::c_int = 0x10000;
++pub const O_DIRECTORY: ::c_int = 0x20000;
++pub const O_RSYNC: ::c_int = O_SYNC;
++
++pub const MS_SYNC : ::c_int = 0x0002;
++pub const MS_INVALIDATE : ::c_int = 0x0004;
++
++pub const PTHREAD_STACK_MIN : ::size_t = 2048;
++
++pub const ENOATTR : ::c_int = 83;
++pub const EILSEQ : ::c_int = 84;
++pub const EOVERFLOW : ::c_int = 87;
++pub const ECANCELED : ::c_int = 88;
++pub const EIDRM : ::c_int = 89;
++pub const ENOMSG : ::c_int = 90;
++pub const ENOTSUP : ::c_int = 91;
++pub const ELAST : ::c_int = 91;
++
++pub const F_DUPFD_CLOEXEC : ::c_int = 10;
++
++pub const AT_FDCWD: ::c_int = -100;
++pub const AT_EACCESS: ::c_int = 0x01;
++pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x02;
++pub const AT_SYMLINK_FOLLOW: ::c_int = 0x04;
++pub const AT_REMOVEDIR: ::c_int = 0x08;
++
++pub const RLIM_NLIMITS: ::c_int = 9;
++
++pub const SO_SNDTIMEO: ::c_int = 0x1005;
++pub const SO_RCVTIMEO: ::c_int = 0x1006;
++pub const SO_BINDANY: ::c_int = 0x1000;
++pub const SO_NETPROC: ::c_int = 0x1020;
++pub const SO_RTABLE: ::c_int = 0x1021;
++pub const SO_PEERCRED: ::c_int = 0x1022;
++pub const SO_SPLICE: ::c_int = 0x1023;
++
++pub const AF_ECMA: ::c_int = 8;
++pub const AF_ROUTE: ::c_int = 17;
++pub const AF_ENCAP: ::c_int = 28;
++pub const AF_SIP: ::c_int = 29;
++pub const AF_KEY: ::c_int = 30;
++pub const pseudo_AF_HDRCMPLT: ::c_int = 31;
++pub const AF_BLUETOOTH: ::c_int = 32;
++pub const AF_MPLS: ::c_int = 33;
++pub const pseudo_AF_PFLOW: ::c_int = 34;
++pub const pseudo_AF_PIPEX: ::c_int = 35;
++#[doc(hidden)]
++pub const AF_MAX: ::c_int = 36;
++
++#[doc(hidden)]
++pub const NET_MAXID: ::c_int = AF_MAX;
++pub const NET_RT_DUMP: ::c_int = 1;
++pub const NET_RT_FLAGS: ::c_int = 2;
++pub const NET_RT_IFLIST: ::c_int = 3;
++pub const NET_RT_STATS: ::c_int = 4;
++pub const NET_RT_TABLE: ::c_int = 5;
++pub const NET_RT_IFNAMES: ::c_int = 6;
++#[doc(hidden)]
++pub const NET_RT_MAXID: ::c_int = 7;
++
++pub const IPV6_JOIN_GROUP: ::c_int = 12;
++pub const IPV6_LEAVE_GROUP: ::c_int = 13;
++
++pub const PF_ROUTE: ::c_int = AF_ROUTE;
++pub const PF_ECMA: ::c_int = AF_ECMA;
++pub const PF_ENCAP: ::c_int = AF_ENCAP;
++pub const PF_SIP: ::c_int = AF_SIP;
++pub const PF_KEY: ::c_int = AF_KEY;
++pub const PF_BPF: ::c_int = pseudo_AF_HDRCMPLT;
++pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
++pub const PF_MPLS: ::c_int = AF_MPLS;
++pub const PF_PFLOW: ::c_int = pseudo_AF_PFLOW;
++pub const PF_PIPEX: ::c_int = pseudo_AF_PIPEX;
++#[doc(hidden)]
++pub const PF_MAX: ::c_int = AF_MAX;
++
++pub const SCM_TIMESTAMP: ::c_int = 0x04;
++
++pub const O_DSYNC : ::c_int = 128;
++
++pub const MAP_RENAME : ::c_int = 0x0000;
++pub const MAP_NORESERVE : ::c_int = 0x0000;
++pub const MAP_HASSEMAPHORE : ::c_int = 0x0000;
++
++pub const EIPSEC : ::c_int = 82;
++pub const ENOMEDIUM : ::c_int = 85;
++pub const EMEDIUMTYPE : ::c_int = 86;
++
++pub const EAI_SYSTEM: ::c_int = -11;
++
++pub const RUSAGE_THREAD: ::c_int = 1;
++
++pub const MAP_COPY : ::c_int = 0x0002;
++pub const MAP_NOEXTEND : ::c_int = 0x0000;
++
++pub const _PC_LINK_MAX : ::c_int = 1;
++pub const _PC_MAX_CANON : ::c_int = 2;
++pub const _PC_MAX_INPUT : ::c_int = 3;
++pub const _PC_NAME_MAX : ::c_int = 4;
++pub const _PC_PATH_MAX : ::c_int = 5;
++pub const _PC_PIPE_BUF : ::c_int = 6;
++pub const _PC_CHOWN_RESTRICTED : ::c_int = 7;
++pub const _PC_NO_TRUNC : ::c_int = 8;
++pub const _PC_VDISABLE : ::c_int = 9;
++pub const _PC_2_SYMLINKS : ::c_int = 10;
++pub const _PC_ALLOC_SIZE_MIN : ::c_int = 11;
++pub const _PC_ASYNC_IO : ::c_int = 12;
++pub const _PC_FILESIZEBITS : ::c_int = 13;
++pub const _PC_PRIO_IO : ::c_int = 14;
++pub const _PC_REC_INCR_XFER_SIZE : ::c_int = 15;
++pub const _PC_REC_MAX_XFER_SIZE : ::c_int = 16;
++pub const _PC_REC_MIN_XFER_SIZE : ::c_int = 17;
++pub const _PC_REC_XFER_ALIGN : ::c_int = 18;
++pub const _PC_SYMLINK_MAX : ::c_int = 19;
++pub const _PC_SYNC_IO : ::c_int = 20;
++pub const _PC_TIMESTAMP_RESOLUTION : ::c_int = 21;
++
++pub const _SC_CLK_TCK : ::c_int = 3;
++pub const _SC_SEM_NSEMS_MAX : ::c_int = 31;
++pub const _SC_SEM_VALUE_MAX : ::c_int = 32;
++pub const _SC_HOST_NAME_MAX : ::c_int = 33;
++pub const _SC_MONOTONIC_CLOCK : ::c_int = 34;
++pub const _SC_2_PBS : ::c_int = 35;
++pub const _SC_2_PBS_ACCOUNTING : ::c_int = 36;
++pub const _SC_2_PBS_CHECKPOINT : ::c_int = 37;
++pub const _SC_2_PBS_LOCATE : ::c_int = 38;
++pub const _SC_2_PBS_MESSAGE : ::c_int = 39;
++pub const _SC_2_PBS_TRACK : ::c_int = 40;
++pub const _SC_ADVISORY_INFO : ::c_int = 41;
++pub const _SC_AIO_LISTIO_MAX : ::c_int = 42;
++pub const _SC_AIO_MAX : ::c_int = 43;
++pub const _SC_AIO_PRIO_DELTA_MAX : ::c_int = 44;
++pub const _SC_ASYNCHRONOUS_IO : ::c_int = 45;
++pub const _SC_ATEXIT_MAX : ::c_int = 46;
++pub const _SC_BARRIERS : ::c_int = 47;
++pub const _SC_CLOCK_SELECTION : ::c_int = 48;
++pub const _SC_CPUTIME : ::c_int = 49;
++pub const _SC_DELAYTIMER_MAX : ::c_int = 50;
++pub const _SC_IOV_MAX : ::c_int = 51;
++pub const _SC_IPV6 : ::c_int = 52;
++pub const _SC_MAPPED_FILES : ::c_int = 53;
++pub const _SC_MEMLOCK : ::c_int = 54;
++pub const _SC_MEMLOCK_RANGE : ::c_int = 55;
++pub const _SC_MEMORY_PROTECTION : ::c_int = 56;
++pub const _SC_MESSAGE_PASSING : ::c_int = 57;
++pub const _SC_MQ_OPEN_MAX : ::c_int = 58;
++pub const _SC_MQ_PRIO_MAX : ::c_int = 59;
++pub const _SC_PRIORITIZED_IO : ::c_int = 60;
++pub const _SC_PRIORITY_SCHEDULING : ::c_int = 61;
++pub const _SC_RAW_SOCKETS : ::c_int = 62;
++pub const _SC_READER_WRITER_LOCKS : ::c_int = 63;
++pub const _SC_REALTIME_SIGNALS : ::c_int = 64;
++pub const _SC_REGEXP : ::c_int = 65;
++pub const _SC_RTSIG_MAX : ::c_int = 66;
++pub const _SC_SEMAPHORES : ::c_int = 67;
++pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 68;
++pub const _SC_SHELL : ::c_int = 69;
++pub const _SC_SIGQUEUE_MAX : ::c_int = 70;
++pub const _SC_SPAWN : ::c_int = 71;
++pub const _SC_SPIN_LOCKS : ::c_int = 72;
++pub const _SC_SPORADIC_SERVER : ::c_int = 73;
++pub const _SC_SS_REPL_MAX : ::c_int = 74;
++pub const _SC_SYNCHRONIZED_IO : ::c_int = 75;
++pub const _SC_SYMLOOP_MAX : ::c_int = 76;
++pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 77;
++pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 78;
++pub const _SC_THREAD_CPUTIME : ::c_int = 79;
++pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 80;
++pub const _SC_THREAD_KEYS_MAX : ::c_int = 81;
++pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 82;
++pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 83;
++pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 84;
++pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 85;
++pub const _SC_THREAD_ROBUST_PRIO_INHERIT : ::c_int = 86;
++pub const _SC_THREAD_ROBUST_PRIO_PROTECT : ::c_int = 87;
++pub const _SC_THREAD_SPORADIC_SERVER : ::c_int = 88;
++pub const _SC_THREAD_STACK_MIN : ::c_int = 89;
++pub const _SC_THREAD_THREADS_MAX : ::c_int = 90;
++pub const _SC_THREADS : ::c_int = 91;
++pub const _SC_TIMEOUTS : ::c_int = 92;
++pub const _SC_TIMER_MAX : ::c_int = 93;
++pub const _SC_TIMERS : ::c_int = 94;
++pub const _SC_TRACE : ::c_int = 95;
++pub const _SC_TRACE_EVENT_FILTER : ::c_int = 96;
++pub const _SC_TRACE_EVENT_NAME_MAX : ::c_int = 97;
++pub const _SC_TRACE_INHERIT : ::c_int = 98;
++pub const _SC_TRACE_LOG : ::c_int = 99;
++pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 100;
++pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 101;
++pub const _SC_LOGIN_NAME_MAX : ::c_int = 102;
++pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 103;
++pub const _SC_TRACE_NAME_MAX : ::c_int = 104;
++pub const _SC_TRACE_SYS_MAX : ::c_int = 105;
++pub const _SC_TRACE_USER_EVENT_MAX : ::c_int = 106;
++pub const _SC_TTY_NAME_MAX : ::c_int = 107;
++pub const _SC_TYPED_MEMORY_OBJECTS : ::c_int = 108;
++pub const _SC_V6_ILP32_OFF32 : ::c_int = 109;
++pub const _SC_V6_ILP32_OFFBIG : ::c_int = 110;
++pub const _SC_V6_LP64_OFF64 : ::c_int = 111;
++pub const _SC_V6_LPBIG_OFFBIG : ::c_int = 112;
++pub const _SC_V7_ILP32_OFF32 : ::c_int = 113;
++pub const _SC_V7_ILP32_OFFBIG : ::c_int = 114;
++pub const _SC_V7_LP64_OFF64 : ::c_int = 115;
++pub const _SC_V7_LPBIG_OFFBIG : ::c_int = 116;
++pub const _SC_XOPEN_CRYPT : ::c_int = 117;
++pub const _SC_XOPEN_ENH_I18N : ::c_int = 118;
++pub const _SC_XOPEN_LEGACY : ::c_int = 119;
++pub const _SC_XOPEN_REALTIME : ::c_int = 120;
++pub const _SC_XOPEN_REALTIME_THREADS : ::c_int = 121;
++pub const _SC_XOPEN_STREAMS : ::c_int = 122;
++pub const _SC_XOPEN_UNIX : ::c_int = 123;
++pub const _SC_XOPEN_UUCP : ::c_int = 124;
++pub const _SC_XOPEN_VERSION : ::c_int = 125;
++pub const _SC_PHYS_PAGES : ::c_int = 500;
++pub const _SC_AVPHYS_PAGES : ::c_int = 501;
++pub const _SC_NPROCESSORS_CONF : ::c_int = 502;
++pub const _SC_NPROCESSORS_ONLN : ::c_int = 503;
++
++pub const FD_SETSIZE: usize = 1024;
++
++pub const ST_NOSUID: ::c_ulong = 2;
++
++pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _;
++pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _;
++pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _;
++
++pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
++pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
++pub const PTHREAD_MUTEX_NORMAL: ::c_int = 3;
++pub const PTHREAD_MUTEX_STRICT_NP: ::c_int = 4;
++pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_STRICT_NP;
++
++pub const EVFILT_AIO: ::int16_t = -3;
++pub const EVFILT_PROC: ::int16_t = -5;
++pub const EVFILT_READ: ::int16_t = -1;
++pub const EVFILT_SIGNAL: ::int16_t = -6;
++pub const EVFILT_TIMER: ::int16_t = -7;
++pub const EVFILT_VNODE: ::int16_t = -4;
++pub const EVFILT_WRITE: ::int16_t = -2;
++
++pub const EV_ADD: ::uint16_t = 0x1;
++pub const EV_DELETE: ::uint16_t = 0x2;
++pub const EV_ENABLE: ::uint16_t = 0x4;
++pub const EV_DISABLE: ::uint16_t = 0x8;
++pub const EV_ONESHOT: ::uint16_t = 0x10;
++pub const EV_CLEAR: ::uint16_t = 0x20;
++pub const EV_FLAG1: ::uint16_t = 0x2000;
++pub const EV_ERROR: ::uint16_t = 0x4000;
++pub const EV_EOF: ::uint16_t = 0x8000;
++pub const EV_SYSFLAGS: ::uint16_t = 0xf000;
++
++pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
++pub const NOTE_EOF: ::uint32_t = 0x00000002;
++pub const NOTE_DELETE: ::uint32_t = 0x00000001;
++pub const NOTE_WRITE: ::uint32_t = 0x00000002;
++pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
++pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
++pub const NOTE_LINK: ::uint32_t = 0x00000010;
++pub const NOTE_RENAME: ::uint32_t = 0x00000020;
++pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
++pub const NOTE_TRUNCATE: ::uint32_t = 0x00000080;
++pub const NOTE_EXIT: ::uint32_t = 0x80000000;
++pub const NOTE_FORK: ::uint32_t = 0x40000000;
++pub const NOTE_EXEC: ::uint32_t = 0x20000000;
++pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
++pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
++pub const NOTE_TRACK: ::uint32_t = 0x00000001;
++pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
++pub const NOTE_CHILD: ::uint32_t = 0x00000004;
++
++pub const TMP_MAX : ::c_uint = 0x7fffffff;
++
++pub const NI_MAXHOST: ::size_t = 256;
++
++pub const RTLD_LOCAL: ::c_int = 0;
++pub const CTL_MAXNAME: ::c_int = 12;
++pub const CTLTYPE_NODE: ::c_int = 1;
++pub const CTLTYPE_INT: ::c_int = 2;
++pub const CTLTYPE_STRING: ::c_int = 3;
++pub const CTLTYPE_QUAD: ::c_int = 4;
++pub const CTLTYPE_STRUCT: ::c_int = 5;
++pub const CTL_UNSPEC: ::c_int = 0;
++pub const CTL_KERN: ::c_int = 1;
++pub const CTL_VM: ::c_int = 2;
++pub const CTL_FS: ::c_int = 3;
++pub const CTL_NET: ::c_int = 4;
++pub const CTL_DEBUG: ::c_int = 5;
++pub const CTL_HW: ::c_int = 6;
++pub const CTL_MACHDEP: ::c_int = 7;
++pub const CTL_DDB: ::c_int = 9;
++pub const CTL_VFS: ::c_int = 10;
++pub const CTL_MAXID: ::c_int = 11;
++pub const KERN_OSTYPE: ::c_int = 1;
++pub const KERN_OSRELEASE: ::c_int = 2;
++pub const KERN_OSREV: ::c_int = 3;
++pub const KERN_VERSION: ::c_int = 4;
++pub const KERN_MAXVNODES: ::c_int = 5;
++pub const KERN_MAXPROC: ::c_int = 6;
++pub const KERN_MAXFILES: ::c_int = 7;
++pub const KERN_ARGMAX: ::c_int = 8;
++pub const KERN_SECURELVL: ::c_int = 9;
++pub const KERN_HOSTNAME: ::c_int = 10;
++pub const KERN_HOSTID: ::c_int = 11;
++pub const KERN_CLOCKRATE: ::c_int = 12;
++pub const KERN_PROF: ::c_int = 16;
++pub const KERN_POSIX1: ::c_int = 17;
++pub const KERN_NGROUPS: ::c_int = 18;
++pub const KERN_JOB_CONTROL: ::c_int = 19;
++pub const KERN_SAVED_IDS: ::c_int = 20;
++pub const KERN_BOOTTIME: ::c_int = 21;
++pub const KERN_DOMAINNAME: ::c_int = 22;
++pub const KERN_MAXPARTITIONS: ::c_int = 23;
++pub const KERN_RAWPARTITION: ::c_int = 24;
++pub const KERN_MAXTHREAD: ::c_int = 25;
++pub const KERN_NTHREADS: ::c_int = 26;
++pub const KERN_OSVERSION: ::c_int = 27;
++pub const KERN_SOMAXCONN: ::c_int = 28;
++pub const KERN_SOMINCONN: ::c_int = 29;
++pub const KERN_USERMOUNT: ::c_int = 30;
++pub const KERN_NOSUIDCOREDUMP: ::c_int = 32;
++pub const KERN_FSYNC: ::c_int = 33;
++pub const KERN_SYSVMSG: ::c_int = 34;
++pub const KERN_SYSVSEM: ::c_int = 35;
++pub const KERN_SYSVSHM: ::c_int = 36;
++pub const KERN_ARND: ::c_int = 37;
++pub const KERN_MSGBUFSIZE: ::c_int = 38;
++pub const KERN_MALLOCSTATS: ::c_int = 39;
++pub const KERN_CPTIME: ::c_int = 40;
++pub const KERN_NCHSTATS: ::c_int = 41;
++pub const KERN_FORKSTAT: ::c_int = 42;
++pub const KERN_NSELCOLL: ::c_int = 43;
++pub const KERN_TTY: ::c_int = 44;
++pub const KERN_CCPU: ::c_int = 45;
++pub const KERN_FSCALE: ::c_int = 46;
++pub const KERN_NPROCS: ::c_int = 47;
++pub const KERN_MSGBUF: ::c_int = 48;
++pub const KERN_POOL: ::c_int = 49;
++pub const KERN_STACKGAPRANDOM: ::c_int = 50;
++pub const KERN_SYSVIPC_INFO: ::c_int = 51;
++pub const KERN_SPLASSERT: ::c_int = 54;
++pub const KERN_PROC_ARGS: ::c_int = 55;
++pub const KERN_NFILES: ::c_int = 56;
++pub const KERN_TTYCOUNT: ::c_int = 57;
++pub const KERN_NUMVNODES: ::c_int = 58;
++pub const KERN_MBSTAT: ::c_int = 59;
++pub const KERN_SEMINFO: ::c_int = 61;
++pub const KERN_SHMINFO: ::c_int = 62;
++pub const KERN_INTRCNT: ::c_int = 63;
++pub const KERN_WATCHDOG: ::c_int = 64;
++pub const KERN_PROC: ::c_int = 66;
++pub const KERN_MAXCLUSTERS: ::c_int = 67;
++pub const KERN_EVCOUNT: ::c_int = 68;
++pub const KERN_TIMECOUNTER: ::c_int = 69;
++pub const KERN_MAXLOCKSPERUID: ::c_int = 70;
++pub const KERN_CPTIME2: ::c_int = 71;
++pub const KERN_CACHEPCT: ::c_int = 72;
++pub const KERN_FILE: ::c_int = 73;
++pub const KERN_CONSDEV: ::c_int = 75;
++pub const KERN_NETLIVELOCKS: ::c_int = 76;
++pub const KERN_POOL_DEBUG: ::c_int = 77;
++pub const KERN_PROC_CWD: ::c_int = 78;
++pub const KERN_PROC_NOBROADCASTKILL: ::c_int = 79;
++pub const KERN_PROC_VMMAP: ::c_int = 80;
++pub const KERN_GLOBAL_PTRACE: ::c_int = 81;
++pub const KERN_CONSBUFSIZE: ::c_int = 82;
++pub const KERN_CONSBUF: ::c_int = 83;
++pub const KERN_MAXID: ::c_int = 84;
++pub const KERN_PROC_ALL: ::c_int = 0;
++pub const KERN_PROC_PID: ::c_int = 1;
++pub const KERN_PROC_PGRP: ::c_int = 2;
++pub const KERN_PROC_SESSION: ::c_int = 3;
++pub const KERN_PROC_TTY: ::c_int = 4;
++pub const KERN_PROC_UID: ::c_int = 5;
++pub const KERN_PROC_RUID: ::c_int = 6;
++pub const KERN_PROC_KTHREAD: ::c_int = 7;
++pub const KERN_PROC_SHOW_THREADS: ::c_int = 0x40000000;
++pub const KERN_SYSVIPC_MSG_INFO: ::c_int = 1;
++pub const KERN_SYSVIPC_SEM_INFO: ::c_int = 2;
++pub const KERN_SYSVIPC_SHM_INFO: ::c_int = 3;
++pub const KERN_PROC_ARGV: ::c_int = 1;
++pub const KERN_PROC_NARGV: ::c_int = 2;
++pub const KERN_PROC_ENV: ::c_int = 3;
++pub const KERN_PROC_NENV: ::c_int = 4;
++pub const KI_NGROUPS: ::c_int = 16;
++pub const KI_MAXCOMLEN: ::c_int = 24;
++pub const KI_WMESGLEN: ::c_int = 8;
++pub const KI_MAXLOGNAME: ::c_int = 32;
++pub const KI_EMULNAMELEN: ::c_int = 8;
++
++pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS;
++pub const OLCUC: ::tcflag_t = 0x20;
++pub const ONOCR: ::tcflag_t = 0x40;
++pub const ONLRET: ::tcflag_t = 0x80;
++
++extern {
++    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
++    pub fn getnameinfo(sa: *const ::sockaddr,
++                       salen: ::socklen_t,
++                       host: *mut ::c_char,
++                       hostlen: ::size_t,
++                       serv: *mut ::c_char,
++                       servlen: ::size_t,
++                       flags: ::c_int) -> ::c_int;
++    pub fn kevent(kq: ::c_int,
++                  changelist: *const ::kevent,
++                  nchanges: ::c_int,
++                  eventlist: *mut ::kevent,
++                  nevents: ::c_int,
++                  timeout: *const ::timespec) -> ::c_int;
++    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
++                    -> ::c_int;
++    pub fn pthread_main_np() -> ::c_int;
++    pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
++    pub fn pthread_stackseg_np(thread: ::pthread_t,
++                               sinfo: *mut ::stack_t) -> ::c_int;
++    pub fn sysctl(name: *const ::c_int,
++                  namelen: ::c_uint,
++                  oldp: *mut ::c_void,
++                  oldlenp: *mut ::size_t,
++                  newp: *mut ::c_void,
++                  newlen: ::size_t)
++                  -> ::c_int;
++    pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;
++    pub fn pledge(promises: *const ::c_char,
++                  paths: *mut *const ::c_char) -> ::c_int;
++}
++
++cfg_if! {
++    if #[cfg(target_os = "openbsd")] {
++        mod openbsd;
++        pub use self::openbsd::*;
++    } else if #[cfg(target_os = "bitrig")] {
++        mod bitrig;
++        pub use self::bitrig::*;
++    } else {
++        // Unknown target_os
++    }
++}
++
++mod other;
++pub use self::other::*;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5c804473adec2dc30ba37af8ab37be7352e5cc96
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,35 @@@
++s! {
++    pub struct lconv {
++        pub decimal_point: *mut ::c_char,
++        pub thousands_sep: *mut ::c_char,
++        pub grouping: *mut ::c_char,
++        pub int_curr_symbol: *mut ::c_char,
++        pub currency_symbol: *mut ::c_char,
++        pub mon_decimal_point: *mut ::c_char,
++        pub mon_thousands_sep: *mut ::c_char,
++        pub mon_grouping: *mut ::c_char,
++        pub positive_sign: *mut ::c_char,
++        pub negative_sign: *mut ::c_char,
++        pub int_frac_digits: ::c_char,
++        pub frac_digits: ::c_char,
++        pub p_cs_precedes: ::c_char,
++        pub p_sep_by_space: ::c_char,
++        pub n_cs_precedes: ::c_char,
++        pub n_sep_by_space: ::c_char,
++        pub p_sign_posn: ::c_char,
++        pub n_sign_posn: ::c_char,
++        pub int_p_cs_precedes: ::c_char,
++        pub int_p_sep_by_space: ::c_char,
++        pub int_n_cs_precedes: ::c_char,
++        pub int_n_sep_by_space: ::c_char,
++        pub int_p_sign_posn: ::c_char,
++        pub int_n_sign_posn: ::c_char,
++    }
++}
++
++extern {
++    pub fn accept4(s: ::c_int, addr: *mut ::sockaddr,
++                   addrlen: *mut ::socklen_t, flags: ::c_int) -> ::c_int;
++    pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char,
++                   envp: *const *const ::c_char) -> ::c_int;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9b0b338b91e5b52050c6d0edab5b3d5ea0263037
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++pub type c_long = i32;
++pub type c_ulong = u32;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b07c476aa49d963c7476fa17418927e5ffc9c2e4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++pub type c_long = i64;
++pub type c_ulong = u64;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e4087da7bc235195fbc63c6ab76643d9bbc2dbe3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,11 @@@
++cfg_if! {
++    if #[cfg(target_arch = "x86_64")] {
++        mod b64;
++        pub use self::b64::*;
++    } else if #[cfg(target_arch = "x86")] {
++        mod b32;
++        pub use self::b32::*;
++    } else {
++        // Unknown target_arch
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9b0b338b91e5b52050c6d0edab5b3d5ea0263037
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++pub type c_long = i32;
++pub type c_ulong = u32;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5d63ce9ce43e04c7801a6944fc9bb5cfb8db0d3b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++pub type c_ulong = u64;
++pub type c_long = i64;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4fb68ca051600832c24d2f9599706f63e1c4f5ce
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,870 @@@
++use dox::{mem, Option};
++
++pub type rlim_t = ::uintptr_t;
++pub type sa_family_t = u8;
++pub type pthread_key_t = ::c_int;
++pub type nfds_t = ::c_long;
++pub type tcflag_t = ::c_uint;
++pub type speed_t = ::c_uint;
++pub type c_char = i8;
++pub type clock_t = i32;
++pub type clockid_t = i32;
++pub type time_t = i32;
++pub type suseconds_t = i32;
++pub type wchar_t = i32;
++pub type off_t = i64;
++pub type ino_t = i64;
++pub type blkcnt_t = i64;
++pub type blksize_t = i32;
++pub type dev_t = i32;
++pub type mode_t = u32;
++pub type nlink_t = i32;
++pub type useconds_t = u32;
++pub type socklen_t = u32;
++pub type pthread_t = ::uintptr_t;
++pub type pthread_mutexattr_t = ::uintptr_t;
++pub type pthread_rwlockattr_t = ::uintptr_t;
++pub type sigset_t = u64;
++pub type fsblkcnt_t = i64;
++pub type fsfilcnt_t = i64;
++pub type pthread_attr_t = *mut ::c_void;
++pub type nl_item = ::c_int;
++pub type id_t = i32;
++pub type idtype_t = ::c_uint;
++
++pub enum timezone {}
++
++s! {
++    pub struct sockaddr {
++        pub sa_len: u8,
++        pub sa_family: sa_family_t,
++        pub sa_data: [::c_char; 30],
++    }
++
++    pub struct sockaddr_in {
++        pub sin_len: u8,
++        pub sin_family: sa_family_t,
++        pub sin_port: ::in_port_t,
++        pub sin_addr: ::in_addr,
++        pub sin_zero: [u8; 24],
++    }
++
++    pub struct sockaddr_in6 {
++        pub sin6_len: u8,
++        pub sin6_family: sa_family_t,
++        pub sin6_port: ::in_port_t,
++        pub sin6_flowinfo: u32,
++        pub sin6_addr: ::in6_addr,
++        pub sin6_scope_id: u32,
++    }
++
++    pub struct sockaddr_un {
++        pub sun_len: u8,
++        pub sun_family: sa_family_t,
++        pub sun_path: [::c_char; 126]
++    }
++
++    pub struct sockaddr_storage {
++        pub ss_len: u8,
++        pub ss_family: sa_family_t,
++        __ss_pad1: [u8; 6],
++        __ss_pad2: u64,
++        __ss_pad3: [u8; 112],
++    }
++
++    pub struct addrinfo {
++        pub ai_flags: ::c_int,
++        pub ai_family: ::c_int,
++        pub ai_socktype: ::c_int,
++        pub ai_protocol: ::c_int,
++        pub ai_addrlen: socklen_t,
++        pub ai_canonname: *mut c_char,
++        pub ai_addr: *mut ::sockaddr,
++        pub ai_next: *mut addrinfo,
++    }
++
++    pub struct fd_set {
++        fds_bits: [c_ulong; FD_SETSIZE / ULONG_SIZE],
++    }
++
++    pub struct tm {
++        pub tm_sec: ::c_int,
++        pub tm_min: ::c_int,
++        pub tm_hour: ::c_int,
++        pub tm_mday: ::c_int,
++        pub tm_mon: ::c_int,
++        pub tm_year: ::c_int,
++        pub tm_wday: ::c_int,
++        pub tm_yday: ::c_int,
++        pub tm_isdst: ::c_int,
++        pub tm_gmtoff: ::c_long,
++        pub tm_zone: *const ::c_char,
++    }
++
++    pub struct utsname {
++        pub sysname: [::c_char; 32],
++        pub nodename: [::c_char; 32],
++        pub release: [::c_char; 32],
++        pub version: [::c_char; 32],
++        pub machine: [::c_char; 32],
++    }
++
++    pub struct lconv {
++        pub decimal_point: *mut ::c_char,
++        pub thousands_sep: *mut ::c_char,
++        pub grouping: *mut ::c_char,
++        pub int_curr_symbol: *mut ::c_char,
++        pub currency_symbol: *mut ::c_char,
++        pub mon_decimal_point: *mut ::c_char,
++        pub mon_thousands_sep: *mut ::c_char,
++        pub mon_grouping: *mut ::c_char,
++        pub positive_sign: *mut ::c_char,
++        pub negative_sign: *mut ::c_char,
++        pub int_frac_digits: ::c_char,
++        pub frac_digits: ::c_char,
++        pub p_cs_precedes: ::c_char,
++        pub p_sep_by_space: ::c_char,
++        pub n_cs_precedes: ::c_char,
++        pub n_sep_by_space: ::c_char,
++        pub p_sign_posn: ::c_char,
++        pub n_sign_posn: ::c_char,
++        pub int_p_cs_precedes: ::c_char,
++        pub int_p_sep_by_space: ::c_char,
++        pub int_n_cs_precedes: ::c_char,
++        pub int_n_sep_by_space: ::c_char,
++        pub int_p_sign_posn: ::c_char,
++        pub int_n_sign_posn: ::c_char,
++    }
++
++    pub struct msghdr {
++        pub msg_name: *mut ::c_void,
++        pub msg_namelen: ::socklen_t,
++        pub msg_iov: *mut ::iovec,
++        pub msg_iovlen: ::c_int,
++        pub msg_control: *mut ::c_void,
++        pub msg_controllen: ::socklen_t,
++        pub msg_flags: ::c_int,
++    }
++
++    pub struct cmsghdr {
++        pub cmsg_len: ::size_t,
++        pub cmsg_level: ::c_int,
++        pub cmsg_type: ::c_int,
++    }
++
++    pub struct Dl_info {
++        pub dli_fname: *const ::c_char,
++        pub dli_fbase: *mut ::c_void,
++        pub dli_sname: *const ::c_char,
++        pub dli_saddr: *mut ::c_void,
++    }
++
++    pub struct termios {
++        pub c_iflag: ::tcflag_t,
++        pub c_oflag: ::tcflag_t,
++        pub c_cflag: ::tcflag_t,
++        pub c_lflag: ::tcflag_t,
++        pub c_line:  ::c_char,
++        pub c_ispeed: ::speed_t,
++        pub c_ospeed: ::speed_t,
++        pub c_cc: [::cc_t; ::NCCS],
++    }
++
++    pub struct stat {
++        pub st_dev: dev_t,
++        pub st_ino: ino_t,
++        pub st_mode: mode_t,
++        pub st_nlink: nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_size: off_t,
++        pub st_rdev: dev_t,
++        pub st_blksize: blksize_t,
++        pub st_atime: time_t,
++        pub st_atime_nsec: c_long,
++        pub st_mtime: time_t,
++        pub st_mtime_nsec: c_long,
++        pub st_ctime: time_t,
++        pub st_ctime_nsec: c_long,
++        pub st_crtime: time_t,
++        pub st_crtime_nsec: c_long,
++        pub st_type: u32,
++        pub st_blocks: blkcnt_t,
++    }
++
++    pub struct dirent {
++        pub d_dev: dev_t,
++        pub d_pdev: dev_t,
++        pub d_ino: ino_t,
++        pub d_pino: i64,
++        pub d_reclen: ::c_ushort,
++        pub d_name: [::c_char; 1024], // Max length is _POSIX_PATH_MAX
++    }
++
++    pub struct glob_t {
++        pub gl_pathc: ::size_t,
++        __unused1: ::size_t,
++        pub gl_offs: ::size_t,
++        __unused2: ::size_t,
++        pub gl_pathv: *mut *mut c_char,
++
++        __unused3: *mut ::c_void,
++        __unused4: *mut ::c_void,
++        __unused5: *mut ::c_void,
++        __unused6: *mut ::c_void,
++        __unused7: *mut ::c_void,
++        __unused8: *mut ::c_void,
++    }
++
++    pub struct pthread_mutex_t {
++        flags: u32,
++        lock: i32,
++        unused: i32,
++        owner: i32,
++        owner_count: i32,
++    }
++
++    pub struct pthread_cond_t {
++        flags: u32,
++        unused: i32,
++        mutex: *mut ::c_void,
++        waiter_count: i32,
++        lock: i32,
++    }
++
++    pub struct pthread_rwlock_t {
++        flags: u32,
++        owner: i32,
++        lock_sem: i32,      // this is actually a union
++        lock_count: i32,
++        reader_count: i32,
++        writer_count: i32,
++        waiters: [*mut ::c_void; 2],
++    }
++
++    pub struct passwd {
++        pub pw_name: *mut ::c_char,
++        pub pw_passwd: *mut ::c_char,
++        pub pw_uid: ::uid_t,
++        pub pw_gid: ::gid_t,
++        pub pw_dir: *mut ::c_char,
++        pub pw_shell: *mut ::c_char,
++        pub pw_gecos: *mut ::c_char,
++    }
++
++    pub struct statvfs {
++        pub f_bsize: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_favail: ::fsfilcnt_t,
++        pub f_fsid: ::c_ulong,
++        pub f_flag: ::c_ulong,
++        pub f_namemax: ::c_ulong,
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_size: ::size_t,
++        pub ss_flags: ::c_int,
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_code: ::c_int,
++        pub si_errno: ::c_int,
++        pub si_pid: ::pid_t,
++        pub si_uid: ::uid_t,
++        pub si_addr: *mut ::c_void,
++        pub si_status: ::c_int,
++        pub si_band: c_long,
++        pub sigval: *mut ::c_void,
++    }
++
++    pub struct sigaction {
++        pub sa_sigaction: ::sighandler_t,
++        pub sa_mask: ::sigset_t,
++        pub sa_flags: ::c_int,
++        sa_userdata: *mut ::c_void,
++    }
++
++    pub struct sem_t {
++        pub se_type: i32,
++        pub se_named_id: i32, // this is actually a union
++        pub se_unnamed: i32,
++        pub se_padding: [i32; 4],
++    }
++
++    pub struct pthread_condattr_t {
++        pub process_shared: bool,
++        pub clock_id: i32,
++    }
++}
++
++// intentionally not public, only used for fd_set
++cfg_if! {
++    if #[cfg(target_pointer_width = "32")] {
++        const ULONG_SIZE: usize = 32;
++    } else if #[cfg(target_pointer_width = "64")] {
++        const ULONG_SIZE: usize = 64;
++    } else {
++        // Unknown target_pointer_width
++    }
++}
++
++pub const EXIT_FAILURE: ::c_int = 1;
++pub const EXIT_SUCCESS: ::c_int = 0;
++pub const RAND_MAX: ::c_int = 2147483647;
++pub const EOF: ::c_int = -1;
++pub const SEEK_SET: ::c_int = 0;
++pub const SEEK_CUR: ::c_int = 1;
++pub const SEEK_END: ::c_int = 2;
++pub const _IOFBF: ::c_int = 0;
++pub const _IONBF: ::c_int = 2;
++pub const _IOLBF: ::c_int = 1;
++
++pub const F_DUPFD: ::c_int = 0x0001;
++pub const F_GETFD: ::c_int = 0x0002;
++pub const F_SETFD: ::c_int = 0x0004;
++pub const F_GETFL: ::c_int = 0x0008;
++pub const F_SETFL: ::c_int = 0x0010;
++
++pub const SIGTRAP: ::c_int = 22;
++
++pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
++pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
++
++pub const CLOCK_REALTIME: ::c_int = -1;
++pub const CLOCK_MONOTONIC: ::c_int = 0;
++
++pub const RLIMIT_CORE: ::c_int = 0;
++pub const RLIMIT_CPU: ::c_int = 1;
++pub const RLIMIT_DATA: ::c_int = 2;
++pub const RLIMIT_FSIZE: ::c_int = 3;
++pub const RLIMIT_NOFILE: ::c_int = 4;
++pub const RLIMIT_AS: ::c_int = 6;
++// Haiku specific
++pub const RLIMIT_NOVMON: ::c_int = 7;
++pub const RLIMIT_NLIMITS: ::c_int = 8;
++
++pub const RUSAGE_SELF: ::c_int = 0;
++
++pub const NCCS: usize = 11;
++
++pub const O_RDONLY: ::c_int = 0x0000;
++pub const O_WRONLY: ::c_int = 0x0001;
++pub const O_RDWR: ::c_int = 0x0002;
++pub const O_ACCMODE: ::c_int = 0x0003;
++
++pub const O_EXCL: ::c_int = 0x0100;
++pub const O_CREAT: ::c_int = 0x0200;
++pub const O_TRUNC: ::c_int = 0x0400;
++pub const O_NOCTTY: ::c_int = 0x1000;
++pub const O_NOTRAVERSE: ::c_int = 0x2000;
++
++pub const O_CLOEXEC: ::c_int = 0x00000040;
++pub const O_NONBLOCK: ::c_int = 0x00000080;
++pub const O_APPEND: ::c_int = 0x00000800;
++pub const O_SYNC: ::c_int = 0x00010000;
++pub const O_RSYNC: ::c_int = 0x00020000;
++pub const O_DSYNC: ::c_int = 0x00040000;
++pub const O_NOFOLLOW: ::c_int = 0x00080000;
++pub const O_NOCACHE: ::c_int = 0x00100000;
++pub const O_DIRECTORY: ::c_int = 0x00200000;
++
++pub const S_IFIFO: ::mode_t = 61440;
++pub const S_IFCHR: ::mode_t = 49152;
++pub const S_IFBLK: ::mode_t = 24576;
++pub const S_IFDIR: ::mode_t = 16384;
++pub const S_IFREG: ::mode_t = 32768;
++pub const S_IFLNK: ::mode_t = 40960;
++pub const S_IFSOCK: ::mode_t = 49152;
++pub const S_IFMT: ::mode_t = 61440;
++pub const S_IRWXU: ::mode_t = 448;
++pub const S_IXUSR: ::mode_t = 64;
++pub const S_IWUSR: ::mode_t = 128;
++pub const S_IRUSR: ::mode_t = 256;
++pub const S_IRWXG: ::mode_t = 70;
++pub const S_IXGRP: ::mode_t = 10;
++pub const S_IWGRP: ::mode_t = 20;
++pub const S_IRGRP: ::mode_t = 40;
++pub const S_IRWXO: ::mode_t = 7;
++pub const S_IXOTH: ::mode_t = 1;
++pub const S_IWOTH: ::mode_t = 2;
++pub const S_IROTH: ::mode_t = 4;
++pub const F_OK: ::c_int = 0;
++pub const R_OK: ::c_int = 4;
++pub const W_OK: ::c_int = 2;
++pub const X_OK: ::c_int = 1;
++pub const STDIN_FILENO: ::c_int = 0;
++pub const STDOUT_FILENO: ::c_int = 1;
++pub const STDERR_FILENO: ::c_int = 2;
++pub const SIGHUP: ::c_int = 1;
++pub const SIGINT: ::c_int = 2;
++pub const SIGQUIT: ::c_int = 3;
++pub const SIGILL: ::c_int = 4;
++pub const SIGABRT: ::c_int = 6;
++pub const SIGFPE: ::c_int = 8;
++pub const SIGKILL: ::c_int = 9;
++pub const SIGSEGV: ::c_int = 11;
++pub const SIGPIPE: ::c_int = 7;
++pub const SIGALRM: ::c_int = 14;
++pub const SIGTERM: ::c_int = 15;
++
++pub const EAI_SYSTEM: ::c_int = 11;
++
++pub const PROT_NONE: ::c_int = 0;
++pub const PROT_READ: ::c_int = 1;
++pub const PROT_WRITE: ::c_int = 2;
++pub const PROT_EXEC: ::c_int = 4;
++
++pub const LC_ALL: ::c_int = 0;
++pub const LC_COLLATE: ::c_int = 1;
++pub const LC_CTYPE: ::c_int = 2;
++pub const LC_MONETARY: ::c_int = 3;
++pub const LC_NUMERIC: ::c_int = 4;
++pub const LC_TIME: ::c_int = 5;
++pub const LC_MESSAGES: ::c_int = 6;
++
++// TODO: Haiku does not have MAP_FILE, but libstd/os.rs requires it
++pub const MAP_FILE: ::c_int = 0x00;
++pub const MAP_SHARED: ::c_int = 0x01;
++pub const MAP_PRIVATE: ::c_int = 0x02;
++pub const MAP_FIXED: ::c_int = 0x004;
++
++pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
++
++pub const MS_ASYNC: ::c_int = 0x01;
++pub const MS_INVALIDATE: ::c_int = 0x04;
++pub const MS_SYNC: ::c_int = 0x02;
++
++pub const EPERM : ::c_int = -2147483633;
++pub const ENOENT : ::c_int = -2147459069;
++pub const ESRCH : ::c_int = -2147454963;
++pub const EINTR : ::c_int = -2147483638;
++pub const EIO : ::c_int = -2147483647;
++pub const ENXIO : ::c_int = -2147454965;
++pub const E2BIG : ::c_int = -2147454975;
++pub const ENOEXEC : ::c_int = -2147478782;
++pub const EBADF : ::c_int = -2147459072;
++pub const ECHILD : ::c_int = -2147454974;
++pub const EDEADLK : ::c_int = -2147454973;
++pub const ENOMEM : ::c_int = -2147454976;
++pub const EACCES : ::c_int = -2147483646;
++pub const EFAULT : ::c_int = -2147478783;
++// pub const ENOTBLK : ::c_int = 15;
++pub const EBUSY : ::c_int = -2147483634;
++pub const EEXIST : ::c_int = -2147459070;
++pub const EXDEV : ::c_int = -2147459061;
++pub const ENODEV : ::c_int = -2147454969;
++pub const ENOTDIR : ::c_int = -2147459067;
++pub const EISDIR : ::c_int = -2147459063;
++pub const EINVAL : ::c_int = -2147483643;
++pub const ENFILE : ::c_int = -2147454970;
++pub const EMFILE : ::c_int = -2147459062;
++pub const ENOTTY : ::c_int = -2147454966;
++pub const ETXTBSY : ::c_int = -2147454917;
++pub const EFBIG : ::c_int = -2147454972;
++pub const ENOSPC : ::c_int = -2147459065;
++pub const ESPIPE : ::c_int = -2147454964;
++pub const EROFS : ::c_int = -2147459064;
++pub const EMLINK : ::c_int = -2147454971;
++pub const EPIPE : ::c_int = -2147459059;
++pub const EDOM : ::c_int = -2147454960;
++pub const ERANGE : ::c_int = -2147454959;
++pub const EAGAIN : ::c_int = -2147483637;
++pub const EWOULDBLOCK : ::c_int = -2147483637;
++
++pub const EINPROGRESS : ::c_int = -2147454940;
++pub const EALREADY : ::c_int = -2147454939;
++pub const ENOTSOCK : ::c_int = -2147454932;
++pub const EDESTADDRREQ : ::c_int = -2147454928;
++pub const EMSGSIZE : ::c_int = -2147454934;
++pub const EPROTOTYPE : ::c_int = -2147454958;
++pub const ENOPROTOOPT : ::c_int = -2147454942;
++pub const EPROTONOSUPPORT : ::c_int = -2147454957;
++pub const EOPNOTSUPP : ::c_int = -2147454933;
++pub const EPFNOSUPPORT : ::c_int = -2147454956;
++pub const EAFNOSUPPORT : ::c_int = -2147454955;
++pub const EADDRINUSE : ::c_int = -2147454954;
++pub const EADDRNOTAVAIL : ::c_int = -2147454953;
++pub const ENETDOWN : ::c_int = -2147454953;
++pub const ENETUNREACH : ::c_int = -2147454951;
++pub const ENETRESET : ::c_int = -2147454950;
++pub const ECONNABORTED : ::c_int = -2147454949;
++pub const ECONNRESET : ::c_int = -2147454948;
++pub const ENOBUFS : ::c_int = -2147454941;
++pub const EISCONN : ::c_int = -2147454947;
++pub const ENOTCONN : ::c_int = -2147454946;
++pub const ESHUTDOWN : ::c_int = -2147454945;
++pub const ETIMEDOUT : ::c_int = -2147483639;
++pub const ECONNREFUSED : ::c_int = -2147454944;
++pub const ELOOP : ::c_int = -2147459060;
++pub const ENAMETOOLONG : ::c_int = -2147459068;
++pub const EHOSTDOWN : ::c_int = -2147454931;
++pub const EHOSTUNREACH : ::c_int = -2147454943;
++pub const ENOTEMPTY : ::c_int = -2147459066;
++pub const EDQUOT : ::c_int = -2147454927;
++pub const ESTALE : ::c_int = -2147454936;
++pub const ENOLCK : ::c_int = -2147454968;
++pub const ENOSYS : ::c_int = -2147454967;
++pub const EIDRM : ::c_int = -2147454926;
++pub const ENOMSG : ::c_int = -2147454937;
++pub const EOVERFLOW : ::c_int = -2147454935;
++pub const ECANCELED : ::c_int = -2147454929;
++pub const EILSEQ : ::c_int = -2147454938;
++pub const ENOATTR : ::c_int = -2147454916;
++pub const EBADMSG : ::c_int = -2147454930;
++pub const EMULTIHOP : ::c_int = -2147454925;
++pub const ENOLINK : ::c_int = -2147454923;
++pub const EPROTO : ::c_int = -2147454919;
++
++pub const IPPROTO_RAW: ::c_int = 255;
++
++// These are prefixed with POSIX_ on Haiku
++pub const MADV_NORMAL: ::c_int = 1;
++pub const MADV_SEQUENTIAL: ::c_int = 2;
++pub const MADV_RANDOM: ::c_int = 3;
++pub const MADV_WILLNEED: ::c_int = 4;
++pub const MADV_DONTNEED: ::c_int = 5;
++
++pub const IFF_LOOPBACK: ::c_int = 0x0008;
++
++pub const AF_UNIX: ::c_int = 9;
++pub const AF_INET: ::c_int = 1;
++pub const AF_INET6: ::c_int = 6;
++pub const SOCK_RAW: ::c_int = 3;
++pub const IP_MULTICAST_TTL: ::c_int = 10;
++pub const IP_MULTICAST_LOOP: ::c_int = 11;
++pub const IP_TTL: ::c_int = 4;
++pub const IP_HDRINCL: ::c_int = 2;
++pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
++pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
++
++pub const TCP_NODELAY: ::c_int = 0x01;
++pub const TCP_MAXSEG: ::c_int = 0x02;
++pub const TCP_NOPUSH: ::c_int = 0x04;
++pub const TCP_NOOPT: ::c_int = 0x08;
++
++pub const IPV6_MULTICAST_LOOP: ::c_int = 26;
++pub const IPV6_JOIN_GROUP: ::c_int = 28;
++pub const IPV6_LEAVE_GROUP: ::c_int = 29;
++pub const IPV6_V6ONLY: ::c_int = 30;
++
++pub const SO_DEBUG: ::c_int = 0x00000004;
++
++pub const MSG_PEEK: ::c_int = 0x2;
++pub const MSG_NOSIGNAL: ::c_int = 0x0800;
++
++pub const SHUT_RD: ::c_int = 0;
++pub const SHUT_WR: ::c_int = 1;
++pub const SHUT_RDWR: ::c_int = 2;
++
++pub const LOCK_SH: ::c_int = 0x01;
++pub const LOCK_EX: ::c_int = 0x02;
++pub const LOCK_NB: ::c_int = 0x04;
++pub const LOCK_UN: ::c_int = 0x08;
++
++pub const SIGSTKSZ: ::size_t = 16384;
++
++pub const SA_NODEFER: ::c_int = 0x08;
++pub const SA_RESETHAND: ::c_int = 0x04;
++pub const SA_RESTART: ::c_int = 0x10;
++pub const SA_NOCLDSTOP: ::c_int = 0x01;
++
++pub const FD_SETSIZE: usize = 1024;
++
++pub const RTLD_NOW: ::c_int = 0x1;
++pub const RTLD_DEFAULT: *mut ::c_void = 0isize as *mut ::c_void;
++
++pub const BUFSIZ: ::c_uint = 8192;
++pub const FILENAME_MAX: ::c_uint = 256;
++pub const FOPEN_MAX: ::c_uint = 128;
++pub const L_tmpnam: ::c_uint = 512;
++pub const TMP_MAX: ::c_uint = 32768;
++pub const _PC_NAME_MAX: ::c_int = 4;
++
++pub const FIONBIO: ::c_int = 0xbe000000;
++
++pub const _SC_IOV_MAX : ::c_int = 32;
++pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 25;
++pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 26;
++pub const _SC_PAGESIZE : ::c_int = 27;
++pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 48;
++pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 49;
++pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 50;
++pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 46;
++pub const _SC_THREAD_STACK_MIN : ::c_int = 47;
++pub const _SC_THREADS : ::c_int = 31;
++pub const _SC_ATEXIT_MAX : ::c_int = 37;
++
++pub const PTHREAD_STACK_MIN: ::size_t = 8192;
++
++pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
++    flags: 0,
++    lock: 0,
++    unused: -42,
++    owner: -1,
++    owner_count: 0,
++};
++pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
++    flags: 0,
++    unused: -42,
++    mutex: 0 as *mut _,
++    waiter_count: 0,
++    lock: 0,
++};
++pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
++    flags: 0,
++    owner: 0,
++    lock_sem: 0,
++    lock_count: 0,
++    reader_count: 0,
++    writer_count: 0,
++    waiters: [0 as *mut _; 2],
++};
++
++pub const PTHREAD_MUTEX_DEFAULT: ::c_int = 0;
++pub const PTHREAD_MUTEX_NORMAL: ::c_int = 1;
++pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
++pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 3;
++
++pub const FIOCLEX: c_ulong = 0; // TODO: does not exist on Haiku!
++
++pub const SA_ONSTACK: c_ulong = 0x20;
++pub const SA_SIGINFO: c_ulong = 0x40;
++pub const SA_NOCLDWAIT: c_ulong = 0x02;
++
++pub const SIGCHLD: ::c_int = 5;
++pub const SIGBUS: ::c_int = 30;
++pub const SIG_SETMASK: ::c_int = 3;
++
++pub const RUSAGE_CHILDREN: ::c_int = -1;
++
++pub const SOCK_STREAM: ::c_int = 1;
++pub const SOCK_DGRAM: ::c_int = 2;
++
++pub const SOL_SOCKET: ::c_int = -1;
++pub const SO_ACCEPTCONN: ::c_int = 0x00000001;
++pub const SO_BROADCAST: ::c_int = 0x00000002;
++pub const SO_DONTROUTE: ::c_int = 0x00000008;
++pub const SO_KEEPALIVE: ::c_int = 0x00000010;
++pub const SO_OOBINLINE: ::c_int = 0x00000020;
++pub const SO_REUSEADDR: ::c_int = 0x00000040;
++pub const SO_REUSEPORT: ::c_int = 0x00000080;
++pub const SO_USELOOPBACK: ::c_int = 0x00000100;
++pub const SO_LINGER: ::c_int = 0x00000200;
++pub const SO_SNDBUF: ::c_int = 0x40000001;
++pub const SO_SNDLOWAT: ::c_int = 0x40000002;
++pub const SO_SNDTIMEO: ::c_int = 0x40000003;
++pub const SO_RCVBUF: ::c_int = 0x40000004;
++pub const SO_RCVLOWAT: ::c_int = 0x40000005;
++pub const SO_RCVTIMEO: ::c_int = 0x40000006;
++pub const SO_ERROR: ::c_int = 0x40000007;
++pub const SO_TYPE: ::c_int = 0x40000008;
++pub const SO_NONBLOCK: ::c_int = 0x40000009;
++pub const SO_BINDTODEVICE: ::c_int = 0x4000000a;
++pub const SO_PEERCRED: ::c_int = 0x4000000b;
++
++pub const NI_MAXHOST: ::size_t = 1025;
++
++pub const WNOHANG: ::c_int = 0x01;
++pub const WUNTRACED: ::c_int = 0x02;
++pub const WCONTINUED: ::c_int = 0x04;
++pub const WEXITED: ::c_int = 0x08;
++pub const WSTOPPED: ::c_int = 0x10;
++pub const WNOWAIT: ::c_int = 0x20;
++
++pub const P_ALL: idtype_t = 0;
++pub const P_PID: idtype_t = 1;
++pub const P_PGID: idtype_t = 2;
++
++pub const VINTR: usize = 0;
++pub const VQUIT: usize = 1;
++pub const VERASE: usize = 2;
++pub const VKILL: usize = 3;
++pub const VEOF: usize = 4;
++pub const VEOL: usize = 5;
++pub const VMIN: usize = 4;
++pub const VTIME: usize = 5;
++pub const VEOL2: usize = 6;
++pub const VSWTCH: usize = 7;
++pub const VSTART: usize = 8;
++pub const VSTOP: usize = 9;
++pub const VSUSP: usize = 10;
++pub const OLCUC:  ::tcflag_t = 0o000002;
++pub const OCRNL:  ::tcflag_t = 0o000010;
++pub const ONOCR:  ::tcflag_t = 0o000020;
++pub const ONLRET: ::tcflag_t = 0o000040;
++pub const OFILL:  ::tcflag_t = 0o000100;
++pub const OFDEL:  ::tcflag_t = 0o000200;
++pub const NLDLY:  ::tcflag_t = 0o000400;
++pub const NL0:    ::tcflag_t = 0o000000;
++pub const NL1:    ::tcflag_t = 0o000400;
++pub const CRDLY:  ::tcflag_t = 0o003000;
++pub const CR0:    ::tcflag_t = 0o000000;
++pub const CR1:    ::tcflag_t = 0o001000;
++pub const CR2:    ::tcflag_t = 0o002000;
++pub const CR3:    ::tcflag_t = 0o003000;
++pub const TABDLY: ::tcflag_t = 0o014000;
++pub const TAB0:   ::tcflag_t = 0o000000;
++pub const TAB1:   ::tcflag_t = 0o004000;
++pub const TAB2:   ::tcflag_t = 0o010000;
++pub const TAB3:   ::tcflag_t = 0o014000;
++pub const BSDLY:  ::tcflag_t = 0o020000;
++pub const BS0:    ::tcflag_t = 0o000000;
++pub const BS1:    ::tcflag_t = 0o020000;
++pub const FFDLY:  ::tcflag_t = 0o100000;
++pub const FF0:    ::tcflag_t = 0o000000;
++pub const FF1:    ::tcflag_t = 0o100000;
++pub const VTDLY:  ::tcflag_t = 0o040000;
++pub const VT0:    ::tcflag_t = 0o000000;
++pub const VT1:    ::tcflag_t = 0o040000;
++
++pub const TCGB_CTS: ::c_int = 0x01;
++pub const TCGB_DSR: ::c_int = 0x02;
++pub const TCGB_RI: ::c_int = 0x04;
++pub const TCGB_DCD: ::c_int = 0x08;
++pub const TIOCM_CTS: ::c_int = TCGB_CTS;
++pub const TIOCM_CD: ::c_int = TCGB_DCD;
++pub const TIOCM_CAR: ::c_int = TIOCM_CD;
++pub const TIOCM_RI: ::c_int = TCGB_RI;
++pub const TIOCM_DSR: ::c_int = TCGB_dsR;
++pub const TIOCM_DTR: ::c_int = 0x10;
++pub const TIOCM_RTS: ::c_int = 0x20;
++
++f! {
++    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
++        let fd = fd as usize;
++        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        (*set).fds_bits[fd / size] &= !(1 << (fd % size));
++        return
++    }
++
++    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
++        let fd = fd as usize;
++        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0
++    }
++
++    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
++        let fd = fd as usize;
++        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        (*set).fds_bits[fd / size] |= 1 << (fd % size);
++        return
++    }
++
++    pub fn FD_ZERO(set: *mut fd_set) -> () {
++        for slot in (*set).fds_bits.iter_mut() {
++            *slot = 0;
++        }
++    }
++
++    pub fn WIFEXITED(status: ::c_int) -> bool {
++        (status >> 8) == 0
++    }
++
++    pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
++        (status & 0xff)
++    }
++
++    pub fn WTERMSIG(status: ::c_int) -> ::c_int {
++        (status >> 8) & 0xff
++    }
++}
++
++extern {
++    pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int;
++    pub fn clock_settime(clk_id: ::c_int, tp: *const ::timespec) -> ::c_int;
++    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
++                                     guardsize: *mut ::size_t) -> ::c_int;
++    pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
++                                 stackaddr: *mut *mut ::c_void,
++                                 stacksize: *mut ::size_t) -> ::c_int;
++    pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
++                                     clock_id: *mut clockid_t) -> ::c_int;
++    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
++                                     clock_id: clockid_t) -> ::c_int;
++    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
++    pub fn setgroups(ngroups: ::size_t,
++                     ptr: *const ::gid_t) -> ::c_int;
++    pub fn getpwuid_r(uid: ::uid_t,
++                      pwd: *mut passwd,
++                      buffer: *mut ::c_char,
++                      bufferSize: ::size_t,
++                      result: *mut *mut passwd) -> ::c_int;
++    pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
++    pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
++                    -> ::c_int;
++    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
++    pub fn getnameinfo(sa: *const ::sockaddr,
++                       salen: ::socklen_t,
++                       host: *mut ::c_char,
++                       hostlen: ::size_t,
++                       serv: *mut ::c_char,
++                       sevlen: ::size_t,
++                       flags: ::c_int) -> ::c_int;
++    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
++                                   abstime: *const ::timespec) -> ::c_int;
++    pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
++                  options: ::c_int) -> ::c_int;
++
++    pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
++    pub fn glob(pattern: *const ::c_char,
++                flags: ::c_int,
++                errfunc: Option<extern fn(epath: *const ::c_char,
++                                          errno: ::c_int) -> ::c_int>,
++                pglob: *mut ::glob_t) -> ::c_int;
++    pub fn globfree(pglob: *mut ::glob_t);
++
++    pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
++                         -> ::c_int;
++
++    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
++
++    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
++
++    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
++    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
++                  -> ::c_int;
++
++    pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
++
++    pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
++                    flags: ::c_int, addr: *mut ::sockaddr,
++                    addrlen: *mut ::socklen_t) -> ::ssize_t;
++    pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
++    pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int;
++    pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
++
++    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
++                address_len: ::socklen_t) -> ::c_int;
++
++    pub fn writev(fd: ::c_int,
++                  iov: *const ::iovec,
++                  iovcnt: ::c_int) -> ::ssize_t;
++    pub fn readv(fd: ::c_int,
++                 iov: *const ::iovec,
++                 iovcnt: ::c_int) -> ::ssize_t;
++
++    pub fn sendmsg(fd: ::c_int,
++                   msg: *const ::msghdr,
++                   flags: ::c_int) -> ::ssize_t;
++    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
++                   -> ::ssize_t;
++    pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char,
++                   environment: *const *const ::c_char) -> ::c_int;
++}
++
++cfg_if! {
++    if #[cfg(target_pointer_width = "64")] {
++        mod b64;
++        pub use self::b64::*;
++    } else {
++        mod b32;
++        pub use self::b32::*;
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0dd15439e08baf2104d437c4638cf72ff4e084af
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,932 @@@
++//! Definitions found commonly among almost all Unix derivatives
++//!
++//! More functions and definitions can be found in the more specific modules
++//! according to the platform in question.
++
++use dox::Option;
++
++pub type pid_t = i32;
++pub type uid_t = u32;
++pub type gid_t = u32;
++pub type in_addr_t = u32;
++pub type in_port_t = u16;
++pub type sighandler_t = ::size_t;
++pub type cc_t = ::c_uchar;
++
++pub enum DIR {}
++pub enum locale_t {}
++
++s! {
++    pub struct group {
++        pub gr_name: *mut ::c_char,
++        pub gr_passwd: *mut ::c_char,
++        pub gr_gid: ::gid_t,
++        pub gr_mem: *mut *mut ::c_char,
++    }
++
++    pub struct utimbuf {
++        pub actime: time_t,
++        pub modtime: time_t,
++    }
++
++    pub struct timeval {
++        pub tv_sec: time_t,
++        pub tv_usec: suseconds_t,
++    }
++
++    pub struct timespec {
++        pub tv_sec: time_t,
++        pub tv_nsec: c_long,
++    }
++
++    pub struct rlimit {
++        pub rlim_cur: rlim_t,
++        pub rlim_max: rlim_t,
++    }
++
++    pub struct rusage {
++        pub ru_utime: timeval,
++        pub ru_stime: timeval,
++        pub ru_maxrss: c_long,
++        pub ru_ixrss: c_long,
++        pub ru_idrss: c_long,
++        pub ru_isrss: c_long,
++        pub ru_minflt: c_long,
++        pub ru_majflt: c_long,
++        pub ru_nswap: c_long,
++        pub ru_inblock: c_long,
++        pub ru_oublock: c_long,
++        pub ru_msgsnd: c_long,
++        pub ru_msgrcv: c_long,
++        pub ru_nsignals: c_long,
++        pub ru_nvcsw: c_long,
++        pub ru_nivcsw: c_long,
++
++        #[cfg(any(target_env = "musl"))]
++        __reserved: [c_long; 16],
++    }
++
++    #[cfg_attr(target_os = "netbsd", repr(packed))]
++    pub struct in_addr {
++        pub s_addr: in_addr_t,
++    }
++
++    pub struct in6_addr {
++        pub s6_addr: [u8; 16],
++        __align: [u32; 0],
++    }
++
++    pub struct ip_mreq {
++        pub imr_multiaddr: in_addr,
++        pub imr_interface: in_addr,
++    }
++
++    pub struct ipv6_mreq {
++        pub ipv6mr_multiaddr: in6_addr,
++        #[cfg(target_os = "android")]
++        pub ipv6mr_interface: ::c_int,
++        #[cfg(not(target_os = "android"))]
++        pub ipv6mr_interface: ::c_uint,
++    }
++
++    pub struct hostent {
++        pub h_name: *mut ::c_char,
++        pub h_aliases: *mut *mut ::c_char,
++        pub h_addrtype: ::c_int,
++        pub h_length: ::c_int,
++        pub h_addr_list: *mut *mut ::c_char,
++    }
++
++    pub struct iovec {
++        pub iov_base: *mut ::c_void,
++        pub iov_len: ::size_t,
++    }
++
++    pub struct pollfd {
++        pub fd: ::c_int,
++        pub events: ::c_short,
++        pub revents: ::c_short,
++    }
++
++    pub struct winsize {
++        pub ws_row: ::c_ushort,
++        pub ws_col: ::c_ushort,
++        pub ws_xpixel: ::c_ushort,
++        pub ws_ypixel: ::c_ushort,
++    }
++
++    pub struct linger {
++        pub l_onoff: ::c_int,
++        pub l_linger: ::c_int,
++    }
++
++    pub struct sigval {
++        // Actually a union of an int and a void*
++        pub sival_ptr: *mut ::c_void
++    }
++
++    // <sys/time.h>
++    pub struct itimerval {
++        pub it_interval: ::timeval,
++        pub it_value: ::timeval,
++    }
++
++    // <sys/times.h>
++    pub struct tms {
++        pub tms_utime: ::clock_t,
++        pub tms_stime: ::clock_t,
++        pub tms_cutime: ::clock_t,
++        pub tms_cstime: ::clock_t,
++    }
++}
++
++pub const SIG_DFL: sighandler_t = 0 as sighandler_t;
++pub const SIG_IGN: sighandler_t = 1 as sighandler_t;
++pub const SIG_ERR: sighandler_t = !0 as sighandler_t;
++
++pub const DT_FIFO: u8 = 1;
++pub const DT_CHR: u8 = 2;
++pub const DT_DIR: u8 = 4;
++pub const DT_BLK: u8 = 6;
++pub const DT_REG: u8 = 8;
++pub const DT_LNK: u8 = 10;
++pub const DT_SOCK: u8 = 12;
++
++pub const FD_CLOEXEC: ::c_int = 0x1;
++
++pub const USRQUOTA: ::c_int = 0;
++pub const GRPQUOTA: ::c_int = 1;
++
++pub const SIGIOT: ::c_int = 6;
++
++pub const S_ISUID: ::c_int = 0x800;
++pub const S_ISGID: ::c_int = 0x400;
++pub const S_ISVTX: ::c_int = 0x200;
++
++pub const POLLIN: ::c_short = 0x1;
++pub const POLLPRI: ::c_short = 0x2;
++pub const POLLOUT: ::c_short = 0x4;
++pub const POLLERR: ::c_short = 0x8;
++pub const POLLHUP: ::c_short = 0x10;
++pub const POLLNVAL: ::c_short = 0x20;
++
++pub const IF_NAMESIZE: ::size_t = 16;
++
++pub const RTLD_LAZY: ::c_int = 0x1;
++
++pub const LOG_EMERG: ::c_int = 0;
++pub const LOG_ALERT: ::c_int = 1;
++pub const LOG_CRIT: ::c_int = 2;
++pub const LOG_ERR: ::c_int = 3;
++pub const LOG_WARNING: ::c_int = 4;
++pub const LOG_NOTICE: ::c_int = 5;
++pub const LOG_INFO: ::c_int = 6;
++pub const LOG_DEBUG: ::c_int = 7;
++
++pub const LOG_KERN: ::c_int = 0;
++pub const LOG_USER: ::c_int = 1 << 3;
++pub const LOG_MAIL: ::c_int = 2 << 3;
++pub const LOG_DAEMON: ::c_int = 3 << 3;
++pub const LOG_AUTH: ::c_int = 4 << 3;
++pub const LOG_SYSLOG: ::c_int = 5 << 3;
++pub const LOG_LPR: ::c_int = 6 << 3;
++pub const LOG_NEWS: ::c_int = 7 << 3;
++pub const LOG_UUCP: ::c_int = 8 << 3;
++pub const LOG_LOCAL0: ::c_int = 16 << 3;
++pub const LOG_LOCAL1: ::c_int = 17 << 3;
++pub const LOG_LOCAL2: ::c_int = 18 << 3;
++pub const LOG_LOCAL3: ::c_int = 19 << 3;
++pub const LOG_LOCAL4: ::c_int = 20 << 3;
++pub const LOG_LOCAL5: ::c_int = 21 << 3;
++pub const LOG_LOCAL6: ::c_int = 22 << 3;
++pub const LOG_LOCAL7: ::c_int = 23 << 3;
++
++pub const LOG_PID: ::c_int = 0x01;
++pub const LOG_CONS: ::c_int = 0x02;
++pub const LOG_ODELAY: ::c_int = 0x04;
++pub const LOG_NDELAY: ::c_int = 0x08;
++pub const LOG_NOWAIT: ::c_int = 0x10;
++
++pub const LOG_PRIMASK: ::c_int = 7;
++pub const LOG_FACMASK: ::c_int = 0x3f8;
++
++pub const PRIO_PROCESS: ::c_int = 0;
++pub const PRIO_PGRP: ::c_int = 1;
++pub const PRIO_USER: ::c_int = 2;
++
++pub const PRIO_MIN: ::c_int = -20;
++pub const PRIO_MAX: ::c_int = 20;
++
++pub const IPPROTO_ICMP: ::c_int = 1;
++pub const IPPROTO_ICMPV6: ::c_int = 58;
++pub const IPPROTO_TCP: ::c_int = 6;
++pub const IPPROTO_UDP: ::c_int = 17;
++pub const IPPROTO_IP: ::c_int = 0;
++pub const IPPROTO_IPV6: ::c_int = 41;
++
++cfg_if! {
++    if #[cfg(dox)] {
++        // on dox builds don't pull in anything
++    } else if #[cfg(all(not(stdbuild), feature = "use_std"))] {
++        // cargo build, don't pull in anything extra as the libstd  dep
++        // already pulls in all libs.
++    } else if #[cfg(any(all(target_env = "musl", not(target_arch = "mips"))))] {
++        #[link(name = "c", kind = "static", cfg(target_feature = "crt-static"))]
++        #[link(name = "c", cfg(not(target_feature = "crt-static")))]
++        extern {}
++    } else if #[cfg(target_os = "emscripten")] {
++        #[link(name = "c")]
++        extern {}
++    } else if #[cfg(all(target_os = "netbsd", target_vendor = "rumprun"))] {
++        // Since we don't use -nodefaultlibs on Rumprun, libc is always pulled
++        // in automatically by the linker. We avoid passing it explicitly, as it
++        // causes some versions of binutils to crash with an assertion failure.
++        #[link(name = "m")]
++        extern {}
++    } else if #[cfg(any(target_os = "macos",
++                        target_os = "ios",
++                        target_os = "android",
++                        target_os = "openbsd",
++                        target_os = "bitrig"))] {
++        #[link(name = "c")]
++        #[link(name = "m")]
++        extern {}
++    } else if #[cfg(target_os = "haiku")] {
++        #[link(name = "root")]
++        #[link(name = "network")]
++        extern {}
++    } else if #[cfg(target_os = "fuchsia")] {
++        #[link(name = "c")]
++        #[link(name = "mxio")]
++        extern {}
++    } else if #[cfg(target_env = "newlib")] {
++        #[link(name = "c")]
++        #[link(name = "m")]
++        extern {}
++    } else {
++        #[link(name = "c")]
++        #[link(name = "m")]
++        #[link(name = "rt")]
++        #[link(name = "pthread")]
++        extern {}
++    }
++}
++
++extern {
++    pub fn getgrnam(name: *const ::c_char) -> *mut group;
++    pub fn getgrgid(gid: ::gid_t) -> *mut group;
++
++    pub fn endpwent();
++    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam50")]
++    pub fn getpwnam(name: *const ::c_char) -> *mut passwd;
++    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid50")]
++    pub fn getpwuid(uid: ::uid_t) -> *mut passwd;
++
++    pub fn fprintf(stream: *mut ::FILE,
++                   format: *const ::c_char, ...) -> ::c_int;
++    pub fn printf(format: *const ::c_char, ...) -> ::c_int;
++    pub fn snprintf(s: *mut ::c_char, n: ::size_t,
++                    format: *const ::c_char, ...) -> ::c_int;
++    pub fn sprintf(s: *mut ::c_char, format: *const ::c_char, ...) -> ::c_int;
++    pub fn fscanf(stream: *mut ::FILE, format: *const ::c_char, ...) -> ::c_int;
++    pub fn scanf(format: *const ::c_char, ...) -> ::c_int;
++    pub fn sscanf(s: *const ::c_char, format: *const ::c_char, ...) -> ::c_int;
++    pub fn getchar_unlocked() -> ::c_int;
++    pub fn putchar_unlocked(c: ::c_int) -> ::c_int;
++
++    #[cfg_attr(target_os = "netbsd", link_name = "__socket30")]
++    pub fn socket(domain: ::c_int, ty: ::c_int, protocol: ::c_int) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "connect$UNIX2003")]
++    pub fn connect(socket: ::c_int, address: *const sockaddr,
++                   len: socklen_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "listen$UNIX2003")]
++    pub fn listen(socket: ::c_int, backlog: ::c_int) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "accept$UNIX2003")]
++    pub fn accept(socket: ::c_int, address: *mut sockaddr,
++                  address_len: *mut socklen_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "getpeername$UNIX2003")]
++    pub fn getpeername(socket: ::c_int, address: *mut sockaddr,
++                       address_len: *mut socklen_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "getsockname$UNIX2003")]
++    pub fn getsockname(socket: ::c_int, address: *mut sockaddr,
++                       address_len: *mut socklen_t) -> ::c_int;
++    pub fn setsockopt(socket: ::c_int, level: ::c_int, name: ::c_int,
++                      value: *const ::c_void,
++                      option_len: socklen_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "socketpair$UNIX2003")]
++    pub fn socketpair(domain: ::c_int, type_: ::c_int, protocol: ::c_int,
++                      socket_vector: *mut ::c_int) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "sendto$UNIX2003")]
++    pub fn sendto(socket: ::c_int, buf: *const ::c_void, len: ::size_t,
++                  flags: ::c_int, addr: *const sockaddr,
++                  addrlen: socklen_t) -> ::ssize_t;
++    pub fn shutdown(socket: ::c_int, how: ::c_int) -> ::c_int;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "chmod$UNIX2003")]
++    pub fn chmod(path: *const c_char, mode: mode_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "fchmod$UNIX2003")]
++    pub fn fchmod(fd: ::c_int, mode: mode_t) -> ::c_int;
++
++    #[cfg_attr(target_os = "macos", link_name = "fstat$INODE64")]
++    #[cfg_attr(target_os = "netbsd", link_name = "__fstat50")]
++    pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int;
++
++    pub fn mkdir(path: *const c_char, mode: mode_t) -> ::c_int;
++
++    #[cfg_attr(target_os = "macos", link_name = "stat$INODE64")]
++    #[cfg_attr(target_os = "netbsd", link_name = "__stat50")]
++    pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "popen$UNIX2003")]
++    pub fn popen(command: *const c_char,
++                 mode: *const c_char) -> *mut ::FILE;
++    pub fn pclose(stream: *mut ::FILE) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "fdopen$UNIX2003")]
++    pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE;
++    pub fn fileno(stream: *mut ::FILE) -> ::c_int;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "open$UNIX2003")]
++    pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "creat$UNIX2003")]
++    pub fn creat(path: *const c_char, mode: mode_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "fcntl$UNIX2003")]
++    pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
++               link_name = "opendir$INODE64")]
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "opendir$INODE64$UNIX2003")]
++    #[cfg_attr(target_os = "netbsd", link_name = "__opendir30")]
++    pub fn opendir(dirname: *const c_char) -> *mut ::DIR;
++    #[cfg_attr(target_os = "macos", link_name = "readdir$INODE64")]
++    #[cfg_attr(target_os = "netbsd", link_name = "__readdir30")]
++    pub fn readdir(dirp: *mut ::DIR) -> *mut ::dirent;
++    #[cfg_attr(target_os = "macos", link_name = "readdir_r$INODE64")]
++    #[cfg_attr(target_os = "netbsd", link_name = "__readdir_r30")]
++    #[cfg_attr(target_os = "solaris", link_name = "__posix_readdir_r")]
++    pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent,
++                     result: *mut *mut ::dirent) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "closedir$UNIX2003")]
++    pub fn closedir(dirp: *mut ::DIR) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
++               link_name = "rewinddir$INODE64")]
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "rewinddir$INODE64$UNIX2003")]
++    pub fn rewinddir(dirp: *mut ::DIR);
++
++    pub fn openat(dirfd: ::c_int, pathname: *const ::c_char,
++                  flags: ::c_int, ...) -> ::c_int;
++    pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
++                     mode: ::c_int, flags: ::c_int) -> ::c_int;
++    pub fn fchmodat(dirfd: ::c_int, pathname: *const ::c_char,
++                    mode: ::mode_t, flags: ::c_int) -> ::c_int;
++    pub fn fchown(fd: ::c_int,
++                  owner: ::uid_t,
++                  group: ::gid_t) -> ::c_int;
++    pub fn fchownat(dirfd: ::c_int, pathname: *const ::c_char,
++                    owner: ::uid_t, group: ::gid_t,
++                    flags: ::c_int) -> ::c_int;
++    #[cfg_attr(target_os = "macos", link_name = "fstatat$INODE64")]
++    pub fn fstatat(dirfd: ::c_int, pathname: *const ::c_char,
++                   buf: *mut stat, flags: ::c_int) -> ::c_int;
++    pub fn linkat(olddirfd: ::c_int, oldpath: *const ::c_char,
++                  newdirfd: ::c_int, newpath: *const ::c_char,
++                  flags: ::c_int) -> ::c_int;
++    pub fn mkdirat(dirfd: ::c_int, pathname: *const ::c_char,
++                   mode: ::mode_t) -> ::c_int;
++    pub fn readlinkat(dirfd: ::c_int, pathname: *const ::c_char,
++                      buf: *mut ::c_char, bufsiz: ::size_t) -> ::ssize_t;
++    pub fn renameat(olddirfd: ::c_int, oldpath: *const ::c_char,
++                    newdirfd: ::c_int, newpath: *const ::c_char)
++                    -> ::c_int;
++    pub fn symlinkat(target: *const ::c_char, newdirfd: ::c_int,
++                     linkpath: *const ::c_char) -> ::c_int;
++    pub fn unlinkat(dirfd: ::c_int, pathname: *const ::c_char,
++                    flags: ::c_int) -> ::c_int;
++
++    pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int;
++    pub fn alarm(seconds: ::c_uint) -> ::c_uint;
++    pub fn chdir(dir: *const c_char) -> ::c_int;
++    pub fn fchdir(dirfd: ::c_int) -> ::c_int;
++    pub fn chown(path: *const c_char, uid: uid_t,
++                 gid: gid_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "lchown$UNIX2003")]
++    pub fn lchown(path: *const c_char, uid: uid_t,
++                  gid: gid_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "close$NOCANCEL$UNIX2003")]
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
++               link_name = "close$NOCANCEL")]
++    pub fn close(fd: ::c_int) -> ::c_int;
++    pub fn dup(fd: ::c_int) -> ::c_int;
++    pub fn dup2(src: ::c_int, dst: ::c_int) -> ::c_int;
++    pub fn execl(path: *const c_char,
++                 arg0: *const c_char, ...) -> ::c_int;
++    pub fn execle(path: *const ::c_char,
++                  arg0: *const ::c_char, ...) -> ::c_int;
++    pub fn execlp(file: *const ::c_char,
++                  arg0: *const ::c_char, ...) -> ::c_int;
++    pub fn execv(prog: *const c_char,
++                 argv: *const *const c_char) -> ::c_int;
++    pub fn execve(prog: *const c_char, argv: *const *const c_char,
++                  envp: *const *const c_char)
++                  -> ::c_int;
++    pub fn execvp(c: *const c_char,
++                  argv: *const *const c_char) -> ::c_int;
++    pub fn fexecve(fd: ::c_int, argv: *const *const c_char,
++                   envp: *const *const c_char)
++                   -> ::c_int;
++    pub fn fork() -> pid_t;
++    pub fn fpathconf(filedes: ::c_int, name: ::c_int) -> c_long;
++    pub fn getcwd(buf: *mut c_char, size: ::size_t) -> *mut c_char;
++    pub fn getegid() -> gid_t;
++    pub fn geteuid() -> uid_t;
++    pub fn getgid() -> gid_t;
++    pub fn getgroups(ngroups_max: ::c_int, groups: *mut gid_t)
++                     -> ::c_int;
++    pub fn getlogin() -> *mut c_char;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "getopt$UNIX2003")]
++    pub fn getopt(argc: ::c_int, argv: *const *mut c_char,
++                  optstr: *const c_char) -> ::c_int;
++    pub fn getpgid(pid: pid_t) -> pid_t;
++    pub fn getpgrp() -> pid_t;
++    pub fn getpid() -> pid_t;
++    pub fn getppid() -> pid_t;
++    pub fn getuid() -> uid_t;
++    pub fn isatty(fd: ::c_int) -> ::c_int;
++    pub fn link(src: *const c_char, dst: *const c_char) -> ::c_int;
++    pub fn lseek(fd: ::c_int, offset: off_t, whence: ::c_int) -> off_t;
++    pub fn pathconf(path: *const c_char, name: ::c_int) -> c_long;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pause$UNIX2003")]
++    pub fn pause() -> ::c_int;
++    pub fn pipe(fds: *mut ::c_int) -> ::c_int;
++    pub fn posix_memalign(memptr: *mut *mut ::c_void,
++                      align: ::size_t,
++                      size: ::size_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "read$UNIX2003")]
++    pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t)
++                -> ::ssize_t;
++    pub fn rmdir(path: *const c_char) -> ::c_int;
++    pub fn seteuid(uid: uid_t) -> ::c_int;
++    pub fn setgid(gid: gid_t) -> ::c_int;
++    pub fn setpgid(pid: pid_t, pgid: pid_t) -> ::c_int;
++    pub fn setsid() -> pid_t;
++    pub fn setuid(uid: uid_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "sleep$UNIX2003")]
++    pub fn sleep(secs: ::c_uint) -> ::c_uint;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "nanosleep$UNIX2003")]
++    #[cfg_attr(target_os = "netbsd", link_name = "__nanosleep50")]
++    pub fn nanosleep(rqtp: *const timespec,
++                     rmtp: *mut timespec) -> ::c_int;
++    pub fn tcgetpgrp(fd: ::c_int) -> pid_t;
++    pub fn tcsetpgrp(fd: ::c_int, pgrp: ::pid_t) -> ::c_int;
++    pub fn ttyname(fd: ::c_int) -> *mut c_char;
++    pub fn unlink(c: *const c_char) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "wait$UNIX2003")]
++    pub fn wait(status: *mut ::c_int) -> pid_t;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "waitpid$UNIX2003")]
++    pub fn waitpid(pid: pid_t, status: *mut ::c_int, options: ::c_int)
++                   -> pid_t;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "write$UNIX2003")]
++    pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t)
++                 -> ::ssize_t;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pread$UNIX2003")]
++    pub fn pread(fd: ::c_int, buf: *mut ::c_void, count: ::size_t,
++                 offset: off_t) -> ::ssize_t;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pwrite$UNIX2003")]
++    pub fn pwrite(fd: ::c_int, buf: *const ::c_void, count: ::size_t,
++                  offset: off_t) -> ::ssize_t;
++    pub fn umask(mask: mode_t) -> mode_t;
++
++    #[cfg_attr(target_os = "netbsd", link_name = "__utime50")]
++    pub fn utime(file: *const c_char, buf: *const utimbuf) -> ::c_int;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++                   link_name = "kill$UNIX2003")]
++    pub fn kill(pid: pid_t, sig: ::c_int) -> ::c_int;
++
++    pub fn mlock(addr: *const ::c_void, len: ::size_t) -> ::c_int;
++    pub fn munlock(addr: *const ::c_void, len: ::size_t) -> ::c_int;
++    pub fn mlockall(flags: ::c_int) -> ::c_int;
++    pub fn munlockall() -> ::c_int;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "mmap$UNIX2003")]
++    pub fn mmap(addr: *mut ::c_void,
++                len: ::size_t,
++                prot: ::c_int,
++                flags: ::c_int,
++                fd: ::c_int,
++                offset: off_t)
++                -> *mut ::c_void;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "munmap$UNIX2003")]
++    pub fn munmap(addr: *mut ::c_void, len: ::size_t) -> ::c_int;
++
++    pub fn if_nametoindex(ifname: *const c_char) -> ::c_uint;
++    pub fn if_indextoname(ifindex: ::c_uint,
++                          ifname: *mut ::c_char) -> *mut ::c_char;
++
++    #[cfg_attr(target_os = "macos", link_name = "lstat$INODE64")]
++    #[cfg_attr(target_os = "netbsd", link_name = "__lstat50")]
++    pub fn lstat(path: *const c_char, buf: *mut stat) -> ::c_int;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "fsync$UNIX2003")]
++    pub fn fsync(fd: ::c_int) -> ::c_int;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "setenv$UNIX2003")]
++    pub fn setenv(name: *const c_char, val: *const c_char,
++                  overwrite: ::c_int) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "unsetenv$UNIX2003")]
++    #[cfg_attr(target_os = "netbsd", link_name = "__unsetenv13")]
++    pub fn unsetenv(name: *const c_char) -> ::c_int;
++
++    pub fn symlink(path1: *const c_char,
++                   path2: *const c_char) -> ::c_int;
++
++    pub fn ftruncate(fd: ::c_int, length: off_t) -> ::c_int;
++
++    pub fn signal(signum: ::c_int, handler: sighandler_t) -> sighandler_t;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "getrlimit$UNIX2003")]
++    pub fn getrlimit(resource: ::c_int, rlim: *mut rlimit) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "setrlimit$UNIX2003")]
++    pub fn setrlimit(resource: ::c_int, rlim: *const rlimit) -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__getrusage50")]
++    pub fn getrusage(resource: ::c_int, usage: *mut rusage) -> ::c_int;
++
++    pub fn getdtablesize() -> ::c_int;
++    #[cfg_attr(any(target_os = "macos", target_os = "ios"),
++               link_name = "realpath$DARWIN_EXTSN")]
++    pub fn realpath(pathname: *const ::c_char, resolved: *mut ::c_char)
++                    -> *mut ::c_char;
++
++    pub fn flock(fd: ::c_int, operation: ::c_int) -> ::c_int;
++
++    #[cfg_attr(target_os = "netbsd", link_name = "__gettimeofday50")]
++    pub fn gettimeofday(tp: *mut ::timeval,
++                        tz: *mut ::c_void) -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__times13")]
++    pub fn times(buf: *mut ::tms) -> ::clock_t;
++
++    pub fn pthread_self() -> ::pthread_t;
++    pub fn pthread_create(native: *mut ::pthread_t,
++                          attr: *const ::pthread_attr_t,
++                          f: extern fn(*mut ::c_void) -> *mut ::c_void,
++                          value: *mut ::c_void) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pthread_join$UNIX2003")]
++    pub fn pthread_join(native: ::pthread_t,
++                        value: *mut *mut ::c_void) -> ::c_int;
++    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
++                          parent: Option<unsafe extern fn()>,
++                          child: Option<unsafe extern fn()>) -> ::c_int;
++    pub fn pthread_exit(value: *mut ::c_void);
++    pub fn pthread_attr_init(attr: *mut ::pthread_attr_t) -> ::c_int;
++    pub fn pthread_attr_destroy(attr: *mut ::pthread_attr_t) -> ::c_int;
++    pub fn pthread_attr_setstacksize(attr: *mut ::pthread_attr_t,
++                                     stack_size: ::size_t) -> ::c_int;
++    pub fn pthread_attr_setdetachstate(attr: *mut ::pthread_attr_t,
++                                       state: ::c_int) -> ::c_int;
++    pub fn pthread_detach(thread: ::pthread_t) -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__libc_thr_yield")]
++    pub fn sched_yield() -> ::c_int;
++    pub fn pthread_key_create(key: *mut pthread_key_t,
++                              dtor: Option<unsafe extern fn(*mut ::c_void)>)
++                              -> ::c_int;
++    pub fn pthread_key_delete(key: pthread_key_t) -> ::c_int;
++    pub fn pthread_getspecific(key: pthread_key_t) -> *mut ::c_void;
++    pub fn pthread_setspecific(key: pthread_key_t, value: *const ::c_void)
++                               -> ::c_int;
++    pub fn pthread_mutex_init(lock: *mut pthread_mutex_t,
++                              attr: *const pthread_mutexattr_t) -> ::c_int;
++    pub fn pthread_mutex_destroy(lock: *mut pthread_mutex_t) -> ::c_int;
++    pub fn pthread_mutex_lock(lock: *mut pthread_mutex_t) -> ::c_int;
++    pub fn pthread_mutex_trylock(lock: *mut pthread_mutex_t) -> ::c_int;
++    pub fn pthread_mutex_unlock(lock: *mut pthread_mutex_t) -> ::c_int;
++
++    pub fn pthread_mutexattr_init(attr: *mut pthread_mutexattr_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pthread_mutexattr_destroy$UNIX2003")]
++    pub fn pthread_mutexattr_destroy(attr: *mut pthread_mutexattr_t) -> ::c_int;
++    pub fn pthread_mutexattr_settype(attr: *mut pthread_mutexattr_t,
++                                     _type: ::c_int) -> ::c_int;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pthread_cond_init$UNIX2003")]
++    pub fn pthread_cond_init(cond: *mut pthread_cond_t,
++                             attr: *const pthread_condattr_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pthread_cond_wait$UNIX2003")]
++    pub fn pthread_cond_wait(cond: *mut pthread_cond_t,
++                             lock: *mut pthread_mutex_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pthread_cond_timedwait$UNIX2003")]
++    pub fn pthread_cond_timedwait(cond: *mut pthread_cond_t,
++                              lock: *mut pthread_mutex_t,
++                              abstime: *const ::timespec) -> ::c_int;
++    pub fn pthread_cond_signal(cond: *mut pthread_cond_t) -> ::c_int;
++    pub fn pthread_cond_broadcast(cond: *mut pthread_cond_t) -> ::c_int;
++    pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> ::c_int;
++    pub fn pthread_condattr_init(attr: *mut pthread_condattr_t) -> ::c_int;
++    pub fn pthread_condattr_destroy(attr: *mut pthread_condattr_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pthread_rwlock_init$UNIX2003")]
++    pub fn pthread_rwlock_init(lock: *mut pthread_rwlock_t,
++                               attr: *const pthread_rwlockattr_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pthread_rwlock_destroy$UNIX2003")]
++    pub fn pthread_rwlock_destroy(lock: *mut pthread_rwlock_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pthread_rwlock_rdlock$UNIX2003")]
++    pub fn pthread_rwlock_rdlock(lock: *mut pthread_rwlock_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pthread_rwlock_tryrdlock$UNIX2003")]
++    pub fn pthread_rwlock_tryrdlock(lock: *mut pthread_rwlock_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pthread_rwlock_wrlock$UNIX2003")]
++    pub fn pthread_rwlock_wrlock(lock: *mut pthread_rwlock_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pthread_rwlock_trywrlock$UNIX2003")]
++    pub fn pthread_rwlock_trywrlock(lock: *mut pthread_rwlock_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pthread_rwlock_unlock$UNIX2003")]
++    pub fn pthread_rwlock_unlock(lock: *mut pthread_rwlock_t) -> ::c_int;
++    pub fn pthread_rwlockattr_init(attr: *mut pthread_rwlockattr_t) -> ::c_int;
++    pub fn pthread_rwlockattr_destroy(attr: *mut pthread_rwlockattr_t)
++                                      -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pthread_sigmask$UNIX2003")]
++    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
++                           oldset: *mut sigset_t) -> ::c_int;
++    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
++    #[cfg_attr(all(target_os = "linux", not(target_env = "musl")),
++               link_name = "__xpg_strerror_r")]
++    pub fn strerror_r(errnum: ::c_int, buf: *mut c_char,
++                      buflen: ::size_t) -> ::c_int;
++
++    pub fn getsockopt(sockfd: ::c_int,
++                      level: ::c_int,
++                      optname: ::c_int,
++                      optval: *mut ::c_void,
++                      optlen: *mut ::socklen_t) -> ::c_int;
++    pub fn raise(signum: ::c_int) -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__sigaction14")]
++    pub fn sigaction(signum: ::c_int,
++                     act: *const sigaction,
++                     oldact: *mut sigaction) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "sigaltstack$UNIX2003")]
++    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
++    pub fn sigaltstack(ss: *const stack_t,
++                       oss: *mut stack_t) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
++               link_name = "sigwait$UNIX2003")]
++    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
++    pub fn sigwait(set: *const sigset_t,
++                   sig: *mut ::c_int) -> ::c_int;
++
++    #[cfg_attr(target_os = "netbsd", link_name = "__utimes50")]
++    pub fn utimes(filename: *const ::c_char,
++                  times: *const ::timeval) -> ::c_int;
++    pub fn dlopen(filename: *const ::c_char,
++                  flag: ::c_int) -> *mut ::c_void;
++    pub fn dlerror() -> *mut ::c_char;
++    pub fn dlsym(handle: *mut ::c_void,
++                 symbol: *const ::c_char) -> *mut ::c_void;
++    pub fn dlclose(handle: *mut ::c_void) -> ::c_int;
++    pub fn dladdr(addr: *const ::c_void, info: *mut Dl_info) -> ::c_int;
++
++    pub fn getaddrinfo(node: *const c_char,
++                       service: *const c_char,
++                       hints: *const addrinfo,
++                       res: *mut *mut addrinfo) -> ::c_int;
++    pub fn freeaddrinfo(res: *mut addrinfo);
++    pub fn gai_strerror(errcode: ::c_int) -> *const ::c_char;
++    #[cfg_attr(any(
++                   all(target_os = "linux", not(target_env = "musl")),
++                   target_os = "freebsd",
++                   target_os = "dragonfly"),
++               link_name = "__res_init")]
++    #[cfg_attr(any(target_os = "macos", target_os = "ios"),
++               link_name = "res_9_init")]
++    pub fn res_init() -> ::c_int;
++
++    #[cfg_attr(target_os = "netbsd", link_name = "__gmtime_r50")]
++    pub fn gmtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm;
++    #[cfg_attr(target_os = "netbsd", link_name = "__localtime_r50")]
++    pub fn localtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "mktime$UNIX2003")]
++    #[cfg_attr(target_os = "netbsd", link_name = "__mktime50")]
++    pub fn mktime(tm: *mut tm) -> time_t;
++    #[cfg_attr(target_os = "netbsd", link_name = "__time50")]
++    pub fn time(time: *mut time_t) -> time_t;
++    #[cfg_attr(target_os = "netbsd", link_name = "__gmtime50")]
++    pub fn gmtime(time_p: *const time_t) -> *mut tm;
++    #[cfg_attr(target_os = "netbsd", link_name = "__locatime50")]
++    pub fn localtime(time_p: *const time_t) -> *mut tm;
++
++    #[cfg_attr(target_os = "netbsd", link_name = "__mknod50")]
++    pub fn mknod(pathname: *const ::c_char, mode: ::mode_t,
++                 dev: ::dev_t) -> ::c_int;
++    pub fn uname(buf: *mut ::utsname) -> ::c_int;
++    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
++    pub fn gethostname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
++    pub fn chroot(name: *const ::c_char) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "usleep$UNIX2003")]
++    pub fn usleep(secs: ::c_uint) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "send$UNIX2003")]
++    pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t,
++                flags: ::c_int) -> ::ssize_t;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "recv$UNIX2003")]
++    pub fn recv(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
++                flags: ::c_int) -> ::ssize_t;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "putenv$UNIX2003")]
++    #[cfg_attr(target_os = "netbsd", link_name = "__putenv50")]
++    pub fn putenv(string: *mut c_char) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "poll$UNIX2003")]
++    pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: ::c_int) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
++               link_name = "select$1050")]
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "select$UNIX2003")]
++    #[cfg_attr(target_os = "netbsd", link_name = "__select50")]
++    pub fn select(nfds: ::c_int,
++                  readfs: *mut fd_set,
++                  writefds: *mut fd_set,
++                  errorfds: *mut fd_set,
++                  timeout: *mut timeval) -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__setlocale50")]
++    pub fn setlocale(category: ::c_int,
++                     locale: *const ::c_char) -> *mut ::c_char;
++    pub fn localeconv() -> *mut lconv;
++
++    pub fn sem_destroy(sem: *mut sem_t) -> ::c_int;
++    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
++    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
++    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "sem_wait$UNIX2003")]
++    pub fn sem_wait(sem: *mut sem_t) -> ::c_int;
++    pub fn sem_trywait(sem: *mut sem_t) -> ::c_int;
++    pub fn sem_post(sem: *mut sem_t) -> ::c_int;
++    pub fn sem_init(sem: *mut sem_t,
++                    pshared: ::c_int,
++                    value: ::c_uint)
++                    -> ::c_int;
++    pub fn statvfs(path: *const c_char, buf: *mut statvfs) -> ::c_int;
++    pub fn fstatvfs(fd: ::c_int, buf: *mut statvfs) -> ::c_int;
++
++    pub fn readlink(path: *const c_char,
++                    buf: *mut c_char,
++                    bufsz: ::size_t)
++                    -> ::ssize_t;
++
++    #[cfg_attr(target_os = "netbsd", link_name = "__sigemptyset14")]
++    pub fn sigemptyset(set: *mut sigset_t) -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__sigaddset14")]
++    pub fn sigaddset(set: *mut sigset_t, signum: ::c_int) -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__sigfillset14")]
++    pub fn sigfillset(set: *mut sigset_t) -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__sigdelset14")]
++    pub fn sigdelset(set: *mut sigset_t, signum: ::c_int) -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__sigismember14")]
++    pub fn sigismember(set: *const sigset_t, signum: ::c_int) -> ::c_int;
++
++    #[cfg_attr(target_os = "netbsd", link_name = "__sigprocmask14")]
++    pub fn sigprocmask(how: ::c_int,
++                       set: *const sigset_t,
++                       oldset: *mut sigset_t)
++                       -> ::c_int;
++    #[cfg_attr(target_os = "netbsd", link_name = "__sigpending14")]
++    pub fn sigpending(set: *mut sigset_t) -> ::c_int;
++
++    #[cfg_attr(target_os = "netbsd", link_name = "__timegm50")]
++    pub fn timegm(tm: *mut ::tm) -> time_t;
++
++    pub fn getsid(pid: pid_t) -> pid_t;
++
++    pub fn sysconf(name: ::c_int) -> ::c_long;
++
++    pub fn mkfifo(path: *const c_char, mode: mode_t) -> ::c_int;
++
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
++               link_name = "pselect$1050")]
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "pselect$UNIX2003")]
++    #[cfg_attr(target_os = "netbsd", link_name = "__pselect50")]
++    pub fn pselect(nfds: ::c_int,
++                   readfs: *mut fd_set,
++                   writefds: *mut fd_set,
++                   errorfds: *mut fd_set,
++                   timeout: *const timespec,
++                   sigmask: *const sigset_t) -> ::c_int;
++    pub fn fseeko(stream: *mut ::FILE,
++                  offset: ::off_t,
++                  whence: ::c_int) -> ::c_int;
++    pub fn ftello(stream: *mut ::FILE) -> ::off_t;
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "tcdrain$UNIX2003")]
++    pub fn tcdrain(fd: ::c_int) -> ::c_int;
++    pub fn cfgetispeed(termios: *const ::termios) -> ::speed_t;
++    pub fn cfgetospeed(termios: *const ::termios) -> ::speed_t;
++    pub fn cfmakeraw(termios: *mut ::termios);
++    pub fn cfsetispeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
++    pub fn cfsetospeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
++    pub fn cfsetspeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
++    pub fn tcgetattr(fd: ::c_int, termios: *mut ::termios) -> ::c_int;
++    pub fn tcsetattr(fd: ::c_int,
++                     optional_actions: ::c_int,
++                     termios: *const ::termios) -> ::c_int;
++    pub fn tcflow(fd: ::c_int, action: ::c_int) -> ::c_int;
++    pub fn tcflush(fd: ::c_int, action: ::c_int) -> ::c_int;
++    pub fn tcgetsid(fd: ::c_int) -> ::pid_t;
++    pub fn tcsendbreak(fd: ::c_int, duration: ::c_int) -> ::c_int;
++    pub fn mkstemp(template: *mut ::c_char) -> ::c_int;
++    pub fn mkdtemp(template: *mut ::c_char) -> *mut ::c_char;
++
++    pub fn tmpnam(ptr: *mut ::c_char) -> *mut ::c_char;
++
++    pub fn openlog(ident: *const ::c_char, logopt: ::c_int, facility: ::c_int);
++    pub fn closelog();
++    pub fn setlogmask(maskpri: ::c_int) -> ::c_int;
++    pub fn syslog(priority: ::c_int, message: *const ::c_char, ...);
++    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
++               link_name = "nice$UNIX2003")]
++    pub fn nice(incr: ::c_int) -> ::c_int;
++
++    pub fn grantpt(fd: ::c_int) -> ::c_int;
++    pub fn posix_openpt(flags: ::c_int) -> ::c_int;
++    pub fn ptsname(fd: ::c_int) -> *mut ::c_char;
++    pub fn unlockpt(fd: ::c_int) -> ::c_int;
++}
++
++cfg_if! {
++    if #[cfg(target_env = "uclibc")] {
++        mod uclibc;
++        pub use self::uclibc::*;
++    } else if #[cfg(target_env = "newlib")] {
++        mod newlib;
++        pub use self::newlib::*;
++    } else if #[cfg(any(target_os = "linux",
++                        target_os = "android",
++                        target_os = "emscripten",
++                        target_os = "fuchsia"))] {
++        mod notbsd;
++        pub use self::notbsd::*;
++    } else if #[cfg(any(target_os = "macos",
++                        target_os = "ios",
++                        target_os = "freebsd",
++                        target_os = "dragonfly",
++                        target_os = "openbsd",
++                        target_os = "netbsd",
++                        target_os = "bitrig"))] {
++        mod bsd;
++        pub use self::bsd::*;
++    } else if #[cfg(target_os = "solaris")] {
++        mod solaris;
++        pub use self::solaris::*;
++    } else if #[cfg(target_os = "haiku")] {
++        mod haiku;
++        pub use self::haiku::*;
++    } else {
++        // Unknown target_os
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..372a48c4b4aed5ce9d030c672df29804f6a36d22
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++pub type c_char = u8;
++pub type wchar_t = u32;
++
++pub type c_long = i32;
++pub type c_ulong = u32;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ba25d3cea1dc3cb7836645a10c1ac8565efabfb0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,605 @@@
++use dox::mem;
++
++pub type blkcnt_t = i32;
++pub type blksize_t = i32;
++pub type clock_t = i32;
++pub type clockid_t = ::c_ulong;
++pub type dev_t = u32;
++pub type fsblkcnt_t = u64;
++pub type fsfilcnt_t = u32;
++pub type id_t = u32;
++pub type ino_t = u32;
++pub type key_t = ::c_int;
++pub type loff_t = ::c_longlong;
++pub type mode_t = ::c_uint;
++pub type nfds_t = u32;
++pub type nlink_t = ::c_ushort;
++pub type off_t = i64;
++pub type pthread_t = ::c_ulong;
++pub type pthread_key_t = ::c_uint;
++pub type rlim_t = u32;
++pub type sa_family_t = u8;
++pub type socklen_t = u32;
++pub type speed_t = u32;
++pub type suseconds_t = i32;
++pub type tcflag_t = ::c_uint;
++pub type time_t = i32;
++pub type useconds_t = u32;
++
++s! {
++    pub struct sockaddr {
++        pub sa_family: sa_family_t,
++        pub sa_data: [::c_char; 14],
++    }
++
++    pub struct sockaddr_in {
++        pub sin_family: sa_family_t,
++        pub sin_port: ::in_port_t,
++        pub sin_addr: ::in_addr,
++        pub sin_zero: [u8; 8],
++    }
++
++    pub struct sockaddr_in6 { // Unverified
++        pub sin6_family: sa_family_t,
++        pub sin6_port: ::in_port_t,
++        pub sin6_flowinfo: u32,
++        pub sin6_addr: ::in6_addr,
++        pub sin6_scope_id: u32,
++    }
++
++    pub struct sockaddr_storage {
++        pub ss_family: sa_family_t,
++        pub __ss_padding: [u8; 26],
++    }
++
++    pub struct addrinfo {
++        pub ai_flags: ::c_int,
++        pub ai_family: ::c_int,
++        pub ai_socktype: ::c_int,
++        pub ai_protocol: ::c_int,
++        pub ai_addrlen: socklen_t,
++        pub ai_canonname: *mut ::c_char,
++        pub ai_addr: *mut sockaddr,
++        pub ai_next: *mut addrinfo,
++    }
++
++    pub struct ip_mreq {
++        pub imr_multiaddr: in_addr,
++        pub imr_interface: in_addr,
++    }
++
++    pub struct linger {
++        pub l_onoff: ::c_int,
++        pub l_linger: ::c_int,
++    }
++
++    pub struct in_addr {
++            pub s_addr: ::in_addr_t,
++    }
++
++    pub struct hostent {
++            pub h_name: *mut ::c_char,
++            pub h_aliases: *mut *mut ::c_char,
++            pub h_addrtype: ::c_int,
++            pub h_length: ::c_int,
++            pub h_addr_list: *mut *mut ::c_char,
++            pub h_addr: *mut ::c_char,
++    }
++
++    pub struct pollfd {
++        pub fd: ::c_int,
++        pub events: ::c_int,
++        pub revents: ::c_int,
++    }
++
++    pub struct lconv {
++        pub decimal_point: *mut ::c_char,
++        pub thousands_sep: *mut ::c_char,
++        pub grouping: *mut ::c_char,
++        pub int_curr_symbol: *mut ::c_char,
++        pub currency_symbol: *mut ::c_char,
++        pub mon_decimal_point: *mut ::c_char,
++        pub mon_thousands_sep: *mut ::c_char,
++        pub mon_grouping: *mut ::c_char,
++        pub positive_sign: *mut ::c_char,
++        pub negative_sign: *mut ::c_char,
++        pub int_frac_digits: ::c_char,
++        pub frac_digits: ::c_char,
++        pub p_cs_precedes: ::c_char,
++        pub p_sep_by_space: ::c_char,
++        pub n_cs_precedes: ::c_char,
++        pub n_sep_by_space: ::c_char,
++        pub p_sign_posn: ::c_char,
++        pub n_sign_posn: ::c_char,
++        pub int_n_cs_precedes: ::c_char,
++        pub int_n_sep_by_space: ::c_char,
++        pub int_n_sign_posn: ::c_char,
++        pub int_p_cs_precedes: ::c_char,
++        pub int_p_sep_by_space: ::c_char,
++        pub int_p_sign_posn: ::c_char,
++    }
++
++    pub struct tm {
++        pub tm_sec: ::c_int,
++        pub tm_min: ::c_int,
++        pub tm_hour: ::c_int,
++        pub tm_mday: ::c_int,
++        pub tm_mon: ::c_int,
++        pub tm_year: ::c_int,
++        pub tm_wday: ::c_int,
++        pub tm_yday: ::c_int,
++        pub tm_isdst: ::c_int,
++    }
++
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: dev_t,
++        pub st_size: off_t,
++        pub st_atime: time_t,
++        pub st_spare1: ::c_long,
++        pub st_mtime: time_t,
++        pub st_spare2: ::c_long,
++        pub st_ctime: time_t,
++        pub st_spare3: ::c_long,
++        pub st_blksize: blksize_t,
++        pub st_blocks: blkcnt_t,
++        pub st_spare4: [::c_long; 2usize],
++    }
++
++    pub struct statvfs {
++        pub f_bsize: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_blocks: fsblkcnt_t,
++        pub f_bfree: fsblkcnt_t,
++        pub f_bavail: fsblkcnt_t,
++        pub f_files: fsfilcnt_t,
++        pub f_ffree: fsfilcnt_t,
++        pub f_favail: fsfilcnt_t,
++        pub f_fsid: ::c_ulong,
++        pub f_flag: ::c_ulong,
++        pub f_namemax: ::c_ulong,
++    }
++
++    pub struct sigset_t {
++        __val: [::c_ulong; 16],
++    }
++
++    pub struct sigaction {
++        pub sa_handler: extern fn(arg1: ::c_int),
++        pub sa_mask: sigset_t,
++        pub sa_flags: ::c_int,
++    }
++
++    pub struct dirent {
++        pub d_ino: ino_t,
++        pub d_type: ::c_uchar,
++        pub d_name: [::c_char; 256usize],
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_flags: ::c_int,
++        pub ss_size: usize,
++    }
++
++    pub struct fd_set { // Unverified
++        fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE],
++    }
++
++    pub struct passwd { // Unverified
++        pub pw_name: *mut ::c_char,
++        pub pw_passwd: *mut ::c_char,
++        pub pw_uid: ::uid_t,
++        pub pw_gid: ::gid_t,
++        pub pw_gecos: *mut ::c_char,
++        pub pw_dir: *mut ::c_char,
++        pub pw_shell: *mut ::c_char,
++    }
++
++    pub struct termios { // Unverified
++        pub c_iflag: ::tcflag_t,
++        pub c_oflag: ::tcflag_t,
++        pub c_cflag: ::tcflag_t,
++        pub c_lflag: ::tcflag_t,
++        pub c_line: ::cc_t,
++        pub c_cc: [::cc_t; ::NCCS],
++    }
++
++    pub struct sem_t { // Unverified
++        __size: [::c_char; 16],
++    }
++
++    pub struct Dl_info { // Unverified
++        pub dli_fname: *const ::c_char,
++        pub dli_fbase: *mut ::c_void,
++        pub dli_sname: *const ::c_char,
++        pub dli_saddr: *mut ::c_void,
++    }
++
++    pub struct utsname { // Unverified
++        pub sysname: [::c_char; 65],
++        pub nodename: [::c_char; 65],
++        pub release: [::c_char; 65],
++        pub version: [::c_char; 65],
++        pub machine: [::c_char; 65],
++        pub domainname: [::c_char; 65]
++    }
++
++    pub struct cpu_set_t { // Unverified
++        bits: [u32; 32],
++    }
++
++    pub struct pthread_attr_t { // Unverified
++        __size: [u64; 7]
++    }
++
++    pub struct pthread_mutex_t { // Unverified
++        #[cfg(any(target_arch = "mips", target_arch = "arm",
++                  target_arch = "powerpc"))]
++        __align: [::c_long; 0],
++        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
++                      target_arch = "powerpc")))]
++        __align: [::c_longlong; 0],
++        size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
++    }
++
++    pub struct pthread_rwlock_t { // Unverified
++        #[cfg(any(target_arch = "mips", target_arch = "arm",
++                  target_arch = "powerpc"))]
++        __align: [::c_long; 0],
++        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
++                      target_arch = "powerpc")))]
++        __align: [::c_longlong; 0],
++        size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
++    }
++
++    pub struct pthread_mutexattr_t { // Unverified
++        #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
++                  target_arch = "mips64", target_arch = "s390x",
++                  target_arch = "sparc64"))]
++        __align: [::c_int; 0],
++        #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
++                      target_arch = "mips64", target_arch = "s390x",
++                      target_arch = "sparc64")))]
++        __align: [::c_long; 0],
++        size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
++    }
++
++    pub struct pthread_rwlockattr_t { // Unverified
++        __lockkind: ::c_int,
++        __pshared: ::c_int,
++    }
++
++    pub struct pthread_cond_t { // Unverified
++        __align: [::c_longlong; 0],
++        size: [u8; __SIZEOF_PTHREAD_COND_T],
++    }
++
++    pub struct pthread_condattr_t { // Unverified
++        __align: [::c_int; 0],
++        size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
++    }
++
++}
++
++// unverified constants
++pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
++    __align: [],
++    size: [0; __SIZEOF_PTHREAD_MUTEX_T],
++};
++pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
++    __align: [],
++    size: [0; __SIZEOF_PTHREAD_COND_T],
++};
++pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
++    __align: [],
++    size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
++};
++pub const NCCS: usize = 32;
++pub const __SIZEOF_PTHREAD_ATTR_T: usize = 56;
++pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
++pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
++pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
++pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
++pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32;
++pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4;
++pub const __PTHREAD_MUTEX_HAVE_PREV: usize = 1;
++pub const __PTHREAD_RWLOCK_INT_FLAGS_SHARED: usize = 1;
++pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
++pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
++pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
++pub const FD_SETSIZE: usize = 1024;
++// intentionally not public, only used for fd_set
++const ULONG_SIZE: usize = 32;
++
++// Other constants
++pub const EPERM: ::c_int = 1;
++pub const ENOENT: ::c_int = 2;
++pub const ESRCH: ::c_int = 3;
++pub const EINTR: ::c_int = 4;
++pub const EIO: ::c_int = 5;
++pub const ENXIO: ::c_int = 6;
++pub const E2BIG: ::c_int = 7;
++pub const ENOEXEC: ::c_int = 8;
++pub const EBADF: ::c_int = 9;
++pub const ECHILD: ::c_int = 10;
++pub const EAGAIN: ::c_int = 11;
++pub const ENOMEM: ::c_int = 12;
++pub const EACCES: ::c_int = 13;
++pub const EFAULT: ::c_int = 14;
++pub const EBUSY: ::c_int = 16;
++pub const EEXIST: ::c_int = 17;
++pub const EXDEV: ::c_int = 18;
++pub const ENODEV: ::c_int = 19;
++pub const ENOTDIR: ::c_int = 20;
++pub const EISDIR: ::c_int = 21;
++pub const EINVAL: ::c_int = 22;
++pub const ENFILE: ::c_int = 23;
++pub const EMFILE: ::c_int = 24;
++pub const ENOTTY: ::c_int = 25;
++pub const ETXTBSY: ::c_int = 26;
++pub const EFBIG: ::c_int = 27;
++pub const ENOSPC: ::c_int = 28;
++pub const ESPIPE: ::c_int = 29;
++pub const EROFS: ::c_int = 30;
++pub const EMLINK: ::c_int = 31;
++pub const EPIPE: ::c_int = 32;
++pub const EDOM: ::c_int = 33;
++pub const ERANGE: ::c_int = 34;
++pub const ENOMSG: ::c_int = 35;
++pub const EIDRM: ::c_int = 36;
++pub const EDEADLK: ::c_int = 45;
++pub const ENOLCK: ::c_int = 46;
++pub const ENOSTR: ::c_int = 60;
++pub const ENODATA: ::c_int = 61;
++pub const ETIME: ::c_int = 62;
++pub const ENOSR: ::c_int = 63;
++pub const ENOLINK: ::c_int = 67;
++pub const EPROTO: ::c_int = 71;
++pub const EMULTIHOP: ::c_int = 74;
++pub const EBADMSG: ::c_int = 77;
++pub const EFTYPE: ::c_int = 79;
++pub const ENOSYS: ::c_int = 88;
++pub const ENOTEMPTY: ::c_int = 90;
++pub const ENAMETOOLONG: ::c_int = 91;
++pub const ELOOP: ::c_int = 92;
++pub const EOPNOTSUPP: ::c_int = 95;
++pub const EPFNOSUPPORT: ::c_int = 96;
++pub const ECONNRESET: ::c_int = 104;
++pub const ENOBUFS: ::c_int = 105;
++pub const EAFNOSUPPORT: ::c_int = 106;
++pub const EPROTOTYPE: ::c_int = 107;
++pub const ENOTSOCK: ::c_int = 108;
++pub const ENOPROTOOPT: ::c_int = 109;
++pub const ECONNREFUSED: ::c_int = 111;
++pub const EADDRINUSE: ::c_int = 112;
++pub const ECONNABORTED: ::c_int = 113;
++pub const ENETUNREACH: ::c_int = 114;
++pub const ENETDOWN: ::c_int = 115;
++pub const ETIMEDOUT: ::c_int = 116;
++pub const EHOSTDOWN: ::c_int = 117;
++pub const EHOSTUNREACH: ::c_int = 118;
++pub const EINPROGRESS: ::c_int = 119;
++pub const EALREADY: ::c_int = 120;
++pub const EDESTADDRREQ: ::c_int = 121;
++pub const EMSGSIZE: ::c_int = 122;
++pub const EPROTONOSUPPORT: ::c_int = 123;
++pub const EADDRNOTAVAIL: ::c_int = 125;
++pub const ENETRESET: ::c_int = 126;
++pub const EISCONN: ::c_int = 127;
++pub const ENOTCONN: ::c_int = 128;
++pub const ETOOMANYREFS: ::c_int = 129;
++pub const EDQUOT: ::c_int = 132;
++pub const ESTALE: ::c_int = 133;
++pub const ENOTSUP: ::c_int = 134;
++pub const EILSEQ: ::c_int = 138;
++pub const EOVERFLOW: ::c_int = 139;
++pub const ECANCELED: ::c_int = 140;
++pub const ENOTRECOVERABLE: ::c_int = 141;
++pub const EOWNERDEAD: ::c_int = 142;
++pub const EWOULDBLOCK: ::c_int = 11;
++
++pub const F_DUPFD: ::c_int = 0;
++pub const F_GETFD: ::c_int = 1;
++pub const F_SETFD: ::c_int = 2;
++pub const F_GETFL: ::c_int = 3;
++pub const F_SETFL: ::c_int = 4;
++pub const F_GETOWN: ::c_int = 5;
++pub const F_SETOWN: ::c_int = 6;
++pub const F_GETLK: ::c_int = 7;
++pub const F_SETLK: ::c_int = 8;
++pub const F_SETLKW: ::c_int = 9;
++pub const F_RGETLK: ::c_int = 10;
++pub const F_RSETLK: ::c_int = 11;
++pub const F_CNVT: ::c_int = 12;
++pub const F_RSETLKW: ::c_int = 13;
++pub const F_DUPFD_CLOEXEC: ::c_int = 14;
++
++pub const O_RDONLY: ::c_int = 0;
++pub const O_WRONLY: ::c_int = 1;
++pub const O_RDWR: ::c_int = 2;
++pub const O_APPEND: ::c_int = 8;
++pub const O_CREAT: ::c_int = 512;
++pub const O_TRUNC: ::c_int = 1024;
++pub const O_EXCL: ::c_int = 2048;
++pub const O_SYNC: ::c_int = 8192;
++pub const O_NONBLOCK: ::c_int = 16384;
++
++pub const O_ACCMODE: ::c_int = 3;
++pub const O_CLOEXEC: ::c_int = 0x80000;
++
++pub const STDIN_FILENO: ::c_int = 0;
++pub const STDOUT_FILENO: ::c_int = 1;
++pub const STDERR_FILENO: ::c_int = 2;
++
++pub const SEEK_SET: ::c_int = 0;
++pub const SEEK_CUR: ::c_int = 1;
++pub const SEEK_END: ::c_int = 2;
++
++pub const FIONBIO: ::c_int = 1;
++
++pub const S_BLKSIZE: ::mode_t = 1024;
++pub const S_IREAD: ::mode_t = 256;
++pub const S_IWRITE: ::mode_t = 128;
++pub const S_IEXEC: ::mode_t = 64;
++pub const S_ENFMT: ::mode_t = 1024;
++pub const S_IFMT: ::mode_t = 61440;
++pub const S_IFDIR: ::mode_t = 16384;
++pub const S_IFCHR: ::mode_t = 8192;
++pub const S_IFBLK: ::mode_t = 24576;
++pub const S_IFREG: ::mode_t = 32768;
++pub const S_IFLNK: ::mode_t = 40960;
++pub const S_IFSOCK: ::mode_t = 49152;
++pub const S_IFIFO: ::mode_t = 4096;
++pub const S_IRUSR: ::mode_t = 256;
++pub const S_IWUSR: ::mode_t = 128;
++pub const S_IXUSR: ::mode_t = 64;
++pub const S_IRGRP: ::mode_t = 32;
++pub const S_IWGRP: ::mode_t = 16;
++pub const S_IXGRP: ::mode_t = 8;
++pub const S_IROTH: ::mode_t = 4;
++pub const S_IWOTH: ::mode_t = 2;
++pub const S_IXOTH: ::mode_t = 1;
++
++pub const SOL_SOCKET: ::c_int = 65535;
++pub const SOL_TCP: ::c_int = 6;
++
++pub const PF_UNSPEC: ::c_int = 0;
++pub const PF_INET: ::c_int = 2;
++pub const PF_INET6: ::c_int = 23;
++
++pub const AF_UNSPEC: ::c_int = 0;
++pub const AF_INET: ::c_int = 2;
++pub const AF_INET6: ::c_int = 23;
++
++pub const SOCK_STREAM: ::c_int = 1;
++pub const SOCK_DGRAM: ::c_int = 2;
++
++pub const MSG_OOB: ::c_int = 1;
++pub const MSG_PEEK: ::c_int = 2;
++pub const MSG_DONTWAIT: ::c_int = 4;
++pub const MSG_DONTROUTE: ::c_int = 0;
++pub const MSG_WAITALL: ::c_int = 0;
++pub const MSG_MORE: ::c_int = 0;
++pub const MSG_NOSIGNAL: ::c_int = 0;
++
++pub const SHUT_RD: ::c_int = 0;
++pub const SHUT_WR: ::c_int = 1;
++pub const SHUT_RDWR: ::c_int = 2;
++
++pub const SO_REUSEADDR: ::c_int = 4;
++pub const SO_LINGER: ::c_int = 128;
++pub const SO_OOBINLINE: ::c_int = 256;
++pub const SO_SNDBUF: ::c_int = 4097;
++pub const SO_RCVBUF: ::c_int = 4098;
++pub const SO_SNDLOWAT: ::c_int = 4099;
++pub const SO_RCVLOWAT: ::c_int = 4100;
++pub const SO_TYPE: ::c_int = 4104;
++pub const SO_ERROR: ::c_int = 4105;
++
++pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC;
++
++pub const INADDR_LOOPBACK: ::c_int = 2130706433;
++pub const INADDR_ANY: ::c_int = 0;
++pub const INADDR_BROADCAST: ::c_int = 4294967295;
++pub const INADDR_NONE: ::c_int = 4294967295;
++
++pub const INET_ADDRSTRLEN: ::c_int = 16;
++
++pub const IPPROTO_IP: ::c_int = 0;
++pub const IPPROTO_UDP: ::c_int = 17;
++pub const IPPROTO_TCP: ::c_int = 6;
++
++pub const TCP_NODELAY: ::c_int = 8193;
++pub const TCP_MAXSEG: ::c_int = 8194;
++
++pub const IP_TOS: ::c_int = 7;
++pub const IP_TTL: ::c_int = 8;
++pub const IP_MULTICAST_LOOP: ::c_int = 9;
++pub const IP_MULTICAST_TTL: ::c_int = 10;
++pub const IP_ADD_MEMBERSHIP: ::c_int = 11;
++pub const IP_DROP_MEMBERSHIP: ::c_int = 12;
++
++pub const HOST_NOT_FOUND: ::c_int = 1;
++pub const NO_DATA: ::c_int = 2;
++pub const NO_ADDRESS: ::c_int = 2;
++pub const NO_RECOVERY: ::c_int = 3;
++pub const TRY_AGAIN: ::c_int = 4;
++
++pub const AI_PASSIVE: ::c_int = 1;
++pub const AI_CANONNAME: ::c_int = 2;
++pub const AI_NUMERICHOST: ::c_int = 4;
++pub const AI_NUMERICSERV: ::c_int = 0;
++pub const AI_ADDRCONFIG: ::c_int = 0;
++
++pub const NI_MAXHOST: ::c_int = 1025;
++pub const NI_MAXSERV: ::c_int = 32;
++pub const NI_NOFQDN: ::c_int = 1;
++pub const NI_NUMERICHOST: ::c_int = 2;
++pub const NI_NAMEREQD: ::c_int = 4;
++pub const NI_NUMERICSERV: ::c_int = 0;
++pub const NI_DGRAM: ::c_int = 0;
++
++pub const EAI_FAMILY: ::c_int = -303;
++pub const EAI_MEMORY: ::c_int = -304;
++pub const EAI_NONAME: ::c_int = -305;
++pub const EAI_SOCKTYPE: ::c_int = -307;
++
++f! {
++    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
++        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        let fd = fd as usize;
++        (*set).fds_bits[fd / bits] &= !(1 << (fd % bits));
++        return
++    }
++
++    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
++        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        let fd = fd as usize;
++        return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0
++    }
++
++    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
++        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        let fd = fd as usize;
++        (*set).fds_bits[fd / bits] |= 1 << (fd % bits);
++        return
++    }
++
++    pub fn FD_ZERO(set: *mut fd_set) -> () {
++        for slot in (*set).fds_bits.iter_mut() {
++            *slot = 0;
++        }
++    }
++}
++
++extern {
++    pub fn bind(fd: ::c_int, addr: *const sockaddr, len: socklen_t) -> ::c_int;
++    pub fn closesocket(sockfd: ::c_int) -> ::c_int;
++    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
++    pub fn recvfrom(fd: ::c_int, buf: *mut ::c_void, n: usize, flags: ::c_int,
++                    addr: *mut sockaddr, addr_len: *mut socklen_t) -> isize;
++    pub fn getnameinfo(sa: *const sockaddr, salen: socklen_t,
++                       host: *mut ::c_char, hostlen: socklen_t,
++                       serv: *mut ::c_char, servlen: socklen_t,
++                       flags: ::c_int) -> ::c_int;
++    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
++}
++
++cfg_if! {
++    if #[cfg(target_arch = "arm")] {
++        mod arm;
++        pub use self::arm::*;
++    } else {
++        // Only tested on ARM so far. Other platforms might have different
++        // definitions for types and constants.
++        pub use target_arch_not_implemented;
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2eb4d0490d78c26b3b67b699a7e45722d00bd684
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7 @@@
++pub type c_char = u8;
++pub type wchar_t = u32;
++
++pub const O_DIRECT: ::c_int = 0x10000;
++pub const O_DIRECTORY: ::c_int = 0x4000;
++pub const O_NOFOLLOW: ::c_int = 0x8000;
++pub const O_LARGEFILE: ::c_int = 0o400000;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f6b0f03d48d12822796b11137a816a05ba3488c9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,202 @@@
++// The following definitions are correct for arm and i686,
++// but may be wrong for mips
++
++pub type c_long = i32;
++pub type c_ulong = u32;
++pub type mode_t = u16;
++pub type off64_t = ::c_longlong;
++pub type sigset_t = ::c_ulong;
++pub type socklen_t = i32;
++pub type time64_t = i64;
++
++s! {
++    pub struct sigaction {
++        pub sa_sigaction: ::sighandler_t,
++        pub sa_mask: ::sigset_t,
++        pub sa_flags: ::c_ulong,
++        pub sa_restorer: ::dox::Option<extern fn()>,
++    }
++
++    pub struct rlimit64 {
++        pub rlim_cur: u64,
++        pub rlim_max: u64,
++    }
++
++    pub struct stat {
++        pub st_dev: ::c_ulonglong,
++        __pad0: [::c_uchar; 4],
++        __st_ino: ::ino_t,
++        pub st_mode: ::c_uint,
++        pub st_nlink: ::c_uint,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::c_ulonglong,
++        __pad3: [::c_uchar; 4],
++        pub st_size: ::c_longlong,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::c_ulonglong,
++        pub st_atime: ::c_ulong,
++        pub st_atime_nsec: ::c_ulong,
++        pub st_mtime: ::c_ulong,
++        pub st_mtime_nsec: ::c_ulong,
++        pub st_ctime: ::c_ulong,
++        pub st_ctime_nsec: ::c_ulong,
++        pub st_ino: ::c_ulonglong,
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::c_ulonglong,
++        __pad0: [::c_uchar; 4],
++        __st_ino: ::ino_t,
++        pub st_mode: ::c_uint,
++        pub st_nlink: ::c_uint,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::c_ulonglong,
++        __pad3: [::c_uchar; 4],
++        pub st_size: ::c_longlong,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::c_ulonglong,
++        pub st_atime: ::c_ulong,
++        pub st_atime_nsec: ::c_ulong,
++        pub st_mtime: ::c_ulong,
++        pub st_mtime_nsec: ::c_ulong,
++        pub st_ctime: ::c_ulong,
++        pub st_ctime_nsec: ::c_ulong,
++        pub st_ino: ::c_ulonglong,
++    }
++
++    pub struct pthread_attr_t {
++        pub flags: ::uint32_t,
++        pub stack_base: *mut ::c_void,
++        pub stack_size: ::size_t,
++        pub guard_size: ::size_t,
++        pub sched_policy: ::int32_t,
++        pub sched_priority: ::int32_t,
++    }
++
++    pub struct pthread_mutex_t { value: ::c_int }
++
++    pub struct pthread_cond_t { value: ::c_int }
++
++    pub struct pthread_rwlock_t {
++        lock: pthread_mutex_t,
++        cond: pthread_cond_t,
++        numLocks: ::c_int,
++        writerThreadId: ::c_int,
++        pendingReaders: ::c_int,
++        pendingWriters: ::c_int,
++        attr: i32,
++        __reserved: [::c_char; 12],
++    }
++
++    pub struct passwd {
++        pub pw_name: *mut ::c_char,
++        pub pw_passwd: *mut ::c_char,
++        pub pw_uid: ::uid_t,
++        pub pw_gid: ::gid_t,
++        pub pw_dir: *mut ::c_char,
++        pub pw_shell: *mut ::c_char,
++    }
++
++    pub struct statfs {
++        pub f_type: ::uint32_t,
++        pub f_bsize: ::uint32_t,
++        pub f_blocks: ::uint64_t,
++        pub f_bfree: ::uint64_t,
++        pub f_bavail: ::uint64_t,
++        pub f_files: ::uint64_t,
++        pub f_ffree: ::uint64_t,
++        pub f_fsid: ::__fsid_t,
++        pub f_namelen: ::uint32_t,
++        pub f_frsize: ::uint32_t,
++        pub f_flags: ::uint32_t,
++        pub f_spare: [::uint32_t; 4],
++    }
++
++    pub struct sysinfo {
++        pub uptime: ::c_long,
++        pub loads: [::c_ulong; 3],
++        pub totalram: ::c_ulong,
++        pub freeram: ::c_ulong,
++        pub sharedram: ::c_ulong,
++        pub bufferram: ::c_ulong,
++        pub totalswap: ::c_ulong,
++        pub freeswap: ::c_ulong,
++        pub procs: ::c_ushort,
++        pub pad: ::c_ushort,
++        pub totalhigh: ::c_ulong,
++        pub freehigh: ::c_ulong,
++        pub mem_unit: ::c_uint,
++        pub _f: [::c_char; 8],
++    }
++}
++
++pub const RTLD_GLOBAL: ::c_int = 2;
++pub const RTLD_NOW: ::c_int = 0;
++pub const RTLD_DEFAULT: *mut ::c_void = -1isize as *mut ::c_void;
++
++pub const PTRACE_GETFPREGS: ::c_int = 14;
++pub const PTRACE_SETFPREGS: ::c_int = 15;
++pub const PTRACE_GETREGS: ::c_int = 12;
++pub const PTRACE_SETREGS: ::c_int = 13;
++
++pub const SYS_gettid: ::c_long = 224;
++pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
++    value: 0,
++};
++pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
++    value: 0,
++};
++pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
++    lock: PTHREAD_MUTEX_INITIALIZER,
++    cond: PTHREAD_COND_INITIALIZER,
++    numLocks: 0,
++    writerThreadId: 0,
++    pendingReaders: 0,
++    pendingWriters: 0,
++    attr: 0,
++    __reserved: [0; 12],
++};
++pub const PTHREAD_STACK_MIN: ::size_t = 4096 * 2;
++pub const CPU_SETSIZE: ::size_t = 32;
++pub const __CPU_BITS: ::size_t = 32;
++
++pub const UT_LINESIZE: usize = 8;
++pub const UT_NAMESIZE: usize = 8;
++pub const UT_HOSTSIZE: usize = 16;
++
++pub const SIGSTKSZ: ::size_t = 8192;
++pub const MINSIGSTKSZ: ::size_t = 2048;
++
++extern {
++    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
++                address_len: socklen_t) -> ::c_int;
++
++    pub fn writev(fd: ::c_int,
++                  iov: *const ::iovec,
++                  iovcnt: ::c_int) -> ::ssize_t;
++    pub fn readv(fd: ::c_int,
++                 iov: *const ::iovec,
++                 iovcnt: ::c_int) -> ::ssize_t;
++
++    pub fn sendmsg(fd: ::c_int,
++                   msg: *const ::msghdr,
++                   flags: ::c_int) -> ::ssize_t;
++    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
++                   -> ::ssize_t;
++
++    pub fn timegm64(tm: *const ::tm) -> ::time64_t;
++}
++
++cfg_if! {
++    if #[cfg(target_arch = "x86")] {
++        mod x86;
++        pub use self::x86::*;
++    } else if #[cfg(target_arch = "arm")] {
++        mod arm;
++        pub use self::arm::*;
++    } else {
++        // Unknown target_arch
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c37666dc6adb55a8168067f96e001844e7ec4cb5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,9 @@@
++pub type c_char = i8;
++pub type wchar_t = i32;
++
++pub const O_DIRECT: ::c_int = 0x4000;
++pub const O_DIRECTORY: ::c_int = 0x10000;
++pub const O_NOFOLLOW: ::c_int = 0x20000;
++pub const O_LARGEFILE: ::c_int = 0o0100000;
++
++pub const MAP_32BIT: ::c_int = 0x40;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b683dcbbe324fb5e4de14674a770b2ee76440e8d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,60 @@@
++pub type c_char = u8;
++pub type wchar_t = u32;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino_t,
++        pub st_mode: ::c_uint,
++        pub st_nlink: ::c_uint,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __pad1: ::c_ulong,
++        pub st_size: ::off64_t,
++        pub st_blksize: ::c_int,
++        __pad2: ::c_int,
++        pub st_blocks: ::c_long,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_ulong,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_ulong,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_ulong,
++        __unused4: ::c_uint,
++        __unused5: ::c_uint,
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino_t,
++        pub st_mode: ::c_uint,
++        pub st_nlink: ::c_uint,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __pad1: ::c_ulong,
++        pub st_size: ::off64_t,
++        pub st_blksize: ::c_int,
++        __pad2: ::c_int,
++        pub st_blocks: ::c_long,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_ulong,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_ulong,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_ulong,
++        __unused4: ::c_uint,
++        __unused5: ::c_uint,
++    }
++}
++
++pub const O_DIRECT: ::c_int = 0x10000;
++pub const O_DIRECTORY: ::c_int = 0x4000;
++pub const O_NOFOLLOW: ::c_int = 0x8000;
++pub const O_LARGEFILE: ::c_int = 0o400000;
++
++pub const SYS_gettid: ::c_long = 178;
++
++pub const SIGSTKSZ: ::size_t = 16384;
++pub const MINSIGSTKSZ: ::size_t = 5120;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..98a2f39fbd207fb3cade569baee4e60c8650efc2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,162 @@@
++// The following definitions are correct for aarch64 and x86_64,
++// but may be wrong for mips64
++
++pub type c_long = i64;
++pub type c_ulong = u64;
++pub type mode_t = u32;
++pub type off64_t = i64;
++pub type socklen_t = u32;
++
++s! {
++    pub struct sigset_t {
++        __val: [::c_ulong; 1],
++    }
++
++    pub struct sigaction {
++        pub sa_flags: ::c_uint,
++        pub sa_sigaction: ::sighandler_t,
++        pub sa_mask: ::sigset_t,
++        pub sa_restorer: ::dox::Option<extern fn()>,
++    }
++
++    pub struct rlimit64 {
++        pub rlim_cur: ::c_ulonglong,
++        pub rlim_max: ::c_ulonglong,
++    }
++
++    pub struct pthread_attr_t {
++        pub flags: ::uint32_t,
++        pub stack_base: *mut ::c_void,
++        pub stack_size: ::size_t,
++        pub guard_size: ::size_t,
++        pub sched_policy: ::int32_t,
++        pub sched_priority: ::int32_t,
++        __reserved: [::c_char; 16],
++    }
++
++    pub struct pthread_mutex_t {
++        value: ::c_int,
++        __reserved: [::c_char; 36],
++    }
++
++    pub struct pthread_cond_t {
++        value: ::c_int,
++        __reserved: [::c_char; 44],
++    }
++
++    pub struct pthread_rwlock_t {
++        numLocks: ::c_int,
++        writerThreadId: ::c_int,
++        pendingReaders: ::c_int,
++        pendingWriters: ::c_int,
++        attr: i32,
++        __reserved: [::c_char; 36],
++    }
++
++    pub struct passwd {
++        pub pw_name: *mut ::c_char,
++        pub pw_passwd: *mut ::c_char,
++        pub pw_uid: ::uid_t,
++        pub pw_gid: ::gid_t,
++        pub pw_gecos: *mut ::c_char,
++        pub pw_dir: *mut ::c_char,
++        pub pw_shell: *mut ::c_char,
++    }
++
++    pub struct statfs {
++        pub f_type: ::uint64_t,
++        pub f_bsize: ::uint64_t,
++        pub f_blocks: ::uint64_t,
++        pub f_bfree: ::uint64_t,
++        pub f_bavail: ::uint64_t,
++        pub f_files: ::uint64_t,
++        pub f_ffree: ::uint64_t,
++        pub f_fsid: ::__fsid_t,
++        pub f_namelen: ::uint64_t,
++        pub f_frsize: ::uint64_t,
++        pub f_flags: ::uint64_t,
++        pub f_spare: [::uint64_t; 4],
++    }
++
++    pub struct sysinfo {
++        pub uptime: ::c_long,
++        pub loads: [::c_ulong; 3],
++        pub totalram: ::c_ulong,
++        pub freeram: ::c_ulong,
++        pub sharedram: ::c_ulong,
++        pub bufferram: ::c_ulong,
++        pub totalswap: ::c_ulong,
++        pub freeswap: ::c_ulong,
++        pub procs: ::c_ushort,
++        pub pad: ::c_ushort,
++        pub totalhigh: ::c_ulong,
++        pub freehigh: ::c_ulong,
++        pub mem_unit: ::c_uint,
++        pub _f: [::c_char; 0],
++    }
++}
++
++pub const RTLD_GLOBAL: ::c_int = 0x00100;
++pub const RTLD_NOW: ::c_int = 2;
++pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void;
++
++pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
++    value: 0,
++    __reserved: [0; 36],
++};
++pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
++    value: 0,
++    __reserved: [0; 44],
++};
++pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
++    numLocks: 0,
++    writerThreadId: 0,
++    pendingReaders: 0,
++    pendingWriters: 0,
++    attr: 0,
++    __reserved: [0; 36],
++};
++pub const PTHREAD_STACK_MIN: ::size_t = 4096 * 4;
++pub const CPU_SETSIZE: ::size_t = 1024;
++pub const __CPU_BITS: ::size_t = 64;
++
++pub const UT_LINESIZE: usize = 32;
++pub const UT_NAMESIZE: usize = 32;
++pub const UT_HOSTSIZE: usize = 256;
++
++// Some weirdness in Android
++extern {
++    // address_len should be socklen_t, but it is c_int!
++    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
++                address_len: ::c_int) -> ::c_int;
++
++    // the return type should be ::ssize_t, but it is c_int!
++    pub fn writev(fd: ::c_int,
++                  iov: *const ::iovec,
++                  iovcnt: ::c_int) -> ::c_int;
++
++    // the return type should be ::ssize_t, but it is c_int!
++    pub fn readv(fd: ::c_int,
++                 iov: *const ::iovec,
++                 iovcnt: ::c_int) -> ::c_int;
++
++    // the return type should be ::ssize_t, but it is c_int!
++    pub fn sendmsg(fd: ::c_int,
++                   msg: *const ::msghdr,
++                   flags: ::c_int) -> ::c_int;
++
++    // the return type should be ::ssize_t, but it is c_int!
++    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::c_int;
++}
++
++cfg_if! {
++    if #[cfg(target_arch = "x86_64")] {
++        mod x86_64;
++        pub use self::x86_64::*;
++    } else if #[cfg(target_arch = "aarch64")] {
++        mod aarch64;
++        pub use self::aarch64::*;
++    } else {
++        // Unknown target_arch
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d8585d38145a8c4fbb4d0cbc928ad2a708e9887c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,56 @@@
++pub type c_char = i8;
++pub type wchar_t = i32;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino_t,
++        pub st_nlink: ::c_ulong,
++        pub st_mode: ::c_uint,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        pub st_size: ::off64_t,
++        pub st_blksize: ::c_long,
++        pub st_blocks: ::c_long,
++        pub st_atime: ::c_ulong,
++        pub st_atime_nsec: ::c_ulong,
++        pub st_mtime: ::c_ulong,
++        pub st_mtime_nsec: ::c_ulong,
++        pub st_ctime: ::c_ulong,
++        pub st_ctime_nsec: ::c_ulong,
++        __unused: [::c_long; 3],
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino_t,
++        pub st_nlink: ::c_ulong,
++        pub st_mode: ::c_uint,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        pub st_size: ::off64_t,
++        pub st_blksize: ::c_long,
++        pub st_blocks: ::c_long,
++        pub st_atime: ::c_ulong,
++        pub st_atime_nsec: ::c_ulong,
++        pub st_mtime: ::c_ulong,
++        pub st_mtime_nsec: ::c_ulong,
++        pub st_ctime: ::c_ulong,
++        pub st_ctime_nsec: ::c_ulong,
++        __unused: [::c_long; 3],
++    }
++}
++
++pub const O_DIRECT: ::c_int = 0x4000;
++pub const O_DIRECTORY: ::c_int = 0x10000;
++pub const O_NOFOLLOW: ::c_int = 0x20000;
++pub const O_LARGEFILE: ::c_int = 0o0100000;
++
++pub const SYS_gettid: ::c_long = 186;
++
++pub const SIGSTKSZ: ::size_t = 8192;
++pub const MINSIGSTKSZ: ::size_t = 2048;
++
++pub const MAP_32BIT: ::c_int = 0x40;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..eb1c047f4cfe891feba1f67be52bf464c8bf2618
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,929 @@@
++//! Android-specific definitions for linux-like values
++
++use dox::mem;
++
++pub type clock_t = ::c_long;
++pub type time_t = ::c_long;
++pub type suseconds_t = ::c_long;
++pub type off_t = ::c_long;
++pub type blkcnt_t = ::c_ulong;
++pub type blksize_t = ::c_ulong;
++pub type nlink_t = u32;
++pub type useconds_t = u32;
++pub type pthread_t = ::c_long;
++pub type pthread_mutexattr_t = ::c_long;
++pub type pthread_rwlockattr_t = ::c_long;
++pub type pthread_condattr_t = ::c_long;
++pub type fsfilcnt_t = ::c_ulong;
++pub type fsblkcnt_t = ::c_ulong;
++pub type nfds_t = ::c_uint;
++pub type rlim_t = ::c_ulong;
++pub type dev_t = ::c_ulong;
++pub type ino_t = ::c_ulong;
++pub type __CPU_BITTYPE = ::c_ulong;
++pub type idtype_t = ::c_int;
++
++s! {
++    pub struct dirent {
++        pub d_ino: u64,
++        pub d_off: i64,
++        pub d_reclen: ::c_ushort,
++        pub d_type: ::c_uchar,
++        pub d_name: [::c_char; 256],
++    }
++
++    pub struct dirent64 {
++        pub d_ino: u64,
++        pub d_off: i64,
++        pub d_reclen: ::c_ushort,
++        pub d_type: ::c_uchar,
++        pub d_name: [::c_char; 256],
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_flags: ::c_int,
++        pub ss_size: ::size_t
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_errno: ::c_int,
++        pub si_code: ::c_int,
++        pub _pad: [::c_int; 29],
++        _align: [usize; 0],
++    }
++
++    pub struct __fsid_t {
++        __val: [::c_int; 2],
++    }
++
++    pub struct msghdr {
++        pub msg_name: *mut ::c_void,
++        pub msg_namelen: ::socklen_t,
++        pub msg_iov: *mut ::iovec,
++        pub msg_iovlen: ::size_t,
++        pub msg_control: *mut ::c_void,
++        pub msg_controllen: ::size_t,
++        pub msg_flags: ::c_int,
++    }
++
++    pub struct cmsghdr {
++        pub cmsg_len: ::size_t,
++        pub cmsg_level: ::c_int,
++        pub cmsg_type: ::c_int,
++    }
++
++    pub struct termios {
++        pub c_iflag: ::tcflag_t,
++        pub c_oflag: ::tcflag_t,
++        pub c_cflag: ::tcflag_t,
++        pub c_lflag: ::tcflag_t,
++        pub c_line: ::cc_t,
++        pub c_cc: [::cc_t; ::NCCS],
++    }
++
++    pub struct flock {
++        pub l_type: ::c_short,
++        pub l_whence: ::c_short,
++        pub l_start: ::off_t,
++        pub l_len: ::off_t,
++        pub l_pid: ::pid_t,
++    }
++
++    pub struct cpu_set_t {
++        #[cfg(target_pointer_width = "64")]
++        __bits: [__CPU_BITTYPE; 16],
++        #[cfg(target_pointer_width = "32")]
++        __bits: [__CPU_BITTYPE; 1],
++    }
++
++    pub struct sem_t {
++        count: ::c_uint,
++        #[cfg(target_pointer_width = "64")]
++        __reserved: [::c_int; 3],
++    }
++
++    pub struct lastlog {
++        ll_time: ::time_t,
++        ll_line: [::c_char; UT_LINESIZE],
++        ll_host: [::c_char; UT_HOSTSIZE],
++    }
++
++    pub struct exit_status {
++        pub e_termination: ::c_short,
++        pub e_exit: ::c_short,
++    }
++
++    pub struct utmp {
++        pub ut_type: ::c_short,
++        pub ut_pid: ::pid_t,
++        pub ut_line: [::c_char; UT_LINESIZE],
++        pub ut_id: [::c_char; 4],
++
++        pub ut_user: [::c_char; UT_NAMESIZE],
++        pub ut_host: [::c_char; UT_HOSTSIZE],
++        pub ut_exit: exit_status,
++        pub ut_session: ::c_long,
++        pub ut_tv: ::timeval,
++
++        pub ut_addr_v6: [::int32_t; 4],
++        unused: [::c_char; 20],
++    }
++
++    pub struct statvfs {
++        pub f_bsize: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_favail: ::fsfilcnt_t,
++        pub f_fsid: ::c_ulong,
++        pub f_flag: ::c_ulong,
++        pub f_namemax: ::c_ulong,
++        #[cfg(target_pointer_width = "64")]
++        __f_reserved: [u32; 6],
++    }
++
++    pub struct signalfd_siginfo {
++        pub ssi_signo: ::uint32_t,
++        pub ssi_errno: ::int32_t,
++        pub ssi_code: ::int32_t,
++        pub ssi_pid: ::uint32_t,
++        pub ssi_uid: ::uint32_t,
++        pub ssi_fd: ::int32_t,
++        pub ssi_tid: ::uint32_t,
++        pub ssi_band: ::uint32_t,
++        pub ssi_overrun: ::uint32_t,
++        pub ssi_trapno: ::uint32_t,
++        pub ssi_status: ::int32_t,
++        pub ssi_int: ::int32_t,
++        pub ssi_ptr: ::c_ulonglong,
++        pub ssi_utime: ::c_ulonglong,
++        pub ssi_stime: ::c_ulonglong,
++        pub ssi_addr: ::c_ulonglong,
++        pub ssi_addr_lsb: ::uint16_t,
++        _pad: [::uint8_t; 46],
++    }
++}
++
++pub const O_TRUNC: ::c_int = 512;
++pub const O_CLOEXEC: ::c_int = 0x80000;
++
++pub const EBFONT: ::c_int = 59;
++pub const ENOSTR: ::c_int = 60;
++pub const ENODATA: ::c_int = 61;
++pub const ETIME: ::c_int = 62;
++pub const ENOSR: ::c_int = 63;
++pub const ENONET: ::c_int = 64;
++pub const ENOPKG: ::c_int = 65;
++pub const EREMOTE: ::c_int = 66;
++pub const ENOLINK: ::c_int = 67;
++pub const EADV: ::c_int = 68;
++pub const ESRMNT: ::c_int = 69;
++pub const ECOMM: ::c_int = 70;
++pub const EPROTO: ::c_int = 71;
++pub const EDOTDOT: ::c_int = 73;
++
++pub const SA_NODEFER: ::c_int = 0x40000000;
++pub const SA_RESETHAND: ::c_int = 0x80000000;
++pub const SA_RESTART: ::c_int = 0x10000000;
++pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
++
++pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
++pub const EPOLLONESHOT: ::c_int = 0x40000000;
++pub const EPOLLRDHUP: ::c_int = 0x00002000;
++pub const EPOLLWAKEUP: ::c_int = 0x20000000;
++
++pub const EFD_CLOEXEC: ::c_int = 0x80000;
++
++pub const USER_PROCESS: ::c_short = 7;
++
++pub const BUFSIZ: ::c_uint = 1024;
++pub const FILENAME_MAX: ::c_uint = 1024;
++pub const FOPEN_MAX: ::c_uint = 20;
++pub const POSIX_FADV_DONTNEED: ::c_int = 4;
++pub const POSIX_FADV_NOREUSE: ::c_int = 5;
++pub const L_tmpnam: ::c_uint = 1024;
++pub const TMP_MAX: ::c_uint = 308915776;
++pub const _PC_LINK_MAX: ::c_int = 1;
++pub const _PC_MAX_CANON: ::c_int = 2;
++pub const _PC_MAX_INPUT: ::c_int = 3;
++pub const _PC_NAME_MAX: ::c_int = 4;
++pub const _PC_PATH_MAX: ::c_int = 5;
++pub const _PC_PIPE_BUF: ::c_int = 6;
++pub const _PC_2_SYMLINKS: ::c_int = 7;
++pub const _PC_ALLOC_SIZE_MIN: ::c_int = 8;
++pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 9;
++pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 10;
++pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 11;
++pub const _PC_REC_XFER_ALIGN: ::c_int = 12;
++pub const _PC_SYMLINK_MAX: ::c_int = 13;
++pub const _PC_CHOWN_RESTRICTED: ::c_int = 14;
++pub const _PC_NO_TRUNC: ::c_int = 15;
++pub const _PC_VDISABLE: ::c_int = 16;
++pub const _PC_ASYNC_IO: ::c_int = 17;
++pub const _PC_PRIO_IO: ::c_int = 18;
++pub const _PC_SYNC_IO: ::c_int = 19;
++
++pub const FIONBIO: ::c_int = 0x5421;
++
++pub const _SC_ARG_MAX: ::c_int = 0;
++pub const _SC_BC_BASE_MAX: ::c_int = 1;
++pub const _SC_BC_DIM_MAX: ::c_int = 2;
++pub const _SC_BC_SCALE_MAX: ::c_int = 3;
++pub const _SC_BC_STRING_MAX: ::c_int = 4;
++pub const _SC_CHILD_MAX: ::c_int = 5;
++pub const _SC_CLK_TCK: ::c_int = 6;
++pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 7;
++pub const _SC_EXPR_NEST_MAX: ::c_int = 8;
++pub const _SC_LINE_MAX: ::c_int = 9;
++pub const _SC_NGROUPS_MAX: ::c_int = 10;
++pub const _SC_OPEN_MAX: ::c_int = 11;
++pub const _SC_PASS_MAX: ::c_int = 12;
++pub const _SC_2_C_BIND: ::c_int = 13;
++pub const _SC_2_C_DEV: ::c_int = 14;
++pub const _SC_2_C_VERSION: ::c_int = 15;
++pub const _SC_2_CHAR_TERM: ::c_int = 16;
++pub const _SC_2_FORT_DEV: ::c_int = 17;
++pub const _SC_2_FORT_RUN: ::c_int = 18;
++pub const _SC_2_LOCALEDEF: ::c_int = 19;
++pub const _SC_2_SW_DEV: ::c_int = 20;
++pub const _SC_2_UPE: ::c_int = 21;
++pub const _SC_2_VERSION: ::c_int = 22;
++pub const _SC_JOB_CONTROL: ::c_int = 23;
++pub const _SC_SAVED_IDS: ::c_int = 24;
++pub const _SC_VERSION: ::c_int = 25;
++pub const _SC_RE_DUP_MAX: ::c_int = 26;
++pub const _SC_STREAM_MAX: ::c_int = 27;
++pub const _SC_TZNAME_MAX: ::c_int = 28;
++pub const _SC_XOPEN_CRYPT: ::c_int = 29;
++pub const _SC_XOPEN_ENH_I18N: ::c_int = 30;
++pub const _SC_XOPEN_SHM: ::c_int = 31;
++pub const _SC_XOPEN_VERSION: ::c_int = 32;
++pub const _SC_XOPEN_XCU_VERSION: ::c_int = 33;
++pub const _SC_XOPEN_REALTIME: ::c_int = 34;
++pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 35;
++pub const _SC_XOPEN_LEGACY: ::c_int = 36;
++pub const _SC_ATEXIT_MAX: ::c_int = 37;
++pub const _SC_IOV_MAX: ::c_int = 38;
++pub const _SC_PAGESIZE: ::c_int = 39;
++pub const _SC_PAGE_SIZE: ::c_int = 40;
++pub const _SC_XOPEN_UNIX: ::c_int = 41;
++pub const _SC_XBS5_ILP32_OFF32: ::c_int = 42;
++pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 43;
++pub const _SC_XBS5_LP64_OFF64: ::c_int = 44;
++pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 45;
++pub const _SC_AIO_LISTIO_MAX: ::c_int = 46;
++pub const _SC_AIO_MAX: ::c_int = 47;
++pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 48;
++pub const _SC_DELAYTIMER_MAX: ::c_int = 49;
++pub const _SC_MQ_OPEN_MAX: ::c_int = 50;
++pub const _SC_MQ_PRIO_MAX: ::c_int = 51;
++pub const _SC_RTSIG_MAX: ::c_int = 52;
++pub const _SC_SEM_NSEMS_MAX: ::c_int = 53;
++pub const _SC_SEM_VALUE_MAX: ::c_int = 54;
++pub const _SC_SIGQUEUE_MAX: ::c_int = 55;
++pub const _SC_TIMER_MAX: ::c_int = 56;
++pub const _SC_ASYNCHRONOUS_IO: ::c_int = 57;
++pub const _SC_FSYNC: ::c_int = 58;
++pub const _SC_MAPPED_FILES: ::c_int = 59;
++pub const _SC_MEMLOCK: ::c_int = 60;
++pub const _SC_MEMLOCK_RANGE: ::c_int = 61;
++pub const _SC_MEMORY_PROTECTION: ::c_int = 62;
++pub const _SC_MESSAGE_PASSING: ::c_int = 63;
++pub const _SC_PRIORITIZED_IO: ::c_int = 64;
++pub const _SC_PRIORITY_SCHEDULING: ::c_int = 65;
++pub const _SC_REALTIME_SIGNALS: ::c_int = 66;
++pub const _SC_SEMAPHORES: ::c_int = 67;
++pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 68;
++pub const _SC_SYNCHRONIZED_IO: ::c_int = 69;
++pub const _SC_TIMERS: ::c_int = 70;
++pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 71;
++pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 72;
++pub const _SC_LOGIN_NAME_MAX: ::c_int = 73;
++pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 74;
++pub const _SC_THREAD_KEYS_MAX: ::c_int = 75;
++pub const _SC_THREAD_STACK_MIN: ::c_int = 76;
++pub const _SC_THREAD_THREADS_MAX: ::c_int = 77;
++pub const _SC_TTY_NAME_MAX: ::c_int = 78;
++pub const _SC_THREADS: ::c_int = 79;
++pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 80;
++pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 81;
++pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 82;
++pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 83;
++pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 84;
++pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 85;
++pub const _SC_NPROCESSORS_CONF: ::c_int = 96;
++pub const _SC_NPROCESSORS_ONLN: ::c_int = 97;
++pub const _SC_PHYS_PAGES: ::c_int = 98;
++pub const _SC_AVPHYS_PAGES: ::c_int = 99;
++pub const _SC_MONOTONIC_CLOCK: ::c_int = 100;
++
++pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
++pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
++pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
++pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
++
++pub const FIOCLEX: ::c_int = 0x5451;
++
++pub const SA_ONSTACK: ::c_ulong = 0x08000000;
++pub const SA_SIGINFO: ::c_ulong = 0x00000004;
++pub const SA_NOCLDWAIT: ::c_ulong = 0x00000002;
++pub const SIGCHLD: ::c_int = 17;
++pub const SIGBUS: ::c_int = 7;
++pub const SIGUSR1: ::c_int = 10;
++pub const SIGUSR2: ::c_int = 12;
++pub const SIGCONT: ::c_int = 18;
++pub const SIGSTOP: ::c_int = 19;
++pub const SIGTSTP: ::c_int = 20;
++pub const SIGURG: ::c_int = 23;
++pub const SIGIO: ::c_int = 29;
++pub const SIGSYS: ::c_int = 31;
++pub const SIGSTKFLT: ::c_int = 16;
++pub const SIGUNUSED: ::c_int = 31;
++pub const SIGTTIN: ::c_int = 21;
++pub const SIGTTOU: ::c_int = 22;
++pub const SIGXCPU: ::c_int = 24;
++pub const SIGXFSZ: ::c_int = 25;
++pub const SIGVTALRM: ::c_int = 26;
++pub const SIGPROF: ::c_int = 27;
++pub const SIGWINCH: ::c_int = 28;
++pub const SIGPOLL: ::c_int = 29;
++pub const SIGPWR: ::c_int = 30;
++pub const SIG_SETMASK: ::c_int = 2;
++pub const SIG_BLOCK: ::c_int = 0x000000;
++pub const SIG_UNBLOCK: ::c_int = 0x01;
++
++pub const RUSAGE_CHILDREN: ::c_int = -1;
++
++pub const LC_PAPER: ::c_int = 7;
++pub const LC_NAME: ::c_int = 8;
++pub const LC_ADDRESS: ::c_int = 9;
++pub const LC_TELEPHONE: ::c_int = 10;
++pub const LC_MEASUREMENT: ::c_int = 11;
++pub const LC_IDENTIFICATION: ::c_int = 12;
++pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
++pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
++pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
++pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
++pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
++pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
++pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
++                               | ::LC_NUMERIC_MASK
++                               | ::LC_TIME_MASK
++                               | ::LC_COLLATE_MASK
++                               | ::LC_MONETARY_MASK
++                               | ::LC_MESSAGES_MASK
++                               | LC_PAPER_MASK
++                               | LC_NAME_MASK
++                               | LC_ADDRESS_MASK
++                               | LC_TELEPHONE_MASK
++                               | LC_MEASUREMENT_MASK
++                               | LC_IDENTIFICATION_MASK;
++
++pub const MAP_ANON: ::c_int = 0x0020;
++pub const MAP_ANONYMOUS: ::c_int = 0x0020;
++pub const MAP_GROWSDOWN: ::c_int = 0x0100;
++pub const MAP_DENYWRITE: ::c_int = 0x0800;
++pub const MAP_EXECUTABLE: ::c_int = 0x01000;
++pub const MAP_LOCKED: ::c_int = 0x02000;
++pub const MAP_NORESERVE: ::c_int = 0x04000;
++pub const MAP_POPULATE: ::c_int = 0x08000;
++pub const MAP_NONBLOCK: ::c_int = 0x010000;
++pub const MAP_STACK: ::c_int = 0x020000;
++
++pub const EDEADLK: ::c_int = 35;
++pub const ENAMETOOLONG: ::c_int = 36;
++pub const ENOLCK: ::c_int = 37;
++pub const ENOSYS: ::c_int = 38;
++pub const ENOTEMPTY: ::c_int = 39;
++pub const ELOOP: ::c_int = 40;
++pub const ENOMSG: ::c_int = 42;
++pub const EIDRM: ::c_int = 43;
++pub const ECHRNG: ::c_int = 44;
++pub const EL2NSYNC: ::c_int = 45;
++pub const EL3HLT: ::c_int = 46;
++pub const EL3RST: ::c_int = 47;
++pub const ELNRNG: ::c_int = 48;
++pub const EUNATCH: ::c_int = 49;
++pub const ENOCSI: ::c_int = 50;
++pub const EL2HLT: ::c_int = 51;
++pub const EBADE: ::c_int = 52;
++pub const EBADR: ::c_int = 53;
++pub const EXFULL: ::c_int = 54;
++pub const ENOANO: ::c_int = 55;
++pub const EBADRQC: ::c_int = 56;
++pub const EBADSLT: ::c_int = 57;
++
++pub const EMULTIHOP: ::c_int = 72;
++pub const EBADMSG: ::c_int = 74;
++pub const EOVERFLOW: ::c_int = 75;
++pub const ENOTUNIQ: ::c_int = 76;
++pub const EBADFD: ::c_int = 77;
++pub const EREMCHG: ::c_int = 78;
++pub const ELIBACC: ::c_int = 79;
++pub const ELIBBAD: ::c_int = 80;
++pub const ELIBSCN: ::c_int = 81;
++pub const ELIBMAX: ::c_int = 82;
++pub const ELIBEXEC: ::c_int = 83;
++pub const EILSEQ: ::c_int = 84;
++pub const ERESTART: ::c_int = 85;
++pub const ESTRPIPE: ::c_int = 86;
++pub const EUSERS: ::c_int = 87;
++pub const ENOTSOCK: ::c_int = 88;
++pub const EDESTADDRREQ: ::c_int = 89;
++pub const EMSGSIZE: ::c_int = 90;
++pub const EPROTOTYPE: ::c_int = 91;
++pub const ENOPROTOOPT: ::c_int = 92;
++pub const EPROTONOSUPPORT: ::c_int = 93;
++pub const ESOCKTNOSUPPORT: ::c_int = 94;
++pub const EOPNOTSUPP: ::c_int = 95;
++pub const ENOTSUP: ::c_int = EOPNOTSUPP;
++pub const EPFNOSUPPORT: ::c_int = 96;
++pub const EAFNOSUPPORT: ::c_int = 97;
++pub const EADDRINUSE: ::c_int = 98;
++pub const EADDRNOTAVAIL: ::c_int = 99;
++pub const ENETDOWN: ::c_int = 100;
++pub const ENETUNREACH: ::c_int = 101;
++pub const ENETRESET: ::c_int = 102;
++pub const ECONNABORTED: ::c_int = 103;
++pub const ECONNRESET: ::c_int = 104;
++pub const ENOBUFS: ::c_int = 105;
++pub const EISCONN: ::c_int = 106;
++pub const ENOTCONN: ::c_int = 107;
++pub const ESHUTDOWN: ::c_int = 108;
++pub const ETOOMANYREFS: ::c_int = 109;
++pub const ETIMEDOUT: ::c_int = 110;
++pub const ECONNREFUSED: ::c_int = 111;
++pub const EHOSTDOWN: ::c_int = 112;
++pub const EHOSTUNREACH: ::c_int = 113;
++pub const EALREADY: ::c_int = 114;
++pub const EINPROGRESS: ::c_int = 115;
++pub const ESTALE: ::c_int = 116;
++pub const EUCLEAN: ::c_int = 117;
++pub const ENOTNAM: ::c_int = 118;
++pub const ENAVAIL: ::c_int = 119;
++pub const EISNAM: ::c_int = 120;
++pub const EREMOTEIO: ::c_int = 121;
++pub const EDQUOT: ::c_int = 122;
++pub const ENOMEDIUM: ::c_int = 123;
++pub const EMEDIUMTYPE: ::c_int = 124;
++pub const ECANCELED: ::c_int = 125;
++pub const ENOKEY: ::c_int = 126;
++pub const EKEYEXPIRED: ::c_int = 127;
++pub const EKEYREVOKED: ::c_int = 128;
++pub const EKEYREJECTED: ::c_int = 129;
++pub const EOWNERDEAD: ::c_int = 130;
++pub const ENOTRECOVERABLE: ::c_int = 131;
++
++pub const SOCK_STREAM: ::c_int = 1;
++pub const SOCK_DGRAM: ::c_int = 2;
++pub const SOCK_SEQPACKET: ::c_int = 5;
++
++pub const SOL_SOCKET: ::c_int = 1;
++pub const SOL_SCTP: ::c_int = 132;
++pub const SOL_IPX: ::c_int = 256;
++pub const SOL_AX25: ::c_int = 257;
++pub const SOL_ATALK: ::c_int = 258;
++pub const SOL_NETROM: ::c_int = 259;
++pub const SOL_ROSE: ::c_int = 260;
++
++#[doc(hidden)]
++pub const AF_MAX: ::c_int = 43;
++#[doc(hidden)]
++pub const PF_MAX: ::c_int = AF_MAX;
++
++pub const SO_REUSEADDR: ::c_int = 2;
++pub const SO_TYPE: ::c_int = 3;
++pub const SO_ERROR: ::c_int = 4;
++pub const SO_DONTROUTE: ::c_int = 5;
++pub const SO_BROADCAST: ::c_int = 6;
++pub const SO_SNDBUF: ::c_int = 7;
++pub const SO_RCVBUF: ::c_int = 8;
++pub const SO_KEEPALIVE: ::c_int = 9;
++pub const SO_OOBINLINE: ::c_int = 10;
++pub const SO_PRIORITY: ::c_int = 12;
++pub const SO_LINGER: ::c_int = 13;
++pub const SO_BSDCOMPAT: ::c_int = 14;
++pub const SO_REUSEPORT: ::c_int = 15;
++pub const SO_PASSCRED: ::c_int = 16;
++pub const SO_PEERCRED: ::c_int = 17;
++pub const SO_RCVLOWAT: ::c_int = 18;
++pub const SO_SNDLOWAT: ::c_int = 19;
++pub const SO_RCVTIMEO: ::c_int = 20;
++pub const SO_SNDTIMEO: ::c_int = 21;
++pub const SO_BINDTODEVICE: ::c_int = 25;
++pub const SO_TIMESTAMP: ::c_int = 29;
++pub const SO_ACCEPTCONN: ::c_int = 30;
++pub const SO_SNDBUFFORCE: ::c_int = 32;
++pub const SO_RCVBUFFORCE: ::c_int = 33;
++pub const SO_MARK: ::c_int = 36;
++pub const SO_PROTOCOL: ::c_int = 38;
++pub const SO_DOMAIN: ::c_int = 39;
++pub const SO_RXQ_OVFL: ::c_int = 40;
++pub const SO_PEEK_OFF: ::c_int = 42;
++pub const SO_BUSY_POLL: ::c_int = 46;
++
++pub const O_ACCMODE: ::c_int = 3;
++pub const O_APPEND: ::c_int = 1024;
++pub const O_CREAT: ::c_int = 64;
++pub const O_EXCL: ::c_int = 128;
++pub const O_NOCTTY: ::c_int = 256;
++pub const O_NONBLOCK: ::c_int = 2048;
++pub const O_SYNC: ::c_int = 0x101000;
++pub const O_ASYNC: ::c_int = 0x2000;
++pub const O_NDELAY: ::c_int = 0x800;
++pub const O_DSYNC: ::c_int = 4096;
++
++pub const NI_MAXHOST: ::size_t = 1025;
++
++pub const NCCS: usize = 19;
++pub const TCSBRKP: ::c_int = 0x5425;
++pub const TCSANOW: ::c_int = 0;
++pub const TCSADRAIN: ::c_int = 0x1;
++pub const TCSAFLUSH: ::c_int = 0x2;
++pub const VEOF: usize = 4;
++pub const VEOL: usize = 11;
++pub const VEOL2: usize = 16;
++pub const VMIN: usize = 6;
++pub const IEXTEN: ::tcflag_t = 0x00008000;
++pub const TOSTOP: ::tcflag_t = 0x00000100;
++pub const FLUSHO: ::tcflag_t = 0x00001000;
++pub const EXTPROC: ::tcflag_t = 0o200000;
++
++pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
++pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
++pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
++pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
++pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
++pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
++pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
++pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
++pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
++pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
++pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
++pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
++pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
++pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
++pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
++pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
++pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
++pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
++pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
++pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
++pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
++pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
++pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
++pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
++pub const TMPFS_MAGIC: ::c_long = 0x01021994;
++pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
++
++pub const MADV_HUGEPAGE: ::c_int = 14;
++pub const MADV_NOHUGEPAGE: ::c_int = 15;
++pub const MAP_HUGETLB: ::c_int = 0x040000;
++
++pub const PTRACE_TRACEME: ::c_int = 0;
++pub const PTRACE_PEEKTEXT: ::c_int = 1;
++pub const PTRACE_PEEKDATA: ::c_int = 2;
++pub const PTRACE_PEEKUSER: ::c_int = 3;
++pub const PTRACE_POKETEXT: ::c_int = 4;
++pub const PTRACE_POKEDATA: ::c_int = 5;
++pub const PTRACE_POKEUSER: ::c_int = 6;
++pub const PTRACE_CONT: ::c_int = 7;
++pub const PTRACE_KILL: ::c_int = 8;
++pub const PTRACE_SINGLESTEP: ::c_int = 9;
++pub const PTRACE_ATTACH: ::c_int = 16;
++pub const PTRACE_DETACH: ::c_int = 17;
++pub const PTRACE_SYSCALL: ::c_int = 24;
++pub const PTRACE_SETOPTIONS: ::c_int = 0x4200;
++pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201;
++pub const PTRACE_GETSIGINFO: ::c_int = 0x4202;
++pub const PTRACE_SETSIGINFO: ::c_int = 0x4203;
++
++pub const EFD_NONBLOCK: ::c_int = 0x800;
++
++pub const F_GETLK: ::c_int = 5;
++pub const F_GETOWN: ::c_int = 9;
++pub const F_SETOWN: ::c_int = 8;
++pub const F_SETLK: ::c_int = 6;
++pub const F_SETLKW: ::c_int = 7;
++
++pub const TCGETS: ::c_int = 0x5401;
++pub const TCSETS: ::c_int = 0x5402;
++pub const TCSETSW: ::c_int = 0x5403;
++pub const TCSETSF: ::c_int = 0x5404;
++pub const TCGETA: ::c_int = 0x5405;
++pub const TCSETA: ::c_int = 0x5406;
++pub const TCSETAW: ::c_int = 0x5407;
++pub const TCSETAF: ::c_int = 0x5408;
++pub const TCSBRK: ::c_int = 0x5409;
++pub const TCXONC: ::c_int = 0x540A;
++pub const TCFLSH: ::c_int = 0x540B;
++pub const TIOCGSOFTCAR: ::c_int = 0x5419;
++pub const TIOCSSOFTCAR: ::c_int = 0x541A;
++pub const TIOCINQ: ::c_int = 0x541B;
++pub const TIOCLINUX: ::c_int = 0x541C;
++pub const TIOCGSERIAL: ::c_int = 0x541E;
++pub const TIOCEXCL: ::c_int = 0x540C;
++pub const TIOCNXCL: ::c_int = 0x540D;
++pub const TIOCSCTTY: ::c_int = 0x540E;
++pub const TIOCGPGRP: ::c_int = 0x540F;
++pub const TIOCSPGRP: ::c_int = 0x5410;
++pub const TIOCOUTQ: ::c_int = 0x5411;
++pub const TIOCSTI: ::c_int = 0x5412;
++pub const TIOCGWINSZ: ::c_int = 0x5413;
++pub const TIOCSWINSZ: ::c_int = 0x5414;
++pub const TIOCMGET: ::c_int = 0x5415;
++pub const TIOCMBIS: ::c_int = 0x5416;
++pub const TIOCMBIC: ::c_int = 0x5417;
++pub const TIOCMSET: ::c_int = 0x5418;
++pub const FIONREAD: ::c_int = 0x541B;
++pub const TIOCCONS: ::c_int = 0x541D;
++
++pub const RTLD_NOLOAD: ::c_int = 0x4;
++
++pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
++
++pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
++pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
++pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
++pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
++pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
++
++pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
++pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
++pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
++pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
++pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
++pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
++pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
++pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
++
++pub const MCL_CURRENT: ::c_int = 0x0001;
++pub const MCL_FUTURE: ::c_int = 0x0002;
++
++pub const CBAUD: ::tcflag_t = 0o0010017;
++pub const TAB1: ::c_int = 0x00000800;
++pub const TAB2: ::c_int = 0x00001000;
++pub const TAB3: ::c_int = 0x00001800;
++pub const CR1: ::c_int  = 0x00000200;
++pub const CR2: ::c_int  = 0x00000400;
++pub const CR3: ::c_int  = 0x00000600;
++pub const FF1: ::c_int  = 0x00008000;
++pub const BS1: ::c_int  = 0x00002000;
++pub const VT1: ::c_int  = 0x00004000;
++pub const VWERASE: usize = 14;
++pub const VREPRINT: usize = 12;
++pub const VSUSP: usize = 10;
++pub const VSTART: usize = 8;
++pub const VSTOP: usize = 9;
++pub const VDISCARD: usize = 13;
++pub const VTIME: usize = 5;
++pub const IXON: ::tcflag_t = 0x00000400;
++pub const IXOFF: ::tcflag_t = 0x00001000;
++pub const ONLCR: ::tcflag_t = 0x4;
++pub const CSIZE: ::tcflag_t = 0x00000030;
++pub const CS6: ::tcflag_t = 0x00000010;
++pub const CS7: ::tcflag_t = 0x00000020;
++pub const CS8: ::tcflag_t = 0x00000030;
++pub const CSTOPB: ::tcflag_t = 0x00000040;
++pub const CREAD: ::tcflag_t = 0x00000080;
++pub const PARENB: ::tcflag_t = 0x00000100;
++pub const PARODD: ::tcflag_t = 0x00000200;
++pub const HUPCL: ::tcflag_t = 0x00000400;
++pub const CLOCAL: ::tcflag_t = 0x00000800;
++pub const ECHOKE: ::tcflag_t = 0x00000800;
++pub const ECHOE: ::tcflag_t = 0x00000010;
++pub const ECHOK: ::tcflag_t = 0x00000020;
++pub const ECHONL: ::tcflag_t = 0x00000040;
++pub const ECHOPRT: ::tcflag_t = 0x00000400;
++pub const ECHOCTL: ::tcflag_t = 0x00000200;
++pub const ISIG: ::tcflag_t = 0x00000001;
++pub const ICANON: ::tcflag_t = 0x00000002;
++pub const PENDIN: ::tcflag_t = 0x00004000;
++pub const NOFLSH: ::tcflag_t = 0x00000080;
++pub const VSWTC: usize = 7;
++pub const OLCUC:  ::tcflag_t = 0o000002;
++pub const NLDLY:  ::tcflag_t = 0o000400;
++pub const CRDLY:  ::tcflag_t = 0o003000;
++pub const TABDLY: ::tcflag_t = 0o014000;
++pub const BSDLY:  ::tcflag_t = 0o020000;
++pub const FFDLY:  ::tcflag_t = 0o100000;
++pub const VTDLY:  ::tcflag_t = 0o040000;
++pub const XTABS:  ::tcflag_t = 0o014000;
++
++pub const B0: ::speed_t = 0o000000;
++pub const B50: ::speed_t = 0o000001;
++pub const B75: ::speed_t = 0o000002;
++pub const B110: ::speed_t = 0o000003;
++pub const B134: ::speed_t = 0o000004;
++pub const B150: ::speed_t = 0o000005;
++pub const B200: ::speed_t = 0o000006;
++pub const B300: ::speed_t = 0o000007;
++pub const B600: ::speed_t = 0o000010;
++pub const B1200: ::speed_t = 0o000011;
++pub const B1800: ::speed_t = 0o000012;
++pub const B2400: ::speed_t = 0o000013;
++pub const B4800: ::speed_t = 0o000014;
++pub const B9600: ::speed_t = 0o000015;
++pub const B19200: ::speed_t = 0o000016;
++pub const B38400: ::speed_t = 0o000017;
++pub const EXTA: ::speed_t = B19200;
++pub const EXTB: ::speed_t = B38400;
++pub const B57600: ::speed_t = 0o010001;
++pub const B115200: ::speed_t = 0o010002;
++pub const B230400: ::speed_t = 0o010003;
++pub const B460800: ::speed_t = 0o010004;
++pub const B500000: ::speed_t = 0o010005;
++pub const B576000: ::speed_t = 0o010006;
++pub const B921600: ::speed_t = 0o010007;
++pub const B1000000: ::speed_t = 0o010010;
++pub const B1152000: ::speed_t = 0o010011;
++pub const B1500000: ::speed_t = 0o010012;
++pub const B2000000: ::speed_t = 0o010013;
++pub const B2500000: ::speed_t = 0o010014;
++pub const B3000000: ::speed_t = 0o010015;
++pub const B3500000: ::speed_t = 0o010016;
++pub const B4000000: ::speed_t = 0o010017;
++
++pub const EAI_SYSTEM: ::c_int = 11;
++
++pub const NETLINK_ROUTE: ::c_int = 0;
++pub const NETLINK_UNUSED: ::c_int = 1;
++pub const NETLINK_USERSOCK: ::c_int = 2;
++pub const NETLINK_FIREWALL: ::c_int = 3;
++pub const NETLINK_SOCK_DIAG: ::c_int = 4;
++pub const NETLINK_NFLOG: ::c_int = 5;
++pub const NETLINK_XFRM: ::c_int = 6;
++pub const NETLINK_SELINUX: ::c_int = 7;
++pub const NETLINK_ISCSI: ::c_int = 8;
++pub const NETLINK_AUDIT: ::c_int = 9;
++pub const NETLINK_FIB_LOOKUP: ::c_int = 10;
++pub const NETLINK_CONNECTOR: ::c_int = 11;
++pub const NETLINK_NETFILTER: ::c_int = 12;
++pub const NETLINK_IP6_FW: ::c_int = 13;
++pub const NETLINK_DNRTMSG: ::c_int = 14;
++pub const NETLINK_KOBJECT_UEVENT: ::c_int = 15;
++pub const NETLINK_GENERIC: ::c_int = 16;
++pub const NETLINK_SCSITRANSPORT: ::c_int = 18;
++pub const NETLINK_ECRYPTFS: ::c_int = 19;
++pub const NETLINK_RDMA: ::c_int = 20;
++pub const NETLINK_CRYPTO: ::c_int = 21;
++pub const NETLINK_INET_DIAG: ::c_int = NETLINK_SOCK_DIAG;
++
++pub const MAX_LINKS: ::c_int = 32;
++
++pub const NLM_F_REQUEST: ::c_int = 1;
++pub const NLM_F_MULTI: ::c_int = 2;
++pub const NLM_F_ACK: ::c_int = 4;
++pub const NLM_F_ECHO: ::c_int = 8;
++pub const NLM_F_DUMP_INTR: ::c_int = 16;
++
++pub const NLM_F_ROOT: ::c_int = 0x100;
++pub const NLM_F_MATCH: ::c_int = 0x200;
++pub const NLM_F_ATOMIC: ::c_int = 0x400;
++pub const NLM_F_DUMP: ::c_int = NLM_F_ROOT | NLM_F_MATCH;
++
++pub const NLM_F_REPLACE: ::c_int = 0x100;
++pub const NLM_F_EXCL: ::c_int = 0x200;
++pub const NLM_F_CREATE: ::c_int = 0x400;
++pub const NLM_F_APPEND: ::c_int = 0x800;
++
++pub const NLMSG_NOOP: ::c_int = 0x1;
++pub const NLMSG_ERROR: ::c_int = 0x2;
++pub const NLMSG_DONE: ::c_int = 0x3;
++pub const NLMSG_OVERRUN: ::c_int = 0x4;
++pub const NLMSG_MIN_TYPE: ::c_int = 0x10;
++
++pub const NETLINK_ADD_MEMBERSHIP: ::c_int = 1;
++pub const NETLINK_DROP_MEMBERSHIP: ::c_int = 2;
++pub const NETLINK_PKTINFO: ::c_int = 3;
++pub const NETLINK_BROADCAST_ERROR: ::c_int = 4;
++pub const NETLINK_NO_ENOBUFS: ::c_int = 5;
++pub const NETLINK_RX_RING: ::c_int = 6;
++pub const NETLINK_TX_RING: ::c_int = 7;
++
++pub const NLA_F_NESTED: ::c_int = 1 << 15;
++pub const NLA_F_NET_BYTEORDER: ::c_int = 1 << 14;
++pub const NLA_TYPE_MASK: ::c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER);
++
++pub const SIGEV_THREAD_ID: ::c_int = 4;
++
++pub const CIBAUD: ::tcflag_t = 0o02003600000;
++pub const CBAUDEX: ::tcflag_t = 0o010000;
++
++pub const TIOCM_LE: ::c_int = 0x001;
++pub const TIOCM_DTR: ::c_int = 0x002;
++pub const TIOCM_RTS: ::c_int = 0x004;
++pub const TIOCM_ST: ::c_int = 0x008;
++pub const TIOCM_SR: ::c_int = 0x010;
++pub const TIOCM_CTS: ::c_int = 0x020;
++pub const TIOCM_CAR: ::c_int = 0x040;
++pub const TIOCM_RNG: ::c_int = 0x080;
++pub const TIOCM_DSR: ::c_int = 0x100;
++pub const TIOCM_CD: ::c_int = TIOCM_CAR;
++pub const TIOCM_RI: ::c_int = TIOCM_RNG;
++
++pub const POLLWRNORM: ::c_short = 0x100;
++pub const POLLWRBAND: ::c_short = 0x200;
++
++pub const SFD_CLOEXEC: ::c_int = O_CLOEXEC;
++pub const SFD_NONBLOCK: ::c_int = O_NONBLOCK;
++
++f! {
++    pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
++        for slot in cpuset.__bits.iter_mut() {
++            *slot = 0;
++        }
++    }
++
++    pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () {
++        let size_in___bits = 8 * mem::size_of_val(&cpuset.__bits[0]);
++        let (idx, offset) = (cpu / size_in___bits, cpu % size_in___bits);
++        cpuset.__bits[idx] |= 1 << offset;
++        ()
++    }
++
++    pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () {
++        let size_in___bits = 8 * mem::size_of_val(&cpuset.__bits[0]);
++        let (idx, offset) = (cpu / size_in___bits, cpu % size_in___bits);
++        cpuset.__bits[idx] &= !(1 << offset);
++        ()
++    }
++
++    pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool {
++        let size_in___bits = 8 * mem::size_of_val(&cpuset.__bits[0]);
++        let (idx, offset) = (cpu / size_in___bits, cpu % size_in___bits);
++        0 != (cpuset.__bits[idx] & (1 << offset))
++    }
++
++    pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
++        set1.__bits == set2.__bits
++    }
++    pub fn major(dev: ::dev_t) -> ::c_int {
++        ((dev >> 8) & 0xfff) as ::c_int
++    }
++    pub fn minor(dev: ::dev_t) -> ::c_int {
++        ((dev & 0xff) | ((dev >> 12) & 0xfff00)) as ::c_int
++    }
++    pub fn makedev(ma: ::c_int, mi: ::c_int) -> ::dev_t {
++        let ma = ma as ::dev_t;
++        let mi = mi as ::dev_t;
++        ((ma & 0xfff) << 8) | (mi & 0xff) | ((mi & 0xfff00) << 12)
++    }
++}
++
++extern {
++    static mut __progname: *mut ::c_char;
++}
++
++extern {
++    pub fn madvise(addr: *const ::c_void, len: ::size_t, advice: ::c_int)
++                   -> ::c_int;
++    pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
++    pub fn msync(addr: *const ::c_void, len: ::size_t,
++                 flags: ::c_int) -> ::c_int;
++    pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
++                    -> ::c_int;
++    pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
++                    flags: ::c_int, addr: *const ::sockaddr,
++                    addrlen: *mut ::socklen_t) -> ::ssize_t;
++    pub fn getnameinfo(sa: *const ::sockaddr,
++                       salen: ::socklen_t,
++                       host: *mut ::c_char,
++                       hostlen: ::size_t,
++                       serv: *mut ::c_char,
++                       sevlen: ::size_t,
++                       flags: ::c_int) -> ::c_int;
++    pub fn ptrace(request: ::c_int, ...) -> ::c_long;
++    pub fn getpriority(which: ::c_int, who: ::c_int) -> ::c_int;
++    pub fn setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) -> ::c_int;
++    pub fn __sched_cpualloc(count: ::size_t) -> *mut ::cpu_set_t;
++    pub fn __sched_cpufree(set: *mut ::cpu_set_t);
++    pub fn __sched_cpucount(setsize: ::size_t, set: *mut cpu_set_t) -> ::c_int;
++    pub fn sched_getcpu() -> ::c_int;
++
++    pub fn utmpname(name: *const ::c_char) -> ::c_int;
++    pub fn setutent();
++    pub fn getutent() -> *mut utmp;
++
++    pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
++                           len: ::off_t) -> ::c_int;
++    pub fn signalfd(fd: ::c_int, mask: *const ::sigset_t, flags: ::c_int)
++                    -> ::c_int;
++}
++
++cfg_if! {
++    if #[cfg(target_pointer_width = "32")] {
++        mod b32;
++        pub use self::b32::*;
++    } else if #[cfg(target_pointer_width = "64")] {
++        mod b64;
++        pub use self::b64::*;
++    } else {
++        // Unknown target_pointer_width
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f94c7367129221645e76d94f7c7c2fc174275877
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,238 @@@
++pub type c_char = i8;
++pub type c_long = i32;
++pub type c_ulong = u32;
++pub type clock_t = i32;
++pub type time_t = i32;
++pub type suseconds_t = i32;
++pub type wchar_t = i32;
++pub type off_t = i32;
++pub type ino_t = u32;
++pub type blkcnt_t = i32;
++pub type blksize_t = i32;
++pub type nlink_t = u32;
++pub type __u64 = ::c_ulonglong;
++
++s! {
++    pub struct aiocb {
++        pub aio_fildes: ::c_int,
++        pub aio_lio_opcode: ::c_int,
++        pub aio_reqprio: ::c_int,
++        pub aio_buf: *mut ::c_void,
++        pub aio_nbytes: ::size_t,
++        pub aio_sigevent: ::sigevent,
++        __next_prio: *mut aiocb,
++        __abs_prio: ::c_int,
++        __policy: ::c_int,
++        __error_code: ::c_int,
++        __return_value: ::ssize_t,
++        pub aio_offset: off_t,
++        __unused1: [::c_char; 4],
++        __glibc_reserved: [::c_char; 32]
++    }
++
++    pub struct stat {
++        pub st_dev: ::c_ulong,
++        st_pad1: [::c_long; 3],
++        pub st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::c_ulong,
++        pub st_pad2: [::c_long; 2],
++        pub st_size: ::off_t,
++        st_pad3: ::c_long,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt_t,
++        st_pad5: [::c_long; 14],
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::c_ulong,
++        st_pad1: [::c_long; 3],
++        pub st_ino: ::ino64_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::c_ulong,
++        st_pad2: [::c_long; 2],
++        pub st_size: ::off64_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_blksize: ::blksize_t,
++        st_pad3: ::c_long,
++        pub st_blocks: ::blkcnt64_t,
++        st_pad5: [::c_long; 14],
++    }
++
++    pub struct pthread_attr_t {
++        __size: [u32; 9]
++    }
++
++    pub struct sigaction {
++        pub sa_flags: ::c_int,
++        pub sa_sigaction: ::sighandler_t,
++        pub sa_mask: sigset_t,
++        pub sa_restorer: ::dox::Option<extern fn()>,
++        _resv: [::c_int; 1],
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_size: ::size_t,
++        pub ss_flags: ::c_int,
++    }
++
++    pub struct sigset_t {
++        __val: [::c_ulong; 32],
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_code: ::c_int,
++        pub si_errno: ::c_int,
++        pub _pad: [::c_int; 29],
++    }
++
++    pub struct ipc_perm {
++        pub __key: ::key_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++        pub cuid: ::uid_t,
++        pub cgid: ::gid_t,
++        pub mode: ::c_uint,
++        pub __seq: ::c_ushort,
++        __pad1: ::c_ushort,
++        __unused1: ::c_ulong,
++        __unused2: ::c_ulong
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_segsz: ::size_t,
++        pub shm_atime: ::time_t,
++        pub shm_dtime: ::time_t,
++        pub shm_ctime: ::time_t,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::shmatt_t,
++        __unused4: ::c_ulong,
++        __unused5: ::c_ulong
++    }
++
++    pub struct msqid_ds {
++        pub msg_perm: ::ipc_perm,
++        #[cfg(target_endian = "big")]
++        __glibc_reserved1: ::c_ulong,
++        pub msg_stime: ::time_t,
++        #[cfg(target_endian = "little")]
++        __glibc_reserved1: ::c_ulong,
++        #[cfg(target_endian = "big")]
++        __glibc_reserved2: ::c_ulong,
++        pub msg_rtime: ::time_t,
++        #[cfg(target_endian = "little")]
++        __glibc_reserved2: ::c_ulong,
++        #[cfg(target_endian = "big")]
++        __glibc_reserved3: ::c_ulong,
++        pub msg_ctime: ::time_t,
++        #[cfg(target_endian = "little")]
++        __glibc_reserved3: ::c_ulong,
++        __msg_cbytes: ::c_ulong,
++        pub msg_qnum: ::msgqnum_t,
++        pub msg_qbytes: ::msglen_t,
++        pub msg_lspid: ::pid_t,
++        pub msg_lrpid: ::pid_t,
++        __glibc_reserved4: ::c_ulong,
++        __glibc_reserved5: ::c_ulong,
++    }
++
++    pub struct statfs {
++        pub f_type: ::c_long,
++        pub f_bsize: ::c_long,
++        pub f_frsize: ::c_long,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_files: ::fsblkcnt_t,
++        pub f_ffree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_fsid: ::fsid_t,
++
++        pub f_namelen: ::c_long,
++        f_spare: [::c_long; 6],
++    }
++
++    pub struct msghdr {
++        pub msg_name: *mut ::c_void,
++        pub msg_namelen: ::socklen_t,
++        pub msg_iov: *mut ::iovec,
++        pub msg_iovlen: ::size_t,
++        pub msg_control: *mut ::c_void,
++        pub msg_controllen: ::size_t,
++        pub msg_flags: ::c_int,
++    }
++
++    pub struct cmsghdr {
++        pub cmsg_len: ::size_t,
++        pub cmsg_level: ::c_int,
++        pub cmsg_type: ::c_int,
++    }
++
++    pub struct termios {
++        pub c_iflag: ::tcflag_t,
++        pub c_oflag: ::tcflag_t,
++        pub c_cflag: ::tcflag_t,
++        pub c_lflag: ::tcflag_t,
++        pub c_line: ::cc_t,
++        pub c_cc: [::cc_t; ::NCCS],
++    }
++
++    pub struct flock {
++        pub l_type: ::c_short,
++        pub l_whence: ::c_short,
++        pub l_start: ::off_t,
++        pub l_len: ::off_t,
++        pub l_sysid: ::c_long,
++        pub l_pid: ::pid_t,
++        pad: [::c_long; 4],
++    }
++
++    pub struct sysinfo {
++        pub uptime: ::c_long,
++        pub loads: [::c_ulong; 3],
++        pub totalram: ::c_ulong,
++        pub freeram: ::c_ulong,
++        pub sharedram: ::c_ulong,
++        pub bufferram: ::c_ulong,
++        pub totalswap: ::c_ulong,
++        pub freeswap: ::c_ulong,
++        pub procs: ::c_ushort,
++        pub pad: ::c_ushort,
++        pub totalhigh: ::c_ulong,
++        pub freehigh: ::c_ulong,
++        pub mem_unit: ::c_uint,
++        pub _f: [::c_char; 8],
++    }
++}
++
++pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
++pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
++pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
++
++pub const O_LARGEFILE: ::c_int = 0x2000;
++
++pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff;
++
++pub const SYS_gettid: ::c_long = 4222;   // Valid for O32
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e121e8a2e4b13a72199e83018aae70f0dd772e6d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,224 @@@
++pub type blkcnt_t = i64;
++pub type blksize_t = i64;
++pub type c_char = i8;
++pub type c_long = i64;
++pub type c_ulong = u64;
++pub type ino_t = u64;
++pub type nlink_t = u64;
++pub type off_t = i64;
++pub type suseconds_t = i64;
++pub type time_t = i64;
++pub type wchar_t = i32;
++pub type clock_t = i64;
++pub type __u64 = ::c_ulong;
++
++s! {
++    pub struct aiocb {
++        pub aio_fildes: ::c_int,
++        pub aio_lio_opcode: ::c_int,
++        pub aio_reqprio: ::c_int,
++        pub aio_buf: *mut ::c_void,
++        pub aio_nbytes: ::size_t,
++        pub aio_sigevent: ::sigevent,
++        __next_prio: *mut aiocb,
++        __abs_prio: ::c_int,
++        __policy: ::c_int,
++        __error_code: ::c_int,
++        __return_value: ::ssize_t,
++        pub aio_offset: off_t,
++        __glibc_reserved: [::c_char; 32]
++    }
++
++    pub struct stat {
++        pub st_dev: ::c_ulong,
++        st_pad1: [::c_long; 2],
++        pub st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::c_ulong,
++        st_pad2: [::c_ulong; 1],
++        pub st_size: ::off_t,
++        st_pad3: ::c_long,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_blksize: ::blksize_t,
++        st_pad4: ::c_long,
++        pub st_blocks: ::blkcnt_t,
++        st_pad5: [::c_long; 7],
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::c_ulong,
++        st_pad1: [::c_long; 2],
++        pub st_ino: ::ino64_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::c_ulong,
++        st_pad2: [::c_long; 2],
++        pub st_size: ::off64_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_blksize: ::blksize_t,
++        st_pad3: ::c_long,
++        pub st_blocks: ::blkcnt64_t,
++        st_pad5: [::c_long; 7],
++    }
++
++    pub struct pthread_attr_t {
++        __size: [::c_ulong; 7]
++    }
++
++    pub struct sigaction {
++        pub sa_flags: ::c_int,
++        pub sa_sigaction: ::sighandler_t,
++        pub sa_mask: sigset_t,
++        pub sa_restorer: ::dox::Option<extern fn()>,
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_size: ::size_t,
++        pub ss_flags: ::c_int,
++    }
++
++    pub struct sigset_t {
++        __size: [::c_ulong; 16],
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_code: ::c_int,
++        pub si_errno: ::c_int,
++        _pad: ::c_int,
++        _pad2: [::c_long; 14],
++    }
++
++    pub struct ipc_perm {
++        pub __key: ::key_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++        pub cuid: ::uid_t,
++        pub cgid: ::gid_t,
++        pub mode: ::c_uint,
++        pub __seq: ::c_ushort,
++        __pad1: ::c_ushort,
++        __unused1: ::c_ulong,
++        __unused2: ::c_ulong
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_segsz: ::size_t,
++        pub shm_atime: ::time_t,
++        pub shm_dtime: ::time_t,
++        pub shm_ctime: ::time_t,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::shmatt_t,
++        __unused4: ::c_ulong,
++        __unused5: ::c_ulong
++    }
++
++    pub struct msqid_ds {
++        pub msg_perm: ::ipc_perm,
++        pub msg_stime: ::time_t,
++        pub msg_rtime: ::time_t,
++        pub msg_ctime: ::time_t,
++        __msg_cbytes: ::c_ulong,
++        pub msg_qnum: ::msgqnum_t,
++        pub msg_qbytes: ::msglen_t,
++        pub msg_lspid: ::pid_t,
++        pub msg_lrpid: ::pid_t,
++        __glibc_reserved4: ::c_ulong,
++        __glibc_reserved5: ::c_ulong,
++    }
++
++    pub struct statfs {
++        pub f_type: ::c_long,
++        pub f_bsize: ::c_long,
++        pub f_frsize: ::c_long,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_files: ::fsblkcnt_t,
++        pub f_ffree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_fsid: ::fsid_t,
++
++        pub f_namelen: ::c_long,
++        f_spare: [::c_long; 6],
++    }
++
++    pub struct msghdr {
++        pub msg_name: *mut ::c_void,
++        pub msg_namelen: ::socklen_t,
++        pub msg_iov: *mut ::iovec,
++        pub msg_iovlen: ::size_t,
++        pub msg_control: *mut ::c_void,
++        pub msg_controllen: ::size_t,
++        pub msg_flags: ::c_int,
++    }
++
++    pub struct cmsghdr {
++        pub cmsg_len: ::size_t,
++        pub cmsg_level: ::c_int,
++        pub cmsg_type: ::c_int,
++    }
++
++    pub struct termios {
++        pub c_iflag: ::tcflag_t,
++        pub c_oflag: ::tcflag_t,
++        pub c_cflag: ::tcflag_t,
++        pub c_lflag: ::tcflag_t,
++        pub c_line: ::cc_t,
++        pub c_cc: [::cc_t; ::NCCS],
++    }
++
++    pub struct flock {
++        pub l_type: ::c_short,
++        pub l_whence: ::c_short,
++        pub l_start: ::off_t,
++        pub l_len: ::off_t,
++        pub l_pid: ::pid_t,
++    }
++
++    pub struct sysinfo {
++        pub uptime: ::c_long,
++        pub loads: [::c_ulong; 3],
++        pub totalram: ::c_ulong,
++        pub freeram: ::c_ulong,
++        pub sharedram: ::c_ulong,
++        pub bufferram: ::c_ulong,
++        pub totalswap: ::c_ulong,
++        pub freeswap: ::c_ulong,
++        pub procs: ::c_ushort,
++        pub pad: ::c_ushort,
++        pub totalhigh: ::c_ulong,
++        pub freehigh: ::c_ulong,
++        pub mem_unit: ::c_uint,
++        pub _f: [::c_char; 0],
++    }
++}
++
++pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
++pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
++pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
++
++pub const O_LARGEFILE: ::c_int = 0;
++
++pub const RLIM_INFINITY: ::rlim_t = 0xffff_ffff_ffff_ffff;
++
++pub const SYS_gettid: ::c_long = 5178;   // Valid for n64
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..150b6078698077fa7ea62e20bf0fda1adfc1b243
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,674 @@@
++pub type fsblkcnt_t = ::c_ulong;
++pub type fsfilcnt_t = ::c_ulong;
++pub type rlim_t = c_ulong;
++pub type __priority_which_t = ::c_uint;
++
++s! {
++    pub struct glob64_t {
++        pub gl_pathc: ::size_t,
++        pub gl_pathv: *mut *mut ::c_char,
++        pub gl_offs: ::size_t,
++        pub gl_flags: ::c_int,
++
++        __unused1: *mut ::c_void,
++        __unused2: *mut ::c_void,
++        __unused3: *mut ::c_void,
++        __unused4: *mut ::c_void,
++        __unused5: *mut ::c_void,
++    }
++
++    // FIXME this is actually a union
++    pub struct sem_t {
++        #[cfg(target_pointer_width = "32")]
++        __size: [::c_char; 16],
++        #[cfg(target_pointer_width = "64")]
++        __size: [::c_char; 32],
++        __align: [::c_long; 0],
++    }
++}
++
++pub const SFD_CLOEXEC: ::c_int = 0x080000;
++
++pub const NCCS: usize = 32;
++
++pub const O_TRUNC: ::c_int = 512;
++
++pub const O_NOATIME: ::c_int = 0o1000000;
++pub const O_CLOEXEC: ::c_int = 0x80000;
++pub const O_PATH: ::c_int = 0o10000000;
++
++pub const EBFONT: ::c_int = 59;
++pub const ENOSTR: ::c_int = 60;
++pub const ENODATA: ::c_int = 61;
++pub const ETIME: ::c_int = 62;
++pub const ENOSR: ::c_int = 63;
++pub const ENONET: ::c_int = 64;
++pub const ENOPKG: ::c_int = 65;
++pub const EREMOTE: ::c_int = 66;
++pub const ENOLINK: ::c_int = 67;
++pub const EADV: ::c_int = 68;
++pub const ESRMNT: ::c_int = 69;
++pub const ECOMM: ::c_int = 70;
++pub const EPROTO: ::c_int = 71;
++pub const EDOTDOT: ::c_int = 73;
++
++pub const SA_NODEFER: ::c_int = 0x40000000;
++pub const SA_RESETHAND: ::c_int = 0x80000000;
++pub const SA_RESTART: ::c_int = 0x10000000;
++pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
++
++pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
++
++pub const EFD_CLOEXEC: ::c_int = 0x80000;
++
++pub const BUFSIZ: ::c_uint = 8192;
++pub const TMP_MAX: ::c_uint = 238328;
++pub const FOPEN_MAX: ::c_uint = 16;
++pub const POSIX_FADV_DONTNEED: ::c_int = 4;
++pub const POSIX_FADV_NOREUSE: ::c_int = 5;
++pub const POSIX_MADV_DONTNEED: ::c_int = 4;
++pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
++pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
++pub const _SC_PII: ::c_int = 53;
++pub const _SC_PII_XTI: ::c_int = 54;
++pub const _SC_PII_SOCKET: ::c_int = 55;
++pub const _SC_PII_INTERNET: ::c_int = 56;
++pub const _SC_PII_OSI: ::c_int = 57;
++pub const _SC_POLL: ::c_int = 58;
++pub const _SC_SELECT: ::c_int = 59;
++pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
++pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
++pub const _SC_PII_OSI_COTS: ::c_int = 63;
++pub const _SC_PII_OSI_CLTS: ::c_int = 64;
++pub const _SC_PII_OSI_M: ::c_int = 65;
++pub const _SC_T_IOV_MAX: ::c_int = 66;
++pub const _SC_2_C_VERSION: ::c_int = 96;
++pub const _SC_CHAR_BIT: ::c_int = 101;
++pub const _SC_CHAR_MAX: ::c_int = 102;
++pub const _SC_CHAR_MIN: ::c_int = 103;
++pub const _SC_INT_MAX: ::c_int = 104;
++pub const _SC_INT_MIN: ::c_int = 105;
++pub const _SC_LONG_BIT: ::c_int = 106;
++pub const _SC_WORD_BIT: ::c_int = 107;
++pub const _SC_MB_LEN_MAX: ::c_int = 108;
++pub const _SC_SSIZE_MAX: ::c_int = 110;
++pub const _SC_SCHAR_MAX: ::c_int = 111;
++pub const _SC_SCHAR_MIN: ::c_int = 112;
++pub const _SC_SHRT_MAX: ::c_int = 113;
++pub const _SC_SHRT_MIN: ::c_int = 114;
++pub const _SC_UCHAR_MAX: ::c_int = 115;
++pub const _SC_UINT_MAX: ::c_int = 116;
++pub const _SC_ULONG_MAX: ::c_int = 117;
++pub const _SC_USHRT_MAX: ::c_int = 118;
++pub const _SC_NL_ARGMAX: ::c_int = 119;
++pub const _SC_NL_LANGMAX: ::c_int = 120;
++pub const _SC_NL_MSGMAX: ::c_int = 121;
++pub const _SC_NL_NMAX: ::c_int = 122;
++pub const _SC_NL_SETMAX: ::c_int = 123;
++pub const _SC_NL_TEXTMAX: ::c_int = 124;
++pub const _SC_BASE: ::c_int = 134;
++pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
++pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
++pub const _SC_DEVICE_IO: ::c_int = 140;
++pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
++pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
++pub const _SC_FD_MGMT: ::c_int = 143;
++pub const _SC_FIFO: ::c_int = 144;
++pub const _SC_PIPE: ::c_int = 145;
++pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
++pub const _SC_FILE_LOCKING: ::c_int = 147;
++pub const _SC_FILE_SYSTEM: ::c_int = 148;
++pub const _SC_MULTI_PROCESS: ::c_int = 150;
++pub const _SC_SINGLE_PROCESS: ::c_int = 151;
++pub const _SC_NETWORKING: ::c_int = 152;
++pub const _SC_REGEX_VERSION: ::c_int = 156;
++pub const _SC_SIGNALS: ::c_int = 158;
++pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
++pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
++pub const _SC_USER_GROUPS: ::c_int = 166;
++pub const _SC_USER_GROUPS_R: ::c_int = 167;
++pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
++pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
++pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
++pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
++pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
++pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
++pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
++pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
++pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
++pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
++pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
++pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
++pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
++pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
++pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
++pub const O_ACCMODE: ::c_int = 3;
++pub const O_DIRECT: ::c_int = 0x8000;
++pub const O_DIRECTORY: ::c_int = 0x10000;
++pub const O_NOFOLLOW: ::c_int = 0x20000;
++pub const ST_RELATIME: ::c_ulong = 4096;
++pub const NI_MAXHOST: ::socklen_t = 1025;
++
++pub const RLIMIT_NOFILE: ::c_int = 5;
++pub const RLIMIT_AS: ::c_int = 6;
++pub const RLIMIT_RSS: ::c_int = 7;
++pub const RLIMIT_NPROC: ::c_int = 8;
++pub const RLIMIT_MEMLOCK: ::c_int = 9;
++pub const RLIMIT_NLIMITS: ::c_int = 16;
++
++pub const O_APPEND: ::c_int = 8;
++pub const O_CREAT: ::c_int = 256;
++pub const O_EXCL: ::c_int = 1024;
++pub const O_NOCTTY: ::c_int = 2048;
++pub const O_NONBLOCK: ::c_int = 128;
++pub const O_SYNC: ::c_int = 0x4010;
++pub const O_RSYNC: ::c_int = 0x4010;
++pub const O_DSYNC: ::c_int = 0x10;
++pub const O_FSYNC: ::c_int = 0x4010;
++pub const O_ASYNC: ::c_int = 0x1000;
++pub const O_NDELAY: ::c_int = 0x80;
++
++pub const SOCK_NONBLOCK: ::c_int = 128;
++
++pub const EDEADLK: ::c_int = 45;
++pub const ENAMETOOLONG: ::c_int = 78;
++pub const ENOLCK: ::c_int = 46;
++pub const ENOSYS: ::c_int = 89;
++pub const ENOTEMPTY: ::c_int = 93;
++pub const ELOOP: ::c_int = 90;
++pub const ENOMSG: ::c_int = 35;
++pub const EIDRM: ::c_int = 36;
++pub const ECHRNG: ::c_int = 37;
++pub const EL2NSYNC: ::c_int = 38;
++pub const EL3HLT: ::c_int = 39;
++pub const EL3RST: ::c_int = 40;
++pub const ELNRNG: ::c_int = 41;
++pub const EUNATCH: ::c_int = 42;
++pub const ENOCSI: ::c_int = 43;
++pub const EL2HLT: ::c_int = 44;
++pub const EBADE: ::c_int = 50;
++pub const EBADR: ::c_int = 51;
++pub const EXFULL: ::c_int = 52;
++pub const ENOANO: ::c_int = 53;
++pub const EBADRQC: ::c_int = 54;
++pub const EBADSLT: ::c_int = 55;
++pub const EDEADLOCK: ::c_int = 56;
++pub const EMULTIHOP: ::c_int = 74;
++pub const EOVERFLOW: ::c_int = 79;
++pub const ENOTUNIQ: ::c_int = 80;
++pub const EBADFD: ::c_int = 81;
++pub const EBADMSG: ::c_int = 77;
++pub const EREMCHG: ::c_int = 82;
++pub const ELIBACC: ::c_int = 83;
++pub const ELIBBAD: ::c_int = 84;
++pub const ELIBSCN: ::c_int = 85;
++pub const ELIBMAX: ::c_int = 86;
++pub const ELIBEXEC: ::c_int = 87;
++pub const EILSEQ: ::c_int = 88;
++pub const ERESTART: ::c_int = 91;
++pub const ESTRPIPE: ::c_int = 92;
++pub const EUSERS: ::c_int = 94;
++pub const ENOTSOCK: ::c_int = 95;
++pub const EDESTADDRREQ: ::c_int = 96;
++pub const EMSGSIZE: ::c_int = 97;
++pub const EPROTOTYPE: ::c_int = 98;
++pub const ENOPROTOOPT: ::c_int = 99;
++pub const EPROTONOSUPPORT: ::c_int = 120;
++pub const ESOCKTNOSUPPORT: ::c_int = 121;
++pub const EOPNOTSUPP: ::c_int = 122;
++pub const ENOTSUP: ::c_int = EOPNOTSUPP;
++pub const EPFNOSUPPORT: ::c_int = 123;
++pub const EAFNOSUPPORT: ::c_int = 124;
++pub const EADDRINUSE: ::c_int = 125;
++pub const EADDRNOTAVAIL: ::c_int = 126;
++pub const ENETDOWN: ::c_int = 127;
++pub const ENETUNREACH: ::c_int = 128;
++pub const ENETRESET: ::c_int = 129;
++pub const ECONNABORTED: ::c_int = 130;
++pub const ECONNRESET: ::c_int = 131;
++pub const ENOBUFS: ::c_int = 132;
++pub const EISCONN: ::c_int = 133;
++pub const ENOTCONN: ::c_int = 134;
++pub const ESHUTDOWN: ::c_int = 143;
++pub const ETOOMANYREFS: ::c_int = 144;
++pub const ETIMEDOUT: ::c_int = 145;
++pub const ECONNREFUSED: ::c_int = 146;
++pub const EHOSTDOWN: ::c_int = 147;
++pub const EHOSTUNREACH: ::c_int = 148;
++pub const EALREADY: ::c_int = 149;
++pub const EINPROGRESS: ::c_int = 150;
++pub const ESTALE: ::c_int = 151;
++pub const EUCLEAN: ::c_int = 135;
++pub const ENOTNAM: ::c_int = 137;
++pub const ENAVAIL: ::c_int = 138;
++pub const EISNAM: ::c_int = 139;
++pub const EREMOTEIO: ::c_int = 140;
++pub const EDQUOT: ::c_int = 1133;
++pub const ENOMEDIUM: ::c_int = 159;
++pub const EMEDIUMTYPE: ::c_int = 160;
++pub const ECANCELED: ::c_int = 158;
++pub const ENOKEY: ::c_int = 161;
++pub const EKEYEXPIRED: ::c_int = 162;
++pub const EKEYREVOKED: ::c_int = 163;
++pub const EKEYREJECTED: ::c_int = 164;
++pub const EOWNERDEAD: ::c_int = 165;
++pub const ENOTRECOVERABLE: ::c_int = 166;
++pub const ERFKILL: ::c_int = 167;
++
++pub const LC_PAPER: ::c_int = 7;
++pub const LC_NAME: ::c_int = 8;
++pub const LC_ADDRESS: ::c_int = 9;
++pub const LC_TELEPHONE: ::c_int = 10;
++pub const LC_MEASUREMENT: ::c_int = 11;
++pub const LC_IDENTIFICATION: ::c_int = 12;
++pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
++pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
++pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
++pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
++pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
++pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
++pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
++                               | ::LC_NUMERIC_MASK
++                               | ::LC_TIME_MASK
++                               | ::LC_COLLATE_MASK
++                               | ::LC_MONETARY_MASK
++                               | ::LC_MESSAGES_MASK
++                               | LC_PAPER_MASK
++                               | LC_NAME_MASK
++                               | LC_ADDRESS_MASK
++                               | LC_TELEPHONE_MASK
++                               | LC_MEASUREMENT_MASK
++                               | LC_IDENTIFICATION_MASK;
++
++pub const MAP_NORESERVE: ::c_int = 0x400;
++pub const MAP_ANON: ::c_int = 0x800;
++pub const MAP_ANONYMOUS: ::c_int = 0x800;
++pub const MAP_GROWSDOWN: ::c_int = 0x1000;
++pub const MAP_DENYWRITE: ::c_int = 0x2000;
++pub const MAP_EXECUTABLE: ::c_int = 0x4000;
++pub const MAP_LOCKED: ::c_int = 0x8000;
++pub const MAP_POPULATE: ::c_int = 0x10000;
++pub const MAP_NONBLOCK: ::c_int = 0x20000;
++pub const MAP_STACK: ::c_int = 0x40000;
++
++pub const SOCK_STREAM: ::c_int = 2;
++pub const SOCK_DGRAM: ::c_int = 1;
++pub const SOCK_SEQPACKET: ::c_int = 5;
++
++pub const SOL_SOCKET: ::c_int = 0xffff;
++
++pub const SO_REUSEADDR: ::c_int = 0x0004;
++pub const SO_KEEPALIVE: ::c_int = 0x0008;
++pub const SO_DONTROUTE: ::c_int = 0x0010;
++pub const SO_BROADCAST: ::c_int = 0x0020;
++pub const SO_LINGER: ::c_int = 0x0080;
++pub const SO_OOBINLINE: ::c_int = 0x0100;
++pub const SO_REUSEPORT: ::c_int = 0x0200;
++pub const SO_TYPE: ::c_int = 0x1008;
++pub const SO_STYLE: ::c_int = SO_TYPE;
++pub const SO_ERROR: ::c_int = 0x1007;
++pub const SO_SNDBUF: ::c_int = 0x1001;
++pub const SO_RCVBUF: ::c_int = 0x1002;
++pub const SO_SNDLOWAT: ::c_int = 0x1003;
++pub const SO_RCVLOWAT: ::c_int = 0x1004;
++pub const SO_SNDTIMEO: ::c_int = 0x1005;
++pub const SO_RCVTIMEO: ::c_int = 0x1006;
++pub const SO_ACCEPTCONN: ::c_int = 0x1009;
++pub const SO_PROTOCOL: ::c_int = 0x1028;
++pub const SO_DOMAIN: ::c_int = 0x1029;
++pub const SO_NO_CHECK: ::c_int = 11;
++pub const SO_PRIORITY: ::c_int = 12;
++pub const SO_BSDCOMPAT: ::c_int = 14;
++pub const SO_PASSCRED: ::c_int = 17;
++pub const SO_PEERCRED: ::c_int = 18;
++pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
++pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
++pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
++pub const SO_BINDTODEVICE: ::c_int = 25;
++pub const SO_ATTACH_FILTER: ::c_int = 26;
++pub const SO_DETACH_FILTER: ::c_int = 27;
++pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
++pub const SO_PEERNAME: ::c_int = 28;
++pub const SO_TIMESTAMP: ::c_int = 29;
++pub const SO_PEERSEC: ::c_int = 30;
++pub const SO_SNDBUFFORCE: ::c_int = 31;
++pub const SO_RCVBUFFORCE: ::c_int = 33;
++pub const SO_PASSSEC: ::c_int = 34;
++pub const SO_TIMESTAMPNS: ::c_int = 35;
++pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
++pub const SO_MARK: ::c_int = 36;
++pub const SO_TIMESTAMPING: ::c_int = 37;
++pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
++pub const SO_RXQ_OVFL: ::c_int = 40;
++pub const SO_WIFI_STATUS: ::c_int = 41;
++pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
++pub const SO_PEEK_OFF: ::c_int = 42;
++pub const SO_NOFCS: ::c_int = 43;
++pub const SO_LOCK_FILTER: ::c_int = 44;
++pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
++pub const SO_BUSY_POLL: ::c_int = 46;
++pub const SO_MAX_PACING_RATE: ::c_int = 47;
++pub const SO_BPF_EXTENSIONS: ::c_int = 48;
++pub const SO_INCOMING_CPU: ::c_int = 49;
++pub const SO_ATTACH_BPF: ::c_int = 50;
++pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
++
++pub const FIOCLEX: ::c_ulong = 0x6601;
++pub const FIONBIO: ::c_ulong = 0x667e;
++
++pub const SA_ONSTACK: ::c_int = 0x08000000;
++pub const SA_SIGINFO: ::c_int = 0x00000008;
++pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
++
++pub const SIGCHLD: ::c_int = 18;
++pub const SIGBUS: ::c_int = 10;
++pub const SIGTTIN: ::c_int = 26;
++pub const SIGTTOU: ::c_int = 27;
++pub const SIGXCPU: ::c_int = 30;
++pub const SIGXFSZ: ::c_int = 31;
++pub const SIGVTALRM: ::c_int = 28;
++pub const SIGPROF: ::c_int = 29;
++pub const SIGWINCH: ::c_int = 20;
++pub const SIGUSR1: ::c_int = 16;
++pub const SIGUSR2: ::c_int = 17;
++pub const SIGCONT: ::c_int = 25;
++pub const SIGSTOP: ::c_int = 23;
++pub const SIGTSTP: ::c_int = 24;
++pub const SIGURG: ::c_int = 21;
++pub const SIGIO: ::c_int = 22;
++pub const SIGSYS: ::c_int = 12;
++pub const SIGPOLL: ::c_int = 22;
++pub const SIGPWR: ::c_int = 19;
++pub const SIG_SETMASK: ::c_int = 3;
++pub const SIG_BLOCK: ::c_int = 0x1;
++pub const SIG_UNBLOCK: ::c_int = 0x2;
++
++pub const POLLWRNORM: ::c_short = 0x004;
++pub const POLLWRBAND: ::c_short = 0x100;
++
++pub const PTHREAD_STACK_MIN: ::size_t = 131072;
++
++pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
++pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
++pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
++pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
++pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
++pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
++pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
++pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
++pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
++pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
++pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
++pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
++pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
++pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
++pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
++pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
++pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
++pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
++pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
++pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
++pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
++pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
++pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
++pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
++pub const TMPFS_MAGIC: ::c_long = 0x01021994;
++pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
++
++pub const VEOF: usize = 16;
++pub const VEOL: usize = 17;
++pub const VEOL2: usize = 6;
++pub const VMIN: usize = 4;
++pub const IEXTEN: ::tcflag_t = 0x00000100;
++pub const TOSTOP: ::tcflag_t = 0x00008000;
++pub const FLUSHO: ::tcflag_t = 0x00002000;
++pub const EXTPROC: ::tcflag_t = 0o200000;
++pub const TCSANOW: ::c_int = 0x540e;
++pub const TCSADRAIN: ::c_int = 0x540f;
++pub const TCSAFLUSH: ::c_int = 0x5410;
++
++pub const CPU_SETSIZE: ::c_int = 0x400;
++
++pub const PTRACE_TRACEME: ::c_uint = 0;
++pub const PTRACE_PEEKTEXT: ::c_uint = 1;
++pub const PTRACE_PEEKDATA: ::c_uint = 2;
++pub const PTRACE_PEEKUSER: ::c_uint = 3;
++pub const PTRACE_POKETEXT: ::c_uint = 4;
++pub const PTRACE_POKEDATA: ::c_uint = 5;
++pub const PTRACE_POKEUSER: ::c_uint = 6;
++pub const PTRACE_CONT: ::c_uint = 7;
++pub const PTRACE_KILL: ::c_uint = 8;
++pub const PTRACE_SINGLESTEP: ::c_uint = 9;
++pub const PTRACE_ATTACH: ::c_uint = 16;
++pub const PTRACE_DETACH: ::c_uint = 17;
++pub const PTRACE_SYSCALL: ::c_uint = 24;
++pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
++pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
++pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
++pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
++pub const PTRACE_GETFPREGS: ::c_uint = 14;
++pub const PTRACE_SETFPREGS: ::c_uint = 15;
++pub const PTRACE_GETFPXREGS: ::c_uint = 18;
++pub const PTRACE_SETFPXREGS: ::c_uint = 19;
++pub const PTRACE_GETREGS: ::c_uint = 12;
++pub const PTRACE_SETREGS: ::c_uint = 13;
++
++pub const MAP_HUGETLB: ::c_int = 0x080000;
++
++pub const EFD_NONBLOCK: ::c_int = 0x80;
++
++pub const F_GETLK: ::c_int = 14;
++pub const F_GETOWN: ::c_int = 23;
++pub const F_SETOWN: ::c_int = 24;
++pub const F_SETLK: ::c_int = 6;
++pub const F_SETLKW: ::c_int = 7;
++
++pub const SFD_NONBLOCK: ::c_int = 0x80;
++
++pub const TCGETS: ::c_ulong = 0x540d;
++pub const TCSETS: ::c_ulong = 0x540e;
++pub const TCSETSW: ::c_ulong = 0x540f;
++pub const TCSETSF: ::c_ulong = 0x5410;
++pub const TCGETA: ::c_ulong = 0x5401;
++pub const TCSETA: ::c_ulong = 0x5402;
++pub const TCSETAW: ::c_ulong = 0x5403;
++pub const TCSETAF: ::c_ulong = 0x5404;
++pub const TCSBRK: ::c_ulong = 0x5405;
++pub const TCXONC: ::c_ulong = 0x5406;
++pub const TCFLSH: ::c_ulong = 0x5407;
++pub const TIOCGSOFTCAR: ::c_ulong = 0x5481;
++pub const TIOCSSOFTCAR: ::c_ulong = 0x5482;
++pub const TIOCINQ: ::c_ulong = 0x467f;
++pub const TIOCLINUX: ::c_ulong = 0x5483;
++pub const TIOCGSERIAL: ::c_ulong = 0x5484;
++pub const TIOCEXCL: ::c_ulong = 0x740d;
++pub const TIOCNXCL: ::c_ulong = 0x740e;
++pub const TIOCSCTTY: ::c_ulong = 0x5480;
++pub const TIOCGPGRP: ::c_ulong = 0x40047477;
++pub const TIOCSPGRP: ::c_ulong = 0x80047476;
++pub const TIOCOUTQ: ::c_ulong = 0x7472;
++pub const TIOCSTI: ::c_ulong = 0x5472;
++pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
++pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
++pub const TIOCMGET: ::c_ulong = 0x741d;
++pub const TIOCMBIS: ::c_ulong = 0x741b;
++pub const TIOCMBIC: ::c_ulong = 0x741c;
++pub const TIOCMSET: ::c_ulong = 0x741a;
++pub const FIONREAD: ::c_ulong = 0x467f;
++pub const TIOCCONS: ::c_ulong = 0x80047478;
++
++pub const RTLD_DEEPBIND: ::c_int = 0x10;
++pub const RTLD_GLOBAL: ::c_int = 0x4;
++pub const RTLD_NOLOAD: ::c_int = 0x8;
++
++pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
++pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
++pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
++pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
++pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
++
++pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
++pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
++pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
++pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
++pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
++pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
++pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
++pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
++
++pub const MCL_CURRENT: ::c_int = 0x0001;
++pub const MCL_FUTURE: ::c_int = 0x0002;
++
++pub const SIGSTKSZ: ::size_t = 8192;
++pub const MINSIGSTKSZ: ::size_t = 2048;
++pub const CBAUD: ::tcflag_t = 0o0010017;
++pub const TAB1: ::c_int = 0x00000800;
++pub const TAB2: ::c_int = 0x00001000;
++pub const TAB3: ::c_int = 0x00001800;
++pub const CR1: ::c_int  = 0x00000200;
++pub const CR2: ::c_int  = 0x00000400;
++pub const CR3: ::c_int  = 0x00000600;
++pub const FF1: ::c_int  = 0x00008000;
++pub const BS1: ::c_int  = 0x00002000;
++pub const VT1: ::c_int  = 0x00004000;
++pub const VWERASE: usize = 14;
++pub const VREPRINT: usize = 12;
++pub const VSUSP: usize = 10;
++pub const VSTART: usize = 8;
++pub const VSTOP: usize = 9;
++pub const VDISCARD: usize = 13;
++pub const VTIME: usize = 5;
++pub const IXON: ::tcflag_t = 0x00000400;
++pub const IXOFF: ::tcflag_t = 0x00001000;
++pub const ONLCR: ::tcflag_t = 0x4;
++pub const CSIZE: ::tcflag_t = 0x00000030;
++pub const CS6: ::tcflag_t = 0x00000010;
++pub const CS7: ::tcflag_t = 0x00000020;
++pub const CS8: ::tcflag_t = 0x00000030;
++pub const CSTOPB: ::tcflag_t = 0x00000040;
++pub const CREAD: ::tcflag_t = 0x00000080;
++pub const PARENB: ::tcflag_t = 0x00000100;
++pub const PARODD: ::tcflag_t = 0x00000200;
++pub const HUPCL: ::tcflag_t = 0x00000400;
++pub const CLOCAL: ::tcflag_t = 0x00000800;
++pub const ECHOKE: ::tcflag_t = 0x00000800;
++pub const ECHOE: ::tcflag_t = 0x00000010;
++pub const ECHOK: ::tcflag_t = 0x00000020;
++pub const ECHONL: ::tcflag_t = 0x00000040;
++pub const ECHOPRT: ::tcflag_t = 0x00000400;
++pub const ECHOCTL: ::tcflag_t = 0x00000200;
++pub const ISIG: ::tcflag_t = 0x00000001;
++pub const ICANON: ::tcflag_t = 0x00000002;
++pub const PENDIN: ::tcflag_t = 0x00004000;
++pub const NOFLSH: ::tcflag_t = 0x00000080;
++pub const CIBAUD: ::tcflag_t = 0o02003600000;
++pub const CBAUDEX: ::tcflag_t = 0o010000;
++pub const VSWTC: usize = 7;
++pub const OLCUC:  ::tcflag_t = 0o000002;
++pub const NLDLY:  ::tcflag_t = 0o000400;
++pub const CRDLY:  ::tcflag_t = 0o003000;
++pub const TABDLY: ::tcflag_t = 0o014000;
++pub const BSDLY:  ::tcflag_t = 0o020000;
++pub const FFDLY:  ::tcflag_t = 0o100000;
++pub const VTDLY:  ::tcflag_t = 0o040000;
++pub const XTABS:  ::tcflag_t = 0o014000;
++
++pub const B0: ::speed_t = 0o000000;
++pub const B50: ::speed_t = 0o000001;
++pub const B75: ::speed_t = 0o000002;
++pub const B110: ::speed_t = 0o000003;
++pub const B134: ::speed_t = 0o000004;
++pub const B150: ::speed_t = 0o000005;
++pub const B200: ::speed_t = 0o000006;
++pub const B300: ::speed_t = 0o000007;
++pub const B600: ::speed_t = 0o000010;
++pub const B1200: ::speed_t = 0o000011;
++pub const B1800: ::speed_t = 0o000012;
++pub const B2400: ::speed_t = 0o000013;
++pub const B4800: ::speed_t = 0o000014;
++pub const B9600: ::speed_t = 0o000015;
++pub const B19200: ::speed_t = 0o000016;
++pub const B38400: ::speed_t = 0o000017;
++pub const EXTA: ::speed_t = B19200;
++pub const EXTB: ::speed_t = B38400;
++pub const B57600: ::speed_t = 0o010001;
++pub const B115200: ::speed_t = 0o010002;
++pub const B230400: ::speed_t = 0o010003;
++pub const B460800: ::speed_t = 0o010004;
++pub const B500000: ::speed_t = 0o010005;
++pub const B576000: ::speed_t = 0o010006;
++pub const B921600: ::speed_t = 0o010007;
++pub const B1000000: ::speed_t = 0o010010;
++pub const B1152000: ::speed_t = 0o010011;
++pub const B1500000: ::speed_t = 0o010012;
++pub const B2000000: ::speed_t = 0o010013;
++pub const B2500000: ::speed_t = 0o010014;
++pub const B3000000: ::speed_t = 0o010015;
++pub const B3500000: ::speed_t = 0o010016;
++pub const B4000000: ::speed_t = 0o010017;
++
++pub const TIOCM_LE: ::c_int = 0x001;
++pub const TIOCM_DTR: ::c_int = 0x002;
++pub const TIOCM_RTS: ::c_int = 0x004;
++pub const TIOCM_ST: ::c_int = 0x010;
++pub const TIOCM_SR: ::c_int = 0x020;
++pub const TIOCM_CTS: ::c_int = 0x040;
++pub const TIOCM_CAR: ::c_int = 0x100;
++pub const TIOCM_CD: ::c_int = TIOCM_CAR;
++pub const TIOCM_RNG: ::c_int = 0x200;
++pub const TIOCM_RI: ::c_int = TIOCM_RNG;
++pub const TIOCM_DSR: ::c_int = 0x400;
++
++pub const EHWPOISON: ::c_int = 168;
++pub const SIGEV_THREAD_ID: ::c_int = 4;
++pub const EPOLLWAKEUP: ::c_int = 0x20000000;
++
++#[link(name = "util")]
++extern {
++    pub fn sysctl(name: *mut ::c_int,
++                  namelen: ::c_int,
++                  oldp: *mut ::c_void,
++                  oldlenp: *mut ::size_t,
++                  newp: *mut ::c_void,
++                  newlen: ::size_t)
++                  -> ::c_int;
++    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
++    pub fn backtrace(buf: *mut *mut ::c_void,
++                     sz: ::c_int) -> ::c_int;
++    pub fn glob64(pattern: *const ::c_char,
++                  flags: ::c_int,
++                  errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
++                                                   errno: ::c_int)
++                                                   -> ::c_int>,
++                  pglob: *mut glob64_t) -> ::c_int;
++    pub fn globfree64(pglob: *mut glob64_t);
++    pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
++    pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
++                                       cpusetsize: ::size_t,
++                                       cpuset: *mut ::cpu_set_t) -> ::c_int;
++    pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
++                                       cpusetsize: ::size_t,
++                                       cpuset: *const ::cpu_set_t) -> ::c_int;
++    pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
++    pub fn setpriority(which: ::__priority_which_t, who: ::id_t,
++                                       prio: ::c_int) -> ::c_int;
++    pub fn pthread_getaffinity_np(thread: ::pthread_t,
++                                  cpusetsize: ::size_t,
++                                  cpuset: *mut ::cpu_set_t) -> ::c_int;
++    pub fn pthread_setaffinity_np(thread: ::pthread_t,
++                                  cpusetsize: ::size_t,
++                                  cpuset: *const ::cpu_set_t) -> ::c_int;
++    pub fn sched_getcpu() -> ::c_int;
++}
++
++cfg_if! {
++    if #[cfg(target_arch = "mips")] {
++        mod mips32;
++        pub use self::mips32::*;
++    } else if #[cfg(target_arch = "mips64")] {
++        mod mips64;
++        pub use self::mips64::*;
++    } else {
++        // Unknown target_arch
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1fcbf0b3e34470fb02412aafaef55c620f6c0947
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1232 @@@
++//! Linux-specific definitions for linux-like values
++
++use dox::{mem, Option};
++
++pub type useconds_t = u32;
++pub type dev_t = u64;
++pub type socklen_t = u32;
++pub type pthread_t = c_ulong;
++pub type mode_t = u32;
++pub type ino64_t = u64;
++pub type off64_t = i64;
++pub type blkcnt64_t = i64;
++pub type rlim64_t = u64;
++pub type shmatt_t = ::c_ulong;
++pub type mqd_t = ::c_int;
++pub type msgqnum_t = ::c_ulong;
++pub type msglen_t = ::c_ulong;
++pub type nfds_t = ::c_ulong;
++pub type nl_item = ::c_int;
++pub type idtype_t = ::c_uint;
++
++pub type __u8 = ::c_uchar;
++pub type __u16 = ::c_ushort;
++pub type __s16 = ::c_short;
++pub type __u32 = ::c_uint;
++pub type __s32 = ::c_int;
++
++pub enum fpos64_t {} // TODO: fill this out with a struct
++
++s! {
++    pub struct dirent {
++        pub d_ino: ::ino_t,
++        pub d_off: ::off_t,
++        pub d_reclen: ::c_ushort,
++        pub d_type: ::c_uchar,
++        pub d_name: [::c_char; 256],
++    }
++
++    pub struct dirent64 {
++        pub d_ino: ::ino64_t,
++        pub d_off: ::off64_t,
++        pub d_reclen: ::c_ushort,
++        pub d_type: ::c_uchar,
++        pub d_name: [::c_char; 256],
++    }
++
++    pub struct rlimit64 {
++        pub rlim_cur: rlim64_t,
++        pub rlim_max: rlim64_t,
++    }
++
++    pub struct glob_t {
++        pub gl_pathc: ::size_t,
++        pub gl_pathv: *mut *mut c_char,
++        pub gl_offs: ::size_t,
++        pub gl_flags: ::c_int,
++
++        __unused1: *mut ::c_void,
++        __unused2: *mut ::c_void,
++        __unused3: *mut ::c_void,
++        __unused4: *mut ::c_void,
++        __unused5: *mut ::c_void,
++    }
++
++    pub struct ifaddrs {
++        pub ifa_next: *mut ifaddrs,
++        pub ifa_name: *mut c_char,
++        pub ifa_flags: ::c_uint,
++        pub ifa_addr: *mut ::sockaddr,
++        pub ifa_netmask: *mut ::sockaddr,
++        pub ifa_ifu: *mut ::sockaddr, // FIXME This should be a union
++        pub ifa_data: *mut ::c_void
++    }
++
++    pub struct pthread_mutex_t {
++        #[cfg(any(target_arch = "mips", target_arch = "arm",
++                  target_arch = "powerpc"))]
++        __align: [::c_long; 0],
++        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
++                      target_arch = "powerpc")))]
++        __align: [::c_longlong; 0],
++        size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
++    }
++
++    pub struct pthread_rwlock_t {
++        #[cfg(any(target_arch = "mips", target_arch = "arm",
++                  target_arch = "powerpc"))]
++        __align: [::c_long; 0],
++        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
++                      target_arch = "powerpc")))]
++        __align: [::c_longlong; 0],
++        size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
++    }
++
++    pub struct pthread_mutexattr_t {
++        #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
++                  target_arch = "mips64", target_arch = "s390x",
++                  target_arch = "sparc64"))]
++        __align: [::c_int; 0],
++        #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
++                      target_arch = "mips64", target_arch = "s390x",
++                      target_arch = "sparc64")))]
++        __align: [::c_long; 0],
++        size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
++    }
++
++    pub struct pthread_rwlockattr_t {
++        #[cfg(any(target_env = "musl"))]
++        __align: [::c_int; 0],
++        #[cfg(not(any(target_env = "musl")))]
++        __align: [::c_long; 0],
++        size: [u8; __SIZEOF_PTHREAD_RWLOCKATTR_T],
++    }
++
++    pub struct pthread_cond_t {
++        #[cfg(any(target_env = "musl"))]
++        __align: [*const ::c_void; 0],
++        #[cfg(not(any(target_env = "musl")))]
++        __align: [::c_longlong; 0],
++        size: [u8; __SIZEOF_PTHREAD_COND_T],
++    }
++
++    pub struct pthread_condattr_t {
++        __align: [::c_int; 0],
++        size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
++    }
++
++    pub struct passwd {
++        pub pw_name: *mut ::c_char,
++        pub pw_passwd: *mut ::c_char,
++        pub pw_uid: ::uid_t,
++        pub pw_gid: ::gid_t,
++        pub pw_gecos: *mut ::c_char,
++        pub pw_dir: *mut ::c_char,
++        pub pw_shell: *mut ::c_char,
++    }
++
++    pub struct spwd {
++        pub sp_namp: *mut ::c_char,
++        pub sp_pwdp: *mut ::c_char,
++        pub sp_lstchg: ::c_long,
++        pub sp_min: ::c_long,
++        pub sp_max: ::c_long,
++        pub sp_warn: ::c_long,
++        pub sp_inact: ::c_long,
++        pub sp_expire: ::c_long,
++        pub sp_flag: ::c_ulong,
++    }
++
++    pub struct statvfs {
++        pub f_bsize: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_favail: ::fsfilcnt_t,
++        #[cfg(target_endian = "little")]
++        pub f_fsid: ::c_ulong,
++        #[cfg(target_pointer_width = "32")]
++        __f_unused: ::c_int,
++        #[cfg(target_endian = "big")]
++        pub f_fsid: ::c_ulong,
++        pub f_flag: ::c_ulong,
++        pub f_namemax: ::c_ulong,
++        __f_spare: [::c_int; 6],
++    }
++
++    pub struct dqblk {
++        pub dqb_bhardlimit: ::uint64_t,
++        pub dqb_bsoftlimit: ::uint64_t,
++        pub dqb_curspace: ::uint64_t,
++        pub dqb_ihardlimit: ::uint64_t,
++        pub dqb_isoftlimit: ::uint64_t,
++        pub dqb_curinodes: ::uint64_t,
++        pub dqb_btime: ::uint64_t,
++        pub dqb_itime: ::uint64_t,
++        pub dqb_valid: ::uint32_t,
++    }
++
++    pub struct signalfd_siginfo {
++        pub ssi_signo: ::uint32_t,
++        pub ssi_errno: ::int32_t,
++        pub ssi_code: ::int32_t,
++        pub ssi_pid: ::uint32_t,
++        pub ssi_uid: ::uint32_t,
++        pub ssi_fd: ::int32_t,
++        pub ssi_tid: ::uint32_t,
++        pub ssi_band: ::uint32_t,
++        pub ssi_overrun: ::uint32_t,
++        pub ssi_trapno: ::uint32_t,
++        pub ssi_status: ::int32_t,
++        pub ssi_int: ::int32_t,
++        pub ssi_ptr: ::uint64_t,
++        pub ssi_utime: ::uint64_t,
++        pub ssi_stime: ::uint64_t,
++        pub ssi_addr: ::uint64_t,
++        _pad: [::uint8_t; 48],
++    }
++
++    pub struct fsid_t {
++        __val: [::c_int; 2],
++    }
++
++    pub struct mq_attr {
++        pub mq_flags: ::c_long,
++        pub mq_maxmsg: ::c_long,
++        pub mq_msgsize: ::c_long,
++        pub mq_curmsgs: ::c_long,
++        pad: [::c_long; 4]
++    }
++
++    pub struct cpu_set_t {
++        #[cfg(target_pointer_width = "32")]
++        bits: [u32; 32],
++        #[cfg(target_pointer_width = "64")]
++        bits: [u64; 16],
++    }
++
++    pub struct if_nameindex {
++        pub if_index: ::c_uint,
++        pub if_name: *mut ::c_char,
++    }
++
++    // System V IPC
++    pub struct msginfo {
++        pub msgpool: ::c_int,
++        pub msgmap: ::c_int,
++        pub msgmax: ::c_int,
++        pub msgmnb: ::c_int,
++        pub msgmni: ::c_int,
++        pub msgssz: ::c_int,
++        pub msgtql: ::c_int,
++        pub msgseg: ::c_ushort,
++    }
++
++    pub struct mmsghdr {
++        pub msg_hdr: ::msghdr,
++        pub msg_len: ::c_uint,
++    }
++
++    pub struct sembuf {
++        pub sem_num: ::c_ushort,
++        pub sem_op: ::c_short,
++        pub sem_flg: ::c_short,
++    }
++
++    pub struct input_event {
++        pub time: ::timeval,
++        pub type_: ::__u16,
++        pub code: ::__u16,
++        pub value: ::__s32,
++    }
++
++    pub struct input_id {
++        pub bustype: ::__u16,
++        pub vendor: ::__u16,
++        pub product: ::__u16,
++        pub version: ::__u16,
++    }
++
++    pub struct input_absinfo {
++        pub value: ::__s32,
++        pub minimum: ::__s32,
++        pub maximum: ::__s32,
++        pub fuzz: ::__s32,
++        pub flat: ::__s32,
++        pub resolution: ::__s32,
++    }
++
++    pub struct input_keymap_entry {
++        pub flags: ::__u8,
++        pub len: ::__u8,
++        pub index: ::__u16,
++        pub keycode: ::__u32,
++        pub scancode: [::__u8; 32],
++    }
++
++    pub struct input_mask {
++        pub type_: ::__u32,
++        pub codes_size: ::__u32,
++        pub codes_ptr: ::__u64,
++    }
++
++    pub struct ff_replay {
++        pub length: ::__u16,
++        pub delay: ::__u16,
++    }
++
++    pub struct ff_trigger {
++        pub button: ::__u16,
++        pub interval: ::__u16,
++    }
++
++    pub struct ff_envelope {
++        pub attack_length: ::__u16,
++        pub attack_level: ::__u16,
++        pub fade_length: ::__u16,
++        pub fade_level: ::__u16,
++    }
++
++    pub struct ff_constant_effect {
++        pub level: ::__s16,
++        pub envelope: ff_envelope,
++    }
++
++    pub struct ff_ramp_effect {
++        pub start_level: ::__s16,
++        pub end_level: ::__s16,
++        pub envelope: ff_envelope,
++    }
++
++    pub struct ff_condition_effect {
++        pub right_saturation: ::__u16,
++        pub left_saturation: ::__u16,
++
++        pub right_coeff: ::__s16,
++        pub left_coeff: ::__s16,
++
++        pub deadband: ::__u16,
++        pub center: ::__s16,
++    }
++
++    pub struct ff_periodic_effect {
++        pub waveform: ::__u16,
++        pub period: ::__u16,
++        pub magnitude: ::__s16,
++        pub offset: ::__s16,
++        pub phase: ::__u16,
++
++        pub envelope: ff_envelope,
++
++        pub custom_len: ::__u32,
++        pub custom_data: *mut ::__s16,
++    }
++
++    pub struct ff_rumble_effect {
++        pub strong_magnitude: ::__u16,
++        pub weak_magnitude: ::__u16,
++    }
++
++    pub struct ff_effect {
++        pub type_: ::__u16,
++        pub id: ::__s16,
++        pub direction: ::__u16,
++        pub trigger: ff_trigger,
++        pub replay: ff_replay,
++        // FIXME this is actually a union
++        #[cfg(target_pointer_width = "64")]
++        pub u: [u64; 4],
++        #[cfg(target_pointer_width = "32")]
++        pub u: [u32; 7],
++    }
++}
++
++pub const ABDAY_1: ::nl_item = 0x20000;
++pub const ABDAY_2: ::nl_item = 0x20001;
++pub const ABDAY_3: ::nl_item = 0x20002;
++pub const ABDAY_4: ::nl_item = 0x20003;
++pub const ABDAY_5: ::nl_item = 0x20004;
++pub const ABDAY_6: ::nl_item = 0x20005;
++pub const ABDAY_7: ::nl_item = 0x20006;
++
++pub const DAY_1: ::nl_item = 0x20007;
++pub const DAY_2: ::nl_item = 0x20008;
++pub const DAY_3: ::nl_item = 0x20009;
++pub const DAY_4: ::nl_item = 0x2000A;
++pub const DAY_5: ::nl_item = 0x2000B;
++pub const DAY_6: ::nl_item = 0x2000C;
++pub const DAY_7: ::nl_item = 0x2000D;
++
++pub const ABMON_1: ::nl_item = 0x2000E;
++pub const ABMON_2: ::nl_item = 0x2000F;
++pub const ABMON_3: ::nl_item = 0x20010;
++pub const ABMON_4: ::nl_item = 0x20011;
++pub const ABMON_5: ::nl_item = 0x20012;
++pub const ABMON_6: ::nl_item = 0x20013;
++pub const ABMON_7: ::nl_item = 0x20014;
++pub const ABMON_8: ::nl_item = 0x20015;
++pub const ABMON_9: ::nl_item = 0x20016;
++pub const ABMON_10: ::nl_item = 0x20017;
++pub const ABMON_11: ::nl_item = 0x20018;
++pub const ABMON_12: ::nl_item = 0x20019;
++
++pub const MON_1: ::nl_item = 0x2001A;
++pub const MON_2: ::nl_item = 0x2001B;
++pub const MON_3: ::nl_item = 0x2001C;
++pub const MON_4: ::nl_item = 0x2001D;
++pub const MON_5: ::nl_item = 0x2001E;
++pub const MON_6: ::nl_item = 0x2001F;
++pub const MON_7: ::nl_item = 0x20020;
++pub const MON_8: ::nl_item = 0x20021;
++pub const MON_9: ::nl_item = 0x20022;
++pub const MON_10: ::nl_item = 0x20023;
++pub const MON_11: ::nl_item = 0x20024;
++pub const MON_12: ::nl_item = 0x20025;
++
++pub const AM_STR: ::nl_item = 0x20026;
++pub const PM_STR: ::nl_item = 0x20027;
++
++pub const D_T_FMT: ::nl_item = 0x20028;
++pub const D_FMT: ::nl_item = 0x20029;
++pub const T_FMT: ::nl_item = 0x2002A;
++pub const T_FMT_AMPM: ::nl_item = 0x2002B;
++
++pub const ERA: ::nl_item = 0x2002C;
++pub const ERA_D_FMT: ::nl_item = 0x2002E;
++pub const ALT_DIGITS: ::nl_item = 0x2002F;
++pub const ERA_D_T_FMT: ::nl_item = 0x20030;
++pub const ERA_T_FMT: ::nl_item = 0x20031;
++
++pub const CODESET: ::nl_item = 14;
++
++pub const CRNCYSTR: ::nl_item = 0x4000F;
++
++pub const RUSAGE_THREAD: ::c_int = 1;
++pub const RUSAGE_CHILDREN: ::c_int = -1;
++
++pub const RADIXCHAR: ::nl_item = 0x10000;
++pub const THOUSEP: ::nl_item = 0x10001;
++
++pub const YESEXPR: ::nl_item = 0x50000;
++pub const NOEXPR: ::nl_item = 0x50001;
++pub const YESSTR: ::nl_item = 0x50002;
++pub const NOSTR: ::nl_item = 0x50003;
++
++pub const FILENAME_MAX: ::c_uint = 4096;
++pub const L_tmpnam: ::c_uint = 20;
++pub const _PC_LINK_MAX: ::c_int = 0;
++pub const _PC_MAX_CANON: ::c_int = 1;
++pub const _PC_MAX_INPUT: ::c_int = 2;
++pub const _PC_NAME_MAX: ::c_int = 3;
++pub const _PC_PATH_MAX: ::c_int = 4;
++pub const _PC_PIPE_BUF: ::c_int = 5;
++pub const _PC_CHOWN_RESTRICTED: ::c_int = 6;
++pub const _PC_NO_TRUNC: ::c_int = 7;
++pub const _PC_VDISABLE: ::c_int = 8;
++pub const _PC_SYNC_IO: ::c_int = 9;
++pub const _PC_ASYNC_IO: ::c_int = 10;
++pub const _PC_PRIO_IO: ::c_int = 11;
++pub const _PC_SOCK_MAXBUF: ::c_int = 12;
++pub const _PC_FILESIZEBITS: ::c_int = 13;
++pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14;
++pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15;
++pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16;
++pub const _PC_REC_XFER_ALIGN: ::c_int = 17;
++pub const _PC_ALLOC_SIZE_MIN: ::c_int = 18;
++pub const _PC_SYMLINK_MAX: ::c_int = 19;
++pub const _PC_2_SYMLINKS: ::c_int = 20;
++
++pub const _SC_ARG_MAX: ::c_int = 0;
++pub const _SC_CHILD_MAX: ::c_int = 1;
++pub const _SC_CLK_TCK: ::c_int = 2;
++pub const _SC_NGROUPS_MAX: ::c_int = 3;
++pub const _SC_OPEN_MAX: ::c_int = 4;
++pub const _SC_STREAM_MAX: ::c_int = 5;
++pub const _SC_TZNAME_MAX: ::c_int = 6;
++pub const _SC_JOB_CONTROL: ::c_int = 7;
++pub const _SC_SAVED_IDS: ::c_int = 8;
++pub const _SC_REALTIME_SIGNALS: ::c_int = 9;
++pub const _SC_PRIORITY_SCHEDULING: ::c_int = 10;
++pub const _SC_TIMERS: ::c_int = 11;
++pub const _SC_ASYNCHRONOUS_IO: ::c_int = 12;
++pub const _SC_PRIORITIZED_IO: ::c_int = 13;
++pub const _SC_SYNCHRONIZED_IO: ::c_int = 14;
++pub const _SC_FSYNC: ::c_int = 15;
++pub const _SC_MAPPED_FILES: ::c_int = 16;
++pub const _SC_MEMLOCK: ::c_int = 17;
++pub const _SC_MEMLOCK_RANGE: ::c_int = 18;
++pub const _SC_MEMORY_PROTECTION: ::c_int = 19;
++pub const _SC_MESSAGE_PASSING: ::c_int = 20;
++pub const _SC_SEMAPHORES: ::c_int = 21;
++pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 22;
++pub const _SC_AIO_LISTIO_MAX: ::c_int = 23;
++pub const _SC_AIO_MAX: ::c_int = 24;
++pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 25;
++pub const _SC_DELAYTIMER_MAX: ::c_int = 26;
++pub const _SC_MQ_OPEN_MAX: ::c_int = 27;
++pub const _SC_MQ_PRIO_MAX: ::c_int = 28;
++pub const _SC_VERSION: ::c_int = 29;
++pub const _SC_PAGESIZE: ::c_int = 30;
++pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
++pub const _SC_RTSIG_MAX: ::c_int = 31;
++pub const _SC_SEM_NSEMS_MAX: ::c_int = 32;
++pub const _SC_SEM_VALUE_MAX: ::c_int = 33;
++pub const _SC_SIGQUEUE_MAX: ::c_int = 34;
++pub const _SC_TIMER_MAX: ::c_int = 35;
++pub const _SC_BC_BASE_MAX: ::c_int = 36;
++pub const _SC_BC_DIM_MAX: ::c_int = 37;
++pub const _SC_BC_SCALE_MAX: ::c_int = 38;
++pub const _SC_BC_STRING_MAX: ::c_int = 39;
++pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 40;
++pub const _SC_EXPR_NEST_MAX: ::c_int = 42;
++pub const _SC_LINE_MAX: ::c_int = 43;
++pub const _SC_RE_DUP_MAX: ::c_int = 44;
++pub const _SC_2_VERSION: ::c_int = 46;
++pub const _SC_2_C_BIND: ::c_int = 47;
++pub const _SC_2_C_DEV: ::c_int = 48;
++pub const _SC_2_FORT_DEV: ::c_int = 49;
++pub const _SC_2_FORT_RUN: ::c_int = 50;
++pub const _SC_2_SW_DEV: ::c_int = 51;
++pub const _SC_2_LOCALEDEF: ::c_int = 52;
++pub const _SC_UIO_MAXIOV: ::c_int = 60;
++pub const _SC_IOV_MAX: ::c_int = 60;
++pub const _SC_THREADS: ::c_int = 67;
++pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68;
++pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69;
++pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70;
++pub const _SC_LOGIN_NAME_MAX: ::c_int = 71;
++pub const _SC_TTY_NAME_MAX: ::c_int = 72;
++pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73;
++pub const _SC_THREAD_KEYS_MAX: ::c_int = 74;
++pub const _SC_THREAD_STACK_MIN: ::c_int = 75;
++pub const _SC_THREAD_THREADS_MAX: ::c_int = 76;
++pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77;
++pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78;
++pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79;
++pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80;
++pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81;
++pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 82;
++pub const _SC_NPROCESSORS_CONF: ::c_int = 83;
++pub const _SC_NPROCESSORS_ONLN: ::c_int = 84;
++pub const _SC_PHYS_PAGES: ::c_int = 85;
++pub const _SC_AVPHYS_PAGES: ::c_int = 86;
++pub const _SC_ATEXIT_MAX: ::c_int = 87;
++pub const _SC_PASS_MAX: ::c_int = 88;
++pub const _SC_XOPEN_VERSION: ::c_int = 89;
++pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90;
++pub const _SC_XOPEN_UNIX: ::c_int = 91;
++pub const _SC_XOPEN_CRYPT: ::c_int = 92;
++pub const _SC_XOPEN_ENH_I18N: ::c_int = 93;
++pub const _SC_XOPEN_SHM: ::c_int = 94;
++pub const _SC_2_CHAR_TERM: ::c_int = 95;
++pub const _SC_2_UPE: ::c_int = 97;
++pub const _SC_XOPEN_XPG2: ::c_int = 98;
++pub const _SC_XOPEN_XPG3: ::c_int = 99;
++pub const _SC_XOPEN_XPG4: ::c_int = 100;
++pub const _SC_NZERO: ::c_int = 109;
++pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125;
++pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126;
++pub const _SC_XBS5_LP64_OFF64: ::c_int = 127;
++pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128;
++pub const _SC_XOPEN_LEGACY: ::c_int = 129;
++pub const _SC_XOPEN_REALTIME: ::c_int = 130;
++pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131;
++pub const _SC_ADVISORY_INFO: ::c_int = 132;
++pub const _SC_BARRIERS: ::c_int = 133;
++pub const _SC_CLOCK_SELECTION: ::c_int = 137;
++pub const _SC_CPUTIME: ::c_int = 138;
++pub const _SC_THREAD_CPUTIME: ::c_int = 139;
++pub const _SC_MONOTONIC_CLOCK: ::c_int = 149;
++pub const _SC_READER_WRITER_LOCKS: ::c_int = 153;
++pub const _SC_SPIN_LOCKS: ::c_int = 154;
++pub const _SC_REGEXP: ::c_int = 155;
++pub const _SC_SHELL: ::c_int = 157;
++pub const _SC_SPAWN: ::c_int = 159;
++pub const _SC_SPORADIC_SERVER: ::c_int = 160;
++pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 161;
++pub const _SC_TIMEOUTS: ::c_int = 164;
++pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 165;
++pub const _SC_2_PBS: ::c_int = 168;
++pub const _SC_2_PBS_ACCOUNTING: ::c_int = 169;
++pub const _SC_2_PBS_LOCATE: ::c_int = 170;
++pub const _SC_2_PBS_MESSAGE: ::c_int = 171;
++pub const _SC_2_PBS_TRACK: ::c_int = 172;
++pub const _SC_SYMLOOP_MAX: ::c_int = 173;
++pub const _SC_STREAMS: ::c_int = 174;
++pub const _SC_2_PBS_CHECKPOINT: ::c_int = 175;
++pub const _SC_V6_ILP32_OFF32: ::c_int = 176;
++pub const _SC_V6_ILP32_OFFBIG: ::c_int = 177;
++pub const _SC_V6_LP64_OFF64: ::c_int = 178;
++pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 179;
++pub const _SC_HOST_NAME_MAX: ::c_int = 180;
++pub const _SC_TRACE: ::c_int = 181;
++pub const _SC_TRACE_EVENT_FILTER: ::c_int = 182;
++pub const _SC_TRACE_INHERIT: ::c_int = 183;
++pub const _SC_TRACE_LOG: ::c_int = 184;
++pub const _SC_IPV6: ::c_int = 235;
++pub const _SC_RAW_SOCKETS: ::c_int = 236;
++pub const _SC_V7_ILP32_OFF32: ::c_int = 237;
++pub const _SC_V7_ILP32_OFFBIG: ::c_int = 238;
++pub const _SC_V7_LP64_OFF64: ::c_int = 239;
++pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 240;
++pub const _SC_SS_REPL_MAX: ::c_int = 241;
++pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 242;
++pub const _SC_TRACE_NAME_MAX: ::c_int = 243;
++pub const _SC_TRACE_SYS_MAX: ::c_int = 244;
++pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 245;
++pub const _SC_XOPEN_STREAMS: ::c_int = 246;
++pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 247;
++pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 248;
++
++pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY;
++pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY;
++
++pub const GLOB_ERR: ::c_int = 1 << 0;
++pub const GLOB_MARK: ::c_int = 1 << 1;
++pub const GLOB_NOSORT: ::c_int = 1 << 2;
++pub const GLOB_DOOFFS: ::c_int = 1 << 3;
++pub const GLOB_NOCHECK: ::c_int = 1 << 4;
++pub const GLOB_APPEND: ::c_int = 1 << 5;
++pub const GLOB_NOESCAPE: ::c_int = 1 << 6;
++
++pub const GLOB_NOSPACE: ::c_int = 1;
++pub const GLOB_ABORTED: ::c_int = 2;
++pub const GLOB_NOMATCH: ::c_int = 3;
++
++pub const POSIX_MADV_NORMAL: ::c_int = 0;
++pub const POSIX_MADV_RANDOM: ::c_int = 1;
++pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
++pub const POSIX_MADV_WILLNEED: ::c_int = 3;
++
++pub const S_IEXEC: mode_t = 64;
++pub const S_IWRITE: mode_t = 128;
++pub const S_IREAD: mode_t = 256;
++
++pub const F_LOCK: ::c_int = 1;
++pub const F_TEST: ::c_int = 3;
++pub const F_TLOCK: ::c_int = 2;
++pub const F_ULOCK: ::c_int = 0;
++
++pub const ST_RDONLY: ::c_ulong = 1;
++pub const ST_NOSUID: ::c_ulong = 2;
++pub const ST_NODEV: ::c_ulong = 4;
++pub const ST_NOEXEC: ::c_ulong = 8;
++pub const ST_SYNCHRONOUS: ::c_ulong = 16;
++pub const ST_MANDLOCK: ::c_ulong = 64;
++pub const ST_WRITE: ::c_ulong = 128;
++pub const ST_APPEND: ::c_ulong = 256;
++pub const ST_IMMUTABLE: ::c_ulong = 512;
++pub const ST_NOATIME: ::c_ulong = 1024;
++pub const ST_NODIRATIME: ::c_ulong = 2048;
++
++pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void;
++pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void;
++pub const RTLD_NODELETE: ::c_int = 0x1000;
++pub const RTLD_NOW: ::c_int = 0x2;
++
++pub const TCP_MD5SIG: ::c_int = 14;
++
++pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
++    __align: [],
++    size: [0; __SIZEOF_PTHREAD_MUTEX_T],
++};
++pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
++    __align: [],
++    size: [0; __SIZEOF_PTHREAD_COND_T],
++};
++pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
++    __align: [],
++    size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
++};
++pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
++pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
++pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
++pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
++pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0;
++pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
++pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
++
++pub const SCHED_OTHER: ::c_int = 0;
++pub const SCHED_FIFO: ::c_int = 1;
++pub const SCHED_RR: ::c_int = 2;
++pub const SCHED_BATCH: ::c_int = 3;
++pub const SCHED_IDLE: ::c_int = 5;
++
++pub const AF_IB: ::c_int = 27;
++pub const AF_MPLS: ::c_int = 28;
++pub const AF_NFC: ::c_int = 39;
++pub const AF_VSOCK: ::c_int = 40;
++#[doc(hidden)]
++pub const AF_MAX: ::c_int = 42;
++pub const PF_IB: ::c_int = AF_IB;
++pub const PF_MPLS: ::c_int = AF_MPLS;
++pub const PF_NFC: ::c_int = AF_NFC;
++pub const PF_VSOCK: ::c_int = AF_VSOCK;
++#[doc(hidden)]
++pub const PF_MAX: ::c_int = AF_MAX;
++
++// System V IPC
++pub const IPC_PRIVATE: ::key_t = 0;
++
++pub const IPC_CREAT: ::c_int = 0o1000;
++pub const IPC_EXCL: ::c_int = 0o2000;
++pub const IPC_NOWAIT: ::c_int = 0o4000;
++
++pub const IPC_RMID: ::c_int = 0;
++pub const IPC_SET: ::c_int = 1;
++pub const IPC_STAT: ::c_int = 2;
++pub const IPC_INFO: ::c_int = 3;
++pub const MSG_STAT: ::c_int = 11;
++pub const MSG_INFO: ::c_int = 12;
++
++pub const MSG_NOERROR: ::c_int = 0o10000;
++pub const MSG_EXCEPT: ::c_int = 0o20000;
++pub const MSG_COPY: ::c_int = 0o40000;
++
++pub const SHM_R: ::c_int = 0o400;
++pub const SHM_W: ::c_int = 0o200;
++
++pub const SHM_RDONLY: ::c_int = 0o10000;
++pub const SHM_RND: ::c_int = 0o20000;
++pub const SHM_REMAP: ::c_int = 0o40000;
++pub const SHM_EXEC: ::c_int = 0o100000;
++
++pub const SHM_LOCK: ::c_int = 11;
++pub const SHM_UNLOCK: ::c_int = 12;
++
++pub const SHM_HUGETLB: ::c_int = 0o4000;
++pub const SHM_NORESERVE: ::c_int = 0o10000;
++
++pub const EPOLLRDHUP: ::c_int = 0x2000;
++pub const EPOLLEXCLUSIVE: ::c_int = 0x10000000;
++pub const EPOLLONESHOT: ::c_int = 0x40000000;
++
++pub const QFMT_VFS_OLD: ::c_int = 1;
++pub const QFMT_VFS_V0: ::c_int = 2;
++
++pub const EFD_SEMAPHORE: ::c_int = 0x1;
++
++pub const LOG_NFACILITIES: ::c_int = 24;
++
++pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t;
++
++pub const RB_AUTOBOOT: ::c_int = 0x01234567u32 as i32;
++pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123u32 as i32;
++pub const RB_ENABLE_CAD: ::c_int = 0x89abcdefu32 as i32;
++pub const RB_DISABLE_CAD: ::c_int = 0x00000000u32 as i32;
++pub const RB_POWER_OFF: ::c_int = 0x4321fedcu32 as i32;
++pub const RB_SW_SUSPEND: ::c_int = 0xd000fce2u32 as i32;
++pub const RB_KEXEC: ::c_int = 0x45584543u32 as i32;
++
++pub const AI_PASSIVE: ::c_int = 0x0001;
++pub const AI_CANONNAME: ::c_int = 0x0002;
++pub const AI_NUMERICHOST: ::c_int = 0x0004;
++pub const AI_V4MAPPED: ::c_int = 0x0008;
++pub const AI_ALL: ::c_int = 0x0010;
++pub const AI_ADDRCONFIG: ::c_int = 0x0020;
++
++pub const AI_NUMERICSERV: ::c_int = 0x0400;
++
++pub const EAI_BADFLAGS: ::c_int = -1;
++pub const EAI_NONAME: ::c_int = -2;
++pub const EAI_AGAIN: ::c_int = -3;
++pub const EAI_FAIL: ::c_int = -4;
++pub const EAI_FAMILY: ::c_int = -6;
++pub const EAI_SOCKTYPE: ::c_int = -7;
++pub const EAI_SERVICE: ::c_int = -8;
++pub const EAI_MEMORY: ::c_int = -10;
++pub const EAI_OVERFLOW: ::c_int = -12;
++
++pub const NI_NUMERICHOST: ::c_int = 1;
++pub const NI_NUMERICSERV: ::c_int = 2;
++pub const NI_NOFQDN: ::c_int = 4;
++pub const NI_NAMEREQD: ::c_int = 8;
++pub const NI_DGRAM: ::c_int = 16;
++
++pub const SYNC_FILE_RANGE_WAIT_BEFORE: ::c_uint = 1;
++pub const SYNC_FILE_RANGE_WRITE: ::c_uint = 2;
++pub const SYNC_FILE_RANGE_WAIT_AFTER: ::c_uint = 4;
++
++pub const EAI_SYSTEM: ::c_int = -11;
++
++pub const AIO_CANCELED: ::c_int = 0;
++pub const AIO_NOTCANCELED: ::c_int = 1;
++pub const AIO_ALLDONE: ::c_int = 2;
++pub const LIO_READ: ::c_int = 0;
++pub const LIO_WRITE: ::c_int = 1;
++pub const LIO_NOP: ::c_int = 2;
++pub const LIO_WAIT: ::c_int = 0;
++pub const LIO_NOWAIT: ::c_int = 1;
++
++pub const MREMAP_MAYMOVE: ::c_int = 1;
++pub const MREMAP_FIXED: ::c_int = 2;
++
++pub const PR_SET_PDEATHSIG: ::c_int = 1;
++pub const PR_GET_PDEATHSIG: ::c_int = 2;
++
++pub const PR_GET_DUMPABLE: ::c_int = 3;
++pub const PR_SET_DUMPABLE: ::c_int = 4;
++
++pub const PR_GET_UNALIGN: ::c_int = 5;
++pub const PR_SET_UNALIGN: ::c_int = 6;
++pub const PR_UNALIGN_NOPRINT: ::c_int = 1;
++pub const PR_UNALIGN_SIGBUS: ::c_int = 2;
++
++pub const PR_GET_KEEPCAPS: ::c_int = 7;
++pub const PR_SET_KEEPCAPS: ::c_int = 8;
++
++pub const PR_GET_FPEMU: ::c_int = 9;
++pub const PR_SET_FPEMU: ::c_int = 10;
++pub const PR_FPEMU_NOPRINT: ::c_int = 1;
++pub const PR_FPEMU_SIGFPE: ::c_int = 2;
++
++pub const PR_GET_FPEXC: ::c_int = 11;
++pub const PR_SET_FPEXC: ::c_int = 12;
++pub const PR_FP_EXC_SW_ENABLE: ::c_int = 0x80;
++pub const PR_FP_EXC_DIV: ::c_int = 0x010000;
++pub const PR_FP_EXC_OVF: ::c_int = 0x020000;
++pub const PR_FP_EXC_UND: ::c_int = 0x040000;
++pub const PR_FP_EXC_RES: ::c_int = 0x080000;
++pub const PR_FP_EXC_INV: ::c_int = 0x100000;
++pub const PR_FP_EXC_DISABLED: ::c_int = 0;
++pub const PR_FP_EXC_NONRECOV: ::c_int = 1;
++pub const PR_FP_EXC_ASYNC: ::c_int = 2;
++pub const PR_FP_EXC_PRECISE: ::c_int = 3;
++
++pub const PR_GET_TIMING: ::c_int = 13;
++pub const PR_SET_TIMING: ::c_int = 14;
++pub const PR_TIMING_STATISTICAL: ::c_int = 0;
++pub const PR_TIMING_TIMESTAMP: ::c_int = 1;
++
++pub const PR_SET_NAME: ::c_int = 15;
++pub const PR_GET_NAME: ::c_int = 16;
++
++pub const PR_GET_ENDIAN: ::c_int = 19;
++pub const PR_SET_ENDIAN: ::c_int = 20;
++pub const PR_ENDIAN_BIG: ::c_int = 0;
++pub const PR_ENDIAN_LITTLE: ::c_int = 1;
++pub const PR_ENDIAN_PPC_LITTLE: ::c_int = 2;
++
++pub const PR_GET_SECCOMP: ::c_int = 21;
++pub const PR_SET_SECCOMP: ::c_int = 22;
++
++pub const PR_CAPBSET_READ: ::c_int = 23;
++pub const PR_CAPBSET_DROP: ::c_int = 24;
++
++pub const PR_GET_TSC: ::c_int = 25;
++pub const PR_SET_TSC: ::c_int = 26;
++pub const PR_TSC_ENABLE: ::c_int = 1;
++pub const PR_TSC_SIGSEGV: ::c_int = 2;
++
++pub const PR_GET_SECUREBITS: ::c_int = 27;
++pub const PR_SET_SECUREBITS: ::c_int = 28;
++
++pub const PR_SET_TIMERSLACK: ::c_int = 29;
++pub const PR_GET_TIMERSLACK: ::c_int = 30;
++
++pub const PR_TASK_PERF_EVENTS_DISABLE: ::c_int = 31;
++pub const PR_TASK_PERF_EVENTS_ENABLE: ::c_int = 32;
++
++pub const PR_MCE_KILL: ::c_int = 33;
++pub const PR_MCE_KILL_CLEAR: ::c_int = 0;
++pub const PR_MCE_KILL_SET: ::c_int = 1;
++
++pub const PR_MCE_KILL_LATE: ::c_int = 0;
++pub const PR_MCE_KILL_EARLY: ::c_int = 1;
++pub const PR_MCE_KILL_DEFAULT: ::c_int = 2;
++
++pub const PR_MCE_KILL_GET: ::c_int = 34;
++
++pub const PR_SET_MM: ::c_int = 35;
++pub const PR_SET_MM_START_CODE: ::c_int = 1;
++pub const PR_SET_MM_END_CODE: ::c_int = 2;
++pub const PR_SET_MM_START_DATA: ::c_int = 3;
++pub const PR_SET_MM_END_DATA: ::c_int = 4;
++pub const PR_SET_MM_START_STACK: ::c_int = 5;
++pub const PR_SET_MM_START_BRK: ::c_int = 6;
++pub const PR_SET_MM_BRK: ::c_int = 7;
++pub const PR_SET_MM_ARG_START: ::c_int = 8;
++pub const PR_SET_MM_ARG_END: ::c_int = 9;
++pub const PR_SET_MM_ENV_START: ::c_int = 10;
++pub const PR_SET_MM_ENV_END: ::c_int = 11;
++pub const PR_SET_MM_AUXV: ::c_int = 12;
++pub const PR_SET_MM_EXE_FILE: ::c_int = 13;
++pub const PR_SET_MM_MAP: ::c_int = 14;
++pub const PR_SET_MM_MAP_SIZE: ::c_int = 15;
++
++pub const PR_SET_PTRACER: ::c_int = 0x59616d61;
++
++pub const PR_SET_CHILD_SUBREAPER: ::c_int = 36;
++pub const PR_GET_CHILD_SUBREAPER: ::c_int = 37;
++
++pub const PR_SET_NO_NEW_PRIVS: ::c_int = 38;
++pub const PR_GET_NO_NEW_PRIVS: ::c_int = 39;
++
++pub const PR_GET_TID_ADDRESS: ::c_int = 40;
++
++pub const PR_SET_THP_DISABLE: ::c_int = 41;
++pub const PR_GET_THP_DISABLE: ::c_int = 42;
++
++pub const PR_MPX_ENABLE_MANAGEMENT: ::c_int = 43;
++pub const PR_MPX_DISABLE_MANAGEMENT: ::c_int = 44;
++
++pub const PR_SET_FP_MODE: ::c_int = 45;
++pub const PR_GET_FP_MODE: ::c_int = 46;
++pub const PR_FP_MODE_FR: ::c_int = 1 << 0;
++pub const PR_FP_MODE_FRE: ::c_int = 1 << 1;
++
++pub const PR_CAP_AMBIENT: ::c_int = 47;
++pub const PR_CAP_AMBIENT_IS_SET: ::c_int = 1;
++pub const PR_CAP_AMBIENT_RAISE: ::c_int = 2;
++pub const PR_CAP_AMBIENT_LOWER: ::c_int = 3;
++pub const PR_CAP_AMBIENT_CLEAR_ALL: ::c_int = 4;
++
++pub const ITIMER_REAL: ::c_int = 0;
++pub const ITIMER_VIRTUAL: ::c_int = 1;
++pub const ITIMER_PROF: ::c_int = 2;
++
++pub const XATTR_CREATE: ::c_int = 0x1;
++pub const XATTR_REPLACE: ::c_int = 0x2;
++
++pub const _POSIX_VDISABLE: ::cc_t = 0;
++
++pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
++pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
++pub const FALLOC_FL_COLLAPSE_RANGE: ::c_int = 0x08;
++pub const FALLOC_FL_ZERO_RANGE: ::c_int = 0x10;
++pub const FALLOC_FL_INSERT_RANGE: ::c_int = 0x20;
++pub const FALLOC_FL_UNSHARE_RANGE: ::c_int = 0x40;
++
++// On Linux, libc doesn't define this constant, libattr does instead.
++// We still define it for Linux as it's defined by libc on other platforms,
++// and it's mentioned in the man pages for getxattr and setxattr.
++pub const ENOATTR: ::c_int = ::ENODATA;
++
++f! {
++    pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
++        for slot in cpuset.bits.iter_mut() {
++            *slot = 0;
++        }
++    }
++
++    pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () {
++        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
++        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
++        cpuset.bits[idx] |= 1 << offset;
++        ()
++    }
++
++    pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () {
++        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
++        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
++        cpuset.bits[idx] &= !(1 << offset);
++        ()
++    }
++
++    pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool {
++        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]);
++        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
++        0 != (cpuset.bits[idx] & (1 << offset))
++    }
++
++    pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
++        set1.bits == set2.bits
++    }
++
++    pub fn major(dev: ::dev_t) -> ::c_uint {
++        let mut major = 0;
++        major |= (dev & 0x00000000000fff00) >> 8;
++        major |= (dev & 0xfffff00000000000) >> 32;
++        major as ::c_uint
++    }
++
++    pub fn minor(dev: ::dev_t) -> ::c_uint {
++        let mut minor = 0;
++        minor |= (dev & 0xfffff00000000000) >> 0;
++        minor |= (dev & 0x00000ffffff00000) >> 12;
++        minor as ::c_uint
++    }
++
++    pub fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t {
++        let major = major as ::dev_t;
++        let minor = minor as ::dev_t;
++        let mut dev = 0;
++        dev |= (major & 0x00000fff) << 8;
++        dev |= (major & 0xfffff000) << 32;
++        dev |= (minor & 0x000000ff) << 0;
++        dev |= (minor & 0xffffff00) << 12;
++        dev
++    }
++}
++
++extern {
++    pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
++    pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
++    pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
++    pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
++    pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
++    pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
++                       timeout: *const ::timespec) -> ::c_int;
++    pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
++    pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
++                      nitems: ::c_int, sevp: *mut ::sigevent) -> ::c_int;
++
++    pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
++
++    pub fn setpwent();
++    pub fn getpwent() -> *mut passwd;
++    pub fn setspent();
++    pub fn endspent();
++    pub fn getspent() -> *mut spwd;
++    pub fn getspnam(__name: *const ::c_char) -> *mut spwd;
++
++    pub fn shm_open(name: *const c_char, oflag: ::c_int,
++                    mode: mode_t) -> ::c_int;
++
++    // System V IPC
++    pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int;
++    pub fn shmat(shmid: ::c_int,
++                 shmaddr: *const ::c_void,
++                 shmflg: ::c_int) -> *mut ::c_void;
++    pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int;
++    pub fn shmctl(shmid: ::c_int,
++                  cmd: ::c_int,
++                  buf: *mut ::shmid_ds) -> ::c_int;
++    pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t;
++    pub fn semget(key: ::key_t, nsems: ::c_int, semflag: ::c_int) -> ::c_int;
++    pub fn semop(semid: ::c_int,
++                 sops: *mut ::sembuf, nsops: ::size_t) -> ::c_int;
++    pub fn semctl(semid: ::c_int,
++                  semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int;
++    pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut msqid_ds) -> ::c_int;
++    pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int;
++    pub fn msgrcv(msqid: ::c_int, msgp: *mut ::c_void, msgsz: ::size_t,
++                  msgtyp: ::c_long, msgflg: ::c_int) -> ::ssize_t;
++    pub fn msgsnd(msqid: ::c_int, msgp: *const ::c_void, msgsz: ::size_t,
++                  msgflg: ::c_int) -> ::c_int;
++
++    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
++                    -> ::c_int;
++    pub fn __errno_location() -> *mut ::c_int;
++
++    pub fn fopen64(filename: *const c_char,
++                   mode: *const c_char) -> *mut ::FILE;
++    pub fn freopen64(filename: *const c_char, mode: *const c_char,
++                     file: *mut ::FILE) -> *mut ::FILE;
++    pub fn tmpfile64() -> *mut ::FILE;
++    pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int;
++    pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int;
++    pub fn fseeko64(stream: *mut ::FILE,
++                    offset: ::off64_t,
++                    whence: ::c_int) -> ::c_int;
++    pub fn ftello64(stream: *mut ::FILE) -> ::off64_t;
++    pub fn fallocate(fd: ::c_int, mode: ::c_int,
++                     offset: ::off_t, len: ::off_t) -> ::c_int;
++    pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
++                           len: ::off_t) -> ::c_int;
++    pub fn readahead(fd: ::c_int, offset: ::off64_t,
++                     count: ::size_t) -> ::ssize_t;
++    pub fn getxattr(path: *const c_char, name: *const c_char,
++                    value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
++    pub fn lgetxattr(path: *const c_char, name: *const c_char,
++                     value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
++    pub fn fgetxattr(filedes: ::c_int, name: *const c_char,
++                     value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
++    pub fn setxattr(path: *const c_char, name: *const c_char,
++                    value: *const ::c_void, size: ::size_t,
++                    flags: ::c_int) -> ::c_int;
++    pub fn lsetxattr(path: *const c_char, name: *const c_char,
++                     value: *const ::c_void, size: ::size_t,
++                     flags: ::c_int) -> ::c_int;
++    pub fn fsetxattr(filedes: ::c_int, name: *const c_char,
++                     value: *const ::c_void, size: ::size_t,
++                     flags: ::c_int) -> ::c_int;
++    pub fn listxattr(path: *const c_char, list: *mut c_char,
++                     size: ::size_t) -> ::ssize_t;
++    pub fn llistxattr(path: *const c_char, list: *mut c_char,
++                      size: ::size_t) -> ::ssize_t;
++    pub fn flistxattr(filedes: ::c_int, list: *mut c_char,
++                      size: ::size_t) -> ::ssize_t;
++    pub fn removexattr(path: *const c_char, name: *const c_char) -> ::c_int;
++    pub fn lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int;
++    pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int;
++    pub fn signalfd(fd: ::c_int,
++                    mask: *const ::sigset_t,
++                    flags: ::c_int) -> ::c_int;
++    pub fn pwritev(fd: ::c_int,
++                   iov: *const ::iovec,
++                   iovcnt: ::c_int,
++                   offset: ::off_t) -> ::ssize_t;
++    pub fn preadv(fd: ::c_int,
++                  iov: *const ::iovec,
++                  iovcnt: ::c_int,
++                  offset: ::off_t) -> ::ssize_t;
++    pub fn quotactl(cmd: ::c_int,
++                    special: *const ::c_char,
++                    id: ::c_int,
++                    data: *mut ::c_char) -> ::c_int;
++    pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t;
++    pub fn mq_close(mqd: ::mqd_t) -> ::c_int;
++    pub fn mq_unlink(name: *const ::c_char) -> ::c_int;
++    pub fn mq_receive(mqd: ::mqd_t,
++                      msg_ptr: *mut ::c_char,
++                      msg_len: ::size_t,
++                      msq_prio: *mut ::c_uint) -> ::ssize_t;
++    pub fn mq_send(mqd: ::mqd_t,
++                   msg_ptr: *const ::c_char,
++                   msg_len: ::size_t,
++                   msq_prio: ::c_uint) -> ::c_int;
++    pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int;
++    pub fn mq_setattr(mqd: ::mqd_t,
++                      newattr: *const ::mq_attr,
++                      oldattr: *mut ::mq_attr) -> ::c_int;
++    pub fn epoll_pwait(epfd: ::c_int,
++                       events: *mut ::epoll_event,
++                       maxevents: ::c_int,
++                       timeout: ::c_int,
++                       sigmask: *const ::sigset_t) -> ::c_int;
++    pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int;
++    pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
++    pub fn mkostemps(template: *mut ::c_char,
++                     suffixlen: ::c_int,
++                     flags: ::c_int) -> ::c_int;
++    pub fn sigtimedwait(set: *const sigset_t,
++                        info: *mut siginfo_t,
++                        timeout: *const ::timespec) -> ::c_int;
++    pub fn sigwaitinfo(set: *const sigset_t,
++                       info: *mut siginfo_t) -> ::c_int;
++    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
++    pub fn getnameinfo(sa: *const ::sockaddr,
++                       salen: ::socklen_t,
++                       host: *mut ::c_char,
++                       hostlen: ::socklen_t,
++                       serv: *mut ::c_char,
++                       sevlen: ::socklen_t,
++                       flags: ::c_int) -> ::c_int;
++    pub fn pthread_setschedprio(native: ::pthread_t,
++                                priority: ::c_int) -> ::c_int;
++    pub fn prlimit(pid: ::pid_t, resource: ::c_int, new_limit: *const ::rlimit,
++                   old_limit: *mut ::rlimit) -> ::c_int;
++    pub fn prlimit64(pid: ::pid_t,
++                     resource: ::c_int,
++                     new_limit: *const ::rlimit64,
++                     old_limit: *mut ::rlimit64) -> ::c_int;
++    pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
++    pub fn process_vm_readv(pid: ::pid_t,
++                            local_iov: *const ::iovec,
++                            liovcnt: ::c_ulong,
++                            remote_iov: *const ::iovec,
++                            riovcnt: ::c_ulong,
++                            flags: ::c_ulong) -> isize;
++    pub fn process_vm_writev(pid: ::pid_t,
++                             local_iov: *const ::iovec,
++                             liovcnt: ::c_ulong,
++                             remote_iov: *const ::iovec,
++                             riovcnt: ::c_ulong,
++                             flags: ::c_ulong) -> isize;
++    pub fn reboot(how_to: ::c_int) -> ::c_int;
++    pub fn setfsgid(gid: ::gid_t) -> ::c_int;
++    pub fn setfsuid(uid: ::uid_t) -> ::c_int;
++
++    // Not available now on Android
++    pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
++                    mode: ::mode_t) -> ::c_int;
++    pub fn if_nameindex() -> *mut if_nameindex;
++    pub fn if_freenameindex(ptr: *mut if_nameindex);
++    pub fn sync_file_range(fd: ::c_int, offset: ::off64_t,
++                           nbytes: ::off64_t, flags: ::c_uint) -> ::c_int;
++    pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
++    pub fn freeifaddrs(ifa: *mut ::ifaddrs);
++
++    pub fn mremap(addr: *mut ::c_void,
++                  len: ::size_t,
++                  new_len: ::size_t,
++                  flags: ::c_int,
++                  ...) -> *mut ::c_void;
++
++    pub fn glob(pattern: *const c_char,
++                flags: ::c_int,
++                errfunc: Option<extern fn(epath: *const c_char,
++                                          errno: ::c_int) -> ::c_int>,
++                pglob: *mut ::glob_t) -> ::c_int;
++    pub fn globfree(pglob: *mut ::glob_t);
++
++    pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
++                         -> ::c_int;
++
++    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
++
++    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
++
++    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
++    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
++                  -> ::c_int;
++
++    pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
++
++    pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
++                    flags: ::c_int, addr: *mut ::sockaddr,
++                    addrlen: *mut ::socklen_t) -> ::ssize_t;
++    pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
++    pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int;
++    pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
++
++    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
++                address_len: ::socklen_t) -> ::c_int;
++
++    pub fn writev(fd: ::c_int,
++                  iov: *const ::iovec,
++                  iovcnt: ::c_int) -> ::ssize_t;
++    pub fn readv(fd: ::c_int,
++                 iov: *const ::iovec,
++                 iovcnt: ::c_int) -> ::ssize_t;
++
++    pub fn sendmsg(fd: ::c_int,
++                   msg: *const ::msghdr,
++                   flags: ::c_int) -> ::ssize_t;
++    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
++                   -> ::ssize_t;
++    pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
++    pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
++    pub fn vhangup() -> ::c_int;
++}
++
++extern {
++    pub fn sendmmsg(sockfd: ::c_int, msgvec: *mut mmsghdr, vlen: ::c_uint,
++                    flags: ::c_int) -> ::c_int;
++    pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut mmsghdr, vlen: ::c_uint,
++                    flags: ::c_int, timeout: *mut ::timespec) -> ::c_int;
++    pub fn sync();
++}
++
++cfg_if! {
++    if #[cfg(any(target_env = "musl",
++                 target_os = "fuchsia",
++                 target_os = "emscripten"))] {
++        mod musl;
++        pub use self::musl::*;
++    } else if #[cfg(any(target_arch = "mips",
++                        target_arch = "mips64"))] {
++        mod mips;
++        pub use self::mips::*;
++    } else if #[cfg(any(target_arch = "s390x"))] {
++        mod s390x;
++        pub use self::s390x::*;
++    } else {
++        mod other;
++        pub use self::other::*;
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9e7cab493a0af4c3613b7f7bc73a4b78c9a12025
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,359 @@@
++pub type c_char = u8;
++pub type wchar_t = u32;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        __st_dev_padding: ::c_int,
++        __st_ino_truncated: ::c_long,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __st_rdev_padding: ::c_int,
++        pub st_size: ::off_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_ino: ::ino_t,
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::dev_t,
++        __st_dev_padding: ::c_int,
++        __st_ino_truncated: ::c_long,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __st_rdev_padding: ::c_int,
++        pub st_size: ::off_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_ino: ::ino_t,
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_flags: ::c_int,
++        pub ss_size: ::size_t
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_segsz: ::size_t,
++        pub shm_atime: ::time_t,
++        __unused1: ::c_int,
++        pub shm_dtime: ::time_t,
++        __unused2: ::c_int,
++        pub shm_ctime: ::time_t,
++        __unused3: ::c_int,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::c_ulong,
++        __pad1: ::c_ulong,
++        __pad2: ::c_ulong,
++    }
++
++    pub struct msqid_ds {
++        pub msg_perm: ::ipc_perm,
++        pub msg_stime: ::time_t,
++        __unused1: ::c_int,
++        pub msg_rtime: ::time_t,
++        __unused2: ::c_int,
++        pub msg_ctime: ::time_t,
++        __unused3: ::c_int,
++        __msg_cbytes: ::c_ulong,
++        pub msg_qnum: ::msgqnum_t,
++        pub msg_qbytes: ::msglen_t,
++        pub msg_lspid: ::pid_t,
++        pub msg_lrpid: ::pid_t,
++        __pad1: ::c_ulong,
++        __pad2: ::c_ulong,
++    }
++
++    pub struct statfs {
++        pub f_type: ::c_ulong,
++        pub f_bsize: ::c_ulong,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_fsid: ::fsid_t,
++        pub f_namelen: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_flags: ::c_ulong,
++        pub f_spare: [::c_ulong; 4],
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_errno: ::c_int,
++        pub si_code: ::c_int,
++        pub _pad: [::c_int; 29],
++        _align: [usize; 0],
++    }
++}
++
++pub const O_DIRECT: ::c_int = 0x4000;
++pub const O_DIRECTORY: ::c_int = 0x10000;
++pub const O_NOFOLLOW: ::c_int = 0x20000;
++pub const O_ASYNC: ::c_int = 0x2000;
++pub const O_LARGEFILE: ::c_int = 0o400000;
++
++pub const FIOCLEX: ::c_int = 0x5451;
++pub const FIONBIO: ::c_int = 0x5421;
++
++pub const RLIMIT_RSS: ::c_int = 5;
++pub const RLIMIT_NOFILE: ::c_int = 7;
++pub const RLIMIT_AS: ::c_int = 9;
++pub const RLIMIT_NPROC: ::c_int = 6;
++pub const RLIMIT_MEMLOCK: ::c_int = 8;
++
++pub const O_APPEND: ::c_int = 1024;
++pub const O_CREAT: ::c_int = 64;
++pub const O_EXCL: ::c_int = 128;
++pub const O_NOCTTY: ::c_int = 256;
++pub const O_NONBLOCK: ::c_int = 2048;
++pub const O_SYNC: ::c_int = 1052672;
++pub const O_RSYNC: ::c_int = 1052672;
++pub const O_DSYNC: ::c_int = 4096;
++
++pub const SOCK_NONBLOCK: ::c_int = 2048;
++
++pub const MAP_ANON: ::c_int = 0x0020;
++pub const MAP_GROWSDOWN: ::c_int = 0x0100;
++pub const MAP_DENYWRITE: ::c_int = 0x0800;
++pub const MAP_EXECUTABLE: ::c_int = 0x01000;
++pub const MAP_LOCKED: ::c_int = 0x02000;
++pub const MAP_NORESERVE: ::c_int = 0x04000;
++pub const MAP_POPULATE: ::c_int = 0x08000;
++pub const MAP_NONBLOCK: ::c_int = 0x010000;
++pub const MAP_STACK: ::c_int = 0x020000;
++
++pub const SOCK_STREAM: ::c_int = 1;
++pub const SOCK_DGRAM: ::c_int = 2;
++pub const SOCK_SEQPACKET: ::c_int = 5;
++
++pub const SOL_SOCKET: ::c_int = 1;
++
++pub const EDEADLK: ::c_int = 35;
++pub const ENAMETOOLONG: ::c_int = 36;
++pub const ENOLCK: ::c_int = 37;
++pub const ENOSYS: ::c_int = 38;
++pub const ENOTEMPTY: ::c_int = 39;
++pub const ELOOP: ::c_int = 40;
++pub const ENOMSG: ::c_int = 42;
++pub const EIDRM: ::c_int = 43;
++pub const ECHRNG: ::c_int = 44;
++pub const EL2NSYNC: ::c_int = 45;
++pub const EL3HLT: ::c_int = 46;
++pub const EL3RST: ::c_int = 47;
++pub const ELNRNG: ::c_int = 48;
++pub const EUNATCH: ::c_int = 49;
++pub const ENOCSI: ::c_int = 50;
++pub const EL2HLT: ::c_int = 51;
++pub const EBADE: ::c_int = 52;
++pub const EBADR: ::c_int = 53;
++pub const EXFULL: ::c_int = 54;
++pub const ENOANO: ::c_int = 55;
++pub const EBADRQC: ::c_int = 56;
++pub const EBADSLT: ::c_int = 57;
++pub const EDEADLOCK: ::c_int = EDEADLK;
++pub const EMULTIHOP: ::c_int = 72;
++pub const EBADMSG: ::c_int = 74;
++pub const EOVERFLOW: ::c_int = 75;
++pub const ENOTUNIQ: ::c_int = 76;
++pub const EBADFD: ::c_int = 77;
++pub const EREMCHG: ::c_int = 78;
++pub const ELIBACC: ::c_int = 79;
++pub const ELIBBAD: ::c_int = 80;
++pub const ELIBSCN: ::c_int = 81;
++pub const ELIBMAX: ::c_int = 82;
++pub const ELIBEXEC: ::c_int = 83;
++pub const EILSEQ: ::c_int = 84;
++pub const ERESTART: ::c_int = 85;
++pub const ESTRPIPE: ::c_int = 86;
++pub const EUSERS: ::c_int = 87;
++pub const ENOTSOCK: ::c_int = 88;
++pub const EDESTADDRREQ: ::c_int = 89;
++pub const EMSGSIZE: ::c_int = 90;
++pub const EPROTOTYPE: ::c_int = 91;
++pub const ENOPROTOOPT: ::c_int = 92;
++pub const EPROTONOSUPPORT: ::c_int = 93;
++pub const ESOCKTNOSUPPORT: ::c_int = 94;
++pub const EOPNOTSUPP: ::c_int = 95;
++pub const ENOTSUP: ::c_int = EOPNOTSUPP;
++pub const EPFNOSUPPORT: ::c_int = 96;
++pub const EAFNOSUPPORT: ::c_int = 97;
++pub const EADDRINUSE: ::c_int = 98;
++pub const EADDRNOTAVAIL: ::c_int = 99;
++pub const ENETDOWN: ::c_int = 100;
++pub const ENETUNREACH: ::c_int = 101;
++pub const ENETRESET: ::c_int = 102;
++pub const ECONNABORTED: ::c_int = 103;
++pub const ECONNRESET: ::c_int = 104;
++pub const ENOBUFS: ::c_int = 105;
++pub const EISCONN: ::c_int = 106;
++pub const ENOTCONN: ::c_int = 107;
++pub const ESHUTDOWN: ::c_int = 108;
++pub const ETOOMANYREFS: ::c_int = 109;
++pub const ETIMEDOUT: ::c_int = 110;
++pub const ECONNREFUSED: ::c_int = 111;
++pub const EHOSTDOWN: ::c_int = 112;
++pub const EHOSTUNREACH: ::c_int = 113;
++pub const EALREADY: ::c_int = 114;
++pub const EINPROGRESS: ::c_int = 115;
++pub const ESTALE: ::c_int = 116;
++pub const EUCLEAN: ::c_int = 117;
++pub const ENOTNAM: ::c_int = 118;
++pub const ENAVAIL: ::c_int = 119;
++pub const EISNAM: ::c_int = 120;
++pub const EREMOTEIO: ::c_int = 121;
++pub const EDQUOT: ::c_int = 122;
++pub const ENOMEDIUM: ::c_int = 123;
++pub const EMEDIUMTYPE: ::c_int = 124;
++pub const ECANCELED: ::c_int = 125;
++pub const ENOKEY: ::c_int = 126;
++pub const EKEYEXPIRED: ::c_int = 127;
++pub const EKEYREVOKED: ::c_int = 128;
++pub const EKEYREJECTED: ::c_int = 129;
++pub const EOWNERDEAD: ::c_int = 130;
++pub const ENOTRECOVERABLE: ::c_int = 131;
++pub const ERFKILL: ::c_int = 132;
++pub const EHWPOISON: ::c_int = 133;
++
++pub const SO_REUSEADDR: ::c_int = 2;
++pub const SO_TYPE: ::c_int = 3;
++pub const SO_ERROR: ::c_int = 4;
++pub const SO_DONTROUTE: ::c_int = 5;
++pub const SO_BROADCAST: ::c_int = 6;
++pub const SO_SNDBUF: ::c_int = 7;
++pub const SO_RCVBUF: ::c_int = 8;
++pub const SO_KEEPALIVE: ::c_int = 9;
++pub const SO_OOBINLINE: ::c_int = 10;
++pub const SO_NO_CHECK: ::c_int = 11;
++pub const SO_PRIORITY: ::c_int = 12;
++pub const SO_LINGER: ::c_int = 13;
++pub const SO_BSDCOMPAT: ::c_int = 14;
++pub const SO_REUSEPORT: ::c_int = 15;
++pub const SO_PASSCRED: ::c_int = 16;
++pub const SO_PEERCRED: ::c_int = 17;
++pub const SO_RCVLOWAT: ::c_int = 18;
++pub const SO_SNDLOWAT: ::c_int = 19;
++pub const SO_RCVTIMEO: ::c_int = 20;
++pub const SO_SNDTIMEO: ::c_int = 21;
++pub const SO_ACCEPTCONN: ::c_int = 30;
++pub const SO_SNDBUFFORCE: ::c_int = 32;
++pub const SO_RCVBUFFORCE: ::c_int = 33;
++pub const SO_PROTOCOL: ::c_int = 38;
++pub const SO_DOMAIN: ::c_int = 39;
++
++pub const SA_ONSTACK: ::c_int = 0x08000000;
++pub const SA_SIGINFO: ::c_int = 0x00000004;
++pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
++
++pub const SIGCHLD: ::c_int = 17;
++pub const SIGBUS: ::c_int = 7;
++pub const SIGTTIN: ::c_int = 21;
++pub const SIGTTOU: ::c_int = 22;
++pub const SIGXCPU: ::c_int = 24;
++pub const SIGXFSZ: ::c_int = 25;
++pub const SIGVTALRM: ::c_int = 26;
++pub const SIGPROF: ::c_int = 27;
++pub const SIGWINCH: ::c_int = 28;
++pub const SIGUSR1: ::c_int = 10;
++pub const SIGUSR2: ::c_int = 12;
++pub const SIGCONT: ::c_int = 18;
++pub const SIGSTOP: ::c_int = 19;
++pub const SIGTSTP: ::c_int = 20;
++pub const SIGURG: ::c_int = 23;
++pub const SIGIO: ::c_int = 29;
++pub const SIGSYS: ::c_int = 31;
++pub const SIGSTKFLT: ::c_int = 16;
++pub const SIGPOLL: ::c_int = 29;
++pub const SIGPWR: ::c_int = 30;
++pub const SIG_SETMASK: ::c_int = 2;
++pub const SIG_BLOCK: ::c_int = 0x000000;
++pub const SIG_UNBLOCK: ::c_int = 0x01;
++
++pub const EXTPROC: ::tcflag_t = 0x00010000;
++
++pub const MAP_HUGETLB: ::c_int = 0x040000;
++
++pub const F_GETLK: ::c_int = 12;
++pub const F_GETOWN: ::c_int = 9;
++pub const F_SETLK: ::c_int = 13;
++pub const F_SETLKW: ::c_int = 14;
++pub const F_SETOWN: ::c_int = 8;
++
++pub const VEOF: usize = 4;
++pub const VEOL: usize = 11;
++pub const VEOL2: usize = 16;
++pub const VMIN: usize = 6;
++pub const IEXTEN: ::tcflag_t = 0x00008000;
++pub const TOSTOP: ::tcflag_t = 0x00000100;
++pub const FLUSHO: ::tcflag_t = 0x00001000;
++
++pub const TCGETS: ::c_int = 0x5401;
++pub const TCSETS: ::c_int = 0x5402;
++pub const TCSETSW: ::c_int = 0x5403;
++pub const TCSETSF: ::c_int = 0x5404;
++pub const TCGETA: ::c_int = 0x5405;
++pub const TCSETA: ::c_int = 0x5406;
++pub const TCSETAW: ::c_int = 0x5407;
++pub const TCSETAF: ::c_int = 0x5408;
++pub const TCSBRK: ::c_int = 0x5409;
++pub const TCXONC: ::c_int = 0x540A;
++pub const TCFLSH: ::c_int = 0x540B;
++pub const TIOCGSOFTCAR: ::c_int = 0x5419;
++pub const TIOCSSOFTCAR: ::c_int = 0x541A;
++pub const TIOCLINUX: ::c_int = 0x541C;
++pub const TIOCGSERIAL: ::c_int = 0x541E;
++pub const TIOCEXCL: ::c_int = 0x540C;
++pub const TIOCNXCL: ::c_int = 0x540D;
++pub const TIOCSCTTY: ::c_int = 0x540E;
++pub const TIOCGPGRP: ::c_int = 0x540F;
++pub const TIOCSPGRP: ::c_int = 0x5410;
++pub const TIOCOUTQ: ::c_int = 0x5411;
++pub const TIOCSTI: ::c_int = 0x5412;
++pub const TIOCGWINSZ: ::c_int = 0x5413;
++pub const TIOCSWINSZ: ::c_int = 0x5414;
++pub const TIOCMGET: ::c_int = 0x5415;
++pub const TIOCMBIS: ::c_int = 0x5416;
++pub const TIOCMBIC: ::c_int = 0x5417;
++pub const TIOCMSET: ::c_int = 0x5418;
++pub const FIONREAD: ::c_int = 0x541B;
++pub const TIOCCONS: ::c_int = 0x541D;
++
++pub const SYS_gettid: ::c_long = 224;
++pub const SYS_perf_event_open: ::c_long = 364;
++
++pub const POLLWRNORM: ::c_short = 0x100;
++pub const POLLWRBAND: ::c_short = 0x200;
++
++pub const TIOCM_LE: ::c_int = 0x001;
++pub const TIOCM_DTR: ::c_int = 0x002;
++pub const TIOCM_RTS: ::c_int = 0x004;
++pub const TIOCM_ST: ::c_int = 0x008;
++pub const TIOCM_SR: ::c_int = 0x010;
++pub const TIOCM_CTS: ::c_int = 0x020;
++pub const TIOCM_CAR: ::c_int = 0x040;
++pub const TIOCM_RNG: ::c_int = 0x080;
++pub const TIOCM_DSR: ::c_int = 0x100;
++pub const TIOCM_CD: ::c_int = TIOCM_CAR;
++pub const TIOCM_RI: ::c_int = TIOCM_RNG;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..70d73562d57ce7bad2fcdcbe3ab752ca119ba3f0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,348 @@@
++pub type c_char = u8;
++pub type wchar_t = u32;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        __st_dev_padding: ::c_int,
++        __st_ino_truncated: ::c_long,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __st_rdev_padding: ::c_int,
++        pub st_size: ::off_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_ino: ::ino_t,
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::dev_t,
++        __st_dev_padding: ::c_int,
++        __st_ino_truncated: ::c_long,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __st_rdev_padding: ::c_int,
++        pub st_size: ::off_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_ino: ::ino_t,
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_flags: ::c_int,
++        pub ss_size: ::size_t
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_segsz: ::size_t,
++        pub shm_atime: ::time_t,
++        __unused1: ::c_int,
++        pub shm_dtime: ::time_t,
++        __unused2: ::c_int,
++        pub shm_ctime: ::time_t,
++        __unused3: ::c_int,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::c_ulong,
++        __pad1: ::c_ulong,
++        __pad2: ::c_ulong,
++    }
++
++    pub struct msqid_ds {
++        pub msg_perm: ::ipc_perm,
++        pub msg_stime: ::time_t,
++        __unused1: ::c_int,
++        pub msg_rtime: ::time_t,
++        __unused2: ::c_int,
++        pub msg_ctime: ::time_t,
++        __unused3: ::c_int,
++        __msg_cbytes: ::c_ulong,
++        pub msg_qnum: ::msgqnum_t,
++        pub msg_qbytes: ::msglen_t,
++        pub msg_lspid: ::pid_t,
++        pub msg_lrpid: ::pid_t,
++        __pad1: ::c_ulong,
++        __pad2: ::c_ulong,
++    }
++
++    pub struct statfs {
++        pub f_type: ::c_ulong,
++        pub f_bsize: ::c_ulong,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_fsid: ::fsid_t,
++        pub f_namelen: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_flags: ::c_ulong,
++        pub f_spare: [::c_ulong; 4],
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_errno: ::c_int,
++        pub si_code: ::c_int,
++        pub _pad: [::c_int; 29],
++        _align: [usize; 0],
++    }
++}
++
++pub const O_DIRECT: ::c_int = 0x4000;
++pub const O_DIRECTORY: ::c_int = 0x10000;
++pub const O_NOFOLLOW: ::c_int = 0x20000;
++pub const O_ASYNC: ::c_int = 0x2000;
++
++pub const FIOCLEX: ::c_int = 0x5451;
++pub const FIONBIO: ::c_int = 0x5421;
++
++pub const RLIMIT_RSS: ::c_int = 5;
++pub const RLIMIT_NOFILE: ::c_int = 7;
++pub const RLIMIT_AS: ::c_int = 9;
++pub const RLIMIT_NPROC: ::c_int = 6;
++pub const RLIMIT_MEMLOCK: ::c_int = 8;
++
++pub const O_APPEND: ::c_int = 1024;
++pub const O_CREAT: ::c_int = 64;
++pub const O_EXCL: ::c_int = 128;
++pub const O_NOCTTY: ::c_int = 256;
++pub const O_NONBLOCK: ::c_int = 2048;
++pub const O_SYNC: ::c_int = 1052672;
++pub const O_RSYNC: ::c_int = 1052672;
++pub const O_DSYNC: ::c_int = 4096;
++
++pub const SOCK_NONBLOCK: ::c_int = 2048;
++
++pub const MAP_ANON: ::c_int = 0x0020;
++pub const MAP_GROWSDOWN: ::c_int = 0x0100;
++pub const MAP_DENYWRITE: ::c_int = 0x0800;
++pub const MAP_EXECUTABLE: ::c_int = 0x01000;
++pub const MAP_LOCKED: ::c_int = 0x02000;
++pub const MAP_NORESERVE: ::c_int = 0x04000;
++pub const MAP_POPULATE: ::c_int = 0x08000;
++pub const MAP_NONBLOCK: ::c_int = 0x010000;
++pub const MAP_STACK: ::c_int = 0x020000;
++
++pub const SOCK_STREAM: ::c_int = 1;
++pub const SOCK_DGRAM: ::c_int = 2;
++pub const SOCK_SEQPACKET: ::c_int = 5;
++
++pub const SOL_SOCKET: ::c_int = 1;
++
++pub const EDEADLK: ::c_int = 35;
++pub const ENAMETOOLONG: ::c_int = 36;
++pub const ENOLCK: ::c_int = 37;
++pub const ENOSYS: ::c_int = 38;
++pub const ENOTEMPTY: ::c_int = 39;
++pub const ELOOP: ::c_int = 40;
++pub const ENOMSG: ::c_int = 42;
++pub const EIDRM: ::c_int = 43;
++pub const ECHRNG: ::c_int = 44;
++pub const EL2NSYNC: ::c_int = 45;
++pub const EL3HLT: ::c_int = 46;
++pub const EL3RST: ::c_int = 47;
++pub const ELNRNG: ::c_int = 48;
++pub const EUNATCH: ::c_int = 49;
++pub const ENOCSI: ::c_int = 50;
++pub const EL2HLT: ::c_int = 51;
++pub const EBADE: ::c_int = 52;
++pub const EBADR: ::c_int = 53;
++pub const EXFULL: ::c_int = 54;
++pub const ENOANO: ::c_int = 55;
++pub const EBADRQC: ::c_int = 56;
++pub const EBADSLT: ::c_int = 57;
++pub const EDEADLOCK: ::c_int = EDEADLK;
++pub const EMULTIHOP: ::c_int = 72;
++pub const EBADMSG: ::c_int = 74;
++pub const EOVERFLOW: ::c_int = 75;
++pub const ENOTUNIQ: ::c_int = 76;
++pub const EBADFD: ::c_int = 77;
++pub const EREMCHG: ::c_int = 78;
++pub const ELIBACC: ::c_int = 79;
++pub const ELIBBAD: ::c_int = 80;
++pub const ELIBSCN: ::c_int = 81;
++pub const ELIBMAX: ::c_int = 82;
++pub const ELIBEXEC: ::c_int = 83;
++pub const EILSEQ: ::c_int = 84;
++pub const ERESTART: ::c_int = 85;
++pub const ESTRPIPE: ::c_int = 86;
++pub const EUSERS: ::c_int = 87;
++pub const ENOTSOCK: ::c_int = 88;
++pub const EDESTADDRREQ: ::c_int = 89;
++pub const EMSGSIZE: ::c_int = 90;
++pub const EPROTOTYPE: ::c_int = 91;
++pub const ENOPROTOOPT: ::c_int = 92;
++pub const EPROTONOSUPPORT: ::c_int = 93;
++pub const ESOCKTNOSUPPORT: ::c_int = 94;
++pub const EOPNOTSUPP: ::c_int = 95;
++pub const ENOTSUP: ::c_int = EOPNOTSUPP;
++pub const EPFNOSUPPORT: ::c_int = 96;
++pub const EAFNOSUPPORT: ::c_int = 97;
++pub const EADDRINUSE: ::c_int = 98;
++pub const EADDRNOTAVAIL: ::c_int = 99;
++pub const ENETDOWN: ::c_int = 100;
++pub const ENETUNREACH: ::c_int = 101;
++pub const ENETRESET: ::c_int = 102;
++pub const ECONNABORTED: ::c_int = 103;
++pub const ECONNRESET: ::c_int = 104;
++pub const ENOBUFS: ::c_int = 105;
++pub const EISCONN: ::c_int = 106;
++pub const ENOTCONN: ::c_int = 107;
++pub const ESHUTDOWN: ::c_int = 108;
++pub const ETOOMANYREFS: ::c_int = 109;
++pub const ETIMEDOUT: ::c_int = 110;
++pub const ECONNREFUSED: ::c_int = 111;
++pub const EHOSTDOWN: ::c_int = 112;
++pub const EHOSTUNREACH: ::c_int = 113;
++pub const EALREADY: ::c_int = 114;
++pub const EINPROGRESS: ::c_int = 115;
++pub const ESTALE: ::c_int = 116;
++pub const EUCLEAN: ::c_int = 117;
++pub const ENOTNAM: ::c_int = 118;
++pub const ENAVAIL: ::c_int = 119;
++pub const EISNAM: ::c_int = 120;
++pub const EREMOTEIO: ::c_int = 121;
++pub const EDQUOT: ::c_int = 122;
++pub const ENOMEDIUM: ::c_int = 123;
++pub const EMEDIUMTYPE: ::c_int = 124;
++pub const ECANCELED: ::c_int = 125;
++pub const ENOKEY: ::c_int = 126;
++pub const EKEYEXPIRED: ::c_int = 127;
++pub const EKEYREVOKED: ::c_int = 128;
++pub const EKEYREJECTED: ::c_int = 129;
++pub const EOWNERDEAD: ::c_int = 130;
++pub const ENOTRECOVERABLE: ::c_int = 131;
++pub const ERFKILL: ::c_int = 132;
++pub const EHWPOISON: ::c_int = 133;
++
++pub const SO_REUSEADDR: ::c_int = 2;
++pub const SO_TYPE: ::c_int = 3;
++pub const SO_ERROR: ::c_int = 4;
++pub const SO_DONTROUTE: ::c_int = 5;
++pub const SO_BROADCAST: ::c_int = 6;
++pub const SO_SNDBUF: ::c_int = 7;
++pub const SO_RCVBUF: ::c_int = 8;
++pub const SO_KEEPALIVE: ::c_int = 9;
++pub const SO_OOBINLINE: ::c_int = 10;
++pub const SO_LINGER: ::c_int = 13;
++pub const SO_REUSEPORT: ::c_int = 15;
++pub const SO_RCVLOWAT: ::c_int = 18;
++pub const SO_SNDLOWAT: ::c_int = 19;
++pub const SO_RCVTIMEO: ::c_int = 20;
++pub const SO_SNDTIMEO: ::c_int = 21;
++pub const SO_ACCEPTCONN: ::c_int = 30;
++
++pub const SA_ONSTACK: ::c_int = 0x08000000;
++pub const SA_SIGINFO: ::c_int = 0x00000004;
++pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
++
++pub const SIGCHLD: ::c_int = 17;
++pub const SIGBUS: ::c_int = 7;
++pub const SIGTTIN: ::c_int = 21;
++pub const SIGTTOU: ::c_int = 22;
++pub const SIGXCPU: ::c_int = 24;
++pub const SIGXFSZ: ::c_int = 25;
++pub const SIGVTALRM: ::c_int = 26;
++pub const SIGPROF: ::c_int = 27;
++pub const SIGWINCH: ::c_int = 28;
++pub const SIGUSR1: ::c_int = 10;
++pub const SIGUSR2: ::c_int = 12;
++pub const SIGCONT: ::c_int = 18;
++pub const SIGSTOP: ::c_int = 19;
++pub const SIGTSTP: ::c_int = 20;
++pub const SIGURG: ::c_int = 23;
++pub const SIGIO: ::c_int = 29;
++pub const SIGSYS: ::c_int = 31;
++pub const SIGSTKFLT: ::c_int = 16;
++pub const SIGPOLL: ::c_int = 29;
++pub const SIGPWR: ::c_int = 30;
++pub const SIG_SETMASK: ::c_int = 2;
++pub const SIG_BLOCK: ::c_int = 0x000000;
++pub const SIG_UNBLOCK: ::c_int = 0x01;
++
++pub const EXTPROC: ::tcflag_t = 0x00010000;
++
++pub const MAP_HUGETLB: ::c_int = 0x040000;
++
++pub const F_GETLK: ::c_int = 12;
++pub const F_GETOWN: ::c_int = 9;
++pub const F_SETLK: ::c_int = 13;
++pub const F_SETLKW: ::c_int = 14;
++pub const F_SETOWN: ::c_int = 8;
++
++pub const VEOF: usize = 4;
++pub const VEOL: usize = 11;
++pub const VEOL2: usize = 16;
++pub const VMIN: usize = 6;
++pub const IEXTEN: ::tcflag_t = 0x00008000;
++pub const TOSTOP: ::tcflag_t = 0x00000100;
++pub const FLUSHO: ::tcflag_t = 0x00001000;
++
++pub const TCGETS: ::c_int = 0x5401;
++pub const TCSETS: ::c_int = 0x5402;
++pub const TCSETSW: ::c_int = 0x5403;
++pub const TCSETSF: ::c_int = 0x5404;
++pub const TCGETA: ::c_int = 0x5405;
++pub const TCSETA: ::c_int = 0x5406;
++pub const TCSETAW: ::c_int = 0x5407;
++pub const TCSETAF: ::c_int = 0x5408;
++pub const TCSBRK: ::c_int = 0x5409;
++pub const TCXONC: ::c_int = 0x540A;
++pub const TCFLSH: ::c_int = 0x540B;
++pub const TIOCGSOFTCAR: ::c_int = 0x5419;
++pub const TIOCSSOFTCAR: ::c_int = 0x541A;
++pub const TIOCLINUX: ::c_int = 0x541C;
++pub const TIOCGSERIAL: ::c_int = 0x541E;
++pub const TIOCEXCL: ::c_int = 0x540C;
++pub const TIOCNXCL: ::c_int = 0x540D;
++pub const TIOCSCTTY: ::c_int = 0x540E;
++pub const TIOCGPGRP: ::c_int = 0x540F;
++pub const TIOCSPGRP: ::c_int = 0x5410;
++pub const TIOCOUTQ: ::c_int = 0x5411;
++pub const TIOCSTI: ::c_int = 0x5412;
++pub const TIOCGWINSZ: ::c_int = 0x5413;
++pub const TIOCSWINSZ: ::c_int = 0x5414;
++pub const TIOCMGET: ::c_int = 0x5415;
++pub const TIOCMBIS: ::c_int = 0x5416;
++pub const TIOCMBIC: ::c_int = 0x5417;
++pub const TIOCMSET: ::c_int = 0x5418;
++pub const FIONREAD: ::c_int = 0x541B;
++pub const TIOCCONS: ::c_int = 0x541D;
++
++pub const SYS_gettid: ::c_long = 224; // Valid for arm (32-bit) and x86 (32-bit)
++
++pub const POLLWRNORM: ::c_short = 0x100;
++pub const POLLWRBAND: ::c_short = 0x200;
++
++pub const TIOCM_LE: ::c_int = 0x001;
++pub const TIOCM_DTR: ::c_int = 0x002;
++pub const TIOCM_RTS: ::c_int = 0x004;
++pub const TIOCM_ST: ::c_int = 0x008;
++pub const TIOCM_SR: ::c_int = 0x010;
++pub const TIOCM_CTS: ::c_int = 0x020;
++pub const TIOCM_CAR: ::c_int = 0x040;
++pub const TIOCM_RNG: ::c_int = 0x080;
++pub const TIOCM_DSR: ::c_int = 0x100;
++pub const TIOCM_CD: ::c_int = TIOCM_CAR;
++pub const TIOCM_RI: ::c_int = TIOCM_RNG;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..34de526f97912a398ba764d959d4afcbefcb2d24
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,367 @@@
++pub type c_char = i8;
++pub type wchar_t = ::c_int;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        __st_padding1: [::c_long; 2],
++        pub st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __st_padding2: [::c_long; 2],
++        pub st_size: ::off_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_blksize: ::blksize_t,
++        __st_padding3: ::c_long,
++        pub st_blocks: ::blkcnt_t,
++        __st_padding4: [::c_long; 14],
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::dev_t,
++        __st_padding1: [::c_long; 2],
++        pub st_ino: ::ino64_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __st_padding2: [::c_long; 2],
++        pub st_size: ::off_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_blksize: ::blksize_t,
++        __st_padding3: ::c_long,
++        pub st_blocks: ::blkcnt64_t,
++        __st_padding4: [::c_long; 14],
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_size: ::size_t,
++        pub ss_flags: ::c_int,
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_segsz: ::size_t,
++        pub shm_atime: ::time_t,
++        pub shm_dtime: ::time_t,
++        pub shm_ctime: ::time_t,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::c_ulong,
++        __pad1: ::c_ulong,
++        __pad2: ::c_ulong,
++    }
++
++    pub struct msqid_ds {
++        pub msg_perm: ::ipc_perm,
++        #[cfg(target_endian = "big")]
++        __unused1: ::c_int,
++        pub msg_stime: ::time_t,
++        #[cfg(target_endian = "little")]
++        __unused1: ::c_int,
++        #[cfg(target_endian = "big")]
++        __unused2: ::c_int,
++        pub msg_rtime: ::time_t,
++        #[cfg(target_endian = "little")]
++        __unused2: ::c_int,
++        #[cfg(target_endian = "big")]
++        __unused3: ::c_int,
++        pub msg_ctime: ::time_t,
++        #[cfg(target_endian = "little")]
++        __unused3: ::c_int,
++        __msg_cbytes: ::c_ulong,
++        pub msg_qnum: ::msgqnum_t,
++        pub msg_qbytes: ::msglen_t,
++        pub msg_lspid: ::pid_t,
++        pub msg_lrpid: ::pid_t,
++        __pad1: ::c_ulong,
++        __pad2: ::c_ulong,
++    }
++
++    pub struct statfs {
++        pub f_type: ::c_ulong,
++        pub f_bsize: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_fsid: ::fsid_t,
++        pub f_namelen: ::c_ulong,
++        pub f_flags: ::c_ulong,
++        pub f_spare: [::c_ulong; 5],
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_code: ::c_int,
++        pub si_errno: ::c_int,
++        pub _pad: [::c_int; 29],
++        _align: [usize; 0],
++    }
++}
++
++pub const O_DIRECT: ::c_int = 0o100000;
++pub const O_DIRECTORY: ::c_int = 0o200000;
++pub const O_NOFOLLOW: ::c_int = 0o400000;
++pub const O_ASYNC: ::c_int = 0o10000;
++pub const O_LARGEFILE: ::c_int = 0x2000;
++
++pub const FIOCLEX: ::c_int = 0x6601;
++pub const FIONBIO: ::c_int = 0x667E;
++
++pub const RLIMIT_RSS: ::c_int = 7;
++pub const RLIMIT_NOFILE: ::c_int = 5;
++pub const RLIMIT_AS: ::c_int = 6;
++pub const RLIMIT_NPROC: ::c_int = 8;
++pub const RLIMIT_MEMLOCK: ::c_int = 9;
++
++pub const O_APPEND: ::c_int = 0o010;
++pub const O_CREAT: ::c_int = 0o400;
++pub const O_EXCL: ::c_int = 0o2000;
++pub const O_NOCTTY: ::c_int = 0o4000;
++pub const O_NONBLOCK: ::c_int = 0o200;
++pub const O_SYNC: ::c_int = 0o40020;
++pub const O_RSYNC: ::c_int = 0o40020;
++pub const O_DSYNC: ::c_int = 0o020;
++
++pub const SOCK_NONBLOCK: ::c_int = 0o200;
++
++pub const MAP_ANON: ::c_int = 0x800;
++pub const MAP_GROWSDOWN: ::c_int = 0x1000;
++pub const MAP_DENYWRITE: ::c_int = 0x2000;
++pub const MAP_EXECUTABLE: ::c_int = 0x4000;
++pub const MAP_LOCKED: ::c_int = 0x8000;
++pub const MAP_NORESERVE: ::c_int = 0x0400;
++pub const MAP_POPULATE: ::c_int = 0x10000;
++pub const MAP_NONBLOCK: ::c_int = 0x20000;
++pub const MAP_STACK: ::c_int = 0x40000;
++
++pub const EDEADLK: ::c_int = 45;
++pub const ENAMETOOLONG: ::c_int = 78;
++pub const ENOLCK: ::c_int = 46;
++pub const ENOSYS: ::c_int = 89;
++pub const ENOTEMPTY: ::c_int = 93;
++pub const ELOOP: ::c_int = 90;
++pub const ENOMSG: ::c_int = 35;
++pub const EIDRM: ::c_int = 36;
++pub const ECHRNG: ::c_int = 37;
++pub const EL2NSYNC: ::c_int = 38;
++pub const EL3HLT: ::c_int = 39;
++pub const EL3RST: ::c_int = 40;
++pub const ELNRNG: ::c_int = 41;
++pub const EUNATCH: ::c_int = 42;
++pub const ENOCSI: ::c_int = 43;
++pub const EL2HLT: ::c_int = 44;
++pub const EBADE: ::c_int = 50;
++pub const EBADR: ::c_int = 51;
++pub const EXFULL: ::c_int = 52;
++pub const ENOANO: ::c_int = 53;
++pub const EBADRQC: ::c_int = 54;
++pub const EBADSLT: ::c_int = 55;
++pub const EDEADLOCK: ::c_int = 56;
++pub const EMULTIHOP: ::c_int = 74;
++pub const EOVERFLOW: ::c_int = 79;
++pub const ENOTUNIQ: ::c_int = 80;
++pub const EBADFD: ::c_int = 81;
++pub const EBADMSG: ::c_int = 77;
++pub const EREMCHG: ::c_int = 82;
++pub const ELIBACC: ::c_int = 83;
++pub const ELIBBAD: ::c_int = 84;
++pub const ELIBSCN: ::c_int = 85;
++pub const ELIBMAX: ::c_int = 86;
++pub const ELIBEXEC: ::c_int = 87;
++pub const EILSEQ: ::c_int = 88;
++pub const ERESTART: ::c_int = 91;
++pub const ESTRPIPE: ::c_int = 92;
++pub const EUSERS: ::c_int = 94;
++pub const ENOTSOCK: ::c_int = 95;
++pub const EDESTADDRREQ: ::c_int = 96;
++pub const EMSGSIZE: ::c_int = 97;
++pub const EPROTOTYPE: ::c_int = 98;
++pub const ENOPROTOOPT: ::c_int = 99;
++pub const EPROTONOSUPPORT: ::c_int = 120;
++pub const ESOCKTNOSUPPORT: ::c_int = 121;
++pub const EOPNOTSUPP: ::c_int = 122;
++pub const ENOTSUP: ::c_int = EOPNOTSUPP;
++pub const EPFNOSUPPORT: ::c_int = 123;
++pub const EAFNOSUPPORT: ::c_int = 124;
++pub const EADDRINUSE: ::c_int = 125;
++pub const EADDRNOTAVAIL: ::c_int = 126;
++pub const ENETDOWN: ::c_int = 127;
++pub const ENETUNREACH: ::c_int = 128;
++pub const ENETRESET: ::c_int = 129;
++pub const ECONNABORTED: ::c_int = 130;
++pub const ECONNRESET: ::c_int = 131;
++pub const ENOBUFS: ::c_int = 132;
++pub const EISCONN: ::c_int = 133;
++pub const ENOTCONN: ::c_int = 134;
++pub const ESHUTDOWN: ::c_int = 143;
++pub const ETOOMANYREFS: ::c_int = 144;
++pub const ETIMEDOUT: ::c_int = 145;
++pub const ECONNREFUSED: ::c_int = 146;
++pub const EHOSTDOWN: ::c_int = 147;
++pub const EHOSTUNREACH: ::c_int = 148;
++pub const EALREADY: ::c_int = 149;
++pub const EINPROGRESS: ::c_int = 150;
++pub const ESTALE: ::c_int = 151;
++pub const EUCLEAN: ::c_int = 135;
++pub const ENOTNAM: ::c_int = 137;
++pub const ENAVAIL: ::c_int = 138;
++pub const EISNAM: ::c_int = 139;
++pub const EREMOTEIO: ::c_int = 140;
++pub const EDQUOT: ::c_int = 1133;
++pub const ENOMEDIUM: ::c_int = 159;
++pub const EMEDIUMTYPE: ::c_int = 160;
++pub const ECANCELED: ::c_int = 158;
++pub const ENOKEY: ::c_int = 161;
++pub const EKEYEXPIRED: ::c_int = 162;
++pub const EKEYREVOKED: ::c_int = 163;
++pub const EKEYREJECTED: ::c_int = 164;
++pub const EOWNERDEAD: ::c_int = 165;
++pub const ENOTRECOVERABLE: ::c_int = 166;
++pub const EHWPOISON: ::c_int = 168;
++pub const ERFKILL: ::c_int = 167;
++
++pub const SOCK_STREAM: ::c_int = 2;
++pub const SOCK_DGRAM: ::c_int = 1;
++pub const SOCK_SEQPACKET: ::c_int = 5;
++
++pub const SOL_SOCKET: ::c_int = 65535;
++
++pub const SO_REUSEADDR: ::c_int = 0x0004;
++pub const SO_KEEPALIVE: ::c_int = 0x0008;
++pub const SO_DONTROUTE: ::c_int = 0x0010;
++pub const SO_BROADCAST: ::c_int = 0x0020;
++pub const SO_LINGER: ::c_int = 0x0080;
++pub const SO_OOBINLINE: ::c_int = 0x0100;
++pub const SO_REUSEPORT: ::c_int = 0x0200;
++pub const SO_SNDBUF: ::c_int = 0x1001;
++pub const SO_RCVBUF: ::c_int = 0x1002;
++pub const SO_SNDLOWAT: ::c_int = 0x1003;
++pub const SO_RCVLOWAT: ::c_int = 0x1004;
++pub const SO_RCVTIMEO: ::c_int = 0x1006;
++pub const SO_SNDTIMEO: ::c_int = 0x1005;
++pub const SO_ERROR: ::c_int = 0x1007;
++pub const SO_TYPE: ::c_int = 0x1008;
++pub const SO_ACCEPTCONN: ::c_int = 0x1009;
++pub const SO_PROTOCOL: ::c_int = 0x1028;
++pub const SO_DOMAIN: ::c_int = 0x1029;
++pub const SO_NO_CHECK: ::c_int = 11;
++pub const SO_PRIORITY: ::c_int = 12;
++pub const SO_BSDCOMPAT: ::c_int = 14;
++pub const SO_PASSCRED: ::c_int = 17;
++pub const SO_PEERCRED: ::c_int = 18;
++pub const SO_SNDBUFFORCE: ::c_int = 31;
++pub const SO_RCVBUFFORCE: ::c_int = 33;
++
++pub const SA_ONSTACK: ::c_int = 0x08000000;
++pub const SA_SIGINFO: ::c_int = 8;
++pub const SA_NOCLDWAIT: ::c_int = 0x10000;
++
++pub const SIGCHLD: ::c_int = 18;
++pub const SIGBUS: ::c_int = 10;
++pub const SIGTTIN: ::c_int = 26;
++pub const SIGTTOU: ::c_int = 27;
++pub const SIGXCPU: ::c_int = 30;
++pub const SIGXFSZ: ::c_int = 31;
++pub const SIGVTALRM: ::c_int = 28;
++pub const SIGPROF: ::c_int = 29;
++pub const SIGWINCH: ::c_int = 20;
++pub const SIGUSR1: ::c_int = 16;
++pub const SIGUSR2: ::c_int = 17;
++pub const SIGCONT: ::c_int = 25;
++pub const SIGSTOP: ::c_int = 23;
++pub const SIGTSTP: ::c_int = 24;
++pub const SIGURG: ::c_int = 21;
++pub const SIGIO: ::c_int = 22;
++pub const SIGSYS: ::c_int = 12;
++pub const SIGSTKFLT: ::c_int = 7;
++pub const SIGPOLL: ::c_int = ::SIGIO;
++pub const SIGPWR: ::c_int = 19;
++pub const SIG_SETMASK: ::c_int = 3;
++pub const SIG_BLOCK: ::c_int = 1;
++pub const SIG_UNBLOCK: ::c_int = 2;
++
++pub const EXTPROC: ::tcflag_t = 0o200000;
++
++pub const MAP_HUGETLB: ::c_int = 0x80000;
++
++pub const F_GETLK: ::c_int = 33;
++pub const F_GETOWN: ::c_int = 23;
++pub const F_SETLK: ::c_int = 34;
++pub const F_SETLKW: ::c_int = 35;
++pub const F_SETOWN: ::c_int = 24;
++
++pub const VEOF: usize = 16;
++pub const VEOL: usize = 17;
++pub const VEOL2: usize = 6;
++pub const VMIN: usize = 4;
++pub const IEXTEN: ::tcflag_t = 0o000400;
++pub const TOSTOP: ::tcflag_t = 0o100000;
++pub const FLUSHO: ::tcflag_t = 0o020000;
++
++pub const TCGETS: ::c_int = 0x540D;
++pub const TCSETS: ::c_int = 0x540E;
++pub const TCSETSW: ::c_int = 0x540F;
++pub const TCSETSF: ::c_int = 0x5410;
++pub const TCGETA: ::c_int = 0x5401;
++pub const TCSETA: ::c_int = 0x5402;
++pub const TCSETAW: ::c_int = 0x5403;
++pub const TCSETAF: ::c_int = 0x5404;
++pub const TCSBRK: ::c_int = 0x5405;
++pub const TCXONC: ::c_int = 0x5406;
++pub const TCFLSH: ::c_int = 0x5407;
++pub const TIOCGSOFTCAR: ::c_int = 0x5481;
++pub const TIOCSSOFTCAR: ::c_int = 0x5482;
++pub const TIOCLINUX: ::c_int = 0x5483;
++pub const TIOCGSERIAL: ::c_int = 0x5484;
++pub const TIOCEXCL: ::c_int = 0x740D;
++pub const TIOCNXCL: ::c_int = 0x740E;
++pub const TIOCSCTTY: ::c_int = 0x5480;
++pub const TIOCGPGRP: ::c_int = 0x40047477;
++pub const TIOCSPGRP: ::c_int = 0x80047476;
++pub const TIOCOUTQ: ::c_int = 0x7472;
++pub const TIOCSTI: ::c_int = 0x5472;
++pub const TIOCGWINSZ: ::c_int = 0x40087468;
++pub const TIOCSWINSZ: ::c_int = 0x80087467;
++pub const TIOCMGET: ::c_int = 0x741D;
++pub const TIOCMBIS: ::c_int = 0x741B;
++pub const TIOCMBIC: ::c_int = 0x741C;
++pub const TIOCMSET: ::c_int = 0x741A;
++pub const FIONREAD: ::c_int = 0x467F;
++pub const TIOCCONS: ::c_int = 0x80047478;
++
++pub const SYS_gettid: ::c_long = 4222;   // Valid for O32
++pub const SYS_perf_event_open: ::c_long = 4333;  // Valid for O32
++
++pub const POLLWRNORM: ::c_short = 0x4;
++pub const POLLWRBAND: ::c_short = 0x100;
++
++pub const TIOCM_LE: ::c_int = 0x001;
++pub const TIOCM_DTR: ::c_int = 0x002;
++pub const TIOCM_RTS: ::c_int = 0x004;
++pub const TIOCM_ST: ::c_int = 0x010;
++pub const TIOCM_SR: ::c_int = 0x020;
++pub const TIOCM_CTS: ::c_int = 0x040;
++pub const TIOCM_CAR: ::c_int = 0x100;
++pub const TIOCM_CD: ::c_int = TIOCM_CAR;
++pub const TIOCM_RNG: ::c_int = 0x200;
++pub const TIOCM_RI: ::c_int = TIOCM_RNG;
++pub const TIOCM_DSR: ::c_int = 0x400;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f9521053756e35c063f0855b7800d08a6a0f2154
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,57 @@@
++pub type c_long = i32;
++pub type c_ulong = u32;
++pub type nlink_t = u32;
++pub type __u64 = ::c_ulonglong;
++
++s! {
++    pub struct pthread_attr_t {
++        __size: [u32; 9]
++    }
++
++    pub struct sigset_t {
++        __val: [::c_ulong; 32],
++    }
++
++    pub struct msghdr {
++        pub msg_name: *mut ::c_void,
++        pub msg_namelen: ::socklen_t,
++        pub msg_iov: *mut ::iovec,
++        pub msg_iovlen: ::c_int,
++        pub msg_control: *mut ::c_void,
++        pub msg_controllen: ::socklen_t,
++        pub msg_flags: ::c_int,
++    }
++
++    pub struct cmsghdr {
++        pub cmsg_len: ::socklen_t,
++        pub cmsg_level: ::c_int,
++        pub cmsg_type: ::c_int,
++    }
++
++    pub struct sem_t {
++        __val: [::c_int; 4],
++    }
++}
++
++pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
++pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
++
++cfg_if! {
++    if #[cfg(any(target_arch = "x86"))] {
++        mod x86;
++        pub use self::x86::*;
++    } else if #[cfg(any(target_arch = "mips"))] {
++        mod mips;
++        pub use self::mips::*;
++    } else if #[cfg(any(target_arch = "arm"))] {
++        mod arm;
++        pub use self::arm::*;
++    } else if #[cfg(any(target_arch = "asmjs", target_arch = "wasm32"))] {
++        // For the time being asmjs and wasm32 are the same, and both
++        // backed by identical emscripten runtimes
++        mod asmjs;
++        pub use self::asmjs::*;
++    } else {
++        // Unknown target_arch
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2c31fbe698991063488e12de0b521cbb85d7121a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,373 @@@
++pub type c_char = i8;
++pub type wchar_t = i32;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        __st_dev_padding: ::c_int,
++        __st_ino_truncated: ::c_long,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __st_rdev_padding: ::c_int,
++        pub st_size: ::off_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_ino: ::ino_t,
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::dev_t,
++        __st_dev_padding: ::c_int,
++        __st_ino_truncated: ::c_long,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __st_rdev_padding: ::c_int,
++        pub st_size: ::off_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_ino: ::ino_t,
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_flags: ::c_int,
++        pub ss_size: ::size_t
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_segsz: ::size_t,
++        pub shm_atime: ::time_t,
++        __unused1: ::c_int,
++        pub shm_dtime: ::time_t,
++        __unused2: ::c_int,
++        pub shm_ctime: ::time_t,
++        __unused3: ::c_int,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::c_ulong,
++        __pad1: ::c_ulong,
++        __pad2: ::c_ulong,
++    }
++
++    pub struct msqid_ds {
++        pub msg_perm: ::ipc_perm,
++        pub msg_stime: ::time_t,
++        __unused1: ::c_int,
++        pub msg_rtime: ::time_t,
++        __unused2: ::c_int,
++        pub msg_ctime: ::time_t,
++        __unused3: ::c_int,
++        __msg_cbytes: ::c_ulong,
++        pub msg_qnum: ::msgqnum_t,
++        pub msg_qbytes: ::msglen_t,
++        pub msg_lspid: ::pid_t,
++        pub msg_lrpid: ::pid_t,
++        __pad1: ::c_ulong,
++        __pad2: ::c_ulong,
++    }
++
++    pub struct statfs {
++        pub f_type: ::c_ulong,
++        pub f_bsize: ::c_ulong,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_fsid: ::fsid_t,
++        pub f_namelen: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_flags: ::c_ulong,
++        pub f_spare: [::c_ulong; 4],
++    }
++
++    pub struct mcontext_t {
++        __private: [u32; 22]
++    }
++
++    pub struct ucontext_t {
++        pub uc_flags: ::c_ulong,
++        pub uc_link: *mut ucontext_t,
++        pub uc_stack: ::stack_t,
++        pub uc_mcontext: mcontext_t,
++        pub uc_sigmask: ::sigset_t,
++        __private: [u8; 112],
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_errno: ::c_int,
++        pub si_code: ::c_int,
++        pub _pad: [::c_int; 29],
++        _align: [usize; 0],
++    }
++}
++
++pub const O_DIRECT: ::c_int = 0x4000;
++pub const O_DIRECTORY: ::c_int = 0x10000;
++pub const O_NOFOLLOW: ::c_int = 0x20000;
++pub const O_ASYNC: ::c_int = 0x2000;
++pub const O_LARGEFILE: ::c_int = 0o0100000;
++
++pub const FIOCLEX: ::c_int = 0x5451;
++pub const FIONBIO: ::c_int = 0x5421;
++
++pub const RLIMIT_RSS: ::c_int = 5;
++pub const RLIMIT_NOFILE: ::c_int = 7;
++pub const RLIMIT_AS: ::c_int = 9;
++pub const RLIMIT_NPROC: ::c_int = 6;
++pub const RLIMIT_MEMLOCK: ::c_int = 8;
++
++pub const O_APPEND: ::c_int = 1024;
++pub const O_CREAT: ::c_int = 64;
++pub const O_EXCL: ::c_int = 128;
++pub const O_NOCTTY: ::c_int = 256;
++pub const O_NONBLOCK: ::c_int = 2048;
++pub const O_SYNC: ::c_int = 1052672;
++pub const O_RSYNC: ::c_int = 1052672;
++pub const O_DSYNC: ::c_int = 4096;
++
++pub const SOCK_NONBLOCK: ::c_int = 2048;
++
++pub const MAP_ANON: ::c_int = 0x0020;
++pub const MAP_GROWSDOWN: ::c_int = 0x0100;
++pub const MAP_DENYWRITE: ::c_int = 0x0800;
++pub const MAP_EXECUTABLE: ::c_int = 0x01000;
++pub const MAP_LOCKED: ::c_int = 0x02000;
++pub const MAP_NORESERVE: ::c_int = 0x04000;
++pub const MAP_POPULATE: ::c_int = 0x08000;
++pub const MAP_NONBLOCK: ::c_int = 0x010000;
++pub const MAP_STACK: ::c_int = 0x020000;
++
++pub const SOCK_STREAM: ::c_int = 1;
++pub const SOCK_DGRAM: ::c_int = 2;
++pub const SOCK_SEQPACKET: ::c_int = 5;
++
++pub const SOL_SOCKET: ::c_int = 1;
++
++pub const EDEADLK: ::c_int = 35;
++pub const ENAMETOOLONG: ::c_int = 36;
++pub const ENOLCK: ::c_int = 37;
++pub const ENOSYS: ::c_int = 38;
++pub const ENOTEMPTY: ::c_int = 39;
++pub const ELOOP: ::c_int = 40;
++pub const ENOMSG: ::c_int = 42;
++pub const EIDRM: ::c_int = 43;
++pub const ECHRNG: ::c_int = 44;
++pub const EL2NSYNC: ::c_int = 45;
++pub const EL3HLT: ::c_int = 46;
++pub const EL3RST: ::c_int = 47;
++pub const ELNRNG: ::c_int = 48;
++pub const EUNATCH: ::c_int = 49;
++pub const ENOCSI: ::c_int = 50;
++pub const EL2HLT: ::c_int = 51;
++pub const EBADE: ::c_int = 52;
++pub const EBADR: ::c_int = 53;
++pub const EXFULL: ::c_int = 54;
++pub const ENOANO: ::c_int = 55;
++pub const EBADRQC: ::c_int = 56;
++pub const EBADSLT: ::c_int = 57;
++pub const EDEADLOCK: ::c_int = EDEADLK;
++pub const EMULTIHOP: ::c_int = 72;
++pub const EBADMSG: ::c_int = 74;
++pub const EOVERFLOW: ::c_int = 75;
++pub const ENOTUNIQ: ::c_int = 76;
++pub const EBADFD: ::c_int = 77;
++pub const EREMCHG: ::c_int = 78;
++pub const ELIBACC: ::c_int = 79;
++pub const ELIBBAD: ::c_int = 80;
++pub const ELIBSCN: ::c_int = 81;
++pub const ELIBMAX: ::c_int = 82;
++pub const ELIBEXEC: ::c_int = 83;
++pub const EILSEQ: ::c_int = 84;
++pub const ERESTART: ::c_int = 85;
++pub const ESTRPIPE: ::c_int = 86;
++pub const EUSERS: ::c_int = 87;
++pub const ENOTSOCK: ::c_int = 88;
++pub const EDESTADDRREQ: ::c_int = 89;
++pub const EMSGSIZE: ::c_int = 90;
++pub const EPROTOTYPE: ::c_int = 91;
++pub const ENOPROTOOPT: ::c_int = 92;
++pub const EPROTONOSUPPORT: ::c_int = 93;
++pub const ESOCKTNOSUPPORT: ::c_int = 94;
++pub const EOPNOTSUPP: ::c_int = 95;
++pub const ENOTSUP: ::c_int = EOPNOTSUPP;
++pub const EPFNOSUPPORT: ::c_int = 96;
++pub const EAFNOSUPPORT: ::c_int = 97;
++pub const EADDRINUSE: ::c_int = 98;
++pub const EADDRNOTAVAIL: ::c_int = 99;
++pub const ENETDOWN: ::c_int = 100;
++pub const ENETUNREACH: ::c_int = 101;
++pub const ENETRESET: ::c_int = 102;
++pub const ECONNABORTED: ::c_int = 103;
++pub const ECONNRESET: ::c_int = 104;
++pub const ENOBUFS: ::c_int = 105;
++pub const EISCONN: ::c_int = 106;
++pub const ENOTCONN: ::c_int = 107;
++pub const ESHUTDOWN: ::c_int = 108;
++pub const ETOOMANYREFS: ::c_int = 109;
++pub const ETIMEDOUT: ::c_int = 110;
++pub const ECONNREFUSED: ::c_int = 111;
++pub const EHOSTDOWN: ::c_int = 112;
++pub const EHOSTUNREACH: ::c_int = 113;
++pub const EALREADY: ::c_int = 114;
++pub const EINPROGRESS: ::c_int = 115;
++pub const ESTALE: ::c_int = 116;
++pub const EUCLEAN: ::c_int = 117;
++pub const ENOTNAM: ::c_int = 118;
++pub const ENAVAIL: ::c_int = 119;
++pub const EISNAM: ::c_int = 120;
++pub const EREMOTEIO: ::c_int = 121;
++pub const EDQUOT: ::c_int = 122;
++pub const ENOMEDIUM: ::c_int = 123;
++pub const EMEDIUMTYPE: ::c_int = 124;
++pub const ECANCELED: ::c_int = 125;
++pub const ENOKEY: ::c_int = 126;
++pub const EKEYEXPIRED: ::c_int = 127;
++pub const EKEYREVOKED: ::c_int = 128;
++pub const EKEYREJECTED: ::c_int = 129;
++pub const EOWNERDEAD: ::c_int = 130;
++pub const ENOTRECOVERABLE: ::c_int = 131;
++pub const ERFKILL: ::c_int = 132;
++pub const EHWPOISON: ::c_int = 133;
++
++pub const SO_REUSEADDR: ::c_int = 2;
++pub const SO_TYPE: ::c_int = 3;
++pub const SO_ERROR: ::c_int = 4;
++pub const SO_DONTROUTE: ::c_int = 5;
++pub const SO_BROADCAST: ::c_int = 6;
++pub const SO_SNDBUF: ::c_int = 7;
++pub const SO_RCVBUF: ::c_int = 8;
++pub const SO_KEEPALIVE: ::c_int = 9;
++pub const SO_OOBINLINE: ::c_int = 10;
++pub const SO_NO_CHECK: ::c_int = 11;
++pub const SO_PRIORITY: ::c_int = 12;
++pub const SO_LINGER: ::c_int = 13;
++pub const SO_BSDCOMPAT: ::c_int = 14;
++pub const SO_REUSEPORT: ::c_int = 15;
++pub const SO_PASSCRED: ::c_int = 16;
++pub const SO_PEERCRED: ::c_int = 17;
++pub const SO_RCVLOWAT: ::c_int = 18;
++pub const SO_SNDLOWAT: ::c_int = 19;
++pub const SO_RCVTIMEO: ::c_int = 20;
++pub const SO_SNDTIMEO: ::c_int = 21;
++pub const SO_ACCEPTCONN: ::c_int = 30;
++pub const SO_SNDBUFFORCE: ::c_int = 32;
++pub const SO_RCVBUFFORCE: ::c_int = 33;
++pub const SO_PROTOCOL: ::c_int = 38;
++pub const SO_DOMAIN: ::c_int = 39;
++
++pub const SA_ONSTACK: ::c_int = 0x08000000;
++pub const SA_SIGINFO: ::c_int = 0x00000004;
++pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
++
++pub const SIGCHLD: ::c_int = 17;
++pub const SIGBUS: ::c_int = 7;
++pub const SIGTTIN: ::c_int = 21;
++pub const SIGTTOU: ::c_int = 22;
++pub const SIGXCPU: ::c_int = 24;
++pub const SIGXFSZ: ::c_int = 25;
++pub const SIGVTALRM: ::c_int = 26;
++pub const SIGPROF: ::c_int = 27;
++pub const SIGWINCH: ::c_int = 28;
++pub const SIGUSR1: ::c_int = 10;
++pub const SIGUSR2: ::c_int = 12;
++pub const SIGCONT: ::c_int = 18;
++pub const SIGSTOP: ::c_int = 19;
++pub const SIGTSTP: ::c_int = 20;
++pub const SIGURG: ::c_int = 23;
++pub const SIGIO: ::c_int = 29;
++pub const SIGSYS: ::c_int = 31;
++pub const SIGSTKFLT: ::c_int = 16;
++pub const SIGPOLL: ::c_int = 29;
++pub const SIGPWR: ::c_int = 30;
++pub const SIG_SETMASK: ::c_int = 2;
++pub const SIG_BLOCK: ::c_int = 0x000000;
++pub const SIG_UNBLOCK: ::c_int = 0x01;
++
++pub const EXTPROC: ::tcflag_t = 0x00010000;
++
++pub const MAP_HUGETLB: ::c_int = 0x040000;
++pub const MAP_32BIT: ::c_int = 0x0040;
++
++pub const F_GETLK: ::c_int = 12;
++pub const F_GETOWN: ::c_int = 9;
++pub const F_SETLK: ::c_int = 13;
++pub const F_SETLKW: ::c_int = 14;
++pub const F_SETOWN: ::c_int = 8;
++
++pub const VEOF: usize = 4;
++pub const VEOL: usize = 11;
++pub const VEOL2: usize = 16;
++pub const VMIN: usize = 6;
++pub const IEXTEN: ::tcflag_t = 0x00008000;
++pub const TOSTOP: ::tcflag_t = 0x00000100;
++pub const FLUSHO: ::tcflag_t = 0x00001000;
++
++pub const TCGETS: ::c_int = 0x5401;
++pub const TCSETS: ::c_int = 0x5402;
++pub const TCSETSW: ::c_int = 0x5403;
++pub const TCSETSF: ::c_int = 0x5404;
++pub const TCGETA: ::c_int = 0x5405;
++pub const TCSETA: ::c_int = 0x5406;
++pub const TCSETAW: ::c_int = 0x5407;
++pub const TCSETAF: ::c_int = 0x5408;
++pub const TCSBRK: ::c_int = 0x5409;
++pub const TCXONC: ::c_int = 0x540A;
++pub const TCFLSH: ::c_int = 0x540B;
++pub const TIOCGSOFTCAR: ::c_int = 0x5419;
++pub const TIOCSSOFTCAR: ::c_int = 0x541A;
++pub const TIOCLINUX: ::c_int = 0x541C;
++pub const TIOCGSERIAL: ::c_int = 0x541E;
++pub const TIOCEXCL: ::c_int = 0x540C;
++pub const TIOCNXCL: ::c_int = 0x540D;
++pub const TIOCSCTTY: ::c_int = 0x540E;
++pub const TIOCGPGRP: ::c_int = 0x540F;
++pub const TIOCSPGRP: ::c_int = 0x5410;
++pub const TIOCOUTQ: ::c_int = 0x5411;
++pub const TIOCSTI: ::c_int = 0x5412;
++pub const TIOCGWINSZ: ::c_int = 0x5413;
++pub const TIOCSWINSZ: ::c_int = 0x5414;
++pub const TIOCMGET: ::c_int = 0x5415;
++pub const TIOCMBIS: ::c_int = 0x5416;
++pub const TIOCMBIC: ::c_int = 0x5417;
++pub const TIOCMSET: ::c_int = 0x5418;
++pub const FIONREAD: ::c_int = 0x541B;
++pub const TIOCCONS: ::c_int = 0x541D;
++
++pub const SYS_gettid: ::c_long = 224;
++pub const SYS_perf_event_open: ::c_long = 336;
++
++pub const POLLWRNORM: ::c_short = 0x100;
++pub const POLLWRBAND: ::c_short = 0x200;
++
++pub const TIOCM_LE: ::c_int = 0x001;
++pub const TIOCM_DTR: ::c_int = 0x002;
++pub const TIOCM_RTS: ::c_int = 0x004;
++pub const TIOCM_ST: ::c_int = 0x008;
++pub const TIOCM_SR: ::c_int = 0x010;
++pub const TIOCM_CTS: ::c_int = 0x020;
++pub const TIOCM_CAR: ::c_int = 0x040;
++pub const TIOCM_RNG: ::c_int = 0x080;
++pub const TIOCM_DSR: ::c_int = 0x100;
++pub const TIOCM_CD: ::c_int = TIOCM_CAR;
++pub const TIOCM_RI: ::c_int = TIOCM_RNG;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..003ee58c4d1510c6479795d8e675bd557959ce3e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,4 @@@
++pub type c_char = u8;
++pub type __u64 = ::c_ulonglong;
++
++pub const SYS_perf_event_open: ::c_long = 241;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e7b981350cefc2fc170b64be1f9c8c4bd879b08a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,400 @@@
++pub type wchar_t = i32;
++pub type c_long = i64;
++pub type c_ulong = u64;
++pub type nlink_t = u64;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino_t,
++        pub st_nlink: ::nlink_t,
++        pub st_mode: ::mode_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        __pad0: ::c_int,
++        pub st_rdev: ::dev_t,
++        pub st_size: ::off_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        __unused: [::c_long; 3],
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino64_t,
++        pub st_nlink: ::nlink_t,
++        pub st_mode: ::mode_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        __pad0: ::c_int,
++        pub st_rdev: ::dev_t,
++        pub st_size: ::off_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt64_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        __reserved: [::c_long; 3],
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_flags: ::c_int,
++        pub ss_size: ::size_t
++    }
++
++    pub struct pthread_attr_t {
++        __size: [u64; 7]
++    }
++
++    pub struct sigset_t {
++        __val: [::c_ulong; 16],
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_segsz: ::size_t,
++        pub shm_atime: ::time_t,
++        pub shm_dtime: ::time_t,
++        pub shm_ctime: ::time_t,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::c_ulong,
++        __pad1: ::c_ulong,
++        __pad2: ::c_ulong,
++    }
++
++    pub struct msqid_ds {
++        pub msg_perm: ::ipc_perm,
++        pub msg_stime: ::time_t,
++        pub msg_rtime: ::time_t,
++        pub msg_ctime: ::time_t,
++        __msg_cbytes: ::c_ulong,
++        pub msg_qnum: ::msgqnum_t,
++        pub msg_qbytes: ::msglen_t,
++        pub msg_lspid: ::pid_t,
++        pub msg_lrpid: ::pid_t,
++        __pad1: ::c_ulong,
++        __pad2: ::c_ulong,
++    }
++
++    pub struct statfs {
++        pub f_type: ::c_ulong,
++        pub f_bsize: ::c_ulong,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_fsid: ::fsid_t,
++        pub f_namelen: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_flags: ::c_ulong,
++        pub f_spare: [::c_ulong; 4],
++    }
++
++    pub struct msghdr {
++        pub msg_name: *mut ::c_void,
++        pub msg_namelen: ::socklen_t,
++        pub msg_iov: *mut ::iovec,
++        pub msg_iovlen: ::c_int,
++        __pad1: ::c_int,
++        pub msg_control: *mut ::c_void,
++        pub msg_controllen: ::socklen_t,
++        __pad2: ::socklen_t,
++        pub msg_flags: ::c_int,
++    }
++
++    pub struct cmsghdr {
++        pub cmsg_len: ::socklen_t,
++        pub __pad1: ::c_int,
++        pub cmsg_level: ::c_int,
++        pub cmsg_type: ::c_int,
++    }
++
++    pub struct sem_t {
++        __val: [::c_int; 8],
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_errno: ::c_int,
++        pub si_code: ::c_int,
++        pub _pad: [::c_int; 29],
++        _align: [usize; 0],
++    }
++}
++
++pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
++pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
++
++pub const O_DIRECT: ::c_int = 0x4000;
++pub const O_DIRECTORY: ::c_int = 0x10000;
++pub const O_NOFOLLOW: ::c_int = 0x20000;
++pub const O_ASYNC: ::c_int = 0x2000;
++pub const O_LARGEFILE: ::c_int = 0;
++
++pub const FIOCLEX: ::c_int = 0x5451;
++pub const FIONBIO: ::c_int = 0x5421;
++
++pub const RLIMIT_RSS: ::c_int = 5;
++pub const RLIMIT_NOFILE: ::c_int = 7;
++pub const RLIMIT_AS: ::c_int = 9;
++pub const RLIMIT_NPROC: ::c_int = 6;
++pub const RLIMIT_MEMLOCK: ::c_int = 8;
++
++pub const O_APPEND: ::c_int = 1024;
++pub const O_CREAT: ::c_int = 64;
++pub const O_EXCL: ::c_int = 128;
++pub const O_NOCTTY: ::c_int = 256;
++pub const O_NONBLOCK: ::c_int = 2048;
++pub const O_SYNC: ::c_int = 1052672;
++pub const O_RSYNC: ::c_int = 1052672;
++pub const O_DSYNC: ::c_int = 4096;
++
++pub const SOCK_NONBLOCK: ::c_int = 2048;
++
++pub const MAP_ANON: ::c_int = 0x0020;
++pub const MAP_GROWSDOWN: ::c_int = 0x0100;
++pub const MAP_DENYWRITE: ::c_int = 0x0800;
++pub const MAP_EXECUTABLE: ::c_int = 0x01000;
++pub const MAP_LOCKED: ::c_int = 0x02000;
++pub const MAP_NORESERVE: ::c_int = 0x04000;
++pub const MAP_POPULATE: ::c_int = 0x08000;
++pub const MAP_NONBLOCK: ::c_int = 0x010000;
++pub const MAP_STACK: ::c_int = 0x020000;
++pub const MAP_32BIT: ::c_int = 0x0040;
++
++pub const SOCK_STREAM: ::c_int = 1;
++pub const SOCK_DGRAM: ::c_int = 2;
++pub const SOCK_SEQPACKET: ::c_int = 5;
++
++pub const SOL_SOCKET: ::c_int = 1;
++
++pub const EDEADLK: ::c_int = 35;
++pub const ENAMETOOLONG: ::c_int = 36;
++pub const ENOLCK: ::c_int = 37;
++pub const ENOSYS: ::c_int = 38;
++pub const ENOTEMPTY: ::c_int = 39;
++pub const ELOOP: ::c_int = 40;
++pub const ENOMSG: ::c_int = 42;
++pub const EIDRM: ::c_int = 43;
++pub const ECHRNG: ::c_int = 44;
++pub const EL2NSYNC: ::c_int = 45;
++pub const EL3HLT: ::c_int = 46;
++pub const EL3RST: ::c_int = 47;
++pub const ELNRNG: ::c_int = 48;
++pub const EUNATCH: ::c_int = 49;
++pub const ENOCSI: ::c_int = 50;
++pub const EL2HLT: ::c_int = 51;
++pub const EBADE: ::c_int = 52;
++pub const EBADR: ::c_int = 53;
++pub const EXFULL: ::c_int = 54;
++pub const ENOANO: ::c_int = 55;
++pub const EBADRQC: ::c_int = 56;
++pub const EBADSLT: ::c_int = 57;
++pub const EDEADLOCK: ::c_int = EDEADLK;
++pub const EMULTIHOP: ::c_int = 72;
++pub const EBADMSG: ::c_int = 74;
++pub const EOVERFLOW: ::c_int = 75;
++pub const ENOTUNIQ: ::c_int = 76;
++pub const EBADFD: ::c_int = 77;
++pub const EREMCHG: ::c_int = 78;
++pub const ELIBACC: ::c_int = 79;
++pub const ELIBBAD: ::c_int = 80;
++pub const ELIBSCN: ::c_int = 81;
++pub const ELIBMAX: ::c_int = 82;
++pub const ELIBEXEC: ::c_int = 83;
++pub const EILSEQ: ::c_int = 84;
++pub const ERESTART: ::c_int = 85;
++pub const ESTRPIPE: ::c_int = 86;
++pub const EUSERS: ::c_int = 87;
++pub const ENOTSOCK: ::c_int = 88;
++pub const EDESTADDRREQ: ::c_int = 89;
++pub const EMSGSIZE: ::c_int = 90;
++pub const EPROTOTYPE: ::c_int = 91;
++pub const ENOPROTOOPT: ::c_int = 92;
++pub const EPROTONOSUPPORT: ::c_int = 93;
++pub const ESOCKTNOSUPPORT: ::c_int = 94;
++pub const EOPNOTSUPP: ::c_int = 95;
++pub const ENOTSUP: ::c_int = EOPNOTSUPP;
++pub const EPFNOSUPPORT: ::c_int = 96;
++pub const EAFNOSUPPORT: ::c_int = 97;
++pub const EADDRINUSE: ::c_int = 98;
++pub const EADDRNOTAVAIL: ::c_int = 99;
++pub const ENETDOWN: ::c_int = 100;
++pub const ENETUNREACH: ::c_int = 101;
++pub const ENETRESET: ::c_int = 102;
++pub const ECONNABORTED: ::c_int = 103;
++pub const ECONNRESET: ::c_int = 104;
++pub const ENOBUFS: ::c_int = 105;
++pub const EISCONN: ::c_int = 106;
++pub const ENOTCONN: ::c_int = 107;
++pub const ESHUTDOWN: ::c_int = 108;
++pub const ETOOMANYREFS: ::c_int = 109;
++pub const ETIMEDOUT: ::c_int = 110;
++pub const ECONNREFUSED: ::c_int = 111;
++pub const EHOSTDOWN: ::c_int = 112;
++pub const EHOSTUNREACH: ::c_int = 113;
++pub const EALREADY: ::c_int = 114;
++pub const EINPROGRESS: ::c_int = 115;
++pub const ESTALE: ::c_int = 116;
++pub const EUCLEAN: ::c_int = 117;
++pub const ENOTNAM: ::c_int = 118;
++pub const ENAVAIL: ::c_int = 119;
++pub const EISNAM: ::c_int = 120;
++pub const EREMOTEIO: ::c_int = 121;
++pub const EDQUOT: ::c_int = 122;
++pub const ENOMEDIUM: ::c_int = 123;
++pub const EMEDIUMTYPE: ::c_int = 124;
++pub const ECANCELED: ::c_int = 125;
++pub const ENOKEY: ::c_int = 126;
++pub const EKEYEXPIRED: ::c_int = 127;
++pub const EKEYREVOKED: ::c_int = 128;
++pub const EKEYREJECTED: ::c_int = 129;
++pub const EOWNERDEAD: ::c_int = 130;
++pub const ENOTRECOVERABLE: ::c_int = 131;
++pub const ERFKILL: ::c_int = 132;
++pub const EHWPOISON: ::c_int = 133;
++
++pub const SO_REUSEADDR: ::c_int = 2;
++pub const SO_TYPE: ::c_int = 3;
++pub const SO_ERROR: ::c_int = 4;
++pub const SO_DONTROUTE: ::c_int = 5;
++pub const SO_BROADCAST: ::c_int = 6;
++pub const SO_SNDBUF: ::c_int = 7;
++pub const SO_RCVBUF: ::c_int = 8;
++pub const SO_KEEPALIVE: ::c_int = 9;
++pub const SO_OOBINLINE: ::c_int = 10;
++pub const SO_NO_CHECK: ::c_int = 11;
++pub const SO_PRIORITY: ::c_int = 12;
++pub const SO_LINGER: ::c_int = 13;
++pub const SO_BSDCOMPAT: ::c_int = 14;
++pub const SO_REUSEPORT: ::c_int = 15;
++pub const SO_PASSCRED: ::c_int = 16;
++pub const SO_PEERCRED: ::c_int = 17;
++pub const SO_RCVLOWAT: ::c_int = 18;
++pub const SO_SNDLOWAT: ::c_int = 19;
++pub const SO_RCVTIMEO: ::c_int = 20;
++pub const SO_SNDTIMEO: ::c_int = 21;
++pub const SO_ACCEPTCONN: ::c_int = 30;
++pub const SO_SNDBUFFORCE: ::c_int = 32;
++pub const SO_RCVBUFFORCE: ::c_int = 33;
++pub const SO_PROTOCOL: ::c_int = 38;
++pub const SO_DOMAIN: ::c_int = 39;
++
++pub const SA_ONSTACK: ::c_int = 0x08000000;
++pub const SA_SIGINFO: ::c_int = 0x00000004;
++pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
++
++pub const SIGCHLD: ::c_int = 17;
++pub const SIGBUS: ::c_int = 7;
++pub const SIGTTIN: ::c_int = 21;
++pub const SIGTTOU: ::c_int = 22;
++pub const SIGXCPU: ::c_int = 24;
++pub const SIGXFSZ: ::c_int = 25;
++pub const SIGVTALRM: ::c_int = 26;
++pub const SIGPROF: ::c_int = 27;
++pub const SIGWINCH: ::c_int = 28;
++pub const SIGUSR1: ::c_int = 10;
++pub const SIGUSR2: ::c_int = 12;
++pub const SIGCONT: ::c_int = 18;
++pub const SIGSTOP: ::c_int = 19;
++pub const SIGTSTP: ::c_int = 20;
++pub const SIGURG: ::c_int = 23;
++pub const SIGIO: ::c_int = 29;
++pub const SIGSYS: ::c_int = 31;
++pub const SIGSTKFLT: ::c_int = 16;
++pub const SIGPOLL: ::c_int = 29;
++pub const SIGPWR: ::c_int = 30;
++pub const SIG_SETMASK: ::c_int = 2;
++pub const SIG_BLOCK: ::c_int = 0x000000;
++pub const SIG_UNBLOCK: ::c_int = 0x01;
++
++pub const EXTPROC: ::tcflag_t = 0x00010000;
++
++pub const MAP_HUGETLB: ::c_int = 0x040000;
++
++pub const F_GETLK: ::c_int = 5;
++pub const F_GETOWN: ::c_int = 9;
++pub const F_SETLK: ::c_int = 6;
++pub const F_SETLKW: ::c_int = 7;
++pub const F_SETOWN: ::c_int = 8;
++
++pub const VEOF: usize = 4;
++pub const VEOL: usize = 11;
++pub const VEOL2: usize = 16;
++pub const VMIN: usize = 6;
++pub const IEXTEN: ::tcflag_t = 0x00008000;
++pub const TOSTOP: ::tcflag_t = 0x00000100;
++pub const FLUSHO: ::tcflag_t = 0x00001000;
++
++pub const TCGETS: ::c_int = 0x5401;
++pub const TCSETS: ::c_int = 0x5402;
++pub const TCSETSW: ::c_int = 0x5403;
++pub const TCSETSF: ::c_int = 0x5404;
++pub const TCGETA: ::c_int = 0x5405;
++pub const TCSETA: ::c_int = 0x5406;
++pub const TCSETAW: ::c_int = 0x5407;
++pub const TCSETAF: ::c_int = 0x5408;
++pub const TCSBRK: ::c_int = 0x5409;
++pub const TCXONC: ::c_int = 0x540A;
++pub const TCFLSH: ::c_int = 0x540B;
++pub const TIOCGSOFTCAR: ::c_int = 0x5419;
++pub const TIOCSSOFTCAR: ::c_int = 0x541A;
++pub const TIOCLINUX: ::c_int = 0x541C;
++pub const TIOCGSERIAL: ::c_int = 0x541E;
++pub const TIOCEXCL: ::c_int = 0x540C;
++pub const TIOCNXCL: ::c_int = 0x540D;
++pub const TIOCSCTTY: ::c_int = 0x540E;
++pub const TIOCGPGRP: ::c_int = 0x540F;
++pub const TIOCSPGRP: ::c_int = 0x5410;
++pub const TIOCOUTQ: ::c_int = 0x5411;
++pub const TIOCSTI: ::c_int = 0x5412;
++pub const TIOCGWINSZ: ::c_int = 0x5413;
++pub const TIOCSWINSZ: ::c_int = 0x5414;
++pub const TIOCMGET: ::c_int = 0x5415;
++pub const TIOCMBIS: ::c_int = 0x5416;
++pub const TIOCMBIC: ::c_int = 0x5417;
++pub const TIOCMSET: ::c_int = 0x5418;
++pub const FIONREAD: ::c_int = 0x541B;
++pub const TIOCCONS: ::c_int = 0x541D;
++
++pub const POLLWRNORM: ::c_short = 0x100;
++pub const POLLWRBAND: ::c_short = 0x200;
++
++pub const TIOCM_LE: ::c_int = 0x001;
++pub const TIOCM_DTR: ::c_int = 0x002;
++pub const TIOCM_RTS: ::c_int = 0x004;
++pub const TIOCM_ST: ::c_int = 0x008;
++pub const TIOCM_SR: ::c_int = 0x010;
++pub const TIOCM_CTS: ::c_int = 0x020;
++pub const TIOCM_CAR: ::c_int = 0x040;
++pub const TIOCM_RNG: ::c_int = 0x080;
++pub const TIOCM_DSR: ::c_int = 0x100;
++pub const TIOCM_CD: ::c_int = TIOCM_CAR;
++pub const TIOCM_RI: ::c_int = TIOCM_RNG;
++
++cfg_if! {
++    if #[cfg(target_arch = "aarch64")] {
++        mod aarch64;
++        pub use self::aarch64::*;
++    } else if #[cfg(any(target_arch = "powerpc64"))] {
++        mod powerpc64;
++        pub use self::powerpc64::*;
++    } else if #[cfg(any(target_arch = "x86_64"))] {
++        mod x86_64;
++        pub use self::x86_64::*;
++    } else {
++        // Unknown target_arch
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e492107842899331015ed356c54d646084c9c633
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,4 @@@
++pub type c_char = u8;
++pub type __u64 = ::c_ulong;
++
++pub const SYS_perf_event_open: ::c_long = 319;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c611950b303a8568c0fbbe052972048d41674d3e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++pub type c_char = i8;
++pub type __u64 = ::c_ulonglong;
++
++s! {
++    pub struct mcontext_t {
++        __private: [u64; 32],
++    }
++
++    pub struct ucontext_t {
++        pub uc_flags: ::c_ulong,
++        pub uc_link: *mut ucontext_t,
++        pub uc_stack: ::stack_t,
++        pub uc_mcontext: mcontext_t,
++        pub uc_sigmask: ::sigset_t,
++        __private: [u8; 512],
++    }
++}
++
++pub const SYS_gettid: ::c_long = 186;
++
++pub const SYS_perf_event_open: ::c_long = 298;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9f1a87a92af5277a64d9598ab4a8eeedcf882539
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,348 @@@
++pub type clock_t = c_long;
++pub type time_t = c_long;
++pub type suseconds_t = c_long;
++pub type ino_t = u64;
++pub type off_t = i64;
++pub type blkcnt_t = i64;
++
++pub type blksize_t = c_long;
++pub type fsblkcnt_t = ::c_ulonglong;
++pub type fsfilcnt_t = ::c_ulonglong;
++pub type rlim_t = ::c_ulonglong;
++
++s! {
++    pub struct aiocb {
++        pub aio_fildes: ::c_int,
++        pub aio_lio_opcode: ::c_int,
++        pub aio_reqprio: ::c_int,
++        pub aio_buf: *mut ::c_void,
++        pub aio_nbytes: ::size_t,
++        pub aio_sigevent: ::sigevent,
++        __td: *mut ::c_void,
++        __lock: [::c_int; 2],
++        __err: ::c_int,
++        __ret: ::ssize_t,
++        pub aio_offset: off_t,
++        __next: *mut ::c_void,
++        __prev: *mut ::c_void,
++        #[cfg(target_pointer_width = "32")]
++        __dummy4: [::c_char; 24],
++        #[cfg(target_pointer_width = "64")]
++        __dummy4: [::c_char; 16],
++    }
++
++    pub struct sigaction {
++        pub sa_sigaction: ::sighandler_t,
++        pub sa_mask: ::sigset_t,
++        pub sa_flags: ::c_int,
++        pub sa_restorer: ::dox::Option<extern fn()>,
++    }
++
++    pub struct ipc_perm {
++        pub __ipc_perm_key: ::key_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++        pub cuid: ::uid_t,
++        pub cgid: ::gid_t,
++        pub mode: ::mode_t,
++        pub __seq: ::c_int,
++        __unused1: ::c_long,
++        __unused2: ::c_long
++    }
++
++    pub struct termios {
++        pub c_iflag: ::tcflag_t,
++        pub c_oflag: ::tcflag_t,
++        pub c_cflag: ::tcflag_t,
++        pub c_lflag: ::tcflag_t,
++        pub c_line: ::cc_t,
++        pub c_cc: [::cc_t; ::NCCS],
++        pub __c_ispeed: ::speed_t,
++        pub __c_ospeed: ::speed_t,
++    }
++
++    pub struct flock {
++        pub l_type: ::c_short,
++        pub l_whence: ::c_short,
++        pub l_start: ::off_t,
++        pub l_len: ::off_t,
++        pub l_pid: ::pid_t,
++    }
++
++    pub struct sysinfo {
++        pub uptime: ::c_ulong,
++        pub loads: [::c_ulong; 3],
++        pub totalram: ::c_ulong,
++        pub freeram: ::c_ulong,
++        pub sharedram: ::c_ulong,
++        pub bufferram: ::c_ulong,
++        pub totalswap: ::c_ulong,
++        pub freeswap: ::c_ulong,
++        pub procs: ::c_ushort,
++        pub pad: ::c_ushort,
++        pub totalhigh: ::c_ulong,
++        pub freehigh: ::c_ulong,
++        pub mem_unit: ::c_uint,
++        pub __reserved: [::c_char; 256],
++    }
++}
++
++pub const SFD_CLOEXEC: ::c_int = 0x080000;
++
++pub const NCCS: usize = 32;
++
++pub const O_TRUNC: ::c_int = 512;
++pub const O_NOATIME: ::c_int = 0o1000000;
++pub const O_CLOEXEC: ::c_int = 0x80000;
++
++pub const EBFONT: ::c_int = 59;
++pub const ENOSTR: ::c_int = 60;
++pub const ENODATA: ::c_int = 61;
++pub const ETIME: ::c_int = 62;
++pub const ENOSR: ::c_int = 63;
++pub const ENONET: ::c_int = 64;
++pub const ENOPKG: ::c_int = 65;
++pub const EREMOTE: ::c_int = 66;
++pub const ENOLINK: ::c_int = 67;
++pub const EADV: ::c_int = 68;
++pub const ESRMNT: ::c_int = 69;
++pub const ECOMM: ::c_int = 70;
++pub const EPROTO: ::c_int = 71;
++pub const EDOTDOT: ::c_int = 73;
++
++pub const SA_NODEFER: ::c_int = 0x40000000;
++pub const SA_RESETHAND: ::c_int = 0x80000000;
++pub const SA_RESTART: ::c_int = 0x10000000;
++pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
++
++pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
++
++pub const EFD_CLOEXEC: ::c_int = 0x80000;
++
++pub const BUFSIZ: ::c_uint = 1024;
++pub const TMP_MAX: ::c_uint = 10000;
++pub const FOPEN_MAX: ::c_uint = 1000;
++pub const O_PATH: ::c_int = 0o10000000;
++pub const O_EXEC: ::c_int = 0o10000000;
++pub const O_SEARCH: ::c_int = 0o10000000;
++pub const O_ACCMODE: ::c_int = 0o10000003;
++pub const O_NDELAY: ::c_int = O_NONBLOCK;
++pub const NI_MAXHOST: ::socklen_t = 255;
++pub const PTHREAD_STACK_MIN: ::size_t = 2048;
++pub const POSIX_FADV_DONTNEED: ::c_int = 4;
++pub const POSIX_FADV_NOREUSE: ::c_int = 5;
++
++pub const POSIX_MADV_DONTNEED: ::c_int = 4;
++
++pub const RLIM_INFINITY: ::rlim_t = !0;
++pub const RLIMIT_RTTIME: ::c_int = 15;
++pub const RLIMIT_NLIMITS: ::c_int = 16;
++
++pub const MAP_ANONYMOUS: ::c_int = MAP_ANON;
++
++pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
++pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
++pub const TCP_THIN_DUPACK: ::c_int = 17;
++pub const TCP_USER_TIMEOUT: ::c_int = 18;
++pub const TCP_REPAIR: ::c_int = 19;
++pub const TCP_REPAIR_QUEUE: ::c_int = 20;
++pub const TCP_QUEUE_SEQ: ::c_int = 21;
++pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
++pub const TCP_FASTOPEN: ::c_int = 23;
++pub const TCP_TIMESTAMP: ::c_int = 24;
++
++pub const SIGUNUSED: ::c_int = ::SIGSYS;
++
++pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
++
++pub const CPU_SETSIZE: ::c_int = 128;
++
++pub const QFMT_VFS_V1: ::c_int = 4;
++
++pub const PTRACE_TRACEME: ::c_int = 0;
++pub const PTRACE_PEEKTEXT: ::c_int = 1;
++pub const PTRACE_PEEKDATA: ::c_int = 2;
++pub const PTRACE_PEEKUSER: ::c_int = 3;
++pub const PTRACE_POKETEXT: ::c_int = 4;
++pub const PTRACE_POKEDATA: ::c_int = 5;
++pub const PTRACE_POKEUSER: ::c_int = 6;
++pub const PTRACE_CONT: ::c_int = 7;
++pub const PTRACE_KILL: ::c_int = 8;
++pub const PTRACE_SINGLESTEP: ::c_int = 9;
++pub const PTRACE_ATTACH: ::c_int = 16;
++pub const PTRACE_DETACH: ::c_int = 17;
++pub const PTRACE_SYSCALL: ::c_int = 24;
++pub const PTRACE_SETOPTIONS: ::c_int = 0x4200;
++pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201;
++pub const PTRACE_GETSIGINFO: ::c_int = 0x4202;
++pub const PTRACE_SETSIGINFO: ::c_int = 0x4203;
++pub const PTRACE_GETREGSET: ::c_int = 0x4204;
++pub const PTRACE_SETREGSET: ::c_int = 0x4205;
++pub const PTRACE_SEIZE: ::c_int = 0x4206;
++pub const PTRACE_INTERRUPT: ::c_int = 0x4207;
++pub const PTRACE_LISTEN: ::c_int = 0x4208;
++pub const PTRACE_PEEKSIGINFO: ::c_int = 0x4209;
++
++pub const PTRACE_O_EXITKILL: ::c_int = 1048576;
++pub const PTRACE_O_TRACECLONE: ::c_int = 8;
++pub const PTRACE_O_TRACEEXEC: ::c_int = 16;
++pub const PTRACE_O_TRACEEXIT: ::c_int = 64;
++pub const PTRACE_O_TRACEFORK: ::c_int = 2;
++pub const PTRACE_O_TRACESYSGOOD: ::c_int = 1;
++pub const PTRACE_O_TRACEVFORK: ::c_int = 4;
++pub const PTRACE_O_TRACEVFORKDONE: ::c_int = 32;
++pub const PTRACE_O_SUSPEND_SECCOMP: ::c_int = 2097152;
++
++pub const MADV_DODUMP: ::c_int = 17;
++pub const MADV_DONTDUMP: ::c_int = 16;
++
++pub const EPOLLWAKEUP: ::c_int = 0x20000000;
++
++pub const MADV_HUGEPAGE: ::c_int = 14;
++pub const MADV_NOHUGEPAGE: ::c_int = 15;
++
++pub const PTRACE_GETFPREGS: ::c_uint = 14;
++pub const PTRACE_SETFPREGS: ::c_uint = 15;
++pub const PTRACE_GETFPXREGS: ::c_uint = 18;
++pub const PTRACE_SETFPXREGS: ::c_uint = 19;
++pub const PTRACE_GETREGS: ::c_uint = 12;
++pub const PTRACE_SETREGS: ::c_uint = 13;
++
++pub const EFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
++
++pub const SFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
++
++pub const TCSANOW: ::c_int = 0;
++pub const TCSADRAIN: ::c_int = 1;
++pub const TCSAFLUSH: ::c_int = 2;
++
++pub const TIOCINQ: ::c_int = ::FIONREAD;
++
++pub const RTLD_GLOBAL: ::c_int = 0x100;
++pub const RTLD_NOLOAD: ::c_int = 0x4;
++
++// TODO(#247) Temporarily musl-specific (available since musl 0.9.12 / Linux
++// kernel 3.10).  See also notbsd/mod.rs
++pub const CLOCK_SGI_CYCLE: ::clockid_t = 10;
++pub const CLOCK_TAI: ::clockid_t = 11;
++
++pub const MCL_CURRENT: ::c_int = 0x0001;
++pub const MCL_FUTURE: ::c_int = 0x0002;
++
++pub const SIGSTKSZ: ::size_t = 8192;
++pub const MINSIGSTKSZ: ::size_t = 2048;
++pub const CBAUD: ::tcflag_t = 0o0010017;
++pub const TAB1: ::c_int = 0x00000800;
++pub const TAB2: ::c_int = 0x00001000;
++pub const TAB3: ::c_int = 0x00001800;
++pub const CR1: ::c_int  = 0x00000200;
++pub const CR2: ::c_int  = 0x00000400;
++pub const CR3: ::c_int  = 0x00000600;
++pub const FF1: ::c_int  = 0x00008000;
++pub const BS1: ::c_int  = 0x00002000;
++pub const VT1: ::c_int  = 0x00004000;
++pub const VWERASE: usize = 14;
++pub const VREPRINT: usize = 12;
++pub const VSUSP: usize = 10;
++pub const VSTART: usize = 8;
++pub const VSTOP: usize = 9;
++pub const VDISCARD: usize = 13;
++pub const VTIME: usize = 5;
++pub const IXON: ::tcflag_t = 0x00000400;
++pub const IXOFF: ::tcflag_t = 0x00001000;
++pub const ONLCR: ::tcflag_t = 0x4;
++pub const CSIZE: ::tcflag_t = 0x00000030;
++pub const CS6: ::tcflag_t = 0x00000010;
++pub const CS7: ::tcflag_t = 0x00000020;
++pub const CS8: ::tcflag_t = 0x00000030;
++pub const CSTOPB: ::tcflag_t = 0x00000040;
++pub const CREAD: ::tcflag_t = 0x00000080;
++pub const PARENB: ::tcflag_t = 0x00000100;
++pub const PARODD: ::tcflag_t = 0x00000200;
++pub const HUPCL: ::tcflag_t = 0x00000400;
++pub const CLOCAL: ::tcflag_t = 0x00000800;
++pub const ECHOKE: ::tcflag_t = 0x00000800;
++pub const ECHOE: ::tcflag_t = 0x00000010;
++pub const ECHOK: ::tcflag_t = 0x00000020;
++pub const ECHONL: ::tcflag_t = 0x00000040;
++pub const ECHOPRT: ::tcflag_t = 0x00000400;
++pub const ECHOCTL: ::tcflag_t = 0x00000200;
++pub const ISIG: ::tcflag_t = 0x00000001;
++pub const ICANON: ::tcflag_t = 0x00000002;
++pub const PENDIN: ::tcflag_t = 0x00004000;
++pub const NOFLSH: ::tcflag_t = 0x00000080;
++pub const CIBAUD: ::tcflag_t = 0o02003600000;
++pub const CBAUDEX: ::tcflag_t = 0o010000;
++pub const VSWTC: usize = 7;
++pub const OLCUC:  ::tcflag_t = 0o000002;
++pub const NLDLY:  ::tcflag_t = 0o000400;
++pub const CRDLY:  ::tcflag_t = 0o003000;
++pub const TABDLY: ::tcflag_t = 0o014000;
++pub const BSDLY:  ::tcflag_t = 0o020000;
++pub const FFDLY:  ::tcflag_t = 0o100000;
++pub const VTDLY:  ::tcflag_t = 0o040000;
++pub const XTABS:  ::tcflag_t = 0o014000;
++
++pub const B0: ::speed_t = 0o000000;
++pub const B50: ::speed_t = 0o000001;
++pub const B75: ::speed_t = 0o000002;
++pub const B110: ::speed_t = 0o000003;
++pub const B134: ::speed_t = 0o000004;
++pub const B150: ::speed_t = 0o000005;
++pub const B200: ::speed_t = 0o000006;
++pub const B300: ::speed_t = 0o000007;
++pub const B600: ::speed_t = 0o000010;
++pub const B1200: ::speed_t = 0o000011;
++pub const B1800: ::speed_t = 0o000012;
++pub const B2400: ::speed_t = 0o000013;
++pub const B4800: ::speed_t = 0o000014;
++pub const B9600: ::speed_t = 0o000015;
++pub const B19200: ::speed_t = 0o000016;
++pub const B38400: ::speed_t = 0o000017;
++pub const EXTA: ::speed_t = B19200;
++pub const EXTB: ::speed_t = B38400;
++pub const B57600: ::speed_t = 0o010001;
++pub const B115200: ::speed_t = 0o010002;
++pub const B230400: ::speed_t = 0o010003;
++pub const B460800: ::speed_t = 0o010004;
++pub const B500000: ::speed_t = 0o010005;
++pub const B576000: ::speed_t = 0o010006;
++pub const B921600: ::speed_t = 0o010007;
++pub const B1000000: ::speed_t = 0o010010;
++pub const B1152000: ::speed_t = 0o010011;
++pub const B1500000: ::speed_t = 0o010012;
++pub const B2000000: ::speed_t = 0o010013;
++pub const B2500000: ::speed_t = 0o010014;
++pub const B3000000: ::speed_t = 0o010015;
++pub const B3500000: ::speed_t = 0o010016;
++pub const B4000000: ::speed_t = 0o010017;
++
++pub const SO_BINDTODEVICE: ::c_int = 25;
++pub const SO_TIMESTAMP: ::c_int = 29;
++pub const SO_MARK: ::c_int = 36;
++pub const SO_RXQ_OVFL: ::c_int = 40;
++pub const SO_PEEK_OFF: ::c_int = 42;
++pub const SO_BUSY_POLL: ::c_int = 46;
++
++extern {
++    pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
++    pub fn ptrace(request: ::c_int, ...) -> ::c_long;
++    pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
++    pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
++}
++
++cfg_if! {
++    if #[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))] {
++        mod b64;
++        pub use self::b64::*;
++    } else if #[cfg(any(target_arch = "x86",
++                        target_arch = "mips",
++                        target_arch = "arm",
++                        target_arch = "asmjs",
++                        target_arch = "wasm32"))] {
++        mod b32;
++        pub use self::b32::*;
++    } else { }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e2326e3a7cd4df33fe9618e4a54014dacb003718
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,218 @@@
++pub type c_char = u8;
++pub type wchar_t = u32;
++
++s! {
++    pub struct ipc_perm {
++        pub __key: ::key_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++        pub cuid: ::uid_t,
++        pub cgid: ::gid_t,
++        pub mode: ::c_ushort,
++        __pad1: ::c_ushort,
++        pub __seq: ::c_ushort,
++        __pad2: ::c_ushort,
++        __unused1: ::c_ulong,
++        __unused2: ::c_ulong
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::dev_t,
++        __pad1: ::c_uint,
++        __st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __pad2: ::c_uint,
++        pub st_size: ::off64_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt64_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_ino: ::ino64_t,
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_segsz: ::size_t,
++        pub shm_atime: ::time_t,
++        __unused1: ::c_ulong,
++        pub shm_dtime: ::time_t,
++        __unused2: ::c_ulong,
++        pub shm_ctime: ::time_t,
++        __unused3: ::c_ulong,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::shmatt_t,
++        __unused4: ::c_ulong,
++        __unused5: ::c_ulong
++    }
++
++    pub struct msqid_ds {
++        pub msg_perm: ::ipc_perm,
++        pub msg_stime: ::time_t,
++        __glibc_reserved1: ::c_ulong,
++        pub msg_rtime: ::time_t,
++        __glibc_reserved2: ::c_ulong,
++        pub msg_ctime: ::time_t,
++        __glibc_reserved3: ::c_ulong,
++        __msg_cbytes: ::c_ulong,
++        pub msg_qnum: ::msgqnum_t,
++        pub msg_qbytes: ::msglen_t,
++        pub msg_lspid: ::pid_t,
++        pub msg_lrpid: ::pid_t,
++        __glibc_reserved4: ::c_ulong,
++        __glibc_reserved5: ::c_ulong,
++    }
++}
++
++pub const O_DIRECT: ::c_int = 0x10000;
++pub const O_DIRECTORY: ::c_int = 0x4000;
++pub const O_NOFOLLOW: ::c_int = 0x8000;
++pub const O_LARGEFILE: ::c_int = 0o400000;
++
++pub const MAP_LOCKED: ::c_int = 0x02000;
++pub const MAP_NORESERVE: ::c_int = 0x04000;
++
++pub const EDEADLOCK: ::c_int = 35;
++
++pub const SO_PASSCRED: ::c_int = 16;
++pub const SO_PEERCRED: ::c_int = 17;
++pub const SO_RCVLOWAT: ::c_int = 18;
++pub const SO_SNDLOWAT: ::c_int = 19;
++pub const SO_RCVTIMEO: ::c_int = 20;
++pub const SO_SNDTIMEO: ::c_int = 21;
++pub const SO_SNDBUFFORCE: ::c_int = 32;
++pub const SO_RCVBUFFORCE: ::c_int = 33;
++
++pub const FIOCLEX: ::c_ulong = 0x5451;
++pub const FIONBIO: ::c_ulong = 0x5421;
++
++pub const SYS_gettid: ::c_long = 224;
++pub const SYS_perf_event_open: ::c_long = 364;
++
++pub const PTRACE_GETFPXREGS: ::c_uint = 18;
++pub const PTRACE_SETFPXREGS: ::c_uint = 19;
++
++pub const MCL_CURRENT: ::c_int = 0x0001;
++pub const MCL_FUTURE: ::c_int = 0x0002;
++
++pub const SIGSTKSZ: ::size_t = 8192;
++pub const MINSIGSTKSZ: ::size_t = 2048;
++pub const CBAUD: ::tcflag_t = 0o0010017;
++pub const TAB1: ::c_int = 0x00000800;
++pub const TAB2: ::c_int = 0x00001000;
++pub const TAB3: ::c_int = 0x00001800;
++pub const CR1: ::c_int  = 0x00000200;
++pub const CR2: ::c_int  = 0x00000400;
++pub const CR3: ::c_int  = 0x00000600;
++pub const FF1: ::c_int  = 0x00008000;
++pub const BS1: ::c_int  = 0x00002000;
++pub const VT1: ::c_int  = 0x00004000;
++pub const VWERASE: usize = 14;
++pub const VREPRINT: usize = 12;
++pub const VSUSP: usize = 10;
++pub const VSTART: usize = 8;
++pub const VSTOP: usize = 9;
++pub const VDISCARD: usize = 13;
++pub const VTIME: usize = 5;
++pub const IXON: ::tcflag_t = 0x00000400;
++pub const IXOFF: ::tcflag_t = 0x00001000;
++pub const ONLCR: ::tcflag_t = 0x4;
++pub const CSIZE: ::tcflag_t = 0x00000030;
++pub const CS6: ::tcflag_t = 0x00000010;
++pub const CS7: ::tcflag_t = 0x00000020;
++pub const CS8: ::tcflag_t = 0x00000030;
++pub const CSTOPB: ::tcflag_t = 0x00000040;
++pub const CREAD: ::tcflag_t = 0x00000080;
++pub const PARENB: ::tcflag_t = 0x00000100;
++pub const PARODD: ::tcflag_t = 0x00000200;
++pub const HUPCL: ::tcflag_t = 0x00000400;
++pub const CLOCAL: ::tcflag_t = 0x00000800;
++pub const ECHOKE: ::tcflag_t = 0x00000800;
++pub const ECHOE: ::tcflag_t = 0x00000010;
++pub const ECHOK: ::tcflag_t = 0x00000020;
++pub const ECHONL: ::tcflag_t = 0x00000040;
++pub const ECHOPRT: ::tcflag_t = 0x00000400;
++pub const ECHOCTL: ::tcflag_t = 0x00000200;
++pub const ISIG: ::tcflag_t = 0x00000001;
++pub const ICANON: ::tcflag_t = 0x00000002;
++pub const PENDIN: ::tcflag_t = 0x00004000;
++pub const NOFLSH: ::tcflag_t = 0x00000080;
++pub const CIBAUD: ::tcflag_t = 0o02003600000;
++pub const CBAUDEX: ::tcflag_t = 0o010000;
++pub const VSWTC: usize = 7;
++pub const OLCUC:  ::tcflag_t = 0o000002;
++pub const NLDLY:  ::tcflag_t = 0o000400;
++pub const CRDLY:  ::tcflag_t = 0o003000;
++pub const TABDLY: ::tcflag_t = 0o014000;
++pub const BSDLY:  ::tcflag_t = 0o020000;
++pub const FFDLY:  ::tcflag_t = 0o100000;
++pub const VTDLY:  ::tcflag_t = 0o040000;
++pub const XTABS:  ::tcflag_t = 0o014000;
++
++pub const B0: ::speed_t = 0o000000;
++pub const B50: ::speed_t = 0o000001;
++pub const B75: ::speed_t = 0o000002;
++pub const B110: ::speed_t = 0o000003;
++pub const B134: ::speed_t = 0o000004;
++pub const B150: ::speed_t = 0o000005;
++pub const B200: ::speed_t = 0o000006;
++pub const B300: ::speed_t = 0o000007;
++pub const B600: ::speed_t = 0o000010;
++pub const B1200: ::speed_t = 0o000011;
++pub const B1800: ::speed_t = 0o000012;
++pub const B2400: ::speed_t = 0o000013;
++pub const B4800: ::speed_t = 0o000014;
++pub const B9600: ::speed_t = 0o000015;
++pub const B19200: ::speed_t = 0o000016;
++pub const B38400: ::speed_t = 0o000017;
++pub const EXTA: ::speed_t = B19200;
++pub const EXTB: ::speed_t = B38400;
++pub const B57600: ::speed_t = 0o010001;
++pub const B115200: ::speed_t = 0o010002;
++pub const B230400: ::speed_t = 0o010003;
++pub const B460800: ::speed_t = 0o010004;
++pub const B500000: ::speed_t = 0o010005;
++pub const B576000: ::speed_t = 0o010006;
++pub const B921600: ::speed_t = 0o010007;
++pub const B1000000: ::speed_t = 0o010010;
++pub const B1152000: ::speed_t = 0o010011;
++pub const B1500000: ::speed_t = 0o010012;
++pub const B2000000: ::speed_t = 0o010013;
++pub const B2500000: ::speed_t = 0o010014;
++pub const B3000000: ::speed_t = 0o010015;
++pub const B3500000: ::speed_t = 0o010016;
++pub const B4000000: ::speed_t = 0o010017;
++
++pub const VEOL: usize = 11;
++pub const VEOL2: usize = 16;
++pub const VMIN: usize = 6;
++pub const IEXTEN: ::tcflag_t = 0x00008000;
++pub const TOSTOP: ::tcflag_t = 0x00000100;
++pub const FLUSHO: ::tcflag_t = 0x00001000;
++pub const EXTPROC: ::tcflag_t = 0x00010000;
++pub const TCGETS: ::c_ulong = 0x5401;
++pub const TCSETS: ::c_ulong = 0x5402;
++pub const TCSETSW: ::c_ulong = 0x5403;
++pub const TCSETSF: ::c_ulong = 0x5404;
++pub const TCGETA: ::c_ulong = 0x5405;
++pub const TCSETA: ::c_ulong = 0x5406;
++pub const TCSETAW: ::c_ulong = 0x5407;
++pub const TCSETAF: ::c_ulong = 0x5408;
++pub const TCSBRK: ::c_ulong = 0x5409;
++pub const TCXONC: ::c_ulong = 0x540A;
++pub const TCFLSH: ::c_ulong = 0x540B;
++pub const TIOCINQ: ::c_ulong = 0x541B;
++pub const TIOCGPGRP: ::c_ulong = 0x540F;
++pub const TIOCSPGRP: ::c_ulong = 0x5410;
++pub const TIOCOUTQ: ::c_ulong = 0x5411;
++pub const TIOCGWINSZ: ::c_ulong = 0x5413;
++pub const TIOCSWINSZ: ::c_ulong = 0x5414;
++pub const FIONREAD: ::c_ulong = 0x541B;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..247f01bb3102df3aec2c32ca848340d1c847e423
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,297 @@@
++//! 32-bit specific definitions for linux-like values
++
++pub type c_long = i32;
++pub type c_ulong = u32;
++pub type clock_t = i32;
++pub type time_t = i32;
++pub type suseconds_t = i32;
++pub type ino_t = u32;
++pub type off_t = i32;
++pub type blkcnt_t = i32;
++pub type __fsword_t = i32;
++
++pub type blksize_t = i32;
++pub type nlink_t = u32;
++pub type __u64 = ::c_ulonglong;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        __pad1: ::c_short,
++        pub st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __pad2: ::c_short,
++        pub st_size: ::off_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        __unused4: ::c_long,
++        __unused5: ::c_long,
++    }
++
++    pub struct pthread_attr_t {
++        __size: [u32; 9]
++    }
++
++    pub struct sigset_t {
++        __val: [::c_ulong; 32],
++    }
++
++    pub struct sysinfo {
++        pub uptime: ::c_long,
++        pub loads: [::c_ulong; 3],
++        pub totalram: ::c_ulong,
++        pub freeram: ::c_ulong,
++        pub sharedram: ::c_ulong,
++        pub bufferram: ::c_ulong,
++        pub totalswap: ::c_ulong,
++        pub freeswap: ::c_ulong,
++        pub procs: ::c_ushort,
++        pub pad: ::c_ushort,
++        pub totalhigh: ::c_ulong,
++        pub freehigh: ::c_ulong,
++        pub mem_unit: ::c_uint,
++        pub _f: [::c_char; 8],
++    }
++}
++
++pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
++pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
++
++pub const RLIMIT_NOFILE: ::c_int = 7;
++pub const RLIMIT_NPROC: ::c_int = 6;
++
++pub const O_APPEND: ::c_int = 1024;
++pub const O_CREAT: ::c_int = 64;
++pub const O_EXCL: ::c_int = 128;
++pub const O_NOCTTY: ::c_int = 256;
++pub const O_NONBLOCK: ::c_int = 2048;
++pub const O_SYNC: ::c_int = 1052672;
++pub const O_RSYNC: ::c_int = 1052672;
++pub const O_DSYNC: ::c_int = 4096;
++pub const O_FSYNC: ::c_int = 0x101000;
++pub const O_NOATIME: ::c_int = 0o1000000;
++pub const O_PATH: ::c_int = 0o10000000;
++
++pub const MAP_GROWSDOWN: ::c_int = 0x0100;
++
++pub const EDEADLK: ::c_int = 35;
++pub const ENAMETOOLONG: ::c_int = 36;
++pub const ENOLCK: ::c_int = 37;
++pub const ENOSYS: ::c_int = 38;
++pub const ENOTEMPTY: ::c_int = 39;
++pub const ELOOP: ::c_int = 40;
++pub const ENOMSG: ::c_int = 42;
++pub const EIDRM: ::c_int = 43;
++pub const ECHRNG: ::c_int = 44;
++pub const EL2NSYNC: ::c_int = 45;
++pub const EL3HLT: ::c_int = 46;
++pub const EL3RST: ::c_int = 47;
++pub const ELNRNG: ::c_int = 48;
++pub const EUNATCH: ::c_int = 49;
++pub const ENOCSI: ::c_int = 50;
++pub const EL2HLT: ::c_int = 51;
++pub const EBADE: ::c_int = 52;
++pub const EBADR: ::c_int = 53;
++pub const EXFULL: ::c_int = 54;
++pub const ENOANO: ::c_int = 55;
++pub const EBADRQC: ::c_int = 56;
++pub const EBADSLT: ::c_int = 57;
++pub const EMULTIHOP: ::c_int = 72;
++pub const EOVERFLOW: ::c_int = 75;
++pub const ENOTUNIQ: ::c_int = 76;
++pub const EBADFD: ::c_int = 77;
++pub const EBADMSG: ::c_int = 74;
++pub const EREMCHG: ::c_int = 78;
++pub const ELIBACC: ::c_int = 79;
++pub const ELIBBAD: ::c_int = 80;
++pub const ELIBSCN: ::c_int = 81;
++pub const ELIBMAX: ::c_int = 82;
++pub const ELIBEXEC: ::c_int = 83;
++pub const EILSEQ: ::c_int = 84;
++pub const ERESTART: ::c_int = 85;
++pub const ESTRPIPE: ::c_int = 86;
++pub const EUSERS: ::c_int = 87;
++pub const ENOTSOCK: ::c_int = 88;
++pub const EDESTADDRREQ: ::c_int = 89;
++pub const EMSGSIZE: ::c_int = 90;
++pub const EPROTOTYPE: ::c_int = 91;
++pub const ENOPROTOOPT: ::c_int = 92;
++pub const EPROTONOSUPPORT: ::c_int = 93;
++pub const ESOCKTNOSUPPORT: ::c_int = 94;
++pub const EOPNOTSUPP: ::c_int = 95;
++pub const EPFNOSUPPORT: ::c_int = 96;
++pub const EAFNOSUPPORT: ::c_int = 97;
++pub const EADDRINUSE: ::c_int = 98;
++pub const EADDRNOTAVAIL: ::c_int = 99;
++pub const ENETDOWN: ::c_int = 100;
++pub const ENETUNREACH: ::c_int = 101;
++pub const ENETRESET: ::c_int = 102;
++pub const ECONNABORTED: ::c_int = 103;
++pub const ECONNRESET: ::c_int = 104;
++pub const ENOBUFS: ::c_int = 105;
++pub const EISCONN: ::c_int = 106;
++pub const ENOTCONN: ::c_int = 107;
++pub const ESHUTDOWN: ::c_int = 108;
++pub const ETOOMANYREFS: ::c_int = 109;
++pub const ETIMEDOUT: ::c_int = 110;
++pub const ECONNREFUSED: ::c_int = 111;
++pub const EHOSTDOWN: ::c_int = 112;
++pub const EHOSTUNREACH: ::c_int = 113;
++pub const EALREADY: ::c_int = 114;
++pub const EINPROGRESS: ::c_int = 115;
++pub const ESTALE: ::c_int = 116;
++pub const EDQUOT: ::c_int = 122;
++pub const ENOMEDIUM: ::c_int = 123;
++pub const EMEDIUMTYPE: ::c_int = 124;
++pub const ECANCELED: ::c_int = 125;
++pub const ENOKEY: ::c_int = 126;
++pub const EKEYEXPIRED: ::c_int = 127;
++pub const EKEYREVOKED: ::c_int = 128;
++pub const EKEYREJECTED: ::c_int = 129;
++pub const EOWNERDEAD: ::c_int = 130;
++pub const ENOTRECOVERABLE: ::c_int = 131;
++pub const EHWPOISON: ::c_int = 133;
++pub const ERFKILL: ::c_int = 132;
++
++pub const SOL_SOCKET: ::c_int = 1;
++
++pub const SO_REUSEADDR: ::c_int = 2;
++pub const SO_TYPE: ::c_int = 3;
++pub const SO_ERROR: ::c_int = 4;
++pub const SO_DONTROUTE: ::c_int = 5;
++pub const SO_BROADCAST: ::c_int = 6;
++pub const SO_SNDBUF: ::c_int = 7;
++pub const SO_RCVBUF: ::c_int = 8;
++pub const SO_KEEPALIVE: ::c_int = 9;
++pub const SO_OOBINLINE: ::c_int = 10;
++pub const SO_PRIORITY: ::c_int = 12;
++pub const SO_LINGER: ::c_int = 13;
++pub const SO_BSDCOMPAT: ::c_int = 14;
++pub const SO_REUSEPORT: ::c_int = 15;
++pub const SO_BINDTODEVICE: ::c_int = 25;
++pub const SO_TIMESTAMP: ::c_int = 29;
++pub const SO_ACCEPTCONN: ::c_int = 30;
++pub const SO_MARK: ::c_int = 36;
++pub const SO_PROTOCOL: ::c_int = 38;
++pub const SO_DOMAIN: ::c_int = 39;
++pub const SO_RXQ_OVFL: ::c_int = 40;
++pub const SO_PEEK_OFF: ::c_int = 42;
++pub const SO_BUSY_POLL: ::c_int = 46;
++
++pub const SA_ONSTACK: ::c_int = 0x08000000;
++pub const SA_SIGINFO: ::c_int = 0x00000004;
++pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
++
++pub const SIGCHLD: ::c_int = 17;
++pub const SIGBUS: ::c_int = 7;
++pub const SIGUSR1: ::c_int = 10;
++pub const SIGUSR2: ::c_int = 12;
++pub const SIGCONT: ::c_int = 18;
++pub const SIGSTOP: ::c_int = 19;
++pub const SIGTSTP: ::c_int = 20;
++pub const SIGURG: ::c_int = 23;
++pub const SIGIO: ::c_int = 29;
++pub const SIGSYS: ::c_int = 31;
++pub const SIGSTKFLT: ::c_int = 16;
++pub const SIGUNUSED: ::c_int = 31;
++pub const SIGPOLL: ::c_int = 29;
++pub const SIGPWR: ::c_int = 30;
++pub const SIG_SETMASK: ::c_int = 2;
++pub const SIG_BLOCK: ::c_int = 0x000000;
++pub const SIG_UNBLOCK: ::c_int = 0x01;
++
++pub const POLLWRNORM: ::c_short = 0x100;
++pub const POLLWRBAND: ::c_short = 0x200;
++
++pub const O_ASYNC: ::c_int = 0x2000;
++pub const O_NDELAY: ::c_int = 0x800;
++
++pub const PTRACE_DETACH: ::c_uint = 17;
++
++pub const EFD_NONBLOCK: ::c_int = 0x800;
++
++pub const F_GETLK: ::c_int = 5;
++pub const F_GETOWN: ::c_int = 9;
++pub const F_SETOWN: ::c_int = 8;
++pub const F_SETLK: ::c_int = 6;
++pub const F_SETLKW: ::c_int = 7;
++
++pub const SFD_NONBLOCK: ::c_int = 0x0800;
++
++pub const TIOCEXCL: ::c_ulong = 0x540C;
++pub const TIOCNXCL: ::c_ulong = 0x540D;
++pub const TIOCSCTTY: ::c_ulong = 0x540E;
++pub const TIOCSTI: ::c_ulong = 0x5412;
++pub const TIOCMGET: ::c_ulong = 0x5415;
++pub const TIOCMBIS: ::c_ulong = 0x5416;
++pub const TIOCMBIC: ::c_ulong = 0x5417;
++pub const TIOCMSET: ::c_ulong = 0x5418;
++pub const TIOCCONS: ::c_ulong = 0x541D;
++
++pub const SFD_CLOEXEC: ::c_int = 0x080000;
++
++pub const NCCS: usize = 32;
++
++pub const O_TRUNC: ::c_int = 512;
++
++pub const O_CLOEXEC: ::c_int = 0x80000;
++
++pub const EBFONT: ::c_int = 59;
++pub const ENOSTR: ::c_int = 60;
++pub const ENODATA: ::c_int = 61;
++pub const ETIME: ::c_int = 62;
++pub const ENOSR: ::c_int = 63;
++pub const ENONET: ::c_int = 64;
++pub const ENOPKG: ::c_int = 65;
++pub const EREMOTE: ::c_int = 66;
++pub const ENOLINK: ::c_int = 67;
++pub const EADV: ::c_int = 68;
++pub const ESRMNT: ::c_int = 69;
++pub const ECOMM: ::c_int = 70;
++pub const EPROTO: ::c_int = 71;
++pub const EDOTDOT: ::c_int = 73;
++
++pub const SA_NODEFER: ::c_int = 0x40000000;
++pub const SA_RESETHAND: ::c_int = 0x80000000;
++pub const SA_RESTART: ::c_int = 0x10000000;
++pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
++
++pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
++
++pub const EFD_CLOEXEC: ::c_int = 0x80000;
++
++pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
++pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
++pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
++
++pub const PTRACE_GETFPREGS: ::c_uint = 14;
++pub const PTRACE_SETFPREGS: ::c_uint = 15;
++pub const PTRACE_GETREGS: ::c_uint = 12;
++pub const PTRACE_SETREGS: ::c_uint = 13;
++
++cfg_if! {
++    if #[cfg(target_arch = "x86")] {
++        mod x86;
++        pub use self::x86::*;
++    } else if #[cfg(target_arch = "arm")] {
++        mod arm;
++        pub use self::arm::*;
++    } else if #[cfg(target_arch = "powerpc")] {
++        mod powerpc;
++        pub use self::powerpc::*;
++    } else {
++        // Unknown target_arch
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..408e27dd9222859f3384f2457d71df9c31d86fb9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,215 @@@
++pub type c_char = u8;
++pub type wchar_t = i32;
++
++s! {
++    pub struct ipc_perm {
++        __key: ::key_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++        pub cuid: ::uid_t,
++        pub cgid: ::gid_t,
++        pub mode: ::mode_t,
++        __seq: ::uint32_t,
++        __pad1: ::uint32_t,
++        __glibc_reserved1: ::uint64_t,
++        __glibc_reserved2: ::uint64_t,
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino64_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __pad2: ::c_ushort,
++        pub st_size: ::off64_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt64_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        __glibc_reserved4: ::c_ulong,
++        __glibc_reserved5: ::c_ulong,
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        __glibc_reserved1: ::c_uint,
++        pub shm_atime: ::time_t,
++        __glibc_reserved2: ::c_uint,
++        pub shm_dtime: ::time_t,
++        __glibc_reserved3: ::c_uint,
++        pub shm_ctime: ::time_t,
++        __glibc_reserved4: ::c_uint,
++        pub shm_segsz: ::size_t,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::shmatt_t,
++        __glibc_reserved5: ::c_ulong,
++        __glibc_reserved6: ::c_ulong,
++    }
++
++    pub struct msqid_ds {
++        pub msg_perm: ::ipc_perm,
++        __glibc_reserved1: ::c_uint,
++        pub msg_stime: ::time_t,
++        __glibc_reserved2: ::c_uint,
++        pub msg_rtime: ::time_t,
++        __glibc_reserved3: ::c_uint,
++        pub msg_ctime: ::time_t,
++        __msg_cbytes: ::c_ulong,
++        pub msg_qnum: ::msgqnum_t,
++        pub msg_qbytes: ::msglen_t,
++        pub msg_lspid: ::pid_t,
++        pub msg_lrpid: ::pid_t,
++        __glibc_reserved4: ::c_ulong,
++        __glibc_reserved5: ::c_ulong,
++    }
++}
++
++pub const O_DIRECT: ::c_int = 0x20000;
++pub const O_DIRECTORY: ::c_int = 0x4000;
++pub const O_NOFOLLOW: ::c_int = 0x8000;
++pub const O_LARGEFILE: ::c_int = 0o200000;
++
++pub const MAP_LOCKED: ::c_int = 0x00080;
++pub const MAP_NORESERVE: ::c_int = 0x00040;
++
++pub const EDEADLOCK: ::c_int = 58;
++
++pub const SO_SNDBUFFORCE: ::c_int = 32;
++pub const SO_RCVBUFFORCE: ::c_int = 33;
++pub const SO_NO_CHECK: ::c_int = 11;
++pub const SO_RCVLOWAT: ::c_int = 16;
++pub const SO_SNDLOWAT: ::c_int = 17;
++pub const SO_RCVTIMEO: ::c_int = 18;
++pub const SO_SNDTIMEO: ::c_int = 19;
++pub const SO_PASSCRED: ::c_int = 20;
++pub const SO_PEERCRED: ::c_int = 21;
++
++pub const FIOCLEX: ::c_ulong = 0x20006601;
++pub const FIONBIO: ::c_ulong = 0x8004667e;
++
++pub const SYS_gettid: ::c_long = 207;
++pub const SYS_perf_event_open: ::c_long = 319;
++
++pub const MCL_CURRENT: ::c_int = 0x2000;
++pub const MCL_FUTURE: ::c_int = 0x4000;
++
++pub const SIGSTKSZ: ::size_t = 0x4000;
++pub const MINSIGSTKSZ: ::size_t = 4096;
++pub const CBAUD: ::tcflag_t = 0xff;
++pub const TAB1: ::c_int = 0x400;
++pub const TAB2: ::c_int = 0x800;
++pub const TAB3: ::c_int = 0xc00;
++pub const CR1: ::c_int  = 0x1000;
++pub const CR2: ::c_int  = 0x2000;
++pub const CR3: ::c_int  = 0x3000;
++pub const FF1: ::c_int  = 0x4000;
++pub const BS1: ::c_int  = 0x8000;
++pub const VT1: ::c_int  = 0x10000;
++pub const VWERASE: usize = 0xa;
++pub const VREPRINT: usize = 0xb;
++pub const VSUSP: usize = 0xc;
++pub const VSTART: usize = 0xd;
++pub const VSTOP: usize = 0xe;
++pub const VDISCARD: usize = 0x10;
++pub const VTIME: usize = 0x7;
++pub const IXON: ::tcflag_t = 0x200;
++pub const IXOFF: ::tcflag_t = 0x400;
++pub const ONLCR: ::tcflag_t = 0x2;
++pub const CSIZE: ::tcflag_t = 0x300;
++pub const CS6: ::tcflag_t = 0x100;
++pub const CS7: ::tcflag_t = 0x200;
++pub const CS8: ::tcflag_t = 0x300;
++pub const CSTOPB: ::tcflag_t = 0x400;
++pub const CREAD: ::tcflag_t = 0x800;
++pub const PARENB: ::tcflag_t = 0x1000;
++pub const PARODD: ::tcflag_t = 0x2000;
++pub const HUPCL: ::tcflag_t = 0x4000;
++pub const CLOCAL: ::tcflag_t = 0x8000;
++pub const ECHOKE: ::tcflag_t = 0x1;
++pub const ECHOE: ::tcflag_t = 0x2;
++pub const ECHOK: ::tcflag_t = 0x4;
++pub const ECHONL: ::tcflag_t = 0x10;
++pub const ECHOPRT: ::tcflag_t = 0x20;
++pub const ECHOCTL: ::tcflag_t = 0x40;
++pub const ISIG: ::tcflag_t = 0x80;
++pub const ICANON: ::tcflag_t = 0x100;
++pub const PENDIN: ::tcflag_t = 0x20000000;
++pub const NOFLSH: ::tcflag_t = 0x80000000;
++pub const VSWTC: usize = 9;
++pub const OLCUC:  ::tcflag_t = 0o000004;
++pub const NLDLY:  ::tcflag_t = 0o001400;
++pub const CRDLY:  ::tcflag_t = 0o030000;
++pub const TABDLY: ::tcflag_t = 0o006000;
++pub const BSDLY:  ::tcflag_t = 0o100000;
++pub const FFDLY:  ::tcflag_t = 0o040000;
++pub const VTDLY:  ::tcflag_t = 0o200000;
++pub const XTABS:  ::tcflag_t = 0o006000;
++
++pub const B0: ::speed_t = 0o000000;
++pub const B50: ::speed_t = 0o000001;
++pub const B75: ::speed_t = 0o000002;
++pub const B110: ::speed_t = 0o000003;
++pub const B134: ::speed_t = 0o000004;
++pub const B150: ::speed_t = 0o000005;
++pub const B200: ::speed_t = 0o000006;
++pub const B300: ::speed_t = 0o000007;
++pub const B600: ::speed_t = 0o000010;
++pub const B1200: ::speed_t = 0o000011;
++pub const B1800: ::speed_t = 0o000012;
++pub const B2400: ::speed_t = 0o000013;
++pub const B4800: ::speed_t = 0o000014;
++pub const B9600: ::speed_t = 0o000015;
++pub const B19200: ::speed_t = 0o000016;
++pub const B38400: ::speed_t = 0o000017;
++pub const EXTA: ::speed_t = B19200;
++pub const EXTB: ::speed_t = B38400;
++pub const CBAUDEX: ::speed_t = 0o000020;
++pub const B57600: ::speed_t = 0o0020;
++pub const B115200: ::speed_t = 0o0021;
++pub const B230400: ::speed_t = 0o0022;
++pub const B460800: ::speed_t = 0o0023;
++pub const B500000: ::speed_t = 0o0024;
++pub const B576000: ::speed_t = 0o0025;
++pub const B921600: ::speed_t = 0o0026;
++pub const B1000000: ::speed_t = 0o0027;
++pub const B1152000: ::speed_t = 0o0030;
++pub const B1500000: ::speed_t = 0o0031;
++pub const B2000000: ::speed_t = 0o0032;
++pub const B2500000: ::speed_t = 0o0033;
++pub const B3000000: ::speed_t = 0o0034;
++pub const B3500000: ::speed_t = 0o0035;
++pub const B4000000: ::speed_t = 0o0036;
++
++pub const VEOL: usize = 6;
++pub const VEOL2: usize = 8;
++pub const VMIN: usize = 5;
++pub const IEXTEN: ::tcflag_t = 0x400;
++pub const TOSTOP: ::tcflag_t = 0x400000;
++pub const FLUSHO: ::tcflag_t = 0x800000;
++pub const EXTPROC: ::tcflag_t = 0x10000000;
++pub const TCGETS: ::c_ulong = 0x403c7413;
++pub const TCSETS: ::c_ulong = 0x803c7414;
++pub const TCSETSW: ::c_ulong = 0x803c7415;
++pub const TCSETSF: ::c_ulong = 0x803c7416;
++pub const TCGETA: ::c_ulong = 0x40147417;
++pub const TCSETA: ::c_ulong = 0x80147418;
++pub const TCSETAW: ::c_ulong = 0x80147419;
++pub const TCSETAF: ::c_ulong = 0x8014741c;
++pub const TCSBRK: ::c_ulong = 0x2000741d;
++pub const TCXONC: ::c_ulong = 0x2000741e;
++pub const TCFLSH: ::c_ulong = 0x2000741f;
++pub const TIOCINQ: ::c_ulong = 0x4004667f;
++pub const TIOCGPGRP: ::c_ulong = 0x40047477;
++pub const TIOCSPGRP: ::c_ulong = 0x80047476;
++pub const TIOCOUTQ: ::c_ulong = 0x40047473;
++pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
++pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
++pub const FIONREAD: ::c_ulong = 0x4004667f;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..30c6b163fa20e3e67ca3218ee601b3830052b7fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,726 @@@
++pub type c_char = i8;
++pub type wchar_t = i32;
++pub type greg_t = i32;
++
++s! {
++    pub struct _libc_fpreg {
++        pub significand: [u16; 4],
++        pub exponent: u16,
++    }
++
++    pub struct _libc_fpstate {
++        pub cw: ::c_ulong,
++        pub sw: ::c_ulong,
++        pub tag: ::c_ulong,
++        pub ipoff: ::c_ulong,
++        pub cssel: ::c_ulong,
++        pub dataoff: ::c_ulong,
++        pub datasel: ::c_ulong,
++        pub _st: [_libc_fpreg; 8],
++        pub status: ::c_ulong,
++    }
++
++    pub struct user_fpregs_struct {
++        pub cwd: ::c_long,
++        pub swd: ::c_long,
++        pub twd: ::c_long,
++        pub fip: ::c_long,
++        pub fcs: ::c_long,
++        pub foo: ::c_long,
++        pub fos: ::c_long,
++        pub st_space: [::c_long; 20],
++    }
++
++    pub struct user_fpxregs_struct {
++        pub cwd: ::c_ushort,
++        pub swd: ::c_ushort,
++        pub twd: ::c_ushort,
++        pub fop: ::c_ushort,
++        pub fip: ::c_long,
++        pub fcs: ::c_long,
++        pub foo: ::c_long,
++        pub fos: ::c_long,
++        pub mxcsr: ::c_long,
++        __reserved: ::c_long,
++        pub st_space: [::c_long; 32],
++        pub xmm_space: [::c_long; 32],
++        padding: [::c_long; 56],
++    }
++
++    pub struct user_regs_struct {
++        pub ebx: ::c_long,
++        pub ecx: ::c_long,
++        pub edx: ::c_long,
++        pub esi: ::c_long,
++        pub edi: ::c_long,
++        pub ebp: ::c_long,
++        pub eax: ::c_long,
++        pub xds: ::c_long,
++        pub xes: ::c_long,
++        pub xfs: ::c_long,
++        pub xgs: ::c_long,
++        pub orig_eax: ::c_long,
++        pub eip: ::c_long,
++        pub xcs: ::c_long,
++        pub eflags: ::c_long,
++        pub esp: ::c_long,
++        pub xss: ::c_long,
++    }
++
++    pub struct user {
++        pub regs: user_regs_struct,
++        pub u_fpvalid: ::c_int,
++        pub i387: user_fpregs_struct,
++        pub u_tsize: ::c_ulong,
++        pub u_dsize: ::c_ulong,
++        pub u_ssize: ::c_ulong,
++        pub start_code: ::c_ulong,
++        pub start_stack: ::c_ulong,
++        pub signal: ::c_long,
++        __reserved: ::c_int,
++        pub u_ar0: *mut user_regs_struct,
++        pub u_fpstate: *mut user_fpregs_struct,
++        pub magic: ::c_ulong,
++        pub u_comm: [c_char; 32],
++        pub u_debugreg: [::c_int; 8],
++    }
++
++    pub struct mcontext_t {
++        pub gregs: [greg_t; 19],
++        pub fpregs: *mut _libc_fpstate,
++        pub oldmask: ::c_ulong,
++        pub cr2: ::c_ulong,
++    }
++
++    pub struct ucontext_t {
++        pub uc_flags: ::c_ulong,
++        pub uc_link: *mut ucontext_t,
++        pub uc_stack: ::stack_t,
++        pub uc_mcontext: mcontext_t,
++        pub uc_sigmask: ::sigset_t,
++        __private: [u8; 112],
++    }
++
++    pub struct ipc_perm {
++        pub __key: ::key_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++        pub cuid: ::uid_t,
++        pub cgid: ::gid_t,
++        pub mode: ::c_ushort,
++        __pad1: ::c_ushort,
++        pub __seq: ::c_ushort,
++        __pad2: ::c_ushort,
++        __unused1: ::c_ulong,
++        __unused2: ::c_ulong
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::dev_t,
++        __pad1: ::c_uint,
++        __st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __pad2: ::c_uint,
++        pub st_size: ::off64_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt64_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_ino: ::ino64_t,
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_segsz: ::size_t,
++        pub shm_atime: ::time_t,
++        __unused1: ::c_ulong,
++        pub shm_dtime: ::time_t,
++        __unused2: ::c_ulong,
++        pub shm_ctime: ::time_t,
++        __unused3: ::c_ulong,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::shmatt_t,
++        __unused4: ::c_ulong,
++        __unused5: ::c_ulong
++    }
++
++    pub struct msqid_ds {
++        pub msg_perm: ::ipc_perm,
++        pub msg_stime: ::time_t,
++        __glibc_reserved1: ::c_ulong,
++        pub msg_rtime: ::time_t,
++        __glibc_reserved2: ::c_ulong,
++        pub msg_ctime: ::time_t,
++        __glibc_reserved3: ::c_ulong,
++        __msg_cbytes: ::c_ulong,
++        pub msg_qnum: ::msgqnum_t,
++        pub msg_qbytes: ::msglen_t,
++        pub msg_lspid: ::pid_t,
++        pub msg_lrpid: ::pid_t,
++        __glibc_reserved4: ::c_ulong,
++        __glibc_reserved5: ::c_ulong,
++    }
++}
++
++pub const O_DIRECT: ::c_int = 0x4000;
++pub const O_DIRECTORY: ::c_int = 0x10000;
++pub const O_NOFOLLOW: ::c_int = 0x20000;
++pub const O_LARGEFILE: ::c_int = 0o0100000;
++
++pub const MAP_LOCKED: ::c_int = 0x02000;
++pub const MAP_NORESERVE: ::c_int = 0x04000;
++pub const MAP_32BIT: ::c_int = 0x0040;
++
++pub const EDEADLOCK: ::c_int = 35;
++
++pub const SO_SNDBUFFORCE: ::c_int = 32;
++pub const SO_RCVBUFFORCE: ::c_int = 33;
++pub const SO_NO_CHECK: ::c_int = 11;
++pub const SO_PASSCRED: ::c_int = 16;
++pub const SO_PEERCRED: ::c_int = 17;
++pub const SO_RCVLOWAT: ::c_int = 18;
++pub const SO_SNDLOWAT: ::c_int = 19;
++pub const SO_RCVTIMEO: ::c_int = 20;
++pub const SO_SNDTIMEO: ::c_int = 21;
++
++pub const FIOCLEX: ::c_ulong = 0x5451;
++pub const FIONBIO: ::c_ulong = 0x5421;
++
++pub const PTRACE_GETFPXREGS: ::c_uint = 18;
++pub const PTRACE_SETFPXREGS: ::c_uint = 19;
++
++pub const MCL_CURRENT: ::c_int = 0x0001;
++pub const MCL_FUTURE: ::c_int = 0x0002;
++
++pub const SIGSTKSZ: ::size_t = 8192;
++pub const MINSIGSTKSZ: ::size_t = 2048;
++pub const CBAUD: ::tcflag_t = 0o0010017;
++pub const TAB1: ::c_int = 0x00000800;
++pub const TAB2: ::c_int = 0x00001000;
++pub const TAB3: ::c_int = 0x00001800;
++pub const CR1: ::c_int  = 0x00000200;
++pub const CR2: ::c_int  = 0x00000400;
++pub const CR3: ::c_int  = 0x00000600;
++pub const FF1: ::c_int  = 0x00008000;
++pub const BS1: ::c_int  = 0x00002000;
++pub const VT1: ::c_int  = 0x00004000;
++pub const VWERASE: usize = 14;
++pub const VREPRINT: usize = 12;
++pub const VSUSP: usize = 10;
++pub const VSTART: usize = 8;
++pub const VSTOP: usize = 9;
++pub const VDISCARD: usize = 13;
++pub const VTIME: usize = 5;
++pub const IXON: ::tcflag_t = 0x00000400;
++pub const IXOFF: ::tcflag_t = 0x00001000;
++pub const ONLCR: ::tcflag_t = 0x4;
++pub const CSIZE: ::tcflag_t = 0x00000030;
++pub const CS6: ::tcflag_t = 0x00000010;
++pub const CS7: ::tcflag_t = 0x00000020;
++pub const CS8: ::tcflag_t = 0x00000030;
++pub const CSTOPB: ::tcflag_t = 0x00000040;
++pub const CREAD: ::tcflag_t = 0x00000080;
++pub const PARENB: ::tcflag_t = 0x00000100;
++pub const PARODD: ::tcflag_t = 0x00000200;
++pub const HUPCL: ::tcflag_t = 0x00000400;
++pub const CLOCAL: ::tcflag_t = 0x00000800;
++pub const ECHOKE: ::tcflag_t = 0x00000800;
++pub const ECHOE: ::tcflag_t = 0x00000010;
++pub const ECHOK: ::tcflag_t = 0x00000020;
++pub const ECHONL: ::tcflag_t = 0x00000040;
++pub const ECHOPRT: ::tcflag_t = 0x00000400;
++pub const ECHOCTL: ::tcflag_t = 0x00000200;
++pub const ISIG: ::tcflag_t = 0x00000001;
++pub const ICANON: ::tcflag_t = 0x00000002;
++pub const PENDIN: ::tcflag_t = 0x00004000;
++pub const NOFLSH: ::tcflag_t = 0x00000080;
++pub const CIBAUD: ::tcflag_t = 0o02003600000;
++pub const CBAUDEX: ::tcflag_t = 0o010000;
++pub const VSWTC: usize = 7;
++pub const OLCUC:  ::tcflag_t = 0o000002;
++pub const NLDLY:  ::tcflag_t = 0o000400;
++pub const CRDLY:  ::tcflag_t = 0o003000;
++pub const TABDLY: ::tcflag_t = 0o014000;
++pub const BSDLY:  ::tcflag_t = 0o020000;
++pub const FFDLY:  ::tcflag_t = 0o100000;
++pub const VTDLY:  ::tcflag_t = 0o040000;
++pub const XTABS:  ::tcflag_t = 0o014000;
++
++pub const B0: ::speed_t = 0o000000;
++pub const B50: ::speed_t = 0o000001;
++pub const B75: ::speed_t = 0o000002;
++pub const B110: ::speed_t = 0o000003;
++pub const B134: ::speed_t = 0o000004;
++pub const B150: ::speed_t = 0o000005;
++pub const B200: ::speed_t = 0o000006;
++pub const B300: ::speed_t = 0o000007;
++pub const B600: ::speed_t = 0o000010;
++pub const B1200: ::speed_t = 0o000011;
++pub const B1800: ::speed_t = 0o000012;
++pub const B2400: ::speed_t = 0o000013;
++pub const B4800: ::speed_t = 0o000014;
++pub const B9600: ::speed_t = 0o000015;
++pub const B19200: ::speed_t = 0o000016;
++pub const B38400: ::speed_t = 0o000017;
++pub const EXTA: ::speed_t = B19200;
++pub const EXTB: ::speed_t = B38400;
++pub const B57600: ::speed_t = 0o010001;
++pub const B115200: ::speed_t = 0o010002;
++pub const B230400: ::speed_t = 0o010003;
++pub const B460800: ::speed_t = 0o010004;
++pub const B500000: ::speed_t = 0o010005;
++pub const B576000: ::speed_t = 0o010006;
++pub const B921600: ::speed_t = 0o010007;
++pub const B1000000: ::speed_t = 0o010010;
++pub const B1152000: ::speed_t = 0o010011;
++pub const B1500000: ::speed_t = 0o010012;
++pub const B2000000: ::speed_t = 0o010013;
++pub const B2500000: ::speed_t = 0o010014;
++pub const B3000000: ::speed_t = 0o010015;
++pub const B3500000: ::speed_t = 0o010016;
++pub const B4000000: ::speed_t = 0o010017;
++
++pub const VEOL: usize = 11;
++pub const VEOL2: usize = 16;
++pub const VMIN: usize = 6;
++pub const IEXTEN: ::tcflag_t = 0x00008000;
++pub const TOSTOP: ::tcflag_t = 0x00000100;
++pub const FLUSHO: ::tcflag_t = 0x00001000;
++pub const EXTPROC: ::tcflag_t = 0x00010000;
++pub const TCGETS: ::c_ulong = 0x5401;
++pub const TCSETS: ::c_ulong = 0x5402;
++pub const TCSETSW: ::c_ulong = 0x5403;
++pub const TCSETSF: ::c_ulong = 0x5404;
++pub const TCGETA: ::c_ulong = 0x5405;
++pub const TCSETA: ::c_ulong = 0x5406;
++pub const TCSETAW: ::c_ulong = 0x5407;
++pub const TCSETAF: ::c_ulong = 0x5408;
++pub const TCSBRK: ::c_ulong = 0x5409;
++pub const TCXONC: ::c_ulong = 0x540A;
++pub const TCFLSH: ::c_ulong = 0x540B;
++pub const TIOCINQ: ::c_ulong = 0x541B;
++pub const TIOCGPGRP: ::c_ulong = 0x540F;
++pub const TIOCSPGRP: ::c_ulong = 0x5410;
++pub const TIOCOUTQ: ::c_ulong = 0x5411;
++pub const TIOCGWINSZ: ::c_ulong = 0x5413;
++pub const TIOCSWINSZ: ::c_ulong = 0x5414;
++pub const FIONREAD: ::c_ulong = 0x541B;
++
++// Syscall table
++pub const SYS_restart_syscall: ::c_long = 0;
++pub const SYS_exit: ::c_long = 1;
++pub const SYS_fork: ::c_long = 2;
++pub const SYS_read: ::c_long = 3;
++pub const SYS_write: ::c_long = 4;
++pub const SYS_open: ::c_long = 5;
++pub const SYS_close: ::c_long = 6;
++pub const SYS_waitpid: ::c_long = 7;
++pub const SYS_creat: ::c_long = 8;
++pub const SYS_link: ::c_long = 9;
++pub const SYS_unlink: ::c_long = 10;
++pub const SYS_execve: ::c_long = 11;
++pub const SYS_chdir: ::c_long = 12;
++pub const SYS_time: ::c_long = 13;
++pub const SYS_mknod: ::c_long = 14;
++pub const SYS_chmod: ::c_long = 15;
++pub const SYS_lchown: ::c_long = 16;
++pub const SYS_break: ::c_long = 17;
++pub const SYS_oldstat: ::c_long = 18;
++pub const SYS_lseek: ::c_long = 19;
++pub const SYS_getpid: ::c_long = 20;
++pub const SYS_mount: ::c_long = 21;
++pub const SYS_umount: ::c_long = 22;
++pub const SYS_setuid: ::c_long = 23;
++pub const SYS_getuid: ::c_long = 24;
++pub const SYS_stime: ::c_long = 25;
++pub const SYS_ptrace: ::c_long = 26;
++pub const SYS_alarm: ::c_long = 27;
++pub const SYS_oldfstat: ::c_long = 28;
++pub const SYS_pause: ::c_long = 29;
++pub const SYS_utime: ::c_long = 30;
++pub const SYS_stty: ::c_long = 31;
++pub const SYS_gtty: ::c_long = 32;
++pub const SYS_access: ::c_long = 33;
++pub const SYS_nice: ::c_long = 34;
++pub const SYS_ftime: ::c_long = 35;
++pub const SYS_sync: ::c_long = 36;
++pub const SYS_kill: ::c_long = 37;
++pub const SYS_rename: ::c_long = 38;
++pub const SYS_mkdir: ::c_long = 39;
++pub const SYS_rmdir: ::c_long = 40;
++pub const SYS_dup: ::c_long = 41;
++pub const SYS_pipe: ::c_long = 42;
++pub const SYS_times: ::c_long = 43;
++pub const SYS_prof: ::c_long = 44;
++pub const SYS_brk: ::c_long = 45;
++pub const SYS_setgid: ::c_long = 46;
++pub const SYS_getgid: ::c_long = 47;
++pub const SYS_signal: ::c_long = 48;
++pub const SYS_geteuid: ::c_long = 49;
++pub const SYS_getegid: ::c_long = 50;
++pub const SYS_acct: ::c_long = 51;
++pub const SYS_umount2: ::c_long = 52;
++pub const SYS_lock: ::c_long = 53;
++pub const SYS_ioctl: ::c_long = 54;
++pub const SYS_fcntl: ::c_long = 55;
++pub const SYS_mpx: ::c_long = 56;
++pub const SYS_setpgid: ::c_long = 57;
++pub const SYS_ulimit: ::c_long = 58;
++pub const SYS_oldolduname: ::c_long = 59;
++pub const SYS_umask: ::c_long = 60;
++pub const SYS_chroot: ::c_long = 61;
++pub const SYS_ustat: ::c_long = 62;
++pub const SYS_dup2: ::c_long = 63;
++pub const SYS_getppid: ::c_long = 64;
++pub const SYS_getpgrp: ::c_long = 65;
++pub const SYS_setsid: ::c_long = 66;
++pub const SYS_sigaction: ::c_long = 67;
++pub const SYS_sgetmask: ::c_long = 68;
++pub const SYS_ssetmask: ::c_long = 69;
++pub const SYS_setreuid: ::c_long = 70;
++pub const SYS_setregid: ::c_long = 71;
++pub const SYS_sigsuspend: ::c_long = 72;
++pub const SYS_sigpending: ::c_long = 73;
++pub const SYS_sethostname: ::c_long = 74;
++pub const SYS_setrlimit: ::c_long = 75;
++pub const SYS_getrlimit: ::c_long = 76;
++pub const SYS_getrusage: ::c_long = 77;
++pub const SYS_gettimeofday: ::c_long = 78;
++pub const SYS_settimeofday: ::c_long = 79;
++pub const SYS_getgroups: ::c_long = 80;
++pub const SYS_setgroups: ::c_long = 81;
++pub const SYS_select: ::c_long = 82;
++pub const SYS_symlink: ::c_long = 83;
++pub const SYS_oldlstat: ::c_long = 84;
++pub const SYS_readlink: ::c_long = 85;
++pub const SYS_uselib: ::c_long = 86;
++pub const SYS_swapon: ::c_long = 87;
++pub const SYS_reboot: ::c_long = 88;
++pub const SYS_readdir: ::c_long = 89;
++pub const SYS_mmap: ::c_long = 90;
++pub const SYS_munmap: ::c_long = 91;
++pub const SYS_truncate: ::c_long = 92;
++pub const SYS_ftruncate: ::c_long = 93;
++pub const SYS_fchmod: ::c_long = 94;
++pub const SYS_fchown: ::c_long = 95;
++pub const SYS_getpriority: ::c_long = 96;
++pub const SYS_setpriority: ::c_long = 97;
++pub const SYS_profil: ::c_long = 98;
++pub const SYS_statfs: ::c_long = 99;
++pub const SYS_fstatfs: ::c_long = 100;
++pub const SYS_ioperm: ::c_long = 101;
++pub const SYS_socketcall: ::c_long = 102;
++pub const SYS_syslog: ::c_long = 103;
++pub const SYS_setitimer: ::c_long = 104;
++pub const SYS_getitimer: ::c_long = 105;
++pub const SYS_stat: ::c_long = 106;
++pub const SYS_lstat: ::c_long = 107;
++pub const SYS_fstat: ::c_long = 108;
++pub const SYS_olduname: ::c_long = 109;
++pub const SYS_iopl: ::c_long = 110;
++pub const SYS_vhangup: ::c_long = 111;
++pub const SYS_idle: ::c_long = 112;
++pub const SYS_vm86old: ::c_long = 113;
++pub const SYS_wait4: ::c_long = 114;
++pub const SYS_swapoff: ::c_long = 115;
++pub const SYS_sysinfo: ::c_long = 116;
++pub const SYS_ipc: ::c_long = 117;
++pub const SYS_fsync: ::c_long = 118;
++pub const SYS_sigreturn: ::c_long = 119;
++pub const SYS_clone: ::c_long = 120;
++pub const SYS_setdomainname: ::c_long = 121;
++pub const SYS_uname: ::c_long = 122;
++pub const SYS_modify_ldt: ::c_long = 123;
++pub const SYS_adjtimex: ::c_long = 124;
++pub const SYS_mprotect: ::c_long = 125;
++pub const SYS_sigprocmask: ::c_long = 126;
++pub const SYS_create_module: ::c_long = 127;
++pub const SYS_init_module: ::c_long = 128;
++pub const SYS_delete_module: ::c_long = 129;
++pub const SYS_get_kernel_syms: ::c_long = 130;
++pub const SYS_quotactl: ::c_long = 131;
++pub const SYS_getpgid: ::c_long = 132;
++pub const SYS_fchdir: ::c_long = 133;
++pub const SYS_bdflush: ::c_long = 134;
++pub const SYS_sysfs: ::c_long = 135;
++pub const SYS_personality: ::c_long = 136;
++pub const SYS_afs_syscall: ::c_long = 137;
++pub const SYS_setfsuid: ::c_long = 138;
++pub const SYS_setfsgid: ::c_long = 139;
++pub const SYS__llseek: ::c_long = 140;
++pub const SYS_getdents: ::c_long = 141;
++pub const SYS__newselect: ::c_long = 142;
++pub const SYS_flock: ::c_long = 143;
++pub const SYS_msync: ::c_long = 144;
++pub const SYS_readv: ::c_long = 145;
++pub const SYS_writev: ::c_long = 146;
++pub const SYS_getsid: ::c_long = 147;
++pub const SYS_fdatasync: ::c_long = 148;
++pub const SYS__sysctl: ::c_long = 149;
++pub const SYS_mlock: ::c_long = 150;
++pub const SYS_munlock: ::c_long = 151;
++pub const SYS_mlockall: ::c_long = 152;
++pub const SYS_munlockall: ::c_long = 153;
++pub const SYS_sched_setparam: ::c_long = 154;
++pub const SYS_sched_getparam: ::c_long = 155;
++pub const SYS_sched_setscheduler: ::c_long = 156;
++pub const SYS_sched_getscheduler: ::c_long = 157;
++pub const SYS_sched_yield: ::c_long = 158;
++pub const SYS_sched_get_priority_max: ::c_long = 159;
++pub const SYS_sched_get_priority_min: ::c_long = 160;
++pub const SYS_sched_rr_get_interval: ::c_long = 161;
++pub const SYS_nanosleep: ::c_long = 162;
++pub const SYS_mremap: ::c_long = 163;
++pub const SYS_setresuid: ::c_long = 164;
++pub const SYS_getresuid: ::c_long = 165;
++pub const SYS_vm86: ::c_long = 166;
++pub const SYS_query_module: ::c_long = 167;
++pub const SYS_poll: ::c_long = 168;
++pub const SYS_nfsservctl: ::c_long = 169;
++pub const SYS_setresgid: ::c_long = 170;
++pub const SYS_getresgid: ::c_long = 171;
++pub const SYS_prctl: ::c_long = 172;
++pub const SYS_rt_sigreturn: ::c_long = 173;
++pub const SYS_rt_sigaction: ::c_long = 174;
++pub const SYS_rt_sigprocmask: ::c_long = 175;
++pub const SYS_rt_sigpending: ::c_long = 176;
++pub const SYS_rt_sigtimedwait: ::c_long = 177;
++pub const SYS_rt_sigqueueinfo: ::c_long = 178;
++pub const SYS_rt_sigsuspend: ::c_long = 179;
++pub const SYS_pread64: ::c_long = 180;
++pub const SYS_pwrite64: ::c_long = 181;
++pub const SYS_chown: ::c_long = 182;
++pub const SYS_getcwd: ::c_long = 183;
++pub const SYS_capget: ::c_long = 184;
++pub const SYS_capset: ::c_long = 185;
++pub const SYS_sigaltstack: ::c_long = 186;
++pub const SYS_sendfile: ::c_long = 187;
++pub const SYS_getpmsg: ::c_long = 188;
++pub const SYS_putpmsg: ::c_long = 189;
++pub const SYS_vfork: ::c_long = 190;
++pub const SYS_ugetrlimit: ::c_long = 191;
++pub const SYS_mmap2: ::c_long = 192;
++pub const SYS_truncate64: ::c_long = 193;
++pub const SYS_ftruncate64: ::c_long = 194;
++pub const SYS_stat64: ::c_long = 195;
++pub const SYS_lstat64: ::c_long = 196;
++pub const SYS_fstat64: ::c_long = 197;
++pub const SYS_lchown32: ::c_long = 198;
++pub const SYS_getuid32: ::c_long = 199;
++pub const SYS_getgid32: ::c_long = 200;
++pub const SYS_geteuid32: ::c_long = 201;
++pub const SYS_getegid32: ::c_long = 202;
++pub const SYS_setreuid32: ::c_long = 203;
++pub const SYS_setregid32: ::c_long = 204;
++pub const SYS_getgroups32: ::c_long = 205;
++pub const SYS_setgroups32: ::c_long = 206;
++pub const SYS_fchown32: ::c_long = 207;
++pub const SYS_setresuid32: ::c_long = 208;
++pub const SYS_getresuid32: ::c_long = 209;
++pub const SYS_setresgid32: ::c_long = 210;
++pub const SYS_getresgid32: ::c_long = 211;
++pub const SYS_chown32: ::c_long = 212;
++pub const SYS_setuid32: ::c_long = 213;
++pub const SYS_setgid32: ::c_long = 214;
++pub const SYS_setfsuid32: ::c_long = 215;
++pub const SYS_setfsgid32: ::c_long = 216;
++pub const SYS_pivot_root: ::c_long = 217;
++pub const SYS_mincore: ::c_long = 218;
++pub const SYS_madvise: ::c_long = 219;
++pub const SYS_getdents64: ::c_long = 220;
++pub const SYS_fcntl64: ::c_long = 221;
++pub const SYS_gettid: ::c_long = 224;
++pub const SYS_readahead: ::c_long = 225;
++pub const SYS_setxattr: ::c_long = 226;
++pub const SYS_lsetxattr: ::c_long = 227;
++pub const SYS_fsetxattr: ::c_long = 228;
++pub const SYS_getxattr: ::c_long = 229;
++pub const SYS_lgetxattr: ::c_long = 230;
++pub const SYS_fgetxattr: ::c_long = 231;
++pub const SYS_listxattr: ::c_long = 232;
++pub const SYS_llistxattr: ::c_long = 233;
++pub const SYS_flistxattr: ::c_long = 234;
++pub const SYS_removexattr: ::c_long = 235;
++pub const SYS_lremovexattr: ::c_long = 236;
++pub const SYS_fremovexattr: ::c_long = 237;
++pub const SYS_tkill: ::c_long = 238;
++pub const SYS_sendfile64: ::c_long = 239;
++pub const SYS_futex: ::c_long = 240;
++pub const SYS_sched_setaffinity: ::c_long = 241;
++pub const SYS_sched_getaffinity: ::c_long = 242;
++pub const SYS_set_thread_area: ::c_long = 243;
++pub const SYS_get_thread_area: ::c_long = 244;
++pub const SYS_io_setup: ::c_long = 245;
++pub const SYS_io_destroy: ::c_long = 246;
++pub const SYS_io_getevents: ::c_long = 247;
++pub const SYS_io_submit: ::c_long = 248;
++pub const SYS_io_cancel: ::c_long = 249;
++pub const SYS_fadvise64: ::c_long = 250;
++pub const SYS_exit_group: ::c_long = 252;
++pub const SYS_lookup_dcookie: ::c_long = 253;
++pub const SYS_epoll_create: ::c_long = 254;
++pub const SYS_epoll_ctl: ::c_long = 255;
++pub const SYS_epoll_wait: ::c_long = 256;
++pub const SYS_remap_file_pages: ::c_long = 257;
++pub const SYS_set_tid_address: ::c_long = 258;
++pub const SYS_timer_create: ::c_long = 259;
++pub const SYS_timer_settime: ::c_long = 260;
++pub const SYS_timer_gettime: ::c_long = 261;
++pub const SYS_timer_getoverrun: ::c_long = 262;
++pub const SYS_timer_delete: ::c_long = 263;
++pub const SYS_clock_settime: ::c_long = 264;
++pub const SYS_clock_gettime: ::c_long = 265;
++pub const SYS_clock_getres: ::c_long = 266;
++pub const SYS_clock_nanosleep: ::c_long = 267;
++pub const SYS_statfs64: ::c_long = 268;
++pub const SYS_fstatfs64: ::c_long = 269;
++pub const SYS_tgkill: ::c_long = 270;
++pub const SYS_utimes: ::c_long = 271;
++pub const SYS_fadvise64_64: ::c_long = 272;
++pub const SYS_vserver: ::c_long = 273;
++pub const SYS_mbind: ::c_long = 274;
++pub const SYS_get_mempolicy: ::c_long = 275;
++pub const SYS_set_mempolicy: ::c_long = 276;
++pub const SYS_mq_open: ::c_long = 277;
++pub const SYS_mq_unlink: ::c_long = 278;
++pub const SYS_mq_timedsend: ::c_long = 279;
++pub const SYS_mq_timedreceive: ::c_long = 280;
++pub const SYS_mq_notify: ::c_long = 281;
++pub const SYS_mq_getsetattr: ::c_long = 282;
++pub const SYS_kexec_load: ::c_long = 283;
++pub const SYS_waitid: ::c_long = 284;
++pub const SYS_add_key: ::c_long = 286;
++pub const SYS_request_key: ::c_long = 287;
++pub const SYS_keyctl: ::c_long = 288;
++pub const SYS_ioprio_set: ::c_long = 289;
++pub const SYS_ioprio_get: ::c_long = 290;
++pub const SYS_inotify_init: ::c_long = 291;
++pub const SYS_inotify_add_watch: ::c_long = 292;
++pub const SYS_inotify_rm_watch: ::c_long = 293;
++pub const SYS_migrate_pages: ::c_long = 294;
++pub const SYS_openat: ::c_long = 295;
++pub const SYS_mkdirat: ::c_long = 296;
++pub const SYS_mknodat: ::c_long = 297;
++pub const SYS_fchownat: ::c_long = 298;
++pub const SYS_futimesat: ::c_long = 299;
++pub const SYS_fstatat64: ::c_long = 300;
++pub const SYS_unlinkat: ::c_long = 301;
++pub const SYS_renameat: ::c_long = 302;
++pub const SYS_linkat: ::c_long = 303;
++pub const SYS_symlinkat: ::c_long = 304;
++pub const SYS_readlinkat: ::c_long = 305;
++pub const SYS_fchmodat: ::c_long = 306;
++pub const SYS_faccessat: ::c_long = 307;
++pub const SYS_pselect6: ::c_long = 308;
++pub const SYS_ppoll: ::c_long = 309;
++pub const SYS_unshare: ::c_long = 310;
++pub const SYS_set_robust_list: ::c_long = 311;
++pub const SYS_get_robust_list: ::c_long = 312;
++pub const SYS_splice: ::c_long = 313;
++pub const SYS_sync_file_range: ::c_long = 314;
++pub const SYS_tee: ::c_long = 315;
++pub const SYS_vmsplice: ::c_long = 316;
++pub const SYS_move_pages: ::c_long = 317;
++pub const SYS_getcpu: ::c_long = 318;
++pub const SYS_epoll_pwait: ::c_long = 319;
++pub const SYS_utimensat: ::c_long = 320;
++pub const SYS_signalfd: ::c_long = 321;
++pub const SYS_timerfd_create: ::c_long = 322;
++pub const SYS_eventfd: ::c_long = 323;
++pub const SYS_fallocate: ::c_long = 324;
++pub const SYS_timerfd_settime: ::c_long = 325;
++pub const SYS_timerfd_gettime: ::c_long = 326;
++pub const SYS_signalfd4: ::c_long = 327;
++pub const SYS_eventfd2: ::c_long = 328;
++pub const SYS_epoll_create1: ::c_long = 329;
++pub const SYS_dup3: ::c_long = 330;
++pub const SYS_pipe2: ::c_long = 331;
++pub const SYS_inotify_init1: ::c_long = 332;
++pub const SYS_preadv: ::c_long = 333;
++pub const SYS_pwritev: ::c_long = 334;
++pub const SYS_rt_tgsigqueueinfo: ::c_long = 335;
++pub const SYS_perf_event_open: ::c_long = 336;
++pub const SYS_recvmmsg: ::c_long = 337;
++pub const SYS_fanotify_init: ::c_long = 338;
++pub const SYS_fanotify_mark: ::c_long = 339;
++pub const SYS_prlimit64: ::c_long = 340;
++pub const SYS_name_to_handle_at: ::c_long = 341;
++pub const SYS_open_by_handle_at: ::c_long = 342;
++pub const SYS_clock_adjtime: ::c_long = 343;
++pub const SYS_syncfs: ::c_long = 344;
++pub const SYS_sendmmsg: ::c_long = 345;
++pub const SYS_setns: ::c_long = 346;
++pub const SYS_process_vm_readv: ::c_long = 347;
++pub const SYS_process_vm_writev: ::c_long = 348;
++pub const SYS_kcmp: ::c_long = 349;
++pub const SYS_finit_module: ::c_long = 350;
++pub const SYS_sched_setattr: ::c_long = 351;
++pub const SYS_sched_getattr: ::c_long = 352;
++pub const SYS_renameat2: ::c_long = 353;
++pub const SYS_seccomp: ::c_long = 354;
++pub const SYS_getrandom: ::c_long = 355;
++pub const SYS_memfd_create: ::c_long = 356;
++pub const SYS_bpf: ::c_long = 357;
++pub const SYS_execveat: ::c_long = 358;
++pub const SYS_socket: ::c_long = 359;
++pub const SYS_socketpair: ::c_long = 360;
++pub const SYS_bind: ::c_long = 361;
++pub const SYS_connect: ::c_long = 362;
++pub const SYS_listen: ::c_long = 363;
++pub const SYS_accept4: ::c_long = 364;
++pub const SYS_getsockopt: ::c_long = 365;
++pub const SYS_setsockopt: ::c_long = 366;
++pub const SYS_getsockname: ::c_long = 367;
++pub const SYS_getpeername: ::c_long = 368;
++pub const SYS_sendto: ::c_long = 369;
++pub const SYS_sendmsg: ::c_long = 370;
++pub const SYS_recvfrom: ::c_long = 371;
++pub const SYS_recvmsg: ::c_long = 372;
++pub const SYS_shutdown: ::c_long = 373;
++pub const SYS_userfaultfd: ::c_long = 374;
++pub const SYS_membarrier: ::c_long = 375;
++pub const SYS_mlock2: ::c_long = 376;
++pub const SYS_copy_file_range: ::c_long = 377;
++pub const SYS_preadv2: ::c_long = 378;
++pub const SYS_pwritev2: ::c_long = 379;
++pub const SYS_pkey_mprotect: ::c_long = 380;
++pub const SYS_pkey_alloc: ::c_long = 381;
++pub const SYS_pkey_free: ::c_long = 382;
++
++// offsets in user_regs_structs, from sys/reg.h
++pub const EBX: ::c_int = 0;
++pub const ECX: ::c_int = 1;
++pub const EDX: ::c_int = 2;
++pub const ESI: ::c_int = 3;
++pub const EDI: ::c_int = 4;
++pub const EBP: ::c_int = 5;
++pub const EAX: ::c_int = 6;
++pub const DS: ::c_int = 7;
++pub const ES: ::c_int = 8;
++pub const FS: ::c_int = 9;
++pub const GS: ::c_int = 10;
++pub const ORIG_EAX: ::c_int = 11;
++pub const EIP: ::c_int = 12;
++pub const CS: ::c_int = 13;
++pub const EFL: ::c_int = 14;
++pub const UESP: ::c_int = 15;
++pub const SS: ::c_int = 16;
++
++extern {
++    pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
++    pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
++    pub fn makecontext(ucp: *mut ucontext_t,
++                       func:  extern fn (),
++                       argc: ::c_int, ...);
++    pub fn swapcontext(uocp: *mut ucontext_t,
++                       ucp: *const ucontext_t) -> ::c_int;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ed7586d591d41a359d37a88157ba67915dc71a53
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,458 @@@
++//! AArch64-specific definitions for 64-bit linux-like values
++
++pub type c_char = u8;
++pub type wchar_t = u32;
++pub type nlink_t = u32;
++pub type blksize_t = i32;
++pub type suseconds_t = i64;
++pub type __u64 = ::c_ulonglong;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __pad1: ::dev_t,
++        pub st_size: ::off_t,
++        pub st_blksize: ::blksize_t,
++        __pad2: ::c_int,
++        pub st_blocks: ::blkcnt_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        __unused: [::c_int; 2],
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __pad1: ::dev_t,
++        pub st_size: ::off64_t,
++        pub st_blksize: ::blksize_t,
++        __pad2: ::c_int,
++        pub st_blocks: ::blkcnt64_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        __unused: [::c_int; 2],
++    }
++
++    pub struct pthread_attr_t {
++        __size: [u64; 8]
++    }
++
++    pub struct ipc_perm {
++        pub __key: ::key_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++        pub cuid: ::uid_t,
++        pub cgid: ::gid_t,
++        pub mode: ::c_uint,
++        pub __seq: ::c_ushort,
++        __pad1: ::c_ushort,
++        __unused1: ::c_ulong,
++        __unused2: ::c_ulong
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_segsz: ::size_t,
++        pub shm_atime: ::time_t,
++        pub shm_dtime: ::time_t,
++        pub shm_ctime: ::time_t,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::shmatt_t,
++        __unused4: ::c_ulong,
++        __unused5: ::c_ulong
++    }
++}
++
++pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
++pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
++
++pub const RLIMIT_NOFILE: ::c_int = 7;
++pub const RLIMIT_NPROC: ::c_int = 6;
++
++pub const O_APPEND: ::c_int = 1024;
++pub const O_CREAT: ::c_int = 64;
++pub const O_EXCL: ::c_int = 128;
++pub const O_NOCTTY: ::c_int = 256;
++pub const O_NONBLOCK: ::c_int = 2048;
++pub const O_SYNC: ::c_int = 1052672;
++pub const O_RSYNC: ::c_int = 1052672;
++pub const O_DSYNC: ::c_int = 4096;
++pub const O_FSYNC: ::c_int = 0x101000;
++pub const O_NOATIME: ::c_int = 0o1000000;
++pub const O_PATH: ::c_int = 0o10000000;
++
++pub const MAP_GROWSDOWN: ::c_int = 0x0100;
++
++pub const EDEADLK: ::c_int = 35;
++pub const ENAMETOOLONG: ::c_int = 36;
++pub const ENOLCK: ::c_int = 37;
++pub const ENOSYS: ::c_int = 38;
++pub const ENOTEMPTY: ::c_int = 39;
++pub const ELOOP: ::c_int = 40;
++pub const ENOMSG: ::c_int = 42;
++pub const EIDRM: ::c_int = 43;
++pub const ECHRNG: ::c_int = 44;
++pub const EL2NSYNC: ::c_int = 45;
++pub const EL3HLT: ::c_int = 46;
++pub const EL3RST: ::c_int = 47;
++pub const ELNRNG: ::c_int = 48;
++pub const EUNATCH: ::c_int = 49;
++pub const ENOCSI: ::c_int = 50;
++pub const EL2HLT: ::c_int = 51;
++pub const EBADE: ::c_int = 52;
++pub const EBADR: ::c_int = 53;
++pub const EXFULL: ::c_int = 54;
++pub const ENOANO: ::c_int = 55;
++pub const EBADRQC: ::c_int = 56;
++pub const EBADSLT: ::c_int = 57;
++pub const EMULTIHOP: ::c_int = 72;
++pub const EOVERFLOW: ::c_int = 75;
++pub const ENOTUNIQ: ::c_int = 76;
++pub const EBADFD: ::c_int = 77;
++pub const EBADMSG: ::c_int = 74;
++pub const EREMCHG: ::c_int = 78;
++pub const ELIBACC: ::c_int = 79;
++pub const ELIBBAD: ::c_int = 80;
++pub const ELIBSCN: ::c_int = 81;
++pub const ELIBMAX: ::c_int = 82;
++pub const ELIBEXEC: ::c_int = 83;
++pub const EILSEQ: ::c_int = 84;
++pub const ERESTART: ::c_int = 85;
++pub const ESTRPIPE: ::c_int = 86;
++pub const EUSERS: ::c_int = 87;
++pub const ENOTSOCK: ::c_int = 88;
++pub const EDESTADDRREQ: ::c_int = 89;
++pub const EMSGSIZE: ::c_int = 90;
++pub const EPROTOTYPE: ::c_int = 91;
++pub const ENOPROTOOPT: ::c_int = 92;
++pub const EPROTONOSUPPORT: ::c_int = 93;
++pub const ESOCKTNOSUPPORT: ::c_int = 94;
++pub const EOPNOTSUPP: ::c_int = 95;
++pub const EPFNOSUPPORT: ::c_int = 96;
++pub const EAFNOSUPPORT: ::c_int = 97;
++pub const EADDRINUSE: ::c_int = 98;
++pub const EADDRNOTAVAIL: ::c_int = 99;
++pub const ENETDOWN: ::c_int = 100;
++pub const ENETUNREACH: ::c_int = 101;
++pub const ENETRESET: ::c_int = 102;
++pub const ECONNABORTED: ::c_int = 103;
++pub const ECONNRESET: ::c_int = 104;
++pub const ENOBUFS: ::c_int = 105;
++pub const EISCONN: ::c_int = 106;
++pub const ENOTCONN: ::c_int = 107;
++pub const ESHUTDOWN: ::c_int = 108;
++pub const ETOOMANYREFS: ::c_int = 109;
++pub const ETIMEDOUT: ::c_int = 110;
++pub const ECONNREFUSED: ::c_int = 111;
++pub const EHOSTDOWN: ::c_int = 112;
++pub const EHOSTUNREACH: ::c_int = 113;
++pub const EALREADY: ::c_int = 114;
++pub const EINPROGRESS: ::c_int = 115;
++pub const ESTALE: ::c_int = 116;
++pub const EDQUOT: ::c_int = 122;
++pub const ENOMEDIUM: ::c_int = 123;
++pub const EMEDIUMTYPE: ::c_int = 124;
++pub const ECANCELED: ::c_int = 125;
++pub const ENOKEY: ::c_int = 126;
++pub const EKEYEXPIRED: ::c_int = 127;
++pub const EKEYREVOKED: ::c_int = 128;
++pub const EKEYREJECTED: ::c_int = 129;
++pub const EOWNERDEAD: ::c_int = 130;
++pub const ENOTRECOVERABLE: ::c_int = 131;
++pub const EHWPOISON: ::c_int = 133;
++pub const ERFKILL: ::c_int = 132;
++
++pub const SOL_SOCKET: ::c_int = 1;
++
++pub const SO_REUSEADDR: ::c_int = 2;
++pub const SO_TYPE: ::c_int = 3;
++pub const SO_ERROR: ::c_int = 4;
++pub const SO_DONTROUTE: ::c_int = 5;
++pub const SO_BROADCAST: ::c_int = 6;
++pub const SO_SNDBUF: ::c_int = 7;
++pub const SO_RCVBUF: ::c_int = 8;
++pub const SO_SNDBUFFORCE: ::c_int = 32;
++pub const SO_RCVBUFFORCE: ::c_int = 33;
++pub const SO_KEEPALIVE: ::c_int = 9;
++pub const SO_OOBINLINE: ::c_int = 10;
++pub const SO_NO_CHECK: ::c_int = 11;
++pub const SO_PRIORITY: ::c_int = 12;
++pub const SO_LINGER: ::c_int = 13;
++pub const SO_BSDCOMPAT: ::c_int = 14;
++pub const SO_REUSEPORT: ::c_int = 15;
++pub const SO_PASSCRED: ::c_int = 16;
++pub const SO_PEERCRED: ::c_int = 17;
++pub const SO_RCVLOWAT: ::c_int = 18;
++pub const SO_SNDLOWAT: ::c_int = 19;
++pub const SO_RCVTIMEO: ::c_int = 20;
++pub const SO_SNDTIMEO: ::c_int = 21;
++pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
++pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
++pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
++pub const SO_BINDTODEVICE: ::c_int = 25;
++pub const SO_ATTACH_FILTER: ::c_int = 26;
++pub const SO_DETACH_FILTER: ::c_int = 27;
++pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
++pub const SO_PEERNAME: ::c_int = 28;
++pub const SO_TIMESTAMP: ::c_int = 29;
++pub const SO_ACCEPTCONN: ::c_int = 30;
++pub const SO_PEERSEC: ::c_int = 31;
++pub const SO_PASSSEC: ::c_int = 34;
++pub const SO_TIMESTAMPNS: ::c_int = 35;
++pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
++pub const SO_MARK: ::c_int = 36;
++pub const SO_TIMESTAMPING: ::c_int = 37;
++pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
++pub const SO_PROTOCOL: ::c_int = 38;
++pub const SO_DOMAIN: ::c_int = 39;
++pub const SO_RXQ_OVFL: ::c_int = 40;
++pub const SO_WIFI_STATUS: ::c_int = 41;
++pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
++pub const SO_PEEK_OFF: ::c_int = 42;
++pub const SO_NOFCS: ::c_int = 43;
++pub const SO_LOCK_FILTER: ::c_int = 44;
++pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
++pub const SO_BUSY_POLL: ::c_int = 46;
++pub const SO_MAX_PACING_RATE: ::c_int = 47;
++pub const SO_BPF_EXTENSIONS: ::c_int = 48;
++pub const SO_INCOMING_CPU: ::c_int = 49;
++pub const SO_ATTACH_BPF: ::c_int = 50;
++pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
++
++pub const SA_ONSTACK: ::c_int = 0x08000000;
++pub const SA_SIGINFO: ::c_int = 0x00000004;
++pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
++
++pub const SIGCHLD: ::c_int = 17;
++pub const SIGBUS: ::c_int = 7;
++pub const SIGUSR1: ::c_int = 10;
++pub const SIGUSR2: ::c_int = 12;
++pub const SIGCONT: ::c_int = 18;
++pub const SIGSTOP: ::c_int = 19;
++pub const SIGTSTP: ::c_int = 20;
++pub const SIGURG: ::c_int = 23;
++pub const SIGIO: ::c_int = 29;
++pub const SIGSYS: ::c_int = 31;
++pub const SIGSTKFLT: ::c_int = 16;
++pub const SIGUNUSED: ::c_int = 31;
++pub const SIGPOLL: ::c_int = 29;
++pub const SIGPWR: ::c_int = 30;
++pub const SIG_SETMASK: ::c_int = 2;
++pub const SIG_BLOCK: ::c_int = 0x000000;
++pub const SIG_UNBLOCK: ::c_int = 0x01;
++
++pub const POLLWRNORM: ::c_short = 0x100;
++pub const POLLWRBAND: ::c_short = 0x200;
++
++pub const O_ASYNC: ::c_int = 0x2000;
++pub const O_NDELAY: ::c_int = 0x800;
++
++pub const PTRACE_DETACH: ::c_uint = 17;
++
++pub const EFD_NONBLOCK: ::c_int = 0x800;
++
++pub const F_GETLK: ::c_int = 5;
++pub const F_GETOWN: ::c_int = 9;
++pub const F_SETOWN: ::c_int = 8;
++pub const F_SETLK: ::c_int = 6;
++pub const F_SETLKW: ::c_int = 7;
++
++pub const SFD_NONBLOCK: ::c_int = 0x0800;
++
++pub const TIOCEXCL: ::c_ulong = 0x540C;
++pub const TIOCNXCL: ::c_ulong = 0x540D;
++pub const TIOCSCTTY: ::c_ulong = 0x540E;
++pub const TIOCSTI: ::c_ulong = 0x5412;
++pub const TIOCMGET: ::c_ulong = 0x5415;
++pub const TIOCMBIS: ::c_ulong = 0x5416;
++pub const TIOCMBIC: ::c_ulong = 0x5417;
++pub const TIOCMSET: ::c_ulong = 0x5418;
++pub const TIOCCONS: ::c_ulong = 0x541D;
++
++pub const SFD_CLOEXEC: ::c_int = 0x080000;
++
++pub const NCCS: usize = 32;
++
++pub const O_TRUNC: ::c_int = 512;
++
++pub const O_CLOEXEC: ::c_int = 0x80000;
++
++pub const EBFONT: ::c_int = 59;
++pub const ENOSTR: ::c_int = 60;
++pub const ENODATA: ::c_int = 61;
++pub const ETIME: ::c_int = 62;
++pub const ENOSR: ::c_int = 63;
++pub const ENONET: ::c_int = 64;
++pub const ENOPKG: ::c_int = 65;
++pub const EREMOTE: ::c_int = 66;
++pub const ENOLINK: ::c_int = 67;
++pub const EADV: ::c_int = 68;
++pub const ESRMNT: ::c_int = 69;
++pub const ECOMM: ::c_int = 70;
++pub const EPROTO: ::c_int = 71;
++pub const EDOTDOT: ::c_int = 73;
++
++pub const SA_NODEFER: ::c_int = 0x40000000;
++pub const SA_RESETHAND: ::c_int = 0x80000000;
++pub const SA_RESTART: ::c_int = 0x10000000;
++pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
++
++pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
++
++pub const EFD_CLOEXEC: ::c_int = 0x80000;
++
++pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 8;
++pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 48;
++pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 8;
++
++pub const O_DIRECT: ::c_int = 0x10000;
++pub const O_DIRECTORY: ::c_int = 0x4000;
++pub const O_NOFOLLOW: ::c_int = 0x8000;
++
++pub const MAP_LOCKED: ::c_int = 0x02000;
++pub const MAP_NORESERVE: ::c_int = 0x04000;
++
++pub const EDEADLOCK: ::c_int = 35;
++
++pub const FIOCLEX: ::c_ulong = 0x5451;
++pub const FIONBIO: ::c_ulong = 0x5421;
++
++pub const SYS_gettid: ::c_long = 178;
++pub const SYS_perf_event_open: ::c_long = 241;
++
++pub const MCL_CURRENT: ::c_int = 0x0001;
++pub const MCL_FUTURE: ::c_int = 0x0002;
++
++pub const SIGSTKSZ: ::size_t = 16384;
++pub const MINSIGSTKSZ: ::size_t = 5120;
++pub const CBAUD: ::tcflag_t = 0o0010017;
++pub const TAB1: ::c_int = 0x00000800;
++pub const TAB2: ::c_int = 0x00001000;
++pub const TAB3: ::c_int = 0x00001800;
++pub const CR1: ::c_int  = 0x00000200;
++pub const CR2: ::c_int  = 0x00000400;
++pub const CR3: ::c_int  = 0x00000600;
++pub const FF1: ::c_int  = 0x00008000;
++pub const BS1: ::c_int  = 0x00002000;
++pub const VT1: ::c_int  = 0x00004000;
++pub const VWERASE: usize = 14;
++pub const VREPRINT: usize = 12;
++pub const VSUSP: usize = 10;
++pub const VSTART: usize = 8;
++pub const VSTOP: usize = 9;
++pub const VDISCARD: usize = 13;
++pub const VTIME: usize = 5;
++pub const IXON: ::tcflag_t = 0x00000400;
++pub const IXOFF: ::tcflag_t = 0x00001000;
++pub const ONLCR: ::tcflag_t = 0x4;
++pub const CSIZE: ::tcflag_t = 0x00000030;
++pub const CS6: ::tcflag_t = 0x00000010;
++pub const CS7: ::tcflag_t = 0x00000020;
++pub const CS8: ::tcflag_t = 0x00000030;
++pub const CSTOPB: ::tcflag_t = 0x00000040;
++pub const CREAD: ::tcflag_t = 0x00000080;
++pub const PARENB: ::tcflag_t = 0x00000100;
++pub const PARODD: ::tcflag_t = 0x00000200;
++pub const HUPCL: ::tcflag_t = 0x00000400;
++pub const CLOCAL: ::tcflag_t = 0x00000800;
++pub const ECHOKE: ::tcflag_t = 0x00000800;
++pub const ECHOE: ::tcflag_t = 0x00000010;
++pub const ECHOK: ::tcflag_t = 0x00000020;
++pub const ECHONL: ::tcflag_t = 0x00000040;
++pub const ECHOPRT: ::tcflag_t = 0x00000400;
++pub const ECHOCTL: ::tcflag_t = 0x00000200;
++pub const ISIG: ::tcflag_t = 0x00000001;
++pub const ICANON: ::tcflag_t = 0x00000002;
++pub const PENDIN: ::tcflag_t = 0x00004000;
++pub const NOFLSH: ::tcflag_t = 0x00000080;
++pub const CIBAUD: ::tcflag_t = 0o02003600000;
++pub const CBAUDEX: ::tcflag_t = 0o010000;
++pub const VSWTC: usize = 7;
++pub const OLCUC:  ::tcflag_t = 0o000002;
++pub const NLDLY:  ::tcflag_t = 0o000400;
++pub const CRDLY:  ::tcflag_t = 0o003000;
++pub const TABDLY: ::tcflag_t = 0o014000;
++pub const BSDLY:  ::tcflag_t = 0o020000;
++pub const FFDLY:  ::tcflag_t = 0o100000;
++pub const VTDLY:  ::tcflag_t = 0o040000;
++pub const XTABS:  ::tcflag_t = 0o014000;
++
++pub const B0: ::speed_t = 0o000000;
++pub const B50: ::speed_t = 0o000001;
++pub const B75: ::speed_t = 0o000002;
++pub const B110: ::speed_t = 0o000003;
++pub const B134: ::speed_t = 0o000004;
++pub const B150: ::speed_t = 0o000005;
++pub const B200: ::speed_t = 0o000006;
++pub const B300: ::speed_t = 0o000007;
++pub const B600: ::speed_t = 0o000010;
++pub const B1200: ::speed_t = 0o000011;
++pub const B1800: ::speed_t = 0o000012;
++pub const B2400: ::speed_t = 0o000013;
++pub const B4800: ::speed_t = 0o000014;
++pub const B9600: ::speed_t = 0o000015;
++pub const B19200: ::speed_t = 0o000016;
++pub const B38400: ::speed_t = 0o000017;
++pub const EXTA: ::speed_t = B19200;
++pub const EXTB: ::speed_t = B38400;
++pub const B57600: ::speed_t = 0o010001;
++pub const B115200: ::speed_t = 0o010002;
++pub const B230400: ::speed_t = 0o010003;
++pub const B460800: ::speed_t = 0o010004;
++pub const B500000: ::speed_t = 0o010005;
++pub const B576000: ::speed_t = 0o010006;
++pub const B921600: ::speed_t = 0o010007;
++pub const B1000000: ::speed_t = 0o010010;
++pub const B1152000: ::speed_t = 0o010011;
++pub const B1500000: ::speed_t = 0o010012;
++pub const B2000000: ::speed_t = 0o010013;
++pub const B2500000: ::speed_t = 0o010014;
++pub const B3000000: ::speed_t = 0o010015;
++pub const B3500000: ::speed_t = 0o010016;
++pub const B4000000: ::speed_t = 0o010017;
++
++pub const VEOL: usize = 11;
++pub const VEOL2: usize = 16;
++pub const VMIN: usize = 6;
++pub const IEXTEN: ::tcflag_t = 0x00008000;
++pub const TOSTOP: ::tcflag_t = 0x00000100;
++pub const FLUSHO: ::tcflag_t = 0x00001000;
++pub const EXTPROC: ::tcflag_t = 0x00010000;
++pub const TCGETS: ::c_ulong = 0x5401;
++pub const TCSETS: ::c_ulong = 0x5402;
++pub const TCSETSW: ::c_ulong = 0x5403;
++pub const TCSETSF: ::c_ulong = 0x5404;
++pub const TCGETA: ::c_ulong = 0x5405;
++pub const TCSETA: ::c_ulong = 0x5406;
++pub const TCSETAW: ::c_ulong = 0x5407;
++pub const TCSETAF: ::c_ulong = 0x5408;
++pub const TCSBRK: ::c_ulong = 0x5409;
++pub const TCXONC: ::c_ulong = 0x540A;
++pub const TCFLSH: ::c_ulong = 0x540B;
++pub const TIOCINQ: ::c_ulong = 0x541B;
++pub const TIOCGPGRP: ::c_ulong = 0x540F;
++pub const TIOCSPGRP: ::c_ulong = 0x5410;
++pub const TIOCOUTQ: ::c_ulong = 0x5411;
++pub const TIOCGWINSZ: ::c_ulong = 0x5413;
++pub const TIOCSWINSZ: ::c_ulong = 0x5414;
++pub const FIONREAD: ::c_ulong = 0x541B;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..aa0e09108f7fd093d4e0941d94ea28855b4b50e7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,70 @@@
++//! 64-bit specific definitions for linux-like values
++
++pub type c_long = i64;
++pub type c_ulong = u64;
++pub type clock_t = i64;
++pub type time_t = i64;
++pub type ino_t = u64;
++pub type off_t = i64;
++pub type blkcnt_t = i64;
++pub type __fsword_t = ::c_long;
++
++s! {
++    pub struct sigset_t {
++        __val: [::c_ulong; 16],
++    }
++
++    pub struct sysinfo {
++        pub uptime: ::c_long,
++        pub loads: [::c_ulong; 3],
++        pub totalram: ::c_ulong,
++        pub freeram: ::c_ulong,
++        pub sharedram: ::c_ulong,
++        pub bufferram: ::c_ulong,
++        pub totalswap: ::c_ulong,
++        pub freeswap: ::c_ulong,
++        pub procs: ::c_ushort,
++        pub pad: ::c_ushort,
++        pub totalhigh: ::c_ulong,
++        pub freehigh: ::c_ulong,
++        pub mem_unit: ::c_uint,
++        pub _f: [::c_char; 0],
++    }
++
++    pub struct msqid_ds {
++        pub msg_perm: ::ipc_perm,
++        pub msg_stime: ::time_t,
++        pub msg_rtime: ::time_t,
++        pub msg_ctime: ::time_t,
++        __msg_cbytes: ::c_ulong,
++        pub msg_qnum: ::msgqnum_t,
++        pub msg_qbytes: ::msglen_t,
++        pub msg_lspid: ::pid_t,
++        pub msg_lrpid: ::pid_t,
++        __glibc_reserved4: ::c_ulong,
++        __glibc_reserved5: ::c_ulong,
++    }
++}
++
++pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
++pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
++
++pub const O_LARGEFILE: ::c_int = 0;
++
++cfg_if! {
++    if #[cfg(target_arch = "aarch64")] {
++        mod aarch64;
++        pub use self::aarch64::*;
++    } else if #[cfg(any(target_arch = "powerpc64"))] {
++        mod powerpc64;
++        pub use self::powerpc64::*;
++    } else if #[cfg(any(target_arch = "sparc64"))] {
++        mod sparc64;
++        pub use self::sparc64::*;
++    } else if #[cfg(any(target_arch = "x86_64"))] {
++        mod x86_64;
++        pub use self::x86_64::*;
++    } else {
++        // Unknown target_arch
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b942db72e7ac616c44fb14592aacf7034dccd141
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,455 @@@
++//! PowerPC64-specific definitions for 64-bit linux-like values
++
++pub type c_char = u8;
++pub type wchar_t = i32;
++pub type nlink_t = u64;
++pub type blksize_t = i64;
++pub type suseconds_t = i64;
++pub type __u64 = ::c_ulong;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino_t,
++        pub st_nlink: ::nlink_t,
++        pub st_mode: ::mode_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        __pad0: ::c_int,
++        pub st_rdev: ::dev_t,
++        pub st_size: ::off_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        __unused: [::c_long; 3],
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino64_t,
++        pub st_nlink: ::nlink_t,
++        pub st_mode: ::mode_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        __pad0: ::c_int,
++        pub st_rdev: ::dev_t,
++        pub st_size: ::off64_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt64_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        __reserved: [::c_long; 3],
++    }
++
++    pub struct pthread_attr_t {
++        __size: [u64; 7]
++    }
++
++    pub struct ipc_perm {
++        pub __key: ::key_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++        pub cuid: ::uid_t,
++        pub cgid: ::gid_t,
++        pub mode: ::mode_t,
++        pub __seq: ::uint32_t,
++        __pad1: ::uint32_t,
++        __unused1: ::uint64_t,
++        __unused2: ::c_ulong,
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_atime: ::time_t,
++        pub shm_dtime: ::time_t,
++        pub shm_ctime: ::time_t,
++        pub shm_segsz: ::size_t,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::shmatt_t,
++        __unused4: ::c_ulong,
++        __unused5: ::c_ulong
++    }
++}
++
++pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
++pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
++
++pub const RLIMIT_NOFILE: ::c_int = 7;
++pub const RLIMIT_NPROC: ::c_int = 6;
++
++pub const O_APPEND: ::c_int = 1024;
++pub const O_CREAT: ::c_int = 64;
++pub const O_EXCL: ::c_int = 128;
++pub const O_NOCTTY: ::c_int = 256;
++pub const O_NONBLOCK: ::c_int = 2048;
++pub const O_SYNC: ::c_int = 1052672;
++pub const O_RSYNC: ::c_int = 1052672;
++pub const O_DSYNC: ::c_int = 4096;
++pub const O_FSYNC: ::c_int = 0x101000;
++pub const O_NOATIME: ::c_int = 0o1000000;
++pub const O_PATH: ::c_int = 0o10000000;
++
++pub const MAP_GROWSDOWN: ::c_int = 0x0100;
++
++pub const EDEADLK: ::c_int = 35;
++pub const ENAMETOOLONG: ::c_int = 36;
++pub const ENOLCK: ::c_int = 37;
++pub const ENOSYS: ::c_int = 38;
++pub const ENOTEMPTY: ::c_int = 39;
++pub const ELOOP: ::c_int = 40;
++pub const ENOMSG: ::c_int = 42;
++pub const EIDRM: ::c_int = 43;
++pub const ECHRNG: ::c_int = 44;
++pub const EL2NSYNC: ::c_int = 45;
++pub const EL3HLT: ::c_int = 46;
++pub const EL3RST: ::c_int = 47;
++pub const ELNRNG: ::c_int = 48;
++pub const EUNATCH: ::c_int = 49;
++pub const ENOCSI: ::c_int = 50;
++pub const EL2HLT: ::c_int = 51;
++pub const EBADE: ::c_int = 52;
++pub const EBADR: ::c_int = 53;
++pub const EXFULL: ::c_int = 54;
++pub const ENOANO: ::c_int = 55;
++pub const EBADRQC: ::c_int = 56;
++pub const EBADSLT: ::c_int = 57;
++pub const EMULTIHOP: ::c_int = 72;
++pub const EOVERFLOW: ::c_int = 75;
++pub const ENOTUNIQ: ::c_int = 76;
++pub const EBADFD: ::c_int = 77;
++pub const EBADMSG: ::c_int = 74;
++pub const EREMCHG: ::c_int = 78;
++pub const ELIBACC: ::c_int = 79;
++pub const ELIBBAD: ::c_int = 80;
++pub const ELIBSCN: ::c_int = 81;
++pub const ELIBMAX: ::c_int = 82;
++pub const ELIBEXEC: ::c_int = 83;
++pub const EILSEQ: ::c_int = 84;
++pub const ERESTART: ::c_int = 85;
++pub const ESTRPIPE: ::c_int = 86;
++pub const EUSERS: ::c_int = 87;
++pub const ENOTSOCK: ::c_int = 88;
++pub const EDESTADDRREQ: ::c_int = 89;
++pub const EMSGSIZE: ::c_int = 90;
++pub const EPROTOTYPE: ::c_int = 91;
++pub const ENOPROTOOPT: ::c_int = 92;
++pub const EPROTONOSUPPORT: ::c_int = 93;
++pub const ESOCKTNOSUPPORT: ::c_int = 94;
++pub const EOPNOTSUPP: ::c_int = 95;
++pub const EPFNOSUPPORT: ::c_int = 96;
++pub const EAFNOSUPPORT: ::c_int = 97;
++pub const EADDRINUSE: ::c_int = 98;
++pub const EADDRNOTAVAIL: ::c_int = 99;
++pub const ENETDOWN: ::c_int = 100;
++pub const ENETUNREACH: ::c_int = 101;
++pub const ENETRESET: ::c_int = 102;
++pub const ECONNABORTED: ::c_int = 103;
++pub const ECONNRESET: ::c_int = 104;
++pub const ENOBUFS: ::c_int = 105;
++pub const EISCONN: ::c_int = 106;
++pub const ENOTCONN: ::c_int = 107;
++pub const ESHUTDOWN: ::c_int = 108;
++pub const ETOOMANYREFS: ::c_int = 109;
++pub const ETIMEDOUT: ::c_int = 110;
++pub const ECONNREFUSED: ::c_int = 111;
++pub const EHOSTDOWN: ::c_int = 112;
++pub const EHOSTUNREACH: ::c_int = 113;
++pub const EALREADY: ::c_int = 114;
++pub const EINPROGRESS: ::c_int = 115;
++pub const ESTALE: ::c_int = 116;
++pub const EDQUOT: ::c_int = 122;
++pub const ENOMEDIUM: ::c_int = 123;
++pub const EMEDIUMTYPE: ::c_int = 124;
++pub const ECANCELED: ::c_int = 125;
++pub const ENOKEY: ::c_int = 126;
++pub const EKEYEXPIRED: ::c_int = 127;
++pub const EKEYREVOKED: ::c_int = 128;
++pub const EKEYREJECTED: ::c_int = 129;
++pub const EOWNERDEAD: ::c_int = 130;
++pub const ENOTRECOVERABLE: ::c_int = 131;
++pub const EHWPOISON: ::c_int = 133;
++pub const ERFKILL: ::c_int = 132;
++
++pub const SOL_SOCKET: ::c_int = 1;
++
++pub const SO_REUSEADDR: ::c_int = 2;
++pub const SO_TYPE: ::c_int = 3;
++pub const SO_ERROR: ::c_int = 4;
++pub const SO_DONTROUTE: ::c_int = 5;
++pub const SO_BROADCAST: ::c_int = 6;
++pub const SO_SNDBUF: ::c_int = 7;
++pub const SO_RCVBUF: ::c_int = 8;
++pub const SO_SNDBUFFORCE: ::c_int = 32;
++pub const SO_RCVBUFFORCE: ::c_int = 33;
++pub const SO_KEEPALIVE: ::c_int = 9;
++pub const SO_OOBINLINE: ::c_int = 10;
++pub const SO_NO_CHECK: ::c_int = 11;
++pub const SO_PRIORITY: ::c_int = 12;
++pub const SO_LINGER: ::c_int = 13;
++pub const SO_BSDCOMPAT: ::c_int = 14;
++pub const SO_REUSEPORT: ::c_int = 15;
++pub const SO_PASSCRED: ::c_int = 20;
++pub const SO_PEERCRED: ::c_int = 21;
++pub const SO_RCVLOWAT: ::c_int = 16;
++pub const SO_SNDLOWAT: ::c_int = 17;
++pub const SO_RCVTIMEO: ::c_int = 18;
++pub const SO_SNDTIMEO: ::c_int = 19;
++pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
++pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
++pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
++pub const SO_BINDTODEVICE: ::c_int = 25;
++pub const SO_ATTACH_FILTER: ::c_int = 26;
++pub const SO_DETACH_FILTER: ::c_int = 27;
++pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
++pub const SO_PEERNAME: ::c_int = 28;
++pub const SO_TIMESTAMP: ::c_int = 29;
++pub const SO_ACCEPTCONN: ::c_int = 30;
++pub const SO_PEERSEC: ::c_int = 31;
++pub const SO_PASSSEC: ::c_int = 34;
++pub const SO_TIMESTAMPNS: ::c_int = 35;
++pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
++pub const SO_MARK: ::c_int = 36;
++pub const SO_TIMESTAMPING: ::c_int = 37;
++pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
++pub const SO_PROTOCOL: ::c_int = 38;
++pub const SO_DOMAIN: ::c_int = 39;
++pub const SO_RXQ_OVFL: ::c_int = 40;
++pub const SO_WIFI_STATUS: ::c_int = 41;
++pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
++pub const SO_PEEK_OFF: ::c_int = 42;
++pub const SO_NOFCS: ::c_int = 43;
++pub const SO_LOCK_FILTER: ::c_int = 44;
++pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
++pub const SO_BUSY_POLL: ::c_int = 46;
++pub const SO_MAX_PACING_RATE: ::c_int = 47;
++pub const SO_BPF_EXTENSIONS: ::c_int = 48;
++pub const SO_INCOMING_CPU: ::c_int = 49;
++pub const SO_ATTACH_BPF: ::c_int = 50;
++pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
++
++pub const SA_ONSTACK: ::c_int = 0x08000000;
++pub const SA_SIGINFO: ::c_int = 0x00000004;
++pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
++
++pub const SIGCHLD: ::c_int = 17;
++pub const SIGBUS: ::c_int = 7;
++pub const SIGUSR1: ::c_int = 10;
++pub const SIGUSR2: ::c_int = 12;
++pub const SIGCONT: ::c_int = 18;
++pub const SIGSTOP: ::c_int = 19;
++pub const SIGTSTP: ::c_int = 20;
++pub const SIGURG: ::c_int = 23;
++pub const SIGIO: ::c_int = 29;
++pub const SIGSYS: ::c_int = 31;
++pub const SIGSTKFLT: ::c_int = 16;
++pub const SIGUNUSED: ::c_int = 31;
++pub const SIGPOLL: ::c_int = 29;
++pub const SIGPWR: ::c_int = 30;
++pub const SIG_SETMASK: ::c_int = 2;
++pub const SIG_BLOCK: ::c_int = 0x000000;
++pub const SIG_UNBLOCK: ::c_int = 0x01;
++
++pub const POLLWRNORM: ::c_short = 0x100;
++pub const POLLWRBAND: ::c_short = 0x200;
++
++pub const O_ASYNC: ::c_int = 0x2000;
++pub const O_NDELAY: ::c_int = 0x800;
++
++pub const PTRACE_DETACH: ::c_uint = 17;
++
++pub const EFD_NONBLOCK: ::c_int = 0x800;
++
++pub const F_GETLK: ::c_int = 5;
++pub const F_GETOWN: ::c_int = 9;
++pub const F_SETOWN: ::c_int = 8;
++pub const F_SETLK: ::c_int = 6;
++pub const F_SETLKW: ::c_int = 7;
++
++pub const SFD_NONBLOCK: ::c_int = 0x0800;
++
++pub const TIOCEXCL: ::c_ulong = 0x540C;
++pub const TIOCNXCL: ::c_ulong = 0x540D;
++pub const TIOCSCTTY: ::c_ulong = 0x540E;
++pub const TIOCSTI: ::c_ulong = 0x5412;
++pub const TIOCMGET: ::c_ulong = 0x5415;
++pub const TIOCMBIS: ::c_ulong = 0x5416;
++pub const TIOCMBIC: ::c_ulong = 0x5417;
++pub const TIOCMSET: ::c_ulong = 0x5418;
++pub const TIOCCONS: ::c_ulong = 0x541D;
++
++pub const SFD_CLOEXEC: ::c_int = 0x080000;
++
++pub const NCCS: usize = 32;
++
++pub const O_TRUNC: ::c_int = 512;
++
++pub const O_CLOEXEC: ::c_int = 0x80000;
++
++pub const EBFONT: ::c_int = 59;
++pub const ENOSTR: ::c_int = 60;
++pub const ENODATA: ::c_int = 61;
++pub const ETIME: ::c_int = 62;
++pub const ENOSR: ::c_int = 63;
++pub const ENONET: ::c_int = 64;
++pub const ENOPKG: ::c_int = 65;
++pub const EREMOTE: ::c_int = 66;
++pub const ENOLINK: ::c_int = 67;
++pub const EADV: ::c_int = 68;
++pub const ESRMNT: ::c_int = 69;
++pub const ECOMM: ::c_int = 70;
++pub const EPROTO: ::c_int = 71;
++pub const EDOTDOT: ::c_int = 73;
++
++pub const SA_NODEFER: ::c_int = 0x40000000;
++pub const SA_RESETHAND: ::c_int = 0x80000000;
++pub const SA_RESTART: ::c_int = 0x10000000;
++pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
++
++pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
++
++pub const EFD_CLOEXEC: ::c_int = 0x80000;
++
++pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
++pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
++
++pub const O_DIRECTORY: ::c_int = 0x4000;
++pub const O_NOFOLLOW: ::c_int = 0x8000;
++pub const O_DIRECT: ::c_int = 0x20000;
++
++pub const MAP_LOCKED: ::c_int = 0x00080;
++pub const MAP_NORESERVE: ::c_int = 0x00040;
++
++pub const EDEADLOCK: ::c_int = 58;
++
++pub const FIOCLEX: ::c_ulong = 0x20006601;
++pub const FIONBIO: ::c_ulong = 0x8004667e;
++
++pub const SYS_gettid: ::c_long = 207;
++pub const SYS_perf_event_open: ::c_long = 319;
++
++pub const MCL_CURRENT: ::c_int = 0x2000;
++pub const MCL_FUTURE: ::c_int = 0x4000;
++
++pub const SIGSTKSZ: ::size_t = 0x4000;
++pub const MINSIGSTKSZ: ::size_t = 4096;
++pub const CBAUD: ::tcflag_t = 0xff;
++pub const TAB1: ::c_int = 0x400;
++pub const TAB2: ::c_int = 0x800;
++pub const TAB3: ::c_int = 0xc00;
++pub const CR1: ::c_int  = 0x1000;
++pub const CR2: ::c_int  = 0x2000;
++pub const CR3: ::c_int  = 0x3000;
++pub const FF1: ::c_int  = 0x4000;
++pub const BS1: ::c_int  = 0x8000;
++pub const VT1: ::c_int  = 0x10000;
++pub const VWERASE: usize = 0xa;
++pub const VREPRINT: usize = 0xb;
++pub const VSUSP: usize = 0xc;
++pub const VSTART: usize = 0xd;
++pub const VSTOP: usize = 0xe;
++pub const VDISCARD: usize = 0x10;
++pub const VTIME: usize = 0x7;
++pub const IXON: ::tcflag_t = 0x200;
++pub const IXOFF: ::tcflag_t = 0x400;
++pub const ONLCR: ::tcflag_t = 0x2;
++pub const CSIZE: ::tcflag_t = 0x300;
++pub const CS6: ::tcflag_t = 0x100;
++pub const CS7: ::tcflag_t = 0x200;
++pub const CS8: ::tcflag_t = 0x300;
++pub const CSTOPB: ::tcflag_t = 0x400;
++pub const CREAD: ::tcflag_t = 0x800;
++pub const PARENB: ::tcflag_t = 0x1000;
++pub const PARODD: ::tcflag_t = 0x2000;
++pub const HUPCL: ::tcflag_t = 0x4000;
++pub const CLOCAL: ::tcflag_t = 0x8000;
++pub const ECHOKE: ::tcflag_t = 0x1;
++pub const ECHOE: ::tcflag_t = 0x2;
++pub const ECHOK: ::tcflag_t = 0x4;
++pub const ECHONL: ::tcflag_t = 0x10;
++pub const ECHOPRT: ::tcflag_t = 0x20;
++pub const ECHOCTL: ::tcflag_t = 0x40;
++pub const ISIG: ::tcflag_t = 0x80;
++pub const ICANON: ::tcflag_t = 0x100;
++pub const PENDIN: ::tcflag_t = 0x20000000;
++pub const NOFLSH: ::tcflag_t = 0x80000000;
++pub const VSWTC: usize = 9;
++pub const OLCUC:  ::tcflag_t = 0o000004;
++pub const NLDLY:  ::tcflag_t = 0o001400;
++pub const CRDLY:  ::tcflag_t = 0o030000;
++pub const TABDLY: ::tcflag_t = 0o006000;
++pub const BSDLY:  ::tcflag_t = 0o100000;
++pub const FFDLY:  ::tcflag_t = 0o040000;
++pub const VTDLY:  ::tcflag_t = 0o200000;
++pub const XTABS:  ::tcflag_t = 0o006000;
++
++pub const B0: ::speed_t = 0o000000;
++pub const B50: ::speed_t = 0o000001;
++pub const B75: ::speed_t = 0o000002;
++pub const B110: ::speed_t = 0o000003;
++pub const B134: ::speed_t = 0o000004;
++pub const B150: ::speed_t = 0o000005;
++pub const B200: ::speed_t = 0o000006;
++pub const B300: ::speed_t = 0o000007;
++pub const B600: ::speed_t = 0o000010;
++pub const B1200: ::speed_t = 0o000011;
++pub const B1800: ::speed_t = 0o000012;
++pub const B2400: ::speed_t = 0o000013;
++pub const B4800: ::speed_t = 0o000014;
++pub const B9600: ::speed_t = 0o000015;
++pub const B19200: ::speed_t = 0o000016;
++pub const B38400: ::speed_t = 0o000017;
++pub const EXTA: ::speed_t = B19200;
++pub const EXTB: ::speed_t = B38400;
++pub const CBAUDEX: ::speed_t = 0o000020;
++pub const B57600: ::speed_t = 0o0020;
++pub const B115200: ::speed_t = 0o0021;
++pub const B230400: ::speed_t = 0o0022;
++pub const B460800: ::speed_t = 0o0023;
++pub const B500000: ::speed_t = 0o0024;
++pub const B576000: ::speed_t = 0o0025;
++pub const B921600: ::speed_t = 0o0026;
++pub const B1000000: ::speed_t = 0o0027;
++pub const B1152000: ::speed_t = 0o0030;
++pub const B1500000: ::speed_t = 0o0031;
++pub const B2000000: ::speed_t = 0o0032;
++pub const B2500000: ::speed_t = 0o0033;
++pub const B3000000: ::speed_t = 0o0034;
++pub const B3500000: ::speed_t = 0o0035;
++pub const B4000000: ::speed_t = 0o0036;
++
++pub const VEOL: usize = 6;
++pub const VEOL2: usize = 8;
++pub const VMIN: usize = 5;
++pub const IEXTEN: ::tcflag_t = 0x400;
++pub const TOSTOP: ::tcflag_t = 0x400000;
++pub const FLUSHO: ::tcflag_t = 0x800000;
++pub const EXTPROC: ::tcflag_t = 0x10000000;
++pub const TCGETS: ::c_ulong = 0x403c7413;
++pub const TCSETS: ::c_ulong = 0x803c7414;
++pub const TCSETSW: ::c_ulong = 0x803c7415;
++pub const TCSETSF: ::c_ulong = 0x803c7416;
++pub const TCGETA: ::c_ulong = 0x40147417;
++pub const TCSETA: ::c_ulong = 0x80147418;
++pub const TCSETAW: ::c_ulong = 0x80147419;
++pub const TCSETAF: ::c_ulong = 0x8014741c;
++pub const TCSBRK: ::c_ulong = 0x2000741d;
++pub const TCXONC: ::c_ulong = 0x2000741e;
++pub const TCFLSH: ::c_ulong = 0x2000741f;
++pub const TIOCINQ: ::c_ulong = 0x4004667f;
++pub const TIOCGPGRP: ::c_ulong = 0x40047477;
++pub const TIOCSPGRP: ::c_ulong = 0x80047476;
++pub const TIOCOUTQ: ::c_ulong = 0x40047473;
++pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
++pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
++pub const FIONREAD: ::c_ulong = 0x4004667f;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..487d71b157001dbd37285066c838fa93c6d5c2a0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,391 @@@
++//! SPARC64-specific definitions for 64-bit linux-like values
++
++pub type c_char = i8;
++pub type wchar_t = i32;
++pub type nlink_t = u32;
++pub type blksize_t = i64;
++pub type suseconds_t = i32;
++pub type __u64 = ::c_ulonglong;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        __pad0: u64,
++        pub st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __pad1: u64,
++        pub st_size: ::off_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        __unused: [::c_long; 2],
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::dev_t,
++        __pad0: u64,
++        pub st_ino: ::ino64_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        __pad2: ::c_int,
++        pub st_size: ::off64_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt64_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        __reserved: [::c_long; 2],
++    }
++
++    pub struct pthread_attr_t {
++        __size: [u64; 7]
++    }
++
++    pub struct ipc_perm {
++        pub __key: ::key_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++        pub cuid: ::uid_t,
++        pub cgid: ::gid_t,
++        pub mode: ::mode_t,
++        __pad0: u16,
++        pub __seq: ::c_ushort,
++        __unused1: ::c_ulonglong,
++        __unused2: ::c_ulonglong,
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_atime: ::time_t,
++        pub shm_dtime: ::time_t,
++        pub shm_ctime: ::time_t,
++        pub shm_segsz: ::size_t,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::shmatt_t,
++        __reserved1: ::c_ulong,
++        __reserved2: ::c_ulong
++    }
++}
++
++pub const TIOCGSOFTCAR: ::c_ulong = 0x40047464;
++pub const TIOCSSOFTCAR: ::c_ulong = 0x80047465;
++
++pub const RLIMIT_NOFILE: ::c_int = 6;
++pub const RLIMIT_NPROC: ::c_int = 7;
++
++pub const O_APPEND: ::c_int = 0x8;
++pub const O_CREAT: ::c_int = 0x200;
++pub const O_EXCL: ::c_int = 0x800;
++pub const O_NOCTTY: ::c_int = 0x8000;
++pub const O_NONBLOCK: ::c_int = 0x4000;
++pub const O_SYNC: ::c_int = 0x802000;
++pub const O_RSYNC: ::c_int = 0x802000;
++pub const O_DSYNC: ::c_int = 0x2000;
++pub const O_FSYNC: ::c_int = 0x802000;
++pub const O_NOATIME: ::c_int = 0x200000;
++pub const O_PATH: ::c_int = 0x1000000;
++
++pub const MAP_GROWSDOWN: ::c_int = 0x0200;
++
++pub const EDEADLK: ::c_int = 78;
++pub const ENAMETOOLONG: ::c_int = 63;
++pub const ENOLCK: ::c_int = 79;
++pub const ENOSYS: ::c_int = 90;
++pub const ENOTEMPTY: ::c_int = 66;
++pub const ELOOP: ::c_int = 62;
++pub const ENOMSG: ::c_int = 75;
++pub const EIDRM: ::c_int = 77;
++pub const ECHRNG: ::c_int = 94;
++pub const EL2NSYNC: ::c_int = 95;
++pub const EL3HLT: ::c_int = 96;
++pub const EL3RST: ::c_int = 97;
++pub const ELNRNG: ::c_int = 98;
++pub const EUNATCH: ::c_int = 99;
++pub const ENOCSI: ::c_int = 100;
++pub const EL2HLT: ::c_int = 101;
++pub const EBADE: ::c_int = 102;
++pub const EBADR: ::c_int = 103;
++pub const EXFULL: ::c_int = 104;
++pub const ENOANO: ::c_int = 105;
++pub const EBADRQC: ::c_int = 106;
++pub const EBADSLT: ::c_int = 107;
++pub const EMULTIHOP: ::c_int = 87;
++pub const EOVERFLOW: ::c_int = 92;
++pub const ENOTUNIQ: ::c_int = 115;
++pub const EBADFD: ::c_int = 93;
++pub const EBADMSG: ::c_int = 76;
++pub const EREMCHG: ::c_int = 89;
++pub const ELIBACC: ::c_int = 114;
++pub const ELIBBAD: ::c_int = 112;
++pub const ELIBSCN: ::c_int = 124;
++pub const ELIBMAX: ::c_int = 123;
++pub const ELIBEXEC: ::c_int = 110;
++pub const EILSEQ: ::c_int = 122;
++pub const ERESTART: ::c_int = 116;
++pub const ESTRPIPE: ::c_int = 91;
++pub const EUSERS: ::c_int = 68;
++pub const ENOTSOCK: ::c_int = 38;
++pub const EDESTADDRREQ: ::c_int = 39;
++pub const EMSGSIZE: ::c_int = 40;
++pub const EPROTOTYPE: ::c_int = 41;
++pub const ENOPROTOOPT: ::c_int = 42;
++pub const EPROTONOSUPPORT: ::c_int = 43;
++pub const ESOCKTNOSUPPORT: ::c_int = 44;
++pub const EOPNOTSUPP: ::c_int = 45;
++pub const EPFNOSUPPORT: ::c_int = 46;
++pub const EAFNOSUPPORT: ::c_int = 47;
++pub const EADDRINUSE: ::c_int = 48;
++pub const EADDRNOTAVAIL: ::c_int = 49;
++pub const ENETDOWN: ::c_int = 50;
++pub const ENETUNREACH: ::c_int = 51;
++pub const ENETRESET: ::c_int = 52;
++pub const ECONNABORTED: ::c_int = 53;
++pub const ECONNRESET: ::c_int = 54;
++pub const ENOBUFS: ::c_int = 55;
++pub const EISCONN: ::c_int = 56;
++pub const ENOTCONN: ::c_int = 57;
++pub const ESHUTDOWN: ::c_int = 58;
++pub const ETOOMANYREFS: ::c_int = 59;
++pub const ETIMEDOUT: ::c_int = 60;
++pub const ECONNREFUSED: ::c_int = 61;
++pub const EHOSTDOWN: ::c_int = 64;
++pub const EHOSTUNREACH: ::c_int = 65;
++pub const EALREADY: ::c_int = 37;
++pub const EINPROGRESS: ::c_int = 36;
++pub const ESTALE: ::c_int = 70;
++pub const EDQUOT: ::c_int = 69;
++pub const ENOMEDIUM: ::c_int = 125;
++pub const EMEDIUMTYPE: ::c_int = 126;
++pub const ECANCELED: ::c_int = 127;
++pub const ENOKEY: ::c_int = 128;
++pub const EKEYEXPIRED: ::c_int = 129;
++pub const EKEYREVOKED: ::c_int = 130;
++pub const EKEYREJECTED: ::c_int = 131;
++pub const EOWNERDEAD: ::c_int = 132;
++pub const ENOTRECOVERABLE: ::c_int = 133;
++pub const EHWPOISON: ::c_int = 135;
++pub const ERFKILL: ::c_int = 134;
++
++pub const SOL_SOCKET: ::c_int = 0xffff;
++
++pub const SO_REUSEADDR: ::c_int = 4;
++pub const SO_BINDTODEVICE: ::c_int = 0x000d;
++pub const SO_TIMESTAMP: ::c_int = 0x001d;
++pub const SO_MARK: ::c_int = 0x0022;
++pub const SO_RXQ_OVFL: ::c_int = 0x0024;
++pub const SO_PEEK_OFF: ::c_int = 0x0026;
++pub const SO_BUSY_POLL: ::c_int = 0x0030;
++pub const SO_TYPE: ::c_int = 0x1008;
++pub const SO_ERROR: ::c_int = 0x1007;
++pub const SO_DONTROUTE: ::c_int = 16;
++pub const SO_BROADCAST: ::c_int = 32;
++pub const SO_SNDBUF: ::c_int = 0x1001;
++pub const SO_RCVBUF: ::c_int = 0x1002;
++pub const SO_DOMAIN: ::c_int = 0x1029;
++pub const SO_KEEPALIVE: ::c_int = 8;
++pub const SO_OOBINLINE: ::c_int = 0x100;
++pub const SO_LINGER: ::c_int = 128;
++pub const SO_REUSEPORT: ::c_int = 0x200;
++pub const SO_ACCEPTCONN: ::c_int = 0x8000;
++
++pub const SA_ONSTACK: ::c_int = 1;
++pub const SA_SIGINFO: ::c_int = 0x200;
++pub const SA_NOCLDWAIT: ::c_int = 0x100;
++
++pub const SIGCHLD: ::c_int = 20;
++pub const SIGBUS: ::c_int = 10;
++pub const SIGUSR1: ::c_int = 30;
++pub const SIGUSR2: ::c_int = 31;
++pub const SIGCONT: ::c_int = 19;
++pub const SIGSTOP: ::c_int = 17;
++pub const SIGTSTP: ::c_int = 18;
++pub const SIGURG: ::c_int = 16;
++pub const SIGIO: ::c_int = 23;
++pub const SIGSYS: ::c_int = 12;
++pub const SIGPOLL: ::c_int = 23;
++pub const SIGPWR: ::c_int = 29;
++pub const SIG_SETMASK: ::c_int = 4;
++pub const SIG_BLOCK: ::c_int = 1;
++pub const SIG_UNBLOCK: ::c_int = 2;
++
++pub const POLLWRNORM: ::c_short = 4;
++pub const POLLWRBAND: ::c_short = 0x100;
++
++pub const O_ASYNC: ::c_int = 0x40;
++pub const O_NDELAY: ::c_int = 0x4004;
++
++pub const PTRACE_DETACH: ::c_uint = 11;
++
++pub const EFD_NONBLOCK: ::c_int = 0x4000;
++
++pub const F_GETLK: ::c_int = 7;
++pub const F_GETOWN: ::c_int = 5;
++pub const F_SETOWN: ::c_int = 6;
++pub const F_SETLK: ::c_int = 8;
++pub const F_SETLKW: ::c_int = 9;
++
++pub const SFD_NONBLOCK: ::c_int = 0x4000;
++
++pub const TIOCEXCL: ::c_ulong = 0x2000740d;
++pub const TIOCNXCL: ::c_ulong = 0x2000740e;
++pub const TIOCSCTTY: ::c_ulong = 0x20007484;
++pub const TIOCSTI: ::c_ulong = 0x80017472;
++pub const TIOCMGET: ::c_ulong = 0x4004746a;
++pub const TIOCMBIS: ::c_ulong = 0x8004746c;
++pub const TIOCMBIC: ::c_ulong = 0x8004746b;
++pub const TIOCMSET: ::c_ulong = 0x8004746d;
++pub const TIOCCONS: ::c_ulong = 0x20007424;
++
++pub const SFD_CLOEXEC: ::c_int = 0x400000;
++
++pub const NCCS: usize = 17;
++pub const O_TRUNC: ::c_int = 0x400;
++
++pub const O_CLOEXEC: ::c_int = 0x400000;
++
++pub const EBFONT: ::c_int = 109;
++pub const ENOSTR: ::c_int = 72;
++pub const ENODATA: ::c_int = 111;
++pub const ETIME: ::c_int = 73;
++pub const ENOSR: ::c_int = 74;
++pub const ENONET: ::c_int = 80;
++pub const ENOPKG: ::c_int = 113;
++pub const EREMOTE: ::c_int = 71;
++pub const ENOLINK: ::c_int = 82;
++pub const EADV: ::c_int = 83;
++pub const ESRMNT: ::c_int = 84;
++pub const ECOMM: ::c_int = 85;
++pub const EPROTO: ::c_int = 86;
++pub const EDOTDOT: ::c_int = 88;
++
++pub const SA_NODEFER: ::c_int = 0x20;
++pub const SA_RESETHAND: ::c_int = 0x4;
++pub const SA_RESTART: ::c_int = 0x2;
++pub const SA_NOCLDSTOP: ::c_int = 0x00000008;
++
++pub const EPOLL_CLOEXEC: ::c_int = 0x400000;
++
++pub const EFD_CLOEXEC: ::c_int = 0x400000;
++pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
++pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
++
++pub const O_DIRECTORY: ::c_int = 0o200000;
++pub const O_NOFOLLOW: ::c_int = 0o400000;
++pub const O_DIRECT: ::c_int = 0x100000;
++
++pub const MAP_LOCKED: ::c_int = 0x0100;
++pub const MAP_NORESERVE: ::c_int = 0x00040;
++
++pub const EDEADLOCK: ::c_int = 108;
++
++pub const SO_PEERCRED: ::c_int = 0x40;
++pub const SO_RCVLOWAT: ::c_int = 0x800;
++pub const SO_SNDLOWAT: ::c_int = 0x1000;
++pub const SO_RCVTIMEO: ::c_int = 0x2000;
++pub const SO_SNDTIMEO: ::c_int = 0x4000;
++
++pub const FIOCLEX: ::c_ulong = 0x20006601;
++pub const FIONBIO: ::c_ulong = 0x8004667e;
++
++pub const SYS_gettid: ::c_long = 143;
++pub const SYS_perf_event_open: ::c_long = 327;
++
++pub const MCL_CURRENT: ::c_int = 0x2000;
++pub const MCL_FUTURE: ::c_int = 0x4000;
++
++pub const SIGSTKSZ: ::size_t = 16384;
++pub const MINSIGSTKSZ: ::size_t = 4096;
++pub const CBAUD: ::tcflag_t = 0x0000100f;
++pub const TAB1: ::c_int = 0x800;
++pub const TAB2: ::c_int = 0x1000;
++pub const TAB3: ::c_int = 0x1800;
++pub const CR1: ::c_int  = 0x200;
++pub const CR2: ::c_int  = 0x400;
++pub const CR3: ::c_int  = 0x600;
++pub const FF1: ::c_int  = 0x8000;
++pub const BS1: ::c_int  = 0x2000;
++pub const VT1: ::c_int  = 0x4000;
++pub const VWERASE: usize = 0xe;
++pub const VREPRINT: usize = 0xc;
++pub const VSUSP: usize = 0xa;
++pub const VSTART: usize = 0x8;
++pub const VSTOP: usize = 0x9;
++pub const VDISCARD: usize = 0xd;
++pub const VTIME: usize = 0x5;
++pub const IXON: ::tcflag_t = 0x400;
++pub const IXOFF: ::tcflag_t = 0x1000;
++pub const ONLCR: ::tcflag_t = 0x4;
++pub const CSIZE: ::tcflag_t = 0x30;
++pub const CS6: ::tcflag_t = 0x10;
++pub const CS7: ::tcflag_t = 0x20;
++pub const CS8: ::tcflag_t = 0x30;
++pub const CSTOPB: ::tcflag_t = 0x40;
++pub const CREAD: ::tcflag_t = 0x80;
++pub const PARENB: ::tcflag_t = 0x100;
++pub const PARODD: ::tcflag_t = 0x200;
++pub const HUPCL: ::tcflag_t = 0x400;
++pub const CLOCAL: ::tcflag_t = 0x800;
++pub const ECHOKE: ::tcflag_t = 0x800;
++pub const ECHOE: ::tcflag_t = 0x10;
++pub const ECHOK: ::tcflag_t = 0x20;
++pub const ECHONL: ::tcflag_t = 0x40;
++pub const ECHOPRT: ::tcflag_t = 0x400;
++pub const ECHOCTL: ::tcflag_t = 0x200;
++pub const ISIG: ::tcflag_t = 0x1;
++pub const ICANON: ::tcflag_t = 0x2;
++pub const PENDIN: ::tcflag_t = 0x4000;
++pub const NOFLSH: ::tcflag_t = 0x80;
++pub const CIBAUD: ::tcflag_t = 0o02003600000;
++pub const CBAUDEX: ::tcflag_t = 0x00001000;
++pub const VSWTC: usize = 7;
++pub const OLCUC:  ::tcflag_t = 0o000002;
++pub const NLDLY:  ::tcflag_t = 0o000400;
++pub const CRDLY:  ::tcflag_t = 0o003000;
++pub const TABDLY: ::tcflag_t = 0o014000;
++pub const BSDLY:  ::tcflag_t = 0o020000;
++pub const FFDLY:  ::tcflag_t = 0o100000;
++pub const VTDLY:  ::tcflag_t = 0o040000;
++pub const XTABS:  ::tcflag_t = 0o014000;
++
++pub const VEOL: usize = 5;
++pub const VEOL2: usize = 6;
++pub const VMIN: usize = 4;
++pub const IEXTEN: ::tcflag_t = 0x8000;
++pub const TOSTOP: ::tcflag_t = 0x100;
++pub const FLUSHO: ::tcflag_t = 0x2000;
++pub const EXTPROC: ::tcflag_t = 0x10000;
++pub const TCGETS: ::c_ulong = 0x40245408;
++pub const TCSETS: ::c_ulong = 0x80245409;
++pub const TCSETSW: ::c_ulong = 0x8024540a;
++pub const TCSETSF: ::c_ulong = 0x8024540b;
++pub const TCGETA: ::c_ulong = 0x40125401;
++pub const TCSETA: ::c_ulong = 0x80125402;
++pub const TCSETAW: ::c_ulong = 0x80125403;
++pub const TCSETAF: ::c_ulong = 0x80125404;
++pub const TCSBRK: ::c_ulong = 0x20005405;
++pub const TCXONC: ::c_ulong = 0x20005406;
++pub const TCFLSH: ::c_ulong = 0x20005407;
++pub const TIOCINQ: ::c_ulong = 0x4004667f;
++pub const TIOCGPGRP: ::c_ulong = 0x40047483;
++pub const TIOCSPGRP: ::c_ulong = 0x80047482;
++pub const TIOCOUTQ: ::c_ulong = 0x40047473;
++pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
++pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
++pub const FIONREAD: ::c_ulong = 0x4004667f;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..daec4501642209147a302fd76365f04b36b62ad5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,952 @@@
++//! x86_64-specific definitions for 64-bit linux-like values
++
++pub type c_char = i8;
++pub type wchar_t = i32;
++pub type nlink_t = u64;
++pub type blksize_t = i64;
++pub type greg_t = i64;
++pub type suseconds_t = i64;
++pub type __u64 = ::c_ulonglong;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino_t,
++        pub st_nlink: ::nlink_t,
++        pub st_mode: ::mode_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        __pad0: ::c_int,
++        pub st_rdev: ::dev_t,
++        pub st_size: ::off_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        __unused: [::c_long; 3],
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino64_t,
++        pub st_nlink: ::nlink_t,
++        pub st_mode: ::mode_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        __pad0: ::c_int,
++        pub st_rdev: ::dev_t,
++        pub st_size: ::off_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt64_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        __reserved: [::c_long; 3],
++    }
++
++    pub struct pthread_attr_t {
++        __size: [u64; 7]
++    }
++
++    pub struct _libc_fpxreg {
++        pub significand: [u16; 4],
++        pub exponent: u16,
++        __private: [u16; 3],
++    }
++
++    pub struct _libc_xmmreg {
++        pub element: [u32; 4],
++    }
++
++    pub struct _libc_fpstate {
++        pub cwd: u16,
++        pub swd: u16,
++        pub ftw: u16,
++        pub fop: u16,
++        pub rip: u64,
++        pub rdp: u64,
++        pub mxcsr: u32,
++        pub mxcr_mask: u32,
++        pub _st: [_libc_fpxreg; 8],
++        pub _xmm: [_libc_xmmreg; 16],
++        __private: [u64; 12],
++    }
++
++    pub struct user_fpregs_struct {
++        pub cwd: ::c_ushort,
++        pub swd: ::c_ushort,
++        pub ftw: ::c_ushort,
++        pub fop: ::c_ushort,
++        pub rip: ::c_ulonglong,
++        pub rdp: ::c_ulonglong,
++        pub mxcsr: ::c_uint,
++        pub mxcr_mask: ::c_uint,
++        pub st_space: [::c_uint; 32],
++        pub xmm_space: [::c_uint; 64],
++        padding: [::c_uint; 24],
++    }
++
++    pub struct user_regs_struct {
++        pub r15: ::c_ulonglong,
++        pub r14: ::c_ulonglong,
++        pub r13: ::c_ulonglong,
++        pub r12: ::c_ulonglong,
++        pub rbp: ::c_ulonglong,
++        pub rbx: ::c_ulonglong,
++        pub r11: ::c_ulonglong,
++        pub r10: ::c_ulonglong,
++        pub r9: ::c_ulonglong,
++        pub r8: ::c_ulonglong,
++        pub rax: ::c_ulonglong,
++        pub rcx: ::c_ulonglong,
++        pub rdx: ::c_ulonglong,
++        pub rsi: ::c_ulonglong,
++        pub rdi: ::c_ulonglong,
++        pub orig_rax: ::c_ulonglong,
++        pub rip: ::c_ulonglong,
++        pub cs: ::c_ulonglong,
++        pub eflags: ::c_ulonglong,
++        pub rsp: ::c_ulonglong,
++        pub ss: ::c_ulonglong,
++        pub fs_base: ::c_ulonglong,
++        pub gs_base: ::c_ulonglong,
++        pub ds: ::c_ulonglong,
++        pub es: ::c_ulonglong,
++        pub fs: ::c_ulonglong,
++        pub gs: ::c_ulonglong,
++    }
++
++    pub struct user {
++        pub regs: user_regs_struct,
++        pub u_fpvalid: ::c_int,
++        pub i387: user_fpregs_struct,
++        pub u_tsize: ::c_ulonglong,
++        pub u_dsize: ::c_ulonglong,
++        pub u_ssize: ::c_ulonglong,
++        pub start_code: ::c_ulonglong,
++        pub start_stack: ::c_ulonglong,
++        pub signal: ::c_longlong,
++        __reserved: ::c_int,
++        pub u_ar0: *mut user_regs_struct,
++        pub u_fpstate: *mut user_fpregs_struct,
++        pub magic: ::c_ulonglong,
++        pub u_comm: [::c_char; 32],
++        pub u_debugreg: [::c_ulonglong; 8],
++    }
++
++    pub struct mcontext_t {
++        pub gregs: [greg_t; 23],
++        pub fpregs: *mut _libc_fpstate,
++        __private: [u64; 8],
++    }
++
++    pub struct ucontext_t {
++        pub uc_flags: ::c_ulong,
++        pub uc_link: *mut ucontext_t,
++        pub uc_stack: ::stack_t,
++        pub uc_mcontext: mcontext_t,
++        pub uc_sigmask: ::sigset_t,
++        __private: [u8; 512],
++    }
++
++    pub struct ipc_perm {
++        pub __key: ::key_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++        pub cuid: ::uid_t,
++        pub cgid: ::gid_t,
++        pub mode: ::c_ushort,
++        __pad1: ::c_ushort,
++        pub __seq: ::c_ushort,
++        __pad2: ::c_ushort,
++        __unused1: ::c_ulong,
++        __unused2: ::c_ulong
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_segsz: ::size_t,
++        pub shm_atime: ::time_t,
++        pub shm_dtime: ::time_t,
++        pub shm_ctime: ::time_t,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::shmatt_t,
++        __unused4: ::c_ulong,
++        __unused5: ::c_ulong
++    }
++}
++
++pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
++pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
++
++pub const RLIMIT_NOFILE: ::c_int = 7;
++pub const RLIMIT_NPROC: ::c_int = 6;
++
++pub const O_APPEND: ::c_int = 1024;
++pub const O_CREAT: ::c_int = 64;
++pub const O_EXCL: ::c_int = 128;
++pub const O_NOCTTY: ::c_int = 256;
++pub const O_NONBLOCK: ::c_int = 2048;
++pub const O_SYNC: ::c_int = 1052672;
++pub const O_RSYNC: ::c_int = 1052672;
++pub const O_DSYNC: ::c_int = 4096;
++pub const O_FSYNC: ::c_int = 0x101000;
++pub const O_NOATIME: ::c_int = 0o1000000;
++pub const O_PATH: ::c_int = 0o10000000;
++
++pub const MAP_GROWSDOWN: ::c_int = 0x0100;
++
++pub const EDEADLK: ::c_int = 35;
++pub const ENAMETOOLONG: ::c_int = 36;
++pub const ENOLCK: ::c_int = 37;
++pub const ENOSYS: ::c_int = 38;
++pub const ENOTEMPTY: ::c_int = 39;
++pub const ELOOP: ::c_int = 40;
++pub const ENOMSG: ::c_int = 42;
++pub const EIDRM: ::c_int = 43;
++pub const ECHRNG: ::c_int = 44;
++pub const EL2NSYNC: ::c_int = 45;
++pub const EL3HLT: ::c_int = 46;
++pub const EL3RST: ::c_int = 47;
++pub const ELNRNG: ::c_int = 48;
++pub const EUNATCH: ::c_int = 49;
++pub const ENOCSI: ::c_int = 50;
++pub const EL2HLT: ::c_int = 51;
++pub const EBADE: ::c_int = 52;
++pub const EBADR: ::c_int = 53;
++pub const EXFULL: ::c_int = 54;
++pub const ENOANO: ::c_int = 55;
++pub const EBADRQC: ::c_int = 56;
++pub const EBADSLT: ::c_int = 57;
++pub const EMULTIHOP: ::c_int = 72;
++pub const EOVERFLOW: ::c_int = 75;
++pub const ENOTUNIQ: ::c_int = 76;
++pub const EBADFD: ::c_int = 77;
++pub const EBADMSG: ::c_int = 74;
++pub const EREMCHG: ::c_int = 78;
++pub const ELIBACC: ::c_int = 79;
++pub const ELIBBAD: ::c_int = 80;
++pub const ELIBSCN: ::c_int = 81;
++pub const ELIBMAX: ::c_int = 82;
++pub const ELIBEXEC: ::c_int = 83;
++pub const EILSEQ: ::c_int = 84;
++pub const ERESTART: ::c_int = 85;
++pub const ESTRPIPE: ::c_int = 86;
++pub const EUSERS: ::c_int = 87;
++pub const ENOTSOCK: ::c_int = 88;
++pub const EDESTADDRREQ: ::c_int = 89;
++pub const EMSGSIZE: ::c_int = 90;
++pub const EPROTOTYPE: ::c_int = 91;
++pub const ENOPROTOOPT: ::c_int = 92;
++pub const EPROTONOSUPPORT: ::c_int = 93;
++pub const ESOCKTNOSUPPORT: ::c_int = 94;
++pub const EOPNOTSUPP: ::c_int = 95;
++pub const EPFNOSUPPORT: ::c_int = 96;
++pub const EAFNOSUPPORT: ::c_int = 97;
++pub const EADDRINUSE: ::c_int = 98;
++pub const EADDRNOTAVAIL: ::c_int = 99;
++pub const ENETDOWN: ::c_int = 100;
++pub const ENETUNREACH: ::c_int = 101;
++pub const ENETRESET: ::c_int = 102;
++pub const ECONNABORTED: ::c_int = 103;
++pub const ECONNRESET: ::c_int = 104;
++pub const ENOBUFS: ::c_int = 105;
++pub const EISCONN: ::c_int = 106;
++pub const ENOTCONN: ::c_int = 107;
++pub const ESHUTDOWN: ::c_int = 108;
++pub const ETOOMANYREFS: ::c_int = 109;
++pub const ETIMEDOUT: ::c_int = 110;
++pub const ECONNREFUSED: ::c_int = 111;
++pub const EHOSTDOWN: ::c_int = 112;
++pub const EHOSTUNREACH: ::c_int = 113;
++pub const EALREADY: ::c_int = 114;
++pub const EINPROGRESS: ::c_int = 115;
++pub const ESTALE: ::c_int = 116;
++pub const EDQUOT: ::c_int = 122;
++pub const ENOMEDIUM: ::c_int = 123;
++pub const EMEDIUMTYPE: ::c_int = 124;
++pub const ECANCELED: ::c_int = 125;
++pub const ENOKEY: ::c_int = 126;
++pub const EKEYEXPIRED: ::c_int = 127;
++pub const EKEYREVOKED: ::c_int = 128;
++pub const EKEYREJECTED: ::c_int = 129;
++pub const EOWNERDEAD: ::c_int = 130;
++pub const ENOTRECOVERABLE: ::c_int = 131;
++pub const EHWPOISON: ::c_int = 133;
++pub const ERFKILL: ::c_int = 132;
++
++pub const SOL_SOCKET: ::c_int = 1;
++
++pub const SO_REUSEADDR: ::c_int = 2;
++pub const SO_TYPE: ::c_int = 3;
++pub const SO_ERROR: ::c_int = 4;
++pub const SO_DONTROUTE: ::c_int = 5;
++pub const SO_BROADCAST: ::c_int = 6;
++pub const SO_SNDBUF: ::c_int = 7;
++pub const SO_RCVBUF: ::c_int = 8;
++pub const SO_SNDBUFFORCE: ::c_int = 32;
++pub const SO_RCVBUFFORCE: ::c_int = 33;
++pub const SO_KEEPALIVE: ::c_int = 9;
++pub const SO_OOBINLINE: ::c_int = 10;
++pub const SO_NO_CHECK: ::c_int = 11;
++pub const SO_PRIORITY: ::c_int = 12;
++pub const SO_LINGER: ::c_int = 13;
++pub const SO_BSDCOMPAT: ::c_int = 14;
++pub const SO_REUSEPORT: ::c_int = 15;
++pub const SO_PASSCRED: ::c_int = 16;
++pub const SO_PEERCRED: ::c_int = 17;
++pub const SO_RCVLOWAT: ::c_int = 18;
++pub const SO_SNDLOWAT: ::c_int = 19;
++pub const SO_RCVTIMEO: ::c_int = 20;
++pub const SO_SNDTIMEO: ::c_int = 21;
++pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
++pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
++pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
++pub const SO_BINDTODEVICE: ::c_int = 25;
++pub const SO_ATTACH_FILTER: ::c_int = 26;
++pub const SO_DETACH_FILTER: ::c_int = 27;
++pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
++pub const SO_PEERNAME: ::c_int = 28;
++pub const SO_TIMESTAMP: ::c_int = 29;
++pub const SO_ACCEPTCONN: ::c_int = 30;
++pub const SO_PEERSEC: ::c_int = 31;
++pub const SO_PASSSEC: ::c_int = 34;
++pub const SO_TIMESTAMPNS: ::c_int = 35;
++pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
++pub const SO_MARK: ::c_int = 36;
++pub const SO_TIMESTAMPING: ::c_int = 37;
++pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
++pub const SO_PROTOCOL: ::c_int = 38;
++pub const SO_DOMAIN: ::c_int = 39;
++pub const SO_RXQ_OVFL: ::c_int = 40;
++pub const SO_WIFI_STATUS: ::c_int = 41;
++pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
++pub const SO_PEEK_OFF: ::c_int = 42;
++pub const SO_NOFCS: ::c_int = 43;
++pub const SO_LOCK_FILTER: ::c_int = 44;
++pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
++pub const SO_BUSY_POLL: ::c_int = 46;
++pub const SO_MAX_PACING_RATE: ::c_int = 47;
++pub const SO_BPF_EXTENSIONS: ::c_int = 48;
++pub const SO_INCOMING_CPU: ::c_int = 49;
++pub const SO_ATTACH_BPF: ::c_int = 50;
++pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
++
++pub const SA_ONSTACK: ::c_int = 0x08000000;
++pub const SA_SIGINFO: ::c_int = 0x00000004;
++pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
++
++pub const SIGCHLD: ::c_int = 17;
++pub const SIGBUS: ::c_int = 7;
++pub const SIGUSR1: ::c_int = 10;
++pub const SIGUSR2: ::c_int = 12;
++pub const SIGCONT: ::c_int = 18;
++pub const SIGSTOP: ::c_int = 19;
++pub const SIGTSTP: ::c_int = 20;
++pub const SIGURG: ::c_int = 23;
++pub const SIGIO: ::c_int = 29;
++pub const SIGSYS: ::c_int = 31;
++pub const SIGSTKFLT: ::c_int = 16;
++pub const SIGUNUSED: ::c_int = 31;
++pub const SIGPOLL: ::c_int = 29;
++pub const SIGPWR: ::c_int = 30;
++pub const SIG_SETMASK: ::c_int = 2;
++pub const SIG_BLOCK: ::c_int = 0x000000;
++pub const SIG_UNBLOCK: ::c_int = 0x01;
++
++pub const POLLWRNORM: ::c_short = 0x100;
++pub const POLLWRBAND: ::c_short = 0x200;
++
++pub const O_ASYNC: ::c_int = 0x2000;
++pub const O_NDELAY: ::c_int = 0x800;
++
++pub const PTRACE_DETACH: ::c_uint = 17;
++
++pub const EFD_NONBLOCK: ::c_int = 0x800;
++
++pub const F_GETLK: ::c_int = 5;
++pub const F_GETOWN: ::c_int = 9;
++pub const F_SETOWN: ::c_int = 8;
++pub const F_SETLK: ::c_int = 6;
++pub const F_SETLKW: ::c_int = 7;
++
++pub const SFD_NONBLOCK: ::c_int = 0x0800;
++
++pub const TIOCEXCL: ::c_ulong = 0x540C;
++pub const TIOCNXCL: ::c_ulong = 0x540D;
++pub const TIOCSCTTY: ::c_ulong = 0x540E;
++pub const TIOCSTI: ::c_ulong = 0x5412;
++pub const TIOCMGET: ::c_ulong = 0x5415;
++pub const TIOCMBIS: ::c_ulong = 0x5416;
++pub const TIOCMBIC: ::c_ulong = 0x5417;
++pub const TIOCMSET: ::c_ulong = 0x5418;
++pub const TIOCCONS: ::c_ulong = 0x541D;
++
++pub const SFD_CLOEXEC: ::c_int = 0x080000;
++
++pub const NCCS: usize = 32;
++
++pub const O_TRUNC: ::c_int = 512;
++
++pub const O_CLOEXEC: ::c_int = 0x80000;
++
++pub const EBFONT: ::c_int = 59;
++pub const ENOSTR: ::c_int = 60;
++pub const ENODATA: ::c_int = 61;
++pub const ETIME: ::c_int = 62;
++pub const ENOSR: ::c_int = 63;
++pub const ENONET: ::c_int = 64;
++pub const ENOPKG: ::c_int = 65;
++pub const EREMOTE: ::c_int = 66;
++pub const ENOLINK: ::c_int = 67;
++pub const EADV: ::c_int = 68;
++pub const ESRMNT: ::c_int = 69;
++pub const ECOMM: ::c_int = 70;
++pub const EPROTO: ::c_int = 71;
++pub const EDOTDOT: ::c_int = 73;
++
++pub const SA_NODEFER: ::c_int = 0x40000000;
++pub const SA_RESETHAND: ::c_int = 0x80000000;
++pub const SA_RESTART: ::c_int = 0x10000000;
++pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
++
++pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
++
++pub const EFD_CLOEXEC: ::c_int = 0x80000;
++
++pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
++pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
++
++pub const O_DIRECT: ::c_int = 0x4000;
++pub const O_DIRECTORY: ::c_int = 0x10000;
++pub const O_NOFOLLOW: ::c_int = 0x20000;
++
++pub const MAP_LOCKED: ::c_int = 0x02000;
++pub const MAP_NORESERVE: ::c_int = 0x04000;
++pub const MAP_32BIT: ::c_int = 0x0040;
++
++pub const EDEADLOCK: ::c_int = 35;
++
++pub const FIOCLEX: ::c_ulong = 0x5451;
++pub const FIONBIO: ::c_ulong = 0x5421;
++
++pub const PTRACE_GETFPREGS: ::c_uint = 14;
++pub const PTRACE_SETFPREGS: ::c_uint = 15;
++pub const PTRACE_GETFPXREGS: ::c_uint = 18;
++pub const PTRACE_SETFPXREGS: ::c_uint = 19;
++pub const PTRACE_GETREGS: ::c_uint = 12;
++pub const PTRACE_SETREGS: ::c_uint = 13;
++pub const PTRACE_O_EXITKILL: ::c_uint = 1048576;
++pub const PTRACE_O_TRACECLONE: ::c_uint = 8;
++pub const PTRACE_O_TRACEEXEC: ::c_uint = 16;
++pub const PTRACE_O_TRACEEXIT: ::c_uint = 64;
++pub const PTRACE_O_TRACEFORK: ::c_uint = 2;
++pub const PTRACE_O_TRACESYSGOOD: ::c_uint = 1;
++pub const PTRACE_O_TRACEVFORK: ::c_uint = 4;
++pub const PTRACE_O_TRACEVFORKDONE: ::c_uint = 32;
++pub const PTRACE_O_TRACESECCOMP: ::c_uint = 128;
++pub const PTRACE_O_SUSPEND_SECCOMP: ::c_uint = 2097152;
++pub const PTRACE_PEEKSIGINFO_SHARED: ::c_uint = 1;
++
++pub const MCL_CURRENT: ::c_int = 0x0001;
++pub const MCL_FUTURE: ::c_int = 0x0002;
++
++pub const SIGSTKSZ: ::size_t = 8192;
++pub const MINSIGSTKSZ: ::size_t = 2048;
++pub const CBAUD: ::tcflag_t = 0o0010017;
++pub const TAB1: ::c_int = 0x00000800;
++pub const TAB2: ::c_int = 0x00001000;
++pub const TAB3: ::c_int = 0x00001800;
++pub const CR1: ::c_int  = 0x00000200;
++pub const CR2: ::c_int  = 0x00000400;
++pub const CR3: ::c_int  = 0x00000600;
++pub const FF1: ::c_int  = 0x00008000;
++pub const BS1: ::c_int  = 0x00002000;
++pub const VT1: ::c_int  = 0x00004000;
++pub const VWERASE: usize = 14;
++pub const VREPRINT: usize = 12;
++pub const VSUSP: usize = 10;
++pub const VSTART: usize = 8;
++pub const VSTOP: usize = 9;
++pub const VDISCARD: usize = 13;
++pub const VTIME: usize = 5;
++pub const IXON: ::tcflag_t = 0x00000400;
++pub const IXOFF: ::tcflag_t = 0x00001000;
++pub const ONLCR: ::tcflag_t = 0x4;
++pub const CSIZE: ::tcflag_t = 0x00000030;
++pub const CS6: ::tcflag_t = 0x00000010;
++pub const CS7: ::tcflag_t = 0x00000020;
++pub const CS8: ::tcflag_t = 0x00000030;
++pub const CSTOPB: ::tcflag_t = 0x00000040;
++pub const CREAD: ::tcflag_t = 0x00000080;
++pub const PARENB: ::tcflag_t = 0x00000100;
++pub const PARODD: ::tcflag_t = 0x00000200;
++pub const HUPCL: ::tcflag_t = 0x00000400;
++pub const CLOCAL: ::tcflag_t = 0x00000800;
++pub const ECHOKE: ::tcflag_t = 0x00000800;
++pub const ECHOE: ::tcflag_t = 0x00000010;
++pub const ECHOK: ::tcflag_t = 0x00000020;
++pub const ECHONL: ::tcflag_t = 0x00000040;
++pub const ECHOPRT: ::tcflag_t = 0x00000400;
++pub const ECHOCTL: ::tcflag_t = 0x00000200;
++pub const ISIG: ::tcflag_t = 0x00000001;
++pub const ICANON: ::tcflag_t = 0x00000002;
++pub const PENDIN: ::tcflag_t = 0x00004000;
++pub const NOFLSH: ::tcflag_t = 0x00000080;
++pub const CIBAUD: ::tcflag_t = 0o02003600000;
++pub const CBAUDEX: ::tcflag_t = 0o010000;
++pub const VSWTC: usize = 7;
++pub const OLCUC:  ::tcflag_t = 0o000002;
++pub const NLDLY:  ::tcflag_t = 0o000400;
++pub const CRDLY:  ::tcflag_t = 0o003000;
++pub const TABDLY: ::tcflag_t = 0o014000;
++pub const BSDLY:  ::tcflag_t = 0o020000;
++pub const FFDLY:  ::tcflag_t = 0o100000;
++pub const VTDLY:  ::tcflag_t = 0o040000;
++pub const XTABS:  ::tcflag_t = 0o014000;
++
++pub const B0: ::speed_t = 0o000000;
++pub const B50: ::speed_t = 0o000001;
++pub const B75: ::speed_t = 0o000002;
++pub const B110: ::speed_t = 0o000003;
++pub const B134: ::speed_t = 0o000004;
++pub const B150: ::speed_t = 0o000005;
++pub const B200: ::speed_t = 0o000006;
++pub const B300: ::speed_t = 0o000007;
++pub const B600: ::speed_t = 0o000010;
++pub const B1200: ::speed_t = 0o000011;
++pub const B1800: ::speed_t = 0o000012;
++pub const B2400: ::speed_t = 0o000013;
++pub const B4800: ::speed_t = 0o000014;
++pub const B9600: ::speed_t = 0o000015;
++pub const B19200: ::speed_t = 0o000016;
++pub const B38400: ::speed_t = 0o000017;
++pub const EXTA: ::speed_t = B19200;
++pub const EXTB: ::speed_t = B38400;
++pub const B57600: ::speed_t = 0o010001;
++pub const B115200: ::speed_t = 0o010002;
++pub const B230400: ::speed_t = 0o010003;
++pub const B460800: ::speed_t = 0o010004;
++pub const B500000: ::speed_t = 0o010005;
++pub const B576000: ::speed_t = 0o010006;
++pub const B921600: ::speed_t = 0o010007;
++pub const B1000000: ::speed_t = 0o010010;
++pub const B1152000: ::speed_t = 0o010011;
++pub const B1500000: ::speed_t = 0o010012;
++pub const B2000000: ::speed_t = 0o010013;
++pub const B2500000: ::speed_t = 0o010014;
++pub const B3000000: ::speed_t = 0o010015;
++pub const B3500000: ::speed_t = 0o010016;
++pub const B4000000: ::speed_t = 0o010017;
++
++pub const VEOL: usize = 11;
++pub const VEOL2: usize = 16;
++pub const VMIN: usize = 6;
++pub const IEXTEN: ::tcflag_t = 0x00008000;
++pub const TOSTOP: ::tcflag_t = 0x00000100;
++pub const FLUSHO: ::tcflag_t = 0x00001000;
++pub const EXTPROC: ::tcflag_t = 0x00010000;
++pub const TCGETS: ::c_ulong = 0x5401;
++pub const TCSETS: ::c_ulong = 0x5402;
++pub const TCSETSW: ::c_ulong = 0x5403;
++pub const TCSETSF: ::c_ulong = 0x5404;
++pub const TCGETA: ::c_ulong = 0x5405;
++pub const TCSETA: ::c_ulong = 0x5406;
++pub const TCSETAW: ::c_ulong = 0x5407;
++pub const TCSETAF: ::c_ulong = 0x5408;
++pub const TCSBRK: ::c_ulong = 0x5409;
++pub const TCXONC: ::c_ulong = 0x540A;
++pub const TCFLSH: ::c_ulong = 0x540B;
++pub const TIOCINQ: ::c_ulong = 0x541B;
++pub const TIOCGPGRP: ::c_ulong = 0x540F;
++pub const TIOCSPGRP: ::c_ulong = 0x5410;
++pub const TIOCOUTQ: ::c_ulong = 0x5411;
++pub const TIOCGWINSZ: ::c_ulong = 0x5413;
++pub const TIOCSWINSZ: ::c_ulong = 0x5414;
++pub const FIONREAD: ::c_ulong = 0x541B;
++
++// Syscall table
++
++pub const SYS_read: ::c_long = 0;
++pub const SYS_write: ::c_long = 1;
++pub const SYS_open: ::c_long = 2;
++pub const SYS_close: ::c_long = 3;
++pub const SYS_stat: ::c_long = 4;
++pub const SYS_fstat: ::c_long = 5;
++pub const SYS_lstat: ::c_long = 6;
++pub const SYS_poll: ::c_long = 7;
++pub const SYS_lseek: ::c_long = 8;
++pub const SYS_mmap: ::c_long = 9;
++pub const SYS_mprotect: ::c_long = 10;
++pub const SYS_munmap: ::c_long = 11;
++pub const SYS_brk: ::c_long = 12;
++pub const SYS_rt_sigaction: ::c_long = 13;
++pub const SYS_rt_sigprocmask: ::c_long = 14;
++pub const SYS_rt_sigreturn: ::c_long = 15;
++pub const SYS_ioctl: ::c_long = 16;
++pub const SYS_pread64: ::c_long = 17;
++pub const SYS_pwrite64: ::c_long = 18;
++pub const SYS_readv: ::c_long = 19;
++pub const SYS_writev: ::c_long = 20;
++pub const SYS_access: ::c_long = 21;
++pub const SYS_pipe: ::c_long = 22;
++pub const SYS_select: ::c_long = 23;
++pub const SYS_sched_yield: ::c_long = 24;
++pub const SYS_mremap: ::c_long = 25;
++pub const SYS_msync: ::c_long = 26;
++pub const SYS_mincore: ::c_long = 27;
++pub const SYS_madvise: ::c_long = 28;
++pub const SYS_shmget: ::c_long = 29;
++pub const SYS_shmat: ::c_long = 30;
++pub const SYS_shmctl: ::c_long = 31;
++pub const SYS_dup: ::c_long = 32;
++pub const SYS_dup2: ::c_long = 33;
++pub const SYS_pause: ::c_long = 34;
++pub const SYS_nanosleep: ::c_long = 35;
++pub const SYS_getitimer: ::c_long = 36;
++pub const SYS_alarm: ::c_long = 37;
++pub const SYS_setitimer: ::c_long = 38;
++pub const SYS_getpid: ::c_long = 39;
++pub const SYS_sendfile: ::c_long = 40;
++pub const SYS_socket: ::c_long = 41;
++pub const SYS_connect: ::c_long = 42;
++pub const SYS_accept: ::c_long = 43;
++pub const SYS_sendto: ::c_long = 44;
++pub const SYS_recvfrom: ::c_long = 45;
++pub const SYS_sendmsg: ::c_long = 46;
++pub const SYS_recvmsg: ::c_long = 47;
++pub const SYS_shutdown: ::c_long = 48;
++pub const SYS_bind: ::c_long = 49;
++pub const SYS_listen: ::c_long = 50;
++pub const SYS_getsockname: ::c_long = 51;
++pub const SYS_getpeername: ::c_long = 52;
++pub const SYS_socketpair: ::c_long = 53;
++pub const SYS_setsockopt: ::c_long = 54;
++pub const SYS_getsockopt: ::c_long = 55;
++pub const SYS_clone: ::c_long = 56;
++pub const SYS_fork: ::c_long = 57;
++pub const SYS_vfork: ::c_long = 58;
++pub const SYS_execve: ::c_long = 59;
++pub const SYS_exit: ::c_long = 60;
++pub const SYS_wait4: ::c_long = 61;
++pub const SYS_kill: ::c_long = 62;
++pub const SYS_uname: ::c_long = 63;
++pub const SYS_semget: ::c_long = 64;
++pub const SYS_semop: ::c_long = 65;
++pub const SYS_semctl: ::c_long = 66;
++pub const SYS_shmdt: ::c_long = 67;
++pub const SYS_msgget: ::c_long = 68;
++pub const SYS_msgsnd: ::c_long = 69;
++pub const SYS_msgrcv: ::c_long = 70;
++pub const SYS_msgctl: ::c_long = 71;
++pub const SYS_fcntl: ::c_long = 72;
++pub const SYS_flock: ::c_long = 73;
++pub const SYS_fsync: ::c_long = 74;
++pub const SYS_fdatasync: ::c_long = 75;
++pub const SYS_truncate: ::c_long = 76;
++pub const SYS_ftruncate: ::c_long = 77;
++pub const SYS_getdents: ::c_long = 78;
++pub const SYS_getcwd: ::c_long = 79;
++pub const SYS_chdir: ::c_long = 80;
++pub const SYS_fchdir: ::c_long = 81;
++pub const SYS_rename: ::c_long = 82;
++pub const SYS_mkdir: ::c_long = 83;
++pub const SYS_rmdir: ::c_long = 84;
++pub const SYS_creat: ::c_long = 85;
++pub const SYS_link: ::c_long = 86;
++pub const SYS_unlink: ::c_long = 87;
++pub const SYS_symlink: ::c_long = 88;
++pub const SYS_readlink: ::c_long = 89;
++pub const SYS_chmod: ::c_long = 90;
++pub const SYS_fchmod: ::c_long = 91;
++pub const SYS_chown: ::c_long = 92;
++pub const SYS_fchown: ::c_long = 93;
++pub const SYS_lchown: ::c_long = 94;
++pub const SYS_umask: ::c_long = 95;
++pub const SYS_gettimeofday: ::c_long = 96;
++pub const SYS_getrlimit: ::c_long = 97;
++pub const SYS_getrusage: ::c_long = 98;
++pub const SYS_sysinfo: ::c_long = 99;
++pub const SYS_times: ::c_long = 100;
++pub const SYS_ptrace: ::c_long = 101;
++pub const SYS_getuid: ::c_long = 102;
++pub const SYS_syslog: ::c_long = 103;
++pub const SYS_getgid: ::c_long = 104;
++pub const SYS_setuid: ::c_long = 105;
++pub const SYS_setgid: ::c_long = 106;
++pub const SYS_geteuid: ::c_long = 107;
++pub const SYS_getegid: ::c_long = 108;
++pub const SYS_setpgid: ::c_long = 109;
++pub const SYS_getppid: ::c_long = 110;
++pub const SYS_getpgrp: ::c_long = 111;
++pub const SYS_setsid: ::c_long = 112;
++pub const SYS_setreuid: ::c_long = 113;
++pub const SYS_setregid: ::c_long = 114;
++pub const SYS_getgroups: ::c_long = 115;
++pub const SYS_setgroups: ::c_long = 116;
++pub const SYS_setresuid: ::c_long = 117;
++pub const SYS_getresuid: ::c_long = 118;
++pub const SYS_setresgid: ::c_long = 119;
++pub const SYS_getresgid: ::c_long = 120;
++pub const SYS_getpgid: ::c_long = 121;
++pub const SYS_setfsuid: ::c_long = 122;
++pub const SYS_setfsgid: ::c_long = 123;
++pub const SYS_getsid: ::c_long = 124;
++pub const SYS_capget: ::c_long = 125;
++pub const SYS_capset: ::c_long = 126;
++pub const SYS_rt_sigpending: ::c_long = 127;
++pub const SYS_rt_sigtimedwait: ::c_long = 128;
++pub const SYS_rt_sigqueueinfo: ::c_long = 129;
++pub const SYS_rt_sigsuspend: ::c_long = 130;
++pub const SYS_sigaltstack: ::c_long = 131;
++pub const SYS_utime: ::c_long = 132;
++pub const SYS_mknod: ::c_long = 133;
++pub const SYS_uselib: ::c_long = 134;
++pub const SYS_personality: ::c_long = 135;
++pub const SYS_ustat: ::c_long = 136;
++pub const SYS_statfs: ::c_long = 137;
++pub const SYS_fstatfs: ::c_long = 138;
++pub const SYS_sysfs: ::c_long = 139;
++pub const SYS_getpriority: ::c_long = 140;
++pub const SYS_setpriority: ::c_long = 141;
++pub const SYS_sched_setparam: ::c_long = 142;
++pub const SYS_sched_getparam: ::c_long = 143;
++pub const SYS_sched_setscheduler: ::c_long = 144;
++pub const SYS_sched_getscheduler: ::c_long = 145;
++pub const SYS_sched_get_priority_max: ::c_long = 146;
++pub const SYS_sched_get_priority_min: ::c_long = 147;
++pub const SYS_sched_rr_get_interval: ::c_long = 148;
++pub const SYS_mlock: ::c_long = 149;
++pub const SYS_munlock: ::c_long = 150;
++pub const SYS_mlockall: ::c_long = 151;
++pub const SYS_munlockall: ::c_long = 152;
++pub const SYS_vhangup: ::c_long = 153;
++pub const SYS_modify_ldt: ::c_long = 154;
++pub const SYS_pivot_root: ::c_long = 155;
++pub const SYS__sysctl: ::c_long = 156;
++pub const SYS_prctl: ::c_long = 157;
++pub const SYS_arch_prctl: ::c_long = 158;
++pub const SYS_adjtimex: ::c_long = 159;
++pub const SYS_setrlimit: ::c_long = 160;
++pub const SYS_chroot: ::c_long = 161;
++pub const SYS_sync: ::c_long = 162;
++pub const SYS_acct: ::c_long = 163;
++pub const SYS_settimeofday: ::c_long = 164;
++pub const SYS_mount: ::c_long = 165;
++pub const SYS_umount2: ::c_long = 166;
++pub const SYS_swapon: ::c_long = 167;
++pub const SYS_swapoff: ::c_long = 168;
++pub const SYS_reboot: ::c_long = 169;
++pub const SYS_sethostname: ::c_long = 170;
++pub const SYS_setdomainname: ::c_long = 171;
++pub const SYS_iopl: ::c_long = 172;
++pub const SYS_ioperm: ::c_long = 173;
++pub const SYS_create_module: ::c_long = 174;
++pub const SYS_init_module: ::c_long = 175;
++pub const SYS_delete_module: ::c_long = 176;
++pub const SYS_get_kernel_syms: ::c_long = 177;
++pub const SYS_query_module: ::c_long = 178;
++pub const SYS_quotactl: ::c_long = 179;
++pub const SYS_nfsservctl: ::c_long = 180;
++pub const SYS_getpmsg: ::c_long = 181;
++pub const SYS_putpmsg: ::c_long = 182;
++pub const SYS_afs_syscall: ::c_long = 183;
++pub const SYS_tuxcall: ::c_long = 184;
++pub const SYS_security: ::c_long = 185;
++pub const SYS_gettid: ::c_long = 186;
++pub const SYS_readahead: ::c_long = 187;
++pub const SYS_setxattr: ::c_long = 188;
++pub const SYS_lsetxattr: ::c_long = 189;
++pub const SYS_fsetxattr: ::c_long = 190;
++pub const SYS_getxattr: ::c_long = 191;
++pub const SYS_lgetxattr: ::c_long = 192;
++pub const SYS_fgetxattr: ::c_long = 193;
++pub const SYS_listxattr: ::c_long = 194;
++pub const SYS_llistxattr: ::c_long = 195;
++pub const SYS_flistxattr: ::c_long = 196;
++pub const SYS_removexattr: ::c_long = 197;
++pub const SYS_lremovexattr: ::c_long = 198;
++pub const SYS_fremovexattr: ::c_long = 199;
++pub const SYS_tkill: ::c_long = 200;
++pub const SYS_time: ::c_long = 201;
++pub const SYS_futex: ::c_long = 202;
++pub const SYS_sched_setaffinity: ::c_long = 203;
++pub const SYS_sched_getaffinity: ::c_long = 204;
++pub const SYS_set_thread_area: ::c_long = 205;
++pub const SYS_io_setup: ::c_long = 206;
++pub const SYS_io_destroy: ::c_long = 207;
++pub const SYS_io_getevents: ::c_long = 208;
++pub const SYS_io_submit: ::c_long = 209;
++pub const SYS_io_cancel: ::c_long = 210;
++pub const SYS_get_thread_area: ::c_long = 211;
++pub const SYS_lookup_dcookie: ::c_long = 212;
++pub const SYS_epoll_create: ::c_long = 213;
++pub const SYS_epoll_ctl_old: ::c_long = 214;
++pub const SYS_epoll_wait_old: ::c_long = 215;
++pub const SYS_remap_file_pages: ::c_long = 216;
++pub const SYS_getdents64: ::c_long = 217;
++pub const SYS_set_tid_address: ::c_long = 218;
++pub const SYS_restart_syscall: ::c_long = 219;
++pub const SYS_semtimedop: ::c_long = 220;
++pub const SYS_fadvise64: ::c_long = 221;
++pub const SYS_timer_create: ::c_long = 222;
++pub const SYS_timer_settime: ::c_long = 223;
++pub const SYS_timer_gettime: ::c_long = 224;
++pub const SYS_timer_getoverrun: ::c_long = 225;
++pub const SYS_timer_delete: ::c_long = 226;
++pub const SYS_clock_settime: ::c_long = 227;
++pub const SYS_clock_gettime: ::c_long = 228;
++pub const SYS_clock_getres: ::c_long = 229;
++pub const SYS_clock_nanosleep: ::c_long = 230;
++pub const SYS_exit_group: ::c_long = 231;
++pub const SYS_epoll_wait: ::c_long = 232;
++pub const SYS_epoll_ctl: ::c_long = 233;
++pub const SYS_tgkill: ::c_long = 234;
++pub const SYS_utimes: ::c_long = 235;
++pub const SYS_vserver: ::c_long = 236;
++pub const SYS_mbind: ::c_long = 237;
++pub const SYS_set_mempolicy: ::c_long = 238;
++pub const SYS_get_mempolicy: ::c_long = 239;
++pub const SYS_mq_open: ::c_long = 240;
++pub const SYS_mq_unlink: ::c_long = 241;
++pub const SYS_mq_timedsend: ::c_long = 242;
++pub const SYS_mq_timedreceive: ::c_long = 243;
++pub const SYS_mq_notify: ::c_long = 244;
++pub const SYS_mq_getsetattr: ::c_long = 245;
++pub const SYS_kexec_load: ::c_long = 246;
++pub const SYS_waitid: ::c_long = 247;
++pub const SYS_add_key: ::c_long = 248;
++pub const SYS_request_key: ::c_long = 249;
++pub const SYS_keyctl: ::c_long = 250;
++pub const SYS_ioprio_set: ::c_long = 251;
++pub const SYS_ioprio_get: ::c_long = 252;
++pub const SYS_inotify_init: ::c_long = 253;
++pub const SYS_inotify_add_watch: ::c_long = 254;
++pub const SYS_inotify_rm_watch: ::c_long = 255;
++pub const SYS_migrate_pages: ::c_long = 256;
++pub const SYS_openat: ::c_long = 257;
++pub const SYS_mkdirat: ::c_long = 258;
++pub const SYS_mknodat: ::c_long = 259;
++pub const SYS_fchownat: ::c_long = 260;
++pub const SYS_futimesat: ::c_long = 261;
++pub const SYS_newfstatat: ::c_long = 262;
++pub const SYS_unlinkat: ::c_long = 263;
++pub const SYS_renameat: ::c_long = 264;
++pub const SYS_linkat: ::c_long = 265;
++pub const SYS_symlinkat: ::c_long = 266;
++pub const SYS_readlinkat: ::c_long = 267;
++pub const SYS_fchmodat: ::c_long = 268;
++pub const SYS_faccessat: ::c_long = 269;
++pub const SYS_pselect6: ::c_long = 270;
++pub const SYS_ppoll: ::c_long = 271;
++pub const SYS_unshare: ::c_long = 272;
++pub const SYS_set_robust_list: ::c_long = 273;
++pub const SYS_get_robust_list: ::c_long = 274;
++pub const SYS_splice: ::c_long = 275;
++pub const SYS_tee: ::c_long = 276;
++pub const SYS_sync_file_range: ::c_long = 277;
++pub const SYS_vmsplice: ::c_long = 278;
++pub const SYS_move_pages: ::c_long = 279;
++pub const SYS_utimensat: ::c_long = 280;
++pub const SYS_epoll_pwait: ::c_long = 281;
++pub const SYS_signalfd: ::c_long = 282;
++pub const SYS_timerfd_create: ::c_long = 283;
++pub const SYS_eventfd: ::c_long = 284;
++pub const SYS_fallocate: ::c_long = 285;
++pub const SYS_timerfd_settime: ::c_long = 286;
++pub const SYS_timerfd_gettime: ::c_long = 287;
++pub const SYS_accept4: ::c_long = 288;
++pub const SYS_signalfd4: ::c_long = 289;
++pub const SYS_eventfd2: ::c_long = 290;
++pub const SYS_epoll_create1: ::c_long = 291;
++pub const SYS_dup3: ::c_long = 292;
++pub const SYS_pipe2: ::c_long = 293;
++pub const SYS_inotify_init1: ::c_long = 294;
++pub const SYS_preadv: ::c_long = 295;
++pub const SYS_pwritev: ::c_long = 296;
++pub const SYS_rt_tgsigqueueinfo: ::c_long = 297;
++pub const SYS_perf_event_open: ::c_long = 298;
++pub const SYS_recvmmsg: ::c_long = 299;
++pub const SYS_fanotify_init: ::c_long = 300;
++pub const SYS_fanotify_mark: ::c_long = 301;
++pub const SYS_prlimit64: ::c_long = 302;
++pub const SYS_name_to_handle_at: ::c_long = 303;
++pub const SYS_open_by_handle_at: ::c_long = 304;
++pub const SYS_clock_adjtime: ::c_long = 305;
++pub const SYS_syncfs: ::c_long = 306;
++pub const SYS_sendmmsg: ::c_long = 307;
++pub const SYS_setns: ::c_long = 308;
++pub const SYS_getcpu: ::c_long = 309;
++pub const SYS_process_vm_readv: ::c_long = 310;
++pub const SYS_process_vm_writev: ::c_long = 311;
++pub const SYS_kcmp: ::c_long = 312;
++pub const SYS_finit_module: ::c_long = 313;
++pub const SYS_sched_setattr: ::c_long = 314;
++pub const SYS_sched_getattr: ::c_long = 315;
++pub const SYS_renameat2: ::c_long = 316;
++pub const SYS_seccomp: ::c_long = 317;
++pub const SYS_getrandom: ::c_long = 318;
++pub const SYS_memfd_create: ::c_long = 319;
++pub const SYS_kexec_file_load: ::c_long = 320;
++pub const SYS_bpf: ::c_long = 321;
++pub const SYS_execveat: ::c_long = 322;
++pub const SYS_userfaultfd: ::c_long = 323;
++pub const SYS_membarrier: ::c_long = 324;
++pub const SYS_mlock2: ::c_long = 325;
++pub const SYS_copy_file_range: ::c_long = 326;
++pub const SYS_preadv2: ::c_long = 327;
++pub const SYS_pwritev2: ::c_long = 328;
++pub const SYS_pkey_mprotect: ::c_long = 329;
++pub const SYS_pkey_alloc: ::c_long = 330;
++pub const SYS_pkey_free: ::c_long = 331;
++
++// offsets in user_regs_structs, from sys/reg.h
++pub const R15: ::c_int = 0;
++pub const R14: ::c_int = 1;
++pub const R13: ::c_int = 2;
++pub const R12: ::c_int = 3;
++pub const RBP: ::c_int = 4;
++pub const RBX: ::c_int = 5;
++pub const R11: ::c_int = 6;
++pub const R10: ::c_int = 7;
++pub const R9: ::c_int = 8;
++pub const R8: ::c_int = 9;
++pub const RAX: ::c_int = 10;
++pub const RCX: ::c_int = 11;
++pub const RDX: ::c_int = 12;
++pub const RSI: ::c_int = 13;
++pub const RDI: ::c_int = 14;
++pub const ORIG_RAX: ::c_int = 15;
++pub const RIP: ::c_int = 16;
++pub const CS: ::c_int = 17;
++pub const EFLAGS: ::c_int = 18;
++pub const RSP: ::c_int = 19;
++pub const SS: ::c_int = 20;
++pub const FS_BASE: ::c_int = 21;
++pub const GS_BASE: ::c_int = 22;
++pub const DS: ::c_int = 23;
++pub const ES: ::c_int = 24;
++pub const FS: ::c_int = 25;
++pub const GS: ::c_int = 26;
++
++extern {
++    pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
++    pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
++    pub fn makecontext(ucp: *mut ucontext_t,
++                       func:  extern fn (),
++                       argc: ::c_int, ...);
++    pub fn swapcontext(uocp: *mut ucontext_t,
++                       ucp: *const ucontext_t) -> ::c_int;
++    pub fn iopl(level: ::c_int) -> ::c_int;
++    pub fn ioperm(from: ::c_ulong, num: ::c_ulong,
++                  turn_on: ::c_int) -> ::c_int;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e99ea594a435553731beca63ed9e0146428ef46c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,605 @@@
++pub type fsblkcnt_t = ::c_ulong;
++pub type fsfilcnt_t = ::c_ulong;
++pub type rlim_t = c_ulong;
++pub type __priority_which_t = ::c_uint;
++
++s! {
++    pub struct aiocb {
++        pub aio_fildes: ::c_int,
++        pub aio_lio_opcode: ::c_int,
++        pub aio_reqprio: ::c_int,
++        pub aio_buf: *mut ::c_void,
++        pub aio_nbytes: ::size_t,
++        pub aio_sigevent: ::sigevent,
++        __next_prio: *mut aiocb,
++        __abs_prio: ::c_int,
++        __policy: ::c_int,
++        __error_code: ::c_int,
++        __return_value: ::ssize_t,
++        pub aio_offset: off_t,
++        #[cfg(target_pointer_width = "32")]
++        __unused1: [::c_char; 4],
++        __glibc_reserved: [::c_char; 32]
++    }
++
++    pub struct __exit_status {
++        pub e_termination: ::c_short,
++        pub e_exit: ::c_short,
++    }
++
++    pub struct __timeval {
++        pub tv_sec: ::int32_t,
++        pub tv_usec: ::int32_t,
++    }
++
++    pub struct utmpx {
++        pub ut_type: ::c_short,
++        pub ut_pid: ::pid_t,
++        pub ut_line: [::c_char; __UT_LINESIZE],
++        pub ut_id: [::c_char; 4],
++
++        pub ut_user: [::c_char; __UT_NAMESIZE],
++        pub ut_host: [::c_char; __UT_HOSTSIZE],
++        pub ut_exit: __exit_status,
++
++        #[cfg(any(target_arch = "aarch64",
++                  target_arch = "sparc64",
++                  target_pointer_width = "32"))]
++        pub ut_session: ::c_long,
++        #[cfg(any(target_arch = "aarch64",
++                  target_arch = "sparc64",
++                  target_pointer_width = "32"))]
++        pub ut_tv: ::timeval,
++
++        #[cfg(not(any(target_arch = "aarch64",
++                      target_arch = "sparc64",
++                      target_pointer_width = "32")))]
++        pub ut_session: ::int32_t,
++        #[cfg(not(any(target_arch = "aarch64",
++                      target_arch = "sparc64",
++                      target_pointer_width = "32")))]
++        pub ut_tv: __timeval,
++
++        pub ut_addr_v6: [::int32_t; 4],
++        __glibc_reserved: [::c_char; 20],
++    }
++
++    pub struct sigaction {
++        pub sa_sigaction: ::sighandler_t,
++        pub sa_mask: ::sigset_t,
++        #[cfg(target_arch = "sparc64")]
++        __reserved0: ::c_int,
++        pub sa_flags: ::c_int,
++        pub sa_restorer: ::dox::Option<extern fn()>,
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_flags: ::c_int,
++        pub ss_size: ::size_t
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_errno: ::c_int,
++        pub si_code: ::c_int,
++        pub _pad: [::c_int; 29],
++        _align: [usize; 0],
++    }
++
++    pub struct glob64_t {
++        pub gl_pathc: ::size_t,
++        pub gl_pathv: *mut *mut ::c_char,
++        pub gl_offs: ::size_t,
++        pub gl_flags: ::c_int,
++
++        __unused1: *mut ::c_void,
++        __unused2: *mut ::c_void,
++        __unused3: *mut ::c_void,
++        __unused4: *mut ::c_void,
++        __unused5: *mut ::c_void,
++    }
++
++    pub struct ucred {
++        pub pid: ::pid_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++    }
++
++    pub struct statfs {
++        pub f_type: __fsword_t,
++        pub f_bsize: __fsword_t,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_fsid: ::fsid_t,
++
++        pub f_namelen: __fsword_t,
++        pub f_frsize: __fsword_t,
++        f_spare: [__fsword_t; 5],
++    }
++
++    pub struct msghdr {
++        pub msg_name: *mut ::c_void,
++        pub msg_namelen: ::socklen_t,
++        pub msg_iov: *mut ::iovec,
++        pub msg_iovlen: ::size_t,
++        pub msg_control: *mut ::c_void,
++        pub msg_controllen: ::size_t,
++        pub msg_flags: ::c_int,
++    }
++
++    pub struct cmsghdr {
++        pub cmsg_len: ::size_t,
++        pub cmsg_level: ::c_int,
++        pub cmsg_type: ::c_int,
++    }
++
++    pub struct termios {
++        pub c_iflag: ::tcflag_t,
++        pub c_oflag: ::tcflag_t,
++        pub c_cflag: ::tcflag_t,
++        pub c_lflag: ::tcflag_t,
++        pub c_line: ::cc_t,
++        pub c_cc: [::cc_t; ::NCCS],
++        #[cfg(not(target_arch = "sparc64"))]
++        pub c_ispeed: ::speed_t,
++        #[cfg(not(target_arch = "sparc64"))]
++        pub c_ospeed: ::speed_t,
++    }
++
++    pub struct flock {
++        pub l_type: ::c_short,
++        pub l_whence: ::c_short,
++        pub l_start: ::off_t,
++        pub l_len: ::off_t,
++        pub l_pid: ::pid_t,
++    }
++
++    // FIXME this is actually a union
++    pub struct sem_t {
++        #[cfg(target_pointer_width = "32")]
++        __size: [::c_char; 16],
++        #[cfg(target_pointer_width = "64")]
++        __size: [::c_char; 32],
++        __align: [::c_long; 0],
++    }
++}
++
++pub const __UT_LINESIZE: usize = 32;
++pub const __UT_NAMESIZE: usize = 32;
++pub const __UT_HOSTSIZE: usize = 256;
++pub const EMPTY: ::c_short = 0;
++pub const RUN_LVL: ::c_short = 1;
++pub const BOOT_TIME: ::c_short = 2;
++pub const NEW_TIME: ::c_short = 3;
++pub const OLD_TIME: ::c_short = 4;
++pub const INIT_PROCESS: ::c_short = 5;
++pub const LOGIN_PROCESS: ::c_short = 6;
++pub const USER_PROCESS: ::c_short = 7;
++pub const DEAD_PROCESS: ::c_short = 8;
++pub const ACCOUNTING: ::c_short = 9;
++
++pub const RLIMIT_RSS: ::c_int = 5;
++pub const RLIMIT_AS: ::c_int = 9;
++pub const RLIMIT_MEMLOCK: ::c_int = 8;
++pub const RLIM_INFINITY: ::rlim_t = !0;
++pub const RLIMIT_RTTIME: ::c_int = 15;
++pub const RLIMIT_NLIMITS: ::c_int = 16;
++
++pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
++
++pub const SOL_RXRPC: ::c_int = 272;
++pub const SOL_PPPOL2TP: ::c_int = 273;
++pub const SOL_BLUETOOTH: ::c_int = 274;
++pub const SOL_PNPIPE: ::c_int = 275;
++pub const SOL_RDS: ::c_int = 276;
++pub const SOL_IUCV: ::c_int = 277;
++pub const SOL_CAIF: ::c_int = 278;
++pub const SOL_ALG: ::c_int = 279;
++pub const SOL_NFC: ::c_int = 280;
++
++pub const MSG_TRYHARD: ::c_int = 4;
++
++pub const LC_PAPER: ::c_int = 7;
++pub const LC_NAME: ::c_int = 8;
++pub const LC_ADDRESS: ::c_int = 9;
++pub const LC_TELEPHONE: ::c_int = 10;
++pub const LC_MEASUREMENT: ::c_int = 11;
++pub const LC_IDENTIFICATION: ::c_int = 12;
++pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
++pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
++pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
++pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
++pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
++pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
++pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
++                               | ::LC_NUMERIC_MASK
++                               | ::LC_TIME_MASK
++                               | ::LC_COLLATE_MASK
++                               | ::LC_MONETARY_MASK
++                               | ::LC_MESSAGES_MASK
++                               | LC_PAPER_MASK
++                               | LC_NAME_MASK
++                               | LC_ADDRESS_MASK
++                               | LC_TELEPHONE_MASK
++                               | LC_MEASUREMENT_MASK
++                               | LC_IDENTIFICATION_MASK;
++
++pub const MAP_ANON: ::c_int = 0x0020;
++pub const MAP_ANONYMOUS: ::c_int = 0x0020;
++pub const MAP_DENYWRITE: ::c_int = 0x0800;
++pub const MAP_EXECUTABLE: ::c_int = 0x01000;
++pub const MAP_POPULATE: ::c_int = 0x08000;
++pub const MAP_NONBLOCK: ::c_int = 0x010000;
++pub const MAP_STACK: ::c_int = 0x020000;
++
++pub const ENOTSUP: ::c_int = EOPNOTSUPP;
++pub const EUCLEAN: ::c_int = 117;
++pub const ENOTNAM: ::c_int = 118;
++pub const ENAVAIL: ::c_int = 119;
++pub const EISNAM: ::c_int = 120;
++pub const EREMOTEIO: ::c_int = 121;
++
++pub const SOCK_STREAM: ::c_int = 1;
++pub const SOCK_DGRAM: ::c_int = 2;
++pub const SOCK_SEQPACKET: ::c_int = 5;
++
++pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
++pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
++pub const TCP_THIN_DUPACK: ::c_int = 17;
++pub const TCP_USER_TIMEOUT: ::c_int = 18;
++pub const TCP_REPAIR: ::c_int = 19;
++pub const TCP_REPAIR_QUEUE: ::c_int = 20;
++pub const TCP_QUEUE_SEQ: ::c_int = 21;
++pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
++pub const TCP_FASTOPEN: ::c_int = 23;
++pub const TCP_TIMESTAMP: ::c_int = 24;
++
++pub const SIGTTIN: ::c_int = 21;
++pub const SIGTTOU: ::c_int = 22;
++pub const SIGXCPU: ::c_int = 24;
++pub const SIGXFSZ: ::c_int = 25;
++pub const SIGVTALRM: ::c_int = 26;
++pub const SIGPROF: ::c_int = 27;
++pub const SIGWINCH: ::c_int = 28;
++
++pub const SIGEV_THREAD_ID: ::c_int = 4;
++
++pub const BUFSIZ: ::c_uint = 8192;
++pub const TMP_MAX: ::c_uint = 238328;
++pub const FOPEN_MAX: ::c_uint = 16;
++pub const POSIX_FADV_DONTNEED: ::c_int = 4;
++pub const POSIX_FADV_NOREUSE: ::c_int = 5;
++pub const POSIX_MADV_DONTNEED: ::c_int = 4;
++pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
++pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
++pub const _SC_PII: ::c_int = 53;
++pub const _SC_PII_XTI: ::c_int = 54;
++pub const _SC_PII_SOCKET: ::c_int = 55;
++pub const _SC_PII_INTERNET: ::c_int = 56;
++pub const _SC_PII_OSI: ::c_int = 57;
++pub const _SC_POLL: ::c_int = 58;
++pub const _SC_SELECT: ::c_int = 59;
++pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
++pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
++pub const _SC_PII_OSI_COTS: ::c_int = 63;
++pub const _SC_PII_OSI_CLTS: ::c_int = 64;
++pub const _SC_PII_OSI_M: ::c_int = 65;
++pub const _SC_T_IOV_MAX: ::c_int = 66;
++pub const _SC_2_C_VERSION: ::c_int = 96;
++pub const _SC_CHAR_BIT: ::c_int = 101;
++pub const _SC_CHAR_MAX: ::c_int = 102;
++pub const _SC_CHAR_MIN: ::c_int = 103;
++pub const _SC_INT_MAX: ::c_int = 104;
++pub const _SC_INT_MIN: ::c_int = 105;
++pub const _SC_LONG_BIT: ::c_int = 106;
++pub const _SC_WORD_BIT: ::c_int = 107;
++pub const _SC_MB_LEN_MAX: ::c_int = 108;
++pub const _SC_SSIZE_MAX: ::c_int = 110;
++pub const _SC_SCHAR_MAX: ::c_int = 111;
++pub const _SC_SCHAR_MIN: ::c_int = 112;
++pub const _SC_SHRT_MAX: ::c_int = 113;
++pub const _SC_SHRT_MIN: ::c_int = 114;
++pub const _SC_UCHAR_MAX: ::c_int = 115;
++pub const _SC_UINT_MAX: ::c_int = 116;
++pub const _SC_ULONG_MAX: ::c_int = 117;
++pub const _SC_USHRT_MAX: ::c_int = 118;
++pub const _SC_NL_ARGMAX: ::c_int = 119;
++pub const _SC_NL_LANGMAX: ::c_int = 120;
++pub const _SC_NL_MSGMAX: ::c_int = 121;
++pub const _SC_NL_NMAX: ::c_int = 122;
++pub const _SC_NL_SETMAX: ::c_int = 123;
++pub const _SC_NL_TEXTMAX: ::c_int = 124;
++pub const _SC_BASE: ::c_int = 134;
++pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
++pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
++pub const _SC_DEVICE_IO: ::c_int = 140;
++pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
++pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
++pub const _SC_FD_MGMT: ::c_int = 143;
++pub const _SC_FIFO: ::c_int = 144;
++pub const _SC_PIPE: ::c_int = 145;
++pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
++pub const _SC_FILE_LOCKING: ::c_int = 147;
++pub const _SC_FILE_SYSTEM: ::c_int = 148;
++pub const _SC_MULTI_PROCESS: ::c_int = 150;
++pub const _SC_SINGLE_PROCESS: ::c_int = 151;
++pub const _SC_NETWORKING: ::c_int = 152;
++pub const _SC_REGEX_VERSION: ::c_int = 156;
++pub const _SC_SIGNALS: ::c_int = 158;
++pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
++pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
++pub const _SC_USER_GROUPS: ::c_int = 166;
++pub const _SC_USER_GROUPS_R: ::c_int = 167;
++pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
++pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
++pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
++pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
++pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
++pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
++pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
++pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
++pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
++pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
++pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
++pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
++pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
++pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
++pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
++pub const O_ACCMODE: ::c_int = 3;
++pub const ST_RELATIME: ::c_ulong = 4096;
++pub const NI_MAXHOST: ::socklen_t = 1025;
++
++pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
++pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
++pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
++pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
++pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
++pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
++pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
++pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
++pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
++pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
++pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
++pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
++pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
++pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
++pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
++pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
++pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
++pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
++pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
++pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
++pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
++pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
++pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
++pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
++pub const TMPFS_MAGIC: ::c_long = 0x01021994;
++pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
++
++pub const VEOF: usize = 4;
++
++pub const CPU_SETSIZE: ::c_int = 0x400;
++
++pub const QFMT_VFS_V1: ::c_int = 4;
++
++pub const PTRACE_TRACEME: ::c_uint = 0;
++pub const PTRACE_PEEKTEXT: ::c_uint = 1;
++pub const PTRACE_PEEKDATA: ::c_uint = 2;
++pub const PTRACE_PEEKUSER: ::c_uint = 3;
++pub const PTRACE_POKETEXT: ::c_uint = 4;
++pub const PTRACE_POKEDATA: ::c_uint = 5;
++pub const PTRACE_POKEUSER: ::c_uint = 6;
++pub const PTRACE_CONT: ::c_uint = 7;
++pub const PTRACE_KILL: ::c_uint = 8;
++pub const PTRACE_SINGLESTEP: ::c_uint = 9;
++pub const PTRACE_ATTACH: ::c_uint = 16;
++pub const PTRACE_SYSCALL: ::c_uint = 24;
++pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
++pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
++pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
++pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
++pub const PTRACE_GETREGSET: ::c_uint = 0x4204;
++pub const PTRACE_SETREGSET: ::c_uint = 0x4205;
++pub const PTRACE_SEIZE: ::c_uint = 0x4206;
++pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
++pub const PTRACE_LISTEN: ::c_uint = 0x4208;
++pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
++
++pub const MADV_DODUMP: ::c_int = 17;
++pub const MADV_DONTDUMP: ::c_int = 16;
++
++pub const EPOLLWAKEUP: ::c_int = 0x20000000;
++
++pub const MADV_HUGEPAGE: ::c_int = 14;
++pub const MADV_NOHUGEPAGE: ::c_int = 15;
++pub const MAP_HUGETLB: ::c_int = 0x040000;
++
++pub const SEEK_DATA: ::c_int = 3;
++pub const SEEK_HOLE: ::c_int = 4;
++
++pub const TCSANOW: ::c_int = 0;
++pub const TCSADRAIN: ::c_int = 1;
++pub const TCSAFLUSH: ::c_int = 2;
++
++pub const TIOCLINUX: ::c_ulong = 0x541C;
++pub const TIOCGSERIAL: ::c_ulong = 0x541E;
++
++pub const RTLD_DEEPBIND: ::c_int = 0x8;
++pub const RTLD_GLOBAL: ::c_int = 0x100;
++pub const RTLD_NOLOAD: ::c_int = 0x4;
++
++pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
++pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
++pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
++pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
++pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
++
++pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
++pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
++pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
++pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
++pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
++pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
++pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
++pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
++
++pub const NETLINK_ROUTE: ::c_int = 0;
++pub const NETLINK_UNUSED: ::c_int = 1;
++pub const NETLINK_USERSOCK: ::c_int = 2;
++pub const NETLINK_FIREWALL: ::c_int = 3;
++pub const NETLINK_SOCK_DIAG: ::c_int = 4;
++pub const NETLINK_NFLOG: ::c_int = 5;
++pub const NETLINK_XFRM: ::c_int = 6;
++pub const NETLINK_SELINUX: ::c_int = 7;
++pub const NETLINK_ISCSI: ::c_int = 8;
++pub const NETLINK_AUDIT: ::c_int = 9;
++pub const NETLINK_FIB_LOOKUP: ::c_int = 10;
++pub const NETLINK_CONNECTOR: ::c_int = 11;
++pub const NETLINK_NETFILTER: ::c_int = 12;
++pub const NETLINK_IP6_FW: ::c_int = 13;
++pub const NETLINK_DNRTMSG: ::c_int = 14;
++pub const NETLINK_KOBJECT_UEVENT: ::c_int = 15;
++pub const NETLINK_GENERIC: ::c_int = 16;
++pub const NETLINK_SCSITRANSPORT: ::c_int = 18;
++pub const NETLINK_ECRYPTFS: ::c_int = 19;
++pub const NETLINK_RDMA: ::c_int = 20;
++pub const NETLINK_CRYPTO: ::c_int = 21;
++pub const NETLINK_INET_DIAG: ::c_int = NETLINK_SOCK_DIAG;
++
++pub const MAX_LINKS: ::c_int = 32;
++
++pub const NLM_F_REQUEST: ::c_int = 1;
++pub const NLM_F_MULTI: ::c_int = 2;
++pub const NLM_F_ACK: ::c_int = 4;
++pub const NLM_F_ECHO: ::c_int = 8;
++pub const NLM_F_DUMP_INTR: ::c_int = 16;
++pub const NLM_F_DUMP_FILTERED: ::c_int = 32;
++
++pub const NLM_F_ROOT: ::c_int = 0x100;
++pub const NLM_F_MATCH: ::c_int = 0x200;
++pub const NLM_F_ATOMIC: ::c_int = 0x400;
++pub const NLM_F_DUMP: ::c_int = NLM_F_ROOT | NLM_F_MATCH;
++
++pub const NLM_F_REPLACE: ::c_int = 0x100;
++pub const NLM_F_EXCL: ::c_int = 0x200;
++pub const NLM_F_CREATE: ::c_int = 0x400;
++pub const NLM_F_APPEND: ::c_int = 0x800;
++
++pub const NLMSG_NOOP: ::c_int = 0x1;
++pub const NLMSG_ERROR: ::c_int = 0x2;
++pub const NLMSG_DONE: ::c_int = 0x3;
++pub const NLMSG_OVERRUN: ::c_int = 0x4;
++pub const NLMSG_MIN_TYPE: ::c_int = 0x10;
++
++pub const NETLINK_ADD_MEMBERSHIP: ::c_int = 1;
++pub const NETLINK_DROP_MEMBERSHIP: ::c_int = 2;
++pub const NETLINK_PKTINFO: ::c_int = 3;
++pub const NETLINK_BROADCAST_ERROR: ::c_int = 4;
++pub const NETLINK_NO_ENOBUFS: ::c_int = 5;
++pub const NETLINK_RX_RING: ::c_int = 6;
++pub const NETLINK_TX_RING: ::c_int = 7;
++pub const NETLINK_LISTEN_ALL_NSID: ::c_int = 8;
++pub const NETLINK_LIST_MEMBERSHIPS: ::c_int = 9;
++pub const NETLINK_CAP_ACK: ::c_int = 10;
++
++pub const NLA_F_NESTED: ::c_int = 1 << 15;
++pub const NLA_F_NET_BYTEORDER: ::c_int = 1 << 14;
++pub const NLA_TYPE_MASK: ::c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER);
++
++pub const TIOCM_LE: ::c_int = 0x001;
++pub const TIOCM_DTR: ::c_int = 0x002;
++pub const TIOCM_RTS: ::c_int = 0x004;
++pub const TIOCM_ST: ::c_int = 0x008;
++pub const TIOCM_SR: ::c_int = 0x010;
++pub const TIOCM_CTS: ::c_int = 0x020;
++pub const TIOCM_CAR: ::c_int = 0x040;
++pub const TIOCM_RNG: ::c_int = 0x080;
++pub const TIOCM_DSR: ::c_int = 0x100;
++pub const TIOCM_CD: ::c_int = TIOCM_CAR;
++pub const TIOCM_RI: ::c_int = TIOCM_RNG;
++
++cfg_if! {
++    if #[cfg(any(target_arch = "arm", target_arch = "x86",
++                 target_arch = "x86_64"))] {
++        pub const PTHREAD_STACK_MIN: ::size_t = 16384;
++    } else if #[cfg(target_arch = "sparc64")] {
++        pub const PTHREAD_STACK_MIN: ::size_t = 0x6000;
++    } else {
++        pub const PTHREAD_STACK_MIN: ::size_t = 131072;
++    }
++}
++
++extern {
++    pub fn utmpxname(file: *const ::c_char) -> ::c_int;
++    pub fn getutxent() -> *mut utmpx;
++    pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
++    pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
++    pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
++    pub fn setutxent();
++    pub fn endutxent();
++    pub fn getpt() -> ::c_int;
++}
++
++#[link(name = "util")]
++extern {
++    pub fn sysctl(name: *mut ::c_int,
++                  namelen: ::c_int,
++                  oldp: *mut ::c_void,
++                  oldlenp: *mut ::size_t,
++                  newp: *mut ::c_void,
++                  newlen: ::size_t)
++                  -> ::c_int;
++    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
++    pub fn backtrace(buf: *mut *mut ::c_void,
++                     sz: ::c_int) -> ::c_int;
++    pub fn glob64(pattern: *const ::c_char,
++                  flags: ::c_int,
++                  errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
++                                                   errno: ::c_int)
++                                                   -> ::c_int>,
++                  pglob: *mut glob64_t) -> ::c_int;
++    pub fn globfree64(pglob: *mut glob64_t);
++    pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
++    pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
++                                       cpusetsize: ::size_t,
++                                       cpuset: *mut ::cpu_set_t) -> ::c_int;
++    pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
++                                       cpusetsize: ::size_t,
++                                       cpuset: *const ::cpu_set_t) -> ::c_int;
++    pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
++    pub fn setpriority(which: ::__priority_which_t, who: ::id_t,
++                                       prio: ::c_int) -> ::c_int;
++    pub fn pthread_getaffinity_np(thread: ::pthread_t,
++                                  cpusetsize: ::size_t,
++                                  cpuset: *mut ::cpu_set_t) -> ::c_int;
++    pub fn pthread_setaffinity_np(thread: ::pthread_t,
++                                  cpusetsize: ::size_t,
++                                  cpuset: *const ::cpu_set_t) -> ::c_int;
++    pub fn pthread_rwlockattr_getkind_np(attr: *const ::pthread_rwlockattr_t,
++                                         val: *mut ::c_int) -> ::c_int;
++    pub fn pthread_rwlockattr_setkind_np(attr: *mut ::pthread_rwlockattr_t,
++                                         val: ::c_int) -> ::c_int;
++    pub fn sched_getcpu() -> ::c_int;
++}
++
++cfg_if! {
++    if #[cfg(any(target_arch = "x86",
++                 target_arch = "arm",
++                 target_arch = "powerpc"))] {
++        mod b32;
++        pub use self::b32::*;
++    } else if #[cfg(any(target_arch = "x86_64",
++                        target_arch = "aarch64",
++                        target_arch = "powerpc64",
++                        target_arch = "sparc64"))] {
++        mod b64;
++        pub use self::b64::*;
++    } else {
++        // Unknown target_arch
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fd68c88934b9e42b190b181b1f6f94f78f97815e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,929 @@@
++pub type blkcnt_t = i64;
++pub type blksize_t = i64;
++pub type c_char = u8;
++pub type c_long = i64;
++pub type c_ulong = u64;
++pub type fsblkcnt_t = u64;
++pub type fsfilcnt_t = u64;
++pub type ino_t = u64;
++pub type nlink_t = u64;
++pub type off_t = i64;
++pub type rlim_t = u64;
++pub type suseconds_t = i64;
++pub type time_t = i64;
++pub type wchar_t = i32;
++pub type greg_t = u64;
++pub type clock_t = i64;
++pub type __fsword_t = ::c_long;
++pub type __priority_which_t = ::c_uint;
++pub type __u64 = u64;
++
++s! {
++    pub struct aiocb {
++        pub aio_fildes: ::c_int,
++        pub aio_lio_opcode: ::c_int,
++        pub aio_reqprio: ::c_int,
++        pub aio_buf: *mut ::c_void,
++        pub aio_nbytes: ::size_t,
++        pub aio_sigevent: ::sigevent,
++        __next_prio: *mut aiocb,
++        __abs_prio: ::c_int,
++        __policy: ::c_int,
++        __error_code: ::c_int,
++        __return_value: ::ssize_t,
++        pub aio_offset: off_t,
++        #[cfg(target_pointer_width = "32")]
++        __unused1: [::c_char; 4],
++        __glibc_reserved: [::c_char; 32]
++    }
++
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino_t,
++        pub st_nlink: ::nlink_t,
++        pub st_mode: ::mode_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        st_pad0: ::c_int,
++        pub st_rdev: ::dev_t,
++        pub st_size: ::off_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt_t,
++        __glibc_reserved: [::c_long; 3],
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino64_t,
++        pub st_nlink: ::nlink_t,
++        pub st_mode: ::mode_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        st_pad0: ::c_int,
++        pub st_rdev: ::dev_t,
++        pub st_size: ::off_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt64_t,
++        __glibc_reserved: [::c_long; 3],
++    }
++
++    pub struct pthread_attr_t {
++        __size: [::c_ulong; 7]
++    }
++
++    pub struct sigaction {
++        pub sa_sigaction: ::sighandler_t,
++        __glibc_reserved0: ::c_int,
++        pub sa_flags: ::c_int,
++        pub sa_restorer: ::dox::Option<extern fn()>,
++        pub sa_mask: sigset_t,
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_flags: ::c_int,
++        pub ss_size: ::size_t,
++    }
++
++    pub struct sigset_t {
++        __size: [::c_ulong; 16],
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_errno: ::c_int,
++        pub si_code: ::c_int,
++        _pad: ::c_int,
++        _pad2: [::c_long; 14],
++    }
++
++    pub struct ipc_perm {
++        pub __key: ::key_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++        pub cuid: ::uid_t,
++        pub cgid: ::gid_t,
++        pub mode: ::mode_t,
++        pub __seq: ::c_ushort,
++        __pad1: ::c_ushort,
++        __unused1: ::c_ulong,
++        __unused2: ::c_ulong
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_segsz: ::size_t,
++        pub shm_atime: ::time_t,
++        pub shm_dtime: ::time_t,
++        pub shm_ctime: ::time_t,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::shmatt_t,
++        __unused4: ::c_ulong,
++        __unused5: ::c_ulong
++    }
++
++    pub struct statfs {
++        pub f_type: ::c_uint,
++        pub f_bsize: ::c_uint,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_fsid: ::fsid_t,
++        pub f_namelen: ::c_uint,
++        pub f_frsize: ::c_uint,
++        pub f_flags: ::c_uint,
++        f_spare: [::c_uint; 4],
++    }
++
++    pub struct msghdr {
++        pub msg_name: *mut ::c_void,
++        pub msg_namelen: ::socklen_t,
++        pub msg_iov: *mut ::iovec,
++        pub msg_iovlen: ::size_t,
++        pub msg_control: *mut ::c_void,
++        pub msg_controllen: ::size_t,
++        pub msg_flags: ::c_int,
++    }
++
++    pub struct cmsghdr {
++        pub cmsg_len: ::size_t,
++        pub cmsg_level: ::c_int,
++        pub cmsg_type: ::c_int,
++    }
++
++    pub struct termios {
++        pub c_iflag: ::tcflag_t,
++        pub c_oflag: ::tcflag_t,
++        pub c_cflag: ::tcflag_t,
++        pub c_lflag: ::tcflag_t,
++        pub c_line: ::cc_t,
++        pub c_cc: [::cc_t; ::NCCS],
++        pub c_ispeed: ::speed_t,
++        pub c_ospeed: ::speed_t,
++    }
++
++    pub struct sysinfo {
++        pub uptime: ::c_long,
++        pub loads: [::c_ulong; 3],
++        pub totalram: ::c_ulong,
++        pub freeram: ::c_ulong,
++        pub sharedram: ::c_ulong,
++        pub bufferram: ::c_ulong,
++        pub totalswap: ::c_ulong,
++        pub freeswap: ::c_ulong,
++        pub procs: ::c_ushort,
++        pub pad: ::c_ushort,
++        pub totalhigh: ::c_ulong,
++        pub freehigh: ::c_ulong,
++        pub mem_unit: ::c_uint,
++        pub _f: [::c_char; 0],
++    }
++
++    pub struct glob64_t {
++        pub gl_pathc: ::size_t,
++        pub gl_pathv: *mut *mut ::c_char,
++        pub gl_offs: ::size_t,
++        pub gl_flags: ::c_int,
++
++        __unused1: *mut ::c_void,
++        __unused2: *mut ::c_void,
++        __unused3: *mut ::c_void,
++        __unused4: *mut ::c_void,
++        __unused5: *mut ::c_void,
++    }
++
++    pub struct ucred {
++        pub pid: ::pid_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++    }
++
++    pub struct flock {
++        pub l_type: ::c_short,
++        pub l_whence: ::c_short,
++        pub l_start: ::off_t,
++        pub l_len: ::off_t,
++        pub l_pid: ::pid_t,
++    }
++
++    // FIXME this is actually a union
++    pub struct sem_t {
++        __size: [::c_char; 32],
++        __align: [::c_long; 0],
++    }
++
++    pub struct __psw_t {
++        pub mask: u64,
++        pub addr: u64,
++    }
++
++    // FIXME: This is actually a union.
++    pub struct fpreg_t {
++        pub d: ::c_double,
++        // f: ::c_float,
++    }
++
++    pub struct fpregset_t {
++        pub fpc: u32,
++        __pad: u32,
++        pub fprs: [fpreg_t; 16],
++    }
++
++    pub struct mcontext_t {
++        pub psw: __psw_t,
++        pub gregs: [u64; 16],
++        pub aregs: [u32; 16],
++        pub fpregs: fpregset_t,
++    }
++
++    pub struct ucontext_t {
++        pub uc_flags: ::c_ulong,
++        pub uc_link: *mut ucontext_t,
++        pub uc_stack: ::stack_t,
++        pub uc_mcontext: mcontext_t,
++        pub uc_sigmask: ::sigset_t,
++    }
++
++    pub struct msqid_ds {
++        pub msg_perm: ::ipc_perm,
++        pub msg_stime: ::time_t,
++        pub msg_rtime: ::time_t,
++        pub msg_ctime: ::time_t,
++        __msg_cbytes: ::c_ulong,
++        pub msg_qnum: ::msgqnum_t,
++        pub msg_qbytes: ::msglen_t,
++        pub msg_lspid: ::pid_t,
++        pub msg_lrpid: ::pid_t,
++        __glibc_reserved4: ::c_ulong,
++        __glibc_reserved5: ::c_ulong,
++    }
++}
++
++pub const SFD_CLOEXEC: ::c_int = 0x080000;
++
++pub const NCCS: usize = 32;
++
++pub const O_TRUNC: ::c_int = 512;
++pub const O_LARGEFILE: ::c_int = 0o0100000;
++pub const O_NOATIME: ::c_int = 0o1000000;
++pub const O_CLOEXEC: ::c_int = 0x80000;
++pub const O_PATH: ::c_int = 0o10000000;
++
++pub const EBFONT: ::c_int = 59;
++pub const ENOSTR: ::c_int = 60;
++pub const ENODATA: ::c_int = 61;
++pub const ETIME: ::c_int = 62;
++pub const ENOSR: ::c_int = 63;
++pub const ENONET: ::c_int = 64;
++pub const ENOPKG: ::c_int = 65;
++pub const EREMOTE: ::c_int = 66;
++pub const ENOLINK: ::c_int = 67;
++pub const EADV: ::c_int = 68;
++pub const ESRMNT: ::c_int = 69;
++pub const ECOMM: ::c_int = 70;
++pub const EPROTO: ::c_int = 71;
++pub const EDOTDOT: ::c_int = 73;
++
++pub const SA_NODEFER: ::c_int = 0x40000000;
++pub const SA_RESETHAND: ::c_int = 0x80000000;
++pub const SA_RESTART: ::c_int = 0x10000000;
++pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
++
++pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
++
++pub const EFD_CLOEXEC: ::c_int = 0x80000;
++
++pub const POSIX_FADV_DONTNEED: ::c_int = 6;
++pub const POSIX_FADV_NOREUSE: ::c_int = 7;
++
++pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
++pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
++pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
++
++pub const EADDRINUSE: ::c_int = 98;
++pub const EADDRNOTAVAIL: ::c_int = 99;
++pub const ECONNABORTED: ::c_int = 103;
++pub const ECONNREFUSED: ::c_int = 111;
++pub const ECONNRESET: ::c_int = 104;
++pub const EDEADLK: ::c_int = 35;
++pub const ENOSYS: ::c_int = 38;
++pub const ENOTCONN: ::c_int = 107;
++pub const ETIMEDOUT: ::c_int = 110;
++pub const FIOCLEX: ::c_ulong = 0x5451;
++pub const FIONBIO: ::c_ulong = 0x5421;
++pub const MAP_ANON: ::c_int = 0x20;
++pub const O_ACCMODE: ::c_int = 3;
++pub const O_APPEND: ::c_int = 1024;
++pub const O_CREAT: ::c_int = 64;
++pub const O_EXCL: ::c_int = 128;
++pub const O_NONBLOCK: ::c_int = 2048;
++pub const PTHREAD_STACK_MIN: ::size_t = 16384;
++pub const RLIM_INFINITY: ::rlim_t = 0xffffffffffffffff;
++pub const SA_NOCLDWAIT: ::c_int = 2;
++pub const SA_ONSTACK: ::c_int = 0x08000000;
++pub const SA_SIGINFO: ::c_int = 4;
++pub const SIGBUS: ::c_int = 7;
++pub const SIGSTKSZ: ::size_t = 0x2000;
++pub const MINSIGSTKSZ: ::size_t = 2048;
++pub const SIG_SETMASK: ::c_int = 2;
++pub const SOCK_DGRAM: ::c_int = 2;
++pub const SOCK_STREAM: ::c_int = 1;
++pub const SOL_SOCKET: ::c_int = 1;
++pub const SO_BROADCAST: ::c_int = 6;
++pub const SO_ERROR: ::c_int = 4;
++pub const SO_RCVTIMEO: ::c_int = 20;
++pub const SO_REUSEADDR: ::c_int = 2;
++pub const SO_SNDTIMEO: ::c_int = 21;
++pub const SO_BINDTODEVICE: ::c_int = 25;
++pub const SO_TIMESTAMP: ::c_int = 29;
++pub const SO_MARK: ::c_int = 36;
++pub const SO_PROTOCOL: ::c_int = 38;
++pub const SO_DOMAIN: ::c_int = 39;
++pub const SO_RXQ_OVFL: ::c_int = 40;
++pub const SO_PEEK_OFF: ::c_int = 42;
++pub const SO_BUSY_POLL: ::c_int = 46;
++
++pub const RLIMIT_RSS: ::c_int = 5;
++pub const RLIMIT_NOFILE: ::c_int = 7;
++pub const RLIMIT_AS: ::c_int = 9;
++pub const RLIMIT_NPROC: ::c_int = 6;
++pub const RLIMIT_MEMLOCK: ::c_int = 8;
++pub const RLIMIT_RTTIME: ::c_int = 15;
++pub const RLIMIT_NLIMITS: ::c_int = 16;
++
++pub const O_NOCTTY: ::c_int = 256;
++pub const O_SYNC: ::c_int = 1052672;
++pub const O_RSYNC: ::c_int = 1052672;
++pub const O_DSYNC: ::c_int = 4096;
++pub const O_FSYNC: ::c_int = 0x101000;
++pub const O_DIRECT: ::c_int = 0x4000;
++pub const O_DIRECTORY: ::c_int = 0x10000;
++pub const O_NOFOLLOW: ::c_int = 0x20000;
++
++pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
++
++pub const LC_PAPER: ::c_int = 7;
++pub const LC_NAME: ::c_int = 8;
++pub const LC_ADDRESS: ::c_int = 9;
++pub const LC_TELEPHONE: ::c_int = 10;
++pub const LC_MEASUREMENT: ::c_int = 11;
++pub const LC_IDENTIFICATION: ::c_int = 12;
++pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
++pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
++pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
++pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
++pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
++pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
++pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
++                               | ::LC_NUMERIC_MASK
++                               | ::LC_TIME_MASK
++                               | ::LC_COLLATE_MASK
++                               | ::LC_MONETARY_MASK
++                               | ::LC_MESSAGES_MASK
++                               | LC_PAPER_MASK
++                               | LC_NAME_MASK
++                               | LC_ADDRESS_MASK
++                               | LC_TELEPHONE_MASK
++                               | LC_MEASUREMENT_MASK
++                               | LC_IDENTIFICATION_MASK;
++
++pub const MAP_ANONYMOUS: ::c_int = 0x0020;
++pub const MAP_GROWSDOWN: ::c_int = 0x0100;
++pub const MAP_DENYWRITE: ::c_int = 0x0800;
++pub const MAP_EXECUTABLE: ::c_int = 0x01000;
++pub const MAP_LOCKED: ::c_int = 0x02000;
++pub const MAP_NORESERVE: ::c_int = 0x04000;
++pub const MAP_POPULATE: ::c_int = 0x08000;
++pub const MAP_NONBLOCK: ::c_int = 0x010000;
++pub const MAP_STACK: ::c_int = 0x020000;
++
++pub const EDEADLOCK: ::c_int = 35;
++pub const ENAMETOOLONG: ::c_int = 36;
++pub const ENOLCK: ::c_int = 37;
++pub const ENOTEMPTY: ::c_int = 39;
++pub const ELOOP: ::c_int = 40;
++pub const ENOMSG: ::c_int = 42;
++pub const EIDRM: ::c_int = 43;
++pub const ECHRNG: ::c_int = 44;
++pub const EL2NSYNC: ::c_int = 45;
++pub const EL3HLT: ::c_int = 46;
++pub const EL3RST: ::c_int = 47;
++pub const ELNRNG: ::c_int = 48;
++pub const EUNATCH: ::c_int = 49;
++pub const ENOCSI: ::c_int = 50;
++pub const EL2HLT: ::c_int = 51;
++pub const EBADE: ::c_int = 52;
++pub const EBADR: ::c_int = 53;
++pub const EXFULL: ::c_int = 54;
++pub const ENOANO: ::c_int = 55;
++pub const EBADRQC: ::c_int = 56;
++pub const EBADSLT: ::c_int = 57;
++pub const EMULTIHOP: ::c_int = 72;
++pub const EOVERFLOW: ::c_int = 75;
++pub const ENOTUNIQ: ::c_int = 76;
++pub const EBADFD: ::c_int = 77;
++pub const EBADMSG: ::c_int = 74;
++pub const EREMCHG: ::c_int = 78;
++pub const ELIBACC: ::c_int = 79;
++pub const ELIBBAD: ::c_int = 80;
++pub const ELIBSCN: ::c_int = 81;
++pub const ELIBMAX: ::c_int = 82;
++pub const ELIBEXEC: ::c_int = 83;
++pub const EILSEQ: ::c_int = 84;
++pub const ERESTART: ::c_int = 85;
++pub const ESTRPIPE: ::c_int = 86;
++pub const EUSERS: ::c_int = 87;
++pub const ENOTSOCK: ::c_int = 88;
++pub const EDESTADDRREQ: ::c_int = 89;
++pub const EMSGSIZE: ::c_int = 90;
++pub const EPROTOTYPE: ::c_int = 91;
++pub const ENOPROTOOPT: ::c_int = 92;
++pub const EPROTONOSUPPORT: ::c_int = 93;
++pub const ESOCKTNOSUPPORT: ::c_int = 94;
++pub const EOPNOTSUPP: ::c_int = 95;
++pub const ENOTSUP: ::c_int = EOPNOTSUPP;
++pub const EPFNOSUPPORT: ::c_int = 96;
++pub const EAFNOSUPPORT: ::c_int = 97;
++pub const ENETDOWN: ::c_int = 100;
++pub const ENETUNREACH: ::c_int = 101;
++pub const ENETRESET: ::c_int = 102;
++pub const ENOBUFS: ::c_int = 105;
++pub const EISCONN: ::c_int = 106;
++pub const ESHUTDOWN: ::c_int = 108;
++pub const ETOOMANYREFS: ::c_int = 109;
++pub const EHOSTDOWN: ::c_int = 112;
++pub const EHOSTUNREACH: ::c_int = 113;
++pub const EALREADY: ::c_int = 114;
++pub const EINPROGRESS: ::c_int = 115;
++pub const ESTALE: ::c_int = 116;
++pub const EUCLEAN: ::c_int = 117;
++pub const ENOTNAM: ::c_int = 118;
++pub const ENAVAIL: ::c_int = 119;
++pub const EISNAM: ::c_int = 120;
++pub const EREMOTEIO: ::c_int = 121;
++pub const EDQUOT: ::c_int = 122;
++pub const ENOMEDIUM: ::c_int = 123;
++pub const EMEDIUMTYPE: ::c_int = 124;
++pub const ECANCELED: ::c_int = 125;
++pub const ENOKEY: ::c_int = 126;
++pub const EKEYEXPIRED: ::c_int = 127;
++pub const EKEYREVOKED: ::c_int = 128;
++pub const EKEYREJECTED: ::c_int = 129;
++pub const EOWNERDEAD: ::c_int = 130;
++pub const ENOTRECOVERABLE: ::c_int = 131;
++pub const EHWPOISON: ::c_int = 133;
++pub const ERFKILL: ::c_int = 132;
++
++pub const SOCK_SEQPACKET: ::c_int = 5;
++
++pub const SO_TYPE: ::c_int = 3;
++pub const SO_DONTROUTE: ::c_int = 5;
++pub const SO_SNDBUF: ::c_int = 7;
++pub const SO_RCVBUF: ::c_int = 8;
++pub const SO_KEEPALIVE: ::c_int = 9;
++pub const SO_OOBINLINE: ::c_int = 10;
++pub const SO_PRIORITY: ::c_int = 12;
++pub const SO_LINGER: ::c_int = 13;
++pub const SO_BSDCOMPAT: ::c_int = 14;
++pub const SO_REUSEPORT: ::c_int = 15;
++pub const SO_PASSCRED: ::c_int = 16;
++pub const SO_PEERCRED: ::c_int = 17;
++pub const SO_RCVLOWAT: ::c_int = 18;
++pub const SO_SNDLOWAT: ::c_int = 19;
++pub const SO_ACCEPTCONN: ::c_int = 30;
++pub const SO_SNDBUFFORCE: ::c_int = 32;
++
++pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
++pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
++pub const TCP_THIN_DUPACK: ::c_int = 17;
++pub const TCP_USER_TIMEOUT: ::c_int = 18;
++pub const TCP_REPAIR: ::c_int = 19;
++pub const TCP_REPAIR_QUEUE: ::c_int = 20;
++pub const TCP_QUEUE_SEQ: ::c_int = 21;
++pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
++pub const TCP_FASTOPEN: ::c_int = 23;
++pub const TCP_TIMESTAMP: ::c_int = 24;
++
++pub const SIGCHLD: ::c_int = 17;
++pub const SIGUSR1: ::c_int = 10;
++pub const SIGUSR2: ::c_int = 12;
++pub const SIGCONT: ::c_int = 18;
++pub const SIGSTOP: ::c_int = 19;
++pub const SIGTSTP: ::c_int = 20;
++pub const SIGURG: ::c_int = 23;
++pub const SIGIO: ::c_int = 29;
++pub const SIGSYS: ::c_int = 31;
++pub const SIGSTKFLT: ::c_int = 16;
++pub const SIGUNUSED: ::c_int = 31;
++pub const SIGTTIN: ::c_int = 21;
++pub const SIGTTOU: ::c_int = 22;
++pub const SIGXCPU: ::c_int = 24;
++pub const SIGXFSZ: ::c_int = 25;
++pub const SIGVTALRM: ::c_int = 26;
++pub const SIGPROF: ::c_int = 27;
++pub const SIGWINCH: ::c_int = 28;
++pub const SIGPOLL: ::c_int = 29;
++pub const SIGPWR: ::c_int = 30;
++pub const SIG_BLOCK: ::c_int = 0x000000;
++pub const SIG_UNBLOCK: ::c_int = 0x01;
++
++pub const BUFSIZ: ::c_uint = 8192;
++pub const TMP_MAX: ::c_uint = 238328;
++pub const FOPEN_MAX: ::c_uint = 16;
++pub const POSIX_MADV_DONTNEED: ::c_int = 4;
++pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
++pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
++pub const _SC_PII: ::c_int = 53;
++pub const _SC_PII_XTI: ::c_int = 54;
++pub const _SC_PII_SOCKET: ::c_int = 55;
++pub const _SC_PII_INTERNET: ::c_int = 56;
++pub const _SC_PII_OSI: ::c_int = 57;
++pub const _SC_POLL: ::c_int = 58;
++pub const _SC_SELECT: ::c_int = 59;
++pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
++pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
++pub const _SC_PII_OSI_COTS: ::c_int = 63;
++pub const _SC_PII_OSI_CLTS: ::c_int = 64;
++pub const _SC_PII_OSI_M: ::c_int = 65;
++pub const _SC_T_IOV_MAX: ::c_int = 66;
++pub const _SC_2_C_VERSION: ::c_int = 96;
++pub const _SC_CHAR_BIT: ::c_int = 101;
++pub const _SC_CHAR_MAX: ::c_int = 102;
++pub const _SC_CHAR_MIN: ::c_int = 103;
++pub const _SC_INT_MAX: ::c_int = 104;
++pub const _SC_INT_MIN: ::c_int = 105;
++pub const _SC_LONG_BIT: ::c_int = 106;
++pub const _SC_WORD_BIT: ::c_int = 107;
++pub const _SC_MB_LEN_MAX: ::c_int = 108;
++pub const _SC_SSIZE_MAX: ::c_int = 110;
++pub const _SC_SCHAR_MAX: ::c_int = 111;
++pub const _SC_SCHAR_MIN: ::c_int = 112;
++pub const _SC_SHRT_MAX: ::c_int = 113;
++pub const _SC_SHRT_MIN: ::c_int = 114;
++pub const _SC_UCHAR_MAX: ::c_int = 115;
++pub const _SC_UINT_MAX: ::c_int = 116;
++pub const _SC_ULONG_MAX: ::c_int = 117;
++pub const _SC_USHRT_MAX: ::c_int = 118;
++pub const _SC_NL_ARGMAX: ::c_int = 119;
++pub const _SC_NL_LANGMAX: ::c_int = 120;
++pub const _SC_NL_MSGMAX: ::c_int = 121;
++pub const _SC_NL_NMAX: ::c_int = 122;
++pub const _SC_NL_SETMAX: ::c_int = 123;
++pub const _SC_NL_TEXTMAX: ::c_int = 124;
++pub const _SC_BASE: ::c_int = 134;
++pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
++pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
++pub const _SC_DEVICE_IO: ::c_int = 140;
++pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
++pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
++pub const _SC_FD_MGMT: ::c_int = 143;
++pub const _SC_FIFO: ::c_int = 144;
++pub const _SC_PIPE: ::c_int = 145;
++pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
++pub const _SC_FILE_LOCKING: ::c_int = 147;
++pub const _SC_FILE_SYSTEM: ::c_int = 148;
++pub const _SC_MULTI_PROCESS: ::c_int = 150;
++pub const _SC_SINGLE_PROCESS: ::c_int = 151;
++pub const _SC_NETWORKING: ::c_int = 152;
++pub const _SC_REGEX_VERSION: ::c_int = 156;
++pub const _SC_SIGNALS: ::c_int = 158;
++pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
++pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
++pub const _SC_USER_GROUPS: ::c_int = 166;
++pub const _SC_USER_GROUPS_R: ::c_int = 167;
++pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
++pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
++pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
++pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
++pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
++pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
++pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
++pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
++pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
++pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
++pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
++pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
++pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
++pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
++pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
++pub const O_ASYNC: ::c_int = 0x2000;
++pub const O_NDELAY: ::c_int = 0x800;
++pub const ST_RELATIME: ::c_ulong = 4096;
++pub const NI_MAXHOST: ::socklen_t = 1025;
++
++pub const ADFS_SUPER_MAGIC: ::c_int = 0x0000adf5;
++pub const AFFS_SUPER_MAGIC: ::c_int = 0x0000adff;
++pub const CODA_SUPER_MAGIC: ::c_int = 0x73757245;
++pub const CRAMFS_MAGIC: ::c_int = 0x28cd3d45;
++pub const EFS_SUPER_MAGIC: ::c_int = 0x00414a53;
++pub const EXT2_SUPER_MAGIC: ::c_int = 0x0000ef53;
++pub const EXT3_SUPER_MAGIC: ::c_int = 0x0000ef53;
++pub const EXT4_SUPER_MAGIC: ::c_int = 0x0000ef53;
++pub const HPFS_SUPER_MAGIC: ::c_int = 0xf995e849;
++pub const HUGETLBFS_MAGIC: ::c_int = 0x958458f6;
++pub const ISOFS_SUPER_MAGIC: ::c_int = 0x00009660;
++pub const JFFS2_SUPER_MAGIC: ::c_int = 0x000072b6;
++pub const MINIX_SUPER_MAGIC: ::c_int = 0x0000137f;
++pub const MINIX_SUPER_MAGIC2: ::c_int = 0x0000138f;
++pub const MINIX2_SUPER_MAGIC: ::c_int = 0x00002468;
++pub const MINIX2_SUPER_MAGIC2: ::c_int = 0x00002478;
++pub const MSDOS_SUPER_MAGIC: ::c_int = 0x00004d44;
++pub const NCP_SUPER_MAGIC: ::c_int = 0x0000564c;
++pub const NFS_SUPER_MAGIC: ::c_int = 0x00006969;
++pub const OPENPROM_SUPER_MAGIC: ::c_int = 0x00009fa1;
++pub const PROC_SUPER_MAGIC: ::c_int = 0x00009fa0;
++pub const QNX4_SUPER_MAGIC: ::c_int = 0x0000002f;
++pub const REISERFS_SUPER_MAGIC: ::c_int = 0x52654973;
++pub const SMB_SUPER_MAGIC: ::c_int = 0x0000517b;
++pub const TMPFS_MAGIC: ::c_int = 0x01021994;
++pub const USBDEVICE_SUPER_MAGIC: ::c_int = 0x00009fa2;
++
++pub const VEOF: usize = 4;
++pub const VEOL: usize = 11;
++pub const VEOL2: usize = 16;
++pub const VMIN: usize = 6;
++pub const IEXTEN: ::tcflag_t = 0x00008000;
++pub const TOSTOP: ::tcflag_t = 0x00000100;
++pub const FLUSHO: ::tcflag_t = 0x00001000;
++
++pub const CPU_SETSIZE: ::c_int = 0x400;
++
++pub const EXTPROC: ::tcflag_t = 0x00010000;
++
++pub const QFMT_VFS_V1: ::c_int = 4;
++
++pub const PTRACE_TRACEME: ::c_uint = 0;
++pub const PTRACE_PEEKTEXT: ::c_uint = 1;
++pub const PTRACE_PEEKDATA: ::c_uint = 2;
++pub const PTRACE_PEEKUSER: ::c_uint = 3;
++pub const PTRACE_POKETEXT: ::c_uint = 4;
++pub const PTRACE_POKEDATA: ::c_uint = 5;
++pub const PTRACE_POKEUSER: ::c_uint = 6;
++pub const PTRACE_CONT: ::c_uint = 7;
++pub const PTRACE_KILL: ::c_uint = 8;
++pub const PTRACE_SINGLESTEP: ::c_uint = 9;
++pub const PTRACE_GETREGS: ::c_uint = 12;
++pub const PTRACE_SETREGS: ::c_uint = 13;
++pub const PTRACE_GETFPREGS: ::c_uint = 14;
++pub const PTRACE_SETFPREGS: ::c_uint = 15;
++pub const PTRACE_ATTACH: ::c_uint = 16;
++pub const PTRACE_DETACH: ::c_uint = 17;
++pub const PTRACE_SYSCALL: ::c_uint = 24;
++pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
++pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
++pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
++pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
++pub const PTRACE_GETREGSET: ::c_uint = 0x4204;
++pub const PTRACE_SETREGSET: ::c_uint = 0x4205;
++pub const PTRACE_SEIZE: ::c_uint = 0x4206;
++pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
++pub const PTRACE_LISTEN: ::c_uint = 0x4208;
++pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
++
++pub const MADV_DODUMP: ::c_int = 17;
++pub const MADV_DONTDUMP: ::c_int = 16;
++
++pub const EPOLLWAKEUP: ::c_int = 0x20000000;
++
++pub const MADV_HUGEPAGE: ::c_int = 14;
++pub const MADV_NOHUGEPAGE: ::c_int = 15;
++pub const MAP_HUGETLB: ::c_int = 0x040000;
++
++pub const EFD_NONBLOCK: ::c_int = 0x800;
++
++pub const F_GETLK: ::c_int = 5;
++pub const F_GETOWN: ::c_int = 9;
++pub const F_SETOWN: ::c_int = 8;
++pub const F_SETLK: ::c_int = 6;
++pub const F_SETLKW: ::c_int = 7;
++
++pub const SEEK_DATA: ::c_int = 3;
++pub const SEEK_HOLE: ::c_int = 4;
++
++pub const SFD_NONBLOCK: ::c_int = 0x0800;
++
++pub const TCSANOW: ::c_int = 0;
++pub const TCSADRAIN: ::c_int = 1;
++pub const TCSAFLUSH: ::c_int = 2;
++
++pub const TCGETS: ::c_ulong = 0x5401;
++pub const TCSETS: ::c_ulong = 0x5402;
++pub const TCSETSW: ::c_ulong = 0x5403;
++pub const TCSETSF: ::c_ulong = 0x5404;
++pub const TCGETA: ::c_ulong = 0x5405;
++pub const TCSETA: ::c_ulong = 0x5406;
++pub const TCSETAW: ::c_ulong = 0x5407;
++pub const TCSETAF: ::c_ulong = 0x5408;
++pub const TCSBRK: ::c_ulong = 0x5409;
++pub const TCXONC: ::c_ulong = 0x540A;
++pub const TCFLSH: ::c_ulong = 0x540B;
++pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
++pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
++pub const TIOCINQ: ::c_ulong = 0x541B;
++pub const TIOCLINUX: ::c_ulong = 0x541C;
++pub const TIOCGSERIAL: ::c_ulong = 0x541E;
++pub const TIOCEXCL: ::c_ulong = 0x540C;
++pub const TIOCNXCL: ::c_ulong = 0x540D;
++pub const TIOCSCTTY: ::c_ulong = 0x540E;
++pub const TIOCGPGRP: ::c_ulong = 0x540F;
++pub const TIOCSPGRP: ::c_ulong = 0x5410;
++pub const TIOCOUTQ: ::c_ulong = 0x5411;
++pub const TIOCSTI: ::c_ulong = 0x5412;
++pub const TIOCGWINSZ: ::c_ulong = 0x5413;
++pub const TIOCSWINSZ: ::c_ulong = 0x5414;
++pub const TIOCMGET: ::c_ulong = 0x5415;
++pub const TIOCMBIS: ::c_ulong = 0x5416;
++pub const TIOCMBIC: ::c_ulong = 0x5417;
++pub const TIOCMSET: ::c_ulong = 0x5418;
++pub const FIONREAD: ::c_ulong = 0x541B;
++pub const TIOCCONS: ::c_ulong = 0x541D;
++
++pub const RTLD_DEEPBIND: ::c_int = 0x8;
++pub const RTLD_GLOBAL: ::c_int = 0x100;
++pub const RTLD_NOLOAD: ::c_int = 0x4;
++
++pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
++pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
++pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
++pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
++pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
++
++pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
++pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
++pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
++pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
++pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
++pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
++pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
++pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
++
++pub const SYS_gettid: ::c_long = 236;
++pub const SYS_perf_event_open: ::c_long = 331;
++
++pub const VTIME: usize = 5;
++pub const VSWTC: usize = 7;
++pub const VSTART: usize = 8;
++pub const VSTOP: usize = 9;
++pub const VSUSP: usize = 10;
++pub const VREPRINT: usize = 12;
++pub const VDISCARD: usize = 13;
++pub const VWERASE: usize = 14;
++pub const OLCUC: ::tcflag_t = 0o000002;
++pub const ONLCR: ::tcflag_t = 0o000004;
++pub const NLDLY: ::tcflag_t = 0o000400;
++pub const CRDLY: ::tcflag_t = 0o003000;
++pub const CR1: ::tcflag_t  = 0x00000200;
++pub const CR2: ::tcflag_t  = 0x00000400;
++pub const CR3: ::tcflag_t  = 0x00000600;
++pub const TABDLY: ::tcflag_t = 0o014000;
++pub const TAB1: ::tcflag_t = 0x00000800;
++pub const TAB2: ::tcflag_t = 0x00001000;
++pub const TAB3: ::tcflag_t = 0x00001800;
++pub const BSDLY:  ::tcflag_t = 0o020000;
++pub const BS1: ::tcflag_t  = 0x00002000;
++pub const FFDLY:  ::tcflag_t = 0o100000;
++pub const FF1: ::tcflag_t  = 0x00008000;
++pub const VTDLY:  ::tcflag_t = 0o040000;
++pub const VT1: ::tcflag_t  = 0x00004000;
++pub const XTABS:  ::tcflag_t = 0o014000;
++
++pub const TIOCM_LE: ::c_int = 0x001;
++pub const TIOCM_DTR: ::c_int = 0x002;
++pub const TIOCM_RTS: ::c_int = 0x004;
++pub const TIOCM_ST: ::c_int = 0x008;
++pub const TIOCM_SR: ::c_int = 0x010;
++pub const TIOCM_CTS: ::c_int = 0x020;
++pub const TIOCM_CAR: ::c_int = 0x040;
++pub const TIOCM_RNG: ::c_int = 0x080;
++pub const TIOCM_DSR: ::c_int = 0x100;
++pub const TIOCM_CD: ::c_int = TIOCM_CAR;
++pub const TIOCM_RI: ::c_int = TIOCM_RNG;
++
++pub const SIGEV_THREAD_ID: ::c_int = 4;
++
++pub const CBAUD: ::speed_t = 0o010017;
++pub const B0: ::speed_t = 0o000000;
++pub const B50: ::speed_t = 0o000001;
++pub const B75: ::speed_t = 0o000002;
++pub const B110: ::speed_t = 0o000003;
++pub const B134: ::speed_t = 0o000004;
++pub const B150: ::speed_t = 0o000005;
++pub const B200: ::speed_t = 0o000006;
++pub const B300: ::speed_t = 0o000007;
++pub const B600: ::speed_t = 0o000010;
++pub const B1200: ::speed_t = 0o000011;
++pub const B1800: ::speed_t = 0o000012;
++pub const B2400: ::speed_t = 0o000013;
++pub const B4800: ::speed_t = 0o000014;
++pub const B9600: ::speed_t = 0o000015;
++pub const B19200: ::speed_t = 0o000016;
++pub const B38400: ::speed_t = 0o000017;
++pub const EXTA: ::speed_t = B19200;
++pub const EXTB: ::speed_t = B38400;
++pub const CSIZE: ::tcflag_t = 0o000060;
++pub const CS6: ::tcflag_t = 0o000020;
++pub const CS7: ::tcflag_t = 0o000040;
++pub const CS8: ::tcflag_t = 0o000060;
++pub const CSTOPB: ::tcflag_t = 0o000100;
++pub const CREAD: ::tcflag_t = 0o000200;
++pub const PARENB: ::tcflag_t = 0o000400;
++pub const PARODD: ::tcflag_t = 0o001000;
++pub const HUPCL: ::tcflag_t = 0o002000;
++pub const CLOCAL: ::tcflag_t = 0o004000;
++pub const CBAUDEX: ::tcflag_t = 0o010000;
++pub const B57600: ::speed_t = 0o010001;
++pub const B115200: ::speed_t = 0o010002;
++pub const B230400: ::speed_t = 0o010003;
++pub const B460800: ::speed_t = 0o010004;
++pub const B500000: ::speed_t = 0o010005;
++pub const B576000: ::speed_t = 0o010006;
++pub const B921600: ::speed_t = 0o010007;
++pub const B1000000: ::speed_t = 0o010010;
++pub const B1152000: ::speed_t = 0o010011;
++pub const B1500000: ::speed_t = 0o010012;
++pub const B2000000: ::speed_t = 0o010013;
++pub const B2500000: ::speed_t = 0o010014;
++pub const B3000000: ::speed_t = 0o010015;
++pub const B3500000: ::speed_t = 0o010016;
++pub const B4000000: ::speed_t = 0o010017;
++pub const CIBAUD: ::tcflag_t = 0o02003600000;
++
++pub const ISIG: ::tcflag_t = 0o000001;
++pub const ICANON: ::tcflag_t = 0o000002;
++pub const XCASE: ::tcflag_t = 0o000004;
++pub const ECHOE: ::tcflag_t = 0o000020;
++pub const ECHOK: ::tcflag_t = 0o000040;
++pub const ECHONL: ::tcflag_t = 0o000100;
++pub const NOFLSH: ::tcflag_t = 0o000200;
++pub const ECHOCTL: ::tcflag_t = 0o001000;
++pub const ECHOPRT: ::tcflag_t = 0o002000;
++pub const ECHOKE: ::tcflag_t = 0o004000;
++pub const PENDIN: ::tcflag_t = 0o040000;
++
++pub const POLLWRNORM: ::c_short = 0x004;
++pub const POLLWRBAND: ::c_short = 0x100;
++
++pub const IXON: ::tcflag_t = 0o002000;
++pub const IXOFF: ::tcflag_t = 0o010000;
++
++#[link(name = "util")]
++extern {
++    pub fn sysctl(name: *mut ::c_int,
++                  namelen: ::c_int,
++                  oldp: *mut ::c_void,
++                  oldlenp: *mut ::size_t,
++                  newp: *mut ::c_void,
++                  newlen: ::size_t)
++                  -> ::c_int;
++    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
++    pub fn backtrace(buf: *mut *mut ::c_void,
++                     sz: ::c_int) -> ::c_int;
++    pub fn glob64(pattern: *const ::c_char,
++                  flags: ::c_int,
++                  errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
++                                                   errno: ::c_int)
++                                                   -> ::c_int>,
++                  pglob: *mut glob64_t) -> ::c_int;
++    pub fn globfree64(pglob: *mut glob64_t);
++    pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
++    pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
++                                       cpusetsize: ::size_t,
++                                       cpuset: *mut ::cpu_set_t) -> ::c_int;
++    pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
++                                       cpusetsize: ::size_t,
++                                       cpuset: *const ::cpu_set_t) -> ::c_int;
++    pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
++    pub fn setpriority(which: ::__priority_which_t, who: ::id_t,
++                                       prio: ::c_int) -> ::c_int;
++    pub fn pthread_getaffinity_np(thread: ::pthread_t,
++                                  cpusetsize: ::size_t,
++                                  cpuset: *mut ::cpu_set_t) -> ::c_int;
++    pub fn pthread_setaffinity_np(thread: ::pthread_t,
++                                  cpusetsize: ::size_t,
++                                  cpuset: *const ::cpu_set_t) -> ::c_int;
++    pub fn sched_getcpu() -> ::c_int;
++    pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
++    pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
++    pub fn makecontext(ucp: *mut ucontext_t,
++                       func:  extern fn (),
++                       argc: ::c_int, ...);
++    pub fn swapcontext(uocp: *mut ucontext_t,
++                       ucp: *const ucontext_t) -> ::c_int;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c684f1e5bf74d4e795bed6cef9e5c0fb8c352569
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1055 @@@
++use dox::mem;
++
++pub type sa_family_t = u16;
++pub type pthread_key_t = ::c_uint;
++pub type speed_t = ::c_uint;
++pub type tcflag_t = ::c_uint;
++pub type loff_t = ::c_longlong;
++pub type clockid_t = ::c_int;
++pub type key_t = ::c_int;
++pub type id_t = ::c_uint;
++
++pub enum timezone {}
++
++s! {
++    pub struct sockaddr {
++        pub sa_family: sa_family_t,
++        pub sa_data: [::c_char; 14],
++    }
++
++    pub struct sockaddr_in {
++        pub sin_family: sa_family_t,
++        pub sin_port: ::in_port_t,
++        pub sin_addr: ::in_addr,
++        pub sin_zero: [u8; 8],
++    }
++
++    pub struct sockaddr_in6 {
++        pub sin6_family: sa_family_t,
++        pub sin6_port: ::in_port_t,
++        pub sin6_flowinfo: u32,
++        pub sin6_addr: ::in6_addr,
++        pub sin6_scope_id: u32,
++    }
++
++    pub struct sockaddr_un {
++        pub sun_family: sa_family_t,
++        pub sun_path: [::c_char; 108]
++    }
++
++    pub struct sockaddr_storage {
++        pub ss_family: sa_family_t,
++        __ss_align: ::size_t,
++        #[cfg(target_pointer_width = "32")]
++        __ss_pad2: [u8; 128 - 2 * 4],
++        #[cfg(target_pointer_width = "64")]
++        __ss_pad2: [u8; 128 - 2 * 8],
++    }
++
++    pub struct addrinfo {
++        pub ai_flags: ::c_int,
++        pub ai_family: ::c_int,
++        pub ai_socktype: ::c_int,
++        pub ai_protocol: ::c_int,
++        pub ai_addrlen: socklen_t,
++
++        #[cfg(any(target_os = "linux",
++                  target_os = "emscripten",
++                  target_os = "fuchsia"))]
++        pub ai_addr: *mut ::sockaddr,
++
++        pub ai_canonname: *mut c_char,
++
++        #[cfg(target_os = "android")]
++        pub ai_addr: *mut ::sockaddr,
++
++        pub ai_next: *mut addrinfo,
++    }
++
++    pub struct sockaddr_nl {
++        pub nl_family: ::sa_family_t,
++        nl_pad: ::c_ushort,
++        pub nl_pid: u32,
++        pub nl_groups: u32
++    }
++
++    pub struct sockaddr_ll {
++        pub sll_family: ::c_ushort,
++        pub sll_protocol: ::c_ushort,
++        pub sll_ifindex: ::c_int,
++        pub sll_hatype: ::c_ushort,
++        pub sll_pkttype: ::c_uchar,
++        pub sll_halen: ::c_uchar,
++        pub sll_addr: [::c_uchar; 8]
++    }
++
++    pub struct fd_set {
++        fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE],
++    }
++
++    pub struct tm {
++        pub tm_sec: ::c_int,
++        pub tm_min: ::c_int,
++        pub tm_hour: ::c_int,
++        pub tm_mday: ::c_int,
++        pub tm_mon: ::c_int,
++        pub tm_year: ::c_int,
++        pub tm_wday: ::c_int,
++        pub tm_yday: ::c_int,
++        pub tm_isdst: ::c_int,
++        pub tm_gmtoff: ::c_long,
++        pub tm_zone: *const ::c_char,
++    }
++
++    pub struct sched_param {
++        pub sched_priority: ::c_int,
++        #[cfg(any(target_env = "musl"))]
++        pub sched_ss_low_priority: ::c_int,
++        #[cfg(any(target_env = "musl"))]
++        pub sched_ss_repl_period: ::timespec,
++        #[cfg(any(target_env = "musl"))]
++        pub sched_ss_init_budget: ::timespec,
++        #[cfg(any(target_env = "musl"))]
++        pub sched_ss_max_repl: ::c_int,
++    }
++
++    pub struct Dl_info {
++        pub dli_fname: *const ::c_char,
++        pub dli_fbase: *mut ::c_void,
++        pub dli_sname: *const ::c_char,
++        pub dli_saddr: *mut ::c_void,
++    }
++
++    #[cfg_attr(any(all(target_arch = "x86",
++                       not(target_env = "musl"),
++                       not(target_os = "android")),
++                   target_arch = "x86_64"),
++               repr(packed))]
++    pub struct epoll_event {
++        pub events: ::uint32_t,
++        pub u64: ::uint64_t,
++    }
++
++    pub struct utsname {
++        pub sysname: [::c_char; 65],
++        pub nodename: [::c_char; 65],
++        pub release: [::c_char; 65],
++        pub version: [::c_char; 65],
++        pub machine: [::c_char; 65],
++        pub domainname: [::c_char; 65]
++    }
++
++    pub struct lconv {
++        pub decimal_point: *mut ::c_char,
++        pub thousands_sep: *mut ::c_char,
++        pub grouping: *mut ::c_char,
++        pub int_curr_symbol: *mut ::c_char,
++        pub currency_symbol: *mut ::c_char,
++        pub mon_decimal_point: *mut ::c_char,
++        pub mon_thousands_sep: *mut ::c_char,
++        pub mon_grouping: *mut ::c_char,
++        pub positive_sign: *mut ::c_char,
++        pub negative_sign: *mut ::c_char,
++        pub int_frac_digits: ::c_char,
++        pub frac_digits: ::c_char,
++        pub p_cs_precedes: ::c_char,
++        pub p_sep_by_space: ::c_char,
++        pub n_cs_precedes: ::c_char,
++        pub n_sep_by_space: ::c_char,
++        pub p_sign_posn: ::c_char,
++        pub n_sign_posn: ::c_char,
++        pub int_p_cs_precedes: ::c_char,
++        pub int_p_sep_by_space: ::c_char,
++        pub int_n_cs_precedes: ::c_char,
++        pub int_n_sep_by_space: ::c_char,
++        pub int_p_sign_posn: ::c_char,
++        pub int_n_sign_posn: ::c_char,
++    }
++
++    pub struct sigevent {
++        pub sigev_value: ::sigval,
++        pub sigev_signo: ::c_int,
++        pub sigev_notify: ::c_int,
++        // Actually a union.  We only expose sigev_notify_thread_id because it's
++        // the most useful member
++        pub sigev_notify_thread_id: ::c_int,
++        #[cfg(target_pointer_width = "64")]
++        __unused1: [::c_int; 11],
++        #[cfg(target_pointer_width = "32")]
++        __unused1: [::c_int; 12]
++    }
++}
++
++// intentionally not public, only used for fd_set
++cfg_if! {
++    if #[cfg(target_pointer_width = "32")] {
++        const ULONG_SIZE: usize = 32;
++    } else if #[cfg(target_pointer_width = "64")] {
++        const ULONG_SIZE: usize = 64;
++    } else {
++        // Unknown target_pointer_width
++    }
++}
++
++pub const EXIT_FAILURE: ::c_int = 1;
++pub const EXIT_SUCCESS: ::c_int = 0;
++pub const RAND_MAX: ::c_int = 2147483647;
++pub const EOF: ::c_int = -1;
++pub const SEEK_SET: ::c_int = 0;
++pub const SEEK_CUR: ::c_int = 1;
++pub const SEEK_END: ::c_int = 2;
++pub const _IOFBF: ::c_int = 0;
++pub const _IONBF: ::c_int = 2;
++pub const _IOLBF: ::c_int = 1;
++
++pub const F_DUPFD: ::c_int = 0;
++pub const F_GETFD: ::c_int = 1;
++pub const F_SETFD: ::c_int = 2;
++pub const F_GETFL: ::c_int = 3;
++pub const F_SETFL: ::c_int = 4;
++
++// Linux-specific fcntls
++pub const F_SETLEASE: ::c_int = 1024;
++pub const F_GETLEASE: ::c_int = 1025;
++pub const F_NOTIFY: ::c_int = 1026;
++pub const F_DUPFD_CLOEXEC: ::c_int = 1030;
++pub const F_SETPIPE_SZ: ::c_int = 1031;
++pub const F_GETPIPE_SZ: ::c_int = 1032;
++
++// TODO(#235): Include file sealing fcntls once we have a way to verify them.
++
++pub const SIGTRAP: ::c_int = 5;
++
++pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
++pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
++
++pub const CLOCK_REALTIME: clockid_t = 0;
++pub const CLOCK_MONOTONIC: clockid_t = 1;
++pub const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 2;
++pub const CLOCK_THREAD_CPUTIME_ID: clockid_t = 3;
++pub const CLOCK_MONOTONIC_RAW: clockid_t = 4;
++pub const CLOCK_REALTIME_COARSE: clockid_t = 5;
++pub const CLOCK_MONOTONIC_COARSE: clockid_t = 6;
++pub const CLOCK_BOOTTIME: clockid_t = 7;
++pub const CLOCK_REALTIME_ALARM: clockid_t = 8;
++pub const CLOCK_BOOTTIME_ALARM: clockid_t = 9;
++// TODO(#247) Someday our Travis shall have glibc 2.21 (released in Sep
++// 2014.) See also musl/mod.rs
++// pub const CLOCK_SGI_CYCLE: clockid_t = 10;
++// pub const CLOCK_TAI: clockid_t = 11;
++pub const TIMER_ABSTIME: ::c_int = 1;
++
++pub const RLIMIT_CPU: ::c_int = 0;
++pub const RLIMIT_FSIZE: ::c_int = 1;
++pub const RLIMIT_DATA: ::c_int = 2;
++pub const RLIMIT_STACK: ::c_int = 3;
++pub const RLIMIT_CORE: ::c_int = 4;
++pub const RLIMIT_LOCKS: ::c_int = 10;
++pub const RLIMIT_SIGPENDING: ::c_int = 11;
++pub const RLIMIT_MSGQUEUE: ::c_int = 12;
++pub const RLIMIT_NICE: ::c_int = 13;
++pub const RLIMIT_RTPRIO: ::c_int = 14;
++
++pub const RUSAGE_SELF: ::c_int = 0;
++
++pub const O_RDONLY: ::c_int = 0;
++pub const O_WRONLY: ::c_int = 1;
++pub const O_RDWR: ::c_int = 2;
++pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
++
++pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC;
++
++pub const S_IFIFO: ::mode_t = 4096;
++pub const S_IFCHR: ::mode_t = 8192;
++pub const S_IFBLK: ::mode_t = 24576;
++pub const S_IFDIR: ::mode_t = 16384;
++pub const S_IFREG: ::mode_t = 32768;
++pub const S_IFLNK: ::mode_t = 40960;
++pub const S_IFSOCK: ::mode_t = 49152;
++pub const S_IFMT: ::mode_t = 61440;
++pub const S_IRWXU: ::mode_t = 448;
++pub const S_IXUSR: ::mode_t = 64;
++pub const S_IWUSR: ::mode_t = 128;
++pub const S_IRUSR: ::mode_t = 256;
++pub const S_IRWXG: ::mode_t = 56;
++pub const S_IXGRP: ::mode_t = 8;
++pub const S_IWGRP: ::mode_t = 16;
++pub const S_IRGRP: ::mode_t = 32;
++pub const S_IRWXO: ::mode_t = 7;
++pub const S_IXOTH: ::mode_t = 1;
++pub const S_IWOTH: ::mode_t = 2;
++pub const S_IROTH: ::mode_t = 4;
++pub const F_OK: ::c_int = 0;
++pub const R_OK: ::c_int = 4;
++pub const W_OK: ::c_int = 2;
++pub const X_OK: ::c_int = 1;
++pub const STDIN_FILENO: ::c_int = 0;
++pub const STDOUT_FILENO: ::c_int = 1;
++pub const STDERR_FILENO: ::c_int = 2;
++pub const SIGHUP: ::c_int = 1;
++pub const SIGINT: ::c_int = 2;
++pub const SIGQUIT: ::c_int = 3;
++pub const SIGILL: ::c_int = 4;
++pub const SIGABRT: ::c_int = 6;
++pub const SIGFPE: ::c_int = 8;
++pub const SIGKILL: ::c_int = 9;
++pub const SIGSEGV: ::c_int = 11;
++pub const SIGPIPE: ::c_int = 13;
++pub const SIGALRM: ::c_int = 14;
++pub const SIGTERM: ::c_int = 15;
++
++pub const PROT_NONE: ::c_int = 0;
++pub const PROT_READ: ::c_int = 1;
++pub const PROT_WRITE: ::c_int = 2;
++pub const PROT_EXEC: ::c_int = 4;
++
++pub const LC_CTYPE: ::c_int = 0;
++pub const LC_NUMERIC: ::c_int = 1;
++pub const LC_TIME: ::c_int = 2;
++pub const LC_COLLATE: ::c_int = 3;
++pub const LC_MONETARY: ::c_int = 4;
++pub const LC_MESSAGES: ::c_int = 5;
++pub const LC_ALL: ::c_int = 6;
++pub const LC_CTYPE_MASK: ::c_int = (1 << LC_CTYPE);
++pub const LC_NUMERIC_MASK: ::c_int = (1 << LC_NUMERIC);
++pub const LC_TIME_MASK: ::c_int = (1 << LC_TIME);
++pub const LC_COLLATE_MASK: ::c_int = (1 << LC_COLLATE);
++pub const LC_MONETARY_MASK: ::c_int = (1 << LC_MONETARY);
++pub const LC_MESSAGES_MASK: ::c_int = (1 << LC_MESSAGES);
++// LC_ALL_MASK defined per platform
++
++pub const MAP_FILE: ::c_int = 0x0000;
++pub const MAP_SHARED: ::c_int = 0x0001;
++pub const MAP_PRIVATE: ::c_int = 0x0002;
++pub const MAP_FIXED: ::c_int = 0x0010;
++
++pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
++
++// MS_ flags for msync(2)
++pub const MS_ASYNC: ::c_int = 0x0001;
++pub const MS_INVALIDATE: ::c_int = 0x0002;
++pub const MS_SYNC: ::c_int = 0x0004;
++
++// MS_ flags for mount(2)
++pub const MS_RDONLY: ::c_ulong = 0x01;
++pub const MS_NOSUID: ::c_ulong = 0x02;
++pub const MS_NODEV: ::c_ulong = 0x04;
++pub const MS_NOEXEC: ::c_ulong = 0x08;
++pub const MS_SYNCHRONOUS: ::c_ulong = 0x10;
++pub const MS_REMOUNT: ::c_ulong = 0x20;
++pub const MS_MANDLOCK: ::c_ulong = 0x40;
++pub const MS_DIRSYNC: ::c_ulong = 0x80;
++pub const MS_NOATIME: ::c_ulong = 0x0400;
++pub const MS_NODIRATIME: ::c_ulong = 0x0800;
++pub const MS_BIND: ::c_ulong = 0x1000;
++pub const MS_MOVE: ::c_ulong = 0x2000;
++pub const MS_REC: ::c_ulong = 0x4000;
++pub const MS_SILENT: ::c_ulong = 0x8000;
++pub const MS_POSIXACL: ::c_ulong = 0x010000;
++pub const MS_UNBINDABLE: ::c_ulong = 0x020000;
++pub const MS_PRIVATE: ::c_ulong = 0x040000;
++pub const MS_SLAVE: ::c_ulong = 0x080000;
++pub const MS_SHARED: ::c_ulong = 0x100000;
++pub const MS_RELATIME: ::c_ulong = 0x200000;
++pub const MS_KERNMOUNT: ::c_ulong = 0x400000;
++pub const MS_I_VERSION: ::c_ulong = 0x800000;
++pub const MS_STRICTATIME: ::c_ulong = 0x1000000;
++pub const MS_ACTIVE: ::c_ulong = 0x40000000;
++pub const MS_NOUSER: ::c_ulong = 0x80000000;
++pub const MS_MGC_VAL: ::c_ulong = 0xc0ed0000;
++pub const MS_MGC_MSK: ::c_ulong = 0xffff0000;
++pub const MS_RMT_MASK: ::c_ulong = 0x800051;
++
++pub const EPERM: ::c_int = 1;
++pub const ENOENT: ::c_int = 2;
++pub const ESRCH: ::c_int = 3;
++pub const EINTR: ::c_int = 4;
++pub const EIO: ::c_int = 5;
++pub const ENXIO: ::c_int = 6;
++pub const E2BIG: ::c_int = 7;
++pub const ENOEXEC: ::c_int = 8;
++pub const EBADF: ::c_int = 9;
++pub const ECHILD: ::c_int = 10;
++pub const EAGAIN: ::c_int = 11;
++pub const ENOMEM: ::c_int = 12;
++pub const EACCES: ::c_int = 13;
++pub const EFAULT: ::c_int = 14;
++pub const ENOTBLK: ::c_int = 15;
++pub const EBUSY: ::c_int = 16;
++pub const EEXIST: ::c_int = 17;
++pub const EXDEV: ::c_int = 18;
++pub const ENODEV: ::c_int = 19;
++pub const ENOTDIR: ::c_int = 20;
++pub const EISDIR: ::c_int = 21;
++pub const EINVAL: ::c_int = 22;
++pub const ENFILE: ::c_int = 23;
++pub const EMFILE: ::c_int = 24;
++pub const ENOTTY: ::c_int = 25;
++pub const ETXTBSY: ::c_int = 26;
++pub const EFBIG: ::c_int = 27;
++pub const ENOSPC: ::c_int = 28;
++pub const ESPIPE: ::c_int = 29;
++pub const EROFS: ::c_int = 30;
++pub const EMLINK: ::c_int = 31;
++pub const EPIPE: ::c_int = 32;
++pub const EDOM: ::c_int = 33;
++pub const ERANGE: ::c_int = 34;
++pub const EWOULDBLOCK: ::c_int = EAGAIN;
++
++pub const SCM_RIGHTS: ::c_int = 0x01;
++pub const SCM_CREDENTIALS: ::c_int = 0x02;
++
++pub const IPPROTO_RAW: ::c_int = 255;
++
++pub const PROT_GROWSDOWN: ::c_int = 0x1000000;
++pub const PROT_GROWSUP: ::c_int = 0x2000000;
++
++pub const MAP_TYPE: ::c_int = 0x000f;
++
++pub const MADV_NORMAL: ::c_int = 0;
++pub const MADV_RANDOM: ::c_int = 1;
++pub const MADV_SEQUENTIAL: ::c_int = 2;
++pub const MADV_WILLNEED: ::c_int = 3;
++pub const MADV_DONTNEED: ::c_int = 4;
++pub const MADV_REMOVE: ::c_int = 9;
++pub const MADV_DONTFORK: ::c_int = 10;
++pub const MADV_DOFORK: ::c_int = 11;
++pub const MADV_MERGEABLE: ::c_int = 12;
++pub const MADV_UNMERGEABLE: ::c_int = 13;
++pub const MADV_HWPOISON: ::c_int = 100;
++
++pub const IFF_UP: ::c_int = 0x1;
++pub const IFF_BROADCAST: ::c_int = 0x2;
++pub const IFF_DEBUG: ::c_int = 0x4;
++pub const IFF_LOOPBACK: ::c_int = 0x8;
++pub const IFF_POINTOPOINT: ::c_int = 0x10;
++pub const IFF_NOTRAILERS: ::c_int = 0x20;
++pub const IFF_RUNNING: ::c_int = 0x40;
++pub const IFF_NOARP: ::c_int = 0x80;
++pub const IFF_PROMISC: ::c_int = 0x100;
++pub const IFF_ALLMULTI: ::c_int = 0x200;
++pub const IFF_MASTER: ::c_int = 0x400;
++pub const IFF_SLAVE: ::c_int = 0x800;
++pub const IFF_MULTICAST: ::c_int = 0x1000;
++pub const IFF_PORTSEL: ::c_int = 0x2000;
++pub const IFF_AUTOMEDIA: ::c_int = 0x4000;
++pub const IFF_DYNAMIC: ::c_int = 0x8000;
++
++pub const SOL_IP: ::c_int = 0;
++pub const SOL_TCP: ::c_int = 6;
++pub const SOL_UDP: ::c_int = 17;
++pub const SOL_IPV6: ::c_int = 41;
++pub const SOL_ICMPV6: ::c_int = 58;
++pub const SOL_RAW: ::c_int = 255;
++pub const SOL_DECNET: ::c_int = 261;
++pub const SOL_X25: ::c_int = 262;
++pub const SOL_PACKET: ::c_int = 263;
++pub const SOL_ATM: ::c_int = 264;
++pub const SOL_AAL: ::c_int = 265;
++pub const SOL_IRDA: ::c_int = 266;
++pub const SOL_NETBEUI: ::c_int = 267;
++pub const SOL_LLC: ::c_int = 268;
++pub const SOL_DCCP: ::c_int = 269;
++pub const SOL_NETLINK: ::c_int = 270;
++pub const SOL_TIPC: ::c_int = 271;
++
++pub const AF_UNSPEC: ::c_int = 0;
++pub const AF_UNIX: ::c_int = 1;
++pub const AF_LOCAL: ::c_int = 1;
++pub const AF_INET: ::c_int = 2;
++pub const AF_AX25: ::c_int = 3;
++pub const AF_IPX: ::c_int = 4;
++pub const AF_APPLETALK: ::c_int = 5;
++pub const AF_NETROM: ::c_int = 6;
++pub const AF_BRIDGE: ::c_int = 7;
++pub const AF_ATMPVC: ::c_int = 8;
++pub const AF_X25: ::c_int = 9;
++pub const AF_INET6: ::c_int = 10;
++pub const AF_ROSE: ::c_int = 11;
++pub const AF_DECnet: ::c_int = 12;
++pub const AF_NETBEUI: ::c_int = 13;
++pub const AF_SECURITY: ::c_int = 14;
++pub const AF_KEY: ::c_int = 15;
++pub const AF_NETLINK: ::c_int = 16;
++pub const AF_ROUTE: ::c_int = AF_NETLINK;
++pub const AF_PACKET: ::c_int = 17;
++pub const AF_ASH: ::c_int = 18;
++pub const AF_ECONET: ::c_int = 19;
++pub const AF_ATMSVC: ::c_int = 20;
++pub const AF_RDS: ::c_int = 21;
++pub const AF_SNA: ::c_int = 22;
++pub const AF_IRDA: ::c_int = 23;
++pub const AF_PPPOX: ::c_int = 24;
++pub const AF_WANPIPE: ::c_int = 25;
++pub const AF_LLC: ::c_int = 26;
++pub const AF_CAN: ::c_int = 29;
++pub const AF_TIPC: ::c_int = 30;
++pub const AF_BLUETOOTH: ::c_int = 31;
++pub const AF_IUCV: ::c_int = 32;
++pub const AF_RXRPC: ::c_int = 33;
++pub const AF_ISDN: ::c_int = 34;
++pub const AF_PHONET: ::c_int = 35;
++pub const AF_IEEE802154: ::c_int = 36;
++pub const AF_CAIF: ::c_int = 37;
++pub const AF_ALG: ::c_int = 38;
++
++pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
++pub const PF_UNIX: ::c_int = AF_UNIX;
++pub const PF_LOCAL: ::c_int = AF_LOCAL;
++pub const PF_INET: ::c_int = AF_INET;
++pub const PF_AX25: ::c_int = AF_AX25;
++pub const PF_IPX: ::c_int = AF_IPX;
++pub const PF_APPLETALK: ::c_int = AF_APPLETALK;
++pub const PF_NETROM: ::c_int = AF_NETROM;
++pub const PF_BRIDGE: ::c_int = AF_BRIDGE;
++pub const PF_ATMPVC: ::c_int = AF_ATMPVC;
++pub const PF_X25: ::c_int = AF_X25;
++pub const PF_INET6: ::c_int = AF_INET6;
++pub const PF_ROSE: ::c_int = AF_ROSE;
++pub const PF_DECnet: ::c_int = AF_DECnet;
++pub const PF_NETBEUI: ::c_int = AF_NETBEUI;
++pub const PF_SECURITY: ::c_int = AF_SECURITY;
++pub const PF_KEY: ::c_int = AF_KEY;
++pub const PF_NETLINK: ::c_int = AF_NETLINK;
++pub const PF_ROUTE: ::c_int = AF_ROUTE;
++pub const PF_PACKET: ::c_int = AF_PACKET;
++pub const PF_ASH: ::c_int = AF_ASH;
++pub const PF_ECONET: ::c_int = AF_ECONET;
++pub const PF_ATMSVC: ::c_int = AF_ATMSVC;
++pub const PF_RDS: ::c_int = AF_RDS;
++pub const PF_SNA: ::c_int = AF_SNA;
++pub const PF_IRDA: ::c_int = AF_IRDA;
++pub const PF_PPPOX: ::c_int = AF_PPPOX;
++pub const PF_WANPIPE: ::c_int = AF_WANPIPE;
++pub const PF_LLC: ::c_int = AF_LLC;
++pub const PF_CAN: ::c_int = AF_CAN;
++pub const PF_TIPC: ::c_int = AF_TIPC;
++pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
++pub const PF_IUCV: ::c_int = AF_IUCV;
++pub const PF_RXRPC: ::c_int = AF_RXRPC;
++pub const PF_ISDN: ::c_int = AF_ISDN;
++pub const PF_PHONET: ::c_int = AF_PHONET;
++pub const PF_IEEE802154: ::c_int = AF_IEEE802154;
++pub const PF_CAIF: ::c_int = AF_CAIF;
++pub const PF_ALG: ::c_int = AF_ALG;
++
++pub const SOMAXCONN: ::c_int = 128;
++
++pub const MSG_OOB: ::c_int = 1;
++pub const MSG_PEEK: ::c_int = 2;
++pub const MSG_DONTROUTE: ::c_int = 4;
++pub const MSG_CTRUNC: ::c_int = 8;
++pub const MSG_TRUNC: ::c_int = 0x20;
++pub const MSG_DONTWAIT: ::c_int = 0x40;
++pub const MSG_EOR: ::c_int = 0x80;
++pub const MSG_WAITALL: ::c_int = 0x100;
++pub const MSG_FIN: ::c_int = 0x200;
++pub const MSG_SYN: ::c_int = 0x400;
++pub const MSG_CONFIRM: ::c_int = 0x800;
++pub const MSG_RST: ::c_int = 0x1000;
++pub const MSG_ERRQUEUE: ::c_int = 0x2000;
++pub const MSG_NOSIGNAL: ::c_int = 0x4000;
++pub const MSG_MORE: ::c_int = 0x8000;
++pub const MSG_WAITFORONE: ::c_int = 0x10000;
++pub const MSG_FASTOPEN: ::c_int = 0x20000000;
++pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000;
++
++pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
++
++pub const SOCK_RAW: ::c_int = 3;
++pub const SOCK_RDM: ::c_int = 4;
++pub const IP_MULTICAST_IF: ::c_int = 32;
++pub const IP_MULTICAST_TTL: ::c_int = 33;
++pub const IP_MULTICAST_LOOP: ::c_int = 34;
++pub const IP_TTL: ::c_int = 2;
++pub const IP_HDRINCL: ::c_int = 3;
++pub const IP_ADD_MEMBERSHIP: ::c_int = 35;
++pub const IP_DROP_MEMBERSHIP: ::c_int = 36;
++pub const IP_TRANSPARENT: ::c_int = 19;
++pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20;
++pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21;
++
++pub const TCP_NODELAY: ::c_int = 1;
++pub const TCP_MAXSEG: ::c_int = 2;
++pub const TCP_CORK: ::c_int = 3;
++pub const TCP_KEEPIDLE: ::c_int = 4;
++pub const TCP_KEEPINTVL: ::c_int = 5;
++pub const TCP_KEEPCNT: ::c_int = 6;
++pub const TCP_SYNCNT: ::c_int = 7;
++pub const TCP_LINGER2: ::c_int = 8;
++pub const TCP_DEFER_ACCEPT: ::c_int = 9;
++pub const TCP_WINDOW_CLAMP: ::c_int = 10;
++pub const TCP_INFO: ::c_int = 11;
++pub const TCP_QUICKACK: ::c_int = 12;
++pub const TCP_CONGESTION: ::c_int = 13;
++
++pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
++pub const IPV6_V6ONLY: ::c_int = 26;
++
++pub const SO_DEBUG: ::c_int = 1;
++pub const SO_ORIGINAL_DST: ::c_int = 80;
++
++pub const SHUT_RD: ::c_int = 0;
++pub const SHUT_WR: ::c_int = 1;
++pub const SHUT_RDWR: ::c_int = 2;
++
++pub const LOCK_SH: ::c_int = 1;
++pub const LOCK_EX: ::c_int = 2;
++pub const LOCK_NB: ::c_int = 4;
++pub const LOCK_UN: ::c_int = 8;
++
++pub const SS_ONSTACK: ::c_int = 1;
++pub const SS_DISABLE: ::c_int = 2;
++
++pub const PATH_MAX: ::c_int = 4096;
++
++pub const FD_SETSIZE: usize = 1024;
++
++pub const EPOLLIN: ::c_int = 0x1;
++pub const EPOLLPRI: ::c_int = 0x2;
++pub const EPOLLOUT: ::c_int = 0x4;
++pub const EPOLLRDNORM: ::c_int = 0x40;
++pub const EPOLLRDBAND: ::c_int = 0x80;
++pub const EPOLLWRNORM: ::c_int = 0x100;
++pub const EPOLLWRBAND: ::c_int = 0x200;
++pub const EPOLLMSG: ::c_int = 0x400;
++pub const EPOLLERR: ::c_int = 0x8;
++pub const EPOLLHUP: ::c_int = 0x10;
++pub const EPOLLET: ::c_int = 0x80000000;
++
++pub const EPOLL_CTL_ADD: ::c_int = 1;
++pub const EPOLL_CTL_MOD: ::c_int = 3;
++pub const EPOLL_CTL_DEL: ::c_int = 2;
++
++pub const MNT_DETACH: ::c_int = 0x2;
++pub const MNT_EXPIRE: ::c_int = 0x4;
++
++pub const Q_GETFMT: ::c_int = 0x800004;
++pub const Q_GETINFO: ::c_int = 0x800005;
++pub const Q_SETINFO: ::c_int = 0x800006;
++pub const QIF_BLIMITS: ::uint32_t = 1;
++pub const QIF_SPACE: ::uint32_t = 2;
++pub const QIF_ILIMITS: ::uint32_t = 4;
++pub const QIF_INODES: ::uint32_t = 8;
++pub const QIF_BTIME: ::uint32_t = 16;
++pub const QIF_ITIME: ::uint32_t = 32;
++pub const QIF_LIMITS: ::uint32_t = 5;
++pub const QIF_USAGE: ::uint32_t = 10;
++pub const QIF_TIMES: ::uint32_t = 48;
++pub const QIF_ALL: ::uint32_t = 63;
++
++pub const MNT_FORCE: ::c_int = 0x1;
++
++pub const Q_SYNC: ::c_int = 0x800001;
++pub const Q_QUOTAON: ::c_int = 0x800002;
++pub const Q_QUOTAOFF: ::c_int = 0x800003;
++pub const Q_GETQUOTA: ::c_int = 0x800007;
++pub const Q_SETQUOTA: ::c_int = 0x800008;
++
++pub const TCIOFF: ::c_int = 2;
++pub const TCION: ::c_int = 3;
++pub const TCOOFF: ::c_int = 0;
++pub const TCOON: ::c_int = 1;
++pub const TCIFLUSH: ::c_int = 0;
++pub const TCOFLUSH: ::c_int = 1;
++pub const TCIOFLUSH: ::c_int = 2;
++pub const NL0: ::c_int  = 0x00000000;
++pub const NL1: ::c_int  = 0x00000100;
++pub const TAB0: ::c_int = 0x00000000;
++pub const CR0: ::c_int  = 0x00000000;
++pub const FF0: ::c_int  = 0x00000000;
++pub const BS0: ::c_int  = 0x00000000;
++pub const VT0: ::c_int  = 0x00000000;
++pub const VERASE: usize = 2;
++pub const VKILL: usize = 3;
++pub const VINTR: usize = 0;
++pub const VQUIT: usize = 1;
++pub const VLNEXT: usize = 15;
++pub const IGNBRK: ::tcflag_t = 0x00000001;
++pub const BRKINT: ::tcflag_t = 0x00000002;
++pub const IGNPAR: ::tcflag_t = 0x00000004;
++pub const PARMRK: ::tcflag_t = 0x00000008;
++pub const INPCK: ::tcflag_t = 0x00000010;
++pub const ISTRIP: ::tcflag_t = 0x00000020;
++pub const INLCR: ::tcflag_t = 0x00000040;
++pub const IGNCR: ::tcflag_t = 0x00000080;
++pub const ICRNL: ::tcflag_t = 0x00000100;
++pub const IXANY: ::tcflag_t = 0x00000800;
++pub const IMAXBEL: ::tcflag_t = 0x00002000;
++pub const IUTF8: ::tcflag_t = 0x00004000;
++pub const OPOST: ::tcflag_t = 0x1;
++pub const CS5: ::tcflag_t = 0x00000000;
++pub const CMSPAR: ::tcflag_t = 0o10000000000;
++pub const CRTSCTS: ::tcflag_t = 0x80000000;
++pub const ECHO: ::tcflag_t = 0x00000008;
++pub const OCRNL:  ::tcflag_t = 0o000010;
++pub const ONOCR:  ::tcflag_t = 0o000020;
++pub const ONLRET: ::tcflag_t = 0o000040;
++pub const OFILL:  ::tcflag_t = 0o000100;
++pub const OFDEL:  ::tcflag_t = 0o000200;
++
++pub const CLONE_VM: ::c_int = 0x100;
++pub const CLONE_FS: ::c_int = 0x200;
++pub const CLONE_FILES: ::c_int = 0x400;
++pub const CLONE_SIGHAND: ::c_int = 0x800;
++pub const CLONE_PTRACE: ::c_int = 0x2000;
++pub const CLONE_VFORK: ::c_int = 0x4000;
++pub const CLONE_PARENT: ::c_int = 0x8000;
++pub const CLONE_THREAD: ::c_int = 0x10000;
++pub const CLONE_NEWNS: ::c_int = 0x20000;
++pub const CLONE_SYSVSEM: ::c_int = 0x40000;
++pub const CLONE_SETTLS: ::c_int = 0x80000;
++pub const CLONE_PARENT_SETTID: ::c_int = 0x100000;
++pub const CLONE_CHILD_CLEARTID: ::c_int = 0x200000;
++pub const CLONE_DETACHED: ::c_int = 0x400000;
++pub const CLONE_UNTRACED: ::c_int = 0x800000;
++pub const CLONE_CHILD_SETTID: ::c_int = 0x01000000;
++pub const CLONE_NEWUTS: ::c_int = 0x04000000;
++pub const CLONE_NEWIPC: ::c_int = 0x08000000;
++pub const CLONE_NEWUSER: ::c_int = 0x10000000;
++pub const CLONE_NEWPID: ::c_int = 0x20000000;
++pub const CLONE_NEWNET: ::c_int = 0x40000000;
++pub const CLONE_IO: ::c_int = 0x80000000;
++pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
++
++pub const WNOHANG: ::c_int = 0x00000001;
++pub const WUNTRACED: ::c_int = 0x00000002;
++pub const WSTOPPED: ::c_int = WUNTRACED;
++pub const WEXITED: ::c_int = 0x00000004;
++pub const WCONTINUED: ::c_int = 0x00000008;
++pub const WNOWAIT: ::c_int = 0x01000000;
++
++pub const __WNOTHREAD: ::c_int = 0x20000000;
++pub const __WALL: ::c_int = 0x40000000;
++pub const __WCLONE: ::c_int = 0x80000000;
++
++pub const SPLICE_F_MOVE: ::c_uint = 0x01;
++pub const SPLICE_F_NONBLOCK: ::c_uint = 0x02;
++pub const SPLICE_F_MORE: ::c_uint = 0x04;
++pub const SPLICE_F_GIFT: ::c_uint = 0x08;
++
++pub const RTLD_LOCAL: ::c_int = 0;
++
++pub const POSIX_FADV_NORMAL: ::c_int = 0;
++pub const POSIX_FADV_RANDOM: ::c_int = 1;
++pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2;
++pub const POSIX_FADV_WILLNEED: ::c_int = 3;
++
++pub const AT_FDCWD: ::c_int = -100;
++pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x100;
++pub const AT_REMOVEDIR: ::c_int = 0x200;
++pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
++pub const AT_NO_AUTOMOUNT: ::c_int = 0x800;
++pub const AT_EMPTY_PATH: ::c_int = 0x1000;
++
++pub const LOG_CRON: ::c_int = 9 << 3;
++pub const LOG_AUTHPRIV: ::c_int = 10 << 3;
++pub const LOG_FTP: ::c_int = 11 << 3;
++pub const LOG_PERROR: ::c_int = 0x20;
++
++pub const PIPE_BUF: usize = 4096;
++
++pub const SI_LOAD_SHIFT: ::c_uint = 16;
++
++pub const SIGEV_SIGNAL: ::c_int = 0;
++pub const SIGEV_NONE: ::c_int = 1;
++pub const SIGEV_THREAD: ::c_int = 2;
++
++pub const P_ALL: idtype_t = 0;
++pub const P_PID: idtype_t = 1;
++pub const P_PGID: idtype_t = 2;
++
++pub const UTIME_OMIT: c_long = 1073741822;
++pub const UTIME_NOW: c_long = 1073741823;
++
++pub const POLLRDNORM: ::c_short = 0x040;
++pub const POLLRDBAND: ::c_short = 0x080;
++
++f! {
++    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
++        let fd = fd as usize;
++        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        (*set).fds_bits[fd / size] &= !(1 << (fd % size));
++        return
++    }
++
++    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
++        let fd = fd as usize;
++        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0
++    }
++
++    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
++        let fd = fd as usize;
++        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        (*set).fds_bits[fd / size] |= 1 << (fd % size);
++        return
++    }
++
++    pub fn FD_ZERO(set: *mut fd_set) -> () {
++        for slot in (*set).fds_bits.iter_mut() {
++            *slot = 0;
++        }
++    }
++
++    pub fn WIFSTOPPED(status: ::c_int) -> bool {
++        (status & 0xff) == 0x7f
++    }
++
++    pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
++        (status >> 8) & 0xff
++    }
++
++    pub fn WIFCONTINUED(status: ::c_int) -> bool {
++        status == 0xffff
++    }
++
++    pub fn WIFSIGNALED(status: ::c_int) -> bool {
++        ((status & 0x7f) + 1) as i8 >= 2
++    }
++
++    pub fn WTERMSIG(status: ::c_int) -> ::c_int {
++        status & 0x7f
++    }
++
++    pub fn WIFEXITED(status: ::c_int) -> bool {
++        (status & 0x7f) == 0
++    }
++
++    pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
++        (status >> 8) & 0xff
++    }
++
++    pub fn WCOREDUMP(status: ::c_int) -> bool {
++        (status & 0x80) != 0
++    }
++}
++
++extern {
++    pub fn getpwnam_r(name: *const ::c_char,
++                      pwd: *mut passwd,
++                      buf: *mut ::c_char,
++                      buflen: ::size_t,
++                      result: *mut *mut passwd) -> ::c_int;
++    pub fn getpwuid_r(uid: ::uid_t,
++                      pwd: *mut passwd,
++                      buf: *mut ::c_char,
++                      buflen: ::size_t,
++                      result: *mut *mut passwd) -> ::c_int;
++    pub fn fdatasync(fd: ::c_int) -> ::c_int;
++    pub fn mincore(addr: *mut ::c_void, len: ::size_t,
++                   vec: *mut ::c_uchar) -> ::c_int;
++    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
++    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
++    pub fn clock_nanosleep(clk_id: clockid_t,
++                           flags: ::c_int,
++                           rqtp: *const ::timespec,
++                           rmtp:  *mut ::timespec) -> ::c_int;
++    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
++    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
++    pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
++
++    pub fn prctl(option: ::c_int, ...) -> ::c_int;
++    pub fn pthread_getattr_np(native: ::pthread_t,
++                              attr: *mut ::pthread_attr_t) -> ::c_int;
++    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
++                                     guardsize: *mut ::size_t) -> ::c_int;
++    pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
++                                 stackaddr: *mut *mut ::c_void,
++                                 stacksize: *mut ::size_t) -> ::c_int;
++    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
++    pub fn setgroups(ngroups: ::size_t,
++                     ptr: *const ::gid_t) -> ::c_int;
++    pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int;
++    pub fn sched_setscheduler(pid: ::pid_t,
++                              policy: ::c_int,
++                              param: *const sched_param) -> ::c_int;
++    pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
++    pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
++    pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int;
++    pub fn sched_setparam(pid: ::pid_t, param: *const sched_param) -> ::c_int;
++    pub fn sched_getparam(pid: ::pid_t, param: *mut sched_param) -> ::c_int;
++    pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int;
++    pub fn epoll_create(size: ::c_int) -> ::c_int;
++    pub fn epoll_create1(flags: ::c_int) -> ::c_int;
++    pub fn epoll_ctl(epfd: ::c_int,
++                     op: ::c_int,
++                     fd: ::c_int,
++                     event: *mut epoll_event) -> ::c_int;
++    pub fn epoll_wait(epfd: ::c_int,
++                      events: *mut epoll_event,
++                      maxevents: ::c_int,
++                      timeout: ::c_int) -> ::c_int;
++    pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
++    pub fn mount(src: *const ::c_char,
++                 target: *const ::c_char,
++                 fstype: *const ::c_char,
++                 flags: ::c_ulong,
++                 data: *const ::c_void) -> ::c_int;
++    pub fn umount(target: *const ::c_char) -> ::c_int;
++    pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int;
++    pub fn clone(cb: extern fn(*mut ::c_void) -> ::c_int,
++                 child_stack: *mut ::c_void,
++                 flags: ::c_int,
++                 arg: *mut ::c_void, ...) -> ::c_int;
++    pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
++    pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
++    pub fn memrchr(cx: *const ::c_void,
++                   c: ::c_int,
++                   n: ::size_t) -> *mut ::c_void;
++    pub fn syscall(num: ::c_long, ...) -> ::c_long;
++    pub fn sendfile(out_fd: ::c_int,
++                    in_fd: ::c_int,
++                    offset: *mut off_t,
++                    count: ::size_t) -> ::ssize_t;
++    pub fn splice(fd_in: ::c_int,
++                  off_in: *mut ::loff_t,
++                  fd_out: ::c_int,
++                  off_out: *mut ::loff_t,
++                  len: ::size_t,
++                  flags: ::c_uint) -> ::ssize_t;
++    pub fn tee(fd_in: ::c_int,
++               fd_out: ::c_int,
++               len: ::size_t,
++               flags: ::c_uint) -> ::ssize_t;
++    pub fn vmsplice(fd: ::c_int,
++                    iov: *const ::iovec,
++                    nr_segs: ::size_t,
++                    flags: ::c_uint) -> ::ssize_t;
++
++    pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t,
++                         advise: ::c_int) -> ::c_int;
++    pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
++    pub fn utimensat(dirfd: ::c_int, path: *const ::c_char,
++                     times: *const ::timespec, flag: ::c_int) -> ::c_int;
++    pub fn duplocale(base: ::locale_t) -> ::locale_t;
++    pub fn freelocale(loc: ::locale_t);
++    pub fn newlocale(mask: ::c_int,
++                     locale: *const ::c_char,
++                     base: ::locale_t) -> ::locale_t;
++    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
++    pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int;
++    pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int;
++    pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int;
++    pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int;
++    pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t;
++    pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
++    pub fn mmap64(addr: *mut ::c_void,
++                  len: ::size_t,
++                  prot: ::c_int,
++                  flags: ::c_int,
++                  fd: ::c_int,
++                  offset: off64_t)
++                  -> *mut ::c_void;
++    pub fn open64(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
++    pub fn openat64(fd: ::c_int,
++                    path: *const c_char,
++                    oflag: ::c_int, ...) -> ::c_int;
++    pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t,
++                   offset: off64_t) -> ::ssize_t;
++    pub fn pwrite64(fd: ::c_int, buf: *const ::c_void, count: ::size_t,
++                    offset: off64_t) -> ::ssize_t;
++    pub fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64;
++    pub fn readdir64_r(dirp: *mut ::DIR, entry: *mut ::dirent64,
++                       result: *mut *mut ::dirent64) -> ::c_int;
++    pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int;
++    pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
++    pub fn truncate64(path: *const c_char, length: off64_t) -> ::c_int;
++    pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
++    pub fn sysinfo (info: *mut ::sysinfo) -> ::c_int;
++
++    pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
++
++    pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
++                   mode: ::mode_t, dev: dev_t) -> ::c_int;
++    pub fn ppoll(fds: *mut ::pollfd,
++                 nfds: nfds_t,
++                 timeout: *const ::timespec,
++                 sigmask: *const sigset_t) -> ::c_int;
++    pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
++                                     clock_id: *mut clockid_t) -> ::c_int;
++    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
++                                     clock_id: clockid_t) -> ::c_int;
++    pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
++                                       pshared: ::c_int) -> ::c_int;
++    pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
++                                       pshared: *mut ::c_int) -> ::c_int;
++    pub fn pthread_getschedparam(native: ::pthread_t,
++                                 policy: *mut ::c_int,
++                                 param: *mut ::sched_param) -> ::c_int;
++    pub fn pthread_setschedparam(native: ::pthread_t,
++                                 policy: ::c_int,
++                                 param: *const ::sched_param) -> ::c_int;
++    pub fn sched_getaffinity(pid: ::pid_t,
++                             cpusetsize: ::size_t,
++                             cpuset: *mut cpu_set_t) -> ::c_int;
++    pub fn sched_setaffinity(pid: ::pid_t,
++                             cpusetsize: ::size_t,
++                             cpuset: *const cpu_set_t) -> ::c_int;
++    pub fn unshare(flags: ::c_int) -> ::c_int;
++    pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int;
++    pub fn sem_timedwait(sem: *mut sem_t,
++                         abstime: *const ::timespec) -> ::c_int;
++    pub fn accept4(fd: ::c_int, addr: *mut ::sockaddr, len: *mut ::socklen_t,
++                   flg: ::c_int) -> ::c_int;
++    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
++                                   abstime: *const ::timespec) -> ::c_int;
++    pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
++                                        pshared: ::c_int) -> ::c_int;
++    pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
++                                        pshared: *mut ::c_int) -> ::c_int;
++    pub fn pthread_rwlockattr_getpshared(attr: *const pthread_rwlockattr_t,
++                                         val: *mut ::c_int) -> ::c_int;
++    pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t,
++                                         val: ::c_int) -> ::c_int;
++    pub fn ptsname_r(fd: ::c_int,
++                     buf: *mut ::c_char,
++                     buflen: ::size_t) -> ::c_int;
++    pub fn clearenv() -> ::c_int;
++    pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
++                  options: ::c_int) -> ::c_int;
++    pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int;
++    pub fn setreuid(ruid: ::uid_t, euid: ::uid_t) -> ::c_int;
++    pub fn setregid(rgid: ::gid_t, egid: ::gid_t) -> ::c_int;
++    pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t,
++                     suid: *mut ::uid_t) -> ::c_int;
++    pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t,
++                     sgid: *mut ::gid_t) -> ::c_int;
++    pub fn personality(persona: ::c_ulong) -> ::c_int;
++    pub fn swapon(path: *const ::c_char, swapflags: ::c_int) -> ::c_int;
++    pub fn swapoff(puath: *const ::c_char) -> ::c_int;
++    pub fn acct(filename: *const ::c_char) -> ::c_int;
++    pub fn brk(addr: *mut ::c_void) -> ::c_int;
++    pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void;
++    pub fn vfork() -> ::pid_t;
++    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
++    pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
++    pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
++    pub fn wait4(pid: ::pid_t, status: *mut ::c_int, options: ::c_int,
++                 rusage: *mut ::rusage) -> ::pid_t;
++    pub fn openpty(amaster: *mut ::c_int,
++                aslave: *mut ::c_int,
++                name: *mut ::c_char,
++                termp: *const termios,
++                winp: *const ::winsize) -> ::c_int;
++    pub fn forkpty(amaster: *mut ::c_int,
++                name: *mut ::c_char,
++                termp: *const termios,
++                winp: *const ::winsize) -> ::pid_t;
++    pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char,
++                   envp: *const *const ::c_char) -> ::c_int;
++}
++
++cfg_if! {
++    if #[cfg(any(target_os = "linux",
++                 target_os = "emscripten",
++                 target_os = "fuchsia"))] {
++        mod linux;
++        pub use self::linux::*;
++    } else if #[cfg(target_os = "android")] {
++        mod android;
++        pub use self::android::*;
++    } else {
++        // Unknown target_os
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..dcadcf081698c05b92770af365debef66faf9c61
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1291 @@@
++use dox::{mem, Option};
++
++pub type c_char = i8;
++pub type c_long = i64;
++pub type c_ulong = u64;
++
++pub type clockid_t = ::c_int;
++pub type blkcnt_t = ::c_long;
++pub type clock_t = ::c_long;
++pub type daddr_t = ::c_long;
++pub type dev_t = ::c_ulong;
++pub type fsblkcnt_t = ::c_ulong;
++pub type fsfilcnt_t = ::c_ulong;
++pub type ino_t = ::c_ulong;
++pub type key_t = ::c_int;
++pub type major_t = ::c_uint;
++pub type minor_t = ::c_uint;
++pub type mode_t = ::c_uint;
++pub type nlink_t = ::c_uint;
++pub type rlim_t = ::c_ulong;
++pub type speed_t = ::c_uint;
++pub type tcflag_t = ::c_uint;
++pub type time_t = ::c_long;
++pub type wchar_t = ::c_int;
++pub type nfds_t = ::c_ulong;
++
++pub type suseconds_t = ::c_long;
++pub type off_t = ::c_long;
++pub type useconds_t = ::c_uint;
++pub type socklen_t = ::c_uint;
++pub type sa_family_t = u16;
++pub type pthread_t = ::c_uint;
++pub type pthread_key_t = ::c_uint;
++pub type blksize_t = ::c_int;
++pub type fflags_t = ::c_int;
++pub type nl_item = ::c_int;
++pub type id_t = ::c_int;
++pub type idtype_t = ::c_uint;
++
++pub enum timezone {}
++
++s! {
++    pub struct sockaddr {
++        pub sa_family: sa_family_t,
++        pub sa_data: [::c_char; 14],
++    }
++
++    pub struct sockaddr_in {
++        pub sin_family: sa_family_t,
++        pub sin_port: ::in_port_t,
++        pub sin_addr: ::in_addr,
++        pub sin_zero: [::c_char; 8]
++    }
++
++    pub struct sockaddr_in6 {
++        pub sin6_family: sa_family_t,
++        pub sin6_port: ::in_port_t,
++        pub sin6_flowinfo: u32,
++        pub sin6_addr: ::in6_addr,
++        pub sin6_scope_id: u32,
++        pub __sin6_src_id: u32
++    }
++
++    pub struct sockaddr_un {
++        pub sun_family: sa_family_t,
++        pub sun_path: [c_char; 108]
++    }
++
++    pub struct passwd {
++        pub pw_name: *mut ::c_char,
++        pub pw_passwd: *mut ::c_char,
++        pub pw_uid: ::uid_t,
++        pub pw_gid: ::gid_t,
++        pub pw_age: *mut ::c_char,
++        pub pw_comment: *mut ::c_char,
++        pub pw_gecos: *mut ::c_char,
++        pub pw_dir: *mut ::c_char,
++        pub pw_shell: *mut ::c_char
++    }
++
++    pub struct ifaddrs {
++        pub ifa_next: *mut ifaddrs,
++        pub ifa_name: *mut ::c_char,
++        pub ifa_flags: ::c_ulong,
++        pub ifa_addr: *mut ::sockaddr,
++        pub ifa_netmask: *mut ::sockaddr,
++        pub ifa_dstaddr: *mut ::sockaddr,
++        pub ifa_data: *mut ::c_void
++    }
++
++    pub struct tm {
++        pub tm_sec: ::c_int,
++        pub tm_min: ::c_int,
++        pub tm_hour: ::c_int,
++        pub tm_mday: ::c_int,
++        pub tm_mon: ::c_int,
++        pub tm_year: ::c_int,
++        pub tm_wday: ::c_int,
++        pub tm_yday: ::c_int,
++        pub tm_isdst: ::c_int
++    }
++
++    pub struct utsname {
++        pub sysname: [::c_char; 257],
++        pub nodename: [::c_char; 257],
++        pub release: [::c_char; 257],
++        pub version: [::c_char; 257],
++        pub machine: [::c_char; 257],
++    }
++
++    pub struct msghdr {
++        pub msg_name: *mut ::c_void,
++        pub msg_namelen: ::socklen_t,
++        pub msg_iov: *mut ::iovec,
++        pub msg_iovlen: ::c_int,
++        pub msg_control: *mut ::c_void,
++        pub msg_controllen: ::socklen_t,
++        pub msg_flags: ::c_int,
++    }
++
++    pub struct cmsghdr {
++        pub cmsg_len: ::size_t,
++        pub cmsg_level: ::c_int,
++        pub cmsg_type: ::c_int,
++    }
++
++    pub struct fd_set {
++        #[cfg(target_pointer_width = "64")]
++        fds_bits: [i64; FD_SETSIZE / 64],
++        #[cfg(target_pointer_width = "32")]
++        fds_bits: [i32; FD_SETSIZE / 32],
++    }
++
++    pub struct pthread_attr_t {
++        __pthread_attrp: *mut ::c_void
++    }
++
++    pub struct pthread_mutex_t {
++        __pthread_mutex_flag1: u16,
++        __pthread_mutex_flag2: u8,
++        __pthread_mutex_ceiling: u8,
++        __pthread_mutex_type: u16,
++        __pthread_mutex_magic: u16,
++        __pthread_mutex_lock: u64,
++        __pthread_mutex_data: u64
++    }
++
++    pub struct pthread_mutexattr_t {
++        __pthread_mutexattrp: *mut ::c_void
++    }
++
++    pub struct pthread_cond_t {
++        __pthread_cond_flag: [u8; 4],
++        __pthread_cond_type: u16,
++        __pthread_cond_magic: u16,
++        __pthread_cond_data: u64
++    }
++
++    pub struct pthread_condattr_t {
++        __pthread_condattrp: *mut ::c_void,
++    }
++
++    pub struct pthread_rwlock_t {
++        __pthread_rwlock_readers: i32,
++        __pthread_rwlock_type: u16,
++        __pthread_rwlock_magic: u16,
++        __pthread_rwlock_mutex: ::pthread_mutex_t,
++        __pthread_rwlock_readercv: ::pthread_cond_t,
++        __pthread_rwlock_writercv: ::pthread_cond_t
++    }
++
++    pub struct pthread_rwlockattr_t {
++        __pthread_rwlockattrp: *mut ::c_void,
++    }
++
++    pub struct dirent {
++        pub d_ino: ::ino_t,
++        pub d_off: ::off_t,
++        pub d_reclen: u16,
++        pub d_name: [::c_char; 1]
++    }
++
++    pub struct glob_t {
++        pub gl_pathc: ::size_t,
++        pub gl_pathv:  *mut *mut ::c_char,
++        pub gl_offs: ::size_t,
++        __unused1: *mut ::c_void,
++        __unused2: ::c_int,
++        __unused3: ::c_int,
++        __unused4: ::c_int,
++        __unused5: *mut ::c_void,
++        __unused6: *mut ::c_void,
++        __unused7: *mut ::c_void,
++        __unused8: *mut ::c_void,
++        __unused9: *mut ::c_void,
++        __unused10: *mut ::c_void,
++    }
++
++    pub struct sockaddr_storage {
++        pub ss_family: ::sa_family_t,
++        __ss_pad1: [u8; 6],
++        __ss_align: i64,
++        __ss_pad2: [u8; 240],
++    }
++
++    pub struct addrinfo {
++        pub ai_flags: ::c_int,
++        pub ai_family: ::c_int,
++        pub ai_socktype: ::c_int,
++        pub ai_protocol: ::c_int,
++        pub ai_addrlen: ::socklen_t,
++        pub ai_canonname: *mut ::c_char,
++        pub ai_addr: *mut ::sockaddr,
++        pub ai_next: *mut addrinfo,
++    }
++
++    pub struct sigset_t {
++        bits: [u32; 4],
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_code: ::c_int,
++        pub si_errno: ::c_int,
++        pub si_pad: ::c_int,
++        pub si_addr: *mut ::c_void,
++        __pad: [u8; 232],
++    }
++
++    pub struct sigaction {
++        pub sa_flags: ::c_int,
++        pub sa_sigaction: ::sighandler_t,
++        pub sa_mask: sigset_t,
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_size: ::size_t,
++        pub ss_flags: ::c_int,
++    }
++
++    pub struct statvfs {
++        pub f_bsize: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_favail: ::fsfilcnt_t,
++        pub f_fsid: ::c_ulong,
++        pub f_basetype: [::c_char; 16],
++        pub f_flag: ::c_ulong,
++        pub f_namemax: ::c_ulong,
++        pub f_fstr: [::c_char; 32]
++    }
++
++    pub struct sched_param {
++        pub sched_priority: ::c_int,
++        sched_pad: [::c_int; 8]
++    }
++
++    pub struct Dl_info {
++        pub dli_fname: *const ::c_char,
++        pub dli_fbase: *mut ::c_void,
++        pub dli_sname: *const ::c_char,
++        pub dli_saddr: *mut ::c_void,
++    }
++
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        pub st_size: ::off_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt_t,
++        __unused: [::c_char; 16]
++    }
++
++    pub struct termios {
++        pub c_iflag: ::tcflag_t,
++        pub c_oflag: ::tcflag_t,
++        pub c_cflag: ::tcflag_t,
++        pub c_lflag: ::tcflag_t,
++        pub c_cc: [::cc_t; ::NCCS]
++    }
++
++    pub struct lconv {
++        pub decimal_point: *mut ::c_char,
++        pub thousands_sep: *mut ::c_char,
++        pub grouping: *mut ::c_char,
++        pub int_curr_symbol: *mut ::c_char,
++        pub currency_symbol: *mut ::c_char,
++        pub mon_decimal_point: *mut ::c_char,
++        pub mon_thousands_sep: *mut ::c_char,
++        pub mon_grouping: *mut ::c_char,
++        pub positive_sign: *mut ::c_char,
++        pub negative_sign: *mut ::c_char,
++        pub int_frac_digits: ::c_char,
++        pub frac_digits: ::c_char,
++        pub p_cs_precedes: ::c_char,
++        pub p_sep_by_space: ::c_char,
++        pub n_cs_precedes: ::c_char,
++        pub n_sep_by_space: ::c_char,
++        pub p_sign_posn: ::c_char,
++        pub n_sign_posn: ::c_char,
++        pub int_p_cs_precedes: ::c_char,
++        pub int_p_sep_by_space: ::c_char,
++        pub int_n_cs_precedes: ::c_char,
++        pub int_n_sep_by_space: ::c_char,
++        pub int_p_sign_posn: ::c_char,
++        pub int_n_sign_posn: ::c_char,
++    }
++
++    pub struct sem_t {
++        pub sem_count: u32,
++        pub sem_type: u16,
++        pub sem_magic: u16,
++        pub sem_pad1: [u64; 3],
++        pub sem_pad2: [u64; 2]
++    }
++
++    pub struct flock {
++        pub l_type: ::c_short,
++        pub l_whence: ::c_short,
++        pub l_start: ::off_t,
++        pub l_len: ::off_t,
++        pub l_sysid: ::c_int,
++        pub l_pid: ::pid_t,
++        pub l_pad: [::c_long; 4]
++    }
++
++    pub struct if_nameindex {
++        pub if_index: ::c_uint,
++        pub if_name: *mut ::c_char,
++    }
++
++    pub struct port_event {
++        pub portev_events: ::c_int,
++        pub portev_source: ::c_ushort,
++        pub portev_pad: ::c_ushort,
++        pub portev_object: ::uintptr_t,
++        pub portev_user: ::uintptr_t,
++    }
++}
++
++pub const LC_CTYPE: ::c_int = 0;
++pub const LC_NUMERIC: ::c_int = 1;
++pub const LC_TIME: ::c_int = 2;
++pub const LC_COLLATE: ::c_int = 3;
++pub const LC_MONETARY: ::c_int = 4;
++pub const LC_MESSAGES: ::c_int = 5;
++pub const LC_ALL: ::c_int = 6;
++pub const LC_CTYPE_MASK: ::c_int = (1 << LC_CTYPE);
++pub const LC_NUMERIC_MASK: ::c_int = (1 << LC_NUMERIC);
++pub const LC_TIME_MASK: ::c_int = (1 << LC_TIME);
++pub const LC_COLLATE_MASK: ::c_int = (1 << LC_COLLATE);
++pub const LC_MONETARY_MASK: ::c_int = (1 << LC_MONETARY);
++pub const LC_MESSAGES_MASK: ::c_int = (1 << LC_MESSAGES);
++pub const LC_ALL_MASK: ::c_int = LC_CTYPE_MASK
++                               | LC_NUMERIC_MASK
++                               | LC_TIME_MASK
++                               | LC_COLLATE_MASK
++                               | LC_MONETARY_MASK
++                               | LC_MESSAGES_MASK;
++
++pub const DAY_1: ::nl_item = 1;
++pub const DAY_2: ::nl_item = 2;
++pub const DAY_3: ::nl_item = 3;
++pub const DAY_4: ::nl_item = 4;
++pub const DAY_5: ::nl_item = 5;
++pub const DAY_6: ::nl_item = 6;
++pub const DAY_7: ::nl_item = 7;
++
++pub const ABDAY_1: ::nl_item = 8;
++pub const ABDAY_2: ::nl_item = 9;
++pub const ABDAY_3: ::nl_item = 10;
++pub const ABDAY_4: ::nl_item = 11;
++pub const ABDAY_5: ::nl_item = 12;
++pub const ABDAY_6: ::nl_item = 13;
++pub const ABDAY_7: ::nl_item = 14;
++
++pub const MON_1: ::nl_item = 15;
++pub const MON_2: ::nl_item = 16;
++pub const MON_3: ::nl_item = 17;
++pub const MON_4: ::nl_item = 18;
++pub const MON_5: ::nl_item = 19;
++pub const MON_6: ::nl_item = 20;
++pub const MON_7: ::nl_item = 21;
++pub const MON_8: ::nl_item = 22;
++pub const MON_9: ::nl_item = 23;
++pub const MON_10: ::nl_item = 24;
++pub const MON_11: ::nl_item = 25;
++pub const MON_12: ::nl_item = 26;
++
++pub const ABMON_1: ::nl_item = 27;
++pub const ABMON_2: ::nl_item = 28;
++pub const ABMON_3: ::nl_item = 29;
++pub const ABMON_4: ::nl_item = 30;
++pub const ABMON_5: ::nl_item = 31;
++pub const ABMON_6: ::nl_item = 32;
++pub const ABMON_7: ::nl_item = 33;
++pub const ABMON_8: ::nl_item = 34;
++pub const ABMON_9: ::nl_item = 35;
++pub const ABMON_10: ::nl_item = 36;
++pub const ABMON_11: ::nl_item = 37;
++pub const ABMON_12: ::nl_item = 38;
++
++pub const RADIXCHAR: ::nl_item = 39;
++pub const THOUSEP: ::nl_item = 40;
++pub const YESSTR: ::nl_item = 41;
++pub const NOSTR: ::nl_item = 42;
++pub const CRNCYSTR: ::nl_item = 43;
++
++pub const D_T_FMT: ::nl_item = 44;
++pub const D_FMT: ::nl_item = 45;
++pub const T_FMT: ::nl_item = 46;
++pub const AM_STR: ::nl_item = 47;
++pub const PM_STR: ::nl_item = 48;
++
++pub const CODESET: ::nl_item = 49;
++pub const T_FMT_AMPM: ::nl_item = 50;
++pub const ERA: ::nl_item = 51;
++pub const ERA_D_FMT: ::nl_item = 52;
++pub const ERA_D_T_FMT: ::nl_item = 53;
++pub const ERA_T_FMT: ::nl_item = 54;
++pub const ALT_DIGITS: ::nl_item = 55;
++pub const YESEXPR: ::nl_item = 56;
++pub const NOEXPR: ::nl_item = 57;
++pub const _DATE_FMT: ::nl_item = 58;
++pub const MAXSTRMSG: ::nl_item = 58;
++
++pub const PATH_MAX: ::c_int = 1024;
++
++pub const SA_ONSTACK: ::c_int = 0x00000001;
++pub const SA_RESETHAND: ::c_int = 0x00000002;
++pub const SA_RESTART: ::c_int = 0x00000004;
++pub const SA_SIGINFO: ::c_int = 0x00000008;
++pub const SA_NODEFER: ::c_int = 0x00000010;
++pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
++pub const SA_NOCLDSTOP: ::c_int = 0x00020000;
++
++pub const SS_ONSTACK: ::c_int = 1;
++pub const SS_DISABLE: ::c_int = 2;
++
++pub const FIOCLEX: ::c_int = 0x20006601;
++pub const FIONCLEX: ::c_int = 0x20006602;
++pub const FIONREAD: ::c_int = 0x4004667f;
++pub const FIONBIO: ::c_int = 0x8004667e;
++pub const FIOASYNC: ::c_int = 0x8004667d;
++pub const FIOSETOWN: ::c_int = 0x8004667c;
++pub const FIOGETOWN: ::c_int = 0x4004667b;
++
++pub const SIGCHLD: ::c_int = 18;
++pub const SIGBUS: ::c_int = 10;
++pub const SIGINFO: ::c_int = 41;
++pub const SIG_BLOCK: ::c_int = 1;
++pub const SIG_UNBLOCK: ::c_int = 2;
++pub const SIG_SETMASK: ::c_int = 3;
++
++pub const IPV6_MULTICAST_LOOP: ::c_int = 0x8;
++pub const IPV6_V6ONLY: ::c_int = 0x27;
++
++cfg_if! {
++    if #[cfg(target_pointer_width = "64")] {
++        pub const FD_SETSIZE: usize = 65536;
++    } else {
++        pub const FD_SETSIZE: usize = 1024;
++    }
++}
++
++pub const ST_RDONLY: ::c_ulong = 1;
++pub const ST_NOSUID: ::c_ulong = 2;
++
++pub const NI_MAXHOST: ::socklen_t = 1025;
++
++pub const EXIT_FAILURE: ::c_int = 1;
++pub const EXIT_SUCCESS: ::c_int = 0;
++pub const RAND_MAX: ::c_int = 32767;
++pub const EOF: ::c_int = -1;
++pub const SEEK_SET: ::c_int = 0;
++pub const SEEK_CUR: ::c_int = 1;
++pub const SEEK_END: ::c_int = 2;
++pub const _IOFBF: ::c_int = 0;
++pub const _IONBF: ::c_int = 4;
++pub const _IOLBF: ::c_int = 64;
++pub const BUFSIZ: ::c_uint = 1024;
++pub const FOPEN_MAX: ::c_uint = 20;
++pub const FILENAME_MAX: ::c_uint = 1024;
++pub const L_tmpnam: ::c_uint = 25;
++pub const TMP_MAX: ::c_uint = 17576;
++
++pub const O_RDONLY: ::c_int = 0;
++pub const O_WRONLY: ::c_int = 1;
++pub const O_RDWR: ::c_int = 2;
++pub const O_SEARCH: ::c_int = 0x200000;
++pub const O_EXEC: ::c_int = 0x400000;
++pub const O_APPEND: ::c_int = 8;
++pub const O_CREAT: ::c_int = 256;
++pub const O_EXCL: ::c_int = 1024;
++pub const O_NOCTTY: ::c_int = 2048;
++pub const O_TRUNC: ::c_int = 512;
++pub const O_CLOEXEC: ::c_int = 0x800000;
++pub const O_ACCMODE: ::c_int = 0x600003;
++pub const S_IFIFO: mode_t = 4096;
++pub const S_IFCHR: mode_t = 8192;
++pub const S_IFBLK: mode_t = 24576;
++pub const S_IFDIR: mode_t = 16384;
++pub const S_IFREG: mode_t = 32768;
++pub const S_IFLNK: mode_t = 40960;
++pub const S_IFSOCK: mode_t = 49152;
++pub const S_IFMT: mode_t = 61440;
++pub const S_IEXEC: mode_t = 64;
++pub const S_IWRITE: mode_t = 128;
++pub const S_IREAD: mode_t = 256;
++pub const S_IRWXU: mode_t = 448;
++pub const S_IXUSR: mode_t = 64;
++pub const S_IWUSR: mode_t = 128;
++pub const S_IRUSR: mode_t = 256;
++pub const S_IRWXG: mode_t = 56;
++pub const S_IXGRP: mode_t = 8;
++pub const S_IWGRP: mode_t = 16;
++pub const S_IRGRP: mode_t = 32;
++pub const S_IRWXO: mode_t = 7;
++pub const S_IXOTH: mode_t = 1;
++pub const S_IWOTH: mode_t = 2;
++pub const S_IROTH: mode_t = 4;
++pub const F_OK: ::c_int = 0;
++pub const R_OK: ::c_int = 4;
++pub const W_OK: ::c_int = 2;
++pub const X_OK: ::c_int = 1;
++pub const STDIN_FILENO: ::c_int = 0;
++pub const STDOUT_FILENO: ::c_int = 1;
++pub const STDERR_FILENO: ::c_int = 2;
++pub const F_LOCK: ::c_int = 1;
++pub const F_TEST: ::c_int = 3;
++pub const F_TLOCK: ::c_int = 2;
++pub const F_ULOCK: ::c_int = 0;
++pub const F_DUPFD_CLOEXEC: ::c_int = 37;
++pub const F_SETLK: ::c_int = 6;
++pub const F_SETLKW: ::c_int = 7;
++pub const F_GETLK: ::c_int = 14;
++pub const SIGHUP: ::c_int = 1;
++pub const SIGINT: ::c_int = 2;
++pub const SIGQUIT: ::c_int = 3;
++pub const SIGILL: ::c_int = 4;
++pub const SIGABRT: ::c_int = 6;
++pub const SIGEMT: ::c_int = 7;
++pub const SIGFPE: ::c_int = 8;
++pub const SIGKILL: ::c_int = 9;
++pub const SIGSEGV: ::c_int = 11;
++pub const SIGSYS: ::c_int = 12;
++pub const SIGPIPE: ::c_int = 13;
++pub const SIGALRM: ::c_int = 14;
++pub const SIGTERM: ::c_int = 15;
++pub const SIGUSR1: ::c_int = 16;
++pub const SIGUSR2: ::c_int = 17;
++pub const SIGPWR: ::c_int = 19;
++pub const SIGWINCH: ::c_int = 20;
++pub const SIGURG: ::c_int = 21;
++pub const SIGPOLL: ::c_int = 22;
++pub const SIGIO: ::c_int = SIGPOLL;
++pub const SIGSTOP: ::c_int = 23;
++pub const SIGTSTP: ::c_int = 24;
++pub const SIGCONT: ::c_int = 25;
++pub const SIGTTIN: ::c_int = 26;
++pub const SIGTTOU: ::c_int = 27;
++pub const SIGVTALRM: ::c_int = 28;
++pub const SIGPROF: ::c_int = 29;
++pub const SIGXCPU: ::c_int = 30;
++pub const SIGXFSZ: ::c_int = 31;
++
++pub const WNOHANG: ::c_int = 0x40;
++pub const WUNTRACED: ::c_int = 0x04;
++
++pub const WEXITED: ::c_int = 0x01;
++pub const WTRAPPED: ::c_int = 0x02;
++pub const WSTOPPED: ::c_int = WUNTRACED;
++pub const WCONTINUED: ::c_int = 0x08;
++pub const WNOWAIT: ::c_int = 0x80;
++
++// Solaris defines a great many more of these; we only expose the
++// standardized ones.
++pub const P_PID: idtype_t = 0;
++pub const P_PGID: idtype_t = 2;
++pub const P_ALL: idtype_t = 7;
++
++pub const PROT_NONE: ::c_int = 0;
++pub const PROT_READ: ::c_int = 1;
++pub const PROT_WRITE: ::c_int = 2;
++pub const PROT_EXEC: ::c_int = 4;
++
++pub const MAP_SHARED: ::c_int = 0x0001;
++pub const MAP_PRIVATE: ::c_int = 0x0002;
++pub const MAP_FIXED: ::c_int = 0x0010;
++pub const MAP_NORESERVE: ::c_int = 0x40;
++pub const MAP_ANON: ::c_int = 0x0100;
++pub const MAP_RENAME: ::c_int = 0x20;
++pub const MAP_ALIGN: ::c_int = 0x200;
++pub const MAP_TEXT: ::c_int = 0x400;
++pub const MAP_INITDATA: ::c_int = 0x800;
++pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
++
++pub const MCL_CURRENT: ::c_int = 0x0001;
++pub const MCL_FUTURE: ::c_int = 0x0002;
++
++pub const MS_SYNC: ::c_int = 0x0004;
++pub const MS_ASYNC: ::c_int = 0x0001;
++pub const MS_INVALIDATE: ::c_int = 0x0002;
++pub const MS_INVALCURPROC: ::c_int = 0x0008;
++
++pub const EPERM: ::c_int = 1;
++pub const ENOENT: ::c_int = 2;
++pub const ESRCH: ::c_int = 3;
++pub const EINTR: ::c_int = 4;
++pub const EIO: ::c_int = 5;
++pub const ENXIO: ::c_int = 6;
++pub const E2BIG: ::c_int = 7;
++pub const ENOEXEC: ::c_int = 8;
++pub const EBADF: ::c_int = 9;
++pub const ECHILD: ::c_int = 10;
++pub const EAGAIN: ::c_int = 11;
++pub const ENOMEM: ::c_int = 12;
++pub const EACCES: ::c_int = 13;
++pub const EFAULT: ::c_int = 14;
++pub const ENOTBLK: ::c_int = 15;
++pub const EBUSY: ::c_int = 16;
++pub const EEXIST: ::c_int = 17;
++pub const EXDEV: ::c_int = 18;
++pub const ENODEV: ::c_int = 19;
++pub const ENOTDIR: ::c_int = 20;
++pub const EISDIR: ::c_int = 21;
++pub const EINVAL: ::c_int = 22;
++pub const ENFILE: ::c_int = 23;
++pub const EMFILE: ::c_int = 24;
++pub const ENOTTY: ::c_int = 25;
++pub const ETXTBSY: ::c_int = 26;
++pub const EFBIG: ::c_int = 27;
++pub const ENOSPC: ::c_int = 28;
++pub const ESPIPE: ::c_int = 29;
++pub const EROFS: ::c_int = 30;
++pub const EMLINK: ::c_int = 31;
++pub const EPIPE: ::c_int = 32;
++pub const EDOM: ::c_int = 33;
++pub const ERANGE: ::c_int = 34;
++pub const ENOMSG: ::c_int = 35;
++pub const EIDRM: ::c_int = 36;
++pub const ECHRNG: ::c_int = 37;
++pub const EL2NSYNC: ::c_int = 38;
++pub const EL3HLT: ::c_int = 39;
++pub const EL3RST: ::c_int = 40;
++pub const ELNRNG: ::c_int = 41;
++pub const EUNATCH: ::c_int = 42;
++pub const ENOCSI: ::c_int = 43;
++pub const EL2HLT: ::c_int = 44;
++pub const EDEADLK: ::c_int = 45;
++pub const ENOLCK: ::c_int = 46;
++pub const ECANCELED: ::c_int = 47;
++pub const ENOTSUP: ::c_int = 48;
++pub const EDQUOT: ::c_int = 49;
++pub const EBADE: ::c_int = 50;
++pub const EBADR: ::c_int = 51;
++pub const EXFULL: ::c_int = 52;
++pub const ENOANO: ::c_int = 53;
++pub const EBADRQC: ::c_int = 54;
++pub const EBADSLT: ::c_int = 55;
++pub const EDEADLOCK: ::c_int = 56;
++pub const EBFONT: ::c_int = 57;
++pub const EOWNERDEAD: ::c_int = 58;
++pub const ENOTRECOVERABLE: ::c_int = 59;
++pub const ENOSTR: ::c_int = 60;
++pub const ENODATA: ::c_int = 61;
++pub const ETIME: ::c_int = 62;
++pub const ENOSR: ::c_int = 63;
++pub const ENONET: ::c_int = 64;
++pub const ENOPKG: ::c_int = 65;
++pub const EREMOTE: ::c_int = 66;
++pub const ENOLINK: ::c_int = 67;
++pub const EADV: ::c_int = 68;
++pub const ESRMNT: ::c_int = 69;
++pub const ECOMM: ::c_int = 70;
++pub const EPROTO: ::c_int = 71;
++pub const ELOCKUNMAPPED: ::c_int = 72;
++pub const ENOTACTIVE: ::c_int = 73;
++pub const EMULTIHOP: ::c_int = 74;
++pub const EADI: ::c_int = 75;
++pub const EBADMSG: ::c_int = 77;
++pub const ENAMETOOLONG: ::c_int = 78;
++pub const EOVERFLOW: ::c_int = 79;
++pub const ENOTUNIQ: ::c_int = 80;
++pub const EBADFD: ::c_int = 81;
++pub const EREMCHG: ::c_int = 82;
++pub const ELIBACC: ::c_int = 83;
++pub const ELIBBAD: ::c_int = 84;
++pub const ELIBSCN: ::c_int = 85;
++pub const ELIBMAX: ::c_int = 86;
++pub const ELIBEXEC: ::c_int = 87;
++pub const EILSEQ: ::c_int = 88;
++pub const ENOSYS: ::c_int = 89;
++pub const ELOOP: ::c_int = 90;
++pub const ERESTART: ::c_int = 91;
++pub const ESTRPIPE: ::c_int = 92;
++pub const ENOTEMPTY: ::c_int = 93;
++pub const EUSERS: ::c_int = 94;
++pub const ENOTSOCK: ::c_int = 95;
++pub const EDESTADDRREQ: ::c_int = 96;
++pub const EMSGSIZE: ::c_int = 97;
++pub const EPROTOTYPE: ::c_int = 98;
++pub const ENOPROTOOPT: ::c_int = 99;
++pub const EPROTONOSUPPORT: ::c_int = 120;
++pub const ESOCKTNOSUPPORT: ::c_int = 121;
++pub const EOPNOTSUPP: ::c_int = 122;
++pub const EPFNOSUPPORT: ::c_int = 123;
++pub const EAFNOSUPPORT: ::c_int = 124;
++pub const EADDRINUSE: ::c_int = 125;
++pub const EADDRNOTAVAIL: ::c_int = 126;
++pub const ENETDOWN: ::c_int = 127;
++pub const ENETUNREACH: ::c_int = 128;
++pub const ENETRESET: ::c_int = 129;
++pub const ECONNABORTED: ::c_int = 130;
++pub const ECONNRESET: ::c_int = 131;
++pub const ENOBUFS: ::c_int = 132;
++pub const EISCONN: ::c_int = 133;
++pub const ENOTCONN: ::c_int = 134;
++pub const ESHUTDOWN: ::c_int = 143;
++pub const ETOOMANYREFS: ::c_int = 144;
++pub const ETIMEDOUT: ::c_int = 145;
++pub const ECONNREFUSED: ::c_int = 146;
++pub const EHOSTDOWN: ::c_int = 147;
++pub const EHOSTUNREACH: ::c_int = 148;
++pub const EWOULDBLOCK: ::c_int = EAGAIN;
++pub const EALREADY: ::c_int = 149;
++pub const EINPROGRESS: ::c_int = 150;
++
++pub const EAI_SYSTEM: ::c_int = 11;
++
++pub const F_DUPFD: ::c_int = 0;
++pub const F_GETFD: ::c_int = 1;
++pub const F_SETFD: ::c_int = 2;
++pub const F_GETFL: ::c_int = 3;
++pub const F_SETFL: ::c_int = 4;
++
++pub const SIGTRAP: ::c_int = 5;
++
++pub const GLOB_APPEND  : ::c_int = 32;
++pub const GLOB_DOOFFS  : ::c_int = 16;
++pub const GLOB_ERR     : ::c_int = 1;
++pub const GLOB_MARK    : ::c_int = 2;
++pub const GLOB_NOCHECK : ::c_int = 8;
++pub const GLOB_NOSORT  : ::c_int = 4;
++pub const GLOB_NOESCAPE: ::c_int = 64;
++
++pub const GLOB_NOSPACE : ::c_int = -2;
++pub const GLOB_ABORTED : ::c_int = -1;
++pub const GLOB_NOMATCH : ::c_int = -3;
++
++pub const POSIX_MADV_NORMAL: ::c_int = 0;
++pub const POSIX_MADV_RANDOM: ::c_int = 1;
++pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
++pub const POSIX_MADV_WILLNEED: ::c_int = 3;
++pub const POSIX_MADV_DONTNEED: ::c_int = 4;
++
++pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
++pub const PTHREAD_CREATE_DETACHED: ::c_int = 0x40;
++pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
++pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0;
++pub const PTHREAD_STACK_MIN: ::size_t = 4096;
++
++pub const SIGSTKSZ: ::size_t = 8192;
++
++// https://illumos.org/man/3c/clock_gettime
++// https://github.com/illumos/illumos-gate/
++//   blob/HEAD/usr/src/lib/libc/amd64/sys/__clock_gettime.s
++// clock_gettime(3c) doesn't seem to accept anything other than CLOCK_REALTIME
++// or __CLOCK_REALTIME0
++//
++// https://github.com/illumos/illumos-gate/
++//   blob/HEAD/usr/src/uts/common/sys/time_impl.h
++// Confusing! CLOCK_HIGHRES==CLOCK_MONOTONIC==4
++// __CLOCK_REALTIME0==0 is an obsoleted version of CLOCK_REALTIME==3
++pub const CLOCK_REALTIME: clockid_t = 3;
++pub const CLOCK_MONOTONIC: clockid_t = 4;
++pub const TIMER_RELTIME: ::c_int = 0;
++pub const TIMER_ABSTIME: ::c_int = 1;
++
++pub const RLIMIT_CPU: ::c_int = 0;
++pub const RLIMIT_FSIZE: ::c_int = 1;
++pub const RLIMIT_DATA: ::c_int = 2;
++pub const RLIMIT_STACK: ::c_int = 3;
++pub const RLIMIT_CORE: ::c_int = 4;
++pub const RLIMIT_NOFILE: ::c_int = 5;
++pub const RLIMIT_VMEM: ::c_int = 6;
++pub const RLIMIT_AS: ::c_int = RLIMIT_VMEM;
++
++pub const RLIM_NLIMITS: rlim_t = 7;
++pub const RLIM_INFINITY: rlim_t = 0x7fffffff;
++
++pub const RUSAGE_SELF: ::c_int = 0;
++pub const RUSAGE_CHILDREN: ::c_int = -1;
++
++pub const MADV_NORMAL: ::c_int = 0;
++pub const MADV_RANDOM: ::c_int = 1;
++pub const MADV_SEQUENTIAL: ::c_int = 2;
++pub const MADV_WILLNEED: ::c_int = 3;
++pub const MADV_DONTNEED: ::c_int = 4;
++pub const MADV_FREE: ::c_int = 5;
++
++pub const AF_INET: ::c_int = 2;
++pub const AF_INET6: ::c_int = 26;
++pub const AF_UNIX: ::c_int = 1;
++pub const SOCK_DGRAM: ::c_int = 1;
++pub const SOCK_STREAM: ::c_int = 2;
++pub const SOCK_RAW: ::c_int = 4;
++pub const SOCK_RDM: ::c_int = 5;
++pub const SOCK_SEQPACKET: ::c_int = 6;
++pub const IP_MULTICAST_TTL: ::c_int = 17;
++pub const IP_MULTICAST_LOOP: ::c_int = 18;
++pub const IP_TTL: ::c_int = 4;
++pub const IP_HDRINCL: ::c_int = 2;
++pub const IP_ADD_MEMBERSHIP: ::c_int = 19;
++pub const IP_DROP_MEMBERSHIP: ::c_int = 20;
++pub const IPV6_JOIN_GROUP: ::c_int = 9;
++pub const IPV6_LEAVE_GROUP: ::c_int = 10;
++
++pub const TCP_NODELAY: ::c_int = 1;
++pub const TCP_KEEPIDLE: ::c_int = 34;
++pub const SOL_SOCKET: ::c_int = 0xffff;
++pub const SO_DEBUG: ::c_int = 0x01;
++pub const SO_ACCEPTCONN: ::c_int = 0x0002;
++pub const SO_REUSEADDR: ::c_int = 0x0004;
++pub const SO_KEEPALIVE: ::c_int = 0x0008;
++pub const SO_DONTROUTE: ::c_int = 0x0010;
++pub const SO_BROADCAST: ::c_int = 0x0020;
++pub const SO_USELOOPBACK: ::c_int = 0x0040;
++pub const SO_LINGER: ::c_int = 0x0080;
++pub const SO_OOBINLINE: ::c_int = 0x0100;
++pub const SO_SNDBUF: ::c_int = 0x1001;
++pub const SO_RCVBUF: ::c_int = 0x1002;
++pub const SO_SNDLOWAT: ::c_int = 0x1003;
++pub const SO_RCVLOWAT: ::c_int = 0x1004;
++pub const SO_SNDTIMEO: ::c_int = 0x1005;
++pub const SO_RCVTIMEO: ::c_int = 0x1006;
++pub const SO_ERROR: ::c_int = 0x1007;
++pub const SO_TYPE: ::c_int = 0x1008;
++
++pub const MSG_PEEK: ::c_int = 0x2;
++
++pub const IFF_LOOPBACK: ::c_int = 0x8;
++
++pub const SHUT_RD: ::c_int = 0;
++pub const SHUT_WR: ::c_int = 1;
++pub const SHUT_RDWR: ::c_int = 2;
++
++pub const LOCK_SH: ::c_int = 1;
++pub const LOCK_EX: ::c_int = 2;
++pub const LOCK_NB: ::c_int = 4;
++pub const LOCK_UN: ::c_int = 8;
++
++pub const F_RDLCK: ::c_short = 1;
++pub const F_WRLCK: ::c_short = 2;
++pub const F_UNLCK: ::c_short = 3;
++
++pub const O_SYNC: ::c_int = 16;
++pub const O_NONBLOCK: ::c_int = 128;
++
++pub const IPPROTO_RAW: ::c_int = 255;
++
++pub const _PC_LINK_MAX: ::c_int = 1;
++pub const _PC_MAX_CANON: ::c_int = 2;
++pub const _PC_MAX_INPUT: ::c_int = 3;
++pub const _PC_NAME_MAX: ::c_int = 4;
++pub const _PC_PATH_MAX: ::c_int = 5;
++pub const _PC_PIPE_BUF: ::c_int = 6;
++pub const _PC_NO_TRUNC: ::c_int = 7;
++pub const _PC_VDISABLE: ::c_int = 8;
++pub const _PC_CHOWN_RESTRICTED: ::c_int = 9;
++pub const _PC_ASYNC_IO: ::c_int = 10;
++pub const _PC_PRIO_IO: ::c_int = 11;
++pub const _PC_SYNC_IO: ::c_int = 12;
++pub const _PC_ALLOC_SIZE_MIN: ::c_int = 13;
++pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14;
++pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15;
++pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16;
++pub const _PC_REC_XFER_ALIGN: ::c_int = 17;
++pub const _PC_SYMLINK_MAX: ::c_int = 18;
++pub const _PC_2_SYMLINKS: ::c_int = 19;
++pub const _PC_ACL_ENABLED: ::c_int = 20;
++pub const _PC_MIN_HOLE_SIZE: ::c_int = 21;
++pub const _PC_CASE_BEHAVIOR: ::c_int = 22;
++pub const _PC_SATTR_ENABLED: ::c_int = 23;
++pub const _PC_SATTR_EXISTS: ::c_int = 24;
++pub const _PC_ACCESS_FILTERING: ::c_int = 25;
++pub const _PC_TIMESTAMP_RESOLUTION: ::c_int = 26;
++pub const _PC_FILESIZEBITS: ::c_int = 67;
++pub const _PC_XATTR_ENABLED: ::c_int = 100;
++pub const _PC_LAST: ::c_int = 101;
++pub const _PC_XATTR_EXISTS: ::c_int = 101;
++
++pub const _SC_ARG_MAX: ::c_int = 1;
++pub const _SC_CHILD_MAX: ::c_int = 2;
++pub const _SC_CLK_TCK: ::c_int = 3;
++pub const _SC_NGROUPS_MAX: ::c_int = 4;
++pub const _SC_OPEN_MAX: ::c_int = 5;
++pub const _SC_JOB_CONTROL: ::c_int = 6;
++pub const _SC_SAVED_IDS: ::c_int = 7;
++pub const _SC_VERSION: ::c_int = 8;
++pub const _SC_PASS_MAX: ::c_int = 9;
++pub const _SC_LOGNAME_MAX: ::c_int = 10;
++pub const _SC_PAGESIZE: ::c_int = 11;
++pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
++pub const _SC_XOPEN_VERSION: ::c_int = 12;
++pub const _SC_NPROCESSORS_CONF: ::c_int = 14;
++pub const _SC_NPROCESSORS_ONLN: ::c_int = 15;
++pub const _SC_STREAM_MAX: ::c_int = 16;
++pub const _SC_TZNAME_MAX: ::c_int = 17;
++pub const _SC_AIO_LISTIO_MAX: ::c_int = 18;
++pub const _SC_AIO_MAX: ::c_int = 19;
++pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 20;
++pub const _SC_ASYNCHRONOUS_IO: ::c_int = 21;
++pub const _SC_DELAYTIMER_MAX: ::c_int = 22;
++pub const _SC_FSYNC: ::c_int = 23;
++pub const _SC_MAPPED_FILES: ::c_int = 24;
++pub const _SC_MEMLOCK: ::c_int = 25;
++pub const _SC_MEMLOCK_RANGE: ::c_int = 26;
++pub const _SC_MEMORY_PROTECTION: ::c_int = 27;
++pub const _SC_MESSAGE_PASSING: ::c_int = 28;
++pub const _SC_MQ_OPEN_MAX: ::c_int = 29;
++pub const _SC_MQ_PRIO_MAX: ::c_int = 30;
++pub const _SC_PRIORITIZED_IO: ::c_int = 31;
++pub const _SC_PRIORITY_SCHEDULING: ::c_int = 32;
++pub const _SC_REALTIME_SIGNALS: ::c_int = 33;
++pub const _SC_RTSIG_MAX: ::c_int = 34;
++pub const _SC_SEMAPHORES: ::c_int = 35;
++pub const _SC_SEM_NSEMS_MAX: ::c_int = 36;
++pub const _SC_SEM_VALUE_MAX: ::c_int = 37;
++pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 38;
++pub const _SC_SIGQUEUE_MAX: ::c_int = 39;
++pub const _SC_SIGRT_MIN: ::c_int = 40;
++pub const _SC_SIGRT_MAX: ::c_int = 41;
++pub const _SC_SYNCHRONIZED_IO: ::c_int = 42;
++pub const _SC_TIMERS: ::c_int = 43;
++pub const _SC_TIMER_MAX: ::c_int = 44;
++pub const _SC_2_C_BIND: ::c_int = 45;
++pub const _SC_2_C_DEV: ::c_int = 46;
++pub const _SC_2_C_VERSION: ::c_int = 47;
++pub const _SC_2_FORT_DEV: ::c_int = 48;
++pub const _SC_2_FORT_RUN: ::c_int = 49;
++pub const _SC_2_LOCALEDEF: ::c_int = 50;
++pub const _SC_2_SW_DEV: ::c_int = 51;
++pub const _SC_2_UPE: ::c_int = 52;
++pub const _SC_2_VERSION: ::c_int = 53;
++pub const _SC_BC_BASE_MAX: ::c_int = 54;
++pub const _SC_BC_DIM_MAX: ::c_int = 55;
++pub const _SC_BC_SCALE_MAX: ::c_int = 56;
++pub const _SC_BC_STRING_MAX: ::c_int = 57;
++pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 58;
++pub const _SC_EXPR_NEST_MAX: ::c_int = 59;
++pub const _SC_LINE_MAX: ::c_int = 60;
++pub const _SC_RE_DUP_MAX: ::c_int = 61;
++pub const _SC_XOPEN_CRYPT: ::c_int = 62;
++pub const _SC_XOPEN_ENH_I18N: ::c_int = 63;
++pub const _SC_XOPEN_SHM: ::c_int = 64;
++pub const _SC_2_CHAR_TERM: ::c_int = 66;
++pub const _SC_XOPEN_XCU_VERSION: ::c_int = 67;
++pub const _SC_ATEXIT_MAX: ::c_int = 76;
++pub const _SC_IOV_MAX: ::c_int = 77;
++pub const _SC_XOPEN_UNIX: ::c_int = 78;
++pub const _SC_T_IOV_MAX: ::c_int = 79;
++pub const _SC_PHYS_PAGES: ::c_int = 500;
++pub const _SC_AVPHYS_PAGES: ::c_int = 501;
++pub const _SC_COHER_BLKSZ: ::c_int = 503;
++pub const _SC_SPLIT_CACHE: ::c_int = 504;
++pub const _SC_ICACHE_SZ: ::c_int = 505;
++pub const _SC_DCACHE_SZ: ::c_int = 506;
++pub const _SC_ICACHE_LINESZ: ::c_int = 507;
++pub const _SC_DCACHE_LINESZ: ::c_int = 508;
++pub const _SC_ICACHE_BLKSZ: ::c_int = 509;
++pub const _SC_DCACHE_BLKSZ: ::c_int = 510;
++pub const _SC_DCACHE_TBLKSZ: ::c_int = 511;
++pub const _SC_ICACHE_ASSOC: ::c_int = 512;
++pub const _SC_DCACHE_ASSOC: ::c_int = 513;
++pub const _SC_MAXPID: ::c_int = 514;
++pub const _SC_STACK_PROT: ::c_int = 515;
++pub const _SC_NPROCESSORS_MAX: ::c_int = 516;
++pub const _SC_CPUID_MAX: ::c_int = 517;
++pub const _SC_EPHID_MAX: ::c_int = 518;
++pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 568;
++pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 569;
++pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 570;
++pub const _SC_LOGIN_NAME_MAX: ::c_int = 571;
++pub const _SC_THREAD_KEYS_MAX: ::c_int = 572;
++pub const _SC_THREAD_STACK_MIN: ::c_int = 573;
++pub const _SC_THREAD_THREADS_MAX: ::c_int = 574;
++pub const _SC_TTY_NAME_MAX: ::c_int = 575;
++pub const _SC_THREADS: ::c_int = 576;
++pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 577;
++pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 578;
++pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 579;
++pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 580;
++pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 581;
++pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 582;
++pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 583;
++pub const _SC_XOPEN_LEGACY: ::c_int = 717;
++pub const _SC_XOPEN_REALTIME: ::c_int = 718;
++pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 719;
++pub const _SC_XBS5_ILP32_OFF32: ::c_int = 720;
++pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 721;
++pub const _SC_XBS5_LP64_OFF64: ::c_int = 722;
++pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 723;
++pub const _SC_2_PBS: ::c_int = 724;
++pub const _SC_2_PBS_ACCOUNTING: ::c_int = 725;
++pub const _SC_2_PBS_CHECKPOINT: ::c_int = 726;
++pub const _SC_2_PBS_LOCATE: ::c_int = 728;
++pub const _SC_2_PBS_MESSAGE: ::c_int = 729;
++pub const _SC_2_PBS_TRACK: ::c_int = 730;
++pub const _SC_ADVISORY_INFO: ::c_int = 731;
++pub const _SC_BARRIERS: ::c_int = 732;
++pub const _SC_CLOCK_SELECTION: ::c_int = 733;
++pub const _SC_CPUTIME: ::c_int = 734;
++pub const _SC_HOST_NAME_MAX: ::c_int = 735;
++pub const _SC_MONOTONIC_CLOCK: ::c_int = 736;
++pub const _SC_READER_WRITER_LOCKS: ::c_int = 737;
++pub const _SC_REGEXP: ::c_int = 738;
++pub const _SC_SHELL: ::c_int = 739;
++pub const _SC_SPAWN: ::c_int = 740;
++pub const _SC_SPIN_LOCKS: ::c_int = 741;
++pub const _SC_SPORADIC_SERVER: ::c_int = 742;
++pub const _SC_SS_REPL_MAX: ::c_int = 743;
++pub const _SC_SYMLOOP_MAX: ::c_int = 744;
++pub const _SC_THREAD_CPUTIME: ::c_int = 745;
++pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 746;
++pub const _SC_TIMEOUTS: ::c_int = 747;
++pub const _SC_TRACE: ::c_int = 748;
++pub const _SC_TRACE_EVENT_FILTER: ::c_int = 749;
++pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 750;
++pub const _SC_TRACE_INHERIT: ::c_int = 751;
++pub const _SC_TRACE_LOG: ::c_int = 752;
++pub const _SC_TRACE_NAME_MAX: ::c_int = 753;
++pub const _SC_TRACE_SYS_MAX: ::c_int = 754;
++pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 755;
++pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 756;
++pub const _SC_V6_ILP32_OFF32: ::c_int = 757;
++pub const _SC_V6_ILP32_OFFBIG: ::c_int = 758;
++pub const _SC_V6_LP64_OFF64: ::c_int = 759;
++pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 760;
++pub const _SC_XOPEN_STREAMS: ::c_int = 761;
++pub const _SC_IPV6: ::c_int = 762;
++pub const _SC_RAW_SOCKETS: ::c_int = 763;
++
++pub const _MUTEX_MAGIC: u16 = 0x4d58; // MX
++pub const _COND_MAGIC: u16 = 0x4356;  // CV
++pub const _RWL_MAGIC: u16 = 0x5257;   // RW
++
++pub const NCCS: usize = 19;
++
++pub const LOG_CRON: ::c_int = 15 << 3;
++
++pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
++    __pthread_mutex_flag1: 0,
++    __pthread_mutex_flag2: 0,
++    __pthread_mutex_ceiling: 0,
++    __pthread_mutex_type: PTHREAD_PROCESS_PRIVATE,
++    __pthread_mutex_magic: _MUTEX_MAGIC,
++    __pthread_mutex_lock: 0,
++    __pthread_mutex_data: 0
++};
++pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
++    __pthread_cond_flag: [0; 4],
++    __pthread_cond_type: PTHREAD_PROCESS_PRIVATE,
++    __pthread_cond_magic: _COND_MAGIC,
++    __pthread_cond_data: 0
++};
++pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
++    __pthread_rwlock_readers: 0,
++    __pthread_rwlock_type: PTHREAD_PROCESS_PRIVATE,
++    __pthread_rwlock_magic: _RWL_MAGIC,
++    __pthread_rwlock_mutex: PTHREAD_MUTEX_INITIALIZER,
++    __pthread_rwlock_readercv: PTHREAD_COND_INITIALIZER,
++    __pthread_rwlock_writercv: PTHREAD_COND_INITIALIZER
++};
++pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
++pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
++pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 4;
++pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
++
++pub const RTLD_NEXT: *mut ::c_void = -1isize as *mut ::c_void;
++pub const RTLD_DEFAULT: *mut ::c_void = -2isize as *mut ::c_void;
++pub const RTLD_SELF: *mut ::c_void = -3isize as *mut ::c_void;
++pub const RTLD_PROBE: *mut ::c_void = -4isize as *mut ::c_void;
++
++pub const RTLD_NOW: ::c_int = 0x2;
++pub const RTLD_NOLOAD: ::c_int = 0x4;
++pub const RTLD_GLOBAL: ::c_int = 0x100;
++pub const RTLD_LOCAL: ::c_int = 0x0;
++pub const RTLD_PARENT: ::c_int = 0x200;
++pub const RTLD_GROUP: ::c_int = 0x400;
++pub const RTLD_WORLD: ::c_int = 0x800;
++pub const RTLD_NODELETE: ::c_int = 0x1000;
++pub const RTLD_FIRST: ::c_int = 0x2000;
++pub const RTLD_CONFGEN: ::c_int = 0x10000;
++
++pub const PORT_SOURCE_AIO: ::c_int = 1;
++pub const PORT_SOURCE_TIMER: ::c_int = 2;
++pub const PORT_SOURCE_USER: ::c_int = 3;
++pub const PORT_SOURCE_FD: ::c_int = 4;
++pub const PORT_SOURCE_ALERT: ::c_int = 5;
++pub const PORT_SOURCE_MQ: ::c_int = 6;
++pub const PORT_SOURCE_FILE: ::c_int = 7;
++pub const PORT_SOURCE_POSTWAIT: ::c_int = 8;
++pub const PORT_SOURCE_SIGNAL: ::c_int = 9;
++
++f! {
++    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
++        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        let fd = fd as usize;
++        (*set).fds_bits[fd / bits] &= !(1 << (fd % bits));
++        return
++    }
++
++    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
++        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        let fd = fd as usize;
++        return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0
++    }
++
++    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
++        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        let fd = fd as usize;
++        (*set).fds_bits[fd / bits] |= 1 << (fd % bits);
++        return
++    }
++
++    pub fn FD_ZERO(set: *mut fd_set) -> () {
++        for slot in (*set).fds_bits.iter_mut() {
++            *slot = 0;
++        }
++    }
++
++    pub fn WIFEXITED(status: ::c_int) -> bool {
++        (status & 0xFF) == 0
++    }
++
++    pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
++        (status >> 8) & 0xFF
++    }
++
++    pub fn WTERMSIG(status: ::c_int) -> ::c_int {
++        status & 0x7F
++    }
++}
++
++extern {
++    pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
++    pub fn freeifaddrs(ifa: *mut ::ifaddrs);
++
++    pub fn stack_getbounds(sp: *mut ::stack_t) -> ::c_int;
++    pub fn mincore(addr: *const ::c_void, len: ::size_t,
++                   vec: *mut c_char) -> ::c_int;
++    pub fn setgroups(ngroups: ::c_int,
++                     ptr: *const ::gid_t) -> ::c_int;
++    pub fn ioctl(fildes: ::c_int, request: ::c_int, ...) -> ::c_int;
++    pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
++                    -> ::c_int;
++    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
++    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
++    pub fn clock_nanosleep(clk_id: clockid_t,
++                           flags: ::c_int,
++                           rqtp: *const ::timespec,
++                           rmtp:  *mut ::timespec) -> ::c_int;
++    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
++    pub fn getnameinfo(sa: *const ::sockaddr,
++                       salen: ::socklen_t,
++                       host: *mut ::c_char,
++                       hostlen: ::socklen_t,
++                       serv: *mut ::c_char,
++                       sevlen: ::socklen_t,
++                       flags: ::c_int) -> ::c_int;
++    #[link_name = "__posix_getpwnam_r"]
++    pub fn getpwnam_r(name: *const ::c_char,
++                      pwd: *mut passwd,
++                      buf: *mut ::c_char,
++                      buflen: ::size_t,
++                      result: *mut *mut passwd) -> ::c_int;
++
++    #[link_name = "__posix_getpwuid_r"]
++    pub fn getpwuid_r(uid: ::uid_t,
++                      pwd: *mut passwd,
++                      buf: *mut ::c_char,
++                      buflen: ::size_t,
++                      result: *mut *mut passwd) -> ::c_int;
++    pub fn setpwent();
++    pub fn getpwent() -> *mut passwd;
++    pub fn fdatasync(fd: ::c_int) -> ::c_int;
++    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
++    pub fn duplocale(base: ::locale_t) -> ::locale_t;
++    pub fn freelocale(loc: ::locale_t);
++    pub fn newlocale(mask: ::c_int,
++                     locale: *const ::c_char,
++                     base: ::locale_t) -> ::locale_t;
++    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
++    pub fn getprogname() -> *const ::c_char;
++    pub fn setprogname(name: *const ::c_char);
++    pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
++    pub fn getpriority(which: ::c_int, who: ::c_int) -> ::c_int;
++    pub fn setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) -> ::c_int;
++
++    pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
++
++    pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
++                   mode: ::mode_t, dev: dev_t) -> ::c_int;
++    pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
++                    mode: ::mode_t) -> ::c_int;
++    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
++    pub fn if_nameindex() -> *mut if_nameindex;
++    pub fn if_freenameindex(ptr: *mut if_nameindex);
++    pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
++                                     clock_id: *mut clockid_t) -> ::c_int;
++    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
++                                     clock_id: clockid_t) -> ::c_int;
++    pub fn sem_timedwait(sem: *mut sem_t,
++                         abstime: *const ::timespec) -> ::c_int;
++    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
++                                   abstime: *const ::timespec) -> ::c_int;
++    pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
++                  options: ::c_int) -> ::c_int;
++
++    pub fn glob(pattern: *const ::c_char,
++                flags: ::c_int,
++                errfunc: Option<extern fn(epath: *const ::c_char,
++                                          errno: ::c_int) -> ::c_int>,
++                pglob: *mut ::glob_t) -> ::c_int;
++
++    pub fn globfree(pglob: *mut ::glob_t);
++
++    pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
++                         -> ::c_int;
++
++    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
++
++    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
++
++    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
++    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
++                  -> ::c_int;
++
++    pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
++
++    pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
++                    flags: ::c_int, addr: *mut ::sockaddr,
++                    addrlen: *mut ::socklen_t) -> ::ssize_t;
++    pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
++    pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int;
++    pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
++
++    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
++                address_len: ::socklen_t) -> ::c_int;
++
++    pub fn writev(fd: ::c_int,
++                  iov: *const ::iovec,
++                  iovcnt: ::c_int) -> ::ssize_t;
++    pub fn readv(fd: ::c_int,
++                 iov: *const ::iovec,
++                 iovcnt: ::c_int) -> ::ssize_t;
++
++    pub fn sendmsg(fd: ::c_int,
++                   msg: *const ::msghdr,
++                   flags: ::c_int) -> ::ssize_t;
++    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
++                   -> ::ssize_t;
++
++    pub fn port_create() -> ::c_int;
++    pub fn port_associate(port: ::c_int, source: ::c_int, object: ::uintptr_t,
++                          events: ::c_int, user: ::uintptr_t) -> ::c_int;
++    pub fn port_dissociate(port: ::c_int, source: ::c_int, object: ::uintptr_t)
++                           -> ::c_int;
++    pub fn port_get(port: ::c_int, pe: *mut port_event,
++                    timeout: *const ::timespec) -> ::c_int;
++    pub fn port_getn(port: ::c_int, pe_list: *mut port_event, max: ::c_uint,
++                     nget: *mut ::c_uint, timeout: *const ::timespec)
++                     -> ::c_int;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a81e884e0bc65adff7a23d1ca24ef9d3424b67e6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,269 @@@
++pub type c_char = i8;
++pub type c_long = i32;
++pub type c_ulong = u32;
++pub type clock_t = i32;
++pub type time_t = i32;
++pub type suseconds_t = i32;
++pub type wchar_t = i32;
++pub type off_t = i32;
++pub type ino_t = u32;
++pub type blkcnt_t = i32;
++pub type blksize_t = i32;
++pub type nlink_t = u32;
++pub type fsblkcnt_t = ::c_ulong;
++pub type fsfilcnt_t = ::c_ulong;
++pub type rlim_t = c_ulong;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::dev_t,
++        st_pad1: [::c_long; 2],
++        pub st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        pub st_pad2: [::c_long; 1],
++        pub st_size: ::off_t,
++        st_pad3: ::c_long,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt_t,
++        st_pad5: [::c_long; 14],
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::dev_t,
++        st_pad1: [::c_long; 2],
++        pub st_ino: ::ino64_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::dev_t,
++        st_pad2: [::c_long; 2],
++        pub st_size: ::off64_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_blksize: ::blksize_t,
++        st_pad3: ::c_long,
++        pub st_blocks: ::blkcnt64_t,
++        st_pad5: [::c_long; 14],
++    }
++
++    pub struct pthread_attr_t {
++        __size: [u32; 9]
++    }
++
++    pub struct sigaction {
++        pub sa_flags: ::c_uint,
++        pub sa_sigaction: ::sighandler_t,
++        pub sa_mask: sigset_t,
++        _restorer: *mut ::c_void,
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_size: ::size_t,
++        pub ss_flags: ::c_int,
++    }
++
++    pub struct sigset_t {
++        __val: [::c_ulong; 4],
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_code: ::c_int,
++        pub si_errno: ::c_int,
++        pub _pad: [::c_int; 29],
++    }
++
++    pub struct glob64_t {
++        pub gl_pathc: ::size_t,
++        pub gl_pathv: *mut *mut ::c_char,
++        pub gl_offs: ::size_t,
++        pub gl_flags: ::c_int,
++
++        __unused1: *mut ::c_void,
++        __unused2: *mut ::c_void,
++        __unused3: *mut ::c_void,
++        __unused4: *mut ::c_void,
++        __unused5: *mut ::c_void,
++    }
++
++    pub struct ipc_perm {
++        pub __key: ::key_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++        pub cuid: ::uid_t,
++        pub cgid: ::gid_t,
++        pub mode: ::c_uint,
++        pub __seq: ::c_ushort,
++        __pad1: ::c_ushort,
++        __unused1: ::c_ulong,
++        __unused2: ::c_ulong
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_segsz: ::size_t,
++        pub shm_atime: ::time_t,
++        pub shm_dtime: ::time_t,
++        pub shm_ctime: ::time_t,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::shmatt_t,
++        __unused4: ::c_ulong,
++        __unused5: ::c_ulong
++    }
++
++    pub struct msqid_ds {
++        pub msg_perm: ::ipc_perm,
++        #[cfg(target_endian = "big")]
++        __glibc_reserved1: ::c_ulong,
++        pub msg_stime: ::time_t,
++        #[cfg(target_endian = "little")]
++        __glibc_reserved1: ::c_ulong,
++        #[cfg(target_endian = "big")]
++        __glibc_reserved2: ::c_ulong,
++        pub msg_rtime: ::time_t,
++        #[cfg(target_endian = "little")]
++        __glibc_reserved2: ::c_ulong,
++        #[cfg(target_endian = "big")]
++        __glibc_reserved3: ::c_ulong,
++        pub msg_ctime: ::time_t,
++        #[cfg(target_endian = "little")]
++        __glibc_reserved3: ::c_ulong,
++        __msg_cbytes: ::c_ulong,
++        pub msg_qnum: ::msgqnum_t,
++        pub msg_qbytes: ::msglen_t,
++        pub msg_lspid: ::pid_t,
++        pub msg_lrpid: ::pid_t,
++        __glibc_reserved4: ::c_ulong,
++        __glibc_reserved5: ::c_ulong,
++    }
++
++    pub struct statfs {
++        pub f_type: ::c_long,
++        pub f_bsize: ::c_long,
++        pub f_frsize: ::c_long,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_files: ::fsblkcnt_t,
++        pub f_ffree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_fsid: ::fsid_t,
++
++        pub f_namelen: ::c_long,
++        f_spare: [::c_long; 6],
++    }
++
++    pub struct msghdr {
++        pub msg_name: *mut ::c_void,
++        pub msg_namelen: ::socklen_t,
++        pub msg_iov: *mut ::iovec,
++        pub msg_iovlen: ::c_int,
++        pub msg_control: *mut ::c_void,
++        pub msg_controllen: ::size_t,
++        pub msg_flags: ::c_int,
++    }
++
++    pub struct cmsghdr {
++        pub cmsg_len: ::size_t,
++        pub cmsg_level: ::c_int,
++        pub cmsg_type: ::c_int,
++    }
++
++    pub struct termios {
++        pub c_iflag: ::tcflag_t,
++        pub c_oflag: ::tcflag_t,
++        pub c_cflag: ::tcflag_t,
++        pub c_lflag: ::tcflag_t,
++        pub c_line: ::cc_t,
++        pub c_cc: [::cc_t; ::NCCS],
++    }
++
++    pub struct flock {
++        pub l_type: ::c_short,
++        pub l_whence: ::c_short,
++        pub l_start: ::off_t,
++        pub l_len: ::off_t,
++        pub l_sysid: ::c_long,
++        pub l_pid: ::pid_t,
++        pad: [::c_long; 4],
++    }
++
++    pub struct sysinfo {
++        pub uptime: ::c_long,
++        pub loads: [::c_ulong; 3],
++        pub totalram: ::c_ulong,
++        pub freeram: ::c_ulong,
++        pub sharedram: ::c_ulong,
++        pub bufferram: ::c_ulong,
++        pub totalswap: ::c_ulong,
++        pub freeswap: ::c_ulong,
++        pub procs: ::c_ushort,
++        pub pad: ::c_ushort,
++        pub totalhigh: ::c_ulong,
++        pub freehigh: ::c_ulong,
++        pub mem_unit: ::c_uint,
++        pub _f: [::c_char; 8],
++    }
++
++    // FIXME this is actually a union
++    pub struct sem_t {
++        #[cfg(target_pointer_width = "32")]
++        __size: [::c_char; 16],
++        #[cfg(target_pointer_width = "64")]
++        __size: [::c_char; 32],
++        __align: [::c_long; 0],
++    }
++}
++
++pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
++pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
++pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
++
++pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff;
++
++pub const SYS_gettid: ::c_long = 4222;   // Valid for O32
++
++#[link(name = "util")]
++extern {
++    pub fn sysctl(name: *mut ::c_int,
++                  namelen: ::c_int,
++                  oldp: *mut ::c_void,
++                  oldlenp: *mut ::size_t,
++                  newp: *mut ::c_void,
++                  newlen: ::size_t)
++                  -> ::c_int;
++    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
++    pub fn backtrace(buf: *mut *mut ::c_void,
++                     sz: ::c_int) -> ::c_int;
++    pub fn glob64(pattern: *const ::c_char,
++                  flags: ::c_int,
++                  errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
++                                                   errno: ::c_int)
++                                                   -> ::c_int>,
++                  pglob: *mut glob64_t) -> ::c_int;
++    pub fn globfree64(pglob: *mut glob64_t);
++    pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
++    pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
++                                       cpusetsize: ::size_t,
++                                       cpuset: *mut ::cpu_set_t) -> ::c_int;
++    pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
++                                       cpusetsize: ::size_t,
++                                       cpuset: *const ::cpu_set_t) -> ::c_int;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..79bac1fa8a47992352c46381cf0d76e88dfa0b0e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,209 @@@
++pub type blkcnt_t = i64;
++pub type blksize_t = i64;
++pub type c_char = i8;
++pub type c_long = i64;
++pub type c_ulong = u64;
++pub type fsblkcnt_t = ::c_ulong;
++pub type fsfilcnt_t = ::c_ulong;
++pub type ino_t = u64;
++pub type nlink_t = u64;
++pub type off_t = i64;
++pub type rlim_t = ::c_ulong;
++pub type suseconds_t = i64;
++pub type time_t = i64;
++pub type wchar_t = i32;
++
++s! {
++    pub struct stat {
++        pub st_dev: ::c_ulong,
++        st_pad1: [::c_long; 2],
++        pub st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::c_ulong,
++        st_pad2: [::c_ulong; 1],
++        pub st_size: ::off_t,
++        st_pad3: ::c_long,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_blksize: ::blksize_t,
++        st_pad4: ::c_long,
++        pub st_blocks: ::blkcnt_t,
++        st_pad5: [::c_long; 7],
++    }
++
++    pub struct stat64 {
++        pub st_dev: ::c_ulong,
++        st_pad1: [::c_long; 2],
++        pub st_ino: ::ino64_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: ::c_ulong,
++        st_pad2: [::c_long; 2],
++        pub st_size: ::off64_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_blksize: ::blksize_t,
++        st_pad3: ::c_long,
++        pub st_blocks: ::blkcnt64_t,
++        st_pad5: [::c_long; 7],
++    }
++
++    pub struct pthread_attr_t {
++        __size: [::c_ulong; 7]
++    }
++
++    pub struct sigaction {
++        pub sa_flags: ::c_int,
++        pub sa_sigaction: ::sighandler_t,
++        pub sa_mask: sigset_t,
++        _restorer: *mut ::c_void,
++    }
++
++    pub struct stack_t {
++        pub ss_sp: *mut ::c_void,
++        pub ss_size: ::size_t,
++        pub ss_flags: ::c_int,
++    }
++
++    pub struct sigset_t {
++        __size: [::c_ulong; 16],
++    }
++
++    pub struct siginfo_t {
++        pub si_signo: ::c_int,
++        pub si_code: ::c_int,
++        pub si_errno: ::c_int,
++        _pad: ::c_int,
++        _pad2: [::c_long; 14],
++    }
++
++    pub struct ipc_perm {
++        pub __key: ::key_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++        pub cuid: ::uid_t,
++        pub cgid: ::gid_t,
++        pub mode: ::c_uint,
++        pub __seq: ::c_ushort,
++        __pad1: ::c_ushort,
++        __unused1: ::c_ulong,
++        __unused2: ::c_ulong
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_segsz: ::size_t,
++        pub shm_atime: ::time_t,
++        pub shm_dtime: ::time_t,
++        pub shm_ctime: ::time_t,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::shmatt_t,
++        __unused4: ::c_ulong,
++        __unused5: ::c_ulong
++    }
++
++    pub struct msqid_ds {
++        pub msg_perm: ::ipc_perm,
++        pub msg_stime: ::time_t,
++        pub msg_rtime: ::time_t,
++        pub msg_ctime: ::time_t,
++        __msg_cbytes: ::c_ulong,
++        pub msg_qnum: ::msgqnum_t,
++        pub msg_qbytes: ::msglen_t,
++        pub msg_lspid: ::pid_t,
++        pub msg_lrpid: ::pid_t,
++        __glibc_reserved4: ::c_ulong,
++        __glibc_reserved5: ::c_ulong,
++    }
++
++    pub struct statfs {
++        pub f_type: ::c_long,
++        pub f_bsize: ::c_long,
++        pub f_frsize: ::c_long,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_files: ::fsblkcnt_t,
++        pub f_ffree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_fsid: ::fsid_t,
++
++        pub f_namelen: ::c_long,
++        f_spare: [::c_long; 6],
++    }
++
++    pub struct msghdr {
++        pub msg_name: *mut ::c_void,
++        pub msg_namelen: ::socklen_t,
++        pub msg_iov: *mut ::iovec,
++        pub msg_iovlen: ::size_t,
++        pub msg_control: *mut ::c_void,
++        pub msg_controllen: ::size_t,
++        pub msg_flags: ::c_int,
++    }
++
++    pub struct cmsghdr {
++        pub cmsg_len: ::size_t,
++        pub cmsg_level: ::c_int,
++        pub cmsg_type: ::c_int,
++    }
++
++    pub struct termios {
++        pub c_iflag: ::tcflag_t,
++        pub c_oflag: ::tcflag_t,
++        pub c_cflag: ::tcflag_t,
++        pub c_lflag: ::tcflag_t,
++        pub c_line: ::cc_t,
++        pub c_cc: [::cc_t; ::NCCS],
++    }
++
++    pub struct sysinfo {
++        pub uptime: ::c_long,
++        pub loads: [::c_ulong; 3],
++        pub totalram: ::c_ulong,
++        pub freeram: ::c_ulong,
++        pub sharedram: ::c_ulong,
++        pub bufferram: ::c_ulong,
++        pub totalswap: ::c_ulong,
++        pub freeswap: ::c_ulong,
++        pub procs: ::c_ushort,
++        pub pad: ::c_ushort,
++        pub totalhigh: ::c_ulong,
++        pub freehigh: ::c_ulong,
++        pub mem_unit: ::c_uint,
++        pub _f: [::c_char; 0],
++    }
++
++    // FIXME this is actually a union
++    pub struct sem_t {
++        __size: [::c_char; 32],
++        __align: [::c_long; 0],
++    }
++}
++
++pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
++pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
++
++pub const RLIM_INFINITY: ::rlim_t = 0xffff_ffff_ffff_ffff;
++
++pub const SYS_gettid: ::c_long = 5178;   // Valid for n64
++
++#[link(name = "util")]
++extern {
++    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..cc3ddf254d737540e1751eaa9583fc3a33304ad9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,476 @@@
++pub const SFD_CLOEXEC: ::c_int = 0x080000;
++
++pub const NCCS: usize = 32;
++
++pub const O_TRUNC: ::c_int = 512;
++
++pub const O_CLOEXEC: ::c_int = 0x80000;
++
++pub const EBFONT: ::c_int = 59;
++pub const ENOSTR: ::c_int = 60;
++pub const ENODATA: ::c_int = 61;
++pub const ETIME: ::c_int = 62;
++pub const ENOSR: ::c_int = 63;
++pub const ENONET: ::c_int = 64;
++pub const ENOPKG: ::c_int = 65;
++pub const EREMOTE: ::c_int = 66;
++pub const ENOLINK: ::c_int = 67;
++pub const EADV: ::c_int = 68;
++pub const ESRMNT: ::c_int = 69;
++pub const ECOMM: ::c_int = 70;
++pub const EPROTO: ::c_int = 71;
++pub const EDOTDOT: ::c_int = 73;
++
++pub const SA_NODEFER: ::c_int = 0x40000000;
++pub const SA_RESETHAND: ::c_int = 0x80000000;
++pub const SA_RESTART: ::c_int = 0x10000000;
++pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
++
++pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
++
++pub const EFD_CLOEXEC: ::c_int = 0x80000;
++
++pub const BUFSIZ: ::c_uint = 4096;
++pub const TMP_MAX: ::c_uint = 238328;
++pub const FOPEN_MAX: ::c_uint = 16;
++pub const POSIX_FADV_DONTNEED: ::c_int = 4;
++pub const POSIX_FADV_NOREUSE: ::c_int = 5;
++pub const POSIX_MADV_DONTNEED: ::c_int = 4;
++pub const _SC_2_C_VERSION: ::c_int = 96;
++pub const O_ACCMODE: ::c_int = 3;
++pub const O_DIRECT: ::c_int = 0x8000;
++pub const O_DIRECTORY: ::c_int = 0x10000;
++pub const O_NOFOLLOW: ::c_int = 0x20000;
++pub const ST_RELATIME: ::c_ulong = 4096;
++pub const NI_MAXHOST: ::socklen_t = 1025;
++
++pub const RLIMIT_NOFILE: ::c_int = 5;
++pub const RLIMIT_AS: ::c_int = 6;
++pub const RLIMIT_RSS: ::c_int = 7;
++pub const RLIMIT_NPROC: ::c_int = 8;
++pub const RLIMIT_MEMLOCK: ::c_int = 9;
++pub const RLIMIT_NLIMITS: ::c_int = 15;
++
++pub const O_APPEND: ::c_int = 8;
++pub const O_CREAT: ::c_int = 256;
++pub const O_EXCL: ::c_int = 1024;
++pub const O_NOCTTY: ::c_int = 2048;
++pub const O_NONBLOCK: ::c_int = 128;
++pub const O_SYNC: ::c_int = 0x10;
++pub const O_RSYNC: ::c_int = 0x10;
++pub const O_DSYNC: ::c_int = 0x10;
++pub const O_FSYNC: ::c_int = 0x10;
++pub const O_ASYNC: ::c_int = 0x1000;
++pub const O_NDELAY: ::c_int = 0x80;
++
++pub const SOCK_NONBLOCK: ::c_int = 128;
++
++pub const EDEADLK: ::c_int = 45;
++pub const ENAMETOOLONG: ::c_int = 78;
++pub const ENOLCK: ::c_int = 46;
++pub const ENOSYS: ::c_int = 89;
++pub const ENOTEMPTY: ::c_int = 93;
++pub const ELOOP: ::c_int = 90;
++pub const ENOMSG: ::c_int = 35;
++pub const EIDRM: ::c_int = 36;
++pub const ECHRNG: ::c_int = 37;
++pub const EL2NSYNC: ::c_int = 38;
++pub const EL3HLT: ::c_int = 39;
++pub const EL3RST: ::c_int = 40;
++pub const ELNRNG: ::c_int = 41;
++pub const EUNATCH: ::c_int = 42;
++pub const ENOCSI: ::c_int = 43;
++pub const EL2HLT: ::c_int = 44;
++pub const EBADE: ::c_int = 50;
++pub const EBADR: ::c_int = 51;
++pub const EXFULL: ::c_int = 52;
++pub const ENOANO: ::c_int = 53;
++pub const EBADRQC: ::c_int = 54;
++pub const EBADSLT: ::c_int = 55;
++pub const EDEADLOCK: ::c_int = 56;
++pub const EMULTIHOP: ::c_int = 74;
++pub const EOVERFLOW: ::c_int = 79;
++pub const ENOTUNIQ: ::c_int = 80;
++pub const EBADFD: ::c_int = 81;
++pub const EBADMSG: ::c_int = 77;
++pub const EREMCHG: ::c_int = 82;
++pub const ELIBACC: ::c_int = 83;
++pub const ELIBBAD: ::c_int = 84;
++pub const ELIBSCN: ::c_int = 85;
++pub const ELIBMAX: ::c_int = 86;
++pub const ELIBEXEC: ::c_int = 87;
++pub const EILSEQ: ::c_int = 88;
++pub const ERESTART: ::c_int = 91;
++pub const ESTRPIPE: ::c_int = 92;
++pub const EUSERS: ::c_int = 94;
++pub const ENOTSOCK: ::c_int = 95;
++pub const EDESTADDRREQ: ::c_int = 96;
++pub const EMSGSIZE: ::c_int = 97;
++pub const EPROTOTYPE: ::c_int = 98;
++pub const ENOPROTOOPT: ::c_int = 99;
++pub const EPROTONOSUPPORT: ::c_int = 120;
++pub const ESOCKTNOSUPPORT: ::c_int = 121;
++pub const EOPNOTSUPP: ::c_int = 122;
++pub const ENOTSUP: ::c_int = EOPNOTSUPP;
++pub const EPFNOSUPPORT: ::c_int = 123;
++pub const EAFNOSUPPORT: ::c_int = 124;
++pub const EADDRINUSE: ::c_int = 125;
++pub const EADDRNOTAVAIL: ::c_int = 126;
++pub const ENETDOWN: ::c_int = 127;
++pub const ENETUNREACH: ::c_int = 128;
++pub const ENETRESET: ::c_int = 129;
++pub const ECONNABORTED: ::c_int = 130;
++pub const ECONNRESET: ::c_int = 131;
++pub const ENOBUFS: ::c_int = 132;
++pub const EISCONN: ::c_int = 133;
++pub const ENOTCONN: ::c_int = 134;
++pub const ESHUTDOWN: ::c_int = 143;
++pub const ETOOMANYREFS: ::c_int = 144;
++pub const ETIMEDOUT: ::c_int = 145;
++pub const ECONNREFUSED: ::c_int = 146;
++pub const EHOSTDOWN: ::c_int = 147;
++pub const EHOSTUNREACH: ::c_int = 148;
++pub const EALREADY: ::c_int = 149;
++pub const EINPROGRESS: ::c_int = 150;
++pub const ESTALE: ::c_int = 151;
++pub const EUCLEAN: ::c_int = 135;
++pub const ENOTNAM: ::c_int = 137;
++pub const ENAVAIL: ::c_int = 138;
++pub const EISNAM: ::c_int = 139;
++pub const EREMOTEIO: ::c_int = 140;
++pub const EDQUOT: ::c_int = 1133;
++pub const ENOMEDIUM: ::c_int = 159;
++pub const EMEDIUMTYPE: ::c_int = 160;
++pub const ECANCELED: ::c_int = 158;
++pub const ENOKEY: ::c_int = 161;
++pub const EKEYEXPIRED: ::c_int = 162;
++pub const EKEYREVOKED: ::c_int = 163;
++pub const EKEYREJECTED: ::c_int = 164;
++pub const EOWNERDEAD: ::c_int = 165;
++pub const ENOTRECOVERABLE: ::c_int = 166;
++pub const ERFKILL: ::c_int = 167;
++
++pub const MAP_NORESERVE: ::c_int = 0x400;
++pub const MAP_ANON: ::c_int = 0x800;
++pub const MAP_ANONYMOUS: ::c_int = 0x800;
++pub const MAP_GROWSDOWN: ::c_int = 0x1000;
++pub const MAP_DENYWRITE: ::c_int = 0x2000;
++pub const MAP_EXECUTABLE: ::c_int = 0x4000;
++pub const MAP_LOCKED: ::c_int = 0x8000;
++pub const MAP_POPULATE: ::c_int = 0x10000;
++pub const MAP_NONBLOCK: ::c_int = 0x20000;
++pub const MAP_STACK: ::c_int = 0x40000;
++
++pub const SOCK_STREAM: ::c_int = 2;
++pub const SOCK_DGRAM: ::c_int = 1;
++pub const SOCK_SEQPACKET: ::c_int = 5;
++
++pub const SOL_SOCKET: ::c_int = 0xffff;
++
++pub const SO_REUSEADDR: ::c_int = 0x0004;
++pub const SO_KEEPALIVE: ::c_int = 0x0008;
++pub const SO_DONTROUTE: ::c_int = 0x0010;
++pub const SO_BROADCAST: ::c_int = 0x0020;
++pub const SO_LINGER: ::c_int = 0x0080;
++pub const SO_OOBINLINE: ::c_int = 0x0100;
++pub const SO_REUSEPORT: ::c_int = 0x0200;
++pub const SO_TYPE: ::c_int = 0x1008;
++pub const SO_STYLE: ::c_int = SO_TYPE;
++pub const SO_ERROR: ::c_int = 0x1007;
++pub const SO_SNDBUF: ::c_int = 0x1001;
++pub const SO_RCVBUF: ::c_int = 0x1002;
++pub const SO_SNDLOWAT: ::c_int = 0x1003;
++pub const SO_RCVLOWAT: ::c_int = 0x1004;
++pub const SO_SNDTIMEO: ::c_int = 0x1005;
++pub const SO_RCVTIMEO: ::c_int = 0x1006;
++pub const SO_ACCEPTCONN: ::c_int = 0x1009;
++pub const SO_PROTOCOL: ::c_int = 0x1028;
++pub const SO_DOMAIN: ::c_int = 0x1029;
++pub const SO_NO_CHECK: ::c_int = 11;
++pub const SO_PRIORITY: ::c_int = 12;
++pub const SO_BSDCOMPAT: ::c_int = 14;
++pub const SO_PASSCRED: ::c_int = 17;
++pub const SO_PEERCRED: ::c_int = 18;
++pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
++pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
++pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
++pub const SO_BINDTODEVICE: ::c_int = 25;
++pub const SO_ATTACH_FILTER: ::c_int = 26;
++pub const SO_DETACH_FILTER: ::c_int = 27;
++pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
++pub const SO_PEERNAME: ::c_int = 28;
++pub const SO_TIMESTAMP: ::c_int = 29;
++pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
++pub const SO_PEERSEC: ::c_int = 30;
++pub const SO_SNDBUFFORCE: ::c_int = 31;
++pub const SO_RCVBUFFORCE: ::c_int = 33;
++pub const SO_PASSSEC: ::c_int = 34;
++pub const SO_TIMESTAMPNS: ::c_int = 35;
++pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
++pub const SO_MARK: ::c_int = 36;
++pub const SO_TIMESTAMPING: ::c_int = 37;
++pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
++pub const SO_RXQ_OVFL: ::c_int = 40;
++pub const SO_WIFI_STATUS: ::c_int = 41;
++pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
++pub const SO_PEEK_OFF: ::c_int = 42;
++pub const SO_NOFCS: ::c_int = 43;
++pub const SO_LOCK_FILTER: ::c_int = 44;
++pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
++pub const SO_BUSY_POLL: ::c_int = 46;
++pub const SO_MAX_PACING_RATE: ::c_int = 47;
++pub const SO_BPF_EXTENSIONS: ::c_int = 48;
++
++pub const FIOCLEX: ::c_ulong = 0x6601;
++pub const FIONBIO: ::c_ulong = 0x667e;
++
++pub const SA_ONSTACK: ::c_int = 0x08000000;
++pub const SA_SIGINFO: ::c_int = 0x00000008;
++pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
++
++pub const SIGCHLD: ::c_int = 18;
++pub const SIGBUS: ::c_int = 10;
++pub const SIGTTIN: ::c_int = 26;
++pub const SIGTTOU: ::c_int = 27;
++pub const SIGXCPU: ::c_int = 30;
++pub const SIGXFSZ: ::c_int = 31;
++pub const SIGVTALRM: ::c_int = 28;
++pub const SIGPROF: ::c_int = 29;
++pub const SIGWINCH: ::c_int = 20;
++pub const SIGUSR1: ::c_int = 16;
++pub const SIGUSR2: ::c_int = 17;
++pub const SIGCONT: ::c_int = 25;
++pub const SIGSTOP: ::c_int = 23;
++pub const SIGTSTP: ::c_int = 24;
++pub const SIGURG: ::c_int = 21;
++pub const SIGIO: ::c_int = 22;
++pub const SIGSYS: ::c_int = 12;
++pub const SIGPOLL: ::c_int = 22;
++pub const SIGPWR: ::c_int = 19;
++pub const SIG_SETMASK: ::c_int = 3;
++pub const SIG_BLOCK: ::c_int = 0x1;
++pub const SIG_UNBLOCK: ::c_int = 0x2;
++
++pub const POLLRDNORM: ::c_short = 0x040;
++pub const POLLWRNORM: ::c_short = 0x004;
++pub const POLLRDBAND: ::c_short = 0x080;
++pub const POLLWRBAND: ::c_short = 0x100;
++
++pub const PTHREAD_STACK_MIN: ::size_t = 16384;
++
++pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
++pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
++pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
++pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
++pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
++pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
++pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
++pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
++pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
++pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
++pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
++pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
++pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
++pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
++pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
++pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
++pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
++pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
++pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
++pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
++pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
++pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
++pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
++pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
++pub const TMPFS_MAGIC: ::c_long = 0x01021994;
++pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
++
++pub const VEOF: usize = 16;
++pub const VEOL: usize = 17;
++pub const VEOL2: usize = 6;
++pub const VMIN: usize = 4;
++pub const IEXTEN: ::tcflag_t = 0x00000100;
++pub const TOSTOP: ::tcflag_t = 0x00008000;
++pub const FLUSHO: ::tcflag_t = 0x00002000;
++pub const IUTF8: ::tcflag_t = 0x00004000;
++pub const TCSANOW: ::c_int = 0x540e;
++pub const TCSADRAIN: ::c_int = 0x540f;
++pub const TCSAFLUSH: ::c_int = 0x5410;
++
++pub const CPU_SETSIZE: ::c_int = 0x400;
++
++pub const PTRACE_TRACEME: ::c_uint = 0;
++pub const PTRACE_PEEKTEXT: ::c_uint = 1;
++pub const PTRACE_PEEKDATA: ::c_uint = 2;
++pub const PTRACE_PEEKUSER: ::c_uint = 3;
++pub const PTRACE_POKETEXT: ::c_uint = 4;
++pub const PTRACE_POKEDATA: ::c_uint = 5;
++pub const PTRACE_POKEUSER: ::c_uint = 6;
++pub const PTRACE_CONT: ::c_uint = 7;
++pub const PTRACE_KILL: ::c_uint = 8;
++pub const PTRACE_SINGLESTEP: ::c_uint = 9;
++pub const PTRACE_ATTACH: ::c_uint = 16;
++pub const PTRACE_DETACH: ::c_uint = 17;
++pub const PTRACE_SYSCALL: ::c_uint = 24;
++pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
++pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
++pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
++pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
++pub const PTRACE_GETFPREGS: ::c_uint = 14;
++pub const PTRACE_SETFPREGS: ::c_uint = 15;
++pub const PTRACE_GETFPXREGS: ::c_uint = 18;
++pub const PTRACE_SETFPXREGS: ::c_uint = 19;
++pub const PTRACE_GETREGS: ::c_uint = 12;
++pub const PTRACE_SETREGS: ::c_uint = 13;
++
++pub const EFD_NONBLOCK: ::c_int = 0x80;
++
++pub const F_GETLK: ::c_int = 14;
++pub const F_GETOWN: ::c_int = 23;
++pub const F_SETOWN: ::c_int = 24;
++pub const F_SETLK: ::c_int = 6;
++pub const F_SETLKW: ::c_int = 7;
++
++pub const SFD_NONBLOCK: ::c_int = 0x80;
++
++pub const TCGETS: ::c_ulong = 0x540d;
++pub const TCSETS: ::c_ulong = 0x540e;
++pub const TCSETSW: ::c_ulong = 0x540f;
++pub const TCSETSF: ::c_ulong = 0x5410;
++pub const TCGETA: ::c_ulong = 0x5401;
++pub const TCSETA: ::c_ulong = 0x5402;
++pub const TCSETAW: ::c_ulong = 0x5403;
++pub const TCSETAF: ::c_ulong = 0x5404;
++pub const TCSBRK: ::c_ulong = 0x5405;
++pub const TCXONC: ::c_ulong = 0x5406;
++pub const TCFLSH: ::c_ulong = 0x5407;
++pub const TIOCGSOFTCAR: ::c_ulong = 0x5481;
++pub const TIOCSSOFTCAR: ::c_ulong = 0x5482;
++pub const TIOCINQ: ::c_ulong = 0x467f;
++pub const TIOCLINUX: ::c_ulong = 0x5483;
++pub const TIOCGSERIAL: ::c_ulong = 0x5484;
++pub const TIOCEXCL: ::c_ulong = 0x740d;
++pub const TIOCNXCL: ::c_ulong = 0x740e;
++pub const TIOCSCTTY: ::c_ulong = 0x5480;
++pub const TIOCGPGRP: ::c_ulong = 0x40047477;
++pub const TIOCSPGRP: ::c_ulong = 0x80047476;
++pub const TIOCOUTQ: ::c_ulong = 0x7472;
++pub const TIOCSTI: ::c_ulong = 0x5472;
++pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
++pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
++pub const TIOCMGET: ::c_ulong = 0x741d;
++pub const TIOCMBIS: ::c_ulong = 0x741b;
++pub const TIOCMBIC: ::c_ulong = 0x741c;
++pub const TIOCMSET: ::c_ulong = 0x741a;
++pub const FIONREAD: ::c_ulong = 0x467f;
++pub const TIOCCONS: ::c_ulong = 0x80047478;
++
++pub const RTLD_DEEPBIND: ::c_int = 0x10;
++pub const RTLD_GLOBAL: ::c_int = 0x4;
++pub const RTLD_NOLOAD: ::c_int = 0x8;
++
++pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
++pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
++pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
++pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
++pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
++
++pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
++pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
++pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
++pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
++pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
++pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
++pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
++pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
++
++pub const MCL_CURRENT: ::c_int = 0x0001;
++pub const MCL_FUTURE: ::c_int = 0x0002;
++
++pub const SIGSTKSZ: ::size_t = 8192;
++pub const CBAUD: ::tcflag_t = 0o0010017;
++pub const TAB1: ::c_int = 0x00000800;
++pub const TAB2: ::c_int = 0x00001000;
++pub const TAB3: ::c_int = 0x00001800;
++pub const CR1: ::c_int  = 0x00000200;
++pub const CR2: ::c_int  = 0x00000400;
++pub const CR3: ::c_int  = 0x00000600;
++pub const FF1: ::c_int  = 0x00008000;
++pub const BS1: ::c_int  = 0x00002000;
++pub const VT1: ::c_int  = 0x00004000;
++pub const VWERASE: usize = 14;
++pub const VREPRINT: usize = 12;
++pub const VSUSP: usize = 10;
++pub const VSTART: usize = 8;
++pub const VSTOP: usize = 9;
++pub const VDISCARD: usize = 13;
++pub const VTIME: usize = 5;
++pub const IXON: ::tcflag_t = 0x00000400;
++pub const IXOFF: ::tcflag_t = 0x00001000;
++pub const ONLCR: ::tcflag_t = 0x4;
++pub const CSIZE: ::tcflag_t = 0x00000030;
++pub const CS6: ::tcflag_t = 0x00000010;
++pub const CS7: ::tcflag_t = 0x00000020;
++pub const CS8: ::tcflag_t = 0x00000030;
++pub const CSTOPB: ::tcflag_t = 0x00000040;
++pub const CREAD: ::tcflag_t = 0x00000080;
++pub const PARENB: ::tcflag_t = 0x00000100;
++pub const PARODD: ::tcflag_t = 0x00000200;
++pub const HUPCL: ::tcflag_t = 0x00000400;
++pub const CLOCAL: ::tcflag_t = 0x00000800;
++pub const ECHOKE: ::tcflag_t = 0x00000800;
++pub const ECHOE: ::tcflag_t = 0x00000010;
++pub const ECHOK: ::tcflag_t = 0x00000020;
++pub const ECHONL: ::tcflag_t = 0x00000040;
++pub const ECHOPRT: ::tcflag_t = 0x00000400;
++pub const ECHOCTL: ::tcflag_t = 0x00000200;
++pub const ISIG: ::tcflag_t = 0x00000001;
++pub const ICANON: ::tcflag_t = 0x00000002;
++pub const PENDIN: ::tcflag_t = 0x00004000;
++pub const NOFLSH: ::tcflag_t = 0x00000080;
++
++pub const B0: ::speed_t = 0o000000;
++pub const B50: ::speed_t = 0o000001;
++pub const B75: ::speed_t = 0o000002;
++pub const B110: ::speed_t = 0o000003;
++pub const B134: ::speed_t = 0o000004;
++pub const B150: ::speed_t = 0o000005;
++pub const B200: ::speed_t = 0o000006;
++pub const B300: ::speed_t = 0o000007;
++pub const B600: ::speed_t = 0o000010;
++pub const B1200: ::speed_t = 0o000011;
++pub const B1800: ::speed_t = 0o000012;
++pub const B2400: ::speed_t = 0o000013;
++pub const B4800: ::speed_t = 0o000014;
++pub const B9600: ::speed_t = 0o000015;
++pub const B19200: ::speed_t = 0o000016;
++pub const B38400: ::speed_t = 0o000017;
++pub const EXTA: ::speed_t = B19200;
++pub const EXTB: ::speed_t = B38400;
++pub const B57600: ::speed_t = 0o010001;
++pub const B115200: ::speed_t = 0o010002;
++pub const B230400: ::speed_t = 0o010003;
++pub const B460800: ::speed_t = 0o010004;
++pub const B500000: ::speed_t = 0o010005;
++pub const B576000: ::speed_t = 0o010006;
++pub const B921600: ::speed_t = 0o010007;
++pub const B1000000: ::speed_t = 0o010010;
++pub const B1152000: ::speed_t = 0o010011;
++pub const B1500000: ::speed_t = 0o010012;
++pub const B2000000: ::speed_t = 0o010013;
++pub const B2500000: ::speed_t = 0o010014;
++pub const B3000000: ::speed_t = 0o010015;
++pub const B3500000: ::speed_t = 0o010016;
++pub const B4000000: ::speed_t = 0o010017;
++
++cfg_if! {
++    if #[cfg(target_arch = "mips")] {
++        mod mips32;
++        pub use self::mips32::*;
++    } else if #[cfg(target_arch = "mips64")] {
++        mod mips64;
++        pub use self::mips64::*;
++    } else {
++        // Unknown target_arch
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..baadb8b46ff86bd5a687662c4cf5f415484f3513
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1776 @@@
++use dox::{mem, Option};
++
++pub type sa_family_t = u16;
++pub type pthread_key_t = ::c_uint;
++pub type speed_t = ::c_uint;
++pub type tcflag_t = ::c_uint;
++pub type loff_t = ::c_longlong;
++pub type clockid_t = ::c_int;
++pub type key_t = ::c_int;
++pub type id_t = ::c_uint;
++pub type useconds_t = u32;
++pub type dev_t = u64;
++pub type socklen_t = u32;
++pub type pthread_t = ::c_ulong;
++pub type mode_t = u32;
++pub type ino64_t = u64;
++pub type off64_t = i64;
++pub type blkcnt64_t = i64;
++pub type rlim64_t = u64;
++pub type shmatt_t = ::c_ulong;
++pub type mqd_t = ::c_int;
++pub type msgqnum_t = ::c_ulong;
++pub type msglen_t = ::c_ulong;
++pub type nfds_t = ::c_ulong;
++pub type nl_item = ::c_int;
++pub type idtype_t = ::c_uint;
++
++pub enum fpos64_t {} // TODO: fill this out with a struct
++
++pub enum timezone {}
++
++s! {
++    pub struct sockaddr {
++        pub sa_family: sa_family_t,
++        pub sa_data: [::c_char; 14],
++    }
++
++    pub struct sockaddr_in {
++        pub sin_family: sa_family_t,
++        pub sin_port: ::in_port_t,
++        pub sin_addr: ::in_addr,
++        pub sin_zero: [u8; 8],
++    }
++
++    pub struct sockaddr_in6 {
++        pub sin6_family: sa_family_t,
++        pub sin6_port: ::in_port_t,
++        pub sin6_flowinfo: u32,
++        pub sin6_addr: ::in6_addr,
++        pub sin6_scope_id: u32,
++    }
++
++    pub struct sockaddr_un {
++        pub sun_family: sa_family_t,
++        pub sun_path: [::c_char; 108]
++    }
++
++    pub struct sockaddr_storage {
++        pub ss_family: sa_family_t,
++        __ss_align: ::size_t,
++        #[cfg(target_pointer_width = "32")]
++        __ss_pad2: [u8; 128 - 2 * 4],
++        #[cfg(target_pointer_width = "64")]
++        __ss_pad2: [u8; 128 - 2 * 8],
++    }
++
++    pub struct addrinfo {
++        pub ai_flags: ::c_int,
++        pub ai_family: ::c_int,
++        pub ai_socktype: ::c_int,
++        pub ai_protocol: ::c_int,
++        pub ai_addrlen: socklen_t,
++
++        pub ai_addr: *mut ::sockaddr,
++
++        pub ai_canonname: *mut c_char,
++
++        pub ai_next: *mut addrinfo,
++    }
++
++    pub struct sockaddr_nl {
++        pub nl_family: ::sa_family_t,
++        nl_pad: ::c_ushort,
++        pub nl_pid: u32,
++        pub nl_groups: u32
++    }
++
++    pub struct sockaddr_ll {
++        pub sll_family: ::c_ushort,
++        pub sll_protocol: ::c_ushort,
++        pub sll_ifindex: ::c_int,
++        pub sll_hatype: ::c_ushort,
++        pub sll_pkttype: ::c_uchar,
++        pub sll_halen: ::c_uchar,
++        pub sll_addr: [::c_uchar; 8]
++    }
++
++    pub struct fd_set {
++        fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE],
++    }
++
++    pub struct tm {
++        pub tm_sec: ::c_int,
++        pub tm_min: ::c_int,
++        pub tm_hour: ::c_int,
++        pub tm_mday: ::c_int,
++        pub tm_mon: ::c_int,
++        pub tm_year: ::c_int,
++        pub tm_wday: ::c_int,
++        pub tm_yday: ::c_int,
++        pub tm_isdst: ::c_int,
++        pub tm_gmtoff: ::c_long,
++        pub tm_zone: *const ::c_char,
++    }
++
++    pub struct sched_param {
++        pub sched_priority: ::c_int,
++    }
++
++    pub struct Dl_info {
++        pub dli_fname: *const ::c_char,
++        pub dli_fbase: *mut ::c_void,
++        pub dli_sname: *const ::c_char,
++        pub dli_saddr: *mut ::c_void,
++    }
++
++    #[cfg_attr(any(all(target_arch = "x86",
++                   target_arch = "x86_64")),
++               repr(packed))]
++    pub struct epoll_event {
++        pub events: ::uint32_t,
++        pub u64: ::uint64_t,
++    }
++
++    pub struct utsname {
++        pub sysname: [::c_char; 65],
++        pub nodename: [::c_char; 65],
++        pub release: [::c_char; 65],
++        pub version: [::c_char; 65],
++        pub machine: [::c_char; 65],
++        pub domainname: [::c_char; 65]
++    }
++
++    pub struct lconv {
++        pub decimal_point: *mut ::c_char,
++        pub thousands_sep: *mut ::c_char,
++        pub grouping: *mut ::c_char,
++        pub int_curr_symbol: *mut ::c_char,
++        pub currency_symbol: *mut ::c_char,
++        pub mon_decimal_point: *mut ::c_char,
++        pub mon_thousands_sep: *mut ::c_char,
++        pub mon_grouping: *mut ::c_char,
++        pub positive_sign: *mut ::c_char,
++        pub negative_sign: *mut ::c_char,
++        pub int_frac_digits: ::c_char,
++        pub frac_digits: ::c_char,
++        pub p_cs_precedes: ::c_char,
++        pub p_sep_by_space: ::c_char,
++        pub n_cs_precedes: ::c_char,
++        pub n_sep_by_space: ::c_char,
++        pub p_sign_posn: ::c_char,
++        pub n_sign_posn: ::c_char,
++        pub int_p_cs_precedes: ::c_char,
++        pub int_p_sep_by_space: ::c_char,
++        pub int_n_cs_precedes: ::c_char,
++        pub int_n_sep_by_space: ::c_char,
++        pub int_p_sign_posn: ::c_char,
++        pub int_n_sign_posn: ::c_char,
++    }
++
++    pub struct sigevent {
++        pub sigev_value: ::sigval,
++        pub sigev_signo: ::c_int,
++        pub sigev_notify: ::c_int,
++        // Actually a union.  We only expose sigev_notify_thread_id because it's
++        // the most useful member
++        pub sigev_notify_thread_id: ::c_int,
++        #[cfg(target_pointer_width = "64")]
++        __unused1: [::c_int; 11],
++        #[cfg(target_pointer_width = "32")]
++        __unused1: [::c_int; 12]
++    }
++
++    pub struct dirent {
++        pub d_ino: ::ino_t,
++        pub d_off: ::off_t,
++        pub d_reclen: ::c_ushort,
++        pub d_type: ::c_uchar,
++        pub d_name: [::c_char; 256],
++    }
++
++    pub struct dirent64 {
++        pub d_ino: ::ino64_t,
++        pub d_off: ::off64_t,
++        pub d_reclen: ::c_ushort,
++        pub d_type: ::c_uchar,
++        pub d_name: [::c_char; 256],
++    }
++
++    pub struct rlimit64 {
++        pub rlim_cur: rlim64_t,
++        pub rlim_max: rlim64_t,
++    }
++
++    pub struct glob_t {
++        pub gl_pathc: ::size_t,
++        pub gl_pathv: *mut *mut c_char,
++        pub gl_offs: ::size_t,
++        pub gl_flags: ::c_int,
++
++        __unused1: *mut ::c_void,
++        __unused2: *mut ::c_void,
++        __unused3: *mut ::c_void,
++        __unused4: *mut ::c_void,
++        __unused5: *mut ::c_void,
++    }
++
++    pub struct ifaddrs {
++        pub ifa_next: *mut ifaddrs,
++        pub ifa_name: *mut c_char,
++        pub ifa_flags: ::c_uint,
++        pub ifa_addr: *mut ::sockaddr,
++        pub ifa_netmask: *mut ::sockaddr,
++        pub ifa_ifu: *mut ::sockaddr, // FIXME This should be a union
++        pub ifa_data: *mut ::c_void
++    }
++
++    pub struct pthread_mutex_t {
++        #[cfg(any(target_arch = "mips", target_arch = "arm",
++                  target_arch = "powerpc"))]
++        __align: [::c_long; 0],
++        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
++                      target_arch = "powerpc")))]
++        __align: [::c_longlong; 0],
++        size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
++    }
++
++    pub struct pthread_rwlock_t {
++        #[cfg(any(target_arch = "mips", target_arch = "arm",
++                  target_arch = "powerpc"))]
++        __align: [::c_long; 0],
++        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
++                      target_arch = "powerpc")))]
++        __align: [::c_longlong; 0],
++        size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
++    }
++
++    pub struct pthread_mutexattr_t {
++        #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
++                  target_arch = "mips64", target_arch = "s390x",
++                  target_arch = "sparc64"))]
++        __align: [::c_int; 0],
++        #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
++                      target_arch = "mips64", target_arch = "s390x",
++                      target_arch = "sparc64")))]
++        __align: [::c_long; 0],
++        size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
++    }
++
++    pub struct pthread_rwlockattr_t {
++        __lockkind: ::c_int,
++        __pshared: ::c_int,
++    }
++
++    pub struct pthread_cond_t {
++        __align: [::c_longlong; 0],
++        size: [u8; __SIZEOF_PTHREAD_COND_T],
++    }
++
++    pub struct pthread_condattr_t {
++        __align: [::c_int; 0],
++        size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
++    }
++
++    pub struct passwd {
++        pub pw_name: *mut ::c_char,
++        pub pw_passwd: *mut ::c_char,
++        pub pw_uid: ::uid_t,
++        pub pw_gid: ::gid_t,
++        pub pw_gecos: *mut ::c_char,
++        pub pw_dir: *mut ::c_char,
++        pub pw_shell: *mut ::c_char,
++    }
++
++    pub struct spwd {
++        pub sp_namp: *mut ::c_char,
++        pub sp_pwdp: *mut ::c_char,
++        pub sp_lstchg: ::c_long,
++        pub sp_min: ::c_long,
++        pub sp_max: ::c_long,
++        pub sp_warn: ::c_long,
++        pub sp_inact: ::c_long,
++        pub sp_expire: ::c_long,
++        pub sp_flag: ::c_ulong,
++    }
++
++    pub struct statvfs {
++        pub f_bsize: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_favail: ::fsfilcnt_t,
++        #[cfg(target_endian = "little")]
++        pub f_fsid: ::c_ulong,
++        #[cfg(target_pointer_width = "32")]
++        __f_unused: ::c_int,
++        #[cfg(target_endian = "big")]
++        pub f_fsid: ::c_ulong,
++        pub f_flag: ::c_ulong,
++        pub f_namemax: ::c_ulong,
++        __f_spare: [::c_int; 6],
++    }
++
++    pub struct dqblk {
++        pub dqb_bhardlimit: ::uint32_t,
++        pub dqb_bsoftlimit: ::uint32_t,
++        pub dqb_curblocks: ::uint32_t,
++        pub dqb_ihardlimit: ::uint32_t,
++        pub dqb_isoftlimit: ::uint32_t,
++        pub dqb_curinodes: ::uint32_t,
++        pub dqb_btime: ::time_t,
++        pub dqb_itime: ::time_t,
++    }
++
++    pub struct signalfd_siginfo {
++        pub ssi_signo: ::uint32_t,
++        pub ssi_errno: ::int32_t,
++        pub ssi_code: ::int32_t,
++        pub ssi_pid: ::uint32_t,
++        pub ssi_uid: ::uint32_t,
++        pub ssi_fd: ::int32_t,
++        pub ssi_tid: ::uint32_t,
++        pub ssi_band: ::uint32_t,
++        pub ssi_overrun: ::uint32_t,
++        pub ssi_trapno: ::uint32_t,
++        pub ssi_status: ::int32_t,
++        pub ssi_int: ::int32_t,
++        pub ssi_ptr: ::uint64_t,
++        pub ssi_utime: ::uint64_t,
++        pub ssi_stime: ::uint64_t,
++        pub ssi_addr: ::uint64_t,
++        _pad: [::uint8_t; 48],
++    }
++
++    pub struct fsid_t {
++        __val: [::c_int; 2],
++    }
++
++    pub struct mq_attr {
++        pub mq_flags: ::c_long,
++        pub mq_maxmsg: ::c_long,
++        pub mq_msgsize: ::c_long,
++        pub mq_curmsgs: ::c_long,
++        pad: [::c_long; 4]
++    }
++
++    pub struct cpu_set_t {
++        #[cfg(target_pointer_width = "32")]
++        bits: [u32; 32],
++        #[cfg(target_pointer_width = "64")]
++        bits: [u64; 16],
++    }
++
++    pub struct if_nameindex {
++        pub if_index: ::c_uint,
++        pub if_name: *mut ::c_char,
++    }
++
++    // System V IPC
++    pub struct msginfo {
++        pub msgpool: ::c_int,
++        pub msgmap: ::c_int,
++        pub msgmax: ::c_int,
++        pub msgmnb: ::c_int,
++        pub msgmni: ::c_int,
++        pub msgssz: ::c_int,
++        pub msgtql: ::c_int,
++        pub msgseg: ::c_ushort,
++    }
++}
++
++// intentionally not public, only used for fd_set
++cfg_if! {
++    if #[cfg(target_pointer_width = "32")] {
++        const ULONG_SIZE: usize = 32;
++    } else if #[cfg(target_pointer_width = "64")] {
++        const ULONG_SIZE: usize = 64;
++    } else {
++        // Unknown target_pointer_width
++    }
++}
++
++pub const EXIT_FAILURE: ::c_int = 1;
++pub const EXIT_SUCCESS: ::c_int = 0;
++pub const RAND_MAX: ::c_int = 2147483647;
++pub const EOF: ::c_int = -1;
++pub const SEEK_SET: ::c_int = 0;
++pub const SEEK_CUR: ::c_int = 1;
++pub const SEEK_END: ::c_int = 2;
++pub const _IOFBF: ::c_int = 0;
++pub const _IONBF: ::c_int = 2;
++pub const _IOLBF: ::c_int = 1;
++
++pub const F_DUPFD: ::c_int = 0;
++pub const F_GETFD: ::c_int = 1;
++pub const F_SETFD: ::c_int = 2;
++pub const F_GETFL: ::c_int = 3;
++pub const F_SETFL: ::c_int = 4;
++
++// Linux-specific fcntls
++pub const F_SETLEASE: ::c_int = 1024;
++pub const F_GETLEASE: ::c_int = 1025;
++pub const F_NOTIFY: ::c_int = 1026;
++pub const F_DUPFD_CLOEXEC: ::c_int = 1030;
++
++// TODO(#235): Include file sealing fcntls once we have a way to verify them.
++
++pub const SIGTRAP: ::c_int = 5;
++
++pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
++pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
++
++pub const CLOCK_REALTIME: clockid_t = 0;
++pub const CLOCK_MONOTONIC: clockid_t = 1;
++pub const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 2;
++pub const CLOCK_THREAD_CPUTIME_ID: clockid_t = 3;
++// TODO(#247) Someday our Travis shall have glibc 2.21 (released in Sep
++// 2014.) See also musl/mod.rs
++// pub const CLOCK_SGI_CYCLE: clockid_t = 10;
++// pub const CLOCK_TAI: clockid_t = 11;
++pub const TIMER_ABSTIME: ::c_int = 1;
++
++pub const RLIMIT_CPU: ::c_int = 0;
++pub const RLIMIT_FSIZE: ::c_int = 1;
++pub const RLIMIT_DATA: ::c_int = 2;
++pub const RLIMIT_STACK: ::c_int = 3;
++pub const RLIMIT_CORE: ::c_int = 4;
++pub const RLIMIT_LOCKS: ::c_int = 10;
++pub const RLIMIT_SIGPENDING: ::c_int = 11;
++pub const RLIMIT_MSGQUEUE: ::c_int = 12;
++pub const RLIMIT_NICE: ::c_int = 13;
++pub const RLIMIT_RTPRIO: ::c_int = 14;
++
++pub const RUSAGE_SELF: ::c_int = 0;
++
++pub const O_RDONLY: ::c_int = 0;
++pub const O_WRONLY: ::c_int = 1;
++pub const O_RDWR: ::c_int = 2;
++
++pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC;
++
++pub const S_IFIFO: ::mode_t = 4096;
++pub const S_IFCHR: ::mode_t = 8192;
++pub const S_IFBLK: ::mode_t = 24576;
++pub const S_IFDIR: ::mode_t = 16384;
++pub const S_IFREG: ::mode_t = 32768;
++pub const S_IFLNK: ::mode_t = 40960;
++pub const S_IFSOCK: ::mode_t = 49152;
++pub const S_IFMT: ::mode_t = 61440;
++pub const S_IRWXU: ::mode_t = 448;
++pub const S_IXUSR: ::mode_t = 64;
++pub const S_IWUSR: ::mode_t = 128;
++pub const S_IRUSR: ::mode_t = 256;
++pub const S_IRWXG: ::mode_t = 56;
++pub const S_IXGRP: ::mode_t = 8;
++pub const S_IWGRP: ::mode_t = 16;
++pub const S_IRGRP: ::mode_t = 32;
++pub const S_IRWXO: ::mode_t = 7;
++pub const S_IXOTH: ::mode_t = 1;
++pub const S_IWOTH: ::mode_t = 2;
++pub const S_IROTH: ::mode_t = 4;
++pub const F_OK: ::c_int = 0;
++pub const R_OK: ::c_int = 4;
++pub const W_OK: ::c_int = 2;
++pub const X_OK: ::c_int = 1;
++pub const STDIN_FILENO: ::c_int = 0;
++pub const STDOUT_FILENO: ::c_int = 1;
++pub const STDERR_FILENO: ::c_int = 2;
++pub const SIGHUP: ::c_int = 1;
++pub const SIGINT: ::c_int = 2;
++pub const SIGQUIT: ::c_int = 3;
++pub const SIGILL: ::c_int = 4;
++pub const SIGABRT: ::c_int = 6;
++pub const SIGFPE: ::c_int = 8;
++pub const SIGKILL: ::c_int = 9;
++pub const SIGSEGV: ::c_int = 11;
++pub const SIGPIPE: ::c_int = 13;
++pub const SIGALRM: ::c_int = 14;
++pub const SIGTERM: ::c_int = 15;
++
++pub const PROT_NONE: ::c_int = 0;
++pub const PROT_READ: ::c_int = 1;
++pub const PROT_WRITE: ::c_int = 2;
++pub const PROT_EXEC: ::c_int = 4;
++
++pub const LC_CTYPE: ::c_int = 0;
++pub const LC_NUMERIC: ::c_int = 1;
++pub const LC_MONETARY: ::c_int = 2;
++pub const LC_TIME: ::c_int = 3;
++pub const LC_COLLATE: ::c_int = 4;
++pub const LC_MESSAGES: ::c_int = 5;
++pub const LC_ALL: ::c_int = 6;
++pub const LC_CTYPE_MASK: ::c_int = (1 << LC_CTYPE);
++pub const LC_NUMERIC_MASK: ::c_int = (1 << LC_NUMERIC);
++pub const LC_TIME_MASK: ::c_int = (1 << LC_TIME);
++pub const LC_COLLATE_MASK: ::c_int = (1 << LC_COLLATE);
++pub const LC_MONETARY_MASK: ::c_int = (1 << LC_MONETARY);
++pub const LC_MESSAGES_MASK: ::c_int = (1 << LC_MESSAGES);
++// LC_ALL_MASK defined per platform
++
++pub const MAP_FILE: ::c_int = 0x0000;
++pub const MAP_SHARED: ::c_int = 0x0001;
++pub const MAP_PRIVATE: ::c_int = 0x0002;
++pub const MAP_FIXED: ::c_int = 0x0010;
++
++pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
++
++// MS_ flags for msync(2)
++pub const MS_ASYNC: ::c_int = 0x0001;
++pub const MS_INVALIDATE: ::c_int = 0x0002;
++pub const MS_SYNC: ::c_int = 0x0004;
++
++// MS_ flags for mount(2)
++pub const MS_RDONLY: ::c_ulong = 0x01;
++pub const MS_NOSUID: ::c_ulong = 0x02;
++pub const MS_NODEV: ::c_ulong = 0x04;
++pub const MS_NOEXEC: ::c_ulong = 0x08;
++pub const MS_SYNCHRONOUS: ::c_ulong = 0x10;
++pub const MS_REMOUNT: ::c_ulong = 0x20;
++pub const MS_MANDLOCK: ::c_ulong = 0x40;
++pub const MS_NOATIME: ::c_ulong = 0x0400;
++pub const MS_NODIRATIME: ::c_ulong = 0x0800;
++pub const MS_BIND: ::c_ulong = 0x1000;
++pub const MS_NOUSER: ::c_ulong = 0x80000000;
++pub const MS_MGC_VAL: ::c_ulong = 0xc0ed0000;
++pub const MS_MGC_MSK: ::c_ulong = 0xffff0000;
++pub const MS_RMT_MASK: ::c_ulong = 0x800051;
++
++pub const EPERM: ::c_int = 1;
++pub const ENOENT: ::c_int = 2;
++pub const ESRCH: ::c_int = 3;
++pub const EINTR: ::c_int = 4;
++pub const EIO: ::c_int = 5;
++pub const ENXIO: ::c_int = 6;
++pub const E2BIG: ::c_int = 7;
++pub const ENOEXEC: ::c_int = 8;
++pub const EBADF: ::c_int = 9;
++pub const ECHILD: ::c_int = 10;
++pub const EAGAIN: ::c_int = 11;
++pub const ENOMEM: ::c_int = 12;
++pub const EACCES: ::c_int = 13;
++pub const EFAULT: ::c_int = 14;
++pub const ENOTBLK: ::c_int = 15;
++pub const EBUSY: ::c_int = 16;
++pub const EEXIST: ::c_int = 17;
++pub const EXDEV: ::c_int = 18;
++pub const ENODEV: ::c_int = 19;
++pub const ENOTDIR: ::c_int = 20;
++pub const EISDIR: ::c_int = 21;
++pub const EINVAL: ::c_int = 22;
++pub const ENFILE: ::c_int = 23;
++pub const EMFILE: ::c_int = 24;
++pub const ENOTTY: ::c_int = 25;
++pub const ETXTBSY: ::c_int = 26;
++pub const EFBIG: ::c_int = 27;
++pub const ENOSPC: ::c_int = 28;
++pub const ESPIPE: ::c_int = 29;
++pub const EROFS: ::c_int = 30;
++pub const EMLINK: ::c_int = 31;
++pub const EPIPE: ::c_int = 32;
++pub const EDOM: ::c_int = 33;
++pub const ERANGE: ::c_int = 34;
++pub const EWOULDBLOCK: ::c_int = EAGAIN;
++
++pub const SCM_RIGHTS: ::c_int = 0x01;
++pub const SCM_CREDENTIALS: ::c_int = 0x02;
++
++pub const IPPROTO_RAW: ::c_int = 255;
++
++pub const PROT_GROWSDOWN: ::c_int = 0x1000000;
++pub const PROT_GROWSUP: ::c_int = 0x2000000;
++
++pub const MAP_TYPE: ::c_int = 0x000f;
++
++pub const MADV_NORMAL: ::c_int = 0;
++pub const MADV_RANDOM: ::c_int = 1;
++pub const MADV_SEQUENTIAL: ::c_int = 2;
++pub const MADV_WILLNEED: ::c_int = 3;
++pub const MADV_DONTNEED: ::c_int = 4;
++pub const MADV_REMOVE: ::c_int = 9;
++pub const MADV_DONTFORK: ::c_int = 10;
++pub const MADV_DOFORK: ::c_int = 11;
++pub const MADV_MERGEABLE: ::c_int = 12;
++pub const MADV_UNMERGEABLE: ::c_int = 13;
++pub const MADV_HWPOISON: ::c_int = 100;
++
++pub const IFF_UP: ::c_int = 0x1;
++pub const IFF_BROADCAST: ::c_int = 0x2;
++pub const IFF_DEBUG: ::c_int = 0x4;
++pub const IFF_LOOPBACK: ::c_int = 0x8;
++pub const IFF_POINTOPOINT: ::c_int = 0x10;
++pub const IFF_NOTRAILERS: ::c_int = 0x20;
++pub const IFF_RUNNING: ::c_int = 0x40;
++pub const IFF_NOARP: ::c_int = 0x80;
++pub const IFF_PROMISC: ::c_int = 0x100;
++pub const IFF_ALLMULTI: ::c_int = 0x200;
++pub const IFF_MASTER: ::c_int = 0x400;
++pub const IFF_SLAVE: ::c_int = 0x800;
++pub const IFF_MULTICAST: ::c_int = 0x1000;
++pub const IFF_PORTSEL: ::c_int = 0x2000;
++pub const IFF_AUTOMEDIA: ::c_int = 0x4000;
++pub const IFF_DYNAMIC: ::c_int = 0x8000;
++
++pub const SOL_IP: ::c_int = 0;
++pub const SOL_TCP: ::c_int = 6;
++pub const SOL_IPV6: ::c_int = 41;
++pub const SOL_ICMPV6: ::c_int = 58;
++pub const SOL_RAW: ::c_int = 255;
++pub const SOL_DECNET: ::c_int = 261;
++pub const SOL_X25: ::c_int = 262;
++pub const SOL_PACKET: ::c_int = 263;
++pub const SOL_ATM: ::c_int = 264;
++pub const SOL_AAL: ::c_int = 265;
++pub const SOL_IRDA: ::c_int = 266;
++
++pub const AF_UNSPEC: ::c_int = 0;
++pub const AF_UNIX: ::c_int = 1;
++pub const AF_LOCAL: ::c_int = 1;
++pub const AF_INET: ::c_int = 2;
++pub const AF_AX25: ::c_int = 3;
++pub const AF_IPX: ::c_int = 4;
++pub const AF_APPLETALK: ::c_int = 5;
++pub const AF_NETROM: ::c_int = 6;
++pub const AF_BRIDGE: ::c_int = 7;
++pub const AF_ATMPVC: ::c_int = 8;
++pub const AF_X25: ::c_int = 9;
++pub const AF_INET6: ::c_int = 10;
++pub const AF_ROSE: ::c_int = 11;
++pub const AF_DECnet: ::c_int = 12;
++pub const AF_NETBEUI: ::c_int = 13;
++pub const AF_SECURITY: ::c_int = 14;
++pub const AF_KEY: ::c_int = 15;
++pub const AF_NETLINK: ::c_int = 16;
++pub const AF_ROUTE: ::c_int = AF_NETLINK;
++pub const AF_PACKET: ::c_int = 17;
++pub const AF_ASH: ::c_int = 18;
++pub const AF_ECONET: ::c_int = 19;
++pub const AF_ATMSVC: ::c_int = 20;
++pub const AF_SNA: ::c_int = 22;
++pub const AF_IRDA: ::c_int = 23;
++pub const AF_PPPOX: ::c_int = 24;
++pub const AF_WANPIPE: ::c_int = 25;
++pub const AF_LLC: ::c_int = 26;
++pub const AF_CAN: ::c_int = 29;
++pub const AF_TIPC: ::c_int = 30;
++pub const AF_BLUETOOTH: ::c_int = 31;
++pub const AF_IUCV: ::c_int = 32;
++pub const AF_RXRPC: ::c_int = 33;
++pub const AF_ISDN: ::c_int = 34;
++pub const AF_PHONET: ::c_int = 35;
++pub const AF_IEEE802154: ::c_int = 36;
++pub const AF_CAIF: ::c_int = 37;
++pub const AF_ALG: ::c_int = 38;
++
++pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
++pub const PF_UNIX: ::c_int = AF_UNIX;
++pub const PF_LOCAL: ::c_int = AF_LOCAL;
++pub const PF_INET: ::c_int = AF_INET;
++pub const PF_AX25: ::c_int = AF_AX25;
++pub const PF_IPX: ::c_int = AF_IPX;
++pub const PF_APPLETALK: ::c_int = AF_APPLETALK;
++pub const PF_NETROM: ::c_int = AF_NETROM;
++pub const PF_BRIDGE: ::c_int = AF_BRIDGE;
++pub const PF_ATMPVC: ::c_int = AF_ATMPVC;
++pub const PF_X25: ::c_int = AF_X25;
++pub const PF_INET6: ::c_int = AF_INET6;
++pub const PF_ROSE: ::c_int = AF_ROSE;
++pub const PF_DECnet: ::c_int = AF_DECnet;
++pub const PF_NETBEUI: ::c_int = AF_NETBEUI;
++pub const PF_SECURITY: ::c_int = AF_SECURITY;
++pub const PF_KEY: ::c_int = AF_KEY;
++pub const PF_NETLINK: ::c_int = AF_NETLINK;
++pub const PF_ROUTE: ::c_int = AF_ROUTE;
++pub const PF_PACKET: ::c_int = AF_PACKET;
++pub const PF_ASH: ::c_int = AF_ASH;
++pub const PF_ECONET: ::c_int = AF_ECONET;
++pub const PF_ATMSVC: ::c_int = AF_ATMSVC;
++pub const PF_SNA: ::c_int = AF_SNA;
++pub const PF_IRDA: ::c_int = AF_IRDA;
++pub const PF_PPPOX: ::c_int = AF_PPPOX;
++pub const PF_WANPIPE: ::c_int = AF_WANPIPE;
++pub const PF_LLC: ::c_int = AF_LLC;
++pub const PF_CAN: ::c_int = AF_CAN;
++pub const PF_TIPC: ::c_int = AF_TIPC;
++pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
++pub const PF_IUCV: ::c_int = AF_IUCV;
++pub const PF_RXRPC: ::c_int = AF_RXRPC;
++pub const PF_ISDN: ::c_int = AF_ISDN;
++pub const PF_PHONET: ::c_int = AF_PHONET;
++pub const PF_IEEE802154: ::c_int = AF_IEEE802154;
++pub const PF_CAIF: ::c_int = AF_CAIF;
++pub const PF_ALG: ::c_int = AF_ALG;
++
++pub const SOMAXCONN: ::c_int = 128;
++
++pub const MSG_OOB: ::c_int = 1;
++pub const MSG_PEEK: ::c_int = 2;
++pub const MSG_DONTROUTE: ::c_int = 4;
++pub const MSG_CTRUNC: ::c_int = 8;
++pub const MSG_TRUNC: ::c_int = 0x20;
++pub const MSG_DONTWAIT: ::c_int = 0x40;
++pub const MSG_EOR: ::c_int = 0x80;
++pub const MSG_WAITALL: ::c_int = 0x100;
++pub const MSG_FIN: ::c_int = 0x200;
++pub const MSG_SYN: ::c_int = 0x400;
++pub const MSG_CONFIRM: ::c_int = 0x800;
++pub const MSG_RST: ::c_int = 0x1000;
++pub const MSG_ERRQUEUE: ::c_int = 0x2000;
++pub const MSG_NOSIGNAL: ::c_int = 0x4000;
++pub const MSG_MORE: ::c_int = 0x8000;
++pub const MSG_WAITFORONE: ::c_int = 0x10000;
++pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000;
++
++pub const SOCK_RAW: ::c_int = 3;
++pub const IP_MULTICAST_TTL: ::c_int = 33;
++pub const IP_MULTICAST_LOOP: ::c_int = 34;
++pub const IP_TTL: ::c_int = 2;
++pub const IP_HDRINCL: ::c_int = 3;
++pub const IP_ADD_MEMBERSHIP: ::c_int = 35;
++pub const IP_DROP_MEMBERSHIP: ::c_int = 36;
++
++pub const TCP_NODELAY: ::c_int = 1;
++pub const TCP_MAXSEG: ::c_int = 2;
++pub const TCP_CORK: ::c_int = 3;
++pub const TCP_KEEPIDLE: ::c_int = 4;
++pub const TCP_KEEPINTVL: ::c_int = 5;
++pub const TCP_KEEPCNT: ::c_int = 6;
++pub const TCP_SYNCNT: ::c_int = 7;
++pub const TCP_LINGER2: ::c_int = 8;
++pub const TCP_DEFER_ACCEPT: ::c_int = 9;
++pub const TCP_WINDOW_CLAMP: ::c_int = 10;
++pub const TCP_INFO: ::c_int = 11;
++pub const TCP_QUICKACK: ::c_int = 12;
++pub const TCP_CONGESTION: ::c_int = 13;
++
++pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
++pub const IPV6_V6ONLY: ::c_int = 26;
++
++pub const SO_DEBUG: ::c_int = 1;
++
++pub const SHUT_RD: ::c_int = 0;
++pub const SHUT_WR: ::c_int = 1;
++pub const SHUT_RDWR: ::c_int = 2;
++
++pub const LOCK_SH: ::c_int = 1;
++pub const LOCK_EX: ::c_int = 2;
++pub const LOCK_NB: ::c_int = 4;
++pub const LOCK_UN: ::c_int = 8;
++
++pub const SS_ONSTACK: ::c_int = 1;
++pub const SS_DISABLE: ::c_int = 2;
++
++pub const PATH_MAX: ::c_int = 4096;
++
++pub const FD_SETSIZE: usize = 1024;
++
++pub const EPOLLIN: ::c_int = 0x1;
++pub const EPOLLPRI: ::c_int = 0x2;
++pub const EPOLLOUT: ::c_int = 0x4;
++pub const EPOLLRDNORM: ::c_int = 0x40;
++pub const EPOLLRDBAND: ::c_int = 0x80;
++pub const EPOLLWRNORM: ::c_int = 0x100;
++pub const EPOLLWRBAND: ::c_int = 0x200;
++pub const EPOLLMSG: ::c_int = 0x400;
++pub const EPOLLERR: ::c_int = 0x8;
++pub const EPOLLHUP: ::c_int = 0x10;
++pub const EPOLLET: ::c_int = 0x80000000;
++
++pub const EPOLL_CTL_ADD: ::c_int = 1;
++pub const EPOLL_CTL_MOD: ::c_int = 3;
++pub const EPOLL_CTL_DEL: ::c_int = 2;
++
++pub const MNT_DETACH: ::c_int = 0x2;
++pub const MNT_EXPIRE: ::c_int = 0x4;
++
++pub const MNT_FORCE: ::c_int = 0x1;
++
++pub const Q_SYNC: ::c_int = 0x600;
++pub const Q_QUOTAON: ::c_int = 0x100;
++pub const Q_QUOTAOFF: ::c_int = 0x200;
++pub const Q_GETQUOTA: ::c_int = 0x300;
++pub const Q_SETQUOTA: ::c_int = 0x400;
++
++pub const TCIOFF: ::c_int = 2;
++pub const TCION: ::c_int = 3;
++pub const TCOOFF: ::c_int = 0;
++pub const TCOON: ::c_int = 1;
++pub const TCIFLUSH: ::c_int = 0;
++pub const TCOFLUSH: ::c_int = 1;
++pub const TCIOFLUSH: ::c_int = 2;
++pub const NL0: ::c_int  = 0x00000000;
++pub const NL1: ::c_int  = 0x00000100;
++pub const TAB0: ::c_int = 0x00000000;
++pub const CR0: ::c_int  = 0x00000000;
++pub const FF0: ::c_int  = 0x00000000;
++pub const BS0: ::c_int  = 0x00000000;
++pub const VT0: ::c_int  = 0x00000000;
++pub const VERASE: usize = 2;
++pub const VKILL: usize = 3;
++pub const VINTR: usize = 0;
++pub const VQUIT: usize = 1;
++pub const VLNEXT: usize = 15;
++pub const IGNBRK: ::tcflag_t = 0x00000001;
++pub const BRKINT: ::tcflag_t = 0x00000002;
++pub const IGNPAR: ::tcflag_t = 0x00000004;
++pub const PARMRK: ::tcflag_t = 0x00000008;
++pub const INPCK: ::tcflag_t = 0x00000010;
++pub const ISTRIP: ::tcflag_t = 0x00000020;
++pub const INLCR: ::tcflag_t = 0x00000040;
++pub const IGNCR: ::tcflag_t = 0x00000080;
++pub const ICRNL: ::tcflag_t = 0x00000100;
++pub const IXANY: ::tcflag_t = 0x00000800;
++pub const IMAXBEL: ::tcflag_t = 0x00002000;
++pub const OPOST: ::tcflag_t = 0x1;
++pub const CS5: ::tcflag_t = 0x00000000;
++pub const CRTSCTS: ::tcflag_t = 0x80000000;
++pub const ECHO: ::tcflag_t = 0x00000008;
++
++pub const CLONE_VM: ::c_int = 0x100;
++pub const CLONE_FS: ::c_int = 0x200;
++pub const CLONE_FILES: ::c_int = 0x400;
++pub const CLONE_SIGHAND: ::c_int = 0x800;
++pub const CLONE_PTRACE: ::c_int = 0x2000;
++pub const CLONE_VFORK: ::c_int = 0x4000;
++pub const CLONE_PARENT: ::c_int = 0x8000;
++pub const CLONE_THREAD: ::c_int = 0x10000;
++pub const CLONE_NEWNS: ::c_int = 0x20000;
++pub const CLONE_SYSVSEM: ::c_int = 0x40000;
++pub const CLONE_SETTLS: ::c_int = 0x80000;
++pub const CLONE_PARENT_SETTID: ::c_int = 0x100000;
++pub const CLONE_CHILD_CLEARTID: ::c_int = 0x200000;
++pub const CLONE_DETACHED: ::c_int = 0x400000;
++pub const CLONE_UNTRACED: ::c_int = 0x800000;
++pub const CLONE_CHILD_SETTID: ::c_int = 0x01000000;
++pub const CLONE_NEWUTS: ::c_int = 0x04000000;
++pub const CLONE_NEWIPC: ::c_int = 0x08000000;
++pub const CLONE_NEWUSER: ::c_int = 0x10000000;
++pub const CLONE_NEWPID: ::c_int = 0x20000000;
++pub const CLONE_NEWNET: ::c_int = 0x40000000;
++pub const CLONE_IO: ::c_int = 0x80000000;
++
++pub const WNOHANG: ::c_int = 0x00000001;
++pub const WUNTRACED: ::c_int = 0x00000002;
++pub const WSTOPPED: ::c_int = WUNTRACED;
++pub const WEXITED: ::c_int = 0x00000004;
++pub const WCONTINUED: ::c_int = 0x00000008;
++pub const WNOWAIT: ::c_int = 0x01000000;
++
++pub const __WNOTHREAD: ::c_int = 0x20000000;
++pub const __WALL: ::c_int = 0x40000000;
++pub const __WCLONE: ::c_int = 0x80000000;
++
++pub const SPLICE_F_MOVE: ::c_uint = 0x01;
++pub const SPLICE_F_NONBLOCK: ::c_uint = 0x02;
++pub const SPLICE_F_MORE: ::c_uint = 0x04;
++pub const SPLICE_F_GIFT: ::c_uint = 0x08;
++
++pub const RTLD_LOCAL: ::c_int = 0;
++
++pub const POSIX_FADV_NORMAL: ::c_int = 0;
++pub const POSIX_FADV_RANDOM: ::c_int = 1;
++pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2;
++pub const POSIX_FADV_WILLNEED: ::c_int = 3;
++
++pub const AT_FDCWD: ::c_int = -100;
++pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x100;
++pub const AT_REMOVEDIR: ::c_int = 0x200;
++pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
++
++pub const LOG_CRON: ::c_int = 9 << 3;
++pub const LOG_AUTHPRIV: ::c_int = 10 << 3;
++pub const LOG_FTP: ::c_int = 11 << 3;
++pub const LOG_PERROR: ::c_int = 0x20;
++
++pub const PIPE_BUF: usize = 4096;
++
++pub const SI_LOAD_SHIFT: ::c_uint = 16;
++
++pub const SIGEV_SIGNAL: ::c_int = 0;
++pub const SIGEV_NONE: ::c_int = 1;
++pub const SIGEV_THREAD: ::c_int = 2;
++
++pub const P_ALL: idtype_t = 0;
++pub const P_PID: idtype_t = 1;
++pub const P_PGID: idtype_t = 2;
++
++pub const UTIME_OMIT: c_long = 1073741822;
++pub const UTIME_NOW: c_long = 1073741823;
++
++pub const L_tmpnam: ::c_uint = 20;
++pub const _PC_LINK_MAX: ::c_int = 0;
++pub const _PC_MAX_CANON: ::c_int = 1;
++pub const _PC_MAX_INPUT: ::c_int = 2;
++pub const _PC_NAME_MAX: ::c_int = 3;
++pub const _PC_PATH_MAX: ::c_int = 4;
++pub const _PC_PIPE_BUF: ::c_int = 5;
++pub const _PC_CHOWN_RESTRICTED: ::c_int = 6;
++pub const _PC_NO_TRUNC: ::c_int = 7;
++pub const _PC_VDISABLE: ::c_int = 8;
++
++pub const _SC_ARG_MAX: ::c_int = 0;
++pub const _SC_CHILD_MAX: ::c_int = 1;
++pub const _SC_CLK_TCK: ::c_int = 2;
++pub const _SC_NGROUPS_MAX: ::c_int = 3;
++pub const _SC_OPEN_MAX: ::c_int = 4;
++pub const _SC_STREAM_MAX: ::c_int = 5;
++pub const _SC_TZNAME_MAX: ::c_int = 6;
++pub const _SC_JOB_CONTROL: ::c_int = 7;
++pub const _SC_SAVED_IDS: ::c_int = 8;
++pub const _SC_REALTIME_SIGNALS: ::c_int = 9;
++pub const _SC_PRIORITY_SCHEDULING: ::c_int = 10;
++pub const _SC_TIMERS: ::c_int = 11;
++pub const _SC_ASYNCHRONOUS_IO: ::c_int = 12;
++pub const _SC_PRIORITIZED_IO: ::c_int = 13;
++pub const _SC_SYNCHRONIZED_IO: ::c_int = 14;
++pub const _SC_FSYNC: ::c_int = 15;
++pub const _SC_MAPPED_FILES: ::c_int = 16;
++pub const _SC_MEMLOCK: ::c_int = 17;
++pub const _SC_MEMLOCK_RANGE: ::c_int = 18;
++pub const _SC_MEMORY_PROTECTION: ::c_int = 19;
++pub const _SC_MESSAGE_PASSING: ::c_int = 20;
++pub const _SC_SEMAPHORES: ::c_int = 21;
++pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 22;
++pub const _SC_AIO_LISTIO_MAX: ::c_int = 23;
++pub const _SC_AIO_MAX: ::c_int = 24;
++pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 25;
++pub const _SC_DELAYTIMER_MAX: ::c_int = 26;
++pub const _SC_MQ_OPEN_MAX: ::c_int = 27;
++pub const _SC_MQ_PRIO_MAX: ::c_int = 28;
++pub const _SC_VERSION: ::c_int = 29;
++pub const _SC_PAGESIZE: ::c_int = 30;
++pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
++pub const _SC_RTSIG_MAX: ::c_int = 31;
++pub const _SC_SEM_NSEMS_MAX: ::c_int = 32;
++pub const _SC_SEM_VALUE_MAX: ::c_int = 33;
++pub const _SC_SIGQUEUE_MAX: ::c_int = 34;
++pub const _SC_TIMER_MAX: ::c_int = 35;
++pub const _SC_BC_BASE_MAX: ::c_int = 36;
++pub const _SC_BC_DIM_MAX: ::c_int = 37;
++pub const _SC_BC_SCALE_MAX: ::c_int = 38;
++pub const _SC_BC_STRING_MAX: ::c_int = 39;
++pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 40;
++pub const _SC_EXPR_NEST_MAX: ::c_int = 42;
++pub const _SC_LINE_MAX: ::c_int = 43;
++pub const _SC_RE_DUP_MAX: ::c_int = 44;
++pub const _SC_2_VERSION: ::c_int = 46;
++pub const _SC_2_C_BIND: ::c_int = 47;
++pub const _SC_2_C_DEV: ::c_int = 48;
++pub const _SC_2_FORT_DEV: ::c_int = 49;
++pub const _SC_2_FORT_RUN: ::c_int = 50;
++pub const _SC_2_SW_DEV: ::c_int = 51;
++pub const _SC_2_LOCALEDEF: ::c_int = 52;
++pub const _SC_IOV_MAX: ::c_int = 60;
++pub const _SC_THREADS: ::c_int = 67;
++pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68;
++pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69;
++pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70;
++pub const _SC_LOGIN_NAME_MAX: ::c_int = 71;
++pub const _SC_TTY_NAME_MAX: ::c_int = 72;
++pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73;
++pub const _SC_THREAD_KEYS_MAX: ::c_int = 74;
++pub const _SC_THREAD_STACK_MIN: ::c_int = 75;
++pub const _SC_THREAD_THREADS_MAX: ::c_int = 76;
++pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77;
++pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78;
++pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79;
++pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80;
++pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81;
++pub const _SC_NPROCESSORS_ONLN: ::c_int = 84;
++pub const _SC_ATEXIT_MAX: ::c_int = 87;
++pub const _SC_XOPEN_VERSION: ::c_int = 89;
++pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90;
++pub const _SC_XOPEN_UNIX: ::c_int = 91;
++pub const _SC_XOPEN_CRYPT: ::c_int = 92;
++pub const _SC_XOPEN_ENH_I18N: ::c_int = 93;
++pub const _SC_XOPEN_SHM: ::c_int = 94;
++pub const _SC_2_CHAR_TERM: ::c_int = 95;
++pub const _SC_2_UPE: ::c_int = 97;
++pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125;
++pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126;
++pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128;
++pub const _SC_XOPEN_LEGACY: ::c_int = 129;
++pub const _SC_XOPEN_REALTIME: ::c_int = 130;
++pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131;
++pub const _SC_HOST_NAME_MAX: ::c_int = 180;
++
++pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY;
++pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY;
++
++pub const GLOB_ERR: ::c_int = 1 << 0;
++pub const GLOB_MARK: ::c_int = 1 << 1;
++pub const GLOB_NOSORT: ::c_int = 1 << 2;
++pub const GLOB_DOOFFS: ::c_int = 1 << 3;
++pub const GLOB_NOCHECK: ::c_int = 1 << 4;
++pub const GLOB_APPEND: ::c_int = 1 << 5;
++pub const GLOB_NOESCAPE: ::c_int = 1 << 6;
++
++pub const GLOB_NOSPACE: ::c_int = 1;
++pub const GLOB_ABORTED: ::c_int = 2;
++pub const GLOB_NOMATCH: ::c_int = 3;
++
++pub const POSIX_MADV_NORMAL: ::c_int = 0;
++pub const POSIX_MADV_RANDOM: ::c_int = 1;
++pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
++pub const POSIX_MADV_WILLNEED: ::c_int = 3;
++
++pub const S_IEXEC: mode_t = 64;
++pub const S_IWRITE: mode_t = 128;
++pub const S_IREAD: mode_t = 256;
++
++pub const F_LOCK: ::c_int = 1;
++pub const F_TEST: ::c_int = 3;
++pub const F_TLOCK: ::c_int = 2;
++pub const F_ULOCK: ::c_int = 0;
++
++pub const ST_RDONLY: ::c_ulong = 1;
++pub const ST_NOSUID: ::c_ulong = 2;
++pub const ST_NODEV: ::c_ulong = 4;
++pub const ST_NOEXEC: ::c_ulong = 8;
++pub const ST_SYNCHRONOUS: ::c_ulong = 16;
++pub const ST_MANDLOCK: ::c_ulong = 64;
++pub const ST_WRITE: ::c_ulong = 128;
++pub const ST_APPEND: ::c_ulong = 256;
++pub const ST_IMMUTABLE: ::c_ulong = 512;
++pub const ST_NOATIME: ::c_ulong = 1024;
++pub const ST_NODIRATIME: ::c_ulong = 2048;
++
++pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void;
++pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void;
++pub const RTLD_NODELETE: ::c_int = 0x1000;
++pub const RTLD_NOW: ::c_int = 0x2;
++
++pub const TCP_MD5SIG: ::c_int = 14;
++
++pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
++    __align: [],
++    size: [0; __SIZEOF_PTHREAD_MUTEX_T],
++};
++pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
++    __align: [],
++    size: [0; __SIZEOF_PTHREAD_COND_T],
++};
++pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
++    __align: [],
++    size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
++};
++pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
++pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
++pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
++pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
++pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
++
++pub const SCHED_OTHER: ::c_int = 0;
++pub const SCHED_FIFO: ::c_int = 1;
++pub const SCHED_RR: ::c_int = 2;
++pub const SCHED_BATCH: ::c_int = 3;
++pub const SCHED_IDLE: ::c_int = 5;
++
++// System V IPC
++pub const IPC_PRIVATE: ::key_t = 0;
++
++pub const IPC_CREAT: ::c_int = 0o1000;
++pub const IPC_EXCL: ::c_int = 0o2000;
++pub const IPC_NOWAIT: ::c_int = 0o4000;
++
++pub const IPC_RMID: ::c_int = 0;
++pub const IPC_SET: ::c_int = 1;
++pub const IPC_STAT: ::c_int = 2;
++pub const IPC_INFO: ::c_int = 3;
++pub const MSG_STAT: ::c_int = 11;
++pub const MSG_INFO: ::c_int = 12;
++
++pub const MSG_NOERROR: ::c_int = 0o10000;
++pub const MSG_EXCEPT: ::c_int = 0o20000;
++
++pub const SHM_R: ::c_int = 0o400;
++pub const SHM_W: ::c_int = 0o200;
++
++pub const SHM_RDONLY: ::c_int = 0o10000;
++pub const SHM_RND: ::c_int = 0o20000;
++pub const SHM_REMAP: ::c_int = 0o40000;
++
++pub const SHM_LOCK: ::c_int = 11;
++pub const SHM_UNLOCK: ::c_int = 12;
++
++pub const SHM_HUGETLB: ::c_int = 0o4000;
++pub const SHM_NORESERVE: ::c_int = 0o10000;
++
++pub const EPOLLRDHUP: ::c_int = 0x2000;
++pub const EPOLLONESHOT: ::c_int = 0x40000000;
++
++pub const QFMT_VFS_OLD: ::c_int = 1;
++pub const QFMT_VFS_V0: ::c_int = 2;
++
++pub const EFD_SEMAPHORE: ::c_int = 0x1;
++
++pub const LOG_NFACILITIES: ::c_int = 24;
++
++pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t;
++
++pub const RB_AUTOBOOT: ::c_int = 0x01234567u32 as i32;
++pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123u32 as i32;
++pub const RB_ENABLE_CAD: ::c_int = 0x89abcdefu32 as i32;
++pub const RB_DISABLE_CAD: ::c_int = 0x00000000u32 as i32;
++pub const RB_POWER_OFF: ::c_int = 0x4321fedcu32 as i32;
++
++pub const AI_PASSIVE: ::c_int = 0x0001;
++pub const AI_CANONNAME: ::c_int = 0x0002;
++pub const AI_NUMERICHOST: ::c_int = 0x0004;
++pub const AI_V4MAPPED: ::c_int = 0x0008;
++pub const AI_ALL: ::c_int = 0x0010;
++pub const AI_ADDRCONFIG: ::c_int = 0x0020;
++
++pub const AI_NUMERICSERV: ::c_int = 0x0400;
++
++pub const EAI_BADFLAGS: ::c_int = -1;
++pub const EAI_NONAME: ::c_int = -2;
++pub const EAI_AGAIN: ::c_int = -3;
++pub const EAI_FAIL: ::c_int = -4;
++pub const EAI_FAMILY: ::c_int = -6;
++pub const EAI_SOCKTYPE: ::c_int = -7;
++pub const EAI_SERVICE: ::c_int = -8;
++pub const EAI_MEMORY: ::c_int = -10;
++pub const EAI_OVERFLOW: ::c_int = -12;
++
++pub const NI_NUMERICHOST: ::c_int = 1;
++pub const NI_NUMERICSERV: ::c_int = 2;
++pub const NI_NOFQDN: ::c_int = 4;
++pub const NI_NAMEREQD: ::c_int = 8;
++pub const NI_DGRAM: ::c_int = 16;
++
++pub const SYNC_FILE_RANGE_WAIT_BEFORE: ::c_uint = 1;
++pub const SYNC_FILE_RANGE_WRITE: ::c_uint = 2;
++pub const SYNC_FILE_RANGE_WAIT_AFTER: ::c_uint = 4;
++
++pub const EAI_SYSTEM: ::c_int = -11;
++
++pub const MREMAP_MAYMOVE: ::c_int = 1;
++pub const MREMAP_FIXED: ::c_int = 2;
++
++pub const PR_SET_PDEATHSIG: ::c_int = 1;
++pub const PR_GET_PDEATHSIG: ::c_int = 2;
++
++pub const PR_GET_DUMPABLE: ::c_int = 3;
++pub const PR_SET_DUMPABLE: ::c_int = 4;
++
++pub const PR_GET_UNALIGN: ::c_int = 5;
++pub const PR_SET_UNALIGN: ::c_int = 6;
++pub const PR_UNALIGN_NOPRINT: ::c_int = 1;
++pub const PR_UNALIGN_SIGBUS: ::c_int = 2;
++
++pub const PR_GET_KEEPCAPS: ::c_int = 7;
++pub const PR_SET_KEEPCAPS: ::c_int = 8;
++
++pub const PR_GET_FPEMU: ::c_int = 9;
++pub const PR_SET_FPEMU: ::c_int = 10;
++pub const PR_FPEMU_NOPRINT: ::c_int = 1;
++pub const PR_FPEMU_SIGFPE: ::c_int = 2;
++
++pub const PR_GET_FPEXC: ::c_int = 11;
++pub const PR_SET_FPEXC: ::c_int = 12;
++pub const PR_FP_EXC_SW_ENABLE: ::c_int = 0x80;
++pub const PR_FP_EXC_DIV: ::c_int = 0x010000;
++pub const PR_FP_EXC_OVF: ::c_int = 0x020000;
++pub const PR_FP_EXC_UND: ::c_int = 0x040000;
++pub const PR_FP_EXC_RES: ::c_int = 0x080000;
++pub const PR_FP_EXC_INV: ::c_int = 0x100000;
++pub const PR_FP_EXC_DISABLED: ::c_int = 0;
++pub const PR_FP_EXC_NONRECOV: ::c_int = 1;
++pub const PR_FP_EXC_ASYNC: ::c_int = 2;
++pub const PR_FP_EXC_PRECISE: ::c_int = 3;
++
++pub const PR_GET_TIMING: ::c_int = 13;
++pub const PR_SET_TIMING: ::c_int = 14;
++pub const PR_TIMING_STATISTICAL: ::c_int = 0;
++pub const PR_TIMING_TIMESTAMP: ::c_int = 1;
++
++pub const PR_SET_NAME: ::c_int = 15;
++pub const PR_GET_NAME: ::c_int = 16;
++
++pub const PR_GET_ENDIAN: ::c_int = 19;
++pub const PR_SET_ENDIAN: ::c_int = 20;
++pub const PR_ENDIAN_BIG: ::c_int = 0;
++pub const PR_ENDIAN_LITTLE: ::c_int = 1;
++pub const PR_ENDIAN_PPC_LITTLE: ::c_int = 2;
++
++pub const PR_GET_SECCOMP: ::c_int = 21;
++pub const PR_SET_SECCOMP: ::c_int = 22;
++
++pub const PR_CAPBSET_READ: ::c_int = 23;
++pub const PR_CAPBSET_DROP: ::c_int = 24;
++
++pub const PR_GET_TSC: ::c_int = 25;
++pub const PR_SET_TSC: ::c_int = 26;
++pub const PR_TSC_ENABLE: ::c_int = 1;
++pub const PR_TSC_SIGSEGV: ::c_int = 2;
++
++pub const PR_GET_SECUREBITS: ::c_int = 27;
++pub const PR_SET_SECUREBITS: ::c_int = 28;
++
++pub const PR_SET_TIMERSLACK: ::c_int = 29;
++pub const PR_GET_TIMERSLACK: ::c_int = 30;
++
++pub const PR_TASK_PERF_EVENTS_DISABLE: ::c_int = 31;
++pub const PR_TASK_PERF_EVENTS_ENABLE: ::c_int = 32;
++
++pub const PR_MCE_KILL: ::c_int = 33;
++pub const PR_MCE_KILL_CLEAR: ::c_int = 0;
++pub const PR_MCE_KILL_SET: ::c_int = 1;
++
++pub const PR_MCE_KILL_LATE: ::c_int = 0;
++pub const PR_MCE_KILL_EARLY: ::c_int = 1;
++pub const PR_MCE_KILL_DEFAULT: ::c_int = 2;
++
++pub const PR_MCE_KILL_GET: ::c_int = 34;
++
++pub const PR_SET_MM: ::c_int = 35;
++pub const PR_SET_MM_START_CODE: ::c_int = 1;
++pub const PR_SET_MM_END_CODE: ::c_int = 2;
++pub const PR_SET_MM_START_DATA: ::c_int = 3;
++pub const PR_SET_MM_END_DATA: ::c_int = 4;
++pub const PR_SET_MM_START_STACK: ::c_int = 5;
++pub const PR_SET_MM_START_BRK: ::c_int = 6;
++pub const PR_SET_MM_BRK: ::c_int = 7;
++pub const PR_SET_MM_ARG_START: ::c_int = 8;
++pub const PR_SET_MM_ARG_END: ::c_int = 9;
++pub const PR_SET_MM_ENV_START: ::c_int = 10;
++pub const PR_SET_MM_ENV_END: ::c_int = 11;
++pub const PR_SET_MM_AUXV: ::c_int = 12;
++pub const PR_SET_MM_EXE_FILE: ::c_int = 13;
++pub const PR_SET_MM_MAP: ::c_int = 14;
++pub const PR_SET_MM_MAP_SIZE: ::c_int = 15;
++
++pub const PR_SET_PTRACER: ::c_int = 0x59616d61;
++
++pub const PR_SET_CHILD_SUBREAPER: ::c_int = 36;
++pub const PR_GET_CHILD_SUBREAPER: ::c_int = 37;
++
++pub const PR_SET_NO_NEW_PRIVS: ::c_int = 38;
++pub const PR_GET_NO_NEW_PRIVS: ::c_int = 39;
++
++pub const PR_GET_TID_ADDRESS: ::c_int = 40;
++
++pub const PR_SET_THP_DISABLE: ::c_int = 41;
++pub const PR_GET_THP_DISABLE: ::c_int = 42;
++
++pub const ABDAY_1: ::nl_item = 0x300;
++pub const ABDAY_2: ::nl_item = 0x301;
++pub const ABDAY_3: ::nl_item = 0x302;
++pub const ABDAY_4: ::nl_item = 0x303;
++pub const ABDAY_5: ::nl_item = 0x304;
++pub const ABDAY_6: ::nl_item = 0x305;
++pub const ABDAY_7: ::nl_item = 0x306;
++
++pub const DAY_1: ::nl_item = 0x307;
++pub const DAY_2: ::nl_item = 0x308;
++pub const DAY_3: ::nl_item = 0x309;
++pub const DAY_4: ::nl_item = 0x30A;
++pub const DAY_5: ::nl_item = 0x30B;
++pub const DAY_6: ::nl_item = 0x30C;
++pub const DAY_7: ::nl_item = 0x30D;
++
++pub const ABMON_1: ::nl_item = 0x30E;
++pub const ABMON_2: ::nl_item = 0x30F;
++pub const ABMON_3: ::nl_item = 0x310;
++pub const ABMON_4: ::nl_item = 0x311;
++pub const ABMON_5: ::nl_item = 0x312;
++pub const ABMON_6: ::nl_item = 0x313;
++pub const ABMON_7: ::nl_item = 0x314;
++pub const ABMON_8: ::nl_item = 0x315;
++pub const ABMON_9: ::nl_item = 0x316;
++pub const ABMON_10: ::nl_item = 0x317;
++pub const ABMON_11: ::nl_item = 0x318;
++pub const ABMON_12: ::nl_item = 0x319;
++
++pub const MON_1: ::nl_item = 0x31A;
++pub const MON_2: ::nl_item = 0x31B;
++pub const MON_3: ::nl_item = 0x31C;
++pub const MON_4: ::nl_item = 0x31D;
++pub const MON_5: ::nl_item = 0x31E;
++pub const MON_6: ::nl_item = 0x31F;
++pub const MON_7: ::nl_item = 0x320;
++pub const MON_8: ::nl_item = 0x321;
++pub const MON_9: ::nl_item = 0x322;
++pub const MON_10: ::nl_item = 0x323;
++pub const MON_11: ::nl_item = 0x324;
++pub const MON_12: ::nl_item = 0x325;
++
++pub const AM_STR: ::nl_item = 0x326;
++pub const PM_STR: ::nl_item = 0x327;
++
++pub const D_T_FMT: ::nl_item = 0x328;
++pub const D_FMT: ::nl_item = 0x329;
++pub const T_FMT: ::nl_item = 0x32A;
++pub const T_FMT_AMPM: ::nl_item = 0x32B;
++
++pub const ERA: ::nl_item = 0x32C;
++pub const ERA_D_FMT: ::nl_item = 0x32E;
++pub const ALT_DIGITS: ::nl_item = 0x32F;
++pub const ERA_D_T_FMT: ::nl_item = 0x330;
++pub const ERA_T_FMT: ::nl_item = 0x331;
++
++pub const CODESET: ::nl_item = 10;
++
++pub const CRNCYSTR: ::nl_item = 0x215;
++
++pub const RADIXCHAR: ::nl_item = 0x100;
++pub const THOUSEP: ::nl_item = 0x101;
++
++pub const NOEXPR: ::nl_item = 0x501;
++pub const YESSTR: ::nl_item = 0x502;
++pub const NOSTR: ::nl_item = 0x503;
++
++pub const FILENAME_MAX: ::c_uint = 4095;
++
++pub const AF_MAX: ::c_int = 39;
++
++f! {
++    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
++        let fd = fd as usize;
++        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        (*set).fds_bits[fd / size] &= !(1 << (fd % size));
++        return
++    }
++
++    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
++        let fd = fd as usize;
++        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0
++    }
++
++    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
++        let fd = fd as usize;
++        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
++        (*set).fds_bits[fd / size] |= 1 << (fd % size);
++        return
++    }
++
++    pub fn FD_ZERO(set: *mut fd_set) -> () {
++        for slot in (*set).fds_bits.iter_mut() {
++            *slot = 0;
++        }
++    }
++
++    pub fn WIFSTOPPED(status: ::c_int) -> bool {
++        (status & 0xff) == 0x7f
++    }
++
++    pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
++        (status >> 8) & 0xff
++    }
++
++    pub fn WIFCONTINUED(status: ::c_int) -> bool {
++        status == 0xffff
++    }
++
++    pub fn WIFSIGNALED(status: ::c_int) -> bool {
++        ((status & 0x7f) + 1) as i8 >= 2
++    }
++
++    pub fn WTERMSIG(status: ::c_int) -> ::c_int {
++        status & 0x7f
++    }
++
++    pub fn WIFEXITED(status: ::c_int) -> bool {
++        (status & 0x7f) == 0
++    }
++
++    pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
++        (status >> 8) & 0xff
++    }
++
++    pub fn WCOREDUMP(status: ::c_int) -> bool {
++        (status & 0x80) != 0
++    }
++
++    pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
++        for slot in cpuset.bits.iter_mut() {
++            *slot = 0;
++        }
++    }
++
++    pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () {
++        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
++        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
++        cpuset.bits[idx] |= 1 << offset;
++        ()
++    }
++
++    pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () {
++        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
++        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
++        cpuset.bits[idx] &= !(1 << offset);
++        ()
++    }
++
++    pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool {
++        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]);
++        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
++        0 != (cpuset.bits[idx] & (1 << offset))
++    }
++
++    pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
++        set1.bits == set2.bits
++    }
++}
++
++extern {
++    pub fn getpwnam_r(name: *const ::c_char,
++                      pwd: *mut passwd,
++                      buf: *mut ::c_char,
++                      buflen: ::size_t,
++                      result: *mut *mut passwd) -> ::c_int;
++    pub fn getpwuid_r(uid: ::uid_t,
++                      pwd: *mut passwd,
++                      buf: *mut ::c_char,
++                      buflen: ::size_t,
++                      result: *mut *mut passwd) -> ::c_int;
++    pub fn fdatasync(fd: ::c_int) -> ::c_int;
++    pub fn mincore(addr: *mut ::c_void, len: ::size_t,
++                   vec: *mut ::c_uchar) -> ::c_int;
++    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
++    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
++    pub fn clock_nanosleep(clk_id: clockid_t,
++                           flags: ::c_int,
++                           rqtp: *const ::timespec,
++                           rmtp:  *mut ::timespec) -> ::c_int;
++    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
++    pub fn prctl(option: ::c_int, ...) -> ::c_int;
++    pub fn pthread_getattr_np(native: ::pthread_t,
++                              attr: *mut ::pthread_attr_t) -> ::c_int;
++    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
++                                     guardsize: *mut ::size_t) -> ::c_int;
++    pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
++                                 stackaddr: *mut *mut ::c_void,
++                                 stacksize: *mut ::size_t) -> ::c_int;
++    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
++    pub fn setgroups(ngroups: ::size_t,
++                     ptr: *const ::gid_t) -> ::c_int;
++    pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int;
++    pub fn sched_setscheduler(pid: ::pid_t,
++                              policy: ::c_int,
++                              param: *const sched_param) -> ::c_int;
++    pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
++    pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
++    pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int;
++    pub fn epoll_create(size: ::c_int) -> ::c_int;
++    pub fn epoll_create1(flags: ::c_int) -> ::c_int;
++    pub fn epoll_ctl(epfd: ::c_int,
++                     op: ::c_int,
++                     fd: ::c_int,
++                     event: *mut epoll_event) -> ::c_int;
++    pub fn epoll_wait(epfd: ::c_int,
++                      events: *mut epoll_event,
++                      maxevents: ::c_int,
++                      timeout: ::c_int) -> ::c_int;
++    pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
++    pub fn mount(src: *const ::c_char,
++                 target: *const ::c_char,
++                 fstype: *const ::c_char,
++                 flags: ::c_ulong,
++                 data: *const ::c_void) -> ::c_int;
++    pub fn umount(target: *const ::c_char) -> ::c_int;
++    pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int;
++    pub fn clone(cb: extern fn(*mut ::c_void) -> ::c_int,
++                 child_stack: *mut ::c_void,
++                 flags: ::c_int,
++                 arg: *mut ::c_void, ...) -> ::c_int;
++    pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
++    pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
++    pub fn memrchr(cx: *const ::c_void,
++                   c: ::c_int,
++                   n: ::size_t) -> *mut ::c_void;
++    pub fn syscall(num: ::c_long, ...) -> ::c_long;
++    pub fn sendfile(out_fd: ::c_int,
++                    in_fd: ::c_int,
++                    offset: *mut off_t,
++                    count: ::size_t) -> ::ssize_t;
++    pub fn splice(fd_in: ::c_int,
++                  off_in: *mut ::loff_t,
++                  fd_out: ::c_int,
++                  off_out: *mut ::loff_t,
++                  len: ::size_t,
++                  flags: ::c_uint) -> ::ssize_t;
++    pub fn tee(fd_in: ::c_int,
++               fd_out: ::c_int,
++               len: ::size_t,
++               flags: ::c_uint) -> ::ssize_t;
++    pub fn vmsplice(fd: ::c_int,
++                    iov: *const ::iovec,
++                    nr_segs: ::size_t,
++                    flags: ::c_uint) -> ::ssize_t;
++
++    pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t,
++                         advise: ::c_int) -> ::c_int;
++    pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
++    pub fn utimensat(dirfd: ::c_int, path: *const ::c_char,
++                     times: *const ::timespec, flag: ::c_int) -> ::c_int;
++    pub fn duplocale(base: ::locale_t) -> ::locale_t;
++    pub fn freelocale(loc: ::locale_t);
++    pub fn newlocale(mask: ::c_int,
++                     locale: *const ::c_char,
++                     base: ::locale_t) -> ::locale_t;
++    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
++    pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int;
++    pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int;
++    pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int;
++    pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int;
++    pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t;
++    pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
++    pub fn mmap64(addr: *mut ::c_void,
++                  len: ::size_t,
++                  prot: ::c_int,
++                  flags: ::c_int,
++                  fd: ::c_int,
++                  offset: off64_t)
++                  -> *mut ::c_void;
++    pub fn open64(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
++    pub fn openat64(fd: ::c_int,
++                    path: *const c_char,
++                    oflag: ::c_int, ...) -> ::c_int;
++    pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t,
++                   offset: off64_t) -> ::ssize_t;
++    pub fn pwrite64(fd: ::c_int, buf: *const ::c_void, count: ::size_t,
++                    offset: off64_t) -> ::ssize_t;
++    pub fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64;
++    pub fn readdir64_r(dirp: *mut ::DIR, entry: *mut ::dirent64,
++                       result: *mut *mut ::dirent64) -> ::c_int;
++    pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int;
++    pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
++    pub fn truncate64(path: *const c_char, length: off64_t) -> ::c_int;
++    pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
++
++    pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
++
++    pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
++                   mode: ::mode_t, dev: dev_t) -> ::c_int;
++    pub fn ppoll(fds: *mut ::pollfd,
++                 nfds: nfds_t,
++                 timeout: *const ::timespec,
++                 sigmask: *const sigset_t) -> ::c_int;
++    pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
++                                     clock_id: *mut clockid_t) -> ::c_int;
++    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
++                                     clock_id: clockid_t) -> ::c_int;
++    pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
++                                       pshared: ::c_int) -> ::c_int;
++    pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
++                                       pshared: *mut ::c_int) -> ::c_int;
++    pub fn sched_getaffinity(pid: ::pid_t,
++                             cpusetsize: ::size_t,
++                             cpuset: *mut cpu_set_t) -> ::c_int;
++    pub fn sched_setaffinity(pid: ::pid_t,
++                             cpusetsize: ::size_t,
++                             cpuset: *const cpu_set_t) -> ::c_int;
++    pub fn unshare(flags: ::c_int) -> ::c_int;
++    pub fn sem_timedwait(sem: *mut sem_t,
++                         abstime: *const ::timespec) -> ::c_int;
++    pub fn accept4(fd: ::c_int, addr: *mut ::sockaddr, len: *mut ::socklen_t,
++                   flg: ::c_int) -> ::c_int;
++    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
++                                   abstime: *const ::timespec) -> ::c_int;
++    pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
++                                        pshared: ::c_int) -> ::c_int;
++    pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
++                                        pshared: *mut ::c_int) -> ::c_int;
++    pub fn pthread_rwlockattr_getkind_np(attr: *const pthread_rwlockattr_t,
++                                         val: *mut ::c_int) -> ::c_int;
++    pub fn pthread_rwlockattr_setkind_np(attr: *mut pthread_rwlockattr_t,
++                                         val: ::c_int) -> ::c_int;
++    pub fn pthread_rwlockattr_getpshared(attr: *const pthread_rwlockattr_t,
++                                         val: *mut ::c_int) -> ::c_int;
++    pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t,
++                                         val: ::c_int) -> ::c_int;
++    pub fn ptsname_r(fd: ::c_int,
++                     buf: *mut ::c_char,
++                     buflen: ::size_t) -> ::c_int;
++    pub fn clearenv() -> ::c_int;
++    pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
++                  options: ::c_int) -> ::c_int;
++
++    pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
++
++    pub fn setpwent();
++    pub fn getpwent() -> *mut passwd;
++    pub fn setspent();
++    pub fn endspent();
++    pub fn getspent() -> *mut spwd;
++    pub fn getspnam(__name: *const ::c_char) -> *mut spwd;
++
++    pub fn shm_open(name: *const c_char, oflag: ::c_int,
++                    mode: mode_t) -> ::c_int;
++
++    // System V IPC
++    pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int;
++    pub fn shmat(shmid: ::c_int,
++                 shmaddr: *const ::c_void,
++                 shmflg: ::c_int) -> *mut ::c_void;
++    pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int;
++    pub fn shmctl(shmid: ::c_int,
++                  cmd: ::c_int,
++                  buf: *mut ::shmid_ds) -> ::c_int;
++    pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t;
++    pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut msqid_ds) -> ::c_int;
++    pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int;
++    pub fn msgrcv(msqid: ::c_int, msgp: *mut ::c_void, msgsz: ::size_t,
++                  msgtyp: ::c_long, msgflg: ::c_int) -> ::ssize_t;
++    pub fn msgsnd(msqid: ::c_int, msgp: *const ::c_void, msgsz: ::size_t,
++                  msgflg: ::c_int) -> ::c_int;
++
++    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
++                    -> ::c_int;
++    pub fn __errno_location() -> *mut ::c_int;
++
++    pub fn fopen64(filename: *const c_char,
++                   mode: *const c_char) -> *mut ::FILE;
++    pub fn freopen64(filename: *const c_char, mode: *const c_char,
++                     file: *mut ::FILE) -> *mut ::FILE;
++    pub fn tmpfile64() -> *mut ::FILE;
++    pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int;
++    pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int;
++    pub fn fseeko64(stream: *mut ::FILE,
++                    offset: ::off64_t,
++                    whence: ::c_int) -> ::c_int;
++    pub fn ftello64(stream: *mut ::FILE) -> ::off64_t;
++    pub fn readahead(fd: ::c_int, offset: ::off64_t,
++                     count: ::size_t) -> ::ssize_t;
++    pub fn getxattr(path: *const c_char, name: *const c_char,
++                    value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
++    pub fn lgetxattr(path: *const c_char, name: *const c_char,
++                     value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
++    pub fn fgetxattr(filedes: ::c_int, name: *const c_char,
++                     value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
++    pub fn setxattr(path: *const c_char, name: *const c_char,
++                    value: *const ::c_void, size: ::size_t,
++                    flags: ::c_int) -> ::c_int;
++    pub fn lsetxattr(path: *const c_char, name: *const c_char,
++                     value: *const ::c_void, size: ::size_t,
++                     flags: ::c_int) -> ::c_int;
++    pub fn fsetxattr(filedes: ::c_int, name: *const c_char,
++                     value: *const ::c_void, size: ::size_t,
++                     flags: ::c_int) -> ::c_int;
++    pub fn listxattr(path: *const c_char, list: *mut c_char,
++                     size: ::size_t) -> ::ssize_t;
++    pub fn llistxattr(path: *const c_char, list: *mut c_char,
++                      size: ::size_t) -> ::ssize_t;
++    pub fn flistxattr(filedes: ::c_int, list: *mut c_char,
++                      size: ::size_t) -> ::ssize_t;
++    pub fn removexattr(path: *const c_char, name: *const c_char) -> ::c_int;
++    pub fn lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int;
++    pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int;
++    pub fn signalfd(fd: ::c_int,
++                    mask: *const ::sigset_t,
++                    flags: ::c_int) -> ::c_int;
++    pub fn quotactl(cmd: ::c_int,
++                    special: *const ::c_char,
++                    id: ::c_int,
++                    data: *mut ::c_char) -> ::c_int;
++    pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t;
++    pub fn mq_close(mqd: ::mqd_t) -> ::c_int;
++    pub fn mq_unlink(name: *const ::c_char) -> ::c_int;
++    pub fn mq_receive(mqd: ::mqd_t,
++                      msg_ptr: *mut ::c_char,
++                      msg_len: ::size_t,
++                      msq_prio: *mut ::c_uint) -> ::ssize_t;
++    pub fn mq_send(mqd: ::mqd_t,
++                   msg_ptr: *const ::c_char,
++                   msg_len: ::size_t,
++                   msq_prio: ::c_uint) -> ::c_int;
++    pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int;
++    pub fn mq_setattr(mqd: ::mqd_t,
++                      newattr: *const ::mq_attr,
++                      oldattr: *mut ::mq_attr) -> ::c_int;
++    pub fn epoll_pwait(epfd: ::c_int,
++                       events: *mut ::epoll_event,
++                       maxevents: ::c_int,
++                       timeout: ::c_int,
++                       sigmask: *const ::sigset_t) -> ::c_int;
++    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
++    pub fn sigtimedwait(set: *const sigset_t,
++                        info: *mut siginfo_t,
++                        timeout: *const ::timespec) -> ::c_int;
++    pub fn sigwaitinfo(set: *const sigset_t,
++                       info: *mut siginfo_t) -> ::c_int;
++    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
++    pub fn prlimit(pid: ::pid_t, resource: ::c_int, new_limit: *const ::rlimit,
++                   old_limit: *mut ::rlimit) -> ::c_int;
++    pub fn prlimit64(pid: ::pid_t,
++                     resource: ::c_int,
++                     new_limit: *const ::rlimit64,
++                     old_limit: *mut ::rlimit64) -> ::c_int;
++    pub fn reboot(how_to: ::c_int) -> ::c_int;
++    pub fn setfsgid(gid: ::gid_t) -> ::c_int;
++    pub fn setfsuid(uid: ::uid_t) -> ::c_int;
++    pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
++    pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
++
++    // Not available now on Android
++    pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
++                    mode: ::mode_t) -> ::c_int;
++    pub fn if_nameindex() -> *mut if_nameindex;
++    pub fn if_freenameindex(ptr: *mut if_nameindex);
++    pub fn sync_file_range(fd: ::c_int, offset: ::off64_t,
++                           nbytes: ::off64_t, flags: ::c_uint) -> ::c_int;
++    pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
++    pub fn freeifaddrs(ifa: *mut ::ifaddrs);
++
++    pub fn mremap(addr: *mut ::c_void,
++                  len: ::size_t,
++                  new_len: ::size_t,
++                  flags: ::c_int,
++                  ...) -> *mut ::c_void;
++
++    pub fn glob(pattern: *const c_char,
++                flags: ::c_int,
++                errfunc: Option<extern fn(epath: *const c_char,
++                                          errno: ::c_int) -> ::c_int>,
++                pglob: *mut ::glob_t) -> ::c_int;
++    pub fn globfree(pglob: *mut ::glob_t);
++
++    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
++
++    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
++
++    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
++    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
++                  -> ::c_int;
++
++    pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
++
++    pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
++                    flags: ::c_int, addr: *mut ::sockaddr,
++                    addrlen: *mut ::socklen_t) -> ::ssize_t;
++    pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
++
++    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
++                address_len: ::socklen_t) -> ::c_int;
++
++    pub fn writev(fd: ::c_int,
++                  iov: *const ::iovec,
++                  iovcnt: ::c_int) -> ::ssize_t;
++    pub fn readv(fd: ::c_int,
++                 iov: *const ::iovec,
++                 iovcnt: ::c_int) -> ::ssize_t;
++
++    pub fn sendmsg(fd: ::c_int,
++                   msg: *const ::msghdr,
++                   flags: ::c_int) -> ::ssize_t;
++    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
++                   -> ::ssize_t;
++}
++
++cfg_if! {
++    if #[cfg(target_arch = "mips")] {
++        mod mips;
++        pub use self::mips::*;
++    } else if #[cfg(target_arch = "x86_64")] {
++        mod x86_64;
++        pub use self::x86_64::*;
++    } else {
++        pub use unsupported_target;
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..603efb10fcfa0087943725fefef837ef1a53b5ef
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,361 @@@
++//! Definitions for l4re-uclibc on 64bit systems
++
++pub type blkcnt_t = i64;
++pub type blksize_t = i64;
++pub type clock_t = i64;
++pub type c_char = u8;
++pub type c_long = i64;
++pub type c_ulong = u64;
++pub type fsblkcnt_t = ::c_ulong;
++pub type fsfilcnt_t = ::c_ulong;
++pub type fsword_t = ::c_long;
++pub type ino_t = ::c_ulong;
++pub type nlink_t = ::c_uint;
++pub type off_t = ::c_long;
++pub type rlim_t = c_ulong;
++pub type rlim64_t = u64;
++pub type suseconds_t = ::c_long;
++pub type time_t = ::c_int;
++pub type wchar_t = ::c_int;
++
++// ToDo, used?
++//pub type d_ino = ::c_ulong;
++pub type nfds_t = ::c_ulong;
++
++s! {
++    pub struct ipc_perm {
++        pub __key: ::key_t,
++        pub uid: ::uid_t,
++        pub gid: ::gid_t,
++        pub cuid: ::uid_t,
++        pub cgid: ::gid_t,
++        pub mode: ::c_ushort, // read / write
++        __pad1: ::c_ushort,
++        pub __seq: ::c_ushort,
++        __pad2: ::c_ushort,
++        __unused1: ::c_ulong,
++        __unused2: ::c_ulong
++    }
++
++    pub struct siginfo_t {
++        si_signo: ::c_int, // signal number
++        si_errno: ::c_int, // if not zero: error value of signal, see errno.h
++        si_code: ::c_int,  // signal code
++        pub _pad: [::c_int; 28], // unported union
++        _align: [usize; 0],
++    }
++
++    pub struct shmid_ds {
++        pub shm_perm: ::ipc_perm,
++        pub shm_segsz: ::size_t, // segment size in bytes
++        pub shm_atime: ::time_t, // time of last shmat()
++        pub shm_dtime: ::time_t,
++        pub shm_ctime: ::time_t,
++        pub shm_cpid: ::pid_t,
++        pub shm_lpid: ::pid_t,
++        pub shm_nattch: ::shmatt_t,
++        __unused1: ::c_ulong,
++        __unused2: ::c_ulong
++    }
++
++    pub struct msqid_ds {
++        pub msg_perm: ::ipc_perm,
++        pub msg_stime: ::time_t,
++        pub msg_rtime: ::time_t,
++        pub msg_ctime: ::time_t,
++        __msg_cbytes: ::c_ulong,
++        pub msg_qnum: ::msgqnum_t,
++        pub msg_qbytes: ::msglen_t,
++        pub msg_lspid: ::pid_t,
++        pub msg_lrpid: ::pid_t,
++        __ignored1: ::c_ulong,
++        __ignored2: ::c_ulong,
++    }
++
++    pub struct sockaddr {
++        pub sa_family: ::sa_family_t,
++        pub sa_data: [::c_char; 14],
++    }
++
++    pub struct sockaddr_in {
++        pub sin_family: ::sa_family_t,
++        pub sin_port: ::in_port_t,
++        pub sin_addr: ::in_addr,
++        pub sin_zero: [u8; 8],
++    }
++
++    pub struct sockaddr_in6 {
++        pub sin6_family: ::sa_family_t,
++        pub sin6_port: ::in_port_t,
++        pub sin6_flowinfo: u32,
++        pub sin6_addr: ::in6_addr,
++        pub sin6_scope_id: u32,
++    }
++
++    // ------------------------------------------------------------
++    // definitions below are *unverified* and might **break** the software
++//    pub struct in_addr {
++//        pub s_addr: in_addr_t,
++//    }
++//
++//    pub struct in6_addr {
++//        pub s6_addr: [u8; 16],
++//        __align: [u32; 0],
++//    }
++
++    pub struct stat { // ToDo
++        pub st_dev: ::c_ulong,
++        st_pad1: [::c_long; 2],
++        pub st_ino: ::ino_t,
++        pub st_mode: ::mode_t,
++        pub st_nlink: ::nlink_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        pub st_rdev: u64,
++        pub st_pad2: [u64; 1],
++        pub st_size: off_t,
++        st_pad3: ::c_long,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        pub st_blksize: ::blksize_t,
++        st_pad4: ::c_long,
++        pub st_blocks: ::blkcnt_t,
++        st_pad5: [::c_long; 7],
++    }
++
++    pub struct statvfs { // ToDo: broken
++        pub f_bsize: ::c_ulong,
++        pub f_frsize: ::c_ulong,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_favail: ::fsfilcnt_t,
++        #[cfg(target_endian = "little")]
++        pub f_fsid: ::c_ulong,
++        #[cfg(target_pointer_width = "32")]
++        __f_unused: ::c_int,
++        #[cfg(target_endian = "big")]
++        pub f_fsid: ::c_ulong,
++        pub f_flag: ::c_ulong,
++        pub f_namemax: ::c_ulong,
++        __f_spare: [::c_int; 6],
++    }
++
++    pub struct dirent { // Todo
++        pub d_ino: ::ino64_t,
++        pub d_off: ::off64_t,
++        d_reclen: u16,
++        pub d_type: u8,
++        pub d_name: [i8; 256],
++    }
++
++    pub struct dirent64 { //
++        pub d_ino: ::ino64_t,
++        pub d_off: ::off64_t,
++        pub d_reclen: u16,
++        pub d_type: u8,
++        pub d_name: [i8; 256],
++    }
++
++    pub struct pthread_attr_t { // ToDo
++        __size: [u64; 7]
++    }
++
++    pub struct sigaction { // TODO!!
++        pub sa_sigaction: ::sighandler_t,
++        pub sa_mask: ::sigset_t,
++        #[cfg(target_arch = "sparc64")]
++        __reserved0: ::c_int,
++        pub sa_flags: ::c_int,
++        _restorer: *mut ::c_void,
++    }
++
++    pub struct stack_t { // ToDo
++        pub ss_sp: *mut ::c_void,
++        pub ss_flags: ::c_int,
++        pub ss_size: ::size_t
++    }
++
++    pub struct statfs { // ToDo
++        pub f_type: fsword_t,
++        pub f_bsize: fsword_t,
++        pub f_blocks: ::fsblkcnt_t,
++        pub f_bfree: ::fsblkcnt_t,
++        pub f_bavail: ::fsblkcnt_t,
++        pub f_files: ::fsfilcnt_t,
++        pub f_ffree: ::fsfilcnt_t,
++        pub f_fsid: ::fsid_t,
++        pub f_namelen: fsword_t,
++        pub f_frsize: fsword_t,
++        f_spare: [fsword_t; 5],
++    }
++
++    pub struct msghdr { // ToDo
++        pub msg_name: *mut ::c_void,
++        pub msg_namelen: ::socklen_t,
++        pub msg_iov: *mut ::iovec,
++        pub msg_iovlen: ::size_t,
++        pub msg_control: *mut ::c_void,
++        pub msg_controllen: ::size_t,
++        pub msg_flags: ::c_int,
++    }
++
++    pub struct termios { // ToDo
++        pub c_iflag: ::tcflag_t,
++        pub c_oflag: ::tcflag_t,
++        pub c_cflag: ::tcflag_t,
++        pub c_lflag: ::tcflag_t,
++        pub c_line: ::cc_t,
++        pub c_cc: [::cc_t; ::NCCS],
++    }
++
++    pub struct sem_t { // ToDo
++        #[cfg(target_pointer_width = "32")]
++        __size: [::c_char; 16],
++        #[cfg(target_pointer_width = "64")]
++        __size: [::c_char; 32],
++        __align: [::c_long; 0],
++    }
++
++    pub struct pthread_mutex_t { // ToDo
++        #[cfg(any(target_arch = "mips", target_arch = "arm",
++                  target_arch = "powerpc"))]
++        __align: [::c_long; 0],
++        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
++                      target_arch = "powerpc")))]
++        __align: [::c_longlong; 0],
++        size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
++    }
++
++    pub struct pthread_mutexattr_t { // ToDo
++        #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
++                  target_arch = "mips64", target_arch = "s390x",
++                  target_arch = "sparc64"))]
++        __align: [::c_int; 0],
++        #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
++                      target_arch = "mips64", target_arch = "s390x",
++                      target_arch = "sparc64")))]
++        __align: [::c_long; 0],
++        size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
++    }
++
++    pub struct pthread_cond_t { // ToDo
++        __align: [::c_longlong; 0],
++        size: [u8; __SIZEOF_PTHREAD_COND_T],
++    }
++
++    pub struct pthread_condattr_t { // ToDo
++        __align: [::c_int; 0],
++        size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
++    }
++
++    pub struct pthread_rwlock_t { // ToDo
++        #[cfg(any(target_arch = "mips", target_arch = "arm",
++                  target_arch = "powerpc"))]
++        __align: [::c_long; 0],
++        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
++                      target_arch = "powerpc")))]
++        __align: [::c_longlong; 0],
++        size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
++    }
++
++    pub struct sigset_t { // ToDo
++        __val: [::c_ulong; 16],
++    }
++
++    pub struct sysinfo { // ToDo
++        pub uptime: ::c_long,
++        pub loads: [::c_ulong; 3],
++        pub totalram: ::c_ulong,
++        pub freeram: ::c_ulong,
++        pub sharedram: ::c_ulong,
++        pub bufferram: ::c_ulong,
++        pub totalswap: ::c_ulong,
++        pub freeswap: ::c_ulong,
++        pub procs: ::c_ushort,
++        pub pad: ::c_ushort,
++        pub totalhigh: ::c_ulong,
++        pub freehigh: ::c_ulong,
++        pub mem_unit: ::c_uint,
++        pub _f: [::c_char; 0],
++    }
++
++    pub struct glob_t { // ToDo
++        pub gl_pathc: ::size_t,
++        pub gl_pathv: *mut *mut c_char,
++        pub gl_offs: ::size_t,
++        pub gl_flags: ::c_int,
++        __unused1: *mut ::c_void,
++        __unused2: *mut ::c_void,
++        __unused3: *mut ::c_void,
++        __unused4: *mut ::c_void,
++        __unused5: *mut ::c_void,
++    }
++
++    pub struct stat64 { // ToDo
++        pub st_dev: ::dev_t,
++        pub st_ino: ::ino64_t,
++        pub st_nlink: ::nlink_t,
++        pub st_mode: ::mode_t,
++        pub st_uid: ::uid_t,
++        pub st_gid: ::gid_t,
++        __pad0: ::c_int,
++        pub st_rdev: ::dev_t,
++        pub st_size: ::off_t,
++        pub st_blksize: ::blksize_t,
++        pub st_blocks: ::blkcnt64_t,
++        pub st_atime: ::time_t,
++        pub st_atime_nsec: ::c_long,
++        pub st_mtime: ::time_t,
++        pub st_mtime_nsec: ::c_long,
++        pub st_ctime: ::time_t,
++        pub st_ctime_nsec: ::c_long,
++        __reserved: [::c_long; 3],
++    }
++
++    pub struct rlimit64 { // ToDo
++        pub rlim_cur: rlim64_t,
++        pub rlim_max: rlim64_t,
++    }
++
++    pub struct cpu_set_t { // ToDo
++        #[cfg(target_pointer_width = "32")]
++        bits: [u32; 32],
++        #[cfg(target_pointer_width = "64")]
++        bits: [u64; 16],
++    }
++
++    pub struct timespec { // ToDo
++        tv_sec: time_t, // seconds
++        tv_nsec: ::c_ulong, // nanoseconds
++    }
++
++    pub struct fsid_t { // ToDo
++        __val: [::c_int; 2],
++    }
++}
++
++// constants
++pub const O_CLOEXEC: ::c_int = 0x80000;
++pub const O_DIRECTORY: ::c_int = 0200000;
++pub const NCCS: usize = 32;
++pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
++pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
++pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
++pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
++pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
++pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
++pub const RLIM_INFINITY: u64 = 0xffffffffffffffff;
++pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
++pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
++pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
++
++extern {
++    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..385b66758c1a7d06bc2b015345c463084df32d89
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,247 @@@
++//! Windows CRT definitions
++
++pub type c_char = i8;
++pub type c_long = i32;
++pub type c_ulong = u32;
++pub type wchar_t = u16;
++
++pub type clock_t = i32;
++
++cfg_if! {
++    if #[cfg(all(target_arch = "x86", target_env = "gnu"))] {
++        pub type time_t = i32;
++    } else {
++        pub type time_t = i64;
++    }
++}
++
++pub type off_t = i32;
++pub type dev_t = u32;
++pub type ino_t = u16;
++pub enum timezone {}
++pub type time64_t = i64;
++
++s! {
++    // note this is the struct called stat64 in Windows. Not stat, nor stati64.
++    pub struct stat {
++        pub st_dev: dev_t,
++        pub st_ino: ino_t,
++        pub st_mode: u16,
++        pub st_nlink: ::c_short,
++        pub st_uid: ::c_short,
++        pub st_gid: ::c_short,
++        pub st_rdev: dev_t,
++        pub st_size: i64,
++        pub st_atime: time64_t,
++        pub st_mtime: time64_t,
++        pub st_ctime: time64_t,
++    }
++
++    // note that this is called utimbuf64 in Windows
++    pub struct utimbuf {
++        pub actime: time64_t,
++        pub modtime: time64_t,
++    }
++
++    pub struct tm {
++        tm_sec: ::c_int,
++        tm_min: ::c_int,
++        tm_hour: ::c_int,
++        tm_mday: ::c_int,
++        tm_mon: ::c_int,
++        tm_year: ::c_int,
++        tm_wday: ::c_int,
++        tm_yday: ::c_int,
++        tm_isdst: ::c_int,
++    }
++
++    pub struct timeval {
++        pub tv_sec: c_long,
++        pub tv_usec: c_long,
++    }
++
++    pub struct timespec {
++        pub tv_sec: time_t,
++        pub tv_nsec: c_long,
++    }
++}
++
++pub const EXIT_FAILURE: ::c_int = 1;
++pub const EXIT_SUCCESS: ::c_int = 0;
++pub const RAND_MAX: ::c_int = 32767;
++pub const EOF: ::c_int = -1;
++pub const SEEK_SET: ::c_int = 0;
++pub const SEEK_CUR: ::c_int = 1;
++pub const SEEK_END: ::c_int = 2;
++pub const _IOFBF: ::c_int = 0;
++pub const _IONBF: ::c_int = 4;
++pub const _IOLBF: ::c_int = 64;
++pub const BUFSIZ: ::c_uint = 512;
++pub const FOPEN_MAX: ::c_uint = 20;
++pub const FILENAME_MAX: ::c_uint = 260;
++
++cfg_if! {
++    if #[cfg(all(target_env = "gnu"))] {
++        pub const L_tmpnam: ::c_uint = 14;
++        pub const TMP_MAX: ::c_uint = 0x7fff;
++    } else if #[cfg(all(target_env = "msvc"))] {
++        pub const L_tmpnam: ::c_uint = 260;
++        pub const TMP_MAX: ::c_uint = 0x7fff_ffff;
++    } else {
++        // Unknown target_env
++    }
++}
++
++pub const O_RDONLY: ::c_int = 0;
++pub const O_WRONLY: ::c_int = 1;
++pub const O_RDWR: ::c_int = 2;
++pub const O_APPEND: ::c_int = 8;
++pub const O_CREAT: ::c_int = 256;
++pub const O_EXCL: ::c_int = 1024;
++pub const O_TEXT: ::c_int = 16384;
++pub const O_BINARY: ::c_int = 32768;
++pub const O_NOINHERIT: ::c_int = 128;
++pub const O_TRUNC: ::c_int = 512;
++pub const S_IFCHR: ::c_int = 8192;
++pub const S_IFDIR: ::c_int = 16384;
++pub const S_IFREG: ::c_int = 32768;
++pub const S_IFMT: ::c_int = 61440;
++pub const S_IEXEC: ::c_int = 64;
++pub const S_IWRITE: ::c_int = 128;
++pub const S_IREAD: ::c_int = 256;
++
++pub const LC_ALL: ::c_int = 0;
++pub const LC_COLLATE: ::c_int = 1;
++pub const LC_CTYPE: ::c_int = 2;
++pub const LC_MONETARY: ::c_int = 3;
++pub const LC_NUMERIC: ::c_int = 4;
++pub const LC_TIME: ::c_int = 5;
++
++pub const EPERM: ::c_int = 1;
++pub const ENOENT: ::c_int = 2;
++pub const ESRCH: ::c_int = 3;
++pub const EINTR: ::c_int = 4;
++pub const EIO: ::c_int = 5;
++pub const ENXIO: ::c_int = 6;
++pub const E2BIG: ::c_int = 7;
++pub const ENOEXEC: ::c_int = 8;
++pub const EBADF: ::c_int = 9;
++pub const ECHILD: ::c_int = 10;
++pub const EAGAIN: ::c_int = 11;
++pub const ENOMEM: ::c_int = 12;
++pub const EACCES: ::c_int = 13;
++pub const EFAULT: ::c_int = 14;
++pub const EBUSY: ::c_int = 16;
++pub const EEXIST: ::c_int = 17;
++pub const EXDEV: ::c_int = 18;
++pub const ENODEV: ::c_int = 19;
++pub const ENOTDIR: ::c_int = 20;
++pub const EISDIR: ::c_int = 21;
++pub const EINVAL: ::c_int = 22;
++pub const ENFILE: ::c_int = 23;
++pub const EMFILE: ::c_int = 24;
++pub const ENOTTY: ::c_int = 25;
++pub const EFBIG: ::c_int = 27;
++pub const ENOSPC: ::c_int = 28;
++pub const ESPIPE: ::c_int = 29;
++pub const EROFS: ::c_int = 30;
++pub const EMLINK: ::c_int = 31;
++pub const EPIPE: ::c_int = 32;
++pub const EDOM: ::c_int = 33;
++pub const ERANGE: ::c_int = 34;
++pub const EDEADLK: ::c_int = 36;
++pub const EDEADLOCK: ::c_int = 36;
++pub const ENAMETOOLONG: ::c_int = 38;
++pub const ENOLCK: ::c_int = 39;
++pub const ENOSYS: ::c_int = 40;
++pub const ENOTEMPTY: ::c_int = 41;
++pub const EILSEQ: ::c_int = 42;
++pub const STRUNCATE: ::c_int = 80;
++
++#[cfg(all(target_env = "msvc", stdbuild))] // " if " -- appease style checker
++#[link(name = "msvcrt", cfg(not(target_feature = "crt-static")))]
++#[link(name = "libcmt", cfg(target_feature = "crt-static"))]
++extern {}
++
++extern {
++    #[link_name = "_chmod"]
++    pub fn chmod(path: *const c_char, mode: ::c_int) -> ::c_int;
++    #[link_name = "_wchmod"]
++    pub fn wchmod(path: *const wchar_t, mode: ::c_int) -> ::c_int;
++    #[link_name = "_mkdir"]
++    pub fn mkdir(path: *const c_char) -> ::c_int;
++    #[link_name = "_wrmdir"]
++    pub fn wrmdir(path: *const wchar_t) -> ::c_int;
++    #[link_name = "_fstat64"]
++    pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int;
++    #[link_name = "_stat64"]
++    pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int;
++    #[link_name = "_wstat64"]
++    pub fn wstat(path: *const wchar_t, buf: *mut stat) -> ::c_int;
++    #[link_name = "_wutime64"]
++    pub fn wutime(file: *const wchar_t, buf: *mut utimbuf) -> ::c_int;
++    #[link_name = "_popen"]
++    pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE;
++    #[link_name = "_pclose"]
++    pub fn pclose(stream: *mut ::FILE) -> ::c_int;
++    #[link_name = "_fdopen"]
++    pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE;
++    #[link_name = "_fileno"]
++    pub fn fileno(stream: *mut ::FILE) -> ::c_int;
++    #[link_name = "_open"]
++    pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
++    #[link_name = "_wopen"]
++    pub fn wopen(path: *const wchar_t, oflag: ::c_int, ...) -> ::c_int;
++    #[link_name = "_creat"]
++    pub fn creat(path: *const c_char, mode: ::c_int) -> ::c_int;
++    #[link_name = "_access"]
++    pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int;
++    #[link_name = "_chdir"]
++    pub fn chdir(dir: *const c_char) -> ::c_int;
++    #[link_name = "_close"]
++    pub fn close(fd: ::c_int) -> ::c_int;
++    #[link_name = "_dup"]
++    pub fn dup(fd: ::c_int) -> ::c_int;
++    #[link_name = "_dup2"]
++    pub fn dup2(src: ::c_int, dst: ::c_int) -> ::c_int;
++    #[link_name = "_execv"]
++    pub fn execv(prog: *const c_char, argv: *const *const c_char) -> ::intptr_t;
++    #[link_name = "_execve"]
++    pub fn execve(prog: *const c_char, argv: *const *const c_char,
++                  envp: *const *const c_char) -> ::c_int;
++    #[link_name = "_execvp"]
++    pub fn execvp(c: *const c_char, argv: *const *const c_char) -> ::c_int;
++    #[link_name = "_execvpe"]
++    pub fn execvpe(c: *const c_char, argv: *const *const c_char,
++                   envp: *const *const c_char) -> ::c_int;
++    #[link_name = "_getcwd"]
++    pub fn getcwd(buf: *mut c_char, size: ::c_int) -> *mut c_char;
++    #[link_name = "_getpid"]
++    pub fn getpid() -> ::c_int;
++    #[link_name = "_isatty"]
++    pub fn isatty(fd: ::c_int) -> ::c_int;
++    #[link_name = "_lseek"]
++    pub fn lseek(fd: ::c_int, offset: c_long, origin: ::c_int) -> c_long;
++    #[link_name = "_pipe"]
++    pub fn pipe(fds: *mut ::c_int,
++                psize: ::c_uint,
++                textmode: ::c_int) -> ::c_int;
++    #[link_name = "_read"]
++    pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::c_uint) -> ::c_int;
++    #[link_name = "_rmdir"]
++    pub fn rmdir(path: *const c_char) -> ::c_int;
++    #[link_name = "_unlink"]
++    pub fn unlink(c: *const c_char) -> ::c_int;
++    #[link_name = "_write"]
++    pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::c_uint) -> ::c_int;
++    #[link_name = "_commit"]
++    pub fn commit(fd: ::c_int) -> ::c_int;
++    #[link_name = "_get_osfhandle"]
++    pub fn get_osfhandle(fd: ::c_int) -> ::intptr_t;
++    #[link_name = "_open_osfhandle"]
++    pub fn open_osfhandle(osfhandle: ::intptr_t, flags: ::c_int) -> ::c_int;
++    pub fn setlocale(category: ::c_int, locale: *const c_char) -> *mut c_char;
++    #[link_name = "_wsetlocale"]
++    pub fn wsetlocale(category: ::c_int,
++                      locale: *const wchar_t) -> *mut wchar_t;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2cf19f08816c19af036f94cb501789853651fc57
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"4bf0336886480e671965f794bc9b6fce88503563013d1bfb7a502c81fe3ac527"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c2a4eac3c6f67aa45abf6c0bc2c69080dcec1ecd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,8 @@@
++# This is the list of Fuchsia Authors.
++
++# Names should be added to this file as one of
++#     Organization's name
++#     Individual's name <submission email address>
++#     Individual's name <submission email address> <email2> <emailN>
++
++Google Inc.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a38927ead1f92a77ca50bd6bffde46c0b932a729
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++# Copyright 2017 The Fuchsia Authors. All rights reserved.
++# Use of this source code is governed by a BSD-style license that can be
++# found in the LICENSE file.
++
++import("//build/rust/rust_library.gni")
++
++rust_library("magenta") {
++  deps = [
++    "//rust/magenta-rs/magenta-sys",
++    "//third_party/rust-crates:num-traits-0.1.39",
++  ]
++
++  with_tests = true
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..81e293807a0ef288a780fb7685335ec793038340
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,9 @@@
++This repository accepts contributions using Gerrit.
++
++Instructions for using Gerrit:
++
++ * https://gerrit-review.googlesource.com/Documentation/
++
++Before we can land your change, you need to sign the Google CLA:
++
++ * https://cla.developers.google.com/
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..86469febbaed9a50a663c60b8deadb9424663ade
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,11 @@@
++[package]
++name = "magenta"
++version = "0.1.1"
++license = "BSD-3-Clause"
++authors = ["Raph Levien <raph@google.com>"]
++description = "Rust bindings for the Magenta kernel"
++repository = "https://fuchsia.googlesource.com/magenta-rs/"
++
++[dependencies]
++conv = "0.3.3"
++magenta-sys = { path = "magenta-sys", version = "0.1.1" }
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..24cf00f8ba8f292ec79849d5a0c38d69ae565823
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,175 @@@
++Getting started with Rust on Fuchsia
++====================================
++
++This page contains instructions for how to obtain a Rust toolchain
++that can be used to build binaries suitable for running on Fuchsia.
++
++Building the compiler
++---------------------
++
++Note: almost all the steps in this section are now automated in a shell script,
++just run this from your Fuchsia root:
++
++```
++sh build/rust/prelude.sh
++```
++
++The detailed instructions remain below, for those who might want to customize
++their build process.
++
++First, build the [clang wrapper](tools/). It helps if you check out this repo
++under your fuchsia root, but it's not necessary. We'll call the directory
++where you created the symlinks `${RUST_TOOLS}`. In any case, the created
++symlinks do need to be under your Fuchsia root, which we will refer to as
++`${FUCHSIA_ROOT}`.
++
++You can sanity-check the clang wrapper:
++
++```
++${RUST_TOOLS}/x86-64-unknown-fuchsia-cc 
++clang-4.0: error: no input files
++```
++
++Check out a fresh copy of the Rust compiler:
++
++```
++git clone https://github.com/rust-lang/rust.git
++cd rust
++```
++
++Henceforth, we'll call this directory `${RUST_ROOT}`.
++
++Create a config.toml file (in the `${RUST_ROOT}`) from the following template.
++Expand the `${RUST_TOOLS}` paths out to the actual absolute path.
++
++```
++# Config file for fuchsia target for building Rust.
++# See `src/bootstrap/config.toml.example` for other settings.
++
++[rust]
++
++# Disable backtrace, as it requires additional lib support.
++backtrace = false
++
++[target.x86_64-unknown-fuchsia]
++
++cc = "${RUST_TOOLS}/x86-64-unknown-fuchsia-cc"
++
++[target.aarch64-unknown-fuchsia]
++
++# Path to the clang wrapper
++cc = "${RUST_TOOLS}/aarch64-unknown-fuchsia-cc"
++```
++
++Run:
++
++```
++cd ${FUCHSIA_ROOT}
++./scripts/build-sysroot.sh
++cd ${RUST_ROOT}
++./configure --enable-rustbuild --target=x86_64-unknown-fuchsia
++./x.py build --stage 1
++```
++
++(If your cmake installation is too old (e.g., Ubuntu 14.04), you can use the
++prebuilt in Fuchsia:
++```
++PATH=${FUCHSIA_ROOT}/buildtools/cmake/bin:$PATH ./x.py build --stage 1
++```
++
++You should now have a working Rust compiler under `build/x86_64-apple-darwin/stage1/bin/rustc`
++(adjust your host triple as necessary).
++
++You can adjust exactly what gets built using the --stage and --step flags to `bootstrap.py`.
++If you're building a compiler for release, you'll want the stage2 compiler. Conversely,
++if you're hacking on the compiler or libraries, you might want to build less to reduce
++your edit-compile-test cycle (for example `--step libstd`).
++
++Building code with rustc and cargo
++----------------------------------
++
++To build a single binary, run:
++
++```
++./build/x86_64-apple-darwin/stage1/bin/rustc --target x86_64-unknown-fuchsia hello.rs \
++  -Clinker=${RUST_TOOLS}/x86-64-unknown-fuchsia-cc
++```
++
++To build with cargo, create a config file in ${RUST_ROOT}/.cargo/config.
++As above, expand the absolute path.
++
++```
++[target.x86_64-unknown-fuchsia]
++linker = "${RUST_TOOLS}/x86-64-unknown-fuchsia-cc"
++
++[target.aarch64-unknown-fuchsia]
++linker = "${RUST_TOOLS}/aarch64-unknown-fuchsia-cc"
++```
++
++Then, invoke cargo as follows:
++
++```
++RUSTC=${RUST_ROOT}/build/x86_64-apple-darwin/stage1/bin/rustc cargo build --target=x86_64-unknown-fuchsia --example mx_toy
++```
++
++This will produce a binary as `target/x86_64-unknown-fuchsia/debug/examples/mx_toy`.
++A common error at this point is a link failure due to the linker not pointing to
++the clang wrapper (different failure mode depending on your default setup). A
++telltale sign is that the link command line begins with "cc" instead of
++"x86-unknown-fuchsia-cc". Make sure the cargo/.config is correct and in the right
++place (root directory of the crate to build).
++
++Running binaries on Fuchsia
++---------------------------
++
++First, of course, you'll need [Fuchsia](https://fuchsia.googlesource.com/fuchsia/).
++You probably already have this if your rust wrappers work.
++
++There are a few ways to get binaries into the file system (and this is rapidly
++evolving to become more flexible), but the most straightforward is to manually
++edit the manifest for creating the bootfs image.
++
++Edit `out/debug-x86-64/gen/packages/gn/user.bootfs.manifest` and manually add a line like:
++
++```
++bin/mx_toy=${YOUR_CRATE_ROOT}/target/x86_64-unknown-fuchsia/debug/examples/mx_toy
++```
++
++Then, rebuild the bootfs (in your fuchsia root as cwd):
++
++```
++./out/build-magenta/tools/mkbootfs -o ./out/debug-x86-64/user.bootfs out/debug-x86-64/gen/packages/gn/user.bootfs.manifest
++```
++
++Now you can start the system, and run your binary:
++
++```
++cd magenta
++./scripts/run-magenta-x86-64 -g -x ../out/debug-x86-64/user.bootfs
++mx_toy
++```
++
++Running tests
++-------------
++
++Running tests is possible but somewhat clunky.
++
++First, build your test executable:
++
++```
++RUSTC=${RUST_ROOT}/build/x86_64-apple-darwin/stage1/bin/rustc cargo test --target=x86_64-unknown-fuchsia --no-run
++```
++
++This will generate a test executable with a name like
++`target/x86_64-unknown-fuchsia/debug/magenta-523728a3f134326a`. Run this
++binary as above.
++
++Notes
++-----
++
++General instructions on cross-compiling Rust can be found at
++[japaric/rust-cross](https://github.com/japaric/rust-cross). At some point soon
++it will be possible to build fuchsia targets using nightly Rust (and then stable
++at the appropriate time), but it still requires a `std` crate for your target.
++Prebuilt versions are not yet available.
++
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ac6402fd9155ebe6956c0310447c516166a958a3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,27 @@@
++// Copyright 2016 The Fuchsia Authors. All rights reserved.
++//
++// Redistribution and use in source and binary forms, with or without
++// modification, are permitted provided that the following conditions are
++// met:
++//
++//    * Redistributions of source code must retain the above copyright
++// notice, this list of conditions and the following disclaimer.
++//    * Redistributions in binary form must reproduce the above
++// copyright notice, this list of conditions and the following disclaimer
++// in the documentation and/or other materials provided with the
++// distribution.
++//    * Neither the name of Google Inc. nor the names of its
++// contributors may be used to endorse or promote products derived from
++// this software without specific prior written permission.
++//
++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
++// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2746e78d1beff2f55b454cd33c3f96d03f901bf0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,22 @@@
++Additional IP Rights Grant (Patents)
++
++"This implementation" means the copyrightable works distributed by
++Google as part of the Fuchsia project.
++
++Google hereby grants to you a perpetual, worldwide, non-exclusive,
++no-charge, royalty-free, irrevocable (except as stated in this
++section) patent license to make, have made, use, offer to sell, sell,
++import, transfer, and otherwise run, modify and propagate the contents
++of this implementation of Fuchsia, where such license applies only to
++those patent claims, both currently owned by Google and acquired in
++the future, licensable by Google that are necessarily infringed by
++this implementation. This grant does not include claims that would be
++infringed only as a consequence of further modification of this
++implementation. If you or your agent or exclusive licensee institute
++or order or agree to the institution of patent litigation or any other
++patent enforcement activity against any entity (including a
++cross-claim or counterclaim in a lawsuit) alleging that this
++implementation of Fuchsia constitutes direct or contributory patent
++infringement, or inducement of patent infringement, then any patent
++rights granted to you under this License for this implementation of
++Fuchsia shall terminate as of the date such litigation is filed.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c298ad3628732716806dd6ca57b7e5cf403bd61f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,8 @@@
++Rust bindings for Magenta kernel
++================================
++
++This repository contains Rust language bindings for Magenta kernel syscalls. The
++main crate contains type-safe wrappers, while the inner "sys" crate contains the
++raw types and FFI declarations.
++
++To get started, see the [GETTING_STARTED](GETTING_STARTED.md) documentation.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a82d2378f12ab098dec35b86c13691712d38386a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,9 @@@
++# Copyright 2017 The Fuchsia Authors. All rights reserved.
++# Use of this source code is governed by a BSD-style license that can be
++# found in the LICENSE file.
++
++group("examples") {
++  deps = [
++    "//rust/magenta-rs/examples/mx_toy",
++  ]
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b3ce7c8599351190ada30d0ab7c576fa29ac7a9b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,392 @@@
++// Copyright 2017 The Fuchsia Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++//! Type-safe bindings for Magenta channel objects.
++
++use {HandleBase, Handle, HandleRef, INVALID_HANDLE, Peered, Status, Time};
++use {sys, handle_drop, into_result, size_to_u32_sat};
++use conv::{ValueInto};
++use std::mem;
++
++/// An object representing a Magenta
++/// [channel](https://fuchsia.googlesource.com/magenta/+/master/docs/objects/channel.md).
++///
++/// As essentially a subtype of `Handle`, it can be freely interconverted.
++#[derive(Debug, Eq, PartialEq)]
++pub struct Channel(Handle);
++
++impl HandleBase for Channel {
++    fn get_ref(&self) -> HandleRef {
++        self.0.get_ref()
++    }
++
++    fn from_handle(handle: Handle) -> Self {
++        Channel(handle)
++    }
++}
++
++impl Peered for Channel {
++}
++
++impl Channel {
++    /// Create a channel, resulting an a pair of `Channel` objects representing both
++    /// sides of the channel. Messages written into one maybe read from the opposite.
++    ///
++    /// Wraps the
++    /// [mx_channel_create](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/channel_create.md)
++    /// syscall.
++    pub fn create(opts: ChannelOpts) -> Result<(Channel, Channel), Status> {
++        unsafe {
++            let mut handle0 = 0;
++            let mut handle1 = 0;
++            let status = sys::mx_channel_create(opts as u32, &mut handle0, &mut handle1);
++            into_result(status, ||
++                (Self::from_handle(Handle(handle0)),
++                    Self::from_handle(Handle(handle1))))
++        }
++    }
++
++    /// Read a message from a channel. Wraps the
++    /// [mx_channel_read](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/channel_read.md)
++    /// syscall.
++    ///
++    /// If the `MessageBuf` lacks the capacity to hold the pending message,
++    /// returns an `Err` with the number of bytes and number of handles needed.
++    /// Otherwise returns an `Ok` with the result as usual.
++    pub fn read_raw(&self, opts: u32, buf: &mut MessageBuf)
++        -> Result<Result<(), Status>, (usize, usize)>
++    {
++        unsafe {
++            buf.reset_handles();
++            let raw_handle = self.raw_handle();
++            let mut num_bytes: u32 = size_to_u32_sat(buf.bytes.capacity());
++            let mut num_handles: u32 = size_to_u32_sat(buf.handles.capacity());
++            let status = sys::mx_channel_read(raw_handle, opts,
++                buf.bytes.as_mut_ptr(), buf.handles.as_mut_ptr(),
++                num_bytes, num_handles, &mut num_bytes, &mut num_handles);
++            if status == sys::MX_ERR_BUFFER_TOO_SMALL {
++                Err((num_bytes as usize, num_handles as usize))
++            } else {
++                Ok(into_result(status, || {
++                    buf.bytes.set_len(num_bytes as usize);
++                    buf.handles.set_len(num_handles as usize);
++                }))
++            }
++        }
++    }
++
++    /// Read a message from a channel.
++    ///
++    /// Note that this method can cause internal reallocations in the `MessageBuf`
++    /// if it is lacks capacity to hold the full message. If such reallocations
++    /// are not desirable, use `read_raw` instead.
++    pub fn read(&self, opts: u32, buf: &mut MessageBuf) -> Result<(), Status> {
++        loop {
++            match self.read_raw(opts, buf) {
++                Ok(result) => return result,
++                Err((num_bytes, num_handles)) => {
++                    buf.ensure_capacity_bytes(num_bytes);
++                    buf.ensure_capacity_handles(num_handles);
++                }
++            }
++        }
++    }
++
++    /// Write a message to a channel. Wraps the
++    /// [mx_channel_write](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/channel_write.md)
++    /// syscall.
++    pub fn write(&self, bytes: &[u8], handles: &mut Vec<Handle>, opts: u32)
++            -> Result<(), Status>
++    {
++        let n_bytes = try!(bytes.len().value_into().map_err(|_| Status::ErrOutOfRange));
++        let n_handles = try!(handles.len().value_into().map_err(|_| Status::ErrOutOfRange));
++        unsafe {
++            let status = sys::mx_channel_write(self.raw_handle(), opts, bytes.as_ptr(), n_bytes,
++                handles.as_ptr() as *const sys::mx_handle_t, n_handles);
++            into_result(status, || {
++                // Handles were successfully transferred, forget them on sender side
++                handles.set_len(0);
++            })
++        }
++    }
++
++    /// Send a message consisting of the given bytes and handles to a channel and await a reply. The
++    /// bytes should start with a four byte 'txid' which is used to identify the matching reply.
++    ///
++    /// Wraps the
++    /// [mx_channel_call](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/channel_call.md)
++    /// syscall.
++    ///
++    /// Note that unlike [`read`][read], the caller must ensure that the MessageBuf has enough
++    /// capacity for the bytes and handles which will be received, as replies which are too large
++    /// are discarded.
++    ///
++    /// On failure returns the both the main and read status.
++    ///
++    /// [read]: struct.Channel.html#method.read
++    pub fn call(&self, options: u32, timeout: Time, bytes: &[u8], handles: &mut Vec<Handle>,
++        buf: &mut MessageBuf) -> Result<(), (Status, Status)>
++    {
++        let write_num_bytes = try!(bytes.len().value_into().map_err(
++            |_| (Status::ErrOutOfRange, Status::NoError)));
++        let write_num_handles = try!(handles.len().value_into().map_err(
++            |_| (Status::ErrOutOfRange, Status::NoError)));
++        buf.reset_handles();
++        let read_num_bytes: u32 = size_to_u32_sat(buf.bytes.capacity());
++        let read_num_handles: u32 = size_to_u32_sat(buf.handles.capacity());
++        let args = sys::mx_channel_call_args_t {
++            wr_bytes: bytes.as_ptr(),
++            wr_handles: handles.as_ptr() as *const sys::mx_handle_t,
++            rd_bytes: buf.bytes.as_mut_ptr(),
++            rd_handles: buf.handles.as_mut_ptr(),
++            wr_num_bytes: write_num_bytes,
++            wr_num_handles: write_num_handles,
++            rd_num_bytes: read_num_bytes,
++            rd_num_handles: read_num_handles,
++        };
++        let mut actual_read_bytes: u32 = 0;
++        let mut actual_read_handles: u32 = 0;
++        let mut read_status = sys::MX_OK;
++        let status = unsafe {
++            sys::mx_channel_call(self.raw_handle(), options, timeout, &args, &mut actual_read_bytes,
++                &mut actual_read_handles, &mut read_status)
++        };
++        if status == sys::MX_OK || status == sys::MX_ERR_TIMED_OUT || status == sys::MX_ERR_CALL_FAILED
++        {
++            // Handles were successfully transferred, even if we didn't get a response, so forget
++            // them on the sender side.
++            unsafe { handles.set_len(0); }
++        }
++        unsafe {
++            buf.bytes.set_len(actual_read_bytes as usize);
++            buf.handles.set_len(actual_read_handles as usize);
++        }
++        if status == sys::MX_OK {
++            Ok(())
++        } else {
++            Err((Status::from_raw(status), Status::from_raw(read_status)))
++        }
++    }
++}
++
++/// Options for creating a channel.
++#[repr(u32)]
++#[derive(Debug, Copy, Clone, Eq, PartialEq)]
++pub enum ChannelOpts {
++    /// A normal channel.
++    Normal = 0,
++}
++
++impl Default for ChannelOpts {
++    fn default() -> Self {
++        ChannelOpts::Normal
++    }
++}
++
++/// A buffer for _receiving_ messages from a channel.
++///
++/// A `MessageBuf` is essentially a byte buffer and a vector of
++/// handles, but move semantics for "taking" handles requires special handling.
++///
++/// Note that for sending messages to a channel, the caller manages the buffers,
++/// using a plain byte slice and `Vec<Handle>`.
++#[derive(Default)]
++#[derive(Debug)]
++pub struct MessageBuf {
++    bytes: Vec<u8>,
++    handles: Vec<sys::mx_handle_t>,
++}
++
++impl MessageBuf {
++    /// Create a new, empty, message buffer.
++    pub fn new() -> Self {
++        Default::default()
++    }
++
++    /// Ensure that the buffer has the capacity to hold at least `n_bytes` bytes.
++    pub fn ensure_capacity_bytes(&mut self, n_bytes: usize) {
++        ensure_capacity(&mut self.bytes, n_bytes);
++    }
++
++    /// Ensure that the buffer has the capacity to hold at least `n_handles` handles.
++    pub fn ensure_capacity_handles(&mut self, n_handles: usize) {
++        ensure_capacity(&mut self.handles, n_handles);
++    }
++
++    /// Get a reference to the bytes of the message buffer, as a `&[u8]` slice.
++    pub fn bytes(&self) -> &[u8] {
++        self.bytes.as_slice()
++    }
++
++    /// The number of handles in the message buffer. Note this counts the number
++    /// available when the message was received; `take_handle` does not affect
++    /// the count.
++    pub fn n_handles(&self) -> usize {
++        self.handles.len()
++    }
++
++    /// Take the handle at the specified index from the message buffer. If the
++    /// method is called again with the same index, it will return `None`, as
++    /// will happen if the index exceeds the number of handles available.
++    pub fn take_handle(&mut self, index: usize) -> Option<Handle> {
++        self.handles.get_mut(index).and_then(|handleref|
++            if *handleref == INVALID_HANDLE {
++                None
++            } else {
++                Some(Handle(mem::replace(handleref, INVALID_HANDLE)))
++            }
++        )
++    }
++
++    fn drop_handles(&mut self) {
++        for &handle in &self.handles {
++            if handle != 0 {
++                handle_drop(handle);
++            }
++        }
++    }
++
++    fn reset_handles(&mut self) {
++        self.drop_handles();
++        self.handles.clear();
++    }
++}
++
++impl Drop for MessageBuf {
++    fn drop(&mut self) {
++        self.drop_handles();
++    }
++}
++
++fn ensure_capacity<T>(vec: &mut Vec<T>, size: usize) {
++    let len = vec.len();
++    if size > len {
++        vec.reserve(size - len);
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use super::*;
++    use {Duration, MX_CHANNEL_READABLE, MX_CHANNEL_WRITABLE, MX_RIGHT_SAME_RIGHTS, MX_SIGNAL_LAST_HANDLE, Vmo, VmoOpts};
++    use deadline_after;
++    use std::thread;
++
++    #[test]
++    fn channel_basic() {
++        let (p1, p2) = Channel::create(ChannelOpts::Normal).unwrap();
++
++        let mut empty = vec![];
++        assert!(p1.write(b"hello", &mut empty, 0).is_ok());
++
++        let mut buf = MessageBuf::new();
++        assert!(p2.read(0, &mut buf).is_ok());
++        assert_eq!(buf.bytes(), b"hello");
++    }
++
++    #[test]
++    fn channel_read_raw_too_small() {
++        let (p1, p2) = Channel::create(ChannelOpts::Normal).unwrap();
++
++        let mut empty = vec![];
++        assert!(p1.write(b"hello", &mut empty, 0).is_ok());
++
++        let mut buf = MessageBuf::new();
++        let result = p2.read_raw(0, &mut buf);
++        assert_eq!(result, Err((5, 0)));
++        assert_eq!(buf.bytes(), b"");
++    }
++
++    #[test]
++    fn channel_send_handle() {
++        let hello_length: usize = 5;
++
++        // Create a pair of channels and a virtual memory object.
++        let (p1, p2) = Channel::create(ChannelOpts::Normal).unwrap();
++        let vmo = Vmo::create(hello_length as u64, VmoOpts::Default).unwrap();
++
++        // Duplicate VMO handle and send it down the channel.
++        let duplicate_vmo_handle = vmo.duplicate(MX_RIGHT_SAME_RIGHTS).unwrap().into_handle();
++        let mut handles_to_send: Vec<Handle> = vec![duplicate_vmo_handle];
++        assert!(p1.write(b"", &mut handles_to_send, 0).is_ok());
++        // Handle should be removed from vector.
++        assert!(handles_to_send.is_empty());
++
++        // Read the handle from the receiving channel.
++        let mut buf = MessageBuf::new();
++        assert!(p2.read(0, &mut buf).is_ok());
++        assert_eq!(buf.n_handles(), 1);
++        // Take the handle from the buffer.
++        let received_handle = buf.take_handle(0).unwrap();
++        // Should not affect number of handles.
++        assert_eq!(buf.n_handles(), 1);
++        // Trying to take it again should fail.
++        assert!(buf.take_handle(0).is_none());
++
++        // Now to test that we got the right handle, try writing something to it...
++        let received_vmo = Vmo::from_handle(received_handle);
++        assert_eq!(received_vmo.write(b"hello", 0).unwrap(), hello_length);
++
++        // ... and reading it back from the original VMO.
++        let mut read_vec = vec![0; hello_length];
++        assert_eq!(vmo.read(&mut read_vec, 0).unwrap(), hello_length);
++        assert_eq!(read_vec, b"hello");
++    }
++
++    #[test]
++    fn channel_call_timeout() {
++        let ten_ms: Duration = 10_000_000;
++
++        // Create a pair of channels and a virtual memory object.
++        let (p1, p2) = Channel::create(ChannelOpts::Normal).unwrap();
++        let vmo = Vmo::create(0 as u64, VmoOpts::Default).unwrap();
++
++        // Duplicate VMO handle and send it along with the call.
++        let duplicate_vmo_handle = vmo.duplicate(MX_RIGHT_SAME_RIGHTS).unwrap().into_handle();
++        let mut handles_to_send: Vec<Handle> = vec![duplicate_vmo_handle];
++        let mut buf = MessageBuf::new();
++        assert_eq!(p1.call(0, deadline_after(ten_ms), b"call", &mut handles_to_send, &mut buf),
++            Err((Status::ErrTimedOut, Status::NoError)));
++        // Handle should be removed from vector even though we didn't get a response, as it was
++        // still sent over the channel.
++        assert!(handles_to_send.is_empty());
++
++        // Should be able to read call even though it timed out waiting for a response.
++        let mut buf = MessageBuf::new();
++        assert!(p2.read(0, &mut buf).is_ok());
++        assert_eq!(buf.bytes(), b"call");
++        assert_eq!(buf.n_handles(), 1);
++    }
++
++    #[test]
++    fn channel_call() {
++        let hundred_ms: Duration = 100_000_000;
++
++        // Create a pair of channels
++        let (p1, p2) = Channel::create(ChannelOpts::Normal).unwrap();
++
++        // Start a new thread to respond to the call.
++        let server = thread::spawn(move || {
++            assert_eq!(p2.wait(MX_CHANNEL_READABLE, deadline_after(hundred_ms)),
++                Ok(MX_CHANNEL_READABLE | MX_CHANNEL_WRITABLE | MX_SIGNAL_LAST_HANDLE));
++            let mut buf = MessageBuf::new();
++            assert_eq!(p2.read(0, &mut buf), Ok(()));
++            assert_eq!(buf.bytes(), b"txidcall");
++            assert_eq!(buf.n_handles(), 0);
++            let mut empty = vec![];
++            assert_eq!(p2.write(b"txidresponse", &mut empty, 0), Ok(()));
++        });
++
++        // Make the call.
++        let mut empty = vec![];
++        let mut buf = MessageBuf::new();
++        buf.ensure_capacity_bytes(12);
++        assert_eq!(p1.call(0, deadline_after(hundred_ms), b"txidcall", &mut empty, &mut buf),
++            Ok(()));
++        assert_eq!(buf.bytes(), b"txidresponse");
++        assert_eq!(buf.n_handles(), 0);
++
++        assert!(server.join().is_ok());
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..140957f3e068e3ee1264f08f12b181cee5aa5767
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,53 @@@
++// Copyright 2017 The Fuchsia Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++//! Type-safe bindings for Magenta event objects.
++
++use {Cookied, HandleBase, Handle, HandleRef, Status};
++use {sys, into_result};
++
++/// An object representing a Magenta
++/// [event object](https://fuchsia.googlesource.com/magenta/+/master/docs/objects/event.md).
++///
++/// As essentially a subtype of `Handle`, it can be freely interconverted.
++#[derive(Debug, Eq, PartialEq)]
++pub struct Event(Handle);
++
++impl HandleBase for Event {
++    fn get_ref(&self) -> HandleRef {
++        self.0.get_ref()
++    }
++
++    fn from_handle(handle: Handle) -> Self {
++        Event(handle)
++    }
++}
++
++impl Cookied for Event {
++}
++
++impl Event {
++    /// Create an event object, an object which is signalable but nothing else. Wraps the
++    /// [mx_event_create](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/event_create.md)
++    /// syscall.
++    pub fn create(options: EventOpts) -> Result<Event, Status> {
++        let mut out = 0;
++        let status = unsafe { sys::mx_event_create(options as u32, &mut out) };
++        into_result(status, || Self::from_handle(Handle(out)))
++    }
++}
++
++/// Options for creating an event object.
++#[repr(u32)]
++#[derive(Debug, Copy, Clone, Eq, PartialEq)]
++pub enum EventOpts {
++    /// Default options.
++    Default = 0,
++}
++
++impl Default for EventOpts {
++    fn default() -> Self {
++        EventOpts::Default
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..74aab1d96e78d7a5cf89c8199fbcfb66d78d4fa5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,88 @@@
++// Copyright 2016 The Fuchsia Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++//! Type-safe bindings for Magenta event pairs.
++
++use {Cookied, HandleBase, Handle, HandleRef, Peered, Status};
++use {sys, into_result};
++
++/// An object representing a Magenta
++/// [event pair](https://fuchsia.googlesource.com/magenta/+/master/docs/concepts.md#Other-IPC_Events_Event-Pairs_and-User-Signals).
++///
++/// As essentially a subtype of `Handle`, it can be freely interconverted.
++#[derive(Debug, Eq, PartialEq)]
++pub struct EventPair(Handle);
++
++impl HandleBase for EventPair {
++    fn get_ref(&self) -> HandleRef {
++        self.0.get_ref()
++    }
++
++    fn from_handle(handle: Handle) -> Self {
++        EventPair(handle)
++    }
++}
++
++impl Peered for EventPair {
++}
++
++impl Cookied for EventPair {
++}
++
++impl EventPair {
++    /// Create an event pair, a pair of objects which can signal each other. Wraps the
++    /// [mx_eventpair_create](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/eventpair_create.md)
++    /// syscall.
++    pub fn create(options: EventPairOpts) -> Result<(EventPair, EventPair), Status> {
++        let mut out0 = 0;
++        let mut out1 = 0;
++        let status = unsafe { sys::mx_eventpair_create(options as u32, &mut out0, &mut out1) };
++        into_result(status, ||
++            (Self::from_handle(Handle(out0)),
++                Self::from_handle(Handle(out1))))
++    }
++}
++
++/// Options for creating an event pair.
++#[repr(u32)]
++#[derive(Debug, Copy, Clone, Eq, PartialEq)]
++pub enum EventPairOpts {
++    /// Default options.
++    Default = 0,
++}
++
++impl Default for EventPairOpts {
++    fn default() -> Self {
++        EventPairOpts::Default
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use super::*;
++    use {Duration, MX_SIGNAL_LAST_HANDLE, MX_SIGNAL_NONE, MX_USER_SIGNAL_0};
++    use deadline_after;
++
++    #[test]
++    fn wait_and_signal_peer() {
++        let (p1, p2) = EventPair::create(EventPairOpts::Default).unwrap();
++        let ten_ms: Duration = 10_000_000;
++
++        // Waiting on one without setting any signal should time out.
++        assert_eq!(p2.wait(MX_USER_SIGNAL_0, deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++
++        // If we set a signal, we should be able to wait for it.
++        assert!(p1.signal_peer(MX_SIGNAL_NONE, MX_USER_SIGNAL_0).is_ok());
++        assert_eq!(p2.wait(MX_USER_SIGNAL_0, deadline_after(ten_ms)).unwrap(),
++            MX_USER_SIGNAL_0 | MX_SIGNAL_LAST_HANDLE);
++
++        // Should still work, signals aren't automatically cleared.
++        assert_eq!(p2.wait(MX_USER_SIGNAL_0, deadline_after(ten_ms)).unwrap(),
++            MX_USER_SIGNAL_0 | MX_SIGNAL_LAST_HANDLE);
++
++        // Now clear it, and waiting should time out again.
++        assert!(p1.signal_peer(MX_USER_SIGNAL_0, MX_SIGNAL_NONE).is_ok());
++        assert_eq!(p2.wait(MX_USER_SIGNAL_0, deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a7c7d858b3484cc0193de58f758c5b5972bc523e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,116 @@@
++// Copyright 2017 The Fuchsia Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++//! Type-safe bindings for Magenta fifo objects.
++
++use {HandleBase, Handle, HandleRef, Status};
++use {sys, into_result};
++
++/// An object representing a Magenta fifo.
++///
++/// As essentially a subtype of `Handle`, it can be freely interconverted.
++#[derive(Debug, Eq, PartialEq)]
++pub struct Fifo(Handle);
++
++impl HandleBase for Fifo {
++    fn get_ref(&self) -> HandleRef {
++        self.0.get_ref()
++    }
++
++    fn from_handle(handle: Handle) -> Self {
++        Fifo(handle)
++    }
++}
++
++impl Fifo {
++    /// Create a pair of fifos and return their endpoints. Writing to one endpoint enqueues an
++    /// element into the fifo from which the opposing endpoint reads. Wraps the
++    /// [mx_fifo_create](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/fifo_create.md)
++    /// syscall.
++    pub fn create(elem_count: u32, elem_size: u32, options: FifoOpts)
++        -> Result<(Fifo, Fifo), Status>
++    {
++        let mut out0 = 0;
++        let mut out1 = 0;
++        let status = unsafe {
++            sys::mx_fifo_create(elem_count, elem_size, options as u32, &mut out0, &mut out1)
++        };
++        into_result(status, || (Self::from_handle(Handle(out0)), Self::from_handle(Handle(out1))))
++    }
++
++    /// Attempts to write some number of elements into the fifo. The number of bytes written will be
++    /// rounded down to a multiple of the fifo's element size.
++    /// Return value (on success) is number of elements actually written.
++    ///
++    /// Wraps
++    /// [mx_fifo_write](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/fifo_write.md).
++    pub fn write(&self, bytes: &[u8]) -> Result<u32, Status> {
++        let mut num_entries_written = 0;
++        let status = unsafe {
++            sys::mx_fifo_write(self.raw_handle(), bytes.as_ptr(), bytes.len(),
++                &mut num_entries_written)
++        };
++        into_result(status, || num_entries_written)
++    }
++
++    /// Attempts to read some number of elements out of the fifo. The number of bytes read will
++    /// always be a multiple of the fifo's element size.
++    /// Return value (on success) is number of elements actually read.
++    ///
++    /// Wraps
++    /// [mx_fifo_read](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/fifo_read.md).
++    pub fn read(&self, bytes: &mut [u8]) -> Result<u32, Status> {
++        let mut num_entries_read = 0;
++        let status = unsafe {
++            sys::mx_fifo_read(self.raw_handle(), bytes.as_mut_ptr(), bytes.len(),
++                &mut num_entries_read)
++        };
++        into_result(status, || num_entries_read)
++    }
++}
++
++/// Options for creating a fifo pair.
++#[repr(u32)]
++#[derive(Debug, Copy, Clone, Eq, PartialEq)]
++pub enum FifoOpts {
++    /// Default options.
++    Default = 0,
++}
++
++impl Default for FifoOpts {
++    fn default() -> Self {
++        FifoOpts::Default
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use super::*;
++
++    #[test]
++    fn fifo_basic() {
++        let (fifo1, fifo2) = Fifo::create(4, 2, FifoOpts::Default).unwrap();
++
++        // Trying to write less than one element should fail.
++        assert_eq!(fifo1.write(b""), Err(Status::ErrOutOfRange));
++        assert_eq!(fifo1.write(b"h"), Err(Status::ErrOutOfRange));
++
++        // Should write one element "he" and ignore the last half-element as it rounds down.
++        assert_eq!(fifo1.write(b"hex").unwrap(), 1);
++
++        // Should write three elements "ll" "o " "wo" and drop the rest as it is full.
++        assert_eq!(fifo1.write(b"llo worlds").unwrap(), 3);
++
++        // Now that the fifo is full any further attempts to write should fail.
++        assert_eq!(fifo1.write(b"blah blah"), Err(Status::ErrShouldWait));
++
++        // Read all 4 entries from the other end.
++        let mut read_vec = vec![0; 8];
++        assert_eq!(fifo2.read(&mut read_vec).unwrap(), 4);
++        assert_eq!(read_vec, b"hello wo");
++
++        // Reading again should fail as the fifo is empty.
++        assert_eq!(fifo2.read(&mut read_vec), Err(Status::ErrShouldWait));
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a06dd7cfe86c007224f82f109d29913ef9d8fb4b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,23 @@@
++// Copyright 2017 The Fuchsia Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++//! Type-safe bindings for Magenta job.
++
++use {HandleBase, Handle, HandleRef};
++
++/// An object representing a Magenta job.
++///
++/// As essentially a subtype of `Handle`, it can be freely interconverted.
++#[derive(Debug, Eq, PartialEq)]
++pub struct Job(Handle);
++
++impl HandleBase for Job {
++    fn get_ref(&self) -> HandleRef {
++        self.0.get_ref()
++    }
++
++    fn from_handle(handle: Handle) -> Self {
++        Job(handle)
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e5a2bb4718c2bf1f84ec5bafcda193267013661e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,758 @@@
++// Copyright 2016 The Fuchsia Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++//! Type-safe bindings for Magenta kernel
++//! [syscalls](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls.md).
++
++extern crate core;
++extern crate magenta_sys;
++extern crate conv;
++
++use std::marker::PhantomData;
++
++use conv::{ValueInto, ValueFrom, UnwrapOrSaturate};
++
++mod channel;
++mod event;
++mod eventpair;
++mod fifo;
++mod job;
++mod port;
++mod process;
++mod socket;
++mod timer;
++mod thread;
++mod vmo;
++
++pub use channel::{Channel, ChannelOpts, MessageBuf};
++pub use event::{Event, EventOpts};
++pub use eventpair::{EventPair, EventPairOpts};
++pub use fifo::{Fifo, FifoOpts};
++pub use job::Job;
++pub use port::{Packet, PacketContents, Port, PortOpts, SignalPacket, UserPacket, WaitAsyncOpts};
++pub use process::Process;
++pub use socket::{Socket, SocketOpts, SocketReadOpts, SocketWriteOpts};
++pub use timer::{Timer, TimerOpts};
++pub use thread::Thread;
++pub use vmo::{Vmo, VmoCloneOpts, VmoOp, VmoOpts};
++
++use magenta_sys as sys;
++
++type Duration = sys::mx_duration_t;
++type Time = sys::mx_time_t;
++pub use magenta_sys::MX_TIME_INFINITE;
++
++// A placeholder value used for handles that have been taken from the message buf.
++// We rely on the kernel never to produce any actual handles with this value.
++const INVALID_HANDLE: sys::mx_handle_t = 0;
++
++/// A status code returned from the Magenta kernel.
++///
++/// See
++/// [errors.md](https://fuchsia.googlesource.com/magenta/+/master/docs/errors.md)
++/// in the Magenta documentation for more information about the meaning of these
++/// codes.
++#[derive(Debug, PartialEq, Eq, Clone, Copy)]
++#[repr(i32)]
++// Auto-generated using tools/gen_status.py
++pub enum Status {
++    NoError = 0,
++    ErrInternal = -1,
++    ErrNotSupported = -2,
++    ErrNoResources = -3,
++    ErrNoMemory = -4,
++    ErrCallFailed = -5,
++    ErrInterruptedRetry = -6,
++    ErrInvalidArgs = -10,
++    ErrBadHandle = -11,
++    ErrWrongType = -12,
++    ErrBadSyscall = -13,
++    ErrOutOfRange = -14,
++    ErrBufferTooSmall = -15,
++    ErrBadState = -20,
++    ErrTimedOut = -21,
++    ErrShouldWait = -22,
++    ErrCanceled = -23,
++    ErrPeerClosed = -24,
++    ErrNotFound = -25,
++    ErrAlreadyExists = -26,
++    ErrAlreadyBound = -27,
++    ErrUnavailable = -28,
++    ErrAccessDenied = -30,
++    ErrIo = -40,
++    ErrIoRefused = -41,
++    ErrIoDataIntegrity = -42,
++    ErrIoDataLoss = -43,
++    ErrBadPath = -50,
++    ErrNotDir = -51,
++    ErrNotFile = -52,
++    ErrFileBig = -53,
++    ErrNoSpace = -54,
++    ErrStop = -60,
++    ErrNext = -61,
++
++    /// Any mx_status_t not in the set above will map to the following:
++    UnknownOther = -32768,
++}
++
++impl Status {
++    pub fn from_raw(raw: sys::mx_status_t) -> Self {
++        match raw {
++            // Auto-generated using tools/gen_status.py
++            sys::MX_OK => Status::NoError,
++            sys::MX_ERR_INTERNAL => Status::ErrInternal,
++            sys::MX_ERR_NOT_SUPPORTED => Status::ErrNotSupported,
++            sys::MX_ERR_NO_RESOURCES => Status::ErrNoResources,
++            sys::MX_ERR_NO_MEMORY => Status::ErrNoMemory,
++            sys::MX_ERR_CALL_FAILED => Status::ErrCallFailed,
++            sys::MX_ERR_INTERRUPTED_RETRY => Status::ErrInterruptedRetry,
++            sys::MX_ERR_INVALID_ARGS => Status::ErrInvalidArgs,
++            sys::MX_ERR_BAD_HANDLE => Status::ErrBadHandle,
++            sys::MX_ERR_WRONG_TYPE => Status::ErrWrongType,
++            sys::MX_ERR_BAD_SYSCALL => Status::ErrBadSyscall,
++            sys::MX_ERR_OUT_OF_RANGE => Status::ErrOutOfRange,
++            sys::MX_ERR_BUFFER_TOO_SMALL => Status::ErrBufferTooSmall,
++            sys::MX_ERR_BAD_STATE => Status::ErrBadState,
++            sys::MX_ERR_TIMED_OUT => Status::ErrTimedOut,
++            sys::MX_ERR_SHOULD_WAIT => Status::ErrShouldWait,
++            sys::MX_ERR_CANCELED => Status::ErrCanceled,
++            sys::MX_ERR_PEER_CLOSED => Status::ErrPeerClosed,
++            sys::MX_ERR_NOT_FOUND => Status::ErrNotFound,
++            sys::MX_ERR_ALREADY_EXISTS => Status::ErrAlreadyExists,
++            sys::MX_ERR_ALREADY_BOUND => Status::ErrAlreadyBound,
++            sys::MX_ERR_UNAVAILABLE => Status::ErrUnavailable,
++            sys::MX_ERR_ACCESS_DENIED => Status::ErrAccessDenied,
++            sys::MX_ERR_IO => Status::ErrIo,
++            sys::MX_ERR_IO_REFUSED => Status::ErrIoRefused,
++            sys::MX_ERR_IO_DATA_INTEGRITY => Status::ErrIoDataIntegrity,
++            sys::MX_ERR_IO_DATA_LOSS => Status::ErrIoDataLoss,
++            sys::MX_ERR_BAD_PATH => Status::ErrBadPath,
++            sys::MX_ERR_NOT_DIR => Status::ErrNotDir,
++            sys::MX_ERR_NOT_FILE => Status::ErrNotFile,
++            sys::MX_ERR_FILE_BIG => Status::ErrFileBig,
++            sys::MX_ERR_NO_SPACE => Status::ErrNoSpace,
++            sys::MX_ERR_STOP => Status::ErrStop,
++            sys::MX_ERR_NEXT => Status::ErrNext,
++            _ => Status::UnknownOther,
++        }
++    }
++
++    // Note: no to_raw, even though it's easy to implement, partly because
++    // handling of UnknownOther would be tricky.
++}
++
++/// Rights associated with a handle.
++///
++/// See [rights.md](https://fuchsia.googlesource.com/magenta/+/master/docs/rights.md)
++/// for more information.
++pub type Rights = sys::mx_rights_t;
++
++pub use magenta_sys::{
++    MX_RIGHT_NONE,
++    MX_RIGHT_DUPLICATE,
++    MX_RIGHT_TRANSFER,
++    MX_RIGHT_READ,
++    MX_RIGHT_WRITE,
++    MX_RIGHT_EXECUTE,
++    MX_RIGHT_MAP,
++    MX_RIGHT_GET_PROPERTY,
++    MX_RIGHT_SET_PROPERTY,
++    MX_RIGHT_DEBUG,
++    MX_RIGHT_SAME_RIGHTS,
++};
++
++/// Signals that can be waited upon.
++///
++/// See
++/// [Objects and signals](https://fuchsia.googlesource.com/magenta/+/master/docs/concepts.md#Objects-and-Signals)
++/// in the Magenta kernel documentation. Note: the names of signals are still in flux.
++pub type Signals = sys::mx_signals_t;
++
++pub use magenta_sys::{
++        MX_SIGNAL_NONE,
++
++        MX_SIGNAL_HANDLE_CLOSED,
++        MX_SIGNAL_LAST_HANDLE,
++
++        MX_USER_SIGNAL_0,
++        MX_USER_SIGNAL_1,
++        MX_USER_SIGNAL_2,
++        MX_USER_SIGNAL_3,
++        MX_USER_SIGNAL_4,
++        MX_USER_SIGNAL_5,
++        MX_USER_SIGNAL_6,
++        MX_USER_SIGNAL_7,
++
++        // Event
++        MX_EVENT_SIGNALED,
++
++        // EventPair
++        MX_EPAIR_SIGNALED,
++        MX_EPAIR_CLOSED,
++
++        // Task signals (process, thread, job)
++        MX_TASK_TERMINATED,
++
++        // Channel
++        MX_CHANNEL_READABLE,
++        MX_CHANNEL_WRITABLE,
++        MX_CHANNEL_PEER_CLOSED,
++
++        // Socket
++        MX_SOCKET_READABLE,
++        MX_SOCKET_WRITABLE,
++        MX_SOCKET_PEER_CLOSED,
++
++        // Timer
++        MX_TIMER_SIGNALED,
++};
++
++/// A "wait item" containing a handle reference and information about what signals
++/// to wait on, and, on return from `object_wait_many`, which are pending.
++#[repr(C)]
++#[derive(Debug)]
++pub struct WaitItem<'a> {
++    /// The handle to wait on.
++    pub handle: HandleRef<'a>,
++    /// A set of signals to wait for.
++    pub waitfor: Signals,
++    /// The set of signals pending, on return of `object_wait_many`.
++    pub pending: Signals,
++}
++
++
++/// An identifier to select a particular clock. See
++/// [mx_time_get](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/time_get.md)
++/// for more information about the possible values.
++#[repr(u32)]
++#[derive(Debug, Copy, Clone, Eq, PartialEq)]
++pub enum ClockId {
++    /// The number of nanoseconds since the system was powered on. Corresponds to
++    /// `MX_CLOCK_MONOTONIC`.
++    Monotonic = 0,
++    /// The number of wall clock nanoseconds since the Unix epoch (midnight on January 1 1970) in
++    /// UTC. Corresponds to MX_CLOCK_UTC.
++    UTC = 1,
++    /// The number of nanoseconds the current thread has been running for. Corresponds to
++    /// MX_CLOCK_THREAD.
++    Thread = 2,
++}
++
++/// Get the current time, from the specific clock id.
++///
++/// Wraps the
++/// [mx_time_get](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/time_get.md)
++/// syscall.
++pub fn time_get(clock_id: ClockId) -> Time {
++    unsafe { sys::mx_time_get(clock_id as u32) }
++}
++
++/// Read the number of high-precision timer ticks since boot. These ticks may be processor cycles,
++/// high speed timer, profiling timer, etc. They are not guaranteed to continue advancing when the
++/// system is asleep.
++///
++/// Wraps the
++/// [mx_ticks_get](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/ticks_get.md)
++/// syscall.
++pub fn ticks_get() -> u64 {
++    unsafe { sys::mx_ticks_get() }
++}
++
++/// Compute a deadline for the time in the future that is the given `Duration` away.
++///
++/// Wraps the
++/// [mx_deadline_after](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/deadline_after.md)
++/// syscall.
++pub fn deadline_after(nanos: Duration) -> Time {
++    unsafe { sys::mx_deadline_after(nanos) }
++}
++
++/// Sleep until the given deadline.
++///
++/// Wraps the
++/// [mx_nanosleep](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/nanosleep.md)
++/// syscall.
++pub fn nanosleep(deadline: Time) {
++    unsafe { sys::mx_nanosleep(deadline); }
++}
++
++/// Return the number of high-precision timer ticks in a second.
++///
++/// Wraps the
++/// [mx_ticks_per_second](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/ticks_per_second.md)
++/// syscall.
++pub fn ticks_per_second() -> u64 {
++    unsafe { sys::mx_ticks_per_second() }
++}
++
++pub use magenta_sys::{
++    MX_CPRNG_DRAW_MAX_LEN,
++    MX_CPRNG_ADD_ENTROPY_MAX_LEN,
++};
++
++/// Draw random bytes from the kernel's CPRNG to fill the given buffer. Returns the actual number of
++/// bytes drawn, which may sometimes be less than the size of the buffer provided.
++///
++/// The buffer must have length less than `MX_CPRNG_DRAW_MAX_LEN`.
++///
++/// Wraps the
++/// [mx_cprng_draw](https://fuchsia.googlesource.com/magenta/+/HEAD/docs/syscalls/cprng_draw.md)
++/// syscall.
++pub fn cprng_draw(buffer: &mut [u8]) -> Result<usize, Status> {
++    let mut actual = 0;
++    let status = unsafe { sys::mx_cprng_draw(buffer.as_mut_ptr(), buffer.len(), &mut actual) };
++    into_result(status, || actual)
++}
++
++/// Mix the given entropy into the kernel CPRNG.
++///
++/// The buffer must have length less than `MX_CPRNG_ADD_ENTROPY_MAX_LEN`.
++///
++/// Wraps the
++/// [mx_cprng_add_entropy](https://fuchsia.googlesource.com/magenta/+/HEAD/docs/syscalls/cprng_add_entropy.md)
++/// syscall.
++pub fn cprng_add_entropy(buffer: &[u8]) -> Result<(), Status> {
++    let status = unsafe { sys::mx_cprng_add_entropy(buffer.as_ptr(), buffer.len()) };
++    into_result(status, || ())
++}
++
++fn into_result<T, F>(status: sys::mx_status_t, f: F) -> Result<T, Status>
++    where F: FnOnce() -> T {
++    // All non-negative values are assumed successful. Note: calls that don't try
++    // to multiplex success values into status return could be more strict here.
++    if status >= 0 {
++        Ok(f())
++    } else {
++        Err(Status::from_raw(status))
++    }
++}
++
++// Handles
++
++/// A borrowed reference to a `Handle`.
++///
++/// Mostly useful as part of a `WaitItem`.
++#[derive(Debug)]
++pub struct HandleRef<'a> {
++    handle: sys::mx_handle_t,
++    phantom: PhantomData<&'a sys::mx_handle_t>,
++}
++
++impl<'a> HandleRef<'a> {
++    fn duplicate(&self, rights: Rights) -> Result<Handle, Status> {
++        let handle = self.handle;
++        let mut out = 0;
++        let status = unsafe { sys::mx_handle_duplicate(handle, rights, &mut out) };
++        into_result(status, || Handle(out))
++    }
++
++    fn replace(self, rights: Rights) -> Result<Handle, Status> {
++        let handle = self.handle;
++        let mut out = 0;
++        let status = unsafe { sys::mx_handle_replace(handle, rights, &mut out) };
++        into_result(status, || Handle(out))
++    }
++
++    fn signal(&self, clear_mask: Signals, set_mask: Signals) -> Result<(), Status> {
++        let handle = self.handle;
++        let status = unsafe { sys::mx_object_signal(handle, clear_mask.bits(), set_mask.bits()) };
++        into_result(status, || ())
++    }
++
++    fn wait(&self, signals: Signals, deadline: Time) -> Result<Signals, Status> {
++        let handle = self.handle;
++        let mut pending = sys::mx_signals_t::empty();
++        let status = unsafe {
++            sys::mx_object_wait_one(handle, signals, deadline, &mut pending)
++        };
++        into_result(status, || pending)
++    }
++
++    fn wait_async(&self, port: &Port, key: u64, signals: Signals, options: WaitAsyncOpts)
++        -> Result<(), Status>
++    {
++        let handle = self.handle;
++        let status = unsafe {
++            sys::mx_object_wait_async(handle, port.raw_handle(), key, signals, options as u32)
++        };
++        into_result(status, || ())
++    }
++}
++
++/// A trait implemented by all handle objects.
++///
++/// Note: it is reasonable for user-defined objects wrapping a handle to implement
++/// this trait. For example, a specific interface in some protocol might be
++/// represented as a newtype of `Channel`, and implement the `get_ref` and
++/// `from_handle` methods to facilitate conversion from and to the interface.
++pub trait HandleBase: Sized {
++    /// Get a reference to the handle. One important use of such a reference is
++    /// for `object_wait_many`.
++    fn get_ref(&self) -> HandleRef;
++
++    /// Interpret the reference as a raw handle (an integer type). Two distinct
++    /// handles will have different raw values (so it can perhaps be used as a
++    /// key in a data structure).
++    fn raw_handle(&self) -> sys::mx_handle_t {
++        self.get_ref().handle
++    }
++
++    /// Duplicate a handle, possibly reducing the rights available. Wraps the
++    /// [mx_handle_duplicate](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/handle_duplicate.md)
++    /// syscall.
++    fn duplicate(&self, rights: Rights) -> Result<Self, Status> {
++        self.get_ref().duplicate(rights).map(|handle|
++            Self::from_handle(handle))
++    }
++
++    /// Create a replacement for a handle, possibly reducing the rights available. This invalidates
++    /// the original handle. Wraps the
++    /// [mx_handle_replace](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/handle_replace.md)
++    /// syscall.
++    fn replace(self, rights: Rights) -> Result<Self, Status> {
++        self.get_ref().replace(rights).map(|handle| Self::from_handle(handle))
++    }
++
++    /// Set and clear userspace-accessible signal bits on an object. Wraps the
++    /// [mx_object_signal](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/object_signal.md)
++    /// syscall.
++    fn signal(&self, clear_mask: Signals, set_mask: Signals) -> Result<(), Status> {
++        self.get_ref().signal(clear_mask, set_mask)
++    }
++
++    /// Waits on a handle. Wraps the
++    /// [mx_object_wait_one](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/object_wait_one.md)
++    /// syscall.
++    fn wait(&self, signals: Signals, deadline: Time) -> Result<Signals, Status> {
++        self.get_ref().wait(signals, deadline)
++    }
++
++    /// Causes packet delivery on the given port when the object changes state and matches signals.
++    /// [mx_object_wait_async](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/object_wait_async.md)
++    /// syscall.
++    fn wait_async(&self, port: &Port, key: u64, signals: Signals, options: WaitAsyncOpts)
++        -> Result<(), Status>
++    {
++        self.get_ref().wait_async(port, key, signals, options)
++    }
++
++    /// A method for converting an untyped `Handle` into a more specific reference.
++    fn from_handle(handle: Handle) -> Self;
++
++    /// A method for converting the object into a generic Handle.
++    // Not implemented as "From" because it would conflict in From<Handle> case
++    fn into_handle(self) -> Handle {
++        let raw_handle = self.get_ref().handle;
++        std::mem::forget(self);
++        Handle(raw_handle)
++    }
++}
++
++/// A trait implemented by all handles for objects which have a peer.
++pub trait Peered: HandleBase {
++    /// Set and clear userspace-accessible signal bits on the object's peer. Wraps the
++    /// [mx_object_signal_peer](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/object_signal.md)
++    /// syscall.
++    fn signal_peer(&self, clear_mask: Signals, set_mask: Signals) -> Result<(), Status> {
++        let handle = self.get_ref().handle;
++        let status = unsafe {
++            sys::mx_object_signal_peer(handle, clear_mask.bits(), set_mask.bits())
++        };
++        into_result(status, || ())
++    }
++}
++
++/// A trait implemented by all handles for objects which can have a cookie attached.
++pub trait Cookied: HandleBase {
++    /// Get the cookie attached to this object, if any. Wraps the
++    /// [mx_object_get_cookie](https://fuchsia.googlesource.com/magenta/+/HEAD/docs/syscalls/object_get_cookie.md)
++    /// syscall.
++    fn get_cookie(&self, scope: &HandleRef) -> Result<u64, Status> {
++        let handle = self.get_ref().handle;
++        let mut cookie = 0;
++        let status = unsafe { sys::mx_object_get_cookie(handle, scope.handle, &mut cookie) };
++        into_result(status, || cookie)
++    }
++
++    /// Attach an opaque cookie to this object with the given scope. The cookie may be read or
++    /// changed in future only with the same scope. Wraps the
++    /// [mx_object_set_cookie](https://fuchsia.googlesource.com/magenta/+/HEAD/docs/syscalls/object_set_cookie.md)
++    /// syscall.
++    fn set_cookie(&self, scope: &HandleRef, cookie: u64) -> Result<(), Status> {
++        let handle = self.get_ref().handle;
++        let status = unsafe { sys::mx_object_set_cookie(handle, scope.handle, cookie) };
++        into_result(status, || ())
++    }
++}
++
++fn handle_drop(handle: sys::mx_handle_t) {
++    let _ = unsafe { sys::mx_handle_close(handle) };
++}
++
++/// Wait on multiple handles.
++/// The success return value is a bool indicating whether one or more of the
++/// provided handle references was closed during the wait.
++///
++/// Wraps the
++/// [mx_object_wait_many](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/object_wait_many.md)
++/// syscall.
++pub fn object_wait_many(items: &mut [WaitItem], deadline: Time) -> Result<bool, Status>
++{
++    let len = try!(items.len().value_into().map_err(|_| Status::ErrOutOfRange));
++    let items_ptr = items.as_mut_ptr() as *mut sys::mx_wait_item_t;
++    let status = unsafe { sys::mx_object_wait_many( items_ptr, len, deadline) };
++    if status == sys::MX_ERR_CANCELED {
++        return Ok((true))
++    }
++    into_result(status, || false)
++}
++
++// An untyped handle
++
++/// An object representing a Magenta
++/// [handle](https://fuchsia.googlesource.com/magenta/+/master/docs/handles.md).
++///
++/// Internally, it is represented as a 32-bit integer, but this wrapper enforces
++/// strict ownership semantics. The `Drop` implementation closes the handle.
++///
++/// This type represents the most general reference to a kernel object, and can
++/// be interconverted to and from more specific types. Those conversions are not
++/// enforced in the type system; attempting to use them will result in errors
++/// returned by the kernel. These conversions don't change the underlying
++/// representation, but do change the type and thus what operations are available.
++#[derive(Debug, Eq, PartialEq)]
++pub struct Handle(sys::mx_handle_t);
++
++impl HandleBase for Handle {
++    fn get_ref(&self) -> HandleRef {
++        HandleRef { handle: self.0, phantom: Default::default() }
++    }
++
++    fn from_handle(handle: Handle) -> Self {
++        handle
++    }
++}
++
++impl Drop for Handle {
++    fn drop(&mut self) {
++        handle_drop(self.0)
++    }
++}
++
++impl Handle {
++    /// If a raw handle is obtained from some other source, this method converts
++    /// it into a type-safe owned handle.
++    pub unsafe fn from_raw(raw: sys::mx_handle_t) -> Handle {
++        Handle(raw)
++    }
++}
++
++fn size_to_u32_sat(size: usize) -> u32 {
++    u32::value_from(size).unwrap_or_saturate()
++}
++
++#[cfg(test)]
++mod tests {
++    use super::*;
++
++    #[test]
++    fn monotonic_time_increases() {
++        let time1 = time_get(ClockId::Monotonic);
++        nanosleep(deadline_after(1_000));
++        let time2 = time_get(ClockId::Monotonic);
++        assert!(time2 > time1);
++    }
++
++    #[test]
++    fn utc_time_increases() {
++        let time1 = time_get(ClockId::UTC);
++        nanosleep(deadline_after(1_000));
++        let time2 = time_get(ClockId::UTC);
++        assert!(time2 > time1);
++    }
++
++    #[test]
++    fn thread_time_increases() {
++        let time1 = time_get(ClockId::Thread);
++        nanosleep(deadline_after(1_000));
++        let time2 = time_get(ClockId::Thread);
++        assert!(time2 > time1);
++    }
++
++    #[test]
++    fn ticks_increases() {
++        let ticks1 = ticks_get();
++        nanosleep(deadline_after(1_000));
++        let ticks2 = ticks_get();
++        assert!(ticks2 > ticks1);
++    }
++
++    #[test]
++    fn tick_length() {
++        let sleep_ns = 1_000_000;  // 1ms
++        let one_second_ns = 1_000_000_000; // 1 second in ns
++        let ticks1 = ticks_get();
++        nanosleep(deadline_after(sleep_ns));
++        let ticks2 = ticks_get();
++        // The number of ticks should have increased by at least 1 ms worth
++        assert!(ticks2 > ticks1 + sleep_ns * ticks_per_second() / one_second_ns);
++        // And not more than 4 ms worth
++        assert!(ticks2 < ticks1 + 4 * sleep_ns * ticks_per_second() / one_second_ns);
++    }
++
++    #[test]
++    fn sleep() {
++        let sleep_ns = 1_000_000;  // 1ms
++        let time1 = time_get(ClockId::Monotonic);
++        nanosleep(deadline_after(sleep_ns));
++        let time2 = time_get(ClockId::Monotonic);
++        assert!(time2 > time1 + sleep_ns);
++    }
++
++    /// Test duplication by means of a VMO
++    #[test]
++    fn duplicate() {
++        let hello_length: usize = 5;
++
++        // Create a VMO and write some data to it.
++        let vmo = Vmo::create(hello_length as u64, VmoOpts::Default).unwrap();
++        assert!(vmo.write(b"hello", 0).is_ok());
++
++        // Replace, reducing rights to read.
++        let readonly_vmo = vmo.duplicate(MX_RIGHT_READ).unwrap();
++        // Make sure we can read but not write.
++        let mut read_vec = vec![0; hello_length];
++        assert_eq!(readonly_vmo.read(&mut read_vec, 0).unwrap(), hello_length);
++        assert_eq!(read_vec, b"hello");
++        assert_eq!(readonly_vmo.write(b"", 0), Err(Status::ErrAccessDenied));
++
++        // Write new data to the original handle, and read it from the new handle
++        assert!(vmo.write(b"bye", 0).is_ok());
++        assert_eq!(readonly_vmo.read(&mut read_vec, 0).unwrap(), hello_length);
++        assert_eq!(read_vec, b"byelo");
++    }
++
++    // Test replace by means of a VMO
++    #[test]
++    fn replace() {
++        let hello_length: usize = 5;
++
++        // Create a VMO and write some data to it.
++        let vmo = Vmo::create(hello_length as u64, VmoOpts::Default).unwrap();
++        assert!(vmo.write(b"hello", 0).is_ok());
++
++        // Replace, reducing rights to read.
++        let readonly_vmo = vmo.replace(MX_RIGHT_READ).unwrap();
++        // Make sure we can read but not write.
++        let mut read_vec = vec![0; hello_length];
++        assert_eq!(readonly_vmo.read(&mut read_vec, 0).unwrap(), hello_length);
++        assert_eq!(read_vec, b"hello");
++        assert_eq!(readonly_vmo.write(b"", 0), Err(Status::ErrAccessDenied));
++    }
++
++    #[test]
++    fn wait_and_signal() {
++        let event = Event::create(EventOpts::Default).unwrap();
++        let ten_ms: Duration = 10_000_000;
++
++        // Waiting on it without setting any signal should time out.
++        assert_eq!(event.wait(MX_USER_SIGNAL_0, deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++
++        // If we set a signal, we should be able to wait for it.
++        assert!(event.signal(MX_SIGNAL_NONE, MX_USER_SIGNAL_0).is_ok());
++        assert_eq!(event.wait(MX_USER_SIGNAL_0, deadline_after(ten_ms)).unwrap(),
++            MX_USER_SIGNAL_0 | MX_SIGNAL_LAST_HANDLE);
++
++        // Should still work, signals aren't automatically cleared.
++        assert_eq!(event.wait(MX_USER_SIGNAL_0, deadline_after(ten_ms)).unwrap(),
++            MX_USER_SIGNAL_0 | MX_SIGNAL_LAST_HANDLE);
++
++        // Now clear it, and waiting should time out again.
++        assert!(event.signal(MX_USER_SIGNAL_0, MX_SIGNAL_NONE).is_ok());
++        assert_eq!(event.wait(MX_USER_SIGNAL_0, deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++    }
++
++    #[test]
++    fn wait_many_and_signal() {
++        let ten_ms: Duration = 10_000_000;
++        let e1 = Event::create(EventOpts::Default).unwrap();
++        let e2 = Event::create(EventOpts::Default).unwrap();
++
++        // Waiting on them now should time out.
++        let mut items = vec![
++          WaitItem { handle: e1.get_ref(), waitfor: MX_USER_SIGNAL_0, pending: MX_SIGNAL_NONE },
++          WaitItem { handle: e2.get_ref(), waitfor: MX_USER_SIGNAL_1, pending: MX_SIGNAL_NONE },
++        ];
++        assert_eq!(object_wait_many(&mut items, deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++        assert_eq!(items[0].pending, MX_SIGNAL_LAST_HANDLE);
++        assert_eq!(items[1].pending, MX_SIGNAL_LAST_HANDLE);
++
++        // Signal one object and it should return success.
++        assert!(e1.signal(MX_SIGNAL_NONE, MX_USER_SIGNAL_0).is_ok());
++        assert!(object_wait_many(&mut items, deadline_after(ten_ms)).is_ok());
++        assert_eq!(items[0].pending, MX_USER_SIGNAL_0 | MX_SIGNAL_LAST_HANDLE);
++        assert_eq!(items[1].pending, MX_SIGNAL_LAST_HANDLE);
++
++        // Signal the other and it should return both.
++        assert!(e2.signal(MX_SIGNAL_NONE, MX_USER_SIGNAL_1).is_ok());
++        assert!(object_wait_many(&mut items, deadline_after(ten_ms)).is_ok());
++        assert_eq!(items[0].pending, MX_USER_SIGNAL_0 | MX_SIGNAL_LAST_HANDLE);
++        assert_eq!(items[1].pending, MX_USER_SIGNAL_1 | MX_SIGNAL_LAST_HANDLE);
++
++        // Clear signals on both; now it should time out again.
++        assert!(e1.signal(MX_USER_SIGNAL_0, MX_SIGNAL_NONE).is_ok());
++        assert!(e2.signal(MX_USER_SIGNAL_1, MX_SIGNAL_NONE).is_ok());
++        assert_eq!(object_wait_many(&mut items, deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++        assert_eq!(items[0].pending, MX_SIGNAL_LAST_HANDLE);
++        assert_eq!(items[1].pending, MX_SIGNAL_LAST_HANDLE);
++    }
++
++    #[test]
++    fn cookies() {
++        let event = Event::create(EventOpts::Default).unwrap();
++        let scope = Event::create(EventOpts::Default).unwrap();
++
++        // Getting a cookie when none has been set should fail.
++        assert_eq!(event.get_cookie(&scope.get_ref()), Err(Status::ErrAccessDenied));
++
++        // Set a cookie.
++        assert_eq!(event.set_cookie(&scope.get_ref(), 42), Ok(()));
++
++        // Should get it back....
++        assert_eq!(event.get_cookie(&scope.get_ref()), Ok(42));
++
++        // but not with the wrong scope!
++        assert_eq!(event.get_cookie(&event.get_ref()), Err(Status::ErrAccessDenied));
++
++        // Can change it, with the same scope...
++        assert_eq!(event.set_cookie(&scope.get_ref(), 123), Ok(()));
++
++        // but not with a different scope.
++        assert_eq!(event.set_cookie(&event.get_ref(), 123), Err(Status::ErrAccessDenied));
++    }
++
++    #[test]
++    fn cprng() {
++        let mut buffer = [0; 20];
++        assert_eq!(cprng_draw(&mut buffer), Ok(20));
++        assert_ne!(buffer[0], 0);
++        assert_ne!(buffer[19], 0);
++    }
++
++    #[test]
++    fn cprng_too_large() {
++        let mut buffer = [0; MX_CPRNG_DRAW_MAX_LEN + 1];
++        assert_eq!(cprng_draw(&mut buffer), Err(Status::ErrInvalidArgs));
++
++        for mut s in buffer.chunks_mut(MX_CPRNG_DRAW_MAX_LEN) {
++            assert_eq!(cprng_draw(&mut s), Ok(s.len()));
++        }
++    }
++
++    #[test]
++    fn cprng_add() {
++        let buffer = [0, 1, 2];
++        assert_eq!(cprng_add_entropy(&buffer), Ok(()));
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..69a2d0bbb4299dc59ca76f88d8c0514a9ca818f8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,362 @@@
++// Copyright 2017 The Fuchsia Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++//! Type-safe bindings for Magenta port objects.
++
++use std::mem;
++
++use {HandleBase, Handle, HandleRef, Signals, Status, Time};
++use {sys, into_result};
++
++/// An object representing a Magenta
++/// [port](https://fuchsia.googlesource.com/magenta/+/master/docs/objects/port.md).
++///
++/// As essentially a subtype of `Handle`, it can be freely interconverted.
++#[derive(Debug, Eq, PartialEq)]
++pub struct Port(Handle);
++
++impl HandleBase for Port {
++    fn get_ref(&self) -> HandleRef {
++        self.0.get_ref()
++    }
++
++    fn from_handle(handle: Handle) -> Self {
++        Port(handle)
++    }
++}
++
++/// A packet sent through a port. This is a type-safe wrapper for
++/// [mx_port_packet_t](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/port_wait2.md).
++#[derive(PartialEq, Eq, Debug)]
++pub struct Packet(sys::mx_port_packet_t);
++
++/// The contents of a `Packet`.
++#[derive(Debug, Copy, Clone)]
++pub enum PacketContents {
++    /// A user-generated packet.
++    User(UserPacket),
++    /// A one-shot signal packet generated via `object_wait_async`.
++    SignalOne(SignalPacket),
++    /// A repeating signal packet generated via `object_wait_async`.
++    SignalRep(SignalPacket),
++}
++
++/// Contents of a user packet (one sent by `port_queue`). This is a type-safe wrapper for
++/// [mx_packet_user_t](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/port_wait2.md).
++#[derive(Debug, Copy, Clone)]
++pub struct UserPacket(sys::mx_packet_user_t);
++
++/// Contents of a signal packet (one generated by the kernel). This is a type-safe wrapper for
++/// [mx_packet_signal_t](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/port_wait2.md).
++#[derive(Debug, Copy, Clone)]
++pub struct SignalPacket(sys::mx_packet_signal_t);
++
++impl Packet {
++    /// Creates a new packet with `UserPacket` data.
++    pub fn from_user_packet(key: u64, status: i32, user: UserPacket) -> Packet {
++        Packet(
++            sys::mx_port_packet_t {
++                key: key,
++                packet_type: sys::mx_packet_type_t::MX_PKT_TYPE_USER,
++                status: status,
++                union: user.0,
++            }
++        )
++    }
++
++    /// The packet's key.
++    pub fn key(&self) -> u64 {
++        self.0.key
++    }
++
++    /// The packet's status.
++    // TODO: should this type be wrapped?
++    pub fn status(&self) -> i32 {
++        self.0.status
++    }
++
++    /// The contents of the packet.
++    pub fn contents(&self) -> PacketContents {
++        if self.0.packet_type == sys::mx_packet_type_t::MX_PKT_TYPE_USER {
++            PacketContents::User(UserPacket(self.0.union))
++        } else if self.0.packet_type == sys::mx_packet_type_t::MX_PKT_TYPE_SIGNAL_ONE {
++            PacketContents::SignalOne(SignalPacket(unsafe { mem::transmute_copy(&self.0.union) }))
++        } else if self.0.packet_type == sys::mx_packet_type_t::MX_PKT_TYPE_SIGNAL_REP {
++            PacketContents::SignalRep(SignalPacket(unsafe { mem::transmute_copy(&self.0.union) }))
++        } else {
++            panic!("unexpected packet type");
++        }
++    }
++}
++
++impl UserPacket {
++    pub fn from_u8_array(val: [u8; 32]) -> UserPacket {
++        UserPacket(val)
++    }
++
++    pub fn as_u8_array(&self) -> &[u8; 32] {
++        &self.0
++    }
++
++    pub fn as_mut_u8_array(&mut self) -> &mut [u8; 32] {
++        &mut self.0
++    }
++}
++
++impl SignalPacket {
++    /// The signals used in the call to `object_wait_async`.
++    pub fn trigger(&self) -> Signals {
++        self.0.trigger
++    }
++
++    /// The observed signals.
++    pub fn observed(&self) -> Signals {
++        self.0.observed
++    }
++
++    /// A per object count of pending operations.
++    pub fn count(&self) -> u64 {
++        self.0.count
++    }
++}
++
++impl Port {
++    /// Create an IO port, allowing IO packets to be read and enqueued.
++    ///
++    /// Wraps the
++    /// [mx_port_create](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/port_create.md)
++    /// syscall.
++    pub fn create(opts: PortOpts) -> Result<Port, Status> {
++        unsafe {
++            let mut handle = 0;
++            let status = sys::mx_port_create(opts as u32, &mut handle);
++            into_result(status, || Self::from_handle(Handle(handle)))
++        }
++    }
++
++    /// Attempt to queue a user packet to the IO port.
++    ///
++    /// Wraps the
++    /// [mx_port_queue](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/port_queue.md)
++    /// syscall.
++    pub fn queue(&self, packet: &Packet) -> Result<(), Status> {
++        let status = unsafe {
++            sys::mx_port_queue(self.raw_handle(),
++                &packet.0 as *const sys::mx_port_packet_t as *const u8, 0)
++        };
++        into_result(status, || ())
++    }
++
++    /// Wait for a packet to arrive on a (V2) port.
++    ///
++    /// Wraps the
++    /// [mx_port_wait](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/port_wait2.md)
++    /// syscall.
++    pub fn wait(&self, deadline: Time) -> Result<Packet, Status> {
++        let mut packet = Default::default();
++        let status = unsafe {
++            sys::mx_port_wait(self.raw_handle(), deadline,
++                &mut packet as *mut sys::mx_port_packet_t as *mut u8, 0)
++        };
++        into_result(status, || Packet(packet))
++    }
++
++    /// Cancel pending wait_async calls for an object with the given key.
++    ///
++    /// Wraps the
++    /// [mx_port_cancel](https://fuchsia.googlesource.com/magenta/+/HEAD/docs/syscalls/port_cancel.md)
++    /// syscall.
++    pub fn cancel<H>(&self, source: &H, key: u64) -> Result<(), Status> where H: HandleBase {
++        let status = unsafe {
++            sys::mx_port_cancel(self.raw_handle(), source.raw_handle(), key)
++        };
++        into_result(status, || ())
++    }
++}
++
++/// Options for creating a port.
++#[repr(u32)]
++#[derive(Debug, Copy, Clone, Eq, PartialEq)]
++pub enum PortOpts {
++    /// Default options.
++    Default = 0,
++}
++
++impl Default for PortOpts {
++    fn default() -> Self {
++        PortOpts::Default
++    }
++}
++
++/// Options for wait_async.
++#[repr(u32)]
++#[derive(Debug, Copy, Clone, Eq, PartialEq)]
++pub enum WaitAsyncOpts {
++    Once = sys::MX_WAIT_ASYNC_ONCE,
++    Repeating = sys::MX_WAIT_ASYNC_REPEATING,
++}
++
++#[cfg(test)]
++mod tests {
++    use super::*;
++    use {Duration, Event, EventOpts};
++    use {MX_SIGNAL_LAST_HANDLE, MX_SIGNAL_NONE, MX_USER_SIGNAL_0, MX_USER_SIGNAL_1};
++    use deadline_after;
++
++    #[test]
++    fn port_basic() {
++        let ten_ms: Duration = 10_000_000;
++
++        let port = Port::create(PortOpts::Default).unwrap();
++
++        // Waiting now should time out.
++        assert_eq!(port.wait(deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++
++        // Send a valid packet.
++        let packet = Packet::from_user_packet(
++            42,
++            123,
++            UserPacket::from_u8_array([13; 32]),
++        );
++        assert!(port.queue(&packet).is_ok());
++
++        // Waiting should succeed this time. We should get back the packet we sent.
++        let read_packet = port.wait(deadline_after(ten_ms)).unwrap();
++        assert_eq!(read_packet, packet);
++    }
++
++    #[test]
++    fn wait_async_once() {
++        let ten_ms: Duration = 10_000_000;
++        let key = 42;
++
++        let port = Port::create(PortOpts::Default).unwrap();
++        let event = Event::create(EventOpts::Default).unwrap();
++
++        assert!(event.wait_async(&port, key, MX_USER_SIGNAL_0 | MX_USER_SIGNAL_1,
++            WaitAsyncOpts::Once).is_ok());
++
++        // Waiting without setting any signal should time out.
++        assert_eq!(port.wait(deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++
++        // If we set a signal, we should be able to wait for it.
++        assert!(event.signal(MX_SIGNAL_NONE, MX_USER_SIGNAL_0).is_ok());
++        let read_packet = port.wait(deadline_after(ten_ms)).unwrap();
++        assert_eq!(read_packet.key(), key);
++        assert_eq!(read_packet.status(), 0);
++        match read_packet.contents() {
++            PacketContents::SignalOne(sig) => {
++                assert_eq!(sig.trigger(), MX_USER_SIGNAL_0 | MX_USER_SIGNAL_1);
++                assert_eq!(sig.observed(), MX_USER_SIGNAL_0 | MX_SIGNAL_LAST_HANDLE);
++                assert_eq!(sig.count(), 1);
++            }
++            _ => panic!("wrong packet type"),
++        }
++
++        // Shouldn't get any more packets.
++        assert_eq!(port.wait(deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++
++        // Calling wait_async again should result in another packet.
++        assert!(event.wait_async(&port, key, MX_USER_SIGNAL_0, WaitAsyncOpts::Once).is_ok());
++        let read_packet = port.wait(deadline_after(ten_ms)).unwrap();
++        assert_eq!(read_packet.key(), key);
++        assert_eq!(read_packet.status(), 0);
++        match read_packet.contents() {
++            PacketContents::SignalOne(sig) => {
++                assert_eq!(sig.trigger(), MX_USER_SIGNAL_0);
++                assert_eq!(sig.observed(), MX_USER_SIGNAL_0 | MX_SIGNAL_LAST_HANDLE);
++                assert_eq!(sig.count(), 1);
++            }
++            _ => panic!("wrong packet type"),
++        }
++
++        // Calling wait_async then cancel, we should not get a packet as cancel will remove it from
++        // the queue.
++        assert!(event.wait_async(&port, key, MX_USER_SIGNAL_0, WaitAsyncOpts::Once).is_ok());
++        assert!(port.cancel(&event, key).is_ok());
++        assert_eq!(port.wait(deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++
++        // If the event is signalled after the cancel, we also shouldn't get a packet.
++        assert!(event.signal(MX_USER_SIGNAL_0, MX_SIGNAL_NONE).is_ok());  // clear signal
++        assert!(event.wait_async(&port, key, MX_USER_SIGNAL_0, WaitAsyncOpts::Once).is_ok());
++        assert!(port.cancel(&event, key).is_ok());
++        assert!(event.signal(MX_SIGNAL_NONE, MX_USER_SIGNAL_0).is_ok());
++        assert_eq!(port.wait(deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++    }
++
++    #[test]
++    fn wait_async_repeating() {
++        let ten_ms: Duration = 10_000_000;
++        let key = 42;
++
++        let port = Port::create(PortOpts::Default).unwrap();
++        let event = Event::create(EventOpts::Default).unwrap();
++
++        assert!(event.wait_async(&port, key, MX_USER_SIGNAL_0 | MX_USER_SIGNAL_1,
++            WaitAsyncOpts::Repeating).is_ok());
++
++        // Waiting without setting any signal should time out.
++        assert_eq!(port.wait(deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++
++        // If we set a signal, we should be able to wait for it.
++        assert!(event.signal(MX_SIGNAL_NONE, MX_USER_SIGNAL_0).is_ok());
++        let read_packet = port.wait(deadline_after(ten_ms)).unwrap();
++        assert_eq!(read_packet.key(), key);
++        assert_eq!(read_packet.status(), 0);
++        match read_packet.contents() {
++            PacketContents::SignalRep(sig) => {
++                assert_eq!(sig.trigger(), MX_USER_SIGNAL_0 | MX_USER_SIGNAL_1);
++                assert_eq!(sig.observed(), MX_USER_SIGNAL_0 | MX_SIGNAL_LAST_HANDLE);
++                assert_eq!(sig.count(), 1);
++            }
++            _ => panic!("wrong packet type"),
++        }
++
++        // Should not get any more packets, as MX_WAIT_ASYNC_REPEATING is edge triggered rather than
++        // level triggered.
++        assert_eq!(port.wait(deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++
++        // If we clear and resignal, we should get the same packet again,
++        // even though we didn't call event.wait_async again.
++        assert!(event.signal(MX_USER_SIGNAL_0, MX_SIGNAL_NONE).is_ok());  // clear signal
++        assert!(event.signal(MX_SIGNAL_NONE, MX_USER_SIGNAL_0).is_ok());
++        let read_packet = port.wait(deadline_after(ten_ms)).unwrap();
++        assert_eq!(read_packet.key(), key);
++        assert_eq!(read_packet.status(), 0);
++        match read_packet.contents() {
++            PacketContents::SignalRep(sig) => {
++                assert_eq!(sig.trigger(), MX_USER_SIGNAL_0 | MX_USER_SIGNAL_1);
++                assert_eq!(sig.observed(), MX_USER_SIGNAL_0 | MX_SIGNAL_LAST_HANDLE);
++                assert_eq!(sig.count(), 1);
++            }
++            _ => panic!("wrong packet type"),
++        }
++
++        // Cancelling the wait should stop us getting packets...
++        assert!(port.cancel(&event, key).is_ok());
++        assert_eq!(port.wait(deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++        // ... even if we clear and resignal
++        assert!(event.signal(MX_USER_SIGNAL_0, MX_SIGNAL_NONE).is_ok());  // clear signal
++        assert!(event.signal(MX_SIGNAL_NONE, MX_USER_SIGNAL_0).is_ok());
++        assert_eq!(port.wait(deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++
++        // Calling wait_async again should result in another packet.
++        assert!(event.wait_async(&port, key, MX_USER_SIGNAL_0, WaitAsyncOpts::Repeating).is_ok());
++        let read_packet = port.wait(deadline_after(ten_ms)).unwrap();
++        assert_eq!(read_packet.key(), key);
++        assert_eq!(read_packet.status(), 0);
++        match read_packet.contents() {
++            PacketContents::SignalRep(sig) => {
++                assert_eq!(sig.trigger(), MX_USER_SIGNAL_0);
++                assert_eq!(sig.observed(), MX_USER_SIGNAL_0 | MX_SIGNAL_LAST_HANDLE);
++                assert_eq!(sig.count(), 1);
++            }
++            _ => panic!("wrong packet type"),
++        }
++
++        // Closing the handle should stop us getting packets.
++        drop(event);
++        assert_eq!(port.wait(deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..634c90a1051d1bd9bbe0ab685a90b809f1625409
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,23 @@@
++// Copyright 2017 The Fuchsia Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++//! Type-safe bindings for Magenta process.
++
++use {HandleBase, Handle, HandleRef};
++
++/// An object representing a Magenta process.
++///
++/// As essentially a subtype of `Handle`, it can be freely interconverted.
++#[derive(Debug, Eq, PartialEq)]
++pub struct Process(Handle);
++
++impl HandleBase for Process {
++    fn get_ref(&self) -> HandleRef {
++        self.0.get_ref()
++    }
++
++    fn from_handle(handle: Handle) -> Self {
++        Process(handle)
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..049211e2e69606b4946afbe0a79530f9f9f39341
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,173 @@@
++// Copyright 2016 The Fuchsia Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++//! Type-safe bindings for Magenta sockets.
++
++use {HandleBase, Handle, HandleRef, Peered};
++use {sys, Status, into_result};
++
++use std::ptr;
++
++/// An object representing a Magenta
++/// [socket](https://fuchsia.googlesource.com/magenta/+/master/docs/concepts.md#Message-Passing_Sockets-and-Channels).
++///
++/// As essentially a subtype of `Handle`, it can be freely interconverted.
++#[derive(Debug, Eq, PartialEq)]
++pub struct Socket(Handle);
++
++impl HandleBase for Socket {
++    fn get_ref(&self) -> HandleRef {
++        self.0.get_ref()
++    }
++
++    fn from_handle(handle: Handle) -> Self {
++        Socket(handle)
++    }
++}
++
++impl Peered for Socket {
++}
++
++/// Options for creating a socket pair.
++#[repr(u32)]
++#[derive(Debug, Copy, Clone, Eq, PartialEq)]
++pub enum SocketOpts {
++    /// Default options.
++    Default = 0,
++}
++
++impl Default for SocketOpts {
++    fn default() -> Self {
++        SocketOpts::Default
++    }
++}
++
++/// Options for writing into a socket.
++#[repr(u32)]
++#[derive(Debug, Copy, Clone, Eq, PartialEq)]
++pub enum SocketWriteOpts {
++    /// Default options.
++    Default = 0,
++}
++
++impl Default for SocketWriteOpts {
++    fn default() -> Self {
++        SocketWriteOpts::Default
++    }
++}
++
++/// Options for reading from a socket.
++#[repr(u32)]
++#[derive(Debug, Copy, Clone, Eq, PartialEq)]
++pub enum SocketReadOpts {
++    /// Default options.
++    Default = 0,
++}
++
++impl Default for SocketReadOpts {
++    fn default() -> Self {
++        SocketReadOpts::Default
++    }
++}
++
++
++impl Socket {
++    /// Create a socket, accessed through a pair of endpoints. Data written
++    /// into one may be read from the other.
++    ///
++    /// Wraps
++    /// [mx_socket_create](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/socket_create.md).
++    pub fn create(opts: SocketOpts) -> Result<(Socket, Socket), Status> {
++        unsafe {
++            let mut out0 = 0;
++            let mut out1 = 0;
++            let status = sys::mx_socket_create(opts as u32, &mut out0, &mut out1);
++            into_result(status, ||
++                (Self::from_handle(Handle(out0)),
++                    Self::from_handle(Handle(out1))))
++        }
++    }
++
++    /// Write the given bytes into the socket.
++    /// Return value (on success) is number of bytes actually written.
++    ///
++    /// Wraps
++    /// [mx_socket_write](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/socket_write.md).
++    pub fn write(&self, opts: SocketWriteOpts, bytes: &[u8]) -> Result<usize, Status> {
++        let mut actual = 0;
++        let status = unsafe {
++            sys::mx_socket_write(self.raw_handle(), opts as u32, bytes.as_ptr(), bytes.len(),
++                &mut actual)
++        };
++        into_result(status, || actual)
++    }
++
++    /// Read the given bytes from the socket.
++    /// Return value (on success) is number of bytes actually read.
++    ///
++    /// Wraps
++    /// [mx_socket_read](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/socket_read.md).
++    pub fn read(&self, opts: SocketReadOpts, bytes: &mut [u8]) -> Result<usize, Status> {
++        let mut actual = 0;
++        let status = unsafe {
++            sys::mx_socket_read(self.raw_handle(), opts as u32, bytes.as_mut_ptr(),
++                bytes.len(), &mut actual)
++        };
++        if status != sys::MX_OK {
++            // If an error is returned then actual is undefined, so to be safe we set it to 0 and
++            // ignore any data that is set in bytes.
++            actual = 0;
++        }
++        into_result(status, || actual)
++    }
++
++    /// Close half of the socket, so attempts by the other side to write will fail.
++    ///
++    /// Implements the `MX_SOCKET_HALF_CLOSE` option of
++    /// [mx_socket_write](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/socket_write.md).
++    pub fn half_close(&self) -> Result<(), Status> {
++        let status = unsafe { sys::mx_socket_write(self.raw_handle(), sys::MX_SOCKET_HALF_CLOSE,
++            ptr::null(), 0, ptr::null_mut()) };
++        into_result(status, || ())
++    }
++
++    pub fn outstanding_read_bytes(&self) -> Result<usize, Status> {
++        let mut outstanding = 0;
++        let status = unsafe {
++            sys::mx_socket_read(self.raw_handle(), 0, ptr::null_mut(), 0, &mut outstanding)
++        };
++        into_result(status, || outstanding)
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use super::*;
++
++    #[test]
++    fn socket_basic() {
++        let (s1, s2) = Socket::create(SocketOpts::Default).unwrap();
++
++        // Write in one end and read it back out the other.
++        assert_eq!(s1.write(SocketWriteOpts::Default, b"hello").unwrap(), 5);
++
++        let mut read_vec = vec![0; 8];
++        assert_eq!(s2.read(SocketReadOpts::Default, &mut read_vec).unwrap(), 5);
++        assert_eq!(&read_vec[0..5], b"hello");
++
++        // Try reading when there is nothing to read.
++        assert_eq!(s2.read(SocketReadOpts::Default, &mut read_vec), Err(Status::ErrShouldWait));
++
++        // Close the socket from one end.
++        assert!(s1.half_close().is_ok());
++        assert_eq!(s2.read(SocketReadOpts::Default, &mut read_vec), Err(Status::ErrPeerClosed));
++        assert_eq!(s1.write(SocketWriteOpts::Default, b"fail"), Err(Status::ErrBadState));
++
++        // Writing in the other direction should still work.
++        assert_eq!(s1.read(SocketReadOpts::Default, &mut read_vec), Err(Status::ErrShouldWait));
++        assert_eq!(s2.write(SocketWriteOpts::Default, b"back").unwrap(), 4);
++        assert_eq!(s1.read(SocketReadOpts::Default, &mut read_vec).unwrap(), 4);
++        assert_eq!(&read_vec[0..4], b"back");
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5f054981043bc1ca887e60f0ec6becc58f12b305
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,23 @@@
++// Copyright 2017 The Fuchsia Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++//! Type-safe bindings for Magenta thread.
++
++use {HandleBase, Handle, HandleRef};
++
++/// An object representing a Magenta thread.
++///
++/// As essentially a subtype of `Handle`, it can be freely interconverted.
++#[derive(Debug, Eq, PartialEq)]
++pub struct Thread(Handle);
++
++impl HandleBase for Thread {
++    fn get_ref(&self) -> HandleRef {
++        self.0.get_ref()
++    }
++
++    fn from_handle(handle: Handle) -> Self {
++        Thread(handle)
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8dd1e599ddbb3e24022e6d8505956f437d10f9b3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,101 @@@
++// Copyright 2016 The Fuchsia Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++//! Type-safe bindings for Magenta timer objects.
++
++use {ClockId, Duration, HandleBase, Handle, HandleRef, Status, Time};
++use {sys, into_result};
++
++/// An object representing a Magenta
++/// [event pair](https://fuchsia.googlesource.com/magenta/+/master/docs/concepts.md#Other-IPC_Events_Event-Pairs_and-User-Signals).
++///
++/// As essentially a subtype of `Handle`, it can be freely interconverted.
++#[derive(Debug, Eq, PartialEq)]
++pub struct Timer(Handle);
++
++impl HandleBase for Timer {
++    fn get_ref(&self) -> HandleRef {
++        self.0.get_ref()
++    }
++
++    fn from_handle(handle: Handle) -> Self {
++        Timer(handle)
++    }
++}
++
++impl Timer {
++    /// Create a timer, an object that can signal when a specified point in time has been reached.
++    /// Wraps the
++    /// [mx_timer_create](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/timer_create.md)
++    /// syscall.
++    pub fn create(options: TimerOpts, clock_id: ClockId) -> Result<Timer, Status> {
++        let mut out = 0;
++        let status = unsafe { sys::mx_timer_create(options as u32, clock_id as u32, &mut out) };
++        into_result(status, || Self::from_handle(Handle(out)))
++    }
++
++    /// Starts a timer which will fire when `deadline` passes. Wraps the
++    /// [mx_timer_start](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/timer_start.md)
++    /// syscall.
++    pub fn start(&self, deadline: Time, period: Duration, slack: Duration) -> Result<(), Status> {
++        let status = unsafe { sys::mx_timer_start(self.raw_handle(), deadline, period, slack) };
++        into_result(status, || ())
++    }
++
++    /// Cancels a pending timer that was started with start(). Wraps the
++    /// [mx_timer_cancel](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/timer_cancel.md)
++    /// syscall.
++    pub fn cancel(&self) -> Result<(), Status> {
++        let status = unsafe { sys::mx_timer_cancel(self.raw_handle()) };
++        into_result(status, || ())
++    }
++}
++
++/// Options for creating a timer.
++#[repr(u32)]
++#[derive(Debug, Copy, Clone, Eq, PartialEq)]
++pub enum TimerOpts {
++    /// Default options.
++    Default = 0,
++}
++
++impl Default for TimerOpts {
++    fn default() -> Self {
++        TimerOpts::Default
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use super::*;
++    use {Duration, MX_SIGNAL_LAST_HANDLE, MX_TIMER_SIGNALED};
++    use deadline_after;
++
++    #[test]
++    fn create_timer_invalid_clock() {
++        assert_eq!(Timer::create(TimerOpts::Default, ClockId::UTC).unwrap_err(), Status::ErrInvalidArgs);
++        assert_eq!(Timer::create(TimerOpts::Default, ClockId::Thread), Err(Status::ErrInvalidArgs));
++    }
++
++    #[test]
++    fn timer_basic() {
++        let ten_ms: Duration = 10_000_000;
++        let twenty_ms: Duration = 20_000_000;
++
++        // Create a timer
++        let timer = Timer::create(TimerOpts::Default, ClockId::Monotonic).unwrap();
++
++        // Should not signal yet.
++        assert_eq!(timer.wait(MX_TIMER_SIGNALED, deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++
++        // Start it, and soon it should signal.
++        assert_eq!(timer.start(ten_ms, 0, 0), Ok(()));
++        assert_eq!(timer.wait(MX_TIMER_SIGNALED, deadline_after(twenty_ms)).unwrap(),
++            MX_TIMER_SIGNALED | MX_SIGNAL_LAST_HANDLE);
++
++        // Cancel it, and it should stop signalling.
++        assert_eq!(timer.cancel(), Ok(()));
++        assert_eq!(timer.wait(MX_TIMER_SIGNALED, deadline_after(ten_ms)), Err(Status::ErrTimedOut));
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0ae2848ff6eba9d792099405d7e3a8033ef5a06b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,284 @@@
++// Copyright 2017 The Fuchsia Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++//! Type-safe bindings for Magenta vmo objects.
++
++use {Cookied, HandleBase, Handle, HandleRef, Status};
++use {sys, into_result};
++use std::{mem, ptr};
++
++/// An object representing a Magenta
++/// [virtual memory object](https://fuchsia.googlesource.com/magenta/+/master/docs/objects/vm_object.md).
++///
++/// As essentially a subtype of `Handle`, it can be freely interconverted.
++#[derive(Debug, Eq, PartialEq)]
++pub struct Vmo(Handle);
++
++impl HandleBase for Vmo {
++    fn get_ref(&self) -> HandleRef {
++        self.0.get_ref()
++    }
++
++    fn from_handle(handle: Handle) -> Self {
++        Vmo(handle)
++    }
++}
++
++impl Cookied for Vmo {
++}
++
++impl Vmo {
++    /// Create a virtual memory object.
++    ///
++    /// Wraps the
++    /// `mx_vmo_create`
++    /// syscall. See the
++    /// [Shared Memory: Virtual Memory Objects (VMOs)](https://fuchsia.googlesource.com/magenta/+/master/docs/concepts.md#Shared-Memory_Virtual-Memory-Objects-VMOs)
++    /// for more information.
++    pub fn create(size: u64, options: VmoOpts) -> Result<Vmo, Status> {
++        let mut handle = 0;
++        let status = unsafe { sys::mx_vmo_create(size, options as u32, &mut handle) };
++        into_result(status, ||
++            Vmo::from_handle(Handle(handle)))
++    }
++
++    /// Read from a virtual memory object.
++    ///
++    /// Wraps the `mx_vmo_read` syscall.
++    pub fn read(&self, data: &mut [u8], offset: u64) -> Result<usize, Status> {
++        unsafe {
++            let mut actual = 0;
++            let status = sys::mx_vmo_read(self.raw_handle(), data.as_mut_ptr(),
++                offset, data.len(), &mut actual);
++            into_result(status, || actual)
++        }
++    }
++
++    /// Write to a virtual memory object.
++    ///
++    /// Wraps the `mx_vmo_write` syscall.
++    pub fn write(&self, data: &[u8], offset: u64) -> Result<usize, Status> {
++        unsafe {
++            let mut actual = 0;
++            let status = sys::mx_vmo_write(self.raw_handle(), data.as_ptr(),
++                offset, data.len(), &mut actual);
++            into_result(status, || actual)
++        }
++    }
++
++    /// Get the size of a virtual memory object.
++    ///
++    /// Wraps the `mx_vmo_get_size` syscall.
++    pub fn get_size(&self) -> Result<u64, Status> {
++        let mut size = 0;
++        let status = unsafe { sys::mx_vmo_get_size(self.raw_handle(), &mut size) };
++        into_result(status, || size)
++    }
++
++    /// Attempt to change the size of a virtual memory object.
++    ///
++    /// Wraps the `mx_vmo_set_size` syscall.
++    pub fn set_size(&self, size: u64) -> Result<(), Status> {
++        let status = unsafe { sys::mx_vmo_set_size(self.raw_handle(), size) };
++        into_result(status, || ())
++    }
++
++    /// Perform an operation on a range of a virtual memory object.
++    ///
++    /// Wraps the
++    /// [mx_vmo_op_range](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/vmo_op_range.md)
++    /// syscall.
++    pub fn op_range(&self, op: VmoOp, offset: u64, size: u64) -> Result<(), Status> {
++        let status = unsafe {
++            sys::mx_vmo_op_range(self.raw_handle(), op as u32, offset, size, ptr::null_mut(), 0)
++        };
++        into_result(status, || ())
++    }
++
++    /// Look up a list of physical addresses corresponding to the pages held by the VMO from
++    /// `offset` to `offset`+`size`, and store them in `buffer`.
++    ///
++    /// Wraps the
++    /// [mx_vmo_op_range](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/vmo_op_range.md)
++    /// syscall with MX_VMO_OP_LOOKUP.
++    pub fn lookup(&self, offset: u64, size: u64, buffer: &mut [sys::mx_paddr_t])
++        -> Result<(), Status>
++    {
++        let status = unsafe {
++            sys::mx_vmo_op_range(self.raw_handle(), sys::MX_VMO_OP_LOOKUP, offset, size,
++                buffer.as_mut_ptr() as *mut u8, buffer.len() * mem::size_of::<sys::mx_paddr_t>())
++        };
++        into_result(status, || ())
++    }
++
++    /// Create a new virtual memory object that clones a range of this one.
++    ///
++    /// Wraps the
++    /// [mx_vmo_clone](https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/vmo_clone.md)
++    /// syscall.
++    pub fn clone(&self, options: VmoCloneOpts, offset: u64, size: u64) -> Result<Vmo, Status> {
++        let mut out = 0;
++        let status = unsafe {
++            sys::mx_vmo_clone(self.raw_handle(), options as u32, offset, size, &mut out)
++        };
++        into_result(status, || Vmo::from_handle(Handle(out)))
++    }
++}
++
++/// Options for creating virtual memory objects. None supported yet.
++#[repr(u32)]
++#[derive(Debug, Copy, Clone, Eq, PartialEq)]
++pub enum VmoOpts {
++    /// Default options.
++    Default = 0,
++}
++
++impl Default for VmoOpts {
++    fn default() -> Self {
++        VmoOpts::Default
++    }
++}
++
++#[repr(u32)]
++#[derive(Debug, Copy, Clone, Eq, PartialEq)]
++pub enum VmoOp {
++    /// Commit `size` bytes worth of pages starting at byte `offset` for the VMO.
++    Commit = sys::MX_VMO_OP_COMMIT,
++    /// Release a range of pages previously committed to the VMO from `offset` to `offset`+`size`.
++    Decommit = sys::MX_VMO_OP_DECOMMIT,
++    // Presently unsupported.
++    Lock = sys::MX_VMO_OP_LOCK,
++    // Presently unsupported.
++    Unlock = sys::MX_VMO_OP_UNLOCK,
++    /// Perform a cache sync operation.
++    CacheSync = sys::MX_VMO_OP_CACHE_SYNC,
++    /// Perform a cache invalidation operation.
++    CacheInvalidate = sys::MX_VMO_OP_CACHE_INVALIDATE,
++    /// Perform a cache clean operation.
++    CacheClean = sys::MX_VMO_OP_CACHE_CLEAN,
++    /// Perform cache clean and invalidation operations together.
++    CacheCleanInvalidate = sys::MX_VMO_OP_CACHE_CLEAN_INVALIDATE,
++}
++
++#[repr(u32)]
++#[derive(Debug, Copy, Clone, Eq, PartialEq)]
++pub enum VmoCloneOpts {
++    /// Create a copy-on-write clone.
++    CopyOnWrite = sys::MX_VMO_CLONE_COPY_ON_WRITE,
++}
++
++impl Default for VmoCloneOpts {
++    fn default() -> Self {
++        VmoCloneOpts::CopyOnWrite
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use super::*;
++
++    #[test]
++    fn vmo_get_size() {
++        let size = 16 * 1024 * 1024;
++        let vmo = Vmo::create(size, VmoOpts::Default).unwrap();
++        assert_eq!(size, vmo.get_size().unwrap());
++    }
++
++    #[test]
++    fn vmo_set_size() {
++        let start_size = 12;
++        let vmo = Vmo::create(start_size, VmoOpts::Default).unwrap();
++        assert_eq!(start_size, vmo.get_size().unwrap());
++
++        // Change the size and make sure the new size is reported
++        let new_size = 23;
++        assert!(vmo.set_size(new_size).is_ok());
++        assert_eq!(new_size, vmo.get_size().unwrap());
++    }
++
++    #[test]
++    fn vmo_read_write() {
++        let mut vec1 = vec![0; 16];
++        let vmo = Vmo::create(vec1.len() as u64, VmoOpts::Default).unwrap();
++        assert_eq!(vmo.write(b"abcdef", 0), Ok(6));
++        assert_eq!(16, vmo.read(&mut vec1, 0).unwrap());
++        assert_eq!(b"abcdef", &vec1[0..6]);
++        assert_eq!(vmo.write(b"123", 2), Ok(3));
++        assert_eq!(16, vmo.read(&mut vec1, 0).unwrap());
++        assert_eq!(b"ab123f", &vec1[0..6]);
++        assert_eq!(15, vmo.read(&mut vec1, 1).unwrap());
++        assert_eq!(b"b123f", &vec1[0..5]);
++    }
++
++    #[test]
++    fn vmo_op_range_unsupported() {
++        let vmo = Vmo::create(12, VmoOpts::Default).unwrap();
++        assert_eq!(vmo.op_range(VmoOp::Lock, 0, 1), Err(Status::ErrNotSupported));
++        assert_eq!(vmo.op_range(VmoOp::Unlock, 0, 1), Err(Status::ErrNotSupported));
++    }
++
++    #[test]
++    fn vmo_lookup() {
++        let vmo = Vmo::create(12, VmoOpts::Default).unwrap();
++        let mut buffer = vec![0; 2];
++
++        // Lookup will fail as it is not committed yet.
++        assert_eq!(vmo.lookup(0, 12, &mut buffer), Err(Status::ErrNoMemory));
++
++        // Commit and try again.
++        assert_eq!(vmo.op_range(VmoOp::Commit, 0, 12), Ok(()));
++        assert_eq!(vmo.lookup(0, 12, &mut buffer), Ok(()));
++        assert_ne!(buffer[0], 0);
++        assert_eq!(buffer[1], 0);
++
++        // If we decommit then lookup should go back to failing.
++        assert_eq!(vmo.op_range(VmoOp::Decommit, 0, 12), Ok(()));
++        assert_eq!(vmo.lookup(0, 12, &mut buffer), Err(Status::ErrNoMemory));
++    }
++
++    #[test]
++    fn vmo_cache() {
++        let vmo = Vmo::create(12, VmoOpts::Default).unwrap();
++
++        // Cache operations should all succeed.
++        assert_eq!(vmo.op_range(VmoOp::CacheSync, 0, 12), Ok(()));
++        assert_eq!(vmo.op_range(VmoOp::CacheInvalidate, 0, 12), Ok(()));
++        assert_eq!(vmo.op_range(VmoOp::CacheClean, 0, 12), Ok(()));
++        assert_eq!(vmo.op_range(VmoOp::CacheCleanInvalidate, 0, 12), Ok(()));
++    }
++
++    #[test]
++    fn vmo_clone() {
++        let original = Vmo::create(12, VmoOpts::Default).unwrap();
++        assert_eq!(original.write(b"one", 0), Ok(3));
++
++        // Clone the VMO, and make sure it contains what we expect.
++        let clone = original.clone(VmoCloneOpts::CopyOnWrite, 0, 10).unwrap();
++        let mut read_buffer = vec![0; 16];
++        assert_eq!(clone.read(&mut read_buffer, 0), Ok(10));
++        assert_eq!(&read_buffer[0..3], b"one");
++
++        // Writing to the original will affect the clone too, surprisingly.
++        assert_eq!(original.write(b"two", 0), Ok(3));
++        assert_eq!(original.read(&mut read_buffer, 0), Ok(12));
++        assert_eq!(&read_buffer[0..3], b"two");
++        assert_eq!(clone.read(&mut read_buffer, 0), Ok(10));
++        assert_eq!(&read_buffer[0..3], b"two");
++
++        // However, writing to the clone will not affect the original
++        assert_eq!(clone.write(b"three", 0), Ok(5));
++        assert_eq!(original.read(&mut read_buffer, 0), Ok(12));
++        assert_eq!(&read_buffer[0..3], b"two");
++        assert_eq!(clone.read(&mut read_buffer, 0), Ok(10));
++        assert_eq!(&read_buffer[0..5], b"three");
++
++        // And now that the copy-on-write has happened, writing to the original will not affect the
++        // clone. How bizarre.
++        assert_eq!(original.write(b"four", 0), Ok(4));
++        assert_eq!(original.read(&mut read_buffer, 0), Ok(12));
++        assert_eq!(&read_buffer[0..4], b"four");
++        assert_eq!(clone.read(&mut read_buffer, 0), Ok(10));
++        assert_eq!(&read_buffer[0..5], b"three");
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..15492058643b6901cae2d4ffd9bc87339c955376
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,51 @@@
++# Copyright 2017 The Fuchsia Authors. All rights reserved.
++# Use of this source code is governed by a BSD-style license that can be
++# found in the LICENSE file.
++
++group("clang_wrapper") {
++  deps = [
++    ":arm64_wrapper",
++    ":x64_wrapper",
++  ]
++}
++
++executable("clang_wrapper_bin") {
++  output_name = "rust_clang_wrapper"
++
++  sources = [
++    "clang_wrapper.cc",
++  ]
++
++  if (is_linux) {
++    ldflags = [
++      "-pthread",
++    ]
++  }
++}
++
++template("copy_wrapper") {
++
++  arch = invoker.arch
++
++  copy(target_name) {
++    sources = [
++      "$root_out_dir/rust_clang_wrapper",
++    ]
++
++    outputs = [
++      "$root_out_dir/$arch-unknown-fuchsia-cc",
++    ]
++
++    deps = [
++      ":clang_wrapper_bin",
++    ]
++  }
++}
++
++copy_wrapper("arm64_wrapper") {
++  arch = "aarch64"
++}
++
++copy_wrapper("x64_wrapper") {
++  arch = "x86_64"
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..cb7f3d6999162457307e7ef0a96f10dca76516ce
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,26 @@@
++Build tools for Rust on Fuchsia
++===============================
++
++This directory contains a wrapper so that clang can be invoked using a
++target-specific command line (as is typically done using Gnu tools for
++cross-compiling).
++
++To compile standalone (not part of a build system):
++
++```
++clang++ -O --std=c++11 clang_wrapper.cc -o clang_wrapper
++ln -s clang_wrapper x86-64-unknown-fuchsia-ar
++ln -s clang_wrapper x86-64-unknown-fuchsia-cc
++ln -s clang_wrapper aarch64-unknown-fuchsia-ar
++ln -s clang_wrapper aarch64-unknown-fuchsia-cc
++```
++
++The resulting binaries (`x86-64-unknown-fuchsia-cc` and the like) must be
++placed somewhere under the root of the fuchsia tree.
++
++The wrapper sets the target triple appropriately, and also finds the
++appropriate sysroot for the given target (necessary for linking).
++
++Note: this wrapper is provisional, hopefully to be supplanted by a more
++general config mechanism in LLVM
++(see [relevant LLVM patch](https://reviews.llvm.org/D24933)).
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f1cdef83d21d7b2ddba1786379894cd9200fa89c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,197 @@@
++// Copyright 2016 The Fuchsia Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++// Wrap the clang toolchain to supply triple-specific configuration parameters
++// as arguments.
++
++// Gnu-style toolchains encode the target triple in the executable name (each
++// executable is specialized to a single triple), and each toolchain also knows
++// how to find the corresponding sysroot. By contrast, clang uses a single
++// binary, and the target is specified as a command line argument. In addition,
++// in the Fuchsia world, the sysroot is not bundled with the compiler.
++//
++// This wrapper infers the relevant configuration parameters from the command
++// name used to invoke the wrapper, and also finds the sysroot at a known
++// location relative to the jiri root, then invokes clang with the additional
++// arguments.
++
++#include <string>
++#include <vector>
++#include <iostream>
++#include <stdlib.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <sys/utsname.h>
++#include <unistd.h>
++#include <string.h>
++#include <algorithm>
++
++using std::string;
++using std::vector;
++
++// Get the real path of this executable, resolving symbolic links.
++string GetPath(const char* argv0) {
++  char* path_c = realpath(argv0, nullptr);
++  string path = string(path_c);
++  free(path_c);
++  return path;
++}
++
++// Return path of Jiri root, or empty string if not found.
++string FindJiriRoot(const string& self_path) {
++  string path = self_path;
++  while (true) {
++    size_t pos = path.rfind('/');
++    if (pos == string::npos) {
++      return "";
++    }
++    string basedir = path.substr(0, pos + 1);
++    string trial = basedir + ".jiri_root";
++    struct stat stat_buf;
++    int status = stat(trial.c_str(), &stat_buf);
++    if (status == 0) {
++      return basedir;
++    }
++    path = path.substr(0, pos);
++  }
++}
++
++// Get the basename of the command used to invoke this wrapper.
++// Typical return value: "x86-64-unknown-fuchsia-cc"
++string GetCmd(const char* argv0) {
++  string cmd = argv0;
++  size_t pos = cmd.rfind('/');
++  if (pos != string::npos) {
++    cmd = cmd.substr(pos + 1);
++  }
++  return cmd;
++}
++
++// Given the command basename, get the llvm target triple. Empty string on failure.
++// Typical return value: "x86_64-unknown-fuchsia"
++string TargetTriple(const string& cmd) {
++  size_t pos = cmd.rfind('-');
++  if (pos == string::npos) {
++    return "";
++  }
++  string triple = cmd.substr(0, pos);
++  if (triple.find("x86-64") == 0) {
++    triple[3] = '_';
++  }
++  return triple;
++}
++
++// Given the path to the command, calculate the matching sysroot
++string SysrootPath(const string& self_path) {
++  const string out_dir_name = "out/";
++  size_t pos = self_path.find(out_dir_name);
++  if (pos != string::npos) {
++    size_t end_pos = self_path.find("/", pos+out_dir_name.length() + 1);
++    if (end_pos != string::npos) {
++        string sysroot_path = self_path.substr(0, end_pos) + "/sysroot";
++        struct stat stat_buf;
++        int status = stat(sysroot_path.c_str(), &stat_buf);
++        if (status == 0) {
++            return sysroot_path;
++        }
++    }
++  }
++  return "";
++}
++
++// Detect the host, get the host identifier (used to select a prebuilt toolchain).
++// Empty string on failure.
++// Typical return value: "x86_64-darwin"
++string HostDouble() {
++  struct utsname name;
++  int status = uname(&name);
++  if (status != 0) {
++    return "";
++  }
++  string dbl = string(name.machine) + "-" + string(name.sysname);
++  std::transform(dbl.begin(), dbl.end(), dbl.begin(), ::tolower);
++  return dbl;
++}
++
++// Given the command baseline, get the llvm binary to invoke.
++// Note: the "llvm-ar" special case should probably go away, as Rust no longer
++// invokes an external "ar" tool, and the llvm-ar one probably wouldn't work.
++// Typical return value: "clang"
++string InferTool(const string& cmd) {
++  size_t pos = cmd.rfind('-');
++  string base;
++  if (pos != string::npos) {
++    base = cmd.substr(pos + 1);
++  } else {
++    base = cmd;
++  }
++  if (base == "cc" || base == "gcc") {
++    return "clang";
++  } else if (base == "ar") {
++    return "llvm-ar";
++  }
++  return base;
++}
++
++// Collect C-style argc/argv into a vector of strings.
++vector<string> CollectArgs(int argc, char** argv) {
++  vector<string> result;
++  for (int i = 0; i < argc; i++) {
++    result.push_back(argv[i]);
++  }
++  return result;
++}
++
++// Do "execv" given command path as a string and args as a vector of strings.
++int DoExecv(const string& cmd, vector<string>& args) {
++  vector<const char*> argvec;
++  for (auto& it : args) {
++    argvec.push_back(it.c_str());
++  }
++  argvec.push_back(nullptr);
++  char* const* argv = const_cast<char* const*>(argvec.data());
++  return execv(cmd.c_str(), argv);
++}
++
++void Die(const string& message) {
++  std::cerr << message << std::endl;
++  exit(1);
++}
++
++int main(int argc, char** argv) {
++  string self_path = GetPath(argv[0]);
++  string root = FindJiriRoot(self_path);
++  if (root.empty()) {
++    Die("Can't find .jiri_root in any parent of " + self_path);
++  }
++  string host = HostDouble();
++  if (host.empty()) {
++    Die("Can't detect host (uname failed)");
++  }
++  string cmd = GetCmd(argv[0]);
++  string tool = InferTool(cmd);
++  string triple = TargetTriple(cmd);
++  vector<string> args = CollectArgs(argc, argv);
++
++  string newcmd = root + "buildtools/toolchain/clang+llvm-" + host + "/bin/" + tool;
++  string sysroot = SysrootPath(self_path);
++  if (sysroot.empty()) {
++    Die("Can't find sysroot from wrapper path");
++  }
++  vector<string> newargs;
++  newargs.push_back(newcmd);
++  if (tool != "llvm-ar") {
++    newargs.push_back("-target");
++    newargs.push_back(triple);
++    newargs.push_back("--sysroot=" + sysroot);
++  }
++  for (auto it = args.begin() + 1; it != args.end(); ++it) {
++    newargs.push_back(*it);
++  }
++  int status = DoExecv(newcmd, newargs);
++  if (status != 0) {
++    Die("error invoking " + newcmd + ": " + strerror(errno));
++  }
++  return 0;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c56ab56d3d15dae514ec889d13a09bbb63d2efd8
new file mode 100755 (executable)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,49 @@@
++#!/usr/bin/env python
++
++# Copyright 2016 The Fuchsia Authors. All rights reserved.
++# Use of this source code is governed by a BSD-style license that can be
++# found in the LICENSE file.
++
++# A tool for autogenerating the mapping between Status and mx_status_t
++# Usage: python gen_status.py magenta/system/public/magenta/errors.h {sys,enum,match}
++import re
++import sys
++
++status_re = re.compile('#define\s+(MX_\w+)\s+\((\-?\d+)\)$')
++
++def parse(in_filename):
++    result = []
++    for line in file(in_filename):
++        m = status_re.match(line)
++        if m:
++            result.append((m.group(1), int(m.group(2))))
++    return result
++
++def to_snake_case(name):
++    result = []
++    for element in name.split('_'):
++        result.append(element[0] + element[1:].lower())
++    return ''.join(result)
++
++def out(style, l):
++    print('// Auto-generated using tools/gen_status.py')
++    longest = max(len(name) for (name, num) in l)
++    if style == 'sys':
++        for (name, num) in l:
++            print('pub const %s : mx_status_t = %d;' % (name.ljust(longest), num))
++    if style == 'enum':
++        print('pub enum Status {')
++        for (name, num) in l:
++            print('    %s = %d,' % (to_snake_case(name[3:]), num))
++        print('');
++        print('    /// Any mx_status_t not in the set above will map to the following:')
++        print('    UnknownOther = -32768,')
++        print('}')
++    if style == 'match':
++        for (name, num) in l:
++            print('            sys::%s => Status::%s,' % (name, to_snake_case(name[3:])))
++        print('            _ => Status::UnknownOther,')
++
++
++l = parse(sys.argv[1])
++out(sys.argv[2], l)
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f9878b05ed5b75ef8bbaf86cb006767106398e0d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"40d014c7011ac470ae28e2f76a02bfea4a8480f73e701353b49ad7a8d75f4699"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e1d017fe4205bba36bcca7c31188a3acf25ae953
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,11 @@@
++# Copyright 2017 The Fuchsia Authors. All rights reserved.
++# Use of this source code is governed by a BSD-style license that can be
++# found in the LICENSE file.
++
++import("//build/rust/rust_library.gni")
++
++rust_library("magenta-sys") {
++  deps = [
++    "//third_party/rust-crates:bitflags-0.7.0",
++  ]
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d04dd0291377bdbefdd1cde07efa92ee045c1a26
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,10 @@@
++[package]
++name = "magenta-sys"
++version = "0.1.1"
++license = "BSD-3-Clause"
++authors = ["Raph Levien <raph@google.com>"]
++description = "Low-level Rust bindings for the Magenta kernel"
++repository = "https://fuchsia.googlesource.com/magenta-rs/"
++
++[dependencies]
++bitflags = "0.7.0"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..eb631a59d4f1cd70cb66dc3b3a5456d7fc2f2859
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++// Copyright 2016 The Fuchsia Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++extern crate magenta_sys;
++
++pub fn main() {
++    let time = unsafe { magenta_sys::mx_time_get(magenta_sys::MX_CLOCK_MONOTONIC) };
++    println!("before sleep, time = {}", time);
++    unsafe { magenta_sys::mx_nanosleep(magenta_sys::mx_deadline_after(1000_000_000)); }
++    let time = unsafe { magenta_sys::mx_time_get(magenta_sys::MX_CLOCK_MONOTONIC) };
++    println!("after sleep, time = {}", time);
++}
++
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fd547549875d80f89a1e7de7236788c220b5ede7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,882 @@@
++// Copyright 2017 The Fuchsia Authors. All rights reserved.
++// This is a GENERATED file, see //magenta/system/host/sysgen.
++// The license governing this file can be found in the LICENSE file.
++
++#[link(name = "magenta")]
++extern {
++    pub fn mx_time_get(
++        clock_id: u32
++        ) -> mx_time_t;
++
++    pub fn mx_nanosleep(
++        deadline: mx_time_t
++        ) -> mx_status_t;
++
++    pub fn mx_ticks_get(
++        ) -> u64;
++
++    pub fn mx_ticks_per_second(
++        ) -> u64;
++
++    pub fn mx_deadline_after(
++        nanoseconds: mx_duration_t
++        ) -> mx_time_t;
++
++    pub fn mx_system_get_num_cpus(
++        ) -> u32;
++
++    pub fn mx_system_get_version(
++        version: *mut u8,
++        version_len: u32
++        ) -> mx_status_t;
++
++    pub fn mx_system_get_physmem(
++        ) -> u64;
++
++    pub fn mx_cache_flush(
++        addr: *const u8,
++        len: usize,
++        options: u32
++        ) -> mx_status_t;
++
++    pub fn mx_handle_close(
++        handle: mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_handle_duplicate(
++        handle: mx_handle_t,
++        rights: mx_rights_t,
++        out: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_handle_replace(
++        handle: mx_handle_t,
++        rights: mx_rights_t,
++        out: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_object_wait_one(
++        handle: mx_handle_t,
++        waitfor: mx_signals_t,
++        deadline: mx_time_t,
++        observed: *mut mx_signals_t
++        ) -> mx_status_t;
++
++    pub fn mx_object_wait_many(
++        items: *mut mx_wait_item_t,
++        count: u32,
++        deadline: mx_time_t
++        ) -> mx_status_t;
++
++    pub fn mx_object_wait_async(
++        handle: mx_handle_t,
++        port_handle: mx_handle_t,
++        key: u64,
++        signals: mx_signals_t,
++        options: u32
++        ) -> mx_status_t;
++
++    pub fn mx_object_signal(
++        handle: mx_handle_t,
++        clear_mask: u32,
++        set_mask: u32
++        ) -> mx_status_t;
++
++    pub fn mx_object_signal_peer(
++        handle: mx_handle_t,
++        clear_mask: u32,
++        set_mask: u32
++        ) -> mx_status_t;
++
++    pub fn mx_object_get_property(
++        handle: mx_handle_t,
++        property: u32,
++        value: *mut u8,
++        size: usize
++        ) -> mx_status_t;
++
++    pub fn mx_object_set_property(
++        handle: mx_handle_t,
++        property: u32,
++        value: *const u8,
++        size: usize
++        ) -> mx_status_t;
++
++    pub fn mx_object_set_cookie(
++        handle: mx_handle_t,
++        scope: mx_handle_t,
++        cookie: u64
++        ) -> mx_status_t;
++
++    pub fn mx_object_get_cookie(
++        handle: mx_handle_t,
++        scope: mx_handle_t,
++        cookie: *mut u64
++        ) -> mx_status_t;
++
++    pub fn mx_object_get_info(
++        handle: mx_handle_t,
++        topic: u32,
++        buffer: *mut u8,
++        buffer_size: usize,
++        actual_count: *mut usize,
++        avail_count: *mut usize
++        ) -> mx_status_t;
++
++    pub fn mx_object_get_child(
++        handle: mx_handle_t,
++        koid: u64,
++        rights: mx_rights_t,
++        out: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_channel_create(
++        options: u32,
++        out0: *mut mx_handle_t,
++        out1: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_channel_read(
++        handle: mx_handle_t,
++        options: u32,
++        bytes: *mut u8,
++        handles: *mut mx_handle_t,
++        num_bytes: u32,
++        num_handles: u32,
++        actual_bytes: *mut u32,
++        actual_handles: *mut u32
++        ) -> mx_status_t;
++
++    pub fn mx_channel_write(
++        handle: mx_handle_t,
++        options: u32,
++        bytes: *const u8,
++        num_bytes: u32,
++        handles: *const mx_handle_t,
++        num_handles: u32
++        ) -> mx_status_t;
++
++    pub fn mx_channel_call_noretry(
++        handle: mx_handle_t,
++        options: u32,
++        deadline: mx_time_t,
++        args: *const mx_channel_call_args_t,
++        actual_bytes: *mut u32,
++        actual_handles: *mut u32,
++        read_status: *mut mx_status_t
++        ) -> mx_status_t;
++
++    pub fn mx_channel_call_finish(
++        handle: mx_handle_t,
++        deadline: mx_time_t,
++        args: *const mx_channel_call_args_t,
++        actual_bytes: *mut u32,
++        actual_handles: *mut u32,
++        read_status: *mut mx_status_t
++        ) -> mx_status_t;
++
++    pub fn mx_channel_call(
++        handle: mx_handle_t,
++        options: u32,
++        deadline: mx_time_t,
++        args: *const mx_channel_call_args_t,
++        actual_bytes: *mut u32,
++        actual_handles: *mut u32,
++        read_status: *mut mx_status_t
++        ) -> mx_status_t;
++
++    pub fn mx_socket_create(
++        options: u32,
++        out0: *mut mx_handle_t,
++        out1: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_socket_write(
++        handle: mx_handle_t,
++        options: u32,
++        buffer: *const u8,
++        size: usize,
++        actual: *mut usize
++        ) -> mx_status_t;
++
++    pub fn mx_socket_read(
++        handle: mx_handle_t,
++        options: u32,
++        buffer: *mut u8,
++        size: usize,
++        actual: *mut usize
++        ) -> mx_status_t;
++
++    pub fn mx_thread_exit(
++        );
++
++    pub fn mx_thread_create(
++        process: mx_handle_t,
++        name: *const u8,
++        name_len: u32,
++        options: u32,
++        out: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_thread_start(
++        handle: mx_handle_t,
++        thread_entry: usize,
++        stack: usize,
++        arg1: usize,
++        arg2: usize
++        ) -> mx_status_t;
++
++    pub fn mx_thread_read_state(
++        handle: mx_handle_t,
++        kind: u32,
++        buffer: *mut u8,
++        len: u32,
++        actual: *mut u32
++        ) -> mx_status_t;
++
++    pub fn mx_thread_write_state(
++        handle: mx_handle_t,
++        kind: u32,
++        buffer: *const u8,
++        buffer_len: u32
++        ) -> mx_status_t;
++
++    pub fn mx_process_exit(
++        retcode: isize
++        );
++
++    pub fn mx_process_create(
++        job: mx_handle_t,
++        name: *const u8,
++        name_len: u32,
++        options: u32,
++        proc_handle: *mut mx_handle_t,
++        vmar_handle: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_process_start(
++        process_handle: mx_handle_t,
++        thread_handle: mx_handle_t,
++        entry: usize,
++        stack: usize,
++        arg_handle: mx_handle_t,
++        arg2: usize
++        ) -> mx_status_t;
++
++    pub fn mx_process_read_memory(
++        proc_: mx_handle_t,
++        vaddr: usize,
++        buffer: *mut u8,
++        len: usize,
++        actual: *mut usize
++        ) -> mx_status_t;
++
++    pub fn mx_process_write_memory(
++        proc_: mx_handle_t,
++        vaddr: usize,
++        buffer: *const u8,
++        len: usize,
++        actual: *mut usize
++        ) -> mx_status_t;
++
++    pub fn mx_job_create(
++        parent_job: mx_handle_t,
++        options: u32,
++        out: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_job_set_policy(
++        job: mx_handle_t,
++        options: u32,
++        topic: u32,
++        policy: *const u8,
++        count: u32
++        ) -> mx_status_t;
++
++    pub fn mx_task_bind_exception_port(
++        object: mx_handle_t,
++        eport: mx_handle_t,
++        key: u64,
++        options: u32
++        ) -> mx_status_t;
++
++    pub fn mx_task_suspend(
++        task_handle: mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_task_resume(
++        task_handle: mx_handle_t,
++        options: u32
++        ) -> mx_status_t;
++
++    pub fn mx_task_kill(
++        task_handle: mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_event_create(
++        options: u32,
++        out: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_eventpair_create(
++        options: u32,
++        out0: *mut mx_handle_t,
++        out1: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_futex_wait(
++        value_ptr: *mut mx_futex_t,
++        current_value: isize,
++        deadline: mx_time_t
++        ) -> mx_status_t;
++
++    pub fn mx_futex_wake(
++        value_ptr: *const mx_futex_t,
++        count: u32
++        ) -> mx_status_t;
++
++    pub fn mx_futex_requeue(
++        wake_ptr: *mut mx_futex_t,
++        wake_count: u32,
++        current_value: isize,
++        requeue_ptr: *mut mx_futex_t,
++        requeue_count: u32
++        ) -> mx_status_t;
++
++    pub fn mx_port_create(
++        options: u32,
++        out: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_port_queue(
++        handle: mx_handle_t,
++        packet: *const u8,
++        size: usize
++        ) -> mx_status_t;
++
++    pub fn mx_port_wait(
++        handle: mx_handle_t,
++        deadline: mx_time_t,
++        packet: *mut u8,
++        size: usize
++        ) -> mx_status_t;
++
++    pub fn mx_port_cancel(
++        handle: mx_handle_t,
++        source: mx_handle_t,
++        key: u64
++        ) -> mx_status_t;
++
++    pub fn mx_timer_create(
++        options: u32,
++        clock_id: u32,
++        out: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_timer_start(
++        handle: mx_handle_t,
++        deadline: mx_time_t,
++        period: mx_duration_t,
++        slack: mx_duration_t
++        ) -> mx_status_t;
++
++    pub fn mx_timer_cancel(
++        handle: mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_vmo_create(
++        size: u64,
++        options: u32,
++        out: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_vmo_read(
++        handle: mx_handle_t,
++        data: *mut u8,
++        offset: u64,
++        len: usize,
++        actual: *mut usize
++        ) -> mx_status_t;
++
++    pub fn mx_vmo_write(
++        handle: mx_handle_t,
++        data: *const u8,
++        offset: u64,
++        len: usize,
++        actual: *mut usize
++        ) -> mx_status_t;
++
++    pub fn mx_vmo_get_size(
++        handle: mx_handle_t,
++        size: *mut u64
++        ) -> mx_status_t;
++
++    pub fn mx_vmo_set_size(
++        handle: mx_handle_t,
++        size: u64
++        ) -> mx_status_t;
++
++    pub fn mx_vmo_op_range(
++        handle: mx_handle_t,
++        op: u32,
++        offset: u64,
++        size: u64,
++        buffer: *mut u8,
++        buffer_size: usize
++        ) -> mx_status_t;
++
++    pub fn mx_vmo_clone(
++        handle: mx_handle_t,
++        options: u32,
++        offset: u64,
++        size: u64,
++        out: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_vmo_set_cache_policy(
++        handle: mx_handle_t,
++        cache_policy: u32
++        ) -> mx_status_t;
++
++    pub fn mx_vmar_allocate(
++        parent_vmar_handle: mx_handle_t,
++        offset: usize,
++        size: usize,
++        map_flags: u32,
++        child_vmar: *mut mx_handle_t,
++        child_addr: *mut usize
++        ) -> mx_status_t;
++
++    pub fn mx_vmar_destroy(
++        vmar_handle: mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_vmar_map(
++        vmar_handle: mx_handle_t,
++        vmar_offset: usize,
++        vmo_handle: mx_handle_t,
++        vmo_offset: u64,
++        len: usize,
++        map_flags: u32,
++        mapped_addr: *mut usize
++        ) -> mx_status_t;
++
++    pub fn mx_vmar_unmap(
++        vmar_handle: mx_handle_t,
++        addr: usize,
++        len: usize
++        ) -> mx_status_t;
++
++    pub fn mx_vmar_protect(
++        vmar_handle: mx_handle_t,
++        addr: usize,
++        len: usize,
++        prot_flags: u32
++        ) -> mx_status_t;
++
++    pub fn mx_cprng_draw(
++        buffer: *mut u8,
++        len: usize,
++        actual: *mut usize
++        ) -> mx_status_t;
++
++    pub fn mx_cprng_add_entropy(
++        buffer: *const u8,
++        len: usize
++        ) -> mx_status_t;
++
++    pub fn mx_fifo_create(
++        elem_count: u32,
++        elem_size: u32,
++        options: u32,
++        out0: *mut mx_handle_t,
++        out1: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_fifo_read(
++        handle: mx_handle_t,
++        data: *mut u8,
++        len: usize,
++        num_written: *mut u32
++        ) -> mx_status_t;
++
++    pub fn mx_fifo_write(
++        handle: mx_handle_t,
++        data: *const u8,
++        len: usize,
++        num_written: *mut u32
++        ) -> mx_status_t;
++
++    pub fn mx_vmar_unmap_handle_close_thread_exit(
++        vmar_handle: mx_handle_t,
++        addr: usize,
++        len: usize,
++        handle: mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_futex_wake_handle_close_thread_exit(
++        value_ptr: *const mx_futex_t,
++        count: u32,
++        new_value: isize,
++        handle: mx_handle_t
++        );
++
++    pub fn mx_log_create(
++        options: u32,
++        out: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_log_write(
++        handle: mx_handle_t,
++        len: u32,
++        buffer: *const u8,
++        options: u32
++        ) -> mx_status_t;
++
++    pub fn mx_log_read(
++        handle: mx_handle_t,
++        len: u32,
++        buffer: *mut u8,
++        options: u32
++        ) -> mx_status_t;
++
++    pub fn mx_ktrace_read(
++        handle: mx_handle_t,
++        data: *mut u8,
++        offset: u32,
++        len: u32,
++        actual: *mut u32
++        ) -> mx_status_t;
++
++    pub fn mx_ktrace_control(
++        handle: mx_handle_t,
++        action: u32,
++        options: u32,
++        ptr: *mut u8
++        ) -> mx_status_t;
++
++    pub fn mx_ktrace_write(
++        handle: mx_handle_t,
++        id: u32,
++        arg0: u32,
++        arg1: u32
++        ) -> mx_status_t;
++
++    pub fn mx_mtrace_control(
++        handle: mx_handle_t,
++        kind: u32,
++        action: u32,
++        options: u32,
++        ptr: *mut u8,
++        size: u32
++        ) -> mx_status_t;
++
++    pub fn mx_debug_read(
++        handle: mx_handle_t,
++        buffer: *mut u8,
++        length: u32
++        ) -> mx_status_t;
++
++    pub fn mx_debug_write(
++        buffer: *const u8,
++        length: u32
++        ) -> mx_status_t;
++
++    pub fn mx_debug_send_command(
++        resource_handle: mx_handle_t,
++        buffer: *const u8,
++        length: u32
++        ) -> mx_status_t;
++
++    pub fn mx_interrupt_create(
++        handle: mx_handle_t,
++        vector: u32,
++        options: u32
++        ) -> mx_handle_t;
++
++    pub fn mx_interrupt_complete(
++        handle: mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_interrupt_wait(
++        handle: mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_interrupt_signal(
++        handle: mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_mmap_device_io(
++        handle: mx_handle_t,
++        io_addr: u32,
++        len: u32
++        ) -> mx_status_t;
++
++    pub fn mx_mmap_device_memory(
++        handle: mx_handle_t,
++        paddr: mx_paddr_t,
++        len: u32,
++        cache_policy: mx_cache_policy_t,
++        out_vaddr: *mut usize
++        ) -> mx_status_t;
++
++    pub fn mx_io_mapping_get_info(
++        handle: mx_handle_t,
++        out_vaddr: *mut usize,
++        out_size: *mut u64
++        ) -> mx_status_t;
++
++    pub fn mx_vmo_create_contiguous(
++        rsrc_handle: mx_handle_t,
++        size: usize,
++        alignment_log2: u32,
++        out: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_bootloader_fb_get_info(
++        format: *mut u32,
++        width: *mut u32,
++        height: *mut u32,
++        stride: *mut u32
++        ) -> mx_status_t;
++
++    pub fn mx_set_framebuffer(
++        handle: mx_handle_t,
++        vaddr: *mut u8,
++        len: u32,
++        format: u32,
++        width: u32,
++        height: u32,
++        stride: u32
++        ) -> mx_status_t;
++
++    pub fn mx_set_framebuffer_vmo(
++        handle: mx_handle_t,
++        vmo: mx_handle_t,
++        len: u32,
++        format: u32,
++        width: u32,
++        height: u32,
++        stride: u32
++        ) -> mx_status_t;
++
++    pub fn mx_clock_adjust(
++        handle: mx_handle_t,
++        clock_id: u32,
++        offset: i64
++        ) -> mx_status_t;
++
++    pub fn mx_pci_get_nth_device(
++        handle: mx_handle_t,
++        index: u32,
++        out_info: *mut mx_pcie_device_info_t
++        ) -> mx_handle_t;
++
++    pub fn mx_pci_enable_bus_master(
++        handle: mx_handle_t,
++        enable: bool
++        ) -> mx_status_t;
++
++    pub fn mx_pci_enable_pio(
++        handle: mx_handle_t,
++        enable: bool
++        ) -> mx_status_t;
++
++    pub fn mx_pci_reset_device(
++        handle: mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_pci_get_bar(
++        handle: mx_handle_t,
++        bar_num: u32,
++        out_bar: *mut mx_pci_resource_t
++        ) -> mx_status_t;
++
++    pub fn mx_pci_get_config(
++        handle: mx_handle_t,
++        out_config: *mut mx_pci_resource_t
++        ) -> mx_status_t;
++
++    pub fn mx_pci_io_write(
++        handle: mx_handle_t,
++        bar_num: u32,
++        offset: u32,
++        len: u32,
++        value: u32
++        ) -> mx_status_t;
++
++    pub fn mx_pci_io_read(
++        handle: mx_handle_t,
++        bar_num: u32,
++        offset: u32,
++        len: u32,
++        out_value: *mut u32
++        ) -> mx_status_t;
++
++    pub fn mx_pci_map_interrupt(
++        handle: mx_handle_t,
++        which_irq: i32,
++        out_handle: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_pci_query_irq_mode_caps(
++        handle: mx_handle_t,
++        mode: u32,
++        out_max_irqs: *mut u32
++        ) -> mx_status_t;
++
++    pub fn mx_pci_set_irq_mode(
++        handle: mx_handle_t,
++        mode: u32,
++        requested_irq_count: u32
++        ) -> mx_status_t;
++
++    pub fn mx_pci_init(
++        handle: mx_handle_t,
++        init_buf: *const mx_pci_init_arg_t,
++        len: u32
++        ) -> mx_status_t;
++
++    pub fn mx_pci_add_subtract_io_range(
++        handle: mx_handle_t,
++        mmio: bool,
++        base: u64,
++        len: u64,
++        add: bool
++        ) -> mx_status_t;
++
++    pub fn mx_acpi_uefi_rsdp(
++        handle: mx_handle_t
++        ) -> u64;
++
++    pub fn mx_acpi_cache_flush(
++        handle: mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_resource_create(
++        parent_handle: mx_handle_t,
++        records: *const mx_rrec_t,
++        count: u32,
++        resource_out: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_resource_destroy(
++        handle: mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_resource_get_handle(
++        handle: mx_handle_t,
++        index: u32,
++        options: u32,
++        out: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_resource_do_action(
++        handle: mx_handle_t,
++        index: u32,
++        action: u32,
++        arg0: u32,
++        arg1: u32
++        ) -> mx_status_t;
++
++    pub fn mx_resource_connect(
++        handle: mx_handle_t,
++        channel: mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_resource_accept(
++        handle: mx_handle_t,
++        channel: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_hypervisor_create(
++        handle: mx_handle_t,
++        options: u32,
++        out: *mut mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_hypervisor_op(
++        handle: mx_handle_t,
++        opcode: u32,
++        args: *const u8,
++        args_len: u32,
++        result: *mut u8,
++        result_len: u32
++        ) -> mx_status_t;
++
++    pub fn mx_system_mexec(
++        kernel: mx_handle_t,
++        bootimage: mx_handle_t
++        ) -> mx_status_t;
++
++    pub fn mx_syscall_test_0(
++        ) -> mx_status_t;
++
++    pub fn mx_syscall_test_1(
++        a: isize
++        ) -> mx_status_t;
++
++    pub fn mx_syscall_test_2(
++        a: isize,
++        b: isize
++        ) -> mx_status_t;
++
++    pub fn mx_syscall_test_3(
++        a: isize,
++        b: isize,
++        c: isize
++        ) -> mx_status_t;
++
++    pub fn mx_syscall_test_4(
++        a: isize,
++        b: isize,
++        c: isize,
++        d: isize
++        ) -> mx_status_t;
++
++    pub fn mx_syscall_test_5(
++        a: isize,
++        b: isize,
++        c: isize,
++        d: isize,
++        e: isize
++        ) -> mx_status_t;
++
++    pub fn mx_syscall_test_6(
++        a: isize,
++        b: isize,
++        c: isize,
++        d: isize,
++        e: isize,
++        f: isize
++        ) -> mx_status_t;
++
++    pub fn mx_syscall_test_7(
++        a: isize,
++        b: isize,
++        c: isize,
++        d: isize,
++        e: isize,
++        f: isize,
++        g: isize
++        ) -> mx_status_t;
++
++    pub fn mx_syscall_test_8(
++        a: isize,
++        b: isize,
++        c: isize,
++        d: isize,
++        e: isize,
++        f: isize,
++        g: isize,
++        h: isize
++        ) -> mx_status_t;
++
++    pub fn mx_syscall_test_wrapper(
++        a: isize,
++        b: isize,
++        c: isize
++        ) -> mx_status_t;
++
++
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9dded6f252c8e05a34464ae4584f4ddd6a7332e5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,330 @@@
++// Copyright 2016 The Fuchsia Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#![allow(non_camel_case_types)]
++
++extern crate core;
++
++#[macro_use]
++extern crate bitflags;
++
++pub type mx_handle_t = i32;
++
++pub type mx_status_t = i32;
++
++pub type mx_futex_t = isize;
++pub type mx_paddr_t = usize;
++
++// Auto-generated using tools/gen_status.py
++pub const MX_OK                    : mx_status_t = 0;
++pub const MX_ERR_INTERNAL          : mx_status_t = -1;
++pub const MX_ERR_NOT_SUPPORTED     : mx_status_t = -2;
++pub const MX_ERR_NO_RESOURCES      : mx_status_t = -3;
++pub const MX_ERR_NO_MEMORY         : mx_status_t = -4;
++pub const MX_ERR_CALL_FAILED       : mx_status_t = -5;
++pub const MX_ERR_INTERRUPTED_RETRY : mx_status_t = -6;
++pub const MX_ERR_INVALID_ARGS      : mx_status_t = -10;
++pub const MX_ERR_BAD_HANDLE        : mx_status_t = -11;
++pub const MX_ERR_WRONG_TYPE        : mx_status_t = -12;
++pub const MX_ERR_BAD_SYSCALL       : mx_status_t = -13;
++pub const MX_ERR_OUT_OF_RANGE      : mx_status_t = -14;
++pub const MX_ERR_BUFFER_TOO_SMALL  : mx_status_t = -15;
++pub const MX_ERR_BAD_STATE         : mx_status_t = -20;
++pub const MX_ERR_TIMED_OUT         : mx_status_t = -21;
++pub const MX_ERR_SHOULD_WAIT       : mx_status_t = -22;
++pub const MX_ERR_CANCELED          : mx_status_t = -23;
++pub const MX_ERR_PEER_CLOSED       : mx_status_t = -24;
++pub const MX_ERR_NOT_FOUND         : mx_status_t = -25;
++pub const MX_ERR_ALREADY_EXISTS    : mx_status_t = -26;
++pub const MX_ERR_ALREADY_BOUND     : mx_status_t = -27;
++pub const MX_ERR_UNAVAILABLE       : mx_status_t = -28;
++pub const MX_ERR_ACCESS_DENIED     : mx_status_t = -30;
++pub const MX_ERR_IO                : mx_status_t = -40;
++pub const MX_ERR_IO_REFUSED        : mx_status_t = -41;
++pub const MX_ERR_IO_DATA_INTEGRITY : mx_status_t = -42;
++pub const MX_ERR_IO_DATA_LOSS      : mx_status_t = -43;
++pub const MX_ERR_BAD_PATH          : mx_status_t = -50;
++pub const MX_ERR_NOT_DIR           : mx_status_t = -51;
++pub const MX_ERR_NOT_FILE          : mx_status_t = -52;
++pub const MX_ERR_FILE_BIG          : mx_status_t = -53;
++pub const MX_ERR_NO_SPACE          : mx_status_t = -54;
++pub const MX_ERR_STOP              : mx_status_t = -60;
++pub const MX_ERR_NEXT              : mx_status_t = -61;
++
++pub type mx_time_t = u64;
++pub type mx_duration_t = u64;
++pub const MX_TIME_INFINITE : mx_time_t = core::u64::MAX;
++
++bitflags! {
++    #[repr(C)]
++    pub flags mx_signals_t: u32 {
++        const MX_SIGNAL_NONE              = 0,
++        const MX_OBJECT_SIGNAL_ALL        = 0x00ffffff,
++        const MX_USER_SIGNAL_ALL          = 0xff000000,
++        const MX_OBJECT_SIGNAL_0          = 1 << 0,
++        const MX_OBJECT_SIGNAL_1          = 1 << 1,
++        const MX_OBJECT_SIGNAL_2          = 1 << 2,
++        const MX_OBJECT_SIGNAL_3          = 1 << 3,
++        const MX_OBJECT_SIGNAL_4          = 1 << 4,
++        const MX_OBJECT_SIGNAL_5          = 1 << 5,
++        const MX_OBJECT_SIGNAL_6          = 1 << 6,
++        const MX_OBJECT_SIGNAL_7          = 1 << 7,
++        const MX_OBJECT_SIGNAL_8          = 1 << 8,
++        const MX_OBJECT_SIGNAL_9          = 1 << 9,
++        const MX_OBJECT_SIGNAL_10         = 1 << 10,
++        const MX_OBJECT_SIGNAL_11         = 1 << 11,
++        const MX_OBJECT_SIGNAL_12         = 1 << 12,
++        const MX_OBJECT_SIGNAL_13         = 1 << 13,
++        const MX_OBJECT_SIGNAL_14         = 1 << 14,
++        const MX_OBJECT_SIGNAL_15         = 1 << 15,
++        const MX_OBJECT_SIGNAL_16         = 1 << 16,
++        const MX_OBJECT_SIGNAL_17         = 1 << 17,
++        const MX_OBJECT_SIGNAL_18         = 1 << 18,
++        const MX_OBJECT_SIGNAL_19         = 1 << 19,
++        const MX_OBJECT_SIGNAL_20         = 1 << 20,
++        const MX_OBJECT_SIGNAL_21         = 1 << 21,
++        const MX_OBJECT_LAST_HANDLE       = 1 << 22,
++        const MX_OBJECT_HANDLE_CLOSED     = 1 << 23,
++        const MX_USER_SIGNAL_0            = 1 << 24,
++        const MX_USER_SIGNAL_1            = 1 << 25,
++        const MX_USER_SIGNAL_2            = 1 << 26,
++        const MX_USER_SIGNAL_3            = 1 << 27,
++        const MX_USER_SIGNAL_4            = 1 << 28,
++        const MX_USER_SIGNAL_5            = 1 << 29,
++        const MX_USER_SIGNAL_6            = 1 << 30,
++        const MX_USER_SIGNAL_7            = 1 << 31,
++
++        const MX_OBJECT_READABLE          = MX_OBJECT_SIGNAL_0.bits,
++        const MX_OBJECT_WRITABLE          = MX_OBJECT_SIGNAL_1.bits,
++        const MX_OBJECT_PEER_CLOSED       = MX_OBJECT_SIGNAL_2.bits,
++
++        // Cancelation (handle was closed while waiting with it)
++        const MX_SIGNAL_HANDLE_CLOSED     = MX_OBJECT_HANDLE_CLOSED.bits,
++
++        // Only one user-more reference (handle) to the object exists.
++        const MX_SIGNAL_LAST_HANDLE       = MX_OBJECT_LAST_HANDLE.bits,
++
++        // Event
++        const MX_EVENT_SIGNALED           = MX_OBJECT_SIGNAL_3.bits,
++
++        // EventPair
++        const MX_EPAIR_SIGNALED           = MX_OBJECT_SIGNAL_3.bits,
++        const MX_EPAIR_CLOSED             = MX_OBJECT_SIGNAL_2.bits,
++
++        // Task signals (process, thread, job)
++        const MX_TASK_TERMINATED          = MX_OBJECT_SIGNAL_3.bits,
++
++        // Channel
++        const MX_CHANNEL_READABLE         = MX_OBJECT_SIGNAL_0.bits,
++        const MX_CHANNEL_WRITABLE         = MX_OBJECT_SIGNAL_1.bits,
++        const MX_CHANNEL_PEER_CLOSED      = MX_OBJECT_SIGNAL_2.bits,
++
++        // Socket
++        const MX_SOCKET_READABLE          = MX_OBJECT_SIGNAL_0.bits,
++        const MX_SOCKET_WRITABLE          = MX_OBJECT_SIGNAL_1.bits,
++        const MX_SOCKET_PEER_CLOSED       = MX_OBJECT_SIGNAL_2.bits,
++
++        // Port
++        const MX_PORT_READABLE            = MX_OBJECT_READABLE.bits,
++
++        // Resource
++        const MX_RESOURCE_DESTROYED       = MX_OBJECT_SIGNAL_3.bits,
++        const MX_RESOURCE_READABLE        = MX_OBJECT_READABLE.bits,
++        const MX_RESOURCE_WRITABLE        = MX_OBJECT_WRITABLE.bits,
++        const MX_RESOURCE_CHILD_ADDED     = MX_OBJECT_SIGNAL_4.bits,
++
++        // Fifo
++        const MX_FIFO_READABLE            = MX_OBJECT_READABLE.bits,
++        const MX_FIFO_WRITABLE            = MX_OBJECT_WRITABLE.bits,
++        const MX_FIFO_PEER_CLOSED         = MX_OBJECT_PEER_CLOSED.bits,
++
++        // Job
++        const MX_JOB_NO_PROCESSES         = MX_OBJECT_SIGNAL_3.bits,
++        const MX_JOB_NO_JOBS              = MX_OBJECT_SIGNAL_4.bits,
++
++        // Process
++        const MX_PROCESS_TERMINATED       = MX_OBJECT_SIGNAL_3.bits,
++
++        // Thread
++        const MX_THREAD_TERMINATED        = MX_OBJECT_SIGNAL_3.bits,
++
++        // Log
++        const MX_LOG_READABLE             = MX_OBJECT_READABLE.bits,
++        const MX_LOG_WRITABLE             = MX_OBJECT_WRITABLE.bits,
++
++        // Timer
++        const MX_TIMER_SIGNALED           = MX_OBJECT_SIGNAL_3.bits,
++    }
++}
++
++pub type mx_size_t = usize;
++pub type mx_ssize_t = isize;
++
++bitflags! {
++    #[repr(C)]
++    pub flags mx_rights_t: u32 {
++        const MX_RIGHT_NONE         = 0,
++        const MX_RIGHT_DUPLICATE    = 1 << 0,
++        const MX_RIGHT_TRANSFER     = 1 << 1,
++        const MX_RIGHT_READ         = 1 << 2,
++        const MX_RIGHT_WRITE        = 1 << 3,
++        const MX_RIGHT_EXECUTE      = 1 << 4,
++        const MX_RIGHT_MAP          = 1 << 5,
++        const MX_RIGHT_GET_PROPERTY = 1 << 6,
++        const MX_RIGHT_SET_PROPERTY = 1 << 7,
++        const MX_RIGHT_DEBUG        = 1 << 8,
++        const MX_RIGHT_SAME_RIGHTS  = 1 << 31,
++    }
++}
++
++// clock ids
++pub const MX_CLOCK_MONOTONIC: u32 = 0;
++
++// Buffer size limits on the cprng syscalls
++pub const MX_CPRNG_DRAW_MAX_LEN: usize = 256;
++pub const MX_CPRNG_ADD_ENTROPY_MAX_LEN: usize = 256;
++
++// Socket flags and limits.
++pub const MX_SOCKET_HALF_CLOSE: u32 = 1;
++
++// VM Object opcodes
++pub const MX_VMO_OP_COMMIT: u32 = 1;
++pub const MX_VMO_OP_DECOMMIT: u32 = 2;
++pub const MX_VMO_OP_LOCK: u32 = 3;
++pub const MX_VMO_OP_UNLOCK: u32 = 4;
++pub const MX_VMO_OP_LOOKUP: u32 = 5;
++pub const MX_VMO_OP_CACHE_SYNC: u32 = 6;
++pub const MX_VMO_OP_CACHE_INVALIDATE: u32 = 7;
++pub const MX_VMO_OP_CACHE_CLEAN: u32 = 8;
++pub const MX_VMO_OP_CACHE_CLEAN_INVALIDATE: u32 = 9;
++
++// VM Object clone flags
++pub const MX_VMO_CLONE_COPY_ON_WRITE: u32 = 1;
++
++#[repr(C)]
++#[derive(Debug, Copy, Clone, Eq, PartialEq)]
++pub enum mx_cache_policy_t {
++    MX_CACHE_POLICY_CACHED = 0,
++    MX_CACHE_POLICY_UNCACHED = 1,
++    MX_CACHE_POLICY_UNCACHED_DEVICE = 2,
++    MX_CACHE_POLICY_WRITE_COMBINING = 3,
++}
++
++#[repr(C)]
++pub struct mx_wait_item_t {
++    pub handle: mx_handle_t,
++    pub waitfor: mx_signals_t,
++    pub pending: mx_signals_t,
++}
++
++#[repr(C)]
++pub struct mx_waitset_result_t {
++    pub cookie: u64,
++    pub status: mx_status_t,
++    pub observed: mx_signals_t,
++}
++
++#[repr(C)]
++pub struct mx_channel_call_args_t {
++    pub wr_bytes: *const u8,
++    pub wr_handles: *const mx_handle_t,
++    pub rd_bytes: *mut u8,
++    pub rd_handles: *mut mx_handle_t,
++    pub wr_num_bytes: u32,
++    pub wr_num_handles: u32,
++    pub rd_num_bytes: u32,
++    pub rd_num_handles: u32,
++}
++
++pub type mx_pci_irq_swizzle_lut_t = [[[u32; 4]; 8]; 32];
++
++#[repr(C)]
++pub struct mx_pci_init_arg_t {
++    pub dev_pin_to_global_irq: mx_pci_irq_swizzle_lut_t,
++    pub num_irqs: u32,
++    pub irqs: [mx_irq_t; 32],
++    pub ecam_window_count: u32,
++    // Note: the ecam_windows field is actually a variable size array.
++    // We use a fixed size array to match the C repr.
++    pub ecam_windows: [mx_ecam_window_t; 1],
++}
++
++#[repr(C)]
++pub struct mx_irq_t {
++    pub global_irq: u32,
++    pub level_triggered: bool,
++    pub active_high: bool,
++}
++
++#[repr(C)]
++pub struct mx_ecam_window_t {
++    pub base: u64,
++    pub size: usize,
++    pub bus_start: u8,
++    pub bus_end: u8,
++}
++
++#[repr(C)]
++pub struct mx_pcie_device_info_t {
++    pub vendor_id: u16,
++    pub device_id: u16,
++    pub base_class: u8,
++    pub sub_class: u8,
++    pub program_interface: u8,
++    pub revision_id: u8,
++    pub bus_id: u8,
++    pub dev_id: u8,
++    pub func_id: u8,
++}
++
++#[repr(C)]
++pub struct mx_pci_resource_t {
++    pub type_: u32,
++    pub size: usize,
++    // TODO: Actually a union
++    pub pio_addr: usize,
++}
++
++// TODO: Actually a union
++pub type mx_rrec_t = [u8; 64];
++
++// Ports V2
++#[repr(u32)]
++#[derive(Debug, Copy, Clone, Eq, PartialEq)]
++pub enum mx_packet_type_t {
++    MX_PKT_TYPE_USER = 0,
++    MX_PKT_TYPE_SIGNAL_ONE = 1,
++    MX_PKT_TYPE_SIGNAL_REP = 2,
++}
++
++impl Default for mx_packet_type_t {
++    fn default() -> Self {
++        mx_packet_type_t::MX_PKT_TYPE_USER
++    }
++}
++
++#[repr(C)]
++#[derive(Debug, Copy, Clone)]
++pub struct mx_packet_signal_t {
++    pub trigger: mx_signals_t,
++    pub observed: mx_signals_t,
++    pub count: u64,
++}
++
++pub const MX_WAIT_ASYNC_ONCE: u32 = 0;
++pub const MX_WAIT_ASYNC_REPEATING: u32 = 1;
++
++// Actually a union of different integer types, but this should be good enough.
++pub type mx_packet_user_t = [u8; 32];
++
++#[repr(C)]
++#[derive(Debug, Default, Copy, Clone, Eq, PartialEq)]
++pub struct mx_port_packet_t {
++    pub key: u64,
++    pub packet_type: mx_packet_type_t,
++    pub status: i32,
++    pub union: [u8; 32],
++}
++
++include!("definitions.rs");
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e8b26414dd0923f1c33d71e20ad837b56f873281
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"a311b77ebdc5dd4cf6449d81e4135d9f0e3b153839ac90e648a8ef538f923525"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3e44b2e164b7b06b34f38865d67be42a080820e5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++language: rust
++rust:
++  - 1.8.0
++  - 1.15.0
++  - beta
++  - nightly
++sudo: false
++script:
++  - cargo build --verbose
++  - ./ci/test_full.sh
++  - cargo doc
++after_success: |
++  [ $TRAVIS_BRANCH = master ] &&
++  [ $TRAVIS_PULL_REQUEST = false ] &&
++  [ $TRAVIS_RUST_VERSION = nightly ] &&
++  ssh-agent ./ci/deploy.sh
++notifications:
++  email:
++    on_success: never
++branches:
++  only:
++    - master
++    - next
++    - staging
++    - trying
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1c63d4fe4030fa173ffb193200888f99dab2d655
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,70 @@@
++[package]
++authors = ["The Rust Project Developers"]
++description = "A collection of numeric types and traits for Rust, including bigint,\ncomplex, rational, range iterators, generic integers, and more!\n"
++documentation = "http://rust-num.github.io/num"
++homepage = "https://github.com/rust-num/num"
++keywords = ["mathematics", "numerics", "bignum"]
++categories = [ "algorithms", "data-structures", "science" ]
++license = "MIT/Apache-2.0"
++repository = "https://github.com/rust-num/num"
++name = "num"
++version = "0.1.40"
++
++[[bench]]
++name = "bigint"
++
++[[bench]]
++harness = false
++name = "shootout-pidigits"
++
++[dependencies]
++
++[dependencies.num-bigint]
++optional = true
++path = "bigint"
++version = "0.1.40"
++
++[dependencies.num-complex]
++optional = true
++path = "complex"
++version = "0.1.39"
++
++[dependencies.num-integer]
++path = "./integer"
++version = "0.1.35"
++
++[dependencies.num-iter]
++optional = false
++path = "iter"
++version = "0.1.34"
++
++[dependencies.num-rational]
++optional = true
++path = "rational"
++version = "0.1.39"
++
++[dependencies.num-traits]
++path = "./traits"
++version = "0.1.40"
++
++[dev-dependencies]
++
++[dev-dependencies.rand]
++version = "0.3.8"
++
++[features]
++bigint = ["num-bigint"]
++complex = ["num-complex"]
++rational = ["num-rational"]
++default = ["bigint", "complex", "rational", "rustc-serialize"]
++
++serde = [
++  "num-bigint/serde",
++  "num-complex/serde",
++  "num-rational/serde"
++]
++rustc-serialize = [
++  "num-bigint/rustc-serialize",
++  "num-complex/rustc-serialize",
++  "num-rational/rustc-serialize"
++]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16fe87b06e802f094b3fbb0894b137bca2b16ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++                              Apache License
++                        Version 2.0, January 2004
++                     http://www.apache.org/licenses/
++
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++1. Definitions.
++
++   "License" shall mean the terms and conditions for use, reproduction,
++   and distribution as defined by Sections 1 through 9 of this document.
++
++   "Licensor" shall mean the copyright owner or entity authorized by
++   the copyright owner that is granting the License.
++
++   "Legal Entity" shall mean the union of the acting entity and all
++   other entities that control, are controlled by, or are under common
++   control with that entity. For the purposes of this definition,
++   "control" means (i) the power, direct or indirect, to cause the
++   direction or management of such entity, whether by contract or
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the
++   outstanding shares, or (iii) beneficial ownership of such entity.
++
++   "You" (or "Your") shall mean an individual or Legal Entity
++   exercising permissions granted by this License.
++
++   "Source" form shall mean the preferred form for making modifications,
++   including but not limited to software source code, documentation
++   source, and configuration files.
++
++   "Object" form shall mean any form resulting from mechanical
++   transformation or translation of a Source form, including but
++   not limited to compiled object code, generated documentation,
++   and conversions to other media types.
++
++   "Work" shall mean the work of authorship, whether in Source or
++   Object form, made available under the License, as indicated by a
++   copyright notice that is included in or attached to the work
++   (an example is provided in the Appendix below).
++
++   "Derivative Works" shall mean any work, whether in Source or Object
++   form, that is based on (or derived from) the Work and for which the
++   editorial revisions, annotations, elaborations, or other modifications
++   represent, as a whole, an original work of authorship. For the purposes
++   of this License, Derivative Works shall not include works that remain
++   separable from, or merely link (or bind by name) to the interfaces of,
++   the Work and Derivative Works thereof.
++
++   "Contribution" shall mean any work of authorship, including
++   the original version of the Work and any modifications or additions
++   to that Work or Derivative Works thereof, that is intentionally
++   submitted to Licensor for inclusion in the Work by the copyright owner
++   or by an individual or Legal Entity authorized to submit on behalf of
++   the copyright owner. For the purposes of this definition, "submitted"
++   means any form of electronic, verbal, or written communication sent
++   to the Licensor or its representatives, including but not limited to
++   communication on electronic mailing lists, source code control systems,
++   and issue tracking systems that are managed by, or on behalf of, the
++   Licensor for the purpose of discussing and improving the Work, but
++   excluding communication that is conspicuously marked or otherwise
++   designated in writing by the copyright owner as "Not a Contribution."
++
++   "Contributor" shall mean Licensor and any individual or Legal Entity
++   on behalf of whom a Contribution has been received by Licensor and
++   subsequently incorporated within the Work.
++
++2. Grant of Copyright License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   copyright license to reproduce, prepare Derivative Works of,
++   publicly display, publicly perform, sublicense, and distribute the
++   Work and such Derivative Works in Source or Object form.
++
++3. Grant of Patent License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   (except as stated in this section) patent license to make, have made,
++   use, offer to sell, sell, import, and otherwise transfer the Work,
++   where such license applies only to those patent claims licensable
++   by such Contributor that are necessarily infringed by their
++   Contribution(s) alone or by combination of their Contribution(s)
++   with the Work to which such Contribution(s) was submitted. If You
++   institute patent litigation against any entity (including a
++   cross-claim or counterclaim in a lawsuit) alleging that the Work
++   or a Contribution incorporated within the Work constitutes direct
++   or contributory patent infringement, then any patent licenses
++   granted to You under this License for that Work shall terminate
++   as of the date such litigation is filed.
++
++4. Redistribution. You may reproduce and distribute copies of the
++   Work or Derivative Works thereof in any medium, with or without
++   modifications, and in Source or Object form, provided that You
++   meet the following conditions:
++
++   (a) You must give any other recipients of the Work or
++       Derivative Works a copy of this License; and
++
++   (b) You must cause any modified files to carry prominent notices
++       stating that You changed the files; and
++
++   (c) You must retain, in the Source form of any Derivative Works
++       that You distribute, all copyright, patent, trademark, and
++       attribution notices from the Source form of the Work,
++       excluding those notices that do not pertain to any part of
++       the Derivative Works; and
++
++   (d) If the Work includes a "NOTICE" text file as part of its
++       distribution, then any Derivative Works that You distribute must
++       include a readable copy of the attribution notices contained
++       within such NOTICE file, excluding those notices that do not
++       pertain to any part of the Derivative Works, in at least one
++       of the following places: within a NOTICE text file distributed
++       as part of the Derivative Works; within the Source form or
++       documentation, if provided along with the Derivative Works; or,
++       within a display generated by the Derivative Works, if and
++       wherever such third-party notices normally appear. The contents
++       of the NOTICE file are for informational purposes only and
++       do not modify the License. You may add Your own attribution
++       notices within Derivative Works that You distribute, alongside
++       or as an addendum to the NOTICE text from the Work, provided
++       that such additional attribution notices cannot be construed
++       as modifying the License.
++
++   You may add Your own copyright statement to Your modifications and
++   may provide additional or different license terms and conditions
++   for use, reproduction, or distribution of Your modifications, or
++   for any such Derivative Works as a whole, provided Your use,
++   reproduction, and distribution of the Work otherwise complies with
++   the conditions stated in this License.
++
++5. Submission of Contributions. Unless You explicitly state otherwise,
++   any Contribution intentionally submitted for inclusion in the Work
++   by You to the Licensor shall be under the terms and conditions of
++   this License, without any additional terms or conditions.
++   Notwithstanding the above, nothing herein shall supersede or modify
++   the terms of any separate license agreement you may have executed
++   with Licensor regarding such Contributions.
++
++6. Trademarks. This License does not grant permission to use the trade
++   names, trademarks, service marks, or product names of the Licensor,
++   except as required for reasonable and customary use in describing the
++   origin of the Work and reproducing the content of the NOTICE file.
++
++7. Disclaimer of Warranty. Unless required by applicable law or
++   agreed to in writing, Licensor provides the Work (and each
++   Contributor provides its Contributions) on an "AS IS" BASIS,
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++   implied, including, without limitation, any warranties or conditions
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++   PARTICULAR PURPOSE. You are solely responsible for determining the
++   appropriateness of using or redistributing the Work and assume any
++   risks associated with Your exercise of permissions under this License.
++
++8. Limitation of Liability. In no event and under no legal theory,
++   whether in tort (including negligence), contract, or otherwise,
++   unless required by applicable law (such as deliberate and grossly
++   negligent acts) or agreed to in writing, shall any Contributor be
++   liable to You for damages, including any direct, indirect, special,
++   incidental, or consequential damages of any character arising as a
++   result of this License or out of the use or inability to use the
++   Work (including but not limited to damages for loss of goodwill,
++   work stoppage, computer failure or malfunction, or any and all
++   other commercial damages or losses), even if such Contributor
++   has been advised of the possibility of such damages.
++
++9. Accepting Warranty or Additional Liability. While redistributing
++   the Work or Derivative Works thereof, You may choose to offer,
++   and charge a fee for, acceptance of support, warranty, indemnity,
++   or other liability obligations and/or rights consistent with this
++   License. However, in accepting such obligations, You may act only
++   on Your own behalf and on Your sole responsibility, not on behalf
++   of any other Contributor, and only if You agree to indemnify,
++   defend, and hold each Contributor harmless for any liability
++   incurred by, or claims asserted against, such Contributor by reason
++   of your accepting any such warranty or additional liability.
++
++END OF TERMS AND CONDITIONS
++
++APPENDIX: How to apply the Apache License to your work.
++
++   To apply the Apache License to your work, attach the following
++   boilerplate notice, with the fields enclosed by brackets "[]"
++   replaced with your own identifying information. (Don't include
++   the brackets!)  The text should be enclosed in the appropriate
++   comment syntax for the file format. We also recommend that a
++   file or class name and description of purpose be included on the
++   same "printed page" as the copyright notice for easier
++   identification within third-party archives.
++
++Copyright [yyyy] [name of copyright owner]
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++      http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39d4bdb5acd313c1a92dbeaa1c379aaf0596a315
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2014 The Rust Project Developers
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..766efc314794d136a400729d1b7e6ee6e3d4f516
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++# num
++
++A collection of numeric types and traits for Rust.
++
++This includes new types for big integers, rationals, and complex numbers,
++new traits for generic programming on numeric properties like `Integer`,
++and generic range iterators.
++
++[Documentation](http://rust-num.github.io/num)
++
++## Usage
++
++Add this to your `Cargo.toml`:
++
++```toml
++[dependencies]
++num = "0.1"
++```
++
++and this to your crate root:
++
++```rust
++extern crate num;
++```
++
++## Compatibility
++
++Most of the `num` crates are tested for rustc 1.8 and greater.
++The exceptions are `num-derive` which requires at least rustc 1.15,
++and the deprecated `num-macros` which requires nightly rustc.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..30522d5c9777f7467b60e92e9290bf8cd9d56a20
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,252 @@@
++#![feature(test)]
++
++extern crate test;
++extern crate num;
++extern crate rand;
++
++use std::mem::replace;
++use test::Bencher;
++use num::{BigInt, BigUint, Zero, One, FromPrimitive};
++use num::bigint::RandBigInt;
++use rand::{SeedableRng, StdRng};
++
++fn get_rng() -> StdRng {
++    let seed: &[_] = &[1, 2, 3, 4];
++    SeedableRng::from_seed(seed)
++}
++
++fn multiply_bench(b: &mut Bencher, xbits: usize, ybits: usize) {
++    let mut rng = get_rng();
++    let x = rng.gen_bigint(xbits);
++    let y = rng.gen_bigint(ybits);
++
++    b.iter(|| &x * &y);
++}
++
++fn divide_bench(b: &mut Bencher, xbits: usize, ybits: usize) {
++    let mut rng = get_rng();
++    let x = rng.gen_bigint(xbits);
++    let y = rng.gen_bigint(ybits);
++
++    b.iter(|| &x / &y);
++}
++
++fn factorial(n: usize) -> BigUint {
++    let mut f: BigUint = One::one();
++    for i in 1..(n+1) {
++        let bu: BigUint = FromPrimitive::from_usize(i).unwrap();
++        f = f * bu;
++    }
++    f
++}
++
++/// Compute Fibonacci numbers
++fn fib(n: usize) -> BigUint {
++    let mut f0: BigUint = Zero::zero();
++    let mut f1: BigUint = One::one();
++    for _ in 0..n {
++        let f2 = f0 + &f1;
++        f0 = replace(&mut f1, f2);
++    }
++    f0
++}
++
++/// Compute Fibonacci numbers with two ops per iteration
++/// (add and subtract, like issue #200)
++fn fib2(n: usize) -> BigUint {
++    let mut f0: BigUint = Zero::zero();
++    let mut f1: BigUint = One::one();
++    for _ in 0..n {
++        f1 = f1 + &f0;
++        f0 = &f1 - f0;
++    }
++    f0
++}
++
++#[bench]
++fn multiply_0(b: &mut Bencher) {
++    multiply_bench(b, 1 << 8, 1 << 8);
++}
++
++#[bench]
++fn multiply_1(b: &mut Bencher) {
++    multiply_bench(b, 1 << 8, 1 << 16);
++}
++
++#[bench]
++fn multiply_2(b: &mut Bencher) {
++    multiply_bench(b, 1 << 16, 1 << 16);
++}
++
++#[bench]
++fn divide_0(b: &mut Bencher) {
++    divide_bench(b, 1 << 8, 1 << 6);
++}
++
++#[bench]
++fn divide_1(b: &mut Bencher) {
++    divide_bench(b, 1 << 12, 1 << 8);
++}
++
++#[bench]
++fn divide_2(b: &mut Bencher) {
++    divide_bench(b, 1 << 16, 1 << 12);
++}
++
++#[bench]
++fn factorial_100(b: &mut Bencher) {
++    b.iter(|| factorial(100));
++}
++
++#[bench]
++fn fib_100(b: &mut Bencher) {
++    b.iter(|| fib(100));
++}
++
++#[bench]
++fn fib_1000(b: &mut Bencher) {
++    b.iter(|| fib(1000));
++}
++
++#[bench]
++fn fib_10000(b: &mut Bencher) {
++    b.iter(|| fib(10000));
++}
++
++#[bench]
++fn fib2_100(b: &mut Bencher) {
++    b.iter(|| fib2(100));
++}
++
++#[bench]
++fn fib2_1000(b: &mut Bencher) {
++    b.iter(|| fib2(1000));
++}
++
++#[bench]
++fn fib2_10000(b: &mut Bencher) {
++    b.iter(|| fib2(10000));
++}
++
++#[bench]
++fn fac_to_string(b: &mut Bencher) {
++    let fac = factorial(100);
++    b.iter(|| fac.to_string());
++}
++
++#[bench]
++fn fib_to_string(b: &mut Bencher) {
++    let fib = fib(100);
++    b.iter(|| fib.to_string());
++}
++
++fn to_str_radix_bench(b: &mut Bencher, radix: u32) {
++    let mut rng = get_rng();
++    let x = rng.gen_bigint(1009);
++    b.iter(|| x.to_str_radix(radix));
++}
++
++#[bench]
++fn to_str_radix_02(b: &mut Bencher) {
++    to_str_radix_bench(b, 2);
++}
++
++#[bench]
++fn to_str_radix_08(b: &mut Bencher) {
++    to_str_radix_bench(b, 8);
++}
++
++#[bench]
++fn to_str_radix_10(b: &mut Bencher) {
++    to_str_radix_bench(b, 10);
++}
++
++#[bench]
++fn to_str_radix_16(b: &mut Bencher) {
++    to_str_radix_bench(b, 16);
++}
++
++#[bench]
++fn to_str_radix_36(b: &mut Bencher) {
++    to_str_radix_bench(b, 36);
++}
++
++fn from_str_radix_bench(b: &mut Bencher, radix: u32) {
++    use num::Num;
++    let mut rng = get_rng();
++    let x = rng.gen_bigint(1009);
++    let s = x.to_str_radix(radix);
++    assert_eq!(x, BigInt::from_str_radix(&s, radix).unwrap());
++    b.iter(|| BigInt::from_str_radix(&s, radix));
++}
++
++#[bench]
++fn from_str_radix_02(b: &mut Bencher) {
++    from_str_radix_bench(b, 2);
++}
++
++#[bench]
++fn from_str_radix_08(b: &mut Bencher) {
++    from_str_radix_bench(b, 8);
++}
++
++#[bench]
++fn from_str_radix_10(b: &mut Bencher) {
++    from_str_radix_bench(b, 10);
++}
++
++#[bench]
++fn from_str_radix_16(b: &mut Bencher) {
++    from_str_radix_bench(b, 16);
++}
++
++#[bench]
++fn from_str_radix_36(b: &mut Bencher) {
++    from_str_radix_bench(b, 36);
++}
++
++#[bench]
++fn shl(b: &mut Bencher) {
++    let n = BigUint::one() << 1000;
++    b.iter(|| {
++        let mut m = n.clone();
++        for i in 0..50 {
++            m = m << i;
++        }
++    })
++}
++
++#[bench]
++fn shr(b: &mut Bencher) {
++    let n = BigUint::one() << 2000;
++    b.iter(|| {
++        let mut m = n.clone();
++        for i in 0..50 {
++            m = m >> i;
++        }
++    })
++}
++
++#[bench]
++fn hash(b: &mut Bencher) {
++    use std::collections::HashSet;
++    let mut rng = get_rng();
++    let v: Vec<BigInt> = (1000..2000).map(|bits| rng.gen_bigint(bits)).collect();
++    b.iter(|| {
++        let h: HashSet<&BigInt> = v.iter().collect();
++        assert_eq!(h.len(), v.len());
++    });
++}
++
++#[bench]
++fn pow_bench(b: &mut Bencher) {
++    b.iter(|| {
++        let upper = 100_usize;
++        for i in 2..upper + 1 {
++            for j in 2..upper + 1 {
++                let i_big = BigUint::from_usize(i).unwrap();
++                num::pow(i_big, j);
++            }
++        }
++    });
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2cdcbda134e9cb0f9b3098ed6f7c46548e83ac76
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,131 @@@
++// The Computer Language Benchmarks Game
++// http://benchmarksgame.alioth.debian.org/
++//
++// contributed by the Rust Project Developers
++
++// Copyright (c) 2013-2014 The Rust Project Developers
++//
++// All rights reserved.
++//
++// Redistribution and use in source and binary forms, with or without
++// modification, are permitted provided that the following conditions
++// are met:
++//
++// - Redistributions of source code must retain the above copyright
++//   notice, this list of conditions and the following disclaimer.
++//
++// - Redistributions in binary form must reproduce the above copyright
++//   notice, this list of conditions and the following disclaimer in
++//   the documentation and/or other materials provided with the
++//   distribution.
++//
++// - Neither the name of "The Computer Language Benchmarks Game" nor
++//   the name of "The Computer Language Shootout Benchmarks" nor the
++//   names of its contributors may be used to endorse or promote
++//   products derived from this software without specific prior
++//   written permission.
++//
++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
++// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
++// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
++// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
++// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
++// OF THE POSSIBILITY OF SUCH DAMAGE.
++
++extern crate num;
++
++use std::str::FromStr;
++use std::io;
++
++use num::traits::{FromPrimitive, ToPrimitive};
++use num::{BigInt, Integer, One, Zero};
++
++struct Context {
++    numer: BigInt,
++    accum: BigInt,
++    denom: BigInt,
++}
++
++impl Context {
++    fn new() -> Context {
++        Context {
++            numer: One::one(),
++            accum: Zero::zero(),
++            denom: One::one(),
++        }
++    }
++
++    fn from_i32(i: i32) -> BigInt {
++        FromPrimitive::from_i32(i).unwrap()
++    }
++
++    fn extract_digit(&self) -> i32 {
++        if self.numer > self.accum {return -1;}
++        let (q, r) =
++            (&self.numer * Context::from_i32(3) + &self.accum)
++            .div_rem(&self.denom);
++        if r + &self.numer >= self.denom {return -1;}
++        q.to_i32().unwrap()
++    }
++
++    fn next_term(&mut self, k: i32) {
++        let y2 = Context::from_i32(k * 2 + 1);
++        self.accum = (&self.accum + (&self.numer << 1)) * &y2;
++        self.numer = &self.numer * Context::from_i32(k);
++        self.denom = &self.denom * y2;
++    }
++
++    fn eliminate_digit(&mut self, d: i32) {
++        let d = Context::from_i32(d);
++        let ten = Context::from_i32(10);
++        self.accum = (&self.accum - &self.denom * d) * &ten;
++        self.numer = &self.numer * ten;
++    }
++}
++
++fn pidigits(n: isize, out: &mut io::Write) -> io::Result<()> {
++    let mut k = 0;
++    let mut context = Context::new();
++
++    for i in 1..(n+1) {
++        let mut d;
++        loop {
++            k += 1;
++            context.next_term(k);
++            d = context.extract_digit();
++            if d != -1 {break;}
++        }
++
++        try!(write!(out, "{}", d));
++        if i % 10 == 0 { try!(write!(out, "\t:{}\n", i)); }
++
++        context.eliminate_digit(d);
++    }
++
++    let m = n % 10;
++    if m != 0 {
++        for _ in m..10 { try!(write!(out, " ")); }
++        try!(write!(out, "\t:{}\n", n));
++    }
++    Ok(())
++}
++
++const DEFAULT_DIGITS: isize = 512;
++
++fn main() {
++    let args = std::env::args().collect::<Vec<_>>();
++    let n = if args.len() < 2 {
++        DEFAULT_DIGITS
++    } else if args[1] == "--bench" {
++        return pidigits(DEFAULT_DIGITS, &mut std::io::sink()).unwrap()
++    } else {
++        FromStr::from_str(&args[1]).unwrap()
++    };
++    pidigits(n, &mut std::io::stdout()).unwrap();
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ca08e818bf3e37ccfbe2c3658726b54eeb4fa14b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++status = [
++  "continuous-integration/travis-ci/push",
++]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..720d001bc2fbc4dffbd4bcee2bf23e3a3b40bf34
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..02372e21f5d55ff3709c3a1fc41981d6c4dd56dc
new file mode 100755 (executable)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++#!/bin/sh
++
++set -ex
++
++cp doc/* target/doc/
++pip install ghp-import --user
++$HOME/.local/bin/ghp-import -n target/doc
++
++openssl aes-256-cbc -K $encrypted_9e86330b283d_key -iv $encrypted_9e86330b283d_iv -in ./ci/deploy.enc -out ./ci/deploy -d
++chmod 600 ./ci/deploy
++ssh-add ./ci/deploy
++git push -qf ssh://git@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f263dd83acc7fcf2eab7449d874ed2a28a578853
new file mode 100755 (executable)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++#!/bin/sh
++# Use rustup to locally run the same suite of tests as .travis.yml.
++# (You should first install/update 1.8.0, 1.15.0, beta, and nightly.)
++
++set -ex
++
++for toolchain in 1.8.0 1.15.0 beta nightly; do
++    run="rustup run $toolchain"
++    $run cargo build --verbose
++    $run $PWD/ci/test_full.sh $toolchain
++    $run cargo doc
++done
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9a0f2cf6979c823a920c7b18fbfcdb2d38e5161f
new file mode 100755 (executable)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,49 @@@
++#!/bin/bash
++
++set -ex
++
++echo Testing num on rustc ${TRAVIS_RUST_VERSION:=$1}
++
++# All of these packages should build and test everywhere.
++for package in bigint complex integer iter rational traits; do
++  cargo build --manifest-path $package/Cargo.toml
++  cargo test --manifest-path $package/Cargo.toml
++done
++
++# They all should build with minimal features too
++for package in bigint complex integer iter rational traits; do
++  cargo build --manifest-path $package/Cargo.toml --no-default-features
++  cargo test --manifest-path $package/Cargo.toml --no-default-features
++done
++
++# Each isolated feature should also work everywhere.
++for feature in '' bigint rational complex; do
++  cargo build --verbose --no-default-features --features="$feature"
++  cargo test --verbose --no-default-features --features="$feature"
++done
++
++# Build test for the serde feature
++cargo build --verbose --features "serde"
++
++# Downgrade serde and build test the 0.7.0 channel as well
++cargo update -p serde --precise 0.7.0
++cargo build --verbose --features "serde"
++
++
++if [ "$TRAVIS_RUST_VERSION" = 1.8.0 ]; then exit; fi
++
++# num-derive should build on 1.15.0+
++cargo build --verbose --manifest-path=derive/Cargo.toml
++
++
++if [ "$TRAVIS_RUST_VERSION" != nightly ]; then exit; fi
++
++# num-derive testing requires compiletest_rs, which requires nightly
++cargo test --verbose --manifest-path=derive/Cargo.toml
++
++# num-macros only works on nightly, soon to be deprecated
++cargo build --verbose --manifest-path=macros/Cargo.toml
++cargo test --verbose --manifest-path=macros/Cargo.toml
++
++# benchmarks only work on nightly
++cargo bench --verbose
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b8ad23769ac8d06eb5973bfb3d2acbf385240f98
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..99411bdebbe69212218247e9edd478eeecbf57f5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++<meta http-equiv=refresh content=0;url=num/index.html>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..74b4bd695045ebc52c21af95301adc9311ca881c
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8eefb08a2636c51a11a165c13fbad0563462c6ed
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,111 @@@
++// Copyright 2014-2016 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! A collection of numeric types and traits for Rust.
++//!
++//! This includes new types for big integers, rationals, and complex numbers,
++//! new traits for generic programming on numeric properties like `Integer`,
++//! and generic range iterators.
++//!
++//! ## Example
++//!
++//! This example uses the BigRational type and [Newton's method][newt] to
++//! approximate a square root to arbitrary precision:
++//!
++//! ```
++//! extern crate num;
++//! # #[cfg(all(feature = "bigint", feature="rational"))]
++//! # mod test {
++//!
++//! use num::FromPrimitive;
++//! use num::bigint::BigInt;
++//! use num::rational::{Ratio, BigRational};
++//!
++//! # pub
++//! fn approx_sqrt(number: u64, iterations: usize) -> BigRational {
++//!     let start: Ratio<BigInt> = Ratio::from_integer(FromPrimitive::from_u64(number).unwrap());
++//!     let mut approx = start.clone();
++//!
++//!     for _ in 0..iterations {
++//!         approx = (&approx + (&start / &approx)) /
++//!             Ratio::from_integer(FromPrimitive::from_u64(2).unwrap());
++//!     }
++//!
++//!     approx
++//! }
++//! # }
++//! # #[cfg(not(all(feature = "bigint", feature="rational")))]
++//! # mod test { pub fn approx_sqrt(n: u64, _: usize) -> u64 { n } }
++//! # use test::approx_sqrt;
++//!
++//! fn main() {
++//!     println!("{}", approx_sqrt(10, 4)); // prints 4057691201/1283082416
++//! }
++//!
++//! ```
++//!
++//! [newt]: https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method
++#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png",
++       html_favicon_url = "https://rust-num.github.io/num/favicon.ico",
++       html_root_url = "https://rust-num.github.io/num/",
++       html_playground_url = "http://play.integer32.com/")]
++
++extern crate num_traits;
++extern crate num_integer;
++extern crate num_iter;
++#[cfg(feature = "num-complex")]
++extern crate num_complex;
++#[cfg(feature = "num-bigint")]
++extern crate num_bigint;
++#[cfg(feature = "num-rational")]
++extern crate num_rational;
++
++#[cfg(feature = "num-bigint")]
++pub use num_bigint::{BigInt, BigUint};
++#[cfg(feature = "num-rational")]
++pub use num_rational::Rational;
++#[cfg(all(feature = "num-rational", feature="num-bigint"))]
++pub use num_rational::BigRational;
++#[cfg(feature = "num-complex")]
++pub use num_complex::Complex;
++pub use num_integer::Integer;
++pub use num_iter::{range, range_inclusive, range_step, range_step_inclusive};
++pub use num_traits::{Num, Zero, One, Signed, Unsigned, Bounded,
++                     one, zero, abs, abs_sub, signum,
++                     Saturating, CheckedAdd, CheckedSub, CheckedMul, CheckedDiv,
++                     PrimInt, Float, ToPrimitive, FromPrimitive, NumCast, cast,
++                     pow, checked_pow, clamp};
++
++#[cfg(feature = "num-bigint")]
++pub mod bigint {
++    pub use num_bigint::*;
++}
++
++#[cfg(feature = "num-complex")]
++pub mod complex {
++    pub use num_complex::*;
++}
++
++pub mod integer {
++    pub use num_integer::*;
++}
++
++pub mod iter {
++    pub use num_iter::*;
++}
++
++pub mod traits {
++    pub use num_traits::*;
++}
++
++#[cfg(feature = "num-rational")]
++pub mod rational {
++    pub use num_rational::*;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e31a38ab577e08e40241501693c18d714973e70a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"8fd0f8dbb4c0960998958a796281d88c16fbe68d87b1baa6f31e2979e81fd0bd"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7195c7f336f147a2a2edf6680953d6710fb33cb1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,39 @@@
++[package]
++authors = ["The Rust Project Developers"]
++description = "Big integer implementation for Rust"
++documentation = "http://rust-num.github.io/num"
++homepage = "https://github.com/rust-num/num"
++keywords = ["mathematics", "numerics", "bignum"]
++categories = [ "algorithms", "data-structures", "science" ]
++license = "MIT/Apache-2.0"
++name = "num-bigint"
++repository = "https://github.com/rust-num/num"
++version = "0.1.40"
++
++[dependencies]
++
++[dependencies.num-integer]
++path = "../integer"
++version = "0.1.32"
++
++[dependencies.num-traits]
++path = "../traits"
++version = "0.1.32"
++
++[dependencies.rand]
++optional = true
++version = "0.3.14"
++
++[dependencies.rustc-serialize]
++optional = true
++version = "0.3.19"
++
++[dependencies.serde]
++optional = true
++version = ">= 0.7.0, < 0.9.0"
++
++[dev-dependencies.rand]
++version = "0.3.14"
++
++[features]
++default = ["rand", "rustc-serialize"]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16fe87b06e802f094b3fbb0894b137bca2b16ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++                              Apache License
++                        Version 2.0, January 2004
++                     http://www.apache.org/licenses/
++
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++1. Definitions.
++
++   "License" shall mean the terms and conditions for use, reproduction,
++   and distribution as defined by Sections 1 through 9 of this document.
++
++   "Licensor" shall mean the copyright owner or entity authorized by
++   the copyright owner that is granting the License.
++
++   "Legal Entity" shall mean the union of the acting entity and all
++   other entities that control, are controlled by, or are under common
++   control with that entity. For the purposes of this definition,
++   "control" means (i) the power, direct or indirect, to cause the
++   direction or management of such entity, whether by contract or
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the
++   outstanding shares, or (iii) beneficial ownership of such entity.
++
++   "You" (or "Your") shall mean an individual or Legal Entity
++   exercising permissions granted by this License.
++
++   "Source" form shall mean the preferred form for making modifications,
++   including but not limited to software source code, documentation
++   source, and configuration files.
++
++   "Object" form shall mean any form resulting from mechanical
++   transformation or translation of a Source form, including but
++   not limited to compiled object code, generated documentation,
++   and conversions to other media types.
++
++   "Work" shall mean the work of authorship, whether in Source or
++   Object form, made available under the License, as indicated by a
++   copyright notice that is included in or attached to the work
++   (an example is provided in the Appendix below).
++
++   "Derivative Works" shall mean any work, whether in Source or Object
++   form, that is based on (or derived from) the Work and for which the
++   editorial revisions, annotations, elaborations, or other modifications
++   represent, as a whole, an original work of authorship. For the purposes
++   of this License, Derivative Works shall not include works that remain
++   separable from, or merely link (or bind by name) to the interfaces of,
++   the Work and Derivative Works thereof.
++
++   "Contribution" shall mean any work of authorship, including
++   the original version of the Work and any modifications or additions
++   to that Work or Derivative Works thereof, that is intentionally
++   submitted to Licensor for inclusion in the Work by the copyright owner
++   or by an individual or Legal Entity authorized to submit on behalf of
++   the copyright owner. For the purposes of this definition, "submitted"
++   means any form of electronic, verbal, or written communication sent
++   to the Licensor or its representatives, including but not limited to
++   communication on electronic mailing lists, source code control systems,
++   and issue tracking systems that are managed by, or on behalf of, the
++   Licensor for the purpose of discussing and improving the Work, but
++   excluding communication that is conspicuously marked or otherwise
++   designated in writing by the copyright owner as "Not a Contribution."
++
++   "Contributor" shall mean Licensor and any individual or Legal Entity
++   on behalf of whom a Contribution has been received by Licensor and
++   subsequently incorporated within the Work.
++
++2. Grant of Copyright License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   copyright license to reproduce, prepare Derivative Works of,
++   publicly display, publicly perform, sublicense, and distribute the
++   Work and such Derivative Works in Source or Object form.
++
++3. Grant of Patent License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   (except as stated in this section) patent license to make, have made,
++   use, offer to sell, sell, import, and otherwise transfer the Work,
++   where such license applies only to those patent claims licensable
++   by such Contributor that are necessarily infringed by their
++   Contribution(s) alone or by combination of their Contribution(s)
++   with the Work to which such Contribution(s) was submitted. If You
++   institute patent litigation against any entity (including a
++   cross-claim or counterclaim in a lawsuit) alleging that the Work
++   or a Contribution incorporated within the Work constitutes direct
++   or contributory patent infringement, then any patent licenses
++   granted to You under this License for that Work shall terminate
++   as of the date such litigation is filed.
++
++4. Redistribution. You may reproduce and distribute copies of the
++   Work or Derivative Works thereof in any medium, with or without
++   modifications, and in Source or Object form, provided that You
++   meet the following conditions:
++
++   (a) You must give any other recipients of the Work or
++       Derivative Works a copy of this License; and
++
++   (b) You must cause any modified files to carry prominent notices
++       stating that You changed the files; and
++
++   (c) You must retain, in the Source form of any Derivative Works
++       that You distribute, all copyright, patent, trademark, and
++       attribution notices from the Source form of the Work,
++       excluding those notices that do not pertain to any part of
++       the Derivative Works; and
++
++   (d) If the Work includes a "NOTICE" text file as part of its
++       distribution, then any Derivative Works that You distribute must
++       include a readable copy of the attribution notices contained
++       within such NOTICE file, excluding those notices that do not
++       pertain to any part of the Derivative Works, in at least one
++       of the following places: within a NOTICE text file distributed
++       as part of the Derivative Works; within the Source form or
++       documentation, if provided along with the Derivative Works; or,
++       within a display generated by the Derivative Works, if and
++       wherever such third-party notices normally appear. The contents
++       of the NOTICE file are for informational purposes only and
++       do not modify the License. You may add Your own attribution
++       notices within Derivative Works that You distribute, alongside
++       or as an addendum to the NOTICE text from the Work, provided
++       that such additional attribution notices cannot be construed
++       as modifying the License.
++
++   You may add Your own copyright statement to Your modifications and
++   may provide additional or different license terms and conditions
++   for use, reproduction, or distribution of Your modifications, or
++   for any such Derivative Works as a whole, provided Your use,
++   reproduction, and distribution of the Work otherwise complies with
++   the conditions stated in this License.
++
++5. Submission of Contributions. Unless You explicitly state otherwise,
++   any Contribution intentionally submitted for inclusion in the Work
++   by You to the Licensor shall be under the terms and conditions of
++   this License, without any additional terms or conditions.
++   Notwithstanding the above, nothing herein shall supersede or modify
++   the terms of any separate license agreement you may have executed
++   with Licensor regarding such Contributions.
++
++6. Trademarks. This License does not grant permission to use the trade
++   names, trademarks, service marks, or product names of the Licensor,
++   except as required for reasonable and customary use in describing the
++   origin of the Work and reproducing the content of the NOTICE file.
++
++7. Disclaimer of Warranty. Unless required by applicable law or
++   agreed to in writing, Licensor provides the Work (and each
++   Contributor provides its Contributions) on an "AS IS" BASIS,
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++   implied, including, without limitation, any warranties or conditions
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++   PARTICULAR PURPOSE. You are solely responsible for determining the
++   appropriateness of using or redistributing the Work and assume any
++   risks associated with Your exercise of permissions under this License.
++
++8. Limitation of Liability. In no event and under no legal theory,
++   whether in tort (including negligence), contract, or otherwise,
++   unless required by applicable law (such as deliberate and grossly
++   negligent acts) or agreed to in writing, shall any Contributor be
++   liable to You for damages, including any direct, indirect, special,
++   incidental, or consequential damages of any character arising as a
++   result of this License or out of the use or inability to use the
++   Work (including but not limited to damages for loss of goodwill,
++   work stoppage, computer failure or malfunction, or any and all
++   other commercial damages or losses), even if such Contributor
++   has been advised of the possibility of such damages.
++
++9. Accepting Warranty or Additional Liability. While redistributing
++   the Work or Derivative Works thereof, You may choose to offer,
++   and charge a fee for, acceptance of support, warranty, indemnity,
++   or other liability obligations and/or rights consistent with this
++   License. However, in accepting such obligations, You may act only
++   on Your own behalf and on Your sole responsibility, not on behalf
++   of any other Contributor, and only if You agree to indemnify,
++   defend, and hold each Contributor harmless for any liability
++   incurred by, or claims asserted against, such Contributor by reason
++   of your accepting any such warranty or additional liability.
++
++END OF TERMS AND CONDITIONS
++
++APPENDIX: How to apply the Apache License to your work.
++
++   To apply the Apache License to your work, attach the following
++   boilerplate notice, with the fields enclosed by brackets "[]"
++   replaced with your own identifying information. (Don't include
++   the brackets!)  The text should be enclosed in the appropriate
++   comment syntax for the file format. We also recommend that a
++   file or class name and description of purpose be included on the
++   same "printed page" as the copyright notice for easier
++   identification within third-party archives.
++
++Copyright [yyyy] [name of copyright owner]
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++      http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39d4bdb5acd313c1a92dbeaa1c379aaf0596a315
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2014 The Rust Project Developers
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..604fee243d71ce48336f3b6d289792c944cf3b39
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,603 @@@
++use std::borrow::Cow;
++use std::cmp;
++use std::cmp::Ordering::{self, Less, Greater, Equal};
++use std::iter::repeat;
++use std::mem;
++use traits;
++use traits::{Zero, One};
++
++use biguint::BigUint;
++
++use bigint::Sign;
++use bigint::Sign::{Minus, NoSign, Plus};
++
++#[allow(non_snake_case)]
++pub mod big_digit {
++    /// A `BigDigit` is a `BigUint`'s composing element.
++    pub type BigDigit = u32;
++
++    /// A `DoubleBigDigit` is the internal type used to do the computations.  Its
++    /// size is the double of the size of `BigDigit`.
++    pub type DoubleBigDigit = u64;
++
++    pub const ZERO_BIG_DIGIT: BigDigit = 0;
++
++    // `DoubleBigDigit` size dependent
++    pub const BITS: usize = 32;
++
++    pub const BASE: DoubleBigDigit = 1 << BITS;
++    const LO_MASK: DoubleBigDigit = (-1i32 as DoubleBigDigit) >> BITS;
++
++    #[inline]
++    fn get_hi(n: DoubleBigDigit) -> BigDigit {
++        (n >> BITS) as BigDigit
++    }
++    #[inline]
++    fn get_lo(n: DoubleBigDigit) -> BigDigit {
++        (n & LO_MASK) as BigDigit
++    }
++
++    /// Split one `DoubleBigDigit` into two `BigDigit`s.
++    #[inline]
++    pub fn from_doublebigdigit(n: DoubleBigDigit) -> (BigDigit, BigDigit) {
++        (get_hi(n), get_lo(n))
++    }
++
++    /// Join two `BigDigit`s into one `DoubleBigDigit`
++    #[inline]
++    pub fn to_doublebigdigit(hi: BigDigit, lo: BigDigit) -> DoubleBigDigit {
++        (lo as DoubleBigDigit) | ((hi as DoubleBigDigit) << BITS)
++    }
++}
++
++use big_digit::{BigDigit, DoubleBigDigit};
++
++// Generic functions for add/subtract/multiply with carry/borrow:
++
++// Add with carry:
++#[inline]
++fn adc(a: BigDigit, b: BigDigit, carry: &mut BigDigit) -> BigDigit {
++    let (hi, lo) = big_digit::from_doublebigdigit((a as DoubleBigDigit) + (b as DoubleBigDigit) +
++                                                  (*carry as DoubleBigDigit));
++
++    *carry = hi;
++    lo
++}
++
++// Subtract with borrow:
++#[inline]
++fn sbb(a: BigDigit, b: BigDigit, borrow: &mut BigDigit) -> BigDigit {
++    let (hi, lo) = big_digit::from_doublebigdigit(big_digit::BASE + (a as DoubleBigDigit) -
++                                                  (b as DoubleBigDigit) -
++                                                  (*borrow as DoubleBigDigit));
++    // hi * (base) + lo == 1*(base) + ai - bi - borrow
++    // => ai - bi - borrow < 0 <=> hi == 0
++    *borrow = (hi == 0) as BigDigit;
++    lo
++}
++
++#[inline]
++pub fn mac_with_carry(a: BigDigit, b: BigDigit, c: BigDigit, carry: &mut BigDigit) -> BigDigit {
++    let (hi, lo) = big_digit::from_doublebigdigit((a as DoubleBigDigit) +
++                                                  (b as DoubleBigDigit) * (c as DoubleBigDigit) +
++                                                  (*carry as DoubleBigDigit));
++    *carry = hi;
++    lo
++}
++
++#[inline]
++pub fn mul_with_carry(a: BigDigit, b: BigDigit, carry: &mut BigDigit) -> BigDigit {
++    let (hi, lo) = big_digit::from_doublebigdigit((a as DoubleBigDigit) * (b as DoubleBigDigit) +
++                                                  (*carry as DoubleBigDigit));
++
++    *carry = hi;
++    lo
++}
++
++/// Divide a two digit numerator by a one digit divisor, returns quotient and remainder:
++///
++/// Note: the caller must ensure that both the quotient and remainder will fit into a single digit.
++/// This is _not_ true for an arbitrary numerator/denominator.
++///
++/// (This function also matches what the x86 divide instruction does).
++#[inline]
++fn div_wide(hi: BigDigit, lo: BigDigit, divisor: BigDigit) -> (BigDigit, BigDigit) {
++    debug_assert!(hi < divisor);
++
++    let lhs = big_digit::to_doublebigdigit(hi, lo);
++    let rhs = divisor as DoubleBigDigit;
++    ((lhs / rhs) as BigDigit, (lhs % rhs) as BigDigit)
++}
++
++pub fn div_rem_digit(mut a: BigUint, b: BigDigit) -> (BigUint, BigDigit) {
++    let mut rem = 0;
++
++    for d in a.data.iter_mut().rev() {
++        let (q, r) = div_wide(rem, *d, b);
++        *d = q;
++        rem = r;
++    }
++
++    (a.normalize(), rem)
++}
++
++// Only for the Add impl:
++#[must_use]
++#[inline]
++pub fn __add2(a: &mut [BigDigit], b: &[BigDigit]) -> BigDigit {
++    debug_assert!(a.len() >= b.len());
++
++    let mut carry = 0;
++    let (a_lo, a_hi) = a.split_at_mut(b.len());
++
++    for (a, b) in a_lo.iter_mut().zip(b) {
++        *a = adc(*a, *b, &mut carry);
++    }
++
++    if carry != 0 {
++        for a in a_hi {
++            *a = adc(*a, 0, &mut carry);
++            if carry == 0 { break }
++        }
++    }
++
++    carry
++}
++
++/// /Two argument addition of raw slices:
++/// a += b
++///
++/// The caller _must_ ensure that a is big enough to store the result - typically this means
++/// resizing a to max(a.len(), b.len()) + 1, to fit a possible carry.
++pub fn add2(a: &mut [BigDigit], b: &[BigDigit]) {
++    let carry = __add2(a, b);
++
++    debug_assert!(carry == 0);
++}
++
++pub fn sub2(a: &mut [BigDigit], b: &[BigDigit]) {
++    let mut borrow = 0;
++
++    let len = cmp::min(a.len(), b.len());
++    let (a_lo, a_hi) = a.split_at_mut(len);
++    let (b_lo, b_hi) = b.split_at(len);
++
++    for (a, b) in a_lo.iter_mut().zip(b_lo) {
++        *a = sbb(*a, *b, &mut borrow);
++    }
++
++    if borrow != 0 {
++        for a in a_hi {
++            *a = sbb(*a, 0, &mut borrow);
++            if borrow == 0 { break }
++        }
++    }
++
++    // note: we're _required_ to fail on underflow
++    assert!(borrow == 0 && b_hi.iter().all(|x| *x == 0),
++            "Cannot subtract b from a because b is larger than a.");
++}
++
++pub fn sub2rev(a: &[BigDigit], b: &mut [BigDigit]) {
++    debug_assert!(b.len() >= a.len());
++
++    let mut borrow = 0;
++
++    let len = cmp::min(a.len(), b.len());
++    let (a_lo, a_hi) = a.split_at(len);
++    let (b_lo, b_hi) = b.split_at_mut(len);
++
++    for (a, b) in a_lo.iter().zip(b_lo) {
++        *b = sbb(*a, *b, &mut borrow);
++    }
++
++    assert!(a_hi.is_empty());
++
++    // note: we're _required_ to fail on underflow
++    assert!(borrow == 0 && b_hi.iter().all(|x| *x == 0),
++            "Cannot subtract b from a because b is larger than a.");
++}
++
++pub fn sub_sign(a: &[BigDigit], b: &[BigDigit]) -> (Sign, BigUint) {
++    // Normalize:
++    let a = &a[..a.iter().rposition(|&x| x != 0).map_or(0, |i| i + 1)];
++    let b = &b[..b.iter().rposition(|&x| x != 0).map_or(0, |i| i + 1)];
++
++    match cmp_slice(a, b) {
++        Greater => {
++            let mut a = a.to_vec();
++            sub2(&mut a, b);
++            (Plus, BigUint::new(a))
++        }
++        Less => {
++            let mut b = b.to_vec();
++            sub2(&mut b, a);
++            (Minus, BigUint::new(b))
++        }
++        _ => (NoSign, Zero::zero()),
++    }
++}
++
++/// Three argument multiply accumulate:
++/// acc += b * c
++fn mac_digit(acc: &mut [BigDigit], b: &[BigDigit], c: BigDigit) {
++    if c == 0 {
++        return;
++    }
++
++    let mut b_iter = b.iter();
++    let mut carry = 0;
++
++    for ai in acc.iter_mut() {
++        if let Some(bi) = b_iter.next() {
++            *ai = mac_with_carry(*ai, *bi, c, &mut carry);
++        } else if carry != 0 {
++            *ai = mac_with_carry(*ai, 0, c, &mut carry);
++        } else {
++            break;
++        }
++    }
++
++    assert!(carry == 0);
++}
++
++/// Three argument multiply accumulate:
++/// acc += b * c
++fn mac3(acc: &mut [BigDigit], b: &[BigDigit], c: &[BigDigit]) {
++    let (x, y) = if b.len() < c.len() {
++        (b, c)
++    } else {
++        (c, b)
++    };
++
++    // Karatsuba multiplication is slower than long multiplication for small x and y:
++    //
++    if x.len() <= 4 {
++        for (i, xi) in x.iter().enumerate() {
++            mac_digit(&mut acc[i..], y, *xi);
++        }
++    } else {
++        /*
++         * Karatsuba multiplication:
++         *
++         * The idea is that we break x and y up into two smaller numbers that each have about half
++         * as many digits, like so (note that multiplying by b is just a shift):
++         *
++         * x = x0 + x1 * b
++         * y = y0 + y1 * b
++         *
++         * With some algebra, we can compute x * y with three smaller products, where the inputs to
++         * each of the smaller products have only about half as many digits as x and y:
++         *
++         * x * y = (x0 + x1 * b) * (y0 + y1 * b)
++         *
++         * x * y = x0 * y0
++         *       + x0 * y1 * b
++         *       + x1 * y0 * b
++         *       + x1 * y1 * b^2
++         *
++         * Let p0 = x0 * y0 and p2 = x1 * y1:
++         *
++         * x * y = p0
++         *       + (x0 * y1 + x1 * y0) * b
++         *       + p2 * b^2
++         *
++         * The real trick is that middle term:
++         *
++         *         x0 * y1 + x1 * y0
++         *
++         *       = x0 * y1 + x1 * y0 - p0 + p0 - p2 + p2
++         *
++         *       = x0 * y1 + x1 * y0 - x0 * y0 - x1 * y1 + p0 + p2
++         *
++         * Now we complete the square:
++         *
++         *       = -(x0 * y0 - x0 * y1 - x1 * y0 + x1 * y1) + p0 + p2
++         *
++         *       = -((x1 - x0) * (y1 - y0)) + p0 + p2
++         *
++         * Let p1 = (x1 - x0) * (y1 - y0), and substitute back into our original formula:
++         *
++         * x * y = p0
++         *       + (p0 + p2 - p1) * b
++         *       + p2 * b^2
++         *
++         * Where the three intermediate products are:
++         *
++         * p0 = x0 * y0
++         * p1 = (x1 - x0) * (y1 - y0)
++         * p2 = x1 * y1
++         *
++         * In doing the computation, we take great care to avoid unnecessary temporary variables
++         * (since creating a BigUint requires a heap allocation): thus, we rearrange the formula a
++         * bit so we can use the same temporary variable for all the intermediate products:
++         *
++         * x * y = p2 * b^2 + p2 * b
++         *       + p0 * b + p0
++         *       - p1 * b
++         *
++         * The other trick we use is instead of doing explicit shifts, we slice acc at the
++         * appropriate offset when doing the add.
++         */
++
++        /*
++         * When x is smaller than y, it's significantly faster to pick b such that x is split in
++         * half, not y:
++         */
++        let b = x.len() / 2;
++        let (x0, x1) = x.split_at(b);
++        let (y0, y1) = y.split_at(b);
++
++        /*
++         * We reuse the same BigUint for all the intermediate multiplies and have to size p
++         * appropriately here: x1.len() >= x0.len and y1.len() >= y0.len():
++         */
++        let len = x1.len() + y1.len() + 1;
++        let mut p = BigUint { data: vec![0; len] };
++
++        // p2 = x1 * y1
++        mac3(&mut p.data[..], x1, y1);
++
++        // Not required, but the adds go faster if we drop any unneeded 0s from the end:
++        p = p.normalize();
++
++        add2(&mut acc[b..],        &p.data[..]);
++        add2(&mut acc[b * 2..],    &p.data[..]);
++
++        // Zero out p before the next multiply:
++        p.data.truncate(0);
++        p.data.extend(repeat(0).take(len));
++
++        // p0 = x0 * y0
++        mac3(&mut p.data[..], x0, y0);
++        p = p.normalize();
++
++        add2(&mut acc[..],         &p.data[..]);
++        add2(&mut acc[b..],        &p.data[..]);
++
++        // p1 = (x1 - x0) * (y1 - y0)
++        // We do this one last, since it may be negative and acc can't ever be negative:
++        let (j0_sign, j0) = sub_sign(x1, x0);
++        let (j1_sign, j1) = sub_sign(y1, y0);
++
++        match j0_sign * j1_sign {
++            Plus    => {
++                p.data.truncate(0);
++                p.data.extend(repeat(0).take(len));
++
++                mac3(&mut p.data[..], &j0.data[..], &j1.data[..]);
++                p = p.normalize();
++
++                sub2(&mut acc[b..], &p.data[..]);
++            },
++            Minus   => {
++                mac3(&mut acc[b..], &j0.data[..], &j1.data[..]);
++            },
++            NoSign  => (),
++        }
++    }
++}
++
++pub fn mul3(x: &[BigDigit], y: &[BigDigit]) -> BigUint {
++    let len = x.len() + y.len() + 1;
++    let mut prod = BigUint { data: vec![0; len] };
++
++    mac3(&mut prod.data[..], x, y);
++    prod.normalize()
++}
++
++pub fn scalar_mul(a: &mut [BigDigit], b: BigDigit) -> BigDigit {
++    let mut carry = 0;
++    for a in a.iter_mut() {
++        *a = mul_with_carry(*a, b, &mut carry);
++    }
++    carry
++}
++
++pub fn div_rem(u: &BigUint, d: &BigUint) -> (BigUint, BigUint) {
++    if d.is_zero() {
++        panic!()
++    }
++    if u.is_zero() {
++        return (Zero::zero(), Zero::zero());
++    }
++    if *d == One::one() {
++        return (u.clone(), Zero::zero());
++    }
++
++    // Required or the q_len calculation below can underflow:
++    match u.cmp(d) {
++        Less => return (Zero::zero(), u.clone()),
++        Equal => return (One::one(), Zero::zero()),
++        Greater => {} // Do nothing
++    }
++
++    // This algorithm is from Knuth, TAOCP vol 2 section 4.3, algorithm D:
++    //
++    // First, normalize the arguments so the highest bit in the highest digit of the divisor is
++    // set: the main loop uses the highest digit of the divisor for generating guesses, so we
++    // want it to be the largest number we can efficiently divide by.
++    //
++    let shift = d.data.last().unwrap().leading_zeros() as usize;
++    let mut a = u << shift;
++    let b = d << shift;
++
++    // The algorithm works by incrementally calculating "guesses", q0, for part of the
++    // remainder. Once we have any number q0 such that q0 * b <= a, we can set
++    //
++    //     q += q0
++    //     a -= q0 * b
++    //
++    // and then iterate until a < b. Then, (q, a) will be our desired quotient and remainder.
++    //
++    // q0, our guess, is calculated by dividing the last few digits of a by the last digit of b
++    // - this should give us a guess that is "close" to the actual quotient, but is possibly
++    // greater than the actual quotient. If q0 * b > a, we simply use iterated subtraction
++    // until we have a guess such that q0 * b <= a.
++    //
++
++    let bn = *b.data.last().unwrap();
++    let q_len = a.data.len() - b.data.len() + 1;
++    let mut q = BigUint { data: vec![0; q_len] };
++
++    // We reuse the same temporary to avoid hitting the allocator in our inner loop - this is
++    // sized to hold a0 (in the common case; if a particular digit of the quotient is zero a0
++    // can be bigger).
++    //
++    let mut tmp = BigUint { data: Vec::with_capacity(2) };
++
++    for j in (0..q_len).rev() {
++        /*
++         * When calculating our next guess q0, we don't need to consider the digits below j
++         * + b.data.len() - 1: we're guessing digit j of the quotient (i.e. q0 << j) from
++         * digit bn of the divisor (i.e. bn << (b.data.len() - 1) - so the product of those
++         * two numbers will be zero in all digits up to (j + b.data.len() - 1).
++         */
++        let offset = j + b.data.len() - 1;
++        if offset >= a.data.len() {
++            continue;
++        }
++
++        /* just avoiding a heap allocation: */
++        let mut a0 = tmp;
++        a0.data.truncate(0);
++        a0.data.extend(a.data[offset..].iter().cloned());
++
++        /*
++         * q0 << j * big_digit::BITS is our actual quotient estimate - we do the shifts
++         * implicitly at the end, when adding and subtracting to a and q. Not only do we
++         * save the cost of the shifts, the rest of the arithmetic gets to work with
++         * smaller numbers.
++         */
++        let (mut q0, _) = div_rem_digit(a0, bn);
++        let mut prod = &b * &q0;
++
++        while cmp_slice(&prod.data[..], &a.data[j..]) == Greater {
++            let one: BigUint = One::one();
++            q0 = q0 - one;
++            prod = prod - &b;
++        }
++
++        add2(&mut q.data[j..], &q0.data[..]);
++        sub2(&mut a.data[j..], &prod.data[..]);
++        a = a.normalize();
++
++        tmp = q0;
++    }
++
++    debug_assert!(a < b);
++
++    (q.normalize(), a >> shift)
++}
++
++/// Find last set bit
++/// fls(0) == 0, fls(u32::MAX) == 32
++pub fn fls<T: traits::PrimInt>(v: T) -> usize {
++    mem::size_of::<T>() * 8 - v.leading_zeros() as usize
++}
++
++pub fn ilog2<T: traits::PrimInt>(v: T) -> usize {
++    fls(v) - 1
++}
++
++#[inline]
++pub fn biguint_shl(n: Cow<BigUint>, bits: usize) -> BigUint {
++    let n_unit = bits / big_digit::BITS;
++    let mut data = match n_unit {
++        0 => n.into_owned().data,
++        _ => {
++            let len = n_unit + n.data.len() + 1;
++            let mut data = Vec::with_capacity(len);
++            data.extend(repeat(0).take(n_unit));
++            data.extend(n.data.iter().cloned());
++            data
++        }
++    };
++
++    let n_bits = bits % big_digit::BITS;
++    if n_bits > 0 {
++        let mut carry = 0;
++        for elem in data[n_unit..].iter_mut() {
++            let new_carry = *elem >> (big_digit::BITS - n_bits);
++            *elem = (*elem << n_bits) | carry;
++            carry = new_carry;
++        }
++        if carry != 0 {
++            data.push(carry);
++        }
++    }
++
++    BigUint::new(data)
++}
++
++#[inline]
++pub fn biguint_shr(n: Cow<BigUint>, bits: usize) -> BigUint {
++    let n_unit = bits / big_digit::BITS;
++    if n_unit >= n.data.len() {
++        return Zero::zero();
++    }
++    let mut data = match n_unit {
++        0 => n.into_owned().data,
++        _ => n.data[n_unit..].to_vec(),
++    };
++
++    let n_bits = bits % big_digit::BITS;
++    if n_bits > 0 {
++        let mut borrow = 0;
++        for elem in data.iter_mut().rev() {
++            let new_borrow = *elem << (big_digit::BITS - n_bits);
++            *elem = (*elem >> n_bits) | borrow;
++            borrow = new_borrow;
++        }
++    }
++
++    BigUint::new(data)
++}
++
++pub fn cmp_slice(a: &[BigDigit], b: &[BigDigit]) -> Ordering {
++    debug_assert!(a.last() != Some(&0));
++    debug_assert!(b.last() != Some(&0));
++
++    let (a_len, b_len) = (a.len(), b.len());
++    if a_len < b_len {
++        return Less;
++    }
++    if a_len > b_len {
++        return Greater;
++    }
++
++    for (&ai, &bi) in a.iter().rev().zip(b.iter().rev()) {
++        if ai < bi {
++            return Less;
++        }
++        if ai > bi {
++            return Greater;
++        }
++    }
++    return Equal;
++}
++
++#[cfg(test)]
++mod algorithm_tests {
++    use {BigDigit, BigUint, BigInt};
++    use Sign::Plus;
++    use traits::Num;
++
++    #[test]
++    fn test_sub_sign() {
++        use super::sub_sign;
++
++        fn sub_sign_i(a: &[BigDigit], b: &[BigDigit]) -> BigInt {
++            let (sign, val) = sub_sign(a, b);
++            BigInt::from_biguint(sign, val)
++        }
++
++        let a = BigUint::from_str_radix("265252859812191058636308480000000", 10).unwrap();
++        let b = BigUint::from_str_radix("26525285981219105863630848000000", 10).unwrap();
++        let a_i = BigInt::from_biguint(Plus, a.clone());
++        let b_i = BigInt::from_biguint(Plus, b.clone());
++
++        assert_eq!(sub_sign_i(&a.data[..], &b.data[..]), &a_i - &b_i);
++        assert_eq!(sub_sign_i(&b.data[..], &a.data[..]), &b_i - &a_i);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..259f619b57b2c0db02fc71910b5d14737cf2e6bd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1752 @@@
++use std::default::Default;
++use std::ops::{Add, Div, Mul, Neg, Rem, Shl, Shr, Sub, Not};
++use std::str::{self, FromStr};
++use std::fmt;
++use std::cmp::Ordering::{self, Less, Greater, Equal};
++use std::{i64, u64};
++use std::ascii::AsciiExt;
++
++#[cfg(feature = "serde")]
++use serde;
++
++// Some of the tests of non-RNG-based functionality are randomized using the
++// RNG-based functionality, so the RNG-based functionality needs to be enabled
++// for tests.
++#[cfg(any(feature = "rand", test))]
++use rand::Rng;
++
++use integer::Integer;
++use traits::{ToPrimitive, FromPrimitive, Num, CheckedAdd, CheckedSub,
++             CheckedMul, CheckedDiv, Signed, Zero, One};
++
++use self::Sign::{Minus, NoSign, Plus};
++
++use super::ParseBigIntError;
++use super::big_digit;
++use super::big_digit::{BigDigit, DoubleBigDigit};
++use biguint;
++use biguint::to_str_radix_reversed;
++use biguint::BigUint;
++
++use UsizePromotion;
++use IsizePromotion;
++
++#[cfg(test)]
++#[path = "tests/bigint.rs"]
++mod bigint_tests;
++
++/// A Sign is a `BigInt`'s composing element.
++#[derive(PartialEq, PartialOrd, Eq, Ord, Copy, Clone, Debug, Hash)]
++#[cfg_attr(feature = "rustc-serialize", derive(RustcEncodable, RustcDecodable))]
++pub enum Sign {
++    Minus,
++    NoSign,
++    Plus,
++}
++
++impl Neg for Sign {
++    type Output = Sign;
++
++    /// Negate Sign value.
++    #[inline]
++    fn neg(self) -> Sign {
++        match self {
++            Minus => Plus,
++            NoSign => NoSign,
++            Plus => Minus,
++        }
++    }
++}
++
++impl Mul<Sign> for Sign {
++    type Output = Sign;
++
++    #[inline]
++    fn mul(self, other: Sign) -> Sign {
++        match (self, other) {
++            (NoSign, _) | (_, NoSign) => NoSign,
++            (Plus, Plus) | (Minus, Minus) => Plus,
++            (Plus, Minus) | (Minus, Plus) => Minus,
++        }
++    }
++}
++
++#[cfg(feature = "serde")]
++impl serde::Serialize for Sign {
++    fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error>
++        where S: serde::Serializer
++    {
++        match *self {
++            Sign::Minus => (-1i8).serialize(serializer),
++            Sign::NoSign => 0i8.serialize(serializer),
++            Sign::Plus => 1i8.serialize(serializer),
++        }
++    }
++}
++
++#[cfg(feature = "serde")]
++impl serde::Deserialize for Sign {
++    fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error>
++        where D: serde::Deserializer
++    {
++        use serde::de::Error;
++
++        let sign: i8 = try!(serde::Deserialize::deserialize(deserializer));
++        match sign {
++            -1 => Ok(Sign::Minus),
++            0 => Ok(Sign::NoSign),
++            1 => Ok(Sign::Plus),
++            _ => Err(D::Error::invalid_value("sign must be -1, 0, or 1")),
++        }
++    }
++}
++
++/// A big signed integer type.
++#[derive(Clone, Debug, Hash)]
++#[cfg_attr(feature = "rustc-serialize", derive(RustcEncodable, RustcDecodable))]
++pub struct BigInt {
++    sign: Sign,
++    data: BigUint,
++}
++
++impl PartialEq for BigInt {
++    #[inline]
++    fn eq(&self, other: &BigInt) -> bool {
++        self.cmp(other) == Equal
++    }
++}
++
++impl Eq for BigInt {}
++
++impl PartialOrd for BigInt {
++    #[inline]
++    fn partial_cmp(&self, other: &BigInt) -> Option<Ordering> {
++        Some(self.cmp(other))
++    }
++}
++
++impl Ord for BigInt {
++    #[inline]
++    fn cmp(&self, other: &BigInt) -> Ordering {
++        let scmp = self.sign.cmp(&other.sign);
++        if scmp != Equal {
++            return scmp;
++        }
++
++        match self.sign {
++            NoSign => Equal,
++            Plus => self.data.cmp(&other.data),
++            Minus => other.data.cmp(&self.data),
++        }
++    }
++}
++
++impl Default for BigInt {
++    #[inline]
++    fn default() -> BigInt {
++        Zero::zero()
++    }
++}
++
++impl fmt::Display for BigInt {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.pad_integral(!self.is_negative(), "", &self.data.to_str_radix(10))
++    }
++}
++
++impl fmt::Binary for BigInt {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.pad_integral(!self.is_negative(), "0b", &self.data.to_str_radix(2))
++    }
++}
++
++impl fmt::Octal for BigInt {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.pad_integral(!self.is_negative(), "0o", &self.data.to_str_radix(8))
++    }
++}
++
++impl fmt::LowerHex for BigInt {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.pad_integral(!self.is_negative(), "0x", &self.data.to_str_radix(16))
++    }
++}
++
++impl fmt::UpperHex for BigInt {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.pad_integral(!self.is_negative(),
++                       "0x",
++                       &self.data.to_str_radix(16).to_ascii_uppercase())
++    }
++}
++
++impl FromStr for BigInt {
++    type Err = ParseBigIntError;
++
++    #[inline]
++    fn from_str(s: &str) -> Result<BigInt, ParseBigIntError> {
++        BigInt::from_str_radix(s, 10)
++    }
++}
++
++impl Num for BigInt {
++    type FromStrRadixErr = ParseBigIntError;
++
++    /// Creates and initializes a BigInt.
++    #[inline]
++    fn from_str_radix(mut s: &str, radix: u32) -> Result<BigInt, ParseBigIntError> {
++        let sign = if s.starts_with('-') {
++            let tail = &s[1..];
++            if !tail.starts_with('+') {
++                s = tail
++            }
++            Minus
++        } else {
++            Plus
++        };
++        let bu = try!(BigUint::from_str_radix(s, radix));
++        Ok(BigInt::from_biguint(sign, bu))
++    }
++}
++
++impl Shl<usize> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn shl(self, rhs: usize) -> BigInt {
++        (&self) << rhs
++    }
++}
++
++impl<'a> Shl<usize> for &'a BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn shl(self, rhs: usize) -> BigInt {
++        BigInt::from_biguint(self.sign, &self.data << rhs)
++    }
++}
++
++impl Shr<usize> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn shr(self, rhs: usize) -> BigInt {
++        BigInt::from_biguint(self.sign, self.data >> rhs)
++    }
++}
++
++impl<'a> Shr<usize> for &'a BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn shr(self, rhs: usize) -> BigInt {
++        BigInt::from_biguint(self.sign, &self.data >> rhs)
++    }
++}
++
++impl Zero for BigInt {
++    #[inline]
++    fn zero() -> BigInt {
++        BigInt::from_biguint(NoSign, Zero::zero())
++    }
++
++    #[inline]
++    fn is_zero(&self) -> bool {
++        self.sign == NoSign
++    }
++}
++
++impl One for BigInt {
++    #[inline]
++    fn one() -> BigInt {
++        BigInt::from_biguint(Plus, One::one())
++    }
++}
++
++impl Signed for BigInt {
++    #[inline]
++    fn abs(&self) -> BigInt {
++        match self.sign {
++            Plus | NoSign => self.clone(),
++            Minus => BigInt::from_biguint(Plus, self.data.clone()),
++        }
++    }
++
++    #[inline]
++    fn abs_sub(&self, other: &BigInt) -> BigInt {
++        if *self <= *other {
++            Zero::zero()
++        } else {
++            self - other
++        }
++    }
++
++    #[inline]
++    fn signum(&self) -> BigInt {
++        match self.sign {
++            Plus => BigInt::from_biguint(Plus, One::one()),
++            Minus => BigInt::from_biguint(Minus, One::one()),
++            NoSign => Zero::zero(),
++        }
++    }
++
++    #[inline]
++    fn is_positive(&self) -> bool {
++        self.sign == Plus
++    }
++
++    #[inline]
++    fn is_negative(&self) -> bool {
++        self.sign == Minus
++    }
++}
++
++// A convenience method for getting the absolute value of an i32 in a u32.
++#[inline]
++fn i32_abs_as_u32(a: i32) -> u32 {
++    if a == i32::min_value() {
++        a as u32
++    } else {
++        a.abs() as u32
++    }
++}
++
++// A convenience method for getting the absolute value of an i64 in a u64.
++#[inline]
++fn i64_abs_as_u64(a: i64) -> u64 {
++    if a == i64::min_value() {
++        a as u64
++    } else {
++        a.abs() as u64
++    }
++}
++
++// We want to forward to BigUint::add, but it's not clear how that will go until
++// we compare both sign and magnitude.  So we duplicate this body for every
++// val/ref combination, deferring that decision to BigUint's own forwarding.
++macro_rules! bigint_add {
++    ($a:expr, $a_owned:expr, $a_data:expr, $b:expr, $b_owned:expr, $b_data:expr) => {
++        match ($a.sign, $b.sign) {
++            (_, NoSign) => $a_owned,
++            (NoSign, _) => $b_owned,
++            // same sign => keep the sign with the sum of magnitudes
++            (Plus, Plus) | (Minus, Minus) =>
++                BigInt::from_biguint($a.sign, $a_data + $b_data),
++            // opposite signs => keep the sign of the larger with the difference of magnitudes
++            (Plus, Minus) | (Minus, Plus) =>
++                match $a.data.cmp(&$b.data) {
++                    Less => BigInt::from_biguint($b.sign, $b_data - $a_data),
++                    Greater => BigInt::from_biguint($a.sign, $a_data - $b_data),
++                    Equal => Zero::zero(),
++                },
++        }
++    };
++}
++
++impl<'a, 'b> Add<&'b BigInt> for &'a BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn add(self, other: &BigInt) -> BigInt {
++        bigint_add!(self,
++                    self.clone(),
++                    &self.data,
++                    other,
++                    other.clone(),
++                    &other.data)
++    }
++}
++
++impl<'a> Add<BigInt> for &'a BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn add(self, other: BigInt) -> BigInt {
++        bigint_add!(self, self.clone(), &self.data, other, other, other.data)
++    }
++}
++
++impl<'a> Add<&'a BigInt> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn add(self, other: &BigInt) -> BigInt {
++        bigint_add!(self, self, self.data, other, other.clone(), &other.data)
++    }
++}
++
++impl Add<BigInt> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn add(self, other: BigInt) -> BigInt {
++        bigint_add!(self, self, self.data, other, other, other.data)
++    }
++}
++
++promote_all_scalars!(impl Add for BigInt, add);
++forward_all_scalar_binop_to_val_val_commutative!(impl Add<BigDigit> for BigInt, add);
++forward_all_scalar_binop_to_val_val_commutative!(impl Add<DoubleBigDigit> for BigInt, add);
++
++impl Add<BigDigit> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn add(self, other: BigDigit) -> BigInt {
++        match self.sign {
++            NoSign => From::from(other),
++            Plus => BigInt::from_biguint(Plus, self.data + other),
++            Minus =>
++                match self.data.cmp(&From::from(other)) {
++                    Equal => Zero::zero(),
++                    Less => BigInt::from_biguint(Plus, other - self.data),
++                    Greater => BigInt::from_biguint(Minus, self.data - other),
++                }
++        }
++    }
++}
++
++impl Add<DoubleBigDigit> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn add(self, other: DoubleBigDigit) -> BigInt {
++        match self.sign {
++            NoSign => From::from(other),
++            Plus => BigInt::from_biguint(Plus, self.data + other),
++            Minus =>
++                match self.data.cmp(&From::from(other)) {
++                    Equal => Zero::zero(),
++                    Less => BigInt::from_biguint(Plus, other - self.data),
++                    Greater => BigInt::from_biguint(Minus, self.data - other),
++                }
++        }
++    }
++}
++
++forward_all_scalar_binop_to_val_val_commutative!(impl Add<i32> for BigInt, add);
++forward_all_scalar_binop_to_val_val_commutative!(impl Add<i64> for BigInt, add);
++
++impl Add<i32> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn add(self, other: i32) -> BigInt {
++        if other >= 0 {
++            self + other as u32
++        } else {
++            self - i32_abs_as_u32(other)
++        }
++    }
++}
++
++impl Add<i64> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn add(self, other: i64) -> BigInt {
++        if other >= 0 {
++            self + other as u64
++        } else {
++            self - i64_abs_as_u64(other)
++        }
++    }
++}
++
++// We want to forward to BigUint::sub, but it's not clear how that will go until
++// we compare both sign and magnitude.  So we duplicate this body for every
++// val/ref combination, deferring that decision to BigUint's own forwarding.
++macro_rules! bigint_sub {
++    ($a:expr, $a_owned:expr, $a_data:expr, $b:expr, $b_owned:expr, $b_data:expr) => {
++        match ($a.sign, $b.sign) {
++            (_, NoSign) => $a_owned,
++            (NoSign, _) => -$b_owned,
++            // opposite signs => keep the sign of the left with the sum of magnitudes
++            (Plus, Minus) | (Minus, Plus) =>
++                BigInt::from_biguint($a.sign, $a_data + $b_data),
++            // same sign => keep or toggle the sign of the left with the difference of magnitudes
++            (Plus, Plus) | (Minus, Minus) =>
++                match $a.data.cmp(&$b.data) {
++                    Less => BigInt::from_biguint(-$a.sign, $b_data - $a_data),
++                    Greater => BigInt::from_biguint($a.sign, $a_data - $b_data),
++                    Equal => Zero::zero(),
++                },
++        }
++    };
++}
++
++impl<'a, 'b> Sub<&'b BigInt> for &'a BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn sub(self, other: &BigInt) -> BigInt {
++        bigint_sub!(self,
++                    self.clone(),
++                    &self.data,
++                    other,
++                    other.clone(),
++                    &other.data)
++    }
++}
++
++impl<'a> Sub<BigInt> for &'a BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn sub(self, other: BigInt) -> BigInt {
++        bigint_sub!(self, self.clone(), &self.data, other, other, other.data)
++    }
++}
++
++impl<'a> Sub<&'a BigInt> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn sub(self, other: &BigInt) -> BigInt {
++        bigint_sub!(self, self, self.data, other, other.clone(), &other.data)
++    }
++}
++
++impl Sub<BigInt> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn sub(self, other: BigInt) -> BigInt {
++        bigint_sub!(self, self, self.data, other, other, other.data)
++    }
++}
++
++promote_all_scalars!(impl Sub for BigInt, sub);
++forward_all_scalar_binop_to_val_val!(impl Sub<BigDigit> for BigInt, sub);
++forward_all_scalar_binop_to_val_val!(impl Sub<DoubleBigDigit> for BigInt, sub);
++
++impl Sub<BigDigit> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn sub(self, other: BigDigit) -> BigInt {
++        match self.sign {
++            NoSign => BigInt::from_biguint(Minus, From::from(other)),
++            Minus => BigInt::from_biguint(Minus, self.data + other),
++            Plus =>
++                match self.data.cmp(&From::from(other)) {
++                    Equal => Zero::zero(),
++                    Greater => BigInt::from_biguint(Plus, self.data - other),
++                    Less => BigInt::from_biguint(Minus, other - self.data),
++                }
++        }
++    }
++}
++
++impl Sub<BigInt> for BigDigit {
++    type Output = BigInt;
++
++    #[inline]
++    fn sub(self, other: BigInt) -> BigInt {
++        -(other - self)
++    }
++}
++
++impl Sub<DoubleBigDigit> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn sub(self, other: DoubleBigDigit) -> BigInt {
++        match self.sign {
++            NoSign => BigInt::from_biguint(Minus, From::from(other)),
++            Minus => BigInt::from_biguint(Minus, self.data + other),
++            Plus =>
++                match self.data.cmp(&From::from(other)) {
++                    Equal => Zero::zero(),
++                    Greater => BigInt::from_biguint(Plus, self.data - other),
++                    Less => BigInt::from_biguint(Minus, other - self.data),
++                }
++        }
++    }
++}
++
++impl Sub<BigInt> for DoubleBigDigit {
++    type Output = BigInt;
++
++    #[inline]
++    fn sub(self, other: BigInt) -> BigInt {
++        -(other - self)
++    }
++}
++
++forward_all_scalar_binop_to_val_val!(impl Sub<i32> for BigInt, sub);
++forward_all_scalar_binop_to_val_val!(impl Sub<i64> for BigInt, sub);
++
++impl Sub<i32> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn sub(self, other: i32) -> BigInt {
++        if other >= 0 {
++            self - other as u32
++        } else {
++            self + i32_abs_as_u32(other)
++        }
++    }
++}
++
++impl Sub<BigInt> for i32 {
++    type Output = BigInt;
++
++    #[inline]
++    fn sub(self, other: BigInt) -> BigInt {
++        if self >= 0 {
++            self as u32 - other
++        } else {
++            -other - i32_abs_as_u32(self)
++        }
++    }
++}
++
++impl Sub<i64> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn sub(self, other: i64) -> BigInt {
++        if other >= 0 {
++            self - other as u64
++        } else {
++            self + i64_abs_as_u64(other)
++        }
++    }
++}
++
++impl Sub<BigInt> for i64 {
++    type Output = BigInt;
++
++    #[inline]
++    fn sub(self, other: BigInt) -> BigInt {
++        if self >= 0 {
++            self as u64 - other
++        } else {
++            -other - i64_abs_as_u64(self)
++        }
++    }
++}
++
++forward_all_binop_to_ref_ref!(impl Mul for BigInt, mul);
++
++impl<'a, 'b> Mul<&'b BigInt> for &'a BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn mul(self, other: &BigInt) -> BigInt {
++        BigInt::from_biguint(self.sign * other.sign, &self.data * &other.data)
++    }
++}
++
++promote_all_scalars!(impl Mul for BigInt, mul);
++forward_all_scalar_binop_to_val_val_commutative!(impl Mul<BigDigit> for BigInt, mul);
++forward_all_scalar_binop_to_val_val_commutative!(impl Mul<DoubleBigDigit> for BigInt, mul);
++
++impl Mul<BigDigit> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn mul(self, other: BigDigit) -> BigInt {
++        BigInt::from_biguint(self.sign, self.data * other)
++    }
++}
++
++impl Mul<DoubleBigDigit> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn mul(self, other: DoubleBigDigit) -> BigInt {
++        BigInt::from_biguint(self.sign, self.data * other)
++    }
++}
++
++forward_all_scalar_binop_to_val_val_commutative!(impl Mul<i32> for BigInt, mul);
++forward_all_scalar_binop_to_val_val_commutative!(impl Mul<i64> for BigInt, mul);
++
++impl Mul<i32> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn mul(self, other: i32) -> BigInt {
++        if other >= 0 {
++            self * other as u32
++        } else {
++            -(self * i32_abs_as_u32(other))
++        }
++    }
++}
++
++impl Mul<i64> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn mul(self, other: i64) -> BigInt {
++        if other >= 0 {
++            self * other as u64
++        } else {
++            -(self * i64_abs_as_u64(other))
++        }
++    }
++}
++
++forward_all_binop_to_ref_ref!(impl Div for BigInt, div);
++
++impl<'a, 'b> Div<&'b BigInt> for &'a BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn div(self, other: &BigInt) -> BigInt {
++        let (q, _) = self.div_rem(other);
++        q
++    }
++}
++
++promote_all_scalars!(impl Div for BigInt, div);
++forward_all_scalar_binop_to_val_val!(impl Div<BigDigit> for BigInt, div);
++forward_all_scalar_binop_to_val_val!(impl Div<DoubleBigDigit> for BigInt, div);
++
++impl Div<BigDigit> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn div(self, other: BigDigit) -> BigInt {
++        BigInt::from_biguint(self.sign, self.data / other)
++    }
++}
++
++impl Div<BigInt> for BigDigit {
++    type Output = BigInt;
++
++    #[inline]
++    fn div(self, other: BigInt) -> BigInt {
++        BigInt::from_biguint(other.sign, self / other.data)
++    }
++}
++
++impl Div<DoubleBigDigit> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn div(self, other: DoubleBigDigit) -> BigInt {
++        BigInt::from_biguint(self.sign, self.data / other)
++    }
++}
++
++impl Div<BigInt> for DoubleBigDigit {
++    type Output = BigInt;
++
++    #[inline]
++    fn div(self, other: BigInt) -> BigInt {
++        BigInt::from_biguint(other.sign, self / other.data)
++    }
++}
++
++forward_all_scalar_binop_to_val_val!(impl Div<i32> for BigInt, div);
++forward_all_scalar_binop_to_val_val!(impl Div<i64> for BigInt, div);
++
++impl Div<i32> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn div(self, other: i32) -> BigInt {
++        if other >= 0 {
++            self / other as u32
++        } else {
++            -(self / i32_abs_as_u32(other))
++        }
++    }
++}
++
++impl Div<BigInt> for i32 {
++    type Output = BigInt;
++
++    #[inline]
++    fn div(self, other: BigInt) -> BigInt {
++        if self >= 0 {
++            self as u32 / other
++        } else {
++            -(i32_abs_as_u32(self) / other)
++        }
++    }
++}
++
++impl Div<i64> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn div(self, other: i64) -> BigInt {
++        if other >= 0 {
++            self / other as u64
++        } else {
++            -(self / i64_abs_as_u64(other))
++        }
++    }
++}
++
++impl Div<BigInt> for i64 {
++    type Output = BigInt;
++
++    #[inline]
++    fn div(self, other: BigInt) -> BigInt {
++        if self >= 0 {
++            self as u64 / other
++        } else {
++            -(i64_abs_as_u64(self) / other)
++        }
++    }
++}
++
++forward_all_binop_to_ref_ref!(impl Rem for BigInt, rem);
++
++impl<'a, 'b> Rem<&'b BigInt> for &'a BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn rem(self, other: &BigInt) -> BigInt {
++        let (_, r) = self.div_rem(other);
++        r
++    }
++}
++
++promote_all_scalars!(impl Rem for BigInt, rem);
++forward_all_scalar_binop_to_val_val!(impl Rem<BigDigit> for BigInt, rem);
++forward_all_scalar_binop_to_val_val!(impl Rem<DoubleBigDigit> for BigInt, rem);
++
++impl Rem<BigDigit> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn rem(self, other: BigDigit) -> BigInt {
++        BigInt::from_biguint(self.sign, self.data % other)
++    }
++}
++
++impl Rem<BigInt> for BigDigit {
++    type Output = BigInt;
++
++    #[inline]
++    fn rem(self, other: BigInt) -> BigInt {
++        BigInt::from_biguint(Plus, self % other.data)
++    }
++}
++
++impl Rem<DoubleBigDigit> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn rem(self, other: DoubleBigDigit) -> BigInt {
++        BigInt::from_biguint(self.sign, self.data % other)
++    }
++}
++
++impl Rem<BigInt> for DoubleBigDigit {
++    type Output = BigInt;
++
++    #[inline]
++    fn rem(self, other: BigInt) -> BigInt {
++        BigInt::from_biguint(Plus, self % other.data)
++    }
++}
++
++forward_all_scalar_binop_to_val_val!(impl Rem<i32> for BigInt, rem);
++forward_all_scalar_binop_to_val_val!(impl Rem<i64> for BigInt, rem);
++
++impl Rem<i32> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn rem(self, other: i32) -> BigInt {
++        if other >= 0 {
++            self % other as u32
++        } else {
++            self % i32_abs_as_u32(other)
++        }
++    }
++}
++
++impl Rem<BigInt> for i32 {
++    type Output = BigInt;
++
++    #[inline]
++    fn rem(self, other: BigInt) -> BigInt {
++        if self >= 0 {
++            self as u32 % other
++        } else {
++            -(i32_abs_as_u32(self) % other)
++        }
++    }
++}
++
++impl Rem<i64> for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn rem(self, other: i64) -> BigInt {
++        if other >= 0 {
++            self % other as u64
++        } else {
++            self % i64_abs_as_u64(other)
++        }
++    }
++}
++
++impl Rem<BigInt> for i64 {
++    type Output = BigInt;
++
++    #[inline]
++    fn rem(self, other: BigInt) -> BigInt {
++        if self >= 0 {
++            self as u64 % other
++        } else {
++            -(i64_abs_as_u64(self) % other)
++        }
++    }
++}
++
++impl Neg for BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn neg(mut self) -> BigInt {
++        self.sign = -self.sign;
++        self
++    }
++}
++
++impl<'a> Neg for &'a BigInt {
++    type Output = BigInt;
++
++    #[inline]
++    fn neg(self) -> BigInt {
++        -self.clone()
++    }
++}
++
++impl CheckedAdd for BigInt {
++    #[inline]
++    fn checked_add(&self, v: &BigInt) -> Option<BigInt> {
++        return Some(self.add(v));
++    }
++}
++
++impl CheckedSub for BigInt {
++    #[inline]
++    fn checked_sub(&self, v: &BigInt) -> Option<BigInt> {
++        return Some(self.sub(v));
++    }
++}
++
++impl CheckedMul for BigInt {
++    #[inline]
++    fn checked_mul(&self, v: &BigInt) -> Option<BigInt> {
++        return Some(self.mul(v));
++    }
++}
++
++impl CheckedDiv for BigInt {
++    #[inline]
++    fn checked_div(&self, v: &BigInt) -> Option<BigInt> {
++        if v.is_zero() {
++            return None;
++        }
++        return Some(self.div(v));
++    }
++}
++
++impl Integer for BigInt {
++    #[inline]
++    fn div_rem(&self, other: &BigInt) -> (BigInt, BigInt) {
++        // r.sign == self.sign
++        let (d_ui, r_ui) = self.data.div_mod_floor(&other.data);
++        let d = BigInt::from_biguint(self.sign, d_ui);
++        let r = BigInt::from_biguint(self.sign, r_ui);
++        if other.is_negative() {
++            (-d, r)
++        } else {
++            (d, r)
++        }
++    }
++
++    #[inline]
++    fn div_floor(&self, other: &BigInt) -> BigInt {
++        let (d, _) = self.div_mod_floor(other);
++        d
++    }
++
++    #[inline]
++    fn mod_floor(&self, other: &BigInt) -> BigInt {
++        let (_, m) = self.div_mod_floor(other);
++        m
++    }
++
++    fn div_mod_floor(&self, other: &BigInt) -> (BigInt, BigInt) {
++        // m.sign == other.sign
++        let (d_ui, m_ui) = self.data.div_rem(&other.data);
++        let d = BigInt::from_biguint(Plus, d_ui);
++        let m = BigInt::from_biguint(Plus, m_ui);
++        let one: BigInt = One::one();
++        match (self.sign, other.sign) {
++            (_, NoSign) => panic!(),
++            (Plus, Plus) | (NoSign, Plus) => (d, m),
++            (Plus, Minus) | (NoSign, Minus) => {
++                if m.is_zero() {
++                    (-d, Zero::zero())
++                } else {
++                    (-d - one, m + other)
++                }
++            }
++            (Minus, Plus) => {
++                if m.is_zero() {
++                    (-d, Zero::zero())
++                } else {
++                    (-d - one, other - m)
++                }
++            }
++            (Minus, Minus) => (d, -m),
++        }
++    }
++
++    /// Calculates the Greatest Common Divisor (GCD) of the number and `other`.
++    ///
++    /// The result is always positive.
++    #[inline]
++    fn gcd(&self, other: &BigInt) -> BigInt {
++        BigInt::from_biguint(Plus, self.data.gcd(&other.data))
++    }
++
++    /// Calculates the Lowest Common Multiple (LCM) of the number and `other`.
++    #[inline]
++    fn lcm(&self, other: &BigInt) -> BigInt {
++        BigInt::from_biguint(Plus, self.data.lcm(&other.data))
++    }
++
++    /// Deprecated, use `is_multiple_of` instead.
++    #[inline]
++    fn divides(&self, other: &BigInt) -> bool {
++        return self.is_multiple_of(other);
++    }
++
++    /// Returns `true` if the number is a multiple of `other`.
++    #[inline]
++    fn is_multiple_of(&self, other: &BigInt) -> bool {
++        self.data.is_multiple_of(&other.data)
++    }
++
++    /// Returns `true` if the number is divisible by `2`.
++    #[inline]
++    fn is_even(&self) -> bool {
++        self.data.is_even()
++    }
++
++    /// Returns `true` if the number is not divisible by `2`.
++    #[inline]
++    fn is_odd(&self) -> bool {
++        self.data.is_odd()
++    }
++}
++
++impl ToPrimitive for BigInt {
++    #[inline]
++    fn to_i64(&self) -> Option<i64> {
++        match self.sign {
++            Plus => self.data.to_i64(),
++            NoSign => Some(0),
++            Minus => {
++                self.data.to_u64().and_then(|n| {
++                    let m: u64 = 1 << 63;
++                    if n < m {
++                        Some(-(n as i64))
++                    } else if n == m {
++                        Some(i64::MIN)
++                    } else {
++                        None
++                    }
++                })
++            }
++        }
++    }
++
++    #[inline]
++    fn to_u64(&self) -> Option<u64> {
++        match self.sign {
++            Plus => self.data.to_u64(),
++            NoSign => Some(0),
++            Minus => None,
++        }
++    }
++
++    #[inline]
++    fn to_f32(&self) -> Option<f32> {
++        self.data.to_f32().map(|n| {
++            if self.sign == Minus {
++                -n
++            } else {
++                n
++            }
++        })
++    }
++
++    #[inline]
++    fn to_f64(&self) -> Option<f64> {
++        self.data.to_f64().map(|n| {
++            if self.sign == Minus {
++                -n
++            } else {
++                n
++            }
++        })
++    }
++}
++
++impl FromPrimitive for BigInt {
++    #[inline]
++    fn from_i64(n: i64) -> Option<BigInt> {
++        Some(BigInt::from(n))
++    }
++
++    #[inline]
++    fn from_u64(n: u64) -> Option<BigInt> {
++        Some(BigInt::from(n))
++    }
++
++    #[inline]
++    fn from_f64(n: f64) -> Option<BigInt> {
++        if n >= 0.0 {
++            BigUint::from_f64(n).map(|x| BigInt::from_biguint(Plus, x))
++        } else {
++            BigUint::from_f64(-n).map(|x| BigInt::from_biguint(Minus, x))
++        }
++    }
++}
++
++impl From<i64> for BigInt {
++    #[inline]
++    fn from(n: i64) -> Self {
++        if n >= 0 {
++            BigInt::from(n as u64)
++        } else {
++            let u = u64::MAX - (n as u64) + 1;
++            BigInt {
++                sign: Minus,
++                data: BigUint::from(u),
++            }
++        }
++    }
++}
++
++macro_rules! impl_bigint_from_int {
++    ($T:ty) => {
++        impl From<$T> for BigInt {
++            #[inline]
++            fn from(n: $T) -> Self {
++                BigInt::from(n as i64)
++            }
++        }
++    }
++}
++
++impl_bigint_from_int!(i8);
++impl_bigint_from_int!(i16);
++impl_bigint_from_int!(i32);
++impl_bigint_from_int!(isize);
++
++impl From<u64> for BigInt {
++    #[inline]
++    fn from(n: u64) -> Self {
++        if n > 0 {
++            BigInt {
++                sign: Plus,
++                data: BigUint::from(n),
++            }
++        } else {
++            BigInt::zero()
++        }
++    }
++}
++
++macro_rules! impl_bigint_from_uint {
++    ($T:ty) => {
++        impl From<$T> for BigInt {
++            #[inline]
++            fn from(n: $T) -> Self {
++                BigInt::from(n as u64)
++            }
++        }
++    }
++}
++
++impl_bigint_from_uint!(u8);
++impl_bigint_from_uint!(u16);
++impl_bigint_from_uint!(u32);
++impl_bigint_from_uint!(usize);
++
++impl From<BigUint> for BigInt {
++    #[inline]
++    fn from(n: BigUint) -> Self {
++        if n.is_zero() {
++            BigInt::zero()
++        } else {
++            BigInt {
++                sign: Plus,
++                data: n,
++            }
++        }
++    }
++}
++
++#[cfg(feature = "serde")]
++impl serde::Serialize for BigInt {
++    fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error>
++        where S: serde::Serializer
++    {
++        (self.sign, &self.data).serialize(serializer)
++    }
++}
++
++#[cfg(feature = "serde")]
++impl serde::Deserialize for BigInt {
++    fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error>
++        where D: serde::Deserializer
++    {
++        let (sign, data) = try!(serde::Deserialize::deserialize(deserializer));
++        Ok(BigInt {
++            sign: sign,
++            data: data,
++        })
++    }
++}
++
++/// A generic trait for converting a value to a `BigInt`.
++pub trait ToBigInt {
++    /// Converts the value of `self` to a `BigInt`.
++    fn to_bigint(&self) -> Option<BigInt>;
++}
++
++impl ToBigInt for BigInt {
++    #[inline]
++    fn to_bigint(&self) -> Option<BigInt> {
++        Some(self.clone())
++    }
++}
++
++impl ToBigInt for BigUint {
++    #[inline]
++    fn to_bigint(&self) -> Option<BigInt> {
++        if self.is_zero() {
++            Some(Zero::zero())
++        } else {
++            Some(BigInt {
++                sign: Plus,
++                data: self.clone(),
++            })
++        }
++    }
++}
++
++impl biguint::ToBigUint for BigInt {
++    #[inline]
++    fn to_biguint(&self) -> Option<BigUint> {
++        match self.sign() {
++            Plus    => Some(self.data.clone()),
++            NoSign  => Some(Zero::zero()),
++            Minus   => None,
++        }
++    }
++}
++
++macro_rules! impl_to_bigint {
++    ($T:ty, $from_ty:path) => {
++        impl ToBigInt for $T {
++            #[inline]
++            fn to_bigint(&self) -> Option<BigInt> {
++                $from_ty(*self)
++            }
++        }
++    }
++}
++
++impl_to_bigint!(isize, FromPrimitive::from_isize);
++impl_to_bigint!(i8, FromPrimitive::from_i8);
++impl_to_bigint!(i16, FromPrimitive::from_i16);
++impl_to_bigint!(i32, FromPrimitive::from_i32);
++impl_to_bigint!(i64, FromPrimitive::from_i64);
++impl_to_bigint!(usize, FromPrimitive::from_usize);
++impl_to_bigint!(u8, FromPrimitive::from_u8);
++impl_to_bigint!(u16, FromPrimitive::from_u16);
++impl_to_bigint!(u32, FromPrimitive::from_u32);
++impl_to_bigint!(u64, FromPrimitive::from_u64);
++impl_to_bigint!(f32, FromPrimitive::from_f32);
++impl_to_bigint!(f64, FromPrimitive::from_f64);
++
++pub trait RandBigInt {
++    /// Generate a random `BigUint` of the given bit size.
++    fn gen_biguint(&mut self, bit_size: usize) -> BigUint;
++
++    /// Generate a random BigInt of the given bit size.
++    fn gen_bigint(&mut self, bit_size: usize) -> BigInt;
++
++    /// Generate a random `BigUint` less than the given bound. Fails
++    /// when the bound is zero.
++    fn gen_biguint_below(&mut self, bound: &BigUint) -> BigUint;
++
++    /// Generate a random `BigUint` within the given range. The lower
++    /// bound is inclusive; the upper bound is exclusive. Fails when
++    /// the upper bound is not greater than the lower bound.
++    fn gen_biguint_range(&mut self, lbound: &BigUint, ubound: &BigUint) -> BigUint;
++
++    /// Generate a random `BigInt` within the given range. The lower
++    /// bound is inclusive; the upper bound is exclusive. Fails when
++    /// the upper bound is not greater than the lower bound.
++    fn gen_bigint_range(&mut self, lbound: &BigInt, ubound: &BigInt) -> BigInt;
++}
++
++#[cfg(any(feature = "rand", test))]
++impl<R: Rng> RandBigInt for R {
++    fn gen_biguint(&mut self, bit_size: usize) -> BigUint {
++        let (digits, rem) = bit_size.div_rem(&big_digit::BITS);
++        let mut data = Vec::with_capacity(digits + 1);
++        for _ in 0..digits {
++            data.push(self.gen());
++        }
++        if rem > 0 {
++            let final_digit: BigDigit = self.gen();
++            data.push(final_digit >> (big_digit::BITS - rem));
++        }
++        BigUint::new(data)
++    }
++
++    fn gen_bigint(&mut self, bit_size: usize) -> BigInt {
++        // Generate a random BigUint...
++        let biguint = self.gen_biguint(bit_size);
++        // ...and then randomly assign it a Sign...
++        let sign = if biguint.is_zero() {
++            // ...except that if the BigUint is zero, we need to try
++            // again with probability 0.5. This is because otherwise,
++            // the probability of generating a zero BigInt would be
++            // double that of any other number.
++            if self.gen() {
++                return self.gen_bigint(bit_size);
++            } else {
++                NoSign
++            }
++        } else if self.gen() {
++            Plus
++        } else {
++            Minus
++        };
++        BigInt::from_biguint(sign, biguint)
++    }
++
++    fn gen_biguint_below(&mut self, bound: &BigUint) -> BigUint {
++        assert!(!bound.is_zero());
++        let bits = bound.bits();
++        loop {
++            let n = self.gen_biguint(bits);
++            if n < *bound {
++                return n;
++            }
++        }
++    }
++
++    fn gen_biguint_range(&mut self, lbound: &BigUint, ubound: &BigUint) -> BigUint {
++        assert!(*lbound < *ubound);
++        return lbound + self.gen_biguint_below(&(ubound - lbound));
++    }
++
++    fn gen_bigint_range(&mut self, lbound: &BigInt, ubound: &BigInt) -> BigInt {
++        assert!(*lbound < *ubound);
++        let delta = (ubound - lbound).to_biguint().unwrap();
++        return lbound + self.gen_biguint_below(&delta).to_bigint().unwrap();
++    }
++}
++
++impl BigInt {
++    /// Creates and initializes a BigInt.
++    ///
++    /// The digits are in little-endian base 2^32.
++    #[inline]
++    pub fn new(sign: Sign, digits: Vec<BigDigit>) -> BigInt {
++        BigInt::from_biguint(sign, BigUint::new(digits))
++    }
++
++    /// Creates and initializes a `BigInt`.
++    ///
++    /// The digits are in little-endian base 2^32.
++    #[inline]
++    pub fn from_biguint(sign: Sign, data: BigUint) -> BigInt {
++        if sign == NoSign || data.is_zero() {
++            return BigInt {
++                sign: NoSign,
++                data: Zero::zero(),
++            };
++        }
++        BigInt {
++            sign: sign,
++            data: data,
++        }
++    }
++
++    /// Creates and initializes a `BigInt`.
++    #[inline]
++    pub fn from_slice(sign: Sign, slice: &[BigDigit]) -> BigInt {
++        BigInt::from_biguint(sign, BigUint::from_slice(slice))
++    }
++
++    /// Creates and initializes a `BigInt`.
++    ///
++    /// The bytes are in big-endian byte order.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::{BigInt, Sign};
++    ///
++    /// assert_eq!(BigInt::from_bytes_be(Sign::Plus, b"A"),
++    ///            BigInt::parse_bytes(b"65", 10).unwrap());
++    /// assert_eq!(BigInt::from_bytes_be(Sign::Plus, b"AA"),
++    ///            BigInt::parse_bytes(b"16705", 10).unwrap());
++    /// assert_eq!(BigInt::from_bytes_be(Sign::Plus, b"AB"),
++    ///            BigInt::parse_bytes(b"16706", 10).unwrap());
++    /// assert_eq!(BigInt::from_bytes_be(Sign::Plus, b"Hello world!"),
++    ///            BigInt::parse_bytes(b"22405534230753963835153736737", 10).unwrap());
++    /// ```
++    #[inline]
++    pub fn from_bytes_be(sign: Sign, bytes: &[u8]) -> BigInt {
++        BigInt::from_biguint(sign, BigUint::from_bytes_be(bytes))
++    }
++
++    /// Creates and initializes a `BigInt`.
++    ///
++    /// The bytes are in little-endian byte order.
++    #[inline]
++    pub fn from_bytes_le(sign: Sign, bytes: &[u8]) -> BigInt {
++        BigInt::from_biguint(sign, BigUint::from_bytes_le(bytes))
++    }
++
++    /// Creates and initializes a `BigInt` from an array of bytes in
++    /// two's complement binary representation.
++    ///
++    /// The digits are in big-endian base 2^8.
++    #[inline]
++    pub fn from_signed_bytes_be(digits: &[u8]) -> BigInt {
++        let sign = match digits.first() {
++            Some(v) if *v > 0x7f => Sign::Minus,
++            Some(_) => Sign::Plus,
++            None => return BigInt::zero(),
++        };
++
++        if sign == Sign::Minus {
++            // two's-complement the content to retrieve the magnitude
++            let mut digits = Vec::from(digits);
++            twos_complement_be(&mut digits);
++            BigInt::from_biguint(sign, BigUint::from_bytes_be(&*digits))
++        } else {
++            BigInt::from_biguint(sign, BigUint::from_bytes_be(digits))
++        }
++    }
++
++    /// Creates and initializes a `BigInt` from an array of bytes in two's complement.
++    ///
++    /// The digits are in little-endian base 2^8.
++    #[inline]
++    pub fn from_signed_bytes_le(digits: &[u8]) -> BigInt {
++        let sign = match digits.last() {
++            Some(v) if *v > 0x7f => Sign::Minus,
++            Some(_) => Sign::Plus,
++            None => return BigInt::zero(),
++        };
++
++        if sign == Sign::Minus {
++            // two's-complement the content to retrieve the magnitude
++            let mut digits = Vec::from(digits);
++            twos_complement_le(&mut digits);
++            BigInt::from_biguint(sign, BigUint::from_bytes_le(&*digits))
++        } else {
++            BigInt::from_biguint(sign, BigUint::from_bytes_le(digits))
++        }
++    }
++
++    /// Creates and initializes a `BigInt`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::{BigInt, ToBigInt};
++    ///
++    /// assert_eq!(BigInt::parse_bytes(b"1234", 10), ToBigInt::to_bigint(&1234));
++    /// assert_eq!(BigInt::parse_bytes(b"ABCD", 16), ToBigInt::to_bigint(&0xABCD));
++    /// assert_eq!(BigInt::parse_bytes(b"G", 16), None);
++    /// ```
++    #[inline]
++    pub fn parse_bytes(buf: &[u8], radix: u32) -> Option<BigInt> {
++        str::from_utf8(buf).ok().and_then(|s| BigInt::from_str_radix(s, radix).ok())
++    }
++
++    /// Creates and initializes a `BigInt`. Each u8 of the input slice is
++    /// interpreted as one digit of the number
++    /// and must therefore be less than `radix`.
++    ///
++    /// The bytes are in big-endian byte order.
++    /// `radix` must be in the range `2...256`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::{BigInt, Sign};
++    ///
++    /// let inbase190 = vec![15, 33, 125, 12, 14];
++    /// let a = BigInt::from_radix_be(Sign::Minus, &inbase190, 190).unwrap();
++    /// assert_eq!(a.to_radix_be(190), (Sign:: Minus, inbase190));
++    /// ```
++    pub fn from_radix_be(sign: Sign, buf: &[u8], radix: u32) -> Option<BigInt> {
++        BigUint::from_radix_be(buf, radix).map(|u| BigInt::from_biguint(sign, u))
++    }
++
++    /// Creates and initializes a `BigInt`. Each u8 of the input slice is
++    /// interpreted as one digit of the number
++    /// and must therefore be less than `radix`.
++    ///
++    /// The bytes are in little-endian byte order.
++    /// `radix` must be in the range `2...256`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::{BigInt, Sign};
++    ///
++    /// let inbase190 = vec![14, 12, 125, 33, 15];
++    /// let a = BigInt::from_radix_be(Sign::Minus, &inbase190, 190).unwrap();
++    /// assert_eq!(a.to_radix_be(190), (Sign::Minus, inbase190));
++    /// ```
++    pub fn from_radix_le(sign: Sign, buf: &[u8], radix: u32) -> Option<BigInt> {
++        BigUint::from_radix_le(buf, radix).map(|u| BigInt::from_biguint(sign, u))
++    }
++
++    /// Returns the sign and the byte representation of the `BigInt` in big-endian byte order.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::{ToBigInt, Sign};
++    ///
++    /// let i = -1125.to_bigint().unwrap();
++    /// assert_eq!(i.to_bytes_be(), (Sign::Minus, vec![4, 101]));
++    /// ```
++    #[inline]
++    pub fn to_bytes_be(&self) -> (Sign, Vec<u8>) {
++        (self.sign, self.data.to_bytes_be())
++    }
++
++    /// Returns the sign and the byte representation of the `BigInt` in little-endian byte order.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::{ToBigInt, Sign};
++    ///
++    /// let i = -1125.to_bigint().unwrap();
++    /// assert_eq!(i.to_bytes_le(), (Sign::Minus, vec![101, 4]));
++    /// ```
++    #[inline]
++    pub fn to_bytes_le(&self) -> (Sign, Vec<u8>) {
++        (self.sign, self.data.to_bytes_le())
++    }
++
++    /// Returns the two's complement byte representation of the `BigInt` in big-endian byte order.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::ToBigInt;
++    ///
++    /// let i = -1125.to_bigint().unwrap();
++    /// assert_eq!(i.to_signed_bytes_be(), vec![251, 155]);
++    /// ```
++    #[inline]
++    pub fn to_signed_bytes_be(&self) -> Vec<u8> {
++        let mut bytes = self.data.to_bytes_be();
++        let first_byte = bytes.first().map(|v| *v).unwrap_or(0);
++        if first_byte > 0x7f && !(first_byte == 0x80 && bytes.iter().skip(1).all(Zero::is_zero)) {
++            // msb used by magnitude, extend by 1 byte
++            bytes.insert(0, 0);
++        }
++        if self.sign == Sign::Minus {
++            twos_complement_be(&mut bytes);
++        }
++        bytes
++    }
++
++    /// Returns the two's complement byte representation of the `BigInt` in little-endian byte order.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::ToBigInt;
++    ///
++    /// let i = -1125.to_bigint().unwrap();
++    /// assert_eq!(i.to_signed_bytes_le(), vec![155, 251]);
++    /// ```
++    #[inline]
++    pub fn to_signed_bytes_le(&self) -> Vec<u8> {
++        let mut bytes = self.data.to_bytes_le();
++        let last_byte = bytes.last().map(|v| *v).unwrap_or(0);
++        if last_byte > 0x7f && !(last_byte == 0x80 && bytes.iter().rev().skip(1).all(Zero::is_zero)) {
++            // msb used by magnitude, extend by 1 byte
++            bytes.push(0);
++        }
++        if self.sign == Sign::Minus {
++            twos_complement_le(&mut bytes);
++        }
++        bytes
++    }
++
++    /// Returns the integer formatted as a string in the given radix.
++    /// `radix` must be in the range `2...36`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::BigInt;
++    ///
++    /// let i = BigInt::parse_bytes(b"ff", 16).unwrap();
++    /// assert_eq!(i.to_str_radix(16), "ff");
++    /// ```
++    #[inline]
++    pub fn to_str_radix(&self, radix: u32) -> String {
++        let mut v = to_str_radix_reversed(&self.data, radix);
++
++        if self.is_negative() {
++            v.push(b'-');
++        }
++
++        v.reverse();
++        unsafe { String::from_utf8_unchecked(v) }
++    }
++
++    /// Returns the integer in the requested base in big-endian digit order.
++    /// The output is not given in a human readable alphabet but as a zero
++    /// based u8 number.
++    /// `radix` must be in the range `2...256`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::{BigInt, Sign};
++    ///
++    /// assert_eq!(BigInt::from(-0xFFFFi64).to_radix_be(159),
++    ///            (Sign::Minus, vec![2, 94, 27]));
++    /// // 0xFFFF = 65535 = 2*(159^2) + 94*159 + 27
++    /// ```
++    #[inline]
++    pub fn to_radix_be(&self, radix: u32) -> (Sign, Vec<u8>) {
++        (self.sign, self.data.to_radix_be(radix))
++    }
++
++    /// Returns the integer in the requested base in little-endian digit order.
++    /// The output is not given in a human readable alphabet but as a zero
++    /// based u8 number.
++    /// `radix` must be in the range `2...256`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::{BigInt, Sign};
++    ///
++    /// assert_eq!(BigInt::from(-0xFFFFi64).to_radix_le(159),
++    ///            (Sign::Minus, vec![27, 94, 2]));
++    /// // 0xFFFF = 65535 = 27 + 94*159 + 2*(159^2)
++    /// ```
++    #[inline]
++    pub fn to_radix_le(&self, radix: u32) -> (Sign, Vec<u8>) {
++        (self.sign, self.data.to_radix_le(radix))
++    }
++
++    /// Returns the sign of the `BigInt` as a `Sign`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::{ToBigInt, Sign};
++    ///
++    /// assert_eq!(ToBigInt::to_bigint(&1234).unwrap().sign(), Sign::Plus);
++    /// assert_eq!(ToBigInt::to_bigint(&-4321).unwrap().sign(), Sign::Minus);
++    /// assert_eq!(ToBigInt::to_bigint(&0).unwrap().sign(), Sign::NoSign);
++    /// ```
++    #[inline]
++    pub fn sign(&self) -> Sign {
++        self.sign
++    }
++
++    /// Determines the fewest bits necessary to express the `BigInt`,
++    /// not including the sign.
++    #[inline]
++    pub fn bits(&self) -> usize {
++        self.data.bits()
++    }
++
++    /// Converts this `BigInt` into a `BigUint`, if it's not negative.
++    #[inline]
++    pub fn to_biguint(&self) -> Option<BigUint> {
++        match self.sign {
++            Plus => Some(self.data.clone()),
++            NoSign => Some(Zero::zero()),
++            Minus => None,
++        }
++    }
++
++    #[inline]
++    pub fn checked_add(&self, v: &BigInt) -> Option<BigInt> {
++        return Some(self.add(v));
++    }
++
++    #[inline]
++    pub fn checked_sub(&self, v: &BigInt) -> Option<BigInt> {
++        return Some(self.sub(v));
++    }
++
++    #[inline]
++    pub fn checked_mul(&self, v: &BigInt) -> Option<BigInt> {
++        return Some(self.mul(v));
++    }
++
++    #[inline]
++    pub fn checked_div(&self, v: &BigInt) -> Option<BigInt> {
++        if v.is_zero() {
++            return None;
++        }
++        return Some(self.div(v));
++    }
++}
++
++/// Perform in-place two's complement of the given binary representation,
++/// in little-endian byte order.
++#[inline]
++fn twos_complement_le(digits: &mut [u8]) {
++    twos_complement(digits)
++}
++
++/// Perform in-place two's complement of the given binary representation
++/// in big-endian byte order.
++#[inline]
++fn twos_complement_be(digits: &mut [u8]) {
++    twos_complement(digits.iter_mut().rev())
++}
++
++/// Perform in-place two's complement of the given digit iterator
++/// starting from the least significant byte.
++#[inline]
++fn twos_complement<'a, I>(digits: I)
++    where I: IntoIterator<Item = &'a mut u8>
++{
++    let mut carry = true;
++    for mut d in digits {
++        *d = d.not();
++        if carry {
++            *d = d.wrapping_add(1);
++            carry = d.is_zero();
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2c2d04688b36663cab73fe349fa72f3bd183bd26
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2030 @@@
++use std::borrow::Cow;
++use std::default::Default;
++use std::iter::repeat;
++use std::ops::{Add, BitAnd, BitOr, BitXor, Div, Mul, Neg, Rem, Shl, Shr, Sub};
++use std::str::{self, FromStr};
++use std::fmt;
++use std::cmp;
++use std::cmp::Ordering::{self, Less, Greater, Equal};
++use std::{f32, f64};
++use std::{u8, u64};
++use std::ascii::AsciiExt;
++
++#[cfg(feature = "serde")]
++use serde;
++
++use integer::Integer;
++use traits::{ToPrimitive, FromPrimitive, Float, Num, Unsigned, CheckedAdd, CheckedSub, CheckedMul,
++             CheckedDiv, Zero, One};
++
++#[path = "algorithms.rs"]
++mod algorithms;
++pub use self::algorithms::big_digit;
++pub use self::big_digit::{BigDigit, DoubleBigDigit, ZERO_BIG_DIGIT};
++
++use self::algorithms::{mac_with_carry, mul3, scalar_mul, div_rem, div_rem_digit};
++use self::algorithms::{__add2, add2, sub2, sub2rev};
++use self::algorithms::{biguint_shl, biguint_shr};
++use self::algorithms::{cmp_slice, fls, ilog2};
++
++use UsizePromotion;
++
++use ParseBigIntError;
++
++#[cfg(test)]
++#[path = "tests/biguint.rs"]
++mod biguint_tests;
++
++/// A big unsigned integer type.
++///
++/// A `BigUint`-typed value `BigUint { data: vec!(a, b, c) }` represents a number
++/// `(a + b * big_digit::BASE + c * big_digit::BASE^2)`.
++#[derive(Clone, Debug, Hash)]
++#[cfg_attr(feature = "rustc-serialize", derive(RustcEncodable, RustcDecodable))]
++pub struct BigUint {
++    data: Vec<BigDigit>,
++}
++
++impl PartialEq for BigUint {
++    #[inline]
++    fn eq(&self, other: &BigUint) -> bool {
++        match self.cmp(other) {
++            Equal => true,
++            _ => false,
++        }
++    }
++}
++impl Eq for BigUint {}
++
++impl PartialOrd for BigUint {
++    #[inline]
++    fn partial_cmp(&self, other: &BigUint) -> Option<Ordering> {
++        Some(self.cmp(other))
++    }
++}
++
++impl Ord for BigUint {
++    #[inline]
++    fn cmp(&self, other: &BigUint) -> Ordering {
++        cmp_slice(&self.data[..], &other.data[..])
++    }
++}
++
++impl Default for BigUint {
++    #[inline]
++    fn default() -> BigUint {
++        Zero::zero()
++    }
++}
++
++impl fmt::Display for BigUint {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.pad_integral(true, "", &self.to_str_radix(10))
++    }
++}
++
++impl fmt::LowerHex for BigUint {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.pad_integral(true, "0x", &self.to_str_radix(16))
++    }
++}
++
++impl fmt::UpperHex for BigUint {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.pad_integral(true, "0x", &self.to_str_radix(16).to_ascii_uppercase())
++    }
++}
++
++impl fmt::Binary for BigUint {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.pad_integral(true, "0b", &self.to_str_radix(2))
++    }
++}
++
++impl fmt::Octal for BigUint {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        f.pad_integral(true, "0o", &self.to_str_radix(8))
++    }
++}
++
++impl FromStr for BigUint {
++    type Err = ParseBigIntError;
++
++    #[inline]
++    fn from_str(s: &str) -> Result<BigUint, ParseBigIntError> {
++        BigUint::from_str_radix(s, 10)
++    }
++}
++
++// Convert from a power of two radix (bits == ilog2(radix)) where bits evenly divides
++// BigDigit::BITS
++fn from_bitwise_digits_le(v: &[u8], bits: usize) -> BigUint {
++    debug_assert!(!v.is_empty() && bits <= 8 && big_digit::BITS % bits == 0);
++    debug_assert!(v.iter().all(|&c| (c as BigDigit) < (1 << bits)));
++
++    let digits_per_big_digit = big_digit::BITS / bits;
++
++    let data = v.chunks(digits_per_big_digit)
++                .map(|chunk| {
++                    chunk.iter().rev().fold(0, |acc, &c| (acc << bits) | c as BigDigit)
++                })
++                .collect();
++
++    BigUint::new(data)
++}
++
++// Convert from a power of two radix (bits == ilog2(radix)) where bits doesn't evenly divide
++// BigDigit::BITS
++fn from_inexact_bitwise_digits_le(v: &[u8], bits: usize) -> BigUint {
++    debug_assert!(!v.is_empty() && bits <= 8 && big_digit::BITS % bits != 0);
++    debug_assert!(v.iter().all(|&c| (c as BigDigit) < (1 << bits)));
++
++    let big_digits = (v.len() * bits + big_digit::BITS - 1) / big_digit::BITS;
++    let mut data = Vec::with_capacity(big_digits);
++
++    let mut d = 0;
++    let mut dbits = 0; // number of bits we currently have in d
++
++    // walk v accumululating bits in d; whenever we accumulate big_digit::BITS in d, spit out a
++    // big_digit:
++    for &c in v {
++        d |= (c as BigDigit) << dbits;
++        dbits += bits;
++
++        if dbits >= big_digit::BITS {
++            data.push(d);
++            dbits -= big_digit::BITS;
++            // if dbits was > big_digit::BITS, we dropped some of the bits in c (they couldn't fit
++            // in d) - grab the bits we lost here:
++            d = (c as BigDigit) >> (bits - dbits);
++        }
++    }
++
++    if dbits > 0 {
++        debug_assert!(dbits < big_digit::BITS);
++        data.push(d as BigDigit);
++    }
++
++    BigUint::new(data)
++}
++
++// Read little-endian radix digits
++fn from_radix_digits_be(v: &[u8], radix: u32) -> BigUint {
++    debug_assert!(!v.is_empty() && !radix.is_power_of_two());
++    debug_assert!(v.iter().all(|&c| (c as u32) < radix));
++
++    // Estimate how big the result will be, so we can pre-allocate it.
++    let bits = (radix as f64).log2() * v.len() as f64;
++    let big_digits = (bits / big_digit::BITS as f64).ceil();
++    let mut data = Vec::with_capacity(big_digits as usize);
++
++    let (base, power) = get_radix_base(radix);
++    let radix = radix as BigDigit;
++
++    let r = v.len() % power;
++    let i = if r == 0 {
++        power
++    } else {
++        r
++    };
++    let (head, tail) = v.split_at(i);
++
++    let first = head.iter().fold(0, |acc, &d| acc * radix + d as BigDigit);
++    data.push(first);
++
++    debug_assert!(tail.len() % power == 0);
++    for chunk in tail.chunks(power) {
++        if data.last() != Some(&0) {
++            data.push(0);
++        }
++
++        let mut carry = 0;
++        for d in data.iter_mut() {
++            *d = mac_with_carry(0, *d, base, &mut carry);
++        }
++        debug_assert!(carry == 0);
++
++        let n = chunk.iter().fold(0, |acc, &d| acc * radix + d as BigDigit);
++        add2(&mut data, &[n]);
++    }
++
++    BigUint::new(data)
++}
++
++impl Num for BigUint {
++    type FromStrRadixErr = ParseBigIntError;
++
++    /// Creates and initializes a `BigUint`.
++    fn from_str_radix(s: &str, radix: u32) -> Result<BigUint, ParseBigIntError> {
++        assert!(2 <= radix && radix <= 36, "The radix must be within 2...36");
++        let mut s = s;
++        if s.starts_with('+') {
++            let tail = &s[1..];
++            if !tail.starts_with('+') {
++                s = tail
++            }
++        }
++
++        if s.is_empty() {
++            // create ParseIntError::Empty
++            let e = u64::from_str_radix(s, radix).unwrap_err();
++            return Err(e.into());
++        }
++
++        // First normalize all characters to plain digit values
++        let mut v = Vec::with_capacity(s.len());
++        for b in s.bytes() {
++            let d = match b {
++                b'0'...b'9' => b - b'0',
++                b'a'...b'z' => b - b'a' + 10,
++                b'A'...b'Z' => b - b'A' + 10,
++                _ => u8::MAX,
++            };
++            if d < radix as u8 {
++                v.push(d);
++            } else {
++                // create ParseIntError::InvalidDigit
++                // Include the previous character for context.
++                let i = cmp::max(v.len(), 1) - 1;
++                let e = u64::from_str_radix(&s[i..], radix).unwrap_err();
++                return Err(e.into());
++            }
++        }
++
++        let res = if radix.is_power_of_two() {
++            // Powers of two can use bitwise masks and shifting instead of multiplication
++            let bits = ilog2(radix);
++            v.reverse();
++            if big_digit::BITS % bits == 0 {
++                from_bitwise_digits_le(&v, bits)
++            } else {
++                from_inexact_bitwise_digits_le(&v, bits)
++            }
++        } else {
++            from_radix_digits_be(&v, radix)
++        };
++        Ok(res)
++    }
++}
++
++forward_all_binop_to_val_ref_commutative!(impl BitAnd for BigUint, bitand);
++
++impl<'a> BitAnd<&'a BigUint> for BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn bitand(self, other: &BigUint) -> BigUint {
++        let mut data = self.data;
++        for (ai, &bi) in data.iter_mut().zip(other.data.iter()) {
++            *ai &= bi;
++        }
++        data.truncate(other.data.len());
++        BigUint::new(data)
++    }
++}
++
++forward_all_binop_to_val_ref_commutative!(impl BitOr for BigUint, bitor);
++
++impl<'a> BitOr<&'a BigUint> for BigUint {
++    type Output = BigUint;
++
++    fn bitor(self, other: &BigUint) -> BigUint {
++        let mut data = self.data;
++        for (ai, &bi) in data.iter_mut().zip(other.data.iter()) {
++            *ai |= bi;
++        }
++        if other.data.len() > data.len() {
++            let extra = &other.data[data.len()..];
++            data.extend(extra.iter().cloned());
++        }
++        BigUint::new(data)
++    }
++}
++
++forward_all_binop_to_val_ref_commutative!(impl BitXor for BigUint, bitxor);
++
++impl<'a> BitXor<&'a BigUint> for BigUint {
++    type Output = BigUint;
++
++    fn bitxor(self, other: &BigUint) -> BigUint {
++        let mut data = self.data;
++        for (ai, &bi) in data.iter_mut().zip(other.data.iter()) {
++            *ai ^= bi;
++        }
++        if other.data.len() > data.len() {
++            let extra = &other.data[data.len()..];
++            data.extend(extra.iter().cloned());
++        }
++        BigUint::new(data)
++    }
++}
++
++impl Shl<usize> for BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn shl(self, rhs: usize) -> BigUint {
++        biguint_shl(Cow::Owned(self), rhs)
++    }
++}
++
++impl<'a> Shl<usize> for &'a BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn shl(self, rhs: usize) -> BigUint {
++        biguint_shl(Cow::Borrowed(self), rhs)
++    }
++}
++
++impl Shr<usize> for BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn shr(self, rhs: usize) -> BigUint {
++        biguint_shr(Cow::Owned(self), rhs)
++    }
++}
++
++impl<'a> Shr<usize> for &'a BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn shr(self, rhs: usize) -> BigUint {
++        biguint_shr(Cow::Borrowed(self), rhs)
++    }
++}
++
++impl Zero for BigUint {
++    #[inline]
++    fn zero() -> BigUint {
++        BigUint::new(Vec::new())
++    }
++
++    #[inline]
++    fn is_zero(&self) -> bool {
++        self.data.is_empty()
++    }
++}
++
++impl One for BigUint {
++    #[inline]
++    fn one() -> BigUint {
++        BigUint::new(vec![1])
++    }
++}
++
++impl Unsigned for BigUint {}
++
++forward_all_binop_to_val_ref_commutative!(impl Add for BigUint, add);
++
++impl<'a> Add<&'a BigUint> for BigUint {
++    type Output = BigUint;
++
++    fn add(mut self, other: &BigUint) -> BigUint {
++        if self.data.len() < other.data.len() {
++            let extra = other.data.len() - self.data.len();
++            self.data.extend(repeat(0).take(extra));
++        }
++
++        let carry = __add2(&mut self.data[..], &other.data[..]);
++        if carry != 0 {
++            self.data.push(carry);
++        }
++
++        self
++    }
++}
++
++promote_unsigned_scalars!(impl Add for BigUint, add);
++forward_all_scalar_binop_to_val_val_commutative!(impl Add<BigDigit> for BigUint, add);
++forward_all_scalar_binop_to_val_val_commutative!(impl Add<DoubleBigDigit> for BigUint, add);
++
++impl Add<BigDigit> for BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn add(mut self, other: BigDigit) -> BigUint {
++        if other != 0 {
++            if self.data.len() == 0 {
++                self.data.push(0);
++            }
++
++            let carry = __add2(&mut self.data, &[other]);
++            if carry != 0 {
++                self.data.push(carry);
++            }
++        }
++        self
++    }
++}
++
++impl Add<DoubleBigDigit> for BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn add(mut self, other: DoubleBigDigit) -> BigUint {
++        let (hi, lo) = big_digit::from_doublebigdigit(other);
++        if hi == 0 {
++            self + lo
++        } else {
++            while self.data.len() < 2 {
++                self.data.push(0);
++            }
++
++            let carry = __add2(&mut self.data, &[lo, hi]);
++            if carry != 0 {
++                self.data.push(carry);
++            }
++            self
++        }
++    }
++}
++
++forward_val_val_binop!(impl Sub for BigUint, sub);
++forward_ref_ref_binop!(impl Sub for BigUint, sub);
++
++impl<'a> Sub<&'a BigUint> for BigUint {
++    type Output = BigUint;
++
++    fn sub(mut self, other: &BigUint) -> BigUint {
++        sub2(&mut self.data[..], &other.data[..]);
++        self.normalize()
++    }
++}
++
++impl<'a> Sub<BigUint> for &'a BigUint {
++    type Output = BigUint;
++
++    fn sub(self, mut other: BigUint) -> BigUint {
++        if other.data.len() < self.data.len() {
++            let extra = self.data.len() - other.data.len();
++            other.data.extend(repeat(0).take(extra));
++        }
++
++        sub2rev(&self.data[..], &mut other.data[..]);
++        other.normalize()
++    }
++}
++
++promote_unsigned_scalars!(impl Sub for BigUint, sub);
++forward_all_scalar_binop_to_val_val!(impl Sub<BigDigit> for BigUint, sub);
++forward_all_scalar_binop_to_val_val!(impl Sub<DoubleBigDigit> for BigUint, sub);
++
++impl Sub<BigDigit> for BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn sub(mut self, other: BigDigit) -> BigUint {
++        sub2(&mut self.data[..], &[other]);
++        self.normalize()
++    }
++}
++
++impl Sub<BigUint> for BigDigit {
++    type Output = BigUint;
++
++    #[inline]
++    fn sub(self, mut other: BigUint) -> BigUint {
++        if other.data.len() == 0 {
++            other.data.push(0);
++        }
++
++        sub2rev(&[self], &mut other.data[..]);
++        other.normalize()
++    }
++}
++
++impl Sub<DoubleBigDigit> for BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn sub(mut self, other: DoubleBigDigit) -> BigUint {
++        let (hi, lo) = big_digit::from_doublebigdigit(other);
++        sub2(&mut self.data[..], &[lo, hi]);
++        self.normalize()
++    }
++}
++
++impl Sub<BigUint> for DoubleBigDigit {
++    type Output = BigUint;
++
++    #[inline]
++    fn sub(self, mut other: BigUint) -> BigUint {
++        while other.data.len() < 2 {
++            other.data.push(0);
++        }
++
++        let (hi, lo) = big_digit::from_doublebigdigit(self);
++        sub2rev(&[lo, hi], &mut other.data[..]);
++        other.normalize()
++    }
++}
++
++forward_all_binop_to_ref_ref!(impl Mul for BigUint, mul);
++
++impl<'a, 'b> Mul<&'b BigUint> for &'a BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn mul(self, other: &BigUint) -> BigUint {
++        mul3(&self.data[..], &other.data[..])
++    }
++}
++
++promote_unsigned_scalars!(impl Mul for BigUint, mul);
++forward_all_scalar_binop_to_val_val_commutative!(impl Mul<BigDigit> for BigUint, mul);
++forward_all_scalar_binop_to_val_val_commutative!(impl Mul<DoubleBigDigit> for BigUint, mul);
++
++impl Mul<BigDigit> for BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn mul(mut self, other: BigDigit) -> BigUint {
++        if other == 0 {
++            self.data.clear();
++        } else {
++            let carry = scalar_mul(&mut self.data[..], other);
++            if carry != 0 {
++                self.data.push(carry);
++            }
++        }
++        self
++    }
++}
++
++impl Mul<DoubleBigDigit> for BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn mul(mut self, other: DoubleBigDigit) -> BigUint {
++        if other == 0 {
++            self.data.clear();
++            self
++        } else if other <= BigDigit::max_value() as DoubleBigDigit {
++            self * other as BigDigit
++        } else {
++            let (hi, lo) = big_digit::from_doublebigdigit(other);
++            mul3(&self.data[..], &[lo, hi])
++        }
++    }
++}
++
++forward_all_binop_to_ref_ref!(impl Div for BigUint, div);
++
++impl<'a, 'b> Div<&'b BigUint> for &'a BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn div(self, other: &BigUint) -> BigUint {
++        let (q, _) = self.div_rem(other);
++        q
++    }
++}
++
++promote_unsigned_scalars!(impl Div for BigUint, div);
++forward_all_scalar_binop_to_val_val!(impl Div<BigDigit> for BigUint, div);
++forward_all_scalar_binop_to_val_val!(impl Div<DoubleBigDigit> for BigUint, div);
++
++impl Div<BigDigit> for BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn div(self, other: BigDigit) -> BigUint {
++        let (q, _) = div_rem_digit(self, other);
++        q
++    }
++}
++
++impl Div<BigUint> for BigDigit {
++    type Output = BigUint;
++
++    #[inline]
++    fn div(self, other: BigUint) -> BigUint {
++        match other.data.len() {
++            0 => panic!(),
++            1 => From::from(self / other.data[0]),
++            _ => Zero::zero(),
++        }
++    }
++}
++
++impl Div<DoubleBigDigit> for BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn div(self, other: DoubleBigDigit) -> BigUint {
++        let (q, _) = self.div_rem(&From::from(other));
++        q
++    }
++}
++
++impl Div<BigUint> for DoubleBigDigit {
++    type Output = BigUint;
++
++    #[inline]
++    fn div(self, other: BigUint) -> BigUint {
++        match other.data.len() {
++            0 => panic!(),
++            1 => From::from(self / other.data[0] as u64),
++            2 => From::from(self / big_digit::to_doublebigdigit(other.data[1], other.data[0])),
++            _ => Zero::zero(),
++        }
++    }
++}
++
++forward_all_binop_to_ref_ref!(impl Rem for BigUint, rem);
++
++impl<'a, 'b> Rem<&'b BigUint> for &'a BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn rem(self, other: &BigUint) -> BigUint {
++        let (_, r) = self.div_rem(other);
++        r
++    }
++}
++
++promote_unsigned_scalars!(impl Rem for BigUint, rem);
++forward_all_scalar_binop_to_val_val!(impl Rem<BigDigit> for BigUint, rem);
++forward_all_scalar_binop_to_val_val!(impl Rem<DoubleBigDigit> for BigUint, rem);
++
++impl Rem<BigDigit> for BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn rem(self, other: BigDigit) -> BigUint {
++        let (_, r) = div_rem_digit(self, other);
++        From::from(r)
++    }
++}
++
++impl Rem<BigUint> for BigDigit {
++    type Output = BigUint;
++
++    #[inline]
++    fn rem(self, other: BigUint) -> BigUint {
++        match other.data.len() {
++            0 => panic!(),
++            1 => From::from(self % other.data[0]),
++            _ => From::from(self)
++        }
++    }
++}
++
++impl Rem<DoubleBigDigit> for BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn rem(self, other: DoubleBigDigit) -> BigUint {
++        let (_, r) = self.div_rem(&From::from(other));
++        r
++    }
++}
++
++impl Rem<BigUint> for DoubleBigDigit {
++    type Output = BigUint;
++
++    #[inline]
++    fn rem(self, other: BigUint) -> BigUint {
++        match other.data.len() {
++            0 => panic!(),
++            1 => From::from(self % other.data[0] as u64),
++            2 => From::from(self % big_digit::to_doublebigdigit(other.data[0], other.data[1])),
++            _ => From::from(self),
++        }
++    }
++}
++
++impl Neg for BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn neg(self) -> BigUint {
++        panic!()
++    }
++}
++
++impl<'a> Neg for &'a BigUint {
++    type Output = BigUint;
++
++    #[inline]
++    fn neg(self) -> BigUint {
++        panic!()
++    }
++}
++
++impl CheckedAdd for BigUint {
++    #[inline]
++    fn checked_add(&self, v: &BigUint) -> Option<BigUint> {
++        return Some(self.add(v));
++    }
++}
++
++impl CheckedSub for BigUint {
++    #[inline]
++    fn checked_sub(&self, v: &BigUint) -> Option<BigUint> {
++        match self.cmp(v) {
++            Less => None,
++            Equal => Some(Zero::zero()),
++            Greater => Some(self.sub(v)),
++        }
++    }
++}
++
++impl CheckedMul for BigUint {
++    #[inline]
++    fn checked_mul(&self, v: &BigUint) -> Option<BigUint> {
++        return Some(self.mul(v));
++    }
++}
++
++impl CheckedDiv for BigUint {
++    #[inline]
++    fn checked_div(&self, v: &BigUint) -> Option<BigUint> {
++        if v.is_zero() {
++            return None;
++        }
++        return Some(self.div(v));
++    }
++}
++
++impl Integer for BigUint {
++    #[inline]
++    fn div_rem(&self, other: &BigUint) -> (BigUint, BigUint) {
++        div_rem(self, other)
++    }
++
++    #[inline]
++    fn div_floor(&self, other: &BigUint) -> BigUint {
++        let (d, _) = div_rem(self, other);
++        d
++    }
++
++    #[inline]
++    fn mod_floor(&self, other: &BigUint) -> BigUint {
++        let (_, m) = div_rem(self, other);
++        m
++    }
++
++    #[inline]
++    fn div_mod_floor(&self, other: &BigUint) -> (BigUint, BigUint) {
++        div_rem(self, other)
++    }
++
++    /// Calculates the Greatest Common Divisor (GCD) of the number and `other`.
++    ///
++    /// The result is always positive.
++    #[inline]
++    fn gcd(&self, other: &BigUint) -> BigUint {
++        // Use Euclid's algorithm
++        let mut m = (*self).clone();
++        let mut n = (*other).clone();
++        while !m.is_zero() {
++            let temp = m;
++            m = n % &temp;
++            n = temp;
++        }
++        return n;
++    }
++
++    /// Calculates the Lowest Common Multiple (LCM) of the number and `other`.
++    #[inline]
++    fn lcm(&self, other: &BigUint) -> BigUint {
++        ((self * other) / self.gcd(other))
++    }
++
++    /// Deprecated, use `is_multiple_of` instead.
++    #[inline]
++    fn divides(&self, other: &BigUint) -> bool {
++        self.is_multiple_of(other)
++    }
++
++    /// Returns `true` if the number is a multiple of `other`.
++    #[inline]
++    fn is_multiple_of(&self, other: &BigUint) -> bool {
++        (self % other).is_zero()
++    }
++
++    /// Returns `true` if the number is divisible by `2`.
++    #[inline]
++    fn is_even(&self) -> bool {
++        // Considering only the last digit.
++        match self.data.first() {
++            Some(x) => x.is_even(),
++            None => true,
++        }
++    }
++
++    /// Returns `true` if the number is not divisible by `2`.
++    #[inline]
++    fn is_odd(&self) -> bool {
++        !self.is_even()
++    }
++}
++
++fn high_bits_to_u64(v: &BigUint) -> u64 {
++    match v.data.len() {
++        0   => 0,
++        1   => v.data[0] as u64,
++        _   => {
++            let mut bits = v.bits();
++            let mut ret = 0u64;
++            let mut ret_bits = 0;
++
++            for d in v.data.iter().rev() {
++                let digit_bits = (bits - 1) % big_digit::BITS + 1;
++                let bits_want = cmp::min(64 - ret_bits, digit_bits);
++
++                if bits_want != 64 {
++                    ret <<= bits_want;
++                }
++                ret      |= *d as u64 >> (digit_bits - bits_want);
++                ret_bits += bits_want;
++                bits     -= bits_want;
++
++                if ret_bits == 64 {
++                    break;
++                }
++            }
++
++            ret
++        }
++    }
++}
++
++impl ToPrimitive for BigUint {
++    #[inline]
++    fn to_i64(&self) -> Option<i64> {
++        self.to_u64().and_then(|n| {
++            // If top bit of u64 is set, it's too large to convert to i64.
++            if n >> 63 == 0 {
++                Some(n as i64)
++            } else {
++                None
++            }
++        })
++    }
++
++    #[inline]
++    fn to_u64(&self) -> Option<u64> {
++        let mut ret: u64 = 0;
++        let mut bits = 0;
++
++        for i in self.data.iter() {
++            if bits >= 64 {
++                return None;
++            }
++
++            ret += (*i as u64) << bits;
++            bits += big_digit::BITS;
++        }
++
++        Some(ret)
++    }
++
++    #[inline]
++    fn to_f32(&self) -> Option<f32> {
++        let mantissa = high_bits_to_u64(self);
++        let exponent = self.bits() - fls(mantissa);
++
++        if exponent > f32::MAX_EXP as usize {
++            None
++        } else {
++            let ret = (mantissa as f32) * 2.0f32.powi(exponent as i32);
++            if ret.is_infinite() {
++                None
++            } else {
++                Some(ret)
++            }
++        }
++    }
++
++    #[inline]
++    fn to_f64(&self) -> Option<f64> {
++        let mantissa = high_bits_to_u64(self);
++        let exponent = self.bits() - fls(mantissa);
++
++        if exponent > f64::MAX_EXP as usize {
++            None
++        } else {
++            let ret = (mantissa as f64) * 2.0f64.powi(exponent as i32);
++            if ret.is_infinite() {
++                None
++            } else {
++                Some(ret)
++            }
++        }
++    }
++}
++
++impl FromPrimitive for BigUint {
++    #[inline]
++    fn from_i64(n: i64) -> Option<BigUint> {
++        if n >= 0 {
++            Some(BigUint::from(n as u64))
++        } else {
++            None
++        }
++    }
++
++    #[inline]
++    fn from_u64(n: u64) -> Option<BigUint> {
++        Some(BigUint::from(n))
++    }
++
++    #[inline]
++    fn from_f64(mut n: f64) -> Option<BigUint> {
++        // handle NAN, INFINITY, NEG_INFINITY
++        if !n.is_finite() {
++            return None;
++        }
++
++        // match the rounding of casting from float to int
++        n = n.trunc();
++
++        // handle 0.x, -0.x
++        if n.is_zero() {
++            return Some(BigUint::zero());
++        }
++
++        let (mantissa, exponent, sign) = Float::integer_decode(n);
++
++        if sign == -1 {
++            return None;
++        }
++
++        let mut ret = BigUint::from(mantissa);
++        if exponent > 0 {
++            ret = ret << exponent as usize;
++        } else if exponent < 0 {
++            ret = ret >> (-exponent) as usize;
++        }
++        Some(ret)
++    }
++}
++
++impl From<u64> for BigUint {
++    #[inline]
++    fn from(mut n: u64) -> Self {
++        let mut ret: BigUint = Zero::zero();
++
++        while n != 0 {
++            ret.data.push(n as BigDigit);
++            // don't overflow if BITS is 64:
++            n = (n >> 1) >> (big_digit::BITS - 1);
++        }
++
++        ret
++    }
++}
++
++macro_rules! impl_biguint_from_uint {
++    ($T:ty) => {
++        impl From<$T> for BigUint {
++            #[inline]
++            fn from(n: $T) -> Self {
++                BigUint::from(n as u64)
++            }
++        }
++    }
++}
++
++impl_biguint_from_uint!(u8);
++impl_biguint_from_uint!(u16);
++impl_biguint_from_uint!(u32);
++impl_biguint_from_uint!(usize);
++
++/// A generic trait for converting a value to a `BigUint`.
++pub trait ToBigUint {
++    /// Converts the value of `self` to a `BigUint`.
++    fn to_biguint(&self) -> Option<BigUint>;
++}
++
++impl ToBigUint for BigUint {
++    #[inline]
++    fn to_biguint(&self) -> Option<BigUint> {
++        Some(self.clone())
++    }
++}
++
++macro_rules! impl_to_biguint {
++    ($T:ty, $from_ty:path) => {
++        impl ToBigUint for $T {
++            #[inline]
++            fn to_biguint(&self) -> Option<BigUint> {
++                $from_ty(*self)
++            }
++        }
++    }
++}
++
++impl_to_biguint!(isize, FromPrimitive::from_isize);
++impl_to_biguint!(i8, FromPrimitive::from_i8);
++impl_to_biguint!(i16, FromPrimitive::from_i16);
++impl_to_biguint!(i32, FromPrimitive::from_i32);
++impl_to_biguint!(i64, FromPrimitive::from_i64);
++impl_to_biguint!(usize, FromPrimitive::from_usize);
++impl_to_biguint!(u8, FromPrimitive::from_u8);
++impl_to_biguint!(u16, FromPrimitive::from_u16);
++impl_to_biguint!(u32, FromPrimitive::from_u32);
++impl_to_biguint!(u64, FromPrimitive::from_u64);
++impl_to_biguint!(f32, FromPrimitive::from_f32);
++impl_to_biguint!(f64, FromPrimitive::from_f64);
++
++// Extract bitwise digits that evenly divide BigDigit
++fn to_bitwise_digits_le(u: &BigUint, bits: usize) -> Vec<u8> {
++    debug_assert!(!u.is_zero() && bits <= 8 && big_digit::BITS % bits == 0);
++
++    let last_i = u.data.len() - 1;
++    let mask: BigDigit = (1 << bits) - 1;
++    let digits_per_big_digit = big_digit::BITS / bits;
++    let digits = (u.bits() + bits - 1) / bits;
++    let mut res = Vec::with_capacity(digits);
++
++    for mut r in u.data[..last_i].iter().cloned() {
++        for _ in 0..digits_per_big_digit {
++            res.push((r & mask) as u8);
++            r >>= bits;
++        }
++    }
++
++    let mut r = u.data[last_i];
++    while r != 0 {
++        res.push((r & mask) as u8);
++        r >>= bits;
++    }
++
++    res
++}
++
++// Extract bitwise digits that don't evenly divide BigDigit
++fn to_inexact_bitwise_digits_le(u: &BigUint, bits: usize) -> Vec<u8> {
++    debug_assert!(!u.is_zero() && bits <= 8 && big_digit::BITS % bits != 0);
++
++    let mask: BigDigit = (1 << bits) - 1;
++    let digits = (u.bits() + bits - 1) / bits;
++    let mut res = Vec::with_capacity(digits);
++
++    let mut r = 0;
++    let mut rbits = 0;
++
++    for c in &u.data {
++        r |= *c << rbits;
++        rbits += big_digit::BITS;
++
++        while rbits >= bits {
++            res.push((r & mask) as u8);
++            r >>= bits;
++
++            // r had more bits than it could fit - grab the bits we lost
++            if rbits > big_digit::BITS {
++                r = *c >> (big_digit::BITS - (rbits - bits));
++            }
++
++            rbits -= bits;
++        }
++    }
++
++    if rbits != 0 {
++        res.push(r as u8);
++    }
++
++    while let Some(&0) = res.last() {
++        res.pop();
++    }
++
++    res
++}
++
++// Extract little-endian radix digits
++#[inline(always)] // forced inline to get const-prop for radix=10
++fn to_radix_digits_le(u: &BigUint, radix: u32) -> Vec<u8> {
++    debug_assert!(!u.is_zero() && !radix.is_power_of_two());
++
++    // Estimate how big the result will be, so we can pre-allocate it.
++    let radix_digits = ((u.bits() as f64) / (radix as f64).log2()).ceil();
++    let mut res = Vec::with_capacity(radix_digits as usize);
++    let mut digits = u.clone();
++
++    let (base, power) = get_radix_base(radix);
++    let radix = radix as BigDigit;
++
++    while digits.data.len() > 1 {
++        let (q, mut r) = div_rem_digit(digits, base);
++        for _ in 0..power {
++            res.push((r % radix) as u8);
++            r /= radix;
++        }
++        digits = q;
++    }
++
++    let mut r = digits.data[0];
++    while r != 0 {
++        res.push((r % radix) as u8);
++        r /= radix;
++    }
++
++    res
++}
++
++pub fn to_radix_le(u: &BigUint, radix: u32) -> Vec<u8> {
++    if u.is_zero() {
++        vec![0]
++    } else if radix.is_power_of_two() {
++        // Powers of two can use bitwise masks and shifting instead of division
++        let bits = ilog2(radix);
++        if big_digit::BITS % bits == 0 {
++            to_bitwise_digits_le(u, bits)
++        } else {
++            to_inexact_bitwise_digits_le(u, bits)
++        }
++    } else if radix == 10 {
++        // 10 is so common that it's worth separating out for const-propagation.
++        // Optimizers can often turn constant division into a faster multiplication.
++        to_radix_digits_le(u, 10)
++    } else {
++        to_radix_digits_le(u, radix)
++    }
++}
++
++pub fn to_str_radix_reversed(u: &BigUint, radix: u32) -> Vec<u8> {
++    assert!(2 <= radix && radix <= 36, "The radix must be within 2...36");
++
++    if u.is_zero() {
++        return vec![b'0'];
++    }
++
++    let mut res = to_radix_le(u, radix);
++
++    // Now convert everything to ASCII digits.
++    for r in &mut res {
++        debug_assert!((*r as u32) < radix);
++        if *r < 10 {
++            *r += b'0';
++        } else {
++            *r += b'a' - 10;
++        }
++    }
++    res
++}
++
++impl BigUint {
++    /// Creates and initializes a `BigUint`.
++    ///
++    /// The digits are in little-endian base 2^32.
++    #[inline]
++    pub fn new(digits: Vec<BigDigit>) -> BigUint {
++        BigUint { data: digits }.normalize()
++    }
++
++    /// Creates and initializes a `BigUint`.
++    ///
++    /// The digits are in little-endian base 2^32.
++    #[inline]
++    pub fn from_slice(slice: &[BigDigit]) -> BigUint {
++        BigUint::new(slice.to_vec())
++    }
++
++    /// Creates and initializes a `BigUint`.
++    ///
++    /// The bytes are in big-endian byte order.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::BigUint;
++    ///
++    /// assert_eq!(BigUint::from_bytes_be(b"A"),
++    ///            BigUint::parse_bytes(b"65", 10).unwrap());
++    /// assert_eq!(BigUint::from_bytes_be(b"AA"),
++    ///            BigUint::parse_bytes(b"16705", 10).unwrap());
++    /// assert_eq!(BigUint::from_bytes_be(b"AB"),
++    ///            BigUint::parse_bytes(b"16706", 10).unwrap());
++    /// assert_eq!(BigUint::from_bytes_be(b"Hello world!"),
++    ///            BigUint::parse_bytes(b"22405534230753963835153736737", 10).unwrap());
++    /// ```
++    #[inline]
++    pub fn from_bytes_be(bytes: &[u8]) -> BigUint {
++        if bytes.is_empty() {
++            Zero::zero()
++        } else {
++            let mut v = bytes.to_vec();
++            v.reverse();
++            BigUint::from_bytes_le(&*v)
++        }
++    }
++
++    /// Creates and initializes a `BigUint`.
++    ///
++    /// The bytes are in little-endian byte order.
++    #[inline]
++    pub fn from_bytes_le(bytes: &[u8]) -> BigUint {
++        if bytes.is_empty() {
++            Zero::zero()
++        } else {
++            from_bitwise_digits_le(bytes, 8)
++        }
++    }
++
++    /// Creates and initializes a `BigUint`. The input slice must contain
++    /// ascii/utf8 characters in [0-9a-zA-Z].
++    /// `radix` must be in the range `2...36`.
++    ///
++    /// The function `from_str_radix` from the `Num` trait provides the same logic
++    /// for `&str` buffers.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::{BigUint, ToBigUint};
++    ///
++    /// assert_eq!(BigUint::parse_bytes(b"1234", 10), ToBigUint::to_biguint(&1234));
++    /// assert_eq!(BigUint::parse_bytes(b"ABCD", 16), ToBigUint::to_biguint(&0xABCD));
++    /// assert_eq!(BigUint::parse_bytes(b"G", 16), None);
++    /// ```
++    #[inline]
++    pub fn parse_bytes(buf: &[u8], radix: u32) -> Option<BigUint> {
++        str::from_utf8(buf).ok().and_then(|s| BigUint::from_str_radix(s, radix).ok())
++    }
++
++    /// Creates and initializes a `BigUint`. Each u8 of the input slice is
++    /// interpreted as one digit of the number
++    /// and must therefore be less than `radix`.
++    ///
++    /// The bytes are in big-endian byte order.
++    /// `radix` must be in the range `2...256`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::{BigUint};
++    ///
++    /// let inbase190 = &[15, 33, 125, 12, 14];
++    /// let a = BigUint::from_radix_be(inbase190, 190).unwrap();
++    /// assert_eq!(a.to_radix_be(190), inbase190);
++    /// ```
++    pub fn from_radix_be(buf: &[u8], radix: u32) -> Option<BigUint> {
++        assert!(2 <= radix && radix <= 256, "The radix must be within 2...256");
++
++        if radix != 256 && buf.iter().any(|&b| b >= radix as u8) {
++            return None;
++        }
++
++        let res = if radix.is_power_of_two() {
++            // Powers of two can use bitwise masks and shifting instead of multiplication
++            let bits = ilog2(radix);
++            let mut v = Vec::from(buf);
++            v.reverse();
++            if big_digit::BITS % bits == 0 {
++                from_bitwise_digits_le(&v, bits)
++            } else {
++                from_inexact_bitwise_digits_le(&v, bits)
++            }
++        } else {
++            from_radix_digits_be(buf, radix)
++        };
++
++        Some(res)
++    }
++
++    /// Creates and initializes a `BigUint`. Each u8 of the input slice is
++    /// interpreted as one digit of the number
++    /// and must therefore be less than `radix`.
++    ///
++    /// The bytes are in little-endian byte order.
++    /// `radix` must be in the range `2...256`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::{BigUint};
++    ///
++    /// let inbase190 = &[14, 12, 125, 33, 15];
++    /// let a = BigUint::from_radix_be(inbase190, 190).unwrap();
++    /// assert_eq!(a.to_radix_be(190), inbase190);
++    /// ```
++    pub fn from_radix_le(buf: &[u8], radix: u32) -> Option<BigUint> {
++        assert!(2 <= radix && radix <= 256, "The radix must be within 2...256");
++
++        if radix != 256 && buf.iter().any(|&b| b >= radix as u8) {
++            return None;
++        }
++
++        let res = if radix.is_power_of_two() {
++            // Powers of two can use bitwise masks and shifting instead of multiplication
++            let bits = ilog2(radix);
++            if big_digit::BITS % bits == 0 {
++                from_bitwise_digits_le(buf, bits)
++            } else {
++                from_inexact_bitwise_digits_le(buf, bits)
++            }
++        } else {
++            let mut v = Vec::from(buf);
++            v.reverse();
++            from_radix_digits_be(&v, radix)
++        };
++
++        Some(res)
++    }
++
++
++    /// Returns the byte representation of the `BigUint` in big-endian byte order.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::BigUint;
++    ///
++    /// let i = BigUint::parse_bytes(b"1125", 10).unwrap();
++    /// assert_eq!(i.to_bytes_be(), vec![4, 101]);
++    /// ```
++    #[inline]
++    pub fn to_bytes_be(&self) -> Vec<u8> {
++        let mut v = self.to_bytes_le();
++        v.reverse();
++        v
++    }
++
++    /// Returns the byte representation of the `BigUint` in little-endian byte order.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::BigUint;
++    ///
++    /// let i = BigUint::parse_bytes(b"1125", 10).unwrap();
++    /// assert_eq!(i.to_bytes_le(), vec![101, 4]);
++    /// ```
++    #[inline]
++    pub fn to_bytes_le(&self) -> Vec<u8> {
++        if self.is_zero() {
++            vec![0]
++        } else {
++            to_bitwise_digits_le(self, 8)
++        }
++    }
++
++    /// Returns the integer formatted as a string in the given radix.
++    /// `radix` must be in the range `2...36`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::BigUint;
++    ///
++    /// let i = BigUint::parse_bytes(b"ff", 16).unwrap();
++    /// assert_eq!(i.to_str_radix(16), "ff");
++    /// ```
++    #[inline]
++    pub fn to_str_radix(&self, radix: u32) -> String {
++        let mut v = to_str_radix_reversed(self, radix);
++        v.reverse();
++        unsafe { String::from_utf8_unchecked(v) }
++    }
++
++    /// Returns the integer in the requested base in big-endian digit order.
++    /// The output is not given in a human readable alphabet but as a zero
++    /// based u8 number.
++    /// `radix` must be in the range `2...256`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::BigUint;
++    ///
++    /// assert_eq!(BigUint::from(0xFFFFu64).to_radix_be(159),
++    ///            vec![2, 94, 27]);
++    /// // 0xFFFF = 65535 = 2*(159^2) + 94*159 + 27
++    /// ```
++    #[inline]
++    pub fn to_radix_be(&self, radix: u32) -> Vec<u8> {
++        let mut v = to_radix_le(self, radix);
++        v.reverse();
++        v
++    }
++
++    /// Returns the integer in the requested base in little-endian digit order.
++    /// The output is not given in a human readable alphabet but as a zero
++    /// based u8 number.
++    /// `radix` must be in the range `2...256`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_bigint::BigUint;
++    ///
++    /// assert_eq!(BigUint::from(0xFFFFu64).to_radix_le(159),
++    ///            vec![27, 94, 2]);
++    /// // 0xFFFF = 65535 = 27 + 94*159 + 2*(159^2)
++    /// ```
++    #[inline]
++    pub fn to_radix_le(&self, radix: u32) -> Vec<u8> {
++        to_radix_le(self, radix)
++    }
++
++    /// Determines the fewest bits necessary to express the `BigUint`.
++    #[inline]
++    pub fn bits(&self) -> usize {
++        if self.is_zero() {
++            return 0;
++        }
++        let zeros = self.data.last().unwrap().leading_zeros();
++        return self.data.len() * big_digit::BITS - zeros as usize;
++    }
++
++    /// Strips off trailing zero bigdigits - comparisons require the last element in the vector to
++    /// be nonzero.
++    #[inline]
++    fn normalize(mut self) -> BigUint {
++        while let Some(&0) = self.data.last() {
++            self.data.pop();
++        }
++        self
++    }
++}
++
++#[cfg(feature = "serde")]
++impl serde::Serialize for BigUint {
++    fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error>
++        where S: serde::Serializer
++    {
++        self.data.serialize(serializer)
++    }
++}
++
++#[cfg(feature = "serde")]
++impl serde::Deserialize for BigUint {
++    fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error>
++        where D: serde::Deserializer
++    {
++        let data = try!(Vec::deserialize(deserializer));
++        Ok(BigUint { data: data })
++    }
++}
++
++/// Returns the greatest power of the radix <= big_digit::BASE
++#[inline]
++fn get_radix_base(radix: u32) -> (BigDigit, usize) {
++    debug_assert!(2 <= radix && radix <= 256, "The radix must be within 2...256");
++    debug_assert!(!radix.is_power_of_two());
++
++    // To generate this table:
++    //    for radix in 2u64..257 {
++    //        let mut power = big_digit::BITS / fls(radix as u64);
++    //        let mut base = radix.pow(power as u32);
++    //
++    //        while let Some(b) = base.checked_mul(radix) {
++    //            if b > big_digit::MAX {
++    //                break;
++    //            }
++    //            base = b;
++    //            power += 1;
++    //        }
++    //
++    //        println!("({:10}, {:2}), // {:2}", base, power, radix);
++    //    }
++    // and
++    //    for radix in 2u64..257 {
++    //        let mut power = 64 / fls(radix as u64);
++    //        let mut base = radix.pow(power as u32);
++    //
++    //        while let Some(b) = base.checked_mul(radix) {
++    //            base = b;
++    //            power += 1;
++    //        }
++    //
++    //        println!("({:20}, {:2}), // {:2}", base, power, radix);
++    //    }
++    match big_digit::BITS {
++        32  => {
++            const BASES: [(u32, usize); 257] = [
++                (         0,  0),
++                (         0,  0),
++                (         0,  0), //  2
++                (3486784401, 20), //  3
++                (         0,  0), //  4
++                (1220703125, 13), //  5
++                (2176782336, 12), //  6
++                (1977326743, 11), //  7
++                (         0,  0), //  8
++                (3486784401, 10), //  9
++                (1000000000,  9), // 10
++                (2357947691,  9), // 11
++                ( 429981696,  8), // 12
++                ( 815730721,  8), // 13
++                (1475789056,  8), // 14
++                (2562890625,  8), // 15
++                (         0,  0), // 16
++                ( 410338673,  7), // 17
++                ( 612220032,  7), // 18
++                ( 893871739,  7), // 19
++                (1280000000,  7), // 20
++                (1801088541,  7), // 21
++                (2494357888,  7), // 22
++                (3404825447,  7), // 23
++                ( 191102976,  6), // 24
++                ( 244140625,  6), // 25
++                ( 308915776,  6), // 26
++                ( 387420489,  6), // 27
++                ( 481890304,  6), // 28
++                ( 594823321,  6), // 29
++                ( 729000000,  6), // 30
++                ( 887503681,  6), // 31
++                (         0,  0), // 32
++                (1291467969,  6), // 33
++                (1544804416,  6), // 34
++                (1838265625,  6), // 35
++                (2176782336,  6), // 36
++                (2565726409,  6), // 37
++                (3010936384,  6), // 38
++                (3518743761,  6), // 39
++                (4096000000,  6), // 40
++                ( 115856201,  5), // 41
++                ( 130691232,  5), // 42
++                ( 147008443,  5), // 43
++                ( 164916224,  5), // 44
++                ( 184528125,  5), // 45
++                ( 205962976,  5), // 46
++                ( 229345007,  5), // 47
++                ( 254803968,  5), // 48
++                ( 282475249,  5), // 49
++                ( 312500000,  5), // 50
++                ( 345025251,  5), // 51
++                ( 380204032,  5), // 52
++                ( 418195493,  5), // 53
++                ( 459165024,  5), // 54
++                ( 503284375,  5), // 55
++                ( 550731776,  5), // 56
++                ( 601692057,  5), // 57
++                ( 656356768,  5), // 58
++                ( 714924299,  5), // 59
++                ( 777600000,  5), // 60
++                ( 844596301,  5), // 61
++                ( 916132832,  5), // 62
++                ( 992436543,  5), // 63
++                (         0,  0), // 64
++                (1160290625,  5), // 65
++                (1252332576,  5), // 66
++                (1350125107,  5), // 67
++                (1453933568,  5), // 68
++                (1564031349,  5), // 69
++                (1680700000,  5), // 70
++                (1804229351,  5), // 71
++                (1934917632,  5), // 72
++                (2073071593,  5), // 73
++                (2219006624,  5), // 74
++                (2373046875,  5), // 75
++                (2535525376,  5), // 76
++                (2706784157,  5), // 77
++                (2887174368,  5), // 78
++                (3077056399,  5), // 79
++                (3276800000,  5), // 80
++                (3486784401,  5), // 81
++                (3707398432,  5), // 82
++                (3939040643,  5), // 83
++                (4182119424,  5), // 84
++                (  52200625,  4), // 85
++                (  54700816,  4), // 86
++                (  57289761,  4), // 87
++                (  59969536,  4), // 88
++                (  62742241,  4), // 89
++                (  65610000,  4), // 90
++                (  68574961,  4), // 91
++                (  71639296,  4), // 92
++                (  74805201,  4), // 93
++                (  78074896,  4), // 94
++                (  81450625,  4), // 95
++                (  84934656,  4), // 96
++                (  88529281,  4), // 97
++                (  92236816,  4), // 98
++                (  96059601,  4), // 99
++                ( 100000000,  4), // 100
++                ( 104060401,  4), // 101
++                ( 108243216,  4), // 102
++                ( 112550881,  4), // 103
++                ( 116985856,  4), // 104
++                ( 121550625,  4), // 105
++                ( 126247696,  4), // 106
++                ( 131079601,  4), // 107
++                ( 136048896,  4), // 108
++                ( 141158161,  4), // 109
++                ( 146410000,  4), // 110
++                ( 151807041,  4), // 111
++                ( 157351936,  4), // 112
++                ( 163047361,  4), // 113
++                ( 168896016,  4), // 114
++                ( 174900625,  4), // 115
++                ( 181063936,  4), // 116
++                ( 187388721,  4), // 117
++                ( 193877776,  4), // 118
++                ( 200533921,  4), // 119
++                ( 207360000,  4), // 120
++                ( 214358881,  4), // 121
++                ( 221533456,  4), // 122
++                ( 228886641,  4), // 123
++                ( 236421376,  4), // 124
++                ( 244140625,  4), // 125
++                ( 252047376,  4), // 126
++                ( 260144641,  4), // 127
++                (         0,  0), // 128
++                ( 276922881,  4), // 129
++                ( 285610000,  4), // 130
++                ( 294499921,  4), // 131
++                ( 303595776,  4), // 132
++                ( 312900721,  4), // 133
++                ( 322417936,  4), // 134
++                ( 332150625,  4), // 135
++                ( 342102016,  4), // 136
++                ( 352275361,  4), // 137
++                ( 362673936,  4), // 138
++                ( 373301041,  4), // 139
++                ( 384160000,  4), // 140
++                ( 395254161,  4), // 141
++                ( 406586896,  4), // 142
++                ( 418161601,  4), // 143
++                ( 429981696,  4), // 144
++                ( 442050625,  4), // 145
++                ( 454371856,  4), // 146
++                ( 466948881,  4), // 147
++                ( 479785216,  4), // 148
++                ( 492884401,  4), // 149
++                ( 506250000,  4), // 150
++                ( 519885601,  4), // 151
++                ( 533794816,  4), // 152
++                ( 547981281,  4), // 153
++                ( 562448656,  4), // 154
++                ( 577200625,  4), // 155
++                ( 592240896,  4), // 156
++                ( 607573201,  4), // 157
++                ( 623201296,  4), // 158
++                ( 639128961,  4), // 159
++                ( 655360000,  4), // 160
++                ( 671898241,  4), // 161
++                ( 688747536,  4), // 162
++                ( 705911761,  4), // 163
++                ( 723394816,  4), // 164
++                ( 741200625,  4), // 165
++                ( 759333136,  4), // 166
++                ( 777796321,  4), // 167
++                ( 796594176,  4), // 168
++                ( 815730721,  4), // 169
++                ( 835210000,  4), // 170
++                ( 855036081,  4), // 171
++                ( 875213056,  4), // 172
++                ( 895745041,  4), // 173
++                ( 916636176,  4), // 174
++                ( 937890625,  4), // 175
++                ( 959512576,  4), // 176
++                ( 981506241,  4), // 177
++                (1003875856,  4), // 178
++                (1026625681,  4), // 179
++                (1049760000,  4), // 180
++                (1073283121,  4), // 181
++                (1097199376,  4), // 182
++                (1121513121,  4), // 183
++                (1146228736,  4), // 184
++                (1171350625,  4), // 185
++                (1196883216,  4), // 186
++                (1222830961,  4), // 187
++                (1249198336,  4), // 188
++                (1275989841,  4), // 189
++                (1303210000,  4), // 190
++                (1330863361,  4), // 191
++                (1358954496,  4), // 192
++                (1387488001,  4), // 193
++                (1416468496,  4), // 194
++                (1445900625,  4), // 195
++                (1475789056,  4), // 196
++                (1506138481,  4), // 197
++                (1536953616,  4), // 198
++                (1568239201,  4), // 199
++                (1600000000,  4), // 200
++                (1632240801,  4), // 201
++                (1664966416,  4), // 202
++                (1698181681,  4), // 203
++                (1731891456,  4), // 204
++                (1766100625,  4), // 205
++                (1800814096,  4), // 206
++                (1836036801,  4), // 207
++                (1871773696,  4), // 208
++                (1908029761,  4), // 209
++                (1944810000,  4), // 210
++                (1982119441,  4), // 211
++                (2019963136,  4), // 212
++                (2058346161,  4), // 213
++                (2097273616,  4), // 214
++                (2136750625,  4), // 215
++                (2176782336,  4), // 216
++                (2217373921,  4), // 217
++                (2258530576,  4), // 218
++                (2300257521,  4), // 219
++                (2342560000,  4), // 220
++                (2385443281,  4), // 221
++                (2428912656,  4), // 222
++                (2472973441,  4), // 223
++                (2517630976,  4), // 224
++                (2562890625,  4), // 225
++                (2608757776,  4), // 226
++                (2655237841,  4), // 227
++                (2702336256,  4), // 228
++                (2750058481,  4), // 229
++                (2798410000,  4), // 230
++                (2847396321,  4), // 231
++                (2897022976,  4), // 232
++                (2947295521,  4), // 233
++                (2998219536,  4), // 234
++                (3049800625,  4), // 235
++                (3102044416,  4), // 236
++                (3154956561,  4), // 237
++                (3208542736,  4), // 238
++                (3262808641,  4), // 239
++                (3317760000,  4), // 240
++                (3373402561,  4), // 241
++                (3429742096,  4), // 242
++                (3486784401,  4), // 243
++                (3544535296,  4), // 244
++                (3603000625,  4), // 245
++                (3662186256,  4), // 246
++                (3722098081,  4), // 247
++                (3782742016,  4), // 248
++                (3844124001,  4), // 249
++                (3906250000,  4), // 250
++                (3969126001,  4), // 251
++                (4032758016,  4), // 252
++                (4097152081,  4), // 253
++                (4162314256,  4), // 254
++                (4228250625,  4), // 255
++                (         0,  0), // 256
++            ];
++
++            let (base, power) = BASES[radix as usize];
++            (base as BigDigit, power)
++        }
++        64  => {
++            const BASES: [(u64, usize); 257] = [
++                (                   0,  0),
++                (                   0,  0),
++                ( 9223372036854775808, 63), //  2
++                (12157665459056928801, 40), //  3
++                ( 4611686018427387904, 31), //  4
++                ( 7450580596923828125, 27), //  5
++                ( 4738381338321616896, 24), //  6
++                ( 3909821048582988049, 22), //  7
++                ( 9223372036854775808, 21), //  8
++                (12157665459056928801, 20), //  9
++                (10000000000000000000, 19), // 10
++                ( 5559917313492231481, 18), // 11
++                ( 2218611106740436992, 17), // 12
++                ( 8650415919381337933, 17), // 13
++                ( 2177953337809371136, 16), // 14
++                ( 6568408355712890625, 16), // 15
++                ( 1152921504606846976, 15), // 16
++                ( 2862423051509815793, 15), // 17
++                ( 6746640616477458432, 15), // 18
++                (15181127029874798299, 15), // 19
++                ( 1638400000000000000, 14), // 20
++                ( 3243919932521508681, 14), // 21
++                ( 6221821273427820544, 14), // 22
++                (11592836324538749809, 14), // 23
++                (  876488338465357824, 13), // 24
++                ( 1490116119384765625, 13), // 25
++                ( 2481152873203736576, 13), // 26
++                ( 4052555153018976267, 13), // 27
++                ( 6502111422497947648, 13), // 28
++                (10260628712958602189, 13), // 29
++                (15943230000000000000, 13), // 30
++                (  787662783788549761, 12), // 31
++                ( 1152921504606846976, 12), // 32
++                ( 1667889514952984961, 12), // 33
++                ( 2386420683693101056, 12), // 34
++                ( 3379220508056640625, 12), // 35
++                ( 4738381338321616896, 12), // 36
++                ( 6582952005840035281, 12), // 37
++                ( 9065737908494995456, 12), // 38
++                (12381557655576425121, 12), // 39
++                (16777216000000000000, 12), // 40
++                (  550329031716248441, 11), // 41
++                (  717368321110468608, 11), // 42
++                (  929293739471222707, 11), // 43
++                ( 1196683881290399744, 11), // 44
++                ( 1532278301220703125, 11), // 45
++                ( 1951354384207722496, 11), // 46
++                ( 2472159215084012303, 11), // 47
++                ( 3116402981210161152, 11), // 48
++                ( 3909821048582988049, 11), // 49
++                ( 4882812500000000000, 11), // 50
++                ( 6071163615208263051, 11), // 51
++                ( 7516865509350965248, 11), // 52
++                ( 9269035929372191597, 11), // 53
++                (11384956040305711104, 11), // 54
++                (13931233916552734375, 11), // 55
++                (16985107389382393856, 11), // 56
++                (  362033331456891249, 10), // 57
++                (  430804206899405824, 10), // 58
++                (  511116753300641401, 10), // 59
++                (  604661760000000000, 10), // 60
++                (  713342911662882601, 10), // 61
++                (  839299365868340224, 10), // 62
++                (  984930291881790849, 10), // 63
++                ( 1152921504606846976, 10), // 64
++                ( 1346274334462890625, 10), // 65
++                ( 1568336880910795776, 10), // 66
++                ( 1822837804551761449, 10), // 67
++                ( 2113922820157210624, 10), // 68
++                ( 2446194060654759801, 10), // 69
++                ( 2824752490000000000, 10), // 70
++                ( 3255243551009881201, 10), // 71
++                ( 3743906242624487424, 10), // 72
++                ( 4297625829703557649, 10), // 73
++                ( 4923990397355877376, 10), // 74
++                ( 5631351470947265625, 10), // 75
++                ( 6428888932339941376, 10), // 76
++                ( 7326680472586200649, 10), // 77
++                ( 8335775831236199424, 10), // 78
++                ( 9468276082626847201, 10), // 79
++                (10737418240000000000, 10), // 80
++                (12157665459056928801, 10), // 81
++                (13744803133596058624, 10), // 82
++                (15516041187205853449, 10), // 83
++                (17490122876598091776, 10), // 84
++                (  231616946283203125,  9), // 85
++                (  257327417311663616,  9), // 86
++                (  285544154243029527,  9), // 87
++                (  316478381828866048,  9), // 88
++                (  350356403707485209,  9), // 89
++                (  387420489000000000,  9), // 90
++                (  427929800129788411,  9), // 91
++                (  472161363286556672,  9), // 92
++                (  520411082988487293,  9), // 93
++                (  572994802228616704,  9), // 94
++                (  630249409724609375,  9), // 95
++                (  692533995824480256,  9), // 96
++                (  760231058654565217,  9), // 97
++                (  833747762130149888,  9), // 98
++                (  913517247483640899,  9), // 99
++                ( 1000000000000000000,  9), // 100
++                ( 1093685272684360901,  9), // 101
++                ( 1195092568622310912,  9), // 102
++                ( 1304773183829244583,  9), // 103
++                ( 1423311812421484544,  9), // 104
++                ( 1551328215978515625,  9), // 105
++                ( 1689478959002692096,  9), // 106
++                ( 1838459212420154507,  9), // 107
++                ( 1999004627104432128,  9), // 108
++                ( 2171893279442309389,  9), // 109
++                ( 2357947691000000000,  9), // 110
++                ( 2558036924386500591,  9), // 111
++                ( 2773078757450186752,  9), // 112
++                ( 3004041937984268273,  9), // 113
++                ( 3251948521156637184,  9), // 114
++                ( 3517876291919921875,  9), // 115
++                ( 3802961274698203136,  9), // 116
++                ( 4108400332687853397,  9), // 117
++                ( 4435453859151328768,  9), // 118
++                ( 4785448563124474679,  9), // 119
++                ( 5159780352000000000,  9), // 120
++                ( 5559917313492231481,  9), // 121
++                ( 5987402799531080192,  9), // 122
++                ( 6443858614676334363,  9), // 123
++                ( 6930988311686938624,  9), // 124
++                ( 7450580596923828125,  9), // 125
++                ( 8004512848309157376,  9), // 126
++                ( 8594754748609397887,  9), // 127
++                ( 9223372036854775808,  9), // 128
++                ( 9892530380752880769,  9), // 129
++                (10604499373000000000,  9), // 130
++                (11361656654439817571,  9), // 131
++                (12166492167065567232,  9), // 132
++                (13021612539908538853,  9), // 133
++                (13929745610903012864,  9), // 134
++                (14893745087865234375,  9), // 135
++                (15916595351771938816,  9), // 136
++                (17001416405572203977,  9), // 137
++                (18151468971815029248,  9), // 138
++                (  139353667211683681,  8), // 139
++                (  147578905600000000,  8), // 140
++                (  156225851787813921,  8), // 141
++                (  165312903998914816,  8), // 142
++                (  174859124550883201,  8), // 143
++                (  184884258895036416,  8), // 144
++                (  195408755062890625,  8), // 145
++                (  206453783524884736,  8), // 146
++                (  218041257467152161,  8), // 147
++                (  230193853492166656,  8), // 148
++                (  242935032749128801,  8), // 149
++                (  256289062500000000,  8), // 150
++                (  270281038127131201,  8), // 151
++                (  284936905588473856,  8), // 152
++                (  300283484326400961,  8), // 153
++                (  316348490636206336,  8), // 154
++                (  333160561500390625,  8), // 155
++                (  350749278894882816,  8), // 156
++                (  369145194573386401,  8), // 157
++                (  388379855336079616,  8), // 158
++                (  408485828788939521,  8), // 159
++                (  429496729600000000,  8), // 160
++                (  451447246258894081,  8), // 161
++                (  474373168346071296,  8), // 162
++                (  498311414318121121,  8), // 163
++                (  523300059815673856,  8), // 164
++                (  549378366500390625,  8), // 165
++                (  576586811427594496,  8), // 166
++                (  604967116961135041,  8), // 167
++                (  634562281237118976,  8), // 168
++                (  665416609183179841,  8), // 169
++                (  697575744100000000,  8), // 170
++                (  731086699811838561,  8), // 171
++                (  765997893392859136,  8), // 172
++                (  802359178476091681,  8), // 173
++                (  840221879151902976,  8), // 174
++                (  879638824462890625,  8), // 175
++                (  920664383502155776,  8), // 176
++                (  963354501121950081,  8), // 177
++                ( 1007766734259732736,  8), // 178
++                ( 1053960288888713761,  8), // 179
++                ( 1101996057600000000,  8), // 180
++                ( 1151936657823500641,  8), // 181
++                ( 1203846470694789376,  8), // 182
++                ( 1257791680575160641,  8), // 183
++                ( 1313840315232157696,  8), // 184
++                ( 1372062286687890625,  8), // 185
++                ( 1432529432742502656,  8), // 186
++                ( 1495315559180183521,  8), // 187
++                ( 1560496482665168896,  8), // 188
++                ( 1628150074335205281,  8), // 189
++                ( 1698356304100000000,  8), // 190
++                ( 1771197285652216321,  8), // 191
++                ( 1846757322198614016,  8), // 192
++                ( 1925122952918976001,  8), // 193
++                ( 2006383000160502016,  8), // 194
++                ( 2090628617375390625,  8), // 195
++                ( 2177953337809371136,  8), // 196
++                ( 2268453123948987361,  8), // 197
++                ( 2362226417735475456,  8), // 198
++                ( 2459374191553118401,  8), // 199
++                ( 2560000000000000000,  8), // 200
++                ( 2664210032449121601,  8), // 201
++                ( 2772113166407885056,  8), // 202
++                ( 2883821021683985761,  8), // 203
++                ( 2999448015365799936,  8), // 204
++                ( 3119111417625390625,  8), // 205
++                ( 3242931408352297216,  8), // 206
++                ( 3371031134626313601,  8), // 207
++                ( 3503536769037500416,  8), // 208
++                ( 3640577568861717121,  8), // 209
++                ( 3782285936100000000,  8), // 210
++                ( 3928797478390152481,  8), // 211
++                ( 4080251070798954496,  8), // 212
++                ( 4236788918503437921,  8), // 213
++                ( 4398556620369715456,  8), // 214
++                ( 4565703233437890625,  8), // 215
++                ( 4738381338321616896,  8), // 216
++                ( 4916747105530914241,  8), // 217
++                ( 5100960362726891776,  8), // 218
++                ( 5291184662917065441,  8), // 219
++                ( 5487587353600000000,  8), // 220
++                ( 5690339646868044961,  8), // 221
++                ( 5899616690476974336,  8), // 222
++                ( 6115597639891380481,  8), // 223
++                ( 6338465731314712576,  8), // 224
++                ( 6568408355712890625,  8), // 225
++                ( 6805617133840466176,  8), // 226
++                ( 7050287992278341281,  8), // 227
++                ( 7302621240492097536,  8), // 228
++                ( 7562821648920027361,  8), // 229
++                ( 7831098528100000000,  8), // 230
++                ( 8107665808844335041,  8), // 231
++                ( 8392742123471896576,  8), // 232
++                ( 8686550888106661441,  8), // 233
++                ( 8989320386052055296,  8), // 234
++                ( 9301283852250390625,  8), // 235
++                ( 9622679558836781056,  8), // 236
++                ( 9953750901796946721,  8), // 237
++                (10294746488738365696,  8), // 238
++                (10645920227784266881,  8), // 239
++                (11007531417600000000,  8), // 240
++                (11379844838561358721,  8), // 241
++                (11763130845074473216,  8), // 242
++                (12157665459056928801,  8), // 243
++                (12563730464589807616,  8), // 244
++                (12981613503750390625,  8), // 245
++                (13411608173635297536,  8), // 246
++                (13854014124583882561,  8), // 247
++                (14309137159611744256,  8), // 248
++                (14777289335064248001,  8), // 249
++                (15258789062500000000,  8), // 250
++                (15753961211814252001,  8), // 251
++                (16263137215612256256,  8), // 252
++                (16786655174842630561,  8), // 253
++                (17324859965700833536,  8), // 254
++                (17878103347812890625,  8), // 255
++                (   72057594037927936,  7), // 256
++            ];
++
++            let (base, power) = BASES[radix as usize];
++            (base as BigDigit, power)
++        }
++        _   => panic!("Invalid bigdigit size")
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..02b99927cce8ff5db6376db90d81ac421a09eaed
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,154 @@@
++// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! A Big integer (signed version: `BigInt`, unsigned version: `BigUint`).
++//!
++//! A `BigUint` is represented as a vector of `BigDigit`s.
++//! A `BigInt` is a combination of `BigUint` and `Sign`.
++//!
++//! Common numerical operations are overloaded, so we can treat them
++//! the same way we treat other numbers.
++//!
++//! ## Example
++//!
++//! ```rust
++//! extern crate num_bigint;
++//! extern crate num_traits;
++//!
++//! # fn main() {
++//! use num_bigint::BigUint;
++//! use num_traits::{Zero, One};
++//! use std::mem::replace;
++//!
++//! // Calculate large fibonacci numbers.
++//! fn fib(n: usize) -> BigUint {
++//!     let mut f0: BigUint = Zero::zero();
++//!     let mut f1: BigUint = One::one();
++//!     for _ in 0..n {
++//!         let f2 = f0 + &f1;
++//!         // This is a low cost way of swapping f0 with f1 and f1 with f2.
++//!         f0 = replace(&mut f1, f2);
++//!     }
++//!     f0
++//! }
++//!
++//! // This is a very large number.
++//! println!("fib(1000) = {}", fib(1000));
++//! # }
++//! ```
++//!
++//! It's easy to generate large random numbers:
++//!
++//! ```rust
++//! extern crate rand;
++//! extern crate num_bigint as bigint;
++//!
++//! # #[cfg(feature = "rand")]
++//! # fn main() {
++//! use bigint::{ToBigInt, RandBigInt};
++//!
++//! let mut rng = rand::thread_rng();
++//! let a = rng.gen_bigint(1000);
++//!
++//! let low = -10000.to_bigint().unwrap();
++//! let high = 10000.to_bigint().unwrap();
++//! let b = rng.gen_bigint_range(&low, &high);
++//!
++//! // Probably an even larger number.
++//! println!("{}", a * b);
++//! # }
++//!
++//! # #[cfg(not(feature = "rand"))]
++//! # fn main() {
++//! # }
++//! ```
++#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png",
++       html_favicon_url = "https://rust-num.github.io/num/favicon.ico",
++       html_root_url = "https://rust-num.github.io/num/",
++       html_playground_url = "http://play.integer32.com/")]
++
++#[cfg(any(feature = "rand", test))]
++extern crate rand;
++#[cfg(feature = "rustc-serialize")]
++extern crate rustc_serialize;
++#[cfg(feature = "serde")]
++extern crate serde;
++
++extern crate num_integer as integer;
++extern crate num_traits as traits;
++
++use std::error::Error;
++use std::num::ParseIntError;
++use std::fmt;
++
++#[cfg(target_pointer_width = "32")]
++type UsizePromotion = u32;
++#[cfg(target_pointer_width = "64")]
++type UsizePromotion = u64;
++
++#[cfg(target_pointer_width = "32")]
++type IsizePromotion = i32;
++#[cfg(target_pointer_width = "64")]
++type IsizePromotion = i64;
++
++#[derive(Debug, PartialEq)]
++pub enum ParseBigIntError {
++    ParseInt(ParseIntError),
++    Other,
++}
++
++impl fmt::Display for ParseBigIntError {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        match self {
++            &ParseBigIntError::ParseInt(ref e) => e.fmt(f),
++            &ParseBigIntError::Other => "failed to parse provided string".fmt(f),
++        }
++    }
++}
++
++impl Error for ParseBigIntError {
++    fn description(&self) -> &str {
++        "failed to parse bigint/biguint"
++    }
++}
++
++impl From<ParseIntError> for ParseBigIntError {
++    fn from(err: ParseIntError) -> ParseBigIntError {
++        ParseBigIntError::ParseInt(err)
++    }
++}
++
++#[cfg(test)]
++use std::hash;
++
++#[cfg(test)]
++fn hash<T: hash::Hash>(x: &T) -> u64 {
++    use std::hash::{BuildHasher, Hasher};
++    use std::collections::hash_map::RandomState;
++    let mut hasher = <RandomState as BuildHasher>::Hasher::new();
++    x.hash(&mut hasher);
++    hasher.finish()
++}
++
++#[macro_use]
++mod macros;
++
++mod biguint;
++mod bigint;
++
++pub use biguint::BigUint;
++pub use biguint::ToBigUint;
++pub use biguint::big_digit;
++pub use biguint::big_digit::{BigDigit, DoubleBigDigit, ZERO_BIG_DIGIT};
++
++pub use bigint::Sign;
++pub use bigint::BigInt;
++pub use bigint::ToBigInt;
++pub use bigint::RandBigInt;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7705f55b26087e391e87d014ab3b6c36d3e2e06f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,274 @@@
++
++macro_rules! forward_val_val_binop {
++    (impl $imp:ident for $res:ty, $method:ident) => {
++        impl $imp<$res> for $res {
++            type Output = $res;
++
++            #[inline]
++            fn $method(self, other: $res) -> $res {
++                // forward to val-ref
++                $imp::$method(self, &other)
++            }
++        }
++    }
++}
++
++macro_rules! forward_val_val_binop_commutative {
++    (impl $imp:ident for $res:ty, $method:ident) => {
++        impl $imp<$res> for $res {
++            type Output = $res;
++
++            #[inline]
++            fn $method(self, other: $res) -> $res {
++                // forward to val-ref, with the larger capacity as val
++                if self.data.capacity() >= other.data.capacity() {
++                    $imp::$method(self, &other)
++                } else {
++                    $imp::$method(other, &self)
++                }
++            }
++        }
++    }
++}
++
++macro_rules! forward_ref_val_binop {
++    (impl $imp:ident for $res:ty, $method:ident) => {
++        impl<'a> $imp<$res> for &'a $res {
++            type Output = $res;
++
++            #[inline]
++            fn $method(self, other: $res) -> $res {
++                // forward to ref-ref
++                $imp::$method(self, &other)
++            }
++        }
++    }
++}
++
++macro_rules! forward_ref_val_binop_commutative {
++    (impl $imp:ident for $res:ty, $method:ident) => {
++        impl<'a> $imp<$res> for &'a $res {
++            type Output = $res;
++
++            #[inline]
++            fn $method(self, other: $res) -> $res {
++                // reverse, forward to val-ref
++                $imp::$method(other, self)
++            }
++        }
++    }
++}
++
++macro_rules! forward_val_ref_binop {
++    (impl $imp:ident for $res:ty, $method:ident) => {
++        impl<'a> $imp<&'a $res> for $res {
++            type Output = $res;
++
++            #[inline]
++            fn $method(self, other: &$res) -> $res {
++                // forward to ref-ref
++                $imp::$method(&self, other)
++            }
++        }
++    }
++}
++
++macro_rules! forward_ref_ref_binop {
++    (impl $imp:ident for $res:ty, $method:ident) => {
++        impl<'a, 'b> $imp<&'b $res> for &'a $res {
++            type Output = $res;
++
++            #[inline]
++            fn $method(self, other: &$res) -> $res {
++                // forward to val-ref
++                $imp::$method(self.clone(), other)
++            }
++        }
++    }
++}
++
++macro_rules! forward_ref_ref_binop_commutative {
++    (impl $imp:ident for $res:ty, $method:ident) => {
++        impl<'a, 'b> $imp<&'b $res> for &'a $res {
++            type Output = $res;
++
++            #[inline]
++            fn $method(self, other: &$res) -> $res {
++                // forward to val-ref, choosing the larger to clone
++                if self.data.len() >= other.data.len() {
++                    $imp::$method(self.clone(), other)
++                } else {
++                    $imp::$method(other.clone(), self)
++                }
++            }
++        }
++    }
++}
++
++macro_rules! forward_scalar_val_val_binop_commutative {
++    (impl $imp:ident<$scalar:ty> for $res:ty, $method: ident) => {
++        impl $imp<$res> for $scalar {
++            type Output = $res;
++
++            #[inline]
++            fn $method(self, other: $res) -> $res {
++                $imp::$method(other, self)
++            }
++        }
++    }
++}
++
++macro_rules! forward_scalar_val_ref_binop {
++    (impl $imp:ident<$scalar:ty> for $res:ty, $method:ident) => {
++        impl<'a> $imp<&'a $scalar> for $res {
++            type Output = $res;
++
++            #[inline]
++            fn $method(self, other: &$scalar) -> $res {
++                $imp::$method(self, *other)
++            }
++        }
++
++        impl<'a> $imp<$res> for &'a $scalar {
++            type Output = $res;
++
++            #[inline]
++            fn $method(self, other: $res) -> $res {
++                $imp::$method(*self, other)
++            }
++        }
++    }
++}
++
++macro_rules! forward_scalar_ref_val_binop {
++    (impl $imp:ident<$scalar:ty> for $res:ty, $method:ident) => {
++        impl<'a> $imp<$scalar> for &'a $res {
++            type Output = $res;
++
++            #[inline]
++            fn $method(self, other: $scalar) -> $res {
++                $imp::$method(self.clone(), other)
++            }
++        }
++
++        impl<'a> $imp<&'a $res> for $scalar {
++            type Output = $res;
++
++            #[inline]
++            fn $method(self, other: &$res) -> $res {
++                $imp::$method(self, other.clone())
++            }
++        }
++    }
++}
++
++macro_rules! forward_scalar_ref_ref_binop {
++    (impl $imp:ident<$scalar:ty> for $res:ty, $method:ident) => {
++        impl<'a, 'b> $imp<&'b $scalar> for &'a $res {
++            type Output = $res;
++
++            #[inline]
++            fn $method(self, other: &$scalar) -> $res {
++                $imp::$method(self.clone(), *other)
++            }
++        }
++
++        impl<'a, 'b> $imp<&'a $res> for &'b $scalar {
++            type Output = $res;
++
++            #[inline]
++            fn $method(self, other: &$res) -> $res {
++                $imp::$method(*self, other.clone())
++            }
++        }
++    }
++}
++
++macro_rules! promote_scalars {
++    (impl $imp:ident<$promo:ty> for $res:ty, $method:ident, $( $scalar:ty ),*) => {
++        $(
++            forward_all_scalar_binop_to_val_val!(impl $imp<$scalar> for $res, $method);
++
++            impl $imp<$scalar> for $res {
++                type Output = $res;
++
++                #[inline]
++                fn $method(self, other: $scalar) -> $res {
++                    $imp::$method(self, other as $promo)
++                }
++            }
++
++            impl $imp<$res> for $scalar {
++                type Output = $res;
++
++                #[inline]
++                fn $method(self, other: $res) -> $res {
++                    $imp::$method(self as $promo, other)
++                }
++            }
++        )*
++    }
++}
++
++macro_rules! promote_unsigned_scalars {
++    (impl $imp:ident for $res:ty, $method:ident) => {
++        promote_scalars!(impl $imp<u32> for $res, $method, u8, u16);
++        promote_scalars!(impl $imp<UsizePromotion> for $res, $method, usize);
++    }
++}
++
++macro_rules! promote_signed_scalars {
++    (impl $imp:ident for $res:ty, $method:ident) => {
++        promote_scalars!(impl $imp<i32> for $res, $method, i8, i16);
++        promote_scalars!(impl $imp<IsizePromotion> for $res, $method, isize);
++    }
++}
++
++// Forward everything to ref-ref, when reusing storage is not helpful
++macro_rules! forward_all_binop_to_ref_ref {
++    (impl $imp:ident for $res:ty, $method:ident) => {
++        forward_val_val_binop!(impl $imp for $res, $method);
++        forward_val_ref_binop!(impl $imp for $res, $method);
++        forward_ref_val_binop!(impl $imp for $res, $method);
++    };
++}
++
++// Forward everything to val-ref, so LHS storage can be reused
++macro_rules! forward_all_binop_to_val_ref {
++    (impl $imp:ident for $res:ty, $method:ident) => {
++        forward_val_val_binop!(impl $imp for $res, $method);
++        forward_ref_val_binop!(impl $imp for $res, $method);
++        forward_ref_ref_binop!(impl $imp for $res, $method);
++    };
++}
++
++// Forward everything to val-ref, commutatively, so either LHS or RHS storage can be reused
++macro_rules! forward_all_binop_to_val_ref_commutative {
++    (impl $imp:ident for $res:ty, $method:ident) => {
++        forward_val_val_binop_commutative!(impl $imp for $res, $method);
++        forward_ref_val_binop_commutative!(impl $imp for $res, $method);
++        forward_ref_ref_binop_commutative!(impl $imp for $res, $method);
++    };
++}
++
++macro_rules! forward_all_scalar_binop_to_val_val {
++    (impl $imp:ident<$scalar:ty> for $res:ty, $method:ident) => {
++        forward_scalar_val_ref_binop!(impl $imp<$scalar> for $res, $method);
++        forward_scalar_ref_val_binop!(impl $imp<$scalar> for $res, $method);
++        forward_scalar_ref_ref_binop!(impl $imp<$scalar> for $res, $method);
++    }
++}
++
++macro_rules! forward_all_scalar_binop_to_val_val_commutative {
++    (impl $imp:ident<$scalar:ty> for $res:ty, $method:ident) => {
++        forward_scalar_val_val_binop_commutative!(impl $imp<$scalar> for $res, $method);
++        forward_all_scalar_binop_to_val_val!(impl $imp<$scalar> for $res, $method);
++    }
++}
++
++macro_rules! promote_all_scalars {
++    (impl $imp:ident for $res:ty, $method:ident) => {
++        promote_unsigned_scalars!(impl $imp for $res, $method);
++        promote_signed_scalars!(impl $imp for $res, $method);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9fbebb084775c8dea35e8b64a5d38a96648db128
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1161 @@@
++use {BigDigit, BigUint, big_digit};
++use {Sign, BigInt, RandBigInt, ToBigInt};
++use Sign::{Minus, NoSign, Plus};
++
++use std::cmp::Ordering::{Less, Equal, Greater};
++use std::{f32, f64};
++use std::{i8, i16, i32, i64, isize};
++use std::iter::repeat;
++use std::{u8, u16, u32, u64, usize};
++use std::ops::Neg;
++
++use rand::thread_rng;
++
++use integer::Integer;
++use traits::{Zero, One, Signed, ToPrimitive, FromPrimitive, Num, Float};
++
++/// Assert that an op works for all val/ref combinations
++macro_rules! assert_op {
++    ($left:ident $op:tt $right:ident == $expected:expr) => {
++        assert_eq!((&$left) $op (&$right), $expected);
++        assert_eq!((&$left) $op $right.clone(), $expected);
++        assert_eq!($left.clone() $op (&$right), $expected);
++        assert_eq!($left.clone() $op $right.clone(), $expected);
++    };
++}
++
++/// Assert that an op works for scalar left or right
++macro_rules! assert_scalar_op {
++    (($($to:ident),*) $left:ident $op:tt $right:ident == $expected:expr) => {
++        $(
++            if let Some(left) = $left.$to() {
++                assert_op!(left $op $right == $expected);
++            }
++            if let Some(right) = $right.$to() {
++                assert_op!($left $op right == $expected);
++            }
++        )*
++    };
++    ($left:ident $op:tt $right:ident == $expected:expr) => {
++        assert_scalar_op!((to_u8, to_u16, to_u32, to_u64, to_usize,
++                           to_i8, to_i16, to_i32, to_i64, to_isize)
++                          $left $op $right == $expected);
++    };
++}
++
++#[test]
++fn test_from_biguint() {
++    fn check(inp_s: Sign, inp_n: usize, ans_s: Sign, ans_n: usize) {
++        let inp = BigInt::from_biguint(inp_s, FromPrimitive::from_usize(inp_n).unwrap());
++        let ans = BigInt {
++            sign: ans_s,
++            data: FromPrimitive::from_usize(ans_n).unwrap(),
++        };
++        assert_eq!(inp, ans);
++    }
++    check(Plus, 1, Plus, 1);
++    check(Plus, 0, NoSign, 0);
++    check(Minus, 1, Minus, 1);
++    check(NoSign, 1, NoSign, 0);
++}
++
++#[test]
++fn test_from_bytes_be() {
++    fn check(s: &str, result: &str) {
++        assert_eq!(BigInt::from_bytes_be(Plus, s.as_bytes()),
++                   BigInt::parse_bytes(result.as_bytes(), 10).unwrap());
++    }
++    check("A", "65");
++    check("AA", "16705");
++    check("AB", "16706");
++    check("Hello world!", "22405534230753963835153736737");
++    assert_eq!(BigInt::from_bytes_be(Plus, &[]), Zero::zero());
++    assert_eq!(BigInt::from_bytes_be(Minus, &[]), Zero::zero());
++}
++
++#[test]
++fn test_to_bytes_be() {
++    fn check(s: &str, result: &str) {
++        let b = BigInt::parse_bytes(result.as_bytes(), 10).unwrap();
++        let (sign, v) = b.to_bytes_be();
++        assert_eq!((Plus, s.as_bytes()), (sign, &*v));
++    }
++    check("A", "65");
++    check("AA", "16705");
++    check("AB", "16706");
++    check("Hello world!", "22405534230753963835153736737");
++    let b: BigInt = Zero::zero();
++    assert_eq!(b.to_bytes_be(), (NoSign, vec![0]));
++
++    // Test with leading/trailing zero bytes and a full BigDigit of value 0
++    let b = BigInt::from_str_radix("00010000000000000200", 16).unwrap();
++    assert_eq!(b.to_bytes_be(), (Plus, vec![1, 0, 0, 0, 0, 0, 0, 2, 0]));
++}
++
++#[test]
++fn test_from_bytes_le() {
++    fn check(s: &str, result: &str) {
++        assert_eq!(BigInt::from_bytes_le(Plus, s.as_bytes()),
++                   BigInt::parse_bytes(result.as_bytes(), 10).unwrap());
++    }
++    check("A", "65");
++    check("AA", "16705");
++    check("BA", "16706");
++    check("!dlrow olleH", "22405534230753963835153736737");
++    assert_eq!(BigInt::from_bytes_le(Plus, &[]), Zero::zero());
++    assert_eq!(BigInt::from_bytes_le(Minus, &[]), Zero::zero());
++}
++
++#[test]
++fn test_to_bytes_le() {
++    fn check(s: &str, result: &str) {
++        let b = BigInt::parse_bytes(result.as_bytes(), 10).unwrap();
++        let (sign, v) = b.to_bytes_le();
++        assert_eq!((Plus, s.as_bytes()), (sign, &*v));
++    }
++    check("A", "65");
++    check("AA", "16705");
++    check("BA", "16706");
++    check("!dlrow olleH", "22405534230753963835153736737");
++    let b: BigInt = Zero::zero();
++    assert_eq!(b.to_bytes_le(), (NoSign, vec![0]));
++
++    // Test with leading/trailing zero bytes and a full BigDigit of value 0
++    let b = BigInt::from_str_radix("00010000000000000200", 16).unwrap();
++    assert_eq!(b.to_bytes_le(), (Plus, vec![0, 2, 0, 0, 0, 0, 0, 0, 1]));
++}
++
++#[test]
++fn test_to_signed_bytes_le() {
++    fn check(s: &str, result: Vec<u8>) {
++        assert_eq!(BigInt::parse_bytes(s.as_bytes(), 10).unwrap().to_signed_bytes_le(),
++                   result);
++    }
++
++    check("0", vec![0]);
++    check("32767", vec![0xff, 0x7f]);
++    check("-1", vec![0xff]);
++    check("16777216", vec![0, 0, 0, 1]);
++    check("-100", vec![156]);
++    check("-8388608", vec![0, 0, 0x80]);
++    check("-192", vec![0x40, 0xff]);
++}
++
++#[test]
++fn test_from_signed_bytes_le() {
++    fn check(s: &[u8], result: &str) {
++        assert_eq!(BigInt::from_signed_bytes_le(s),
++                   BigInt::parse_bytes(result.as_bytes(), 10).unwrap());
++    }
++
++    check(&[], "0");
++    check(&[0], "0");
++    check(&[0; 10], "0");
++    check(&[0xff, 0x7f], "32767");
++    check(&[0xff], "-1");
++    check(&[0, 0, 0, 1], "16777216");
++    check(&[156], "-100");
++    check(&[0, 0, 0x80], "-8388608");
++    check(&[0xff; 10], "-1");
++    check(&[0x40, 0xff], "-192");
++}
++
++#[test]
++fn test_to_signed_bytes_be() {
++    fn check(s: &str, result: Vec<u8>) {
++        assert_eq!(BigInt::parse_bytes(s.as_bytes(), 10).unwrap().to_signed_bytes_be(),
++                   result);
++    }
++
++    check("0", vec![0]);
++    check("32767", vec![0x7f, 0xff]);
++    check("-1", vec![255]);
++    check("16777216", vec![1, 0, 0, 0]);
++    check("-100", vec![156]);
++    check("-8388608", vec![128, 0, 0]);
++    check("-192", vec![0xff, 0x40]);
++}
++
++#[test]
++fn test_from_signed_bytes_be() {
++    fn check(s: &[u8], result: &str) {
++        assert_eq!(BigInt::from_signed_bytes_be(s),
++                   BigInt::parse_bytes(result.as_bytes(), 10).unwrap());
++    }
++
++    check(&[], "0");
++    check(&[0], "0");
++    check(&[0; 10], "0");
++    check(&[127, 255], "32767");
++    check(&[255], "-1");
++    check(&[1, 0, 0, 0], "16777216");
++    check(&[156], "-100");
++    check(&[128, 0, 0], "-8388608");
++    check(&[255; 10], "-1");
++    check(&[0xff, 0x40], "-192");
++}
++
++#[test]
++fn test_cmp() {
++    let vs: [&[BigDigit]; 4] = [&[2 as BigDigit], &[1, 1], &[2, 1], &[1, 1, 1]];
++    let mut nums = Vec::new();
++    for s in vs.iter().rev() {
++        nums.push(BigInt::from_slice(Minus, *s));
++    }
++    nums.push(Zero::zero());
++    nums.extend(vs.iter().map(|s| BigInt::from_slice(Plus, *s)));
++
++    for (i, ni) in nums.iter().enumerate() {
++        for (j0, nj) in nums[i..].iter().enumerate() {
++            let j = i + j0;
++            if i == j {
++                assert_eq!(ni.cmp(nj), Equal);
++                assert_eq!(nj.cmp(ni), Equal);
++                assert_eq!(ni, nj);
++                assert!(!(ni != nj));
++                assert!(ni <= nj);
++                assert!(ni >= nj);
++                assert!(!(ni < nj));
++                assert!(!(ni > nj));
++            } else {
++                assert_eq!(ni.cmp(nj), Less);
++                assert_eq!(nj.cmp(ni), Greater);
++
++                assert!(!(ni == nj));
++                assert!(ni != nj);
++
++                assert!(ni <= nj);
++                assert!(!(ni >= nj));
++                assert!(ni < nj);
++                assert!(!(ni > nj));
++
++                assert!(!(nj <= ni));
++                assert!(nj >= ni);
++                assert!(!(nj < ni));
++                assert!(nj > ni);
++            }
++        }
++    }
++}
++
++
++#[test]
++fn test_hash() {
++    use hash;
++
++    let a = BigInt::new(NoSign, vec![]);
++    let b = BigInt::new(NoSign, vec![0]);
++    let c = BigInt::new(Plus, vec![1]);
++    let d = BigInt::new(Plus, vec![1, 0, 0, 0, 0, 0]);
++    let e = BigInt::new(Plus, vec![0, 0, 0, 0, 0, 1]);
++    let f = BigInt::new(Minus, vec![1]);
++    assert!(hash(&a) == hash(&b));
++    assert!(hash(&b) != hash(&c));
++    assert!(hash(&c) == hash(&d));
++    assert!(hash(&d) != hash(&e));
++    assert!(hash(&c) != hash(&f));
++}
++
++#[test]
++fn test_convert_i64() {
++    fn check(b1: BigInt, i: i64) {
++        let b2: BigInt = FromPrimitive::from_i64(i).unwrap();
++        assert!(b1 == b2);
++        assert!(b1.to_i64().unwrap() == i);
++    }
++
++    check(Zero::zero(), 0);
++    check(One::one(), 1);
++    check(i64::MIN.to_bigint().unwrap(), i64::MIN);
++    check(i64::MAX.to_bigint().unwrap(), i64::MAX);
++
++    assert_eq!((i64::MAX as u64 + 1).to_bigint().unwrap().to_i64(), None);
++
++    assert_eq!(BigInt::from_biguint(Plus, BigUint::new(vec![1, 2, 3, 4, 5])).to_i64(),
++               None);
++
++    assert_eq!(BigInt::from_biguint(Minus,
++                                    BigUint::new(vec![1, 0, 0, 1 << (big_digit::BITS - 1)]))
++                   .to_i64(),
++               None);
++
++    assert_eq!(BigInt::from_biguint(Minus, BigUint::new(vec![1, 2, 3, 4, 5])).to_i64(),
++               None);
++}
++
++#[test]
++fn test_convert_u64() {
++    fn check(b1: BigInt, u: u64) {
++        let b2: BigInt = FromPrimitive::from_u64(u).unwrap();
++        assert!(b1 == b2);
++        assert!(b1.to_u64().unwrap() == u);
++    }
++
++    check(Zero::zero(), 0);
++    check(One::one(), 1);
++    check(u64::MIN.to_bigint().unwrap(), u64::MIN);
++    check(u64::MAX.to_bigint().unwrap(), u64::MAX);
++
++    assert_eq!(BigInt::from_biguint(Plus, BigUint::new(vec![1, 2, 3, 4, 5])).to_u64(),
++               None);
++
++    let max_value: BigUint = FromPrimitive::from_u64(u64::MAX).unwrap();
++    assert_eq!(BigInt::from_biguint(Minus, max_value).to_u64(), None);
++    assert_eq!(BigInt::from_biguint(Minus, BigUint::new(vec![1, 2, 3, 4, 5])).to_u64(),
++               None);
++}
++
++#[test]
++fn test_convert_f32() {
++    fn check(b1: &BigInt, f: f32) {
++        let b2 = BigInt::from_f32(f).unwrap();
++        assert_eq!(b1, &b2);
++        assert_eq!(b1.to_f32().unwrap(), f);
++        let neg_b1 = -b1;
++        let neg_b2 = BigInt::from_f32(-f).unwrap();
++        assert_eq!(neg_b1, neg_b2);
++        assert_eq!(neg_b1.to_f32().unwrap(), -f);
++    }
++
++    check(&BigInt::zero(), 0.0);
++    check(&BigInt::one(), 1.0);
++    check(&BigInt::from(u16::MAX), 2.0.powi(16) - 1.0);
++    check(&BigInt::from(1u64 << 32), 2.0.powi(32));
++    check(&BigInt::from_slice(Plus, &[0, 0, 1]), 2.0.powi(64));
++    check(&((BigInt::one() << 100) + (BigInt::one() << 123)),
++          2.0.powi(100) + 2.0.powi(123));
++    check(&(BigInt::one() << 127), 2.0.powi(127));
++    check(&(BigInt::from((1u64 << 24) - 1) << (128 - 24)), f32::MAX);
++
++    // keeping all 24 digits with the bits at different offsets to the BigDigits
++    let x: u32 = 0b00000000101111011111011011011101;
++    let mut f = x as f32;
++    let mut b = BigInt::from(x);
++    for _ in 0..64 {
++        check(&b, f);
++        f *= 2.0;
++        b = b << 1;
++    }
++
++    // this number when rounded to f64 then f32 isn't the same as when rounded straight to f32
++    let mut n: i64 = 0b0000000000111111111111111111111111011111111111111111111111111111;
++    assert!((n as f64) as f32 != n as f32);
++    assert_eq!(BigInt::from(n).to_f32(), Some(n as f32));
++    n = -n;
++    assert!((n as f64) as f32 != n as f32);
++    assert_eq!(BigInt::from(n).to_f32(), Some(n as f32));
++
++    // test rounding up with the bits at different offsets to the BigDigits
++    let mut f = ((1u64 << 25) - 1) as f32;
++    let mut b = BigInt::from(1u64 << 25);
++    for _ in 0..64 {
++        assert_eq!(b.to_f32(), Some(f));
++        f *= 2.0;
++        b = b << 1;
++    }
++
++    // rounding
++    assert_eq!(BigInt::from_f32(-f32::consts::PI),
++               Some(BigInt::from(-3i32)));
++    assert_eq!(BigInt::from_f32(-f32::consts::E), Some(BigInt::from(-2i32)));
++    assert_eq!(BigInt::from_f32(-0.99999), Some(BigInt::zero()));
++    assert_eq!(BigInt::from_f32(-0.5), Some(BigInt::zero()));
++    assert_eq!(BigInt::from_f32(-0.0), Some(BigInt::zero()));
++    assert_eq!(BigInt::from_f32(f32::MIN_POSITIVE / 2.0),
++               Some(BigInt::zero()));
++    assert_eq!(BigInt::from_f32(f32::MIN_POSITIVE), Some(BigInt::zero()));
++    assert_eq!(BigInt::from_f32(0.5), Some(BigInt::zero()));
++    assert_eq!(BigInt::from_f32(0.99999), Some(BigInt::zero()));
++    assert_eq!(BigInt::from_f32(f32::consts::E), Some(BigInt::from(2u32)));
++    assert_eq!(BigInt::from_f32(f32::consts::PI), Some(BigInt::from(3u32)));
++
++    // special float values
++    assert_eq!(BigInt::from_f32(f32::NAN), None);
++    assert_eq!(BigInt::from_f32(f32::INFINITY), None);
++    assert_eq!(BigInt::from_f32(f32::NEG_INFINITY), None);
++
++    // largest BigInt that will round to a finite f32 value
++    let big_num = (BigInt::one() << 128) - BigInt::one() - (BigInt::one() << (128 - 25));
++    assert_eq!(big_num.to_f32(), Some(f32::MAX));
++    assert_eq!((&big_num + BigInt::one()).to_f32(), None);
++    assert_eq!((-&big_num).to_f32(), Some(f32::MIN));
++    assert_eq!(((-&big_num) - BigInt::one()).to_f32(), None);
++
++    assert_eq!(((BigInt::one() << 128) - BigInt::one()).to_f32(), None);
++    assert_eq!((BigInt::one() << 128).to_f32(), None);
++    assert_eq!((-((BigInt::one() << 128) - BigInt::one())).to_f32(), None);
++    assert_eq!((-(BigInt::one() << 128)).to_f32(), None);
++}
++
++#[test]
++fn test_convert_f64() {
++    fn check(b1: &BigInt, f: f64) {
++        let b2 = BigInt::from_f64(f).unwrap();
++        assert_eq!(b1, &b2);
++        assert_eq!(b1.to_f64().unwrap(), f);
++        let neg_b1 = -b1;
++        let neg_b2 = BigInt::from_f64(-f).unwrap();
++        assert_eq!(neg_b1, neg_b2);
++        assert_eq!(neg_b1.to_f64().unwrap(), -f);
++    }
++
++    check(&BigInt::zero(), 0.0);
++    check(&BigInt::one(), 1.0);
++    check(&BigInt::from(u32::MAX), 2.0.powi(32) - 1.0);
++    check(&BigInt::from(1u64 << 32), 2.0.powi(32));
++    check(&BigInt::from_slice(Plus, &[0, 0, 1]), 2.0.powi(64));
++    check(&((BigInt::one() << 100) + (BigInt::one() << 152)),
++          2.0.powi(100) + 2.0.powi(152));
++    check(&(BigInt::one() << 1023), 2.0.powi(1023));
++    check(&(BigInt::from((1u64 << 53) - 1) << (1024 - 53)), f64::MAX);
++
++    // keeping all 53 digits with the bits at different offsets to the BigDigits
++    let x: u64 = 0b0000000000011110111110110111111101110111101111011111011011011101;
++    let mut f = x as f64;
++    let mut b = BigInt::from(x);
++    for _ in 0..128 {
++        check(&b, f);
++        f *= 2.0;
++        b = b << 1;
++    }
++
++    // test rounding up with the bits at different offsets to the BigDigits
++    let mut f = ((1u64 << 54) - 1) as f64;
++    let mut b = BigInt::from(1u64 << 54);
++    for _ in 0..128 {
++        assert_eq!(b.to_f64(), Some(f));
++        f *= 2.0;
++        b = b << 1;
++    }
++
++    // rounding
++    assert_eq!(BigInt::from_f64(-f64::consts::PI),
++               Some(BigInt::from(-3i32)));
++    assert_eq!(BigInt::from_f64(-f64::consts::E), Some(BigInt::from(-2i32)));
++    assert_eq!(BigInt::from_f64(-0.99999), Some(BigInt::zero()));
++    assert_eq!(BigInt::from_f64(-0.5), Some(BigInt::zero()));
++    assert_eq!(BigInt::from_f64(-0.0), Some(BigInt::zero()));
++    assert_eq!(BigInt::from_f64(f64::MIN_POSITIVE / 2.0),
++               Some(BigInt::zero()));
++    assert_eq!(BigInt::from_f64(f64::MIN_POSITIVE), Some(BigInt::zero()));
++    assert_eq!(BigInt::from_f64(0.5), Some(BigInt::zero()));
++    assert_eq!(BigInt::from_f64(0.99999), Some(BigInt::zero()));
++    assert_eq!(BigInt::from_f64(f64::consts::E), Some(BigInt::from(2u32)));
++    assert_eq!(BigInt::from_f64(f64::consts::PI), Some(BigInt::from(3u32)));
++
++    // special float values
++    assert_eq!(BigInt::from_f64(f64::NAN), None);
++    assert_eq!(BigInt::from_f64(f64::INFINITY), None);
++    assert_eq!(BigInt::from_f64(f64::NEG_INFINITY), None);
++
++    // largest BigInt that will round to a finite f64 value
++    let big_num = (BigInt::one() << 1024) - BigInt::one() - (BigInt::one() << (1024 - 54));
++    assert_eq!(big_num.to_f64(), Some(f64::MAX));
++    assert_eq!((&big_num + BigInt::one()).to_f64(), None);
++    assert_eq!((-&big_num).to_f64(), Some(f64::MIN));
++    assert_eq!(((-&big_num) - BigInt::one()).to_f64(), None);
++
++    assert_eq!(((BigInt::one() << 1024) - BigInt::one()).to_f64(), None);
++    assert_eq!((BigInt::one() << 1024).to_f64(), None);
++    assert_eq!((-((BigInt::one() << 1024) - BigInt::one())).to_f64(), None);
++    assert_eq!((-(BigInt::one() << 1024)).to_f64(), None);
++}
++
++#[test]
++fn test_convert_to_biguint() {
++    fn check(n: BigInt, ans_1: BigUint) {
++        assert_eq!(n.to_biguint().unwrap(), ans_1);
++        assert_eq!(n.to_biguint().unwrap().to_bigint().unwrap(), n);
++    }
++    let zero: BigInt = Zero::zero();
++    let unsigned_zero: BigUint = Zero::zero();
++    let positive = BigInt::from_biguint(Plus, BigUint::new(vec![1, 2, 3]));
++    let negative = -&positive;
++
++    check(zero, unsigned_zero);
++    check(positive, BigUint::new(vec![1, 2, 3]));
++
++    assert_eq!(negative.to_biguint(), None);
++}
++
++#[test]
++fn test_convert_from_uint() {
++    macro_rules! check {
++        ($ty:ident, $max:expr) => {
++            assert_eq!(BigInt::from($ty::zero()), BigInt::zero());
++            assert_eq!(BigInt::from($ty::one()), BigInt::one());
++            assert_eq!(BigInt::from($ty::MAX - $ty::one()), $max - BigInt::one());
++            assert_eq!(BigInt::from($ty::MAX), $max);
++        }
++    }
++
++    check!(u8, BigInt::from_slice(Plus, &[u8::MAX as BigDigit]));
++    check!(u16, BigInt::from_slice(Plus, &[u16::MAX as BigDigit]));
++    check!(u32, BigInt::from_slice(Plus, &[u32::MAX as BigDigit]));
++    check!(u64,
++           BigInt::from_slice(Plus, &[u32::MAX as BigDigit, u32::MAX as BigDigit]));
++    check!(usize, BigInt::from(usize::MAX as u64));
++}
++
++#[test]
++fn test_convert_from_int() {
++    macro_rules! check {
++        ($ty:ident, $min:expr, $max:expr) => {
++            assert_eq!(BigInt::from($ty::MIN), $min);
++            assert_eq!(BigInt::from($ty::MIN + $ty::one()), $min + BigInt::one());
++            assert_eq!(BigInt::from(-$ty::one()), -BigInt::one());
++            assert_eq!(BigInt::from($ty::zero()), BigInt::zero());
++            assert_eq!(BigInt::from($ty::one()), BigInt::one());
++            assert_eq!(BigInt::from($ty::MAX - $ty::one()), $max - BigInt::one());
++            assert_eq!(BigInt::from($ty::MAX), $max);
++        }
++    }
++
++    check!(i8,
++           BigInt::from_slice(Minus, &[1 << 7]),
++           BigInt::from_slice(Plus, &[i8::MAX as BigDigit]));
++    check!(i16,
++           BigInt::from_slice(Minus, &[1 << 15]),
++           BigInt::from_slice(Plus, &[i16::MAX as BigDigit]));
++    check!(i32,
++           BigInt::from_slice(Minus, &[1 << 31]),
++           BigInt::from_slice(Plus, &[i32::MAX as BigDigit]));
++    check!(i64,
++           BigInt::from_slice(Minus, &[0, 1 << 31]),
++           BigInt::from_slice(Plus, &[u32::MAX as BigDigit, i32::MAX as BigDigit]));
++    check!(isize,
++           BigInt::from(isize::MIN as i64),
++           BigInt::from(isize::MAX as i64));
++}
++
++#[test]
++fn test_convert_from_biguint() {
++    assert_eq!(BigInt::from(BigUint::zero()), BigInt::zero());
++    assert_eq!(BigInt::from(BigUint::one()), BigInt::one());
++    assert_eq!(BigInt::from(BigUint::from_slice(&[1, 2, 3])),
++               BigInt::from_slice(Plus, &[1, 2, 3]));
++}
++
++const N1: BigDigit = -1i32 as BigDigit;
++const N2: BigDigit = -2i32 as BigDigit;
++
++const SUM_TRIPLES: &'static [(&'static [BigDigit],
++           &'static [BigDigit],
++           &'static [BigDigit])] = &[(&[], &[], &[]),
++                                     (&[], &[1], &[1]),
++                                     (&[1], &[1], &[2]),
++                                     (&[1], &[1, 1], &[2, 1]),
++                                     (&[1], &[N1], &[0, 1]),
++                                     (&[1], &[N1, N1], &[0, 0, 1]),
++                                     (&[N1, N1], &[N1, N1], &[N2, N1, 1]),
++                                     (&[1, 1, 1], &[N1, N1], &[0, 1, 2]),
++                                     (&[2, 2, 1], &[N1, N2], &[1, 1, 2])];
++
++#[test]
++fn test_add() {
++    for elm in SUM_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++        let (na, nb, nc) = (-&a, -&b, -&c);
++
++        assert_op!(a + b == c);
++        assert_op!(b + a == c);
++        assert_op!(c + na == b);
++        assert_op!(c + nb == a);
++        assert_op!(a + nc == nb);
++        assert_op!(b + nc == na);
++        assert_op!(na + nb == nc);
++        assert_op!(a + na == Zero::zero());
++    }
++}
++
++#[test]
++fn test_scalar_add() {
++    for elm in SUM_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++        let (na, nb, nc) = (-&a, -&b, -&c);
++
++        assert_scalar_op!(a + b == c);
++        assert_scalar_op!(b + a == c);
++        assert_scalar_op!(c + na == b);
++        assert_scalar_op!(c + nb == a);
++        assert_scalar_op!(a + nc == nb);
++        assert_scalar_op!(b + nc == na);
++        assert_scalar_op!(na + nb == nc);
++        assert_scalar_op!(a + na == Zero::zero());
++    }
++}
++
++#[test]
++fn test_sub() {
++    for elm in SUM_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++        let (na, nb, nc) = (-&a, -&b, -&c);
++
++        assert_op!(c - a == b);
++        assert_op!(c - b == a);
++        assert_op!(nb - a == nc);
++        assert_op!(na - b == nc);
++        assert_op!(b - na == c);
++        assert_op!(a - nb == c);
++        assert_op!(nc - na == nb);
++        assert_op!(a - a == Zero::zero());
++    }
++}
++
++#[test]
++fn test_scalar_sub() {
++    for elm in SUM_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++        let (na, nb, nc) = (-&a, -&b, -&c);
++
++        assert_scalar_op!(c - a == b);
++        assert_scalar_op!(c - b == a);
++        assert_scalar_op!(nb - a == nc);
++        assert_scalar_op!(na - b == nc);
++        assert_scalar_op!(b - na == c);
++        assert_scalar_op!(a - nb == c);
++        assert_scalar_op!(nc - na == nb);
++        assert_scalar_op!(a - a == Zero::zero());
++    }
++}
++
++const M: u32 = ::std::u32::MAX;
++static MUL_TRIPLES: &'static [(&'static [BigDigit],
++           &'static [BigDigit],
++           &'static [BigDigit])] = &[(&[], &[], &[]),
++                                     (&[], &[1], &[]),
++                                     (&[2], &[], &[]),
++                                     (&[1], &[1], &[1]),
++                                     (&[2], &[3], &[6]),
++                                     (&[1], &[1, 1, 1], &[1, 1, 1]),
++                                     (&[1, 2, 3], &[3], &[3, 6, 9]),
++                                     (&[1, 1, 1], &[N1], &[N1, N1, N1]),
++                                     (&[1, 2, 3], &[N1], &[N1, N2, N2, 2]),
++                                     (&[1, 2, 3, 4], &[N1], &[N1, N2, N2, N2, 3]),
++                                     (&[N1], &[N1], &[1, N2]),
++                                     (&[N1, N1], &[N1], &[1, N1, N2]),
++                                     (&[N1, N1, N1], &[N1], &[1, N1, N1, N2]),
++                                     (&[N1, N1, N1, N1], &[N1], &[1, N1, N1, N1, N2]),
++                                     (&[M / 2 + 1], &[2], &[0, 1]),
++                                     (&[0, M / 2 + 1], &[2], &[0, 0, 1]),
++                                     (&[1, 2], &[1, 2, 3], &[1, 4, 7, 6]),
++                                     (&[N1, N1], &[N1, N1, N1], &[1, 0, N1, N2, N1]),
++                                     (&[N1, N1, N1],
++                                      &[N1, N1, N1, N1],
++                                      &[1, 0, 0, N1, N2, N1, N1]),
++                                     (&[0, 0, 1], &[1, 2, 3], &[0, 0, 1, 2, 3]),
++                                     (&[0, 0, 1], &[0, 0, 0, 1], &[0, 0, 0, 0, 0, 1])];
++
++static DIV_REM_QUADRUPLES: &'static [(&'static [BigDigit],
++           &'static [BigDigit],
++           &'static [BigDigit],
++           &'static [BigDigit])] = &[(&[1], &[2], &[], &[1]),
++                                     (&[3], &[2], &[1], &[1]),
++                                     (&[1, 1], &[2], &[M / 2 + 1], &[1]),
++                                     (&[1, 1, 1], &[2], &[M / 2 + 1, M / 2 + 1], &[1]),
++                                     (&[0, 1], &[N1], &[1], &[1]),
++                                     (&[N1, N1], &[N2], &[2, 1], &[3])];
++
++#[test]
++fn test_mul() {
++    for elm in MUL_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++        let (na, nb, nc) = (-&a, -&b, -&c);
++
++        assert_op!(a * b == c);
++        assert_op!(b * a == c);
++        assert_op!(na * nb == c);
++
++        assert_op!(na * b == nc);
++        assert_op!(nb * a == nc);
++    }
++
++    for elm in DIV_REM_QUADRUPLES.iter() {
++        let (a_vec, b_vec, c_vec, d_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++        let d = BigInt::from_slice(Plus, d_vec);
++
++        assert!(a == &b * &c + &d);
++        assert!(a == &c * &b + &d);
++    }
++}
++
++#[test]
++fn test_scalar_mul() {
++    for elm in MUL_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++        let (na, nb, nc) = (-&a, -&b, -&c);
++
++        assert_scalar_op!(a * b == c);
++        assert_scalar_op!(b * a == c);
++        assert_scalar_op!(na * nb == c);
++
++        assert_scalar_op!(na * b == nc);
++        assert_scalar_op!(nb * a == nc);
++    }
++}
++
++#[test]
++fn test_div_mod_floor() {
++    fn check_sub(a: &BigInt, b: &BigInt, ans_d: &BigInt, ans_m: &BigInt) {
++        let (d, m) = a.div_mod_floor(b);
++        if !m.is_zero() {
++            assert_eq!(m.sign, b.sign);
++        }
++        assert!(m.abs() <= b.abs());
++        assert!(*a == b * &d + &m);
++        assert!(d == *ans_d);
++        assert!(m == *ans_m);
++    }
++
++    fn check(a: &BigInt, b: &BigInt, d: &BigInt, m: &BigInt) {
++        if m.is_zero() {
++            check_sub(a, b, d, m);
++            check_sub(a, &b.neg(), &d.neg(), m);
++            check_sub(&a.neg(), b, &d.neg(), m);
++            check_sub(&a.neg(), &b.neg(), d, m);
++        } else {
++            let one: BigInt = One::one();
++            check_sub(a, b, d, m);
++            check_sub(a, &b.neg(), &(d.neg() - &one), &(m - b));
++            check_sub(&a.neg(), b, &(d.neg() - &one), &(b - m));
++            check_sub(&a.neg(), &b.neg(), d, &m.neg());
++        }
++    }
++
++    for elm in MUL_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++
++        if !a.is_zero() {
++            check(&c, &a, &b, &Zero::zero());
++        }
++        if !b.is_zero() {
++            check(&c, &b, &a, &Zero::zero());
++        }
++    }
++
++    for elm in DIV_REM_QUADRUPLES.iter() {
++        let (a_vec, b_vec, c_vec, d_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++        let d = BigInt::from_slice(Plus, d_vec);
++
++        if !b.is_zero() {
++            check(&a, &b, &c, &d);
++        }
++    }
++}
++
++
++#[test]
++fn test_div_rem() {
++    fn check_sub(a: &BigInt, b: &BigInt, ans_q: &BigInt, ans_r: &BigInt) {
++        let (q, r) = a.div_rem(b);
++        if !r.is_zero() {
++            assert_eq!(r.sign, a.sign);
++        }
++        assert!(r.abs() <= b.abs());
++        assert!(*a == b * &q + &r);
++        assert!(q == *ans_q);
++        assert!(r == *ans_r);
++
++        let (a, b, ans_q, ans_r) = (a.clone(), b.clone(), ans_q.clone(), ans_r.clone());
++        assert_op!(a / b == ans_q);
++        assert_op!(a % b == ans_r);
++    }
++
++    fn check(a: &BigInt, b: &BigInt, q: &BigInt, r: &BigInt) {
++        check_sub(a, b, q, r);
++        check_sub(a, &b.neg(), &q.neg(), r);
++        check_sub(&a.neg(), b, &q.neg(), &r.neg());
++        check_sub(&a.neg(), &b.neg(), q, &r.neg());
++    }
++    for elm in MUL_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++
++        if !a.is_zero() {
++            check(&c, &a, &b, &Zero::zero());
++        }
++        if !b.is_zero() {
++            check(&c, &b, &a, &Zero::zero());
++        }
++    }
++
++    for elm in DIV_REM_QUADRUPLES.iter() {
++        let (a_vec, b_vec, c_vec, d_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++        let d = BigInt::from_slice(Plus, d_vec);
++
++        if !b.is_zero() {
++            check(&a, &b, &c, &d);
++        }
++    }
++}
++
++#[test]
++fn test_scalar_div_rem() {
++    fn check_sub(a: &BigInt, b: BigDigit, ans_q: &BigInt, ans_r: &BigInt) {
++        let (q, r) = (a / b, a % b);
++        if !r.is_zero() {
++            assert_eq!(r.sign, a.sign);
++        }
++        assert!(r.abs() <= From::from(b));
++        assert!(*a == b * &q + &r);
++        assert!(q == *ans_q);
++        assert!(r == *ans_r);
++
++        let (a, b, ans_q, ans_r) = (a.clone(), b.clone(), ans_q.clone(), ans_r.clone());
++        assert_op!(a / b == ans_q);
++        assert_op!(a % b == ans_r);
++
++        if b <= i32::max_value() as u32 {
++            let nb = -(b as i32);
++            assert_op!(a / nb == -ans_q.clone());
++            assert_op!(a % nb == ans_r);
++        }
++    }
++
++    fn check(a: &BigInt, b: BigDigit, q: &BigInt, r: &BigInt) {
++        check_sub(a, b, q, r);
++        check_sub(&a.neg(), b, &q.neg(), &r.neg());
++    }
++
++    for elm in MUL_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++
++        if a_vec.len() == 1 && a_vec[0] != 0 {
++            let a = a_vec[0];
++            check(&c, a, &b, &Zero::zero());
++        }
++
++        if b_vec.len() == 1 && b_vec[0] != 0 {
++            let b = b_vec[0];
++            check(&c, b, &a, &Zero::zero());
++        }
++    }
++
++    for elm in DIV_REM_QUADRUPLES.iter() {
++        let (a_vec, b_vec, c_vec, d_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++        let d = BigInt::from_slice(Plus, d_vec);
++
++        if b_vec.len() == 1 && b_vec[0] != 0 {
++            let b = b_vec[0];
++            check(&a, b, &c, &d);
++        }
++    }
++
++}
++
++#[test]
++fn test_checked_add() {
++    for elm in SUM_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++
++        assert!(a.checked_add(&b).unwrap() == c);
++        assert!(b.checked_add(&a).unwrap() == c);
++        assert!(c.checked_add(&(-&a)).unwrap() == b);
++        assert!(c.checked_add(&(-&b)).unwrap() == a);
++        assert!(a.checked_add(&(-&c)).unwrap() == (-&b));
++        assert!(b.checked_add(&(-&c)).unwrap() == (-&a));
++        assert!((-&a).checked_add(&(-&b)).unwrap() == (-&c));
++        assert!(a.checked_add(&(-&a)).unwrap() == Zero::zero());
++    }
++}
++
++#[test]
++fn test_checked_sub() {
++    for elm in SUM_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++
++        assert!(c.checked_sub(&a).unwrap() == b);
++        assert!(c.checked_sub(&b).unwrap() == a);
++        assert!((-&b).checked_sub(&a).unwrap() == (-&c));
++        assert!((-&a).checked_sub(&b).unwrap() == (-&c));
++        assert!(b.checked_sub(&(-&a)).unwrap() == c);
++        assert!(a.checked_sub(&(-&b)).unwrap() == c);
++        assert!((-&c).checked_sub(&(-&a)).unwrap() == (-&b));
++        assert!(a.checked_sub(&a).unwrap() == Zero::zero());
++    }
++}
++
++#[test]
++fn test_checked_mul() {
++    for elm in MUL_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++
++        assert!(a.checked_mul(&b).unwrap() == c);
++        assert!(b.checked_mul(&a).unwrap() == c);
++
++        assert!((-&a).checked_mul(&b).unwrap() == -&c);
++        assert!((-&b).checked_mul(&a).unwrap() == -&c);
++    }
++
++    for elm in DIV_REM_QUADRUPLES.iter() {
++        let (a_vec, b_vec, c_vec, d_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++        let d = BigInt::from_slice(Plus, d_vec);
++
++        assert!(a == b.checked_mul(&c).unwrap() + &d);
++        assert!(a == c.checked_mul(&b).unwrap() + &d);
++    }
++}
++#[test]
++fn test_checked_div() {
++    for elm in MUL_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigInt::from_slice(Plus, a_vec);
++        let b = BigInt::from_slice(Plus, b_vec);
++        let c = BigInt::from_slice(Plus, c_vec);
++
++        if !a.is_zero() {
++            assert!(c.checked_div(&a).unwrap() == b);
++            assert!((-&c).checked_div(&(-&a)).unwrap() == b);
++            assert!((-&c).checked_div(&a).unwrap() == -&b);
++        }
++        if !b.is_zero() {
++            assert!(c.checked_div(&b).unwrap() == a);
++            assert!((-&c).checked_div(&(-&b)).unwrap() == a);
++            assert!((-&c).checked_div(&b).unwrap() == -&a);
++        }
++
++        assert!(c.checked_div(&Zero::zero()).is_none());
++        assert!((-&c).checked_div(&Zero::zero()).is_none());
++    }
++}
++
++#[test]
++fn test_gcd() {
++    fn check(a: isize, b: isize, c: isize) {
++        let big_a: BigInt = FromPrimitive::from_isize(a).unwrap();
++        let big_b: BigInt = FromPrimitive::from_isize(b).unwrap();
++        let big_c: BigInt = FromPrimitive::from_isize(c).unwrap();
++
++        assert_eq!(big_a.gcd(&big_b), big_c);
++    }
++
++    check(10, 2, 2);
++    check(10, 3, 1);
++    check(0, 3, 3);
++    check(3, 3, 3);
++    check(56, 42, 14);
++    check(3, -3, 3);
++    check(-6, 3, 3);
++    check(-4, -2, 2);
++}
++
++#[test]
++fn test_lcm() {
++    fn check(a: isize, b: isize, c: isize) {
++        let big_a: BigInt = FromPrimitive::from_isize(a).unwrap();
++        let big_b: BigInt = FromPrimitive::from_isize(b).unwrap();
++        let big_c: BigInt = FromPrimitive::from_isize(c).unwrap();
++
++        assert_eq!(big_a.lcm(&big_b), big_c);
++    }
++
++    check(1, 0, 0);
++    check(0, 1, 0);
++    check(1, 1, 1);
++    check(-1, 1, 1);
++    check(1, -1, 1);
++    check(-1, -1, 1);
++    check(8, 9, 72);
++    check(11, 5, 55);
++}
++
++#[test]
++fn test_abs_sub() {
++    let zero: BigInt = Zero::zero();
++    let one: BigInt = One::one();
++    assert_eq!((-&one).abs_sub(&one), zero);
++    let one: BigInt = One::one();
++    let zero: BigInt = Zero::zero();
++    assert_eq!(one.abs_sub(&one), zero);
++    let one: BigInt = One::one();
++    let zero: BigInt = Zero::zero();
++    assert_eq!(one.abs_sub(&zero), one);
++    let one: BigInt = One::one();
++    let two: BigInt = FromPrimitive::from_isize(2).unwrap();
++    assert_eq!(one.abs_sub(&-&one), two);
++}
++
++#[test]
++fn test_from_str_radix() {
++    fn check(s: &str, ans: Option<isize>) {
++        let ans = ans.map(|n| {
++            let x: BigInt = FromPrimitive::from_isize(n).unwrap();
++            x
++        });
++        assert_eq!(BigInt::from_str_radix(s, 10).ok(), ans);
++    }
++    check("10", Some(10));
++    check("1", Some(1));
++    check("0", Some(0));
++    check("-1", Some(-1));
++    check("-10", Some(-10));
++    check("+10", Some(10));
++    check("--7", None);
++    check("++5", None);
++    check("+-9", None);
++    check("-+3", None);
++    check("Z", None);
++    check("_", None);
++
++    // issue 10522, this hit an edge case that caused it to
++    // attempt to allocate a vector of size (-1u) == huge.
++    let x: BigInt = format!("1{}", repeat("0").take(36).collect::<String>()).parse().unwrap();
++    let _y = x.to_string();
++}
++
++#[test]
++fn test_lower_hex() {
++    let a = BigInt::parse_bytes(b"A", 16).unwrap();
++    let hello = BigInt::parse_bytes("-22405534230753963835153736737".as_bytes(), 10).unwrap();
++
++    assert_eq!(format!("{:x}", a), "a");
++    assert_eq!(format!("{:x}", hello), "-48656c6c6f20776f726c6421");
++    assert_eq!(format!("{:♥>+#8x}", a), "♥♥♥♥+0xa");
++}
++
++#[test]
++fn test_upper_hex() {
++    let a = BigInt::parse_bytes(b"A", 16).unwrap();
++    let hello = BigInt::parse_bytes("-22405534230753963835153736737".as_bytes(), 10).unwrap();
++
++    assert_eq!(format!("{:X}", a), "A");
++    assert_eq!(format!("{:X}", hello), "-48656C6C6F20776F726C6421");
++    assert_eq!(format!("{:♥>+#8X}", a), "♥♥♥♥+0xA");
++}
++
++#[test]
++fn test_binary() {
++    let a = BigInt::parse_bytes(b"A", 16).unwrap();
++    let hello = BigInt::parse_bytes("-224055342307539".as_bytes(), 10).unwrap();
++
++    assert_eq!(format!("{:b}", a), "1010");
++    assert_eq!(format!("{:b}", hello),
++               "-110010111100011011110011000101101001100011010011");
++    assert_eq!(format!("{:♥>+#8b}", a), "♥+0b1010");
++}
++
++#[test]
++fn test_octal() {
++    let a = BigInt::parse_bytes(b"A", 16).unwrap();
++    let hello = BigInt::parse_bytes("-22405534230753963835153736737".as_bytes(), 10).unwrap();
++
++    assert_eq!(format!("{:o}", a), "12");
++    assert_eq!(format!("{:o}", hello), "-22062554330674403566756233062041");
++    assert_eq!(format!("{:♥>+#8o}", a), "♥♥♥+0o12");
++}
++
++#[test]
++fn test_display() {
++    let a = BigInt::parse_bytes(b"A", 16).unwrap();
++    let hello = BigInt::parse_bytes("-22405534230753963835153736737".as_bytes(), 10).unwrap();
++
++    assert_eq!(format!("{}", a), "10");
++    assert_eq!(format!("{}", hello), "-22405534230753963835153736737");
++    assert_eq!(format!("{:♥>+#8}", a), "♥♥♥♥♥+10");
++}
++
++#[test]
++fn test_neg() {
++    assert!(-BigInt::new(Plus, vec![1, 1, 1]) == BigInt::new(Minus, vec![1, 1, 1]));
++    assert!(-BigInt::new(Minus, vec![1, 1, 1]) == BigInt::new(Plus, vec![1, 1, 1]));
++    let zero: BigInt = Zero::zero();
++    assert_eq!(-&zero, zero);
++}
++
++#[test]
++fn test_rand() {
++    let mut rng = thread_rng();
++    let _n: BigInt = rng.gen_bigint(137);
++    assert!(rng.gen_bigint(0).is_zero());
++}
++
++#[test]
++fn test_rand_range() {
++    let mut rng = thread_rng();
++
++    for _ in 0..10 {
++        assert_eq!(rng.gen_bigint_range(&FromPrimitive::from_usize(236).unwrap(),
++                                        &FromPrimitive::from_usize(237).unwrap()),
++                   FromPrimitive::from_usize(236).unwrap());
++    }
++
++    fn check(l: BigInt, u: BigInt) {
++        let mut rng = thread_rng();
++        for _ in 0..1000 {
++            let n: BigInt = rng.gen_bigint_range(&l, &u);
++            assert!(n >= l);
++            assert!(n < u);
++        }
++    }
++    let l: BigInt = FromPrimitive::from_usize(403469000 + 2352).unwrap();
++    let u: BigInt = FromPrimitive::from_usize(403469000 + 3513).unwrap();
++    check(l.clone(), u.clone());
++    check(-l.clone(), u.clone());
++    check(-u.clone(), -l.clone());
++}
++
++#[test]
++#[should_panic]
++fn test_zero_rand_range() {
++    thread_rng().gen_bigint_range(&FromPrimitive::from_isize(54).unwrap(),
++                                  &FromPrimitive::from_isize(54).unwrap());
++}
++
++#[test]
++#[should_panic]
++fn test_negative_rand_range() {
++    let mut rng = thread_rng();
++    let l = FromPrimitive::from_usize(2352).unwrap();
++    let u = FromPrimitive::from_usize(3513).unwrap();
++    // Switching u and l should fail:
++    let _n: BigInt = rng.gen_bigint_range(&u, &l);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0f3b743efc0d9bcc923827a2510f0accb89ce65d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1614 @@@
++use integer::Integer;
++use {BigDigit, BigUint, ToBigUint, big_digit};
++use {BigInt, RandBigInt, ToBigInt};
++use Sign::Plus;
++
++use std::cmp::Ordering::{Less, Equal, Greater};
++use std::{f32, f64};
++use std::i64;
++use std::iter::repeat;
++use std::str::FromStr;
++use std::{u8, u16, u32, u64, usize};
++
++use rand::thread_rng;
++use traits::{Num, Zero, One, CheckedAdd, CheckedSub, CheckedMul, CheckedDiv, ToPrimitive,
++             FromPrimitive, Float};
++
++
++/// Assert that an op works for all val/ref combinations
++macro_rules! assert_op {
++    ($left:ident $op:tt $right:ident == $expected:expr) => {
++        assert_eq!((&$left) $op (&$right), $expected);
++        assert_eq!((&$left) $op $right.clone(), $expected);
++        assert_eq!($left.clone() $op (&$right), $expected);
++        assert_eq!($left.clone() $op $right.clone(), $expected);
++    };
++}
++
++/// Assert that an op works for scalar left or right
++macro_rules! assert_scalar_op {
++    (($($to:ident),*) $left:ident $op:tt $right:ident == $expected:expr) => {
++        $(
++            if let Some(left) = $left.$to() {
++                assert_op!(left $op $right == $expected);
++            }
++            if let Some(right) = $right.$to() {
++                assert_op!($left $op right == $expected);
++            }
++        )*
++    };
++    ($left:ident $op:tt $right:ident == $expected:expr) => {
++        assert_scalar_op!((to_u8, to_u16, to_u32, to_u64, to_usize)
++                          $left $op $right == $expected);
++    };
++}
++
++#[test]
++fn test_from_slice() {
++    fn check(slice: &[BigDigit], data: &[BigDigit]) {
++        assert!(BigUint::from_slice(slice).data == data);
++    }
++    check(&[1], &[1]);
++    check(&[0, 0, 0], &[]);
++    check(&[1, 2, 0, 0], &[1, 2]);
++    check(&[0, 0, 1, 2], &[0, 0, 1, 2]);
++    check(&[0, 0, 1, 2, 0, 0], &[0, 0, 1, 2]);
++    check(&[-1i32 as BigDigit], &[-1i32 as BigDigit]);
++}
++
++#[test]
++fn test_from_bytes_be() {
++    fn check(s: &str, result: &str) {
++        assert_eq!(BigUint::from_bytes_be(s.as_bytes()),
++                   BigUint::parse_bytes(result.as_bytes(), 10).unwrap());
++    }
++    check("A", "65");
++    check("AA", "16705");
++    check("AB", "16706");
++    check("Hello world!", "22405534230753963835153736737");
++    assert_eq!(BigUint::from_bytes_be(&[]), Zero::zero());
++}
++
++#[test]
++fn test_to_bytes_be() {
++    fn check(s: &str, result: &str) {
++        let b = BigUint::parse_bytes(result.as_bytes(), 10).unwrap();
++        assert_eq!(b.to_bytes_be(), s.as_bytes());
++    }
++    check("A", "65");
++    check("AA", "16705");
++    check("AB", "16706");
++    check("Hello world!", "22405534230753963835153736737");
++    let b: BigUint = Zero::zero();
++    assert_eq!(b.to_bytes_be(), [0]);
++
++    // Test with leading/trailing zero bytes and a full BigDigit of value 0
++    let b = BigUint::from_str_radix("00010000000000000200", 16).unwrap();
++    assert_eq!(b.to_bytes_be(), [1, 0, 0, 0, 0, 0, 0, 2, 0]);
++}
++
++#[test]
++fn test_from_bytes_le() {
++    fn check(s: &str, result: &str) {
++        assert_eq!(BigUint::from_bytes_le(s.as_bytes()),
++                   BigUint::parse_bytes(result.as_bytes(), 10).unwrap());
++    }
++    check("A", "65");
++    check("AA", "16705");
++    check("BA", "16706");
++    check("!dlrow olleH", "22405534230753963835153736737");
++    assert_eq!(BigUint::from_bytes_le(&[]), Zero::zero());
++}
++
++#[test]
++fn test_to_bytes_le() {
++    fn check(s: &str, result: &str) {
++        let b = BigUint::parse_bytes(result.as_bytes(), 10).unwrap();
++        assert_eq!(b.to_bytes_le(), s.as_bytes());
++    }
++    check("A", "65");
++    check("AA", "16705");
++    check("BA", "16706");
++    check("!dlrow olleH", "22405534230753963835153736737");
++    let b: BigUint = Zero::zero();
++    assert_eq!(b.to_bytes_le(), [0]);
++
++    // Test with leading/trailing zero bytes and a full BigDigit of value 0
++    let b = BigUint::from_str_radix("00010000000000000200", 16).unwrap();
++    assert_eq!(b.to_bytes_le(), [0, 2, 0, 0, 0, 0, 0, 0, 1]);
++}
++
++#[test]
++fn test_cmp() {
++    let data: [&[_]; 7] = [&[], &[1], &[2], &[!0], &[0, 1], &[2, 1], &[1, 1, 1]];
++    let data: Vec<BigUint> = data.iter().map(|v| BigUint::from_slice(*v)).collect();
++    for (i, ni) in data.iter().enumerate() {
++        for (j0, nj) in data[i..].iter().enumerate() {
++            let j = j0 + i;
++            if i == j {
++                assert_eq!(ni.cmp(nj), Equal);
++                assert_eq!(nj.cmp(ni), Equal);
++                assert_eq!(ni, nj);
++                assert!(!(ni != nj));
++                assert!(ni <= nj);
++                assert!(ni >= nj);
++                assert!(!(ni < nj));
++                assert!(!(ni > nj));
++            } else {
++                assert_eq!(ni.cmp(nj), Less);
++                assert_eq!(nj.cmp(ni), Greater);
++
++                assert!(!(ni == nj));
++                assert!(ni != nj);
++
++                assert!(ni <= nj);
++                assert!(!(ni >= nj));
++                assert!(ni < nj);
++                assert!(!(ni > nj));
++
++                assert!(!(nj <= ni));
++                assert!(nj >= ni);
++                assert!(!(nj < ni));
++                assert!(nj > ni);
++            }
++        }
++    }
++}
++
++#[test]
++fn test_hash() {
++    use hash;
++
++    let a = BigUint::new(vec![]);
++    let b = BigUint::new(vec![0]);
++    let c = BigUint::new(vec![1]);
++    let d = BigUint::new(vec![1, 0, 0, 0, 0, 0]);
++    let e = BigUint::new(vec![0, 0, 0, 0, 0, 1]);
++    assert!(hash(&a) == hash(&b));
++    assert!(hash(&b) != hash(&c));
++    assert!(hash(&c) == hash(&d));
++    assert!(hash(&d) != hash(&e));
++}
++
++const BIT_TESTS: &'static [(&'static [BigDigit],
++           &'static [BigDigit],
++           &'static [BigDigit],
++           &'static [BigDigit],
++           &'static [BigDigit])] = &[// LEFT              RIGHT        AND          OR                XOR
++                                     (&[], &[], &[], &[], &[]),
++                                     (&[268, 482, 17],
++                                      &[964, 54],
++                                      &[260, 34],
++                                      &[972, 502, 17],
++                                      &[712, 468, 17])];
++
++#[test]
++fn test_bitand() {
++    for elm in BIT_TESTS {
++        let (a_vec, b_vec, c_vec, _, _) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++
++        assert_op!(a & b == c);
++        assert_op!(b & a == c);
++    }
++}
++
++#[test]
++fn test_bitor() {
++    for elm in BIT_TESTS {
++        let (a_vec, b_vec, _, c_vec, _) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++
++        assert_op!(a | b == c);
++        assert_op!(b | a == c);
++    }
++}
++
++#[test]
++fn test_bitxor() {
++    for elm in BIT_TESTS {
++        let (a_vec, b_vec, _, _, c_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++
++        assert_op!(a ^ b == c);
++        assert_op!(b ^ a == c);
++        assert_op!(a ^ c == b);
++        assert_op!(c ^ a == b);
++        assert_op!(b ^ c == a);
++        assert_op!(c ^ b == a);
++    }
++}
++
++#[test]
++fn test_shl() {
++    fn check(s: &str, shift: usize, ans: &str) {
++        let opt_biguint = BigUint::from_str_radix(s, 16).ok();
++        let bu = (opt_biguint.unwrap() << shift).to_str_radix(16);
++        assert_eq!(bu, ans);
++    }
++
++    check("0", 3, "0");
++    check("1", 3, "8");
++
++    check("1\
++           0000\
++           0000\
++           0000\
++           0001\
++           0000\
++           0000\
++           0000\
++           0001",
++          3,
++          "8\
++           0000\
++           0000\
++           0000\
++           0008\
++           0000\
++           0000\
++           0000\
++           0008");
++    check("1\
++           0000\
++           0001\
++           0000\
++           0001",
++          2,
++          "4\
++           0000\
++           0004\
++           0000\
++           0004");
++    check("1\
++           0001\
++           0001",
++          1,
++          "2\
++           0002\
++           0002");
++
++    check("\
++          4000\
++          0000\
++          0000\
++          0000",
++          3,
++          "2\
++          0000\
++          0000\
++          0000\
++          0000");
++    check("4000\
++          0000",
++          2,
++          "1\
++          0000\
++          0000");
++    check("4000",
++          2,
++          "1\
++          0000");
++
++    check("4000\
++          0000\
++          0000\
++          0000",
++          67,
++          "2\
++          0000\
++          0000\
++          0000\
++          0000\
++          0000\
++          0000\
++          0000\
++          0000");
++    check("4000\
++          0000",
++          35,
++          "2\
++          0000\
++          0000\
++          0000\
++          0000");
++    check("4000",
++          19,
++          "2\
++          0000\
++          0000");
++
++    check("fedc\
++          ba98\
++          7654\
++          3210\
++          fedc\
++          ba98\
++          7654\
++          3210",
++          4,
++          "f\
++          edcb\
++          a987\
++          6543\
++          210f\
++          edcb\
++          a987\
++          6543\
++          2100");
++    check("88887777666655554444333322221111",
++          16,
++          "888877776666555544443333222211110000");
++}
++
++#[test]
++fn test_shr() {
++    fn check(s: &str, shift: usize, ans: &str) {
++        let opt_biguint = BigUint::from_str_radix(s, 16).ok();
++        let bu = (opt_biguint.unwrap() >> shift).to_str_radix(16);
++        assert_eq!(bu, ans);
++    }
++
++    check("0", 3, "0");
++    check("f", 3, "1");
++
++    check("1\
++          0000\
++          0000\
++          0000\
++          0001\
++          0000\
++          0000\
++          0000\
++          0001",
++          3,
++          "2000\
++          0000\
++          0000\
++          0000\
++          2000\
++          0000\
++          0000\
++          0000");
++    check("1\
++          0000\
++          0001\
++          0000\
++          0001",
++          2,
++          "4000\
++          0000\
++          4000\
++          0000");
++    check("1\
++          0001\
++          0001",
++          1,
++          "8000\
++          8000");
++
++    check("2\
++          0000\
++          0000\
++          0000\
++          0001\
++          0000\
++          0000\
++          0000\
++          0001",
++          67,
++          "4000\
++          0000\
++          0000\
++          0000");
++    check("2\
++          0000\
++          0001\
++          0000\
++          0001",
++          35,
++          "4000\
++          0000");
++    check("2\
++          0001\
++          0001",
++          19,
++          "4000");
++
++    check("1\
++          0000\
++          0000\
++          0000\
++          0000",
++          1,
++          "8000\
++          0000\
++          0000\
++          0000");
++    check("1\
++          0000\
++          0000",
++          1,
++          "8000\
++          0000");
++    check("1\
++          0000",
++          1,
++          "8000");
++    check("f\
++          edcb\
++          a987\
++          6543\
++          210f\
++          edcb\
++          a987\
++          6543\
++          2100",
++          4,
++          "fedc\
++          ba98\
++          7654\
++          3210\
++          fedc\
++          ba98\
++          7654\
++          3210");
++
++    check("888877776666555544443333222211110000",
++          16,
++          "88887777666655554444333322221111");
++}
++
++const N1: BigDigit = -1i32 as BigDigit;
++const N2: BigDigit = -2i32 as BigDigit;
++
++// `DoubleBigDigit` size dependent
++#[test]
++fn test_convert_i64() {
++    fn check(b1: BigUint, i: i64) {
++        let b2: BigUint = FromPrimitive::from_i64(i).unwrap();
++        assert_eq!(b1, b2);
++        assert_eq!(b1.to_i64().unwrap(), i);
++    }
++
++    check(Zero::zero(), 0);
++    check(One::one(), 1);
++    check(i64::MAX.to_biguint().unwrap(), i64::MAX);
++
++    check(BigUint::new(vec![]), 0);
++    check(BigUint::new(vec![1]), (1 << (0 * big_digit::BITS)));
++    check(BigUint::new(vec![N1]), (1 << (1 * big_digit::BITS)) - 1);
++    check(BigUint::new(vec![0, 1]), (1 << (1 * big_digit::BITS)));
++    check(BigUint::new(vec![N1, N1 >> 1]), i64::MAX);
++
++    assert_eq!(i64::MIN.to_biguint(), None);
++    assert_eq!(BigUint::new(vec![N1, N1]).to_i64(), None);
++    assert_eq!(BigUint::new(vec![0, 0, 1]).to_i64(), None);
++    assert_eq!(BigUint::new(vec![N1, N1, N1]).to_i64(), None);
++}
++
++// `DoubleBigDigit` size dependent
++#[test]
++fn test_convert_u64() {
++    fn check(b1: BigUint, u: u64) {
++        let b2: BigUint = FromPrimitive::from_u64(u).unwrap();
++        assert_eq!(b1, b2);
++        assert_eq!(b1.to_u64().unwrap(), u);
++    }
++
++    check(Zero::zero(), 0);
++    check(One::one(), 1);
++    check(u64::MIN.to_biguint().unwrap(), u64::MIN);
++    check(u64::MAX.to_biguint().unwrap(), u64::MAX);
++
++    check(BigUint::new(vec![]), 0);
++    check(BigUint::new(vec![1]), (1 << (0 * big_digit::BITS)));
++    check(BigUint::new(vec![N1]), (1 << (1 * big_digit::BITS)) - 1);
++    check(BigUint::new(vec![0, 1]), (1 << (1 * big_digit::BITS)));
++    check(BigUint::new(vec![N1, N1]), u64::MAX);
++
++    assert_eq!(BigUint::new(vec![0, 0, 1]).to_u64(), None);
++    assert_eq!(BigUint::new(vec![N1, N1, N1]).to_u64(), None);
++}
++
++#[test]
++fn test_convert_f32() {
++    fn check(b1: &BigUint, f: f32) {
++        let b2 = BigUint::from_f32(f).unwrap();
++        assert_eq!(b1, &b2);
++        assert_eq!(b1.to_f32().unwrap(), f);
++    }
++
++    check(&BigUint::zero(), 0.0);
++    check(&BigUint::one(), 1.0);
++    check(&BigUint::from(u16::MAX), 2.0.powi(16) - 1.0);
++    check(&BigUint::from(1u64 << 32), 2.0.powi(32));
++    check(&BigUint::from_slice(&[0, 0, 1]), 2.0.powi(64));
++    check(&((BigUint::one() << 100) + (BigUint::one() << 123)),
++          2.0.powi(100) + 2.0.powi(123));
++    check(&(BigUint::one() << 127), 2.0.powi(127));
++    check(&(BigUint::from((1u64 << 24) - 1) << (128 - 24)), f32::MAX);
++
++    // keeping all 24 digits with the bits at different offsets to the BigDigits
++    let x: u32 = 0b00000000101111011111011011011101;
++    let mut f = x as f32;
++    let mut b = BigUint::from(x);
++    for _ in 0..64 {
++        check(&b, f);
++        f *= 2.0;
++        b = b << 1;
++    }
++
++    // this number when rounded to f64 then f32 isn't the same as when rounded straight to f32
++    let n: u64 = 0b0000000000111111111111111111111111011111111111111111111111111111;
++    assert!((n as f64) as f32 != n as f32);
++    assert_eq!(BigUint::from(n).to_f32(), Some(n as f32));
++
++    // test rounding up with the bits at different offsets to the BigDigits
++    let mut f = ((1u64 << 25) - 1) as f32;
++    let mut b = BigUint::from(1u64 << 25);
++    for _ in 0..64 {
++        assert_eq!(b.to_f32(), Some(f));
++        f *= 2.0;
++        b = b << 1;
++    }
++
++    // rounding
++    assert_eq!(BigUint::from_f32(-1.0), None);
++    assert_eq!(BigUint::from_f32(-0.99999), Some(BigUint::zero()));
++    assert_eq!(BigUint::from_f32(-0.5), Some(BigUint::zero()));
++    assert_eq!(BigUint::from_f32(-0.0), Some(BigUint::zero()));
++    assert_eq!(BigUint::from_f32(f32::MIN_POSITIVE / 2.0),
++               Some(BigUint::zero()));
++    assert_eq!(BigUint::from_f32(f32::MIN_POSITIVE), Some(BigUint::zero()));
++    assert_eq!(BigUint::from_f32(0.5), Some(BigUint::zero()));
++    assert_eq!(BigUint::from_f32(0.99999), Some(BigUint::zero()));
++    assert_eq!(BigUint::from_f32(f32::consts::E), Some(BigUint::from(2u32)));
++    assert_eq!(BigUint::from_f32(f32::consts::PI),
++               Some(BigUint::from(3u32)));
++
++    // special float values
++    assert_eq!(BigUint::from_f32(f32::NAN), None);
++    assert_eq!(BigUint::from_f32(f32::INFINITY), None);
++    assert_eq!(BigUint::from_f32(f32::NEG_INFINITY), None);
++    assert_eq!(BigUint::from_f32(f32::MIN), None);
++
++    // largest BigUint that will round to a finite f32 value
++    let big_num = (BigUint::one() << 128) - BigUint::one() - (BigUint::one() << (128 - 25));
++    assert_eq!(big_num.to_f32(), Some(f32::MAX));
++    assert_eq!((big_num + BigUint::one()).to_f32(), None);
++
++    assert_eq!(((BigUint::one() << 128) - BigUint::one()).to_f32(), None);
++    assert_eq!((BigUint::one() << 128).to_f32(), None);
++}
++
++#[test]
++fn test_convert_f64() {
++    fn check(b1: &BigUint, f: f64) {
++        let b2 = BigUint::from_f64(f).unwrap();
++        assert_eq!(b1, &b2);
++        assert_eq!(b1.to_f64().unwrap(), f);
++    }
++
++    check(&BigUint::zero(), 0.0);
++    check(&BigUint::one(), 1.0);
++    check(&BigUint::from(u32::MAX), 2.0.powi(32) - 1.0);
++    check(&BigUint::from(1u64 << 32), 2.0.powi(32));
++    check(&BigUint::from_slice(&[0, 0, 1]), 2.0.powi(64));
++    check(&((BigUint::one() << 100) + (BigUint::one() << 152)),
++          2.0.powi(100) + 2.0.powi(152));
++    check(&(BigUint::one() << 1023), 2.0.powi(1023));
++    check(&(BigUint::from((1u64 << 53) - 1) << (1024 - 53)), f64::MAX);
++
++    // keeping all 53 digits with the bits at different offsets to the BigDigits
++    let x: u64 = 0b0000000000011110111110110111111101110111101111011111011011011101;
++    let mut f = x as f64;
++    let mut b = BigUint::from(x);
++    for _ in 0..128 {
++        check(&b, f);
++        f *= 2.0;
++        b = b << 1;
++    }
++
++    // test rounding up with the bits at different offsets to the BigDigits
++    let mut f = ((1u64 << 54) - 1) as f64;
++    let mut b = BigUint::from(1u64 << 54);
++    for _ in 0..128 {
++        assert_eq!(b.to_f64(), Some(f));
++        f *= 2.0;
++        b = b << 1;
++    }
++
++    // rounding
++    assert_eq!(BigUint::from_f64(-1.0), None);
++    assert_eq!(BigUint::from_f64(-0.99999), Some(BigUint::zero()));
++    assert_eq!(BigUint::from_f64(-0.5), Some(BigUint::zero()));
++    assert_eq!(BigUint::from_f64(-0.0), Some(BigUint::zero()));
++    assert_eq!(BigUint::from_f64(f64::MIN_POSITIVE / 2.0),
++               Some(BigUint::zero()));
++    assert_eq!(BigUint::from_f64(f64::MIN_POSITIVE), Some(BigUint::zero()));
++    assert_eq!(BigUint::from_f64(0.5), Some(BigUint::zero()));
++    assert_eq!(BigUint::from_f64(0.99999), Some(BigUint::zero()));
++    assert_eq!(BigUint::from_f64(f64::consts::E), Some(BigUint::from(2u32)));
++    assert_eq!(BigUint::from_f64(f64::consts::PI),
++               Some(BigUint::from(3u32)));
++
++    // special float values
++    assert_eq!(BigUint::from_f64(f64::NAN), None);
++    assert_eq!(BigUint::from_f64(f64::INFINITY), None);
++    assert_eq!(BigUint::from_f64(f64::NEG_INFINITY), None);
++    assert_eq!(BigUint::from_f64(f64::MIN), None);
++
++    // largest BigUint that will round to a finite f64 value
++    let big_num = (BigUint::one() << 1024) - BigUint::one() - (BigUint::one() << (1024 - 54));
++    assert_eq!(big_num.to_f64(), Some(f64::MAX));
++    assert_eq!((big_num + BigUint::one()).to_f64(), None);
++
++    assert_eq!(((BigInt::one() << 1024) - BigInt::one()).to_f64(), None);
++    assert_eq!((BigUint::one() << 1024).to_f64(), None);
++}
++
++#[test]
++fn test_convert_to_bigint() {
++    fn check(n: BigUint, ans: BigInt) {
++        assert_eq!(n.to_bigint().unwrap(), ans);
++        assert_eq!(n.to_bigint().unwrap().to_biguint().unwrap(), n);
++    }
++    check(Zero::zero(), Zero::zero());
++    check(BigUint::new(vec![1, 2, 3]),
++          BigInt::from_biguint(Plus, BigUint::new(vec![1, 2, 3])));
++}
++
++#[test]
++fn test_convert_from_uint() {
++    macro_rules! check {
++        ($ty:ident, $max:expr) => {
++            assert_eq!(BigUint::from($ty::zero()), BigUint::zero());
++            assert_eq!(BigUint::from($ty::one()), BigUint::one());
++            assert_eq!(BigUint::from($ty::MAX - $ty::one()), $max - BigUint::one());
++            assert_eq!(BigUint::from($ty::MAX), $max);
++        }
++    }
++
++    check!(u8, BigUint::from_slice(&[u8::MAX as BigDigit]));
++    check!(u16, BigUint::from_slice(&[u16::MAX as BigDigit]));
++    check!(u32, BigUint::from_slice(&[u32::MAX]));
++    check!(u64, BigUint::from_slice(&[u32::MAX, u32::MAX]));
++    check!(usize, BigUint::from(usize::MAX as u64));
++}
++
++const SUM_TRIPLES: &'static [(&'static [BigDigit],
++           &'static [BigDigit],
++           &'static [BigDigit])] = &[(&[], &[], &[]),
++                                     (&[], &[1], &[1]),
++                                     (&[1], &[1], &[2]),
++                                     (&[1], &[1, 1], &[2, 1]),
++                                     (&[1], &[N1], &[0, 1]),
++                                     (&[1], &[N1, N1], &[0, 0, 1]),
++                                     (&[N1, N1], &[N1, N1], &[N2, N1, 1]),
++                                     (&[1, 1, 1], &[N1, N1], &[0, 1, 2]),
++                                     (&[2, 2, 1], &[N1, N2], &[1, 1, 2])];
++
++#[test]
++fn test_add() {
++    for elm in SUM_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++
++        assert_op!(a + b == c);
++        assert_op!(b + a == c);
++    }
++}
++
++#[test]
++fn test_scalar_add() {
++    for elm in SUM_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++
++        assert_scalar_op!(a + b == c);
++        assert_scalar_op!(b + a == c);
++    }
++}
++
++#[test]
++fn test_sub() {
++    for elm in SUM_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++
++        assert_op!(c - a == b);
++        assert_op!(c - b == a);
++    }
++}
++
++#[test]
++fn test_scalar_sub() {
++    for elm in SUM_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++
++        assert_scalar_op!(c - a == b);
++        assert_scalar_op!(c - b == a);
++    }
++}
++
++#[test]
++#[should_panic]
++fn test_sub_fail_on_underflow() {
++    let (a, b): (BigUint, BigUint) = (Zero::zero(), One::one());
++    a - b;
++}
++
++const M: u32 = ::std::u32::MAX;
++const MUL_TRIPLES: &'static [(&'static [BigDigit],
++           &'static [BigDigit],
++           &'static [BigDigit])] = &[(&[], &[], &[]),
++                                     (&[], &[1], &[]),
++                                     (&[2], &[], &[]),
++                                     (&[1], &[1], &[1]),
++                                     (&[2], &[3], &[6]),
++                                     (&[1], &[1, 1, 1], &[1, 1, 1]),
++                                     (&[1, 2, 3], &[3], &[3, 6, 9]),
++                                     (&[1, 1, 1], &[N1], &[N1, N1, N1]),
++                                     (&[1, 2, 3], &[N1], &[N1, N2, N2, 2]),
++                                     (&[1, 2, 3, 4], &[N1], &[N1, N2, N2, N2, 3]),
++                                     (&[N1], &[N1], &[1, N2]),
++                                     (&[N1, N1], &[N1], &[1, N1, N2]),
++                                     (&[N1, N1, N1], &[N1], &[1, N1, N1, N2]),
++                                     (&[N1, N1, N1, N1], &[N1], &[1, N1, N1, N1, N2]),
++                                     (&[M / 2 + 1], &[2], &[0, 1]),
++                                     (&[0, M / 2 + 1], &[2], &[0, 0, 1]),
++                                     (&[1, 2], &[1, 2, 3], &[1, 4, 7, 6]),
++                                     (&[N1, N1], &[N1, N1, N1], &[1, 0, N1, N2, N1]),
++                                     (&[N1, N1, N1],
++                                      &[N1, N1, N1, N1],
++                                      &[1, 0, 0, N1, N2, N1, N1]),
++                                     (&[0, 0, 1], &[1, 2, 3], &[0, 0, 1, 2, 3]),
++                                     (&[0, 0, 1], &[0, 0, 0, 1], &[0, 0, 0, 0, 0, 1])];
++
++const DIV_REM_QUADRUPLES: &'static [(&'static [BigDigit],
++           &'static [BigDigit],
++           &'static [BigDigit],
++           &'static [BigDigit])] = &[(&[1], &[2], &[], &[1]),
++                                     (&[3], &[2], &[1], &[1]),
++                                     (&[1, 1], &[2], &[M / 2 + 1], &[1]),
++                                     (&[1, 1, 1], &[2], &[M / 2 + 1, M / 2 + 1], &[1]),
++                                     (&[0, 1], &[N1], &[1], &[1]),
++                                     (&[N1, N1], &[N2], &[2, 1], &[3])];
++
++#[test]
++fn test_mul() {
++    for elm in MUL_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++
++        assert_op!(a * b == c);
++        assert_op!(b * a == c);
++    }
++
++    for elm in DIV_REM_QUADRUPLES.iter() {
++        let (a_vec, b_vec, c_vec, d_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++        let d = BigUint::from_slice(d_vec);
++
++        assert!(a == &b * &c + &d);
++        assert!(a == &c * &b + &d);
++    }
++}
++
++#[test]
++fn test_scalar_mul() {
++    for elm in MUL_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++
++        assert_scalar_op!(a * b == c);
++        assert_scalar_op!(b * a == c);
++    }
++}
++
++#[test]
++fn test_div_rem() {
++    for elm in MUL_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++
++        if !a.is_zero() {
++            assert_op!(c / a == b);
++            assert_op!(c % a == Zero::zero());
++            assert_eq!(c.div_rem(&a), (b.clone(), Zero::zero()));
++        }
++        if !b.is_zero() {
++            assert_op!(c / b == a);
++            assert_op!(c % b == Zero::zero());
++            assert_eq!(c.div_rem(&b), (a.clone(), Zero::zero()));
++        }
++    }
++
++    for elm in DIV_REM_QUADRUPLES.iter() {
++        let (a_vec, b_vec, c_vec, d_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++        let d = BigUint::from_slice(d_vec);
++
++        if !b.is_zero() {
++            assert_op!(a / b == c);
++            assert_op!(a % b == d);
++            assert!(a.div_rem(&b) == (c, d));
++        }
++    }
++}
++
++#[test]
++fn test_scalar_div_rem() {
++    for elm in MUL_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++
++        if !a.is_zero() {
++            assert_scalar_op!(c / a == b);
++            assert_scalar_op!(c % a == Zero::zero());
++        }
++
++        if !b.is_zero() {
++            assert_scalar_op!(c / b == a);
++            assert_scalar_op!(c % b == Zero::zero());
++        }
++    }
++
++    for elm in DIV_REM_QUADRUPLES.iter() {
++        let (a_vec, b_vec, c_vec, d_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++        let d = BigUint::from_slice(d_vec);
++
++        if !b.is_zero() {
++            assert_scalar_op!(a / b == c);
++            assert_scalar_op!(a % b == d);
++        }
++    }
++}
++
++#[test]
++fn test_checked_add() {
++    for elm in SUM_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++
++        assert!(a.checked_add(&b).unwrap() == c);
++        assert!(b.checked_add(&a).unwrap() == c);
++    }
++}
++
++#[test]
++fn test_checked_sub() {
++    for elm in SUM_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++
++        assert!(c.checked_sub(&a).unwrap() == b);
++        assert!(c.checked_sub(&b).unwrap() == a);
++
++        if a > c {
++            assert!(a.checked_sub(&c).is_none());
++        }
++        if b > c {
++            assert!(b.checked_sub(&c).is_none());
++        }
++    }
++}
++
++#[test]
++fn test_checked_mul() {
++    for elm in MUL_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++
++        assert!(a.checked_mul(&b).unwrap() == c);
++        assert!(b.checked_mul(&a).unwrap() == c);
++    }
++
++    for elm in DIV_REM_QUADRUPLES.iter() {
++        let (a_vec, b_vec, c_vec, d_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++        let d = BigUint::from_slice(d_vec);
++
++        assert!(a == b.checked_mul(&c).unwrap() + &d);
++        assert!(a == c.checked_mul(&b).unwrap() + &d);
++    }
++}
++
++#[test]
++fn test_mul_overflow() {
++    /* Test for issue #187 - overflow due to mac3 incorrectly sizing temporary */
++    let s = "531137992816767098689588206552468627329593117727031923199444138200403559860852242739162502232636710047537552105951370000796528760829212940754539968588340162273730474622005920097370111";
++    let a: BigUint = s.parse().unwrap();
++    let b = a.clone();
++    let _ = a.checked_mul(&b);
++}
++
++#[test]
++fn test_checked_div() {
++    for elm in MUL_TRIPLES.iter() {
++        let (a_vec, b_vec, c_vec) = *elm;
++        let a = BigUint::from_slice(a_vec);
++        let b = BigUint::from_slice(b_vec);
++        let c = BigUint::from_slice(c_vec);
++
++        if !a.is_zero() {
++            assert!(c.checked_div(&a).unwrap() == b);
++        }
++        if !b.is_zero() {
++            assert!(c.checked_div(&b).unwrap() == a);
++        }
++
++        assert!(c.checked_div(&Zero::zero()).is_none());
++    }
++}
++
++#[test]
++fn test_gcd() {
++    fn check(a: usize, b: usize, c: usize) {
++        let big_a: BigUint = FromPrimitive::from_usize(a).unwrap();
++        let big_b: BigUint = FromPrimitive::from_usize(b).unwrap();
++        let big_c: BigUint = FromPrimitive::from_usize(c).unwrap();
++
++        assert_eq!(big_a.gcd(&big_b), big_c);
++    }
++
++    check(10, 2, 2);
++    check(10, 3, 1);
++    check(0, 3, 3);
++    check(3, 3, 3);
++    check(56, 42, 14);
++}
++
++#[test]
++fn test_lcm() {
++    fn check(a: usize, b: usize, c: usize) {
++        let big_a: BigUint = FromPrimitive::from_usize(a).unwrap();
++        let big_b: BigUint = FromPrimitive::from_usize(b).unwrap();
++        let big_c: BigUint = FromPrimitive::from_usize(c).unwrap();
++
++        assert_eq!(big_a.lcm(&big_b), big_c);
++    }
++
++    check(1, 0, 0);
++    check(0, 1, 0);
++    check(1, 1, 1);
++    check(8, 9, 72);
++    check(11, 5, 55);
++    check(99, 17, 1683);
++}
++
++#[test]
++fn test_is_even() {
++    let one: BigUint = FromStr::from_str("1").unwrap();
++    let two: BigUint = FromStr::from_str("2").unwrap();
++    let thousand: BigUint = FromStr::from_str("1000").unwrap();
++    let big: BigUint = FromStr::from_str("1000000000000000000000").unwrap();
++    let bigger: BigUint = FromStr::from_str("1000000000000000000001").unwrap();
++    assert!(one.is_odd());
++    assert!(two.is_even());
++    assert!(thousand.is_even());
++    assert!(big.is_even());
++    assert!(bigger.is_odd());
++    assert!((&one << 64).is_even());
++    assert!(((&one << 64) + one).is_odd());
++}
++
++fn to_str_pairs() -> Vec<(BigUint, Vec<(u32, String)>)> {
++    let bits = big_digit::BITS;
++    vec![(Zero::zero(),
++          vec![(2, "0".to_string()), (3, "0".to_string())]),
++         (BigUint::from_slice(&[0xff]),
++          vec![(2, "11111111".to_string()),
++               (3, "100110".to_string()),
++               (4, "3333".to_string()),
++               (5, "2010".to_string()),
++               (6, "1103".to_string()),
++               (7, "513".to_string()),
++               (8, "377".to_string()),
++               (9, "313".to_string()),
++               (10, "255".to_string()),
++               (11, "212".to_string()),
++               (12, "193".to_string()),
++               (13, "168".to_string()),
++               (14, "143".to_string()),
++               (15, "120".to_string()),
++               (16, "ff".to_string())]),
++         (BigUint::from_slice(&[0xfff]),
++          vec![(2, "111111111111".to_string()),
++               (4, "333333".to_string()),
++               (16, "fff".to_string())]),
++         (BigUint::from_slice(&[1, 2]),
++          vec![(2,
++                format!("10{}1", repeat("0").take(bits - 1).collect::<String>())),
++               (4,
++                format!("2{}1", repeat("0").take(bits / 2 - 1).collect::<String>())),
++               (10,
++                match bits {
++                   64 => "36893488147419103233".to_string(),
++                   32 => "8589934593".to_string(),
++                   16 => "131073".to_string(),
++                   _ => panic!(),
++               }),
++               (16,
++                format!("2{}1", repeat("0").take(bits / 4 - 1).collect::<String>()))]),
++         (BigUint::from_slice(&[1, 2, 3]),
++          vec![(2,
++                format!("11{}10{}1",
++                        repeat("0").take(bits - 2).collect::<String>(),
++                        repeat("0").take(bits - 1).collect::<String>())),
++               (4,
++                format!("3{}2{}1",
++                        repeat("0").take(bits / 2 - 1).collect::<String>(),
++                        repeat("0").take(bits / 2 - 1).collect::<String>())),
++               (8,
++                match bits {
++                   64 => "14000000000000000000004000000000000000000001".to_string(),
++                   32 => "6000000000100000000001".to_string(),
++                   16 => "140000400001".to_string(),
++                   _ => panic!(),
++               }),
++               (10,
++                match bits {
++                   64 => "1020847100762815390427017310442723737601".to_string(),
++                   32 => "55340232229718589441".to_string(),
++                   16 => "12885032961".to_string(),
++                   _ => panic!(),
++               }),
++               (16,
++                format!("3{}2{}1",
++                        repeat("0").take(bits / 4 - 1).collect::<String>(),
++                        repeat("0").take(bits / 4 - 1).collect::<String>()))])]
++}
++
++#[test]
++fn test_to_str_radix() {
++    let r = to_str_pairs();
++    for num_pair in r.iter() {
++        let &(ref n, ref rs) = num_pair;
++        for str_pair in rs.iter() {
++            let &(ref radix, ref str) = str_pair;
++            assert_eq!(n.to_str_radix(*radix), *str);
++        }
++    }
++}
++
++#[test]
++fn test_from_and_to_radix() {
++    const GROUND_TRUTH : &'static[(&'static[u8], u32, &'static[u8])] = &[
++        (b"0",          42, &[0]),
++        (b"ffffeeffbb", 2, &[1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,
++                             1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
++                             1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),
++        (b"ffffeeffbb", 3, &[2, 2, 1, 1, 2, 1, 1, 2, 0, 0, 0, 0, 0, 1, 2,
++                             0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 1]),
++        (b"ffffeeffbb", 4, &[3, 2, 3, 2, 3, 3, 3, 3, 2, 3, 2, 3, 3, 3, 3,
++                             3, 3, 3, 3, 3]),
++        (b"ffffeeffbb", 5, &[0, 4, 3, 3, 1, 4, 2, 4, 1, 4, 4, 2, 3, 0, 0,
++                             1, 2, 1]),
++        (b"ffffeeffbb", 6, &[5, 5, 4, 5, 5, 0, 0, 1, 2, 5, 3, 0, 1, 0, 2, 2]),
++        (b"ffffeeffbb", 7, &[4, 2, 3, 6, 0, 1, 6, 1, 6, 2, 0, 3, 2, 4, 1]),
++        (b"ffffeeffbb", 8, &[3, 7, 6, 7, 7, 5, 3, 7, 7, 7, 7, 7, 7, 1]),
++        (b"ffffeeffbb", 9, &[8, 4, 5, 7, 0, 0, 3, 2, 0, 3, 0, 8, 3]),
++        (b"ffffeeffbb", 10, &[5, 9, 5, 3, 1, 5, 0, 1, 5, 9, 9, 0, 1]),
++        (b"ffffeeffbb", 11, &[10, 7, 6, 5, 2, 0, 3, 3, 3, 4, 9, 3]),
++        (b"ffffeeffbb", 12, &[11, 8, 5, 10, 1, 10, 3, 1, 1, 9, 5, 1]),
++        (b"ffffeeffbb", 13, &[0, 5, 7, 4, 6, 5, 6, 11, 8, 12, 7]),
++        (b"ffffeeffbb", 14, &[11, 4, 4, 11, 8, 4, 6, 0, 3, 11, 3]),
++        (b"ffffeeffbb", 15, &[5, 11, 13, 2, 1, 10, 2, 0, 9, 13, 1]),
++        (b"ffffeeffbb", 16, &[11, 11, 15, 15, 14, 14, 15, 15, 15, 15]),
++        (b"ffffeeffbb", 17, &[0, 2, 14, 12, 2, 14, 8, 10, 4, 9]),
++        (b"ffffeeffbb", 18, &[17, 15, 5, 13, 10, 16, 16, 13, 9, 5]),
++        (b"ffffeeffbb", 19, &[14, 13, 2, 8, 9, 0, 1, 14, 7, 3]),
++        (b"ffffeeffbb", 20, &[15, 19, 3, 14, 0, 17, 19, 18, 2, 2]),
++        (b"ffffeeffbb", 21, &[11, 5, 4, 13, 5, 18, 9, 1, 8, 1]),
++        (b"ffffeeffbb", 22, &[21, 3, 7, 21, 15, 12, 17, 0, 20]),
++        (b"ffffeeffbb", 23, &[21, 21, 6, 9, 10, 7, 21, 0, 14]),
++        (b"ffffeeffbb", 24, &[11, 10, 19, 14, 22, 11, 17, 23, 9]),
++        (b"ffffeeffbb", 25, &[20, 18, 21, 22, 21, 14, 3, 5, 7]),
++        (b"ffffeeffbb", 26, &[13, 15, 24, 11, 17, 6, 23, 6, 5]),
++        (b"ffffeeffbb", 27, &[17, 16, 7, 0, 21, 0, 3, 24, 3]),
++        (b"ffffeeffbb", 28, &[11, 16, 11, 15, 14, 18, 13, 25, 2]),
++        (b"ffffeeffbb", 29, &[6, 8, 7, 19, 14, 13, 21, 5, 2]),
++        (b"ffffeeffbb", 30, &[5, 13, 18, 11, 10, 7, 8, 20, 1]),
++        (b"ffffeeffbb", 31, &[22, 26, 15, 19, 8, 27, 29, 8, 1]),
++        (b"ffffeeffbb", 32, &[27, 29, 31, 29, 30, 31, 31, 31]),
++        (b"ffffeeffbb", 33, &[32, 20, 27, 12, 1, 12, 26, 25]),
++        (b"ffffeeffbb", 34, &[17, 9, 16, 33, 13, 25, 31, 20]),
++        (b"ffffeeffbb", 35, &[25, 32, 2, 25, 11, 4, 3, 17]),
++        (b"ffffeeffbb", 36, &[35, 34, 5, 6, 32, 3, 1, 14]),
++        (b"ffffeeffbb", 37, &[16, 21, 18, 4, 33, 19, 21, 11]),
++        (b"ffffeeffbb", 38, &[33, 25, 19, 29, 20, 6, 23, 9]),
++        (b"ffffeeffbb", 39, &[26, 27, 29, 23, 16, 18, 0, 8]),
++        (b"ffffeeffbb", 40, &[35, 39, 30, 11, 16, 17, 28, 6]),
++        (b"ffffeeffbb", 41, &[36, 30, 9, 18, 12, 19, 26, 5]),
++        (b"ffffeeffbb", 42, &[11, 34, 37, 27, 1, 13, 32, 4]),
++        (b"ffffeeffbb", 43, &[3, 24, 11, 2, 10, 40, 1, 4]),
++        (b"ffffeeffbb", 44, &[43, 12, 40, 32, 3, 23, 19, 3]),
++        (b"ffffeeffbb", 45, &[35, 38, 44, 18, 22, 18, 42, 2]),
++        (b"ffffeeffbb", 46, &[21, 45, 18, 41, 17, 2, 24, 2]),
++        (b"ffffeeffbb", 47, &[37, 37, 11, 12, 6, 0, 8, 2]),
++        (b"ffffeeffbb", 48, &[11, 41, 40, 43, 5, 43, 41, 1]),
++        (b"ffffeeffbb", 49, &[18, 45, 7, 13, 20, 21, 30, 1]),
++        (b"ffffeeffbb", 50, &[45, 21, 5, 34, 21, 18, 20, 1]),
++        (b"ffffeeffbb", 51, &[17, 6, 26, 22, 38, 24, 11, 1]),
++        (b"ffffeeffbb", 52, &[39, 33, 38, 30, 46, 31, 3, 1]),
++        (b"ffffeeffbb", 53, &[31, 7, 44, 23, 9, 32, 49]),
++        (b"ffffeeffbb", 54, &[17, 35, 8, 37, 31, 18, 44]),
++        (b"ffffeeffbb", 55, &[10, 52, 9, 48, 36, 39, 39]),
++        (b"ffffeeffbb", 56, &[11, 50, 51, 22, 25, 36, 35]),
++        (b"ffffeeffbb", 57, &[14, 55, 12, 43, 20, 3, 32]),
++        (b"ffffeeffbb", 58, &[35, 18, 45, 56, 9, 51, 28]),
++        (b"ffffeeffbb", 59, &[51, 28, 20, 26, 55, 3, 26]),
++        (b"ffffeeffbb", 60, &[35, 6, 27, 46, 58, 33, 23]),
++        (b"ffffeeffbb", 61, &[58, 7, 6, 54, 49, 20, 21]),
++        (b"ffffeeffbb", 62, &[53, 59, 3, 14, 10, 22, 19]),
++        (b"ffffeeffbb", 63, &[53, 50, 23, 4, 56, 36, 17]),
++        (b"ffffeeffbb", 64, &[59, 62, 47, 59, 63, 63, 15]),
++        (b"ffffeeffbb", 65, &[0, 53, 39, 4, 40, 37, 14]),
++        (b"ffffeeffbb", 66, &[65, 59, 39, 1, 64, 19, 13]),
++        (b"ffffeeffbb", 67, &[35, 14, 19, 16, 25, 10, 12]),
++        (b"ffffeeffbb", 68, &[51, 38, 63, 50, 15, 8, 11]),
++        (b"ffffeeffbb", 69, &[44, 45, 18, 58, 68, 12, 10]),
++        (b"ffffeeffbb", 70, &[25, 51, 0, 60, 13, 24, 9]),
++        (b"ffffeeffbb", 71, &[54, 30, 9, 65, 28, 41, 8]),
++        (b"ffffeeffbb", 72, &[35, 35, 55, 54, 17, 64, 7]),
++        (b"ffffeeffbb", 73, &[34, 4, 48, 40, 27, 19, 7]),
++        (b"ffffeeffbb", 74, &[53, 47, 4, 56, 36, 51, 6]),
++        (b"ffffeeffbb", 75, &[20, 56, 10, 72, 24, 13, 6]),
++        (b"ffffeeffbb", 76, &[71, 31, 52, 60, 48, 53, 5]),
++        (b"ffffeeffbb", 77, &[32, 73, 14, 63, 15, 21, 5]),
++        (b"ffffeeffbb", 78, &[65, 13, 17, 32, 64, 68, 4]),
++        (b"ffffeeffbb", 79, &[37, 56, 2, 56, 25, 41, 4]),
++        (b"ffffeeffbb", 80, &[75, 59, 37, 41, 43, 15, 4]),
++        (b"ffffeeffbb", 81, &[44, 68, 0, 21, 27, 72, 3]),
++        (b"ffffeeffbb", 82, &[77, 35, 2, 74, 46, 50, 3]),
++        (b"ffffeeffbb", 83, &[52, 51, 19, 76, 10, 30, 3]),
++        (b"ffffeeffbb", 84, &[11, 80, 19, 19, 76, 10, 3]),
++        (b"ffffeeffbb", 85, &[0, 82, 20, 14, 68, 77, 2]),
++        (b"ffffeeffbb", 86, &[3, 12, 78, 37, 62, 61, 2]),
++        (b"ffffeeffbb", 87, &[35, 12, 20, 8, 52, 46, 2]),
++        (b"ffffeeffbb", 88, &[43, 6, 54, 42, 30, 32, 2]),
++        (b"ffffeeffbb", 89, &[49, 52, 85, 21, 80, 18, 2]),
++        (b"ffffeeffbb", 90, &[35, 64, 78, 24, 18, 6, 2]),
++        (b"ffffeeffbb", 91, &[39, 17, 83, 63, 17, 85, 1]),
++        (b"ffffeeffbb", 92, &[67, 22, 85, 79, 75, 74, 1]),
++        (b"ffffeeffbb", 93, &[53, 60, 39, 29, 4, 65, 1]),
++        (b"ffffeeffbb", 94, &[37, 89, 2, 72, 76, 55, 1]),
++        (b"ffffeeffbb", 95, &[90, 74, 89, 9, 9, 47, 1]),
++        (b"ffffeeffbb", 96, &[59, 20, 46, 35, 81, 38, 1]),
++        (b"ffffeeffbb", 97, &[94, 87, 60, 71, 3, 31, 1]),
++        (b"ffffeeffbb", 98, &[67, 22, 63, 50, 62, 23, 1]),
++        (b"ffffeeffbb", 99, &[98, 6, 69, 12, 61, 16, 1]),
++        (b"ffffeeffbb", 100, &[95, 35, 51, 10, 95, 9, 1]),
++        (b"ffffeeffbb", 101, &[87, 27, 7, 8, 62, 3, 1]),
++        (b"ffffeeffbb", 102, &[17, 3, 32, 79, 59, 99]),
++        (b"ffffeeffbb", 103, &[30, 22, 90, 0, 87, 94]),
++        (b"ffffeeffbb", 104, &[91, 68, 87, 68, 38, 90]),
++        (b"ffffeeffbb", 105, &[95, 80, 54, 73, 15, 86]),
++        (b"ffffeeffbb", 106, &[31, 30, 24, 16, 17, 82]),
++        (b"ffffeeffbb", 107, &[51, 50, 10, 12, 42, 78]),
++        (b"ffffeeffbb", 108, &[71, 71, 96, 78, 89, 74]),
++        (b"ffffeeffbb", 109, &[33, 18, 93, 22, 50, 71]),
++        (b"ffffeeffbb", 110, &[65, 53, 57, 88, 29, 68]),
++        (b"ffffeeffbb", 111, &[53, 93, 67, 90, 27, 65]),
++        (b"ffffeeffbb", 112, &[11, 109, 96, 65, 43, 62]),
++        (b"ffffeeffbb", 113, &[27, 23, 106, 56, 76, 59]),
++        (b"ffffeeffbb", 114, &[71, 84, 31, 112, 11, 57]),
++        (b"ffffeeffbb", 115, &[90, 22, 1, 56, 76, 54]),
++        (b"ffffeeffbb", 116, &[35, 38, 98, 57, 40, 52]),
++        (b"ffffeeffbb", 117, &[26, 113, 115, 62, 17, 50]),
++        (b"ffffeeffbb", 118, &[51, 14, 5, 18, 7, 48]),
++        (b"ffffeeffbb", 119, &[102, 31, 110, 108, 8, 46]),
++        (b"ffffeeffbb", 120, &[35, 93, 96, 50, 22, 44]),
++        (b"ffffeeffbb", 121, &[87, 61, 2, 36, 47, 42]),
++        (b"ffffeeffbb", 122, &[119, 64, 1, 22, 83, 40]),
++        (b"ffffeeffbb", 123, &[77, 119, 32, 90, 6, 39]),
++        (b"ffffeeffbb", 124, &[115, 122, 31, 79, 62, 37]),
++        (b"ffffeeffbb", 125, &[95, 108, 47, 74, 3, 36]),
++        (b"ffffeeffbb", 126, &[53, 25, 116, 39, 78, 34]),
++        (b"ffffeeffbb", 127, &[22, 23, 125, 67, 35, 33]),
++        (b"ffffeeffbb", 128, &[59, 127, 59, 127, 127, 31]),
++        (b"ffffeeffbb", 129, &[89, 36, 1, 59, 100, 30]),
++        (b"ffffeeffbb", 130, &[65, 91, 123, 89, 79, 29]),
++        (b"ffffeeffbb", 131, &[58, 72, 39, 63, 65, 28]),
++        (b"ffffeeffbb", 132, &[131, 62, 92, 82, 57, 27]),
++        (b"ffffeeffbb", 133, &[109, 31, 51, 123, 55, 26]),
++        (b"ffffeeffbb", 134, &[35, 74, 21, 27, 60, 25]),
++        (b"ffffeeffbb", 135, &[125, 132, 49, 37, 70, 24]),
++        (b"ffffeeffbb", 136, &[51, 121, 117, 133, 85, 23]),
++        (b"ffffeeffbb", 137, &[113, 60, 135, 22, 107, 22]),
++        (b"ffffeeffbb", 138, &[113, 91, 73, 93, 133, 21]),
++        (b"ffffeeffbb", 139, &[114, 75, 102, 51, 26, 21]),
++        (b"ffffeeffbb", 140, &[95, 25, 35, 16, 62, 20]),
++        (b"ffffeeffbb", 141, &[131, 137, 16, 110, 102, 19]),
++        (b"ffffeeffbb", 142, &[125, 121, 108, 34, 6, 19]),
++        (b"ffffeeffbb", 143, &[65, 78, 138, 55, 55, 18]),
++        (b"ffffeeffbb", 144, &[107, 125, 121, 15, 109, 17]),
++        (b"ffffeeffbb", 145, &[35, 13, 122, 42, 22, 17]),
++        (b"ffffeeffbb", 146, &[107, 38, 103, 123, 83, 16]),
++        (b"ffffeeffbb", 147, &[116, 96, 71, 98, 2, 16]),
++        (b"ffffeeffbb", 148, &[127, 23, 75, 99, 71, 15]),
++        (b"ffffeeffbb", 149, &[136, 110, 53, 114, 144, 14]),
++        (b"ffffeeffbb", 150, &[95, 140, 133, 130, 71, 14]),
++        (b"ffffeeffbb", 151, &[15, 50, 29, 137, 0, 14]),
++        (b"ffffeeffbb", 152, &[147, 15, 89, 121, 83, 13]),
++        (b"ffffeeffbb", 153, &[17, 87, 93, 72, 17, 13]),
++        (b"ffffeeffbb", 154, &[109, 113, 3, 133, 106, 12]),
++        (b"ffffeeffbb", 155, &[115, 141, 120, 139, 44, 12]),
++        (b"ffffeeffbb", 156, &[143, 45, 4, 82, 140, 11]),
++        (b"ffffeeffbb", 157, &[149, 92, 15, 106, 82, 11]),
++        (b"ffffeeffbb", 158, &[37, 107, 79, 46, 26, 11]),
++        (b"ffffeeffbb", 159, &[137, 37, 146, 51, 130, 10]),
++        (b"ffffeeffbb", 160, &[155, 69, 29, 115, 77, 10]),
++        (b"ffffeeffbb", 161, &[67, 98, 46, 68, 26, 10]),
++        (b"ffffeeffbb", 162, &[125, 155, 60, 63, 138, 9]),
++        (b"ffffeeffbb", 163, &[96, 43, 118, 93, 90, 9]),
++        (b"ffffeeffbb", 164, &[159, 99, 123, 152, 43, 9]),
++        (b"ffffeeffbb", 165, &[65, 17, 1, 69, 163, 8]),
++        (b"ffffeeffbb", 166, &[135, 108, 25, 165, 119, 8]),
++        (b"ffffeeffbb", 167, &[165, 116, 164, 103, 77, 8]),
++        (b"ffffeeffbb", 168, &[11, 166, 67, 44, 36, 8]),
++        (b"ffffeeffbb", 169, &[65, 59, 71, 149, 164, 7]),
++        (b"ffffeeffbb", 170, &[85, 83, 26, 76, 126, 7]),
++        (b"ffffeeffbb", 171, &[71, 132, 140, 157, 88, 7]),
++        (b"ffffeeffbb", 172, &[3, 6, 127, 47, 52, 7]),
++        (b"ffffeeffbb", 173, &[122, 66, 53, 83, 16, 7]),
++        (b"ffffeeffbb", 174, &[35, 6, 5, 88, 155, 6]),
++        (b"ffffeeffbb", 175, &[95, 20, 84, 56, 122, 6]),
++        (b"ffffeeffbb", 176, &[43, 91, 57, 159, 89, 6]),
++        (b"ffffeeffbb", 177, &[110, 127, 54, 40, 58, 6]),
++        (b"ffffeeffbb", 178, &[49, 115, 43, 47, 27, 6]),
++        (b"ffffeeffbb", 179, &[130, 91, 4, 178, 175, 5]),
++        (b"ffffeeffbb", 180, &[35, 122, 109, 70, 147, 5]),
++        (b"ffffeeffbb", 181, &[94, 94, 4, 79, 119, 5]),
++        (b"ffffeeffbb", 182, &[39, 54, 66, 19, 92, 5]),
++        (b"ffffeeffbb", 183, &[119, 2, 143, 69, 65, 5]),
++        (b"ffffeeffbb", 184, &[67, 57, 90, 44, 39, 5]),
++        (b"ffffeeffbb", 185, &[90, 63, 141, 123, 13, 5]),
++        (b"ffffeeffbb", 186, &[53, 123, 172, 119, 174, 4]),
++        (b"ffffeeffbb", 187, &[153, 21, 68, 28, 151, 4]),
++        (b"ffffeeffbb", 188, &[131, 138, 94, 32, 128, 4]),
++        (b"ffffeeffbb", 189, &[179, 121, 156, 130, 105, 4]),
++        (b"ffffeeffbb", 190, &[185, 179, 164, 131, 83, 4]),
++        (b"ffffeeffbb", 191, &[118, 123, 37, 31, 62, 4]),
++        (b"ffffeeffbb", 192, &[59, 106, 83, 16, 41, 4]),
++        (b"ffffeeffbb", 193, &[57, 37, 47, 86, 20, 4]),
++        (b"ffffeeffbb", 194, &[191, 140, 63, 45, 0, 4]),
++        (b"ffffeeffbb", 195, &[65, 169, 83, 84, 175, 3]),
++        (b"ffffeeffbb", 196, &[67, 158, 64, 6, 157, 3]),
++        (b"ffffeeffbb", 197, &[121, 26, 167, 3, 139, 3]),
++        (b"ffffeeffbb", 198, &[197, 151, 165, 75, 121, 3]),
++        (b"ffffeeffbb", 199, &[55, 175, 36, 22, 104, 3]),
++        (b"ffffeeffbb", 200, &[195, 167, 162, 38, 87, 3]),
++        (b"ffffeeffbb", 201, &[35, 27, 136, 124, 70, 3]),
++        (b"ffffeeffbb", 202, &[87, 64, 153, 76, 54, 3]),
++        (b"ffffeeffbb", 203, &[151, 191, 14, 94, 38, 3]),
++        (b"ffffeeffbb", 204, &[119, 103, 135, 175, 22, 3]),
++        (b"ffffeeffbb", 205, &[200, 79, 123, 115, 7, 3]),
++        (b"ffffeeffbb", 206, &[133, 165, 202, 115, 198, 2]),
++        (b"ffffeeffbb", 207, &[44, 153, 193, 175, 184, 2]),
++        (b"ffffeeffbb", 208, &[91, 190, 125, 86, 171, 2]),
++        (b"ffffeeffbb", 209, &[109, 151, 34, 53, 158, 2]),
++        (b"ffffeeffbb", 210, &[95, 40, 171, 74, 145, 2]),
++        (b"ffffeeffbb", 211, &[84, 195, 162, 150, 132, 2]),
++        (b"ffffeeffbb", 212, &[31, 15, 59, 68, 120, 2]),
++        (b"ffffeeffbb", 213, &[125, 57, 127, 36, 108, 2]),
++        (b"ffffeeffbb", 214, &[51, 132, 2, 55, 96, 2]),
++        (b"ffffeeffbb", 215, &[175, 133, 177, 122, 84, 2]),
++        (b"ffffeeffbb", 216, &[179, 35, 78, 23, 73, 2]),
++        (b"ffffeeffbb", 217, &[53, 101, 208, 186, 61, 2]),
++        (b"ffffeeffbb", 218, &[33, 9, 214, 179, 50, 2]),
++        (b"ffffeeffbb", 219, &[107, 147, 175, 217, 39, 2]),
++        (b"ffffeeffbb", 220, &[175, 81, 179, 79, 29, 2]),
++        (b"ffffeeffbb", 221, &[0, 76, 95, 204, 18, 2]),
++        (b"ffffeeffbb", 222, &[53, 213, 16, 150, 8, 2]),
++        (b"ffffeeffbb", 223, &[158, 161, 42, 136, 221, 1]),
++        (b"ffffeeffbb", 224, &[123, 54, 52, 162, 212, 1]),
++        (b"ffffeeffbb", 225, &[170, 43, 151, 2, 204, 1]),
++        (b"ffffeeffbb", 226, &[27, 68, 224, 105, 195, 1]),
++        (b"ffffeeffbb", 227, &[45, 69, 157, 20, 187, 1]),
++        (b"ffffeeffbb", 228, &[71, 213, 64, 199, 178, 1]),
++        (b"ffffeeffbb", 229, &[129, 203, 66, 186, 170, 1]),
++        (b"ffffeeffbb", 230, &[205, 183, 57, 208, 162, 1]),
++        (b"ffffeeffbb", 231, &[32, 50, 164, 33, 155, 1]),
++        (b"ffffeeffbb", 232, &[35, 135, 53, 123, 147, 1]),
++        (b"ffffeeffbb", 233, &[209, 47, 89, 13, 140, 1]),
++        (b"ffffeeffbb", 234, &[143, 56, 175, 168, 132, 1]),
++        (b"ffffeeffbb", 235, &[225, 157, 216, 121, 125, 1]),
++        (b"ffffeeffbb", 236, &[51, 66, 119, 105, 118, 1]),
++        (b"ffffeeffbb", 237, &[116, 150, 26, 119, 111, 1]),
++        (b"ffffeeffbb", 238, &[221, 15, 87, 162, 104, 1]),
++        (b"ffffeeffbb", 239, &[234, 155, 214, 234, 97, 1]),
++        (b"ffffeeffbb", 240, &[155, 46, 84, 96, 91, 1]),
++        (b"ffffeeffbb", 241, &[187, 48, 90, 225, 84, 1]),
++        (b"ffffeeffbb", 242, &[87, 212, 151, 140, 78, 1]),
++        (b"ffffeeffbb", 243, &[206, 22, 189, 81, 72, 1]),
++        (b"ffffeeffbb", 244, &[119, 93, 122, 48, 66, 1]),
++        (b"ffffeeffbb", 245, &[165, 224, 117, 40, 60, 1]),
++        (b"ffffeeffbb", 246, &[77, 121, 100, 57, 54, 1]),
++        (b"ffffeeffbb", 247, &[52, 128, 242, 98, 48, 1]),
++        (b"ffffeeffbb", 248, &[115, 247, 224, 164, 42, 1]),
++        (b"ffffeeffbb", 249, &[218, 127, 223, 5, 37, 1]),
++        (b"ffffeeffbb", 250, &[95, 54, 168, 118, 31, 1]),
++        (b"ffffeeffbb", 251, &[121, 204, 240, 3, 26, 1]),
++        (b"ffffeeffbb", 252, &[179, 138, 123, 162, 20, 1]),
++        (b"ffffeeffbb", 253, &[21, 50, 1, 91, 15, 1]),
++        (b"ffffeeffbb", 254, &[149, 11, 63, 40, 10, 1]),
++        (b"ffffeeffbb", 255, &[170, 225, 247, 9, 5, 1]),
++        (b"ffffeeffbb", 256, &[187, 255, 238, 255, 255]),
++    ];
++
++    for &(bigint, radix, inbaseradix_le) in GROUND_TRUTH.iter() {
++        let bigint = BigUint::parse_bytes(bigint, 16).unwrap();
++        // to_radix_le
++        assert_eq!(bigint.to_radix_le(radix), inbaseradix_le);
++        // to_radix_be
++        let mut inbase_be = bigint.to_radix_be(radix);
++        inbase_be.reverse(); // now le
++        assert_eq!(inbase_be, inbaseradix_le);
++        // from_radix_le
++        assert_eq!(BigUint::from_radix_le(inbaseradix_le, radix).unwrap(), bigint);
++        // from_radix_be
++        let mut inbaseradix_be = Vec::from(inbaseradix_le);
++        inbaseradix_be.reverse();
++        assert_eq!(BigUint::from_radix_be(&inbaseradix_be, radix).unwrap(), bigint);
++    }
++
++    assert!(BigUint::from_radix_le(&[10,100,10], 50).is_none());
++}
++
++#[test]
++fn test_from_str_radix() {
++    let r = to_str_pairs();
++    for num_pair in r.iter() {
++        let &(ref n, ref rs) = num_pair;
++        for str_pair in rs.iter() {
++            let &(ref radix, ref str) = str_pair;
++            assert_eq!(n, &BigUint::from_str_radix(str, *radix).unwrap());
++        }
++    }
++
++    let zed = BigUint::from_str_radix("Z", 10).ok();
++    assert_eq!(zed, None);
++    let blank = BigUint::from_str_radix("_", 2).ok();
++    assert_eq!(blank, None);
++    let plus_one = BigUint::from_str_radix("+1", 10).ok();
++    assert_eq!(plus_one, Some(BigUint::from_slice(&[1])));
++    let plus_plus_one = BigUint::from_str_radix("++1", 10).ok();
++    assert_eq!(plus_plus_one, None);
++    let minus_one = BigUint::from_str_radix("-1", 10).ok();
++    assert_eq!(minus_one, None);
++    let zero_plus_two = BigUint::from_str_radix("0+2", 10).ok();
++    assert_eq!(zero_plus_two, None);
++}
++
++#[test]
++fn test_all_str_radix() {
++    use std::ascii::AsciiExt;
++
++    let n = BigUint::new((0..10).collect());
++    for radix in 2..37 {
++        let s = n.to_str_radix(radix);
++        let x = BigUint::from_str_radix(&s, radix);
++        assert_eq!(x.unwrap(), n);
++
++        let s = s.to_ascii_uppercase();
++        let x = BigUint::from_str_radix(&s, radix);
++        assert_eq!(x.unwrap(), n);
++    }
++}
++
++#[test]
++fn test_lower_hex() {
++    let a = BigUint::parse_bytes(b"A", 16).unwrap();
++    let hello = BigUint::parse_bytes("22405534230753963835153736737".as_bytes(), 10).unwrap();
++
++    assert_eq!(format!("{:x}", a), "a");
++    assert_eq!(format!("{:x}", hello), "48656c6c6f20776f726c6421");
++    assert_eq!(format!("{:♥>+#8x}", a), "♥♥♥♥+0xa");
++}
++
++#[test]
++fn test_upper_hex() {
++    let a = BigUint::parse_bytes(b"A", 16).unwrap();
++    let hello = BigUint::parse_bytes("22405534230753963835153736737".as_bytes(), 10).unwrap();
++
++    assert_eq!(format!("{:X}", a), "A");
++    assert_eq!(format!("{:X}", hello), "48656C6C6F20776F726C6421");
++    assert_eq!(format!("{:♥>+#8X}", a), "♥♥♥♥+0xA");
++}
++
++#[test]
++fn test_binary() {
++    let a = BigUint::parse_bytes(b"A", 16).unwrap();
++    let hello = BigUint::parse_bytes("224055342307539".as_bytes(), 10).unwrap();
++
++    assert_eq!(format!("{:b}", a), "1010");
++    assert_eq!(format!("{:b}", hello),
++               "110010111100011011110011000101101001100011010011");
++    assert_eq!(format!("{:♥>+#8b}", a), "♥+0b1010");
++}
++
++#[test]
++fn test_octal() {
++    let a = BigUint::parse_bytes(b"A", 16).unwrap();
++    let hello = BigUint::parse_bytes("22405534230753963835153736737".as_bytes(), 10).unwrap();
++
++    assert_eq!(format!("{:o}", a), "12");
++    assert_eq!(format!("{:o}", hello), "22062554330674403566756233062041");
++    assert_eq!(format!("{:♥>+#8o}", a), "♥♥♥+0o12");
++}
++
++#[test]
++fn test_display() {
++    let a = BigUint::parse_bytes(b"A", 16).unwrap();
++    let hello = BigUint::parse_bytes("22405534230753963835153736737".as_bytes(), 10).unwrap();
++
++    assert_eq!(format!("{}", a), "10");
++    assert_eq!(format!("{}", hello), "22405534230753963835153736737");
++    assert_eq!(format!("{:♥>+#8}", a), "♥♥♥♥♥+10");
++}
++
++#[test]
++fn test_factor() {
++    fn factor(n: usize) -> BigUint {
++        let mut f: BigUint = One::one();
++        for i in 2..n + 1 {
++            // FIXME(#5992): assignment operator overloads
++            // f *= FromPrimitive::from_usize(i);
++            let bu: BigUint = FromPrimitive::from_usize(i).unwrap();
++            f = f * bu;
++        }
++        return f;
++    }
++
++    fn check(n: usize, s: &str) {
++        let n = factor(n);
++        let ans = match BigUint::from_str_radix(s, 10) {
++            Ok(x) => x,
++            Err(_) => panic!(),
++        };
++        assert_eq!(n, ans);
++    }
++
++    check(3, "6");
++    check(10, "3628800");
++    check(20, "2432902008176640000");
++    check(30, "265252859812191058636308480000000");
++}
++
++#[test]
++fn test_bits() {
++    assert_eq!(BigUint::new(vec![0, 0, 0, 0]).bits(), 0);
++    let n: BigUint = FromPrimitive::from_usize(0).unwrap();
++    assert_eq!(n.bits(), 0);
++    let n: BigUint = FromPrimitive::from_usize(1).unwrap();
++    assert_eq!(n.bits(), 1);
++    let n: BigUint = FromPrimitive::from_usize(3).unwrap();
++    assert_eq!(n.bits(), 2);
++    let n: BigUint = BigUint::from_str_radix("4000000000", 16).unwrap();
++    assert_eq!(n.bits(), 39);
++    let one: BigUint = One::one();
++    assert_eq!((one << 426).bits(), 427);
++}
++
++#[test]
++fn test_rand() {
++    let mut rng = thread_rng();
++    let _n: BigUint = rng.gen_biguint(137);
++    assert!(rng.gen_biguint(0).is_zero());
++}
++
++#[test]
++fn test_rand_range() {
++    let mut rng = thread_rng();
++
++    for _ in 0..10 {
++        assert_eq!(rng.gen_bigint_range(&FromPrimitive::from_usize(236).unwrap(),
++                                        &FromPrimitive::from_usize(237).unwrap()),
++                   FromPrimitive::from_usize(236).unwrap());
++    }
++
++    let l = FromPrimitive::from_usize(403469000 + 2352).unwrap();
++    let u = FromPrimitive::from_usize(403469000 + 3513).unwrap();
++    for _ in 0..1000 {
++        let n: BigUint = rng.gen_biguint_below(&u);
++        assert!(n < u);
++
++        let n: BigUint = rng.gen_biguint_range(&l, &u);
++        assert!(n >= l);
++        assert!(n < u);
++    }
++}
++
++#[test]
++#[should_panic]
++fn test_zero_rand_range() {
++    thread_rng().gen_biguint_range(&FromPrimitive::from_usize(54).unwrap(),
++                                   &FromPrimitive::from_usize(54).unwrap());
++}
++
++#[test]
++#[should_panic]
++fn test_negative_rand_range() {
++    let mut rng = thread_rng();
++    let l = FromPrimitive::from_usize(2352).unwrap();
++    let u = FromPrimitive::from_usize(3513).unwrap();
++    // Switching u and l should fail:
++    let _n: BigUint = rng.gen_biguint_range(&u, &l);
++}
++
++fn test_mul_divide_torture_count(count: usize) {
++    use rand::{SeedableRng, StdRng, Rng};
++
++    let bits_max = 1 << 12;
++    let seed: &[_] = &[1, 2, 3, 4];
++    let mut rng: StdRng = SeedableRng::from_seed(seed);
++
++    for _ in 0..count {
++        // Test with numbers of random sizes:
++        let xbits = rng.gen_range(0, bits_max);
++        let ybits = rng.gen_range(0, bits_max);
++
++        let x = rng.gen_biguint(xbits);
++        let y = rng.gen_biguint(ybits);
++
++        if x.is_zero() || y.is_zero() {
++            continue;
++        }
++
++        let prod = &x * &y;
++        assert_eq!(&prod / &x, y);
++        assert_eq!(&prod / &y, x);
++    }
++}
++
++#[test]
++fn test_mul_divide_torture() {
++    test_mul_divide_torture_count(1000);
++}
++
++#[test]
++#[ignore]
++fn test_mul_divide_torture_long() {
++    test_mul_divide_torture_count(1000000);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..21a68ab3b263c714bb39024eca9efc8114a3f71a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"503e668405c5492d67cf662a81e05be40efe2e6bcf10f7794a07bd9865e704e6"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..794910d476d840b1564ae19ea566df24937035e0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,38 @@@
++# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
++#
++# When uploading crates to the registry Cargo will automatically
++# "normalize" Cargo.toml files for maximal compatibility
++# with all versions of Cargo and also rewrite `path` dependencies
++# to registry (e.g. crates.io) dependencies
++#
++# If you believe there's an error in this file please file an
++# issue against the rust-lang/cargo repository. If you're
++# editing this file be aware that the upstream Cargo.toml
++# will likely look very different (and much more reasonable)
++
++[package]
++name = "num-complex"
++version = "0.1.40"
++authors = ["The Rust Project Developers"]
++description = "Complex numbers implementation for Rust"
++homepage = "https://github.com/rust-num/num"
++documentation = "http://rust-num.github.io/num"
++keywords = ["mathematics", "numerics"]
++categories = ["algorithms", "data-structures", "science"]
++license = "MIT/Apache-2.0"
++repository = "https://github.com/rust-num/num"
++[dependencies.rustc-serialize]
++version = "0.3.19"
++optional = true
++
++[dependencies.serde]
++version = ">= 0.7.0, < 0.9.0"
++optional = true
++
++[dependencies.num-traits]
++version = "0.1.39"
++optional = false
++
++[features]
++default = ["rustc-serialize"]
++unstable = []
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16fe87b06e802f094b3fbb0894b137bca2b16ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++                              Apache License
++                        Version 2.0, January 2004
++                     http://www.apache.org/licenses/
++
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++1. Definitions.
++
++   "License" shall mean the terms and conditions for use, reproduction,
++   and distribution as defined by Sections 1 through 9 of this document.
++
++   "Licensor" shall mean the copyright owner or entity authorized by
++   the copyright owner that is granting the License.
++
++   "Legal Entity" shall mean the union of the acting entity and all
++   other entities that control, are controlled by, or are under common
++   control with that entity. For the purposes of this definition,
++   "control" means (i) the power, direct or indirect, to cause the
++   direction or management of such entity, whether by contract or
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the
++   outstanding shares, or (iii) beneficial ownership of such entity.
++
++   "You" (or "Your") shall mean an individual or Legal Entity
++   exercising permissions granted by this License.
++
++   "Source" form shall mean the preferred form for making modifications,
++   including but not limited to software source code, documentation
++   source, and configuration files.
++
++   "Object" form shall mean any form resulting from mechanical
++   transformation or translation of a Source form, including but
++   not limited to compiled object code, generated documentation,
++   and conversions to other media types.
++
++   "Work" shall mean the work of authorship, whether in Source or
++   Object form, made available under the License, as indicated by a
++   copyright notice that is included in or attached to the work
++   (an example is provided in the Appendix below).
++
++   "Derivative Works" shall mean any work, whether in Source or Object
++   form, that is based on (or derived from) the Work and for which the
++   editorial revisions, annotations, elaborations, or other modifications
++   represent, as a whole, an original work of authorship. For the purposes
++   of this License, Derivative Works shall not include works that remain
++   separable from, or merely link (or bind by name) to the interfaces of,
++   the Work and Derivative Works thereof.
++
++   "Contribution" shall mean any work of authorship, including
++   the original version of the Work and any modifications or additions
++   to that Work or Derivative Works thereof, that is intentionally
++   submitted to Licensor for inclusion in the Work by the copyright owner
++   or by an individual or Legal Entity authorized to submit on behalf of
++   the copyright owner. For the purposes of this definition, "submitted"
++   means any form of electronic, verbal, or written communication sent
++   to the Licensor or its representatives, including but not limited to
++   communication on electronic mailing lists, source code control systems,
++   and issue tracking systems that are managed by, or on behalf of, the
++   Licensor for the purpose of discussing and improving the Work, but
++   excluding communication that is conspicuously marked or otherwise
++   designated in writing by the copyright owner as "Not a Contribution."
++
++   "Contributor" shall mean Licensor and any individual or Legal Entity
++   on behalf of whom a Contribution has been received by Licensor and
++   subsequently incorporated within the Work.
++
++2. Grant of Copyright License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   copyright license to reproduce, prepare Derivative Works of,
++   publicly display, publicly perform, sublicense, and distribute the
++   Work and such Derivative Works in Source or Object form.
++
++3. Grant of Patent License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   (except as stated in this section) patent license to make, have made,
++   use, offer to sell, sell, import, and otherwise transfer the Work,
++   where such license applies only to those patent claims licensable
++   by such Contributor that are necessarily infringed by their
++   Contribution(s) alone or by combination of their Contribution(s)
++   with the Work to which such Contribution(s) was submitted. If You
++   institute patent litigation against any entity (including a
++   cross-claim or counterclaim in a lawsuit) alleging that the Work
++   or a Contribution incorporated within the Work constitutes direct
++   or contributory patent infringement, then any patent licenses
++   granted to You under this License for that Work shall terminate
++   as of the date such litigation is filed.
++
++4. Redistribution. You may reproduce and distribute copies of the
++   Work or Derivative Works thereof in any medium, with or without
++   modifications, and in Source or Object form, provided that You
++   meet the following conditions:
++
++   (a) You must give any other recipients of the Work or
++       Derivative Works a copy of this License; and
++
++   (b) You must cause any modified files to carry prominent notices
++       stating that You changed the files; and
++
++   (c) You must retain, in the Source form of any Derivative Works
++       that You distribute, all copyright, patent, trademark, and
++       attribution notices from the Source form of the Work,
++       excluding those notices that do not pertain to any part of
++       the Derivative Works; and
++
++   (d) If the Work includes a "NOTICE" text file as part of its
++       distribution, then any Derivative Works that You distribute must
++       include a readable copy of the attribution notices contained
++       within such NOTICE file, excluding those notices that do not
++       pertain to any part of the Derivative Works, in at least one
++       of the following places: within a NOTICE text file distributed
++       as part of the Derivative Works; within the Source form or
++       documentation, if provided along with the Derivative Works; or,
++       within a display generated by the Derivative Works, if and
++       wherever such third-party notices normally appear. The contents
++       of the NOTICE file are for informational purposes only and
++       do not modify the License. You may add Your own attribution
++       notices within Derivative Works that You distribute, alongside
++       or as an addendum to the NOTICE text from the Work, provided
++       that such additional attribution notices cannot be construed
++       as modifying the License.
++
++   You may add Your own copyright statement to Your modifications and
++   may provide additional or different license terms and conditions
++   for use, reproduction, or distribution of Your modifications, or
++   for any such Derivative Works as a whole, provided Your use,
++   reproduction, and distribution of the Work otherwise complies with
++   the conditions stated in this License.
++
++5. Submission of Contributions. Unless You explicitly state otherwise,
++   any Contribution intentionally submitted for inclusion in the Work
++   by You to the Licensor shall be under the terms and conditions of
++   this License, without any additional terms or conditions.
++   Notwithstanding the above, nothing herein shall supersede or modify
++   the terms of any separate license agreement you may have executed
++   with Licensor regarding such Contributions.
++
++6. Trademarks. This License does not grant permission to use the trade
++   names, trademarks, service marks, or product names of the Licensor,
++   except as required for reasonable and customary use in describing the
++   origin of the Work and reproducing the content of the NOTICE file.
++
++7. Disclaimer of Warranty. Unless required by applicable law or
++   agreed to in writing, Licensor provides the Work (and each
++   Contributor provides its Contributions) on an "AS IS" BASIS,
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++   implied, including, without limitation, any warranties or conditions
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++   PARTICULAR PURPOSE. You are solely responsible for determining the
++   appropriateness of using or redistributing the Work and assume any
++   risks associated with Your exercise of permissions under this License.
++
++8. Limitation of Liability. In no event and under no legal theory,
++   whether in tort (including negligence), contract, or otherwise,
++   unless required by applicable law (such as deliberate and grossly
++   negligent acts) or agreed to in writing, shall any Contributor be
++   liable to You for damages, including any direct, indirect, special,
++   incidental, or consequential damages of any character arising as a
++   result of this License or out of the use or inability to use the
++   Work (including but not limited to damages for loss of goodwill,
++   work stoppage, computer failure or malfunction, or any and all
++   other commercial damages or losses), even if such Contributor
++   has been advised of the possibility of such damages.
++
++9. Accepting Warranty or Additional Liability. While redistributing
++   the Work or Derivative Works thereof, You may choose to offer,
++   and charge a fee for, acceptance of support, warranty, indemnity,
++   or other liability obligations and/or rights consistent with this
++   License. However, in accepting such obligations, You may act only
++   on Your own behalf and on Your sole responsibility, not on behalf
++   of any other Contributor, and only if You agree to indemnify,
++   defend, and hold each Contributor harmless for any liability
++   incurred by, or claims asserted against, such Contributor by reason
++   of your accepting any such warranty or additional liability.
++
++END OF TERMS AND CONDITIONS
++
++APPENDIX: How to apply the Apache License to your work.
++
++   To apply the Apache License to your work, attach the following
++   boilerplate notice, with the fields enclosed by brackets "[]"
++   replaced with your own identifying information. (Don't include
++   the brackets!)  The text should be enclosed in the appropriate
++   comment syntax for the file format. We also recommend that a
++   file or class name and description of purpose be included on the
++   same "printed page" as the copyright notice for easier
++   identification within third-party archives.
++
++Copyright [yyyy] [name of copyright owner]
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++      http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39d4bdb5acd313c1a92dbeaa1c379aaf0596a315
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2014 The Rust Project Developers
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..334f8e01550c0b62286dd02d7ca879ec90ad038f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1784 @@@
++// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Complex numbers.
++#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png",
++       html_favicon_url = "https://rust-num.github.io/num/favicon.ico",
++       html_root_url = "https://rust-num.github.io/num/",
++       html_playground_url = "http://play.integer32.com/")]
++
++extern crate num_traits as traits;
++
++#[cfg(feature = "rustc-serialize")]
++extern crate rustc_serialize;
++
++#[cfg(feature = "serde")]
++extern crate serde;
++
++use std::error::Error;
++use std::fmt;
++#[cfg(test)]
++use std::hash;
++use std::ops::{Add, Div, Mul, Neg, Sub};
++use std::str::FromStr;
++
++use traits::{Zero, One, Num, Float};
++
++// FIXME #1284: handle complex NaN & infinity etc. This
++// probably doesn't map to C's _Complex correctly.
++
++/// A complex number in Cartesian form.
++///
++/// ## Representation and Foreign Function Interface Compatibility
++///
++/// `Complex<T>` is memory layout compatible with an array `[T; 2]`.
++///
++/// Note that `Complex<F>` where F is a floating point type is **only** memory
++/// layout compatible with C's complex types, **not** necessarily calling
++/// convention compatible.  This means that for FFI you can only pass
++/// `Complex<F>` behind a pointer, not as a value.
++///
++/// ## Examples
++///
++/// Example of extern function declaration.
++///
++/// ```
++/// use num_complex::Complex;
++/// use std::os::raw::c_int;
++///
++/// extern "C" {
++///     fn zaxpy_(n: *const c_int, alpha: *const Complex<f64>,
++///               x: *const Complex<f64>, incx: *const c_int,
++///               y: *mut Complex<f64>, incy: *const c_int);
++/// }
++/// ```
++#[derive(PartialEq, Eq, Copy, Clone, Hash, Debug, Default)]
++#[cfg_attr(feature = "rustc-serialize", derive(RustcEncodable, RustcDecodable))]
++#[repr(C)]
++pub struct Complex<T> {
++    /// Real portion of the complex number
++    pub re: T,
++    /// Imaginary portion of the complex number
++    pub im: T
++}
++
++pub type Complex32 = Complex<f32>;
++pub type Complex64 = Complex<f64>;
++
++impl<T: Clone + Num> Complex<T> {
++    /// Create a new Complex
++    #[inline]
++    pub fn new(re: T, im: T) -> Complex<T> {
++        Complex { re: re, im: im }
++    }
++
++    /// Returns imaginary unit
++    #[inline]
++    pub fn i() -> Complex<T> {
++        Self::new(T::zero(), T::one())
++    }
++
++    /// Returns the square of the norm (since `T` doesn't necessarily
++    /// have a sqrt function), i.e. `re^2 + im^2`.
++    #[inline]
++    pub fn norm_sqr(&self) -> T {
++        self.re.clone() * self.re.clone() + self.im.clone() * self.im.clone()
++    }
++
++    /// Multiplies `self` by the scalar `t`.
++    #[inline]
++    pub fn scale(&self, t: T) -> Complex<T> {
++        Complex::new(self.re.clone() * t.clone(), self.im.clone() * t)
++    }
++
++    /// Divides `self` by the scalar `t`.
++    #[inline]
++    pub fn unscale(&self, t: T) -> Complex<T> {
++        Complex::new(self.re.clone() / t.clone(), self.im.clone() / t)
++    }
++}
++
++impl<T: Clone + Num + Neg<Output = T>> Complex<T> {
++    /// Returns the complex conjugate. i.e. `re - i im`
++    #[inline]
++    pub fn conj(&self) -> Complex<T> {
++        Complex::new(self.re.clone(), -self.im.clone())
++    }
++
++    /// Returns `1/self`
++    #[inline]
++    pub fn inv(&self) -> Complex<T> {
++        let norm_sqr = self.norm_sqr();
++        Complex::new(self.re.clone() / norm_sqr.clone(),
++                     -self.im.clone() / norm_sqr)
++    }
++}
++
++impl<T: Clone + Float> Complex<T> {
++    /// Calculate |self|
++    #[inline]
++    pub fn norm(&self) -> T {
++        self.re.hypot(self.im)
++    }
++    /// Calculate the principal Arg of self.
++    #[inline]
++    pub fn arg(&self) -> T {
++        self.im.atan2(self.re)
++    }
++    /// Convert to polar form (r, theta), such that `self = r * exp(i
++    /// * theta)`
++    #[inline]
++    pub fn to_polar(&self) -> (T, T) {
++        (self.norm(), self.arg())
++    }
++    /// Convert a polar representation into a complex number.
++    #[inline]
++    pub fn from_polar(r: &T, theta: &T) -> Complex<T> {
++        Complex::new(*r * theta.cos(), *r * theta.sin())
++    }
++
++    /// Computes `e^(self)`, where `e` is the base of the natural logarithm.
++    #[inline]
++    pub fn exp(&self) -> Complex<T> {
++        // formula: e^(a + bi) = e^a (cos(b) + i*sin(b))
++        // = from_polar(e^a, b)
++        Complex::from_polar(&self.re.exp(), &self.im)
++    }
++
++    /// Computes the principal value of natural logarithm of `self`.
++    ///
++    /// This function has one branch cut:
++    ///
++    /// * `(-∞, 0]`, continuous from above.
++    ///
++    /// The branch satisfies `-π ≤ arg(ln(z)) ≤ π`.
++    #[inline]
++    pub fn ln(&self) -> Complex<T> {
++        // formula: ln(z) = ln|z| + i*arg(z)
++        let (r, theta) = self.to_polar();
++        Complex::new(r.ln(), theta)
++    }
++
++    /// Computes the principal value of the square root of `self`.
++    ///
++    /// This function has one branch cut:
++    ///
++    /// * `(-∞, 0)`, continuous from above.
++    ///
++    /// The branch satisfies `-π/2 ≤ arg(sqrt(z)) ≤ π/2`.
++    #[inline]
++    pub fn sqrt(&self) -> Complex<T> {
++        // formula: sqrt(r e^(it)) = sqrt(r) e^(it/2)
++        let two = T::one() + T::one();
++        let (r, theta) = self.to_polar();
++        Complex::from_polar(&(r.sqrt()), &(theta/two))
++    }
++
++    /// Raises `self` to a floating point power.
++    #[inline]
++    pub fn powf(&self, exp: T) -> Complex<T> {
++        // formula: x^y = (ρ e^(i θ))^y = ρ^y e^(i θ y)
++        // = from_polar(ρ^y, θ y)
++        let (r, theta) = self.to_polar();
++        Complex::from_polar(&r.powf(exp), &(theta*exp))
++    }
++
++    /// Returns the logarithm of `self` with respect to an arbitrary base.
++    #[inline]
++    pub fn log(&self, base: T) -> Complex<T> {
++        // formula: log_y(x) = log_y(ρ e^(i θ))
++        // = log_y(ρ) + log_y(e^(i θ)) = log_y(ρ) + ln(e^(i θ)) / ln(y)
++        // = log_y(ρ) + i θ / ln(y)
++        let (r, theta) = self.to_polar();
++        Complex::new(r.log(base), theta / base.ln())
++    }
++
++    /// Raises `self` to a complex power.
++    #[inline]
++    pub fn powc(&self, exp: Complex<T>) -> Complex<T> {
++        // formula: x^y = (a + i b)^(c + i d)
++        // = (ρ e^(i θ))^c (ρ e^(i θ))^(i d)
++        //    where ρ=|x| and θ=arg(x)
++        // = ρ^c e^(−d θ) e^(i c θ) ρ^(i d)
++        // = p^c e^(−d θ) (cos(c θ)
++        //   + i sin(c θ)) (cos(d ln(ρ)) + i sin(d ln(ρ)))
++        // = p^c e^(−d θ) (
++        //   cos(c θ) cos(d ln(ρ)) − sin(c θ) sin(d ln(ρ))
++        //   + i(cos(c θ) sin(d ln(ρ)) + sin(c θ) cos(d ln(ρ))))
++        // = p^c e^(−d θ) (cos(c θ + d ln(ρ)) + i sin(c θ + d ln(ρ)))
++        // = from_polar(p^c e^(−d θ), c θ + d ln(ρ))
++        let (r, theta) = self.to_polar();
++        Complex::from_polar(
++            &(r.powf(exp.re) * (-exp.im * theta).exp()),
++            &(exp.re * theta + exp.im * r.ln()))
++    }
++
++    /// Raises a floating point number to the complex power `self`.
++    #[inline]
++    pub fn expf(&self, base: T) -> Complex<T> {
++        // formula: x^(a+bi) = x^a x^bi = x^a e^(b ln(x) i)
++        // = from_polar(x^a, b ln(x))
++        Complex::from_polar(&base.powf(self.re), &(self.im * base.ln()))
++    }
++
++    /// Computes the sine of `self`.
++    #[inline]
++    pub fn sin(&self) -> Complex<T> {
++        // formula: sin(a + bi) = sin(a)cosh(b) + i*cos(a)sinh(b)
++        Complex::new(self.re.sin() * self.im.cosh(), self.re.cos() * self.im.sinh())
++    }
++
++    /// Computes the cosine of `self`.
++    #[inline]
++    pub fn cos(&self) -> Complex<T> {
++        // formula: cos(a + bi) = cos(a)cosh(b) - i*sin(a)sinh(b)
++        Complex::new(self.re.cos() * self.im.cosh(), -self.re.sin() * self.im.sinh())
++    }
++
++    /// Computes the tangent of `self`.
++    #[inline]
++    pub fn tan(&self) -> Complex<T> {
++        // formula: tan(a + bi) = (sin(2a) + i*sinh(2b))/(cos(2a) + cosh(2b))
++        let (two_re, two_im) = (self.re + self.re, self.im + self.im);
++        Complex::new(two_re.sin(), two_im.sinh()).unscale(two_re.cos() + two_im.cosh())
++    }
++
++    /// Computes the principal value of the inverse sine of `self`.
++    ///
++    /// This function has two branch cuts:
++    ///
++    /// * `(-∞, -1)`, continuous from above.
++    /// * `(1, ∞)`, continuous from below.
++    ///
++    /// The branch satisfies `-π/2 ≤ Re(asin(z)) ≤ π/2`.
++    #[inline]
++    pub fn asin(&self) -> Complex<T> {
++        // formula: arcsin(z) = -i ln(sqrt(1-z^2) + iz)
++        let i = Complex::i();
++        -i*((Complex::one() - self*self).sqrt() + i*self).ln()
++    }
++
++    /// Computes the principal value of the inverse cosine of `self`.
++    ///
++    /// This function has two branch cuts:
++    ///
++    /// * `(-∞, -1)`, continuous from above.
++    /// * `(1, ∞)`, continuous from below.
++    ///
++    /// The branch satisfies `0 ≤ Re(acos(z)) ≤ π`.
++    #[inline]
++    pub fn acos(&self) -> Complex<T> {
++        // formula: arccos(z) = -i ln(i sqrt(1-z^2) + z)
++        let i = Complex::i();
++        -i*(i*(Complex::one() - self*self).sqrt() + self).ln()
++    }
++
++    /// Computes the principal value of the inverse tangent of `self`.
++    ///
++    /// This function has two branch cuts:
++    ///
++    /// * `(-∞i, -i]`, continuous from the left.
++    /// * `[i, ∞i)`, continuous from the right.
++    ///
++    /// The branch satisfies `-π/2 ≤ Re(atan(z)) ≤ π/2`.
++    #[inline]
++    pub fn atan(&self) -> Complex<T> {
++        // formula: arctan(z) = (ln(1+iz) - ln(1-iz))/(2i)
++        let i = Complex::i();
++        let one = Complex::one();
++        let two = one + one;
++        if *self == i {
++            return Complex::new(T::zero(), T::infinity());
++        }
++        else if *self == -i {
++            return Complex::new(T::zero(), -T::infinity());
++        }
++        ((one + i * self).ln() - (one - i * self).ln()) / (two * i)
++    }
++
++    /// Computes the hyperbolic sine of `self`.
++    #[inline]
++    pub fn sinh(&self) -> Complex<T> {
++        // formula: sinh(a + bi) = sinh(a)cos(b) + i*cosh(a)sin(b)
++        Complex::new(self.re.sinh() * self.im.cos(), self.re.cosh() * self.im.sin())
++    }
++
++    /// Computes the hyperbolic cosine of `self`.
++    #[inline]
++    pub fn cosh(&self) -> Complex<T> {
++        // formula: cosh(a + bi) = cosh(a)cos(b) + i*sinh(a)sin(b)
++        Complex::new(self.re.cosh() * self.im.cos(), self.re.sinh() * self.im.sin())
++    }
++
++    /// Computes the hyperbolic tangent of `self`.
++    #[inline]
++    pub fn tanh(&self) -> Complex<T> {
++        // formula: tanh(a + bi) = (sinh(2a) + i*sin(2b))/(cosh(2a) + cos(2b))
++        let (two_re, two_im) = (self.re + self.re, self.im + self.im);
++        Complex::new(two_re.sinh(), two_im.sin()).unscale(two_re.cosh() + two_im.cos())
++    }
++
++    /// Computes the principal value of inverse hyperbolic sine of `self`.
++    ///
++    /// This function has two branch cuts:
++    ///
++    /// * `(-∞i, -i)`, continuous from the left.
++    /// * `(i, ∞i)`, continuous from the right.
++    ///
++    /// The branch satisfies `-π/2 ≤ Im(asinh(z)) ≤ π/2`.
++    #[inline]
++    pub fn asinh(&self) -> Complex<T> {
++        // formula: arcsinh(z) = ln(z + sqrt(1+z^2))
++        let one = Complex::one();
++        (self + (one + self * self).sqrt()).ln()
++    }
++
++    /// Computes the principal value of inverse hyperbolic cosine of `self`.
++    ///
++    /// This function has one branch cut:
++    ///
++    /// * `(-∞, 1)`, continuous from above.
++    ///
++    /// The branch satisfies `-π ≤ Im(acosh(z)) ≤ π` and `0 ≤ Re(acosh(z)) < ∞`.
++    #[inline]
++    pub fn acosh(&self) -> Complex<T> {
++        // formula: arccosh(z) = 2 ln(sqrt((z+1)/2) + sqrt((z-1)/2))
++        let one = Complex::one();
++        let two = one + one;
++        two * (((self + one)/two).sqrt() + ((self - one)/two).sqrt()).ln()
++    }
++
++    /// Computes the principal value of inverse hyperbolic tangent of `self`.
++    ///
++    /// This function has two branch cuts:
++    ///
++    /// * `(-∞, -1]`, continuous from above.
++    /// * `[1, ∞)`, continuous from below.
++    ///
++    /// The branch satisfies `-π/2 ≤ Im(atanh(z)) ≤ π/2`.
++    #[inline]
++    pub fn atanh(&self) -> Complex<T> {
++        // formula: arctanh(z) = (ln(1+z) - ln(1-z))/2
++        let one = Complex::one();
++        let two = one + one;
++        if *self == one {
++            return Complex::new(T::infinity(), T::zero());
++        }
++        else if *self == -one {
++            return Complex::new(-T::infinity(), T::zero());
++        }
++        ((one + self).ln() - (one - self).ln()) / two
++    }
++
++    /// Checks if the given complex number is NaN
++    #[inline]
++    pub fn is_nan(self) -> bool {
++        self.re.is_nan() || self.im.is_nan()
++    }
++
++    /// Checks if the given complex number is infinite
++    #[inline]
++    pub fn is_infinite(self) -> bool {
++        !self.is_nan() && (self.re.is_infinite() || self.im.is_infinite())
++    }
++
++    /// Checks if the given complex number is finite
++    #[inline]
++    pub fn is_finite(self) -> bool {
++        self.re.is_finite() && self.im.is_finite()
++    }
++
++    /// Checks if the given complex number is normal
++    #[inline]
++   pub fn is_normal(self) -> bool {
++        self.re.is_normal() && self.im.is_normal()
++    }
++}
++
++impl<T: Clone + Num> From<T> for Complex<T> {
++    #[inline]
++    fn from(re: T) -> Complex<T> {
++        Complex { re: re, im: T::zero() }
++    }
++}
++
++impl<'a, T: Clone + Num> From<&'a T> for Complex<T> {
++    #[inline]
++    fn from(re: &T) -> Complex<T> {
++        From::from(re.clone())
++    }
++}
++
++macro_rules! forward_ref_ref_binop {
++    (impl $imp:ident, $method:ident) => {
++        impl<'a, 'b, T: Clone + Num> $imp<&'b Complex<T>> for &'a Complex<T> {
++            type Output = Complex<T>;
++
++            #[inline]
++            fn $method(self, other: &Complex<T>) -> Complex<T> {
++                self.clone().$method(other.clone())
++            }
++        }
++    }
++}
++
++macro_rules! forward_ref_val_binop {
++    (impl $imp:ident, $method:ident) => {
++        impl<'a, T: Clone + Num> $imp<Complex<T>> for &'a Complex<T> {
++            type Output = Complex<T>;
++
++            #[inline]
++            fn $method(self, other: Complex<T>) -> Complex<T> {
++                self.clone().$method(other)
++            }
++        }
++    }
++}
++
++macro_rules! forward_val_ref_binop {
++    (impl $imp:ident, $method:ident) => {
++        impl<'a, T: Clone + Num> $imp<&'a Complex<T>> for Complex<T> {
++            type Output = Complex<T>;
++
++            #[inline]
++            fn $method(self, other: &Complex<T>) -> Complex<T> {
++                self.$method(other.clone())
++            }
++        }
++    }
++}
++
++macro_rules! forward_all_binop {
++    (impl $imp:ident, $method:ident) => {
++        forward_ref_ref_binop!(impl $imp, $method);
++        forward_ref_val_binop!(impl $imp, $method);
++        forward_val_ref_binop!(impl $imp, $method);
++    };
++}
++
++/* arithmetic */
++forward_all_binop!(impl Add, add);
++
++// (a + i b) + (c + i d) == (a + c) + i (b + d)
++impl<T: Clone + Num> Add<Complex<T>> for Complex<T> {
++    type Output = Complex<T>;
++
++    #[inline]
++    fn add(self, other: Complex<T>) -> Complex<T> {
++        Complex::new(self.re + other.re, self.im + other.im)
++    }
++}
++
++forward_all_binop!(impl Sub, sub);
++
++// (a + i b) - (c + i d) == (a - c) + i (b - d)
++impl<T: Clone + Num> Sub<Complex<T>> for Complex<T> {
++    type Output = Complex<T>;
++
++    #[inline]
++    fn sub(self, other: Complex<T>) -> Complex<T> {
++        Complex::new(self.re - other.re, self.im - other.im)
++    }
++}
++
++forward_all_binop!(impl Mul, mul);
++
++// (a + i b) * (c + i d) == (a*c - b*d) + i (a*d + b*c)
++impl<T: Clone + Num> Mul<Complex<T>> for Complex<T> {
++    type Output = Complex<T>;
++
++    #[inline]
++    fn mul(self, other: Complex<T>) -> Complex<T> {
++        let re = self.re.clone() * other.re.clone() - self.im.clone() * other.im.clone();
++        let im = self.re * other.im + self.im * other.re;
++        Complex::new(re, im)
++    }
++}
++
++forward_all_binop!(impl Div, div);
++
++// (a + i b) / (c + i d) == [(a + i b) * (c - i d)] / (c*c + d*d)
++//   == [(a*c + b*d) / (c*c + d*d)] + i [(b*c - a*d) / (c*c + d*d)]
++impl<T: Clone + Num> Div<Complex<T>> for Complex<T> {
++    type Output = Complex<T>;
++
++    #[inline]
++    fn div(self, other: Complex<T>) -> Complex<T> {
++        let norm_sqr = other.norm_sqr();
++        let re = self.re.clone() * other.re.clone() + self.im.clone() * other.im.clone();
++        let im = self.im * other.re - self.re * other.im;
++        Complex::new(re / norm_sqr.clone(), im / norm_sqr)
++    }
++}
++
++// Op Assign
++
++mod opassign {
++    use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign};
++
++    use traits::NumAssign;
++
++    use Complex;
++
++    impl<T: Clone + NumAssign> AddAssign for Complex<T> {
++        fn add_assign(&mut self, other: Complex<T>) {
++            self.re += other.re;
++            self.im += other.im;
++        }
++    }
++
++    impl<T: Clone + NumAssign> SubAssign for Complex<T> {
++        fn sub_assign(&mut self, other: Complex<T>) {
++            self.re -= other.re;
++            self.im -= other.im;
++        }
++    }
++
++    impl<T: Clone + NumAssign> MulAssign for Complex<T> {
++        fn mul_assign(&mut self, other: Complex<T>) {
++            *self = self.clone() * other;
++        }
++    }
++
++    impl<T: Clone + NumAssign> DivAssign for Complex<T> {
++        fn div_assign(&mut self, other: Complex<T>) {
++            *self = self.clone() / other;
++        }
++    }
++
++    impl<T: Clone + NumAssign> AddAssign<T> for Complex<T> {
++        fn add_assign(&mut self, other: T) {
++            self.re += other;
++        }
++    }
++
++    impl<T: Clone + NumAssign> SubAssign<T> for Complex<T> {
++        fn sub_assign(&mut self, other: T) {
++            self.re -= other;
++        }
++    }
++
++    impl<T: Clone + NumAssign> MulAssign<T> for Complex<T> {
++        fn mul_assign(&mut self, other: T) {
++            self.re *= other.clone();
++            self.im *= other;
++        }
++    }
++
++    impl<T: Clone + NumAssign> DivAssign<T> for Complex<T> {
++        fn div_assign(&mut self, other: T) {
++            self.re /= other.clone();
++            self.im /= other;
++        }
++    }
++
++    macro_rules! forward_op_assign {
++        (impl $imp:ident, $method:ident) => {
++            impl<'a, T: Clone + NumAssign> $imp<&'a Complex<T>> for Complex<T> {
++                #[inline]
++                fn $method(&mut self, other: &Complex<T>) {
++                    self.$method(other.clone())
++                }
++            }
++            impl<'a, T: Clone + NumAssign> $imp<&'a T> for Complex<T> {
++                #[inline]
++                fn $method(&mut self, other: &T) {
++                    self.$method(other.clone())
++                }
++            }
++        }
++    }
++
++    forward_op_assign!(impl AddAssign, add_assign);
++    forward_op_assign!(impl SubAssign, sub_assign);
++    forward_op_assign!(impl MulAssign, mul_assign);
++    forward_op_assign!(impl DivAssign, div_assign);
++}
++
++impl<T: Clone + Num + Neg<Output = T>> Neg for Complex<T> {
++    type Output = Complex<T>;
++
++    #[inline]
++    fn neg(self) -> Complex<T> {
++        Complex::new(-self.re, -self.im)
++    }
++}
++
++impl<'a, T: Clone + Num + Neg<Output = T>> Neg for &'a Complex<T> {
++    type Output = Complex<T>;
++
++    #[inline]
++    fn neg(self) -> Complex<T> {
++        -self.clone()
++    }
++}
++
++macro_rules! real_arithmetic {
++    (@forward $imp:ident::$method:ident for $($real:ident),*) => (
++        impl<'a, T: Clone + Num> $imp<&'a T> for Complex<T> {
++            type Output = Complex<T>;
++
++            #[inline]
++            fn $method(self, other: &T) -> Complex<T> {
++                self.$method(other.clone())
++            }
++        }
++        impl<'a, T: Clone + Num> $imp<T> for &'a Complex<T> {
++            type Output = Complex<T>;
++
++            #[inline]
++            fn $method(self, other: T) -> Complex<T> {
++                self.clone().$method(other)
++            }
++        }
++        impl<'a, 'b, T: Clone + Num> $imp<&'a T> for &'b Complex<T> {
++            type Output = Complex<T>;
++
++            #[inline]
++            fn $method(self, other: &T) -> Complex<T> {
++                self.clone().$method(other.clone())
++            }
++        }
++        $(
++            impl<'a> $imp<&'a Complex<$real>> for $real {
++                type Output = Complex<$real>;
++
++                #[inline]
++                fn $method(self, other: &Complex<$real>) -> Complex<$real> {
++                    self.$method(other.clone())
++                }
++            }
++            impl<'a> $imp<Complex<$real>> for &'a $real {
++                type Output = Complex<$real>;
++
++                #[inline]
++                fn $method(self, other: Complex<$real>) -> Complex<$real> {
++                    self.clone().$method(other)
++                }
++            }
++            impl<'a, 'b> $imp<&'a Complex<$real>> for &'b $real {
++                type Output = Complex<$real>;
++
++                #[inline]
++                fn $method(self, other: &Complex<$real>) -> Complex<$real> {
++                    self.clone().$method(other.clone())
++                }
++            }
++        )*
++    );
++    ($($real:ident),*) => (
++        real_arithmetic!(@forward Add::add for $($real),*);
++        real_arithmetic!(@forward Sub::sub for $($real),*);
++        real_arithmetic!(@forward Mul::mul for $($real),*);
++        real_arithmetic!(@forward Div::div for $($real),*);
++
++        $(
++            impl Add<Complex<$real>> for $real {
++                type Output = Complex<$real>;
++
++                #[inline]
++                fn add(self, other: Complex<$real>) -> Complex<$real> {
++                    Complex::new(self + other.re, other.im)
++                }
++            }
++
++            impl Sub<Complex<$real>> for $real {
++                type Output = Complex<$real>;
++
++                #[inline]
++                fn sub(self, other: Complex<$real>) -> Complex<$real> {
++                    Complex::new(self - other.re, $real::zero() - other.im)
++                }
++            }
++
++            impl Mul<Complex<$real>> for $real {
++                type Output = Complex<$real>;
++
++                #[inline]
++                fn mul(self, other: Complex<$real>) -> Complex<$real> {
++                    Complex::new(self * other.re, self * other.im)
++                }
++            }
++
++            impl Div<Complex<$real>> for $real {
++                type Output = Complex<$real>;
++
++                #[inline]
++                fn div(self, other: Complex<$real>) -> Complex<$real> {
++                    // a / (c + i d) == [a * (c - i d)] / (c*c + d*d)
++                    let norm_sqr = other.norm_sqr();
++                    Complex::new(self * other.re / norm_sqr.clone(),
++                                 $real::zero() - self * other.im / norm_sqr)
++                }
++            }
++        )*
++    );
++}
++
++impl<T: Clone + Num> Add<T> for Complex<T> {
++    type Output = Complex<T>;
++
++    #[inline]
++    fn add(self, other: T) -> Complex<T> {
++        Complex::new(self.re + other, self.im)
++    }
++}
++
++impl<T: Clone + Num> Sub<T> for Complex<T> {
++    type Output = Complex<T>;
++
++    #[inline]
++    fn sub(self, other: T) -> Complex<T> {
++        Complex::new(self.re - other, self.im)
++    }
++}
++
++impl<T: Clone + Num> Mul<T> for Complex<T> {
++    type Output = Complex<T>;
++
++    #[inline]
++    fn mul(self, other: T) -> Complex<T> {
++        Complex::new(self.re * other.clone(), self.im * other)
++    }
++}
++
++impl<T: Clone + Num> Div<T> for Complex<T> {
++    type Output = Complex<T>;
++
++    #[inline]
++    fn div(self, other: T) -> Complex<T> {
++        Complex::new(self.re / other.clone(), self.im / other)
++    }
++}
++
++real_arithmetic!(usize, u8, u16, u32, u64, isize, i8, i16, i32, i64, f32, f64);
++
++/* constants */
++impl<T: Clone + Num> Zero for Complex<T> {
++    #[inline]
++    fn zero() -> Complex<T> {
++        Complex::new(Zero::zero(), Zero::zero())
++    }
++
++    #[inline]
++    fn is_zero(&self) -> bool {
++        self.re.is_zero() && self.im.is_zero()
++    }
++}
++
++impl<T: Clone + Num> One for Complex<T> {
++    #[inline]
++    fn one() -> Complex<T> {
++        Complex::new(One::one(), Zero::zero())
++    }
++}
++
++macro_rules! write_complex {
++    ($f:ident, $t:expr, $prefix:expr, $re:expr, $im:expr, $T:ident) => {{
++        let abs_re = if $re < Zero::zero() { $T::zero() - $re.clone() } else { $re.clone() };
++        let abs_im = if $im < Zero::zero() { $T::zero() - $im.clone() } else { $im.clone() };
++
++        let real: String;
++        let imag: String;
++
++        if let Some(prec) = $f.precision() {
++            real = format!(concat!("{:.1$", $t, "}"), abs_re, prec);
++            imag = format!(concat!("{:.1$", $t, "}"), abs_im, prec);
++        }
++        else {
++            real = format!(concat!("{:", $t, "}"), abs_re);
++            imag = format!(concat!("{:", $t, "}"), abs_im);
++        }
++
++        let prefix = if $f.alternate() { $prefix } else { "" };
++        let sign = if $re < Zero::zero() {
++            "-"
++        } else if $f.sign_plus() {
++            "+"
++        } else {
++            ""
++        };
++
++        let complex = if $im < Zero::zero() {
++            format!("{}{pre}{re}-{pre}{im}i", sign, re=real, im=imag, pre=prefix)
++        }
++        else {
++            format!("{}{pre}{re}+{pre}{im}i", sign, re=real, im=imag, pre=prefix)
++        };
++
++        if let Some(width) = $f.width() {
++            write!($f, "{0: >1$}", complex, width)
++        }
++        else {
++            write!($f, "{}", complex)
++        }
++    }}
++}
++
++/* string conversions */
++impl<T> fmt::Display for Complex<T> where
++    T: fmt::Display + Num + PartialOrd + Clone
++{
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write_complex!(f, "", "", self.re, self.im, T)
++    }
++}
++
++impl<T> fmt::LowerExp for Complex<T> where
++    T: fmt::LowerExp + Num + PartialOrd + Clone
++{
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write_complex!(f, "e", "", self.re, self.im, T)
++    }
++}
++
++impl<T> fmt::UpperExp for Complex<T> where
++    T: fmt::UpperExp + Num + PartialOrd + Clone
++{
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write_complex!(f, "E", "", self.re, self.im, T)
++    }
++}
++
++impl<T> fmt::LowerHex for Complex<T> where
++    T: fmt::LowerHex + Num + PartialOrd + Clone
++{
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write_complex!(f, "x", "0x", self.re, self.im, T)
++    }
++}
++
++impl<T> fmt::UpperHex for Complex<T> where
++    T: fmt::UpperHex + Num + PartialOrd + Clone
++{
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write_complex!(f, "X", "0x", self.re, self.im, T)
++    }
++}
++
++impl<T> fmt::Octal for Complex<T> where
++    T: fmt::Octal + Num + PartialOrd + Clone
++{
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write_complex!(f, "o", "0o", self.re, self.im, T)
++    }
++}
++
++impl<T> fmt::Binary for Complex<T> where
++    T: fmt::Binary + Num + PartialOrd + Clone
++{
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write_complex!(f, "b", "0b", self.re, self.im, T)
++    }
++}
++
++impl<T> FromStr for Complex<T> where
++    T: FromStr + Num + Clone
++{
++    type Err = ParseComplexError<T::Err>;
++
++    /// Parses `a +/- bi`; `ai +/- b`; `a`; or `bi` where `a` and `b` are of type `T`
++    fn from_str(s: &str) -> Result<Self, Self::Err>
++    {
++        let imag = match s.rfind('j') {
++            None => 'i',
++            _ => 'j'
++        };
++
++        let mut b = String::with_capacity(s.len());
++        let mut first = true;
++
++        let char_indices = s.char_indices();
++        let mut pc = ' ';
++        let mut split_index = s.len();
++
++        for (i, cc) in char_indices {
++            if cc == '+' && pc != 'e' && pc != 'E' && i > 0 {
++                // ignore '+' if part of an exponent
++                if first {
++                    split_index = i;
++                    first = false;
++                }
++                // don't carry '+' over into b
++                pc = ' ';
++                continue;
++            } else if cc == '-' && pc != 'e' && pc != 'E' && i > 0 {
++                // ignore '-' if part of an exponent or begins the string
++                if first {
++                    split_index = i;
++                    first = false;
++                }
++                // DO carry '-' over into b
++            }
++
++            if pc == '-' && cc == ' ' && !first {
++                // ignore whitespace between minus sign and next number
++                continue;
++            }
++
++            if !first {
++                b.push(cc);
++            }
++            pc = cc;
++        }
++
++        // split off real and imaginary parts, trim whitespace
++        let (a, _) = s.split_at(split_index);
++        let a = a.trim_right();
++        let mut b = b.trim_left();
++        // input was either pure real or pure imaginary
++        if b.is_empty() {
++            b = match a.ends_with(imag) {
++                false => "0i",
++                true => "0"
++            };
++        }
++
++        let re;
++        let im;
++        if a.ends_with(imag) {
++            im = a; re = b;
++        } else if b.ends_with(imag) {
++            re = a; im = b;
++        } else {
++            return Err(ParseComplexError::new());
++        }
++
++        // parse re
++        let re = try!(T::from_str(re).map_err(ParseComplexError::from_error));
++
++        // pop imaginary unit off
++        let mut im = &im[..im.len()-1];
++        // handle im == "i" or im == "-i"
++        if im.is_empty() || im == "+" {
++            im = "1";
++        } else if im == "-" {
++            im = "-1";
++        }
++
++        // parse im
++        let im = try!(T::from_str(im).map_err(ParseComplexError::from_error));
++
++        Ok(Complex::new(re, im))
++    }
++}
++
++#[cfg(feature = "serde")]
++impl<T> serde::Serialize for Complex<T>
++    where T: serde::Serialize
++{
++    fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where
++        S: serde::Serializer
++    {
++        (&self.re, &self.im).serialize(serializer)
++    }
++}
++
++#[cfg(feature = "serde")]
++impl<T> serde::Deserialize for Complex<T> where
++    T: serde::Deserialize + Num + Clone
++{
++    fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error> where
++        D: serde::Deserializer,
++    {
++        let (re, im) = try!(serde::Deserialize::deserialize(deserializer));
++        Ok(Complex::new(re, im))
++    }
++}
++
++#[derive(Debug, PartialEq)]
++pub struct ParseComplexError<E>
++{
++    kind: ComplexErrorKind<E>,
++}
++
++#[derive(Debug, PartialEq)]
++enum ComplexErrorKind<E>
++{
++    ParseError(E),
++    ExprError
++}
++
++impl<E> ParseComplexError<E>
++{
++   fn new() -> Self {
++      ParseComplexError {
++         kind: ComplexErrorKind::ExprError,
++      }
++   }
++
++   fn from_error(error: E) -> Self {
++      ParseComplexError {
++         kind: ComplexErrorKind::ParseError(error),
++      }
++   }
++}
++
++impl<E: Error> Error for ParseComplexError<E>
++{
++    fn description(&self) -> &str {
++        match self.kind {
++            ComplexErrorKind::ParseError(ref e) => e.description(),
++            ComplexErrorKind::ExprError => "invalid or unsupported complex expression"
++        }
++    }
++}
++
++impl<E: Error> fmt::Display for ParseComplexError<E>
++{
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        self.description().fmt(f)
++    }
++}
++
++#[cfg(test)]
++fn hash<T: hash::Hash>(x: &T) -> u64 {
++    use std::hash::{BuildHasher, Hasher};
++    use std::collections::hash_map::RandomState;
++    let mut hasher = <RandomState as BuildHasher>::Hasher::new();
++    x.hash(&mut hasher);
++    hasher.finish()
++}
++
++#[cfg(test)]
++mod test {
++    #![allow(non_upper_case_globals)]
++
++    use super::{Complex64, Complex};
++    use std::f64;
++    use std::str::FromStr;
++
++    use traits::{Zero, One, Float};
++
++    pub const _0_0i : Complex64 = Complex { re: 0.0, im: 0.0 };
++    pub const _1_0i : Complex64 = Complex { re: 1.0, im: 0.0 };
++    pub const _1_1i : Complex64 = Complex { re: 1.0, im: 1.0 };
++    pub const _0_1i : Complex64 = Complex { re: 0.0, im: 1.0 };
++    pub const _neg1_1i : Complex64 = Complex { re: -1.0, im: 1.0 };
++    pub const _05_05i : Complex64 = Complex { re: 0.5, im: 0.5 };
++    pub const all_consts : [Complex64; 5] = [_0_0i, _1_0i, _1_1i, _neg1_1i, _05_05i];
++    pub const _4_2i : Complex64 = Complex { re: 4.0, im: 2.0 };
++
++    #[test]
++    fn test_consts() {
++        // check our constants are what Complex::new creates
++        fn test(c : Complex64, r : f64, i: f64) {
++            assert_eq!(c, Complex::new(r,i));
++        }
++        test(_0_0i, 0.0, 0.0);
++        test(_1_0i, 1.0, 0.0);
++        test(_1_1i, 1.0, 1.0);
++        test(_neg1_1i, -1.0, 1.0);
++        test(_05_05i, 0.5, 0.5);
++
++        assert_eq!(_0_0i, Zero::zero());
++        assert_eq!(_1_0i, One::one());
++    }
++
++    #[test]
++    #[cfg_attr(target_arch = "x86", ignore)]
++    // FIXME #7158: (maybe?) currently failing on x86.
++    fn test_norm() {
++        fn test(c: Complex64, ns: f64) {
++            assert_eq!(c.norm_sqr(), ns);
++            assert_eq!(c.norm(), ns.sqrt())
++        }
++        test(_0_0i, 0.0);
++        test(_1_0i, 1.0);
++        test(_1_1i, 2.0);
++        test(_neg1_1i, 2.0);
++        test(_05_05i, 0.5);
++    }
++
++    #[test]
++    fn test_scale_unscale() {
++        assert_eq!(_05_05i.scale(2.0), _1_1i);
++        assert_eq!(_1_1i.unscale(2.0), _05_05i);
++        for &c in all_consts.iter() {
++            assert_eq!(c.scale(2.0).unscale(2.0), c);
++        }
++    }
++
++    #[test]
++    fn test_conj() {
++        for &c in all_consts.iter() {
++            assert_eq!(c.conj(), Complex::new(c.re, -c.im));
++            assert_eq!(c.conj().conj(), c);
++        }
++    }
++
++    #[test]
++    fn test_inv() {
++        assert_eq!(_1_1i.inv(), _05_05i.conj());
++        assert_eq!(_1_0i.inv(), _1_0i.inv());
++    }
++
++    #[test]
++    #[should_panic]
++    fn test_divide_by_zero_natural() {
++        let n = Complex::new(2, 3);
++        let d = Complex::new(0, 0);
++        let _x = n / d;
++    }
++
++    #[test]
++    fn test_inv_zero() {
++        // FIXME #20: should this really fail, or just NaN?
++        assert!(_0_0i.inv().is_nan());
++    }
++
++    #[test]
++    fn test_arg() {
++        fn test(c: Complex64, arg: f64) {
++            assert!((c.arg() - arg).abs() < 1.0e-6)
++        }
++        test(_1_0i, 0.0);
++        test(_1_1i, 0.25 * f64::consts::PI);
++        test(_neg1_1i, 0.75 * f64::consts::PI);
++        test(_05_05i, 0.25 * f64::consts::PI);
++    }
++
++    #[test]
++    fn test_polar_conv() {
++        fn test(c: Complex64) {
++            let (r, theta) = c.to_polar();
++            assert!((c - Complex::from_polar(&r, &theta)).norm() < 1e-6);
++        }
++        for &c in all_consts.iter() { test(c); }
++    }
++
++    fn close(a: Complex64, b: Complex64) -> bool {
++        close_to_tol(a, b, 1e-10)
++    }
++
++    fn close_to_tol(a: Complex64, b: Complex64, tol: f64) -> bool {
++        // returns true if a and b are reasonably close
++        (a == b) || (a-b).norm() < tol
++    }
++
++    #[test]
++    fn test_exp() {
++        assert!(close(_1_0i.exp(), _1_0i.scale(f64::consts::E)));
++        assert!(close(_0_0i.exp(), _1_0i));
++        assert!(close(_0_1i.exp(), Complex::new(1.0.cos(), 1.0.sin())));
++        assert!(close(_05_05i.exp()*_05_05i.exp(), _1_1i.exp()));
++        assert!(close(_0_1i.scale(-f64::consts::PI).exp(), _1_0i.scale(-1.0)));
++        for &c in all_consts.iter() {
++            // e^conj(z) = conj(e^z)
++            assert!(close(c.conj().exp(), c.exp().conj()));
++            // e^(z + 2 pi i) = e^z
++            assert!(close(c.exp(), (c + _0_1i.scale(f64::consts::PI*2.0)).exp()));
++        }
++    }
++
++    #[test]
++    fn test_ln() {
++        assert!(close(_1_0i.ln(), _0_0i));
++        assert!(close(_0_1i.ln(), _0_1i.scale(f64::consts::PI/2.0)));
++        assert!(close(_0_0i.ln(), Complex::new(f64::neg_infinity(), 0.0)));
++        assert!(close((_neg1_1i * _05_05i).ln(), _neg1_1i.ln() + _05_05i.ln()));
++        for &c in all_consts.iter() {
++            // ln(conj(z() = conj(ln(z))
++            assert!(close(c.conj().ln(), c.ln().conj()));
++            // for this branch, -pi <= arg(ln(z)) <= pi
++            assert!(-f64::consts::PI <= c.ln().arg() && c.ln().arg() <= f64::consts::PI);
++        }
++    }
++
++    #[test]
++    fn test_powc()
++    {
++        let a = Complex::new(2.0, -3.0);
++        let b = Complex::new(3.0, 0.0);
++        assert!(close(a.powc(b), a.powf(b.re)));
++        assert!(close(b.powc(a), a.expf(b.re)));
++        let c = Complex::new(1.0 / 3.0, 0.1);
++        assert!(close_to_tol(a.powc(c), Complex::new(1.65826, -0.33502), 1e-5));
++    }
++
++    #[test]
++    fn test_powf()
++    {
++        let c = Complex::new(2.0, -1.0);
++        let r = c.powf(3.5);
++        assert!(close_to_tol(r, Complex::new(-0.8684746, -16.695934), 1e-5));
++    }
++
++    #[test]
++    fn test_log()
++    {
++        let c = Complex::new(2.0, -1.0);
++        let r = c.log(10.0);
++        assert!(close_to_tol(r, Complex::new(0.349485, -0.20135958), 1e-5));
++    }
++
++    #[test]
++    fn test_some_expf_cases()
++    {
++        let c = Complex::new(2.0, -1.0);
++        let r = c.expf(10.0);
++        assert!(close_to_tol(r, Complex::new(-66.82015, -74.39803), 1e-5));
++
++        let c = Complex::new(5.0, -2.0);
++        let r = c.expf(3.4);
++        assert!(close_to_tol(r, Complex::new(-349.25, -290.63), 1e-2));
++
++        let c = Complex::new(-1.5, 2.0 / 3.0);
++        let r = c.expf(1.0 / 3.0);
++        assert!(close_to_tol(r, Complex::new(3.8637, -3.4745), 1e-2));
++    }
++
++    #[test]
++    fn test_sqrt() {
++        assert!(close(_0_0i.sqrt(), _0_0i));
++        assert!(close(_1_0i.sqrt(), _1_0i));
++        assert!(close(Complex::new(-1.0, 0.0).sqrt(), _0_1i));
++        assert!(close(Complex::new(-1.0, -0.0).sqrt(), _0_1i.scale(-1.0)));
++        assert!(close(_0_1i.sqrt(), _05_05i.scale(2.0.sqrt())));
++        for &c in all_consts.iter() {
++            // sqrt(conj(z() = conj(sqrt(z))
++            assert!(close(c.conj().sqrt(), c.sqrt().conj()));
++            // for this branch, -pi/2 <= arg(sqrt(z)) <= pi/2
++            assert!(-f64::consts::PI/2.0 <= c.sqrt().arg() && c.sqrt().arg() <= f64::consts::PI/2.0);
++            // sqrt(z) * sqrt(z) = z
++            assert!(close(c.sqrt()*c.sqrt(), c));
++        }
++    }
++
++    #[test]
++    fn test_sin() {
++        assert!(close(_0_0i.sin(), _0_0i));
++        assert!(close(_1_0i.scale(f64::consts::PI*2.0).sin(), _0_0i));
++        assert!(close(_0_1i.sin(), _0_1i.scale(1.0.sinh())));
++        for &c in all_consts.iter() {
++            // sin(conj(z)) = conj(sin(z))
++            assert!(close(c.conj().sin(), c.sin().conj()));
++            // sin(-z) = -sin(z)
++            assert!(close(c.scale(-1.0).sin(), c.sin().scale(-1.0)));
++        }
++    }
++
++    #[test]
++    fn test_cos() {
++        assert!(close(_0_0i.cos(), _1_0i));
++        assert!(close(_1_0i.scale(f64::consts::PI*2.0).cos(), _1_0i));
++        assert!(close(_0_1i.cos(), _1_0i.scale(1.0.cosh())));
++        for &c in all_consts.iter() {
++            // cos(conj(z)) = conj(cos(z))
++            assert!(close(c.conj().cos(), c.cos().conj()));
++            // cos(-z) = cos(z)
++            assert!(close(c.scale(-1.0).cos(), c.cos()));
++        }
++    }
++
++    #[test]
++    fn test_tan() {
++        assert!(close(_0_0i.tan(), _0_0i));
++        assert!(close(_1_0i.scale(f64::consts::PI/4.0).tan(), _1_0i));
++        assert!(close(_1_0i.scale(f64::consts::PI).tan(), _0_0i));
++        for &c in all_consts.iter() {
++            // tan(conj(z)) = conj(tan(z))
++            assert!(close(c.conj().tan(), c.tan().conj()));
++            // tan(-z) = -tan(z)
++            assert!(close(c.scale(-1.0).tan(), c.tan().scale(-1.0)));
++        }
++    }
++
++    #[test]
++    fn test_asin() {
++        assert!(close(_0_0i.asin(), _0_0i));
++        assert!(close(_1_0i.asin(), _1_0i.scale(f64::consts::PI/2.0)));
++        assert!(close(_1_0i.scale(-1.0).asin(), _1_0i.scale(-f64::consts::PI/2.0)));
++        assert!(close(_0_1i.asin(), _0_1i.scale((1.0 + 2.0.sqrt()).ln())));
++        for &c in all_consts.iter() {
++            // asin(conj(z)) = conj(asin(z))
++            assert!(close(c.conj().asin(), c.asin().conj()));
++            // asin(-z) = -asin(z)
++            assert!(close(c.scale(-1.0).asin(), c.asin().scale(-1.0)));
++            // for this branch, -pi/2 <= asin(z).re <= pi/2
++            assert!(-f64::consts::PI/2.0 <= c.asin().re && c.asin().re <= f64::consts::PI/2.0);
++        }
++    }
++
++    #[test]
++    fn test_acos() {
++        assert!(close(_0_0i.acos(), _1_0i.scale(f64::consts::PI/2.0)));
++        assert!(close(_1_0i.acos(), _0_0i));
++        assert!(close(_1_0i.scale(-1.0).acos(), _1_0i.scale(f64::consts::PI)));
++        assert!(close(_0_1i.acos(), Complex::new(f64::consts::PI/2.0, (2.0.sqrt() - 1.0).ln())));
++        for &c in all_consts.iter() {
++            // acos(conj(z)) = conj(acos(z))
++            assert!(close(c.conj().acos(), c.acos().conj()));
++            // for this branch, 0 <= acos(z).re <= pi
++            assert!(0.0 <= c.acos().re && c.acos().re <= f64::consts::PI);
++        }
++    }
++
++    #[test]
++    fn test_atan() {
++        assert!(close(_0_0i.atan(), _0_0i));
++        assert!(close(_1_0i.atan(), _1_0i.scale(f64::consts::PI/4.0)));
++        assert!(close(_1_0i.scale(-1.0).atan(), _1_0i.scale(-f64::consts::PI/4.0)));
++        assert!(close(_0_1i.atan(), Complex::new(0.0, f64::infinity())));
++        for &c in all_consts.iter() {
++            // atan(conj(z)) = conj(atan(z))
++            assert!(close(c.conj().atan(), c.atan().conj()));
++            // atan(-z) = -atan(z)
++            assert!(close(c.scale(-1.0).atan(), c.atan().scale(-1.0)));
++            // for this branch, -pi/2 <= atan(z).re <= pi/2
++            assert!(-f64::consts::PI/2.0 <= c.atan().re && c.atan().re <= f64::consts::PI/2.0);
++        }
++    }
++
++    #[test]
++    fn test_sinh() {
++        assert!(close(_0_0i.sinh(), _0_0i));
++        assert!(close(_1_0i.sinh(), _1_0i.scale((f64::consts::E - 1.0/f64::consts::E)/2.0)));
++        assert!(close(_0_1i.sinh(), _0_1i.scale(1.0.sin())));
++        for &c in all_consts.iter() {
++            // sinh(conj(z)) = conj(sinh(z))
++            assert!(close(c.conj().sinh(), c.sinh().conj()));
++            // sinh(-z) = -sinh(z)
++            assert!(close(c.scale(-1.0).sinh(), c.sinh().scale(-1.0)));
++        }
++    }
++
++    #[test]
++    fn test_cosh() {
++        assert!(close(_0_0i.cosh(), _1_0i));
++        assert!(close(_1_0i.cosh(), _1_0i.scale((f64::consts::E + 1.0/f64::consts::E)/2.0)));
++        assert!(close(_0_1i.cosh(), _1_0i.scale(1.0.cos())));
++        for &c in all_consts.iter() {
++            // cosh(conj(z)) = conj(cosh(z))
++            assert!(close(c.conj().cosh(), c.cosh().conj()));
++            // cosh(-z) = cosh(z)
++            assert!(close(c.scale(-1.0).cosh(), c.cosh()));
++        }
++    }
++
++    #[test]
++    fn test_tanh() {
++        assert!(close(_0_0i.tanh(), _0_0i));
++        assert!(close(_1_0i.tanh(), _1_0i.scale((f64::consts::E.powi(2) - 1.0)/(f64::consts::E.powi(2) + 1.0))));
++        assert!(close(_0_1i.tanh(), _0_1i.scale(1.0.tan())));
++        for &c in all_consts.iter() {
++            // tanh(conj(z)) = conj(tanh(z))
++            assert!(close(c.conj().tanh(), c.conj().tanh()));
++            // tanh(-z) = -tanh(z)
++            assert!(close(c.scale(-1.0).tanh(), c.tanh().scale(-1.0)));
++        }
++    }
++
++    #[test]
++    fn test_asinh() {
++        assert!(close(_0_0i.asinh(), _0_0i));
++        assert!(close(_1_0i.asinh(), _1_0i.scale(1.0 + 2.0.sqrt()).ln()));
++        assert!(close(_0_1i.asinh(), _0_1i.scale(f64::consts::PI/2.0)));
++        assert!(close(_0_1i.asinh().scale(-1.0), _0_1i.scale(-f64::consts::PI/2.0)));
++        for &c in all_consts.iter() {
++            // asinh(conj(z)) = conj(asinh(z))
++            assert!(close(c.conj().asinh(), c.conj().asinh()));
++            // asinh(-z) = -asinh(z)
++            assert!(close(c.scale(-1.0).asinh(), c.asinh().scale(-1.0)));
++            // for this branch, -pi/2 <= asinh(z).im <= pi/2
++            assert!(-f64::consts::PI/2.0 <= c.asinh().im && c.asinh().im <= f64::consts::PI/2.0);
++        }
++    }
++
++    #[test]
++    fn test_acosh() {
++        assert!(close(_0_0i.acosh(), _0_1i.scale(f64::consts::PI/2.0)));
++        assert!(close(_1_0i.acosh(), _0_0i));
++        assert!(close(_1_0i.scale(-1.0).acosh(), _0_1i.scale(f64::consts::PI)));
++        for &c in all_consts.iter() {
++            // acosh(conj(z)) = conj(acosh(z))
++            assert!(close(c.conj().acosh(), c.conj().acosh()));
++            // for this branch, -pi <= acosh(z).im <= pi and 0 <= acosh(z).re
++            assert!(-f64::consts::PI <= c.acosh().im && c.acosh().im <= f64::consts::PI && 0.0 <= c.cosh().re);
++        }
++    }
++
++    #[test]
++    fn test_atanh() {
++        assert!(close(_0_0i.atanh(), _0_0i));
++        assert!(close(_0_1i.atanh(), _0_1i.scale(f64::consts::PI/4.0)));
++        assert!(close(_1_0i.atanh(), Complex::new(f64::infinity(), 0.0)));
++        for &c in all_consts.iter() {
++            // atanh(conj(z)) = conj(atanh(z))
++            assert!(close(c.conj().atanh(), c.conj().atanh()));
++            // atanh(-z) = -atanh(z)
++            assert!(close(c.scale(-1.0).atanh(), c.atanh().scale(-1.0)));
++            // for this branch, -pi/2 <= atanh(z).im <= pi/2
++            assert!(-f64::consts::PI/2.0 <= c.atanh().im && c.atanh().im <= f64::consts::PI/2.0);
++        }
++    }
++
++    #[test]
++    fn test_exp_ln() {
++        for &c in all_consts.iter() {
++            // e^ln(z) = z
++            assert!(close(c.ln().exp(), c));
++        }
++    }
++
++    #[test]
++    fn test_trig_to_hyperbolic() {
++        for &c in all_consts.iter() {
++            // sin(iz) = i sinh(z)
++            assert!(close((_0_1i * c).sin(), _0_1i * c.sinh()));
++            // cos(iz) = cosh(z)
++            assert!(close((_0_1i * c).cos(), c.cosh()));
++            // tan(iz) = i tanh(z)
++            assert!(close((_0_1i * c).tan(), _0_1i * c.tanh()));
++        }
++    }
++
++    #[test]
++    fn test_trig_identities() {
++        for &c in all_consts.iter() {
++            // tan(z) = sin(z)/cos(z)
++            assert!(close(c.tan(), c.sin()/c.cos()));
++            // sin(z)^2 + cos(z)^2 = 1
++            assert!(close(c.sin()*c.sin() + c.cos()*c.cos(), _1_0i));
++
++            // sin(asin(z)) = z
++            assert!(close(c.asin().sin(), c));
++            // cos(acos(z)) = z
++            assert!(close(c.acos().cos(), c));
++            // tan(atan(z)) = z
++            // i and -i are branch points
++            if c != _0_1i && c != _0_1i.scale(-1.0) {
++                assert!(close(c.atan().tan(), c));
++            }
++
++            // sin(z) = (e^(iz) - e^(-iz))/(2i)
++            assert!(close(((_0_1i*c).exp() - (_0_1i*c).exp().inv())/_0_1i.scale(2.0), c.sin()));
++            // cos(z) = (e^(iz) + e^(-iz))/2
++            assert!(close(((_0_1i*c).exp() + (_0_1i*c).exp().inv()).unscale(2.0), c.cos()));
++            // tan(z) = i (1 - e^(2iz))/(1 + e^(2iz))
++            assert!(close(_0_1i * (_1_0i - (_0_1i*c).scale(2.0).exp())/(_1_0i + (_0_1i*c).scale(2.0).exp()), c.tan()));
++        }
++    }
++
++    #[test]
++    fn test_hyperbolic_identites() {
++        for &c in all_consts.iter() {
++            // tanh(z) = sinh(z)/cosh(z)
++            assert!(close(c.tanh(), c.sinh()/c.cosh()));
++            // cosh(z)^2 - sinh(z)^2 = 1
++            assert!(close(c.cosh()*c.cosh() - c.sinh()*c.sinh(), _1_0i));
++
++            // sinh(asinh(z)) = z
++            assert!(close(c.asinh().sinh(), c));
++            // cosh(acosh(z)) = z
++            assert!(close(c.acosh().cosh(), c));
++            // tanh(atanh(z)) = z
++            // 1 and -1 are branch points
++            if c != _1_0i && c != _1_0i.scale(-1.0) {
++                assert!(close(c.atanh().tanh(), c));
++            }
++
++            // sinh(z) = (e^z - e^(-z))/2
++            assert!(close((c.exp() - c.exp().inv()).unscale(2.0), c.sinh()));
++            // cosh(z) = (e^z + e^(-z))/2
++            assert!(close((c.exp() + c.exp().inv()).unscale(2.0), c.cosh()));
++            // tanh(z) = ( e^(2z) - 1)/(e^(2z) + 1)
++            assert!(close((c.scale(2.0).exp() - _1_0i)/(c.scale(2.0).exp() + _1_0i), c.tanh()));
++        }
++    }
++
++    // Test both a + b and a += b
++    macro_rules! test_a_op_b {
++        ($a:ident + $b:expr, $answer:expr) => {
++            assert_eq!($a + $b, $answer);
++            assert_eq!({ let mut x = $a; x += $b; x}, $answer);
++        };
++        ($a:ident - $b:expr, $answer:expr) => {
++            assert_eq!($a - $b, $answer);
++            assert_eq!({ let mut x = $a; x -= $b; x}, $answer);
++        };
++        ($a:ident * $b:expr, $answer:expr) => {
++            assert_eq!($a * $b, $answer);
++            assert_eq!({ let mut x = $a; x *= $b; x}, $answer);
++        };
++        ($a:ident / $b:expr, $answer:expr) => {
++            assert_eq!($a / $b, $answer);
++            assert_eq!({ let mut x = $a; x /= $b; x}, $answer);
++        };
++    }
++
++    // Test both a + b and a + &b
++    macro_rules! test_op {
++        ($a:ident $op:tt $b:expr, $answer:expr) => {
++            test_a_op_b!($a $op $b, $answer);
++            test_a_op_b!($a $op &$b, $answer);
++        }
++    }
++
++    mod complex_arithmetic {
++        use super::{_0_0i, _1_0i, _1_1i, _0_1i, _neg1_1i, _05_05i, all_consts};
++        use traits::Zero;
++
++        #[test]
++        fn test_add() {
++            test_op!(_05_05i + _05_05i, _1_1i);
++            test_op!(_0_1i + _1_0i, _1_1i);
++            test_op!(_1_0i + _neg1_1i, _0_1i);
++
++            for &c in all_consts.iter() {
++                test_op!(_0_0i + c, c);
++                test_op!(c + _0_0i, c);
++            }
++        }
++
++        #[test]
++        fn test_sub() {
++            test_op!(_05_05i - _05_05i, _0_0i);
++            test_op!(_0_1i - _1_0i, _neg1_1i);
++            test_op!(_0_1i - _neg1_1i, _1_0i);
++
++            for &c in all_consts.iter() {
++                test_op!(c - _0_0i, c);
++                test_op!(c - c, _0_0i);
++            }
++        }
++
++        #[test]
++        fn test_mul() {
++            test_op!(_05_05i * _05_05i, _0_1i.unscale(2.0));
++            test_op!(_1_1i * _0_1i, _neg1_1i);
++
++            // i^2 & i^4
++            test_op!(_0_1i * _0_1i, -_1_0i);
++            assert_eq!(_0_1i * _0_1i * _0_1i * _0_1i, _1_0i);
++
++            for &c in all_consts.iter() {
++                test_op!(c * _1_0i, c);
++                test_op!(_1_0i * c, c);
++            }
++        }
++
++        #[test]
++        fn test_div() {
++            test_op!(_neg1_1i / _0_1i, _1_1i);
++            for &c in all_consts.iter() {
++                if c != Zero::zero() {
++                    test_op!(c / c, _1_0i);
++                }
++            }
++        }
++
++        #[test]
++        fn test_neg() {
++            assert_eq!(-_1_0i + _0_1i, _neg1_1i);
++            assert_eq!((-_0_1i) * _0_1i, _1_0i);
++            for &c in all_consts.iter() {
++                assert_eq!(-(-c), c);
++            }
++        }
++    }
++
++    mod real_arithmetic {
++        use super::super::Complex;
++        use super::_4_2i;
++
++        #[test]
++        fn test_add() {
++            test_op!(_4_2i + 0.5, Complex::new(4.5, 2.0));
++            assert_eq!(0.5 + _4_2i, Complex::new(4.5, 2.0));
++        }
++
++        #[test]
++        fn test_sub() {
++            test_op!(_4_2i - 0.5, Complex::new(3.5, 2.0));
++            assert_eq!(0.5 - _4_2i, Complex::new(-3.5, -2.0));
++        }
++
++        #[test]
++        fn test_mul() {
++            assert_eq!(_4_2i * 0.5, Complex::new(2.0, 1.0));
++            assert_eq!(0.5 * _4_2i, Complex::new(2.0, 1.0));
++        }
++
++        #[test]
++        fn test_div() {
++            assert_eq!(_4_2i / 0.5, Complex::new(8.0, 4.0));
++            assert_eq!(0.5 / _4_2i, Complex::new(0.1, -0.05));
++        }
++    }
++
++    #[test]
++    fn test_to_string() {
++        fn test(c : Complex64, s: String) {
++            assert_eq!(c.to_string(), s);
++        }
++        test(_0_0i, "0+0i".to_string());
++        test(_1_0i, "1+0i".to_string());
++        test(_0_1i, "0+1i".to_string());
++        test(_1_1i, "1+1i".to_string());
++        test(_neg1_1i, "-1+1i".to_string());
++        test(-_neg1_1i, "1-1i".to_string());
++        test(_05_05i, "0.5+0.5i".to_string());
++    }
++
++    #[test]
++    fn test_string_formatting() {
++        let a = Complex::new(1.23456, 123.456);
++        assert_eq!(format!("{}", a), "1.23456+123.456i");
++        assert_eq!(format!("{:.2}", a), "1.23+123.46i");
++        assert_eq!(format!("{:.2e}", a), "1.23e0+1.23e2i");
++        assert_eq!(format!("{:+20.2E}", a), "     +1.23E0+1.23E2i");
++
++        let b = Complex::new(0x80, 0xff);
++        assert_eq!(format!("{:X}", b), "80+FFi");
++        assert_eq!(format!("{:#x}", b), "0x80+0xffi");
++        assert_eq!(format!("{:+#b}", b), "+0b10000000+0b11111111i");
++        assert_eq!(format!("{:+#16o}", b), "   +0o200+0o377i");
++
++        let c = Complex::new(-10, -10000);
++        assert_eq!(format!("{}", c), "-10-10000i");
++        assert_eq!(format!("{:16}", c), "      -10-10000i");
++    }
++
++    #[test]
++    fn test_hash() {
++        let a = Complex::new(0i32, 0i32);
++        let b = Complex::new(1i32, 0i32);
++        let c = Complex::new(0i32, 1i32);
++        assert!(::hash(&a) != ::hash(&b));
++        assert!(::hash(&b) != ::hash(&c));
++        assert!(::hash(&c) != ::hash(&a));
++    }
++
++    #[test]
++    fn test_hashset() {
++        use std::collections::HashSet;
++        let a = Complex::new(0i32, 0i32);
++        let b = Complex::new(1i32, 0i32);
++        let c = Complex::new(0i32, 1i32);
++
++        let set: HashSet<_> = [a, b, c].iter().cloned().collect();
++        assert!(set.contains(&a));
++        assert!(set.contains(&b));
++        assert!(set.contains(&c));
++        assert!(!set.contains(&(a + b + c)));
++    }
++
++    #[test]
++    fn test_is_nan() {
++        assert!(!_1_1i.is_nan());
++        let a = Complex::new(f64::NAN, f64::NAN);
++        assert!(a.is_nan());
++    }
++
++    #[test]
++    fn test_is_nan_special_cases() {
++        let a = Complex::new(0f64, f64::NAN);
++        let b = Complex::new(f64::NAN, 0f64);
++        assert!(a.is_nan());
++        assert!(b.is_nan());
++    }
++
++    #[test]
++    fn test_is_infinite() {
++        let a = Complex::new(2f64, f64::INFINITY);
++        assert!(a.is_infinite());
++    }
++
++    #[test]
++    fn test_is_finite() {
++        assert!(_1_1i.is_finite())
++    }
++
++    #[test]
++    fn test_is_normal() {
++        let a = Complex::new(0f64, f64::NAN);
++        let b = Complex::new(2f64, f64::INFINITY);
++        assert!(!a.is_normal());
++        assert!(!b.is_normal());
++        assert!(_1_1i.is_normal());
++    }
++
++    #[test]
++    fn test_from_str() {
++        fn test(z: Complex64, s: &str) {
++            assert_eq!(FromStr::from_str(s), Ok(z));
++        }
++        test(_0_0i, "0 + 0i");
++        test(_0_0i, "0+0j");
++        test(_0_0i, "0 - 0j");
++        test(_0_0i, "0-0i");
++        test(_0_0i, "0i + 0");
++        test(_0_0i, "0");
++        test(_0_0i, "-0");
++        test(_0_0i, "0i");
++        test(_0_0i, "0j");
++        test(_0_0i, "+0j");
++        test(_0_0i, "-0i");
++
++        test(_1_0i, "1 + 0i");
++        test(_1_0i, "1+0j");
++        test(_1_0i, "1 - 0j");
++        test(_1_0i, "+1-0i");
++        test(_1_0i, "-0j+1");
++        test(_1_0i, "1");
++
++        test(_1_1i, "1 + i");
++        test(_1_1i, "1+j");
++        test(_1_1i, "1 + 1j");
++        test(_1_1i, "1+1i");
++        test(_1_1i, "i + 1");
++        test(_1_1i, "1i+1");
++        test(_1_1i, "+j+1");
++
++        test(_0_1i, "0 + i");
++        test(_0_1i, "0+j");
++        test(_0_1i, "-0 + j");
++        test(_0_1i, "-0+i");
++        test(_0_1i, "0 + 1i");
++        test(_0_1i, "0+1j");
++        test(_0_1i, "-0 + 1j");
++        test(_0_1i, "-0+1i");
++        test(_0_1i, "j + 0");
++        test(_0_1i, "i");
++        test(_0_1i, "j");
++        test(_0_1i, "1j");
++
++        test(_neg1_1i, "-1 + i");
++        test(_neg1_1i, "-1+j");
++        test(_neg1_1i, "-1 + 1j");
++        test(_neg1_1i, "-1+1i");
++        test(_neg1_1i, "1i-1");
++        test(_neg1_1i, "j + -1");
++
++        test(_05_05i, "0.5 + 0.5i");
++        test(_05_05i, "0.5+0.5j");
++        test(_05_05i, "5e-1+0.5j");
++        test(_05_05i, "5E-1 + 0.5j");
++        test(_05_05i, "5E-1i + 0.5");
++        test(_05_05i, "0.05e+1j + 50E-2");
++    }
++
++    #[test]
++    fn test_from_str_fail() {
++        fn test(s: &str) {
++            let complex: Result<Complex64, _> = FromStr::from_str(s);
++            assert!(complex.is_err());
++        }
++        test("foo");
++        test("6E");
++        test("0 + 2.718");
++        test("1 - -2i");
++        test("314e-2ij");
++        test("4.3j - i");
++        test("1i - 2i");
++        test("+ 1 - 3.0i");
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..272169b066d9f547802c1e154588d402b186fc17
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"d1452e8b06e448a07f0e6ebb0bb1d92b8890eea63288c0b627331d53514d0fba"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5a928b4afed00f523ad897e7157793465941ac21
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++[package]
++authors = ["The Rust Project Developers"]
++description = "Integer traits and functions"
++documentation = "http://rust-num.github.io/num"
++homepage = "https://github.com/rust-num/num"
++keywords = ["mathematics", "numerics"]
++categories = [ "algorithms", "science" ]
++license = "MIT/Apache-2.0"
++repository = "https://github.com/rust-num/num"
++name = "num-integer"
++version = "0.1.35"
++
++[dependencies.num-traits]
++path = "../traits"
++version = "0.1.32"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16fe87b06e802f094b3fbb0894b137bca2b16ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++                              Apache License
++                        Version 2.0, January 2004
++                     http://www.apache.org/licenses/
++
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++1. Definitions.
++
++   "License" shall mean the terms and conditions for use, reproduction,
++   and distribution as defined by Sections 1 through 9 of this document.
++
++   "Licensor" shall mean the copyright owner or entity authorized by
++   the copyright owner that is granting the License.
++
++   "Legal Entity" shall mean the union of the acting entity and all
++   other entities that control, are controlled by, or are under common
++   control with that entity. For the purposes of this definition,
++   "control" means (i) the power, direct or indirect, to cause the
++   direction or management of such entity, whether by contract or
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the
++   outstanding shares, or (iii) beneficial ownership of such entity.
++
++   "You" (or "Your") shall mean an individual or Legal Entity
++   exercising permissions granted by this License.
++
++   "Source" form shall mean the preferred form for making modifications,
++   including but not limited to software source code, documentation
++   source, and configuration files.
++
++   "Object" form shall mean any form resulting from mechanical
++   transformation or translation of a Source form, including but
++   not limited to compiled object code, generated documentation,
++   and conversions to other media types.
++
++   "Work" shall mean the work of authorship, whether in Source or
++   Object form, made available under the License, as indicated by a
++   copyright notice that is included in or attached to the work
++   (an example is provided in the Appendix below).
++
++   "Derivative Works" shall mean any work, whether in Source or Object
++   form, that is based on (or derived from) the Work and for which the
++   editorial revisions, annotations, elaborations, or other modifications
++   represent, as a whole, an original work of authorship. For the purposes
++   of this License, Derivative Works shall not include works that remain
++   separable from, or merely link (or bind by name) to the interfaces of,
++   the Work and Derivative Works thereof.
++
++   "Contribution" shall mean any work of authorship, including
++   the original version of the Work and any modifications or additions
++   to that Work or Derivative Works thereof, that is intentionally
++   submitted to Licensor for inclusion in the Work by the copyright owner
++   or by an individual or Legal Entity authorized to submit on behalf of
++   the copyright owner. For the purposes of this definition, "submitted"
++   means any form of electronic, verbal, or written communication sent
++   to the Licensor or its representatives, including but not limited to
++   communication on electronic mailing lists, source code control systems,
++   and issue tracking systems that are managed by, or on behalf of, the
++   Licensor for the purpose of discussing and improving the Work, but
++   excluding communication that is conspicuously marked or otherwise
++   designated in writing by the copyright owner as "Not a Contribution."
++
++   "Contributor" shall mean Licensor and any individual or Legal Entity
++   on behalf of whom a Contribution has been received by Licensor and
++   subsequently incorporated within the Work.
++
++2. Grant of Copyright License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   copyright license to reproduce, prepare Derivative Works of,
++   publicly display, publicly perform, sublicense, and distribute the
++   Work and such Derivative Works in Source or Object form.
++
++3. Grant of Patent License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   (except as stated in this section) patent license to make, have made,
++   use, offer to sell, sell, import, and otherwise transfer the Work,
++   where such license applies only to those patent claims licensable
++   by such Contributor that are necessarily infringed by their
++   Contribution(s) alone or by combination of their Contribution(s)
++   with the Work to which such Contribution(s) was submitted. If You
++   institute patent litigation against any entity (including a
++   cross-claim or counterclaim in a lawsuit) alleging that the Work
++   or a Contribution incorporated within the Work constitutes direct
++   or contributory patent infringement, then any patent licenses
++   granted to You under this License for that Work shall terminate
++   as of the date such litigation is filed.
++
++4. Redistribution. You may reproduce and distribute copies of the
++   Work or Derivative Works thereof in any medium, with or without
++   modifications, and in Source or Object form, provided that You
++   meet the following conditions:
++
++   (a) You must give any other recipients of the Work or
++       Derivative Works a copy of this License; and
++
++   (b) You must cause any modified files to carry prominent notices
++       stating that You changed the files; and
++
++   (c) You must retain, in the Source form of any Derivative Works
++       that You distribute, all copyright, patent, trademark, and
++       attribution notices from the Source form of the Work,
++       excluding those notices that do not pertain to any part of
++       the Derivative Works; and
++
++   (d) If the Work includes a "NOTICE" text file as part of its
++       distribution, then any Derivative Works that You distribute must
++       include a readable copy of the attribution notices contained
++       within such NOTICE file, excluding those notices that do not
++       pertain to any part of the Derivative Works, in at least one
++       of the following places: within a NOTICE text file distributed
++       as part of the Derivative Works; within the Source form or
++       documentation, if provided along with the Derivative Works; or,
++       within a display generated by the Derivative Works, if and
++       wherever such third-party notices normally appear. The contents
++       of the NOTICE file are for informational purposes only and
++       do not modify the License. You may add Your own attribution
++       notices within Derivative Works that You distribute, alongside
++       or as an addendum to the NOTICE text from the Work, provided
++       that such additional attribution notices cannot be construed
++       as modifying the License.
++
++   You may add Your own copyright statement to Your modifications and
++   may provide additional or different license terms and conditions
++   for use, reproduction, or distribution of Your modifications, or
++   for any such Derivative Works as a whole, provided Your use,
++   reproduction, and distribution of the Work otherwise complies with
++   the conditions stated in this License.
++
++5. Submission of Contributions. Unless You explicitly state otherwise,
++   any Contribution intentionally submitted for inclusion in the Work
++   by You to the Licensor shall be under the terms and conditions of
++   this License, without any additional terms or conditions.
++   Notwithstanding the above, nothing herein shall supersede or modify
++   the terms of any separate license agreement you may have executed
++   with Licensor regarding such Contributions.
++
++6. Trademarks. This License does not grant permission to use the trade
++   names, trademarks, service marks, or product names of the Licensor,
++   except as required for reasonable and customary use in describing the
++   origin of the Work and reproducing the content of the NOTICE file.
++
++7. Disclaimer of Warranty. Unless required by applicable law or
++   agreed to in writing, Licensor provides the Work (and each
++   Contributor provides its Contributions) on an "AS IS" BASIS,
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++   implied, including, without limitation, any warranties or conditions
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++   PARTICULAR PURPOSE. You are solely responsible for determining the
++   appropriateness of using or redistributing the Work and assume any
++   risks associated with Your exercise of permissions under this License.
++
++8. Limitation of Liability. In no event and under no legal theory,
++   whether in tort (including negligence), contract, or otherwise,
++   unless required by applicable law (such as deliberate and grossly
++   negligent acts) or agreed to in writing, shall any Contributor be
++   liable to You for damages, including any direct, indirect, special,
++   incidental, or consequential damages of any character arising as a
++   result of this License or out of the use or inability to use the
++   Work (including but not limited to damages for loss of goodwill,
++   work stoppage, computer failure or malfunction, or any and all
++   other commercial damages or losses), even if such Contributor
++   has been advised of the possibility of such damages.
++
++9. Accepting Warranty or Additional Liability. While redistributing
++   the Work or Derivative Works thereof, You may choose to offer,
++   and charge a fee for, acceptance of support, warranty, indemnity,
++   or other liability obligations and/or rights consistent with this
++   License. However, in accepting such obligations, You may act only
++   on Your own behalf and on Your sole responsibility, not on behalf
++   of any other Contributor, and only if You agree to indemnify,
++   defend, and hold each Contributor harmless for any liability
++   incurred by, or claims asserted against, such Contributor by reason
++   of your accepting any such warranty or additional liability.
++
++END OF TERMS AND CONDITIONS
++
++APPENDIX: How to apply the Apache License to your work.
++
++   To apply the Apache License to your work, attach the following
++   boilerplate notice, with the fields enclosed by brackets "[]"
++   replaced with your own identifying information. (Don't include
++   the brackets!)  The text should be enclosed in the appropriate
++   comment syntax for the file format. We also recommend that a
++   file or class name and description of purpose be included on the
++   same "printed page" as the copyright notice for easier
++   identification within third-party archives.
++
++Copyright [yyyy] [name of copyright owner]
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++      http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39d4bdb5acd313c1a92dbeaa1c379aaf0596a315
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2014 The Rust Project Developers
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4d85a390ddf91dd20fe30c47c1249dbde83c7f9a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,988 @@@
++// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Integer trait and functions.
++#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png",
++       html_favicon_url = "https://rust-num.github.io/num/favicon.ico",
++       html_root_url = "https://rust-num.github.io/num/",
++       html_playground_url = "http://play.integer32.com/")]
++
++extern crate num_traits as traits;
++
++use std::ops::Add;
++
++use traits::{Num, Signed};
++
++pub trait Integer: Sized + Num + PartialOrd + Ord + Eq {
++    /// Floored integer division.
++    ///
++    /// # Examples
++    ///
++    /// ~~~
++    /// # use num_integer::Integer;
++    /// assert!(( 8).div_floor(& 3) ==  2);
++    /// assert!(( 8).div_floor(&-3) == -3);
++    /// assert!((-8).div_floor(& 3) == -3);
++    /// assert!((-8).div_floor(&-3) ==  2);
++    ///
++    /// assert!(( 1).div_floor(& 2) ==  0);
++    /// assert!(( 1).div_floor(&-2) == -1);
++    /// assert!((-1).div_floor(& 2) == -1);
++    /// assert!((-1).div_floor(&-2) ==  0);
++    /// ~~~
++    fn div_floor(&self, other: &Self) -> Self;
++
++    /// Floored integer modulo, satisfying:
++    ///
++    /// ~~~
++    /// # use num_integer::Integer;
++    /// # let n = 1; let d = 1;
++    /// assert!(n.div_floor(&d) * d + n.mod_floor(&d) == n)
++    /// ~~~
++    ///
++    /// # Examples
++    ///
++    /// ~~~
++    /// # use num_integer::Integer;
++    /// assert!(( 8).mod_floor(& 3) ==  2);
++    /// assert!(( 8).mod_floor(&-3) == -1);
++    /// assert!((-8).mod_floor(& 3) ==  1);
++    /// assert!((-8).mod_floor(&-3) == -2);
++    ///
++    /// assert!(( 1).mod_floor(& 2) ==  1);
++    /// assert!(( 1).mod_floor(&-2) == -1);
++    /// assert!((-1).mod_floor(& 2) ==  1);
++    /// assert!((-1).mod_floor(&-2) == -1);
++    /// ~~~
++    fn mod_floor(&self, other: &Self) -> Self;
++
++    /// Greatest Common Divisor (GCD).
++    ///
++    /// # Examples
++    ///
++    /// ~~~
++    /// # use num_integer::Integer;
++    /// assert_eq!(6.gcd(&8), 2);
++    /// assert_eq!(7.gcd(&3), 1);
++    /// ~~~
++    fn gcd(&self, other: &Self) -> Self;
++
++    /// Lowest Common Multiple (LCM).
++    ///
++    /// # Examples
++    ///
++    /// ~~~
++    /// # use num_integer::Integer;
++    /// assert_eq!(7.lcm(&3), 21);
++    /// assert_eq!(2.lcm(&4), 4);
++    /// ~~~
++    fn lcm(&self, other: &Self) -> Self;
++
++    /// Deprecated, use `is_multiple_of` instead.
++    fn divides(&self, other: &Self) -> bool;
++
++    /// Returns `true` if `other` is a multiple of `self`.
++    ///
++    /// # Examples
++    ///
++    /// ~~~
++    /// # use num_integer::Integer;
++    /// assert_eq!(9.is_multiple_of(&3), true);
++    /// assert_eq!(3.is_multiple_of(&9), false);
++    /// ~~~
++    fn is_multiple_of(&self, other: &Self) -> bool;
++
++    /// Returns `true` if the number is even.
++    ///
++    /// # Examples
++    ///
++    /// ~~~
++    /// # use num_integer::Integer;
++    /// assert_eq!(3.is_even(), false);
++    /// assert_eq!(4.is_even(), true);
++    /// ~~~
++    fn is_even(&self) -> bool;
++
++    /// Returns `true` if the number is odd.
++    ///
++    /// # Examples
++    ///
++    /// ~~~
++    /// # use num_integer::Integer;
++    /// assert_eq!(3.is_odd(), true);
++    /// assert_eq!(4.is_odd(), false);
++    /// ~~~
++    fn is_odd(&self) -> bool;
++
++    /// Simultaneous truncated integer division and modulus.
++    /// Returns `(quotient, remainder)`.
++    ///
++    /// # Examples
++    ///
++    /// ~~~
++    /// # use num_integer::Integer;
++    /// assert_eq!(( 8).div_rem( &3), ( 2,  2));
++    /// assert_eq!(( 8).div_rem(&-3), (-2,  2));
++    /// assert_eq!((-8).div_rem( &3), (-2, -2));
++    /// assert_eq!((-8).div_rem(&-3), ( 2, -2));
++    ///
++    /// assert_eq!(( 1).div_rem( &2), ( 0,  1));
++    /// assert_eq!(( 1).div_rem(&-2), ( 0,  1));
++    /// assert_eq!((-1).div_rem( &2), ( 0, -1));
++    /// assert_eq!((-1).div_rem(&-2), ( 0, -1));
++    /// ~~~
++    #[inline]
++    fn div_rem(&self, other: &Self) -> (Self, Self);
++
++    /// Simultaneous floored integer division and modulus.
++    /// Returns `(quotient, remainder)`.
++    ///
++    /// # Examples
++    ///
++    /// ~~~
++    /// # use num_integer::Integer;
++    /// assert_eq!(( 8).div_mod_floor( &3), ( 2,  2));
++    /// assert_eq!(( 8).div_mod_floor(&-3), (-3, -1));
++    /// assert_eq!((-8).div_mod_floor( &3), (-3,  1));
++    /// assert_eq!((-8).div_mod_floor(&-3), ( 2, -2));
++    ///
++    /// assert_eq!(( 1).div_mod_floor( &2), ( 0,  1));
++    /// assert_eq!(( 1).div_mod_floor(&-2), (-1, -1));
++    /// assert_eq!((-1).div_mod_floor( &2), (-1,  1));
++    /// assert_eq!((-1).div_mod_floor(&-2), ( 0, -1));
++    /// ~~~
++    fn div_mod_floor(&self, other: &Self) -> (Self, Self) {
++        (self.div_floor(other), self.mod_floor(other))
++    }
++}
++
++/// Simultaneous integer division and modulus
++#[inline]
++pub fn div_rem<T: Integer>(x: T, y: T) -> (T, T) {
++    x.div_rem(&y)
++}
++/// Floored integer division
++#[inline]
++pub fn div_floor<T: Integer>(x: T, y: T) -> T {
++    x.div_floor(&y)
++}
++/// Floored integer modulus
++#[inline]
++pub fn mod_floor<T: Integer>(x: T, y: T) -> T {
++    x.mod_floor(&y)
++}
++/// Simultaneous floored integer division and modulus
++#[inline]
++pub fn div_mod_floor<T: Integer>(x: T, y: T) -> (T, T) {
++    x.div_mod_floor(&y)
++}
++
++/// Calculates the Greatest Common Divisor (GCD) of the number and `other`. The
++/// result is always positive.
++#[inline(always)]
++pub fn gcd<T: Integer>(x: T, y: T) -> T {
++    x.gcd(&y)
++}
++/// Calculates the Lowest Common Multiple (LCM) of the number and `other`.
++#[inline(always)]
++pub fn lcm<T: Integer>(x: T, y: T) -> T {
++    x.lcm(&y)
++}
++
++macro_rules! impl_integer_for_isize {
++    ($T:ty, $test_mod:ident) => (
++        impl Integer for $T {
++            /// Floored integer division
++            #[inline]
++            fn div_floor(&self, other: &Self) -> Self {
++                // Algorithm from [Daan Leijen. _Division and Modulus for Computer Scientists_,
++                // December 2001](http://research.microsoft.com/pubs/151917/divmodnote-letter.pdf)
++                match self.div_rem(other) {
++                    (d, r) if (r > 0 && *other < 0)
++                           || (r < 0 && *other > 0) => d - 1,
++                    (d, _)                          => d,
++                }
++            }
++
++            /// Floored integer modulo
++            #[inline]
++            fn mod_floor(&self, other: &Self) -> Self {
++                // Algorithm from [Daan Leijen. _Division and Modulus for Computer Scientists_,
++                // December 2001](http://research.microsoft.com/pubs/151917/divmodnote-letter.pdf)
++                match *self % *other {
++                    r if (r > 0 && *other < 0)
++                      || (r < 0 && *other > 0) => r + *other,
++                    r                          => r,
++                }
++            }
++
++            /// Calculates `div_floor` and `mod_floor` simultaneously
++            #[inline]
++            fn div_mod_floor(&self, other: &Self) -> (Self, Self) {
++                // Algorithm from [Daan Leijen. _Division and Modulus for Computer Scientists_,
++                // December 2001](http://research.microsoft.com/pubs/151917/divmodnote-letter.pdf)
++                match self.div_rem(other) {
++                    (d, r) if (r > 0 && *other < 0)
++                           || (r < 0 && *other > 0) => (d - 1, r + *other),
++                    (d, r)                          => (d, r),
++                }
++            }
++
++            /// Calculates the Greatest Common Divisor (GCD) of the number and
++            /// `other`. The result is always positive.
++            #[inline]
++            fn gcd(&self, other: &Self) -> Self {
++                // Use Stein's algorithm
++                let mut m = *self;
++                let mut n = *other;
++                if m == 0 || n == 0 { return (m | n).abs() }
++
++                // find common factors of 2
++                let shift = (m | n).trailing_zeros();
++
++                // The algorithm needs positive numbers, but the minimum value
++                // can't be represented as a positive one.
++                // It's also a power of two, so the gcd can be
++                // calculated by bitshifting in that case
++
++                // Assuming two's complement, the number created by the shift
++                // is positive for all numbers except gcd = abs(min value)
++                // The call to .abs() causes a panic in debug mode
++                if m == Self::min_value() || n == Self::min_value() {
++                    return (1 << shift).abs()
++                }
++
++                // guaranteed to be positive now, rest like unsigned algorithm
++                m = m.abs();
++                n = n.abs();
++
++                // divide n and m by 2 until odd
++                // m inside loop
++                n >>= n.trailing_zeros();
++
++                while m != 0 {
++                    m >>= m.trailing_zeros();
++                    if n > m { ::std::mem::swap(&mut n, &mut m) }
++                    m -= n;
++                }
++
++                n << shift
++            }
++
++            /// Calculates the Lowest Common Multiple (LCM) of the number and
++            /// `other`.
++            #[inline]
++            fn lcm(&self, other: &Self) -> Self {
++                // should not have to recalculate abs
++                (*self * (*other / self.gcd(other))).abs()
++            }
++
++            /// Deprecated, use `is_multiple_of` instead.
++            #[inline]
++            fn divides(&self, other: &Self) -> bool {
++                self.is_multiple_of(other)
++            }
++
++            /// Returns `true` if the number is a multiple of `other`.
++            #[inline]
++            fn is_multiple_of(&self, other: &Self) -> bool {
++                *self % *other == 0
++            }
++
++            /// Returns `true` if the number is divisible by `2`
++            #[inline]
++            fn is_even(&self) -> bool { (*self) & 1 == 0 }
++
++            /// Returns `true` if the number is not divisible by `2`
++            #[inline]
++            fn is_odd(&self) -> bool { !self.is_even() }
++
++            /// Simultaneous truncated integer division and modulus.
++            #[inline]
++            fn div_rem(&self, other: &Self) -> (Self, Self) {
++                (*self / *other, *self % *other)
++            }
++        }
++
++        #[cfg(test)]
++        mod $test_mod {
++            use Integer;
++
++            /// Checks that the division rule holds for:
++            ///
++            /// - `n`: numerator (dividend)
++            /// - `d`: denominator (divisor)
++            /// - `qr`: quotient and remainder
++            #[cfg(test)]
++            fn test_division_rule((n,d): ($T, $T), (q,r): ($T, $T)) {
++                assert_eq!(d * q + r, n);
++            }
++
++            #[test]
++            fn test_div_rem() {
++                fn test_nd_dr(nd: ($T,$T), qr: ($T,$T)) {
++                    let (n,d) = nd;
++                    let separate_div_rem = (n / d, n % d);
++                    let combined_div_rem = n.div_rem(&d);
++
++                    assert_eq!(separate_div_rem, qr);
++                    assert_eq!(combined_div_rem, qr);
++
++                    test_division_rule(nd, separate_div_rem);
++                    test_division_rule(nd, combined_div_rem);
++                }
++
++                test_nd_dr(( 8,  3), ( 2,  2));
++                test_nd_dr(( 8, -3), (-2,  2));
++                test_nd_dr((-8,  3), (-2, -2));
++                test_nd_dr((-8, -3), ( 2, -2));
++
++                test_nd_dr(( 1,  2), ( 0,  1));
++                test_nd_dr(( 1, -2), ( 0,  1));
++                test_nd_dr((-1,  2), ( 0, -1));
++                test_nd_dr((-1, -2), ( 0, -1));
++            }
++
++            #[test]
++            fn test_div_mod_floor() {
++                fn test_nd_dm(nd: ($T,$T), dm: ($T,$T)) {
++                    let (n,d) = nd;
++                    let separate_div_mod_floor = (n.div_floor(&d), n.mod_floor(&d));
++                    let combined_div_mod_floor = n.div_mod_floor(&d);
++
++                    assert_eq!(separate_div_mod_floor, dm);
++                    assert_eq!(combined_div_mod_floor, dm);
++
++                    test_division_rule(nd, separate_div_mod_floor);
++                    test_division_rule(nd, combined_div_mod_floor);
++                }
++
++                test_nd_dm(( 8,  3), ( 2,  2));
++                test_nd_dm(( 8, -3), (-3, -1));
++                test_nd_dm((-8,  3), (-3,  1));
++                test_nd_dm((-8, -3), ( 2, -2));
++
++                test_nd_dm(( 1,  2), ( 0,  1));
++                test_nd_dm(( 1, -2), (-1, -1));
++                test_nd_dm((-1,  2), (-1,  1));
++                test_nd_dm((-1, -2), ( 0, -1));
++            }
++
++            #[test]
++            fn test_gcd() {
++                assert_eq!((10 as $T).gcd(&2), 2 as $T);
++                assert_eq!((10 as $T).gcd(&3), 1 as $T);
++                assert_eq!((0 as $T).gcd(&3), 3 as $T);
++                assert_eq!((3 as $T).gcd(&3), 3 as $T);
++                assert_eq!((56 as $T).gcd(&42), 14 as $T);
++                assert_eq!((3 as $T).gcd(&-3), 3 as $T);
++                assert_eq!((-6 as $T).gcd(&3), 3 as $T);
++                assert_eq!((-4 as $T).gcd(&-2), 2 as $T);
++            }
++
++            #[test]
++            fn test_gcd_cmp_with_euclidean() {
++                fn euclidean_gcd(mut m: $T, mut n: $T) -> $T {
++                    while m != 0 {
++                        ::std::mem::swap(&mut m, &mut n);
++                        m %= n;
++                    }
++
++                    n.abs()
++                }
++
++                // gcd(-128, b) = 128 is not representable as positive value
++                // for i8
++                for i in -127..127 {
++                    for j in -127..127 {
++                        assert_eq!(euclidean_gcd(i,j), i.gcd(&j));
++                    }
++                }
++
++                // last value
++                // FIXME: Use inclusive ranges for above loop when implemented
++                let i = 127;
++                for j in -127..127 {
++                    assert_eq!(euclidean_gcd(i,j), i.gcd(&j));
++                }
++                assert_eq!(127.gcd(&127), 127);
++            }
++
++            #[test]
++            fn test_gcd_min_val() {
++                let min = <$T>::min_value();
++                let max = <$T>::max_value();
++                let max_pow2 = max / 2 + 1;
++                assert_eq!(min.gcd(&max), 1 as $T);
++                assert_eq!(max.gcd(&min), 1 as $T);
++                assert_eq!(min.gcd(&max_pow2), max_pow2);
++                assert_eq!(max_pow2.gcd(&min), max_pow2);
++                assert_eq!(min.gcd(&42), 2 as $T);
++                assert_eq!((42 as $T).gcd(&min), 2 as $T);
++            }
++
++            #[test]
++            #[should_panic]
++            fn test_gcd_min_val_min_val() {
++                let min = <$T>::min_value();
++                assert!(min.gcd(&min) >= 0);
++            }
++
++            #[test]
++            #[should_panic]
++            fn test_gcd_min_val_0() {
++                let min = <$T>::min_value();
++                assert!(min.gcd(&0) >= 0);
++            }
++
++            #[test]
++            #[should_panic]
++            fn test_gcd_0_min_val() {
++                let min = <$T>::min_value();
++                assert!((0 as $T).gcd(&min) >= 0);
++            }
++
++            #[test]
++            fn test_lcm() {
++                assert_eq!((1 as $T).lcm(&0), 0 as $T);
++                assert_eq!((0 as $T).lcm(&1), 0 as $T);
++                assert_eq!((1 as $T).lcm(&1), 1 as $T);
++                assert_eq!((-1 as $T).lcm(&1), 1 as $T);
++                assert_eq!((1 as $T).lcm(&-1), 1 as $T);
++                assert_eq!((-1 as $T).lcm(&-1), 1 as $T);
++                assert_eq!((8 as $T).lcm(&9), 72 as $T);
++                assert_eq!((11 as $T).lcm(&5), 55 as $T);
++            }
++
++            #[test]
++            fn test_even() {
++                assert_eq!((-4 as $T).is_even(), true);
++                assert_eq!((-3 as $T).is_even(), false);
++                assert_eq!((-2 as $T).is_even(), true);
++                assert_eq!((-1 as $T).is_even(), false);
++                assert_eq!((0 as $T).is_even(), true);
++                assert_eq!((1 as $T).is_even(), false);
++                assert_eq!((2 as $T).is_even(), true);
++                assert_eq!((3 as $T).is_even(), false);
++                assert_eq!((4 as $T).is_even(), true);
++            }
++
++            #[test]
++            fn test_odd() {
++                assert_eq!((-4 as $T).is_odd(), false);
++                assert_eq!((-3 as $T).is_odd(), true);
++                assert_eq!((-2 as $T).is_odd(), false);
++                assert_eq!((-1 as $T).is_odd(), true);
++                assert_eq!((0 as $T).is_odd(), false);
++                assert_eq!((1 as $T).is_odd(), true);
++                assert_eq!((2 as $T).is_odd(), false);
++                assert_eq!((3 as $T).is_odd(), true);
++                assert_eq!((4 as $T).is_odd(), false);
++            }
++        }
++    )
++}
++
++impl_integer_for_isize!(i8, test_integer_i8);
++impl_integer_for_isize!(i16, test_integer_i16);
++impl_integer_for_isize!(i32, test_integer_i32);
++impl_integer_for_isize!(i64, test_integer_i64);
++impl_integer_for_isize!(isize, test_integer_isize);
++
++macro_rules! impl_integer_for_usize {
++    ($T:ty, $test_mod:ident) => (
++        impl Integer for $T {
++            /// Unsigned integer division. Returns the same result as `div` (`/`).
++            #[inline]
++            fn div_floor(&self, other: &Self) -> Self {
++                *self / *other
++            }
++
++            /// Unsigned integer modulo operation. Returns the same result as `rem` (`%`).
++            #[inline]
++            fn mod_floor(&self, other: &Self) -> Self {
++                *self % *other
++            }
++
++            /// Calculates the Greatest Common Divisor (GCD) of the number and `other`
++            #[inline]
++            fn gcd(&self, other: &Self) -> Self {
++                // Use Stein's algorithm
++                let mut m = *self;
++                let mut n = *other;
++                if m == 0 || n == 0 { return m | n }
++
++                // find common factors of 2
++                let shift = (m | n).trailing_zeros();
++
++                // divide n and m by 2 until odd
++                // m inside loop
++                n >>= n.trailing_zeros();
++
++                while m != 0 {
++                    m >>= m.trailing_zeros();
++                    if n > m { ::std::mem::swap(&mut n, &mut m) }
++                    m -= n;
++                }
++
++                n << shift
++            }
++
++            /// Calculates the Lowest Common Multiple (LCM) of the number and `other`.
++            #[inline]
++            fn lcm(&self, other: &Self) -> Self {
++                *self * (*other / self.gcd(other))
++            }
++
++            /// Deprecated, use `is_multiple_of` instead.
++            #[inline]
++            fn divides(&self, other: &Self) -> bool {
++                self.is_multiple_of(other)
++            }
++
++            /// Returns `true` if the number is a multiple of `other`.
++            #[inline]
++            fn is_multiple_of(&self, other: &Self) -> bool {
++                *self % *other == 0
++            }
++
++            /// Returns `true` if the number is divisible by `2`.
++            #[inline]
++            fn is_even(&self) -> bool {
++                *self % 2 == 0
++            }
++
++            /// Returns `true` if the number is not divisible by `2`.
++            #[inline]
++            fn is_odd(&self) -> bool {
++                !self.is_even()
++            }
++
++            /// Simultaneous truncated integer division and modulus.
++            #[inline]
++            fn div_rem(&self, other: &Self) -> (Self, Self) {
++                (*self / *other, *self % *other)
++            }
++        }
++
++        #[cfg(test)]
++        mod $test_mod {
++            use Integer;
++
++            #[test]
++            fn test_div_mod_floor() {
++                assert_eq!((10 as $T).div_floor(&(3 as $T)), 3 as $T);
++                assert_eq!((10 as $T).mod_floor(&(3 as $T)), 1 as $T);
++                assert_eq!((10 as $T).div_mod_floor(&(3 as $T)), (3 as $T, 1 as $T));
++                assert_eq!((5 as $T).div_floor(&(5 as $T)), 1 as $T);
++                assert_eq!((5 as $T).mod_floor(&(5 as $T)), 0 as $T);
++                assert_eq!((5 as $T).div_mod_floor(&(5 as $T)), (1 as $T, 0 as $T));
++                assert_eq!((3 as $T).div_floor(&(7 as $T)), 0 as $T);
++                assert_eq!((3 as $T).mod_floor(&(7 as $T)), 3 as $T);
++                assert_eq!((3 as $T).div_mod_floor(&(7 as $T)), (0 as $T, 3 as $T));
++            }
++
++            #[test]
++            fn test_gcd() {
++                assert_eq!((10 as $T).gcd(&2), 2 as $T);
++                assert_eq!((10 as $T).gcd(&3), 1 as $T);
++                assert_eq!((0 as $T).gcd(&3), 3 as $T);
++                assert_eq!((3 as $T).gcd(&3), 3 as $T);
++                assert_eq!((56 as $T).gcd(&42), 14 as $T);
++            }
++
++            #[test]
++            fn test_gcd_cmp_with_euclidean() {
++                fn euclidean_gcd(mut m: $T, mut n: $T) -> $T {
++                    while m != 0 {
++                        ::std::mem::swap(&mut m, &mut n);
++                        m %= n;
++                    }
++                    n
++                }
++
++                for i in 0..255 {
++                    for j in 0..255 {
++                        assert_eq!(euclidean_gcd(i,j), i.gcd(&j));
++                    }
++                }
++
++                // last value
++                // FIXME: Use inclusive ranges for above loop when implemented
++                let i = 255;
++                for j in 0..255 {
++                    assert_eq!(euclidean_gcd(i,j), i.gcd(&j));
++                }
++                assert_eq!(255.gcd(&255), 255);
++            }
++
++            #[test]
++            fn test_lcm() {
++                assert_eq!((1 as $T).lcm(&0), 0 as $T);
++                assert_eq!((0 as $T).lcm(&1), 0 as $T);
++                assert_eq!((1 as $T).lcm(&1), 1 as $T);
++                assert_eq!((8 as $T).lcm(&9), 72 as $T);
++                assert_eq!((11 as $T).lcm(&5), 55 as $T);
++                assert_eq!((15 as $T).lcm(&17), 255 as $T);
++            }
++
++            #[test]
++            fn test_is_multiple_of() {
++                assert!((6 as $T).is_multiple_of(&(6 as $T)));
++                assert!((6 as $T).is_multiple_of(&(3 as $T)));
++                assert!((6 as $T).is_multiple_of(&(1 as $T)));
++            }
++
++            #[test]
++            fn test_even() {
++                assert_eq!((0 as $T).is_even(), true);
++                assert_eq!((1 as $T).is_even(), false);
++                assert_eq!((2 as $T).is_even(), true);
++                assert_eq!((3 as $T).is_even(), false);
++                assert_eq!((4 as $T).is_even(), true);
++            }
++
++            #[test]
++            fn test_odd() {
++                assert_eq!((0 as $T).is_odd(), false);
++                assert_eq!((1 as $T).is_odd(), true);
++                assert_eq!((2 as $T).is_odd(), false);
++                assert_eq!((3 as $T).is_odd(), true);
++                assert_eq!((4 as $T).is_odd(), false);
++            }
++        }
++    )
++}
++
++impl_integer_for_usize!(u8, test_integer_u8);
++impl_integer_for_usize!(u16, test_integer_u16);
++impl_integer_for_usize!(u32, test_integer_u32);
++impl_integer_for_usize!(u64, test_integer_u64);
++impl_integer_for_usize!(usize, test_integer_usize);
++
++/// An iterator over binomial coefficients.
++pub struct IterBinomial<T> {
++    a: T,
++    n: T,
++    k: T,
++}
++
++impl<T> IterBinomial<T>
++    where T: Integer,
++{
++    /// For a given n, iterate over all binomial coefficients binomial(n, k), for k=0...n.
++    ///
++    /// Note that this might overflow, depending on `T`. For the primitive
++    /// integer types, the following n are the largest ones for which there will
++    /// be no overflow:
++    ///
++    /// type | n
++    /// -----|---
++    /// u8   | 10
++    /// i8   |  9
++    /// u16  | 18
++    /// i16  | 17
++    /// u32  | 34
++    /// i32  | 33
++    /// u64  | 67
++    /// i64  | 66
++    ///
++    /// For larger n, `T` should be a bigint type.
++    pub fn new(n: T) -> IterBinomial<T> {
++        IterBinomial {
++            k: T::zero(), a: T::one(), n: n
++        }
++    }
++}
++
++impl<T> Iterator for IterBinomial<T>
++    where T: Integer + Clone
++{
++    type Item = T;
++
++    fn next(&mut self) -> Option<T> {
++        if self.k > self.n {
++            return None;
++        }
++        self.a = if !self.k.is_zero() {
++            multiply_and_divide(
++                self.a.clone(),
++                self.n.clone() - self.k.clone() + T::one(),
++                self.k.clone()
++            )
++        } else {
++            T::one()
++        };
++        self.k = self.k.clone() + T::one();
++        Some(self.a.clone())
++    }
++}
++
++/// Calculate r * a / b, avoiding overflows and fractions.
++///
++/// Assumes that b divides r * a evenly.
++fn multiply_and_divide<T: Integer + Clone>(r: T, a: T, b: T) -> T {
++    // See http://blog.plover.com/math/choose-2.html for the idea.
++    let g = gcd(r.clone(), b.clone());
++    r/g.clone() * (a / (b/g))
++}
++
++/// Calculate the binomial coefficient.
++///
++/// Note that this might overflow, depending on `T`. For the primitive integer
++/// types, the following n are the largest ones possible such that there will
++/// be no overflow for any k:
++///
++/// type | n
++/// -----|---
++/// u8   | 10
++/// i8   |  9
++/// u16  | 18
++/// i16  | 17
++/// u32  | 34
++/// i32  | 33
++/// u64  | 67
++/// i64  | 66
++///
++/// For larger n, consider using a bigint type for `T`.
++pub fn binomial<T: Integer + Clone>(mut n: T, k: T) -> T {
++    // See http://blog.plover.com/math/choose.html for the idea.
++    if k > n {
++        return T::zero();
++    }
++    if k > n.clone() - k.clone() {
++        return binomial(n.clone(), n - k);
++    }
++    let mut r = T::one();
++    let mut d = T::one();
++    loop {
++        if d > k {
++            break;
++        }
++        r = multiply_and_divide(r, n.clone(), d.clone());
++        n = n - T::one();
++        d = d + T::one();
++    }
++    r
++}
++
++/// Calculate the multinomial coefficient.
++pub fn multinomial<T: Integer + Clone>(k: &[T]) -> T
++    where for<'a> T: Add<&'a T, Output = T>
++{
++    let mut r = T::one();
++    let mut p = T::zero();
++    for i in k {
++        p = p + i;
++        r = r * binomial(p.clone(), i.clone());
++    }
++    r
++}
++
++#[test]
++fn test_lcm_overflow() {
++    macro_rules! check {
++        ($t:ty, $x:expr, $y:expr, $r:expr) => { {
++            let x: $t = $x;
++            let y: $t = $y;
++            let o = x.checked_mul(y);
++            assert!(o.is_none(),
++                    "sanity checking that {} input {} * {} overflows",
++                    stringify!($t), x, y);
++            assert_eq!(x.lcm(&y), $r);
++            assert_eq!(y.lcm(&x), $r);
++        } }
++    }
++
++    // Original bug (Issue #166)
++    check!(i64, 46656000000000000, 600, 46656000000000000);
++
++    check!(i8, 0x40, 0x04, 0x40);
++    check!(u8, 0x80, 0x02, 0x80);
++    check!(i16, 0x40_00, 0x04, 0x40_00);
++    check!(u16, 0x80_00, 0x02, 0x80_00);
++    check!(i32, 0x4000_0000, 0x04, 0x4000_0000);
++    check!(u32, 0x8000_0000, 0x02, 0x8000_0000);
++    check!(i64, 0x4000_0000_0000_0000, 0x04, 0x4000_0000_0000_0000);
++    check!(u64, 0x8000_0000_0000_0000, 0x02, 0x8000_0000_0000_0000);
++}
++
++#[test]
++fn test_iter_binomial() {
++    macro_rules! check_simple {
++        ($t:ty) => { {
++            let n: $t = 3;
++            let c: Vec<_> = IterBinomial::new(n).collect();
++            let expected = vec![1, 3, 3, 1];
++            assert_eq!(c, expected);
++        } }
++    }
++
++    check_simple!(u8);
++    check_simple!(i8);
++    check_simple!(u16);
++    check_simple!(i16);
++    check_simple!(u32);
++    check_simple!(i32);
++    check_simple!(u64);
++    check_simple!(i64);
++
++    macro_rules! check_binomial {
++        ($t:ty, $n:expr) => { {
++            let n: $t = $n;
++            let c: Vec<_> = IterBinomial::new(n).collect();
++            let mut k: $t = 0;
++            for b in c {
++                assert_eq!(b, binomial(n, k));
++                k += 1;
++            }
++        } }
++    }
++
++    // Check the largest n for which there is no overflow.
++    check_binomial!(u8, 10);
++    check_binomial!(i8, 9);
++    check_binomial!(u16, 18);
++    check_binomial!(i16, 17);
++    check_binomial!(u32, 34);
++    check_binomial!(i32, 33);
++    check_binomial!(u64, 67);
++    check_binomial!(i64, 66);
++}
++
++#[test]
++fn test_binomial() {
++    macro_rules! check {
++        ($t:ty, $x:expr, $y:expr, $r:expr) => { {
++            let x: $t = $x;
++            let y: $t = $y;
++            let expected: $t = $r;
++            assert_eq!(binomial(x, y), expected);
++            if y <= x {
++                assert_eq!(binomial(x, x - y), expected);
++            }
++        } }
++    }
++    check!(u8, 9, 4, 126);
++    check!(u8, 0, 0, 1);
++    check!(u8, 2, 3, 0);
++
++    check!(i8, 9, 4, 126);
++    check!(i8, 0, 0, 1);
++    check!(i8, 2, 3, 0);
++
++    check!(u16, 100, 2, 4950);
++    check!(u16, 14, 4, 1001);
++    check!(u16, 0, 0, 1);
++    check!(u16, 2, 3, 0);
++
++    check!(i16, 100, 2, 4950);
++    check!(i16, 14, 4, 1001);
++    check!(i16, 0, 0, 1);
++    check!(i16, 2, 3, 0);
++
++    check!(u32, 100, 2, 4950);
++    check!(u32, 35, 11, 417225900);
++    check!(u32, 14, 4, 1001);
++    check!(u32, 0, 0, 1);
++    check!(u32, 2, 3, 0);
++
++    check!(i32, 100, 2, 4950);
++    check!(i32, 35, 11, 417225900);
++    check!(i32, 14, 4, 1001);
++    check!(i32, 0, 0, 1);
++    check!(i32, 2, 3, 0);
++
++    check!(u64, 100, 2, 4950);
++    check!(u64, 35, 11, 417225900);
++    check!(u64, 14, 4, 1001);
++    check!(u64, 0, 0, 1);
++    check!(u64, 2, 3, 0);
++
++    check!(i64, 100, 2, 4950);
++    check!(i64, 35, 11, 417225900);
++    check!(i64, 14, 4, 1001);
++    check!(i64, 0, 0, 1);
++    check!(i64, 2, 3, 0);
++}
++
++#[test]
++fn test_multinomial() {
++    macro_rules! check_binomial {
++        ($t:ty, $k:expr) => { {
++            let n: $t = $k.iter().fold(0, |acc, &x| acc + x);
++            let k: &[$t] = $k;
++            assert_eq!(k.len(), 2);
++            assert_eq!(multinomial(k), binomial(n, k[0]));
++        } }
++    }
++
++    check_binomial!(u8, &[4, 5]);
++
++    check_binomial!(i8, &[4, 5]);
++
++    check_binomial!(u16, &[2, 98]);
++    check_binomial!(u16, &[4, 10]);
++
++    check_binomial!(i16, &[2, 98]);
++    check_binomial!(i16, &[4, 10]);
++
++    check_binomial!(u32, &[2, 98]);
++    check_binomial!(u32, &[11, 24]);
++    check_binomial!(u32, &[4, 10]);
++
++    check_binomial!(i32, &[2, 98]);
++    check_binomial!(i32, &[11, 24]);
++    check_binomial!(i32, &[4, 10]);
++
++    check_binomial!(u64, &[2, 98]);
++    check_binomial!(u64, &[11, 24]);
++    check_binomial!(u64, &[4, 10]);
++
++    check_binomial!(i64, &[2, 98]);
++    check_binomial!(i64, &[11, 24]);
++    check_binomial!(i64, &[4, 10]);
++
++    macro_rules! check_multinomial {
++        ($t:ty, $k:expr, $r:expr) => { {
++            let k: &[$t] = $k;
++            let expected: $t = $r;
++            assert_eq!(multinomial(k), expected);
++        } }
++    }
++
++    check_multinomial!(u8, &[2, 1, 2], 30);
++    check_multinomial!(u8, &[2, 3, 0], 10);
++
++    check_multinomial!(i8, &[2, 1, 2], 30);
++    check_multinomial!(i8, &[2, 3, 0], 10);
++
++    check_multinomial!(u16, &[2, 1, 2], 30);
++    check_multinomial!(u16, &[2, 3, 0], 10);
++
++    check_multinomial!(i16, &[2, 1, 2], 30);
++    check_multinomial!(i16, &[2, 3, 0], 10);
++
++    check_multinomial!(u32, &[2, 1, 2], 30);
++    check_multinomial!(u32, &[2, 3, 0], 10);
++
++    check_multinomial!(i32, &[2, 1, 2], 30);
++    check_multinomial!(i32, &[2, 3, 0], 10);
++
++    check_multinomial!(u64, &[2, 1, 2], 30);
++    check_multinomial!(u64, &[2, 3, 0], 10);
++
++    check_multinomial!(i64, &[2, 1, 2], 30);
++    check_multinomial!(i64, &[2, 3, 0], 10);
++
++    check_multinomial!(u64, &[], 1);
++    check_multinomial!(u64, &[0], 1);
++    check_multinomial!(u64, &[12345], 1);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..480c44b2a3abf2ba9ae120524622dec0ff048b99
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"7485fcc84f85b4ecd0ea527b14189281cf27d60e583ae65ebc9c088b13dffe01"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..742148c90e29129c189afe698e305fbaa6a862d5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,23 @@@
++[package]
++authors = ["The Rust Project Developers"]
++description = "External iterators for generic mathematics"
++documentation = "http://rust-num.github.io/num"
++homepage = "https://github.com/rust-num/num"
++keywords = ["mathematics", "numerics"]
++categories = [ "algorithms", "science" ]
++license = "MIT/Apache-2.0"
++repository = "https://github.com/rust-num/num"
++name = "num-iter"
++version = "0.1.34"
++
++[dependencies]
++
++[dependencies.num-integer]
++optional = false
++path = "../integer"
++version = "0.1.32"
++
++[dependencies.num-traits]
++optional = false
++path = "../traits"
++version = "0.1.32"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16fe87b06e802f094b3fbb0894b137bca2b16ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++                              Apache License
++                        Version 2.0, January 2004
++                     http://www.apache.org/licenses/
++
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++1. Definitions.
++
++   "License" shall mean the terms and conditions for use, reproduction,
++   and distribution as defined by Sections 1 through 9 of this document.
++
++   "Licensor" shall mean the copyright owner or entity authorized by
++   the copyright owner that is granting the License.
++
++   "Legal Entity" shall mean the union of the acting entity and all
++   other entities that control, are controlled by, or are under common
++   control with that entity. For the purposes of this definition,
++   "control" means (i) the power, direct or indirect, to cause the
++   direction or management of such entity, whether by contract or
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the
++   outstanding shares, or (iii) beneficial ownership of such entity.
++
++   "You" (or "Your") shall mean an individual or Legal Entity
++   exercising permissions granted by this License.
++
++   "Source" form shall mean the preferred form for making modifications,
++   including but not limited to software source code, documentation
++   source, and configuration files.
++
++   "Object" form shall mean any form resulting from mechanical
++   transformation or translation of a Source form, including but
++   not limited to compiled object code, generated documentation,
++   and conversions to other media types.
++
++   "Work" shall mean the work of authorship, whether in Source or
++   Object form, made available under the License, as indicated by a
++   copyright notice that is included in or attached to the work
++   (an example is provided in the Appendix below).
++
++   "Derivative Works" shall mean any work, whether in Source or Object
++   form, that is based on (or derived from) the Work and for which the
++   editorial revisions, annotations, elaborations, or other modifications
++   represent, as a whole, an original work of authorship. For the purposes
++   of this License, Derivative Works shall not include works that remain
++   separable from, or merely link (or bind by name) to the interfaces of,
++   the Work and Derivative Works thereof.
++
++   "Contribution" shall mean any work of authorship, including
++   the original version of the Work and any modifications or additions
++   to that Work or Derivative Works thereof, that is intentionally
++   submitted to Licensor for inclusion in the Work by the copyright owner
++   or by an individual or Legal Entity authorized to submit on behalf of
++   the copyright owner. For the purposes of this definition, "submitted"
++   means any form of electronic, verbal, or written communication sent
++   to the Licensor or its representatives, including but not limited to
++   communication on electronic mailing lists, source code control systems,
++   and issue tracking systems that are managed by, or on behalf of, the
++   Licensor for the purpose of discussing and improving the Work, but
++   excluding communication that is conspicuously marked or otherwise
++   designated in writing by the copyright owner as "Not a Contribution."
++
++   "Contributor" shall mean Licensor and any individual or Legal Entity
++   on behalf of whom a Contribution has been received by Licensor and
++   subsequently incorporated within the Work.
++
++2. Grant of Copyright License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   copyright license to reproduce, prepare Derivative Works of,
++   publicly display, publicly perform, sublicense, and distribute the
++   Work and such Derivative Works in Source or Object form.
++
++3. Grant of Patent License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   (except as stated in this section) patent license to make, have made,
++   use, offer to sell, sell, import, and otherwise transfer the Work,
++   where such license applies only to those patent claims licensable
++   by such Contributor that are necessarily infringed by their
++   Contribution(s) alone or by combination of their Contribution(s)
++   with the Work to which such Contribution(s) was submitted. If You
++   institute patent litigation against any entity (including a
++   cross-claim or counterclaim in a lawsuit) alleging that the Work
++   or a Contribution incorporated within the Work constitutes direct
++   or contributory patent infringement, then any patent licenses
++   granted to You under this License for that Work shall terminate
++   as of the date such litigation is filed.
++
++4. Redistribution. You may reproduce and distribute copies of the
++   Work or Derivative Works thereof in any medium, with or without
++   modifications, and in Source or Object form, provided that You
++   meet the following conditions:
++
++   (a) You must give any other recipients of the Work or
++       Derivative Works a copy of this License; and
++
++   (b) You must cause any modified files to carry prominent notices
++       stating that You changed the files; and
++
++   (c) You must retain, in the Source form of any Derivative Works
++       that You distribute, all copyright, patent, trademark, and
++       attribution notices from the Source form of the Work,
++       excluding those notices that do not pertain to any part of
++       the Derivative Works; and
++
++   (d) If the Work includes a "NOTICE" text file as part of its
++       distribution, then any Derivative Works that You distribute must
++       include a readable copy of the attribution notices contained
++       within such NOTICE file, excluding those notices that do not
++       pertain to any part of the Derivative Works, in at least one
++       of the following places: within a NOTICE text file distributed
++       as part of the Derivative Works; within the Source form or
++       documentation, if provided along with the Derivative Works; or,
++       within a display generated by the Derivative Works, if and
++       wherever such third-party notices normally appear. The contents
++       of the NOTICE file are for informational purposes only and
++       do not modify the License. You may add Your own attribution
++       notices within Derivative Works that You distribute, alongside
++       or as an addendum to the NOTICE text from the Work, provided
++       that such additional attribution notices cannot be construed
++       as modifying the License.
++
++   You may add Your own copyright statement to Your modifications and
++   may provide additional or different license terms and conditions
++   for use, reproduction, or distribution of Your modifications, or
++   for any such Derivative Works as a whole, provided Your use,
++   reproduction, and distribution of the Work otherwise complies with
++   the conditions stated in this License.
++
++5. Submission of Contributions. Unless You explicitly state otherwise,
++   any Contribution intentionally submitted for inclusion in the Work
++   by You to the Licensor shall be under the terms and conditions of
++   this License, without any additional terms or conditions.
++   Notwithstanding the above, nothing herein shall supersede or modify
++   the terms of any separate license agreement you may have executed
++   with Licensor regarding such Contributions.
++
++6. Trademarks. This License does not grant permission to use the trade
++   names, trademarks, service marks, or product names of the Licensor,
++   except as required for reasonable and customary use in describing the
++   origin of the Work and reproducing the content of the NOTICE file.
++
++7. Disclaimer of Warranty. Unless required by applicable law or
++   agreed to in writing, Licensor provides the Work (and each
++   Contributor provides its Contributions) on an "AS IS" BASIS,
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++   implied, including, without limitation, any warranties or conditions
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++   PARTICULAR PURPOSE. You are solely responsible for determining the
++   appropriateness of using or redistributing the Work and assume any
++   risks associated with Your exercise of permissions under this License.
++
++8. Limitation of Liability. In no event and under no legal theory,
++   whether in tort (including negligence), contract, or otherwise,
++   unless required by applicable law (such as deliberate and grossly
++   negligent acts) or agreed to in writing, shall any Contributor be
++   liable to You for damages, including any direct, indirect, special,
++   incidental, or consequential damages of any character arising as a
++   result of this License or out of the use or inability to use the
++   Work (including but not limited to damages for loss of goodwill,
++   work stoppage, computer failure or malfunction, or any and all
++   other commercial damages or losses), even if such Contributor
++   has been advised of the possibility of such damages.
++
++9. Accepting Warranty or Additional Liability. While redistributing
++   the Work or Derivative Works thereof, You may choose to offer,
++   and charge a fee for, acceptance of support, warranty, indemnity,
++   or other liability obligations and/or rights consistent with this
++   License. However, in accepting such obligations, You may act only
++   on Your own behalf and on Your sole responsibility, not on behalf
++   of any other Contributor, and only if You agree to indemnify,
++   defend, and hold each Contributor harmless for any liability
++   incurred by, or claims asserted against, such Contributor by reason
++   of your accepting any such warranty or additional liability.
++
++END OF TERMS AND CONDITIONS
++
++APPENDIX: How to apply the Apache License to your work.
++
++   To apply the Apache License to your work, attach the following
++   boilerplate notice, with the fields enclosed by brackets "[]"
++   replaced with your own identifying information. (Don't include
++   the brackets!)  The text should be enclosed in the appropriate
++   comment syntax for the file format. We also recommend that a
++   file or class name and description of purpose be included on the
++   same "printed page" as the copyright notice for easier
++   identification within third-party archives.
++
++Copyright [yyyy] [name of copyright owner]
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++      http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39d4bdb5acd313c1a92dbeaa1c379aaf0596a315
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2014 The Rust Project Developers
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..68323ef68b7f6d62143d60a768c2b674c34a2002
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,378 @@@
++// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! External iterators for generic mathematics
++#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png",
++       html_favicon_url = "https://rust-num.github.io/num/favicon.ico",
++       html_root_url = "https://rust-num.github.io/num/",
++       html_playground_url = "http://play.integer32.com/")]
++
++extern crate num_traits as traits;
++extern crate num_integer as integer;
++
++use integer::Integer;
++use traits::{Zero, One, CheckedAdd, ToPrimitive};
++use std::ops::{Add, Sub};
++
++/// An iterator over the range [start, stop)
++#[derive(Clone)]
++pub struct Range<A> {
++    state: A,
++    stop: A,
++    one: A
++}
++
++/// Returns an iterator over the given range [start, stop) (that is, starting
++/// at start (inclusive), and ending at stop (exclusive)).
++///
++/// # Example
++///
++/// ```rust
++/// let array = [0, 1, 2, 3, 4];
++///
++/// for i in num_iter::range(0, 5) {
++///     println!("{}", i);
++///     assert_eq!(i,  array[i]);
++/// }
++/// ```
++#[inline]
++pub fn range<A>(start: A, stop: A) -> Range<A>
++    where A: Add<A, Output = A> + PartialOrd + Clone + One
++{
++    Range{state: start, stop: stop, one: One::one()}
++}
++
++// FIXME: rust-lang/rust#10414: Unfortunate type bound
++impl<A> Iterator for Range<A>
++    where A: Add<A, Output = A> + PartialOrd + Clone + ToPrimitive
++{
++    type Item = A;
++
++    #[inline]
++    fn next(&mut self) -> Option<A> {
++        if self.state < self.stop {
++            let result = self.state.clone();
++            self.state = self.state.clone() + self.one.clone();
++            Some(result)
++        } else {
++            None
++        }
++    }
++
++    #[inline]
++    fn size_hint(&self) -> (usize, Option<usize>) {
++        // This first checks if the elements are representable as i64. If they aren't, try u64 (to
++        // handle cases like range(huge, huger)). We don't use usize/int because the difference of
++        // the i64/u64 might lie within their range.
++        let bound = match self.state.to_i64() {
++            Some(a) => {
++                let sz = self.stop.to_i64().map(|b| b.checked_sub(a));
++                match sz {
++                    Some(Some(bound)) => bound.to_usize(),
++                    _ => None,
++                }
++            },
++            None => match self.state.to_u64() {
++                Some(a) => {
++                    let sz = self.stop.to_u64().map(|b| b.checked_sub(a));
++                    match sz {
++                        Some(Some(bound)) => bound.to_usize(),
++                        _ => None
++                    }
++                },
++                None => None
++            }
++        };
++
++        match bound {
++            Some(b) => (b, Some(b)),
++            // Standard fallback for unbounded/unrepresentable bounds
++            None => (0, None)
++        }
++    }
++}
++
++/// `Integer` is required to ensure the range will be the same regardless of
++/// the direction it is consumed.
++impl<A> DoubleEndedIterator for Range<A>
++    where A: Integer + Clone + ToPrimitive
++{
++    #[inline]
++    fn next_back(&mut self) -> Option<A> {
++        if self.stop > self.state {
++            self.stop = self.stop.clone() - self.one.clone();
++            Some(self.stop.clone())
++        } else {
++            None
++        }
++    }
++}
++
++/// An iterator over the range [start, stop]
++#[derive(Clone)]
++pub struct RangeInclusive<A> {
++    range: Range<A>,
++    done: bool,
++}
++
++/// Return an iterator over the range [start, stop]
++#[inline]
++pub fn range_inclusive<A>(start: A, stop: A) -> RangeInclusive<A>
++    where A: Add<A, Output = A> + PartialOrd + Clone + One
++{
++    RangeInclusive{range: range(start, stop), done: false}
++}
++
++impl<A> Iterator for RangeInclusive<A>
++    where A: Add<A, Output = A> + PartialOrd + Clone + ToPrimitive
++{
++    type Item = A;
++
++    #[inline]
++    fn next(&mut self) -> Option<A> {
++        match self.range.next() {
++            Some(x) => Some(x),
++            None => {
++                if !self.done && self.range.state == self.range.stop {
++                    self.done = true;
++                    Some(self.range.stop.clone())
++                } else {
++                    None
++                }
++            }
++        }
++    }
++
++    #[inline]
++    fn size_hint(&self) -> (usize, Option<usize>) {
++        let (lo, hi) = self.range.size_hint();
++        if self.done {
++            (lo, hi)
++        } else {
++            let lo = lo.saturating_add(1);
++            let hi = match hi {
++                Some(x) => x.checked_add(1),
++                None => None
++            };
++            (lo, hi)
++        }
++    }
++}
++
++impl<A> DoubleEndedIterator for RangeInclusive<A>
++    where A: Sub<A, Output = A> + Integer + Clone + ToPrimitive
++{
++    #[inline]
++    fn next_back(&mut self) -> Option<A> {
++        if self.range.stop > self.range.state {
++            let result = self.range.stop.clone();
++            self.range.stop = self.range.stop.clone() - self.range.one.clone();
++            Some(result)
++        } else if !self.done && self.range.state == self.range.stop {
++            self.done = true;
++            Some(self.range.stop.clone())
++        } else {
++            None
++        }
++    }
++}
++
++/// An iterator over the range [start, stop) by `step`. It handles overflow by stopping.
++#[derive(Clone)]
++pub struct RangeStep<A> {
++    state: A,
++    stop: A,
++    step: A,
++    rev: bool,
++}
++
++/// Return an iterator over the range [start, stop) by `step`. It handles overflow by stopping.
++#[inline]
++pub fn range_step<A>(start: A, stop: A, step: A) -> RangeStep<A>
++    where A: CheckedAdd + PartialOrd + Clone + Zero
++{
++    let rev = step < Zero::zero();
++    RangeStep{state: start, stop: stop, step: step, rev: rev}
++}
++
++impl<A> Iterator for RangeStep<A>
++    where A: CheckedAdd + PartialOrd + Clone
++{
++    type Item = A;
++
++    #[inline]
++    fn next(&mut self) -> Option<A> {
++        if (self.rev && self.state > self.stop) || (!self.rev && self.state < self.stop) {
++            let result = self.state.clone();
++            match self.state.checked_add(&self.step) {
++                Some(x) => self.state = x,
++                None => self.state = self.stop.clone()
++            }
++            Some(result)
++        } else {
++            None
++        }
++    }
++}
++
++/// An iterator over the range [start, stop] by `step`. It handles overflow by stopping.
++#[derive(Clone)]
++pub struct RangeStepInclusive<A> {
++    state: A,
++    stop: A,
++    step: A,
++    rev: bool,
++    done: bool,
++}
++
++/// Return an iterator over the range [start, stop] by `step`. It handles overflow by stopping.
++#[inline]
++pub fn range_step_inclusive<A>(start: A, stop: A, step: A) -> RangeStepInclusive<A>
++    where A: CheckedAdd + PartialOrd + Clone + Zero
++{
++    let rev = step < Zero::zero();
++    RangeStepInclusive{state: start, stop: stop, step: step, rev: rev, done: false}
++}
++
++impl<A> Iterator for RangeStepInclusive<A>
++    where A: CheckedAdd + PartialOrd + Clone + PartialEq
++{
++    type Item = A;
++
++    #[inline]
++    fn next(&mut self) -> Option<A> {
++        if !self.done && ((self.rev && self.state >= self.stop) ||
++                          (!self.rev && self.state <= self.stop)) {
++            let result = self.state.clone();
++            match self.state.checked_add(&self.step) {
++                Some(x) => self.state = x,
++                None => self.done = true
++            }
++            Some(result)
++        } else {
++            None
++        }
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use std::usize;
++    use std::ops::{Add, Mul};
++    use std::cmp::Ordering;
++    use traits::{One, ToPrimitive};
++
++    #[test]
++    fn test_range() {
++        /// A mock type to check Range when ToPrimitive returns None
++        struct Foo;
++
++        impl ToPrimitive for Foo {
++            fn to_i64(&self) -> Option<i64> { None }
++            fn to_u64(&self) -> Option<u64> { None }
++        }
++
++        impl Add<Foo> for Foo {
++            type Output = Foo;
++
++            fn add(self, _: Foo) -> Foo {
++                Foo
++            }
++        }
++
++        impl PartialEq for Foo {
++            fn eq(&self, _: &Foo) -> bool {
++                true
++            }
++        }
++
++        impl PartialOrd for Foo {
++            fn partial_cmp(&self, _: &Foo) -> Option<Ordering> {
++                None
++            }
++        }
++
++        impl Clone for Foo {
++            fn clone(&self) -> Foo {
++                Foo
++            }
++        }
++
++        impl Mul<Foo> for Foo {
++            type Output = Foo;
++
++            fn mul(self, _: Foo) -> Foo {
++                Foo
++            }
++        }
++
++        impl One for Foo {
++            fn one() -> Foo {
++                Foo
++            }
++        }
++
++        assert!(super::range(0, 5).collect::<Vec<isize>>() == vec![0, 1, 2, 3, 4]);
++        assert!(super::range(-10, -1).collect::<Vec<isize>>() ==
++                vec![-10, -9, -8, -7, -6, -5, -4, -3, -2]);
++        assert!(super::range(0, 5).rev().collect::<Vec<isize>>() == vec![4, 3, 2, 1, 0]);
++        assert_eq!(super::range(200, -5).count(), 0);
++        assert_eq!(super::range(200, -5).rev().count(), 0);
++        assert_eq!(super::range(200, 200).count(), 0);
++        assert_eq!(super::range(200, 200).rev().count(), 0);
++
++        assert_eq!(super::range(0, 100).size_hint(), (100, Some(100)));
++        // this test is only meaningful when sizeof usize < sizeof u64
++        assert_eq!(super::range(usize::MAX - 1, usize::MAX).size_hint(), (1, Some(1)));
++        assert_eq!(super::range(-10, -1).size_hint(), (9, Some(9)));
++    }
++
++    #[test]
++    fn test_range_inclusive() {
++        assert!(super::range_inclusive(0, 5).collect::<Vec<isize>>() ==
++                vec![0, 1, 2, 3, 4, 5]);
++        assert!(super::range_inclusive(0, 5).rev().collect::<Vec<isize>>() ==
++                vec![5, 4, 3, 2, 1, 0]);
++        assert_eq!(super::range_inclusive(200, -5).count(), 0);
++        assert_eq!(super::range_inclusive(200, -5).rev().count(), 0);
++        assert!(super::range_inclusive(200, 200).collect::<Vec<isize>>() == vec![200]);
++        assert!(super::range_inclusive(200, 200).rev().collect::<Vec<isize>>() == vec![200]);
++    }
++
++    #[test]
++    fn test_range_step() {
++        assert!(super::range_step(0, 20, 5).collect::<Vec<isize>>() ==
++                vec![0, 5, 10, 15]);
++        assert!(super::range_step(20, 0, -5).collect::<Vec<isize>>() ==
++                vec![20, 15, 10, 5]);
++        assert!(super::range_step(20, 0, -6).collect::<Vec<isize>>() ==
++                vec![20, 14, 8, 2]);
++        assert!(super::range_step(200u8, 255, 50).collect::<Vec<u8>>() ==
++                vec![200u8, 250]);
++        assert!(super::range_step(200, -5, 1).collect::<Vec<isize>>() == vec![]);
++        assert!(super::range_step(200, 200, 1).collect::<Vec<isize>>() == vec![]);
++    }
++
++    #[test]
++    fn test_range_step_inclusive() {
++        assert!(super::range_step_inclusive(0, 20, 5).collect::<Vec<isize>>() ==
++                vec![0, 5, 10, 15, 20]);
++        assert!(super::range_step_inclusive(20, 0, -5).collect::<Vec<isize>>() ==
++                vec![20, 15, 10, 5, 0]);
++        assert!(super::range_step_inclusive(20, 0, -6).collect::<Vec<isize>>() ==
++                vec![20, 14, 8, 2]);
++        assert!(super::range_step_inclusive(200u8, 255, 50).collect::<Vec<u8>>() ==
++                vec![200u8, 250]);
++        assert!(super::range_step_inclusive(200, -5, 1).collect::<Vec<isize>>() ==
++                vec![]);
++        assert!(super::range_step_inclusive(200, 200, 1).collect::<Vec<isize>>() ==
++                vec![200]);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..af57ba780762d66db5d370f23155857ad8b178a4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"288629c76fac4b33556f4b7ab57ba21ae202da65ba8b77466e6d598e31990790"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..dc48cdb84aa255a679d0e952dd5c3d5c2ee2d5f2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,38 @@@
++[package]
++authors = ["The Rust Project Developers"]
++description = "Rational numbers implementation for Rust"
++documentation = "http://rust-num.github.io/num"
++homepage = "https://github.com/rust-num/num"
++keywords = ["mathematics", "numerics"]
++categories = [ "algorithms", "data-structures", "science" ]
++license = "MIT/Apache-2.0"
++name = "num-rational"
++repository = "https://github.com/rust-num/num"
++version = "0.1.39"
++
++[dependencies]
++
++[dependencies.num-bigint]
++optional = true
++path = "../bigint"
++version = "0.1.32"
++
++[dependencies.num-integer]
++path = "../integer"
++version = "0.1.32"
++
++[dependencies.num-traits]
++path = "../traits"
++version = "0.1.32"
++
++[dependencies.rustc-serialize]
++optional = true
++version = "0.3.19"
++
++[dependencies.serde]
++optional = true
++version = ">= 0.7.0, < 0.9.0"
++
++[features]
++default = ["bigint", "rustc-serialize"]
++bigint = ["num-bigint"]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16fe87b06e802f094b3fbb0894b137bca2b16ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++                              Apache License
++                        Version 2.0, January 2004
++                     http://www.apache.org/licenses/
++
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++1. Definitions.
++
++   "License" shall mean the terms and conditions for use, reproduction,
++   and distribution as defined by Sections 1 through 9 of this document.
++
++   "Licensor" shall mean the copyright owner or entity authorized by
++   the copyright owner that is granting the License.
++
++   "Legal Entity" shall mean the union of the acting entity and all
++   other entities that control, are controlled by, or are under common
++   control with that entity. For the purposes of this definition,
++   "control" means (i) the power, direct or indirect, to cause the
++   direction or management of such entity, whether by contract or
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the
++   outstanding shares, or (iii) beneficial ownership of such entity.
++
++   "You" (or "Your") shall mean an individual or Legal Entity
++   exercising permissions granted by this License.
++
++   "Source" form shall mean the preferred form for making modifications,
++   including but not limited to software source code, documentation
++   source, and configuration files.
++
++   "Object" form shall mean any form resulting from mechanical
++   transformation or translation of a Source form, including but
++   not limited to compiled object code, generated documentation,
++   and conversions to other media types.
++
++   "Work" shall mean the work of authorship, whether in Source or
++   Object form, made available under the License, as indicated by a
++   copyright notice that is included in or attached to the work
++   (an example is provided in the Appendix below).
++
++   "Derivative Works" shall mean any work, whether in Source or Object
++   form, that is based on (or derived from) the Work and for which the
++   editorial revisions, annotations, elaborations, or other modifications
++   represent, as a whole, an original work of authorship. For the purposes
++   of this License, Derivative Works shall not include works that remain
++   separable from, or merely link (or bind by name) to the interfaces of,
++   the Work and Derivative Works thereof.
++
++   "Contribution" shall mean any work of authorship, including
++   the original version of the Work and any modifications or additions
++   to that Work or Derivative Works thereof, that is intentionally
++   submitted to Licensor for inclusion in the Work by the copyright owner
++   or by an individual or Legal Entity authorized to submit on behalf of
++   the copyright owner. For the purposes of this definition, "submitted"
++   means any form of electronic, verbal, or written communication sent
++   to the Licensor or its representatives, including but not limited to
++   communication on electronic mailing lists, source code control systems,
++   and issue tracking systems that are managed by, or on behalf of, the
++   Licensor for the purpose of discussing and improving the Work, but
++   excluding communication that is conspicuously marked or otherwise
++   designated in writing by the copyright owner as "Not a Contribution."
++
++   "Contributor" shall mean Licensor and any individual or Legal Entity
++   on behalf of whom a Contribution has been received by Licensor and
++   subsequently incorporated within the Work.
++
++2. Grant of Copyright License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   copyright license to reproduce, prepare Derivative Works of,
++   publicly display, publicly perform, sublicense, and distribute the
++   Work and such Derivative Works in Source or Object form.
++
++3. Grant of Patent License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   (except as stated in this section) patent license to make, have made,
++   use, offer to sell, sell, import, and otherwise transfer the Work,
++   where such license applies only to those patent claims licensable
++   by such Contributor that are necessarily infringed by their
++   Contribution(s) alone or by combination of their Contribution(s)
++   with the Work to which such Contribution(s) was submitted. If You
++   institute patent litigation against any entity (including a
++   cross-claim or counterclaim in a lawsuit) alleging that the Work
++   or a Contribution incorporated within the Work constitutes direct
++   or contributory patent infringement, then any patent licenses
++   granted to You under this License for that Work shall terminate
++   as of the date such litigation is filed.
++
++4. Redistribution. You may reproduce and distribute copies of the
++   Work or Derivative Works thereof in any medium, with or without
++   modifications, and in Source or Object form, provided that You
++   meet the following conditions:
++
++   (a) You must give any other recipients of the Work or
++       Derivative Works a copy of this License; and
++
++   (b) You must cause any modified files to carry prominent notices
++       stating that You changed the files; and
++
++   (c) You must retain, in the Source form of any Derivative Works
++       that You distribute, all copyright, patent, trademark, and
++       attribution notices from the Source form of the Work,
++       excluding those notices that do not pertain to any part of
++       the Derivative Works; and
++
++   (d) If the Work includes a "NOTICE" text file as part of its
++       distribution, then any Derivative Works that You distribute must
++       include a readable copy of the attribution notices contained
++       within such NOTICE file, excluding those notices that do not
++       pertain to any part of the Derivative Works, in at least one
++       of the following places: within a NOTICE text file distributed
++       as part of the Derivative Works; within the Source form or
++       documentation, if provided along with the Derivative Works; or,
++       within a display generated by the Derivative Works, if and
++       wherever such third-party notices normally appear. The contents
++       of the NOTICE file are for informational purposes only and
++       do not modify the License. You may add Your own attribution
++       notices within Derivative Works that You distribute, alongside
++       or as an addendum to the NOTICE text from the Work, provided
++       that such additional attribution notices cannot be construed
++       as modifying the License.
++
++   You may add Your own copyright statement to Your modifications and
++   may provide additional or different license terms and conditions
++   for use, reproduction, or distribution of Your modifications, or
++   for any such Derivative Works as a whole, provided Your use,
++   reproduction, and distribution of the Work otherwise complies with
++   the conditions stated in this License.
++
++5. Submission of Contributions. Unless You explicitly state otherwise,
++   any Contribution intentionally submitted for inclusion in the Work
++   by You to the Licensor shall be under the terms and conditions of
++   this License, without any additional terms or conditions.
++   Notwithstanding the above, nothing herein shall supersede or modify
++   the terms of any separate license agreement you may have executed
++   with Licensor regarding such Contributions.
++
++6. Trademarks. This License does not grant permission to use the trade
++   names, trademarks, service marks, or product names of the Licensor,
++   except as required for reasonable and customary use in describing the
++   origin of the Work and reproducing the content of the NOTICE file.
++
++7. Disclaimer of Warranty. Unless required by applicable law or
++   agreed to in writing, Licensor provides the Work (and each
++   Contributor provides its Contributions) on an "AS IS" BASIS,
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++   implied, including, without limitation, any warranties or conditions
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++   PARTICULAR PURPOSE. You are solely responsible for determining the
++   appropriateness of using or redistributing the Work and assume any
++   risks associated with Your exercise of permissions under this License.
++
++8. Limitation of Liability. In no event and under no legal theory,
++   whether in tort (including negligence), contract, or otherwise,
++   unless required by applicable law (such as deliberate and grossly
++   negligent acts) or agreed to in writing, shall any Contributor be
++   liable to You for damages, including any direct, indirect, special,
++   incidental, or consequential damages of any character arising as a
++   result of this License or out of the use or inability to use the
++   Work (including but not limited to damages for loss of goodwill,
++   work stoppage, computer failure or malfunction, or any and all
++   other commercial damages or losses), even if such Contributor
++   has been advised of the possibility of such damages.
++
++9. Accepting Warranty or Additional Liability. While redistributing
++   the Work or Derivative Works thereof, You may choose to offer,
++   and charge a fee for, acceptance of support, warranty, indemnity,
++   or other liability obligations and/or rights consistent with this
++   License. However, in accepting such obligations, You may act only
++   on Your own behalf and on Your sole responsibility, not on behalf
++   of any other Contributor, and only if You agree to indemnify,
++   defend, and hold each Contributor harmless for any liability
++   incurred by, or claims asserted against, such Contributor by reason
++   of your accepting any such warranty or additional liability.
++
++END OF TERMS AND CONDITIONS
++
++APPENDIX: How to apply the Apache License to your work.
++
++   To apply the Apache License to your work, attach the following
++   boilerplate notice, with the fields enclosed by brackets "[]"
++   replaced with your own identifying information. (Don't include
++   the brackets!)  The text should be enclosed in the appropriate
++   comment syntax for the file format. We also recommend that a
++   file or class name and description of purpose be included on the
++   same "printed page" as the copyright notice for easier
++   identification within third-party archives.
++
++Copyright [yyyy] [name of copyright owner]
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++      http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39d4bdb5acd313c1a92dbeaa1c379aaf0596a315
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2014 The Rust Project Developers
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..640ca31d89c7ccb61ea6dcb0691f6c92a46d9148
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1413 @@@
++// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Rational numbers
++#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png",
++       html_favicon_url = "https://rust-num.github.io/num/favicon.ico",
++       html_root_url = "https://rust-num.github.io/num/",
++       html_playground_url = "http://play.integer32.com/")]
++
++#[cfg(feature = "rustc-serialize")]
++extern crate rustc_serialize;
++#[cfg(feature = "serde")]
++extern crate serde;
++#[cfg(feature = "num-bigint")]
++extern crate num_bigint as bigint;
++
++extern crate num_traits as traits;
++extern crate num_integer as integer;
++
++use std::cmp;
++use std::error::Error;
++use std::fmt;
++use std::hash::{Hash, Hasher};
++use std::ops::{Add, Div, Mul, Neg, Rem, Sub};
++use std::str::FromStr;
++
++#[cfg(feature = "num-bigint")]
++use bigint::{BigInt, BigUint, Sign};
++
++use integer::Integer;
++use traits::{FromPrimitive, Float, PrimInt, Num, Signed, Zero, One, Bounded, NumCast};
++
++/// Represents the ratio between 2 numbers.
++#[derive(Copy, Clone, Debug)]
++#[cfg_attr(feature = "rustc-serialize", derive(RustcEncodable, RustcDecodable))]
++#[allow(missing_docs)]
++pub struct Ratio<T> {
++    numer: T,
++    denom: T,
++}
++
++/// Alias for a `Ratio` of machine-sized integers.
++pub type Rational = Ratio<isize>;
++pub type Rational32 = Ratio<i32>;
++pub type Rational64 = Ratio<i64>;
++
++#[cfg(feature = "num-bigint")]
++/// Alias for arbitrary precision rationals.
++pub type BigRational = Ratio<BigInt>;
++
++impl<T: Clone + Integer> Ratio<T> {
++    /// Creates a new `Ratio`. Fails if `denom` is zero.
++    #[inline]
++    pub fn new(numer: T, denom: T) -> Ratio<T> {
++        if denom.is_zero() {
++            panic!("denominator == 0");
++        }
++        let mut ret = Ratio::new_raw(numer, denom);
++        ret.reduce();
++        ret
++    }
++
++    /// Creates a `Ratio` representing the integer `t`.
++    #[inline]
++    pub fn from_integer(t: T) -> Ratio<T> {
++        Ratio::new_raw(t, One::one())
++    }
++
++    /// Creates a `Ratio` without checking for `denom == 0` or reducing.
++    #[inline]
++    pub fn new_raw(numer: T, denom: T) -> Ratio<T> {
++        Ratio {
++            numer: numer,
++            denom: denom,
++        }
++    }
++
++    /// Converts to an integer, rounding towards zero.
++    #[inline]
++    pub fn to_integer(&self) -> T {
++        self.trunc().numer
++    }
++
++    /// Gets an immutable reference to the numerator.
++    #[inline]
++    pub fn numer<'a>(&'a self) -> &'a T {
++        &self.numer
++    }
++
++    /// Gets an immutable reference to the denominator.
++    #[inline]
++    pub fn denom<'a>(&'a self) -> &'a T {
++        &self.denom
++    }
++
++    /// Returns true if the rational number is an integer (denominator is 1).
++    #[inline]
++    pub fn is_integer(&self) -> bool {
++        self.denom == One::one()
++    }
++
++    /// Puts self into lowest terms, with denom > 0.
++    fn reduce(&mut self) {
++        let g: T = self.numer.gcd(&self.denom);
++
++        // FIXME(#5992): assignment operator overloads
++        // self.numer /= g;
++        self.numer = self.numer.clone() / g.clone();
++        // FIXME(#5992): assignment operator overloads
++        // self.denom /= g;
++        self.denom = self.denom.clone() / g;
++
++        // keep denom positive!
++        if self.denom < T::zero() {
++            self.numer = T::zero() - self.numer.clone();
++            self.denom = T::zero() - self.denom.clone();
++        }
++    }
++
++    /// Returns a reduced copy of self.
++    ///
++    /// In general, it is not necessary to use this method, as the only
++    /// method of procuring a non-reduced fraction is through `new_raw`.
++    pub fn reduced(&self) -> Ratio<T> {
++        let mut ret = self.clone();
++        ret.reduce();
++        ret
++    }
++
++    /// Returns the reciprocal.
++    ///
++    /// Fails if the `Ratio` is zero.
++    #[inline]
++    pub fn recip(&self) -> Ratio<T> {
++        match self.numer.cmp(&T::zero()) {
++            cmp::Ordering::Equal => panic!("numerator == 0"),
++            cmp::Ordering::Greater => Ratio::new_raw(self.denom.clone(), self.numer.clone()),
++            cmp::Ordering::Less => Ratio::new_raw(T::zero() - self.denom.clone(),
++                                                  T::zero() - self.numer.clone())
++        }
++    }
++
++    /// Rounds towards minus infinity.
++    #[inline]
++    pub fn floor(&self) -> Ratio<T> {
++        if *self < Zero::zero() {
++            let one: T = One::one();
++            Ratio::from_integer((self.numer.clone() - self.denom.clone() + one) /
++                                self.denom.clone())
++        } else {
++            Ratio::from_integer(self.numer.clone() / self.denom.clone())
++        }
++    }
++
++    /// Rounds towards plus infinity.
++    #[inline]
++    pub fn ceil(&self) -> Ratio<T> {
++        if *self < Zero::zero() {
++            Ratio::from_integer(self.numer.clone() / self.denom.clone())
++        } else {
++            let one: T = One::one();
++            Ratio::from_integer((self.numer.clone() + self.denom.clone() - one) /
++                                self.denom.clone())
++        }
++    }
++
++    /// Rounds to the nearest integer. Rounds half-way cases away from zero.
++    #[inline]
++    pub fn round(&self) -> Ratio<T> {
++        let zero: Ratio<T> = Zero::zero();
++        let one: T = One::one();
++        let two: T = one.clone() + one.clone();
++
++        // Find unsigned fractional part of rational number
++        let mut fractional = self.fract();
++        if fractional < zero {
++            fractional = zero - fractional
++        };
++
++        // The algorithm compares the unsigned fractional part with 1/2, that
++        // is, a/b >= 1/2, or a >= b/2. For odd denominators, we use
++        // a >= (b/2)+1. This avoids overflow issues.
++        let half_or_larger = if fractional.denom().is_even() {
++            *fractional.numer() >= fractional.denom().clone() / two.clone()
++        } else {
++            *fractional.numer() >= (fractional.denom().clone() / two.clone()) + one.clone()
++        };
++
++        if half_or_larger {
++            let one: Ratio<T> = One::one();
++            if *self >= Zero::zero() {
++                self.trunc() + one
++            } else {
++                self.trunc() - one
++            }
++        } else {
++            self.trunc()
++        }
++    }
++
++    /// Rounds towards zero.
++    #[inline]
++    pub fn trunc(&self) -> Ratio<T> {
++        Ratio::from_integer(self.numer.clone() / self.denom.clone())
++    }
++
++    /// Returns the fractional part of a number, with division rounded towards zero.
++    ///
++    /// Satisfies `self == self.trunc() + self.fract()`.
++    #[inline]
++    pub fn fract(&self) -> Ratio<T> {
++        Ratio::new_raw(self.numer.clone() % self.denom.clone(), self.denom.clone())
++    }
++}
++
++impl<T: Clone + Integer + PrimInt> Ratio<T> {
++    /// Raises the `Ratio` to the power of an exponent.
++    #[inline]
++    pub fn pow(&self, expon: i32) -> Ratio<T> {
++        match expon.cmp(&0) {
++            cmp::Ordering::Equal => One::one(),
++            cmp::Ordering::Less => self.recip().pow(-expon),
++            cmp::Ordering::Greater => {
++                Ratio::new_raw(self.numer.pow(expon as u32), self.denom.pow(expon as u32))
++            }
++        }
++    }
++}
++
++#[cfg(feature = "num-bigint")]
++impl Ratio<BigInt> {
++    /// Converts a float into a rational number.
++    pub fn from_float<T: Float>(f: T) -> Option<BigRational> {
++        if !f.is_finite() {
++            return None;
++        }
++        let (mantissa, exponent, sign) = f.integer_decode();
++        let bigint_sign = if sign == 1 {
++            Sign::Plus
++        } else {
++            Sign::Minus
++        };
++        if exponent < 0 {
++            let one: BigInt = One::one();
++            let denom: BigInt = one << ((-exponent) as usize);
++            let numer: BigUint = FromPrimitive::from_u64(mantissa).unwrap();
++            Some(Ratio::new(BigInt::from_biguint(bigint_sign, numer), denom))
++        } else {
++            let mut numer: BigUint = FromPrimitive::from_u64(mantissa).unwrap();
++            numer = numer << (exponent as usize);
++            Some(Ratio::from_integer(BigInt::from_biguint(bigint_sign, numer)))
++        }
++    }
++}
++
++// From integer
++impl<T> From<T> for Ratio<T> where T: Clone + Integer {
++    fn from(x: T) -> Ratio<T> {
++        Ratio::from_integer(x)
++    }
++}
++
++
++// From pair (through the `new` constructor)
++impl<T> From<(T, T)> for Ratio<T> where T: Clone + Integer {
++    fn from(pair: (T, T)) -> Ratio<T> {
++        Ratio::new(pair.0, pair.1)
++    }
++}
++
++// Comparisons
++
++// Mathematically, comparing a/b and c/d is the same as comparing a*d and b*c, but it's very easy
++// for those multiplications to overflow fixed-size integers, so we need to take care.
++
++impl<T: Clone + Integer> Ord for Ratio<T> {
++    #[inline]
++    fn cmp(&self, other: &Self) -> cmp::Ordering {
++        // With equal denominators, the numerators can be directly compared
++        if self.denom == other.denom {
++            let ord = self.numer.cmp(&other.numer);
++            return if self.denom < T::zero() {
++                ord.reverse()
++            } else {
++                ord
++            };
++        }
++
++        // With equal numerators, the denominators can be inversely compared
++        if self.numer == other.numer {
++            let ord = self.denom.cmp(&other.denom);
++            return if self.numer < T::zero() {
++                ord
++            } else {
++                ord.reverse()
++            };
++        }
++
++        // Unfortunately, we don't have CheckedMul to try.  That could sometimes avoid all the
++        // division below, or even always avoid it for BigInt and BigUint.
++        // FIXME- future breaking change to add Checked* to Integer?
++
++        // Compare as floored integers and remainders
++        let (self_int, self_rem) = self.numer.div_mod_floor(&self.denom);
++        let (other_int, other_rem) = other.numer.div_mod_floor(&other.denom);
++        match self_int.cmp(&other_int) {
++            cmp::Ordering::Greater => cmp::Ordering::Greater,
++            cmp::Ordering::Less => cmp::Ordering::Less,
++            cmp::Ordering::Equal => {
++                match (self_rem.is_zero(), other_rem.is_zero()) {
++                    (true, true) => cmp::Ordering::Equal,
++                    (true, false) => cmp::Ordering::Less,
++                    (false, true) => cmp::Ordering::Greater,
++                    (false, false) => {
++                        // Compare the reciprocals of the remaining fractions in reverse
++                        let self_recip = Ratio::new_raw(self.denom.clone(), self_rem);
++                        let other_recip = Ratio::new_raw(other.denom.clone(), other_rem);
++                        self_recip.cmp(&other_recip).reverse()
++                    }
++                }
++            }
++        }
++    }
++}
++
++impl<T: Clone + Integer> PartialOrd for Ratio<T> {
++    #[inline]
++    fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
++        Some(self.cmp(other))
++    }
++}
++
++impl<T: Clone + Integer> PartialEq for Ratio<T> {
++    #[inline]
++    fn eq(&self, other: &Self) -> bool {
++        self.cmp(other) == cmp::Ordering::Equal
++    }
++}
++
++impl<T: Clone + Integer> Eq for Ratio<T> {}
++
++// NB: We can't just `#[derive(Hash)]`, because it needs to agree
++// with `Eq` even for non-reduced ratios.
++impl<T: Clone + Integer + Hash> Hash for Ratio<T> {
++    fn hash<H: Hasher>(&self, state: &mut H) {
++        recurse(&self.numer, &self.denom, state);
++
++        fn recurse<T: Integer + Hash, H: Hasher>(numer: &T, denom: &T, state: &mut H) {
++            if !denom.is_zero() {
++                let (int, rem) = numer.div_mod_floor(denom);
++                int.hash(state);
++                recurse(denom, &rem, state);
++            } else {
++                denom.hash(state);
++            }
++        }
++    }
++}
++
++
++macro_rules! forward_val_val_binop {
++    (impl $imp:ident, $method:ident) => {
++        impl<T: Clone + Integer> $imp<Ratio<T>> for Ratio<T> {
++            type Output = Ratio<T>;
++
++            #[inline]
++            fn $method(self, other: Ratio<T>) -> Ratio<T> {
++                (&self).$method(&other)
++            }
++        }
++    }
++}
++
++macro_rules! forward_ref_val_binop {
++    (impl $imp:ident, $method:ident) => {
++        impl<'a, T> $imp<Ratio<T>> for &'a Ratio<T> where
++            T: Clone + Integer
++        {
++            type Output = Ratio<T>;
++
++            #[inline]
++            fn $method(self, other: Ratio<T>) -> Ratio<T> {
++                self.$method(&other)
++            }
++        }
++    }
++}
++
++macro_rules! forward_val_ref_binop {
++    (impl $imp:ident, $method:ident) => {
++        impl<'a, T> $imp<&'a Ratio<T>> for Ratio<T> where
++            T: Clone + Integer
++        {
++            type Output = Ratio<T>;
++
++            #[inline]
++            fn $method(self, other: &Ratio<T>) -> Ratio<T> {
++                (&self).$method(other)
++            }
++        }
++    }
++}
++
++macro_rules! forward_all_binop {
++    (impl $imp:ident, $method:ident) => {
++        forward_val_val_binop!(impl $imp, $method);
++        forward_ref_val_binop!(impl $imp, $method);
++        forward_val_ref_binop!(impl $imp, $method);
++    };
++}
++
++// Arithmetic
++forward_all_binop!(impl Mul, mul);
++// a/b * c/d = (a*c)/(b*d)
++impl<'a, 'b, T> Mul<&'b Ratio<T>> for &'a Ratio<T>
++    where T: Clone + Integer
++{
++    type Output = Ratio<T>;
++    #[inline]
++    fn mul(self, rhs: &Ratio<T>) -> Ratio<T> {
++        Ratio::new(self.numer.clone() * rhs.numer.clone(),
++                   self.denom.clone() * rhs.denom.clone())
++    }
++}
++
++forward_all_binop!(impl Div, div);
++// (a/b) / (c/d) = (a*d)/(b*c)
++impl<'a, 'b, T> Div<&'b Ratio<T>> for &'a Ratio<T>
++    where T: Clone + Integer
++{
++    type Output = Ratio<T>;
++
++    #[inline]
++    fn div(self, rhs: &Ratio<T>) -> Ratio<T> {
++        Ratio::new(self.numer.clone() * rhs.denom.clone(),
++                   self.denom.clone() * rhs.numer.clone())
++    }
++}
++
++// Abstracts the a/b `op` c/d = (a*d `op` b*d) / (b*d) pattern
++macro_rules! arith_impl {
++    (impl $imp:ident, $method:ident) => {
++        forward_all_binop!(impl $imp, $method);
++        impl<'a, 'b, T: Clone + Integer>
++            $imp<&'b Ratio<T>> for &'a Ratio<T> {
++            type Output = Ratio<T>;
++            #[inline]
++            fn $method(self, rhs: &Ratio<T>) -> Ratio<T> {
++                Ratio::new((self.numer.clone() * rhs.denom.clone()).$method(self.denom.clone() * rhs.numer.clone()),
++                           self.denom.clone() * rhs.denom.clone())
++            }
++        }
++    }
++}
++
++// a/b + c/d = (a*d + b*c)/(b*d)
++arith_impl!(impl Add, add);
++
++// a/b - c/d = (a*d - b*c)/(b*d)
++arith_impl!(impl Sub, sub);
++
++// a/b % c/d = (a*d % b*c)/(b*d)
++arith_impl!(impl Rem, rem);
++
++impl<T> Neg for Ratio<T>
++    where T: Clone + Integer + Neg<Output = T>
++{
++    type Output = Ratio<T>;
++
++    #[inline]
++    fn neg(self) -> Ratio<T> {
++        Ratio::new_raw(-self.numer, self.denom)
++    }
++}
++
++impl<'a, T> Neg for &'a Ratio<T>
++    where T: Clone + Integer + Neg<Output = T>
++{
++    type Output = Ratio<T>;
++
++    #[inline]
++    fn neg(self) -> Ratio<T> {
++        -self.clone()
++    }
++}
++
++// Constants
++impl<T: Clone + Integer> Zero for Ratio<T> {
++    #[inline]
++    fn zero() -> Ratio<T> {
++        Ratio::new_raw(Zero::zero(), One::one())
++    }
++
++    #[inline]
++    fn is_zero(&self) -> bool {
++        self.numer.is_zero()
++    }
++}
++
++impl<T: Clone + Integer> One for Ratio<T> {
++    #[inline]
++    fn one() -> Ratio<T> {
++        Ratio::new_raw(One::one(), One::one())
++    }
++}
++
++impl<T: Clone + Integer> Num for Ratio<T> {
++    type FromStrRadixErr = ParseRatioError;
++
++    /// Parses `numer/denom` where the numbers are in base `radix`.
++    fn from_str_radix(s: &str, radix: u32) -> Result<Ratio<T>, ParseRatioError> {
++        let split: Vec<&str> = s.splitn(2, '/').collect();
++        if split.len() < 2 {
++            Err(ParseRatioError { kind: RatioErrorKind::ParseError })
++        } else {
++            let a_result: Result<T, _> = T::from_str_radix(split[0], radix).map_err(|_| {
++                ParseRatioError { kind: RatioErrorKind::ParseError }
++            });
++            a_result.and_then(|a| {
++                let b_result: Result<T, _> = T::from_str_radix(split[1], radix).map_err(|_| {
++                    ParseRatioError { kind: RatioErrorKind::ParseError }
++                });
++                b_result.and_then(|b| {
++                    if b.is_zero() {
++                        Err(ParseRatioError { kind: RatioErrorKind::ZeroDenominator })
++                    } else {
++                        Ok(Ratio::new(a.clone(), b.clone()))
++                    }
++                })
++            })
++        }
++    }
++}
++
++impl<T: Clone + Integer + Signed> Signed for Ratio<T> {
++    #[inline]
++    fn abs(&self) -> Ratio<T> {
++        if self.is_negative() {
++            -self.clone()
++        } else {
++            self.clone()
++        }
++    }
++
++    #[inline]
++    fn abs_sub(&self, other: &Ratio<T>) -> Ratio<T> {
++        if *self <= *other {
++            Zero::zero()
++        } else {
++            self - other
++        }
++    }
++
++    #[inline]
++    fn signum(&self) -> Ratio<T> {
++        if self.is_positive() {
++            Self::one()
++        } else if self.is_zero() {
++            Self::zero()
++        } else {
++            -Self::one()
++        }
++    }
++
++    #[inline]
++    fn is_positive(&self) -> bool {
++        (self.numer.is_positive() && self.denom.is_positive()) ||
++        (self.numer.is_negative() && self.denom.is_negative())
++    }
++
++    #[inline]
++    fn is_negative(&self) -> bool {
++        (self.numer.is_negative() && self.denom.is_positive()) ||
++        (self.numer.is_positive() && self.denom.is_negative())
++    }
++}
++
++// String conversions
++impl<T> fmt::Display for Ratio<T>
++    where T: fmt::Display + Eq + One
++{
++    /// Renders as `numer/denom`. If denom=1, renders as numer.
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        if self.denom == One::one() {
++            write!(f, "{}", self.numer)
++        } else {
++            write!(f, "{}/{}", self.numer, self.denom)
++        }
++    }
++}
++
++impl<T: FromStr + Clone + Integer> FromStr for Ratio<T> {
++    type Err = ParseRatioError;
++
++    /// Parses `numer/denom` or just `numer`.
++    fn from_str(s: &str) -> Result<Ratio<T>, ParseRatioError> {
++        let mut split = s.splitn(2, '/');
++
++        let n = try!(split.next().ok_or(ParseRatioError { kind: RatioErrorKind::ParseError }));
++        let num = try!(FromStr::from_str(n)
++                           .map_err(|_| ParseRatioError { kind: RatioErrorKind::ParseError }));
++
++        let d = split.next().unwrap_or("1");
++        let den = try!(FromStr::from_str(d)
++                           .map_err(|_| ParseRatioError { kind: RatioErrorKind::ParseError }));
++
++        if Zero::is_zero(&den) {
++            Err(ParseRatioError { kind: RatioErrorKind::ZeroDenominator })
++        } else {
++            Ok(Ratio::new(num, den))
++        }
++    }
++}
++
++impl<T> Into<(T, T)> for Ratio<T> {
++    fn into(self) -> (T, T) {
++        (self.numer, self.denom)
++    }
++}
++
++#[cfg(feature = "serde")]
++impl<T> serde::Serialize for Ratio<T>
++    where T: serde::Serialize + Clone + Integer + PartialOrd
++{
++    fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error>
++        where S: serde::Serializer
++    {
++        (self.numer(), self.denom()).serialize(serializer)
++    }
++}
++
++#[cfg(feature = "serde")]
++impl<T> serde::Deserialize for Ratio<T>
++    where T: serde::Deserialize + Clone + Integer + PartialOrd
++{
++    fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error>
++        where D: serde::Deserializer
++    {
++        let (numer, denom): (T,T) = try!(serde::Deserialize::deserialize(deserializer));
++        if denom.is_zero() {
++            Err(serde::de::Error::invalid_value("denominator is zero"))
++        } else {
++            Ok(Ratio::new_raw(numer, denom))
++        }
++    }
++}
++
++// FIXME: Bubble up specific errors
++#[derive(Copy, Clone, Debug, PartialEq)]
++pub struct ParseRatioError {
++    kind: RatioErrorKind,
++}
++
++#[derive(Copy, Clone, Debug, PartialEq)]
++enum RatioErrorKind {
++    ParseError,
++    ZeroDenominator,
++}
++
++impl fmt::Display for ParseRatioError {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        self.description().fmt(f)
++    }
++}
++
++impl Error for ParseRatioError {
++    fn description(&self) -> &str {
++        self.kind.description()
++    }
++}
++
++impl RatioErrorKind {
++    fn description(&self) -> &'static str {
++        match *self {
++            RatioErrorKind::ParseError => "failed to parse integer",
++            RatioErrorKind::ZeroDenominator => "zero value denominator",
++        }
++    }
++}
++
++#[cfg(feature = "num-bigint")]
++impl FromPrimitive for Ratio<BigInt> {
++    fn from_i64(n: i64) -> Option<Self> {
++        Some(Ratio::from_integer(n.into()))
++    }
++
++    fn from_u64(n: u64) -> Option<Self> {
++        Some(Ratio::from_integer(n.into()))
++    }
++
++    fn from_f32(n: f32) -> Option<Self> {
++        Ratio::from_float(n)
++    }
++
++    fn from_f64(n: f64) -> Option<Self> {
++        Ratio::from_float(n)
++    }
++}
++
++macro_rules! from_primitive_integer {
++    ($typ:ty, $approx:ident) => {
++        impl FromPrimitive for Ratio<$typ> {
++            fn from_i64(n: i64) -> Option<Self> {
++                <$typ as FromPrimitive>::from_i64(n).map(Ratio::from_integer)
++            }
++
++            fn from_u64(n: u64) -> Option<Self> {
++                <$typ as FromPrimitive>::from_u64(n).map(Ratio::from_integer)
++            }
++
++            fn from_f32(n: f32) -> Option<Self> {
++                $approx(n, 10e-20, 30)
++            }
++
++            fn from_f64(n: f64) -> Option<Self> {
++                $approx(n, 10e-20, 30)
++            }
++        }
++    }
++}
++
++from_primitive_integer!(i8, approximate_float);
++from_primitive_integer!(i16, approximate_float);
++from_primitive_integer!(i32, approximate_float);
++from_primitive_integer!(i64, approximate_float);
++from_primitive_integer!(isize, approximate_float);
++
++from_primitive_integer!(u8, approximate_float_unsigned);
++from_primitive_integer!(u16, approximate_float_unsigned);
++from_primitive_integer!(u32, approximate_float_unsigned);
++from_primitive_integer!(u64, approximate_float_unsigned);
++from_primitive_integer!(usize, approximate_float_unsigned);
++
++impl<T: Integer + Signed + Bounded + NumCast + Clone> Ratio<T> {
++    pub fn approximate_float<F: Float + NumCast>(f: F) -> Option<Ratio<T>> {
++        // 1/10e-20 < 1/2**32 which seems like a good default, and 30 seems
++        // to work well. Might want to choose something based on the types in the future, e.g.
++        // T::max().recip() and T::bits() or something similar.
++        let epsilon = <F as NumCast>::from(10e-20).expect("Can't convert 10e-20");
++        approximate_float(f, epsilon, 30)
++    }
++}
++
++fn approximate_float<T, F>(val: F, max_error: F, max_iterations: usize) -> Option<Ratio<T>>
++    where T: Integer + Signed + Bounded + NumCast + Clone,
++          F: Float + NumCast
++{
++    let negative = val.is_sign_negative();
++    let abs_val = val.abs();
++
++    let r = approximate_float_unsigned(abs_val, max_error, max_iterations);
++
++    // Make negative again if needed
++    if negative {
++        r.map(|r| r.neg())
++    } else {
++        r
++    }
++}
++
++// No Unsigned constraint because this also works on positive integers and is called
++// like that, see above
++fn approximate_float_unsigned<T, F>(val: F, max_error: F, max_iterations: usize) -> Option<Ratio<T>>
++    where T: Integer + Bounded + NumCast + Clone,
++          F: Float + NumCast
++{
++    // Continued fractions algorithm
++    // http://mathforum.org/dr.math/faq/faq.fractions.html#decfrac
++
++    if val < F::zero() {
++        return None;
++    }
++
++    let mut q = val;
++    let mut n0 = T::zero();
++    let mut d0 = T::one();
++    let mut n1 = T::one();
++    let mut d1 = T::zero();
++
++    let t_max = T::max_value();
++    let t_max_f = match <F as NumCast>::from(t_max.clone()) {
++        None => return None,
++        Some(t_max_f) => t_max_f,
++    };
++
++    // 1/epsilon > T::MAX
++    let epsilon = t_max_f.recip();
++
++    // Overflow
++    if q > t_max_f {
++        return None;
++    }
++
++    for _ in 0..max_iterations {
++        let a = match <T as NumCast>::from(q) {
++            None => break,
++            Some(a) => a,
++        };
++
++        let a_f = match <F as NumCast>::from(a.clone()) {
++            None => break,
++            Some(a_f) => a_f,
++        };
++        let f = q - a_f;
++
++        // Prevent overflow
++        if !a.is_zero() &&
++           (n1 > t_max.clone() / a.clone() ||
++            d1 > t_max.clone() / a.clone() ||
++            a.clone() * n1.clone() > t_max.clone() - n0.clone() ||
++            a.clone() * d1.clone() > t_max.clone() - d0.clone()) {
++            break;
++        }
++
++        let n = a.clone() * n1.clone() + n0.clone();
++        let d = a.clone() * d1.clone() + d0.clone();
++
++        n0 = n1;
++        d0 = d1;
++        n1 = n.clone();
++        d1 = d.clone();
++
++        // Simplify fraction. Doing so here instead of at the end
++        // allows us to get closer to the target value without overflows
++        let g = Integer::gcd(&n1, &d1);
++        if !g.is_zero() {
++            n1 = n1 / g.clone();
++            d1 = d1 / g.clone();
++        }
++
++        // Close enough?
++        let (n_f, d_f) = match (<F as NumCast>::from(n), <F as NumCast>::from(d)) {
++            (Some(n_f), Some(d_f)) => (n_f, d_f),
++            _ => break,
++        };
++        if (n_f / d_f - val).abs() < max_error {
++            break;
++        }
++
++        // Prevent division by ~0
++        if f < epsilon {
++            break;
++        }
++        q = f.recip();
++    }
++
++    // Overflow
++    if d1.is_zero() {
++        return None;
++    }
++
++    Some(Ratio::new(n1, d1))
++}
++
++#[cfg(test)]
++fn hash<T: Hash>(x: &T) -> u64 {
++    use std::hash::BuildHasher;
++    use std::collections::hash_map::RandomState;
++    let mut hasher = <RandomState as BuildHasher>::Hasher::new();
++    x.hash(&mut hasher);
++    hasher.finish()
++}
++
++#[cfg(test)]
++mod test {
++    use super::{Ratio, Rational};
++    #[cfg(feature = "num-bigint")]
++    use super::BigRational;
++
++    use std::str::FromStr;
++    use std::i32;
++    use std::f64;
++    use traits::{Zero, One, Signed, FromPrimitive};
++
++    pub const _0: Rational = Ratio {
++        numer: 0,
++        denom: 1,
++    };
++    pub const _1: Rational = Ratio {
++        numer: 1,
++        denom: 1,
++    };
++    pub const _2: Rational = Ratio {
++        numer: 2,
++        denom: 1,
++    };
++    pub const _NEG2: Rational = Ratio {
++        numer: -2,
++        denom: 1,
++    };
++    pub const _1_2: Rational = Ratio {
++        numer: 1,
++        denom: 2,
++    };
++    pub const _3_2: Rational = Ratio {
++        numer: 3,
++        denom: 2,
++    };
++    pub const _NEG1_2: Rational = Ratio {
++        numer: -1,
++        denom: 2,
++    };
++    pub const _1_NEG2: Rational = Ratio {
++        numer: 1,
++        denom: -2,
++    };
++    pub const _NEG1_NEG2: Rational = Ratio {
++        numer: -1,
++        denom: -2,
++    };
++    pub const _1_3: Rational = Ratio {
++        numer: 1,
++        denom: 3,
++    };
++    pub const _NEG1_3: Rational = Ratio {
++        numer: -1,
++        denom: 3,
++    };
++    pub const _2_3: Rational = Ratio {
++        numer: 2,
++        denom: 3,
++    };
++    pub const _NEG2_3: Rational = Ratio {
++        numer: -2,
++        denom: 3,
++    };
++
++    #[cfg(feature = "num-bigint")]
++    pub fn to_big(n: Rational) -> BigRational {
++        Ratio::new(FromPrimitive::from_isize(n.numer).unwrap(),
++                   FromPrimitive::from_isize(n.denom).unwrap())
++    }
++    #[cfg(not(feature = "num-bigint"))]
++    pub fn to_big(n: Rational) -> Rational {
++        Ratio::new(FromPrimitive::from_isize(n.numer).unwrap(),
++                   FromPrimitive::from_isize(n.denom).unwrap())
++    }
++
++    #[test]
++    fn test_test_constants() {
++        // check our constants are what Ratio::new etc. would make.
++        assert_eq!(_0, Zero::zero());
++        assert_eq!(_1, One::one());
++        assert_eq!(_2, Ratio::from_integer(2));
++        assert_eq!(_1_2, Ratio::new(1, 2));
++        assert_eq!(_3_2, Ratio::new(3, 2));
++        assert_eq!(_NEG1_2, Ratio::new(-1, 2));
++        assert_eq!(_2, From::from(2));
++    }
++
++    #[test]
++    fn test_new_reduce() {
++        let one22 = Ratio::new(2, 2);
++
++        assert_eq!(one22, One::one());
++    }
++    #[test]
++    #[should_panic]
++    fn test_new_zero() {
++        let _a = Ratio::new(1, 0);
++    }
++
++    #[test]
++    fn test_approximate_float() {
++        assert_eq!(Ratio::from_f32(0.5f32), Some(Ratio::new(1i64, 2)));
++        assert_eq!(Ratio::from_f64(0.5f64), Some(Ratio::new(1i32, 2)));
++        assert_eq!(Ratio::from_f32(5f32), Some(Ratio::new(5i64, 1)));
++        assert_eq!(Ratio::from_f64(5f64), Some(Ratio::new(5i32, 1)));
++        assert_eq!(Ratio::from_f32(29.97f32), Some(Ratio::new(2997i64, 100)));
++        assert_eq!(Ratio::from_f32(-29.97f32), Some(Ratio::new(-2997i64, 100)));
++
++        assert_eq!(Ratio::<i8>::from_f32(63.5f32), Some(Ratio::new(127i8, 2)));
++        assert_eq!(Ratio::<i8>::from_f32(126.5f32), Some(Ratio::new(126i8, 1)));
++        assert_eq!(Ratio::<i8>::from_f32(127.0f32), Some(Ratio::new(127i8, 1)));
++        assert_eq!(Ratio::<i8>::from_f32(127.5f32), None);
++        assert_eq!(Ratio::<i8>::from_f32(-63.5f32), Some(Ratio::new(-127i8, 2)));
++        assert_eq!(Ratio::<i8>::from_f32(-126.5f32), Some(Ratio::new(-126i8, 1)));
++        assert_eq!(Ratio::<i8>::from_f32(-127.0f32), Some(Ratio::new(-127i8, 1)));
++        assert_eq!(Ratio::<i8>::from_f32(-127.5f32), None);
++
++        assert_eq!(Ratio::<u8>::from_f32(-127f32), None);
++        assert_eq!(Ratio::<u8>::from_f32(127f32), Some(Ratio::new(127u8, 1)));
++        assert_eq!(Ratio::<u8>::from_f32(127.5f32), Some(Ratio::new(255u8, 2)));
++        assert_eq!(Ratio::<u8>::from_f32(256f32), None);
++
++        assert_eq!(Ratio::<i64>::from_f64(-10e200), None);
++        assert_eq!(Ratio::<i64>::from_f64(10e200), None);
++        assert_eq!(Ratio::<i64>::from_f64(f64::INFINITY), None);
++        assert_eq!(Ratio::<i64>::from_f64(f64::NEG_INFINITY), None);
++        assert_eq!(Ratio::<i64>::from_f64(f64::NAN), None);
++        assert_eq!(Ratio::<i64>::from_f64(f64::EPSILON), Some(Ratio::new(1, 4503599627370496)));
++        assert_eq!(Ratio::<i64>::from_f64(0.0), Some(Ratio::new(0, 1)));
++        assert_eq!(Ratio::<i64>::from_f64(-0.0), Some(Ratio::new(0, 1)));
++    }
++
++    #[test]
++    fn test_cmp() {
++        assert!(_0 == _0 && _1 == _1);
++        assert!(_0 != _1 && _1 != _0);
++        assert!(_0 < _1 && !(_1 < _0));
++        assert!(_1 > _0 && !(_0 > _1));
++
++        assert!(_0 <= _0 && _1 <= _1);
++        assert!(_0 <= _1 && !(_1 <= _0));
++
++        assert!(_0 >= _0 && _1 >= _1);
++        assert!(_1 >= _0 && !(_0 >= _1));
++    }
++
++    #[test]
++    fn test_cmp_overflow() {
++        use std::cmp::Ordering;
++
++        // issue #7 example:
++        let big = Ratio::new(128u8, 1);
++        let small = big.recip();
++        assert!(big > small);
++
++        // try a few that are closer together
++        // (some matching numer, some matching denom, some neither)
++        let ratios = vec![
++            Ratio::new(125_i8, 127_i8),
++            Ratio::new(63_i8, 64_i8),
++            Ratio::new(124_i8, 125_i8),
++            Ratio::new(125_i8, 126_i8),
++            Ratio::new(126_i8, 127_i8),
++            Ratio::new(127_i8, 126_i8),
++        ];
++
++        fn check_cmp(a: Ratio<i8>, b: Ratio<i8>, ord: Ordering) {
++            println!("comparing {} and {}", a, b);
++            assert_eq!(a.cmp(&b), ord);
++            assert_eq!(b.cmp(&a), ord.reverse());
++        }
++
++        for (i, &a) in ratios.iter().enumerate() {
++            check_cmp(a, a, Ordering::Equal);
++            check_cmp(-a, a, Ordering::Less);
++            for &b in &ratios[i + 1..] {
++                check_cmp(a, b, Ordering::Less);
++                check_cmp(-a, -b, Ordering::Greater);
++                check_cmp(a.recip(), b.recip(), Ordering::Greater);
++                check_cmp(-a.recip(), -b.recip(), Ordering::Less);
++            }
++        }
++    }
++
++    #[test]
++    fn test_to_integer() {
++        assert_eq!(_0.to_integer(), 0);
++        assert_eq!(_1.to_integer(), 1);
++        assert_eq!(_2.to_integer(), 2);
++        assert_eq!(_1_2.to_integer(), 0);
++        assert_eq!(_3_2.to_integer(), 1);
++        assert_eq!(_NEG1_2.to_integer(), 0);
++    }
++
++
++    #[test]
++    fn test_numer() {
++        assert_eq!(_0.numer(), &0);
++        assert_eq!(_1.numer(), &1);
++        assert_eq!(_2.numer(), &2);
++        assert_eq!(_1_2.numer(), &1);
++        assert_eq!(_3_2.numer(), &3);
++        assert_eq!(_NEG1_2.numer(), &(-1));
++    }
++    #[test]
++    fn test_denom() {
++        assert_eq!(_0.denom(), &1);
++        assert_eq!(_1.denom(), &1);
++        assert_eq!(_2.denom(), &1);
++        assert_eq!(_1_2.denom(), &2);
++        assert_eq!(_3_2.denom(), &2);
++        assert_eq!(_NEG1_2.denom(), &2);
++    }
++
++
++    #[test]
++    fn test_is_integer() {
++        assert!(_0.is_integer());
++        assert!(_1.is_integer());
++        assert!(_2.is_integer());
++        assert!(!_1_2.is_integer());
++        assert!(!_3_2.is_integer());
++        assert!(!_NEG1_2.is_integer());
++    }
++
++    #[test]
++    fn test_show() {
++        assert_eq!(format!("{}", _2), "2".to_string());
++        assert_eq!(format!("{}", _1_2), "1/2".to_string());
++        assert_eq!(format!("{}", _0), "0".to_string());
++        assert_eq!(format!("{}", Ratio::from_integer(-2)), "-2".to_string());
++    }
++
++    mod arith {
++        use super::{_0, _1, _2, _1_2, _3_2, _NEG1_2, to_big};
++        use super::super::{Ratio, Rational};
++
++        #[test]
++        fn test_add() {
++            fn test(a: Rational, b: Rational, c: Rational) {
++                assert_eq!(a + b, c);
++                assert_eq!(to_big(a) + to_big(b), to_big(c));
++            }
++
++            test(_1, _1_2, _3_2);
++            test(_1, _1, _2);
++            test(_1_2, _3_2, _2);
++            test(_1_2, _NEG1_2, _0);
++        }
++
++        #[test]
++        fn test_sub() {
++            fn test(a: Rational, b: Rational, c: Rational) {
++                assert_eq!(a - b, c);
++                assert_eq!(to_big(a) - to_big(b), to_big(c))
++            }
++
++            test(_1, _1_2, _1_2);
++            test(_3_2, _1_2, _1);
++            test(_1, _NEG1_2, _3_2);
++        }
++
++        #[test]
++        fn test_mul() {
++            fn test(a: Rational, b: Rational, c: Rational) {
++                assert_eq!(a * b, c);
++                assert_eq!(to_big(a) * to_big(b), to_big(c))
++            }
++
++            test(_1, _1_2, _1_2);
++            test(_1_2, _3_2, Ratio::new(3, 4));
++            test(_1_2, _NEG1_2, Ratio::new(-1, 4));
++        }
++
++        #[test]
++        fn test_div() {
++            fn test(a: Rational, b: Rational, c: Rational) {
++                assert_eq!(a / b, c);
++                assert_eq!(to_big(a) / to_big(b), to_big(c))
++            }
++
++            test(_1, _1_2, _2);
++            test(_3_2, _1_2, _1 + _2);
++            test(_1, _NEG1_2, _NEG1_2 + _NEG1_2 + _NEG1_2 + _NEG1_2);
++        }
++
++        #[test]
++        fn test_rem() {
++            fn test(a: Rational, b: Rational, c: Rational) {
++                assert_eq!(a % b, c);
++                assert_eq!(to_big(a) % to_big(b), to_big(c))
++            }
++
++            test(_3_2, _1, _1_2);
++            test(_2, _NEG1_2, _0);
++            test(_1_2, _2, _1_2);
++        }
++
++        #[test]
++        fn test_neg() {
++            fn test(a: Rational, b: Rational) {
++                assert_eq!(-a, b);
++                assert_eq!(-to_big(a), to_big(b))
++            }
++
++            test(_0, _0);
++            test(_1_2, _NEG1_2);
++            test(-_1, _1);
++        }
++        #[test]
++        fn test_zero() {
++            assert_eq!(_0 + _0, _0);
++            assert_eq!(_0 * _0, _0);
++            assert_eq!(_0 * _1, _0);
++            assert_eq!(_0 / _NEG1_2, _0);
++            assert_eq!(_0 - _0, _0);
++        }
++        #[test]
++        #[should_panic]
++        fn test_div_0() {
++            let _a = _1 / _0;
++        }
++    }
++
++    #[test]
++    fn test_round() {
++        assert_eq!(_1_3.ceil(), _1);
++        assert_eq!(_1_3.floor(), _0);
++        assert_eq!(_1_3.round(), _0);
++        assert_eq!(_1_3.trunc(), _0);
++
++        assert_eq!(_NEG1_3.ceil(), _0);
++        assert_eq!(_NEG1_3.floor(), -_1);
++        assert_eq!(_NEG1_3.round(), _0);
++        assert_eq!(_NEG1_3.trunc(), _0);
++
++        assert_eq!(_2_3.ceil(), _1);
++        assert_eq!(_2_3.floor(), _0);
++        assert_eq!(_2_3.round(), _1);
++        assert_eq!(_2_3.trunc(), _0);
++
++        assert_eq!(_NEG2_3.ceil(), _0);
++        assert_eq!(_NEG2_3.floor(), -_1);
++        assert_eq!(_NEG2_3.round(), -_1);
++        assert_eq!(_NEG2_3.trunc(), _0);
++
++        assert_eq!(_1_2.ceil(), _1);
++        assert_eq!(_1_2.floor(), _0);
++        assert_eq!(_1_2.round(), _1);
++        assert_eq!(_1_2.trunc(), _0);
++
++        assert_eq!(_NEG1_2.ceil(), _0);
++        assert_eq!(_NEG1_2.floor(), -_1);
++        assert_eq!(_NEG1_2.round(), -_1);
++        assert_eq!(_NEG1_2.trunc(), _0);
++
++        assert_eq!(_1.ceil(), _1);
++        assert_eq!(_1.floor(), _1);
++        assert_eq!(_1.round(), _1);
++        assert_eq!(_1.trunc(), _1);
++
++        // Overflow checks
++
++        let _neg1 = Ratio::from_integer(-1);
++        let _large_rat1 = Ratio::new(i32::MAX, i32::MAX - 1);
++        let _large_rat2 = Ratio::new(i32::MAX - 1, i32::MAX);
++        let _large_rat3 = Ratio::new(i32::MIN + 2, i32::MIN + 1);
++        let _large_rat4 = Ratio::new(i32::MIN + 1, i32::MIN + 2);
++        let _large_rat5 = Ratio::new(i32::MIN + 2, i32::MAX);
++        let _large_rat6 = Ratio::new(i32::MAX, i32::MIN + 2);
++        let _large_rat7 = Ratio::new(1, i32::MIN + 1);
++        let _large_rat8 = Ratio::new(1, i32::MAX);
++
++        assert_eq!(_large_rat1.round(), One::one());
++        assert_eq!(_large_rat2.round(), One::one());
++        assert_eq!(_large_rat3.round(), One::one());
++        assert_eq!(_large_rat4.round(), One::one());
++        assert_eq!(_large_rat5.round(), _neg1);
++        assert_eq!(_large_rat6.round(), _neg1);
++        assert_eq!(_large_rat7.round(), Zero::zero());
++        assert_eq!(_large_rat8.round(), Zero::zero());
++    }
++
++    #[test]
++    fn test_fract() {
++        assert_eq!(_1.fract(), _0);
++        assert_eq!(_NEG1_2.fract(), _NEG1_2);
++        assert_eq!(_1_2.fract(), _1_2);
++        assert_eq!(_3_2.fract(), _1_2);
++    }
++
++    #[test]
++    fn test_recip() {
++        assert_eq!(_1 * _1.recip(), _1);
++        assert_eq!(_2 * _2.recip(), _1);
++        assert_eq!(_1_2 * _1_2.recip(), _1);
++        assert_eq!(_3_2 * _3_2.recip(), _1);
++        assert_eq!(_NEG1_2 * _NEG1_2.recip(), _1);
++
++        assert_eq!(_3_2.recip(), _2_3);
++        assert_eq!(_NEG1_2.recip(), _NEG2);
++        assert_eq!(_NEG1_2.recip().denom(), &1);
++    }
++
++    #[test]
++    #[should_panic(expected = "== 0")]
++    fn test_recip_fail() {
++        let _a = Ratio::new(0, 1).recip();
++    }
++
++    #[test]
++    fn test_pow() {
++        assert_eq!(_1_2.pow(2), Ratio::new(1, 4));
++        assert_eq!(_1_2.pow(-2), Ratio::new(4, 1));
++        assert_eq!(_1.pow(1), _1);
++        assert_eq!(_NEG1_2.pow(2), _1_2.pow(2));
++        assert_eq!(_NEG1_2.pow(3), -_1_2.pow(3));
++        assert_eq!(_3_2.pow(0), _1);
++        assert_eq!(_3_2.pow(-1), _3_2.recip());
++        assert_eq!(_3_2.pow(3), Ratio::new(27, 8));
++    }
++
++    #[test]
++    fn test_to_from_str() {
++        fn test(r: Rational, s: String) {
++            assert_eq!(FromStr::from_str(&s), Ok(r));
++            assert_eq!(r.to_string(), s);
++        }
++        test(_1, "1".to_string());
++        test(_0, "0".to_string());
++        test(_1_2, "1/2".to_string());
++        test(_3_2, "3/2".to_string());
++        test(_2, "2".to_string());
++        test(_NEG1_2, "-1/2".to_string());
++    }
++    #[test]
++    fn test_from_str_fail() {
++        fn test(s: &str) {
++            let rational: Result<Rational, _> = FromStr::from_str(s);
++            assert!(rational.is_err());
++        }
++
++        let xs = ["0 /1", "abc", "", "1/", "--1/2", "3/2/1", "1/0"];
++        for &s in xs.iter() {
++            test(s);
++        }
++    }
++
++    #[cfg(feature = "num-bigint")]
++    #[test]
++    fn test_from_float() {
++        use traits::Float;
++        fn test<T: Float>(given: T, (numer, denom): (&str, &str)) {
++            let ratio: BigRational = Ratio::from_float(given).unwrap();
++            assert_eq!(ratio,
++                       Ratio::new(FromStr::from_str(numer).unwrap(),
++                                  FromStr::from_str(denom).unwrap()));
++        }
++
++        // f32
++        test(3.14159265359f32, ("13176795", "4194304"));
++        test(2f32.powf(100.), ("1267650600228229401496703205376", "1"));
++        test(-2f32.powf(100.), ("-1267650600228229401496703205376", "1"));
++        test(1.0 / 2f32.powf(100.),
++             ("1", "1267650600228229401496703205376"));
++        test(684729.48391f32, ("1369459", "2"));
++        test(-8573.5918555f32, ("-4389679", "512"));
++
++        // f64
++        test(3.14159265359f64, ("3537118876014453", "1125899906842624"));
++        test(2f64.powf(100.), ("1267650600228229401496703205376", "1"));
++        test(-2f64.powf(100.), ("-1267650600228229401496703205376", "1"));
++        test(684729.48391f64, ("367611342500051", "536870912"));
++        test(-8573.5918555f64, ("-4713381968463931", "549755813888"));
++        test(1.0 / 2f64.powf(100.),
++             ("1", "1267650600228229401496703205376"));
++    }
++
++    #[cfg(feature = "num-bigint")]
++    #[test]
++    fn test_from_float_fail() {
++        use std::{f32, f64};
++
++        assert_eq!(Ratio::from_float(f32::NAN), None);
++        assert_eq!(Ratio::from_float(f32::INFINITY), None);
++        assert_eq!(Ratio::from_float(f32::NEG_INFINITY), None);
++        assert_eq!(Ratio::from_float(f64::NAN), None);
++        assert_eq!(Ratio::from_float(f64::INFINITY), None);
++        assert_eq!(Ratio::from_float(f64::NEG_INFINITY), None);
++    }
++
++    #[test]
++    fn test_signed() {
++        assert_eq!(_NEG1_2.abs(), _1_2);
++        assert_eq!(_3_2.abs_sub(&_1_2), _1);
++        assert_eq!(_1_2.abs_sub(&_3_2), Zero::zero());
++        assert_eq!(_1_2.signum(), One::one());
++        assert_eq!(_NEG1_2.signum(), -<Ratio<isize>>::one());
++        assert_eq!(_0.signum(), Zero::zero());
++        assert!(_NEG1_2.is_negative());
++        assert!(_1_NEG2.is_negative());
++        assert!(!_NEG1_2.is_positive());
++        assert!(!_1_NEG2.is_positive());
++        assert!(_1_2.is_positive());
++        assert!(_NEG1_NEG2.is_positive());
++        assert!(!_1_2.is_negative());
++        assert!(!_NEG1_NEG2.is_negative());
++        assert!(!_0.is_positive());
++        assert!(!_0.is_negative());
++    }
++
++    #[test]
++    fn test_hash() {
++        assert!(::hash(&_0) != ::hash(&_1));
++        assert!(::hash(&_0) != ::hash(&_3_2));
++
++        // a == b -> hash(a) == hash(b)
++        let a = Rational::new_raw(4, 2);
++        let b = Rational::new_raw(6, 3);
++        assert_eq!(a, b);
++        assert_eq!(::hash(&a), ::hash(&b));
++
++        let a = Rational::new_raw(123456789, 1000);
++        let b = Rational::new_raw(123456789 * 5, 5000);
++        assert_eq!(a, b);
++        assert_eq!(::hash(&a), ::hash(&b));
++    }
++
++    #[test]
++    fn test_into_pair() {
++        assert_eq! ((0, 1), _0.into());
++        assert_eq! ((-2, 1), _NEG2.into());
++        assert_eq! ((1, -2), _1_NEG2.into());
++    }
++
++    #[test]
++    fn test_from_pair() {
++        assert_eq! (_0, Ratio::from ((0, 1)));
++        assert_eq! (_1, Ratio::from ((1, 1)));
++        assert_eq! (_NEG2, Ratio::from ((-2, 1)));
++        assert_eq! (_1_NEG2, Ratio::from ((1, -2)));
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2e1ff4eebf5ed9e48c664cf05d5fcf4d60dd5be2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"99843c856d68d8b4313b03a17e33c4bb42ae8f6610ea81b28abe076ac721b9b0"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f55687e70e033626f271fa61b20e4ac9fd869a01
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++[package]
++authors = ["The Rust Project Developers"]
++description = "Numeric traits for generic mathematics"
++documentation = "http://rust-num.github.io/num"
++homepage = "https://github.com/rust-num/num"
++keywords = ["mathematics", "numerics"]
++categories = [ "algorithms", "science" ]
++license = "MIT/Apache-2.0"
++repository = "https://github.com/rust-num/num"
++name = "num-traits"
++version = "0.1.40"
++
++[dependencies]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16fe87b06e802f094b3fbb0894b137bca2b16ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++                              Apache License
++                        Version 2.0, January 2004
++                     http://www.apache.org/licenses/
++
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++1. Definitions.
++
++   "License" shall mean the terms and conditions for use, reproduction,
++   and distribution as defined by Sections 1 through 9 of this document.
++
++   "Licensor" shall mean the copyright owner or entity authorized by
++   the copyright owner that is granting the License.
++
++   "Legal Entity" shall mean the union of the acting entity and all
++   other entities that control, are controlled by, or are under common
++   control with that entity. For the purposes of this definition,
++   "control" means (i) the power, direct or indirect, to cause the
++   direction or management of such entity, whether by contract or
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the
++   outstanding shares, or (iii) beneficial ownership of such entity.
++
++   "You" (or "Your") shall mean an individual or Legal Entity
++   exercising permissions granted by this License.
++
++   "Source" form shall mean the preferred form for making modifications,
++   including but not limited to software source code, documentation
++   source, and configuration files.
++
++   "Object" form shall mean any form resulting from mechanical
++   transformation or translation of a Source form, including but
++   not limited to compiled object code, generated documentation,
++   and conversions to other media types.
++
++   "Work" shall mean the work of authorship, whether in Source or
++   Object form, made available under the License, as indicated by a
++   copyright notice that is included in or attached to the work
++   (an example is provided in the Appendix below).
++
++   "Derivative Works" shall mean any work, whether in Source or Object
++   form, that is based on (or derived from) the Work and for which the
++   editorial revisions, annotations, elaborations, or other modifications
++   represent, as a whole, an original work of authorship. For the purposes
++   of this License, Derivative Works shall not include works that remain
++   separable from, or merely link (or bind by name) to the interfaces of,
++   the Work and Derivative Works thereof.
++
++   "Contribution" shall mean any work of authorship, including
++   the original version of the Work and any modifications or additions
++   to that Work or Derivative Works thereof, that is intentionally
++   submitted to Licensor for inclusion in the Work by the copyright owner
++   or by an individual or Legal Entity authorized to submit on behalf of
++   the copyright owner. For the purposes of this definition, "submitted"
++   means any form of electronic, verbal, or written communication sent
++   to the Licensor or its representatives, including but not limited to
++   communication on electronic mailing lists, source code control systems,
++   and issue tracking systems that are managed by, or on behalf of, the
++   Licensor for the purpose of discussing and improving the Work, but
++   excluding communication that is conspicuously marked or otherwise
++   designated in writing by the copyright owner as "Not a Contribution."
++
++   "Contributor" shall mean Licensor and any individual or Legal Entity
++   on behalf of whom a Contribution has been received by Licensor and
++   subsequently incorporated within the Work.
++
++2. Grant of Copyright License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   copyright license to reproduce, prepare Derivative Works of,
++   publicly display, publicly perform, sublicense, and distribute the
++   Work and such Derivative Works in Source or Object form.
++
++3. Grant of Patent License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   (except as stated in this section) patent license to make, have made,
++   use, offer to sell, sell, import, and otherwise transfer the Work,
++   where such license applies only to those patent claims licensable
++   by such Contributor that are necessarily infringed by their
++   Contribution(s) alone or by combination of their Contribution(s)
++   with the Work to which such Contribution(s) was submitted. If You
++   institute patent litigation against any entity (including a
++   cross-claim or counterclaim in a lawsuit) alleging that the Work
++   or a Contribution incorporated within the Work constitutes direct
++   or contributory patent infringement, then any patent licenses
++   granted to You under this License for that Work shall terminate
++   as of the date such litigation is filed.
++
++4. Redistribution. You may reproduce and distribute copies of the
++   Work or Derivative Works thereof in any medium, with or without
++   modifications, and in Source or Object form, provided that You
++   meet the following conditions:
++
++   (a) You must give any other recipients of the Work or
++       Derivative Works a copy of this License; and
++
++   (b) You must cause any modified files to carry prominent notices
++       stating that You changed the files; and
++
++   (c) You must retain, in the Source form of any Derivative Works
++       that You distribute, all copyright, patent, trademark, and
++       attribution notices from the Source form of the Work,
++       excluding those notices that do not pertain to any part of
++       the Derivative Works; and
++
++   (d) If the Work includes a "NOTICE" text file as part of its
++       distribution, then any Derivative Works that You distribute must
++       include a readable copy of the attribution notices contained
++       within such NOTICE file, excluding those notices that do not
++       pertain to any part of the Derivative Works, in at least one
++       of the following places: within a NOTICE text file distributed
++       as part of the Derivative Works; within the Source form or
++       documentation, if provided along with the Derivative Works; or,
++       within a display generated by the Derivative Works, if and
++       wherever such third-party notices normally appear. The contents
++       of the NOTICE file are for informational purposes only and
++       do not modify the License. You may add Your own attribution
++       notices within Derivative Works that You distribute, alongside
++       or as an addendum to the NOTICE text from the Work, provided
++       that such additional attribution notices cannot be construed
++       as modifying the License.
++
++   You may add Your own copyright statement to Your modifications and
++   may provide additional or different license terms and conditions
++   for use, reproduction, or distribution of Your modifications, or
++   for any such Derivative Works as a whole, provided Your use,
++   reproduction, and distribution of the Work otherwise complies with
++   the conditions stated in this License.
++
++5. Submission of Contributions. Unless You explicitly state otherwise,
++   any Contribution intentionally submitted for inclusion in the Work
++   by You to the Licensor shall be under the terms and conditions of
++   this License, without any additional terms or conditions.
++   Notwithstanding the above, nothing herein shall supersede or modify
++   the terms of any separate license agreement you may have executed
++   with Licensor regarding such Contributions.
++
++6. Trademarks. This License does not grant permission to use the trade
++   names, trademarks, service marks, or product names of the Licensor,
++   except as required for reasonable and customary use in describing the
++   origin of the Work and reproducing the content of the NOTICE file.
++
++7. Disclaimer of Warranty. Unless required by applicable law or
++   agreed to in writing, Licensor provides the Work (and each
++   Contributor provides its Contributions) on an "AS IS" BASIS,
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++   implied, including, without limitation, any warranties or conditions
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++   PARTICULAR PURPOSE. You are solely responsible for determining the
++   appropriateness of using or redistributing the Work and assume any
++   risks associated with Your exercise of permissions under this License.
++
++8. Limitation of Liability. In no event and under no legal theory,
++   whether in tort (including negligence), contract, or otherwise,
++   unless required by applicable law (such as deliberate and grossly
++   negligent acts) or agreed to in writing, shall any Contributor be
++   liable to You for damages, including any direct, indirect, special,
++   incidental, or consequential damages of any character arising as a
++   result of this License or out of the use or inability to use the
++   Work (including but not limited to damages for loss of goodwill,
++   work stoppage, computer failure or malfunction, or any and all
++   other commercial damages or losses), even if such Contributor
++   has been advised of the possibility of such damages.
++
++9. Accepting Warranty or Additional Liability. While redistributing
++   the Work or Derivative Works thereof, You may choose to offer,
++   and charge a fee for, acceptance of support, warranty, indemnity,
++   or other liability obligations and/or rights consistent with this
++   License. However, in accepting such obligations, You may act only
++   on Your own behalf and on Your sole responsibility, not on behalf
++   of any other Contributor, and only if You agree to indemnify,
++   defend, and hold each Contributor harmless for any liability
++   incurred by, or claims asserted against, such Contributor by reason
++   of your accepting any such warranty or additional liability.
++
++END OF TERMS AND CONDITIONS
++
++APPENDIX: How to apply the Apache License to your work.
++
++   To apply the Apache License to your work, attach the following
++   boilerplate notice, with the fields enclosed by brackets "[]"
++   replaced with your own identifying information. (Don't include
++   the brackets!)  The text should be enclosed in the appropriate
++   comment syntax for the file format. We also recommend that a
++   file or class name and description of purpose be included on the
++   same "printed page" as the copyright notice for easier
++   identification within third-party archives.
++
++Copyright [yyyy] [name of copyright owner]
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++      http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39d4bdb5acd313c1a92dbeaa1c379aaf0596a315
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2014 The Rust Project Developers
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ea5c811a7db273d294736524ca8552cbad85407a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,99 @@@
++use std::{usize, u8, u16, u32, u64};
++use std::{isize, i8, i16, i32, i64};
++use std::{f32, f64};
++use std::num::Wrapping;
++
++/// Numbers which have upper and lower bounds
++pub trait Bounded {
++    // FIXME (#5527): These should be associated constants
++    /// returns the smallest finite number this type can represent
++    fn min_value() -> Self;
++    /// returns the largest finite number this type can represent
++    fn max_value() -> Self;
++}
++
++macro_rules! bounded_impl {
++    ($t:ty, $min:expr, $max:expr) => {
++        impl Bounded for $t {
++            #[inline]
++            fn min_value() -> $t { $min }
++
++            #[inline]
++            fn max_value() -> $t { $max }
++        }
++    }
++}
++
++bounded_impl!(usize, usize::MIN, usize::MAX);
++bounded_impl!(u8,    u8::MIN,    u8::MAX);
++bounded_impl!(u16,   u16::MIN,   u16::MAX);
++bounded_impl!(u32,   u32::MIN,   u32::MAX);
++bounded_impl!(u64,   u64::MIN,   u64::MAX);
++
++bounded_impl!(isize, isize::MIN, isize::MAX);
++bounded_impl!(i8,    i8::MIN,    i8::MAX);
++bounded_impl!(i16,   i16::MIN,   i16::MAX);
++bounded_impl!(i32,   i32::MIN,   i32::MAX);
++bounded_impl!(i64,   i64::MIN,   i64::MAX);
++
++impl<T: Bounded> Bounded for Wrapping<T> {
++    fn min_value() -> Self { Wrapping(T::min_value()) }
++    fn max_value() -> Self { Wrapping(T::max_value()) }
++}
++
++bounded_impl!(f32, f32::MIN, f32::MAX);
++
++macro_rules! for_each_tuple_ {
++    ( $m:ident !! ) => (
++        $m! { }
++    );
++    ( $m:ident !! $h:ident, $($t:ident,)* ) => (
++        $m! { $h $($t)* }
++        for_each_tuple_! { $m !! $($t,)* }
++    );
++}
++macro_rules! for_each_tuple {
++    ( $m:ident ) => (
++        for_each_tuple_! { $m !! A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, }
++    );
++}
++
++macro_rules! bounded_tuple {
++    ( $($name:ident)* ) => (
++        impl<$($name: Bounded,)*> Bounded for ($($name,)*) {
++            #[inline]
++            fn min_value() -> Self {
++                ($($name::min_value(),)*)
++            }
++            #[inline]
++            fn max_value() -> Self {
++                ($($name::max_value(),)*)
++            }
++        }
++    );
++}
++
++for_each_tuple!(bounded_tuple);
++bounded_impl!(f64, f64::MIN, f64::MAX);
++
++
++macro_rules! test_wrapping_bounded {
++    ($($t:ty)+) => {
++        $(
++            assert_eq!(Wrapping::<$t>::min_value().0, <$t>::min_value());
++            assert_eq!(Wrapping::<$t>::max_value().0, <$t>::max_value());
++        )+   
++    };
++}
++
++#[test]
++fn wrapping_bounded() {
++    test_wrapping_bounded!(usize u8 u16 u32 u64 isize i8 i16 i32 i64);
++}
++
++#[test]
++fn wrapping_is_bounded() {
++    fn require_bounded<T: Bounded>(_: &T) {}
++    require_bounded(&Wrapping(42_u32));
++    require_bounded(&Wrapping(-42));
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8949834a1e61a0997bb4cf1c67f1c0f7cb697dc8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,511 @@@
++use std::mem::size_of;
++use std::num::Wrapping;
++
++use identities::Zero;
++use bounds::Bounded;
++
++/// A generic trait for converting a value to a number.
++pub trait ToPrimitive {
++    /// Converts the value of `self` to an `isize`.
++    #[inline]
++    fn to_isize(&self) -> Option<isize> {
++        self.to_i64().and_then(|x| x.to_isize())
++    }
++
++    /// Converts the value of `self` to an `i8`.
++    #[inline]
++    fn to_i8(&self) -> Option<i8> {
++        self.to_i64().and_then(|x| x.to_i8())
++    }
++
++    /// Converts the value of `self` to an `i16`.
++    #[inline]
++    fn to_i16(&self) -> Option<i16> {
++        self.to_i64().and_then(|x| x.to_i16())
++    }
++
++    /// Converts the value of `self` to an `i32`.
++    #[inline]
++    fn to_i32(&self) -> Option<i32> {
++        self.to_i64().and_then(|x| x.to_i32())
++    }
++
++    /// Converts the value of `self` to an `i64`.
++    fn to_i64(&self) -> Option<i64>;
++
++    /// Converts the value of `self` to a `usize`.
++    #[inline]
++    fn to_usize(&self) -> Option<usize> {
++        self.to_u64().and_then(|x| x.to_usize())
++    }
++
++    /// Converts the value of `self` to an `u8`.
++    #[inline]
++    fn to_u8(&self) -> Option<u8> {
++        self.to_u64().and_then(|x| x.to_u8())
++    }
++
++    /// Converts the value of `self` to an `u16`.
++    #[inline]
++    fn to_u16(&self) -> Option<u16> {
++        self.to_u64().and_then(|x| x.to_u16())
++    }
++
++    /// Converts the value of `self` to an `u32`.
++    #[inline]
++    fn to_u32(&self) -> Option<u32> {
++        self.to_u64().and_then(|x| x.to_u32())
++    }
++
++    /// Converts the value of `self` to an `u64`.
++    #[inline]
++    fn to_u64(&self) -> Option<u64>;
++
++    /// Converts the value of `self` to an `f32`.
++    #[inline]
++    fn to_f32(&self) -> Option<f32> {
++        self.to_f64().and_then(|x| x.to_f32())
++    }
++
++    /// Converts the value of `self` to an `f64`.
++    #[inline]
++    fn to_f64(&self) -> Option<f64> {
++        self.to_i64().and_then(|x| x.to_f64())
++    }
++}
++
++macro_rules! impl_to_primitive_int_to_int {
++    ($SrcT:ty, $DstT:ty, $slf:expr) => (
++        {
++            if size_of::<$SrcT>() <= size_of::<$DstT>() {
++                Some($slf as $DstT)
++            } else {
++                let n = $slf as i64;
++                let min_value: $DstT = Bounded::min_value();
++                let max_value: $DstT = Bounded::max_value();
++                if min_value as i64 <= n && n <= max_value as i64 {
++                    Some($slf as $DstT)
++                } else {
++                    None
++                }
++            }
++        }
++    )
++}
++
++macro_rules! impl_to_primitive_int_to_uint {
++    ($SrcT:ty, $DstT:ty, $slf:expr) => (
++        {
++            let zero: $SrcT = Zero::zero();
++            let max_value: $DstT = Bounded::max_value();
++            if zero <= $slf && $slf as u64 <= max_value as u64 {
++                Some($slf as $DstT)
++            } else {
++                None
++            }
++        }
++    )
++}
++
++macro_rules! impl_to_primitive_int {
++    ($T:ty) => (
++        impl ToPrimitive for $T {
++            #[inline]
++            fn to_isize(&self) -> Option<isize> { impl_to_primitive_int_to_int!($T, isize, *self) }
++            #[inline]
++            fn to_i8(&self) -> Option<i8> { impl_to_primitive_int_to_int!($T, i8, *self) }
++            #[inline]
++            fn to_i16(&self) -> Option<i16> { impl_to_primitive_int_to_int!($T, i16, *self) }
++            #[inline]
++            fn to_i32(&self) -> Option<i32> { impl_to_primitive_int_to_int!($T, i32, *self) }
++            #[inline]
++            fn to_i64(&self) -> Option<i64> { impl_to_primitive_int_to_int!($T, i64, *self) }
++
++            #[inline]
++            fn to_usize(&self) -> Option<usize> { impl_to_primitive_int_to_uint!($T, usize, *self) }
++            #[inline]
++            fn to_u8(&self) -> Option<u8> { impl_to_primitive_int_to_uint!($T, u8, *self) }
++            #[inline]
++            fn to_u16(&self) -> Option<u16> { impl_to_primitive_int_to_uint!($T, u16, *self) }
++            #[inline]
++            fn to_u32(&self) -> Option<u32> { impl_to_primitive_int_to_uint!($T, u32, *self) }
++            #[inline]
++            fn to_u64(&self) -> Option<u64> { impl_to_primitive_int_to_uint!($T, u64, *self) }
++
++            #[inline]
++            fn to_f32(&self) -> Option<f32> { Some(*self as f32) }
++            #[inline]
++            fn to_f64(&self) -> Option<f64> { Some(*self as f64) }
++        }
++    )
++}
++
++impl_to_primitive_int!(isize);
++impl_to_primitive_int!(i8);
++impl_to_primitive_int!(i16);
++impl_to_primitive_int!(i32);
++impl_to_primitive_int!(i64);
++
++macro_rules! impl_to_primitive_uint_to_int {
++    ($DstT:ty, $slf:expr) => (
++        {
++            let max_value: $DstT = Bounded::max_value();
++            if $slf as u64 <= max_value as u64 {
++                Some($slf as $DstT)
++            } else {
++                None
++            }
++        }
++    )
++}
++
++macro_rules! impl_to_primitive_uint_to_uint {
++    ($SrcT:ty, $DstT:ty, $slf:expr) => (
++        {
++            if size_of::<$SrcT>() <= size_of::<$DstT>() {
++                Some($slf as $DstT)
++            } else {
++                let zero: $SrcT = Zero::zero();
++                let max_value: $DstT = Bounded::max_value();
++                if zero <= $slf && $slf as u64 <= max_value as u64 {
++                    Some($slf as $DstT)
++                } else {
++                    None
++                }
++            }
++        }
++    )
++}
++
++macro_rules! impl_to_primitive_uint {
++    ($T:ty) => (
++        impl ToPrimitive for $T {
++            #[inline]
++            fn to_isize(&self) -> Option<isize> { impl_to_primitive_uint_to_int!(isize, *self) }
++            #[inline]
++            fn to_i8(&self) -> Option<i8> { impl_to_primitive_uint_to_int!(i8, *self) }
++            #[inline]
++            fn to_i16(&self) -> Option<i16> { impl_to_primitive_uint_to_int!(i16, *self) }
++            #[inline]
++            fn to_i32(&self) -> Option<i32> { impl_to_primitive_uint_to_int!(i32, *self) }
++            #[inline]
++            fn to_i64(&self) -> Option<i64> { impl_to_primitive_uint_to_int!(i64, *self) }
++
++            #[inline]
++            fn to_usize(&self) -> Option<usize> {
++                impl_to_primitive_uint_to_uint!($T, usize, *self)
++            }
++            #[inline]
++            fn to_u8(&self) -> Option<u8> { impl_to_primitive_uint_to_uint!($T, u8, *self) }
++            #[inline]
++            fn to_u16(&self) -> Option<u16> { impl_to_primitive_uint_to_uint!($T, u16, *self) }
++            #[inline]
++            fn to_u32(&self) -> Option<u32> { impl_to_primitive_uint_to_uint!($T, u32, *self) }
++            #[inline]
++            fn to_u64(&self) -> Option<u64> { impl_to_primitive_uint_to_uint!($T, u64, *self) }
++
++            #[inline]
++            fn to_f32(&self) -> Option<f32> { Some(*self as f32) }
++            #[inline]
++            fn to_f64(&self) -> Option<f64> { Some(*self as f64) }
++        }
++    )
++}
++
++impl_to_primitive_uint!(usize);
++impl_to_primitive_uint!(u8);
++impl_to_primitive_uint!(u16);
++impl_to_primitive_uint!(u32);
++impl_to_primitive_uint!(u64);
++
++macro_rules! impl_to_primitive_float_to_float {
++    ($SrcT:ident, $DstT:ident, $slf:expr) => (
++        if size_of::<$SrcT>() <= size_of::<$DstT>() {
++            Some($slf as $DstT)
++        } else {
++            // Make sure the value is in range for the cast.
++            // NaN and +-inf are cast as they are.
++            let n = $slf as f64;
++            let max_value: $DstT = ::std::$DstT::MAX;
++            if !n.is_finite() || (-max_value as f64 <= n && n <= max_value as f64) {
++                Some($slf as $DstT)
++            } else {
++                None
++            }
++        }
++    )
++}
++
++macro_rules! impl_to_primitive_float {
++    ($T:ident) => (
++        impl ToPrimitive for $T {
++            #[inline]
++            fn to_isize(&self) -> Option<isize> { Some(*self as isize) }
++            #[inline]
++            fn to_i8(&self) -> Option<i8> { Some(*self as i8) }
++            #[inline]
++            fn to_i16(&self) -> Option<i16> { Some(*self as i16) }
++            #[inline]
++            fn to_i32(&self) -> Option<i32> { Some(*self as i32) }
++            #[inline]
++            fn to_i64(&self) -> Option<i64> { Some(*self as i64) }
++
++            #[inline]
++            fn to_usize(&self) -> Option<usize> { Some(*self as usize) }
++            #[inline]
++            fn to_u8(&self) -> Option<u8> { Some(*self as u8) }
++            #[inline]
++            fn to_u16(&self) -> Option<u16> { Some(*self as u16) }
++            #[inline]
++            fn to_u32(&self) -> Option<u32> { Some(*self as u32) }
++            #[inline]
++            fn to_u64(&self) -> Option<u64> { Some(*self as u64) }
++
++            #[inline]
++            fn to_f32(&self) -> Option<f32> { impl_to_primitive_float_to_float!($T, f32, *self) }
++            #[inline]
++            fn to_f64(&self) -> Option<f64> { impl_to_primitive_float_to_float!($T, f64, *self) }
++        }
++    )
++}
++
++impl_to_primitive_float!(f32);
++impl_to_primitive_float!(f64);
++
++/// A generic trait for converting a number to a value.
++pub trait FromPrimitive: Sized {
++    /// Convert an `isize` to return an optional value of this type. If the
++    /// value cannot be represented by this value, the `None` is returned.
++    #[inline]
++    fn from_isize(n: isize) -> Option<Self> {
++        FromPrimitive::from_i64(n as i64)
++    }
++
++    /// Convert an `i8` to return an optional value of this type. If the
++    /// type cannot be represented by this value, the `None` is returned.
++    #[inline]
++    fn from_i8(n: i8) -> Option<Self> {
++        FromPrimitive::from_i64(n as i64)
++    }
++
++    /// Convert an `i16` to return an optional value of this type. If the
++    /// type cannot be represented by this value, the `None` is returned.
++    #[inline]
++    fn from_i16(n: i16) -> Option<Self> {
++        FromPrimitive::from_i64(n as i64)
++    }
++
++    /// Convert an `i32` to return an optional value of this type. If the
++    /// type cannot be represented by this value, the `None` is returned.
++    #[inline]
++    fn from_i32(n: i32) -> Option<Self> {
++        FromPrimitive::from_i64(n as i64)
++    }
++
++    /// Convert an `i64` to return an optional value of this type. If the
++    /// type cannot be represented by this value, the `None` is returned.
++    fn from_i64(n: i64) -> Option<Self>;
++
++    /// Convert a `usize` to return an optional value of this type. If the
++    /// type cannot be represented by this value, the `None` is returned.
++    #[inline]
++    fn from_usize(n: usize) -> Option<Self> {
++        FromPrimitive::from_u64(n as u64)
++    }
++
++    /// Convert an `u8` to return an optional value of this type. If the
++    /// type cannot be represented by this value, the `None` is returned.
++    #[inline]
++    fn from_u8(n: u8) -> Option<Self> {
++        FromPrimitive::from_u64(n as u64)
++    }
++
++    /// Convert an `u16` to return an optional value of this type. If the
++    /// type cannot be represented by this value, the `None` is returned.
++    #[inline]
++    fn from_u16(n: u16) -> Option<Self> {
++        FromPrimitive::from_u64(n as u64)
++    }
++
++    /// Convert an `u32` to return an optional value of this type. If the
++    /// type cannot be represented by this value, the `None` is returned.
++    #[inline]
++    fn from_u32(n: u32) -> Option<Self> {
++        FromPrimitive::from_u64(n as u64)
++    }
++
++    /// Convert an `u64` to return an optional value of this type. If the
++    /// type cannot be represented by this value, the `None` is returned.
++    fn from_u64(n: u64) -> Option<Self>;
++
++    /// Convert a `f32` to return an optional value of this type. If the
++    /// type cannot be represented by this value, the `None` is returned.
++    #[inline]
++    fn from_f32(n: f32) -> Option<Self> {
++        FromPrimitive::from_f64(n as f64)
++    }
++
++    /// Convert a `f64` to return an optional value of this type. If the
++    /// type cannot be represented by this value, the `None` is returned.
++    #[inline]
++    fn from_f64(n: f64) -> Option<Self> {
++        FromPrimitive::from_i64(n as i64)
++    }
++}
++
++macro_rules! impl_from_primitive {
++    ($T:ty, $to_ty:ident) => (
++        #[allow(deprecated)]
++        impl FromPrimitive for $T {
++            #[inline] fn from_i8(n: i8) -> Option<$T> { n.$to_ty() }
++            #[inline] fn from_i16(n: i16) -> Option<$T> { n.$to_ty() }
++            #[inline] fn from_i32(n: i32) -> Option<$T> { n.$to_ty() }
++            #[inline] fn from_i64(n: i64) -> Option<$T> { n.$to_ty() }
++
++            #[inline] fn from_u8(n: u8) -> Option<$T> { n.$to_ty() }
++            #[inline] fn from_u16(n: u16) -> Option<$T> { n.$to_ty() }
++            #[inline] fn from_u32(n: u32) -> Option<$T> { n.$to_ty() }
++            #[inline] fn from_u64(n: u64) -> Option<$T> { n.$to_ty() }
++
++            #[inline] fn from_f32(n: f32) -> Option<$T> { n.$to_ty() }
++            #[inline] fn from_f64(n: f64) -> Option<$T> { n.$to_ty() }
++        }
++    )
++}
++
++impl_from_primitive!(isize, to_isize);
++impl_from_primitive!(i8,    to_i8);
++impl_from_primitive!(i16,   to_i16);
++impl_from_primitive!(i32,   to_i32);
++impl_from_primitive!(i64,   to_i64);
++impl_from_primitive!(usize, to_usize);
++impl_from_primitive!(u8,    to_u8);
++impl_from_primitive!(u16,   to_u16);
++impl_from_primitive!(u32,   to_u32);
++impl_from_primitive!(u64,   to_u64);
++impl_from_primitive!(f32,   to_f32);
++impl_from_primitive!(f64,   to_f64);
++
++
++impl<T: ToPrimitive> ToPrimitive for Wrapping<T> {
++    fn to_i64(&self) -> Option<i64> { self.0.to_i64() }
++    fn to_u64(&self) -> Option<u64> { self.0.to_u64() }
++}
++impl<T: FromPrimitive> FromPrimitive for Wrapping<T> {
++    fn from_u64(n: u64) -> Option<Self> { T::from_u64(n).map(Wrapping) }
++    fn from_i64(n: i64) -> Option<Self> { T::from_i64(n).map(Wrapping) }
++}
++
++
++/// Cast from one machine scalar to another.
++///
++/// # Examples
++///
++/// ```
++/// # use num_traits as num;
++/// let twenty: f32 = num::cast(0x14).unwrap();
++/// assert_eq!(twenty, 20f32);
++/// ```
++///
++#[inline]
++pub fn cast<T: NumCast, U: NumCast>(n: T) -> Option<U> {
++    NumCast::from(n)
++}
++
++/// An interface for casting between machine scalars.
++pub trait NumCast: Sized + ToPrimitive {
++    /// Creates a number from another value that can be converted into
++    /// a primitive via the `ToPrimitive` trait.
++    fn from<T: ToPrimitive>(n: T) -> Option<Self>;
++}
++
++macro_rules! impl_num_cast {
++    ($T:ty, $conv:ident) => (
++        impl NumCast for $T {
++            #[inline]
++            #[allow(deprecated)]
++            fn from<N: ToPrimitive>(n: N) -> Option<$T> {
++                // `$conv` could be generated using `concat_idents!`, but that
++                // macro seems to be broken at the moment
++                n.$conv()
++            }
++        }
++    )
++}
++
++impl_num_cast!(u8,    to_u8);
++impl_num_cast!(u16,   to_u16);
++impl_num_cast!(u32,   to_u32);
++impl_num_cast!(u64,   to_u64);
++impl_num_cast!(usize, to_usize);
++impl_num_cast!(i8,    to_i8);
++impl_num_cast!(i16,   to_i16);
++impl_num_cast!(i32,   to_i32);
++impl_num_cast!(i64,   to_i64);
++impl_num_cast!(isize, to_isize);
++impl_num_cast!(f32,   to_f32);
++impl_num_cast!(f64,   to_f64);
++
++impl<T: NumCast> NumCast for Wrapping<T> {
++    fn from<U: ToPrimitive>(n: U) -> Option<Self> {
++        T::from(n).map(Wrapping)
++    }
++}
++
++#[test]
++fn to_primitive_float() {
++    use std::f32;
++    use std::f64;
++
++    let f32_toolarge = 1e39f64;
++    assert_eq!(f32_toolarge.to_f32(), None);
++    assert_eq!((f32::MAX as f64).to_f32(), Some(f32::MAX));
++    assert_eq!((-f32::MAX as f64).to_f32(), Some(-f32::MAX));
++    assert_eq!(f64::INFINITY.to_f32(), Some(f32::INFINITY));
++    assert_eq!((f64::NEG_INFINITY).to_f32(), Some(f32::NEG_INFINITY));
++    assert!((f64::NAN).to_f32().map_or(false, |f| f.is_nan()));
++}
++
++macro_rules! test_wrapping_to_primitive {
++    ($($t:ty)+) => {
++        $({
++            let i: $t = 0;
++            let w = Wrapping(i);
++            assert_eq!(i.to_u8(),    w.to_u8());
++            assert_eq!(i.to_u16(),   w.to_u16());
++            assert_eq!(i.to_u32(),   w.to_u32());
++            assert_eq!(i.to_u64(),   w.to_u64());
++            assert_eq!(i.to_usize(), w.to_usize());
++            assert_eq!(i.to_i8(),    w.to_i8());
++            assert_eq!(i.to_i16(),   w.to_i16());
++            assert_eq!(i.to_i32(),   w.to_i32());
++            assert_eq!(i.to_i64(),   w.to_i64());
++            assert_eq!(i.to_isize(), w.to_isize());
++            assert_eq!(i.to_f32(),   w.to_f32());
++            assert_eq!(i.to_f64(),   w.to_f64());
++        })+   
++    };
++}
++
++#[test]
++fn wrapping_to_primitive() {
++    test_wrapping_to_primitive!(usize u8 u16 u32 u64 isize i8 i16 i32 i64);
++}
++
++#[test]
++fn wrapping_is_toprimitive() {
++    fn require_toprimitive<T: ToPrimitive>(_: &T) {}
++    require_toprimitive(&Wrapping(42));
++}
++
++#[test]
++fn wrapping_is_fromprimitive() {
++    fn require_fromprimitive<T: FromPrimitive>(_: &T) {}
++    require_fromprimitive(&Wrapping(42));
++}
++
++#[test]
++fn wrapping_is_numcast() {
++    fn require_numcast<T: NumCast>(_: &T) {}
++    require_numcast(&Wrapping(42));
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3c8779a5f7cd59cc1049e2b0cb78dfe5a40fd052
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1344 @@@
++use std::mem;
++use std::ops::Neg;
++use std::num::FpCategory;
++
++// Used for default implementation of `epsilon`
++use std::f32;
++
++use {Num, NumCast};
++
++// FIXME: these doctests aren't actually helpful, because they're using and
++// testing the inherent methods directly, not going through `Float`.
++
++pub trait Float
++    : Num
++    + Copy
++    + NumCast
++    + PartialOrd
++    + Neg<Output = Self>
++{
++    /// Returns the `NaN` value.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let nan: f32 = Float::nan();
++    ///
++    /// assert!(nan.is_nan());
++    /// ```
++    fn nan() -> Self;
++    /// Returns the infinite value.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f32;
++    ///
++    /// let infinity: f32 = Float::infinity();
++    ///
++    /// assert!(infinity.is_infinite());
++    /// assert!(!infinity.is_finite());
++    /// assert!(infinity > f32::MAX);
++    /// ```
++    fn infinity() -> Self;
++    /// Returns the negative infinite value.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f32;
++    ///
++    /// let neg_infinity: f32 = Float::neg_infinity();
++    ///
++    /// assert!(neg_infinity.is_infinite());
++    /// assert!(!neg_infinity.is_finite());
++    /// assert!(neg_infinity < f32::MIN);
++    /// ```
++    fn neg_infinity() -> Self;
++    /// Returns `-0.0`.
++    ///
++    /// ```
++    /// use num_traits::{Zero, Float};
++    ///
++    /// let inf: f32 = Float::infinity();
++    /// let zero: f32 = Zero::zero();
++    /// let neg_zero: f32 = Float::neg_zero();
++    ///
++    /// assert_eq!(zero, neg_zero);
++    /// assert_eq!(7.0f32/inf, zero);
++    /// assert_eq!(zero * 10.0, zero);
++    /// ```
++    fn neg_zero() -> Self;
++
++    /// Returns the smallest finite value that this type can represent.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let x: f64 = Float::min_value();
++    ///
++    /// assert_eq!(x, f64::MIN);
++    /// ```
++    fn min_value() -> Self;
++
++    /// Returns the smallest positive, normalized value that this type can represent.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let x: f64 = Float::min_positive_value();
++    ///
++    /// assert_eq!(x, f64::MIN_POSITIVE);
++    /// ```
++    fn min_positive_value() -> Self;
++
++    /// Returns epsilon, a small positive value.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let x: f64 = Float::epsilon();
++    ///
++    /// assert_eq!(x, f64::EPSILON);
++    /// ```
++    ///
++    /// # Panics
++    ///
++    /// The default implementation will panic if `f32::EPSILON` cannot
++    /// be cast to `Self`.
++    fn epsilon() -> Self {
++        Self::from(f32::EPSILON).expect("Unable to cast from f32::EPSILON")
++    }
++
++    /// Returns the largest finite value that this type can represent.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let x: f64 = Float::max_value();
++    /// assert_eq!(x, f64::MAX);
++    /// ```
++    fn max_value() -> Self;
++
++    /// Returns `true` if this value is `NaN` and false otherwise.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let nan = f64::NAN;
++    /// let f = 7.0;
++    ///
++    /// assert!(nan.is_nan());
++    /// assert!(!f.is_nan());
++    /// ```
++    fn is_nan(self) -> bool;
++
++    /// Returns `true` if this value is positive infinity or negative infinity and
++    /// false otherwise.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f32;
++    ///
++    /// let f = 7.0f32;
++    /// let inf: f32 = Float::infinity();
++    /// let neg_inf: f32 = Float::neg_infinity();
++    /// let nan: f32 = f32::NAN;
++    ///
++    /// assert!(!f.is_infinite());
++    /// assert!(!nan.is_infinite());
++    ///
++    /// assert!(inf.is_infinite());
++    /// assert!(neg_inf.is_infinite());
++    /// ```
++    fn is_infinite(self) -> bool;
++
++    /// Returns `true` if this number is neither infinite nor `NaN`.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f32;
++    ///
++    /// let f = 7.0f32;
++    /// let inf: f32 = Float::infinity();
++    /// let neg_inf: f32 = Float::neg_infinity();
++    /// let nan: f32 = f32::NAN;
++    ///
++    /// assert!(f.is_finite());
++    ///
++    /// assert!(!nan.is_finite());
++    /// assert!(!inf.is_finite());
++    /// assert!(!neg_inf.is_finite());
++    /// ```
++    fn is_finite(self) -> bool;
++
++    /// Returns `true` if the number is neither zero, infinite,
++    /// [subnormal][subnormal], or `NaN`.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f32;
++    ///
++    /// let min = f32::MIN_POSITIVE; // 1.17549435e-38f32
++    /// let max = f32::MAX;
++    /// let lower_than_min = 1.0e-40_f32;
++    /// let zero = 0.0f32;
++    ///
++    /// assert!(min.is_normal());
++    /// assert!(max.is_normal());
++    ///
++    /// assert!(!zero.is_normal());
++    /// assert!(!f32::NAN.is_normal());
++    /// assert!(!f32::INFINITY.is_normal());
++    /// // Values between `0` and `min` are Subnormal.
++    /// assert!(!lower_than_min.is_normal());
++    /// ```
++    /// [subnormal]: http://en.wikipedia.org/wiki/Denormal_number
++    fn is_normal(self) -> bool;
++
++    /// Returns the floating point category of the number. If only one property
++    /// is going to be tested, it is generally faster to use the specific
++    /// predicate instead.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::num::FpCategory;
++    /// use std::f32;
++    ///
++    /// let num = 12.4f32;
++    /// let inf = f32::INFINITY;
++    ///
++    /// assert_eq!(num.classify(), FpCategory::Normal);
++    /// assert_eq!(inf.classify(), FpCategory::Infinite);
++    /// ```
++    fn classify(self) -> FpCategory;
++
++    /// Returns the largest integer less than or equal to a number.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let f = 3.99;
++    /// let g = 3.0;
++    ///
++    /// assert_eq!(f.floor(), 3.0);
++    /// assert_eq!(g.floor(), 3.0);
++    /// ```
++    fn floor(self) -> Self;
++
++    /// Returns the smallest integer greater than or equal to a number.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let f = 3.01;
++    /// let g = 4.0;
++    ///
++    /// assert_eq!(f.ceil(), 4.0);
++    /// assert_eq!(g.ceil(), 4.0);
++    /// ```
++    fn ceil(self) -> Self;
++
++    /// Returns the nearest integer to a number. Round half-way cases away from
++    /// `0.0`.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let f = 3.3;
++    /// let g = -3.3;
++    ///
++    /// assert_eq!(f.round(), 3.0);
++    /// assert_eq!(g.round(), -3.0);
++    /// ```
++    fn round(self) -> Self;
++
++    /// Return the integer part of a number.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let f = 3.3;
++    /// let g = -3.7;
++    ///
++    /// assert_eq!(f.trunc(), 3.0);
++    /// assert_eq!(g.trunc(), -3.0);
++    /// ```
++    fn trunc(self) -> Self;
++
++    /// Returns the fractional part of a number.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let x = 3.5;
++    /// let y = -3.5;
++    /// let abs_difference_x = (x.fract() - 0.5).abs();
++    /// let abs_difference_y = (y.fract() - (-0.5)).abs();
++    ///
++    /// assert!(abs_difference_x < 1e-10);
++    /// assert!(abs_difference_y < 1e-10);
++    /// ```
++    fn fract(self) -> Self;
++
++    /// Computes the absolute value of `self`. Returns `Float::nan()` if the
++    /// number is `Float::nan()`.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let x = 3.5;
++    /// let y = -3.5;
++    ///
++    /// let abs_difference_x = (x.abs() - x).abs();
++    /// let abs_difference_y = (y.abs() - (-y)).abs();
++    ///
++    /// assert!(abs_difference_x < 1e-10);
++    /// assert!(abs_difference_y < 1e-10);
++    ///
++    /// assert!(f64::NAN.abs().is_nan());
++    /// ```
++    fn abs(self) -> Self;
++
++    /// Returns a number that represents the sign of `self`.
++    ///
++    /// - `1.0` if the number is positive, `+0.0` or `Float::infinity()`
++    /// - `-1.0` if the number is negative, `-0.0` or `Float::neg_infinity()`
++    /// - `Float::nan()` if the number is `Float::nan()`
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let f = 3.5;
++    ///
++    /// assert_eq!(f.signum(), 1.0);
++    /// assert_eq!(f64::NEG_INFINITY.signum(), -1.0);
++    ///
++    /// assert!(f64::NAN.signum().is_nan());
++    /// ```
++    fn signum(self) -> Self;
++
++    /// Returns `true` if `self` is positive, including `+0.0`,
++    /// `Float::infinity()`, and with newer versions of Rust `f64::NAN`.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let neg_nan: f64 = -f64::NAN;
++    ///
++    /// let f = 7.0;
++    /// let g = -7.0;
++    ///
++    /// assert!(f.is_sign_positive());
++    /// assert!(!g.is_sign_positive());
++    /// assert!(!neg_nan.is_sign_positive());
++    /// ```
++    fn is_sign_positive(self) -> bool;
++
++    /// Returns `true` if `self` is negative, including `-0.0`,
++    /// `Float::neg_infinity()`, and with newer versions of Rust `-f64::NAN`.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let nan: f64 = f64::NAN;
++    ///
++    /// let f = 7.0;
++    /// let g = -7.0;
++    ///
++    /// assert!(!f.is_sign_negative());
++    /// assert!(g.is_sign_negative());
++    /// assert!(!nan.is_sign_negative());
++    /// ```
++    fn is_sign_negative(self) -> bool;
++
++    /// Fused multiply-add. Computes `(self * a) + b` with only one rounding
++    /// error. This produces a more accurate result with better performance than
++    /// a separate multiplication operation followed by an add.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let m = 10.0;
++    /// let x = 4.0;
++    /// let b = 60.0;
++    ///
++    /// // 100.0
++    /// let abs_difference = (m.mul_add(x, b) - (m*x + b)).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn mul_add(self, a: Self, b: Self) -> Self;
++    /// Take the reciprocal (inverse) of a number, `1/x`.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let x = 2.0;
++    /// let abs_difference = (x.recip() - (1.0/x)).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn recip(self) -> Self;
++
++    /// Raise a number to an integer power.
++    ///
++    /// Using this function is generally faster than using `powf`
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let x = 2.0;
++    /// let abs_difference = (x.powi(2) - x*x).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn powi(self, n: i32) -> Self;
++
++    /// Raise a number to a floating point power.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let x = 2.0;
++    /// let abs_difference = (x.powf(2.0) - x*x).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn powf(self, n: Self) -> Self;
++
++    /// Take the square root of a number.
++    ///
++    /// Returns NaN if `self` is a negative number.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let positive = 4.0;
++    /// let negative = -4.0;
++    ///
++    /// let abs_difference = (positive.sqrt() - 2.0).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// assert!(negative.sqrt().is_nan());
++    /// ```
++    fn sqrt(self) -> Self;
++
++    /// Returns `e^(self)`, (the exponential function).
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let one = 1.0;
++    /// // e^1
++    /// let e = one.exp();
++    ///
++    /// // ln(e) - 1 == 0
++    /// let abs_difference = (e.ln() - 1.0).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn exp(self) -> Self;
++
++    /// Returns `2^(self)`.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let f = 2.0;
++    ///
++    /// // 2^2 - 4 == 0
++    /// let abs_difference = (f.exp2() - 4.0).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn exp2(self) -> Self;
++
++    /// Returns the natural logarithm of the number.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let one = 1.0;
++    /// // e^1
++    /// let e = one.exp();
++    ///
++    /// // ln(e) - 1 == 0
++    /// let abs_difference = (e.ln() - 1.0).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn ln(self) -> Self;
++
++    /// Returns the logarithm of the number with respect to an arbitrary base.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let ten = 10.0;
++    /// let two = 2.0;
++    ///
++    /// // log10(10) - 1 == 0
++    /// let abs_difference_10 = (ten.log(10.0) - 1.0).abs();
++    ///
++    /// // log2(2) - 1 == 0
++    /// let abs_difference_2 = (two.log(2.0) - 1.0).abs();
++    ///
++    /// assert!(abs_difference_10 < 1e-10);
++    /// assert!(abs_difference_2 < 1e-10);
++    /// ```
++    fn log(self, base: Self) -> Self;
++
++    /// Returns the base 2 logarithm of the number.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let two = 2.0;
++    ///
++    /// // log2(2) - 1 == 0
++    /// let abs_difference = (two.log2() - 1.0).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn log2(self) -> Self;
++
++    /// Returns the base 10 logarithm of the number.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let ten = 10.0;
++    ///
++    /// // log10(10) - 1 == 0
++    /// let abs_difference = (ten.log10() - 1.0).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn log10(self) -> Self;
++
++    /// Converts radians to degrees.
++    ///
++    /// ```
++    /// use std::f64::consts;
++    ///
++    /// let angle = consts::PI;
++    ///
++    /// let abs_difference = (angle.to_degrees() - 180.0).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    #[inline]
++    fn to_degrees(self) -> Self {
++        let halfpi = Self::zero().acos();
++        let ninety = Self::from(90u8).unwrap();
++        self * ninety / halfpi
++    }
++
++    /// Converts degrees to radians.
++    ///
++    /// ```
++    /// use std::f64::consts;
++    ///
++    /// let angle = 180.0_f64;
++    ///
++    /// let abs_difference = (angle.to_radians() - consts::PI).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    #[inline]
++    fn to_radians(self) -> Self {
++        let halfpi = Self::zero().acos();
++        let ninety = Self::from(90u8).unwrap();
++        self * halfpi / ninety
++    }
++
++    /// Returns the maximum of the two numbers.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let x = 1.0;
++    /// let y = 2.0;
++    ///
++    /// assert_eq!(x.max(y), y);
++    /// ```
++    fn max(self, other: Self) -> Self;
++
++    /// Returns the minimum of the two numbers.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let x = 1.0;
++    /// let y = 2.0;
++    ///
++    /// assert_eq!(x.min(y), x);
++    /// ```
++    fn min(self, other: Self) -> Self;
++
++    /// The positive difference of two numbers.
++    ///
++    /// * If `self <= other`: `0:0`
++    /// * Else: `self - other`
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let x = 3.0;
++    /// let y = -3.0;
++    ///
++    /// let abs_difference_x = (x.abs_sub(1.0) - 2.0).abs();
++    /// let abs_difference_y = (y.abs_sub(1.0) - 0.0).abs();
++    ///
++    /// assert!(abs_difference_x < 1e-10);
++    /// assert!(abs_difference_y < 1e-10);
++    /// ```
++    fn abs_sub(self, other: Self) -> Self;
++
++    /// Take the cubic root of a number.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let x = 8.0;
++    ///
++    /// // x^(1/3) - 2 == 0
++    /// let abs_difference = (x.cbrt() - 2.0).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn cbrt(self) -> Self;
++
++    /// Calculate the length of the hypotenuse of a right-angle triangle given
++    /// legs of length `x` and `y`.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let x = 2.0;
++    /// let y = 3.0;
++    ///
++    /// // sqrt(x^2 + y^2)
++    /// let abs_difference = (x.hypot(y) - (x.powi(2) + y.powi(2)).sqrt()).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn hypot(self, other: Self) -> Self;
++
++    /// Computes the sine of a number (in radians).
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let x = f64::consts::PI/2.0;
++    ///
++    /// let abs_difference = (x.sin() - 1.0).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn sin(self) -> Self;
++
++    /// Computes the cosine of a number (in radians).
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let x = 2.0*f64::consts::PI;
++    ///
++    /// let abs_difference = (x.cos() - 1.0).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn cos(self) -> Self;
++
++    /// Computes the tangent of a number (in radians).
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let x = f64::consts::PI/4.0;
++    /// let abs_difference = (x.tan() - 1.0).abs();
++    ///
++    /// assert!(abs_difference < 1e-14);
++    /// ```
++    fn tan(self) -> Self;
++
++    /// Computes the arcsine of a number. Return value is in radians in
++    /// the range [-pi/2, pi/2] or NaN if the number is outside the range
++    /// [-1, 1].
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let f = f64::consts::PI / 2.0;
++    ///
++    /// // asin(sin(pi/2))
++    /// let abs_difference = (f.sin().asin() - f64::consts::PI / 2.0).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn asin(self) -> Self;
++
++    /// Computes the arccosine of a number. Return value is in radians in
++    /// the range [0, pi] or NaN if the number is outside the range
++    /// [-1, 1].
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let f = f64::consts::PI / 4.0;
++    ///
++    /// // acos(cos(pi/4))
++    /// let abs_difference = (f.cos().acos() - f64::consts::PI / 4.0).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn acos(self) -> Self;
++
++    /// Computes the arctangent of a number. Return value is in radians in the
++    /// range [-pi/2, pi/2];
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let f = 1.0;
++    ///
++    /// // atan(tan(1))
++    /// let abs_difference = (f.tan().atan() - 1.0).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn atan(self) -> Self;
++
++    /// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`).
++    ///
++    /// * `x = 0`, `y = 0`: `0`
++    /// * `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
++    /// * `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
++    /// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)`
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let pi = f64::consts::PI;
++    /// // All angles from horizontal right (+x)
++    /// // 45 deg counter-clockwise
++    /// let x1 = 3.0;
++    /// let y1 = -3.0;
++    ///
++    /// // 135 deg clockwise
++    /// let x2 = -3.0;
++    /// let y2 = 3.0;
++    ///
++    /// let abs_difference_1 = (y1.atan2(x1) - (-pi/4.0)).abs();
++    /// let abs_difference_2 = (y2.atan2(x2) - 3.0*pi/4.0).abs();
++    ///
++    /// assert!(abs_difference_1 < 1e-10);
++    /// assert!(abs_difference_2 < 1e-10);
++    /// ```
++    fn atan2(self, other: Self) -> Self;
++
++    /// Simultaneously computes the sine and cosine of the number, `x`. Returns
++    /// `(sin(x), cos(x))`.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let x = f64::consts::PI/4.0;
++    /// let f = x.sin_cos();
++    ///
++    /// let abs_difference_0 = (f.0 - x.sin()).abs();
++    /// let abs_difference_1 = (f.1 - x.cos()).abs();
++    ///
++    /// assert!(abs_difference_0 < 1e-10);
++    /// assert!(abs_difference_0 < 1e-10);
++    /// ```
++    fn sin_cos(self) -> (Self, Self);
++
++    /// Returns `e^(self) - 1` in a way that is accurate even if the
++    /// number is close to zero.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let x = 7.0;
++    ///
++    /// // e^(ln(7)) - 1
++    /// let abs_difference = (x.ln().exp_m1() - 6.0).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn exp_m1(self) -> Self;
++
++    /// Returns `ln(1+n)` (natural logarithm) more accurately than if
++    /// the operations were performed separately.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let x = f64::consts::E - 1.0;
++    ///
++    /// // ln(1 + (e - 1)) == ln(e) == 1
++    /// let abs_difference = (x.ln_1p() - 1.0).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn ln_1p(self) -> Self;
++
++    /// Hyperbolic sine function.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let e = f64::consts::E;
++    /// let x = 1.0;
++    ///
++    /// let f = x.sinh();
++    /// // Solving sinh() at 1 gives `(e^2-1)/(2e)`
++    /// let g = (e*e - 1.0)/(2.0*e);
++    /// let abs_difference = (f - g).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    fn sinh(self) -> Self;
++
++    /// Hyperbolic cosine function.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let e = f64::consts::E;
++    /// let x = 1.0;
++    /// let f = x.cosh();
++    /// // Solving cosh() at 1 gives this result
++    /// let g = (e*e + 1.0)/(2.0*e);
++    /// let abs_difference = (f - g).abs();
++    ///
++    /// // Same result
++    /// assert!(abs_difference < 1.0e-10);
++    /// ```
++    fn cosh(self) -> Self;
++
++    /// Hyperbolic tangent function.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let e = f64::consts::E;
++    /// let x = 1.0;
++    ///
++    /// let f = x.tanh();
++    /// // Solving tanh() at 1 gives `(1 - e^(-2))/(1 + e^(-2))`
++    /// let g = (1.0 - e.powi(-2))/(1.0 + e.powi(-2));
++    /// let abs_difference = (f - g).abs();
++    ///
++    /// assert!(abs_difference < 1.0e-10);
++    /// ```
++    fn tanh(self) -> Self;
++
++    /// Inverse hyperbolic sine function.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let x = 1.0;
++    /// let f = x.sinh().asinh();
++    ///
++    /// let abs_difference = (f - x).abs();
++    ///
++    /// assert!(abs_difference < 1.0e-10);
++    /// ```
++    fn asinh(self) -> Self;
++
++    /// Inverse hyperbolic cosine function.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let x = 1.0;
++    /// let f = x.cosh().acosh();
++    ///
++    /// let abs_difference = (f - x).abs();
++    ///
++    /// assert!(abs_difference < 1.0e-10);
++    /// ```
++    fn acosh(self) -> Self;
++
++    /// Inverse hyperbolic tangent function.
++    ///
++    /// ```
++    /// use num_traits::Float;
++    /// use std::f64;
++    ///
++    /// let e = f64::consts::E;
++    /// let f = e.tanh().atanh();
++    ///
++    /// let abs_difference = (f - e).abs();
++    ///
++    /// assert!(abs_difference < 1.0e-10);
++    /// ```
++    fn atanh(self) -> Self;
++
++
++    /// Returns the mantissa, base 2 exponent, and sign as integers, respectively.
++    /// The original number can be recovered by `sign * mantissa * 2 ^ exponent`.
++    /// The floating point encoding is documented in the [Reference][floating-point].
++    ///
++    /// ```
++    /// use num_traits::Float;
++    ///
++    /// let num = 2.0f32;
++    ///
++    /// // (8388608, -22, 1)
++    /// let (mantissa, exponent, sign) = Float::integer_decode(num);
++    /// let sign_f = sign as f32;
++    /// let mantissa_f = mantissa as f32;
++    /// let exponent_f = num.powf(exponent as f32);
++    ///
++    /// // 1 * 8388608 * 2^(-22) == 2
++    /// let abs_difference = (sign_f * mantissa_f * exponent_f - num).abs();
++    ///
++    /// assert!(abs_difference < 1e-10);
++    /// ```
++    /// [floating-point]: ../../../../../reference.html#machine-types
++    fn integer_decode(self) -> (u64, i16, i8);
++}
++
++macro_rules! float_impl {
++    ($T:ident $decode:ident) => (
++        impl Float for $T {
++            #[inline]
++            fn nan() -> Self {
++                ::std::$T::NAN
++            }
++
++            #[inline]
++            fn infinity() -> Self {
++                ::std::$T::INFINITY
++            }
++
++            #[inline]
++            fn neg_infinity() -> Self {
++                ::std::$T::NEG_INFINITY
++            }
++
++            #[inline]
++            fn neg_zero() -> Self {
++                -0.0
++            }
++
++            #[inline]
++            fn min_value() -> Self {
++                ::std::$T::MIN
++            }
++
++            #[inline]
++            fn min_positive_value() -> Self {
++                ::std::$T::MIN_POSITIVE
++            }
++
++            #[inline]
++            fn epsilon() -> Self {
++                ::std::$T::EPSILON
++            }
++
++            #[inline]
++            fn max_value() -> Self {
++                ::std::$T::MAX
++            }
++
++            #[inline]
++            fn is_nan(self) -> bool {
++                <$T>::is_nan(self)
++            }
++
++            #[inline]
++            fn is_infinite(self) -> bool {
++                <$T>::is_infinite(self)
++            }
++
++            #[inline]
++            fn is_finite(self) -> bool {
++                <$T>::is_finite(self)
++            }
++
++            #[inline]
++            fn is_normal(self) -> bool {
++                <$T>::is_normal(self)
++            }
++
++            #[inline]
++            fn classify(self) -> FpCategory {
++                <$T>::classify(self)
++            }
++
++            #[inline]
++            fn floor(self) -> Self {
++                <$T>::floor(self)
++            }
++
++            #[inline]
++            fn ceil(self) -> Self {
++                <$T>::ceil(self)
++            }
++
++            #[inline]
++            fn round(self) -> Self {
++                <$T>::round(self)
++            }
++
++            #[inline]
++            fn trunc(self) -> Self {
++                <$T>::trunc(self)
++            }
++
++            #[inline]
++            fn fract(self) -> Self {
++                <$T>::fract(self)
++            }
++
++            #[inline]
++            fn abs(self) -> Self {
++                <$T>::abs(self)
++            }
++
++            #[inline]
++            fn signum(self) -> Self {
++                <$T>::signum(self)
++            }
++
++            #[inline]
++            fn is_sign_positive(self) -> bool {
++                <$T>::is_sign_positive(self)
++            }
++
++            #[inline]
++            fn is_sign_negative(self) -> bool {
++                <$T>::is_sign_negative(self)
++            }
++
++            #[inline]
++            fn mul_add(self, a: Self, b: Self) -> Self {
++                <$T>::mul_add(self, a, b)
++            }
++
++            #[inline]
++            fn recip(self) -> Self {
++                <$T>::recip(self)
++            }
++
++            #[inline]
++            fn powi(self, n: i32) -> Self {
++                <$T>::powi(self, n)
++            }
++
++            #[inline]
++            fn powf(self, n: Self) -> Self {
++                <$T>::powf(self, n)
++            }
++
++            #[inline]
++            fn sqrt(self) -> Self {
++                <$T>::sqrt(self)
++            }
++
++            #[inline]
++            fn exp(self) -> Self {
++                <$T>::exp(self)
++            }
++
++            #[inline]
++            fn exp2(self) -> Self {
++                <$T>::exp2(self)
++            }
++
++            #[inline]
++            fn ln(self) -> Self {
++                <$T>::ln(self)
++            }
++
++            #[inline]
++            fn log(self, base: Self) -> Self {
++                <$T>::log(self, base)
++            }
++
++            #[inline]
++            fn log2(self) -> Self {
++                <$T>::log2(self)
++            }
++
++            #[inline]
++            fn log10(self) -> Self {
++                <$T>::log10(self)
++            }
++
++            #[inline]
++            fn to_degrees(self) -> Self {
++                // NB: `f32` didn't stabilize this until 1.7
++                // <$T>::to_degrees(self)
++                self * (180. / ::std::$T::consts::PI)
++            }
++
++            #[inline]
++            fn to_radians(self) -> Self {
++                // NB: `f32` didn't stabilize this until 1.7
++                // <$T>::to_radians(self)
++                self * (::std::$T::consts::PI / 180.)
++            }
++
++            #[inline]
++            fn max(self, other: Self) -> Self {
++                <$T>::max(self, other)
++            }
++
++            #[inline]
++            fn min(self, other: Self) -> Self {
++                <$T>::min(self, other)
++            }
++
++            #[inline]
++            #[allow(deprecated)]
++            fn abs_sub(self, other: Self) -> Self {
++                <$T>::abs_sub(self, other)
++            }
++
++            #[inline]
++            fn cbrt(self) -> Self {
++                <$T>::cbrt(self)
++            }
++
++            #[inline]
++            fn hypot(self, other: Self) -> Self {
++                <$T>::hypot(self, other)
++            }
++
++            #[inline]
++            fn sin(self) -> Self {
++                <$T>::sin(self)
++            }
++
++            #[inline]
++            fn cos(self) -> Self {
++                <$T>::cos(self)
++            }
++
++            #[inline]
++            fn tan(self) -> Self {
++                <$T>::tan(self)
++            }
++
++            #[inline]
++            fn asin(self) -> Self {
++                <$T>::asin(self)
++            }
++
++            #[inline]
++            fn acos(self) -> Self {
++                <$T>::acos(self)
++            }
++
++            #[inline]
++            fn atan(self) -> Self {
++                <$T>::atan(self)
++            }
++
++            #[inline]
++            fn atan2(self, other: Self) -> Self {
++                <$T>::atan2(self, other)
++            }
++
++            #[inline]
++            fn sin_cos(self) -> (Self, Self) {
++                <$T>::sin_cos(self)
++            }
++
++            #[inline]
++            fn exp_m1(self) -> Self {
++                <$T>::exp_m1(self)
++            }
++
++            #[inline]
++            fn ln_1p(self) -> Self {
++                <$T>::ln_1p(self)
++            }
++
++            #[inline]
++            fn sinh(self) -> Self {
++                <$T>::sinh(self)
++            }
++
++            #[inline]
++            fn cosh(self) -> Self {
++                <$T>::cosh(self)
++            }
++
++            #[inline]
++            fn tanh(self) -> Self {
++                <$T>::tanh(self)
++            }
++
++            #[inline]
++            fn asinh(self) -> Self {
++                <$T>::asinh(self)
++            }
++
++            #[inline]
++            fn acosh(self) -> Self {
++                <$T>::acosh(self)
++            }
++
++            #[inline]
++            fn atanh(self) -> Self {
++                <$T>::atanh(self)
++            }
++
++            #[inline]
++            fn integer_decode(self) -> (u64, i16, i8) {
++                $decode(self)
++            }
++        }
++    )
++}
++
++fn integer_decode_f32(f: f32) -> (u64, i16, i8) {
++    let bits: u32 = unsafe { mem::transmute(f) };
++    let sign: i8 = if bits >> 31 == 0 {
++        1
++    } else {
++        -1
++    };
++    let mut exponent: i16 = ((bits >> 23) & 0xff) as i16;
++    let mantissa = if exponent == 0 {
++        (bits & 0x7fffff) << 1
++    } else {
++        (bits & 0x7fffff) | 0x800000
++    };
++    // Exponent bias + mantissa shift
++    exponent -= 127 + 23;
++    (mantissa as u64, exponent, sign)
++}
++
++fn integer_decode_f64(f: f64) -> (u64, i16, i8) {
++    let bits: u64 = unsafe { mem::transmute(f) };
++    let sign: i8 = if bits >> 63 == 0 {
++        1
++    } else {
++        -1
++    };
++    let mut exponent: i16 = ((bits >> 52) & 0x7ff) as i16;
++    let mantissa = if exponent == 0 {
++        (bits & 0xfffffffffffff) << 1
++    } else {
++        (bits & 0xfffffffffffff) | 0x10000000000000
++    };
++    // Exponent bias + mantissa shift
++    exponent -= 1023 + 52;
++    (mantissa, exponent, sign)
++}
++
++float_impl!(f32 integer_decode_f32);
++float_impl!(f64 integer_decode_f64);
++
++macro_rules! float_const_impl {
++    ($(#[$doc:meta] $constant:ident,)+) => (
++        #[allow(non_snake_case)]
++        pub trait FloatConst {
++            $(#[$doc] fn $constant() -> Self;)+
++        }
++        float_const_impl! { @float f32, $($constant,)+ }
++        float_const_impl! { @float f64, $($constant,)+ }
++    );
++    (@float $T:ident, $($constant:ident,)+) => (
++        impl FloatConst for $T {
++            $(
++                #[inline]
++                fn $constant() -> Self {
++                    ::std::$T::consts::$constant
++                }
++            )+
++        }
++    );
++}
++
++float_const_impl! {
++    #[doc = "Return Euler’s number."]
++    E,
++    #[doc = "Return `1.0 / π`."]
++    FRAC_1_PI,
++    #[doc = "Return `1.0 / sqrt(2.0)`."]
++    FRAC_1_SQRT_2,
++    #[doc = "Return `2.0 / π`."]
++    FRAC_2_PI,
++    #[doc = "Return `2.0 / sqrt(π)`."]
++    FRAC_2_SQRT_PI,
++    #[doc = "Return `π / 2.0`."]
++    FRAC_PI_2,
++    #[doc = "Return `π / 3.0`."]
++    FRAC_PI_3,
++    #[doc = "Return `π / 4.0`."]
++    FRAC_PI_4,
++    #[doc = "Return `π / 6.0`."]
++    FRAC_PI_6,
++    #[doc = "Return `π / 8.0`."]
++    FRAC_PI_8,
++    #[doc = "Return `ln(10.0)`."]
++    LN_10,
++    #[doc = "Return `ln(2.0)`."]
++    LN_2,
++    #[doc = "Return `log10(e)`."]
++    LOG10_E,
++    #[doc = "Return `log2(e)`."]
++    LOG2_E,
++    #[doc = "Return Archimedes’ constant."]
++    PI,
++    #[doc = "Return `sqrt(2.0)`."]
++    SQRT_2,
++}
++
++#[cfg(test)]
++mod tests {
++    use Float;
++
++    #[test]
++    fn convert_deg_rad() {
++        use std::f64::consts;
++
++        const DEG_RAD_PAIRS: [(f64, f64); 7] = [
++            (0.0, 0.),
++            (22.5, consts::FRAC_PI_8),
++            (30.0, consts::FRAC_PI_6),
++            (45.0, consts::FRAC_PI_4),
++            (60.0, consts::FRAC_PI_3),
++            (90.0, consts::FRAC_PI_2),
++            (180.0, consts::PI),
++        ];
++
++        for &(deg, rad) in &DEG_RAD_PAIRS {
++            assert!((Float::to_degrees(rad) - deg).abs() < 1e-6);
++            assert!((Float::to_radians(deg) - rad).abs() < 1e-6);
++
++            let (deg, rad) = (deg as f32, rad as f32);
++            assert!((Float::to_degrees(rad) - deg).abs() < 1e-6);
++            assert!((Float::to_radians(deg) - rad).abs() < 1e-6);
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2f520e0878c8bfbfecb647141aa4b95abf39a82f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,148 @@@
++use std::ops::{Add, Mul};
++use std::num::Wrapping;
++
++/// Defines an additive identity element for `Self`.
++pub trait Zero: Sized + Add<Self, Output = Self> {
++    /// Returns the additive identity element of `Self`, `0`.
++    ///
++    /// # Laws
++    ///
++    /// ```{.text}
++    /// a + 0 = a       ∀ a ∈ Self
++    /// 0 + a = a       ∀ a ∈ Self
++    /// ```
++    ///
++    /// # Purity
++    ///
++    /// This function should return the same result at all times regardless of
++    /// external mutable state, for example values stored in TLS or in
++    /// `static mut`s.
++    // FIXME (#5527): This should be an associated constant
++    fn zero() -> Self;
++
++    /// Returns `true` if `self` is equal to the additive identity.
++    #[inline]
++    fn is_zero(&self) -> bool;
++}
++
++macro_rules! zero_impl {
++    ($t:ty, $v:expr) => {
++        impl Zero for $t {
++            #[inline]
++            fn zero() -> $t { $v }
++            #[inline]
++            fn is_zero(&self) -> bool { *self == $v }
++        }
++    }
++}
++
++zero_impl!(usize, 0usize);
++zero_impl!(u8,    0u8);
++zero_impl!(u16,   0u16);
++zero_impl!(u32,   0u32);
++zero_impl!(u64,   0u64);
++
++zero_impl!(isize, 0isize);
++zero_impl!(i8,    0i8);
++zero_impl!(i16,   0i16);
++zero_impl!(i32,   0i32);
++zero_impl!(i64,   0i64);
++
++zero_impl!(f32, 0.0f32);
++zero_impl!(f64, 0.0f64);
++
++impl<T: Zero> Zero for Wrapping<T> where Wrapping<T>: Add<Output=Wrapping<T>> {
++    fn is_zero(&self) -> bool {
++        self.0.is_zero()
++    }
++    fn zero() -> Self {
++        Wrapping(T::zero())
++    }
++}
++
++
++/// Defines a multiplicative identity element for `Self`.
++pub trait One: Sized + Mul<Self, Output = Self> {
++    /// Returns the multiplicative identity element of `Self`, `1`.
++    ///
++    /// # Laws
++    ///
++    /// ```{.text}
++    /// a * 1 = a       ∀ a ∈ Self
++    /// 1 * a = a       ∀ a ∈ Self
++    /// ```
++    ///
++    /// # Purity
++    ///
++    /// This function should return the same result at all times regardless of
++    /// external mutable state, for example values stored in TLS or in
++    /// `static mut`s.
++    // FIXME (#5527): This should be an associated constant
++    fn one() -> Self;
++}
++
++macro_rules! one_impl {
++    ($t:ty, $v:expr) => {
++        impl One for $t {
++            #[inline]
++            fn one() -> $t { $v }
++        }
++    }
++}
++
++one_impl!(usize, 1usize);
++one_impl!(u8,    1u8);
++one_impl!(u16,   1u16);
++one_impl!(u32,   1u32);
++one_impl!(u64,   1u64);
++
++one_impl!(isize, 1isize);
++one_impl!(i8,    1i8);
++one_impl!(i16,   1i16);
++one_impl!(i32,   1i32);
++one_impl!(i64,   1i64);
++
++one_impl!(f32, 1.0f32);
++one_impl!(f64, 1.0f64);
++
++impl<T: One> One for Wrapping<T> where Wrapping<T>: Mul<Output=Wrapping<T>> {
++    fn one() -> Self {
++        Wrapping(T::one())
++    }
++}
++
++// Some helper functions provided for backwards compatibility.
++
++/// Returns the additive identity, `0`.
++#[inline(always)] pub fn zero<T: Zero>() -> T { Zero::zero() }
++
++/// Returns the multiplicative identity, `1`.
++#[inline(always)] pub fn one<T: One>() -> T { One::one() }
++
++
++macro_rules! test_wrapping_identities {
++    ($($t:ty)+) => {
++        $(
++            assert_eq!(zero::<$t>(), zero::<Wrapping<$t>>().0);
++            assert_eq!(one::<$t>(), one::<Wrapping<$t>>().0);
++            assert_eq!((0 as $t).is_zero(), Wrapping(0 as $t).is_zero());
++            assert_eq!((1 as $t).is_zero(), Wrapping(1 as $t).is_zero());
++        )+   
++    };
++}
++
++#[test]
++fn wrapping_identities() {
++    test_wrapping_identities!(isize i8 i16 i32 i64 usize u8 u16 u32 u64);
++}
++
++#[test]
++fn wrapping_is_zero() {
++    fn require_zero<T: Zero>(_: &T) {}
++    require_zero(&Wrapping(42));
++}
++#[test]
++fn wrapping_is_one() {
++    fn require_one<T: One>(_: &T) {}
++    require_one(&Wrapping(42));
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4f9221f2f32c52ba2f2186fa994cd53cc2d16bc5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,376 @@@
++use std::ops::{Not, BitAnd, BitOr, BitXor, Shl, Shr};
++
++use {Num, NumCast};
++use bounds::Bounded;
++use ops::checked::*;
++use ops::saturating::Saturating;
++
++pub trait PrimInt
++    : Sized
++    + Copy
++    + Num + NumCast
++    + Bounded
++    + PartialOrd + Ord + Eq
++    + Not<Output=Self>
++    + BitAnd<Output=Self>
++    + BitOr<Output=Self>
++    + BitXor<Output=Self>
++    + Shl<usize, Output=Self>
++    + Shr<usize, Output=Self>
++    + CheckedAdd<Output=Self>
++    + CheckedSub<Output=Self>
++    + CheckedMul<Output=Self>
++    + CheckedDiv<Output=Self>
++    + Saturating
++{
++    /// Returns the number of ones in the binary representation of `self`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_traits::PrimInt;
++    ///
++    /// let n = 0b01001100u8;
++    ///
++    /// assert_eq!(n.count_ones(), 3);
++    /// ```
++    fn count_ones(self) -> u32;
++
++    /// Returns the number of zeros in the binary representation of `self`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_traits::PrimInt;
++    ///
++    /// let n = 0b01001100u8;
++    ///
++    /// assert_eq!(n.count_zeros(), 5);
++    /// ```
++    fn count_zeros(self) -> u32;
++
++    /// Returns the number of leading zeros in the binary representation
++    /// of `self`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_traits::PrimInt;
++    ///
++    /// let n = 0b0101000u16;
++    ///
++    /// assert_eq!(n.leading_zeros(), 10);
++    /// ```
++    fn leading_zeros(self) -> u32;
++
++    /// Returns the number of trailing zeros in the binary representation
++    /// of `self`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_traits::PrimInt;
++    ///
++    /// let n = 0b0101000u16;
++    ///
++    /// assert_eq!(n.trailing_zeros(), 3);
++    /// ```
++    fn trailing_zeros(self) -> u32;
++
++    /// Shifts the bits to the left by a specified amount amount, `n`, wrapping
++    /// the truncated bits to the end of the resulting integer.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_traits::PrimInt;
++    ///
++    /// let n = 0x0123456789ABCDEFu64;
++    /// let m = 0x3456789ABCDEF012u64;
++    ///
++    /// assert_eq!(n.rotate_left(12), m);
++    /// ```
++    fn rotate_left(self, n: u32) -> Self;
++
++    /// Shifts the bits to the right by a specified amount amount, `n`, wrapping
++    /// the truncated bits to the beginning of the resulting integer.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_traits::PrimInt;
++    ///
++    /// let n = 0x0123456789ABCDEFu64;
++    /// let m = 0xDEF0123456789ABCu64;
++    ///
++    /// assert_eq!(n.rotate_right(12), m);
++    /// ```
++    fn rotate_right(self, n: u32) -> Self;
++
++    /// Shifts the bits to the left by a specified amount amount, `n`, filling
++    /// zeros in the least significant bits.
++    ///
++    /// This is bitwise equivalent to signed `Shl`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_traits::PrimInt;
++    ///
++    /// let n = 0x0123456789ABCDEFu64;
++    /// let m = 0x3456789ABCDEF000u64;
++    ///
++    /// assert_eq!(n.signed_shl(12), m);
++    /// ```
++    fn signed_shl(self, n: u32) -> Self;
++
++    /// Shifts the bits to the right by a specified amount amount, `n`, copying
++    /// the "sign bit" in the most significant bits even for unsigned types.
++    ///
++    /// This is bitwise equivalent to signed `Shr`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_traits::PrimInt;
++    ///
++    /// let n = 0xFEDCBA9876543210u64;
++    /// let m = 0xFFFFEDCBA9876543u64;
++    ///
++    /// assert_eq!(n.signed_shr(12), m);
++    /// ```
++    fn signed_shr(self, n: u32) -> Self;
++
++    /// Shifts the bits to the left by a specified amount amount, `n`, filling
++    /// zeros in the least significant bits.
++    ///
++    /// This is bitwise equivalent to unsigned `Shl`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_traits::PrimInt;
++    ///
++    /// let n = 0x0123456789ABCDEFi64;
++    /// let m = 0x3456789ABCDEF000i64;
++    ///
++    /// assert_eq!(n.unsigned_shl(12), m);
++    /// ```
++    fn unsigned_shl(self, n: u32) -> Self;
++
++    /// Shifts the bits to the right by a specified amount amount, `n`, filling
++    /// zeros in the most significant bits.
++    ///
++    /// This is bitwise equivalent to unsigned `Shr`.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_traits::PrimInt;
++    ///
++    /// let n = 0xFEDCBA9876543210i64;
++    /// let m = 0x000FEDCBA9876543i64;
++    ///
++    /// assert_eq!(n.unsigned_shr(12), m);
++    /// ```
++    fn unsigned_shr(self, n: u32) -> Self;
++
++    /// Reverses the byte order of the integer.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_traits::PrimInt;
++    ///
++    /// let n = 0x0123456789ABCDEFu64;
++    /// let m = 0xEFCDAB8967452301u64;
++    ///
++    /// assert_eq!(n.swap_bytes(), m);
++    /// ```
++    fn swap_bytes(self) -> Self;
++
++    /// Convert an integer from big endian to the target's endianness.
++    ///
++    /// On big endian this is a no-op. On little endian the bytes are swapped.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_traits::PrimInt;
++    ///
++    /// let n = 0x0123456789ABCDEFu64;
++    ///
++    /// if cfg!(target_endian = "big") {
++    ///     assert_eq!(u64::from_be(n), n)
++    /// } else {
++    ///     assert_eq!(u64::from_be(n), n.swap_bytes())
++    /// }
++    /// ```
++    fn from_be(x: Self) -> Self;
++
++    /// Convert an integer from little endian to the target's endianness.
++    ///
++    /// On little endian this is a no-op. On big endian the bytes are swapped.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_traits::PrimInt;
++    ///
++    /// let n = 0x0123456789ABCDEFu64;
++    ///
++    /// if cfg!(target_endian = "little") {
++    ///     assert_eq!(u64::from_le(n), n)
++    /// } else {
++    ///     assert_eq!(u64::from_le(n), n.swap_bytes())
++    /// }
++    /// ```
++    fn from_le(x: Self) -> Self;
++
++    /// Convert `self` to big endian from the target's endianness.
++    ///
++    /// On big endian this is a no-op. On little endian the bytes are swapped.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_traits::PrimInt;
++    ///
++    /// let n = 0x0123456789ABCDEFu64;
++    ///
++    /// if cfg!(target_endian = "big") {
++    ///     assert_eq!(n.to_be(), n)
++    /// } else {
++    ///     assert_eq!(n.to_be(), n.swap_bytes())
++    /// }
++    /// ```
++    fn to_be(self) -> Self;
++
++    /// Convert `self` to little endian from the target's endianness.
++    ///
++    /// On little endian this is a no-op. On big endian the bytes are swapped.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_traits::PrimInt;
++    ///
++    /// let n = 0x0123456789ABCDEFu64;
++    ///
++    /// if cfg!(target_endian = "little") {
++    ///     assert_eq!(n.to_le(), n)
++    /// } else {
++    ///     assert_eq!(n.to_le(), n.swap_bytes())
++    /// }
++    /// ```
++    fn to_le(self) -> Self;
++
++    /// Raises self to the power of `exp`, using exponentiation by squaring.
++    ///
++    /// # Examples
++    ///
++    /// ```
++    /// use num_traits::PrimInt;
++    ///
++    /// assert_eq!(2i32.pow(4), 16);
++    /// ```
++    fn pow(self, exp: u32) -> Self;
++}
++
++macro_rules! prim_int_impl {
++    ($T:ty, $S:ty, $U:ty) => (
++        impl PrimInt for $T {
++            #[inline]
++            fn count_ones(self) -> u32 {
++                <$T>::count_ones(self)
++            }
++
++            #[inline]
++            fn count_zeros(self) -> u32 {
++                <$T>::count_zeros(self)
++            }
++
++            #[inline]
++            fn leading_zeros(self) -> u32 {
++                <$T>::leading_zeros(self)
++            }
++
++            #[inline]
++            fn trailing_zeros(self) -> u32 {
++                <$T>::trailing_zeros(self)
++            }
++
++            #[inline]
++            fn rotate_left(self, n: u32) -> Self {
++                <$T>::rotate_left(self, n)
++            }
++
++            #[inline]
++            fn rotate_right(self, n: u32) -> Self {
++                <$T>::rotate_right(self, n)
++            }
++
++            #[inline]
++            fn signed_shl(self, n: u32) -> Self {
++                ((self as $S) << n) as $T
++            }
++
++            #[inline]
++            fn signed_shr(self, n: u32) -> Self {
++                ((self as $S) >> n) as $T
++            }
++
++            #[inline]
++            fn unsigned_shl(self, n: u32) -> Self {
++                ((self as $U) << n) as $T
++            }
++
++            #[inline]
++            fn unsigned_shr(self, n: u32) -> Self {
++                ((self as $U) >> n) as $T
++            }
++
++            #[inline]
++            fn swap_bytes(self) -> Self {
++                <$T>::swap_bytes(self)
++            }
++
++            #[inline]
++            fn from_be(x: Self) -> Self {
++                <$T>::from_be(x)
++            }
++
++            #[inline]
++            fn from_le(x: Self) -> Self {
++                <$T>::from_le(x)
++            }
++
++            #[inline]
++            fn to_be(self) -> Self {
++                <$T>::to_be(self)
++            }
++
++            #[inline]
++            fn to_le(self) -> Self {
++                <$T>::to_le(self)
++            }
++
++            #[inline]
++            fn pow(self, exp: u32) -> Self {
++                <$T>::pow(self, exp)
++            }
++        }
++    )
++}
++
++// prim_int_impl!(type, signed, unsigned);
++prim_int_impl!(u8,    i8,    u8);
++prim_int_impl!(u16,   i16,   u16);
++prim_int_impl!(u32,   i32,   u32);
++prim_int_impl!(u64,   i64,   u64);
++prim_int_impl!(usize, isize, usize);
++prim_int_impl!(i8,    i8,    u8);
++prim_int_impl!(i16,   i16,   u16);
++prim_int_impl!(i32,   i32,   u32);
++prim_int_impl!(i64,   i64,   u64);
++prim_int_impl!(isize, isize, usize);
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..41422c8d0401adb5f970d7c9a81e3f64c2ca3efb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,435 @@@
++// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Numeric traits for generic mathematics
++#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png",
++       html_favicon_url = "https://rust-num.github.io/num/favicon.ico",
++       html_root_url = "https://rust-num.github.io/num/",
++       html_playground_url = "http://play.integer32.com/")]
++
++use std::ops::{Add, Sub, Mul, Div, Rem};
++use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign};
++use std::num::Wrapping;
++
++pub use bounds::Bounded;
++pub use float::{Float, FloatConst};
++pub use identities::{Zero, One, zero, one};
++pub use ops::checked::*;
++pub use ops::wrapping::*;
++pub use ops::saturating::Saturating;
++pub use sign::{Signed, Unsigned, abs, abs_sub, signum};
++pub use cast::*;
++pub use int::PrimInt;
++pub use pow::{pow, checked_pow};
++
++pub mod identities;
++pub mod sign;
++pub mod ops;
++pub mod bounds;
++pub mod float;
++pub mod cast;
++pub mod int;
++pub mod pow;
++
++/// The base trait for numeric types, covering `0` and `1` values,
++/// comparisons, basic numeric operations, and string conversion.
++pub trait Num: PartialEq + Zero + One + NumOps
++{
++    type FromStrRadixErr;
++
++    /// Convert from a string and radix <= 36.
++    ///
++    /// # Examples
++    ///
++    /// ```rust
++    /// use num_traits::Num;
++    ///
++    /// let result = <i32 as Num>::from_str_radix("27", 10);
++    /// assert_eq!(result, Ok(27));
++    ///
++    /// let result = <i32 as Num>::from_str_radix("foo", 10);
++    /// assert!(result.is_err());
++    /// ```
++    fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>;
++}
++
++/// The trait for types implementing basic numeric operations
++///
++/// This is automatically implemented for types which implement the operators.
++pub trait NumOps<Rhs = Self, Output = Self>
++    : Add<Rhs, Output = Output>
++    + Sub<Rhs, Output = Output>
++    + Mul<Rhs, Output = Output>
++    + Div<Rhs, Output = Output>
++    + Rem<Rhs, Output = Output>
++{}
++
++impl<T, Rhs, Output> NumOps<Rhs, Output> for T
++where T: Add<Rhs, Output = Output>
++       + Sub<Rhs, Output = Output>
++       + Mul<Rhs, Output = Output>
++       + Div<Rhs, Output = Output>
++       + Rem<Rhs, Output = Output>
++{}
++
++/// The trait for `Num` types which also implement numeric operations taking
++/// the second operand by reference.
++///
++/// This is automatically implemented for types which implement the operators.
++pub trait NumRef: Num + for<'r> NumOps<&'r Self> {}
++impl<T> NumRef for T where T: Num + for<'r> NumOps<&'r T> {}
++
++/// The trait for references which implement numeric operations, taking the
++/// second operand either by value or by reference.
++///
++/// This is automatically implemented for types which implement the operators.
++pub trait RefNum<Base>: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base> {}
++impl<T, Base> RefNum<Base> for T where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base> {}
++
++/// The trait for types implementing numeric assignment operators (like `+=`).
++///
++/// This is automatically implemented for types which implement the operators.
++pub trait NumAssignOps<Rhs = Self>
++    : AddAssign<Rhs>
++    + SubAssign<Rhs>
++    + MulAssign<Rhs>
++    + DivAssign<Rhs>
++    + RemAssign<Rhs>
++{}
++
++impl<T, Rhs> NumAssignOps<Rhs> for T
++where T: AddAssign<Rhs>
++       + SubAssign<Rhs>
++       + MulAssign<Rhs>
++       + DivAssign<Rhs>
++       + RemAssign<Rhs>
++{}
++
++/// The trait for `Num` types which also implement assignment operators.
++///
++/// This is automatically implemented for types which implement the operators.
++pub trait NumAssign: Num + NumAssignOps {}
++impl<T> NumAssign for T where T: Num + NumAssignOps {}
++
++/// The trait for `NumAssign` types which also implement assignment operations
++/// taking the second operand by reference.
++///
++/// This is automatically implemented for types which implement the operators.
++pub trait NumAssignRef: NumAssign + for<'r> NumAssignOps<&'r Self> {}
++impl<T> NumAssignRef for T where T: NumAssign + for<'r> NumAssignOps<&'r T> {}
++
++
++macro_rules! int_trait_impl {
++    ($name:ident for $($t:ty)*) => ($(
++        impl $name for $t {
++            type FromStrRadixErr = ::std::num::ParseIntError;
++            #[inline]
++            fn from_str_radix(s: &str, radix: u32)
++                              -> Result<Self, ::std::num::ParseIntError>
++            {
++                <$t>::from_str_radix(s, radix)
++            }
++        }
++    )*)
++}
++int_trait_impl!(Num for usize u8 u16 u32 u64 isize i8 i16 i32 i64);
++
++impl<T: Num> Num for Wrapping<T>
++    where Wrapping<T>:
++          Add<Output = Wrapping<T>> + Sub<Output = Wrapping<T>>
++        + Mul<Output = Wrapping<T>> + Div<Output = Wrapping<T>> + Rem<Output = Wrapping<T>>
++{
++    type FromStrRadixErr = T::FromStrRadixErr;
++    fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr> {
++        T::from_str_radix(str, radix).map(Wrapping)
++    }
++}
++
++
++#[derive(Debug)]
++pub enum FloatErrorKind {
++    Empty,
++    Invalid,
++}
++// FIXME: std::num::ParseFloatError is stable in 1.0, but opaque to us,
++// so there's not really any way for us to reuse it.
++#[derive(Debug)]
++pub struct ParseFloatError {
++    pub kind: FloatErrorKind,
++}
++
++// FIXME: The standard library from_str_radix on floats was deprecated, so we're stuck
++// with this implementation ourselves until we want to make a breaking change.
++// (would have to drop it from `Num` though)
++macro_rules! float_trait_impl {
++    ($name:ident for $($t:ty)*) => ($(
++        impl $name for $t {
++            type FromStrRadixErr = ParseFloatError;
++
++            fn from_str_radix(src: &str, radix: u32)
++                              -> Result<Self, Self::FromStrRadixErr>
++            {
++                use self::FloatErrorKind::*;
++                use self::ParseFloatError as PFE;
++
++                // Special values
++                match src {
++                    "inf"   => return Ok(Float::infinity()),
++                    "-inf"  => return Ok(Float::neg_infinity()),
++                    "NaN"   => return Ok(Float::nan()),
++                    _       => {},
++                }
++
++                fn slice_shift_char(src: &str) -> Option<(char, &str)> {
++                    src.chars().nth(0).map(|ch| (ch, &src[1..]))
++                }
++
++                let (is_positive, src) =  match slice_shift_char(src) {
++                    None             => return Err(PFE { kind: Empty }),
++                    Some(('-', ""))  => return Err(PFE { kind: Empty }),
++                    Some(('-', src)) => (false, src),
++                    Some((_, _))     => (true,  src),
++                };
++
++                // The significand to accumulate
++                let mut sig = if is_positive { 0.0 } else { -0.0 };
++                // Necessary to detect overflow
++                let mut prev_sig = sig;
++                let mut cs = src.chars().enumerate();
++                // Exponent prefix and exponent index offset
++                let mut exp_info = None::<(char, usize)>;
++
++                // Parse the integer part of the significand
++                for (i, c) in cs.by_ref() {
++                    match c.to_digit(radix) {
++                        Some(digit) => {
++                            // shift significand one digit left
++                            sig = sig * (radix as $t);
++
++                            // add/subtract current digit depending on sign
++                            if is_positive {
++                                sig = sig + ((digit as isize) as $t);
++                            } else {
++                                sig = sig - ((digit as isize) as $t);
++                            }
++
++                            // Detect overflow by comparing to last value, except
++                            // if we've not seen any non-zero digits.
++                            if prev_sig != 0.0 {
++                                if is_positive && sig <= prev_sig
++                                    { return Ok(Float::infinity()); }
++                                if !is_positive && sig >= prev_sig
++                                    { return Ok(Float::neg_infinity()); }
++
++                                // Detect overflow by reversing the shift-and-add process
++                                if is_positive && (prev_sig != (sig - digit as $t) / radix as $t)
++                                    { return Ok(Float::infinity()); }
++                                if !is_positive && (prev_sig != (sig + digit as $t) / radix as $t)
++                                    { return Ok(Float::neg_infinity()); }
++                            }
++                            prev_sig = sig;
++                        },
++                        None => match c {
++                            'e' | 'E' | 'p' | 'P' => {
++                                exp_info = Some((c, i + 1));
++                                break;  // start of exponent
++                            },
++                            '.' => {
++                                break;  // start of fractional part
++                            },
++                            _ => {
++                                return Err(PFE { kind: Invalid });
++                            },
++                        },
++                    }
++                }
++
++                // If we are not yet at the exponent parse the fractional
++                // part of the significand
++                if exp_info.is_none() {
++                    let mut power = 1.0;
++                    for (i, c) in cs.by_ref() {
++                        match c.to_digit(radix) {
++                            Some(digit) => {
++                                // Decrease power one order of magnitude
++                                power = power / (radix as $t);
++                                // add/subtract current digit depending on sign
++                                sig = if is_positive {
++                                    sig + (digit as $t) * power
++                                } else {
++                                    sig - (digit as $t) * power
++                                };
++                                // Detect overflow by comparing to last value
++                                if is_positive && sig < prev_sig
++                                    { return Ok(Float::infinity()); }
++                                if !is_positive && sig > prev_sig
++                                    { return Ok(Float::neg_infinity()); }
++                                prev_sig = sig;
++                            },
++                            None => match c {
++                                'e' | 'E' | 'p' | 'P' => {
++                                    exp_info = Some((c, i + 1));
++                                    break; // start of exponent
++                                },
++                                _ => {
++                                    return Err(PFE { kind: Invalid });
++                                },
++                            },
++                        }
++                    }
++                }
++
++                // Parse and calculate the exponent
++                let exp = match exp_info {
++                    Some((c, offset)) => {
++                        let base = match c {
++                            'E' | 'e' if radix == 10 => 10.0,
++                            'P' | 'p' if radix == 16 => 2.0,
++                            _ => return Err(PFE { kind: Invalid }),
++                        };
++
++                        // Parse the exponent as decimal integer
++                        let src = &src[offset..];
++                        let (is_positive, exp) = match slice_shift_char(src) {
++                            Some(('-', src)) => (false, src.parse::<usize>()),
++                            Some(('+', src)) => (true,  src.parse::<usize>()),
++                            Some((_, _))     => (true,  src.parse::<usize>()),
++                            None             => return Err(PFE { kind: Invalid }),
++                        };
++
++                        match (is_positive, exp) {
++                            (true,  Ok(exp)) => base.powi(exp as i32),
++                            (false, Ok(exp)) => 1.0 / base.powi(exp as i32),
++                            (_, Err(_))      => return Err(PFE { kind: Invalid }),
++                        }
++                    },
++                    None => 1.0, // no exponent
++                };
++
++                Ok(sig * exp)
++            }
++        }
++    )*)
++}
++float_trait_impl!(Num for f32 f64);
++
++/// A value bounded by a minimum and a maximum
++///
++///  If input is less than min then this returns min.
++///  If input is greater than max then this returns max.
++///  Otherwise this returns input.
++#[inline]
++pub fn clamp<T: PartialOrd>(input: T, min: T, max: T) -> T {
++    debug_assert!(min <= max, "min must be less than or equal to max");
++    if input < min {
++        min
++    } else if input > max {
++        max
++    } else {
++        input
++    }
++}
++
++#[test]
++fn clamp_test() {
++    // Int test
++    assert_eq!(1, clamp(1, -1, 2));
++    assert_eq!(-1, clamp(-2, -1, 2));
++    assert_eq!(2, clamp(3, -1, 2));
++
++    // Float test
++    assert_eq!(1.0, clamp(1.0, -1.0, 2.0));
++    assert_eq!(-1.0, clamp(-2.0, -1.0, 2.0));
++    assert_eq!(2.0, clamp(3.0, -1.0, 2.0));
++}
++
++#[test]
++fn from_str_radix_unwrap() {
++    // The Result error must impl Debug to allow unwrap()
++
++    let i: i32 = Num::from_str_radix("0", 10).unwrap();
++    assert_eq!(i, 0);
++
++    let f: f32 = Num::from_str_radix("0.0", 10).unwrap();
++    assert_eq!(f, 0.0);
++}
++
++macro_rules! test_wrapping_from_str_radix {
++    ($($t:ty)+) => {
++        $(
++            for &(s, r) in &[("42", 10), ("42", 2), ("-13.0", 10), ("foo", 10)] {
++                let w = Wrapping::<$t>::from_str_radix(s, r).map(|w| w.0);
++                assert_eq!(w, <$t as Num>::from_str_radix(s, r));
++            } 
++        )+   
++    };
++}
++#[test]
++fn wrapping_is_num() {
++    fn require_num<T: Num>(_: &T) {}
++    require_num(&Wrapping(42_u32));
++    require_num(&Wrapping(-42));
++}
++#[test]
++fn wrapping_from_str_radix() {
++    test_wrapping_from_str_radix!(usize u8 u16 u32 u64 isize i8 i16 i32 i64);
++}
++
++#[test]
++fn check_num_ops() {
++    fn compute<T: Num + Copy>(x: T, y: T) -> T {
++        x * y / y % y + y - y
++    }
++    assert_eq!(compute(1, 2), 1)
++}
++
++#[test]
++fn check_numref_ops() {
++    fn compute<T: NumRef>(x: T, y: &T) -> T {
++        x * y / y % y + y - y
++    }
++    assert_eq!(compute(1, &2), 1)
++}
++
++#[test]
++fn check_refnum_ops() {
++    fn compute<T: Copy>(x: &T, y: T) -> T
++        where for<'a> &'a T: RefNum<T>
++    {
++        &(&(&(&(x * y) / y) % y) + y) - y
++    }
++    assert_eq!(compute(&1, 2), 1)
++}
++
++#[test]
++fn check_refref_ops() {
++    fn compute<T>(x: &T, y: &T) -> T
++        where for<'a> &'a T: RefNum<T>
++    {
++        &(&(&(&(x * y) / y) % y) + y) - y
++    }
++    assert_eq!(compute(&1, &2), 1)
++}
++
++#[test]
++fn check_numassign_ops() {
++    fn compute<T: NumAssign + Copy>(mut x: T, y: T) -> T {
++        x *= y;
++        x /= y;
++        x %= y;
++        x += y;
++        x -= y;
++        x
++    }
++    assert_eq!(compute(1, 2), 1)
++}
++
++// TODO test `NumAssignRef`, but even the standard numeric types don't
++// implement this yet. (see rust pr41336)
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..45e671685ee5c2299fcb5a2c4b7302c0c6b1aadf
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,92 @@@
++use std::ops::{Add, Sub, Mul, Div};
++
++/// Performs addition that returns `None` instead of wrapping around on
++/// overflow.
++pub trait CheckedAdd: Sized + Add<Self, Output=Self> {
++    /// Adds two numbers, checking for overflow. If overflow happens, `None` is
++    /// returned.
++    fn checked_add(&self, v: &Self) -> Option<Self>;
++}
++
++macro_rules! checked_impl {
++    ($trait_name:ident, $method:ident, $t:ty) => {
++        impl $trait_name for $t {
++            #[inline]
++            fn $method(&self, v: &$t) -> Option<$t> {
++                <$t>::$method(*self, *v)
++            }
++        }
++    }
++}
++
++checked_impl!(CheckedAdd, checked_add, u8);
++checked_impl!(CheckedAdd, checked_add, u16);
++checked_impl!(CheckedAdd, checked_add, u32);
++checked_impl!(CheckedAdd, checked_add, u64);
++checked_impl!(CheckedAdd, checked_add, usize);
++
++checked_impl!(CheckedAdd, checked_add, i8);
++checked_impl!(CheckedAdd, checked_add, i16);
++checked_impl!(CheckedAdd, checked_add, i32);
++checked_impl!(CheckedAdd, checked_add, i64);
++checked_impl!(CheckedAdd, checked_add, isize);
++
++/// Performs subtraction that returns `None` instead of wrapping around on underflow.
++pub trait CheckedSub: Sized + Sub<Self, Output=Self> {
++    /// Subtracts two numbers, checking for underflow. If underflow happens,
++    /// `None` is returned.
++    fn checked_sub(&self, v: &Self) -> Option<Self>;
++}
++
++checked_impl!(CheckedSub, checked_sub, u8);
++checked_impl!(CheckedSub, checked_sub, u16);
++checked_impl!(CheckedSub, checked_sub, u32);
++checked_impl!(CheckedSub, checked_sub, u64);
++checked_impl!(CheckedSub, checked_sub, usize);
++
++checked_impl!(CheckedSub, checked_sub, i8);
++checked_impl!(CheckedSub, checked_sub, i16);
++checked_impl!(CheckedSub, checked_sub, i32);
++checked_impl!(CheckedSub, checked_sub, i64);
++checked_impl!(CheckedSub, checked_sub, isize);
++
++/// Performs multiplication that returns `None` instead of wrapping around on underflow or
++/// overflow.
++pub trait CheckedMul: Sized + Mul<Self, Output=Self> {
++    /// Multiplies two numbers, checking for underflow or overflow. If underflow
++    /// or overflow happens, `None` is returned.
++    fn checked_mul(&self, v: &Self) -> Option<Self>;
++}
++
++checked_impl!(CheckedMul, checked_mul, u8);
++checked_impl!(CheckedMul, checked_mul, u16);
++checked_impl!(CheckedMul, checked_mul, u32);
++checked_impl!(CheckedMul, checked_mul, u64);
++checked_impl!(CheckedMul, checked_mul, usize);
++
++checked_impl!(CheckedMul, checked_mul, i8);
++checked_impl!(CheckedMul, checked_mul, i16);
++checked_impl!(CheckedMul, checked_mul, i32);
++checked_impl!(CheckedMul, checked_mul, i64);
++checked_impl!(CheckedMul, checked_mul, isize);
++
++/// Performs division that returns `None` instead of panicking on division by zero and instead of
++/// wrapping around on underflow and overflow.
++pub trait CheckedDiv: Sized + Div<Self, Output=Self> {
++    /// Divides two numbers, checking for underflow, overflow and division by
++    /// zero. If any of that happens, `None` is returned.
++    fn checked_div(&self, v: &Self) -> Option<Self>;
++}
++
++checked_impl!(CheckedDiv, checked_div, u8);
++checked_impl!(CheckedDiv, checked_div, u16);
++checked_impl!(CheckedDiv, checked_div, u32);
++checked_impl!(CheckedDiv, checked_div, u64);
++checked_impl!(CheckedDiv, checked_div, usize);
++
++checked_impl!(CheckedDiv, checked_div, i8);
++checked_impl!(CheckedDiv, checked_div, i16);
++checked_impl!(CheckedDiv, checked_div, i32);
++checked_impl!(CheckedDiv, checked_div, i64);
++checked_impl!(CheckedDiv, checked_div, isize);
++
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ec9edeb8517be4dfda2d2b6243d502003074c956
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++pub mod saturating;
++pub mod checked;
++pub mod wrapping;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e9db7493fbdc55589283de4eb48ed903afc04766
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,28 @@@
++/// Saturating math operations
++pub trait Saturating {
++    /// Saturating addition operator.
++    /// Returns a+b, saturating at the numeric bounds instead of overflowing.
++    fn saturating_add(self, v: Self) -> Self;
++
++    /// Saturating subtraction operator.
++    /// Returns a-b, saturating at the numeric bounds instead of overflowing.
++    fn saturating_sub(self, v: Self) -> Self;
++}
++
++macro_rules! saturating_impl {
++    ($trait_name:ident for $($t:ty)*) => {$(
++        impl $trait_name for $t {
++            #[inline]
++            fn saturating_add(self, v: Self) -> Self {
++                Self::saturating_add(self, v)
++            }
++
++            #[inline]
++            fn saturating_sub(self, v: Self) -> Self {
++                Self::saturating_sub(self, v)
++            }
++        }
++    )*}
++}
++
++saturating_impl!(Saturating for isize usize i8 u8 i16 u16 i32 u32 i64 u64);
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f9890581b1f171c813799c33f5fe170119d36f14
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,127 @@@
++use std::ops::{Add, Sub, Mul};
++use std::num::Wrapping;
++
++macro_rules! wrapping_impl {
++    ($trait_name:ident, $method:ident, $t:ty) => {
++        impl $trait_name for $t {
++            #[inline]
++            fn $method(&self, v: &Self) -> Self {
++                <$t>::$method(*self, *v)
++            }
++        }
++    };
++    ($trait_name:ident, $method:ident, $t:ty, $rhs:ty) => {
++        impl $trait_name<$rhs> for $t {
++            #[inline]
++            fn $method(&self, v: &$rhs) -> Self {
++                <$t>::$method(*self, *v)
++            }
++        }
++    }
++}
++
++/// Performs addition that wraps around on overflow.
++pub trait WrappingAdd: Sized + Add<Self, Output=Self> {
++    /// Wrapping (modular) addition. Computes `self + other`, wrapping around at the boundary of
++    /// the type.
++    fn wrapping_add(&self, v: &Self) -> Self;
++}
++
++wrapping_impl!(WrappingAdd, wrapping_add, u8);
++wrapping_impl!(WrappingAdd, wrapping_add, u16);
++wrapping_impl!(WrappingAdd, wrapping_add, u32);
++wrapping_impl!(WrappingAdd, wrapping_add, u64);
++wrapping_impl!(WrappingAdd, wrapping_add, usize);
++
++wrapping_impl!(WrappingAdd, wrapping_add, i8);
++wrapping_impl!(WrappingAdd, wrapping_add, i16);
++wrapping_impl!(WrappingAdd, wrapping_add, i32);
++wrapping_impl!(WrappingAdd, wrapping_add, i64);
++wrapping_impl!(WrappingAdd, wrapping_add, isize);
++
++/// Performs subtraction that wraps around on overflow.
++pub trait WrappingSub: Sized + Sub<Self, Output=Self> {
++    /// Wrapping (modular) subtraction. Computes `self - other`, wrapping around at the boundary
++    /// of the type.
++    fn wrapping_sub(&self, v: &Self) -> Self;
++}
++
++wrapping_impl!(WrappingSub, wrapping_sub, u8);
++wrapping_impl!(WrappingSub, wrapping_sub, u16);
++wrapping_impl!(WrappingSub, wrapping_sub, u32);
++wrapping_impl!(WrappingSub, wrapping_sub, u64);
++wrapping_impl!(WrappingSub, wrapping_sub, usize);
++
++wrapping_impl!(WrappingSub, wrapping_sub, i8);
++wrapping_impl!(WrappingSub, wrapping_sub, i16);
++wrapping_impl!(WrappingSub, wrapping_sub, i32);
++wrapping_impl!(WrappingSub, wrapping_sub, i64);
++wrapping_impl!(WrappingSub, wrapping_sub, isize);
++
++/// Performs multiplication that wraps around on overflow.
++pub trait WrappingMul: Sized + Mul<Self, Output=Self> {
++    /// Wrapping (modular) multiplication. Computes `self * other`, wrapping around at the boundary
++    /// of the type.
++    fn wrapping_mul(&self, v: &Self) -> Self;
++}
++
++wrapping_impl!(WrappingMul, wrapping_mul, u8);
++wrapping_impl!(WrappingMul, wrapping_mul, u16);
++wrapping_impl!(WrappingMul, wrapping_mul, u32);
++wrapping_impl!(WrappingMul, wrapping_mul, u64);
++wrapping_impl!(WrappingMul, wrapping_mul, usize);
++
++wrapping_impl!(WrappingMul, wrapping_mul, i8);
++wrapping_impl!(WrappingMul, wrapping_mul, i16);
++wrapping_impl!(WrappingMul, wrapping_mul, i32);
++wrapping_impl!(WrappingMul, wrapping_mul, i64);
++wrapping_impl!(WrappingMul, wrapping_mul, isize);
++
++// Well this is a bit funny, but all the more appropriate.
++impl<T: WrappingAdd> WrappingAdd for Wrapping<T> where Wrapping<T>: Add<Output = Wrapping<T>> {
++    fn wrapping_add(&self, v: &Self) -> Self {
++        Wrapping(self.0.wrapping_add(&v.0))
++    }
++}
++impl<T: WrappingSub> WrappingSub for Wrapping<T> where Wrapping<T>: Sub<Output = Wrapping<T>> {
++    fn wrapping_sub(&self, v: &Self) -> Self {
++        Wrapping(self.0.wrapping_sub(&v.0))
++    }
++}
++impl<T: WrappingMul> WrappingMul for Wrapping<T> where Wrapping<T>: Mul<Output = Wrapping<T>> {
++    fn wrapping_mul(&self, v: &Self) -> Self {
++        Wrapping(self.0.wrapping_mul(&v.0))
++    }
++}
++
++
++#[test]
++fn test_wrapping_traits() {
++    fn wrapping_add<T: WrappingAdd>(a: T, b: T) -> T { a.wrapping_add(&b) }
++    fn wrapping_sub<T: WrappingSub>(a: T, b: T) -> T { a.wrapping_sub(&b) }
++    fn wrapping_mul<T: WrappingMul>(a: T, b: T) -> T { a.wrapping_mul(&b) }
++    assert_eq!(wrapping_add(255, 1), 0u8);
++    assert_eq!(wrapping_sub(0, 1), 255u8);
++    assert_eq!(wrapping_mul(255, 2), 254u8);
++    assert_eq!(wrapping_add(255, 1), (Wrapping(255u8) + Wrapping(1u8)).0);
++    assert_eq!(wrapping_sub(0, 1), (Wrapping(0u8) - Wrapping(1u8)).0);
++    assert_eq!(wrapping_mul(255, 2), (Wrapping(255u8) * Wrapping(2u8)).0);
++}
++
++#[test]
++fn wrapping_is_wrappingadd() {
++    fn require_wrappingadd<T: WrappingAdd>(_: &T) {}
++    require_wrappingadd(&Wrapping(42));
++}
++
++#[test]
++fn wrapping_is_wrappingsub() {
++    fn require_wrappingsub<T: WrappingSub>(_: &T) {}
++    require_wrappingsub(&Wrapping(42));
++}
++
++#[test]
++fn wrapping_is_wrappingmul() {
++    fn require_wrappingmul<T: WrappingMul>(_: &T) {}
++    require_wrappingmul(&Wrapping(42));
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b250ad4cf23735ce583a53729bcd8f990113b3dc
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,73 @@@
++use std::ops::Mul;
++use {One, CheckedMul};
++
++/// Raises a value to the power of exp, using exponentiation by squaring.
++///
++/// # Example
++///
++/// ```rust
++/// use num_traits::pow;
++///
++/// assert_eq!(pow(2i8, 4), 16);
++/// assert_eq!(pow(6u8, 3), 216);
++/// ```
++#[inline]
++pub fn pow<T: Clone + One + Mul<T, Output = T>>(mut base: T, mut exp: usize) -> T {
++    if exp == 0 { return T::one() }
++
++    while exp & 1 == 0 {
++        base = base.clone() * base;
++        exp >>= 1;
++    }
++    if exp == 1 { return base }
++
++    let mut acc = base.clone();
++    while exp > 1 {
++        exp >>= 1;
++        base = base.clone() * base;
++        if exp & 1 == 1 {
++            acc = acc * base.clone();
++        }
++    }
++    acc
++}
++
++/// Raises a value to the power of exp, returning `None` if an overflow occurred.
++///
++/// Otherwise same as the `pow` function.
++///
++/// # Example
++///
++/// ```rust
++/// use num_traits::checked_pow;
++///
++/// assert_eq!(checked_pow(2i8, 4), Some(16));
++/// assert_eq!(checked_pow(7i8, 8), None);
++/// assert_eq!(checked_pow(7u32, 8), Some(5_764_801));
++/// ```
++#[inline]
++pub fn checked_pow<T: Clone + One + CheckedMul>(mut base: T, mut exp: usize) -> Option<T> {
++    if exp == 0 { return Some(T::one()) }
++
++    macro_rules! optry {
++        ( $ expr : expr ) => {
++            if let Some(val) = $expr { val } else { return None }
++        }
++    }
++
++    while exp & 1 == 0 {
++        base = optry!(base.checked_mul(&base));
++        exp >>= 1;
++    }
++    if exp == 1 { return Some(base) }
++
++    let mut acc = base.clone();
++    while exp > 1 {
++        exp >>= 1;
++        base = optry!(base.checked_mul(&base));
++        if exp & 1 == 1 {
++            acc = optry!(acc.checked_mul(&base));
++        }
++    }
++    Some(acc)
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4b43c897ef8d14e608b5517a61cb8c5c0ccbf717
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,204 @@@
++use std::ops::Neg;
++use std::{f32, f64};
++use std::num::Wrapping;
++
++use Num;
++
++/// Useful functions for signed numbers (i.e. numbers that can be negative).
++pub trait Signed: Sized + Num + Neg<Output = Self> {
++    /// Computes the absolute value.
++    ///
++    /// For `f32` and `f64`, `NaN` will be returned if the number is `NaN`.
++    ///
++    /// For signed integers, `::MIN` will be returned if the number is `::MIN`.
++    fn abs(&self) -> Self;
++
++    /// The positive difference of two numbers.
++    ///
++    /// Returns `zero` if the number is less than or equal to `other`, otherwise the difference
++    /// between `self` and `other` is returned.
++    fn abs_sub(&self, other: &Self) -> Self;
++
++    /// Returns the sign of the number.
++    ///
++    /// For `f32` and `f64`:
++    ///
++    /// * `1.0` if the number is positive, `+0.0` or `INFINITY`
++    /// * `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`
++    /// * `NaN` if the number is `NaN`
++    ///
++    /// For signed integers:
++    ///
++    /// * `0` if the number is zero
++    /// * `1` if the number is positive
++    /// * `-1` if the number is negative
++    fn signum(&self) -> Self;
++
++    /// Returns true if the number is positive and false if the number is zero or negative.
++    fn is_positive(&self) -> bool;
++
++    /// Returns true if the number is negative and false if the number is zero or positive.
++    fn is_negative(&self) -> bool;
++}
++
++macro_rules! signed_impl {
++    ($($t:ty)*) => ($(
++        impl Signed for $t {
++            #[inline]
++            fn abs(&self) -> $t {
++                if self.is_negative() { -*self } else { *self }
++            }
++
++            #[inline]
++            fn abs_sub(&self, other: &$t) -> $t {
++                if *self <= *other { 0 } else { *self - *other }
++            }
++
++            #[inline]
++            fn signum(&self) -> $t {
++                match *self {
++                    n if n > 0 => 1,
++                    0 => 0,
++                    _ => -1,
++                }
++            }
++
++            #[inline]
++            fn is_positive(&self) -> bool { *self > 0 }
++
++            #[inline]
++            fn is_negative(&self) -> bool { *self < 0 }
++        }
++    )*)
++}
++
++signed_impl!(isize i8 i16 i32 i64);
++
++impl<T: Signed> Signed for Wrapping<T> where Wrapping<T>: Num + Neg<Output=Wrapping<T>>
++{
++    #[inline]
++    fn abs(&self) -> Self {
++        Wrapping(self.0.abs())
++    }
++
++    #[inline]
++    fn abs_sub(&self, other: &Self) -> Self {
++        Wrapping(self.0.abs_sub(&other.0))
++    }
++
++    #[inline]
++    fn signum(&self) -> Self {
++        Wrapping(self.0.signum())
++    }
++
++    #[inline]
++    fn is_positive(&self) -> bool { self.0.is_positive() }
++
++    #[inline]
++    fn is_negative(&self) -> bool { self.0.is_negative() }
++}
++
++macro_rules! signed_float_impl {
++    ($t:ty, $nan:expr, $inf:expr, $neg_inf:expr) => {
++        impl Signed for $t {
++            /// Computes the absolute value. Returns `NAN` if the number is `NAN`.
++            #[inline]
++            fn abs(&self) -> $t {
++                <$t>::abs(*self)
++            }
++
++            /// The positive difference of two numbers. Returns `0.0` if the number is
++            /// less than or equal to `other`, otherwise the difference between`self`
++            /// and `other` is returned.
++            #[inline]
++            #[allow(deprecated)]
++            fn abs_sub(&self, other: &$t) -> $t {
++                <$t>::abs_sub(*self, *other)
++            }
++
++            /// # Returns
++            ///
++            /// - `1.0` if the number is positive, `+0.0` or `INFINITY`
++            /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`
++            /// - `NAN` if the number is NaN
++            #[inline]
++            fn signum(&self) -> $t {
++                <$t>::signum(*self)
++            }
++
++            /// Returns `true` if the number is positive, including `+0.0` and `INFINITY`
++            #[inline]
++            fn is_positive(&self) -> bool { *self > 0.0 || (1.0 / *self) == $inf }
++
++            /// Returns `true` if the number is negative, including `-0.0` and `NEG_INFINITY`
++            #[inline]
++            fn is_negative(&self) -> bool { *self < 0.0 || (1.0 / *self) == $neg_inf }
++        }
++    }
++}
++
++signed_float_impl!(f32, f32::NAN, f32::INFINITY, f32::NEG_INFINITY);
++signed_float_impl!(f64, f64::NAN, f64::INFINITY, f64::NEG_INFINITY);
++
++/// Computes the absolute value.
++///
++/// For `f32` and `f64`, `NaN` will be returned if the number is `NaN`
++///
++/// For signed integers, `::MIN` will be returned if the number is `::MIN`.
++#[inline(always)]
++pub fn abs<T: Signed>(value: T) -> T {
++    value.abs()
++}
++
++/// The positive difference of two numbers.
++///
++/// Returns zero if `x` is less than or equal to `y`, otherwise the difference
++/// between `x` and `y` is returned.
++#[inline(always)]
++pub fn abs_sub<T: Signed>(x: T, y: T) -> T {
++    x.abs_sub(&y)
++}
++
++/// Returns the sign of the number.
++///
++/// For `f32` and `f64`:
++///
++/// * `1.0` if the number is positive, `+0.0` or `INFINITY`
++/// * `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`
++/// * `NaN` if the number is `NaN`
++///
++/// For signed integers:
++///
++/// * `0` if the number is zero
++/// * `1` if the number is positive
++/// * `-1` if the number is negative
++#[inline(always)] pub fn signum<T: Signed>(value: T) -> T { value.signum() }
++
++/// A trait for values which cannot be negative
++pub trait Unsigned: Num {}
++
++macro_rules! empty_trait_impl {
++    ($name:ident for $($t:ty)*) => ($(
++        impl $name for $t {}
++    )*)
++}
++
++empty_trait_impl!(Unsigned for usize u8 u16 u32 u64);
++
++impl<T: Unsigned> Unsigned for Wrapping<T> where Wrapping<T>: Num {}
++
++#[test]
++fn unsigned_wrapping_is_unsigned() {
++    fn require_unsigned<T: Unsigned>(_: &T) {}
++    require_unsigned(&Wrapping(42_u32));
++}
++/*
++// Commenting this out since it doesn't compile on Rust 1.8,
++// because on this version Wrapping doesn't implement Neg and therefore can't
++// implement Signed.
++#[test]
++fn signed_wrapping_is_signed() {
++    fn require_signed<T: Signed>(_: &T) {}
++    require_signed(&Wrapping(-42));
++}
++*/
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fbab6723fea673f2ca96ad6b6eb3f39b3f09dbc6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"f776f1d8af832fd2c637ee182c801e8f7ea8895718a2be9914cca001f6e2c40a"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..baa903a34102d5a1852955e74fbde5a44b9537f7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,33 @@@
++[package]
++name = "openssl"
++version = "0.9.15"
++authors = ["Steven Fackler <sfackler@gmail.com>"]
++license = "Apache-2.0"
++description = "OpenSSL bindings"
++repository = "https://github.com/sfackler/rust-openssl"
++documentation = "https://docs.rs/openssl/0.9.15/openssl"
++readme = "../README.md"
++keywords = ["crypto", "tls", "ssl", "dtls"]
++categories = ["cryptography", "api-bindings"]
++build = "build.rs"
++
++[package.metadata.docs.rs]
++all-features = true
++
++[features]
++v101 = []
++v102 = []
++v110 = []
++
++[dependencies]
++bitflags = "0.9"
++foreign-types = "0.2"
++lazy_static = "0.2"
++libc = "0.2"
++openssl-sys = { version = "0.9.15", path = "../openssl-sys" }
++
++[dev-dependencies]
++tempdir = "0.3"
++winapi = "0.2"
++ws2_32-sys = "0.2"
++hex = "0.2"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..808903ae0be21971b2eaf5b18c8aac2b37025e8a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++Copyright 2011 Google Inc.
++          2013 Jack Lloyd
++          2013-2014 Steven Fackler
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++    http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..954e9b0c622cecb58faabb7f94fe22371567634b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,28 @@@
++use std::env;
++
++fn main() {
++    match env::var("DEP_OPENSSL_VERSION") {
++        Ok(ref v) if v == "101" => {
++            println!("cargo:rustc-cfg=ossl101");
++            println!("cargo:rustc-cfg=ossl10x");
++        }
++        Ok(ref v) if v == "102" => {
++            println!("cargo:rustc-cfg=ossl102");
++            println!("cargo:rustc-cfg=ossl10x");
++        }
++        Ok(ref v) if v == "110" => {
++            println!("cargo:rustc-cfg=ossl110");
++        }
++        _ => panic!("Unable to detect OpenSSL version"),
++    }
++
++    if let Ok(_) = env::var("DEP_OPENSSL_LIBRESSL") {
++        println!("cargo:rustc-cfg=libressl");
++    }
++
++    if let Ok(vars) = env::var("DEP_OPENSSL_CONF") {
++        for var in vars.split(",") {
++            println!("cargo:rustc-cfg=osslconf=\"{}\"", var);
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..40546f591d2b5b21f02f0980ba6ad27c3e99fb5a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,121 @@@
++//! Low level AES functionality
++//!
++//! The `symm` module should be used in preference to this module in most cases.
++use ffi;
++use std::mem;
++use libc::c_int;
++
++use symm::Mode;
++
++#[derive(Debug)]
++pub struct KeyError(());
++
++pub struct AesKey(ffi::AES_KEY);
++
++impl AesKey {
++    /// Prepares a key for encryption.
++    ///
++    /// # Failure
++    ///
++    /// Returns an error if the key is not 128, 192, or 256 bits.
++    pub fn new_encrypt(key: &[u8]) -> Result<AesKey, KeyError> {
++        unsafe {
++            assert!(key.len() <= c_int::max_value() as usize / 8);
++
++            let mut aes_key = mem::uninitialized();
++            let r = ffi::AES_set_encrypt_key(
++                key.as_ptr() as *const _,
++                key.len() as c_int * 8,
++                &mut aes_key,
++            );
++            if r == 0 {
++                Ok(AesKey(aes_key))
++            } else {
++                Err(KeyError(()))
++            }
++        }
++    }
++
++    /// Prepares a key for decryption.
++    ///
++    /// # Failure
++    ///
++    /// Returns an error if the key is not 128, 192, or 256 bits.
++    pub fn new_decrypt(key: &[u8]) -> Result<AesKey, KeyError> {
++        unsafe {
++            assert!(key.len() <= c_int::max_value() as usize / 8);
++
++            let mut aes_key = mem::uninitialized();
++            let r = ffi::AES_set_decrypt_key(
++                key.as_ptr() as *const _,
++                key.len() as c_int * 8,
++                &mut aes_key,
++            );
++
++            if r == 0 {
++                Ok(AesKey(aes_key))
++            } else {
++                Err(KeyError(()))
++            }
++        }
++    }
++}
++
++/// Performs AES IGE encryption or decryption
++///
++/// # Panics
++///
++/// Panics if `in_` is not the same length as `out`, if that length is not a multiple of 16, or if
++/// `iv` is not at least 32 bytes.
++pub fn aes_ige(in_: &[u8], out: &mut [u8], key: &AesKey, iv: &mut [u8], mode: Mode) {
++    unsafe {
++        assert!(in_.len() == out.len());
++        assert!(in_.len() % ffi::AES_BLOCK_SIZE as usize == 0);
++        assert!(iv.len() >= ffi::AES_BLOCK_SIZE as usize * 2);
++
++        let mode = match mode {
++            Mode::Encrypt => ffi::AES_ENCRYPT,
++            Mode::Decrypt => ffi::AES_DECRYPT,
++        };
++        ffi::AES_ige_encrypt(
++            in_.as_ptr() as *const _,
++            out.as_mut_ptr() as *mut _,
++            in_.len(),
++            &key.0,
++            iv.as_mut_ptr() as *mut _,
++            mode,
++        );
++    }
++}
++
++#[cfg(test)]
++mod test {
++    use hex::FromHex;
++
++    use symm::Mode;
++    use super::*;
++
++    // From https://www.mgp25.com/AESIGE/
++    #[test]
++    fn ige_vector_1() {
++        let raw_key = "000102030405060708090A0B0C0D0E0F";
++        let raw_iv = "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F";
++        let raw_pt = "0000000000000000000000000000000000000000000000000000000000000000";
++        let raw_ct = "1A8519A6557BE652E9DA8E43DA4EF4453CF456B4CA488AA383C79C98B34797CB";
++
++        let key = AesKey::new_encrypt(&Vec::from_hex(raw_key).unwrap()).unwrap();
++        let mut iv = Vec::from_hex(raw_iv).unwrap();
++        let pt = Vec::from_hex(raw_pt).unwrap();
++        let ct = Vec::from_hex(raw_ct).unwrap();
++
++        let mut ct_actual = vec![0; ct.len()];
++        aes_ige(&pt, &mut ct_actual, &key, &mut iv, Mode::Encrypt);
++        assert_eq!(ct_actual, ct);
++
++        let key = AesKey::new_decrypt(&Vec::from_hex(raw_key).unwrap()).unwrap();
++        let mut iv = Vec::from_hex(raw_iv).unwrap();
++        let mut pt_actual = vec![0; pt.len()];
++        aes_ige(&ct, &mut pt_actual, &key, &mut iv, Mode::Decrypt);
++        assert_eq!(pt_actual, pt);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a50ec32f2b714ca8a26774a014e4f1c0b7f40ec6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,174 @@@
++use ffi;
++use foreign_types::{ForeignType, ForeignTypeRef};
++use libc::{c_long, c_char, c_int};
++use std::fmt;
++use std::ptr;
++use std::slice;
++use std::str;
++
++use {cvt, cvt_p};
++use bio::MemBio;
++use error::ErrorStack;
++use nid::Nid;
++use string::OpensslString;
++
++foreign_type! {
++    type CType = ffi::ASN1_GENERALIZEDTIME;
++    fn drop = ffi::ASN1_GENERALIZEDTIME_free;
++
++    pub struct Asn1GeneralizedTime;
++    pub struct Asn1GeneralizedTimeRef;
++}
++
++impl fmt::Display for Asn1GeneralizedTimeRef {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        unsafe {
++            let mem_bio = try!(MemBio::new());
++            try!(cvt(ffi::ASN1_GENERALIZEDTIME_print(
++                mem_bio.as_ptr(),
++                self.as_ptr(),
++            )));
++            write!(f, "{}", str::from_utf8_unchecked(mem_bio.get_buf()))
++        }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::ASN1_TIME;
++    fn drop = ffi::ASN1_TIME_free;
++
++    pub struct Asn1Time;
++    pub struct Asn1TimeRef;
++}
++
++impl fmt::Display for Asn1TimeRef {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        unsafe {
++            let mem_bio = try!(MemBio::new());
++            try!(cvt(ffi::ASN1_TIME_print(mem_bio.as_ptr(), self.as_ptr())));
++            write!(f, "{}", str::from_utf8_unchecked(mem_bio.get_buf()))
++        }
++    }
++}
++
++impl Asn1Time {
++    fn from_period(period: c_long) -> Result<Asn1Time, ErrorStack> {
++        ffi::init();
++
++        unsafe {
++            let handle = try!(cvt_p(ffi::X509_gmtime_adj(ptr::null_mut(), period)));
++            Ok(Asn1Time::from_ptr(handle))
++        }
++    }
++
++    /// Creates a new time on specified interval in days from now
++    pub fn days_from_now(days: u32) -> Result<Asn1Time, ErrorStack> {
++        Asn1Time::from_period(days as c_long * 60 * 60 * 24)
++    }
++}
++
++foreign_type! {
++    type CType = ffi::ASN1_STRING;
++    fn drop = ffi::ASN1_STRING_free;
++
++    pub struct Asn1String;
++    pub struct Asn1StringRef;
++}
++
++impl Asn1StringRef {
++    pub fn as_utf8(&self) -> Result<OpensslString, ErrorStack> {
++        unsafe {
++            let mut ptr = ptr::null_mut();
++            let len = ffi::ASN1_STRING_to_UTF8(&mut ptr, self.as_ptr());
++            if len < 0 {
++                return Err(ErrorStack::get());
++            }
++
++            Ok(OpensslString::from_ptr(ptr as *mut c_char))
++        }
++    }
++
++    pub fn as_slice(&self) -> &[u8] {
++        unsafe { slice::from_raw_parts(ASN1_STRING_data(self.as_ptr()), self.len()) }
++    }
++
++    pub fn len(&self) -> usize {
++        unsafe { ffi::ASN1_STRING_length(self.as_ptr()) as usize }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::ASN1_INTEGER;
++    fn drop = ffi::ASN1_INTEGER_free;
++
++    pub struct Asn1Integer;
++    pub struct Asn1IntegerRef;
++}
++
++impl Asn1IntegerRef {
++    pub fn get(&self) -> i64 {
++        unsafe { ::ffi::ASN1_INTEGER_get(self.as_ptr()) as i64 }
++    }
++
++    pub fn set(&mut self, value: i32) -> Result<(), ErrorStack> {
++        unsafe { cvt(::ffi::ASN1_INTEGER_set(self.as_ptr(), value as c_long)).map(|_| ()) }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::ASN1_BIT_STRING;
++    fn drop = ffi::ASN1_BIT_STRING_free;
++
++    pub struct Asn1BitString;
++    pub struct Asn1BitStringRef;
++}
++
++impl Asn1BitStringRef {
++    pub fn as_slice(&self) -> &[u8] {
++        unsafe { slice::from_raw_parts(ASN1_STRING_data(self.as_ptr() as *mut _), self.len()) }
++    }
++
++    pub fn len(&self) -> usize {
++        unsafe { ffi::ASN1_STRING_length(self.as_ptr() as *mut _) as usize }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::ASN1_OBJECT;
++    fn drop = ffi::ASN1_OBJECT_free;
++
++    pub struct Asn1Object;
++    pub struct Asn1ObjectRef;
++}
++
++impl Asn1ObjectRef {
++    /// Returns the NID associated with this OID.
++    pub fn nid(&self) -> Nid {
++        unsafe { Nid::from_raw(ffi::OBJ_obj2nid(self.as_ptr())) }
++    }
++}
++
++impl fmt::Display for Asn1ObjectRef {
++    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++        unsafe {
++            let mut buf = [0; 80];
++            let len = ffi::OBJ_obj2txt(
++                buf.as_mut_ptr() as *mut _,
++                buf.len() as c_int,
++                self.as_ptr(),
++                0,
++            );
++            let s = try!(str::from_utf8(&buf[..len as usize]).map_err(|_| fmt::Error));
++            fmt.write_str(s)
++        }
++    }
++}
++
++#[cfg(any(ossl101, ossl102))]
++use ffi::ASN1_STRING_data;
++
++#[cfg(ossl110)]
++#[allow(bad_style)]
++unsafe fn ASN1_STRING_data(s: *mut ffi::ASN1_STRING) -> *mut ::libc::c_uchar {
++    ffi::ASN1_STRING_get0_data(s) as *mut _
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ab00fe42343a4385cd07bc4eaba91a4ecdd500f9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,78 @@@
++use std::marker::PhantomData;
++use std::ptr;
++use std::slice;
++use libc::c_int;
++use ffi;
++
++use cvt_p;
++use error::ErrorStack;
++
++pub struct MemBioSlice<'a>(*mut ffi::BIO, PhantomData<&'a [u8]>);
++
++impl<'a> Drop for MemBioSlice<'a> {
++    fn drop(&mut self) {
++        unsafe {
++            ffi::BIO_free_all(self.0);
++        }
++    }
++}
++
++impl<'a> MemBioSlice<'a> {
++    pub fn new(buf: &'a [u8]) -> Result<MemBioSlice<'a>, ErrorStack> {
++        ffi::init();
++
++        assert!(buf.len() <= c_int::max_value() as usize);
++        let bio = unsafe {
++            try!(cvt_p(BIO_new_mem_buf(
++                buf.as_ptr() as *const _,
++                buf.len() as c_int,
++            )))
++        };
++
++        Ok(MemBioSlice(bio, PhantomData))
++    }
++
++    pub fn as_ptr(&self) -> *mut ffi::BIO {
++        self.0
++    }
++}
++
++pub struct MemBio(*mut ffi::BIO);
++
++impl Drop for MemBio {
++    fn drop(&mut self) {
++        unsafe {
++            ffi::BIO_free_all(self.0);
++        }
++    }
++}
++
++impl MemBio {
++    pub fn new() -> Result<MemBio, ErrorStack> {
++        ffi::init();
++
++        let bio = unsafe { try!(cvt_p(ffi::BIO_new(ffi::BIO_s_mem()))) };
++        Ok(MemBio(bio))
++    }
++
++    pub fn as_ptr(&self) -> *mut ffi::BIO {
++        self.0
++    }
++
++    pub fn get_buf(&self) -> &[u8] {
++        unsafe {
++            let mut ptr = ptr::null_mut();
++            let len = ffi::BIO_get_mem_data(self.0, &mut ptr);
++            slice::from_raw_parts(ptr as *const _ as *const _, len as usize)
++        }
++    }
++}
++
++#[cfg(not(ossl101))]
++use ffi::BIO_new_mem_buf;
++
++#[cfg(ossl101)]
++#[allow(bad_style)]
++unsafe fn BIO_new_mem_buf(buf: *const ::libc::c_void, len: ::libc::c_int) -> *mut ffi::BIO {
++    ffi::BIO_new_mem_buf(buf as *mut _, len)
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e3de8672c3b28f187e7e2334dc1bfd34390f63e4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1056 @@@
++use ffi;
++use foreign_types::{ForeignType, ForeignTypeRef};
++use libc::c_int;
++use std::cmp::Ordering;
++use std::ffi::CString;
++use std::{fmt, ptr};
++use std::ops::{Add, Div, Mul, Neg, Rem, Shl, Shr, Sub, Deref};
++
++use {cvt, cvt_p, cvt_n};
++use asn1::Asn1Integer;
++use error::ErrorStack;
++use string::OpensslString;
++
++#[cfg(ossl10x)]
++use ffi::{get_rfc2409_prime_768 as BN_get_rfc2409_prime_768,
++          get_rfc2409_prime_1024 as BN_get_rfc2409_prime_1024,
++          get_rfc3526_prime_1536 as BN_get_rfc3526_prime_1536,
++          get_rfc3526_prime_2048 as BN_get_rfc3526_prime_2048,
++          get_rfc3526_prime_3072 as BN_get_rfc3526_prime_3072,
++          get_rfc3526_prime_4096 as BN_get_rfc3526_prime_4096,
++          get_rfc3526_prime_6144 as BN_get_rfc3526_prime_6144,
++          get_rfc3526_prime_8192 as BN_get_rfc3526_prime_8192};
++
++#[cfg(ossl110)]
++use ffi::{BN_get_rfc2409_prime_768, BN_get_rfc2409_prime_1024, BN_get_rfc3526_prime_1536,
++          BN_get_rfc3526_prime_2048, BN_get_rfc3526_prime_3072, BN_get_rfc3526_prime_4096,
++          BN_get_rfc3526_prime_6144, BN_get_rfc3526_prime_8192};
++
++/// Options for the most significant bits of a randomly generated `BigNum`.
++pub struct MsbOption(c_int);
++
++/// The most significant bit of the number may be 0.
++pub const MSB_MAYBE_ZERO: MsbOption = MsbOption(-1);
++
++/// The most significant bit of the number must be 1.
++pub const MSB_ONE: MsbOption = MsbOption(0);
++
++/// The most significant two bits of the number must be 1.
++///
++/// The number of bits in the product of two such numbers will always be exactly twice the number
++/// of bits in the original numbers.
++pub const TWO_MSB_ONE: MsbOption = MsbOption(1);
++
++foreign_type! {
++    type CType = ffi::BN_CTX;
++    fn drop = ffi::BN_CTX_free;
++
++    pub struct BigNumContext;
++    pub struct BigNumContextRef;
++}
++
++impl BigNumContext {
++    /// Returns a new `BigNumContext`.
++    pub fn new() -> Result<BigNumContext, ErrorStack> {
++        unsafe { cvt_p(ffi::BN_CTX_new()).map(BigNumContext) }
++    }
++}
++
++impl BigNumRef {
++    /// Erases the memory used by this `BigNum`, resetting its value to 0.
++    ///
++    /// This can be used to destroy sensitive data such as keys when they are no longer needed.
++    pub fn clear(&mut self) {
++        unsafe { ffi::BN_clear(self.as_ptr()) }
++    }
++
++    /// Adds a `u32` to `self`.
++    pub fn add_word(&mut self, w: u32) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::BN_add_word(self.as_ptr(), w as ffi::BN_ULONG)).map(|_| ()) }
++    }
++
++    /// Subtracts a `u32` from `self`.
++    pub fn sub_word(&mut self, w: u32) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::BN_sub_word(self.as_ptr(), w as ffi::BN_ULONG)).map(|_| ()) }
++    }
++
++    /// Multiplies a `u32` by `self`.
++    pub fn mul_word(&mut self, w: u32) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::BN_mul_word(self.as_ptr(), w as ffi::BN_ULONG)).map(|_| ()) }
++    }
++
++    /// Divides `self` by a `u32`, returning the remainder.
++    pub fn div_word(&mut self, w: u32) -> Result<u64, ErrorStack> {
++        unsafe {
++            let r = ffi::BN_div_word(self.as_ptr(), w.into());
++            if r == ffi::BN_ULONG::max_value() {
++                Err(ErrorStack::get())
++            } else {
++                Ok(r.into())
++            }
++        }
++    }
++
++    /// Returns the result of `self` modulo `w`.
++    pub fn mod_word(&self, w: u32) -> Result<u64, ErrorStack> {
++        unsafe {
++            let r = ffi::BN_mod_word(self.as_ptr(), w.into());
++            if r == ffi::BN_ULONG::max_value() {
++                Err(ErrorStack::get())
++            } else {
++                Ok(r.into())
++            }
++        }
++    }
++
++    /// Places a cryptographically-secure pseudo-random number nonnegative
++    /// number less than `self` in `rnd`.
++    pub fn rand_range(&self, rnd: &mut BigNumRef) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::BN_rand_range(rnd.as_ptr(), self.as_ptr())).map(|_| ()) }
++    }
++
++    /// The cryptographically weak counterpart to `rand_in_range`.
++    pub fn pseudo_rand_range(&self, rnd: &mut BigNumRef) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::BN_pseudo_rand_range(rnd.as_ptr(), self.as_ptr())).map(|_| ()) }
++    }
++
++    /// Sets bit `n`. Equivalent to `self |= (1 << n)`.
++    ///
++    /// When setting a bit outside of `self`, it is expanded.
++    pub fn set_bit(&mut self, n: i32) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::BN_set_bit(self.as_ptr(), n.into())).map(|_| ()) }
++    }
++
++    /// Clears bit `n`, setting it to 0. Equivalent to `self &= ~(1 << n)`.
++    ///
++    /// When clearing a bit outside of `self`, an error is returned.
++    pub fn clear_bit(&mut self, n: i32) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::BN_clear_bit(self.as_ptr(), n.into())).map(|_| ()) }
++    }
++
++    /// Returns `true` if the `n`th bit of `self` is set to 1, `false` otherwise.
++    pub fn is_bit_set(&self, n: i32) -> bool {
++        unsafe { ffi::BN_is_bit_set(self.as_ptr(), n.into()) == 1 }
++    }
++
++    /// Truncates `self` to the lowest `n` bits.
++    ///
++    /// An error occurs if `self` is already shorter than `n` bits.
++    pub fn mask_bits(&mut self, n: i32) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::BN_mask_bits(self.as_ptr(), n.into())).map(|_| ()) }
++    }
++
++    /// Places `a << 1` in `self`.
++    pub fn lshift1(&mut self, a: &BigNumRef) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::BN_lshift1(self.as_ptr(), a.as_ptr())).map(|_| ()) }
++    }
++
++    /// Places `a >> 1` in `self`.
++    pub fn rshift1(&mut self, a: &BigNumRef) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::BN_rshift1(self.as_ptr(), a.as_ptr())).map(|_| ()) }
++    }
++
++    /// Places `a + b` in `self`.
++    pub fn checked_add(&mut self, a: &BigNumRef, b: &BigNumRef) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::BN_add(self.as_ptr(), a.as_ptr(), b.as_ptr())).map(|_| ()) }
++    }
++
++    /// Places `a - b` in `self`.
++    pub fn checked_sub(&mut self, a: &BigNumRef, b: &BigNumRef) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::BN_sub(self.as_ptr(), a.as_ptr(), b.as_ptr())).map(|_| ()) }
++    }
++
++    /// Places `a << n` in `self`.
++    pub fn lshift(&mut self, a: &BigNumRef, n: i32) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::BN_lshift(self.as_ptr(), a.as_ptr(), n.into())).map(|_| ()) }
++    }
++
++    /// Places `a >> n` in `self`.
++    pub fn rshift(&mut self, a: &BigNumRef, n: i32) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::BN_rshift(self.as_ptr(), a.as_ptr(), n.into())).map(|_| ()) }
++    }
++
++    pub fn to_owned(&self) -> Result<BigNum, ErrorStack> {
++        unsafe { cvt_p(ffi::BN_dup(self.as_ptr())).map(|b| BigNum::from_ptr(b)) }
++    }
++
++    /// Sets the sign of `self`.
++    pub fn set_negative(&mut self, negative: bool) {
++        unsafe { ffi::BN_set_negative(self.as_ptr(), negative as c_int) }
++    }
++
++    /// Compare the absolute values of `self` and `oth`.
++    ///
++    /// ```
++    /// # use openssl::bn::BigNum;
++    /// # use std::cmp::Ordering;
++    /// let s = -BigNum::from_u32(8).unwrap();
++    /// let o = BigNum::from_u32(8).unwrap();
++    ///
++    /// assert_eq!(s.ucmp(&o), Ordering::Equal);
++    /// ```
++    pub fn ucmp(&self, oth: &BigNumRef) -> Ordering {
++        unsafe { ffi::BN_ucmp(self.as_ptr(), oth.as_ptr()).cmp(&0) }
++    }
++
++    pub fn is_negative(&self) -> bool {
++        self._is_negative()
++    }
++
++    #[cfg(ossl10x)]
++    fn _is_negative(&self) -> bool {
++        unsafe { (*self.as_ptr()).neg == 1 }
++    }
++
++    #[cfg(ossl110)]
++    fn _is_negative(&self) -> bool {
++        unsafe { ffi::BN_is_negative(self.as_ptr()) == 1 }
++    }
++
++    /// Returns the number of significant bits in `self`.
++    pub fn num_bits(&self) -> i32 {
++        unsafe { ffi::BN_num_bits(self.as_ptr()) as i32 }
++    }
++
++    /// Returns the size of `self` in bytes.
++    pub fn num_bytes(&self) -> i32 {
++        (self.num_bits() + 7) / 8
++    }
++
++    /// Generates a cryptographically strong pseudo-random `BigNum`, placing it in `self`.
++    ///
++    /// # Parameters
++    ///
++    /// * `bits`: Length of the number in bits.
++    /// * `msb`: The desired properties of the number.
++    /// * `odd`: If `true`, the generated number will be odd.
++    pub fn rand(&mut self, bits: i32, msb: MsbOption, odd: bool) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::BN_rand(
++                self.as_ptr(),
++                bits.into(),
++                msb.0,
++                odd as c_int,
++            )).map(|_| ())
++        }
++    }
++
++    /// The cryptographically weak counterpart to `rand`.
++    pub fn pseudo_rand(&mut self, bits: i32, msb: MsbOption, odd: bool) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::BN_pseudo_rand(
++                self.as_ptr(),
++                bits.into(),
++                msb.0,
++                odd as c_int,
++            )).map(|_| ())
++        }
++    }
++
++    /// Generates a prime number, placing it in `self`.
++    ///
++    /// # Parameters
++    ///
++    /// * `bits`: The length of the prime in bits (lower bound).
++    /// * `safe`: If true, returns a "safe" prime `p` so that `(p-1)/2` is also prime.
++    /// * `add`/`rem`: If `add` is set to `Some(add)`, `p % add == rem` will hold, where `p` is the
++    ///   generated prime and `rem` is `1` if not specified (`None`).
++    pub fn generate_prime(
++        &mut self,
++        bits: i32,
++        safe: bool,
++        add: Option<&BigNumRef>,
++        rem: Option<&BigNumRef>,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::BN_generate_prime_ex(
++                self.as_ptr(),
++                bits as c_int,
++                safe as c_int,
++                add.map(|n| n.as_ptr()).unwrap_or(ptr::null_mut()),
++                rem.map(|n| n.as_ptr()).unwrap_or(ptr::null_mut()),
++                ptr::null_mut(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Places the result of `a * b` in `self`.
++    pub fn checked_mul(
++        &mut self,
++        a: &BigNumRef,
++        b: &BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::BN_mul(
++                self.as_ptr(),
++                a.as_ptr(),
++                b.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Places the result of `a / b` in `self`.
++    pub fn checked_div(
++        &mut self,
++        a: &BigNumRef,
++        b: &BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::BN_div(
++                self.as_ptr(),
++                ptr::null_mut(),
++                a.as_ptr(),
++                b.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Places the result of `a % b` in `self`.
++    pub fn checked_rem(
++        &mut self,
++        a: &BigNumRef,
++        b: &BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::BN_div(
++                ptr::null_mut(),
++                self.as_ptr(),
++                a.as_ptr(),
++                b.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Places the result of `a / b` in `self` and `a % b` in `rem`.
++    pub fn div_rem(
++        &mut self,
++        rem: &mut BigNumRef,
++        a: &BigNumRef,
++        b: &BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::BN_div(
++                self.as_ptr(),
++                rem.as_ptr(),
++                a.as_ptr(),
++                b.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Places the result of `a²` in `self`.
++    pub fn sqr(&mut self, a: &BigNumRef, ctx: &mut BigNumContextRef) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::BN_sqr(self.as_ptr(), a.as_ptr(), ctx.as_ptr())).map(|_| ()) }
++    }
++
++    /// Places the result of `a mod m` in `self`.
++    pub fn nnmod(
++        &mut self,
++        a: &BigNumRef,
++        m: &BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::BN_nnmod(
++                self.as_ptr(),
++                a.as_ptr(),
++                m.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Places the result of `(a + b) mod m` in `self`.
++    pub fn mod_add(
++        &mut self,
++        a: &BigNumRef,
++        b: &BigNumRef,
++        m: &BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::BN_mod_add(
++                self.as_ptr(),
++                a.as_ptr(),
++                b.as_ptr(),
++                m.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Places the result of `(a - b) mod m` in `self`.
++    pub fn mod_sub(
++        &mut self,
++        a: &BigNumRef,
++        b: &BigNumRef,
++        m: &BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::BN_mod_sub(
++                self.as_ptr(),
++                a.as_ptr(),
++                b.as_ptr(),
++                m.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Places the result of `(a * b) mod m` in `self`.
++    pub fn mod_mul(
++        &mut self,
++        a: &BigNumRef,
++        b: &BigNumRef,
++        m: &BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::BN_mod_mul(
++                self.as_ptr(),
++                a.as_ptr(),
++                b.as_ptr(),
++                m.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Places the result of `a² mod m` in `self`.
++    pub fn mod_sqr(
++        &mut self,
++        a: &BigNumRef,
++        m: &BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::BN_mod_sqr(
++                self.as_ptr(),
++                a.as_ptr(),
++                m.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Places the result of `a^p` in `self`.
++    pub fn exp(
++        &mut self,
++        a: &BigNumRef,
++        p: &BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::BN_exp(
++                self.as_ptr(),
++                a.as_ptr(),
++                p.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Places the result of `a^p mod m` in `self`.
++    pub fn mod_exp(
++        &mut self,
++        a: &BigNumRef,
++        p: &BigNumRef,
++        m: &BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::BN_mod_exp(
++                self.as_ptr(),
++                a.as_ptr(),
++                p.as_ptr(),
++                m.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Places the inverse of `a` modulo `n` in `self`.
++    pub fn mod_inverse(
++        &mut self,
++        a: &BigNumRef,
++        n: &BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt_p(ffi::BN_mod_inverse(
++                self.as_ptr(),
++                a.as_ptr(),
++                n.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Places the greatest common denominator of `a` and `b` in `self`.
++    pub fn gcd(
++        &mut self,
++        a: &BigNumRef,
++        b: &BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::BN_gcd(
++                self.as_ptr(),
++                a.as_ptr(),
++                b.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Checks whether `self` is prime.
++    ///
++    /// Performs a Miller-Rabin probabilistic primality test with `checks` iterations.
++    ///
++    /// Returns `true` if `self` is prime with an error probability of less than `0.25 ^ checks`.
++    pub fn is_prime(&self, checks: i32, ctx: &mut BigNumContextRef) -> Result<bool, ErrorStack> {
++        unsafe {
++            cvt_n(ffi::BN_is_prime_ex(
++                self.as_ptr(),
++                checks.into(),
++                ctx.as_ptr(),
++                ptr::null_mut(),
++            )).map(|r| r != 0)
++        }
++    }
++
++    /// Checks whether `self` is prime with optional trial division.
++    ///
++    /// If `do_trial_division` is `true`, first performs trial division by a number of small primes.
++    /// Then, like `is_prime`, performs a Miller-Rabin probabilistic primality test with `checks`
++    /// iterations.
++    ///
++    /// # Return Value
++    ///
++    /// Returns `true` if `self` is prime with an error probability of less than `0.25 ^ checks`.
++    pub fn is_prime_fasttest(
++        &self,
++        checks: i32,
++        ctx: &mut BigNumContextRef,
++        do_trial_division: bool,
++    ) -> Result<bool, ErrorStack> {
++        unsafe {
++            cvt_n(ffi::BN_is_prime_fasttest_ex(
++                self.as_ptr(),
++                checks.into(),
++                ctx.as_ptr(),
++                do_trial_division as c_int,
++                ptr::null_mut(),
++            )).map(|r| r != 0)
++        }
++    }
++
++    /// Returns a big-endian byte vector representation of the absolute value of `self`.
++    ///
++    /// `self` can be recreated by using `from_slice`.
++    ///
++    /// ```
++    /// # use openssl::bn::BigNum;
++    /// let s = -BigNum::from_u32(4543).unwrap();
++    /// let r = BigNum::from_u32(4543).unwrap();
++    ///
++    /// let s_vec = s.to_vec();
++    /// assert_eq!(BigNum::from_slice(&s_vec).unwrap(), r);
++    /// ```
++    pub fn to_vec(&self) -> Vec<u8> {
++        let size = self.num_bytes() as usize;
++        let mut v = Vec::with_capacity(size);
++        unsafe {
++            ffi::BN_bn2bin(self.as_ptr(), v.as_mut_ptr());
++            v.set_len(size);
++        }
++        v
++    }
++
++    /// Returns a decimal string representation of `self`.
++    ///
++    /// ```
++    /// # use openssl::bn::BigNum;
++    /// let s = -BigNum::from_u32(12345).unwrap();
++    ///
++    /// assert_eq!(&**s.to_dec_str().unwrap(), "-12345");
++    /// ```
++    pub fn to_dec_str(&self) -> Result<OpensslString, ErrorStack> {
++        unsafe {
++            let buf = try!(cvt_p(ffi::BN_bn2dec(self.as_ptr())));
++            Ok(OpensslString::from_ptr(buf))
++        }
++    }
++
++    /// Returns a hexadecimal string representation of `self`.
++    ///
++    /// ```
++    /// # use openssl::bn::BigNum;
++    /// let s = -BigNum::from_u32(0x99ff).unwrap();
++    ///
++    /// assert_eq!(&**s.to_hex_str().unwrap(), "-99FF");
++    /// ```
++    pub fn to_hex_str(&self) -> Result<OpensslString, ErrorStack> {
++        unsafe {
++            let buf = try!(cvt_p(ffi::BN_bn2hex(self.as_ptr())));
++            Ok(OpensslString::from_ptr(buf))
++        }
++    }
++
++    /// Returns an `Asn1Integer` containing the value of `self`.
++    pub fn to_asn1_integer(&self) -> Result<Asn1Integer, ErrorStack> {
++        unsafe {
++            cvt_p(ffi::BN_to_ASN1_INTEGER(self.as_ptr(), ptr::null_mut()))
++                .map(|p| Asn1Integer::from_ptr(p))
++        }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::BIGNUM;
++    fn drop = ffi::BN_free;
++
++    pub struct BigNum;
++    pub struct BigNumRef;
++}
++
++impl BigNum {
++    /// Creates a new `BigNum` with the value 0.
++    pub fn new() -> Result<BigNum, ErrorStack> {
++        unsafe {
++            ffi::init();
++            let v = try!(cvt_p(ffi::BN_new()));
++            Ok(BigNum::from_ptr(v))
++        }
++    }
++
++    /// Creates a new `BigNum` with the given value.
++    pub fn from_u32(n: u32) -> Result<BigNum, ErrorStack> {
++        BigNum::new().and_then(|v| unsafe {
++            cvt(ffi::BN_set_word(v.as_ptr(), n as ffi::BN_ULONG)).map(|_| v)
++        })
++    }
++
++    /// Creates a `BigNum` from a decimal string.
++    pub fn from_dec_str(s: &str) -> Result<BigNum, ErrorStack> {
++        unsafe {
++            ffi::init();
++            let c_str = CString::new(s.as_bytes()).unwrap();
++            let mut bn = ptr::null_mut();
++            try!(cvt(ffi::BN_dec2bn(&mut bn, c_str.as_ptr() as *const _)));
++            Ok(BigNum::from_ptr(bn))
++        }
++    }
++
++    /// Creates a `BigNum` from a hexadecimal string.
++    pub fn from_hex_str(s: &str) -> Result<BigNum, ErrorStack> {
++        unsafe {
++            ffi::init();
++            let c_str = CString::new(s.as_bytes()).unwrap();
++            let mut bn = ptr::null_mut();
++            try!(cvt(ffi::BN_hex2bn(&mut bn, c_str.as_ptr() as *const _)));
++            Ok(BigNum::from_ptr(bn))
++        }
++    }
++
++    pub fn get_rfc2409_prime_768() -> Result<BigNum, ErrorStack> {
++        unsafe {
++            ffi::init();
++            cvt_p(BN_get_rfc2409_prime_768(ptr::null_mut())).map(BigNum)
++        }
++    }
++
++    pub fn get_rfc2409_prime_1024() -> Result<BigNum, ErrorStack> {
++        unsafe {
++            ffi::init();
++            cvt_p(BN_get_rfc2409_prime_1024(ptr::null_mut())).map(BigNum)
++        }
++    }
++
++    pub fn get_rfc3526_prime_1536() -> Result<BigNum, ErrorStack> {
++        unsafe {
++            ffi::init();
++            cvt_p(BN_get_rfc3526_prime_1536(ptr::null_mut())).map(BigNum)
++        }
++    }
++
++    pub fn get_rfc3526_prime_2048() -> Result<BigNum, ErrorStack> {
++        unsafe {
++            ffi::init();
++            cvt_p(BN_get_rfc3526_prime_2048(ptr::null_mut())).map(BigNum)
++        }
++    }
++
++    pub fn get_rfc3526_prime_3072() -> Result<BigNum, ErrorStack> {
++        unsafe {
++            ffi::init();
++            cvt_p(BN_get_rfc3526_prime_3072(ptr::null_mut())).map(BigNum)
++        }
++    }
++
++    pub fn get_rfc3526_prime_4096() -> Result<BigNum, ErrorStack> {
++        unsafe {
++            ffi::init();
++            cvt_p(BN_get_rfc3526_prime_4096(ptr::null_mut())).map(BigNum)
++        }
++    }
++
++    pub fn get_rfc3526_prime_6144() -> Result<BigNum, ErrorStack> {
++        unsafe {
++            ffi::init();
++            cvt_p(BN_get_rfc3526_prime_6144(ptr::null_mut())).map(BigNum)
++        }
++    }
++
++    pub fn get_rfc3526_prime_8192() -> Result<BigNum, ErrorStack> {
++        unsafe {
++            ffi::init();
++            cvt_p(BN_get_rfc3526_prime_8192(ptr::null_mut())).map(BigNum)
++        }
++    }
++
++    /// Creates a new `BigNum` from an unsigned, big-endian encoded number of arbitrary length.
++    ///
++    /// ```
++    /// # use openssl::bn::BigNum;
++    /// let bignum = BigNum::from_slice(&[0x12, 0x00, 0x34]).unwrap();
++    ///
++    /// assert_eq!(bignum, BigNum::from_u32(0x120034).unwrap());
++    /// ```
++    pub fn from_slice(n: &[u8]) -> Result<BigNum, ErrorStack> {
++        unsafe {
++            ffi::init();
++            assert!(n.len() <= c_int::max_value() as usize);
++            cvt_p(ffi::BN_bin2bn(
++                n.as_ptr(),
++                n.len() as c_int,
++                ptr::null_mut(),
++            )).map(|p| BigNum::from_ptr(p))
++        }
++    }
++}
++
++impl AsRef<BigNumRef> for BigNum {
++    fn as_ref(&self) -> &BigNumRef {
++        self.deref()
++    }
++}
++
++impl fmt::Debug for BigNumRef {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        match self.to_dec_str() {
++            Ok(s) => f.write_str(&s),
++            Err(e) => Err(e.into()),
++        }
++    }
++}
++
++impl fmt::Debug for BigNum {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        match self.to_dec_str() {
++            Ok(s) => f.write_str(&s),
++            Err(e) => Err(e.into()),
++        }
++    }
++}
++
++impl fmt::Display for BigNumRef {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        match self.to_dec_str() {
++            Ok(s) => f.write_str(&s),
++            Err(e) => Err(e.into()),
++        }
++    }
++}
++
++impl fmt::Display for BigNum {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        match self.to_dec_str() {
++            Ok(s) => f.write_str(&s),
++            Err(e) => Err(e.into()),
++        }
++    }
++}
++
++impl PartialEq<BigNumRef> for BigNumRef {
++    fn eq(&self, oth: &BigNumRef) -> bool {
++        self.cmp(oth) == Ordering::Equal
++    }
++}
++
++impl PartialEq<BigNum> for BigNumRef {
++    fn eq(&self, oth: &BigNum) -> bool {
++        self.eq(oth.deref())
++    }
++}
++
++impl Eq for BigNumRef {}
++
++impl PartialEq for BigNum {
++    fn eq(&self, oth: &BigNum) -> bool {
++        self.deref().eq(oth)
++    }
++}
++
++impl PartialEq<BigNumRef> for BigNum {
++    fn eq(&self, oth: &BigNumRef) -> bool {
++        self.deref().eq(oth)
++    }
++}
++
++impl Eq for BigNum {}
++
++impl PartialOrd<BigNumRef> for BigNumRef {
++    fn partial_cmp(&self, oth: &BigNumRef) -> Option<Ordering> {
++        Some(self.cmp(oth))
++    }
++}
++
++impl PartialOrd<BigNum> for BigNumRef {
++    fn partial_cmp(&self, oth: &BigNum) -> Option<Ordering> {
++        Some(self.cmp(oth.deref()))
++    }
++}
++
++impl Ord for BigNumRef {
++    fn cmp(&self, oth: &BigNumRef) -> Ordering {
++        unsafe { ffi::BN_cmp(self.as_ptr(), oth.as_ptr()).cmp(&0) }
++    }
++}
++
++impl PartialOrd for BigNum {
++    fn partial_cmp(&self, oth: &BigNum) -> Option<Ordering> {
++        self.deref().partial_cmp(oth.deref())
++    }
++}
++
++impl PartialOrd<BigNumRef> for BigNum {
++    fn partial_cmp(&self, oth: &BigNumRef) -> Option<Ordering> {
++        self.deref().partial_cmp(oth)
++    }
++}
++
++impl Ord for BigNum {
++    fn cmp(&self, oth: &BigNum) -> Ordering {
++        self.deref().cmp(oth.deref())
++    }
++}
++
++macro_rules! delegate {
++    ($t:ident, $m:ident) => {
++        impl<'a, 'b> $t<&'b BigNum> for &'a BigNumRef {
++            type Output = BigNum;
++
++            fn $m(self, oth: &BigNum) -> BigNum {
++                $t::$m(self, oth.deref())
++            }
++        }
++
++        impl<'a, 'b> $t<&'b BigNumRef> for &'a BigNum {
++            type Output = BigNum;
++
++            fn $m(self, oth: &BigNumRef) -> BigNum {
++                $t::$m(self.deref(), oth)
++            }
++        }
++
++        impl<'a, 'b> $t<&'b BigNum> for &'a BigNum {
++            type Output = BigNum;
++
++            fn $m(self, oth: &BigNum) -> BigNum {
++                $t::$m(self.deref(), oth.deref())
++            }
++        }
++    }
++}
++
++impl<'a, 'b> Add<&'b BigNumRef> for &'a BigNumRef {
++    type Output = BigNum;
++
++    fn add(self, oth: &BigNumRef) -> BigNum {
++        let mut r = BigNum::new().unwrap();
++        r.checked_add(self, oth).unwrap();
++        r
++    }
++}
++
++delegate!(Add, add);
++
++impl<'a, 'b> Sub<&'b BigNumRef> for &'a BigNumRef {
++    type Output = BigNum;
++
++    fn sub(self, oth: &BigNumRef) -> BigNum {
++        let mut r = BigNum::new().unwrap();
++        r.checked_sub(self, oth).unwrap();
++        r
++    }
++}
++
++delegate!(Sub, sub);
++
++impl<'a, 'b> Mul<&'b BigNumRef> for &'a BigNumRef {
++    type Output = BigNum;
++
++    fn mul(self, oth: &BigNumRef) -> BigNum {
++        let mut ctx = BigNumContext::new().unwrap();
++        let mut r = BigNum::new().unwrap();
++        r.checked_mul(self, oth, &mut ctx).unwrap();
++        r
++    }
++}
++
++delegate!(Mul, mul);
++
++impl<'a, 'b> Div<&'b BigNumRef> for &'a BigNumRef {
++    type Output = BigNum;
++
++    fn div(self, oth: &'b BigNumRef) -> BigNum {
++        let mut ctx = BigNumContext::new().unwrap();
++        let mut r = BigNum::new().unwrap();
++        r.checked_div(self, oth, &mut ctx).unwrap();
++        r
++    }
++}
++
++delegate!(Div, div);
++
++impl<'a, 'b> Rem<&'b BigNumRef> for &'a BigNumRef {
++    type Output = BigNum;
++
++    fn rem(self, oth: &'b BigNumRef) -> BigNum {
++        let mut ctx = BigNumContext::new().unwrap();
++        let mut r = BigNum::new().unwrap();
++        r.checked_rem(self, oth, &mut ctx).unwrap();
++        r
++    }
++}
++
++delegate!(Rem, rem);
++
++impl<'a> Shl<i32> for &'a BigNumRef {
++    type Output = BigNum;
++
++    fn shl(self, n: i32) -> BigNum {
++        let mut r = BigNum::new().unwrap();
++        r.lshift(self, n).unwrap();
++        r
++    }
++}
++
++impl<'a> Shl<i32> for &'a BigNum {
++    type Output = BigNum;
++
++    fn shl(self, n: i32) -> BigNum {
++        self.deref().shl(n)
++    }
++}
++
++impl<'a> Shr<i32> for &'a BigNumRef {
++    type Output = BigNum;
++
++    fn shr(self, n: i32) -> BigNum {
++        let mut r = BigNum::new().unwrap();
++        r.rshift(self, n).unwrap();
++        r
++    }
++}
++
++impl<'a> Shr<i32> for &'a BigNum {
++    type Output = BigNum;
++
++    fn shr(self, n: i32) -> BigNum {
++        self.deref().shr(n)
++    }
++}
++
++impl<'a> Neg for &'a BigNumRef {
++    type Output = BigNum;
++
++    fn neg(self) -> BigNum {
++        self.to_owned().unwrap().neg()
++    }
++}
++
++impl<'a> Neg for &'a BigNum {
++    type Output = BigNum;
++
++    fn neg(self) -> BigNum {
++        self.deref().neg()
++    }
++}
++
++impl Neg for BigNum {
++    type Output = BigNum;
++
++    fn neg(mut self) -> BigNum {
++        let negative = self.is_negative();
++        self.set_negative(!negative);
++        self
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use bn::{BigNumContext, BigNum};
++
++    #[test]
++    fn test_to_from_slice() {
++        let v0 = BigNum::from_u32(10203004).unwrap();
++        let vec = v0.to_vec();
++        let v1 = BigNum::from_slice(&vec).unwrap();
++
++        assert!(v0 == v1);
++    }
++
++    #[test]
++    fn test_negation() {
++        let a = BigNum::from_u32(909829283).unwrap();
++
++        assert!(!a.is_negative());
++        assert!((-a).is_negative());
++    }
++
++    #[test]
++    fn test_shift() {
++        let a = BigNum::from_u32(909829283).unwrap();
++        use std::ops::{Shl, Shr};
++
++        assert!(a == a.shl(1).shr(1));
++    }
++
++    #[test]
++    fn test_rand_range() {
++        let range = BigNum::from_u32(909829283).unwrap();
++        let mut result = BigNum::from_dec_str(&range.to_dec_str().unwrap()).unwrap();
++        range.rand_range(&mut result).unwrap();
++        assert!(result >= BigNum::from_u32(0).unwrap() && result < range);
++    }
++
++    #[test]
++    fn test_pseudo_rand_range() {
++        let range = BigNum::from_u32(909829283).unwrap();
++        let mut result = BigNum::from_dec_str(&range.to_dec_str().unwrap()).unwrap();
++        range.pseudo_rand_range(&mut result).unwrap();
++        assert!(result >= BigNum::from_u32(0).unwrap() && result < range);
++    }
++
++    #[test]
++    fn test_prime_numbers() {
++        let a = BigNum::from_u32(19029017).unwrap();
++        let mut p = BigNum::new().unwrap();
++        p.generate_prime(128, true, None, Some(&a)).unwrap();
++
++        let mut ctx = BigNumContext::new().unwrap();
++        assert!(p.is_prime(100, &mut ctx).unwrap());
++        assert!(p.is_prime_fasttest(100, &mut ctx, true).unwrap());
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a648bb150c8237389d7976f58dc6a4090b886ad0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,37 @@@
++use ffi;
++
++use cvt_p;
++use error::ErrorStack;
++
++pub struct ConfMethod(*mut ffi::CONF_METHOD);
++
++impl ConfMethod {
++    pub fn default() -> ConfMethod {
++        unsafe {
++            ffi::init();
++            ConfMethod(ffi::NCONF_default())
++        }
++    }
++
++    pub unsafe fn from_ptr(ptr: *mut ffi::CONF_METHOD) -> ConfMethod {
++        ConfMethod(ptr)
++    }
++
++    pub fn as_ptr(&self) -> *mut ffi::CONF_METHOD {
++        self.0
++    }
++}
++
++foreign_type! {
++    type CType = ffi::CONF;
++    fn drop = ffi::NCONF_free;
++
++    pub struct Conf;
++    pub struct ConfRef;
++}
++
++impl Conf {
++    pub fn new(method: ConfMethod) -> Result<Conf, ErrorStack> {
++        unsafe { cvt_p(ffi::NCONF_new(method.as_ptr())).map(Conf) }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9853d99c14573f3c2292e477ea7c851a0db4d6b8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,4 @@@
++use string::OpensslString;
++
++#[deprecated(note = "renamed to OpensslString", since = "0.9.7")]
++pub type CryptoString = OpensslString;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a98de0f464359a159b1a3844bc55dc5d9496a450
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,152 @@@
++use error::ErrorStack;
++use ffi;
++use foreign_types::ForeignTypeRef;
++use std::mem;
++use std::ptr;
++
++use {cvt, cvt_p, init};
++use bn::BigNum;
++
++foreign_type! {
++    type CType = ffi::DH;
++    fn drop = ffi::DH_free;
++
++    pub struct Dh;
++
++    pub struct DhRef;
++}
++
++impl DhRef {
++    to_pem!(ffi::PEM_write_bio_DHparams);
++    to_der!(ffi::i2d_DHparams);
++}
++
++impl Dh {
++    pub fn from_params(p: BigNum, g: BigNum, q: BigNum) -> Result<Dh, ErrorStack> {
++        unsafe {
++            init();
++            let dh = Dh(try!(cvt_p(ffi::DH_new())));
++            try!(cvt(compat::DH_set0_pqg(
++                dh.0,
++                p.as_ptr(),
++                q.as_ptr(),
++                g.as_ptr(),
++            )));
++            mem::forget((p, g, q));
++            Ok(dh)
++        }
++    }
++
++    from_pem!(Dh, ffi::PEM_read_bio_DHparams);
++    from_der!(Dh, ffi::d2i_DHparams);
++
++    /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
++    #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++    pub fn get_1024_160() -> Result<Dh, ErrorStack> {
++        unsafe { cvt_p(ffi::DH_get_1024_160()).map(Dh) }
++    }
++
++    /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
++    #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++    pub fn get_2048_224() -> Result<Dh, ErrorStack> {
++        unsafe { cvt_p(ffi::DH_get_2048_224()).map(Dh) }
++    }
++
++    /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
++    #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++    pub fn get_2048_256() -> Result<Dh, ErrorStack> {
++        unsafe { cvt_p(ffi::DH_get_2048_256()).map(Dh) }
++    }
++}
++
++#[cfg(ossl110)]
++mod compat {
++    pub use ffi::DH_set0_pqg;
++}
++
++#[cfg(ossl10x)]
++#[allow(bad_style)]
++mod compat {
++    use ffi;
++    use libc::c_int;
++
++    pub unsafe fn DH_set0_pqg(
++        dh: *mut ffi::DH,
++        p: *mut ffi::BIGNUM,
++        q: *mut ffi::BIGNUM,
++        g: *mut ffi::BIGNUM,
++    ) -> c_int {
++        (*dh).p = p;
++        (*dh).q = q;
++        (*dh).g = g;
++        1
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use dh::Dh;
++    use bn::BigNum;
++    use ssl::{SslMethod, SslContext};
++
++    #[test]
++    #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++    fn test_dh_rfc5114() {
++        let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++        let dh1 = Dh::get_1024_160().unwrap();
++        ctx.set_tmp_dh(&dh1).unwrap();
++        let dh2 = Dh::get_2048_224().unwrap();
++        ctx.set_tmp_dh(&dh2).unwrap();
++        let dh3 = Dh::get_2048_256().unwrap();
++        ctx.set_tmp_dh(&dh3).unwrap();
++    }
++
++    #[test]
++    fn test_dh() {
++        let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++        let p = BigNum::from_hex_str(
++            "87A8E61DB4B6663CFFBBD19C651959998CEEF608660DD0F25D2CEED4435\
++                                      E3B00E00DF8F1D61957D4FAF7DF4561B2AA3016C3D91134096FAA3BF429\
++                                      6D830E9A7C209E0C6497517ABD5A8A9D306BCF67ED91F9E6725B4758C02\
++                                      2E0B1EF4275BF7B6C5BFC11D45F9088B941F54EB1E59BB8BC39A0BF1230\
++                                      7F5C4FDB70C581B23F76B63ACAE1CAA6B7902D52526735488A0EF13C6D9\
++                                      A51BFA4AB3AD8347796524D8EF6A167B5A41825D967E144E5140564251C\
++                                      CACB83E6B486F6B3CA3F7971506026C0B857F689962856DED4010ABD0BE\
++                                      621C3A3960A54E710C375F26375D7014103A4B54330C198AF126116D227\
++                                      6E11715F693877FAD7EF09CADB094AE91E1A1597",
++        ).unwrap();
++        let g = BigNum::from_hex_str(
++            "3FB32C9B73134D0B2E77506660EDBD484CA7B18F21EF205407F4793A1A0\
++                                      BA12510DBC15077BE463FFF4FED4AAC0BB555BE3A6C1B0C6B47B1BC3773\
++                                      BF7E8C6F62901228F8C28CBB18A55AE31341000A650196F931C77A57F2D\
++                                      DF463E5E9EC144B777DE62AAAB8A8628AC376D282D6ED3864E67982428E\
++                                      BC831D14348F6F2F9193B5045AF2767164E1DFC967C1FB3F2E55A4BD1BF\
++                                      FE83B9C80D052B985D182EA0ADB2A3B7313D3FE14C8484B1E052588B9B7\
++                                      D2BBD2DF016199ECD06E1557CD0915B3353BBB64E0EC377FD028370DF92\
++                                      B52C7891428CDC67EB6184B523D1DB246C32F63078490F00EF8D647D148\
++                                      D47954515E2327CFEF98C582664B4C0F6CC41659",
++        ).unwrap();
++        let q = BigNum::from_hex_str(
++            "8CF83642A709A097B447997640129DA299B1A47D1EB3750BA308B0FE64F\
++                                      5FBD3",
++        ).unwrap();
++        let dh = Dh::from_params(p, g, q).unwrap();
++        ctx.set_tmp_dh(&dh).unwrap();
++    }
++
++    #[test]
++    fn test_dh_from_pem() {
++        let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++        let params = include_bytes!("../test/dhparams.pem");
++        let dh = Dh::from_pem(params).unwrap();
++        ctx.set_tmp_dh(&dh).unwrap();
++    }
++
++    #[test]
++    fn test_dh_from_der() {
++        let params = include_bytes!("../test/dhparams.pem");
++        let dh = Dh::from_pem(params).unwrap();
++        let der = dh.to_der().unwrap();
++        Dh::from_der(&der).unwrap();
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..130e1dc77041c8da2329be005baf89302b5be62c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,200 @@@
++use ffi;
++use foreign_types::ForeignTypeRef;
++use libc::{c_int, c_char, c_void};
++use std::fmt;
++use std::ptr;
++
++use {cvt, cvt_p};
++use bio::MemBioSlice;
++use bn::BigNumRef;
++use error::ErrorStack;
++use util::{CallbackState, invoke_passwd_cb_old};
++
++foreign_type! {
++    type CType = ffi::DSA;
++    fn drop = ffi::DSA_free;
++
++    pub struct Dsa;
++    pub struct DsaRef;
++}
++
++impl DsaRef {
++    private_key_to_pem!(ffi::PEM_write_bio_DSAPrivateKey);
++    public_key_to_pem!(ffi::PEM_write_bio_DSA_PUBKEY);
++
++    private_key_to_der!(ffi::i2d_DSAPrivateKey);
++    public_key_to_der!(ffi::i2d_DSAPublicKey);
++
++    // FIXME should return u32
++    pub fn size(&self) -> Option<u32> {
++        if self.q().is_some() {
++            unsafe { Some(ffi::DSA_size(self.as_ptr()) as u32) }
++        } else {
++            None
++        }
++    }
++
++    pub fn p(&self) -> Option<&BigNumRef> {
++        unsafe {
++            let p = compat::pqg(self.as_ptr())[0];
++            if p.is_null() {
++                None
++            } else {
++                Some(BigNumRef::from_ptr(p as *mut _))
++            }
++        }
++    }
++
++    pub fn q(&self) -> Option<&BigNumRef> {
++        unsafe {
++            let q = compat::pqg(self.as_ptr())[1];
++            if q.is_null() {
++                None
++            } else {
++                Some(BigNumRef::from_ptr(q as *mut _))
++            }
++        }
++    }
++
++    pub fn g(&self) -> Option<&BigNumRef> {
++        unsafe {
++            let g = compat::pqg(self.as_ptr())[2];
++            if g.is_null() {
++                None
++            } else {
++                Some(BigNumRef::from_ptr(g as *mut _))
++            }
++        }
++    }
++
++    pub fn has_public_key(&self) -> bool {
++        unsafe { !compat::keys(self.as_ptr())[0].is_null() }
++    }
++
++    pub fn has_private_key(&self) -> bool {
++        unsafe { !compat::keys(self.as_ptr())[1].is_null() }
++    }
++}
++
++impl Dsa {
++    /// Generate a DSA key pair.
++    pub fn generate(bits: u32) -> Result<Dsa, ErrorStack> {
++        unsafe {
++            let dsa = Dsa(try!(cvt_p(ffi::DSA_new())));
++            try!(cvt(ffi::DSA_generate_parameters_ex(
++                dsa.0,
++                bits as c_int,
++                ptr::null(),
++                0,
++                ptr::null_mut(),
++                ptr::null_mut(),
++                ptr::null_mut(),
++            )));
++            try!(cvt(ffi::DSA_generate_key(dsa.0)));
++            Ok(dsa)
++        }
++    }
++
++    private_key_from_pem!(Dsa, ffi::PEM_read_bio_DSAPrivateKey);
++    private_key_from_der!(Dsa, ffi::d2i_DSAPrivateKey);
++    public_key_from_pem!(Dsa, ffi::PEM_read_bio_DSA_PUBKEY);
++    public_key_from_der!(Dsa, ffi::d2i_DSAPublicKey);
++
++    #[deprecated(since = "0.9.2", note = "use private_key_from_pem_callback")]
++    pub fn private_key_from_pem_cb<F>(buf: &[u8], pass_cb: F) -> Result<Dsa, ErrorStack>
++    where
++        F: FnOnce(&mut [c_char]) -> usize,
++    {
++        ffi::init();
++        let mut cb = CallbackState::new(pass_cb);
++        let mem_bio = try!(MemBioSlice::new(buf));
++
++        unsafe {
++            let cb_ptr = &mut cb as *mut _ as *mut c_void;
++            let dsa = try!(cvt_p(ffi::PEM_read_bio_DSAPrivateKey(
++                mem_bio.as_ptr(),
++                ptr::null_mut(),
++                Some(invoke_passwd_cb_old::<F>),
++                cb_ptr,
++            )));
++            Ok(Dsa(dsa))
++        }
++    }
++}
++
++impl fmt::Debug for Dsa {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write!(f, "DSA")
++    }
++}
++
++#[cfg(ossl110)]
++mod compat {
++    use std::ptr;
++    use ffi::{self, BIGNUM, DSA};
++
++    pub unsafe fn pqg(d: *const DSA) -> [*const BIGNUM; 3] {
++        let (mut p, mut q, mut g) = (ptr::null(), ptr::null(), ptr::null());
++        ffi::DSA_get0_pqg(d, &mut p, &mut q, &mut g);
++        [p, q, g]
++    }
++
++    pub unsafe fn keys(d: *const DSA) -> [*const BIGNUM; 2] {
++        let (mut pub_key, mut priv_key) = (ptr::null(), ptr::null());
++        ffi::DSA_get0_key(d, &mut pub_key, &mut priv_key);
++        [pub_key, priv_key]
++    }
++}
++
++#[cfg(ossl10x)]
++mod compat {
++    use ffi::{BIGNUM, DSA};
++
++    pub unsafe fn pqg(d: *const DSA) -> [*const BIGNUM; 3] {
++        [(*d).p, (*d).q, (*d).g]
++    }
++
++    pub unsafe fn keys(d: *const DSA) -> [*const BIGNUM; 2] {
++        [(*d).pub_key, (*d).priv_key]
++    }
++}
++
++#[cfg(test)]
++mod test {
++    use symm::Cipher;
++
++    use super::*;
++
++    #[test]
++    pub fn test_generate() {
++        Dsa::generate(1024).unwrap();
++    }
++
++    #[test]
++    pub fn test_password() {
++        let key = include_bytes!("../test/dsa-encrypted.pem");
++        Dsa::private_key_from_pem_passphrase(key, b"mypass").unwrap();
++    }
++
++    #[test]
++    fn test_to_password() {
++        let key = Dsa::generate(2048).unwrap();
++        let pem = key.private_key_to_pem_passphrase(Cipher::aes_128_cbc(), b"foobar")
++            .unwrap();
++        Dsa::private_key_from_pem_passphrase(&pem, b"foobar").unwrap();
++        assert!(Dsa::private_key_from_pem_passphrase(&pem, b"fizzbuzz").is_err());
++    }
++
++    #[test]
++    pub fn test_password_callback() {
++        let mut password_queried = false;
++        let key = include_bytes!("../test/dsa-encrypted.pem");
++        Dsa::private_key_from_pem_callback(key, |password| {
++            password_queried = true;
++            password[..6].copy_from_slice(b"mypass");
++            Ok(6)
++        }).unwrap();
++
++        assert!(password_queried);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..95baa833c08ae536e88d14c7debf6289e4b288fa
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,542 @@@
++use ffi;
++use foreign_types::{ForeignType, ForeignTypeRef};
++use std::ptr;
++use std::mem;
++use libc::c_int;
++
++use {cvt, cvt_n, cvt_p, init};
++use bn::{BigNumRef, BigNumContextRef};
++use error::ErrorStack;
++use nid::Nid;
++
++pub const POINT_CONVERSION_COMPRESSED: PointConversionForm =
++    PointConversionForm(ffi::point_conversion_form_t::POINT_CONVERSION_COMPRESSED);
++
++pub const POINT_CONVERSION_UNCOMPRESSED: PointConversionForm =
++    PointConversionForm(ffi::point_conversion_form_t::POINT_CONVERSION_UNCOMPRESSED);
++
++pub const POINT_CONVERSION_HYBRID: PointConversionForm =
++    PointConversionForm(ffi::point_conversion_form_t::POINT_CONVERSION_HYBRID);
++
++// OPENSSL_EC_EXPLICIT_CURVE, but that was only added in 1.1.
++// Man page documents that 0 can be used in older versions.
++pub const EXPLICIT_CURVE: Asn1Flag = Asn1Flag(0);
++pub const NAMED_CURVE: Asn1Flag = Asn1Flag(ffi::OPENSSL_EC_NAMED_CURVE);
++
++#[derive(Copy, Clone)]
++pub struct PointConversionForm(ffi::point_conversion_form_t);
++
++#[derive(Copy, Clone)]
++pub struct Asn1Flag(c_int);
++
++foreign_type! {
++    type CType = ffi::EC_GROUP;
++    fn drop = ffi::EC_GROUP_free;
++
++    pub struct EcGroup;
++    pub struct EcGroupRef;
++}
++
++impl EcGroup {
++    /// Returns the group of a standard named curve.
++    pub fn from_curve_name(nid: Nid) -> Result<EcGroup, ErrorStack> {
++        unsafe {
++            init();
++            cvt_p(ffi::EC_GROUP_new_by_curve_name(nid.as_raw())).map(EcGroup)
++        }
++    }
++}
++
++impl EcGroupRef {
++    /// Places the components of a curve over a prime field in the provided `BigNum`s.
++    pub fn components_gfp(
++        &self,
++        p: &mut BigNumRef,
++        a: &mut BigNumRef,
++        b: &mut BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::EC_GROUP_get_curve_GFp(
++                self.as_ptr(),
++                p.as_ptr(),
++                a.as_ptr(),
++                b.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Places the components of a curve over a binary field in the provided `BigNum`s.
++    #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))]
++    pub fn components_gf2m(
++        &self,
++        p: &mut BigNumRef,
++        a: &mut BigNumRef,
++        b: &mut BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::EC_GROUP_get_curve_GF2m(
++                self.as_ptr(),
++                p.as_ptr(),
++                a.as_ptr(),
++                b.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Returns the degree of the curve.
++    pub fn degree(&self) -> u32 {
++        unsafe { ffi::EC_GROUP_get_degree(self.as_ptr()) as u32 }
++    }
++
++    /// Places the order of the curve in the provided `BigNum`.
++    pub fn order(
++        &self,
++        order: &mut BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::EC_GROUP_get_order(
++                self.as_ptr(),
++                order.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Sets the flag determining if the group corresponds to a named curve or must be explicitly
++    /// parameterized.
++    ///
++    /// This defaults to `EXPLICIT_CURVE` in OpenSSL 1.0.1 and 1.0.2, but `NAMED_CURVE` in OpenSSL
++    /// 1.1.0.
++    pub fn set_asn1_flag(&mut self, flag: Asn1Flag) {
++        unsafe {
++            ffi::EC_GROUP_set_asn1_flag(self.as_ptr(), flag.0);
++        }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::EC_POINT;
++    fn drop = ffi::EC_POINT_free;
++
++    pub struct EcPoint;
++    pub struct EcPointRef;
++}
++
++impl EcPointRef {
++    /// Computes `a + b`, storing the result in `self`.
++    pub fn add(
++        &mut self,
++        group: &EcGroupRef,
++        a: &EcPointRef,
++        b: &EcPointRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::EC_POINT_add(
++                group.as_ptr(),
++                self.as_ptr(),
++                a.as_ptr(),
++                b.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Computes `q * m`, storing the result in `self`.
++    pub fn mul(
++        &mut self,
++        group: &EcGroupRef,
++        q: &EcPointRef,
++        m: &BigNumRef,
++        ctx: &BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::EC_POINT_mul(
++                group.as_ptr(),
++                self.as_ptr(),
++                ptr::null(),
++                q.as_ptr(),
++                m.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Computes `generator * n`, storing the result ing `self`.
++    pub fn mul_generator(
++        &mut self,
++        group: &EcGroupRef,
++        n: &BigNumRef,
++        ctx: &BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::EC_POINT_mul(
++                group.as_ptr(),
++                self.as_ptr(),
++                n.as_ptr(),
++                ptr::null(),
++                ptr::null(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Computes `generator * n + q * m`, storing the result in `self`.
++    pub fn mul_full(
++        &mut self,
++        group: &EcGroupRef,
++        n: &BigNumRef,
++        q: &EcPointRef,
++        m: &BigNumRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::EC_POINT_mul(
++                group.as_ptr(),
++                self.as_ptr(),
++                n.as_ptr(),
++                q.as_ptr(),
++                m.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Inverts `self`.
++    pub fn invert(&mut self, group: &EcGroupRef, ctx: &BigNumContextRef) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::EC_POINT_invert(
++                group.as_ptr(),
++                self.as_ptr(),
++                ctx.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Serializes the point to a binary representation.
++    pub fn to_bytes(
++        &self,
++        group: &EcGroupRef,
++        form: PointConversionForm,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<Vec<u8>, ErrorStack> {
++        unsafe {
++            let len = ffi::EC_POINT_point2oct(
++                group.as_ptr(),
++                self.as_ptr(),
++                form.0,
++                ptr::null_mut(),
++                0,
++                ctx.as_ptr(),
++            );
++            if len == 0 {
++                return Err(ErrorStack::get());
++            }
++            let mut buf = vec![0; len];
++            let len = ffi::EC_POINT_point2oct(
++                group.as_ptr(),
++                self.as_ptr(),
++                form.0,
++                buf.as_mut_ptr(),
++                len,
++                ctx.as_ptr(),
++            );
++            if len == 0 {
++                Err(ErrorStack::get())
++            } else {
++                Ok(buf)
++            }
++        }
++    }
++
++    /// Determines if this point is equal to another.
++    pub fn eq(
++        &self,
++        group: &EcGroupRef,
++        other: &EcPointRef,
++        ctx: &mut BigNumContextRef,
++    ) -> Result<bool, ErrorStack> {
++        unsafe {
++            let res = try!(cvt_n(ffi::EC_POINT_cmp(
++                group.as_ptr(),
++                self.as_ptr(),
++                other.as_ptr(),
++                ctx.as_ptr(),
++            )));
++            Ok(res == 0)
++        }
++    }
++}
++
++impl EcPoint {
++    /// Creates a new point on the specified curve.
++    pub fn new(group: &EcGroupRef) -> Result<EcPoint, ErrorStack> {
++        unsafe { cvt_p(ffi::EC_POINT_new(group.as_ptr())).map(EcPoint) }
++    }
++
++    pub fn from_bytes(
++        group: &EcGroupRef,
++        buf: &[u8],
++        ctx: &mut BigNumContextRef,
++    ) -> Result<EcPoint, ErrorStack> {
++        let point = try!(EcPoint::new(group));
++        unsafe {
++            try!(cvt(ffi::EC_POINT_oct2point(
++                group.as_ptr(),
++                point.as_ptr(),
++                buf.as_ptr(),
++                buf.len(),
++                ctx.as_ptr(),
++            )));
++        }
++        Ok(point)
++    }
++}
++
++foreign_type! {
++    type CType = ffi::EC_KEY;
++    fn drop = ffi::EC_KEY_free;
++
++    pub struct EcKey;
++    pub struct EcKeyRef;
++}
++
++impl EcKeyRef {
++    private_key_to_pem!(ffi::PEM_write_bio_ECPrivateKey);
++    private_key_to_der!(ffi::i2d_ECPrivateKey);
++
++    pub fn group(&self) -> Option<&EcGroupRef> {
++        unsafe {
++            let ptr = ffi::EC_KEY_get0_group(self.as_ptr());
++            if ptr.is_null() {
++                None
++            } else {
++                Some(EcGroupRef::from_ptr(ptr as *mut _))
++            }
++        }
++    }
++
++    pub fn public_key(&self) -> Option<&EcPointRef> {
++        unsafe {
++            let ptr = ffi::EC_KEY_get0_public_key(self.as_ptr());
++            if ptr.is_null() {
++                None
++            } else {
++                Some(EcPointRef::from_ptr(ptr as *mut _))
++            }
++        }
++    }
++
++    pub fn private_key(&self) -> Option<&BigNumRef> {
++        unsafe {
++            let ptr = ffi::EC_KEY_get0_private_key(self.as_ptr());
++            if ptr.is_null() {
++                None
++            } else {
++                Some(BigNumRef::from_ptr(ptr as *mut _))
++            }
++        }
++    }
++
++    /// Checks the key for validity.
++    pub fn check_key(&self) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::EC_KEY_check_key(self.as_ptr())).map(|_| ()) }
++    }
++
++    pub fn to_owned(&self) -> Result<EcKey, ErrorStack> {
++        unsafe { cvt_p(ffi::EC_KEY_dup(self.as_ptr())).map(EcKey) }
++    }
++}
++
++impl EcKey {
++    /// Constructs an `EcKey` corresponding to a known curve.
++    ///
++    /// It will not have an associated public or private key. This kind of key is primarily useful
++    /// to be provided to the `set_tmp_ecdh` methods on `Ssl` and `SslContextBuilder`.
++    pub fn from_curve_name(nid: Nid) -> Result<EcKey, ErrorStack> {
++        unsafe {
++            init();
++            cvt_p(ffi::EC_KEY_new_by_curve_name(nid.as_raw())).map(EcKey)
++        }
++    }
++
++    /// Constructs an `EcKey` from the specified group with the associated `EcPoint`, public_key.
++    ///
++    /// This will only have the associated public_key.
++    ///
++    /// # Example
++    ///
++    /// ```no_run
++    /// use openssl::bn::BigNumContext;
++    /// use openssl::ec::*;
++    /// use openssl::nid;
++    /// use openssl::pkey::PKey;
++    ///
++    /// // get bytes from somewhere, i.e. this will not produce a valid key
++    /// let public_key: Vec<u8> = vec![];
++    ///
++    /// // create an EcKey from the binary form of a EcPoint
++    /// let group = EcGroup::from_curve_name(nid::SECP256K1).unwrap();
++    /// let mut ctx = BigNumContext::new().unwrap();
++    /// let point = EcPoint::from_bytes(&group, &public_key, &mut ctx).unwrap();
++    /// let key = EcKey::from_public_key(&group, &point);
++    /// ```
++    pub fn from_public_key(
++        group: &EcGroupRef,
++        public_key: &EcPointRef,
++    ) -> Result<EcKey, ErrorStack> {
++        let mut builder = try!(EcKeyBuilder::new());
++        try!(builder.set_group(group));
++        try!(builder.set_public_key(public_key));
++        Ok(builder.build())
++    }
++
++    /// Generates a new public/private key pair on the specified curve.
++    pub fn generate(group: &EcGroupRef) -> Result<EcKey, ErrorStack> {
++        let mut builder = try!(EcKeyBuilder::new());
++        try!(builder.set_group(group));
++        try!(builder.generate_key());
++        Ok(builder.build())
++    }
++
++    #[deprecated(since = "0.9.2", note = "use from_curve_name")]
++    pub fn new_by_curve_name(nid: Nid) -> Result<EcKey, ErrorStack> {
++        EcKey::from_curve_name(nid)
++    }
++
++    private_key_from_pem!(EcKey, ffi::PEM_read_bio_ECPrivateKey);
++    private_key_from_der!(EcKey, ffi::d2i_ECPrivateKey);
++}
++
++
++foreign_type! {
++    type CType = ffi::EC_KEY;
++    fn drop = ffi::EC_KEY_free;
++
++    pub struct EcKeyBuilder;
++    pub struct EcKeyBuilderRef;
++}
++
++impl EcKeyBuilder {
++    pub fn new() -> Result<EcKeyBuilder, ErrorStack> {
++        unsafe {
++            init();
++            cvt_p(ffi::EC_KEY_new()).map(EcKeyBuilder)
++        }
++    }
++
++    pub fn build(self) -> EcKey {
++        unsafe {
++            let key = EcKey::from_ptr(self.as_ptr());
++            mem::forget(self);
++            key
++        }
++    }
++}
++
++impl EcKeyBuilderRef {
++    pub fn set_group(&mut self, group: &EcGroupRef) -> Result<&mut EcKeyBuilderRef, ErrorStack> {
++        unsafe { cvt(ffi::EC_KEY_set_group(self.as_ptr(), group.as_ptr())).map(|_| self) }
++    }
++
++    pub fn set_public_key(
++        &mut self,
++        public_key: &EcPointRef,
++    ) -> Result<&mut EcKeyBuilderRef, ErrorStack> {
++        unsafe {
++            cvt(ffi::EC_KEY_set_public_key(
++                self.as_ptr(),
++                public_key.as_ptr(),
++            )).map(|_| self)
++        }
++    }
++
++    pub fn generate_key(&mut self) -> Result<&mut EcKeyBuilderRef, ErrorStack> {
++        unsafe { cvt(ffi::EC_KEY_generate_key(self.as_ptr())).map(|_| self) }
++    }
++}
++
++#[cfg(test)]
++mod test {
++    use bn::BigNumContext;
++    use nid;
++    use super::*;
++
++    #[test]
++    fn key_new_by_curve_name() {
++        EcKey::from_curve_name(nid::X9_62_PRIME256V1).unwrap();
++    }
++
++    #[test]
++    fn generate() {
++        let group = EcGroup::from_curve_name(nid::X9_62_PRIME256V1).unwrap();
++        let key = EcKey::generate(&group).unwrap();
++        key.public_key().unwrap();
++        key.private_key().unwrap();
++    }
++
++    #[test]
++    fn dup() {
++        let group = EcGroup::from_curve_name(nid::X9_62_PRIME256V1).unwrap();
++        let key = EcKey::generate(&group).unwrap();
++        key.to_owned().unwrap();
++    }
++
++    #[test]
++    fn point_new() {
++        let group = EcGroup::from_curve_name(nid::X9_62_PRIME256V1).unwrap();
++        EcPoint::new(&group).unwrap();
++    }
++
++    #[test]
++    fn point_bytes() {
++        let group = EcGroup::from_curve_name(nid::X9_62_PRIME256V1).unwrap();
++        let key = EcKey::generate(&group).unwrap();
++        let point = key.public_key().unwrap();
++        let mut ctx = BigNumContext::new().unwrap();
++        let bytes = point
++            .to_bytes(&group, POINT_CONVERSION_COMPRESSED, &mut ctx)
++            .unwrap();
++        let point2 = EcPoint::from_bytes(&group, &bytes, &mut ctx).unwrap();
++        assert!(point.eq(&group, &point2, &mut ctx).unwrap());
++    }
++
++    #[test]
++    fn mul_generator() {
++        let group = EcGroup::from_curve_name(nid::X9_62_PRIME256V1).unwrap();
++        let key = EcKey::generate(&group).unwrap();
++        let mut ctx = BigNumContext::new().unwrap();
++        let mut public_key = EcPoint::new(&group).unwrap();
++        public_key
++            .mul_generator(&group, key.private_key().unwrap(), &mut ctx)
++            .unwrap();
++        assert!(
++            public_key
++                .eq(&group, key.public_key().unwrap(), &mut ctx)
++                .unwrap()
++        );
++    }
++
++    #[test]
++    fn key_from_public_key() {
++        let group = EcGroup::from_curve_name(nid::X9_62_PRIME256V1).unwrap();
++        let key = EcKey::generate(&group).unwrap();
++        let mut ctx = BigNumContext::new().unwrap();
++        let bytes = key.public_key()
++            .unwrap()
++            .to_bytes(&group, POINT_CONVERSION_COMPRESSED, &mut ctx)
++            .unwrap();
++
++        drop(key);
++        let public_key = EcPoint::from_bytes(&group, &bytes, &mut ctx).unwrap();
++        let ec_key = EcKey::from_public_key(&group, &public_key).unwrap();
++        assert!(ec_key.check_key().is_ok());
++        assert!(ec_key.public_key().is_some());
++        assert!(ec_key.private_key().is_none());
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..cb7c49960e02d27ab738f930d2c988b34db3a33f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++#![deprecated(since = "0.9.2", note = "renamed to `ec`")]
++
++pub use ec::{EcKey, EcKeyRef};
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8612a9964151ce8741751d3999978706b1e45a46
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,227 @@@
++use libc::{c_ulong, c_char, c_int};
++use std::fmt;
++use std::error;
++use std::ffi::CStr;
++use std::io;
++use std::str;
++use std::ptr;
++use std::borrow::Cow;
++
++use ffi;
++
++#[derive(Debug, Clone)]
++pub struct ErrorStack(Vec<Error>);
++
++impl ErrorStack {
++    /// Returns the contents of the OpenSSL error stack.
++    pub fn get() -> ErrorStack {
++        let mut vec = vec![];
++        while let Some(err) = Error::get() {
++            vec.push(err);
++        }
++        ErrorStack(vec)
++    }
++}
++
++impl ErrorStack {
++    /// Returns the errors in the stack.
++    pub fn errors(&self) -> &[Error] {
++        &self.0
++    }
++}
++
++impl fmt::Display for ErrorStack {
++    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++        let mut first = true;
++        for err in &self.0 {
++            if !first {
++                try!(fmt.write_str(", "));
++            }
++            try!(write!(fmt, "{}", err));
++            first = false;
++        }
++        Ok(())
++    }
++}
++
++impl error::Error for ErrorStack {
++    fn description(&self) -> &str {
++        "An OpenSSL error stack"
++    }
++}
++
++impl From<ErrorStack> for io::Error {
++    fn from(e: ErrorStack) -> io::Error {
++        io::Error::new(io::ErrorKind::Other, e)
++    }
++}
++
++impl From<ErrorStack> for fmt::Error {
++    fn from(_: ErrorStack) -> fmt::Error {
++        fmt::Error
++    }
++}
++
++/// An error reported from OpenSSL.
++#[derive(Clone)]
++pub struct Error {
++    code: c_ulong,
++    file: *const c_char,
++    line: c_int,
++    data: Option<Cow<'static, str>>,
++}
++
++unsafe impl Sync for Error {}
++unsafe impl Send for Error {}
++
++impl Error {
++    /// Returns the first error on the OpenSSL error stack.
++    pub fn get() -> Option<Error> {
++        unsafe {
++            ffi::init();
++
++            let mut file = ptr::null();
++            let mut line = 0;
++            let mut data = ptr::null();
++            let mut flags = 0;
++            match ffi::ERR_get_error_line_data(&mut file, &mut line, &mut data, &mut flags) {
++                0 => None,
++                code => {
++                    // The memory referenced by data is only valid until that slot is overwritten
++                    // in the error stack, so we'll need to copy it off if it's dynamic
++                    let data = if flags & ffi::ERR_TXT_STRING != 0 {
++                        let bytes = CStr::from_ptr(data as *const _).to_bytes();
++                        let data = str::from_utf8(bytes).unwrap();
++                        let data = if flags & ffi::ERR_TXT_MALLOCED != 0 {
++                            Cow::Owned(data.to_string())
++                        } else {
++                            Cow::Borrowed(data)
++                        };
++                        Some(data)
++                    } else {
++                        None
++                    };
++                    Some(Error {
++                        code: code,
++                        file: file,
++                        line: line,
++                        data: data,
++                    })
++                }
++            }
++        }
++    }
++
++    /// Returns the raw OpenSSL error code for this error.
++    pub fn code(&self) -> c_ulong {
++        self.code
++    }
++
++    /// Returns the name of the library reporting the error, if available.
++    pub fn library(&self) -> Option<&'static str> {
++        unsafe {
++            let cstr = ffi::ERR_lib_error_string(self.code);
++            if cstr.is_null() {
++                return None;
++            }
++            let bytes = CStr::from_ptr(cstr as *const _).to_bytes();
++            Some(str::from_utf8(bytes).unwrap())
++        }
++    }
++
++    /// Returns the name of the function reporting the error.
++    pub fn function(&self) -> Option<&'static str> {
++        unsafe {
++            let cstr = ffi::ERR_func_error_string(self.code);
++            if cstr.is_null() {
++                return None;
++            }
++            let bytes = CStr::from_ptr(cstr as *const _).to_bytes();
++            Some(str::from_utf8(bytes).unwrap())
++        }
++    }
++
++    /// Returns the reason for the error.
++    pub fn reason(&self) -> Option<&'static str> {
++        unsafe {
++            let cstr = ffi::ERR_reason_error_string(self.code);
++            if cstr.is_null() {
++                return None;
++            }
++            let bytes = CStr::from_ptr(cstr as *const _).to_bytes();
++            Some(str::from_utf8(bytes).unwrap())
++        }
++    }
++
++    /// Returns the name of the source file which encountered the error.
++    pub fn file(&self) -> &'static str {
++        unsafe {
++            assert!(!self.file.is_null());
++            let bytes = CStr::from_ptr(self.file as *const _).to_bytes();
++            str::from_utf8(bytes).unwrap()
++        }
++    }
++
++    /// Returns the line in the source file which encountered the error.
++    pub fn line(&self) -> c_int {
++        self.line
++    }
++
++    /// Returns additional data describing the error.
++    pub fn data(&self) -> Option<&str> {
++        self.data.as_ref().map(|s| &**s)
++    }
++}
++
++impl fmt::Debug for Error {
++    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++        let mut builder = fmt.debug_struct("Error");
++        builder.field("code", &self.code());
++        if let Some(library) = self.library() {
++            builder.field("library", &library);
++        }
++        if let Some(function) = self.function() {
++            builder.field("function", &function);
++        }
++        if let Some(reason) = self.reason() {
++            builder.field("reason", &reason);
++        }
++        builder.field("file", &self.file());
++        builder.field("line", &self.line());
++        if let Some(data) = self.data() {
++            builder.field("data", &data);
++        }
++        builder.finish()
++    }
++}
++
++impl fmt::Display for Error {
++    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++        try!(write!(fmt, "error:{:08X}", self.code()));
++        match self.library() {
++            Some(l) => try!(write!(fmt, ":{}", l)),
++            None => try!(write!(fmt, ":lib({})", ffi::ERR_GET_LIB(self.code()))),
++        }
++        match self.function() {
++            Some(f) => try!(write!(fmt, ":{}", f)),
++            None => try!(write!(fmt, ":func({})", ffi::ERR_GET_FUNC(self.code()))),
++        }
++        match self.reason() {
++            Some(r) => try!(write!(fmt, ":{}", r)),
++            None => try!(write!(fmt, ":reason({})", ffi::ERR_GET_FUNC(self.code()))),
++        }
++        write!(
++            fmt,
++            ":{}:{}:{}",
++            self.file(),
++            self.line(),
++            self.data().unwrap_or("")
++        )
++    }
++}
++
++impl error::Error for Error {
++    fn description(&self) -> &str {
++        "an OpenSSL error"
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..450dd113fb84e2d67c29a505994ed1ec90b2e6b9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,26 @@@
++use libc::c_int;
++use std::marker::PhantomData;
++
++/// A slot in a type's "extra data" structure.
++///
++/// It is parameterized over the type containing the extra data as well as the
++/// type of the data in the slot.
++pub struct Index<T, U>(c_int, PhantomData<(T, U)>);
++
++impl<T, U> Copy for Index<T, U> {}
++
++impl<T, U> Clone for Index<T, U> {
++    fn clone(&self) -> Index<T, U> {
++        *self
++    }
++}
++
++impl<T, U> Index<T, U> {
++    pub unsafe fn from_raw(idx: c_int) -> Index<T, U> {
++        Index(idx, PhantomData)
++    }
++
++    pub fn as_raw(&self) -> c_int {
++        self.0
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..13161c695a9b443ebc51a26bef1904dd9c06e470
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,407 @@@
++use std::io::prelude::*;
++use std::io;
++use std::ops::{Deref, DerefMut};
++use std::fmt;
++use ffi;
++
++#[cfg(ossl110)]
++use ffi::{EVP_MD_CTX_new, EVP_MD_CTX_free};
++#[cfg(any(ossl101, ossl102))]
++use ffi::{EVP_MD_CTX_create as EVP_MD_CTX_new, EVP_MD_CTX_destroy as EVP_MD_CTX_free};
++
++use {cvt, cvt_p};
++use error::ErrorStack;
++
++#[derive(Copy, Clone)]
++pub struct MessageDigest(*const ffi::EVP_MD);
++
++impl MessageDigest {
++    pub fn md5() -> MessageDigest {
++        unsafe { MessageDigest(ffi::EVP_md5()) }
++    }
++
++    pub fn sha1() -> MessageDigest {
++        unsafe { MessageDigest(ffi::EVP_sha1()) }
++    }
++
++    pub fn sha224() -> MessageDigest {
++        unsafe { MessageDigest(ffi::EVP_sha224()) }
++    }
++
++    pub fn sha256() -> MessageDigest {
++        unsafe { MessageDigest(ffi::EVP_sha256()) }
++    }
++
++    pub fn sha384() -> MessageDigest {
++        unsafe { MessageDigest(ffi::EVP_sha384()) }
++    }
++
++    pub fn sha512() -> MessageDigest {
++        unsafe { MessageDigest(ffi::EVP_sha512()) }
++    }
++
++    pub fn ripemd160() -> MessageDigest {
++        unsafe { MessageDigest(ffi::EVP_ripemd160()) }
++    }
++
++    pub fn as_ptr(&self) -> *const ffi::EVP_MD {
++        self.0
++    }
++}
++
++#[derive(PartialEq, Copy, Clone)]
++enum State {
++    Reset,
++    Updated,
++    Finalized,
++}
++
++use self::State::*;
++
++/// Provides message digest (hash) computation.
++///
++/// # Examples
++///
++/// Calculate a hash in one go:
++///
++/// ```
++/// use openssl::hash::{hash, MessageDigest};
++///
++/// let data = b"\x42\xF4\x97\xE0";
++/// let spec = b"\x7c\x43\x0f\x17\x8a\xef\xdf\x14\x87\xfe\xe7\x14\x4e\x96\x41\xe2";
++/// let res = hash(MessageDigest::md5(), data).unwrap();
++/// assert_eq!(res, spec);
++/// ```
++///
++/// Supply the input in chunks:
++///
++/// ```
++/// use openssl::hash::{Hasher, MessageDigest};
++///
++/// let data = [b"\x42\xF4", b"\x97\xE0"];
++/// let spec = b"\x7c\x43\x0f\x17\x8a\xef\xdf\x14\x87\xfe\xe7\x14\x4e\x96\x41\xe2";
++/// let mut h = Hasher::new(MessageDigest::md5()).unwrap();
++/// h.update(data[0]).unwrap();
++/// h.update(data[1]).unwrap();
++/// let res = h.finish().unwrap();
++/// assert_eq!(res, spec);
++/// ```
++///
++/// # Warning
++///
++/// Don't actually use MD5 and SHA-1 hashes, they're not secure anymore.
++///
++/// Don't ever hash passwords, use the functions in the `pkcs5` module or bcrypt/scrypt instead.
++pub struct Hasher {
++    ctx: *mut ffi::EVP_MD_CTX,
++    md: *const ffi::EVP_MD,
++    type_: MessageDigest,
++    state: State,
++}
++
++impl Hasher {
++    /// Creates a new `Hasher` with the specified hash type.
++    pub fn new(ty: MessageDigest) -> Result<Hasher, ErrorStack> {
++        ffi::init();
++
++        let ctx = unsafe { try!(cvt_p(EVP_MD_CTX_new())) };
++
++        let mut h = Hasher {
++            ctx: ctx,
++            md: ty.as_ptr(),
++            type_: ty,
++            state: Finalized,
++        };
++        try!(h.init());
++        Ok(h)
++    }
++
++    fn init(&mut self) -> Result<(), ErrorStack> {
++        match self.state {
++            Reset => return Ok(()),
++            Updated => {
++                try!(self.finish2());
++            }
++            Finalized => (),
++        }
++        unsafe {
++            try!(cvt(ffi::EVP_DigestInit_ex(self.ctx, self.md, 0 as *mut _)));
++        }
++        self.state = Reset;
++        Ok(())
++    }
++
++    /// Feeds data into the hasher.
++    pub fn update(&mut self, data: &[u8]) -> Result<(), ErrorStack> {
++        if self.state == Finalized {
++            try!(self.init());
++        }
++        unsafe {
++            try!(cvt(ffi::EVP_DigestUpdate(
++                self.ctx,
++                data.as_ptr() as *mut _,
++                data.len(),
++            )));
++        }
++        self.state = Updated;
++        Ok(())
++    }
++
++    #[deprecated(note = "use finish2 instead", since = "0.9.11")]
++    pub fn finish(&mut self) -> Result<Vec<u8>, ErrorStack> {
++        self.finish2().map(|b| b.to_vec())
++    }
++
++    /// Returns the hash of the data written and resets the hasher.
++    ///
++    /// Unlike `finish`, this method does not allocate.
++    pub fn finish2(&mut self) -> Result<DigestBytes, ErrorStack> {
++        if self.state == Finalized {
++            try!(self.init());
++        }
++        unsafe {
++            let mut len = ffi::EVP_MAX_MD_SIZE;
++            let mut buf = [0; ffi::EVP_MAX_MD_SIZE as usize];
++            try!(cvt(ffi::EVP_DigestFinal_ex(
++                self.ctx,
++                buf.as_mut_ptr(),
++                &mut len,
++            )));
++            self.state = Finalized;
++            Ok(DigestBytes {
++                buf: buf,
++                len: len as usize,
++            })
++        }
++    }
++}
++
++impl Write for Hasher {
++    #[inline]
++    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
++        try!(self.update(buf));
++        Ok(buf.len())
++    }
++
++    fn flush(&mut self) -> io::Result<()> {
++        Ok(())
++    }
++}
++
++impl Clone for Hasher {
++    fn clone(&self) -> Hasher {
++        let ctx = unsafe {
++            let ctx = EVP_MD_CTX_new();
++            assert!(!ctx.is_null());
++            let r = ffi::EVP_MD_CTX_copy_ex(ctx, self.ctx);
++            assert_eq!(r, 1);
++            ctx
++        };
++        Hasher {
++            ctx: ctx,
++            md: self.md,
++            type_: self.type_,
++            state: self.state,
++        }
++    }
++}
++
++impl Drop for Hasher {
++    fn drop(&mut self) {
++        unsafe {
++            if self.state != Finalized {
++                drop(self.finish2());
++            }
++            EVP_MD_CTX_free(self.ctx);
++        }
++    }
++}
++
++/// The resulting bytes of a digest.
++///
++/// This type derefs to a byte slice - it exists to avoid allocating memory to
++/// store the digest data.
++#[derive(Copy)]
++pub struct DigestBytes {
++    buf: [u8; ffi::EVP_MAX_MD_SIZE as usize],
++    len: usize,
++}
++
++impl Clone for DigestBytes {
++    #[inline]
++    fn clone(&self) -> DigestBytes {
++        *self
++    }
++}
++
++impl Deref for DigestBytes {
++    type Target = [u8];
++
++    #[inline]
++    fn deref(&self) -> &[u8] {
++        &self.buf[..self.len]
++    }
++}
++
++impl DerefMut for DigestBytes {
++    #[inline]
++    fn deref_mut(&mut self) -> &mut [u8] {
++        &mut self.buf[..self.len]
++    }
++}
++
++impl AsRef<[u8]> for DigestBytes {
++    #[inline]
++    fn as_ref(&self) -> &[u8] {
++        self.deref()
++    }
++}
++
++impl fmt::Debug for DigestBytes {
++    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++        fmt::Debug::fmt(&**self, fmt)
++    }
++}
++
++#[deprecated(note = "use hash2 instead", since = "0.9.11")]
++pub fn hash(t: MessageDigest, data: &[u8]) -> Result<Vec<u8>, ErrorStack> {
++    hash2(t, data).map(|b| b.to_vec())
++}
++
++/// Computes the hash of the `data` with the hash `t`.
++///
++/// Unlike `hash`, this function does not allocate the return value.
++pub fn hash2(t: MessageDigest, data: &[u8]) -> Result<DigestBytes, ErrorStack> {
++    let mut h = try!(Hasher::new(t));
++    try!(h.update(data));
++    h.finish2()
++}
++
++#[cfg(test)]
++mod tests {
++    use hex::{FromHex, ToHex};
++    use std::io::prelude::*;
++
++    use super::*;
++
++    fn hash_test(hashtype: MessageDigest, hashtest: &(&str, &str)) {
++        let res = hash2(hashtype, &Vec::from_hex(hashtest.0).unwrap()).unwrap();
++        assert_eq!(res.to_hex(), hashtest.1);
++    }
++
++    fn hash_recycle_test(h: &mut Hasher, hashtest: &(&str, &str)) {
++        let _ = h.write_all(&Vec::from_hex(hashtest.0).unwrap()).unwrap();
++        let res = h.finish2().unwrap();
++        assert_eq!(res.to_hex(), hashtest.1);
++    }
++
++    // Test vectors from http://www.nsrl.nist.gov/testdata/
++    #[allow(non_upper_case_globals)]
++    const md5_tests: [(&'static str, &'static str); 13] =
++        [
++            ("", "d41d8cd98f00b204e9800998ecf8427e"),
++            ("7F", "83acb6e67e50e31db6ed341dd2de1595"),
++            ("EC9C", "0b07f0d4ca797d8ac58874f887cb0b68"),
++            ("FEE57A", "e0d583171eb06d56198fc0ef22173907"),
++            ("42F497E0", "7c430f178aefdf1487fee7144e9641e2"),
++            ("C53B777F1C", "75ef141d64cb37ec423da2d9d440c925"),
++            ("89D5B576327B", "ebbaf15eb0ed784c6faa9dc32831bf33"),
++            ("5D4CCE781EB190", "ce175c4b08172019f05e6b5279889f2c"),
++            ("81901FE94932D7B9", "cd4d2f62b8cdb3a0cf968a735a239281"),
++            ("C9FFDEE7788EFB4EC9", "e0841a231ab698db30c6c0f3f246c014"),
++            ("66AC4B7EBA95E53DC10B", "a3b3cea71910d9af56742aa0bb2fe329"),
++            ("A510CD18F7A56852EB0319", "577e216843dd11573574d3fb209b97d8"),
++            (
++                "AAED18DBE8938C19ED734A8D",
++                "6f80fb775f27e0a4ce5c2f42fc72c5f1",
++            ),
++        ];
++
++    #[test]
++    fn test_md5() {
++        for test in md5_tests.iter() {
++            hash_test(MessageDigest::md5(), test);
++        }
++    }
++
++    #[test]
++    fn test_md5_recycle() {
++        let mut h = Hasher::new(MessageDigest::md5()).unwrap();
++        for test in md5_tests.iter() {
++            hash_recycle_test(&mut h, test);
++        }
++    }
++
++    #[test]
++    fn test_finish_twice() {
++        let mut h = Hasher::new(MessageDigest::md5()).unwrap();
++        h.write_all(&Vec::from_hex(md5_tests[6].0).unwrap())
++            .unwrap();
++        h.finish2().unwrap();
++        let res = h.finish2().unwrap();
++        let null = hash2(MessageDigest::md5(), &[]).unwrap();
++        assert_eq!(&*res, &*null);
++    }
++
++    #[test]
++    fn test_clone() {
++        let i = 7;
++        let inp = Vec::from_hex(md5_tests[i].0).unwrap();
++        assert!(inp.len() > 2);
++        let p = inp.len() / 2;
++        let h0 = Hasher::new(MessageDigest::md5()).unwrap();
++
++        println!("Clone a new hasher");
++        let mut h1 = h0.clone();
++        h1.write_all(&inp[..p]).unwrap();
++        {
++            println!("Clone an updated hasher");
++            let mut h2 = h1.clone();
++            h2.write_all(&inp[p..]).unwrap();
++            let res = h2.finish2().unwrap();
++            assert_eq!(res.to_hex(), md5_tests[i].1);
++        }
++        h1.write_all(&inp[p..]).unwrap();
++        let res = h1.finish2().unwrap();
++        assert_eq!(res.to_hex(), md5_tests[i].1);
++
++        println!("Clone a finished hasher");
++        let mut h3 = h1.clone();
++        h3.write_all(&Vec::from_hex(md5_tests[i + 1].0).unwrap())
++            .unwrap();
++        let res = h3.finish2().unwrap();
++        assert_eq!(res.to_hex(), md5_tests[i + 1].1);
++    }
++
++    #[test]
++    fn test_sha1() {
++        let tests = [("616263", "a9993e364706816aba3e25717850c26c9cd0d89d")];
++
++        for test in tests.iter() {
++            hash_test(MessageDigest::sha1(), test);
++        }
++    }
++
++    #[test]
++    fn test_sha256() {
++        let tests = [
++            (
++                "616263",
++                "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad",
++            ),
++        ];
++
++        for test in tests.iter() {
++            hash_test(MessageDigest::sha256(), test);
++        }
++    }
++
++    #[test]
++    fn test_ripemd160() {
++        let tests = [("616263", "8eb208f7e05d987a9b044a8e98c6b087f15a0bfc")];
++
++        for test in tests.iter() {
++            hash_test(MessageDigest::ripemd160(), test);
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..44752dcc1506a6aa1d068e2b8aec1bb0bd258b91
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,79 @@@
++#![doc(html_root_url="https://docs.rs/openssl/0.9.15")]
++
++#[macro_use]
++extern crate bitflags;
++#[macro_use]
++extern crate foreign_types;
++extern crate libc;
++#[macro_use]
++extern crate lazy_static;
++extern crate openssl_sys as ffi;
++
++#[cfg(test)]
++extern crate hex;
++#[cfg(test)]
++extern crate tempdir;
++
++#[doc(inline)]
++pub use ffi::init;
++
++use libc::c_int;
++
++use error::ErrorStack;
++
++#[macro_use]
++mod macros;
++
++mod bio;
++mod util;
++pub mod aes;
++pub mod asn1;
++pub mod bn;
++pub mod conf;
++pub mod crypto;
++pub mod dh;
++pub mod dsa;
++pub mod ec;
++pub mod ec_key;
++pub mod error;
++pub mod ex_data;
++pub mod hash;
++pub mod memcmp;
++pub mod nid;
++pub mod ocsp;
++pub mod pkcs12;
++pub mod pkcs5;
++pub mod pkey;
++pub mod rand;
++pub mod rsa;
++pub mod sign;
++pub mod sha;
++pub mod ssl;
++pub mod stack;
++pub mod string;
++pub mod symm;
++pub mod types;
++pub mod version;
++pub mod x509;
++#[cfg(any(ossl102, ossl110))]
++mod verify;
++
++fn cvt_p<T>(r: *mut T) -> Result<*mut T, ErrorStack> {
++    if r.is_null() {
++        Err(ErrorStack::get())
++    } else {
++        Ok(r)
++    }
++}
++
++fn cvt(r: c_int) -> Result<c_int, ErrorStack> {
++    if r <= 0 {
++        Err(ErrorStack::get())
++    } else {
++        Ok(r)
++    }
++}
++
++fn cvt_n(r: c_int) -> Result<c_int, ErrorStack> {
++    if r < 0 { Err(ErrorStack::get()) } else { Ok(r) }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b2fe0c18a9e4715ae906b13fb934f5279c7de485
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,216 @@@
++
++macro_rules! private_key_from_pem {
++    ($t:ident, $f:path) => {
++        from_pem_inner!(/// Deserializes a PEM-formatted private key.
++            private_key_from_pem, $t, $f);
++
++        /// Deserializes a PEM-formatted private key, using the supplied password if the key is
++        /// encrypted.
++        ///
++        /// # Panics
++        ///
++        /// Panics if `passphrase` contains an embedded null.
++        pub fn private_key_from_pem_passphrase(pem: &[u8],
++                                               passphrase: &[u8])
++                                               -> Result<$t, ::error::ErrorStack> {
++            unsafe {
++                ffi::init();
++                let bio = try!(::bio::MemBioSlice::new(pem));
++                let passphrase = ::std::ffi::CString::new(passphrase).unwrap();
++                cvt_p($f(bio.as_ptr(),
++                         ptr::null_mut(),
++                         None,
++                         passphrase.as_ptr() as *const _ as *mut _))
++                    .map($t)
++            }
++        }
++
++        /// Deserializes a PEM-formatted private key, using a callback to retrieve a password if the
++        /// key is encrypted.
++        ///
++        /// The callback should copy the password into the provided buffer and return the number of
++        /// bytes written.
++        pub fn private_key_from_pem_callback<F>(pem: &[u8],
++                                                callback: F)
++                                                -> Result<$t, ::error::ErrorStack>
++            where F: FnOnce(&mut [u8]) -> Result<usize, ::error::ErrorStack>
++        {
++            unsafe {
++                ffi::init();
++                let mut cb = ::util::CallbackState::new(callback);
++                let bio = try!(::bio::MemBioSlice::new(pem));
++                cvt_p($f(bio.as_ptr(),
++                         ptr::null_mut(),
++                         Some(::util::invoke_passwd_cb::<F>),
++                         &mut cb as *mut _ as *mut _))
++                    .map($t)
++            }
++        }
++    }
++}
++
++macro_rules! private_key_to_pem {
++    ($f:path) => {
++        /// Serializes the private key to PEM.
++        pub fn private_key_to_pem(&self) -> Result<Vec<u8>, ::error::ErrorStack> {
++            unsafe {
++                let bio = try!(::bio::MemBio::new());
++                try!(cvt($f(bio.as_ptr(),
++                            self.as_ptr(),
++                            ptr::null(),
++                            ptr::null_mut(),
++                            -1,
++                            None,
++                            ptr::null_mut())));
++                Ok(bio.get_buf().to_owned())
++            }
++        }
++
++        /// Serializes the private key to PEM, encrypting it with the specified symmetric cipher and
++        /// passphrase.
++        pub fn private_key_to_pem_passphrase(&self,
++                                             cipher: ::symm::Cipher,
++                                             passphrase: &[u8])
++                                             -> Result<Vec<u8>, ::error::ErrorStack> {
++            unsafe {
++                let bio = try!(::bio::MemBio::new());
++                assert!(passphrase.len() <= ::libc::c_int::max_value() as usize);
++                try!(cvt($f(bio.as_ptr(),
++                            self.as_ptr(),
++                            cipher.as_ptr(),
++                            passphrase.as_ptr() as *const _ as *mut _,
++                            passphrase.len() as ::libc::c_int,
++                            None,
++                            ptr::null_mut())));
++                Ok(bio.get_buf().to_owned())
++            }
++        }
++    }
++}
++
++macro_rules! to_pem_inner {
++    (#[$m:meta] $n:ident, $f:path) => {
++        #[$m]
++        pub fn $n(&self) -> Result<Vec<u8>, ::error::ErrorStack> {
++            unsafe {
++                let bio = try!(::bio::MemBio::new());
++                try!(cvt($f(bio.as_ptr(), self.as_ptr())));
++                Ok(bio.get_buf().to_owned())
++            }
++        }
++    }
++}
++
++macro_rules! public_key_to_pem {
++    ($f:path) => {
++        to_pem_inner!(/// Serializes a public key to PEM.
++            public_key_to_pem, $f);
++    }
++}
++
++macro_rules! to_pem {
++    ($f:path) => {
++        to_pem_inner!(/// Serializes this value to PEM.
++            to_pem, $f);
++    }
++}
++
++macro_rules! to_der_inner {
++    (#[$m:meta] $n:ident, $f:path) => {
++        #[$m]
++        pub fn $n(&self) -> Result<Vec<u8>, ::error::ErrorStack> {
++            unsafe {
++                let len = try!(::cvt($f(::foreign_types::ForeignTypeRef::as_ptr(self),
++                                        ptr::null_mut())));
++                let mut buf = vec![0; len as usize];
++                try!(::cvt($f(::foreign_types::ForeignTypeRef::as_ptr(self),
++                              &mut buf.as_mut_ptr())));
++                Ok(buf)
++            }
++        }
++    };
++}
++
++macro_rules! to_der {
++    ($f:path) => {
++        to_der_inner!(/// Serializes this value to DER.
++            to_der, $f);
++    }
++}
++
++macro_rules! private_key_to_der {
++    ($f:path) => {
++        to_der_inner!(/// Serializes the private key to DER.
++            private_key_to_der, $f);
++    }
++}
++
++macro_rules! public_key_to_der {
++    ($f:path) => {
++        to_der_inner!(/// Serializes the public key to DER.
++            public_key_to_der, $f);
++    }
++}
++
++macro_rules! from_der_inner {
++    (#[$m:meta] $n:ident, $t:ident, $f:path) => {
++        #[$m]
++        pub fn $n(der: &[u8]) -> Result<$t, ::error::ErrorStack> {
++            unsafe {
++                ::ffi::init();
++                let len = ::std::cmp::min(der.len(), ::libc::c_long::max_value() as usize) as ::libc::c_long;
++                ::cvt_p($f(::std::ptr::null_mut(), &mut der.as_ptr(), len))
++                    .map($t)
++            }
++        }
++    }
++}
++
++macro_rules! from_der {
++    ($t:ident, $f:path) => {
++        from_der_inner!(/// Deserializes a value from DER-formatted data.
++            from_der, $t, $f);
++    }
++}
++
++macro_rules! private_key_from_der {
++    ($t:ident, $f:path) => {
++        from_der_inner!(/// Deserializes a private key from DER-formatted data.
++            private_key_from_der, $t, $f);
++    }
++}
++
++macro_rules! public_key_from_der {
++    ($t:ident, $f:path) => {
++        from_der_inner!(/// Deserializes a public key from DER-formatted data.
++            public_key_from_der, $t, $f);
++    }
++}
++
++macro_rules! from_pem_inner {
++    (#[$m:meta] $n:ident, $t:ident, $f:path) => {
++        #[$m]
++        pub fn $n(pem: &[u8]) -> Result<$t, ::error::ErrorStack> {
++            unsafe {
++                ::init();
++                let bio = try!(::bio::MemBioSlice::new(pem));
++                cvt_p($f(bio.as_ptr(), ::std::ptr::null_mut(), None, ::std::ptr::null_mut()))
++                    .map($t)
++            }
++        }
++    }
++}
++
++macro_rules! public_key_from_pem {
++    ($t:ident, $f:path) => {
++        from_pem_inner!(/// Deserializes a public key from PEM-formatted data.
++            public_key_from_pem, $t, $f);
++    }
++}
++
++macro_rules! from_pem {
++    ($t:ident, $f:path) => {
++        from_pem_inner!(/// Deserializes a value from PEM-formatted data.
++            from_pem, $t, $f);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0ca12c86dd587100d0da711008b3530207c14426
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,41 @@@
++use libc::size_t;
++use ffi;
++
++/// Returns `true` iff `a` and `b` contain the same bytes.
++///
++/// This operation takes an amount of time dependent on the length of the two
++/// arrays given, but is independent of the contents of a and b.
++///
++/// # Panics
++///
++/// This function will panic the current task if `a` and `b` do not have the same
++/// length.
++pub fn eq(a: &[u8], b: &[u8]) -> bool {
++    assert!(a.len() == b.len());
++    let ret = unsafe {
++        ffi::CRYPTO_memcmp(
++            a.as_ptr() as *const _,
++            b.as_ptr() as *const _,
++            a.len() as size_t,
++        )
++    };
++    ret == 0
++}
++
++#[cfg(test)]
++mod tests {
++    use super::eq;
++
++    #[test]
++    fn test_eq() {
++        assert!(eq(&[], &[]));
++        assert!(eq(&[1], &[1]));
++        assert!(!eq(&[1, 2, 3], &[1, 2, 4]));
++    }
++
++    #[test]
++    #[should_panic]
++    fn test_diff_lens() {
++        eq(&[], &[1]);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..afbd60a5b7ebc274c417ad47caf4ae6c1448bce2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,954 @@@
++use ffi;
++use libc::c_int;
++
++#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
++pub struct Nid(c_int);
++
++#[allow(non_snake_case)]
++impl Nid {
++    pub fn from_raw(raw: c_int) -> Nid {
++        Nid(raw)
++    }
++
++    pub fn as_raw(&self) -> c_int {
++        self.0
++    }
++}
++
++pub const UNDEF: Nid = Nid(ffi::NID_undef);
++pub const ITU_T: Nid = Nid(ffi::NID_itu_t);
++pub const CCITT: Nid = Nid(ffi::NID_ccitt);
++pub const ISO: Nid = Nid(ffi::NID_iso);
++pub const JOINT_ISO_ITU_T: Nid = Nid(ffi::NID_joint_iso_itu_t);
++pub const JOINT_ISO_CCITT: Nid = Nid(ffi::NID_joint_iso_ccitt);
++pub const MEMBER_BODY: Nid = Nid(ffi::NID_member_body);
++pub const IDENTIFIED_ORGANIZATION: Nid = Nid(ffi::NID_identified_organization);
++pub const HMAC_MD5: Nid = Nid(ffi::NID_hmac_md5);
++pub const HMAC_SHA1: Nid = Nid(ffi::NID_hmac_sha1);
++pub const CERTICOM_ARC: Nid = Nid(ffi::NID_certicom_arc);
++pub const INTERNATIONAL_ORGANIZATIONS: Nid = Nid(ffi::NID_international_organizations);
++pub const WAP: Nid = Nid(ffi::NID_wap);
++pub const WAP_WSG: Nid = Nid(ffi::NID_wap_wsg);
++pub const SELECTED_ATTRIBUTE_TYPES: Nid = Nid(ffi::NID_selected_attribute_types);
++pub const CLEARANCE: Nid = Nid(ffi::NID_clearance);
++pub const ISO_US: Nid = Nid(ffi::NID_ISO_US);
++pub const X9_57: Nid = Nid(ffi::NID_X9_57);
++pub const X9CM: Nid = Nid(ffi::NID_X9cm);
++pub const DSA: Nid = Nid(ffi::NID_dsa);
++pub const DSAWITHSHA1: Nid = Nid(ffi::NID_dsaWithSHA1);
++pub const ANSI_X9_62: Nid = Nid(ffi::NID_ansi_X9_62);
++pub const X9_62_PRIME_FIELD: Nid = Nid(ffi::NID_X9_62_prime_field);
++pub const X9_62_CHARACTERISTIC_TWO_FIELD: Nid = Nid(ffi::NID_X9_62_characteristic_two_field);
++pub const X9_62_ID_CHARACTERISTIC_TWO_BASIS: Nid = Nid(ffi::NID_X9_62_id_characteristic_two_basis);
++pub const X9_62_ONBASIS: Nid = Nid(ffi::NID_X9_62_onBasis);
++pub const X9_62_TPBASIS: Nid = Nid(ffi::NID_X9_62_tpBasis);
++pub const X9_62_PPBASIS: Nid = Nid(ffi::NID_X9_62_ppBasis);
++pub const X9_62_ID_ECPUBLICKEY: Nid = Nid(ffi::NID_X9_62_id_ecPublicKey);
++pub const X9_62_C2PNB163V1: Nid = Nid(ffi::NID_X9_62_c2pnb163v1);
++pub const X9_62_C2PNB163V2: Nid = Nid(ffi::NID_X9_62_c2pnb163v2);
++pub const X9_62_C2PNB163V3: Nid = Nid(ffi::NID_X9_62_c2pnb163v3);
++pub const X9_62_C2PNB176V1: Nid = Nid(ffi::NID_X9_62_c2pnb176v1);
++pub const X9_62_C2TNB191V1: Nid = Nid(ffi::NID_X9_62_c2tnb191v1);
++pub const X9_62_C2TNB191V2: Nid = Nid(ffi::NID_X9_62_c2tnb191v2);
++pub const X9_62_C2TNB191V3: Nid = Nid(ffi::NID_X9_62_c2tnb191v3);
++pub const X9_62_C2ONB191V4: Nid = Nid(ffi::NID_X9_62_c2onb191v4);
++pub const X9_62_C2ONB191V5: Nid = Nid(ffi::NID_X9_62_c2onb191v5);
++pub const X9_62_C2PNB208W1: Nid = Nid(ffi::NID_X9_62_c2pnb208w1);
++pub const X9_62_C2TNB239V1: Nid = Nid(ffi::NID_X9_62_c2tnb239v1);
++pub const X9_62_C2TNB239V2: Nid = Nid(ffi::NID_X9_62_c2tnb239v2);
++pub const X9_62_C2TNB239V3: Nid = Nid(ffi::NID_X9_62_c2tnb239v3);
++pub const X9_62_C2ONB239V4: Nid = Nid(ffi::NID_X9_62_c2onb239v4);
++pub const X9_62_C2ONB239V5: Nid = Nid(ffi::NID_X9_62_c2onb239v5);
++pub const X9_62_C2PNB272W1: Nid = Nid(ffi::NID_X9_62_c2pnb272w1);
++pub const X9_62_C2PNB304W1: Nid = Nid(ffi::NID_X9_62_c2pnb304w1);
++pub const X9_62_C2TNB359V1: Nid = Nid(ffi::NID_X9_62_c2tnb359v1);
++pub const X9_62_C2PNB368W1: Nid = Nid(ffi::NID_X9_62_c2pnb368w1);
++pub const X9_62_C2TNB431R1: Nid = Nid(ffi::NID_X9_62_c2tnb431r1);
++pub const X9_62_PRIME192V1: Nid = Nid(ffi::NID_X9_62_prime192v1);
++pub const X9_62_PRIME192V2: Nid = Nid(ffi::NID_X9_62_prime192v2);
++pub const X9_62_PRIME192V3: Nid = Nid(ffi::NID_X9_62_prime192v3);
++pub const X9_62_PRIME239V1: Nid = Nid(ffi::NID_X9_62_prime239v1);
++pub const X9_62_PRIME239V2: Nid = Nid(ffi::NID_X9_62_prime239v2);
++pub const X9_62_PRIME239V3: Nid = Nid(ffi::NID_X9_62_prime239v3);
++pub const X9_62_PRIME256V1: Nid = Nid(ffi::NID_X9_62_prime256v1);
++pub const ECDSA_WITH_SHA1: Nid = Nid(ffi::NID_ecdsa_with_SHA1);
++pub const ECDSA_WITH_RECOMMENDED: Nid = Nid(ffi::NID_ecdsa_with_Recommended);
++pub const ECDSA_WITH_SPECIFIED: Nid = Nid(ffi::NID_ecdsa_with_Specified);
++pub const ECDSA_WITH_SHA224: Nid = Nid(ffi::NID_ecdsa_with_SHA224);
++pub const ECDSA_WITH_SHA256: Nid = Nid(ffi::NID_ecdsa_with_SHA256);
++pub const ECDSA_WITH_SHA384: Nid = Nid(ffi::NID_ecdsa_with_SHA384);
++pub const ECDSA_WITH_SHA512: Nid = Nid(ffi::NID_ecdsa_with_SHA512);
++pub const SECP112R1: Nid = Nid(ffi::NID_secp112r1);
++pub const SECP112R2: Nid = Nid(ffi::NID_secp112r2);
++pub const SECP128R1: Nid = Nid(ffi::NID_secp128r1);
++pub const SECP128R2: Nid = Nid(ffi::NID_secp128r2);
++pub const SECP160K1: Nid = Nid(ffi::NID_secp160k1);
++pub const SECP160R1: Nid = Nid(ffi::NID_secp160r1);
++pub const SECP160R2: Nid = Nid(ffi::NID_secp160r2);
++pub const SECP192K1: Nid = Nid(ffi::NID_secp192k1);
++pub const SECP224K1: Nid = Nid(ffi::NID_secp224k1);
++pub const SECP224R1: Nid = Nid(ffi::NID_secp224r1);
++pub const SECP256K1: Nid = Nid(ffi::NID_secp256k1);
++pub const SECP384R1: Nid = Nid(ffi::NID_secp384r1);
++pub const SECP521R1: Nid = Nid(ffi::NID_secp521r1);
++pub const SECT113R1: Nid = Nid(ffi::NID_sect113r1);
++pub const SECT113R2: Nid = Nid(ffi::NID_sect113r2);
++pub const SECT131R1: Nid = Nid(ffi::NID_sect131r1);
++pub const SECT131R2: Nid = Nid(ffi::NID_sect131r2);
++pub const SECT163K1: Nid = Nid(ffi::NID_sect163k1);
++pub const SECT163R1: Nid = Nid(ffi::NID_sect163r1);
++pub const SECT163R2: Nid = Nid(ffi::NID_sect163r2);
++pub const SECT193R1: Nid = Nid(ffi::NID_sect193r1);
++pub const SECT193R2: Nid = Nid(ffi::NID_sect193r2);
++pub const SECT233K1: Nid = Nid(ffi::NID_sect233k1);
++pub const SECT233R1: Nid = Nid(ffi::NID_sect233r1);
++pub const SECT239K1: Nid = Nid(ffi::NID_sect239k1);
++pub const SECT283K1: Nid = Nid(ffi::NID_sect283k1);
++pub const SECT283R1: Nid = Nid(ffi::NID_sect283r1);
++pub const SECT409K1: Nid = Nid(ffi::NID_sect409k1);
++pub const SECT409R1: Nid = Nid(ffi::NID_sect409r1);
++pub const SECT571K1: Nid = Nid(ffi::NID_sect571k1);
++pub const SECT571R1: Nid = Nid(ffi::NID_sect571r1);
++pub const WAP_WSG_IDM_ECID_WTLS1: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls1);
++pub const WAP_WSG_IDM_ECID_WTLS3: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls3);
++pub const WAP_WSG_IDM_ECID_WTLS4: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls4);
++pub const WAP_WSG_IDM_ECID_WTLS5: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls5);
++pub const WAP_WSG_IDM_ECID_WTLS6: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls6);
++pub const WAP_WSG_IDM_ECID_WTLS7: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls7);
++pub const WAP_WSG_IDM_ECID_WTLS8: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls8);
++pub const WAP_WSG_IDM_ECID_WTLS9: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls9);
++pub const WAP_WSG_IDM_ECID_WTLS10: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls10);
++pub const WAP_WSG_IDM_ECID_WTLS11: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls11);
++pub const WAP_WSG_IDM_ECID_WTLS12: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls12);
++pub const CAST5_CBC: Nid = Nid(ffi::NID_cast5_cbc);
++pub const CAST5_ECB: Nid = Nid(ffi::NID_cast5_ecb);
++pub const CAST5_CFB64: Nid = Nid(ffi::NID_cast5_cfb64);
++pub const CAST5_OFB64: Nid = Nid(ffi::NID_cast5_ofb64);
++pub const PBEWITHMD5ANDCAST5_CBC: Nid = Nid(ffi::NID_pbeWithMD5AndCast5_CBC);
++pub const ID_PASSWORDBASEDMAC: Nid = Nid(ffi::NID_id_PasswordBasedMAC);
++pub const ID_DHBASEDMAC: Nid = Nid(ffi::NID_id_DHBasedMac);
++pub const RSADSI: Nid = Nid(ffi::NID_rsadsi);
++pub const PKCS: Nid = Nid(ffi::NID_pkcs);
++pub const PKCS1: Nid = Nid(ffi::NID_pkcs1);
++pub const RSAENCRYPTION: Nid = Nid(ffi::NID_rsaEncryption);
++pub const MD2WITHRSAENCRYPTION: Nid = Nid(ffi::NID_md2WithRSAEncryption);
++pub const MD4WITHRSAENCRYPTION: Nid = Nid(ffi::NID_md4WithRSAEncryption);
++pub const MD5WITHRSAENCRYPTION: Nid = Nid(ffi::NID_md5WithRSAEncryption);
++pub const SHA1WITHRSAENCRYPTION: Nid = Nid(ffi::NID_sha1WithRSAEncryption);
++pub const RSAESOAEP: Nid = Nid(ffi::NID_rsaesOaep);
++pub const MGF1: Nid = Nid(ffi::NID_mgf1);
++pub const RSASSAPSS: Nid = Nid(ffi::NID_rsassaPss);
++pub const SHA256WITHRSAENCRYPTION: Nid = Nid(ffi::NID_sha256WithRSAEncryption);
++pub const SHA384WITHRSAENCRYPTION: Nid = Nid(ffi::NID_sha384WithRSAEncryption);
++pub const SHA512WITHRSAENCRYPTION: Nid = Nid(ffi::NID_sha512WithRSAEncryption);
++pub const SHA224WITHRSAENCRYPTION: Nid = Nid(ffi::NID_sha224WithRSAEncryption);
++pub const PKCS3: Nid = Nid(ffi::NID_pkcs3);
++pub const DHKEYAGREEMENT: Nid = Nid(ffi::NID_dhKeyAgreement);
++pub const PKCS5: Nid = Nid(ffi::NID_pkcs5);
++pub const PBEWITHMD2ANDDES_CBC: Nid = Nid(ffi::NID_pbeWithMD2AndDES_CBC);
++pub const PBEWITHMD5ANDDES_CBC: Nid = Nid(ffi::NID_pbeWithMD5AndDES_CBC);
++pub const PBEWITHMD2ANDRC2_CBC: Nid = Nid(ffi::NID_pbeWithMD2AndRC2_CBC);
++pub const PBEWITHMD5ANDRC2_CBC: Nid = Nid(ffi::NID_pbeWithMD5AndRC2_CBC);
++pub const PBEWITHSHA1ANDDES_CBC: Nid = Nid(ffi::NID_pbeWithSHA1AndDES_CBC);
++pub const PBEWITHSHA1ANDRC2_CBC: Nid = Nid(ffi::NID_pbeWithSHA1AndRC2_CBC);
++pub const ID_PBKDF2: Nid = Nid(ffi::NID_id_pbkdf2);
++pub const PBES2: Nid = Nid(ffi::NID_pbes2);
++pub const PBMAC1: Nid = Nid(ffi::NID_pbmac1);
++pub const PKCS7: Nid = Nid(ffi::NID_pkcs7);
++pub const PKCS7_DATA: Nid = Nid(ffi::NID_pkcs7_data);
++pub const PKCS7_SIGNED: Nid = Nid(ffi::NID_pkcs7_signed);
++pub const PKCS7_ENVELOPED: Nid = Nid(ffi::NID_pkcs7_enveloped);
++pub const PKCS7_SIGNEDANDENVELOPED: Nid = Nid(ffi::NID_pkcs7_signedAndEnveloped);
++pub const PKCS7_DIGEST: Nid = Nid(ffi::NID_pkcs7_digest);
++pub const PKCS7_ENCRYPTED: Nid = Nid(ffi::NID_pkcs7_encrypted);
++pub const PKCS9: Nid = Nid(ffi::NID_pkcs9);
++pub const PKCS9_EMAILADDRESS: Nid = Nid(ffi::NID_pkcs9_emailAddress);
++pub const PKCS9_UNSTRUCTUREDNAME: Nid = Nid(ffi::NID_pkcs9_unstructuredName);
++pub const PKCS9_CONTENTTYPE: Nid = Nid(ffi::NID_pkcs9_contentType);
++pub const PKCS9_MESSAGEDIGEST: Nid = Nid(ffi::NID_pkcs9_messageDigest);
++pub const PKCS9_SIGNINGTIME: Nid = Nid(ffi::NID_pkcs9_signingTime);
++pub const PKCS9_COUNTERSIGNATURE: Nid = Nid(ffi::NID_pkcs9_countersignature);
++pub const PKCS9_CHALLENGEPASSWORD: Nid = Nid(ffi::NID_pkcs9_challengePassword);
++pub const PKCS9_UNSTRUCTUREDADDRESS: Nid = Nid(ffi::NID_pkcs9_unstructuredAddress);
++pub const PKCS9_EXTCERTATTRIBUTES: Nid = Nid(ffi::NID_pkcs9_extCertAttributes);
++pub const EXT_REQ: Nid = Nid(ffi::NID_ext_req);
++pub const SMIMECAPABILITIES: Nid = Nid(ffi::NID_SMIMECapabilities);
++pub const SMIME: Nid = Nid(ffi::NID_SMIME);
++pub const ID_SMIME_MOD: Nid = Nid(ffi::NID_id_smime_mod);
++pub const ID_SMIME_CT: Nid = Nid(ffi::NID_id_smime_ct);
++pub const ID_SMIME_AA: Nid = Nid(ffi::NID_id_smime_aa);
++pub const ID_SMIME_ALG: Nid = Nid(ffi::NID_id_smime_alg);
++pub const ID_SMIME_CD: Nid = Nid(ffi::NID_id_smime_cd);
++pub const ID_SMIME_SPQ: Nid = Nid(ffi::NID_id_smime_spq);
++pub const ID_SMIME_CTI: Nid = Nid(ffi::NID_id_smime_cti);
++pub const ID_SMIME_MOD_CMS: Nid = Nid(ffi::NID_id_smime_mod_cms);
++pub const ID_SMIME_MOD_ESS: Nid = Nid(ffi::NID_id_smime_mod_ess);
++pub const ID_SMIME_MOD_OID: Nid = Nid(ffi::NID_id_smime_mod_oid);
++pub const ID_SMIME_MOD_MSG_V3: Nid = Nid(ffi::NID_id_smime_mod_msg_v3);
++pub const ID_SMIME_MOD_ETS_ESIGNATURE_88: Nid = Nid(ffi::NID_id_smime_mod_ets_eSignature_88);
++pub const ID_SMIME_MOD_ETS_ESIGNATURE_97: Nid = Nid(ffi::NID_id_smime_mod_ets_eSignature_97);
++pub const ID_SMIME_MOD_ETS_ESIGPOLICY_88: Nid = Nid(ffi::NID_id_smime_mod_ets_eSigPolicy_88);
++pub const ID_SMIME_MOD_ETS_ESIGPOLICY_97: Nid = Nid(ffi::NID_id_smime_mod_ets_eSigPolicy_97);
++pub const ID_SMIME_CT_RECEIPT: Nid = Nid(ffi::NID_id_smime_ct_receipt);
++pub const ID_SMIME_CT_AUTHDATA: Nid = Nid(ffi::NID_id_smime_ct_authData);
++pub const ID_SMIME_CT_PUBLISHCERT: Nid = Nid(ffi::NID_id_smime_ct_publishCert);
++pub const ID_SMIME_CT_TSTINFO: Nid = Nid(ffi::NID_id_smime_ct_TSTInfo);
++pub const ID_SMIME_CT_TDTINFO: Nid = Nid(ffi::NID_id_smime_ct_TDTInfo);
++pub const ID_SMIME_CT_CONTENTINFO: Nid = Nid(ffi::NID_id_smime_ct_contentInfo);
++pub const ID_SMIME_CT_DVCSREQUESTDATA: Nid = Nid(ffi::NID_id_smime_ct_DVCSRequestData);
++pub const ID_SMIME_CT_DVCSRESPONSEDATA: Nid = Nid(ffi::NID_id_smime_ct_DVCSResponseData);
++pub const ID_SMIME_CT_COMPRESSEDDATA: Nid = Nid(ffi::NID_id_smime_ct_compressedData);
++pub const ID_CT_ASCIITEXTWITHCRLF: Nid = Nid(ffi::NID_id_ct_asciiTextWithCRLF);
++pub const ID_SMIME_AA_RECEIPTREQUEST: Nid = Nid(ffi::NID_id_smime_aa_receiptRequest);
++pub const ID_SMIME_AA_SECURITYLABEL: Nid = Nid(ffi::NID_id_smime_aa_securityLabel);
++pub const ID_SMIME_AA_MLEXPANDHISTORY: Nid = Nid(ffi::NID_id_smime_aa_mlExpandHistory);
++pub const ID_SMIME_AA_CONTENTHINT: Nid = Nid(ffi::NID_id_smime_aa_contentHint);
++pub const ID_SMIME_AA_MSGSIGDIGEST: Nid = Nid(ffi::NID_id_smime_aa_msgSigDigest);
++pub const ID_SMIME_AA_ENCAPCONTENTTYPE: Nid = Nid(ffi::NID_id_smime_aa_encapContentType);
++pub const ID_SMIME_AA_CONTENTIDENTIFIER: Nid = Nid(ffi::NID_id_smime_aa_contentIdentifier);
++pub const ID_SMIME_AA_MACVALUE: Nid = Nid(ffi::NID_id_smime_aa_macValue);
++pub const ID_SMIME_AA_EQUIVALENTLABELS: Nid = Nid(ffi::NID_id_smime_aa_equivalentLabels);
++pub const ID_SMIME_AA_CONTENTREFERENCE: Nid = Nid(ffi::NID_id_smime_aa_contentReference);
++pub const ID_SMIME_AA_ENCRYPKEYPREF: Nid = Nid(ffi::NID_id_smime_aa_encrypKeyPref);
++pub const ID_SMIME_AA_SIGNINGCERTIFICATE: Nid = Nid(ffi::NID_id_smime_aa_signingCertificate);
++pub const ID_SMIME_AA_SMIMEENCRYPTCERTS: Nid = Nid(ffi::NID_id_smime_aa_smimeEncryptCerts);
++pub const ID_SMIME_AA_TIMESTAMPTOKEN: Nid = Nid(ffi::NID_id_smime_aa_timeStampToken);
++pub const ID_SMIME_AA_ETS_SIGPOLICYID: Nid = Nid(ffi::NID_id_smime_aa_ets_sigPolicyId);
++pub const ID_SMIME_AA_ETS_COMMITMENTTYPE: Nid = Nid(ffi::NID_id_smime_aa_ets_commitmentType);
++pub const ID_SMIME_AA_ETS_SIGNERLOCATION: Nid = Nid(ffi::NID_id_smime_aa_ets_signerLocation);
++pub const ID_SMIME_AA_ETS_SIGNERATTR: Nid = Nid(ffi::NID_id_smime_aa_ets_signerAttr);
++pub const ID_SMIME_AA_ETS_OTHERSIGCERT: Nid = Nid(ffi::NID_id_smime_aa_ets_otherSigCert);
++pub const ID_SMIME_AA_ETS_CONTENTTIMESTAMP: Nid = Nid(ffi::NID_id_smime_aa_ets_contentTimestamp);
++pub const ID_SMIME_AA_ETS_CERTIFICATEREFS: Nid = Nid(ffi::NID_id_smime_aa_ets_CertificateRefs);
++pub const ID_SMIME_AA_ETS_REVOCATIONREFS: Nid = Nid(ffi::NID_id_smime_aa_ets_RevocationRefs);
++pub const ID_SMIME_AA_ETS_CERTVALUES: Nid = Nid(ffi::NID_id_smime_aa_ets_certValues);
++pub const ID_SMIME_AA_ETS_REVOCATIONVALUES: Nid = Nid(ffi::NID_id_smime_aa_ets_revocationValues);
++pub const ID_SMIME_AA_ETS_ESCTIMESTAMP: Nid = Nid(ffi::NID_id_smime_aa_ets_escTimeStamp);
++pub const ID_SMIME_AA_ETS_CERTCRLTIMESTAMP: Nid = Nid(ffi::NID_id_smime_aa_ets_certCRLTimestamp);
++pub const ID_SMIME_AA_ETS_ARCHIVETIMESTAMP: Nid = Nid(ffi::NID_id_smime_aa_ets_archiveTimeStamp);
++pub const ID_SMIME_AA_SIGNATURETYPE: Nid = Nid(ffi::NID_id_smime_aa_signatureType);
++pub const ID_SMIME_AA_DVCS_DVC: Nid = Nid(ffi::NID_id_smime_aa_dvcs_dvc);
++pub const ID_SMIME_ALG_ESDHWITH3DES: Nid = Nid(ffi::NID_id_smime_alg_ESDHwith3DES);
++pub const ID_SMIME_ALG_ESDHWITHRC2: Nid = Nid(ffi::NID_id_smime_alg_ESDHwithRC2);
++pub const ID_SMIME_ALG_3DESWRAP: Nid = Nid(ffi::NID_id_smime_alg_3DESwrap);
++pub const ID_SMIME_ALG_RC2WRAP: Nid = Nid(ffi::NID_id_smime_alg_RC2wrap);
++pub const ID_SMIME_ALG_ESDH: Nid = Nid(ffi::NID_id_smime_alg_ESDH);
++pub const ID_SMIME_ALG_CMS3DESWRAP: Nid = Nid(ffi::NID_id_smime_alg_CMS3DESwrap);
++pub const ID_SMIME_ALG_CMSRC2WRAP: Nid = Nid(ffi::NID_id_smime_alg_CMSRC2wrap);
++pub const ID_ALG_PWRI_KEK: Nid = Nid(ffi::NID_id_alg_PWRI_KEK);
++pub const ID_SMIME_CD_LDAP: Nid = Nid(ffi::NID_id_smime_cd_ldap);
++pub const ID_SMIME_SPQ_ETS_SQT_URI: Nid = Nid(ffi::NID_id_smime_spq_ets_sqt_uri);
++pub const ID_SMIME_SPQ_ETS_SQT_UNOTICE: Nid = Nid(ffi::NID_id_smime_spq_ets_sqt_unotice);
++pub const ID_SMIME_CTI_ETS_PROOFOFORIGIN: Nid = Nid(ffi::NID_id_smime_cti_ets_proofOfOrigin);
++pub const ID_SMIME_CTI_ETS_PROOFOFRECEIPT: Nid = Nid(ffi::NID_id_smime_cti_ets_proofOfReceipt);
++pub const ID_SMIME_CTI_ETS_PROOFOFDELIVERY: Nid = Nid(ffi::NID_id_smime_cti_ets_proofOfDelivery);
++pub const ID_SMIME_CTI_ETS_PROOFOFSENDER: Nid = Nid(ffi::NID_id_smime_cti_ets_proofOfSender);
++pub const ID_SMIME_CTI_ETS_PROOFOFAPPROVAL: Nid = Nid(ffi::NID_id_smime_cti_ets_proofOfApproval);
++pub const ID_SMIME_CTI_ETS_PROOFOFCREATION: Nid = Nid(ffi::NID_id_smime_cti_ets_proofOfCreation);
++pub const FRIENDLYNAME: Nid = Nid(ffi::NID_friendlyName);
++pub const LOCALKEYID: Nid = Nid(ffi::NID_localKeyID);
++pub const MS_CSP_NAME: Nid = Nid(ffi::NID_ms_csp_name);
++pub const LOCALKEYSET: Nid = Nid(ffi::NID_LocalKeySet);
++pub const X509CERTIFICATE: Nid = Nid(ffi::NID_x509Certificate);
++pub const SDSICERTIFICATE: Nid = Nid(ffi::NID_sdsiCertificate);
++pub const X509CRL: Nid = Nid(ffi::NID_x509Crl);
++pub const PBE_WITHSHA1AND128BITRC4: Nid = Nid(ffi::NID_pbe_WithSHA1And128BitRC4);
++pub const PBE_WITHSHA1AND40BITRC4: Nid = Nid(ffi::NID_pbe_WithSHA1And40BitRC4);
++pub const PBE_WITHSHA1AND3_KEY_TRIPLEDES_CBC: Nid =
++    Nid(ffi::NID_pbe_WithSHA1And3_Key_TripleDES_CBC);
++pub const PBE_WITHSHA1AND2_KEY_TRIPLEDES_CBC: Nid =
++    Nid(ffi::NID_pbe_WithSHA1And2_Key_TripleDES_CBC);
++pub const PBE_WITHSHA1AND128BITRC2_CBC: Nid = Nid(ffi::NID_pbe_WithSHA1And128BitRC2_CBC);
++pub const PBE_WITHSHA1AND40BITRC2_CBC: Nid = Nid(ffi::NID_pbe_WithSHA1And40BitRC2_CBC);
++pub const KEYBAG: Nid = Nid(ffi::NID_keyBag);
++pub const PKCS8SHROUDEDKEYBAG: Nid = Nid(ffi::NID_pkcs8ShroudedKeyBag);
++pub const CERTBAG: Nid = Nid(ffi::NID_certBag);
++pub const CRLBAG: Nid = Nid(ffi::NID_crlBag);
++pub const SECRETBAG: Nid = Nid(ffi::NID_secretBag);
++pub const SAFECONTENTSBAG: Nid = Nid(ffi::NID_safeContentsBag);
++pub const MD2: Nid = Nid(ffi::NID_md2);
++pub const MD4: Nid = Nid(ffi::NID_md4);
++pub const MD5: Nid = Nid(ffi::NID_md5);
++pub const MD5_SHA1: Nid = Nid(ffi::NID_md5_sha1);
++pub const HMACWITHMD5: Nid = Nid(ffi::NID_hmacWithMD5);
++pub const HMACWITHSHA1: Nid = Nid(ffi::NID_hmacWithSHA1);
++pub const HMACWITHSHA224: Nid = Nid(ffi::NID_hmacWithSHA224);
++pub const HMACWITHSHA256: Nid = Nid(ffi::NID_hmacWithSHA256);
++pub const HMACWITHSHA384: Nid = Nid(ffi::NID_hmacWithSHA384);
++pub const HMACWITHSHA512: Nid = Nid(ffi::NID_hmacWithSHA512);
++pub const RC2_CBC: Nid = Nid(ffi::NID_rc2_cbc);
++pub const RC2_ECB: Nid = Nid(ffi::NID_rc2_ecb);
++pub const RC2_CFB64: Nid = Nid(ffi::NID_rc2_cfb64);
++pub const RC2_OFB64: Nid = Nid(ffi::NID_rc2_ofb64);
++pub const RC2_40_CBC: Nid = Nid(ffi::NID_rc2_40_cbc);
++pub const RC2_64_CBC: Nid = Nid(ffi::NID_rc2_64_cbc);
++pub const RC4: Nid = Nid(ffi::NID_rc4);
++pub const RC4_40: Nid = Nid(ffi::NID_rc4_40);
++pub const DES_EDE3_CBC: Nid = Nid(ffi::NID_des_ede3_cbc);
++pub const RC5_CBC: Nid = Nid(ffi::NID_rc5_cbc);
++pub const RC5_ECB: Nid = Nid(ffi::NID_rc5_ecb);
++pub const RC5_CFB64: Nid = Nid(ffi::NID_rc5_cfb64);
++pub const RC5_OFB64: Nid = Nid(ffi::NID_rc5_ofb64);
++pub const MS_EXT_REQ: Nid = Nid(ffi::NID_ms_ext_req);
++pub const MS_CODE_IND: Nid = Nid(ffi::NID_ms_code_ind);
++pub const MS_CODE_COM: Nid = Nid(ffi::NID_ms_code_com);
++pub const MS_CTL_SIGN: Nid = Nid(ffi::NID_ms_ctl_sign);
++pub const MS_SGC: Nid = Nid(ffi::NID_ms_sgc);
++pub const MS_EFS: Nid = Nid(ffi::NID_ms_efs);
++pub const MS_SMARTCARD_LOGIN: Nid = Nid(ffi::NID_ms_smartcard_login);
++pub const MS_UPN: Nid = Nid(ffi::NID_ms_upn);
++pub const IDEA_CBC: Nid = Nid(ffi::NID_idea_cbc);
++pub const IDEA_ECB: Nid = Nid(ffi::NID_idea_ecb);
++pub const IDEA_CFB64: Nid = Nid(ffi::NID_idea_cfb64);
++pub const IDEA_OFB64: Nid = Nid(ffi::NID_idea_ofb64);
++pub const BF_CBC: Nid = Nid(ffi::NID_bf_cbc);
++pub const BF_ECB: Nid = Nid(ffi::NID_bf_ecb);
++pub const BF_CFB64: Nid = Nid(ffi::NID_bf_cfb64);
++pub const BF_OFB64: Nid = Nid(ffi::NID_bf_ofb64);
++pub const ID_PKIX: Nid = Nid(ffi::NID_id_pkix);
++pub const ID_PKIX_MOD: Nid = Nid(ffi::NID_id_pkix_mod);
++pub const ID_PE: Nid = Nid(ffi::NID_id_pe);
++pub const ID_QT: Nid = Nid(ffi::NID_id_qt);
++pub const ID_KP: Nid = Nid(ffi::NID_id_kp);
++pub const ID_IT: Nid = Nid(ffi::NID_id_it);
++pub const ID_PKIP: Nid = Nid(ffi::NID_id_pkip);
++pub const ID_ALG: Nid = Nid(ffi::NID_id_alg);
++pub const ID_CMC: Nid = Nid(ffi::NID_id_cmc);
++pub const ID_ON: Nid = Nid(ffi::NID_id_on);
++pub const ID_PDA: Nid = Nid(ffi::NID_id_pda);
++pub const ID_ACA: Nid = Nid(ffi::NID_id_aca);
++pub const ID_QCS: Nid = Nid(ffi::NID_id_qcs);
++pub const ID_CCT: Nid = Nid(ffi::NID_id_cct);
++pub const ID_PPL: Nid = Nid(ffi::NID_id_ppl);
++pub const ID_AD: Nid = Nid(ffi::NID_id_ad);
++pub const ID_PKIX1_EXPLICIT_88: Nid = Nid(ffi::NID_id_pkix1_explicit_88);
++pub const ID_PKIX1_IMPLICIT_88: Nid = Nid(ffi::NID_id_pkix1_implicit_88);
++pub const ID_PKIX1_EXPLICIT_93: Nid = Nid(ffi::NID_id_pkix1_explicit_93);
++pub const ID_PKIX1_IMPLICIT_93: Nid = Nid(ffi::NID_id_pkix1_implicit_93);
++pub const ID_MOD_CRMF: Nid = Nid(ffi::NID_id_mod_crmf);
++pub const ID_MOD_CMC: Nid = Nid(ffi::NID_id_mod_cmc);
++pub const ID_MOD_KEA_PROFILE_88: Nid = Nid(ffi::NID_id_mod_kea_profile_88);
++pub const ID_MOD_KEA_PROFILE_93: Nid = Nid(ffi::NID_id_mod_kea_profile_93);
++pub const ID_MOD_CMP: Nid = Nid(ffi::NID_id_mod_cmp);
++pub const ID_MOD_QUALIFIED_CERT_88: Nid = Nid(ffi::NID_id_mod_qualified_cert_88);
++pub const ID_MOD_QUALIFIED_CERT_93: Nid = Nid(ffi::NID_id_mod_qualified_cert_93);
++pub const ID_MOD_ATTRIBUTE_CERT: Nid = Nid(ffi::NID_id_mod_attribute_cert);
++pub const ID_MOD_TIMESTAMP_PROTOCOL: Nid = Nid(ffi::NID_id_mod_timestamp_protocol);
++pub const ID_MOD_OCSP: Nid = Nid(ffi::NID_id_mod_ocsp);
++pub const ID_MOD_DVCS: Nid = Nid(ffi::NID_id_mod_dvcs);
++pub const ID_MOD_CMP2000: Nid = Nid(ffi::NID_id_mod_cmp2000);
++pub const INFO_ACCESS: Nid = Nid(ffi::NID_info_access);
++pub const BIOMETRICINFO: Nid = Nid(ffi::NID_biometricInfo);
++pub const QCSTATEMENTS: Nid = Nid(ffi::NID_qcStatements);
++pub const AC_AUDITENTITY: Nid = Nid(ffi::NID_ac_auditEntity);
++pub const AC_TARGETING: Nid = Nid(ffi::NID_ac_targeting);
++pub const AACONTROLS: Nid = Nid(ffi::NID_aaControls);
++pub const SBGP_IPADDRBLOCK: Nid = Nid(ffi::NID_sbgp_ipAddrBlock);
++pub const SBGP_AUTONOMOUSSYSNUM: Nid = Nid(ffi::NID_sbgp_autonomousSysNum);
++pub const SBGP_ROUTERIDENTIFIER: Nid = Nid(ffi::NID_sbgp_routerIdentifier);
++pub const AC_PROXYING: Nid = Nid(ffi::NID_ac_proxying);
++pub const SINFO_ACCESS: Nid = Nid(ffi::NID_sinfo_access);
++pub const PROXYCERTINFO: Nid = Nid(ffi::NID_proxyCertInfo);
++pub const ID_QT_CPS: Nid = Nid(ffi::NID_id_qt_cps);
++pub const ID_QT_UNOTICE: Nid = Nid(ffi::NID_id_qt_unotice);
++pub const TEXTNOTICE: Nid = Nid(ffi::NID_textNotice);
++pub const SERVER_AUTH: Nid = Nid(ffi::NID_server_auth);
++pub const CLIENT_AUTH: Nid = Nid(ffi::NID_client_auth);
++pub const CODE_SIGN: Nid = Nid(ffi::NID_code_sign);
++pub const EMAIL_PROTECT: Nid = Nid(ffi::NID_email_protect);
++pub const IPSECENDSYSTEM: Nid = Nid(ffi::NID_ipsecEndSystem);
++pub const IPSECTUNNEL: Nid = Nid(ffi::NID_ipsecTunnel);
++pub const IPSECUSER: Nid = Nid(ffi::NID_ipsecUser);
++pub const TIME_STAMP: Nid = Nid(ffi::NID_time_stamp);
++pub const OCSP_SIGN: Nid = Nid(ffi::NID_OCSP_sign);
++pub const DVCS: Nid = Nid(ffi::NID_dvcs);
++pub const ID_IT_CAPROTENCCERT: Nid = Nid(ffi::NID_id_it_caProtEncCert);
++pub const ID_IT_SIGNKEYPAIRTYPES: Nid = Nid(ffi::NID_id_it_signKeyPairTypes);
++pub const ID_IT_ENCKEYPAIRTYPES: Nid = Nid(ffi::NID_id_it_encKeyPairTypes);
++pub const ID_IT_PREFERREDSYMMALG: Nid = Nid(ffi::NID_id_it_preferredSymmAlg);
++pub const ID_IT_CAKEYUPDATEINFO: Nid = Nid(ffi::NID_id_it_caKeyUpdateInfo);
++pub const ID_IT_CURRENTCRL: Nid = Nid(ffi::NID_id_it_currentCRL);
++pub const ID_IT_UNSUPPORTEDOIDS: Nid = Nid(ffi::NID_id_it_unsupportedOIDs);
++pub const ID_IT_SUBSCRIPTIONREQUEST: Nid = Nid(ffi::NID_id_it_subscriptionRequest);
++pub const ID_IT_SUBSCRIPTIONRESPONSE: Nid = Nid(ffi::NID_id_it_subscriptionResponse);
++pub const ID_IT_KEYPAIRPARAMREQ: Nid = Nid(ffi::NID_id_it_keyPairParamReq);
++pub const ID_IT_KEYPAIRPARAMREP: Nid = Nid(ffi::NID_id_it_keyPairParamRep);
++pub const ID_IT_REVPASSPHRASE: Nid = Nid(ffi::NID_id_it_revPassphrase);
++pub const ID_IT_IMPLICITCONFIRM: Nid = Nid(ffi::NID_id_it_implicitConfirm);
++pub const ID_IT_CONFIRMWAITTIME: Nid = Nid(ffi::NID_id_it_confirmWaitTime);
++pub const ID_IT_ORIGPKIMESSAGE: Nid = Nid(ffi::NID_id_it_origPKIMessage);
++pub const ID_IT_SUPPLANGTAGS: Nid = Nid(ffi::NID_id_it_suppLangTags);
++pub const ID_REGCTRL: Nid = Nid(ffi::NID_id_regCtrl);
++pub const ID_REGINFO: Nid = Nid(ffi::NID_id_regInfo);
++pub const ID_REGCTRL_REGTOKEN: Nid = Nid(ffi::NID_id_regCtrl_regToken);
++pub const ID_REGCTRL_AUTHENTICATOR: Nid = Nid(ffi::NID_id_regCtrl_authenticator);
++pub const ID_REGCTRL_PKIPUBLICATIONINFO: Nid = Nid(ffi::NID_id_regCtrl_pkiPublicationInfo);
++pub const ID_REGCTRL_PKIARCHIVEOPTIONS: Nid = Nid(ffi::NID_id_regCtrl_pkiArchiveOptions);
++pub const ID_REGCTRL_OLDCERTID: Nid = Nid(ffi::NID_id_regCtrl_oldCertID);
++pub const ID_REGCTRL_PROTOCOLENCRKEY: Nid = Nid(ffi::NID_id_regCtrl_protocolEncrKey);
++pub const ID_REGINFO_UTF8PAIRS: Nid = Nid(ffi::NID_id_regInfo_utf8Pairs);
++pub const ID_REGINFO_CERTREQ: Nid = Nid(ffi::NID_id_regInfo_certReq);
++pub const ID_ALG_DES40: Nid = Nid(ffi::NID_id_alg_des40);
++pub const ID_ALG_NOSIGNATURE: Nid = Nid(ffi::NID_id_alg_noSignature);
++pub const ID_ALG_DH_SIG_HMAC_SHA1: Nid = Nid(ffi::NID_id_alg_dh_sig_hmac_sha1);
++pub const ID_ALG_DH_POP: Nid = Nid(ffi::NID_id_alg_dh_pop);
++pub const ID_CMC_STATUSINFO: Nid = Nid(ffi::NID_id_cmc_statusInfo);
++pub const ID_CMC_IDENTIFICATION: Nid = Nid(ffi::NID_id_cmc_identification);
++pub const ID_CMC_IDENTITYPROOF: Nid = Nid(ffi::NID_id_cmc_identityProof);
++pub const ID_CMC_DATARETURN: Nid = Nid(ffi::NID_id_cmc_dataReturn);
++pub const ID_CMC_TRANSACTIONID: Nid = Nid(ffi::NID_id_cmc_transactionId);
++pub const ID_CMC_SENDERNONCE: Nid = Nid(ffi::NID_id_cmc_senderNonce);
++pub const ID_CMC_RECIPIENTNONCE: Nid = Nid(ffi::NID_id_cmc_recipientNonce);
++pub const ID_CMC_ADDEXTENSIONS: Nid = Nid(ffi::NID_id_cmc_addExtensions);
++pub const ID_CMC_ENCRYPTEDPOP: Nid = Nid(ffi::NID_id_cmc_encryptedPOP);
++pub const ID_CMC_DECRYPTEDPOP: Nid = Nid(ffi::NID_id_cmc_decryptedPOP);
++pub const ID_CMC_LRAPOPWITNESS: Nid = Nid(ffi::NID_id_cmc_lraPOPWitness);
++pub const ID_CMC_GETCERT: Nid = Nid(ffi::NID_id_cmc_getCert);
++pub const ID_CMC_GETCRL: Nid = Nid(ffi::NID_id_cmc_getCRL);
++pub const ID_CMC_REVOKEREQUEST: Nid = Nid(ffi::NID_id_cmc_revokeRequest);
++pub const ID_CMC_REGINFO: Nid = Nid(ffi::NID_id_cmc_regInfo);
++pub const ID_CMC_RESPONSEINFO: Nid = Nid(ffi::NID_id_cmc_responseInfo);
++pub const ID_CMC_QUERYPENDING: Nid = Nid(ffi::NID_id_cmc_queryPending);
++pub const ID_CMC_POPLINKRANDOM: Nid = Nid(ffi::NID_id_cmc_popLinkRandom);
++pub const ID_CMC_POPLINKWITNESS: Nid = Nid(ffi::NID_id_cmc_popLinkWitness);
++pub const ID_CMC_CONFIRMCERTACCEPTANCE: Nid = Nid(ffi::NID_id_cmc_confirmCertAcceptance);
++pub const ID_ON_PERSONALDATA: Nid = Nid(ffi::NID_id_on_personalData);
++pub const ID_ON_PERMANENTIDENTIFIER: Nid = Nid(ffi::NID_id_on_permanentIdentifier);
++pub const ID_PDA_DATEOFBIRTH: Nid = Nid(ffi::NID_id_pda_dateOfBirth);
++pub const ID_PDA_PLACEOFBIRTH: Nid = Nid(ffi::NID_id_pda_placeOfBirth);
++pub const ID_PDA_GENDER: Nid = Nid(ffi::NID_id_pda_gender);
++pub const ID_PDA_COUNTRYOFCITIZENSHIP: Nid = Nid(ffi::NID_id_pda_countryOfCitizenship);
++pub const ID_PDA_COUNTRYOFRESIDENCE: Nid = Nid(ffi::NID_id_pda_countryOfResidence);
++pub const ID_ACA_AUTHENTICATIONINFO: Nid = Nid(ffi::NID_id_aca_authenticationInfo);
++pub const ID_ACA_ACCESSIDENTITY: Nid = Nid(ffi::NID_id_aca_accessIdentity);
++pub const ID_ACA_CHARGINGIDENTITY: Nid = Nid(ffi::NID_id_aca_chargingIdentity);
++pub const ID_ACA_GROUP: Nid = Nid(ffi::NID_id_aca_group);
++pub const ID_ACA_ROLE: Nid = Nid(ffi::NID_id_aca_role);
++pub const ID_ACA_ENCATTRS: Nid = Nid(ffi::NID_id_aca_encAttrs);
++pub const ID_QCS_PKIXQCSYNTAX_V1: Nid = Nid(ffi::NID_id_qcs_pkixQCSyntax_v1);
++pub const ID_CCT_CRS: Nid = Nid(ffi::NID_id_cct_crs);
++pub const ID_CCT_PKIDATA: Nid = Nid(ffi::NID_id_cct_PKIData);
++pub const ID_CCT_PKIRESPONSE: Nid = Nid(ffi::NID_id_cct_PKIResponse);
++pub const ID_PPL_ANYLANGUAGE: Nid = Nid(ffi::NID_id_ppl_anyLanguage);
++pub const ID_PPL_INHERITALL: Nid = Nid(ffi::NID_id_ppl_inheritAll);
++pub const INDEPENDENT: Nid = Nid(ffi::NID_Independent);
++pub const AD_OCSP: Nid = Nid(ffi::NID_ad_OCSP);
++pub const AD_CA_ISSUERS: Nid = Nid(ffi::NID_ad_ca_issuers);
++pub const AD_TIMESTAMPING: Nid = Nid(ffi::NID_ad_timeStamping);
++pub const AD_DVCS: Nid = Nid(ffi::NID_ad_dvcs);
++pub const CAREPOSITORY: Nid = Nid(ffi::NID_caRepository);
++pub const ID_PKIX_OCSP_BASIC: Nid = Nid(ffi::NID_id_pkix_OCSP_basic);
++pub const ID_PKIX_OCSP_NONCE: Nid = Nid(ffi::NID_id_pkix_OCSP_Nonce);
++pub const ID_PKIX_OCSP_CRLID: Nid = Nid(ffi::NID_id_pkix_OCSP_CrlID);
++pub const ID_PKIX_OCSP_ACCEPTABLERESPONSES: Nid = Nid(ffi::NID_id_pkix_OCSP_acceptableResponses);
++pub const ID_PKIX_OCSP_NOCHECK: Nid = Nid(ffi::NID_id_pkix_OCSP_noCheck);
++pub const ID_PKIX_OCSP_ARCHIVECUTOFF: Nid = Nid(ffi::NID_id_pkix_OCSP_archiveCutoff);
++pub const ID_PKIX_OCSP_SERVICELOCATOR: Nid = Nid(ffi::NID_id_pkix_OCSP_serviceLocator);
++pub const ID_PKIX_OCSP_EXTENDEDSTATUS: Nid = Nid(ffi::NID_id_pkix_OCSP_extendedStatus);
++pub const ID_PKIX_OCSP_VALID: Nid = Nid(ffi::NID_id_pkix_OCSP_valid);
++pub const ID_PKIX_OCSP_PATH: Nid = Nid(ffi::NID_id_pkix_OCSP_path);
++pub const ID_PKIX_OCSP_TRUSTROOT: Nid = Nid(ffi::NID_id_pkix_OCSP_trustRoot);
++pub const ALGORITHM: Nid = Nid(ffi::NID_algorithm);
++pub const MD5WITHRSA: Nid = Nid(ffi::NID_md5WithRSA);
++pub const DES_ECB: Nid = Nid(ffi::NID_des_ecb);
++pub const DES_CBC: Nid = Nid(ffi::NID_des_cbc);
++pub const DES_OFB64: Nid = Nid(ffi::NID_des_ofb64);
++pub const DES_CFB64: Nid = Nid(ffi::NID_des_cfb64);
++pub const RSASIGNATURE: Nid = Nid(ffi::NID_rsaSignature);
++pub const DSA_2: Nid = Nid(ffi::NID_dsa_2);
++pub const DSAWITHSHA: Nid = Nid(ffi::NID_dsaWithSHA);
++pub const SHAWITHRSAENCRYPTION: Nid = Nid(ffi::NID_shaWithRSAEncryption);
++pub const DES_EDE_ECB: Nid = Nid(ffi::NID_des_ede_ecb);
++pub const DES_EDE3_ECB: Nid = Nid(ffi::NID_des_ede3_ecb);
++pub const DES_EDE_CBC: Nid = Nid(ffi::NID_des_ede_cbc);
++pub const DES_EDE_CFB64: Nid = Nid(ffi::NID_des_ede_cfb64);
++pub const DES_EDE3_CFB64: Nid = Nid(ffi::NID_des_ede3_cfb64);
++pub const DES_EDE_OFB64: Nid = Nid(ffi::NID_des_ede_ofb64);
++pub const DES_EDE3_OFB64: Nid = Nid(ffi::NID_des_ede3_ofb64);
++pub const DESX_CBC: Nid = Nid(ffi::NID_desx_cbc);
++pub const SHA: Nid = Nid(ffi::NID_sha);
++pub const SHA1: Nid = Nid(ffi::NID_sha1);
++pub const DSAWITHSHA1_2: Nid = Nid(ffi::NID_dsaWithSHA1_2);
++pub const SHA1WITHRSA: Nid = Nid(ffi::NID_sha1WithRSA);
++pub const RIPEMD160: Nid = Nid(ffi::NID_ripemd160);
++pub const RIPEMD160WITHRSA: Nid = Nid(ffi::NID_ripemd160WithRSA);
++pub const SXNET: Nid = Nid(ffi::NID_sxnet);
++pub const X500: Nid = Nid(ffi::NID_X500);
++pub const X509: Nid = Nid(ffi::NID_X509);
++pub const COMMONNAME: Nid = Nid(ffi::NID_commonName);
++pub const SURNAME: Nid = Nid(ffi::NID_surname);
++pub const SERIALNUMBER: Nid = Nid(ffi::NID_serialNumber);
++pub const COUNTRYNAME: Nid = Nid(ffi::NID_countryName);
++pub const LOCALITYNAME: Nid = Nid(ffi::NID_localityName);
++pub const STATEORPROVINCENAME: Nid = Nid(ffi::NID_stateOrProvinceName);
++pub const STREETADDRESS: Nid = Nid(ffi::NID_streetAddress);
++pub const ORGANIZATIONNAME: Nid = Nid(ffi::NID_organizationName);
++pub const ORGANIZATIONALUNITNAME: Nid = Nid(ffi::NID_organizationalUnitName);
++pub const TITLE: Nid = Nid(ffi::NID_title);
++pub const DESCRIPTION: Nid = Nid(ffi::NID_description);
++pub const SEARCHGUIDE: Nid = Nid(ffi::NID_searchGuide);
++pub const BUSINESSCATEGORY: Nid = Nid(ffi::NID_businessCategory);
++pub const POSTALADDRESS: Nid = Nid(ffi::NID_postalAddress);
++pub const POSTALCODE: Nid = Nid(ffi::NID_postalCode);
++pub const POSTOFFICEBOX: Nid = Nid(ffi::NID_postOfficeBox);
++pub const PHYSICALDELIVERYOFFICENAME: Nid = Nid(ffi::NID_physicalDeliveryOfficeName);
++pub const TELEPHONENUMBER: Nid = Nid(ffi::NID_telephoneNumber);
++pub const TELEXNUMBER: Nid = Nid(ffi::NID_telexNumber);
++pub const TELETEXTERMINALIDENTIFIER: Nid = Nid(ffi::NID_teletexTerminalIdentifier);
++pub const FACSIMILETELEPHONENUMBER: Nid = Nid(ffi::NID_facsimileTelephoneNumber);
++pub const X121ADDRESS: Nid = Nid(ffi::NID_x121Address);
++pub const INTERNATIONALISDNNUMBER: Nid = Nid(ffi::NID_internationaliSDNNumber);
++pub const REGISTEREDADDRESS: Nid = Nid(ffi::NID_registeredAddress);
++pub const DESTINATIONINDICATOR: Nid = Nid(ffi::NID_destinationIndicator);
++pub const PREFERREDDELIVERYMETHOD: Nid = Nid(ffi::NID_preferredDeliveryMethod);
++pub const PRESENTATIONADDRESS: Nid = Nid(ffi::NID_presentationAddress);
++pub const SUPPORTEDAPPLICATIONCONTEXT: Nid = Nid(ffi::NID_supportedApplicationContext);
++pub const MEMBER: Nid = Nid(ffi::NID_member);
++pub const OWNER: Nid = Nid(ffi::NID_owner);
++pub const ROLEOCCUPANT: Nid = Nid(ffi::NID_roleOccupant);
++pub const SEEALSO: Nid = Nid(ffi::NID_seeAlso);
++pub const USERPASSWORD: Nid = Nid(ffi::NID_userPassword);
++pub const USERCERTIFICATE: Nid = Nid(ffi::NID_userCertificate);
++pub const CACERTIFICATE: Nid = Nid(ffi::NID_cACertificate);
++pub const AUTHORITYREVOCATIONLIST: Nid = Nid(ffi::NID_authorityRevocationList);
++pub const CERTIFICATEREVOCATIONLIST: Nid = Nid(ffi::NID_certificateRevocationList);
++pub const CROSSCERTIFICATEPAIR: Nid = Nid(ffi::NID_crossCertificatePair);
++pub const NAME: Nid = Nid(ffi::NID_name);
++pub const GIVENNAME: Nid = Nid(ffi::NID_givenName);
++pub const INITIALS: Nid = Nid(ffi::NID_initials);
++pub const GENERATIONQUALIFIER: Nid = Nid(ffi::NID_generationQualifier);
++pub const X500UNIQUEIDENTIFIER: Nid = Nid(ffi::NID_x500UniqueIdentifier);
++pub const DNQUALIFIER: Nid = Nid(ffi::NID_dnQualifier);
++pub const ENHANCEDSEARCHGUIDE: Nid = Nid(ffi::NID_enhancedSearchGuide);
++pub const PROTOCOLINFORMATION: Nid = Nid(ffi::NID_protocolInformation);
++pub const DISTINGUISHEDNAME: Nid = Nid(ffi::NID_distinguishedName);
++pub const UNIQUEMEMBER: Nid = Nid(ffi::NID_uniqueMember);
++pub const HOUSEIDENTIFIER: Nid = Nid(ffi::NID_houseIdentifier);
++pub const SUPPORTEDALGORITHMS: Nid = Nid(ffi::NID_supportedAlgorithms);
++pub const DELTAREVOCATIONLIST: Nid = Nid(ffi::NID_deltaRevocationList);
++pub const DMDNAME: Nid = Nid(ffi::NID_dmdName);
++pub const PSEUDONYM: Nid = Nid(ffi::NID_pseudonym);
++pub const ROLE: Nid = Nid(ffi::NID_role);
++pub const X500ALGORITHMS: Nid = Nid(ffi::NID_X500algorithms);
++pub const RSA: Nid = Nid(ffi::NID_rsa);
++pub const MDC2WITHRSA: Nid = Nid(ffi::NID_mdc2WithRSA);
++pub const MDC2: Nid = Nid(ffi::NID_mdc2);
++pub const ID_CE: Nid = Nid(ffi::NID_id_ce);
++pub const SUBJECT_DIRECTORY_ATTRIBUTES: Nid = Nid(ffi::NID_subject_directory_attributes);
++pub const SUBJECT_KEY_IDENTIFIER: Nid = Nid(ffi::NID_subject_key_identifier);
++pub const KEY_USAGE: Nid = Nid(ffi::NID_key_usage);
++pub const PRIVATE_KEY_USAGE_PERIOD: Nid = Nid(ffi::NID_private_key_usage_period);
++pub const SUBJECT_ALT_NAME: Nid = Nid(ffi::NID_subject_alt_name);
++pub const ISSUER_ALT_NAME: Nid = Nid(ffi::NID_issuer_alt_name);
++pub const BASIC_CONSTRAINTS: Nid = Nid(ffi::NID_basic_constraints);
++pub const CRL_NUMBER: Nid = Nid(ffi::NID_crl_number);
++pub const CRL_REASON: Nid = Nid(ffi::NID_crl_reason);
++pub const INVALIDITY_DATE: Nid = Nid(ffi::NID_invalidity_date);
++pub const DELTA_CRL: Nid = Nid(ffi::NID_delta_crl);
++pub const ISSUING_DISTRIBUTION_POINT: Nid = Nid(ffi::NID_issuing_distribution_point);
++pub const CERTIFICATE_ISSUER: Nid = Nid(ffi::NID_certificate_issuer);
++pub const NAME_CONSTRAINTS: Nid = Nid(ffi::NID_name_constraints);
++pub const CRL_DISTRIBUTION_POINTS: Nid = Nid(ffi::NID_crl_distribution_points);
++pub const CERTIFICATE_POLICIES: Nid = Nid(ffi::NID_certificate_policies);
++pub const ANY_POLICY: Nid = Nid(ffi::NID_any_policy);
++pub const POLICY_MAPPINGS: Nid = Nid(ffi::NID_policy_mappings);
++pub const AUTHORITY_KEY_IDENTIFIER: Nid = Nid(ffi::NID_authority_key_identifier);
++pub const POLICY_CONSTRAINTS: Nid = Nid(ffi::NID_policy_constraints);
++pub const EXT_KEY_USAGE: Nid = Nid(ffi::NID_ext_key_usage);
++pub const FRESHEST_CRL: Nid = Nid(ffi::NID_freshest_crl);
++pub const INHIBIT_ANY_POLICY: Nid = Nid(ffi::NID_inhibit_any_policy);
++pub const TARGET_INFORMATION: Nid = Nid(ffi::NID_target_information);
++pub const NO_REV_AVAIL: Nid = Nid(ffi::NID_no_rev_avail);
++pub const ANYEXTENDEDKEYUSAGE: Nid = Nid(ffi::NID_anyExtendedKeyUsage);
++pub const NETSCAPE: Nid = Nid(ffi::NID_netscape);
++pub const NETSCAPE_CERT_EXTENSION: Nid = Nid(ffi::NID_netscape_cert_extension);
++pub const NETSCAPE_DATA_TYPE: Nid = Nid(ffi::NID_netscape_data_type);
++pub const NETSCAPE_CERT_TYPE: Nid = Nid(ffi::NID_netscape_cert_type);
++pub const NETSCAPE_BASE_URL: Nid = Nid(ffi::NID_netscape_base_url);
++pub const NETSCAPE_REVOCATION_URL: Nid = Nid(ffi::NID_netscape_revocation_url);
++pub const NETSCAPE_CA_REVOCATION_URL: Nid = Nid(ffi::NID_netscape_ca_revocation_url);
++pub const NETSCAPE_RENEWAL_URL: Nid = Nid(ffi::NID_netscape_renewal_url);
++pub const NETSCAPE_CA_POLICY_URL: Nid = Nid(ffi::NID_netscape_ca_policy_url);
++pub const NETSCAPE_SSL_SERVER_NAME: Nid = Nid(ffi::NID_netscape_ssl_server_name);
++pub const NETSCAPE_COMMENT: Nid = Nid(ffi::NID_netscape_comment);
++pub const NETSCAPE_CERT_SEQUENCE: Nid = Nid(ffi::NID_netscape_cert_sequence);
++pub const NS_SGC: Nid = Nid(ffi::NID_ns_sgc);
++pub const ORG: Nid = Nid(ffi::NID_org);
++pub const DOD: Nid = Nid(ffi::NID_dod);
++pub const IANA: Nid = Nid(ffi::NID_iana);
++pub const DIRECTORY: Nid = Nid(ffi::NID_Directory);
++pub const MANAGEMENT: Nid = Nid(ffi::NID_Management);
++pub const EXPERIMENTAL: Nid = Nid(ffi::NID_Experimental);
++pub const PRIVATE: Nid = Nid(ffi::NID_Private);
++pub const SECURITY: Nid = Nid(ffi::NID_Security);
++pub const SNMPV2: Nid = Nid(ffi::NID_SNMPv2);
++pub const MAIL: Nid = Nid(ffi::NID_Mail);
++pub const ENTERPRISES: Nid = Nid(ffi::NID_Enterprises);
++pub const DCOBJECT: Nid = Nid(ffi::NID_dcObject);
++pub const MIME_MHS: Nid = Nid(ffi::NID_mime_mhs);
++pub const MIME_MHS_HEADINGS: Nid = Nid(ffi::NID_mime_mhs_headings);
++pub const MIME_MHS_BODIES: Nid = Nid(ffi::NID_mime_mhs_bodies);
++pub const ID_HEX_PARTIAL_MESSAGE: Nid = Nid(ffi::NID_id_hex_partial_message);
++pub const ID_HEX_MULTIPART_MESSAGE: Nid = Nid(ffi::NID_id_hex_multipart_message);
++pub const ZLIB_COMPRESSION: Nid = Nid(ffi::NID_zlib_compression);
++pub const AES_128_ECB: Nid = Nid(ffi::NID_aes_128_ecb);
++pub const AES_128_CBC: Nid = Nid(ffi::NID_aes_128_cbc);
++pub const AES_128_OFB128: Nid = Nid(ffi::NID_aes_128_ofb128);
++pub const AES_128_CFB128: Nid = Nid(ffi::NID_aes_128_cfb128);
++pub const ID_AES128_WRAP: Nid = Nid(ffi::NID_id_aes128_wrap);
++pub const AES_128_GCM: Nid = Nid(ffi::NID_aes_128_gcm);
++pub const AES_128_CCM: Nid = Nid(ffi::NID_aes_128_ccm);
++pub const ID_AES128_WRAP_PAD: Nid = Nid(ffi::NID_id_aes128_wrap_pad);
++pub const AES_192_ECB: Nid = Nid(ffi::NID_aes_192_ecb);
++pub const AES_192_CBC: Nid = Nid(ffi::NID_aes_192_cbc);
++pub const AES_192_OFB128: Nid = Nid(ffi::NID_aes_192_ofb128);
++pub const AES_192_CFB128: Nid = Nid(ffi::NID_aes_192_cfb128);
++pub const ID_AES192_WRAP: Nid = Nid(ffi::NID_id_aes192_wrap);
++pub const AES_192_GCM: Nid = Nid(ffi::NID_aes_192_gcm);
++pub const AES_192_CCM: Nid = Nid(ffi::NID_aes_192_ccm);
++pub const ID_AES192_WRAP_PAD: Nid = Nid(ffi::NID_id_aes192_wrap_pad);
++pub const AES_256_ECB: Nid = Nid(ffi::NID_aes_256_ecb);
++pub const AES_256_CBC: Nid = Nid(ffi::NID_aes_256_cbc);
++pub const AES_256_OFB128: Nid = Nid(ffi::NID_aes_256_ofb128);
++pub const AES_256_CFB128: Nid = Nid(ffi::NID_aes_256_cfb128);
++pub const ID_AES256_WRAP: Nid = Nid(ffi::NID_id_aes256_wrap);
++pub const AES_256_GCM: Nid = Nid(ffi::NID_aes_256_gcm);
++pub const AES_256_CCM: Nid = Nid(ffi::NID_aes_256_ccm);
++pub const ID_AES256_WRAP_PAD: Nid = Nid(ffi::NID_id_aes256_wrap_pad);
++pub const AES_128_CFB1: Nid = Nid(ffi::NID_aes_128_cfb1);
++pub const AES_192_CFB1: Nid = Nid(ffi::NID_aes_192_cfb1);
++pub const AES_256_CFB1: Nid = Nid(ffi::NID_aes_256_cfb1);
++pub const AES_128_CFB8: Nid = Nid(ffi::NID_aes_128_cfb8);
++pub const AES_192_CFB8: Nid = Nid(ffi::NID_aes_192_cfb8);
++pub const AES_256_CFB8: Nid = Nid(ffi::NID_aes_256_cfb8);
++pub const AES_128_CTR: Nid = Nid(ffi::NID_aes_128_ctr);
++pub const AES_192_CTR: Nid = Nid(ffi::NID_aes_192_ctr);
++pub const AES_256_CTR: Nid = Nid(ffi::NID_aes_256_ctr);
++pub const AES_128_XTS: Nid = Nid(ffi::NID_aes_128_xts);
++pub const AES_256_XTS: Nid = Nid(ffi::NID_aes_256_xts);
++pub const DES_CFB1: Nid = Nid(ffi::NID_des_cfb1);
++pub const DES_CFB8: Nid = Nid(ffi::NID_des_cfb8);
++pub const DES_EDE3_CFB1: Nid = Nid(ffi::NID_des_ede3_cfb1);
++pub const DES_EDE3_CFB8: Nid = Nid(ffi::NID_des_ede3_cfb8);
++pub const SHA256: Nid = Nid(ffi::NID_sha256);
++pub const SHA384: Nid = Nid(ffi::NID_sha384);
++pub const SHA512: Nid = Nid(ffi::NID_sha512);
++pub const SHA224: Nid = Nid(ffi::NID_sha224);
++pub const DSA_WITH_SHA224: Nid = Nid(ffi::NID_dsa_with_SHA224);
++pub const DSA_WITH_SHA256: Nid = Nid(ffi::NID_dsa_with_SHA256);
++pub const HOLD_INSTRUCTION_CODE: Nid = Nid(ffi::NID_hold_instruction_code);
++pub const HOLD_INSTRUCTION_NONE: Nid = Nid(ffi::NID_hold_instruction_none);
++pub const HOLD_INSTRUCTION_CALL_ISSUER: Nid = Nid(ffi::NID_hold_instruction_call_issuer);
++pub const HOLD_INSTRUCTION_REJECT: Nid = Nid(ffi::NID_hold_instruction_reject);
++pub const DATA: Nid = Nid(ffi::NID_data);
++pub const PSS: Nid = Nid(ffi::NID_pss);
++pub const UCL: Nid = Nid(ffi::NID_ucl);
++pub const PILOT: Nid = Nid(ffi::NID_pilot);
++pub const PILOTATTRIBUTETYPE: Nid = Nid(ffi::NID_pilotAttributeType);
++pub const PILOTATTRIBUTESYNTAX: Nid = Nid(ffi::NID_pilotAttributeSyntax);
++pub const PILOTOBJECTCLASS: Nid = Nid(ffi::NID_pilotObjectClass);
++pub const PILOTGROUPS: Nid = Nid(ffi::NID_pilotGroups);
++pub const IA5STRINGSYNTAX: Nid = Nid(ffi::NID_iA5StringSyntax);
++pub const CASEIGNOREIA5STRINGSYNTAX: Nid = Nid(ffi::NID_caseIgnoreIA5StringSyntax);
++pub const PILOTOBJECT: Nid = Nid(ffi::NID_pilotObject);
++pub const PILOTPERSON: Nid = Nid(ffi::NID_pilotPerson);
++pub const ACCOUNT: Nid = Nid(ffi::NID_account);
++pub const DOCUMENT: Nid = Nid(ffi::NID_document);
++pub const ROOM: Nid = Nid(ffi::NID_room);
++pub const DOCUMENTSERIES: Nid = Nid(ffi::NID_documentSeries);
++pub const DOMAIN: Nid = Nid(ffi::NID_Domain);
++pub const RFC822LOCALPART: Nid = Nid(ffi::NID_rFC822localPart);
++pub const DNSDOMAIN: Nid = Nid(ffi::NID_dNSDomain);
++pub const DOMAINRELATEDOBJECT: Nid = Nid(ffi::NID_domainRelatedObject);
++pub const FRIENDLYCOUNTRY: Nid = Nid(ffi::NID_friendlyCountry);
++pub const SIMPLESECURITYOBJECT: Nid = Nid(ffi::NID_simpleSecurityObject);
++pub const PILOTORGANIZATION: Nid = Nid(ffi::NID_pilotOrganization);
++pub const PILOTDSA: Nid = Nid(ffi::NID_pilotDSA);
++pub const QUALITYLABELLEDDATA: Nid = Nid(ffi::NID_qualityLabelledData);
++pub const USERID: Nid = Nid(ffi::NID_userId);
++pub const TEXTENCODEDORADDRESS: Nid = Nid(ffi::NID_textEncodedORAddress);
++pub const RFC822MAILBOX: Nid = Nid(ffi::NID_rfc822Mailbox);
++pub const INFO: Nid = Nid(ffi::NID_info);
++pub const FAVOURITEDRINK: Nid = Nid(ffi::NID_favouriteDrink);
++pub const ROOMNUMBER: Nid = Nid(ffi::NID_roomNumber);
++pub const PHOTO: Nid = Nid(ffi::NID_photo);
++pub const USERCLASS: Nid = Nid(ffi::NID_userClass);
++pub const HOST: Nid = Nid(ffi::NID_host);
++pub const MANAGER: Nid = Nid(ffi::NID_manager);
++pub const DOCUMENTIDENTIFIER: Nid = Nid(ffi::NID_documentIdentifier);
++pub const DOCUMENTTITLE: Nid = Nid(ffi::NID_documentTitle);
++pub const DOCUMENTVERSION: Nid = Nid(ffi::NID_documentVersion);
++pub const DOCUMENTAUTHOR: Nid = Nid(ffi::NID_documentAuthor);
++pub const DOCUMENTLOCATION: Nid = Nid(ffi::NID_documentLocation);
++pub const HOMETELEPHONENUMBER: Nid = Nid(ffi::NID_homeTelephoneNumber);
++pub const SECRETARY: Nid = Nid(ffi::NID_secretary);
++pub const OTHERMAILBOX: Nid = Nid(ffi::NID_otherMailbox);
++pub const LASTMODIFIEDTIME: Nid = Nid(ffi::NID_lastModifiedTime);
++pub const LASTMODIFIEDBY: Nid = Nid(ffi::NID_lastModifiedBy);
++pub const DOMAINCOMPONENT: Nid = Nid(ffi::NID_domainComponent);
++pub const ARECORD: Nid = Nid(ffi::NID_aRecord);
++pub const PILOTATTRIBUTETYPE27: Nid = Nid(ffi::NID_pilotAttributeType27);
++pub const MXRECORD: Nid = Nid(ffi::NID_mXRecord);
++pub const NSRECORD: Nid = Nid(ffi::NID_nSRecord);
++pub const SOARECORD: Nid = Nid(ffi::NID_sOARecord);
++pub const CNAMERECORD: Nid = Nid(ffi::NID_cNAMERecord);
++pub const ASSOCIATEDDOMAIN: Nid = Nid(ffi::NID_associatedDomain);
++pub const ASSOCIATEDNAME: Nid = Nid(ffi::NID_associatedName);
++pub const HOMEPOSTALADDRESS: Nid = Nid(ffi::NID_homePostalAddress);
++pub const PERSONALTITLE: Nid = Nid(ffi::NID_personalTitle);
++pub const MOBILETELEPHONENUMBER: Nid = Nid(ffi::NID_mobileTelephoneNumber);
++pub const PAGERTELEPHONENUMBER: Nid = Nid(ffi::NID_pagerTelephoneNumber);
++pub const FRIENDLYCOUNTRYNAME: Nid = Nid(ffi::NID_friendlyCountryName);
++pub const ORGANIZATIONALSTATUS: Nid = Nid(ffi::NID_organizationalStatus);
++pub const JANETMAILBOX: Nid = Nid(ffi::NID_janetMailbox);
++pub const MAILPREFERENCEOPTION: Nid = Nid(ffi::NID_mailPreferenceOption);
++pub const BUILDINGNAME: Nid = Nid(ffi::NID_buildingName);
++pub const DSAQUALITY: Nid = Nid(ffi::NID_dSAQuality);
++pub const SINGLELEVELQUALITY: Nid = Nid(ffi::NID_singleLevelQuality);
++pub const SUBTREEMINIMUMQUALITY: Nid = Nid(ffi::NID_subtreeMinimumQuality);
++pub const SUBTREEMAXIMUMQUALITY: Nid = Nid(ffi::NID_subtreeMaximumQuality);
++pub const PERSONALSIGNATURE: Nid = Nid(ffi::NID_personalSignature);
++pub const DITREDIRECT: Nid = Nid(ffi::NID_dITRedirect);
++pub const AUDIO: Nid = Nid(ffi::NID_audio);
++pub const DOCUMENTPUBLISHER: Nid = Nid(ffi::NID_documentPublisher);
++pub const ID_SET: Nid = Nid(ffi::NID_id_set);
++pub const SET_CTYPE: Nid = Nid(ffi::NID_set_ctype);
++pub const SET_MSGEXT: Nid = Nid(ffi::NID_set_msgExt);
++pub const SET_ATTR: Nid = Nid(ffi::NID_set_attr);
++pub const SET_POLICY: Nid = Nid(ffi::NID_set_policy);
++pub const SET_CERTEXT: Nid = Nid(ffi::NID_set_certExt);
++pub const SET_BRAND: Nid = Nid(ffi::NID_set_brand);
++pub const SETCT_PANDATA: Nid = Nid(ffi::NID_setct_PANData);
++pub const SETCT_PANTOKEN: Nid = Nid(ffi::NID_setct_PANToken);
++pub const SETCT_PANONLY: Nid = Nid(ffi::NID_setct_PANOnly);
++pub const SETCT_OIDATA: Nid = Nid(ffi::NID_setct_OIData);
++pub const SETCT_PI: Nid = Nid(ffi::NID_setct_PI);
++pub const SETCT_PIDATA: Nid = Nid(ffi::NID_setct_PIData);
++pub const SETCT_PIDATAUNSIGNED: Nid = Nid(ffi::NID_setct_PIDataUnsigned);
++pub const SETCT_HODINPUT: Nid = Nid(ffi::NID_setct_HODInput);
++pub const SETCT_AUTHRESBAGGAGE: Nid = Nid(ffi::NID_setct_AuthResBaggage);
++pub const SETCT_AUTHREVREQBAGGAGE: Nid = Nid(ffi::NID_setct_AuthRevReqBaggage);
++pub const SETCT_AUTHREVRESBAGGAGE: Nid = Nid(ffi::NID_setct_AuthRevResBaggage);
++pub const SETCT_CAPTOKENSEQ: Nid = Nid(ffi::NID_setct_CapTokenSeq);
++pub const SETCT_PINITRESDATA: Nid = Nid(ffi::NID_setct_PInitResData);
++pub const SETCT_PI_TBS: Nid = Nid(ffi::NID_setct_PI_TBS);
++pub const SETCT_PRESDATA: Nid = Nid(ffi::NID_setct_PResData);
++pub const SETCT_AUTHREQTBS: Nid = Nid(ffi::NID_setct_AuthReqTBS);
++pub const SETCT_AUTHRESTBS: Nid = Nid(ffi::NID_setct_AuthResTBS);
++pub const SETCT_AUTHRESTBSX: Nid = Nid(ffi::NID_setct_AuthResTBSX);
++pub const SETCT_AUTHTOKENTBS: Nid = Nid(ffi::NID_setct_AuthTokenTBS);
++pub const SETCT_CAPTOKENDATA: Nid = Nid(ffi::NID_setct_CapTokenData);
++pub const SETCT_CAPTOKENTBS: Nid = Nid(ffi::NID_setct_CapTokenTBS);
++pub const SETCT_ACQCARDCODEMSG: Nid = Nid(ffi::NID_setct_AcqCardCodeMsg);
++pub const SETCT_AUTHREVREQTBS: Nid = Nid(ffi::NID_setct_AuthRevReqTBS);
++pub const SETCT_AUTHREVRESDATA: Nid = Nid(ffi::NID_setct_AuthRevResData);
++pub const SETCT_AUTHREVRESTBS: Nid = Nid(ffi::NID_setct_AuthRevResTBS);
++pub const SETCT_CAPREQTBS: Nid = Nid(ffi::NID_setct_CapReqTBS);
++pub const SETCT_CAPREQTBSX: Nid = Nid(ffi::NID_setct_CapReqTBSX);
++pub const SETCT_CAPRESDATA: Nid = Nid(ffi::NID_setct_CapResData);
++pub const SETCT_CAPREVREQTBS: Nid = Nid(ffi::NID_setct_CapRevReqTBS);
++pub const SETCT_CAPREVREQTBSX: Nid = Nid(ffi::NID_setct_CapRevReqTBSX);
++pub const SETCT_CAPREVRESDATA: Nid = Nid(ffi::NID_setct_CapRevResData);
++pub const SETCT_CREDREQTBS: Nid = Nid(ffi::NID_setct_CredReqTBS);
++pub const SETCT_CREDREQTBSX: Nid = Nid(ffi::NID_setct_CredReqTBSX);
++pub const SETCT_CREDRESDATA: Nid = Nid(ffi::NID_setct_CredResData);
++pub const SETCT_CREDREVREQTBS: Nid = Nid(ffi::NID_setct_CredRevReqTBS);
++pub const SETCT_CREDREVREQTBSX: Nid = Nid(ffi::NID_setct_CredRevReqTBSX);
++pub const SETCT_CREDREVRESDATA: Nid = Nid(ffi::NID_setct_CredRevResData);
++pub const SETCT_PCERTREQDATA: Nid = Nid(ffi::NID_setct_PCertReqData);
++pub const SETCT_PCERTRESTBS: Nid = Nid(ffi::NID_setct_PCertResTBS);
++pub const SETCT_BATCHADMINREQDATA: Nid = Nid(ffi::NID_setct_BatchAdminReqData);
++pub const SETCT_BATCHADMINRESDATA: Nid = Nid(ffi::NID_setct_BatchAdminResData);
++pub const SETCT_CARDCINITRESTBS: Nid = Nid(ffi::NID_setct_CardCInitResTBS);
++pub const SETCT_MEAQCINITRESTBS: Nid = Nid(ffi::NID_setct_MeAqCInitResTBS);
++pub const SETCT_REGFORMRESTBS: Nid = Nid(ffi::NID_setct_RegFormResTBS);
++pub const SETCT_CERTREQDATA: Nid = Nid(ffi::NID_setct_CertReqData);
++pub const SETCT_CERTREQTBS: Nid = Nid(ffi::NID_setct_CertReqTBS);
++pub const SETCT_CERTRESDATA: Nid = Nid(ffi::NID_setct_CertResData);
++pub const SETCT_CERTINQREQTBS: Nid = Nid(ffi::NID_setct_CertInqReqTBS);
++pub const SETCT_ERRORTBS: Nid = Nid(ffi::NID_setct_ErrorTBS);
++pub const SETCT_PIDUALSIGNEDTBE: Nid = Nid(ffi::NID_setct_PIDualSignedTBE);
++pub const SETCT_PIUNSIGNEDTBE: Nid = Nid(ffi::NID_setct_PIUnsignedTBE);
++pub const SETCT_AUTHREQTBE: Nid = Nid(ffi::NID_setct_AuthReqTBE);
++pub const SETCT_AUTHRESTBE: Nid = Nid(ffi::NID_setct_AuthResTBE);
++pub const SETCT_AUTHRESTBEX: Nid = Nid(ffi::NID_setct_AuthResTBEX);
++pub const SETCT_AUTHTOKENTBE: Nid = Nid(ffi::NID_setct_AuthTokenTBE);
++pub const SETCT_CAPTOKENTBE: Nid = Nid(ffi::NID_setct_CapTokenTBE);
++pub const SETCT_CAPTOKENTBEX: Nid = Nid(ffi::NID_setct_CapTokenTBEX);
++pub const SETCT_ACQCARDCODEMSGTBE: Nid = Nid(ffi::NID_setct_AcqCardCodeMsgTBE);
++pub const SETCT_AUTHREVREQTBE: Nid = Nid(ffi::NID_setct_AuthRevReqTBE);
++pub const SETCT_AUTHREVRESTBE: Nid = Nid(ffi::NID_setct_AuthRevResTBE);
++pub const SETCT_AUTHREVRESTBEB: Nid = Nid(ffi::NID_setct_AuthRevResTBEB);
++pub const SETCT_CAPREQTBE: Nid = Nid(ffi::NID_setct_CapReqTBE);
++pub const SETCT_CAPREQTBEX: Nid = Nid(ffi::NID_setct_CapReqTBEX);
++pub const SETCT_CAPRESTBE: Nid = Nid(ffi::NID_setct_CapResTBE);
++pub const SETCT_CAPREVREQTBE: Nid = Nid(ffi::NID_setct_CapRevReqTBE);
++pub const SETCT_CAPREVREQTBEX: Nid = Nid(ffi::NID_setct_CapRevReqTBEX);
++pub const SETCT_CAPREVRESTBE: Nid = Nid(ffi::NID_setct_CapRevResTBE);
++pub const SETCT_CREDREQTBE: Nid = Nid(ffi::NID_setct_CredReqTBE);
++pub const SETCT_CREDREQTBEX: Nid = Nid(ffi::NID_setct_CredReqTBEX);
++pub const SETCT_CREDRESTBE: Nid = Nid(ffi::NID_setct_CredResTBE);
++pub const SETCT_CREDREVREQTBE: Nid = Nid(ffi::NID_setct_CredRevReqTBE);
++pub const SETCT_CREDREVREQTBEX: Nid = Nid(ffi::NID_setct_CredRevReqTBEX);
++pub const SETCT_CREDREVRESTBE: Nid = Nid(ffi::NID_setct_CredRevResTBE);
++pub const SETCT_BATCHADMINREQTBE: Nid = Nid(ffi::NID_setct_BatchAdminReqTBE);
++pub const SETCT_BATCHADMINRESTBE: Nid = Nid(ffi::NID_setct_BatchAdminResTBE);
++pub const SETCT_REGFORMREQTBE: Nid = Nid(ffi::NID_setct_RegFormReqTBE);
++pub const SETCT_CERTREQTBE: Nid = Nid(ffi::NID_setct_CertReqTBE);
++pub const SETCT_CERTREQTBEX: Nid = Nid(ffi::NID_setct_CertReqTBEX);
++pub const SETCT_CERTRESTBE: Nid = Nid(ffi::NID_setct_CertResTBE);
++pub const SETCT_CRLNOTIFICATIONTBS: Nid = Nid(ffi::NID_setct_CRLNotificationTBS);
++pub const SETCT_CRLNOTIFICATIONRESTBS: Nid = Nid(ffi::NID_setct_CRLNotificationResTBS);
++pub const SETCT_BCIDISTRIBUTIONTBS: Nid = Nid(ffi::NID_setct_BCIDistributionTBS);
++pub const SETEXT_GENCRYPT: Nid = Nid(ffi::NID_setext_genCrypt);
++pub const SETEXT_MIAUTH: Nid = Nid(ffi::NID_setext_miAuth);
++pub const SETEXT_PINSECURE: Nid = Nid(ffi::NID_setext_pinSecure);
++pub const SETEXT_PINANY: Nid = Nid(ffi::NID_setext_pinAny);
++pub const SETEXT_TRACK2: Nid = Nid(ffi::NID_setext_track2);
++pub const SETEXT_CV: Nid = Nid(ffi::NID_setext_cv);
++pub const SET_POLICY_ROOT: Nid = Nid(ffi::NID_set_policy_root);
++pub const SETCEXT_HASHEDROOT: Nid = Nid(ffi::NID_setCext_hashedRoot);
++pub const SETCEXT_CERTTYPE: Nid = Nid(ffi::NID_setCext_certType);
++pub const SETCEXT_MERCHDATA: Nid = Nid(ffi::NID_setCext_merchData);
++pub const SETCEXT_CCERTREQUIRED: Nid = Nid(ffi::NID_setCext_cCertRequired);
++pub const SETCEXT_TUNNELING: Nid = Nid(ffi::NID_setCext_tunneling);
++pub const SETCEXT_SETEXT: Nid = Nid(ffi::NID_setCext_setExt);
++pub const SETCEXT_SETQUALF: Nid = Nid(ffi::NID_setCext_setQualf);
++pub const SETCEXT_PGWYCAPABILITIES: Nid = Nid(ffi::NID_setCext_PGWYcapabilities);
++pub const SETCEXT_TOKENIDENTIFIER: Nid = Nid(ffi::NID_setCext_TokenIdentifier);
++pub const SETCEXT_TRACK2DATA: Nid = Nid(ffi::NID_setCext_Track2Data);
++pub const SETCEXT_TOKENTYPE: Nid = Nid(ffi::NID_setCext_TokenType);
++pub const SETCEXT_ISSUERCAPABILITIES: Nid = Nid(ffi::NID_setCext_IssuerCapabilities);
++pub const SETATTR_CERT: Nid = Nid(ffi::NID_setAttr_Cert);
++pub const SETATTR_PGWYCAP: Nid = Nid(ffi::NID_setAttr_PGWYcap);
++pub const SETATTR_TOKENTYPE: Nid = Nid(ffi::NID_setAttr_TokenType);
++pub const SETATTR_ISSCAP: Nid = Nid(ffi::NID_setAttr_IssCap);
++pub const SET_ROOTKEYTHUMB: Nid = Nid(ffi::NID_set_rootKeyThumb);
++pub const SET_ADDPOLICY: Nid = Nid(ffi::NID_set_addPolicy);
++pub const SETATTR_TOKEN_EMV: Nid = Nid(ffi::NID_setAttr_Token_EMV);
++pub const SETATTR_TOKEN_B0PRIME: Nid = Nid(ffi::NID_setAttr_Token_B0Prime);
++pub const SETATTR_ISSCAP_CVM: Nid = Nid(ffi::NID_setAttr_IssCap_CVM);
++pub const SETATTR_ISSCAP_T2: Nid = Nid(ffi::NID_setAttr_IssCap_T2);
++pub const SETATTR_ISSCAP_SIG: Nid = Nid(ffi::NID_setAttr_IssCap_Sig);
++pub const SETATTR_GENCRYPTGRM: Nid = Nid(ffi::NID_setAttr_GenCryptgrm);
++pub const SETATTR_T2ENC: Nid = Nid(ffi::NID_setAttr_T2Enc);
++pub const SETATTR_T2CLEARTXT: Nid = Nid(ffi::NID_setAttr_T2cleartxt);
++pub const SETATTR_TOKICCSIG: Nid = Nid(ffi::NID_setAttr_TokICCsig);
++pub const SETATTR_SECDEVSIG: Nid = Nid(ffi::NID_setAttr_SecDevSig);
++pub const SET_BRAND_IATA_ATA: Nid = Nid(ffi::NID_set_brand_IATA_ATA);
++pub const SET_BRAND_DINERS: Nid = Nid(ffi::NID_set_brand_Diners);
++pub const SET_BRAND_AMERICANEXPRESS: Nid = Nid(ffi::NID_set_brand_AmericanExpress);
++pub const SET_BRAND_JCB: Nid = Nid(ffi::NID_set_brand_JCB);
++pub const SET_BRAND_VISA: Nid = Nid(ffi::NID_set_brand_Visa);
++pub const SET_BRAND_MASTERCARD: Nid = Nid(ffi::NID_set_brand_MasterCard);
++pub const SET_BRAND_NOVUS: Nid = Nid(ffi::NID_set_brand_Novus);
++pub const DES_CDMF: Nid = Nid(ffi::NID_des_cdmf);
++pub const RSAOAEPENCRYPTIONSET: Nid = Nid(ffi::NID_rsaOAEPEncryptionSET);
++pub const IPSEC3: Nid = Nid(ffi::NID_ipsec3);
++pub const IPSEC4: Nid = Nid(ffi::NID_ipsec4);
++pub const WHIRLPOOL: Nid = Nid(ffi::NID_whirlpool);
++pub const CRYPTOPRO: Nid = Nid(ffi::NID_cryptopro);
++pub const CRYPTOCOM: Nid = Nid(ffi::NID_cryptocom);
++pub const ID_GOSTR3411_94_WITH_GOSTR3410_2001: Nid =
++    Nid(ffi::NID_id_GostR3411_94_with_GostR3410_2001);
++pub const ID_GOSTR3411_94_WITH_GOSTR3410_94: Nid = Nid(ffi::NID_id_GostR3411_94_with_GostR3410_94);
++pub const ID_GOSTR3411_94: Nid = Nid(ffi::NID_id_GostR3411_94);
++pub const ID_HMACGOSTR3411_94: Nid = Nid(ffi::NID_id_HMACGostR3411_94);
++pub const ID_GOSTR3410_2001: Nid = Nid(ffi::NID_id_GostR3410_2001);
++pub const ID_GOSTR3410_94: Nid = Nid(ffi::NID_id_GostR3410_94);
++pub const ID_GOST28147_89: Nid = Nid(ffi::NID_id_Gost28147_89);
++pub const GOST89_CNT: Nid = Nid(ffi::NID_gost89_cnt);
++pub const ID_GOST28147_89_MAC: Nid = Nid(ffi::NID_id_Gost28147_89_MAC);
++pub const ID_GOSTR3411_94_PRF: Nid = Nid(ffi::NID_id_GostR3411_94_prf);
++pub const ID_GOSTR3410_2001DH: Nid = Nid(ffi::NID_id_GostR3410_2001DH);
++pub const ID_GOSTR3410_94DH: Nid = Nid(ffi::NID_id_GostR3410_94DH);
++pub const ID_GOST28147_89_CRYPTOPRO_KEYMESHING: Nid =
++    Nid(ffi::NID_id_Gost28147_89_CryptoPro_KeyMeshing);
++pub const ID_GOST28147_89_NONE_KEYMESHING: Nid = Nid(ffi::NID_id_Gost28147_89_None_KeyMeshing);
++pub const ID_GOSTR3411_94_TESTPARAMSET: Nid = Nid(ffi::NID_id_GostR3411_94_TestParamSet);
++pub const ID_GOSTR3411_94_CRYPTOPROPARAMSET: Nid = Nid(ffi::NID_id_GostR3411_94_CryptoProParamSet);
++pub const ID_GOST28147_89_TESTPARAMSET: Nid = Nid(ffi::NID_id_Gost28147_89_TestParamSet);
++pub const ID_GOST28147_89_CRYPTOPRO_A_PARAMSET: Nid =
++    Nid(ffi::NID_id_Gost28147_89_CryptoPro_A_ParamSet);
++pub const ID_GOST28147_89_CRYPTOPRO_B_PARAMSET: Nid =
++    Nid(ffi::NID_id_Gost28147_89_CryptoPro_B_ParamSet);
++pub const ID_GOST28147_89_CRYPTOPRO_C_PARAMSET: Nid =
++    Nid(ffi::NID_id_Gost28147_89_CryptoPro_C_ParamSet);
++pub const ID_GOST28147_89_CRYPTOPRO_D_PARAMSET: Nid =
++    Nid(ffi::NID_id_Gost28147_89_CryptoPro_D_ParamSet);
++pub const ID_GOST28147_89_CRYPTOPRO_OSCAR_1_1_PARAMSET: Nid =
++    Nid(ffi::NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet);
++pub const ID_GOST28147_89_CRYPTOPRO_OSCAR_1_0_PARAMSET: Nid =
++    Nid(ffi::NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet);
++pub const ID_GOST28147_89_CRYPTOPRO_RIC_1_PARAMSET: Nid =
++    Nid(ffi::NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet);
++pub const ID_GOSTR3410_94_TESTPARAMSET: Nid = Nid(ffi::NID_id_GostR3410_94_TestParamSet);
++pub const ID_GOSTR3410_94_CRYPTOPRO_A_PARAMSET: Nid =
++    Nid(ffi::NID_id_GostR3410_94_CryptoPro_A_ParamSet);
++pub const ID_GOSTR3410_94_CRYPTOPRO_B_PARAMSET: Nid =
++    Nid(ffi::NID_id_GostR3410_94_CryptoPro_B_ParamSet);
++pub const ID_GOSTR3410_94_CRYPTOPRO_C_PARAMSET: Nid =
++    Nid(ffi::NID_id_GostR3410_94_CryptoPro_C_ParamSet);
++pub const ID_GOSTR3410_94_CRYPTOPRO_D_PARAMSET: Nid =
++    Nid(ffi::NID_id_GostR3410_94_CryptoPro_D_ParamSet);
++pub const ID_GOSTR3410_94_CRYPTOPRO_XCHA_PARAMSET: Nid =
++    Nid(ffi::NID_id_GostR3410_94_CryptoPro_XchA_ParamSet);
++pub const ID_GOSTR3410_94_CRYPTOPRO_XCHB_PARAMSET: Nid =
++    Nid(ffi::NID_id_GostR3410_94_CryptoPro_XchB_ParamSet);
++pub const ID_GOSTR3410_94_CRYPTOPRO_XCHC_PARAMSET: Nid =
++    Nid(ffi::NID_id_GostR3410_94_CryptoPro_XchC_ParamSet);
++pub const ID_GOSTR3410_2001_TESTPARAMSET: Nid = Nid(ffi::NID_id_GostR3410_2001_TestParamSet);
++pub const ID_GOSTR3410_2001_CRYPTOPRO_A_PARAMSET: Nid =
++    Nid(ffi::NID_id_GostR3410_2001_CryptoPro_A_ParamSet);
++pub const ID_GOSTR3410_2001_CRYPTOPRO_B_PARAMSET: Nid =
++    Nid(ffi::NID_id_GostR3410_2001_CryptoPro_B_ParamSet);
++pub const ID_GOSTR3410_2001_CRYPTOPRO_C_PARAMSET: Nid =
++    Nid(ffi::NID_id_GostR3410_2001_CryptoPro_C_ParamSet);
++pub const ID_GOSTR3410_2001_CRYPTOPRO_XCHA_PARAMSET: Nid =
++    Nid(ffi::NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet);
++pub const ID_GOSTR3410_2001_CRYPTOPRO_XCHB_PARAMSET: Nid =
++    Nid(ffi::NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet);
++pub const ID_GOSTR3410_94_A: Nid = Nid(ffi::NID_id_GostR3410_94_a);
++pub const ID_GOSTR3410_94_ABIS: Nid = Nid(ffi::NID_id_GostR3410_94_aBis);
++pub const ID_GOSTR3410_94_B: Nid = Nid(ffi::NID_id_GostR3410_94_b);
++pub const ID_GOSTR3410_94_BBIS: Nid = Nid(ffi::NID_id_GostR3410_94_bBis);
++pub const ID_GOST28147_89_CC: Nid = Nid(ffi::NID_id_Gost28147_89_cc);
++pub const ID_GOSTR3410_94_CC: Nid = Nid(ffi::NID_id_GostR3410_94_cc);
++pub const ID_GOSTR3410_2001_CC: Nid = Nid(ffi::NID_id_GostR3410_2001_cc);
++pub const ID_GOSTR3411_94_WITH_GOSTR3410_94_CC: Nid =
++    Nid(ffi::NID_id_GostR3411_94_with_GostR3410_94_cc);
++pub const ID_GOSTR3411_94_WITH_GOSTR3410_2001_CC: Nid =
++    Nid(ffi::NID_id_GostR3411_94_with_GostR3410_2001_cc);
++pub const ID_GOSTR3410_2001_PARAMSET_CC: Nid = Nid(ffi::NID_id_GostR3410_2001_ParamSet_cc);
++pub const CAMELLIA_128_CBC: Nid = Nid(ffi::NID_camellia_128_cbc);
++pub const CAMELLIA_192_CBC: Nid = Nid(ffi::NID_camellia_192_cbc);
++pub const CAMELLIA_256_CBC: Nid = Nid(ffi::NID_camellia_256_cbc);
++pub const ID_CAMELLIA128_WRAP: Nid = Nid(ffi::NID_id_camellia128_wrap);
++pub const ID_CAMELLIA192_WRAP: Nid = Nid(ffi::NID_id_camellia192_wrap);
++pub const ID_CAMELLIA256_WRAP: Nid = Nid(ffi::NID_id_camellia256_wrap);
++pub const CAMELLIA_128_ECB: Nid = Nid(ffi::NID_camellia_128_ecb);
++pub const CAMELLIA_128_OFB128: Nid = Nid(ffi::NID_camellia_128_ofb128);
++pub const CAMELLIA_128_CFB128: Nid = Nid(ffi::NID_camellia_128_cfb128);
++pub const CAMELLIA_192_ECB: Nid = Nid(ffi::NID_camellia_192_ecb);
++pub const CAMELLIA_192_OFB128: Nid = Nid(ffi::NID_camellia_192_ofb128);
++pub const CAMELLIA_192_CFB128: Nid = Nid(ffi::NID_camellia_192_cfb128);
++pub const CAMELLIA_256_ECB: Nid = Nid(ffi::NID_camellia_256_ecb);
++pub const CAMELLIA_256_OFB128: Nid = Nid(ffi::NID_camellia_256_ofb128);
++pub const CAMELLIA_256_CFB128: Nid = Nid(ffi::NID_camellia_256_cfb128);
++pub const CAMELLIA_128_CFB1: Nid = Nid(ffi::NID_camellia_128_cfb1);
++pub const CAMELLIA_192_CFB1: Nid = Nid(ffi::NID_camellia_192_cfb1);
++pub const CAMELLIA_256_CFB1: Nid = Nid(ffi::NID_camellia_256_cfb1);
++pub const CAMELLIA_128_CFB8: Nid = Nid(ffi::NID_camellia_128_cfb8);
++pub const CAMELLIA_192_CFB8: Nid = Nid(ffi::NID_camellia_192_cfb8);
++pub const CAMELLIA_256_CFB8: Nid = Nid(ffi::NID_camellia_256_cfb8);
++pub const KISA: Nid = Nid(ffi::NID_kisa);
++pub const SEED_ECB: Nid = Nid(ffi::NID_seed_ecb);
++pub const SEED_CBC: Nid = Nid(ffi::NID_seed_cbc);
++pub const SEED_CFB128: Nid = Nid(ffi::NID_seed_cfb128);
++pub const SEED_OFB128: Nid = Nid(ffi::NID_seed_ofb128);
++pub const HMAC: Nid = Nid(ffi::NID_hmac);
++pub const CMAC: Nid = Nid(ffi::NID_cmac);
++pub const RC4_HMAC_MD5: Nid = Nid(ffi::NID_rc4_hmac_md5);
++pub const AES_128_CBC_HMAC_SHA1: Nid = Nid(ffi::NID_aes_128_cbc_hmac_sha1);
++pub const AES_192_CBC_HMAC_SHA1: Nid = Nid(ffi::NID_aes_192_cbc_hmac_sha1);
++pub const AES_256_CBC_HMAC_SHA1: Nid = Nid(ffi::NID_aes_256_cbc_hmac_sha1);
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..acc3549bbf6f76c1bc17d67c64f4cfbf21e668bc
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,314 @@@
++use ffi;
++use foreign_types::ForeignTypeRef;
++use libc::{c_int, c_long, c_ulong};
++use std::ptr;
++use std::mem;
++
++use {cvt, cvt_p};
++use asn1::Asn1GeneralizedTimeRef;
++use error::ErrorStack;
++use hash::MessageDigest;
++use stack::StackRef;
++use x509::store::X509StoreRef;
++use x509::{X509, X509Ref};
++
++bitflags! {
++    pub struct Flag: c_ulong {
++        const FLAG_NO_CERTS = ffi::OCSP_NOCERTS;
++        const FLAG_NO_INTERN = ffi::OCSP_NOINTERN;
++        const FLAG_NO_CHAIN = ffi::OCSP_NOCHAIN;
++        const FLAG_NO_VERIFY = ffi::OCSP_NOVERIFY;
++        const FLAG_NO_EXPLICIT = ffi::OCSP_NOEXPLICIT;
++        const FLAG_NO_CA_SIGN = ffi::OCSP_NOCASIGN;
++        const FLAG_NO_DELEGATED = ffi::OCSP_NODELEGATED;
++        const FLAG_NO_CHECKS = ffi::OCSP_NOCHECKS;
++        const FLAG_TRUST_OTHER = ffi::OCSP_TRUSTOTHER;
++        const FLAG_RESPID_KEY = ffi::OCSP_RESPID_KEY;
++        const FLAG_NO_TIME = ffi::OCSP_NOTIME;
++    }
++}
++
++pub const RESPONSE_STATUS_SUCCESSFUL: OcspResponseStatus =
++    OcspResponseStatus(ffi::OCSP_RESPONSE_STATUS_SUCCESSFUL);
++pub const RESPONSE_STATUS_MALFORMED_REQUEST: OcspResponseStatus =
++    OcspResponseStatus(ffi::OCSP_RESPONSE_STATUS_MALFORMEDREQUEST);
++pub const RESPONSE_STATUS_INTERNAL_ERROR: OcspResponseStatus =
++    OcspResponseStatus(ffi::OCSP_RESPONSE_STATUS_INTERNALERROR);
++pub const RESPONSE_STATUS_TRY_LATER: OcspResponseStatus =
++    OcspResponseStatus(ffi::OCSP_RESPONSE_STATUS_TRYLATER);
++pub const RESPONSE_STATUS_SIG_REQUIRED: OcspResponseStatus =
++    OcspResponseStatus(ffi::OCSP_RESPONSE_STATUS_SIGREQUIRED);
++pub const RESPONSE_STATUS_UNAUTHORIZED: OcspResponseStatus =
++    OcspResponseStatus(ffi::OCSP_RESPONSE_STATUS_UNAUTHORIZED);
++
++pub const CERT_STATUS_GOOD: OcspCertStatus = OcspCertStatus(ffi::V_OCSP_CERTSTATUS_GOOD);
++pub const CERT_STATUS_REVOKED: OcspCertStatus = OcspCertStatus(ffi::V_OCSP_CERTSTATUS_REVOKED);
++pub const CERT_STATUS_UNKNOWN: OcspCertStatus = OcspCertStatus(ffi::V_OCSP_CERTSTATUS_UNKNOWN);
++
++pub const REVOKED_STATUS_NO_STATUS: OcspRevokedStatus =
++    OcspRevokedStatus(ffi::OCSP_REVOKED_STATUS_NOSTATUS);
++pub const REVOKED_STATUS_UNSPECIFIED: OcspRevokedStatus =
++    OcspRevokedStatus(ffi::OCSP_REVOKED_STATUS_UNSPECIFIED);
++pub const REVOKED_STATUS_KEY_COMPROMISE: OcspRevokedStatus =
++    OcspRevokedStatus(ffi::OCSP_REVOKED_STATUS_KEYCOMPROMISE);
++pub const REVOKED_STATUS_CA_COMPROMISE: OcspRevokedStatus =
++    OcspRevokedStatus(ffi::OCSP_REVOKED_STATUS_CACOMPROMISE);
++pub const REVOKED_STATUS_AFFILIATION_CHANGED: OcspRevokedStatus =
++    OcspRevokedStatus(ffi::OCSP_REVOKED_STATUS_AFFILIATIONCHANGED);
++pub const REVOKED_STATUS_SUPERSEDED: OcspRevokedStatus =
++    OcspRevokedStatus(ffi::OCSP_REVOKED_STATUS_SUPERSEDED);
++pub const REVOKED_STATUS_CESSATION_OF_OPERATION: OcspRevokedStatus =
++    OcspRevokedStatus(ffi::OCSP_REVOKED_STATUS_CESSATIONOFOPERATION);
++pub const REVOKED_STATUS_CERTIFICATE_HOLD: OcspRevokedStatus =
++    OcspRevokedStatus(ffi::OCSP_REVOKED_STATUS_CERTIFICATEHOLD);
++pub const REVOKED_STATUS_REMOVE_FROM_CRL: OcspRevokedStatus =
++    OcspRevokedStatus(ffi::OCSP_REVOKED_STATUS_REMOVEFROMCRL);
++
++#[derive(Copy, Clone, Debug, PartialEq, Eq)]
++pub struct OcspResponseStatus(c_int);
++
++impl OcspResponseStatus {
++    pub fn from_raw(raw: c_int) -> OcspResponseStatus {
++        OcspResponseStatus(raw)
++    }
++
++    pub fn as_raw(&self) -> c_int {
++        self.0
++    }
++}
++
++#[derive(Copy, Clone, Debug, PartialEq, Eq)]
++pub struct OcspCertStatus(c_int);
++
++impl OcspCertStatus {
++    pub fn from_raw(raw: c_int) -> OcspCertStatus {
++        OcspCertStatus(raw)
++    }
++
++    pub fn as_raw(&self) -> c_int {
++        self.0
++    }
++}
++
++#[derive(Copy, Clone, Debug, PartialEq, Eq)]
++pub struct OcspRevokedStatus(c_int);
++
++impl OcspRevokedStatus {
++    pub fn from_raw(raw: c_int) -> OcspRevokedStatus {
++        OcspRevokedStatus(raw)
++    }
++
++    pub fn as_raw(&self) -> c_int {
++        self.0
++    }
++}
++
++pub struct Status<'a> {
++    /// The overall status of the response.
++    pub status: OcspCertStatus,
++    /// If `status` is `CERT_STATUS_REVOKED`, the reason for the revocation.
++    pub reason: OcspRevokedStatus,
++    /// If `status` is `CERT_STATUS_REVOKED`, the time at which the certificate was revoked.
++    pub revocation_time: Option<&'a Asn1GeneralizedTimeRef>,
++    /// The time that this revocation check was performed.
++    pub this_update: &'a Asn1GeneralizedTimeRef,
++    /// The time at which this revocation check expires.
++    pub next_update: &'a Asn1GeneralizedTimeRef,
++}
++
++impl<'a> Status<'a> {
++    /// Checks validity of the `this_update` and `next_update` fields.
++    ///
++    /// The `nsec` parameter specifies an amount of slack time that will be used when comparing
++    /// those times with the current time to account for delays and clock skew.
++    ///
++    /// The `maxsec` parameter limits the maximum age of the `this_update` parameter to prohibit
++    /// very old responses.
++    pub fn check_validity(&self, nsec: u32, maxsec: Option<u32>) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::OCSP_check_validity(
++                self.this_update.as_ptr(),
++                self.next_update.as_ptr(),
++                nsec as c_long,
++                maxsec.map(|n| n as c_long).unwrap_or(-1),
++            )).map(|_| ())
++        }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::OCSP_BASICRESP;
++    fn drop = ffi::OCSP_BASICRESP_free;
++
++    pub struct OcspBasicResponse;
++    pub struct OcspBasicResponseRef;
++}
++
++impl OcspBasicResponseRef {
++    /// Verifies the validity of the response.
++    ///
++    /// The `certs` parameter contains a set of certificates that will be searched when locating the
++    /// OCSP response signing certificate. Some responders do not include this in the response.
++    pub fn verify(
++        &self,
++        certs: &StackRef<X509>,
++        store: &X509StoreRef,
++        flags: Flag,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::OCSP_basic_verify(
++                self.as_ptr(),
++                certs.as_ptr(),
++                store.as_ptr(),
++                flags.bits(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Looks up the status for the specified certificate ID.
++    pub fn find_status<'a>(&'a self, id: &OcspCertIdRef) -> Option<Status<'a>> {
++        unsafe {
++            let mut status = ffi::V_OCSP_CERTSTATUS_UNKNOWN;
++            let mut reason = ffi::OCSP_REVOKED_STATUS_NOSTATUS;
++            let mut revocation_time = ptr::null_mut();
++            let mut this_update = ptr::null_mut();
++            let mut next_update = ptr::null_mut();
++
++            let r = ffi::OCSP_resp_find_status(
++                self.as_ptr(),
++                id.as_ptr(),
++                &mut status,
++                &mut reason,
++                &mut revocation_time,
++                &mut this_update,
++                &mut next_update,
++            );
++            if r == 1 {
++                let revocation_time = if revocation_time.is_null() {
++                    None
++                } else {
++                    Some(Asn1GeneralizedTimeRef::from_ptr(revocation_time))
++                };
++                Some(Status {
++                    status: OcspCertStatus(status),
++                    reason: OcspRevokedStatus(status),
++                    revocation_time: revocation_time,
++                    this_update: Asn1GeneralizedTimeRef::from_ptr(this_update),
++                    next_update: Asn1GeneralizedTimeRef::from_ptr(next_update),
++                })
++            } else {
++                None
++            }
++        }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::OCSP_CERTID;
++    fn drop = ffi::OCSP_CERTID_free;
++
++    pub struct OcspCertId;
++    pub struct OcspCertIdRef;
++}
++
++impl OcspCertId {
++    /// Constructs a certificate ID for certificate `subject`.
++    pub fn from_cert(
++        digest: MessageDigest,
++        subject: &X509Ref,
++        issuer: &X509Ref,
++    ) -> Result<OcspCertId, ErrorStack> {
++        unsafe {
++            cvt_p(ffi::OCSP_cert_to_id(
++                digest.as_ptr(),
++                subject.as_ptr(),
++                issuer.as_ptr(),
++            )).map(OcspCertId)
++        }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::OCSP_RESPONSE;
++    fn drop = ffi::OCSP_RESPONSE_free;
++
++    pub struct OcspResponse;
++    pub struct OcspResponseRef;
++}
++
++impl OcspResponse {
++    /// Creates an OCSP response from the status and optional body.
++    ///
++    /// A body should only be provided if `status` is `RESPONSE_STATUS_SUCCESSFUL`.
++    pub fn create(
++        status: OcspResponseStatus,
++        body: Option<&OcspBasicResponseRef>,
++    ) -> Result<OcspResponse, ErrorStack> {
++        unsafe {
++            ffi::init();
++
++            cvt_p(ffi::OCSP_response_create(
++                status.as_raw(),
++                body.map(|r| r.as_ptr()).unwrap_or(ptr::null_mut()),
++            )).map(OcspResponse)
++        }
++    }
++
++    from_der!(OcspResponse, ffi::d2i_OCSP_RESPONSE);
++}
++
++impl OcspResponseRef {
++    to_der!(ffi::i2d_OCSP_RESPONSE);
++
++    /// Returns the status of the response.
++    pub fn status(&self) -> OcspResponseStatus {
++        unsafe { OcspResponseStatus(ffi::OCSP_response_status(self.as_ptr())) }
++    }
++
++    /// Returns the basic response.
++    ///
++    /// This will only succeed if `status()` returns `RESPONSE_STATUS_SUCCESSFUL`.
++    pub fn basic(&self) -> Result<OcspBasicResponse, ErrorStack> {
++        unsafe { cvt_p(ffi::OCSP_response_get1_basic(self.as_ptr())).map(OcspBasicResponse) }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::OCSP_REQUEST;
++    fn drop = ffi::OCSP_REQUEST_free;
++
++    pub struct OcspRequest;
++    pub struct OcspRequestRef;
++}
++
++impl OcspRequest {
++    pub fn new() -> Result<OcspRequest, ErrorStack> {
++        unsafe {
++            ffi::init();
++
++            cvt_p(ffi::OCSP_REQUEST_new()).map(OcspRequest)
++        }
++    }
++
++    from_der!(OcspRequest, ffi::d2i_OCSP_REQUEST);
++}
++
++impl OcspRequestRef {
++    to_der!(ffi::i2d_OCSP_REQUEST);
++
++    pub fn add_id(&mut self, id: OcspCertId) -> Result<&mut OcspOneReqRef, ErrorStack> {
++        unsafe {
++            let ptr = try!(cvt_p(ffi::OCSP_request_add0_id(self.as_ptr(), id.as_ptr())));
++            mem::forget(id);
++            Ok(OcspOneReqRef::from_ptr_mut(ptr))
++        }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::OCSP_ONEREQ;
++    fn drop = ffi::OCSP_ONEREQ_free;
++
++    pub struct OcspOneReq;
++    pub struct OcspOneReqRef;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d25080372a251ad2b0db6fd81a7ef1e0d379e6da
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,276 @@@
++//! PKCS #12 archives.
++
++use ffi;
++use foreign_types::{ForeignType, ForeignTypeRef};
++use libc::c_int;
++use std::ptr;
++use std::ffi::CString;
++
++use {cvt, cvt_p};
++use pkey::{PKey, PKeyRef};
++use error::ErrorStack;
++use x509::X509;
++use stack::Stack;
++use nid;
++
++foreign_type! {
++    type CType = ffi::PKCS12;
++    fn drop = ffi::PKCS12_free;
++
++    pub struct Pkcs12;
++    pub struct Pkcs12Ref;
++}
++
++impl Pkcs12Ref {
++    to_der!(ffi::i2d_PKCS12);
++
++    /// Extracts the contents of the `Pkcs12`.
++    // FIXME should take an &[u8]
++    pub fn parse(&self, pass: &str) -> Result<ParsedPkcs12, ErrorStack> {
++        unsafe {
++            let pass = CString::new(pass).unwrap();
++
++            let mut pkey = ptr::null_mut();
++            let mut cert = ptr::null_mut();
++            let mut chain = ptr::null_mut();
++
++            try!(cvt(ffi::PKCS12_parse(
++                self.as_ptr(),
++                pass.as_ptr(),
++                &mut pkey,
++                &mut cert,
++                &mut chain,
++            )));
++
++            let pkey = PKey::from_ptr(pkey);
++            let cert = X509::from_ptr(cert);
++
++            let chain = if chain.is_null() {
++                try!(Stack::new())
++            } else {
++                Stack::from_ptr(chain)
++            };
++
++            Ok(ParsedPkcs12 {
++                pkey: pkey,
++                cert: cert,
++                chain: chain,
++            })
++        }
++    }
++}
++
++impl Pkcs12 {
++    from_der!(Pkcs12, ffi::d2i_PKCS12);
++
++    /// Creates a new builder for a protected pkcs12 certificate.
++    ///
++    /// This uses the defaults from the OpenSSL library:
++    ///
++    /// * `nid_key` - `nid::PBE_WITHSHA1AND3_KEY_TRIPLEDES_CBC`
++    /// * `nid_cert` - `nid::PBE_WITHSHA1AND40BITRC2_CBC`
++    /// * `iter` - `2048`
++    /// * `mac_iter` - `2048`
++    pub fn builder() -> Pkcs12Builder {
++        ffi::init();
++
++        Pkcs12Builder {
++            nid_key: nid::UNDEF, //nid::PBE_WITHSHA1AND3_KEY_TRIPLEDES_CBC,
++            nid_cert: nid::UNDEF, //nid::PBE_WITHSHA1AND40BITRC2_CBC,
++            iter: ffi::PKCS12_DEFAULT_ITER,
++            mac_iter: ffi::PKCS12_DEFAULT_ITER,
++            ca: None,
++        }
++    }
++}
++
++pub struct ParsedPkcs12 {
++    pub pkey: PKey,
++    pub cert: X509,
++    // FIXME Make this Option<Stack> in the next breaking release
++    pub chain: Stack<X509>,
++}
++
++pub struct Pkcs12Builder {
++    nid_key: nid::Nid,
++    nid_cert: nid::Nid,
++    iter: c_int,
++    mac_iter: c_int,
++    ca: Option<Stack<X509>>,
++}
++
++impl Pkcs12Builder {
++    /// The encryption algorithm that should be used for the key
++    pub fn key_algorithm(&mut self, nid: nid::Nid) -> &mut Self {
++        self.nid_key = nid;
++        self
++    }
++
++    /// The encryption algorithm that should be used for the cert
++    pub fn cert_algorithm(&mut self, nid: nid::Nid) -> &mut Self {
++        self.nid_cert = nid;
++        self
++    }
++
++    /// Key iteration count, default is 2048 as of this writing
++    pub fn key_iter(&mut self, iter: u32) -> &mut Self {
++        self.iter = iter as c_int;
++        self
++    }
++
++    /// MAC iteration count, default is the same as key_iter.
++    ///
++    /// Old implementations don't understand MAC iterations greater than 1, (pre 1.0.1?), if such
++    /// compatibility is required this should be set to 1.
++    pub fn mac_iter(&mut self, mac_iter: u32) -> &mut Self {
++        self.mac_iter = mac_iter as c_int;
++        self
++    }
++
++    /// An additional set of certificates to include in the archive beyond the one provided to
++    /// `build`.
++    pub fn ca(&mut self, ca: Stack<X509>) -> &mut Self {
++        self.ca = Some(ca);
++        self
++    }
++
++    /// Builds the PKCS #12 object
++    ///
++    /// # Arguments
++    ///
++    /// * `password` - the password used to encrypt the key and certificate
++    /// * `friendly_name` - user defined name for the certificate
++    /// * `pkey` - key to store
++    /// * `cert` - certificate to store
++    pub fn build(
++        self,
++        password: &str,
++        friendly_name: &str,
++        pkey: &PKeyRef,
++        cert: &X509,
++    ) -> Result<Pkcs12, ErrorStack> {
++        unsafe {
++            let pass = CString::new(password).unwrap();
++            let friendly_name = CString::new(friendly_name).unwrap();
++            let pkey = pkey.as_ptr();
++            let cert = cert.as_ptr();
++            let ca = self.ca.as_ref().map(|ca| ca.as_ptr()).unwrap_or(
++                ptr::null_mut(),
++            );
++            let nid_key = self.nid_key.as_raw();
++            let nid_cert = self.nid_cert.as_raw();
++
++            // According to the OpenSSL docs, keytype is a non-standard extension for MSIE,
++            // It's values are KEY_SIG or KEY_EX, see the OpenSSL docs for more information:
++            // https://www.openssl.org/docs/man1.0.2/crypto/PKCS12_create.html
++            let keytype = 0;
++
++            cvt_p(ffi::PKCS12_create(
++                pass.as_ptr() as *const _ as *mut _,
++                friendly_name.as_ptr() as *const _ as *mut _,
++                pkey,
++                cert,
++                ca,
++                nid_key,
++                nid_cert,
++                self.iter,
++                self.mac_iter,
++                keytype,
++            )).map(Pkcs12)
++        }
++    }
++}
++
++#[cfg(test)]
++mod test {
++    use hash::MessageDigest;
++    use hex::ToHex;
++
++    use asn1::Asn1Time;
++    use rsa::Rsa;
++    use pkey::PKey;
++    use nid;
++    use x509::{X509, X509Name};
++    use x509::extension::KeyUsage;
++
++    use super::*;
++
++    #[test]
++    fn parse() {
++        let der = include_bytes!("../test/identity.p12");
++        let pkcs12 = Pkcs12::from_der(der).unwrap();
++        let parsed = pkcs12.parse("mypass").unwrap();
++
++        assert_eq!(
++            parsed
++                .cert
++                .fingerprint(MessageDigest::sha1())
++                .unwrap()
++                .to_hex(),
++            "59172d9313e84459bcff27f967e79e6e9217e584"
++        );
++
++        assert_eq!(parsed.chain.len(), 1);
++        assert_eq!(
++            parsed.chain[0]
++                .fingerprint(MessageDigest::sha1())
++                .unwrap()
++                .to_hex(),
++            "c0cbdf7cdd03c9773e5468e1f6d2da7d5cbb1875"
++        );
++    }
++
++    #[test]
++    fn parse_empty_chain() {
++        let der = include_bytes!("../test/keystore-empty-chain.p12");
++        let pkcs12 = Pkcs12::from_der(der).unwrap();
++        let parsed = pkcs12.parse("cassandra").unwrap();
++
++        assert_eq!(parsed.chain.len(), 0);
++        assert_eq!(parsed.chain.into_iter().collect::<Vec<_>>().len(), 0);
++    }
++
++    #[test]
++    fn create() {
++        let subject_name = "ns.example.com";
++        let rsa = Rsa::generate(2048).unwrap();
++        let pkey = PKey::from_rsa(rsa).unwrap();
++
++        let mut name = X509Name::builder().unwrap();
++        name.append_entry_by_nid(nid::COMMONNAME, subject_name)
++            .unwrap();
++        let name = name.build();
++
++        let key_usage = KeyUsage::new().digital_signature().build().unwrap();
++
++        let mut builder = X509::builder().unwrap();
++        builder.set_version(2).unwrap();
++        builder
++            .set_not_before(&Asn1Time::days_from_now(0).unwrap())
++            .unwrap();
++        builder
++            .set_not_after(&Asn1Time::days_from_now(365).unwrap())
++            .unwrap();
++        builder.set_subject_name(&name).unwrap();
++        builder.set_issuer_name(&name).unwrap();
++        builder.append_extension(key_usage).unwrap();
++        builder.set_pubkey(&pkey).unwrap();
++        builder.sign(&pkey, MessageDigest::sha256()).unwrap();
++        let cert = builder.build();
++
++        let pkcs12_builder = Pkcs12::builder();
++        let pkcs12 = pkcs12_builder
++            .build("mypass", subject_name, &pkey, &cert)
++            .unwrap();
++        let der = pkcs12.to_der().unwrap();
++
++        let pkcs12 = Pkcs12::from_der(&der).unwrap();
++        let parsed = pkcs12.parse("mypass").unwrap();
++
++        assert_eq!(
++            parsed.cert.fingerprint(MessageDigest::sha1()).unwrap(),
++            cert.fingerprint(MessageDigest::sha1()).unwrap()
++        );
++        assert!(parsed.pkey.public_eq(&pkey));
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0d574c08aa43b06171d5376e0e23e0730715648b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,570 @@@
++use libc::c_int;
++use std::ptr;
++use ffi;
++
++use cvt;
++use hash::MessageDigest;
++use symm::Cipher;
++use error::ErrorStack;
++
++#[derive(Clone, Eq, PartialEq, Hash, Debug)]
++pub struct KeyIvPair {
++    pub key: Vec<u8>,
++    pub iv: Option<Vec<u8>>,
++}
++
++/// Derives a key and an IV from various parameters.
++///
++/// If specified, `salt` must be 8 bytes in length.
++///
++/// If the total key and IV length is less than 16 bytes and MD5 is used then
++/// the algorithm is compatible with the key derivation algorithm from PKCS#5
++/// v1.5 or PBKDF1 from PKCS#5 v2.0.
++///
++/// New applications should not use this and instead use
++/// `pbkdf2_hmac` or another more modern key derivation algorithm.
++pub fn bytes_to_key(
++    cipher: Cipher,
++    digest: MessageDigest,
++    data: &[u8],
++    salt: Option<&[u8]>,
++    count: i32,
++) -> Result<KeyIvPair, ErrorStack> {
++    unsafe {
++        assert!(data.len() <= c_int::max_value() as usize);
++        let salt_ptr = match salt {
++            Some(salt) => {
++                assert_eq!(salt.len(), ffi::PKCS5_SALT_LEN as usize);
++                salt.as_ptr()
++            }
++            None => ptr::null(),
++        };
++
++        ffi::init();
++
++        let mut iv = cipher.iv_len().map(|l| vec![0; l]);
++
++        let cipher = cipher.as_ptr();
++        let digest = digest.as_ptr();
++
++        let len = try!(cvt(ffi::EVP_BytesToKey(
++            cipher,
++            digest,
++            salt_ptr,
++            ptr::null(),
++            data.len() as c_int,
++            count.into(),
++            ptr::null_mut(),
++            ptr::null_mut(),
++        )));
++
++        let mut key = vec![0; len as usize];
++        let iv_ptr = iv.as_mut().map(|v| v.as_mut_ptr()).unwrap_or(
++            ptr::null_mut(),
++        );
++
++        try!(cvt(ffi::EVP_BytesToKey(
++            cipher,
++            digest,
++            salt_ptr,
++            data.as_ptr(),
++            data.len() as c_int,
++            count as c_int,
++            key.as_mut_ptr(),
++            iv_ptr,
++        )));
++
++        Ok(KeyIvPair { key: key, iv: iv })
++    }
++}
++
++/// Derives a key from a password and salt using the PBKDF2-HMAC algorithm with a digest function.
++pub fn pbkdf2_hmac(
++    pass: &[u8],
++    salt: &[u8],
++    iter: usize,
++    hash: MessageDigest,
++    key: &mut [u8],
++) -> Result<(), ErrorStack> {
++    unsafe {
++        assert!(pass.len() <= c_int::max_value() as usize);
++        assert!(salt.len() <= c_int::max_value() as usize);
++        assert!(key.len() <= c_int::max_value() as usize);
++
++        ffi::init();
++        cvt(ffi::PKCS5_PBKDF2_HMAC(
++            pass.as_ptr() as *const _,
++            pass.len() as c_int,
++            salt.as_ptr(),
++            salt.len() as c_int,
++            iter as c_int,
++            hash.as_ptr(),
++            key.len() as c_int,
++            key.as_mut_ptr(),
++        )).map(|_| ())
++    }
++}
++
++/// Derives a key from a password and salt using the scrypt algorithm.
++///
++/// Requires the `v110` feature and OpenSSL 1.1.0.
++#[cfg(all(feature = "v110", ossl110))]
++pub fn scrypt(
++    pass: &[u8],
++    salt: &[u8],
++    n: u64,
++    r: u64,
++    p: u64,
++    maxmem: u64,
++    key: &mut [u8],
++) -> Result<(), ErrorStack> {
++    unsafe {
++        ffi::init();
++        cvt(ffi::EVP_PBE_scrypt(
++            pass.as_ptr() as *const _,
++            pass.len(),
++            salt.as_ptr() as *const _,
++            salt.len(),
++            n,
++            r,
++            p,
++            maxmem,
++            key.as_mut_ptr() as *mut _,
++            key.len(),
++        )).map(|_| ())
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use hash::MessageDigest;
++    use symm::Cipher;
++
++    // Test vectors from
++    // https://git.lysator.liu.se/nettle/nettle/blob/nettle_3.1.1_release_20150424/testsuite/pbkdf2-test.c
++    #[test]
++    fn pbkdf2_hmac_sha256() {
++        let mut buf = [0; 16];
++
++        super::pbkdf2_hmac(b"passwd", b"salt", 1, MessageDigest::sha256(), &mut buf).unwrap();
++        assert_eq!(
++            buf,
++            &[
++                0x55_u8,
++                0xac_u8,
++                0x04_u8,
++                0x6e_u8,
++                0x56_u8,
++                0xe3_u8,
++                0x08_u8,
++                0x9f_u8,
++                0xec_u8,
++                0x16_u8,
++                0x91_u8,
++                0xc2_u8,
++                0x25_u8,
++                0x44_u8,
++                0xb6_u8,
++                0x05_u8,
++            ]
++                [..]
++        );
++
++        super::pbkdf2_hmac(
++            b"Password",
++            b"NaCl",
++            80000,
++            MessageDigest::sha256(),
++            &mut buf,
++        ).unwrap();
++        assert_eq!(
++            buf,
++            &[
++                0x4d_u8,
++                0xdc_u8,
++                0xd8_u8,
++                0xf6_u8,
++                0x0b_u8,
++                0x98_u8,
++                0xbe_u8,
++                0x21_u8,
++                0x83_u8,
++                0x0c_u8,
++                0xee_u8,
++                0x5e_u8,
++                0xf2_u8,
++                0x27_u8,
++                0x01_u8,
++                0xf9_u8,
++            ]
++                [..]
++        );
++    }
++
++    // Test vectors from
++    // https://git.lysator.liu.se/nettle/nettle/blob/nettle_3.1.1_release_20150424/testsuite/pbkdf2-test.c
++    #[test]
++    fn pbkdf2_hmac_sha512() {
++        let mut buf = [0; 64];
++
++        super::pbkdf2_hmac(b"password", b"NaCL", 1, MessageDigest::sha512(), &mut buf).unwrap();
++        assert_eq!(
++            &buf[..],
++            &[
++                0x73_u8,
++                0xde_u8,
++                0xcf_u8,
++                0xa5_u8,
++                0x8a_u8,
++                0xa2_u8,
++                0xe8_u8,
++                0x4f_u8,
++                0x94_u8,
++                0x77_u8,
++                0x1a_u8,
++                0x75_u8,
++                0x73_u8,
++                0x6b_u8,
++                0xb8_u8,
++                0x8b_u8,
++                0xd3_u8,
++                0xc7_u8,
++                0xb3_u8,
++                0x82_u8,
++                0x70_u8,
++                0xcf_u8,
++                0xb5_u8,
++                0x0c_u8,
++                0xb3_u8,
++                0x90_u8,
++                0xed_u8,
++                0x78_u8,
++                0xb3_u8,
++                0x05_u8,
++                0x65_u8,
++                0x6a_u8,
++                0xf8_u8,
++                0x14_u8,
++                0x8e_u8,
++                0x52_u8,
++                0x45_u8,
++                0x2b_u8,
++                0x22_u8,
++                0x16_u8,
++                0xb2_u8,
++                0xb8_u8,
++                0x09_u8,
++                0x8b_u8,
++                0x76_u8,
++                0x1f_u8,
++                0xc6_u8,
++                0x33_u8,
++                0x60_u8,
++                0x60_u8,
++                0xa0_u8,
++                0x9f_u8,
++                0x76_u8,
++                0x41_u8,
++                0x5e_u8,
++                0x9f_u8,
++                0x71_u8,
++                0xea_u8,
++                0x47_u8,
++                0xf9_u8,
++                0xe9_u8,
++                0x06_u8,
++                0x43_u8,
++                0x06_u8,
++            ]
++                [..]
++        );
++
++        super::pbkdf2_hmac(
++            b"pass\0word",
++            b"sa\0lt",
++            1,
++            MessageDigest::sha512(),
++            &mut buf,
++        ).unwrap();
++        assert_eq!(
++            &buf[..],
++            &[
++                0x71_u8,
++                0xa0_u8,
++                0xec_u8,
++                0x84_u8,
++                0x2a_u8,
++                0xbd_u8,
++                0x5c_u8,
++                0x67_u8,
++                0x8b_u8,
++                0xcf_u8,
++                0xd1_u8,
++                0x45_u8,
++                0xf0_u8,
++                0x9d_u8,
++                0x83_u8,
++                0x52_u8,
++                0x2f_u8,
++                0x93_u8,
++                0x36_u8,
++                0x15_u8,
++                0x60_u8,
++                0x56_u8,
++                0x3c_u8,
++                0x4d_u8,
++                0x0d_u8,
++                0x63_u8,
++                0xb8_u8,
++                0x83_u8,
++                0x29_u8,
++                0x87_u8,
++                0x10_u8,
++                0x90_u8,
++                0xe7_u8,
++                0x66_u8,
++                0x04_u8,
++                0xa4_u8,
++                0x9a_u8,
++                0xf0_u8,
++                0x8f_u8,
++                0xe7_u8,
++                0xc9_u8,
++                0xf5_u8,
++                0x71_u8,
++                0x56_u8,
++                0xc8_u8,
++                0x79_u8,
++                0x09_u8,
++                0x96_u8,
++                0xb2_u8,
++                0x0f_u8,
++                0x06_u8,
++                0xbc_u8,
++                0x53_u8,
++                0x5e_u8,
++                0x5a_u8,
++                0xb5_u8,
++                0x44_u8,
++                0x0d_u8,
++                0xf7_u8,
++                0xe8_u8,
++                0x78_u8,
++                0x29_u8,
++                0x6f_u8,
++                0xa7_u8,
++            ]
++                [..]
++        );
++
++        super::pbkdf2_hmac(
++            b"passwordPASSWORDpassword",
++            b"salt\0\0\0",
++            50,
++            MessageDigest::sha512(),
++            &mut buf,
++        ).unwrap();
++        assert_eq!(
++            &buf[..],
++            &[
++                0x01_u8,
++                0x68_u8,
++                0x71_u8,
++                0xa4_u8,
++                0xc4_u8,
++                0xb7_u8,
++                0x5f_u8,
++                0x96_u8,
++                0x85_u8,
++                0x7f_u8,
++                0xd2_u8,
++                0xb9_u8,
++                0xf8_u8,
++                0xca_u8,
++                0x28_u8,
++                0x02_u8,
++                0x3b_u8,
++                0x30_u8,
++                0xee_u8,
++                0x2a_u8,
++                0x39_u8,
++                0xf5_u8,
++                0xad_u8,
++                0xca_u8,
++                0xc8_u8,
++                0xc9_u8,
++                0x37_u8,
++                0x5f_u8,
++                0x9b_u8,
++                0xda_u8,
++                0x1c_u8,
++                0xcd_u8,
++                0x1b_u8,
++                0x6f_u8,
++                0x0b_u8,
++                0x2f_u8,
++                0xc3_u8,
++                0xad_u8,
++                0xda_u8,
++                0x50_u8,
++                0x54_u8,
++                0x12_u8,
++                0xe7_u8,
++                0x9d_u8,
++                0x89_u8,
++                0x00_u8,
++                0x56_u8,
++                0xc6_u8,
++                0x2e_u8,
++                0x52_u8,
++                0x4c_u8,
++                0x7d_u8,
++                0x51_u8,
++                0x15_u8,
++                0x4b_u8,
++                0x1a_u8,
++                0x85_u8,
++                0x34_u8,
++                0x57_u8,
++                0x5b_u8,
++                0xd0_u8,
++                0x2d_u8,
++                0xee_u8,
++                0x39_u8,
++            ]
++                [..]
++        );
++    }
++
++    #[test]
++    fn bytes_to_key() {
++        let salt = [16_u8, 34_u8, 19_u8, 23_u8, 141_u8, 4_u8, 207_u8, 221_u8];
++
++        let data = [
++            143_u8,
++            210_u8,
++            75_u8,
++            63_u8,
++            214_u8,
++            179_u8,
++            155_u8,
++            241_u8,
++            242_u8,
++            31_u8,
++            154_u8,
++            56_u8,
++            198_u8,
++            145_u8,
++            192_u8,
++            64_u8,
++            2_u8,
++            245_u8,
++            167_u8,
++            220_u8,
++            55_u8,
++            119_u8,
++            233_u8,
++            136_u8,
++            139_u8,
++            27_u8,
++            71_u8,
++            242_u8,
++            119_u8,
++            175_u8,
++            65_u8,
++            207_u8,
++        ];
++
++
++
++        let expected_key = vec![
++            249_u8,
++            115_u8,
++            114_u8,
++            97_u8,
++            32_u8,
++            213_u8,
++            165_u8,
++            146_u8,
++            58_u8,
++            87_u8,
++            234_u8,
++            3_u8,
++            43_u8,
++            250_u8,
++            97_u8,
++            114_u8,
++            26_u8,
++            98_u8,
++            245_u8,
++            246_u8,
++            238_u8,
++            177_u8,
++            229_u8,
++            161_u8,
++            183_u8,
++            224_u8,
++            174_u8,
++            3_u8,
++            6_u8,
++            244_u8,
++            236_u8,
++            255_u8,
++        ];
++        let expected_iv = vec![
++            4_u8,
++            223_u8,
++            153_u8,
++            219_u8,
++            28_u8,
++            142_u8,
++            234_u8,
++            68_u8,
++            227_u8,
++            69_u8,
++            98_u8,
++            107_u8,
++            208_u8,
++            14_u8,
++            236_u8,
++            60_u8,
++        ];
++
++        assert_eq!(
++            super::bytes_to_key(
++                Cipher::aes_256_cbc(),
++                MessageDigest::sha1(),
++                &data,
++                Some(&salt),
++                1,
++            ).unwrap(),
++            super::KeyIvPair {
++                key: expected_key,
++                iv: Some(expected_iv),
++            }
++        );
++    }
++
++    #[test]
++    #[cfg(all(feature = "v110", ossl110))]
++    fn scrypt() {
++        use hex::ToHex;
++
++        let pass = "pleaseletmein";
++        let salt = "SodiumChloride";
++        let expected = "7023bdcb3afd7348461c06cd81fd38ebfda8fbba904f8e3ea9b543f6545da1f2d5432955613\
++                        f0fcf62d49705242a9af9e61e85dc0d651e40dfcf017b45575887";
++
++        let mut actual = [0; 64];
++        super::scrypt(
++            pass.as_bytes(),
++            salt.as_bytes(),
++            16384,
++            8,
++            1,
++            0,
++            &mut actual,
++        ).unwrap();
++        assert_eq!((&actual[..]).to_hex(), expected);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..aba52ae6146969a5179fdbddbab6d6bce0b69179
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,431 @@@
++use libc::{c_void, c_char, c_int, size_t};
++use std::ptr;
++use std::mem;
++use std::ffi::CString;
++use ffi;
++use foreign_types::{ForeignType, ForeignTypeRef};
++
++use {cvt, cvt_p};
++use bio::MemBioSlice;
++use dh::Dh;
++use dsa::Dsa;
++use ec::EcKey;
++use rsa::{Rsa, Padding};
++use error::ErrorStack;
++use util::{CallbackState, invoke_passwd_cb, invoke_passwd_cb_old};
++
++foreign_type! {
++    type CType = ffi::EVP_PKEY;
++    fn drop = ffi::EVP_PKEY_free;
++
++    pub struct PKey;
++    pub struct PKeyRef;
++}
++
++impl PKeyRef {
++    /// Returns a copy of the internal RSA key.
++    pub fn rsa(&self) -> Result<Rsa, ErrorStack> {
++        unsafe {
++            let rsa = try!(cvt_p(ffi::EVP_PKEY_get1_RSA(self.as_ptr())));
++            Ok(Rsa::from_ptr(rsa))
++        }
++    }
++
++    /// Returns a copy of the internal DSA key.
++    pub fn dsa(&self) -> Result<Dsa, ErrorStack> {
++        unsafe {
++            let dsa = try!(cvt_p(ffi::EVP_PKEY_get1_DSA(self.as_ptr())));
++            Ok(Dsa::from_ptr(dsa))
++        }
++    }
++
++    /// Returns a copy of the internal DH key.
++    pub fn dh(&self) -> Result<Dh, ErrorStack> {
++        unsafe {
++            let dh = try!(cvt_p(ffi::EVP_PKEY_get1_DH(self.as_ptr())));
++            Ok(Dh::from_ptr(dh))
++        }
++    }
++
++    /// Returns a copy of the internal elliptic curve key.
++    pub fn ec_key(&self) -> Result<EcKey, ErrorStack> {
++        unsafe {
++            let ec_key = try!(cvt_p(ffi::EVP_PKEY_get1_EC_KEY(self.as_ptr())));
++            Ok(EcKey::from_ptr(ec_key))
++        }
++    }
++
++    public_key_to_pem!(ffi::PEM_write_bio_PUBKEY);
++    private_key_to_pem!(ffi::PEM_write_bio_PKCS8PrivateKey);
++
++    private_key_to_der!(ffi::i2d_PrivateKey);
++    public_key_to_der!(ffi::i2d_PUBKEY);
++
++    /// Returns the size of the key.
++    ///
++    /// This corresponds to the bit length of the modulus of an RSA key, and the bit length of the
++    /// group order for an elliptic curve key, for example.
++    pub fn bits(&self) -> u32 {
++        unsafe { ffi::EVP_PKEY_bits(self.as_ptr()) as u32 }
++    }
++
++    /// Compares the public component of this key with another.
++    pub fn public_eq(&self, other: &PKeyRef) -> bool {
++        unsafe { ffi::EVP_PKEY_cmp(self.as_ptr(), other.as_ptr()) == 1 }
++    }
++}
++
++unsafe impl Send for PKey {}
++unsafe impl Sync for PKey {}
++
++impl PKey {
++    /// Creates a new `PKey` containing an RSA key.
++    pub fn from_rsa(rsa: Rsa) -> Result<PKey, ErrorStack> {
++        unsafe {
++            let evp = try!(cvt_p(ffi::EVP_PKEY_new()));
++            let pkey = PKey(evp);
++            try!(cvt(ffi::EVP_PKEY_assign(
++                pkey.0,
++                ffi::EVP_PKEY_RSA,
++                rsa.as_ptr() as *mut _,
++            )));
++            mem::forget(rsa);
++            Ok(pkey)
++        }
++    }
++
++    /// Creates a new `PKey` containing a DSA key.
++    pub fn from_dsa(dsa: Dsa) -> Result<PKey, ErrorStack> {
++        unsafe {
++            let evp = try!(cvt_p(ffi::EVP_PKEY_new()));
++            let pkey = PKey(evp);
++            try!(cvt(ffi::EVP_PKEY_assign(
++                pkey.0,
++                ffi::EVP_PKEY_DSA,
++                dsa.as_ptr() as *mut _,
++            )));
++            mem::forget(dsa);
++            Ok(pkey)
++        }
++    }
++
++    /// Creates a new `PKey` containing a Diffie-Hellman key.
++    pub fn from_dh(dh: Dh) -> Result<PKey, ErrorStack> {
++        unsafe {
++            let evp = try!(cvt_p(ffi::EVP_PKEY_new()));
++            let pkey = PKey(evp);
++            try!(cvt(ffi::EVP_PKEY_assign(
++                pkey.0,
++                ffi::EVP_PKEY_DH,
++                dh.as_ptr() as *mut _,
++            )));
++            mem::forget(dh);
++            Ok(pkey)
++        }
++    }
++
++    /// Creates a new `PKey` containing an elliptic curve key.
++    pub fn from_ec_key(ec_key: EcKey) -> Result<PKey, ErrorStack> {
++        unsafe {
++            let evp = try!(cvt_p(ffi::EVP_PKEY_new()));
++            let pkey = PKey(evp);
++            try!(cvt(ffi::EVP_PKEY_assign(
++                pkey.0,
++                ffi::EVP_PKEY_EC,
++                ec_key.as_ptr() as *mut _,
++            )));
++            mem::forget(ec_key);
++            Ok(pkey)
++        }
++    }
++
++    /// Creates a new `PKey` containing an HMAC key.
++    ///
++    /// # Note
++    /// To compute HMAC values, use the `sign` module.
++    pub fn hmac(key: &[u8]) -> Result<PKey, ErrorStack> {
++        unsafe {
++            assert!(key.len() <= c_int::max_value() as usize);
++            let key = try!(cvt_p(ffi::EVP_PKEY_new_mac_key(
++                ffi::EVP_PKEY_HMAC,
++                ptr::null_mut(),
++                key.as_ptr() as *const _,
++                key.len() as c_int,
++            )));
++            Ok(PKey(key))
++        }
++    }
++
++    private_key_from_pem!(PKey, ffi::PEM_read_bio_PrivateKey);
++    public_key_from_pem!(PKey, ffi::PEM_read_bio_PUBKEY);
++    public_key_from_der!(PKey, ffi::d2i_PUBKEY);
++    private_key_from_der!(PKey, ffi::d2i_AutoPrivateKey);
++
++    /// Deserializes a DER-formatted PKCS#8 private key, using a callback to retrieve the password
++    /// if the key is encrpyted.
++    ///
++    /// The callback should copy the password into the provided buffer and return the number of
++    /// bytes written.
++    pub fn private_key_from_pkcs8_callback<F>(der: &[u8], callback: F) -> Result<PKey, ErrorStack>
++    where
++        F: FnOnce(&mut [u8]) -> Result<usize, ErrorStack>,
++    {
++        unsafe {
++            ffi::init();
++            let mut cb = CallbackState::new(callback);
++            let bio = try!(MemBioSlice::new(der));
++            cvt_p(ffi::d2i_PKCS8PrivateKey_bio(
++                bio.as_ptr(),
++                ptr::null_mut(),
++                Some(invoke_passwd_cb::<F>),
++                &mut cb as *mut _ as *mut _,
++            )).map(PKey)
++        }
++    }
++
++    /// Deserializes a DER-formatted PKCS#8 private key, using the supplied password if the key is
++    /// encrypted.
++    ///
++    /// # Panics
++    ///
++    /// Panics if `passphrase` contains an embedded null.
++    pub fn private_key_from_pkcs8_passphrase(
++        der: &[u8],
++        passphrase: &[u8],
++    ) -> Result<PKey, ErrorStack> {
++        unsafe {
++            ffi::init();
++            let bio = try!(MemBioSlice::new(der));
++            let passphrase = CString::new(passphrase).unwrap();
++            cvt_p(ffi::d2i_PKCS8PrivateKey_bio(
++                bio.as_ptr(),
++                ptr::null_mut(),
++                None,
++                passphrase.as_ptr() as *const _ as *mut _,
++            )).map(PKey)
++        }
++    }
++
++    #[deprecated(since = "0.9.2", note = "use private_key_from_pem_callback")]
++    pub fn private_key_from_pem_cb<F>(buf: &[u8], pass_cb: F) -> Result<PKey, ErrorStack>
++    where
++        F: FnOnce(&mut [c_char]) -> usize,
++    {
++        ffi::init();
++        let mut cb = CallbackState::new(pass_cb);
++        let mem_bio = try!(MemBioSlice::new(buf));
++        unsafe {
++            let evp = try!(cvt_p(ffi::PEM_read_bio_PrivateKey(
++                mem_bio.as_ptr(),
++                ptr::null_mut(),
++                Some(invoke_passwd_cb_old::<F>),
++                &mut cb as *mut _ as *mut c_void,
++            )));
++            Ok(PKey::from_ptr(evp))
++        }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::EVP_PKEY_CTX;
++    fn drop = ffi::EVP_PKEY_CTX_free;
++
++    pub struct PKeyCtx;
++    pub struct PKeyCtxRef;
++}
++
++unsafe impl Send for PKeyCtx {}
++unsafe impl Sync for PKeyCtx {}
++
++impl PKeyCtx {
++    pub fn from_pkey(pkey: &PKeyRef) -> Result<PKeyCtx, ErrorStack> {
++        unsafe {
++            let evp = try!(cvt_p(ffi::EVP_PKEY_CTX_new(pkey.as_ptr(), ptr::null_mut())));
++            Ok(PKeyCtx(evp))
++        }
++    }
++}
++
++impl PKeyCtxRef {
++    pub fn set_rsa_padding(&mut self, pad: Padding) -> Result<(), ErrorStack> {
++        unsafe {
++            try!(cvt(ffi::EVP_PKEY_CTX_set_rsa_padding(
++                self.as_ptr(),
++                pad.as_raw(),
++            )));
++        }
++        Ok(())
++    }
++
++    pub fn rsa_padding(&self) -> Result<Padding, ErrorStack> {
++        let mut pad: c_int = 0;
++        unsafe {
++            try!(cvt(
++                ffi::EVP_PKEY_CTX_get_rsa_padding(self.as_ptr(), &mut pad),
++            ));
++        };
++        Ok(Padding::from_raw(pad))
++    }
++
++    pub fn derive_init(&mut self) -> Result<(), ErrorStack> {
++        unsafe {
++            try!(cvt(ffi::EVP_PKEY_derive_init(self.as_ptr())));
++        }
++        Ok(())
++    }
++
++    pub fn derive_set_peer(&mut self, peer: &PKeyRef) -> Result<(), ErrorStack> {
++        unsafe {
++            try!(cvt(
++                ffi::EVP_PKEY_derive_set_peer(self.as_ptr(), peer.as_ptr()),
++            ));
++        }
++        Ok(())
++    }
++
++    pub fn derive(&mut self) -> Result<Vec<u8>, ErrorStack> {
++        let mut len: size_t = 0;
++        unsafe {
++            try!(cvt(ffi::EVP_PKEY_derive(
++                self.as_ptr(),
++                ptr::null_mut(),
++                &mut len,
++            )));
++        }
++
++        let mut key = vec![0u8; len];
++        unsafe {
++            try!(cvt(ffi::EVP_PKEY_derive(
++                self.as_ptr(),
++                key.as_mut_ptr(),
++                &mut len,
++            )));
++        }
++        Ok(key)
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use symm::Cipher;
++    use dh::Dh;
++    use dsa::Dsa;
++    use ec::{EcGroup, EcKey};
++    use rsa::Rsa;
++    use nid;
++
++    use super::*;
++
++    #[test]
++    fn test_to_password() {
++        let rsa = Rsa::generate(2048).unwrap();
++        let pkey = PKey::from_rsa(rsa).unwrap();
++        let pem = pkey.private_key_to_pem_passphrase(Cipher::aes_128_cbc(), b"foobar")
++            .unwrap();
++        PKey::private_key_from_pem_passphrase(&pem, b"foobar").unwrap();
++        assert!(PKey::private_key_from_pem_passphrase(&pem, b"fizzbuzz").is_err());
++    }
++
++    #[test]
++    fn test_encrypted_pkcs8_passphrase() {
++        let key = include_bytes!("../test/pkcs8.der");
++        PKey::private_key_from_pkcs8_passphrase(key, b"mypass").unwrap();
++    }
++
++    #[test]
++    fn test_encrypted_pkcs8_callback() {
++        let mut password_queried = false;
++        let key = include_bytes!("../test/pkcs8.der");
++        PKey::private_key_from_pkcs8_callback(key, |password| {
++            password_queried = true;
++            password[..6].copy_from_slice(b"mypass");
++            Ok(6)
++        }).unwrap();
++        assert!(password_queried);
++    }
++
++    #[test]
++    fn test_private_key_from_pem() {
++        let key = include_bytes!("../test/key.pem");
++        PKey::private_key_from_pem(key).unwrap();
++    }
++
++    #[test]
++    fn test_public_key_from_pem() {
++        let key = include_bytes!("../test/key.pem.pub");
++        PKey::public_key_from_pem(key).unwrap();
++    }
++
++    #[test]
++    fn test_public_key_from_der() {
++        let key = include_bytes!("../test/key.der.pub");
++        PKey::public_key_from_der(key).unwrap();
++    }
++
++    #[test]
++    fn test_private_key_from_der() {
++        let key = include_bytes!("../test/key.der");
++        PKey::private_key_from_der(key).unwrap();
++    }
++
++    #[test]
++    fn test_pem() {
++        let key = include_bytes!("../test/key.pem");
++        let key = PKey::private_key_from_pem(key).unwrap();
++
++        let priv_key = key.private_key_to_pem().unwrap();
++        let pub_key = key.public_key_to_pem().unwrap();
++
++        // As a super-simple verification, just check that the buffers contain
++        // the `PRIVATE KEY` or `PUBLIC KEY` strings.
++        assert!(priv_key.windows(11).any(|s| s == b"PRIVATE KEY"));
++        assert!(pub_key.windows(10).any(|s| s == b"PUBLIC KEY"));
++    }
++
++    #[test]
++    fn test_rsa_accessor() {
++        let rsa = Rsa::generate(2048).unwrap();
++        let pkey = PKey::from_rsa(rsa).unwrap();
++        pkey.rsa().unwrap();
++        assert!(pkey.dsa().is_err());
++    }
++
++    #[test]
++    fn test_dsa_accessor() {
++        let dsa = Dsa::generate(2048).unwrap();
++        let pkey = PKey::from_dsa(dsa).unwrap();
++        pkey.dsa().unwrap();
++        assert!(pkey.rsa().is_err());
++    }
++
++    #[test]
++    fn test_dh_accessor() {
++        let dh = include_bytes!("../test/dhparams.pem");
++        let dh = Dh::from_pem(dh).unwrap();
++        let pkey = PKey::from_dh(dh).unwrap();
++        pkey.dh().unwrap();
++        assert!(pkey.rsa().is_err());
++    }
++
++    #[test]
++    fn test_ec_key_accessor() {
++        let ec_key = EcKey::from_curve_name(nid::X9_62_PRIME256V1).unwrap();
++        let pkey = PKey::from_ec_key(ec_key).unwrap();
++        pkey.ec_key().unwrap();
++        assert!(pkey.rsa().is_err());
++    }
++
++    #[test]
++    fn test_ec_key_derive() {
++        let group = EcGroup::from_curve_name(nid::X9_62_PRIME256V1).unwrap();
++        let ec_key = EcKey::generate(&group).unwrap();
++        let ec_key2 = EcKey::generate(&group).unwrap();
++        let pkey = PKey::from_ec_key(ec_key).unwrap();
++        let pkey2 = PKey::from_ec_key(ec_key2).unwrap();
++        let mut pkey_ctx = PKeyCtx::from_pkey(&pkey).unwrap();
++        pkey_ctx.derive_init().unwrap();
++        pkey_ctx.derive_set_peer(&pkey2).unwrap();
++        let shared = pkey_ctx.derive().unwrap();
++        assert!(!shared.is_empty());
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c1c49e7bda9a585c4631be83807b913cd330a255
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++use libc::c_int;
++use ffi;
++
++use cvt;
++use error::ErrorStack;
++
++pub fn rand_bytes(buf: &mut [u8]) -> Result<(), ErrorStack> {
++    unsafe {
++        ffi::init();
++        assert!(buf.len() <= c_int::max_value() as usize);
++        cvt(ffi::RAND_bytes(buf.as_mut_ptr(), buf.len() as c_int)).map(|_| ())
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use super::rand_bytes;
++
++    #[test]
++    fn test_rand_bytes() {
++        let mut buf = [0; 32];
++        rand_bytes(&mut buf).unwrap();
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e5126e5fa46fb369b0fa0221d152a28097d96d79
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,495 @@@
++use ffi;
++use std::fmt;
++use std::ptr;
++use std::mem;
++use libc::{c_int, c_void, c_char};
++use foreign_types::ForeignTypeRef;
++
++use {cvt, cvt_p, cvt_n};
++use bn::{BigNum, BigNumRef};
++use bio::MemBioSlice;
++use error::ErrorStack;
++use util::{CallbackState, invoke_passwd_cb_old};
++
++/// Type of encryption padding to use.
++#[derive(Debug, Copy, Clone, PartialEq, Eq)]
++pub struct Padding(c_int);
++
++impl Padding {
++    pub fn from_raw(value: c_int) -> Padding {
++        Padding(value)
++    }
++
++    pub fn as_raw(&self) -> c_int {
++        self.0
++    }
++}
++
++pub const NO_PADDING: Padding = Padding(ffi::RSA_NO_PADDING);
++pub const PKCS1_PADDING: Padding = Padding(ffi::RSA_PKCS1_PADDING);
++pub const PKCS1_OAEP_PADDING: Padding = Padding(ffi::RSA_PKCS1_OAEP_PADDING);
++
++foreign_type! {
++    type CType = ffi::RSA;
++    fn drop = ffi::RSA_free;
++
++    pub struct Rsa;
++    pub struct RsaRef;
++}
++
++impl RsaRef {
++    // FIXME these need to specify output format
++    private_key_to_pem!(ffi::PEM_write_bio_RSAPrivateKey);
++    public_key_to_pem!(ffi::PEM_write_bio_RSA_PUBKEY);
++
++    private_key_to_der!(ffi::i2d_RSAPrivateKey);
++    public_key_to_der!(ffi::i2d_RSA_PUBKEY);
++
++    to_der_inner!(
++        /// Serializes the public key to DER-encoded PKCS#1.
++        public_key_to_der_pkcs1,
++        ffi::i2d_RSAPublicKey
++    );
++
++    // FIXME should return u32
++    pub fn size(&self) -> usize {
++        unsafe {
++            assert!(self.n().is_some());
++
++            ffi::RSA_size(self.as_ptr()) as usize
++        }
++    }
++
++    /// Decrypts data using the private key, returning the number of decrypted bytes.
++    ///
++    /// # Panics
++    ///
++    /// Panics if `self` has no private components, or if `to` is smaller
++    /// than `self.size()`.
++    pub fn private_decrypt(
++        &self,
++        from: &[u8],
++        to: &mut [u8],
++        padding: Padding,
++    ) -> Result<usize, ErrorStack> {
++        assert!(self.d().is_some(), "private components missing");
++        assert!(from.len() <= i32::max_value() as usize);
++        assert!(to.len() >= self.size());
++
++        unsafe {
++            let len = try!(cvt_n(ffi::RSA_private_decrypt(
++                from.len() as c_int,
++                from.as_ptr(),
++                to.as_mut_ptr(),
++                self.as_ptr(),
++                padding.0,
++            )));
++            Ok(len as usize)
++        }
++    }
++
++    /// Encrypts data using the private key, returning the number of encrypted bytes.
++    ///
++    /// # Panics
++    ///
++    /// Panics if `self` has no private components, or if `to` is smaller
++    /// than `self.size()`.
++    pub fn private_encrypt(
++        &self,
++        from: &[u8],
++        to: &mut [u8],
++        padding: Padding,
++    ) -> Result<usize, ErrorStack> {
++        assert!(self.d().is_some(), "private components missing");
++        assert!(from.len() <= i32::max_value() as usize);
++        assert!(to.len() >= self.size());
++
++        unsafe {
++            let len = try!(cvt_n(ffi::RSA_private_encrypt(
++                from.len() as c_int,
++                from.as_ptr(),
++                to.as_mut_ptr(),
++                self.as_ptr(),
++                padding.0,
++            )));
++            Ok(len as usize)
++        }
++    }
++
++    /// Decrypts data using the public key, returning the number of decrypted bytes.
++    ///
++    /// # Panics
++    ///
++    /// Panics if `to` is smaller than `self.size()`.
++    pub fn public_decrypt(
++        &self,
++        from: &[u8],
++        to: &mut [u8],
++        padding: Padding,
++    ) -> Result<usize, ErrorStack> {
++        assert!(from.len() <= i32::max_value() as usize);
++        assert!(to.len() >= self.size());
++
++        unsafe {
++            let len = try!(cvt_n(ffi::RSA_public_decrypt(
++                from.len() as c_int,
++                from.as_ptr(),
++                to.as_mut_ptr(),
++                self.as_ptr(),
++                padding.0,
++            )));
++            Ok(len as usize)
++        }
++    }
++
++    /// Encrypts data using the public key, returning the number of encrypted bytes.
++    ///
++    /// # Panics
++    ///
++    /// Panics if `to` is smaller than `self.size()`.
++    pub fn public_encrypt(
++        &self,
++        from: &[u8],
++        to: &mut [u8],
++        padding: Padding,
++    ) -> Result<usize, ErrorStack> {
++        assert!(from.len() <= i32::max_value() as usize);
++        assert!(to.len() >= self.size());
++
++        unsafe {
++            let len = try!(cvt_n(ffi::RSA_public_encrypt(
++                from.len() as c_int,
++                from.as_ptr(),
++                to.as_mut_ptr(),
++                self.as_ptr(),
++                padding.0,
++            )));
++            Ok(len as usize)
++        }
++    }
++
++    pub fn n(&self) -> Option<&BigNumRef> {
++        unsafe {
++            let n = compat::key(self.as_ptr())[0];
++            if n.is_null() {
++                None
++            } else {
++                Some(BigNumRef::from_ptr(n as *mut _))
++            }
++        }
++    }
++
++    pub fn d(&self) -> Option<&BigNumRef> {
++        unsafe {
++            let d = compat::key(self.as_ptr())[2];
++            if d.is_null() {
++                None
++            } else {
++                Some(BigNumRef::from_ptr(d as *mut _))
++            }
++        }
++    }
++
++    pub fn e(&self) -> Option<&BigNumRef> {
++        unsafe {
++            let e = compat::key(self.as_ptr())[1];
++            if e.is_null() {
++                None
++            } else {
++                Some(BigNumRef::from_ptr(e as *mut _))
++            }
++        }
++    }
++
++    pub fn p(&self) -> Option<&BigNumRef> {
++        unsafe {
++            let p = compat::factors(self.as_ptr())[0];
++            if p.is_null() {
++                None
++            } else {
++                Some(BigNumRef::from_ptr(p as *mut _))
++            }
++        }
++    }
++
++    pub fn q(&self) -> Option<&BigNumRef> {
++        unsafe {
++            let q = compat::factors(self.as_ptr())[1];
++            if q.is_null() {
++                None
++            } else {
++                Some(BigNumRef::from_ptr(q as *mut _))
++            }
++        }
++    }
++}
++
++impl Rsa {
++    /// only useful for associating the key material directly with the key, it's safer to use
++    /// the supplied load and save methods for DER formatted keys.
++    pub fn from_public_components(n: BigNum, e: BigNum) -> Result<Rsa, ErrorStack> {
++        unsafe {
++            let rsa = Rsa(try!(cvt_p(ffi::RSA_new())));
++            try!(cvt(compat::set_key(
++                rsa.0,
++                n.as_ptr(),
++                e.as_ptr(),
++                ptr::null_mut(),
++            )));
++            mem::forget((n, e));
++            Ok(rsa)
++        }
++    }
++
++    pub fn from_private_components(
++        n: BigNum,
++        e: BigNum,
++        d: BigNum,
++        p: BigNum,
++        q: BigNum,
++        dp: BigNum,
++        dq: BigNum,
++        qi: BigNum,
++    ) -> Result<Rsa, ErrorStack> {
++        unsafe {
++            let rsa = Rsa(try!(cvt_p(ffi::RSA_new())));
++            try!(cvt(
++                compat::set_key(rsa.0, n.as_ptr(), e.as_ptr(), d.as_ptr()),
++            ));
++            mem::forget((n, e, d));
++            try!(cvt(compat::set_factors(rsa.0, p.as_ptr(), q.as_ptr())));
++            mem::forget((p, q));
++            try!(cvt(compat::set_crt_params(
++                rsa.0,
++                dp.as_ptr(),
++                dq.as_ptr(),
++                qi.as_ptr(),
++            )));
++            mem::forget((dp, dq, qi));
++            Ok(rsa)
++        }
++    }
++
++    /// Generates a public/private key pair with the specified size.
++    ///
++    /// The public exponent will be 65537.
++    pub fn generate(bits: u32) -> Result<Rsa, ErrorStack> {
++        ffi::init();
++        unsafe {
++            let rsa = Rsa(try!(cvt_p(ffi::RSA_new())));
++            let e = try!(BigNum::from_u32(ffi::RSA_F4 as u32));
++            try!(cvt(ffi::RSA_generate_key_ex(
++                rsa.0,
++                bits as c_int,
++                e.as_ptr(),
++                ptr::null_mut(),
++            )));
++            Ok(rsa)
++        }
++    }
++
++    // FIXME these need to identify input formats
++    private_key_from_pem!(Rsa, ffi::PEM_read_bio_RSAPrivateKey);
++    private_key_from_der!(Rsa, ffi::d2i_RSAPrivateKey);
++    public_key_from_pem!(Rsa, ffi::PEM_read_bio_RSA_PUBKEY);
++    public_key_from_der!(Rsa, ffi::d2i_RSA_PUBKEY);
++
++    from_der_inner!(
++        /// Deserializes a public key from DER-encoded PKCS#1 data.
++        public_key_from_der_pkcs1,
++        Rsa,
++        ffi::d2i_RSAPublicKey
++    );
++
++    #[deprecated(since = "0.9.2", note = "use private_key_from_pem_callback")]
++    pub fn private_key_from_pem_cb<F>(buf: &[u8], pass_cb: F) -> Result<Rsa, ErrorStack>
++    where
++        F: FnOnce(&mut [c_char]) -> usize,
++    {
++        ffi::init();
++        let mut cb = CallbackState::new(pass_cb);
++        let mem_bio = try!(MemBioSlice::new(buf));
++
++        unsafe {
++            let cb_ptr = &mut cb as *mut _ as *mut c_void;
++            let rsa = try!(cvt_p(ffi::PEM_read_bio_RSAPrivateKey(
++                mem_bio.as_ptr(),
++                ptr::null_mut(),
++                Some(invoke_passwd_cb_old::<F>),
++                cb_ptr,
++            )));
++            Ok(Rsa(rsa))
++        }
++    }
++}
++
++impl fmt::Debug for Rsa {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write!(f, "Rsa")
++    }
++}
++
++#[cfg(ossl110)]
++mod compat {
++    use std::ptr;
++
++    use ffi::{self, BIGNUM, RSA};
++    use libc::c_int;
++
++    pub unsafe fn key(r: *const RSA) -> [*const BIGNUM; 3] {
++        let (mut n, mut e, mut d) = (ptr::null(), ptr::null(), ptr::null());
++        ffi::RSA_get0_key(r, &mut n, &mut e, &mut d);
++        [n, e, d]
++    }
++
++    pub unsafe fn factors(r: *const RSA) -> [*const BIGNUM; 2] {
++        let (mut p, mut q) = (ptr::null(), ptr::null());
++        ffi::RSA_get0_factors(r, &mut p, &mut q);
++        [p, q]
++    }
++
++    pub unsafe fn set_key(r: *mut RSA, n: *mut BIGNUM, e: *mut BIGNUM, d: *mut BIGNUM) -> c_int {
++        ffi::RSA_set0_key(r, n, e, d)
++    }
++
++    pub unsafe fn set_factors(r: *mut RSA, p: *mut BIGNUM, q: *mut BIGNUM) -> c_int {
++        ffi::RSA_set0_factors(r, p, q)
++    }
++
++    pub unsafe fn set_crt_params(
++        r: *mut RSA,
++        dmp1: *mut BIGNUM,
++        dmq1: *mut BIGNUM,
++        iqmp: *mut BIGNUM,
++    ) -> c_int {
++        ffi::RSA_set0_crt_params(r, dmp1, dmq1, iqmp)
++    }
++}
++
++#[cfg(ossl10x)]
++mod compat {
++    use libc::c_int;
++    use ffi::{BIGNUM, RSA};
++
++    pub unsafe fn key(r: *const RSA) -> [*const BIGNUM; 3] {
++        [(*r).n, (*r).e, (*r).d]
++    }
++
++    pub unsafe fn factors(r: *const RSA) -> [*const BIGNUM; 2] {
++        [(*r).p, (*r).q]
++    }
++
++    pub unsafe fn set_key(r: *mut RSA, n: *mut BIGNUM, e: *mut BIGNUM, d: *mut BIGNUM) -> c_int {
++        (*r).n = n;
++        (*r).e = e;
++        (*r).d = d;
++        1 // TODO: is this right? should it be 0? what's success?
++    }
++
++    pub unsafe fn set_factors(r: *mut RSA, p: *mut BIGNUM, q: *mut BIGNUM) -> c_int {
++        (*r).p = p;
++        (*r).q = q;
++        1 // TODO: is this right? should it be 0? what's success?
++    }
++
++    pub unsafe fn set_crt_params(
++        r: *mut RSA,
++        dmp1: *mut BIGNUM,
++        dmq1: *mut BIGNUM,
++        iqmp: *mut BIGNUM,
++    ) -> c_int {
++        (*r).dmp1 = dmp1;
++        (*r).dmq1 = dmq1;
++        (*r).iqmp = iqmp;
++        1 // TODO: is this right? should it be 0? what's success?
++    }
++}
++
++#[cfg(test)]
++mod test {
++    use symm::Cipher;
++
++    use super::*;
++
++    #[test]
++    fn test_from_password() {
++        let key = include_bytes!("../test/rsa-encrypted.pem");
++        Rsa::private_key_from_pem_passphrase(key, b"mypass").unwrap();
++    }
++
++    #[test]
++    fn test_from_password_callback() {
++        let mut password_queried = false;
++        let key = include_bytes!("../test/rsa-encrypted.pem");
++        Rsa::private_key_from_pem_callback(key, |password| {
++            password_queried = true;
++            password[..6].copy_from_slice(b"mypass");
++            Ok(6)
++        }).unwrap();
++
++        assert!(password_queried);
++    }
++
++    #[test]
++    fn test_to_password() {
++        let key = Rsa::generate(2048).unwrap();
++        let pem = key.private_key_to_pem_passphrase(Cipher::aes_128_cbc(), b"foobar")
++            .unwrap();
++        Rsa::private_key_from_pem_passphrase(&pem, b"foobar").unwrap();
++        assert!(Rsa::private_key_from_pem_passphrase(&pem, b"fizzbuzz").is_err());
++    }
++
++    #[test]
++    fn test_public_encrypt_private_decrypt_with_padding() {
++        let key = include_bytes!("../test/rsa.pem.pub");
++        let public_key = Rsa::public_key_from_pem(key).unwrap();
++
++        let mut result = vec![0; public_key.size()];
++        let original_data = b"This is test";
++        let len = public_key
++            .public_encrypt(original_data, &mut result, PKCS1_PADDING)
++            .unwrap();
++        assert_eq!(len, 256);
++
++        let pkey = include_bytes!("../test/rsa.pem");
++        let private_key = Rsa::private_key_from_pem(pkey).unwrap();
++        let mut dec_result = vec![0; private_key.size()];
++        let len = private_key
++            .private_decrypt(&result, &mut dec_result, PKCS1_PADDING)
++            .unwrap();
++
++        assert_eq!(&dec_result[..len], original_data);
++    }
++
++    #[test]
++    fn test_private_encrypt() {
++        let k0 = super::Rsa::generate(512).unwrap();
++        let k0pkey = k0.public_key_to_pem().unwrap();
++        let k1 = super::Rsa::public_key_from_pem(&k0pkey).unwrap();
++
++        let msg = vec![0xdeu8, 0xadu8, 0xd0u8, 0x0du8];
++
++        let mut emesg = vec![0; k0.size()];
++        k0.private_encrypt(&msg, &mut emesg, PKCS1_PADDING).unwrap();
++        let mut dmesg = vec![0; k1.size()];
++        let len = k1.public_decrypt(&emesg, &mut dmesg, PKCS1_PADDING)
++            .unwrap();
++        assert_eq!(msg, &dmesg[..len]);
++    }
++
++    #[test]
++    fn test_public_encrypt() {
++        let k0 = super::Rsa::generate(512).unwrap();
++        let k0pkey = k0.private_key_to_pem().unwrap();
++        let k1 = super::Rsa::private_key_from_pem(&k0pkey).unwrap();
++
++        let msg = vec![0xdeu8, 0xadu8, 0xd0u8, 0x0du8];
++
++        let mut emesg = vec![0; k0.size()];
++        k0.public_encrypt(&msg, &mut emesg, PKCS1_PADDING).unwrap();
++        let mut dmesg = vec![0; k1.size()];
++        let len = k1.private_decrypt(&emesg, &mut dmesg, PKCS1_PADDING)
++            .unwrap();
++        assert_eq!(msg, &dmesg[..len]);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..949e730701fce2baaf7a89c605555026c29dcbf2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,107 @@@
++//! The SHA family of hashes.
++use ffi;
++use std::mem;
++
++/// Computes the SHA1 hash of some data.
++///
++/// # Warning
++///
++/// SHA1 is known to be insecure - it should not be used unless required for
++/// compatibility with existing systems.
++#[inline]
++pub fn sha1(data: &[u8]) -> [u8; 20] {
++    unsafe {
++        let mut hash: [u8; 20] = mem::uninitialized();
++        ffi::SHA1(data.as_ptr(), data.len(), hash.as_mut_ptr());
++        hash
++    }
++}
++
++/// Computes the SHA224 hash of some data.
++#[inline]
++pub fn sha224(data: &[u8]) -> [u8; 28] {
++    unsafe {
++        let mut hash: [u8; 28] = mem::uninitialized();
++        ffi::SHA224(data.as_ptr(), data.len(), hash.as_mut_ptr());
++        hash
++    }
++}
++
++/// Computes the SHA256 hash of some data.
++#[inline]
++pub fn sha256(data: &[u8]) -> [u8; 32] {
++    unsafe {
++        let mut hash: [u8; 32] = mem::uninitialized();
++        ffi::SHA256(data.as_ptr(), data.len(), hash.as_mut_ptr());
++        hash
++    }
++}
++
++/// Computes the SHA384 hash of some data.
++#[inline]
++pub fn sha384(data: &[u8]) -> [u8; 48] {
++    unsafe {
++        let mut hash: [u8; 48] = mem::uninitialized();
++        ffi::SHA384(data.as_ptr(), data.len(), hash.as_mut_ptr());
++        hash
++    }
++}
++
++/// Computes the SHA512 hash of some data.
++#[inline]
++pub fn sha512(data: &[u8]) -> [u8; 64] {
++    unsafe {
++        let mut hash: [u8; 64] = mem::uninitialized();
++        ffi::SHA512(data.as_ptr(), data.len(), hash.as_mut_ptr());
++        hash
++    }
++}
++
++#[cfg(test)]
++mod test {
++    use hex::ToHex;
++
++    use super::*;
++
++    #[test]
++    fn standalone_1() {
++        let data = b"abc";
++        let expected = "a9993e364706816aba3e25717850c26c9cd0d89d";
++
++        assert_eq!(sha1(data).to_hex(), expected);
++    }
++
++    #[test]
++    fn standalone_224() {
++        let data = b"abc";
++        let expected = "23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7";
++
++        assert_eq!(sha224(data).to_hex(), expected);
++    }
++
++    #[test]
++    fn standalone_256() {
++        let data = b"abc";
++        let expected = "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad";
++
++        assert_eq!(sha256(data).to_hex(), expected);
++    }
++
++    #[test]
++    fn standalone_384() {
++        let data = b"abc";
++        let expected = "cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e\
++                        7cc2358baeca134c825a7";
++
++        assert_eq!((&sha384(data)[..]).to_hex(), expected);
++    }
++
++    #[test]
++    fn standalone_512() {
++        let data = b"abc";
++        let expected = "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274\
++                        fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f";
++
++        assert_eq!((&sha512(data)[..]).to_hex(), expected);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..96ec8f7559dccfbc746c6efa0c0c78ccfe28d953
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,878 @@@
++//! Message signatures.
++//!
++//! The `Signer` allows for the computation of cryptographic signatures of
++//! data given a private key. The `Verifier` can then be used with the
++//! corresponding public key to verify the integrity and authenticity of that
++//! data given the signature.
++//!
++//! # Examples
++//!
++//! Sign and verify data given an RSA keypair:
++//!
++//! ```rust
++//! use openssl::sign::{Signer, Verifier};
++//! use openssl::rsa::Rsa;
++//! use openssl::pkey::PKey;
++//! use openssl::hash::MessageDigest;
++//!
++//! // Generate a keypair
++//! let keypair = Rsa::generate(2048).unwrap();
++//! let keypair = PKey::from_rsa(keypair).unwrap();
++//!
++//! let data = b"hello, world!";
++//! let data2 = b"hola, mundo!";
++//!
++//! // Sign the data
++//! let mut signer = Signer::new(MessageDigest::sha256(), &keypair).unwrap();
++//! signer.update(data).unwrap();
++//! signer.update(data2).unwrap();
++//! let signature = signer.finish().unwrap();
++//!
++//! // Verify the data
++//! let mut verifier = Verifier::new(MessageDigest::sha256(), &keypair).unwrap();
++//! verifier.update(data).unwrap();
++//! verifier.update(data2).unwrap();
++//! assert!(verifier.finish(&signature).unwrap());
++//! ```
++//!
++//! Compute an HMAC:
++//!
++//! ```rust
++//! use openssl::hash::MessageDigest;
++//! use openssl::memcmp;
++//! use openssl::pkey::PKey;
++//! use openssl::sign::Signer;
++//!
++//! // Create a PKey
++//! let key = PKey::hmac(b"my secret").unwrap();
++//!
++//! let data = b"hello, world!";
++//! let data2 = b"hola, mundo!";
++//!
++//! // Compute the HMAC
++//! let mut signer = Signer::new(MessageDigest::sha256(), &key).unwrap();
++//! signer.update(data).unwrap();
++//! signer.update(data2).unwrap();
++//! let hmac = signer.finish().unwrap();
++//!
++//! // `Verifier` cannot be used with HMACs; use the `memcmp::eq` function instead
++//! //
++//! // Do not simply check for equality with `==`!
++//! # let target = hmac.clone();
++//! assert!(memcmp::eq(&hmac, &target));
++//! ```
++use ffi;
++use foreign_types::ForeignTypeRef;
++use std::io::{self, Write};
++use std::marker::PhantomData;
++use std::ptr;
++
++use {cvt, cvt_p};
++use hash::MessageDigest;
++use pkey::{PKeyRef, PKeyCtxRef};
++use error::ErrorStack;
++
++#[cfg(ossl110)]
++use ffi::{EVP_MD_CTX_new, EVP_MD_CTX_free};
++#[cfg(any(ossl101, ossl102))]
++use ffi::{EVP_MD_CTX_create as EVP_MD_CTX_new, EVP_MD_CTX_destroy as EVP_MD_CTX_free};
++
++pub struct Signer<'a> {
++    md_ctx: *mut ffi::EVP_MD_CTX,
++    pkey_ctx: *mut ffi::EVP_PKEY_CTX,
++    pkey_pd: PhantomData<&'a PKeyRef>,
++}
++
++impl<'a> Drop for Signer<'a> {
++    fn drop(&mut self) {
++        // pkey_ctx is owned by the md_ctx, so no need to explicitly free it.
++        unsafe {
++            EVP_MD_CTX_free(self.md_ctx);
++        }
++    }
++}
++
++impl<'a> Signer<'a> {
++    pub fn new(type_: MessageDigest, pkey: &'a PKeyRef) -> Result<Signer<'a>, ErrorStack> {
++        unsafe {
++            ffi::init();
++
++            let ctx = try!(cvt_p(EVP_MD_CTX_new()));
++            let mut pctx: *mut ffi::EVP_PKEY_CTX = ptr::null_mut();
++            let r = ffi::EVP_DigestSignInit(
++                ctx,
++                &mut pctx,
++                type_.as_ptr(),
++                ptr::null_mut(),
++                pkey.as_ptr(),
++            );
++            if r != 1 {
++                EVP_MD_CTX_free(ctx);
++                return Err(ErrorStack::get());
++            }
++
++            assert!(!pctx.is_null());
++
++            Ok(Signer {
++                md_ctx: ctx,
++                pkey_ctx: pctx,
++                pkey_pd: PhantomData,
++            })
++        }
++    }
++
++    pub fn pkey_ctx(&self) -> &PKeyCtxRef {
++        unsafe { PKeyCtxRef::from_ptr(self.pkey_ctx) }
++    }
++
++    pub fn pkey_ctx_mut(&mut self) -> &mut PKeyCtxRef {
++        unsafe { PKeyCtxRef::from_ptr_mut(self.pkey_ctx) }
++    }
++
++    pub fn update(&mut self, buf: &[u8]) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::EVP_DigestUpdate(
++                self.md_ctx,
++                buf.as_ptr() as *const _,
++                buf.len(),
++            )).map(|_| ())
++        }
++    }
++
++    pub fn finish(&self) -> Result<Vec<u8>, ErrorStack> {
++        unsafe {
++            let mut len = 0;
++            try!(cvt(ffi::EVP_DigestSignFinal(
++                self.md_ctx,
++                ptr::null_mut(),
++                &mut len,
++            )));
++            let mut buf = vec![0; len];
++            try!(cvt(ffi::EVP_DigestSignFinal(
++                self.md_ctx,
++                buf.as_mut_ptr() as *mut _,
++                &mut len,
++            )));
++            // The advertised length is not always equal to the real length for things like DSA
++            buf.truncate(len);
++            Ok(buf)
++        }
++    }
++}
++
++impl<'a> Write for Signer<'a> {
++    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
++        try!(self.update(buf));
++        Ok(buf.len())
++    }
++
++    fn flush(&mut self) -> io::Result<()> {
++        Ok(())
++    }
++}
++
++pub struct Verifier<'a> {
++    md_ctx: *mut ffi::EVP_MD_CTX,
++    pkey_ctx: *mut ffi::EVP_PKEY_CTX,
++    pkey_pd: PhantomData<&'a PKeyRef>,
++}
++
++impl<'a> Drop for Verifier<'a> {
++    fn drop(&mut self) {
++        // pkey_ctx is owned by the md_ctx, so no need to explicitly free it.
++        unsafe {
++            EVP_MD_CTX_free(self.md_ctx);
++        }
++    }
++}
++
++impl<'a> Verifier<'a> {
++    pub fn new(type_: MessageDigest, pkey: &'a PKeyRef) -> Result<Verifier<'a>, ErrorStack> {
++        unsafe {
++            ffi::init();
++
++            let ctx = try!(cvt_p(EVP_MD_CTX_new()));
++            let mut pctx: *mut ffi::EVP_PKEY_CTX = ptr::null_mut();
++            let r = ffi::EVP_DigestVerifyInit(
++                ctx,
++                &mut pctx,
++                type_.as_ptr(),
++                ptr::null_mut(),
++                pkey.as_ptr(),
++            );
++            if r != 1 {
++                EVP_MD_CTX_free(ctx);
++                return Err(ErrorStack::get());
++            }
++
++            assert!(!pctx.is_null());
++
++            Ok(Verifier {
++                md_ctx: ctx,
++                pkey_ctx: pctx,
++                pkey_pd: PhantomData,
++            })
++        }
++    }
++
++    pub fn pkey_ctx(&self) -> &PKeyCtxRef {
++        unsafe { PKeyCtxRef::from_ptr(self.pkey_ctx) }
++    }
++
++    pub fn pkey_ctx_mut(&mut self) -> &mut PKeyCtxRef {
++        unsafe { PKeyCtxRef::from_ptr_mut(self.pkey_ctx) }
++    }
++
++    pub fn update(&mut self, buf: &[u8]) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::EVP_DigestUpdate(
++                self.md_ctx,
++                buf.as_ptr() as *const _,
++                buf.len(),
++            )).map(|_| ())
++        }
++    }
++
++    pub fn finish(&self, signature: &[u8]) -> Result<bool, ErrorStack> {
++        unsafe {
++            let r =
++                EVP_DigestVerifyFinal(self.md_ctx, signature.as_ptr() as *const _, signature.len());
++            match r {
++                1 => Ok(true),
++                0 => {
++                    ErrorStack::get(); // discard error stack
++                    Ok(false)
++                }
++                _ => Err(ErrorStack::get()),
++            }
++        }
++    }
++}
++
++impl<'a> Write for Verifier<'a> {
++    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
++        try!(self.update(buf));
++        Ok(buf.len())
++    }
++
++    fn flush(&mut self) -> io::Result<()> {
++        Ok(())
++    }
++}
++
++#[cfg(not(ossl101))]
++use ffi::EVP_DigestVerifyFinal;
++
++#[cfg(ossl101)]
++#[allow(bad_style)]
++unsafe fn EVP_DigestVerifyFinal(
++    ctx: *mut ffi::EVP_MD_CTX,
++    sigret: *const ::libc::c_uchar,
++    siglen: ::libc::size_t,
++) -> ::libc::c_int {
++    ffi::EVP_DigestVerifyFinal(ctx, sigret as *mut _, siglen)
++}
++
++#[cfg(test)]
++mod test {
++    use hex::FromHex;
++    use std::iter;
++
++    use hash::MessageDigest;
++    use sign::{Signer, Verifier};
++    use ec::{EcGroup, EcKey};
++    use nid;
++    use rsa::{Rsa, PKCS1_PADDING};
++    use dsa::Dsa;
++    use pkey::PKey;
++
++    static INPUT: &'static [u8] = &[
++        101,
++        121,
++        74,
++        104,
++        98,
++        71,
++        99,
++        105,
++        79,
++        105,
++        74,
++        83,
++        85,
++        122,
++        73,
++        49,
++        78,
++        105,
++        74,
++        57,
++        46,
++        101,
++        121,
++        74,
++        112,
++        99,
++        51,
++        77,
++        105,
++        79,
++        105,
++        74,
++        113,
++        98,
++        50,
++        85,
++        105,
++        76,
++        65,
++        48,
++        75,
++        73,
++        67,
++        74,
++        108,
++        101,
++        72,
++        65,
++        105,
++        79,
++        106,
++        69,
++        122,
++        77,
++        68,
++        65,
++        52,
++        77,
++        84,
++        107,
++        122,
++        79,
++        68,
++        65,
++        115,
++        68,
++        81,
++        111,
++        103,
++        73,
++        109,
++        104,
++        48,
++        100,
++        72,
++        65,
++        54,
++        76,
++        121,
++        57,
++        108,
++        101,
++        71,
++        70,
++        116,
++        99,
++        71,
++        120,
++        108,
++        76,
++        109,
++        78,
++        118,
++        98,
++        83,
++        57,
++        112,
++        99,
++        49,
++        57,
++        121,
++        98,
++        50,
++        57,
++        48,
++        73,
++        106,
++        112,
++        48,
++        99,
++        110,
++        86,
++        108,
++        102,
++        81,
++    ];
++
++    static SIGNATURE: &'static [u8] = &[
++        112,
++        46,
++        33,
++        137,
++        67,
++        232,
++        143,
++        209,
++        30,
++        181,
++        216,
++        45,
++        191,
++        120,
++        69,
++        243,
++        65,
++        6,
++        174,
++        27,
++        129,
++        255,
++        247,
++        115,
++        17,
++        22,
++        173,
++        209,
++        113,
++        125,
++        131,
++        101,
++        109,
++        66,
++        10,
++        253,
++        60,
++        150,
++        238,
++        221,
++        115,
++        162,
++        102,
++        62,
++        81,
++        102,
++        104,
++        123,
++        0,
++        11,
++        135,
++        34,
++        110,
++        1,
++        135,
++        237,
++        16,
++        115,
++        249,
++        69,
++        229,
++        130,
++        173,
++        252,
++        239,
++        22,
++        216,
++        90,
++        121,
++        142,
++        232,
++        198,
++        109,
++        219,
++        61,
++        184,
++        151,
++        91,
++        23,
++        208,
++        148,
++        2,
++        190,
++        237,
++        213,
++        217,
++        217,
++        112,
++        7,
++        16,
++        141,
++        178,
++        129,
++        96,
++        213,
++        248,
++        4,
++        12,
++        167,
++        68,
++        87,
++        98,
++        184,
++        31,
++        190,
++        127,
++        249,
++        217,
++        46,
++        10,
++        231,
++        111,
++        36,
++        242,
++        91,
++        51,
++        187,
++        230,
++        244,
++        74,
++        230,
++        30,
++        177,
++        4,
++        10,
++        203,
++        32,
++        4,
++        77,
++        62,
++        249,
++        18,
++        142,
++        212,
++        1,
++        48,
++        121,
++        91,
++        212,
++        189,
++        59,
++        65,
++        238,
++        202,
++        208,
++        102,
++        171,
++        101,
++        25,
++        129,
++        253,
++        228,
++        141,
++        247,
++        127,
++        55,
++        45,
++        195,
++        139,
++        159,
++        175,
++        221,
++        59,
++        239,
++        177,
++        139,
++        93,
++        163,
++        204,
++        60,
++        46,
++        176,
++        47,
++        158,
++        58,
++        65,
++        214,
++        18,
++        202,
++        173,
++        21,
++        145,
++        18,
++        115,
++        160,
++        95,
++        35,
++        185,
++        232,
++        56,
++        250,
++        175,
++        132,
++        157,
++        105,
++        132,
++        41,
++        239,
++        90,
++        30,
++        136,
++        121,
++        130,
++        54,
++        195,
++        212,
++        14,
++        96,
++        69,
++        34,
++        165,
++        68,
++        200,
++        242,
++        122,
++        122,
++        45,
++        184,
++        6,
++        99,
++        209,
++        108,
++        247,
++        202,
++        234,
++        86,
++        222,
++        64,
++        92,
++        178,
++        33,
++        90,
++        69,
++        178,
++        194,
++        85,
++        102,
++        181,
++        90,
++        193,
++        167,
++        72,
++        160,
++        112,
++        223,
++        200,
++        163,
++        42,
++        70,
++        149,
++        67,
++        208,
++        25,
++        238,
++        251,
++        71,
++    ];
++
++    #[test]
++    fn rsa_sign() {
++        let key = include_bytes!("../test/rsa.pem");
++        let private_key = Rsa::private_key_from_pem(key).unwrap();
++        let pkey = PKey::from_rsa(private_key).unwrap();
++
++        let mut signer = Signer::new(MessageDigest::sha256(), &pkey).unwrap();
++        assert_eq!(signer.pkey_ctx_mut().rsa_padding().unwrap(), PKCS1_PADDING);
++        signer
++            .pkey_ctx_mut()
++            .set_rsa_padding(PKCS1_PADDING)
++            .unwrap();
++        signer.update(INPUT).unwrap();
++        let result = signer.finish().unwrap();
++
++        assert_eq!(result, SIGNATURE);
++    }
++
++    #[test]
++    fn rsa_verify_ok() {
++        let key = include_bytes!("../test/rsa.pem");
++        let private_key = Rsa::private_key_from_pem(key).unwrap();
++        let pkey = PKey::from_rsa(private_key).unwrap();
++
++        let mut verifier = Verifier::new(MessageDigest::sha256(), &pkey).unwrap();
++        assert_eq!(
++            verifier.pkey_ctx_mut().rsa_padding().unwrap(),
++            PKCS1_PADDING
++        );
++        verifier.update(INPUT).unwrap();
++        assert!(verifier.finish(SIGNATURE).unwrap());
++    }
++
++    #[test]
++    fn rsa_verify_invalid() {
++        let key = include_bytes!("../test/rsa.pem");
++        let private_key = Rsa::private_key_from_pem(key).unwrap();
++        let pkey = PKey::from_rsa(private_key).unwrap();
++
++        let mut verifier = Verifier::new(MessageDigest::sha256(), &pkey).unwrap();
++        verifier.update(INPUT).unwrap();
++        verifier.update(b"foobar").unwrap();
++        assert!(!verifier.finish(SIGNATURE).unwrap());
++    }
++
++    #[test]
++    pub fn dsa_sign_verify() {
++        let input: Vec<u8> = (0..25).cycle().take(1024).collect();
++
++        let private_key = {
++            let key = include_bytes!("../test/dsa.pem");
++            PKey::from_dsa(Dsa::private_key_from_pem(key).unwrap()).unwrap()
++        };
++
++        let public_key = {
++            let key = include_bytes!("../test/dsa.pem.pub");
++            PKey::from_dsa(Dsa::public_key_from_pem(key).unwrap()).unwrap()
++        };
++
++        let mut signer = Signer::new(MessageDigest::sha1(), &private_key).unwrap();
++        signer.update(&input).unwrap();
++        let sig = signer.finish().unwrap();
++
++        let mut verifier = Verifier::new(MessageDigest::sha1(), &public_key).unwrap();
++        verifier.update(&input).unwrap();
++        assert!(verifier.finish(&sig).unwrap());
++    }
++
++    #[test]
++    pub fn dsa_sign_verify_fail() {
++        let input: Vec<u8> = (0..25).cycle().take(1024).collect();
++
++        let private_key = {
++            let key = include_bytes!("../test/dsa.pem");
++            PKey::from_dsa(Dsa::private_key_from_pem(key).unwrap()).unwrap()
++        };
++
++        let public_key = {
++            let key = include_bytes!("../test/dsa.pem.pub");
++            PKey::from_dsa(Dsa::public_key_from_pem(key).unwrap()).unwrap()
++        };
++
++        let mut signer = Signer::new(MessageDigest::sha1(), &private_key).unwrap();
++        signer.update(&input).unwrap();
++        let mut sig = signer.finish().unwrap();
++        sig[0] -= 1;
++
++        let mut verifier = Verifier::new(MessageDigest::sha1(), &public_key).unwrap();
++        verifier.update(&input).unwrap();
++        match verifier.finish(&sig) {
++            Ok(true) => panic!("unexpected success"),
++            Ok(false) | Err(_) => {}
++        }
++    }
++
++    fn test_hmac(ty: MessageDigest, tests: &[(Vec<u8>, Vec<u8>, Vec<u8>)]) {
++        for &(ref key, ref data, ref res) in tests.iter() {
++            let pkey = PKey::hmac(key).unwrap();
++            let mut signer = Signer::new(ty, &pkey).unwrap();
++            signer.update(data).unwrap();
++            assert_eq!(signer.finish().unwrap(), *res);
++        }
++    }
++
++    #[test]
++    fn hmac_md5() {
++        // test vectors from RFC 2202
++        let tests: [(Vec<u8>, Vec<u8>, Vec<u8>); 7] =
++            [
++                (
++                    iter::repeat(0x0b_u8).take(16).collect(),
++                    b"Hi There".to_vec(),
++                    Vec::from_hex("9294727a3638bb1c13f48ef8158bfc9d").unwrap(),
++                ),
++                (
++                    b"Jefe".to_vec(),
++                    b"what do ya want for nothing?".to_vec(),
++                    Vec::from_hex("750c783e6ab0b503eaa86e310a5db738").unwrap(),
++                ),
++                (
++                    iter::repeat(0xaa_u8).take(16).collect(),
++                    iter::repeat(0xdd_u8).take(50).collect(),
++                    Vec::from_hex("56be34521d144c88dbb8c733f0e8b3f6").unwrap(),
++                ),
++                (
++                    Vec::from_hex("0102030405060708090a0b0c0d0e0f10111213141516171819").unwrap(),
++                    iter::repeat(0xcd_u8).take(50).collect(),
++                    Vec::from_hex("697eaf0aca3a3aea3a75164746ffaa79").unwrap(),
++                ),
++                (
++                    iter::repeat(0x0c_u8).take(16).collect(),
++                    b"Test With Truncation".to_vec(),
++                    Vec::from_hex("56461ef2342edc00f9bab995690efd4c").unwrap(),
++                ),
++                (
++                    iter::repeat(0xaa_u8).take(80).collect(),
++                    b"Test Using Larger Than Block-Size Key - Hash Key First".to_vec(),
++                    Vec::from_hex("6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd").unwrap(),
++                ),
++                (
++                    iter::repeat(0xaa_u8).take(80).collect(),
++                    b"Test Using Larger Than Block-Size Key \
++              and Larger Than One Block-Size Data"
++                        .to_vec(),
++                    Vec::from_hex("6f630fad67cda0ee1fb1f562db3aa53e").unwrap(),
++                ),
++            ];
++
++        test_hmac(MessageDigest::md5(), &tests);
++    }
++
++    #[test]
++    fn hmac_sha1() {
++        // test vectors from RFC 2202
++        let tests: [(Vec<u8>, Vec<u8>, Vec<u8>); 7] =
++            [
++                (
++                    iter::repeat(0x0b_u8).take(20).collect(),
++                    b"Hi There".to_vec(),
++                    Vec::from_hex("b617318655057264e28bc0b6fb378c8ef146be00").unwrap(),
++                ),
++                (
++                    b"Jefe".to_vec(),
++                    b"what do ya want for nothing?".to_vec(),
++                    Vec::from_hex("effcdf6ae5eb2fa2d27416d5f184df9c259a7c79").unwrap(),
++                ),
++                (
++                    iter::repeat(0xaa_u8).take(20).collect(),
++                    iter::repeat(0xdd_u8).take(50).collect(),
++                    Vec::from_hex("125d7342b9ac11cd91a39af48aa17b4f63f175d3").unwrap(),
++                ),
++                (
++                    Vec::from_hex("0102030405060708090a0b0c0d0e0f10111213141516171819").unwrap(),
++                    iter::repeat(0xcd_u8).take(50).collect(),
++                    Vec::from_hex("4c9007f4026250c6bc8414f9bf50c86c2d7235da").unwrap(),
++                ),
++                (
++                    iter::repeat(0x0c_u8).take(20).collect(),
++                    b"Test With Truncation".to_vec(),
++                    Vec::from_hex("4c1a03424b55e07fe7f27be1d58bb9324a9a5a04").unwrap(),
++                ),
++                (
++                    iter::repeat(0xaa_u8).take(80).collect(),
++                    b"Test Using Larger Than Block-Size Key - Hash Key First".to_vec(),
++                    Vec::from_hex("aa4ae5e15272d00e95705637ce8a3b55ed402112").unwrap(),
++                ),
++                (
++                    iter::repeat(0xaa_u8).take(80).collect(),
++                    b"Test Using Larger Than Block-Size Key \
++              and Larger Than One Block-Size Data"
++                        .to_vec(),
++                    Vec::from_hex("e8e99d0f45237d786d6bbaa7965c7808bbff1a91").unwrap(),
++                ),
++            ];
++
++        test_hmac(MessageDigest::sha1(), &tests);
++    }
++
++    #[test]
++    fn ec() {
++        let group = EcGroup::from_curve_name(nid::X9_62_PRIME256V1).unwrap();
++        let key = EcKey::generate(&group).unwrap();
++        let key = PKey::from_ec_key(key).unwrap();
++
++        let mut signer = Signer::new(MessageDigest::sha256(), &key).unwrap();
++        signer.update(b"hello world").unwrap();
++        let signature = signer.finish().unwrap();
++
++        let mut verifier = Verifier::new(MessageDigest::sha256(), &key).unwrap();
++        verifier.update(b"hello world").unwrap();
++        assert!(verifier.finish(&signature).unwrap());
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..86a055a5cb1906c05415319ea3e125be997b8916
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,279 @@@
++use libc::{c_char, c_int, c_long, c_void, strlen};
++use ffi::{BIO, BIO_CTRL_FLUSH, BIO_new, BIO_clear_retry_flags, BIO_set_retry_read,
++          BIO_set_retry_write};
++use std::any::Any;
++use std::io;
++use std::io::prelude::*;
++use std::mem;
++use std::panic::{AssertUnwindSafe, catch_unwind};
++use std::ptr;
++use std::slice;
++
++use cvt_p;
++use error::ErrorStack;
++
++pub struct StreamState<S> {
++    pub stream: S,
++    pub error: Option<io::Error>,
++    pub panic: Option<Box<Any + Send>>,
++}
++
++/// Safe wrapper for BIO_METHOD
++pub struct BioMethod(compat::BIO_METHOD);
++
++impl BioMethod {
++    fn new<S: Read + Write>() -> BioMethod {
++        BioMethod(compat::BIO_METHOD::new::<S>())
++    }
++}
++
++unsafe impl Sync for BioMethod {}
++unsafe impl Send for BioMethod {}
++
++pub fn new<S: Read + Write>(stream: S) -> Result<(*mut BIO, BioMethod), ErrorStack> {
++    let method = BioMethod::new::<S>();
++
++    let state = Box::new(StreamState {
++        stream: stream,
++        error: None,
++        panic: None,
++    });
++
++    unsafe {
++        let bio = try!(cvt_p(BIO_new(method.0.get())));
++        compat::BIO_set_data(bio, Box::into_raw(state) as *mut _);
++        compat::BIO_set_init(bio, 1);
++
++        return Ok((bio, method));
++    }
++}
++
++pub unsafe fn take_error<S>(bio: *mut BIO) -> Option<io::Error> {
++    let state = state::<S>(bio);
++    state.error.take()
++}
++
++pub unsafe fn take_panic<S>(bio: *mut BIO) -> Option<Box<Any + Send>> {
++    let state = state::<S>(bio);
++    state.panic.take()
++}
++
++pub unsafe fn get_ref<'a, S: 'a>(bio: *mut BIO) -> &'a S {
++    let state: &'a StreamState<S> = mem::transmute(compat::BIO_get_data(bio));
++    &state.stream
++}
++
++pub unsafe fn get_mut<'a, S: 'a>(bio: *mut BIO) -> &'a mut S {
++    &mut state(bio).stream
++}
++
++unsafe fn state<'a, S: 'a>(bio: *mut BIO) -> &'a mut StreamState<S> {
++    &mut *(compat::BIO_get_data(bio) as *mut _)
++}
++
++unsafe extern "C" fn bwrite<S: Write>(bio: *mut BIO, buf: *const c_char, len: c_int) -> c_int {
++    BIO_clear_retry_flags(bio);
++
++    let state = state::<S>(bio);
++    let buf = slice::from_raw_parts(buf as *const _, len as usize);
++
++    match catch_unwind(AssertUnwindSafe(|| state.stream.write(buf))) {
++        Ok(Ok(len)) => len as c_int,
++        Ok(Err(err)) => {
++            if retriable_error(&err) {
++                BIO_set_retry_write(bio);
++            }
++            state.error = Some(err);
++            -1
++        }
++        Err(err) => {
++            state.panic = Some(err);
++            -1
++        }
++    }
++}
++
++unsafe extern "C" fn bread<S: Read>(bio: *mut BIO, buf: *mut c_char, len: c_int) -> c_int {
++    BIO_clear_retry_flags(bio);
++
++    let state = state::<S>(bio);
++    let buf = slice::from_raw_parts_mut(buf as *mut _, len as usize);
++
++    match catch_unwind(AssertUnwindSafe(|| state.stream.read(buf))) {
++        Ok(Ok(len)) => len as c_int,
++        Ok(Err(err)) => {
++            if retriable_error(&err) {
++                BIO_set_retry_read(bio);
++            }
++            state.error = Some(err);
++            -1
++        }
++        Err(err) => {
++            state.panic = Some(err);
++            -1
++        }
++    }
++}
++
++fn retriable_error(err: &io::Error) -> bool {
++    match err.kind() {
++        io::ErrorKind::WouldBlock |
++        io::ErrorKind::NotConnected => true,
++        _ => false,
++    }
++}
++
++unsafe extern "C" fn bputs<S: Write>(bio: *mut BIO, s: *const c_char) -> c_int {
++    bwrite::<S>(bio, s, strlen(s) as c_int)
++}
++
++unsafe extern "C" fn ctrl<S: Write>(
++    bio: *mut BIO,
++    cmd: c_int,
++    _num: c_long,
++    _ptr: *mut c_void,
++) -> c_long {
++    if cmd == BIO_CTRL_FLUSH {
++        let state = state::<S>(bio);
++
++        match catch_unwind(AssertUnwindSafe(|| state.stream.flush())) {
++            Ok(Ok(())) => 1,
++            Ok(Err(err)) => {
++                state.error = Some(err);
++                0
++            }
++            Err(err) => {
++                state.panic = Some(err);
++                0
++            }
++        }
++    } else {
++        0
++    }
++}
++
++unsafe extern "C" fn create(bio: *mut BIO) -> c_int {
++    compat::BIO_set_init(bio, 0);
++    compat::BIO_set_num(bio, 0);
++    compat::BIO_set_data(bio, ptr::null_mut());
++    compat::BIO_set_flags(bio, 0);
++    1
++}
++
++unsafe extern "C" fn destroy<S>(bio: *mut BIO) -> c_int {
++    if bio.is_null() {
++        return 0;
++    }
++
++    let data = compat::BIO_get_data(bio);
++    assert!(!data.is_null());
++    Box::<StreamState<S>>::from_raw(data as *mut _);
++    compat::BIO_set_data(bio, ptr::null_mut());
++    compat::BIO_set_init(bio, 0);
++    1
++}
++
++#[cfg(ossl110)]
++#[allow(bad_style)]
++mod compat {
++    use std::io::{Read, Write};
++
++    use libc::c_int;
++    use ffi;
++    pub use ffi::{BIO_set_init, BIO_set_flags, BIO_set_data, BIO_get_data};
++
++    pub unsafe fn BIO_set_num(_bio: *mut ffi::BIO, _num: c_int) {}
++
++    pub struct BIO_METHOD(*mut ffi::BIO_METHOD);
++
++    impl BIO_METHOD {
++        pub fn new<S: Read + Write>() -> BIO_METHOD {
++            unsafe {
++                let ptr = ffi::BIO_meth_new(ffi::BIO_TYPE_NONE, b"rust\0".as_ptr() as *const _);
++                assert!(!ptr.is_null());
++                let ret = BIO_METHOD(ptr);
++                assert!(ffi::BIO_meth_set_write(ptr, super::bwrite::<S>) != 0);
++                assert!(ffi::BIO_meth_set_read(ptr, super::bread::<S>) != 0);
++                assert!(ffi::BIO_meth_set_puts(ptr, super::bputs::<S>) != 0);
++                assert!(ffi::BIO_meth_set_ctrl(ptr, super::ctrl::<S>) != 0);
++                assert!(ffi::BIO_meth_set_create(ptr, super::create) != 0);
++                assert!(ffi::BIO_meth_set_destroy(ptr, super::destroy::<S>) != 0);
++                return ret;
++            }
++        }
++
++        pub fn get(&self) -> *mut ffi::BIO_METHOD {
++            self.0
++        }
++    }
++
++    impl Drop for BIO_METHOD {
++        fn drop(&mut self) {
++            unsafe {
++                ffi::BIO_meth_free(self.0);
++            }
++        }
++    }
++}
++
++#[cfg(ossl10x)]
++#[allow(bad_style)]
++mod compat {
++    use std::io::{Read, Write};
++
++    use ffi;
++    use libc::{c_int, c_void};
++
++    pub struct BIO_METHOD(*mut ffi::BIO_METHOD);
++
++    impl BIO_METHOD {
++        pub fn new<S: Read + Write>() -> BIO_METHOD {
++            let ptr = Box::new(ffi::BIO_METHOD {
++                type_: ffi::BIO_TYPE_NONE,
++                name: b"rust\0".as_ptr() as *const _,
++                bwrite: Some(super::bwrite::<S>),
++                bread: Some(super::bread::<S>),
++                bputs: Some(super::bputs::<S>),
++                bgets: None,
++                ctrl: Some(super::ctrl::<S>),
++                create: Some(super::create),
++                destroy: Some(super::destroy::<S>),
++                callback_ctrl: None,
++            });
++
++            BIO_METHOD(Box::into_raw(ptr))
++        }
++
++        pub fn get(&self) -> *mut ffi::BIO_METHOD {
++            self.0
++        }
++    }
++
++    impl Drop for BIO_METHOD {
++        fn drop(&mut self) {
++            unsafe {
++                Box::<ffi::BIO_METHOD>::from_raw(self.0);
++            }
++        }
++    }
++
++    pub unsafe fn BIO_set_init(bio: *mut ffi::BIO, init: c_int) {
++        (*bio).init = init;
++    }
++
++    pub unsafe fn BIO_set_flags(bio: *mut ffi::BIO, flags: c_int) {
++        (*bio).flags = flags;
++    }
++
++    pub unsafe fn BIO_get_data(bio: *mut ffi::BIO) -> *mut c_void {
++        (*bio).ptr
++    }
++
++    pub unsafe fn BIO_set_data(bio: *mut ffi::BIO, data: *mut c_void) {
++        (*bio).ptr = data;
++    }
++
++    pub unsafe fn BIO_set_num(bio: *mut ffi::BIO, num: c_int) {
++        (*bio).num = num;
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d7c4805098115519069f7c5c6dfd595e251000b0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,339 @@@
++use ffi;
++use libc::{c_int, c_uint, c_char, c_uchar, c_void};
++use std::any::Any;
++use std::ffi::CStr;
++use std::ptr;
++use std::slice;
++use std::mem;
++use foreign_types::ForeignTypeRef;
++
++use error::ErrorStack;
++use dh::Dh;
++#[cfg(any(all(feature = "v101", ossl101), all(feature = "v102", ossl102)))]
++use ec_key::EcKey;
++use ssl::{get_callback_idx, get_ssl_callback_idx, SslRef, SniError, NPN_PROTOS_IDX};
++#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++use ssl::ALPN_PROTOS_IDX;
++use x509::X509StoreContextRef;
++
++pub extern "C" fn raw_verify<F>(preverify_ok: c_int, x509_ctx: *mut ffi::X509_STORE_CTX) -> c_int
++where
++    F: Fn(bool, &X509StoreContextRef) -> bool + Any + 'static + Sync + Send,
++{
++    unsafe {
++        let idx = ffi::SSL_get_ex_data_X509_STORE_CTX_idx();
++        let ssl = ffi::X509_STORE_CTX_get_ex_data(x509_ctx, idx);
++        let ssl_ctx = ffi::SSL_get_SSL_CTX(ssl as *const _);
++        let verify = ffi::SSL_CTX_get_ex_data(ssl_ctx, get_callback_idx::<F>());
++        let verify: &F = &*(verify as *mut F);
++
++        let ctx = X509StoreContextRef::from_ptr(x509_ctx);
++
++        verify(preverify_ok != 0, ctx) as c_int
++    }
++}
++
++#[cfg(not(osslconf = "OPENSSL_NO_PSK"))]
++pub extern "C" fn raw_psk<F>(
++    ssl: *mut ffi::SSL,
++    hint: *const c_char,
++    identity: *mut c_char,
++    max_identity_len: c_uint,
++    psk: *mut c_uchar,
++    max_psk_len: c_uint,
++) -> c_uint
++where
++    F: Fn(&mut SslRef, Option<&[u8]>, &mut [u8], &mut [u8]) -> Result<usize, ErrorStack>
++        + Any
++        + 'static
++        + Sync
++        + Send,
++{
++    unsafe {
++        let ssl_ctx = ffi::SSL_get_SSL_CTX(ssl as *const _);
++        let callback = ffi::SSL_CTX_get_ex_data(ssl_ctx, get_callback_idx::<F>());
++        let ssl = SslRef::from_ptr_mut(ssl);
++        let callback = &*(callback as *mut F);
++        let hint = if hint != ptr::null() {
++            Some(CStr::from_ptr(hint).to_bytes())
++        } else {
++            None
++        };
++        // Give the callback mutable slices into which it can write the identity and psk.
++        let identity_sl = slice::from_raw_parts_mut(identity as *mut u8, max_identity_len as usize);
++        let psk_sl = slice::from_raw_parts_mut(psk as *mut u8, max_psk_len as usize);
++        match callback(ssl, hint, identity_sl, psk_sl) {
++            Ok(psk_len) => psk_len as u32,
++            _ => 0,
++        }
++    }
++}
++
++pub extern "C" fn ssl_raw_verify<F>(
++    preverify_ok: c_int,
++    x509_ctx: *mut ffi::X509_STORE_CTX,
++) -> c_int
++where
++    F: Fn(bool, &X509StoreContextRef) -> bool + Any + 'static + Sync + Send,
++{
++    unsafe {
++        let idx = ffi::SSL_get_ex_data_X509_STORE_CTX_idx();
++        let ssl = ffi::X509_STORE_CTX_get_ex_data(x509_ctx, idx);
++        let verify = ffi::SSL_get_ex_data(ssl as *const _, get_ssl_callback_idx::<F>());
++        let verify: &F = &*(verify as *mut F);
++
++        let ctx = X509StoreContextRef::from_ptr(x509_ctx);
++
++        verify(preverify_ok != 0, ctx) as c_int
++    }
++}
++
++pub extern "C" fn raw_sni<F>(ssl: *mut ffi::SSL, al: *mut c_int, _arg: *mut c_void) -> c_int
++where
++    F: Fn(&mut SslRef) -> Result<(), SniError> + Any + 'static + Sync + Send,
++{
++    unsafe {
++        let ssl_ctx = ffi::SSL_get_SSL_CTX(ssl);
++        let callback = ffi::SSL_CTX_get_ex_data(ssl_ctx, get_callback_idx::<F>());
++        let callback: &F = &*(callback as *mut F);
++        let ssl = SslRef::from_ptr_mut(ssl);
++
++        match callback(ssl) {
++            Ok(()) => ffi::SSL_TLSEXT_ERR_OK,
++            Err(SniError::Fatal(e)) => {
++                *al = e;
++                ffi::SSL_TLSEXT_ERR_ALERT_FATAL
++            }
++            Err(SniError::Warning(e)) => {
++                *al = e;
++                ffi::SSL_TLSEXT_ERR_ALERT_WARNING
++            }
++            Err(SniError::NoAck) => ffi::SSL_TLSEXT_ERR_NOACK,
++        }
++    }
++}
++
++pub unsafe fn select_proto_using(
++    ssl: *mut ffi::SSL,
++    out: *mut *mut c_uchar,
++    outlen: *mut c_uchar,
++    inbuf: *const c_uchar,
++    inlen: c_uint,
++    ex_data: c_int,
++) -> c_int {
++
++    // First, get the list of protocols (that the client should support) saved in the context
++    // extra data.
++    let ssl_ctx = ffi::SSL_get_SSL_CTX(ssl);
++    let protocols = ffi::SSL_CTX_get_ex_data(ssl_ctx, ex_data);
++    let protocols: &Vec<u8> = &*(protocols as *mut Vec<u8>);
++    // Prepare the client list parameters to be passed to the OpenSSL function...
++    let client = protocols.as_ptr();
++    let client_len = protocols.len() as c_uint;
++    // Finally, let OpenSSL find a protocol to be used, by matching the given server and
++    // client lists.
++    if ffi::SSL_select_next_proto(out, outlen, inbuf, inlen, client, client_len) !=
++        ffi::OPENSSL_NPN_NEGOTIATED
++    {
++        ffi::SSL_TLSEXT_ERR_NOACK
++    } else {
++        ffi::SSL_TLSEXT_ERR_OK
++    }
++}
++
++/// The function is given as the callback to `SSL_CTX_set_next_proto_select_cb`.
++///
++/// It chooses the protocol that the client wishes to use, out of the given list of protocols
++/// supported by the server. It achieves this by delegating to the `SSL_select_next_proto`
++/// function. The list of protocols supported by the client is found in the extra data of the
++/// OpenSSL context.
++pub extern "C" fn raw_next_proto_select_cb(
++    ssl: *mut ffi::SSL,
++    out: *mut *mut c_uchar,
++    outlen: *mut c_uchar,
++    inbuf: *const c_uchar,
++    inlen: c_uint,
++    _arg: *mut c_void,
++) -> c_int {
++    unsafe { select_proto_using(ssl, out, outlen, inbuf, inlen, *NPN_PROTOS_IDX) }
++}
++
++#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++pub extern "C" fn raw_alpn_select_cb(
++    ssl: *mut ffi::SSL,
++    out: *mut *const c_uchar,
++    outlen: *mut c_uchar,
++    inbuf: *const c_uchar,
++    inlen: c_uint,
++    _arg: *mut c_void,
++) -> c_int {
++    unsafe { select_proto_using(ssl, out as *mut _, outlen, inbuf, inlen, *ALPN_PROTOS_IDX) }
++}
++
++pub unsafe extern "C" fn raw_tmp_dh<F>(
++    ssl: *mut ffi::SSL,
++    is_export: c_int,
++    keylength: c_int,
++) -> *mut ffi::DH
++where
++    F: Fn(&mut SslRef, bool, u32) -> Result<Dh, ErrorStack> + Any + 'static + Sync + Send,
++{
++    let ctx = ffi::SSL_get_SSL_CTX(ssl);
++    let callback = ffi::SSL_CTX_get_ex_data(ctx, get_callback_idx::<F>());
++    let callback = &*(callback as *mut F);
++
++    let ssl = SslRef::from_ptr_mut(ssl);
++    match callback(ssl, is_export != 0, keylength as u32) {
++        Ok(dh) => {
++            let ptr = dh.as_ptr();
++            mem::forget(dh);
++            ptr
++        }
++        Err(_) => {
++            // FIXME reset error stack
++            ptr::null_mut()
++        }
++    }
++}
++
++#[cfg(any(all(feature = "v101", ossl101), all(feature = "v102", ossl102)))]
++pub unsafe extern "C" fn raw_tmp_ecdh<F>(
++    ssl: *mut ffi::SSL,
++    is_export: c_int,
++    keylength: c_int,
++) -> *mut ffi::EC_KEY
++where
++    F: Fn(&mut SslRef, bool, u32) -> Result<EcKey, ErrorStack> + Any + 'static + Sync + Send,
++{
++    let ctx = ffi::SSL_get_SSL_CTX(ssl);
++    let callback = ffi::SSL_CTX_get_ex_data(ctx, get_callback_idx::<F>());
++    let callback = &*(callback as *mut F);
++
++    let ssl = SslRef::from_ptr_mut(ssl);
++    match callback(ssl, is_export != 0, keylength as u32) {
++        Ok(ec_key) => {
++            let ptr = ec_key.as_ptr();
++            mem::forget(ec_key);
++            ptr
++        }
++        Err(_) => {
++            // FIXME reset error stack
++            ptr::null_mut()
++        }
++    }
++}
++
++pub unsafe extern "C" fn raw_tmp_dh_ssl<F>(
++    ssl: *mut ffi::SSL,
++    is_export: c_int,
++    keylength: c_int,
++) -> *mut ffi::DH
++where
++    F: Fn(&mut SslRef, bool, u32) -> Result<Dh, ErrorStack> + Any + 'static + Sync + Send,
++{
++    let callback = ffi::SSL_get_ex_data(ssl, get_ssl_callback_idx::<F>());
++    let callback = &*(callback as *mut F);
++
++    let ssl = SslRef::from_ptr_mut(ssl);
++    match callback(ssl, is_export != 0, keylength as u32) {
++        Ok(dh) => {
++            let ptr = dh.as_ptr();
++            mem::forget(dh);
++            ptr
++        }
++        Err(_) => {
++            // FIXME reset error stack
++            ptr::null_mut()
++        }
++    }
++}
++
++#[cfg(any(all(feature = "v101", ossl101), all(feature = "v102", ossl102)))]
++pub unsafe extern "C" fn raw_tmp_ecdh_ssl<F>(
++    ssl: *mut ffi::SSL,
++    is_export: c_int,
++    keylength: c_int,
++) -> *mut ffi::EC_KEY
++where
++    F: Fn(&mut SslRef, bool, u32) -> Result<EcKey, ErrorStack> + Any + 'static + Sync + Send,
++{
++    let callback = ffi::SSL_get_ex_data(ssl, get_ssl_callback_idx::<F>());
++    let callback = &*(callback as *mut F);
++
++    let ssl = SslRef::from_ptr_mut(ssl);
++    match callback(ssl, is_export != 0, keylength as u32) {
++        Ok(ec_key) => {
++            let ptr = ec_key.as_ptr();
++            mem::forget(ec_key);
++            ptr
++        }
++        Err(_) => {
++            // FIXME reset error stack
++            ptr::null_mut()
++        }
++    }
++}
++
++pub unsafe extern "C" fn raw_tlsext_status<F>(ssl: *mut ffi::SSL, _: *mut c_void) -> c_int
++where
++    F: Fn(&mut SslRef) -> Result<bool, ErrorStack> + Any + 'static + Sync + Send,
++{
++    let ssl_ctx = ffi::SSL_get_SSL_CTX(ssl as *const _);
++    let callback = ffi::SSL_CTX_get_ex_data(ssl_ctx, get_callback_idx::<F>());
++    let callback = &*(callback as *mut F);
++
++    let ssl = SslRef::from_ptr_mut(ssl);
++    let ret = callback(ssl);
++
++    if ssl.is_server() {
++        match ret {
++            Ok(true) => ffi::SSL_TLSEXT_ERR_OK,
++            Ok(false) => ffi::SSL_TLSEXT_ERR_NOACK,
++            Err(_) => {
++                // FIXME reset error stack
++                ffi::SSL_TLSEXT_ERR_ALERT_FATAL
++            }
++        }
++    } else {
++        match ret {
++            Ok(true) => 1,
++            Ok(false) => 0,
++            Err(_) => {
++                // FIXME reset error stack
++                -1
++            }
++        }
++    }
++}
++
++/// The function is given as the callback to `SSL_CTX_set_next_protos_advertised_cb`.
++///
++/// It causes the parameter `out` to point at a `*const c_uchar` instance that
++/// represents the list of protocols that the server should advertise as those
++/// that it supports.
++/// The list of supported protocols is found in the extra data of the OpenSSL
++/// context.
++pub extern "C" fn raw_next_protos_advertise_cb(
++    ssl: *mut ffi::SSL,
++    out: *mut *const c_uchar,
++    outlen: *mut c_uint,
++    _arg: *mut c_void,
++) -> c_int {
++    unsafe {
++        // First, get the list of (supported) protocols saved in the context extra data.
++        let ssl_ctx = ffi::SSL_get_SSL_CTX(ssl);
++        let protocols = ffi::SSL_CTX_get_ex_data(ssl_ctx, *NPN_PROTOS_IDX);
++        if protocols.is_null() {
++            *out = b"".as_ptr();
++            *outlen = 0;
++        } else {
++            // If the pointer is valid, put the pointer to the actual byte array into the
++            // output parameter `out`, as well as its length into `outlen`.
++            let protocols: &Vec<u8> = &*(protocols as *mut Vec<u8>);
++            *out = protocols.as_ptr();
++            *outlen = protocols.len() as c_uint;
++        }
++    }
++
++    ffi::SSL_TLSEXT_ERR_OK
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..969ad396bec9047531d286c6533db8439e2fac9d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,531 @@@
++use std::io::{Read, Write};
++
++use dh::Dh;
++use error::ErrorStack;
++use ssl::{self, SslMethod, SslContextBuilder, SslContext, Ssl, SSL_VERIFY_PEER, SslStream,
++          HandshakeError};
++use pkey::PKeyRef;
++use x509::X509Ref;
++
++#[cfg(ossl101)]
++lazy_static! {
++    static ref HOSTNAME_IDX: ::ex_data::Index<Ssl, String> = Ssl::new_ex_index().unwrap();
++}
++
++// ffdhe2048 from https://wiki.mozilla.org/Security/Server_Side_TLS#ffdhe2048
++const DHPARAM_PEM: &'static str = "
++-----BEGIN DH PARAMETERS-----
++MIIBCAKCAQEA//////////+t+FRYortKmq/cViAnPTzx2LnFg84tNpWp4TZBFGQz
+++8yTnc4kmz75fS/jY2MMddj2gbICrsRhetPfHtXV/WVhJDP1H18GbtCFY2VVPe0a
++87VXE15/V8k1mE8McODmi3fipona8+/och3xWKE2rec1MKzKT0g6eXq8CrGCsyT7
++YdEIqUuyyOP7uWrat2DX9GgdT0Kj3jlN9K5W7edjcrsZCwenyO4KbXCeAvzhzffi
++7MA0BM0oNC9hkXL+nOmFg/+OTxIy7vKBg8P+OxtMb61zO7X8vC7CIAXFjvGDfRaD
++ssbzSibBsu/6iGtCOGEoXJf//////////wIBAg==
++-----END DH PARAMETERS-----
++";
++
++fn ctx(method: SslMethod) -> Result<SslContextBuilder, ErrorStack> {
++    let mut ctx = try!(SslContextBuilder::new(method));
++
++    let mut opts = ssl::SSL_OP_ALL;
++    opts &= !ssl::SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG;
++    opts &= !ssl::SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
++    opts |= ssl::SSL_OP_NO_TICKET;
++    opts |= ssl::SSL_OP_NO_COMPRESSION;
++    opts |= ssl::SSL_OP_NO_SSLV2;
++    opts |= ssl::SSL_OP_NO_SSLV3;
++    opts |= ssl::SSL_OP_SINGLE_DH_USE;
++    opts |= ssl::SSL_OP_SINGLE_ECDH_USE;
++    opts |= ssl::SSL_OP_CIPHER_SERVER_PREFERENCE;
++    ctx.set_options(opts);
++
++    let mode = ssl::SSL_MODE_AUTO_RETRY | ssl::SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER |
++        ssl::SSL_MODE_ENABLE_PARTIAL_WRITE;
++    ctx.set_mode(mode);
++
++    Ok(ctx)
++}
++
++/// A builder for `SslConnector`s.
++pub struct SslConnectorBuilder(SslContextBuilder);
++
++impl SslConnectorBuilder {
++    /// Creates a new builder for TLS connections.
++    ///
++    /// The default configuration is subject to change, and is currently derived from Python.
++    pub fn new(method: SslMethod) -> Result<SslConnectorBuilder, ErrorStack> {
++        let mut ctx = try!(ctx(method));
++        try!(ctx.set_default_verify_paths());
++        // From https://github.com/python/cpython/blob/c30098c8c6014f3340a369a31df9c74bdbacc269/Lib/ssl.py#L191
++        try!(ctx.set_cipher_list(
++            "ECDH+AESGCM:ECDH+CHACHA20:DH+AESGCM:DH+CHACHA20:ECDH+AES256:\
++                                  DH+AES256:ECDH+AES128:DH+AES:ECDH+HIGH:DH+HIGH:RSA+AESGCM:\
++                                  RSA+AES:RSA+HIGH:!aNULL:!eNULL:!MD5:!3DES",
++        ));
++        setup_verify(&mut ctx);
++
++        Ok(SslConnectorBuilder(ctx))
++    }
++
++    /// Returns a shared reference to the inner `SslContextBuilder`.
++    pub fn builder(&self) -> &SslContextBuilder {
++        &self.0
++    }
++
++    /// Returns a mutable reference to the inner `SslContextBuilder`.
++    pub fn builder_mut(&mut self) -> &mut SslContextBuilder {
++        &mut self.0
++    }
++
++    /// Consumes the builder, returning a `SslConnector`.
++    pub fn build(self) -> SslConnector {
++        SslConnector(self.0.build())
++    }
++}
++
++/// A type which wraps client-side streams in a TLS session.
++///
++/// OpenSSL's default configuration is highly insecure. This connector manages the OpenSSL
++/// structures, configuring cipher suites, session options, hostname verification, and more.
++///
++/// OpenSSL's built in hostname verification is used when linking against OpenSSL 1.0.2 or 1.1.0,
++/// and a custom implementation is used when linking against OpenSSL 1.0.1.
++#[derive(Clone)]
++pub struct SslConnector(SslContext);
++
++impl SslConnector {
++    /// Initiates a client-side TLS session on a stream.
++    ///
++    /// The domain is used for SNI and hostname verification.
++    pub fn connect<S>(&self, domain: &str, stream: S) -> Result<SslStream<S>, HandshakeError<S>>
++    where
++        S: Read + Write,
++    {
++        try!(self.configure()).connect(domain, stream)
++    }
++
++    /// Initiates a client-side TLS session on a stream without performing hostname verification.
++    ///
++    /// # Warning
++    ///
++    /// You should think very carefully before you use this method. If hostname verification is not
++    /// used, *any* valid certificate for *any* site will be trusted for use from any other. This
++    /// introduces a significant vulnerability to man-in-the-middle attacks.
++    pub fn danger_connect_without_providing_domain_for_certificate_verification_and_server_name_indication<S>(
++            &self, stream: S) -> Result<SslStream<S>, HandshakeError<S>>
++        where S: Read + Write
++    {
++        try!(self.configure())
++            .danger_connect_without_providing_domain_for_certificate_verification_and_server_name_indication(stream)
++    }
++
++    /// Returns a structure allowing for configuration of a single TLS session before connection.
++    pub fn configure(&self) -> Result<ConnectConfiguration, ErrorStack> {
++        Ssl::new(&self.0).map(ConnectConfiguration)
++    }
++}
++
++/// A type which allows for configuration of a client-side TLS session before connection.
++pub struct ConnectConfiguration(Ssl);
++
++impl ConnectConfiguration {
++    /// Returns a shared reference to the inner `Ssl`.
++    pub fn ssl(&self) -> &Ssl {
++        &self.0
++    }
++
++    /// Returns a mutable reference to the inner `Ssl`.
++    pub fn ssl_mut(&mut self) -> &mut Ssl {
++        &mut self.0
++    }
++
++    /// Initiates a client-side TLS session on a stream.
++    ///
++    /// The domain is used for SNI and hostname verification.
++    pub fn connect<S>(mut self, domain: &str, stream: S) -> Result<SslStream<S>, HandshakeError<S>>
++    where
++        S: Read + Write,
++    {
++        try!(self.0.set_hostname(domain));
++        try!(setup_verify_hostname(&mut self.0, domain));
++
++        self.0.connect(stream)
++    }
++
++    /// Initiates a client-side TLS session on a stream without performing hostname verification.
++    ///
++    /// The verification configuration of the connector's `SslContext` is not overridden.
++    ///
++    /// # Warning
++    ///
++    /// You should think very carefully before you use this method. If hostname verification is not
++    /// used, *any* valid certificate for *any* site will be trusted for use from any other. This
++    /// introduces a significant vulnerability to man-in-the-middle attacks.
++    pub fn danger_connect_without_providing_domain_for_certificate_verification_and_server_name_indication<S>(
++            self, stream: S) -> Result<SslStream<S>, HandshakeError<S>>
++        where S: Read + Write
++    {
++        self.0.connect(stream)
++    }
++}
++
++/// A builder for `SslAcceptor`s.
++pub struct SslAcceptorBuilder(SslContextBuilder);
++
++impl SslAcceptorBuilder {
++    /// Creates a new builder configured to connect to non-legacy clients. This should generally be
++    /// considered a reasonable default choice.
++    ///
++    /// This corresponds to the intermediate configuration of Mozilla's server side TLS
++    /// recommendations. See its [documentation][docs] for more details on specifics.
++    ///
++    /// [docs]: https://wiki.mozilla.org/Security/Server_Side_TLS
++    pub fn mozilla_intermediate<I>(
++        method: SslMethod,
++        private_key: &PKeyRef,
++        certificate: &X509Ref,
++        chain: I,
++    ) -> Result<SslAcceptorBuilder, ErrorStack>
++    where
++        I: IntoIterator,
++        I::Item: AsRef<X509Ref>,
++    {
++        let builder = try!(SslAcceptorBuilder::mozilla_intermediate_raw(method));
++        builder.finish_setup(private_key, certificate, chain)
++    }
++
++    /// Creates a new builder configured to connect to modern clients.
++    ///
++    /// This corresponds to the modern configuration of Mozilla's server side TLS recommendations.
++    /// See its [documentation][docs] for more details on specifics.
++    ///
++    /// [docs]: https://wiki.mozilla.org/Security/Server_Side_TLS
++    pub fn mozilla_modern<I>(
++        method: SslMethod,
++        private_key: &PKeyRef,
++        certificate: &X509Ref,
++        chain: I,
++    ) -> Result<SslAcceptorBuilder, ErrorStack>
++    where
++        I: IntoIterator,
++        I::Item: AsRef<X509Ref>,
++    {
++        let builder = try!(SslAcceptorBuilder::mozilla_modern_raw(method));
++        builder.finish_setup(private_key, certificate, chain)
++    }
++
++    /// Like `mozilla_intermediate`, but does not load the certificate chain and private key.
++    pub fn mozilla_intermediate_raw(method: SslMethod) -> Result<SslAcceptorBuilder, ErrorStack> {
++        let mut ctx = try!(ctx(method));
++        let dh = try!(Dh::from_pem(DHPARAM_PEM.as_bytes()));
++        try!(ctx.set_tmp_dh(&dh));
++        try!(setup_curves(&mut ctx));
++        try!(ctx.set_cipher_list(
++            "ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:\
++                                  ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:\
++                                  ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:\
++                                  DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:\
++                                  ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:\
++                                  ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:\
++                                  ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:\
++                                  ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:\
++                                  DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:\
++                                  DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:\
++                                  ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:\
++                                  EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:\
++                                  AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:\
++                                  DES-CBC3-SHA:!DSS",
++        ));
++        Ok(SslAcceptorBuilder(ctx))
++    }
++
++    /// Like `mozilla_modern`, but does not load the certificate chain and private key.
++    pub fn mozilla_modern_raw(method: SslMethod) -> Result<SslAcceptorBuilder, ErrorStack> {
++        let mut ctx = try!(ctx(method));
++        try!(setup_curves(&mut ctx));
++        try!(ctx.set_cipher_list(
++            "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:\
++                                  ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:\
++                                  ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:\
++                                  ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:\
++                                  ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256",
++        ));
++        Ok(SslAcceptorBuilder(ctx))
++    }
++
++    fn finish_setup<I>(
++        mut self,
++        private_key: &PKeyRef,
++        certificate: &X509Ref,
++        chain: I,
++    ) -> Result<SslAcceptorBuilder, ErrorStack>
++    where
++        I: IntoIterator,
++        I::Item: AsRef<X509Ref>,
++    {
++        try!(self.0.set_private_key(private_key));
++        try!(self.0.set_certificate(certificate));
++        try!(self.0.check_private_key());
++        for cert in chain {
++            try!(self.0.add_extra_chain_cert(cert.as_ref().to_owned()));
++        }
++        Ok(self)
++    }
++
++    /// Returns a shared reference to the inner `SslContextBuilder`.
++    pub fn builder(&self) -> &SslContextBuilder {
++        &self.0
++    }
++
++    /// Returns a mutable reference to the inner `SslContextBuilder`.
++    pub fn builder_mut(&mut self) -> &mut SslContextBuilder {
++        &mut self.0
++    }
++
++    /// Consumes the builder, returning a `SslAcceptor`.
++    pub fn build(self) -> SslAcceptor {
++        SslAcceptor(self.0.build())
++    }
++}
++
++#[cfg(ossl101)]
++fn setup_curves(ctx: &mut SslContextBuilder) -> Result<(), ErrorStack> {
++    use ec::EcKey;
++    use nid;
++
++    let curve = try!(EcKey::from_curve_name(nid::X9_62_PRIME256V1));
++    ctx.set_tmp_ecdh(&curve)
++}
++
++#[cfg(ossl102)]
++fn setup_curves(ctx: &mut SslContextBuilder) -> Result<(), ErrorStack> {
++    ctx._set_ecdh_auto(true)
++}
++
++#[cfg(ossl110)]
++fn setup_curves(_: &mut SslContextBuilder) -> Result<(), ErrorStack> {
++    Ok(())
++}
++
++/// A type which wraps server-side streams in a TLS session.
++///
++/// OpenSSL's default configuration is highly insecure. This connector manages the OpenSSL
++/// structures, configuring cipher suites, session options, and more.
++#[derive(Clone)]
++pub struct SslAcceptor(SslContext);
++
++impl SslAcceptor {
++    /// Initiates a server-side TLS session on a stream.
++    pub fn accept<S>(&self, stream: S) -> Result<SslStream<S>, HandshakeError<S>>
++    where
++        S: Read + Write,
++    {
++        let ssl = try!(Ssl::new(&self.0));
++        ssl.accept(stream)
++    }
++}
++
++#[cfg(any(ossl102, ossl110))]
++fn setup_verify(ctx: &mut SslContextBuilder) {
++    ctx.set_verify(SSL_VERIFY_PEER);
++}
++
++#[cfg(ossl101)]
++fn setup_verify(ctx: &mut SslContextBuilder) {
++    ctx.set_verify_callback(SSL_VERIFY_PEER, |p, x509| {
++        let hostname = match x509.ssl() {
++            Ok(Some(ssl)) => ssl.ex_data(*HOSTNAME_IDX),
++            _ => None,
++        };
++        match hostname {
++            Some(hostname) => verify::verify_callback(hostname, p, x509),
++            None => p,
++        }
++    });
++}
++
++#[cfg(any(ossl102, ossl110))]
++fn setup_verify_hostname(ssl: &mut Ssl, domain: &str) -> Result<(), ErrorStack> {
++    let param = ssl._param_mut();
++    param.set_hostflags(::verify::X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
++    param.set_host(domain)
++}
++
++#[cfg(ossl101)]
++fn setup_verify_hostname(ssl: &mut Ssl, domain: &str) -> Result<(), ErrorStack> {
++    let domain = domain.to_string();
++    ssl.set_ex_data(*HOSTNAME_IDX, domain);
++    Ok(())
++}
++
++#[cfg(ossl101)]
++mod verify {
++    use std::net::IpAddr;
++    use std::str;
++
++    use nid;
++    use x509::{X509StoreContextRef, X509Ref, X509NameRef, GeneralName};
++    use stack::Stack;
++
++    pub fn verify_callback(
++        domain: &str,
++        preverify_ok: bool,
++        x509_ctx: &X509StoreContextRef,
++    ) -> bool {
++        if !preverify_ok || x509_ctx.error_depth() != 0 {
++            return preverify_ok;
++        }
++
++        match x509_ctx.current_cert() {
++            Some(x509) => verify_hostname(domain, &x509),
++            None => true,
++        }
++    }
++
++    fn verify_hostname(domain: &str, cert: &X509Ref) -> bool {
++        match cert.subject_alt_names() {
++            Some(names) => verify_subject_alt_names(domain, names),
++            None => verify_subject_name(domain, &cert.subject_name()),
++        }
++    }
++
++    fn verify_subject_alt_names(domain: &str, names: Stack<GeneralName>) -> bool {
++        let ip = domain.parse();
++
++        for name in &names {
++            match ip {
++                Ok(ip) => {
++                    if let Some(actual) = name.ipaddress() {
++                        if matches_ip(&ip, actual) {
++                            return true;
++                        }
++                    }
++                }
++                Err(_) => {
++                    if let Some(pattern) = name.dnsname() {
++                        if matches_dns(pattern, domain, false) {
++                            return true;
++                        }
++                    }
++                }
++            }
++        }
++
++        false
++    }
++
++    fn verify_subject_name(domain: &str, subject_name: &X509NameRef) -> bool {
++        if let Some(pattern) = subject_name.entries_by_nid(nid::COMMONNAME).next() {
++            let pattern = match str::from_utf8(pattern.data().as_slice()) {
++                Ok(pattern) => pattern,
++                Err(_) => return false,
++            };
++
++            // Unlike with SANs, IP addresses in the subject name don't have a
++            // different encoding. We need to pass this down to matches_dns to
++            // disallow wildcard matches with bogus patterns like *.0.0.1
++            let is_ip = domain.parse::<IpAddr>().is_ok();
++
++            if matches_dns(&pattern, domain, is_ip) {
++                return true;
++            }
++        }
++
++        false
++    }
++
++    fn matches_dns(mut pattern: &str, mut hostname: &str, is_ip: bool) -> bool {
++        // first strip trailing . off of pattern and hostname to normalize
++        if pattern.ends_with('.') {
++            pattern = &pattern[..pattern.len() - 1];
++        }
++        if hostname.ends_with('.') {
++            hostname = &hostname[..hostname.len() - 1];
++        }
++
++        matches_wildcard(pattern, hostname, is_ip).unwrap_or_else(|| pattern == hostname)
++    }
++
++    fn matches_wildcard(pattern: &str, hostname: &str, is_ip: bool) -> Option<bool> {
++        // IP addresses and internationalized domains can't involved in wildcards
++        if is_ip || pattern.starts_with("xn--") {
++            return None;
++        }
++
++        let wildcard_location = match pattern.find('*') {
++            Some(l) => l,
++            None => return None,
++        };
++
++        let mut dot_idxs = pattern.match_indices('.').map(|(l, _)| l);
++        let wildcard_end = match dot_idxs.next() {
++            Some(l) => l,
++            None => return None,
++        };
++
++        // Never match wildcards if the pattern has less than 2 '.'s (no *.com)
++        //
++        // This is a bit dubious, as it doesn't disallow other TLDs like *.co.uk.
++        // Chrome has a black- and white-list for this, but Firefox (via NSS) does
++        // the same thing we do here.
++        //
++        // The Public Suffix (https://www.publicsuffix.org/) list could
++        // potentially be used here, but it's both huge and updated frequently
++        // enough that management would be a PITA.
++        if dot_idxs.next().is_none() {
++            return None;
++        }
++
++        // Wildcards can only be in the first component
++        if wildcard_location > wildcard_end {
++            return None;
++        }
++
++        let hostname_label_end = match hostname.find('.') {
++            Some(l) => l,
++            None => return None,
++        };
++
++        // check that the non-wildcard parts are identical
++        if pattern[wildcard_end..] != hostname[hostname_label_end..] {
++            return Some(false);
++        }
++
++        let wildcard_prefix = &pattern[..wildcard_location];
++        let wildcard_suffix = &pattern[wildcard_location + 1..wildcard_end];
++
++        let hostname_label = &hostname[..hostname_label_end];
++
++        // check the prefix of the first label
++        if !hostname_label.starts_with(wildcard_prefix) {
++            return Some(false);
++        }
++
++        // and the suffix
++        if !hostname_label[wildcard_prefix.len()..].ends_with(wildcard_suffix) {
++            return Some(false);
++        }
++
++        Some(true)
++    }
++
++    fn matches_ip(expected: &IpAddr, actual: &[u8]) -> bool {
++        match (expected, actual.len()) {
++            (&IpAddr::V4(ref addr), 4) => actual == addr.octets(),
++            (&IpAddr::V6(ref addr), 16) => {
++                let segments = [
++                    ((actual[0] as u16) << 8) | actual[1] as u16,
++                    ((actual[2] as u16) << 8) | actual[3] as u16,
++                    ((actual[4] as u16) << 8) | actual[5] as u16,
++                    ((actual[6] as u16) << 8) | actual[7] as u16,
++                    ((actual[8] as u16) << 8) | actual[9] as u16,
++                    ((actual[10] as u16) << 8) | actual[11] as u16,
++                    ((actual[12] as u16) << 8) | actual[13] as u16,
++                    ((actual[14] as u16) << 8) | actual[15] as u16,
++                ];
++                segments == addr.segments()
++            }
++            _ => false,
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..74782d7a399ab72f6a8f33c23471b543c704f4b4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,120 @@@
++use std::any::Any;
++use std::error;
++use std::error::Error as StdError;
++use std::fmt;
++use std::io;
++
++use error::ErrorStack;
++use ssl::MidHandshakeSslStream;
++
++/// An SSL error.
++#[derive(Debug)]
++pub enum Error {
++    /// The SSL session has been closed by the other end
++    ZeroReturn,
++    /// An attempt to read data from the underlying socket returned
++    /// `WouldBlock`. Wait for read readiness and reattempt the operation.
++    WantRead(io::Error),
++    /// An attempt to write data from the underlying socket returned
++    /// `WouldBlock`. Wait for write readiness and reattempt the operation.
++    WantWrite(io::Error),
++    /// The client certificate callback requested to be called again.
++    WantX509Lookup,
++    /// An error reported by the underlying stream.
++    Stream(io::Error),
++    /// An error in the OpenSSL library.
++    Ssl(ErrorStack),
++}
++
++impl fmt::Display for Error {
++    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++        try!(fmt.write_str(self.description()));
++        if let Some(err) = self.cause() {
++            write!(fmt, ": {}", err)
++        } else {
++            Ok(())
++        }
++    }
++}
++
++impl error::Error for Error {
++    fn description(&self) -> &str {
++        match *self {
++            Error::ZeroReturn => "The SSL session was closed by the other end",
++            Error::WantRead(_) => "A read attempt returned a `WouldBlock` error",
++            Error::WantWrite(_) => "A write attempt returned a `WouldBlock` error",
++            Error::WantX509Lookup => "The client certificate callback requested to be called again",
++            Error::Stream(_) => "The underlying stream reported an error",
++            Error::Ssl(_) => "The OpenSSL library reported an error",
++        }
++    }
++
++    fn cause(&self) -> Option<&error::Error> {
++        match *self {
++            Error::WantRead(ref err) => Some(err),
++            Error::WantWrite(ref err) => Some(err),
++            Error::Stream(ref err) => Some(err),
++            Error::Ssl(ref err) => Some(err),
++            _ => None,
++        }
++    }
++}
++
++impl From<ErrorStack> for Error {
++    fn from(e: ErrorStack) -> Error {
++        Error::Ssl(e)
++    }
++}
++
++/// An error or intermediate state after a TLS handshake attempt.
++#[derive(Debug)]
++pub enum HandshakeError<S> {
++    /// Setup failed.
++    SetupFailure(ErrorStack),
++    /// The handshake failed.
++    Failure(MidHandshakeSslStream<S>),
++    /// The handshake was interrupted midway through. This error will never be returned for blocking streams.
++    // FIXME change to WouldBlock
++    Interrupted(MidHandshakeSslStream<S>),
++}
++
++impl<S: Any + fmt::Debug> StdError for HandshakeError<S> {
++    fn description(&self) -> &str {
++        match *self {
++            HandshakeError::SetupFailure(_) => "stream setup failed",
++            HandshakeError::Failure(_) => "the handshake failed",
++            HandshakeError::Interrupted(_) => "the handshake was interrupted",
++        }
++    }
++
++    fn cause(&self) -> Option<&StdError> {
++        match *self {
++            HandshakeError::SetupFailure(ref e) => Some(e),
++            HandshakeError::Failure(ref s) |
++            HandshakeError::Interrupted(ref s) => Some(s.error()),
++        }
++    }
++}
++
++impl<S: Any + fmt::Debug> fmt::Display for HandshakeError<S> {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        try!(f.write_str(StdError::description(self)));
++        match *self {
++            HandshakeError::SetupFailure(ref e) => try!(write!(f, ": {}", e)),
++            HandshakeError::Failure(ref s) |
++            HandshakeError::Interrupted(ref s) => {
++                try!(write!(f, ": {}", s.error()));
++                if let Some(err) = s.ssl().verify_result() {
++                    try!(write!(f, ": {}", err));
++                }
++            }
++        }
++        Ok(())
++    }
++}
++
++impl<S> From<ErrorStack> for HandshakeError<S> {
++    fn from(e: ErrorStack) -> HandshakeError<S> {
++        HandshakeError::SetupFailure(e)
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9e17ae60c9ce00f895b144b9a54f1e1148eddb12
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2008 @@@
++//! SSL/TLS support.
++//!
++//! `SslConnector` and `SslAcceptor` should be used in most cases - they handle
++//! configuration of the OpenSSL primitives for you.
++//!
++//! # Examples
++//!
++//! To connect as a client to a remote server:
++//!
++//! ```
++//! use openssl::ssl::{SslMethod, SslConnectorBuilder};
++//! use std::io::{Read, Write};
++//! use std::net::TcpStream;
++//!
++//! let connector = SslConnectorBuilder::new(SslMethod::tls()).unwrap().build();
++//!
++//! let stream = TcpStream::connect("google.com:443").unwrap();
++//! let mut stream = connector.connect("google.com", stream).unwrap();
++//!
++//! stream.write_all(b"GET / HTTP/1.0\r\n\r\n").unwrap();
++//! let mut res = vec![];
++//! stream.read_to_end(&mut res).unwrap();
++//! println!("{}", String::from_utf8_lossy(&res));
++//! ```
++//!
++//! To accept connections as a server from remote clients:
++//!
++//! ```no_run
++//! use openssl::pkcs12::Pkcs12;
++//! use openssl::ssl::{SslMethod, SslAcceptorBuilder, SslStream};
++//! use std::fs::File;
++//! use std::io::{Read, Write};
++//! use std::net::{TcpListener, TcpStream};
++//! use std::sync::Arc;
++//! use std::thread;
++//!
++//! // In this example we retrieve our keypair and certificate chain from a PKCS #12 archive,
++//! // but but they can also be retrieved from, for example, individual PEM- or DER-formatted
++//! // files. See the documentation for the `PKey` and `X509` types for more details.
++//! let mut file = File::open("identity.pfx").unwrap();
++//! let mut pkcs12 = vec![];
++//! file.read_to_end(&mut pkcs12).unwrap();
++//! let pkcs12 = Pkcs12::from_der(&pkcs12).unwrap();
++//! let identity = pkcs12.parse("password123").unwrap();
++//!
++//! let acceptor = SslAcceptorBuilder::mozilla_intermediate(SslMethod::tls(),
++//!                                                         &identity.pkey,
++//!                                                         &identity.cert,
++//!                                                         &identity.chain)
++//!     .unwrap()
++//!     .build();
++//! let acceptor = Arc::new(acceptor);
++//!
++//! let listener = TcpListener::bind("0.0.0.0:8443").unwrap();
++//!
++//! fn handle_client(stream: SslStream<TcpStream>) {
++//!     // ...
++//! }
++//!
++//! for stream in listener.incoming() {
++//!     match stream {
++//!         Ok(stream) => {
++//!             let acceptor = acceptor.clone();
++//!             thread::spawn(move || {
++//!                 let stream = acceptor.accept(stream).unwrap();
++//!                 handle_client(stream);
++//!             });
++//!         }
++//!         Err(e) => { /* connection failed */ }
++//!     }
++//! }
++//! ```
++use ffi;
++use foreign_types::{ForeignType, ForeignTypeRef, Opaque};
++use libc::{c_int, c_void, c_long, c_ulong};
++use libc::{c_uchar, c_uint};
++use std::any::Any;
++use std::any::TypeId;
++use std::borrow::Borrow;
++use std::cmp;
++use std::collections::HashMap;
++use std::ffi::{CStr, CString};
++use std::fmt;
++use std::io;
++use std::io::prelude::*;
++use std::marker::PhantomData;
++use std::mem;
++use std::ops::{Deref, DerefMut};
++use std::panic::resume_unwind;
++use std::path::Path;
++use std::ptr;
++use std::slice;
++use std::str;
++use std::sync::Mutex;
++
++use {init, cvt, cvt_p, cvt_n};
++use dh::{Dh, DhRef};
++use ec::EcKeyRef;
++#[cfg(any(all(feature = "v101", ossl101), all(feature = "v102", ossl102)))]
++use ec::EcKey;
++use x509::{X509StoreContextRef, X509FileType, X509, X509Ref, X509VerifyError, X509Name};
++use x509::store::{X509StoreBuilderRef, X509StoreRef};
++#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++use x509::store::X509Store;
++#[cfg(any(ossl102, ossl110))]
++use verify::X509VerifyParamRef;
++use pkey::PKeyRef;
++use error::ErrorStack;
++use ex_data::Index;
++use stack::{Stack, StackRef};
++use ssl::bio::BioMethod;
++use ssl::callbacks::*;
++
++pub use ssl::connector::{SslConnectorBuilder, SslConnector, SslAcceptorBuilder, SslAcceptor,
++                         ConnectConfiguration};
++pub use ssl::error::{Error, HandshakeError};
++
++mod error;
++mod callbacks;
++mod connector;
++mod bio;
++#[cfg(test)]
++mod tests;
++
++// FIXME drop SSL_ prefix
++// FIXME remvove flags not used in OpenSSL 1.1
++bitflags! {
++    pub struct SslOption: c_ulong {
++        const SSL_OP_MICROSOFT_SESS_ID_BUG = ffi::SSL_OP_MICROSOFT_SESS_ID_BUG;
++        const SSL_OP_NETSCAPE_CHALLENGE_BUG = ffi::SSL_OP_NETSCAPE_CHALLENGE_BUG;
++        const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG =
++            ffi::SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG;
++        const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER = ffi::SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER;
++        const SSL_OP_SSLEAY_080_CLIENT_DH_BUG = ffi::SSL_OP_SSLEAY_080_CLIENT_DH_BUG;
++        const SSL_OP_TLS_D5_BUG = ffi::SSL_OP_TLS_D5_BUG;
++        const SSL_OP_TLS_BLOCK_PADDING_BUG = ffi::SSL_OP_TLS_BLOCK_PADDING_BUG;
++        const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS = ffi::SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
++        const SSL_OP_ALL = ffi::SSL_OP_ALL;
++        const SSL_OP_NO_QUERY_MTU = ffi::SSL_OP_NO_QUERY_MTU;
++        const SSL_OP_COOKIE_EXCHANGE = ffi::SSL_OP_COOKIE_EXCHANGE;
++        const SSL_OP_NO_TICKET = ffi::SSL_OP_NO_TICKET;
++        const SSL_OP_CISCO_ANYCONNECT = ffi::SSL_OP_CISCO_ANYCONNECT;
++        const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION =
++            ffi::SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION;
++        const SSL_OP_NO_COMPRESSION = ffi::SSL_OP_NO_COMPRESSION;
++        const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION =
++            ffi::SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION;
++        const SSL_OP_SINGLE_ECDH_USE = ffi::SSL_OP_SINGLE_ECDH_USE;
++        const SSL_OP_SINGLE_DH_USE = ffi::SSL_OP_SINGLE_DH_USE;
++        const SSL_OP_CIPHER_SERVER_PREFERENCE = ffi::SSL_OP_CIPHER_SERVER_PREFERENCE;
++        const SSL_OP_TLS_ROLLBACK_BUG = ffi::SSL_OP_TLS_ROLLBACK_BUG;
++        const SSL_OP_NO_SSLV2 = ffi::SSL_OP_NO_SSLv2;
++        const SSL_OP_NO_SSLV3 = ffi::SSL_OP_NO_SSLv3;
++        const SSL_OP_NO_TLSV1 = ffi::SSL_OP_NO_TLSv1;
++        const SSL_OP_NO_TLSV1_2 = ffi::SSL_OP_NO_TLSv1_2;
++        const SSL_OP_NO_TLSV1_1 = ffi::SSL_OP_NO_TLSv1_1;
++        /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
++        #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++        const SSL_OP_NO_DTLSV1 = ffi::SSL_OP_NO_DTLSv1;
++        /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
++        #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++        const SSL_OP_NO_DTLSV1_2 = ffi::SSL_OP_NO_DTLSv1_2;
++        /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
++        #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++        const SSL_OP_NO_SSL_MASK = ffi::SSL_OP_NO_SSL_MASK;
++    }
++}
++
++bitflags! {
++    pub struct SslMode: c_long {
++        const SSL_MODE_ENABLE_PARTIAL_WRITE = ffi::SSL_MODE_ENABLE_PARTIAL_WRITE;
++        const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER = ffi::SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER;
++        const SSL_MODE_AUTO_RETRY = ffi::SSL_MODE_AUTO_RETRY;
++        const SSL_MODE_NO_AUTO_CHAIN = ffi::SSL_MODE_NO_AUTO_CHAIN;
++        const SSL_MODE_RELEASE_BUFFERS = ffi::SSL_MODE_RELEASE_BUFFERS;
++        #[cfg(not(libressl))]
++        const SSL_MODE_SEND_CLIENTHELLO_TIME = ffi::SSL_MODE_SEND_CLIENTHELLO_TIME;
++        #[cfg(not(libressl))]
++        const SSL_MODE_SEND_SERVERHELLO_TIME = ffi::SSL_MODE_SEND_SERVERHELLO_TIME;
++        #[cfg(not(libressl))]
++        const SSL_MODE_SEND_FALLBACK_SCSV = ffi::SSL_MODE_SEND_FALLBACK_SCSV;
++    }
++}
++
++#[derive(Copy, Clone)]
++pub struct SslMethod(*const ffi::SSL_METHOD);
++
++impl SslMethod {
++    /// Support all versions of the TLS protocol.
++    ///
++    /// This corresponds to `TLS_method` on OpenSSL 1.1.0 and `SSLv23_method`
++    /// on OpenSSL 1.0.x.
++    pub fn tls() -> SslMethod {
++        SslMethod(compat::tls_method())
++    }
++
++    /// Support all versions of the DTLS protocol.
++    ///
++    /// This corresponds to `DTLS_method` on OpenSSL 1.1.0 and `DTLSv1_method`
++    /// on OpenSSL 1.0.x.
++    pub fn dtls() -> SslMethod {
++        SslMethod(compat::dtls_method())
++    }
++
++    pub unsafe fn from_ptr(ptr: *const ffi::SSL_METHOD) -> SslMethod {
++        SslMethod(ptr)
++    }
++
++    pub fn as_ptr(&self) -> *const ffi::SSL_METHOD {
++        self.0
++    }
++}
++
++/// Determines the type of certificate verification used
++bitflags! {
++    pub struct SslVerifyMode: i32 {
++        /// Verify that the server's certificate is trusted
++        const SSL_VERIFY_PEER = ::ffi::SSL_VERIFY_PEER;
++        /// Do not verify the server's certificate
++        const SSL_VERIFY_NONE = ::ffi::SSL_VERIFY_NONE;
++        /// Terminate handshake if client did not return a certificate.
++        /// Use together with SSL_VERIFY_PEER.
++        const SSL_VERIFY_FAIL_IF_NO_PEER_CERT = ::ffi::SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
++    }
++}
++
++#[derive(Copy, Clone)]
++pub struct StatusType(c_int);
++
++impl StatusType {
++    pub fn from_raw(raw: c_int) -> StatusType {
++        StatusType(raw)
++    }
++
++    pub fn as_raw(&self) -> c_int {
++        self.0
++    }
++}
++
++/// An OSCP status.
++pub const STATUS_TYPE_OCSP: StatusType = StatusType(ffi::TLSEXT_STATUSTYPE_ocsp);
++
++lazy_static! {
++    static ref INDEXES: Mutex<HashMap<TypeId, c_int>> = Mutex::new(HashMap::new());
++    static ref SSL_INDEXES: Mutex<HashMap<TypeId, c_int>> = Mutex::new(HashMap::new());
++}
++
++// Creates a static index for user data of type T
++// Registers a destructor for the data which will be called
++// when context is freed
++fn get_callback_idx<T: Any + 'static>() -> c_int {
++    *INDEXES
++        .lock()
++        .unwrap()
++        .entry(TypeId::of::<T>())
++        .or_insert_with(|| get_new_idx::<T>())
++}
++
++fn get_ssl_callback_idx<T: Any + 'static>() -> c_int {
++    *SSL_INDEXES
++        .lock()
++        .unwrap()
++        .entry(TypeId::of::<T>())
++        .or_insert_with(|| get_new_ssl_idx::<T>())
++}
++
++lazy_static! {
++    static ref NPN_PROTOS_IDX: c_int = get_new_idx::<Vec<u8>>();
++}
++
++#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++lazy_static! {
++    static ref ALPN_PROTOS_IDX: c_int = get_new_idx::<Vec<u8>>();
++}
++
++unsafe extern "C" fn free_data_box<T>(
++    _parent: *mut c_void,
++    ptr: *mut c_void,
++    _ad: *mut ffi::CRYPTO_EX_DATA,
++    _idx: c_int,
++    _argl: c_long,
++    _argp: *mut c_void,
++) {
++    if !ptr.is_null() {
++        Box::<T>::from_raw(ptr as *mut T);
++    }
++}
++
++/// Determine a new index to use for SSL CTX ex data.
++/// Registers a destruct for the data which will be called by openssl when the context is freed.
++fn get_new_idx<T>() -> c_int {
++    unsafe {
++        let idx = compat::get_new_idx(free_data_box::<T>);
++        assert!(idx >= 0);
++        idx
++    }
++}
++
++fn get_new_ssl_idx<T>() -> c_int {
++    unsafe {
++        let idx = compat::get_new_ssl_idx(free_data_box::<T>);
++        assert!(idx >= 0);
++        idx
++    }
++}
++
++/// Convert a set of byte slices into a series of byte strings encoded for SSL. Encoding is a byte
++/// containing the length followed by the string.
++fn ssl_encode_byte_strings(strings: &[&[u8]]) -> Vec<u8> {
++    let mut enc = Vec::new();
++    for string in strings {
++        let len = string.len() as u8;
++        if len as usize != string.len() {
++            // If the item does not fit, discard it
++            continue;
++        }
++        enc.push(len);
++        enc.extend(string[..len as usize].to_vec());
++    }
++    enc
++}
++
++/// An error returned from an SNI callback.
++pub enum SniError {
++    Fatal(c_int),
++    Warning(c_int),
++    NoAck,
++}
++
++/// A builder for `SslContext`s.
++pub struct SslContextBuilder(*mut ffi::SSL_CTX);
++
++unsafe impl Sync for SslContextBuilder {}
++unsafe impl Send for SslContextBuilder {}
++
++impl Drop for SslContextBuilder {
++    fn drop(&mut self) {
++        unsafe { ffi::SSL_CTX_free(self.as_ptr()) }
++    }
++}
++
++impl SslContextBuilder {
++    pub fn new(method: SslMethod) -> Result<SslContextBuilder, ErrorStack> {
++        unsafe {
++            init();
++            let ctx = try!(cvt_p(ffi::SSL_CTX_new(method.as_ptr())));
++
++            Ok(SslContextBuilder::from_ptr(ctx))
++        }
++    }
++
++    pub unsafe fn from_ptr(ctx: *mut ffi::SSL_CTX) -> SslContextBuilder {
++        SslContextBuilder(ctx)
++    }
++
++    pub fn as_ptr(&self) -> *mut ffi::SSL_CTX {
++        self.0
++    }
++
++    /// Configures the certificate verification method for new connections.
++    pub fn set_verify(&mut self, mode: SslVerifyMode) {
++        unsafe {
++            ffi::SSL_CTX_set_verify(self.as_ptr(), mode.bits as c_int, None);
++        }
++    }
++
++    /// Configures the certificate verification method for new connections and
++    /// registers a verification callback.
++    pub fn set_verify_callback<F>(&mut self, mode: SslVerifyMode, verify: F)
++    where
++        F: Fn(bool, &X509StoreContextRef) -> bool + Any + 'static + Sync + Send,
++    {
++        unsafe {
++            let verify = Box::new(verify);
++            ffi::SSL_CTX_set_ex_data(
++                self.as_ptr(),
++                get_callback_idx::<F>(),
++                mem::transmute(verify),
++            );
++            ffi::SSL_CTX_set_verify(self.as_ptr(), mode.bits as c_int, Some(raw_verify::<F>));
++        }
++    }
++
++    /// Configures the server name indication (SNI) callback for new connections
++    ///
++    /// Obtain the server name with `servername` then set the corresponding context
++    /// with `set_ssl_context`
++    pub fn set_servername_callback<F>(&mut self, callback: F)
++    where
++        F: Fn(&mut SslRef) -> Result<(), SniError> + Any + 'static + Sync + Send,
++    {
++        unsafe {
++            let callback = Box::new(callback);
++            ffi::SSL_CTX_set_ex_data(
++                self.as_ptr(),
++                get_callback_idx::<F>(),
++                mem::transmute(callback),
++            );
++            let f: extern "C" fn(_, _, _) -> _ = raw_sni::<F>;
++            let f: extern "C" fn() = mem::transmute(f);
++            ffi::SSL_CTX_set_tlsext_servername_callback(self.as_ptr(), Some(f));
++        }
++    }
++
++    /// Sets verification depth
++    pub fn set_verify_depth(&mut self, depth: u32) {
++        unsafe {
++            ffi::SSL_CTX_set_verify_depth(self.as_ptr(), depth as c_int);
++        }
++    }
++
++    /// Sets a custom X509Store for verifying peer certificates.
++    ///
++    /// Requires the `v102` feature and OpenSSL 1.0.2, or the `v110` feature and OpenSSL 1.1.0.
++    #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++    pub fn set_verify_cert_store(&mut self, cert_store: X509Store) -> Result<(), ErrorStack> {
++        unsafe {
++            let ptr = cert_store.as_ptr();
++            try!(cvt(
++                ffi::SSL_CTX_set0_verify_cert_store(self.as_ptr(), ptr) as
++                    c_int,
++            ));
++            mem::forget(cert_store);
++
++            Ok(())
++        }
++    }
++
++    pub fn set_read_ahead(&mut self, read_ahead: bool) {
++        unsafe {
++            ffi::SSL_CTX_set_read_ahead(self.as_ptr(), read_ahead as c_long);
++        }
++    }
++
++    pub fn set_mode(&mut self, mode: SslMode) -> SslMode {
++        unsafe {
++            let mode = ffi::SSL_CTX_set_mode(self.as_ptr(), mode.bits());
++            SslMode::from_bits(mode).unwrap()
++        }
++    }
++
++    pub fn set_tmp_dh(&mut self, dh: &DhRef) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::SSL_CTX_set_tmp_dh(self.as_ptr(), dh.as_ptr()) as c_int).map(|_| ()) }
++    }
++
++    pub fn set_tmp_dh_callback<F>(&mut self, callback: F)
++    where
++        F: Fn(&mut SslRef, bool, u32) -> Result<Dh, ErrorStack> + Any + 'static + Sync + Send,
++    {
++        unsafe {
++            let callback = Box::new(callback);
++            ffi::SSL_CTX_set_ex_data(
++                self.as_ptr(),
++                get_callback_idx::<F>(),
++                Box::into_raw(callback) as *mut c_void,
++            );
++            let f: unsafe extern "C" fn(_, _, _) -> _ = raw_tmp_dh::<F>;
++            ffi::SSL_CTX_set_tmp_dh_callback(self.as_ptr(), f);
++        }
++    }
++
++    pub fn set_tmp_ecdh(&mut self, key: &EcKeyRef) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::SSL_CTX_set_tmp_ecdh(self.as_ptr(), key.as_ptr()) as
++                c_int).map(|_| ())
++        }
++    }
++
++    /// Requires the `v101` feature and OpenSSL 1.0.1, or the `v102` feature and OpenSSL 1.0.2.
++    #[cfg(any(all(feature = "v101", ossl101), all(feature = "v102", ossl102)))]
++    pub fn set_tmp_ecdh_callback<F>(&mut self, callback: F)
++    where
++        F: Fn(&mut SslRef, bool, u32) -> Result<EcKey, ErrorStack> + Any + 'static + Sync + Send,
++    {
++        unsafe {
++            let callback = Box::new(callback);
++            ffi::SSL_CTX_set_ex_data(
++                self.as_ptr(),
++                get_callback_idx::<F>(),
++                Box::into_raw(callback) as *mut c_void,
++            );
++            let f: unsafe extern "C" fn(_, _, _) -> _ = raw_tmp_ecdh::<F>;
++            ffi::SSL_CTX_set_tmp_ecdh_callback(self.as_ptr(), f);
++        }
++    }
++
++    /// Use the default locations of trusted certificates for verification.
++    ///
++    /// These locations are read from the `SSL_CERT_FILE` and `SSL_CERT_DIR`
++    /// environment variables if present, or defaults specified at OpenSSL
++    /// build time otherwise.
++    pub fn set_default_verify_paths(&mut self) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::SSL_CTX_set_default_verify_paths(self.as_ptr())).map(|_| ()) }
++    }
++
++    /// Specifies the file that contains trusted CA certificates.
++    pub fn set_ca_file<P: AsRef<Path>>(&mut self, file: P) -> Result<(), ErrorStack> {
++        let file = CString::new(file.as_ref().as_os_str().to_str().unwrap()).unwrap();
++        unsafe {
++            cvt(ffi::SSL_CTX_load_verify_locations(
++                self.as_ptr(),
++                file.as_ptr() as *const _,
++                ptr::null(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Sets the list of CAs sent to the client.
++    ///
++    /// The CA certificates must still be added to the trust root.
++    pub fn set_client_ca_list(&mut self, list: Stack<X509Name>) {
++        unsafe {
++            ffi::SSL_CTX_set_client_CA_list(self.as_ptr(), list.as_ptr());
++            mem::forget(list);
++        }
++    }
++
++    /// Set the context identifier for sessions
++    ///
++    /// This value identifies the server's session cache to clients, telling them when they're
++    /// able to reuse sessions. Should be set to a unique value per server, unless multiple servers
++    /// share a session cache.
++    ///
++    /// This value should be set when using client certificates, or each request will fail
++    /// handshake and need to be restarted.
++    pub fn set_session_id_context(&mut self, sid_ctx: &[u8]) -> Result<(), ErrorStack> {
++        unsafe {
++            assert!(sid_ctx.len() <= c_uint::max_value() as usize);
++            cvt(ffi::SSL_CTX_set_session_id_context(
++                self.as_ptr(),
++                sid_ctx.as_ptr(),
++                sid_ctx.len() as c_uint,
++            )).map(|_| ())
++        }
++    }
++
++    /// Loads a certificate from a file.
++    pub fn set_certificate_file<P: AsRef<Path>>(
++        &mut self,
++        file: P,
++        file_type: X509FileType,
++    ) -> Result<(), ErrorStack> {
++        let file = CString::new(file.as_ref().as_os_str().to_str().unwrap()).unwrap();
++        unsafe {
++            cvt(ffi::SSL_CTX_use_certificate_file(
++                self.as_ptr(),
++                file.as_ptr() as *const _,
++                file_type.as_raw(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Loads a certificate chain from a file.
++    ///
++    /// The file should contain a sequence of PEM-formatted certificates, the first being the leaf
++    /// certificate, and the remainder forming the chain of certificates up to and including the
++    /// trusted root certificate.
++    pub fn set_certificate_chain_file<P: AsRef<Path>>(
++        &mut self,
++        file: P,
++    ) -> Result<(), ErrorStack> {
++        let file = CString::new(file.as_ref().as_os_str().to_str().unwrap()).unwrap();
++        unsafe {
++            cvt(ffi::SSL_CTX_use_certificate_chain_file(
++                self.as_ptr(),
++                file.as_ptr() as *const _,
++            )).map(|_| ())
++        }
++    }
++
++    /// Sets the certificate.
++    pub fn set_certificate(&mut self, cert: &X509Ref) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::SSL_CTX_use_certificate(self.as_ptr(), cert.as_ptr())).map(|_| ()) }
++    }
++
++    /// Appends a certificate to the certificate chain.
++    ///
++    /// This chain should contain all certificates necessary to go from the certificate specified by
++    /// `set_certificate` to a trusted root.
++    pub fn add_extra_chain_cert(&mut self, cert: X509) -> Result<(), ErrorStack> {
++        unsafe {
++            try!(cvt(ffi::SSL_CTX_add_extra_chain_cert(
++                self.as_ptr(),
++                cert.as_ptr(),
++            ) as c_int));
++            mem::forget(cert);
++            Ok(())
++        }
++    }
++
++    /// Loads the private key from a file.
++    pub fn set_private_key_file<P: AsRef<Path>>(
++        &mut self,
++        file: P,
++        file_type: X509FileType,
++    ) -> Result<(), ErrorStack> {
++        let file = CString::new(file.as_ref().as_os_str().to_str().unwrap()).unwrap();
++        unsafe {
++            cvt(ffi::SSL_CTX_use_PrivateKey_file(
++                self.as_ptr(),
++                file.as_ptr() as *const _,
++                file_type.as_raw(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Sets the private key.
++    pub fn set_private_key(&mut self, key: &PKeyRef) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::SSL_CTX_use_PrivateKey(self.as_ptr(), key.as_ptr())).map(|_| ()) }
++    }
++
++    /// Sets the cipher configuration.
++    ///
++    /// See `man 1 ciphers` for details on the format.
++    pub fn set_cipher_list(&mut self, cipher_list: &str) -> Result<(), ErrorStack> {
++        let cipher_list = CString::new(cipher_list).unwrap();
++        unsafe {
++            cvt(ffi::SSL_CTX_set_cipher_list(
++                self.as_ptr(),
++                cipher_list.as_ptr() as *const _,
++            )).map(|_| ())
++        }
++    }
++
++    /// Enables ECDHE key exchange with an automatically chosen curve list.
++    ///
++    /// Requires the `v102` feature and OpenSSL 1.0.2.
++    #[cfg(all(feature = "v102", any(ossl102, libressl)))]
++    pub fn set_ecdh_auto(&mut self, onoff: bool) -> Result<(), ErrorStack> {
++        self._set_ecdh_auto(onoff)
++    }
++
++    #[cfg(any(ossl102, libressl))]
++    fn _set_ecdh_auto(&mut self, onoff: bool) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::SSL_CTX_set_ecdh_auto(self.as_ptr(), onoff as c_int)).map(|_| ()) }
++    }
++
++    pub fn set_options(&mut self, option: SslOption) -> SslOption {
++        let ret = unsafe { compat::SSL_CTX_set_options(self.as_ptr(), option.bits()) };
++        SslOption::from_bits(ret).unwrap()
++    }
++
++    pub fn options(&self) -> SslOption {
++        let ret = unsafe { compat::SSL_CTX_get_options(self.as_ptr()) };
++        SslOption::from_bits(ret).unwrap()
++    }
++
++    pub fn clear_options(&mut self, option: SslOption) -> SslOption {
++        let ret = unsafe { compat::SSL_CTX_clear_options(self.as_ptr(), option.bits()) };
++        SslOption::from_bits(ret).unwrap()
++    }
++
++    /// Set the protocols to be used during Next Protocol Negotiation (the protocols
++    /// supported by the application).
++    pub fn set_npn_protocols(&mut self, protocols: &[&[u8]]) -> Result<(), ErrorStack> {
++        // Firstly, convert the list of protocols to a byte-array that can be passed to OpenSSL
++        // APIs -- a list of length-prefixed strings.
++        let protocols: Box<Vec<u8>> = Box::new(ssl_encode_byte_strings(protocols));
++
++        unsafe {
++            // Attach the protocol list to the OpenSSL context structure,
++            // so that we can refer to it within the callback.
++            try!(cvt(ffi::SSL_CTX_set_ex_data(
++                self.as_ptr(),
++                *NPN_PROTOS_IDX,
++                Box::into_raw(protocols) as *mut c_void,
++            )));
++            // Now register the callback that performs the default protocol
++            // matching based on the client-supported list of protocols that
++            // has been saved.
++            ffi::SSL_CTX_set_next_proto_select_cb(
++                self.as_ptr(),
++                raw_next_proto_select_cb,
++                ptr::null_mut(),
++            );
++            // Also register the callback to advertise these protocols, if a server socket is
++            // created with the context.
++            ffi::SSL_CTX_set_next_protos_advertised_cb(
++                self.as_ptr(),
++                raw_next_protos_advertise_cb,
++                ptr::null_mut(),
++            );
++            Ok(())
++        }
++    }
++
++    /// Set the protocols to be used during ALPN (application layer protocol negotiation).
++    /// If this is a server, these are the protocols we report to the client.
++    /// If this is a client, these are the protocols we try to match with those reported by the
++    /// server.
++    ///
++    /// Note that ordering of the protocols controls the priority with which they are chosen.
++    ///
++    /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
++    #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++    pub fn set_alpn_protocols(&mut self, protocols: &[&[u8]]) -> Result<(), ErrorStack> {
++        let protocols: Box<Vec<u8>> = Box::new(ssl_encode_byte_strings(protocols));
++        unsafe {
++            // Set the context's internal protocol list for use if we are a server
++            let r = ffi::SSL_CTX_set_alpn_protos(
++                self.as_ptr(),
++                protocols.as_ptr(),
++                protocols.len() as c_uint,
++            );
++            // fun fact, SSL_CTX_set_alpn_protos has a reversed return code D:
++            if r != 0 {
++                return Err(ErrorStack::get());
++            }
++
++            // Rather than use the argument to the callback to contain our data, store it in the
++            // ssl ctx's ex_data so that we can configure a function to free it later. In the
++            // future, it might make sense to pull this into our internal struct Ssl instead of
++            // leaning on openssl and using function pointers.
++            try!(cvt(ffi::SSL_CTX_set_ex_data(
++                self.as_ptr(),
++                *ALPN_PROTOS_IDX,
++                Box::into_raw(protocols) as *mut c_void,
++            )));
++
++            // Now register the callback that performs the default protocol
++            // matching based on the client-supported list of protocols that
++            // has been saved.
++            ffi::SSL_CTX_set_alpn_select_cb(self.as_ptr(), raw_alpn_select_cb, ptr::null_mut());
++
++            Ok(())
++        }
++    }
++
++    /// Checks consistency between the private key and certificate.
++    pub fn check_private_key(&self) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::SSL_CTX_check_private_key(self.as_ptr())).map(|_| ()) }
++    }
++
++    /// Returns a shared reference to the context's certificate store.
++    pub fn cert_store(&self) -> &X509StoreBuilderRef {
++        unsafe { X509StoreBuilderRef::from_ptr(ffi::SSL_CTX_get_cert_store(self.as_ptr())) }
++    }
++
++    /// Returns a mutable reference to the context's certificate store.
++    pub fn cert_store_mut(&mut self) -> &mut X509StoreBuilderRef {
++        unsafe { X509StoreBuilderRef::from_ptr_mut(ffi::SSL_CTX_get_cert_store(self.as_ptr())) }
++    }
++
++    /// Sets the callback dealing with OCSP stapling.
++    ///
++    /// On the client side, this callback is responsible for validating the OCSP status response
++    /// returned by the server. The status may be retrieved with the `SslRef::ocsp_status` method.
++    /// A response of `Ok(true)` indicates that the OCSP status is valid, and a response of
++    /// `Ok(false)` indicates that the OCSP status is invalid and the handshake should be
++    /// terminated.
++    ///
++    /// On the server side, this callback is resopnsible for setting the OCSP status response to be
++    /// returned to clients. The status may be set with the `SslRef::set_ocsp_status` method. A
++    /// response of `Ok(true)` indicates that the OCSP status should be returned to the client, and
++    /// `Ok(false)` indicates that the status should not be returned to the client.
++    pub fn set_status_callback<F>(&mut self, callback: F) -> Result<(), ErrorStack>
++    where
++        F: Fn(&mut SslRef) -> Result<bool, ErrorStack> + Any + 'static + Sync + Send,
++    {
++        unsafe {
++            let callback = Box::new(callback);
++            ffi::SSL_CTX_set_ex_data(
++                self.as_ptr(),
++                get_callback_idx::<F>(),
++                Box::into_raw(callback) as *mut c_void,
++            );
++            let f: unsafe extern "C" fn(_, _) -> _ = raw_tlsext_status::<F>;
++            cvt(ffi::SSL_CTX_set_tlsext_status_cb(
++                self.as_ptr(),
++                Some(f),
++            ) as c_int).map(|_| ())
++        }
++    }
++
++    /// Sets the callback for providing an identity and pre-shared key for a TLS-PSK client.
++    ///
++    /// The callback will be called with the SSL context, an identity hint if one was provided
++    /// by the server, a mut slice for each of the identity and pre-shared key bytes. The identity
++    /// must be written as a null-terminated C string.
++    #[cfg(not(osslconf = "OPENSSL_NO_PSK"))]
++    pub fn set_psk_callback<F>(&mut self, callback: F)
++    where
++        F: Fn(&mut SslRef, Option<&[u8]>, &mut [u8], &mut [u8]) -> Result<usize, ErrorStack>
++            + Any
++            + 'static
++            + Sync
++            + Send,
++    {
++        unsafe {
++            let callback = Box::new(callback);
++            ffi::SSL_CTX_set_ex_data(
++                self.as_ptr(),
++                get_callback_idx::<F>(),
++                mem::transmute(callback),
++            );
++            ffi::SSL_CTX_set_psk_client_callback(self.as_ptr(), Some(raw_psk::<F>))
++        }
++    }
++
++    /// Sets the extra data at the specified index.
++    pub fn set_ex_data<T>(&mut self, index: Index<SslContext, T>, data: T) {
++        unsafe {
++            let data = Box::new(data);
++            ffi::SSL_CTX_set_ex_data(
++                self.as_ptr(),
++                index.as_raw(),
++                Box::into_raw(data) as *mut c_void,
++            );
++        }
++    }
++
++    pub fn build(self) -> SslContext {
++        let ctx = SslContext(self.0);
++        mem::forget(self);
++        ctx
++    }
++}
++
++foreign_type! {
++    type CType = ffi::SSL_CTX;
++    fn drop = ffi::SSL_CTX_free;
++
++    pub struct SslContext;
++    pub struct SslContextRef;
++}
++
++unsafe impl Send for SslContext {}
++unsafe impl Sync for SslContext {}
++
++impl Clone for SslContext {
++    fn clone(&self) -> Self {
++        unsafe {
++            compat::SSL_CTX_up_ref(self.as_ptr());
++            SslContext::from_ptr(self.as_ptr())
++        }
++    }
++}
++
++// TODO: add useful info here
++impl fmt::Debug for SslContext {
++    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++        write!(fmt, "SslContext")
++    }
++}
++
++impl SslContext {
++    pub fn builder(method: SslMethod) -> Result<SslContextBuilder, ErrorStack> {
++        SslContextBuilder::new(method)
++    }
++
++    /// Returns a new extra data index.
++    ///
++    /// Each invocation of this function is guaranteed to return a distinct
++    /// index.
++    pub fn new_ex_index<T>() -> Result<Index<SslContext, T>, ErrorStack>
++    where
++        T: 'static + Sync + Send,
++    {
++        unsafe {
++            ffi::init();
++            let idx = try!(cvt_n(compat::get_new_idx(free_data_box::<T>)));
++            Ok(Index::from_raw(idx))
++        }
++    }
++}
++
++impl SslContextRef {
++    /// Returns the certificate associated with this `SslContext`, if present.
++    ///
++    /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
++    #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++    pub fn certificate(&self) -> Option<&X509Ref> {
++        unsafe {
++            let ptr = ffi::SSL_CTX_get0_certificate(self.as_ptr());
++            if ptr.is_null() {
++                None
++            } else {
++                Some(X509Ref::from_ptr(ptr))
++            }
++        }
++    }
++
++    /// Returns the private key associated with this `SslContext`, if present.
++    ///
++    /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
++    #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++    pub fn private_key(&self) -> Option<&PKeyRef> {
++        unsafe {
++            let ptr = ffi::SSL_CTX_get0_privatekey(self.as_ptr());
++            if ptr.is_null() {
++                None
++            } else {
++                Some(PKeyRef::from_ptr(ptr))
++            }
++        }
++    }
++
++    /// Returns the certificate store used for verification.
++    pub fn cert_store(&self) -> &X509StoreRef {
++        unsafe { X509StoreRef::from_ptr(ffi::SSL_CTX_get_cert_store(self.as_ptr())) }
++    }
++
++    pub fn extra_chain_certs(&self) -> &StackRef<X509> {
++        unsafe {
++            let mut chain = ptr::null_mut();
++            ffi::SSL_CTX_get_extra_chain_certs(self.as_ptr(), &mut chain);
++            assert!(!chain.is_null());
++            StackRef::from_ptr(chain)
++        }
++    }
++
++    /// Returns a reference to the extra data at the specified index.
++    pub fn ex_data<T>(&self, index: Index<SslContext, T>) -> Option<&T> {
++        unsafe {
++            let data = ffi::SSL_CTX_get_ex_data(self.as_ptr(), index.as_raw());
++            if data.is_null() {
++                None
++            } else {
++                Some(&*(data as *const T))
++            }
++        }
++    }
++}
++
++pub struct CipherBits {
++    /// The number of secret bits used for the cipher.
++    pub secret: i32,
++
++    /// The number of bits processed by the chosen algorithm.
++    pub algorithm: i32,
++}
++
++pub struct SslCipher(*mut ffi::SSL_CIPHER);
++
++impl ForeignType for SslCipher {
++    type CType = ffi::SSL_CIPHER;
++    type Ref = SslCipherRef;
++
++    #[inline]
++    unsafe fn from_ptr(ptr: *mut ffi::SSL_CIPHER) -> SslCipher {
++        SslCipher(ptr)
++    }
++
++    #[inline]
++    fn as_ptr(&self) -> *mut ffi::SSL_CIPHER {
++        self.0
++    }
++}
++
++impl Deref for SslCipher {
++    type Target = SslCipherRef;
++
++    fn deref(&self) -> &SslCipherRef {
++        unsafe { SslCipherRef::from_ptr(self.0) }
++    }
++}
++
++impl DerefMut for SslCipher {
++    fn deref_mut(&mut self) -> &mut SslCipherRef {
++        unsafe { SslCipherRef::from_ptr_mut(self.0) }
++    }
++}
++
++pub struct SslCipherRef(Opaque);
++
++impl ForeignTypeRef for SslCipherRef {
++    type CType = ffi::SSL_CIPHER;
++}
++
++impl SslCipherRef {
++    /// Returns the name of cipher.
++    pub fn name(&self) -> &str {
++        let name = unsafe {
++            let ptr = ffi::SSL_CIPHER_get_name(self.as_ptr());
++            CStr::from_ptr(ptr as *const _)
++        };
++
++        str::from_utf8(name.to_bytes()).unwrap()
++    }
++
++    /// Returns the SSL/TLS protocol version that first defined the cipher.
++    pub fn version(&self) -> &str {
++        let version = unsafe {
++            let ptr = ffi::SSL_CIPHER_get_version(self.as_ptr());
++            CStr::from_ptr(ptr as *const _)
++        };
++
++        str::from_utf8(version.to_bytes()).unwrap()
++    }
++
++    /// Returns the number of bits used for the cipher.
++    pub fn bits(&self) -> CipherBits {
++        unsafe {
++            let mut algo_bits = 0;
++            let secret_bits = ffi::SSL_CIPHER_get_bits(self.as_ptr(), &mut algo_bits);
++            CipherBits {
++                secret: secret_bits.into(),
++                algorithm: algo_bits.into(),
++            }
++        }
++    }
++
++    /// Returns a textual description of the cipher used
++    pub fn description(&self) -> String {
++        unsafe {
++            // SSL_CIPHER_description requires a buffer of at least 128 bytes.
++            let mut buf = [0; 128];
++            let ptr = ffi::SSL_CIPHER_description(self.as_ptr(), buf.as_mut_ptr(), 128);
++            String::from_utf8(CStr::from_ptr(ptr as *const _).to_bytes().to_vec()).unwrap()
++        }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::SSL_SESSION;
++    fn drop = ffi::SSL_SESSION_free;
++
++    pub struct SslSession;
++    pub struct SslSessionRef;
++}
++
++unsafe impl Sync for SslSession {}
++unsafe impl Send for SslSession {}
++
++impl Clone for SslSession {
++    fn clone(&self) -> SslSession {
++        self.to_owned()
++    }
++}
++
++impl Borrow<SslSessionRef> for SslSession {
++    fn borrow(&self) -> &SslSessionRef {
++        &self
++    }
++}
++
++impl ToOwned for SslSessionRef {
++    type Owned = SslSession;
++
++    fn to_owned(&self) -> SslSession {
++        unsafe {
++            compat::SSL_SESSION_up_ref(self.as_ptr());
++            SslSession(self.as_ptr())
++        }
++    }
++}
++
++impl SslSessionRef {
++    /// Returns the SSL session ID.
++    pub fn id(&self) -> &[u8] {
++        unsafe {
++            let mut len = 0;
++            let p = ffi::SSL_SESSION_get_id(self.as_ptr(), &mut len);
++            slice::from_raw_parts(p as *const u8, len as usize)
++        }
++    }
++
++    /// Returns the length of the master key.
++    pub fn master_key_len(&self) -> usize {
++        unsafe { compat::SSL_SESSION_get_master_key(self.as_ptr(), ptr::null_mut(), 0) }
++    }
++
++    /// Copies the master key into the provided buffer.
++    ///
++    /// Returns the number of bytes written.
++    pub fn master_key(&self, buf: &mut [u8]) -> usize {
++        unsafe { compat::SSL_SESSION_get_master_key(self.as_ptr(), buf.as_mut_ptr(), buf.len()) }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::SSL;
++    fn drop = ffi::SSL_free;
++
++    pub struct Ssl;
++    pub struct SslRef;
++}
++
++impl Ssl {
++    /// Returns a new extra data index.
++    ///
++    /// Each invocation of this function is guaranteed to return a distinct
++    /// index.
++    pub fn new_ex_index<T>() -> Result<Index<Ssl, T>, ErrorStack>
++    where
++        T: 'static + Sync + Send,
++    {
++        unsafe {
++            ffi::init();
++            let idx = try!(cvt_n(compat::get_new_ssl_idx(free_data_box::<T>)));
++            Ok(Index::from_raw(idx))
++        }
++    }
++}
++
++impl fmt::Debug for SslRef {
++    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++        let mut builder = fmt.debug_struct("Ssl");
++        builder.field("state", &self.state_string_long());
++        if let Some(err) = self.verify_result() {
++            builder.field("verify_result", &err);
++        }
++        builder.finish()
++    }
++}
++
++impl SslRef {
++    fn get_raw_rbio(&self) -> *mut ffi::BIO {
++        unsafe { ffi::SSL_get_rbio(self.as_ptr()) }
++    }
++
++    fn read(&mut self, buf: &mut [u8]) -> c_int {
++        let len = cmp::min(c_int::max_value() as usize, buf.len()) as c_int;
++        unsafe { ffi::SSL_read(self.as_ptr(), buf.as_ptr() as *mut c_void, len) }
++    }
++
++    fn write(&mut self, buf: &[u8]) -> c_int {
++        let len = cmp::min(c_int::max_value() as usize, buf.len()) as c_int;
++        unsafe { ffi::SSL_write(self.as_ptr(), buf.as_ptr() as *const c_void, len) }
++    }
++
++    fn get_error(&self, ret: c_int) -> c_int {
++        unsafe { ffi::SSL_get_error(self.as_ptr(), ret) }
++    }
++
++    /// Sets the verification mode to be used during the handshake process.
++    ///
++    /// Use `set_verify_callback` to additionally add a callback.
++    pub fn set_verify(&mut self, mode: SslVerifyMode) {
++        unsafe { ffi::SSL_set_verify(self.as_ptr(), mode.bits as c_int, None) }
++    }
++
++    /// Sets the certificate verification callback to be used during the
++    /// handshake process.
++    ///
++    /// The callback is provided with a boolean indicating if the
++    /// preveification process was successful, and an object providing access
++    /// to the certificate chain. It should return `true` if the certificate
++    /// chain is valid and `false` otherwise.
++    pub fn set_verify_callback<F>(&mut self, mode: SslVerifyMode, verify: F)
++    where
++        F: Fn(bool, &X509StoreContextRef) -> bool + Any + 'static + Sync + Send,
++    {
++        unsafe {
++            let verify = Box::new(verify);
++            ffi::SSL_set_ex_data(
++                self.as_ptr(),
++                get_ssl_callback_idx::<F>(),
++                mem::transmute(verify),
++            );
++            ffi::SSL_set_verify(self.as_ptr(), mode.bits as c_int, Some(ssl_raw_verify::<F>));
++        }
++    }
++
++    pub fn set_tmp_dh(&mut self, dh: &DhRef) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::SSL_set_tmp_dh(self.as_ptr(), dh.as_ptr()) as c_int).map(|_| ()) }
++    }
++
++    pub fn set_tmp_dh_callback<F>(&mut self, callback: F)
++    where
++        F: Fn(&mut SslRef, bool, u32) -> Result<Dh, ErrorStack> + Any + 'static + Sync + Send,
++    {
++        unsafe {
++            let callback = Box::new(callback);
++            ffi::SSL_set_ex_data(
++                self.as_ptr(),
++                get_ssl_callback_idx::<F>(),
++                Box::into_raw(callback) as *mut c_void,
++            );
++            let f: unsafe extern "C" fn(_, _, _) -> _ = raw_tmp_dh_ssl::<F>;
++            ffi::SSL_set_tmp_dh_callback(self.as_ptr(), f);
++        }
++    }
++
++    pub fn set_tmp_ecdh(&mut self, key: &EcKeyRef) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::SSL_set_tmp_ecdh(self.as_ptr(), key.as_ptr()) as c_int).map(|_| ()) }
++    }
++
++    /// Requires the `v101` feature and OpenSSL 1.0.1, or the `v102` feature and OpenSSL 1.0.2.
++    #[cfg(any(all(feature = "v101", ossl101), all(feature = "v102", ossl102)))]
++    pub fn set_tmp_ecdh_callback<F>(&mut self, callback: F)
++    where
++        F: Fn(&mut SslRef, bool, u32) -> Result<EcKey, ErrorStack> + Any + 'static + Sync + Send,
++    {
++        unsafe {
++            let callback = Box::new(callback);
++            ffi::SSL_set_ex_data(
++                self.as_ptr(),
++                get_ssl_callback_idx::<F>(),
++                Box::into_raw(callback) as *mut c_void,
++            );
++            let f: unsafe extern "C" fn(_, _, _) -> _ = raw_tmp_ecdh_ssl::<F>;
++            ffi::SSL_set_tmp_ecdh_callback(self.as_ptr(), f);
++        }
++    }
++
++    /// If `onoff` is set to `true`, enable ECDHE for key exchange with
++    /// compatible clients, and automatically select an appropriate elliptic
++    /// curve.
++    ///
++    /// Requires the `v102` feature and OpenSSL 1.0.2.
++    #[cfg(all(feature = "v102", ossl102))]
++    pub fn set_ecdh_auto(&mut self, onoff: bool) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::SSL_set_ecdh_auto(self.as_ptr(), onoff as c_int)).map(|_| ()) }
++    }
++
++    pub fn current_cipher(&self) -> Option<&SslCipherRef> {
++        unsafe {
++            let ptr = ffi::SSL_get_current_cipher(self.as_ptr());
++
++            if ptr.is_null() {
++                None
++            } else {
++                Some(SslCipherRef::from_ptr(ptr as *mut _))
++            }
++        }
++    }
++
++    pub fn state_string(&self) -> &'static str {
++        let state = unsafe {
++            let ptr = ffi::SSL_state_string(self.as_ptr());
++            CStr::from_ptr(ptr as *const _)
++        };
++
++        str::from_utf8(state.to_bytes()).unwrap()
++    }
++
++    pub fn state_string_long(&self) -> &'static str {
++        let state = unsafe {
++            let ptr = ffi::SSL_state_string_long(self.as_ptr());
++            CStr::from_ptr(ptr as *const _)
++        };
++
++        str::from_utf8(state.to_bytes()).unwrap()
++    }
++
++    /// Sets the host name to be used with SNI (Server Name Indication).
++    pub fn set_hostname(&mut self, hostname: &str) -> Result<(), ErrorStack> {
++        let cstr = CString::new(hostname).unwrap();
++        unsafe {
++            cvt(ffi::SSL_set_tlsext_host_name(
++                self.as_ptr(),
++                cstr.as_ptr() as *mut _,
++            ) as c_int).map(|_| ())
++        }
++    }
++
++    /// Returns the certificate of the peer, if present.
++    pub fn peer_certificate(&self) -> Option<X509> {
++        unsafe {
++            let ptr = ffi::SSL_get_peer_certificate(self.as_ptr());
++            if ptr.is_null() {
++                None
++            } else {
++                Some(X509::from_ptr(ptr))
++            }
++        }
++    }
++
++    /// Returns the certificate associated with this `Ssl`, if present.
++    pub fn certificate(&self) -> Option<&X509Ref> {
++        unsafe {
++            let ptr = ffi::SSL_get_certificate(self.as_ptr());
++            if ptr.is_null() {
++                None
++            } else {
++                Some(X509Ref::from_ptr(ptr))
++            }
++        }
++    }
++
++    /// Returns the private key associated with this `Ssl`, if present.
++    pub fn private_key(&self) -> Option<&PKeyRef> {
++        unsafe {
++            let ptr = ffi::SSL_get_privatekey(self.as_ptr());
++            if ptr.is_null() {
++                None
++            } else {
++                Some(PKeyRef::from_ptr(ptr))
++            }
++        }
++    }
++
++    /// Returns the name of the protocol used for the connection, e.g. "TLSv1.2", "SSLv3", etc.
++    pub fn version(&self) -> &'static str {
++        let version = unsafe {
++            let ptr = ffi::SSL_get_version(self.as_ptr());
++            CStr::from_ptr(ptr as *const _)
++        };
++
++        str::from_utf8(version.to_bytes()).unwrap()
++    }
++
++    /// Returns the protocol selected by performing Next Protocol Negotiation, if any.
++    ///
++    /// The protocol's name is returned is an opaque sequence of bytes. It is up to the client
++    /// to interpret it.
++    pub fn selected_npn_protocol(&self) -> Option<&[u8]> {
++        unsafe {
++            let mut data: *const c_uchar = ptr::null();
++            let mut len: c_uint = 0;
++            // Get the negotiated protocol from the SSL instance.
++            // `data` will point at a `c_uchar` array; `len` will contain the length of this array.
++            ffi::SSL_get0_next_proto_negotiated(self.as_ptr(), &mut data, &mut len);
++
++            if data.is_null() {
++                None
++            } else {
++                Some(slice::from_raw_parts(data, len as usize))
++            }
++        }
++    }
++
++    /// Returns the protocol selected by performing ALPN, if any.
++    ///
++    /// The protocol's name is returned is an opaque sequence of bytes. It is up to the client
++    /// to interpret it.
++    ///
++    /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
++    #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++    pub fn selected_alpn_protocol(&self) -> Option<&[u8]> {
++        unsafe {
++            let mut data: *const c_uchar = ptr::null();
++            let mut len: c_uint = 0;
++            // Get the negotiated protocol from the SSL instance.
++            // `data` will point at a `c_uchar` array; `len` will contain the length of this array.
++            ffi::SSL_get0_alpn_selected(self.as_ptr(), &mut data, &mut len);
++
++            if data.is_null() {
++                None
++            } else {
++                Some(slice::from_raw_parts(data, len as usize))
++            }
++        }
++    }
++
++    /// Returns the number of bytes remaining in the currently processed TLS
++    /// record.
++    pub fn pending(&self) -> usize {
++        unsafe { ffi::SSL_pending(self.as_ptr()) as usize }
++    }
++
++    /// Returns the compression currently in use.
++    ///
++    /// The result will be either None, indicating no compression is in use, or
++    /// a string with the compression name.
++    pub fn compression(&self) -> Option<&str> {
++        self._compression()
++    }
++
++    #[cfg(not(osslconf = "OPENSSL_NO_COMP"))]
++    fn _compression(&self) -> Option<&str> {
++        unsafe {
++            let ptr = ffi::SSL_get_current_compression(self.as_ptr());
++            if ptr == ptr::null() {
++                return None;
++            }
++            let meth = ffi::SSL_COMP_get_name(ptr);
++            Some(
++                str::from_utf8(CStr::from_ptr(meth as *const _).to_bytes()).unwrap(),
++            )
++        }
++    }
++
++    #[cfg(osslconf = "OPENSSL_NO_COMP")]
++    fn _compression(&self) -> Option<&str> {
++        None
++    }
++
++    /// Returns the server's name for the current connection
++    pub fn servername(&self) -> Option<&str> {
++        unsafe {
++            let name = ffi::SSL_get_servername(self.as_ptr(), ffi::TLSEXT_NAMETYPE_host_name);
++            if name == ptr::null() {
++                return None;
++            }
++
++            Some(
++                str::from_utf8(CStr::from_ptr(name as *const _).to_bytes()).unwrap(),
++            )
++        }
++    }
++
++    /// Changes the context corresponding to the current connection.
++    pub fn set_ssl_context(&mut self, ctx: &SslContextRef) -> Result<(), ErrorStack> {
++        unsafe { cvt_p(ffi::SSL_set_SSL_CTX(self.as_ptr(), ctx.as_ptr())).map(|_| ()) }
++    }
++
++    /// Returns the context corresponding to the current connection
++    pub fn ssl_context(&self) -> &SslContextRef {
++        unsafe {
++            let ssl_ctx = ffi::SSL_get_SSL_CTX(self.as_ptr());
++            SslContextRef::from_ptr(ssl_ctx)
++        }
++    }
++
++    /// Returns the X509 verification configuration.
++    ///
++    /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or 1.1.0.
++    #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++    pub fn param_mut(&mut self) -> &mut X509VerifyParamRef {
++        self._param_mut()
++    }
++
++    #[cfg(any(ossl102, ossl110))]
++    fn _param_mut(&mut self) -> &mut X509VerifyParamRef {
++        unsafe { X509VerifyParamRef::from_ptr_mut(ffi::SSL_get0_param(self.as_ptr())) }
++    }
++
++    /// Returns the result of X509 certificate verification.
++    pub fn verify_result(&self) -> Option<X509VerifyError> {
++        unsafe { X509VerifyError::from_raw(ffi::SSL_get_verify_result(self.as_ptr())) }
++    }
++
++    /// Returns the SSL session.
++    pub fn session(&self) -> Option<&SslSessionRef> {
++        unsafe {
++            let p = ffi::SSL_get_session(self.as_ptr());
++            if p.is_null() {
++                None
++            } else {
++                Some(SslSessionRef::from_ptr(p))
++            }
++        }
++    }
++
++    /// Sets the session to be used.
++    ///
++    /// # Safety
++    ///
++    /// The caller of this method is responsible for ensuring that the session is associated
++    /// with the same `SslContext` as this `Ssl`.
++    pub unsafe fn set_session(&mut self, session: &SslSessionRef) -> Result<(), ErrorStack> {
++        cvt(ffi::SSL_set_session(self.as_ptr(), session.as_ptr())).map(|_| ())
++    }
++
++    /// Determines if the session provided to `set_session` was successfully reused.
++    pub fn session_reused(&self) -> bool {
++        unsafe { ffi::SSL_session_reused(self.as_ptr()) != 0 }
++    }
++
++    /// Sets the status response a client wishes the server to reply with.
++    pub fn set_status_type(&mut self, type_: StatusType) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::SSL_set_tlsext_status_type(
++                self.as_ptr(),
++                type_.as_raw(),
++            ) as c_int).map(|_| ())
++        }
++    }
++
++    /// Returns the server's OCSP response, if present.
++    pub fn ocsp_status(&self) -> Option<&[u8]> {
++        unsafe {
++            let mut p = ptr::null_mut();
++            let len = ffi::SSL_get_tlsext_status_ocsp_resp(self.as_ptr(), &mut p);
++
++            if len < 0 {
++                None
++            } else {
++                Some(slice::from_raw_parts(p as *const u8, len as usize))
++            }
++        }
++    }
++
++    /// Sets the OCSP response to be returned to the client.
++    pub fn set_ocsp_status(&mut self, response: &[u8]) -> Result<(), ErrorStack> {
++        unsafe {
++            assert!(response.len() <= c_int::max_value() as usize);
++            let p = try!(cvt_p(ffi::CRYPTO_malloc(
++                response.len() as _,
++                concat!(file!(), "\0").as_ptr() as *const _,
++                line!() as c_int,
++            )));
++            ptr::copy_nonoverlapping(response.as_ptr(), p as *mut u8, response.len());
++            cvt(ffi::SSL_set_tlsext_status_ocsp_resp(
++                self.as_ptr(),
++                p as *mut c_uchar,
++                response.len() as c_long,
++            ) as c_int).map(|_| ())
++        }
++    }
++
++    /// Determines if this `Ssl` is configured for server-side or client-side use.
++    pub fn is_server(&self) -> bool {
++        unsafe { compat::SSL_is_server(self.as_ptr()) != 0 }
++    }
++
++    /// Sets the extra data at the specified index.
++    pub fn set_ex_data<T>(&mut self, index: Index<Ssl, T>, data: T) {
++        unsafe {
++            let data = Box::new(data);
++            ffi::SSL_set_ex_data(
++                self.as_ptr(),
++                index.as_raw(),
++                Box::into_raw(data) as *mut c_void,
++            );
++        }
++    }
++
++    /// Returns a reference to the extra data at the specified index.
++    pub fn ex_data<T>(&self, index: Index<Ssl, T>) -> Option<&T> {
++        unsafe {
++            let data = ffi::SSL_get_ex_data(self.as_ptr(), index.as_raw());
++            if data.is_null() {
++                None
++            } else {
++                Some(&*(data as *const T))
++            }
++        }
++    }
++}
++
++unsafe impl Sync for Ssl {}
++unsafe impl Send for Ssl {}
++
++impl fmt::Debug for Ssl {
++    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++        fmt::Debug::fmt(&**self, fmt)
++    }
++}
++
++impl Ssl {
++    pub fn new(ctx: &SslContext) -> Result<Ssl, ErrorStack> {
++        unsafe {
++            let ssl = try!(cvt_p(ffi::SSL_new(ctx.as_ptr())));
++            Ok(Ssl::from_ptr(ssl))
++        }
++    }
++
++    /// Creates an SSL/TLS client operating over the provided stream.
++    ///
++    /// # Warning
++    ///
++    /// OpenSSL's default configuration is insecure. It is highly recommended to use
++    /// `SslConnector` rather than `Ssl` directly, as it manages that configuration.
++    pub fn connect<S>(self, stream: S) -> Result<SslStream<S>, HandshakeError<S>>
++    where
++        S: Read + Write,
++    {
++        let mut stream = SslStream::new_base(self, stream);
++        let ret = unsafe { ffi::SSL_connect(stream.ssl.as_ptr()) };
++        if ret > 0 {
++            Ok(stream)
++        } else {
++            match stream.make_error(ret) {
++                e @ Error::WantWrite(_) |
++                e @ Error::WantRead(_) => {
++                    Err(HandshakeError::Interrupted(MidHandshakeSslStream {
++                        stream: stream,
++                        error: e,
++                    }))
++                }
++                err => {
++                    Err(HandshakeError::Failure(MidHandshakeSslStream {
++                        stream: stream,
++                        error: err,
++                    }))
++                }
++            }
++        }
++    }
++
++    /// Creates an SSL/TLS server operating over the provided stream.
++    ///
++    /// # Warning
++    ///
++    /// OpenSSL's default configuration is insecure. It is highly recommended to use
++    /// `SslAcceptor` rather than `Ssl` directly, as it manages that configuration.
++    pub fn accept<S>(self, stream: S) -> Result<SslStream<S>, HandshakeError<S>>
++    where
++        S: Read + Write,
++    {
++        let mut stream = SslStream::new_base(self, stream);
++        let ret = unsafe { ffi::SSL_accept(stream.ssl.as_ptr()) };
++        if ret > 0 {
++            Ok(stream)
++        } else {
++            match stream.make_error(ret) {
++                e @ Error::WantWrite(_) |
++                e @ Error::WantRead(_) => {
++                    Err(HandshakeError::Interrupted(MidHandshakeSslStream {
++                        stream: stream,
++                        error: e,
++                    }))
++                }
++                err => {
++                    Err(HandshakeError::Failure(MidHandshakeSslStream {
++                        stream: stream,
++                        error: err,
++                    }))
++                }
++            }
++        }
++    }
++}
++
++/// An SSL stream midway through the handshake process.
++#[derive(Debug)]
++pub struct MidHandshakeSslStream<S> {
++    stream: SslStream<S>,
++    error: Error,
++}
++
++impl<S> MidHandshakeSslStream<S> {
++    /// Returns a shared reference to the inner stream.
++    pub fn get_ref(&self) -> &S {
++        self.stream.get_ref()
++    }
++
++    /// Returns a mutable reference to the inner stream.
++    pub fn get_mut(&mut self) -> &mut S {
++        self.stream.get_mut()
++    }
++
++    /// Returns a shared reference to the `Ssl` of the stream.
++    pub fn ssl(&self) -> &SslRef {
++        self.stream.ssl()
++    }
++
++    /// Returns the underlying error which interrupted this handshake.
++    pub fn error(&self) -> &Error {
++        &self.error
++    }
++
++    /// Consumes `self`, returning its error.
++    pub fn into_error(self) -> Error {
++        self.error
++    }
++
++    /// Restarts the handshake process.
++    pub fn handshake(mut self) -> Result<SslStream<S>, HandshakeError<S>> {
++        let ret = unsafe { ffi::SSL_do_handshake(self.stream.ssl.as_ptr()) };
++        if ret > 0 {
++            Ok(self.stream)
++        } else {
++            match self.stream.make_error(ret) {
++                e @ Error::WantWrite(_) |
++                e @ Error::WantRead(_) => {
++                    self.error = e;
++                    Err(HandshakeError::Interrupted(self))
++                }
++                err => {
++                    self.error = err;
++                    Err(HandshakeError::Failure(self))
++                }
++            }
++        }
++    }
++}
++
++/// A stream wrapper which handles SSL encryption for an underlying stream.
++pub struct SslStream<S> {
++    ssl: Ssl,
++    _method: BioMethod, // NOTE: this *must* be after the Ssl field so things drop right
++    _p: PhantomData<S>,
++}
++
++impl<S> fmt::Debug for SslStream<S>
++where
++    S: fmt::Debug,
++{
++    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++        fmt.debug_struct("SslStream")
++            .field("stream", &self.get_ref())
++            .field("ssl", &self.ssl())
++            .finish()
++    }
++}
++
++impl<S: Read + Write> SslStream<S> {
++    fn new_base(ssl: Ssl, stream: S) -> Self {
++        unsafe {
++            let (bio, method) = bio::new(stream).unwrap();
++            ffi::SSL_set_bio(ssl.as_ptr(), bio, bio);
++
++            SslStream {
++                ssl: ssl,
++                _method: method,
++                _p: PhantomData,
++            }
++        }
++    }
++
++    /// Like `read`, but returns an `ssl::Error` rather than an `io::Error`.
++    ///
++    /// This is particularly useful with a nonblocking socket, where the error
++    /// value will identify if OpenSSL is waiting on read or write readiness.
++    pub fn ssl_read(&mut self, buf: &mut [u8]) -> Result<usize, Error> {
++        // The intepretation of the return code here is a little odd with a
++        // zero-length write. OpenSSL will likely correctly report back to us
++        // that it read zero bytes, but zero is also the sentinel for "error".
++        // To avoid that confusion short-circuit that logic and return quickly
++        // if `buf` has a length of zero.
++        if buf.len() == 0 {
++            return Ok(0);
++        }
++
++        let ret = self.ssl.read(buf);
++        if ret > 0 {
++            Ok(ret as usize)
++        } else {
++            match self.make_error(ret) {
++                // Don't treat unexpected EOFs as errors when reading
++                Error::Stream(ref e) if e.kind() == io::ErrorKind::ConnectionAborted => Ok(0),
++                e => Err(e),
++            }
++        }
++    }
++
++    /// Like `write`, but returns an `ssl::Error` rather than an `io::Error`.
++    ///
++    /// This is particularly useful with a nonblocking socket, where the error
++    /// value will identify if OpenSSL is waiting on read or write readiness.
++    pub fn ssl_write(&mut self, buf: &[u8]) -> Result<usize, Error> {
++        // See above for why we short-circuit on zero-length buffers
++        if buf.len() == 0 {
++            return Ok(0);
++        }
++
++        let ret = self.ssl.write(buf);
++        if ret > 0 {
++            Ok(ret as usize)
++        } else {
++            Err(self.make_error(ret))
++        }
++    }
++
++    /// Shuts down the session.
++    ///
++    /// The shutdown process consists of two steps. The first step sends a
++    /// close notify message to the peer, after which `ShutdownResult::Sent`
++    /// is returned. The second step awaits the receipt of a close notify
++    /// message from the peer, after which `ShutdownResult::Received` is
++    /// returned.
++    ///
++    /// While the connection may be closed after the first step, it is
++    /// recommended to fully shut the session down. In particular, it must
++    /// be fully shut down if the connection is to be used for further
++    /// communication in the future.
++    pub fn shutdown(&mut self) -> Result<ShutdownResult, Error> {
++        match unsafe { ffi::SSL_shutdown(self.ssl.as_ptr()) } {
++            0 => Ok(ShutdownResult::Sent),
++            1 => Ok(ShutdownResult::Received),
++            n => Err(self.make_error(n)),
++        }
++    }
++}
++
++impl<S> SslStream<S> {
++    fn make_error(&mut self, ret: c_int) -> Error {
++        self.check_panic();
++
++        match self.ssl.get_error(ret) {
++            ffi::SSL_ERROR_SSL => Error::Ssl(ErrorStack::get()),
++            ffi::SSL_ERROR_SYSCALL => {
++                let errs = ErrorStack::get();
++                if errs.errors().is_empty() {
++                    match self.get_bio_error() {
++                        Some(err) => Error::Stream(err),
++                        None => {
++                            Error::Stream(io::Error::new(
++                                io::ErrorKind::ConnectionAborted,
++                                "unexpected EOF observed",
++                            ))
++                        }
++                    }
++                } else {
++                    Error::Ssl(errs)
++                }
++            }
++            ffi::SSL_ERROR_ZERO_RETURN => Error::ZeroReturn,
++            ffi::SSL_ERROR_WANT_WRITE => {
++                let err = match self.get_bio_error() {
++                    Some(err) => err,
++                    None => {
++                        io::Error::new(
++                            io::ErrorKind::Other,
++                            "BUG: got an SSL_ERROR_WANT_WRITE with no error in the BIO",
++                        )
++                    }
++                };
++                Error::WantWrite(err)
++            }
++            ffi::SSL_ERROR_WANT_READ => {
++                let err = match self.get_bio_error() {
++                    Some(err) => err,
++                    None => {
++                        io::Error::new(
++                            io::ErrorKind::Other,
++                            "BUG: got an SSL_ERROR_WANT_WRITE with no error in the BIO",
++                        )
++                    }
++                };
++                Error::WantRead(err)
++            }
++            err => {
++                Error::Stream(io::Error::new(
++                    io::ErrorKind::InvalidData,
++                    format!("unexpected error {}", err),
++                ))
++            }
++        }
++    }
++
++    fn check_panic(&mut self) {
++        if let Some(err) = unsafe { bio::take_panic::<S>(self.ssl.get_raw_rbio()) } {
++            resume_unwind(err)
++        }
++    }
++
++    fn get_bio_error(&mut self) -> Option<io::Error> {
++        unsafe { bio::take_error::<S>(self.ssl.get_raw_rbio()) }
++    }
++
++    /// Returns a reference to the underlying stream.
++    pub fn get_ref(&self) -> &S {
++        unsafe {
++            let bio = self.ssl.get_raw_rbio();
++            bio::get_ref(bio)
++        }
++    }
++
++    /// Returns a mutable reference to the underlying stream.
++    ///
++    /// ## Warning
++    ///
++    /// It is inadvisable to read from or write to the underlying stream as it
++    /// will most likely corrupt the SSL session.
++    pub fn get_mut(&mut self) -> &mut S {
++        unsafe {
++            let bio = self.ssl.get_raw_rbio();
++            bio::get_mut(bio)
++        }
++    }
++
++    /// Returns the OpenSSL `Ssl` object associated with this stream.
++    pub fn ssl(&self) -> &SslRef {
++        &self.ssl
++    }
++}
++
++impl<S: Read + Write> Read for SslStream<S> {
++    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
++        match self.ssl_read(buf) {
++            Ok(n) => Ok(n),
++            Err(Error::ZeroReturn) => Ok(0),
++            Err(Error::Stream(e)) => Err(e),
++            Err(Error::WantRead(e)) => Err(e),
++            Err(Error::WantWrite(e)) => Err(e),
++            Err(e) => Err(io::Error::new(io::ErrorKind::Other, e)),
++        }
++    }
++}
++
++impl<S: Read + Write> Write for SslStream<S> {
++    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
++        self.ssl_write(buf).map_err(|e| match e {
++            Error::Stream(e) => e,
++            Error::WantRead(e) => e,
++            Error::WantWrite(e) => e,
++            e => io::Error::new(io::ErrorKind::Other, e),
++        })
++    }
++
++    fn flush(&mut self) -> io::Result<()> {
++        self.get_mut().flush()
++    }
++}
++
++/// The result of a shutdown request.
++#[derive(Copy, Clone, Debug, PartialEq, Eq)]
++pub enum ShutdownResult {
++    /// A close notify message has been sent to the peer.
++    Sent,
++
++    /// A close notify response message has been received from the peer.
++    Received,
++}
++
++#[cfg(ossl110)]
++mod compat {
++    use std::ptr;
++
++    use ffi;
++    use libc::c_int;
++
++    pub use ffi::{SSL_CTX_get_options, SSL_CTX_set_options, SSL_CTX_clear_options, SSL_CTX_up_ref,
++                  SSL_SESSION_get_master_key, SSL_is_server, SSL_SESSION_up_ref};
++
++    pub unsafe fn get_new_idx(f: ffi::CRYPTO_EX_free) -> c_int {
++        ffi::CRYPTO_get_ex_new_index(
++            ffi::CRYPTO_EX_INDEX_SSL_CTX,
++            0,
++            ptr::null_mut(),
++            None,
++            None,
++            Some(f),
++        )
++    }
++
++    pub unsafe fn get_new_ssl_idx(f: ffi::CRYPTO_EX_free) -> c_int {
++        ffi::CRYPTO_get_ex_new_index(
++            ffi::CRYPTO_EX_INDEX_SSL,
++            0,
++            ptr::null_mut(),
++            None,
++            None,
++            Some(f),
++        )
++    }
++
++    pub fn tls_method() -> *const ffi::SSL_METHOD {
++        unsafe { ffi::TLS_method() }
++    }
++
++    pub fn dtls_method() -> *const ffi::SSL_METHOD {
++        unsafe { ffi::DTLS_method() }
++    }
++}
++
++#[cfg(ossl10x)]
++#[allow(bad_style)]
++mod compat {
++    use std::ptr;
++
++    use ffi;
++    use libc::{self, c_long, c_ulong, c_int, size_t, c_uchar};
++
++    pub unsafe fn SSL_CTX_get_options(ctx: *const ffi::SSL_CTX) -> c_ulong {
++        ffi::SSL_CTX_ctrl(ctx as *mut _, ffi::SSL_CTRL_OPTIONS, 0, ptr::null_mut()) as c_ulong
++    }
++
++    pub unsafe fn SSL_CTX_set_options(ctx: *const ffi::SSL_CTX, op: c_ulong) -> c_ulong {
++        ffi::SSL_CTX_ctrl(
++            ctx as *mut _,
++            ffi::SSL_CTRL_OPTIONS,
++            op as c_long,
++            ptr::null_mut(),
++        ) as c_ulong
++    }
++
++    pub unsafe fn SSL_CTX_clear_options(ctx: *const ffi::SSL_CTX, op: c_ulong) -> c_ulong {
++        ffi::SSL_CTX_ctrl(
++            ctx as *mut _,
++            ffi::SSL_CTRL_CLEAR_OPTIONS,
++            op as c_long,
++            ptr::null_mut(),
++        ) as c_ulong
++    }
++
++    pub unsafe fn get_new_idx(f: ffi::CRYPTO_EX_free) -> c_int {
++        ffi::SSL_CTX_get_ex_new_index(0, ptr::null_mut(), None, None, Some(f))
++    }
++
++    pub unsafe fn get_new_ssl_idx(f: ffi::CRYPTO_EX_free) -> c_int {
++        ffi::SSL_get_ex_new_index(0, ptr::null_mut(), None, None, Some(f))
++    }
++
++    pub unsafe fn SSL_CTX_up_ref(ssl: *mut ffi::SSL_CTX) -> libc::c_int {
++        ffi::CRYPTO_add_lock(
++            &mut (*ssl).references,
++            1,
++            ffi::CRYPTO_LOCK_SSL_CTX,
++            "mod.rs\0".as_ptr() as *const _,
++            line!() as libc::c_int,
++        );
++        0
++    }
++
++    pub unsafe fn SSL_SESSION_get_master_key(
++        session: *const ffi::SSL_SESSION,
++        out: *mut c_uchar,
++        mut outlen: size_t,
++    ) -> size_t {
++        if outlen == 0 {
++            return (*session).master_key_length as size_t;
++        }
++        if outlen > (*session).master_key_length as size_t {
++            outlen = (*session).master_key_length as size_t;
++        }
++        ptr::copy_nonoverlapping((*session).master_key.as_ptr(), out, outlen);
++        outlen
++    }
++
++    pub fn tls_method() -> *const ffi::SSL_METHOD {
++        unsafe { ffi::SSLv23_method() }
++    }
++
++    pub fn dtls_method() -> *const ffi::SSL_METHOD {
++        unsafe { ffi::DTLSv1_method() }
++    }
++
++    pub unsafe fn SSL_is_server(s: *mut ffi::SSL) -> c_int {
++        (*s).server
++    }
++
++    pub unsafe fn SSL_SESSION_up_ref(ses: *mut ffi::SSL_SESSION) -> c_int {
++        ffi::CRYPTO_add_lock(
++            &mut (*ses).references,
++            1,
++            ffi::CRYPTO_LOCK_SSL_CTX,
++            "mod.rs\0".as_ptr() as *const _,
++            line!() as libc::c_int,
++        );
++        0
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ba89fcd6016c3065b18f4f847bcb1ecd2b8f387b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1488 @@@
++#![allow(unused_imports)]
++
++use std::env;
++use std::fs::File;
++use std::io::prelude::*;
++use std::io::{self, BufReader};
++use std::iter;
++use std::mem;
++use std::net::{TcpStream, TcpListener, SocketAddr};
++use std::path::Path;
++use std::process::{Command, Child, Stdio, ChildStdin};
++use std::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering};
++use std::thread;
++use std::time::Duration;
++use tempdir::TempDir;
++
++use dh::Dh;
++use hash::MessageDigest;
++use ocsp::{OcspResponse, RESPONSE_STATUS_UNAUTHORIZED};
++use ssl;
++use ssl::{SslMethod, HandshakeError, SslContext, SslStream, Ssl, ShutdownResult,
++          SslConnectorBuilder, SslAcceptorBuilder, Error, SSL_VERIFY_PEER, SSL_VERIFY_NONE,
++          STATUS_TYPE_OCSP};
++use x509::{X509StoreContext, X509, X509Name, X509_FILETYPE_PEM};
++#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++use x509::verify::X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS;
++use pkey::PKey;
++
++use std::net::UdpSocket;
++
++mod select;
++
++static ROOT_CERT: &'static [u8] = include_bytes!("../../../test/root-ca.pem");
++static CERT: &'static [u8] = include_bytes!("../../../test/cert.pem");
++static KEY: &'static [u8] = include_bytes!("../../../test/key.pem");
++
++fn next_addr() -> SocketAddr {
++    use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
++    static PORT: AtomicUsize = ATOMIC_USIZE_INIT;
++    let port = 15411 + PORT.fetch_add(1, Ordering::SeqCst);
++
++    format!("127.0.0.1:{}", port).parse().unwrap()
++}
++
++struct Server {
++    p: Child,
++    _temp: TempDir,
++}
++
++impl Server {
++    fn spawn(args: &[&str], input: Option<Box<FnMut(ChildStdin) + Send>>) -> (Server, SocketAddr) {
++        let td = TempDir::new("openssl").unwrap();
++        let cert = td.path().join("cert.pem");
++        let key = td.path().join("key.pem");
++        File::create(&cert).unwrap().write_all(CERT).unwrap();
++        File::create(&key).unwrap().write_all(KEY).unwrap();
++
++        let addr = next_addr();
++        let mut child = Command::new("openssl")
++            .arg("s_server")
++            .arg("-accept")
++            .arg(addr.port().to_string())
++            .args(args)
++            .arg("-cert")
++            .arg(&cert)
++            .arg("-key")
++            .arg(&key)
++            .arg("-no_dhe")
++            .stdout(Stdio::null())
++            .stderr(Stdio::null())
++            .stdin(Stdio::piped())
++            .spawn()
++            .unwrap();
++        let stdin = child.stdin.take().unwrap();
++        if let Some(mut input) = input {
++            thread::spawn(move || input(stdin));
++        }
++        (
++            Server {
++                p: child,
++                _temp: td,
++            },
++            addr,
++        )
++    }
++
++    fn new_tcp(args: &[&str]) -> (Server, TcpStream) {
++        let (server, addr) = Server::spawn(args, None);
++        for _ in 0..20 {
++            match TcpStream::connect(&addr) {
++                Ok(s) => return (server, s),
++                Err(ref e) if e.kind() == io::ErrorKind::ConnectionRefused => {
++                    thread::sleep(Duration::from_millis(100));
++                }
++                Err(e) => panic!("wut: {}", e),
++            }
++        }
++        panic!("server never came online");
++    }
++
++    fn new() -> (Server, TcpStream) {
++        Server::new_tcp(&["-www"])
++    }
++
++    #[allow(dead_code)]
++    fn new_alpn() -> (Server, TcpStream) {
++        Server::new_tcp(
++            &[
++                "-www",
++                "-nextprotoneg",
++                "http/1.1,spdy/3.1",
++                "-alpn",
++                "http/1.1,spdy/3.1",
++            ],
++        )
++    }
++
++    fn new_dtlsv1<I>(input: I) -> (Server, UdpConnected)
++    where
++        I: IntoIterator<Item = &'static str>,
++        I::IntoIter: Send + 'static,
++    {
++        let mut input = input.into_iter();
++        let (s, addr) = Server::spawn(
++            &["-dtls1"],
++            Some(Box::new(move |mut io| for s in input.by_ref() {
++                if io.write_all(s.as_bytes()).is_err() {
++                    break;
++                }
++            })),
++        );
++        // Need to wait for the UDP socket to get bound in our child process,
++        // but don't currently have a great way to do that so just wait for a
++        // bit.
++        thread::sleep(Duration::from_millis(100));
++        let socket = UdpSocket::bind("127.0.0.1:0").unwrap();
++        socket.connect(&addr).unwrap();
++        (s, UdpConnected(socket))
++    }
++}
++
++impl Drop for Server {
++    fn drop(&mut self) {
++        let _ = self.p.kill();
++        let _ = self.p.wait();
++    }
++}
++
++#[derive(Debug)]
++struct UdpConnected(UdpSocket);
++
++impl Read for UdpConnected {
++    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
++        self.0.recv(buf)
++    }
++}
++
++impl Write for UdpConnected {
++    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
++        self.0.send(buf)
++    }
++
++    fn flush(&mut self) -> io::Result<()> {
++        Ok(())
++    }
++}
++
++macro_rules! run_test(
++    ($module:ident, $blk:expr) => (
++        #[cfg(test)]
++        mod $module {
++            use std::io;
++            use std::io::prelude::*;
++            use std::path::Path;
++            use std::net::UdpSocket;
++            use std::net::TcpStream;
++            use ssl;
++            use ssl::SslMethod;
++            use ssl::{SslContext, Ssl, SslStream};
++            use ssl::SSL_VERIFY_PEER;
++            use hash::MessageDigest;
++            use x509::X509StoreContext;
++            #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++            use x509::X509;
++            #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++            use x509::store::X509StoreBuilder;
++            use hex::FromHex;
++            use foreign_types::ForeignTypeRef;
++            use super::Server;
++            #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++            use super::ROOT_CERT;
++
++            #[test]
++            fn sslv23() {
++                let (_s, stream) = Server::new();
++                $blk(SslMethod::tls(), stream);
++            }
++
++            #[test]
++            #[cfg_attr(any(libressl, windows, target_arch = "arm"), ignore)] // FIXME(#467)
++            fn dtlsv1() {
++                let (_s, stream) = Server::new_dtlsv1(Some("hello"));
++                $blk(SslMethod::dtls(), stream);
++            }
++        }
++    );
++);
++
++run_test!(
++    new_ctx,
++    |method, _| { SslContext::builder(method).unwrap(); }
++);
++
++run_test!(verify_untrusted, |method, stream| {
++    let mut ctx = SslContext::builder(method).unwrap();
++    ctx.set_verify(SSL_VERIFY_PEER);
++
++    match Ssl::new(&ctx.build()).unwrap().connect(stream) {
++        Ok(_) => panic!("expected failure"),
++        Err(err) => println!("error {:?}", err),
++    }
++});
++
++run_test!(verify_trusted, |method, stream| {
++    let mut ctx = SslContext::builder(method).unwrap();
++    ctx.set_verify(SSL_VERIFY_PEER);
++
++    match ctx.set_ca_file(&Path::new("test/root-ca.pem")) {
++        Ok(_) => {}
++        Err(err) => panic!("Unexpected error {:?}", err),
++    }
++    match Ssl::new(&ctx.build()).unwrap().connect(stream) {
++        Ok(_) => (),
++        Err(err) => panic!("Expected success, got {:?}", err),
++    }
++});
++
++#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++run_test!(verify_trusted_with_set_cert, |method, stream| {
++    let x509 = X509::from_pem(ROOT_CERT).unwrap();
++    let mut store = X509StoreBuilder::new().unwrap();
++    store.add_cert(x509).unwrap();
++
++    let mut ctx = SslContext::builder(method).unwrap();
++    ctx.set_verify(SSL_VERIFY_PEER);
++
++    match ctx.set_verify_cert_store(store.build()) {
++        Ok(_) => {}
++        Err(err) => panic!("Unexpected error {:?}", err),
++    }
++    match Ssl::new(&ctx.build()).unwrap().connect(stream) {
++        Ok(_) => (),
++        Err(err) => panic!("Expected success, got {:?}", err),
++    }
++});
++
++run_test!(verify_untrusted_callback_override_ok, |method, stream| {
++    let mut ctx = SslContext::builder(method).unwrap();
++    ctx.set_verify_callback(SSL_VERIFY_PEER, |_, _| true);
++
++    match Ssl::new(&ctx.build()).unwrap().connect(stream) {
++        Ok(_) => (),
++        Err(err) => panic!("Expected success, got {:?}", err),
++    }
++});
++
++run_test!(verify_untrusted_callback_override_bad, |method, stream| {
++    let mut ctx = SslContext::builder(method).unwrap();
++    ctx.set_verify_callback(SSL_VERIFY_PEER, |_, _| false);
++
++    assert!(Ssl::new(&ctx.build()).unwrap().connect(stream).is_err());
++});
++
++run_test!(verify_trusted_callback_override_ok, |method, stream| {
++    let mut ctx = SslContext::builder(method).unwrap();
++    ctx.set_verify_callback(SSL_VERIFY_PEER, |_, _| true);
++
++    match ctx.set_ca_file(&Path::new("test/cert.pem")) {
++        Ok(_) => {}
++        Err(err) => panic!("Unexpected error {:?}", err),
++    }
++    match Ssl::new(&ctx.build()).unwrap().connect(stream) {
++        Ok(_) => (),
++        Err(err) => panic!("Expected success, got {:?}", err),
++    }
++});
++
++run_test!(verify_trusted_callback_override_bad, |method, stream| {
++    let mut ctx = SslContext::builder(method).unwrap();
++    ctx.set_verify_callback(SSL_VERIFY_PEER, |_, _| false);
++
++    match ctx.set_ca_file(&Path::new("test/cert.pem")) {
++        Ok(_) => {}
++        Err(err) => panic!("Unexpected error {:?}", err),
++    }
++    assert!(Ssl::new(&ctx.build()).unwrap().connect(stream).is_err());
++});
++
++run_test!(verify_callback_load_certs, |method, stream| {
++    let mut ctx = SslContext::builder(method).unwrap();
++    ctx.set_verify_callback(SSL_VERIFY_PEER, |_, x509_ctx| {
++        assert!(x509_ctx.current_cert().is_some());
++        true
++    });
++
++    assert!(Ssl::new(&ctx.build()).unwrap().connect(stream).is_ok());
++});
++
++run_test!(verify_trusted_get_error_ok, |method, stream| {
++    let mut ctx = SslContext::builder(method).unwrap();
++    ctx.set_verify_callback(SSL_VERIFY_PEER, |_, x509_ctx| {
++        assert!(x509_ctx.error().is_none());
++        true
++    });
++
++    match ctx.set_ca_file(&Path::new("test/root-ca.pem")) {
++        Ok(_) => {}
++        Err(err) => panic!("Unexpected error {:?}", err),
++    }
++    assert!(Ssl::new(&ctx.build()).unwrap().connect(stream).is_ok());
++});
++
++run_test!(verify_trusted_get_error_err, |method, stream| {
++    let mut ctx = SslContext::builder(method).unwrap();
++    ctx.set_verify_callback(SSL_VERIFY_PEER, |_, x509_ctx| {
++        assert!(x509_ctx.error().is_some());
++        false
++    });
++
++    assert!(Ssl::new(&ctx.build()).unwrap().connect(stream).is_err());
++});
++
++run_test!(verify_callback_data, |method, stream| {
++    let mut ctx = SslContext::builder(method).unwrap();
++
++    // Node id was generated as SHA256 hash of certificate "test/cert.pem"
++    // in DER format.
++    // Command: openssl x509 -in test/cert.pem  -outform DER | openssl dgst -sha256
++    // Please update if "test/cert.pem" will ever change
++    let node_hash_str = "59172d9313e84459bcff27f967e79e6e9217e584";
++    let node_id = Vec::from_hex(node_hash_str).unwrap();
++    ctx.set_verify_callback(SSL_VERIFY_PEER, move |_preverify_ok, x509_ctx| {
++        let cert = x509_ctx.current_cert();
++        match cert {
++            None => false,
++            Some(cert) => {
++                let fingerprint = cert.fingerprint(MessageDigest::sha1()).unwrap();
++                fingerprint == node_id
++            }
++        }
++    });
++    ctx.set_verify_depth(1);
++
++    match Ssl::new(&ctx.build()).unwrap().connect(stream) {
++        Ok(_) => (),
++        Err(err) => panic!("Expected success, got {:?}", err),
++    }
++});
++
++run_test!(ssl_verify_callback, |method, stream| {
++    use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
++
++    static CHECKED: AtomicUsize = ATOMIC_USIZE_INIT;
++
++    let ctx = SslContext::builder(method).unwrap();
++    let mut ssl = Ssl::new(&ctx.build()).unwrap();
++
++    let node_hash_str = "59172d9313e84459bcff27f967e79e6e9217e584";
++    let node_id = Vec::from_hex(node_hash_str).unwrap();
++    ssl.set_verify_callback(SSL_VERIFY_PEER, move |_, x509| {
++        CHECKED.store(1, Ordering::SeqCst);
++        match x509.current_cert() {
++            None => false,
++            Some(cert) => {
++                let fingerprint = cert.fingerprint(MessageDigest::sha1()).unwrap();
++                fingerprint == node_id
++            }
++        }
++    });
++
++    match ssl.connect(stream) {
++        Ok(_) => (),
++        Err(err) => panic!("Expected success, got {:?}", err),
++    }
++
++    assert_eq!(CHECKED.load(Ordering::SeqCst), 1);
++});
++
++// Make sure every write call translates to a write call to the underlying socket.
++#[test]
++fn test_write_hits_stream() {
++    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
++    let addr = listener.local_addr().unwrap();
++
++    let guard = thread::spawn(move || {
++        let ctx = SslContext::builder(SslMethod::tls()).unwrap();
++        let stream = TcpStream::connect(addr).unwrap();
++        let mut stream = Ssl::new(&ctx.build()).unwrap().connect(stream).unwrap();
++
++        stream.write_all(b"hello").unwrap();
++        stream
++    });
++
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_verify(SSL_VERIFY_PEER);
++    ctx.set_certificate_file(&Path::new("test/cert.pem"), X509_FILETYPE_PEM)
++        .unwrap();
++    ctx.set_private_key_file(&Path::new("test/key.pem"), X509_FILETYPE_PEM)
++        .unwrap();
++    let stream = listener.accept().unwrap().0;
++    let mut stream = Ssl::new(&ctx.build()).unwrap().accept(stream).unwrap();
++
++    let mut buf = [0; 5];
++    assert_eq!(5, stream.read(&mut buf).unwrap());
++    assert_eq!(&b"hello"[..], &buf[..]);
++    guard.join().unwrap();
++}
++
++#[test]
++fn test_set_certificate_and_private_key() {
++    let key = include_bytes!("../../../test/key.pem");
++    let key = PKey::private_key_from_pem(key).unwrap();
++    let cert = include_bytes!("../../../test/cert.pem");
++    let cert = X509::from_pem(cert).unwrap();
++
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_private_key(&key).unwrap();
++    ctx.set_certificate(&cert).unwrap();
++
++    assert!(ctx.check_private_key().is_ok());
++}
++
++run_test!(get_ctx_options, |method, _| {
++    let ctx = SslContext::builder(method).unwrap();
++    ctx.options();
++});
++
++run_test!(set_ctx_options, |method, _| {
++    let mut ctx = SslContext::builder(method).unwrap();
++    let opts = ctx.set_options(ssl::SSL_OP_NO_TICKET);
++    assert!(opts.contains(ssl::SSL_OP_NO_TICKET));
++});
++
++run_test!(clear_ctx_options, |method, _| {
++    let mut ctx = SslContext::builder(method).unwrap();
++    ctx.set_options(ssl::SSL_OP_ALL);
++    let opts = ctx.clear_options(ssl::SSL_OP_ALL);
++    assert!(!opts.contains(ssl::SSL_OP_ALL));
++});
++
++#[test]
++fn test_write() {
++    let (_s, stream) = Server::new();
++    let ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    let mut stream = Ssl::new(&ctx.build()).unwrap().connect(stream).unwrap();
++    stream.write_all("hello".as_bytes()).unwrap();
++    stream.flush().unwrap();
++    stream.write_all(" there".as_bytes()).unwrap();
++    stream.flush().unwrap();
++}
++
++#[test]
++fn zero_length_buffers() {
++    let (_s, stream) = Server::new();
++    let ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    let mut stream = Ssl::new(&ctx.build()).unwrap().connect(stream).unwrap();
++
++    assert_eq!(stream.write(b"").unwrap(), 0);
++    assert_eq!(stream.read(&mut []).unwrap(), 0);
++}
++
++run_test!(get_peer_certificate, |method, stream| {
++    let ctx = SslContext::builder(method).unwrap();
++    let stream = Ssl::new(&ctx.build()).unwrap().connect(stream).unwrap();
++    let cert = stream.ssl().peer_certificate().unwrap();
++    let fingerprint = cert.fingerprint(MessageDigest::sha1()).unwrap();
++    let node_hash_str = "59172d9313e84459bcff27f967e79e6e9217e584";
++    let node_id = Vec::from_hex(node_hash_str).unwrap();
++    assert_eq!(node_id, fingerprint)
++});
++
++#[test]
++#[cfg_attr(any(libressl, windows, target_arch = "arm"), ignore)] // FIXME(#467)
++fn test_write_dtlsv1() {
++    let (_s, stream) = Server::new_dtlsv1(iter::repeat("y\n"));
++    let ctx = SslContext::builder(SslMethod::dtls()).unwrap();
++    let mut stream = Ssl::new(&ctx.build()).unwrap().connect(stream).unwrap();
++    stream.write_all(b"hello").unwrap();
++    stream.flush().unwrap();
++    stream.write_all(b" there").unwrap();
++    stream.flush().unwrap();
++}
++
++#[test]
++fn test_read() {
++    let (_s, tcp) = Server::new();
++    let ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    let mut stream = Ssl::new(&ctx.build()).unwrap().connect(tcp).unwrap();
++    stream.write_all("GET /\r\n\r\n".as_bytes()).unwrap();
++    stream.flush().unwrap();
++    io::copy(&mut stream, &mut io::sink()).ok().expect(
++        "read error",
++    );
++}
++
++#[test]
++fn test_pending() {
++    let (_s, tcp) = Server::new();
++    let ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    let mut stream = Ssl::new(&ctx.build()).unwrap().connect(tcp).unwrap();
++    stream.write_all("GET /\r\n\r\n".as_bytes()).unwrap();
++    stream.flush().unwrap();
++
++    // wait for the response and read first byte...
++    let mut buf = [0u8; 16 * 1024];
++    stream.read(&mut buf[..1]).unwrap();
++
++    let pending = stream.ssl().pending();
++    let len = stream.read(&mut buf[1..]).unwrap();
++
++    assert_eq!(pending, len);
++
++    stream.read(&mut buf[..1]).unwrap();
++
++    let pending = stream.ssl().pending();
++    let len = stream.read(&mut buf[1..]).unwrap();
++    assert_eq!(pending, len);
++}
++
++#[test]
++fn test_state() {
++    let (_s, tcp) = Server::new();
++    let ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    let stream = Ssl::new(&ctx.build()).unwrap().connect(tcp).unwrap();
++    assert_eq!(stream.ssl().state_string(), "SSLOK ");
++    assert_eq!(
++        stream.ssl().state_string_long(),
++        "SSL negotiation finished successfully"
++    );
++}
++
++/// Tests that connecting with the client using ALPN, but the server not does not
++/// break the existing connection behavior.
++#[test]
++#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++fn test_connect_with_unilateral_alpn() {
++    let (_s, stream) = Server::new();
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_verify(SSL_VERIFY_PEER);
++    ctx.set_alpn_protocols(&[b"http/1.1", b"spdy/3.1"]).unwrap();
++    match ctx.set_ca_file(&Path::new("test/root-ca.pem")) {
++        Ok(_) => {}
++        Err(err) => panic!("Unexpected error {:?}", err),
++    }
++    let stream = match Ssl::new(&ctx.build()).unwrap().connect(stream) {
++        Ok(stream) => stream,
++        Err(err) => panic!("Expected success, got {:?}", err),
++    };
++    // Since the socket to which we connected is not configured to use ALPN,
++    // there should be no selected protocol...
++    assert!(stream.ssl().selected_alpn_protocol().is_none());
++}
++
++/// Tests that connecting with the client using NPN, but the server not does not
++/// break the existing connection behavior.
++#[test]
++fn test_connect_with_unilateral_npn() {
++    let (_s, stream) = Server::new();
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_verify(SSL_VERIFY_PEER);
++    ctx.set_npn_protocols(&[b"http/1.1", b"spdy/3.1"]).unwrap();
++    match ctx.set_ca_file(&Path::new("test/root-ca.pem")) {
++        Ok(_) => {}
++        Err(err) => panic!("Unexpected error {:?}", err),
++    }
++    let stream = match Ssl::new(&ctx.build()).unwrap().connect(stream) {
++        Ok(stream) => stream,
++        Err(err) => panic!("Expected success, got {:?}", err),
++    };
++    // Since the socket to which we connected is not configured to use NPN,
++    // there should be no selected protocol...
++    assert!(stream.ssl().selected_npn_protocol().is_none());
++}
++
++/// Tests that when both the client as well as the server use ALPN and their
++/// lists of supported protocols have an overlap, the correct protocol is chosen.
++#[test]
++#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++fn test_connect_with_alpn_successful_multiple_matching() {
++    let (_s, stream) = Server::new_alpn();
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_verify(SSL_VERIFY_PEER);
++    ctx.set_alpn_protocols(&[b"spdy/3.1", b"http/1.1"]).unwrap();
++    match ctx.set_ca_file(&Path::new("test/root-ca.pem")) {
++        Ok(_) => {}
++        Err(err) => panic!("Unexpected error {:?}", err),
++    }
++    let stream = match Ssl::new(&ctx.build()).unwrap().connect(stream) {
++        Ok(stream) => stream,
++        Err(err) => panic!("Expected success, got {:?}", err),
++    };
++    // The server prefers "http/1.1", so that is chosen, even though the client
++    // would prefer "spdy/3.1"
++    assert_eq!(b"http/1.1", stream.ssl().selected_alpn_protocol().unwrap());
++}
++
++/// Tests that when both the client as well as the server use NPN and their
++/// lists of supported protocols have an overlap, the correct protocol is chosen.
++#[test]
++#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++fn test_connect_with_npn_successful_multiple_matching() {
++    let (_s, stream) = Server::new_alpn();
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_verify(SSL_VERIFY_PEER);
++    ctx.set_npn_protocols(&[b"spdy/3.1", b"http/1.1"]).unwrap();
++    match ctx.set_ca_file(&Path::new("test/root-ca.pem")) {
++        Ok(_) => {}
++        Err(err) => panic!("Unexpected error {:?}", err),
++    }
++    let stream = match Ssl::new(&ctx.build()).unwrap().connect(stream) {
++        Ok(stream) => stream,
++        Err(err) => panic!("Expected success, got {:?}", err),
++    };
++    // The server prefers "http/1.1", so that is chosen, even though the client
++    // would prefer "spdy/3.1"
++    assert_eq!(b"http/1.1", stream.ssl().selected_npn_protocol().unwrap());
++}
++
++/// Tests that when both the client as well as the server use ALPN and their
++/// lists of supported protocols have an overlap -- with only ONE protocol
++/// being valid for both.
++#[test]
++#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++fn test_connect_with_alpn_successful_single_match() {
++    let (_s, stream) = Server::new_alpn();
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_verify(SSL_VERIFY_PEER);
++    ctx.set_alpn_protocols(&[b"spdy/3.1"]).unwrap();
++    match ctx.set_ca_file(&Path::new("test/root-ca.pem")) {
++        Ok(_) => {}
++        Err(err) => panic!("Unexpected error {:?}", err),
++    }
++    let stream = match Ssl::new(&ctx.build()).unwrap().connect(stream) {
++        Ok(stream) => stream,
++        Err(err) => panic!("Expected success, got {:?}", err),
++    };
++    // The client now only supports one of the server's protocols, so that one
++    // is used.
++    assert_eq!(b"spdy/3.1", stream.ssl().selected_alpn_protocol().unwrap());
++}
++
++
++/// Tests that when both the client as well as the server use NPN and their
++/// lists of supported protocols have an overlap -- with only ONE protocol
++/// being valid for both.
++#[test]
++#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++fn test_connect_with_npn_successful_single_match() {
++    let (_s, stream) = Server::new_alpn();
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_verify(SSL_VERIFY_PEER);
++    ctx.set_npn_protocols(&[b"spdy/3.1"]).unwrap();
++    match ctx.set_ca_file(&Path::new("test/root-ca.pem")) {
++        Ok(_) => {}
++        Err(err) => panic!("Unexpected error {:?}", err),
++    }
++    let stream = match Ssl::new(&ctx.build()).unwrap().connect(stream) {
++        Ok(stream) => stream,
++        Err(err) => panic!("Expected success, got {:?}", err),
++    };
++    // The client now only supports one of the server's protocols, so that one
++    // is used.
++    assert_eq!(b"spdy/3.1", stream.ssl().selected_npn_protocol().unwrap());
++}
++
++/// Tests that when the `SslStream` is created as a server stream, the protocols
++/// are correctly advertised to the client.
++#[test]
++fn test_npn_server_advertise_multiple() {
++    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
++    let localhost = listener.local_addr().unwrap();
++    // We create a different context instance for the server...
++    let listener_ctx = {
++        let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++        ctx.set_verify(SSL_VERIFY_PEER);
++        ctx.set_npn_protocols(&[b"http/1.1", b"spdy/3.1"]).unwrap();
++        assert!(
++            ctx.set_certificate_file(&Path::new("test/cert.pem"), X509_FILETYPE_PEM)
++                .is_ok()
++        );
++        ctx.set_private_key_file(&Path::new("test/key.pem"), X509_FILETYPE_PEM)
++            .unwrap();
++        ctx.build()
++    };
++    // Have the listener wait on the connection in a different thread.
++    thread::spawn(move || {
++        let (stream, _) = listener.accept().unwrap();
++        Ssl::new(&listener_ctx).unwrap().accept(stream).unwrap();
++    });
++
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_verify(SSL_VERIFY_PEER);
++    ctx.set_npn_protocols(&[b"spdy/3.1"]).unwrap();
++    match ctx.set_ca_file(&Path::new("test/root-ca.pem")) {
++        Ok(_) => {}
++        Err(err) => panic!("Unexpected error {:?}", err),
++    }
++    // Now connect to the socket and make sure the protocol negotiation works...
++    let stream = TcpStream::connect(localhost).unwrap();
++    let stream = match Ssl::new(&ctx.build()).unwrap().connect(stream) {
++        Ok(stream) => stream,
++        Err(err) => panic!("Expected success, got {:?}", err),
++    };
++    // SPDY is selected since that's the only thing the client supports.
++    assert_eq!(b"spdy/3.1", stream.ssl().selected_npn_protocol().unwrap());
++}
++
++/// Tests that when the `SslStream` is created as a server stream, the protocols
++/// are correctly advertised to the client.
++#[test]
++#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++fn test_alpn_server_advertise_multiple() {
++    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
++    let localhost = listener.local_addr().unwrap();
++    // We create a different context instance for the server...
++    let listener_ctx = {
++        let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++        ctx.set_verify(SSL_VERIFY_PEER);
++        ctx.set_alpn_protocols(&[b"http/1.1", b"spdy/3.1"]).unwrap();
++        assert!(
++            ctx.set_certificate_file(&Path::new("test/cert.pem"), X509_FILETYPE_PEM)
++                .is_ok()
++        );
++        ctx.set_private_key_file(&Path::new("test/key.pem"), X509_FILETYPE_PEM)
++            .unwrap();
++        ctx.build()
++    };
++    // Have the listener wait on the connection in a different thread.
++    thread::spawn(move || {
++        let (stream, _) = listener.accept().unwrap();
++        Ssl::new(&listener_ctx).unwrap().accept(stream).unwrap();
++    });
++
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_verify(SSL_VERIFY_PEER);
++    ctx.set_alpn_protocols(&[b"spdy/3.1"]).unwrap();
++    match ctx.set_ca_file(&Path::new("test/root-ca.pem")) {
++        Ok(_) => {}
++        Err(err) => panic!("Unexpected error {:?}", err),
++    }
++    // Now connect to the socket and make sure the protocol negotiation works...
++    let stream = TcpStream::connect(localhost).unwrap();
++    let stream = match Ssl::new(&ctx.build()).unwrap().connect(stream) {
++        Ok(stream) => stream,
++        Err(err) => panic!("Expected success, got {:?}", err),
++    };
++    // SPDY is selected since that's the only thing the client supports.
++    assert_eq!(b"spdy/3.1", stream.ssl().selected_alpn_protocol().unwrap());
++}
++
++/// Test that Servers supporting ALPN don't report a protocol when none of their protocols match
++/// the client's reported protocol.
++#[test]
++#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++fn test_alpn_server_select_none() {
++    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
++    let localhost = listener.local_addr().unwrap();
++    // We create a different context instance for the server...
++    let listener_ctx = {
++        let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++        ctx.set_verify(SSL_VERIFY_PEER);
++        ctx.set_alpn_protocols(&[b"http/1.1", b"spdy/3.1"]).unwrap();
++        assert!(
++            ctx.set_certificate_file(&Path::new("test/cert.pem"), X509_FILETYPE_PEM)
++                .is_ok()
++        );
++        ctx.set_private_key_file(&Path::new("test/key.pem"), X509_FILETYPE_PEM)
++            .unwrap();
++        ctx.build()
++    };
++    // Have the listener wait on the connection in a different thread.
++    thread::spawn(move || {
++        let (stream, _) = listener.accept().unwrap();
++        Ssl::new(&listener_ctx).unwrap().accept(stream).unwrap();
++    });
++
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_verify(SSL_VERIFY_PEER);
++    ctx.set_alpn_protocols(&[b"http/2"]).unwrap();
++    ctx.set_ca_file(&Path::new("test/root-ca.pem")).unwrap();
++    // Now connect to the socket and make sure the protocol negotiation works...
++    let stream = TcpStream::connect(localhost).unwrap();
++    let stream = Ssl::new(&ctx.build()).unwrap().connect(stream).unwrap();
++
++    // Since the protocols from the server and client don't overlap at all, no protocol is selected
++    assert_eq!(None, stream.ssl().selected_alpn_protocol());
++}
++
++#[test]
++#[cfg_attr(any(libressl, windows, target_arch = "arm"), ignore)] // FIXME(#467)
++fn test_read_dtlsv1() {
++    let (_s, stream) = Server::new_dtlsv1(Some("hello"));
++
++    let ctx = SslContext::builder(SslMethod::dtls()).unwrap();
++    let mut stream = Ssl::new(&ctx.build()).unwrap().connect(stream).unwrap();
++    let mut buf = [0u8; 100];
++    assert!(stream.read(&mut buf).is_ok());
++}
++
++fn wait_io(stream: &TcpStream, read: bool, timeout_ms: u32) -> bool {
++    unsafe {
++        let mut set: select::fd_set = mem::zeroed();
++        select::fd_set(&mut set, stream);
++
++        let write = if read {
++            0 as *mut _
++        } else {
++            &mut set as *mut _
++        };
++        let read = if !read {
++            0 as *mut _
++        } else {
++            &mut set as *mut _
++        };
++        select::select(stream, read, write, 0 as *mut _, timeout_ms).unwrap()
++    }
++}
++
++fn handshake(res: Result<SslStream<TcpStream>, HandshakeError<TcpStream>>) -> SslStream<TcpStream> {
++    match res {
++        Ok(s) => s,
++        Err(HandshakeError::Interrupted(s)) => {
++            wait_io(s.get_ref(), true, 1_000);
++            handshake(s.handshake())
++        }
++        Err(err) => panic!("error on handshake {:?}", err),
++    }
++}
++
++#[test]
++fn test_write_nonblocking() {
++    let (_s, stream) = Server::new();
++    stream.set_nonblocking(true).unwrap();
++    let cx = SslContext::builder(SslMethod::tls()).unwrap().build();
++    let mut stream = handshake(Ssl::new(&cx).unwrap().connect(stream));
++
++    let mut iterations = 0;
++    loop {
++        iterations += 1;
++        if iterations > 7 {
++            // Probably a safe assumption for the foreseeable future of
++            // openssl.
++            panic!("Too many read/write round trips in handshake!!");
++        }
++        let result = stream.ssl_write(b"hello");
++        match result {
++            Ok(_) => {
++                break;
++            }
++            Err(Error::WantRead(_)) => {
++                assert!(wait_io(stream.get_ref(), true, 1000));
++            }
++            Err(Error::WantWrite(_)) => {
++                assert!(wait_io(stream.get_ref(), false, 1000));
++            }
++            Err(other) => {
++                panic!("Unexpected SSL Error: {:?}", other);
++            }
++        }
++    }
++
++    // Second write should succeed immediately--plenty of space in kernel
++    // buffer, and handshake just completed.
++    stream.write(" there".as_bytes()).unwrap();
++}
++
++#[test]
++#[cfg_attr(any(libressl, windows, target_arch = "arm"), ignore)] // FIXME(#467)
++fn test_read_nonblocking() {
++    let (_s, stream) = Server::new();
++    stream.set_nonblocking(true).unwrap();
++    let cx = SslContext::builder(SslMethod::tls()).unwrap().build();
++    let mut stream = handshake(Ssl::new(&cx).unwrap().connect(stream));
++
++    let mut iterations = 0;
++    loop {
++        iterations += 1;
++        if iterations > 7 {
++            // Probably a safe assumption for the foreseeable future of
++            // openssl.
++            panic!("Too many read/write round trips in handshake!!");
++        }
++        let result = stream.ssl_write(b"GET /\r\n\r\n");
++        match result {
++            Ok(n) => {
++                assert_eq!(n, 9);
++                break;
++            }
++            Err(Error::WantRead(..)) => {
++                assert!(wait_io(stream.get_ref(), true, 1000));
++            }
++            Err(Error::WantWrite(..)) => {
++                assert!(wait_io(stream.get_ref(), false, 1000));
++            }
++            Err(other) => {
++                panic!("Unexpected SSL Error: {:?}", other);
++            }
++        }
++    }
++    let mut input_buffer = [0u8; 1500];
++    let result = stream.ssl_read(&mut input_buffer);
++    let bytes_read = match result {
++        Ok(n) => {
++            // This branch is unlikely, but on an overloaded VM with
++            // unlucky context switching, the response could actually
++            // be in the receive buffer before we issue the read() syscall...
++            n
++        }
++        Err(Error::WantRead(..)) => {
++            assert!(wait_io(stream.get_ref(), true, 3000));
++            // Second read should return application data.
++            stream.read(&mut input_buffer).unwrap()
++        }
++        Err(other) => {
++            panic!("Unexpected SSL Error: {:?}", other);
++        }
++    };
++    assert!(bytes_read >= 5);
++    assert_eq!(&input_buffer[..5], b"HTTP/");
++}
++
++#[test]
++#[should_panic(expected = "blammo")]
++fn write_panic() {
++    struct ExplodingStream(TcpStream);
++
++    impl Read for ExplodingStream {
++        fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
++            self.0.read(buf)
++        }
++    }
++
++    impl Write for ExplodingStream {
++        fn write(&mut self, _: &[u8]) -> io::Result<usize> {
++            panic!("blammo");
++        }
++
++        fn flush(&mut self) -> io::Result<()> {
++            self.0.flush()
++        }
++    }
++
++    let (_s, stream) = Server::new();
++    let stream = ExplodingStream(stream);
++
++    let ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    let _ = Ssl::new(&ctx.build()).unwrap().connect(stream);
++}
++
++#[test]
++#[should_panic(expected = "blammo")]
++fn read_panic() {
++    struct ExplodingStream(TcpStream);
++
++    impl Read for ExplodingStream {
++        fn read(&mut self, _: &mut [u8]) -> io::Result<usize> {
++            panic!("blammo");
++        }
++    }
++
++    impl Write for ExplodingStream {
++        fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
++            self.0.write(buf)
++        }
++
++        fn flush(&mut self) -> io::Result<()> {
++            self.0.flush()
++        }
++    }
++
++    let (_s, stream) = Server::new();
++    let stream = ExplodingStream(stream);
++
++    let ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    let _ = Ssl::new(&ctx.build()).unwrap().connect(stream);
++}
++
++#[test]
++#[should_panic(expected = "blammo")]
++fn flush_panic() {
++    struct ExplodingStream(TcpStream);
++
++    impl Read for ExplodingStream {
++        fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
++            self.0.read(buf)
++        }
++    }
++
++    impl Write for ExplodingStream {
++        fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
++            self.0.write(buf)
++        }
++
++        fn flush(&mut self) -> io::Result<()> {
++            panic!("blammo");
++        }
++    }
++
++    let (_s, stream) = Server::new();
++    let stream = ExplodingStream(stream);
++
++    let ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    let mut stream = Ssl::new(&ctx.build())
++        .unwrap()
++        .connect(stream)
++        .ok()
++        .unwrap();
++    let _ = stream.flush();
++}
++
++#[test]
++fn refcount_ssl_context() {
++    let mut ssl = {
++        let ctx = SslContext::builder(SslMethod::tls()).unwrap();
++        ssl::Ssl::new(&ctx.build()).unwrap()
++    };
++
++    {
++        let new_ctx_a = SslContext::builder(SslMethod::tls()).unwrap().build();
++        let _new_ctx_b = ssl.set_ssl_context(&new_ctx_a);
++    }
++}
++
++#[test]
++fn default_verify_paths() {
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_default_verify_paths().unwrap();
++    ctx.set_verify(SSL_VERIFY_PEER);
++    let s = TcpStream::connect("google.com:443").unwrap();
++    let mut socket = Ssl::new(&ctx.build()).unwrap().connect(s).unwrap();
++
++    socket.write_all(b"GET / HTTP/1.0\r\n\r\n").unwrap();
++    let mut result = vec![];
++    socket.read_to_end(&mut result).unwrap();
++
++    println!("{}", String::from_utf8_lossy(&result));
++    assert!(result.starts_with(b"HTTP/1.0"));
++    assert!(result.ends_with(b"</HTML>\r\n") || result.ends_with(b"</html>"));
++}
++
++#[test]
++fn add_extra_chain_cert() {
++    let cert = include_bytes!("../../../test/cert.pem");
++    let cert = X509::from_pem(cert).unwrap();
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.add_extra_chain_cert(cert).unwrap();
++}
++
++#[test]
++#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++fn verify_valid_hostname() {
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_default_verify_paths().unwrap();
++    ctx.set_verify(SSL_VERIFY_PEER);
++
++    let mut ssl = Ssl::new(&ctx.build()).unwrap();
++    ssl.param_mut().set_hostflags(
++        X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS,
++    );
++    ssl.param_mut().set_host("google.com").unwrap();
++
++    let s = TcpStream::connect("google.com:443").unwrap();
++    let mut socket = ssl.connect(s).unwrap();
++
++    socket.write_all(b"GET / HTTP/1.0\r\n\r\n").unwrap();
++    let mut result = vec![];
++    socket.read_to_end(&mut result).unwrap();
++
++    println!("{}", String::from_utf8_lossy(&result));
++    assert!(result.starts_with(b"HTTP/1.0"));
++    assert!(result.ends_with(b"</HTML>\r\n") || result.ends_with(b"</html>"));
++}
++
++#[test]
++#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++fn verify_invalid_hostname() {
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_default_verify_paths().unwrap();
++    ctx.set_verify(SSL_VERIFY_PEER);
++
++    let mut ssl = Ssl::new(&ctx.build()).unwrap();
++    ssl.param_mut().set_hostflags(
++        X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS,
++    );
++    ssl.param_mut().set_host("foobar.com").unwrap();
++
++    let s = TcpStream::connect("google.com:443").unwrap();
++    assert!(ssl.connect(s).is_err());
++}
++
++#[test]
++fn connector_valid_hostname() {
++    let connector = SslConnectorBuilder::new(SslMethod::tls()).unwrap().build();
++
++    let s = TcpStream::connect("google.com:443").unwrap();
++    let mut socket = connector.connect("google.com", s).unwrap();
++
++    socket.write_all(b"GET / HTTP/1.0\r\n\r\n").unwrap();
++    let mut result = vec![];
++    socket.read_to_end(&mut result).unwrap();
++
++    println!("{}", String::from_utf8_lossy(&result));
++    assert!(result.starts_with(b"HTTP/1.0"));
++    assert!(result.ends_with(b"</HTML>\r\n") || result.ends_with(b"</html>"));
++}
++
++#[test]
++fn connector_invalid_hostname() {
++    let connector = SslConnectorBuilder::new(SslMethod::tls()).unwrap().build();
++
++    let s = TcpStream::connect("google.com:443").unwrap();
++    assert!(connector.connect("foobar.com", s).is_err());
++}
++
++#[test]
++fn connector_invalid_no_hostname_verification() {
++    let connector = SslConnectorBuilder::new(SslMethod::tls()).unwrap().build();
++
++    let s = TcpStream::connect("google.com:443").unwrap();
++    connector.danger_connect_without_providing_domain_for_certificate_verification_and_server_name_indication(s)
++        .unwrap();
++}
++
++#[test]
++fn connector_no_hostname_still_verifies() {
++    let (_s, tcp) = Server::new();
++
++    let connector = SslConnectorBuilder::new(SslMethod::tls()).unwrap().build();
++
++    assert!(connector.danger_connect_without_providing_domain_for_certificate_verification_and_server_name_indication(tcp)
++        .is_err());
++}
++
++#[test]
++fn connector_no_hostname_can_disable_verify() {
++    let (_s, tcp) = Server::new();
++
++    let mut connector = SslConnectorBuilder::new(SslMethod::tls()).unwrap();
++    connector.builder_mut().set_verify(SSL_VERIFY_NONE);
++    let connector = connector.build();
++
++    connector.danger_connect_without_providing_domain_for_certificate_verification_and_server_name_indication(tcp).unwrap();
++}
++
++#[test]
++fn connector_client_server_mozilla_intermediate() {
++    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
++    let port = listener.local_addr().unwrap().port();
++
++    let t = thread::spawn(move || {
++        let key = PKey::private_key_from_pem(KEY).unwrap();
++        let cert = X509::from_pem(CERT).unwrap();
++        let connector =
++            SslAcceptorBuilder::mozilla_intermediate(SslMethod::tls(), &key, &cert, None::<X509>)
++                .unwrap()
++                .build();
++        let stream = listener.accept().unwrap().0;
++        let mut stream = connector.accept(stream).unwrap();
++
++        stream.write_all(b"hello").unwrap();
++    });
++
++    let mut connector = SslConnectorBuilder::new(SslMethod::tls()).unwrap();
++    connector
++        .builder_mut()
++        .set_ca_file("test/root-ca.pem")
++        .unwrap();
++    let connector = connector.build();
++
++    let stream = TcpStream::connect(("127.0.0.1", port)).unwrap();
++    let mut stream = connector.connect("foobar.com", stream).unwrap();
++
++    let mut buf = [0; 5];
++    stream.read_exact(&mut buf).unwrap();
++    assert_eq!(b"hello", &buf);
++
++    t.join().unwrap();
++}
++
++#[test]
++fn connector_client_server_mozilla_modern() {
++    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
++    let port = listener.local_addr().unwrap().port();
++
++    let t = thread::spawn(move || {
++        let key = PKey::private_key_from_pem(KEY).unwrap();
++        let cert = X509::from_pem(CERT).unwrap();
++        let connector =
++            SslAcceptorBuilder::mozilla_modern(SslMethod::tls(), &key, &cert, None::<X509>)
++                .unwrap()
++                .build();
++        let stream = listener.accept().unwrap().0;
++        let mut stream = connector.accept(stream).unwrap();
++
++        stream.write_all(b"hello").unwrap();
++    });
++
++    let mut connector = SslConnectorBuilder::new(SslMethod::tls()).unwrap();
++    connector
++        .builder_mut()
++        .set_ca_file("test/root-ca.pem")
++        .unwrap();
++    let connector = connector.build();
++
++    let stream = TcpStream::connect(("127.0.0.1", port)).unwrap();
++    let mut stream = connector.connect("foobar.com", stream).unwrap();
++
++    let mut buf = [0; 5];
++    stream.read_exact(&mut buf).unwrap();
++    assert_eq!(b"hello", &buf);
++
++    t.join().unwrap();
++}
++
++#[test]
++fn shutdown() {
++    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
++    let port = listener.local_addr().unwrap().port();
++
++    thread::spawn(move || {
++        let stream = listener.accept().unwrap().0;
++        let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++        ctx.set_certificate_file(&Path::new("test/cert.pem"), X509_FILETYPE_PEM)
++            .unwrap();
++        ctx.set_private_key_file(&Path::new("test/key.pem"), X509_FILETYPE_PEM)
++            .unwrap();
++        let ssl = Ssl::new(&ctx.build()).unwrap();
++        let mut stream = ssl.accept(stream).unwrap();
++
++        stream.write_all(b"hello").unwrap();
++        let mut buf = [0; 1];
++        assert_eq!(stream.read(&mut buf).unwrap(), 0);
++        assert_eq!(stream.shutdown().unwrap(), ShutdownResult::Received);
++    });
++
++    let stream = TcpStream::connect(("127.0.0.1", port)).unwrap();
++    let ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    let ssl = Ssl::new(&ctx.build()).unwrap();
++    let mut stream = ssl.connect(stream).unwrap();
++
++    let mut buf = [0; 5];
++    stream.read_exact(&mut buf).unwrap();
++    assert_eq!(b"hello", &buf);
++
++    assert_eq!(stream.shutdown().unwrap(), ShutdownResult::Sent);
++    assert_eq!(stream.shutdown().unwrap(), ShutdownResult::Received);
++}
++
++#[test]
++fn client_ca_list() {
++    let names = X509Name::load_client_ca_file("test/root-ca.pem").unwrap();
++    assert_eq!(names.len(), 1);
++
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_client_ca_list(names);
++}
++
++#[test]
++fn cert_store() {
++    let (_s, tcp) = Server::new();
++
++    let cert = X509::from_pem(ROOT_CERT).unwrap();
++
++    let mut ctx = SslConnectorBuilder::new(SslMethod::tls()).unwrap();
++    ctx.builder_mut().cert_store_mut().add_cert(cert).unwrap();
++    let ctx = ctx.build();
++
++    ctx.connect("foobar.com", tcp).unwrap();
++}
++
++#[test]
++fn tmp_dh_callback() {
++    static CALLED_BACK: AtomicBool = ATOMIC_BOOL_INIT;
++
++    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
++    let port = listener.local_addr().unwrap().port();
++
++    thread::spawn(move || {
++        let stream = listener.accept().unwrap().0;
++        let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++        ctx.set_certificate_file(&Path::new("test/cert.pem"), X509_FILETYPE_PEM)
++            .unwrap();
++        ctx.set_private_key_file(&Path::new("test/key.pem"), X509_FILETYPE_PEM)
++            .unwrap();
++        ctx.set_tmp_dh_callback(|_, _, _| {
++            CALLED_BACK.store(true, Ordering::SeqCst);
++            let dh = include_bytes!("../../../test/dhparams.pem");
++            Dh::from_pem(dh)
++        });
++        let ssl = Ssl::new(&ctx.build()).unwrap();
++        ssl.accept(stream).unwrap();
++    });
++
++    let stream = TcpStream::connect(("127.0.0.1", port)).unwrap();
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_cipher_list("EDH").unwrap();
++    let ssl = Ssl::new(&ctx.build()).unwrap();
++    ssl.connect(stream).unwrap();
++
++    assert!(CALLED_BACK.load(Ordering::SeqCst));
++}
++
++#[test]
++#[cfg(any(all(feature = "v101", ossl101), all(feature = "v102", ossl102)))]
++fn tmp_ecdh_callback() {
++    use ec::EcKey;
++    use nid;
++
++    static CALLED_BACK: AtomicBool = ATOMIC_BOOL_INIT;
++
++    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
++    let port = listener.local_addr().unwrap().port();
++
++    thread::spawn(move || {
++        let stream = listener.accept().unwrap().0;
++        let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++        ctx.set_certificate_file(&Path::new("test/cert.pem"), X509_FILETYPE_PEM)
++            .unwrap();
++        ctx.set_private_key_file(&Path::new("test/key.pem"), X509_FILETYPE_PEM)
++            .unwrap();
++        ctx.set_tmp_ecdh_callback(|_, _, _| {
++            CALLED_BACK.store(true, Ordering::SeqCst);
++            EcKey::new_by_curve_name(nid::X9_62_PRIME256V1)
++        });
++        let ssl = Ssl::new(&ctx.build()).unwrap();
++        ssl.accept(stream).unwrap();
++    });
++
++    let stream = TcpStream::connect(("127.0.0.1", port)).unwrap();
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_cipher_list("ECDH").unwrap();
++    let ssl = Ssl::new(&ctx.build()).unwrap();
++    ssl.connect(stream).unwrap();
++
++    assert!(CALLED_BACK.load(Ordering::SeqCst));
++}
++
++#[test]
++fn tmp_dh_callback_ssl() {
++    static CALLED_BACK: AtomicBool = ATOMIC_BOOL_INIT;
++
++    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
++    let port = listener.local_addr().unwrap().port();
++
++    thread::spawn(move || {
++        let stream = listener.accept().unwrap().0;
++        let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++        ctx.set_certificate_file(&Path::new("test/cert.pem"), X509_FILETYPE_PEM)
++            .unwrap();
++        ctx.set_private_key_file(&Path::new("test/key.pem"), X509_FILETYPE_PEM)
++            .unwrap();
++        let mut ssl = Ssl::new(&ctx.build()).unwrap();
++        ssl.set_tmp_dh_callback(|_, _, _| {
++            CALLED_BACK.store(true, Ordering::SeqCst);
++            let dh = include_bytes!("../../../test/dhparams.pem");
++            Dh::from_pem(dh)
++        });
++        ssl.accept(stream).unwrap();
++    });
++
++    let stream = TcpStream::connect(("127.0.0.1", port)).unwrap();
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_cipher_list("EDH").unwrap();
++    let ssl = Ssl::new(&ctx.build()).unwrap();
++    ssl.connect(stream).unwrap();
++
++    assert!(CALLED_BACK.load(Ordering::SeqCst));
++}
++
++#[test]
++#[cfg(any(all(feature = "v101", ossl101), all(feature = "v102", ossl102)))]
++fn tmp_ecdh_callback_ssl() {
++    use ec::EcKey;
++    use nid;
++
++    static CALLED_BACK: AtomicBool = ATOMIC_BOOL_INIT;
++
++    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
++    let port = listener.local_addr().unwrap().port();
++
++    thread::spawn(move || {
++        let stream = listener.accept().unwrap().0;
++        let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++        ctx.set_certificate_file(&Path::new("test/cert.pem"), X509_FILETYPE_PEM)
++            .unwrap();
++        ctx.set_private_key_file(&Path::new("test/key.pem"), X509_FILETYPE_PEM)
++            .unwrap();
++        let mut ssl = Ssl::new(&ctx.build()).unwrap();
++        ssl.set_tmp_ecdh_callback(|_, _, _| {
++            CALLED_BACK.store(true, Ordering::SeqCst);
++            EcKey::new_by_curve_name(nid::X9_62_PRIME256V1)
++        });
++        ssl.accept(stream).unwrap();
++    });
++
++    let stream = TcpStream::connect(("127.0.0.1", port)).unwrap();
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_cipher_list("ECDH").unwrap();
++    let ssl = Ssl::new(&ctx.build()).unwrap();
++    ssl.connect(stream).unwrap();
++
++    assert!(CALLED_BACK.load(Ordering::SeqCst));
++}
++
++#[test]
++fn idle_session() {
++    let ctx = SslContext::builder(SslMethod::tls()).unwrap().build();
++    let ssl = Ssl::new(&ctx).unwrap();
++    assert!(ssl.session().is_none());
++}
++
++#[test]
++fn active_session() {
++    let connector = SslConnectorBuilder::new(SslMethod::tls()).unwrap().build();
++
++    let s = TcpStream::connect("google.com:443").unwrap();
++    let socket = connector.connect("google.com", s).unwrap();
++    let session = socket.ssl().session().unwrap();
++    let len = session.master_key_len();
++    let mut buf = vec![0; len - 1];
++    let copied = session.master_key(&mut buf);
++    assert_eq!(copied, buf.len());
++    let mut buf = vec![0; len + 1];
++    let copied = session.master_key(&mut buf);
++    assert_eq!(copied, len);
++}
++
++#[test]
++fn status_callbacks() {
++    static CALLED_BACK_SERVER: AtomicBool = ATOMIC_BOOL_INIT;
++    static CALLED_BACK_CLIENT: AtomicBool = ATOMIC_BOOL_INIT;
++
++    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
++    let port = listener.local_addr().unwrap().port();
++
++    let guard = thread::spawn(move || {
++        let stream = listener.accept().unwrap().0;
++        let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++        ctx.set_certificate_file(&Path::new("test/cert.pem"), X509_FILETYPE_PEM)
++            .unwrap();
++        ctx.set_private_key_file(&Path::new("test/key.pem"), X509_FILETYPE_PEM)
++            .unwrap();
++        ctx.set_status_callback(|ssl| {
++            CALLED_BACK_SERVER.store(true, Ordering::SeqCst);
++            let response = OcspResponse::create(RESPONSE_STATUS_UNAUTHORIZED, None).unwrap();
++            let response = response.to_der().unwrap();
++            ssl.set_ocsp_status(&response).unwrap();
++            Ok(true)
++        }).unwrap();
++        let ssl = Ssl::new(&ctx.build()).unwrap();
++        ssl.accept(stream).unwrap();
++    });
++
++    let stream = TcpStream::connect(("127.0.0.1", port)).unwrap();
++    let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
++    ctx.set_status_callback(|ssl| {
++        CALLED_BACK_CLIENT.store(true, Ordering::SeqCst);
++        let response = OcspResponse::from_der(ssl.ocsp_status().unwrap()).unwrap();
++        assert_eq!(response.status(), RESPONSE_STATUS_UNAUTHORIZED);
++        Ok(true)
++    }).unwrap();
++    let mut ssl = Ssl::new(&ctx.build()).unwrap();
++    ssl.set_status_type(STATUS_TYPE_OCSP).unwrap();
++    ssl.connect(stream).unwrap();
++
++    assert!(CALLED_BACK_SERVER.load(Ordering::SeqCst));
++    assert!(CALLED_BACK_CLIENT.load(Ordering::SeqCst));
++
++    guard.join().unwrap();
++}
++
++fn _check_kinds() {
++    fn is_send<T: Send>() {}
++    fn is_sync<T: Sync>() {}
++
++    is_send::<SslStream<TcpStream>>();
++    is_sync::<SslStream<TcpStream>>();
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..36d5ed49530a2f8d16d5e4fb229488412d4c7515
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,74 @@@
++use libc;
++pub use self::imp::*;
++
++#[cfg(unix)]
++mod imp {
++    use std::os::unix::prelude::*;
++    use std::io;
++    use libc;
++
++    pub use libc::fd_set;
++
++    pub fn fd_set<F: AsRawFd>(set: &mut fd_set, f: &F) {
++        unsafe {
++            libc::FD_SET(f.as_raw_fd(), set);
++        }
++    }
++
++    pub unsafe fn select<F: AsRawFd>(
++        max: &F,
++        read: *mut fd_set,
++        write: *mut fd_set,
++        error: *mut fd_set,
++        timeout_ms: u32,
++    ) -> io::Result<bool> {
++        let mut timeout = libc::timeval {
++            tv_sec: (timeout_ms / 1000) as libc::time_t,
++            tv_usec: (timeout_ms % 1000 * 1000) as libc::suseconds_t,
++        };
++        let rc = libc::select(max.as_raw_fd() + 1, read, write, error, &mut timeout);
++        if rc < 0 {
++            Err(io::Error::last_os_error())
++        } else {
++            Ok(rc != 0)
++        }
++    }
++}
++
++#[cfg(windows)]
++mod imp {
++    extern crate winapi;
++    extern crate ws2_32;
++
++    use std::os::windows::prelude::*;
++    use std::io;
++    use libc::{c_uint, c_long};
++    use self::winapi::SOCKET;
++    use self::winapi::winsock2;
++
++    pub use self::winapi::winsock2::fd_set;
++
++    pub fn fd_set<F: AsRawSocket>(set: &mut fd_set, f: &F) {
++        set.fd_array[set.fd_count as usize] = f.as_raw_socket();
++        set.fd_count += 1;
++    }
++
++    pub unsafe fn select<F: AsRawSocket>(
++        _max: &F,
++        read: *mut fd_set,
++        write: *mut fd_set,
++        error: *mut fd_set,
++        timeout_ms: u32,
++    ) -> io::Result<bool> {
++        let mut timeout = winsock2::timeval {
++            tv_sec: (timeout_ms / 1000) as c_long,
++            tv_usec: (timeout_ms % 1000 * 1000) as c_long,
++        };
++        let rc = ws2_32::select(1, read, write, error, &mut timeout);
++        if rc < 0 {
++            Err(io::Error::last_os_error())
++        } else {
++            Ok(rc != 0)
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d20d95f7df6284052dd7d21e24bee52390beb7cb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,360 @@@
++use foreign_types::{ForeignTypeRef, ForeignType, Opaque};
++use libc::c_int;
++use std::borrow::Borrow;
++use std::convert::AsRef;
++use std::iter;
++use std::marker::PhantomData;
++use std::mem;
++use ffi;
++
++use {cvt, cvt_p};
++use error::ErrorStack;
++use std::ops::{Deref, DerefMut, Index, IndexMut};
++
++#[cfg(ossl10x)]
++use ffi::{sk_pop as OPENSSL_sk_pop, sk_free as OPENSSL_sk_free, sk_num as OPENSSL_sk_num,
++          sk_value as OPENSSL_sk_value, _STACK as OPENSSL_STACK,
++          sk_new_null as OPENSSL_sk_new_null, sk_push as OPENSSL_sk_push};
++#[cfg(ossl110)]
++use ffi::{OPENSSL_sk_pop, OPENSSL_sk_free, OPENSSL_sk_num, OPENSSL_sk_value, OPENSSL_STACK,
++          OPENSSL_sk_new_null, OPENSSL_sk_push};
++
++/// Trait implemented by types which can be placed in a stack.
++///
++/// It should not be implemented for any type outside of this crate.
++pub trait Stackable: ForeignType {
++    /// The C stack type for this element.
++    ///
++    /// Generally called `stack_st_{ELEMENT_TYPE}`, normally hidden by the
++    /// `STACK_OF(ELEMENT_TYPE)` macro in the OpenSSL API.
++    type StackType;
++}
++
++/// An owned stack of `T`.
++pub struct Stack<T: Stackable>(*mut T::StackType);
++
++impl<T: Stackable> Stack<T> {
++    pub fn new() -> Result<Stack<T>, ErrorStack> {
++        unsafe {
++            ffi::init();
++            let ptr = try!(cvt_p(OPENSSL_sk_new_null()));
++            Ok(Stack(ptr as *mut _))
++        }
++    }
++}
++
++impl<T: Stackable> Drop for Stack<T> {
++    fn drop(&mut self) {
++        unsafe {
++            while let Some(_) = self.pop() {}
++            OPENSSL_sk_free(self.0 as *mut _);
++        }
++    }
++}
++
++impl<T: Stackable> iter::IntoIterator for Stack<T> {
++    type IntoIter = IntoIter<T>;
++    type Item = T;
++
++    fn into_iter(self) -> IntoIter<T> {
++        let it = IntoIter {
++            stack: self.0,
++            idx: 0,
++        };
++        mem::forget(self);
++        it
++    }
++}
++
++impl<T: Stackable> AsRef<StackRef<T>> for Stack<T> {
++    fn as_ref(&self) -> &StackRef<T> {
++        &*self
++    }
++}
++
++impl<T: Stackable> Borrow<StackRef<T>> for Stack<T> {
++    fn borrow(&self) -> &StackRef<T> {
++        &*self
++    }
++}
++
++impl<T: Stackable> ForeignType for Stack<T> {
++    type CType = T::StackType;
++    type Ref = StackRef<T>;
++
++    #[inline]
++    unsafe fn from_ptr(ptr: *mut T::StackType) -> Stack<T> {
++        assert!(
++            !ptr.is_null(),
++            "Must not instantiate a Stack from a null-ptr - use Stack::new() in \
++                                 that case"
++        );
++        Stack(ptr)
++    }
++
++    #[inline]
++    fn as_ptr(&self) -> *mut T::StackType {
++        self.0
++    }
++}
++
++impl<T: Stackable> Deref for Stack<T> {
++    type Target = StackRef<T>;
++
++    fn deref(&self) -> &StackRef<T> {
++        unsafe { StackRef::from_ptr(self.0) }
++    }
++}
++
++impl<T: Stackable> DerefMut for Stack<T> {
++    fn deref_mut(&mut self) -> &mut StackRef<T> {
++        unsafe { StackRef::from_ptr_mut(self.0) }
++    }
++}
++
++pub struct IntoIter<T: Stackable> {
++    stack: *mut T::StackType,
++    idx: c_int,
++}
++
++impl<T: Stackable> IntoIter<T> {
++    fn stack_len(&self) -> c_int {
++        unsafe { OPENSSL_sk_num(self.stack as *mut _) }
++    }
++}
++
++impl<T: Stackable> Drop for IntoIter<T> {
++    fn drop(&mut self) {
++        unsafe {
++            while let Some(_) = self.next() {}
++            OPENSSL_sk_free(self.stack as *mut _);
++        }
++    }
++}
++
++impl<T: Stackable> Iterator for IntoIter<T> {
++    type Item = T;
++
++    fn next(&mut self) -> Option<T> {
++        unsafe {
++            if self.idx == self.stack_len() {
++                None
++            } else {
++                let ptr = OPENSSL_sk_value(self.stack as *mut _, self.idx);
++                self.idx += 1;
++                Some(T::from_ptr(ptr as *mut _))
++            }
++        }
++    }
++
++    fn size_hint(&self) -> (usize, Option<usize>) {
++        let size = (self.stack_len() - self.idx) as usize;
++        (size, Some(size))
++    }
++}
++
++impl<T: Stackable> ExactSizeIterator for IntoIter<T> {}
++
++pub struct StackRef<T: Stackable>(Opaque, PhantomData<T>);
++
++impl<T: Stackable> ForeignTypeRef for StackRef<T> {
++    type CType = T::StackType;
++}
++
++impl<T: Stackable> StackRef<T> {
++    fn as_stack(&self) -> *mut OPENSSL_STACK {
++        self.as_ptr() as *mut _
++    }
++
++    /// Returns the number of items in the stack
++    pub fn len(&self) -> usize {
++        unsafe { OPENSSL_sk_num(self.as_stack()) as usize }
++    }
++
++    pub fn iter(&self) -> Iter<T> {
++        // Unfortunately we can't simply convert the stack into a
++        // slice and use that because OpenSSL 1.1.0 doesn't directly
++        // expose the stack data (we have to use `OPENSSL_sk_value`
++        // instead). We have to rewrite the entire iteration framework
++        // instead.
++
++        Iter {
++            stack: self,
++            pos: 0,
++        }
++    }
++
++    pub fn iter_mut(&mut self) -> IterMut<T> {
++        IterMut {
++            stack: self,
++            pos: 0,
++        }
++    }
++
++    /// Returns a reference to the element at the given index in the
++    /// stack or `None` if the index is out of bounds
++    pub fn get(&self, idx: usize) -> Option<&T::Ref> {
++        unsafe {
++            if idx >= self.len() {
++                return None;
++            }
++
++            Some(T::Ref::from_ptr(self._get(idx)))
++        }
++    }
++
++    /// Returns a mutable reference to the element at the given index in the
++    /// stack or `None` if the index is out of bounds
++    pub fn get_mut(&mut self, idx: usize) -> Option<&mut T::Ref> {
++        unsafe {
++            if idx >= self.len() {
++                return None;
++            }
++
++            Some(T::Ref::from_ptr_mut(self._get(idx)))
++        }
++    }
++
++    /// Pushes a value onto the top of the stack.
++    pub fn push(&mut self, data: T) -> Result<(), ErrorStack> {
++        unsafe {
++            try!(cvt(
++                OPENSSL_sk_push(self.as_stack(), data.as_ptr() as *mut _),
++            ));
++            mem::forget(data);
++            Ok(())
++        }
++    }
++
++    /// Removes the last element from the stack and returns it.
++    pub fn pop(&mut self) -> Option<T> {
++        unsafe {
++            let ptr = OPENSSL_sk_pop(self.as_stack());
++            if ptr.is_null() {
++                None
++            } else {
++                Some(T::from_ptr(ptr as *mut _))
++            }
++        }
++    }
++
++    unsafe fn _get(&self, idx: usize) -> *mut T::CType {
++        OPENSSL_sk_value(self.as_stack(), idx as c_int) as *mut _
++    }
++}
++
++impl<T: Stackable> Index<usize> for StackRef<T> {
++    type Output = T::Ref;
++
++    fn index(&self, index: usize) -> &T::Ref {
++        self.get(index).unwrap()
++    }
++}
++
++impl<T: Stackable> IndexMut<usize> for StackRef<T> {
++    fn index_mut(&mut self, index: usize) -> &mut T::Ref {
++        self.get_mut(index).unwrap()
++    }
++}
++
++impl<'a, T: Stackable> iter::IntoIterator for &'a StackRef<T> {
++    type Item = &'a T::Ref;
++    type IntoIter = Iter<'a, T>;
++
++    fn into_iter(self) -> Iter<'a, T> {
++        self.iter()
++    }
++}
++
++impl<'a, T: Stackable> iter::IntoIterator for &'a mut StackRef<T> {
++    type Item = &'a mut T::Ref;
++    type IntoIter = IterMut<'a, T>;
++
++    fn into_iter(self) -> IterMut<'a, T> {
++        self.iter_mut()
++    }
++}
++
++impl<'a, T: Stackable> iter::IntoIterator for &'a Stack<T> {
++    type Item = &'a T::Ref;
++    type IntoIter = Iter<'a, T>;
++
++    fn into_iter(self) -> Iter<'a, T> {
++        self.iter()
++    }
++}
++
++impl<'a, T: Stackable> iter::IntoIterator for &'a mut Stack<T> {
++    type Item = &'a mut T::Ref;
++    type IntoIter = IterMut<'a, T>;
++
++    fn into_iter(self) -> IterMut<'a, T> {
++        self.iter_mut()
++    }
++}
++
++/// An iterator over the stack's contents.
++pub struct Iter<'a, T: Stackable>
++where
++    T: 'a,
++{
++    stack: &'a StackRef<T>,
++    pos: usize,
++}
++
++impl<'a, T: Stackable> iter::Iterator for Iter<'a, T> {
++    type Item = &'a T::Ref;
++
++    fn next(&mut self) -> Option<&'a T::Ref> {
++        let n = self.stack.get(self.pos);
++
++        if n.is_some() {
++            self.pos += 1;
++        }
++
++        n
++    }
++
++    fn size_hint(&self) -> (usize, Option<usize>) {
++        let rem = self.stack.len() - self.pos;
++
++        (rem, Some(rem))
++    }
++}
++
++impl<'a, T: Stackable> iter::ExactSizeIterator for Iter<'a, T> {}
++
++/// A mutable iterator over the stack's contents.
++pub struct IterMut<'a, T: Stackable + 'a> {
++    stack: &'a mut StackRef<T>,
++    pos: usize,
++}
++
++impl<'a, T: Stackable> iter::Iterator for IterMut<'a, T> {
++    type Item = &'a mut T::Ref;
++
++    fn next(&mut self) -> Option<&'a mut T::Ref> {
++        if self.pos >= self.stack.len() {
++            None
++        } else {
++            // Rust won't allow us to get a mutable reference into
++            // `stack` in this situation since it can't statically
++            // guarantee that we won't return several references to
++            // the same object, so we have to use unsafe code for
++            // mutable iterators.
++            let n = unsafe { Some(T::Ref::from_ptr_mut(self.stack._get(self.pos))) };
++
++            self.pos += 1;
++
++            n
++        }
++    }
++
++    fn size_hint(&self) -> (usize, Option<usize>) {
++        let rem = self.stack.len() - self.pos;
++
++        (rem, Some(rem))
++    }
++}
++
++impl<'a, T: Stackable> iter::ExactSizeIterator for IterMut<'a, T> {}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0324d57760a7052df1eb95ba2f24b2ec1770ec6f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,82 @@@
++use ffi;
++use foreign_types::{ForeignType, ForeignTypeRef};
++use libc::{c_char, c_void};
++use std::fmt;
++use std::ffi::CStr;
++use std::ops::Deref;
++use std::str;
++
++use stack::Stackable;
++
++foreign_type! {
++    type CType = c_char;
++    fn drop = free;
++
++    pub struct OpensslString;
++    pub struct OpensslStringRef;
++}
++
++impl OpensslString {
++    #[deprecated(note = "use from_ptr", since = "0.9.7")]
++    pub unsafe fn from_raw_parts(buf: *mut u8, _: usize) -> OpensslString {
++        OpensslString::from_ptr(buf as *mut c_char)
++    }
++
++    #[deprecated(note = "use from_ptr", since = "0.9.7")]
++    pub unsafe fn from_null_terminated(buf: *mut c_char) -> OpensslString {
++        OpensslString::from_ptr(buf)
++    }
++}
++
++impl fmt::Display for OpensslString {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        fmt::Display::fmt(&**self, f)
++    }
++}
++
++impl fmt::Debug for OpensslString {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        fmt::Debug::fmt(&**self, f)
++    }
++}
++
++impl Stackable for OpensslString {
++    type StackType = ffi::stack_st_OPENSSL_STRING;
++}
++
++impl Deref for OpensslStringRef {
++    type Target = str;
++
++    fn deref(&self) -> &str {
++        unsafe {
++            let slice = CStr::from_ptr(self.as_ptr()).to_bytes();
++            str::from_utf8_unchecked(slice)
++        }
++    }
++}
++
++impl fmt::Display for OpensslStringRef {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        fmt::Display::fmt(&**self, f)
++    }
++}
++
++impl fmt::Debug for OpensslStringRef {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        fmt::Debug::fmt(&**self, f)
++    }
++}
++
++#[cfg(not(ossl110))]
++unsafe fn free(buf: *mut c_char) {
++    ::ffi::CRYPTO_free(buf as *mut c_void);
++}
++
++#[cfg(ossl110)]
++unsafe fn free(buf: *mut c_char) {
++    ::ffi::CRYPTO_free(
++        buf as *mut c_void,
++        concat!(file!(), "\0").as_ptr() as *const c_char,
++        line!() as ::libc::c_int,
++    );
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f593126a3d6fbb3e0c9621a941ce308f3dd7af14
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,981 @@@
++use std::cmp;
++use std::ptr;
++use libc::c_int;
++use ffi;
++
++use {cvt, cvt_p};
++use error::ErrorStack;
++
++#[derive(Copy, Clone)]
++pub enum Mode {
++    Encrypt,
++    Decrypt,
++}
++
++#[derive(Copy, Clone)]
++pub struct Cipher(*const ffi::EVP_CIPHER);
++
++impl Cipher {
++    pub fn aes_128_ecb() -> Cipher {
++        unsafe { Cipher(ffi::EVP_aes_128_ecb()) }
++    }
++
++    pub fn aes_128_cbc() -> Cipher {
++        unsafe { Cipher(ffi::EVP_aes_128_cbc()) }
++    }
++
++    pub fn aes_128_xts() -> Cipher {
++        unsafe { Cipher(ffi::EVP_aes_128_xts()) }
++    }
++
++    pub fn aes_128_ctr() -> Cipher {
++        unsafe { Cipher(ffi::EVP_aes_128_ctr()) }
++    }
++
++    pub fn aes_128_cfb1() -> Cipher {
++        unsafe { Cipher(ffi::EVP_aes_128_cfb1()) }
++    }
++
++    pub fn aes_128_cfb128() -> Cipher {
++        unsafe { Cipher(ffi::EVP_aes_128_cfb128()) }
++    }
++
++    pub fn aes_128_cfb8() -> Cipher {
++        unsafe { Cipher(ffi::EVP_aes_128_cfb8()) }
++    }
++
++    pub fn aes_128_gcm() -> Cipher {
++        unsafe { Cipher(ffi::EVP_aes_128_gcm()) }
++    }
++
++    pub fn aes_256_ecb() -> Cipher {
++        unsafe { Cipher(ffi::EVP_aes_256_ecb()) }
++    }
++
++    pub fn aes_256_cbc() -> Cipher {
++        unsafe { Cipher(ffi::EVP_aes_256_cbc()) }
++    }
++
++    pub fn aes_256_xts() -> Cipher {
++        unsafe { Cipher(ffi::EVP_aes_256_xts()) }
++    }
++
++    pub fn aes_256_ctr() -> Cipher {
++        unsafe { Cipher(ffi::EVP_aes_256_ctr()) }
++    }
++
++    pub fn aes_256_cfb1() -> Cipher {
++        unsafe { Cipher(ffi::EVP_aes_256_cfb1()) }
++    }
++
++    pub fn aes_256_cfb128() -> Cipher {
++        unsafe { Cipher(ffi::EVP_aes_256_cfb128()) }
++    }
++
++    pub fn aes_256_cfb8() -> Cipher {
++        unsafe { Cipher(ffi::EVP_aes_256_cfb8()) }
++    }
++
++    pub fn aes_256_gcm() -> Cipher {
++        unsafe { Cipher(ffi::EVP_aes_256_gcm()) }
++    }
++
++    pub fn bf_cbc() -> Cipher {
++        unsafe { Cipher(ffi::EVP_bf_cbc()) }
++    }
++
++    pub fn bf_ecb() -> Cipher {
++        unsafe { Cipher(ffi::EVP_bf_ecb()) }
++    }
++
++    pub fn bf_cfb64() -> Cipher {
++        unsafe { Cipher(ffi::EVP_bf_cfb64()) }
++    }
++
++    pub fn bf_ofb() -> Cipher {
++        unsafe { Cipher(ffi::EVP_bf_ofb()) }
++    }
++
++    pub fn des_cbc() -> Cipher {
++        unsafe { Cipher(ffi::EVP_des_cbc()) }
++    }
++
++    pub fn des_ecb() -> Cipher {
++        unsafe { Cipher(ffi::EVP_des_ecb()) }
++    }
++
++    pub fn rc4() -> Cipher {
++        unsafe { Cipher(ffi::EVP_rc4()) }
++    }
++
++    /// Requires the `v110` feature and OpenSSL 1.1.0.
++    #[cfg(all(ossl110, feature = "v110"))]
++    pub fn chacha20() -> Cipher {
++        unsafe { Cipher(ffi::EVP_chacha20()) }
++    }
++
++    /// Requires the `v110` feature and OpenSSL 1.1.0.
++    #[cfg(all(ossl110, feature = "v110"))]
++    pub fn chacha20_poly1305() -> Cipher {
++        unsafe { Cipher(ffi::EVP_chacha20_poly1305()) }
++    }
++
++    pub unsafe fn from_ptr(ptr: *const ffi::EVP_CIPHER) -> Cipher {
++        Cipher(ptr)
++    }
++
++    pub fn as_ptr(&self) -> *const ffi::EVP_CIPHER {
++        self.0
++    }
++
++    /// Returns the length of keys used with this cipher.
++    pub fn key_len(&self) -> usize {
++        unsafe { EVP_CIPHER_key_length(self.0) as usize }
++    }
++
++    /// Returns the length of the IV used with this cipher, or `None` if the
++    /// cipher does not use an IV.
++    pub fn iv_len(&self) -> Option<usize> {
++        unsafe {
++            let len = EVP_CIPHER_iv_length(self.0) as usize;
++            if len == 0 { None } else { Some(len) }
++        }
++    }
++
++    /// Returns the block size of the cipher.
++    ///
++    /// # Note
++    ///
++    /// Stream ciphers such as RC4 have a block size of 1.
++    pub fn block_size(&self) -> usize {
++        unsafe { EVP_CIPHER_block_size(self.0) as usize }
++    }
++}
++
++/// Represents a symmetric cipher context.
++pub struct Crypter {
++    ctx: *mut ffi::EVP_CIPHER_CTX,
++    block_size: usize,
++}
++
++impl Crypter {
++    /// Creates a new `Crypter`.
++    ///
++    /// # Panics
++    ///
++    /// Panics if an IV is required by the cipher but not provided.
++    pub fn new(
++        t: Cipher,
++        mode: Mode,
++        key: &[u8],
++        iv: Option<&[u8]>,
++    ) -> Result<Crypter, ErrorStack> {
++        ffi::init();
++
++        unsafe {
++            let ctx = try!(cvt_p(ffi::EVP_CIPHER_CTX_new()));
++            let crypter = Crypter {
++                ctx: ctx,
++                block_size: t.block_size(),
++            };
++
++            let mode = match mode {
++                Mode::Encrypt => 1,
++                Mode::Decrypt => 0,
++            };
++
++            try!(cvt(ffi::EVP_CipherInit_ex(
++                crypter.ctx,
++                t.as_ptr(),
++                ptr::null_mut(),
++                ptr::null_mut(),
++                ptr::null_mut(),
++                mode,
++            )));
++
++            assert!(key.len() <= c_int::max_value() as usize);
++            try!(cvt(ffi::EVP_CIPHER_CTX_set_key_length(
++                crypter.ctx,
++                key.len() as c_int,
++            )));
++
++            let key = key.as_ptr() as *mut _;
++            let iv = match (iv, t.iv_len()) {
++                (Some(iv), Some(len)) => {
++                    if iv.len() != len {
++                        assert!(iv.len() <= c_int::max_value() as usize);
++                        try!(cvt(ffi::EVP_CIPHER_CTX_ctrl(
++                            crypter.ctx,
++                            ffi::EVP_CTRL_GCM_SET_IVLEN,
++                            iv.len() as c_int,
++                            ptr::null_mut(),
++                        )));
++                    }
++                    iv.as_ptr() as *mut _
++                }
++                (Some(_), None) | (None, None) => ptr::null_mut(),
++                (None, Some(_)) => panic!("an IV is required for this cipher"),
++            };
++            try!(cvt(ffi::EVP_CipherInit_ex(
++                crypter.ctx,
++                ptr::null(),
++                ptr::null_mut(),
++                key,
++                iv,
++                mode,
++            )));
++
++            Ok(crypter)
++        }
++    }
++
++    /// Enables or disables padding.
++    ///
++    /// If padding is disabled, total amount of data encrypted/decrypted must
++    /// be a multiple of the cipher's block size.
++    pub fn pad(&mut self, padding: bool) {
++        unsafe {
++            ffi::EVP_CIPHER_CTX_set_padding(self.ctx, padding as c_int);
++        }
++    }
++
++    /// Sets the tag used to authenticate ciphertext in AEAD ciphers such as AES GCM.
++    ///
++    /// When decrypting cipher text using an AEAD cipher, this must be called before `finalize`.
++    pub fn set_tag(&mut self, tag: &[u8]) -> Result<(), ErrorStack> {
++        unsafe {
++            assert!(tag.len() <= c_int::max_value() as usize);
++            // NB: this constant is actually more general than just GCM.
++            cvt(ffi::EVP_CIPHER_CTX_ctrl(
++                self.ctx,
++                ffi::EVP_CTRL_GCM_SET_TAG,
++                tag.len() as c_int,
++                tag.as_ptr() as *mut _,
++            )).map(|_| ())
++        }
++    }
++
++    /// Feeds Additional Authenticated Data (AAD) through the cipher.
++    ///
++    /// This can only be used with AEAD ciphers such as AES GCM. Data fed in is not encrypted, but
++    /// is factored into the authentication tag. It must be called before the first call to
++    /// `update`.
++    pub fn aad_update(&mut self, input: &[u8]) -> Result<(), ErrorStack> {
++        unsafe {
++            assert!(input.len() <= c_int::max_value() as usize);
++            let mut len = 0;
++            cvt(ffi::EVP_CipherUpdate(
++                self.ctx,
++                ptr::null_mut(),
++                &mut len,
++                input.as_ptr(),
++                input.len() as c_int,
++            )).map(|_| ())
++        }
++    }
++
++    /// Feeds data from `input` through the cipher, writing encrypted/decrypted
++    /// bytes into `output`.
++    ///
++    /// The number of bytes written to `output` is returned. Note that this may
++    /// not be equal to the length of `input`.
++    ///
++    /// # Panics
++    ///
++    /// Panics if `output.len() < input.len() + block_size` where
++    /// `block_size` is the block size of the cipher (see `Cipher::block_size`),
++    /// or if `output.len() > c_int::max_value()`.
++    pub fn update(&mut self, input: &[u8], output: &mut [u8]) -> Result<usize, ErrorStack> {
++        unsafe {
++            assert!(output.len() >= input.len() + self.block_size);
++            assert!(output.len() <= c_int::max_value() as usize);
++            let mut outl = output.len() as c_int;
++            let inl = input.len() as c_int;
++
++            try!(cvt(ffi::EVP_CipherUpdate(
++                self.ctx,
++                output.as_mut_ptr(),
++                &mut outl,
++                input.as_ptr(),
++                inl,
++            )));
++
++            Ok(outl as usize)
++        }
++    }
++
++    /// Finishes the encryption/decryption process, writing any remaining data
++    /// to `output`.
++    ///
++    /// The number of bytes written to `output` is returned.
++    ///
++    /// `update` should not be called after this method.
++    ///
++    /// # Panics
++    ///
++    /// Panics if `output` is less than the cipher's block size.
++    pub fn finalize(&mut self, output: &mut [u8]) -> Result<usize, ErrorStack> {
++        unsafe {
++            assert!(output.len() >= self.block_size);
++            let mut outl = cmp::min(output.len(), c_int::max_value() as usize) as c_int;
++
++            try!(cvt(ffi::EVP_CipherFinal(
++                self.ctx,
++                output.as_mut_ptr(),
++                &mut outl,
++            )));
++
++            Ok(outl as usize)
++        }
++    }
++
++    /// Retrieves the authentication tag used to authenticate ciphertext in AEAD ciphers such
++    /// as AES GCM.
++    ///
++    /// When encrypting data with an AEAD cipher, this must be called after `finalize`.
++    ///
++    /// The size of the buffer indicates the required size of the tag. While some ciphers support a
++    /// range of tag sizes, it is recommended to pick the maximum size. For AES GCM, this is 16
++    /// bytes, for example.
++    pub fn get_tag(&self, tag: &mut [u8]) -> Result<(), ErrorStack> {
++        unsafe {
++            assert!(tag.len() <= c_int::max_value() as usize);
++            cvt(ffi::EVP_CIPHER_CTX_ctrl(
++                self.ctx,
++                ffi::EVP_CTRL_GCM_GET_TAG,
++                tag.len() as c_int,
++                tag.as_mut_ptr() as *mut _,
++            )).map(|_| ())
++        }
++    }
++}
++
++impl Drop for Crypter {
++    fn drop(&mut self) {
++        unsafe {
++            ffi::EVP_CIPHER_CTX_free(self.ctx);
++        }
++    }
++}
++
++/// Encrypts data, using the specified crypter type in encrypt mode with the
++/// specified key and iv; returns the resulting (encrypted) data.
++pub fn encrypt(
++    t: Cipher,
++    key: &[u8],
++    iv: Option<&[u8]>,
++    data: &[u8],
++) -> Result<Vec<u8>, ErrorStack> {
++    cipher(t, Mode::Encrypt, key, iv, data)
++}
++
++/// Decrypts data, using the specified crypter type in decrypt mode with the
++/// specified key and iv; returns the resulting (decrypted) data.
++pub fn decrypt(
++    t: Cipher,
++    key: &[u8],
++    iv: Option<&[u8]>,
++    data: &[u8],
++) -> Result<Vec<u8>, ErrorStack> {
++    cipher(t, Mode::Decrypt, key, iv, data)
++}
++
++fn cipher(
++    t: Cipher,
++    mode: Mode,
++    key: &[u8],
++    iv: Option<&[u8]>,
++    data: &[u8],
++) -> Result<Vec<u8>, ErrorStack> {
++    let mut c = try!(Crypter::new(t, mode, key, iv));
++    let mut out = vec![0; data.len() + t.block_size()];
++    let count = try!(c.update(data, &mut out));
++    let rest = try!(c.finalize(&mut out[count..]));
++    out.truncate(count + rest);
++    Ok(out)
++}
++
++/// Like `encrypt`, but for AEAD ciphers such as AES GCM.
++///
++/// Additional Authenticated Data can be provided in the `aad` field, and the authentication tag
++/// will be copied into the `tag` field.
++///
++/// The size of the `tag` buffer indicates the required size of the tag. While some ciphers support
++/// a range of tag sizes, it is recommended to pick the maximum size. For AES GCM, this is 16 bytes,
++/// for example.
++pub fn encrypt_aead(
++    t: Cipher,
++    key: &[u8],
++    iv: Option<&[u8]>,
++    aad: &[u8],
++    data: &[u8],
++    tag: &mut [u8],
++) -> Result<Vec<u8>, ErrorStack> {
++    let mut c = try!(Crypter::new(t, Mode::Encrypt, key, iv));
++    let mut out = vec![0; data.len() + t.block_size()];
++    try!(c.aad_update(aad));
++    let count = try!(c.update(data, &mut out));
++    let rest = try!(c.finalize(&mut out[count..]));
++    try!(c.get_tag(tag));
++    out.truncate(count + rest);
++    Ok(out)
++}
++
++/// Like `decrypt`, but for AEAD ciphers such as AES GCM.
++///
++/// Additional Authenticated Data can be provided in the `aad` field, and the authentication tag
++/// should be provided in the `tag` field.
++pub fn decrypt_aead(
++    t: Cipher,
++    key: &[u8],
++    iv: Option<&[u8]>,
++    aad: &[u8],
++    data: &[u8],
++    tag: &[u8],
++) -> Result<Vec<u8>, ErrorStack> {
++    let mut c = try!(Crypter::new(t, Mode::Decrypt, key, iv));
++    let mut out = vec![0; data.len() + t.block_size()];
++    try!(c.aad_update(aad));
++    let count = try!(c.update(data, &mut out));
++    try!(c.set_tag(tag));
++    let rest = try!(c.finalize(&mut out[count..]));
++    out.truncate(count + rest);
++    Ok(out)
++}
++
++#[cfg(ossl110)]
++use ffi::{EVP_CIPHER_iv_length, EVP_CIPHER_block_size, EVP_CIPHER_key_length};
++
++#[cfg(ossl10x)]
++#[allow(bad_style)]
++mod compat {
++    use libc::c_int;
++    use ffi::EVP_CIPHER;
++
++    pub unsafe fn EVP_CIPHER_iv_length(ptr: *const EVP_CIPHER) -> c_int {
++        (*ptr).iv_len
++    }
++
++    pub unsafe fn EVP_CIPHER_block_size(ptr: *const EVP_CIPHER) -> c_int {
++        (*ptr).block_size
++    }
++
++    pub unsafe fn EVP_CIPHER_key_length(ptr: *const EVP_CIPHER) -> c_int {
++        (*ptr).key_len
++    }
++}
++#[cfg(ossl10x)]
++use self::compat::*;
++
++#[cfg(test)]
++mod tests {
++    use hex::{FromHex, ToHex};
++    use super::*;
++
++    // Test vectors from FIPS-197:
++    // http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf
++    #[test]
++    fn test_aes_256_ecb() {
++        let k0 = [
++            0x00u8,
++            0x01u8,
++            0x02u8,
++            0x03u8,
++            0x04u8,
++            0x05u8,
++            0x06u8,
++            0x07u8,
++            0x08u8,
++            0x09u8,
++            0x0au8,
++            0x0bu8,
++            0x0cu8,
++            0x0du8,
++            0x0eu8,
++            0x0fu8,
++            0x10u8,
++            0x11u8,
++            0x12u8,
++            0x13u8,
++            0x14u8,
++            0x15u8,
++            0x16u8,
++            0x17u8,
++            0x18u8,
++            0x19u8,
++            0x1au8,
++            0x1bu8,
++            0x1cu8,
++            0x1du8,
++            0x1eu8,
++            0x1fu8,
++        ];
++        let p0 = [
++            0x00u8,
++            0x11u8,
++            0x22u8,
++            0x33u8,
++            0x44u8,
++            0x55u8,
++            0x66u8,
++            0x77u8,
++            0x88u8,
++            0x99u8,
++            0xaau8,
++            0xbbu8,
++            0xccu8,
++            0xddu8,
++            0xeeu8,
++            0xffu8,
++        ];
++        let c0 = [
++            0x8eu8,
++            0xa2u8,
++            0xb7u8,
++            0xcau8,
++            0x51u8,
++            0x67u8,
++            0x45u8,
++            0xbfu8,
++            0xeau8,
++            0xfcu8,
++            0x49u8,
++            0x90u8,
++            0x4bu8,
++            0x49u8,
++            0x60u8,
++            0x89u8,
++        ];
++        let mut c = super::Crypter::new(
++            super::Cipher::aes_256_ecb(),
++            super::Mode::Encrypt,
++            &k0,
++            None,
++        ).unwrap();
++        c.pad(false);
++        let mut r0 = vec![0; c0.len() + super::Cipher::aes_256_ecb().block_size()];
++        let count = c.update(&p0, &mut r0).unwrap();
++        let rest = c.finalize(&mut r0[count..]).unwrap();
++        r0.truncate(count + rest);
++        assert_eq!(r0.to_hex(), c0.to_hex());
++
++        let mut c = super::Crypter::new(
++            super::Cipher::aes_256_ecb(),
++            super::Mode::Decrypt,
++            &k0,
++            None,
++        ).unwrap();
++        c.pad(false);
++        let mut p1 = vec![0; r0.len() + super::Cipher::aes_256_ecb().block_size()];
++        let count = c.update(&r0, &mut p1).unwrap();
++        let rest = c.finalize(&mut p1[count..]).unwrap();
++        p1.truncate(count + rest);
++        assert_eq!(p1.to_hex(), p0.to_hex());
++    }
++
++    #[test]
++    fn test_aes_256_cbc_decrypt() {
++        let iv = [
++            4_u8,
++            223_u8,
++            153_u8,
++            219_u8,
++            28_u8,
++            142_u8,
++            234_u8,
++            68_u8,
++            227_u8,
++            69_u8,
++            98_u8,
++            107_u8,
++            208_u8,
++            14_u8,
++            236_u8,
++            60_u8,
++        ];
++        let data = [
++            143_u8,
++            210_u8,
++            75_u8,
++            63_u8,
++            214_u8,
++            179_u8,
++            155_u8,
++            241_u8,
++            242_u8,
++            31_u8,
++            154_u8,
++            56_u8,
++            198_u8,
++            145_u8,
++            192_u8,
++            64_u8,
++            2_u8,
++            245_u8,
++            167_u8,
++            220_u8,
++            55_u8,
++            119_u8,
++            233_u8,
++            136_u8,
++            139_u8,
++            27_u8,
++            71_u8,
++            242_u8,
++            119_u8,
++            175_u8,
++            65_u8,
++            207_u8,
++        ];
++        let ciphered_data = [
++            0x4a_u8,
++            0x2e_u8,
++            0xe5_u8,
++            0x6_u8,
++            0xbf_u8,
++            0xcf_u8,
++            0xf2_u8,
++            0xd7_u8,
++            0xea_u8,
++            0x2d_u8,
++            0xb1_u8,
++            0x85_u8,
++            0x6c_u8,
++            0x93_u8,
++            0x65_u8,
++            0x6f_u8,
++        ];
++        let mut cr = super::Crypter::new(
++            super::Cipher::aes_256_cbc(),
++            super::Mode::Decrypt,
++            &data,
++            Some(&iv),
++        ).unwrap();
++        cr.pad(false);
++        let mut unciphered_data = vec![0; data.len() + super::Cipher::aes_256_cbc().block_size()];
++        let count = cr.update(&ciphered_data, &mut unciphered_data).unwrap();
++        let rest = cr.finalize(&mut unciphered_data[count..]).unwrap();
++        unciphered_data.truncate(count + rest);
++
++        let expected_unciphered_data = b"I love turtles.\x01";
++
++        assert_eq!(&unciphered_data, expected_unciphered_data);
++    }
++
++    fn cipher_test(ciphertype: super::Cipher, pt: &str, ct: &str, key: &str, iv: &str) {
++        let pt = Vec::from_hex(pt).unwrap();
++        let ct = Vec::from_hex(ct).unwrap();
++        let key = Vec::from_hex(key).unwrap();
++        let iv = Vec::from_hex(iv).unwrap();
++
++        let computed = super::decrypt(ciphertype, &key, Some(&iv), &ct).unwrap();
++        let expected = pt;
++
++        if computed != expected {
++            println!("Computed: {}", computed.to_hex());
++            println!("Expected: {}", expected.to_hex());
++            if computed.len() != expected.len() {
++                println!(
++                    "Lengths differ: {} in computed vs {} expected",
++                    computed.len(),
++                    expected.len()
++                );
++            }
++            panic!("test failure");
++        }
++    }
++
++    fn cipher_test_nopad(ciphertype: super::Cipher, pt: &str, ct: &str, key: &str, iv: &str) {
++        let pt = Vec::from_hex(pt).unwrap();
++        let ct = Vec::from_hex(ct).unwrap();
++        let key = Vec::from_hex(key).unwrap();
++        let iv = Vec::from_hex(iv).unwrap();
++
++        let computed = {
++            let mut c = Crypter::new(ciphertype, Mode::Decrypt, &key, Some(&iv)).unwrap();
++            c.pad(false);
++            let mut out = vec![0; ct.len() + ciphertype.block_size()];
++            let count = c.update(&ct, &mut out).unwrap();
++            let rest = c.finalize(&mut out[count..]).unwrap();
++            out.truncate(count + rest);
++            out
++        };
++        let expected = pt;
++
++        if computed != expected {
++            println!("Computed: {}", computed.to_hex());
++            println!("Expected: {}", expected.to_hex());
++            if computed.len() != expected.len() {
++                println!(
++                    "Lengths differ: {} in computed vs {} expected",
++                    computed.len(),
++                    expected.len()
++                );
++            }
++            panic!("test failure");
++        }
++    }
++
++    #[test]
++    fn test_rc4() {
++
++        let pt = "0000000000000000000000000000000000000000000000000000000000000000000000000000";
++        let ct = "A68686B04D686AA107BD8D4CAB191A3EEC0A6294BC78B60F65C25CB47BD7BB3A48EFC4D26BE4";
++        let key = "97CD440324DA5FD1F7955C1C13B6B466";
++        let iv = "";
++
++        cipher_test(super::Cipher::rc4(), pt, ct, key, iv);
++    }
++
++    #[test]
++    fn test_aes256_xts() {
++        // Test case 174 from
++        // http://csrc.nist.gov/groups/STM/cavp/documents/aes/XTSTestVectors.zip
++        let pt = "77f4ef63d734ebd028508da66c22cdebdd52ecd6ee2ab0a50bc8ad0cfd692ca5fcd4e6dedc45df7f\
++                  6503f462611dc542";
++        let ct = "ce7d905a7776ac72f240d22aafed5e4eb7566cdc7211220e970da634ce015f131a5ecb8d400bc9e8\
++                  4f0b81d8725dbbc7";
++        let key = "b6bfef891f83b5ff073f2231267be51eb084b791fa19a154399c0684c8b2dfcb37de77d28bbda3b\
++                   4180026ad640b74243b3133e7b9fae629403f6733423dae28";
++        let iv = "db200efb7eaaa737dbdf40babb68953f";
++
++        cipher_test(super::Cipher::aes_256_xts(), pt, ct, key, iv);
++    }
++
++    #[test]
++    fn test_aes128_ctr() {
++
++        let pt = "6BC1BEE22E409F96E93D7E117393172AAE2D8A571E03AC9C9EB76FAC45AF8E5130C81C46A35CE411\
++                  E5FBC1191A0A52EFF69F2445DF4F9B17AD2B417BE66C3710";
++        let ct = "874D6191B620E3261BEF6864990DB6CE9806F66B7970FDFF8617187BB9FFFDFF5AE4DF3EDBD5D35E\
++                  5B4F09020DB03EAB1E031DDA2FBE03D1792170A0F3009CEE";
++        let key = "2B7E151628AED2A6ABF7158809CF4F3C";
++        let iv = "F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF";
++
++        cipher_test(super::Cipher::aes_128_ctr(), pt, ct, key, iv);
++    }
++
++    #[test]
++    fn test_aes128_cfb1() {
++        // Lifted from http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
++
++        let pt = "6bc1";
++        let ct = "68b3";
++        let key = "2b7e151628aed2a6abf7158809cf4f3c";
++        let iv = "000102030405060708090a0b0c0d0e0f";
++
++        cipher_test(super::Cipher::aes_128_cfb1(), pt, ct, key, iv);
++    }
++
++    #[test]
++    fn test_aes128_cfb128() {
++
++        let pt = "6bc1bee22e409f96e93d7e117393172a";
++        let ct = "3b3fd92eb72dad20333449f8e83cfb4a";
++        let key = "2b7e151628aed2a6abf7158809cf4f3c";
++        let iv = "000102030405060708090a0b0c0d0e0f";
++
++        cipher_test(super::Cipher::aes_128_cfb128(), pt, ct, key, iv);
++    }
++
++    #[test]
++    fn test_aes128_cfb8() {
++
++        let pt = "6bc1bee22e409f96e93d7e117393172aae2d";
++        let ct = "3b79424c9c0dd436bace9e0ed4586a4f32b9";
++        let key = "2b7e151628aed2a6abf7158809cf4f3c";
++        let iv = "000102030405060708090a0b0c0d0e0f";
++
++        cipher_test(super::Cipher::aes_128_cfb8(), pt, ct, key, iv);
++    }
++
++    #[test]
++    fn test_aes256_cfb1() {
++
++        let pt = "6bc1";
++        let ct = "9029";
++        let key = "603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4";
++        let iv = "000102030405060708090a0b0c0d0e0f";
++
++        cipher_test(super::Cipher::aes_256_cfb1(), pt, ct, key, iv);
++    }
++
++    #[test]
++    fn test_aes256_cfb128() {
++
++        let pt = "6bc1bee22e409f96e93d7e117393172a";
++        let ct = "dc7e84bfda79164b7ecd8486985d3860";
++        let key = "603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4";
++        let iv = "000102030405060708090a0b0c0d0e0f";
++
++        cipher_test(super::Cipher::aes_256_cfb128(), pt, ct, key, iv);
++    }
++
++    #[test]
++    fn test_aes256_cfb8() {
++
++        let pt = "6bc1bee22e409f96e93d7e117393172aae2d";
++        let ct = "dc1f1a8520a64db55fcc8ac554844e889700";
++        let key = "603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4";
++        let iv = "000102030405060708090a0b0c0d0e0f";
++
++        cipher_test(super::Cipher::aes_256_cfb8(), pt, ct, key, iv);
++    }
++
++    #[test]
++    fn test_bf_cbc() {
++        // https://www.schneier.com/code/vectors.txt
++
++        let pt = "37363534333231204E6F77206973207468652074696D6520666F722000000000";
++        let ct = "6B77B4D63006DEE605B156E27403979358DEB9E7154616D959F1652BD5FF92CC";
++        let key = "0123456789ABCDEFF0E1D2C3B4A59687";
++        let iv = "FEDCBA9876543210";
++
++        cipher_test_nopad(super::Cipher::bf_cbc(), pt, ct, key, iv);
++    }
++
++    #[test]
++    fn test_bf_ecb() {
++
++        let pt = "5CD54CA83DEF57DA";
++        let ct = "B1B8CC0B250F09A0";
++        let key = "0131D9619DC1376E";
++        let iv = "0000000000000000";
++
++        cipher_test_nopad(super::Cipher::bf_ecb(), pt, ct, key, iv);
++    }
++
++    #[test]
++    fn test_bf_cfb64() {
++
++        let pt = "37363534333231204E6F77206973207468652074696D6520666F722000";
++        let ct = "E73214A2822139CAF26ECF6D2EB9E76E3DA3DE04D1517200519D57A6C3";
++        let key = "0123456789ABCDEFF0E1D2C3B4A59687";
++        let iv = "FEDCBA9876543210";
++
++        cipher_test_nopad(super::Cipher::bf_cfb64(), pt, ct, key, iv);
++    }
++
++    #[test]
++    fn test_bf_ofb() {
++
++        let pt = "37363534333231204E6F77206973207468652074696D6520666F722000";
++        let ct = "E73214A2822139CA62B343CC5B65587310DD908D0C241B2263C2CF80DA";
++        let key = "0123456789ABCDEFF0E1D2C3B4A59687";
++        let iv = "FEDCBA9876543210";
++
++        cipher_test_nopad(super::Cipher::bf_ofb(), pt, ct, key, iv);
++    }
++
++    #[test]
++    fn test_des_cbc() {
++
++        let pt = "54686973206973206120746573742e";
++        let ct = "6f2867cfefda048a4046ef7e556c7132";
++        let key = "7cb66337f3d3c0fe";
++        let iv = "0001020304050607";
++
++        cipher_test(super::Cipher::des_cbc(), pt, ct, key, iv);
++    }
++
++    #[test]
++    fn test_des_ecb() {
++
++        let pt = "54686973206973206120746573742e";
++        let ct = "0050ab8aecec758843fe157b4dde938c";
++        let key = "7cb66337f3d3c0fe";
++        let iv = "0001020304050607";
++
++        cipher_test(super::Cipher::des_ecb(), pt, ct, key, iv);
++    }
++
++    #[test]
++    fn test_aes128_gcm() {
++        let key = "0e00c76561d2bd9b40c3c15427e2b08f";
++        let iv = "492cadaccd3ca3fbc9cf9f06eb3325c4e159850b0dbe98199b89b7af528806610b6f63998e1eae80c348e7\
++             4cbb921d8326631631fc6a5d304f39166daf7ea15fa1977f101819adb510b50fe9932e12c5a85aa3fd1e73\
++             d8d760af218be829903a77c63359d75edd91b4f6ed5465a72662f5055999e059e7654a8edc921aa0d496";
++        let pt = "fef03c2d7fb15bf0d2df18007d99f967c878ad59359034f7bb2c19af120685d78e32f6b8b83b032019956c\
++             a9c0195721476b85";
++        let aad = "d8f1163d8c840292a2b2dacf4ac7c36aff8733f18fabb4fa5594544125e03d1e6e5d6d0fd61656c8d8f327\
++             c92839ae5539bb469c9257f109ebff85aad7bd220fdaa95c022dbd0c7bb2d878ad504122c943045d3c5eba\
++             8f1f56c0";
++        let ct = "4f6cf471be7cbd2575cd5a1747aea8fe9dea83e51936beac3e68f66206922060c697ffa7af80ad6bb68f2c\
++             f4fc97416ee52abe";
++        let tag = "e20b6655";
++
++        // this tag is smaller than you'd normally want, but I pulled this test from the part of
++        // the NIST test vectors that cover 4 byte tags.
++        let mut actual_tag = [0; 4];
++        let out = encrypt_aead(
++            Cipher::aes_128_gcm(),
++            &Vec::from_hex(key).unwrap(),
++            Some(&Vec::from_hex(iv).unwrap()),
++            &Vec::from_hex(aad).unwrap(),
++            &Vec::from_hex(pt).unwrap(),
++            &mut actual_tag,
++        ).unwrap();
++        assert_eq!(ct, out.to_hex());
++        assert_eq!(tag, actual_tag.to_hex());
++
++        let out = decrypt_aead(
++            Cipher::aes_128_gcm(),
++            &Vec::from_hex(key).unwrap(),
++            Some(&Vec::from_hex(iv).unwrap()),
++            &Vec::from_hex(aad).unwrap(),
++            &Vec::from_hex(ct).unwrap(),
++            &Vec::from_hex(tag).unwrap(),
++        ).unwrap();
++        assert_eq!(pt, out.to_hex());
++    }
++
++    #[test]
++    #[cfg(all(ossl110, feature = "v110"))]
++    fn test_chacha20() {
++        let key = "0000000000000000000000000000000000000000000000000000000000000000";
++        let iv = "00000000000000000000000000000000";
++        let pt = "000000000000000000000000000000000000000000000000000000000000000000000000000000000\
++                  00000000000000000000000000000000000000000000000";
++        let ct = "76b8e0ada0f13d90405d6ae55386bd28bdd219b8a08ded1aa836efcc8b770dc7da41597c5157488d7\
++                  724e03fb8d84a376a43b8f41518a11cc387b669b2ee6586";
++
++        cipher_test(Cipher::chacha20(), pt, ct, key, iv);
++    }
++
++    #[test]
++    #[cfg(all(ossl110, feature = "v110"))]
++    fn test_chacha20_poly1305() {
++        let key = "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f";
++        let iv = "070000004041424344454647";
++        let aad = "50515253c0c1c2c3c4c5c6c7";
++        let pt = "4c616469657320616e642047656e746c656d656e206f662074686520636c617373206f66202739393\
++                  a204966204920636f756c64206f6666657220796f75206f6e6c79206f6e652074697020666f722074\
++                  6865206675747572652c2073756e73637265656e20776f756c642062652069742e";
++        let ct = "d31a8d34648e60db7b86afbc53ef7ec2a4aded51296e08fea9e2b5a736ee62d63dbea45e8ca967128\
++                  2fafb69da92728b1a71de0a9e060b2905d6a5b67ecd3b3692ddbd7f2d778b8c9803aee328091b58fa\
++                  b324e4fad675945585808b4831d7bc3ff4def08e4b7a9de576d26586cec64b6116";
++        let tag = "1ae10b594f09e26a7e902ecbd0600691";
++
++        let mut actual_tag = [0; 16];
++        let out = encrypt_aead(
++            Cipher::chacha20_poly1305(),
++            &Vec::from_hex(key).unwrap(),
++            Some(&Vec::from_hex(iv).unwrap()),
++            &Vec::from_hex(aad).unwrap(),
++            &Vec::from_hex(pt).unwrap(),
++            &mut actual_tag,
++        ).unwrap();
++        assert_eq!(ct, out.to_hex());
++        assert_eq!(tag, actual_tag.to_hex());
++
++        let out = decrypt_aead(
++            Cipher::chacha20_poly1305(),
++            &Vec::from_hex(key).unwrap(),
++            Some(&Vec::from_hex(iv).unwrap()),
++            &Vec::from_hex(aad).unwrap(),
++            &Vec::from_hex(ct).unwrap(),
++            &Vec::from_hex(tag).unwrap(),
++        ).unwrap();
++        assert_eq!(pt, out.to_hex());
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..25ffe501bfb7870eb5bcffd18698ed4df6497ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++#[deprecated(note = "use foreign_types instead", since = "0.9.7")]
++pub use foreign_types::ForeignType as OpenSslType;
++
++#[deprecated(note = "use foreign_types instead", since = "0.9.7")]
++pub use foreign_types::ForeignTypeRef as OpenSslTypeRef;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e40105872495a936e46c35e19fb873a7a40f2770
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,92 @@@
++use libc::{c_int, c_char, c_void};
++use std::any::Any;
++use std::panic::{self, AssertUnwindSafe};
++use std::slice;
++
++use error::ErrorStack;
++
++/// Wraps a user-supplied callback and a slot for panics thrown inside the callback (while FFI
++/// frames are on the stack).
++///
++/// When dropped, checks if the callback has panicked, and resumes unwinding if so.
++pub struct CallbackState<F> {
++    /// The user callback. Taken out of the `Option` when called.
++    cb: Option<F>,
++    /// If the callback panics, we place the panic object here, to be re-thrown once OpenSSL
++    /// returns.
++    panic: Option<Box<Any + Send + 'static>>,
++}
++
++impl<F> CallbackState<F> {
++    pub fn new(callback: F) -> Self {
++        CallbackState {
++            cb: Some(callback),
++            panic: None,
++        }
++    }
++}
++
++impl<F> Drop for CallbackState<F> {
++    fn drop(&mut self) {
++        if let Some(panic) = self.panic.take() {
++            panic::resume_unwind(panic);
++        }
++    }
++}
++
++pub unsafe extern "C" fn invoke_passwd_cb_old<F>(
++    buf: *mut c_char,
++    size: c_int,
++    _rwflag: c_int,
++    cb_state: *mut c_void,
++) -> c_int
++where
++    F: FnOnce(&mut [c_char]) -> usize,
++{
++    let callback = &mut *(cb_state as *mut CallbackState<F>);
++
++    let result = panic::catch_unwind(AssertUnwindSafe(|| {
++        let pass_slice = slice::from_raw_parts_mut(buf, size as usize);
++        callback.cb.take().unwrap()(pass_slice)
++    }));
++
++    match result {
++        Ok(len) => len as c_int,
++        Err(err) => {
++            callback.panic = Some(err);
++            0
++        }
++    }
++}
++
++/// Password callback function, passed to private key loading functions.
++///
++/// `cb_state` is expected to be a pointer to a `CallbackState`.
++pub unsafe extern "C" fn invoke_passwd_cb<F>(
++    buf: *mut c_char,
++    size: c_int,
++    _rwflag: c_int,
++    cb_state: *mut c_void,
++) -> c_int
++where
++    F: FnOnce(&mut [u8]) -> Result<usize, ErrorStack>,
++{
++    let callback = &mut *(cb_state as *mut CallbackState<F>);
++
++    let result = panic::catch_unwind(AssertUnwindSafe(|| {
++        let pass_slice = slice::from_raw_parts_mut(buf as *mut u8, size as usize);
++        callback.cb.take().unwrap()(pass_slice)
++    }));
++
++    match result {
++        Ok(Ok(len)) => len as c_int,
++        Ok(Err(_)) => {
++            // FIXME restore error stack
++            0
++        }
++        Err(err) => {
++            callback.panic = Some(err);
++            0
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..002b0ca09c1dc8b0a0462630a013726c8502bbae
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,46 @@@
++use libc::c_uint;
++use ffi;
++use foreign_types::ForeignTypeRef;
++
++use cvt;
++use error::ErrorStack;
++
++bitflags! {
++    pub struct X509CheckFlags: c_uint {
++        const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT = ffi::X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT;
++        const X509_CHECK_FLAG_NO_WILDCARDS = ffi::X509_CHECK_FLAG_NO_WILDCARDS;
++        const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS = ffi::X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS;
++        const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS = ffi::X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS;
++        const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS
++            = ffi::X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS;
++        /// Requires the `v110` feature and OpenSSL 1.1.0.
++        #[cfg(all(feature = "v110", ossl110))]
++        const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT = ffi::X509_CHECK_FLAG_NEVER_CHECK_SUBJECT;
++    }
++}
++
++foreign_type! {
++    type CType = ffi::X509_VERIFY_PARAM;
++    fn drop = ffi::X509_VERIFY_PARAM_free;
++
++    pub struct X509VerifyParam;
++    pub struct X509VerifyParamRef;
++}
++
++impl X509VerifyParamRef {
++    pub fn set_hostflags(&mut self, hostflags: X509CheckFlags) {
++        unsafe {
++            ffi::X509_VERIFY_PARAM_set_hostflags(self.as_ptr(), hostflags.bits);
++        }
++    }
++
++    pub fn set_host(&mut self, host: &str) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::X509_VERIFY_PARAM_set1_host(
++                self.as_ptr(),
++                host.as_ptr() as *const _,
++                host.len(),
++            )).map(|_| ())
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7254d7ba8537ae12805af4e9aa86b7aadce024e8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,126 @@@
++// Licensed under the Apache License, Version 2.0 (the "License");
++// you may not use this file except in compliance with the License.
++// You may obtain a copy of the License at
++//
++//     http://www.apache.org/licenses/LICENSE-2.0
++//
++// Unless required by applicable law or agreed to in writing, software
++// distributed under the License is distributed on an "AS IS" BASIS,
++// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++// See the License for the specific language governing permissions and
++// limitations under the License.
++//
++
++use std::ffi::CStr;
++
++#[cfg(ossl10x)]
++use ffi::{SSLEAY_VERSION as OPENSSL_VERSION, SSLEAY_CFLAGS as OPENSSL_CFLAGS,
++          SSLEAY_BUILT_ON as OPENSSL_BUILT_ON, SSLEAY_PLATFORM as OPENSSL_PLATFORM,
++          SSLEAY_DIR as OPENSSL_DIR, SSLeay as OpenSSL_version_num,
++          SSLeay_version as OpenSSL_version};
++
++#[cfg(ossl110)]
++use ffi::{OPENSSL_VERSION, OPENSSL_CFLAGS, OPENSSL_BUILT_ON, OPENSSL_PLATFORM, OPENSSL_DIR,
++          OpenSSL_version_num, OpenSSL_version};
++
++/// OPENSSL_VERSION_NUMBER is a numeric release version identifier:
++///
++/// `MNNFFPPS: major minor fix patch status`
++///
++/// The status nibble has one of the values 0 for development, 1 to e for betas 1 to 14, and f for release.
++///
++/// for example
++///
++/// `0x000906000 == 0.9.6 dev`
++/// `0x000906023 == 0.9.6b beta 3`
++/// `0x00090605f == 0.9.6e release`
++///
++/// Versions prior to 0.9.3 have identifiers < 0x0930. Versions between 0.9.3 and 0.9.5 had a version identifier with this interpretation:
++///
++/// `MMNNFFRBB major minor fix final beta/patch`
++///
++/// for example
++///
++/// `0x000904100 == 0.9.4 release`
++/// `0x000905000 == 0.9.5 dev`
++///
++/// Version 0.9.5a had an interim interpretation that is like the current one, except the patch level got the highest bit set, to keep continuity. The number was therefore 0x0090581f
++///
++/// The return value of this function can be compared to the macro to make sure that the correct version of the library has been loaded, especially when using DLLs on Windows systems.
++pub fn number() -> i64 {
++    unsafe { OpenSSL_version_num() as i64 }
++}
++
++
++/// The text variant of the version number and the release date. For example, "OpenSSL 0.9.5a 1 Apr 2000".
++pub fn version() -> &'static str {
++    unsafe {
++        CStr::from_ptr(OpenSSL_version(OPENSSL_VERSION))
++            .to_str()
++            .unwrap()
++    }
++}
++
++/// The compiler flags set for the compilation process in the form "compiler: ..." if available or
++/// "compiler: information not available" otherwise.
++pub fn c_flags() -> &'static str {
++    unsafe {
++        CStr::from_ptr(OpenSSL_version(OPENSSL_CFLAGS))
++            .to_str()
++            .unwrap()
++    }
++}
++
++/// The date of the build process in the form "built on: ..." if available or "built on: date not available" otherwise.
++pub fn built_on() -> &'static str {
++    unsafe {
++        CStr::from_ptr(OpenSSL_version(OPENSSL_BUILT_ON))
++            .to_str()
++            .unwrap()
++    }
++}
++
++/// The "Configure" target of the library build in the form "platform: ..." if available or "platform: information not available" otherwise.
++pub fn platform() -> &'static str {
++    unsafe {
++        CStr::from_ptr(OpenSSL_version(OPENSSL_PLATFORM))
++            .to_str()
++            .unwrap()
++    }
++}
++
++/// The "OPENSSLDIR" setting of the library build in the form "OPENSSLDIR: "..."" if available or "OPENSSLDIR: N/A" otherwise.
++pub fn dir() -> &'static str {
++    unsafe {
++        CStr::from_ptr(OpenSSL_version(OPENSSL_DIR))
++            .to_str()
++            .unwrap()
++    }
++}
++
++/// This test ensures that we do not segfault when calling the functions of this module
++/// and that the strings respect a reasonable format.
++#[test]
++fn test_versions() {
++    println!("Number: '{}'", number());
++    println!("Version: '{}'", version());
++    println!("C flags: '{}'", c_flags());
++    println!("Built on: '{}'", built_on());
++    println!("Platform: '{}'", platform());
++    println!("Dir: '{}'", dir());
++
++    #[cfg(not(libressl))]
++    fn expected_name() -> &'static str {
++        "OpenSSL"
++    }
++    #[cfg(libressl)]
++    fn expected_name() -> &'static str {
++        "LibreSSL"
++    }
++
++    assert!(number() > 0);
++    assert!(version().starts_with(expected_name()));
++    assert!(c_flags().starts_with("compiler:"));
++    assert!(built_on().starts_with("built on:"));
++    assert!(dir().starts_with("OPENSSLDIR:"));
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..83a8266030a25cfb5631923cab1f900aed615488
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,672 @@@
++use std::fmt::{self, Write};
++
++use error::ErrorStack;
++use nid::{self, Nid};
++use x509::{X509v3Context, X509Extension};
++
++/// Type-only version of the `Extension` enum.
++///
++/// See the `Extension` documentation for more information on the different
++/// variants.
++#[derive(Clone, Hash, PartialEq, Eq)]
++#[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++pub enum ExtensionType {
++    KeyUsage,
++    ExtKeyUsage,
++    SubjectAltName,
++    IssuerAltName,
++    OtherNid(Nid),
++    OtherStr(String),
++}
++
++/// A X.509 v3 certificate extension.
++///
++/// Only one extension of each type is allow in a certificate.
++/// See RFC 3280 for more information about extensions.
++#[derive(Clone)]
++#[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++pub enum Extension {
++    /// The purposes of the key contained in the certificate
++    KeyUsage(Vec<KeyUsageOption>),
++    /// The extended purposes of the key contained in the certificate
++    ExtKeyUsage(Vec<ExtKeyUsageOption>),
++    /// Subject Alternative Names
++    SubjectAltName(Vec<(AltNameOption, String)>),
++    /// Issuer Alternative Names
++    IssuerAltName(Vec<(AltNameOption, String)>),
++    /// Arbitrary extensions by NID. See `man x509v3_config` for value syntax.
++    ///
++    /// You must not use this to add extensions which this enum can express directly.
++    ///
++    /// ```
++    /// use openssl::x509::extension::Extension::*;
++    /// use openssl::nid;
++    ///
++    /// # let generator = openssl::x509::X509Generator::new();
++    /// generator.add_extension(OtherNid(nid::BASIC_CONSTRAINTS,"critical,CA:TRUE".to_owned()));
++    /// ```
++    OtherNid(Nid, String),
++    /// Arbitrary extensions by OID string. See `man ASN1_generate_nconf` for value syntax.
++    ///
++    /// You must not use this to add extensions which this enum can express directly.
++    ///
++    /// ```
++    /// use openssl::x509::extension::Extension::*;
++    ///
++    /// # let generator = openssl::x509::X509Generator::new();
++    /// generator.add_extension(OtherStr("2.999.2".to_owned(),"ASN1:UTF8:example value".to_owned()));
++    /// ```
++    OtherStr(String, String),
++}
++
++impl Extension {
++    #[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++    pub fn get_type(&self) -> ExtensionType {
++        match self {
++            &Extension::KeyUsage(_) => ExtensionType::KeyUsage,
++            &Extension::ExtKeyUsage(_) => ExtensionType::ExtKeyUsage,
++            &Extension::SubjectAltName(_) => ExtensionType::SubjectAltName,
++            &Extension::IssuerAltName(_) => ExtensionType::IssuerAltName,
++            &Extension::OtherNid(nid, _) => ExtensionType::OtherNid(nid),
++            &Extension::OtherStr(ref s, _) => ExtensionType::OtherStr(s.clone()),
++        }
++    }
++}
++
++impl ExtensionType {
++    #[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++    pub fn get_nid(&self) -> Option<Nid> {
++        match self {
++            &ExtensionType::KeyUsage => Some(nid::KEY_USAGE),
++            &ExtensionType::ExtKeyUsage => Some(nid::EXT_KEY_USAGE),
++            &ExtensionType::SubjectAltName => Some(nid::SUBJECT_ALT_NAME),
++            &ExtensionType::IssuerAltName => Some(nid::ISSUER_ALT_NAME),
++            &ExtensionType::OtherNid(nid) => Some(nid),
++            &ExtensionType::OtherStr(_) => None,
++        }
++    }
++
++    #[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++    pub fn get_name(&self) -> Option<&str> {
++        match self {
++            &ExtensionType::OtherStr(ref s) => Some(s),
++            _ => None,
++        }
++    }
++}
++
++// FIXME: This would be nicer as a method on Iterator<Item=ToString>. This can
++// eventually be replaced by the successor to std::slice::SliceConcatExt.connect
++fn join<I: Iterator<Item = T>, T: ToString>(iter: I, sep: &str) -> String {
++    iter.enumerate().fold(String::new(), |mut acc, (idx, v)| {
++        if idx > 0 {
++            acc.push_str(sep)
++        };
++        acc.push_str(&v.to_string());
++        acc
++    })
++}
++
++impl ToString for Extension {
++    fn to_string(&self) -> String {
++        match self {
++            &Extension::KeyUsage(ref purposes) => join(purposes.iter(), ","),
++            &Extension::ExtKeyUsage(ref purposes) => join(purposes.iter(), ","),
++            &Extension::SubjectAltName(ref names) => {
++                join(
++                    names.iter().map(|&(ref opt, ref val)| {
++                        opt.to_string() + ":" + &val
++                    }),
++                    ",",
++                )
++            }
++            &Extension::IssuerAltName(ref names) => {
++                join(
++                    names.iter().map(|&(ref opt, ref val)| {
++                        opt.to_string() + ":" + &val
++                    }),
++                    ",",
++                )
++            }
++            &Extension::OtherNid(_, ref value) => value.clone(),
++            &Extension::OtherStr(_, ref value) => value.clone(),
++        }
++    }
++}
++
++#[derive(Clone, Copy)]
++#[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++pub enum KeyUsageOption {
++    DigitalSignature,
++    NonRepudiation,
++    KeyEncipherment,
++    DataEncipherment,
++    KeyAgreement,
++    KeyCertSign,
++    CRLSign,
++    EncipherOnly,
++    DecipherOnly,
++}
++
++impl fmt::Display for KeyUsageOption {
++    fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
++        f.pad(match self {
++            &KeyUsageOption::DigitalSignature => "digitalSignature",
++            &KeyUsageOption::NonRepudiation => "nonRepudiation",
++            &KeyUsageOption::KeyEncipherment => "keyEncipherment",
++            &KeyUsageOption::DataEncipherment => "dataEncipherment",
++            &KeyUsageOption::KeyAgreement => "keyAgreement",
++            &KeyUsageOption::KeyCertSign => "keyCertSign",
++            &KeyUsageOption::CRLSign => "cRLSign",
++            &KeyUsageOption::EncipherOnly => "encipherOnly",
++            &KeyUsageOption::DecipherOnly => "decipherOnly",
++        })
++    }
++}
++
++#[derive(Clone)]
++#[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++pub enum ExtKeyUsageOption {
++    ServerAuth,
++    ClientAuth,
++    CodeSigning,
++    EmailProtection,
++    TimeStamping,
++    MsCodeInd,
++    MsCodeCom,
++    MsCtlSign,
++    MsSgc,
++    MsEfs,
++    NsSgc,
++    /// An arbitrary key usage by OID.
++    Other(String),
++}
++
++impl fmt::Display for ExtKeyUsageOption {
++    fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
++        f.pad(match self {
++            &ExtKeyUsageOption::ServerAuth => "serverAuth",
++            &ExtKeyUsageOption::ClientAuth => "clientAuth",
++            &ExtKeyUsageOption::CodeSigning => "codeSigning",
++            &ExtKeyUsageOption::EmailProtection => "emailProtection",
++            &ExtKeyUsageOption::TimeStamping => "timeStamping",
++            &ExtKeyUsageOption::MsCodeInd => "msCodeInd",
++            &ExtKeyUsageOption::MsCodeCom => "msCodeCom",
++            &ExtKeyUsageOption::MsCtlSign => "msCTLSign",
++            &ExtKeyUsageOption::MsSgc => "msSGC",
++            &ExtKeyUsageOption::MsEfs => "msEFS",
++            &ExtKeyUsageOption::NsSgc => "nsSGC",
++            &ExtKeyUsageOption::Other(ref s) => &s[..],
++        })
++    }
++}
++
++#[derive(Clone, Copy)]
++#[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++pub enum AltNameOption {
++    /// The value is specified as OID;content. See `man ASN1_generate_nconf` for more information on the content syntax.
++    ///
++    /// ```
++    /// use openssl::x509::extension::Extension::*;
++    /// use openssl::x509::extension::AltNameOption::Other as OtherName;
++    ///
++    /// # let generator = openssl::x509::X509Generator::new();
++    /// generator.add_extension(SubjectAltName(vec![(OtherName,"2.999.3;ASN1:UTF8:some other name".to_owned())]));
++    /// ```
++    Other,
++    Email,
++    DNS,
++    // X400, // Not supported by OpenSSL
++    Directory,
++    // EDIParty, // Not supported by OpenSSL
++    URI,
++    IPAddress,
++    RegisteredID,
++}
++
++impl fmt::Display for AltNameOption {
++    fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
++        f.pad(match self {
++            &AltNameOption::Other => "otherName",
++            &AltNameOption::Email => "email",
++            &AltNameOption::DNS => "DNS",
++            &AltNameOption::Directory => "dirName",
++            &AltNameOption::URI => "URI",
++            &AltNameOption::IPAddress => "IP",
++            &AltNameOption::RegisteredID => "RID",
++        })
++    }
++}
++
++pub struct BasicConstraints {
++    critical: bool,
++    ca: bool,
++    pathlen: Option<u32>,
++}
++
++impl BasicConstraints {
++    pub fn new() -> BasicConstraints {
++        BasicConstraints {
++            critical: false,
++            ca: false,
++            pathlen: None,
++        }
++    }
++
++    pub fn critical(&mut self) -> &mut BasicConstraints {
++        self.critical = true;
++        self
++    }
++
++    pub fn ca(&mut self) -> &mut BasicConstraints {
++        self.ca = true;
++        self
++    }
++
++    pub fn pathlen(&mut self, pathlen: u32) -> &mut BasicConstraints {
++        self.pathlen = Some(pathlen);
++        self
++    }
++
++    pub fn build(&self) -> Result<X509Extension, ErrorStack> {
++        let mut value = String::new();
++        if self.critical {
++            value.push_str("critical,");
++        }
++        value.push_str("CA:");
++        if self.ca {
++            value.push_str("TRUE");
++        } else {
++            value.push_str("FALSE");
++        }
++        if let Some(pathlen) = self.pathlen {
++            write!(value, ",pathlen:{}", pathlen).unwrap();
++        }
++        X509Extension::new_nid(None, None, nid::BASIC_CONSTRAINTS, &value)
++    }
++}
++
++pub struct KeyUsage {
++    critical: bool,
++    digital_signature: bool,
++    non_repudiation: bool,
++    key_encipherment: bool,
++    data_encipherment: bool,
++    key_agreement: bool,
++    key_cert_sign: bool,
++    crl_sign: bool,
++    encipher_only: bool,
++    decipher_only: bool,
++}
++
++impl KeyUsage {
++    pub fn new() -> KeyUsage {
++        KeyUsage {
++            critical: false,
++            digital_signature: false,
++            non_repudiation: false,
++            key_encipherment: false,
++            data_encipherment: false,
++            key_agreement: false,
++            key_cert_sign: false,
++            crl_sign: false,
++            encipher_only: false,
++            decipher_only: false,
++        }
++    }
++
++    pub fn critical(&mut self) -> &mut KeyUsage {
++        self.critical = true;
++        self
++    }
++
++    pub fn digital_signature(&mut self) -> &mut KeyUsage {
++        self.digital_signature = true;
++        self
++    }
++
++    pub fn non_repudiation(&mut self) -> &mut KeyUsage {
++        self.non_repudiation = true;
++        self
++    }
++
++    pub fn key_encipherment(&mut self) -> &mut KeyUsage {
++        self.key_encipherment = true;
++        self
++    }
++
++    pub fn data_encipherment(&mut self) -> &mut KeyUsage {
++        self.data_encipherment = true;
++        self
++    }
++
++    pub fn key_agreement(&mut self) -> &mut KeyUsage {
++        self.key_agreement = true;
++        self
++    }
++
++    pub fn key_cert_sign(&mut self) -> &mut KeyUsage {
++        self.key_cert_sign = true;
++        self
++    }
++
++    pub fn crl_sign(&mut self) -> &mut KeyUsage {
++        self.crl_sign = true;
++        self
++    }
++
++    pub fn encipher_only(&mut self) -> &mut KeyUsage {
++        self.encipher_only = true;
++        self
++    }
++
++    pub fn decipher_only(&mut self) -> &mut KeyUsage {
++        self.decipher_only = true;
++        self
++    }
++
++    pub fn build(&self) -> Result<X509Extension, ErrorStack> {
++        let mut value = String::new();
++        let mut first = true;
++        append(&mut value, &mut first, self.critical, "critical");
++        append(
++            &mut value,
++            &mut first,
++            self.digital_signature,
++            "digitalSignature",
++        );
++        append(
++            &mut value,
++            &mut first,
++            self.non_repudiation,
++            "nonRepudiation",
++        );
++        append(
++            &mut value,
++            &mut first,
++            self.key_encipherment,
++            "keyEncipherment",
++        );
++        append(
++            &mut value,
++            &mut first,
++            self.data_encipherment,
++            "dataEncipherment",
++        );
++        append(&mut value, &mut first, self.key_agreement, "keyAgreement");
++        append(&mut value, &mut first, self.key_cert_sign, "keyCertSign");
++        append(&mut value, &mut first, self.crl_sign, "cRLSign");
++        append(&mut value, &mut first, self.encipher_only, "encipherOnly");
++        append(&mut value, &mut first, self.decipher_only, "decipherOnly");
++        X509Extension::new_nid(None, None, nid::KEY_USAGE, &value)
++    }
++}
++
++pub struct ExtendedKeyUsage {
++    critical: bool,
++    server_auth: bool,
++    client_auth: bool,
++    code_signing: bool,
++    email_protection: bool,
++    time_stamping: bool,
++    ms_code_ind: bool,
++    ms_code_com: bool,
++    ms_ctl_sign: bool,
++    ms_sgc: bool,
++    ms_efs: bool,
++    ns_sgc: bool,
++    other: Vec<String>,
++}
++
++impl ExtendedKeyUsage {
++    pub fn new() -> ExtendedKeyUsage {
++        ExtendedKeyUsage {
++            critical: false,
++            server_auth: false,
++            client_auth: false,
++            code_signing: false,
++            email_protection: false,
++            time_stamping: false,
++            ms_code_ind: false,
++            ms_code_com: false,
++            ms_ctl_sign: false,
++            ms_sgc: false,
++            ms_efs: false,
++            ns_sgc: false,
++            other: vec![],
++        }
++    }
++
++    pub fn critical(&mut self) -> &mut ExtendedKeyUsage {
++        self.critical = true;
++        self
++    }
++
++    pub fn server_auth(&mut self) -> &mut ExtendedKeyUsage {
++        self.server_auth = true;
++        self
++    }
++
++    pub fn client_auth(&mut self) -> &mut ExtendedKeyUsage {
++        self.client_auth = true;
++        self
++    }
++
++    pub fn code_signing(&mut self) -> &mut ExtendedKeyUsage {
++        self.code_signing = true;
++        self
++    }
++
++    pub fn time_stamping(&mut self) -> &mut ExtendedKeyUsage {
++        self.time_stamping = true;
++        self
++    }
++
++    pub fn ms_code_ind(&mut self) -> &mut ExtendedKeyUsage {
++        self.ms_code_ind = true;
++        self
++    }
++
++    pub fn ms_code_com(&mut self) -> &mut ExtendedKeyUsage {
++        self.ms_code_com = true;
++        self
++    }
++
++    pub fn ms_ctl_sign(&mut self) -> &mut ExtendedKeyUsage {
++        self.ms_ctl_sign = true;
++        self
++    }
++
++    pub fn ms_sgc(&mut self) -> &mut ExtendedKeyUsage {
++        self.ms_sgc = true;
++        self
++    }
++
++    pub fn ms_efs(&mut self) -> &mut ExtendedKeyUsage {
++        self.ms_efs = true;
++        self
++    }
++
++    pub fn ns_sgc(&mut self) -> &mut ExtendedKeyUsage {
++        self.ns_sgc = true;
++        self
++    }
++
++    pub fn other(&mut self, other: &str) -> &mut ExtendedKeyUsage {
++        self.other.push(other.to_owned());
++        self
++    }
++
++    pub fn build(&self) -> Result<X509Extension, ErrorStack> {
++        let mut value = String::new();
++        let mut first = true;
++        append(&mut value, &mut first, self.critical, "critical");
++        append(&mut value, &mut first, self.server_auth, "serverAuth");
++        append(&mut value, &mut first, self.client_auth, "clientAuth");
++        append(&mut value, &mut first, self.code_signing, "codeSigning");
++        append(
++            &mut value,
++            &mut first,
++            self.email_protection,
++            "emailProtection",
++        );
++        append(&mut value, &mut first, self.time_stamping, "timeStamping");
++        append(&mut value, &mut first, self.ms_code_ind, "msCodeInd");
++        append(&mut value, &mut first, self.ms_code_com, "msCodeCom");
++        append(&mut value, &mut first, self.ms_ctl_sign, "msCTLSign");
++        append(&mut value, &mut first, self.ms_sgc, "msSGC");
++        append(&mut value, &mut first, self.ms_efs, "msEFS");
++        append(&mut value, &mut first, self.ns_sgc, "nsSGC");
++        for other in &self.other {
++            append(&mut value, &mut first, true, other);
++        }
++        X509Extension::new_nid(None, None, nid::EXT_KEY_USAGE, &value)
++    }
++}
++
++pub struct SubjectKeyIdentifier {
++    critical: bool,
++}
++
++impl SubjectKeyIdentifier {
++    pub fn new() -> SubjectKeyIdentifier {
++        SubjectKeyIdentifier { critical: false }
++    }
++
++    pub fn critical(&mut self) -> &mut SubjectKeyIdentifier {
++        self.critical = true;
++        self
++    }
++
++    pub fn build(&self, ctx: &X509v3Context) -> Result<X509Extension, ErrorStack> {
++        let mut value = String::new();
++        let mut first = true;
++        append(&mut value, &mut first, self.critical, "critical");
++        append(&mut value, &mut first, true, "hash");
++        X509Extension::new_nid(None, Some(ctx), nid::SUBJECT_KEY_IDENTIFIER, &value)
++    }
++}
++
++pub struct AuthorityKeyIdentifier {
++    critical: bool,
++    keyid: Option<bool>,
++    issuer: Option<bool>,
++}
++
++impl AuthorityKeyIdentifier {
++    pub fn new() -> AuthorityKeyIdentifier {
++        AuthorityKeyIdentifier {
++            critical: false,
++            keyid: None,
++            issuer: None,
++        }
++    }
++
++    pub fn critical(&mut self) -> &mut AuthorityKeyIdentifier {
++        self.critical = true;
++        self
++    }
++
++    pub fn keyid(&mut self, always: bool) -> &mut AuthorityKeyIdentifier {
++        self.keyid = Some(always);
++        self
++    }
++
++    pub fn issuer(&mut self, always: bool) -> &mut AuthorityKeyIdentifier {
++        self.issuer = Some(always);
++        self
++    }
++
++    pub fn build(&self, ctx: &X509v3Context) -> Result<X509Extension, ErrorStack> {
++        let mut value = String::new();
++        let mut first = true;
++        append(&mut value, &mut first, self.critical, "critical");
++        match self.keyid {
++            Some(true) => append(&mut value, &mut first, true, "keyid:always"),
++            Some(false) => append(&mut value, &mut first, true, "keyid"),
++            None => {}
++        }
++        match self.issuer {
++            Some(true) => append(&mut value, &mut first, true, "issuer:always"),
++            Some(false) => append(&mut value, &mut first, true, "issuer"),
++            None => {}
++        }
++        X509Extension::new_nid(None, Some(ctx), nid::AUTHORITY_KEY_IDENTIFIER, &value)
++    }
++}
++
++pub struct SubjectAlternativeName {
++    critical: bool,
++    names: Vec<String>,
++}
++
++impl SubjectAlternativeName {
++    pub fn new() -> SubjectAlternativeName {
++        SubjectAlternativeName {
++            critical: false,
++            names: vec![],
++        }
++    }
++
++    pub fn critical(&mut self) -> &mut SubjectAlternativeName {
++        self.critical = true;
++        self
++    }
++
++    pub fn email(&mut self, email: &str) -> &mut SubjectAlternativeName {
++        self.names.push(format!("email:{}", email));
++        self
++    }
++
++    pub fn uri(&mut self, uri: &str) -> &mut SubjectAlternativeName {
++        self.names.push(format!("URI:{}", uri));
++        self
++    }
++
++    pub fn dns(&mut self, dns: &str) -> &mut SubjectAlternativeName {
++        self.names.push(format!("DNS:{}", dns));
++        self
++    }
++
++    pub fn rid(&mut self, rid: &str) -> &mut SubjectAlternativeName {
++        self.names.push(format!("RID:{}", rid));
++        self
++    }
++
++    pub fn ip(&mut self, ip: &str) -> &mut SubjectAlternativeName {
++        self.names.push(format!("IP:{}", ip));
++        self
++    }
++
++    pub fn dir_name(&mut self, dir_name: &str) -> &mut SubjectAlternativeName {
++        self.names.push(format!("dirName:{}", dir_name));
++        self
++    }
++
++    pub fn other_name(&mut self, other_name: &str) -> &mut SubjectAlternativeName {
++        self.names.push(format!("otherName:{}", other_name));
++        self
++    }
++
++    pub fn build(&self, ctx: &X509v3Context) -> Result<X509Extension, ErrorStack> {
++        let mut value = String::new();
++        let mut first = true;
++        append(&mut value, &mut first, self.critical, "critical");
++        for name in &self.names {
++            append(&mut value, &mut first, true, name);
++        }
++        X509Extension::new_nid(None, Some(ctx), nid::SUBJECT_ALT_NAME, &value)
++    }
++}
++
++fn append(value: &mut String, first: &mut bool, should: bool, element: &str) {
++    if !should {
++        return;
++    }
++
++    if !*first {
++        value.push(',');
++    }
++    *first = false;
++    value.push_str(element);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c0594746a61209b8219722afe28f2ab49eadde38
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1238 @@@
++#![allow(deprecated)]
++use libc::{c_int, c_long};
++use ffi;
++use foreign_types::{ForeignType, ForeignTypeRef};
++use std::borrow::Borrow;
++use std::collections::HashMap;
++use std::error::Error;
++use std::ffi::{CStr, CString};
++use std::fmt;
++use std::marker::PhantomData;
++use std::mem;
++use std::path::Path;
++use std::ptr;
++use std::slice;
++use std::str;
++
++use {cvt, cvt_p, cvt_n};
++use asn1::{Asn1StringRef, Asn1Time, Asn1TimeRef, Asn1BitStringRef, Asn1IntegerRef, Asn1ObjectRef};
++use bio::MemBioSlice;
++use bn::{BigNum, MSB_MAYBE_ZERO};
++use conf::ConfRef;
++use error::ErrorStack;
++use hash::MessageDigest;
++use nid::{self, Nid};
++use pkey::{PKey, PKeyRef};
++use stack::{Stack, StackRef, Stackable};
++use string::OpensslString;
++use ssl::SslRef;
++
++#[cfg(ossl10x)]
++use ffi::{X509_set_notBefore, X509_set_notAfter, ASN1_STRING_data, X509_STORE_CTX_get_chain};
++#[cfg(ossl110)]
++use ffi::{X509_set1_notBefore as X509_set_notBefore, X509_set1_notAfter as X509_set_notAfter,
++          ASN1_STRING_get0_data as ASN1_STRING_data,
++          X509_STORE_CTX_get0_chain as X509_STORE_CTX_get_chain};
++
++#[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
++pub mod verify;
++
++use x509::extension::{ExtensionType, Extension};
++
++pub mod extension;
++pub mod store;
++
++#[cfg(test)]
++mod tests;
++
++pub struct X509FileType(c_int);
++
++impl X509FileType {
++    pub fn as_raw(&self) -> c_int {
++        self.0
++    }
++}
++
++pub const X509_FILETYPE_PEM: X509FileType = X509FileType(ffi::X509_FILETYPE_PEM);
++pub const X509_FILETYPE_ASN1: X509FileType = X509FileType(ffi::X509_FILETYPE_ASN1);
++pub const X509_FILETYPE_DEFAULT: X509FileType = X509FileType(ffi::X509_FILETYPE_DEFAULT);
++
++foreign_type! {
++    type CType = ffi::X509_STORE_CTX;
++    fn drop = ffi::X509_STORE_CTX_free;
++
++    pub struct X509StoreContext;
++    pub struct X509StoreContextRef;
++}
++
++impl X509StoreContextRef {
++    pub fn error(&self) -> Option<X509VerifyError> {
++        unsafe { X509VerifyError::from_raw(ffi::X509_STORE_CTX_get_error(self.as_ptr()) as c_long) }
++    }
++
++    pub fn current_cert(&self) -> Option<&X509Ref> {
++        unsafe {
++            let ptr = ffi::X509_STORE_CTX_get_current_cert(self.as_ptr());
++            if ptr.is_null() {
++                None
++            } else {
++                Some(X509Ref::from_ptr(ptr))
++            }
++        }
++    }
++
++    pub fn error_depth(&self) -> u32 {
++        unsafe { ffi::X509_STORE_CTX_get_error_depth(self.as_ptr()) as u32 }
++    }
++
++    pub fn chain(&self) -> Option<&StackRef<X509>> {
++        unsafe {
++            let chain = X509_STORE_CTX_get_chain(self.as_ptr());
++
++            if chain.is_null() {
++                return None;
++            }
++
++            Some(StackRef::from_ptr(chain))
++        }
++    }
++
++    /// Returns a reference to the `Ssl` associated with this context.
++    pub fn ssl(&self) -> Result<Option<&SslRef>, ErrorStack> {
++        unsafe {
++            let idx = try!(cvt_n(ffi::SSL_get_ex_data_X509_STORE_CTX_idx()));
++            let ssl = ffi::X509_STORE_CTX_get_ex_data(self.as_ptr(), idx);
++            if ssl.is_null() {
++                Ok(None)
++            } else {
++                Ok(Some(SslRef::from_ptr(ssl as *mut ffi::SSL)))
++            }
++        }
++    }
++}
++
++#[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++pub struct X509Generator {
++    days: u32,
++    names: Vec<(String, String)>,
++    extensions: Extensions,
++    hash_type: MessageDigest,
++}
++
++#[allow(deprecated)]
++impl X509Generator {
++    /// Creates a new generator with the following defaults:
++    ///
++    /// validity period: 365 days
++    ///
++    /// CN: "rust-openssl"
++    ///
++    /// hash: SHA1
++    #[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++    pub fn new() -> X509Generator {
++        X509Generator {
++            days: 365,
++            names: vec![],
++            extensions: Extensions::new(),
++            hash_type: MessageDigest::sha1(),
++        }
++    }
++
++    /// Sets certificate validity period in days since today
++    #[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++    pub fn set_valid_period(mut self, days: u32) -> X509Generator {
++        self.days = days;
++        self
++    }
++
++    /// Add attribute to the name of the certificate
++    ///
++    /// ```
++    /// # let generator = openssl::x509::X509Generator::new();
++    /// generator.add_name("CN".to_string(),"example.com".to_string());
++    /// ```
++    #[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++    pub fn add_name(mut self, attr_type: String, attr_value: String) -> X509Generator {
++        self.names.push((attr_type, attr_value));
++        self
++    }
++
++    /// Add multiple attributes to the name of the certificate
++    ///
++    /// ```
++    /// # let generator = openssl::x509::X509Generator::new();
++    /// generator.add_names(vec![("CN".to_string(),"example.com".to_string())]);
++    /// ```
++    #[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++    pub fn add_names<I>(mut self, attrs: I) -> X509Generator
++    where
++        I: IntoIterator<Item = (String, String)>,
++    {
++        self.names.extend(attrs);
++        self
++    }
++
++    /// Add an extension to a certificate
++    ///
++    /// If the extension already exists, it will be replaced.
++    ///
++    /// ```
++    /// use openssl::x509::extension::Extension::*;
++    /// use openssl::x509::extension::KeyUsageOption::*;
++    ///
++    /// # let generator = openssl::x509::X509Generator::new();
++    /// generator.add_extension(KeyUsage(vec![DigitalSignature, KeyEncipherment]));
++    /// ```
++    #[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++    pub fn add_extension(mut self, ext: extension::Extension) -> X509Generator {
++        self.extensions.add(ext);
++        self
++    }
++
++    /// Add multiple extensions to a certificate
++    ///
++    /// If any of the extensions already exist, they will be replaced.
++    ///
++    /// ```
++    /// use openssl::x509::extension::Extension::*;
++    /// use openssl::x509::extension::KeyUsageOption::*;
++    ///
++    /// # let generator = openssl::x509::X509Generator::new();
++    /// generator.add_extensions(vec![KeyUsage(vec![DigitalSignature, KeyEncipherment])]);
++    /// ```
++    #[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++    pub fn add_extensions<I>(mut self, exts: I) -> X509Generator
++    where
++        I: IntoIterator<Item = extension::Extension>,
++    {
++        for ext in exts {
++            self.extensions.add(ext);
++        }
++
++        self
++    }
++
++    #[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++    pub fn set_sign_hash(mut self, hash_type: MessageDigest) -> X509Generator {
++        self.hash_type = hash_type;
++        self
++    }
++
++    /// Sets the certificate public-key, then self-sign and return it
++    #[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++    pub fn sign(&self, p_key: &PKeyRef) -> Result<X509, ErrorStack> {
++        let mut builder = try!(X509::builder());
++        try!(builder.set_version(2));
++
++        let mut serial = try!(BigNum::new());
++        try!(serial.rand(128, MSB_MAYBE_ZERO, false));
++        let serial = try!(serial.to_asn1_integer());
++        try!(builder.set_serial_number(&serial));
++
++        let not_before = try!(Asn1Time::days_from_now(0));
++        try!(builder.set_not_before(&not_before));
++        let not_after = try!(Asn1Time::days_from_now(self.days));
++        try!(builder.set_not_after(&not_after));
++
++        try!(builder.set_pubkey(p_key));
++
++        let mut name = try!(X509Name::builder());
++        if self.names.is_empty() {
++            try!(name.append_entry_by_nid(nid::COMMONNAME, "rust-openssl"));
++        } else {
++            for &(ref key, ref value) in &self.names {
++                try!(name.append_entry_by_text(key, value));
++            }
++        }
++        let name = name.build();
++
++        try!(builder.set_subject_name(&name));
++        try!(builder.set_issuer_name(&name));
++
++        for (exttype, ext) in self.extensions.iter() {
++            let extension = match exttype.get_nid() {
++                Some(nid) => {
++                    let ctx = builder.x509v3_context(None, None);
++                    try!(X509Extension::new_nid(
++                        None,
++                        Some(&ctx),
++                        nid,
++                        &ext.to_string(),
++                    ))
++                }
++                None => {
++                    let ctx = builder.x509v3_context(None, None);
++                    try!(X509Extension::new(
++                        None,
++                        Some(&ctx),
++                        &exttype.get_name().unwrap(),
++                        &ext.to_string(),
++                    ))
++                }
++            };
++            try!(builder.append_extension(extension));
++        }
++
++        try!(builder.sign(p_key, self.hash_type));
++        Ok(builder.build())
++    }
++
++    /// Obtain a certificate signing request (CSR)
++    #[deprecated(since = "0.9.7", note = "use X509Builder and X509ReqBuilder instead")]
++    pub fn request(&self, p_key: &PKeyRef) -> Result<X509Req, ErrorStack> {
++        let cert = match self.sign(p_key) {
++            Ok(c) => c,
++            Err(x) => return Err(x),
++        };
++
++        unsafe {
++            let req = try!(cvt_p(ffi::X509_to_X509_REQ(
++                cert.as_ptr(),
++                ptr::null_mut(),
++                ptr::null(),
++            )));
++            let req = X509Req::from_ptr(req);
++
++            let exts = compat::X509_get0_extensions(cert.as_ptr());
++            if exts != ptr::null_mut() {
++                try!(cvt(
++                    ffi::X509_REQ_add_extensions(req.as_ptr(), exts as *mut _),
++                ));
++            }
++
++            let hash_fn = self.hash_type.as_ptr();
++            try!(cvt(
++                ffi::X509_REQ_sign(req.as_ptr(), p_key.as_ptr(), hash_fn),
++            ));
++
++            Ok(req)
++        }
++    }
++}
++
++/// A builder type which can create `X509` objects.
++pub struct X509Builder(X509);
++
++impl X509Builder {
++    /// Creates a new builder.
++    pub fn new() -> Result<X509Builder, ErrorStack> {
++        unsafe {
++            ffi::init();
++            cvt_p(ffi::X509_new()).map(|p| X509Builder(X509(p)))
++        }
++    }
++
++    /// Sets the notAfter constraint on the certificate.
++    pub fn set_not_after(&mut self, not_after: &Asn1TimeRef) -> Result<(), ErrorStack> {
++        unsafe { cvt(X509_set_notAfter(self.0.as_ptr(), not_after.as_ptr())).map(|_| ()) }
++    }
++
++    /// Sets the notBefore constraint on the certificate.
++    pub fn set_not_before(&mut self, not_before: &Asn1TimeRef) -> Result<(), ErrorStack> {
++        unsafe { cvt(X509_set_notBefore(self.0.as_ptr(), not_before.as_ptr())).map(|_| ()) }
++    }
++
++    /// Sets the version of the certificate.
++    ///
++    /// Note that the version is zero-indexed; that is, a certificate corresponding to version 3 of
++    /// the X.509 standard should pass `2` to this method.
++    pub fn set_version(&mut self, version: i32) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::X509_set_version(self.0.as_ptr(), version.into())).map(|_| ()) }
++    }
++
++    /// Sets the serial number of the certificate.
++    pub fn set_serial_number(&mut self, serial_number: &Asn1IntegerRef) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::X509_set_serialNumber(
++                self.0.as_ptr(),
++                serial_number.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Sets the issuer name of the certificate.
++    pub fn set_issuer_name(&mut self, issuer_name: &X509NameRef) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::X509_set_issuer_name(
++                self.0.as_ptr(),
++                issuer_name.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Sets the subject name of the certificate.
++    ///
++    /// When building certificates, the `C`, `ST`, and `O` options are common when using the openssl command line tools.
++    /// The `CN` field is used for the common name, such as a DNS name.
++    ///
++    /// ```
++    /// use openssl::x509::{X509, X509NameBuilder};
++    ///
++    /// let mut x509_name = openssl::x509::X509NameBuilder::new().unwrap();
++    /// x509_name.append_entry_by_text("C", "US").unwrap();
++    /// x509_name.append_entry_by_text("ST", "CA").unwrap();
++    /// x509_name.append_entry_by_text("O", "Some organization").unwrap();
++    /// x509_name.append_entry_by_text("CN", "www.example.com").unwrap();
++    /// let x509_name = x509_name.build();
++    ///
++    /// let mut x509 = openssl::x509::X509::builder().unwrap();
++    /// x509.set_subject_name(&x509_name).unwrap();
++    /// ```
++    pub fn set_subject_name(&mut self, subject_name: &X509NameRef) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::X509_set_subject_name(
++                self.0.as_ptr(),
++                subject_name.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    /// Sets the public key associated with the certificate.
++    pub fn set_pubkey(&mut self, key: &PKeyRef) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::X509_set_pubkey(self.0.as_ptr(), key.as_ptr())).map(|_| ()) }
++    }
++
++    /// Returns a context object which is needed to create certain X509 extension values.
++    ///
++    /// Set `issuer` to `None` if the certificate will be self-signed.
++    pub fn x509v3_context<'a>(
++        &'a self,
++        issuer: Option<&'a X509Ref>,
++        conf: Option<&'a ConfRef>,
++    ) -> X509v3Context<'a> {
++        unsafe {
++            let mut ctx = mem::zeroed();
++
++            let issuer = match issuer {
++                Some(issuer) => issuer.as_ptr(),
++                None => self.0.as_ptr(),
++            };
++            let subject = self.0.as_ptr();
++            ffi::X509V3_set_ctx(
++                &mut ctx,
++                issuer,
++                subject,
++                ptr::null_mut(),
++                ptr::null_mut(),
++                0,
++            );
++
++            // nodb case taken care of since we zeroed ctx above
++            if let Some(conf) = conf {
++                ffi::X509V3_set_nconf(&mut ctx, conf.as_ptr());
++            }
++
++            X509v3Context(ctx, PhantomData)
++        }
++    }
++
++    /// Adds an X509 extension value to the certificate.
++    pub fn append_extension(&mut self, extension: X509Extension) -> Result<(), ErrorStack> {
++        unsafe {
++            try!(cvt(
++                ffi::X509_add_ext(self.0.as_ptr(), extension.as_ptr(), -1),
++            ));
++            mem::forget(extension);
++            Ok(())
++        }
++    }
++
++    /// Signs the certificate with a private key.
++    pub fn sign(&mut self, key: &PKeyRef, hash: MessageDigest) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::X509_sign(self.0.as_ptr(), key.as_ptr(), hash.as_ptr())).map(|_| ()) }
++    }
++
++    /// Consumes the builder, returning the certificate.
++    pub fn build(self) -> X509 {
++        self.0
++    }
++}
++
++foreign_type! {
++    type CType = ffi::X509;
++    fn drop = ffi::X509_free;
++
++    pub struct X509;
++    pub struct X509Ref;
++}
++
++impl X509Ref {
++    pub fn subject_name(&self) -> &X509NameRef {
++        unsafe {
++            let name = ffi::X509_get_subject_name(self.as_ptr());
++            X509NameRef::from_ptr(name)
++        }
++    }
++
++    /// Returns this certificate's SAN entries, if they exist.
++    pub fn subject_alt_names(&self) -> Option<Stack<GeneralName>> {
++        unsafe {
++            let stack = ffi::X509_get_ext_d2i(
++                self.as_ptr(),
++                ffi::NID_subject_alt_name,
++                ptr::null_mut(),
++                ptr::null_mut(),
++            );
++            if stack.is_null() {
++                return None;
++            }
++
++            Some(Stack::from_ptr(stack as *mut _))
++        }
++    }
++
++    pub fn public_key(&self) -> Result<PKey, ErrorStack> {
++        unsafe {
++            let pkey = try!(cvt_p(ffi::X509_get_pubkey(self.as_ptr())));
++            Ok(PKey::from_ptr(pkey))
++        }
++    }
++
++    /// Returns certificate fingerprint calculated using provided hash
++    pub fn fingerprint(&self, hash_type: MessageDigest) -> Result<Vec<u8>, ErrorStack> {
++        unsafe {
++            let evp = hash_type.as_ptr();
++            let mut len = ffi::EVP_MAX_MD_SIZE;
++            let mut buf = vec![0u8; len as usize];
++            try!(cvt(ffi::X509_digest(
++                self.as_ptr(),
++                evp,
++                buf.as_mut_ptr() as *mut _,
++                &mut len,
++            )));
++            buf.truncate(len as usize);
++            Ok(buf)
++        }
++    }
++
++    /// Returns the certificate's Not After validity period.
++    pub fn not_after(&self) -> &Asn1TimeRef {
++        unsafe {
++            let date = compat::X509_get_notAfter(self.as_ptr());
++            assert!(!date.is_null());
++            Asn1TimeRef::from_ptr(date)
++        }
++    }
++
++    /// Returns the certificate's Not Before validity period.
++    pub fn not_before(&self) -> &Asn1TimeRef {
++        unsafe {
++            let date = compat::X509_get_notBefore(self.as_ptr());
++            assert!(!date.is_null());
++            Asn1TimeRef::from_ptr(date)
++        }
++    }
++
++    /// Returns the certificate's signature
++    pub fn signature(&self) -> &Asn1BitStringRef {
++        unsafe {
++            let mut signature = ptr::null();
++            compat::X509_get0_signature(&mut signature, ptr::null_mut(), self.as_ptr());
++            assert!(!signature.is_null());
++            Asn1BitStringRef::from_ptr(signature as *mut _)
++        }
++    }
++
++    /// Returns the certificate's signature algorithm.
++    pub fn signature_algorithm(&self) -> &X509AlgorithmRef {
++        unsafe {
++            let mut algor = ptr::null();
++            compat::X509_get0_signature(ptr::null_mut(), &mut algor, self.as_ptr());
++            assert!(!algor.is_null());
++            X509AlgorithmRef::from_ptr(algor as *mut _)
++        }
++    }
++
++    /// Returns the list of OCSP responder URLs specified in the certificate's Authority Information
++    /// Access field.
++    pub fn ocsp_responders(&self) -> Result<Stack<OpensslString>, ErrorStack> {
++        unsafe { cvt_p(ffi::X509_get1_ocsp(self.as_ptr())).map(|p| Stack::from_ptr(p)) }
++    }
++
++    /// Checks that this certificate issued `subject`.
++    pub fn issued(&self, subject: &X509Ref) -> Result<(), X509VerifyError> {
++        unsafe {
++            let r = ffi::X509_check_issued(self.as_ptr(), subject.as_ptr());
++            match X509VerifyError::from_raw(r as c_long) {
++                Some(e) => Err(e),
++                None => Ok(()),
++            }
++        }
++    }
++
++    to_pem!(ffi::PEM_write_bio_X509);
++    to_der!(ffi::i2d_X509);
++}
++
++impl ToOwned for X509Ref {
++    type Owned = X509;
++
++    fn to_owned(&self) -> X509 {
++        unsafe {
++            compat::X509_up_ref(self.as_ptr());
++            X509::from_ptr(self.as_ptr())
++        }
++    }
++}
++
++impl X509 {
++    /// Returns a new builder.
++    pub fn builder() -> Result<X509Builder, ErrorStack> {
++        X509Builder::new()
++    }
++
++    from_pem!(X509, ffi::PEM_read_bio_X509);
++    from_der!(X509, ffi::d2i_X509);
++
++    /// Deserializes a list of PEM-formatted certificates.
++    pub fn stack_from_pem(pem: &[u8]) -> Result<Vec<X509>, ErrorStack> {
++        unsafe {
++            ffi::init();
++            let bio = try!(MemBioSlice::new(pem));
++
++            let mut certs = vec![];
++            loop {
++                let r =
++                    ffi::PEM_read_bio_X509(bio.as_ptr(), ptr::null_mut(), None, ptr::null_mut());
++                if r.is_null() {
++                    let err = ffi::ERR_peek_last_error();
++                    if ffi::ERR_GET_LIB(err) == ffi::ERR_LIB_PEM &&
++                        ffi::ERR_GET_REASON(err) == ffi::PEM_R_NO_START_LINE
++                    {
++                        ffi::ERR_clear_error();
++                        break;
++                    }
++
++                    return Err(ErrorStack::get());
++                } else {
++                    certs.push(X509(r));
++                }
++            }
++
++            Ok(certs)
++        }
++    }
++}
++
++impl Clone for X509 {
++    fn clone(&self) -> X509 {
++        X509Ref::to_owned(self)
++    }
++}
++
++impl AsRef<X509Ref> for X509 {
++    fn as_ref(&self) -> &X509Ref {
++        &*self
++    }
++}
++
++impl AsRef<X509Ref> for X509Ref {
++    fn as_ref(&self) -> &X509Ref {
++        self
++    }
++}
++
++impl Borrow<X509Ref> for X509 {
++    fn borrow(&self) -> &X509Ref {
++        &*self
++    }
++}
++
++impl Stackable for X509 {
++    type StackType = ffi::stack_st_X509;
++}
++
++/// A context object required to construct certain X509 extension values.
++pub struct X509v3Context<'a>(ffi::X509V3_CTX, PhantomData<(&'a X509Ref, &'a ConfRef)>);
++
++impl<'a> X509v3Context<'a> {
++    pub fn as_ptr(&self) -> *mut ffi::X509V3_CTX {
++        &self.0 as *const _ as *mut _
++    }
++}
++
++foreign_type! {
++    type CType = ffi::X509_EXTENSION;
++    fn drop = ffi::X509_EXTENSION_free;
++
++    pub struct X509Extension;
++    pub struct X509ExtensionRef;
++}
++
++impl Stackable for X509Extension {
++    type StackType = ffi::stack_st_X509_EXTENSION;
++}
++
++impl X509Extension {
++    /// Constructs an X509 extension value. See `man x509v3_config` for information on supported
++    /// names and their value formats.
++    ///
++    /// Some extension types, such as `subjectAlternativeName`, require an `X509v3Context` to be
++    /// provided.
++    ///
++    /// See the extension module for builder types which will construct certain common extensions.
++    pub fn new(
++        conf: Option<&ConfRef>,
++        context: Option<&X509v3Context>,
++        name: &str,
++        value: &str,
++    ) -> Result<X509Extension, ErrorStack> {
++        let name = CString::new(name).unwrap();
++        let value = CString::new(value).unwrap();
++        unsafe {
++            ffi::init();
++            let conf = conf.map_or(ptr::null_mut(), ConfRef::as_ptr);
++            let context = context.map_or(ptr::null_mut(), X509v3Context::as_ptr);
++            let name = name.as_ptr() as *mut _;
++            let value = value.as_ptr() as *mut _;
++
++            cvt_p(ffi::X509V3_EXT_nconf(conf, context, name, value)).map(X509Extension)
++        }
++    }
++
++    /// Constructs an X509 extension value. See `man x509v3_config` for information on supported
++    /// extensions and their value formats.
++    ///
++    /// Some extension types, such as `nid::SUBJECT_ALTERNATIVE_NAME`, require an `X509v3Context` to
++    /// be provided.
++    ///
++    /// See the extension module for builder types which will construct certain common extensions.
++    pub fn new_nid(
++        conf: Option<&ConfRef>,
++        context: Option<&X509v3Context>,
++        name: Nid,
++        value: &str,
++    ) -> Result<X509Extension, ErrorStack> {
++        let value = CString::new(value).unwrap();
++        unsafe {
++            ffi::init();
++            let conf = conf.map_or(ptr::null_mut(), ConfRef::as_ptr);
++            let context = context.map_or(ptr::null_mut(), X509v3Context::as_ptr);
++            let name = name.as_raw();
++            let value = value.as_ptr() as *mut _;
++
++            cvt_p(ffi::X509V3_EXT_nconf_nid(conf, context, name, value)).map(X509Extension)
++        }
++    }
++}
++
++pub struct X509NameBuilder(X509Name);
++
++impl X509NameBuilder {
++    pub fn new() -> Result<X509NameBuilder, ErrorStack> {
++        unsafe {
++            ffi::init();
++            cvt_p(ffi::X509_NAME_new()).map(|p| X509NameBuilder(X509Name(p)))
++        }
++    }
++
++    pub fn append_entry_by_text(&mut self, field: &str, value: &str) -> Result<(), ErrorStack> {
++        unsafe {
++            let field = CString::new(field).unwrap();
++            assert!(value.len() <= c_int::max_value() as usize);
++            cvt(ffi::X509_NAME_add_entry_by_txt(
++                self.0.as_ptr(),
++                field.as_ptr() as *mut _,
++                ffi::MBSTRING_UTF8,
++                value.as_ptr(),
++                value.len() as c_int,
++                -1,
++                0,
++            )).map(|_| ())
++        }
++    }
++
++    pub fn append_entry_by_nid(&mut self, field: Nid, value: &str) -> Result<(), ErrorStack> {
++        unsafe {
++            assert!(value.len() <= c_int::max_value() as usize);
++            cvt(ffi::X509_NAME_add_entry_by_NID(
++                self.0.as_ptr(),
++                field.as_raw(),
++                ffi::MBSTRING_UTF8,
++                value.as_ptr() as *mut _,
++                value.len() as c_int,
++                -1,
++                0,
++            )).map(|_| ())
++        }
++    }
++
++    pub fn build(self) -> X509Name {
++        self.0
++    }
++}
++
++foreign_type! {
++    type CType = ffi::X509_NAME;
++    fn drop = ffi::X509_NAME_free;
++
++    pub struct X509Name;
++    pub struct X509NameRef;
++}
++
++impl X509Name {
++    /// Returns a new builder.
++    pub fn builder() -> Result<X509NameBuilder, ErrorStack> {
++        X509NameBuilder::new()
++    }
++
++    /// Loads subject names from a file containing PEM-formatted certificates.
++    ///
++    /// This is commonly used in conjunction with `SslContextBuilder::set_client_ca_list`.
++    pub fn load_client_ca_file<P: AsRef<Path>>(file: P) -> Result<Stack<X509Name>, ErrorStack> {
++        let file = CString::new(file.as_ref().as_os_str().to_str().unwrap()).unwrap();
++        unsafe { cvt_p(ffi::SSL_load_client_CA_file(file.as_ptr())).map(|p| Stack::from_ptr(p)) }
++    }
++}
++
++impl Stackable for X509Name {
++    type StackType = ffi::stack_st_X509_NAME;
++}
++
++impl X509NameRef {
++    pub fn entries_by_nid<'a>(&'a self, nid: Nid) -> X509NameEntries<'a> {
++        X509NameEntries {
++            name: self,
++            nid: nid,
++            loc: -1,
++        }
++    }
++}
++
++pub struct X509NameEntries<'a> {
++    name: &'a X509NameRef,
++    nid: Nid,
++    loc: c_int,
++}
++
++impl<'a> Iterator for X509NameEntries<'a> {
++    type Item = &'a X509NameEntryRef;
++
++    fn next(&mut self) -> Option<&'a X509NameEntryRef> {
++        unsafe {
++            self.loc =
++                ffi::X509_NAME_get_index_by_NID(self.name.as_ptr(), self.nid.as_raw(), self.loc);
++
++            if self.loc == -1 {
++                return None;
++            }
++
++            let entry = ffi::X509_NAME_get_entry(self.name.as_ptr(), self.loc);
++            assert!(!entry.is_null());
++
++            Some(X509NameEntryRef::from_ptr(entry))
++        }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::X509_NAME_ENTRY;
++    fn drop = ffi::X509_NAME_ENTRY_free;
++
++    pub struct X509NameEntry;
++    pub struct X509NameEntryRef;
++}
++
++impl X509NameEntryRef {
++    pub fn data(&self) -> &Asn1StringRef {
++        unsafe {
++            let data = ffi::X509_NAME_ENTRY_get_data(self.as_ptr());
++            Asn1StringRef::from_ptr(data)
++        }
++    }
++}
++
++pub struct X509ReqBuilder(X509Req);
++
++impl X509ReqBuilder {
++    pub fn new() -> Result<X509ReqBuilder, ErrorStack> {
++        unsafe {
++            ffi::init();
++            cvt_p(ffi::X509_REQ_new()).map(|p| X509ReqBuilder(X509Req(p)))
++        }
++
++    }
++
++    pub fn set_version(&mut self, version: i32) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::X509_REQ_set_version(self.0.as_ptr(), version.into())).map(|_| ()) }
++    }
++
++    pub fn set_subject_name(&mut self, subject_name: &X509NameRef) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::X509_REQ_set_subject_name(
++                self.0.as_ptr(),
++                subject_name.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    pub fn set_pubkey(&mut self, key: &PKeyRef) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::X509_REQ_set_pubkey(self.0.as_ptr(), key.as_ptr())).map(|_| ()) }
++    }
++
++    pub fn x509v3_context<'a>(&'a self, conf: Option<&'a ConfRef>) -> X509v3Context<'a> {
++        unsafe {
++            let mut ctx = mem::zeroed();
++
++            ffi::X509V3_set_ctx(
++                &mut ctx,
++                ptr::null_mut(),
++                ptr::null_mut(),
++                self.0.as_ptr(),
++                ptr::null_mut(),
++                0,
++            );
++
++            // nodb case taken care of since we zeroed ctx above
++            if let Some(conf) = conf {
++                ffi::X509V3_set_nconf(&mut ctx, conf.as_ptr());
++            }
++
++            X509v3Context(ctx, PhantomData)
++        }
++    }
++
++    pub fn add_extensions(
++        &mut self,
++        extensions: &StackRef<X509Extension>,
++    ) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::X509_REQ_add_extensions(
++                self.0.as_ptr(),
++                extensions.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    pub fn sign(&mut self, key: &PKeyRef, hash: MessageDigest) -> Result<(), ErrorStack> {
++        unsafe {
++            cvt(ffi::X509_REQ_sign(
++                self.0.as_ptr(),
++                key.as_ptr(),
++                hash.as_ptr(),
++            )).map(|_| ())
++        }
++    }
++
++    pub fn build(self) -> X509Req {
++        self.0
++    }
++}
++
++foreign_type! {
++    type CType = ffi::X509_REQ;
++    fn drop = ffi::X509_REQ_free;
++
++    pub struct X509Req;
++    pub struct X509ReqRef;
++}
++
++impl X509Req {
++    pub fn builder() -> Result<X509ReqBuilder, ErrorStack> {
++        X509ReqBuilder::new()
++    }
++
++    /// Reads CSR from PEM
++    pub fn from_pem(buf: &[u8]) -> Result<X509Req, ErrorStack> {
++        let mem_bio = try!(MemBioSlice::new(buf));
++        unsafe {
++            let handle = try!(cvt_p(ffi::PEM_read_bio_X509_REQ(
++                mem_bio.as_ptr(),
++                ptr::null_mut(),
++                None,
++                ptr::null_mut(),
++            )));
++            Ok(X509Req::from_ptr(handle))
++        }
++    }
++
++    from_der!(X509Req, ffi::d2i_X509_REQ);
++}
++
++impl X509ReqRef {
++    to_pem!(ffi::PEM_write_bio_X509_REQ);
++    to_der!(ffi::i2d_X509_REQ);
++
++    pub fn version(&self) -> i32 {
++        unsafe { compat::X509_REQ_get_version(self.as_ptr()) as i32 }
++    }
++
++    pub fn subject_name(&self) -> &X509NameRef {
++        unsafe {
++            let name = compat::X509_REQ_get_subject_name(self.as_ptr());
++            assert!(!name.is_null());
++            X509NameRef::from_ptr(name)
++        }
++    }
++}
++
++/// A collection of X.509 extensions.
++///
++/// Upholds the invariant that a certificate MUST NOT include more than one
++/// instance of a particular extension, according to RFC 3280 §4.2. Also
++/// ensures that extensions are added to the certificate during signing
++/// in the order they were inserted, which is required for certain
++/// extensions like SubjectKeyIdentifier and AuthorityKeyIdentifier.
++struct Extensions {
++    /// The extensions contained in the collection.
++    extensions: Vec<Extension>,
++    /// A map of used to keep track of added extensions and their indexes in `self.extensions`.
++    indexes: HashMap<ExtensionType, usize>,
++}
++
++impl Extensions {
++    /// Creates a new `Extensions`.
++    pub fn new() -> Extensions {
++        Extensions {
++            extensions: vec![],
++            indexes: HashMap::new(),
++        }
++    }
++
++    /// Adds a new `Extension`, replacing any existing one of the same
++    /// `ExtensionType`.
++    pub fn add(&mut self, ext: Extension) {
++        let ext_type = ext.get_type();
++
++        if let Some(index) = self.indexes.get(&ext_type) {
++            self.extensions[*index] = ext;
++            return;
++        }
++
++        self.extensions.push(ext);
++        self.indexes.insert(ext_type, self.extensions.len() - 1);
++    }
++
++    /// Returns an `ExtensionsIter` for the collection.
++    pub fn iter(&self) -> ExtensionsIter {
++        ExtensionsIter {
++            current: 0,
++            extensions: &self.extensions,
++        }
++    }
++}
++
++/// An iterator that iterates over `(ExtensionType, Extension)` for each
++/// extension in the collection.
++struct ExtensionsIter<'a> {
++    current: usize,
++    extensions: &'a Vec<Extension>,
++}
++
++impl<'a> Iterator for ExtensionsIter<'a> {
++    type Item = (ExtensionType, &'a Extension);
++
++    fn next(&mut self) -> Option<Self::Item> {
++        if self.current < self.extensions.len() {
++            let ext = &self.extensions[self.current];
++
++            self.current += 1;
++
++            Some((ext.get_type(), ext))
++        } else {
++            None
++        }
++    }
++}
++
++pub struct X509VerifyError(c_long);
++
++impl fmt::Debug for X509VerifyError {
++    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++        fmt.debug_struct("X509VerifyError")
++            .field("code", &self.0)
++            .field("error", &self.error_string())
++            .finish()
++    }
++}
++
++impl fmt::Display for X509VerifyError {
++    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++        fmt.write_str(self.error_string())
++    }
++}
++
++impl Error for X509VerifyError {
++    fn description(&self) -> &str {
++        "an X509 validation error"
++    }
++}
++
++impl X509VerifyError {
++    /// Creates an `X509VerifyError` from a raw error number.
++    ///
++    /// `None` will be returned if `err` is `X509_V_OK`.
++    ///
++    /// # Safety
++    ///
++    /// Some methods on `X509VerifyError` are not thread safe if the error
++    /// number is invalid.
++    pub unsafe fn from_raw(err: c_long) -> Option<X509VerifyError> {
++        if err == ffi::X509_V_OK as c_long {
++            None
++        } else {
++            Some(X509VerifyError(err))
++        }
++    }
++
++    pub fn as_raw(&self) -> c_long {
++        self.0
++    }
++
++    pub fn error_string(&self) -> &'static str {
++        ffi::init();
++
++        unsafe {
++            let s = ffi::X509_verify_cert_error_string(self.0);
++            str::from_utf8(CStr::from_ptr(s).to_bytes()).unwrap()
++        }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::GENERAL_NAME;
++    fn drop = ffi::GENERAL_NAME_free;
++
++    pub struct GeneralName;
++    pub struct GeneralNameRef;
++}
++
++impl GeneralNameRef {
++    /// Returns the contents of this `GeneralName` if it is a `dNSName`.
++    pub fn dnsname(&self) -> Option<&str> {
++        unsafe {
++            if (*self.as_ptr()).type_ != ffi::GEN_DNS {
++                return None;
++            }
++
++            let ptr = ASN1_STRING_data((*self.as_ptr()).d as *mut _);
++            let len = ffi::ASN1_STRING_length((*self.as_ptr()).d as *mut _);
++
++            let slice = slice::from_raw_parts(ptr as *const u8, len as usize);
++            // dNSNames are stated to be ASCII (specifically IA5). Hopefully
++            // OpenSSL checks that when loading a certificate but if not we'll
++            // use this instead of from_utf8_unchecked just in case.
++            str::from_utf8(slice).ok()
++        }
++    }
++
++    /// Returns the contents of this `GeneralName` if it is an `iPAddress`.
++    pub fn ipaddress(&self) -> Option<&[u8]> {
++        unsafe {
++            if (*self.as_ptr()).type_ != ffi::GEN_IPADD {
++                return None;
++            }
++
++            let ptr = ASN1_STRING_data((*self.as_ptr()).d as *mut _);
++            let len = ffi::ASN1_STRING_length((*self.as_ptr()).d as *mut _);
++
++            Some(slice::from_raw_parts(ptr as *const u8, len as usize))
++        }
++    }
++}
++
++impl Stackable for GeneralName {
++    type StackType = ffi::stack_st_GENERAL_NAME;
++}
++
++foreign_type! {
++    type CType = ffi::X509_ALGOR;
++    fn drop = ffi::X509_ALGOR_free;
++
++    pub struct X509Algorithm;
++    pub struct X509AlgorithmRef;
++}
++
++impl X509AlgorithmRef {
++    /// Returns the ASN.1 OID of this algorithm.
++    pub fn object(&self) -> &Asn1ObjectRef {
++        unsafe {
++            let mut oid = ptr::null();
++            compat::X509_ALGOR_get0(&mut oid, ptr::null_mut(), ptr::null_mut(), self.as_ptr());
++            assert!(!oid.is_null());
++            Asn1ObjectRef::from_ptr(oid as *mut _)
++        }
++    }
++}
++
++#[cfg(ossl110)]
++mod compat {
++    pub use ffi::X509_getm_notAfter as X509_get_notAfter;
++    pub use ffi::X509_getm_notBefore as X509_get_notBefore;
++    pub use ffi::X509_up_ref;
++    pub use ffi::X509_get0_extensions;
++    pub use ffi::X509_REQ_get_version;
++    pub use ffi::X509_REQ_get_subject_name;
++    pub use ffi::X509_get0_signature;
++    pub use ffi::X509_ALGOR_get0;
++}
++
++#[cfg(ossl10x)]
++#[allow(bad_style)]
++mod compat {
++    use libc::{c_int, c_void};
++    use ffi;
++
++    pub unsafe fn X509_get_notAfter(x: *mut ffi::X509) -> *mut ffi::ASN1_TIME {
++        (*(*(*x).cert_info).validity).notAfter
++    }
++
++    pub unsafe fn X509_get_notBefore(x: *mut ffi::X509) -> *mut ffi::ASN1_TIME {
++        (*(*(*x).cert_info).validity).notBefore
++    }
++
++    pub unsafe fn X509_up_ref(x: *mut ffi::X509) {
++        ffi::CRYPTO_add_lock(
++            &mut (*x).references,
++            1,
++            ffi::CRYPTO_LOCK_X509,
++            "mod.rs\0".as_ptr() as *const _,
++            line!() as c_int,
++        );
++    }
++
++    pub unsafe fn X509_get0_extensions(
++        cert: *const ffi::X509,
++    ) -> *const ffi::stack_st_X509_EXTENSION {
++        let info = (*cert).cert_info;
++        if info.is_null() {
++            0 as *mut _
++        } else {
++            (*info).extensions
++        }
++    }
++
++    pub unsafe fn X509_REQ_get_version(x: *mut ffi::X509_REQ) -> ::libc::c_long {
++        ::ffi::ASN1_INTEGER_get((*(*x).req_info).version)
++    }
++
++    pub unsafe fn X509_REQ_get_subject_name(x: *mut ffi::X509_REQ) -> *mut ::ffi::X509_NAME {
++        (*(*x).req_info).subject
++    }
++
++    pub unsafe fn X509_get0_signature(
++        psig: *mut *const ffi::ASN1_BIT_STRING,
++        palg: *mut *const ffi::X509_ALGOR,
++        x: *const ffi::X509,
++    ) {
++        if !psig.is_null() {
++            *psig = (*x).signature;
++        }
++        if !palg.is_null() {
++            *palg = (*x).sig_alg;
++        }
++    }
++
++    pub unsafe fn X509_ALGOR_get0(
++        paobj: *mut *const ffi::ASN1_OBJECT,
++        pptype: *mut c_int,
++        pval: *mut *mut c_void,
++        alg: *const ffi::X509_ALGOR,
++    ) {
++        if !paobj.is_null() {
++            *paobj = (*alg).algorithm;
++        }
++        assert!(pptype.is_null());
++        assert!(pval.is_null());
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..198679b53972e5f7967b2be8d70837ed26678d6c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,63 @@@
++use ffi;
++use foreign_types::ForeignTypeRef;
++use std::mem;
++
++use {cvt, cvt_p};
++use error::ErrorStack;
++use x509::X509;
++
++foreign_type! {
++    type CType = ffi::X509_STORE;
++    fn drop = ffi::X509_STORE_free;
++
++    pub struct X509StoreBuilder;
++    pub struct X509StoreBuilderRef;
++}
++
++impl X509StoreBuilder {
++    /// Returns a builder for a certificate store.
++    ///
++    /// The store is initially empty.
++    pub fn new() -> Result<X509StoreBuilder, ErrorStack> {
++        unsafe {
++            ffi::init();
++
++            cvt_p(ffi::X509_STORE_new()).map(X509StoreBuilder)
++        }
++    }
++
++    /// Constructs the `X509Store`.
++    pub fn build(self) -> X509Store {
++        let store = X509Store(self.0);
++        mem::forget(self);
++        store
++    }
++}
++
++impl X509StoreBuilderRef {
++    /// Adds a certificate to the certificate store.
++    pub fn add_cert(&mut self, cert: X509) -> Result<(), ErrorStack> {
++        unsafe {
++            let ptr = cert.as_ptr();
++            mem::forget(cert); // the cert will be freed inside of X509_STORE_add_cert on error
++            cvt(ffi::X509_STORE_add_cert(self.as_ptr(), ptr)).map(|_| ())
++        }
++    }
++
++    /// Load certificates from their default locations.
++    ///
++    /// These locations are read from the `SSL_CERT_FILE` and `SSL_CERT_DIR`
++    /// environment variables if present, or defaults specified at OpenSSL
++    /// build time otherwise.
++    pub fn set_default_paths(&mut self) -> Result<(), ErrorStack> {
++        unsafe { cvt(ffi::X509_STORE_set_default_paths(self.as_ptr())).map(|_| ()) }
++    }
++}
++
++foreign_type! {
++    type CType = ffi::X509_STORE;
++    fn drop = ffi::X509_STORE_free;
++
++    pub struct X509Store;
++    pub struct X509StoreRef;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..76eeba3fe0db47d0e69d7e44dc36e337fbe250da
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,407 @@@
++use hex::{FromHex, ToHex};
++
++use asn1::Asn1Time;
++use bn::{BigNum, MSB_MAYBE_ZERO};
++use ec::{NAMED_CURVE, EcGroup, EcKey};
++use hash::MessageDigest;
++use nid::X9_62_PRIME256V1;
++use pkey::PKey;
++use rsa::Rsa;
++use stack::Stack;
++use x509::{X509, X509Generator, X509Name, X509Req};
++use x509::extension::{Extension, BasicConstraints, KeyUsage, ExtendedKeyUsage,
++                      SubjectKeyIdentifier, AuthorityKeyIdentifier, SubjectAlternativeName};
++use ssl::{SslMethod, SslContextBuilder};
++use x509::extension::AltNameOption as SAN;
++use x509::extension::KeyUsageOption::{DigitalSignature, KeyEncipherment};
++use x509::extension::ExtKeyUsageOption::{self, ClientAuth, ServerAuth};
++use nid;
++
++fn get_generator() -> X509Generator {
++    X509Generator::new()
++        .set_valid_period(365 * 2)
++        .add_name("CN".to_string(), "test_me".to_string())
++        .set_sign_hash(MessageDigest::sha1())
++        .add_extension(Extension::KeyUsage(vec![DigitalSignature, KeyEncipherment]))
++        .add_extension(Extension::ExtKeyUsage(vec![
++            ClientAuth,
++            ServerAuth,
++            ExtKeyUsageOption::Other("2.999.1".to_owned()),
++        ]))
++        .add_extension(Extension::SubjectAltName(
++            vec![(SAN::DNS, "example.com".to_owned())],
++        ))
++        .add_extension(Extension::OtherNid(
++            nid::BASIC_CONSTRAINTS,
++            "critical,CA:TRUE".to_owned(),
++        ))
++        .add_extension(Extension::OtherStr(
++            "2.999.2".to_owned(),
++            "ASN1:UTF8:example value".to_owned(),
++        ))
++}
++
++fn pkey() -> PKey {
++    let rsa = Rsa::generate(2048).unwrap();
++    PKey::from_rsa(rsa).unwrap()
++}
++
++#[test]
++fn test_cert_gen() {
++    let pkey = pkey();
++    let cert = get_generator().sign(&pkey).unwrap();
++
++    // FIXME: check data in result to be correct, needs implementation
++    // of X509 getters
++
++    assert_eq!(
++        pkey.public_key_to_pem().unwrap(),
++        cert.public_key().unwrap().public_key_to_pem().unwrap()
++    );
++}
++
++/// SubjectKeyIdentifier must be added before AuthorityKeyIdentifier or OpenSSL
++/// is "unable to get issuer keyid." This test ensures the order of insertion
++/// for extensions is preserved when the cert is signed.
++#[test]
++fn test_cert_gen_extension_ordering() {
++    let pkey = pkey();
++    get_generator()
++        .add_extension(Extension::OtherNid(
++            nid::SUBJECT_KEY_IDENTIFIER,
++            "hash".to_owned(),
++        ))
++        .add_extension(Extension::OtherNid(
++            nid::AUTHORITY_KEY_IDENTIFIER,
++            "keyid:always".to_owned(),
++        ))
++        .sign(&pkey)
++        .expect("Failed to generate cert with order-dependent extensions");
++}
++
++/// Proves that a passing result from `test_cert_gen_extension_ordering` is
++/// deterministic by reversing the order of extensions and asserting failure.
++#[test]
++fn test_cert_gen_extension_bad_ordering() {
++    let pkey = pkey();
++    let result = get_generator()
++        .add_extension(Extension::OtherNid(
++            nid::AUTHORITY_KEY_IDENTIFIER,
++            "keyid:always".to_owned(),
++        ))
++        .add_extension(Extension::OtherNid(
++            nid::SUBJECT_KEY_IDENTIFIER,
++            "hash".to_owned(),
++        ))
++        .sign(&pkey);
++
++    assert!(result.is_err());
++}
++
++#[test]
++fn test_req_gen() {
++    let pkey = pkey();
++
++    let req = get_generator().request(&pkey).unwrap();
++    let reqpem = req.to_pem().unwrap();
++
++    let req = X509Req::from_pem(&reqpem).ok().expect("Failed to load PEM");
++    let cn = (*req)
++        .subject_name()
++        .entries_by_nid(nid::COMMONNAME)
++        .next()
++        .unwrap();
++    assert_eq!(0, (*req).version());
++    assert_eq!(cn.data().as_slice(), b"test_me");
++
++    // FIXME: check data in result to be correct, needs implementation
++    // of X509_REQ getters
++}
++
++#[test]
++fn test_cert_loading() {
++    let cert = include_bytes!("../../test/cert.pem");
++    let cert = X509::from_pem(cert).ok().expect("Failed to load PEM");
++    let fingerprint = cert.fingerprint(MessageDigest::sha1()).unwrap();
++
++    let hash_str = "59172d9313e84459bcff27f967e79e6e9217e584";
++    let hash_vec = Vec::from_hex(hash_str).unwrap();
++
++    assert_eq!(fingerprint, hash_vec);
++}
++
++#[test]
++fn test_cert_issue_validity() {
++    let cert = include_bytes!("../../test/cert.pem");
++    let cert = X509::from_pem(cert).ok().expect("Failed to load PEM");
++    let not_before = cert.not_before().to_string();
++    let not_after = cert.not_after().to_string();
++
++    assert_eq!(not_before, "Aug 14 17:00:03 2016 GMT");
++    assert_eq!(not_after, "Aug 12 17:00:03 2026 GMT");
++}
++
++#[test]
++fn test_save_der() {
++    let cert = include_bytes!("../../test/cert.pem");
++    let cert = X509::from_pem(cert).ok().expect("Failed to load PEM");
++
++    let der = cert.to_der().unwrap();
++    assert!(!der.is_empty());
++}
++
++#[test]
++fn test_subject_read_cn() {
++    let cert = include_bytes!("../../test/cert.pem");
++    let cert = X509::from_pem(cert).unwrap();
++    let subject = cert.subject_name();
++    let cn = subject.entries_by_nid(nid::COMMONNAME).next().unwrap();
++    assert_eq!(cn.data().as_slice(), b"foobar.com")
++}
++
++#[test]
++fn test_nid_values() {
++    let cert = include_bytes!("../../test/nid_test_cert.pem");
++    let cert = X509::from_pem(cert).unwrap();
++    let subject = cert.subject_name();
++
++    let cn = subject.entries_by_nid(nid::COMMONNAME).next().unwrap();
++    assert_eq!(cn.data().as_slice(), b"example.com");
++
++    let email = subject
++        .entries_by_nid(nid::PKCS9_EMAILADDRESS)
++        .next()
++        .unwrap();
++    assert_eq!(email.data().as_slice(), b"test@example.com");
++
++    let friendly = subject.entries_by_nid(nid::FRIENDLYNAME).next().unwrap();
++    assert_eq!(&**friendly.data().as_utf8().unwrap(), "Example");
++}
++
++#[test]
++fn test_nid_uid_value() {
++    let cert = include_bytes!("../../test/nid_uid_test_cert.pem");
++    let cert = X509::from_pem(cert).unwrap();
++    let subject = cert.subject_name();
++
++    let cn = subject.entries_by_nid(nid::USERID).next().unwrap();
++    assert_eq!(cn.data().as_slice(), b"this is the userId");
++}
++
++#[test]
++fn test_subject_alt_name() {
++    let cert = include_bytes!("../../test/alt_name_cert.pem");
++    let cert = X509::from_pem(cert).unwrap();
++
++    let subject_alt_names = cert.subject_alt_names().unwrap();
++    assert_eq!(3, subject_alt_names.len());
++    assert_eq!(Some("foobar.com"), subject_alt_names[0].dnsname());
++    assert_eq!(subject_alt_names[1].ipaddress(), Some(&[127, 0, 0, 1][..]));
++    assert_eq!(
++        subject_alt_names[2].ipaddress(),
++        Some(&b"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01"[..])
++    );
++}
++
++#[test]
++fn test_subject_alt_name_iter() {
++    let cert = include_bytes!("../../test/alt_name_cert.pem");
++    let cert = X509::from_pem(cert).ok().expect("Failed to load PEM");
++
++    let subject_alt_names = cert.subject_alt_names().unwrap();
++    let mut subject_alt_names_iter = subject_alt_names.iter();
++    assert_eq!(
++        subject_alt_names_iter.next().unwrap().dnsname(),
++        Some("foobar.com")
++    );
++    assert_eq!(
++        subject_alt_names_iter.next().unwrap().ipaddress(),
++        Some(&[127, 0, 0, 1][..])
++    );
++    assert_eq!(
++        subject_alt_names_iter.next().unwrap().ipaddress(),
++        Some(&b"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01"[..])
++    );
++    assert!(subject_alt_names_iter.next().is_none());
++}
++
++#[test]
++fn x509_builder() {
++    let pkey = pkey();
++
++    let mut name = X509Name::builder().unwrap();
++    name.append_entry_by_nid(nid::COMMONNAME, "foobar.com")
++        .unwrap();
++    let name = name.build();
++
++    let mut builder = X509::builder().unwrap();
++    builder.set_version(2).unwrap();
++    builder.set_subject_name(&name).unwrap();
++    builder.set_issuer_name(&name).unwrap();
++    builder
++        .set_not_before(&Asn1Time::days_from_now(0).unwrap())
++        .unwrap();
++    builder
++        .set_not_after(&Asn1Time::days_from_now(365).unwrap())
++        .unwrap();
++    builder.set_pubkey(&pkey).unwrap();
++
++    let mut serial = BigNum::new().unwrap();
++    serial.rand(128, MSB_MAYBE_ZERO, false).unwrap();
++    builder
++        .set_serial_number(&serial.to_asn1_integer().unwrap())
++        .unwrap();
++
++    let basic_constraints = BasicConstraints::new().critical().ca().build().unwrap();
++    builder.append_extension(basic_constraints).unwrap();
++    let key_usage = KeyUsage::new()
++        .digital_signature()
++        .key_encipherment()
++        .build()
++        .unwrap();
++    builder.append_extension(key_usage).unwrap();
++    let ext_key_usage = ExtendedKeyUsage::new()
++        .client_auth()
++        .server_auth()
++        .other("2.999.1")
++        .build()
++        .unwrap();
++    builder.append_extension(ext_key_usage).unwrap();
++    let subject_key_identifier = SubjectKeyIdentifier::new()
++        .build(&builder.x509v3_context(None, None))
++        .unwrap();
++    builder.append_extension(subject_key_identifier).unwrap();
++    let authority_key_identifier = AuthorityKeyIdentifier::new()
++        .keyid(true)
++        .build(&builder.x509v3_context(None, None))
++        .unwrap();
++    builder.append_extension(authority_key_identifier).unwrap();
++    let subject_alternative_name = SubjectAlternativeName::new()
++        .dns("example.com")
++        .build(&builder.x509v3_context(None, None))
++        .unwrap();
++    builder.append_extension(subject_alternative_name).unwrap();
++
++    builder.sign(&pkey, MessageDigest::sha256()).unwrap();
++
++    let x509 = builder.build();
++
++    assert!(pkey.public_eq(&x509.public_key().unwrap()));
++
++    let cn = x509.subject_name()
++        .entries_by_nid(nid::COMMONNAME)
++        .next()
++        .unwrap();
++    assert_eq!("foobar.com".as_bytes(), cn.data().as_slice());
++}
++
++#[test]
++fn x509_req_builder() {
++    let pkey = pkey();
++
++    let mut name = X509Name::builder().unwrap();
++    name.append_entry_by_nid(nid::COMMONNAME, "foobar.com")
++        .unwrap();
++    let name = name.build();
++
++    let mut builder = X509Req::builder().unwrap();
++    builder.set_version(2).unwrap();
++    builder.set_subject_name(&name).unwrap();
++    builder.set_pubkey(&pkey).unwrap();
++
++    let mut extensions = Stack::new().unwrap();
++    let key_usage = KeyUsage::new()
++        .digital_signature()
++        .key_encipherment()
++        .build()
++        .unwrap();
++    extensions.push(key_usage).unwrap();
++    let subject_alternative_name = SubjectAlternativeName::new()
++        .dns("example.com")
++        .build(&builder.x509v3_context(None))
++        .unwrap();
++    extensions.push(subject_alternative_name).unwrap();
++    builder.add_extensions(&extensions).unwrap();
++
++    builder.sign(&pkey, MessageDigest::sha256()).unwrap();
++}
++
++#[test]
++fn test_stack_from_pem() {
++    let certs = include_bytes!("../../test/certs.pem");
++    let certs = X509::stack_from_pem(certs).unwrap();
++
++    assert_eq!(certs.len(), 2);
++    assert_eq!(
++        certs[0]
++            .fingerprint(MessageDigest::sha1())
++            .unwrap()
++            .to_hex(),
++        "59172d9313e84459bcff27f967e79e6e9217e584"
++    );
++    assert_eq!(
++        certs[1]
++            .fingerprint(MessageDigest::sha1())
++            .unwrap()
++            .to_hex(),
++        "c0cbdf7cdd03c9773e5468e1f6d2da7d5cbb1875"
++    );
++}
++
++#[test]
++fn issued() {
++    let cert = include_bytes!("../../test/cert.pem");
++    let cert = X509::from_pem(cert).unwrap();
++    let ca = include_bytes!("../../test/root-ca.pem");
++    let ca = X509::from_pem(ca).unwrap();
++
++    ca.issued(&cert).unwrap();
++    cert.issued(&cert).err().unwrap();
++}
++
++#[test]
++fn ecdsa_cert() {
++    let mut group = EcGroup::from_curve_name(X9_62_PRIME256V1).unwrap();
++    group.set_asn1_flag(NAMED_CURVE);
++    let key = EcKey::generate(&group).unwrap();
++    let key = PKey::from_ec_key(key).unwrap();
++
++    let cert = X509Generator::new()
++        .set_valid_period(365)
++        .add_name("CN".to_owned(), "TestServer".to_owned())
++        .set_sign_hash(MessageDigest::sha256())
++        .sign(&key)
++        .unwrap();
++
++    let mut ctx = SslContextBuilder::new(SslMethod::tls()).unwrap();
++    ctx.set_certificate(&cert).unwrap();
++    ctx.set_private_key(&key).unwrap();
++    ctx.check_private_key().unwrap();
++}
++
++#[test]
++fn signature() {
++    let cert = include_bytes!("../../test/cert.pem");
++    let cert = X509::from_pem(cert).unwrap();
++    let signature = cert.signature();
++    assert_eq!(
++        signature.as_slice().to_hex(),
++        "4af607b889790b43470442cfa551cdb8b6d0b0340d2958f76b9e3ef6ad4992230cead6842587f0ecad5\
++                78e6e11a221521e940187e3d6652de14e84e82f6671f097cc47932e022add3c0cb54a26bf27fa84c107\
++                4971caa6bee2e42d34a5b066c427f2d452038082b8073993399548088429de034fdd589dcfb0dd33be7\
++                ebdfdf698a28d628a89568881d658151276bde333600969502c4e62e1d3470a683364dfb241f78d310a\
++                89c119297df093eb36b7fd7540224f488806780305d1e79ffc938fe2275441726522ab36d88348e6c51\
++                f13dcc46b5e1cdac23c974fd5ef86aa41e91c9311655090a52333bc79687c748d833595d4c5f987508f\
++                e121997410d37c"
++    );
++    let algorithm = cert.signature_algorithm();
++    assert_eq!(algorithm.object().nid(), nid::SHA256WITHRSAENCRYPTION);
++    assert_eq!(algorithm.object().to_string(), "sha256WithRSAEncryption");
++}
++
++#[test]
++fn clone_x509() {
++    let cert = include_bytes!("../../test/cert.pem");
++    let cert = X509::from_pem(cert).unwrap();
++    cert.clone();
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c062125fd97d7bd2ae8dc11208a4222cdf946791
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++//! X509 certificate verification
++//!
++//! Requires the `v102` or `v110` features and OpenSSL 1.0.2 or 1.1.0.
++
++pub use verify::*;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9f75f125983075ecb5c280d3e50d15feeadb5f62
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++-----BEGIN CERTIFICATE-----
++MIIEOjCCAyKgAwIBAgIJAJz42fzGUJGeMA0GCSqGSIb3DQEBCwUAMH8xCzAJBgNV
++BAYTAlVTMQswCQYDVQQIDAJOWTERMA8GA1UEBwwITmV3IFlvcmsxFTATBgNVBAoM
++DEV4YW1wbGUsIExMQzEYMBYGA1UEAwwPRXhhbXBsZSBDb21wYW55MR8wHQYJKoZI
++hvcNAQkBFhB0ZXN0QGV4YW1wbGUuY29tMB4XDTE2MDQzMDA0MDg1NloXDTE3MDQz
++MDA0MDg1NlowfzELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5ZMREwDwYDVQQHDAhO
++ZXcgWW9yazEVMBMGA1UECgwMRXhhbXBsZSwgTExDMRgwFgYDVQQDDA9FeGFtcGxl
++IENvbXBhbnkxHzAdBgkqhkiG9w0BCQEWEHRlc3RAZXhhbXBsZS5jb20wggEiMA0G
++CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDggl2TbtO5Ewi/q8kV56xK6HBpwsj9
++wBoqGi6hkKm/8lhLTkuUG6WbEUepi7n9d7tjI9hwYN7MKtppAnS+d+Zh6sKMgLJn
++hONkbQBJkYWwuIxRVXORCdyZDNzXP1rlb6ynmj6mItuPTRVNNMaZP+24fgXtwGk8
++P2nqA1ONbmyaP27txV+Rd8fmQvW3vSmq7iDob661TOtLZRqqVRpnLDGpLXTCptYz
++dLN1nDWKjBUFpPGDxvfcSE3Yf9LaQM2uDHRygSgTFusbwarAGrAk8krsm/Tiaumx
++Ls74MY6OEoLnPbEi5epWLqPmoE1nxrvYLtaWh3TTET3H72yL0+1PZTkpAgMBAAGj
++gbgwgbUwHQYDVR0OBBYEFAIcHhTPUqVdK85u47vo8z0viJGPMB8GA1UdIwQYMBaA
++FAIcHhTPUqVdK85u47vo8z0viJGPMAkGA1UdEwQCMAAwCwYDVR0PBAQDAgWgMC0G
++A1UdEQQmMCSCCmZvb2Jhci5jb22HBH8AAAGHEAAAAAAAAAAAAAAAAAAAAAEwLAYJ
++YIZIAYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMA0GCSqG
++SIb3DQEBCwUAA4IBAQDeYsuJaxbnxR2wDRSbxMpPp2b6fHPxC1vArKTSrQ/X+5s7
++YcQ29jkzD8FbET8iPsCOn/IECBiDKOpckkO6dBWM05ma9HHzWjQOJ7Lo6gEsvk4d
+++M/jJz5IaJ7hOxp1hGqwNQ+PJQOZMmlruNcOzPU36qaWJ03+NYOKar5VpIrRxCNc
++uehTArmJqDLQPfgETEhMYfpkqf3s/cGb1uyeCpzgIRPpf4Ki1Oys5cV/BqIn7n5g
++7sUrhXboYL4+eYt5V4rcc4rLI5J5IP/a1Z+Z6UVH+Mbiyl0iD8aRr/bo9WvKih3C
++2LBO0Apl0tkXUOMWp7G0UYHVEndwPjZnVoM42f11
++-----END CERTIFICATE-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..032fe60e90b90e1ee741f7d50322f50dfdd2a02d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,19 @@@
++-----BEGIN CERTIFICATE-----
++MIIDGzCCAgMCCQCHcfe97pgvpTANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJB
++VTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0
++cyBQdHkgTHRkMB4XDTE2MDgxNDE3MDAwM1oXDTI2MDgxMjE3MDAwM1owWjELMAkG
++A1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0
++IFdpZGdpdHMgUHR5IEx0ZDETMBEGA1UEAwwKZm9vYmFyLmNvbTCCASIwDQYJKoZI
++hvcNAQEBBQADggEPADCCAQoCggEBAKj0JYxEsxejUIX+I5GH0Hg2G0kX/y1H0+Ub
++3mw2/Ja5BD/yN96/7zMSumXF8uS3SkmpyiJkbyD01TSRTqjlP7/VCBlyUIChlpLQ
++mrGaijZiT/VCyPXqmcwFzXS5IOTpX1olJfW8rA41U1LCIcDUyFf6LtZ/v8rSeKr6
++TuE6SGV4WRaBm1SrjWBeHVV866CRrtSS1ieT2asFsAyOZqWhk2fakwwBDFWDhOGI
++ubfO+5aq9cBJbNRlzsgB3UZs3gC0O6GzbnZ6oT0TiJMeTsXXjABLUlaq/rrqFF4Y
++euZkkbHTFBMz288PUc3m3ZTcpN+E7+ZOUBRZXKD20K07NugqCzUCAwEAATANBgkq
++hkiG9w0BAQsFAAOCAQEASvYHuIl5C0NHBELPpVHNuLbQsDQNKVj3a54+9q1JkiMM
++6taEJYfw7K1Xjm4RoiFSHpQBh+PWZS3hToToL2Zx8JfMR5MuAirdPAy1Sia/J/qE
++wQdJccqmvuLkLTSlsGbEJ/LUUgOAgrgHOZM5lUgIhCneA0/dWJ3PsN0zvn69/faY
++oo1iiolWiIHWWBUSdr3jM2AJaVAsTmLh00cKaDNk37JB940xConBGSl98JPrNrf9
++dUAiT0iIBngDBdHnn/yTj+InVEFyZSKrNtiDSObFHxPcxGteHNrCPJdP1e+GqkHp
++HJMRZVCQpSMzvHlofHSNgzWV1MX5h1CP4SGZdBDTfA==
++-----END CERTIFICATE-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9d3516620da5d83a5dabb3b5962651aa15f8bc32
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,40 @@@
++-----BEGIN CERTIFICATE-----
++MIIDGzCCAgMCCQCHcfe97pgvpTANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJB
++VTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0
++cyBQdHkgTHRkMB4XDTE2MDgxNDE3MDAwM1oXDTI2MDgxMjE3MDAwM1owWjELMAkG
++A1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0
++IFdpZGdpdHMgUHR5IEx0ZDETMBEGA1UEAwwKZm9vYmFyLmNvbTCCASIwDQYJKoZI
++hvcNAQEBBQADggEPADCCAQoCggEBAKj0JYxEsxejUIX+I5GH0Hg2G0kX/y1H0+Ub
++3mw2/Ja5BD/yN96/7zMSumXF8uS3SkmpyiJkbyD01TSRTqjlP7/VCBlyUIChlpLQ
++mrGaijZiT/VCyPXqmcwFzXS5IOTpX1olJfW8rA41U1LCIcDUyFf6LtZ/v8rSeKr6
++TuE6SGV4WRaBm1SrjWBeHVV866CRrtSS1ieT2asFsAyOZqWhk2fakwwBDFWDhOGI
++ubfO+5aq9cBJbNRlzsgB3UZs3gC0O6GzbnZ6oT0TiJMeTsXXjABLUlaq/rrqFF4Y
++euZkkbHTFBMz288PUc3m3ZTcpN+E7+ZOUBRZXKD20K07NugqCzUCAwEAATANBgkq
++hkiG9w0BAQsFAAOCAQEASvYHuIl5C0NHBELPpVHNuLbQsDQNKVj3a54+9q1JkiMM
++6taEJYfw7K1Xjm4RoiFSHpQBh+PWZS3hToToL2Zx8JfMR5MuAirdPAy1Sia/J/qE
++wQdJccqmvuLkLTSlsGbEJ/LUUgOAgrgHOZM5lUgIhCneA0/dWJ3PsN0zvn69/faY
++oo1iiolWiIHWWBUSdr3jM2AJaVAsTmLh00cKaDNk37JB940xConBGSl98JPrNrf9
++dUAiT0iIBngDBdHnn/yTj+InVEFyZSKrNtiDSObFHxPcxGteHNrCPJdP1e+GqkHp
++HJMRZVCQpSMzvHlofHSNgzWV1MX5h1CP4SGZdBDTfA==
++-----END CERTIFICATE-----
++-----BEGIN CERTIFICATE-----
++MIIDXTCCAkWgAwIBAgIJAOIvDiVb18eVMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV
++BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX
++aWRnaXRzIFB0eSBMdGQwHhcNMTYwODE0MTY1NjExWhcNMjYwODEyMTY1NjExWjBF
++MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50
++ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
++CgKCAQEArVHWFn52Lbl1l59exduZntVSZyDYpzDND+S2LUcO6fRBWhV/1Kzox+2G
++ZptbuMGmfI3iAnb0CFT4uC3kBkQQlXonGATSVyaFTFR+jq/lc0SP+9Bd7SBXieIV
++eIXlY1TvlwIvj3Ntw9zX+scTA4SXxH6M0rKv9gTOub2vCMSHeF16X8DQr4XsZuQr
++7Cp7j1I4aqOJyap5JTl5ijmG8cnu0n+8UcRlBzy99dLWJG0AfI3VRJdWpGTNVZ92
++aFff3RpK3F/WI2gp3qV1ynRAKuvmncGC3LDvYfcc2dgsc1N6Ffq8GIrkgRob6eBc
++klDHp1d023Lwre+VaVDSo1//Y72UFwIDAQABo1AwTjAdBgNVHQ4EFgQUbNOlA6sN
++XyzJjYqciKeId7g3/ZowHwYDVR0jBBgwFoAUbNOlA6sNXyzJjYqciKeId7g3/Zow
++DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAVVaR5QWLZIRR4Dw6TSBn
++BQiLpBSXN6oAxdDw6n4PtwW6CzydaA+creiK6LfwEsiifUfQe9f+T+TBSpdIYtMv
++Z2H2tjlFX8VrjUFvPrvn5c28CuLI0foBgY8XGSkR2YMYzWw2jPEq3Th/KM5Catn3
++AFm3bGKWMtGPR4v+90chEN0jzaAmJYRrVUh9vea27bOCn31Nse6XXQPmSI6Gyncy
++OAPUsvPClF3IjeL1tmBotWqSGn1cYxLo+Lwjk22A9h6vjcNQRyZF2VLVvtwYrNU3
++mwJ6GCLsLHpwW/yjyvn8iEltnJvByM/eeRnfXV6WDObyiZsE/n6DxIRJodQzFqy9
++GA==
++-----END CERTIFICATE-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6e4d4c68cb283d2a851be0a2cd117f2002e316f9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,8 @@@
++-----BEGIN DH PARAMETERS-----
++MIIBCAKCAQEAh3Betv+hf5jNsOmGXU8oxuABD2B8r0yU8FVgjnCZBSVo61qJ0A2d
++J6r8rYKbjtolnrZN/V4IPSzYvxurHbu8nbiFVyhOySPchI2Fu+YT/HsSe/0MH9bW
++gJTNzmutWoy9VxtWLCmXnOSZHep3MZ1ZNimno6Kh2qQ7VJr0+KF8GbxUKOPv4SqK
++NBwouIQXFc0pE9kGhcGKbr7TnHhyJFCRLNP1OVDQZbcoKjk1Vh+5sy7vM2VUTQmM
++yOToT2LEZVAUJXNumcYMki9MIwfYCwYZbNt0ZEolyHzUEesuyHfU1eJd6+sKEjUz
++5GteQIR7AehxZIS+cytu7BXO7B0owLJ2awIBAg==
++-----END DH PARAMETERS-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9b1984eb721f24985b4152eb6bd10567f285a482
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++-----BEGIN DSA PRIVATE KEY-----
++Proc-Type: 4,ENCRYPTED
++DEK-Info: DES-EDE3-CBC,5B99FC62C376CA1F
++
++5nN039tLa3AHnSaQ0lk+Zsguu1EE+EyUlW1GHKs7ls2gOsZH1kR0+A+MiwNKlP24
++Syy8KYyAbgsirhtwN5IOSsA97feR/vHTY4xQ8nEef8tB7VeRJzOFLHGgS0hwIxOM
++Tb8gb4y0FtoWdAgorieP4c1emu8VwTTkHd44AArDXsP1Y7s+a3IEMcHcc3tW+qBk
++xuVnqBEETL1t0I5rKy+AYvPmGgEZ0dGRRnUlVMC5jMTozJFcStdSzKUY27prUBz2
++FREOJOA/dIjVn1UGijI64Io5sPCAbDPPmG2k4kywbEbd7Ee/MxEvRNcAyv4boyA8
++GnHZTILKi/WY5+SNlHE3YepCFo1XU+59SovB1lDhRmi43L4vfdGc/6y8L/+rbLuU
++Y58DxLdOZLTjpf9GLLf9WcpHhNZhwFfBFA8HuT8FtKDPqlf2t65z+1AVV8JTH2wM
++BrRHXTrBKn8YgafXD5MisKFmajoAtNZTvhYGm0D8BLIiNwOwLsGfXZ0hYAie0eoI
++Xl6MbHp1n/e+R+XKJ3M9DPM8mzWntlltAhS5+Az0Zi4aBdzqQaTpqvEku21sygq8
++Hwm0fpAq7y4bMnjNbMqQVw==
++-----END DSA PRIVATE KEY-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9b55018486fba03e7cf22022d0df72074e824917
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++-----BEGIN DSA PRIVATE KEY-----
++MIIBuwIBAAKBgQCkKe/jtYKJNQafaE7kg2aaJOEPUV0Doi451jkXHp5UfLh6+t42
++eabSGkE9WBAlILgaB8yHckLe9+zozN39+SUDp94kb2r38/8w/9Ffhbsep9uiyOj2
++ZRQur6SkpKQDKcnAd6IMZXZcvdSgPC90A6qraYUZKq7Csjn63gbC+IvXHwIVAIgS
++PE43lXD8/rGYxos4cxCgGGAxAoGASMV56WhLvVQtWMVI36WSIxbZnC2EsnNIKeVW
++yXnP/OmPJ2mdezG7i1alcwsO2TnSLbvjvGPlyzIqZzHvWC8EmDqsfbU+n8we/Eal
++sm5nloC8m9ECWpbTzbNdvrAAj9UPVWjcDwg7grAGGysh6lGbBv5P+4zL/niq1UiE
++LnKcifgCgYEAo6mAasO0+MVcu8shxxUXXNeTLsZ8NB/BIx9EZ/dzE23ivNW8dq1A
++eecAAYhssI2m/CspQvyKw+seCvg4FccxJgB3+mGOe+blFHwO3eAwoyRn/t3DZDHh
++FjxKKRsQdy4BkZv+vhTyIYYCw0iPZ5Wfln+pyGGTveIDED1MPG+J6c8CFCJAUlEl
++4nHvbC15xLXXpd46zycY
++-----END DSA PRIVATE KEY-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ae298d093d0fda94cad283baa101eb9a79796724
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++-----BEGIN PUBLIC KEY-----
++MIIBtzCCASsGByqGSM44BAEwggEeAoGBAKQp7+O1gok1Bp9oTuSDZpok4Q9RXQOi
++LjnWORcenlR8uHr63jZ5ptIaQT1YECUguBoHzIdyQt737OjM3f35JQOn3iRvavfz
++/zD/0V+Fux6n26LI6PZlFC6vpKSkpAMpycB3ogxldly91KA8L3QDqqtphRkqrsKy
++OfreBsL4i9cfAhUAiBI8TjeVcPz+sZjGizhzEKAYYDECgYBIxXnpaEu9VC1YxUjf
++pZIjFtmcLYSyc0gp5VbJec/86Y8naZ17MbuLVqVzCw7ZOdItu+O8Y+XLMipnMe9Y
++LwSYOqx9tT6fzB78RqWybmeWgLyb0QJaltPNs12+sACP1Q9VaNwPCDuCsAYbKyHq
++UZsG/k/7jMv+eKrVSIQucpyJ+AOBhQACgYEAo6mAasO0+MVcu8shxxUXXNeTLsZ8
++NB/BIx9EZ/dzE23ivNW8dq1AeecAAYhssI2m/CspQvyKw+seCvg4FccxJgB3+mGO
++e+blFHwO3eAwoyRn/t3DZDHhFjxKKRsQdy4BkZv+vhTyIYYCw0iPZ5Wfln+pyGGT
++veIDED1MPG+J6c8=
++-----END PUBLIC KEY-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..53bda543b69da29b57d8d18ccfbb019126c332c9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,9 @@@
++-----BEGIN DSA PARAMETERS-----
++MIIBHgKBgQCkKe/jtYKJNQafaE7kg2aaJOEPUV0Doi451jkXHp5UfLh6+t42eabS
++GkE9WBAlILgaB8yHckLe9+zozN39+SUDp94kb2r38/8w/9Ffhbsep9uiyOj2ZRQu
++r6SkpKQDKcnAd6IMZXZcvdSgPC90A6qraYUZKq7Csjn63gbC+IvXHwIVAIgSPE43
++lXD8/rGYxos4cxCgGGAxAoGASMV56WhLvVQtWMVI36WSIxbZnC2EsnNIKeVWyXnP
++/OmPJ2mdezG7i1alcwsO2TnSLbvjvGPlyzIqZzHvWC8EmDqsfbU+n8we/Ealsm5n
++loC8m9ECWpbTzbNdvrAAj9UPVWjcDwg7grAGGysh6lGbBv5P+4zL/niq1UiELnKc
++ifg=
++-----END DSA PARAMETERS-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d16abb8c70627bd959667495e578fb6f010a7f1d
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6b6209fd1fbe809a335cf29b263d9ffd5d1b9da0
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..395b04a94b539dfeaac6cd567da787043027f616
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d381795d3ba3c09578cf3edaae34ae9b1805e77a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,28 @@@
++-----BEGIN PRIVATE KEY-----
++MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCo9CWMRLMXo1CF
++/iORh9B4NhtJF/8tR9PlG95sNvyWuQQ/8jfev+8zErplxfLkt0pJqcoiZG8g9NU0
++kU6o5T+/1QgZclCAoZaS0Jqxmoo2Yk/1Qsj16pnMBc10uSDk6V9aJSX1vKwONVNS
++wiHA1MhX+i7Wf7/K0niq+k7hOkhleFkWgZtUq41gXh1VfOugka7UktYnk9mrBbAM
++jmaloZNn2pMMAQxVg4ThiLm3zvuWqvXASWzUZc7IAd1GbN4AtDuhs252eqE9E4iT
++Hk7F14wAS1JWqv666hReGHrmZJGx0xQTM9vPD1HN5t2U3KTfhO/mTlAUWVyg9tCt
++OzboKgs1AgMBAAECggEBAKLj6IOJBKXolczpzb8UkyAjAkGBektcseV07gelJ/fk
++3z0LuWPv5p12E/HlXB24vU2x/ikUbbP3eMsawRzDEahQqmNmPEkYAYUAy/Qpi9GN
++DYvn3LqDec4jVgeQKS+p9H2DzUpTogp8zR2//yzbuWBg2+F//xh7vU0S0RQCziPM
++x7RSBgbhxSfChfEJbS2sDnzfh0jRQmoY95iFv7puet1FJtzdZ4fgCd1RqmC2lFM5
++H0eZtN/Cz19lieVs0b996DErdEBqClVZO00eYbRozCDaBzRU3ybB/dMrGJxhkkXm
++wb3kWMtziH9qOYsostuHIFu8eKFLloKxFnq2R4DGxOECgYEA2KUIZISOeGJSBcLJ
++JAUK2gvgXPNo4HHWIwOA9xeN3ZJlsnPlffXQNnm6t1st1V2gfMm9I2n0m/F0y2B/
++n/XGSa8bghfPA9l0c2h58lkL3JQJR/paa8ycTz+YZPrznEyN7Qa0RrJXUvZv9lQL
++Hc3+FHcSHgMqDV2f2bHAEu9YGi0CgYEAx6VEIPNvrHFgjo/jk1RTuk+m0xEWQsZL
++Cs+izQMr2TaeJn8LG+93AvFuYn0J0nT3WuStLPrUg8i4IhSS6lf1tId5ivIZPm4r
++YwMyblBJXhnHbk7Uqodjfw/3s6V2HAu++B7hTdyVr9DFuST9uv4m8bkPV8rfX1jE
++I2rAPVWvgikCgYB+wNAQP547wQrMZBLbCDg5KwmyWJfb+b6X7czexOEz6humNTjo
++YZHYzY/5B1fhpk3ntQD8X1nGg5caBvOk21+QbOtjShrM3cXMYCw5JvBRtitX+Zo9
++yBEMLOE0877ki8XeEDYZxu5gk98d+D4oygUGZEQtWxyXhVepPt5qNa8OYQKBgQDH
++RVgZI6KFlqzv3wMh3PutbS9wYQ+9GrtwUQuIYe/0YSW9+vSVr5E0qNKrD28sV39F
++hBauXLady0yvB6YUrjMbPFW+sCMuQzyfGWPO4+g3OrfqjFiM1ZIkE0YEU9Tt7XNx
++qTDtTI1D7bhNMnTnniI1B6ge0und+3XafAThs5L48QKBgQCTTpfqMt8kU3tcI9sf
++0MK03y7kA76d5uw0pZbWFy7KI4qnzWutCzb+FMPWWsoFtLJLPZy//u/ZCUVFVa4d
++0Y/ASNQIESVPXFLAltlLo4MSmsg1vCBsbviEEaPeEjvMrgki93pYtd/aOSgkYC1T
++mEq154s5rmqh+h+XRIf7Au0SLw==
++-----END PRIVATE KEY-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2a82256967ac3a5174e1befe24bfcceeb709562f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,9 @@@
++-----BEGIN PUBLIC KEY-----
++MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr1bXMptaIgOL9PVL8a7W
++KG/C8+IbxP018eMBQZT0SnPQmXp0Q8Aai/F+AEDE7b5sO5U7WdxU4GRYw0wqkQNF
++si78KNfoj2ZMlx6NRfl4UKuzrpGTPgQxuKDYedngPpWcbmW4P3zEL2Y7b18n9NJr
++atRUzH1Zh/ReRO525Xadu58aviPw1Mzgse7cKyzb03Gll9noLnYNIIpO8jL+QyrD
++8qNmfacmR20U0a6XDTtmsmk7AitGETICbTT0KRf+oAP0yIHoonllPpNLUEPZQjrp
++ClS/S/wKdj7gaq9TaMbHULhFMjbCV8cuPu//rUAuWp3riaznZGOVQyn3Dp2CB3ad
++yQIDAQAB
++-----END PUBLIC KEY-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c39930a5cb4f003f48ab94cc87f9435730540f24
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6f17e734cde30b7d5e869cd91f17e13033340202
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++-----BEGIN CERTIFICATE-----
++MIIB1DCCAX6gAwIBAgIJAMzXWZGWHleWMA0GCSqGSIb3DQEBCwUAMFYxHzAdBgkq
++hkiG9w0BCQEWEHRlc3RAZXhhbXBsZS5jb20xFDASBgNVBAMMC2V4YW1wbGUuY29t
++MR0wGwYJKoZIhvcNAQkUHg4ARQB4AGEAbQBwAGwAZTAeFw0xNTA3MDEwNjQ3NDRa
++Fw0xNTA3MzEwNjQ3NDRaMFYxHzAdBgkqhkiG9w0BCQEWEHRlc3RAZXhhbXBsZS5j
++b20xFDASBgNVBAMMC2V4YW1wbGUuY29tMR0wGwYJKoZIhvcNAQkUHg4ARQB4AGEA
++bQBwAGwAZTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQCmejzp4+o35FD0hAnx2trL
++08h07X5jZca9DgZH35hWXPh7fMucLt/IPXIRnz2zKEa/Mo6D2V/fx03Mqo0epid7
++AgMBAAGjLzAtMB0GA1UdDgQWBBRQa57tXz3rZNRz+fTbo3w3jQJMBTAMBgNVHRME
++BTADAQH/MA0GCSqGSIb3DQEBCwUAA0EAm0iY9cr+gvC+vcQIebdofpQ4GcDW8U6W
++Bxs8ZXinLl69P0jYLum3+XITNFRiyQqcivaxdxthxDNOX7P+aKwkJA==
++-----END CERTIFICATE-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..de6722abe0485ea3d678b498b5c8bcaf03d77780
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++-----BEGIN CERTIFICATE-----
++MIIEGTCCAwGgAwIBAgIJAItKTzcGfL1lMA0GCSqGSIb3DQEBCwUAMIGiMSIwIAYK
++CZImiZPyLGQBAQwSdGhpcyBpcyB0aGUgdXNlcklkMQswCQYDVQQGEwJVUzETMBEG
++A1UECAwKQ2FsaWZvcm5pYTESMBAGA1UEBwwJU3Vubnl2YWxlMRUwEwYDVQQKDAxS
++dXN0IE9wZW5TU0wxDDAKBgNVBAsMA09TUzEhMB8GA1UEAwwYcnVzdC1vcGVuc3Ns
++LmV4YW1wbGUuY29tMB4XDTE2MDIwMjE3MjIwMVoXDTE2MDMwMzE3MjIwMVowgaIx
++IjAgBgoJkiaJk/IsZAEBDBJ0aGlzIGlzIHRoZSB1c2VySWQxCzAJBgNVBAYTAlVT
++MRMwEQYDVQQIDApDYWxpZm9ybmlhMRIwEAYDVQQHDAlTdW5ueXZhbGUxFTATBgNV
++BAoMDFJ1c3QgT3BlblNTTDEMMAoGA1UECwwDT1NTMSEwHwYDVQQDDBhydXN0LW9w
++ZW5zc2wuZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
++AQDa3Gc+IE5DOhTv1m5DZW8qKiyNLd7v4DaAYLXSsDuLs+9wJ+Bs+wlBfrg+PT0t
++EJlPaLL9IfD5eR3WpFu62TUexYhnJh+3vhCGsFHOXcTjtM+wy/dzZtOVh2wTzvqE
++/FHBGw1eG3Ww+RkSFbwYmtm8JhIN8ffYxGn2O0yQpxypf5hNPYrC81zX+52X2w1h
++jDYLpYt55w+e6q+iRRFk0tKiWHEqqh/r6UQQRpj2EeS+xTloZlO6h0nl2NPkVF3r
++CXBoT8Ittxr7sqcYqf8TAA0I4qZRYXKYehFmv/VkSt85CcURJ/zXeoJ1TpxSvQie
++2R9cRDkYROrIOAFbB/0mmHLBAgMBAAGjUDBOMB0GA1UdDgQWBBRKfPqtgrbdbTmH
++XR6RC/p8t/65GjAfBgNVHSMEGDAWgBRKfPqtgrbdbTmHXR6RC/p8t/65GjAMBgNV
++HRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCKfeGRduGsIwKNiGcDUNkNrc7Z
++f8SWAmb/R6xiDfgjbhrtfBDowIZ5natEkTgf6kQPMJKyjg2NEM2uJWBc55rLOHIv
++es1wQOlYjfEUmFD3lTIt2TM/IUgXn2j+zV1CRkJthQLVFChXsidd0Bqq2fBjd3ad
++Yjzrxf3uOTBAs27koh2INNHfcUZCRsx8hP739zz2kw/r5NB/9iyENEyJKQvxo0jb
++oN0JK2joGZrWetDukQrqf032TsdkboW5JresYybbAD3326Ljp+hlT/3WINc+3nZJ
++Dn+pPMdpuZ5BUZ+u+XyNEPum3k3P3K19AF+zWYGooX0J1cmuCBrrqce20Lwy
++-----END CERTIFICATE-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47a2db8ad99c55424b3eba09cf195d9a826d9f17
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..746ae2a68c5107a858b105d247914afafc2059bf
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,27 @@@
++-----BEGIN RSA PRIVATE KEY-----
++MIIEpQIBAAKCAQEArVHWFn52Lbl1l59exduZntVSZyDYpzDND+S2LUcO6fRBWhV/
++1Kzox+2GZptbuMGmfI3iAnb0CFT4uC3kBkQQlXonGATSVyaFTFR+jq/lc0SP+9Bd
++7SBXieIVeIXlY1TvlwIvj3Ntw9zX+scTA4SXxH6M0rKv9gTOub2vCMSHeF16X8DQ
++r4XsZuQr7Cp7j1I4aqOJyap5JTl5ijmG8cnu0n+8UcRlBzy99dLWJG0AfI3VRJdW
++pGTNVZ92aFff3RpK3F/WI2gp3qV1ynRAKuvmncGC3LDvYfcc2dgsc1N6Ffq8GIrk
++gRob6eBcklDHp1d023Lwre+VaVDSo1//Y72UFwIDAQABAoIBAGZrnd/dC2kp11uq
++Sg8SHk3GMdPPjTf/lq51sVJAU4fdV2Eso0XCiCzdKDcqR6F+jiu8jHp4YO0riW8N
++b1pkjohGjyOaddIaaVsZ80/OkgDz20Ird9XQ7uoEODvopA12+755BDH5PDwqHVeM
++nKfPiwAK6Jz6CxGO9bq9ZNoBiSyO1uofaB4Cpp8t74XVeAuPiI/Bb6WJ8TW5K5dt
++x0Jihdo46QgZR+z4PnyWIoACkhSoQmtTb9NUrpKceBcxdCrZ/kEmYpnPq/PuSw6g
++6HthjYP/H9Xulz69UR5Ez6z+1pU1rKFmQ46qK7X3zVHg233MlGekMzxdmShEjzCP
++BMGYpQECgYEA5tqTZsUJwx3HDhkaZ/XOtaQqwOnZm9wPwTjGbV1t4+NUJzsl5gjP
++ho+I8ZSGZ6MnNSh+ClpYhUHYBq0rTuAAYL2arcMOuOs1GrMmiZJbXm8zq8M7gYr5
++V99H/7akSx66WV/agPkLIvh/BWxlWgQcoVAIzZibbLUxr7Ye50pCLfECgYEAwDLn
++mFz0mFMvGtaSp8RnTDTFCz9czCeDt0GujCxG1epdvtuxlg/S1QH+mGzA/AHkiu7z
++uzCwGKWozNTdRkqVwYoJTB+AYHseSkuGP+a1zr39w+xBW/vESb2oP95GIwprXcG2
++b/qdeQVzuLQhYoqWI2u8CBwlHFfpQO4Bp2ea+ocCgYEAurIgLSfCqlpFpiAlG9hN
++8NYwgU1d4E+LKj+JMd8yRO+PGh8amjub4X3pST5NqDjpN3Nk42iHWFWUqGmZsbM0
++ewg7tLUgDeqiStKBoxaK8AdMqWc9k5lZ53e6mZISsnHKUQdVBaLjH8gJqdAs8yyK
++HudEB0mYwMSUxz6pJXIHrXECgYEAhJkaCpXm8chB8UQj/baUhZDKeI4IWZjRWHbq
++Ey7g1+hPMMOk6yCTlf1ARqyRH8u2ftuIL5bRhs+Te21IE5yVYOb4rxn0mZuXNC6S
++ujdTKwUMtESkeu9hZnaAQz/4J2ii1hY05WCDj+DhC4bKmY9/MYS8PuQb/kfwVqld
++Xr8tvrUCgYEAmslHocXBUFXyRDkEOx/aKo+t9fPBr95PBZzFUt9ejrTP4PXsLa46
++3/PNOCGdrQxh5qHHcvLwR4bPL++Dj+qMUTJXANrArKPDpE2WqH6pqWIC6yaZvzUk
++17QbpXR6bHcdJV045pWpw40UCStTocVynY1lBfOw8VqxBIBlpVBBzew=
++-----END RSA PRIVATE KEY-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4ec2f5388494b39112571639160b8fb801a8a954
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++-----BEGIN CERTIFICATE-----
++MIIDXTCCAkWgAwIBAgIJAOIvDiVb18eVMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV
++BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX
++aWRnaXRzIFB0eSBMdGQwHhcNMTYwODE0MTY1NjExWhcNMjYwODEyMTY1NjExWjBF
++MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50
++ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
++CgKCAQEArVHWFn52Lbl1l59exduZntVSZyDYpzDND+S2LUcO6fRBWhV/1Kzox+2G
++ZptbuMGmfI3iAnb0CFT4uC3kBkQQlXonGATSVyaFTFR+jq/lc0SP+9Bd7SBXieIV
++eIXlY1TvlwIvj3Ntw9zX+scTA4SXxH6M0rKv9gTOub2vCMSHeF16X8DQr4XsZuQr
++7Cp7j1I4aqOJyap5JTl5ijmG8cnu0n+8UcRlBzy99dLWJG0AfI3VRJdWpGTNVZ92
++aFff3RpK3F/WI2gp3qV1ynRAKuvmncGC3LDvYfcc2dgsc1N6Ffq8GIrkgRob6eBc
++klDHp1d023Lwre+VaVDSo1//Y72UFwIDAQABo1AwTjAdBgNVHQ4EFgQUbNOlA6sN
++XyzJjYqciKeId7g3/ZowHwYDVR0jBBgwFoAUbNOlA6sNXyzJjYqciKeId7g3/Zow
++DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAVVaR5QWLZIRR4Dw6TSBn
++BQiLpBSXN6oAxdDw6n4PtwW6CzydaA+creiK6LfwEsiifUfQe9f+T+TBSpdIYtMv
++Z2H2tjlFX8VrjUFvPrvn5c28CuLI0foBgY8XGSkR2YMYzWw2jPEq3Th/KM5Catn3
++AFm3bGKWMtGPR4v+90chEN0jzaAmJYRrVUh9vea27bOCn31Nse6XXQPmSI6Gyncy
++OAPUsvPClF3IjeL1tmBotWqSGn1cYxLo+Lwjk22A9h6vjcNQRyZF2VLVvtwYrNU3
++mwJ6GCLsLHpwW/yjyvn8iEltnJvByM/eeRnfXV6WDObyiZsE/n6DxIRJodQzFqy9
++GA==
++-----END CERTIFICATE-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a6249997268d606672670ec007d38b4d1cc9a9f5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++-----BEGIN RSA PRIVATE KEY-----
++Proc-Type: 4,ENCRYPTED
++DEK-Info: AES-128-CBC,E2F16153E2BA3D617285A68C896BA6AF
++
++vO9SnhtGjGe8pG1pN//vsONnvJr+DjU+lFCiSqGMPT7tezDnbehLfS+9kus2HV7r
++HmI14JvVG9O7NpF7zMyBRlHYdWcCCWED9Yar0NsWN9419e5pMe/bqIXAzAiJbtT4
++OB9U5XF3m+349zjN1dVXPPLGRmMC1pcHAlofeb5nIUFTvUi5xcsbe1itGjgkkvHb
++Bt8NioHTBun8kKrlsFQOuB55ylBU/eWG8DQBtvFOmQ7iWp0RnGQfh8k5e5rcZNpQ
++fD9ygc7UVISl0xTrIG4IH15g34H+nrBauKtIPOpNPuXQPOMHCZv3XH8wnhrWHHwT
++ZFnQBdXbSpQtMsRh0phG2G+VIlyCgSn4+CxjCJ+TgFtsoK/tU0unmRYc59QnTxxb
++qkHYsPs3E0NApQAgH1ENEGl1M+FGLYQH7gftjc3ophBTeRA17sRmD7Y4QBInggsq
++Gv6tImPVBdekAjz/Ls/EyMwjAvvrL5eAokqrIsAarGo+zmbJKHzknw2KUz2En0+k
++YYaxB4oy9u7bzuQlvio6xYHJEb4K197bby4Dldmqv7YCCJBJwhOBAInMD687viKv
++vcUwL8YuS6cW5E8MbvEENlY4+lvKKj3M8Bnyb79cYIPQe92EuCwXU9DZXPRMLwwM
++oFEJpF5E/PmNJzu+B52ahHtDrh83WSx71fWqjdTqwkPZhAYo3ztsfFkb/UqUcq8u
++rBSebeUjZh0XZ9B04eshZQ5vJUcXGtYIe/77beV3Pv89/fw+zTZjpiP9Q3sZALzf
++Qt0YGp0/6qBuqR1tcqdu65AS2hun7yFw7uRavqYKvww4axRiz2do+xWmZFuoCAwD
++EWktaUujltpvAc1lo7lg4C6nByefJB9Xqk22N/vpqOsWr1NbAntT42Qj/HF9BVWR
++osvN3yMnKYWYe6oSTVnNBDM5obWAIHd3I9gcxTOTb1KsEwt2RrDs5EpB5ptS3Fjo
++JfBRhNZQ3cXttrIIhsHgDn9BDNg865/xpIgktKj0gEd60Abx0PqkAIm6IZTh4Efg
++7uZwfzxB+saOcddbrW2gNdzVZMC0s2Ye3sqHhtLbAJ3BlXYTxE4CAvTg54Ny+5hF
++IjvjlOKgXceSG1cSfk21/wyp9RY3Ft0AEYvvp0kZScWZaoA2aSFDUrchXVhgrEbn
++lJ7UptjefwRFIreAlwbKSbIDDNWnyzvIWyHfQ2aYqgnb7W7XqNPSgH9cALCfzirI
++dlRHjha0bMUtrjPCC/YfMXzJBVniy0gG6Pd5uC7vz/Awn6/6HRQVNaTQASphPBQ7
++bJuz+JTfzI9OUVCMRMdnb6b35U4P9tibFmnPvzTIPe+3WUmf8aRsLS3NN3G1Webd
++PMYVZpMycPaAI0Ht87axhsOzlxCWHYWjdHa+WoNNc1J90TxLCmAHquh5BDaWvjMK
++0DySftJZjV7Tf1p2KosmU83LRl39B5NHMbZb1xOEZl9IWwhT/PVKTVZ25xdxWLfb
++hF4l8rfvKehIp5r4t8zW1bvI2Hl6vrUvmcUVWt3BfKjxlgwRVD0vvwonMt1INesF
++204vUBeXbDsUUicLwOyUgaFvJ3XU3dOyvL9MhOgM5OgoFRRhG+4AS8a5JCD8iLtq
++-----END RSA PRIVATE KEY-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d8185fed6691aed6f339267a38dd87eac791cd46
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,27 @@@
++-----BEGIN RSA PRIVATE KEY-----
++MIIEowIBAAKCAQEAofgWCuLjybRlzo0tZWJjNiuSfb4p4fAkd/wWJcyQoTbji9k0
++l8W26mPddxHmfHQp+Vaw+4qPCJrcS2mJPMEzP1Pt0Bm4d4QlL+yRT+SFd2lZS+pC
++gNMsD1W/YpRPEwOWvG6b32690r2jZ47soMZo9wGzjb/7OMg0LOL+bSf63kpaSHSX
++ndS5z5rexMdbBYUsLA9e+KXBdQOS+UTo7WTBEMa2R2CapHg665xsmtdVMTBQY4uD
++Zlxvb3qCo5ZwKh9kG4LT6/I5IhlJH7aGhyxXFvUK+DWNmoudF8NAco9/h9iaGNj8
++q2ethFkMLs91kzk2PAcDTW9gb54h4FRWyuXpoQIDAQABAoIBABKucaRpzQorw35S
++bEUAVx8dYXUdZOlJcHtiWQ+dC6V8ljxAHj/PLyzTveyI5QO/xkObCyjIL303l2cf
++UhPu2MFaJdjVzqACXuOrLot/eSFvxjvqVidTtAZExqFRJ9mylUVAoLvhowVWmC1O
++n95fZCXxTUtxNEG1Xcc7m0rtzJKs45J+N/V9DP1edYH6USyPSWGp6wuA+KgHRnKK
++Vf9GRx80JQY7nVNkL17eHoTWEwga+lwi0FEoW9Y7lDtWXYmKBWhUE+U8PGxlJf8f
++40493HDw1WRQ/aSLoS4QTp3rn7gYgeHEvfJdkkf0UMhlknlo53M09EFPdadQ4TlU
++bjqKc50CgYEA4BzEEOtIpmVdVEZNCqS7baC4crd0pqnRH/5IB3jw3bcxGn6QLvnE
++tfdUdiYrqBdss1l58BQ3KhooKeQTa9AB0Hw/Py5PJdTJNPY8cQn7ouZ2KKDcmnPG
++BY5t7yLc1QlQ5xHdwW1VhvKn+nXqhJTBgIPgtldC+KDV5z+y2XDwGUcCgYEAuQPE
++fgmVtjL0Uyyx88GZFF1fOunH3+7cepKmtH4pxhtCoHqpWmT8YAmZxaewHgHAjLYs
++p1ZSe7zFYHj7C6ul7TjeLQeZD/YwD66t62wDmpe/HlB+TnBA+njbglfIsRLtXlnD
++zQkv5dTltRJ11BKBBypeeF6689rjcJIDEz9RWdcCgYAHAp9XcCSrn8wVkMVkKdb7
++DOX4IKjzdahm+ctDAJN4O/y7OW5FKebvUjdAIt2GuoTZ71iTG+7F0F+lP88jtjP4
++U4qe7VHoewl4MKOfXZKTe+YCS1XbNvfgwJ3Ltyl1OH9hWvu2yza7q+d5PCsDzqtm
++27kxuvULVeya+TEdAB1ijQKBgQCH/3r6YrVH/uCWGy6bzV1nGNOdjKc9tmkfOJmN
++54dxdixdpozCQ6U4OxZrsj3FcOhHBsqAHvX2uuYjagqvo3cOj1TRqNocX40omfCC
++Mx3bD1yPPf/6TI2XECva/ggqEY2mYzmIiA5LVVmc5nrybr+lssFKneeyxN2Wq93S
++0iJMdQKBgCGHewxzoa1r8ZMD0LETNrToK423K377UCYqXfg5XMclbrjPbEC3YI1Z
++NqMtuhdBJqUnBi6tjKMF+34Xf0CUN8ncuXGO2CAYvO8PdyCixHX52ybaDjy1FtCE
++6yUXjoKNXKvUm7MWGsAYH6f4IegOetN5NvmUMFStCSkh7ixZLkN1
++-----END RSA PRIVATE KEY-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..093f2ba12a50ef91b9770d7524b48e6e6d195b14
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,9 @@@
++-----BEGIN PUBLIC KEY-----
++MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAofgWCuLjybRlzo0tZWJj
++NiuSfb4p4fAkd/wWJcyQoTbji9k0l8W26mPddxHmfHQp+Vaw+4qPCJrcS2mJPMEz
++P1Pt0Bm4d4QlL+yRT+SFd2lZS+pCgNMsD1W/YpRPEwOWvG6b32690r2jZ47soMZo
++9wGzjb/7OMg0LOL+bSf63kpaSHSXndS5z5rexMdbBYUsLA9e+KXBdQOS+UTo7WTB
++EMa2R2CapHg665xsmtdVMTBQY4uDZlxvb3qCo5ZwKh9kG4LT6/I5IhlJH7aGhyxX
++FvUK+DWNmoudF8NAco9/h9iaGNj8q2ethFkMLs91kzk2PAcDTW9gb54h4FRWyuXp
++oQIDAQAB
++-----END PUBLIC KEY-----
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8e979f897afdcc88ea22fc1aa208f0345bde914f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"ad95f8160d1c150c4f44d4c4959732e048ac046c37f597fe362f8bf57561ffb4"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fd7d7e5b411487cade263ddaf044f3e83f5a0b06
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,23 @@@
++[package]
++name = "openssl-sys"
++version = "0.9.15"
++authors = ["Alex Crichton <alex@alexcrichton.com>",
++           "Steven Fackler <sfackler@gmail.com>"]
++license = "MIT"
++description = "FFI bindings to OpenSSL"
++repository = "https://github.com/sfackler/rust-openssl"
++documentation = "https://docs.rs/openssl-sys/0.9.15/openssl_sys"
++categories = ["cryptography", "external-ffi-bindings"]
++links = "openssl"
++build = "build.rs"
++
++[dependencies]
++libc = "0.2"
++
++[build-dependencies]
++pkg-config = "0.3.9"
++gcc = "0.3.42"
++
++# We don't actually use metadeps for annoying reasons but this is still here for tooling
++[package.metadata.pkg-config]
++openssl = "1.0.1"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39e0ed6602151f235148e6c08413aa7eda5b9038
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2014 Alex Crichton
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..317b8a6a0dcec1ca9b36b1317e8f3b354967efc8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,474 @@@
++extern crate pkg_config;
++extern crate gcc;
++
++use std::collections::HashSet;
++use std::env;
++use std::ffi::OsString;
++use std::fs::File;
++use std::io::{BufWriter, Write};
++use std::path::{Path, PathBuf};
++use std::panic::{self, AssertUnwindSafe};
++use std::process::Command;
++
++// The set of `OPENSSL_NO_<FOO>`s that we care about.
++const DEFINES: &'static [&'static str] = &[
++    "OPENSSL_NO_BUF_FREELISTS",
++    "OPENSSL_NO_COMP",
++    "OPENSSL_NO_EC",
++    "OPENSSL_NO_EC2M",
++    "OPENSSL_NO_ENGINE",
++    "OPENSSL_NO_KRB5",
++    "OPENSSL_NO_NEXTPROTONEG",
++    "OPENSSL_NO_PSK",
++    "OPENSSL_NO_RFC3779",
++    "OPENSSL_NO_SHA",
++    "OPENSSL_NO_SRP",
++    "OPENSSL_NO_SSL3_METHOD",
++    "OPENSSL_NO_TLSEXT",
++];
++
++enum Version {
++    Openssl110,
++    Openssl102,
++    Openssl101,
++    Libressl,
++}
++
++fn main() {
++    let target = env::var("TARGET").unwrap();
++
++    println!("cargo:rerun-if-env-changed=OPENSSL_LIB_DIR");
++    let lib_dir = env::var_os("OPENSSL_LIB_DIR").map(PathBuf::from);
++    println!("cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR");
++    let include_dir = env::var_os("OPENSSL_INCLUDE_DIR").map(PathBuf::from);
++
++    let (lib_dir, include_dir) = if lib_dir.is_none() || include_dir.is_none() {
++        println!("cargo:rerun-if-env-changed=OPENSSL_DIR");
++        let openssl_dir = env::var_os("OPENSSL_DIR").unwrap_or_else(|| find_openssl_dir(&target));
++        let openssl_dir = Path::new(&openssl_dir);
++        let lib_dir = lib_dir.unwrap_or_else(|| openssl_dir.join("lib"));
++        let include_dir = include_dir.unwrap_or_else(|| openssl_dir.join("include"));
++        (lib_dir, include_dir)
++    } else {
++        (lib_dir.unwrap(), include_dir.unwrap())
++    };
++
++    if !Path::new(&lib_dir).exists() {
++        panic!(
++            "OpenSSL library directory does not exist: {}",
++            lib_dir.to_string_lossy()
++        );
++    }
++    if !Path::new(&include_dir).exists() {
++        panic!(
++            "OpenSSL include directory does not exist: {}",
++            include_dir.to_string_lossy()
++        );
++    }
++
++    println!(
++        "cargo:rustc-link-search=native={}",
++        lib_dir.to_string_lossy()
++    );
++    println!("cargo:include={}", include_dir.to_string_lossy());
++
++    let version = validate_headers(&[include_dir.clone().into()]);
++
++    println!("cargo:rerun-if-env-changed=OPENSSL_LIBS");
++    let libs_env = env::var("OPENSSL_LIBS").ok();
++    let libs = match libs_env {
++        Some(ref v) => v.split(":").collect(),
++        None => {
++            match version {
++                Version::Openssl101 |
++                Version::Openssl102 if target.contains("windows") => vec!["ssleay32", "libeay32"],
++                Version::Openssl110 if target.contains("windows") => vec!["libssl", "libcrypto"],
++                _ => vec!["ssl", "crypto"],
++            }
++        }
++    };
++
++
++    let kind = determine_mode(Path::new(&lib_dir), &libs);
++    for lib in libs.into_iter() {
++        println!("cargo:rustc-link-lib={}={}", kind, lib);
++    }
++}
++
++fn find_openssl_dir(target: &str) -> OsString {
++    let host = env::var("HOST").unwrap();
++
++    if host.contains("apple-darwin") && target.contains("apple-darwin") {
++        let homebrew = Path::new("/usr/local/opt/openssl@1.1");
++        if homebrew.exists() {
++            return homebrew.to_path_buf().into();
++        }
++        let homebrew = Path::new("/usr/local/opt/openssl");
++        if homebrew.exists() {
++            return homebrew.to_path_buf().into();
++        }
++    }
++
++    try_pkg_config();
++
++    let mut msg = format!(
++        "
++
++Could not find directory of OpenSSL installation, and this `-sys` crate cannot
++proceed without this knowledge. If OpenSSL is installed and this crate had
++trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
++compilation process.
++
++If you're in a situation where you think the directory *should* be found
++automatically, please open a bug at https://github.com/sfackler/rust-openssl
++and include information about your system as well as this message.
++
++    $HOST = {}
++    $TARGET = {}
++    openssl-sys = {}
++
++",
++        host,
++        target,
++        env!("CARGO_PKG_VERSION")
++    );
++
++    if host.contains("apple-darwin") && target.contains("apple-darwin") {
++        let system = Path::new("/usr/lib/libssl.0.9.8.dylib");
++        if system.exists() {
++            msg.push_str(&format!(
++                "
++
++It looks like you're compiling on macOS, where the system contains a version of
++OpenSSL 0.9.8. This crate no longer supports OpenSSL 0.9.8.
++
++As a consumer of this crate, you can fix this error by using Homebrew to
++install the `openssl` package, or as a maintainer you can use the openssl-sys
++0.7 crate for support with OpenSSL 0.9.8.
++
++Unfortunately though the compile cannot continue, so aborting.
++
++"
++            ));
++        }
++    }
++
++    if host.contains("unknown-linux") && target.contains("unknown-linux-gnu") {
++        if Command::new("pkg-config").output().is_err() {
++            msg.push_str(&format!(
++                "
++It looks like you're compiling on Linux and also targeting Linux. Currently this
++requires the `pkg-config` utility to find OpenSSL but unfortunately `pkg-config`
++could not be found. If you have OpenSSL installed you can likely fix this by
++installing `pkg-config`.
++
++"
++            ));
++        }
++    }
++
++    if host.contains("windows") && target.contains("windows-gnu") {
++        msg.push_str(&format!(
++            "
++It looks like you're compiling for MinGW but you may not have either OpenSSL or
++pkg-config installed. You can install these two dependencies with:
++
++    pacman -S openssl pkg-config
++
++and try building this crate again.
++
++"
++        ));
++    }
++
++    if host.contains("windows") && target.contains("windows-msvc") {
++        msg.push_str(&format!(
++            "
++It looks like you're compiling for MSVC but we couldn't detect an OpenSSL
++installation. If there isn't one installed then you can try the rust-openssl
++README for more information about how to download precompiled binaries of
++OpenSSL:
++
++    https://github.com/sfackler/rust-openssl#windows
++
++"
++        ));
++    }
++
++    panic!(msg);
++}
++
++/// Attempt to find OpenSSL through pkg-config.
++///
++/// Note that if this succeeds then the function does not return as pkg-config
++/// typically tells us all the information that we need.
++fn try_pkg_config() {
++    let target = env::var("TARGET").unwrap();
++    let host = env::var("HOST").unwrap();
++
++    // If we're going to windows-gnu we can use pkg-config, but only so long as
++    // we're coming from a windows host.
++    //
++    // Otherwise if we're going to windows we probably can't use pkg-config.
++    if target.contains("windows-gnu") && host.contains("windows") {
++        env::set_var("PKG_CONFIG_ALLOW_CROSS", "1");
++    } else if target.contains("windows") {
++        return;
++    }
++
++    let lib = match pkg_config::Config::new().print_system_libs(false).find(
++        "openssl",
++    ) {
++        Ok(lib) => lib,
++        Err(e) => {
++            println!("run pkg_config fail: {:?}", e);
++            return;
++        }
++    };
++
++    validate_headers(&lib.include_paths);
++
++    for include in lib.include_paths.iter() {
++        println!("cargo:include={}", include.display());
++    }
++
++    std::process::exit(0);
++}
++
++/// Validates the header files found in `include_dir` and then returns the
++/// version string of OpenSSL.
++fn validate_headers(include_dirs: &[PathBuf]) -> Version {
++    // This `*-sys` crate only works with OpenSSL 1.0.1, 1.0.2, and 1.1.0. To
++    // correctly expose the right API from this crate, take a look at
++    // `opensslv.h` to see what version OpenSSL claims to be.
++    //
++    // OpenSSL has a number of build-time configuration options which affect
++    // various structs and such. Since OpenSSL 1.1.0 this isn't really a problem
++    // as the library is much more FFI-friendly, but 1.0.{1,2} suffer this problem.
++    //
++    // To handle all this conditional compilation we slurp up the configuration
++    // file of OpenSSL, `opensslconf.h`, and then dump out everything it defines
++    // as our own #[cfg] directives. That way the `ossl10x.rs` bindings can
++    // account for compile differences and such.
++    let mut path = PathBuf::from(env::var_os("OUT_DIR").unwrap());
++    path.push("expando.c");
++    let mut file = BufWriter::new(File::create(&path).unwrap());
++
++    write!(
++        file,
++        "\
++#include <openssl/opensslv.h>
++#include <openssl/opensslconf.h>
++
++#if LIBRESSL_VERSION_NUMBER >= 0x20601000
++RUST_LIBRESSL_NEW
++#elif LIBRESSL_VERSION_NUMBER >= 0x20600000
++RUST_LIBRESSL_260
++#elif LIBRESSL_VERSION_NUMBER >= 0x20506000
++RUST_LIBRESSL_NEW
++#elif LIBRESSL_VERSION_NUMBER >= 0x20505000
++RUST_LIBRESSL_255
++#elif LIBRESSL_VERSION_NUMBER >= 0x20504000
++RUST_LIBRESSL_254
++#elif LIBRESSL_VERSION_NUMBER >= 0x20503000
++RUST_LIBRESSL_253
++#elif LIBRESSL_VERSION_NUMBER >= 0x20502000
++RUST_LIBRESSL_252
++#elif LIBRESSL_VERSION_NUMBER >= 0x20501000
++RUST_LIBRESSL_251
++#elif LIBRESSL_VERSION_NUMBER >= 0x20500000
++RUST_LIBRESSL_250
++#elif defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20500000
++RUST_LIBRESSL_OLD
++#elif OPENSSL_VERSION_NUMBER >= 0x10101000
++RUST_OPENSSL_NEW
++#elif OPENSSL_VERSION_NUMBER >= 0x10100060
++RUST_OPENSSL_110F
++#elif OPENSSL_VERSION_NUMBER >= 0x10100000
++RUST_OPENSSL_110
++#elif OPENSSL_VERSION_NUMBER >= 0x10002000
++RUST_OPENSSL_102
++#elif OPENSSL_VERSION_NUMBER >= 0x10001000
++RUST_OPENSSL_101
++#else
++RUST_OPENSSL_OLD
++#endif
++"
++    ).unwrap();
++
++    for define in DEFINES {
++        write!(
++            file,
++            "\
++#ifdef {define}
++RUST_{define}
++#endif
++",
++            define = define
++        ).unwrap();
++    }
++
++    file.flush().unwrap();
++    drop(file);
++
++    let mut gcc = gcc::Config::new();
++    for include_dir in include_dirs {
++        gcc.include(include_dir);
++    }
++    // https://github.com/alexcrichton/gcc-rs/issues/133
++    let expanded = match panic::catch_unwind(AssertUnwindSafe(|| gcc.file(&path).expand())) {
++        Ok(expanded) => expanded,
++        Err(_) => {
++            panic!(
++                "
++Failed to find OpenSSL development headers.
++
++You can try fixing this setting the `OPENSSL_DIR` environment variable
++pointing to your OpenSSL installation or installing OpenSSL headers package
++specific to your distribution:
++
++    # On Ubuntu
++    sudo apt-get install libssl-dev
++    # On Arch Linux
++    sudo pacman -S openssl
++    # On Fedora
++    sudo dnf install openssl-devel
++
++See rust-openssl README for more information:
++
++    https://github.com/sfackler/rust-openssl#linux
++"
++            );
++        }
++    };
++    let expanded = String::from_utf8(expanded).unwrap();
++
++    let mut enabled = vec![];
++    for &define in DEFINES {
++        if expanded.contains(&format!("RUST_{}", define)) {
++            println!("cargo:rustc-cfg=osslconf=\"{}\"", define);
++            enabled.push(define);
++        }
++    }
++    println!("cargo:conf={}", enabled.join(","));
++
++    if expanded.contains("RUST_LIBRESSL_250") {
++        println!("cargo:rustc-cfg=libressl");
++        println!("cargo:rustc-cfg=libressl250");
++        println!("cargo:libressl=true");
++        println!("cargo:version=101");
++        Version::Libressl
++    } else if expanded.contains("RUST_LIBRESSL_251") {
++        println!("cargo:rustc-cfg=libressl");
++        println!("cargo:rustc-cfg=libressl251");
++        println!("cargo:libressl=true");
++        println!("cargo:version=101");
++        Version::Libressl
++    } else if expanded.contains("RUST_LIBRESSL_252") {
++        println!("cargo:rustc-cfg=libressl");
++        println!("cargo:rustc-cfg=libressl252");
++        println!("cargo:libressl=true");
++        println!("cargo:version=101");
++        Version::Libressl
++    } else if expanded.contains("RUST_LIBRESSL_253") {
++        println!("cargo:rustc-cfg=libressl");
++        println!("cargo:rustc-cfg=libressl253");
++        println!("cargo:libressl=true");
++        println!("cargo:version=101");
++        Version::Libressl
++    } else if expanded.contains("RUST_LIBRESSL_254") {
++        println!("cargo:rustc-cfg=libressl");
++        println!("cargo:rustc-cfg=libressl254");
++        println!("cargo:libressl=true");
++        println!("cargo:version=101");
++        Version::Libressl
++    } else if expanded.contains("RUST_LIBRESSL_255") {
++        println!("cargo:rustc-cfg=libressl");
++        println!("cargo:rustc-cfg=libressl255");
++        println!("cargo:libressl=true");
++        println!("cargo:version=101");
++        Version::Libressl
++    } else if expanded.contains("RUST_LIBRESSL_260") {
++        println!("cargo:rustc-cfg=libressl");
++        println!("cargo:rustc-cfg=libressl260");
++        println!("cargo:libressl=true");
++        println!("cargo:version=101");
++        Version::Libressl
++    } else if expanded.contains("RUST_OPENSSL_110F") {
++        println!("cargo:rustc-cfg=ossl110");
++        println!("cargo:rustc-cfg=ossl110f");
++        println!("cargo:version=110");
++        println!("cargo:patch=f");
++        Version::Openssl110
++    } else if expanded.contains("RUST_OPENSSL_110") {
++        println!("cargo:rustc-cfg=ossl110");
++        println!("cargo:version=110");
++        Version::Openssl110
++    } else if expanded.contains("RUST_OPENSSL_102") {
++        println!("cargo:rustc-cfg=ossl102");
++        println!("cargo:version=102");
++        Version::Openssl102
++    } else if expanded.contains("RUST_OPENSSL_101") {
++        println!("cargo:rustc-cfg=ossl101");
++        println!("cargo:version=101");
++        Version::Openssl101
++    } else {
++        panic!(
++            "
++
++This crate is only compatible with OpenSSL 1.0.1, 1.0.2, and 1.1.0, or LibreSSL
++2.5 and 2.6.0, but a different version of OpenSSL was found. The build is now
++aborting due to this version mismatch.
++
++"
++        );
++    }
++}
++
++/// Given a libdir for OpenSSL (where artifacts are located) as well as the name
++/// of the libraries we're linking to, figure out whether we should link them
++/// statically or dynamically.
++fn determine_mode(libdir: &Path, libs: &[&str]) -> &'static str {
++    // First see if a mode was explicitly requested
++    println!("cargo:rerun-if-env-changed=OPENSSL_STATIC");
++    let kind = env::var("OPENSSL_STATIC").ok();
++    match kind.as_ref().map(|s| &s[..]) {
++        Some("0") => return "dylib",
++        Some(_) => return "static",
++        None => {}
++    }
++
++    // Next, see what files we actually have to link against, and see what our
++    // possibilities even are.
++    let files = libdir
++        .read_dir()
++        .unwrap()
++        .map(|e| e.unwrap())
++        .map(|e| e.file_name())
++        .filter_map(|e| e.into_string().ok())
++        .collect::<HashSet<_>>();
++    let can_static = libs.iter().all(|l| {
++        files.contains(&format!("lib{}.a", l)) || files.contains(&format!("{}.lib", l))
++    });
++    let can_dylib = libs.iter().all(|l| {
++        files.contains(&format!("lib{}.so", l)) || files.contains(&format!("{}.dll", l)) ||
++            files.contains(&format!("lib{}.dylib", l))
++    });
++    match (can_static, can_dylib) {
++        (true, false) => return "static",
++        (false, true) => return "dylib",
++        (false, false) => {
++            panic!(
++                "OpenSSL libdir at `{}` does not contain the required files \
++                    to either statically or dynamically link OpenSSL",
++                libdir.display()
++            );
++        }
++        (true, true) => {}
++    }
++
++    // Ok, we've got not explicit preference and can *either* link statically or
++    // link dynamically. In the interest of "security upgrades" and/or "best
++    // practices with security libs", let's link dynamically.
++    "dylib"
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7c68b4fa0be1100d727223d1b0467d35a321f792
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2577 @@@
++#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
++#![allow(dead_code, overflowing_literals)]
++#![doc(html_root_url="https://docs.rs/openssl-sys/0.9.15")]
++
++extern crate libc;
++
++use libc::{c_void, c_int, c_char, c_ulong, c_long, c_uint, c_uchar, size_t, FILE};
++use std::ptr;
++use std::mem;
++
++#[cfg(any(ossl101, ossl102))]
++mod ossl10x;
++#[cfg(any(ossl101, ossl102))]
++pub use ossl10x::*;
++
++#[cfg(ossl110)]
++mod ossl110;
++#[cfg(ossl110)]
++pub use ossl110::*;
++
++#[cfg(libressl)]
++mod libressl;
++#[cfg(libressl)]
++pub use libressl::*;
++
++pub enum ASN1_INTEGER {}
++pub enum ASN1_GENERALIZEDTIME {}
++pub enum ASN1_STRING {}
++pub enum ASN1_BIT_STRING {}
++pub enum ASN1_TIME {}
++pub enum ASN1_TYPE {}
++pub enum ASN1_OBJECT {}
++pub enum BN_CTX {}
++pub enum BN_GENCB {}
++pub enum CONF {}
++pub enum CONF_METHOD {}
++pub enum COMP_METHOD {}
++pub enum EC_KEY {}
++pub enum EC_GROUP {}
++pub enum EC_METHOD {}
++pub enum EC_POINT {}
++pub enum ENGINE {}
++pub enum EVP_CIPHER_CTX {}
++pub enum EVP_MD {}
++pub enum EVP_PKEY_CTX {}
++pub enum OCSP_BASICRESP {}
++pub enum OCSP_CERTID {}
++pub enum OCSP_RESPONSE {}
++pub enum OCSP_REQUEST {}
++pub enum OCSP_ONEREQ {}
++pub enum SSL_CIPHER {}
++pub enum SSL_METHOD {}
++pub enum X509_CRL {}
++pub enum X509_EXTENSION {}
++pub enum X509_NAME {}
++pub enum X509_NAME_ENTRY {}
++pub enum X509_STORE {}
++pub enum X509_STORE_CTX {}
++pub enum bio_st {}
++pub enum DH_METHOD {}
++pub enum RSA_METHOD {}
++pub enum BN_MONT_CTX {}
++pub enum BN_BLINDING {}
++pub enum DSA_METHOD {}
++pub enum EVP_PKEY_ASN1_METHOD {}
++
++pub type bio_info_cb = Option<
++    unsafe extern "C" fn(*mut BIO,
++                         c_int,
++                         *const c_char,
++                         c_int,
++                         c_long,
++                         c_long),
++>;
++pub type GEN_SESSION_CB = Option<
++    unsafe extern "C" fn(*const SSL, *mut c_uchar, *mut c_uint)
++                         -> c_int,
++>;
++pub type tls_session_ticket_ext_cb_fn = Option<
++    unsafe extern "C" fn(*mut SSL,
++                         *const c_uchar,
++                         c_int,
++                         *mut c_void)
++                         -> c_int,
++>;
++pub type tls_session_secret_cb_fn = Option<
++    unsafe extern "C" fn(*mut SSL,
++                         *mut c_void,
++                         *mut c_int,
++                         *mut stack_st_SSL_CIPHER,
++                         *mut *mut SSL_CIPHER,
++                         *mut c_void)
++                         -> c_int,
++>;
++
++#[repr(C)]
++#[derive(Copy, Clone)]
++pub enum point_conversion_form_t {
++    POINT_CONVERSION_COMPRESSED = 2,
++    POINT_CONVERSION_UNCOMPRESSED = 4,
++    POINT_CONVERSION_HYBRID = 6,
++}
++
++#[repr(C)]
++pub struct AES_KEY {
++    // There is some business with AES_LONG which is there to ensure the values here are 32 bits
++    rd_key: [u32; 4 * (AES_MAXNR as usize + 1)],
++    rounds: c_int,
++}
++
++#[repr(C)]
++pub struct GENERAL_NAME {
++    pub type_: c_int,
++    pub d: *mut c_void,
++}
++
++#[repr(C)]
++pub struct X509V3_CTX {
++    flags: c_int,
++    issuer_cert: *mut c_void,
++    subject_cert: *mut c_void,
++    subject_req: *mut c_void,
++    crl: *mut c_void,
++    db_meth: *mut c_void,
++    db: *mut c_void,
++    // I like the last comment line, it is copied from OpenSSL sources:
++    // Maybe more here
++}
++
++#[cfg(target_pointer_width = "64")]
++pub type BN_ULONG = libc::c_ulonglong;
++#[cfg(target_pointer_width = "32")]
++pub type BN_ULONG = c_uint;
++
++pub type CRYPTO_EX_new = unsafe extern "C" fn(parent: *mut c_void,
++                                              ptr: *mut c_void,
++                                              ad: *const CRYPTO_EX_DATA,
++                                              idx: c_int,
++                                              argl: c_long,
++                                              argp: *const c_void)
++                                              -> c_int;
++pub type CRYPTO_EX_dup = unsafe extern "C" fn(to: *mut CRYPTO_EX_DATA,
++                                              from: *mut CRYPTO_EX_DATA,
++                                              from_d: *mut c_void,
++                                              idx: c_int,
++                                              argl: c_long,
++                                              argp: *mut c_void)
++                                              -> c_int;
++pub type CRYPTO_EX_free = unsafe extern "C" fn(parent: *mut c_void,
++                                               ptr: *mut c_void,
++                                               ad: *mut CRYPTO_EX_DATA,
++                                               idx: c_int,
++                                               argl: c_long,
++                                               argp: *mut c_void);
++pub type PasswordCallback = unsafe extern "C" fn(buf: *mut c_char,
++                                                 size: c_int,
++                                                 rwflag: c_int,
++                                                 user_data: *mut c_void)
++                                                 -> c_int;
++
++pub const AES_ENCRYPT: c_int = 1;
++pub const AES_DECRYPT: c_int = 0;
++
++pub const AES_MAXNR: c_int = 14;
++pub const AES_BLOCK_SIZE: c_int = 16;
++
++pub const BIO_TYPE_NONE: c_int = 0;
++
++pub const BIO_CTRL_EOF: c_int = 2;
++pub const BIO_CTRL_INFO: c_int = 3;
++pub const BIO_CTRL_FLUSH: c_int = 11;
++pub const BIO_C_SET_BUF_MEM_EOF_RETURN: c_int = 130;
++
++pub const BIO_FLAGS_READ: c_int = 0x01;
++pub const BIO_FLAGS_WRITE: c_int = 0x02;
++pub const BIO_FLAGS_IO_SPECIAL: c_int = 0x04;
++pub const BIO_FLAGS_RWS: c_int = BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL;
++pub const BIO_FLAGS_SHOULD_RETRY: c_int = 0x08;
++
++pub const CRYPTO_LOCK: c_int = 1;
++
++pub const ERR_TXT_MALLOCED: c_int = 0x01;
++pub const ERR_TXT_STRING: c_int = 0x02;
++
++pub const ERR_LIB_PEM: c_int = 9;
++pub const PEM_R_NO_START_LINE: c_int = 108;
++
++pub const EVP_MAX_MD_SIZE: c_uint = 64;
++pub const EVP_PKEY_RSA: c_int = NID_rsaEncryption;
++pub const EVP_PKEY_HMAC: c_int = NID_hmac;
++pub const EVP_PKEY_DSA: c_int = NID_dsa;
++pub const EVP_PKEY_DH: c_int = NID_dhKeyAgreement;
++pub const EVP_PKEY_EC: c_int = NID_X9_62_id_ecPublicKey;
++
++pub const EVP_PKEY_ALG_CTRL: c_int = 0x1000;
++
++pub const EVP_PKEY_CTRL_RSA_PADDING: c_int = EVP_PKEY_ALG_CTRL + 1;
++
++pub const EVP_PKEY_CTRL_GET_RSA_PADDING: c_int = EVP_PKEY_ALG_CTRL + 6;
++
++pub const EVP_CTRL_GCM_SET_IVLEN: c_int = 0x9;
++pub const EVP_CTRL_GCM_GET_TAG: c_int = 0x10;
++pub const EVP_CTRL_GCM_SET_TAG: c_int = 0x11;
++
++pub const MBSTRING_ASC: c_int = MBSTRING_FLAG | 1;
++pub const MBSTRING_BMP: c_int = MBSTRING_FLAG | 2;
++pub const MBSTRING_FLAG: c_int = 0x1000;
++pub const MBSTRING_UNIV: c_int = MBSTRING_FLAG | 4;
++pub const MBSTRING_UTF8: c_int = MBSTRING_FLAG;
++
++pub const NID_undef: c_int = 0;
++pub const NID_itu_t: c_int = 645;
++pub const NID_ccitt: c_int = 404;
++pub const NID_iso: c_int = 181;
++pub const NID_joint_iso_itu_t: c_int = 646;
++pub const NID_joint_iso_ccitt: c_int = 393;
++pub const NID_member_body: c_int = 182;
++pub const NID_identified_organization: c_int = 676;
++pub const NID_hmac_md5: c_int = 780;
++pub const NID_hmac_sha1: c_int = 781;
++pub const NID_certicom_arc: c_int = 677;
++pub const NID_international_organizations: c_int = 647;
++pub const NID_wap: c_int = 678;
++pub const NID_wap_wsg: c_int = 679;
++pub const NID_selected_attribute_types: c_int = 394;
++pub const NID_clearance: c_int = 395;
++pub const NID_ISO_US: c_int = 183;
++pub const NID_X9_57: c_int = 184;
++pub const NID_X9cm: c_int = 185;
++pub const NID_dsa: c_int = 116;
++pub const NID_dsaWithSHA1: c_int = 113;
++pub const NID_ansi_X9_62: c_int = 405;
++pub const NID_X9_62_prime_field: c_int = 406;
++pub const NID_X9_62_characteristic_two_field: c_int = 407;
++pub const NID_X9_62_id_characteristic_two_basis: c_int = 680;
++pub const NID_X9_62_onBasis: c_int = 681;
++pub const NID_X9_62_tpBasis: c_int = 682;
++pub const NID_X9_62_ppBasis: c_int = 683;
++pub const NID_X9_62_id_ecPublicKey: c_int = 408;
++pub const NID_X9_62_c2pnb163v1: c_int = 684;
++pub const NID_X9_62_c2pnb163v2: c_int = 685;
++pub const NID_X9_62_c2pnb163v3: c_int = 686;
++pub const NID_X9_62_c2pnb176v1: c_int = 687;
++pub const NID_X9_62_c2tnb191v1: c_int = 688;
++pub const NID_X9_62_c2tnb191v2: c_int = 689;
++pub const NID_X9_62_c2tnb191v3: c_int = 690;
++pub const NID_X9_62_c2onb191v4: c_int = 691;
++pub const NID_X9_62_c2onb191v5: c_int = 692;
++pub const NID_X9_62_c2pnb208w1: c_int = 693;
++pub const NID_X9_62_c2tnb239v1: c_int = 694;
++pub const NID_X9_62_c2tnb239v2: c_int = 695;
++pub const NID_X9_62_c2tnb239v3: c_int = 696;
++pub const NID_X9_62_c2onb239v4: c_int = 697;
++pub const NID_X9_62_c2onb239v5: c_int = 698;
++pub const NID_X9_62_c2pnb272w1: c_int = 699;
++pub const NID_X9_62_c2pnb304w1: c_int = 700;
++pub const NID_X9_62_c2tnb359v1: c_int = 701;
++pub const NID_X9_62_c2pnb368w1: c_int = 702;
++pub const NID_X9_62_c2tnb431r1: c_int = 703;
++pub const NID_X9_62_prime192v1: c_int = 409;
++pub const NID_X9_62_prime192v2: c_int = 410;
++pub const NID_X9_62_prime192v3: c_int = 411;
++pub const NID_X9_62_prime239v1: c_int = 412;
++pub const NID_X9_62_prime239v2: c_int = 413;
++pub const NID_X9_62_prime239v3: c_int = 414;
++pub const NID_X9_62_prime256v1: c_int = 415;
++pub const NID_ecdsa_with_SHA1: c_int = 416;
++pub const NID_ecdsa_with_Recommended: c_int = 791;
++pub const NID_ecdsa_with_Specified: c_int = 792;
++pub const NID_ecdsa_with_SHA224: c_int = 793;
++pub const NID_ecdsa_with_SHA256: c_int = 794;
++pub const NID_ecdsa_with_SHA384: c_int = 795;
++pub const NID_ecdsa_with_SHA512: c_int = 796;
++pub const NID_secp112r1: c_int = 704;
++pub const NID_secp112r2: c_int = 705;
++pub const NID_secp128r1: c_int = 706;
++pub const NID_secp128r2: c_int = 707;
++pub const NID_secp160k1: c_int = 708;
++pub const NID_secp160r1: c_int = 709;
++pub const NID_secp160r2: c_int = 710;
++pub const NID_secp192k1: c_int = 711;
++pub const NID_secp224k1: c_int = 712;
++pub const NID_secp224r1: c_int = 713;
++pub const NID_secp256k1: c_int = 714;
++pub const NID_secp384r1: c_int = 715;
++pub const NID_secp521r1: c_int = 716;
++pub const NID_sect113r1: c_int = 717;
++pub const NID_sect113r2: c_int = 718;
++pub const NID_sect131r1: c_int = 719;
++pub const NID_sect131r2: c_int = 720;
++pub const NID_sect163k1: c_int = 721;
++pub const NID_sect163r1: c_int = 722;
++pub const NID_sect163r2: c_int = 723;
++pub const NID_sect193r1: c_int = 724;
++pub const NID_sect193r2: c_int = 725;
++pub const NID_sect233k1: c_int = 726;
++pub const NID_sect233r1: c_int = 727;
++pub const NID_sect239k1: c_int = 728;
++pub const NID_sect283k1: c_int = 729;
++pub const NID_sect283r1: c_int = 730;
++pub const NID_sect409k1: c_int = 731;
++pub const NID_sect409r1: c_int = 732;
++pub const NID_sect571k1: c_int = 733;
++pub const NID_sect571r1: c_int = 734;
++pub const NID_wap_wsg_idm_ecid_wtls1: c_int = 735;
++pub const NID_wap_wsg_idm_ecid_wtls3: c_int = 736;
++pub const NID_wap_wsg_idm_ecid_wtls4: c_int = 737;
++pub const NID_wap_wsg_idm_ecid_wtls5: c_int = 738;
++pub const NID_wap_wsg_idm_ecid_wtls6: c_int = 739;
++pub const NID_wap_wsg_idm_ecid_wtls7: c_int = 740;
++pub const NID_wap_wsg_idm_ecid_wtls8: c_int = 741;
++pub const NID_wap_wsg_idm_ecid_wtls9: c_int = 742;
++pub const NID_wap_wsg_idm_ecid_wtls10: c_int = 743;
++pub const NID_wap_wsg_idm_ecid_wtls11: c_int = 744;
++pub const NID_wap_wsg_idm_ecid_wtls12: c_int = 745;
++pub const NID_cast5_cbc: c_int = 108;
++pub const NID_cast5_ecb: c_int = 109;
++pub const NID_cast5_cfb64: c_int = 110;
++pub const NID_cast5_ofb64: c_int = 111;
++pub const NID_pbeWithMD5AndCast5_CBC: c_int = 112;
++pub const NID_id_PasswordBasedMAC: c_int = 782;
++pub const NID_id_DHBasedMac: c_int = 783;
++pub const NID_rsadsi: c_int = 1;
++pub const NID_pkcs: c_int = 2;
++pub const NID_pkcs1: c_int = 186;
++pub const NID_rsaEncryption: c_int = 6;
++pub const NID_md2WithRSAEncryption: c_int = 7;
++pub const NID_md4WithRSAEncryption: c_int = 396;
++pub const NID_md5WithRSAEncryption: c_int = 8;
++pub const NID_sha1WithRSAEncryption: c_int = 65;
++pub const NID_rsaesOaep: c_int = 919;
++pub const NID_mgf1: c_int = 911;
++pub const NID_rsassaPss: c_int = 912;
++pub const NID_sha256WithRSAEncryption: c_int = 668;
++pub const NID_sha384WithRSAEncryption: c_int = 669;
++pub const NID_sha512WithRSAEncryption: c_int = 670;
++pub const NID_sha224WithRSAEncryption: c_int = 671;
++pub const NID_pkcs3: c_int = 27;
++pub const NID_dhKeyAgreement: c_int = 28;
++pub const NID_pkcs5: c_int = 187;
++pub const NID_pbeWithMD2AndDES_CBC: c_int = 9;
++pub const NID_pbeWithMD5AndDES_CBC: c_int = 10;
++pub const NID_pbeWithMD2AndRC2_CBC: c_int = 168;
++pub const NID_pbeWithMD5AndRC2_CBC: c_int = 169;
++pub const NID_pbeWithSHA1AndDES_CBC: c_int = 170;
++pub const NID_pbeWithSHA1AndRC2_CBC: c_int = 68;
++pub const NID_id_pbkdf2: c_int = 69;
++pub const NID_pbes2: c_int = 161;
++pub const NID_pbmac1: c_int = 162;
++pub const NID_pkcs7: c_int = 20;
++pub const NID_pkcs7_data: c_int = 21;
++pub const NID_pkcs7_signed: c_int = 22;
++pub const NID_pkcs7_enveloped: c_int = 23;
++pub const NID_pkcs7_signedAndEnveloped: c_int = 24;
++pub const NID_pkcs7_digest: c_int = 25;
++pub const NID_pkcs7_encrypted: c_int = 26;
++pub const NID_pkcs9: c_int = 47;
++pub const NID_pkcs9_emailAddress: c_int = 48;
++pub const NID_pkcs9_unstructuredName: c_int = 49;
++pub const NID_pkcs9_contentType: c_int = 50;
++pub const NID_pkcs9_messageDigest: c_int = 51;
++pub const NID_pkcs9_signingTime: c_int = 52;
++pub const NID_pkcs9_countersignature: c_int = 53;
++pub const NID_pkcs9_challengePassword: c_int = 54;
++pub const NID_pkcs9_unstructuredAddress: c_int = 55;
++pub const NID_pkcs9_extCertAttributes: c_int = 56;
++pub const NID_ext_req: c_int = 172;
++pub const NID_SMIMECapabilities: c_int = 167;
++pub const NID_SMIME: c_int = 188;
++pub const NID_id_smime_mod: c_int = 189;
++pub const NID_id_smime_ct: c_int = 190;
++pub const NID_id_smime_aa: c_int = 191;
++pub const NID_id_smime_alg: c_int = 192;
++pub const NID_id_smime_cd: c_int = 193;
++pub const NID_id_smime_spq: c_int = 194;
++pub const NID_id_smime_cti: c_int = 195;
++pub const NID_id_smime_mod_cms: c_int = 196;
++pub const NID_id_smime_mod_ess: c_int = 197;
++pub const NID_id_smime_mod_oid: c_int = 198;
++pub const NID_id_smime_mod_msg_v3: c_int = 199;
++pub const NID_id_smime_mod_ets_eSignature_88: c_int = 200;
++pub const NID_id_smime_mod_ets_eSignature_97: c_int = 201;
++pub const NID_id_smime_mod_ets_eSigPolicy_88: c_int = 202;
++pub const NID_id_smime_mod_ets_eSigPolicy_97: c_int = 203;
++pub const NID_id_smime_ct_receipt: c_int = 204;
++pub const NID_id_smime_ct_authData: c_int = 205;
++pub const NID_id_smime_ct_publishCert: c_int = 206;
++pub const NID_id_smime_ct_TSTInfo: c_int = 207;
++pub const NID_id_smime_ct_TDTInfo: c_int = 208;
++pub const NID_id_smime_ct_contentInfo: c_int = 209;
++pub const NID_id_smime_ct_DVCSRequestData: c_int = 210;
++pub const NID_id_smime_ct_DVCSResponseData: c_int = 211;
++pub const NID_id_smime_ct_compressedData: c_int = 786;
++pub const NID_id_ct_asciiTextWithCRLF: c_int = 787;
++pub const NID_id_smime_aa_receiptRequest: c_int = 212;
++pub const NID_id_smime_aa_securityLabel: c_int = 213;
++pub const NID_id_smime_aa_mlExpandHistory: c_int = 214;
++pub const NID_id_smime_aa_contentHint: c_int = 215;
++pub const NID_id_smime_aa_msgSigDigest: c_int = 216;
++pub const NID_id_smime_aa_encapContentType: c_int = 217;
++pub const NID_id_smime_aa_contentIdentifier: c_int = 218;
++pub const NID_id_smime_aa_macValue: c_int = 219;
++pub const NID_id_smime_aa_equivalentLabels: c_int = 220;
++pub const NID_id_smime_aa_contentReference: c_int = 221;
++pub const NID_id_smime_aa_encrypKeyPref: c_int = 222;
++pub const NID_id_smime_aa_signingCertificate: c_int = 223;
++pub const NID_id_smime_aa_smimeEncryptCerts: c_int = 224;
++pub const NID_id_smime_aa_timeStampToken: c_int = 225;
++pub const NID_id_smime_aa_ets_sigPolicyId: c_int = 226;
++pub const NID_id_smime_aa_ets_commitmentType: c_int = 227;
++pub const NID_id_smime_aa_ets_signerLocation: c_int = 228;
++pub const NID_id_smime_aa_ets_signerAttr: c_int = 229;
++pub const NID_id_smime_aa_ets_otherSigCert: c_int = 230;
++pub const NID_id_smime_aa_ets_contentTimestamp: c_int = 231;
++pub const NID_id_smime_aa_ets_CertificateRefs: c_int = 232;
++pub const NID_id_smime_aa_ets_RevocationRefs: c_int = 233;
++pub const NID_id_smime_aa_ets_certValues: c_int = 234;
++pub const NID_id_smime_aa_ets_revocationValues: c_int = 235;
++pub const NID_id_smime_aa_ets_escTimeStamp: c_int = 236;
++pub const NID_id_smime_aa_ets_certCRLTimestamp: c_int = 237;
++pub const NID_id_smime_aa_ets_archiveTimeStamp: c_int = 238;
++pub const NID_id_smime_aa_signatureType: c_int = 239;
++pub const NID_id_smime_aa_dvcs_dvc: c_int = 240;
++pub const NID_id_smime_alg_ESDHwith3DES: c_int = 241;
++pub const NID_id_smime_alg_ESDHwithRC2: c_int = 242;
++pub const NID_id_smime_alg_3DESwrap: c_int = 243;
++pub const NID_id_smime_alg_RC2wrap: c_int = 244;
++pub const NID_id_smime_alg_ESDH: c_int = 245;
++pub const NID_id_smime_alg_CMS3DESwrap: c_int = 246;
++pub const NID_id_smime_alg_CMSRC2wrap: c_int = 247;
++pub const NID_id_alg_PWRI_KEK: c_int = 893;
++pub const NID_id_smime_cd_ldap: c_int = 248;
++pub const NID_id_smime_spq_ets_sqt_uri: c_int = 249;
++pub const NID_id_smime_spq_ets_sqt_unotice: c_int = 250;
++pub const NID_id_smime_cti_ets_proofOfOrigin: c_int = 251;
++pub const NID_id_smime_cti_ets_proofOfReceipt: c_int = 252;
++pub const NID_id_smime_cti_ets_proofOfDelivery: c_int = 253;
++pub const NID_id_smime_cti_ets_proofOfSender: c_int = 254;
++pub const NID_id_smime_cti_ets_proofOfApproval: c_int = 255;
++pub const NID_id_smime_cti_ets_proofOfCreation: c_int = 256;
++pub const NID_friendlyName: c_int = 156;
++pub const NID_localKeyID: c_int = 157;
++pub const NID_ms_csp_name: c_int = 417;
++pub const NID_LocalKeySet: c_int = 856;
++pub const NID_x509Certificate: c_int = 158;
++pub const NID_sdsiCertificate: c_int = 159;
++pub const NID_x509Crl: c_int = 160;
++pub const NID_pbe_WithSHA1And128BitRC4: c_int = 144;
++pub const NID_pbe_WithSHA1And40BitRC4: c_int = 145;
++pub const NID_pbe_WithSHA1And3_Key_TripleDES_CBC: c_int = 146;
++pub const NID_pbe_WithSHA1And2_Key_TripleDES_CBC: c_int = 147;
++pub const NID_pbe_WithSHA1And128BitRC2_CBC: c_int = 148;
++pub const NID_pbe_WithSHA1And40BitRC2_CBC: c_int = 149;
++pub const NID_keyBag: c_int = 150;
++pub const NID_pkcs8ShroudedKeyBag: c_int = 151;
++pub const NID_certBag: c_int = 152;
++pub const NID_crlBag: c_int = 153;
++pub const NID_secretBag: c_int = 154;
++pub const NID_safeContentsBag: c_int = 155;
++pub const NID_md2: c_int = 3;
++pub const NID_md4: c_int = 257;
++pub const NID_md5: c_int = 4;
++pub const NID_md5_sha1: c_int = 114;
++pub const NID_hmacWithMD5: c_int = 797;
++pub const NID_hmacWithSHA1: c_int = 163;
++pub const NID_hmacWithSHA224: c_int = 798;
++pub const NID_hmacWithSHA256: c_int = 799;
++pub const NID_hmacWithSHA384: c_int = 800;
++pub const NID_hmacWithSHA512: c_int = 801;
++pub const NID_rc2_cbc: c_int = 37;
++pub const NID_rc2_ecb: c_int = 38;
++pub const NID_rc2_cfb64: c_int = 39;
++pub const NID_rc2_ofb64: c_int = 40;
++pub const NID_rc2_40_cbc: c_int = 98;
++pub const NID_rc2_64_cbc: c_int = 166;
++pub const NID_rc4: c_int = 5;
++pub const NID_rc4_40: c_int = 97;
++pub const NID_des_ede3_cbc: c_int = 44;
++pub const NID_rc5_cbc: c_int = 120;
++pub const NID_rc5_ecb: c_int = 121;
++pub const NID_rc5_cfb64: c_int = 122;
++pub const NID_rc5_ofb64: c_int = 123;
++pub const NID_ms_ext_req: c_int = 171;
++pub const NID_ms_code_ind: c_int = 134;
++pub const NID_ms_code_com: c_int = 135;
++pub const NID_ms_ctl_sign: c_int = 136;
++pub const NID_ms_sgc: c_int = 137;
++pub const NID_ms_efs: c_int = 138;
++pub const NID_ms_smartcard_login: c_int = 648;
++pub const NID_ms_upn: c_int = 649;
++pub const NID_idea_cbc: c_int = 34;
++pub const NID_idea_ecb: c_int = 36;
++pub const NID_idea_cfb64: c_int = 35;
++pub const NID_idea_ofb64: c_int = 46;
++pub const NID_bf_cbc: c_int = 91;
++pub const NID_bf_ecb: c_int = 92;
++pub const NID_bf_cfb64: c_int = 93;
++pub const NID_bf_ofb64: c_int = 94;
++pub const NID_id_pkix: c_int = 127;
++pub const NID_id_pkix_mod: c_int = 258;
++pub const NID_id_pe: c_int = 175;
++pub const NID_id_qt: c_int = 259;
++pub const NID_id_kp: c_int = 128;
++pub const NID_id_it: c_int = 260;
++pub const NID_id_pkip: c_int = 261;
++pub const NID_id_alg: c_int = 262;
++pub const NID_id_cmc: c_int = 263;
++pub const NID_id_on: c_int = 264;
++pub const NID_id_pda: c_int = 265;
++pub const NID_id_aca: c_int = 266;
++pub const NID_id_qcs: c_int = 267;
++pub const NID_id_cct: c_int = 268;
++pub const NID_id_ppl: c_int = 662;
++pub const NID_id_ad: c_int = 176;
++pub const NID_id_pkix1_explicit_88: c_int = 269;
++pub const NID_id_pkix1_implicit_88: c_int = 270;
++pub const NID_id_pkix1_explicit_93: c_int = 271;
++pub const NID_id_pkix1_implicit_93: c_int = 272;
++pub const NID_id_mod_crmf: c_int = 273;
++pub const NID_id_mod_cmc: c_int = 274;
++pub const NID_id_mod_kea_profile_88: c_int = 275;
++pub const NID_id_mod_kea_profile_93: c_int = 276;
++pub const NID_id_mod_cmp: c_int = 277;
++pub const NID_id_mod_qualified_cert_88: c_int = 278;
++pub const NID_id_mod_qualified_cert_93: c_int = 279;
++pub const NID_id_mod_attribute_cert: c_int = 280;
++pub const NID_id_mod_timestamp_protocol: c_int = 281;
++pub const NID_id_mod_ocsp: c_int = 282;
++pub const NID_id_mod_dvcs: c_int = 283;
++pub const NID_id_mod_cmp2000: c_int = 284;
++pub const NID_info_access: c_int = 177;
++pub const NID_biometricInfo: c_int = 285;
++pub const NID_qcStatements: c_int = 286;
++pub const NID_ac_auditEntity: c_int = 287;
++pub const NID_ac_targeting: c_int = 288;
++pub const NID_aaControls: c_int = 289;
++pub const NID_sbgp_ipAddrBlock: c_int = 290;
++pub const NID_sbgp_autonomousSysNum: c_int = 291;
++pub const NID_sbgp_routerIdentifier: c_int = 292;
++pub const NID_ac_proxying: c_int = 397;
++pub const NID_sinfo_access: c_int = 398;
++pub const NID_proxyCertInfo: c_int = 663;
++pub const NID_id_qt_cps: c_int = 164;
++pub const NID_id_qt_unotice: c_int = 165;
++pub const NID_textNotice: c_int = 293;
++pub const NID_server_auth: c_int = 129;
++pub const NID_client_auth: c_int = 130;
++pub const NID_code_sign: c_int = 131;
++pub const NID_email_protect: c_int = 132;
++pub const NID_ipsecEndSystem: c_int = 294;
++pub const NID_ipsecTunnel: c_int = 295;
++pub const NID_ipsecUser: c_int = 296;
++pub const NID_time_stamp: c_int = 133;
++pub const NID_OCSP_sign: c_int = 180;
++pub const NID_dvcs: c_int = 297;
++pub const NID_id_it_caProtEncCert: c_int = 298;
++pub const NID_id_it_signKeyPairTypes: c_int = 299;
++pub const NID_id_it_encKeyPairTypes: c_int = 300;
++pub const NID_id_it_preferredSymmAlg: c_int = 301;
++pub const NID_id_it_caKeyUpdateInfo: c_int = 302;
++pub const NID_id_it_currentCRL: c_int = 303;
++pub const NID_id_it_unsupportedOIDs: c_int = 304;
++pub const NID_id_it_subscriptionRequest: c_int = 305;
++pub const NID_id_it_subscriptionResponse: c_int = 306;
++pub const NID_id_it_keyPairParamReq: c_int = 307;
++pub const NID_id_it_keyPairParamRep: c_int = 308;
++pub const NID_id_it_revPassphrase: c_int = 309;
++pub const NID_id_it_implicitConfirm: c_int = 310;
++pub const NID_id_it_confirmWaitTime: c_int = 311;
++pub const NID_id_it_origPKIMessage: c_int = 312;
++pub const NID_id_it_suppLangTags: c_int = 784;
++pub const NID_id_regCtrl: c_int = 313;
++pub const NID_id_regInfo: c_int = 314;
++pub const NID_id_regCtrl_regToken: c_int = 315;
++pub const NID_id_regCtrl_authenticator: c_int = 316;
++pub const NID_id_regCtrl_pkiPublicationInfo: c_int = 317;
++pub const NID_id_regCtrl_pkiArchiveOptions: c_int = 318;
++pub const NID_id_regCtrl_oldCertID: c_int = 319;
++pub const NID_id_regCtrl_protocolEncrKey: c_int = 320;
++pub const NID_id_regInfo_utf8Pairs: c_int = 321;
++pub const NID_id_regInfo_certReq: c_int = 322;
++pub const NID_id_alg_des40: c_int = 323;
++pub const NID_id_alg_noSignature: c_int = 324;
++pub const NID_id_alg_dh_sig_hmac_sha1: c_int = 325;
++pub const NID_id_alg_dh_pop: c_int = 326;
++pub const NID_id_cmc_statusInfo: c_int = 327;
++pub const NID_id_cmc_identification: c_int = 328;
++pub const NID_id_cmc_identityProof: c_int = 329;
++pub const NID_id_cmc_dataReturn: c_int = 330;
++pub const NID_id_cmc_transactionId: c_int = 331;
++pub const NID_id_cmc_senderNonce: c_int = 332;
++pub const NID_id_cmc_recipientNonce: c_int = 333;
++pub const NID_id_cmc_addExtensions: c_int = 334;
++pub const NID_id_cmc_encryptedPOP: c_int = 335;
++pub const NID_id_cmc_decryptedPOP: c_int = 336;
++pub const NID_id_cmc_lraPOPWitness: c_int = 337;
++pub const NID_id_cmc_getCert: c_int = 338;
++pub const NID_id_cmc_getCRL: c_int = 339;
++pub const NID_id_cmc_revokeRequest: c_int = 340;
++pub const NID_id_cmc_regInfo: c_int = 341;
++pub const NID_id_cmc_responseInfo: c_int = 342;
++pub const NID_id_cmc_queryPending: c_int = 343;
++pub const NID_id_cmc_popLinkRandom: c_int = 344;
++pub const NID_id_cmc_popLinkWitness: c_int = 345;
++pub const NID_id_cmc_confirmCertAcceptance: c_int = 346;
++pub const NID_id_on_personalData: c_int = 347;
++pub const NID_id_on_permanentIdentifier: c_int = 858;
++pub const NID_id_pda_dateOfBirth: c_int = 348;
++pub const NID_id_pda_placeOfBirth: c_int = 349;
++pub const NID_id_pda_gender: c_int = 351;
++pub const NID_id_pda_countryOfCitizenship: c_int = 352;
++pub const NID_id_pda_countryOfResidence: c_int = 353;
++pub const NID_id_aca_authenticationInfo: c_int = 354;
++pub const NID_id_aca_accessIdentity: c_int = 355;
++pub const NID_id_aca_chargingIdentity: c_int = 356;
++pub const NID_id_aca_group: c_int = 357;
++pub const NID_id_aca_role: c_int = 358;
++pub const NID_id_aca_encAttrs: c_int = 399;
++pub const NID_id_qcs_pkixQCSyntax_v1: c_int = 359;
++pub const NID_id_cct_crs: c_int = 360;
++pub const NID_id_cct_PKIData: c_int = 361;
++pub const NID_id_cct_PKIResponse: c_int = 362;
++pub const NID_id_ppl_anyLanguage: c_int = 664;
++pub const NID_id_ppl_inheritAll: c_int = 665;
++pub const NID_Independent: c_int = 667;
++pub const NID_ad_OCSP: c_int = 178;
++pub const NID_ad_ca_issuers: c_int = 179;
++pub const NID_ad_timeStamping: c_int = 363;
++pub const NID_ad_dvcs: c_int = 364;
++pub const NID_caRepository: c_int = 785;
++pub const NID_id_pkix_OCSP_basic: c_int = 365;
++pub const NID_id_pkix_OCSP_Nonce: c_int = 366;
++pub const NID_id_pkix_OCSP_CrlID: c_int = 367;
++pub const NID_id_pkix_OCSP_acceptableResponses: c_int = 368;
++pub const NID_id_pkix_OCSP_noCheck: c_int = 369;
++pub const NID_id_pkix_OCSP_archiveCutoff: c_int = 370;
++pub const NID_id_pkix_OCSP_serviceLocator: c_int = 371;
++pub const NID_id_pkix_OCSP_extendedStatus: c_int = 372;
++pub const NID_id_pkix_OCSP_valid: c_int = 373;
++pub const NID_id_pkix_OCSP_path: c_int = 374;
++pub const NID_id_pkix_OCSP_trustRoot: c_int = 375;
++pub const NID_algorithm: c_int = 376;
++pub const NID_md5WithRSA: c_int = 104;
++pub const NID_des_ecb: c_int = 29;
++pub const NID_des_cbc: c_int = 31;
++pub const NID_des_ofb64: c_int = 45;
++pub const NID_des_cfb64: c_int = 30;
++pub const NID_rsaSignature: c_int = 377;
++pub const NID_dsa_2: c_int = 67;
++pub const NID_dsaWithSHA: c_int = 66;
++pub const NID_shaWithRSAEncryption: c_int = 42;
++pub const NID_des_ede_ecb: c_int = 32;
++pub const NID_des_ede3_ecb: c_int = 33;
++pub const NID_des_ede_cbc: c_int = 43;
++pub const NID_des_ede_cfb64: c_int = 60;
++pub const NID_des_ede3_cfb64: c_int = 61;
++pub const NID_des_ede_ofb64: c_int = 62;
++pub const NID_des_ede3_ofb64: c_int = 63;
++pub const NID_desx_cbc: c_int = 80;
++pub const NID_sha: c_int = 41;
++pub const NID_sha1: c_int = 64;
++pub const NID_dsaWithSHA1_2: c_int = 70;
++pub const NID_sha1WithRSA: c_int = 115;
++pub const NID_ripemd160: c_int = 117;
++pub const NID_ripemd160WithRSA: c_int = 119;
++pub const NID_sxnet: c_int = 143;
++pub const NID_X500: c_int = 11;
++pub const NID_X509: c_int = 12;
++pub const NID_commonName: c_int = 13;
++pub const NID_surname: c_int = 100;
++pub const NID_serialNumber: c_int = 105;
++pub const NID_countryName: c_int = 14;
++pub const NID_localityName: c_int = 15;
++pub const NID_stateOrProvinceName: c_int = 16;
++pub const NID_streetAddress: c_int = 660;
++pub const NID_organizationName: c_int = 17;
++pub const NID_organizationalUnitName: c_int = 18;
++pub const NID_title: c_int = 106;
++pub const NID_description: c_int = 107;
++pub const NID_searchGuide: c_int = 859;
++pub const NID_businessCategory: c_int = 860;
++pub const NID_postalAddress: c_int = 861;
++pub const NID_postalCode: c_int = 661;
++pub const NID_postOfficeBox: c_int = 862;
++pub const NID_physicalDeliveryOfficeName: c_int = 863;
++pub const NID_telephoneNumber: c_int = 864;
++pub const NID_telexNumber: c_int = 865;
++pub const NID_teletexTerminalIdentifier: c_int = 866;
++pub const NID_facsimileTelephoneNumber: c_int = 867;
++pub const NID_x121Address: c_int = 868;
++pub const NID_internationaliSDNNumber: c_int = 869;
++pub const NID_registeredAddress: c_int = 870;
++pub const NID_destinationIndicator: c_int = 871;
++pub const NID_preferredDeliveryMethod: c_int = 872;
++pub const NID_presentationAddress: c_int = 873;
++pub const NID_supportedApplicationContext: c_int = 874;
++pub const NID_member: c_int = 875;
++pub const NID_owner: c_int = 876;
++pub const NID_roleOccupant: c_int = 877;
++pub const NID_seeAlso: c_int = 878;
++pub const NID_userPassword: c_int = 879;
++pub const NID_userCertificate: c_int = 880;
++pub const NID_cACertificate: c_int = 881;
++pub const NID_authorityRevocationList: c_int = 882;
++pub const NID_certificateRevocationList: c_int = 883;
++pub const NID_crossCertificatePair: c_int = 884;
++pub const NID_name: c_int = 173;
++pub const NID_givenName: c_int = 99;
++pub const NID_initials: c_int = 101;
++pub const NID_generationQualifier: c_int = 509;
++pub const NID_x500UniqueIdentifier: c_int = 503;
++pub const NID_dnQualifier: c_int = 174;
++pub const NID_enhancedSearchGuide: c_int = 885;
++pub const NID_protocolInformation: c_int = 886;
++pub const NID_distinguishedName: c_int = 887;
++pub const NID_uniqueMember: c_int = 888;
++pub const NID_houseIdentifier: c_int = 889;
++pub const NID_supportedAlgorithms: c_int = 890;
++pub const NID_deltaRevocationList: c_int = 891;
++pub const NID_dmdName: c_int = 892;
++pub const NID_pseudonym: c_int = 510;
++pub const NID_role: c_int = 400;
++pub const NID_X500algorithms: c_int = 378;
++pub const NID_rsa: c_int = 19;
++pub const NID_mdc2WithRSA: c_int = 96;
++pub const NID_mdc2: c_int = 95;
++pub const NID_id_ce: c_int = 81;
++pub const NID_subject_directory_attributes: c_int = 769;
++pub const NID_subject_key_identifier: c_int = 82;
++pub const NID_key_usage: c_int = 83;
++pub const NID_private_key_usage_period: c_int = 84;
++pub const NID_subject_alt_name: c_int = 85;
++pub const NID_issuer_alt_name: c_int = 86;
++pub const NID_basic_constraints: c_int = 87;
++pub const NID_crl_number: c_int = 88;
++pub const NID_crl_reason: c_int = 141;
++pub const NID_invalidity_date: c_int = 142;
++pub const NID_delta_crl: c_int = 140;
++pub const NID_issuing_distribution_point: c_int = 770;
++pub const NID_certificate_issuer: c_int = 771;
++pub const NID_name_constraints: c_int = 666;
++pub const NID_crl_distribution_points: c_int = 103;
++pub const NID_certificate_policies: c_int = 89;
++pub const NID_any_policy: c_int = 746;
++pub const NID_policy_mappings: c_int = 747;
++pub const NID_authority_key_identifier: c_int = 90;
++pub const NID_policy_constraints: c_int = 401;
++pub const NID_ext_key_usage: c_int = 126;
++pub const NID_freshest_crl: c_int = 857;
++pub const NID_inhibit_any_policy: c_int = 748;
++pub const NID_target_information: c_int = 402;
++pub const NID_no_rev_avail: c_int = 403;
++pub const NID_anyExtendedKeyUsage: c_int = 910;
++pub const NID_netscape: c_int = 57;
++pub const NID_netscape_cert_extension: c_int = 58;
++pub const NID_netscape_data_type: c_int = 59;
++pub const NID_netscape_cert_type: c_int = 71;
++pub const NID_netscape_base_url: c_int = 72;
++pub const NID_netscape_revocation_url: c_int = 73;
++pub const NID_netscape_ca_revocation_url: c_int = 74;
++pub const NID_netscape_renewal_url: c_int = 75;
++pub const NID_netscape_ca_policy_url: c_int = 76;
++pub const NID_netscape_ssl_server_name: c_int = 77;
++pub const NID_netscape_comment: c_int = 78;
++pub const NID_netscape_cert_sequence: c_int = 79;
++pub const NID_ns_sgc: c_int = 139;
++pub const NID_org: c_int = 379;
++pub const NID_dod: c_int = 380;
++pub const NID_iana: c_int = 381;
++pub const NID_Directory: c_int = 382;
++pub const NID_Management: c_int = 383;
++pub const NID_Experimental: c_int = 384;
++pub const NID_Private: c_int = 385;
++pub const NID_Security: c_int = 386;
++pub const NID_SNMPv2: c_int = 387;
++pub const NID_Mail: c_int = 388;
++pub const NID_Enterprises: c_int = 389;
++pub const NID_dcObject: c_int = 390;
++pub const NID_mime_mhs: c_int = 504;
++pub const NID_mime_mhs_headings: c_int = 505;
++pub const NID_mime_mhs_bodies: c_int = 506;
++pub const NID_id_hex_partial_message: c_int = 507;
++pub const NID_id_hex_multipart_message: c_int = 508;
++pub const NID_zlib_compression: c_int = 125;
++pub const NID_aes_128_ecb: c_int = 418;
++pub const NID_aes_128_cbc: c_int = 419;
++pub const NID_aes_128_ofb128: c_int = 420;
++pub const NID_aes_128_cfb128: c_int = 421;
++pub const NID_id_aes128_wrap: c_int = 788;
++pub const NID_aes_128_gcm: c_int = 895;
++pub const NID_aes_128_ccm: c_int = 896;
++pub const NID_id_aes128_wrap_pad: c_int = 897;
++pub const NID_aes_192_ecb: c_int = 422;
++pub const NID_aes_192_cbc: c_int = 423;
++pub const NID_aes_192_ofb128: c_int = 424;
++pub const NID_aes_192_cfb128: c_int = 425;
++pub const NID_id_aes192_wrap: c_int = 789;
++pub const NID_aes_192_gcm: c_int = 898;
++pub const NID_aes_192_ccm: c_int = 899;
++pub const NID_id_aes192_wrap_pad: c_int = 900;
++pub const NID_aes_256_ecb: c_int = 426;
++pub const NID_aes_256_cbc: c_int = 427;
++pub const NID_aes_256_ofb128: c_int = 428;
++pub const NID_aes_256_cfb128: c_int = 429;
++pub const NID_id_aes256_wrap: c_int = 790;
++pub const NID_aes_256_gcm: c_int = 901;
++pub const NID_aes_256_ccm: c_int = 902;
++pub const NID_id_aes256_wrap_pad: c_int = 903;
++pub const NID_aes_128_cfb1: c_int = 650;
++pub const NID_aes_192_cfb1: c_int = 651;
++pub const NID_aes_256_cfb1: c_int = 652;
++pub const NID_aes_128_cfb8: c_int = 653;
++pub const NID_aes_192_cfb8: c_int = 654;
++pub const NID_aes_256_cfb8: c_int = 655;
++pub const NID_aes_128_ctr: c_int = 904;
++pub const NID_aes_192_ctr: c_int = 905;
++pub const NID_aes_256_ctr: c_int = 906;
++pub const NID_aes_128_xts: c_int = 913;
++pub const NID_aes_256_xts: c_int = 914;
++pub const NID_des_cfb1: c_int = 656;
++pub const NID_des_cfb8: c_int = 657;
++pub const NID_des_ede3_cfb1: c_int = 658;
++pub const NID_des_ede3_cfb8: c_int = 659;
++pub const NID_sha256: c_int = 672;
++pub const NID_sha384: c_int = 673;
++pub const NID_sha512: c_int = 674;
++pub const NID_sha224: c_int = 675;
++pub const NID_dsa_with_SHA224: c_int = 802;
++pub const NID_dsa_with_SHA256: c_int = 803;
++pub const NID_hold_instruction_code: c_int = 430;
++pub const NID_hold_instruction_none: c_int = 431;
++pub const NID_hold_instruction_call_issuer: c_int = 432;
++pub const NID_hold_instruction_reject: c_int = 433;
++pub const NID_data: c_int = 434;
++pub const NID_pss: c_int = 435;
++pub const NID_ucl: c_int = 436;
++pub const NID_pilot: c_int = 437;
++pub const NID_pilotAttributeType: c_int = 438;
++pub const NID_pilotAttributeSyntax: c_int = 439;
++pub const NID_pilotObjectClass: c_int = 440;
++pub const NID_pilotGroups: c_int = 441;
++pub const NID_iA5StringSyntax: c_int = 442;
++pub const NID_caseIgnoreIA5StringSyntax: c_int = 443;
++pub const NID_pilotObject: c_int = 444;
++pub const NID_pilotPerson: c_int = 445;
++pub const NID_account: c_int = 446;
++pub const NID_document: c_int = 447;
++pub const NID_room: c_int = 448;
++pub const NID_documentSeries: c_int = 449;
++pub const NID_Domain: c_int = 392;
++pub const NID_rFC822localPart: c_int = 450;
++pub const NID_dNSDomain: c_int = 451;
++pub const NID_domainRelatedObject: c_int = 452;
++pub const NID_friendlyCountry: c_int = 453;
++pub const NID_simpleSecurityObject: c_int = 454;
++pub const NID_pilotOrganization: c_int = 455;
++pub const NID_pilotDSA: c_int = 456;
++pub const NID_qualityLabelledData: c_int = 457;
++pub const NID_userId: c_int = 458;
++pub const NID_textEncodedORAddress: c_int = 459;
++pub const NID_rfc822Mailbox: c_int = 460;
++pub const NID_info: c_int = 461;
++pub const NID_favouriteDrink: c_int = 462;
++pub const NID_roomNumber: c_int = 463;
++pub const NID_photo: c_int = 464;
++pub const NID_userClass: c_int = 465;
++pub const NID_host: c_int = 466;
++pub const NID_manager: c_int = 467;
++pub const NID_documentIdentifier: c_int = 468;
++pub const NID_documentTitle: c_int = 469;
++pub const NID_documentVersion: c_int = 470;
++pub const NID_documentAuthor: c_int = 471;
++pub const NID_documentLocation: c_int = 472;
++pub const NID_homeTelephoneNumber: c_int = 473;
++pub const NID_secretary: c_int = 474;
++pub const NID_otherMailbox: c_int = 475;
++pub const NID_lastModifiedTime: c_int = 476;
++pub const NID_lastModifiedBy: c_int = 477;
++pub const NID_domainComponent: c_int = 391;
++pub const NID_aRecord: c_int = 478;
++pub const NID_pilotAttributeType27: c_int = 479;
++pub const NID_mXRecord: c_int = 480;
++pub const NID_nSRecord: c_int = 481;
++pub const NID_sOARecord: c_int = 482;
++pub const NID_cNAMERecord: c_int = 483;
++pub const NID_associatedDomain: c_int = 484;
++pub const NID_associatedName: c_int = 485;
++pub const NID_homePostalAddress: c_int = 486;
++pub const NID_personalTitle: c_int = 487;
++pub const NID_mobileTelephoneNumber: c_int = 488;
++pub const NID_pagerTelephoneNumber: c_int = 489;
++pub const NID_friendlyCountryName: c_int = 490;
++pub const NID_organizationalStatus: c_int = 491;
++pub const NID_janetMailbox: c_int = 492;
++pub const NID_mailPreferenceOption: c_int = 493;
++pub const NID_buildingName: c_int = 494;
++pub const NID_dSAQuality: c_int = 495;
++pub const NID_singleLevelQuality: c_int = 496;
++pub const NID_subtreeMinimumQuality: c_int = 497;
++pub const NID_subtreeMaximumQuality: c_int = 498;
++pub const NID_personalSignature: c_int = 499;
++pub const NID_dITRedirect: c_int = 500;
++pub const NID_audio: c_int = 501;
++pub const NID_documentPublisher: c_int = 502;
++pub const NID_id_set: c_int = 512;
++pub const NID_set_ctype: c_int = 513;
++pub const NID_set_msgExt: c_int = 514;
++pub const NID_set_attr: c_int = 515;
++pub const NID_set_policy: c_int = 516;
++pub const NID_set_certExt: c_int = 517;
++pub const NID_set_brand: c_int = 518;
++pub const NID_setct_PANData: c_int = 519;
++pub const NID_setct_PANToken: c_int = 520;
++pub const NID_setct_PANOnly: c_int = 521;
++pub const NID_setct_OIData: c_int = 522;
++pub const NID_setct_PI: c_int = 523;
++pub const NID_setct_PIData: c_int = 524;
++pub const NID_setct_PIDataUnsigned: c_int = 525;
++pub const NID_setct_HODInput: c_int = 526;
++pub const NID_setct_AuthResBaggage: c_int = 527;
++pub const NID_setct_AuthRevReqBaggage: c_int = 528;
++pub const NID_setct_AuthRevResBaggage: c_int = 529;
++pub const NID_setct_CapTokenSeq: c_int = 530;
++pub const NID_setct_PInitResData: c_int = 531;
++pub const NID_setct_PI_TBS: c_int = 532;
++pub const NID_setct_PResData: c_int = 533;
++pub const NID_setct_AuthReqTBS: c_int = 534;
++pub const NID_setct_AuthResTBS: c_int = 535;
++pub const NID_setct_AuthResTBSX: c_int = 536;
++pub const NID_setct_AuthTokenTBS: c_int = 537;
++pub const NID_setct_CapTokenData: c_int = 538;
++pub const NID_setct_CapTokenTBS: c_int = 539;
++pub const NID_setct_AcqCardCodeMsg: c_int = 540;
++pub const NID_setct_AuthRevReqTBS: c_int = 541;
++pub const NID_setct_AuthRevResData: c_int = 542;
++pub const NID_setct_AuthRevResTBS: c_int = 543;
++pub const NID_setct_CapReqTBS: c_int = 544;
++pub const NID_setct_CapReqTBSX: c_int = 545;
++pub const NID_setct_CapResData: c_int = 546;
++pub const NID_setct_CapRevReqTBS: c_int = 547;
++pub const NID_setct_CapRevReqTBSX: c_int = 548;
++pub const NID_setct_CapRevResData: c_int = 549;
++pub const NID_setct_CredReqTBS: c_int = 550;
++pub const NID_setct_CredReqTBSX: c_int = 551;
++pub const NID_setct_CredResData: c_int = 552;
++pub const NID_setct_CredRevReqTBS: c_int = 553;
++pub const NID_setct_CredRevReqTBSX: c_int = 554;
++pub const NID_setct_CredRevResData: c_int = 555;
++pub const NID_setct_PCertReqData: c_int = 556;
++pub const NID_setct_PCertResTBS: c_int = 557;
++pub const NID_setct_BatchAdminReqData: c_int = 558;
++pub const NID_setct_BatchAdminResData: c_int = 559;
++pub const NID_setct_CardCInitResTBS: c_int = 560;
++pub const NID_setct_MeAqCInitResTBS: c_int = 561;
++pub const NID_setct_RegFormResTBS: c_int = 562;
++pub const NID_setct_CertReqData: c_int = 563;
++pub const NID_setct_CertReqTBS: c_int = 564;
++pub const NID_setct_CertResData: c_int = 565;
++pub const NID_setct_CertInqReqTBS: c_int = 566;
++pub const NID_setct_ErrorTBS: c_int = 567;
++pub const NID_setct_PIDualSignedTBE: c_int = 568;
++pub const NID_setct_PIUnsignedTBE: c_int = 569;
++pub const NID_setct_AuthReqTBE: c_int = 570;
++pub const NID_setct_AuthResTBE: c_int = 571;
++pub const NID_setct_AuthResTBEX: c_int = 572;
++pub const NID_setct_AuthTokenTBE: c_int = 573;
++pub const NID_setct_CapTokenTBE: c_int = 574;
++pub const NID_setct_CapTokenTBEX: c_int = 575;
++pub const NID_setct_AcqCardCodeMsgTBE: c_int = 576;
++pub const NID_setct_AuthRevReqTBE: c_int = 577;
++pub const NID_setct_AuthRevResTBE: c_int = 578;
++pub const NID_setct_AuthRevResTBEB: c_int = 579;
++pub const NID_setct_CapReqTBE: c_int = 580;
++pub const NID_setct_CapReqTBEX: c_int = 581;
++pub const NID_setct_CapResTBE: c_int = 582;
++pub const NID_setct_CapRevReqTBE: c_int = 583;
++pub const NID_setct_CapRevReqTBEX: c_int = 584;
++pub const NID_setct_CapRevResTBE: c_int = 585;
++pub const NID_setct_CredReqTBE: c_int = 586;
++pub const NID_setct_CredReqTBEX: c_int = 587;
++pub const NID_setct_CredResTBE: c_int = 588;
++pub const NID_setct_CredRevReqTBE: c_int = 589;
++pub const NID_setct_CredRevReqTBEX: c_int = 590;
++pub const NID_setct_CredRevResTBE: c_int = 591;
++pub const NID_setct_BatchAdminReqTBE: c_int = 592;
++pub const NID_setct_BatchAdminResTBE: c_int = 593;
++pub const NID_setct_RegFormReqTBE: c_int = 594;
++pub const NID_setct_CertReqTBE: c_int = 595;
++pub const NID_setct_CertReqTBEX: c_int = 596;
++pub const NID_setct_CertResTBE: c_int = 597;
++pub const NID_setct_CRLNotificationTBS: c_int = 598;
++pub const NID_setct_CRLNotificationResTBS: c_int = 599;
++pub const NID_setct_BCIDistributionTBS: c_int = 600;
++pub const NID_setext_genCrypt: c_int = 601;
++pub const NID_setext_miAuth: c_int = 602;
++pub const NID_setext_pinSecure: c_int = 603;
++pub const NID_setext_pinAny: c_int = 604;
++pub const NID_setext_track2: c_int = 605;
++pub const NID_setext_cv: c_int = 606;
++pub const NID_set_policy_root: c_int = 607;
++pub const NID_setCext_hashedRoot: c_int = 608;
++pub const NID_setCext_certType: c_int = 609;
++pub const NID_setCext_merchData: c_int = 610;
++pub const NID_setCext_cCertRequired: c_int = 611;
++pub const NID_setCext_tunneling: c_int = 612;
++pub const NID_setCext_setExt: c_int = 613;
++pub const NID_setCext_setQualf: c_int = 614;
++pub const NID_setCext_PGWYcapabilities: c_int = 615;
++pub const NID_setCext_TokenIdentifier: c_int = 616;
++pub const NID_setCext_Track2Data: c_int = 617;
++pub const NID_setCext_TokenType: c_int = 618;
++pub const NID_setCext_IssuerCapabilities: c_int = 619;
++pub const NID_setAttr_Cert: c_int = 620;
++pub const NID_setAttr_PGWYcap: c_int = 621;
++pub const NID_setAttr_TokenType: c_int = 622;
++pub const NID_setAttr_IssCap: c_int = 623;
++pub const NID_set_rootKeyThumb: c_int = 624;
++pub const NID_set_addPolicy: c_int = 625;
++pub const NID_setAttr_Token_EMV: c_int = 626;
++pub const NID_setAttr_Token_B0Prime: c_int = 627;
++pub const NID_setAttr_IssCap_CVM: c_int = 628;
++pub const NID_setAttr_IssCap_T2: c_int = 629;
++pub const NID_setAttr_IssCap_Sig: c_int = 630;
++pub const NID_setAttr_GenCryptgrm: c_int = 631;
++pub const NID_setAttr_T2Enc: c_int = 632;
++pub const NID_setAttr_T2cleartxt: c_int = 633;
++pub const NID_setAttr_TokICCsig: c_int = 634;
++pub const NID_setAttr_SecDevSig: c_int = 635;
++pub const NID_set_brand_IATA_ATA: c_int = 636;
++pub const NID_set_brand_Diners: c_int = 637;
++pub const NID_set_brand_AmericanExpress: c_int = 638;
++pub const NID_set_brand_JCB: c_int = 639;
++pub const NID_set_brand_Visa: c_int = 640;
++pub const NID_set_brand_MasterCard: c_int = 641;
++pub const NID_set_brand_Novus: c_int = 642;
++pub const NID_des_cdmf: c_int = 643;
++pub const NID_rsaOAEPEncryptionSET: c_int = 644;
++pub const NID_ipsec3: c_int = 749;
++pub const NID_ipsec4: c_int = 750;
++pub const NID_whirlpool: c_int = 804;
++pub const NID_cryptopro: c_int = 805;
++pub const NID_cryptocom: c_int = 806;
++pub const NID_id_GostR3411_94_with_GostR3410_2001: c_int = 807;
++pub const NID_id_GostR3411_94_with_GostR3410_94: c_int = 808;
++pub const NID_id_GostR3411_94: c_int = 809;
++pub const NID_id_HMACGostR3411_94: c_int = 810;
++pub const NID_id_GostR3410_2001: c_int = 811;
++pub const NID_id_GostR3410_94: c_int = 812;
++pub const NID_id_Gost28147_89: c_int = 813;
++pub const NID_gost89_cnt: c_int = 814;
++pub const NID_id_Gost28147_89_MAC: c_int = 815;
++pub const NID_id_GostR3411_94_prf: c_int = 816;
++pub const NID_id_GostR3410_2001DH: c_int = 817;
++pub const NID_id_GostR3410_94DH: c_int = 818;
++pub const NID_id_Gost28147_89_CryptoPro_KeyMeshing: c_int = 819;
++pub const NID_id_Gost28147_89_None_KeyMeshing: c_int = 820;
++pub const NID_id_GostR3411_94_TestParamSet: c_int = 821;
++pub const NID_id_GostR3411_94_CryptoProParamSet: c_int = 822;
++pub const NID_id_Gost28147_89_TestParamSet: c_int = 823;
++pub const NID_id_Gost28147_89_CryptoPro_A_ParamSet: c_int = 824;
++pub const NID_id_Gost28147_89_CryptoPro_B_ParamSet: c_int = 825;
++pub const NID_id_Gost28147_89_CryptoPro_C_ParamSet: c_int = 826;
++pub const NID_id_Gost28147_89_CryptoPro_D_ParamSet: c_int = 827;
++pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: c_int = 828;
++pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: c_int = 829;
++pub const NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: c_int = 830;
++pub const NID_id_GostR3410_94_TestParamSet: c_int = 831;
++pub const NID_id_GostR3410_94_CryptoPro_A_ParamSet: c_int = 832;
++pub const NID_id_GostR3410_94_CryptoPro_B_ParamSet: c_int = 833;
++pub const NID_id_GostR3410_94_CryptoPro_C_ParamSet: c_int = 834;
++pub const NID_id_GostR3410_94_CryptoPro_D_ParamSet: c_int = 835;
++pub const NID_id_GostR3410_94_CryptoPro_XchA_ParamSet: c_int = 836;
++pub const NID_id_GostR3410_94_CryptoPro_XchB_ParamSet: c_int = 837;
++pub const NID_id_GostR3410_94_CryptoPro_XchC_ParamSet: c_int = 838;
++pub const NID_id_GostR3410_2001_TestParamSet: c_int = 839;
++pub const NID_id_GostR3410_2001_CryptoPro_A_ParamSet: c_int = 840;
++pub const NID_id_GostR3410_2001_CryptoPro_B_ParamSet: c_int = 841;
++pub const NID_id_GostR3410_2001_CryptoPro_C_ParamSet: c_int = 842;
++pub const NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet: c_int = 843;
++pub const NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet: c_int = 844;
++pub const NID_id_GostR3410_94_a: c_int = 845;
++pub const NID_id_GostR3410_94_aBis: c_int = 846;
++pub const NID_id_GostR3410_94_b: c_int = 847;
++pub const NID_id_GostR3410_94_bBis: c_int = 848;
++pub const NID_id_Gost28147_89_cc: c_int = 849;
++pub const NID_id_GostR3410_94_cc: c_int = 850;
++pub const NID_id_GostR3410_2001_cc: c_int = 851;
++pub const NID_id_GostR3411_94_with_GostR3410_94_cc: c_int = 852;
++pub const NID_id_GostR3411_94_with_GostR3410_2001_cc: c_int = 853;
++pub const NID_id_GostR3410_2001_ParamSet_cc: c_int = 854;
++pub const NID_camellia_128_cbc: c_int = 751;
++pub const NID_camellia_192_cbc: c_int = 752;
++pub const NID_camellia_256_cbc: c_int = 753;
++pub const NID_id_camellia128_wrap: c_int = 907;
++pub const NID_id_camellia192_wrap: c_int = 908;
++pub const NID_id_camellia256_wrap: c_int = 909;
++pub const NID_camellia_128_ecb: c_int = 754;
++pub const NID_camellia_128_ofb128: c_int = 766;
++pub const NID_camellia_128_cfb128: c_int = 757;
++pub const NID_camellia_192_ecb: c_int = 755;
++pub const NID_camellia_192_ofb128: c_int = 767;
++pub const NID_camellia_192_cfb128: c_int = 758;
++pub const NID_camellia_256_ecb: c_int = 756;
++pub const NID_camellia_256_ofb128: c_int = 768;
++pub const NID_camellia_256_cfb128: c_int = 759;
++pub const NID_camellia_128_cfb1: c_int = 760;
++pub const NID_camellia_192_cfb1: c_int = 761;
++pub const NID_camellia_256_cfb1: c_int = 762;
++pub const NID_camellia_128_cfb8: c_int = 763;
++pub const NID_camellia_192_cfb8: c_int = 764;
++pub const NID_camellia_256_cfb8: c_int = 765;
++pub const NID_kisa: c_int = 773;
++pub const NID_seed_ecb: c_int = 776;
++pub const NID_seed_cbc: c_int = 777;
++pub const NID_seed_cfb128: c_int = 779;
++pub const NID_seed_ofb128: c_int = 778;
++pub const NID_hmac: c_int = 855;
++pub const NID_cmac: c_int = 894;
++pub const NID_rc4_hmac_md5: c_int = 915;
++pub const NID_aes_128_cbc_hmac_sha1: c_int = 916;
++pub const NID_aes_192_cbc_hmac_sha1: c_int = 917;
++pub const NID_aes_256_cbc_hmac_sha1: c_int = 918;
++
++pub const OCSP_NOCERTS: c_ulong = 0x1;
++pub const OCSP_NOINTERN: c_ulong = 0x2;
++pub const OCSP_NOSIGS: c_ulong = 0x4;
++pub const OCSP_NOCHAIN: c_ulong = 0x8;
++pub const OCSP_NOVERIFY: c_ulong = 0x10;
++pub const OCSP_NOEXPLICIT: c_ulong = 0x20;
++pub const OCSP_NOCASIGN: c_ulong = 0x40;
++pub const OCSP_NODELEGATED: c_ulong = 0x80;
++pub const OCSP_NOCHECKS: c_ulong = 0x100;
++pub const OCSP_TRUSTOTHER: c_ulong = 0x200;
++pub const OCSP_RESPID_KEY: c_ulong = 0x400;
++pub const OCSP_NOTIME: c_ulong = 0x800;
++
++pub const V_OCSP_CERTSTATUS_GOOD: c_int = 0;
++pub const V_OCSP_CERTSTATUS_REVOKED: c_int = 1;
++pub const V_OCSP_CERTSTATUS_UNKNOWN: c_int = 2;
++
++pub const OCSP_REVOKED_STATUS_NOSTATUS: c_int = -1;
++pub const OCSP_REVOKED_STATUS_UNSPECIFIED: c_int = 0;
++pub const OCSP_REVOKED_STATUS_KEYCOMPROMISE: c_int = 1;
++pub const OCSP_REVOKED_STATUS_CACOMPROMISE: c_int = 2;
++pub const OCSP_REVOKED_STATUS_AFFILIATIONCHANGED: c_int = 3;
++pub const OCSP_REVOKED_STATUS_SUPERSEDED: c_int = 4;
++pub const OCSP_REVOKED_STATUS_CESSATIONOFOPERATION: c_int = 5;
++pub const OCSP_REVOKED_STATUS_CERTIFICATEHOLD: c_int = 6;
++pub const OCSP_REVOKED_STATUS_REMOVEFROMCRL: c_int = 8;
++
++pub const OCSP_RESPONSE_STATUS_SUCCESSFUL: c_int = 0;
++pub const OCSP_RESPONSE_STATUS_MALFORMEDREQUEST: c_int = 1;
++pub const OCSP_RESPONSE_STATUS_INTERNALERROR: c_int = 2;
++pub const OCSP_RESPONSE_STATUS_TRYLATER: c_int = 3;
++pub const OCSP_RESPONSE_STATUS_SIGREQUIRED: c_int = 5;
++pub const OCSP_RESPONSE_STATUS_UNAUTHORIZED: c_int = 6;
++
++pub const OPENSSL_EC_NAMED_CURVE: c_int = 1;
++
++pub const PKCS5_SALT_LEN: c_int = 8;
++pub const PKCS12_DEFAULT_ITER: c_int = 2048;
++
++pub const RSA_F4: c_long = 0x10001;
++
++pub const RSA_PKCS1_PADDING: c_int = 1;
++pub const RSA_SSLV23_PADDING: c_int = 2;
++pub const RSA_NO_PADDING: c_int = 3;
++pub const RSA_PKCS1_OAEP_PADDING: c_int = 4;
++pub const RSA_X931_PADDING: c_int = 5;
++
++pub const SSL_CTRL_SET_TMP_DH: c_int = 3;
++pub const SSL_CTRL_SET_TMP_ECDH: c_int = 4;
++pub const SSL_CTRL_EXTRA_CHAIN_CERT: c_int = 14;
++pub const SSL_CTRL_MODE: c_int = 33;
++pub const SSL_CTRL_SET_READ_AHEAD: c_int = 41;
++pub const SSL_CTRL_SET_TLSEXT_SERVERNAME_CB: c_int = 53;
++pub const SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG: c_int = 54;
++pub const SSL_CTRL_SET_TLSEXT_HOSTNAME: c_int = 55;
++pub const SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB: c_int = 63;
++pub const SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG: c_int = 64;
++pub const SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE: c_int = 65;
++pub const SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP: c_int = 70;
++pub const SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP: c_int = 71;
++pub const SSL_CTRL_GET_EXTRA_CHAIN_CERTS: c_int = 82;
++#[cfg(not(any(ossl101, libressl)))]
++pub const SSL_CTRL_SET_VERIFY_CERT_STORE: c_int = 106;
++
++pub const SSL_MODE_ENABLE_PARTIAL_WRITE: c_long = 0x1;
++pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: c_long = 0x2;
++pub const SSL_MODE_AUTO_RETRY: c_long = 0x4;
++pub const SSL_MODE_NO_AUTO_CHAIN: c_long = 0x8;
++pub const SSL_MODE_RELEASE_BUFFERS: c_long = 0x10;
++#[cfg(not(libressl))]
++pub const SSL_MODE_SEND_CLIENTHELLO_TIME: c_long = 0x20;
++#[cfg(not(libressl))]
++pub const SSL_MODE_SEND_SERVERHELLO_TIME: c_long = 0x40;
++#[cfg(not(libressl))]
++pub const SSL_MODE_SEND_FALLBACK_SCSV: c_long = 0x80;
++
++pub const SSL_ERROR_NONE: c_int = 0;
++pub const SSL_ERROR_SSL: c_int = 1;
++pub const SSL_ERROR_SYSCALL: c_int = 5;
++pub const SSL_ERROR_WANT_ACCEPT: c_int = 8;
++pub const SSL_ERROR_WANT_CONNECT: c_int = 7;
++pub const SSL_ERROR_WANT_READ: c_int = 2;
++pub const SSL_ERROR_WANT_WRITE: c_int = 3;
++pub const SSL_ERROR_WANT_X509_LOOKUP: c_int = 4;
++pub const SSL_ERROR_ZERO_RETURN: c_int = 6;
++pub const SSL_VERIFY_NONE: c_int = 0;
++pub const SSL_VERIFY_PEER: c_int = 1;
++pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: c_int = 2;
++
++#[cfg(not(ossl101))]
++pub const SSL_OP_TLSEXT_PADDING: c_ulong = 0x00000010;
++pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: c_ulong = 0x00000800;
++pub const SSL_OP_CRYPTOPRO_TLSEXT_BUG: c_ulong = 0x80000000;
++pub const SSL_OP_LEGACY_SERVER_CONNECT: c_ulong = 0x00000004;
++#[cfg(not(libressl))]
++pub const SSL_OP_SAFARI_ECDHE_ECDSA_BUG: c_ulong = 0x00000040;
++#[cfg(not(any(libressl, ossl110f)))]
++pub const SSL_OP_ALL: c_ulong = 0x80000BFF;
++#[cfg(ossl110f)]
++pub const SSL_OP_ALL: c_ulong = SSL_OP_CRYPTOPRO_TLSEXT_BUG | SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS |
++    SSL_OP_LEGACY_SERVER_CONNECT | SSL_OP_TLSEXT_PADDING |
++    SSL_OP_SAFARI_ECDHE_ECDSA_BUG;
++pub const SSL_OP_NO_QUERY_MTU: c_ulong = 0x00001000;
++pub const SSL_OP_COOKIE_EXCHANGE: c_ulong = 0x00002000;
++pub const SSL_OP_NO_TICKET: c_ulong = 0x00004000;
++#[cfg(not(libressl))]
++pub const SSL_OP_CISCO_ANYCONNECT: c_ulong = 0x00008000;
++pub const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: c_ulong = 0x00010000;
++#[cfg(not(libressl))]
++pub const SSL_OP_NO_COMPRESSION: c_ulong = 0x00020000;
++#[cfg(not(libressl))]
++pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: c_ulong = 0x00040000;
++pub const SSL_OP_CIPHER_SERVER_PREFERENCE: c_ulong = 0x00400000;
++pub const SSL_OP_TLS_ROLLBACK_BUG: c_ulong = 0x00800000;
++#[cfg(not(libressl))]
++pub const SSL_OP_NO_SSLv3: c_ulong = 0x02000000;
++pub const SSL_OP_NO_TLSv1: c_ulong = 0x04000000;
++pub const SSL_OP_NO_TLSv1_2: c_ulong = 0x08000000;
++pub const SSL_OP_NO_TLSv1_1: c_ulong = 0x10000000;
++
++#[cfg(not(any(ossl101, libressl)))]
++pub const SSL_OP_NO_DTLSv1: c_ulong = 0x04000000;
++#[cfg(not(any(ossl101, libressl)))]
++pub const SSL_OP_NO_DTLSv1_2: c_ulong = 0x08000000;
++#[cfg(not(any(ossl101, libressl)))]
++pub const SSL_OP_NO_SSL_MASK: c_ulong = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 |
++    SSL_OP_NO_TLSv1_1 | SSL_OP_NO_TLSv1_2;
++
++pub const TLSEXT_NAMETYPE_host_name: c_int = 0;
++
++pub const TLSEXT_STATUSTYPE_ocsp: c_int = 1;
++
++pub const SSL_TLSEXT_ERR_OK: c_int = 0;
++pub const SSL_TLSEXT_ERR_ALERT_WARNING: c_int = 1;
++pub const SSL_TLSEXT_ERR_ALERT_FATAL: c_int = 2;
++pub const SSL_TLSEXT_ERR_NOACK: c_int = 3;
++
++pub const OPENSSL_NPN_UNSUPPORTED: c_int = 0;
++pub const OPENSSL_NPN_NEGOTIATED: c_int = 1;
++pub const OPENSSL_NPN_NO_OVERLAP: c_int = 2;
++
++pub const V_ASN1_GENERALIZEDTIME: c_int = 24;
++pub const V_ASN1_UTCTIME: c_int = 23;
++
++pub const X509_FILETYPE_ASN1: c_int = 2;
++pub const X509_FILETYPE_DEFAULT: c_int = 3;
++pub const X509_FILETYPE_PEM: c_int = 1;
++pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: c_int = 31;
++pub const X509_V_ERR_AKID_SKID_MISMATCH: c_int = 30;
++pub const X509_V_ERR_APPLICATION_VERIFICATION: c_int = 50;
++pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: c_int = 22;
++pub const X509_V_ERR_CERT_HAS_EXPIRED: c_int = 10;
++pub const X509_V_ERR_CERT_NOT_YET_VALID: c_int = 9;
++pub const X509_V_ERR_CERT_REJECTED: c_int = 28;
++pub const X509_V_ERR_CERT_REVOKED: c_int = 23;
++pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: c_int = 7;
++pub const X509_V_ERR_CERT_UNTRUSTED: c_int = 27;
++pub const X509_V_ERR_CRL_HAS_EXPIRED: c_int = 12;
++pub const X509_V_ERR_CRL_NOT_YET_VALID: c_int = 11;
++pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: c_int = 54;
++pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: c_int = 8;
++pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: c_int = 18;
++pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: c_int = 44;
++pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: c_int = 14;
++pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: c_int = 13;
++pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: c_int = 15;
++pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: c_int = 16;
++pub const X509_V_ERR_EXCLUDED_VIOLATION: c_int = 48;
++pub const X509_V_ERR_INVALID_CA: c_int = 24;
++pub const X509_V_ERR_INVALID_EXTENSION: c_int = 41;
++pub const X509_V_ERR_INVALID_NON_CA: c_int = 37;
++pub const X509_V_ERR_INVALID_POLICY_EXTENSION: c_int = 42;
++pub const X509_V_ERR_INVALID_PURPOSE: c_int = 26;
++pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: c_int = 32;
++pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: c_int = 35;
++pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: c_int = 39;
++pub const X509_V_ERR_NO_EXPLICIT_POLICY: c_int = 43;
++pub const X509_V_ERR_OUT_OF_MEM: c_int = 17;
++pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: c_int = 25;
++pub const X509_V_ERR_PERMITTED_VIOLATION: c_int = 47;
++pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: c_int = 40;
++pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: c_int = 38;
++pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: c_int = 19;
++pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: c_int = 29;
++pub const X509_V_ERR_SUBTREE_MINMAX: c_int = 49;
++pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: c_int = 6;
++pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: c_int = 4;
++pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: c_int = 5;
++pub const X509_V_ERR_UNABLE_TO_GET_CRL: c_int = 3;
++pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: c_int = 33;
++pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: c_int = 2;
++pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: c_int = 20;
++pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: c_int = 21;
++pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: c_int = 36;
++pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: c_int = 34;
++pub const X509_V_ERR_UNNESTED_RESOURCE: c_int = 46;
++pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: c_int = 52;
++pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: c_int = 51;
++pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: c_int = 45;
++pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: c_int = 53;
++pub const X509_V_OK: c_int = 0;
++
++#[cfg(not(any(ossl101, libressl)))]
++pub const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT: c_uint = 0x1;
++#[cfg(not(any(ossl101, libressl)))]
++pub const X509_CHECK_FLAG_NO_WILDCARDS: c_uint = 0x2;
++#[cfg(not(any(ossl101, libressl)))]
++pub const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS: c_uint = 0x4;
++#[cfg(not(any(ossl101, libressl)))]
++pub const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS: c_uint = 0x8;
++#[cfg(not(any(ossl101, libressl)))]
++pub const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS: c_uint = 0x10;
++
++pub const GEN_OTHERNAME: c_int = 0;
++pub const GEN_EMAIL: c_int = 1;
++pub const GEN_DNS: c_int = 2;
++pub const GEN_X400: c_int = 3;
++pub const GEN_DIRNAME: c_int = 4;
++pub const GEN_EDIPARTY: c_int = 5;
++pub const GEN_URI: c_int = 6;
++pub const GEN_IPADD: c_int = 7;
++pub const GEN_RID: c_int = 8;
++
++// macros
++pub unsafe fn BIO_get_mem_data(b: *mut BIO, pp: *mut *mut c_char) -> c_long {
++    BIO_ctrl(b, BIO_CTRL_INFO, 0, pp as *mut c_void)
++}
++
++pub unsafe fn BIO_clear_retry_flags(b: *mut BIO) {
++    BIO_clear_flags(b, BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY)
++}
++
++pub unsafe fn BIO_set_retry_read(b: *mut BIO) {
++    BIO_set_flags(b, BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY)
++}
++
++pub unsafe fn BIO_set_retry_write(b: *mut BIO) {
++    BIO_set_flags(b, BIO_FLAGS_WRITE | BIO_FLAGS_SHOULD_RETRY)
++}
++
++// EVP_PKEY_CTX_ctrl macros
++pub unsafe fn EVP_PKEY_CTX_set_rsa_padding(ctx: *mut EVP_PKEY_CTX, pad: c_int) -> c_int {
++    EVP_PKEY_CTX_ctrl(
++        ctx,
++        EVP_PKEY_RSA,
++        -1,
++        EVP_PKEY_CTRL_RSA_PADDING,
++        pad,
++        ptr::null_mut(),
++    )
++}
++
++pub unsafe fn EVP_PKEY_CTX_get_rsa_padding(ctx: *mut EVP_PKEY_CTX, ppad: *mut c_int) -> c_int {
++    EVP_PKEY_CTX_ctrl(
++        ctx,
++        EVP_PKEY_RSA,
++        -1,
++        EVP_PKEY_CTRL_GET_RSA_PADDING,
++        0,
++        ppad as *mut c_void,
++    )
++}
++
++pub unsafe fn SSL_CTX_set_mode(ctx: *mut SSL_CTX, op: c_long) -> c_long {
++    SSL_CTX_ctrl(ctx, SSL_CTRL_MODE, op, ptr::null_mut())
++}
++
++pub unsafe fn SSL_CTX_set_read_ahead(ctx: *mut SSL_CTX, m: c_long) -> c_long {
++    SSL_CTX_ctrl(ctx, SSL_CTRL_SET_READ_AHEAD, m, ptr::null_mut())
++}
++
++pub unsafe fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *mut DH) -> c_long {
++    SSL_CTX_ctrl(ctx, SSL_CTRL_SET_TMP_DH, 0, dh as *mut c_void)
++}
++
++pub unsafe fn SSL_CTX_set_tmp_ecdh(ctx: *mut SSL_CTX, key: *mut EC_KEY) -> c_long {
++    SSL_CTX_ctrl(ctx, SSL_CTRL_SET_TMP_ECDH, 0, key as *mut c_void)
++}
++
++pub unsafe fn SSL_set_tmp_dh(ssl: *mut SSL, dh: *mut DH) -> c_long {
++    SSL_ctrl(ssl, SSL_CTRL_SET_TMP_DH, 0, dh as *mut c_void)
++}
++
++pub unsafe fn SSL_set_tmp_ecdh(ssl: *mut SSL, key: *mut EC_KEY) -> c_long {
++    SSL_ctrl(ssl, SSL_CTRL_SET_TMP_ECDH, 0, key as *mut c_void)
++}
++
++pub unsafe fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> c_long {
++    SSL_CTX_ctrl(ctx, SSL_CTRL_EXTRA_CHAIN_CERT, 0, x509 as *mut c_void)
++}
++
++#[cfg(not(any(ossl101, libressl)))]
++pub unsafe fn SSL_CTX_set0_verify_cert_store(ctx: *mut SSL_CTX, st: *mut X509_STORE) -> c_long {
++    SSL_CTX_ctrl(ctx, SSL_CTRL_SET_VERIFY_CERT_STORE, 0, st as *mut c_void)
++}
++
++pub unsafe fn SSL_CTX_set_tlsext_servername_callback(
++    ctx: *mut SSL_CTX,
++    cb: Option<extern "C" fn()>,
++) -> c_long {
++    SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TLSEXT_SERVERNAME_CB, cb)
++}
++
++pub unsafe fn SSL_set_tlsext_host_name(s: *mut SSL, name: *mut c_char) -> c_long {
++    SSL_ctrl(
++        s,
++        SSL_CTRL_SET_TLSEXT_HOSTNAME,
++        TLSEXT_NAMETYPE_host_name as c_long,
++        name as *mut c_void,
++    )
++}
++
++pub unsafe fn SSL_set_tlsext_status_type(s: *mut SSL, type_: c_int) -> c_long {
++    SSL_ctrl(
++        s,
++        SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,
++        type_ as c_long,
++        ptr::null_mut(),
++    )
++}
++
++pub unsafe fn SSL_CTX_set_tlsext_status_cb(
++    ctx: *mut SSL_CTX,
++    cb: Option<unsafe extern "C" fn(*mut SSL, *mut c_void) -> c_int>,
++) -> c_long {
++    SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB, mem::transmute(cb))
++}
++
++pub unsafe fn SSL_CTX_set_tlsext_status_arg(ctx: *mut SSL_CTX, arg: *mut c_void) -> c_long {
++    SSL_CTX_ctrl(ctx, SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG, 0, arg)
++}
++
++pub unsafe fn SSL_CTX_get_extra_chain_certs(
++    ctx: *mut SSL_CTX,
++    chain: *mut *mut stack_st_X509,
++) -> c_long {
++    SSL_CTX_ctrl(ctx, SSL_CTRL_GET_EXTRA_CHAIN_CERTS, 0, chain as *mut c_void)
++}
++
++pub unsafe fn SSL_get_tlsext_status_ocsp_resp(ssl: *mut SSL, resp: *mut *mut c_uchar) -> c_long {
++    SSL_ctrl(
++        ssl,
++        SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP,
++        0,
++        resp as *mut c_void,
++    )
++}
++
++pub unsafe fn SSL_set_tlsext_status_ocsp_resp(
++    ssl: *mut SSL,
++    resp: *mut c_uchar,
++    len: c_long,
++) -> c_long {
++    SSL_ctrl(
++        ssl,
++        SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP,
++        len,
++        resp as *mut c_void,
++    )
++}
++
++pub fn ERR_GET_LIB(l: c_ulong) -> c_int {
++    ((l >> 24) & 0x0FF) as c_int
++}
++
++pub fn ERR_GET_FUNC(l: c_ulong) -> c_int {
++    ((l >> 12) & 0xFFF) as c_int
++}
++
++pub fn ERR_GET_REASON(l: c_ulong) -> c_int {
++    (l & 0xFFF) as c_int
++}
++
++extern "C" {
++    pub fn AES_set_encrypt_key(userKey: *const c_uchar, bits: c_int, key: *mut AES_KEY) -> c_int;
++    pub fn AES_set_decrypt_key(userKey: *const c_uchar, bits: c_int, key: *mut AES_KEY) -> c_int;
++    pub fn AES_ige_encrypt(
++        in_: *const c_uchar,
++        out: *mut c_uchar,
++        length: size_t,
++        key: *const AES_KEY,
++        ivec: *mut c_uchar,
++        enc: c_int,
++    );
++
++    pub fn ASN1_INTEGER_get(dest: *const ASN1_INTEGER) -> c_long;
++    pub fn ASN1_INTEGER_set(dest: *mut ASN1_INTEGER, value: c_long) -> c_int;
++    pub fn ASN1_GENERALIZEDTIME_free(tm: *mut ASN1_GENERALIZEDTIME);
++    pub fn ASN1_GENERALIZEDTIME_print(b: *mut BIO, tm: *const ASN1_GENERALIZEDTIME) -> c_int;
++    pub fn ASN1_STRING_type_new(ty: c_int) -> *mut ASN1_STRING;
++    pub fn ASN1_TIME_free(tm: *mut ASN1_TIME);
++    pub fn ASN1_TIME_print(b: *mut BIO, tm: *const ASN1_TIME) -> c_int;
++    pub fn ASN1_BIT_STRING_free(x: *mut ASN1_BIT_STRING);
++    pub fn ASN1_OBJECT_free(x: *mut ASN1_OBJECT);
++
++    pub fn BIO_ctrl(b: *mut BIO, cmd: c_int, larg: c_long, parg: *mut c_void) -> c_long;
++    pub fn BIO_free_all(b: *mut BIO);
++    pub fn BIO_new_fp(stream: *mut FILE, close_flag: c_int) -> *mut BIO;
++    pub fn BIO_new_socket(sock: c_int, close_flag: c_int) -> *mut BIO;
++    pub fn BIO_read(b: *mut BIO, buf: *mut c_void, len: c_int) -> c_int;
++    pub fn BIO_write(b: *mut BIO, buf: *const c_void, len: c_int) -> c_int;
++    #[cfg(any(ossl101, libressl))]
++    pub fn BIO_new_mem_buf(buf: *mut c_void, len: c_int) -> *mut BIO;
++    #[cfg(not(any(ossl101, libressl)))]
++    pub fn BIO_new_mem_buf(buf: *const c_void, len: c_int) -> *mut BIO;
++    pub fn BIO_set_flags(b: *mut BIO, flags: c_int);
++    pub fn BIO_clear_flags(b: *mut BIO, flags: c_int);
++
++    pub fn BN_CTX_new() -> *mut BN_CTX;
++    pub fn BN_CTX_free(ctx: *mut BN_CTX);
++
++    pub fn BN_new() -> *mut BIGNUM;
++    pub fn BN_dup(n: *const BIGNUM) -> *mut BIGNUM;
++    pub fn BN_clear(bn: *mut BIGNUM);
++    pub fn BN_free(bn: *mut BIGNUM);
++    pub fn BN_clear_free(bn: *mut BIGNUM);
++    pub fn BN_num_bits(bn: *const BIGNUM) -> c_int;
++    pub fn BN_set_negative(bn: *mut BIGNUM, n: c_int);
++    pub fn BN_set_word(bn: *mut BIGNUM, n: BN_ULONG) -> c_int;
++    pub fn BN_add(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> c_int;
++    pub fn BN_div(
++        dv: *mut BIGNUM,
++        rem: *mut BIGNUM,
++        a: *const BIGNUM,
++        b: *const BIGNUM,
++        ctx: *mut BN_CTX,
++    ) -> c_int;
++    pub fn BN_exp(r: *mut BIGNUM, a: *const BIGNUM, p: *const BIGNUM, ctx: *mut BN_CTX) -> c_int;
++    pub fn BN_gcd(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM, ctx: *mut BN_CTX) -> c_int;
++    pub fn BN_mod_add(
++        r: *mut BIGNUM,
++        a: *const BIGNUM,
++        b: *const BIGNUM,
++        m: *const BIGNUM,
++        ctx: *mut BN_CTX,
++    ) -> c_int;
++    pub fn BN_mod_exp(
++        r: *mut BIGNUM,
++        a: *const BIGNUM,
++        p: *const BIGNUM,
++        m: *const BIGNUM,
++        ctx: *mut BN_CTX,
++    ) -> c_int;
++    pub fn BN_mod_inverse(
++        r: *mut BIGNUM,
++        a: *const BIGNUM,
++        n: *const BIGNUM,
++        ctx: *mut BN_CTX,
++    ) -> *mut BIGNUM;
++    pub fn BN_mod_mul(
++        r: *mut BIGNUM,
++        a: *const BIGNUM,
++        b: *const BIGNUM,
++        m: *const BIGNUM,
++        ctx: *mut BN_CTX,
++    ) -> c_int;
++    pub fn BN_mod_sqr(
++        r: *mut BIGNUM,
++        a: *const BIGNUM,
++        m: *const BIGNUM,
++        ctx: *mut BN_CTX,
++    ) -> c_int;
++    pub fn BN_mod_sub(
++        r: *mut BIGNUM,
++        a: *const BIGNUM,
++        b: *const BIGNUM,
++        m: *const BIGNUM,
++        ctx: *mut BN_CTX,
++    ) -> c_int;
++    pub fn BN_mul(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM, ctx: *mut BN_CTX) -> c_int;
++    pub fn BN_nnmod(
++        rem: *mut BIGNUM,
++        a: *const BIGNUM,
++        m: *const BIGNUM,
++        ctx: *mut BN_CTX,
++    ) -> c_int;
++    pub fn BN_add_word(r: *mut BIGNUM, w: BN_ULONG) -> c_int;
++    pub fn BN_sub_word(r: *mut BIGNUM, w: BN_ULONG) -> c_int;
++    pub fn BN_mul_word(r: *mut BIGNUM, w: BN_ULONG) -> c_int;
++    pub fn BN_div_word(r: *mut BIGNUM, w: BN_ULONG) -> BN_ULONG;
++    pub fn BN_mod_word(r: *const BIGNUM, w: BN_ULONG) -> BN_ULONG;
++    pub fn BN_sqr(r: *mut BIGNUM, a: *const BIGNUM, ctx: *mut BN_CTX) -> c_int;
++    pub fn BN_sub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> c_int;
++    pub fn BN_clear_bit(a: *mut BIGNUM, n: c_int) -> c_int;
++    pub fn BN_is_bit_set(a: *const BIGNUM, n: c_int) -> c_int;
++    pub fn BN_lshift(r: *mut BIGNUM, a: *const BIGNUM, n: c_int) -> c_int;
++    pub fn BN_lshift1(r: *mut BIGNUM, a: *const BIGNUM) -> c_int;
++    pub fn BN_mask_bits(a: *mut BIGNUM, n: c_int) -> c_int;
++    pub fn BN_rshift(r: *mut BIGNUM, a: *const BIGNUM, n: c_int) -> c_int;
++    pub fn BN_set_bit(a: *mut BIGNUM, n: c_int) -> c_int;
++    pub fn BN_rshift1(r: *mut BIGNUM, a: *const BIGNUM) -> c_int;
++    pub fn BN_cmp(a: *const BIGNUM, b: *const BIGNUM) -> c_int;
++    pub fn BN_ucmp(a: *const BIGNUM, b: *const BIGNUM) -> c_int;
++    pub fn BN_generate_prime_ex(
++        r: *mut BIGNUM,
++        bits: c_int,
++        safe: c_int,
++        add: *const BIGNUM,
++        rem: *const BIGNUM,
++        cb: *mut BN_GENCB,
++    ) -> c_int;
++    pub fn BN_is_prime_ex(
++        p: *const BIGNUM,
++        checks: c_int,
++        ctx: *mut BN_CTX,
++        cb: *mut BN_GENCB,
++    ) -> c_int;
++    pub fn BN_is_prime_fasttest_ex(
++        p: *const BIGNUM,
++        checks: c_int,
++        ctx: *mut BN_CTX,
++        do_trial_division: c_int,
++        cb: *mut BN_GENCB,
++    ) -> c_int;
++    pub fn BN_rand(r: *mut BIGNUM, bits: c_int, top: c_int, bottom: c_int) -> c_int;
++    pub fn BN_pseudo_rand(r: *mut BIGNUM, bits: c_int, top: c_int, bottom: c_int) -> c_int;
++    pub fn BN_rand_range(r: *mut BIGNUM, range: *const BIGNUM) -> c_int;
++    pub fn BN_pseudo_rand_range(r: *mut BIGNUM, range: *const BIGNUM) -> c_int;
++    pub fn BN_bin2bn(s: *const u8, size: c_int, ret: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn BN_bn2bin(a: *const BIGNUM, to: *mut u8) -> c_int;
++    pub fn BN_dec2bn(a: *mut *mut BIGNUM, s: *const c_char) -> c_int;
++    pub fn BN_bn2dec(a: *const BIGNUM) -> *mut c_char;
++    pub fn BN_hex2bn(a: *mut *mut BIGNUM, s: *const c_char) -> c_int;
++    pub fn BN_bn2hex(a: *const BIGNUM) -> *mut c_char;
++    pub fn BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER;
++
++    pub fn NCONF_default() -> *mut CONF_METHOD;
++    pub fn NCONF_new(meth: *mut CONF_METHOD) -> *mut CONF;
++    pub fn NCONF_free(conf: *mut CONF);
++
++    pub fn CRYPTO_memcmp(a: *const c_void, b: *const c_void, len: size_t) -> c_int;
++
++    pub fn DH_new() -> *mut DH;
++    pub fn DH_free(dh: *mut DH);
++    #[cfg(not(any(ossl101, libressl)))]
++    pub fn DH_get_1024_160() -> *mut DH;
++    #[cfg(not(any(ossl101, libressl)))]
++    pub fn DH_get_2048_224() -> *mut DH;
++    #[cfg(not(any(ossl101, libressl)))]
++    pub fn DH_get_2048_256() -> *mut DH;
++
++    pub fn EC_KEY_new() -> *mut EC_KEY;
++    pub fn EC_KEY_new_by_curve_name(nid: c_int) -> *mut EC_KEY;
++    pub fn EC_KEY_dup(key: *const EC_KEY) -> *mut EC_KEY;
++    pub fn EC_KEY_set_group(key: *mut EC_KEY, group: *const EC_GROUP) -> c_int;
++    pub fn EC_KEY_get0_group(key: *const EC_KEY) -> *const EC_GROUP;
++    pub fn EC_KEY_set_public_key(key: *mut EC_KEY, key: *const EC_POINT) -> c_int;
++    pub fn EC_KEY_get0_public_key(key: *const EC_KEY) -> *const EC_POINT;
++    pub fn EC_KEY_set_private_key(key: *mut EC_KEY, key: *const BIGNUM) -> c_int;
++    pub fn EC_KEY_get0_private_key(key: *const EC_KEY) -> *const BIGNUM;
++    pub fn EC_KEY_generate_key(key: *mut EC_KEY) -> c_int;
++    pub fn EC_KEY_check_key(key: *const EC_KEY) -> c_int;
++    pub fn EC_KEY_free(key: *mut EC_KEY);
++
++    #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))]
++    pub fn EC_GF2m_simple_method() -> *const EC_METHOD;
++
++    pub fn EC_GROUP_new(meth: *const EC_METHOD) -> *mut EC_GROUP;
++    pub fn EC_GROUP_new_curve_GFp(
++        p: *const BIGNUM,
++        a: *const BIGNUM,
++        b: *const BIGNUM,
++        ctx: *mut BN_CTX,
++    ) -> *mut EC_GROUP;
++    #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))]
++    pub fn EC_GROUP_new_curve_GF2m(
++        p: *const BIGNUM,
++        a: *const BIGNUM,
++        b: *const BIGNUM,
++        ctx: *mut BN_CTX,
++    ) -> *mut EC_GROUP;
++    pub fn EC_GROUP_new_by_curve_name(nid: c_int) -> *mut EC_GROUP;
++    pub fn EC_GROUP_get_curve_GFp(
++        group: *const EC_GROUP,
++        p: *mut BIGNUM,
++        a: *mut BIGNUM,
++        b: *mut BIGNUM,
++        ctx: *mut BN_CTX,
++    ) -> c_int;
++    #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))]
++    pub fn EC_GROUP_get_curve_GF2m(
++        group: *const EC_GROUP,
++        p: *mut BIGNUM,
++        a: *mut BIGNUM,
++        b: *mut BIGNUM,
++        ctx: *mut BN_CTX,
++    ) -> c_int;
++    pub fn EC_GROUP_get_degree(group: *const EC_GROUP) -> c_int;
++    pub fn EC_GROUP_get_order(
++        group: *const EC_GROUP,
++        order: *mut BIGNUM,
++        ctx: *mut BN_CTX,
++    ) -> c_int;
++    pub fn EC_GROUP_set_asn1_flag(key: *mut EC_GROUP, flag: c_int);
++
++    pub fn EC_GROUP_free(group: *mut EC_GROUP);
++
++    pub fn EC_POINT_new(group: *const EC_GROUP) -> *mut EC_POINT;
++    pub fn EC_POINT_add(
++        group: *const EC_GROUP,
++        r: *mut EC_POINT,
++        a: *const EC_POINT,
++        b: *const EC_POINT,
++        ctx: *mut BN_CTX,
++    ) -> c_int;
++    pub fn EC_POINT_mul(
++        group: *const EC_GROUP,
++        r: *mut EC_POINT,
++        n: *const BIGNUM,
++        q: *const EC_POINT,
++        m: *const BIGNUM,
++        ctx: *mut BN_CTX,
++    ) -> c_int;
++    pub fn EC_POINT_invert(group: *const EC_GROUP, r: *mut EC_POINT, ctx: *mut BN_CTX) -> c_int;
++    pub fn EC_POINT_point2oct(
++        group: *const EC_GROUP,
++        p: *const EC_POINT,
++        form: point_conversion_form_t,
++        buf: *mut c_uchar,
++        len: size_t,
++        ctx: *mut BN_CTX,
++    ) -> size_t;
++    pub fn EC_POINT_oct2point(
++        group: *const EC_GROUP,
++        p: *mut EC_POINT,
++        buf: *const c_uchar,
++        len: size_t,
++        ctx: *mut BN_CTX,
++    ) -> c_int;
++    pub fn EC_POINT_cmp(
++        group: *const EC_GROUP,
++        a: *const EC_POINT,
++        b: *const EC_POINT,
++        ctx: *mut BN_CTX,
++    ) -> c_int;
++    pub fn EC_POINT_free(point: *mut EC_POINT);
++
++    pub fn ERR_peek_last_error() -> c_ulong;
++    pub fn ERR_get_error() -> c_ulong;
++    pub fn ERR_get_error_line_data(
++        file: *mut *const c_char,
++        line: *mut c_int,
++        data: *mut *const c_char,
++        flags: *mut c_int,
++    ) -> c_ulong;
++    pub fn ERR_lib_error_string(err: c_ulong) -> *const c_char;
++    pub fn ERR_func_error_string(err: c_ulong) -> *const c_char;
++    pub fn ERR_reason_error_string(err: c_ulong) -> *const c_char;
++    pub fn ERR_clear_error();
++
++    pub fn EVP_md5() -> *const EVP_MD;
++    pub fn EVP_ripemd160() -> *const EVP_MD;
++    pub fn EVP_sha1() -> *const EVP_MD;
++    pub fn EVP_sha224() -> *const EVP_MD;
++    pub fn EVP_sha256() -> *const EVP_MD;
++    pub fn EVP_sha384() -> *const EVP_MD;
++    pub fn EVP_sha512() -> *const EVP_MD;
++
++    pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER;
++    pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER;
++    pub fn EVP_aes_128_xts() -> *const EVP_CIPHER;
++    pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER;
++    pub fn EVP_aes_128_gcm() -> *const EVP_CIPHER;
++    pub fn EVP_aes_128_cfb1() -> *const EVP_CIPHER;
++    pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER;
++    pub fn EVP_aes_128_cfb8() -> *const EVP_CIPHER;
++    pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER;
++    pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER;
++    pub fn EVP_aes_256_xts() -> *const EVP_CIPHER;
++    pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER;
++    pub fn EVP_aes_256_gcm() -> *const EVP_CIPHER;
++    pub fn EVP_aes_256_cfb1() -> *const EVP_CIPHER;
++    pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER;
++    pub fn EVP_aes_256_cfb8() -> *const EVP_CIPHER;
++    pub fn EVP_bf_cbc() -> *const EVP_CIPHER;
++    pub fn EVP_bf_ecb() -> *const EVP_CIPHER;
++    pub fn EVP_bf_cfb64() -> *const EVP_CIPHER;
++    pub fn EVP_bf_ofb() -> *const EVP_CIPHER;
++    pub fn EVP_rc4() -> *const EVP_CIPHER;
++
++    pub fn EVP_des_cbc() -> *const EVP_CIPHER;
++    pub fn EVP_des_ecb() -> *const EVP_CIPHER;
++
++    pub fn EVP_BytesToKey(
++        typ: *const EVP_CIPHER,
++        md: *const EVP_MD,
++        salt: *const u8,
++        data: *const u8,
++        datalen: c_int,
++        count: c_int,
++        key: *mut u8,
++        iv: *mut u8,
++    ) -> c_int;
++
++    pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX;
++    pub fn EVP_CIPHER_CTX_set_padding(ctx: *mut EVP_CIPHER_CTX, padding: c_int) -> c_int;
++    pub fn EVP_CIPHER_CTX_set_key_length(ctx: *mut EVP_CIPHER_CTX, keylen: c_int) -> c_int;
++    pub fn EVP_CIPHER_CTX_ctrl(
++        ctx: *mut EVP_CIPHER_CTX,
++        type_: c_int,
++        arg: c_int,
++        ptr: *mut c_void,
++    ) -> c_int;
++    pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX);
++
++    pub fn EVP_CipherInit(
++        ctx: *mut EVP_CIPHER_CTX,
++        evp: *const EVP_CIPHER,
++        key: *const u8,
++        iv: *const u8,
++        mode: c_int,
++    ) -> c_int;
++    pub fn EVP_CipherInit_ex(
++        ctx: *mut EVP_CIPHER_CTX,
++        type_: *const EVP_CIPHER,
++        impl_: *mut ENGINE,
++        key: *const c_uchar,
++        iv: *const c_uchar,
++        enc: c_int,
++    ) -> c_int;
++    pub fn EVP_CipherUpdate(
++        ctx: *mut EVP_CIPHER_CTX,
++        outbuf: *mut u8,
++        outlen: *mut c_int,
++        inbuf: *const u8,
++        inlen: c_int,
++    ) -> c_int;
++    pub fn EVP_CipherFinal(ctx: *mut EVP_CIPHER_CTX, res: *mut u8, len: *mut c_int) -> c_int;
++
++    pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, typ: *const EVP_MD) -> c_int;
++    pub fn EVP_DigestInit_ex(ctx: *mut EVP_MD_CTX, typ: *const EVP_MD, imple: *mut ENGINE)
++        -> c_int;
++    pub fn EVP_DigestUpdate(ctx: *mut EVP_MD_CTX, data: *const c_void, n: size_t) -> c_int;
++    pub fn EVP_DigestFinal(ctx: *mut EVP_MD_CTX, res: *mut u8, n: *mut u32) -> c_int;
++    pub fn EVP_DigestFinal_ex(ctx: *mut EVP_MD_CTX, res: *mut u8, n: *mut u32) -> c_int;
++
++    pub fn EVP_DigestSignInit(
++        ctx: *mut EVP_MD_CTX,
++        pctx: *mut *mut EVP_PKEY_CTX,
++        type_: *const EVP_MD,
++        e: *mut ENGINE,
++        pkey: *mut EVP_PKEY,
++    ) -> c_int;
++    pub fn EVP_DigestSignFinal(
++        ctx: *mut EVP_MD_CTX,
++        sig: *mut c_uchar,
++        siglen: *mut size_t,
++    ) -> c_int;
++    pub fn EVP_DigestVerifyInit(
++        ctx: *mut EVP_MD_CTX,
++        pctx: *mut *mut EVP_PKEY_CTX,
++        type_: *const EVP_MD,
++        e: *mut ENGINE,
++        pkey: *mut EVP_PKEY,
++    ) -> c_int;
++    #[cfg(any(ossl101, libressl))]
++    pub fn EVP_DigestVerifyFinal(
++        ctx: *mut EVP_MD_CTX,
++        sigret: *mut c_uchar,
++        siglen: size_t,
++    ) -> c_int;
++    #[cfg(not(any(ossl101, libressl)))]
++    pub fn EVP_DigestVerifyFinal(
++        ctx: *mut EVP_MD_CTX,
++        sigret: *const c_uchar,
++        siglen: size_t,
++    ) -> c_int;
++
++    pub fn EVP_MD_CTX_copy_ex(dst: *mut EVP_MD_CTX, src: *const EVP_MD_CTX) -> c_int;
++
++    pub fn EVP_PKEY_new() -> *mut EVP_PKEY;
++    pub fn EVP_PKEY_free(k: *mut EVP_PKEY);
++    pub fn EVP_PKEY_assign(pkey: *mut EVP_PKEY, typ: c_int, key: *mut c_void) -> c_int;
++    pub fn EVP_PKEY_copy_parameters(to: *mut EVP_PKEY, from: *const EVP_PKEY) -> c_int;
++    pub fn EVP_PKEY_get1_RSA(k: *mut EVP_PKEY) -> *mut RSA;
++    pub fn EVP_PKEY_set1_RSA(k: *mut EVP_PKEY, r: *mut RSA) -> c_int;
++    pub fn EVP_PKEY_get1_DSA(k: *mut EVP_PKEY) -> *mut DSA;
++    pub fn EVP_PKEY_get1_DH(k: *mut EVP_PKEY) -> *mut DH;
++    pub fn EVP_PKEY_get1_EC_KEY(k: *mut EVP_PKEY) -> *mut EC_KEY;
++    pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> c_int;
++    pub fn EVP_PKEY_new_mac_key(
++        type_: c_int,
++        e: *mut ENGINE,
++        key: *const c_uchar,
++        keylen: c_int,
++    ) -> *mut EVP_PKEY;
++    pub fn EVP_PKEY_derive_init(ctx: *mut EVP_PKEY_CTX) -> c_int;
++    pub fn EVP_PKEY_derive_set_peer(ctx: *mut EVP_PKEY_CTX, peer: *mut EVP_PKEY) -> c_int;
++    pub fn EVP_PKEY_derive(ctx: *mut EVP_PKEY_CTX, key: *mut c_uchar, size: *mut size_t) -> c_int;
++    pub fn d2i_PKCS8PrivateKey_bio(
++        bp: *mut BIO,
++        x: *mut *mut EVP_PKEY,
++        cb: Option<PasswordCallback>,
++        u: *mut c_void,
++    ) -> *mut EVP_PKEY;
++
++    pub fn EVP_PKEY_CTX_new(k: *mut EVP_PKEY, e: *mut ENGINE) -> *mut EVP_PKEY_CTX;
++    pub fn EVP_PKEY_CTX_free(ctx: *mut EVP_PKEY_CTX);
++    pub fn EVP_PKEY_CTX_ctrl(
++        ctx: *mut EVP_PKEY_CTX,
++        keytype: c_int,
++        optype: c_int,
++        cmd: c_int,
++        p1: c_int,
++        p2: *mut c_void,
++    ) -> c_int;
++
++    pub fn HMAC_CTX_copy(dst: *mut HMAC_CTX, src: *mut HMAC_CTX) -> c_int;
++
++    pub fn OBJ_obj2nid(o: *const ASN1_OBJECT) -> c_int;
++    pub fn OBJ_obj2txt(
++        buf: *mut c_char,
++        buf_len: c_int,
++        a: *const ASN1_OBJECT,
++        no_name: c_int,
++    ) -> c_int;
++
++    pub fn OCSP_BASICRESP_new() -> *mut OCSP_BASICRESP;
++    pub fn OCSP_BASICRESP_free(r: *mut OCSP_BASICRESP);
++    pub fn OCSP_basic_verify(
++        bs: *mut OCSP_BASICRESP,
++        certs: *mut stack_st_X509,
++        st: *mut X509_STORE,
++        flags: c_ulong,
++    ) -> c_int;
++    pub fn OCSP_resp_find_status(
++        bs: *mut OCSP_BASICRESP,
++        id: *mut OCSP_CERTID,
++        status: *mut c_int,
++        reason: *mut c_int,
++        revtime: *mut *mut ASN1_GENERALIZEDTIME,
++        thisupd: *mut *mut ASN1_GENERALIZEDTIME,
++        nextupd: *mut *mut ASN1_GENERALIZEDTIME,
++    ) -> c_int;
++    pub fn OCSP_check_validity(
++        thisupd: *mut ASN1_GENERALIZEDTIME,
++        nextupd: *mut ASN1_GENERALIZEDTIME,
++        sec: c_long,
++        maxsec: c_long,
++    ) -> c_int;
++
++    pub fn OCSP_CERTID_free(id: *mut OCSP_CERTID);
++
++    pub fn OCSP_RESPONSE_new() -> *mut OCSP_RESPONSE;
++    pub fn OCSP_RESPONSE_free(r: *mut OCSP_RESPONSE);
++    pub fn i2d_OCSP_RESPONSE(a: *mut OCSP_RESPONSE, pp: *mut *mut c_uchar) -> c_int;
++    pub fn d2i_OCSP_RESPONSE(
++        a: *mut *mut OCSP_RESPONSE,
++        pp: *mut *const c_uchar,
++        length: c_long,
++    ) -> *mut OCSP_RESPONSE;
++    pub fn OCSP_response_create(status: c_int, bs: *mut OCSP_BASICRESP) -> *mut OCSP_RESPONSE;
++    pub fn OCSP_response_status(resp: *mut OCSP_RESPONSE) -> c_int;
++    pub fn OCSP_response_get1_basic(resp: *mut OCSP_RESPONSE) -> *mut OCSP_BASICRESP;
++
++    pub fn OCSP_REQUEST_new() -> *mut OCSP_REQUEST;
++    pub fn OCSP_REQUEST_free(r: *mut OCSP_REQUEST);
++    pub fn i2d_OCSP_REQUEST(a: *mut OCSP_REQUEST, pp: *mut *mut c_uchar) -> c_int;
++    pub fn d2i_OCSP_REQUEST(
++        a: *mut *mut OCSP_REQUEST,
++        pp: *mut *const c_uchar,
++        length: c_long,
++    ) -> *mut OCSP_REQUEST;
++    pub fn OCSP_request_add0_id(r: *mut OCSP_REQUEST, id: *mut OCSP_CERTID) -> *mut OCSP_ONEREQ;
++
++    pub fn OCSP_ONEREQ_free(r: *mut OCSP_ONEREQ);
++
++    pub fn PEM_read_bio_DHparams(
++        bio: *mut BIO,
++        out: *mut *mut DH,
++        callback: Option<PasswordCallback>,
++        user_data: *mut c_void,
++    ) -> *mut DH;
++    pub fn PEM_read_bio_X509(
++        bio: *mut BIO,
++        out: *mut *mut X509,
++        callback: Option<PasswordCallback>,
++        user_data: *mut c_void,
++    ) -> *mut X509;
++    pub fn PEM_read_bio_X509_REQ(
++        bio: *mut BIO,
++        out: *mut *mut X509_REQ,
++        callback: Option<PasswordCallback>,
++        user_data: *mut c_void,
++    ) -> *mut X509_REQ;
++    pub fn PEM_read_bio_PrivateKey(
++        bio: *mut BIO,
++        out: *mut *mut EVP_PKEY,
++        callback: Option<PasswordCallback>,
++        user_data: *mut c_void,
++    ) -> *mut EVP_PKEY;
++    pub fn PEM_read_bio_PUBKEY(
++        bio: *mut BIO,
++        out: *mut *mut EVP_PKEY,
++        callback: Option<PasswordCallback>,
++        user_data: *mut c_void,
++    ) -> *mut EVP_PKEY;
++
++    pub fn PEM_read_bio_RSAPrivateKey(
++        bio: *mut BIO,
++        rsa: *mut *mut RSA,
++        callback: Option<PasswordCallback>,
++        user_data: *mut c_void,
++    ) -> *mut RSA;
++    pub fn PEM_read_bio_RSA_PUBKEY(
++        bio: *mut BIO,
++        rsa: *mut *mut RSA,
++        callback: Option<PasswordCallback>,
++        user_data: *mut c_void,
++    ) -> *mut RSA;
++
++    pub fn PEM_write_bio_DHparams(bio: *mut BIO, x: *const DH) -> c_int;
++    pub fn PEM_write_bio_PrivateKey(
++        bio: *mut BIO,
++        pkey: *mut EVP_PKEY,
++        cipher: *const EVP_CIPHER,
++        kstr: *mut c_uchar,
++        klen: c_int,
++        callback: Option<PasswordCallback>,
++        user_data: *mut c_void,
++    ) -> c_int;
++    pub fn PEM_write_bio_PKCS8PrivateKey(
++        bio: *mut BIO,
++        pkey: *mut EVP_PKEY,
++        cipher: *const EVP_CIPHER,
++        kstr: *mut c_char,
++        klen: c_int,
++        callback: Option<PasswordCallback>,
++        user_data: *mut c_void,
++    ) -> c_int;
++    pub fn PEM_write_bio_PUBKEY(bp: *mut BIO, x: *mut EVP_PKEY) -> c_int;
++    pub fn PEM_write_bio_RSAPrivateKey(
++        bp: *mut BIO,
++        rsa: *mut RSA,
++        cipher: *const EVP_CIPHER,
++        kstr: *mut c_uchar,
++        klen: c_int,
++        callback: Option<PasswordCallback>,
++        user_data: *mut c_void,
++    ) -> c_int;
++    pub fn PEM_write_bio_RSAPublicKey(bp: *mut BIO, rsa: *const RSA) -> c_int;
++    pub fn PEM_write_bio_RSA_PUBKEY(bp: *mut BIO, rsa: *mut RSA) -> c_int;
++
++    pub fn PEM_read_bio_DSAPrivateKey(
++        bp: *mut BIO,
++        dsa: *mut *mut DSA,
++        callback: Option<PasswordCallback>,
++        user_data: *mut c_void,
++    ) -> *mut DSA;
++    pub fn PEM_read_bio_DSA_PUBKEY(
++        bp: *mut BIO,
++        dsa: *mut *mut DSA,
++        callback: Option<PasswordCallback>,
++        user_data: *mut c_void,
++    ) -> *mut DSA;
++    pub fn PEM_write_bio_DSAPrivateKey(
++        bp: *mut BIO,
++        dsa: *mut DSA,
++        cipher: *const EVP_CIPHER,
++        kstr: *mut c_uchar,
++        klen: c_int,
++        callback: Option<PasswordCallback>,
++        user_data: *mut c_void,
++    ) -> c_int;
++    pub fn PEM_write_bio_DSA_PUBKEY(bp: *mut BIO, dsa: *mut DSA) -> c_int;
++
++    pub fn PEM_write_bio_X509(bio: *mut BIO, x509: *mut X509) -> c_int;
++    pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, x509: *mut X509_REQ) -> c_int;
++
++    pub fn PEM_write_bio_ECPrivateKey(
++        bio: *mut BIO,
++        key: *mut EC_KEY,
++        cipher: *const EVP_CIPHER,
++        kstr: *mut c_uchar,
++        klen: c_int,
++        callback: Option<PasswordCallback>,
++        user_data: *mut c_void,
++    ) -> c_int;
++    pub fn PEM_read_bio_ECPrivateKey(
++        bio: *mut BIO,
++        key: *mut *mut EC_KEY,
++        callback: Option<PasswordCallback>,
++        user_data: *mut c_void,
++    ) -> *mut EC_KEY;
++
++    pub fn PKCS5_PBKDF2_HMAC_SHA1(
++        pass: *const c_char,
++        passlen: c_int,
++        salt: *const u8,
++        saltlen: c_int,
++        iter: c_int,
++        keylen: c_int,
++        out: *mut u8,
++    ) -> c_int;
++    pub fn PKCS5_PBKDF2_HMAC(
++        pass: *const c_char,
++        passlen: c_int,
++        salt: *const c_uchar,
++        saltlen: c_int,
++        iter: c_int,
++        digest: *const EVP_MD,
++        keylen: c_int,
++        out: *mut u8,
++    ) -> c_int;
++
++    pub fn RAND_bytes(buf: *mut u8, num: c_int) -> c_int;
++    pub fn RAND_status() -> c_int;
++
++    pub fn RSA_new() -> *mut RSA;
++    pub fn RSA_free(rsa: *mut RSA);
++    pub fn RSA_generate_key_ex(
++        rsa: *mut RSA,
++        bits: c_int,
++        e: *mut BIGNUM,
++        cb: *mut BN_GENCB,
++    ) -> c_int;
++    pub fn RSA_private_decrypt(
++        flen: c_int,
++        from: *const u8,
++        to: *mut u8,
++        k: *mut RSA,
++        pad: c_int,
++    ) -> c_int;
++    pub fn RSA_public_decrypt(
++        flen: c_int,
++        from: *const u8,
++        to: *mut u8,
++        k: *mut RSA,
++        pad: c_int,
++    ) -> c_int;
++    pub fn RSA_private_encrypt(
++        flen: c_int,
++        from: *const u8,
++        to: *mut u8,
++        k: *mut RSA,
++        pad: c_int,
++    ) -> c_int;
++    pub fn RSA_public_encrypt(
++        flen: c_int,
++        from: *const u8,
++        to: *mut u8,
++        k: *mut RSA,
++        pad: c_int,
++    ) -> c_int;
++    pub fn RSA_sign(
++        t: c_int,
++        m: *const u8,
++        mlen: c_uint,
++        sig: *mut u8,
++        siglen: *mut c_uint,
++        k: *mut RSA,
++    ) -> c_int;
++    pub fn RSA_size(k: *const RSA) -> c_int;
++    pub fn RSA_verify(
++        t: c_int,
++        m: *const u8,
++        mlen: c_uint,
++        sig: *const u8,
++        siglen: c_uint,
++        k: *mut RSA,
++    ) -> c_int;
++
++    pub fn DSA_new() -> *mut DSA;
++    pub fn DSA_free(dsa: *mut DSA);
++    pub fn DSA_size(dsa: *const DSA) -> c_int;
++    pub fn DSA_generate_parameters_ex(
++        dsa: *mut DSA,
++        bits: c_int,
++        seed: *const c_uchar,
++        seed_len: c_int,
++        counter_ref: *mut c_int,
++        h_ret: *mut c_ulong,
++        cb: *mut BN_GENCB,
++    ) -> c_int;
++    pub fn DSA_generate_key(dsa: *mut DSA) -> c_int;
++    pub fn DSA_sign(
++        dummy: c_int,
++        dgst: *const c_uchar,
++        len: c_int,
++        sigret: *mut c_uchar,
++        siglen: *mut c_uint,
++        dsa: *mut DSA,
++    ) -> c_int;
++    pub fn DSA_verify(
++        dummy: c_int,
++        dgst: *const c_uchar,
++        len: c_int,
++        sigbuf: *const c_uchar,
++        siglen: c_int,
++        dsa: *mut DSA,
++    ) -> c_int;
++
++    pub fn SHA1(d: *const c_uchar, n: size_t, md: *mut c_uchar) -> *mut c_uchar;
++    pub fn SHA224(d: *const c_uchar, n: size_t, md: *mut c_uchar) -> *mut c_uchar;
++    pub fn SHA256(d: *const c_uchar, n: size_t, md: *mut c_uchar) -> *mut c_uchar;
++    pub fn SHA384(d: *const c_uchar, n: size_t, md: *mut c_uchar) -> *mut c_uchar;
++    pub fn SHA512(d: *const c_uchar, n: size_t, md: *mut c_uchar) -> *mut c_uchar;
++
++    pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL;
++    pub fn SSL_pending(ssl: *const SSL) -> c_int;
++    pub fn SSL_free(ssl: *mut SSL);
++    pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO);
++    pub fn SSL_get_rbio(ssl: *const SSL) -> *mut BIO;
++    pub fn SSL_get_wbio(ssl: *const SSL) -> *mut BIO;
++    pub fn SSL_accept(ssl: *mut SSL) -> c_int;
++    pub fn SSL_connect(ssl: *mut SSL) -> c_int;
++    pub fn SSL_do_handshake(ssl: *mut SSL) -> c_int;
++    pub fn SSL_ctrl(ssl: *mut SSL, cmd: c_int, larg: c_long, parg: *mut c_void) -> c_long;
++    pub fn SSL_get_error(ssl: *const SSL, ret: c_int) -> c_int;
++    pub fn SSL_read(ssl: *mut SSL, buf: *mut c_void, num: c_int) -> c_int;
++    pub fn SSL_write(ssl: *mut SSL, buf: *const c_void, num: c_int) -> c_int;
++    pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> c_int;
++    pub fn SSL_get_SSL_CTX(ssl: *const SSL) -> *mut SSL_CTX;
++    pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX;
++    #[cfg(not(any(osslconf = "OPENSSL_NO_COMP", libressl)))]
++    pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD;
++    #[cfg(libressl)]
++    pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const libc::c_void;
++    pub fn SSL_get_peer_certificate(ssl: *const SSL) -> *mut X509;
++    pub fn SSL_get_ssl_method(ssl: *mut SSL) -> *const SSL_METHOD;
++    pub fn SSL_get_version(ssl: *const SSL) -> *const c_char;
++    pub fn SSL_state_string(ssl: *const SSL) -> *const c_char;
++    pub fn SSL_state_string_long(ssl: *const SSL) -> *const c_char;
++    pub fn SSL_set_verify(
++        ssl: *mut SSL,
++        mode: c_int,
++        verify_callback: Option<extern "C" fn(c_int, *mut X509_STORE_CTX) -> c_int>,
++    );
++    pub fn SSL_set_ex_data(ssl: *mut SSL, idx: c_int, data: *mut c_void) -> c_int;
++    pub fn SSL_get_ex_data(ssl: *const SSL, idx: c_int) -> *mut c_void;
++    pub fn SSL_get_servername(ssl: *const SSL, name_type: c_int) -> *const c_char;
++    pub fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER;
++    #[cfg(not(any(ossl101, libressl)))]
++    pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM;
++    pub fn SSL_get_verify_result(ssl: *const SSL) -> c_long;
++    pub fn SSL_shutdown(ssl: *mut SSL) -> c_int;
++    pub fn SSL_get_certificate(ssl: *const SSL) -> *mut X509;
++    #[cfg(any(ossl101, libressl))]
++    pub fn SSL_get_privatekey(ssl: *mut SSL) -> *mut EVP_PKEY;
++    #[cfg(not(any(ossl101, libressl)))]
++    pub fn SSL_get_privatekey(ssl: *const SSL) -> *mut EVP_PKEY;
++    pub fn SSL_load_client_CA_file(file: *const c_char) -> *mut stack_st_X509_NAME;
++    pub fn SSL_set_tmp_dh_callback(
++        ctx: *mut SSL,
++        dh: unsafe extern "C" fn(ssl: *mut SSL, is_export: c_int, keylength: c_int) -> *mut DH,
++    );
++
++    #[cfg(not(any(osslconf = "OPENSSL_NO_COMP", libressl)))]
++    pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const c_char;
++    #[cfg(libressl)]
++    pub fn SSL_COMP_get_name(comp: *const libc::c_void) -> *const c_char;
++
++    pub fn SSL_CIPHER_get_name(cipher: *const SSL_CIPHER) -> *const c_char;
++    pub fn SSL_CIPHER_get_bits(cipher: *const SSL_CIPHER, alg_bits: *mut c_int) -> c_int;
++    pub fn SSL_CIPHER_description(
++        cipher: *const SSL_CIPHER,
++        buf: *mut c_char,
++        size: c_int,
++    ) -> *mut c_char;
++
++    pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX;
++    pub fn SSL_CTX_free(ctx: *mut SSL_CTX);
++    pub fn SSL_CTX_ctrl(ctx: *mut SSL_CTX, cmd: c_int, larg: c_long, parg: *mut c_void) -> c_long;
++    pub fn SSL_CTX_callback_ctrl(
++        ctx: *mut SSL_CTX,
++        cmd: c_int,
++        fp: Option<extern "C" fn()>,
++    ) -> c_long;
++    pub fn SSL_CTX_set_verify(
++        ctx: *mut SSL_CTX,
++        mode: c_int,
++        verify_callback: Option<extern "C" fn(c_int, *mut X509_STORE_CTX) -> c_int>,
++    );
++    pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: c_int);
++    pub fn SSL_CTX_load_verify_locations(
++        ctx: *mut SSL_CTX,
++        CAfile: *const c_char,
++        CApath: *const c_char,
++    ) -> c_int;
++    pub fn SSL_CTX_set_default_verify_paths(ctx: *mut SSL_CTX) -> c_int;
++    pub fn SSL_CTX_set_ex_data(ctx: *mut SSL_CTX, idx: c_int, data: *mut c_void) -> c_int;
++    pub fn SSL_CTX_get_ex_data(ctx: *const SSL_CTX, idx: c_int) -> *mut c_void;
++    pub fn SSL_CTX_set_session_id_context(
++        ssl: *mut SSL_CTX,
++        sid_ctx: *const c_uchar,
++        sid_ctx_len: c_uint,
++    ) -> c_int;
++
++    pub fn SSL_CTX_use_certificate_file(
++        ctx: *mut SSL_CTX,
++        cert_file: *const c_char,
++        file_type: c_int,
++    ) -> c_int;
++    pub fn SSL_CTX_use_certificate_chain_file(
++        ctx: *mut SSL_CTX,
++        cert_chain_file: *const c_char,
++    ) -> c_int;
++    pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, cert: *mut X509) -> c_int;
++
++    pub fn SSL_CTX_use_PrivateKey_file(
++        ctx: *mut SSL_CTX,
++        key_file: *const c_char,
++        file_type: c_int,
++    ) -> c_int;
++    pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, key: *mut EVP_PKEY) -> c_int;
++    pub fn SSL_CTX_check_private_key(ctx: *const SSL_CTX) -> c_int;
++    pub fn SSL_CTX_set_client_CA_list(ctx: *mut SSL_CTX, list: *mut stack_st_X509_NAME);
++    pub fn SSL_CTX_get_cert_store(ctx: *const SSL_CTX) -> *mut X509_STORE;
++    pub fn SSL_CTX_set_tmp_dh_callback(
++        ctx: *mut SSL_CTX,
++        dh: unsafe extern "C" fn(ssl: *mut SSL, is_export: c_int, keylength: c_int) -> *mut DH,
++    );
++
++    #[cfg(not(any(ossl101, libressl)))]
++    pub fn SSL_CTX_get0_certificate(ctx: *const SSL_CTX) -> *mut X509;
++    #[cfg(not(any(ossl101, libressl)))]
++    pub fn SSL_CTX_get0_privatekey(ctx: *const SSL_CTX) -> *mut EVP_PKEY;
++
++    pub fn SSL_CTX_set_cipher_list(ssl: *mut SSL_CTX, s: *const c_char) -> c_int;
++
++    pub fn SSL_CTX_set_next_protos_advertised_cb(
++        ssl: *mut SSL_CTX,
++        cb: extern "C" fn(ssl: *mut SSL,
++                          out: *mut *const c_uchar,
++                          outlen: *mut c_uint,
++                          arg: *mut c_void)
++                          -> c_int,
++        arg: *mut c_void,
++    );
++    pub fn SSL_CTX_set_next_proto_select_cb(
++        ssl: *mut SSL_CTX,
++        cb: extern "C" fn(ssl: *mut SSL,
++                          out: *mut *mut c_uchar,
++                          outlen: *mut c_uchar,
++                          inbuf: *const c_uchar,
++                          inlen: c_uint,
++                          arg: *mut c_void)
++                          -> c_int,
++        arg: *mut c_void,
++    );
++    #[cfg(not(osslconf = "OPENSSL_NO_PSK"))]
++    pub fn SSL_CTX_set_psk_client_callback(
++        ssl: *mut SSL_CTX,
++        psk_client_cb: Option<
++            extern "C" fn(*mut SSL,
++                          *const c_char,
++                          *mut c_char,
++                          c_uint,
++                          *mut c_uchar,
++                          c_uint)
++                          -> c_uint,
++        >,
++    );
++    pub fn SSL_select_next_proto(
++        out: *mut *mut c_uchar,
++        outlen: *mut c_uchar,
++        inbuf: *const c_uchar,
++        inlen: c_uint,
++        client: *const c_uchar,
++        client_len: c_uint,
++    ) -> c_int;
++    pub fn SSL_get0_next_proto_negotiated(
++        s: *const SSL,
++        data: *mut *const c_uchar,
++        len: *mut c_uint,
++    );
++    pub fn SSL_get_session(s: *const SSL) -> *mut SSL_SESSION;
++    pub fn SSL_set_session(ssl: *mut SSL, session: *mut SSL_SESSION) -> c_int;
++    #[cfg(not(any(ossl101, libressl, ossl110f)))]
++    pub fn SSL_is_server(s: *mut SSL) -> c_int;
++    #[cfg(ossl110f)]
++    pub fn SSL_is_server(s: *const SSL) -> c_int;
++
++    pub fn SSL_SESSION_free(s: *mut SSL_SESSION);
++    pub fn SSL_SESSION_get_id(s: *const SSL_SESSION, len: *mut c_uint) -> *const c_uchar;
++
++    #[cfg(not(ossl101))]
++    pub fn SSL_CTX_set_alpn_protos(s: *mut SSL_CTX, data: *const c_uchar, len: c_uint) -> c_int;
++
++    #[cfg(not(ossl101))]
++    pub fn SSL_set_alpn_protos(s: *mut SSL, data: *const c_uchar, len: c_uint) -> c_int;
++
++    #[cfg(not(ossl101))]
++    pub fn SSL_CTX_set_alpn_select_cb(
++        ssl: *mut SSL_CTX,
++        cb: extern "C" fn(ssl: *mut SSL,
++                          out: *mut *const c_uchar,
++                          outlen: *mut c_uchar,
++                          inbuf: *const c_uchar,
++                          inlen: c_uint,
++                          arg: *mut c_void)
++                          -> c_int,
++        arg: *mut c_void,
++    );
++    #[cfg(not(ossl101))]
++    pub fn SSL_get0_alpn_selected(s: *const SSL, data: *mut *const c_uchar, len: *mut c_uint);
++
++    pub fn X509_add_ext(x: *mut X509, ext: *mut X509_EXTENSION, loc: c_int) -> c_int;
++    pub fn X509_digest(
++        x: *const X509,
++        digest: *const EVP_MD,
++        buf: *mut c_uchar,
++        len: *mut c_uint,
++    ) -> c_int;
++    pub fn X509_free(x: *mut X509);
++    pub fn X509_REQ_free(x: *mut X509_REQ);
++    pub fn X509_get_serialNumber(x: *mut X509) -> *mut ASN1_INTEGER;
++    pub fn X509_gmtime_adj(time: *mut ASN1_TIME, adj: c_long) -> *mut ASN1_TIME;
++    pub fn X509_new() -> *mut X509;
++    pub fn X509_set_issuer_name(x: *mut X509, name: *mut X509_NAME) -> c_int;
++    pub fn X509_set_subject_name(x: *mut X509, name: *mut X509_NAME) -> c_int;
++    pub fn X509_set_serialNumber(x: *mut X509, sn: *mut ASN1_INTEGER) -> c_int;
++    pub fn X509_set_version(x: *mut X509, version: c_long) -> c_int;
++    pub fn X509_set_pubkey(x: *mut X509, pkey: *mut EVP_PKEY) -> c_int;
++    pub fn X509_sign(x: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> c_int;
++    pub fn X509_get_pubkey(x: *mut X509) -> *mut EVP_PKEY;
++    pub fn X509_to_X509_REQ(x: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> *mut X509_REQ;
++    pub fn X509_verify_cert_error_string(n: c_long) -> *const c_char;
++    pub fn X509_get1_ocsp(x: *mut X509) -> *mut stack_st_OPENSSL_STRING;
++    pub fn X509_check_issued(issuer: *mut X509, subject: *mut X509) -> c_int;
++
++    pub fn X509_ALGOR_free(x: *mut X509_ALGOR);
++
++    pub fn X509_EXTENSION_free(ext: *mut X509_EXTENSION);
++
++    pub fn X509_NAME_new() -> *mut X509_NAME;
++    pub fn X509_NAME_free(x: *mut X509_NAME);
++    pub fn X509_NAME_add_entry_by_txt(
++        x: *mut X509_NAME,
++        field: *const c_char,
++        ty: c_int,
++        bytes: *const c_uchar,
++        len: c_int,
++        loc: c_int,
++        set: c_int,
++    ) -> c_int;
++    pub fn X509_NAME_get_index_by_NID(n: *mut X509_NAME, nid: c_int, last_pos: c_int) -> c_int;
++
++    pub fn X509_NAME_ENTRY_free(x: *mut X509_NAME_ENTRY);
++
++    pub fn ASN1_STRING_free(x: *mut ASN1_STRING);
++    pub fn ASN1_STRING_length(x: *const ASN1_STRING) -> c_int;
++
++    pub fn ASN1_INTEGER_free(x: *mut ASN1_INTEGER);
++
++    pub fn X509_STORE_new() -> *mut X509_STORE;
++    pub fn X509_STORE_free(store: *mut X509_STORE);
++    pub fn X509_STORE_add_cert(store: *mut X509_STORE, x: *mut X509) -> c_int;
++    pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> c_int;
++
++    pub fn X509_STORE_CTX_free(ctx: *mut X509_STORE_CTX);
++    pub fn X509_STORE_CTX_get_current_cert(ctx: *mut X509_STORE_CTX) -> *mut X509;
++    pub fn X509_STORE_CTX_get_error(ctx: *mut X509_STORE_CTX) -> c_int;
++    pub fn X509_STORE_CTX_get_ex_data(ctx: *mut X509_STORE_CTX, idx: c_int) -> *mut c_void;
++    pub fn X509_STORE_CTX_get_error_depth(ctx: *mut X509_STORE_CTX) -> c_int;
++
++    pub fn X509V3_set_ctx(
++        ctx: *mut X509V3_CTX,
++        issuer: *mut X509,
++        subject: *mut X509,
++        req: *mut X509_REQ,
++        crl: *mut X509_CRL,
++        flags: c_int,
++    );
++    pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *mut CONF);
++
++    pub fn X509_REQ_new() -> *mut X509_REQ;
++    pub fn X509_REQ_set_version(req: *mut X509_REQ, version: c_long) -> c_int;
++    pub fn X509_REQ_set_subject_name(req: *mut X509_REQ, name: *mut X509_NAME) -> c_int;
++    pub fn X509_REQ_set_pubkey(req: *mut X509_REQ, pkey: *mut EVP_PKEY) -> c_int;
++    pub fn X509_REQ_add_extensions(req: *mut X509_REQ, exts: *mut stack_st_X509_EXTENSION)
++        -> c_int;
++    pub fn X509_REQ_sign(x: *mut X509_REQ, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> c_int;
++
++    #[cfg(not(ossl101))]
++    pub fn X509_VERIFY_PARAM_free(param: *mut X509_VERIFY_PARAM);
++    #[cfg(not(any(ossl101, libressl)))]
++    pub fn X509_VERIFY_PARAM_set_hostflags(param: *mut X509_VERIFY_PARAM, flags: c_uint);
++    #[cfg(not(any(ossl101, libressl)))]
++    pub fn X509_VERIFY_PARAM_set1_host(
++        param: *mut X509_VERIFY_PARAM,
++        name: *const c_char,
++        namelen: size_t,
++    ) -> c_int;
++
++    pub fn d2i_DHparams(k: *mut *mut DH, pp: *mut *const c_uchar, length: c_long) -> *mut DH;
++    pub fn i2d_DHparams(dh: *const DH, pp: *mut *mut c_uchar) -> c_int;
++
++    pub fn d2i_DSAPublicKey(a: *mut *mut DSA, pp: *mut *const c_uchar, length: c_long) -> *mut DSA;
++    pub fn i2d_DSAPublicKey(a: *const DSA, pp: *mut *mut c_uchar) -> c_int;
++    pub fn d2i_DSAPrivateKey(a: *mut *mut DSA, pp: *mut *const c_uchar, length: c_long)
++        -> *mut DSA;
++    pub fn i2d_DSAPrivateKey(a: *const DSA, pp: *mut *mut c_uchar) -> c_int;
++
++    pub fn d2i_ECPrivateKey(
++        k: *mut *mut EC_KEY,
++        pp: *mut *const c_uchar,
++        length: c_long,
++    ) -> *mut EC_KEY;
++    pub fn i2d_ECPrivateKey(ec_key: *mut EC_KEY, pp: *mut *mut c_uchar) -> c_int;
++
++    pub fn d2i_X509(a: *mut *mut X509, pp: *mut *const c_uchar, length: c_long) -> *mut X509;
++    pub fn d2i_X509_REQ(
++        a: *mut *mut X509_REQ,
++        pp: *mut *const c_uchar,
++        length: c_long,
++    ) -> *mut X509_REQ;
++    pub fn i2d_X509_bio(b: *mut BIO, x: *mut X509) -> c_int;
++    pub fn i2d_X509(x: *mut X509, buf: *mut *mut u8) -> c_int;
++    pub fn i2d_X509_REQ_bio(b: *mut BIO, x: *mut X509_REQ) -> c_int;
++    pub fn i2d_X509_REQ(x: *mut X509_REQ, buf: *mut *mut u8) -> c_int;
++
++    pub fn d2i_AutoPrivateKey(
++        a: *mut *mut EVP_PKEY,
++        pp: *mut *const c_uchar,
++        length: c_long,
++    ) -> *mut EVP_PKEY;
++    pub fn d2i_PUBKEY(k: *mut *mut EVP_PKEY, buf: *mut *const u8, len: c_long) -> *mut EVP_PKEY;
++    pub fn i2d_PUBKEY_bio(b: *mut BIO, x: *mut EVP_PKEY) -> c_int;
++    pub fn i2d_PrivateKey_bio(b: *mut BIO, x: *mut EVP_PKEY) -> c_int;
++    pub fn i2d_PUBKEY(k: *mut EVP_PKEY, buf: *mut *mut u8) -> c_int;
++    pub fn i2d_PrivateKey(k: *mut EVP_PKEY, buf: *mut *mut u8) -> c_int;
++
++    pub fn i2d_RSA_PUBKEY(k: *mut RSA, buf: *mut *mut u8) -> c_int;
++    pub fn d2i_RSA_PUBKEY(k: *mut *mut RSA, buf: *mut *const u8, len: c_long) -> *mut RSA;
++    pub fn i2d_RSAPublicKey(k: *const RSA, buf: *mut *mut u8) -> c_int;
++    pub fn d2i_RSAPublicKey(k: *mut *mut RSA, buf: *mut *const u8, len: c_long) -> *mut RSA;
++    pub fn i2d_RSAPrivateKey(k: *const RSA, buf: *mut *mut u8) -> c_int;
++    pub fn d2i_RSAPrivateKey(k: *mut *mut RSA, buf: *mut *const u8, len: c_long) -> *mut RSA;
++
++    pub fn i2d_PKCS12_bio(b: *mut BIO, a: *mut PKCS12) -> c_int;
++    pub fn i2d_PKCS12(a: *mut PKCS12, buf: *mut *mut u8) -> c_int;
++    pub fn d2i_PKCS12(a: *mut *mut PKCS12, pp: *mut *const u8, length: c_long) -> *mut PKCS12;
++    pub fn PKCS12_parse(
++        p12: *mut PKCS12,
++        pass: *const c_char,
++        pkey: *mut *mut EVP_PKEY,
++        cert: *mut *mut X509,
++        ca: *mut *mut stack_st_X509,
++    ) -> c_int;
++    pub fn PKCS12_free(p12: *mut PKCS12);
++
++    pub fn GENERAL_NAME_free(name: *mut GENERAL_NAME);
++
++    pub fn HMAC_Init_ex(
++        ctx: *mut HMAC_CTX,
++        key: *const c_void,
++        len: c_int,
++        md: *const EVP_MD,
++        impl_: *mut ENGINE,
++    ) -> c_int;
++    pub fn HMAC_Update(ctx: *mut HMAC_CTX, data: *const c_uchar, len: size_t) -> c_int;
++    pub fn HMAC_Final(ctx: *mut HMAC_CTX, md: *mut c_uchar, len: *mut c_uint) -> c_int;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f69198e2c17c249ed2273e1d9630e256411efe30
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,594 @@@
++use std::sync::{Mutex, MutexGuard};
++use std::sync::{Once, ONCE_INIT};
++use std::mem;
++use std::ptr;
++
++#[cfg(libressl250)]
++pub use libressl::v250::*;
++#[cfg(not(libressl250))]
++pub use libressl::v25x::*;
++
++use libc::{c_int, c_char, c_void, c_long, c_uchar, size_t, c_uint, c_ulong};
++
++#[cfg(libressl250)]
++mod v250;
++#[cfg(not(libressl250))]
++mod v25x;
++
++#[repr(C)]
++pub struct stack_st_ASN1_OBJECT {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct stack_st_X509 {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct stack_st_X509_NAME {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct stack_st_X509_ATTRIBUTE {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct stack_st_X509_EXTENSION {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct stack_st_GENERAL_NAME {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct stack_st_void {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct stack_st_SSL_CIPHER {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct stack_st_OPENSSL_STRING {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct _STACK {
++    pub num: c_int,
++    pub data: *mut *mut c_char,
++    pub sorted: c_int,
++    pub num_alloc: c_int,
++    pub comp: Option<unsafe extern "C" fn(*const c_void, *const c_void) -> c_int>,
++}
++
++#[repr(C)]
++pub struct BIO_METHOD {
++    pub type_: c_int,
++    pub name: *const c_char,
++    pub bwrite: Option<unsafe extern "C" fn(*mut ::BIO, *const c_char, c_int) -> c_int>,
++    pub bread: Option<unsafe extern "C" fn(*mut ::BIO, *mut c_char, c_int) -> c_int>,
++    pub bputs: Option<unsafe extern "C" fn(*mut ::BIO, *const c_char) -> c_int>,
++    pub bgets: Option<unsafe extern "C" fn(*mut ::BIO, *mut c_char, c_int) -> c_int>,
++    pub ctrl: Option<unsafe extern "C" fn(*mut ::BIO, c_int, c_long, *mut c_void) -> c_long>,
++    pub create: Option<unsafe extern "C" fn(*mut ::BIO) -> c_int>,
++    pub destroy: Option<unsafe extern "C" fn(*mut ::BIO) -> c_int>,
++    pub callback_ctrl: Option<unsafe extern "C" fn(*mut ::BIO, c_int, ::bio_info_cb) -> c_long>,
++}
++
++#[repr(C)]
++pub struct RSA {
++    pub pad: c_int,
++    pub version: c_long,
++    pub meth: *const ::RSA_METHOD,
++
++    pub engine: *mut ::ENGINE,
++    pub n: *mut ::BIGNUM,
++    pub e: *mut ::BIGNUM,
++    pub d: *mut ::BIGNUM,
++    pub p: *mut ::BIGNUM,
++    pub q: *mut ::BIGNUM,
++    pub dmp1: *mut ::BIGNUM,
++    pub dmq1: *mut ::BIGNUM,
++    pub iqmp: *mut ::BIGNUM,
++
++    pub ex_data: ::CRYPTO_EX_DATA,
++    pub references: c_int,
++    pub flags: c_int,
++
++    pub _method_mod_n: *mut ::BN_MONT_CTX,
++    pub _method_mod_p: *mut ::BN_MONT_CTX,
++    pub _method_mod_q: *mut ::BN_MONT_CTX,
++
++    pub blinding: *mut ::BN_BLINDING,
++    pub mt_blinding: *mut ::BN_BLINDING,
++}
++
++#[repr(C)]
++pub struct DSA {
++    pub pad: c_int,
++    pub version: c_long,
++    pub write_params: c_int,
++
++    pub p: *mut ::BIGNUM,
++    pub q: *mut ::BIGNUM,
++    pub g: *mut ::BIGNUM,
++    pub pub_key: *mut ::BIGNUM,
++    pub priv_key: *mut ::BIGNUM,
++    pub kinv: *mut ::BIGNUM,
++    pub r: *mut ::BIGNUM,
++
++    pub flags: c_int,
++    pub method_mont_p: *mut ::BN_MONT_CTX,
++    pub references: c_int,
++    pub ex_data: ::CRYPTO_EX_DATA,
++    pub meth: *const ::DSA_METHOD,
++    pub engine: *mut ::ENGINE,
++}
++
++#[repr(C)]
++pub struct EVP_PKEY {
++    pub type_: c_int,
++    pub save_type: c_int,
++    pub references: c_int,
++    pub ameth: *const ::EVP_PKEY_ASN1_METHOD,
++    pub engine: *mut ::ENGINE,
++    pub pkey: *mut c_void,
++    pub save_parameters: c_int,
++    pub attributes: *mut stack_st_X509_ATTRIBUTE,
++}
++
++#[repr(C)]
++pub struct BIO {
++    pub method: *mut ::BIO_METHOD,
++    pub callback: Option<
++        unsafe extern "C" fn(*mut ::BIO,
++                             c_int,
++                             *const c_char,
++                             c_int,
++                             c_long,
++                             c_long)
++                             -> c_long,
++    >,
++    pub cb_arg: *mut c_char,
++    pub init: c_int,
++    pub shutdown: c_int,
++    pub flags: c_int,
++    pub retry_reason: c_int,
++    pub num: c_int,
++    pub ptr: *mut c_void,
++    pub next_bio: *mut ::BIO,
++    pub prev_bio: *mut ::BIO,
++    pub references: c_int,
++    pub num_read: c_ulong,
++    pub num_write: c_ulong,
++    pub ex_data: ::CRYPTO_EX_DATA,
++}
++
++#[repr(C)]
++pub struct CRYPTO_EX_DATA {
++    pub sk: *mut ::stack_st_void,
++}
++
++#[repr(C)]
++pub struct EVP_MD_CTX {
++    digest: *mut ::EVP_MD,
++    engine: *mut ::ENGINE,
++    flags: c_ulong,
++    md_data: *mut c_void,
++    pctx: *mut ::EVP_PKEY_CTX,
++    update: *mut c_void,
++}
++
++#[repr(C)]
++pub struct EVP_CIPHER {
++    pub nid: c_int,
++    pub block_size: c_int,
++    pub key_len: c_int,
++    pub iv_len: c_int,
++    pub flags: c_ulong,
++    pub init: Option<
++        unsafe extern "C" fn(*mut ::EVP_CIPHER_CTX,
++                             *const c_uchar,
++                             *const c_uchar,
++                             c_int)
++                             -> c_int,
++    >,
++    pub do_cipher: Option<
++        unsafe extern "C" fn(*mut ::EVP_CIPHER_CTX,
++                             *mut c_uchar,
++                             *const c_uchar,
++                             size_t)
++                             -> c_int,
++    >,
++    pub cleanup: Option<unsafe extern "C" fn(*mut ::EVP_CIPHER_CTX) -> c_int>,
++    pub ctx_size: c_int,
++    pub set_asn1_parameters:
++        Option<unsafe extern "C" fn(*mut ::EVP_CIPHER_CTX, *mut ::ASN1_TYPE) -> c_int>,
++    pub get_asn1_parameters:
++        Option<unsafe extern "C" fn(*mut ::EVP_CIPHER_CTX, *mut ::ASN1_TYPE) -> c_int>,
++    pub ctrl:
++        Option<unsafe extern "C" fn(*mut ::EVP_CIPHER_CTX, c_int, c_int, *mut c_void) -> c_int>,
++    pub app_data: *mut c_void,
++}
++
++#[repr(C)]
++pub struct HMAC_CTX {
++    md: *mut ::EVP_MD,
++    md_ctx: ::EVP_MD_CTX,
++    i_ctx: ::EVP_MD_CTX,
++    o_ctx: ::EVP_MD_CTX,
++    key_length: c_uint,
++    key: [c_uchar; 128],
++}
++
++#[repr(C)]
++pub struct BIGNUM {
++    pub d: *mut ::BN_ULONG,
++    pub top: c_int,
++    pub dmax: c_int,
++    pub neg: c_int,
++    pub flags: c_int,
++}
++
++#[repr(C)]
++pub struct DH {
++    pub pad: c_int,
++    pub version: c_int,
++    pub p: *mut ::BIGNUM,
++    pub g: *mut ::BIGNUM,
++    pub length: c_long,
++    pub pub_key: *mut ::BIGNUM,
++    pub priv_key: *mut ::BIGNUM,
++    pub flags: c_int,
++    pub method_mont_p: *mut ::BN_MONT_CTX,
++    pub q: *mut ::BIGNUM,
++    pub j: *mut ::BIGNUM,
++    pub seed: *mut c_uchar,
++    pub seedlen: c_int,
++    pub counter: *mut ::BIGNUM,
++    pub references: c_int,
++    pub ex_data: ::CRYPTO_EX_DATA,
++    pub meth: *const ::DH_METHOD,
++    pub engine: *mut ::ENGINE,
++}
++
++#[repr(C)]
++pub struct X509 {
++    pub cert_info: *mut X509_CINF,
++    pub sig_alg: *mut ::X509_ALGOR,
++    pub signature: *mut ::ASN1_BIT_STRING,
++    pub valid: c_int,
++    pub references: c_int,
++    pub name: *mut c_char,
++    pub ex_data: ::CRYPTO_EX_DATA,
++    pub ex_pathlen: c_long,
++    pub ex_pcpathlen: c_long,
++    pub ex_flags: c_ulong,
++    pub ex_kusage: c_ulong,
++    pub ex_xkusage: c_ulong,
++    pub ex_nscert: c_ulong,
++    skid: *mut c_void,
++    akid: *mut c_void,
++    policy_cache: *mut c_void,
++    crldp: *mut c_void,
++    altname: *mut c_void,
++    nc: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_SHA"))]
++    sha1_hash: [c_uchar; 20],
++    aux: *mut c_void,
++}
++
++#[repr(C)]
++pub struct X509_CINF {
++    version: *mut c_void,
++    serialNumber: *mut c_void,
++    signature: *mut c_void,
++    issuer: *mut c_void,
++    pub validity: *mut X509_VAL,
++    subject: *mut c_void,
++    key: *mut c_void,
++    issuerUID: *mut c_void,
++    subjectUID: *mut c_void,
++    pub extensions: *mut stack_st_X509_EXTENSION,
++    enc: ASN1_ENCODING,
++}
++
++#[repr(C)]
++pub struct X509_ALGOR {
++    pub algorithm: *mut ::ASN1_OBJECT,
++    parameter: *mut c_void,
++}
++
++#[repr(C)]
++pub struct ASN1_ENCODING {
++    pub enc: *mut c_uchar,
++    pub len: c_long,
++    pub modified: c_int,
++}
++
++#[repr(C)]
++pub struct X509_VAL {
++    pub notBefore: *mut ::ASN1_TIME,
++    pub notAfter: *mut ::ASN1_TIME,
++}
++
++#[repr(C)]
++pub struct X509_REQ_INFO {
++    pub enc: ASN1_ENCODING,
++    pub version: *mut ::ASN1_INTEGER,
++    pub subject: *mut ::X509_NAME,
++    pubkey: *mut c_void,
++    pub attributes: *mut stack_st_X509_ATTRIBUTE,
++}
++
++#[repr(C)]
++pub struct X509_REQ {
++    pub req_info: *mut X509_REQ_INFO,
++    sig_alg: *mut c_void,
++    signature: *mut c_void,
++    references: c_int,
++}
++
++pub enum X509_VERIFY_PARAM_ID {}
++pub enum PKCS12 {}
++
++pub const SSL_CTRL_GET_SESSION_REUSED: c_int = 8;
++pub const SSL_CTRL_OPTIONS: c_int = 32;
++pub const SSL_CTRL_CLEAR_OPTIONS: c_int = 77;
++pub const SSL_CTRL_SET_ECDH_AUTO: c_int = 94;
++
++pub const SSL_OP_ALL: c_ulong = 0x80000014;
++pub const SSL_OP_CISCO_ANYCONNECT: c_ulong = 0x0;
++pub const SSL_OP_NO_COMPRESSION: c_ulong = 0x0;
++pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: c_ulong = 0x0;
++pub const SSL_OP_NO_SSLv3: c_ulong = 0x0;
++pub const SSL_OP_MICROSOFT_SESS_ID_BUG: c_ulong = 0x0;
++pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: c_ulong = 0x0;
++pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: c_ulong = 0x0;
++pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: c_ulong = 0x0;
++pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: c_ulong = 0x0;
++pub const SSL_OP_TLS_D5_BUG: c_ulong = 0x0;
++pub const SSL_OP_TLS_BLOCK_PADDING_BUG: c_ulong = 0x0;
++pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x00080000;
++pub const SSL_OP_SINGLE_DH_USE: c_ulong = 0x00100000;
++pub const SSL_OP_NO_SSLv2: c_ulong = 0x0;
++
++pub const SSL_MAX_SSL_SESSION_ID_LENGTH: c_int = 32;
++pub const SSL_MAX_SID_CTX_LENGTH: c_int = 32;
++pub const SSL_MAX_MASTER_KEY_LENGTH: c_int = 48;
++
++pub const SSLEAY_VERSION: c_int = 0;
++pub const SSLEAY_CFLAGS: c_int = 2;
++pub const SSLEAY_BUILT_ON: c_int = 3;
++pub const SSLEAY_PLATFORM: c_int = 4;
++pub const SSLEAY_DIR: c_int = 5;
++
++pub const CRYPTO_LOCK_X509: c_int = 3;
++pub const CRYPTO_LOCK_SSL_CTX: c_int = 12;
++pub const CRYPTO_LOCK_SSL_SESSION: c_int = 14;
++
++static mut MUTEXES: *mut Vec<Mutex<()>> = 0 as *mut Vec<Mutex<()>>;
++static mut GUARDS: *mut Vec<Option<MutexGuard<'static, ()>>> = 0 as
++    *mut Vec<Option<MutexGuard<'static, ()>>>;
++
++unsafe extern "C" fn locking_function(mode: c_int, n: c_int, _file: *const c_char, _line: c_int) {
++    let mutex = &(*MUTEXES)[n as usize];
++
++    if mode & ::CRYPTO_LOCK != 0 {
++        (*GUARDS)[n as usize] = Some(mutex.lock().unwrap());
++    } else {
++        &(*GUARDS)[n as usize].take().expect("lock already unlocked");
++    }
++}
++
++pub fn init() {
++    static INIT: Once = ONCE_INIT;
++
++    INIT.call_once(|| unsafe {
++        SSL_library_init();
++        SSL_load_error_strings();
++        OPENSSL_add_all_algorithms_noconf();
++
++        let num_locks = ::CRYPTO_num_locks();
++        let mut mutexes = Box::new(Vec::new());
++        for _ in 0..num_locks {
++            mutexes.push(Mutex::new(()));
++        }
++        MUTEXES = mem::transmute(mutexes);
++        let guards: Box<Vec<Option<MutexGuard<()>>>> =
++            Box::new((0..num_locks).map(|_| None).collect());
++        GUARDS = mem::transmute(guards);
++
++        CRYPTO_set_locking_callback(locking_function);
++        set_id_callback();
++    })
++}
++
++#[cfg(unix)]
++fn set_id_callback() {
++    unsafe extern "C" fn thread_id() -> c_ulong {
++        ::libc::pthread_self() as c_ulong
++    }
++
++    unsafe {
++        CRYPTO_set_id_callback(thread_id);
++    }
++}
++
++#[cfg(not(unix))]
++fn set_id_callback() {}
++
++// macros
++
++pub unsafe fn SSL_CTX_set_ecdh_auto(ctx: *mut SSL_CTX, onoff: c_int) -> c_int {
++    ::SSL_CTX_ctrl(
++        ctx,
++        SSL_CTRL_SET_ECDH_AUTO,
++        onoff as c_long,
++        ptr::null_mut(),
++    ) as c_int
++}
++
++pub unsafe fn SSL_set_ecdh_auto(ssl: *mut ::SSL, onoff: c_int) -> c_int {
++    ::SSL_ctrl(
++        ssl,
++        SSL_CTRL_SET_ECDH_AUTO,
++        onoff as c_long,
++        ptr::null_mut(),
++    ) as c_int
++}
++
++pub unsafe fn SSL_session_reused(ssl: *mut ::SSL) -> c_int {
++    ::SSL_ctrl(ssl, SSL_CTRL_GET_SESSION_REUSED, 0, ptr::null_mut()) as c_int
++}
++
++extern "C" {
++    pub fn BIO_new(type_: *mut BIO_METHOD) -> *mut BIO;
++    pub fn BIO_s_file() -> *mut BIO_METHOD;
++    pub fn BIO_s_mem() -> *mut BIO_METHOD;
++
++    pub fn get_rfc2409_prime_768(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn get_rfc2409_prime_1024(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn get_rfc3526_prime_1536(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn get_rfc3526_prime_2048(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn get_rfc3526_prime_3072(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn get_rfc3526_prime_4096(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn get_rfc3526_prime_6144(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn get_rfc3526_prime_8192(bn: *mut BIGNUM) -> *mut BIGNUM;
++
++    pub fn CRYPTO_malloc(num: c_int, file: *const c_char, line: c_int) -> *mut c_void;
++    pub fn CRYPTO_free(buf: *mut c_void);
++    pub fn CRYPTO_num_locks() -> c_int;
++    pub fn CRYPTO_set_locking_callback(
++        func: unsafe extern "C" fn(mode: c_int, n: c_int, file: *const c_char, line: c_int),
++    );
++    pub fn CRYPTO_set_id_callback(func: unsafe extern "C" fn() -> c_ulong);
++
++    pub fn ERR_load_crypto_strings();
++
++    pub fn RSA_generate_key(
++        modsz: c_int,
++        e: c_ulong,
++        cb: Option<extern "C" fn(c_int, c_int, *mut c_void)>,
++        cbarg: *mut c_void,
++    ) -> *mut RSA;
++
++    pub fn OCSP_cert_to_id(
++        dgst: *const ::EVP_MD,
++        subject: *mut ::X509,
++        issuer: *mut ::X509,
++    ) -> *mut ::OCSP_CERTID;
++
++    pub fn PKCS12_create(
++        pass: *mut c_char,
++        friendly_name: *mut c_char,
++        pkey: *mut EVP_PKEY,
++        cert: *mut X509,
++        ca: *mut stack_st_X509,
++        nid_key: c_int,
++        nid_cert: c_int,
++        iter: c_int,
++        mac_iter: c_int,
++        keytype: c_int,
++    ) -> *mut PKCS12;
++
++    pub fn SSL_library_init() -> c_int;
++    pub fn SSL_load_error_strings();
++    pub fn OPENSSL_add_all_algorithms_noconf();
++    pub fn HMAC_CTX_init(ctx: *mut ::HMAC_CTX);
++    pub fn HMAC_CTX_cleanup(ctx: *mut ::HMAC_CTX);
++    pub fn TLSv1_method() -> *const ::SSL_METHOD;
++    pub fn SSLv23_method() -> *const ::SSL_METHOD;
++    pub fn TLSv1_1_method() -> *const ::SSL_METHOD;
++    pub fn TLSv1_2_method() -> *const ::SSL_METHOD;
++    pub fn DTLSv1_method() -> *const ::SSL_METHOD;
++    pub fn SSL_get_ex_new_index(
++        argl: c_long,
++        argp: *mut c_void,
++        new_func: Option<::CRYPTO_EX_new>,
++        dup_func: Option<::CRYPTO_EX_dup>,
++        free_func: Option<::CRYPTO_EX_free>,
++    ) -> c_int;
++    pub fn SSL_set_tmp_ecdh_callback(
++        ssl: *mut ::SSL,
++        ecdh: unsafe extern "C" fn(ssl: *mut ::SSL, is_export: c_int, keylength: c_int)
++                                   -> *mut ::EC_KEY,
++    );
++    pub fn SSL_CIPHER_get_version(cipher: *const ::SSL_CIPHER) -> *mut c_char;
++    pub fn SSL_CTX_get_ex_new_index(
++        argl: c_long,
++        argp: *mut c_void,
++        new_func: Option<::CRYPTO_EX_new>,
++        dup_func: Option<::CRYPTO_EX_dup>,
++        free_func: Option<::CRYPTO_EX_free>,
++    ) -> c_int;
++    pub fn SSL_CTX_set_tmp_ecdh_callback(
++        ctx: *mut ::SSL_CTX,
++        ecdh: unsafe extern "C" fn(ssl: *mut ::SSL, is_export: c_int, keylength: c_int)
++                                   -> *mut ::EC_KEY,
++    );
++    pub fn X509_get_subject_name(x: *mut ::X509) -> *mut ::X509_NAME;
++    pub fn X509_set_notAfter(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int;
++    pub fn X509_set_notBefore(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int;
++    pub fn X509_get_ext_d2i(
++        x: *mut ::X509,
++        nid: c_int,
++        crit: *mut c_int,
++        idx: *mut c_int,
++    ) -> *mut c_void;
++    pub fn X509_NAME_add_entry_by_NID(
++        x: *mut ::X509_NAME,
++        field: c_int,
++        ty: c_int,
++        bytes: *mut c_uchar,
++        len: c_int,
++        loc: c_int,
++        set: c_int,
++    ) -> c_int;
++    pub fn X509_NAME_get_entry(n: *mut ::X509_NAME, loc: c_int) -> *mut ::X509_NAME_ENTRY;
++    pub fn X509_NAME_ENTRY_get_data(ne: *mut ::X509_NAME_ENTRY) -> *mut ::ASN1_STRING;
++    pub fn X509_STORE_CTX_get_chain(ctx: *mut ::X509_STORE_CTX) -> *mut stack_st_X509;
++    pub fn X509V3_EXT_nconf_nid(
++        conf: *mut ::CONF,
++        ctx: *mut ::X509V3_CTX,
++        ext_nid: c_int,
++        value: *mut c_char,
++    ) -> *mut ::X509_EXTENSION;
++    pub fn X509V3_EXT_nconf(
++        conf: *mut ::CONF,
++        ctx: *mut ::X509V3_CTX,
++        name: *mut c_char,
++        value: *mut c_char,
++    ) -> *mut ::X509_EXTENSION;
++    pub fn ASN1_STRING_to_UTF8(out: *mut *mut c_uchar, s: *mut ::ASN1_STRING) -> c_int;
++    pub fn ASN1_STRING_data(x: *mut ::ASN1_STRING) -> *mut c_uchar;
++    pub fn CRYPTO_add_lock(
++        pointer: *mut c_int,
++        amount: c_int,
++        type_: c_int,
++        file: *const c_char,
++        line: c_int,
++    ) -> c_int;
++    pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX;
++    pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX);
++    pub fn EVP_PKEY_bits(key: *mut EVP_PKEY) -> c_int;
++
++    pub fn sk_new_null() -> *mut _STACK;
++    pub fn sk_num(st: *const _STACK) -> c_int;
++    pub fn sk_value(st: *const _STACK, n: c_int) -> *mut c_void;
++    pub fn sk_free(st: *mut _STACK);
++    pub fn sk_push(st: *mut _STACK, data: *mut c_void) -> c_int;
++    pub fn sk_pop_free(st: *mut _STACK, free: Option<unsafe extern "C" fn(*mut c_void)>);
++    pub fn sk_pop(st: *mut _STACK) -> *mut c_void;
++
++    pub fn SSLeay() -> c_ulong;
++    pub fn SSLeay_version(key: c_int) -> *const c_char;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e844ffed7109ce4e6b9e2eccef57f27fc2bb4d77
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,221 @@@
++use libc::{c_int, c_char, c_void, c_long, c_uchar, size_t, c_uint, c_ulong, time_t};
++
++use super::*;
++
++#[repr(C)]
++pub struct SSL {
++    version: c_int,
++    type_: c_int,
++    method: *const ::SSL_METHOD,
++    rbio: *mut c_void,
++    wbio: *mut c_void,
++    bbio: *mut c_void,
++    rwstate: c_int,
++    in_handshake: c_int,
++    handshake_func: Option<unsafe extern "C" fn(*mut SSL) -> c_int>,
++    pub server: c_int,
++    new_session: c_int,
++    quiet_shutdown: c_int,
++    shutdown: c_int,
++    state: c_int,
++    rstate: c_int,
++    init_buf: *mut c_void,
++    init_msg: *mut c_void,
++    init_num: c_int,
++    init_off: c_int,
++    packet: *mut c_uchar,
++    packet_length: c_uint,
++    s3: *mut c_void,
++    d1: *mut c_void,
++    read_ahead: c_int,
++    msg_callback: Option<
++        unsafe extern "C" fn(c_int,
++                             c_int,
++                             c_int,
++                             *const c_void,
++                             size_t,
++                             *mut SSL,
++                             *mut c_void),
++    >,
++    msg_callback_arg: *mut c_void,
++    hit: c_int,
++    param: *mut c_void,
++    cipher_list: *mut stack_st_SSL_CIPHER,
++    cipher_list_by_id: *mut stack_st_SSL_CIPHER,
++    mac_flags: c_int,
++    aead_read_ctx: *mut c_void,
++    enc_read_ctx: *mut ::EVP_CIPHER_CTX,
++    read_hash: *mut ::EVP_MD_CTX,
++    aead_write_ctx: *mut c_void,
++    enc_write_ctx: *mut ::EVP_CIPHER_CTX,
++    write_hash: *mut ::EVP_MD_CTX,
++    cert: *mut c_void,
++    sid_ctx_length: c_uint,
++    sid_ctx: [c_uchar; ::SSL_MAX_SID_CTX_LENGTH as usize],
++    session: *mut ::SSL_SESSION,
++    generate_session_id: ::GEN_SESSION_CB,
++    verify_mode: c_int,
++    verify_callback: Option<unsafe extern "C" fn(c_int, *mut ::X509_STORE_CTX) -> c_int>,
++    info_callback: Option<unsafe extern "C" fn(*mut SSL, c_int, c_int)>,
++    error: c_int,
++    error_code: c_int,
++    ctx: *mut ::SSL_CTX,
++    debug: c_int,
++    verify_result: c_long,
++    ex_data: ::CRYPTO_EX_DATA,
++    client_CA: *mut stack_st_X509_NAME,
++    references: c_int,
++    options: c_ulong,
++    mode: c_ulong,
++    max_cert_list: c_long,
++    first_packet: c_int,
++    client_version: c_int,
++    max_send_fragment: c_uint,
++    tlsext_debug_cb:
++        Option<unsafe extern "C" fn(*mut SSL, c_int, c_int, *mut c_uchar, c_int, *mut c_void)>,
++    tlsext_debug_arg: *mut c_void,
++    tlsext_hostname: *mut c_char,
++    servername_done: c_int,
++    tlsext_status_type: c_int,
++    tlsext_status_expected: c_int,
++    tlsext_ocsp_ids: *mut c_void,
++    tlsext_ocsp_exts: *mut c_void,
++    tlsext_ocsp_resp: *mut c_uchar,
++    tlsext_ocsp_resplen: c_int,
++    tlsext_ticket_expected: c_int,
++    tlsext_ecpointformatlist_length: size_t,
++    tlsext_ecpointformatlist: *mut c_uchar,
++    tlsext_ellipticcurvelist_length: size_t,
++    tlsext_ellipticcurvelist: *mut c_uchar,
++    tlsext_session_ticket: *mut c_void,
++    tlsext_session_ticket_ext_cb: ::tls_session_ticket_ext_cb_fn,
++    tls_session_ticket_ext_cb_arg: *mut c_void,
++    tls_session_secret_cb: ::tls_session_secret_cb_fn,
++    tls_session_secret_cb_arg: *mut c_void,
++    initial_ctx: *mut ::SSL_CTX,
++    next_proto_negotiated: *mut c_uchar,
++    next_proto_negotiated_len: c_uchar,
++    srtp_profiles: *mut c_void,
++    srtp_profile: *mut c_void,
++    tlsext_heartbeat: c_uint,
++    tlsext_hb_pending: c_uint,
++    tlsext_hb_seq: c_uint,
++    alpn_client_proto_list: *mut c_uchar,
++    alpn_client_proto_list_len: c_uint,
++    renegotiate: c_int,
++}
++
++#[repr(C)]
++pub struct SSL_CTX {
++    method: *mut c_void,
++    cipher_list: *mut c_void,
++    cipher_list_by_id: *mut c_void,
++    cert_store: *mut c_void,
++    sessions: *mut c_void,
++    session_cache_size: c_ulong,
++    session_cache_head: *mut c_void,
++    session_cache_tail: *mut c_void,
++    session_cache_mode: c_int,
++    session_timeout: c_long,
++    new_session_cb: *mut c_void,
++    remove_session_cb: *mut c_void,
++    get_session_cb: *mut c_void,
++    stats: [c_int; 11],
++    pub references: c_int,
++    app_verify_callback: *mut c_void,
++    app_verify_arg: *mut c_void,
++    default_passwd_callback: *mut c_void,
++    default_passwd_callback_userdata: *mut c_void,
++    client_cert_cb: *mut c_void,
++    app_gen_cookie_cb: *mut c_void,
++    app_verify_cookie_cb: *mut c_void,
++    ex_dat: ::CRYPTO_EX_DATA,
++    rsa_md5: *mut c_void,
++    md5: *mut c_void,
++    sha1: *mut c_void,
++    extra_certs: *mut c_void,
++    comp_methods: *mut c_void,
++    info_callback: *mut c_void,
++    client_CA: *mut c_void,
++    options: c_ulong,
++    mode: c_ulong,
++    max_cert_list: c_long,
++    cert: *mut c_void,
++    read_ahead: c_int,
++    msg_callback: *mut c_void,
++    msg_callback_arg: *mut c_void,
++    verify_mode: c_int,
++    sid_ctx_length: c_uint,
++    sid_ctx: [c_uchar; 32],
++    default_verify_callback: *mut c_void,
++    generate_session_id: *mut c_void,
++    param: *mut c_void,
++    quiet_shutdown: c_int,
++    max_send_fragment: c_uint,
++
++    #[cfg(not(osslconf = "OPENSSL_NO_ENGINE"))]
++    client_cert_engine: *mut c_void,
++
++    tlsext_servername_callback: *mut c_void,
++    tlsect_servername_arg: *mut c_void,
++    tlsext_tick_key_name: [c_uchar; 16],
++    tlsext_tick_hmac_key: [c_uchar; 16],
++    tlsext_tick_aes_key: [c_uchar; 16],
++    tlsext_ticket_key_cb: *mut c_void,
++    tlsext_status_cb: *mut c_void,
++    tlsext_status_arg: *mut c_void,
++    tlsext_opaque_prf_input_callback: *mut c_void,
++    tlsext_opaque_prf_input_callback_arg: *mut c_void,
++
++    next_protos_advertised_cb: *mut c_void,
++    next_protos_advertised_cb_arg: *mut c_void,
++    next_proto_select_cb: *mut c_void,
++    next_proto_select_cb_arg: *mut c_void,
++
++    srtp_profiles: *mut c_void,
++}
++
++#[repr(C)]
++pub struct SSL_SESSION {
++    ssl_version: c_int,
++    pub master_key_length: c_int,
++    pub master_key: [c_uchar; 48],
++    session_id_length: c_uint,
++    session_id: [c_uchar; SSL_MAX_SSL_SESSION_ID_LENGTH as usize],
++    sid_ctx_length: c_uint,
++    sid_ctx: [c_uchar; SSL_MAX_SID_CTX_LENGTH as usize],
++    not_resumable: c_int,
++    sess_cert: *mut c_void,
++    peer: *mut X509,
++    verify_result: c_long,
++    timeout: c_long,
++    time: time_t,
++    pub references: c_int,
++    cipher: *const c_void,
++    cipher_id: c_ulong,
++    ciphers: *mut c_void,
++    ex_data: ::CRYPTO_EX_DATA,
++    prev: *mut c_void,
++    next: *mut c_void,
++    tlsext_hostname: *mut c_char,
++    tlsext_ecpointformatlist_length: size_t,
++    tlsext_ecpointformatlist: *mut u8,
++    tlsext_ellipticcurvelist_length: size_t,
++    tlsext_ellipticcurvelist: *mut u16,
++    tlsext_tick: *mut c_uchar,
++    tlsext_ticklen: size_t,
++    tlsext_tick_lifetime_hint: c_long,
++}
++
++#[repr(C)]
++pub struct X509_VERIFY_PARAM {
++    pub name: *mut c_char,
++    pub check_time: time_t,
++    pub inh_flags: c_ulong,
++    pub flags: c_ulong,
++    pub purpose: c_int,
++    pub trust: c_int,
++    pub depth: c_int,
++    pub policies: *mut stack_st_ASN1_OBJECT,
++    //pub id: *mut X509_VERIFY_PARAM_ID,
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7e7023ec590f7399e8cf571b19b8b26840abb025
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,89 @@@
++use libc::{c_int, c_char, c_void, c_long, c_uchar, size_t, c_uint, c_ulong, time_t};
++
++use super::*;
++
++#[repr(C)]
++pub struct SSL {
++    version: c_int,
++    method: *const ::SSL_METHOD,
++    rbio: *mut ::BIO,
++    wbio: *mut ::BIO,
++    bbio: *mut ::BIO,
++    pub server: c_int,
++    s3: *mut c_void,
++    d1: *mut c_void,
++    param: *mut c_void,
++    cipher_list: *mut stack_st_SSL_CIPHER,
++    cert: *mut c_void,
++    sid_ctx_length: c_uint,
++    sid_ctx: [c_uchar; ::SSL_MAX_SID_CTX_LENGTH as usize],
++    session: *mut ::SSL_SESSION,
++    verify_mode: c_int,
++    error: c_int,
++    error_code: c_int,
++    ctx: *mut ::SSL_CTX,
++    verify_result: c_long,
++    references: c_int,
++    client_version: c_int,
++    max_send_fragment: c_uint,
++    tlsext_hostname: *mut c_char,
++    tlsext_status_type: c_int,
++    initial_ctx: *mut ::SSL_CTX,
++    enc_read_ctx: *mut ::EVP_CIPHER_CTX,
++    read_hash: *mut EVP_MD_CTX,
++    internal: *mut c_void,
++}
++
++#[repr(C)]
++pub struct SSL_CTX {
++    method: *const ::SSL_METHOD,
++    cipher_list: *mut stack_st_SSL_CIPHER,
++    cert_store: *mut c_void,
++    session_timeout: c_long,
++    pub references: c_int,
++    extra_certs: *mut stack_st_X509,
++    verify_mode: c_int,
++    sid_ctx_length: c_uint,
++    sid_ctx: [c_uchar; ::SSL_MAX_SID_CTX_LENGTH as usize],
++    param: *mut ::X509_VERIFY_PARAM,
++    default_passwd_callback: *mut c_void,
++    default_passwd_callback_userdata: *mut c_void,
++    internal: *mut c_void,
++}
++
++#[repr(C)]
++pub struct SSL_SESSION {
++    ssl_version: c_int,
++    pub master_key_length: c_int,
++    pub master_key: [c_uchar; 48],
++    session_id_length: c_uint,
++    session_id: [c_uchar; ::SSL_MAX_SSL_SESSION_ID_LENGTH as usize],
++    sid_ctx_length: c_uint,
++    sid_ctx: [c_uchar; ::SSL_MAX_SID_CTX_LENGTH as usize],
++    peer: *mut ::X509,
++    verify_result: c_long,
++    timeout: c_long,
++    time: time_t,
++    pub references: c_int,
++    cipher: *const ::SSL_CIPHER,
++    cipher_id: c_long,
++    ciphers: *mut stack_st_SSL_CIPHER,
++    tlsext_hostname: *mut c_char,
++    tlsext_tick: *mut c_uchar,
++    tlsext_ticklen: size_t,
++    tlsext_tick_lifetime_int: c_long,
++    internal: *mut c_void,
++}
++
++#[repr(C)]
++pub struct X509_VERIFY_PARAM {
++    pub name: *mut c_char,
++    pub check_time: time_t,
++    pub inh_flags: c_ulong,
++    pub flags: c_ulong,
++    pub purpose: c_int,
++    pub trust: c_int,
++    pub depth: c_int,
++    policies: *mut stack_st_ASN1_OBJECT,
++    id: *mut c_void,
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a0fdb3963ab42f24dd9d0a893b5ff774c8b56f5c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,976 @@@
++use std::sync::{Mutex, MutexGuard};
++use std::sync::{Once, ONCE_INIT};
++use std::mem;
++use std::ptr;
++
++use libc::{c_int, c_char, c_void, c_long, c_uchar, size_t, c_uint, c_ulong};
++#[cfg(not(ossl101))]
++use libc::time_t;
++
++#[repr(C)]
++pub struct stack_st_ASN1_OBJECT {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct stack_st_X509 {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct stack_st_X509_NAME {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct stack_st_X509_ATTRIBUTE {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct stack_st_X509_EXTENSION {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct stack_st_GENERAL_NAME {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct stack_st_void {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct stack_st_SSL_CIPHER {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct stack_st_OPENSSL_STRING {
++    pub stack: _STACK,
++}
++
++#[repr(C)]
++pub struct _STACK {
++    pub num: c_int,
++    pub data: *mut *mut c_char,
++    pub sorted: c_int,
++    pub num_alloc: c_int,
++    pub comp: Option<unsafe extern "C" fn(*const c_void, *const c_void) -> c_int>,
++}
++
++#[repr(C)]
++pub struct BIO_METHOD {
++    pub type_: c_int,
++    pub name: *const c_char,
++    pub bwrite: Option<unsafe extern "C" fn(*mut ::BIO, *const c_char, c_int) -> c_int>,
++    pub bread: Option<unsafe extern "C" fn(*mut ::BIO, *mut c_char, c_int) -> c_int>,
++    pub bputs: Option<unsafe extern "C" fn(*mut ::BIO, *const c_char) -> c_int>,
++    pub bgets: Option<unsafe extern "C" fn(*mut ::BIO, *mut c_char, c_int) -> c_int>,
++    pub ctrl: Option<unsafe extern "C" fn(*mut ::BIO, c_int, c_long, *mut c_void) -> c_long>,
++    pub create: Option<unsafe extern "C" fn(*mut ::BIO) -> c_int>,
++    pub destroy: Option<unsafe extern "C" fn(*mut ::BIO) -> c_int>,
++    pub callback_ctrl: Option<unsafe extern "C" fn(*mut ::BIO, c_int, ::bio_info_cb) -> c_long>,
++}
++
++#[repr(C)]
++pub struct RSA {
++    pub pad: c_int,
++    pub version: c_long,
++    pub meth: *const ::RSA_METHOD,
++
++    pub engine: *mut ::ENGINE,
++    pub n: *mut ::BIGNUM,
++    pub e: *mut ::BIGNUM,
++    pub d: *mut ::BIGNUM,
++    pub p: *mut ::BIGNUM,
++    pub q: *mut ::BIGNUM,
++    pub dmp1: *mut ::BIGNUM,
++    pub dmq1: *mut ::BIGNUM,
++    pub iqmp: *mut ::BIGNUM,
++
++    pub ex_data: ::CRYPTO_EX_DATA,
++    pub references: c_int,
++    pub flags: c_int,
++
++    pub _method_mod_n: *mut ::BN_MONT_CTX,
++    pub _method_mod_p: *mut ::BN_MONT_CTX,
++    pub _method_mod_q: *mut ::BN_MONT_CTX,
++
++    pub bignum_data: *mut c_char,
++    pub blinding: *mut ::BN_BLINDING,
++    pub mt_blinding: *mut ::BN_BLINDING,
++}
++
++#[repr(C)]
++pub struct DSA {
++    pub pad: c_int,
++    pub version: c_long,
++    pub write_params: c_int,
++
++    pub p: *mut ::BIGNUM,
++    pub q: *mut ::BIGNUM,
++    pub g: *mut ::BIGNUM,
++    pub pub_key: *mut ::BIGNUM,
++    pub priv_key: *mut ::BIGNUM,
++    pub kinv: *mut ::BIGNUM,
++    pub r: *mut ::BIGNUM,
++
++    pub flags: c_int,
++    pub method_mont_p: *mut ::BN_MONT_CTX,
++    pub references: c_int,
++    pub ex_data: ::CRYPTO_EX_DATA,
++    pub meth: *const ::DSA_METHOD,
++    pub engine: *mut ::ENGINE,
++}
++
++#[repr(C)]
++pub struct EVP_PKEY {
++    pub type_: c_int,
++    pub save_type: c_int,
++    pub references: c_int,
++    pub ameth: *const ::EVP_PKEY_ASN1_METHOD,
++    pub engine: *mut ::ENGINE,
++    pub pkey: *mut c_void,
++    pub save_parameters: c_int,
++    pub attributes: *mut stack_st_X509_ATTRIBUTE,
++}
++
++#[repr(C)]
++pub struct BIO {
++    pub method: *mut ::BIO_METHOD,
++    pub callback: Option<
++        unsafe extern "C" fn(*mut ::BIO,
++                             c_int,
++                             *const c_char,
++                             c_int,
++                             c_long,
++                             c_long)
++                             -> c_long,
++    >,
++    pub cb_arg: *mut c_char,
++    pub init: c_int,
++    pub shutdown: c_int,
++    pub flags: c_int,
++    pub retry_reason: c_int,
++    pub num: c_int,
++    pub ptr: *mut c_void,
++    pub next_bio: *mut ::BIO,
++    pub prev_bio: *mut ::BIO,
++    pub references: c_int,
++    pub num_read: c_ulong,
++    pub num_write: c_ulong,
++    pub ex_data: ::CRYPTO_EX_DATA,
++}
++
++#[repr(C)]
++pub struct CRYPTO_EX_DATA {
++    pub sk: *mut ::stack_st_void,
++    pub dummy: c_int,
++}
++
++#[repr(C)]
++pub struct EVP_MD_CTX {
++    digest: *mut ::EVP_MD,
++    engine: *mut ::ENGINE,
++    flags: c_ulong,
++    md_data: *mut c_void,
++    pctx: *mut ::EVP_PKEY_CTX,
++    update: *mut c_void,
++}
++
++#[repr(C)]
++pub struct EVP_CIPHER {
++    pub nid: c_int,
++    pub block_size: c_int,
++    pub key_len: c_int,
++    pub iv_len: c_int,
++    pub flags: c_ulong,
++    pub init: Option<
++        unsafe extern "C" fn(*mut ::EVP_CIPHER_CTX,
++                             *const c_uchar,
++                             *const c_uchar,
++                             c_int)
++                             -> c_int,
++    >,
++    pub do_cipher: Option<
++        unsafe extern "C" fn(*mut ::EVP_CIPHER_CTX,
++                             *mut c_uchar,
++                             *const c_uchar,
++                             size_t)
++                             -> c_int,
++    >,
++    pub cleanup: Option<unsafe extern "C" fn(*mut ::EVP_CIPHER_CTX) -> c_int>,
++    pub ctx_size: c_int,
++    pub set_asn1_parameters:
++        Option<unsafe extern "C" fn(*mut ::EVP_CIPHER_CTX, *mut ::ASN1_TYPE) -> c_int>,
++    pub get_asn1_parameters:
++        Option<unsafe extern "C" fn(*mut ::EVP_CIPHER_CTX, *mut ::ASN1_TYPE) -> c_int>,
++    pub ctrl:
++        Option<unsafe extern "C" fn(*mut ::EVP_CIPHER_CTX, c_int, c_int, *mut c_void) -> c_int>,
++    pub app_data: *mut c_void,
++}
++
++#[repr(C)]
++pub struct HMAC_CTX {
++    md: *mut ::EVP_MD,
++    md_ctx: ::EVP_MD_CTX,
++    i_ctx: ::EVP_MD_CTX,
++    o_ctx: ::EVP_MD_CTX,
++    key_length: c_uint,
++    key: [c_uchar; 128],
++}
++
++#[repr(C)]
++pub struct BIGNUM {
++    pub d: *mut ::BN_ULONG,
++    pub top: c_int,
++    pub dmax: c_int,
++    pub neg: c_int,
++    pub flags: c_int,
++}
++
++#[repr(C)]
++pub struct DH {
++    pub pad: c_int,
++    pub version: c_int,
++    pub p: *mut ::BIGNUM,
++    pub g: *mut ::BIGNUM,
++    pub length: c_long,
++    pub pub_key: *mut ::BIGNUM,
++    pub priv_key: *mut ::BIGNUM,
++    pub flags: c_int,
++    pub method_mont_p: *mut ::BN_MONT_CTX,
++    pub q: *mut ::BIGNUM,
++    pub j: *mut ::BIGNUM,
++    pub seed: *mut c_uchar,
++    pub seedlen: c_int,
++    pub counter: *mut ::BIGNUM,
++    pub references: c_int,
++    pub ex_data: ::CRYPTO_EX_DATA,
++    pub meth: *const ::DH_METHOD,
++    pub engine: *mut ::ENGINE,
++}
++
++#[repr(C)]
++pub struct X509 {
++    pub cert_info: *mut X509_CINF,
++    pub sig_alg: *mut ::X509_ALGOR,
++    pub signature: *mut ::ASN1_BIT_STRING,
++    pub valid: c_int,
++    pub references: c_int,
++    pub name: *mut c_char,
++    pub ex_data: ::CRYPTO_EX_DATA,
++    pub ex_pathlen: c_long,
++    pub ex_pcpathlen: c_long,
++    pub ex_flags: c_ulong,
++    pub ex_kusage: c_ulong,
++    pub ex_xkusage: c_ulong,
++    pub ex_nscert: c_ulong,
++    skid: *mut c_void,
++    akid: *mut c_void,
++    policy_cache: *mut c_void,
++    crldp: *mut c_void,
++    altname: *mut c_void,
++    nc: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_RFC3779"))]
++    rfc3779_addr: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_RFC3779"))]
++    rfc3779_asid: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_SHA"))]
++    sha1_hash: [c_uchar; 20],
++    aux: *mut c_void,
++}
++
++#[repr(C)]
++pub struct X509_CINF {
++    version: *mut c_void,
++    serialNumber: *mut c_void,
++    signature: *mut c_void,
++    issuer: *mut c_void,
++    pub validity: *mut X509_VAL,
++    subject: *mut c_void,
++    key: *mut c_void,
++    issuerUID: *mut c_void,
++    subjectUID: *mut c_void,
++    pub extensions: *mut stack_st_X509_EXTENSION,
++    enc: ASN1_ENCODING,
++}
++
++#[repr(C)]
++pub struct X509_ALGOR {
++    pub algorithm: *mut ::ASN1_OBJECT,
++    parameter: *mut c_void,
++}
++
++#[repr(C)]
++pub struct ASN1_ENCODING {
++    pub enc: *mut c_uchar,
++    pub len: c_long,
++    pub modified: c_int,
++}
++
++#[repr(C)]
++pub struct X509_VAL {
++    pub notBefore: *mut ::ASN1_TIME,
++    pub notAfter: *mut ::ASN1_TIME,
++}
++
++#[repr(C)]
++pub struct X509_REQ_INFO {
++    pub enc: ASN1_ENCODING,
++    pub version: *mut ::ASN1_INTEGER,
++    pub subject: *mut ::X509_NAME,
++    pubkey: *mut c_void,
++    pub attributes: *mut stack_st_X509_ATTRIBUTE,
++}
++
++#[repr(C)]
++pub struct X509_REQ {
++    pub req_info: *mut X509_REQ_INFO,
++    sig_alg: *mut c_void,
++    signature: *mut c_void,
++    references: c_int,
++}
++
++#[repr(C)]
++pub struct SSL {
++    version: c_int,
++    type_: c_int,
++    method: *const ::SSL_METHOD,
++    rbio: *mut c_void,
++    wbio: *mut c_void,
++    bbio: *mut c_void,
++    rwstate: c_int,
++    in_handshake: c_int,
++    handshake_func: Option<unsafe extern "C" fn(*mut SSL) -> c_int>,
++    pub server: c_int,
++    new_session: c_int,
++    quiet_session: c_int,
++    shutdown: c_int,
++    state: c_int,
++    rstate: c_int,
++    init_buf: *mut c_void,
++    init_msg: *mut c_void,
++    init_num: c_int,
++    init_off: c_int,
++    packet: *mut c_uchar,
++    packet_length: c_uint,
++    s2: *mut c_void,
++    s3: *mut c_void,
++    d1: *mut c_void,
++    read_ahead: c_int,
++    msg_callback: Option<
++        unsafe extern "C" fn(c_int,
++                             c_int,
++                             c_int,
++                             *const c_void,
++                             size_t,
++                             *mut SSL,
++                             *mut c_void),
++    >,
++    msg_callback_arg: *mut c_void,
++    hit: c_int,
++    param: *mut c_void,
++    cipher_list: *mut stack_st_SSL_CIPHER,
++    cipher_list_by_id: *mut stack_st_SSL_CIPHER,
++    mac_flags: c_int,
++    enc_read_ctx: *mut ::EVP_CIPHER_CTX,
++    read_hash: *mut ::EVP_MD_CTX,
++    expand: *mut c_void,
++    enc_write_ctx: *mut ::EVP_CIPHER_CTX,
++    write_hash: *mut ::EVP_MD_CTX,
++    compress: *mut c_void,
++    cert: *mut c_void,
++    sid_ctx_length: c_uint,
++    sid_ctx: [c_uchar; ::SSL_MAX_SID_CTX_LENGTH as usize],
++    session: *mut ::SSL_SESSION,
++    generate_session_id: ::GEN_SESSION_CB,
++    verify_mode: c_int,
++    verify_callback: Option<unsafe extern "C" fn(c_int, *mut ::X509_STORE_CTX) -> c_int>,
++    info_callback: Option<unsafe extern "C" fn(*mut SSL, c_int, c_int)>,
++    error: c_int,
++    error_code: c_int,
++    #[cfg(not(osslconf = "OPENSSL_NO_KRB5"))]
++    kssl_ctx: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_PSK"))]
++    psk_client_callback: Option<
++        unsafe extern "C" fn(*mut SSL,
++                             *const c_char,
++                             *mut c_char,
++                             c_uint,
++                             *mut c_uchar,
++                             c_uint)
++                             -> c_uint,
++    >,
++    #[cfg(not(osslconf = "OPENSSL_NO_PSK"))]
++    psk_server_callback:
++        Option<unsafe extern "C" fn(*mut SSL, *const c_char, *mut c_uchar, c_uint) -> c_uint>,
++    ctx: *mut ::SSL_CTX,
++    debug: c_int,
++    verify_result: c_long,
++    ex_data: ::CRYPTO_EX_DATA,
++    client_CA: *mut stack_st_X509_NAME,
++    references: c_int,
++    options: c_ulong,
++    mode: c_ulong,
++    max_cert_list: c_long,
++    first_packet: c_int,
++    client_version: c_int,
++    max_send_fragment: c_uint,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_debug_cb:
++        Option<unsafe extern "C" fn(*mut SSL, c_int, c_int, *mut c_uchar, c_int, *mut c_void)>,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_debug_arg: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_hostname: *mut c_char,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    servername_done: c_int,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_status_type: c_int,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_status_expected: c_int,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_ocsp_ids: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_ocsp_exts: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_ocsp_resp: *mut c_uchar,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_ocsp_resplen: c_int,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_ticket_expected: c_int,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC")))]
++    tlsext_ecpointformatlist_length: size_t,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC")))]
++    tlsext_ecpointformatlist: *mut c_uchar,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC")))]
++    tlsext_ellipticcurvelist_length: size_t,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC")))]
++    tlsext_ellipticcurvelist: *mut c_uchar,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_opaque_prf_input: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_opaque_prf_input_len: size_t,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_session_ticket: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_session_ticket_ext_cb: ::tls_session_ticket_ext_cb_fn,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tls_session_ticket_ext_cb_arg: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tls_session_secret_cb: ::tls_session_secret_cb_fn,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tls_session_secret_cb_arg: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    initial_ctx: *mut ::SSL_CTX,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_NEXTPROTONEG")))]
++    next_proto_negotiated: *mut c_uchar,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_NEXTPROTONEG")))]
++    next_proto_negotiated_len: c_uchar,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    srtp_profiles: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    srtp_profile: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_heartbeat: c_uint,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_hb_pending: c_uint,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_hb_seq: c_uint,
++    renegotiate: c_int,
++    #[cfg(not(osslconf = "OPENSSL_NO_SRP"))]
++    srp_ctx: ::SRP_CTX,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))]
++    alpn_client_proto_list: *mut c_uchar,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))]
++    alpn_client_proto_list_len: c_uint,
++}
++
++#[repr(C)]
++pub struct SSL_CTX {
++    method: *mut c_void,
++    cipher_list: *mut c_void,
++    cipher_list_by_id: *mut c_void,
++    cert_store: *mut c_void,
++    sessions: *mut c_void,
++    session_cache_size: c_ulong,
++    session_cache_head: *mut c_void,
++    session_cache_tail: *mut c_void,
++    session_cache_mode: c_int,
++    session_timeout: c_long,
++    new_session_cb: *mut c_void,
++    remove_session_cb: *mut c_void,
++    get_session_cb: *mut c_void,
++    stats: [c_int; 11],
++    pub references: c_int,
++    app_verify_callback: *mut c_void,
++    app_verify_arg: *mut c_void,
++    default_passwd_callback: *mut c_void,
++    default_passwd_callback_userdata: *mut c_void,
++    client_cert_cb: *mut c_void,
++    app_gen_cookie_cb: *mut c_void,
++    app_verify_cookie_cb: *mut c_void,
++    ex_dat: ::CRYPTO_EX_DATA,
++    rsa_md5: *mut c_void,
++    md5: *mut c_void,
++    sha1: *mut c_void,
++    extra_certs: *mut c_void,
++    comp_methods: *mut c_void,
++    info_callback: *mut c_void,
++    client_CA: *mut c_void,
++    options: c_ulong,
++    mode: c_ulong,
++    max_cert_list: c_long,
++    cert: *mut c_void,
++    read_ahead: c_int,
++    msg_callback: *mut c_void,
++    msg_callback_arg: *mut c_void,
++    verify_mode: c_int,
++    sid_ctx_length: c_uint,
++    sid_ctx: [c_uchar; 32],
++    default_verify_callback: *mut c_void,
++    generate_session_id: *mut c_void,
++    param: *mut c_void,
++    quiet_shutdown: c_int,
++    max_send_fragment: c_uint,
++
++    #[cfg(not(osslconf = "OPENSSL_NO_ENGINE"))]
++    client_cert_engine: *mut c_void,
++
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_servername_callback: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsect_servername_arg: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_tick_key_name: [c_uchar; 16],
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_tick_hmac_key: [c_uchar; 16],
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_tick_aes_key: [c_uchar; 16],
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_ticket_key_cb: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_status_cb: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_status_arg: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_opaque_prf_input_callback: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_opaque_prf_input_callback_arg: *mut c_void,
++
++    #[cfg(not(osslconf = "OPENSSL_NO_PSK"))]
++    psk_identity_hint: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_PSK"))]
++    psk_client_callback: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_PSK"))]
++    psk_server_callback: *mut c_void,
++
++    #[cfg(not(osslconf = "OPENSSL_NO_BUF_FREELISTS"))]
++    freelist_max_len: c_uint,
++    #[cfg(not(osslconf = "OPENSSL_NO_BUF_FREELISTS"))]
++    wbuf_freelist: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_BUF_FREELISTS"))]
++    rbuf_freelist: *mut c_void,
++
++    #[cfg(not(osslconf = "OPENSSL_NO_SRP"))]
++    srp_ctx: SRP_CTX,
++
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_NEXTPROTONEG")))]
++    next_protos_advertised_cb: *mut c_void,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_NEXTPROTONEG")))]
++    next_protos_advertised_cb_arg: *mut c_void,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_NEXTPROTONEG")))]
++    next_proto_select_cb: *mut c_void,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_NEXTPROTONEG")))]
++    next_proto_select_cb_arg: *mut c_void,
++
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl101))]
++    srtp_profiles: *mut c_void,
++
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))]
++    srtp_profiles: *mut c_void,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))]
++    alpn_select_cb: *mut c_void,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))]
++    alpn_select_cb_arg: *mut c_void,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))]
++    alpn_client_proto_list: *mut c_void,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))]
++    alpn_client_proto_list_len: c_uint,
++
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC"), ossl102))]
++    tlsext_ecpointformatlist_length: size_t,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC"), ossl102))]
++    tlsext_ecpointformatlist: *mut c_uchar,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC"), ossl102))]
++    tlsext_ellipticcurvelist_length: size_t,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC"), ossl102))]
++    tlsext_ellipticcurvelist: *mut c_uchar,
++}
++
++#[repr(C)]
++pub struct SSL_SESSION {
++    ssl_version: c_int,
++    key_arg_length: c_uint,
++    key_arg: [c_uchar; SSL_MAX_KEY_ARG_LENGTH as usize],
++    pub master_key_length: c_int,
++    pub master_key: [c_uchar; 48],
++    session_id_length: c_uint,
++    session_id: [c_uchar; SSL_MAX_SSL_SESSION_ID_LENGTH as usize],
++    sid_ctx_length: c_uint,
++    sid_ctx: [c_uchar; SSL_MAX_SID_CTX_LENGTH as usize],
++    #[cfg(not(osslconf = "OPENSSL_NO_KRB5"))]
++    krb5_client_princ_len: c_uint,
++    #[cfg(not(osslconf = "OPENSSL_NO_KRB5"))]
++    krb5_client_princ: [c_uchar; SSL_MAX_KRB5_PRINCIPAL_LENGTH as usize],
++    #[cfg(not(osslconf = "OPENSSL_NO_PSK"))]
++    psk_identity_hint: *mut c_char,
++    #[cfg(not(osslconf = "OPENSSL_NO_PSK"))]
++    psk_identity: *mut c_char,
++    not_resumable: c_int,
++    sess_cert: *mut c_void,
++    peer: *mut X509,
++    verify_result: c_long,
++    pub references: c_int,
++    timeout: c_long,
++    time: c_long,
++    compress_meth: c_uint,
++    cipher: *const c_void,
++    cipher_id: c_ulong,
++    ciphers: *mut c_void,
++    ex_data: ::CRYPTO_EX_DATA,
++    prev: *mut c_void,
++    next: *mut c_void,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_hostname: *mut c_char,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC")))]
++    tlsext_ecpointformatlist_length: size_t,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC")))]
++    tlsext_ecpointformatlist: *mut c_uchar,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC")))]
++    tlsext_ellipticcurvelist_length: size_t,
++    #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC")))]
++    tlsext_ellipticcurvelist: *mut c_uchar,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_tick: *mut c_uchar,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_ticklen: size_t,
++    #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))]
++    tlsext_tick_lifetime_hint: c_long,
++    #[cfg(not(osslconf = "OPENSSL_NO_SRP"))]
++    srp_username: *mut c_char,
++}
++
++#[repr(C)]
++pub struct SRP_CTX {
++    SRP_cb_arg: *mut c_void,
++    TLS_ext_srp_username_callback: *mut c_void,
++    SRP_verify_param_callback: *mut c_void,
++    SRP_give_srp_client_pwd_callback: *mut c_void,
++    login: *mut c_void,
++    N: *mut c_void,
++    g: *mut c_void,
++    s: *mut c_void,
++    B: *mut c_void,
++    A: *mut c_void,
++    a: *mut c_void,
++    b: *mut c_void,
++    v: *mut c_void,
++    info: *mut c_void,
++    stringth: c_int,
++    srp_Mask: c_ulong,
++}
++
++#[repr(C)]
++#[cfg(not(ossl101))]
++pub struct X509_VERIFY_PARAM {
++    pub name: *mut c_char,
++    pub check_time: time_t,
++    pub inh_flags: c_ulong,
++    pub flags: c_ulong,
++    pub purpose: c_int,
++    pub trust: c_int,
++    pub depth: c_int,
++    pub policies: *mut stack_st_ASN1_OBJECT,
++    pub id: *mut X509_VERIFY_PARAM_ID,
++}
++
++#[cfg(not(ossl101))]
++pub enum X509_VERIFY_PARAM_ID {}
++pub enum PKCS12 {}
++
++pub const SSL_CTRL_GET_SESSION_REUSED: c_int = 8;
++pub const SSL_CTRL_OPTIONS: c_int = 32;
++pub const SSL_CTRL_CLEAR_OPTIONS: c_int = 77;
++#[cfg(ossl102)]
++pub const SSL_CTRL_SET_ECDH_AUTO: c_int = 94;
++
++pub const SSL_OP_MICROSOFT_SESS_ID_BUG: c_ulong = 0x00000001;
++pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: c_ulong = 0x00000002;
++pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: c_ulong = 0x00000008;
++pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: c_ulong = 0x00000020;
++pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: c_ulong = 0x00000080;
++pub const SSL_OP_TLS_D5_BUG: c_ulong = 0x00000100;
++pub const SSL_OP_TLS_BLOCK_PADDING_BUG: c_ulong = 0x00000200;
++pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x00080000;
++pub const SSL_OP_SINGLE_DH_USE: c_ulong = 0x00100000;
++pub const SSL_OP_NO_SSLv2: c_ulong = 0x01000000;
++
++pub const SSL_MAX_SSL_SESSION_ID_LENGTH: c_int = 32;
++pub const SSL_MAX_SID_CTX_LENGTH: c_int = 32;
++pub const SSL_MAX_KEY_ARG_LENGTH: c_int = 8;
++pub const SSL_MAX_MASTER_KEY_LENGTH: c_int = 48;
++pub const SSL_MAX_KRB5_PRINCIPAL_LENGTH: c_int = 256;
++
++pub const SSLEAY_VERSION: c_int = 0;
++pub const SSLEAY_CFLAGS: c_int = 2;
++pub const SSLEAY_BUILT_ON: c_int = 3;
++pub const SSLEAY_PLATFORM: c_int = 4;
++pub const SSLEAY_DIR: c_int = 5;
++
++pub const CRYPTO_LOCK_X509: c_int = 3;
++pub const CRYPTO_LOCK_SSL_CTX: c_int = 12;
++pub const CRYPTO_LOCK_SSL_SESSION: c_int = 14;
++
++static mut MUTEXES: *mut Vec<Mutex<()>> = 0 as *mut Vec<Mutex<()>>;
++static mut GUARDS: *mut Vec<Option<MutexGuard<'static, ()>>> = 0 as
++    *mut Vec<Option<MutexGuard<'static, ()>>>;
++
++unsafe extern "C" fn locking_function(mode: c_int, n: c_int, _file: *const c_char, _line: c_int) {
++    let mutex = &(*MUTEXES)[n as usize];
++
++    if mode & ::CRYPTO_LOCK != 0 {
++        (*GUARDS)[n as usize] = Some(mutex.lock().unwrap());
++    } else {
++        &(*GUARDS)[n as usize].take().expect("lock already unlocked");
++    }
++}
++
++pub fn init() {
++    static INIT: Once = ONCE_INIT;
++
++    INIT.call_once(|| unsafe {
++        SSL_library_init();
++        SSL_load_error_strings();
++        OPENSSL_add_all_algorithms_noconf();
++
++        let num_locks = ::CRYPTO_num_locks();
++        let mut mutexes = Box::new(Vec::new());
++        for _ in 0..num_locks {
++            mutexes.push(Mutex::new(()));
++        }
++        MUTEXES = mem::transmute(mutexes);
++        let guards: Box<Vec<Option<MutexGuard<()>>>> =
++            Box::new((0..num_locks).map(|_| None).collect());
++        GUARDS = mem::transmute(guards);
++
++        CRYPTO_set_locking_callback(locking_function);
++        set_id_callback();
++    })
++}
++
++#[cfg(unix)]
++fn set_id_callback() {
++    unsafe extern "C" fn thread_id() -> c_ulong {
++        ::libc::pthread_self() as c_ulong
++    }
++
++    unsafe {
++        CRYPTO_set_id_callback(thread_id);
++    }
++}
++
++#[cfg(not(unix))]
++fn set_id_callback() {}
++
++// macros
++
++#[cfg(ossl102)]
++pub unsafe fn SSL_CTX_set_ecdh_auto(ctx: *mut SSL_CTX, onoff: c_int) -> c_int {
++    ::SSL_CTX_ctrl(
++        ctx,
++        SSL_CTRL_SET_ECDH_AUTO,
++        onoff as c_long,
++        ptr::null_mut(),
++    ) as c_int
++}
++
++#[cfg(ossl102)]
++pub unsafe fn SSL_set_ecdh_auto(ssl: *mut ::SSL, onoff: c_int) -> c_int {
++    ::SSL_ctrl(
++        ssl,
++        SSL_CTRL_SET_ECDH_AUTO,
++        onoff as c_long,
++        ptr::null_mut(),
++    ) as c_int
++}
++
++pub unsafe fn SSL_session_reused(ssl: *mut ::SSL) -> c_int {
++    ::SSL_ctrl(ssl, SSL_CTRL_GET_SESSION_REUSED, 0, ptr::null_mut()) as c_int
++}
++
++extern "C" {
++    pub fn BIO_new(type_: *mut BIO_METHOD) -> *mut BIO;
++    pub fn BIO_s_file() -> *mut BIO_METHOD;
++    pub fn BIO_s_mem() -> *mut BIO_METHOD;
++
++    pub fn get_rfc2409_prime_768(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn get_rfc2409_prime_1024(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn get_rfc3526_prime_1536(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn get_rfc3526_prime_2048(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn get_rfc3526_prime_3072(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn get_rfc3526_prime_4096(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn get_rfc3526_prime_6144(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn get_rfc3526_prime_8192(bn: *mut BIGNUM) -> *mut BIGNUM;
++
++    pub fn CRYPTO_malloc(num: c_int, file: *const c_char, line: c_int) -> *mut c_void;
++    pub fn CRYPTO_free(buf: *mut c_void);
++    pub fn CRYPTO_num_locks() -> c_int;
++    pub fn CRYPTO_set_locking_callback(
++        func: unsafe extern "C" fn(mode: c_int, n: c_int, file: *const c_char, line: c_int),
++    );
++    pub fn CRYPTO_set_id_callback(func: unsafe extern "C" fn() -> c_ulong);
++
++    pub fn ERR_load_crypto_strings();
++
++    pub fn RSA_generate_key(
++        modsz: c_int,
++        e: c_ulong,
++        cb: Option<extern "C" fn(c_int, c_int, *mut c_void)>,
++        cbarg: *mut c_void,
++    ) -> *mut RSA;
++
++    pub fn OCSP_cert_to_id(
++        dgst: *const ::EVP_MD,
++        subject: *mut ::X509,
++        issuer: *mut ::X509,
++    ) -> *mut ::OCSP_CERTID;
++
++    pub fn PKCS12_create(
++        pass: *mut c_char,
++        friendly_name: *mut c_char,
++        pkey: *mut EVP_PKEY,
++        cert: *mut X509,
++        ca: *mut stack_st_X509,
++        nid_key: c_int,
++        nid_cert: c_int,
++        iter: c_int,
++        mac_iter: c_int,
++        keytype: c_int,
++    ) -> *mut PKCS12;
++
++    pub fn SSL_library_init() -> c_int;
++    pub fn SSL_load_error_strings();
++    pub fn OPENSSL_add_all_algorithms_noconf();
++    pub fn HMAC_CTX_init(ctx: *mut ::HMAC_CTX);
++    pub fn HMAC_CTX_cleanup(ctx: *mut ::HMAC_CTX);
++    #[cfg(not(osslconf = "OPENSSL_NO_SSL3_METHOD"))]
++    pub fn SSLv3_method() -> *const ::SSL_METHOD;
++    pub fn TLSv1_method() -> *const ::SSL_METHOD;
++    pub fn SSLv23_method() -> *const ::SSL_METHOD;
++    pub fn TLSv1_1_method() -> *const ::SSL_METHOD;
++    pub fn TLSv1_2_method() -> *const ::SSL_METHOD;
++    pub fn DTLSv1_method() -> *const ::SSL_METHOD;
++    #[cfg(ossl102)]
++    pub fn DTLSv1_2_method() -> *const ::SSL_METHOD;
++    pub fn SSL_get_ex_new_index(
++        argl: c_long,
++        argp: *mut c_void,
++        new_func: Option<::CRYPTO_EX_new>,
++        dup_func: Option<::CRYPTO_EX_dup>,
++        free_func: Option<::CRYPTO_EX_free>,
++    ) -> c_int;
++    pub fn SSL_set_tmp_ecdh_callback(
++        ssl: *mut ::SSL,
++        ecdh: unsafe extern "C" fn(ssl: *mut ::SSL, is_export: c_int, keylength: c_int)
++                                   -> *mut ::EC_KEY,
++    );
++    pub fn SSL_CIPHER_get_version(cipher: *const ::SSL_CIPHER) -> *mut c_char;
++    pub fn SSL_CTX_get_ex_new_index(
++        argl: c_long,
++        argp: *mut c_void,
++        new_func: Option<::CRYPTO_EX_new>,
++        dup_func: Option<::CRYPTO_EX_dup>,
++        free_func: Option<::CRYPTO_EX_free>,
++    ) -> c_int;
++    pub fn SSL_CTX_set_tmp_ecdh_callback(
++        ctx: *mut ::SSL_CTX,
++        ecdh: unsafe extern "C" fn(ssl: *mut ::SSL, is_export: c_int, keylength: c_int)
++                                   -> *mut ::EC_KEY,
++    );
++    pub fn X509_get_subject_name(x: *mut ::X509) -> *mut ::X509_NAME;
++    pub fn X509_set_notAfter(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int;
++    pub fn X509_set_notBefore(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int;
++    pub fn X509_get_ext_d2i(
++        x: *mut ::X509,
++        nid: c_int,
++        crit: *mut c_int,
++        idx: *mut c_int,
++    ) -> *mut c_void;
++    pub fn X509_NAME_add_entry_by_NID(
++        x: *mut ::X509_NAME,
++        field: c_int,
++        ty: c_int,
++        bytes: *mut c_uchar,
++        len: c_int,
++        loc: c_int,
++        set: c_int,
++    ) -> c_int;
++    #[cfg(not(ossl101))]
++    pub fn X509_get0_signature(
++        psig: *mut *mut ::ASN1_BIT_STRING,
++        palg: *mut *mut ::X509_ALGOR,
++        x: *const ::X509,
++    );
++    #[cfg(not(ossl101))]
++    pub fn X509_get_signature_nid(x: *const X509) -> c_int;
++    #[cfg(not(ossl101))]
++    pub fn X509_ALGOR_get0(
++        paobj: *mut *mut ::ASN1_OBJECT,
++        pptype: *mut c_int,
++        ppval: *mut *mut c_void,
++        alg: *mut ::X509_ALGOR,
++    );
++    pub fn X509_NAME_get_entry(n: *mut ::X509_NAME, loc: c_int) -> *mut ::X509_NAME_ENTRY;
++    pub fn X509_NAME_ENTRY_get_data(ne: *mut ::X509_NAME_ENTRY) -> *mut ::ASN1_STRING;
++    pub fn X509_STORE_CTX_get_chain(ctx: *mut ::X509_STORE_CTX) -> *mut stack_st_X509;
++    pub fn X509V3_EXT_nconf_nid(
++        conf: *mut ::CONF,
++        ctx: *mut ::X509V3_CTX,
++        ext_nid: c_int,
++        value: *mut c_char,
++    ) -> *mut ::X509_EXTENSION;
++    pub fn X509V3_EXT_nconf(
++        conf: *mut ::CONF,
++        ctx: *mut ::X509V3_CTX,
++        name: *mut c_char,
++        value: *mut c_char,
++    ) -> *mut ::X509_EXTENSION;
++    pub fn ASN1_STRING_to_UTF8(out: *mut *mut c_uchar, s: *mut ::ASN1_STRING) -> c_int;
++    pub fn ASN1_STRING_data(x: *mut ::ASN1_STRING) -> *mut c_uchar;
++    pub fn CRYPTO_add_lock(
++        pointer: *mut c_int,
++        amount: c_int,
++        type_: c_int,
++        file: *const c_char,
++        line: c_int,
++    ) -> c_int;
++    pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX;
++    pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX);
++    pub fn EVP_PKEY_bits(key: *mut EVP_PKEY) -> c_int;
++
++    pub fn sk_new_null() -> *mut _STACK;
++    pub fn sk_num(st: *const _STACK) -> c_int;
++    pub fn sk_value(st: *const _STACK, n: c_int) -> *mut c_void;
++    pub fn sk_free(st: *mut _STACK);
++    pub fn sk_push(st: *mut _STACK, data: *mut c_void) -> c_int;
++    pub fn sk_pop_free(st: *mut _STACK, free: Option<unsafe extern "C" fn(*mut c_void)>);
++    pub fn sk_pop(st: *mut _STACK) -> *mut c_void;
++
++    pub fn SSLeay() -> c_ulong;
++    pub fn SSLeay_version(key: c_int) -> *const c_char;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ff1e0c7cac8dfd22bb2e7556a4f307205d577428
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,285 @@@
++use libc::{c_int, c_void, c_char, c_uchar, c_ulong, c_long, c_uint, size_t};
++use std::sync::{Once, ONCE_INIT};
++use std::ptr;
++
++pub enum BIGNUM {}
++pub enum BIO {}
++pub enum BIO_METHOD {}
++pub enum CRYPTO_EX_DATA {}
++pub enum DH {}
++pub enum DSA {}
++pub enum EVP_CIPHER {}
++pub enum EVP_MD_CTX {}
++pub enum EVP_PKEY {}
++pub enum HMAC_CTX {}
++pub enum OPENSSL_STACK {}
++pub enum PKCS12 {}
++pub enum RSA {}
++pub enum SSL {}
++pub enum SSL_CTX {}
++pub enum SSL_SESSION {}
++pub enum stack_st_ASN1_OBJECT {}
++pub enum stack_st_GENERAL_NAME {}
++pub enum stack_st_OPENSSL_STRING {}
++pub enum stack_st_void {}
++pub enum stack_st_X509 {}
++pub enum stack_st_X509_NAME {}
++pub enum stack_st_X509_ATTRIBUTE {}
++pub enum stack_st_X509_EXTENSION {}
++pub enum stack_st_SSL_CIPHER {}
++pub enum OPENSSL_INIT_SETTINGS {}
++pub enum X509 {}
++pub enum X509_ALGOR {}
++pub enum X509_VERIFY_PARAM {}
++pub enum X509_REQ {}
++
++pub const SSL_OP_MICROSOFT_SESS_ID_BUG: c_ulong = 0x00000000;
++pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: c_ulong = 0x00000000;
++pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: c_ulong = 0x00000000;
++pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: c_ulong = 0x00000000;
++pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: c_ulong = 0x00000000;
++pub const SSL_OP_TLS_D5_BUG: c_ulong = 0x00000000;
++pub const SSL_OP_TLS_BLOCK_PADDING_BUG: c_ulong = 0x00000000;
++pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x00000000;
++pub const SSL_OP_SINGLE_DH_USE: c_ulong = 0x00000000;
++pub const SSL_OP_NO_SSLv2: c_ulong = 0x00000000;
++
++pub const OPENSSL_VERSION: c_int = 0;
++pub const OPENSSL_CFLAGS: c_int = 1;
++pub const OPENSSL_BUILT_ON: c_int = 2;
++pub const OPENSSL_PLATFORM: c_int = 3;
++pub const OPENSSL_DIR: c_int = 4;
++
++pub const CRYPTO_EX_INDEX_SSL: c_int = 0;
++pub const CRYPTO_EX_INDEX_SSL_CTX: c_int = 1;
++
++pub const OPENSSL_INIT_LOAD_SSL_STRINGS: u64 = 0x00200000;
++
++pub const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT: c_uint = 0x20;
++
++pub fn init() {
++    // explicitly initialize to work around https://github.com/openssl/openssl/issues/3505
++    static INIT: Once = ONCE_INIT;
++
++    INIT.call_once(|| unsafe {
++        OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, ptr::null_mut());
++    })
++}
++
++extern "C" {
++    pub fn BIO_new(type_: *const BIO_METHOD) -> *mut BIO;
++    pub fn BIO_s_file() -> *const BIO_METHOD;
++    pub fn BIO_s_mem() -> *const BIO_METHOD;
++
++    pub fn BN_get_rfc2409_prime_768(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn BN_get_rfc2409_prime_1024(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn BN_get_rfc3526_prime_1536(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn BN_get_rfc3526_prime_2048(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn BN_get_rfc3526_prime_3072(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn BN_get_rfc3526_prime_4096(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn BN_get_rfc3526_prime_6144(bn: *mut BIGNUM) -> *mut BIGNUM;
++    pub fn BN_get_rfc3526_prime_8192(bn: *mut BIGNUM) -> *mut BIGNUM;
++
++    pub fn CRYPTO_malloc(num: size_t, file: *const c_char, line: c_int) -> *mut c_void;
++    pub fn CRYPTO_free(buf: *mut c_void, file: *const c_char, line: c_int);
++
++    pub fn EVP_chacha20() -> *const ::EVP_CIPHER;
++    pub fn EVP_chacha20_poly1305() -> *const ::EVP_CIPHER;
++
++    pub fn HMAC_CTX_new() -> *mut HMAC_CTX;
++    pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX);
++
++    pub fn OCSP_cert_to_id(
++        dgst: *const ::EVP_MD,
++        subject: *const ::X509,
++        issuer: *const ::X509,
++    ) -> *mut ::OCSP_CERTID;
++
++    pub fn TLS_method() -> *const ::SSL_METHOD;
++    pub fn DTLS_method() -> *const ::SSL_METHOD;
++    pub fn SSL_CIPHER_get_version(cipher: *const ::SSL_CIPHER) -> *const c_char;
++    pub fn X509_get_subject_name(x: *const ::X509) -> *mut ::X509_NAME;
++    pub fn X509_set1_notAfter(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int;
++    pub fn X509_set1_notBefore(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int;
++    pub fn X509_get_ext_d2i(
++        x: *const ::X509,
++        nid: c_int,
++        crit: *mut c_int,
++        idx: *mut c_int,
++    ) -> *mut c_void;
++    pub fn X509_NAME_add_entry_by_NID(
++        x: *mut ::X509_NAME,
++        field: c_int,
++        ty: c_int,
++        bytes: *const c_uchar,
++        len: c_int,
++        loc: c_int,
++        set: c_int,
++    ) -> c_int;
++    pub fn X509_get_signature_nid(x: *const X509) -> c_int;
++    pub fn X509_ALGOR_get0(
++        paobj: *mut *const ::ASN1_OBJECT,
++        pptype: *mut c_int,
++        ppval: *mut *const c_void,
++        alg: *const ::X509_ALGOR,
++    );
++    pub fn X509_NAME_get_entry(n: *const ::X509_NAME, loc: c_int) -> *mut ::X509_NAME_ENTRY;
++    pub fn X509_NAME_ENTRY_get_data(ne: *const ::X509_NAME_ENTRY) -> *mut ::ASN1_STRING;
++    pub fn X509V3_EXT_nconf_nid(
++        conf: *mut ::CONF,
++        ctx: *mut ::X509V3_CTX,
++        ext_nid: c_int,
++        value: *const c_char,
++    ) -> *mut ::X509_EXTENSION;
++    pub fn X509V3_EXT_nconf(
++        conf: *mut ::CONF,
++        ctx: *mut ::X509V3_CTX,
++        name: *const c_char,
++        value: *const c_char,
++    ) -> *mut ::X509_EXTENSION;
++    pub fn ASN1_STRING_to_UTF8(out: *mut *mut c_uchar, s: *const ::ASN1_STRING) -> c_int;
++    pub fn BN_is_negative(b: *const ::BIGNUM) -> c_int;
++    pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> c_int;
++    pub fn EVP_CIPHER_block_size(cipher: *const EVP_CIPHER) -> c_int;
++    pub fn EVP_CIPHER_iv_length(cipher: *const EVP_CIPHER) -> c_int;
++    pub fn EVP_PBE_scrypt(
++        pass: *const c_char,
++        passlen: size_t,
++        salt: *const c_uchar,
++        saltlen: size_t,
++        N: u64,
++        r: u64,
++        p: u64,
++        maxmem: u64,
++        key: *mut c_uchar,
++        keylen: size_t,
++    ) -> c_int;
++    pub fn DSA_get0_pqg(
++        d: *const ::DSA,
++        p: *mut *const ::BIGNUM,
++        q: *mut *const ::BIGNUM,
++        q: *mut *const ::BIGNUM,
++    );
++    pub fn DSA_get0_key(
++        d: *const ::DSA,
++        pub_key: *mut *const ::BIGNUM,
++        priv_key: *mut *const ::BIGNUM,
++    );
++    pub fn RSA_get0_key(
++        r: *const ::RSA,
++        n: *mut *const ::BIGNUM,
++        e: *mut *const ::BIGNUM,
++        d: *mut *const ::BIGNUM,
++    );
++    pub fn RSA_get0_factors(r: *const ::RSA, p: *mut *const ::BIGNUM, q: *mut *const ::BIGNUM);
++    pub fn RSA_set0_key(
++        r: *mut ::RSA,
++        n: *mut ::BIGNUM,
++        e: *mut ::BIGNUM,
++        d: *mut ::BIGNUM,
++    ) -> c_int;
++    pub fn RSA_set0_factors(r: *mut ::RSA, p: *mut ::BIGNUM, q: *mut ::BIGNUM) -> c_int;
++    pub fn RSA_set0_crt_params(
++        r: *mut ::RSA,
++        dmp1: *mut ::BIGNUM,
++        dmq1: *mut ::BIGNUM,
++        iqmp: *mut ::BIGNUM,
++    ) -> c_int;
++    pub fn ASN1_STRING_get0_data(x: *const ::ASN1_STRING) -> *const c_uchar;
++    pub fn OPENSSL_sk_num(stack: *const ::OPENSSL_STACK) -> c_int;
++    pub fn OPENSSL_sk_value(stack: *const ::OPENSSL_STACK, idx: c_int) -> *mut c_void;
++    pub fn SSL_CTX_get_options(ctx: *const ::SSL_CTX) -> c_ulong;
++    pub fn SSL_CTX_set_options(ctx: *mut ::SSL_CTX, op: c_ulong) -> c_ulong;
++    pub fn SSL_CTX_clear_options(ctx: *mut ::SSL_CTX, op: c_ulong) -> c_ulong;
++    pub fn X509_getm_notAfter(x: *const ::X509) -> *mut ::ASN1_TIME;
++    pub fn X509_getm_notBefore(x: *const ::X509) -> *mut ::ASN1_TIME;
++    pub fn X509_get0_signature(
++        psig: *mut *const ::ASN1_BIT_STRING,
++        palg: *mut *const ::X509_ALGOR,
++        x: *const ::X509,
++    );
++    pub fn DH_set0_pqg(
++        dh: *mut ::DH,
++        p: *mut ::BIGNUM,
++        q: *mut ::BIGNUM,
++        g: *mut ::BIGNUM,
++    ) -> c_int;
++    pub fn BIO_set_init(a: *mut ::BIO, init: c_int);
++    pub fn BIO_set_data(a: *mut ::BIO, data: *mut c_void);
++    pub fn BIO_get_data(a: *mut ::BIO) -> *mut c_void;
++    pub fn BIO_meth_new(type_: c_int, name: *const c_char) -> *mut ::BIO_METHOD;
++    pub fn BIO_meth_free(biom: *mut ::BIO_METHOD);
++    pub fn BIO_meth_set_write(
++        biom: *mut ::BIO_METHOD,
++        write: unsafe extern "C" fn(*mut ::BIO, *const c_char, c_int) -> c_int,
++    ) -> c_int;
++    pub fn BIO_meth_set_read(
++        biom: *mut ::BIO_METHOD,
++        read: unsafe extern "C" fn(*mut ::BIO, *mut c_char, c_int) -> c_int,
++    ) -> c_int;
++    pub fn BIO_meth_set_puts(
++        biom: *mut ::BIO_METHOD,
++        read: unsafe extern "C" fn(*mut ::BIO, *const c_char) -> c_int,
++    ) -> c_int;
++    pub fn BIO_meth_set_ctrl(
++        biom: *mut ::BIO_METHOD,
++        read: unsafe extern "C" fn(*mut ::BIO, c_int, c_long, *mut c_void) -> c_long,
++    ) -> c_int;
++    pub fn BIO_meth_set_create(
++        biom: *mut ::BIO_METHOD,
++        create: unsafe extern "C" fn(*mut ::BIO) -> c_int,
++    ) -> c_int;
++    pub fn BIO_meth_set_destroy(
++        biom: *mut ::BIO_METHOD,
++        destroy: unsafe extern "C" fn(*mut ::BIO) -> c_int,
++    ) -> c_int;
++    pub fn CRYPTO_get_ex_new_index(
++        class_index: c_int,
++        argl: c_long,
++        argp: *mut c_void,
++        new_func: Option<::CRYPTO_EX_new>,
++        dup_func: Option<::CRYPTO_EX_dup>,
++        free_func: Option<::CRYPTO_EX_free>,
++    ) -> c_int;
++    pub fn X509_up_ref(x: *mut X509) -> c_int;
++    pub fn SSL_CTX_up_ref(x: *mut SSL_CTX) -> c_int;
++    pub fn SSL_session_reused(ssl: *mut SSL) -> c_int;
++    pub fn SSL_SESSION_get_master_key(
++        session: *const SSL_SESSION,
++        out: *mut c_uchar,
++        outlen: size_t,
++    ) -> size_t;
++    pub fn SSL_SESSION_up_ref(ses: *mut SSL_SESSION) -> c_int;
++    pub fn X509_get0_extensions(req: *const ::X509) -> *const stack_st_X509_EXTENSION;
++    pub fn X509_STORE_CTX_get0_chain(ctx: *mut ::X509_STORE_CTX) -> *mut stack_st_X509;
++    pub fn EVP_MD_CTX_new() -> *mut EVP_MD_CTX;
++    pub fn EVP_MD_CTX_free(ctx: *mut EVP_MD_CTX);
++    pub fn EVP_PKEY_bits(key: *const EVP_PKEY) -> c_int;
++
++    pub fn OpenSSL_version_num() -> c_ulong;
++    pub fn OpenSSL_version(key: c_int) -> *const c_char;
++    pub fn OPENSSL_init_ssl(opts: u64, settings: *const OPENSSL_INIT_SETTINGS) -> c_int;
++    pub fn OPENSSL_sk_new_null() -> *mut ::OPENSSL_STACK;
++    pub fn OPENSSL_sk_free(st: *mut ::OPENSSL_STACK);
++    pub fn OPENSSL_sk_pop_free(
++        st: *mut ::OPENSSL_STACK,
++        free: Option<unsafe extern "C" fn(*mut c_void)>,
++    );
++    pub fn OPENSSL_sk_push(st: *mut ::OPENSSL_STACK, data: *const c_void) -> c_int;
++    pub fn OPENSSL_sk_pop(st: *mut ::OPENSSL_STACK) -> *mut c_void;
++
++    pub fn PKCS12_create(
++        pass: *const c_char,
++        friendly_name: *const c_char,
++        pkey: *mut EVP_PKEY,
++        cert: *mut X509,
++        ca: *mut stack_st_X509,
++        nid_key: c_int,
++        nid_cert: c_int,
++        iter: c_int,
++        mac_iter: c_int,
++        keytype: c_int,
++    ) -> *mut PKCS12;
++    pub fn X509_REQ_get_version(req: *const X509_REQ) -> c_long;
++    pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut ::X509_NAME;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..eaf3c18e632d66559d068f65c1bd4f30574e61a3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"eb250fd207a4729c976794d03db689c9be1d634ab5a1c9da9492a13d8fecbcdf"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1cb2e68cbb882313340adaaaf8d2e119a213754a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++language: rust
++sudo: false
++before_script:
++  - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
++
++matrix:
++  include:
++    - rust: 1.15.0
++    - rust: stable
++    - rust: stable
++      os: osx
++    - rust: beta
++    - rust: nightly
++      script:
++        - cargo test
++        - cargo test --features nightly
++        - cargo test --manifest-path rand-derive/Cargo.toml
++        - cargo doc --no-deps --features nightly
++script:
++  - cargo test
++  - cargo test --manifest-path rand-derive/Cargo.toml
++after_success:
++  - travis-cargo --only nightly doc-upload
++env:
++  global:
++    secure: "BdDntVHSompN+Qxz5Rz45VI4ZqhD72r6aPl166FADlnkIwS6N6FLWdqs51O7G5CpoMXEDvyYrjmRMZe/GYLIG9cmqmn/wUrWPO+PauGiIuG/D2dmfuUNvSTRcIe7UQLXrfP3yyfZPgqsH6pSnNEVopquQKy3KjzqepgriOJtbyY="
++
++notifications:
++  email:
++    on_success: never
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b2c26315a9544fca8f21e73b7c8d2112791928b8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,34 @@@
++# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
++#
++# When uploading crates to the registry Cargo will automatically
++# "normalize" Cargo.toml files for maximal compatibility
++# with all versions of Cargo and also rewrite `path` dependencies
++# to registry (e.g. crates.io) dependencies
++#
++# If you believe there's an error in this file please file an
++# issue against the rust-lang/cargo repository. If you're
++# editing this file be aware that the upstream Cargo.toml
++# will likely look very different (and much more reasonable)
++
++[package]
++name = "rand"
++version = "0.3.16"
++authors = ["The Rust Project Developers"]
++description = "Random number generators and other randomness functionality.\n"
++homepage = "https://github.com/rust-lang-nursery/rand"
++documentation = "https://docs.rs/rand"
++readme = "README.md"
++keywords = ["random", "rng"]
++categories = ["algorithms"]
++license = "MIT/Apache-2.0"
++repository = "https://github.com/rust-lang-nursery/rand"
++[dependencies.libc]
++version = "0.2"
++[dev-dependencies.log]
++version = "0.3.0"
++
++[features]
++nightly = ["i128_support"]
++i128_support = []
++[target."cfg(target_os = \"fuchsia\")".dependencies.magenta]
++version = "^0.1.1"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16fe87b06e802f094b3fbb0894b137bca2b16ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++                              Apache License
++                        Version 2.0, January 2004
++                     http://www.apache.org/licenses/
++
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++1. Definitions.
++
++   "License" shall mean the terms and conditions for use, reproduction,
++   and distribution as defined by Sections 1 through 9 of this document.
++
++   "Licensor" shall mean the copyright owner or entity authorized by
++   the copyright owner that is granting the License.
++
++   "Legal Entity" shall mean the union of the acting entity and all
++   other entities that control, are controlled by, or are under common
++   control with that entity. For the purposes of this definition,
++   "control" means (i) the power, direct or indirect, to cause the
++   direction or management of such entity, whether by contract or
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the
++   outstanding shares, or (iii) beneficial ownership of such entity.
++
++   "You" (or "Your") shall mean an individual or Legal Entity
++   exercising permissions granted by this License.
++
++   "Source" form shall mean the preferred form for making modifications,
++   including but not limited to software source code, documentation
++   source, and configuration files.
++
++   "Object" form shall mean any form resulting from mechanical
++   transformation or translation of a Source form, including but
++   not limited to compiled object code, generated documentation,
++   and conversions to other media types.
++
++   "Work" shall mean the work of authorship, whether in Source or
++   Object form, made available under the License, as indicated by a
++   copyright notice that is included in or attached to the work
++   (an example is provided in the Appendix below).
++
++   "Derivative Works" shall mean any work, whether in Source or Object
++   form, that is based on (or derived from) the Work and for which the
++   editorial revisions, annotations, elaborations, or other modifications
++   represent, as a whole, an original work of authorship. For the purposes
++   of this License, Derivative Works shall not include works that remain
++   separable from, or merely link (or bind by name) to the interfaces of,
++   the Work and Derivative Works thereof.
++
++   "Contribution" shall mean any work of authorship, including
++   the original version of the Work and any modifications or additions
++   to that Work or Derivative Works thereof, that is intentionally
++   submitted to Licensor for inclusion in the Work by the copyright owner
++   or by an individual or Legal Entity authorized to submit on behalf of
++   the copyright owner. For the purposes of this definition, "submitted"
++   means any form of electronic, verbal, or written communication sent
++   to the Licensor or its representatives, including but not limited to
++   communication on electronic mailing lists, source code control systems,
++   and issue tracking systems that are managed by, or on behalf of, the
++   Licensor for the purpose of discussing and improving the Work, but
++   excluding communication that is conspicuously marked or otherwise
++   designated in writing by the copyright owner as "Not a Contribution."
++
++   "Contributor" shall mean Licensor and any individual or Legal Entity
++   on behalf of whom a Contribution has been received by Licensor and
++   subsequently incorporated within the Work.
++
++2. Grant of Copyright License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   copyright license to reproduce, prepare Derivative Works of,
++   publicly display, publicly perform, sublicense, and distribute the
++   Work and such Derivative Works in Source or Object form.
++
++3. Grant of Patent License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   (except as stated in this section) patent license to make, have made,
++   use, offer to sell, sell, import, and otherwise transfer the Work,
++   where such license applies only to those patent claims licensable
++   by such Contributor that are necessarily infringed by their
++   Contribution(s) alone or by combination of their Contribution(s)
++   with the Work to which such Contribution(s) was submitted. If You
++   institute patent litigation against any entity (including a
++   cross-claim or counterclaim in a lawsuit) alleging that the Work
++   or a Contribution incorporated within the Work constitutes direct
++   or contributory patent infringement, then any patent licenses
++   granted to You under this License for that Work shall terminate
++   as of the date such litigation is filed.
++
++4. Redistribution. You may reproduce and distribute copies of the
++   Work or Derivative Works thereof in any medium, with or without
++   modifications, and in Source or Object form, provided that You
++   meet the following conditions:
++
++   (a) You must give any other recipients of the Work or
++       Derivative Works a copy of this License; and
++
++   (b) You must cause any modified files to carry prominent notices
++       stating that You changed the files; and
++
++   (c) You must retain, in the Source form of any Derivative Works
++       that You distribute, all copyright, patent, trademark, and
++       attribution notices from the Source form of the Work,
++       excluding those notices that do not pertain to any part of
++       the Derivative Works; and
++
++   (d) If the Work includes a "NOTICE" text file as part of its
++       distribution, then any Derivative Works that You distribute must
++       include a readable copy of the attribution notices contained
++       within such NOTICE file, excluding those notices that do not
++       pertain to any part of the Derivative Works, in at least one
++       of the following places: within a NOTICE text file distributed
++       as part of the Derivative Works; within the Source form or
++       documentation, if provided along with the Derivative Works; or,
++       within a display generated by the Derivative Works, if and
++       wherever such third-party notices normally appear. The contents
++       of the NOTICE file are for informational purposes only and
++       do not modify the License. You may add Your own attribution
++       notices within Derivative Works that You distribute, alongside
++       or as an addendum to the NOTICE text from the Work, provided
++       that such additional attribution notices cannot be construed
++       as modifying the License.
++
++   You may add Your own copyright statement to Your modifications and
++   may provide additional or different license terms and conditions
++   for use, reproduction, or distribution of Your modifications, or
++   for any such Derivative Works as a whole, provided Your use,
++   reproduction, and distribution of the Work otherwise complies with
++   the conditions stated in this License.
++
++5. Submission of Contributions. Unless You explicitly state otherwise,
++   any Contribution intentionally submitted for inclusion in the Work
++   by You to the Licensor shall be under the terms and conditions of
++   this License, without any additional terms or conditions.
++   Notwithstanding the above, nothing herein shall supersede or modify
++   the terms of any separate license agreement you may have executed
++   with Licensor regarding such Contributions.
++
++6. Trademarks. This License does not grant permission to use the trade
++   names, trademarks, service marks, or product names of the Licensor,
++   except as required for reasonable and customary use in describing the
++   origin of the Work and reproducing the content of the NOTICE file.
++
++7. Disclaimer of Warranty. Unless required by applicable law or
++   agreed to in writing, Licensor provides the Work (and each
++   Contributor provides its Contributions) on an "AS IS" BASIS,
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++   implied, including, without limitation, any warranties or conditions
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++   PARTICULAR PURPOSE. You are solely responsible for determining the
++   appropriateness of using or redistributing the Work and assume any
++   risks associated with Your exercise of permissions under this License.
++
++8. Limitation of Liability. In no event and under no legal theory,
++   whether in tort (including negligence), contract, or otherwise,
++   unless required by applicable law (such as deliberate and grossly
++   negligent acts) or agreed to in writing, shall any Contributor be
++   liable to You for damages, including any direct, indirect, special,
++   incidental, or consequential damages of any character arising as a
++   result of this License or out of the use or inability to use the
++   Work (including but not limited to damages for loss of goodwill,
++   work stoppage, computer failure or malfunction, or any and all
++   other commercial damages or losses), even if such Contributor
++   has been advised of the possibility of such damages.
++
++9. Accepting Warranty or Additional Liability. While redistributing
++   the Work or Derivative Works thereof, You may choose to offer,
++   and charge a fee for, acceptance of support, warranty, indemnity,
++   or other liability obligations and/or rights consistent with this
++   License. However, in accepting such obligations, You may act only
++   on Your own behalf and on Your sole responsibility, not on behalf
++   of any other Contributor, and only if You agree to indemnify,
++   defend, and hold each Contributor harmless for any liability
++   incurred by, or claims asserted against, such Contributor by reason
++   of your accepting any such warranty or additional liability.
++
++END OF TERMS AND CONDITIONS
++
++APPENDIX: How to apply the Apache License to your work.
++
++   To apply the Apache License to your work, attach the following
++   boilerplate notice, with the fields enclosed by brackets "[]"
++   replaced with your own identifying information. (Don't include
++   the brackets!)  The text should be enclosed in the appropriate
++   comment syntax for the file format. We also recommend that a
++   file or class name and description of purpose be included on the
++   same "printed page" as the copyright notice for easier
++   identification within third-party archives.
++
++Copyright [yyyy] [name of copyright owner]
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++      http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39d4bdb5acd313c1a92dbeaa1c379aaf0596a315
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2014 The Rust Project Developers
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0aea1a11ab1de895f79a9cb51500f155dac9d948
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,88 @@@
++rand
++====
++
++A Rust library for random number generators and other randomness functionality.
++
++[![Build Status](https://travis-ci.org/rust-lang-nursery/rand.svg?branch=master)](https://travis-ci.org/rust-lang-nursery/rand)
++[![Build status](https://ci.appveyor.com/api/projects/status/rm5c9o33k3jhchbw?svg=true)](https://ci.appveyor.com/project/alexcrichton/rand)
++
++[Documentation](https://docs.rs/rand)
++
++## Usage
++
++Add this to your `Cargo.toml`:
++
++```toml
++[dependencies]
++rand = "0.3"
++```
++
++and this to your crate root:
++
++```rust
++extern crate rand;
++```
++
++## Examples
++
++There is built-in support for a random number generator (RNG) associated with each thread stored in thread-local storage. This RNG can be accessed via thread_rng, or used implicitly via random. This RNG is normally randomly seeded from an operating-system source of randomness, e.g. /dev/urandom on Unix systems, and will automatically reseed itself from this source after generating 32 KiB of random data.
++
++```rust
++let tuple = rand::random::<(f64, char)>();
++println!("{:?}", tuple)
++```
++
++```rust
++use rand::Rng;
++
++let mut rng = rand::thread_rng();
++if rng.gen() { // random bool
++    println!("i32: {}, u32: {}", rng.gen::<i32>(), rng.gen::<u32>())
++}
++```
++
++It is also possible to use other RNG types, which have a similar interface. The following uses the "ChaCha" algorithm instead of the default.
++
++```rust
++use rand::{Rng, ChaChaRng};
++
++let mut rng = rand::ChaChaRng::new_unseeded();
++println!("i32: {}, u32: {}", rng.gen::<i32>(), rng.gen::<u32>())
++```
++
++# `derive(Rand)`
++
++You can derive the `Rand` trait for your custom type via the `#[derive(Rand)]`
++directive. To use this first add this to your Cargo.toml:
++
++```toml
++rand = "0.3"
++rand-derive = "0.3"
++```
++
++Next in your crate:
++
++```rust
++extern crate rand;
++#[macro_use]
++extern crate rand_derive;
++
++#[derive(Rand, Debug)]
++struct MyStruct {
++    a: i32,
++    b: u32,
++}
++
++fn main() {
++    println!("{:?}", rand::random::<MyStruct>());
++}
++```
++
++
++# License
++
++`rand` is primarily distributed under the terms of both the MIT
++license and the Apache License (Version 2.0), with portions covered by various
++BSD-like licenses.
++
++See LICENSE-APACHE, and LICENSE-MIT for details.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39c6a180be8215ad6b1054f7bc6cea638562be59
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,37 @@@
++environment:
++
++  # At the time this was added AppVeyor was having troubles with checking
++  # revocation of SSL certificates of sites like static.rust-lang.org and what
++  # we think is crates.io. The libcurl HTTP client by default checks for
++  # revocation on Windows and according to a mailing list [1] this can be
++  # disabled.
++  #
++  # The `CARGO_HTTP_CHECK_REVOKE` env var here tells cargo to disable SSL
++  # revocation checking on Windows in libcurl. Note, though, that rustup, which
++  # we're using to download Rust here, also uses libcurl as the default backend.
++  # Unlike Cargo, however, rustup doesn't have a mechanism to disable revocation
++  # checking. To get rustup working we set `RUSTUP_USE_HYPER` which forces it to
++  # use the Hyper instead of libcurl backend. Both Hyper and libcurl use
++  # schannel on Windows but it appears that Hyper configures it slightly
++  # differently such that revocation checking isn't turned on by default.
++  #
++  # [1]: https://curl.haxx.se/mail/lib-2016-03/0202.html
++  RUSTUP_USE_HYPER: 1
++  CARGO_HTTP_CHECK_REVOKE: false
++
++  matrix:
++  - TARGET: x86_64-pc-windows-msvc
++  - TARGET: i686-pc-windows-msvc
++install:
++  - appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
++  - rustup-init.exe -y --default-host %TARGET% --default-toolchain nightly
++  - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
++  - rustc -V
++  - cargo -V
++
++build: false
++
++test_script:
++  - cargo test
++  - cargo test --features nightly
++  - cargo test --manifest-path rand-derive/Cargo.toml
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5fa92bdbea02f3e7bd0a18c024d73f10506a5e55
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,97 @@@
++#![feature(test)]
++
++extern crate test;
++extern crate rand;
++
++const RAND_BENCH_N: u64 = 1000;
++
++mod distributions;
++
++use std::mem::size_of;
++use test::{black_box, Bencher};
++use rand::{XorShiftRng, StdRng, IsaacRng, Isaac64Rng, Rng};
++use rand::{OsRng, sample, weak_rng};
++
++#[bench]
++fn rand_xorshift(b: &mut Bencher) {
++    let mut rng: XorShiftRng = OsRng::new().unwrap().gen();
++    b.iter(|| {
++        for _ in 0..RAND_BENCH_N {
++            black_box(rng.gen::<usize>());
++        }
++    });
++    b.bytes = size_of::<usize>() as u64 * RAND_BENCH_N;
++}
++
++#[bench]
++fn rand_isaac(b: &mut Bencher) {
++    let mut rng: IsaacRng = OsRng::new().unwrap().gen();
++    b.iter(|| {
++        for _ in 0..RAND_BENCH_N {
++            black_box(rng.gen::<usize>());
++        }
++    });
++    b.bytes = size_of::<usize>() as u64 * RAND_BENCH_N;
++}
++
++#[bench]
++fn rand_isaac64(b: &mut Bencher) {
++    let mut rng: Isaac64Rng = OsRng::new().unwrap().gen();
++    b.iter(|| {
++        for _ in 0..RAND_BENCH_N {
++            black_box(rng.gen::<usize>());
++        }
++    });
++    b.bytes = size_of::<usize>() as u64 * RAND_BENCH_N;
++}
++
++#[bench]
++fn rand_std(b: &mut Bencher) {
++    let mut rng = StdRng::new().unwrap();
++    b.iter(|| {
++        for _ in 0..RAND_BENCH_N {
++            black_box(rng.gen::<usize>());
++        }
++    });
++    b.bytes = size_of::<usize>() as u64 * RAND_BENCH_N;
++}
++
++#[bench]
++fn rand_f32(b: &mut Bencher) {
++    let mut rng = StdRng::new().unwrap();
++    b.iter(|| {
++        for _ in 0..RAND_BENCH_N {
++            black_box(rng.next_f32());
++        }
++    });
++    b.bytes = size_of::<f32>() as u64 * RAND_BENCH_N;
++}
++
++#[bench]
++fn rand_f64(b: &mut Bencher) {
++    let mut rng = StdRng::new().unwrap();
++    b.iter(|| {
++        for _ in 0..RAND_BENCH_N {
++            black_box(rng.next_f64());
++        }
++    });
++    b.bytes = size_of::<f64>() as u64 * RAND_BENCH_N;
++}
++
++#[bench]
++fn rand_shuffle_100(b: &mut Bencher) {
++    let mut rng = weak_rng();
++    let x : &mut [usize] = &mut [1; 100];
++    b.iter(|| {
++        rng.shuffle(x);
++    })
++}
++
++#[bench]
++fn rand_sample_10_of_100(b: &mut Bencher) {
++    let mut rng = weak_rng();
++    let x : &[usize] = &[1; 100];
++    b.iter(|| {
++        sample(&mut rng, x, 10);
++    })
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..152615d7ba33424b9d5a31c5f88391bebf646b07
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,18 @@@
++use std::mem::size_of;
++use test::Bencher;
++use rand;
++use rand::distributions::exponential::Exp;
++use rand::distributions::Sample;
++
++#[bench]
++fn rand_exp(b: &mut Bencher) {
++    let mut rng = rand::weak_rng();
++    let mut exp = Exp::new(2.71828 * 3.14159);
++
++    b.iter(|| {
++        for _ in 0..::RAND_BENCH_N {
++            exp.sample(&mut rng);
++        }
++    });
++    b.bytes = size_of::<f64>() as u64 * ::RAND_BENCH_N;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bf3fd367a9b6c995ba756492fb7fe1c4160a1aad
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,31 @@@
++use std::mem::size_of;
++use test::Bencher;
++use rand;
++use rand::distributions::IndependentSample;
++use rand::distributions::gamma::Gamma;
++
++#[bench]
++fn bench_gamma_large_shape(b: &mut Bencher) {
++    let gamma = Gamma::new(10., 1.0);
++    let mut rng = rand::weak_rng();
++
++    b.iter(|| {
++        for _ in 0..::RAND_BENCH_N {
++            gamma.ind_sample(&mut rng);
++        }
++    });
++    b.bytes = size_of::<f64>() as u64 * ::RAND_BENCH_N;
++}
++
++#[bench]
++fn bench_gamma_small_shape(b: &mut Bencher) {
++    let gamma = Gamma::new(0.1, 1.0);
++    let mut rng = rand::weak_rng();
++
++    b.iter(|| {
++        for _ in 0..::RAND_BENCH_N {
++            gamma.ind_sample(&mut rng);
++        }
++    });
++    b.bytes = size_of::<f64>() as u64 * ::RAND_BENCH_N;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..49f6bd9c06c619062e6fa56812b51b5253ed93e5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++mod exponential;
++mod normal;
++mod gamma;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1c858b19b396aa96a2f9a8d13a3889eb93fd2e4a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,18 @@@
++use std::mem::size_of;
++use test::Bencher;
++use rand;
++use rand::distributions::Sample;
++use rand::distributions::normal::Normal;
++
++#[bench]
++fn rand_normal(b: &mut Bencher) {
++    let mut rng = rand::weak_rng();
++    let mut normal = Normal::new(-2.71828, 3.14159);
++
++    b.iter(|| {
++        for _ in 0..::RAND_BENCH_N {
++            normal.sample(&mut rng);
++        }
++    });
++    b.bytes = size_of::<f64>() as u64 * ::RAND_BENCH_N;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1acec5e9bf5943f3fb70c920ce6eb63004d1df64
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,318 @@@
++// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! The ChaCha random number generator.
++
++use std::num::Wrapping as w;
++use {Rng, SeedableRng, Rand, w32};
++
++const KEY_WORDS    : usize =  8; // 8 words for the 256-bit key
++const STATE_WORDS  : usize = 16;
++const CHACHA_ROUNDS: u32 = 20; // Cryptographically secure from 8 upwards as of this writing
++
++/// A random number generator that uses the ChaCha20 algorithm [1].
++///
++/// The ChaCha algorithm is widely accepted as suitable for
++/// cryptographic purposes, but this implementation has not been
++/// verified as such. Prefer a generator like `OsRng` that defers to
++/// the operating system for cases that need high security.
++///
++/// [1]: D. J. Bernstein, [*ChaCha, a variant of
++/// Salsa20*](http://cr.yp.to/chacha.html)
++#[derive(Copy, Clone, Debug)]
++pub struct ChaChaRng {
++    buffer:  [w32; STATE_WORDS], // Internal buffer of output
++    state:   [w32; STATE_WORDS], // Initial state
++    index:   usize,                 // Index into state
++}
++
++static EMPTY: ChaChaRng = ChaChaRng {
++    buffer:  [w(0); STATE_WORDS],
++    state:   [w(0); STATE_WORDS],
++    index:   STATE_WORDS
++};
++
++
++macro_rules! quarter_round{
++    ($a: expr, $b: expr, $c: expr, $d: expr) => {{
++        $a = $a + $b; $d = $d ^ $a; $d = w($d.0.rotate_left(16));
++        $c = $c + $d; $b = $b ^ $c; $b = w($b.0.rotate_left(12));
++        $a = $a + $b; $d = $d ^ $a; $d = w($d.0.rotate_left( 8));
++        $c = $c + $d; $b = $b ^ $c; $b = w($b.0.rotate_left( 7));
++    }}
++}
++
++macro_rules! double_round{
++    ($x: expr) => {{
++        // Column round
++        quarter_round!($x[ 0], $x[ 4], $x[ 8], $x[12]);
++        quarter_round!($x[ 1], $x[ 5], $x[ 9], $x[13]);
++        quarter_round!($x[ 2], $x[ 6], $x[10], $x[14]);
++        quarter_round!($x[ 3], $x[ 7], $x[11], $x[15]);
++        // Diagonal round
++        quarter_round!($x[ 0], $x[ 5], $x[10], $x[15]);
++        quarter_round!($x[ 1], $x[ 6], $x[11], $x[12]);
++        quarter_round!($x[ 2], $x[ 7], $x[ 8], $x[13]);
++        quarter_round!($x[ 3], $x[ 4], $x[ 9], $x[14]);
++    }}
++}
++
++#[inline]
++fn core(output: &mut [w32; STATE_WORDS], input: &[w32; STATE_WORDS]) {
++    *output = *input;
++
++    for _ in 0..CHACHA_ROUNDS / 2 {
++        double_round!(output);
++    }
++
++    for i in 0..STATE_WORDS {
++        output[i] = output[i] + input[i];
++    }
++}
++
++impl ChaChaRng {
++
++    /// Create an ChaCha random number generator using the default
++    /// fixed key of 8 zero words.
++    ///
++    /// # Examples
++    ///
++    /// ```rust
++    /// use rand::{Rng, ChaChaRng};
++    ///
++    /// let mut ra = ChaChaRng::new_unseeded();
++    /// println!("{:?}", ra.next_u32());
++    /// println!("{:?}", ra.next_u32());
++    /// ```
++    ///
++    /// Since this equivalent to a RNG with a fixed seed, repeated executions
++    /// of an unseeded RNG will produce the same result. This code sample will
++    /// consistently produce:
++    ///
++    /// - 2917185654
++    /// - 2419978656
++    pub fn new_unseeded() -> ChaChaRng {
++        let mut rng = EMPTY;
++        rng.init(&[0; KEY_WORDS]);
++        rng
++    }
++
++    /// Sets the internal 128-bit ChaCha counter to
++    /// a user-provided value. This permits jumping
++    /// arbitrarily ahead (or backwards) in the pseudorandom stream.
++    ///
++    /// Since the nonce words are used to extend the counter to 128 bits,
++    /// users wishing to obtain the conventional ChaCha pseudorandom stream
++    /// associated with a particular nonce can call this function with
++    /// arguments `0, desired_nonce`.
++    ///
++    /// # Examples
++    ///
++    /// ```rust
++    /// use rand::{Rng, ChaChaRng};
++    ///
++    /// let mut ra = ChaChaRng::new_unseeded();
++    /// ra.set_counter(0u64, 1234567890u64);
++    /// println!("{:?}", ra.next_u32());
++    /// println!("{:?}", ra.next_u32());
++    /// ```
++    pub fn set_counter(&mut self, counter_low: u64, counter_high: u64) {
++        self.state[12] = w((counter_low >>  0) as u32);
++        self.state[13] = w((counter_low >> 32) as u32);
++        self.state[14] = w((counter_high >>  0) as u32);
++        self.state[15] = w((counter_high >> 32) as u32);
++        self.index = STATE_WORDS; // force recomputation
++    }
++
++    /// Initializes `self.state` with the appropriate key and constants
++    ///
++    /// We deviate slightly from the ChaCha specification regarding
++    /// the nonce, which is used to extend the counter to 128 bits.
++    /// This is provably as strong as the original cipher, though,
++    /// since any distinguishing attack on our variant also works
++    /// against ChaCha with a chosen-nonce. See the XSalsa20 [1]
++    /// security proof for a more involved example of this.
++    ///
++    /// The modified word layout is:
++    /// ```text
++    /// constant constant constant constant
++    /// key      key      key      key
++    /// key      key      key      key
++    /// counter  counter  counter  counter
++    /// ```
++    /// [1]: Daniel J. Bernstein. [*Extending the Salsa20
++    /// nonce.*](http://cr.yp.to/papers.html#xsalsa)
++    fn init(&mut self, key: &[u32; KEY_WORDS]) {
++        self.state[0] = w(0x61707865);
++        self.state[1] = w(0x3320646E);
++        self.state[2] = w(0x79622D32);
++        self.state[3] = w(0x6B206574);
++
++        for i in 0..KEY_WORDS {
++            self.state[4+i] = w(key[i]);
++        }
++
++        self.state[12] = w(0);
++        self.state[13] = w(0);
++        self.state[14] = w(0);
++        self.state[15] = w(0);
++
++        self.index = STATE_WORDS;
++    }
++
++    /// Refill the internal output buffer (`self.buffer`)
++    fn update(&mut self) {
++        core(&mut self.buffer, &self.state);
++        self.index = 0;
++        // update 128-bit counter
++        self.state[12] = self.state[12] + w(1);
++        if self.state[12] != w(0) { return };
++        self.state[13] = self.state[13] + w(1);
++        if self.state[13] != w(0) { return };
++        self.state[14] = self.state[14] + w(1);
++        if self.state[14] != w(0) { return };
++        self.state[15] = self.state[15] + w(1);
++    }
++}
++
++impl Rng for ChaChaRng {
++    #[inline]
++    fn next_u32(&mut self) -> u32 {
++        if self.index == STATE_WORDS {
++            self.update();
++        }
++
++        let value = self.buffer[self.index % STATE_WORDS];
++        self.index += 1;
++        value.0
++    }
++}
++
++impl<'a> SeedableRng<&'a [u32]> for ChaChaRng {
++
++    fn reseed(&mut self, seed: &'a [u32]) {
++        // reset state
++        self.init(&[0u32; KEY_WORDS]);
++        // set key in place
++        let key = &mut self.state[4 .. 4+KEY_WORDS];
++        for (k, s) in key.iter_mut().zip(seed.iter()) {
++            *k = w(*s);
++        }
++    }
++
++    /// Create a ChaCha generator from a seed,
++    /// obtained from a variable-length u32 array.
++    /// Only up to 8 words are used; if less than 8
++    /// words are used, the remaining are set to zero.
++    fn from_seed(seed: &'a [u32]) -> ChaChaRng {
++        let mut rng = EMPTY;
++        rng.reseed(seed);
++        rng
++    }
++}
++
++impl Rand for ChaChaRng {
++    fn rand<R: Rng>(other: &mut R) -> ChaChaRng {
++        let mut key : [u32; KEY_WORDS] = [0; KEY_WORDS];
++        for word in key.iter_mut() {
++            *word = other.gen();
++        }
++        SeedableRng::from_seed(&key[..])
++    }
++}
++
++
++#[cfg(test)]
++mod test {
++    use {Rng, SeedableRng};
++    use super::ChaChaRng;
++
++    #[test]
++    fn test_rng_rand_seeded() {
++        let s = ::test::rng().gen_iter::<u32>().take(8).collect::<Vec<u32>>();
++        let mut ra: ChaChaRng = SeedableRng::from_seed(&s[..]);
++        let mut rb: ChaChaRng = SeedableRng::from_seed(&s[..]);
++        assert!(::test::iter_eq(ra.gen_ascii_chars().take(100),
++                                rb.gen_ascii_chars().take(100)));
++    }
++
++    #[test]
++    fn test_rng_seeded() {
++        let seed : &[_] = &[0,1,2,3,4,5,6,7];
++        let mut ra: ChaChaRng = SeedableRng::from_seed(seed);
++        let mut rb: ChaChaRng = SeedableRng::from_seed(seed);
++        assert!(::test::iter_eq(ra.gen_ascii_chars().take(100),
++                                rb.gen_ascii_chars().take(100)));
++    }
++
++    #[test]
++    fn test_rng_reseed() {
++        let s = ::test::rng().gen_iter::<u32>().take(8).collect::<Vec<u32>>();
++        let mut r: ChaChaRng = SeedableRng::from_seed(&s[..]);
++        let string1: String = r.gen_ascii_chars().take(100).collect();
++
++        r.reseed(&s);
++
++        let string2: String = r.gen_ascii_chars().take(100).collect();
++        assert_eq!(string1, string2);
++    }
++
++    #[test]
++    fn test_rng_true_values() {
++        // Test vectors 1 and 2 from
++        // http://tools.ietf.org/html/draft-nir-cfrg-chacha20-poly1305-04
++        let seed : &[_] = &[0u32; 8];
++        let mut ra: ChaChaRng = SeedableRng::from_seed(seed);
++
++        let v = (0..16).map(|_| ra.next_u32()).collect::<Vec<_>>();
++        assert_eq!(v,
++                   vec!(0xade0b876, 0x903df1a0, 0xe56a5d40, 0x28bd8653,
++                        0xb819d2bd, 0x1aed8da0, 0xccef36a8, 0xc70d778b,
++                        0x7c5941da, 0x8d485751, 0x3fe02477, 0x374ad8b8,
++                        0xf4b8436a, 0x1ca11815, 0x69b687c3, 0x8665eeb2));
++
++        let v = (0..16).map(|_| ra.next_u32()).collect::<Vec<_>>();
++        assert_eq!(v,
++                   vec!(0xbee7079f, 0x7a385155, 0x7c97ba98, 0x0d082d73,
++                        0xa0290fcb, 0x6965e348, 0x3e53c612, 0xed7aee32,
++                        0x7621b729, 0x434ee69c, 0xb03371d5, 0xd539d874,
++                        0x281fed31, 0x45fb0a51, 0x1f0ae1ac, 0x6f4d794b));
++
++
++        let seed : &[_] = &[0,1,2,3,4,5,6,7];
++        let mut ra: ChaChaRng = SeedableRng::from_seed(seed);
++
++        // Store the 17*i-th 32-bit word,
++        // i.e., the i-th word of the i-th 16-word block
++        let mut v : Vec<u32> = Vec::new();
++        for _ in 0..16 {
++            v.push(ra.next_u32());
++            for _ in 0..16 {
++                ra.next_u32();
++            }
++        }
++
++        assert_eq!(v,
++                   vec!(0xf225c81a, 0x6ab1be57, 0x04d42951, 0x70858036,
++                        0x49884684, 0x64efec72, 0x4be2d186, 0x3615b384,
++                        0x11cfa18e, 0xd3c50049, 0x75c775f6, 0x434c6530,
++                        0x2c5bad8f, 0x898881dc, 0x5f1c86d9, 0xc1f8e7f4));
++    }
++
++    #[test]
++    fn test_rng_clone() {
++        let seed : &[_] = &[0u32; 8];
++        let mut rng: ChaChaRng = SeedableRng::from_seed(seed);
++        let mut clone = rng.clone();
++        for _ in 0..16 {
++            assert_eq!(rng.next_u64(), clone.next_u64());
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c3c924c6b7ee3453b431b37e324b8ac6dae608e7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,124 @@@
++// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! The exponential distribution.
++
++use {Rng, Rand};
++use distributions::{ziggurat, ziggurat_tables, Sample, IndependentSample};
++
++/// A wrapper around an `f64` to generate Exp(1) random numbers.
++///
++/// See `Exp` for the general exponential distribution.
++///
++/// Implemented via the ZIGNOR variant[1] of the Ziggurat method. The
++/// exact description in the paper was adjusted to use tables for the
++/// exponential distribution rather than normal.
++///
++/// [1]: Jurgen A. Doornik (2005). [*An Improved Ziggurat Method to
++/// Generate Normal Random
++/// Samples*](http://www.doornik.com/research/ziggurat.pdf). Nuffield
++/// College, Oxford
++///
++/// # Example
++///
++/// ```rust
++/// use rand::distributions::exponential::Exp1;
++///
++/// let Exp1(x) = rand::random();
++/// println!("{}", x);
++/// ```
++#[derive(Clone, Copy, Debug)]
++pub struct Exp1(pub f64);
++
++// This could be done via `-rng.gen::<f64>().ln()` but that is slower.
++impl Rand for Exp1 {
++    #[inline]
++    fn rand<R:Rng>(rng: &mut R) -> Exp1 {
++        #[inline]
++        fn pdf(x: f64) -> f64 {
++            (-x).exp()
++        }
++        #[inline]
++        fn zero_case<R:Rng>(rng: &mut R, _u: f64) -> f64 {
++            ziggurat_tables::ZIG_EXP_R - rng.gen::<f64>().ln()
++        }
++
++        Exp1(ziggurat(rng, false,
++                      &ziggurat_tables::ZIG_EXP_X,
++                      &ziggurat_tables::ZIG_EXP_F,
++                      pdf, zero_case))
++    }
++}
++
++/// The exponential distribution `Exp(lambda)`.
++///
++/// This distribution has density function: `f(x) = lambda *
++/// exp(-lambda * x)` for `x > 0`.
++///
++/// # Example
++///
++/// ```rust
++/// use rand::distributions::{Exp, IndependentSample};
++///
++/// let exp = Exp::new(2.0);
++/// let v = exp.ind_sample(&mut rand::thread_rng());
++/// println!("{} is from a Exp(2) distribution", v);
++/// ```
++#[derive(Clone, Copy, Debug)]
++pub struct Exp {
++    /// `lambda` stored as `1/lambda`, since this is what we scale by.
++    lambda_inverse: f64
++}
++
++impl Exp {
++    /// Construct a new `Exp` with the given shape parameter
++    /// `lambda`. Panics if `lambda <= 0`.
++    #[inline]
++    pub fn new(lambda: f64) -> Exp {
++        assert!(lambda > 0.0, "Exp::new called with `lambda` <= 0");
++        Exp { lambda_inverse: 1.0 / lambda }
++    }
++}
++
++impl Sample<f64> for Exp {
++    fn sample<R: Rng>(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) }
++}
++impl IndependentSample<f64> for Exp {
++    fn ind_sample<R: Rng>(&self, rng: &mut R) -> f64 {
++        let Exp1(n) = rng.gen::<Exp1>();
++        n * self.lambda_inverse
++    }
++}
++
++#[cfg(test)]
++mod test {
++    use distributions::{Sample, IndependentSample};
++    use super::Exp;
++
++    #[test]
++    fn test_exp() {
++        let mut exp = Exp::new(10.0);
++        let mut rng = ::test::rng();
++        for _ in 0..1000 {
++            assert!(exp.sample(&mut rng) >= 0.0);
++            assert!(exp.ind_sample(&mut rng) >= 0.0);
++        }
++    }
++    #[test]
++    #[should_panic]
++    fn test_exp_invalid_lambda_zero() {
++        Exp::new(0.0);
++    }
++    #[test]
++    #[should_panic]
++    fn test_exp_invalid_lambda_neg() {
++        Exp::new(-10.0);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e6a9d77d885e588f69ac62c9d56ffee63c450d27
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,386 @@@
++// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++//
++// ignore-lexer-test FIXME #15679
++
++//! The Gamma and derived distributions.
++
++use self::GammaRepr::*;
++use self::ChiSquaredRepr::*;
++
++use {Rng, Open01};
++use super::normal::StandardNormal;
++use super::{IndependentSample, Sample, Exp};
++
++/// The Gamma distribution `Gamma(shape, scale)` distribution.
++///
++/// The density function of this distribution is
++///
++/// ```text
++/// f(x) =  x^(k - 1) * exp(-x / θ) / (Γ(k) * θ^k)
++/// ```
++///
++/// where `Γ` is the Gamma function, `k` is the shape and `θ` is the
++/// scale and both `k` and `θ` are strictly positive.
++///
++/// The algorithm used is that described by Marsaglia & Tsang 2000[1],
++/// falling back to directly sampling from an Exponential for `shape
++/// == 1`, and using the boosting technique described in [1] for
++/// `shape < 1`.
++///
++/// # Example
++///
++/// ```rust
++/// use rand::distributions::{IndependentSample, Gamma};
++///
++/// let gamma = Gamma::new(2.0, 5.0);
++/// let v = gamma.ind_sample(&mut rand::thread_rng());
++/// println!("{} is from a Gamma(2, 5) distribution", v);
++/// ```
++///
++/// [1]: George Marsaglia and Wai Wan Tsang. 2000. "A Simple Method
++/// for Generating Gamma Variables" *ACM Trans. Math. Softw.* 26, 3
++/// (September 2000),
++/// 363-372. DOI:[10.1145/358407.358414](http://doi.acm.org/10.1145/358407.358414)
++#[derive(Clone, Copy, Debug)]
++pub struct Gamma {
++    repr: GammaRepr,
++}
++
++#[derive(Clone, Copy, Debug)]
++enum GammaRepr {
++    Large(GammaLargeShape),
++    One(Exp),
++    Small(GammaSmallShape)
++}
++
++// These two helpers could be made public, but saving the
++// match-on-Gamma-enum branch from using them directly (e.g. if one
++// knows that the shape is always > 1) doesn't appear to be much
++// faster.
++
++/// Gamma distribution where the shape parameter is less than 1.
++///
++/// Note, samples from this require a compulsory floating-point `pow`
++/// call, which makes it significantly slower than sampling from a
++/// gamma distribution where the shape parameter is greater than or
++/// equal to 1.
++///
++/// See `Gamma` for sampling from a Gamma distribution with general
++/// shape parameters.
++#[derive(Clone, Copy, Debug)]
++struct GammaSmallShape {
++    inv_shape: f64,
++    large_shape: GammaLargeShape
++}
++
++/// Gamma distribution where the shape parameter is larger than 1.
++///
++/// See `Gamma` for sampling from a Gamma distribution with general
++/// shape parameters.
++#[derive(Clone, Copy, Debug)]
++struct GammaLargeShape {
++    scale: f64,
++    c: f64,
++    d: f64
++}
++
++impl Gamma {
++    /// Construct an object representing the `Gamma(shape, scale)`
++    /// distribution.
++    ///
++    /// Panics if `shape <= 0` or `scale <= 0`.
++    #[inline]
++    pub fn new(shape: f64, scale: f64) -> Gamma {
++        assert!(shape > 0.0, "Gamma::new called with shape <= 0");
++        assert!(scale > 0.0, "Gamma::new called with scale <= 0");
++
++        let repr = if shape == 1.0 {
++            One(Exp::new(1.0 / scale))
++        } else if shape < 1.0 {
++            Small(GammaSmallShape::new_raw(shape, scale))
++        } else {
++            Large(GammaLargeShape::new_raw(shape, scale))
++        };
++        Gamma { repr: repr }
++    }
++}
++
++impl GammaSmallShape {
++    fn new_raw(shape: f64, scale: f64) -> GammaSmallShape {
++        GammaSmallShape {
++            inv_shape: 1. / shape,
++            large_shape: GammaLargeShape::new_raw(shape + 1.0, scale)
++        }
++    }
++}
++
++impl GammaLargeShape {
++    fn new_raw(shape: f64, scale: f64) -> GammaLargeShape {
++        let d = shape - 1. / 3.;
++        GammaLargeShape {
++            scale: scale,
++            c: 1. / (9. * d).sqrt(),
++            d: d
++        }
++    }
++}
++
++impl Sample<f64> for Gamma {
++    fn sample<R: Rng>(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) }
++}
++impl Sample<f64> for GammaSmallShape {
++    fn sample<R: Rng>(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) }
++}
++impl Sample<f64> for GammaLargeShape {
++    fn sample<R: Rng>(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) }
++}
++
++impl IndependentSample<f64> for Gamma {
++    fn ind_sample<R: Rng>(&self, rng: &mut R) -> f64 {
++        match self.repr {
++            Small(ref g) => g.ind_sample(rng),
++            One(ref g) => g.ind_sample(rng),
++            Large(ref g) => g.ind_sample(rng),
++        }
++    }
++}
++impl IndependentSample<f64> for GammaSmallShape {
++    fn ind_sample<R: Rng>(&self, rng: &mut R) -> f64 {
++        let Open01(u) = rng.gen::<Open01<f64>>();
++
++        self.large_shape.ind_sample(rng) * u.powf(self.inv_shape)
++    }
++}
++impl IndependentSample<f64> for GammaLargeShape {
++    fn ind_sample<R: Rng>(&self, rng: &mut R) -> f64 {
++        loop {
++            let StandardNormal(x) = rng.gen::<StandardNormal>();
++            let v_cbrt = 1.0 + self.c * x;
++            if v_cbrt <= 0.0 { // a^3 <= 0 iff a <= 0
++                continue
++            }
++
++            let v = v_cbrt * v_cbrt * v_cbrt;
++            let Open01(u) = rng.gen::<Open01<f64>>();
++
++            let x_sqr = x * x;
++            if u < 1.0 - 0.0331 * x_sqr * x_sqr ||
++                u.ln() < 0.5 * x_sqr + self.d * (1.0 - v + v.ln()) {
++                return self.d * v * self.scale
++            }
++        }
++    }
++}
++
++/// The chi-squared distribution `χ²(k)`, where `k` is the degrees of
++/// freedom.
++///
++/// For `k > 0` integral, this distribution is the sum of the squares
++/// of `k` independent standard normal random variables. For other
++/// `k`, this uses the equivalent characterisation `χ²(k) = Gamma(k/2,
++/// 2)`.
++///
++/// # Example
++///
++/// ```rust
++/// use rand::distributions::{ChiSquared, IndependentSample};
++///
++/// let chi = ChiSquared::new(11.0);
++/// let v = chi.ind_sample(&mut rand::thread_rng());
++/// println!("{} is from a χ²(11) distribution", v)
++/// ```
++#[derive(Clone, Copy, Debug)]
++pub struct ChiSquared {
++    repr: ChiSquaredRepr,
++}
++
++#[derive(Clone, Copy, Debug)]
++enum ChiSquaredRepr {
++    // k == 1, Gamma(alpha, ..) is particularly slow for alpha < 1,
++    // e.g. when alpha = 1/2 as it would be for this case, so special-
++    // casing and using the definition of N(0,1)^2 is faster.
++    DoFExactlyOne,
++    DoFAnythingElse(Gamma),
++}
++
++impl ChiSquared {
++    /// Create a new chi-squared distribution with degrees-of-freedom
++    /// `k`. Panics if `k < 0`.
++    pub fn new(k: f64) -> ChiSquared {
++        let repr = if k == 1.0 {
++            DoFExactlyOne
++        } else {
++            assert!(k > 0.0, "ChiSquared::new called with `k` < 0");
++            DoFAnythingElse(Gamma::new(0.5 * k, 2.0))
++        };
++        ChiSquared { repr: repr }
++    }
++}
++impl Sample<f64> for ChiSquared {
++    fn sample<R: Rng>(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) }
++}
++impl IndependentSample<f64> for ChiSquared {
++    fn ind_sample<R: Rng>(&self, rng: &mut R) -> f64 {
++        match self.repr {
++            DoFExactlyOne => {
++                // k == 1 => N(0,1)^2
++                let StandardNormal(norm) = rng.gen::<StandardNormal>();
++                norm * norm
++            }
++            DoFAnythingElse(ref g) => g.ind_sample(rng)
++        }
++    }
++}
++
++/// The Fisher F distribution `F(m, n)`.
++///
++/// This distribution is equivalent to the ratio of two normalised
++/// chi-squared distributions, that is, `F(m,n) = (χ²(m)/m) /
++/// (χ²(n)/n)`.
++///
++/// # Example
++///
++/// ```rust
++/// use rand::distributions::{FisherF, IndependentSample};
++///
++/// let f = FisherF::new(2.0, 32.0);
++/// let v = f.ind_sample(&mut rand::thread_rng());
++/// println!("{} is from an F(2, 32) distribution", v)
++/// ```
++#[derive(Clone, Copy, Debug)]
++pub struct FisherF {
++    numer: ChiSquared,
++    denom: ChiSquared,
++    // denom_dof / numer_dof so that this can just be a straight
++    // multiplication, rather than a division.
++    dof_ratio: f64,
++}
++
++impl FisherF {
++    /// Create a new `FisherF` distribution, with the given
++    /// parameter. Panics if either `m` or `n` are not positive.
++    pub fn new(m: f64, n: f64) -> FisherF {
++        assert!(m > 0.0, "FisherF::new called with `m < 0`");
++        assert!(n > 0.0, "FisherF::new called with `n < 0`");
++
++        FisherF {
++            numer: ChiSquared::new(m),
++            denom: ChiSquared::new(n),
++            dof_ratio: n / m
++        }
++    }
++}
++impl Sample<f64> for FisherF {
++    fn sample<R: Rng>(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) }
++}
++impl IndependentSample<f64> for FisherF {
++    fn ind_sample<R: Rng>(&self, rng: &mut R) -> f64 {
++        self.numer.ind_sample(rng) / self.denom.ind_sample(rng) * self.dof_ratio
++    }
++}
++
++/// The Student t distribution, `t(nu)`, where `nu` is the degrees of
++/// freedom.
++///
++/// # Example
++///
++/// ```rust
++/// use rand::distributions::{StudentT, IndependentSample};
++///
++/// let t = StudentT::new(11.0);
++/// let v = t.ind_sample(&mut rand::thread_rng());
++/// println!("{} is from a t(11) distribution", v)
++/// ```
++#[derive(Clone, Copy, Debug)]
++pub struct StudentT {
++    chi: ChiSquared,
++    dof: f64
++}
++
++impl StudentT {
++    /// Create a new Student t distribution with `n` degrees of
++    /// freedom. Panics if `n <= 0`.
++    pub fn new(n: f64) -> StudentT {
++        assert!(n > 0.0, "StudentT::new called with `n <= 0`");
++        StudentT {
++            chi: ChiSquared::new(n),
++            dof: n
++        }
++    }
++}
++impl Sample<f64> for StudentT {
++    fn sample<R: Rng>(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) }
++}
++impl IndependentSample<f64> for StudentT {
++    fn ind_sample<R: Rng>(&self, rng: &mut R) -> f64 {
++        let StandardNormal(norm) = rng.gen::<StandardNormal>();
++        norm * (self.dof / self.chi.ind_sample(rng)).sqrt()
++    }
++}
++
++#[cfg(test)]
++mod test {
++    use distributions::{Sample, IndependentSample};
++    use super::{ChiSquared, StudentT, FisherF};
++
++    #[test]
++    fn test_chi_squared_one() {
++        let mut chi = ChiSquared::new(1.0);
++        let mut rng = ::test::rng();
++        for _ in 0..1000 {
++            chi.sample(&mut rng);
++            chi.ind_sample(&mut rng);
++        }
++    }
++    #[test]
++    fn test_chi_squared_small() {
++        let mut chi = ChiSquared::new(0.5);
++        let mut rng = ::test::rng();
++        for _ in 0..1000 {
++            chi.sample(&mut rng);
++            chi.ind_sample(&mut rng);
++        }
++    }
++    #[test]
++    fn test_chi_squared_large() {
++        let mut chi = ChiSquared::new(30.0);
++        let mut rng = ::test::rng();
++        for _ in 0..1000 {
++            chi.sample(&mut rng);
++            chi.ind_sample(&mut rng);
++        }
++    }
++    #[test]
++    #[should_panic]
++    fn test_chi_squared_invalid_dof() {
++        ChiSquared::new(-1.0);
++    }
++
++    #[test]
++    fn test_f() {
++        let mut f = FisherF::new(2.0, 32.0);
++        let mut rng = ::test::rng();
++        for _ in 0..1000 {
++            f.sample(&mut rng);
++            f.ind_sample(&mut rng);
++        }
++    }
++
++    #[test]
++    fn test_t() {
++        let mut t = StudentT::new(11.0);
++        let mut rng = ::test::rng();
++        for _ in 0..1000 {
++            t.sample(&mut rng);
++            t.ind_sample(&mut rng);
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f128b75c1ce8b407bcf8efcd9622984334d9f1e8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,400 @@@
++// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Sampling from random distributions.
++//!
++//! This is a generalization of `Rand` to allow parameters to control the
++//! exact properties of the generated values, e.g. the mean and standard
++//! deviation of a normal distribution. The `Sample` trait is the most
++//! general, and allows for generating values that change some state
++//! internally. The `IndependentSample` trait is for generating values
++//! that do not need to record state.
++
++use std::marker;
++
++use {Rng, Rand};
++
++pub use self::range::Range;
++pub use self::gamma::{Gamma, ChiSquared, FisherF, StudentT};
++pub use self::normal::{Normal, LogNormal};
++pub use self::exponential::Exp;
++
++pub mod range;
++pub mod gamma;
++pub mod normal;
++pub mod exponential;
++
++/// Types that can be used to create a random instance of `Support`.
++pub trait Sample<Support> {
++    /// Generate a random value of `Support`, using `rng` as the
++    /// source of randomness.
++    fn sample<R: Rng>(&mut self, rng: &mut R) -> Support;
++}
++
++/// `Sample`s that do not require keeping track of state.
++///
++/// Since no state is recorded, each sample is (statistically)
++/// independent of all others, assuming the `Rng` used has this
++/// property.
++// FIXME maybe having this separate is overkill (the only reason is to
++// take &self rather than &mut self)? or maybe this should be the
++// trait called `Sample` and the other should be `DependentSample`.
++pub trait IndependentSample<Support>: Sample<Support> {
++    /// Generate a random value.
++    fn ind_sample<R: Rng>(&self, &mut R) -> Support;
++}
++
++/// A wrapper for generating types that implement `Rand` via the
++/// `Sample` & `IndependentSample` traits.
++#[derive(Debug)]
++pub struct RandSample<Sup> {
++    _marker: marker::PhantomData<fn() -> Sup>,
++}
++
++impl<Sup> Copy for RandSample<Sup> {}
++impl<Sup> Clone for RandSample<Sup> {
++    fn clone(&self) -> Self { *self }
++}
++
++impl<Sup: Rand> Sample<Sup> for RandSample<Sup> {
++    fn sample<R: Rng>(&mut self, rng: &mut R) -> Sup { self.ind_sample(rng) }
++}
++
++impl<Sup: Rand> IndependentSample<Sup> for RandSample<Sup> {
++    fn ind_sample<R: Rng>(&self, rng: &mut R) -> Sup {
++        rng.gen()
++    }
++}
++
++impl<Sup> RandSample<Sup> {
++    pub fn new() -> RandSample<Sup> {
++        RandSample { _marker: marker::PhantomData }
++    }
++}
++
++/// A value with a particular weight for use with `WeightedChoice`.
++#[derive(Copy, Clone, Debug)]
++pub struct Weighted<T> {
++    /// The numerical weight of this item
++    pub weight: u32,
++    /// The actual item which is being weighted
++    pub item: T,
++}
++
++/// A distribution that selects from a finite collection of weighted items.
++///
++/// Each item has an associated weight that influences how likely it
++/// is to be chosen: higher weight is more likely.
++///
++/// The `Clone` restriction is a limitation of the `Sample` and
++/// `IndependentSample` traits. Note that `&T` is (cheaply) `Clone` for
++/// all `T`, as is `u32`, so one can store references or indices into
++/// another vector.
++///
++/// # Example
++///
++/// ```rust
++/// use rand::distributions::{Weighted, WeightedChoice, IndependentSample};
++///
++/// let mut items = vec!(Weighted { weight: 2, item: 'a' },
++///                      Weighted { weight: 4, item: 'b' },
++///                      Weighted { weight: 1, item: 'c' });
++/// let wc = WeightedChoice::new(&mut items);
++/// let mut rng = rand::thread_rng();
++/// for _ in 0..16 {
++///      // on average prints 'a' 4 times, 'b' 8 and 'c' twice.
++///      println!("{}", wc.ind_sample(&mut rng));
++/// }
++/// ```
++#[derive(Debug)]
++pub struct WeightedChoice<'a, T:'a> {
++    items: &'a mut [Weighted<T>],
++    weight_range: Range<u32>
++}
++
++impl<'a, T: Clone> WeightedChoice<'a, T> {
++    /// Create a new `WeightedChoice`.
++    ///
++    /// Panics if:
++    /// - `v` is empty
++    /// - the total weight is 0
++    /// - the total weight is larger than a `u32` can contain.
++    pub fn new(items: &'a mut [Weighted<T>]) -> WeightedChoice<'a, T> {
++        // strictly speaking, this is subsumed by the total weight == 0 case
++        assert!(!items.is_empty(), "WeightedChoice::new called with no items");
++
++        let mut running_total: u32 = 0;
++
++        // we convert the list from individual weights to cumulative
++        // weights so we can binary search. This *could* drop elements
++        // with weight == 0 as an optimisation.
++        for item in items.iter_mut() {
++            running_total = match running_total.checked_add(item.weight) {
++                Some(n) => n,
++                None => panic!("WeightedChoice::new called with a total weight \
++                               larger than a u32 can contain")
++            };
++
++            item.weight = running_total;
++        }
++        assert!(running_total != 0, "WeightedChoice::new called with a total weight of 0");
++
++        WeightedChoice {
++            items: items,
++            // we're likely to be generating numbers in this range
++            // relatively often, so might as well cache it
++            weight_range: Range::new(0, running_total)
++        }
++    }
++}
++
++impl<'a, T: Clone> Sample<T> for WeightedChoice<'a, T> {
++    fn sample<R: Rng>(&mut self, rng: &mut R) -> T { self.ind_sample(rng) }
++}
++
++impl<'a, T: Clone> IndependentSample<T> for WeightedChoice<'a, T> {
++    fn ind_sample<R: Rng>(&self, rng: &mut R) -> T {
++        // we want to find the first element that has cumulative
++        // weight > sample_weight, which we do by binary since the
++        // cumulative weights of self.items are sorted.
++
++        // choose a weight in [0, total_weight)
++        let sample_weight = self.weight_range.ind_sample(rng);
++
++        // short circuit when it's the first item
++        if sample_weight < self.items[0].weight {
++            return self.items[0].item.clone();
++        }
++
++        let mut idx = 0;
++        let mut modifier = self.items.len();
++
++        // now we know that every possibility has an element to the
++        // left, so we can just search for the last element that has
++        // cumulative weight <= sample_weight, then the next one will
++        // be "it". (Note that this greatest element will never be the
++        // last element of the vector, since sample_weight is chosen
++        // in [0, total_weight) and the cumulative weight of the last
++        // one is exactly the total weight.)
++        while modifier > 1 {
++            let i = idx + modifier / 2;
++            if self.items[i].weight <= sample_weight {
++                // we're small, so look to the right, but allow this
++                // exact element still.
++                idx = i;
++                // we need the `/ 2` to round up otherwise we'll drop
++                // the trailing elements when `modifier` is odd.
++                modifier += 1;
++            } else {
++                // otherwise we're too big, so go left. (i.e. do
++                // nothing)
++            }
++            modifier /= 2;
++        }
++        return self.items[idx + 1].item.clone();
++    }
++}
++
++mod ziggurat_tables;
++
++/// Sample a random number using the Ziggurat method (specifically the
++/// ZIGNOR variant from Doornik 2005). Most of the arguments are
++/// directly from the paper:
++///
++/// * `rng`: source of randomness
++/// * `symmetric`: whether this is a symmetric distribution, or one-sided with P(x < 0) = 0.
++/// * `X`: the $x_i$ abscissae.
++/// * `F`: precomputed values of the PDF at the $x_i$, (i.e. $f(x_i)$)
++/// * `F_DIFF`: precomputed values of $f(x_i) - f(x_{i+1})$
++/// * `pdf`: the probability density function
++/// * `zero_case`: manual sampling from the tail when we chose the
++///    bottom box (i.e. i == 0)
++
++// the perf improvement (25-50%) is definitely worth the extra code
++// size from force-inlining.
++#[inline(always)]
++fn ziggurat<R: Rng, P, Z>(
++            rng: &mut R,
++            symmetric: bool,
++            x_tab: ziggurat_tables::ZigTable,
++            f_tab: ziggurat_tables::ZigTable,
++            mut pdf: P,
++            mut zero_case: Z)
++            -> f64 where P: FnMut(f64) -> f64, Z: FnMut(&mut R, f64) -> f64 {
++    const SCALE: f64 = (1u64 << 53) as f64;
++    loop {
++        // reimplement the f64 generation as an optimisation suggested
++        // by the Doornik paper: we have a lot of precision-space
++        // (i.e. there are 11 bits of the 64 of a u64 to use after
++        // creating a f64), so we might as well reuse some to save
++        // generating a whole extra random number. (Seems to be 15%
++        // faster.)
++        //
++        // This unfortunately misses out on the benefits of direct
++        // floating point generation if an RNG like dSMFT is
++        // used. (That is, such RNGs create floats directly, highly
++        // efficiently and overload next_f32/f64, so by not calling it
++        // this may be slower than it would be otherwise.)
++        // FIXME: investigate/optimise for the above.
++        let bits: u64 = rng.gen();
++        let i = (bits & 0xff) as usize;
++        let f = (bits >> 11) as f64 / SCALE;
++
++        // u is either U(-1, 1) or U(0, 1) depending on if this is a
++        // symmetric distribution or not.
++        let u = if symmetric {2.0 * f - 1.0} else {f};
++        let x = u * x_tab[i];
++
++        let test_x = if symmetric { x.abs() } else {x};
++
++        // algebraically equivalent to |u| < x_tab[i+1]/x_tab[i] (or u < x_tab[i+1]/x_tab[i])
++        if test_x < x_tab[i + 1] {
++            return x;
++        }
++        if i == 0 {
++            return zero_case(rng, u);
++        }
++        // algebraically equivalent to f1 + DRanU()*(f0 - f1) < 1
++        if f_tab[i + 1] + (f_tab[i] - f_tab[i + 1]) * rng.gen::<f64>() < pdf(x) {
++            return x;
++        }
++    }
++}
++
++#[cfg(test)]
++mod tests {
++
++    use {Rng, Rand};
++    use super::{RandSample, WeightedChoice, Weighted, Sample, IndependentSample};
++
++    #[derive(PartialEq, Debug)]
++    struct ConstRand(usize);
++    impl Rand for ConstRand {
++        fn rand<R: Rng>(_: &mut R) -> ConstRand {
++            ConstRand(0)
++        }
++    }
++
++    // 0, 1, 2, 3, ...
++    struct CountingRng { i: u32 }
++    impl Rng for CountingRng {
++        fn next_u32(&mut self) -> u32 {
++            self.i += 1;
++            self.i - 1
++        }
++        fn next_u64(&mut self) -> u64 {
++            self.next_u32() as u64
++        }
++    }
++
++    #[test]
++    fn test_rand_sample() {
++        let mut rand_sample = RandSample::<ConstRand>::new();
++
++        assert_eq!(rand_sample.sample(&mut ::test::rng()), ConstRand(0));
++        assert_eq!(rand_sample.ind_sample(&mut ::test::rng()), ConstRand(0));
++    }
++    #[test]
++    fn test_weighted_choice() {
++        // this makes assumptions about the internal implementation of
++        // WeightedChoice, specifically: it doesn't reorder the items,
++        // it doesn't do weird things to the RNG (so 0 maps to 0, 1 to
++        // 1, internally; modulo a modulo operation).
++
++        macro_rules! t {
++            ($items:expr, $expected:expr) => {{
++                let mut items = $items;
++                let wc = WeightedChoice::new(&mut items);
++                let expected = $expected;
++
++                let mut rng = CountingRng { i: 0 };
++
++                for &val in expected.iter() {
++                    assert_eq!(wc.ind_sample(&mut rng), val)
++                }
++            }}
++        }
++
++        t!(vec!(Weighted { weight: 1, item: 10}), [10]);
++
++        // skip some
++        t!(vec!(Weighted { weight: 0, item: 20},
++                Weighted { weight: 2, item: 21},
++                Weighted { weight: 0, item: 22},
++                Weighted { weight: 1, item: 23}),
++           [21,21, 23]);
++
++        // different weights
++        t!(vec!(Weighted { weight: 4, item: 30},
++                Weighted { weight: 3, item: 31}),
++           [30,30,30,30, 31,31,31]);
++
++        // check that we're binary searching
++        // correctly with some vectors of odd
++        // length.
++        t!(vec!(Weighted { weight: 1, item: 40},
++                Weighted { weight: 1, item: 41},
++                Weighted { weight: 1, item: 42},
++                Weighted { weight: 1, item: 43},
++                Weighted { weight: 1, item: 44}),
++           [40, 41, 42, 43, 44]);
++        t!(vec!(Weighted { weight: 1, item: 50},
++                Weighted { weight: 1, item: 51},
++                Weighted { weight: 1, item: 52},
++                Weighted { weight: 1, item: 53},
++                Weighted { weight: 1, item: 54},
++                Weighted { weight: 1, item: 55},
++                Weighted { weight: 1, item: 56}),
++           [50, 51, 52, 53, 54, 55, 56]);
++    }
++
++    #[test]
++    fn test_weighted_clone_initialization() {
++        let initial : Weighted<u32> = Weighted {weight: 1, item: 1};
++        let clone = initial.clone();
++        assert_eq!(initial.weight, clone.weight);
++        assert_eq!(initial.item, clone.item);
++    }
++
++    #[test] #[should_panic]
++    fn test_weighted_clone_change_weight() {
++        let initial : Weighted<u32> = Weighted {weight: 1, item: 1};
++        let mut clone = initial.clone();
++        clone.weight = 5;
++        assert_eq!(initial.weight, clone.weight);
++    }
++
++    #[test] #[should_panic]
++    fn test_weighted_clone_change_item() {
++        let initial : Weighted<u32> = Weighted {weight: 1, item: 1};
++        let mut clone = initial.clone();
++        clone.item = 5;
++        assert_eq!(initial.item, clone.item);
++
++    }
++
++    #[test] #[should_panic]
++    fn test_weighted_choice_no_items() {
++        WeightedChoice::<isize>::new(&mut []);
++    }
++    #[test] #[should_panic]
++    fn test_weighted_choice_zero_weight() {
++        WeightedChoice::new(&mut [Weighted { weight: 0, item: 0},
++                                  Weighted { weight: 0, item: 1}]);
++    }
++    #[test] #[should_panic]
++    fn test_weighted_choice_weight_overflows() {
++        let x = ::std::u32::MAX / 2; // x + x + 2 is the overflow
++        WeightedChoice::new(&mut [Weighted { weight: x, item: 0 },
++                                  Weighted { weight: 1, item: 1 },
++                                  Weighted { weight: x, item: 2 },
++                                  Weighted { weight: 1, item: 3 }]);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..280613d8595db2f9bc56bd430804822a4b92c26f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! The normal and derived distributions.
++
++use {Rng, Rand, Open01};
++use distributions::{ziggurat, ziggurat_tables, Sample, IndependentSample};
++
++/// A wrapper around an `f64` to generate N(0, 1) random numbers
++/// (a.k.a.  a standard normal, or Gaussian).
++///
++/// See `Normal` for the general normal distribution.
++///
++/// Implemented via the ZIGNOR variant[1] of the Ziggurat method.
++///
++/// [1]: Jurgen A. Doornik (2005). [*An Improved Ziggurat Method to
++/// Generate Normal Random
++/// Samples*](http://www.doornik.com/research/ziggurat.pdf). Nuffield
++/// College, Oxford
++///
++/// # Example
++///
++/// ```rust
++/// use rand::distributions::normal::StandardNormal;
++///
++/// let StandardNormal(x) = rand::random();
++/// println!("{}", x);
++/// ```
++#[derive(Clone, Copy, Debug)]
++pub struct StandardNormal(pub f64);
++
++impl Rand for StandardNormal {
++    fn rand<R:Rng>(rng: &mut R) -> StandardNormal {
++        #[inline]
++        fn pdf(x: f64) -> f64 {
++            (-x*x/2.0).exp()
++        }
++        #[inline]
++        fn zero_case<R:Rng>(rng: &mut R, u: f64) -> f64 {
++            // compute a random number in the tail by hand
++
++            // strange initial conditions, because the loop is not
++            // do-while, so the condition should be true on the first
++            // run, they get overwritten anyway (0 < 1, so these are
++            // good).
++            let mut x = 1.0f64;
++            let mut y = 0.0f64;
++
++            while -2.0 * y < x * x {
++                let Open01(x_) = rng.gen::<Open01<f64>>();
++                let Open01(y_) = rng.gen::<Open01<f64>>();
++
++                x = x_.ln() / ziggurat_tables::ZIG_NORM_R;
++                y = y_.ln();
++            }
++
++            if u < 0.0 { x - ziggurat_tables::ZIG_NORM_R } else { ziggurat_tables::ZIG_NORM_R - x }
++        }
++
++        StandardNormal(ziggurat(
++            rng,
++            true, // this is symmetric
++            &ziggurat_tables::ZIG_NORM_X,
++            &ziggurat_tables::ZIG_NORM_F,
++            pdf, zero_case))
++    }
++}
++
++/// The normal distribution `N(mean, std_dev**2)`.
++///
++/// This uses the ZIGNOR variant of the Ziggurat method, see
++/// `StandardNormal` for more details.
++///
++/// # Example
++///
++/// ```rust
++/// use rand::distributions::{Normal, IndependentSample};
++///
++/// // mean 2, standard deviation 3
++/// let normal = Normal::new(2.0, 3.0);
++/// let v = normal.ind_sample(&mut rand::thread_rng());
++/// println!("{} is from a N(2, 9) distribution", v)
++/// ```
++#[derive(Clone, Copy, Debug)]
++pub struct Normal {
++    mean: f64,
++    std_dev: f64,
++}
++
++impl Normal {
++    /// Construct a new `Normal` distribution with the given mean and
++    /// standard deviation.
++    ///
++    /// # Panics
++    ///
++    /// Panics if `std_dev < 0`.
++    #[inline]
++    pub fn new(mean: f64, std_dev: f64) -> Normal {
++        assert!(std_dev >= 0.0, "Normal::new called with `std_dev` < 0");
++        Normal {
++            mean: mean,
++            std_dev: std_dev
++        }
++    }
++}
++impl Sample<f64> for Normal {
++    fn sample<R: Rng>(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) }
++}
++impl IndependentSample<f64> for Normal {
++    fn ind_sample<R: Rng>(&self, rng: &mut R) -> f64 {
++        let StandardNormal(n) = rng.gen::<StandardNormal>();
++        self.mean + self.std_dev * n
++    }
++}
++
++
++/// The log-normal distribution `ln N(mean, std_dev**2)`.
++///
++/// If `X` is log-normal distributed, then `ln(X)` is `N(mean,
++/// std_dev**2)` distributed.
++///
++/// # Example
++///
++/// ```rust
++/// use rand::distributions::{LogNormal, IndependentSample};
++///
++/// // mean 2, standard deviation 3
++/// let log_normal = LogNormal::new(2.0, 3.0);
++/// let v = log_normal.ind_sample(&mut rand::thread_rng());
++/// println!("{} is from an ln N(2, 9) distribution", v)
++/// ```
++#[derive(Clone, Copy, Debug)]
++pub struct LogNormal {
++    norm: Normal
++}
++
++impl LogNormal {
++    /// Construct a new `LogNormal` distribution with the given mean
++    /// and standard deviation.
++    ///
++    /// # Panics
++    ///
++    /// Panics if `std_dev < 0`.
++    #[inline]
++    pub fn new(mean: f64, std_dev: f64) -> LogNormal {
++        assert!(std_dev >= 0.0, "LogNormal::new called with `std_dev` < 0");
++        LogNormal { norm: Normal::new(mean, std_dev) }
++    }
++}
++impl Sample<f64> for LogNormal {
++    fn sample<R: Rng>(&mut self, rng: &mut R) -> f64 { self.ind_sample(rng) }
++}
++impl IndependentSample<f64> for LogNormal {
++    fn ind_sample<R: Rng>(&self, rng: &mut R) -> f64 {
++        self.norm.ind_sample(rng).exp()
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use distributions::{Sample, IndependentSample};
++    use super::{Normal, LogNormal};
++
++    #[test]
++    fn test_normal() {
++        let mut norm = Normal::new(10.0, 10.0);
++        let mut rng = ::test::rng();
++        for _ in 0..1000 {
++            norm.sample(&mut rng);
++            norm.ind_sample(&mut rng);
++        }
++    }
++    #[test]
++    #[should_panic]
++    fn test_normal_invalid_sd() {
++        Normal::new(10.0, -1.0);
++    }
++
++
++    #[test]
++    fn test_log_normal() {
++        let mut lnorm = LogNormal::new(10.0, 10.0);
++        let mut rng = ::test::rng();
++        for _ in 0..1000 {
++            lnorm.sample(&mut rng);
++            lnorm.ind_sample(&mut rng);
++        }
++    }
++    #[test]
++    #[should_panic]
++    fn test_log_normal_invalid_sd() {
++        LogNormal::new(10.0, -1.0);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7206941d0dcb2879027a09fc1a30f0a3d5c8b35c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,233 @@@
++// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Generating numbers between two others.
++
++// this is surprisingly complicated to be both generic & correct
++
++use std::num::Wrapping as w;
++
++use Rng;
++use distributions::{Sample, IndependentSample};
++
++/// Sample values uniformly between two bounds.
++///
++/// This gives a uniform distribution (assuming the RNG used to sample
++/// it is itself uniform & the `SampleRange` implementation for the
++/// given type is correct), even for edge cases like `low = 0u8`,
++/// `high = 170u8`, for which a naive modulo operation would return
++/// numbers less than 85 with double the probability to those greater
++/// than 85.
++///
++/// Types should attempt to sample in `[low, high)`, i.e., not
++/// including `high`, but this may be very difficult. All the
++/// primitive integer types satisfy this property, and the float types
++/// normally satisfy it, but rounding may mean `high` can occur.
++///
++/// # Example
++///
++/// ```rust
++/// use rand::distributions::{IndependentSample, Range};
++///
++/// fn main() {
++///     let between = Range::new(10, 10000);
++///     let mut rng = rand::thread_rng();
++///     let mut sum = 0;
++///     for _ in 0..1000 {
++///         sum += between.ind_sample(&mut rng);
++///     }
++///     println!("{}", sum);
++/// }
++/// ```
++#[derive(Clone, Copy, Debug)]
++pub struct Range<X> {
++    low: X,
++    range: X,
++    accept_zone: X
++}
++
++impl<X: SampleRange + PartialOrd> Range<X> {
++    /// Create a new `Range` instance that samples uniformly from
++    /// `[low, high)`. Panics if `low >= high`.
++    pub fn new(low: X, high: X) -> Range<X> {
++        assert!(low < high, "Range::new called with `low >= high`");
++        SampleRange::construct_range(low, high)
++    }
++}
++
++impl<Sup: SampleRange> Sample<Sup> for Range<Sup> {
++    #[inline]
++    fn sample<R: Rng>(&mut self, rng: &mut R) -> Sup { self.ind_sample(rng) }
++}
++impl<Sup: SampleRange> IndependentSample<Sup> for Range<Sup> {
++    fn ind_sample<R: Rng>(&self, rng: &mut R) -> Sup {
++        SampleRange::sample_range(self, rng)
++    }
++}
++
++/// The helper trait for types that have a sensible way to sample
++/// uniformly between two values. This should not be used directly,
++/// and is only to facilitate `Range`.
++pub trait SampleRange : Sized {
++    /// Construct the `Range` object that `sample_range`
++    /// requires. This should not ever be called directly, only via
++    /// `Range::new`, which will check that `low < high`, so this
++    /// function doesn't have to repeat the check.
++    fn construct_range(low: Self, high: Self) -> Range<Self>;
++
++    /// Sample a value from the given `Range` with the given `Rng` as
++    /// a source of randomness.
++    fn sample_range<R: Rng>(r: &Range<Self>, rng: &mut R) -> Self;
++}
++
++macro_rules! integer_impl {
++    ($ty:ty, $unsigned:ident) => {
++        impl SampleRange for $ty {
++            // we play free and fast with unsigned vs signed here
++            // (when $ty is signed), but that's fine, since the
++            // contract of this macro is for $ty and $unsigned to be
++            // "bit-equal", so casting between them is a no-op & a
++            // bijection.
++
++            #[inline]
++            fn construct_range(low: $ty, high: $ty) -> Range<$ty> {
++                let range = (w(high as $unsigned) - w(low as $unsigned)).0;
++                let unsigned_max: $unsigned = ::std::$unsigned::MAX;
++
++                // this is the largest number that fits into $unsigned
++                // that `range` divides evenly, so, if we've sampled
++                // `n` uniformly from this region, then `n % range` is
++                // uniform in [0, range)
++                let zone = unsigned_max - unsigned_max % range;
++
++                Range {
++                    low: low,
++                    range: range as $ty,
++                    accept_zone: zone as $ty
++                }
++            }
++
++            #[inline]
++            fn sample_range<R: Rng>(r: &Range<$ty>, rng: &mut R) -> $ty {
++                loop {
++                    // rejection sample
++                    let v = rng.gen::<$unsigned>();
++                    // until we find something that fits into the
++                    // region which r.range evenly divides (this will
++                    // be uniformly distributed)
++                    if v < r.accept_zone as $unsigned {
++                        // and return it, with some adjustments
++                        return (w(r.low) + w((v % r.range as $unsigned) as $ty)).0;
++                    }
++                }
++            }
++        }
++    }
++}
++
++integer_impl! { i8, u8 }
++integer_impl! { i16, u16 }
++integer_impl! { i32, u32 }
++integer_impl! { i64, u64 }
++integer_impl! { isize, usize }
++integer_impl! { u8, u8 }
++integer_impl! { u16, u16 }
++integer_impl! { u32, u32 }
++integer_impl! { u64, u64 }
++integer_impl! { usize, usize }
++
++macro_rules! float_impl {
++    ($ty:ty) => {
++        impl SampleRange for $ty {
++            fn construct_range(low: $ty, high: $ty) -> Range<$ty> {
++                Range {
++                    low: low,
++                    range: high - low,
++                    accept_zone: 0.0 // unused
++                }
++            }
++            fn sample_range<R: Rng>(r: &Range<$ty>, rng: &mut R) -> $ty {
++                r.low + r.range * rng.gen::<$ty>()
++            }
++        }
++    }
++}
++
++float_impl! { f32 }
++float_impl! { f64 }
++
++#[cfg(test)]
++mod tests {
++    use distributions::{Sample, IndependentSample};
++    use super::Range as Range;
++
++    #[should_panic]
++    #[test]
++    fn test_range_bad_limits_equal() {
++        Range::new(10, 10);
++    }
++    #[should_panic]
++    #[test]
++    fn test_range_bad_limits_flipped() {
++        Range::new(10, 5);
++    }
++
++    #[test]
++    fn test_integers() {
++        let mut rng = ::test::rng();
++        macro_rules! t {
++            ($($ty:ident),*) => {{
++                $(
++                   let v: &[($ty, $ty)] = &[(0, 10),
++                                            (10, 127),
++                                            (::std::$ty::MIN, ::std::$ty::MAX)];
++                   for &(low, high) in v.iter() {
++                        let mut sampler: Range<$ty> = Range::new(low, high);
++                        for _ in 0..1000 {
++                            let v = sampler.sample(&mut rng);
++                            assert!(low <= v && v < high);
++                            let v = sampler.ind_sample(&mut rng);
++                            assert!(low <= v && v < high);
++                        }
++                    }
++                 )*
++            }}
++        }
++        t!(i8, i16, i32, i64, isize,
++           u8, u16, u32, u64, usize)
++    }
++
++    #[test]
++    fn test_floats() {
++        let mut rng = ::test::rng();
++        macro_rules! t {
++            ($($ty:ty),*) => {{
++                $(
++                   let v: &[($ty, $ty)] = &[(0.0, 100.0),
++                                            (-1e35, -1e25),
++                                            (1e-35, 1e-25),
++                                            (-1e35, 1e35)];
++                   for &(low, high) in v.iter() {
++                        let mut sampler: Range<$ty> = Range::new(low, high);
++                        for _ in 0..1000 {
++                            let v = sampler.sample(&mut rng);
++                            assert!(low <= v && v < high);
++                            let v = sampler.ind_sample(&mut rng);
++                            assert!(low <= v && v < high);
++                        }
++                    }
++                 )*
++            }}
++        }
++
++        t!(f32, f64)
++    }
++
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b6de4bf892cdfb658def734e365de8eaf9aa0bea
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,280 @@@
++// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++// Tables for distributions which are sampled using the ziggurat
++// algorithm. Autogenerated by `ziggurat_tables.py`.
++
++pub type ZigTable = &'static [f64; 257];
++pub const ZIG_NORM_R: f64 = 3.654152885361008796;
++pub static ZIG_NORM_X: [f64; 257] =
++    [3.910757959537090045, 3.654152885361008796, 3.449278298560964462, 3.320244733839166074,
++     3.224575052047029100, 3.147889289517149969, 3.083526132001233044, 3.027837791768635434,
++     2.978603279880844834, 2.934366867207854224, 2.894121053612348060, 2.857138730872132548,
++     2.822877396825325125, 2.790921174000785765, 2.760944005278822555, 2.732685359042827056,
++     2.705933656121858100, 2.680514643284522158, 2.656283037575502437, 2.633116393630324570,
++     2.610910518487548515, 2.589575986706995181, 2.569035452680536569, 2.549221550323460761,
++     2.530075232158516929, 2.511544441625342294, 2.493583041269680667, 2.476149939669143318,
++     2.459208374333311298, 2.442725318198956774, 2.426670984935725972, 2.411018413899685520,
++     2.395743119780480601, 2.380822795170626005, 2.366237056715818632, 2.351967227377659952,
++     2.337996148795031370, 2.324308018869623016, 2.310888250599850036, 2.297723348901329565,
++     2.284800802722946056, 2.272108990226823888, 2.259637095172217780, 2.247375032945807760,
++     2.235313384928327984, 2.223443340090905718, 2.211756642882544366, 2.200245546609647995,
++     2.188902771624720689, 2.177721467738641614, 2.166695180352645966, 2.155817819875063268,
++     2.145083634046203613, 2.134487182844320152, 2.124023315687815661, 2.113687150684933957,
++     2.103474055713146829, 2.093379631137050279, 2.083399693996551783, 2.073530263516978778,
++     2.063767547809956415, 2.054107931648864849, 2.044547965215732788, 2.035084353727808715,
++     2.025713947862032960, 2.016433734904371722, 2.007240830558684852, 1.998132471356564244,
++     1.989106007615571325, 1.980158896898598364, 1.971288697931769640, 1.962493064942461896,
++     1.953769742382734043, 1.945116560006753925, 1.936531428273758904, 1.928012334050718257,
++     1.919557336591228847, 1.911164563769282232, 1.902832208548446369, 1.894558525668710081,
++     1.886341828534776388, 1.878180486290977669, 1.870072921069236838, 1.862017605397632281,
++     1.854013059758148119, 1.846057850283119750, 1.838150586580728607, 1.830289919680666566,
++     1.822474540091783224, 1.814703175964167636, 1.806974591348693426, 1.799287584547580199,
++     1.791640986550010028, 1.784033659547276329, 1.776464495522344977, 1.768932414909077933,
++     1.761436365316706665, 1.753975320315455111, 1.746548278279492994, 1.739154261283669012,
++     1.731792314050707216, 1.724461502945775715, 1.717160915015540690, 1.709889657069006086,
++     1.702646854797613907, 1.695431651932238548, 1.688243209434858727, 1.681080704722823338,
++     1.673943330923760353, 1.666830296159286684, 1.659740822855789499, 1.652674147080648526,
++     1.645629517902360339, 1.638606196773111146, 1.631603456932422036, 1.624620582830568427,
++     1.617656869570534228, 1.610711622367333673, 1.603784156023583041, 1.596873794420261339,
++     1.589979870021648534, 1.583101723393471438, 1.576238702733332886, 1.569390163412534456,
++     1.562555467528439657, 1.555733983466554893, 1.548925085471535512, 1.542128153226347553,
++     1.535342571438843118, 1.528567729435024614, 1.521803020758293101, 1.515047842773992404,
++     1.508301596278571965, 1.501563685112706548, 1.494833515777718391, 1.488110497054654369,
++     1.481394039625375747, 1.474683555695025516, 1.467978458615230908, 1.461278162507407830,
++     1.454582081885523293, 1.447889631277669675, 1.441200224845798017, 1.434513276002946425,
++     1.427828197027290358, 1.421144398672323117, 1.414461289772464658, 1.407778276843371534,
++     1.401094763676202559, 1.394410150925071257, 1.387723835686884621, 1.381035211072741964,
++     1.374343665770030531, 1.367648583594317957, 1.360949343030101844, 1.354245316759430606,
++     1.347535871177359290, 1.340820365893152122, 1.334098153216083604, 1.327368577624624679,
++     1.320630975217730096, 1.313884673146868964, 1.307128989027353860, 1.300363230327433728,
++     1.293586693733517645, 1.286798664489786415, 1.279998415710333237, 1.273185207661843732,
++     1.266358287014688333, 1.259516886060144225, 1.252660221891297887, 1.245787495544997903,
++     1.238897891102027415, 1.231990574742445110, 1.225064693752808020, 1.218119375481726552,
++     1.211153726239911244, 1.204166830140560140, 1.197157747875585931, 1.190125515422801650,
++     1.183069142678760732, 1.175987612011489825, 1.168879876726833800, 1.161744859441574240,
++     1.154581450355851802, 1.147388505416733873, 1.140164844363995789, 1.132909248648336975,
++     1.125620459211294389, 1.118297174115062909, 1.110938046009249502, 1.103541679420268151,
++     1.096106627847603487, 1.088631390649514197, 1.081114409698889389, 1.073554065787871714,
++     1.065948674757506653, 1.058296483326006454, 1.050595664586207123, 1.042844313139370538,
++     1.035040439828605274, 1.027181966030751292, 1.019266717460529215, 1.011292417434978441,
++     1.003256679539591412, 0.995156999629943084, 0.986990747093846266, 0.978755155288937750,
++     0.970447311058864615, 0.962064143217605250, 0.953602409875572654, 0.945058684462571130,
++     0.936429340280896860, 0.927710533396234771, 0.918898183643734989, 0.909987953490768997,
++     0.900975224455174528, 0.891855070726792376, 0.882622229578910122, 0.873271068082494550,
++     0.863795545546826915, 0.854189171001560554, 0.844444954902423661, 0.834555354079518752,
++     0.824512208745288633, 0.814306670128064347, 0.803929116982664893, 0.793369058833152785,
++     0.782615023299588763, 0.771654424216739354, 0.760473406422083165, 0.749056662009581653,
++     0.737387211425838629, 0.725446140901303549, 0.713212285182022732, 0.700661841097584448,
++     0.687767892786257717, 0.674499822827436479, 0.660822574234205984, 0.646695714884388928,
++     0.632072236375024632, 0.616896989996235545, 0.601104617743940417, 0.584616766093722262,
++     0.567338257040473026, 0.549151702313026790, 0.529909720646495108, 0.509423329585933393,
++     0.487443966121754335, 0.463634336771763245, 0.437518402186662658, 0.408389134588000746,
++     0.375121332850465727, 0.335737519180459465, 0.286174591747260509, 0.215241895913273806,
++     0.000000000000000000];
++pub static ZIG_NORM_F: [f64; 257] =
++    [0.000477467764586655, 0.001260285930498598, 0.002609072746106363, 0.004037972593371872,
++     0.005522403299264754, 0.007050875471392110, 0.008616582769422917, 0.010214971439731100,
++     0.011842757857943104, 0.013497450601780807, 0.015177088307982072, 0.016880083152595839,
++     0.018605121275783350, 0.020351096230109354, 0.022117062707379922, 0.023902203305873237,
++     0.025705804008632656, 0.027527235669693315, 0.029365939758230111, 0.031221417192023690,
++     0.033093219458688698, 0.034980941461833073, 0.036884215688691151, 0.038802707404656918,
++     0.040736110656078753, 0.042684144916619378, 0.044646552251446536, 0.046623094902089664,
++     0.048613553216035145, 0.050617723861121788, 0.052635418276973649, 0.054666461325077916,
++     0.056710690106399467, 0.058767952921137984, 0.060838108349751806, 0.062921024437977854,
++     0.065016577971470438, 0.067124653828023989, 0.069245144397250269, 0.071377949059141965,
++     0.073522973714240991, 0.075680130359194964, 0.077849336702372207, 0.080030515814947509,
++     0.082223595813495684, 0.084428509570654661, 0.086645194450867782, 0.088873592068594229,
++     0.091113648066700734, 0.093365311913026619, 0.095628536713353335, 0.097903279039215627,
++     0.100189498769172020, 0.102487158942306270, 0.104796225622867056, 0.107116667775072880,
++     0.109448457147210021, 0.111791568164245583, 0.114145977828255210, 0.116511665626037014,
++     0.118888613443345698, 0.121276805485235437, 0.123676228202051403, 0.126086870220650349,
++     0.128508722280473636, 0.130941777174128166, 0.133386029692162844, 0.135841476571757352,
++     0.138308116449064322, 0.140785949814968309, 0.143274978974047118, 0.145775208006537926,
++     0.148286642733128721, 0.150809290682410169, 0.153343161060837674, 0.155888264725064563,
++     0.158444614156520225, 0.161012223438117663, 0.163591108232982951, 0.166181285765110071,
++     0.168782774801850333, 0.171395595638155623, 0.174019770082499359, 0.176655321444406654,
++     0.179302274523530397, 0.181960655600216487, 0.184630492427504539, 0.187311814224516926,
++     0.190004651671193070, 0.192709036904328807, 0.195425003514885592, 0.198152586546538112,
++     0.200891822495431333, 0.203642749311121501, 0.206405406398679298, 0.209179834621935651,
++     0.211966076307852941, 0.214764175252008499, 0.217574176725178370, 0.220396127481011589,
++     0.223230075764789593, 0.226076071323264877, 0.228934165415577484, 0.231804410825248525,
++     0.234686861873252689, 0.237581574432173676, 0.240488605941449107, 0.243408015423711988,
++     0.246339863502238771, 0.249284212419516704, 0.252241126056943765, 0.255210669955677150,
++     0.258192911338648023, 0.261187919133763713, 0.264195763998317568, 0.267216518344631837,
++     0.270250256366959984, 0.273297054069675804, 0.276356989296781264, 0.279430141762765316,
++     0.282516593084849388, 0.285616426816658109, 0.288729728483353931, 0.291856585618280984,
++     0.294997087801162572, 0.298151326697901342, 0.301319396102034120, 0.304501391977896274,
++     0.307697412505553769, 0.310907558127563710, 0.314131931597630143, 0.317370638031222396,
++     0.320623784958230129, 0.323891482377732021, 0.327173842814958593, 0.330470981380537099,
++     0.333783015832108509, 0.337110066638412809, 0.340452257045945450, 0.343809713148291340,
++     0.347182563958251478, 0.350570941482881204, 0.353974980801569250, 0.357394820147290515,
++     0.360830600991175754, 0.364282468130549597, 0.367750569780596226, 0.371235057669821344,
++     0.374736087139491414, 0.378253817247238111, 0.381788410875031348, 0.385340034841733958,
++     0.388908860020464597, 0.392495061461010764, 0.396098818517547080, 0.399720314981931668,
++     0.403359739222868885, 0.407017284331247953, 0.410693148271983222, 0.414387534042706784,
++     0.418100649839684591, 0.421832709231353298, 0.425583931339900579, 0.429354541031341519,
++     0.433144769114574058, 0.436954852549929273, 0.440785034667769915, 0.444635565397727750,
++     0.448506701509214067, 0.452398706863882505, 0.456311852680773566, 0.460246417814923481,
++     0.464202689050278838, 0.468180961407822172, 0.472181538469883255, 0.476204732721683788,
++     0.480250865911249714, 0.484320269428911598, 0.488413284707712059, 0.492530263646148658,
++     0.496671569054796314, 0.500837575128482149, 0.505028667945828791, 0.509245245998136142,
++     0.513487720749743026, 0.517756517232200619, 0.522052074674794864, 0.526374847174186700,
++     0.530725304406193921, 0.535103932383019565, 0.539511234259544614, 0.543947731192649941,
++     0.548413963257921133, 0.552910490428519918, 0.557437893621486324, 0.561996775817277916,
++     0.566587763258951771, 0.571211506738074970, 0.575868682975210544, 0.580559996103683473,
++     0.585286179266300333, 0.590047996335791969, 0.594846243770991268, 0.599681752622167719,
++     0.604555390700549533, 0.609468064928895381, 0.614420723892076803, 0.619414360609039205,
++     0.624450015550274240, 0.629528779928128279, 0.634651799290960050, 0.639820277456438991,
++     0.645035480824251883, 0.650298743114294586, 0.655611470583224665, 0.660975147780241357,
++     0.666391343912380640, 0.671861719900766374, 0.677388036222513090, 0.682972161648791376,
++     0.688616083008527058, 0.694321916130032579, 0.700091918140490099, 0.705928501336797409,
++     0.711834248882358467, 0.717811932634901395, 0.723864533472881599, 0.729995264565802437,
++     0.736207598131266683, 0.742505296344636245, 0.748892447223726720, 0.755373506511754500,
++     0.761953346841546475, 0.768637315803334831, 0.775431304986138326, 0.782341832659861902,
++     0.789376143571198563, 0.796542330428254619, 0.803849483176389490, 0.811307874318219935,
++     0.818929191609414797, 0.826726833952094231, 0.834716292992930375, 0.842915653118441077,
++     0.851346258465123684, 0.860033621203008636, 0.869008688043793165, 0.878309655816146839,
++     0.887984660763399880, 0.898095921906304051, 0.908726440060562912, 0.919991505048360247,
++     0.932060075968990209, 0.945198953453078028, 0.959879091812415930, 0.977101701282731328,
++     1.000000000000000000];
++pub const ZIG_EXP_R: f64 = 7.697117470131050077;
++pub static ZIG_EXP_X: [f64; 257] =
++    [8.697117470131052741, 7.697117470131050077, 6.941033629377212577, 6.478378493832569696,
++     6.144164665772472667, 5.882144315795399869, 5.666410167454033697, 5.482890627526062488,
++     5.323090505754398016, 5.181487281301500047, 5.054288489981304089, 4.938777085901250530,
++     4.832939741025112035, 4.735242996601741083, 4.644491885420085175, 4.559737061707351380,
++     4.480211746528421912, 4.405287693473573185, 4.334443680317273007, 4.267242480277365857,
++     4.203313713735184365, 4.142340865664051464, 4.084051310408297830, 4.028208544647936762,
++     3.974606066673788796, 3.923062500135489739, 3.873417670399509127, 3.825529418522336744,
++     3.779270992411667862, 3.734528894039797375, 3.691201090237418825, 3.649195515760853770,
++     3.608428813128909507, 3.568825265648337020, 3.530315889129343354, 3.492837654774059608,
++     3.456332821132760191, 3.420748357251119920, 3.386035442460300970, 3.352149030900109405,
++     3.319047470970748037, 3.286692171599068679, 3.255047308570449882, 3.224079565286264160,
++     3.193757903212240290, 3.164053358025972873, 3.134938858084440394, 3.106389062339824481,
++     3.078380215254090224, 3.050890016615455114, 3.023897504455676621, 2.997382949516130601,
++     2.971327759921089662, 2.945714394895045718, 2.920526286512740821, 2.895747768600141825,
++     2.871364012015536371, 2.847360965635188812, 2.823725302450035279, 2.800444370250737780,
++     2.777506146439756574, 2.754899196562344610, 2.732612636194700073, 2.710636095867928752,
++     2.688959688741803689, 2.667573980773266573, 2.646469963151809157, 2.625639026797788489,
++     2.605072938740835564, 2.584763820214140750, 2.564704126316905253, 2.544886627111869970,
++     2.525304390037828028, 2.505950763528594027, 2.486819361740209455, 2.467904050297364815,
++     2.449198932978249754, 2.430698339264419694, 2.412396812688870629, 2.394289099921457886,
++     2.376370140536140596, 2.358635057409337321, 2.341079147703034380, 2.323697874390196372,
++     2.306486858283579799, 2.289441870532269441, 2.272558825553154804, 2.255833774367219213,
++     2.239262898312909034, 2.222842503111036816, 2.206569013257663858, 2.190438966723220027,
++     2.174449009937774679, 2.158595893043885994, 2.142876465399842001, 2.127287671317368289,
++     2.111826546019042183, 2.096490211801715020, 2.081275874393225145, 2.066180819490575526,
++     2.051202409468584786, 2.036338080248769611, 2.021585338318926173, 2.006941757894518563,
++     1.992404978213576650, 1.977972700957360441, 1.963642687789548313, 1.949412758007184943,
++     1.935280786297051359, 1.921244700591528076, 1.907302480018387536, 1.893452152939308242,
++     1.879691795072211180, 1.866019527692827973, 1.852433515911175554, 1.838931967018879954,
++     1.825513128903519799, 1.812175288526390649, 1.798916770460290859, 1.785735935484126014,
++     1.772631179231305643, 1.759600930889074766, 1.746643651946074405, 1.733757834985571566,
++     1.720942002521935299, 1.708194705878057773, 1.695514524101537912, 1.682900062917553896,
++     1.670349953716452118, 1.657862852574172763, 1.645437439303723659, 1.633072416535991334,
++     1.620766508828257901, 1.608518461798858379, 1.596327041286483395, 1.584191032532688892,
++     1.572109239386229707, 1.560080483527888084, 1.548103603714513499, 1.536177455041032092,
++     1.524300908219226258, 1.512472848872117082, 1.500692176842816750, 1.488957805516746058,
++     1.477268661156133867, 1.465623682245745352, 1.454021818848793446, 1.442462031972012504,
++     1.430943292938879674, 1.419464582769983219, 1.408024891569535697, 1.396623217917042137,
++     1.385258568263121992, 1.373929956328490576, 1.362636402505086775, 1.351376933258335189,
++     1.340150580529504643, 1.328956381137116560, 1.317793376176324749, 1.306660610415174117,
++     1.295557131686601027, 1.284481990275012642, 1.273434238296241139, 1.262412929069615330,
++     1.251417116480852521, 1.240445854334406572, 1.229498195693849105, 1.218573192208790124,
++     1.207669893426761121, 1.196787346088403092, 1.185924593404202199, 1.175080674310911677,
++     1.164254622705678921, 1.153445466655774743, 1.142652227581672841, 1.131873919411078511,
++     1.121109547701330200, 1.110358108727411031, 1.099618588532597308, 1.088889961938546813,
++     1.078171191511372307, 1.067461226479967662, 1.056759001602551429, 1.046063435977044209,
++     1.035373431790528542, 1.024687873002617211, 1.014005623957096480, 1.003325527915696735,
++     0.992646405507275897, 0.981967053085062602, 0.971286240983903260, 0.960602711668666509,
++     0.949915177764075969, 0.939222319955262286, 0.928522784747210395, 0.917815182070044311,
++     0.907098082715690257, 0.896370015589889935, 0.885629464761751528, 0.874874866291025066,
++     0.864104604811004484, 0.853317009842373353, 0.842510351810368485, 0.831682837734273206,
++     0.820832606554411814, 0.809957724057418282, 0.799056177355487174, 0.788125868869492430,
++     0.777164609759129710, 0.766170112735434672, 0.755139984181982249, 0.744071715500508102,
++     0.732962673584365398, 0.721810090308756203, 0.710611050909655040, 0.699362481103231959,
++     0.688061132773747808, 0.676703568029522584, 0.665286141392677943, 0.653804979847664947,
++     0.642255960424536365, 0.630634684933490286, 0.618936451394876075, 0.607156221620300030,
++     0.595288584291502887, 0.583327712748769489, 0.571267316532588332, 0.559100585511540626,
++     0.546820125163310577, 0.534417881237165604, 0.521885051592135052, 0.509211982443654398,
++     0.496388045518671162, 0.483401491653461857, 0.470239275082169006, 0.456886840931420235,
++     0.443327866073552401, 0.429543940225410703, 0.415514169600356364, 0.401214678896277765,
++     0.386617977941119573, 0.371692145329917234, 0.356399760258393816, 0.340696481064849122,
++     0.324529117016909452, 0.307832954674932158, 0.290527955491230394, 0.272513185478464703,
++     0.253658363385912022, 0.233790483059674731, 0.212671510630966620, 0.189958689622431842,
++     0.165127622564187282, 0.137304980940012589, 0.104838507565818778, 0.063852163815001570,
++     0.000000000000000000];
++pub static ZIG_EXP_F: [f64; 257] =
++    [0.000167066692307963, 0.000454134353841497, 0.000967269282327174, 0.001536299780301573,
++     0.002145967743718907, 0.002788798793574076, 0.003460264777836904, 0.004157295120833797,
++     0.004877655983542396, 0.005619642207205489, 0.006381905937319183, 0.007163353183634991,
++     0.007963077438017043, 0.008780314985808977, 0.009614413642502212, 0.010464810181029981,
++     0.011331013597834600, 0.012212592426255378, 0.013109164931254991, 0.014020391403181943,
++     0.014945968011691148, 0.015885621839973156, 0.016839106826039941, 0.017806200410911355,
++     0.018786700744696024, 0.019780424338009740, 0.020787204072578114, 0.021806887504283581,
++     0.022839335406385240, 0.023884420511558174, 0.024942026419731787, 0.026012046645134221,
++     0.027094383780955803, 0.028188948763978646, 0.029295660224637411, 0.030414443910466622,
++     0.031545232172893622, 0.032687963508959555, 0.033842582150874358, 0.035009037697397431,
++     0.036187284781931443, 0.037377282772959382, 0.038578995503074871, 0.039792391023374139,
++     0.041017441380414840, 0.042254122413316254, 0.043502413568888197, 0.044762297732943289,
++     0.046033761076175184, 0.047316792913181561, 0.048611385573379504, 0.049917534282706379,
++     0.051235237055126281, 0.052564494593071685, 0.053905310196046080, 0.055257689676697030,
++     0.056621641283742870, 0.057997175631200659, 0.059384305633420280, 0.060783046445479660,
++     0.062193415408541036, 0.063615431999807376, 0.065049117786753805, 0.066494496385339816,
++     0.067951593421936643, 0.069420436498728783, 0.070901055162371843, 0.072393480875708752,
++     0.073897746992364746, 0.075413888734058410, 0.076941943170480517, 0.078481949201606435,
++     0.080033947542319905, 0.081597980709237419, 0.083174093009632397, 0.084762330532368146,
++     0.086362741140756927, 0.087975374467270231, 0.089600281910032886, 0.091237516631040197,
++     0.092887133556043569, 0.094549189376055873, 0.096223742550432825, 0.097910853311492213,
++     0.099610583670637132, 0.101322997425953631, 0.103048160171257702, 0.104786139306570145,
++     0.106537004050001632, 0.108300825451033755, 0.110077676405185357, 0.111867631670056283,
++     0.113670767882744286, 0.115487163578633506, 0.117316899211555525, 0.119160057175327641,
++     0.121016721826674792, 0.122886979509545108, 0.124770918580830933, 0.126668629437510671,
++     0.128580204545228199, 0.130505738468330773, 0.132445327901387494, 0.134399071702213602,
++     0.136367070926428829, 0.138349428863580176, 0.140346251074862399, 0.142357645432472146,
++     0.144383722160634720, 0.146424593878344889, 0.148480375643866735, 0.150551185001039839,
++     0.152637142027442801, 0.154738369384468027, 0.156854992369365148, 0.158987138969314129,
++     0.161134939917591952, 0.163298528751901734, 0.165478041874935922, 0.167673618617250081,
++     0.169885401302527550, 0.172113535315319977, 0.174358169171353411, 0.176619454590494829,
++     0.178897546572478278, 0.181192603475496261, 0.183504787097767436, 0.185834262762197083,
++     0.188181199404254262, 0.190545769663195363, 0.192928149976771296, 0.195328520679563189,
++     0.197747066105098818, 0.200183974691911210, 0.202639439093708962, 0.205113656293837654,
++     0.207606827724221982, 0.210119159388988230, 0.212650861992978224, 0.215202151075378628,
++     0.217773247148700472, 0.220364375843359439, 0.222975768058120111, 0.225607660116683956,
++     0.228260293930716618, 0.230933917169627356, 0.233628783437433291, 0.236345152457059560,
++     0.239083290262449094, 0.241843469398877131, 0.244625969131892024, 0.247431075665327543,
++     0.250259082368862240, 0.253110290015629402, 0.255985007030415324, 0.258883549749016173,
++     0.261806242689362922, 0.264753418835062149, 0.267725419932044739, 0.270722596799059967,
++     0.273745309652802915, 0.276793928448517301, 0.279868833236972869, 0.282970414538780746,
++     0.286099073737076826, 0.289255223489677693, 0.292439288161892630, 0.295651704281261252,
++     0.298892921015581847, 0.302163400675693528, 0.305463619244590256, 0.308794066934560185,
++     0.312155248774179606, 0.315547685227128949, 0.318971912844957239, 0.322428484956089223,
++     0.325917972393556354, 0.329440964264136438, 0.332998068761809096, 0.336589914028677717,
++     0.340217149066780189, 0.343880444704502575, 0.347580494621637148, 0.351318016437483449,
++     0.355093752866787626, 0.358908472948750001, 0.362762973354817997, 0.366658079781514379,
++     0.370594648435146223, 0.374573567615902381, 0.378595759409581067, 0.382662181496010056,
++     0.386773829084137932, 0.390931736984797384, 0.395136981833290435, 0.399390684475231350,
++     0.403694012530530555, 0.408048183152032673, 0.412454465997161457, 0.416914186433003209,
++     0.421428728997616908, 0.425999541143034677, 0.430628137288459167, 0.435316103215636907,
++     0.440065100842354173, 0.444876873414548846, 0.449753251162755330, 0.454696157474615836,
++     0.459707615642138023, 0.464789756250426511, 0.469944825283960310, 0.475175193037377708,
++     0.480483363930454543, 0.485871987341885248, 0.491343869594032867, 0.496901987241549881,
++     0.502549501841348056, 0.508289776410643213, 0.514126393814748894, 0.520063177368233931,
++     0.526104213983620062, 0.532253880263043655, 0.538516872002862246, 0.544898237672440056,
++     0.551403416540641733, 0.558038282262587892, 0.564809192912400615, 0.571723048664826150,
++     0.578787358602845359, 0.586010318477268366, 0.593400901691733762, 0.600968966365232560,
++     0.608725382079622346, 0.616682180915207878, 0.624852738703666200, 0.633251994214366398,
++     0.641896716427266423, 0.650805833414571433, 0.660000841079000145, 0.669506316731925177,
++     0.679350572264765806, 0.689566496117078431, 0.700192655082788606, 0.711274760805076456,
++     0.722867659593572465, 0.735038092431424039, 0.747868621985195658, 0.761463388849896838,
++     0.775956852040116218, 0.791527636972496285, 0.808421651523009044, 0.826993296643051101,
++     0.847785500623990496, 0.871704332381204705, 0.900469929925747703, 0.938143680862176477,
++     1.000000000000000000];
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b70a8e61d3f223f685ff2be77cb4632ee2d4bd54
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,635 @@@
++// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! The ISAAC random number generator.
++
++#![allow(non_camel_case_types)]
++
++use std::slice;
++use std::iter::repeat;
++use std::num::Wrapping as w;
++use std::fmt;
++
++use {Rng, SeedableRng, Rand, w32, w64};
++
++const RAND_SIZE_LEN: usize = 8;
++const RAND_SIZE: u32 = 1 << RAND_SIZE_LEN;
++const RAND_SIZE_USIZE: usize = 1 << RAND_SIZE_LEN;
++
++/// A random number generator that uses the ISAAC algorithm[1].
++///
++/// The ISAAC algorithm is generally accepted as suitable for
++/// cryptographic purposes, but this implementation has not be
++/// verified as such. Prefer a generator like `OsRng` that defers to
++/// the operating system for cases that need high security.
++///
++/// [1]: Bob Jenkins, [*ISAAC: A fast cryptographic random number
++/// generator*](http://www.burtleburtle.net/bob/rand/isaacafa.html)
++#[derive(Copy)]
++pub struct IsaacRng {
++    cnt: u32,
++    rsl: [w32; RAND_SIZE_USIZE],
++    mem: [w32; RAND_SIZE_USIZE],
++    a: w32,
++    b: w32,
++    c: w32,
++}
++
++static EMPTY: IsaacRng = IsaacRng {
++    cnt: 0,
++    rsl: [w(0); RAND_SIZE_USIZE],
++    mem: [w(0); RAND_SIZE_USIZE],
++    a: w(0), b: w(0), c: w(0),
++};
++
++impl IsaacRng {
++
++    /// Create an ISAAC random number generator using the default
++    /// fixed seed.
++    pub fn new_unseeded() -> IsaacRng {
++        let mut rng = EMPTY;
++        rng.init(false);
++        rng
++    }
++
++    /// Initialises `self`. If `use_rsl` is true, then use the current value
++    /// of `rsl` as a seed, otherwise construct one algorithmically (not
++    /// randomly).
++    fn init(&mut self, use_rsl: bool) {
++        let mut a = w(0x9e3779b9);
++        let mut b = a;
++        let mut c = a;
++        let mut d = a;
++        let mut e = a;
++        let mut f = a;
++        let mut g = a;
++        let mut h = a;
++
++        macro_rules! mix {
++            () => {{
++                a=a^(b<<11); d=d+a; b=b+c;
++                b=b^(c>>2);  e=e+b; c=c+d;
++                c=c^(d<<8);  f=f+c; d=d+e;
++                d=d^(e>>16); g=g+d; e=e+f;
++                e=e^(f<<10); h=h+e; f=f+g;
++                f=f^(g>>4);  a=a+f; g=g+h;
++                g=g^(h<<8);  b=b+g; h=h+a;
++                h=h^(a>>9);  c=c+h; a=a+b;
++            }}
++        }
++
++        for _ in 0..4 {
++            mix!();
++        }
++
++        if use_rsl {
++            macro_rules! memloop {
++                ($arr:expr) => {{
++                    for i in (0..RAND_SIZE_USIZE/8).map(|i| i * 8) {
++                        a=a+$arr[i  ]; b=b+$arr[i+1];
++                        c=c+$arr[i+2]; d=d+$arr[i+3];
++                        e=e+$arr[i+4]; f=f+$arr[i+5];
++                        g=g+$arr[i+6]; h=h+$arr[i+7];
++                        mix!();
++                        self.mem[i  ]=a; self.mem[i+1]=b;
++                        self.mem[i+2]=c; self.mem[i+3]=d;
++                        self.mem[i+4]=e; self.mem[i+5]=f;
++                        self.mem[i+6]=g; self.mem[i+7]=h;
++                    }
++                }}
++            }
++
++            memloop!(self.rsl);
++            memloop!(self.mem);
++        } else {
++            for i in (0..RAND_SIZE_USIZE/8).map(|i| i * 8) {
++                mix!();
++                self.mem[i  ]=a; self.mem[i+1]=b;
++                self.mem[i+2]=c; self.mem[i+3]=d;
++                self.mem[i+4]=e; self.mem[i+5]=f;
++                self.mem[i+6]=g; self.mem[i+7]=h;
++            }
++        }
++
++        self.isaac();
++    }
++
++    /// Refills the output buffer (`self.rsl`)
++    #[inline]
++    fn isaac(&mut self) {
++        self.c = self.c + w(1);
++        // abbreviations
++        let mut a = self.a;
++        let mut b = self.b + self.c;
++
++        const MIDPOINT: usize = RAND_SIZE_USIZE / 2;
++
++        macro_rules! ind {
++            ($x:expr) => ( self.mem[($x >> 2usize).0 as usize & (RAND_SIZE_USIZE - 1)] )
++        }
++
++        let r = [(0, MIDPOINT), (MIDPOINT, 0)];
++        for &(mr_offset, m2_offset) in r.iter() {
++
++            macro_rules! rngstepp {
++                ($j:expr, $shift:expr) => {{
++                    let base = $j;
++                    let mix = a << $shift;
++
++                    let x = self.mem[base  + mr_offset];
++                    a = (a ^ mix) + self.mem[base + m2_offset];
++                    let y = ind!(x) + a + b;
++                    self.mem[base + mr_offset] = y;
++
++                    b = ind!(y >> RAND_SIZE_LEN) + x;
++                    self.rsl[base + mr_offset] = b;
++                }}
++            }
++
++            macro_rules! rngstepn {
++                ($j:expr, $shift:expr) => {{
++                    let base = $j;
++                    let mix = a >> $shift;
++
++                    let x = self.mem[base  + mr_offset];
++                    a = (a ^ mix) + self.mem[base + m2_offset];
++                    let y = ind!(x) + a + b;
++                    self.mem[base + mr_offset] = y;
++
++                    b = ind!(y >> RAND_SIZE_LEN) + x;
++                    self.rsl[base + mr_offset] = b;
++                }}
++            }
++
++            for i in (0..MIDPOINT/4).map(|i| i * 4) {
++                rngstepp!(i + 0, 13);
++                rngstepn!(i + 1, 6);
++                rngstepp!(i + 2, 2);
++                rngstepn!(i + 3, 16);
++            }
++        }
++
++        self.a = a;
++        self.b = b;
++        self.cnt = RAND_SIZE;
++    }
++}
++
++// Cannot be derived because [u32; 256] does not implement Clone
++impl Clone for IsaacRng {
++    fn clone(&self) -> IsaacRng {
++        *self
++    }
++}
++
++impl Rng for IsaacRng {
++    #[inline]
++    fn next_u32(&mut self) -> u32 {
++        if self.cnt == 0 {
++            // make some more numbers
++            self.isaac();
++        }
++        self.cnt -= 1;
++
++        // self.cnt is at most RAND_SIZE, but that is before the
++        // subtraction above. We want to index without bounds
++        // checking, but this could lead to incorrect code if someone
++        // misrefactors, so we check, sometimes.
++        //
++        // (Changes here should be reflected in Isaac64Rng.next_u64.)
++        debug_assert!(self.cnt < RAND_SIZE);
++
++        // (the % is cheaply telling the optimiser that we're always
++        // in bounds, without unsafe. NB. this is a power of two, so
++        // it optimises to a bitwise mask).
++        self.rsl[(self.cnt % RAND_SIZE) as usize].0
++    }
++}
++
++impl<'a> SeedableRng<&'a [u32]> for IsaacRng {
++    fn reseed(&mut self, seed: &'a [u32]) {
++        // make the seed into [seed[0], seed[1], ..., seed[seed.len()
++        // - 1], 0, 0, ...], to fill rng.rsl.
++        let seed_iter = seed.iter().map(|&x| x).chain(repeat(0u32));
++
++        for (rsl_elem, seed_elem) in self.rsl.iter_mut().zip(seed_iter) {
++            *rsl_elem = w(seed_elem);
++        }
++        self.cnt = 0;
++        self.a = w(0);
++        self.b = w(0);
++        self.c = w(0);
++
++        self.init(true);
++    }
++
++    /// Create an ISAAC random number generator with a seed. This can
++    /// be any length, although the maximum number of elements used is
++    /// 256 and any more will be silently ignored. A generator
++    /// constructed with a given seed will generate the same sequence
++    /// of values as all other generators constructed with that seed.
++    fn from_seed(seed: &'a [u32]) -> IsaacRng {
++        let mut rng = EMPTY;
++        rng.reseed(seed);
++        rng
++    }
++}
++
++impl Rand for IsaacRng {
++    fn rand<R: Rng>(other: &mut R) -> IsaacRng {
++        let mut ret = EMPTY;
++        unsafe {
++            let ptr = ret.rsl.as_mut_ptr() as *mut u8;
++
++            let slice = slice::from_raw_parts_mut(ptr, RAND_SIZE_USIZE * 4);
++            other.fill_bytes(slice);
++        }
++        ret.cnt = 0;
++        ret.a = w(0);
++        ret.b = w(0);
++        ret.c = w(0);
++
++        ret.init(true);
++        return ret;
++    }
++}
++
++impl fmt::Debug for IsaacRng {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write!(f, "IsaacRng {{}}")
++    }
++}
++
++const RAND_SIZE_64_LEN: usize = 8;
++const RAND_SIZE_64: usize = 1 << RAND_SIZE_64_LEN;
++
++/// A random number generator that uses ISAAC-64[1], the 64-bit
++/// variant of the ISAAC algorithm.
++///
++/// The ISAAC algorithm is generally accepted as suitable for
++/// cryptographic purposes, but this implementation has not be
++/// verified as such. Prefer a generator like `OsRng` that defers to
++/// the operating system for cases that need high security.
++///
++/// [1]: Bob Jenkins, [*ISAAC: A fast cryptographic random number
++/// generator*](http://www.burtleburtle.net/bob/rand/isaacafa.html)
++#[derive(Copy)]
++pub struct Isaac64Rng {
++    cnt: usize,
++    rsl: [w64; RAND_SIZE_64],
++    mem: [w64; RAND_SIZE_64],
++    a: w64,
++    b: w64,
++    c: w64,
++}
++
++static EMPTY_64: Isaac64Rng = Isaac64Rng {
++    cnt: 0,
++    rsl: [w(0); RAND_SIZE_64],
++    mem: [w(0); RAND_SIZE_64],
++    a: w(0), b: w(0), c: w(0),
++};
++
++impl Isaac64Rng {
++    /// Create a 64-bit ISAAC random number generator using the
++    /// default fixed seed.
++    pub fn new_unseeded() -> Isaac64Rng {
++        let mut rng = EMPTY_64;
++        rng.init(false);
++        rng
++    }
++
++    /// Initialises `self`. If `use_rsl` is true, then use the current value
++    /// of `rsl` as a seed, otherwise construct one algorithmically (not
++    /// randomly).
++    fn init(&mut self, use_rsl: bool) {
++        macro_rules! init {
++            ($var:ident) => (
++                let mut $var = w(0x9e3779b97f4a7c13);
++            )
++        }
++        init!(a); init!(b); init!(c); init!(d);
++        init!(e); init!(f); init!(g); init!(h);
++
++        macro_rules! mix {
++            () => {{
++                a=a-e; f=f^(h>>9);  h=h+a;
++                b=b-f; g=g^(a<<9);  a=a+b;
++                c=c-g; h=h^(b>>23); b=b+c;
++                d=d-h; a=a^(c<<15); c=c+d;
++                e=e-a; b=b^(d>>14); d=d+e;
++                f=f-b; c=c^(e<<20); e=e+f;
++                g=g-c; d=d^(f>>17); f=f+g;
++                h=h-d; e=e^(g<<14); g=g+h;
++            }}
++        }
++
++        for _ in 0..4 {
++            mix!();
++        }
++
++        if use_rsl {
++            macro_rules! memloop {
++                ($arr:expr) => {{
++                    for i in (0..RAND_SIZE_64 / 8).map(|i| i * 8) {
++                        a=a+$arr[i  ]; b=b+$arr[i+1];
++                        c=c+$arr[i+2]; d=d+$arr[i+3];
++                        e=e+$arr[i+4]; f=f+$arr[i+5];
++                        g=g+$arr[i+6]; h=h+$arr[i+7];
++                        mix!();
++                        self.mem[i  ]=a; self.mem[i+1]=b;
++                        self.mem[i+2]=c; self.mem[i+3]=d;
++                        self.mem[i+4]=e; self.mem[i+5]=f;
++                        self.mem[i+6]=g; self.mem[i+7]=h;
++                    }
++                }}
++            }
++
++            memloop!(self.rsl);
++            memloop!(self.mem);
++        } else {
++            for i in (0..RAND_SIZE_64 / 8).map(|i| i * 8) {
++                mix!();
++                self.mem[i  ]=a; self.mem[i+1]=b;
++                self.mem[i+2]=c; self.mem[i+3]=d;
++                self.mem[i+4]=e; self.mem[i+5]=f;
++                self.mem[i+6]=g; self.mem[i+7]=h;
++            }
++        }
++
++        self.isaac64();
++    }
++
++    /// Refills the output buffer (`self.rsl`)
++    fn isaac64(&mut self) {
++        self.c = self.c + w(1);
++        // abbreviations
++        let mut a = self.a;
++        let mut b = self.b + self.c;
++        const MIDPOINT: usize =  RAND_SIZE_64 / 2;
++        const MP_VEC: [(usize, usize); 2] = [(0,MIDPOINT), (MIDPOINT, 0)];
++        macro_rules! ind {
++            ($x:expr) => {
++                *self.mem.get_unchecked((($x >> 3usize).0 as usize) & (RAND_SIZE_64 - 1))
++            }
++        }
++
++        for &(mr_offset, m2_offset) in MP_VEC.iter() {
++            for base in (0..MIDPOINT / 4).map(|i| i * 4) {
++
++                macro_rules! rngstepp {
++                    ($j:expr, $shift:expr) => {{
++                        let base = base + $j;
++                        let mix = a ^ (a << $shift);
++                        let mix = if $j == 0 {!mix} else {mix};
++
++                        unsafe {
++                            let x = *self.mem.get_unchecked(base + mr_offset);
++                            a = mix + *self.mem.get_unchecked(base + m2_offset);
++                            let y = ind!(x) + a + b;
++                            *self.mem.get_unchecked_mut(base + mr_offset) = y;
++
++                            b = ind!(y >> RAND_SIZE_64_LEN) + x;
++                            *self.rsl.get_unchecked_mut(base + mr_offset) = b;
++                        }
++                    }}
++                }
++
++                macro_rules! rngstepn {
++                    ($j:expr, $shift:expr) => {{
++                        let base = base + $j;
++                        let mix = a ^ (a >> $shift);
++                        let mix = if $j == 0 {!mix} else {mix};
++
++                        unsafe {
++                            let x = *self.mem.get_unchecked(base + mr_offset);
++                            a = mix + *self.mem.get_unchecked(base + m2_offset);
++                            let y = ind!(x) + a + b;
++                            *self.mem.get_unchecked_mut(base + mr_offset) = y;
++
++                            b = ind!(y >> RAND_SIZE_64_LEN) + x;
++                            *self.rsl.get_unchecked_mut(base + mr_offset) = b;
++                        }
++                    }}
++                }
++
++                rngstepp!(0, 21);
++                rngstepn!(1, 5);
++                rngstepp!(2, 12);
++                rngstepn!(3, 33);
++            }
++        }
++
++        self.a = a;
++        self.b = b;
++        self.cnt = RAND_SIZE_64;
++    }
++}
++
++// Cannot be derived because [u32; 256] does not implement Clone
++impl Clone for Isaac64Rng {
++    fn clone(&self) -> Isaac64Rng {
++        *self
++    }
++}
++
++impl Rng for Isaac64Rng {
++    // FIXME #7771: having next_u32 like this should be unnecessary
++    #[inline]
++    fn next_u32(&mut self) -> u32 {
++        self.next_u64() as u32
++    }
++
++    #[inline]
++    fn next_u64(&mut self) -> u64 {
++        if self.cnt == 0 {
++            // make some more numbers
++            self.isaac64();
++        }
++        self.cnt -= 1;
++
++        // See corresponding location in IsaacRng.next_u32 for
++        // explanation.
++        debug_assert!(self.cnt < RAND_SIZE_64);
++        self.rsl[(self.cnt % RAND_SIZE_64) as usize].0
++    }
++}
++
++impl<'a> SeedableRng<&'a [u64]> for Isaac64Rng {
++    fn reseed(&mut self, seed: &'a [u64]) {
++        // make the seed into [seed[0], seed[1], ..., seed[seed.len()
++        // - 1], 0, 0, ...], to fill rng.rsl.
++        let seed_iter = seed.iter().map(|&x| x).chain(repeat(0u64));
++
++        for (rsl_elem, seed_elem) in self.rsl.iter_mut().zip(seed_iter) {
++            *rsl_elem = w(seed_elem);
++        }
++        self.cnt = 0;
++        self.a = w(0);
++        self.b = w(0);
++        self.c = w(0);
++
++        self.init(true);
++    }
++
++    /// Create an ISAAC random number generator with a seed. This can
++    /// be any length, although the maximum number of elements used is
++    /// 256 and any more will be silently ignored. A generator
++    /// constructed with a given seed will generate the same sequence
++    /// of values as all other generators constructed with that seed.
++    fn from_seed(seed: &'a [u64]) -> Isaac64Rng {
++        let mut rng = EMPTY_64;
++        rng.reseed(seed);
++        rng
++    }
++}
++
++impl Rand for Isaac64Rng {
++    fn rand<R: Rng>(other: &mut R) -> Isaac64Rng {
++        let mut ret = EMPTY_64;
++        unsafe {
++            let ptr = ret.rsl.as_mut_ptr() as *mut u8;
++
++            let slice = slice::from_raw_parts_mut(ptr, RAND_SIZE_64 * 8);
++            other.fill_bytes(slice);
++        }
++        ret.cnt = 0;
++        ret.a = w(0);
++        ret.b = w(0);
++        ret.c = w(0);
++
++        ret.init(true);
++        return ret;
++    }
++}
++
++impl fmt::Debug for Isaac64Rng {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write!(f, "Isaac64Rng {{}}")
++    }
++}
++
++#[cfg(test)]
++mod test {
++    use {Rng, SeedableRng};
++    use super::{IsaacRng, Isaac64Rng};
++
++    #[test]
++    fn test_rng_32_rand_seeded() {
++        let s = ::test::rng().gen_iter::<u32>().take(256).collect::<Vec<u32>>();
++        let mut ra: IsaacRng = SeedableRng::from_seed(&s[..]);
++        let mut rb: IsaacRng = SeedableRng::from_seed(&s[..]);
++        assert!(::test::iter_eq(ra.gen_ascii_chars().take(100),
++                                rb.gen_ascii_chars().take(100)));
++    }
++    #[test]
++    fn test_rng_64_rand_seeded() {
++        let s = ::test::rng().gen_iter::<u64>().take(256).collect::<Vec<u64>>();
++        let mut ra: Isaac64Rng = SeedableRng::from_seed(&s[..]);
++        let mut rb: Isaac64Rng = SeedableRng::from_seed(&s[..]);
++        assert!(::test::iter_eq(ra.gen_ascii_chars().take(100),
++                                rb.gen_ascii_chars().take(100)));
++    }
++
++    #[test]
++    fn test_rng_32_seeded() {
++        let seed: &[_] = &[1, 23, 456, 7890, 12345];
++        let mut ra: IsaacRng = SeedableRng::from_seed(seed);
++        let mut rb: IsaacRng = SeedableRng::from_seed(seed);
++        assert!(::test::iter_eq(ra.gen_ascii_chars().take(100),
++                                rb.gen_ascii_chars().take(100)));
++    }
++    #[test]
++    fn test_rng_64_seeded() {
++        let seed: &[_] = &[1, 23, 456, 7890, 12345];
++        let mut ra: Isaac64Rng = SeedableRng::from_seed(seed);
++        let mut rb: Isaac64Rng = SeedableRng::from_seed(seed);
++        assert!(::test::iter_eq(ra.gen_ascii_chars().take(100),
++                                rb.gen_ascii_chars().take(100)));
++    }
++
++    #[test]
++    fn test_rng_32_reseed() {
++        let s = ::test::rng().gen_iter::<u32>().take(256).collect::<Vec<u32>>();
++        let mut r: IsaacRng = SeedableRng::from_seed(&s[..]);
++        let string1: String = r.gen_ascii_chars().take(100).collect();
++
++        r.reseed(&s[..]);
++
++        let string2: String = r.gen_ascii_chars().take(100).collect();
++        assert_eq!(string1, string2);
++    }
++    #[test]
++    fn test_rng_64_reseed() {
++        let s = ::test::rng().gen_iter::<u64>().take(256).collect::<Vec<u64>>();
++        let mut r: Isaac64Rng = SeedableRng::from_seed(&s[..]);
++        let string1: String = r.gen_ascii_chars().take(100).collect();
++
++        r.reseed(&s[..]);
++
++        let string2: String = r.gen_ascii_chars().take(100).collect();
++        assert_eq!(string1, string2);
++    }
++
++    #[test]
++    fn test_rng_32_true_values() {
++        let seed: &[_] = &[1, 23, 456, 7890, 12345];
++        let mut ra: IsaacRng = SeedableRng::from_seed(seed);
++        // Regression test that isaac is actually using the above vector
++        let v = (0..10).map(|_| ra.next_u32()).collect::<Vec<_>>();
++        assert_eq!(v,
++                   vec!(2558573138, 873787463, 263499565, 2103644246, 3595684709,
++                        4203127393, 264982119, 2765226902, 2737944514, 3900253796));
++
++        let seed: &[_] = &[12345, 67890, 54321, 9876];
++        let mut rb: IsaacRng = SeedableRng::from_seed(seed);
++        // skip forward to the 10000th number
++        for _ in 0..10000 { rb.next_u32(); }
++
++        let v = (0..10).map(|_| rb.next_u32()).collect::<Vec<_>>();
++        assert_eq!(v,
++                   vec!(3676831399, 3183332890, 2834741178, 3854698763, 2717568474,
++                        1576568959, 3507990155, 179069555, 141456972, 2478885421));
++    }
++    #[test]
++    fn test_rng_64_true_values() {
++        let seed: &[_] = &[1, 23, 456, 7890, 12345];
++        let mut ra: Isaac64Rng = SeedableRng::from_seed(seed);
++        // Regression test that isaac is actually using the above vector
++        let v = (0..10).map(|_| ra.next_u64()).collect::<Vec<_>>();
++        assert_eq!(v,
++                   vec!(547121783600835980, 14377643087320773276, 17351601304698403469,
++                        1238879483818134882, 11952566807690396487, 13970131091560099343,
++                        4469761996653280935, 15552757044682284409, 6860251611068737823,
++                        13722198873481261842));
++
++        let seed: &[_] = &[12345, 67890, 54321, 9876];
++        let mut rb: Isaac64Rng = SeedableRng::from_seed(seed);
++        // skip forward to the 10000th number
++        for _ in 0..10000 { rb.next_u64(); }
++
++        let v = (0..10).map(|_| rb.next_u64()).collect::<Vec<_>>();
++        assert_eq!(v,
++                   vec!(18143823860592706164, 8491801882678285927, 2699425367717515619,
++                        17196852593171130876, 2606123525235546165, 15790932315217671084,
++                        596345674630742204, 9947027391921273664, 11788097613744130851,
++                        10391409374914919106));
++    }
++
++    #[test]
++    fn test_rng_clone() {
++        let seed: &[_] = &[1, 23, 456, 7890, 12345];
++        let mut rng: Isaac64Rng = SeedableRng::from_seed(seed);
++        let mut clone = rng.clone();
++        for _ in 0..16 {
++            assert_eq!(rng.next_u64(), clone.next_u64());
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2e76c5a56493c8fa0d4fa0a3db8b9f80951087e4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1288 @@@
++// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Utilities for random number generation
++//!
++//! The key functions are `random()` and `Rng::gen()`. These are polymorphic and
++//! so can be used to generate any type that implements `Rand`. Type inference
++//! means that often a simple call to `rand::random()` or `rng.gen()` will
++//! suffice, but sometimes an annotation is required, e.g.
++//! `rand::random::<f64>()`.
++//!
++//! See the `distributions` submodule for sampling random numbers from
++//! distributions like normal and exponential.
++//!
++//! # Usage
++//!
++//! This crate is [on crates.io](https://crates.io/crates/rand) and can be
++//! used by adding `rand` to the dependencies in your project's `Cargo.toml`.
++//!
++//! ```toml
++//! [dependencies]
++//! rand = "0.3"
++//! ```
++//!
++//! and this to your crate root:
++//!
++//! ```rust
++//! extern crate rand;
++//! ```
++//!
++//! # Thread-local RNG
++//!
++//! There is built-in support for a RNG associated with each thread stored
++//! in thread-local storage. This RNG can be accessed via `thread_rng`, or
++//! used implicitly via `random`. This RNG is normally randomly seeded
++//! from an operating-system source of randomness, e.g. `/dev/urandom` on
++//! Unix systems, and will automatically reseed itself from this source
++//! after generating 32 KiB of random data.
++//!
++//! # Cryptographic security
++//!
++//! An application that requires an entropy source for cryptographic purposes
++//! must use `OsRng`, which reads randomness from the source that the operating
++//! system provides (e.g. `/dev/urandom` on Unixes or `CryptGenRandom()` on
++//! Windows).
++//! The other random number generators provided by this module are not suitable
++//! for such purposes.
++//!
++//! *Note*: many Unix systems provide `/dev/random` as well as `/dev/urandom`.
++//! This module uses `/dev/urandom` for the following reasons:
++//!
++//! -   On Linux, `/dev/random` may block if entropy pool is empty;
++//!     `/dev/urandom` will not block.  This does not mean that `/dev/random`
++//!     provides better output than `/dev/urandom`; the kernel internally runs a
++//!     cryptographically secure pseudorandom number generator (CSPRNG) based on
++//!     entropy pool for random number generation, so the "quality" of
++//!     `/dev/random` is not better than `/dev/urandom` in most cases.  However,
++//!     this means that `/dev/urandom` can yield somewhat predictable randomness
++//!     if the entropy pool is very small, such as immediately after first
++//!     booting.  Linux 3.17 added the `getrandom(2)` system call which solves
++//!     the issue: it blocks if entropy pool is not initialized yet, but it does
++//!     not block once initialized.  `OsRng` tries to use `getrandom(2)` if
++//!     available, and use `/dev/urandom` fallback if not.  If an application
++//!     does not have `getrandom` and likely to be run soon after first booting,
++//!     or on a system with very few entropy sources, one should consider using
++//!     `/dev/random` via `ReadRng`.
++//! -   On some systems (e.g. FreeBSD, OpenBSD and Mac OS X) there is no
++//!     difference between the two sources. (Also note that, on some systems
++//!     e.g.  FreeBSD, both `/dev/random` and `/dev/urandom` may block once if
++//!     the CSPRNG has not seeded yet.)
++//!
++//! # Examples
++//!
++//! ```rust
++//! use rand::Rng;
++//!
++//! let mut rng = rand::thread_rng();
++//! if rng.gen() { // random bool
++//!     println!("i32: {}, u32: {}", rng.gen::<i32>(), rng.gen::<u32>())
++//! }
++//! ```
++//!
++//! ```rust
++//! let tuple = rand::random::<(f64, char)>();
++//! println!("{:?}", tuple)
++//! ```
++//!
++//! ## Monte Carlo estimation of π
++//!
++//! For this example, imagine we have a square with sides of length 2 and a unit
++//! circle, both centered at the origin. Since the area of a unit circle is π,
++//! we have:
++//!
++//! ```text
++//!     (area of unit circle) / (area of square) = π / 4
++//! ```
++//!
++//! So if we sample many points randomly from the square, roughly π / 4 of them
++//! should be inside the circle.
++//!
++//! We can use the above fact to estimate the value of π: pick many points in
++//! the square at random, calculate the fraction that fall within the circle,
++//! and multiply this fraction by 4.
++//!
++//! ```
++//! use rand::distributions::{IndependentSample, Range};
++//!
++//! fn main() {
++//!    let between = Range::new(-1f64, 1.);
++//!    let mut rng = rand::thread_rng();
++//!
++//!    let total = 1_000_000;
++//!    let mut in_circle = 0;
++//!
++//!    for _ in 0..total {
++//!        let a = between.ind_sample(&mut rng);
++//!        let b = between.ind_sample(&mut rng);
++//!        if a*a + b*b <= 1. {
++//!            in_circle += 1;
++//!        }
++//!    }
++//!
++//!    // prints something close to 3.14159...
++//!    println!("{}", 4. * (in_circle as f64) / (total as f64));
++//! }
++//! ```
++//!
++//! ## Monty Hall Problem
++//!
++//! This is a simulation of the [Monty Hall Problem][]:
++//!
++//! > Suppose you're on a game show, and you're given the choice of three doors:
++//! > Behind one door is a car; behind the others, goats. You pick a door, say
++//! > No. 1, and the host, who knows what's behind the doors, opens another
++//! > door, say No. 3, which has a goat. He then says to you, "Do you want to
++//! > pick door No. 2?" Is it to your advantage to switch your choice?
++//!
++//! The rather unintuitive answer is that you will have a 2/3 chance of winning
++//! if you switch and a 1/3 chance of winning if you don't, so it's better to
++//! switch.
++//!
++//! This program will simulate the game show and with large enough simulation
++//! steps it will indeed confirm that it is better to switch.
++//!
++//! [Monty Hall Problem]: http://en.wikipedia.org/wiki/Monty_Hall_problem
++//!
++//! ```
++//! use rand::Rng;
++//! use rand::distributions::{IndependentSample, Range};
++//!
++//! struct SimulationResult {
++//!     win: bool,
++//!     switch: bool,
++//! }
++//!
++//! // Run a single simulation of the Monty Hall problem.
++//! fn simulate<R: Rng>(random_door: &Range<u32>, rng: &mut R)
++//!                     -> SimulationResult {
++//!     let car = random_door.ind_sample(rng);
++//!
++//!     // This is our initial choice
++//!     let mut choice = random_door.ind_sample(rng);
++//!
++//!     // The game host opens a door
++//!     let open = game_host_open(car, choice, rng);
++//!
++//!     // Shall we switch?
++//!     let switch = rng.gen();
++//!     if switch {
++//!         choice = switch_door(choice, open);
++//!     }
++//!
++//!     SimulationResult { win: choice == car, switch: switch }
++//! }
++//!
++//! // Returns the door the game host opens given our choice and knowledge of
++//! // where the car is. The game host will never open the door with the car.
++//! fn game_host_open<R: Rng>(car: u32, choice: u32, rng: &mut R) -> u32 {
++//!     let choices = free_doors(&[car, choice]);
++//!     rand::sample(rng, choices.into_iter(), 1)[0]
++//! }
++//!
++//! // Returns the door we switch to, given our current choice and
++//! // the open door. There will only be one valid door.
++//! fn switch_door(choice: u32, open: u32) -> u32 {
++//!     free_doors(&[choice, open])[0]
++//! }
++//!
++//! fn free_doors(blocked: &[u32]) -> Vec<u32> {
++//!     (0..3).filter(|x| !blocked.contains(x)).collect()
++//! }
++//!
++//! fn main() {
++//!     // The estimation will be more accurate with more simulations
++//!     let num_simulations = 10000;
++//!
++//!     let mut rng = rand::thread_rng();
++//!     let random_door = Range::new(0, 3);
++//!
++//!     let (mut switch_wins, mut switch_losses) = (0, 0);
++//!     let (mut keep_wins, mut keep_losses) = (0, 0);
++//!
++//!     println!("Running {} simulations...", num_simulations);
++//!     for _ in 0..num_simulations {
++//!         let result = simulate(&random_door, &mut rng);
++//!
++//!         match (result.win, result.switch) {
++//!             (true, true) => switch_wins += 1,
++//!             (true, false) => keep_wins += 1,
++//!             (false, true) => switch_losses += 1,
++//!             (false, false) => keep_losses += 1,
++//!         }
++//!     }
++//!
++//!     let total_switches = switch_wins + switch_losses;
++//!     let total_keeps = keep_wins + keep_losses;
++//!
++//!     println!("Switched door {} times with {} wins and {} losses",
++//!              total_switches, switch_wins, switch_losses);
++//!
++//!     println!("Kept our choice {} times with {} wins and {} losses",
++//!              total_keeps, keep_wins, keep_losses);
++//!
++//!     // With a large number of simulations, the values should converge to
++//!     // 0.667 and 0.333 respectively.
++//!     println!("Estimated chance to win if we switch: {}",
++//!              switch_wins as f32 / total_switches as f32);
++//!     println!("Estimated chance to win if we don't: {}",
++//!              keep_wins as f32 / total_keeps as f32);
++//! }
++//! ```
++
++#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
++       html_favicon_url = "https://www.rust-lang.org/favicon.ico",
++       html_root_url = "https://docs.rs/rand/0.3")]
++
++#![deny(missing_debug_implementations)]
++
++#![cfg_attr(feature = "i128_support", feature(i128_type))]
++
++#[cfg(test)] #[macro_use] extern crate log;
++
++
++use std::cell::RefCell;
++use std::marker;
++use std::mem;
++use std::io;
++use std::rc::Rc;
++use std::num::Wrapping as w;
++
++pub use os::OsRng;
++
++pub use isaac::{IsaacRng, Isaac64Rng};
++pub use chacha::ChaChaRng;
++
++#[cfg(target_pointer_width = "32")]
++use IsaacRng as IsaacWordRng;
++#[cfg(target_pointer_width = "64")]
++use Isaac64Rng as IsaacWordRng;
++
++use distributions::{Range, IndependentSample};
++use distributions::range::SampleRange;
++
++pub mod distributions;
++pub mod isaac;
++pub mod chacha;
++pub mod reseeding;
++mod rand_impls;
++pub mod os;
++pub mod read;
++
++#[allow(bad_style)]
++type w64 = w<u64>;
++#[allow(bad_style)]
++type w32 = w<u32>;
++
++/// A type that can be randomly generated using an `Rng`.
++///
++/// ## Built-in Implementations
++///
++/// This crate implements `Rand` for various primitive types.  Assuming the
++/// provided `Rng` is well-behaved, these implementations generate values with
++/// the following ranges and distributions:
++///
++/// * Integers (`i32`, `u32`, `isize`, `usize`, etc.): Uniformly distributed
++///   over all values of the type.
++/// * `char`: Uniformly distributed over all Unicode scalar values, i.e. all
++///   code points in the range `0...0x10_FFFF`, except for the range
++///   `0xD800...0xDFFF` (the surrogate code points).  This includes
++///   unassigned/reserved code points.
++/// * `bool`: Generates `false` or `true`, each with probability 0.5.
++/// * Floating point types (`f32` and `f64`): Uniformly distributed in the
++///   half-open range `[0, 1)`.  (The [`Open01`], [`Closed01`], [`Exp1`], and
++///   [`StandardNormal`] wrapper types produce floating point numbers with
++///   alternative ranges or distributions.)
++///
++/// [`Open01`]: struct.Open01.html
++/// [`Closed01`]: struct.Closed01.html
++/// [`Exp1`]: struct.Exp1.html
++/// [`StandardNormal`]: struct.StandardNormal.html
++///
++/// The following aggregate types also implement `Rand` as long as their
++/// component types implement it:
++///
++/// * Tuples and arrays: Each element of the tuple or array is generated
++///   independently, using its own `Rand` implementation.
++/// * `Option<T>`: Returns `None` with probability 0.5; otherwise generates a
++///   random `T` and returns `Some(T)`.
++
++pub trait Rand : Sized {
++    /// Generates a random instance of this type using the specified source of
++    /// randomness.
++    fn rand<R: Rng>(rng: &mut R) -> Self;
++}
++
++/// A random number generator.
++pub trait Rng {
++    /// Return the next random u32.
++    ///
++    /// This rarely needs to be called directly, prefer `r.gen()` to
++    /// `r.next_u32()`.
++    // FIXME #rust-lang/rfcs#628: Should be implemented in terms of next_u64
++    fn next_u32(&mut self) -> u32;
++
++    /// Return the next random u64.
++    ///
++    /// By default this is implemented in terms of `next_u32`. An
++    /// implementation of this trait must provide at least one of
++    /// these two methods. Similarly to `next_u32`, this rarely needs
++    /// to be called directly, prefer `r.gen()` to `r.next_u64()`.
++    fn next_u64(&mut self) -> u64 {
++        ((self.next_u32() as u64) << 32) | (self.next_u32() as u64)
++    }
++
++    /// Return the next random f32 selected from the half-open
++    /// interval `[0, 1)`.
++    ///
++    /// This uses a technique described by Saito and Matsumoto at
++    /// MCQMC'08. Given that the IEEE floating point numbers are
++    /// uniformly distributed over [1,2), we generate a number in
++    /// this range and then offset it onto the range [0,1). Our
++    /// choice of bits (masking v. shifting) is arbitrary and
++    /// should be immaterial for high quality generators. For low
++    /// quality generators (ex. LCG), prefer bitshifting due to
++    /// correlation between sequential low order bits.
++    ///
++    /// See:
++    /// A PRNG specialized in double precision floating point numbers using
++    /// an affine transition
++    /// http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/ARTICLES/dSFMT.pdf
++    /// http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-slide-e.pdf
++    ///
++    /// By default this is implemented in terms of `next_u32`, but a
++    /// random number generator which can generate numbers satisfying
++    /// the requirements directly can overload this for performance.
++    /// It is required that the return value lies in `[0, 1)`.
++    ///
++    /// See `Closed01` for the closed interval `[0,1]`, and
++    /// `Open01` for the open interval `(0,1)`.
++    fn next_f32(&mut self) -> f32 {
++        const UPPER_MASK: u32 = 0x3F800000;
++        const LOWER_MASK: u32 = 0x7FFFFF;
++        let tmp = UPPER_MASK | (self.next_u32() & LOWER_MASK);
++        let result: f32 = unsafe { mem::transmute(tmp) };
++        result - 1.0
++    }
++
++    /// Return the next random f64 selected from the half-open
++    /// interval `[0, 1)`.
++    ///
++    /// By default this is implemented in terms of `next_u64`, but a
++    /// random number generator which can generate numbers satisfying
++    /// the requirements directly can overload this for performance.
++    /// It is required that the return value lies in `[0, 1)`.
++    ///
++    /// See `Closed01` for the closed interval `[0,1]`, and
++    /// `Open01` for the open interval `(0,1)`.
++    fn next_f64(&mut self) -> f64 {
++        const UPPER_MASK: u64 = 0x3FF0000000000000;
++        const LOWER_MASK: u64 = 0xFFFFFFFFFFFFF;
++        let tmp = UPPER_MASK | (self.next_u64() & LOWER_MASK);
++        let result: f64 = unsafe { mem::transmute(tmp) };
++        result - 1.0
++    }
++
++    /// Fill `dest` with random data.
++    ///
++    /// This has a default implementation in terms of `next_u64` and
++    /// `next_u32`, but should be overridden by implementations that
++    /// offer a more efficient solution than just calling those
++    /// methods repeatedly.
++    ///
++    /// This method does *not* have a requirement to bear any fixed
++    /// relationship to the other methods, for example, it does *not*
++    /// have to result in the same output as progressively filling
++    /// `dest` with `self.gen::<u8>()`, and any such behaviour should
++    /// not be relied upon.
++    ///
++    /// This method should guarantee that `dest` is entirely filled
++    /// with new data, and may panic if this is impossible
++    /// (e.g. reading past the end of a file that is being used as the
++    /// source of randomness).
++    ///
++    /// # Example
++    ///
++    /// ```rust
++    /// use rand::{thread_rng, Rng};
++    ///
++    /// let mut v = [0u8; 13579];
++    /// thread_rng().fill_bytes(&mut v);
++    /// println!("{:?}", &v[..]);
++    /// ```
++    fn fill_bytes(&mut self, dest: &mut [u8]) {
++        // this could, in theory, be done by transmuting dest to a
++        // [u64], but this is (1) likely to be undefined behaviour for
++        // LLVM, (2) has to be very careful about alignment concerns,
++        // (3) adds more `unsafe` that needs to be checked, (4)
++        // probably doesn't give much performance gain if
++        // optimisations are on.
++        let mut count = 0;
++        let mut num = 0;
++        for byte in dest.iter_mut() {
++            if count == 0 {
++                // we could micro-optimise here by generating a u32 if
++                // we only need a few more bytes to fill the vector
++                // (i.e. at most 4).
++                num = self.next_u64();
++                count = 8;
++            }
++
++            *byte = (num & 0xff) as u8;
++            num >>= 8;
++            count -= 1;
++        }
++    }
++
++    /// Return a random value of a `Rand` type.
++    ///
++    /// # Example
++    ///
++    /// ```rust
++    /// use rand::{thread_rng, Rng};
++    ///
++    /// let mut rng = thread_rng();
++    /// let x: u32 = rng.gen();
++    /// println!("{}", x);
++    /// println!("{:?}", rng.gen::<(f64, bool)>());
++    /// ```
++    #[inline(always)]
++    fn gen<T: Rand>(&mut self) -> T where Self: Sized {
++        Rand::rand(self)
++    }
++
++    /// Return an iterator that will yield an infinite number of randomly
++    /// generated items.
++    ///
++    /// # Example
++    ///
++    /// ```
++    /// use rand::{thread_rng, Rng};
++    ///
++    /// let mut rng = thread_rng();
++    /// let x = rng.gen_iter::<u32>().take(10).collect::<Vec<u32>>();
++    /// println!("{:?}", x);
++    /// println!("{:?}", rng.gen_iter::<(f64, bool)>().take(5)
++    ///                     .collect::<Vec<(f64, bool)>>());
++    /// ```
++    fn gen_iter<'a, T: Rand>(&'a mut self) -> Generator<'a, T, Self> where Self: Sized {
++        Generator { rng: self, _marker: marker::PhantomData }
++    }
++
++    /// Generate a random value in the range [`low`, `high`).
++    ///
++    /// This is a convenience wrapper around
++    /// `distributions::Range`. If this function will be called
++    /// repeatedly with the same arguments, one should use `Range`, as
++    /// that will amortize the computations that allow for perfect
++    /// uniformity, as they only happen on initialization.
++    ///
++    /// # Panics
++    ///
++    /// Panics if `low >= high`.
++    ///
++    /// # Example
++    ///
++    /// ```rust
++    /// use rand::{thread_rng, Rng};
++    ///
++    /// let mut rng = thread_rng();
++    /// let n: u32 = rng.gen_range(0, 10);
++    /// println!("{}", n);
++    /// let m: f64 = rng.gen_range(-40.0f64, 1.3e5f64);
++    /// println!("{}", m);
++    /// ```
++    fn gen_range<T: PartialOrd + SampleRange>(&mut self, low: T, high: T) -> T where Self: Sized {
++        assert!(low < high, "Rng.gen_range called with low >= high");
++        Range::new(low, high).ind_sample(self)
++    }
++
++    /// Return a bool with a 1 in n chance of true
++    ///
++    /// # Example
++    ///
++    /// ```rust
++    /// use rand::{thread_rng, Rng};
++    ///
++    /// let mut rng = thread_rng();
++    /// println!("{}", rng.gen_weighted_bool(3));
++    /// ```
++    fn gen_weighted_bool(&mut self, n: u32) -> bool where Self: Sized {
++        n <= 1 || self.gen_range(0, n) == 0
++    }
++
++    /// Return an iterator of random characters from the set A-Z,a-z,0-9.
++    ///
++    /// # Example
++    ///
++    /// ```rust
++    /// use rand::{thread_rng, Rng};
++    ///
++    /// let s: String = thread_rng().gen_ascii_chars().take(10).collect();
++    /// println!("{}", s);
++    /// ```
++    fn gen_ascii_chars<'a>(&'a mut self) -> AsciiGenerator<'a, Self> where Self: Sized {
++        AsciiGenerator { rng: self }
++    }
++
++    /// Return a random element from `values`.
++    ///
++    /// Return `None` if `values` is empty.
++    ///
++    /// # Example
++    ///
++    /// ```
++    /// use rand::{thread_rng, Rng};
++    ///
++    /// let choices = [1, 2, 4, 8, 16, 32];
++    /// let mut rng = thread_rng();
++    /// println!("{:?}", rng.choose(&choices));
++    /// assert_eq!(rng.choose(&choices[..0]), None);
++    /// ```
++    fn choose<'a, T>(&mut self, values: &'a [T]) -> Option<&'a T> where Self: Sized {
++        if values.is_empty() {
++            None
++        } else {
++            Some(&values[self.gen_range(0, values.len())])
++        }
++    }
++
++    /// Return a mutable pointer to a random element from `values`.
++    ///
++    /// Return `None` if `values` is empty.
++    fn choose_mut<'a, T>(&mut self, values: &'a mut [T]) -> Option<&'a mut T> where Self: Sized {
++        if values.is_empty() {
++            None
++        } else {
++            let len = values.len();
++            Some(&mut values[self.gen_range(0, len)])
++        }
++    }
++
++    /// Shuffle a mutable slice in place.
++    ///
++    /// This applies Durstenfeld's algorithm for the [Fisher–Yates shuffle](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm)
++    /// which produces an unbiased permutation.
++    ///
++    /// # Example
++    ///
++    /// ```rust
++    /// use rand::{thread_rng, Rng};
++    ///
++    /// let mut rng = thread_rng();
++    /// let mut y = [1, 2, 3];
++    /// rng.shuffle(&mut y);
++    /// println!("{:?}", y);
++    /// rng.shuffle(&mut y);
++    /// println!("{:?}", y);
++    /// ```
++    fn shuffle<T>(&mut self, values: &mut [T]) where Self: Sized {
++        let mut i = values.len();
++        while i >= 2 {
++            // invariant: elements with index >= i have been locked in place.
++            i -= 1;
++            // lock element i in place.
++            values.swap(i, self.gen_range(0, i + 1));
++        }
++    }
++}
++
++impl<'a, R: ?Sized> Rng for &'a mut R where R: Rng {
++    fn next_u32(&mut self) -> u32 {
++        (**self).next_u32()
++    }
++
++    fn next_u64(&mut self) -> u64 {
++        (**self).next_u64()
++    }
++
++    fn next_f32(&mut self) -> f32 {
++        (**self).next_f32()
++    }
++
++    fn next_f64(&mut self) -> f64 {
++        (**self).next_f64()
++    }
++
++    fn fill_bytes(&mut self, dest: &mut [u8]) {
++        (**self).fill_bytes(dest)
++    }
++}
++
++impl<R: ?Sized> Rng for Box<R> where R: Rng {
++    fn next_u32(&mut self) -> u32 {
++        (**self).next_u32()
++    }
++
++    fn next_u64(&mut self) -> u64 {
++        (**self).next_u64()
++    }
++
++    fn next_f32(&mut self) -> f32 {
++        (**self).next_f32()
++    }
++
++    fn next_f64(&mut self) -> f64 {
++        (**self).next_f64()
++    }
++
++    fn fill_bytes(&mut self, dest: &mut [u8]) {
++        (**self).fill_bytes(dest)
++    }
++}
++
++/// Iterator which will generate a stream of random items.
++///
++/// This iterator is created via the [`gen_iter`] method on [`Rng`].
++///
++/// [`gen_iter`]: trait.Rng.html#method.gen_iter
++/// [`Rng`]: trait.Rng.html
++#[derive(Debug)]
++pub struct Generator<'a, T, R:'a> {
++    rng: &'a mut R,
++    _marker: marker::PhantomData<fn() -> T>,
++}
++
++impl<'a, T: Rand, R: Rng> Iterator for Generator<'a, T, R> {
++    type Item = T;
++
++    fn next(&mut self) -> Option<T> {
++        Some(self.rng.gen())
++    }
++}
++
++/// Iterator which will continuously generate random ascii characters.
++///
++/// This iterator is created via the [`gen_ascii_chars`] method on [`Rng`].
++///
++/// [`gen_ascii_chars`]: trait.Rng.html#method.gen_ascii_chars
++/// [`Rng`]: trait.Rng.html
++#[derive(Debug)]
++pub struct AsciiGenerator<'a, R:'a> {
++    rng: &'a mut R,
++}
++
++impl<'a, R: Rng> Iterator for AsciiGenerator<'a, R> {
++    type Item = char;
++
++    fn next(&mut self) -> Option<char> {
++        const GEN_ASCII_STR_CHARSET: &'static [u8] =
++            b"ABCDEFGHIJKLMNOPQRSTUVWXYZ\
++              abcdefghijklmnopqrstuvwxyz\
++              0123456789";
++        Some(*self.rng.choose(GEN_ASCII_STR_CHARSET).unwrap() as char)
++    }
++}
++
++/// A random number generator that can be explicitly seeded to produce
++/// the same stream of randomness multiple times.
++pub trait SeedableRng<Seed>: Rng {
++    /// Reseed an RNG with the given seed.
++    ///
++    /// # Example
++    ///
++    /// ```rust
++    /// use rand::{Rng, SeedableRng, StdRng};
++    ///
++    /// let seed: &[_] = &[1, 2, 3, 4];
++    /// let mut rng: StdRng = SeedableRng::from_seed(seed);
++    /// println!("{}", rng.gen::<f64>());
++    /// rng.reseed(&[5, 6, 7, 8]);
++    /// println!("{}", rng.gen::<f64>());
++    /// ```
++    fn reseed(&mut self, Seed);
++
++    /// Create a new RNG with the given seed.
++    ///
++    /// # Example
++    ///
++    /// ```rust
++    /// use rand::{Rng, SeedableRng, StdRng};
++    ///
++    /// let seed: &[_] = &[1, 2, 3, 4];
++    /// let mut rng: StdRng = SeedableRng::from_seed(seed);
++    /// println!("{}", rng.gen::<f64>());
++    /// ```
++    fn from_seed(seed: Seed) -> Self;
++}
++
++/// An Xorshift[1] random number
++/// generator.
++///
++/// The Xorshift algorithm is not suitable for cryptographic purposes
++/// but is very fast. If you do not know for sure that it fits your
++/// requirements, use a more secure one such as `IsaacRng` or `OsRng`.
++///
++/// [1]: Marsaglia, George (July 2003). ["Xorshift
++/// RNGs"](http://www.jstatsoft.org/v08/i14/paper). *Journal of
++/// Statistical Software*. Vol. 8 (Issue 14).
++#[allow(missing_copy_implementations)]
++#[derive(Clone, Debug)]
++pub struct XorShiftRng {
++    x: w32,
++    y: w32,
++    z: w32,
++    w: w32,
++}
++
++impl XorShiftRng {
++    /// Creates a new XorShiftRng instance which is not seeded.
++    ///
++    /// The initial values of this RNG are constants, so all generators created
++    /// by this function will yield the same stream of random numbers. It is
++    /// highly recommended that this is created through `SeedableRng` instead of
++    /// this function
++    pub fn new_unseeded() -> XorShiftRng {
++        XorShiftRng {
++            x: w(0x193a6754),
++            y: w(0xa8a7d469),
++            z: w(0x97830e05),
++            w: w(0x113ba7bb),
++        }
++    }
++}
++
++impl Rng for XorShiftRng {
++    #[inline]
++    fn next_u32(&mut self) -> u32 {
++        let x = self.x;
++        let t = x ^ (x << 11);
++        self.x = self.y;
++        self.y = self.z;
++        self.z = self.w;
++        let w_ = self.w;
++        self.w = w_ ^ (w_ >> 19) ^ (t ^ (t >> 8));
++        self.w.0
++    }
++}
++
++impl SeedableRng<[u32; 4]> for XorShiftRng {
++    /// Reseed an XorShiftRng. This will panic if `seed` is entirely 0.
++    fn reseed(&mut self, seed: [u32; 4]) {
++        assert!(!seed.iter().all(|&x| x == 0),
++                "XorShiftRng.reseed called with an all zero seed.");
++
++        self.x = w(seed[0]);
++        self.y = w(seed[1]);
++        self.z = w(seed[2]);
++        self.w = w(seed[3]);
++    }
++
++    /// Create a new XorShiftRng. This will panic if `seed` is entirely 0.
++    fn from_seed(seed: [u32; 4]) -> XorShiftRng {
++        assert!(!seed.iter().all(|&x| x == 0),
++                "XorShiftRng::from_seed called with an all zero seed.");
++
++        XorShiftRng {
++            x: w(seed[0]),
++            y: w(seed[1]),
++            z: w(seed[2]),
++            w: w(seed[3]),
++        }
++    }
++}
++
++impl Rand for XorShiftRng {
++    fn rand<R: Rng>(rng: &mut R) -> XorShiftRng {
++        let mut tuple: (u32, u32, u32, u32) = rng.gen();
++        while tuple == (0, 0, 0, 0) {
++            tuple = rng.gen();
++        }
++        let (x, y, z, w_) = tuple;
++        XorShiftRng { x: w(x), y: w(y), z: w(z), w: w(w_) }
++    }
++}
++
++/// A wrapper for generating floating point numbers uniformly in the
++/// open interval `(0,1)` (not including either endpoint).
++///
++/// Use `Closed01` for the closed interval `[0,1]`, and the default
++/// `Rand` implementation for `f32` and `f64` for the half-open
++/// `[0,1)`.
++///
++/// # Example
++/// ```rust
++/// use rand::{random, Open01};
++///
++/// let Open01(val) = random::<Open01<f32>>();
++/// println!("f32 from (0,1): {}", val);
++/// ```
++#[derive(Debug)]
++pub struct Open01<F>(pub F);
++
++/// A wrapper for generating floating point numbers uniformly in the
++/// closed interval `[0,1]` (including both endpoints).
++///
++/// Use `Open01` for the closed interval `(0,1)`, and the default
++/// `Rand` implementation of `f32` and `f64` for the half-open
++/// `[0,1)`.
++///
++/// # Example
++///
++/// ```rust
++/// use rand::{random, Closed01};
++///
++/// let Closed01(val) = random::<Closed01<f32>>();
++/// println!("f32 from [0,1]: {}", val);
++/// ```
++#[derive(Debug)]
++pub struct Closed01<F>(pub F);
++
++/// The standard RNG. This is designed to be efficient on the current
++/// platform.
++#[derive(Copy, Clone, Debug)]
++pub struct StdRng {
++    rng: IsaacWordRng,
++}
++
++impl StdRng {
++    /// Create a randomly seeded instance of `StdRng`.
++    ///
++    /// This is a very expensive operation as it has to read
++    /// randomness from the operating system and use this in an
++    /// expensive seeding operation. If one is only generating a small
++    /// number of random numbers, or doesn't need the utmost speed for
++    /// generating each number, `thread_rng` and/or `random` may be more
++    /// appropriate.
++    ///
++    /// Reading the randomness from the OS may fail, and any error is
++    /// propagated via the `io::Result` return value.
++    pub fn new() -> io::Result<StdRng> {
++        OsRng::new().map(|mut r| StdRng { rng: r.gen() })
++    }
++}
++
++impl Rng for StdRng {
++    #[inline]
++    fn next_u32(&mut self) -> u32 {
++        self.rng.next_u32()
++    }
++
++    #[inline]
++    fn next_u64(&mut self) -> u64 {
++        self.rng.next_u64()
++    }
++}
++
++impl<'a> SeedableRng<&'a [usize]> for StdRng {
++    fn reseed(&mut self, seed: &'a [usize]) {
++        // the internal RNG can just be seeded from the above
++        // randomness.
++        self.rng.reseed(unsafe {mem::transmute(seed)})
++    }
++
++    fn from_seed(seed: &'a [usize]) -> StdRng {
++        StdRng { rng: SeedableRng::from_seed(unsafe {mem::transmute(seed)}) }
++    }
++}
++
++/// Create a weak random number generator with a default algorithm and seed.
++///
++/// It returns the fastest `Rng` algorithm currently available in Rust without
++/// consideration for cryptography or security. If you require a specifically
++/// seeded `Rng` for consistency over time you should pick one algorithm and
++/// create the `Rng` yourself.
++///
++/// This will read randomness from the operating system to seed the
++/// generator.
++pub fn weak_rng() -> XorShiftRng {
++    match OsRng::new() {
++        Ok(mut r) => r.gen(),
++        Err(e) => panic!("weak_rng: failed to create seeded RNG: {:?}", e)
++    }
++}
++
++/// Controls how the thread-local RNG is reseeded.
++#[derive(Debug)]
++struct ThreadRngReseeder;
++
++impl reseeding::Reseeder<StdRng> for ThreadRngReseeder {
++    fn reseed(&mut self, rng: &mut StdRng) {
++        *rng = match StdRng::new() {
++            Ok(r) => r,
++            Err(e) => panic!("could not reseed thread_rng: {}", e)
++        }
++    }
++}
++const THREAD_RNG_RESEED_THRESHOLD: u64 = 32_768;
++type ThreadRngInner = reseeding::ReseedingRng<StdRng, ThreadRngReseeder>;
++
++/// The thread-local RNG.
++#[derive(Clone, Debug)]
++pub struct ThreadRng {
++    rng: Rc<RefCell<ThreadRngInner>>,
++}
++
++/// Retrieve the lazily-initialized thread-local random number
++/// generator, seeded by the system. Intended to be used in method
++/// chaining style, e.g. `thread_rng().gen::<i32>()`.
++///
++/// The RNG provided will reseed itself from the operating system
++/// after generating a certain amount of randomness.
++///
++/// The internal RNG used is platform and architecture dependent, even
++/// if the operating system random number generator is rigged to give
++/// the same sequence always. If absolute consistency is required,
++/// explicitly select an RNG, e.g. `IsaacRng` or `Isaac64Rng`.
++pub fn thread_rng() -> ThreadRng {
++    // used to make space in TLS for a random number generator
++    thread_local!(static THREAD_RNG_KEY: Rc<RefCell<ThreadRngInner>> = {
++        let r = match StdRng::new() {
++            Ok(r) => r,
++            Err(e) => panic!("could not initialize thread_rng: {}", e)
++        };
++        let rng = reseeding::ReseedingRng::new(r,
++                                               THREAD_RNG_RESEED_THRESHOLD,
++                                               ThreadRngReseeder);
++        Rc::new(RefCell::new(rng))
++    });
++
++    ThreadRng { rng: THREAD_RNG_KEY.with(|t| t.clone()) }
++}
++
++impl Rng for ThreadRng {
++    fn next_u32(&mut self) -> u32 {
++        self.rng.borrow_mut().next_u32()
++    }
++
++    fn next_u64(&mut self) -> u64 {
++        self.rng.borrow_mut().next_u64()
++    }
++
++    #[inline]
++    fn fill_bytes(&mut self, bytes: &mut [u8]) {
++        self.rng.borrow_mut().fill_bytes(bytes)
++    }
++}
++
++/// Generates a random value using the thread-local random number generator.
++///
++/// `random()` can generate various types of random things, and so may require
++/// type hinting to generate the specific type you want.
++///
++/// This function uses the thread local random number generator. This means
++/// that if you're calling `random()` in a loop, caching the generator can
++/// increase performance. An example is shown below.
++///
++/// # Examples
++///
++/// ```
++/// let x = rand::random::<u8>();
++/// println!("{}", x);
++///
++/// let y = rand::random::<f64>();
++/// println!("{}", y);
++///
++/// if rand::random() { // generates a boolean
++///     println!("Better lucky than good!");
++/// }
++/// ```
++///
++/// Caching the thread local random number generator:
++///
++/// ```
++/// use rand::Rng;
++///
++/// let mut v = vec![1, 2, 3];
++///
++/// for x in v.iter_mut() {
++///     *x = rand::random()
++/// }
++///
++/// // would be faster as
++///
++/// let mut rng = rand::thread_rng();
++///
++/// for x in v.iter_mut() {
++///     *x = rng.gen();
++/// }
++/// ```
++#[inline]
++pub fn random<T: Rand>() -> T {
++    thread_rng().gen()
++}
++
++/// Randomly sample up to `amount` elements from a finite iterator.
++/// The order of elements in the sample is not random.
++///
++/// # Example
++///
++/// ```rust
++/// use rand::{thread_rng, sample};
++///
++/// let mut rng = thread_rng();
++/// let sample = sample(&mut rng, 1..100, 5);
++/// println!("{:?}", sample);
++/// ```
++pub fn sample<T, I, R>(rng: &mut R, iterable: I, amount: usize) -> Vec<T>
++    where I: IntoIterator<Item=T>,
++          R: Rng,
++{
++    let mut iter = iterable.into_iter();
++    let mut reservoir: Vec<T> = iter.by_ref().take(amount).collect();
++    // continue unless the iterator was exhausted
++    if reservoir.len() == amount {
++        for (i, elem) in iter.enumerate() {
++            let k = rng.gen_range(0, i + 1 + amount);
++            if let Some(spot) = reservoir.get_mut(k) {
++                *spot = elem;
++            }
++        }
++    }
++    reservoir
++}
++
++#[cfg(test)]
++mod test {
++    use super::{Rng, thread_rng, random, SeedableRng, StdRng, sample};
++    use std::iter::repeat;
++
++    pub struct MyRng<R> { inner: R }
++
++    impl<R: Rng> Rng for MyRng<R> {
++        fn next_u32(&mut self) -> u32 {
++            fn next<T: Rng>(t: &mut T) -> u32 {
++                t.next_u32()
++            }
++            next(&mut self.inner)
++        }
++    }
++
++    pub fn rng() -> MyRng<::ThreadRng> {
++        MyRng { inner: ::thread_rng() }
++    }
++
++    struct ConstRng { i: u64 }
++    impl Rng for ConstRng {
++        fn next_u32(&mut self) -> u32 { self.i as u32 }
++        fn next_u64(&mut self) -> u64 { self.i }
++
++        // no fill_bytes on purpose
++    }
++
++    pub fn iter_eq<I, J>(i: I, j: J) -> bool
++        where I: IntoIterator,
++              J: IntoIterator<Item=I::Item>,
++              I::Item: Eq
++    {
++        // make sure the iterators have equal length
++        let mut i = i.into_iter();
++        let mut j = j.into_iter();
++        loop {
++            match (i.next(), j.next()) {
++                (Some(ref ei), Some(ref ej)) if ei == ej => { }
++                (None, None) => return true,
++                _ => return false,
++            }
++        }
++    }
++
++    #[test]
++    fn test_fill_bytes_default() {
++        let mut r = ConstRng { i: 0x11_22_33_44_55_66_77_88 };
++
++        // check every remainder mod 8, both in small and big vectors.
++        let lengths = [0, 1, 2, 3, 4, 5, 6, 7,
++                       80, 81, 82, 83, 84, 85, 86, 87];
++        for &n in lengths.iter() {
++            let mut v = repeat(0u8).take(n).collect::<Vec<_>>();
++            r.fill_bytes(&mut v);
++
++            // use this to get nicer error messages.
++            for (i, &byte) in v.iter().enumerate() {
++                if byte == 0 {
++                    panic!("byte {} of {} is zero", i, n)
++                }
++            }
++        }
++    }
++
++    #[test]
++    fn test_gen_range() {
++        let mut r = thread_rng();
++        for _ in 0..1000 {
++            let a = r.gen_range(-3, 42);
++            assert!(a >= -3 && a < 42);
++            assert_eq!(r.gen_range(0, 1), 0);
++            assert_eq!(r.gen_range(-12, -11), -12);
++        }
++
++        for _ in 0..1000 {
++            let a = r.gen_range(10, 42);
++            assert!(a >= 10 && a < 42);
++            assert_eq!(r.gen_range(0, 1), 0);
++            assert_eq!(r.gen_range(3_000_000, 3_000_001), 3_000_000);
++        }
++
++    }
++
++    #[test]
++    #[should_panic]
++    fn test_gen_range_panic_int() {
++        let mut r = thread_rng();
++        r.gen_range(5, -2);
++    }
++
++    #[test]
++    #[should_panic]
++    fn test_gen_range_panic_usize() {
++        let mut r = thread_rng();
++        r.gen_range(5, 2);
++    }
++
++    #[test]
++    fn test_gen_f64() {
++        let mut r = thread_rng();
++        let a = r.gen::<f64>();
++        let b = r.gen::<f64>();
++        debug!("{:?}", (a, b));
++    }
++
++    #[test]
++    fn test_gen_weighted_bool() {
++        let mut r = thread_rng();
++        assert_eq!(r.gen_weighted_bool(0), true);
++        assert_eq!(r.gen_weighted_bool(1), true);
++    }
++
++    #[test]
++    fn test_gen_ascii_str() {
++        let mut r = thread_rng();
++        assert_eq!(r.gen_ascii_chars().take(0).count(), 0);
++        assert_eq!(r.gen_ascii_chars().take(10).count(), 10);
++        assert_eq!(r.gen_ascii_chars().take(16).count(), 16);
++    }
++
++    #[test]
++    fn test_gen_vec() {
++        let mut r = thread_rng();
++        assert_eq!(r.gen_iter::<u8>().take(0).count(), 0);
++        assert_eq!(r.gen_iter::<u8>().take(10).count(), 10);
++        assert_eq!(r.gen_iter::<f64>().take(16).count(), 16);
++    }
++
++    #[test]
++    fn test_choose() {
++        let mut r = thread_rng();
++        assert_eq!(r.choose(&[1, 1, 1]).map(|&x|x), Some(1));
++
++        let v: &[isize] = &[];
++        assert_eq!(r.choose(v), None);
++    }
++
++    #[test]
++    fn test_shuffle() {
++        let mut r = thread_rng();
++        let empty: &mut [isize] = &mut [];
++        r.shuffle(empty);
++        let mut one = [1];
++        r.shuffle(&mut one);
++        let b: &[_] = &[1];
++        assert_eq!(one, b);
++
++        let mut two = [1, 2];
++        r.shuffle(&mut two);
++        assert!(two == [1, 2] || two == [2, 1]);
++
++        let mut x = [1, 1, 1];
++        r.shuffle(&mut x);
++        let b: &[_] = &[1, 1, 1];
++        assert_eq!(x, b);
++    }
++
++    #[test]
++    fn test_thread_rng() {
++        let mut r = thread_rng();
++        r.gen::<i32>();
++        let mut v = [1, 1, 1];
++        r.shuffle(&mut v);
++        let b: &[_] = &[1, 1, 1];
++        assert_eq!(v, b);
++        assert_eq!(r.gen_range(0, 1), 0);
++    }
++
++    #[test]
++    fn test_rng_trait_object() {
++        let mut rng = thread_rng();
++        {
++            let mut r = &mut rng as &mut Rng;
++            r.next_u32();
++            (&mut r).gen::<i32>();
++            let mut v = [1, 1, 1];
++            (&mut r).shuffle(&mut v);
++            let b: &[_] = &[1, 1, 1];
++            assert_eq!(v, b);
++            assert_eq!((&mut r).gen_range(0, 1), 0);
++        }
++        {
++            let mut r = Box::new(rng) as Box<Rng>;
++            r.next_u32();
++            r.gen::<i32>();
++            let mut v = [1, 1, 1];
++            r.shuffle(&mut v);
++            let b: &[_] = &[1, 1, 1];
++            assert_eq!(v, b);
++            assert_eq!(r.gen_range(0, 1), 0);
++        }
++    }
++
++    #[test]
++    fn test_random() {
++        // not sure how to test this aside from just getting some values
++        let _n : usize = random();
++        let _f : f32 = random();
++        let _o : Option<Option<i8>> = random();
++        let _many : ((),
++                     (usize,
++                      isize,
++                      Option<(u32, (bool,))>),
++                     (u8, i8, u16, i16, u32, i32, u64, i64),
++                     (f32, (f64, (f64,)))) = random();
++    }
++
++    #[test]
++    fn test_sample() {
++        let min_val = 1;
++        let max_val = 100;
++
++        let mut r = thread_rng();
++        let vals = (min_val..max_val).collect::<Vec<i32>>();
++        let small_sample = sample(&mut r, vals.iter(), 5);
++        let large_sample = sample(&mut r, vals.iter(), vals.len() + 5);
++
++        assert_eq!(small_sample.len(), 5);
++        assert_eq!(large_sample.len(), vals.len());
++
++        assert!(small_sample.iter().all(|e| {
++            **e >= min_val && **e <= max_val
++        }));
++    }
++
++    #[test]
++    fn test_std_rng_seeded() {
++        let s = thread_rng().gen_iter::<usize>().take(256).collect::<Vec<usize>>();
++        let mut ra: StdRng = SeedableRng::from_seed(&s[..]);
++        let mut rb: StdRng = SeedableRng::from_seed(&s[..]);
++        assert!(iter_eq(ra.gen_ascii_chars().take(100),
++                        rb.gen_ascii_chars().take(100)));
++    }
++
++    #[test]
++    fn test_std_rng_reseed() {
++        let s = thread_rng().gen_iter::<usize>().take(256).collect::<Vec<usize>>();
++        let mut r: StdRng = SeedableRng::from_seed(&s[..]);
++        let string1 = r.gen_ascii_chars().take(100).collect::<String>();
++
++        r.reseed(&s);
++
++        let string2 = r.gen_ascii_chars().take(100).collect::<String>();
++        assert_eq!(string1, string2);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..82a09ad03476d15c174a07960711904c1d8f3d36
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,600 @@@
++// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Interfaces to the operating system provided random number
++//! generators.
++
++use std::{io, mem, fmt};
++use Rng;
++
++/// A random number generator that retrieves randomness straight from
++/// the operating system. Platform sources:
++///
++/// - Unix-like systems (Linux, Android, Mac OSX): read directly from
++///   `/dev/urandom`, or from `getrandom(2)` system call if available.
++/// - OpenBSD: calls `getentropy(2)`
++/// - FreeBSD: uses the `kern.arandom` `sysctl(2)` mib
++/// - Windows: calls `RtlGenRandom`, exported from `advapi32.dll` as
++///   `SystemFunction036`.
++/// - iOS: calls SecRandomCopyBytes as /dev/(u)random is sandboxed.
++/// - PNaCl: calls into the `nacl-irt-random-0.1` IRT interface.
++///
++/// This usually does not block. On some systems (e.g. FreeBSD, OpenBSD,
++/// Max OS X, and modern Linux) this may block very early in the init
++/// process, if the CSPRNG has not been seeded yet.[1]
++///
++/// [1] See https://www.python.org/dev/peps/pep-0524/ for a more in-depth
++///     discussion.
++pub struct OsRng(imp::OsRng);
++
++impl OsRng {
++    /// Create a new `OsRng`.
++    pub fn new() -> io::Result<OsRng> {
++        imp::OsRng::new().map(OsRng)
++    }
++}
++
++impl Rng for OsRng {
++    fn next_u32(&mut self) -> u32 { self.0.next_u32() }
++    fn next_u64(&mut self) -> u64 { self.0.next_u64() }
++    fn fill_bytes(&mut self, v: &mut [u8]) { self.0.fill_bytes(v) }
++}
++
++impl fmt::Debug for OsRng {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write!(f, "OsRng {{}}")
++    }
++}
++
++fn next_u32(mut fill_buf: &mut FnMut(&mut [u8])) -> u32 {
++    let mut buf: [u8; 4] = [0; 4];
++    fill_buf(&mut buf);
++    unsafe { mem::transmute::<[u8; 4], u32>(buf) }
++}
++
++fn next_u64(mut fill_buf: &mut FnMut(&mut [u8])) -> u64 {
++    let mut buf: [u8; 8] = [0; 8];
++    fill_buf(&mut buf);
++    unsafe { mem::transmute::<[u8; 8], u64>(buf) }
++}
++
++#[cfg(all(unix, not(target_os = "ios"),
++          not(target_os = "nacl"),
++          not(target_os = "freebsd"),
++          not(target_os = "fuchsia"),
++          not(target_os = "openbsd"),
++          not(target_os = "redox")))]
++mod imp {
++    extern crate libc;
++
++    use super::{next_u32, next_u64};
++    use self::OsRngInner::*;
++
++    use std::io;
++    use std::fs::File;
++    use Rng;
++    use read::ReadRng;
++
++    #[cfg(all(target_os = "linux",
++              any(target_arch = "x86_64",
++                  target_arch = "x86",
++                  target_arch = "arm",
++                  target_arch = "aarch64",
++                  target_arch = "powerpc")))]
++    fn getrandom(buf: &mut [u8]) -> libc::c_long {
++        extern "C" {
++            fn syscall(number: libc::c_long, ...) -> libc::c_long;
++        }
++
++        #[cfg(target_arch = "x86_64")]
++        const NR_GETRANDOM: libc::c_long = 318;
++        #[cfg(target_arch = "x86")]
++        const NR_GETRANDOM: libc::c_long = 355;
++        #[cfg(target_arch = "arm")]
++        const NR_GETRANDOM: libc::c_long = 384;
++        #[cfg(target_arch = "aarch64")]
++        const NR_GETRANDOM: libc::c_long = 278;
++        #[cfg(target_arch = "powerpc")]
++        const NR_GETRANDOM: libc::c_long = 384;
++
++        unsafe {
++            syscall(NR_GETRANDOM, buf.as_mut_ptr(), buf.len(), 0)
++        }
++    }
++
++    #[cfg(not(all(target_os = "linux",
++                  any(target_arch = "x86_64",
++                      target_arch = "x86",
++                      target_arch = "arm",
++                      target_arch = "aarch64",
++                      target_arch = "powerpc"))))]
++    fn getrandom(_buf: &mut [u8]) -> libc::c_long { -1 }
++
++    fn getrandom_fill_bytes(v: &mut [u8]) {
++        let mut read = 0;
++        let len = v.len();
++        while read < len {
++            let result = getrandom(&mut v[read..]);
++            if result == -1 {
++                let err = io::Error::last_os_error();
++                if err.kind() == io::ErrorKind::Interrupted {
++                    continue
++                } else {
++                    panic!("unexpected getrandom error: {}", err);
++                }
++            } else {
++                read += result as usize;
++            }
++        }
++    }
++
++    #[cfg(all(target_os = "linux",
++              any(target_arch = "x86_64",
++                  target_arch = "x86",
++                  target_arch = "arm",
++                  target_arch = "aarch64",
++                  target_arch = "powerpc")))]
++    fn is_getrandom_available() -> bool {
++        use std::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering};
++        use std::sync::{Once, ONCE_INIT};
++
++        static CHECKER: Once = ONCE_INIT;
++        static AVAILABLE: AtomicBool = ATOMIC_BOOL_INIT;
++
++        CHECKER.call_once(|| {
++            let mut buf: [u8; 0] = [];
++            let result = getrandom(&mut buf);
++            let available = if result == -1 {
++                let err = io::Error::last_os_error().raw_os_error();
++                err != Some(libc::ENOSYS)
++            } else {
++                true
++            };
++            AVAILABLE.store(available, Ordering::Relaxed);
++        });
++
++        AVAILABLE.load(Ordering::Relaxed)
++    }
++
++    #[cfg(not(all(target_os = "linux",
++                  any(target_arch = "x86_64",
++                      target_arch = "x86",
++                      target_arch = "arm",
++                      target_arch = "aarch64",
++                      target_arch = "powerpc"))))]
++    fn is_getrandom_available() -> bool { false }
++
++    pub struct OsRng {
++        inner: OsRngInner,
++    }
++
++    enum OsRngInner {
++        OsGetrandomRng,
++        OsReadRng(ReadRng<File>),
++    }
++
++    impl OsRng {
++        pub fn new() -> io::Result<OsRng> {
++            if is_getrandom_available() {
++                return Ok(OsRng { inner: OsGetrandomRng });
++            }
++
++            let reader = try!(File::open("/dev/urandom"));
++            let reader_rng = ReadRng::new(reader);
++
++            Ok(OsRng { inner: OsReadRng(reader_rng) })
++        }
++    }
++
++    impl Rng for OsRng {
++        fn next_u32(&mut self) -> u32 {
++            match self.inner {
++                OsGetrandomRng => next_u32(&mut getrandom_fill_bytes),
++                OsReadRng(ref mut rng) => rng.next_u32(),
++            }
++        }
++        fn next_u64(&mut self) -> u64 {
++            match self.inner {
++                OsGetrandomRng => next_u64(&mut getrandom_fill_bytes),
++                OsReadRng(ref mut rng) => rng.next_u64(),
++            }
++        }
++        fn fill_bytes(&mut self, v: &mut [u8]) {
++            match self.inner {
++                OsGetrandomRng => getrandom_fill_bytes(v),
++                OsReadRng(ref mut rng) => rng.fill_bytes(v)
++            }
++        }
++    }
++}
++
++#[cfg(target_os = "ios")]
++mod imp {
++    extern crate libc;
++
++    use super::{next_u32, next_u64};
++
++    use std::io;
++    use Rng;
++    use self::libc::{c_int, size_t};
++
++    #[derive(Debug)]
++    pub struct OsRng;
++
++    enum SecRandom {}
++
++    #[allow(non_upper_case_globals)]
++    const kSecRandomDefault: *const SecRandom = 0 as *const SecRandom;
++
++    #[link(name = "Security", kind = "framework")]
++    extern {
++        fn SecRandomCopyBytes(rnd: *const SecRandom,
++                              count: size_t, bytes: *mut u8) -> c_int;
++    }
++
++    impl OsRng {
++        pub fn new() -> io::Result<OsRng> {
++            Ok(OsRng)
++        }
++    }
++
++    impl Rng for OsRng {
++        fn next_u32(&mut self) -> u32 {
++            next_u32(&mut |v| self.fill_bytes(v))
++        }
++        fn next_u64(&mut self) -> u64 {
++            next_u64(&mut |v| self.fill_bytes(v))
++        }
++        fn fill_bytes(&mut self, v: &mut [u8]) {
++            let ret = unsafe {
++                SecRandomCopyBytes(kSecRandomDefault, v.len() as size_t, v.as_mut_ptr())
++            };
++            if ret == -1 {
++                panic!("couldn't generate random bytes: {}", io::Error::last_os_error());
++            }
++        }
++    }
++}
++
++#[cfg(target_os = "freebsd")]
++mod imp {
++    extern crate libc;
++
++    use std::{io, ptr};
++    use Rng;
++
++    use super::{next_u32, next_u64};
++
++    #[derive(Debug)]
++    pub struct OsRng;
++
++    impl OsRng {
++        pub fn new() -> io::Result<OsRng> {
++            Ok(OsRng)
++        }
++    }
++
++    impl Rng for OsRng {
++        fn next_u32(&mut self) -> u32 {
++            next_u32(&mut |v| self.fill_bytes(v))
++        }
++        fn next_u64(&mut self) -> u64 {
++            next_u64(&mut |v| self.fill_bytes(v))
++        }
++        fn fill_bytes(&mut self, v: &mut [u8]) {
++            let mib = [libc::CTL_KERN, libc::KERN_ARND];
++            // kern.arandom permits a maximum buffer size of 256 bytes
++            for s in v.chunks_mut(256) {
++                let mut s_len = s.len();
++                let ret = unsafe {
++                    libc::sysctl(mib.as_ptr(), mib.len() as libc::c_uint,
++                                 s.as_mut_ptr() as *mut _, &mut s_len,
++                                 ptr::null(), 0)
++                };
++                if ret == -1 || s_len != s.len() {
++                    panic!("kern.arandom sysctl failed! (returned {}, s.len() {}, oldlenp {})",
++                           ret, s.len(), s_len);
++                }
++            }
++        }
++    }
++}
++
++#[cfg(target_os = "openbsd")]
++mod imp {
++    extern crate libc;
++
++    use std::io;
++    use Rng;
++
++    use super::{next_u32, next_u64};
++
++    #[derive(Debug)]
++    pub struct OsRng;
++
++    impl OsRng {
++        pub fn new() -> io::Result<OsRng> {
++            Ok(OsRng)
++        }
++    }
++
++    impl Rng for OsRng {
++        fn next_u32(&mut self) -> u32 {
++            next_u32(&mut |v| self.fill_bytes(v))
++        }
++        fn next_u64(&mut self) -> u64 {
++            next_u64(&mut |v| self.fill_bytes(v))
++        }
++        fn fill_bytes(&mut self, v: &mut [u8]) {
++            // getentropy(2) permits a maximum buffer size of 256 bytes
++            for s in v.chunks_mut(256) {
++                let ret = unsafe {
++                    libc::getentropy(s.as_mut_ptr() as *mut libc::c_void, s.len())
++                };
++                if ret == -1 {
++                    let err = io::Error::last_os_error();
++                    panic!("getentropy failed: {}", err);
++                }
++            }
++        }
++    }
++}
++
++#[cfg(target_os = "redox")]
++mod imp {
++    use std::io;
++    use std::fs::File;
++    use Rng;
++    use read::ReadRng;
++
++    #[derive(Debug)]
++    pub struct OsRng {
++        inner: ReadRng<File>,
++    }
++
++    impl OsRng {
++        pub fn new() -> io::Result<OsRng> {
++            let reader = try!(File::open("rand:"));
++            let reader_rng = ReadRng::new(reader);
++
++            Ok(OsRng { inner: reader_rng })
++        }
++    }
++
++    impl Rng for OsRng {
++        fn next_u32(&mut self) -> u32 {
++            self.inner.next_u32()
++        }
++        fn next_u64(&mut self) -> u64 {
++            self.inner.next_u64()
++        }
++        fn fill_bytes(&mut self, v: &mut [u8]) {
++            self.inner.fill_bytes(v)
++        }
++    }
++}
++
++#[cfg(target_os = "fuchsia")]
++mod imp {
++    extern crate magenta;
++
++    use std::io;
++    use Rng;
++
++    use super::{next_u32, next_u64};
++
++    #[derive(Debug)]
++    pub struct OsRng;
++
++    impl OsRng {
++        pub fn new() -> io::Result<OsRng> {
++            Ok(OsRng)
++        }
++    }
++
++    impl Rng for OsRng {
++        fn next_u32(&mut self) -> u32 {
++            next_u32(&mut |v| self.fill_bytes(v))
++        }
++        fn next_u64(&mut self) -> u64 {
++            next_u64(&mut |v| self.fill_bytes(v))
++        }
++        fn fill_bytes(&mut self, v: &mut [u8]) {
++            for s in v.chunks_mut(magenta::MX_CPRNG_DRAW_MAX_LEN) {
++                let mut filled = 0;
++                while filled < s.len() {
++                    match magenta::cprng_draw(&mut s[filled..]) {
++                        Ok(actual) => filled += actual,
++                        Err(e) => panic!("cprng_draw failed: {:?}", e),
++                    };
++                }
++            }
++        }
++    }
++}
++
++#[cfg(windows)]
++mod imp {
++    use std::io;
++    use Rng;
++
++    use super::{next_u32, next_u64};
++
++    type BOOLEAN = u8;
++    type ULONG = u32;
++
++    #[link(name = "advapi32")]
++    extern "system" {
++        // This function's real name is `RtlGenRandom`.
++        fn SystemFunction036(RandomBuffer: *mut u8, RandomBufferLength: ULONG) -> BOOLEAN;
++    }
++
++    #[derive(Debug)]
++    pub struct OsRng;
++
++    impl OsRng {
++        pub fn new() -> io::Result<OsRng> {
++            Ok(OsRng)
++        }
++    }
++
++    impl Rng for OsRng {
++        fn next_u32(&mut self) -> u32 {
++            next_u32(&mut |v| self.fill_bytes(v))
++        }
++        fn next_u64(&mut self) -> u64 {
++            next_u64(&mut |v| self.fill_bytes(v))
++        }
++        fn fill_bytes(&mut self, v: &mut [u8]) {
++            // RtlGenRandom takes an ULONG (u32) for the length so we need to
++            // split up the buffer.
++            for slice in v.chunks_mut(<ULONG>::max_value() as usize) {
++                let ret = unsafe {
++                    SystemFunction036(slice.as_mut_ptr(), slice.len() as ULONG)
++                };
++                if ret == 0 {
++                    panic!("couldn't generate random bytes: {}",
++                           io::Error::last_os_error());
++                }
++            }
++        }
++    }
++}
++
++#[cfg(target_os = "nacl")]
++mod imp {
++    extern crate libc;
++
++    use std::io;
++    use std::mem;
++    use Rng;
++
++    use super::{next_u32, next_u64};
++
++    #[derive(Debug)]
++    pub struct OsRng(extern fn(dest: *mut libc::c_void,
++                               bytes: libc::size_t,
++                               read: *mut libc::size_t) -> libc::c_int);
++
++    extern {
++        fn nacl_interface_query(name: *const libc::c_char,
++                                table: *mut libc::c_void,
++                                table_size: libc::size_t) -> libc::size_t;
++    }
++
++    const INTERFACE: &'static [u8] = b"nacl-irt-random-0.1\0";
++
++    #[repr(C)]
++    struct NaClIRTRandom {
++        get_random_bytes: Option<extern fn(dest: *mut libc::c_void,
++                                           bytes: libc::size_t,
++                                           read: *mut libc::size_t) -> libc::c_int>,
++    }
++
++    impl OsRng {
++        pub fn new() -> io::Result<OsRng> {
++            let mut iface = NaClIRTRandom {
++                get_random_bytes: None,
++            };
++            let result = unsafe {
++                nacl_interface_query(INTERFACE.as_ptr() as *const _,
++                                     mem::transmute(&mut iface),
++                                     mem::size_of::<NaClIRTRandom>() as libc::size_t)
++            };
++            if result != 0 {
++                assert!(iface.get_random_bytes.is_some());
++                let result = OsRng(iface.get_random_bytes.take().unwrap());
++                Ok(result)
++            } else {
++                let error = io::ErrorKind::NotFound;
++                let error = io::Error::new(error, "IRT random interface missing");
++                Err(error)
++            }
++        }
++    }
++
++    impl Rng for OsRng {
++        fn next_u32(&mut self) -> u32 {
++            next_u32(&mut |v| self.fill_bytes(v))
++        }
++        fn next_u64(&mut self) -> u64 {
++            next_u64(&mut |v| self.fill_bytes(v))
++        }
++        fn fill_bytes(&mut self, v: &mut [u8]) {
++            let mut read = 0;
++            loop {
++                let mut r: libc::size_t = 0;
++                let len = v.len();
++                let error = (self.0)(v[read..].as_mut_ptr() as *mut _,
++                                     (len - read) as libc::size_t,
++                                     &mut r as *mut _);
++                assert!(error == 0, "`get_random_bytes` failed!");
++                read += r as usize;
++
++                if read >= v.len() { break; }
++            }
++        }
++    }
++}
++
++
++#[cfg(test)]
++mod test {
++    use std::sync::mpsc::channel;
++    use Rng;
++    use OsRng;
++    use std::thread;
++
++    #[test]
++    fn test_os_rng() {
++        let mut r = OsRng::new().unwrap();
++
++        r.next_u32();
++        r.next_u64();
++
++        let mut v = [0u8; 1000];
++        r.fill_bytes(&mut v);
++    }
++
++    #[test]
++    fn test_os_rng_tasks() {
++
++        let mut txs = vec!();
++        for _ in 0..20 {
++            let (tx, rx) = channel();
++            txs.push(tx);
++
++            thread::spawn(move|| {
++                // wait until all the tasks are ready to go.
++                rx.recv().unwrap();
++
++                // deschedule to attempt to interleave things as much
++                // as possible (XXX: is this a good test?)
++                let mut r = OsRng::new().unwrap();
++                thread::yield_now();
++                let mut v = [0u8; 1000];
++
++                for _ in 0..100 {
++                    r.next_u32();
++                    thread::yield_now();
++                    r.next_u64();
++                    thread::yield_now();
++                    r.fill_bytes(&mut v);
++                    thread::yield_now();
++                }
++            });
++        }
++
++        // start all the tasks
++        for tx in txs.iter() {
++            tx.send(()).unwrap();
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a9cf5d9908bdcad99b0ed8d6bd41aea2060baecd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,300 @@@
++// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! The implementations of `Rand` for the built-in types.
++
++use std::char;
++use std::mem;
++
++use {Rand,Rng};
++
++impl Rand for isize {
++    #[inline]
++    fn rand<R: Rng>(rng: &mut R) -> isize {
++        if mem::size_of::<isize>() == 4 {
++            rng.gen::<i32>() as isize
++        } else {
++            rng.gen::<i64>() as isize
++        }
++    }
++}
++
++impl Rand for i8 {
++    #[inline]
++    fn rand<R: Rng>(rng: &mut R) -> i8 {
++        rng.next_u32() as i8
++    }
++}
++
++impl Rand for i16 {
++    #[inline]
++    fn rand<R: Rng>(rng: &mut R) -> i16 {
++        rng.next_u32() as i16
++    }
++}
++
++impl Rand for i32 {
++    #[inline]
++    fn rand<R: Rng>(rng: &mut R) -> i32 {
++        rng.next_u32() as i32
++    }
++}
++
++impl Rand for i64 {
++    #[inline]
++    fn rand<R: Rng>(rng: &mut R) -> i64 {
++        rng.next_u64() as i64
++    }
++}
++
++#[cfg(feature = "i128_support")]
++impl Rand for i128 {
++    #[inline]
++    fn rand<R: Rng>(rng: &mut R) -> i128 {
++        rng.gen::<u128>() as i128
++    }
++}
++
++impl Rand for usize {
++    #[inline]
++    fn rand<R: Rng>(rng: &mut R) -> usize {
++        if mem::size_of::<usize>() == 4 {
++            rng.gen::<u32>() as usize
++        } else {
++            rng.gen::<u64>() as usize
++        }
++    }
++}
++
++impl Rand for u8 {
++    #[inline]
++    fn rand<R: Rng>(rng: &mut R) -> u8 {
++        rng.next_u32() as u8
++    }
++}
++
++impl Rand for u16 {
++    #[inline]
++    fn rand<R: Rng>(rng: &mut R) -> u16 {
++        rng.next_u32() as u16
++    }
++}
++
++impl Rand for u32 {
++    #[inline]
++    fn rand<R: Rng>(rng: &mut R) -> u32 {
++        rng.next_u32()
++    }
++}
++
++impl Rand for u64 {
++    #[inline]
++    fn rand<R: Rng>(rng: &mut R) -> u64 {
++        rng.next_u64()
++    }
++}
++
++#[cfg(feature = "i128_support")]
++impl Rand for u128 {
++    #[inline]
++    fn rand<R: Rng>(rng: &mut R) -> u128 {
++        ((rng.next_u64() as u128) << 64) | (rng.next_u64() as u128)
++    }
++}
++
++
++macro_rules! float_impls {
++    ($mod_name:ident, $ty:ty, $mantissa_bits:expr, $method_name:ident) => {
++        mod $mod_name {
++            use {Rand, Rng, Open01, Closed01};
++
++            const SCALE: $ty = (1u64 << $mantissa_bits) as $ty;
++
++            impl Rand for $ty {
++                /// Generate a floating point number in the half-open
++                /// interval `[0,1)`.
++                ///
++                /// See `Closed01` for the closed interval `[0,1]`,
++                /// and `Open01` for the open interval `(0,1)`.
++                #[inline]
++                fn rand<R: Rng>(rng: &mut R) -> $ty {
++                    rng.$method_name()
++                }
++            }
++            impl Rand for Open01<$ty> {
++                #[inline]
++                fn rand<R: Rng>(rng: &mut R) -> Open01<$ty> {
++                    // add a small amount (specifically 2 bits below
++                    // the precision of f64/f32 at 1.0), so that small
++                    // numbers are larger than 0, but large numbers
++                    // aren't pushed to/above 1.
++                    Open01(rng.$method_name() + 0.25 / SCALE)
++                }
++            }
++            impl Rand for Closed01<$ty> {
++                #[inline]
++                fn rand<R: Rng>(rng: &mut R) -> Closed01<$ty> {
++                    // rescale so that 1.0 - epsilon becomes 1.0
++                    // precisely.
++                    Closed01(rng.$method_name() * SCALE / (SCALE - 1.0))
++                }
++            }
++        }
++    }
++}
++float_impls! { f64_rand_impls, f64, 53, next_f64 }
++float_impls! { f32_rand_impls, f32, 24, next_f32 }
++
++impl Rand for char {
++    #[inline]
++    fn rand<R: Rng>(rng: &mut R) -> char {
++        // a char is 21 bits
++        const CHAR_MASK: u32 = 0x001f_ffff;
++        loop {
++            // Rejection sampling. About 0.2% of numbers with at most
++            // 21-bits are invalid codepoints (surrogates), so this
++            // will succeed first go almost every time.
++            match char::from_u32(rng.next_u32() & CHAR_MASK) {
++                Some(c) => return c,
++                None => {}
++            }
++        }
++    }
++}
++
++impl Rand for bool {
++    #[inline]
++    fn rand<R: Rng>(rng: &mut R) -> bool {
++        rng.gen::<u8>() & 1 == 1
++    }
++}
++
++macro_rules! tuple_impl {
++    // use variables to indicate the arity of the tuple
++    ($($tyvar:ident),* ) => {
++        // the trailing commas are for the 1 tuple
++        impl<
++            $( $tyvar : Rand ),*
++            > Rand for ( $( $tyvar ),* , ) {
++
++            #[inline]
++            fn rand<R: Rng>(_rng: &mut R) -> ( $( $tyvar ),* , ) {
++                (
++                    // use the $tyvar's to get the appropriate number of
++                    // repeats (they're not actually needed)
++                    $(
++                        _rng.gen::<$tyvar>()
++                    ),*
++                    ,
++                )
++            }
++        }
++    }
++}
++
++impl Rand for () {
++    #[inline]
++    fn rand<R: Rng>(_: &mut R) -> () { () }
++}
++tuple_impl!{A}
++tuple_impl!{A, B}
++tuple_impl!{A, B, C}
++tuple_impl!{A, B, C, D}
++tuple_impl!{A, B, C, D, E}
++tuple_impl!{A, B, C, D, E, F}
++tuple_impl!{A, B, C, D, E, F, G}
++tuple_impl!{A, B, C, D, E, F, G, H}
++tuple_impl!{A, B, C, D, E, F, G, H, I}
++tuple_impl!{A, B, C, D, E, F, G, H, I, J}
++tuple_impl!{A, B, C, D, E, F, G, H, I, J, K}
++tuple_impl!{A, B, C, D, E, F, G, H, I, J, K, L}
++
++macro_rules! array_impl {
++    {$n:expr, $t:ident, $($ts:ident,)*} => {
++        array_impl!{($n - 1), $($ts,)*}
++
++        impl<T> Rand for [T; $n] where T: Rand {
++            #[inline]
++            fn rand<R: Rng>(_rng: &mut R) -> [T; $n] {
++                [_rng.gen::<$t>(), $(_rng.gen::<$ts>()),*]
++            }
++        }
++    };
++    {$n:expr,} => {
++        impl<T> Rand for [T; $n] {
++            fn rand<R: Rng>(_rng: &mut R) -> [T; $n] { [] }
++        }
++    };
++}
++
++array_impl!{32, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T,}
++
++impl<T:Rand> Rand for Option<T> {
++    #[inline]
++    fn rand<R: Rng>(rng: &mut R) -> Option<T> {
++        if rng.gen() {
++            Some(rng.gen())
++        } else {
++            None
++        }
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use {Rng, thread_rng, Open01, Closed01};
++
++    struct ConstantRng(u64);
++    impl Rng for ConstantRng {
++        fn next_u32(&mut self) -> u32 {
++            let ConstantRng(v) = *self;
++            v as u32
++        }
++        fn next_u64(&mut self) -> u64 {
++            let ConstantRng(v) = *self;
++            v
++        }
++    }
++
++    #[test]
++    fn floating_point_edge_cases() {
++        // the test for exact equality is correct here.
++        assert!(ConstantRng(0xffff_ffff).gen::<f32>() != 1.0);
++        assert!(ConstantRng(0xffff_ffff_ffff_ffff).gen::<f64>() != 1.0);
++    }
++
++    #[test]
++    fn rand_open() {
++        // this is unlikely to catch an incorrect implementation that
++        // generates exactly 0 or 1, but it keeps it sane.
++        let mut rng = thread_rng();
++        for _ in 0..1_000 {
++            // strict inequalities
++            let Open01(f) = rng.gen::<Open01<f64>>();
++            assert!(0.0 < f && f < 1.0);
++
++            let Open01(f) = rng.gen::<Open01<f32>>();
++            assert!(0.0 < f && f < 1.0);
++        }
++    }
++
++    #[test]
++    fn rand_closed() {
++        let mut rng = thread_rng();
++        for _ in 0..1_000 {
++            // strict inequalities
++            let Closed01(f) = rng.gen::<Closed01<f64>>();
++            assert!(0.0 <= f && f <= 1.0);
++
++            let Closed01(f) = rng.gen::<Closed01<f32>>();
++            assert!(0.0 <= f && f <= 1.0);
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c7351b75937564b6bb603f4cea0ec234206aba8f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,123 @@@
++// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! A wrapper around any Read to treat it as an RNG.
++
++use std::io::{self, Read};
++use std::mem;
++use Rng;
++
++/// An RNG that reads random bytes straight from a `Read`. This will
++/// work best with an infinite reader, but this is not required.
++///
++/// # Panics
++///
++/// It will panic if it there is insufficient data to fulfill a request.
++///
++/// # Example
++///
++/// ```rust
++/// use rand::{read, Rng};
++///
++/// let data = vec![1, 2, 3, 4, 5, 6, 7, 8];
++/// let mut rng = read::ReadRng::new(&data[..]);
++/// println!("{:x}", rng.gen::<u32>());
++/// ```
++#[derive(Debug)]
++pub struct ReadRng<R> {
++    reader: R
++}
++
++impl<R: Read> ReadRng<R> {
++    /// Create a new `ReadRng` from a `Read`.
++    pub fn new(r: R) -> ReadRng<R> {
++        ReadRng {
++            reader: r
++        }
++    }
++}
++
++impl<R: Read> Rng for ReadRng<R> {
++    fn next_u32(&mut self) -> u32 {
++        // This is designed for speed: reading a LE integer on a LE
++        // platform just involves blitting the bytes into the memory
++        // of the u32, similarly for BE on BE; avoiding byteswapping.
++        let mut buf = [0; 4];
++        fill(&mut self.reader, &mut buf).unwrap();
++        unsafe { *(buf.as_ptr() as *const u32) }
++    }
++    fn next_u64(&mut self) -> u64 {
++        // see above for explanation.
++        let mut buf = [0; 8];
++        fill(&mut self.reader, &mut buf).unwrap();
++        unsafe { *(buf.as_ptr() as *const u64) }
++    }
++    fn fill_bytes(&mut self, v: &mut [u8]) {
++        if v.len() == 0 { return }
++        fill(&mut self.reader, v).unwrap();
++    }
++}
++
++fn fill(r: &mut Read, mut buf: &mut [u8]) -> io::Result<()> {
++    while buf.len() > 0 {
++        match try!(r.read(buf)) {
++            0 => return Err(io::Error::new(io::ErrorKind::Other,
++                                           "end of file reached")),
++            n => buf = &mut mem::replace(&mut buf, &mut [])[n..],
++        }
++    }
++    Ok(())
++}
++
++#[cfg(test)]
++mod test {
++    use super::ReadRng;
++    use Rng;
++
++    #[test]
++    fn test_reader_rng_u64() {
++        // transmute from the target to avoid endianness concerns.
++        let v = vec![0u8, 0, 0, 0, 0, 0, 0, 1,
++                     0  , 0, 0, 0, 0, 0, 0, 2,
++                     0,   0, 0, 0, 0, 0, 0, 3];
++        let mut rng = ReadRng::new(&v[..]);
++
++        assert_eq!(rng.next_u64(), 1_u64.to_be());
++        assert_eq!(rng.next_u64(), 2_u64.to_be());
++        assert_eq!(rng.next_u64(), 3_u64.to_be());
++    }
++    #[test]
++    fn test_reader_rng_u32() {
++        let v = vec![0u8, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3];
++        let mut rng = ReadRng::new(&v[..]);
++
++        assert_eq!(rng.next_u32(), 1_u32.to_be());
++        assert_eq!(rng.next_u32(), 2_u32.to_be());
++        assert_eq!(rng.next_u32(), 3_u32.to_be());
++    }
++    #[test]
++    fn test_reader_rng_fill_bytes() {
++        let v = [1u8, 2, 3, 4, 5, 6, 7, 8];
++        let mut w = [0u8; 8];
++
++        let mut rng = ReadRng::new(&v[..]);
++        rng.fill_bytes(&mut w);
++
++        assert!(v == w);
++    }
++
++    #[test]
++    #[should_panic]
++    fn test_reader_rng_insufficient_bytes() {
++        let mut rng = ReadRng::new(&[][..]);
++        let mut v = [0u8; 3];
++        rng.fill_bytes(&mut v);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2fba9f4ad60641acbf5bc654bfc0d0b9222ac0c9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,229 @@@
++// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
++// file at the top-level directory of this distribution and at
++// http://rust-lang.org/COPYRIGHT.
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! A wrapper around another RNG that reseeds it after it
++//! generates a certain number of random bytes.
++
++use std::default::Default;
++
++use {Rng, SeedableRng};
++
++/// How many bytes of entropy the underling RNG is allowed to generate
++/// before it is reseeded
++const DEFAULT_GENERATION_THRESHOLD: u64 = 32 * 1024;
++
++/// A wrapper around any RNG which reseeds the underlying RNG after it
++/// has generated a certain number of random bytes.
++#[derive(Debug)]
++pub struct ReseedingRng<R, Rsdr> {
++    rng: R,
++    generation_threshold: u64,
++    bytes_generated: u64,
++    /// Controls the behaviour when reseeding the RNG.
++    pub reseeder: Rsdr,
++}
++
++impl<R: Rng, Rsdr: Reseeder<R>> ReseedingRng<R, Rsdr> {
++    /// Create a new `ReseedingRng` with the given parameters.
++    ///
++    /// # Arguments
++    ///
++    /// * `rng`: the random number generator to use.
++    /// * `generation_threshold`: the number of bytes of entropy at which to reseed the RNG.
++    /// * `reseeder`: the reseeding object to use.
++    pub fn new(rng: R, generation_threshold: u64, reseeder: Rsdr) -> ReseedingRng<R,Rsdr> {
++        ReseedingRng {
++            rng: rng,
++            generation_threshold: generation_threshold,
++            bytes_generated: 0,
++            reseeder: reseeder
++        }
++    }
++
++    /// Reseed the internal RNG if the number of bytes that have been
++    /// generated exceed the threshold.
++    pub fn reseed_if_necessary(&mut self) {
++        if self.bytes_generated >= self.generation_threshold {
++            self.reseeder.reseed(&mut self.rng);
++            self.bytes_generated = 0;
++        }
++    }
++}
++
++
++impl<R: Rng, Rsdr: Reseeder<R>> Rng for ReseedingRng<R, Rsdr> {
++    fn next_u32(&mut self) -> u32 {
++        self.reseed_if_necessary();
++        self.bytes_generated += 4;
++        self.rng.next_u32()
++    }
++
++    fn next_u64(&mut self) -> u64 {
++        self.reseed_if_necessary();
++        self.bytes_generated += 8;
++        self.rng.next_u64()
++    }
++
++    fn fill_bytes(&mut self, dest: &mut [u8]) {
++        self.reseed_if_necessary();
++        self.bytes_generated += dest.len() as u64;
++        self.rng.fill_bytes(dest)
++    }
++}
++
++impl<S, R: SeedableRng<S>, Rsdr: Reseeder<R> + Default>
++     SeedableRng<(Rsdr, S)> for ReseedingRng<R, Rsdr> {
++    fn reseed(&mut self, (rsdr, seed): (Rsdr, S)) {
++        self.rng.reseed(seed);
++        self.reseeder = rsdr;
++        self.bytes_generated = 0;
++    }
++
++    /// Create a new `ReseedingRng` from the given reseeder and
++    /// seed. This uses a default value for `generation_threshold`.
++    fn from_seed((rsdr, seed): (Rsdr, S)) -> ReseedingRng<R, Rsdr> {
++        ReseedingRng {
++            rng: SeedableRng::from_seed(seed),
++            generation_threshold: DEFAULT_GENERATION_THRESHOLD,
++            bytes_generated: 0,
++            reseeder: rsdr
++        }
++    }
++}
++
++/// Something that can be used to reseed an RNG via `ReseedingRng`.
++///
++/// # Example
++///
++/// ```rust
++/// use rand::{Rng, SeedableRng, StdRng};
++/// use rand::reseeding::{Reseeder, ReseedingRng};
++///
++/// struct TickTockReseeder { tick: bool }
++/// impl Reseeder<StdRng> for TickTockReseeder {
++///     fn reseed(&mut self, rng: &mut StdRng) {
++///         let val = if self.tick {0} else {1};
++///         rng.reseed(&[val]);
++///         self.tick = !self.tick;
++///     }
++/// }
++/// fn main() {
++///     let rsdr = TickTockReseeder { tick: true };
++///
++///     let inner = StdRng::new().unwrap();
++///     let mut rng = ReseedingRng::new(inner, 10, rsdr);
++///
++///     // this will repeat, because it gets reseeded very regularly.
++///     let s: String = rng.gen_ascii_chars().take(100).collect();
++///     println!("{}", s);
++/// }
++///
++/// ```
++pub trait Reseeder<R> {
++    /// Reseed the given RNG.
++    fn reseed(&mut self, rng: &mut R);
++}
++
++/// Reseed an RNG using a `Default` instance. This reseeds by
++/// replacing the RNG with the result of a `Default::default` call.
++#[derive(Clone, Copy, Debug)]
++pub struct ReseedWithDefault;
++
++impl<R: Rng + Default> Reseeder<R> for ReseedWithDefault {
++    fn reseed(&mut self, rng: &mut R) {
++        *rng = Default::default();
++    }
++}
++impl Default for ReseedWithDefault {
++    fn default() -> ReseedWithDefault { ReseedWithDefault }
++}
++
++#[cfg(test)]
++mod test {
++    use std::default::Default;
++    use std::iter::repeat;
++    use super::{ReseedingRng, ReseedWithDefault};
++    use {SeedableRng, Rng};
++
++    struct Counter {
++        i: u32
++    }
++
++    impl Rng for Counter {
++        fn next_u32(&mut self) -> u32 {
++            self.i += 1;
++            // very random
++            self.i - 1
++        }
++    }
++    impl Default for Counter {
++        fn default() -> Counter {
++            Counter { i: 0 }
++        }
++    }
++    impl SeedableRng<u32> for Counter {
++        fn reseed(&mut self, seed: u32) {
++            self.i = seed;
++        }
++        fn from_seed(seed: u32) -> Counter {
++            Counter { i: seed }
++        }
++    }
++    type MyRng = ReseedingRng<Counter, ReseedWithDefault>;
++
++    #[test]
++    fn test_reseeding() {
++        let mut rs = ReseedingRng::new(Counter {i:0}, 400, ReseedWithDefault);
++
++        let mut i = 0;
++        for _ in 0..1000 {
++            assert_eq!(rs.next_u32(), i % 100);
++            i += 1;
++        }
++    }
++
++    #[test]
++    fn test_rng_seeded() {
++        let mut ra: MyRng = SeedableRng::from_seed((ReseedWithDefault, 2));
++        let mut rb: MyRng = SeedableRng::from_seed((ReseedWithDefault, 2));
++        assert!(::test::iter_eq(ra.gen_ascii_chars().take(100),
++                                rb.gen_ascii_chars().take(100)));
++    }
++
++    #[test]
++    fn test_rng_reseed() {
++        let mut r: MyRng = SeedableRng::from_seed((ReseedWithDefault, 3));
++        let string1: String = r.gen_ascii_chars().take(100).collect();
++
++        r.reseed((ReseedWithDefault, 3));
++
++        let string2: String = r.gen_ascii_chars().take(100).collect();
++        assert_eq!(string1, string2);
++    }
++
++    const FILL_BYTES_V_LEN: usize = 13579;
++    #[test]
++    fn test_rng_fill_bytes() {
++        let mut v = repeat(0u8).take(FILL_BYTES_V_LEN).collect::<Vec<_>>();
++        ::test::rng().fill_bytes(&mut v);
++
++        // Sanity test: if we've gotten here, `fill_bytes` has not infinitely
++        // recursed.
++        assert_eq!(v.len(), FILL_BYTES_V_LEN);
++
++        // To test that `fill_bytes` actually did something, check that the
++        // average of `v` is not 0.
++        let mut sum = 0.0;
++        for &x in v.iter() {
++            sum += x as f64;
++        }
++        assert!(sum / v.len() as f64 != 0.0);
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9d49027df74c8d3760e2786d5ae296a012dedef6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..87750c67353136dffb4cef1193aaf3ebd2d4027a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++language: rust
++rust:
++  - 1.10.0
++  - stable
++  - beta
++  - nightly
++script:
++  - cargo build --verbose
++  - cargo test --verbose
++  - cargo doc
++  - if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
++      cargo bench --verbose;
++    fi
++branches:
++  only:
++    - master
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a42659dccdb15aa0f503d08fe358bcd5c95cbecc
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,27 @@@
++Copyright 2011, The Snappy-Rust Authors. All rights reserved.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++    * Redistributions of source code must retain the above copyright
++notice, this list of conditions and the following disclaimer.
++    * Redistributions in binary form must reproduce the above
++copyright notice, this list of conditions and the following disclaimer
++in the documentation and/or other materials provided with the
++distribution.
++    * Neither the name of the copyright holder nor the names of its
++contributors may be used to endorse or promote products derived from
++this software without specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
++OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
++LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
++OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1c48fe8b76555b42bc769d49ee2f557b50e14688
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,20 @@@
++[package]
++name = "same-file"
++version = "0.1.3"  #:version
++authors = ["Andrew Gallant <jamslam@gmail.com>"]
++description = """
++A simple crate for determining whether two file paths point to the same file.
++"""
++documentation = "https://docs.rs/same-file"
++homepage = "https://github.com/BurntSushi/same-file"
++repository = "https://github.com/BurntSushi/same-file"
++readme = "README.md"
++keywords = ["same", "file", "equal", "inode"]
++license = "Unlicense/MIT"
++
++[target.'cfg(windows)'.dependencies]
++kernel32-sys = "0.2"
++winapi = "0.2"
++
++[dev-dependencies]
++rand = "0.3"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..30f882b625a82859fdb708bf309be3225633118b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,45 @@@
++same-file
++=========
++A safe and simple **cross platform** crate to determine whether two files or
++directories are the same.
++
++[![Linux build status](https://api.travis-ci.org/BurntSushi/same-file.png)](https://travis-ci.org/BurntSushi/same-file)
++[![Windows build status](https://ci.appveyor.com/api/projects/status/github/BurntSushi/same-file?svg=true)](https://ci.appveyor.com/project/BurntSushi/same-file)
++[![](http://meritbadge.herokuapp.com/same-file)](https://crates.io/crates/same-file)
++
++Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
++
++### Documentation
++
++https://docs.rs/same-file
++
++### Usage
++
++Add this to your `Cargo.toml`:
++
++```toml
++[dependencies]
++same-file = "0.1"
++```
++
++and this to your crate root:
++
++```rust
++extern crate same_file;
++```
++
++### Example
++
++The simplest use of this crate is to use the `is_same_file` function, which
++takes two file paths and returns true if and only if they refer to the same
++file:
++
++```rust
++extern crate same_file;
++
++use same_file::is_same_file;
++
++fn main() {
++    assert!(is_same_file("/bin/sh", "/usr/bin/sh").unwrap());
++}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..30a3164ced7211e3433dc450f64d71e56acede09
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,22 @@@
++environment:
++  matrix:
++  - TARGET: x86_64-pc-windows-msvc
++  - TARGET: i686-pc-windows-msvc
++  - TARGET: i686-pc-windows-gnu
++install:
++  - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
++  - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
++  - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
++  - SET PATH=%PATH%;C:\MinGW\bin
++  - rustc -V
++  - cargo -V
++
++build: false
++
++test_script:
++  - cargo build --verbose
++  - cargo test --verbose
++
++branches:
++  only:
++    - master
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3d10ba6a7df90e635dcc2882223389766b497ad5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7 @@@
++extern crate same_file;
++
++use same_file::is_same_file;
++
++fn main() {
++    assert!(is_same_file("/bin/sh", "/usr/bin/sh").unwrap());
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8b6e2e159aad85c52b6834cc1d1ad3533549e319
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,33 @@@
++extern crate same_file;
++
++use std::io;
++use std::process;
++
++use same_file::Handle;
++
++fn main() {
++    if let Err(err) = run() {
++        println!("{}", err);
++        process::exit(1);
++    }
++}
++
++fn run() -> io::Result<()> {
++    // Run with `cargo run is_stderr 2> examples/stderr` to see
++    // interesting output.
++    let candidates = &[
++        "examples/is_same_file.rs",
++        "examples/is_stderr.rs",
++        "examples/stderr",
++    ];
++    let stderr_handle = try!(Handle::stderr());
++    for candidate in candidates {
++        let handle = try!(Handle::from_path(candidate));
++        if stderr_handle == handle {
++            println!("{:?} is stderr!", candidate);
++        } else {
++            println!("{:?} is NOT stderr!", candidate);
++        }
++    }
++    Ok(())
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..67e9f5302301c8e2df82666ecbd76c5b133bc13c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,304 @@@
++/*!
++This crate provides a safe and simple **cross platform** way to determine
++whether two file paths refer to the same file or directory.
++
++Most uses of this crate should be limited to the top-level `is_same_file`
++function, which takes two file paths and returns true if they refer to the
++same file or directory:
++
++```rust,no_run
++# fn example() -> ::std::io::Result<()> {
++use same_file::is_same_file;
++
++assert!(try!(is_same_file("/bin/sh", "/usr/bin/sh")));
++# Ok(()) } example().unwrap();
++```
++
++Additionally, this crate provides a `Handle` type that permits a more efficient
++equality check depending on your access pattern. For example, if one wanted to
++checked whether any path in a list of paths corresponded to the process' stdout
++handle, then one could build a handle once for stdout. The equality check for
++each file in the list then only requires one stat call instead of two. The code
++might look like this:
++
++```rust,no_run
++# fn example() -> ::std::io::Result<()> {
++use same_file::Handle;
++
++let candidates = &[
++    "examples/is_same_file.rs",
++    "examples/is_stderr.rs",
++    "examples/stderr",
++];
++let stdout_handle = try!(Handle::stdout());
++for candidate in candidates {
++    let handle = try!(Handle::from_path(candidate));
++    if stdout_handle == handle {
++        println!("{:?} is stdout!", candidate);
++    } else {
++        println!("{:?} is NOT stdout!", candidate);
++    }
++}
++# Ok(()) } example().unwrap();
++```
++
++See `examples/is_stderr.rs` for a runnable example. Compare the output of
++`cargo run is_stderr 2> examples/stderr` and `cargo run is_stderr`.
++*/
++
++#![deny(missing_docs)]
++
++#[cfg(windows)]
++extern crate kernel32;
++#[cfg(windows)]
++extern crate winapi;
++
++use std::fs::File;
++use std::io;
++use std::path::Path;
++
++#[cfg(any(target_os = "redox", unix))]
++use unix as imp;
++#[cfg(windows)]
++use win as imp;
++
++#[cfg(any(target_os = "redox", unix))]
++mod unix;
++#[cfg(windows)]
++mod win;
++
++/// A handle to a file that can be tested for equality with other handles.
++///
++/// If two files are the same, then any two handles of those files will compare
++/// equal. If two files are not the same, then any two handles of those files
++/// will compare not-equal.
++///
++/// A handle consumes an open file resource as long as it exists.
++///
++/// Note that it's possible for comparing two handles to produce a false
++/// positive on some platforms. Namely, two handles can compare equal even if
++/// the two handles *don't* point to the same file.
++#[derive(Debug, Eq, PartialEq)]
++pub struct Handle(imp::Handle);
++
++impl Handle {
++    /// Construct a handle from a path.
++    ///
++    /// Note that the underlying `File` is opened in read-only mode on all
++    /// platforms.
++    pub fn from_path<P: AsRef<Path>>(p: P) -> io::Result<Handle> {
++        imp::Handle::from_path(p).map(Handle)
++    }
++
++    /// Construct a handle from a file.
++    pub fn from_file(file: File) -> io::Result<Handle> {
++        imp::Handle::from_file(file).map(Handle)
++    }
++
++    /// Construct a handle from stdin.
++    pub fn stdin() -> io::Result<Handle> {
++        imp::Handle::stdin().map(Handle)
++    }
++
++    /// Construct a handle from stdout.
++    pub fn stdout() -> io::Result<Handle> {
++        imp::Handle::stdout().map(Handle)
++    }
++
++    /// Construct a handle from stderr.
++    pub fn stderr() -> io::Result<Handle> {
++        imp::Handle::stderr().map(Handle)
++    }
++
++    /// Return a reference to the underlying file.
++    pub fn as_file(&self) -> &File {
++        self.0.as_file()
++    }
++
++    /// Return a mutable reference to the underlying file.
++    pub fn as_file_mut(&mut self) -> &mut File {
++        self.0.as_file_mut()
++    }
++
++    /// Return the underlying device number of this handle.
++    #[cfg(any(target_os = "redox", unix))]
++    pub fn dev(&self) -> u64 {
++        self.0.dev()
++    }
++
++    /// Return the underlying inode number of this handle.
++    #[cfg(any(target_os = "redox", unix))]
++    pub fn ino(&self) -> u64 {
++        self.0.ino()
++    }
++}
++
++/// Returns true if the two file paths may correspond to the same file.
++///
++/// If there was a problem accessing either file path, then an error is
++/// returned.
++///
++/// Note that it's possible for this to produce a false positive on some
++/// platforms. Namely, this can return true even if the two file paths *don't*
++/// resolve to the same file.
++///
++/// # Example
++///
++/// ```rust,no_run
++/// use same_file::is_same_file;
++///
++/// assert!(is_same_file("./foo", "././foo").unwrap_or(false));
++/// ```
++pub fn is_same_file<P, Q>(
++    path1: P,
++    path2: Q,
++) -> io::Result<bool> where P: AsRef<Path>, Q: AsRef<Path> {
++    Ok(try!(Handle::from_path(path1)) == try!(Handle::from_path(path2)))
++}
++
++#[cfg(test)]
++mod tests {
++    extern crate rand;
++
++    use std::env;
++    use std::fs::{self, File};
++    use std::io;
++    use std::path::{Path, PathBuf};
++
++    use self::rand::Rng;
++
++    use super::is_same_file;
++
++    struct TempDir(PathBuf);
++
++    impl TempDir {
++        fn path<'a>(&'a self) -> &'a Path {
++            &self.0
++        }
++    }
++
++    impl Drop for TempDir {
++        fn drop(&mut self) {
++            fs::remove_dir_all(&self.0).unwrap();
++        }
++    }
++
++    fn tmpdir() -> TempDir {
++        let p = env::temp_dir();
++        let mut r = self::rand::thread_rng();
++        let ret = p.join(&format!("rust-{}", r.next_u32()));
++        fs::create_dir(&ret).unwrap();
++        TempDir(ret)
++    }
++
++    #[cfg(unix)]
++    pub fn soft_link_dir<P: AsRef<Path>, Q: AsRef<Path>>(
++        src: P,
++        dst: Q,
++    ) -> io::Result<()> {
++        use std::os::unix::fs::symlink;
++        symlink(src, dst)
++    }
++
++    #[cfg(unix)]
++    pub fn soft_link_file<P: AsRef<Path>, Q: AsRef<Path>>(
++        src: P,
++        dst: Q,
++    ) -> io::Result<()> {
++        soft_link_dir(src, dst)
++    }
++
++    #[cfg(windows)]
++    pub fn soft_link_dir<P: AsRef<Path>, Q: AsRef<Path>>(
++        src: P,
++        dst: Q,
++    ) -> io::Result<()> {
++        use std::os::windows::fs::symlink_dir;
++        symlink_dir(src, dst)
++    }
++
++    #[cfg(windows)]
++    pub fn soft_link_file<P: AsRef<Path>, Q: AsRef<Path>>(
++        src: P,
++        dst: Q,
++    ) -> io::Result<()> {
++        use std::os::windows::fs::symlink_file;
++        symlink_file(src, dst)
++    }
++
++    // These tests are rather uninteresting. The really interesting tests
++    // would stress the edge cases. On Unix, this might be comparing two files
++    // on different mount points with the same inode number. On Windows, this
++    // might be comparing two files whose file indices are the same on file
++    // systems where such things aren't guaranteed to be unique.
++    //
++    // Alas, I don't know how to create those environmental conditions. ---AG
++
++    #[test]
++    fn same_file_trivial() {
++        let tdir = tmpdir();
++        let dir = tdir.path();
++
++        File::create(dir.join("a")).unwrap();
++        assert!(is_same_file(dir.join("a"), dir.join("a")).unwrap());
++    }
++
++    #[test]
++    fn same_dir_trivial() {
++        let tdir = tmpdir();
++        let dir = tdir.path();
++
++        fs::create_dir(dir.join("a")).unwrap();
++        assert!(is_same_file(dir.join("a"), dir.join("a")).unwrap());
++    }
++
++    #[test]
++    fn not_same_file_trivial() {
++        let tdir = tmpdir();
++        let dir = tdir.path();
++
++        File::create(dir.join("a")).unwrap();
++        File::create(dir.join("b")).unwrap();
++        assert!(!is_same_file(dir.join("a"), dir.join("b")).unwrap());
++    }
++
++    #[test]
++    fn not_same_dir_trivial() {
++        let tdir = tmpdir();
++        let dir = tdir.path();
++
++        fs::create_dir(dir.join("a")).unwrap();
++        fs::create_dir(dir.join("b")).unwrap();
++        assert!(!is_same_file(dir.join("a"), dir.join("b")).unwrap());
++    }
++
++    #[test]
++    fn same_file_hard() {
++        let tdir = tmpdir();
++        let dir = tdir.path();
++
++        File::create(dir.join("a")).unwrap();
++        fs::hard_link(dir.join("a"), dir.join("alink")).unwrap();
++        assert!(is_same_file(dir.join("a"), dir.join("alink")).unwrap());
++    }
++
++    #[test]
++    fn same_file_soft() {
++        let tdir = tmpdir();
++        let dir = tdir.path();
++
++        File::create(dir.join("a")).unwrap();
++        soft_link_file(dir.join("a"), dir.join("alink")).unwrap();
++        assert!(is_same_file(dir.join("a"), dir.join("alink")).unwrap());
++    }
++
++    #[test]
++    fn same_dir_soft() {
++        let tdir = tmpdir();
++        let dir = tdir.path();
++
++        fs::create_dir(dir.join("a")).unwrap();
++        soft_link_dir(dir.join("a"), dir.join("alink")).unwrap();
++        assert!(is_same_file(dir.join("a"), dir.join("alink")).unwrap());
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e479a5fcd2f8732115d2bcc4f63059ab1c3331ac
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,94 @@@
++use std::fs::{File, OpenOptions};
++use std::io;
++use std::os::unix::fs::MetadataExt;
++use std::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
++use std::path::Path;
++
++#[derive(Debug)]
++pub struct Handle {
++    file: Option<File>,
++    // If is_std is true, then we don't drop the corresponding File since it
++    // will close the handle.
++    is_std: bool,
++    dev: u64,
++    ino: u64,
++}
++
++impl Drop for Handle {
++    fn drop(&mut self) {
++        if self.is_std {
++            self.file.take().unwrap().into_raw_fd();
++        }
++    }
++}
++
++impl Eq for Handle {}
++
++impl PartialEq for Handle {
++    fn eq(&self, other: &Handle) -> bool {
++        (self.dev, self.ino) == (other.dev, other.ino)
++    }
++}
++
++impl AsRawFd for ::Handle {
++    fn as_raw_fd(&self) -> RawFd {
++        self.0.file.as_ref().take().unwrap().as_raw_fd()
++    }
++}
++
++impl IntoRawFd for ::Handle {
++    fn into_raw_fd(mut self) -> RawFd {
++        self.0.file.take().unwrap().into_raw_fd()
++    }
++}
++
++impl Handle {
++    pub fn from_path<P: AsRef<Path>>(p: P) -> io::Result<Handle> {
++        Handle::from_file(try!(OpenOptions::new().read(true).open(p)))
++    }
++
++    pub fn from_file(file: File) -> io::Result<Handle> {
++        let md = try!(file.metadata());
++        Ok(Handle {
++            file: Some(file),
++            is_std: false,
++            dev: md.dev(),
++            ino: md.ino(),
++        })
++    }
++
++    pub fn from_std(file: File) -> io::Result<Handle> {
++        Handle::from_file(file).map(|mut h| {
++            h.is_std = true;
++            h
++        })
++    }
++
++    pub fn stdin() -> io::Result<Handle> {
++        Handle::from_std(unsafe { File::from_raw_fd(0) })
++    }
++
++    pub fn stdout() -> io::Result<Handle> {
++        Handle::from_std(unsafe { File::from_raw_fd(1) })
++    }
++
++    pub fn stderr() -> io::Result<Handle> {
++        Handle::from_std(unsafe { File::from_raw_fd(2) })
++    }
++
++    pub fn as_file(&self) -> &File {
++        self.file.as_ref().take().unwrap()
++    }
++
++    pub fn as_file_mut(&mut self) -> &mut File {
++        self.file.as_mut().take().unwrap()
++    }
++
++    pub fn dev(&self) -> u64 {
++        self.dev
++    }
++
++    pub fn ino(&self) -> u64 {
++        self.ino
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0abc480204242425045cf8010395f88a0514e828
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,185 @@@
++use std::fs::{File, OpenOptions};
++use std::io;
++use std::mem;
++use std::os::windows::fs::OpenOptionsExt;
++use std::os::windows::io::{
++    AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle,
++};
++use std::path::Path;
++
++use kernel32::{GetFileInformationByHandle, GetStdHandle};
++use winapi::fileapi::BY_HANDLE_FILE_INFORMATION;
++use winapi::minwindef::DWORD;
++use winapi::winbase::{
++    FILE_FLAG_BACKUP_SEMANTICS,
++    STD_INPUT_HANDLE, STD_OUTPUT_HANDLE, STD_ERROR_HANDLE,
++};
++
++// For correctness, it is critical that both file handles remain open while
++// their attributes are checked for equality. In particular, the file index
++// numbers on a Windows stat object are not guaranteed to remain stable over
++// time.
++//
++// See the docs and remarks on MSDN:
++// https://msdn.microsoft.com/en-us/library/windows/desktop/aa363788(v=vs.85).aspx
++//
++// It gets worse. It appears that the index numbers are not always
++// guaranteed to be unqiue. Namely, ReFS uses 128 bit numbers for unique
++// identifiers. This requires a distinct syscall to get `FILE_ID_INFO`
++// documented here:
++// https://msdn.microsoft.com/en-us/library/windows/desktop/hh802691(v=vs.85).aspx
++//
++// It seems straight-forward enough to modify this code to use
++// `FILE_ID_INFO` when available (minimum Windows Server 2012), but I don't
++// have access to such Windows machines.
++//
++// Two notes.
++//
++// 1. Java's NIO uses the approach implemented here and appears to ignore
++//    `FILE_ID_INFO` altogether. So Java's NIO and this code are
++//    susceptible to bugs when running on a file system where
++//    `nFileIndex{Low,High}` are not unique.
++//
++// 2. LLVM has a bug where they fetch the id of a file and continue to use
++//    it even after the handle has been closed, so that uniqueness is no
++//    longer guaranteed (when `nFileIndex{Low,High}` are unique).
++//    bug report: http://lists.llvm.org/pipermail/llvm-bugs/2014-December/037218.html
++//
++// All said and done, checking whether two files are the same on Windows
++// seems quite tricky. Moreover, even if the code is technically incorrect,
++// it seems like the chances of actually observing incorrect behavior are
++// extremely small. Nevertheless, we mitigate this by checking size too.
++//
++// In the case where this code is erroneous, two files will be reported
++// as equivalent when they are in fact distinct. This will cause the loop
++// detection code to report a false positive, which will prevent descending
++// into the offending directory. As far as failure modes goes, this isn't
++// that bad.
++
++#[derive(Debug)]
++pub struct Handle {
++    file: Option<File>,
++    // If is_std is true, then we don't drop the corresponding File since it
++    // will close the handle.
++    is_std: bool,
++    key: Option<Key>,
++}
++
++#[derive(Debug, Eq, PartialEq)]
++struct Key {
++    volume: DWORD,
++    idx_high: DWORD,
++    idx_low: DWORD,
++}
++
++impl Drop for Handle {
++    fn drop(&mut self) {
++        if self.is_std {
++            self.file.take().unwrap().into_raw_handle();
++        }
++    }
++}
++
++impl Eq for Handle {}
++
++impl PartialEq for Handle {
++    fn eq(&self, other: &Handle) -> bool {
++        if self.key.is_none() || other.key.is_none() {
++            return false;
++        }
++        self.key == other.key
++    }
++}
++
++impl AsRawHandle for ::Handle {
++    fn as_raw_handle(&self) -> RawHandle {
++        self.0.file.as_ref().take().unwrap().as_raw_handle()
++    }
++}
++
++impl IntoRawHandle for ::Handle {
++    fn into_raw_handle(mut self) -> RawHandle {
++        self.0.file.take().unwrap().into_raw_handle()
++    }
++}
++
++impl Handle {
++    pub fn from_path<P: AsRef<Path>>(p: P) -> io::Result<Handle> {
++        let file = try!(OpenOptions::new()
++            .read(true)
++            // Necessary in order to support opening directory paths.
++            .custom_flags(FILE_FLAG_BACKUP_SEMANTICS)
++            .open(p));
++        Handle::from_file(file)
++    }
++
++    pub fn from_file(file: File) -> io::Result<Handle> {
++        file_info(&file).map(|info| Handle::from_file_info(file, false, info))
++    }
++
++    fn from_std_handle(file: File) -> io::Result<Handle> {
++        match file_info(&file) {
++            Ok(info) => Ok(Handle::from_file_info(file, true, info)),
++            // In a Windows console, if there is no pipe attached to a STD
++            // handle, then GetFileInformationByHandle will return an error.
++            // We don't really care. The only thing we care about is that
++            // this handle is never equivalent to any other handle, which is
++            // accomplished by setting key to None.
++            Err(_) => Ok(Handle { file: Some(file), is_std: true, key: None }),
++        }
++    }
++
++    fn from_file_info(
++        file: File,
++        is_std: bool,
++        info: BY_HANDLE_FILE_INFORMATION,
++    ) -> Handle {
++        Handle {
++            file: Some(file),
++            is_std: is_std,
++            key: Some(Key {
++                volume: info.dwVolumeSerialNumber,
++                idx_high: info.nFileIndexHigh,
++                idx_low: info.nFileIndexLow,
++            }),
++        }
++    }
++
++    pub fn stdin() -> io::Result<Handle> {
++        Handle::from_std_handle(unsafe {
++            File::from_raw_handle(GetStdHandle(STD_INPUT_HANDLE))
++        })
++    }
++
++    pub fn stdout() -> io::Result<Handle> {
++        Handle::from_std_handle(unsafe {
++            File::from_raw_handle(GetStdHandle(STD_OUTPUT_HANDLE))
++        })
++    }
++
++    pub fn stderr() -> io::Result<Handle> {
++        Handle::from_std_handle(unsafe {
++            File::from_raw_handle(GetStdHandle(STD_ERROR_HANDLE))
++        })
++    }
++
++    pub fn as_file(&self) -> &File {
++        self.file.as_ref().take().unwrap()
++    }
++
++    pub fn as_file_mut(&mut self) -> &mut File {
++        self.file.as_mut().take().unwrap()
++    }
++}
++
++fn file_info(file: &File) -> io::Result<BY_HANDLE_FILE_INFORMATION> {
++    let (r, info) = unsafe {
++        let mut info: BY_HANDLE_FILE_INFORMATION = mem::zeroed();
++        (GetFileInformationByHandle(file.as_raw_handle(), &mut info), info)
++    };
++    if r == 0 {
++        Err(io::Error::last_os_error())
++    } else {
++        Ok(info)
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..26bb4524b50afd348f5bb4ce22a2a03df491d2be
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"59a076157c1e2dc561d8de585151ee6965d910dd4dcb5dabb7ae3e83981a6c57"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8d107ff68424f0c62e1ff4d1b930dfad77e2f4da
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++language: rust
++sudo: false
++
++# run builds for all the trains (and more)
++rust:
++  - stable
++  - beta
++  - nightly
++
++# load travis-cargo
++before_script:
++  - |
++      pip install 'travis-cargo<0.2' --user &&
++      export PATH=$HOME/.local/bin:$PATH
++
++# the main build
++script:
++  - |
++      travis-cargo build &&
++      travis-cargo test &&
++      travis-cargo bench &&
++      travis-cargo doc
++after_success:
++  # upload the documentation (GH_TOKEN from env)
++  - travis-cargo --only nightly doc-upload
++
++env:
++  global:
++    # override the default `--features unstable` used for the nightly branch (optional)
++    - TRAVIS_CARGO_NIGHTLY_FEATURE=""
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..dd400b8079b3c9b2ecdf1cc669c43c247e40c0a1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++[package]
++name = "scopeguard"
++version = "0.1.2"
++
++license = "MIT/Apache-2.0"
++repository = "https://github.com/bluss/scopeguard"
++documentation = "http://bluss.github.io/scopeguard/"
++authors = ["bluss"]
++
++description = "A RAII scope guard."
++
++keywords = ["scope-guard", "defer"]
++
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16fe87b06e802f094b3fbb0894b137bca2b16ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++                              Apache License
++                        Version 2.0, January 2004
++                     http://www.apache.org/licenses/
++
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++1. Definitions.
++
++   "License" shall mean the terms and conditions for use, reproduction,
++   and distribution as defined by Sections 1 through 9 of this document.
++
++   "Licensor" shall mean the copyright owner or entity authorized by
++   the copyright owner that is granting the License.
++
++   "Legal Entity" shall mean the union of the acting entity and all
++   other entities that control, are controlled by, or are under common
++   control with that entity. For the purposes of this definition,
++   "control" means (i) the power, direct or indirect, to cause the
++   direction or management of such entity, whether by contract or
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the
++   outstanding shares, or (iii) beneficial ownership of such entity.
++
++   "You" (or "Your") shall mean an individual or Legal Entity
++   exercising permissions granted by this License.
++
++   "Source" form shall mean the preferred form for making modifications,
++   including but not limited to software source code, documentation
++   source, and configuration files.
++
++   "Object" form shall mean any form resulting from mechanical
++   transformation or translation of a Source form, including but
++   not limited to compiled object code, generated documentation,
++   and conversions to other media types.
++
++   "Work" shall mean the work of authorship, whether in Source or
++   Object form, made available under the License, as indicated by a
++   copyright notice that is included in or attached to the work
++   (an example is provided in the Appendix below).
++
++   "Derivative Works" shall mean any work, whether in Source or Object
++   form, that is based on (or derived from) the Work and for which the
++   editorial revisions, annotations, elaborations, or other modifications
++   represent, as a whole, an original work of authorship. For the purposes
++   of this License, Derivative Works shall not include works that remain
++   separable from, or merely link (or bind by name) to the interfaces of,
++   the Work and Derivative Works thereof.
++
++   "Contribution" shall mean any work of authorship, including
++   the original version of the Work and any modifications or additions
++   to that Work or Derivative Works thereof, that is intentionally
++   submitted to Licensor for inclusion in the Work by the copyright owner
++   or by an individual or Legal Entity authorized to submit on behalf of
++   the copyright owner. For the purposes of this definition, "submitted"
++   means any form of electronic, verbal, or written communication sent
++   to the Licensor or its representatives, including but not limited to
++   communication on electronic mailing lists, source code control systems,
++   and issue tracking systems that are managed by, or on behalf of, the
++   Licensor for the purpose of discussing and improving the Work, but
++   excluding communication that is conspicuously marked or otherwise
++   designated in writing by the copyright owner as "Not a Contribution."
++
++   "Contributor" shall mean Licensor and any individual or Legal Entity
++   on behalf of whom a Contribution has been received by Licensor and
++   subsequently incorporated within the Work.
++
++2. Grant of Copyright License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   copyright license to reproduce, prepare Derivative Works of,
++   publicly display, publicly perform, sublicense, and distribute the
++   Work and such Derivative Works in Source or Object form.
++
++3. Grant of Patent License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   (except as stated in this section) patent license to make, have made,
++   use, offer to sell, sell, import, and otherwise transfer the Work,
++   where such license applies only to those patent claims licensable
++   by such Contributor that are necessarily infringed by their
++   Contribution(s) alone or by combination of their Contribution(s)
++   with the Work to which such Contribution(s) was submitted. If You
++   institute patent litigation against any entity (including a
++   cross-claim or counterclaim in a lawsuit) alleging that the Work
++   or a Contribution incorporated within the Work constitutes direct
++   or contributory patent infringement, then any patent licenses
++   granted to You under this License for that Work shall terminate
++   as of the date such litigation is filed.
++
++4. Redistribution. You may reproduce and distribute copies of the
++   Work or Derivative Works thereof in any medium, with or without
++   modifications, and in Source or Object form, provided that You
++   meet the following conditions:
++
++   (a) You must give any other recipients of the Work or
++       Derivative Works a copy of this License; and
++
++   (b) You must cause any modified files to carry prominent notices
++       stating that You changed the files; and
++
++   (c) You must retain, in the Source form of any Derivative Works
++       that You distribute, all copyright, patent, trademark, and
++       attribution notices from the Source form of the Work,
++       excluding those notices that do not pertain to any part of
++       the Derivative Works; and
++
++   (d) If the Work includes a "NOTICE" text file as part of its
++       distribution, then any Derivative Works that You distribute must
++       include a readable copy of the attribution notices contained
++       within such NOTICE file, excluding those notices that do not
++       pertain to any part of the Derivative Works, in at least one
++       of the following places: within a NOTICE text file distributed
++       as part of the Derivative Works; within the Source form or
++       documentation, if provided along with the Derivative Works; or,
++       within a display generated by the Derivative Works, if and
++       wherever such third-party notices normally appear. The contents
++       of the NOTICE file are for informational purposes only and
++       do not modify the License. You may add Your own attribution
++       notices within Derivative Works that You distribute, alongside
++       or as an addendum to the NOTICE text from the Work, provided
++       that such additional attribution notices cannot be construed
++       as modifying the License.
++
++   You may add Your own copyright statement to Your modifications and
++   may provide additional or different license terms and conditions
++   for use, reproduction, or distribution of Your modifications, or
++   for any such Derivative Works as a whole, provided Your use,
++   reproduction, and distribution of the Work otherwise complies with
++   the conditions stated in this License.
++
++5. Submission of Contributions. Unless You explicitly state otherwise,
++   any Contribution intentionally submitted for inclusion in the Work
++   by You to the Licensor shall be under the terms and conditions of
++   this License, without any additional terms or conditions.
++   Notwithstanding the above, nothing herein shall supersede or modify
++   the terms of any separate license agreement you may have executed
++   with Licensor regarding such Contributions.
++
++6. Trademarks. This License does not grant permission to use the trade
++   names, trademarks, service marks, or product names of the Licensor,
++   except as required for reasonable and customary use in describing the
++   origin of the Work and reproducing the content of the NOTICE file.
++
++7. Disclaimer of Warranty. Unless required by applicable law or
++   agreed to in writing, Licensor provides the Work (and each
++   Contributor provides its Contributions) on an "AS IS" BASIS,
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++   implied, including, without limitation, any warranties or conditions
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++   PARTICULAR PURPOSE. You are solely responsible for determining the
++   appropriateness of using or redistributing the Work and assume any
++   risks associated with Your exercise of permissions under this License.
++
++8. Limitation of Liability. In no event and under no legal theory,
++   whether in tort (including negligence), contract, or otherwise,
++   unless required by applicable law (such as deliberate and grossly
++   negligent acts) or agreed to in writing, shall any Contributor be
++   liable to You for damages, including any direct, indirect, special,
++   incidental, or consequential damages of any character arising as a
++   result of this License or out of the use or inability to use the
++   Work (including but not limited to damages for loss of goodwill,
++   work stoppage, computer failure or malfunction, or any and all
++   other commercial damages or losses), even if such Contributor
++   has been advised of the possibility of such damages.
++
++9. Accepting Warranty or Additional Liability. While redistributing
++   the Work or Derivative Works thereof, You may choose to offer,
++   and charge a fee for, acceptance of support, warranty, indemnity,
++   or other liability obligations and/or rights consistent with this
++   License. However, in accepting such obligations, You may act only
++   on Your own behalf and on Your sole responsibility, not on behalf
++   of any other Contributor, and only if You agree to indemnify,
++   defend, and hold each Contributor harmless for any liability
++   incurred by, or claims asserted against, such Contributor by reason
++   of your accepting any such warranty or additional liability.
++
++END OF TERMS AND CONDITIONS
++
++APPENDIX: How to apply the Apache License to your work.
++
++   To apply the Apache License to your work, attach the following
++   boilerplate notice, with the fields enclosed by brackets "[]"
++   replaced with your own identifying information. (Don't include
++   the brackets!)  The text should be enclosed in the appropriate
++   comment syntax for the file format. We also recommend that a
++   file or class name and description of purpose be included on the
++   same "printed page" as the copyright notice for easier
++   identification within third-party archives.
++
++Copyright [yyyy] [name of copyright owner]
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++      http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69282e381bc07152cc7598f21f3162e4bbb1f22
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2015 The Rust Project Developers
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8c3b3c7a59de456868ba8cb7656d38f8544a47d6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,47 @@@
++
++scopeguard
++==========
++
++Rust crate for a convenient RAII scope guard.
++
++Please read the `API documentation here`__
++
++__ http://bluss.github.io/scopeguard
++
++|build_status|_ |crates|_
++
++.. |build_status| image:: https://travis-ci.org/bluss/scopeguard.svg
++.. _build_status: https://travis-ci.org/bluss/scopeguard
++
++.. |crates| image:: http://meritbadge.herokuapp.com/scopeguard
++.. _crates: https://crates.io/crates/scopeguard
++
++How to use
++----------
++
++::
++
++    #[macro_use(defer)] extern crate scopeguard;
++
++    use scopeguard::guard;
++
++    fn f() {
++        defer!(println!("Called at return or panic"));
++        panic!();
++    }
++
++    fn g() {
++        let f = File::create("newfile.txt").unwrap();
++        let mut file = guard(f, |f| {
++            // write file at return or panic
++            f.sync_all();
++        });
++        file.write("testme\n");
++    }
++
++Recent Changes
++--------------
++
++- 0.1.2
++
++  - Add macro ``defer!()``
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ee87ce3871e9e6a6116f2bfe0627f5dc118986e3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,75 @@@
++use std::ops::{Deref, DerefMut};
++
++/// Macro to create a `Guard` (without any owned value).
++///
++/// The macro takes one expression `$e`, which is the body of a closure
++/// that will run when the scope is exited. The expression can
++/// be a whole block.
++#[macro_export]
++macro_rules! defer {
++    ($e:expr) => {
++        let _guard = $crate::guard((), |_| $e);
++    }
++}
++
++/// `Guard` is a scope guard that may own a protected value.
++///
++/// If you place a guard value in a local variable, its destructor will
++/// run regardless how you leave the function — regular return or panic
++/// (barring abnormal incidents like aborts; so as long as destructors run).
++///
++/// The guard's closure will be called with a mut ref to the held value
++/// in the destructor. It's called only once.
++///
++/// The `Guard` implements `Deref` so that you can access the inner value.
++pub struct Guard<T, F>
++    where F: FnMut(&mut T)
++{
++    __dropfn: F,
++    __value: T,
++}
++
++/// Create a new `Guard` owning `v` and with deferred closure `dropfn`.
++pub fn guard<T, F>(v: T, dropfn: F) -> Guard<T, F>
++    where F: FnMut(&mut T)
++{
++    Guard{__value: v, __dropfn: dropfn}
++}
++
++impl<T, F> Deref for Guard<T, F>
++    where F: FnMut(&mut T)
++{
++    type Target = T;
++    fn deref(&self) -> &T
++    {
++        &self.__value
++    }
++
++}
++
++impl<T, F> DerefMut for Guard<T, F>
++    where F: FnMut(&mut T)
++{
++    fn deref_mut(&mut self) -> &mut T
++    {
++        &mut self.__value
++    }
++}
++
++impl<T, F> Drop for Guard<T, F>
++    where F: FnMut(&mut T)
++{
++    fn drop(&mut self) {
++        (self.__dropfn)(&mut self.__value)
++    }
++}
++
++#[test]
++fn test_defer() {
++    use std::cell::Cell;
++
++    let drops = Cell::new(0);
++    defer!(drops.set(1000));
++    assert_eq!(drops.get(), 0);
++}
++
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..da061a301f6a829564e0667cda7cf3c120aaafc8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"f7726f29ddf9731b17ff113c461e362c381d9d69433f79de4f3dd572488823e9"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a3c548b4e891c2bd593ec590654a86b04d5d15d4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,44 @@@
++# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
++#
++# When uploading crates to the registry Cargo will automatically
++# "normalize" Cargo.toml files for maximal compatibility
++# with all versions of Cargo and also rewrite `path` dependencies
++# to registry (e.g. crates.io) dependencies
++#
++# If you believe there's an error in this file please file an
++# issue against the rust-lang/cargo repository. If you're
++# editing this file be aware that the upstream Cargo.toml
++# will likely look very different (and much more reasonable)
++
++[package]
++name = "serde"
++version = "1.0.11"
++authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
++include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
++description = "A generic serialization/deserialization framework"
++homepage = "https://serde.rs"
++documentation = "https://docs.serde.rs/serde/"
++readme = "README.md"
++keywords = ["serde", "serialization", "no_std"]
++categories = ["encoding"]
++license = "MIT/Apache-2.0"
++repository = "https://github.com/serde-rs/serde"
++[dependencies.serde_derive]
++version = "1.0"
++optional = true
++[dev-dependencies.serde_derive]
++version = "1.0"
++
++[features]
++std = []
++default = ["std"]
++derive = ["serde_derive"]
++playground = ["serde_derive"]
++alloc = ["unstable"]
++rc = []
++unstable = []
++[badges.appveyor]
++repository = "serde-rs/serde"
++
++[badges.travis-ci]
++repository = "serde-rs/serde"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16fe87b06e802f094b3fbb0894b137bca2b16ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++                              Apache License
++                        Version 2.0, January 2004
++                     http://www.apache.org/licenses/
++
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++1. Definitions.
++
++   "License" shall mean the terms and conditions for use, reproduction,
++   and distribution as defined by Sections 1 through 9 of this document.
++
++   "Licensor" shall mean the copyright owner or entity authorized by
++   the copyright owner that is granting the License.
++
++   "Legal Entity" shall mean the union of the acting entity and all
++   other entities that control, are controlled by, or are under common
++   control with that entity. For the purposes of this definition,
++   "control" means (i) the power, direct or indirect, to cause the
++   direction or management of such entity, whether by contract or
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the
++   outstanding shares, or (iii) beneficial ownership of such entity.
++
++   "You" (or "Your") shall mean an individual or Legal Entity
++   exercising permissions granted by this License.
++
++   "Source" form shall mean the preferred form for making modifications,
++   including but not limited to software source code, documentation
++   source, and configuration files.
++
++   "Object" form shall mean any form resulting from mechanical
++   transformation or translation of a Source form, including but
++   not limited to compiled object code, generated documentation,
++   and conversions to other media types.
++
++   "Work" shall mean the work of authorship, whether in Source or
++   Object form, made available under the License, as indicated by a
++   copyright notice that is included in or attached to the work
++   (an example is provided in the Appendix below).
++
++   "Derivative Works" shall mean any work, whether in Source or Object
++   form, that is based on (or derived from) the Work and for which the
++   editorial revisions, annotations, elaborations, or other modifications
++   represent, as a whole, an original work of authorship. For the purposes
++   of this License, Derivative Works shall not include works that remain
++   separable from, or merely link (or bind by name) to the interfaces of,
++   the Work and Derivative Works thereof.
++
++   "Contribution" shall mean any work of authorship, including
++   the original version of the Work and any modifications or additions
++   to that Work or Derivative Works thereof, that is intentionally
++   submitted to Licensor for inclusion in the Work by the copyright owner
++   or by an individual or Legal Entity authorized to submit on behalf of
++   the copyright owner. For the purposes of this definition, "submitted"
++   means any form of electronic, verbal, or written communication sent
++   to the Licensor or its representatives, including but not limited to
++   communication on electronic mailing lists, source code control systems,
++   and issue tracking systems that are managed by, or on behalf of, the
++   Licensor for the purpose of discussing and improving the Work, but
++   excluding communication that is conspicuously marked or otherwise
++   designated in writing by the copyright owner as "Not a Contribution."
++
++   "Contributor" shall mean Licensor and any individual or Legal Entity
++   on behalf of whom a Contribution has been received by Licensor and
++   subsequently incorporated within the Work.
++
++2. Grant of Copyright License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   copyright license to reproduce, prepare Derivative Works of,
++   publicly display, publicly perform, sublicense, and distribute the
++   Work and such Derivative Works in Source or Object form.
++
++3. Grant of Patent License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   (except as stated in this section) patent license to make, have made,
++   use, offer to sell, sell, import, and otherwise transfer the Work,
++   where such license applies only to those patent claims licensable
++   by such Contributor that are necessarily infringed by their
++   Contribution(s) alone or by combination of their Contribution(s)
++   with the Work to which such Contribution(s) was submitted. If You
++   institute patent litigation against any entity (including a
++   cross-claim or counterclaim in a lawsuit) alleging that the Work
++   or a Contribution incorporated within the Work constitutes direct
++   or contributory patent infringement, then any patent licenses
++   granted to You under this License for that Work shall terminate
++   as of the date such litigation is filed.
++
++4. Redistribution. You may reproduce and distribute copies of the
++   Work or Derivative Works thereof in any medium, with or without
++   modifications, and in Source or Object form, provided that You
++   meet the following conditions:
++
++   (a) You must give any other recipients of the Work or
++       Derivative Works a copy of this License; and
++
++   (b) You must cause any modified files to carry prominent notices
++       stating that You changed the files; and
++
++   (c) You must retain, in the Source form of any Derivative Works
++       that You distribute, all copyright, patent, trademark, and
++       attribution notices from the Source form of the Work,
++       excluding those notices that do not pertain to any part of
++       the Derivative Works; and
++
++   (d) If the Work includes a "NOTICE" text file as part of its
++       distribution, then any Derivative Works that You distribute must
++       include a readable copy of the attribution notices contained
++       within such NOTICE file, excluding those notices that do not
++       pertain to any part of the Derivative Works, in at least one
++       of the following places: within a NOTICE text file distributed
++       as part of the Derivative Works; within the Source form or
++       documentation, if provided along with the Derivative Works; or,
++       within a display generated by the Derivative Works, if and
++       wherever such third-party notices normally appear. The contents
++       of the NOTICE file are for informational purposes only and
++       do not modify the License. You may add Your own attribution
++       notices within Derivative Works that You distribute, alongside
++       or as an addendum to the NOTICE text from the Work, provided
++       that such additional attribution notices cannot be construed
++       as modifying the License.
++
++   You may add Your own copyright statement to Your modifications and
++   may provide additional or different license terms and conditions
++   for use, reproduction, or distribution of Your modifications, or
++   for any such Derivative Works as a whole, provided Your use,
++   reproduction, and distribution of the Work otherwise complies with
++   the conditions stated in this License.
++
++5. Submission of Contributions. Unless You explicitly state otherwise,
++   any Contribution intentionally submitted for inclusion in the Work
++   by You to the Licensor shall be under the terms and conditions of
++   this License, without any additional terms or conditions.
++   Notwithstanding the above, nothing herein shall supersede or modify
++   the terms of any separate license agreement you may have executed
++   with Licensor regarding such Contributions.
++
++6. Trademarks. This License does not grant permission to use the trade
++   names, trademarks, service marks, or product names of the Licensor,
++   except as required for reasonable and customary use in describing the
++   origin of the Work and reproducing the content of the NOTICE file.
++
++7. Disclaimer of Warranty. Unless required by applicable law or
++   agreed to in writing, Licensor provides the Work (and each
++   Contributor provides its Contributions) on an "AS IS" BASIS,
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++   implied, including, without limitation, any warranties or conditions
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++   PARTICULAR PURPOSE. You are solely responsible for determining the
++   appropriateness of using or redistributing the Work and assume any
++   risks associated with Your exercise of permissions under this License.
++
++8. Limitation of Liability. In no event and under no legal theory,
++   whether in tort (including negligence), contract, or otherwise,
++   unless required by applicable law (such as deliberate and grossly
++   negligent acts) or agreed to in writing, shall any Contributor be
++   liable to You for damages, including any direct, indirect, special,
++   incidental, or consequential damages of any character arising as a
++   result of this License or out of the use or inability to use the
++   Work (including but not limited to damages for loss of goodwill,
++   work stoppage, computer failure or malfunction, or any and all
++   other commercial damages or losses), even if such Contributor
++   has been advised of the possibility of such damages.
++
++9. Accepting Warranty or Additional Liability. While redistributing
++   the Work or Derivative Works thereof, You may choose to offer,
++   and charge a fee for, acceptance of support, warranty, indemnity,
++   or other liability obligations and/or rights consistent with this
++   License. However, in accepting such obligations, You may act only
++   on Your own behalf and on Your sole responsibility, not on behalf
++   of any other Contributor, and only if You agree to indemnify,
++   defend, and hold each Contributor harmless for any liability
++   incurred by, or claims asserted against, such Contributor by reason
++   of your accepting any such warranty or additional liability.
++
++END OF TERMS AND CONDITIONS
++
++APPENDIX: How to apply the Apache License to your work.
++
++   To apply the Apache License to your work, attach the following
++   boilerplate notice, with the fields enclosed by brackets "[]"
++   replaced with your own identifying information. (Don't include
++   the brackets!)  The text should be enclosed in the appropriate
++   comment syntax for the file format. We also recommend that a
++   file or class name and description of purpose be included on the
++   same "printed page" as the copyright notice for easier
++   identification within third-party archives.
++
++Copyright [yyyy] [name of copyright owner]
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++      http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39d4bdb5acd313c1a92dbeaa1c379aaf0596a315
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2014 The Rust Project Developers
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c2f35e9cd8f596d29f4f5f458cab1f241e597f2c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,81 @@@
++# Serde &emsp; [![Build Status]][travis] [![Latest Version]][crates.io]
++
++[Build Status]: https://api.travis-ci.org/serde-rs/serde.svg?branch=master
++[travis]: https://travis-ci.org/serde-rs/serde
++[Latest Version]: https://img.shields.io/crates/v/serde.svg
++[crates.io]: https://crates.io/crates/serde
++
++**Serde is a framework for *ser*ializing and *de*serializing Rust data structures efficiently and generically.**
++
++---
++
++You may be looking for:
++
++- [An overview of Serde](https://serde.rs/)
++- [Data formats supported by Serde](https://serde.rs/#data-formats)
++- [Setting up `#[derive(Serialize, Deserialize)]`](https://serde.rs/codegen.html)
++- [Examples](https://serde.rs/examples.html)
++- [API documentation](https://docs.serde.rs/serde/)
++- [Release notes](https://github.com/serde-rs/serde/releases)
++
++## Serde in action
++
++<a href="http://play.integer32.com/?gist=9003c5b88c1f4989941925d7190c6eec" target="_blank">
++<img align="right" width="50" src="https://raw.githubusercontent.com/serde-rs/serde-rs.github.io/master/img/run.png">
++</a>
++
++```rust
++#[macro_use]
++extern crate serde_derive;
++
++extern crate serde;
++extern crate serde_json;
++
++#[derive(Serialize, Deserialize, Debug)]
++struct Point {
++    x: i32,
++    y: i32,
++}
++
++fn main() {
++    let point = Point { x: 1, y: 2 };
++
++    // Convert the Point to a JSON string.
++    let serialized = serde_json::to_string(&point).unwrap();
++
++    // Prints serialized = {"x":1,"y":2}
++    println!("serialized = {}", serialized);
++
++    // Convert the JSON string back to a Point.
++    let deserialized: Point = serde_json::from_str(&serialized).unwrap();
++
++    // Prints deserialized = Point { x: 1, y: 2 }
++    println!("deserialized = {:?}", deserialized);
++}
++```
++
++## Getting help
++
++Serde developers live in the #serde channel on
++[`irc.mozilla.org`](https://wiki.mozilla.org/IRC). The #rust channel is also a
++good resource with generally faster response time but less specific knowledge
++about Serde. If IRC is not your thing or you don't get a good response, we are
++happy to respond to [GitHub issues](https://github.com/serde-rs/serde/issues/new)
++as well.
++
++## License
++
++Serde is licensed under either of
++
++ * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
++   http://www.apache.org/licenses/LICENSE-2.0)
++ * MIT license ([LICENSE-MIT](LICENSE-MIT) or
++   http://opensource.org/licenses/MIT)
++
++at your option.
++
++### Contribution
++
++Unless you explicitly state otherwise, any contribution intentionally submitted
++for inclusion in Serde by you, as defined in the Apache-2.0 license, shall be
++dual licensed as above, without any additional terms or conditions.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ae29395291679cb788647ed67f71b52950834eba
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,116 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use lib::*;
++
++macro_rules! int_to_int {
++    ($dst:ident, $n:ident) => (
++        if $dst::MIN as i64 <= $n as i64 && $n as i64 <= $dst::MAX as i64 {
++            Some($n as $dst)
++        } else {
++            None
++        }
++    )
++}
++
++macro_rules! int_to_uint {
++    ($dst:ident, $n:ident) => (
++        if 0 <= $n && $n as u64 <= $dst::MAX as u64 {
++            Some($n as $dst)
++        } else {
++            None
++        }
++    )
++}
++
++macro_rules! uint_to {
++    ($dst:ident, $n:ident) => (
++        if $n as u64 <= $dst::MAX as u64 {
++            Some($n as $dst)
++        } else {
++            None
++        }
++    )
++}
++
++pub trait FromPrimitive: Sized {
++    fn from_isize(n: isize) -> Option<Self>;
++    fn from_i8(n: i8) -> Option<Self>;
++    fn from_i16(n: i16) -> Option<Self>;
++    fn from_i32(n: i32) -> Option<Self>;
++    fn from_i64(n: i64) -> Option<Self>;
++    fn from_usize(n: usize) -> Option<Self>;
++    fn from_u8(n: u8) -> Option<Self>;
++    fn from_u16(n: u16) -> Option<Self>;
++    fn from_u32(n: u32) -> Option<Self>;
++    fn from_u64(n: u64) -> Option<Self>;
++}
++
++macro_rules! impl_from_primitive_for_int {
++    ($t:ident) => (
++        impl FromPrimitive for $t {
++            #[inline] fn from_isize(n: isize) -> Option<Self> { int_to_int!($t, n) }
++            #[inline] fn from_i8(n: i8) -> Option<Self> { int_to_int!($t, n) }
++            #[inline] fn from_i16(n: i16) -> Option<Self> { int_to_int!($t, n) }
++            #[inline] fn from_i32(n: i32) -> Option<Self> { int_to_int!($t, n) }
++            #[inline] fn from_i64(n: i64) -> Option<Self> { int_to_int!($t, n) }
++            #[inline] fn from_usize(n: usize) -> Option<Self> { uint_to!($t, n) }
++            #[inline] fn from_u8(n: u8) -> Option<Self> { uint_to!($t, n) }
++            #[inline] fn from_u16(n: u16) -> Option<Self> { uint_to!($t, n) }
++            #[inline] fn from_u32(n: u32) -> Option<Self> { uint_to!($t, n) }
++            #[inline] fn from_u64(n: u64) -> Option<Self> { uint_to!($t, n) }
++        }
++    )
++}
++
++macro_rules! impl_from_primitive_for_uint {
++    ($t:ident) => (
++        impl FromPrimitive for $t {
++            #[inline] fn from_isize(n: isize) -> Option<Self> { int_to_uint!($t, n) }
++            #[inline] fn from_i8(n: i8) -> Option<Self> { int_to_uint!($t, n) }
++            #[inline] fn from_i16(n: i16) -> Option<Self> { int_to_uint!($t, n) }
++            #[inline] fn from_i32(n: i32) -> Option<Self> { int_to_uint!($t, n) }
++            #[inline] fn from_i64(n: i64) -> Option<Self> { int_to_uint!($t, n) }
++            #[inline] fn from_usize(n: usize) -> Option<Self> { uint_to!($t, n) }
++            #[inline] fn from_u8(n: u8) -> Option<Self> { uint_to!($t, n) }
++            #[inline] fn from_u16(n: u16) -> Option<Self> { uint_to!($t, n) }
++            #[inline] fn from_u32(n: u32) -> Option<Self> { uint_to!($t, n) }
++            #[inline] fn from_u64(n: u64) -> Option<Self> { uint_to!($t, n) }
++        }
++    )
++}
++
++macro_rules! impl_from_primitive_for_float {
++    ($t:ident) => (
++        impl FromPrimitive for $t {
++            #[inline] fn from_isize(n: isize) -> Option<Self> { Some(n as Self) }
++            #[inline] fn from_i8(n: i8) -> Option<Self> { Some(n as Self) }
++            #[inline] fn from_i16(n: i16) -> Option<Self> { Some(n as Self) }
++            #[inline] fn from_i32(n: i32) -> Option<Self> { Some(n as Self) }
++            #[inline] fn from_i64(n: i64) -> Option<Self> { Some(n as Self) }
++            #[inline] fn from_usize(n: usize) -> Option<Self> { Some(n as Self) }
++            #[inline] fn from_u8(n: u8) -> Option<Self> { Some(n as Self) }
++            #[inline] fn from_u16(n: u16) -> Option<Self> { Some(n as Self) }
++            #[inline] fn from_u32(n: u32) -> Option<Self> { Some(n as Self) }
++            #[inline] fn from_u64(n: u64) -> Option<Self> { Some(n as Self) }
++        }
++    )
++}
++
++impl_from_primitive_for_int!(isize);
++impl_from_primitive_for_int!(i8);
++impl_from_primitive_for_int!(i16);
++impl_from_primitive_for_int!(i32);
++impl_from_primitive_for_int!(i64);
++impl_from_primitive_for_uint!(usize);
++impl_from_primitive_for_uint!(u8);
++impl_from_primitive_for_uint!(u16);
++impl_from_primitive_for_uint!(u32);
++impl_from_primitive_for_uint!(u64);
++impl_from_primitive_for_float!(f32);
++impl_from_primitive_for_float!(f64);
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a4f3abe264799b34f051f4918612142bab685287
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,215 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use lib::*;
++
++use de::{Deserialize, Deserializer, Visitor, SeqAccess, MapAccess, Error};
++
++/// An efficient way of discarding data from a deserializer.
++///
++/// Think of this like `serde_json::Value` in that it can be deserialized from
++/// any type, except that it does not store any information about the data that
++/// gets deserialized.
++///
++/// ```rust
++/// use std::fmt;
++/// use std::marker::PhantomData;
++///
++/// use serde::de::{self, Deserialize, DeserializeSeed, Deserializer, Visitor, SeqAccess, IgnoredAny};
++///
++/// /// A seed that can be used to deserialize only the `n`th element of a sequence
++/// /// while efficiently discarding elements of any type before or after index `n`.
++/// ///
++/// /// For example to deserialize only the element at index 3:
++/// ///
++/// /// ```rust
++/// /// NthElement::new(3).deserialize(deserializer)
++/// /// ```
++/// pub struct NthElement<T> {
++///     n: usize,
++///     marker: PhantomData<T>,
++/// }
++///
++/// impl<T> NthElement<T> {
++///     pub fn new(n: usize) -> Self {
++///         NthElement {
++///             n: n,
++///             marker: PhantomData,
++///         }
++///     }
++/// }
++///
++/// impl<'de, T> Visitor<'de> for NthElement<T>
++///     where T: Deserialize<'de>
++/// {
++///     type Value = T;
++///
++///     fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++///         write!(formatter, "a sequence in which we care about element {}", self.n)
++///     }
++///
++///     fn visit_seq<A>(self, mut seq: A) -> Result<Self::Value, A::Error>
++///         where A: SeqAccess<'de>
++///     {
++///         // Skip over the first `n` elements.
++///         for i in 0..self.n {
++///             // It is an error if the sequence ends before we get to element `n`.
++///             if seq.next_element::<IgnoredAny>()?.is_none() {
++///                 return Err(de::Error::invalid_length(i, &self));
++///             }
++///         }
++///
++///         // Deserialize the one we care about.
++///         let nth = match seq.next_element()? {
++///             Some(nth) => nth,
++///             None => {
++///                 return Err(de::Error::invalid_length(self.n, &self));
++///             }
++///         };
++///
++///         // Skip over any remaining elements in the sequence after `n`.
++///         while let Some(IgnoredAny) = seq.next_element()? {
++///             // ignore
++///         }
++///
++///         Ok(nth)
++///     }
++/// }
++///
++/// impl<'de, T> DeserializeSeed<'de> for NthElement<T>
++///     where T: Deserialize<'de>
++/// {
++///     type Value = T;
++///
++///     fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
++///         where D: Deserializer<'de>
++///     {
++///         deserializer.deserialize_seq(self)
++///     }
++/// }
++///
++/// # fn example<'de, D>(deserializer: D) -> Result<(), D::Error>
++/// #     where D: Deserializer<'de>
++/// # {
++/// // Deserialize only the sequence element at index 3 from this deserializer.
++/// // The element at index 3 is required to be a string. Elements before and
++/// // after index 3 are allowed to be of any type.
++/// let s: String = NthElement::new(3).deserialize(deserializer)?;
++/// #     Ok(())
++/// # }
++/// ```
++#[derive(Copy, Clone, Debug, Default)]
++pub struct IgnoredAny;
++
++impl<'de> Visitor<'de> for IgnoredAny {
++    type Value = IgnoredAny;
++
++    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter.write_str("anything at all")
++    }
++
++    #[inline]
++    fn visit_bool<E>(self, x: bool) -> Result<Self::Value, E> {
++        let _ = x;
++        Ok(IgnoredAny)
++    }
++
++    #[inline]
++    fn visit_i64<E>(self, x: i64) -> Result<Self::Value, E> {
++        let _ = x;
++        Ok(IgnoredAny)
++    }
++
++    #[inline]
++    fn visit_u64<E>(self, x: u64) -> Result<Self::Value, E> {
++        let _ = x;
++        Ok(IgnoredAny)
++    }
++
++    #[inline]
++    fn visit_f64<E>(self, x: f64) -> Result<Self::Value, E> {
++        let _ = x;
++        Ok(IgnoredAny)
++    }
++
++    #[inline]
++    fn visit_str<E>(self, s: &str) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        let _ = s;
++        Ok(IgnoredAny)
++    }
++
++    #[inline]
++    fn visit_none<E>(self) -> Result<Self::Value, E> {
++        Ok(IgnoredAny)
++    }
++
++    #[inline]
++    fn visit_some<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        IgnoredAny::deserialize(deserializer)
++    }
++
++    #[inline]
++    fn visit_newtype_struct<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        IgnoredAny::deserialize(deserializer)
++    }
++
++    #[inline]
++    fn visit_unit<E>(self) -> Result<Self::Value, E> {
++        Ok(IgnoredAny)
++    }
++
++    #[inline]
++    fn visit_seq<A>(self, mut seq: A) -> Result<Self::Value, A::Error>
++    where
++        A: SeqAccess<'de>,
++    {
++        while let Some(IgnoredAny) = try!(seq.next_element()) {
++            // Gobble
++        }
++        Ok(IgnoredAny)
++    }
++
++    #[inline]
++    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
++    where
++        A: MapAccess<'de>,
++    {
++        while let Some((IgnoredAny, IgnoredAny)) = try!(map.next_entry()) {
++            // Gobble
++        }
++        Ok(IgnoredAny)
++    }
++
++    #[inline]
++    fn visit_bytes<E>(self, bytes: &[u8]) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        let _ = bytes;
++        Ok(IgnoredAny)
++    }
++}
++
++impl<'de> Deserialize<'de> for IgnoredAny {
++    #[inline]
++    fn deserialize<D>(deserializer: D) -> Result<IgnoredAny, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        deserializer.deserialize_ignored_any(IgnoredAny)
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c91f431f4c1a8698db60e32b257655fbe0eb2a32
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1693 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use lib::*;
++
++use de::{Deserialize, Deserializer, EnumAccess, Error, SeqAccess, Unexpected, VariantAccess,
++         Visitor};
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++use de::MapAccess;
++
++use de::from_primitive::FromPrimitive;
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++use private::de::size_hint;
++
++////////////////////////////////////////////////////////////////////////////////
++
++struct UnitVisitor;
++
++impl<'de> Visitor<'de> for UnitVisitor {
++    type Value = ();
++
++    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter.write_str("unit")
++    }
++
++    fn visit_unit<E>(self) -> Result<(), E>
++    where
++        E: Error,
++    {
++        Ok(())
++    }
++}
++
++impl<'de> Deserialize<'de> for () {
++    fn deserialize<D>(deserializer: D) -> Result<(), D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        deserializer.deserialize_unit(UnitVisitor)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++struct BoolVisitor;
++
++impl<'de> Visitor<'de> for BoolVisitor {
++    type Value = bool;
++
++    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter.write_str("a boolean")
++    }
++
++    fn visit_bool<E>(self, v: bool) -> Result<bool, E>
++    where
++        E: Error,
++    {
++        Ok(v)
++    }
++}
++
++impl<'de> Deserialize<'de> for bool {
++    fn deserialize<D>(deserializer: D) -> Result<bool, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        deserializer.deserialize_bool(BoolVisitor)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++macro_rules! visit_integer_method {
++    ($src_ty:ident, $method:ident, $from_method:ident, $group:ident, $group_ty:ident) => {
++        #[inline]
++        fn $method<E>(self, v: $src_ty) -> Result<Self::Value, E>
++        where
++            E: Error,
++        {
++            match FromPrimitive::$from_method(v) {
++                Some(v) => Ok(v),
++                None => Err(Error::invalid_value(Unexpected::$group(v as $group_ty), &self)),
++            }
++        }
++    }
++}
++
++macro_rules! visit_float_method {
++    ($src_ty:ident, $method:ident) => {
++        #[inline]
++        fn $method<E>(self, v: $src_ty) -> Result<Self::Value, E>
++        where
++            E: Error,
++        {
++            Ok(v as Self::Value)
++        }
++    }
++}
++
++macro_rules! impl_deserialize_num {
++    ($ty:ident, $method:ident, $($visit:ident),*) => {
++        impl<'de> Deserialize<'de> for $ty {
++            #[inline]
++            fn deserialize<D>(deserializer: D) -> Result<$ty, D::Error>
++            where
++                D: Deserializer<'de>,
++            {
++                struct PrimitiveVisitor;
++
++                impl<'de> Visitor<'de> for PrimitiveVisitor {
++                    type Value = $ty;
++
++                    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                        formatter.write_str(stringify!($ty))
++                    }
++
++                    $(
++                        impl_deserialize_num!($visit $ty);
++                    )*
++                }
++
++                deserializer.$method(PrimitiveVisitor)
++            }
++        }
++    };
++
++    (integer $ty:ident) => {
++        visit_integer_method!(i8, visit_i8, from_i8, Signed, i64);
++        visit_integer_method!(i16, visit_i16, from_i16, Signed, i64);
++        visit_integer_method!(i32, visit_i32, from_i32, Signed, i64);
++        visit_integer_method!(i64, visit_i64, from_i64, Signed, i64);
++
++        visit_integer_method!(u8, visit_u8, from_u8, Unsigned, u64);
++        visit_integer_method!(u16, visit_u16, from_u16, Unsigned, u64);
++        visit_integer_method!(u32, visit_u32, from_u32, Unsigned, u64);
++        visit_integer_method!(u64, visit_u64, from_u64, Unsigned, u64);
++    };
++
++    (float $ty:ident) => {
++        visit_float_method!(f32, visit_f32);
++        visit_float_method!(f64, visit_f64);
++    };
++}
++
++impl_deserialize_num!(i8, deserialize_i8, integer);
++impl_deserialize_num!(i16, deserialize_i16, integer);
++impl_deserialize_num!(i32, deserialize_i32, integer);
++impl_deserialize_num!(i64, deserialize_i64, integer);
++impl_deserialize_num!(isize, deserialize_i64, integer);
++
++impl_deserialize_num!(u8, deserialize_u8, integer);
++impl_deserialize_num!(u16, deserialize_u16, integer);
++impl_deserialize_num!(u32, deserialize_u32, integer);
++impl_deserialize_num!(u64, deserialize_u64, integer);
++impl_deserialize_num!(usize, deserialize_u64, integer);
++
++impl_deserialize_num!(f32, deserialize_f32, integer, float);
++impl_deserialize_num!(f64, deserialize_f64, integer, float);
++
++////////////////////////////////////////////////////////////////////////////////
++
++struct CharVisitor;
++
++impl<'de> Visitor<'de> for CharVisitor {
++    type Value = char;
++
++    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter.write_str("a character")
++    }
++
++    #[inline]
++    fn visit_char<E>(self, v: char) -> Result<char, E>
++    where
++        E: Error,
++    {
++        Ok(v)
++    }
++
++    #[inline]
++    fn visit_str<E>(self, v: &str) -> Result<char, E>
++    where
++        E: Error,
++    {
++        let mut iter = v.chars();
++        match (iter.next(), iter.next()) {
++            (Some(c), None) => Ok(c),
++            _ => Err(Error::invalid_value(Unexpected::Str(v), &self)),
++        }
++    }
++}
++
++impl<'de> Deserialize<'de> for char {
++    #[inline]
++    fn deserialize<D>(deserializer: D) -> Result<char, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        deserializer.deserialize_char(CharVisitor)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++struct StringVisitor;
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++impl<'de> Visitor<'de> for StringVisitor {
++    type Value = String;
++
++    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter.write_str("a string")
++    }
++
++    fn visit_str<E>(self, v: &str) -> Result<String, E>
++    where
++        E: Error,
++    {
++        Ok(v.to_owned())
++    }
++
++    fn visit_string<E>(self, v: String) -> Result<String, E>
++    where
++        E: Error,
++    {
++        Ok(v)
++    }
++
++    fn visit_bytes<E>(self, v: &[u8]) -> Result<String, E>
++    where
++        E: Error,
++    {
++        match str::from_utf8(v) {
++            Ok(s) => Ok(s.to_owned()),
++            Err(_) => Err(Error::invalid_value(Unexpected::Bytes(v), &self)),
++        }
++    }
++
++    fn visit_byte_buf<E>(self, v: Vec<u8>) -> Result<String, E>
++    where
++        E: Error,
++    {
++        match String::from_utf8(v) {
++            Ok(s) => Ok(s),
++            Err(e) => Err(Error::invalid_value(Unexpected::Bytes(&e.into_bytes()), &self),),
++        }
++    }
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++impl<'de> Deserialize<'de> for String {
++    fn deserialize<D>(deserializer: D) -> Result<String, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        deserializer.deserialize_string(StringVisitor)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++struct StrVisitor;
++
++impl<'a> Visitor<'a> for StrVisitor {
++    type Value = &'a str;
++
++    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter.write_str("a borrowed string")
++    }
++
++    fn visit_borrowed_str<E>(self, v: &'a str) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        Ok(v) // so easy
++    }
++
++    fn visit_borrowed_bytes<E>(self, v: &'a [u8]) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        str::from_utf8(v).map_err(|_| Error::invalid_value(Unexpected::Bytes(v), &self))
++    }
++}
++
++impl<'de: 'a, 'a> Deserialize<'de> for &'a str {
++    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        deserializer.deserialize_str(StrVisitor)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++struct BytesVisitor;
++
++impl<'a> Visitor<'a> for BytesVisitor {
++    type Value = &'a [u8];
++
++    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter.write_str("a borrowed byte array")
++    }
++
++    fn visit_borrowed_bytes<E>(self, v: &'a [u8]) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        Ok(v)
++    }
++
++    fn visit_borrowed_str<E>(self, v: &'a str) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        Ok(v.as_bytes())
++    }
++}
++
++impl<'de: 'a, 'a> Deserialize<'de> for &'a [u8] {
++    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        deserializer.deserialize_bytes(BytesVisitor)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(feature = "std")]
++struct CStringVisitor;
++
++#[cfg(feature = "std")]
++impl<'de> Visitor<'de> for CStringVisitor {
++    type Value = CString;
++
++    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter.write_str("byte array")
++    }
++
++    fn visit_seq<A>(self, mut seq: A) -> Result<CString, A::Error>
++    where
++        A: SeqAccess<'de>,
++    {
++        let len = size_hint::cautious(seq.size_hint());
++        let mut values = Vec::with_capacity(len);
++
++        while let Some(value) = try!(seq.next_element()) {
++            values.push(value);
++        }
++
++        CString::new(values).map_err(Error::custom)
++    }
++
++    fn visit_bytes<E>(self, v: &[u8]) -> Result<CString, E>
++    where
++        E: Error,
++    {
++        CString::new(v).map_err(Error::custom)
++    }
++
++    fn visit_byte_buf<E>(self, v: Vec<u8>) -> Result<CString, E>
++    where
++        E: Error,
++    {
++        CString::new(v).map_err(Error::custom)
++    }
++
++    fn visit_str<E>(self, v: &str) -> Result<CString, E>
++    where
++        E: Error,
++    {
++        CString::new(v).map_err(Error::custom)
++    }
++
++    fn visit_string<E>(self, v: String) -> Result<CString, E>
++    where
++        E: Error,
++    {
++        CString::new(v).map_err(Error::custom)
++    }
++}
++
++#[cfg(feature = "std")]
++impl<'de> Deserialize<'de> for CString {
++    fn deserialize<D>(deserializer: D) -> Result<CString, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        deserializer.deserialize_byte_buf(CStringVisitor)
++    }
++}
++
++macro_rules! forwarded_impl {
++    (( $($id: ident),* ), $ty: ty, $func: expr) => {
++        impl<'de $(, $id : Deserialize<'de>,)*> Deserialize<'de> for $ty {
++            fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
++            where
++                D: Deserializer<'de>,
++            {
++                Deserialize::deserialize(deserializer).map($func)
++            }
++        }
++    }
++}
++
++#[cfg(all(feature = "std", feature = "unstable"))]
++forwarded_impl!((), Box<CStr>, CString::into_boxed_c_str);
++
++////////////////////////////////////////////////////////////////////////////////
++
++struct OptionVisitor<T> {
++    marker: PhantomData<T>,
++}
++
++impl<'de, T> Visitor<'de> for OptionVisitor<T>
++where
++    T: Deserialize<'de>,
++{
++    type Value = Option<T>;
++
++    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter.write_str("option")
++    }
++
++    #[inline]
++    fn visit_unit<E>(self) -> Result<Option<T>, E>
++    where
++        E: Error,
++    {
++        Ok(None)
++    }
++
++    #[inline]
++    fn visit_none<E>(self) -> Result<Option<T>, E>
++    where
++        E: Error,
++    {
++        Ok(None)
++    }
++
++    #[inline]
++    fn visit_some<D>(self, deserializer: D) -> Result<Option<T>, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        T::deserialize(deserializer).map(Some)
++    }
++}
++
++impl<'de, T> Deserialize<'de> for Option<T>
++where
++    T: Deserialize<'de>,
++{
++    fn deserialize<D>(deserializer: D) -> Result<Option<T>, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        deserializer.deserialize_option(OptionVisitor { marker: PhantomData })
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++struct PhantomDataVisitor<T> {
++    marker: PhantomData<T>,
++}
++
++impl<'de, T> Visitor<'de> for PhantomDataVisitor<T> {
++    type Value = PhantomData<T>;
++
++    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter.write_str("unit")
++    }
++
++    #[inline]
++    fn visit_unit<E>(self) -> Result<PhantomData<T>, E>
++    where
++        E: Error,
++    {
++        Ok(PhantomData)
++    }
++}
++
++impl<'de, T> Deserialize<'de> for PhantomData<T> {
++    fn deserialize<D>(deserializer: D) -> Result<PhantomData<T>, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        let visitor = PhantomDataVisitor { marker: PhantomData };
++        deserializer.deserialize_unit_struct("PhantomData", visitor)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++macro_rules! seq_impl {
++    (
++        $ty:ident < T $(: $tbound1:ident $(+ $tbound2:ident)*)* $(, $typaram:ident : $bound1:ident $(+ $bound2:ident)*)* >,
++        $access:ident,
++        $ctor:expr,
++        $with_capacity:expr,
++        $insert:expr
++    ) => {
++        impl<'de, T $(, $typaram)*> Deserialize<'de> for $ty<T $(, $typaram)*>
++        where
++            T: Deserialize<'de> $(+ $tbound1 $(+ $tbound2)*)*,
++            $($typaram: $bound1 $(+ $bound2)*,)*
++        {
++            fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
++            where
++                D: Deserializer<'de>,
++            {
++                struct SeqVisitor<T $(, $typaram)*> {
++                    marker: PhantomData<$ty<T $(, $typaram)*>>,
++                }
++
++                impl<'de, T $(, $typaram)*> Visitor<'de> for SeqVisitor<T $(, $typaram)*>
++                where
++                    T: Deserialize<'de> $(+ $tbound1 $(+ $tbound2)*)*,
++                    $($typaram: $bound1 $(+ $bound2)*,)*
++                {
++                    type Value = $ty<T $(, $typaram)*>;
++
++                    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                        formatter.write_str("a sequence")
++                    }
++
++                    #[inline]
++                    fn visit_seq<A>(self, mut $access: A) -> Result<Self::Value, A::Error>
++                    where
++                        A: SeqAccess<'de>,
++                    {
++                        let mut values = $with_capacity;
++
++                        while let Some(value) = try!($access.next_element()) {
++                            $insert(&mut values, value);
++                        }
++
++                        Ok(values)
++                    }
++                }
++
++                let visitor = SeqVisitor { marker: PhantomData };
++                deserializer.deserialize_seq(visitor)
++            }
++        }
++    }
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++seq_impl!(
++    BinaryHeap<T: Ord>,
++    seq,
++    BinaryHeap::new(),
++    BinaryHeap::with_capacity(size_hint::cautious(seq.size_hint())),
++    BinaryHeap::push);
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++seq_impl!(
++    BTreeSet<T: Eq + Ord>,
++    seq,
++    BTreeSet::new(),
++    BTreeSet::new(),
++    BTreeSet::insert);
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++seq_impl!(
++    LinkedList<T>,
++    seq,
++    LinkedList::new(),
++    LinkedList::new(),
++    LinkedList::push_back);
++
++#[cfg(feature = "std")]
++seq_impl!(
++    HashSet<T: Eq + Hash, S: BuildHasher + Default>,
++    seq,
++    HashSet::with_hasher(S::default()),
++    HashSet::with_capacity_and_hasher(size_hint::cautious(seq.size_hint()), S::default()),
++    HashSet::insert);
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++seq_impl!(
++    Vec<T>,
++    seq,
++    Vec::new(),
++    Vec::with_capacity(size_hint::cautious(seq.size_hint())),
++    Vec::push);
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++seq_impl!(
++    VecDeque<T>,
++    seq,
++    VecDeque::new(),
++    VecDeque::with_capacity(size_hint::cautious(seq.size_hint())),
++    VecDeque::push_back);
++
++////////////////////////////////////////////////////////////////////////////////
++
++struct ArrayVisitor<A> {
++    marker: PhantomData<A>,
++}
++
++impl<A> ArrayVisitor<A> {
++    fn new() -> Self {
++        ArrayVisitor { marker: PhantomData }
++    }
++}
++
++impl<'de, T> Visitor<'de> for ArrayVisitor<[T; 0]> {
++    type Value = [T; 0];
++
++    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter.write_str("an empty array")
++    }
++
++    #[inline]
++    fn visit_seq<A>(self, _: A) -> Result<[T; 0], A::Error>
++    where
++        A: SeqAccess<'de>,
++    {
++        Ok([])
++    }
++}
++
++// Does not require T: Deserialize<'de>.
++impl<'de, T> Deserialize<'de> for [T; 0] {
++    fn deserialize<D>(deserializer: D) -> Result<[T; 0], D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        deserializer.deserialize_tuple(0, ArrayVisitor::<[T; 0]>::new())
++    }
++}
++
++macro_rules! array_impls {
++    ($($len:expr => ($($n:tt $name:ident)+))+) => {
++        $(
++            impl<'de, T> Visitor<'de> for ArrayVisitor<[T; $len]>
++            where
++                T: Deserialize<'de>,
++            {
++                type Value = [T; $len];
++
++                fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                    formatter.write_str(concat!("an array of length ", $len))
++                }
++
++                #[inline]
++                fn visit_seq<A>(self, mut seq: A) -> Result<[T; $len], A::Error>
++                where
++                    A: SeqAccess<'de>,
++                {
++                    $(
++                        let $name = match try!(seq.next_element()) {
++                            Some(val) => val,
++                            None => return Err(Error::invalid_length($n, &self)),
++                        };
++                    )+
++
++                    Ok([$($name),+])
++                }
++            }
++
++            impl<'de, T> Deserialize<'de> for [T; $len]
++            where
++                T: Deserialize<'de>,
++            {
++                fn deserialize<D>(deserializer: D) -> Result<[T; $len], D::Error>
++                where
++                    D: Deserializer<'de>,
++                {
++                    deserializer.deserialize_tuple($len, ArrayVisitor::<[T; $len]>::new())
++                }
++            }
++        )+
++    }
++}
++
++array_impls! {
++    1 => (0 a)
++    2 => (0 a 1 b)
++    3 => (0 a 1 b 2 c)
++    4 => (0 a 1 b 2 c 3 d)
++    5 => (0 a 1 b 2 c 3 d 4 e)
++    6 => (0 a 1 b 2 c 3 d 4 e 5 f)
++    7 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g)
++    8 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h)
++    9 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i)
++    10 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j)
++    11 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k)
++    12 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l)
++    13 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m)
++    14 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n)
++    15 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o)
++    16 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p)
++    17 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q)
++    18 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r)
++    19 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r 18 s)
++    20 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r 18 s 19 t)
++    21 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r 18 s 19 t 20 u)
++    22 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r 18 s 19 t 20 u 21 v)
++    23 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r 18 s 19 t 20 u 21 v 22 w)
++    24 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r 18 s 19 t 20 u 21 v 22 w 23 x)
++    25 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r 18 s 19 t 20 u 21 v 22 w 23 x 24 y)
++    26 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r 18 s 19 t 20 u 21 v 22 w 23 x 24 y 25 z)
++    27 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r 18 s 19 t 20 u 21 v 22 w 23 x 24 y 25 z 26 aa)
++    28 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r 18 s 19 t 20 u 21 v 22 w 23 x 24 y 25 z 26 aa 27 ab)
++    29 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r 18 s 19 t 20 u 21 v 22 w 23 x 24 y 25 z 26 aa 27 ab 28 ac)
++    30 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r 18 s 19 t 20 u 21 v 22 w 23 x 24 y 25 z 26 aa 27 ab 28 ac 29 ad)
++    31 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r 18 s 19 t 20 u 21 v 22 w 23 x 24 y 25 z 26 aa 27 ab 28 ac 29 ad 30 ae)
++    32 => (0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p 16 q 17 r 18 s 19 t 20 u 21 v 22 w 23 x 24 y 25 z 26 aa 27 ab 28 ac 29 ad 30 ae 31 af)
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++macro_rules! tuple_impls {
++    ($($len:tt $visitor:ident => ($($n:tt $name:ident)+))+) => {
++        $(
++            struct $visitor<$($name,)+> {
++                marker: PhantomData<($($name,)+)>,
++            }
++
++            impl<$($name,)+> $visitor<$($name,)+> {
++                fn new() -> Self {
++                    $visitor { marker: PhantomData }
++                }
++            }
++
++            impl<'de, $($name: Deserialize<'de>),+> Visitor<'de> for $visitor<$($name,)+> {
++                type Value = ($($name,)+);
++
++                fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                    formatter.write_str(concat!("a tuple of size ", $len))
++                }
++
++                #[inline]
++                #[allow(non_snake_case)]
++                fn visit_seq<A>(self, mut seq: A) -> Result<($($name,)+), A::Error>
++                where
++                    A: SeqAccess<'de>,
++                {
++                    $(
++                        let $name = match try!(seq.next_element()) {
++                            Some(value) => value,
++                            None => return Err(Error::invalid_length($n, &self)),
++                        };
++                    )+
++
++                    Ok(($($name,)+))
++                }
++            }
++
++            impl<'de, $($name: Deserialize<'de>),+> Deserialize<'de> for ($($name,)+) {
++                #[inline]
++                fn deserialize<D>(deserializer: D) -> Result<($($name,)+), D::Error>
++                where
++                    D: Deserializer<'de>,
++                {
++                    deserializer.deserialize_tuple($len, $visitor::new())
++                }
++            }
++        )+
++    }
++}
++
++tuple_impls! {
++    1 TupleVisitor1 => (0 T0)
++    2 TupleVisitor2 => (0 T0 1 T1)
++    3 TupleVisitor3 => (0 T0 1 T1 2 T2)
++    4 TupleVisitor4 => (0 T0 1 T1 2 T2 3 T3)
++    5 TupleVisitor5 => (0 T0 1 T1 2 T2 3 T3 4 T4)
++    6 TupleVisitor6 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5)
++    7 TupleVisitor7 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6)
++    8 TupleVisitor8 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7)
++    9 TupleVisitor9 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8)
++    10 TupleVisitor10 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8 9 T9)
++    11 TupleVisitor11 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8 9 T9 10 T10)
++    12 TupleVisitor12 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8 9 T9 10 T10 11 T11)
++    13 TupleVisitor13 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8 9 T9 10 T10 11 T11 12 T12)
++    14 TupleVisitor14 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8 9 T9 10 T10 11 T11 12 T12 13 T13)
++    15 TupleVisitor15 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8 9 T9 10 T10 11 T11 12 T12 13 T13 14 T14)
++    16 TupleVisitor16 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8 9 T9 10 T10 11 T11 12 T12 13 T13 14 T14 15 T15)
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++macro_rules! map_impl {
++    (
++        $ty:ident < K $(: $kbound1:ident $(+ $kbound2:ident)*)*, V $(, $typaram:ident : $bound1:ident $(+ $bound2:ident)*)* >,
++        $access:ident,
++        $ctor:expr,
++        $with_capacity:expr
++    ) => {
++        impl<'de, K, V $(, $typaram)*> Deserialize<'de> for $ty<K, V $(, $typaram)*>
++        where
++            K: Deserialize<'de> $(+ $kbound1 $(+ $kbound2)*)*,
++            V: Deserialize<'de>,
++            $($typaram: $bound1 $(+ $bound2)*),*
++        {
++            fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
++            where
++                D: Deserializer<'de>,
++            {
++                struct MapVisitor<K, V $(, $typaram)*> {
++                    marker: PhantomData<$ty<K, V $(, $typaram)*>>,
++                }
++
++                impl<'de, K, V $(, $typaram)*> Visitor<'de> for MapVisitor<K, V $(, $typaram)*>
++                where
++                    K: Deserialize<'de> $(+ $kbound1 $(+ $kbound2)*)*,
++                    V: Deserialize<'de>,
++                    $($typaram: $bound1 $(+ $bound2)*),*
++                {
++                    type Value = $ty<K, V $(, $typaram)*>;
++
++                    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                        formatter.write_str("a map")
++                    }
++
++                    #[inline]
++                    fn visit_map<A>(self, mut $access: A) -> Result<Self::Value, A::Error>
++                    where
++                        A: MapAccess<'de>,
++                    {
++                        let mut values = $with_capacity;
++
++                        while let Some((key, value)) = try!($access.next_entry()) {
++                            values.insert(key, value);
++                        }
++
++                        Ok(values)
++                    }
++                }
++
++                let visitor = MapVisitor { marker: PhantomData };
++                deserializer.deserialize_map(visitor)
++            }
++        }
++    }
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++map_impl!(
++    BTreeMap<K: Ord, V>,
++    map,
++    BTreeMap::new(),
++    BTreeMap::new());
++
++#[cfg(feature = "std")]
++map_impl!(
++    HashMap<K: Eq + Hash, V, S: BuildHasher + Default>,
++    map,
++    HashMap::with_hasher(S::default()),
++    HashMap::with_capacity_and_hasher(size_hint::cautious(map.size_hint()), S::default()));
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(feature = "std")]
++macro_rules! parse_impl {
++    ($ty:ty) => {
++        impl<'de> Deserialize<'de> for $ty {
++            fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
++            where
++                D: Deserializer<'de>,
++            {
++                let s = try!(String::deserialize(deserializer));
++                s.parse().map_err(Error::custom)
++            }
++        }
++    }
++}
++
++#[cfg(feature = "std")]
++parse_impl!(net::IpAddr);
++
++#[cfg(feature = "std")]
++parse_impl!(net::Ipv4Addr);
++
++#[cfg(feature = "std")]
++parse_impl!(net::Ipv6Addr);
++
++#[cfg(feature = "std")]
++parse_impl!(net::SocketAddr);
++
++#[cfg(feature = "std")]
++parse_impl!(net::SocketAddrV4);
++
++#[cfg(feature = "std")]
++parse_impl!(net::SocketAddrV6);
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(feature = "std")]
++struct PathVisitor;
++
++#[cfg(feature = "std")]
++impl<'a> Visitor<'a> for PathVisitor {
++    type Value = &'a Path;
++
++    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter.write_str("a borrowed path")
++    }
++
++    fn visit_borrowed_str<E>(self, v: &'a str) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        Ok(v.as_ref())
++    }
++
++    fn visit_borrowed_bytes<E>(self, v: &'a [u8]) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        str::from_utf8(v)
++            .map(AsRef::as_ref)
++            .map_err(|_| Error::invalid_value(Unexpected::Bytes(v), &self))
++    }
++}
++
++#[cfg(feature = "std")]
++impl<'de: 'a, 'a> Deserialize<'de> for &'a Path {
++    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        deserializer.deserialize_str(PathVisitor)
++    }
++}
++
++#[cfg(feature = "std")]
++struct PathBufVisitor;
++
++#[cfg(feature = "std")]
++impl<'de> Visitor<'de> for PathBufVisitor {
++    type Value = PathBuf;
++
++    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter.write_str("path string")
++    }
++
++    fn visit_str<E>(self, v: &str) -> Result<PathBuf, E>
++    where
++        E: Error,
++    {
++        Ok(From::from(v))
++    }
++
++    fn visit_string<E>(self, v: String) -> Result<PathBuf, E>
++    where
++        E: Error,
++    {
++        Ok(From::from(v))
++    }
++}
++
++#[cfg(feature = "std")]
++impl<'de> Deserialize<'de> for PathBuf {
++    fn deserialize<D>(deserializer: D) -> Result<PathBuf, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        deserializer.deserialize_string(PathBufVisitor)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++// If this were outside of the serde crate, it would just use:
++//
++//    #[derive(Deserialize)]
++//    #[serde(variant_identifier)]
++#[cfg(all(feature = "std", any(unix, windows)))]
++enum OsStringKind {
++    Unix,
++    Windows,
++}
++
++#[cfg(all(feature = "std", any(unix, windows)))]
++static OSSTR_VARIANTS: &'static [&'static str] = &["Unix", "Windows"];
++
++#[cfg(all(feature = "std", any(unix, windows)))]
++impl<'de> Deserialize<'de> for OsStringKind {
++    fn deserialize<D>(deserializer: D) -> Result<OsStringKind, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        struct KindVisitor;
++
++        impl<'de> Visitor<'de> for KindVisitor {
++            type Value = OsStringKind;
++
++            fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                formatter.write_str("`Unix` or `Windows`")
++            }
++
++            fn visit_u32<E>(self, value: u32) -> Result<OsStringKind, E>
++            where
++                E: Error,
++            {
++                match value {
++                    0 => Ok(OsStringKind::Unix),
++                    1 => Ok(OsStringKind::Windows),
++                    _ => Err(Error::invalid_value(Unexpected::Unsigned(value as u64), &self),),
++                }
++            }
++
++            fn visit_str<E>(self, value: &str) -> Result<OsStringKind, E>
++            where
++                E: Error,
++            {
++                match value {
++                    "Unix" => Ok(OsStringKind::Unix),
++                    "Windows" => Ok(OsStringKind::Windows),
++                    _ => Err(Error::unknown_variant(value, OSSTR_VARIANTS)),
++                }
++            }
++
++            fn visit_bytes<E>(self, value: &[u8]) -> Result<OsStringKind, E>
++            where
++                E: Error,
++            {
++                match value {
++                    b"Unix" => Ok(OsStringKind::Unix),
++                    b"Windows" => Ok(OsStringKind::Windows),
++                    _ => {
++                        match str::from_utf8(value) {
++                            Ok(value) => Err(Error::unknown_variant(value, OSSTR_VARIANTS)),
++                            Err(_) => Err(Error::invalid_value(Unexpected::Bytes(value), &self)),
++                        }
++                    }
++                }
++            }
++        }
++
++        deserializer.deserialize_identifier(KindVisitor)
++    }
++}
++
++#[cfg(all(feature = "std", any(unix, windows)))]
++struct OsStringVisitor;
++
++#[cfg(all(feature = "std", any(unix, windows)))]
++impl<'de> Visitor<'de> for OsStringVisitor {
++    type Value = OsString;
++
++    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter.write_str("os string")
++    }
++
++    #[cfg(unix)]
++    fn visit_enum<A>(self, data: A) -> Result<OsString, A::Error>
++    where
++        A: EnumAccess<'de>,
++    {
++        use std::os::unix::ffi::OsStringExt;
++
++        match try!(data.variant()) {
++            (OsStringKind::Unix, v) => v.newtype_variant().map(OsString::from_vec),
++            (OsStringKind::Windows, _) => Err(Error::custom("cannot deserialize Windows OS string on Unix",),),
++        }
++    }
++
++    #[cfg(windows)]
++    fn visit_enum<A>(self, data: A) -> Result<OsString, A::Error>
++    where
++        A: EnumAccess<'de>,
++    {
++        use std::os::windows::ffi::OsStringExt;
++
++        match try!(data.variant()) {
++            (OsStringKind::Windows, v) => {
++                v.newtype_variant::<Vec<u16>>()
++                    .map(|vec| OsString::from_wide(&vec))
++            }
++            (OsStringKind::Unix, _) => Err(Error::custom("cannot deserialize Unix OS string on Windows",),),
++        }
++    }
++}
++
++#[cfg(all(feature = "std", any(unix, windows)))]
++impl<'de> Deserialize<'de> for OsString {
++    fn deserialize<D>(deserializer: D) -> Result<OsString, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        deserializer.deserialize_enum("OsString", OSSTR_VARIANTS, OsStringVisitor)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++forwarded_impl!((T), Box<T>, Box::new);
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++forwarded_impl!((T), Box<[T]>, Vec::into_boxed_slice);
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++forwarded_impl!((), Box<str>, String::into_boxed_str);
++
++#[cfg(all(feature = "rc", any(feature = "std", feature = "alloc")))]
++forwarded_impl!((T), Arc<T>, Arc::new);
++
++#[cfg(all(feature = "rc", any(feature = "std", feature = "alloc")))]
++forwarded_impl!((T), Rc<T>, Rc::new);
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++impl<'de, 'a, T: ?Sized> Deserialize<'de> for Cow<'a, T>
++where
++    T: ToOwned,
++    T::Owned: Deserialize<'de>,
++{
++    #[inline]
++    fn deserialize<D>(deserializer: D) -> Result<Cow<'a, T>, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        T::Owned::deserialize(deserializer).map(Cow::Owned)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++impl<'de, T> Deserialize<'de> for Cell<T>
++where
++    T: Deserialize<'de> + Copy,
++{
++    fn deserialize<D>(deserializer: D) -> Result<Cell<T>, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        T::deserialize(deserializer).map(Cell::new)
++    }
++}
++
++forwarded_impl!((T), RefCell<T>, RefCell::new);
++
++#[cfg(feature = "std")]
++forwarded_impl!((T), Mutex<T>, Mutex::new);
++
++#[cfg(feature = "std")]
++forwarded_impl!((T), RwLock<T>, RwLock::new);
++
++////////////////////////////////////////////////////////////////////////////////
++
++// This is a cleaned-up version of the impl generated by:
++//
++//     #[derive(Deserialize)]
++//     #[serde(deny_unknown_fields)]
++//     struct Duration {
++//         secs: u64,
++//         nanos: u32,
++//     }
++#[cfg(feature = "std")]
++impl<'de> Deserialize<'de> for Duration {
++    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        // If this were outside of the serde crate, it would just use:
++        //
++        //    #[derive(Deserialize)]
++        //    #[serde(field_identifier, rename_all = "lowercase")]
++        enum Field {
++            Secs,
++            Nanos,
++        };
++
++        impl<'de> Deserialize<'de> for Field {
++            fn deserialize<D>(deserializer: D) -> Result<Field, D::Error>
++            where
++                D: Deserializer<'de>,
++            {
++                struct FieldVisitor;
++
++                impl<'de> Visitor<'de> for FieldVisitor {
++                    type Value = Field;
++
++                    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                        formatter.write_str("`secs` or `nanos`")
++                    }
++
++                    fn visit_str<E>(self, value: &str) -> Result<Field, E>
++                    where
++                        E: Error,
++                    {
++                        match value {
++                            "secs" => Ok(Field::Secs),
++                            "nanos" => Ok(Field::Nanos),
++                            _ => Err(Error::unknown_field(value, FIELDS)),
++                        }
++                    }
++
++                    fn visit_bytes<E>(self, value: &[u8]) -> Result<Field, E>
++                    where
++                        E: Error,
++                    {
++                        match value {
++                            b"secs" => Ok(Field::Secs),
++                            b"nanos" => Ok(Field::Nanos),
++                            _ => {
++                                let value = String::from_utf8_lossy(value);
++                                Err(Error::unknown_field(&value, FIELDS))
++                            }
++                        }
++                    }
++                }
++
++                deserializer.deserialize_identifier(FieldVisitor)
++            }
++        }
++
++        struct DurationVisitor;
++
++        impl<'de> Visitor<'de> for DurationVisitor {
++            type Value = Duration;
++
++            fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                formatter.write_str("struct Duration")
++            }
++
++            fn visit_seq<A>(self, mut seq: A) -> Result<Duration, A::Error>
++            where
++                A: SeqAccess<'de>,
++            {
++                let secs: u64 = match try!(seq.next_element()) {
++                    Some(value) => value,
++                    None => {
++                        return Err(Error::invalid_length(0, &self));
++                    }
++                };
++                let nanos: u32 = match try!(seq.next_element()) {
++                    Some(value) => value,
++                    None => {
++                        return Err(Error::invalid_length(1, &self));
++                    }
++                };
++                Ok(Duration::new(secs, nanos))
++            }
++
++            fn visit_map<A>(self, mut map: A) -> Result<Duration, A::Error>
++            where
++                A: MapAccess<'de>,
++            {
++                let mut secs: Option<u64> = None;
++                let mut nanos: Option<u32> = None;
++                while let Some(key) = try!(map.next_key()) {
++                    match key {
++                        Field::Secs => {
++                            if secs.is_some() {
++                                return Err(<A::Error as Error>::duplicate_field("secs"));
++                            }
++                            secs = Some(try!(map.next_value()));
++                        }
++                        Field::Nanos => {
++                            if nanos.is_some() {
++                                return Err(<A::Error as Error>::duplicate_field("nanos"));
++                            }
++                            nanos = Some(try!(map.next_value()));
++                        }
++                    }
++                }
++                let secs = match secs {
++                    Some(secs) => secs,
++                    None => return Err(<A::Error as Error>::missing_field("secs")),
++                };
++                let nanos = match nanos {
++                    Some(nanos) => nanos,
++                    None => return Err(<A::Error as Error>::missing_field("nanos")),
++                };
++                Ok(Duration::new(secs, nanos))
++            }
++        }
++
++        const FIELDS: &'static [&'static str] = &["secs", "nanos"];
++        deserializer.deserialize_struct("Duration", FIELDS, DurationVisitor)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(feature = "std")]
++impl<'de> Deserialize<'de> for SystemTime {
++    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        // Reuse duration
++        enum Field {
++            Secs,
++            Nanos,
++        };
++
++        impl<'de> Deserialize<'de> for Field {
++            fn deserialize<D>(deserializer: D) -> Result<Field, D::Error>
++            where
++                D: Deserializer<'de>,
++            {
++                struct FieldVisitor;
++
++                impl<'de> Visitor<'de> for FieldVisitor {
++                    type Value = Field;
++
++                    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                        formatter.write_str("`secs_since_epoch` or `nanos_since_epoch`")
++                    }
++
++                    fn visit_str<E>(self, value: &str) -> Result<Field, E>
++                    where
++                        E: Error,
++                    {
++                        match value {
++                            "secs_since_epoch" => Ok(Field::Secs),
++                            "nanos_since_epoch" => Ok(Field::Nanos),
++                            _ => Err(Error::unknown_field(value, FIELDS)),
++                        }
++                    }
++
++                    fn visit_bytes<E>(self, value: &[u8]) -> Result<Field, E>
++                    where
++                        E: Error,
++                    {
++                        match value {
++                            b"secs_since_epoch" => Ok(Field::Secs),
++                            b"nanos_since_epoch" => Ok(Field::Nanos),
++                            _ => {
++                                let value = String::from_utf8_lossy(value);
++                                Err(Error::unknown_field(&value, FIELDS))
++                            }
++                        }
++                    }
++                }
++
++                deserializer.deserialize_identifier(FieldVisitor)
++            }
++        }
++
++        struct DurationVisitor;
++
++        impl<'de> Visitor<'de> for DurationVisitor {
++            type Value = Duration;
++
++            fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                formatter.write_str("struct SystemTime")
++            }
++
++            fn visit_seq<A>(self, mut seq: A) -> Result<Duration, A::Error>
++            where
++                A: SeqAccess<'de>,
++            {
++                let secs: u64 = match try!(seq.next_element()) {
++                    Some(value) => value,
++                    None => {
++                        return Err(Error::invalid_length(0, &self));
++                    }
++                };
++                let nanos: u32 = match try!(seq.next_element()) {
++                    Some(value) => value,
++                    None => {
++                        return Err(Error::invalid_length(1, &self));
++                    }
++                };
++                Ok(Duration::new(secs, nanos))
++            }
++
++            fn visit_map<A>(self, mut map: A) -> Result<Duration, A::Error>
++            where
++                A: MapAccess<'de>,
++            {
++                let mut secs: Option<u64> = None;
++                let mut nanos: Option<u32> = None;
++                while let Some(key) = try!(map.next_key()) {
++                    match key {
++                        Field::Secs => {
++                            if secs.is_some() {
++                                return Err(<A::Error as Error>::duplicate_field("secs_since_epoch"));
++                            }
++                            secs = Some(try!(map.next_value()));
++                        }
++                        Field::Nanos => {
++                            if nanos.is_some() {
++                                return Err(<A::Error as Error>::duplicate_field("nanos_since_epoch"));
++                            }
++                            nanos = Some(try!(map.next_value()));
++                        }
++                    }
++                }
++                let secs = match secs {
++                    Some(secs) => secs,
++                    None => return Err(<A::Error as Error>::missing_field("secs_since_epoch")),
++                };
++                let nanos = match nanos {
++                    Some(nanos) => nanos,
++                    None => return Err(<A::Error as Error>::missing_field("nanos_since_epoch")),
++                };
++                Ok(Duration::new(secs, nanos))
++            }
++        }
++
++        const FIELDS: &'static [&'static str] = &["secs_since_epoch", "nanos_since_epoch"];
++        let duration = try!(deserializer.deserialize_struct("SystemTime", FIELDS, DurationVisitor));
++        Ok(UNIX_EPOCH + duration)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++// Similar to:
++//
++//     #[derive(Deserialize)]
++//     #[serde(deny_unknown_fields)]
++//     struct Range {
++//         start: u64,
++//         end: u32,
++//     }
++#[cfg(feature = "std")]
++impl<'de, Idx> Deserialize<'de> for ops::Range<Idx>
++where
++    Idx: Deserialize<'de>,
++{
++    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        // If this were outside of the serde crate, it would just use:
++        //
++        //    #[derive(Deserialize)]
++        //    #[serde(field_identifier, rename_all = "lowercase")]
++        enum Field {
++            Start,
++            End,
++        };
++
++        impl<'de> Deserialize<'de> for Field {
++            fn deserialize<D>(deserializer: D) -> Result<Field, D::Error>
++            where
++                D: Deserializer<'de>,
++            {
++                struct FieldVisitor;
++
++                impl<'de> Visitor<'de> for FieldVisitor {
++                    type Value = Field;
++
++                    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                        formatter.write_str("`start` or `end`")
++                    }
++
++                    fn visit_str<E>(self, value: &str) -> Result<Field, E>
++                    where
++                        E: Error,
++                    {
++                        match value {
++                            "start" => Ok(Field::Start),
++                            "end" => Ok(Field::End),
++                            _ => Err(Error::unknown_field(value, FIELDS)),
++                        }
++                    }
++
++                    fn visit_bytes<E>(self, value: &[u8]) -> Result<Field, E>
++                    where
++                        E: Error,
++                    {
++                        match value {
++                            b"start" => Ok(Field::Start),
++                            b"end" => Ok(Field::End),
++                            _ => {
++                                let value = String::from_utf8_lossy(value);
++                                Err(Error::unknown_field(&value, FIELDS))
++                            }
++                        }
++                    }
++                }
++
++                deserializer.deserialize_identifier(FieldVisitor)
++            }
++        }
++
++        struct RangeVisitor<Idx> {
++            phantom: PhantomData<Idx>,
++        }
++
++        impl<'de, Idx> Visitor<'de> for RangeVisitor<Idx>
++        where
++            Idx: Deserialize<'de>,
++        {
++            type Value = ops::Range<Idx>;
++
++            fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                formatter.write_str("struct Range")
++            }
++
++            fn visit_seq<A>(self, mut seq: A) -> Result<ops::Range<Idx>, A::Error>
++            where
++                A: SeqAccess<'de>,
++            {
++                let start: Idx = match try!(seq.next_element()) {
++                    Some(value) => value,
++                    None => {
++                        return Err(Error::invalid_length(0, &self));
++                    }
++                };
++                let end: Idx = match try!(seq.next_element()) {
++                    Some(value) => value,
++                    None => {
++                        return Err(Error::invalid_length(1, &self));
++                    }
++                };
++                Ok(start..end)
++            }
++
++            fn visit_map<A>(self, mut map: A) -> Result<ops::Range<Idx>, A::Error>
++            where
++                A: MapAccess<'de>,
++            {
++                let mut start: Option<Idx> = None;
++                let mut end: Option<Idx> = None;
++                while let Some(key) = try!(map.next_key()) {
++                    match key {
++                        Field::Start => {
++                            if start.is_some() {
++                                return Err(<A::Error as Error>::duplicate_field("start"));
++                            }
++                            start = Some(try!(map.next_value()));
++                        }
++                        Field::End => {
++                            if end.is_some() {
++                                return Err(<A::Error as Error>::duplicate_field("end"));
++                            }
++                            end = Some(try!(map.next_value()));
++                        }
++                    }
++                }
++                let start = match start {
++                    Some(start) => start,
++                    None => return Err(<A::Error as Error>::missing_field("start")),
++                };
++                let end = match end {
++                    Some(end) => end,
++                    None => return Err(<A::Error as Error>::missing_field("end")),
++                };
++                Ok(start..end)
++            }
++        }
++
++        const FIELDS: &'static [&'static str] = &["start", "end"];
++        deserializer.deserialize_struct("Range", FIELDS, RangeVisitor { phantom: PhantomData })
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(feature = "unstable")]
++impl<'de, T> Deserialize<'de> for NonZero<T>
++where
++    T: Deserialize<'de> + Zeroable,
++{
++    fn deserialize<D>(deserializer: D) -> Result<NonZero<T>, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        let value = try!(Deserialize::deserialize(deserializer));
++        match NonZero::new(value) {
++            Some(nonzero) => Ok(nonzero),
++            None => Err(Error::custom("expected a non-zero value")),
++        }
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++impl<'de, T, E> Deserialize<'de> for Result<T, E>
++where
++    T: Deserialize<'de>,
++    E: Deserialize<'de>,
++{
++    fn deserialize<D>(deserializer: D) -> Result<Result<T, E>, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        // If this were outside of the serde crate, it would just use:
++        //
++        //    #[derive(Deserialize)]
++        //    #[serde(variant_identifier)]
++        enum Field {
++            Ok,
++            Err,
++        }
++
++        impl<'de> Deserialize<'de> for Field {
++            #[inline]
++            fn deserialize<D>(deserializer: D) -> Result<Field, D::Error>
++            where
++                D: Deserializer<'de>,
++            {
++                struct FieldVisitor;
++
++                impl<'de> Visitor<'de> for FieldVisitor {
++                    type Value = Field;
++
++                    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                        formatter.write_str("`Ok` or `Err`")
++                    }
++
++                    fn visit_u32<E>(self, value: u32) -> Result<Field, E>
++                    where
++                        E: Error,
++                    {
++                        match value {
++                            0 => Ok(Field::Ok),
++                            1 => Ok(Field::Err),
++                            _ => {
++                                Err(Error::invalid_value(Unexpected::Unsigned(value as u64), &self),)
++                            }
++                        }
++                    }
++
++                    fn visit_str<E>(self, value: &str) -> Result<Field, E>
++                    where
++                        E: Error,
++                    {
++                        match value {
++                            "Ok" => Ok(Field::Ok),
++                            "Err" => Ok(Field::Err),
++                            _ => Err(Error::unknown_variant(value, VARIANTS)),
++                        }
++                    }
++
++                    fn visit_bytes<E>(self, value: &[u8]) -> Result<Field, E>
++                    where
++                        E: Error,
++                    {
++                        match value {
++                            b"Ok" => Ok(Field::Ok),
++                            b"Err" => Ok(Field::Err),
++                            _ => {
++                                match str::from_utf8(value) {
++                                    Ok(value) => Err(Error::unknown_variant(value, VARIANTS)),
++                                    Err(_) => {
++                                        Err(Error::invalid_value(Unexpected::Bytes(value), &self))
++                                    }
++                                }
++                            }
++                        }
++                    }
++                }
++
++                deserializer.deserialize_identifier(FieldVisitor)
++            }
++        }
++
++        struct ResultVisitor<T, E>(PhantomData<Result<T, E>>);
++
++        impl<'de, T, E> Visitor<'de> for ResultVisitor<T, E>
++        where
++            T: Deserialize<'de>,
++            E: Deserialize<'de>,
++        {
++            type Value = Result<T, E>;
++
++            fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                formatter.write_str("enum Result")
++            }
++
++            fn visit_enum<A>(self, data: A) -> Result<Result<T, E>, A::Error>
++            where
++                A: EnumAccess<'de>,
++            {
++                match try!(data.variant()) {
++                    (Field::Ok, v) => v.newtype_variant().map(Ok),
++                    (Field::Err, v) => v.newtype_variant().map(Err),
++                }
++            }
++        }
++
++        const VARIANTS: &'static [&'static str] = &["Ok", "Err"];
++
++        deserializer.deserialize_enum("Result", VARIANTS, ResultVisitor(PhantomData))
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3d8c1583a2692329fd568aefe341b2e7ab1f58b3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1945 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Generic data structure deserialization framework.
++//!
++//! The two most important traits in this module are [`Deserialize`] and
++//! [`Deserializer`].
++//!
++//!  - **A type that implements `Deserialize` is a data structure** that can be
++//!    deserialized from any data format supported by Serde, and conversely
++//!  - **A type that implements `Deserializer` is a data format** that can
++//!    deserialize any data structure supported by Serde.
++//!
++//! # The Deserialize trait
++//!
++//! Serde provides [`Deserialize`] implementations for many Rust primitive and
++//! standard library types. The complete list is below. All of these can be
++//! deserialized using Serde out of the box.
++//!
++//! Additionally, Serde provides a procedural macro called [`serde_derive`] to
++//! automatically generate [`Deserialize`] implementations for structs and enums
++//! in your program. See the [codegen section of the manual] for how to use
++//! this.
++//!
++//! In rare cases it may be necessary to implement [`Deserialize`] manually for
++//! some type in your program. See the [Implementing `Deserialize`] section of
++//! the manual for more about this.
++//!
++//! Third-party crates may provide [`Deserialize`] implementations for types
++//! that they expose. For example the [`linked-hash-map`] crate provides a
++//! [`LinkedHashMap<K, V>`] type that is deserializable by Serde because the
++//! crate provides an implementation of [`Deserialize`] for it.
++//!
++//! # The Deserializer trait
++//!
++//! [`Deserializer`] implementations are provided by third-party crates, for
++//! example [`serde_json`], [`serde_yaml`] and [`bincode`].
++//!
++//! A partial list of well-maintained formats is given on the [Serde
++//! website][data formats].
++//!
++//! # Implementations of Deserialize provided by Serde
++//!
++//! This is a slightly different set of types than what is supported for
++//! serialization. Some types can be serialized by Serde but not deserialized.
++//! One example is `OsStr`.
++//!
++//!  - **Primitive types**:
++//!    - bool
++//!    - i8, i16, i32, i64, isize
++//!    - u8, u16, u32, u64, usize
++//!    - f32, f64
++//!    - char
++//!  - **Compound types**:
++//!    - [T; 0] through [T; 32]
++//!    - tuples up to size 16
++//!  - **Common standard library types**:
++//!    - String
++//!    - Option\<T\>
++//!    - Result\<T, E\>
++//!    - PhantomData\<T\>
++//!  - **Wrapper types**:
++//!    - Box\<T\>
++//!    - Box\<[T]\>
++//!    - Box\<str\>
++//!    - Rc\<T\>
++//!    - Arc\<T\>
++//!    - Cow\<'a, T\>
++//!    - Cell\<T\>
++//!    - RefCell\<T\>
++//!    - Mutex\<T\>
++//!    - RwLock\<T\>
++//!  - **Collection types**:
++//!    - BTreeMap\<K, V\>
++//!    - BTreeSet\<T\>
++//!    - BinaryHeap\<T\>
++//!    - HashMap\<K, V, H\>
++//!    - HashSet\<T, H\>
++//!    - LinkedList\<T\>
++//!    - VecDeque\<T\>
++//!    - Vec\<T\>
++//!    - EnumSet\<T\> (unstable)
++//!  - **Zero-copy types**:
++//!    - &str
++//!    - &[u8]
++//!  - **FFI types**:
++//!    - CString
++//!    - Box\<CStr\>
++//!    - OsString
++//!  - **Miscellaneous standard library types**:
++//!    - Duration
++//!    - SystemTime
++//!    - Path
++//!    - PathBuf
++//!    - Range\<T\>
++//!    - NonZero\<T\> (unstable)
++//!  - **Net types**:
++//!    - IpAddr
++//!    - Ipv4Addr
++//!    - Ipv6Addr
++//!    - SocketAddr
++//!    - SocketAddrV4
++//!    - SocketAddrV6
++//!
++//! [Implementing `Deserialize`]: https://serde.rs/impl-deserialize.html
++//! [`Deserialize`]: ../trait.Deserialize.html
++//! [`Deserializer`]: ../trait.Deserializer.html
++//! [`LinkedHashMap<K, V>`]: https://docs.rs/linked-hash-map/*/linked_hash_map/struct.LinkedHashMap.html
++//! [`bincode`]: https://github.com/TyOverby/bincode
++//! [`linked-hash-map`]: https://crates.io/crates/linked-hash-map
++//! [`serde_derive`]: https://crates.io/crates/serde_derive
++//! [`serde_json`]: https://github.com/serde-rs/json
++//! [`serde_yaml`]: https://github.com/dtolnay/serde-yaml
++//! [codegen section of the manual]: https://serde.rs/codegen.html
++//! [data formats]: https://serde.rs/#data-formats
++
++use lib::*;
++
++////////////////////////////////////////////////////////////////////////////////
++
++pub mod value;
++
++mod from_primitive;
++mod ignored_any;
++mod impls;
++mod utf8;
++
++pub use self::ignored_any::IgnoredAny;
++
++////////////////////////////////////////////////////////////////////////////////
++
++macro_rules! declare_error_trait {
++    (Error: Sized $(+ $($supertrait:ident)::+)*) => {
++        /// The `Error` trait allows `Deserialize` implementations to create descriptive
++        /// error messages belonging to the `Deserializer` against which they are
++        /// currently running.
++        ///
++        /// Every `Deserializer` declares an `Error` type that encompasses both
++        /// general-purpose deserialization errors as well as errors specific to the
++        /// particular deserialization format. For example the `Error` type of
++        /// `serde_json` can represent errors like an invalid JSON escape sequence or an
++        /// unterminated string literal, in addition to the error cases that are part of
++        /// this trait.
++        ///
++        /// Most deserializers should only need to provide the `Error::custom` method
++        /// and inherit the default behavior for the other methods.
++        pub trait Error: Sized $(+ $($supertrait)::+)* {
++            /// Raised when there is general error when deserializing a type.
++            ///
++            /// The message should not be capitalized and should not end with a period.
++            ///
++            /// ```rust
++            /// # use std::str::FromStr;
++            /// #
++            /// # struct IpAddr;
++            /// #
++            /// # impl FromStr for IpAddr {
++            /// #     type Err = String;
++            /// #
++            /// #     fn from_str(_: &str) -> Result<Self, String> {
++            /// #         unimplemented!()
++            /// #     }
++            /// # }
++            /// #
++            /// use serde::de::{self, Deserialize, Deserializer};
++            ///
++            /// impl<'de> Deserialize<'de> for IpAddr {
++            ///     fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
++            ///         where D: Deserializer<'de>
++            ///     {
++            ///         let s = try!(String::deserialize(deserializer));
++            ///         s.parse().map_err(de::Error::custom)
++            ///     }
++            /// }
++            /// ```
++            fn custom<T>(msg: T) -> Self
++            where
++                T: Display;
++
++            /// Raised when a `Deserialize` receives a type different from what it was
++            /// expecting.
++            ///
++            /// The `unexp` argument provides information about what type was received.
++            /// This is the type that was present in the input file or other source data
++            /// of the Deserializer.
++            ///
++            /// The `exp` argument provides information about what type was being
++            /// expected. This is the type that is written in the program.
++            ///
++            /// For example if we try to deserialize a String out of a JSON file
++            /// containing an integer, the unexpected type is the integer and the
++            /// expected type is the string.
++            fn invalid_type(unexp: Unexpected, exp: &Expected) -> Self {
++                Error::custom(format_args!("invalid type: {}, expected {}", unexp, exp))
++            }
++
++            /// Raised when a `Deserialize` receives a value of the right type but that
++            /// is wrong for some other reason.
++            ///
++            /// The `unexp` argument provides information about what value was received.
++            /// This is the value that was present in the input file or other source
++            /// data of the Deserializer.
++            ///
++            /// The `exp` argument provides information about what value was being
++            /// expected. This is the type that is written in the program.
++            ///
++            /// For example if we try to deserialize a String out of some binary data
++            /// that is not valid UTF-8, the unexpected value is the bytes and the
++            /// expected value is a string.
++            fn invalid_value(unexp: Unexpected, exp: &Expected) -> Self {
++                Error::custom(format_args!("invalid value: {}, expected {}", unexp, exp))
++            }
++
++            /// Raised when deserializing a sequence or map and the input data contains
++            /// too many or too few elements.
++            ///
++            /// The `len` argument is the number of elements encountered. The sequence
++            /// or map may have expected more arguments or fewer arguments.
++            ///
++            /// The `exp` argument provides information about what data was being
++            /// expected. For example `exp` might say that a tuple of size 6 was
++            /// expected.
++            fn invalid_length(len: usize, exp: &Expected) -> Self {
++                Error::custom(format_args!("invalid length {}, expected {}", len, exp))
++            }
++
++            /// Raised when a `Deserialize` enum type received a variant with an
++            /// unrecognized name.
++            fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self {
++                if expected.is_empty() {
++                    Error::custom(format_args!("unknown variant `{}`, there are no variants",
++                                               variant))
++                } else {
++                    Error::custom(format_args!("unknown variant `{}`, expected {}",
++                                               variant,
++                                               OneOf { names: expected }))
++                }
++            }
++
++            /// Raised when a `Deserialize` struct type received a field with an
++            /// unrecognized name.
++            fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self {
++                if expected.is_empty() {
++                    Error::custom(format_args!("unknown field `{}`, there are no fields",
++                                               field))
++                } else {
++                    Error::custom(format_args!("unknown field `{}`, expected {}",
++                                               field,
++                                               OneOf { names: expected }))
++                }
++            }
++
++            /// Raised when a `Deserialize` struct type expected to receive a required
++            /// field with a particular name but that field was not present in the
++            /// input.
++            fn missing_field(field: &'static str) -> Self {
++                Error::custom(format_args!("missing field `{}`", field))
++            }
++
++            /// Raised when a `Deserialize` struct type received more than one of the
++            /// same field.
++            fn duplicate_field(field: &'static str) -> Self {
++                Error::custom(format_args!("duplicate field `{}`", field))
++            }
++        }
++    }
++}
++
++#[cfg(feature = "std")]
++declare_error_trait!(Error: Sized + error::Error);
++
++#[cfg(not(feature = "std"))]
++declare_error_trait!(Error: Sized + Debug + Display);
++
++/// `Unexpected` represents an unexpected invocation of any one of the `Visitor`
++/// trait methods.
++///
++/// This is used as an argument to the `invalid_type`, `invalid_value`, and
++/// `invalid_length` methods of the `Error` trait to build error messages.
++///
++/// ```rust
++/// # use std::fmt;
++/// #
++/// # use serde::de::{self, Unexpected, Visitor};
++/// #
++/// # struct Example;
++/// #
++/// # impl<'de> Visitor<'de> for Example {
++/// #     type Value = ();
++/// #
++/// #     fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++/// #         write!(formatter, "definitely not a boolean")
++/// #     }
++/// #
++/// fn visit_bool<E>(self, v: bool) -> Result<Self::Value, E>
++///     where E: de::Error
++/// {
++///     Err(de::Error::invalid_type(Unexpected::Bool(v), &self))
++/// }
++/// # }
++/// ```
++#[derive(Copy, Clone, PartialEq, Debug)]
++pub enum Unexpected<'a> {
++    /// The input contained a boolean value that was not expected.
++    Bool(bool),
++
++    /// The input contained an unsigned integer `u8`, `u16`, `u32` or `u64` that
++    /// was not expected.
++    Unsigned(u64),
++
++    /// The input contained a signed integer `i8`, `i16`, `i32` or `i64` that
++    /// was not expected.
++    Signed(i64),
++
++    /// The input contained a floating point `f32` or `f64` that was not
++    /// expected.
++    Float(f64),
++
++    /// The input contained a `char` that was not expected.
++    Char(char),
++
++    /// The input contained a `&str` or `String` that was not expected.
++    Str(&'a str),
++
++    /// The input contained a `&[u8]` or `Vec<u8>` that was not expected.
++    Bytes(&'a [u8]),
++
++    /// The input contained a unit `()` that was not expected.
++    Unit,
++
++    /// The input contained an `Option<T>` that was not expected.
++    Option,
++
++    /// The input contained a newtype struct that was not expected.
++    NewtypeStruct,
++
++    /// The input contained a sequence that was not expected.
++    Seq,
++
++    /// The input contained a map that was not expected.
++    Map,
++
++    /// The input contained an enum that was not expected.
++    Enum,
++
++    /// The input contained a unit variant that was not expected.
++    UnitVariant,
++
++    /// The input contained a newtype variant that was not expected.
++    NewtypeVariant,
++
++    /// The input contained a tuple variant that was not expected.
++    TupleVariant,
++
++    /// The input contained a struct variant that was not expected.
++    StructVariant,
++
++    /// A message stating what uncategorized thing the input contained that was
++    /// not expected.
++    ///
++    /// The message should be a noun or noun phrase, not capitalized and without
++    /// a period. An example message is "unoriginal superhero".
++    Other(&'a str),
++}
++
++impl<'a> fmt::Display for Unexpected<'a> {
++    fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> {
++        use self::Unexpected::*;
++        match *self {
++            Bool(b) => write!(formatter, "boolean `{}`", b),
++            Unsigned(i) => write!(formatter, "integer `{}`", i),
++            Signed(i) => write!(formatter, "integer `{}`", i),
++            Float(f) => write!(formatter, "floating point `{}`", f),
++            Char(c) => write!(formatter, "character `{}`", c),
++            Str(s) => write!(formatter, "string {:?}", s),
++            Bytes(_) => write!(formatter, "byte array"),
++            Unit => write!(formatter, "unit value"),
++            Option => write!(formatter, "Option value"),
++            NewtypeStruct => write!(formatter, "newtype struct"),
++            Seq => write!(formatter, "sequence"),
++            Map => write!(formatter, "map"),
++            Enum => write!(formatter, "enum"),
++            UnitVariant => write!(formatter, "unit variant"),
++            NewtypeVariant => write!(formatter, "newtype variant"),
++            TupleVariant => write!(formatter, "tuple variant"),
++            StructVariant => write!(formatter, "struct variant"),
++            Other(other) => formatter.write_str(other),
++        }
++    }
++}
++
++/// `Expected` represents an explanation of what data a `Visitor` was expecting
++/// to receive.
++///
++/// This is used as an argument to the `invalid_type`, `invalid_value`, and
++/// `invalid_length` methods of the `Error` trait to build error messages. The
++/// message should be a noun or noun phrase that completes the sentence "This
++/// Visitor expects to receive ...", for example the message could be "an
++/// integer between 0 and 64". The message should not be capitalized and should
++/// not end with a period.
++///
++/// Within the context of a `Visitor` implementation, the `Visitor` itself
++/// (`&self`) is an implementation of this trait.
++///
++/// ```rust
++/// # use std::fmt;
++/// #
++/// # use serde::de::{self, Unexpected, Visitor};
++/// #
++/// # struct Example;
++/// #
++/// # impl<'de> Visitor<'de> for Example {
++/// #     type Value = ();
++/// #
++/// #     fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++/// #         write!(formatter, "definitely not a boolean")
++/// #     }
++/// #
++/// fn visit_bool<E>(self, v: bool) -> Result<Self::Value, E>
++///     where E: de::Error
++/// {
++///     Err(de::Error::invalid_type(Unexpected::Bool(v), &self))
++/// }
++/// # }
++/// ```
++///
++/// Outside of a `Visitor`, `&"..."` can be used.
++///
++/// ```rust
++/// # use serde::de::{self, Unexpected};
++/// #
++/// # fn example<E>() -> Result<(), E>
++/// #     where E: de::Error
++/// # {
++/// #     let v = true;
++/// return Err(de::Error::invalid_type(Unexpected::Bool(v), &"a negative integer"));
++/// # }
++/// ```
++pub trait Expected {
++    /// Format an explanation of what data was being expected. Same signature as
++    /// the `Display` and `Debug` traits.
++    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result;
++}
++
++impl<'de, T> Expected for T
++where
++    T: Visitor<'de>,
++{
++    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        self.expecting(formatter)
++    }
++}
++
++impl<'a> Expected for &'a str {
++    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter.write_str(self)
++    }
++}
++
++impl<'a> Display for Expected + 'a {
++    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        Expected::fmt(self, formatter)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// A **data structure** that can be deserialized from any data format supported
++/// by Serde.
++///
++/// Serde provides `Deserialize` implementations for many Rust primitive and
++/// standard library types. The complete list is [here][de]. All of these can
++/// be deserialized using Serde out of the box.
++///
++/// Additionally, Serde provides a procedural macro called `serde_derive` to
++/// automatically generate `Deserialize` implementations for structs and enums
++/// in your program. See the [codegen section of the manual][codegen] for how to
++/// use this.
++///
++/// In rare cases it may be necessary to implement `Deserialize` manually for
++/// some type in your program. See the [Implementing
++/// `Deserialize`][impl-deserialize] section of the manual for more about this.
++///
++/// Third-party crates may provide `Deserialize` implementations for types that
++/// they expose. For example the `linked-hash-map` crate provides a
++/// `LinkedHashMap<K, V>` type that is deserializable by Serde because the crate
++/// provides an implementation of `Deserialize` for it.
++///
++/// [de]: https://docs.serde.rs/serde/de/index.html
++/// [codegen]: https://serde.rs/codegen.html
++/// [impl-deserialize]: https://serde.rs/impl-deserialize.html
++pub trait Deserialize<'de>: Sized {
++    /// Deserialize this value from the given Serde deserializer.
++    ///
++    /// See the [Implementing `Deserialize`][impl-deserialize] section of the
++    /// manual for more information about how to implement this method.
++    ///
++    /// [impl-deserialize]: https://serde.rs/impl-deserialize.html
++    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
++    where
++        D: Deserializer<'de>;
++}
++
++/// A data structure that can be deserialized without borrowing any data from
++/// the deserializer.
++///
++/// This is primarily useful for trait bounds on functions. For example a
++/// `from_str` function may be able to deserialize a data structure that borrows
++/// from the input string, but a `from_reader` function may only deserialize
++/// owned data.
++///
++/// ```rust
++/// # use serde::de::{Deserialize, DeserializeOwned};
++/// # use std::io::{Read, Result};
++/// #
++/// # trait Ignore {
++/// fn from_str<'a, T>(s: &'a str) -> Result<T>
++///     where T: Deserialize<'a>;
++///
++/// fn from_reader<R, T>(rdr: R) -> Result<T>
++///     where R: Read,
++///           T: DeserializeOwned;
++/// # }
++/// ```
++pub trait DeserializeOwned: for<'de> Deserialize<'de> {}
++impl<T> DeserializeOwned for T
++where
++    T: for<'de> Deserialize<'de>,
++{
++}
++
++/// `DeserializeSeed` is the stateful form of the `Deserialize` trait. If you
++/// ever find yourself looking for a way to pass data into a `Deserialize` impl,
++/// this trait is the way to do it.
++///
++/// As one example of stateful deserialization consider deserializing a JSON
++/// array into an existing buffer. Using the `Deserialize` trait we could
++/// deserialize a JSON array into a `Vec<T>` but it would be a freshly allocated
++/// `Vec<T>`; there is no way for `Deserialize` to reuse a previously allocated
++/// buffer. Using `DeserializeSeed` instead makes this possible as in the
++/// example code below.
++///
++/// The canonical API for stateless deserialization looks like this:
++///
++/// ```rust
++/// # use serde::Deserialize;
++/// #
++/// # enum Error {}
++/// #
++/// fn func<'de, T: Deserialize<'de>>() -> Result<T, Error>
++/// # {
++/// #     unimplemented!()
++/// # }
++/// ```
++///
++/// Adjusting an API like this to support stateful deserialization is a matter
++/// of accepting a seed as input:
++///
++/// ```rust
++/// # use serde::de::DeserializeSeed;
++/// #
++/// # enum Error {}
++/// #
++/// fn func_seed<'de, T: DeserializeSeed<'de>>(seed: T) -> Result<T::Value, Error>
++/// # {
++/// #     let _ = seed;
++/// #     unimplemented!()
++/// # }
++/// ```
++///
++/// In practice the majority of deserialization is stateless. An API expecting a
++/// seed can be appeased by passing `std::marker::PhantomData` as a seed in the
++/// case of stateless deserialization.
++///
++/// # Example
++///
++/// Suppose we have JSON that looks like `[[1, 2], [3, 4, 5], [6]]` and we need
++/// to deserialize it into a flat representation like `vec![1, 2, 3, 4, 5, 6]`.
++/// Allocating a brand new `Vec<T>` for each subarray would be slow. Instead we
++/// would like to allocate a single `Vec<T>` and then deserialize each subarray
++/// into it. This requires stateful deserialization using the `DeserializeSeed`
++/// trait.
++///
++/// ```rust
++/// use std::fmt;
++/// use std::marker::PhantomData;
++///
++/// use serde::de::{Deserialize, DeserializeSeed, Deserializer, Visitor, SeqAccess};
++///
++/// // A DeserializeSeed implementation that uses stateful deserialization to
++/// // append array elements onto the end of an existing vector. The preexisting
++/// // state ("seed") in this case is the Vec<T>. The `deserialize` method of
++/// // `ExtendVec` will be traversing the inner arrays of the JSON input and
++/// // appending each integer into the existing Vec.
++/// struct ExtendVec<'a, T: 'a>(&'a mut Vec<T>);
++///
++/// impl<'de, 'a, T> DeserializeSeed<'de> for ExtendVec<'a, T>
++///     where T: Deserialize<'de>
++/// {
++///     // The return type of the `deserialize` method. This implementation
++///     // appends onto an existing vector but does not create any new data
++///     // structure, so the return type is ().
++///     type Value = ();
++///
++///     fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
++///         where D: Deserializer<'de>
++///     {
++///         // Visitor implementation that will walk an inner array of the JSON
++///         // input.
++///         struct ExtendVecVisitor<'a, T: 'a>(&'a mut Vec<T>);
++///
++///         impl<'de, 'a, T> Visitor<'de> for ExtendVecVisitor<'a, T>
++///             where T: Deserialize<'de>
++///         {
++///             type Value = ();
++///
++///             fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++///                 write!(formatter, "an array of integers")
++///             }
++///
++///             fn visit_seq<A>(self, mut seq: A) -> Result<(), A::Error>
++///                 where A: SeqAccess<'de>
++///             {
++///                 // Visit each element in the inner array and push it onto
++///                 // the existing vector.
++///                 while let Some(elem) = seq.next_element()? {
++///                     self.0.push(elem);
++///                 }
++///                 Ok(())
++///             }
++///         }
++///
++///         deserializer.deserialize_seq(ExtendVecVisitor(self.0))
++///     }
++/// }
++///
++/// // Visitor implementation that will walk the outer array of the JSON input.
++/// struct FlattenedVecVisitor<T>(PhantomData<T>);
++///
++/// impl<'de, T> Visitor<'de> for FlattenedVecVisitor<T>
++///     where T: Deserialize<'de>
++/// {
++///     // This Visitor constructs a single Vec<T> to hold the flattened
++///     // contents of the inner arrays.
++///     type Value = Vec<T>;
++///
++///     fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++///         write!(formatter, "an array of arrays")
++///     }
++///
++///     fn visit_seq<A>(self, mut seq: A) -> Result<Vec<T>, A::Error>
++///         where A: SeqAccess<'de>
++///     {
++///         // Create a single Vec to hold the flattened contents.
++///         let mut vec = Vec::new();
++///
++///         // Each iteration through this loop is one inner array.
++///         while let Some(()) = seq.next_element_seed(ExtendVec(&mut vec))? {
++///             // Nothing to do; inner array has been appended into `vec`.
++///         }
++///
++///         // Return the finished vec.
++///         Ok(vec)
++///     }
++/// }
++///
++/// # fn example<'de, D>(deserializer: D) -> Result<(), D::Error>
++/// #     where D: Deserializer<'de>
++/// # {
++/// let visitor = FlattenedVecVisitor(PhantomData);
++/// let flattened: Vec<u64> = deserializer.deserialize_seq(visitor)?;
++/// #     Ok(())
++/// # }
++/// ```
++pub trait DeserializeSeed<'de>: Sized {
++    /// The type produced by using this seed.
++    type Value;
++
++    /// Equivalent to the more common `Deserialize::deserialize` method, except
++    /// with some initial piece of data (the seed) passed in.
++    fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
++    where
++        D: Deserializer<'de>;
++}
++
++impl<'de, T> DeserializeSeed<'de> for PhantomData<T>
++where
++    T: Deserialize<'de>,
++{
++    type Value = T;
++
++    #[inline]
++    fn deserialize<D>(self, deserializer: D) -> Result<T, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        T::deserialize(deserializer)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// A **data format** that can deserialize any data structure supported by
++/// Serde.
++///
++/// The role of this trait is to define the deserialization half of the Serde
++/// data model, which is a way to categorize every Rust data type into one of 27
++/// possible types. Each method of the `Serializer` trait corresponds to one of
++/// the types of the data model.
++///
++/// Implementations of `Deserialize` map themselves into this data model by
++/// passing to the `Deserializer` a `Visitor` implementation that can receive
++/// these various types.
++///
++/// The types that make up the Serde data model are:
++///
++///  - **12 primitive types**
++///    - bool
++///    - i8, i16, i32, i64
++///    - u8, u16, u32, u64
++///    - f32, f64
++///    - char
++///  - **string**
++///    - UTF-8 bytes with a length and no null terminator.
++///    - When serializing, all strings are handled equally. When deserializing,
++///      there are three flavors of strings: transient, owned, and borrowed.
++///  - **byte array** - [u8]
++///    - Similar to strings, during deserialization byte arrays can be transient,
++///      owned, or borrowed.
++///  - **option**
++///    - Either none or some value.
++///  - **unit**
++///    - The type of `()` in Rust. It represents an anonymous value containing no
++///      data.
++///  - **unit_struct**
++///    - For example `struct Unit` or `PhantomData<T>`. It represents a named value
++///      containing no data.
++///  - **unit_variant**
++///    - For example the `E::A` and `E::B` in `enum E { A, B }`.
++///  - **newtype_struct**
++///    - For example `struct Millimeters(u8)`.
++///  - **newtype_variant**
++///    - For example the `E::N` in `enum E { N(u8) }`.
++///  - **seq**
++///    - A variably sized heterogeneous sequence of values, for example `Vec<T>` or
++///      `HashSet<T>`. When serializing, the length may or may not be known before
++///      iterating through all the data. When deserializing, the length is determined
++///      by looking at the serialized data.
++///  - **tuple**
++///    - A statically sized heterogeneous sequence of values for which the length
++///      will be known at deserialization time without looking at the serialized
++///      data, for example `(u8,)` or `(String, u64, Vec<T>)` or `[u64; 10]`.
++///  - **tuple_struct**
++///    - A named tuple, for example `struct Rgb(u8, u8, u8)`.
++///  - **tuple_variant**
++///    - For example the `E::T` in `enum E { T(u8, u8) }`.
++///  - **map**
++///    - A heterogeneous key-value pairing, for example `BTreeMap<K, V>`.
++///  - **struct**
++///    - A heterogeneous key-value pairing in which the keys are strings and will be
++///      known at deserialization time without looking at the serialized data, for
++///      example `struct S { r: u8, g: u8, b: u8 }`.
++///  - **struct_variant**
++///    - For example the `E::S` in `enum E { S { r: u8, g: u8, b: u8 } }`.
++///
++/// The `Deserializer` trait supports two entry point styles which enables
++/// different kinds of deserialization.
++///
++/// 1. The `deserialize` method. Self-describing data formats like JSON are able
++///    to look at the serialized data and tell what it represents. For example
++///    the JSON deserializer may see an opening curly brace (`{`) and know that
++///    it is seeing a map. If the data format supports
++///    `Deserializer::deserialize_any`, it will drive the Visitor using whatever
++///    type it sees in the input. JSON uses this approach when deserializing
++///    `serde_json::Value` which is an enum that can represent any JSON
++///    document. Without knowing what is in a JSON document, we can deserialize
++///    it to `serde_json::Value` by going through `Deserializer::deserialize_any`.
++///
++/// 2. The various `deserialize_*` methods. Non-self-describing formats like
++///    Bincode need to be told what is in the input in order to deserialize it.
++///    The `deserialize_*` methods are hints to the deserializer for how to
++///    interpret the next piece of input. Non-self-describing formats are not
++///    able to deserialize something like `serde_json::Value` which relies on
++///    `Deserializer::deserialize_any`.
++///
++/// When implementing `Deserialize`, you should avoid relying on
++/// `Deserializer::deserialize_any` unless you need to be told by the Deserializer
++/// what type is in the input. Know that relying on `Deserializer::deserialize_any`
++/// means your data type will be able to deserialize from self-describing
++/// formats only, ruling out Bincode and many others.
++pub trait Deserializer<'de>: Sized {
++    /// The error type that can be returned if some error occurs during
++    /// deserialization.
++    type Error: Error;
++
++    /// Require the `Deserializer` to figure out how to drive the visitor based
++    /// on what data type is in the input.
++    ///
++    /// When implementing `Deserialize`, you should avoid relying on
++    /// `Deserializer::deserialize_any` unless you need to be told by the
++    /// Deserializer what type is in the input. Know that relying on
++    /// `Deserializer::deserialize_any` means your data type will be able to
++    /// deserialize from self-describing formats only, ruling out Bincode and
++    /// many others.
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a `bool` value.
++    fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting an `i8` value.
++    fn deserialize_i8<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting an `i16` value.
++    fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting an `i32` value.
++    fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting an `i64` value.
++    fn deserialize_i64<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a `u8` value.
++    fn deserialize_u8<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a `u16` value.
++    fn deserialize_u16<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a `u32` value.
++    fn deserialize_u32<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a `u64` value.
++    fn deserialize_u64<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a `f32` value.
++    fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a `f64` value.
++    fn deserialize_f64<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a `char` value.
++    fn deserialize_char<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a string value and does
++    /// not benefit from taking ownership of buffered data owned by the
++    /// `Deserializer`.
++    ///
++    /// If the `Visitor` would benefit from taking ownership of `String` data,
++    /// indiciate this to the `Deserializer` by using `deserialize_string`
++    /// instead.
++    fn deserialize_str<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a string value and would
++    /// benefit from taking ownership of buffered data owned by the
++    /// `Deserializer`.
++    ///
++    /// If the `Visitor` would not benefit from taking ownership of `String`
++    /// data, indicate that to the `Deserializer` by using `deserialize_str`
++    /// instead.
++    fn deserialize_string<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a byte array and does not
++    /// benefit from taking ownership of buffered data owned by the
++    /// `Deserializer`.
++    ///
++    /// If the `Visitor` would benefit from taking ownership of `Vec<u8>` data,
++    /// indicate this to the `Deserializer` by using `deserialize_byte_buf`
++    /// instead.
++    fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a byte array and would
++    /// benefit from taking ownership of buffered data owned by the
++    /// `Deserializer`.
++    ///
++    /// If the `Visitor` would not benefit from taking ownership of `Vec<u8>`
++    /// data, indicate that to the `Deserializer` by using `deserialize_bytes`
++    /// instead.
++    fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting an optional value.
++    ///
++    /// This allows deserializers that encode an optional value as a nullable
++    /// value to convert the null value into `None` and a regular value into
++    /// `Some(value)`.
++    fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a unit value.
++    fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a unit struct with a
++    /// particular name.
++    fn deserialize_unit_struct<V>(
++        self,
++        name: &'static str,
++        visitor: V,
++    ) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a newtype struct with a
++    /// particular name.
++    fn deserialize_newtype_struct<V>(
++        self,
++        name: &'static str,
++        visitor: V,
++    ) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a sequence of values.
++    fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a sequence of values and
++    /// knows how many values there are without looking at the serialized data.
++    fn deserialize_tuple<V>(self, len: usize, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a tuple struct with a
++    /// particular name and number of fields.
++    fn deserialize_tuple_struct<V>(
++        self,
++        name: &'static str,
++        len: usize,
++        visitor: V,
++    ) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a map of key-value pairs.
++    fn deserialize_map<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting a struct with a particular
++    /// name and fields.
++    fn deserialize_struct<V>(
++        self,
++        name: &'static str,
++        fields: &'static [&'static str],
++        visitor: V,
++    ) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting an enum value with a
++    /// particular name and possible variants.
++    fn deserialize_enum<V>(
++        self,
++        name: &'static str,
++        variants: &'static [&'static str],
++        visitor: V,
++    ) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type is expecting the name of a struct
++    /// field or the discriminant of an enum variant.
++    fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Hint that the `Deserialize` type needs to deserialize a value whose type
++    /// doesn't matter because it is ignored.
++    ///
++    /// Deserializers for non-self-describing formats may not support this mode.
++    fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// This trait represents a visitor that walks through a deserializer.
++///
++/// ```rust
++/// # use std::fmt;
++/// #
++/// # use serde::de::{self, Unexpected, Visitor};
++/// #
++/// /// A visitor that deserializes a long string - a string containing at least
++/// /// some minimum number of bytes.
++/// struct LongString {
++///     min: usize,
++/// }
++///
++/// impl<'de> Visitor<'de> for LongString {
++///     type Value = String;
++///
++///     fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++///         write!(formatter, "a string containing at least {} bytes", self.min)
++///     }
++///
++///     fn visit_str<E>(self, s: &str) -> Result<Self::Value, E>
++///         where E: de::Error
++///     {
++///         if s.len() >= self.min {
++///             Ok(s.to_owned())
++///         } else {
++///             Err(de::Error::invalid_value(Unexpected::Str(s), &self))
++///         }
++///     }
++/// }
++/// ```
++pub trait Visitor<'de>: Sized {
++    /// The value produced by this visitor.
++    type Value;
++
++    /// Format a message stating what data this Visitor expects to receive.
++    ///
++    /// This is used in error messages. The message should complete the sentence
++    /// "This Visitor expects to receive ...", for example the message could be
++    /// "an integer between 0 and 64". The message should not be capitalized and
++    /// should not end with a period.
++    ///
++    /// ```rust
++    /// # use std::fmt;
++    /// #
++    /// # struct S {
++    /// #     max: usize,
++    /// # }
++    /// #
++    /// # impl<'de> serde::de::Visitor<'de> for S {
++    /// #     type Value = ();
++    /// #
++    /// fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++    ///     write!(formatter, "an integer between 0 and {}", self.max)
++    /// }
++    /// # }
++    /// ```
++    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result;
++
++    /// The input contains a boolean.
++    ///
++    /// The default implementation fails with a type error.
++    fn visit_bool<E>(self, v: bool) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        Err(Error::invalid_type(Unexpected::Bool(v), &self))
++    }
++
++    /// The input contains an `i8`.
++    ///
++    /// The default implementation forwards to [`visit_i64`].
++    ///
++    /// [`visit_i64`]: #method.visit_i64
++    fn visit_i8<E>(self, v: i8) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        self.visit_i64(v as i64)
++    }
++
++    /// The input contains an `i16`.
++    ///
++    /// The default implementation forwards to [`visit_i64`].
++    ///
++    /// [`visit_i64`]: #method.visit_i64
++    fn visit_i16<E>(self, v: i16) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        self.visit_i64(v as i64)
++    }
++
++    /// The input contains an `i32`.
++    ///
++    /// The default implementation forwards to [`visit_i64`].
++    ///
++    /// [`visit_i64`]: #method.visit_i64
++    fn visit_i32<E>(self, v: i32) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        self.visit_i64(v as i64)
++    }
++
++    /// The input contains an `i32`.
++    ///
++    /// The default implementation fails with a type error.
++    fn visit_i64<E>(self, v: i64) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        Err(Error::invalid_type(Unexpected::Signed(v), &self))
++    }
++
++    /// The input contains a `u8`.
++    ///
++    /// The default implementation forwards to [`visit_u64`].
++    ///
++    /// [`visit_u64`]: #method.visit_u64
++    fn visit_u8<E>(self, v: u8) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        self.visit_u64(v as u64)
++    }
++
++    /// The input contains a `u16`.
++    ///
++    /// The default implementation forwards to [`visit_u64`].
++    ///
++    /// [`visit_u64`]: #method.visit_u64
++    fn visit_u16<E>(self, v: u16) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        self.visit_u64(v as u64)
++    }
++
++    /// The input contains a `u32`.
++    ///
++    /// The default implementation forwards to [`visit_u64`].
++    ///
++    /// [`visit_u64`]: #method.visit_u64
++    fn visit_u32<E>(self, v: u32) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        self.visit_u64(v as u64)
++    }
++
++    /// The input contains a `u64`.
++    ///
++    /// The default implementation fails with a type error.
++    fn visit_u64<E>(self, v: u64) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        Err(Error::invalid_type(Unexpected::Unsigned(v), &self))
++    }
++
++    /// The input contains an `f32`.
++    ///
++    /// The default implementation forwards to [`visit_f64`].
++    ///
++    /// [`visit_f64`]: #method.visit_f64
++    fn visit_f32<E>(self, v: f32) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        self.visit_f64(v as f64)
++    }
++
++    /// The input contains an `f64`.
++    ///
++    /// The default implementation fails with a type error.
++    fn visit_f64<E>(self, v: f64) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        Err(Error::invalid_type(Unexpected::Float(v), &self))
++    }
++
++    /// The input contains a `char`.
++    ///
++    /// The default implementation forwards to [`visit_str`] as a one-character
++    /// string.
++    ///
++    /// [`visit_str`]: #method.visit_str
++    #[inline]
++    fn visit_char<E>(self, v: char) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        self.visit_str(utf8::encode(v).as_str())
++    }
++
++    /// The input contains a string. The lifetime of the string is ephemeral and
++    /// it may be destroyed after this method returns.
++    ///
++    /// This method allows the `Deserializer` to avoid a copy by retaining
++    /// ownership of any buffered data. `Deserialize` implementations that do
++    /// not benefit from taking ownership of `String` data should indicate that
++    /// to the deserializer by using `Deserializer::deserialize_str` rather than
++    /// `Deserializer::deserialize_string`.
++    ///
++    /// It is never correct to implement `visit_string` without implementing
++    /// `visit_str`. Implement neither, both, or just `visit_str`.
++    fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        Err(Error::invalid_type(Unexpected::Str(v), &self))
++    }
++
++    /// The input contains a string that lives at least as long as the
++    /// `Deserializer`.
++    ///
++    /// This enables zero-copy deserialization of strings in some formats. For
++    /// example JSON input containing the JSON string `"borrowed"` can be
++    /// deserialized with zero copying into a `&'a str` as long as the input
++    /// data outlives `'a`.
++    ///
++    /// The default implementation forwards to `visit_str`.
++    #[inline]
++    fn visit_borrowed_str<E>(self, v: &'de str) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        self.visit_str(v)
++    }
++
++    /// The input contains a string and ownership of the string is being given
++    /// to the `Visitor`.
++    ///
++    /// This method allows the `Visitor` to avoid a copy by taking ownership of
++    /// a string created by the `Deserializer`. `Deserialize` implementations
++    /// that benefit from taking ownership of `String` data should indicate that
++    /// to the deserializer by using `Deserializer::deserialize_string` rather
++    /// than `Deserializer::deserialize_str`, although not every deserializer
++    /// will honor such a request.
++    ///
++    /// It is never correct to implement `visit_string` without implementing
++    /// `visit_str`. Implement neither, both, or just `visit_str`.
++    ///
++    /// The default implementation forwards to `visit_str` and then drops the
++    /// `String`.
++    #[inline]
++    #[cfg(any(feature = "std", feature = "alloc"))]
++    fn visit_string<E>(self, v: String) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        self.visit_str(&v)
++    }
++
++    /// The input contains a byte array. The lifetime of the byte array is
++    /// ephemeral and it may be destroyed after this method returns.
++    ///
++    /// This method allows the `Deserializer` to avoid a copy by retaining
++    /// ownership of any buffered data. `Deserialize` implementations that do
++    /// not benefit from taking ownership of `Vec<u8>` data should indicate that
++    /// to the deserializer by using `Deserializer::deserialize_bytes` rather
++    /// than `Deserializer::deserialize_byte_buf`.
++    ///
++    /// It is never correct to implement `visit_byte_buf` without implementing
++    /// `visit_bytes`. Implement neither, both, or just `visit_bytes`.
++    fn visit_bytes<E>(self, v: &[u8]) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        let _ = v;
++        Err(Error::invalid_type(Unexpected::Bytes(v), &self))
++    }
++
++    /// The input contains a byte array that lives at least as long as the
++    /// `Deserializer`.
++    ///
++    /// This enables zero-copy deserialization of bytes in some formats. For
++    /// example Bincode data containing bytes can be deserialized with zero
++    /// copying into a `&'a [u8]` as long as the input data outlives `'a`.
++    ///
++    /// The default implementation forwards to `visit_bytes`.
++    #[inline]
++    fn visit_borrowed_bytes<E>(self, v: &'de [u8]) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        self.visit_bytes(v)
++    }
++
++    /// The input contains a byte array and ownership of the byte array is being
++    /// given to the `Visitor`.
++    ///
++    /// This method allows the `Visitor` to avoid a copy by taking ownership of
++    /// a byte buffer created by the `Deserializer`. `Deserialize`
++    /// implementations that benefit from taking ownership of `Vec<u8>` data
++    /// should indicate that to the deserializer by using
++    /// `Deserializer::deserialize_byte_buf` rather than
++    /// `Deserializer::deserialize_bytes`, although not every deserializer will
++    /// honor such a request.
++    ///
++    /// It is never correct to implement `visit_byte_buf` without implementing
++    /// `visit_bytes`. Implement neither, both, or just `visit_bytes`.
++    ///
++    /// The default implementation forwards to `visit_bytes` and then drops the
++    /// `Vec<u8>`.
++    #[cfg(any(feature = "std", feature = "alloc"))]
++    fn visit_byte_buf<E>(self, v: Vec<u8>) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        self.visit_bytes(&v)
++    }
++
++    /// The input contains an optional that is absent.
++    ///
++    /// The default implementation fails with a type error.
++    fn visit_none<E>(self) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        Err(Error::invalid_type(Unexpected::Option, &self))
++    }
++
++    /// The input contains an optional that is present.
++    ///
++    /// The default implementation fails with a type error.
++    fn visit_some<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        let _ = deserializer;
++        Err(Error::invalid_type(Unexpected::Option, &self))
++    }
++
++    /// The input contains a unit `()`.
++    ///
++    /// The default implementation fails with a type error.
++    fn visit_unit<E>(self) -> Result<Self::Value, E>
++    where
++        E: Error,
++    {
++        Err(Error::invalid_type(Unexpected::Unit, &self))
++    }
++
++    /// The input contains a newtype struct.
++    ///
++    /// The content of the newtype struct may be read from the given
++    /// `Deserializer`.
++    ///
++    /// The default implementation fails with a type error.
++    fn visit_newtype_struct<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
++    where
++        D: Deserializer<'de>,
++    {
++        let _ = deserializer;
++        Err(Error::invalid_type(Unexpected::NewtypeStruct, &self))
++    }
++
++    /// The input contains a sequence of elements.
++    ///
++    /// The default implementation fails with a type error.
++    fn visit_seq<A>(self, seq: A) -> Result<Self::Value, A::Error>
++    where
++        A: SeqAccess<'de>,
++    {
++        let _ = seq;
++        Err(Error::invalid_type(Unexpected::Seq, &self))
++    }
++
++    /// The input contains a key-value map.
++    ///
++    /// The default implementation fails with a type error.
++    fn visit_map<A>(self, map: A) -> Result<Self::Value, A::Error>
++    where
++        A: MapAccess<'de>,
++    {
++        let _ = map;
++        Err(Error::invalid_type(Unexpected::Map, &self))
++    }
++
++    /// The input contains an enum.
++    ///
++    /// The default implementation fails with a type error.
++    fn visit_enum<A>(self, data: A) -> Result<Self::Value, A::Error>
++    where
++        A: EnumAccess<'de>,
++    {
++        let _ = data;
++        Err(Error::invalid_type(Unexpected::Enum, &self))
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// Provides a `Visitor` access to each element of a sequence in the input.
++///
++/// This is a trait that a `Deserializer` passes to a `Visitor` implementation,
++/// which deserializes each item in a sequence.
++pub trait SeqAccess<'de> {
++    /// The error type that can be returned if some error occurs during
++    /// deserialization.
++    type Error: Error;
++
++    /// This returns `Ok(Some(value))` for the next value in the sequence, or
++    /// `Ok(None)` if there are no more remaining items.
++    ///
++    /// `Deserialize` implementations should typically use
++    /// `SeqAcccess::next_element` instead.
++    fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Self::Error>
++    where
++        T: DeserializeSeed<'de>;
++
++    /// This returns `Ok(Some(value))` for the next value in the sequence, or
++    /// `Ok(None)` if there are no more remaining items.
++    ///
++    /// This method exists as a convenience for `Deserialize` implementations.
++    /// `SeqAccess` implementations should not override the default behavior.
++    #[inline]
++    fn next_element<T>(&mut self) -> Result<Option<T>, Self::Error>
++    where
++        T: Deserialize<'de>,
++    {
++        self.next_element_seed(PhantomData)
++    }
++
++    /// Returns the number of elements remaining in the sequence, if known.
++    #[inline]
++    fn size_hint(&self) -> Option<usize> {
++        None
++    }
++}
++
++impl<'de, 'a, A> SeqAccess<'de> for &'a mut A
++where
++    A: SeqAccess<'de>,
++{
++    type Error = A::Error;
++
++    #[inline]
++    fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Self::Error>
++    where
++        T: DeserializeSeed<'de>,
++    {
++        (**self).next_element_seed(seed)
++    }
++
++    #[inline]
++    fn next_element<T>(&mut self) -> Result<Option<T>, Self::Error>
++    where
++        T: Deserialize<'de>,
++    {
++        (**self).next_element()
++    }
++
++    #[inline]
++    fn size_hint(&self) -> Option<usize> {
++        (**self).size_hint()
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// Provides a `Visitor` access to each entry of a map in the input.
++///
++/// This is a trait that a `Deserializer` passes to a `Visitor` implementation.
++pub trait MapAccess<'de> {
++    /// The error type that can be returned if some error occurs during
++    /// deserialization.
++    type Error: Error;
++
++    /// This returns `Ok(Some(key))` for the next key in the map, or `Ok(None)`
++    /// if there are no more remaining entries.
++    ///
++    /// `Deserialize` implementations should typically use
++    /// `MapAccess::next_key` or `MapAccess::next_entry` instead.
++    fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Self::Error>
++    where
++        K: DeserializeSeed<'de>;
++
++    /// This returns a `Ok(value)` for the next value in the map.
++    ///
++    /// `Deserialize` implementations should typically use
++    /// `MapAccess::next_value` instead.
++    ///
++    /// # Panics
++    ///
++    /// Calling `next_value_seed` before `next_key_seed` is incorrect and is
++    /// allowed to panic or return bogus results.
++    fn next_value_seed<V>(&mut self, seed: V) -> Result<V::Value, Self::Error>
++    where
++        V: DeserializeSeed<'de>;
++
++    /// This returns `Ok(Some((key, value)))` for the next (key-value) pair in
++    /// the map, or `Ok(None)` if there are no more remaining items.
++    ///
++    /// `MapAccess` implementations should override the default behavior if a
++    /// more efficient implementation is possible.
++    ///
++    /// `Deserialize` implementations should typically use
++    /// `MapAccess::next_entry` instead.
++    #[inline]
++    fn next_entry_seed<K, V>(
++        &mut self,
++        kseed: K,
++        vseed: V,
++    ) -> Result<Option<(K::Value, V::Value)>, Self::Error>
++    where
++        K: DeserializeSeed<'de>,
++        V: DeserializeSeed<'de>,
++    {
++        match try!(self.next_key_seed(kseed)) {
++            Some(key) => {
++                let value = try!(self.next_value_seed(vseed));
++                Ok(Some((key, value)))
++            }
++            None => Ok(None),
++        }
++    }
++
++    /// This returns `Ok(Some(key))` for the next key in the map, or `Ok(None)`
++    /// if there are no more remaining entries.
++    ///
++    /// This method exists as a convenience for `Deserialize` implementations.
++    /// `MapAccess` implementations should not override the default behavior.
++    #[inline]
++    fn next_key<K>(&mut self) -> Result<Option<K>, Self::Error>
++    where
++        K: Deserialize<'de>,
++    {
++        self.next_key_seed(PhantomData)
++    }
++
++    /// This returns a `Ok(value)` for the next value in the map.
++    ///
++    /// This method exists as a convenience for `Deserialize` implementations.
++    /// `MapAccess` implementations should not override the default behavior.
++    ///
++    /// # Panics
++    ///
++    /// Calling `next_value` before `next_key` is incorrect and is allowed to
++    /// panic or return bogus results.
++    #[inline]
++    fn next_value<V>(&mut self) -> Result<V, Self::Error>
++    where
++        V: Deserialize<'de>,
++    {
++        self.next_value_seed(PhantomData)
++    }
++
++    /// This returns `Ok(Some((key, value)))` for the next (key-value) pair in
++    /// the map, or `Ok(None)` if there are no more remaining items.
++    ///
++    /// This method exists as a convenience for `Deserialize` implementations.
++    /// `MapAccess` implementations should not override the default behavior.
++    #[inline]
++    fn next_entry<K, V>(&mut self) -> Result<Option<(K, V)>, Self::Error>
++    where
++        K: Deserialize<'de>,
++        V: Deserialize<'de>,
++    {
++        self.next_entry_seed(PhantomData, PhantomData)
++    }
++
++    /// Returns the number of entries remaining in the map, if known.
++    #[inline]
++    fn size_hint(&self) -> Option<usize> {
++        None
++    }
++}
++
++impl<'de, 'a, A> MapAccess<'de> for &'a mut A
++where
++    A: MapAccess<'de>,
++{
++    type Error = A::Error;
++
++    #[inline]
++    fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Self::Error>
++    where
++        K: DeserializeSeed<'de>,
++    {
++        (**self).next_key_seed(seed)
++    }
++
++    #[inline]
++    fn next_value_seed<V>(&mut self, seed: V) -> Result<V::Value, Self::Error>
++    where
++        V: DeserializeSeed<'de>,
++    {
++        (**self).next_value_seed(seed)
++    }
++
++    #[inline]
++    fn next_entry_seed<K, V>(
++        &mut self,
++        kseed: K,
++        vseed: V,
++    ) -> Result<Option<(K::Value, V::Value)>, Self::Error>
++    where
++        K: DeserializeSeed<'de>,
++        V: DeserializeSeed<'de>,
++    {
++        (**self).next_entry_seed(kseed, vseed)
++    }
++
++    #[inline]
++    fn next_entry<K, V>(&mut self) -> Result<Option<(K, V)>, Self::Error>
++    where
++        K: Deserialize<'de>,
++        V: Deserialize<'de>,
++    {
++        (**self).next_entry()
++    }
++
++    #[inline]
++    fn next_key<K>(&mut self) -> Result<Option<K>, Self::Error>
++    where
++        K: Deserialize<'de>,
++    {
++        (**self).next_key()
++    }
++
++    #[inline]
++    fn next_value<V>(&mut self) -> Result<V, Self::Error>
++    where
++        V: Deserialize<'de>,
++    {
++        (**self).next_value()
++    }
++
++    #[inline]
++    fn size_hint(&self) -> Option<usize> {
++        (**self).size_hint()
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// Provides a `Visitor` access to the data of an enum in the input.
++///
++/// `EnumAccess` is created by the `Deserializer` and passed to the
++/// `Visitor` in order to identify which variant of an enum to deserialize.
++pub trait EnumAccess<'de>: Sized {
++    /// The error type that can be returned if some error occurs during
++    /// deserialization.
++    type Error: Error;
++    /// The `Visitor` that will be used to deserialize the content of the enum
++    /// variant.
++    type Variant: VariantAccess<'de, Error = Self::Error>;
++
++    /// `variant` is called to identify which variant to deserialize.
++    ///
++    /// `Deserialize` implementations should typically use `EnumAccess::variant`
++    /// instead.
++    fn variant_seed<V>(self, seed: V) -> Result<(V::Value, Self::Variant), Self::Error>
++    where
++        V: DeserializeSeed<'de>;
++
++    /// `variant` is called to identify which variant to deserialize.
++    ///
++    /// This method exists as a convenience for `Deserialize` implementations.
++    /// `EnumAccess` implementations should not override the default behavior.
++    #[inline]
++    fn variant<V>(self) -> Result<(V, Self::Variant), Self::Error>
++    where
++        V: Deserialize<'de>,
++    {
++        self.variant_seed(PhantomData)
++    }
++}
++
++/// `VariantAccess` is a visitor that is created by the `Deserializer` and
++/// passed to the `Deserialize` to deserialize the content of a particular enum
++/// variant.
++pub trait VariantAccess<'de>: Sized {
++    /// The error type that can be returned if some error occurs during
++    /// deserialization. Must match the error type of our `EnumAccess`.
++    type Error: Error;
++
++    /// Called when deserializing a variant with no values.
++    ///
++    /// If the data contains a different type of variant, the following
++    /// `invalid_type` error should be constructed:
++    ///
++    /// ```rust
++    /// # use serde::de::{self, value, DeserializeSeed, Visitor, VariantAccess, Unexpected};
++    /// #
++    /// # struct X;
++    /// #
++    /// # impl<'de> VariantAccess<'de> for X {
++    /// #     type Error = value::Error;
++    /// #
++    /// fn unit_variant(self) -> Result<(), Self::Error> {
++    ///     // What the data actually contained; suppose it is a tuple variant.
++    ///     let unexp = Unexpected::TupleVariant;
++    ///     Err(de::Error::invalid_type(unexp, &"unit variant"))
++    /// }
++    /// #
++    /// #     fn newtype_variant_seed<T>(self, _: T) -> Result<T::Value, Self::Error>
++    /// #         where T: DeserializeSeed<'de>
++    /// #     { unimplemented!() }
++    /// #
++    /// #     fn tuple_variant<V>(self, _: usize, _: V) -> Result<V::Value, Self::Error>
++    /// #         where V: Visitor<'de>
++    /// #     { unimplemented!() }
++    /// #
++    /// #     fn struct_variant<V>(self, _: &[&str], _: V) -> Result<V::Value, Self::Error>
++    /// #         where V: Visitor<'de>
++    /// #     { unimplemented!() }
++    /// # }
++    /// ```
++    fn unit_variant(self) -> Result<(), Self::Error>;
++
++    /// Called when deserializing a variant with a single value.
++    ///
++    /// `Deserialize` implementations should typically use
++    /// `VariantAccess::newtype_variant` instead.
++    ///
++    /// If the data contains a different type of variant, the following
++    /// `invalid_type` error should be constructed:
++    ///
++    /// ```rust
++    /// # use serde::de::{self, value, DeserializeSeed, Visitor, VariantAccess, Unexpected};
++    /// #
++    /// # struct X;
++    /// #
++    /// # impl<'de> VariantAccess<'de> for X {
++    /// #     type Error = value::Error;
++    /// #
++    /// #     fn unit_variant(self) -> Result<(), Self::Error> {
++    /// #         unimplemented!()
++    /// #     }
++    /// #
++    /// fn newtype_variant_seed<T>(self, _seed: T) -> Result<T::Value, Self::Error>
++    ///     where T: DeserializeSeed<'de>
++    /// {
++    ///     // What the data actually contained; suppose it is a unit variant.
++    ///     let unexp = Unexpected::UnitVariant;
++    ///     Err(de::Error::invalid_type(unexp, &"newtype variant"))
++    /// }
++    /// #
++    /// #     fn tuple_variant<V>(self, _: usize, _: V) -> Result<V::Value, Self::Error>
++    /// #         where V: Visitor<'de>
++    /// #     { unimplemented!() }
++    /// #
++    /// #     fn struct_variant<V>(self, _: &[&str], _: V) -> Result<V::Value, Self::Error>
++    /// #         where V: Visitor<'de>
++    /// #     { unimplemented!() }
++    /// # }
++    /// ```
++    fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value, Self::Error>
++    where
++        T: DeserializeSeed<'de>;
++
++    /// Called when deserializing a variant with a single value.
++    ///
++    /// This method exists as a convenience for `Deserialize` implementations.
++    /// `VariantAccess` implementations should not override the default
++    /// behavior.
++    #[inline]
++    fn newtype_variant<T>(self) -> Result<T, Self::Error>
++    where
++        T: Deserialize<'de>,
++    {
++        self.newtype_variant_seed(PhantomData)
++    }
++
++    /// Called when deserializing a tuple-like variant.
++    ///
++    /// The `len` is the number of fields expected in the tuple variant.
++    ///
++    /// If the data contains a different type of variant, the following
++    /// `invalid_type` error should be constructed:
++    ///
++    /// ```rust
++    /// # use serde::de::{self, value, DeserializeSeed, Visitor, VariantAccess, Unexpected};
++    /// #
++    /// # struct X;
++    /// #
++    /// # impl<'de> VariantAccess<'de> for X {
++    /// #     type Error = value::Error;
++    /// #
++    /// #     fn unit_variant(self) -> Result<(), Self::Error> {
++    /// #         unimplemented!()
++    /// #     }
++    /// #
++    /// #     fn newtype_variant_seed<T>(self, _: T) -> Result<T::Value, Self::Error>
++    /// #         where T: DeserializeSeed<'de>
++    /// #     { unimplemented!() }
++    /// #
++    /// fn tuple_variant<V>(self,
++    ///                         _len: usize,
++    ///                         _visitor: V) -> Result<V::Value, Self::Error>
++    ///     where V: Visitor<'de>
++    /// {
++    ///     // What the data actually contained; suppose it is a unit variant.
++    ///     let unexp = Unexpected::UnitVariant;
++    ///     Err(de::Error::invalid_type(unexp, &"tuple variant"))
++    /// }
++    /// #
++    /// #     fn struct_variant<V>(self, _: &[&str], _: V) -> Result<V::Value, Self::Error>
++    /// #         where V: Visitor<'de>
++    /// #     { unimplemented!() }
++    /// # }
++    /// ```
++    fn tuple_variant<V>(self, len: usize, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++
++    /// Called when deserializing a struct-like variant.
++    ///
++    /// The `fields` are the names of the fields of the struct variant.
++    ///
++    /// If the data contains a different type of variant, the following
++    /// `invalid_type` error should be constructed:
++    ///
++    /// ```rust
++    /// # use serde::de::{self, value, DeserializeSeed, Visitor, VariantAccess, Unexpected};
++    /// #
++    /// # struct X;
++    /// #
++    /// # impl<'de> VariantAccess<'de> for X {
++    /// #     type Error = value::Error;
++    /// #
++    /// #     fn unit_variant(self) -> Result<(), Self::Error> {
++    /// #         unimplemented!()
++    /// #     }
++    /// #
++    /// #     fn newtype_variant_seed<T>(self, _: T) -> Result<T::Value, Self::Error>
++    /// #         where T: DeserializeSeed<'de>
++    /// #     { unimplemented!() }
++    /// #
++    /// #     fn tuple_variant<V>(self, _: usize, _: V) -> Result<V::Value, Self::Error>
++    /// #         where V: Visitor<'de>
++    /// #     { unimplemented!() }
++    /// #
++    /// fn struct_variant<V>(self,
++    ///                          _fields: &'static [&'static str],
++    ///                          _visitor: V) -> Result<V::Value, Self::Error>
++    ///     where V: Visitor<'de>
++    /// {
++    ///     // What the data actually contained; suppose it is a unit variant.
++    ///     let unexp = Unexpected::UnitVariant;
++    ///     Err(de::Error::invalid_type(unexp, &"struct variant"))
++    /// }
++    /// # }
++    /// ```
++    fn struct_variant<V>(
++        self,
++        fields: &'static [&'static str],
++        visitor: V,
++    ) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>;
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// Converts an existing value into a `Deserializer` from which other values can
++/// be deserialized.
++///
++/// ```rust
++/// #[macro_use]
++/// extern crate serde_derive;
++///
++/// extern crate serde;
++///
++/// use std::str::FromStr;
++/// use serde::de::{value, Deserialize, IntoDeserializer};
++///
++/// #[derive(Deserialize)]
++/// enum Setting {
++///     On,
++///     Off,
++/// }
++///
++/// impl FromStr for Setting {
++///     type Err = value::Error;
++///
++///     fn from_str(s: &str) -> Result<Self, Self::Err> {
++///         Self::deserialize(s.into_deserializer())
++///     }
++/// }
++/// #
++/// # fn main() {}
++/// ```
++pub trait IntoDeserializer<'de, E: Error = value::Error> {
++    /// The type of the deserializer being converted into.
++    type Deserializer: Deserializer<'de, Error = E>;
++
++    /// Convert this value into a deserializer.
++    fn into_deserializer(self) -> Self::Deserializer;
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// Used in error messages.
++///
++/// - expected `a`
++/// - expected `a` or `b`
++/// - expected one of `a`, `b`, `c`
++///
++/// The slice of names must not be empty.
++struct OneOf {
++    names: &'static [&'static str],
++}
++
++impl Display for OneOf {
++    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        match self.names.len() {
++            0 => panic!(), // special case elsewhere
++            1 => write!(formatter, "`{}`", self.names[0]),
++            2 => write!(formatter, "`{}` or `{}`", self.names[0], self.names[1]),
++            _ => {
++                try!(write!(formatter, "one of "));
++                for (i, alt) in self.names.iter().enumerate() {
++                    if i > 0 {
++                        try!(write!(formatter, ", "));
++                    }
++                    try!(write!(formatter, "`{}`", alt));
++                }
++                Ok(())
++            }
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..37221a1e6f8a7200bed50a91aecfd02badff2713
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,54 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use lib::*;
++
++const TAG_CONT: u8 = 0b1000_0000;
++const TAG_TWO_B: u8 = 0b1100_0000;
++const TAG_THREE_B: u8 = 0b1110_0000;
++const TAG_FOUR_B: u8 = 0b1111_0000;
++const MAX_ONE_B: u32 = 0x80;
++const MAX_TWO_B: u32 = 0x800;
++const MAX_THREE_B: u32 = 0x10000;
++
++#[inline]
++pub fn encode(c: char) -> Encode {
++    let code = c as u32;
++    let mut buf = [0; 4];
++    let pos = if code < MAX_ONE_B {
++        buf[3] = code as u8;
++        3
++    } else if code < MAX_TWO_B {
++        buf[2] = (code >> 6 & 0x1F) as u8 | TAG_TWO_B;
++        buf[3] = (code & 0x3F) as u8 | TAG_CONT;
++        2
++    } else if code < MAX_THREE_B {
++        buf[1] = (code >> 12 & 0x0F) as u8 | TAG_THREE_B;
++        buf[2] = (code >> 6 & 0x3F) as u8 | TAG_CONT;
++        buf[3] = (code & 0x3F) as u8 | TAG_CONT;
++        1
++    } else {
++        buf[0] = (code >> 18 & 0x07) as u8 | TAG_FOUR_B;
++        buf[1] = (code >> 12 & 0x3F) as u8 | TAG_CONT;
++        buf[2] = (code >> 6 & 0x3F) as u8 | TAG_CONT;
++        buf[3] = (code & 0x3F) as u8 | TAG_CONT;
++        0
++    };
++    Encode { buf: buf, pos: pos }
++}
++
++pub struct Encode {
++    buf: [u8; 4],
++    pos: usize,
++}
++
++impl Encode {
++    pub fn as_str(&self) -> &str {
++        str::from_utf8(&self.buf[self.pos..]).unwrap()
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3575c53d8bfb412606980fa3082f4b02c5718bfd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1281 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Building blocks for deserializing basic values using the `IntoDeserializer`
++//! trait.
++//!
++//! ```rust
++//! #[macro_use]
++//! extern crate serde_derive;
++//!
++//! extern crate serde;
++//!
++//! use std::str::FromStr;
++//! use serde::de::{value, Deserialize, IntoDeserializer};
++//!
++//! #[derive(Deserialize)]
++//! enum Setting {
++//!     On,
++//!     Off,
++//! }
++//!
++//! impl FromStr for Setting {
++//!     type Err = value::Error;
++//!
++//!     fn from_str(s: &str) -> Result<Self, Self::Err> {
++//!         Self::deserialize(s.into_deserializer())
++//!     }
++//! }
++//! #
++//! # fn main() {}
++//! ```
++
++use lib::*;
++
++use de::{self, IntoDeserializer, Expected, SeqAccess};
++use private::de::size_hint;
++use ser;
++use self::private::{First, Second};
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// A minimal representation of all possible errors that can occur using the
++/// `IntoDeserializer` trait.
++#[derive(Clone, Debug, PartialEq)]
++pub struct Error {
++    err: ErrorImpl,
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++type ErrorImpl = Box<str>;
++#[cfg(not(any(feature = "std", feature = "alloc")))]
++type ErrorImpl = ();
++
++impl de::Error for Error {
++    #[cfg(any(feature = "std", feature = "alloc"))]
++    fn custom<T>(msg: T) -> Self
++    where
++        T: Display,
++    {
++        Error { err: msg.to_string().into_boxed_str() }
++    }
++
++    #[cfg(not(any(feature = "std", feature = "alloc")))]
++    fn custom<T>(msg: T) -> Self
++    where
++        T: Display,
++    {
++        let _ = msg;
++        Error { err: () }
++    }
++}
++
++impl ser::Error for Error {
++    fn custom<T>(msg: T) -> Self
++    where
++        T: Display,
++    {
++        de::Error::custom(msg)
++    }
++}
++
++impl Display for Error {
++    #[cfg(any(feature = "std", feature = "alloc"))]
++    fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> {
++        formatter.write_str(&self.err)
++    }
++
++    #[cfg(not(any(feature = "std", feature = "alloc")))]
++    fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> {
++        formatter.write_str("Serde deserialization error")
++    }
++}
++
++#[cfg(feature = "std")]
++impl error::Error for Error {
++    fn description(&self) -> &str {
++        &self.err
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++impl<'de, E> IntoDeserializer<'de, E> for ()
++where
++    E: de::Error,
++{
++    type Deserializer = UnitDeserializer<E>;
++
++    fn into_deserializer(self) -> UnitDeserializer<E> {
++        UnitDeserializer { marker: PhantomData }
++    }
++}
++
++/// A deserializer holding a `()`.
++#[derive(Clone, Debug)]
++pub struct UnitDeserializer<E> {
++    marker: PhantomData<E>,
++}
++
++impl<'de, E> de::Deserializer<'de> for UnitDeserializer<E>
++where
++    E: de::Error,
++{
++    type Error = E;
++
++    forward_to_deserialize_any! {
++        bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++        byte_buf unit unit_struct newtype_struct seq tuple tuple_struct map
++        struct enum identifier ignored_any
++    }
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        visitor.visit_unit()
++    }
++
++    fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        visitor.visit_none()
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++macro_rules! primitive_deserializer {
++    ($ty:ty, $doc:tt, $name:ident, $method:ident $($cast:tt)*) => {
++        #[doc = "A deserializer holding"]
++        #[doc = $doc]
++        #[derive(Clone, Debug)]
++        pub struct $name<E> {
++            value: $ty,
++            marker: PhantomData<E>
++        }
++
++        impl<'de, E> IntoDeserializer<'de, E> for $ty
++        where
++            E: de::Error,
++        {
++            type Deserializer = $name<E>;
++
++            fn into_deserializer(self) -> $name<E> {
++                $name {
++                    value: self,
++                    marker: PhantomData,
++                }
++            }
++        }
++
++        impl<'de, E> de::Deserializer<'de> for $name<E>
++        where
++            E: de::Error,
++        {
++            type Error = E;
++
++            forward_to_deserialize_any! {
++                bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++                byte_buf option unit unit_struct newtype_struct seq tuple
++                tuple_struct map struct enum identifier ignored_any
++            }
++
++            fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++            where
++                V: de::Visitor<'de>,
++            {
++                visitor.$method(self.value $($cast)*)
++            }
++        }
++    }
++}
++
++primitive_deserializer!(bool, "a `bool`.", BoolDeserializer, visit_bool);
++primitive_deserializer!(i8, "an `i8`.", I8Deserializer, visit_i8);
++primitive_deserializer!(i16, "an `i16`.", I16Deserializer, visit_i16);
++primitive_deserializer!(i32, "an `i32`.", I32Deserializer, visit_i32);
++primitive_deserializer!(i64, "an `i64`.", I64Deserializer, visit_i64);
++primitive_deserializer!(isize, "an `isize`.", IsizeDeserializer, visit_i64 as i64);
++primitive_deserializer!(u8, "a `u8`.", U8Deserializer, visit_u8);
++primitive_deserializer!(u16, "a `u16`.", U16Deserializer, visit_u16);
++primitive_deserializer!(u64, "a `u64`.", U64Deserializer, visit_u64);
++primitive_deserializer!(usize, "a `usize`.", UsizeDeserializer, visit_u64 as u64);
++primitive_deserializer!(f32, "an `f32`.", F32Deserializer, visit_f32);
++primitive_deserializer!(f64, "an `f64`.", F64Deserializer, visit_f64);
++primitive_deserializer!(char, "a `char`.", CharDeserializer, visit_char);
++
++/// A deserializer holding a `u32`.
++#[derive(Clone, Debug)]
++pub struct U32Deserializer<E> {
++    value: u32,
++    marker: PhantomData<E>,
++}
++
++impl<'de, E> IntoDeserializer<'de, E> for u32
++where
++    E: de::Error,
++{
++    type Deserializer = U32Deserializer<E>;
++
++    fn into_deserializer(self) -> U32Deserializer<E> {
++        U32Deserializer {
++            value: self,
++            marker: PhantomData,
++        }
++    }
++}
++
++impl<'de, E> de::Deserializer<'de> for U32Deserializer<E>
++where
++    E: de::Error,
++{
++    type Error = E;
++
++    forward_to_deserialize_any! {
++        bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++        byte_buf option unit unit_struct newtype_struct seq tuple tuple_struct
++        map struct identifier ignored_any
++    }
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        visitor.visit_u32(self.value)
++    }
++
++    fn deserialize_enum<V>(
++        self,
++        name: &str,
++        variants: &'static [&'static str],
++        visitor: V,
++    ) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        let _ = name;
++        let _ = variants;
++        visitor.visit_enum(self)
++    }
++}
++
++impl<'de, E> de::EnumAccess<'de> for U32Deserializer<E>
++where
++    E: de::Error,
++{
++    type Error = E;
++    type Variant = private::UnitOnly<E>;
++
++    fn variant_seed<T>(self, seed: T) -> Result<(T::Value, Self::Variant), Self::Error>
++    where
++        T: de::DeserializeSeed<'de>,
++    {
++        seed.deserialize(self).map(private::unit_only)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// A deserializer holding a `&str`.
++#[derive(Clone, Debug)]
++pub struct StrDeserializer<'a, E> {
++    value: &'a str,
++    marker: PhantomData<E>,
++}
++
++impl<'de, 'a, E> IntoDeserializer<'de, E> for &'a str
++where
++    E: de::Error,
++{
++    type Deserializer = StrDeserializer<'a, E>;
++
++    fn into_deserializer(self) -> StrDeserializer<'a, E> {
++        StrDeserializer {
++            value: self,
++            marker: PhantomData,
++        }
++    }
++}
++
++impl<'de, 'a, E> de::Deserializer<'de> for StrDeserializer<'a, E>
++where
++    E: de::Error,
++{
++    type Error = E;
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        visitor.visit_str(self.value)
++    }
++
++    fn deserialize_enum<V>(
++        self,
++        name: &str,
++        variants: &'static [&'static str],
++        visitor: V,
++    ) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        let _ = name;
++        let _ = variants;
++        visitor.visit_enum(self)
++    }
++
++    forward_to_deserialize_any! {
++        bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++        byte_buf option unit unit_struct newtype_struct seq tuple tuple_struct
++        map struct identifier ignored_any
++    }
++}
++
++impl<'de, 'a, E> de::EnumAccess<'de> for StrDeserializer<'a, E>
++where
++    E: de::Error,
++{
++    type Error = E;
++    type Variant = private::UnitOnly<E>;
++
++    fn variant_seed<T>(self, seed: T) -> Result<(T::Value, Self::Variant), Self::Error>
++    where
++        T: de::DeserializeSeed<'de>,
++    {
++        seed.deserialize(self).map(private::unit_only)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// A deserializer holding a `&str` with a lifetime tied to another
++/// deserializer.
++#[derive(Clone, Debug)]
++pub struct BorrowedStrDeserializer<'de, E> {
++    value: &'de str,
++    marker: PhantomData<E>,
++}
++
++impl<'de, E> BorrowedStrDeserializer<'de, E> {
++    /// Create a new borrowed deserializer from the given string.
++    pub fn new(value: &'de str) -> BorrowedStrDeserializer<'de, E> {
++        BorrowedStrDeserializer {
++            value: value,
++            marker: PhantomData,
++        }
++    }
++}
++
++impl<'de, E> de::Deserializer<'de> for BorrowedStrDeserializer<'de, E>
++where
++    E: de::Error,
++{
++    type Error = E;
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        visitor.visit_borrowed_str(self.value)
++    }
++
++    fn deserialize_enum<V>(
++        self,
++        name: &str,
++        variants: &'static [&'static str],
++        visitor: V,
++    ) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        let _ = name;
++        let _ = variants;
++        visitor.visit_enum(self)
++    }
++
++    forward_to_deserialize_any! {
++        bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++        byte_buf option unit unit_struct newtype_struct seq tuple tuple_struct
++        map struct identifier ignored_any
++    }
++}
++
++impl<'de, E> de::EnumAccess<'de> for BorrowedStrDeserializer<'de, E>
++where
++    E: de::Error,
++{
++    type Error = E;
++    type Variant = private::UnitOnly<E>;
++
++    fn variant_seed<T>(self, seed: T) -> Result<(T::Value, Self::Variant), Self::Error>
++    where
++        T: de::DeserializeSeed<'de>,
++    {
++        seed.deserialize(self).map(private::unit_only)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// A deserializer holding a `String`.
++#[cfg(any(feature = "std", feature = "alloc"))]
++#[derive(Clone, Debug)]
++pub struct StringDeserializer<E> {
++    value: String,
++    marker: PhantomData<E>,
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++impl<'de, E> IntoDeserializer<'de, E> for String
++where
++    E: de::Error,
++{
++    type Deserializer = StringDeserializer<E>;
++
++    fn into_deserializer(self) -> StringDeserializer<E> {
++        StringDeserializer {
++            value: self,
++            marker: PhantomData,
++        }
++    }
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++impl<'de, E> de::Deserializer<'de> for StringDeserializer<E>
++where
++    E: de::Error,
++{
++    type Error = E;
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        visitor.visit_string(self.value)
++    }
++
++    fn deserialize_enum<V>(
++        self,
++        name: &str,
++        variants: &'static [&'static str],
++        visitor: V,
++    ) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        let _ = name;
++        let _ = variants;
++        visitor.visit_enum(self)
++    }
++
++    forward_to_deserialize_any! {
++        bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++        byte_buf option unit unit_struct newtype_struct seq tuple tuple_struct
++        map struct identifier ignored_any
++    }
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++impl<'de, 'a, E> de::EnumAccess<'de> for StringDeserializer<E>
++where
++    E: de::Error,
++{
++    type Error = E;
++    type Variant = private::UnitOnly<E>;
++
++    fn variant_seed<T>(self, seed: T) -> Result<(T::Value, Self::Variant), Self::Error>
++    where
++        T: de::DeserializeSeed<'de>,
++    {
++        seed.deserialize(self).map(private::unit_only)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// A deserializer holding a `Cow<str>`.
++#[cfg(any(feature = "std", feature = "alloc"))]
++#[derive(Clone, Debug)]
++pub struct CowStrDeserializer<'a, E> {
++    value: Cow<'a, str>,
++    marker: PhantomData<E>,
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++impl<'de, 'a, E> IntoDeserializer<'de, E> for Cow<'a, str>
++where
++    E: de::Error,
++{
++    type Deserializer = CowStrDeserializer<'a, E>;
++
++    fn into_deserializer(self) -> CowStrDeserializer<'a, E> {
++        CowStrDeserializer {
++            value: self,
++            marker: PhantomData,
++        }
++    }
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++impl<'de, 'a, E> de::Deserializer<'de> for CowStrDeserializer<'a, E>
++where
++    E: de::Error,
++{
++    type Error = E;
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        match self.value {
++            Cow::Borrowed(string) => visitor.visit_str(string),
++            Cow::Owned(string) => visitor.visit_string(string),
++        }
++    }
++
++    fn deserialize_enum<V>(
++        self,
++        name: &str,
++        variants: &'static [&'static str],
++        visitor: V,
++    ) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        let _ = name;
++        let _ = variants;
++        visitor.visit_enum(self)
++    }
++
++    forward_to_deserialize_any! {
++        bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++        byte_buf option unit unit_struct newtype_struct seq tuple tuple_struct
++        map struct identifier ignored_any
++    }
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++impl<'de, 'a, E> de::EnumAccess<'de> for CowStrDeserializer<'a, E>
++where
++    E: de::Error,
++{
++    type Error = E;
++    type Variant = private::UnitOnly<E>;
++
++    fn variant_seed<T>(self, seed: T) -> Result<(T::Value, Self::Variant), Self::Error>
++    where
++        T: de::DeserializeSeed<'de>,
++    {
++        seed.deserialize(self).map(private::unit_only)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// A deserializer holding a `&[u8]` with a lifetime tied to another
++/// deserializer.
++#[derive(Clone, Debug)]
++pub struct BorrowedBytesDeserializer<'de, E> {
++    value: &'de [u8],
++    marker: PhantomData<E>,
++}
++
++impl<'de, E> BorrowedBytesDeserializer<'de, E> {
++    /// Create a new borrowed deserializer from the given byte slice.
++    pub fn new(value: &'de [u8]) -> BorrowedBytesDeserializer<'de, E> {
++        BorrowedBytesDeserializer {
++            value: value,
++            marker: PhantomData,
++        }
++    }
++}
++
++impl<'de, E> de::Deserializer<'de> for BorrowedBytesDeserializer<'de, E>
++where
++    E: de::Error,
++{
++    type Error = E;
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        visitor.visit_borrowed_bytes(self.value)
++    }
++
++    forward_to_deserialize_any! {
++        bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++        byte_buf option unit unit_struct newtype_struct seq tuple tuple_struct
++        map struct identifier ignored_any enum
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// A deserializer that iterates over a sequence.
++#[derive(Clone, Debug)]
++pub struct SeqDeserializer<I, E> {
++    iter: iter::Fuse<I>,
++    count: usize,
++    marker: PhantomData<E>,
++}
++
++impl<I, E> SeqDeserializer<I, E>
++where
++    I: Iterator,
++{
++    /// Construct a new `SeqDeserializer<I, E>`.
++    pub fn new(iter: I) -> Self {
++        SeqDeserializer {
++            iter: iter.fuse(),
++            count: 0,
++            marker: PhantomData,
++        }
++    }
++}
++
++impl<I, E> SeqDeserializer<I, E>
++where
++    I: Iterator,
++    E: de::Error,
++{
++    /// Check for remaining elements after passing a `SeqDeserializer` to
++    /// `Visitor::visit_seq`.
++    pub fn end(mut self) -> Result<(), E> {
++        let mut remaining = 0;
++        while self.iter.next().is_some() {
++            remaining += 1;
++        }
++        if remaining == 0 {
++            Ok(())
++        } else {
++            // First argument is the number of elements in the data, second
++            // argument is the number of elements expected by the Deserialize.
++            Err(de::Error::invalid_length(self.count + remaining, &ExpectedInSeq(self.count)),)
++        }
++    }
++}
++
++impl<'de, I, T, E> de::Deserializer<'de> for SeqDeserializer<I, E>
++where
++    I: Iterator<Item = T>,
++    T: IntoDeserializer<'de, E>,
++    E: de::Error,
++{
++    type Error = E;
++
++    fn deserialize_any<V>(mut self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        let v = try!(visitor.visit_seq(&mut self));
++        try!(self.end());
++        Ok(v)
++    }
++
++    forward_to_deserialize_any! {
++        bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++        byte_buf option unit unit_struct newtype_struct seq tuple tuple_struct
++        map struct enum identifier ignored_any
++    }
++}
++
++impl<'de, I, T, E> de::SeqAccess<'de> for SeqDeserializer<I, E>
++where
++    I: Iterator<Item = T>,
++    T: IntoDeserializer<'de, E>,
++    E: de::Error,
++{
++    type Error = E;
++
++    fn next_element_seed<V>(&mut self, seed: V) -> Result<Option<V::Value>, Self::Error>
++    where
++        V: de::DeserializeSeed<'de>,
++    {
++        match self.iter.next() {
++            Some(value) => {
++                self.count += 1;
++                seed.deserialize(value.into_deserializer()).map(Some)
++            }
++            None => Ok(None),
++        }
++    }
++
++    fn size_hint(&self) -> Option<usize> {
++        size_hint::from_bounds(&self.iter)
++    }
++}
++
++struct ExpectedInSeq(usize);
++
++impl Expected for ExpectedInSeq {
++    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        if self.0 == 1 {
++            write!(formatter, "1 element in sequence")
++        } else {
++            write!(formatter, "{} elements in sequence", self.0)
++        }
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++impl<'de, T, E> IntoDeserializer<'de, E> for Vec<T>
++where
++    T: IntoDeserializer<'de, E>,
++    E: de::Error,
++{
++    type Deserializer = SeqDeserializer<<Vec<T> as IntoIterator>::IntoIter, E>;
++
++    fn into_deserializer(self) -> Self::Deserializer {
++        SeqDeserializer::new(self.into_iter())
++    }
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++impl<'de, T, E> IntoDeserializer<'de, E> for BTreeSet<T>
++where
++    T: IntoDeserializer<'de, E> + Eq + Ord,
++    E: de::Error,
++{
++    type Deserializer = SeqDeserializer<<BTreeSet<T> as IntoIterator>::IntoIter, E>;
++
++    fn into_deserializer(self) -> Self::Deserializer {
++        SeqDeserializer::new(self.into_iter())
++    }
++}
++
++#[cfg(feature = "std")]
++impl<'de, T, E> IntoDeserializer<'de, E> for HashSet<T>
++where
++    T: IntoDeserializer<'de, E> + Eq + Hash,
++    E: de::Error,
++{
++    type Deserializer = SeqDeserializer<<HashSet<T> as IntoIterator>::IntoIter, E>;
++
++    fn into_deserializer(self) -> Self::Deserializer {
++        SeqDeserializer::new(self.into_iter())
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// A deserializer holding a `SeqAccess`.
++#[derive(Clone, Debug)]
++pub struct SeqAccessDeserializer<A> {
++    seq: A,
++}
++
++impl<A> SeqAccessDeserializer<A> {
++    /// Construct a new `SeqAccessDeserializer<A>`.
++    pub fn new(seq: A) -> Self {
++        SeqAccessDeserializer { seq: seq }
++    }
++}
++
++impl<'de, A> de::Deserializer<'de> for SeqAccessDeserializer<A>
++where
++    A: de::SeqAccess<'de>,
++{
++    type Error = A::Error;
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        visitor.visit_seq(self.seq)
++    }
++
++    forward_to_deserialize_any! {
++        bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++        byte_buf option unit unit_struct newtype_struct seq tuple tuple_struct
++        map struct enum identifier ignored_any
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// A deserializer that iterates over a map.
++pub struct MapDeserializer<'de, I, E>
++where
++    I: Iterator,
++    I::Item: private::Pair,
++{
++    iter: iter::Fuse<I>,
++    value: Option<Second<I::Item>>,
++    count: usize,
++    lifetime: PhantomData<&'de ()>,
++    error: PhantomData<E>,
++}
++
++impl<'de, I, E> MapDeserializer<'de, I, E>
++where
++    I: Iterator,
++    I::Item: private::Pair,
++{
++    /// Construct a new `MapDeserializer<I, E>`.
++    pub fn new(iter: I) -> Self {
++        MapDeserializer {
++            iter: iter.fuse(),
++            value: None,
++            count: 0,
++            lifetime: PhantomData,
++            error: PhantomData,
++        }
++    }
++}
++
++impl<'de, I, E> MapDeserializer<'de, I, E>
++where
++    I: Iterator,
++    I::Item: private::Pair,
++    E: de::Error,
++{
++    /// Check for remaining elements after passing a `MapDeserializer` to
++    /// `Visitor::visit_map`.
++    pub fn end(mut self) -> Result<(), E> {
++        let mut remaining = 0;
++        while self.iter.next().is_some() {
++            remaining += 1;
++        }
++        if remaining == 0 {
++            Ok(())
++        } else {
++            // First argument is the number of elements in the data, second
++            // argument is the number of elements expected by the Deserialize.
++            Err(de::Error::invalid_length(self.count + remaining, &ExpectedInMap(self.count)),)
++        }
++    }
++}
++
++impl<'de, I, E> MapDeserializer<'de, I, E>
++where
++    I: Iterator,
++    I::Item: private::Pair,
++{
++    fn next_pair(&mut self) -> Option<(First<I::Item>, Second<I::Item>)> {
++        match self.iter.next() {
++            Some(kv) => {
++                self.count += 1;
++                Some(private::Pair::split(kv))
++            }
++            None => None,
++        }
++    }
++}
++
++impl<'de, I, E> de::Deserializer<'de> for MapDeserializer<'de, I, E>
++where
++    I: Iterator,
++    I::Item: private::Pair,
++    First<I::Item>: IntoDeserializer<'de, E>,
++    Second<I::Item>: IntoDeserializer<'de, E>,
++    E: de::Error,
++{
++    type Error = E;
++
++    fn deserialize_any<V>(mut self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        let value = try!(visitor.visit_map(&mut self));
++        try!(self.end());
++        Ok(value)
++    }
++
++    fn deserialize_seq<V>(mut self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        let value = try!(visitor.visit_seq(&mut self));
++        try!(self.end());
++        Ok(value)
++    }
++
++    fn deserialize_tuple<V>(
++        self,
++        len: usize,
++        visitor: V,
++    ) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        let _ = len;
++        self.deserialize_seq(visitor)
++    }
++
++    forward_to_deserialize_any! {
++        bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++        byte_buf option unit unit_struct newtype_struct tuple_struct map struct
++        enum identifier ignored_any
++    }
++}
++
++impl<'de, I, E> de::MapAccess<'de> for MapDeserializer<'de, I, E>
++where
++    I: Iterator,
++    I::Item: private::Pair,
++    First<I::Item>: IntoDeserializer<'de, E>,
++    Second<I::Item>: IntoDeserializer<'de, E>,
++    E: de::Error,
++{
++    type Error = E;
++
++    fn next_key_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Self::Error>
++    where
++        T: de::DeserializeSeed<'de>,
++    {
++        match self.next_pair() {
++            Some((key, value)) => {
++                self.value = Some(value);
++                seed.deserialize(key.into_deserializer()).map(Some)
++            }
++            None => Ok(None),
++        }
++    }
++
++    fn next_value_seed<T>(&mut self, seed: T) -> Result<T::Value, Self::Error>
++    where
++        T: de::DeserializeSeed<'de>,
++    {
++        let value = self.value.take();
++        // Panic because this indicates a bug in the program rather than an
++        // expected failure.
++        let value = value.expect("MapAccess::visit_value called before visit_key");
++        seed.deserialize(value.into_deserializer())
++    }
++
++    fn next_entry_seed<TK, TV>(
++        &mut self,
++        kseed: TK,
++        vseed: TV,
++    ) -> Result<Option<(TK::Value, TV::Value)>, Self::Error>
++    where
++        TK: de::DeserializeSeed<'de>,
++        TV: de::DeserializeSeed<'de>,
++    {
++        match self.next_pair() {
++            Some((key, value)) => {
++                let key = try!(kseed.deserialize(key.into_deserializer()));
++                let value = try!(vseed.deserialize(value.into_deserializer()));
++                Ok(Some((key, value)))
++            }
++            None => Ok(None),
++        }
++    }
++
++    fn size_hint(&self) -> Option<usize> {
++        size_hint::from_bounds(&self.iter)
++    }
++}
++
++impl<'de, I, E> de::SeqAccess<'de> for MapDeserializer<'de, I, E>
++where
++    I: Iterator,
++    I::Item: private::Pair,
++    First<I::Item>: IntoDeserializer<'de, E>,
++    Second<I::Item>: IntoDeserializer<'de, E>,
++    E: de::Error,
++{
++    type Error = E;
++
++    fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Self::Error>
++    where
++        T: de::DeserializeSeed<'de>,
++    {
++        match self.next_pair() {
++            Some((k, v)) => {
++                let de = PairDeserializer(k, v, PhantomData);
++                seed.deserialize(de).map(Some)
++            }
++            None => Ok(None),
++        }
++    }
++
++    fn size_hint(&self) -> Option<usize> {
++        size_hint::from_bounds(&self.iter)
++    }
++}
++
++// Cannot #[derive(Clone)] because of the bound `Second<I::Item>: Clone`.
++impl<'de, I, E> Clone for MapDeserializer<'de, I, E>
++where
++    I: Iterator + Clone,
++    I::Item: private::Pair,
++    Second<I::Item>: Clone,
++{
++    fn clone(&self) -> Self {
++        MapDeserializer {
++            iter: self.iter.clone(),
++            value: self.value.clone(),
++            count: self.count,
++            lifetime: self.lifetime,
++            error: self.error,
++        }
++    }
++}
++
++// Cannot #[derive(Debug)] because of the bound `Second<I::Item>: Debug`.
++impl<'de, I, E> Debug for MapDeserializer<'de, I, E>
++where
++    I: Iterator + Debug,
++    I::Item: private::Pair,
++    Second<I::Item>: Debug,
++{
++    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter
++            .debug_struct("MapDeserializer")
++            .field("iter", &self.iter)
++            .field("value", &self.value)
++            .field("count", &self.count)
++            .field("lifetime", &self.lifetime)
++            .field("error", &self.error)
++            .finish()
++    }
++}
++
++// Used in the `impl SeqAccess for MapDeserializer` to visit the map as a
++// sequence of pairs.
++struct PairDeserializer<A, B, E>(A, B, PhantomData<E>);
++
++impl<'de, A, B, E> de::Deserializer<'de> for PairDeserializer<A, B, E>
++where
++    A: IntoDeserializer<'de, E>,
++    B: IntoDeserializer<'de, E>,
++    E: de::Error,
++{
++    type Error = E;
++
++    forward_to_deserialize_any! {
++        bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++        byte_buf option unit unit_struct newtype_struct tuple_struct map struct
++        enum identifier ignored_any
++    }
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        self.deserialize_seq(visitor)
++    }
++
++    fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        let mut pair_visitor = PairVisitor(Some(self.0), Some(self.1), PhantomData);
++        let pair = try!(visitor.visit_seq(&mut pair_visitor));
++        if pair_visitor.1.is_none() {
++            Ok(pair)
++        } else {
++            let remaining = pair_visitor.size_hint().unwrap();
++            // First argument is the number of elements in the data, second
++            // argument is the number of elements expected by the Deserialize.
++            Err(de::Error::invalid_length(2, &ExpectedInSeq(2 - remaining)))
++        }
++    }
++
++    fn deserialize_tuple<V>(self, len: usize, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        if len == 2 {
++            self.deserialize_seq(visitor)
++        } else {
++            // First argument is the number of elements in the data, second
++            // argument is the number of elements expected by the Deserialize.
++            Err(de::Error::invalid_length(2, &ExpectedInSeq(len)))
++        }
++    }
++}
++
++struct PairVisitor<A, B, E>(Option<A>, Option<B>, PhantomData<E>);
++
++impl<'de, A, B, E> de::SeqAccess<'de> for PairVisitor<A, B, E>
++where
++    A: IntoDeserializer<'de, E>,
++    B: IntoDeserializer<'de, E>,
++    E: de::Error,
++{
++    type Error = E;
++
++    fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Self::Error>
++    where
++        T: de::DeserializeSeed<'de>,
++    {
++        if let Some(k) = self.0.take() {
++            seed.deserialize(k.into_deserializer()).map(Some)
++        } else if let Some(v) = self.1.take() {
++            seed.deserialize(v.into_deserializer()).map(Some)
++        } else {
++            Ok(None)
++        }
++    }
++
++    fn size_hint(&self) -> Option<usize> {
++        if self.0.is_some() {
++            Some(2)
++        } else if self.1.is_some() {
++            Some(1)
++        } else {
++            Some(0)
++        }
++    }
++}
++
++struct ExpectedInMap(usize);
++
++impl Expected for ExpectedInMap {
++    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        if self.0 == 1 {
++            write!(formatter, "1 element in map")
++        } else {
++            write!(formatter, "{} elements in map", self.0)
++        }
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++impl<'de, K, V, E> IntoDeserializer<'de, E> for BTreeMap<K, V>
++where
++    K: IntoDeserializer<'de, E> + Eq + Ord,
++    V: IntoDeserializer<'de, E>,
++    E: de::Error,
++{
++    type Deserializer = MapDeserializer<'de, <BTreeMap<K, V> as IntoIterator>::IntoIter, E>;
++
++    fn into_deserializer(self) -> Self::Deserializer {
++        MapDeserializer::new(self.into_iter())
++    }
++}
++
++#[cfg(feature = "std")]
++impl<'de, K, V, E> IntoDeserializer<'de, E> for HashMap<K, V>
++where
++    K: IntoDeserializer<'de, E> + Eq + Hash,
++    V: IntoDeserializer<'de, E>,
++    E: de::Error,
++{
++    type Deserializer = MapDeserializer<'de, <HashMap<K, V> as IntoIterator>::IntoIter, E>;
++
++    fn into_deserializer(self) -> Self::Deserializer {
++        MapDeserializer::new(self.into_iter())
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// A deserializer holding a `MapAccess`.
++#[derive(Clone, Debug)]
++pub struct MapAccessDeserializer<A> {
++    map: A,
++}
++
++impl<A> MapAccessDeserializer<A> {
++    /// Construct a new `MapAccessDeserializer<A>`.
++    pub fn new(map: A) -> Self {
++        MapAccessDeserializer { map: map }
++    }
++}
++
++impl<'de, A> de::Deserializer<'de> for MapAccessDeserializer<A>
++where
++    A: de::MapAccess<'de>,
++{
++    type Error = A::Error;
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        visitor.visit_map(self.map)
++    }
++
++    forward_to_deserialize_any! {
++        bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++        byte_buf option unit unit_struct newtype_struct seq tuple tuple_struct
++        map struct enum identifier ignored_any
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++mod private {
++    use lib::*;
++
++    use de::{self, Unexpected};
++
++    #[derive(Clone, Debug)]
++    pub struct UnitOnly<E> {
++        marker: PhantomData<E>,
++    }
++
++    pub fn unit_only<T, E>(t: T) -> (T, UnitOnly<E>) {
++        (t, UnitOnly { marker: PhantomData })
++    }
++
++    impl<'de, E> de::VariantAccess<'de> for UnitOnly<E>
++    where
++        E: de::Error,
++    {
++        type Error = E;
++
++        fn unit_variant(self) -> Result<(), Self::Error> {
++            Ok(())
++        }
++
++        fn newtype_variant_seed<T>(self, _seed: T) -> Result<T::Value, Self::Error>
++        where
++            T: de::DeserializeSeed<'de>,
++        {
++            Err(de::Error::invalid_type(Unexpected::UnitVariant, &"newtype variant"),)
++        }
++
++        fn tuple_variant<V>(self, _len: usize, _visitor: V) -> Result<V::Value, Self::Error>
++        where
++            V: de::Visitor<'de>,
++        {
++            Err(de::Error::invalid_type(Unexpected::UnitVariant, &"tuple variant"),)
++        }
++
++        fn struct_variant<V>(
++            self,
++            _fields: &'static [&'static str],
++            _visitor: V,
++        ) -> Result<V::Value, Self::Error>
++        where
++            V: de::Visitor<'de>,
++        {
++            Err(de::Error::invalid_type(Unexpected::UnitVariant, &"struct variant"),)
++        }
++    }
++
++    /// Avoid having to restate the generic types on `MapDeserializer`. The
++    /// `Iterator::Item` contains enough information to figure out K and V.
++    pub trait Pair {
++        type First;
++        type Second;
++        fn split(self) -> (Self::First, Self::Second);
++    }
++
++    impl<A, B> Pair for (A, B) {
++        type First = A;
++        type Second = B;
++        fn split(self) -> (A, B) {
++            self
++        }
++    }
++
++    pub type First<T> = <T as Pair>::First;
++    pub type Second<T> = <T as Pair>::Second;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..cb416d9f094a9e62cba4248c29827f7ffb082a0e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,41 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++pub use lib::clone::Clone;
++pub use lib::convert::{From, Into};
++pub use lib::default::Default;
++pub use lib::fmt::{self, Formatter};
++pub use lib::marker::PhantomData;
++pub use lib::option::Option::{self, None, Some};
++pub use lib::result::Result::{self, Ok, Err};
++
++pub use self::string::from_utf8_lossy;
++
++mod string {
++    use lib::*;
++
++    #[cfg(any(feature = "std", feature = "alloc"))]
++    pub fn from_utf8_lossy(bytes: &[u8]) -> Cow<str> {
++        String::from_utf8_lossy(bytes)
++    }
++
++    // The generated code calls this like:
++    //
++    //     let value = &_serde::export::from_utf8_lossy(bytes);
++    //     Err(_serde::de::Error::unknown_variant(value, VARIANTS))
++    //
++    // so it is okay for the return type to be different from the std case as long
++    // as the above works.
++    #[cfg(not(any(feature = "std", feature = "alloc")))]
++    pub fn from_utf8_lossy(bytes: &[u8]) -> &str {
++        // Three unicode replacement characters if it fails. They look like a
++        // white-on-black question mark. The user will recognize it as invalid
++        // UTF-8.
++        str::from_utf8(bytes).unwrap_or("\u{fffd}\u{fffd}\u{fffd}")
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f0d04e03406eb2cd8f77abba764ed30835a0531f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,260 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! # Serde
++//!
++//! Serde is a framework for ***ser***ializing and ***de***serializing Rust data
++//! structures efficiently and generically.
++//!
++//! The Serde ecosystem consists of data structures that know how to serialize
++//! and deserialize themselves along with data formats that know how to
++//! serialize and deserialize other things. Serde provides the layer by which
++//! these two groups interact with each other, allowing any supported data
++//! structure to be serialized and deserialized using any supported data format.
++//!
++//! See the Serde website [https://serde.rs/] for additional documentation and
++//! usage examples.
++//!
++//! [https://serde.rs/]: https://serde.rs/
++//!
++//! ## Design
++//!
++//! Where many other languages rely on runtime reflection for serializing data,
++//! Serde is instead built on Rust's powerful trait system. A data structure
++//! that knows how to serialize and deserialize itself is one that implements
++//! Serde's `Serialize` and `Deserialize` traits (or uses Serde's derive
++//! attribute to automatically generate implementations at compile time). This
++//! avoids any overhead of reflection or runtime type information. In fact in
++//! many situations the interaction between data structure and data format can
++//! be completely optimized away by the Rust compiler, leaving Serde
++//! serialization to perform the same speed as a handwritten serializer for the
++//! specific selection of data structure and data format.
++//!
++//! ## Data formats
++//!
++//! The following is a partial list of data formats that have been implemented
++//! for Serde by the community.
++//!
++//! - [JSON], the ubiquitous JavaScript Object Notation used by many HTTP APIs.
++//! - [Bincode], a compact binary format
++//!   used for IPC within the Servo rendering engine.
++//! - [CBOR], a Concise Binary Object Representation designed for small message
++//!   size without the need for version negotiation.
++//! - [YAML], a popular human-friendly configuration language that ain't markup
++//!   language.
++//! - [MessagePack], an efficient binary format that resembles a compact JSON.
++//! - [TOML], a minimal configuration format used by [Cargo].
++//! - [Pickle], a format common in the Python world.
++//! - [Hjson], a variant of JSON designed to be readable and writable by humans.
++//! - [BSON], the data storage and network transfer format used by MongoDB.
++//! - [URL], the x-www-form-urlencoded format.
++//! - [XML], the flexible machine-friendly W3C standard.
++//!   *(deserialization only)*
++//! - [Envy], a way to deserialize environment variables into Rust structs.
++//!   *(deserialization only)*
++//! - [Redis], deserialize values from Redis when using [redis-rs].
++//!   *(deserialization only)*
++//!
++//! [JSON]: https://github.com/serde-rs/json
++//! [Bincode]: https://github.com/TyOverby/bincode
++//! [CBOR]: https://github.com/pyfisch/cbor
++//! [YAML]: https://github.com/dtolnay/serde-yaml
++//! [MessagePack]: https://github.com/3Hren/msgpack-rust
++//! [TOML]: https://github.com/alexcrichton/toml-rs
++//! [Pickle]: https://github.com/birkenfeld/serde-pickle
++//! [Hjson]: https://github.com/laktak/hjson-rust
++//! [BSON]: https://github.com/zonyitoo/bson-rs
++//! [URL]: https://github.com/nox/serde_urlencoded
++//! [XML]: https://github.com/RReverser/serde-xml-rs
++//! [Envy]: https://github.com/softprops/envy
++//! [Redis]: https://github.com/OneSignal/serde-redis
++//! [Cargo]: http://doc.crates.io/manifest.html
++//! [redis-rs]: https://crates.io/crates/redis
++
++////////////////////////////////////////////////////////////////////////////////
++
++// Serde types in rustdoc of other crates get linked to here.
++#![doc(html_root_url = "https://docs.rs/serde/1.0.11")]
++
++// Support using Serde without the standard library!
++#![cfg_attr(not(feature = "std"), no_std)]
++
++// Unstable functionality only if the user asks for it. For tracking and
++// discussion of these features please refer to this issue:
++//
++//    https://github.com/serde-rs/serde/issues/812
++#![cfg_attr(feature = "unstable", feature(nonzero, specialization))]
++#![cfg_attr(all(feature = "std", feature = "unstable"), feature(into_boxed_c_str))]
++#![cfg_attr(feature = "alloc", feature(alloc))]
++
++// Whitelisted clippy lints.
++#![cfg_attr(feature = "cargo-clippy", allow(doc_markdown))]
++#![cfg_attr(feature = "cargo-clippy", allow(linkedlist))]
++#![cfg_attr(feature = "cargo-clippy", allow(type_complexity))]
++#![cfg_attr(feature = "cargo-clippy", allow(zero_prefixed_literal))]
++
++// Blacklisted Rust lints.
++#![deny(missing_docs, unused_imports)]
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(feature = "alloc")]
++extern crate alloc;
++
++#[cfg(all(feature = "unstable", feature = "std"))]
++extern crate core;
++
++/// A facade around all the types we need from the `std`, `core`, and `alloc`
++/// crates. This avoids elaborate import wrangling having to happen in every
++/// module.
++mod lib {
++    mod core {
++        #[cfg(feature = "std")]
++        pub use std::*;
++        #[cfg(not(feature = "std"))]
++        pub use core::*;
++    }
++
++    pub use self::core::{cmp, iter, mem, ops, slice, str};
++    pub use self::core::{i8, i16, i32, i64, isize};
++    pub use self::core::{u8, u16, u32, u64, usize};
++    pub use self::core::{f32, f64};
++
++    pub use self::core::cell::{Cell, RefCell};
++    pub use self::core::clone::{self, Clone};
++    pub use self::core::convert::{self, From, Into};
++    pub use self::core::default::{self, Default};
++    pub use self::core::fmt::{self, Debug, Display};
++    pub use self::core::marker::{self, PhantomData};
++    pub use self::core::option::{self, Option};
++    pub use self::core::result::{self, Result};
++
++    #[cfg(feature = "std")]
++    pub use std::borrow::{Cow, ToOwned};
++    #[cfg(all(feature = "alloc", not(feature = "std")))]
++    pub use alloc::borrow::{Cow, ToOwned};
++
++    #[cfg(feature = "std")]
++    pub use std::string::String;
++    #[cfg(all(feature = "alloc", not(feature = "std")))]
++    pub use alloc::string::{String, ToString};
++
++    #[cfg(feature = "std")]
++    pub use std::vec::Vec;
++    #[cfg(all(feature = "alloc", not(feature = "std")))]
++    pub use alloc::vec::Vec;
++
++    #[cfg(feature = "std")]
++    pub use std::boxed::Box;
++    #[cfg(all(feature = "alloc", not(feature = "std")))]
++    pub use alloc::boxed::Box;
++
++    #[cfg(all(feature = "rc", feature = "std"))]
++    pub use std::rc::Rc;
++    #[cfg(all(feature = "rc", feature = "alloc", not(feature = "std")))]
++    pub use alloc::rc::Rc;
++
++    #[cfg(all(feature = "rc", feature = "std"))]
++    pub use std::sync::Arc;
++    #[cfg(all(feature = "rc", feature = "alloc", not(feature = "std")))]
++    pub use alloc::arc::Arc;
++
++    #[cfg(feature = "std")]
++    pub use std::collections::{BinaryHeap, BTreeMap, BTreeSet, LinkedList, VecDeque};
++    #[cfg(all(feature = "alloc", not(feature = "std")))]
++    pub use alloc::{BinaryHeap, BTreeMap, BTreeSet, LinkedList, VecDeque};
++
++    #[cfg(feature = "std")]
++    pub use std::{error, net};
++
++    #[cfg(feature = "std")]
++    pub use std::collections::{HashMap, HashSet};
++    #[cfg(feature = "std")]
++    pub use std::ffi::{CString, CStr, OsString, OsStr};
++    #[cfg(feature = "std")]
++    pub use std::hash::{Hash, BuildHasher};
++    #[cfg(feature = "std")]
++    pub use std::io::Write;
++    #[cfg(feature = "std")]
++    pub use std::path::{Path, PathBuf};
++    #[cfg(feature = "std")]
++    pub use std::time::{Duration, SystemTime, UNIX_EPOCH};
++    #[cfg(feature = "std")]
++    pub use std::sync::{Mutex, RwLock};
++
++    #[cfg(feature = "unstable")]
++    pub use core::nonzero::{NonZero, Zeroable};
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[macro_use]
++mod macros;
++
++pub mod ser;
++pub mod de;
++
++#[doc(inline)]
++pub use ser::{Serialize, Serializer};
++#[doc(inline)]
++pub use de::{Deserialize, Deserializer};
++
++// Generated code uses these to support no_std. Not public API.
++#[doc(hidden)]
++pub mod export;
++
++// Helpers used by generated code and doc tests. Not public API.
++#[doc(hidden)]
++pub mod private;
++
++// Re-export #[derive(Serialize, Deserialize)].
++//
++// This is a workaround for https://github.com/rust-lang/cargo/issues/1286.
++// Without this re-export, crates that put Serde derives behind a cfg_attr would
++// need to use some silly feature name that depends on both serde and
++// serde_derive.
++//
++//     [features]
++//     serde-impls = ["serde", "serde_derive"]
++//
++//     [dependencies]
++//     serde = { version = "1.0", optional = true }
++//     serde_derive = { version = "1.0", optional = true }
++//
++//     # Used like this:
++//     # #[cfg(feature = "serde-impls")]
++//     # #[macro_use]
++//     # extern crate serde_derive;
++//     #
++//     # #[cfg_attr(feature = "serde-impls", derive(Serialize, Deserialize))]
++//     # struct S { /* ... */ }
++//
++// The re-exported derives allow crates to use "serde" as the name of their
++// Serde feature which is more intuitive.
++//
++//     [dependencies]
++//     serde = { version = "1.0", optional = true, features = ["derive"] }
++//
++//     # Used like this:
++//     # #[cfg(feature = "serde")]
++//     # #[macro_use]
++//     # extern crate serde;
++//     #
++//     # #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
++//     # struct S { /* ... */ }
++//
++// The reason re-exporting is not enabled by default is that disabling it would
++// be annoying for crates that provide handwritten impls or data formats. They
++// would need to disable default features and then explicitly re-enable std.
++#[cfg(feature = "serde_derive")]
++#[allow(unused_imports)]
++#[macro_use]
++extern crate serde_derive;
++#[cfg(feature = "serde_derive")]
++#[doc(hidden)]
++pub use serde_derive::*;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2a3d087249b5ea7e5ab3ffa91c1a1272d54d0ba8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,242 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++// Super explicit first paragraph because this shows up at the top level and
++// trips up people who are just looking for basic Serialize / Deserialize
++// documentation.
++//
++/// Helper macro when implementing the `Deserializer` part of a new data format
++/// for Serde.
++///
++/// Some [`Deserializer`] implementations for self-describing formats do not
++/// care what hint the [`Visitor`] gives them, they just want to blindly call
++/// the [`Visitor`] method corresponding to the data they can tell is in the
++/// input. This requires repetitive implementations of all the [`Deserializer`]
++/// trait methods.
++///
++/// ```rust
++/// # #[macro_use]
++/// # extern crate serde;
++/// #
++/// # use serde::de::{value, Deserializer, Visitor};
++/// #
++/// # struct MyDeserializer;
++/// #
++/// # impl<'de> Deserializer<'de> for MyDeserializer {
++/// #     type Error = value::Error;
++/// #
++/// #     fn deserialize_any<V>(self, _: V) -> Result<V::Value, Self::Error>
++/// #         where V: Visitor<'de>
++/// #     {
++/// #         unimplemented!()
++/// #     }
++/// #
++/// #[inline]
++/// fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++///     where V: Visitor<'de>
++/// {
++///     self.deserialize_any(visitor)
++/// }
++/// #
++/// #     forward_to_deserialize_any! {
++/// #         i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++/// #         byte_buf option unit unit_struct newtype_struct seq tuple
++/// #         tuple_struct map struct enum identifier ignored_any
++/// #     }
++/// # }
++/// #
++/// # fn main() {}
++/// ```
++///
++/// The `forward_to_deserialize_any!` macro implements these simple forwarding
++/// methods so that they forward directly to [`Deserializer::deserialize_any`].
++/// You can choose which methods to forward.
++///
++/// ```rust
++/// # #[macro_use]
++/// # extern crate serde;
++/// #
++/// # use serde::de::{value, Deserializer, Visitor};
++/// #
++/// # struct MyDeserializer;
++/// #
++/// impl<'de> Deserializer<'de> for MyDeserializer {
++/// #   type Error = value::Error;
++/// #
++///     fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++///         where V: Visitor<'de>
++///     {
++///         /* ... */
++/// #       let _ = visitor;
++/// #       unimplemented!()
++///     }
++///
++///     forward_to_deserialize_any! {
++///         bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++///         byte_buf option unit unit_struct newtype_struct seq tuple
++///         tuple_struct map struct enum identifier ignored_any
++///     }
++/// }
++/// #
++/// # fn main() {}
++/// ```
++///
++/// The macro assumes the convention that your `Deserializer` lifetime parameter
++/// is called `'de` and that the `Visitor` type parameters on each method are
++/// called `V`. A different type parameter and a different lifetime can be
++/// specified explicitly if necessary.
++///
++/// ```rust
++/// # #[macro_use]
++/// # extern crate serde;
++/// #
++/// # use std::marker::PhantomData;
++/// #
++/// # use serde::de::{value, Deserializer, Visitor};
++/// #
++/// # struct MyDeserializer<V>(PhantomData<V>);
++/// #
++/// # impl<'q, V> Deserializer<'q> for MyDeserializer<V> {
++/// #     type Error = value::Error;
++/// #
++/// #     fn deserialize_any<W>(self, visitor: W) -> Result<W::Value, Self::Error>
++/// #         where W: Visitor<'q>
++/// #     {
++/// #         unimplemented!()
++/// #     }
++/// #
++/// forward_to_deserialize_any! {
++///     <W: Visitor<'q>>
++///     bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++///     byte_buf option unit unit_struct newtype_struct seq tuple tuple_struct
++///     map struct enum identifier ignored_any
++/// }
++/// # }
++/// #
++/// # fn main() {}
++/// ```
++///
++/// [`Deserializer`]: trait.Deserializer.html
++/// [`Visitor`]: de/trait.Visitor.html
++/// [`Deserializer::deserialize_any`]: trait.Deserializer.html#tymethod.deserialize_any
++#[macro_export]
++macro_rules! forward_to_deserialize_any {
++    (<$visitor:ident: Visitor<$lifetime:tt>> $($func:ident)*) => {
++        $(forward_to_deserialize_any_helper!{$func<$lifetime, $visitor>})*
++    };
++    // This case must be after the previous one.
++    ($($func:ident)*) => {
++        $(forward_to_deserialize_any_helper!{$func<'de, V>})*
++    };
++}
++
++#[doc(hidden)]
++#[macro_export]
++macro_rules! forward_to_deserialize_any_method {
++    ($func:ident<$l:tt, $v:ident>($($arg:ident : $ty:ty),*)) => {
++        #[inline]
++        fn $func<$v>(self, $($arg: $ty,)* visitor: $v) -> $crate::export::Result<$v::Value, Self::Error>
++        where
++            $v: $crate::de::Visitor<$l>,
++        {
++            $(
++                let _ = $arg;
++            )*
++            self.deserialize_any(visitor)
++        }
++    };
++}
++
++#[doc(hidden)]
++#[macro_export]
++macro_rules! forward_to_deserialize_any_helper {
++    (bool<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_bool<$l, $v>()}
++    };
++    (i8<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_i8<$l, $v>()}
++    };
++    (i16<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_i16<$l, $v>()}
++    };
++    (i32<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_i32<$l, $v>()}
++    };
++    (i64<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_i64<$l, $v>()}
++    };
++    (u8<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_u8<$l, $v>()}
++    };
++    (u16<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_u16<$l, $v>()}
++    };
++    (u32<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_u32<$l, $v>()}
++    };
++    (u64<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_u64<$l, $v>()}
++    };
++    (f32<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_f32<$l, $v>()}
++    };
++    (f64<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_f64<$l, $v>()}
++    };
++    (char<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_char<$l, $v>()}
++    };
++    (str<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_str<$l, $v>()}
++    };
++    (string<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_string<$l, $v>()}
++    };
++    (bytes<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_bytes<$l, $v>()}
++    };
++    (byte_buf<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_byte_buf<$l, $v>()}
++    };
++    (option<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_option<$l, $v>()}
++    };
++    (unit<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_unit<$l, $v>()}
++    };
++    (unit_struct<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_unit_struct<$l, $v>(name: &'static str)}
++    };
++    (newtype_struct<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_newtype_struct<$l, $v>(name: &'static str)}
++    };
++    (seq<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_seq<$l, $v>()}
++    };
++    (tuple<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_tuple<$l, $v>(len: usize)}
++    };
++    (tuple_struct<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_tuple_struct<$l, $v>(name: &'static str, len: usize)}
++    };
++    (map<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_map<$l, $v>()}
++    };
++    (struct<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_struct<$l, $v>(name: &'static str, fields: &'static [&'static str])}
++    };
++    (enum<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_enum<$l, $v>(name: &'static str, variants: &'static [&'static str])}
++    };
++    (identifier<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_identifier<$l, $v>()}
++    };
++    (ignored_any<$l:tt, $v:ident>) => {
++        forward_to_deserialize_any_method!{deserialize_ignored_any<$l, $v>()}
++    };
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a79b5a1f3efcb502fd117b88eaaede997d413023
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1952 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use lib::*;
++
++use de::{Deserialize, Deserializer, IntoDeserializer, Error, Visitor};
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++use de::Unexpected;
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++pub use self::content::{Content, ContentRefDeserializer, ContentDeserializer,
++                        TaggedContentVisitor, TagOrContentField, TagOrContentFieldVisitor,
++                        TagContentOtherField, TagContentOtherFieldVisitor,
++                        InternallyTaggedUnitVisitor, UntaggedUnitVisitor};
++
++/// If the missing field is of type `Option<T>` then treat is as `None`,
++/// otherwise it is an error.
++pub fn missing_field<'de, V, E>(field: &'static str) -> Result<V, E>
++where
++    V: Deserialize<'de>,
++    E: Error,
++{
++    struct MissingFieldDeserializer<E>(&'static str, PhantomData<E>);
++
++    impl<'de, E> Deserializer<'de> for MissingFieldDeserializer<E>
++    where
++        E: Error,
++    {
++        type Error = E;
++
++        fn deserialize_any<V>(self, _visitor: V) -> Result<V::Value, E>
++        where
++            V: Visitor<'de>,
++        {
++            Err(Error::missing_field(self.0))
++        }
++
++        fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, E>
++        where
++            V: Visitor<'de>,
++        {
++            visitor.visit_none()
++        }
++
++        forward_to_deserialize_any! {
++            bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++            byte_buf unit unit_struct newtype_struct seq tuple tuple_struct map
++            struct enum identifier ignored_any
++        }
++    }
++
++    let deserializer = MissingFieldDeserializer(field, PhantomData);
++    Deserialize::deserialize(deserializer)
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++pub fn borrow_cow_str<'de: 'a, 'a, D>(deserializer: D) -> Result<Cow<'a, str>, D::Error>
++where
++    D: Deserializer<'de>,
++{
++    struct CowStrVisitor;
++
++    impl<'a> Visitor<'a> for CowStrVisitor {
++        type Value = Cow<'a, str>;
++
++        fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++            formatter.write_str("a string")
++        }
++
++        fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>
++        where
++            E: Error,
++        {
++            Ok(Cow::Owned(v.to_owned()))
++        }
++
++        fn visit_borrowed_str<E>(self, v: &'a str) -> Result<Self::Value, E>
++        where
++            E: Error,
++        {
++            Ok(Cow::Borrowed(v))
++        }
++
++        fn visit_string<E>(self, v: String) -> Result<Self::Value, E>
++        where
++            E: Error,
++        {
++            Ok(Cow::Owned(v))
++        }
++
++        fn visit_bytes<E>(self, v: &[u8]) -> Result<Self::Value, E>
++        where
++            E: Error,
++        {
++            match str::from_utf8(v) {
++                Ok(s) => Ok(Cow::Owned(s.to_owned())),
++                Err(_) => Err(Error::invalid_value(Unexpected::Bytes(v), &self)),
++            }
++        }
++
++        fn visit_borrowed_bytes<E>(self, v: &'a [u8]) -> Result<Self::Value, E>
++        where
++            E: Error,
++        {
++            match str::from_utf8(v) {
++                Ok(s) => Ok(Cow::Borrowed(s)),
++                Err(_) => Err(Error::invalid_value(Unexpected::Bytes(v), &self)),
++            }
++        }
++
++        fn visit_byte_buf<E>(self, v: Vec<u8>) -> Result<Self::Value, E>
++        where
++            E: Error,
++        {
++            match String::from_utf8(v) {
++                Ok(s) => Ok(Cow::Owned(s)),
++                Err(e) => Err(Error::invalid_value(Unexpected::Bytes(&e.into_bytes()), &self),),
++            }
++        }
++    }
++
++    deserializer.deserialize_str(CowStrVisitor)
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++pub fn borrow_cow_bytes<'de: 'a, 'a, D>(deserializer: D) -> Result<Cow<'a, [u8]>, D::Error>
++where
++    D: Deserializer<'de>,
++{
++    struct CowBytesVisitor;
++
++    impl<'a> Visitor<'a> for CowBytesVisitor {
++        type Value = Cow<'a, [u8]>;
++
++        fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++            formatter.write_str("a byte array")
++        }
++
++        fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>
++        where
++            E: Error,
++        {
++            Ok(Cow::Owned(v.as_bytes().to_vec()))
++        }
++
++        fn visit_borrowed_str<E>(self, v: &'a str) -> Result<Self::Value, E>
++        where
++            E: Error,
++        {
++            Ok(Cow::Borrowed(v.as_bytes()))
++        }
++
++        fn visit_string<E>(self, v: String) -> Result<Self::Value, E>
++        where
++            E: Error,
++        {
++            Ok(Cow::Owned(v.into_bytes()))
++        }
++
++        fn visit_bytes<E>(self, v: &[u8]) -> Result<Self::Value, E>
++        where
++            E: Error,
++        {
++            Ok(Cow::Owned(v.to_vec()))
++        }
++
++        fn visit_borrowed_bytes<E>(self, v: &'a [u8]) -> Result<Self::Value, E>
++        where
++            E: Error,
++        {
++            Ok(Cow::Borrowed(v))
++        }
++
++        fn visit_byte_buf<E>(self, v: Vec<u8>) -> Result<Self::Value, E>
++        where
++            E: Error,
++        {
++            Ok(Cow::Owned(v))
++        }
++    }
++
++    deserializer.deserialize_str(CowBytesVisitor)
++}
++
++pub mod size_hint {
++    use lib::*;
++
++    pub fn from_bounds<I>(iter: &I) -> Option<usize>
++    where
++        I: Iterator,
++    {
++        helper(iter.size_hint())
++    }
++
++    pub fn cautious(hint: Option<usize>) -> usize {
++        cmp::min(hint.unwrap_or(0), 4096)
++    }
++
++    fn helper(bounds: (usize, Option<usize>)) -> Option<usize> {
++        match bounds {
++            (lower, Some(upper)) if lower == upper => Some(upper),
++            _ => None,
++        }
++    }
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++mod content {
++    // This module is private and nothing here should be used outside of
++    // generated code.
++    //
++    // We will iterate on the implementation for a few releases and only have to
++    // worry about backward compatibility for the `untagged` and `tag` attributes
++    // rather than for this entire mechanism.
++    //
++    // This issue is tracking making some of this stuff public:
++    // https://github.com/serde-rs/serde/issues/741
++
++    use lib::*;
++
++    use de::{self, Deserialize, DeserializeSeed, Deserializer, Visitor, SeqAccess, MapAccess,
++             EnumAccess, Unexpected};
++    use super::size_hint;
++
++    /// Used from generated code to buffer the contents of the Deserializer when
++    /// deserializing untagged enums and internally tagged enums.
++    ///
++    /// Not public API. Use serde-value instead.
++    #[derive(Debug)]
++    pub enum Content<'de> {
++        Bool(bool),
++
++        U8(u8),
++        U16(u16),
++        U32(u32),
++        U64(u64),
++
++        I8(i8),
++        I16(i16),
++        I32(i32),
++        I64(i64),
++
++        F32(f32),
++        F64(f64),
++
++        Char(char),
++        String(String),
++        Str(&'de str),
++        ByteBuf(Vec<u8>),
++        Bytes(&'de [u8]),
++
++        None,
++        Some(Box<Content<'de>>),
++
++        Unit,
++        Newtype(Box<Content<'de>>),
++        Seq(Vec<Content<'de>>),
++        Map(Vec<(Content<'de>, Content<'de>)>),
++    }
++
++    impl<'de> Content<'de> {
++        fn unexpected(&self) -> Unexpected {
++            match *self {
++                Content::Bool(b) => Unexpected::Bool(b),
++                Content::U8(n) => Unexpected::Unsigned(n as u64),
++                Content::U16(n) => Unexpected::Unsigned(n as u64),
++                Content::U32(n) => Unexpected::Unsigned(n as u64),
++                Content::U64(n) => Unexpected::Unsigned(n),
++                Content::I8(n) => Unexpected::Signed(n as i64),
++                Content::I16(n) => Unexpected::Signed(n as i64),
++                Content::I32(n) => Unexpected::Signed(n as i64),
++                Content::I64(n) => Unexpected::Signed(n),
++                Content::F32(f) => Unexpected::Float(f as f64),
++                Content::F64(f) => Unexpected::Float(f),
++                Content::Char(c) => Unexpected::Char(c),
++                Content::String(ref s) => Unexpected::Str(s),
++                Content::Str(s) => Unexpected::Str(s),
++                Content::ByteBuf(ref b) => Unexpected::Bytes(b),
++                Content::Bytes(b) => Unexpected::Bytes(b),
++                Content::None | Content::Some(_) => Unexpected::Option,
++                Content::Unit => Unexpected::Unit,
++                Content::Newtype(_) => Unexpected::NewtypeStruct,
++                Content::Seq(_) => Unexpected::Seq,
++                Content::Map(_) => Unexpected::Map,
++            }
++        }
++    }
++
++    impl<'de> Deserialize<'de> for Content<'de> {
++        fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
++        where
++            D: Deserializer<'de>,
++        {
++            // Untagged and internally tagged enums are only supported in
++            // self-describing formats.
++            let visitor = ContentVisitor { value: PhantomData };
++            deserializer.deserialize_any(visitor)
++        }
++    }
++
++    struct ContentVisitor<'de> {
++        value: PhantomData<Content<'de>>,
++    }
++
++    impl<'de> ContentVisitor<'de> {
++        fn new() -> Self {
++            ContentVisitor { value: PhantomData }
++        }
++    }
++
++    impl<'de> Visitor<'de> for ContentVisitor<'de> {
++        type Value = Content<'de>;
++
++        fn expecting(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++            fmt.write_str("any value")
++        }
++
++        fn visit_bool<F>(self, value: bool) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::Bool(value))
++        }
++
++        fn visit_i8<F>(self, value: i8) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::I8(value))
++        }
++
++        fn visit_i16<F>(self, value: i16) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::I16(value))
++        }
++
++        fn visit_i32<F>(self, value: i32) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::I32(value))
++        }
++
++        fn visit_i64<F>(self, value: i64) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::I64(value))
++        }
++
++        fn visit_u8<F>(self, value: u8) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::U8(value))
++        }
++
++        fn visit_u16<F>(self, value: u16) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::U16(value))
++        }
++
++        fn visit_u32<F>(self, value: u32) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::U32(value))
++        }
++
++        fn visit_u64<F>(self, value: u64) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::U64(value))
++        }
++
++        fn visit_f32<F>(self, value: f32) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::F32(value))
++        }
++
++        fn visit_f64<F>(self, value: f64) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::F64(value))
++        }
++
++        fn visit_char<F>(self, value: char) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::Char(value))
++        }
++
++        fn visit_str<F>(self, value: &str) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::String(value.into()))
++        }
++
++        fn visit_borrowed_str<F>(self, value: &'de str) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::Str(value))
++        }
++
++        fn visit_string<F>(self, value: String) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::String(value))
++        }
++
++        fn visit_bytes<F>(self, value: &[u8]) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::ByteBuf(value.into()))
++        }
++
++        fn visit_borrowed_bytes<F>(self, value: &'de [u8]) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::Bytes(value))
++        }
++
++        fn visit_byte_buf<F>(self, value: Vec<u8>) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::ByteBuf(value))
++        }
++
++        fn visit_unit<F>(self) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::Unit)
++        }
++
++        fn visit_none<F>(self) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            Ok(Content::None)
++        }
++
++        fn visit_some<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
++        where
++            D: Deserializer<'de>,
++        {
++            Deserialize::deserialize(deserializer).map(|v| Content::Some(Box::new(v)))
++        }
++
++        fn visit_newtype_struct<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
++        where
++            D: Deserializer<'de>,
++        {
++            Deserialize::deserialize(deserializer).map(|v| Content::Newtype(Box::new(v)))
++        }
++
++        fn visit_seq<V>(self, mut visitor: V) -> Result<Self::Value, V::Error>
++        where
++            V: SeqAccess<'de>,
++        {
++            let mut vec = Vec::with_capacity(size_hint::cautious(visitor.size_hint()));
++            while let Some(e) = try!(visitor.next_element()) {
++                vec.push(e);
++            }
++            Ok(Content::Seq(vec))
++        }
++
++        fn visit_map<V>(self, mut visitor: V) -> Result<Self::Value, V::Error>
++        where
++            V: MapAccess<'de>,
++        {
++            let mut vec = Vec::with_capacity(size_hint::cautious(visitor.size_hint()));
++            while let Some(kv) = try!(visitor.next_entry()) {
++                vec.push(kv);
++            }
++            Ok(Content::Map(vec))
++        }
++
++        fn visit_enum<V>(self, _visitor: V) -> Result<Self::Value, V::Error>
++        where
++            V: EnumAccess<'de>,
++        {
++            Err(de::Error::custom("untagged and internally tagged enums do not support enum input",),)
++        }
++    }
++
++    /// This is the type of the map keys in an internally tagged enum.
++    ///
++    /// Not public API.
++    pub enum TagOrContent<'de> {
++        Tag,
++        Content(Content<'de>),
++    }
++
++    struct TagOrContentVisitor<'de> {
++        name: &'static str,
++        value: PhantomData<TagOrContent<'de>>,
++    }
++
++    impl<'de> TagOrContentVisitor<'de> {
++        fn new(name: &'static str) -> Self {
++            TagOrContentVisitor { name: name, value: PhantomData }
++        }
++    }
++
++    impl<'de> DeserializeSeed<'de> for TagOrContentVisitor<'de> {
++        type Value = TagOrContent<'de>;
++
++        fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
++        where
++            D: Deserializer<'de>,
++        {
++            // Internally tagged enums are only supported in self-describing
++            // formats.
++            deserializer.deserialize_any(self)
++        }
++    }
++
++    impl<'de> Visitor<'de> for TagOrContentVisitor<'de> {
++        type Value = TagOrContent<'de>;
++
++        fn expecting(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++            write!(fmt, "a type tag `{}` or any other value", self.name)
++        }
++
++        fn visit_bool<F>(self, value: bool) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            ContentVisitor::new()
++                .visit_bool(value)
++                .map(TagOrContent::Content)
++        }
++
++        fn visit_i8<F>(self, value: i8) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            ContentVisitor::new().visit_i8(value).map(TagOrContent::Content)
++        }
++
++        fn visit_i16<F>(self, value: i16) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            ContentVisitor::new()
++                .visit_i16(value)
++                .map(TagOrContent::Content)
++        }
++
++        fn visit_i32<F>(self, value: i32) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            ContentVisitor::new()
++                .visit_i32(value)
++                .map(TagOrContent::Content)
++        }
++
++        fn visit_i64<F>(self, value: i64) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            ContentVisitor::new()
++                .visit_i64(value)
++                .map(TagOrContent::Content)
++        }
++
++        fn visit_u8<F>(self, value: u8) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            ContentVisitor::new().visit_u8(value).map(TagOrContent::Content)
++        }
++
++        fn visit_u16<F>(self, value: u16) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            ContentVisitor::new()
++                .visit_u16(value)
++                .map(TagOrContent::Content)
++        }
++
++        fn visit_u32<F>(self, value: u32) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            ContentVisitor::new()
++                .visit_u32(value)
++                .map(TagOrContent::Content)
++        }
++
++        fn visit_u64<F>(self, value: u64) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            ContentVisitor::new()
++                .visit_u64(value)
++                .map(TagOrContent::Content)
++        }
++
++        fn visit_f32<F>(self, value: f32) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            ContentVisitor::new()
++                .visit_f32(value)
++                .map(TagOrContent::Content)
++        }
++
++        fn visit_f64<F>(self, value: f64) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            ContentVisitor::new()
++                .visit_f64(value)
++                .map(TagOrContent::Content)
++        }
++
++        fn visit_char<F>(self, value: char) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            ContentVisitor::new()
++                .visit_char(value)
++                .map(TagOrContent::Content)
++        }
++
++        fn visit_str<F>(self, value: &str) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            if value == self.name {
++                Ok(TagOrContent::Tag)
++            } else {
++                ContentVisitor::new()
++                    .visit_str(value)
++                    .map(TagOrContent::Content)
++            }
++        }
++
++        fn visit_borrowed_str<F>(self, value: &'de str) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            if value == self.name {
++                Ok(TagOrContent::Tag)
++            } else {
++                ContentVisitor::new()
++                    .visit_borrowed_str(value)
++                    .map(TagOrContent::Content)
++            }
++        }
++
++        fn visit_string<F>(self, value: String) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            if value == self.name {
++                Ok(TagOrContent::Tag)
++            } else {
++                ContentVisitor::new()
++                    .visit_string(value)
++                    .map(TagOrContent::Content)
++            }
++        }
++
++        fn visit_bytes<F>(self, value: &[u8]) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            if value == self.name.as_bytes() {
++                Ok(TagOrContent::Tag)
++            } else {
++                ContentVisitor::new()
++                    .visit_bytes(value)
++                    .map(TagOrContent::Content)
++            }
++        }
++
++        fn visit_borrowed_bytes<F>(self, value: &'de [u8]) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            if value == self.name.as_bytes() {
++                Ok(TagOrContent::Tag)
++            } else {
++                ContentVisitor::new()
++                    .visit_borrowed_bytes(value)
++                    .map(TagOrContent::Content)
++            }
++        }
++
++        fn visit_byte_buf<F>(self, value: Vec<u8>) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            if value == self.name.as_bytes() {
++                Ok(TagOrContent::Tag)
++            } else {
++                ContentVisitor::new()
++                    .visit_byte_buf(value)
++                    .map(TagOrContent::Content)
++            }
++        }
++
++        fn visit_unit<F>(self) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            ContentVisitor::new().visit_unit().map(TagOrContent::Content)
++        }
++
++        fn visit_none<F>(self) -> Result<Self::Value, F>
++        where
++            F: de::Error,
++        {
++            ContentVisitor::new().visit_none().map(TagOrContent::Content)
++        }
++
++        fn visit_some<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
++        where
++            D: Deserializer<'de>,
++        {
++            ContentVisitor::new()
++                .visit_some(deserializer)
++                .map(TagOrContent::Content)
++        }
++
++        fn visit_newtype_struct<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
++        where
++            D: Deserializer<'de>,
++        {
++            ContentVisitor::new()
++                .visit_newtype_struct(deserializer)
++                .map(TagOrContent::Content)
++        }
++
++        fn visit_seq<V>(self, visitor: V) -> Result<Self::Value, V::Error>
++        where
++            V: SeqAccess<'de>,
++        {
++            ContentVisitor::new()
++                .visit_seq(visitor)
++                .map(TagOrContent::Content)
++        }
++
++        fn visit_map<V>(self, visitor: V) -> Result<Self::Value, V::Error>
++        where
++            V: MapAccess<'de>,
++        {
++            ContentVisitor::new()
++                .visit_map(visitor)
++                .map(TagOrContent::Content)
++        }
++
++        fn visit_enum<V>(self, visitor: V) -> Result<Self::Value, V::Error>
++        where
++            V: EnumAccess<'de>,
++        {
++            ContentVisitor::new()
++                .visit_enum(visitor)
++                .map(TagOrContent::Content)
++        }
++    }
++
++    /// Used by generated code to deserialize an internally tagged enum.
++    ///
++    /// Not public API.
++    pub struct TaggedContent<'de, T> {
++        pub tag: T,
++        pub content: Content<'de>,
++    }
++
++    /// Not public API.
++    pub struct TaggedContentVisitor<'de, T> {
++        tag_name: &'static str,
++        value: PhantomData<TaggedContent<'de, T>>,
++    }
++
++    impl<'de, T> TaggedContentVisitor<'de, T> {
++        /// Visitor for the content of an internally tagged enum with the given tag
++        /// name.
++        pub fn new(name: &'static str) -> Self {
++            TaggedContentVisitor {
++                tag_name: name,
++                value: PhantomData,
++            }
++        }
++    }
++
++    impl<'de, T> DeserializeSeed<'de> for TaggedContentVisitor<'de, T>
++    where
++        T: Deserialize<'de>,
++    {
++        type Value = TaggedContent<'de, T>;
++
++        fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
++        where
++            D: Deserializer<'de>,
++        {
++            // Internally tagged enums are only supported in self-describing
++            // formats.
++            deserializer.deserialize_any(self)
++        }
++    }
++
++    impl<'de, T> Visitor<'de> for TaggedContentVisitor<'de, T>
++    where
++        T: Deserialize<'de>,
++    {
++        type Value = TaggedContent<'de, T>;
++
++        fn expecting(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
++            fmt.write_str("any value")
++        }
++
++        fn visit_map<V>(self, mut visitor: V) -> Result<Self::Value, V::Error>
++        where
++            V: MapAccess<'de>,
++        {
++            let mut tag = None;
++            let mut vec = Vec::with_capacity(size_hint::cautious(visitor.size_hint()));
++            while let Some(k) =
++                try!(visitor.next_key_seed(TagOrContentVisitor::new(self.tag_name))) {
++                match k {
++                    TagOrContent::Tag => {
++                        if tag.is_some() {
++                            return Err(de::Error::duplicate_field(self.tag_name));
++                        }
++                        tag = Some(try!(visitor.next_value()));
++                    }
++                    TagOrContent::Content(k) => {
++                        let v = try!(visitor.next_value());
++                        vec.push((k, v));
++                    }
++                }
++            }
++            match tag {
++                None => Err(de::Error::missing_field(self.tag_name)),
++                Some(tag) => {
++                    Ok(
++                        TaggedContent {
++                            tag: tag,
++                            content: Content::Map(vec),
++                        },
++                    )
++                }
++            }
++        }
++    }
++
++    /// Used by generated code to deserialize an adjacently tagged enum.
++    ///
++    /// Not public API.
++    pub enum TagOrContentField {
++        Tag,
++        Content,
++    }
++
++    /// Not public API.
++    pub struct TagOrContentFieldVisitor {
++        pub tag: &'static str,
++        pub content: &'static str,
++    }
++
++    impl<'de> DeserializeSeed<'de> for TagOrContentFieldVisitor {
++        type Value = TagOrContentField;
++
++        fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
++        where
++            D: Deserializer<'de>,
++        {
++            deserializer.deserialize_str(self)
++        }
++    }
++
++    impl<'de> Visitor<'de> for TagOrContentFieldVisitor {
++        type Value = TagOrContentField;
++
++        fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++            write!(formatter, "{:?} or {:?}", self.tag, self.content)
++        }
++
++        fn visit_str<E>(self, field: &str) -> Result<Self::Value, E>
++        where
++            E: de::Error,
++        {
++            if field == self.tag {
++                Ok(TagOrContentField::Tag)
++            } else if field == self.content {
++                Ok(TagOrContentField::Content)
++            } else {
++                Err(de::Error::invalid_value(Unexpected::Str(field), &self))
++            }
++        }
++    }
++
++    /// Used by generated code to deserialize an adjacently tagged enum when
++    /// ignoring unrelated fields is allowed.
++    ///
++    /// Not public API.
++    pub enum TagContentOtherField {
++        Tag,
++        Content,
++        Other,
++    }
++
++    /// Not public API.
++    pub struct TagContentOtherFieldVisitor {
++        pub tag: &'static str,
++        pub content: &'static str,
++    }
++
++    impl<'de> DeserializeSeed<'de> for TagContentOtherFieldVisitor {
++        type Value = TagContentOtherField;
++
++        fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
++        where
++            D: Deserializer<'de>,
++        {
++            deserializer.deserialize_str(self)
++        }
++    }
++
++    impl<'de> Visitor<'de> for TagContentOtherFieldVisitor {
++        type Value = TagContentOtherField;
++
++        fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++            write!(formatter, "{:?}, {:?}, or other ignored fields", self.tag, self.content)
++        }
++
++        fn visit_str<E>(self, field: &str) -> Result<Self::Value, E>
++        where
++            E: de::Error,
++        {
++            if field == self.tag {
++                Ok(TagContentOtherField::Tag)
++            } else if field == self.content {
++                Ok(TagContentOtherField::Content)
++            } else {
++                Ok(TagContentOtherField::Other)
++            }
++        }
++    }
++
++    /// Not public API
++    pub struct ContentDeserializer<'de, E> {
++        content: Content<'de>,
++        err: PhantomData<E>,
++    }
++
++    /// Used when deserializing an internally tagged enum because the content will
++    /// be used exactly once.
++    impl<'de, E> Deserializer<'de> for ContentDeserializer<'de, E>
++    where
++        E: de::Error,
++    {
++        type Error = E;
++
++        fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++        where
++            V: Visitor<'de>,
++        {
++            match self.content {
++                Content::Bool(v) => visitor.visit_bool(v),
++                Content::U8(v) => visitor.visit_u8(v),
++                Content::U16(v) => visitor.visit_u16(v),
++                Content::U32(v) => visitor.visit_u32(v),
++                Content::U64(v) => visitor.visit_u64(v),
++                Content::I8(v) => visitor.visit_i8(v),
++                Content::I16(v) => visitor.visit_i16(v),
++                Content::I32(v) => visitor.visit_i32(v),
++                Content::I64(v) => visitor.visit_i64(v),
++                Content::F32(v) => visitor.visit_f32(v),
++                Content::F64(v) => visitor.visit_f64(v),
++                Content::Char(v) => visitor.visit_char(v),
++                Content::String(v) => visitor.visit_string(v),
++                Content::Str(v) => visitor.visit_borrowed_str(v),
++                Content::ByteBuf(v) => visitor.visit_byte_buf(v),
++                Content::Bytes(v) => visitor.visit_borrowed_bytes(v),
++                Content::Unit => visitor.visit_unit(),
++                Content::None => visitor.visit_none(),
++                Content::Some(v) => visitor.visit_some(ContentDeserializer::new(*v)),
++                Content::Newtype(v) => visitor.visit_newtype_struct(ContentDeserializer::new(*v)),
++                Content::Seq(v) => {
++                    let seq = v.into_iter().map(ContentDeserializer::new);
++                    let mut seq_visitor = de::value::SeqDeserializer::new(seq);
++                    let value = try!(visitor.visit_seq(&mut seq_visitor));
++                    try!(seq_visitor.end());
++                    Ok(value)
++                }
++                Content::Map(v) => {
++                    let map = v.into_iter().map(|(k, v)| {
++                                                    (ContentDeserializer::new(k),
++                                                    ContentDeserializer::new(v))
++                                                });
++                    let mut map_visitor = de::value::MapDeserializer::new(map);
++                    let value = try!(visitor.visit_map(&mut map_visitor));
++                    try!(map_visitor.end());
++                    Ok(value)
++                }
++            }
++        }
++
++        fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++        where
++            V: Visitor<'de>,
++        {
++            match self.content {
++                Content::None => visitor.visit_none(),
++                Content::Some(v) => visitor.visit_some(ContentDeserializer::new(*v)),
++                Content::Unit => visitor.visit_unit(),
++                _ => visitor.visit_some(self),
++            }
++        }
++
++        fn deserialize_newtype_struct<V>(
++            self,
++            _name: &str,
++            visitor: V,
++        ) -> Result<V::Value, Self::Error>
++        where
++            V: Visitor<'de>,
++        {
++            visitor.visit_newtype_struct(self)
++        }
++
++        fn deserialize_enum<V>(
++            self,
++            _name: &str,
++            _variants: &'static [&'static str],
++            visitor: V,
++        ) -> Result<V::Value, Self::Error>
++        where
++            V: Visitor<'de>,
++        {
++            let (variant, value) = match self.content {
++                Content::Map(value) => {
++                    let mut iter = value.into_iter();
++                    let (variant, value) = match iter.next() {
++                        Some(v) => v,
++                        None => {
++                            return Err(
++                                de::Error::invalid_value(
++                                    de::Unexpected::Map,
++                                    &"map with a single key",
++                                ),
++                            );
++                        }
++                    };
++                    // enums are encoded in json as maps with a single key:value pair
++                    if iter.next().is_some() {
++                        return Err(
++                            de::Error::invalid_value(
++                                de::Unexpected::Map,
++                                &"map with a single key",
++                            ),
++                        );
++                    }
++                    (variant, Some(value))
++                }
++                s @ Content::String(_) | s @ Content::Str(_) => (s, None),
++                other => {
++                    return Err(de::Error::invalid_type(other.unexpected(), &"string or map"),);
++                }
++            };
++
++            visitor.visit_enum(
++                EnumDeserializer {
++                    variant: variant,
++                    value: value,
++                    err: PhantomData,
++                },
++            )
++        }
++
++        forward_to_deserialize_any! {
++            bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++            byte_buf unit unit_struct seq tuple tuple_struct map struct
++            identifier ignored_any
++        }
++    }
++
++    impl<'de, E> ContentDeserializer<'de, E> {
++        /// private API, don't use
++        pub fn new(content: Content<'de>) -> Self {
++            ContentDeserializer {
++                content: content,
++                err: PhantomData,
++            }
++        }
++    }
++
++    struct EnumDeserializer<'de, E>
++    where
++        E: de::Error,
++    {
++        variant: Content<'de>,
++        value: Option<Content<'de>>,
++        err: PhantomData<E>,
++    }
++
++    impl<'de, E> de::EnumAccess<'de> for EnumDeserializer<'de, E>
++    where
++        E: de::Error,
++    {
++        type Error = E;
++        type Variant = VariantDeserializer<'de, Self::Error>;
++
++        fn variant_seed<V>(self, seed: V) -> Result<(V::Value, Self::Variant), E>
++        where
++            V: de::DeserializeSeed<'de>,
++        {
++            let visitor = VariantDeserializer {
++                value: self.value,
++                err: PhantomData,
++            };
++            seed.deserialize(ContentDeserializer::new(self.variant))
++                .map(|v| (v, visitor))
++        }
++    }
++
++    struct VariantDeserializer<'de, E>
++    where
++        E: de::Error,
++    {
++        value: Option<Content<'de>>,
++        err: PhantomData<E>,
++    }
++
++    impl<'de, E> de::VariantAccess<'de> for VariantDeserializer<'de, E>
++    where
++        E: de::Error,
++    {
++        type Error = E;
++
++        fn unit_variant(self) -> Result<(), E> {
++            match self.value {
++                Some(value) => de::Deserialize::deserialize(ContentDeserializer::new(value)),
++                None => Ok(()),
++            }
++        }
++
++        fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value, E>
++        where
++            T: de::DeserializeSeed<'de>,
++        {
++            match self.value {
++                Some(value) => seed.deserialize(ContentDeserializer::new(value)),
++                None => {
++                    Err(de::Error::invalid_type(de::Unexpected::UnitVariant, &"newtype variant"),)
++                }
++            }
++        }
++
++        fn tuple_variant<V>(self, _len: usize, visitor: V) -> Result<V::Value, Self::Error>
++        where
++            V: de::Visitor<'de>,
++        {
++            match self.value {
++                Some(Content::Seq(v)) => {
++                    de::Deserializer::deserialize_any(SeqDeserializer::new(v), visitor)
++                }
++                Some(other) => Err(de::Error::invalid_type(other.unexpected(), &"tuple variant"),),
++                None => Err(de::Error::invalid_type(de::Unexpected::UnitVariant, &"tuple variant"),),
++            }
++        }
++
++        fn struct_variant<V>(
++            self,
++            _fields: &'static [&'static str],
++            visitor: V,
++        ) -> Result<V::Value, Self::Error>
++        where
++            V: de::Visitor<'de>,
++        {
++            match self.value {
++                Some(Content::Map(v)) => {
++                    de::Deserializer::deserialize_any(MapDeserializer::new(v), visitor)
++                }
++                Some(other) => Err(de::Error::invalid_type(other.unexpected(), &"struct variant"),),
++                _ => Err(de::Error::invalid_type(de::Unexpected::UnitVariant, &"struct variant"),),
++            }
++        }
++    }
++
++    struct SeqDeserializer<'de, E>
++    where
++        E: de::Error,
++    {
++        iter: <Vec<Content<'de>> as IntoIterator>::IntoIter,
++        err: PhantomData<E>,
++    }
++
++    impl<'de, E> SeqDeserializer<'de, E>
++    where
++        E: de::Error,
++    {
++        fn new(vec: Vec<Content<'de>>) -> Self {
++            SeqDeserializer {
++                iter: vec.into_iter(),
++                err: PhantomData,
++            }
++        }
++    }
++
++    impl<'de, E> de::Deserializer<'de> for SeqDeserializer<'de, E>
++    where
++        E: de::Error,
++    {
++        type Error = E;
++
++        #[inline]
++        fn deserialize_any<V>(mut self, visitor: V) -> Result<V::Value, Self::Error>
++        where
++            V: de::Visitor<'de>,
++        {
++            let len = self.iter.len();
++            if len == 0 {
++                visitor.visit_unit()
++            } else {
++                let ret = try!(visitor.visit_seq(&mut self));
++                let remaining = self.iter.len();
++                if remaining == 0 {
++                    Ok(ret)
++                } else {
++                    Err(de::Error::invalid_length(len, &"fewer elements in array"))
++                }
++            }
++        }
++
++        forward_to_deserialize_any! {
++            bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++            byte_buf option unit unit_struct newtype_struct seq tuple
++            tuple_struct map struct enum identifier ignored_any
++        }
++    }
++
++    impl<'de, E> de::SeqAccess<'de> for SeqDeserializer<'de, E>
++    where
++        E: de::Error,
++    {
++        type Error = E;
++
++        fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Self::Error>
++        where
++            T: de::DeserializeSeed<'de>,
++        {
++            match self.iter.next() {
++                Some(value) => {
++                    seed.deserialize(ContentDeserializer::new(value))
++                        .map(Some)
++                }
++                None => Ok(None),
++            }
++        }
++
++        fn size_hint(&self) -> Option<usize> {
++            size_hint::from_bounds(&self.iter)
++        }
++    }
++
++    struct MapDeserializer<'de, E>
++    where
++        E: de::Error,
++    {
++        iter: <Vec<(Content<'de>, Content<'de>)> as IntoIterator>::IntoIter,
++        value: Option<Content<'de>>,
++        err: PhantomData<E>,
++    }
++
++    impl<'de, E> MapDeserializer<'de, E>
++    where
++        E: de::Error,
++    {
++        fn new(map: Vec<(Content<'de>, Content<'de>)>) -> Self {
++            MapDeserializer {
++                iter: map.into_iter(),
++                value: None,
++                err: PhantomData,
++            }
++        }
++    }
++
++    impl<'de, E> de::MapAccess<'de> for MapDeserializer<'de, E>
++    where
++        E: de::Error,
++    {
++        type Error = E;
++
++        fn next_key_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Self::Error>
++        where
++            T: de::DeserializeSeed<'de>,
++        {
++            match self.iter.next() {
++                Some((key, value)) => {
++                    self.value = Some(value);
++                    seed.deserialize(ContentDeserializer::new(key)).map(Some)
++                }
++                None => Ok(None),
++            }
++        }
++
++        fn next_value_seed<T>(&mut self, seed: T) -> Result<T::Value, Self::Error>
++        where
++            T: de::DeserializeSeed<'de>,
++        {
++            match self.value.take() {
++                Some(value) => seed.deserialize(ContentDeserializer::new(value)),
++                None => Err(de::Error::custom("value is missing")),
++            }
++        }
++
++        fn size_hint(&self) -> Option<usize> {
++            size_hint::from_bounds(&self.iter)
++        }
++    }
++
++    impl<'de, E> de::Deserializer<'de> for MapDeserializer<'de, E>
++    where
++        E: de::Error,
++    {
++        type Error = E;
++
++        #[inline]
++        fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++        where
++            V: de::Visitor<'de>,
++        {
++            visitor.visit_map(self)
++        }
++
++        forward_to_deserialize_any! {
++            bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++            byte_buf option unit unit_struct newtype_struct seq tuple
++            tuple_struct map struct enum identifier ignored_any
++        }
++    }
++
++    /// Not public API.
++    pub struct ContentRefDeserializer<'a, 'de: 'a, E> {
++        content: &'a Content<'de>,
++        err: PhantomData<E>,
++    }
++
++    /// Used when deserializing an untagged enum because the content may need to be
++    /// used more than once.
++    impl<'de, 'a, E> Deserializer<'de> for ContentRefDeserializer<'a, 'de, E>
++    where
++        E: de::Error,
++    {
++        type Error = E;
++
++        fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, E>
++        where
++            V: Visitor<'de>,
++        {
++            match *self.content {
++                Content::Bool(v) => visitor.visit_bool(v),
++                Content::U8(v) => visitor.visit_u8(v),
++                Content::U16(v) => visitor.visit_u16(v),
++                Content::U32(v) => visitor.visit_u32(v),
++                Content::U64(v) => visitor.visit_u64(v),
++                Content::I8(v) => visitor.visit_i8(v),
++                Content::I16(v) => visitor.visit_i16(v),
++                Content::I32(v) => visitor.visit_i32(v),
++                Content::I64(v) => visitor.visit_i64(v),
++                Content::F32(v) => visitor.visit_f32(v),
++                Content::F64(v) => visitor.visit_f64(v),
++                Content::Char(v) => visitor.visit_char(v),
++                Content::String(ref v) => visitor.visit_str(v),
++                Content::Str(v) => visitor.visit_borrowed_str(v),
++                Content::ByteBuf(ref v) => visitor.visit_bytes(v),
++                Content::Bytes(v) => visitor.visit_borrowed_bytes(v),
++                Content::Unit => visitor.visit_unit(),
++                Content::None => visitor.visit_none(),
++                Content::Some(ref v) => visitor.visit_some(ContentRefDeserializer::new(v)),
++                Content::Newtype(ref v) => {
++                    visitor.visit_newtype_struct(ContentRefDeserializer::new(v))
++                }
++                Content::Seq(ref v) => {
++                    let seq = v.into_iter().map(ContentRefDeserializer::new);
++                    let mut seq_visitor = de::value::SeqDeserializer::new(seq);
++                    let value = try!(visitor.visit_seq(&mut seq_visitor));
++                    try!(seq_visitor.end());
++                    Ok(value)
++                }
++                Content::Map(ref v) => {
++                    let map = v.into_iter()
++                        .map(
++                            |&(ref k, ref v)| {
++                                (ContentRefDeserializer::new(k), ContentRefDeserializer::new(v))
++                            },
++                        );
++                    let mut map_visitor = de::value::MapDeserializer::new(map);
++                    let value = try!(visitor.visit_map(&mut map_visitor));
++                    try!(map_visitor.end());
++                    Ok(value)
++                }
++            }
++        }
++
++        fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, E>
++        where
++            V: Visitor<'de>,
++        {
++            match *self.content {
++                Content::None => visitor.visit_none(),
++                Content::Some(ref v) => visitor.visit_some(ContentRefDeserializer::new(v)),
++                Content::Unit => visitor.visit_unit(),
++                _ => visitor.visit_some(self),
++            }
++        }
++
++        fn deserialize_newtype_struct<V>(self, _name: &str, visitor: V) -> Result<V::Value, E>
++        where
++            V: Visitor<'de>,
++        {
++            visitor.visit_newtype_struct(self)
++        }
++
++        fn deserialize_enum<V>(
++            self,
++            _name: &str,
++            _variants: &'static [&'static str],
++            visitor: V,
++        ) -> Result<V::Value, Self::Error>
++        where
++            V: Visitor<'de>,
++        {
++            let (variant, value) = match *self.content {
++                Content::Map(ref value) => {
++                    let mut iter = value.into_iter();
++                    let &(ref variant, ref value) = match iter.next() {
++                        Some(v) => v,
++                        None => {
++                            return Err(
++                                de::Error::invalid_value(
++                                    de::Unexpected::Map,
++                                    &"map with a single key",
++                                ),
++                            );
++                        }
++                    };
++                    // enums are encoded in json as maps with a single key:value pair
++                    if iter.next().is_some() {
++                        return Err(
++                            de::Error::invalid_value(
++                                de::Unexpected::Map,
++                                &"map with a single key",
++                            ),
++                        );
++                    }
++                    (variant, Some(value))
++                }
++                ref s @ Content::String(_) | ref s @ Content::Str(_) => (s, None),
++                ref other => {
++                    return Err(de::Error::invalid_type(other.unexpected(), &"string or map"),);
++                }
++            };
++
++            visitor.visit_enum(
++                EnumRefDeserializer {
++                    variant: variant,
++                    value: value,
++                    err: PhantomData,
++                },
++            )
++        }
++
++        forward_to_deserialize_any! {
++            bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++            byte_buf unit unit_struct seq tuple tuple_struct map struct
++            identifier ignored_any
++        }
++    }
++
++    impl<'a, 'de, E> ContentRefDeserializer<'a, 'de, E> {
++        /// private API, don't use
++        pub fn new(content: &'a Content<'de>) -> Self {
++            ContentRefDeserializer {
++                content: content,
++                err: PhantomData,
++            }
++        }
++    }
++
++    struct EnumRefDeserializer<'a, 'de: 'a, E>
++    where
++        E: de::Error,
++    {
++        variant: &'a Content<'de>,
++        value: Option<&'a Content<'de>>,
++        err: PhantomData<E>,
++    }
++
++    impl<'de, 'a, E> de::EnumAccess<'de> for EnumRefDeserializer<'a, 'de, E>
++    where
++        E: de::Error,
++    {
++        type Error = E;
++        type Variant = VariantRefDeserializer<'a, 'de, Self::Error>;
++
++        fn variant_seed<V>(self, seed: V) -> Result<(V::Value, Self::Variant), Self::Error>
++        where
++            V: de::DeserializeSeed<'de>,
++        {
++            let visitor = VariantRefDeserializer {
++                value: self.value,
++                err: PhantomData,
++            };
++            seed.deserialize(ContentRefDeserializer::new(self.variant))
++                .map(|v| (v, visitor))
++        }
++    }
++
++    struct VariantRefDeserializer<'a, 'de: 'a, E>
++    where
++        E: de::Error,
++    {
++        value: Option<&'a Content<'de>>,
++        err: PhantomData<E>,
++    }
++
++    impl<'de, 'a, E> de::VariantAccess<'de> for VariantRefDeserializer<'a, 'de, E>
++    where
++        E: de::Error,
++    {
++        type Error = E;
++
++        fn unit_variant(self) -> Result<(), E> {
++            match self.value {
++                Some(value) => de::Deserialize::deserialize(ContentRefDeserializer::new(value)),
++                None => Ok(()),
++            }
++        }
++
++        fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value, E>
++        where
++            T: de::DeserializeSeed<'de>,
++        {
++            match self.value {
++                Some(value) => seed.deserialize(ContentRefDeserializer::new(value)),
++                None => {
++                    Err(de::Error::invalid_type(de::Unexpected::UnitVariant, &"newtype variant"),)
++                }
++            }
++        }
++
++        fn tuple_variant<V>(self, _len: usize, visitor: V) -> Result<V::Value, Self::Error>
++        where
++            V: de::Visitor<'de>,
++        {
++            match self.value {
++                Some(&Content::Seq(ref v)) => {
++                    de::Deserializer::deserialize_any(SeqRefDeserializer::new(v), visitor)
++                }
++                Some(other) => Err(de::Error::invalid_type(other.unexpected(), &"tuple variant"),),
++                None => Err(de::Error::invalid_type(de::Unexpected::UnitVariant, &"tuple variant"),),
++            }
++        }
++
++        fn struct_variant<V>(
++            self,
++            _fields: &'static [&'static str],
++            visitor: V,
++        ) -> Result<V::Value, Self::Error>
++        where
++            V: de::Visitor<'de>,
++        {
++            match self.value {
++                Some(&Content::Map(ref v)) => {
++                    de::Deserializer::deserialize_any(MapRefDeserializer::new(v), visitor)
++                }
++                Some(other) => Err(de::Error::invalid_type(other.unexpected(), &"struct variant"),),
++                _ => Err(de::Error::invalid_type(de::Unexpected::UnitVariant, &"struct variant"),),
++            }
++        }
++    }
++
++    struct SeqRefDeserializer<'a, 'de: 'a, E>
++    where
++        E: de::Error,
++    {
++        iter: <&'a [Content<'de>] as IntoIterator>::IntoIter,
++        err: PhantomData<E>,
++    }
++
++    impl<'a, 'de, E> SeqRefDeserializer<'a, 'de, E>
++    where
++        E: de::Error,
++    {
++        fn new(vec: &'a [Content<'de>]) -> Self {
++            SeqRefDeserializer {
++                iter: vec.into_iter(),
++                err: PhantomData,
++            }
++        }
++    }
++
++    impl<'de, 'a, E> de::Deserializer<'de> for SeqRefDeserializer<'a, 'de, E>
++    where
++        E: de::Error,
++    {
++        type Error = E;
++
++        #[inline]
++        fn deserialize_any<V>(mut self, visitor: V) -> Result<V::Value, Self::Error>
++        where
++            V: de::Visitor<'de>,
++        {
++            let len = self.iter.len();
++            if len == 0 {
++                visitor.visit_unit()
++            } else {
++                let ret = try!(visitor.visit_seq(&mut self));
++                let remaining = self.iter.len();
++                if remaining == 0 {
++                    Ok(ret)
++                } else {
++                    Err(de::Error::invalid_length(len, &"fewer elements in array"))
++                }
++            }
++        }
++
++        forward_to_deserialize_any! {
++            bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++            byte_buf option unit unit_struct newtype_struct seq tuple
++            tuple_struct map struct enum identifier ignored_any
++        }
++    }
++
++    impl<'de, 'a, E> de::SeqAccess<'de> for SeqRefDeserializer<'a, 'de, E>
++    where
++        E: de::Error,
++    {
++        type Error = E;
++
++        fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Self::Error>
++        where
++            T: de::DeserializeSeed<'de>,
++        {
++            match self.iter.next() {
++                Some(value) => {
++                    seed.deserialize(ContentRefDeserializer::new(value))
++                        .map(Some)
++                }
++                None => Ok(None),
++            }
++        }
++
++        fn size_hint(&self) -> Option<usize> {
++            size_hint::from_bounds(&self.iter)
++        }
++    }
++
++    struct MapRefDeserializer<'a, 'de: 'a, E>
++    where
++        E: de::Error,
++    {
++        iter: <&'a [(Content<'de>, Content<'de>)] as IntoIterator>::IntoIter,
++        value: Option<&'a Content<'de>>,
++        err: PhantomData<E>,
++    }
++
++    impl<'a, 'de, E> MapRefDeserializer<'a, 'de, E>
++    where
++        E: de::Error,
++    {
++        fn new(map: &'a [(Content<'de>, Content<'de>)]) -> Self {
++            MapRefDeserializer {
++                iter: map.into_iter(),
++                value: None,
++                err: PhantomData,
++            }
++        }
++    }
++
++    impl<'de, 'a, E> de::MapAccess<'de> for MapRefDeserializer<'a, 'de, E>
++    where
++        E: de::Error,
++    {
++        type Error = E;
++
++        fn next_key_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Self::Error>
++        where
++            T: de::DeserializeSeed<'de>,
++        {
++            match self.iter.next() {
++                Some(&(ref key, ref value)) => {
++                    self.value = Some(value);
++                    seed.deserialize(ContentRefDeserializer::new(key))
++                        .map(Some)
++                }
++                None => Ok(None),
++            }
++        }
++
++        fn next_value_seed<T>(&mut self, seed: T) -> Result<T::Value, Self::Error>
++        where
++            T: de::DeserializeSeed<'de>,
++        {
++            match self.value.take() {
++                Some(value) => seed.deserialize(ContentRefDeserializer::new(value)),
++                None => Err(de::Error::custom("value is missing")),
++            }
++        }
++
++        fn size_hint(&self) -> Option<usize> {
++            size_hint::from_bounds(&self.iter)
++        }
++    }
++
++    impl<'de, 'a, E> de::Deserializer<'de> for MapRefDeserializer<'a, 'de, E>
++    where
++        E: de::Error,
++    {
++        type Error = E;
++
++        #[inline]
++        fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++        where
++            V: de::Visitor<'de>,
++        {
++            visitor.visit_map(self)
++        }
++
++        forward_to_deserialize_any! {
++            bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++            byte_buf option unit unit_struct newtype_struct seq tuple
++            tuple_struct map struct enum identifier ignored_any
++        }
++    }
++
++    impl<'de, E> de::IntoDeserializer<'de, E> for ContentDeserializer<'de, E>
++    where
++        E: de::Error,
++    {
++        type Deserializer = Self;
++
++        fn into_deserializer(self) -> Self {
++            self
++        }
++    }
++
++    impl<'de, 'a, E> de::IntoDeserializer<'de, E> for ContentRefDeserializer<'a, 'de, E>
++    where
++        E: de::Error,
++    {
++        type Deserializer = Self;
++
++        fn into_deserializer(self) -> Self {
++            self
++        }
++    }
++
++    /// Visitor for deserializing an internally tagged unit variant.
++    ///
++    /// Not public API.
++    pub struct InternallyTaggedUnitVisitor<'a> {
++        type_name: &'a str,
++        variant_name: &'a str,
++    }
++
++    impl<'a> InternallyTaggedUnitVisitor<'a> {
++        /// Not public API.
++        pub fn new(type_name: &'a str, variant_name: &'a str) -> Self {
++            InternallyTaggedUnitVisitor {
++                type_name: type_name,
++                variant_name: variant_name,
++            }
++        }
++    }
++
++    impl<'de, 'a> Visitor<'de> for InternallyTaggedUnitVisitor<'a> {
++        type Value = ();
++
++        fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++            write!(formatter, "unit variant {}::{}", self.type_name, self.variant_name)
++        }
++
++        fn visit_map<V>(self, _: V) -> Result<(), V::Error>
++        where
++            V: MapAccess<'de>,
++        {
++            Ok(())
++        }
++    }
++
++    /// Visitor for deserializing an untagged unit variant.
++    ///
++    /// Not public API.
++    pub struct UntaggedUnitVisitor<'a> {
++        type_name: &'a str,
++        variant_name: &'a str,
++    }
++
++    impl<'a> UntaggedUnitVisitor<'a> {
++        /// Not public API.
++        pub fn new(type_name: &'a str, variant_name: &'a str) -> Self {
++            UntaggedUnitVisitor {
++                type_name: type_name,
++                variant_name: variant_name,
++            }
++        }
++    }
++
++    impl<'de, 'a> Visitor<'de> for UntaggedUnitVisitor<'a> {
++        type Value = ();
++
++        fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++            write!(formatter, "unit variant {}::{}", self.type_name, self.variant_name)
++        }
++
++        fn visit_unit<E>(self) -> Result<(), E>
++        where
++            E: de::Error,
++        {
++            Ok(())
++        }
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++// Like `IntoDeserializer` but also implemented for `&[u8]`. This is used for
++// the newtype fallthrough case of `field_identifier`.
++//
++//    #[derive(Deserialize)]
++//    #[serde(field_identifier)]
++//    enum F {
++//        A,
++//        B,
++//        Other(String), // deserialized using IdentifierDeserializer
++//    }
++pub trait IdentifierDeserializer<'de, E: Error> {
++    type Deserializer: Deserializer<'de, Error = E>;
++
++    fn from(self) -> Self::Deserializer;
++}
++
++impl<'de, E> IdentifierDeserializer<'de, E> for u32
++where
++    E: Error,
++{
++    type Deserializer = <u32 as IntoDeserializer<'de, E>>::Deserializer;
++
++    fn from(self) -> Self::Deserializer {
++        self.into_deserializer()
++    }
++}
++
++pub struct StrDeserializer<'a, E> {
++    value: &'a str,
++    marker: PhantomData<E>,
++}
++
++impl<'a, E> IdentifierDeserializer<'a, E> for &'a str
++where
++    E: Error,
++{
++    type Deserializer = StrDeserializer<'a, E>;
++
++    fn from(self) -> Self::Deserializer {
++        StrDeserializer {
++            value: self,
++            marker: PhantomData,
++        }
++    }
++}
++
++impl<'de, 'a, E> Deserializer<'de> for StrDeserializer<'a, E>
++where
++    E: Error,
++{
++    type Error = E;
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>,
++    {
++        visitor.visit_str(self.value)
++    }
++
++    forward_to_deserialize_any! {
++        bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++        byte_buf option unit unit_struct newtype_struct seq tuple tuple_struct
++        map struct enum identifier ignored_any
++    }
++}
++
++pub struct BytesDeserializer<'a, E> {
++    value: &'a [u8],
++    marker: PhantomData<E>,
++}
++
++impl<'a, E> IdentifierDeserializer<'a, E> for &'a [u8]
++where
++    E: Error,
++{
++    type Deserializer = BytesDeserializer<'a, E>;
++
++    fn from(self) -> Self::Deserializer {
++        BytesDeserializer {
++            value: self,
++            marker: PhantomData,
++        }
++    }
++}
++
++impl<'de, 'a, E> Deserializer<'de> for BytesDeserializer<'a, E>
++where
++    E: Error,
++{
++    type Error = E;
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
++    where
++        V: Visitor<'de>,
++    {
++        visitor.visit_bytes(self.value)
++    }
++
++    forward_to_deserialize_any! {
++        bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
++        byte_buf option unit unit_struct newtype_struct seq tuple tuple_struct
++        map struct enum identifier ignored_any
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..04676138582da4330ffff35246519698df86e968
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,148 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++#[doc(hidden)]
++#[macro_export]
++macro_rules! __private_serialize {
++    () => {
++        trait Serialize {
++            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++            where
++                S: $crate::Serializer;
++        }
++    };
++}
++
++#[doc(hidden)]
++#[macro_export]
++macro_rules! __private_deserialize {
++    () => {
++        trait Deserialize<'de>: Sized {
++            fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
++            where
++                D: $crate::Deserializer<'de>;
++        }
++    };
++}
++
++/// Used only by Serde doc tests. Not public API.
++#[doc(hidden)]
++#[macro_export]
++macro_rules! __serialize_unimplemented {
++    ($($func:ident)*) => {
++        $(
++            __serialize_unimplemented_helper!($func);
++        )*
++    };
++}
++
++#[doc(hidden)]
++#[macro_export]
++macro_rules! __serialize_unimplemented_method {
++    ($func:ident $(<$t:ident>)* ($($arg:ty),*) -> $ret:ident) => {
++        fn $func $(<$t: ?Sized + $crate::Serialize>)* (self $(, _: $arg)*) -> $crate::export::Result<Self::$ret, Self::Error> {
++            unimplemented!()
++        }
++    };
++}
++
++#[doc(hidden)]
++#[macro_export]
++macro_rules! __serialize_unimplemented_helper {
++    (bool) => {
++        __serialize_unimplemented_method!(serialize_bool(bool) -> Ok);
++    };
++    (i8) => {
++        __serialize_unimplemented_method!(serialize_i8(i8) -> Ok);
++    };
++    (i16) => {
++        __serialize_unimplemented_method!(serialize_i16(i16) -> Ok);
++    };
++    (i32) => {
++        __serialize_unimplemented_method!(serialize_i32(i32) -> Ok);
++    };
++    (i64) => {
++        __serialize_unimplemented_method!(serialize_i64(i64) -> Ok);
++    };
++    (u8) => {
++        __serialize_unimplemented_method!(serialize_u8(u8) -> Ok);
++    };
++    (u16) => {
++        __serialize_unimplemented_method!(serialize_u16(u16) -> Ok);
++    };
++    (u32) => {
++        __serialize_unimplemented_method!(serialize_u32(u32) -> Ok);
++    };
++    (u64) => {
++        __serialize_unimplemented_method!(serialize_u64(u64) -> Ok);
++    };
++    (f32) => {
++        __serialize_unimplemented_method!(serialize_f32(f32) -> Ok);
++    };
++    (f64) => {
++        __serialize_unimplemented_method!(serialize_f64(f64) -> Ok);
++    };
++    (char) => {
++        __serialize_unimplemented_method!(serialize_char(char) -> Ok);
++    };
++    (str) => {
++        __serialize_unimplemented_method!(serialize_str(&str) -> Ok);
++    };
++    (bytes) => {
++        __serialize_unimplemented_method!(serialize_bytes(&[u8]) -> Ok);
++    };
++    (none) => {
++        __serialize_unimplemented_method!(serialize_none() -> Ok);
++    };
++    (some) => {
++        __serialize_unimplemented_method!(serialize_some<T>(&T) -> Ok);
++    };
++    (unit) => {
++        __serialize_unimplemented_method!(serialize_unit() -> Ok);
++    };
++    (unit_struct) => {
++        __serialize_unimplemented_method!(serialize_unit_struct(&str) -> Ok);
++    };
++    (unit_variant) => {
++        __serialize_unimplemented_method!(serialize_unit_variant(&str, u32, &str) -> Ok);
++    };
++    (newtype_struct) => {
++        __serialize_unimplemented_method!(serialize_newtype_struct<T>(&str, &T) -> Ok);
++    };
++    (newtype_variant) => {
++        __serialize_unimplemented_method!(serialize_newtype_variant<T>(&str, u32, &str, &T) -> Ok);
++    };
++    (seq) => {
++        type SerializeSeq = $crate::ser::Impossible<Self::Ok, Self::Error>;
++        __serialize_unimplemented_method!(serialize_seq(Option<usize>) -> SerializeSeq);
++    };
++    (tuple) => {
++        type SerializeTuple = $crate::ser::Impossible<Self::Ok, Self::Error>;
++        __serialize_unimplemented_method!(serialize_tuple(usize) -> SerializeTuple);
++    };
++    (tuple_struct) => {
++        type SerializeTupleStruct = $crate::ser::Impossible<Self::Ok, Self::Error>;
++        __serialize_unimplemented_method!(serialize_tuple_struct(&str, usize) -> SerializeTupleStruct);
++    };
++    (tuple_variant) => {
++        type SerializeTupleVariant = $crate::ser::Impossible<Self::Ok, Self::Error>;
++        __serialize_unimplemented_method!(serialize_tuple_variant(&str, u32, &str, usize) -> SerializeTupleVariant);
++    };
++    (map) => {
++        type SerializeMap = $crate::ser::Impossible<Self::Ok, Self::Error>;
++        __serialize_unimplemented_method!(serialize_map(Option<usize>) -> SerializeMap);
++    };
++    (struct) => {
++        type SerializeStruct = $crate::ser::Impossible<Self::Ok, Self::Error>;
++        __serialize_unimplemented_method!(serialize_struct(&str, usize) -> SerializeStruct);
++    };
++    (struct_variant) => {
++        type SerializeStructVariant = $crate::ser::Impossible<Self::Ok, Self::Error>;
++        __serialize_unimplemented_method!(serialize_struct_variant(&str, u32, &str, usize) -> SerializeStructVariant);
++    };
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..98307c975628a474553755c5584911835de207f0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++mod macros;
++
++pub mod ser;
++pub mod de;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..51db594dace3faaa961c7c8d2be47acbaf173ae2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1019 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use lib::*;
++
++use ser::{self, Serialize, Serializer, SerializeMap, SerializeStruct, Impossible};
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++use self::content::{SerializeTupleVariantAsMapValue, SerializeStructVariantAsMapValue};
++
++/// Used to check that serde(getter) attributes return the expected type.
++/// Not public API.
++pub fn constrain<T: ?Sized>(t: &T) -> &T {
++    t
++}
++
++/// Not public API.
++pub fn serialize_tagged_newtype<S, T>(
++    serializer: S,
++    type_ident: &'static str,
++    variant_ident: &'static str,
++    tag: &'static str,
++    variant_name: &'static str,
++    value: &T,
++) -> Result<S::Ok, S::Error>
++where
++    S: Serializer,
++    T: Serialize,
++{
++    value.serialize(
++        TaggedSerializer {
++            type_ident: type_ident,
++            variant_ident: variant_ident,
++            tag: tag,
++            variant_name: variant_name,
++            delegate: serializer,
++        },
++    )
++}
++
++struct TaggedSerializer<S> {
++    type_ident: &'static str,
++    variant_ident: &'static str,
++    tag: &'static str,
++    variant_name: &'static str,
++    delegate: S,
++}
++
++enum Unsupported {
++    Boolean,
++    Integer,
++    Float,
++    Char,
++    String,
++    ByteArray,
++    Optional,
++    Unit,
++    UnitStruct,
++    Sequence,
++    Tuple,
++    TupleStruct,
++    #[cfg(not(any(feature = "std", feature = "alloc")))]
++    Enum,
++}
++
++impl Display for Unsupported {
++    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        match *self {
++            Unsupported::Boolean => formatter.write_str("a boolean"),
++            Unsupported::Integer => formatter.write_str("an integer"),
++            Unsupported::Float => formatter.write_str("a float"),
++            Unsupported::Char => formatter.write_str("a char"),
++            Unsupported::String => formatter.write_str("a string"),
++            Unsupported::ByteArray => formatter.write_str("a byte array"),
++            Unsupported::Optional => formatter.write_str("an optional"),
++            Unsupported::Unit => formatter.write_str("unit"),
++            Unsupported::UnitStruct => formatter.write_str("a unit struct"),
++            Unsupported::Sequence => formatter.write_str("a sequence"),
++            Unsupported::Tuple => formatter.write_str("a tuple"),
++            Unsupported::TupleStruct => formatter.write_str("a tuple struct"),
++            #[cfg(not(any(feature = "std", feature = "alloc")))]
++            Unsupported::Enum => formatter.write_str("an enum"),
++        }
++    }
++}
++
++impl<S> TaggedSerializer<S>
++where
++    S: Serializer,
++{
++    fn bad_type(self, what: Unsupported) -> S::Error {
++        ser::Error::custom(
++            format_args!(
++            "cannot serialize tagged newtype variant {}::{} containing {}",
++            self.type_ident,
++            self.variant_ident,
++            what),
++        )
++    }
++}
++
++impl<S> Serializer for TaggedSerializer<S>
++where
++    S: Serializer,
++{
++    type Ok = S::Ok;
++    type Error = S::Error;
++
++    type SerializeSeq = Impossible<S::Ok, S::Error>;
++    type SerializeTuple = Impossible<S::Ok, S::Error>;
++    type SerializeTupleStruct = Impossible<S::Ok, S::Error>;
++    type SerializeMap = S::SerializeMap;
++    type SerializeStruct = S::SerializeStruct;
++
++    #[cfg(not(any(feature = "std", feature = "alloc")))]
++    type SerializeTupleVariant = Impossible<S::Ok, S::Error>;
++    #[cfg(any(feature = "std", feature = "alloc"))]
++    type SerializeTupleVariant = SerializeTupleVariantAsMapValue<S::SerializeMap>;
++
++    #[cfg(not(any(feature = "std", feature = "alloc")))]
++    type SerializeStructVariant = Impossible<S::Ok, S::Error>;
++    #[cfg(any(feature = "std", feature = "alloc"))]
++    type SerializeStructVariant = SerializeStructVariantAsMapValue<S::SerializeMap>;
++
++    fn serialize_bool(self, _: bool) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::Boolean))
++    }
++
++    fn serialize_i8(self, _: i8) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::Integer))
++    }
++
++    fn serialize_i16(self, _: i16) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::Integer))
++    }
++
++    fn serialize_i32(self, _: i32) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::Integer))
++    }
++
++    fn serialize_i64(self, _: i64) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::Integer))
++    }
++
++    fn serialize_u8(self, _: u8) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::Integer))
++    }
++
++    fn serialize_u16(self, _: u16) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::Integer))
++    }
++
++    fn serialize_u32(self, _: u32) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::Integer))
++    }
++
++    fn serialize_u64(self, _: u64) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::Integer))
++    }
++
++    fn serialize_f32(self, _: f32) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::Float))
++    }
++
++    fn serialize_f64(self, _: f64) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::Float))
++    }
++
++    fn serialize_char(self, _: char) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::Char))
++    }
++
++    fn serialize_str(self, _: &str) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::String))
++    }
++
++    fn serialize_bytes(self, _: &[u8]) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::ByteArray))
++    }
++
++    fn serialize_none(self) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::Optional))
++    }
++
++    fn serialize_some<T: ?Sized>(self, _: &T) -> Result<Self::Ok, Self::Error>
++    where
++        T: Serialize,
++    {
++        Err(self.bad_type(Unsupported::Optional))
++    }
++
++    fn serialize_unit(self) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::Unit))
++    }
++
++    fn serialize_unit_struct(self, _: &'static str) -> Result<Self::Ok, Self::Error> {
++        Err(self.bad_type(Unsupported::UnitStruct))
++    }
++
++    fn serialize_unit_variant(
++        self,
++        _: &'static str,
++        _: u32,
++        inner_variant: &'static str,
++    ) -> Result<Self::Ok, Self::Error> {
++        let mut map = try!(self.delegate.serialize_map(Some(2)));
++        try!(map.serialize_entry(self.tag, self.variant_name));
++        try!(map.serialize_entry(inner_variant, &()));
++        map.end()
++    }
++
++    fn serialize_newtype_struct<T: ?Sized>(
++        self,
++        _: &'static str,
++        value: &T,
++    ) -> Result<Self::Ok, Self::Error>
++    where
++        T: Serialize,
++    {
++        value.serialize(self)
++    }
++
++    fn serialize_newtype_variant<T: ?Sized>(
++        self,
++        _: &'static str,
++        _: u32,
++        inner_variant: &'static str,
++        inner_value: &T,
++    ) -> Result<Self::Ok, Self::Error>
++    where
++        T: Serialize,
++    {
++        let mut map = try!(self.delegate.serialize_map(Some(2)));
++        try!(map.serialize_entry(self.tag, self.variant_name));
++        try!(map.serialize_entry(inner_variant, inner_value));
++        map.end()
++    }
++
++    fn serialize_seq(self, _: Option<usize>) -> Result<Self::SerializeSeq, Self::Error> {
++        Err(self.bad_type(Unsupported::Sequence))
++    }
++
++    fn serialize_tuple(self, _: usize) -> Result<Self::SerializeTuple, Self::Error> {
++        Err(self.bad_type(Unsupported::Tuple))
++    }
++
++    fn serialize_tuple_struct(
++        self,
++        _: &'static str,
++        _: usize,
++    ) -> Result<Self::SerializeTupleStruct, Self::Error> {
++        Err(self.bad_type(Unsupported::TupleStruct))
++    }
++
++    #[cfg(not(any(feature = "std", feature = "alloc")))]
++    fn serialize_tuple_variant(
++        self,
++        _: &'static str,
++        _: u32,
++        _: &'static str,
++        _: usize,
++    ) -> Result<Self::SerializeTupleVariant, Self::Error> {
++        // Lack of push-based serialization means we need to buffer the content
++        // of the tuple variant, so it requires std.
++        Err(self.bad_type(Unsupported::Enum))
++    }
++
++    #[cfg(any(feature = "std", feature = "alloc"))]
++    fn serialize_tuple_variant(
++        self,
++        _: &'static str,
++        _: u32,
++        inner_variant: &'static str,
++        len: usize,
++    ) -> Result<Self::SerializeTupleVariant, Self::Error> {
++        let mut map = try!(self.delegate.serialize_map(Some(2)));
++        try!(map.serialize_entry(self.tag, self.variant_name));
++        try!(map.serialize_key(inner_variant));
++        Ok(SerializeTupleVariantAsMapValue::new(map, inner_variant, len),)
++    }
++
++    fn serialize_map(self, len: Option<usize>) -> Result<Self::SerializeMap, Self::Error> {
++        let mut map = try!(self.delegate.serialize_map(len.map(|len| len + 1)));
++        try!(map.serialize_entry(self.tag, self.variant_name));
++        Ok(map)
++    }
++
++    fn serialize_struct(
++        self,
++        name: &'static str,
++        len: usize,
++    ) -> Result<Self::SerializeStruct, Self::Error> {
++        let mut state = try!(self.delegate.serialize_struct(name, len + 1));
++        try!(state.serialize_field(self.tag, self.variant_name));
++        Ok(state)
++    }
++
++    #[cfg(not(any(feature = "std", feature = "alloc")))]
++    fn serialize_struct_variant(
++        self,
++        _: &'static str,
++        _: u32,
++        _: &'static str,
++        _: usize,
++    ) -> Result<Self::SerializeStructVariant, Self::Error> {
++        // Lack of push-based serialization means we need to buffer the content
++        // of the struct variant, so it requires std.
++        Err(self.bad_type(Unsupported::Enum))
++    }
++
++    #[cfg(any(feature = "std", feature = "alloc"))]
++    fn serialize_struct_variant(
++        self,
++        _: &'static str,
++        _: u32,
++        inner_variant: &'static str,
++        len: usize,
++    ) -> Result<Self::SerializeStructVariant, Self::Error> {
++        let mut map = try!(self.delegate.serialize_map(Some(2)));
++        try!(map.serialize_entry(self.tag, self.variant_name));
++        try!(map.serialize_key(inner_variant));
++        Ok(SerializeStructVariantAsMapValue::new(map, inner_variant, len),)
++    }
++
++    #[cfg(not(any(feature = "std", feature = "alloc")))]
++    fn collect_str<T: ?Sized>(self, _: &T) -> Result<Self::Ok, Self::Error>
++    where
++        T: Display,
++    {
++        Err(self.bad_type(Unsupported::String))
++    }
++}
++
++/// Used only by Serde doc tests. Not public API.
++#[doc(hidden)]
++#[derive(Debug)]
++pub struct Error;
++
++impl ser::Error for Error {
++    fn custom<T>(_: T) -> Self
++    where
++        T: Display,
++    {
++        unimplemented!()
++    }
++}
++
++#[cfg(feature = "std")]
++impl error::Error for Error {
++    fn description(&self) -> &str {
++        unimplemented!()
++    }
++}
++
++impl Display for Error {
++    fn fmt(&self, _: &mut fmt::Formatter) -> fmt::Result {
++        unimplemented!()
++    }
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++mod content {
++    use lib::*;
++
++    use ser::{self, Serialize, Serializer};
++
++    pub struct SerializeTupleVariantAsMapValue<M> {
++        map: M,
++        name: &'static str,
++        fields: Vec<Content>,
++    }
++
++    impl<M> SerializeTupleVariantAsMapValue<M> {
++        pub fn new(map: M, name: &'static str, len: usize) -> Self {
++            SerializeTupleVariantAsMapValue {
++                map: map,
++                name: name,
++                fields: Vec::with_capacity(len),
++            }
++        }
++    }
++
++    impl<M> ser::SerializeTupleVariant for SerializeTupleVariantAsMapValue<M>
++    where
++        M: ser::SerializeMap,
++    {
++        type Ok = M::Ok;
++        type Error = M::Error;
++
++        fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), M::Error>
++        where
++            T: Serialize,
++        {
++            let value = try!(value.serialize(ContentSerializer::<M::Error>::new()));
++            self.fields.push(value);
++            Ok(())
++        }
++
++        fn end(mut self) -> Result<M::Ok, M::Error> {
++            try!(self.map.serialize_value(&Content::TupleStruct(self.name, self.fields)));
++            self.map.end()
++        }
++    }
++
++    pub struct SerializeStructVariantAsMapValue<M> {
++        map: M,
++        name: &'static str,
++        fields: Vec<(&'static str, Content)>,
++    }
++
++    impl<M> SerializeStructVariantAsMapValue<M> {
++        pub fn new(map: M, name: &'static str, len: usize) -> Self {
++            SerializeStructVariantAsMapValue {
++                map: map,
++                name: name,
++                fields: Vec::with_capacity(len),
++            }
++        }
++    }
++
++    impl<M> ser::SerializeStructVariant for SerializeStructVariantAsMapValue<M>
++    where
++        M: ser::SerializeMap,
++    {
++        type Ok = M::Ok;
++        type Error = M::Error;
++
++        fn serialize_field<T: ?Sized>(
++            &mut self,
++            key: &'static str,
++            value: &T,
++        ) -> Result<(), M::Error>
++        where
++            T: Serialize,
++        {
++            let value = try!(value.serialize(ContentSerializer::<M::Error>::new()));
++            self.fields.push((key, value));
++            Ok(())
++        }
++
++        fn end(mut self) -> Result<M::Ok, M::Error> {
++            try!(self.map.serialize_value(&Content::Struct(self.name, self.fields)));
++            self.map.end()
++        }
++    }
++
++    #[derive(Debug)]
++    enum Content {
++        Bool(bool),
++
++        U8(u8),
++        U16(u16),
++        U32(u32),
++        U64(u64),
++
++        I8(i8),
++        I16(i16),
++        I32(i32),
++        I64(i64),
++
++        F32(f32),
++        F64(f64),
++
++        Char(char),
++        String(String),
++        Bytes(Vec<u8>),
++
++        None,
++        Some(Box<Content>),
++
++        Unit,
++        UnitStruct(&'static str),
++        UnitVariant(&'static str, u32, &'static str),
++        NewtypeStruct(&'static str, Box<Content>),
++        NewtypeVariant(&'static str, u32, &'static str, Box<Content>),
++
++        Seq(Vec<Content>),
++        Tuple(Vec<Content>),
++        TupleStruct(&'static str, Vec<Content>),
++        TupleVariant(&'static str, u32, &'static str, Vec<Content>),
++        Map(Vec<(Content, Content)>),
++        Struct(&'static str, Vec<(&'static str, Content)>),
++        StructVariant(&'static str, u32, &'static str, Vec<(&'static str, Content)>),
++    }
++
++    impl Serialize for Content {
++        fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++        where
++            S: Serializer,
++        {
++            match *self {
++                Content::Bool(b) => serializer.serialize_bool(b),
++                Content::U8(u) => serializer.serialize_u8(u),
++                Content::U16(u) => serializer.serialize_u16(u),
++                Content::U32(u) => serializer.serialize_u32(u),
++                Content::U64(u) => serializer.serialize_u64(u),
++                Content::I8(i) => serializer.serialize_i8(i),
++                Content::I16(i) => serializer.serialize_i16(i),
++                Content::I32(i) => serializer.serialize_i32(i),
++                Content::I64(i) => serializer.serialize_i64(i),
++                Content::F32(f) => serializer.serialize_f32(f),
++                Content::F64(f) => serializer.serialize_f64(f),
++                Content::Char(c) => serializer.serialize_char(c),
++                Content::String(ref s) => serializer.serialize_str(s),
++                Content::Bytes(ref b) => serializer.serialize_bytes(b),
++                Content::None => serializer.serialize_none(),
++                Content::Some(ref c) => serializer.serialize_some(&**c),
++                Content::Unit => serializer.serialize_unit(),
++                Content::UnitStruct(n) => serializer.serialize_unit_struct(n),
++                Content::UnitVariant(n, i, v) => serializer.serialize_unit_variant(n, i, v),
++                Content::NewtypeStruct(n, ref c) => serializer.serialize_newtype_struct(n, &**c),
++                Content::NewtypeVariant(n, i, v, ref c) => {
++                    serializer.serialize_newtype_variant(n, i, v, &**c)
++                }
++                Content::Seq(ref elements) => elements.serialize(serializer),
++                Content::Tuple(ref elements) => {
++                    use ser::SerializeTuple;
++                    let mut tuple = try!(serializer.serialize_tuple(elements.len()));
++                    for e in elements {
++                        try!(tuple.serialize_element(e));
++                    }
++                    tuple.end()
++                }
++                Content::TupleStruct(n, ref fields) => {
++                    use ser::SerializeTupleStruct;
++                    let mut ts = try!(serializer.serialize_tuple_struct(n, fields.len()));
++                    for f in fields {
++                        try!(ts.serialize_field(f));
++                    }
++                    ts.end()
++                }
++                Content::TupleVariant(n, i, v, ref fields) => {
++                    use ser::SerializeTupleVariant;
++                    let mut tv = try!(serializer.serialize_tuple_variant(n, i, v, fields.len()));
++                    for f in fields {
++                        try!(tv.serialize_field(f));
++                    }
++                    tv.end()
++                }
++                Content::Map(ref entries) => {
++                    use ser::SerializeMap;
++                    let mut map = try!(serializer.serialize_map(Some(entries.len())));
++                    for &(ref k, ref v) in entries {
++                        try!(map.serialize_entry(k, v));
++                    }
++                    map.end()
++                }
++                Content::Struct(n, ref fields) => {
++                    use ser::SerializeStruct;
++                    let mut s = try!(serializer.serialize_struct(n, fields.len()));
++                    for &(k, ref v) in fields {
++                        try!(s.serialize_field(k, v));
++                    }
++                    s.end()
++                }
++                Content::StructVariant(n, i, v, ref fields) => {
++                    use ser::SerializeStructVariant;
++                    let mut sv = try!(serializer.serialize_struct_variant(n, i, v, fields.len()));
++                    for &(k, ref v) in fields {
++                        try!(sv.serialize_field(k, v));
++                    }
++                    sv.end()
++                }
++            }
++        }
++    }
++
++    struct ContentSerializer<E> {
++        error: PhantomData<E>,
++    }
++
++    impl<E> ContentSerializer<E> {
++        fn new() -> Self {
++            ContentSerializer { error: PhantomData }
++        }
++    }
++
++    impl<E> Serializer for ContentSerializer<E>
++    where
++        E: ser::Error,
++    {
++        type Ok = Content;
++        type Error = E;
++
++        type SerializeSeq = SerializeSeq<E>;
++        type SerializeTuple = SerializeTuple<E>;
++        type SerializeTupleStruct = SerializeTupleStruct<E>;
++        type SerializeTupleVariant = SerializeTupleVariant<E>;
++        type SerializeMap = SerializeMap<E>;
++        type SerializeStruct = SerializeStruct<E>;
++        type SerializeStructVariant = SerializeStructVariant<E>;
++
++        fn serialize_bool(self, v: bool) -> Result<Content, E> {
++            Ok(Content::Bool(v))
++        }
++
++        fn serialize_i8(self, v: i8) -> Result<Content, E> {
++            Ok(Content::I8(v))
++        }
++
++        fn serialize_i16(self, v: i16) -> Result<Content, E> {
++            Ok(Content::I16(v))
++        }
++
++        fn serialize_i32(self, v: i32) -> Result<Content, E> {
++            Ok(Content::I32(v))
++        }
++
++        fn serialize_i64(self, v: i64) -> Result<Content, E> {
++            Ok(Content::I64(v))
++        }
++
++        fn serialize_u8(self, v: u8) -> Result<Content, E> {
++            Ok(Content::U8(v))
++        }
++
++        fn serialize_u16(self, v: u16) -> Result<Content, E> {
++            Ok(Content::U16(v))
++        }
++
++        fn serialize_u32(self, v: u32) -> Result<Content, E> {
++            Ok(Content::U32(v))
++        }
++
++        fn serialize_u64(self, v: u64) -> Result<Content, E> {
++            Ok(Content::U64(v))
++        }
++
++        fn serialize_f32(self, v: f32) -> Result<Content, E> {
++            Ok(Content::F32(v))
++        }
++
++        fn serialize_f64(self, v: f64) -> Result<Content, E> {
++            Ok(Content::F64(v))
++        }
++
++        fn serialize_char(self, v: char) -> Result<Content, E> {
++            Ok(Content::Char(v))
++        }
++
++        fn serialize_str(self, value: &str) -> Result<Content, E> {
++            Ok(Content::String(value.to_owned()))
++        }
++
++        fn serialize_bytes(self, value: &[u8]) -> Result<Content, E> {
++            Ok(Content::Bytes(value.to_owned()))
++        }
++
++        fn serialize_none(self) -> Result<Content, E> {
++            Ok(Content::None)
++        }
++
++        fn serialize_some<T: ?Sized>(self, value: &T) -> Result<Content, E>
++        where
++            T: Serialize,
++        {
++            Ok(Content::Some(Box::new(try!(value.serialize(self)))))
++        }
++
++        fn serialize_unit(self) -> Result<Content, E> {
++            Ok(Content::Unit)
++        }
++
++        fn serialize_unit_struct(self, name: &'static str) -> Result<Content, E> {
++            Ok(Content::UnitStruct(name))
++        }
++
++        fn serialize_unit_variant(
++            self,
++            name: &'static str,
++            variant_index: u32,
++            variant: &'static str,
++        ) -> Result<Content, E> {
++            Ok(Content::UnitVariant(name, variant_index, variant))
++        }
++
++        fn serialize_newtype_struct<T: ?Sized>(
++            self,
++            name: &'static str,
++            value: &T,
++        ) -> Result<Content, E>
++        where
++            T: Serialize,
++        {
++            Ok(Content::NewtypeStruct(name, Box::new(try!(value.serialize(self)))),)
++        }
++
++        fn serialize_newtype_variant<T: ?Sized>(
++            self,
++            name: &'static str,
++            variant_index: u32,
++            variant: &'static str,
++            value: &T,
++        ) -> Result<Content, E>
++        where
++            T: Serialize,
++        {
++            Ok(
++                Content::NewtypeVariant(
++                    name,
++                    variant_index,
++                    variant,
++                    Box::new(try!(value.serialize(self))),
++                ),
++            )
++        }
++
++        fn serialize_seq(self, len: Option<usize>) -> Result<Self::SerializeSeq, E> {
++            Ok(
++                SerializeSeq {
++                    elements: Vec::with_capacity(len.unwrap_or(0)),
++                    error: PhantomData,
++                },
++            )
++        }
++
++        fn serialize_tuple(self, len: usize) -> Result<Self::SerializeTuple, E> {
++            Ok(
++                SerializeTuple {
++                    elements: Vec::with_capacity(len),
++                    error: PhantomData,
++                },
++            )
++        }
++
++        fn serialize_tuple_struct(
++            self,
++            name: &'static str,
++            len: usize,
++        ) -> Result<Self::SerializeTupleStruct, E> {
++            Ok(
++                SerializeTupleStruct {
++                    name: name,
++                    fields: Vec::with_capacity(len),
++                    error: PhantomData,
++                },
++            )
++        }
++
++        fn serialize_tuple_variant(
++            self,
++            name: &'static str,
++            variant_index: u32,
++            variant: &'static str,
++            len: usize,
++        ) -> Result<Self::SerializeTupleVariant, E> {
++            Ok(
++                SerializeTupleVariant {
++                    name: name,
++                    variant_index: variant_index,
++                    variant: variant,
++                    fields: Vec::with_capacity(len),
++                    error: PhantomData,
++                },
++            )
++        }
++
++        fn serialize_map(self, len: Option<usize>) -> Result<Self::SerializeMap, E> {
++            Ok(
++                SerializeMap {
++                    entries: Vec::with_capacity(len.unwrap_or(0)),
++                    key: None,
++                    error: PhantomData,
++                },
++            )
++        }
++
++        fn serialize_struct(
++            self,
++            name: &'static str,
++            len: usize,
++        ) -> Result<Self::SerializeStruct, E> {
++            Ok(
++                SerializeStruct {
++                    name: name,
++                    fields: Vec::with_capacity(len),
++                    error: PhantomData,
++                },
++            )
++        }
++
++        fn serialize_struct_variant(
++            self,
++            name: &'static str,
++            variant_index: u32,
++            variant: &'static str,
++            len: usize,
++        ) -> Result<Self::SerializeStructVariant, E> {
++            Ok(
++                SerializeStructVariant {
++                    name: name,
++                    variant_index: variant_index,
++                    variant: variant,
++                    fields: Vec::with_capacity(len),
++                    error: PhantomData,
++                },
++            )
++        }
++    }
++
++    struct SerializeSeq<E> {
++        elements: Vec<Content>,
++        error: PhantomData<E>,
++    }
++
++    impl<E> ser::SerializeSeq for SerializeSeq<E>
++    where
++        E: ser::Error,
++    {
++        type Ok = Content;
++        type Error = E;
++
++        fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), E>
++        where
++            T: Serialize,
++        {
++            let value = try!(value.serialize(ContentSerializer::<E>::new()));
++            self.elements.push(value);
++            Ok(())
++        }
++
++        fn end(self) -> Result<Content, E> {
++            Ok(Content::Seq(self.elements))
++        }
++    }
++
++    struct SerializeTuple<E> {
++        elements: Vec<Content>,
++        error: PhantomData<E>,
++    }
++
++    impl<E> ser::SerializeTuple for SerializeTuple<E>
++    where
++        E: ser::Error,
++    {
++        type Ok = Content;
++        type Error = E;
++
++        fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), E>
++        where
++            T: Serialize,
++        {
++            let value = try!(value.serialize(ContentSerializer::<E>::new()));
++            self.elements.push(value);
++            Ok(())
++        }
++
++        fn end(self) -> Result<Content, E> {
++            Ok(Content::Tuple(self.elements))
++        }
++    }
++
++    struct SerializeTupleStruct<E> {
++        name: &'static str,
++        fields: Vec<Content>,
++        error: PhantomData<E>,
++    }
++
++    impl<E> ser::SerializeTupleStruct for SerializeTupleStruct<E>
++    where
++        E: ser::Error,
++    {
++        type Ok = Content;
++        type Error = E;
++
++        fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), E>
++        where
++            T: Serialize,
++        {
++            let value = try!(value.serialize(ContentSerializer::<E>::new()));
++            self.fields.push(value);
++            Ok(())
++        }
++
++        fn end(self) -> Result<Content, E> {
++            Ok(Content::TupleStruct(self.name, self.fields))
++        }
++    }
++
++    struct SerializeTupleVariant<E> {
++        name: &'static str,
++        variant_index: u32,
++        variant: &'static str,
++        fields: Vec<Content>,
++        error: PhantomData<E>,
++    }
++
++    impl<E> ser::SerializeTupleVariant for SerializeTupleVariant<E>
++    where
++        E: ser::Error,
++    {
++        type Ok = Content;
++        type Error = E;
++
++        fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), E>
++        where
++            T: Serialize,
++        {
++            let value = try!(value.serialize(ContentSerializer::<E>::new()));
++            self.fields.push(value);
++            Ok(())
++        }
++
++        fn end(self) -> Result<Content, E> {
++            Ok(Content::TupleVariant(self.name, self.variant_index, self.variant, self.fields),)
++        }
++    }
++
++    struct SerializeMap<E> {
++        entries: Vec<(Content, Content)>,
++        key: Option<Content>,
++        error: PhantomData<E>,
++    }
++
++    impl<E> ser::SerializeMap for SerializeMap<E>
++    where
++        E: ser::Error,
++    {
++        type Ok = Content;
++        type Error = E;
++
++        fn serialize_key<T: ?Sized>(&mut self, key: &T) -> Result<(), E>
++        where
++            T: Serialize,
++        {
++            let key = try!(key.serialize(ContentSerializer::<E>::new()));
++            self.key = Some(key);
++            Ok(())
++        }
++
++        fn serialize_value<T: ?Sized>(&mut self, value: &T) -> Result<(), E>
++        where
++            T: Serialize,
++        {
++            let key = self.key
++                .take()
++                .expect("serialize_value called before serialize_key");
++            let value = try!(value.serialize(ContentSerializer::<E>::new()));
++            self.entries.push((key, value));
++            Ok(())
++        }
++
++        fn end(self) -> Result<Content, E> {
++            Ok(Content::Map(self.entries))
++        }
++
++        fn serialize_entry<K: ?Sized, V: ?Sized>(&mut self, key: &K, value: &V) -> Result<(), E>
++        where
++            K: Serialize,
++            V: Serialize,
++        {
++            let key = try!(key.serialize(ContentSerializer::<E>::new()));
++            let value = try!(value.serialize(ContentSerializer::<E>::new()));
++            self.entries.push((key, value));
++            Ok(())
++        }
++    }
++
++    struct SerializeStruct<E> {
++        name: &'static str,
++        fields: Vec<(&'static str, Content)>,
++        error: PhantomData<E>,
++    }
++
++    impl<E> ser::SerializeStruct for SerializeStruct<E>
++    where
++        E: ser::Error,
++    {
++        type Ok = Content;
++        type Error = E;
++
++        fn serialize_field<T: ?Sized>(&mut self, key: &'static str, value: &T) -> Result<(), E>
++        where
++            T: Serialize,
++        {
++            let value = try!(value.serialize(ContentSerializer::<E>::new()));
++            self.fields.push((key, value));
++            Ok(())
++        }
++
++        fn end(self) -> Result<Content, E> {
++            Ok(Content::Struct(self.name, self.fields))
++        }
++    }
++
++    struct SerializeStructVariant<E> {
++        name: &'static str,
++        variant_index: u32,
++        variant: &'static str,
++        fields: Vec<(&'static str, Content)>,
++        error: PhantomData<E>,
++    }
++
++    impl<E> ser::SerializeStructVariant for SerializeStructVariant<E>
++    where
++        E: ser::Error,
++    {
++        type Ok = Content;
++        type Error = E;
++
++        fn serialize_field<T: ?Sized>(&mut self, key: &'static str, value: &T) -> Result<(), E>
++        where
++            T: Serialize,
++        {
++            let value = try!(value.serialize(ContentSerializer::<E>::new()));
++            self.fields.push((key, value));
++            Ok(())
++        }
++
++        fn end(self) -> Result<Content, E> {
++            Ok(Content::StructVariant(self.name, self.variant_index, self.variant, self.fields),)
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e0caf4c1d3d05439438ab89c006f2a94c109ead5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,632 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use lib::*;
++
++use ser::{Serialize, SerializeTuple, Serializer};
++
++#[cfg(feature = "std")]
++use ser::Error;
++
++////////////////////////////////////////////////////////////////////////////////
++
++macro_rules! primitive_impl {
++    ($ty:ident, $method:ident $($cast:tt)*) => {
++        impl Serialize for $ty {
++            #[inline]
++            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++            where
++                S: Serializer,
++            {
++                serializer.$method(*self $($cast)*)
++            }
++        }
++    }
++}
++
++primitive_impl!(bool, serialize_bool);
++primitive_impl!(isize, serialize_i64 as i64);
++primitive_impl!(i8, serialize_i8);
++primitive_impl!(i16, serialize_i16);
++primitive_impl!(i32, serialize_i32);
++primitive_impl!(i64, serialize_i64);
++primitive_impl!(usize, serialize_u64 as u64);
++primitive_impl!(u8, serialize_u8);
++primitive_impl!(u16, serialize_u16);
++primitive_impl!(u32, serialize_u32);
++primitive_impl!(u64, serialize_u64);
++primitive_impl!(f32, serialize_f32);
++primitive_impl!(f64, serialize_f64);
++primitive_impl!(char, serialize_char);
++
++////////////////////////////////////////////////////////////////////////////////
++
++impl Serialize for str {
++    #[inline]
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        serializer.serialize_str(self)
++    }
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++impl Serialize for String {
++    #[inline]
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        serializer.serialize_str(self)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(feature = "std")]
++impl Serialize for CStr {
++    #[inline]
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        serializer.serialize_bytes(self.to_bytes())
++    }
++}
++
++#[cfg(feature = "std")]
++impl Serialize for CString {
++    #[inline]
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        serializer.serialize_bytes(self.to_bytes())
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++impl<T> Serialize for Option<T>
++where
++    T: Serialize,
++{
++    #[inline]
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        match *self {
++            Some(ref value) => serializer.serialize_some(value),
++            None => serializer.serialize_none(),
++        }
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++impl<T> Serialize for PhantomData<T> {
++    #[inline]
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        serializer.serialize_unit_struct("PhantomData")
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++// Does not require T: Serialize.
++impl<T> Serialize for [T; 0] {
++    #[inline]
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        try!(serializer.serialize_tuple(0)).end()
++    }
++}
++
++macro_rules! array_impls {
++    ($($len:tt)+) => {
++        $(
++            impl<T> Serialize for [T; $len]
++            where
++                T: Serialize,
++            {
++                #[inline]
++                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++                where
++                    S: Serializer,
++                {
++                    let mut seq = try!(serializer.serialize_tuple($len));
++                    for e in self {
++                        try!(seq.serialize_element(e));
++                    }
++                    seq.end()
++                }
++            }
++        )+
++    }
++}
++
++array_impls!(01 02 03 04 05 06 07 08 09 10
++             11 12 13 14 15 16 17 18 19 20
++             21 22 23 24 25 26 27 28 29 30
++             31 32);
++
++////////////////////////////////////////////////////////////////////////////////
++
++impl<T> Serialize for [T]
++where
++    T: Serialize,
++{
++    #[inline]
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        serializer.collect_seq(self)
++    }
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++macro_rules! seq_impl {
++    ($ty:ident < T $(: $tbound1:ident $(+ $tbound2:ident)*)* $(, $typaram:ident : $bound:ident)* >) => {
++        impl<T $(, $typaram)*> Serialize for $ty<T $(, $typaram)*>
++        where
++            T: Serialize $(+ $tbound1 $(+ $tbound2)*)*,
++            $($typaram: $bound,)*
++        {
++            #[inline]
++            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++            where
++                S: Serializer,
++            {
++                serializer.collect_seq(self)
++            }
++        }
++    }
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++seq_impl!(BinaryHeap<T: Ord>);
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++seq_impl!(BTreeSet<T: Ord>);
++
++#[cfg(feature = "std")]
++seq_impl!(HashSet<T: Eq + Hash, H: BuildHasher>);
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++seq_impl!(LinkedList<T>);
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++seq_impl!(Vec<T>);
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++seq_impl!(VecDeque<T>);
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(feature = "std")]
++impl<Idx> Serialize for ops::Range<Idx>
++where
++    Idx: Serialize,
++{
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        use super::SerializeStruct;
++        let mut state = try!(serializer.serialize_struct("Range", 2));
++        try!(state.serialize_field("start", &self.start));
++        try!(state.serialize_field("end", &self.end));
++        state.end()
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++impl Serialize for () {
++    #[inline]
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        serializer.serialize_unit()
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++macro_rules! tuple_impls {
++    ($($len:expr => ($($n:tt $name:ident)+))+) => {
++        $(
++            impl<$($name),+> Serialize for ($($name,)+)
++            where
++                $($name: Serialize,)+
++            {
++                #[inline]
++                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++                where
++                    S: Serializer,
++                {
++                    let mut tuple = try!(serializer.serialize_tuple($len));
++                    $(
++                        try!(tuple.serialize_element(&self.$n));
++                    )+
++                    tuple.end()
++                }
++            }
++        )+
++    }
++}
++
++tuple_impls! {
++    1 => (0 T0)
++    2 => (0 T0 1 T1)
++    3 => (0 T0 1 T1 2 T2)
++    4 => (0 T0 1 T1 2 T2 3 T3)
++    5 => (0 T0 1 T1 2 T2 3 T3 4 T4)
++    6 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5)
++    7 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6)
++    8 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7)
++    9 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8)
++    10 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8 9 T9)
++    11 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8 9 T9 10 T10)
++    12 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8 9 T9 10 T10 11 T11)
++    13 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8 9 T9 10 T10 11 T11 12 T12)
++    14 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8 9 T9 10 T10 11 T11 12 T12 13 T13)
++    15 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8 9 T9 10 T10 11 T11 12 T12 13 T13 14 T14)
++    16 => (0 T0 1 T1 2 T2 3 T3 4 T4 5 T5 6 T6 7 T7 8 T8 9 T9 10 T10 11 T11 12 T12 13 T13 14 T14 15 T15)
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++macro_rules! map_impl {
++    ($ty:ident < K $(: $kbound1:ident $(+ $kbound2:ident)*)*, V $(, $typaram:ident : $bound:ident)* >) => {
++        impl<K, V $(, $typaram)*> Serialize for $ty<K, V $(, $typaram)*>
++        where
++            K: Serialize $(+ $kbound1 $(+ $kbound2)*)*,
++            V: Serialize,
++            $($typaram: $bound,)*
++        {
++            #[inline]
++            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++            where
++                S: Serializer,
++            {
++                serializer.collect_map(self)
++            }
++        }
++    }
++}
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++map_impl!(BTreeMap<K: Ord, V>);
++
++#[cfg(feature = "std")]
++map_impl!(HashMap<K: Eq + Hash, V, H: BuildHasher>);
++
++////////////////////////////////////////////////////////////////////////////////
++
++macro_rules! deref_impl {
++    ($($desc:tt)+) => {
++        impl $($desc)+ {
++            #[inline]
++            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++            where
++                S: Serializer,
++            {
++                (**self).serialize(serializer)
++            }
++        }
++    };
++}
++
++deref_impl!(<'a, T: ?Sized> Serialize for &'a T where T: Serialize);
++deref_impl!(<'a, T: ?Sized> Serialize for &'a mut T where T: Serialize);
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++deref_impl!(<T: ?Sized> Serialize for Box<T> where T: Serialize);
++
++#[cfg(all(feature = "rc", any(feature = "std", feature = "alloc")))]
++deref_impl!(<T> Serialize for Rc<T> where T: Serialize);
++
++#[cfg(all(feature = "rc", any(feature = "std", feature = "alloc")))]
++deref_impl!(<T> Serialize for Arc<T> where T: Serialize);
++
++#[cfg(any(feature = "std", feature = "alloc"))]
++deref_impl!(<'a, T: ?Sized> Serialize for Cow<'a, T> where T: Serialize + ToOwned);
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(feature = "unstable")]
++impl<T> Serialize for NonZero<T>
++where
++    T: Serialize + Zeroable + Clone,
++{
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        self.clone().get().serialize(serializer)
++    }
++}
++
++impl<T> Serialize for Cell<T>
++where
++    T: Serialize + Copy,
++{
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        self.get().serialize(serializer)
++    }
++}
++
++impl<T> Serialize for RefCell<T>
++where
++    T: Serialize,
++{
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        self.borrow().serialize(serializer)
++    }
++}
++
++#[cfg(feature = "std")]
++impl<T> Serialize for Mutex<T>
++where
++    T: Serialize,
++{
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        match self.lock() {
++            Ok(locked) => locked.serialize(serializer),
++            Err(_) => Err(S::Error::custom("lock poison error while serializing")),
++        }
++    }
++}
++
++#[cfg(feature = "std")]
++impl<T> Serialize for RwLock<T>
++where
++    T: Serialize,
++{
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        match self.read() {
++            Ok(locked) => locked.serialize(serializer),
++            Err(_) => Err(S::Error::custom("lock poison error while serializing")),
++        }
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++impl<T, E> Serialize for Result<T, E>
++where
++    T: Serialize,
++    E: Serialize,
++{
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        match *self {
++            Result::Ok(ref value) => serializer.serialize_newtype_variant("Result", 0, "Ok", value),
++            Result::Err(ref value) => {
++                serializer.serialize_newtype_variant("Result", 1, "Err", value)
++            }
++        }
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(feature = "std")]
++impl Serialize for Duration {
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        use super::SerializeStruct;
++        let mut state = try!(serializer.serialize_struct("Duration", 2));
++        try!(state.serialize_field("secs", &self.as_secs()));
++        try!(state.serialize_field("nanos", &self.subsec_nanos()));
++        state.end()
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(feature = "std")]
++impl Serialize for SystemTime {
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        use super::SerializeStruct;
++        let duration_since_epoch = self.duration_since(UNIX_EPOCH).expect("SystemTime must be later than UNIX_EPOCH");
++        let mut state = try!(serializer.serialize_struct("SystemTime", 2));
++        try!(state.serialize_field("secs_since_epoch", &duration_since_epoch.as_secs()));
++        try!(state.serialize_field("nanos_since_epoch", &duration_since_epoch.subsec_nanos()));
++        state.end()
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// Serialize a value that implements `Display` as a string, when that string is
++/// statically known to never have more than a constant `MAX_LEN` bytes.
++///
++/// Panics if the `Display` impl tries to write more than `MAX_LEN` bytes.
++#[cfg(feature = "std")]
++macro_rules! serialize_display_bounded_length {
++    ($value:expr, $max:expr, $serializer:expr) => {{
++        let mut buffer: [u8; $max] = unsafe { mem::uninitialized() };
++        let remaining_len = {
++            let mut remaining = &mut buffer[..];
++            write!(remaining, "{}", $value).unwrap();
++            remaining.len()
++        };
++        let written_len = buffer.len() - remaining_len;
++        let written = &buffer[..written_len];
++
++        // write! only provides fmt::Formatter to Display implementations, which
++        // has methods write_str and write_char but no method to write arbitrary
++        // bytes. Therefore `written` must be valid UTF-8.
++        let written_str = unsafe {
++            str::from_utf8_unchecked(written)
++        };
++        $serializer.serialize_str(written_str)
++    }}
++}
++
++#[cfg(feature = "std")]
++impl Serialize for net::IpAddr {
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        match *self {
++            net::IpAddr::V4(ref a) => a.serialize(serializer),
++            net::IpAddr::V6(ref a) => a.serialize(serializer),
++        }
++    }
++}
++
++#[cfg(feature = "std")]
++impl Serialize for net::Ipv4Addr {
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        /// "101.102.103.104".len()
++        const MAX_LEN: usize = 15;
++        serialize_display_bounded_length!(self, MAX_LEN, serializer)
++    }
++}
++
++#[cfg(feature = "std")]
++impl Serialize for net::Ipv6Addr {
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        /// "1000:1002:1003:1004:1005:1006:1007:1008".len()
++        const MAX_LEN: usize = 39;
++        serialize_display_bounded_length!(self, MAX_LEN, serializer)
++    }
++}
++
++#[cfg(feature = "std")]
++impl Serialize for net::SocketAddr {
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        match *self {
++            net::SocketAddr::V4(ref addr) => addr.serialize(serializer),
++            net::SocketAddr::V6(ref addr) => addr.serialize(serializer),
++        }
++    }
++}
++
++#[cfg(feature = "std")]
++impl Serialize for net::SocketAddrV4 {
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        /// "101.102.103.104:65000".len()
++        const MAX_LEN: usize = 21;
++        serialize_display_bounded_length!(self, MAX_LEN, serializer)
++    }
++}
++
++#[cfg(feature = "std")]
++impl Serialize for net::SocketAddrV6 {
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        /// "[1000:1002:1003:1004:1005:1006:1007:1008]:65000".len()
++        const MAX_LEN: usize = 47;
++        serialize_display_bounded_length!(self, MAX_LEN, serializer)
++    }
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++#[cfg(feature = "std")]
++impl Serialize for Path {
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        match self.to_str() {
++            Some(s) => s.serialize(serializer),
++            None => Err(Error::custom("path contains invalid UTF-8 characters")),
++        }
++    }
++}
++
++#[cfg(feature = "std")]
++impl Serialize for PathBuf {
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        self.as_path().serialize(serializer)
++    }
++}
++
++#[cfg(all(feature = "std", any(unix, windows)))]
++impl Serialize for OsStr {
++    #[cfg(unix)]
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        use std::os::unix::ffi::OsStrExt;
++        serializer.serialize_newtype_variant("OsString", 0, "Unix", self.as_bytes())
++    }
++
++    #[cfg(windows)]
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        use std::os::windows::ffi::OsStrExt;
++        let val = self.encode_wide().collect::<Vec<_>>();
++        serializer.serialize_newtype_variant("OsString", 1, "Windows", &val)
++    }
++}
++
++#[cfg(all(feature = "std", any(unix, windows)))]
++impl Serialize for OsString {
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer,
++    {
++        self.as_os_str().serialize(serializer)
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f72748f69be2a9fde9320bfd5c1d64506f782fb7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,227 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! This module contains `Impossible` serializer and its implementations.
++
++use lib::*;
++
++use ser::{self, Serialize, SerializeSeq, SerializeTuple, SerializeTupleStruct,
++          SerializeTupleVariant, SerializeMap, SerializeStruct, SerializeStructVariant};
++
++/// Helper type for implementing a `Serializer` that does not support
++/// serializing one of the compound types.
++///
++/// This type cannot be instantiated, but implements every one of the traits
++/// corresponding to the [`Serializer`] compound types: [`SerializeSeq`],
++/// [`SerializeTuple`], [`SerializeTupleStruct`], [`SerializeTupleVariant`],
++/// [`SerializeMap`], [`SerializeStruct`], and [`SerializeStructVariant`].
++///
++/// ```rust
++/// # #[macro_use]
++/// # extern crate serde;
++/// #
++/// # use serde::ser::{Serializer, Impossible};
++/// # use serde::private::ser::Error;
++/// #
++/// # struct MySerializer;
++/// #
++/// impl Serializer for MySerializer {
++///     type Ok = ();
++///     type Error = Error;
++///
++///     type SerializeSeq = Impossible<(), Error>;
++///     /* other associated types */
++///
++///     /// This data format does not support serializing sequences.
++///     fn serialize_seq(self,
++///                      len: Option<usize>)
++///                      -> Result<Self::SerializeSeq, Error> {
++///         // Given Impossible cannot be instantiated, the only
++///         // thing we can do here is to return an error.
++/// #         stringify! {
++///         Err(...)
++/// #         };
++/// #         unimplemented!()
++///     }
++///
++///     /* other Serializer methods */
++/// #     __serialize_unimplemented! {
++/// #         bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str bytes none some
++/// #         unit unit_struct unit_variant newtype_struct newtype_variant
++/// #         tuple tuple_struct tuple_variant map struct struct_variant
++/// #     }
++/// }
++/// #
++/// # fn main() {}
++/// ```
++///
++/// [`Serializer`]: trait.Serializer.html
++/// [`SerializeSeq`]: trait.SerializeSeq.html
++/// [`SerializeTuple`]: trait.SerializeTuple.html
++/// [`SerializeTupleStruct`]: trait.SerializeTupleStruct.html
++/// [`SerializeTupleVariant`]: trait.SerializeTupleVariant.html
++/// [`SerializeMap`]: trait.SerializeMap.html
++/// [`SerializeStruct`]: trait.SerializeStruct.html
++/// [`SerializeStructVariant`]: trait.SerializeStructVariant.html
++pub struct Impossible<Ok, Error> {
++    void: Void,
++    ok: PhantomData<Ok>,
++    error: PhantomData<Error>,
++}
++
++enum Void {}
++
++impl<Ok, Error> SerializeSeq for Impossible<Ok, Error>
++where
++    Error: ser::Error,
++{
++    type Ok = Ok;
++    type Error = Error;
++
++    fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), Error>
++    where
++        T: Serialize,
++    {
++        let _ = value;
++        match self.void {}
++    }
++
++    fn end(self) -> Result<Ok, Error> {
++        match self.void {}
++    }
++}
++
++impl<Ok, Error> SerializeTuple for Impossible<Ok, Error>
++where
++    Error: ser::Error,
++{
++    type Ok = Ok;
++    type Error = Error;
++
++    fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), Error>
++    where
++        T: Serialize,
++    {
++        let _ = value;
++        match self.void {}
++    }
++
++    fn end(self) -> Result<Ok, Error> {
++        match self.void {}
++    }
++}
++
++impl<Ok, Error> SerializeTupleStruct for Impossible<Ok, Error>
++where
++    Error: ser::Error,
++{
++    type Ok = Ok;
++    type Error = Error;
++
++    fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), Error>
++    where
++        T: Serialize,
++    {
++        let _ = value;
++        match self.void {}
++    }
++
++    fn end(self) -> Result<Ok, Error> {
++        match self.void {}
++    }
++}
++
++impl<Ok, Error> SerializeTupleVariant for Impossible<Ok, Error>
++where
++    Error: ser::Error,
++{
++    type Ok = Ok;
++    type Error = Error;
++
++    fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), Error>
++    where
++        T: Serialize,
++    {
++        let _ = value;
++        match self.void {}
++    }
++
++    fn end(self) -> Result<Ok, Error> {
++        match self.void {}
++    }
++}
++
++impl<Ok, Error> SerializeMap for Impossible<Ok, Error>
++where
++    Error: ser::Error,
++{
++    type Ok = Ok;
++    type Error = Error;
++
++    fn serialize_key<T: ?Sized>(&mut self, key: &T) -> Result<(), Error>
++    where
++        T: Serialize,
++    {
++        let _ = key;
++        match self.void {}
++    }
++
++    fn serialize_value<T: ?Sized>(&mut self, value: &T) -> Result<(), Error>
++    where
++        T: Serialize,
++    {
++        let _ = value;
++        match self.void {}
++    }
++
++    fn end(self) -> Result<Ok, Error> {
++        match self.void {}
++    }
++}
++
++impl<Ok, Error> SerializeStruct for Impossible<Ok, Error>
++where
++    Error: ser::Error,
++{
++    type Ok = Ok;
++    type Error = Error;
++
++    fn serialize_field<T: ?Sized>(&mut self, key: &'static str, value: &T) -> Result<(), Error>
++    where
++        T: Serialize,
++    {
++        let _ = key;
++        let _ = value;
++        match self.void {}
++    }
++
++    fn end(self) -> Result<Ok, Error> {
++        match self.void {}
++    }
++}
++
++impl<Ok, Error> SerializeStructVariant for Impossible<Ok, Error>
++where
++    Error: ser::Error,
++{
++    type Ok = Ok;
++    type Error = Error;
++
++    fn serialize_field<T: ?Sized>(&mut self, key: &'static str, value: &T) -> Result<(), Error>
++    where
++        T: Serialize,
++    {
++        let _ = key;
++        let _ = value;
++        match self.void {}
++    }
++
++    fn end(self) -> Result<Ok, Error> {
++        match self.void {}
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4356f9303acd4190663b0cb31fda4519fe4c303b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1816 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! Generic data structure serialization framework.
++//!
++//! The two most important traits in this module are [`Serialize`] and
++//! [`Serializer`].
++//!
++//!  - **A type that implements `Serialize` is a data structure** that can be
++//!    serialized to any data format supported by Serde, and conversely
++//!  - **A type that implements `Serializer` is a data format** that can
++//!    serialize any data structure supported by Serde.
++//!
++//! # The Serialize trait
++//!
++//! Serde provides [`Serialize`] implementations for many Rust primitive and
++//! standard library types. The complete list is below. All of these can be
++//! serialized using Serde out of the box.
++//!
++//! Additionally, Serde provides a procedural macro called [`serde_derive`] to
++//! automatically generate [`Serialize`] implementations for structs and enums
++//! in your program. See the [codegen section of the manual] for how to use
++//! this.
++//!
++//! In rare cases it may be necessary to implement [`Serialize`] manually for
++//! some type in your program. See the [Implementing `Serialize`] section of the
++//! manual for more about this.
++//!
++//! Third-party crates may provide [`Serialize`] implementations for types that
++//! they expose. For example the [`linked-hash-map`] crate provides a
++//! [`LinkedHashMap<K, V>`] type that is serializable by Serde because the crate
++//! provides an implementation of [`Serialize`] for it.
++//!
++//! # The Serializer trait
++//!
++//! [`Serializer`] implementations are provided by third-party crates, for
++//! example [`serde_json`], [`serde_yaml`] and [`bincode`].
++//!
++//! A partial list of well-maintained formats is given on the [Serde
++//! website][data formats].
++//!
++//! # Implementations of Serialize provided by Serde
++//!
++//!  - **Primitive types**:
++//!    - bool
++//!    - i8, i16, i32, i64, isize
++//!    - u8, u16, u32, u64, usize
++//!    - f32, f64
++//!    - char
++//!    - str
++//!    - &T and &mut T
++//!  - **Compound types**:
++//!    - [T]
++//!    - [T; 0] through [T; 32]
++//!    - tuples up to size 16
++//!  - **Common standard library types**:
++//!    - String
++//!    - Option\<T\>
++//!    - Result\<T, E\>
++//!    - PhantomData\<T\>
++//!  - **Wrapper types**:
++//!    - Box\<T\>
++//!    - Rc\<T\>
++//!    - Arc\<T\>
++//!    - Cow\<'a, T\>
++//!    - Cell\<T\>
++//!    - RefCell\<T\>
++//!    - Mutex\<T\>
++//!    - RwLock\<T\>
++//!  - **Collection types**:
++//!    - BTreeMap\<K, V\>
++//!    - BTreeSet\<T\>
++//!    - BinaryHeap\<T\>
++//!    - HashMap\<K, V, H\>
++//!    - HashSet\<T, H\>
++//!    - LinkedList\<T\>
++//!    - VecDeque\<T\>
++//!    - Vec\<T\>
++//!    - EnumSet\<T\> (unstable)
++//!  - **FFI types**:
++//!    - CStr
++//!    - CString
++//!    - OsStr
++//!    - OsString
++//!  - **Miscellaneous standard library types**:
++//!    - Duration
++//!    - SystemTime
++//!    - Path
++//!    - PathBuf
++//!    - Range\<T\>
++//!    - NonZero\<T\> (unstable)
++//!  - **Net types**:
++//!    - IpAddr
++//!    - Ipv4Addr
++//!    - Ipv6Addr
++//!    - SocketAddr
++//!    - SocketAddrV4
++//!    - SocketAddrV6
++//!
++//! [Implementing `Serialize`]: https://serde.rs/impl-serialize.html
++//! [`LinkedHashMap<K, V>`]: https://docs.rs/linked-hash-map/*/linked_hash_map/struct.LinkedHashMap.html
++//! [`Serialize`]: ../trait.Serialize.html
++//! [`Serializer`]: ../trait.Serializer.html
++//! [`bincode`]: https://github.com/TyOverby/bincode
++//! [`linked-hash-map`]: https://crates.io/crates/linked-hash-map
++//! [`serde_derive`]: https://crates.io/crates/serde_derive
++//! [`serde_json`]: https://github.com/serde-rs/json
++//! [`serde_yaml`]: https://github.com/dtolnay/serde-yaml
++//! [codegen section of the manual]: https://serde.rs/codegen.html
++//! [data formats]: https://serde.rs/#data-formats
++
++use lib::*;
++
++mod impls;
++mod impossible;
++
++pub use self::impossible::Impossible;
++
++////////////////////////////////////////////////////////////////////////////////
++
++macro_rules! declare_error_trait {
++    (Error: Sized $(+ $($supertrait:ident)::+)*) => {
++        /// Trait used by `Serialize` implementations to generically construct
++        /// errors belonging to the `Serializer` against which they are
++        /// currently running.
++        pub trait Error: Sized $(+ $($supertrait)::+)* {
++            /// Used when a [`Serialize`] implementation encounters any error
++            /// while serializing a type.
++            ///
++            /// The message should not be capitalized and should not end with a
++            /// period.
++            ///
++            /// For example, a filesystem [`Path`] may refuse to serialize
++            /// itself if it contains invalid UTF-8 data.
++            ///
++            /// ```rust
++            /// # struct Path;
++            /// #
++            /// # impl Path {
++            /// #     fn to_str(&self) -> Option<&str> {
++            /// #         unimplemented!()
++            /// #     }
++            /// # }
++            /// #
++            /// use serde::ser::{self, Serialize, Serializer};
++            ///
++            /// impl Serialize for Path {
++            ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++            ///         where S: Serializer
++            ///     {
++            ///         match self.to_str() {
++            ///             Some(s) => serializer.serialize_str(s),
++            ///             None => Err(ser::Error::custom("path contains invalid UTF-8 characters")),
++            ///         }
++            ///     }
++            /// }
++            /// ```
++            ///
++            /// [`Path`]: https://doc.rust-lang.org/std/path/struct.Path.html
++            /// [`Serialize`]: ../trait.Serialize.html
++            fn custom<T>(msg: T) -> Self
++            where
++                T: Display;
++        }
++    }
++}
++
++#[cfg(feature = "std")]
++declare_error_trait!(Error: Sized + error::Error);
++
++#[cfg(not(feature = "std"))]
++declare_error_trait!(Error: Sized + Debug + Display);
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// A **data structure** that can be serialized into any data format supported
++/// by Serde.
++///
++/// Serde provides `Serialize` implementations for many Rust primitive and
++/// standard library types. The complete list is [here][ser]. All of these can
++/// be serialized using Serde out of the box.
++///
++/// Additionally, Serde provides a procedural macro called [`serde_derive`] to
++/// automatically generate `Serialize` implementations for structs and enums in
++/// your program. See the [codegen section of the manual] for how to use this.
++///
++/// In rare cases it may be necessary to implement `Serialize` manually for some
++/// type in your program. See the [Implementing `Serialize`] section of the
++/// manual for more about this.
++///
++/// Third-party crates may provide `Serialize` implementations for types that
++/// they expose. For example the [`linked-hash-map`] crate provides a
++/// [`LinkedHashMap<K, V>`] type that is serializable by Serde because the crate
++/// provides an implementation of `Serialize` for it.
++///
++/// [Implementing `Serialize`]: https://serde.rs/impl-serialize.html
++/// [`LinkedHashMap<K, V>`]: https://docs.rs/linked-hash-map/*/linked_hash_map/struct.LinkedHashMap.html
++/// [`linked-hash-map`]: https://crates.io/crates/linked-hash-map
++/// [`serde_derive`]: https://crates.io/crates/serde_derive
++/// [codegen section of the manual]: https://serde.rs/codegen.html
++/// [ser]: https://docs.serde.rs/serde/ser/index.html
++pub trait Serialize {
++    /// Serialize this value into the given Serde serializer.
++    ///
++    /// See the [Implementing `Serialize`] section of the manual for more
++    /// information about how to implement this method.
++    ///
++    /// ```rust
++    /// use serde::ser::{Serialize, Serializer, SerializeStruct};
++    ///
++    /// struct Person {
++    ///     name: String,
++    ///     age: u8,
++    ///     phones: Vec<String>,
++    /// }
++    ///
++    /// // This is what #[derive(Serialize)] would generate.
++    /// impl Serialize for Person {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         let mut s = serializer.serialize_struct("Person", 3)?;
++    ///         s.serialize_field("name", &self.name)?;
++    ///         s.serialize_field("age", &self.age)?;
++    ///         s.serialize_field("phones", &self.phones)?;
++    ///         s.end()
++    ///     }
++    /// }
++    /// ```
++    ///
++    /// [Implementing `Serialize`]: https://serde.rs/impl-serialize.html
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    where
++        S: Serializer;
++}
++
++////////////////////////////////////////////////////////////////////////////////
++
++/// A **data format** that can serialize any data structure supported by Serde.
++///
++/// The role of this trait is to define the serialization half of the Serde data
++/// model, which is a way to categorize every Rust data structure into one of 27
++/// possible types. Each method of the `Serializer` trait corresponds to one of
++/// the types of the data model.
++///
++/// Implementations of `Serialize` map themselves into this data model by
++/// invoking exactly one of the `Serializer` methods.
++///
++/// The types that make up the Serde data model are:
++///
++///  - **12 primitive types**
++///    - bool
++///    - i8, i16, i32, i64
++///    - u8, u16, u32, u64
++///    - f32, f64
++///    - char
++///  - **string**
++///    - UTF-8 bytes with a length and no null terminator.
++///    - When serializing, all strings are handled equally. When deserializing,
++///      there are three flavors of strings: transient, owned, and borrowed.
++///  - **byte array** - [u8]
++///    - Similar to strings, during deserialization byte arrays can be transient,
++///      owned, or borrowed.
++///  - **option**
++///    - Either none or some value.
++///  - **unit**
++///    - The type of `()` in Rust. It represents an anonymous value containing no
++///      data.
++///  - **unit_struct**
++///    - For example `struct Unit` or `PhantomData<T>`. It represents a named value
++///      containing no data.
++///  - **unit_variant**
++///    - For example the `E::A` and `E::B` in `enum E { A, B }`.
++///  - **newtype_struct**
++///    - For example `struct Millimeters(u8)`.
++///  - **newtype_variant**
++///    - For example the `E::N` in `enum E { N(u8) }`.
++///  - **seq**
++///    - A variably sized heterogeneous sequence of values, for example `Vec<T>` or
++///      `HashSet<T>`. When serializing, the length may or may not be known before
++///      iterating through all the data. When deserializing, the length is determined
++///      by looking at the serialized data.
++///  - **tuple**
++///    - A statically sized heterogeneous sequence of values for which the length
++///      will be known at deserialization time without looking at the serialized
++///      data, for example `(u8,)` or `(String, u64, Vec<T>)` or `[u64; 10]`.
++///  - **tuple_struct**
++///    - A named tuple, for example `struct Rgb(u8, u8, u8)`.
++///  - **tuple_variant**
++///    - For example the `E::T` in `enum E { T(u8, u8) }`.
++///  - **map**
++///    - A heterogeneous key-value pairing, for example `BTreeMap<K, V>`.
++///  - **struct**
++///    - A heterogeneous key-value pairing in which the keys are strings and will be
++///      known at deserialization time without looking at the serialized data, for
++///      example `struct S { r: u8, g: u8, b: u8 }`.
++///  - **struct_variant**
++///    - For example the `E::S` in `enum E { S { r: u8, g: u8, b: u8 } }`.
++///
++/// Many Serde serializers produce text or binary data as output, for example
++/// JSON or Bincode. This is not a requirement of the `Serializer` trait, and
++/// there are serializers that do not produce text or binary output. One example
++/// is the `serde_json::value::Serializer` (distinct from the main `serde_json`
++/// serializer) that produces a `serde_json::Value` data structure in memory as
++/// output.
++pub trait Serializer: Sized {
++    /// The output type produced by this `Serializer` during successful
++    /// serialization. Most serializers that produce text or binary output
++    /// should set `Ok = ()` and serialize into an [`io::Write`] or buffer
++    /// contained within the `Serializer` instance. Serializers that build
++    /// in-memory data structures may be simplified by using `Ok` to propagate
++    /// the data structure around.
++    ///
++    /// [`io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
++    type Ok;
++
++    /// The error type when some error occurs during serialization.
++    type Error: Error;
++
++    /// Type returned from [`serialize_seq`] for serializing the content of the
++    /// sequence.
++    ///
++    /// [`serialize_seq`]: #tymethod.serialize_seq
++    type SerializeSeq: SerializeSeq<Ok = Self::Ok, Error = Self::Error>;
++
++    /// Type returned from [`serialize_tuple`] for serializing the content of
++    /// the tuple.
++    ///
++    /// [`serialize_tuple`]: #tymethod.serialize_tuple
++    type SerializeTuple: SerializeTuple<Ok = Self::Ok, Error = Self::Error>;
++
++    /// Type returned from [`serialize_tuple_struct`] for serializing the
++    /// content of the tuple struct.
++    ///
++    /// [`serialize_tuple_struct`]: #tymethod.serialize_tuple_struct
++    type SerializeTupleStruct: SerializeTupleStruct<Ok = Self::Ok, Error = Self::Error>;
++
++    /// Type returned from [`serialize_tuple_variant`] for serializing the
++    /// content of the tuple variant.
++    ///
++    /// [`serialize_tuple_variant`]: #tymethod.serialize_tuple_variant
++    type SerializeTupleVariant: SerializeTupleVariant<Ok = Self::Ok, Error = Self::Error>;
++
++    /// Type returned from [`serialize_map`] for serializing the content of the
++    /// map.
++    ///
++    /// [`serialize_map`]: #tymethod.serialize_map
++    type SerializeMap: SerializeMap<Ok = Self::Ok, Error = Self::Error>;
++
++    /// Type returned from [`serialize_struct`] for serializing the content of
++    /// the struct.
++    ///
++    /// [`serialize_struct`]: #tymethod.serialize_struct
++    type SerializeStruct: SerializeStruct<Ok = Self::Ok, Error = Self::Error>;
++
++    /// Type returned from [`serialize_struct_variant`] for serializing the
++    /// content of the struct variant.
++    ///
++    /// [`serialize_struct_variant`]: #tymethod.serialize_struct_variant
++    type SerializeStructVariant: SerializeStructVariant<Ok = Self::Ok, Error = Self::Error>;
++
++    /// Serialize a `bool` value.
++    ///
++    /// ```rust
++    /// # #[macro_use]
++    /// # extern crate serde;
++    /// #
++    /// # use serde::Serializer;
++    /// #
++    /// # __private_serialize!();
++    /// #
++    /// impl Serialize for bool {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.serialize_bool(*self)
++    ///     }
++    /// }
++    /// #
++    /// # fn main() {}
++    /// ```
++    fn serialize_bool(self, v: bool) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize an `i8` value.
++    ///
++    /// If the format does not differentiate between `i8` and `i64`, a
++    /// reasonable implementation would be to cast the value to `i64` and
++    /// forward to `serialize_i64`.
++    ///
++    /// ```rust
++    /// # #[macro_use]
++    /// # extern crate serde;
++    /// #
++    /// # use serde::Serializer;
++    /// #
++    /// # __private_serialize!();
++    /// #
++    /// impl Serialize for i8 {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.serialize_i8(*self)
++    ///     }
++    /// }
++    /// #
++    /// # fn main() {}
++    /// ```
++    fn serialize_i8(self, v: i8) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize an `i16` value.
++    ///
++    /// If the format does not differentiate between `i16` and `i64`, a
++    /// reasonable implementation would be to cast the value to `i64` and
++    /// forward to `serialize_i64`.
++    ///
++    /// ```rust
++    /// # #[macro_use]
++    /// # extern crate serde;
++    /// #
++    /// # use serde::Serializer;
++    /// #
++    /// # __private_serialize!();
++    /// #
++    /// impl Serialize for i16 {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.serialize_i16(*self)
++    ///     }
++    /// }
++    /// #
++    /// # fn main() {}
++    /// ```
++    fn serialize_i16(self, v: i16) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize an `i32` value.
++    ///
++    /// If the format does not differentiate between `i32` and `i64`, a
++    /// reasonable implementation would be to cast the value to `i64` and
++    /// forward to `serialize_i64`.
++    ///
++    /// ```rust
++    /// # #[macro_use]
++    /// # extern crate serde;
++    /// #
++    /// # use serde::Serializer;
++    /// #
++    /// # __private_serialize!();
++    /// #
++    /// impl Serialize for i32 {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.serialize_i32(*self)
++    ///     }
++    /// }
++    /// #
++    /// # fn main() {}
++    /// ```
++    fn serialize_i32(self, v: i32) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize an `i64` value.
++    ///
++    /// ```rust
++    /// # #[macro_use]
++    /// # extern crate serde;
++    /// #
++    /// # use serde::Serializer;
++    /// #
++    /// # __private_serialize!();
++    /// #
++    /// impl Serialize for i64 {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.serialize_i64(*self)
++    ///     }
++    /// }
++    /// #
++    /// # fn main() {}
++    /// ```
++    fn serialize_i64(self, v: i64) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize a `u8` value.
++    ///
++    /// If the format does not differentiate between `u8` and `u64`, a
++    /// reasonable implementation would be to cast the value to `u64` and
++    /// forward to `serialize_u64`.
++    ///
++    /// ```rust
++    /// # #[macro_use]
++    /// # extern crate serde;
++    /// #
++    /// # use serde::Serializer;
++    /// #
++    /// # __private_serialize!();
++    /// #
++    /// impl Serialize for u8 {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.serialize_u8(*self)
++    ///     }
++    /// }
++    /// #
++    /// # fn main() {}
++    /// ```
++    fn serialize_u8(self, v: u8) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize a `u16` value.
++    ///
++    /// If the format does not differentiate between `u16` and `u64`, a
++    /// reasonable implementation would be to cast the value to `u64` and
++    /// forward to `serialize_u64`.
++    ///
++    /// ```rust
++    /// # #[macro_use]
++    /// # extern crate serde;
++    /// #
++    /// # use serde::Serializer;
++    /// #
++    /// # __private_serialize!();
++    /// #
++    /// impl Serialize for u16 {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.serialize_u16(*self)
++    ///     }
++    /// }
++    /// #
++    /// # fn main() {}
++    /// ```
++    fn serialize_u16(self, v: u16) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize a `u32` value.
++    ///
++    /// If the format does not differentiate between `u32` and `u64`, a
++    /// reasonable implementation would be to cast the value to `u64` and
++    /// forward to `serialize_u64`.
++    ///
++    /// ```rust
++    /// # #[macro_use]
++    /// # extern crate serde;
++    /// #
++    /// # use serde::Serializer;
++    /// #
++    /// # __private_serialize!();
++    /// #
++    /// impl Serialize for u32 {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.serialize_u32(*self)
++    ///     }
++    /// }
++    /// #
++    /// # fn main() {}
++    /// ```
++    fn serialize_u32(self, v: u32) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize a `u64` value.
++    ///
++    /// ```rust
++    /// # #[macro_use]
++    /// # extern crate serde;
++    /// #
++    /// # use serde::Serializer;
++    /// #
++    /// # __private_serialize!();
++    /// #
++    /// impl Serialize for u64 {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.serialize_u64(*self)
++    ///     }
++    /// }
++    /// #
++    /// # fn main() {}
++    /// ```
++    fn serialize_u64(self, v: u64) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize an `f32` value.
++    ///
++    /// If the format does not differentiate between `f32` and `f64`, a
++    /// reasonable implementation would be to cast the value to `f64` and
++    /// forward to `serialize_f64`.
++    ///
++    /// ```rust
++    /// # #[macro_use]
++    /// # extern crate serde;
++    /// #
++    /// # use serde::Serializer;
++    /// #
++    /// # __private_serialize!();
++    /// #
++    /// impl Serialize for f32 {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.serialize_f32(*self)
++    ///     }
++    /// }
++    /// #
++    /// # fn main() {}
++    /// ```
++    fn serialize_f32(self, v: f32) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize an `f64` value.
++    ///
++    /// ```rust
++    /// # #[macro_use]
++    /// # extern crate serde;
++    /// #
++    /// # use serde::Serializer;
++    /// #
++    /// # __private_serialize!();
++    /// #
++    /// impl Serialize for f64 {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.serialize_f64(*self)
++    ///     }
++    /// }
++    /// #
++    /// # fn main() {}
++    /// ```
++    fn serialize_f64(self, v: f64) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize a character.
++    ///
++    /// If the format does not support characters, it is reasonable to serialize
++    /// it as a single element `str` or a `u32`.
++    ///
++    /// ```rust
++    /// # #[macro_use]
++    /// # extern crate serde;
++    /// #
++    /// # use serde::Serializer;
++    /// #
++    /// # __private_serialize!();
++    /// #
++    /// impl Serialize for char {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.serialize_char(*self)
++    ///     }
++    /// }
++    /// #
++    /// # fn main() {}
++    /// ```
++    fn serialize_char(self, v: char) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize a `&str`.
++    ///
++    /// ```rust
++    /// # #[macro_use]
++    /// # extern crate serde;
++    /// #
++    /// # use serde::Serializer;
++    /// #
++    /// # __private_serialize!();
++    /// #
++    /// impl Serialize for str {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.serialize_str(self)
++    ///     }
++    /// }
++    /// #
++    /// # fn main() {}
++    /// ```
++    fn serialize_str(self, v: &str) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize a chunk of raw byte data.
++    ///
++    /// Enables serializers to serialize byte slices more compactly or more
++    /// efficiently than other types of slices. If no efficient implementation
++    /// is available, a reasonable implementation would be to forward to
++    /// `serialize_seq`. If forwarded, the implementation looks usually just
++    /// like this:
++    ///
++    /// ```rust
++    /// # #[macro_use]
++    /// # extern crate serde;
++    /// #
++    /// # use serde::ser::{Serializer, SerializeSeq};
++    /// # use serde::private::ser::Error;
++    /// #
++    /// # struct MySerializer;
++    /// #
++    /// # impl Serializer for MySerializer {
++    /// #     type Ok = ();
++    /// #     type Error = Error;
++    /// #
++    /// fn serialize_bytes(self, v: &[u8]) -> Result<Self::Ok, Self::Error> {
++    ///     let mut seq = self.serialize_seq(Some(v.len()))?;
++    ///     for b in v {
++    ///         seq.serialize_element(b)?;
++    ///     }
++    ///     seq.end()
++    /// }
++    /// #
++    /// #     __serialize_unimplemented! {
++    /// #         bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str none some
++    /// #         unit unit_struct unit_variant newtype_struct newtype_variant
++    /// #         seq tuple tuple_struct tuple_variant map struct struct_variant
++    /// #     }
++    /// # }
++    /// #
++    /// # fn main() {}
++    /// ```
++    fn serialize_bytes(self, v: &[u8]) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize a [`None`] value.
++    ///
++    /// ```rust
++    /// # extern crate serde;
++    /// #
++    /// # use serde::{Serialize, Serializer};
++    /// #
++    /// # enum Option<T> {
++    /// #     Some(T),
++    /// #     None,
++    /// # }
++    /// #
++    /// # use Option::{Some, None};
++    /// #
++    /// impl<T> Serialize for Option<T>
++    ///     where T: Serialize
++    /// {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         match *self {
++    ///             Some(ref value) => serializer.serialize_some(value),
++    ///             None => serializer.serialize_none(),
++    ///         }
++    ///     }
++    /// }
++    /// #
++    /// # fn main() {}
++    /// ```
++    ///
++    /// [`None`]: https://doc.rust-lang.org/std/option/enum.Option.html#variant.None
++    fn serialize_none(self) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize a [`Some(T)`] value.
++    ///
++    /// ```rust
++    /// # extern crate serde;
++    /// #
++    /// # use serde::{Serialize, Serializer};
++    /// #
++    /// # enum Option<T> {
++    /// #     Some(T),
++    /// #     None,
++    /// # }
++    /// #
++    /// # use Option::{Some, None};
++    /// #
++    /// impl<T> Serialize for Option<T>
++    ///     where T: Serialize
++    /// {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         match *self {
++    ///             Some(ref value) => serializer.serialize_some(value),
++    ///             None => serializer.serialize_none(),
++    ///         }
++    ///     }
++    /// }
++    /// #
++    /// # fn main() {}
++    /// ```
++    ///
++    /// [`Some(T)`]: https://doc.rust-lang.org/std/option/enum.Option.html#variant.Some
++    fn serialize_some<T: ?Sized>(self, value: &T) -> Result<Self::Ok, Self::Error>
++    where
++        T: Serialize;
++
++    /// Serialize a `()` value.
++    ///
++    /// ```rust
++    /// # #[macro_use]
++    /// # extern crate serde;
++    /// #
++    /// # use serde::Serializer;
++    /// #
++    /// # __private_serialize!();
++    /// #
++    /// impl Serialize for () {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.serialize_unit()
++    ///     }
++    /// }
++    /// #
++    /// # fn main() {}
++    /// ```
++    fn serialize_unit(self) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize a unit struct like `struct Unit` or `PhantomData<T>`.
++    ///
++    /// A reasonable implementation would be to forward to `serialize_unit`.
++    ///
++    /// ```rust
++    /// use serde::{Serialize, Serializer};
++    ///
++    /// struct Nothing;
++    ///
++    /// impl Serialize for Nothing {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.serialize_unit_struct("Nothing")
++    ///     }
++    /// }
++    /// ```
++    fn serialize_unit_struct(self, name: &'static str) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize a unit variant like `E::A` in `enum E { A, B }`.
++    ///
++    /// The `name` is the name of the enum, the `variant_index` is the index of
++    /// this variant within the enum, and the `variant` is the name of the
++    /// variant.
++    ///
++    /// ```rust
++    /// use serde::{Serialize, Serializer};
++    ///
++    /// enum E {
++    ///     A,
++    ///     B,
++    /// }
++    ///
++    /// impl Serialize for E {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         match *self {
++    ///             E::A => serializer.serialize_unit_variant("E", 0, "A"),
++    ///             E::B => serializer.serialize_unit_variant("E", 1, "B"),
++    ///         }
++    ///     }
++    /// }
++    /// ```
++    fn serialize_unit_variant(
++        self,
++        name: &'static str,
++        variant_index: u32,
++        variant: &'static str,
++    ) -> Result<Self::Ok, Self::Error>;
++
++    /// Serialize a newtype struct like `struct Millimeters(u8)`.
++    ///
++    /// Serializers are encouraged to treat newtype structs as insignificant
++    /// wrappers around the data they contain. A reasonable implementation would
++    /// be to forward to `value.serialize(self)`.
++    ///
++    /// ```rust
++    /// use serde::{Serialize, Serializer};
++    ///
++    /// struct Millimeters(u8);
++    ///
++    /// impl Serialize for Millimeters {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.serialize_newtype_struct("Millimeters", &self.0)
++    ///     }
++    /// }
++    /// ```
++    fn serialize_newtype_struct<T: ?Sized>(
++        self,
++        name: &'static str,
++        value: &T,
++    ) -> Result<Self::Ok, Self::Error>
++    where
++        T: Serialize;
++
++    /// Serialize a newtype variant like `E::N` in `enum E { N(u8) }`.
++    ///
++    /// The `name` is the name of the enum, the `variant_index` is the index of
++    /// this variant within the enum, and the `variant` is the name of the
++    /// variant. The `value` is the data contained within this newtype variant.
++    ///
++    /// ```rust
++    /// use serde::{Serialize, Serializer};
++    ///
++    /// enum E {
++    ///     M(String),
++    ///     N(u8),
++    /// }
++    ///
++    /// impl Serialize for E {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         match *self {
++    ///             E::M(ref s) => serializer.serialize_newtype_variant("E", 0, "M", s),
++    ///             E::N(n) => serializer.serialize_newtype_variant("E", 1, "N", &n),
++    ///         }
++    ///     }
++    /// }
++    /// ```
++    fn serialize_newtype_variant<T: ?Sized>(
++        self,
++        name: &'static str,
++        variant_index: u32,
++        variant: &'static str,
++        value: &T,
++    ) -> Result<Self::Ok, Self::Error>
++    where
++        T: Serialize;
++
++    /// Begin to serialize a variably sized sequence. This call must be
++    /// followed by zero or more calls to `serialize_element`, then a call to
++    /// `end`.
++    ///
++    /// The argument is the number of elements in the sequence, which may or may
++    /// not be computable before the sequence is iterated. Some serializers only
++    /// support sequences whose length is known up front.
++    ///
++    /// ```rust
++    /// # use std::marker::PhantomData;
++    /// #
++    /// # struct Vec<T>(PhantomData<T>);
++    /// #
++    /// # impl<T> Vec<T> {
++    /// #     fn len(&self) -> usize {
++    /// #         unimplemented!()
++    /// #     }
++    /// # }
++    /// #
++    /// # impl<'a, T> IntoIterator for &'a Vec<T> {
++    /// #     type Item = &'a T;
++    /// #     type IntoIter = Box<Iterator<Item = &'a T>>;
++    /// #
++    /// #     fn into_iter(self) -> Self::IntoIter {
++    /// #         unimplemented!()
++    /// #     }
++    /// # }
++    /// #
++    /// use serde::ser::{Serialize, Serializer, SerializeSeq};
++    ///
++    /// impl<T> Serialize for Vec<T>
++    ///     where T: Serialize
++    /// {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         let mut seq = serializer.serialize_seq(Some(self.len()))?;
++    ///         for element in self {
++    ///             seq.serialize_element(element)?;
++    ///         }
++    ///         seq.end()
++    ///     }
++    /// }
++    /// ```
++    fn serialize_seq(self, len: Option<usize>) -> Result<Self::SerializeSeq, Self::Error>;
++
++    /// Begin to serialize a statically sized sequence whose length will be
++    /// known at deserialization time without looking at the serialized data.
++    /// This call must be followed by zero or more calls to `serialize_element`,
++    /// then a call to `end`.
++    ///
++    /// ```rust
++    /// use serde::ser::{Serialize, Serializer, SerializeTuple};
++    ///
++    /// # mod fool {
++    /// #     trait Serialize {}
++    /// impl<A, B, C> Serialize for (A, B, C)
++    /// #     {}
++    /// # }
++    /// #
++    /// # struct Tuple3<A, B, C>(A, B, C);
++    /// #
++    /// # impl<A, B, C> Serialize for Tuple3<A, B, C>
++    ///     where A: Serialize,
++    ///           B: Serialize,
++    ///           C: Serialize
++    /// {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         let mut tup = serializer.serialize_tuple(3)?;
++    ///         tup.serialize_element(&self.0)?;
++    ///         tup.serialize_element(&self.1)?;
++    ///         tup.serialize_element(&self.2)?;
++    ///         tup.end()
++    ///     }
++    /// }
++    /// ```
++    ///
++    /// ```rust
++    /// use serde::ser::{Serialize, Serializer, SerializeTuple};
++    ///
++    /// const VRAM_SIZE: usize = 386;
++    /// struct Vram([u16; VRAM_SIZE]);
++    ///
++    /// impl Serialize for Vram {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         let mut seq = serializer.serialize_tuple(VRAM_SIZE)?;
++    ///         for element in &self.0[..] {
++    ///             seq.serialize_element(element)?;
++    ///         }
++    ///         seq.end()
++    ///     }
++    /// }
++    /// ```
++    fn serialize_tuple(self, len: usize) -> Result<Self::SerializeTuple, Self::Error>;
++
++    /// Begin to serialize a tuple struct like `struct Rgb(u8, u8, u8)`. This
++    /// call must be followed by zero or more calls to `serialize_field`, then a
++    /// call to `end`.
++    ///
++    /// The `name` is the name of the tuple struct and the `len` is the number
++    /// of data fields that will be serialized.
++    ///
++    /// ```rust
++    /// use serde::ser::{Serialize, Serializer, SerializeTupleStruct};
++    ///
++    /// struct Rgb(u8, u8, u8);
++    ///
++    /// impl Serialize for Rgb {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         let mut ts = serializer.serialize_tuple_struct("Rgb", 3)?;
++    ///         ts.serialize_field(&self.0)?;
++    ///         ts.serialize_field(&self.1)?;
++    ///         ts.serialize_field(&self.2)?;
++    ///         ts.end()
++    ///     }
++    /// }
++    /// ```
++    fn serialize_tuple_struct(
++        self,
++        name: &'static str,
++        len: usize,
++    ) -> Result<Self::SerializeTupleStruct, Self::Error>;
++
++    /// Begin to serialize a tuple variant like `E::T` in `enum E { T(u8, u8)
++    /// }`. This call must be followed by zero or more calls to
++    /// `serialize_field`, then a call to `end`.
++    ///
++    /// The `name` is the name of the enum, the `variant_index` is the index of
++    /// this variant within the enum, the `variant` is the name of the variant,
++    /// and the `len` is the number of data fields that will be serialized.
++    ///
++    /// ```rust
++    /// use serde::ser::{Serialize, Serializer, SerializeTupleVariant};
++    ///
++    /// enum E {
++    ///     T(u8, u8),
++    ///     U(String, u32, u32),
++    /// }
++    ///
++    /// impl Serialize for E {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         match *self {
++    ///             E::T(ref a, ref b) => {
++    ///                 let mut tv = serializer.serialize_tuple_variant("E", 0, "T", 2)?;
++    ///                 tv.serialize_field(a)?;
++    ///                 tv.serialize_field(b)?;
++    ///                 tv.end()
++    ///             }
++    ///             E::U(ref a, ref b, ref c) => {
++    ///                 let mut tv = serializer.serialize_tuple_variant("E", 1, "U", 3)?;
++    ///                 tv.serialize_field(a)?;
++    ///                 tv.serialize_field(b)?;
++    ///                 tv.serialize_field(c)?;
++    ///                 tv.end()
++    ///             }
++    ///         }
++    ///     }
++    /// }
++    /// ```
++    fn serialize_tuple_variant(
++        self,
++        name: &'static str,
++        variant_index: u32,
++        variant: &'static str,
++        len: usize,
++    ) -> Result<Self::SerializeTupleVariant, Self::Error>;
++
++    /// Begin to serialize a map. This call must be followed by zero or more
++    /// calls to `serialize_key` and `serialize_value`, then a call to `end`.
++    ///
++    /// The argument is the number of elements in the map, which may or may not
++    /// be computable before the map is iterated. Some serializers only support
++    /// maps whose length is known up front.
++    ///
++    /// ```rust
++    /// # use std::marker::PhantomData;
++    /// #
++    /// # struct HashMap<K, V>(PhantomData<K>, PhantomData<V>);
++    /// #
++    /// # impl<K, V> HashMap<K, V> {
++    /// #     fn len(&self) -> usize {
++    /// #         unimplemented!()
++    /// #     }
++    /// # }
++    /// #
++    /// # impl<'a, K, V> IntoIterator for &'a HashMap<K, V> {
++    /// #     type Item = (&'a K, &'a V);
++    /// #     type IntoIter = Box<Iterator<Item = (&'a K, &'a V)>>;
++    /// #
++    /// #     fn into_iter(self) -> Self::IntoIter {
++    /// #         unimplemented!()
++    /// #     }
++    /// # }
++    /// #
++    /// use serde::ser::{Serialize, Serializer, SerializeMap};
++    ///
++    /// impl<K, V> Serialize for HashMap<K, V>
++    ///     where K: Serialize,
++    ///           V: Serialize
++    /// {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         let mut map = serializer.serialize_map(Some(self.len()))?;
++    ///         for (k, v) in self {
++    ///             map.serialize_entry(k, v)?;
++    ///         }
++    ///         map.end()
++    ///     }
++    /// }
++    /// ```
++    fn serialize_map(self, len: Option<usize>) -> Result<Self::SerializeMap, Self::Error>;
++
++    /// Begin to serialize a struct like `struct Rgb { r: u8, g: u8, b: u8 }`.
++    /// This call must be followed by zero or more calls to `serialize_field`,
++    /// then a call to `end`.
++    ///
++    /// The `name` is the name of the struct and the `len` is the number of
++    /// data fields that will be serialized.
++    ///
++    /// ```rust
++    /// use serde::ser::{Serialize, Serializer, SerializeStruct};
++    ///
++    /// struct Rgb {
++    ///     r: u8,
++    ///     g: u8,
++    ///     b: u8,
++    /// }
++    ///
++    /// impl Serialize for Rgb {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         let mut rgb = serializer.serialize_struct("Rgb", 3)?;
++    ///         rgb.serialize_field("r", &self.r)?;
++    ///         rgb.serialize_field("g", &self.g)?;
++    ///         rgb.serialize_field("b", &self.b)?;
++    ///         rgb.end()
++    ///     }
++    /// }
++    /// ```
++    fn serialize_struct(
++        self,
++        name: &'static str,
++        len: usize,
++    ) -> Result<Self::SerializeStruct, Self::Error>;
++
++    /// Begin to serialize a struct variant like `E::S` in `enum E { S { r: u8,
++    /// g: u8, b: u8 } }`. This call must be followed by zero or more calls to
++    /// `serialize_field`, then a call to `end`.
++    ///
++    /// The `name` is the name of the enum, the `variant_index` is the index of
++    /// this variant within the enum, the `variant` is the name of the variant,
++    /// and the `len` is the number of data fields that will be serialized.
++    ///
++    /// ```rust
++    /// use serde::ser::{Serialize, Serializer, SerializeStructVariant};
++    ///
++    /// enum E {
++    ///     S { r: u8, g: u8, b: u8 }
++    /// }
++    ///
++    /// impl Serialize for E {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         match *self {
++    ///             E::S { ref r, ref g, ref b } => {
++    ///                 let mut sv = serializer.serialize_struct_variant("E", 0, "S", 3)?;
++    ///                 sv.serialize_field("r", r)?;
++    ///                 sv.serialize_field("g", g)?;
++    ///                 sv.serialize_field("b", b)?;
++    ///                 sv.end()
++    ///             }
++    ///         }
++    ///     }
++    /// }
++    /// ```
++    fn serialize_struct_variant(
++        self,
++        name: &'static str,
++        variant_index: u32,
++        variant: &'static str,
++        len: usize,
++    ) -> Result<Self::SerializeStructVariant, Self::Error>;
++
++    /// Collect an iterator as a sequence.
++    ///
++    /// The default implementation serializes each item yielded by the iterator
++    /// using [`serialize_seq`]. Implementors should not need to override this
++    /// method.
++    ///
++    /// ```rust
++    /// use serde::{Serialize, Serializer};
++    ///
++    /// struct SecretlyOneHigher {
++    ///     data: Vec<i32>,
++    /// }
++    ///
++    /// impl Serialize for SecretlyOneHigher {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.collect_seq(self.data.iter().map(|x| x + 1))
++    ///     }
++    /// }
++    /// ```
++    ///
++    /// [`serialize_seq`]: #tymethod.serialize_seq
++    fn collect_seq<I>(self, iter: I) -> Result<Self::Ok, Self::Error>
++    where
++        I: IntoIterator,
++        <I as IntoIterator>::Item: Serialize,
++    {
++        let iter = iter.into_iter();
++        let mut serializer = try!(self.serialize_seq(iter.len_hint()));
++        for item in iter {
++            try!(serializer.serialize_element(&item));
++        }
++        serializer.end()
++    }
++
++    /// Collect an iterator as a map.
++    ///
++    /// The default implementation serializes each pair yielded by the iterator
++    /// using [`serialize_map`]. Implementors should not need to override this
++    /// method.
++    ///
++    /// ```rust
++    /// use std::collections::BTreeSet;
++    /// use serde::{Serialize, Serializer};
++    ///
++    /// struct MapToUnit {
++    ///     keys: BTreeSet<i32>,
++    /// }
++    ///
++    /// // Serializes as a map in which the values are all unit.
++    /// impl Serialize for MapToUnit {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.collect_map(self.keys.iter().map(|k| (k, ())))
++    ///     }
++    /// }
++    /// ```
++    ///
++    /// [`serialize_map`]: #tymethod.serialize_map
++    fn collect_map<K, V, I>(self, iter: I) -> Result<Self::Ok, Self::Error>
++    where
++        K: Serialize,
++        V: Serialize,
++        I: IntoIterator<Item = (K, V)>,
++    {
++        let iter = iter.into_iter();
++        let mut serializer = try!(self.serialize_map(iter.len_hint()));
++        for (key, value) in iter {
++            try!(serializer.serialize_entry(&key, &value));
++        }
++        serializer.end()
++    }
++
++    /// Serialize a string produced by an implementation of `Display`.
++    ///
++    /// The default implementation builds a heap-allocated [`String`] and
++    /// delegates to [`serialize_str`]. Serializers are encouraged to provide a
++    /// more efficient implementation if possible.
++    ///
++    /// ```rust
++    /// # struct DateTime;
++    /// #
++    /// # impl DateTime {
++    /// #     fn naive_local(&self) -> () { () }
++    /// #     fn offset(&self) -> () { () }
++    /// # }
++    /// #
++    /// use serde::{Serialize, Serializer};
++    ///
++    /// impl Serialize for DateTime {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.collect_str(&format_args!("{:?}{:?}",
++    ///                                              self.naive_local(),
++    ///                                              self.offset()))
++    ///     }
++    /// }
++    /// ```
++    ///
++    /// [`String`]: https://doc.rust-lang.org/std/string/struct.String.html
++    /// [`serialize_str`]: #tymethod.serialize_str
++    #[cfg(any(feature = "std", feature = "alloc"))]
++    fn collect_str<T: ?Sized>(self, value: &T) -> Result<Self::Ok, Self::Error>
++    where
++        T: Display,
++    {
++        use lib::fmt::Write;
++        let mut string = String::new();
++        write!(string, "{}", value).unwrap();
++        self.serialize_str(&string)
++    }
++
++    /// Serialize a string produced by an implementation of `Display`.
++    ///
++    /// Serializers that use `no_std` are required to provide an implementation
++    /// of this method. If no more sensible behavior is possible, the
++    /// implementation is expected to return an error.
++    ///
++    /// ```rust
++    /// # struct DateTime;
++    /// #
++    /// # impl DateTime {
++    /// #     fn naive_local(&self) -> () { () }
++    /// #     fn offset(&self) -> () { () }
++    /// # }
++    /// #
++    /// use serde::{Serialize, Serializer};
++    ///
++    /// impl Serialize for DateTime {
++    ///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++    ///         where S: Serializer
++    ///     {
++    ///         serializer.collect_str(&format_args!("{:?}{:?}",
++    ///                                              self.naive_local(),
++    ///                                              self.offset()))
++    ///     }
++    /// }
++    /// ```
++    #[cfg(not(any(feature = "std", feature = "alloc")))]
++    fn collect_str<T: ?Sized>(self, value: &T) -> Result<Self::Ok, Self::Error>
++    where
++        T: Display;
++}
++
++/// Returned from `Serializer::serialize_seq`.
++///
++/// ```rust
++/// # use std::marker::PhantomData;
++/// #
++/// # struct Vec<T>(PhantomData<T>);
++/// #
++/// # impl<T> Vec<T> {
++/// #     fn len(&self) -> usize {
++/// #         unimplemented!()
++/// #     }
++/// # }
++/// #
++/// # impl<'a, T> IntoIterator for &'a Vec<T> {
++/// #     type Item = &'a T;
++/// #     type IntoIter = Box<Iterator<Item = &'a T>>;
++/// #     fn into_iter(self) -> Self::IntoIter {
++/// #         unimplemented!()
++/// #     }
++/// # }
++/// #
++/// use serde::ser::{Serialize, Serializer, SerializeSeq};
++///
++/// impl<T> Serialize for Vec<T>
++///     where T: Serialize
++/// {
++///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++///         where S: Serializer
++///     {
++///         let mut seq = serializer.serialize_seq(Some(self.len()))?;
++///         for element in self {
++///             seq.serialize_element(element)?;
++///         }
++///         seq.end()
++///     }
++/// }
++/// ```
++pub trait SerializeSeq {
++    /// Must match the `Ok` type of our `Serializer`.
++    type Ok;
++
++    /// Must match the `Error` type of our `Serializer`.
++    type Error: Error;
++
++    /// Serialize a sequence element.
++    fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error>
++    where
++        T: Serialize;
++
++    /// Finish serializing a sequence.
++    fn end(self) -> Result<Self::Ok, Self::Error>;
++}
++
++/// Returned from `Serializer::serialize_tuple`.
++///
++/// ```rust
++/// use serde::ser::{Serialize, Serializer, SerializeTuple};
++///
++/// # mod fool {
++/// #     trait Serialize {}
++/// impl<A, B, C> Serialize for (A, B, C)
++/// #     {}
++/// # }
++/// #
++/// # struct Tuple3<A, B, C>(A, B, C);
++/// #
++/// # impl<A, B, C> Serialize for Tuple3<A, B, C>
++///     where A: Serialize,
++///           B: Serialize,
++///           C: Serialize
++/// {
++///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++///         where S: Serializer
++///     {
++///         let mut tup = serializer.serialize_tuple(3)?;
++///         tup.serialize_element(&self.0)?;
++///         tup.serialize_element(&self.1)?;
++///         tup.serialize_element(&self.2)?;
++///         tup.end()
++///     }
++/// }
++/// ```
++///
++/// ```rust
++/// # use std::marker::PhantomData;
++/// #
++/// # struct Array<T>(PhantomData<T>);
++/// #
++/// # impl<T> Array<T> {
++/// #     fn len(&self) -> usize {
++/// #         unimplemented!()
++/// #     }
++/// # }
++/// #
++/// # impl<'a, T> IntoIterator for &'a Array<T> {
++/// #     type Item = &'a T;
++/// #     type IntoIter = Box<Iterator<Item = &'a T>>;
++/// #     fn into_iter(self) -> Self::IntoIter {
++/// #         unimplemented!()
++/// #     }
++/// # }
++/// #
++/// use serde::ser::{Serialize, Serializer, SerializeTuple};
++///
++/// # mod fool {
++/// #     trait Serialize {}
++/// impl<T> Serialize for [T; 16]
++/// #     {}
++/// # }
++/// #
++/// # impl<T> Serialize for Array<T>
++///     where T: Serialize
++/// {
++///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++///         where S: Serializer
++///     {
++///         let mut seq = serializer.serialize_tuple(16)?;
++///         for element in self {
++///             seq.serialize_element(element)?;
++///         }
++///         seq.end()
++///     }
++/// }
++/// ```
++pub trait SerializeTuple {
++    /// Must match the `Ok` type of our `Serializer`.
++    type Ok;
++
++    /// Must match the `Error` type of our `Serializer`.
++    type Error: Error;
++
++    /// Serialize a tuple element.
++    fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error>
++    where
++        T: Serialize;
++
++    /// Finish serializing a tuple.
++    fn end(self) -> Result<Self::Ok, Self::Error>;
++}
++
++/// Returned from `Serializer::serialize_tuple_struct`.
++///
++/// ```rust
++/// use serde::ser::{Serialize, Serializer, SerializeTupleStruct};
++///
++/// struct Rgb(u8, u8, u8);
++///
++/// impl Serialize for Rgb {
++///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++///         where S: Serializer
++///     {
++///         let mut ts = serializer.serialize_tuple_struct("Rgb", 3)?;
++///         ts.serialize_field(&self.0)?;
++///         ts.serialize_field(&self.1)?;
++///         ts.serialize_field(&self.2)?;
++///         ts.end()
++///     }
++/// }
++/// ```
++pub trait SerializeTupleStruct {
++    /// Must match the `Ok` type of our `Serializer`.
++    type Ok;
++
++    /// Must match the `Error` type of our `Serializer`.
++    type Error: Error;
++
++    /// Serialize a tuple struct field.
++    fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error>
++    where
++        T: Serialize;
++
++    /// Finish serializing a tuple struct.
++    fn end(self) -> Result<Self::Ok, Self::Error>;
++}
++
++/// Returned from `Serializer::serialize_tuple_variant`.
++///
++/// ```rust
++/// use serde::ser::{Serialize, Serializer, SerializeTupleVariant};
++///
++/// enum E {
++///     T(u8, u8),
++///     U(String, u32, u32),
++/// }
++///
++/// impl Serialize for E {
++///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++///         where S: Serializer
++///     {
++///         match *self {
++///             E::T(ref a, ref b) => {
++///                 let mut tv = serializer.serialize_tuple_variant("E", 0, "T", 2)?;
++///                 tv.serialize_field(a)?;
++///                 tv.serialize_field(b)?;
++///                 tv.end()
++///             }
++///             E::U(ref a, ref b, ref c) => {
++///                 let mut tv = serializer.serialize_tuple_variant("E", 1, "U", 3)?;
++///                 tv.serialize_field(a)?;
++///                 tv.serialize_field(b)?;
++///                 tv.serialize_field(c)?;
++///                 tv.end()
++///             }
++///         }
++///     }
++/// }
++/// ```
++pub trait SerializeTupleVariant {
++    /// Must match the `Ok` type of our `Serializer`.
++    type Ok;
++
++    /// Must match the `Error` type of our `Serializer`.
++    type Error: Error;
++
++    /// Serialize a tuple variant field.
++    fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error>
++    where
++        T: Serialize;
++
++    /// Finish serializing a tuple variant.
++    fn end(self) -> Result<Self::Ok, Self::Error>;
++}
++
++/// Returned from `Serializer::serialize_map`.
++///
++/// ```rust
++/// # use std::marker::PhantomData;
++/// #
++/// # struct HashMap<K, V>(PhantomData<K>, PhantomData<V>);
++/// #
++/// # impl<K, V> HashMap<K, V> {
++/// #     fn len(&self) -> usize {
++/// #         unimplemented!()
++/// #     }
++/// # }
++/// #
++/// # impl<'a, K, V> IntoIterator for &'a HashMap<K, V> {
++/// #     type Item = (&'a K, &'a V);
++/// #     type IntoIter = Box<Iterator<Item = (&'a K, &'a V)>>;
++/// #
++/// #     fn into_iter(self) -> Self::IntoIter {
++/// #         unimplemented!()
++/// #     }
++/// # }
++/// #
++/// use serde::ser::{Serialize, Serializer, SerializeMap};
++///
++/// impl<K, V> Serialize for HashMap<K, V>
++///     where K: Serialize,
++///           V: Serialize
++/// {
++///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++///         where S: Serializer
++///     {
++///         let mut map = serializer.serialize_map(Some(self.len()))?;
++///         for (k, v) in self {
++///             map.serialize_entry(k, v)?;
++///         }
++///         map.end()
++///     }
++/// }
++/// ```
++pub trait SerializeMap {
++    /// Must match the `Ok` type of our `Serializer`.
++    type Ok;
++
++    /// Must match the `Error` type of our `Serializer`.
++    type Error: Error;
++
++    /// Serialize a map key.
++    ///
++    /// If possible, `Serialize` implementations are encouraged to use
++    /// `serialize_entry` instead as it may be implemented more efficiently in
++    /// some formats compared to a pair of calls to `serialize_key` and
++    /// `serialize_value`.
++    fn serialize_key<T: ?Sized>(&mut self, key: &T) -> Result<(), Self::Error>
++    where
++        T: Serialize;
++
++    /// Serialize a map value.
++    ///
++    /// # Panics
++    ///
++    /// Calling `serialize_value` before `serialize_key` is incorrect and is
++    /// allowed to panic or produce bogus results.
++    fn serialize_value<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error>
++    where
++        T: Serialize;
++
++    /// Serialize a map entry consisting of a key and a value.
++    ///
++    /// Some [`Serialize`] types are not able to hold a key and value in memory
++    /// at the same time so `SerializeMap` implementations are required to
++    /// support [`serialize_key`] and [`serialize_value`] individually. The
++    /// `serialize_entry` method allows serializers to optimize for the case
++    /// where key and value are both available. [`Serialize`] implementations
++    /// are encouraged to use `serialize_entry` if possible.
++    ///
++    /// The default implementation delegates to [`serialize_key`] and
++    /// [`serialize_value`]. This is appropriate for serializers that do not
++    /// care about performance or are not able to optimize `serialize_entry` any
++    /// better than this.
++    ///
++    /// [`Serialize`]: ../trait.Serialize.html
++    /// [`serialize_key`]: #tymethod.serialize_key
++    /// [`serialize_value`]: #tymethod.serialize_value
++    fn serialize_entry<K: ?Sized, V: ?Sized>(
++        &mut self,
++        key: &K,
++        value: &V,
++    ) -> Result<(), Self::Error>
++    where
++        K: Serialize,
++        V: Serialize,
++    {
++        try!(self.serialize_key(key));
++        self.serialize_value(value)
++    }
++
++    /// Finish serializing a map.
++    fn end(self) -> Result<Self::Ok, Self::Error>;
++}
++
++/// Returned from `Serializer::serialize_struct`.
++///
++/// ```rust
++/// use serde::ser::{Serialize, Serializer, SerializeStruct};
++///
++/// struct Rgb {
++///     r: u8,
++///     g: u8,
++///     b: u8,
++/// }
++///
++/// impl Serialize for Rgb {
++///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++///         where S: Serializer
++///     {
++///         let mut rgb = serializer.serialize_struct("Rgb", 3)?;
++///         rgb.serialize_field("r", &self.r)?;
++///         rgb.serialize_field("g", &self.g)?;
++///         rgb.serialize_field("b", &self.b)?;
++///         rgb.end()
++///     }
++/// }
++/// ```
++pub trait SerializeStruct {
++    /// Must match the `Ok` type of our `Serializer`.
++    type Ok;
++
++    /// Must match the `Error` type of our `Serializer`.
++    type Error: Error;
++
++    /// Serialize a struct field.
++    fn serialize_field<T: ?Sized>(
++        &mut self,
++        key: &'static str,
++        value: &T,
++    ) -> Result<(), Self::Error>
++    where
++        T: Serialize;
++
++    /// Finish serializing a struct.
++    fn end(self) -> Result<Self::Ok, Self::Error>;
++}
++
++/// Returned from `Serializer::serialize_struct_variant`.
++///
++/// ```rust
++/// use serde::ser::{Serialize, Serializer, SerializeStructVariant};
++///
++/// enum E {
++///     S { r: u8, g: u8, b: u8 }
++/// }
++///
++/// impl Serialize for E {
++///     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++///         where S: Serializer
++///     {
++///         match *self {
++///             E::S { ref r, ref g, ref b } => {
++///                 let mut sv = serializer.serialize_struct_variant("E", 0, "S", 3)?;
++///                 sv.serialize_field("r", r)?;
++///                 sv.serialize_field("g", g)?;
++///                 sv.serialize_field("b", b)?;
++///                 sv.end()
++///             }
++///         }
++///     }
++/// }
++/// ```
++pub trait SerializeStructVariant {
++    /// Must match the `Ok` type of our `Serializer`.
++    type Ok;
++
++    /// Must match the `Error` type of our `Serializer`.
++    type Error: Error;
++
++    /// Serialize a struct variant field.
++    fn serialize_field<T: ?Sized>(
++        &mut self,
++        key: &'static str,
++        value: &T,
++    ) -> Result<(), Self::Error>
++    where
++        T: Serialize;
++
++    /// Finish serializing a struct variant.
++    fn end(self) -> Result<Self::Ok, Self::Error>;
++}
++
++trait LenHint: Iterator {
++    fn len_hint(&self) -> Option<usize>;
++}
++
++impl<I> LenHint for I
++where
++    I: Iterator,
++{
++    #[cfg(not(feature = "unstable"))]
++    fn len_hint(&self) -> Option<usize> {
++        iterator_len_hint(self)
++    }
++
++    #[cfg(feature = "unstable")]
++    default fn len_hint(&self) -> Option<usize> {
++        iterator_len_hint(self)
++    }
++}
++
++#[cfg(feature = "unstable")]
++impl<I> LenHint for I
++where
++    I: ExactSizeIterator,
++{
++    fn len_hint(&self) -> Option<usize> {
++        Some(self.len())
++    }
++}
++
++fn iterator_len_hint<I>(iter: &I) -> Option<usize>
++where
++    I: Iterator,
++{
++    match iter.size_hint() {
++        (lo, Some(hi)) if lo == hi => Some(lo),
++        _ => None,
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9281989ffcb41eb1f5c0cd8c619bd27e46edb9c5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"cf823e706be268e73e7747b147aa31c8f633ab4ba31f115efb57e5047c3a76dd"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6f3a14581ff15210e760be8c5464c615fbe49850
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,40 @@@
++# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
++#
++# When uploading crates to the registry Cargo will automatically
++# "normalize" Cargo.toml files for maximal compatibility
++# with all versions of Cargo and also rewrite `path` dependencies
++# to registry (e.g. crates.io) dependencies
++#
++# If you believe there's an error in this file please file an
++# issue against the rust-lang/cargo repository. If you're
++# editing this file be aware that the upstream Cargo.toml
++# will likely look very different (and much more reasonable)
++
++[package]
++name = "serde_derive"
++version = "1.0.11"
++authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
++include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
++description = "Macros 1.1 implementation of #[derive(Serialize, Deserialize)]"
++homepage = "https://serde.rs"
++documentation = "https://serde.rs/codegen.html"
++readme = "README.md"
++keywords = ["serde", "serialization", "no_std"]
++license = "MIT/Apache-2.0"
++repository = "https://github.com/serde-rs/serde"
++
++[lib]
++name = "serde_derive"
++proc-macro = true
++[dependencies.syn]
++version = "0.11"
++features = ["visit"]
++
++[dependencies.quote]
++version = "0.3.8"
++
++[dependencies.serde_derive_internals]
++version = "=0.15.1"
++default-features = false
++[badges.travis-ci]
++repository = "serde-rs/serde"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16fe87b06e802f094b3fbb0894b137bca2b16ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++                              Apache License
++                        Version 2.0, January 2004
++                     http://www.apache.org/licenses/
++
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++1. Definitions.
++
++   "License" shall mean the terms and conditions for use, reproduction,
++   and distribution as defined by Sections 1 through 9 of this document.
++
++   "Licensor" shall mean the copyright owner or entity authorized by
++   the copyright owner that is granting the License.
++
++   "Legal Entity" shall mean the union of the acting entity and all
++   other entities that control, are controlled by, or are under common
++   control with that entity. For the purposes of this definition,
++   "control" means (i) the power, direct or indirect, to cause the
++   direction or management of such entity, whether by contract or
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the
++   outstanding shares, or (iii) beneficial ownership of such entity.
++
++   "You" (or "Your") shall mean an individual or Legal Entity
++   exercising permissions granted by this License.
++
++   "Source" form shall mean the preferred form for making modifications,
++   including but not limited to software source code, documentation
++   source, and configuration files.
++
++   "Object" form shall mean any form resulting from mechanical
++   transformation or translation of a Source form, including but
++   not limited to compiled object code, generated documentation,
++   and conversions to other media types.
++
++   "Work" shall mean the work of authorship, whether in Source or
++   Object form, made available under the License, as indicated by a
++   copyright notice that is included in or attached to the work
++   (an example is provided in the Appendix below).
++
++   "Derivative Works" shall mean any work, whether in Source or Object
++   form, that is based on (or derived from) the Work and for which the
++   editorial revisions, annotations, elaborations, or other modifications
++   represent, as a whole, an original work of authorship. For the purposes
++   of this License, Derivative Works shall not include works that remain
++   separable from, or merely link (or bind by name) to the interfaces of,
++   the Work and Derivative Works thereof.
++
++   "Contribution" shall mean any work of authorship, including
++   the original version of the Work and any modifications or additions
++   to that Work or Derivative Works thereof, that is intentionally
++   submitted to Licensor for inclusion in the Work by the copyright owner
++   or by an individual or Legal Entity authorized to submit on behalf of
++   the copyright owner. For the purposes of this definition, "submitted"
++   means any form of electronic, verbal, or written communication sent
++   to the Licensor or its representatives, including but not limited to
++   communication on electronic mailing lists, source code control systems,
++   and issue tracking systems that are managed by, or on behalf of, the
++   Licensor for the purpose of discussing and improving the Work, but
++   excluding communication that is conspicuously marked or otherwise
++   designated in writing by the copyright owner as "Not a Contribution."
++
++   "Contributor" shall mean Licensor and any individual or Legal Entity
++   on behalf of whom a Contribution has been received by Licensor and
++   subsequently incorporated within the Work.
++
++2. Grant of Copyright License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   copyright license to reproduce, prepare Derivative Works of,
++   publicly display, publicly perform, sublicense, and distribute the
++   Work and such Derivative Works in Source or Object form.
++
++3. Grant of Patent License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   (except as stated in this section) patent license to make, have made,
++   use, offer to sell, sell, import, and otherwise transfer the Work,
++   where such license applies only to those patent claims licensable
++   by such Contributor that are necessarily infringed by their
++   Contribution(s) alone or by combination of their Contribution(s)
++   with the Work to which such Contribution(s) was submitted. If You
++   institute patent litigation against any entity (including a
++   cross-claim or counterclaim in a lawsuit) alleging that the Work
++   or a Contribution incorporated within the Work constitutes direct
++   or contributory patent infringement, then any patent licenses
++   granted to You under this License for that Work shall terminate
++   as of the date such litigation is filed.
++
++4. Redistribution. You may reproduce and distribute copies of the
++   Work or Derivative Works thereof in any medium, with or without
++   modifications, and in Source or Object form, provided that You
++   meet the following conditions:
++
++   (a) You must give any other recipients of the Work or
++       Derivative Works a copy of this License; and
++
++   (b) You must cause any modified files to carry prominent notices
++       stating that You changed the files; and
++
++   (c) You must retain, in the Source form of any Derivative Works
++       that You distribute, all copyright, patent, trademark, and
++       attribution notices from the Source form of the Work,
++       excluding those notices that do not pertain to any part of
++       the Derivative Works; and
++
++   (d) If the Work includes a "NOTICE" text file as part of its
++       distribution, then any Derivative Works that You distribute must
++       include a readable copy of the attribution notices contained
++       within such NOTICE file, excluding those notices that do not
++       pertain to any part of the Derivative Works, in at least one
++       of the following places: within a NOTICE text file distributed
++       as part of the Derivative Works; within the Source form or
++       documentation, if provided along with the Derivative Works; or,
++       within a display generated by the Derivative Works, if and
++       wherever such third-party notices normally appear. The contents
++       of the NOTICE file are for informational purposes only and
++       do not modify the License. You may add Your own attribution
++       notices within Derivative Works that You distribute, alongside
++       or as an addendum to the NOTICE text from the Work, provided
++       that such additional attribution notices cannot be construed
++       as modifying the License.
++
++   You may add Your own copyright statement to Your modifications and
++   may provide additional or different license terms and conditions
++   for use, reproduction, or distribution of Your modifications, or
++   for any such Derivative Works as a whole, provided Your use,
++   reproduction, and distribution of the Work otherwise complies with
++   the conditions stated in this License.
++
++5. Submission of Contributions. Unless You explicitly state otherwise,
++   any Contribution intentionally submitted for inclusion in the Work
++   by You to the Licensor shall be under the terms and conditions of
++   this License, without any additional terms or conditions.
++   Notwithstanding the above, nothing herein shall supersede or modify
++   the terms of any separate license agreement you may have executed
++   with Licensor regarding such Contributions.
++
++6. Trademarks. This License does not grant permission to use the trade
++   names, trademarks, service marks, or product names of the Licensor,
++   except as required for reasonable and customary use in describing the
++   origin of the Work and reproducing the content of the NOTICE file.
++
++7. Disclaimer of Warranty. Unless required by applicable law or
++   agreed to in writing, Licensor provides the Work (and each
++   Contributor provides its Contributions) on an "AS IS" BASIS,
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++   implied, including, without limitation, any warranties or conditions
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++   PARTICULAR PURPOSE. You are solely responsible for determining the
++   appropriateness of using or redistributing the Work and assume any
++   risks associated with Your exercise of permissions under this License.
++
++8. Limitation of Liability. In no event and under no legal theory,
++   whether in tort (including negligence), contract, or otherwise,
++   unless required by applicable law (such as deliberate and grossly
++   negligent acts) or agreed to in writing, shall any Contributor be
++   liable to You for damages, including any direct, indirect, special,
++   incidental, or consequential damages of any character arising as a
++   result of this License or out of the use or inability to use the
++   Work (including but not limited to damages for loss of goodwill,
++   work stoppage, computer failure or malfunction, or any and all
++   other commercial damages or losses), even if such Contributor
++   has been advised of the possibility of such damages.
++
++9. Accepting Warranty or Additional Liability. While redistributing
++   the Work or Derivative Works thereof, You may choose to offer,
++   and charge a fee for, acceptance of support, warranty, indemnity,
++   or other liability obligations and/or rights consistent with this
++   License. However, in accepting such obligations, You may act only
++   on Your own behalf and on Your sole responsibility, not on behalf
++   of any other Contributor, and only if You agree to indemnify,
++   defend, and hold each Contributor harmless for any liability
++   incurred by, or claims asserted against, such Contributor by reason
++   of your accepting any such warranty or additional liability.
++
++END OF TERMS AND CONDITIONS
++
++APPENDIX: How to apply the Apache License to your work.
++
++   To apply the Apache License to your work, attach the following
++   boilerplate notice, with the fields enclosed by brackets "[]"
++   replaced with your own identifying information. (Don't include
++   the brackets!)  The text should be enclosed in the appropriate
++   comment syntax for the file format. We also recommend that a
++   file or class name and description of purpose be included on the
++   same "printed page" as the copyright notice for easier
++   identification within third-party archives.
++
++Copyright [yyyy] [name of copyright owner]
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++      http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39d4bdb5acd313c1a92dbeaa1c379aaf0596a315
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2014 The Rust Project Developers
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c2f35e9cd8f596d29f4f5f458cab1f241e597f2c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,81 @@@
++# Serde &emsp; [![Build Status]][travis] [![Latest Version]][crates.io]
++
++[Build Status]: https://api.travis-ci.org/serde-rs/serde.svg?branch=master
++[travis]: https://travis-ci.org/serde-rs/serde
++[Latest Version]: https://img.shields.io/crates/v/serde.svg
++[crates.io]: https://crates.io/crates/serde
++
++**Serde is a framework for *ser*ializing and *de*serializing Rust data structures efficiently and generically.**
++
++---
++
++You may be looking for:
++
++- [An overview of Serde](https://serde.rs/)
++- [Data formats supported by Serde](https://serde.rs/#data-formats)
++- [Setting up `#[derive(Serialize, Deserialize)]`](https://serde.rs/codegen.html)
++- [Examples](https://serde.rs/examples.html)
++- [API documentation](https://docs.serde.rs/serde/)
++- [Release notes](https://github.com/serde-rs/serde/releases)
++
++## Serde in action
++
++<a href="http://play.integer32.com/?gist=9003c5b88c1f4989941925d7190c6eec" target="_blank">
++<img align="right" width="50" src="https://raw.githubusercontent.com/serde-rs/serde-rs.github.io/master/img/run.png">
++</a>
++
++```rust
++#[macro_use]
++extern crate serde_derive;
++
++extern crate serde;
++extern crate serde_json;
++
++#[derive(Serialize, Deserialize, Debug)]
++struct Point {
++    x: i32,
++    y: i32,
++}
++
++fn main() {
++    let point = Point { x: 1, y: 2 };
++
++    // Convert the Point to a JSON string.
++    let serialized = serde_json::to_string(&point).unwrap();
++
++    // Prints serialized = {"x":1,"y":2}
++    println!("serialized = {}", serialized);
++
++    // Convert the JSON string back to a Point.
++    let deserialized: Point = serde_json::from_str(&serialized).unwrap();
++
++    // Prints deserialized = Point { x: 1, y: 2 }
++    println!("deserialized = {:?}", deserialized);
++}
++```
++
++## Getting help
++
++Serde developers live in the #serde channel on
++[`irc.mozilla.org`](https://wiki.mozilla.org/IRC). The #rust channel is also a
++good resource with generally faster response time but less specific knowledge
++about Serde. If IRC is not your thing or you don't get a good response, we are
++happy to respond to [GitHub issues](https://github.com/serde-rs/serde/issues/new)
++as well.
++
++## License
++
++Serde is licensed under either of
++
++ * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
++   http://www.apache.org/licenses/LICENSE-2.0)
++ * MIT license ([LICENSE-MIT](LICENSE-MIT) or
++   http://opensource.org/licenses/MIT)
++
++at your option.
++
++### Contribution
++
++Unless you explicitly state otherwise, any contribution intentionally submitted
++for inclusion in Serde by you, as defined in the Apache-2.0 license, shall be
++dual licensed as above, without any additional terms or conditions.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..77e7824a41705c584260dbe64a412ffa762c1571
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,256 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use std::collections::HashSet;
++
++use syn::{self, visit};
++
++use internals::ast::Container;
++use internals::attr;
++
++macro_rules! path {
++    ($($path:tt)+) => {
++        syn::parse_path(stringify!($($path)+)).unwrap()
++    };
++}
++
++// Remove the default from every type parameter because in the generated impls
++// they look like associated types: "error: associated type bindings are not
++// allowed here".
++pub fn without_defaults(generics: &syn::Generics) -> syn::Generics {
++    syn::Generics {
++        ty_params: generics
++            .ty_params
++            .iter()
++            .map(
++                |ty_param| {
++                    syn::TyParam {
++                        default: None,
++                        ..ty_param.clone()
++                    }
++                },
++            )
++            .collect(),
++        ..generics.clone()
++    }
++}
++
++pub fn with_where_predicates(
++    generics: &syn::Generics,
++    predicates: &[syn::WherePredicate],
++) -> syn::Generics {
++    let mut generics = generics.clone();
++    generics
++        .where_clause
++        .predicates
++        .extend_from_slice(predicates);
++    generics
++}
++
++pub fn with_where_predicates_from_fields<F>(
++    cont: &Container,
++    generics: &syn::Generics,
++    from_field: F,
++) -> syn::Generics
++where
++    F: Fn(&attr::Field) -> Option<&[syn::WherePredicate]>,
++{
++    let predicates = cont.body
++        .all_fields()
++        .flat_map(|field| from_field(&field.attrs))
++        .flat_map(|predicates| predicates.to_vec());
++
++    let mut generics = generics.clone();
++    generics.where_clause.predicates.extend(predicates);
++    generics
++}
++
++// Puts the given bound on any generic type parameters that are used in fields
++// for which filter returns true.
++//
++// For example, the following struct needs the bound `A: Serialize, B: Serialize`.
++//
++//     struct S<'b, A, B: 'b, C> {
++//         a: A,
++//         b: Option<&'b B>
++//         #[serde(skip_serializing)]
++//         c: C,
++//     }
++pub fn with_bound<F>(
++    cont: &Container,
++    generics: &syn::Generics,
++    filter: F,
++    bound: &syn::Path,
++) -> syn::Generics
++where
++    F: Fn(&attr::Field) -> bool,
++{
++    struct FindTyParams {
++        // Set of all generic type parameters on the current struct (A, B, C in
++        // the example). Initialized up front.
++        all_ty_params: HashSet<syn::Ident>,
++        // Set of generic type parameters used in fields for which filter
++        // returns true (A and B in the example). Filled in as the visitor sees
++        // them.
++        relevant_ty_params: HashSet<syn::Ident>,
++    }
++    impl visit::Visitor for FindTyParams {
++        fn visit_path(&mut self, path: &syn::Path) {
++            if let Some(seg) = path.segments.last() {
++                if seg.ident == "PhantomData" {
++                    // Hardcoded exception, because PhantomData<T> implements
++                    // Serialize and Deserialize whether or not T implements it.
++                    return;
++                }
++            }
++            if !path.global && path.segments.len() == 1 {
++                let id = path.segments[0].ident.clone();
++                if self.all_ty_params.contains(&id) {
++                    self.relevant_ty_params.insert(id);
++                }
++            }
++            visit::walk_path(self, path);
++        }
++    }
++
++    let all_ty_params: HashSet<_> = generics
++        .ty_params
++        .iter()
++        .map(|ty_param| ty_param.ident.clone())
++        .collect();
++
++    let relevant_tys = cont.body
++        .all_fields()
++        .filter(|&field| filter(&field.attrs))
++        .map(|field| &field.ty);
++
++    let mut visitor = FindTyParams {
++        all_ty_params: all_ty_params,
++        relevant_ty_params: HashSet::new(),
++    };
++    for ty in relevant_tys {
++        visit::walk_ty(&mut visitor, ty);
++    }
++
++    let new_predicates = generics
++        .ty_params
++        .iter()
++        .map(|ty_param| ty_param.ident.clone())
++        .filter(|id| visitor.relevant_ty_params.contains(id))
++        .map(
++            |id| {
++                syn::WherePredicate::BoundPredicate(
++                    syn::WhereBoundPredicate {
++                        bound_lifetimes: Vec::new(),
++                        // the type parameter that is being bounded e.g. T
++                        bounded_ty: syn::Ty::Path(None, id.into()),
++                        // the bound e.g. Serialize
++                        bounds: vec![
++                            syn::TyParamBound::Trait(
++                                syn::PolyTraitRef {
++                                    bound_lifetimes: Vec::new(),
++                                    trait_ref: bound.clone(),
++                                },
++                                syn::TraitBoundModifier::None,
++                            ),
++                        ],
++                    },
++                )
++            },
++        );
++
++    let mut generics = generics.clone();
++    generics.where_clause.predicates.extend(new_predicates);
++    generics
++}
++
++pub fn with_self_bound(
++    cont: &Container,
++    generics: &syn::Generics,
++    bound: &syn::Path,
++) -> syn::Generics {
++    let mut generics = generics.clone();
++    generics
++        .where_clause
++        .predicates
++        .push(
++            syn::WherePredicate::BoundPredicate(
++                syn::WhereBoundPredicate {
++                    bound_lifetimes: Vec::new(),
++                    // the type that is being bounded e.g. MyStruct<'a, T>
++                    bounded_ty: type_of_item(cont),
++                    // the bound e.g. Default
++                    bounds: vec![
++                        syn::TyParamBound::Trait(
++                            syn::PolyTraitRef {
++                                bound_lifetimes: Vec::new(),
++                                trait_ref: bound.clone(),
++                            },
++                            syn::TraitBoundModifier::None,
++                        ),
++                    ],
++                },
++            ),
++        );
++    generics
++}
++
++pub fn with_lifetime_bound(generics: &syn::Generics, lifetime: &str) -> syn::Generics {
++    let mut generics = generics.clone();
++
++    for lifetime_def in &mut generics.lifetimes {
++        lifetime_def.bounds.push(syn::Lifetime::new(lifetime));
++    }
++
++    for ty_param in &mut generics.ty_params {
++        ty_param
++            .bounds
++            .push(syn::TyParamBound::Region(syn::Lifetime::new(lifetime)));
++    }
++
++    generics
++        .lifetimes
++        .push(
++            syn::LifetimeDef {
++                attrs: Vec::new(),
++                lifetime: syn::Lifetime::new(lifetime),
++                bounds: Vec::new(),
++            },
++        );
++
++    generics
++}
++
++fn type_of_item(cont: &Container) -> syn::Ty {
++    syn::Ty::Path(
++        None,
++        syn::Path {
++            global: false,
++            segments: vec![
++                syn::PathSegment {
++                    ident: cont.ident.clone(),
++                    parameters: syn::PathParameters::AngleBracketed(
++                        syn::AngleBracketedParameterData {
++                            lifetimes: cont.generics
++                                .lifetimes
++                                .iter()
++                                .map(|def| def.lifetime.clone())
++                                .collect(),
++                            types: cont.generics
++                                .ty_params
++                                .iter()
++                                .map(|param| syn::Ty::Path(None, param.ident.clone().into()))
++                                .collect(),
++                            bindings: Vec::new(),
++                        },
++                    ),
++                },
++            ],
++        },
++    )
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..647281c01d683a959a074e1ece08ff12348b8fef
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1761 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use syn::{self, Ident};
++use quote::{self, Tokens, ToTokens};
++
++use bound;
++use fragment::{Fragment, Expr, Stmts, Match};
++use internals::ast::{Body, Container, Field, Style, Variant};
++use internals::{self, attr};
++
++use std::collections::BTreeSet;
++
++pub fn expand_derive_deserialize(input: &syn::DeriveInput) -> Result<Tokens, String> {
++    let ctxt = internals::Ctxt::new();
++    let cont = Container::from_ast(&ctxt, input);
++    try!(ctxt.check());
++
++    let ident = &cont.ident;
++    let params = Parameters::new(&cont);
++    let (de_impl_generics, _, ty_generics, where_clause) = split_with_de_lifetime(&params);
++    let dummy_const = Ident::new(format!("_IMPL_DESERIALIZE_FOR_{}", ident));
++    let body = Stmts(deserialize_body(&cont, &params));
++
++    let impl_block = if let Some(remote) = cont.attrs.remote() {
++        let vis = &input.vis;
++        quote! {
++            impl #de_impl_generics #ident #ty_generics #where_clause {
++                #vis fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<#remote #ty_generics, __D::Error>
++                    where __D: _serde::Deserializer<'de>
++                {
++                    #body
++                }
++            }
++        }
++    } else {
++        quote! {
++            #[automatically_derived]
++            impl #de_impl_generics _serde::Deserialize<'de> for #ident #ty_generics #where_clause {
++                fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error>
++                    where __D: _serde::Deserializer<'de>
++                {
++                    #body
++                }
++            }
++        }
++    };
++
++    let generated = quote! {
++        #[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
++        const #dummy_const: () = {
++            extern crate serde as _serde;
++            #impl_block
++        };
++    };
++    Ok(generated)
++}
++
++struct Parameters {
++    /// Name of the type the `derive` is on.
++    local: syn::Ident,
++
++    /// Path to the type the impl is for. Either a single `Ident` for local
++    /// types or `some::remote::Ident` for remote types. Does not include
++    /// generic parameters.
++    this: syn::Path,
++
++    /// Generics including any explicit and inferred bounds for the impl.
++    generics: syn::Generics,
++
++    /// Lifetimes borrowed from the deserializer. These will become bounds on
++    /// the `'de` lifetime of the deserializer.
++    borrowed: BTreeSet<syn::Lifetime>,
++
++    /// At least one field has a serde(getter) attribute, implying that the
++    /// remote type has a private field.
++    has_getter: bool,
++}
++
++impl Parameters {
++    fn new(cont: &Container) -> Self {
++        let local = cont.ident.clone();
++        let this = match cont.attrs.remote() {
++            Some(remote) => remote.clone(),
++            None => cont.ident.clone().into(),
++        };
++        let generics = build_generics(cont);
++        let borrowed = borrowed_lifetimes(cont);
++        let has_getter = cont.body.has_getter();
++
++        Parameters {
++            local: local,
++            this: this,
++            generics: generics,
++            borrowed: borrowed,
++            has_getter: has_getter,
++        }
++    }
++
++    /// Type name to use in error messages and `&'static str` arguments to
++    /// various Deserializer methods.
++    fn type_name(&self) -> &str {
++        self.this.segments.last().unwrap().ident.as_ref()
++    }
++
++    fn de_lifetime_def(&self) -> syn::LifetimeDef {
++        syn::LifetimeDef {
++            attrs: Vec::new(),
++            lifetime: syn::Lifetime::new("'de"),
++            bounds: self.borrowed.iter().cloned().collect(),
++        }
++    }
++}
++
++// All the generics in the input, plus a bound `T: Deserialize` for each generic
++// field type that will be deserialized by us, plus a bound `T: Default` for
++// each generic field type that will be set to a default value.
++fn build_generics(cont: &Container) -> syn::Generics {
++    let generics = bound::without_defaults(cont.generics);
++
++    let generics = bound::with_where_predicates_from_fields(cont, &generics, attr::Field::de_bound);
++
++    match cont.attrs.de_bound() {
++        Some(predicates) => bound::with_where_predicates(&generics, predicates),
++        None => {
++            let generics = match *cont.attrs.default() {
++                attr::Default::Default => {
++                    bound::with_self_bound(cont, &generics, &path!(_serde::export::Default))
++                }
++                attr::Default::None |
++                attr::Default::Path(_) => generics,
++            };
++
++            let generics = bound::with_bound(
++                cont,
++                &generics,
++                needs_deserialize_bound,
++                &path!(_serde::Deserialize<'de>),
++            );
++
++            bound::with_bound(
++                cont,
++                &generics,
++                requires_default,
++                &path!(_serde::export::Default),
++            )
++        }
++    }
++}
++
++// Fields with a `skip_deserializing` or `deserialize_with` attribute are not
++// deserialized by us so we do not generate a bound. Fields with a `bound`
++// attribute specify their own bound so we do not generate one. All other fields
++// may need a `T: Deserialize` bound where T is the type of the field.
++fn needs_deserialize_bound(attrs: &attr::Field) -> bool {
++    !attrs.skip_deserializing() && attrs.deserialize_with().is_none() && attrs.de_bound().is_none()
++}
++
++// Fields with a `default` attribute (not `default=...`), and fields with a
++// `skip_deserializing` attribute that do not also have `default=...`.
++fn requires_default(attrs: &attr::Field) -> bool {
++    attrs.default() == &attr::Default::Default
++}
++
++// The union of lifetimes borrowed by each field of the container.
++//
++// These turn into bounds on the `'de` lifetime of the Deserialize impl. If
++// lifetimes `'a` and `'b` are borrowed but `'c` is not, the impl is:
++//
++//     impl<'de: 'a + 'b, 'a, 'b, 'c> Deserialize<'de> for S<'a, 'b, 'c>
++fn borrowed_lifetimes(cont: &Container) -> BTreeSet<syn::Lifetime> {
++    let mut lifetimes = BTreeSet::new();
++    for field in cont.body.all_fields() {
++        lifetimes.extend(field.attrs.borrowed_lifetimes().iter().cloned());
++    }
++    lifetimes
++}
++
++fn deserialize_body(cont: &Container, params: &Parameters) -> Fragment {
++    if let Some(from_type) = cont.attrs.from_type() {
++        deserialize_from(from_type)
++    } else if let attr::Identifier::No = cont.attrs.identifier() {
++        match cont.body {
++            Body::Enum(ref variants) => deserialize_enum(params, variants, &cont.attrs),
++            Body::Struct(Style::Struct, ref fields) => {
++                if fields.iter().any(|field| field.ident.is_none()) {
++                    panic!("struct has unnamed fields");
++                }
++                deserialize_struct(None, params, fields, &cont.attrs, None)
++            }
++            Body::Struct(Style::Tuple, ref fields) |
++            Body::Struct(Style::Newtype, ref fields) => {
++                if fields.iter().any(|field| field.ident.is_some()) {
++                    panic!("tuple struct has named fields");
++                }
++                deserialize_tuple(None, params, fields, &cont.attrs, None)
++            }
++            Body::Struct(Style::Unit, _) => deserialize_unit_struct(params, &cont.attrs),
++        }
++    } else {
++        match cont.body {
++            Body::Enum(ref variants) => {
++                deserialize_custom_identifier(params, variants, &cont.attrs)
++            }
++            Body::Struct(_, _) => unreachable!("checked in serde_derive_internals"),
++        }
++    }
++}
++
++fn deserialize_from(from_type: &syn::Ty) -> Fragment {
++    quote_block! {
++        _serde::export::Result::map(
++            <#from_type as _serde::Deserialize>::deserialize(__deserializer),
++            _serde::export::From::from)
++    }
++}
++
++fn deserialize_unit_struct(params: &Parameters, cattrs: &attr::Container) -> Fragment {
++    let this = &params.this;
++    let type_name = cattrs.name().deserialize_name();
++
++    let expecting = format!("unit struct {}", params.type_name());
++
++    quote_block! {
++        struct __Visitor;
++
++        impl<'de> _serde::de::Visitor<'de> for __Visitor {
++            type Value = #this;
++
++            fn expecting(&self, formatter: &mut _serde::export::Formatter) -> _serde::export::fmt::Result {
++                _serde::export::Formatter::write_str(formatter, #expecting)
++            }
++
++            #[inline]
++            fn visit_unit<__E>(self) -> _serde::export::Result<Self::Value, __E>
++                where __E: _serde::de::Error
++            {
++                _serde::export::Ok(#this)
++            }
++        }
++
++        _serde::Deserializer::deserialize_unit_struct(__deserializer, #type_name, __Visitor)
++    }
++}
++
++fn deserialize_tuple(
++    variant_ident: Option<&syn::Ident>,
++    params: &Parameters,
++    fields: &[Field],
++    cattrs: &attr::Container,
++    deserializer: Option<Tokens>,
++) -> Fragment {
++    let this = &params.this;
++    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) = split_with_de_lifetime(params,);
++
++    // If there are getters (implying private fields), construct the local type
++    // and use an `Into` conversion to get the remote type. If there are no
++    // getters then construct the target type directly.
++    let construct = if params.has_getter {
++        let local = &params.local;
++        quote!(#local)
++    } else {
++        quote!(#this)
++    };
++
++    let is_enum = variant_ident.is_some();
++    let type_path = match variant_ident {
++        Some(variant_ident) => quote!(#construct::#variant_ident),
++        None => construct,
++    };
++    let expecting = match variant_ident {
++        Some(variant_ident) => format!("tuple variant {}::{}", params.type_name(), variant_ident),
++        None => format!("tuple struct {}", params.type_name()),
++    };
++
++    let nfields = fields.len();
++
++    let visit_newtype_struct = if !is_enum && nfields == 1 {
++        Some(deserialize_newtype_struct(&type_path, params, &fields[0]))
++    } else {
++        None
++    };
++
++    let visit_seq = Stmts(deserialize_seq(&type_path, params, fields, false, cattrs));
++
++    let visitor_expr = quote! {
++        __Visitor {
++            marker: _serde::export::PhantomData::<#this #ty_generics>,
++            lifetime: _serde::export::PhantomData,
++        }
++    };
++    let dispatch = if let Some(deserializer) = deserializer {
++        quote!(_serde::Deserializer::deserialize_tuple(#deserializer, #nfields, #visitor_expr))
++    } else if is_enum {
++        quote!(_serde::de::VariantAccess::tuple_variant(__variant, #nfields, #visitor_expr))
++    } else if nfields == 1 {
++        let type_name = cattrs.name().deserialize_name();
++        quote!(_serde::Deserializer::deserialize_newtype_struct(__deserializer, #type_name, #visitor_expr))
++    } else {
++        let type_name = cattrs.name().deserialize_name();
++        quote!(_serde::Deserializer::deserialize_tuple_struct(__deserializer, #type_name, #nfields, #visitor_expr))
++    };
++
++    let all_skipped = fields
++        .iter()
++        .all(|field| field.attrs.skip_deserializing());
++    let visitor_var = if all_skipped {
++        quote!(_)
++    } else {
++        quote!(mut __seq)
++    };
++
++    quote_block! {
++        struct __Visitor #de_impl_generics #where_clause {
++            marker: _serde::export::PhantomData<#this #ty_generics>,
++            lifetime: _serde::export::PhantomData<&'de ()>,
++        }
++
++        impl #de_impl_generics _serde::de::Visitor<'de> for __Visitor #de_ty_generics #where_clause {
++            type Value = #this #ty_generics;
++
++            fn expecting(&self, formatter: &mut _serde::export::Formatter) -> _serde::export::fmt::Result {
++                _serde::export::Formatter::write_str(formatter, #expecting)
++            }
++
++            #visit_newtype_struct
++
++            #[inline]
++            fn visit_seq<__A>(self, #visitor_var: __A) -> _serde::export::Result<Self::Value, __A::Error>
++                where __A: _serde::de::SeqAccess<'de>
++            {
++                #visit_seq
++            }
++        }
++
++        #dispatch
++    }
++}
++
++fn deserialize_seq(
++    type_path: &Tokens,
++    params: &Parameters,
++    fields: &[Field],
++    is_struct: bool,
++    cattrs: &attr::Container,
++) -> Fragment {
++    let vars = (0..fields.len()).map(field_i as fn(_) -> _);
++
++    let deserialized_count = fields
++        .iter()
++        .filter(|field| !field.attrs.skip_deserializing())
++        .count();
++    let expecting = format!("tuple of {} elements", deserialized_count);
++
++    let mut index_in_seq = 0usize;
++    let let_values = vars.clone().zip(fields)
++        .map(|(var, field)| {
++            if field.attrs.skip_deserializing() {
++                let default = Expr(expr_is_missing(&field, cattrs));
++                quote! {
++                    let #var = #default;
++                }
++            } else {
++                let visit = match field.attrs.deserialize_with() {
++                    None => {
++                        let field_ty = &field.ty;
++                        quote!(try!(_serde::de::SeqAccess::next_element::<#field_ty>(&mut __seq)))
++                    }
++                    Some(path) => {
++                        let (wrapper, wrapper_ty) = wrap_deserialize_with(
++                            params, field.ty, path);
++                        quote!({
++                            #wrapper
++                            _serde::export::Option::map(
++                                try!(_serde::de::SeqAccess::next_element::<#wrapper_ty>(&mut __seq)),
++                                |__wrap| __wrap.value)
++                        })
++                    }
++                };
++                let assign = quote! {
++                    let #var = match #visit {
++                        Some(__value) => __value,
++                        None => {
++                            return _serde::export::Err(_serde::de::Error::invalid_length(#index_in_seq, &#expecting));
++                        }
++                    };
++                };
++                index_in_seq += 1;
++                assign
++            }
++        });
++
++    let mut result = if is_struct {
++        let names = fields.iter().map(|f| &f.ident);
++        quote! {
++            #type_path { #( #names: #vars ),* }
++        }
++    } else {
++        quote! {
++            #type_path ( #(#vars),* )
++        }
++    };
++
++    if params.has_getter {
++        let this = &params.this;
++        result = quote! {
++            _serde::export::Into::<#this>::into(#result)
++        };
++    }
++
++    quote_block! {
++        #(#let_values)*
++        _serde::export::Ok(#result)
++    }
++}
++
++fn deserialize_newtype_struct(type_path: &Tokens, params: &Parameters, field: &Field) -> Tokens {
++    let value = match field.attrs.deserialize_with() {
++        None => {
++            let field_ty = &field.ty;
++            quote! {
++                try!(<#field_ty as _serde::Deserialize>::deserialize(__e))
++            }
++        }
++        Some(path) => {
++            let (wrapper, wrapper_ty) = wrap_deserialize_with(params, field.ty, path);
++            quote!({
++                #wrapper
++                try!(<#wrapper_ty as _serde::Deserialize>::deserialize(__e)).value
++            })
++        }
++    };
++
++    let mut result = quote!(#type_path(#value));
++    if params.has_getter {
++        let this = &params.this;
++        result = quote! {
++            _serde::export::Into::<#this>::into(#result)
++        };
++    }
++
++    quote! {
++        #[inline]
++        fn visit_newtype_struct<__E>(self, __e: __E) -> _serde::export::Result<Self::Value, __E::Error>
++            where __E: _serde::Deserializer<'de>
++        {
++            _serde::export::Ok(#result)
++        }
++    }
++}
++
++fn deserialize_struct(
++    variant_ident: Option<&syn::Ident>,
++    params: &Parameters,
++    fields: &[Field],
++    cattrs: &attr::Container,
++    deserializer: Option<Tokens>,
++) -> Fragment {
++    let is_enum = variant_ident.is_some();
++    let is_untagged = deserializer.is_some();
++
++    let this = &params.this;
++    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) = split_with_de_lifetime(params,);
++
++    // If there are getters (implying private fields), construct the local type
++    // and use an `Into` conversion to get the remote type. If there are no
++    // getters then construct the target type directly.
++    let construct = if params.has_getter {
++        let local = &params.local;
++        quote!(#local)
++    } else {
++        quote!(#this)
++    };
++
++    let type_path = match variant_ident {
++        Some(variant_ident) => quote!(#construct::#variant_ident),
++        None => construct,
++    };
++    let expecting = match variant_ident {
++        Some(variant_ident) => format!("struct variant {}::{}", params.type_name(), variant_ident),
++        None => format!("struct {}", params.type_name()),
++    };
++
++    let visit_seq = Stmts(deserialize_seq(&type_path, params, fields, true, cattrs));
++
++    let (field_visitor, fields_stmt, visit_map) =
++        deserialize_struct_visitor(type_path, params, fields, cattrs);
++    let field_visitor = Stmts(field_visitor);
++    let fields_stmt = Stmts(fields_stmt);
++    let visit_map = Stmts(visit_map);
++
++    let visitor_expr = quote! {
++        __Visitor {
++            marker: _serde::export::PhantomData::<#this #ty_generics>,
++            lifetime: _serde::export::PhantomData,
++        }
++    };
++    let dispatch = if let Some(deserializer) = deserializer {
++        quote! {
++            _serde::Deserializer::deserialize_any(#deserializer, #visitor_expr)
++        }
++    } else if is_enum {
++        quote! {
++            _serde::de::VariantAccess::struct_variant(__variant, FIELDS, #visitor_expr)
++        }
++    } else {
++        let type_name = cattrs.name().deserialize_name();
++        quote! {
++            _serde::Deserializer::deserialize_struct(__deserializer, #type_name, FIELDS, #visitor_expr)
++        }
++    };
++
++    let all_skipped = fields
++        .iter()
++        .all(|field| field.attrs.skip_deserializing());
++    let visitor_var = if all_skipped {
++        quote!(_)
++    } else {
++        quote!(mut __seq)
++    };
++
++    let visit_seq = if is_untagged {
++        // untagged struct variants do not get a visit_seq method
++        None
++    } else {
++        Some(quote! {
++            #[inline]
++            fn visit_seq<__A>(self, #visitor_var: __A) -> _serde::export::Result<Self::Value, __A::Error>
++                where __A: _serde::de::SeqAccess<'de>
++            {
++                #visit_seq
++            }
++        })
++    };
++
++    quote_block! {
++        #field_visitor
++
++        struct __Visitor #de_impl_generics #where_clause {
++            marker: _serde::export::PhantomData<#this #ty_generics>,
++            lifetime: _serde::export::PhantomData<&'de ()>,
++        }
++
++        impl #de_impl_generics _serde::de::Visitor<'de> for __Visitor #de_ty_generics #where_clause {
++            type Value = #this #ty_generics;
++
++            fn expecting(&self, formatter: &mut _serde::export::Formatter) -> _serde::export::fmt::Result {
++                _serde::export::Formatter::write_str(formatter, #expecting)
++            }
++
++            #visit_seq
++
++            #[inline]
++            fn visit_map<__A>(self, mut __map: __A) -> _serde::export::Result<Self::Value, __A::Error>
++                where __A: _serde::de::MapAccess<'de>
++            {
++                #visit_map
++            }
++        }
++
++        #fields_stmt
++
++        #dispatch
++    }
++}
++
++fn deserialize_enum(
++    params: &Parameters,
++    variants: &[Variant],
++    cattrs: &attr::Container,
++) -> Fragment {
++    match *cattrs.tag() {
++        attr::EnumTag::External => deserialize_externally_tagged_enum(params, variants, cattrs),
++        attr::EnumTag::Internal { ref tag } => {
++            deserialize_internally_tagged_enum(params, variants, cattrs, tag)
++        }
++        attr::EnumTag::Adjacent {
++            ref tag,
++            ref content,
++        } => deserialize_adjacently_tagged_enum(params, variants, cattrs, tag, content),
++        attr::EnumTag::None => deserialize_untagged_enum(params, variants, cattrs),
++    }
++}
++
++fn deserialize_externally_tagged_enum(
++    params: &Parameters,
++    variants: &[Variant],
++    cattrs: &attr::Container,
++) -> Fragment {
++    let this = &params.this;
++    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) = split_with_de_lifetime(params,);
++
++    let type_name = cattrs.name().deserialize_name();
++
++    let expecting = format!("enum {}", params.type_name());
++
++    let variant_names_idents: Vec<_> = variants
++        .iter()
++        .enumerate()
++        .filter(|&(_, variant)| !variant.attrs.skip_deserializing())
++        .map(|(i, variant)| (variant.attrs.name().deserialize_name(), field_i(i)),)
++        .collect();
++
++    let variants_stmt = {
++        let variant_names = variant_names_idents.iter().map(|&(ref name, _)| name);
++        quote! {
++            const VARIANTS: &'static [&'static str] = &[ #(#variant_names),* ];
++        }
++    };
++
++    let variant_visitor = Stmts(deserialize_generated_identifier(variant_names_idents, cattrs, true),);
++
++    // Match arms to extract a variant from a string
++    let variant_arms = variants
++        .iter()
++        .enumerate()
++        .filter(|&(_, variant)| !variant.attrs.skip_deserializing())
++        .map(
++            |(i, variant)| {
++                let variant_name = field_i(i);
++
++                let block = Match(deserialize_externally_tagged_variant(params, variant, cattrs),);
++
++                quote! {
++                    (__Field::#variant_name, __variant) => #block
++                }
++            },
++        );
++
++    let all_skipped = variants
++        .iter()
++        .all(|variant| variant.attrs.skip_deserializing());
++    let match_variant = if all_skipped {
++        // This is an empty enum like `enum Impossible {}` or an enum in which
++        // all variants have `#[serde(skip_deserializing)]`.
++        quote! {
++            // FIXME: Once we drop support for Rust 1.15:
++            // let _serde::export::Err(__err) = _serde::de::EnumAccess::variant::<__Field>(__data);
++            // _serde::export::Err(__err)
++            _serde::export::Result::map(
++                _serde::de::EnumAccess::variant::<__Field>(__data),
++                |(__impossible, _)| match __impossible {})
++        }
++    } else {
++        quote! {
++            match try!(_serde::de::EnumAccess::variant(__data)) {
++                #(#variant_arms)*
++            }
++        }
++    };
++
++    quote_block! {
++        #variant_visitor
++
++        struct __Visitor #de_impl_generics #where_clause {
++            marker: _serde::export::PhantomData<#this #ty_generics>,
++            lifetime: _serde::export::PhantomData<&'de ()>,
++        }
++
++        impl #de_impl_generics _serde::de::Visitor<'de> for __Visitor #de_ty_generics #where_clause {
++            type Value = #this #ty_generics;
++
++            fn expecting(&self, formatter: &mut _serde::export::Formatter) -> _serde::export::fmt::Result {
++                _serde::export::Formatter::write_str(formatter, #expecting)
++            }
++
++            fn visit_enum<__A>(self, __data: __A) -> _serde::export::Result<Self::Value, __A::Error>
++                where __A: _serde::de::EnumAccess<'de>
++            {
++                #match_variant
++            }
++        }
++
++        #variants_stmt
++
++        _serde::Deserializer::deserialize_enum(__deserializer, #type_name, VARIANTS,
++                                               __Visitor {
++                                                   marker: _serde::export::PhantomData::<#this #ty_generics>,
++                                                   lifetime: _serde::export::PhantomData,
++                                               })
++    }
++}
++
++fn deserialize_internally_tagged_enum(
++    params: &Parameters,
++    variants: &[Variant],
++    cattrs: &attr::Container,
++    tag: &str,
++) -> Fragment {
++    let variant_names_idents: Vec<_> = variants
++        .iter()
++        .enumerate()
++        .filter(|&(_, variant)| !variant.attrs.skip_deserializing())
++        .map(|(i, variant)| (variant.attrs.name().deserialize_name(), field_i(i)),)
++        .collect();
++
++    let variants_stmt = {
++        let variant_names = variant_names_idents.iter().map(|&(ref name, _)| name);
++        quote! {
++            const VARIANTS: &'static [&'static str] = &[ #(#variant_names),* ];
++        }
++    };
++
++    let variant_visitor = Stmts(deserialize_generated_identifier(variant_names_idents, cattrs, true),);
++
++    // Match arms to extract a variant from a string
++    let variant_arms = variants.iter()
++        .enumerate()
++        .filter(|&(_, variant)| !variant.attrs.skip_deserializing())
++        .map(|(i, variant)| {
++            let variant_name = field_i(i);
++
++            let block = Match(deserialize_internally_tagged_variant(
++                params,
++                variant,
++                cattrs,
++                quote!(_serde::private::de::ContentDeserializer::<__D::Error>::new(__tagged.content)),
++            ));
++
++            quote! {
++                __Field::#variant_name => #block
++            }
++        });
++
++    quote_block! {
++        #variant_visitor
++
++        #variants_stmt
++
++        let __tagged = try!(_serde::Deserializer::deserialize_any(
++            __deserializer,
++            _serde::private::de::TaggedContentVisitor::<__Field>::new(#tag)));
++
++        match __tagged.tag {
++            #(#variant_arms)*
++        }
++    }
++}
++
++fn deserialize_adjacently_tagged_enum(
++    params: &Parameters,
++    variants: &[Variant],
++    cattrs: &attr::Container,
++    tag: &str,
++    content: &str,
++) -> Fragment {
++    let this = &params.this;
++    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) = split_with_de_lifetime(params,);
++
++    let variant_names_idents: Vec<_> = variants
++        .iter()
++        .enumerate()
++        .filter(|&(_, variant)| !variant.attrs.skip_deserializing())
++        .map(|(i, variant)| (variant.attrs.name().deserialize_name(), field_i(i)),)
++        .collect();
++
++    let variants_stmt = {
++        let variant_names = variant_names_idents.iter().map(|&(ref name, _)| name);
++        quote! {
++            const VARIANTS: &'static [&'static str] = &[ #(#variant_names),* ];
++        }
++    };
++
++    let variant_visitor = Stmts(deserialize_generated_identifier(variant_names_idents, cattrs, true),);
++
++    let ref variant_arms: Vec<_> = variants
++        .iter()
++        .enumerate()
++        .filter(|&(_, variant)| !variant.attrs.skip_deserializing())
++        .map(
++            |(i, variant)| {
++                let variant_index = field_i(i);
++
++                let block = Match(
++                    deserialize_untagged_variant(
++                        params,
++                        variant,
++                        cattrs,
++                        quote!(__deserializer),
++                    ),
++                );
++
++                quote! {
++                    __Field::#variant_index => #block
++                }
++            },
++        )
++        .collect();
++
++    let expecting = format!("adjacently tagged enum {}", params.type_name());
++    let type_name = cattrs.name().deserialize_name();
++    let deny_unknown_fields = cattrs.deny_unknown_fields();
++
++    /// If unknown fields are allowed, we pick the visitor that can
++    /// step over those. Otherwise we pick the visitor that fails on
++    /// unknown keys.
++    let field_visitor_ty = if deny_unknown_fields {
++        quote! { _serde::private::de::TagOrContentFieldVisitor }
++    } else {
++        quote! { _serde::private::de::TagContentOtherFieldVisitor }
++    };
++
++    let tag_or_content = quote! {
++        #field_visitor_ty {
++            tag: #tag,
++            content: #content,
++        }
++    };
++
++    fn is_unit(variant: &Variant) -> bool {
++        match variant.style {
++            Style::Unit => true,
++            Style::Struct | Style::Tuple | Style::Newtype => false,
++        }
++    }
++
++    let mut missing_content = quote! {
++        _serde::export::Err(<__A::Error as _serde::de::Error>::missing_field(#content))
++    };
++    if variants.iter().any(is_unit) {
++        let fallthrough = if variants.iter().all(is_unit) {
++            None
++        } else {
++            Some(
++                quote! {
++                    _ => #missing_content
++                },
++            )
++        };
++        let arms = variants
++            .iter()
++            .enumerate()
++            .filter(|&(_, variant)| !variant.attrs.skip_deserializing() && is_unit(variant),)
++            .map(
++                |(i, variant)| {
++                    let variant_index = field_i(i);
++                    let variant_ident = &variant.ident;
++                    quote! {
++                        __Field::#variant_index => _serde::export::Ok(#this::#variant_ident),
++                    }
++                },
++            );
++        missing_content = quote! {
++            match __field {
++                #(#arms)*
++                #fallthrough
++            }
++        };
++    }
++
++    /// Advance the map by one key, returning early in case of error.
++    let next_key = quote! {
++        try!(_serde::de::MapAccess::next_key_seed(&mut __map, #tag_or_content))
++    };
++
++    /// When allowing unknown fields, we want to transparently step through keys we don't care
++    /// about until we find `tag`, `content`, or run out of keys.
++    let next_relevant_key = if deny_unknown_fields {
++        next_key
++    } else {
++        quote! {
++            {
++                let mut __rk : _serde::export::Option<_serde::private::de::TagOrContentField> = _serde::export::None;
++                while let _serde::export::Some(__k) = #next_key {
++                    match __k {
++                        _serde::private::de::TagContentOtherField::Other => {
++                            try!(_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map));
++                            continue;
++                        },
++                        _serde::private::de::TagContentOtherField::Tag => {
++                            __rk = _serde::export::Some(_serde::private::de::TagOrContentField::Tag);
++                            break;
++                        }
++                        _serde::private::de::TagContentOtherField::Content => {
++                            __rk = _serde::export::Some(_serde::private::de::TagOrContentField::Content);
++                            break;
++                        }
++                    }
++                }
++
++                __rk
++            }
++        }
++    };
++
++    /// Step through remaining keys, looking for duplicates of previously-seen keys.
++    /// When unknown fields are denied, any key that isn't a duplicate will at this
++    /// point immediately produce an error.
++    let visit_remaining_keys = quote! {
++        match #next_relevant_key {
++            _serde::export::Some(_serde::private::de::TagOrContentField::Tag) => {
++                _serde::export::Err(<__A::Error as _serde::de::Error>::duplicate_field(#tag))
++            }
++            _serde::export::Some(_serde::private::de::TagOrContentField::Content) => {
++                _serde::export::Err(<__A::Error as _serde::de::Error>::duplicate_field(#content))
++            }
++            _serde::export::None => _serde::export::Ok(__ret),
++        }
++    };
++
++    quote_block! {
++        #variant_visitor
++
++        #variants_stmt
++
++        struct __Seed #de_impl_generics #where_clause {
++            field: __Field,
++            marker: _serde::export::PhantomData<#this #ty_generics>,
++            lifetime: _serde::export::PhantomData<&'de ()>,
++        }
++
++        impl #de_impl_generics _serde::de::DeserializeSeed<'de> for __Seed #de_ty_generics #where_clause {
++            type Value = #this #ty_generics;
++
++            fn deserialize<__D>(self, __deserializer: __D) -> _serde::export::Result<Self::Value, __D::Error>
++                where __D: _serde::Deserializer<'de>
++            {
++                match self.field {
++                    #(#variant_arms)*
++                }
++            }
++        }
++
++        struct __Visitor #de_impl_generics #where_clause {
++            marker: _serde::export::PhantomData<#this #ty_generics>,
++            lifetime: _serde::export::PhantomData<&'de ()>,
++        }
++
++        impl #de_impl_generics _serde::de::Visitor<'de> for __Visitor #de_ty_generics #where_clause {
++            type Value = #this #ty_generics;
++
++            fn expecting(&self, formatter: &mut _serde::export::Formatter) -> _serde::export::fmt::Result {
++                _serde::export::Formatter::write_str(formatter, #expecting)
++            }
++
++            fn visit_map<__A>(self, mut __map: __A) -> _serde::export::Result<Self::Value, __A::Error>
++                where __A: _serde::de::MapAccess<'de>
++            {
++                // Visit the first relevant key.
++                match #next_relevant_key {
++                    // First key is the tag.
++                    _serde::export::Some(_serde::private::de::TagOrContentField::Tag) => {
++                        // Parse the tag.
++                        let __field = try!(_serde::de::MapAccess::next_value(&mut __map));
++                        // Visit the second key.
++                        match #next_relevant_key {
++                            // Second key is a duplicate of the tag.
++                            _serde::export::Some(_serde::private::de::TagOrContentField::Tag) => {
++                                _serde::export::Err(<__A::Error as _serde::de::Error>::duplicate_field(#tag))
++                            }
++                            // Second key is the content.
++                            _serde::export::Some(_serde::private::de::TagOrContentField::Content) => {
++                                let __ret = try!(_serde::de::MapAccess::next_value_seed(&mut __map,
++                                    __Seed {
++                                        field: __field,
++                                        marker: _serde::export::PhantomData,
++                                        lifetime: _serde::export::PhantomData,
++                                    }));
++                                // Visit remaining keys, looking for duplicates.
++                                #visit_remaining_keys
++                            }
++                            // There is no second key; might be okay if the we have a unit variant.
++                            _serde::export::None => #missing_content
++                        }
++                    }
++                    // First key is the content.
++                    _serde::export::Some(_serde::private::de::TagOrContentField::Content) => {
++                        // Buffer up the content.
++                        let __content = try!(_serde::de::MapAccess::next_value::<_serde::private::de::Content>(&mut __map));
++                        // Visit the second key.
++                        match #next_relevant_key {
++                            // Second key is the tag.
++                            _serde::export::Some(_serde::private::de::TagOrContentField::Tag) => {
++                                let __deserializer = _serde::private::de::ContentDeserializer::<__A::Error>::new(__content);
++                                // Parse the tag.
++                                let __ret = try!(match try!(_serde::de::MapAccess::next_value(&mut __map)) {
++                                    // Deserialize the buffered content now that we know the variant.
++                                    #(#variant_arms)*
++                                });
++                                // Visit remaining keys, looking for duplicates.
++                                #visit_remaining_keys
++                            }
++                            // Second key is a duplicate of the content.
++                            _serde::export::Some(_serde::private::de::TagOrContentField::Content) => {
++                                _serde::export::Err(<__A::Error as _serde::de::Error>::duplicate_field(#content))
++                            }
++                            // There is no second key.
++                            _serde::export::None => {
++                                _serde::export::Err(<__A::Error as _serde::de::Error>::missing_field(#tag))
++                            }
++                        }
++                    }
++                    // There is no first key.
++                    _serde::export::None => {
++                        _serde::export::Err(<__A::Error as _serde::de::Error>::missing_field(#tag))
++                    }
++                }
++            }
++
++            fn visit_seq<__A>(self, mut __seq: __A) -> _serde::export::Result<Self::Value, __A::Error>
++                where __A: _serde::de::SeqAccess<'de>
++            {
++                // Visit the first element - the tag.
++                match try!(_serde::de::SeqAccess::next_element(&mut __seq)) {
++                    _serde::export::Some(__field) => {
++                        // Visit the second element - the content.
++                        match try!(_serde::de::SeqAccess::next_element_seed(&mut __seq,
++                                __Seed {
++                                    field: __field,
++                                    marker: _serde::export::PhantomData,
++                                    lifetime: _serde::export::PhantomData,
++                                })) {
++                            _serde::export::Some(__ret) => _serde::export::Ok(__ret),
++                            // There is no second element.
++                            _serde::export::None => {
++                                _serde::export::Err(_serde::de::Error::invalid_length(1, &self))
++                            }
++                        }
++                    }
++                    // There is no first element.
++                    _serde::export::None => {
++                        _serde::export::Err(_serde::de::Error::invalid_length(0, &self))
++                    }
++                }
++            }
++        }
++
++        const FIELDS: &'static [&'static str] = &[#tag, #content];
++        _serde::Deserializer::deserialize_struct(__deserializer, #type_name, FIELDS,
++            __Visitor {
++                marker: _serde::export::PhantomData::<#this #ty_generics>,
++                lifetime: _serde::export::PhantomData,
++            })
++    }
++}
++
++fn deserialize_untagged_enum(
++    params: &Parameters,
++    variants: &[Variant],
++    cattrs: &attr::Container,
++) -> Fragment {
++    let attempts = variants
++        .iter()
++        .filter(|variant| !variant.attrs.skip_deserializing())
++        .map(
++            |variant| {
++                Expr(deserialize_untagged_variant(
++                params,
++                variant,
++                cattrs,
++                quote!(_serde::private::de::ContentRefDeserializer::<__D::Error>::new(&__content)),
++            ))
++            },
++        );
++
++    // TODO this message could be better by saving the errors from the failed
++    // attempts. The heuristic used by TOML was to count the number of fields
++    // processed before an error, and use the error that happened after the
++    // largest number of fields. I'm not sure I like that. Maybe it would be
++    // better to save all the errors and combine them into one message that
++    // explains why none of the variants matched.
++    let fallthrough_msg =
++        format!("data did not match any variant of untagged enum {}", params.type_name());
++
++    quote_block! {
++        let __content = try!(<_serde::private::de::Content as _serde::Deserialize>::deserialize(__deserializer));
++
++        #(
++            if let _serde::export::Ok(__ok) = #attempts {
++                return _serde::export::Ok(__ok);
++            }
++        )*
++
++        _serde::export::Err(_serde::de::Error::custom(#fallthrough_msg))
++    }
++}
++
++fn deserialize_externally_tagged_variant(
++    params: &Parameters,
++    variant: &Variant,
++    cattrs: &attr::Container,
++) -> Fragment {
++    let variant_ident = &variant.ident;
++
++    match variant.style {
++        Style::Unit => {
++            let this = &params.this;
++            quote_block! {
++                try!(_serde::de::VariantAccess::unit_variant(__variant));
++                _serde::export::Ok(#this::#variant_ident)
++            }
++        }
++        Style::Newtype => {
++            deserialize_externally_tagged_newtype_variant(variant_ident, params, &variant.fields[0])
++        }
++        Style::Tuple => {
++            deserialize_tuple(Some(variant_ident), params, &variant.fields, cattrs, None)
++        }
++        Style::Struct => {
++            deserialize_struct(Some(variant_ident), params, &variant.fields, cattrs, None)
++        }
++    }
++}
++
++fn deserialize_internally_tagged_variant(
++    params: &Parameters,
++    variant: &Variant,
++    cattrs: &attr::Container,
++    deserializer: Tokens,
++) -> Fragment {
++    let variant_ident = &variant.ident;
++
++    match variant.style {
++        Style::Unit => {
++            let this = &params.this;
++            let type_name = params.type_name();
++            let variant_name = variant.ident.as_ref();
++            quote_block! {
++                try!(_serde::Deserializer::deserialize_any(#deserializer, _serde::private::de::InternallyTaggedUnitVisitor::new(#type_name, #variant_name)));
++                _serde::export::Ok(#this::#variant_ident)
++            }
++        }
++        Style::Newtype | Style::Struct => {
++            deserialize_untagged_variant(params, variant, cattrs, deserializer)
++        }
++        Style::Tuple => unreachable!("checked in serde_derive_internals"),
++    }
++}
++
++fn deserialize_untagged_variant(
++    params: &Parameters,
++    variant: &Variant,
++    cattrs: &attr::Container,
++    deserializer: Tokens,
++) -> Fragment {
++    let variant_ident = &variant.ident;
++
++    match variant.style {
++        Style::Unit => {
++            let this = &params.this;
++            let type_name = params.type_name();
++            let variant_name = variant.ident.as_ref();
++            quote_expr! {
++                _serde::export::Result::map(
++                    _serde::Deserializer::deserialize_any(
++                        #deserializer,
++                        _serde::private::de::UntaggedUnitVisitor::new(#type_name, #variant_name)
++                    ),
++                    |()| #this::#variant_ident)
++            }
++        }
++        Style::Newtype => {
++            deserialize_untagged_newtype_variant(
++                variant_ident,
++                params,
++                &variant.fields[0],
++                deserializer,
++            )
++        }
++        Style::Tuple => {
++            deserialize_tuple(
++                Some(variant_ident),
++                params,
++                &variant.fields,
++                cattrs,
++                Some(deserializer),
++            )
++        }
++        Style::Struct => {
++            deserialize_struct(
++                Some(variant_ident),
++                params,
++                &variant.fields,
++                cattrs,
++                Some(deserializer),
++            )
++        }
++    }
++}
++
++fn deserialize_externally_tagged_newtype_variant(
++    variant_ident: &syn::Ident,
++    params: &Parameters,
++    field: &Field,
++) -> Fragment {
++    let this = &params.this;
++    match field.attrs.deserialize_with() {
++        None => {
++            let field_ty = &field.ty;
++            quote_expr! {
++                _serde::export::Result::map(
++                    _serde::de::VariantAccess::newtype_variant::<#field_ty>(__variant),
++                    #this::#variant_ident)
++            }
++        }
++        Some(path) => {
++            let (wrapper, wrapper_ty) = wrap_deserialize_with(params, field.ty, path);
++            quote_block! {
++                #wrapper
++                _serde::export::Result::map(
++                    _serde::de::VariantAccess::newtype_variant::<#wrapper_ty>(__variant),
++                    |__wrapper| #this::#variant_ident(__wrapper.value))
++            }
++        }
++    }
++}
++
++fn deserialize_untagged_newtype_variant(
++    variant_ident: &syn::Ident,
++    params: &Parameters,
++    field: &Field,
++    deserializer: Tokens,
++) -> Fragment {
++    let this = &params.this;
++    match field.attrs.deserialize_with() {
++        None => {
++            let field_ty = &field.ty;
++            quote_expr! {
++                _serde::export::Result::map(
++                    <#field_ty as _serde::Deserialize>::deserialize(#deserializer),
++                    #this::#variant_ident)
++            }
++        }
++        Some(path) => {
++            let (wrapper, wrapper_ty) = wrap_deserialize_with(params, field.ty, path);
++            quote_block! {
++                #wrapper
++                _serde::export::Result::map(
++                    <#wrapper_ty as _serde::Deserialize>::deserialize(#deserializer),
++                    |__wrapper| #this::#variant_ident(__wrapper.value))
++            }
++        }
++    }
++}
++
++fn deserialize_generated_identifier(
++    fields: Vec<(String, Ident)>,
++    cattrs: &attr::Container,
++    is_variant: bool,
++) -> Fragment {
++    let this = quote!(__Field);
++    let field_idents: &Vec<_> = &fields.iter().map(|&(_, ref ident)| ident).collect();
++
++    let (ignore_variant, fallthrough) = if is_variant || cattrs.deny_unknown_fields() {
++        (None, None)
++    } else {
++        let ignore_variant = quote!(__ignore,);
++        let fallthrough = quote!(_serde::export::Ok(__Field::__ignore));
++        (Some(ignore_variant), Some(fallthrough))
++    };
++
++    let visitor_impl = Stmts(deserialize_identifier(this, &fields, is_variant, fallthrough),);
++
++    quote_block! {
++        #[allow(non_camel_case_types)]
++        enum __Field {
++            #(#field_idents,)*
++            #ignore_variant
++        }
++
++        struct __FieldVisitor;
++
++        impl<'de> _serde::de::Visitor<'de> for __FieldVisitor {
++            type Value = __Field;
++
++            #visitor_impl
++        }
++
++        impl<'de> _serde::Deserialize<'de> for __Field {
++            #[inline]
++            fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error>
++                where __D: _serde::Deserializer<'de>
++            {
++                _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor)
++            }
++        }
++    }
++}
++
++fn deserialize_custom_identifier(
++    params: &Parameters,
++    variants: &[Variant],
++    cattrs: &attr::Container,
++) -> Fragment {
++    let is_variant = match cattrs.identifier() {
++        attr::Identifier::Variant => true,
++        attr::Identifier::Field => false,
++        attr::Identifier::No => unreachable!(),
++    };
++
++    let this = &params.this;
++    let this = quote!(#this);
++
++    let (ordinary, fallthrough) = if let Some(last) = variants.last() {
++        let last_ident = &last.ident;
++        if last.attrs.other() {
++            let ordinary = &variants[..variants.len() - 1];
++            let fallthrough = quote!(_serde::export::Ok(#this::#last_ident));
++            (ordinary, Some(fallthrough))
++        } else if let Style::Newtype = last.style {
++            let ordinary = &variants[..variants.len() - 1];
++            let deserializer = quote!(_serde::private::de::IdentifierDeserializer::from(__value));
++            let fallthrough = quote! {
++                _serde::export::Result::map(
++                    _serde::Deserialize::deserialize(#deserializer),
++                    #this::#last_ident)
++            };
++            (ordinary, Some(fallthrough))
++        } else {
++            (variants, None)
++        }
++    } else {
++        (variants, None)
++    };
++
++    let names_idents: Vec<_> = ordinary
++        .iter()
++        .map(|variant| (variant.attrs.name().deserialize_name(), variant.ident.clone()),)
++        .collect();
++
++    let names = names_idents.iter().map(|&(ref name, _)| name);
++
++    let names_const = if fallthrough.is_some() {
++        None
++    } else if is_variant {
++        let variants = quote! {
++            const VARIANTS: &'static [&'static str] = &[ #(#names),* ];
++        };
++        Some(variants)
++    } else {
++        let fields = quote! {
++            const FIELDS: &'static [&'static str] = &[ #(#names),* ];
++        };
++        Some(fields)
++    };
++
++    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) = split_with_de_lifetime(params,);
++    let visitor_impl =
++        Stmts(deserialize_identifier(this.clone(), &names_idents, is_variant, fallthrough),);
++
++    quote_block! {
++        #names_const
++
++        struct __FieldVisitor #de_impl_generics #where_clause {
++            marker: _serde::export::PhantomData<#this #ty_generics>,
++            lifetime: _serde::export::PhantomData<&'de ()>,
++        }
++
++        impl #de_impl_generics _serde::de::Visitor<'de> for __FieldVisitor #de_ty_generics #where_clause {
++            type Value = #this #ty_generics;
++
++            #visitor_impl
++        }
++
++        let __visitor = __FieldVisitor {
++            marker: _serde::export::PhantomData::<#this #ty_generics>,
++            lifetime: _serde::export::PhantomData,
++        };
++        _serde::Deserializer::deserialize_identifier(__deserializer, __visitor)
++    }
++}
++
++fn deserialize_identifier(
++    this: Tokens,
++    fields: &[(String, Ident)],
++    is_variant: bool,
++    fallthrough: Option<Tokens>,
++) -> Fragment {
++    let field_strs = fields.iter().map(|&(ref name, _)| name);
++    let field_bytes = fields.iter().map(|&(ref name, _)| quote::ByteStr(name));
++
++    let constructors: &Vec<_> = &fields
++                                     .iter()
++                                     .map(|&(_, ref ident)| quote!(#this::#ident))
++                                     .collect();
++
++    let expecting = if is_variant {
++        "variant identifier"
++    } else {
++        "field identifier"
++    };
++
++    let visit_index = if is_variant {
++        let variant_indices = 0u32..;
++        let fallthrough_msg = format!("variant index 0 <= i < {}", fields.len());
++        let visit_index = quote! {
++            fn visit_u32<__E>(self, __value: u32) -> _serde::export::Result<Self::Value, __E>
++                where __E: _serde::de::Error
++            {
++                match __value {
++                    #(
++                        #variant_indices => _serde::export::Ok(#constructors),
++                    )*
++                    _ => _serde::export::Err(_serde::de::Error::invalid_value(
++                                _serde::de::Unexpected::Unsigned(__value as u64),
++                                &#fallthrough_msg))
++                }
++            }
++        };
++        Some(visit_index)
++    } else {
++        None
++    };
++
++    let bytes_to_str = if fallthrough.is_some() {
++        None
++    } else {
++        let conversion = quote! {
++            let __value = &_serde::export::from_utf8_lossy(__value);
++        };
++        Some(conversion)
++    };
++
++    let fallthrough_arm = if let Some(fallthrough) = fallthrough {
++        fallthrough
++    } else if is_variant {
++        quote! {
++            _serde::export::Err(_serde::de::Error::unknown_variant(__value, VARIANTS))
++        }
++    } else {
++        quote! {
++            _serde::export::Err(_serde::de::Error::unknown_field(__value, FIELDS))
++        }
++    };
++
++    quote_block! {
++        fn expecting(&self, formatter: &mut _serde::export::Formatter) -> _serde::export::fmt::Result {
++            _serde::export::Formatter::write_str(formatter, #expecting)
++        }
++
++        #visit_index
++
++        fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E>
++            where __E: _serde::de::Error
++        {
++            match __value {
++                #(
++                    #field_strs => _serde::export::Ok(#constructors),
++                )*
++                _ => #fallthrough_arm
++            }
++        }
++
++        fn visit_bytes<__E>(self, __value: &[u8]) -> _serde::export::Result<Self::Value, __E>
++            where __E: _serde::de::Error
++        {
++            match __value {
++                #(
++                    #field_bytes => _serde::export::Ok(#constructors),
++                )*
++                _ => {
++                    #bytes_to_str
++                    #fallthrough_arm
++                }
++            }
++        }
++    }
++}
++
++fn deserialize_struct_visitor(
++    struct_path: Tokens,
++    params: &Parameters,
++    fields: &[Field],
++    cattrs: &attr::Container,
++) -> (Fragment, Fragment, Fragment) {
++    let field_names_idents: Vec<_> = fields
++        .iter()
++        .enumerate()
++        .filter(|&(_, field)| !field.attrs.skip_deserializing())
++        .map(|(i, field)| (field.attrs.name().deserialize_name(), field_i(i)),)
++        .collect();
++
++    let fields_stmt = {
++        let field_names = field_names_idents.iter().map(|&(ref name, _)| name);
++        quote_block! {
++            const FIELDS: &'static [&'static str] = &[ #(#field_names),* ];
++        }
++    };
++
++    let field_visitor = deserialize_generated_identifier(field_names_idents, cattrs, false);
++
++    let visit_map = deserialize_map(struct_path, params, fields, cattrs);
++
++    (field_visitor, fields_stmt, visit_map)
++}
++
++fn deserialize_map(
++    struct_path: Tokens,
++    params: &Parameters,
++    fields: &[Field],
++    cattrs: &attr::Container,
++) -> Fragment {
++    // Create the field names for the fields.
++    let fields_names: Vec<_> = fields
++        .iter()
++        .enumerate()
++        .map(|(i, field)| (field, field_i(i)))
++        .collect();
++
++    // Declare each field that will be deserialized.
++    let let_values = fields_names
++        .iter()
++        .filter(|&&(field, _)| !field.attrs.skip_deserializing())
++        .map(
++            |&(field, ref name)| {
++                let field_ty = &field.ty;
++                quote! {
++                    let mut #name: _serde::export::Option<#field_ty> = _serde::export::None;
++                }
++            },
++        );
++
++    // Match arms to extract a value for a field.
++    let value_arms = fields_names.iter()
++        .filter(|&&(field, _)| !field.attrs.skip_deserializing())
++        .map(|&(field, ref name)| {
++            let deser_name = field.attrs.name().deserialize_name();
++
++            let visit = match field.attrs.deserialize_with() {
++                None => {
++                    let field_ty = &field.ty;
++                    quote! {
++                        try!(_serde::de::MapAccess::next_value::<#field_ty>(&mut __map))
++                    }
++                }
++                Some(path) => {
++                    let (wrapper, wrapper_ty) = wrap_deserialize_with(
++                        params, field.ty, path);
++                    quote!({
++                        #wrapper
++                        try!(_serde::de::MapAccess::next_value::<#wrapper_ty>(&mut __map)).value
++                    })
++                }
++            };
++            quote! {
++                __Field::#name => {
++                    if _serde::export::Option::is_some(&#name) {
++                        return _serde::export::Err(<__A::Error as _serde::de::Error>::duplicate_field(#deser_name));
++                    }
++                    #name = _serde::export::Some(#visit);
++                }
++            }
++        });
++
++    // Visit ignored values to consume them
++    let ignored_arm = if cattrs.deny_unknown_fields() {
++        None
++    } else {
++        Some(quote! {
++            _ => { let _ = try!(_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map)); }
++        })
++    };
++
++    let all_skipped = fields
++        .iter()
++        .all(|field| field.attrs.skip_deserializing());
++    let match_keys = if cattrs.deny_unknown_fields() && all_skipped {
++        quote! {
++            // FIXME: Once we drop support for Rust 1.15:
++            // let _serde::export::None::<__Field> = try!(_serde::de::MapAccess::next_key(&mut __map));
++            _serde::export::Option::map(
++                try!(_serde::de::MapAccess::next_key::<__Field>(&mut __map)),
++                |__impossible| match __impossible {});
++        }
++    } else {
++        quote! {
++            while let _serde::export::Some(__key) = try!(_serde::de::MapAccess::next_key::<__Field>(&mut __map)) {
++                match __key {
++                    #(#value_arms)*
++                    #ignored_arm
++                }
++            }
++        }
++    };
++
++    let extract_values = fields_names
++        .iter()
++        .filter(|&&(field, _)| !field.attrs.skip_deserializing())
++        .map(
++            |&(field, ref name)| {
++                let missing_expr = Match(expr_is_missing(&field, cattrs));
++
++                quote! {
++                    let #name = match #name {
++                        _serde::export::Some(#name) => #name,
++                        _serde::export::None => #missing_expr
++                    };
++                }
++            },
++        );
++
++    let result = fields_names
++        .iter()
++        .map(
++            |&(field, ref name)| {
++                let ident = field
++                    .ident
++                    .clone()
++                    .expect("struct contains unnamed fields");
++                if field.attrs.skip_deserializing() {
++                    let value = Expr(expr_is_missing(&field, cattrs));
++                    quote!(#ident: #value)
++                } else {
++                    quote!(#ident: #name)
++                }
++            },
++        );
++
++    let let_default = match *cattrs.default() {
++        attr::Default::Default => {
++            Some(
++                quote!(
++                let __default: Self::Value = _serde::export::Default::default();
++            ),
++            )
++        }
++        attr::Default::Path(ref path) => {
++            Some(
++                quote!(
++                let __default: Self::Value = #path();
++            ),
++            )
++        }
++        attr::Default::None => {
++            // We don't need the default value, to prevent an unused variable warning
++            // we'll leave the line empty.
++            None
++        }
++    };
++
++    let mut result = quote!(#struct_path { #(#result),* });
++    if params.has_getter {
++        let this = &params.this;
++        result = quote! {
++            _serde::export::Into::<#this>::into(#result)
++        };
++    }
++
++    quote_block! {
++        #(#let_values)*
++
++        #match_keys
++
++        #let_default
++
++        #(#extract_values)*
++
++        _serde::export::Ok(#result)
++    }
++}
++
++fn field_i(i: usize) -> Ident {
++    Ident::new(format!("__field{}", i))
++}
++
++/// This function wraps the expression in `#[serde(deserialize_with = "...")]`
++/// in a trait to prevent it from accessing the internal `Deserialize` state.
++fn wrap_deserialize_with(
++    params: &Parameters,
++    field_ty: &syn::Ty,
++    deserialize_with: &syn::Path,
++) -> (Tokens, Tokens) {
++    let this = &params.this;
++    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) = split_with_de_lifetime(params,);
++
++    let wrapper = quote! {
++        struct __DeserializeWith #de_impl_generics #where_clause {
++            value: #field_ty,
++            phantom: _serde::export::PhantomData<#this #ty_generics>,
++            lifetime: _serde::export::PhantomData<&'de ()>,
++        }
++
++        impl #de_impl_generics _serde::Deserialize<'de> for __DeserializeWith #de_ty_generics #where_clause {
++            fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error>
++                where __D: _serde::Deserializer<'de>
++            {
++                _serde::export::Ok(__DeserializeWith {
++                    value: try!(#deserialize_with(__deserializer)),
++                    phantom: _serde::export::PhantomData,
++                    lifetime: _serde::export::PhantomData,
++                })
++            }
++        }
++    };
++
++    let wrapper_ty = quote!(__DeserializeWith #de_ty_generics);
++
++    (wrapper, wrapper_ty)
++}
++
++fn expr_is_missing(field: &Field, cattrs: &attr::Container) -> Fragment {
++    match *field.attrs.default() {
++        attr::Default::Default => {
++            return quote_expr!(_serde::export::Default::default());
++        }
++        attr::Default::Path(ref path) => {
++            return quote_expr!(#path());
++        }
++        attr::Default::None => { /* below */ }
++    }
++
++    match *cattrs.default() {
++        attr::Default::Default |
++        attr::Default::Path(_) => {
++            let ident = &field.ident;
++            return quote_expr!(__default.#ident);
++        }
++        attr::Default::None => { /* below */ }
++    }
++
++    let name = field.attrs.name().deserialize_name();
++    match field.attrs.deserialize_with() {
++        None => {
++            quote_expr! {
++                try!(_serde::private::de::missing_field(#name))
++            }
++        }
++        Some(_) => {
++            quote_expr! {
++                return _serde::export::Err(<__A::Error as _serde::de::Error>::missing_field(#name))
++            }
++        }
++    }
++}
++
++struct DeImplGenerics<'a>(&'a Parameters);
++
++impl<'a> ToTokens for DeImplGenerics<'a> {
++    fn to_tokens(&self, tokens: &mut Tokens) {
++        let mut generics = self.0.generics.clone();
++        generics.lifetimes.insert(0, self.0.de_lifetime_def());
++        let (impl_generics, _, _) = generics.split_for_impl();
++        impl_generics.to_tokens(tokens);
++    }
++}
++
++struct DeTyGenerics<'a>(&'a syn::Generics);
++
++impl<'a> ToTokens for DeTyGenerics<'a> {
++    fn to_tokens(&self, tokens: &mut Tokens) {
++        let mut generics = self.0.clone();
++        generics
++            .lifetimes
++            .insert(0, syn::LifetimeDef::new("'de"));
++        let (_, ty_generics, _) = generics.split_for_impl();
++        ty_generics.to_tokens(tokens);
++    }
++}
++
++fn split_with_de_lifetime(params: &Parameters,)
++    -> (DeImplGenerics, DeTyGenerics, syn::TyGenerics, &syn::WhereClause) {
++    let de_impl_generics = DeImplGenerics(&params);
++    let de_ty_generics = DeTyGenerics(&params.generics);
++    let (_, ty_generics, where_clause) = params.generics.split_for_impl();
++    (de_impl_generics, de_ty_generics, ty_generics, where_clause)
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..58cf0a2cadbb9680c5cc811a033603278a60837b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,75 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use quote::{Tokens, ToTokens};
++
++pub enum Fragment {
++    /// Tokens that can be used as an expression.
++    Expr(Tokens),
++    /// Tokens that can be used inside a block. The surrounding curly braces are
++    /// not part of these tokens.
++    Block(Tokens),
++}
++
++macro_rules! quote_expr {
++    ($($tt:tt)*) => {
++        $crate::fragment::Fragment::Expr(quote!($($tt)*))
++    }
++}
++
++macro_rules! quote_block {
++    ($($tt:tt)*) => {
++        $crate::fragment::Fragment::Block(quote!($($tt)*))
++    }
++}
++
++/// Interpolate a fragment in place of an expression. This involves surrounding
++/// Block fragments in curly braces.
++pub struct Expr(pub Fragment);
++impl ToTokens for Expr {
++    fn to_tokens(&self, out: &mut Tokens) {
++        match self.0 {
++            Fragment::Expr(ref expr) => expr.to_tokens(out),
++            Fragment::Block(ref block) => {
++                out.append("{");
++                block.to_tokens(out);
++                out.append("}");
++            }
++        }
++    }
++}
++
++/// Interpolate a fragment as the statements of a block.
++pub struct Stmts(pub Fragment);
++impl ToTokens for Stmts {
++    fn to_tokens(&self, out: &mut Tokens) {
++        match self.0 {
++            Fragment::Expr(ref expr) => expr.to_tokens(out),
++            Fragment::Block(ref block) => block.to_tokens(out),
++        }
++    }
++}
++
++/// Interpolate a fragment as the value part of a `match` expression. This
++/// involves putting a comma after expressions and curly braces around blocks.
++pub struct Match(pub Fragment);
++impl ToTokens for Match {
++    fn to_tokens(&self, out: &mut Tokens) {
++        match self.0 {
++            Fragment::Expr(ref expr) => {
++                expr.to_tokens(out);
++                out.append(",");
++            }
++            Fragment::Block(ref block) => {
++                out.append("{");
++                block.to_tokens(out);
++                out.append("}");
++            }
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..41b45ac085cfcf28f80dc6016b207838ccb42d2a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,60 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++//! This crate provides Serde's two derive macros.
++//!
++//! ```rust,ignore
++//! #[derive(Serialize, Deserialize)]
++//! ```
++//!
++//! Please refer to [https://serde.rs/derive.html] for how to set this up.
++//!
++//! [https://serde.rs/derive.html]: https://serde.rs/derive.html
++
++#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.11")]
++
++#![cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))]
++#![cfg_attr(feature = "cargo-clippy", allow(used_underscore_binding))]
++
++// The `quote!` macro requires deep recursion.
++#![recursion_limit = "192"]
++
++extern crate syn;
++#[macro_use]
++extern crate quote;
++
++extern crate serde_derive_internals as internals;
++
++extern crate proc_macro;
++use proc_macro::TokenStream;
++
++#[macro_use]
++mod bound;
++#[macro_use]
++mod fragment;
++
++mod ser;
++mod de;
++
++#[proc_macro_derive(Serialize, attributes(serde))]
++pub fn derive_serialize(input: TokenStream) -> TokenStream {
++    let input = syn::parse_derive_input(&input.to_string()).unwrap();
++    match ser::expand_derive_serialize(&input) {
++        Ok(expanded) => expanded.parse().unwrap(),
++        Err(msg) => panic!(msg),
++    }
++}
++
++#[proc_macro_derive(Deserialize, attributes(serde))]
++pub fn derive_deserialize(input: TokenStream) -> TokenStream {
++    let input = syn::parse_derive_input(&input.to_string()).unwrap();
++    match de::expand_derive_deserialize(&input) {
++        Ok(expanded) => expanded.parse().unwrap(),
++        Err(msg) => panic!(msg),
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9be9bddca8f06539682bc79ce6c3a2fb2fb380fa
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,935 @@@
++// Copyright 2017 Serde Developers
++//
++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
++// option. This file may not be copied, modified, or distributed
++// except according to those terms.
++
++use syn::{self, Ident};
++use quote::Tokens;
++
++use bound;
++use fragment::{Fragment, Stmts, Match};
++use internals::ast::{Body, Container, Field, Style, Variant};
++use internals::{attr, Ctxt};
++
++use std::u32;
++
++pub fn expand_derive_serialize(input: &syn::DeriveInput) -> Result<Tokens, String> {
++    let ctxt = Ctxt::new();
++    let cont = Container::from_ast(&ctxt, input);
++    precondition(&ctxt, &cont);
++    try!(ctxt.check());
++
++    let ident = &cont.ident;
++    let params = Parameters::new(&cont);
++    let (impl_generics, ty_generics, where_clause) = params.generics.split_for_impl();
++    let dummy_const = Ident::new(format!("_IMPL_SERIALIZE_FOR_{}", ident));
++    let body = Stmts(serialize_body(&cont, &params));
++
++    let impl_block = if let Some(remote) = cont.attrs.remote() {
++        let vis = &input.vis;
++        quote! {
++            impl #impl_generics #ident #ty_generics #where_clause {
++                #vis fn serialize<__S>(__self: &#remote #ty_generics, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error>
++                    where __S: _serde::Serializer
++                {
++                    #body
++                }
++            }
++        }
++    } else {
++        quote! {
++            #[automatically_derived]
++            impl #impl_generics _serde::Serialize for #ident #ty_generics #where_clause {
++                fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error>
++                    where __S: _serde::Serializer
++                {
++                    #body
++                }
++            }
++        }
++    };
++
++    let generated = quote! {
++        #[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
++        const #dummy_const: () = {
++            extern crate serde as _serde;
++            #impl_block
++        };
++    };
++    Ok(generated)
++}
++
++fn precondition(cx: &Ctxt, cont: &Container) {
++    match cont.attrs.identifier() {
++        attr::Identifier::No => {}
++        attr::Identifier::Field => {
++            cx.error("field identifiers cannot be serialized");
++        }
++        attr::Identifier::Variant => {
++            cx.error("variant identifiers cannot be serialized");
++        }
++    }
++}
++
++struct Parameters {
++    /// Variable holding the value being serialized. Either `self` for local
++    /// types or `__self` for remote types.
++    self_var: Ident,
++
++    /// Path to the type the impl is for. Either a single `Ident` for local
++    /// types or `some::remote::Ident` for remote types. Does not include
++    /// generic parameters.
++    this: syn::Path,
++
++    /// Generics including any explicit and inferred bounds for the impl.
++    generics: syn::Generics,
++
++    /// Type has a `serde(remote = "...")` attribute.
++    is_remote: bool,
++}
++
++impl Parameters {
++    fn new(cont: &Container) -> Self {
++        let is_remote = cont.attrs.remote().is_some();
++        let self_var = if is_remote {
++            Ident::new("__self")
++        } else {
++            Ident::new("self")
++        };
++
++        let this = match cont.attrs.remote() {
++            Some(remote) => remote.clone(),
++            None => cont.ident.clone().into(),
++        };
++
++        let generics = build_generics(cont);
++
++        Parameters {
++            self_var: self_var,
++            this: this,
++            generics: generics,
++            is_remote: is_remote,
++        }
++    }
++
++    /// Type name to use in error messages and `&'static str` arguments to
++    /// various Serializer methods.
++    fn type_name(&self) -> &str {
++        self.this.segments.last().unwrap().ident.as_ref()
++    }
++}
++
++// All the generics in the input, plus a bound `T: Serialize` for each generic
++// field type that will be serialized by us.
++fn build_generics(cont: &Container) -> syn::Generics {
++    let generics = bound::without_defaults(cont.generics);
++
++    let generics =
++        bound::with_where_predicates_from_fields(cont, &generics, attr::Field::ser_bound);
++
++    match cont.attrs.ser_bound() {
++        Some(predicates) => bound::with_where_predicates(&generics, predicates),
++        None => {
++            bound::with_bound(
++                cont,
++                &generics,
++                needs_serialize_bound,
++                &path!(_serde::Serialize),
++            )
++        }
++    }
++}
++
++// Fields with a `skip_serializing` or `serialize_with` attribute are not
++// serialized by us so we do not generate a bound. Fields with a `bound`
++// attribute specify their own bound so we do not generate one. All other fields
++// may need a `T: Serialize` bound where T is the type of the field.
++fn needs_serialize_bound(attrs: &attr::Field) -> bool {
++    !attrs.skip_serializing() && attrs.serialize_with().is_none() && attrs.ser_bound().is_none()
++}
++
++fn serialize_body(cont: &Container, params: &Parameters) -> Fragment {
++    if let Some(into_type) = cont.attrs.into_type() {
++        serialize_into(params, into_type)
++    } else {
++        match cont.body {
++            Body::Enum(ref variants) => serialize_enum(params, variants, &cont.attrs),
++            Body::Struct(Style::Struct, ref fields) => {
++                if fields.iter().any(|field| field.ident.is_none()) {
++                    panic!("struct has unnamed fields");
++                }
++                serialize_struct(params, fields, &cont.attrs)
++            }
++            Body::Struct(Style::Tuple, ref fields) => {
++                if fields.iter().any(|field| field.ident.is_some()) {
++                    panic!("tuple struct has named fields");
++                }
++                serialize_tuple_struct(params, fields, &cont.attrs)
++            }
++            Body::Struct(Style::Newtype, ref fields) => {
++                serialize_newtype_struct(params, &fields[0], &cont.attrs)
++            }
++            Body::Struct(Style::Unit, _) => serialize_unit_struct(&cont.attrs),
++        }
++    }
++}
++
++fn serialize_into(params: &Parameters, into_type: &syn::Ty) -> Fragment {
++    let self_var = &params.self_var;
++    quote_block! {
++        _serde::Serialize::serialize(
++            &_serde::export::Into::<#into_type>::into(_serde::export::Clone::clone(#self_var)),
++            __serializer)
++    }
++}
++
++fn serialize_unit_struct(cattrs: &attr::Container) -> Fragment {
++    let type_name = cattrs.name().serialize_name();
++
++    quote_expr! {
++        _serde::Serializer::serialize_unit_struct(__serializer, #type_name)
++    }
++}
++
++fn serialize_newtype_struct(
++    params: &Parameters,
++    field: &Field,
++    cattrs: &attr::Container,
++) -> Fragment {
++    let type_name = cattrs.name().serialize_name();
++
++    let mut field_expr = get_field(params, field, 0);
++    if let Some(path) = field.attrs.serialize_with() {
++        field_expr = wrap_serialize_with(params, field.ty, path, field_expr);
++    }
++
++    quote_expr! {
++        _serde::Serializer::serialize_newtype_struct(__serializer, #type_name, #field_expr)
++    }
++}
++
++fn serialize_tuple_struct(
++    params: &Parameters,
++    fields: &[Field],
++    cattrs: &attr::Container,
++) -> Fragment {
++    let serialize_stmts = serialize_tuple_struct_visitor(
++        fields,
++        params,
++        false,
++        quote!(_serde::ser::SerializeTupleStruct::serialize_field),
++    );
++
++    let type_name = cattrs.name().serialize_name();
++    let len = serialize_stmts.len();
++    let let_mut = mut_if(len > 0);
++
++    quote_block! {
++        let #let_mut __serde_state = try!(_serde::Serializer::serialize_tuple_struct(__serializer, #type_name, #len));
++        #(#serialize_stmts)*
++        _serde::ser::SerializeTupleStruct::end(__serde_state)
++    }
++}
++
++fn serialize_struct(params: &Parameters, fields: &[Field], cattrs: &attr::Container) -> Fragment {
++    assert!(fields.len() as u64 <= u32::MAX as u64);
++
++    let serialize_fields = serialize_struct_visitor(
++        fields,
++        params,
++        false,
++        quote!(_serde::ser::SerializeStruct::serialize_field),
++    );
++
++    let type_name = cattrs.name().serialize_name();
++
++    let mut serialized_fields = fields
++        .iter()
++        .filter(|&field| !field.attrs.skip_serializing())
++        .peekable();
++
++    let let_mut = mut_if(serialized_fields.peek().is_some());
++
++    let len = serialized_fields
++        .map(
++            |field| match field.attrs.skip_serializing_if() {
++                None => quote!(1),
++                Some(path) => {
++                    let ident = field.ident.clone().expect("struct has unnamed fields");
++                    let field_expr = get_field(params, field, ident);
++                    quote!(if #path(#field_expr) { 0 } else { 1 })
++                }
++            },
++        )
++        .fold(quote!(0), |sum, expr| quote!(#sum + #expr));
++
++    quote_block! {
++        let #let_mut __serde_state = try!(_serde::Serializer::serialize_struct(__serializer, #type_name, #len));
++        #(#serialize_fields)*
++        _serde::ser::SerializeStruct::end(__serde_state)
++    }
++}
++
++fn serialize_enum(params: &Parameters, variants: &[Variant], cattrs: &attr::Container) -> Fragment {
++    assert!(variants.len() as u64 <= u32::MAX as u64);
++
++    let self_var = &params.self_var;
++
++    let arms: Vec<_> = variants
++        .iter()
++        .enumerate()
++        .map(
++            |(variant_index, variant)| {
++                serialize_variant(params, variant, variant_index as u32, cattrs)
++            },
++        )
++        .collect();
++
++    quote_expr! {
++        match *#self_var {
++            #(#arms)*
++        }
++    }
++}
++
++fn serialize_variant(
++    params: &Parameters,
++    variant: &Variant,
++    variant_index: u32,
++    cattrs: &attr::Container,
++) -> Tokens {
++    let this = &params.this;
++    let variant_ident = variant.ident.clone();
++
++    if variant.attrs.skip_serializing() {
++        let skipped_msg = format!(
++            "the enum variant {}::{} cannot be serialized",
++            params.type_name(),
++            variant_ident
++        );
++        let skipped_err = quote! {
++            _serde::export::Err(_serde::ser::Error::custom(#skipped_msg))
++        };
++        let fields_pat = match variant.style {
++            Style::Unit => quote!(),
++            Style::Newtype | Style::Tuple => quote!((..)),
++            Style::Struct => {
++                quote!(
++                    {
++                        ..
++                    }
++                )
++            }
++        };
++        quote! {
++            #this::#variant_ident #fields_pat => #skipped_err,
++        }
++    } else {
++        // variant wasn't skipped
++        let case = match variant.style {
++            Style::Unit => {
++                quote! {
++                    #this::#variant_ident
++                }
++            }
++            Style::Newtype => {
++                quote! {
++                    #this::#variant_ident(ref __field0)
++                }
++            }
++            Style::Tuple => {
++                let field_names =
++                    (0..variant.fields.len()).map(|i| Ident::new(format!("__field{}", i)));
++                quote! {
++                    #this::#variant_ident(#(ref #field_names),*)
++                }
++            }
++            Style::Struct => {
++                let fields = variant
++                    .fields
++                    .iter()
++                    .map(
++                        |f| {
++                            f.ident
++                                .clone()
++                                .expect("struct variant has unnamed fields")
++                        },
++                    );
++                quote! {
++                    #this::#variant_ident { #(ref #fields),* }
++                }
++            }
++        };
++
++        let body = Match(
++            match *cattrs.tag() {
++                attr::EnumTag::External => {
++                    serialize_externally_tagged_variant(params, variant, variant_index, cattrs)
++                }
++                attr::EnumTag::Internal { ref tag } => {
++                    serialize_internally_tagged_variant(params, variant, cattrs, tag)
++                }
++                attr::EnumTag::Adjacent {
++                    ref tag,
++                    ref content,
++                } => serialize_adjacently_tagged_variant(params, variant, cattrs, tag, content),
++                attr::EnumTag::None => serialize_untagged_variant(params, variant, cattrs),
++            },
++        );
++
++        quote! {
++            #case => #body
++        }
++    }
++}
++
++fn serialize_externally_tagged_variant(
++    params: &Parameters,
++    variant: &Variant,
++    variant_index: u32,
++    cattrs: &attr::Container,
++) -> Fragment {
++    let type_name = cattrs.name().serialize_name();
++    let variant_name = variant.attrs.name().serialize_name();
++
++    match variant.style {
++        Style::Unit => {
++            quote_expr! {
++                _serde::Serializer::serialize_unit_variant(
++                    __serializer,
++                    #type_name,
++                    #variant_index,
++                    #variant_name,
++                )
++            }
++        }
++        Style::Newtype => {
++            let field = &variant.fields[0];
++            let mut field_expr = quote!(__field0);
++            if let Some(path) = field.attrs.serialize_with() {
++                field_expr = wrap_serialize_with(params, field.ty, path, field_expr);
++            }
++
++            quote_expr! {
++                _serde::Serializer::serialize_newtype_variant(
++                    __serializer,
++                    #type_name,
++                    #variant_index,
++                    #variant_name,
++                    #field_expr,
++                )
++            }
++        }
++        Style::Tuple => {
++            serialize_tuple_variant(
++                TupleVariant::ExternallyTagged {
++                    type_name: type_name,
++                    variant_index: variant_index,
++                    variant_name: variant_name,
++                },
++                params,
++                &variant.fields,
++            )
++        }
++        Style::Struct => {
++            serialize_struct_variant(
++                StructVariant::ExternallyTagged {
++                    variant_index: variant_index,
++                    variant_name: variant_name,
++                },
++                params,
++                &variant.fields,
++                &type_name,
++            )
++        }
++    }
++}
++
++fn serialize_internally_tagged_variant(
++    params: &Parameters,
++    variant: &Variant,
++    cattrs: &attr::Container,
++    tag: &str,
++) -> Fragment {
++    let type_name = cattrs.name().serialize_name();
++    let variant_name = variant.attrs.name().serialize_name();
++
++    let enum_ident_str = params.type_name();
++    let variant_ident_str = variant.ident.as_ref();
++
++    match variant.style {
++        Style::Unit => {
++            quote_block! {
++                let mut __struct = try!(_serde::Serializer::serialize_struct(
++                    __serializer, #type_name, 1));
++                try!(_serde::ser::SerializeStruct::serialize_field(
++                    &mut __struct, #tag, #variant_name));
++                _serde::ser::SerializeStruct::end(__struct)
++            }
++        }
++        Style::Newtype => {
++            let field = &variant.fields[0];
++            let mut field_expr = quote!(__field0);
++            if let Some(path) = field.attrs.serialize_with() {
++                field_expr = wrap_serialize_with(params, field.ty, path, field_expr);
++            }
++
++            quote_expr! {
++                _serde::private::ser::serialize_tagged_newtype(
++                    __serializer,
++                    #enum_ident_str,
++                    #variant_ident_str,
++                    #tag,
++                    #variant_name,
++                    #field_expr,
++                )
++            }
++        }
++        Style::Struct => {
++            serialize_struct_variant(
++                StructVariant::InternallyTagged {
++                    tag: tag,
++                    variant_name: variant_name,
++                },
++                params,
++                &variant.fields,
++                &type_name,
++            )
++        }
++        Style::Tuple => unreachable!("checked in serde_derive_internals"),
++    }
++}
++
++fn serialize_adjacently_tagged_variant(
++    params: &Parameters,
++    variant: &Variant,
++    cattrs: &attr::Container,
++    tag: &str,
++    content: &str,
++) -> Fragment {
++    let this = &params.this;
++    let type_name = cattrs.name().serialize_name();
++    let variant_name = variant.attrs.name().serialize_name();
++
++    let inner = Stmts(
++        match variant.style {
++            Style::Unit => {
++                return quote_block! {
++                    let mut __struct = try!(_serde::Serializer::serialize_struct(
++                        __serializer, #type_name, 1));
++                    try!(_serde::ser::SerializeStruct::serialize_field(
++                        &mut __struct, #tag, #variant_name));
++                    _serde::ser::SerializeStruct::end(__struct)
++                };
++            }
++            Style::Newtype => {
++                let field = &variant.fields[0];
++                let mut field_expr = quote!(__field0);
++                if let Some(path) = field.attrs.serialize_with() {
++                    field_expr = wrap_serialize_with(params, field.ty, path, field_expr);
++                }
++
++                quote_expr! {
++                    _serde::Serialize::serialize(#field_expr, __serializer)
++                }
++            }
++            Style::Tuple => {
++                serialize_tuple_variant(TupleVariant::Untagged, params, &variant.fields)
++            }
++            Style::Struct => {
++                serialize_struct_variant(
++                    StructVariant::Untagged,
++                    params,
++                    &variant.fields,
++                    &variant_name,
++                )
++            }
++        },
++    );
++
++    let fields_ty = variant.fields.iter().map(|f| &f.ty);
++    let ref fields_ident: Vec<_> = match variant.style {
++        Style::Unit => unreachable!(),
++        Style::Newtype => vec![Ident::new("__field0")],
++        Style::Tuple => {
++            (0..variant.fields.len())
++                .map(|i| Ident::new(format!("__field{}", i)))
++                .collect()
++        }
++        Style::Struct => {
++            variant
++                .fields
++                .iter()
++                .map(
++                    |f| {
++                        f.ident
++                            .clone()
++                            .expect("struct variant has unnamed fields")
++                    },
++                )
++                .collect()
++        }
++    };
++
++    let (_, ty_generics, where_clause) = params.generics.split_for_impl();
++
++    let wrapper_generics = bound::with_lifetime_bound(&params.generics, "'__a");
++    let (wrapper_impl_generics, wrapper_ty_generics, _) = wrapper_generics.split_for_impl();
++
++    quote_block! {
++        struct __AdjacentlyTagged #wrapper_generics #where_clause {
++            data: (#(&'__a #fields_ty,)*),
++            phantom: _serde::export::PhantomData<#this #ty_generics>,
++        }
++
++        impl #wrapper_impl_generics _serde::Serialize for __AdjacentlyTagged #wrapper_ty_generics #where_clause {
++            fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error>
++                where __S: _serde::Serializer
++            {
++                let (#(#fields_ident,)*) = self.data;
++                #inner
++            }
++        }
++
++        let mut __struct = try!(_serde::Serializer::serialize_struct(
++            __serializer, #type_name, 2));
++        try!(_serde::ser::SerializeStruct::serialize_field(
++            &mut __struct, #tag, #variant_name));
++        try!(_serde::ser::SerializeStruct::serialize_field(
++            &mut __struct, #content, &__AdjacentlyTagged {
++                data: (#(#fields_ident,)*),
++                phantom: _serde::export::PhantomData::<#this #ty_generics>,
++            }));
++        _serde::ser::SerializeStruct::end(__struct)
++    }
++}
++
++fn serialize_untagged_variant(
++    params: &Parameters,
++    variant: &Variant,
++    cattrs: &attr::Container,
++) -> Fragment {
++    match variant.style {
++        Style::Unit => {
++            quote_expr! {
++                _serde::Serializer::serialize_unit(__serializer)
++            }
++        }
++        Style::Newtype => {
++            let field = &variant.fields[0];
++            let mut field_expr = quote!(__field0);
++            if let Some(path) = field.attrs.serialize_with() {
++                field_expr = wrap_serialize_with(params, field.ty, path, field_expr);
++            }
++
++            quote_expr! {
++                _serde::Serialize::serialize(#field_expr, __serializer)
++            }
++        }
++        Style::Tuple => serialize_tuple_variant(TupleVariant::Untagged, params, &variant.fields),
++        Style::Struct => {
++            let type_name = cattrs.name().serialize_name();
++            serialize_struct_variant(StructVariant::Untagged, params, &variant.fields, &type_name)
++        }
++    }
++}
++
++enum TupleVariant {
++    ExternallyTagged {
++        type_name: String,
++        variant_index: u32,
++        variant_name: String,
++    },
++    Untagged,
++}
++
++fn serialize_tuple_variant(
++    context: TupleVariant,
++    params: &Parameters,
++    fields: &[Field],
++) -> Fragment {
++    let method = match context {
++        TupleVariant::ExternallyTagged { .. } => {
++            quote!(_serde::ser::SerializeTupleVariant::serialize_field)
++        }
++        TupleVariant::Untagged => quote!(_serde::ser::SerializeTuple::serialize_element),
++    };
++
++    let serialize_stmts = serialize_tuple_struct_visitor(fields, params, true, method);
++
++    let len = serialize_stmts.len();
++    let let_mut = mut_if(len > 0);
++
++    match context {
++        TupleVariant::ExternallyTagged {
++            type_name,
++            variant_index,
++            variant_name,
++        } => {
++            quote_block! {
++                let #let_mut __serde_state = try!(_serde::Serializer::serialize_tuple_variant(
++                    __serializer,
++                    #type_name,
++                    #variant_index,
++                    #variant_name,
++                    #len));
++                #(#serialize_stmts)*
++                _serde::ser::SerializeTupleVariant::end(__serde_state)
++            }
++        }
++        TupleVariant::Untagged => {
++            quote_block! {
++                let #let_mut __serde_state = try!(_serde::Serializer::serialize_tuple(
++                    __serializer,
++                    #len));
++                #(#serialize_stmts)*
++                _serde::ser::SerializeTuple::end(__serde_state)
++            }
++        }
++    }
++}
++
++enum StructVariant<'a> {
++    ExternallyTagged {
++        variant_index: u32,
++        variant_name: String,
++    },
++    InternallyTagged { tag: &'a str, variant_name: String },
++    Untagged,
++}
++
++fn serialize_struct_variant<'a>(
++    context: StructVariant<'a>,
++    params: &Parameters,
++    fields: &[Field],
++    name: &str,
++) -> Fragment {
++    let method = match context {
++        StructVariant::ExternallyTagged { .. } => {
++            quote!(_serde::ser::SerializeStructVariant::serialize_field)
++        }
++        StructVariant::InternallyTagged { .. } |
++        StructVariant::Untagged => quote!(_serde::ser::SerializeStruct::serialize_field),
++    };
++
++    let serialize_fields = serialize_struct_visitor(fields, params, true, method);
++
++    let mut serialized_fields = fields
++        .iter()
++        .filter(|&field| !field.attrs.skip_serializing())
++        .peekable();
++
++    let let_mut = mut_if(serialized_fields.peek().is_some());
++
++    let len = serialized_fields
++        .map(
++            |field| {
++                let ident = field.ident.clone().expect("struct has unnamed fields");
++
++                match field.attrs.skip_serializing_if() {
++                    Some(path) => quote!(if #path(#ident) { 0 } else { 1 }),
++                    None => quote!(1),
++                }
++            },
++        )
++        .fold(quote!(0), |sum, expr| quote!(#sum + #expr));
++
++    match context {
++        StructVariant::ExternallyTagged {
++            variant_index,
++            variant_name,
++        } => {
++            quote_block! {
++                let #let_mut __serde_state = try!(_serde::Serializer::serialize_struct_variant(
++                    __serializer,
++                    #name,
++                    #variant_index,
++                    #variant_name,
++                    #len,
++                ));
++                #(#serialize_fields)*
++                _serde::ser::SerializeStructVariant::end(__serde_state)
++            }
++        }
++        StructVariant::InternallyTagged { tag, variant_name } => {
++            quote_block! {
++                let mut __serde_state = try!(_serde::Serializer::serialize_struct(
++                    __serializer,
++                    #name,
++                    #len + 1,
++                ));
++                try!(_serde::ser::SerializeStruct::serialize_field(
++                    &mut __serde_state,
++                    #tag,
++                    #variant_name,
++                ));
++                #(#serialize_fields)*
++                _serde::ser::SerializeStruct::end(__serde_state)
++            }
++        }
++        StructVariant::Untagged => {
++            quote_block! {
++                let #let_mut __serde_state = try!(_serde::Serializer::serialize_struct(
++                    __serializer,
++                    #name,
++                    #len,
++                ));
++                #(#serialize_fields)*
++                _serde::ser::SerializeStruct::end(__serde_state)
++            }
++        }
++    }
++}
++
++fn serialize_tuple_struct_visitor(
++    fields: &[Field],
++    params: &Parameters,
++    is_enum: bool,
++    func: Tokens,
++) -> Vec<Tokens> {
++    fields
++        .iter()
++        .enumerate()
++        .map(
++            |(i, field)| {
++                let mut field_expr = if is_enum {
++                    let id = Ident::new(format!("__field{}", i));
++                    quote!(#id)
++                } else {
++                    get_field(params, field, i)
++                };
++
++                let skip = field
++                    .attrs
++                    .skip_serializing_if()
++                    .map(|path| quote!(#path(#field_expr)));
++
++                if let Some(path) = field.attrs.serialize_with() {
++                    field_expr = wrap_serialize_with(params, field.ty, path, field_expr);
++                }
++
++                let ser = quote! {
++                    try!(#func(&mut __serde_state, #field_expr));
++                };
++
++                match skip {
++                    None => ser,
++                    Some(skip) => quote!(if !#skip { #ser }),
++                }
++            },
++        )
++        .collect()
++}
++
++fn serialize_struct_visitor(
++    fields: &[Field],
++    params: &Parameters,
++    is_enum: bool,
++    func: Tokens,
++) -> Vec<Tokens> {
++    fields
++        .iter()
++        .filter(|&field| !field.attrs.skip_serializing())
++        .map(
++            |field| {
++                let field_ident = field.ident.clone().expect("struct has unnamed field");
++                let mut field_expr = if is_enum {
++                    quote!(#field_ident)
++                } else {
++                    get_field(params, field, field_ident)
++                };
++
++                let key_expr = field.attrs.name().serialize_name();
++
++                let skip = field
++                    .attrs
++                    .skip_serializing_if()
++                    .map(|path| quote!(#path(#field_expr)));
++
++                if let Some(path) = field.attrs.serialize_with() {
++                    field_expr = wrap_serialize_with(params, field.ty, path, field_expr)
++                }
++
++                let ser = quote! {
++                    try!(#func(&mut __serde_state, #key_expr, #field_expr));
++                };
++
++                match skip {
++                    None => ser,
++                    Some(skip) => quote!(if !#skip { #ser }),
++                }
++            },
++        )
++        .collect()
++}
++
++fn wrap_serialize_with(
++    params: &Parameters,
++    field_ty: &syn::Ty,
++    serialize_with: &syn::Path,
++    value: Tokens,
++) -> Tokens {
++    let this = &params.this;
++    let (_, ty_generics, where_clause) = params.generics.split_for_impl();
++
++    let wrapper_generics = bound::with_lifetime_bound(&params.generics, "'__a");
++    let (wrapper_impl_generics, wrapper_ty_generics, _) = wrapper_generics.split_for_impl();
++
++    quote!({
++        struct __SerializeWith #wrapper_impl_generics #where_clause {
++            value: &'__a #field_ty,
++            phantom: _serde::export::PhantomData<#this #ty_generics>,
++        }
++
++        impl #wrapper_impl_generics _serde::Serialize for __SerializeWith #wrapper_ty_generics #where_clause {
++            fn serialize<__S>(&self, __s: __S) -> _serde::export::Result<__S::Ok, __S::Error>
++                where __S: _serde::Serializer
++            {
++                #serialize_with(self.value, __s)
++            }
++        }
++
++        &__SerializeWith {
++            value: #value,
++            phantom: _serde::export::PhantomData::<#this #ty_generics>,
++        }
++    })
++}
++
++// Serialization of an empty struct results in code like:
++//
++//     let mut __serde_state = try!(serializer.serialize_struct("S", 0));
++//     _serde::ser::SerializeStruct::end(__serde_state)
++//
++// where we want to omit the `mut` to avoid a warning.
++fn mut_if(is_mut: bool) -> Option<Tokens> {
++    if is_mut { Some(quote!(mut)) } else { None }
++}
++
++fn get_field<I>(params: &Parameters, field: &Field, ident: I) -> Tokens
++where
++    I: Into<Ident>,
++{
++    let self_var = &params.self_var;
++    match (params.is_remote, field.attrs.getter()) {
++        (false, None) => {
++            let ident = ident.into();
++            quote!(&#self_var.#ident)
++        }
++        (true, None) => {
++            let ty = field.ty;
++            let ident = ident.into();
++            quote!(_serde::private::ser::constrain::<#ty>(&#self_var.#ident))
++        }
++        (true, Some(getter)) => {
++            let ty = field.ty;
++            quote!(_serde::private::ser::constrain::<#ty>(&#getter(#self_var)))
++        }
++        (false, Some(_)) => {
++            unreachable!("getter is only allowed for remote impls");
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f450190c244122e9d57bba6fb80a468c9cdd644b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"8f84e29784a306d290f4468689f7fa250870f33118fdec09fa818998c6288625"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c9e484b76764a98266f51cdaaca30032ce10368d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,29 @@@
++language: rust
++rust:
++  - 1.15.0
++  - stable
++  - beta
++  - nightly
++sudo: false
++before_script:
++  - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
++script:
++  - cargo test
++  - rustdoc --test README.md -L target
++  - cargo doc --no-deps
++after_success:
++  - travis-cargo --only nightly doc-upload
++  - travis-cargo coveralls --no-sudo
++env:
++  global:
++    secure: "IDm3Oc3bmIL4/6zixovwkuTkbinqWnKdLfeuKTtHqT4ZbVy+rxTDQBgLGfVngymjciHWkJnvQ8/2nT3/KW4MPNY9Sqt3NfWvO7vj9cXypeNeJ4xFrVK49F7CMM4KTCeSMlDKR1C0TVYGgxFIViLtBw/imivl9fk6J489eKv36sA="
++
++notifications:
++  email:
++    on_success: never
++addons:
++  apt:
++    packages:
++      - libcurl4-openssl-dev
++      - libelf-dev
++      - libdw-dev
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d3155f8c290946f450cb9948d14a9ecd5621a572
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,33 @@@
++# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
++#
++# When uploading crates to the registry Cargo will automatically
++# "normalize" Cargo.toml files for maximal compatibility
++# with all versions of Cargo and also rewrite `path` dependencies
++# to registry (e.g. crates.io) dependencies
++#
++# If you believe there's an error in this file please file an
++# issue against the rust-lang/cargo repository. If you're
++# editing this file be aware that the upstream Cargo.toml
++# will likely look very different (and much more reasonable)
++
++[package]
++name = "toml"
++version = "0.4.3"
++authors = ["Alex Crichton <alex@alexcrichton.com>"]
++description = "A native Rust encoder and decoder of TOML-formatted files and streams. Provides\nimplementations of the standard Serialize/Deserialize traits for TOML data to\nfacilitate deserializing and serializing Rust structures.\n"
++homepage = "https://github.com/alexcrichton/toml-rs"
++documentation = "https://docs.rs/toml"
++readme = "README.md"
++keywords = ["encoding"]
++categories = ["config", "encoding", "parser-implementations"]
++license = "MIT/Apache-2.0"
++repository = "https://github.com/alexcrichton/toml-rs"
++[dependencies.serde]
++version = "1.0"
++[dev-dependencies.serde_json]
++version = "1.0"
++
++[dev-dependencies.serde_derive]
++version = "1.0"
++[badges.travis-ci]
++repository = "alexcrichton/toml-rs"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16fe87b06e802f094b3fbb0894b137bca2b16ef1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,201 @@@
++                              Apache License
++                        Version 2.0, January 2004
++                     http://www.apache.org/licenses/
++
++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++1. Definitions.
++
++   "License" shall mean the terms and conditions for use, reproduction,
++   and distribution as defined by Sections 1 through 9 of this document.
++
++   "Licensor" shall mean the copyright owner or entity authorized by
++   the copyright owner that is granting the License.
++
++   "Legal Entity" shall mean the union of the acting entity and all
++   other entities that control, are controlled by, or are under common
++   control with that entity. For the purposes of this definition,
++   "control" means (i) the power, direct or indirect, to cause the
++   direction or management of such entity, whether by contract or
++   otherwise, or (ii) ownership of fifty percent (50%) or more of the
++   outstanding shares, or (iii) beneficial ownership of such entity.
++
++   "You" (or "Your") shall mean an individual or Legal Entity
++   exercising permissions granted by this License.
++
++   "Source" form shall mean the preferred form for making modifications,
++   including but not limited to software source code, documentation
++   source, and configuration files.
++
++   "Object" form shall mean any form resulting from mechanical
++   transformation or translation of a Source form, including but
++   not limited to compiled object code, generated documentation,
++   and conversions to other media types.
++
++   "Work" shall mean the work of authorship, whether in Source or
++   Object form, made available under the License, as indicated by a
++   copyright notice that is included in or attached to the work
++   (an example is provided in the Appendix below).
++
++   "Derivative Works" shall mean any work, whether in Source or Object
++   form, that is based on (or derived from) the Work and for which the
++   editorial revisions, annotations, elaborations, or other modifications
++   represent, as a whole, an original work of authorship. For the purposes
++   of this License, Derivative Works shall not include works that remain
++   separable from, or merely link (or bind by name) to the interfaces of,
++   the Work and Derivative Works thereof.
++
++   "Contribution" shall mean any work of authorship, including
++   the original version of the Work and any modifications or additions
++   to that Work or Derivative Works thereof, that is intentionally
++   submitted to Licensor for inclusion in the Work by the copyright owner
++   or by an individual or Legal Entity authorized to submit on behalf of
++   the copyright owner. For the purposes of this definition, "submitted"
++   means any form of electronic, verbal, or written communication sent
++   to the Licensor or its representatives, including but not limited to
++   communication on electronic mailing lists, source code control systems,
++   and issue tracking systems that are managed by, or on behalf of, the
++   Licensor for the purpose of discussing and improving the Work, but
++   excluding communication that is conspicuously marked or otherwise
++   designated in writing by the copyright owner as "Not a Contribution."
++
++   "Contributor" shall mean Licensor and any individual or Legal Entity
++   on behalf of whom a Contribution has been received by Licensor and
++   subsequently incorporated within the Work.
++
++2. Grant of Copyright License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   copyright license to reproduce, prepare Derivative Works of,
++   publicly display, publicly perform, sublicense, and distribute the
++   Work and such Derivative Works in Source or Object form.
++
++3. Grant of Patent License. Subject to the terms and conditions of
++   this License, each Contributor hereby grants to You a perpetual,
++   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++   (except as stated in this section) patent license to make, have made,
++   use, offer to sell, sell, import, and otherwise transfer the Work,
++   where such license applies only to those patent claims licensable
++   by such Contributor that are necessarily infringed by their
++   Contribution(s) alone or by combination of their Contribution(s)
++   with the Work to which such Contribution(s) was submitted. If You
++   institute patent litigation against any entity (including a
++   cross-claim or counterclaim in a lawsuit) alleging that the Work
++   or a Contribution incorporated within the Work constitutes direct
++   or contributory patent infringement, then any patent licenses
++   granted to You under this License for that Work shall terminate
++   as of the date such litigation is filed.
++
++4. Redistribution. You may reproduce and distribute copies of the
++   Work or Derivative Works thereof in any medium, with or without
++   modifications, and in Source or Object form, provided that You
++   meet the following conditions:
++
++   (a) You must give any other recipients of the Work or
++       Derivative Works a copy of this License; and
++
++   (b) You must cause any modified files to carry prominent notices
++       stating that You changed the files; and
++
++   (c) You must retain, in the Source form of any Derivative Works
++       that You distribute, all copyright, patent, trademark, and
++       attribution notices from the Source form of the Work,
++       excluding those notices that do not pertain to any part of
++       the Derivative Works; and
++
++   (d) If the Work includes a "NOTICE" text file as part of its
++       distribution, then any Derivative Works that You distribute must
++       include a readable copy of the attribution notices contained
++       within such NOTICE file, excluding those notices that do not
++       pertain to any part of the Derivative Works, in at least one
++       of the following places: within a NOTICE text file distributed
++       as part of the Derivative Works; within the Source form or
++       documentation, if provided along with the Derivative Works; or,
++       within a display generated by the Derivative Works, if and
++       wherever such third-party notices normally appear. The contents
++       of the NOTICE file are for informational purposes only and
++       do not modify the License. You may add Your own attribution
++       notices within Derivative Works that You distribute, alongside
++       or as an addendum to the NOTICE text from the Work, provided
++       that such additional attribution notices cannot be construed
++       as modifying the License.
++
++   You may add Your own copyright statement to Your modifications and
++   may provide additional or different license terms and conditions
++   for use, reproduction, or distribution of Your modifications, or
++   for any such Derivative Works as a whole, provided Your use,
++   reproduction, and distribution of the Work otherwise complies with
++   the conditions stated in this License.
++
++5. Submission of Contributions. Unless You explicitly state otherwise,
++   any Contribution intentionally submitted for inclusion in the Work
++   by You to the Licensor shall be under the terms and conditions of
++   this License, without any additional terms or conditions.
++   Notwithstanding the above, nothing herein shall supersede or modify
++   the terms of any separate license agreement you may have executed
++   with Licensor regarding such Contributions.
++
++6. Trademarks. This License does not grant permission to use the trade
++   names, trademarks, service marks, or product names of the Licensor,
++   except as required for reasonable and customary use in describing the
++   origin of the Work and reproducing the content of the NOTICE file.
++
++7. Disclaimer of Warranty. Unless required by applicable law or
++   agreed to in writing, Licensor provides the Work (and each
++   Contributor provides its Contributions) on an "AS IS" BASIS,
++   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++   implied, including, without limitation, any warranties or conditions
++   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++   PARTICULAR PURPOSE. You are solely responsible for determining the
++   appropriateness of using or redistributing the Work and assume any
++   risks associated with Your exercise of permissions under this License.
++
++8. Limitation of Liability. In no event and under no legal theory,
++   whether in tort (including negligence), contract, or otherwise,
++   unless required by applicable law (such as deliberate and grossly
++   negligent acts) or agreed to in writing, shall any Contributor be
++   liable to You for damages, including any direct, indirect, special,
++   incidental, or consequential damages of any character arising as a
++   result of this License or out of the use or inability to use the
++   Work (including but not limited to damages for loss of goodwill,
++   work stoppage, computer failure or malfunction, or any and all
++   other commercial damages or losses), even if such Contributor
++   has been advised of the possibility of such damages.
++
++9. Accepting Warranty or Additional Liability. While redistributing
++   the Work or Derivative Works thereof, You may choose to offer,
++   and charge a fee for, acceptance of support, warranty, indemnity,
++   or other liability obligations and/or rights consistent with this
++   License. However, in accepting such obligations, You may act only
++   on Your own behalf and on Your sole responsibility, not on behalf
++   of any other Contributor, and only if You agree to indemnify,
++   defend, and hold each Contributor harmless for any liability
++   incurred by, or claims asserted against, such Contributor by reason
++   of your accepting any such warranty or additional liability.
++
++END OF TERMS AND CONDITIONS
++
++APPENDIX: How to apply the Apache License to your work.
++
++   To apply the Apache License to your work, attach the following
++   boilerplate notice, with the fields enclosed by brackets "[]"
++   replaced with your own identifying information. (Don't include
++   the brackets!)  The text should be enclosed in the appropriate
++   comment syntax for the file format. We also recommend that a
++   file or class name and description of purpose be included on the
++   same "printed page" as the copyright notice for easier
++   identification within third-party archives.
++
++Copyright [yyyy] [name of copyright owner]
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++      http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39e0ed6602151f235148e6c08413aa7eda5b9038
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++Copyright (c) 2014 Alex Crichton
++
++Permission is hereby granted, free of charge, to any
++person obtaining a copy of this software and associated
++documentation files (the "Software"), to deal in the
++Software without restriction, including without
++limitation the rights to use, copy, modify, merge,
++publish, distribute, sublicense, and/or sell copies of
++the Software, and to permit persons to whom the Software
++is furnished to do so, subject to the following
++conditions:
++
++The above copyright notice and this permission notice
++shall be included in all copies or substantial portions
++of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
++ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
++TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
++PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
++SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
++IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++DEALINGS IN THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47bb8bb5acb208ef54e42a0bff3eaaecaf183150
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,31 @@@
++# toml-rs
++
++[![Build Status](https://travis-ci.org/alexcrichton/toml-rs.svg?branch=master)](https://travis-ci.org/alexcrichton/toml-rs)
++[![Coverage Status](https://coveralls.io/repos/alexcrichton/toml-rs/badge.svg?branch=master&service=github)](https://coveralls.io/github/alexcrichton/toml-rs?branch=master)
++[![Latest Version](https://img.shields.io/crates/v/toml.svg)](https://crates.io/crates/toml)
++[![Documentation](https://docs.rs/toml/badge.svg)](https://docs.rs/toml)
++
++A [TOML][toml] decoder and encoder for Rust. This library is currently compliant
++with the v0.4.0 version of TOML. This library will also likely continue to stay
++up to date with the TOML specification as changes happen.
++
++[toml]: https://github.com/toml-lang/toml
++
++```toml
++# Cargo.toml
++[dependencies]
++toml = "0.4"
++```
++
++This crate also supports serialization/deserialization through the
++[serde](https://serde.rs) crate on crates.io. Currently the older `rustc-serialize`
++crate is not supported in the 0.3+ series of the `toml` crate, but 0.2 can be
++used for that support.
++
++# License
++
++`toml-rs` is primarily distributed under the terms of both the MIT license and
++the Apache License (Version 2.0), with portions covered by various BSD-like
++licenses.
++
++See LICENSE-APACHE, and LICENSE-MIT for details.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e15da79a684c983c6a5586c414393ea87537c10d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,56 @@@
++//! An example showing off the usage of `Deserialize` to automatically decode
++//! TOML into a Rust `struct`
++
++#![deny(warnings)]
++
++extern crate toml;
++extern crate serde;
++#[macro_use]
++extern crate serde_derive;
++
++/// This is what we're going to decode into. Each field is optional, meaning
++/// that it doesn't have to be present in TOML.
++#[derive(Debug, Deserialize)]
++struct Config {
++    global_string: Option<String>,
++    global_integer: Option<u64>,
++    server: Option<ServerConfig>,
++    peers: Option<Vec<PeerConfig>>,
++}
++
++/// Sub-structs are decoded from tables, so this will decode from the `[server]`
++/// table.
++///
++/// Again, each field is optional, meaning they don't have to be present.
++#[derive(Debug, Deserialize)]
++struct ServerConfig {
++    ip: Option<String>,
++    port: Option<u64>,
++}
++
++#[derive(Debug, Deserialize)]
++struct PeerConfig {
++    ip: Option<String>,
++    port: Option<u64>,
++}
++
++fn main() {
++    let toml_str = r#"
++        global_string = "test"
++        global_integer = 5
++
++        [server]
++        ip = "127.0.0.1"
++        port = 80
++
++        [[peers]]
++        ip = "127.0.0.1"
++        port = 8080
++
++        [[peers]]
++        ip = "127.0.0.1"
++    "#;
++
++    let decoded: Config = toml::from_str(toml_str).unwrap();
++    println!("{:#?}", decoded);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1ed441a93acb6759ee43d8af8f60aa4785c62845
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,51 @@@
++#![deny(warnings)]
++
++extern crate toml;
++extern crate serde_json;
++
++use std::fs::File;
++use std::env;
++use std::io;
++use std::io::prelude::*;
++
++use toml::Value as Toml;
++use serde_json::Value as Json;
++
++fn main() {
++    let mut args = env::args();
++    let mut input = String::new();
++    if args.len() > 1 {
++        let name = args.nth(1).unwrap();
++        File::open(&name).and_then(|mut f| {
++            f.read_to_string(&mut input)
++        }).unwrap();
++    } else {
++        io::stdin().read_to_string(&mut input).unwrap();
++    }
++
++    match input.parse() {
++        Ok(toml) => {
++            let json = convert(toml);
++            println!("{}", serde_json::to_string_pretty(&json).unwrap());
++        }
++        Err(error) => println!("failed to parse TOML: {}", error),
++    }
++}
++
++fn convert(toml: Toml) -> Json {
++    match toml {
++        Toml::String(s) => Json::String(s),
++        Toml::Integer(i) => Json::Number(i.into()),
++        Toml::Float(f) => {
++            let n = serde_json::Number::from_f64(f)
++                        .expect("float infinite and nan not allowed");
++            Json::Number(n)
++        }
++        Toml::Boolean(b) => Json::Bool(b),
++        Toml::Array(arr) => Json::Array(arr.into_iter().map(convert).collect()),
++        Toml::Table(table) => Json::Object(table.into_iter().map(|(k, v)| {
++            (k, convert(v))
++        }).collect()),
++        Toml::Datetime(dt) => Json::String(dt.to_string()),
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..83b5c0bb9cef6b226735b5a0769dc1e654336d20
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,425 @@@
++use std::fmt;
++use std::str::{self, FromStr};
++use std::error;
++
++use serde::{de, ser};
++
++/// A parsed TOML datetime value
++///
++/// This structure is intended to represent the datetime primitive type that can
++/// be encoded into TOML documents. This type is a parsed version that contains
++/// all metadata internally.
++///
++/// Currently this type is intentionally conservative and only supports
++/// `to_string` as an accessor. Over time though it's intended that it'll grow
++/// more support!
++///
++/// Note that if you're using `Deserialize` to deserialize a TOML document, you
++/// can use this as a placeholder for where you're expecting a datetime to be
++/// specified.
++///
++/// Also note though that while this type implements `Serialize` and
++/// `Deserialize` it's only recommended to use this type with the TOML format,
++/// otherwise encoded in other formats it may look a little odd.
++#[derive(PartialEq, Clone)]
++pub struct Datetime {
++    date: Option<Date>,
++    time: Option<Time>,
++    offset: Option<Offset>,
++}
++
++/// Error returned from parsing a `Datetime` in the `FromStr` implementation.
++#[derive(Debug, Clone)]
++pub struct DatetimeParseError {
++    _private: (),
++}
++
++// Currently serde itself doesn't have a datetime type, so we map our `Datetime`
++// to a special valid in the serde data model. Namely one with thiese special
++// fields/struct names.
++//
++// In general the TOML encoder/decoder will catch this and not literally emit
++// these strings but rather emit datetimes as they're intended.
++pub const SERDE_STRUCT_FIELD_NAME: &'static str = "$__toml_private_datetime";
++pub const SERDE_STRUCT_NAME: &'static str = "$__toml_private_Datetime";
++
++#[derive(PartialEq, Clone)]
++struct Date {
++    year: u16,
++    month: u8,
++    day: u8,
++}
++
++#[derive(PartialEq, Clone)]
++struct Time {
++    hour: u8,
++    minute: u8,
++    second: u8,
++    nanosecond: u32,
++}
++
++#[derive(PartialEq, Clone)]
++enum Offset {
++    Z,
++    Custom { hours: i8, minutes: u8 },
++}
++
++impl fmt::Debug for Datetime {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        fmt::Display::fmt(self, f)
++    }
++}
++
++impl fmt::Display for Datetime {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        if let Some(ref date) = self.date {
++            write!(f, "{}", date)?;
++        }
++        if let Some(ref time) = self.time {
++            if self.date.is_some() {
++                write!(f, "T")?;
++            }
++            write!(f, "{}", time)?;
++        }
++        if let Some(ref offset) = self.offset {
++            write!(f, "{}", offset)?;
++        }
++        Ok(())
++    }
++}
++
++impl fmt::Display for Date {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write!(f, "{:04}-{:02}-{:02}", self.year, self.month, self.day)
++    }
++}
++
++impl fmt::Display for Time {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write!(f, "{:02}:{:02}:{:02}", self.hour, self.minute, self.second)?;
++        if self.nanosecond != 0 {
++            let s = format!("{:09}", self.nanosecond);
++            write!(f, ".{}", s.trim_right_matches('0'))?;
++        }
++        Ok(())
++    }
++}
++
++impl fmt::Display for Offset {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        match *self {
++            Offset::Z => write!(f, "Z"),
++            Offset::Custom { hours, minutes } => {
++                write!(f, "{:+03}:{:02}", hours, minutes)
++            }
++        }
++    }
++}
++
++impl FromStr for Datetime {
++    type Err = DatetimeParseError;
++
++    fn from_str(date: &str) -> Result<Datetime, DatetimeParseError> {
++        // Accepted formats:
++        //
++        // 0000-00-00T00:00:00.00Z
++        // 0000-00-00T00:00:00.00
++        // 0000-00-00
++        // 00:00:00.00
++        if date.len() < 3 {
++            return Err(DatetimeParseError { _private: () })
++        }
++        let mut offset_allowed = true;
++        let mut chars = date.chars();
++
++        // First up, parse the full date if we can
++        let full_date = if chars.clone().nth(2) == Some(':') {
++            offset_allowed = false;
++            None
++        } else {
++            let y1 = digit(&mut chars)? as u16;
++            let y2 = digit(&mut chars)? as u16;
++            let y3 = digit(&mut chars)? as u16;
++            let y4 = digit(&mut chars)? as u16;
++
++            match chars.next() {
++                Some('-') => {}
++                _ => return Err(DatetimeParseError { _private: () }),
++            }
++
++            let m1 = digit(&mut chars)?;
++            let m2 = digit(&mut chars)?;
++
++            match chars.next() {
++                Some('-') => {}
++                _ => return Err(DatetimeParseError { _private: () }),
++            }
++
++            let d1 = digit(&mut chars)?;
++            let d2 = digit(&mut chars)?;
++
++            let date = Date {
++                year: y1 * 1000 + y2 * 100 + y3 * 10 + y4,
++                month: m1 * 10 + m2,
++                day: d1 * 10 + d2,
++            };
++
++            if date.month < 1 || date.month > 12 {
++                return Err(DatetimeParseError { _private: () })
++            }
++            if date.day < 1 || date.day > 31 {
++                return Err(DatetimeParseError { _private: () })
++            }
++
++            Some(date)
++        };
++
++        // Next parse the "partial-time" if available
++        let partial_time = if full_date.is_some() &&
++                              chars.clone().next() == Some('T') {
++            chars.next();
++            true
++        } else {
++            full_date.is_none()
++        };
++
++        let time = if partial_time {
++            let h1 = digit(&mut chars)?;
++            let h2 = digit(&mut chars)?;
++            match chars.next() {
++                Some(':') => {}
++                _ => return Err(DatetimeParseError { _private: () }),
++            }
++            let m1 = digit(&mut chars)?;
++            let m2 = digit(&mut chars)?;
++            match chars.next() {
++                Some(':') => {}
++                _ => return Err(DatetimeParseError { _private: () }),
++            }
++            let s1 = digit(&mut chars)?;
++            let s2 = digit(&mut chars)?;
++
++            let mut nanosecond = 0;
++            if chars.clone().next() == Some('.') {
++                chars.next();
++                let whole = chars.as_str();
++
++                let mut end = whole.len();
++                for (i, byte) in whole.bytes().enumerate() {
++                    match byte {
++                        b'0' ... b'9' => {
++                            if i < 9 {
++                                let p = 10_u32.pow(8 - i as u32);
++                                nanosecond += p * (byte - b'0') as u32;
++                            }
++                        }
++                        _ => {
++                            end = i;
++                            break;
++                        }
++                    }
++                }
++                if end == 0 {
++                    return Err(DatetimeParseError { _private: () })
++                }
++                chars = whole[end..].chars();
++            }
++
++            let time = Time {
++                hour: h1 * 10 + h2,
++                minute: m1 * 10 + m2,
++                second: s1 * 10 + s2,
++                nanosecond: nanosecond,
++            };
++
++            if time.hour > 24 {
++                return Err(DatetimeParseError { _private: () })
++            }
++            if time.minute > 59 {
++                return Err(DatetimeParseError { _private: () })
++            }
++            if time.second > 59 {
++                return Err(DatetimeParseError { _private: () })
++            }
++            if time.nanosecond > 999_999_999 {
++                return Err(DatetimeParseError { _private: () })
++            }
++
++            Some(time)
++        } else {
++            offset_allowed = false;
++            None
++        };
++
++        // And finally, parse the offset
++        let offset = if offset_allowed {
++            let next = chars.clone().next();
++            if next == Some('Z') {
++                chars.next();
++                Some(Offset::Z)
++            } else if next.is_none() {
++                None
++            } else {
++                let sign = match next {
++                    Some('+') => 1,
++                    Some('-') => -1,
++                    _ => return Err(DatetimeParseError { _private: () }),
++                };
++                chars.next();
++                let h1 = digit(&mut chars)? as i8;
++                let h2 = digit(&mut chars)? as i8;
++                match chars.next() {
++                    Some(':') => {}
++                    _ => return Err(DatetimeParseError { _private: () }),
++                }
++                let m1 = digit(&mut chars)?;
++                let m2 = digit(&mut chars)?;
++
++                Some(Offset::Custom {
++                    hours: sign * (h1 * 10 + h2),
++                    minutes: m1 * 10 + m2,
++                })
++            }
++        } else {
++            None
++        };
++
++        // Return an error if we didn't hit eof, otherwise return our parsed
++        // date
++        if chars.next().is_some() {
++            return Err(DatetimeParseError { _private: () })
++        }
++
++        Ok(Datetime {
++            date: full_date,
++            time: time,
++            offset: offset,
++        })
++    }
++}
++
++fn digit(chars: &mut str::Chars) -> Result<u8, DatetimeParseError> {
++    match chars.next() {
++        Some(c) if '0' <= c && c <= '9' => Ok(c as u8 - b'0'),
++        _ => Err(DatetimeParseError { _private: () }),
++    }
++}
++
++impl ser::Serialize for Datetime {
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++        where S: ser::Serializer
++    {
++        use serde::ser::SerializeStruct;
++
++        let mut s = serializer.serialize_struct(SERDE_STRUCT_NAME, 1)?;
++        s.serialize_field(SERDE_STRUCT_FIELD_NAME, &self.to_string())?;
++        s.end()
++    }
++}
++
++impl<'de> de::Deserialize<'de> for Datetime {
++    fn deserialize<D>(deserializer: D) -> Result<Datetime, D::Error>
++        where D: de::Deserializer<'de>
++    {
++        struct DatetimeVisitor;
++
++        impl<'de> de::Visitor<'de> for DatetimeVisitor {
++            type Value = Datetime;
++
++            fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                formatter.write_str("a TOML datetime")
++            }
++
++            fn visit_map<V>(self, mut visitor: V) -> Result<Datetime, V::Error>
++                where V: de::MapAccess<'de>
++            {
++                let value = visitor.next_key::<DatetimeKey>()?;
++                if value.is_none() {
++                    return Err(de::Error::custom("datetime key not found"))
++                }
++                let v: DatetimeFromString = visitor.next_value()?;
++                Ok(v.value)
++
++            }
++        }
++
++        static FIELDS: [&'static str; 1] = [SERDE_STRUCT_FIELD_NAME];
++        deserializer.deserialize_struct(SERDE_STRUCT_NAME,
++                                        &FIELDS,
++                                        DatetimeVisitor)
++    }
++}
++
++struct DatetimeKey;
++
++impl<'de> de::Deserialize<'de> for DatetimeKey {
++    fn deserialize<D>(deserializer: D) -> Result<DatetimeKey, D::Error>
++        where D: de::Deserializer<'de>
++    {
++        struct FieldVisitor;
++
++        impl<'de> de::Visitor<'de> for FieldVisitor {
++            type Value = ();
++
++            fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                formatter.write_str("a valid datetime field")
++            }
++
++            fn visit_str<E>(self, s: &str) -> Result<(), E>
++                where E: de::Error
++            {
++                if s == SERDE_STRUCT_FIELD_NAME {
++                    Ok(())
++                } else {
++                    Err(de::Error::custom("expected field with custom name"))
++                }
++            }
++        }
++
++        deserializer.deserialize_identifier(FieldVisitor)?;
++        Ok(DatetimeKey)
++    }
++}
++
++pub struct DatetimeFromString {
++    pub value: Datetime,
++}
++
++impl<'de> de::Deserialize<'de> for DatetimeFromString {
++    fn deserialize<D>(deserializer: D) -> Result<DatetimeFromString, D::Error>
++        where D: de::Deserializer<'de>
++    {
++        struct Visitor;
++
++        impl<'de> de::Visitor<'de> for Visitor {
++            type Value = DatetimeFromString;
++
++            fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                formatter.write_str("string containing a datetime")
++            }
++
++            fn visit_str<E>(self, s: &str) -> Result<DatetimeFromString, E>
++                where E: de::Error,
++            {
++                match s.parse() {
++                    Ok(date) => Ok(DatetimeFromString { value: date }),
++                    Err(e) => Err(de::Error::custom(e)),
++                }
++            }
++        }
++
++        deserializer.deserialize_str(Visitor)
++    }
++}
++
++impl fmt::Display for DatetimeParseError {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        "failed to parse datetime".fmt(f)
++    }
++}
++
++impl error::Error for DatetimeParseError {
++    fn description(&self) -> &str {
++        "failed to parse datetime"
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9ff09f7b51fac6b7ae65030688a48a4d78206b2f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1327 @@@
++//! Deserializing TOML into Rust structures.
++//!
++//! This module contains all the Serde support for deserializing TOML documents
++//! into Rust structures. Note that some top-level functions here are also
++//! provided at the top of the crate.
++
++use std::borrow::Cow;
++use std::error;
++use std::fmt;
++use std::str;
++use std::vec;
++
++use serde::de;
++use serde::de::IntoDeserializer;
++
++use tokens::{Tokenizer, Token, Error as TokenError};
++use datetime::{SERDE_STRUCT_FIELD_NAME, SERDE_STRUCT_NAME};
++
++/// Deserializes a byte slice into a type.
++///
++/// This function will attempt to interpret `bytes` as UTF-8 data and then
++/// deserialize `T` from the TOML document provided.
++pub fn from_slice<'de, T>(bytes: &'de [u8]) -> Result<T, Error>
++    where T: de::Deserialize<'de>,
++{
++    match str::from_utf8(bytes) {
++        Ok(s) => from_str(s),
++        Err(e) => Err(Error::custom(e.to_string())),
++    }
++}
++
++/// Deserializes a string into a type.
++///
++/// This function will attempt to interpret `s` as a TOML document and
++/// deserialize `T` from the document.
++///
++/// # Examples
++///
++/// ```
++/// #[macro_use]
++/// extern crate serde_derive;
++/// extern crate toml;
++///
++/// #[derive(Deserialize)]
++/// struct Config {
++///     title: String,
++///     owner: Owner,
++/// }
++///
++/// #[derive(Deserialize)]
++/// struct Owner {
++///     name: String,
++/// }
++///
++/// fn main() {
++///     let config: Config = toml::from_str(r#"
++///         title = 'TOML Example'
++///
++///         [owner]
++///         name = 'Lisa'
++///     "#).unwrap();
++///
++///     assert_eq!(config.title, "TOML Example");
++///     assert_eq!(config.owner.name, "Lisa");
++/// }
++/// ```
++pub fn from_str<'de, T>(s: &'de str) -> Result<T, Error>
++    where T: de::Deserialize<'de>,
++{
++    let mut d = Deserializer::new(s);
++    let ret = T::deserialize(&mut d)?;
++    d.end()?;
++    Ok(ret)
++}
++
++/// Errors that can occur when deserializing a type.
++#[derive(Debug, Clone)]
++pub struct Error {
++    inner: Box<ErrorInner>,
++}
++
++#[derive(Debug, Clone)]
++struct ErrorInner {
++    kind: ErrorKind,
++    line: Option<usize>,
++    col: usize,
++    message: String,
++    key: Vec<String>,
++}
++
++/// Errors that can occur when deserializing a type.
++#[derive(Debug, Clone)]
++enum ErrorKind {
++    /// EOF was reached when looking for a value
++    UnexpectedEof,
++
++    /// An invalid character not allowed in a string was found
++    InvalidCharInString(char),
++
++    /// An invalid character was found as an escape
++    InvalidEscape(char),
++
++    /// An invalid character was found in a hex escape
++    InvalidHexEscape(char),
++
++    /// An invalid escape value was specified in a hex escape in a string.
++    ///
++    /// Valid values are in the plane of unicode codepoints.
++    InvalidEscapeValue(u32),
++
++    /// A newline in a string was encountered when one was not allowed.
++    NewlineInString,
++
++    /// An unexpected character was encountered, typically when looking for a
++    /// value.
++    Unexpected(char),
++
++    /// An unterminated string was found where EOF was found before the ending
++    /// EOF mark.
++    UnterminatedString,
++
++    /// A newline was found in a table key.
++    NewlineInTableKey,
++
++    /// A number failed to parse
++    NumberInvalid,
++
++    /// A date or datetime was invalid
++    DateInvalid,
++
++    /// Wanted one sort of token, but found another.
++    Wanted {
++        /// Expected token type
++        expected: &'static str,
++        /// Actually found token type
++        found: &'static str,
++    },
++
++    /// An array was decoded but the types inside of it were mixed, which is
++    /// disallowed by TOML.
++    MixedArrayType,
++
++    /// A duplicate table definition was found.
++    DuplicateTable(String),
++
++    /// A previously defined table was redefined as an array.
++    RedefineAsArray,
++
++    /// An empty table key was found.
++    EmptyTableKey,
++
++    /// A custom error which could be generated when deserializing a particular
++    /// type.
++    Custom,
++
++    /// A struct was expected but something else was found
++    ExpectedString,
++
++    #[doc(hidden)]
++    __Nonexhaustive,
++}
++
++/// Deserialization implementation for TOML.
++pub struct Deserializer<'a> {
++    require_newline_after_table: bool,
++    input: &'a str,
++    tokens: Tokenizer<'a>,
++}
++
++impl<'de, 'b> de::Deserializer<'de> for &'b mut Deserializer<'de> {
++    type Error = Error;
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error>
++        where V: de::Visitor<'de>,
++    {
++        let mut tables = Vec::new();
++        let mut cur_table = Table {
++            at: 0,
++            header: Vec::new(),
++            values: None,
++            array: false,
++        };
++
++        while let Some(line) = self.line()? {
++            match line {
++                Line::Table { at, mut header, array } => {
++                    if !cur_table.header.is_empty() || cur_table.values.is_some() {
++                        tables.push(cur_table);
++                    }
++                    cur_table = Table {
++                        at: at,
++                        header: Vec::new(),
++                        values: Some(Vec::new()),
++                        array: array,
++                    };
++                    loop {
++                        let part = header.next().map_err(|e| {
++                            self.token_error(e)
++                        });
++                        match part? {
++                            Some(part) => cur_table.header.push(part),
++                            None => break,
++                        }
++                    }
++                }
++                Line::KeyValue(key, value) => {
++                    if cur_table.values.is_none() {
++                        cur_table.values = Some(Vec::new());
++                    }
++                    cur_table.values.as_mut().unwrap().push((key, value));
++                }
++            }
++        }
++        if !cur_table.header.is_empty() || cur_table.values.is_some() {
++            tables.push(cur_table);
++        }
++
++        visitor.visit_map(MapVisitor {
++            values: Vec::new().into_iter(),
++            next_value: None,
++            depth: 0,
++            cur: 0,
++            cur_parent: 0,
++            max: tables.len(),
++            tables: &mut tables,
++            array: false,
++            de: self,
++        })
++    }
++
++    fn deserialize_enum<V>(
++        self,
++        _name: &'static str,
++        _variants: &'static [&'static str],
++        visitor: V
++    ) -> Result<V::Value, Error>
++        where V: de::Visitor<'de>
++    {
++        if let Some(next) = self.next()? {
++            match next {
++                Token::String { val, .. } => {
++                    visitor.visit_enum(val.into_deserializer())
++                },
++                _ => Err(Error::from_kind(ErrorKind::ExpectedString))
++            }
++        } else {
++            Err(Error::from_kind(ErrorKind::UnexpectedEof))
++        }
++    }
++
++    forward_to_deserialize_any! {
++        bool u8 u16 u32 u64 i8 i16 i32 i64 f32 f64 char str string seq
++        bytes byte_buf map struct unit newtype_struct
++        ignored_any unit_struct tuple_struct tuple option identifier
++    }
++}
++
++struct Table<'a> {
++    at: usize,
++    header: Vec<Cow<'a, str>>,
++    values: Option<Vec<(Cow<'a, str>, Value<'a>)>>,
++    array: bool,
++}
++
++#[doc(hidden)]
++pub struct MapVisitor<'de: 'b, 'b> {
++    values: vec::IntoIter<(Cow<'de, str>, Value<'de>)>,
++    next_value: Option<(Cow<'de, str>, Value<'de>)>,
++    depth: usize,
++    cur: usize,
++    cur_parent: usize,
++    max: usize,
++    tables: &'b mut [Table<'de>],
++    array: bool,
++    de: &'b mut Deserializer<'de>,
++}
++
++impl<'de, 'b> de::MapAccess<'de> for MapVisitor<'de, 'b> {
++    type Error = Error;
++
++    fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Error>
++        where K: de::DeserializeSeed<'de>,
++    {
++        if self.cur_parent == self.max || self.cur == self.max {
++            return Ok(None)
++        }
++
++        loop {
++            assert!(self.next_value.is_none());
++            if let Some((key, value)) = self.values.next() {
++                let ret = seed.deserialize(StrDeserializer::new(key.clone()))?;
++                self.next_value = Some((key, value));
++                return Ok(Some(ret))
++            }
++
++            let next_table = {
++                let prefix = &self.tables[self.cur_parent].header[..self.depth];
++                self.tables[self.cur..self.max].iter().enumerate().find(|&(_, t)| {
++                    if t.values.is_none() {
++                        return false
++                    }
++                    match t.header.get(..self.depth) {
++                        Some(header) => header == prefix,
++                        None => false,
++                    }
++                }).map(|(i, _)| i + self.cur)
++            };
++
++            let pos = match next_table {
++                Some(pos) => pos,
++                None => return Ok(None),
++            };
++            self.cur = pos;
++
++            // Test to see if we're duplicating our parent's table, and if so
++            // then this is an error in the toml format
++            if self.cur_parent != pos &&
++               self.tables[self.cur_parent].header == self.tables[pos].header {
++                let at = self.tables[pos].at;
++                let name = self.tables[pos].header.join(".");
++                return Err(self.de.error(at, ErrorKind::DuplicateTable(name)))
++            }
++
++            let table = &mut self.tables[pos];
++
++            // If we're not yet at the appropriate depth for this table then we
++            // just next the next portion of its header and then continue
++            // decoding.
++            if self.depth != table.header.len() {
++                let key = &table.header[self.depth];
++                let key = seed.deserialize(StrDeserializer::new(key.clone()))?;
++                return Ok(Some(key))
++            }
++
++            // Rule out cases like:
++            //
++            //      [[foo.bar]]
++            //      [[foo]]
++            if table.array  {
++                let kind = ErrorKind::RedefineAsArray;
++                return Err(self.de.error(table.at, kind))
++            }
++
++            self.values = table.values.take().expect("Unable to read table values").into_iter();
++        }
++    }
++
++    fn next_value_seed<V>(&mut self, seed: V) -> Result<V::Value, Error>
++        where V: de::DeserializeSeed<'de>,
++    {
++        if let Some((k, v)) = self.next_value.take() {
++            match seed.deserialize(ValueDeserializer::new(v)) {
++                Ok(v) => return Ok(v),
++                Err(mut e) => {
++                    e.add_key_context(&k);
++                    return Err(e)
++                }
++            }
++        }
++
++        let array = self.tables[self.cur].array &&
++                    self.depth == self.tables[self.cur].header.len() - 1;
++        self.cur += 1;
++        let res = seed.deserialize(MapVisitor {
++            values: Vec::new().into_iter(),
++            next_value: None,
++            depth: self.depth + if array {0} else {1},
++            cur_parent: self.cur - 1,
++            cur: 0,
++            max: self.max,
++            array: array,
++            tables: &mut *self.tables,
++            de: &mut *self.de,
++        });
++        res.map_err(|mut e| {
++            e.add_key_context(&self.tables[self.cur - 1].header[self.depth]);
++            e
++        })
++    }
++}
++
++impl<'de, 'b> de::SeqAccess<'de> for MapVisitor<'de, 'b> {
++    type Error = Error;
++
++    fn next_element_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Error>
++        where K: de::DeserializeSeed<'de>,
++    {
++        assert!(self.next_value.is_none());
++        assert!(self.values.next().is_none());
++
++        if self.cur_parent == self.max {
++            return Ok(None)
++        }
++
++        let next = self.tables[..self.max]
++            .iter()
++            .enumerate()
++            .skip(self.cur_parent + 1)
++            .find(|&(_, table)| {
++                table.array && table.header == self.tables[self.cur_parent].header
++            }).map(|p| p.0)
++            .unwrap_or(self.max);
++
++        let ret = seed.deserialize(MapVisitor {
++            values: self.tables[self.cur_parent].values.take().expect("Unable to read table values").into_iter(),
++            next_value: None,
++            depth: self.depth + 1,
++            cur_parent: self.cur_parent,
++            max: next,
++            cur: 0,
++            array: false,
++            tables: &mut self.tables,
++            de: &mut self.de,
++        })?;
++        self.cur_parent = next;
++        Ok(Some(ret))
++    }
++}
++
++impl<'de, 'b> de::Deserializer<'de> for MapVisitor<'de, 'b> {
++    type Error = Error;
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error>
++        where V: de::Visitor<'de>,
++    {
++        if self.array  {
++            visitor.visit_seq(self)
++        } else {
++            visitor.visit_map(self)
++        }
++    }
++
++    // `None` is interpreted as a missing field so be sure to implement `Some`
++    // as a present field.
++    fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Error>
++        where V: de::Visitor<'de>,
++    {
++        visitor.visit_some(self)
++    }
++
++    fn deserialize_newtype_struct<V>(
++        self,
++        _name: &'static str,
++        visitor: V
++    ) -> Result<V::Value, Error>
++        where V: de::Visitor<'de>
++    {
++        visitor.visit_newtype_struct(self)
++    }
++
++    forward_to_deserialize_any! {
++        bool u8 u16 u32 u64 i8 i16 i32 i64 f32 f64 char str string seq
++        bytes byte_buf map struct unit identifier
++        ignored_any unit_struct tuple_struct tuple enum
++    }
++}
++
++struct StrDeserializer<'a> {
++    key: Cow<'a, str>,
++}
++
++impl<'a> StrDeserializer<'a> {
++    fn new(key: Cow<'a, str>) -> StrDeserializer<'a> {
++        StrDeserializer {
++            key: key,
++        }
++    }
++}
++
++impl<'de> de::Deserializer<'de> for StrDeserializer<'de> {
++    type Error = Error;
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error>
++        where V: de::Visitor<'de>,
++    {
++        match self.key {
++            Cow::Borrowed(s) => visitor.visit_borrowed_str(s),
++            Cow::Owned(s) => visitor.visit_string(s),
++        }
++    }
++
++    forward_to_deserialize_any! {
++        bool u8 u16 u32 u64 i8 i16 i32 i64 f32 f64 char str string seq
++        bytes byte_buf map struct option unit newtype_struct
++        ignored_any unit_struct tuple_struct tuple enum identifier
++    }
++}
++
++struct ValueDeserializer<'a> {
++    value: Value<'a>,
++}
++
++impl<'a> ValueDeserializer<'a> {
++    fn new(value: Value<'a>) -> ValueDeserializer<'a> {
++        ValueDeserializer {
++            value: value,
++        }
++    }
++}
++
++impl<'de> de::Deserializer<'de> for ValueDeserializer<'de> {
++    type Error = Error;
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error>
++        where V: de::Visitor<'de>,
++    {
++        match self.value {
++            Value::Integer(i) => visitor.visit_i64(i),
++            Value::Boolean(b) => visitor.visit_bool(b),
++            Value::Float(f) => visitor.visit_f64(f),
++            Value::String(Cow::Borrowed(s)) => visitor.visit_borrowed_str(s),
++            Value::String(Cow::Owned(s)) => visitor.visit_string(s),
++            Value::Datetime(s) => visitor.visit_map(DatetimeDeserializer {
++                date: s,
++                visited: false,
++            }),
++            Value::Array(values) => {
++                let mut s = de::value::SeqDeserializer::new(values.into_iter());
++                let ret = visitor.visit_seq(&mut s)?;
++                s.end()?;
++                Ok(ret)
++            }
++            Value::InlineTable(values) => {
++                visitor.visit_map(InlineTableDeserializer {
++                    values: values.into_iter(),
++                    next_value: None,
++                })
++            }
++        }
++    }
++
++    fn deserialize_struct<V>(self,
++                             name: &'static str,
++                             fields: &'static [&'static str],
++                             visitor: V) -> Result<V::Value, Error>
++        where V: de::Visitor<'de>,
++    {
++        if name == SERDE_STRUCT_NAME && fields == &[SERDE_STRUCT_FIELD_NAME] {
++            if let Value::Datetime(s) = self.value {
++                return visitor.visit_map(DatetimeDeserializer {
++                    date: s,
++                    visited: false,
++                })
++            }
++        }
++
++        self.deserialize_any(visitor)
++    }
++
++    // `None` is interpreted as a missing field so be sure to implement `Some`
++    // as a present field.
++    fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Error>
++        where V: de::Visitor<'de>,
++    {
++        visitor.visit_some(self)
++    }
++
++    fn deserialize_enum<V>(
++        self,
++        _name: &'static str,
++        _variants: &'static [&'static str],
++        visitor: V
++    ) -> Result<V::Value, Error>
++        where V: de::Visitor<'de>
++    {
++        match self.value {
++            Value::String(val) => visitor.visit_enum(val.into_deserializer()),
++            _ => Err(Error::from_kind(ErrorKind::ExpectedString))
++        }
++    }
++
++    fn deserialize_newtype_struct<V>(
++        self,
++        _name: &'static str,
++        visitor: V
++    ) -> Result<V::Value, Error>
++        where V: de::Visitor<'de>
++    {
++        visitor.visit_newtype_struct(self)
++    }
++
++    forward_to_deserialize_any! {
++        bool u8 u16 u32 u64 i8 i16 i32 i64 f32 f64 char str string seq
++        bytes byte_buf map unit identifier
++        ignored_any unit_struct tuple_struct tuple
++    }
++}
++
++impl<'de> de::IntoDeserializer<'de, Error> for Value<'de> {
++    type Deserializer = ValueDeserializer<'de>;
++
++    fn into_deserializer(self) -> Self::Deserializer {
++        ValueDeserializer::new(self)
++    }
++}
++
++struct DatetimeDeserializer<'a> {
++    visited: bool,
++    date: &'a str,
++}
++
++impl<'de> de::MapAccess<'de> for DatetimeDeserializer<'de> {
++    type Error = Error;
++
++    fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Error>
++        where K: de::DeserializeSeed<'de>,
++    {
++        if self.visited {
++            return Ok(None)
++        }
++        self.visited = true;
++        seed.deserialize(DatetimeFieldDeserializer).map(Some)
++    }
++
++    fn next_value_seed<V>(&mut self, seed: V) -> Result<V::Value, Error>
++        where V: de::DeserializeSeed<'de>,
++    {
++        seed.deserialize(StrDeserializer::new(self.date.into()))
++    }
++}
++
++struct DatetimeFieldDeserializer;
++
++impl<'de> de::Deserializer<'de> for DatetimeFieldDeserializer {
++    type Error = Error;
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error>
++        where V: de::Visitor<'de>,
++    {
++        visitor.visit_borrowed_str(SERDE_STRUCT_FIELD_NAME)
++    }
++
++    forward_to_deserialize_any! {
++        bool u8 u16 u32 u64 i8 i16 i32 i64 f32 f64 char str string seq
++        bytes byte_buf map struct option unit newtype_struct
++        ignored_any unit_struct tuple_struct tuple enum identifier
++    }
++}
++
++struct InlineTableDeserializer<'a> {
++    values: vec::IntoIter<(Cow<'a, str>, Value<'a>)>,
++    next_value: Option<Value<'a>>,
++}
++
++impl<'de> de::MapAccess<'de> for InlineTableDeserializer<'de> {
++    type Error = Error;
++
++    fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Error>
++        where K: de::DeserializeSeed<'de>,
++    {
++        let (key, value) = match self.values.next() {
++            Some(pair) => pair,
++            None => return Ok(None),
++        };
++        self.next_value = Some(value);
++        seed.deserialize(StrDeserializer::new(key)).map(Some)
++    }
++
++    fn next_value_seed<V>(&mut self, seed: V) -> Result<V::Value, Error>
++        where V: de::DeserializeSeed<'de>,
++    {
++        let value = self.next_value.take().expect("Unable to read table values");
++        seed.deserialize(ValueDeserializer::new(value))
++    }
++}
++
++
++impl<'a> Deserializer<'a> {
++    /// Creates a new deserializer which will be deserializing the string
++    /// provided.
++    pub fn new(input: &'a str) -> Deserializer<'a> {
++        Deserializer {
++            tokens: Tokenizer::new(input),
++            input: input,
++            require_newline_after_table: true,
++        }
++    }
++
++    /// The `Deserializer::end` method should be called after a value has been
++    /// fully deserialized.  This allows the `Deserializer` to validate that the
++    /// input stream is at the end or that it only has trailing
++    /// whitespace/comments.
++    pub fn end(&mut self) -> Result<(), Error> {
++        Ok(())
++    }
++
++    /// Historical versions of toml-rs accidentally allowed a newline after a
++    /// table definition, but the TOML spec requires a newline after a table
++    /// definition header.
++    ///
++    /// This option can be set to `false` (the default is `true`) to emulate
++    /// this behavior for backwards compatibility with older toml-rs versions.
++    pub fn set_require_newline_after_table(&mut self, require: bool) {
++        self.require_newline_after_table = require;
++    }
++
++    fn line(&mut self) -> Result<Option<Line<'a>>, Error> {
++        loop {
++            self.eat_whitespace()?;
++            if self.eat_comment()? {
++                continue
++            }
++            if self.eat(Token::Newline)? {
++                continue
++            }
++            break
++        }
++
++        match self.peek()? {
++            Some(Token::LeftBracket) => self.table_header().map(Some),
++            Some(_) => self.key_value().map(Some),
++            None => Ok(None),
++        }
++    }
++
++    fn table_header(&mut self) -> Result<Line<'a>, Error> {
++        let start = self.tokens.current();
++        self.expect(Token::LeftBracket)?;
++        let array = self.eat(Token::LeftBracket)?;
++        let ret = Header::new(self.tokens.clone(),
++                              array,
++                              self.require_newline_after_table);
++        if self.require_newline_after_table {
++            self.tokens.skip_to_newline();
++        } else {
++            loop {
++                match self.next()? {
++                    Some(Token::RightBracket) => {
++                        if array {
++                            self.eat(Token::RightBracket)?;
++                        }
++                        break
++                    }
++                    Some(Token::Newline) |
++                    None => break,
++                    _ => {}
++                }
++            }
++            self.eat_whitespace()?;
++        }
++        Ok(Line::Table { at: start, header: ret, array: array })
++    }
++
++    fn key_value(&mut self) -> Result<Line<'a>, Error> {
++        let key = self.table_key()?;
++        self.eat_whitespace()?;
++        self.expect(Token::Equals)?;
++        self.eat_whitespace()?;
++
++        let value = self.value()?;
++        self.eat_whitespace()?;
++        if !self.eat_comment()? {
++            self.eat_newline_or_eof()?;
++        }
++
++        Ok(Line::KeyValue(key, value))
++    }
++
++    fn value(&mut self) -> Result<Value<'a>, Error> {
++        let at = self.tokens.current();
++        let value = match self.next()? {
++            Some(Token::String { val, .. }) => Value::String(val),
++            Some(Token::Keylike("true")) => Value::Boolean(true),
++            Some(Token::Keylike("false")) => Value::Boolean(false),
++            Some(Token::Keylike(key)) => self.number_or_date(key)?,
++            Some(Token::Plus) => self.number_leading_plus()?,
++            Some(Token::LeftBrace) => self.inline_table().map(Value::InlineTable)?,
++            Some(Token::LeftBracket) => self.array().map(Value::Array)?,
++            Some(token) => {
++                return Err(self.error(at, ErrorKind::Wanted {
++                    expected: "a value",
++                    found: token.describe(),
++                }))
++            }
++            None => return Err(self.eof()),
++        };
++        Ok(value)
++    }
++
++    fn number_or_date(&mut self, s: &'a str) -> Result<Value<'a>, Error> {
++        if s.contains('T') || (s.len() > 1 && s[1..].contains('-')) &&
++           !s.contains("e-") {
++            self.datetime(s, false).map(Value::Datetime)
++        } else if self.eat(Token::Colon)? {
++            self.datetime(s, true).map(Value::Datetime)
++        } else {
++            self.number(s)
++        }
++    }
++
++    fn number(&mut self, s: &'a str) -> Result<Value<'a>, Error> {
++        if s.contains('e') || s.contains('E') {
++            self.float(s, None).map(Value::Float)
++        } else if self.eat(Token::Period)? {
++            let at = self.tokens.current();
++            match self.next()? {
++                Some(Token::Keylike(after)) => {
++                    self.float(s, Some(after)).map(Value::Float)
++                }
++                _ => Err(self.error(at, ErrorKind::NumberInvalid)),
++            }
++        } else {
++            self.integer(s).map(Value::Integer)
++        }
++    }
++
++    fn number_leading_plus(&mut self) -> Result<Value<'a>, Error> {
++        let start = self.tokens.current();
++        match self.next()? {
++            Some(Token::Keylike(s)) => self.number(s),
++            _ => Err(self.error(start, ErrorKind::NumberInvalid)),
++        }
++    }
++
++    fn integer(&self, s: &'a str) -> Result<i64, Error> {
++        let (prefix, suffix) = self.parse_integer(s, true, false)?;
++        let start = self.tokens.substr_offset(s);
++        if suffix != "" {
++            return Err(self.error(start, ErrorKind::NumberInvalid))
++        }
++        prefix.replace("_", "").trim_left_matches('+').parse().map_err(|_e| {
++            self.error(start, ErrorKind::NumberInvalid)
++        })
++    }
++
++    fn parse_integer(&self,
++                     s: &'a str,
++                     allow_sign: bool,
++                     allow_leading_zeros: bool)
++                     -> Result<(&'a str, &'a str), Error> {
++        let start = self.tokens.substr_offset(s);
++
++        let mut first = true;
++        let mut first_zero = false;
++        let mut underscore = false;
++        let mut end = s.len();
++        for (i, c) in s.char_indices() {
++            let at = i + start;
++            if i == 0 && (c == '+' || c == '-') && allow_sign {
++                continue
++            }
++
++            match c {
++                '0' if first => first_zero = true,
++                '0' ... '9' if !first && first_zero && !allow_leading_zeros => {
++                    return Err(self.error(at, ErrorKind::NumberInvalid))
++                }
++                '0' ... '9' => underscore = false,
++                '_' if first => {
++                    return Err(self.error(at, ErrorKind::NumberInvalid))
++                }
++                '_' if !underscore => underscore = true,
++                _ => {
++                    end = i;
++                    break
++                }
++
++            }
++            first = false;
++        }
++        if first || underscore {
++            return Err(self.error(start, ErrorKind::NumberInvalid))
++        }
++        Ok((&s[..end], &s[end..]))
++    }
++
++    fn float(&mut self, s: &'a str, after_decimal: Option<&'a str>)
++             -> Result<f64, Error> {
++        let (integral, mut suffix) = self.parse_integer(s, true, false)?;
++        let start = self.tokens.substr_offset(integral);
++
++        let mut fraction = None;
++        if let Some(after) = after_decimal {
++            if suffix != "" {
++                return Err(self.error(start, ErrorKind::NumberInvalid))
++            }
++            let (a, b) = self.parse_integer(after, false, true)?;
++            fraction = Some(a);
++            suffix = b;
++        }
++
++        let mut exponent = None;
++        if suffix.starts_with('e') || suffix.starts_with('E') {
++            let (a, b) = if suffix.len() == 1 {
++                self.eat(Token::Plus)?;
++                match self.next()? {
++                    Some(Token::Keylike(s)) => {
++                        self.parse_integer(s, false, false)?
++                    }
++                    _ => return Err(self.error(start, ErrorKind::NumberInvalid)),
++                }
++            } else {
++                self.parse_integer(&suffix[1..], true, false)?
++            };
++            if b != "" {
++                return Err(self.error(start, ErrorKind::NumberInvalid))
++            }
++            exponent = Some(a);
++        }
++
++        let mut number = integral.trim_left_matches('+')
++                                 .chars()
++                                 .filter(|c| *c != '_')
++                                 .collect::<String>();
++        if let Some(fraction) = fraction {
++            number.push_str(".");
++            number.extend(fraction.chars().filter(|c| *c != '_'));
++        }
++        if let Some(exponent) = exponent {
++            number.push_str("E");
++            number.extend(exponent.chars().filter(|c| *c != '_'));
++        }
++        number.parse().map_err(|_e| {
++            self.error(start, ErrorKind::NumberInvalid)
++        }).and_then(|n: f64| {
++            if n.is_finite() {
++                Ok(n)
++            } else {
++                Err(self.error(start, ErrorKind::NumberInvalid))
++            }
++        })
++    }
++
++    fn datetime(&mut self, date: &'a str, colon_eaten: bool)
++                -> Result<&'a str, Error> {
++        let start = self.tokens.substr_offset(date);
++        if colon_eaten || self.eat(Token::Colon)? {
++            // minutes
++            match self.next()? {
++                Some(Token::Keylike(_)) => {}
++                _ => return Err(self.error(start, ErrorKind::DateInvalid)),
++            }
++            // Seconds
++            self.expect(Token::Colon)?;
++            match self.next()? {
++                Some(Token::Keylike(_)) => {}
++                _ => return Err(self.error(start, ErrorKind::DateInvalid)),
++            }
++            // Fractional seconds
++            if self.eat(Token::Period)? {
++                match self.next()? {
++                    Some(Token::Keylike(_)) => {}
++                    _ => return Err(self.error(start, ErrorKind::DateInvalid)),
++                }
++            }
++
++            // offset
++            if self.eat(Token::Plus)? {
++                match self.next()? {
++                    Some(Token::Keylike(_)) => {}
++                    _ => return Err(self.error(start, ErrorKind::DateInvalid)),
++                }
++            }
++            if self.eat(Token::Colon)? {
++                match self.next()? {
++                    Some(Token::Keylike(_)) => {}
++                    _ => return Err(self.error(start, ErrorKind::DateInvalid)),
++                }
++            }
++        }
++        let end = self.tokens.current();
++        Ok(&self.tokens.input()[start..end])
++    }
++
++    // TODO(#140): shouldn't buffer up this entire table in memory, it'd be
++    // great to defer parsing everything until later.
++    fn inline_table(&mut self) -> Result<Vec<(Cow<'a, str>, Value<'a>)>, Error> {
++        let mut ret = Vec::new();
++        self.eat_whitespace()?;
++        if self.eat(Token::RightBrace)? {
++            return Ok(ret)
++        }
++        loop {
++            let key = self.table_key()?;
++            self.eat_whitespace()?;
++            self.expect(Token::Equals)?;
++            self.eat_whitespace()?;
++            ret.push((key, self.value()?));
++
++            self.eat_whitespace()?;
++            if self.eat(Token::RightBrace)? {
++                return Ok(ret)
++            }
++            self.expect(Token::Comma)?;
++            self.eat_whitespace()?;
++        }
++    }
++
++    // TODO(#140): shouldn't buffer up this entire array in memory, it'd be
++    // great to defer parsing everything until later.
++    fn array(&mut self) -> Result<Vec<Value<'a>>, Error> {
++        let mut ret = Vec::new();
++
++        let intermediate = |me: &mut Deserializer| {
++            loop {
++                me.eat_whitespace()?;
++                if !me.eat(Token::Newline)? && !me.eat_comment()? {
++                    break
++                }
++            }
++            Ok(())
++        };
++
++        loop {
++            intermediate(self)?;
++            if self.eat(Token::RightBracket)? {
++                return Ok(ret)
++            }
++            let at = self.tokens.current();
++            let value = self.value()?;
++            if let Some(last) = ret.last() {
++                if !value.same_type(last) {
++                    return Err(self.error(at, ErrorKind::MixedArrayType))
++                }
++            }
++            ret.push(value);
++            intermediate(self)?;
++            if !self.eat(Token::Comma)? {
++                break
++            }
++        }
++        intermediate(self)?;
++        self.expect(Token::RightBracket)?;
++        Ok(ret)
++    }
++
++    fn table_key(&mut self) -> Result<Cow<'a, str>, Error> {
++        self.tokens.table_key().map_err(|e| self.token_error(e))
++    }
++
++    fn eat_whitespace(&mut self) -> Result<(), Error> {
++        self.tokens.eat_whitespace().map_err(|e| self.token_error(e))
++    }
++
++    fn eat_comment(&mut self) -> Result<bool, Error> {
++        self.tokens.eat_comment().map_err(|e| self.token_error(e))
++    }
++
++    fn eat_newline_or_eof(&mut self) -> Result<(), Error> {
++        self.tokens.eat_newline_or_eof().map_err(|e| self.token_error(e))
++    }
++
++    fn eat(&mut self, expected: Token<'a>) -> Result<bool, Error> {
++        self.tokens.eat(expected).map_err(|e| self.token_error(e))
++    }
++
++    fn expect(&mut self, expected: Token<'a>) -> Result<(), Error> {
++        self.tokens.expect(expected).map_err(|e| self.token_error(e))
++    }
++
++    fn next(&mut self) -> Result<Option<Token<'a>>, Error> {
++        self.tokens.next().map_err(|e| self.token_error(e))
++    }
++
++    fn peek(&mut self) -> Result<Option<Token<'a>>, Error> {
++        self.tokens.peek().map_err(|e| self.token_error(e))
++    }
++
++    fn eof(&self) -> Error {
++        self.error(self.input.len(), ErrorKind::UnexpectedEof)
++    }
++
++    fn token_error(&self, error: TokenError) -> Error {
++        match error {
++            TokenError::InvalidCharInString(at, ch) => {
++                self.error(at, ErrorKind::InvalidCharInString(ch))
++            }
++            TokenError::InvalidEscape(at, ch) => {
++                self.error(at, ErrorKind::InvalidEscape(ch))
++            }
++            TokenError::InvalidEscapeValue(at, v) => {
++                self.error(at, ErrorKind::InvalidEscapeValue(v))
++            }
++            TokenError::InvalidHexEscape(at, ch) => {
++                self.error(at, ErrorKind::InvalidHexEscape(ch))
++            }
++            TokenError::NewlineInString(at) => {
++                self.error(at, ErrorKind::NewlineInString)
++            }
++            TokenError::Unexpected(at, ch) => {
++                self.error(at, ErrorKind::Unexpected(ch))
++            }
++            TokenError::UnterminatedString(at) => {
++                self.error(at, ErrorKind::UnterminatedString)
++            }
++            TokenError::NewlineInTableKey(at) => {
++                self.error(at, ErrorKind::NewlineInTableKey)
++            }
++            TokenError::Wanted { at, expected, found } => {
++                self.error(at, ErrorKind::Wanted { expected: expected, found: found })
++            }
++            TokenError::EmptyTableKey(at) => {
++                self.error(at, ErrorKind::EmptyTableKey)
++            }
++        }
++    }
++
++    fn error(&self, at: usize, kind: ErrorKind) -> Error {
++        let mut err = Error::from_kind(kind);
++        let (line, col) = self.to_linecol(at);
++        err.inner.line = Some(line);
++        err.inner.col = col;
++        err
++    }
++
++    /// Converts a byte offset from an error message to a (line, column) pair
++    ///
++    /// All indexes are 0-based.
++    fn to_linecol(&self, offset: usize) -> (usize, usize) {
++        let mut cur = 0;
++        for (i, line) in self.input.lines().enumerate() {
++            if cur + line.len() + 1 > offset {
++                return (i, offset - cur)
++            }
++            cur += line.len() + 1;
++        }
++        (self.input.lines().count(), 0)
++    }
++}
++
++impl Error {
++    /// Produces a (line, column) pair of the position of the error if available
++    ///
++    /// All indexes are 0-based.
++    pub fn line_col(&self) -> Option<(usize, usize)> {
++        self.inner.line.map(|line| (line, self.inner.col))
++    }
++
++    fn from_kind(kind: ErrorKind) -> Error {
++        Error {
++            inner: Box::new(ErrorInner {
++                kind: kind,
++                line: None,
++                col: 0,
++                message: String::new(),
++                key: Vec::new(),
++            }),
++        }
++    }
++
++    fn custom(s: String) -> Error {
++        Error {
++            inner: Box::new(ErrorInner {
++                kind: ErrorKind::Custom,
++                line: None,
++                col: 0,
++                message: s,
++                key: Vec::new(),
++            }),
++        }
++    }
++
++    /// Do not call this method, it may be removed at any time, it's just an
++    /// internal implementation detail.
++    #[doc(hidden)]
++    pub fn add_key_context(&mut self, key: &str) {
++        self.inner.key.insert(0, key.to_string());
++    }
++}
++
++impl fmt::Display for Error {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        match self.inner.kind {
++            ErrorKind::UnexpectedEof => "unexpected eof encountered".fmt(f)?,
++            ErrorKind::InvalidCharInString(c) => {
++                write!(f, "invalid character in string: `{}`",
++                       c.escape_default().collect::<String>())?
++            }
++            ErrorKind::InvalidEscape(c) => {
++                write!(f, "invalid escape character in string: `{}`",
++                       c.escape_default().collect::<String>())?
++            }
++            ErrorKind::InvalidHexEscape(c) => {
++                write!(f, "invalid hex escape character in string: `{}`",
++                       c.escape_default().collect::<String>())?
++            }
++            ErrorKind::InvalidEscapeValue(c) => {
++                write!(f, "invalid escape value: `{}`", c)?
++            }
++            ErrorKind::NewlineInString => "newline in string found".fmt(f)?,
++            ErrorKind::Unexpected(ch) => {
++                write!(f, "unexpected character found: `{}`",
++                       ch.escape_default().collect::<String>())?
++            }
++            ErrorKind::UnterminatedString => "unterminated string".fmt(f)?,
++            ErrorKind::NewlineInTableKey => "found newline in table key".fmt(f)?,
++            ErrorKind::Wanted { expected, found } => {
++                write!(f, "expected {}, found {}", expected, found)?
++            }
++            ErrorKind::NumberInvalid => "invalid number".fmt(f)?,
++            ErrorKind::DateInvalid => "invalid date".fmt(f)?,
++            ErrorKind::MixedArrayType => "mixed types in an array".fmt(f)?,
++            ErrorKind::DuplicateTable(ref s) => {
++                write!(f, "redefinition of table `{}`", s)?;
++            }
++            ErrorKind::RedefineAsArray => "table redefined as array".fmt(f)?,
++            ErrorKind::EmptyTableKey => "empty table key found".fmt(f)?,
++            ErrorKind::Custom => self.inner.message.fmt(f)?,
++            ErrorKind::ExpectedString => "expected string".fmt(f)?,
++            ErrorKind::__Nonexhaustive => panic!(),
++        }
++
++        if !self.inner.key.is_empty() {
++            write!(f, " for key `")?;
++            for (i, k) in self.inner.key.iter().enumerate() {
++                if i > 0 {
++                    write!(f, ".")?;
++                }
++                write!(f, "{}", k)?;
++            }
++            write!(f, "`")?;
++        }
++
++        if let Some(line) = self.inner.line {
++            write!(f, " at line {}", line + 1)?;
++        }
++
++        Ok(())
++    }
++}
++
++impl error::Error for Error {
++    fn description(&self) -> &str {
++        match self.inner.kind {
++            ErrorKind::UnexpectedEof => "unexpected eof encountered",
++            ErrorKind::InvalidCharInString(_) => "invalid char in string",
++            ErrorKind::InvalidEscape(_) => "invalid escape in string",
++            ErrorKind::InvalidHexEscape(_) => "invalid hex escape in string",
++            ErrorKind::InvalidEscapeValue(_) => "invalid escape value in string",
++            ErrorKind::NewlineInString => "newline in string found",
++            ErrorKind::Unexpected(_) => "unexpected or invalid character",
++            ErrorKind::UnterminatedString => "unterminated string",
++            ErrorKind::NewlineInTableKey => "found newline in table key",
++            ErrorKind::Wanted { .. } => "expected a token but found another",
++            ErrorKind::NumberInvalid => "invalid number",
++            ErrorKind::DateInvalid => "invalid date",
++            ErrorKind::MixedArrayType => "mixed types in an array",
++            ErrorKind::DuplicateTable(_) => "duplicate table",
++            ErrorKind::RedefineAsArray => "table redefined as array",
++            ErrorKind::EmptyTableKey => "empty table key found",
++            ErrorKind::Custom => "a custom error",
++            ErrorKind::ExpectedString => "expected string",
++            ErrorKind::__Nonexhaustive => panic!(),
++        }
++    }
++}
++
++impl de::Error for Error {
++    fn custom<T: fmt::Display>(msg: T) -> Error {
++        Error::custom(msg.to_string())
++    }
++}
++
++enum Line<'a> {
++    Table { at: usize, header: Header<'a>, array: bool },
++    KeyValue(Cow<'a, str>, Value<'a>),
++}
++
++struct Header<'a> {
++    first: bool,
++    array: bool,
++    require_newline_after_table: bool,
++    tokens: Tokenizer<'a>,
++}
++
++impl<'a> Header<'a> {
++    fn new(tokens: Tokenizer<'a>,
++           array: bool,
++           require_newline_after_table: bool) -> Header<'a> {
++        Header {
++            first: true,
++            array: array,
++            tokens: tokens,
++            require_newline_after_table: require_newline_after_table,
++        }
++    }
++
++    fn next(&mut self) -> Result<Option<Cow<'a, str>>, TokenError> {
++        self.tokens.eat_whitespace()?;
++
++        if self.first || self.tokens.eat(Token::Period)? {
++            self.first = false;
++            self.tokens.eat_whitespace()?;
++            self.tokens.table_key().map(Some)
++        } else {
++            self.tokens.expect(Token::RightBracket)?;
++            if self.array {
++                self.tokens.expect(Token::RightBracket)?;
++            }
++
++            self.tokens.eat_whitespace()?;
++            if self.require_newline_after_table {
++                if !self.tokens.eat_comment()? {
++                    self.tokens.eat_newline_or_eof()?;
++                }
++            }
++            Ok(None)
++        }
++    }
++}
++
++#[derive(Debug)]
++enum Value<'a> {
++    Integer(i64),
++    Float(f64),
++    Boolean(bool),
++    String(Cow<'a, str>),
++    Datetime(&'a str),
++    Array(Vec<Value<'a>>),
++    InlineTable(Vec<(Cow<'a, str>, Value<'a>)>),
++}
++
++impl<'a> Value<'a> {
++    fn same_type(&self, other: &Value<'a>) -> bool {
++        match (self, other) {
++            (&Value::String(..), &Value::String(..)) |
++            (&Value::Integer(..), &Value::Integer(..)) |
++            (&Value::Float(..), &Value::Float(..)) |
++            (&Value::Boolean(..), &Value::Boolean(..)) |
++            (&Value::Datetime(..), &Value::Datetime(..)) |
++            (&Value::Array(..), &Value::Array(..)) |
++            (&Value::InlineTable(..), &Value::InlineTable(..)) => true,
++
++            _ => false,
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c4a7e9dfa63623129e8f7c74ab02f6e202cc9866
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,168 @@@
++//! A [TOML]-parsing library
++//!
++//! This library implements a [TOML] v0.4.0 compatible parser,
++//! primarily supporting the [`serde`] library for encoding/decoding
++//! various types in Rust.
++//!
++//! TOML itself is a simple, ergonomic, and readable configuration format:
++//!
++//! ```toml
++//! [package]
++//! name = "toml"
++//! version = "0.4.2"
++//! authors = ["Alex Crichton <alex@alexcrichton.com>"]
++//!
++//! [dependencies]
++//! serde = "1.0"
++//! ```
++//!
++//! The TOML format tends to be relatively common throughout the Rust community
++//! for configuration, notably being used by [Cargo], Rust's package manager.
++//!
++//! ## TOML values
++//!
++//! A value in TOML is represented with the `Value` enum in this crate:
++//!
++//! ```rust,ignore
++//! pub enum Value {
++//!     String(String),
++//!     Integer(i64),
++//!     Float(f64),
++//!     Boolean(bool),
++//!     Datetime(Datetime),
++//!     Array(Array),
++//!     Table(Table),
++//! }
++//! ```
++//!
++//! TOML is similar to JSON with the notable addition of a `Datetime`
++//! type. In general, TOML and JSON are interchangeable in terms of
++//! formats.
++//!
++//! ## Parsing TOML
++//!
++//! The easiest way to parse a TOML document is via the `Value` type:
++//!
++//! ```rust
++//! use toml::Value;
++//!
++//! let value = "foo = 'bar'".parse::<Value>().unwrap();
++//!
++//! assert_eq!(value["foo"].as_str(), Some("bar"));
++//! ```
++//!
++//! The `Value` type implements a number of convenience methods and
++//! traits; the example above uses `FromStr` to parse a `str` into a
++//! `Value`.
++//!
++//! ## Deserialization and Serialization
++//!
++//! This crate supports [`serde`] 1.0 with a number of
++//! implementations of the `Deserialize`, `Serialize`, `Deserializer`, and
++//! `Serializer` traits. Namely, you'll find:
++//!
++//! * `Deserialize for Value`
++//! * `Serialize for Value`
++//! * `Deserialize for Datetime`
++//! * `Serialize for Datetime`
++//! * `Deserializer for de::Deserializer`
++//! * `Serializer for ser::Serializer`
++//! * `Deserializer for Value`
++//!
++//! This means that you can use Serde to deserialize/serialize the
++//! `Value` type as well as the `Datetime` type in this crate. You can also
++//! use the `Deserializer`, `Serializer`, or `Value` type itself to act as
++//! a deserializer/serializer for arbitrary types.
++//!
++//! An example of deserializing with TOML is:
++//!
++//! ```rust
++//! #[macro_use]
++//! extern crate serde_derive;
++//! extern crate toml;
++//!
++//! #[derive(Deserialize)]
++//! struct Config {
++//!     ip: String,
++//!     port: Option<u16>,
++//!     keys: Keys,
++//! }
++//!
++//! #[derive(Deserialize)]
++//! struct Keys {
++//!     github: String,
++//!     travis: Option<String>,
++//! }
++//!
++//! fn main() {
++//!     let config: Config = toml::from_str(r#"
++//!         ip = '127.0.0.1'
++//!
++//!         [keys]
++//!         github = 'xxxxxxxxxxxxxxxxx'
++//!         travis = 'yyyyyyyyyyyyyyyyy'
++//!     "#).unwrap();
++//!
++//!     assert_eq!(config.ip, "127.0.0.1");
++//!     assert_eq!(config.port, None);
++//!     assert_eq!(config.keys.github, "xxxxxxxxxxxxxxxxx");
++//!     assert_eq!(config.keys.travis.as_ref().unwrap(), "yyyyyyyyyyyyyyyyy");
++//! }
++//! ```
++//!
++//! You can serialize types in a similar fashion:
++//!
++//! ```rust
++//! #[macro_use]
++//! extern crate serde_derive;
++//! extern crate toml;
++//!
++//! #[derive(Serialize)]
++//! struct Config {
++//!     ip: String,
++//!     port: Option<u16>,
++//!     keys: Keys,
++//! }
++//!
++//! #[derive(Serialize)]
++//! struct Keys {
++//!     github: String,
++//!     travis: Option<String>,
++//! }
++//!
++//! fn main() {
++//!     let config = Config {
++//!         ip: "127.0.0.1".to_string(),
++//!         port: None,
++//!         keys: Keys {
++//!             github: "xxxxxxxxxxxxxxxxx".to_string(),
++//!             travis: Some("yyyyyyyyyyyyyyyyy".to_string()),
++//!         },
++//!     };
++//!
++//!     let toml = toml::to_string(&config).unwrap();
++//! }
++//! ```
++//!
++//! [TOML]: https://github.com/toml-lang/toml
++//! [Cargo]: https://crates.io/
++//! [`serde`]: https://serde.rs/
++
++#![doc(html_root_url = "https://docs.rs/toml/0.4")]
++#![deny(missing_docs)]
++
++#[macro_use]
++extern crate serde;
++
++pub mod value;
++#[doc(no_inline)]
++pub use value::Value;
++mod datetime;
++
++pub mod ser;
++#[doc(no_inline)]
++pub use ser::{to_string, to_string_pretty, to_vec, Serializer};
++pub mod de;
++#[doc(no_inline)]
++pub use de::{from_slice, from_str, Deserializer};
++mod tokens;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3c9b354e3011b98eeed32ca0effb9e51a32c4f36
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1540 @@@
++//! Serializing Rust structures into TOML.
++//!
++//! This module contains all the Serde support for serializing Rust structures
++//! into TOML documents (as strings). Note that some top-level functions here
++//! are also provided at the top of the crate.
++//!
++//! Note that the TOML format has a restriction that if a table itself contains
++//! tables, all keys with non-table values must be emitted first. This is
++//! typically easy to ensure happens when you're defining a `struct` as you can
++//! reorder the fields manually, but when working with maps (such as `BTreeMap`
++//! or `HashMap`) this can lead to serialization errors. In those situations you
++//! may use the `tables_last` function in this module like so:
++//!
++//! ```rust
++//! # #[macro_use] extern crate serde_derive;
++//! # extern crate toml;
++//! # use std::collections::HashMap;
++//! #[derive(Serialize)]
++//! struct Manifest {
++//!     package: Package,
++//!     #[serde(serialize_with = "toml::ser::tables_last")]
++//!     dependencies: HashMap<String, Dependency>,
++//! }
++//! # type Package = String;
++//! # type Dependency = String;
++//! # fn main() {}
++//! ```
++
++use std::cell::Cell;
++use std::error;
++use std::fmt::{self, Write};
++use std::marker;
++
++use serde::ser;
++use datetime::{SERDE_STRUCT_FIELD_NAME, SERDE_STRUCT_NAME};
++
++/// Serialize the given data structure as a TOML byte vector.
++///
++/// Serialization can fail if `T`'s implementation of `Serialize` decides to
++/// fail, if `T` contains a map with non-string keys, or if `T` attempts to
++/// serialize an unsupported datatype such as an enum, tuple, or tuple struct.
++pub fn to_vec<T: ?Sized>(value: &T) -> Result<Vec<u8>, Error>
++    where T: ser::Serialize,
++{
++    to_string(value).map(|e| e.into_bytes())
++}
++
++/// Serialize the given data structure as a String of TOML.
++///
++/// Serialization can fail if `T`'s implementation of `Serialize` decides to
++/// fail, if `T` contains a map with non-string keys, or if `T` attempts to
++/// serialize an unsupported datatype such as an enum, tuple, or tuple struct.
++///
++/// # Examples
++///
++/// ```
++/// #[macro_use]
++/// extern crate serde_derive;
++/// extern crate toml;
++///
++/// #[derive(Serialize)]
++/// struct Config {
++///     database: Database,
++/// }
++///
++/// #[derive(Serialize)]
++/// struct Database {
++///     ip: String,
++///     port: Vec<u16>,
++///     connection_max: u32,
++///     enabled: bool,
++/// }
++///
++/// fn main() {
++///     let config = Config {
++///         database: Database {
++///             ip: "192.168.1.1".to_string(),
++///             port: vec![8001, 8002, 8003],
++///             connection_max: 5000,
++///             enabled: false,
++///         },
++///     };
++///
++///     let toml = toml::to_string(&config).unwrap();
++///     println!("{}", toml)
++/// }
++/// ```
++pub fn to_string<T: ?Sized>(value: &T) -> Result<String, Error>
++    where T: ser::Serialize,
++{
++    let mut dst = String::with_capacity(128);
++    value.serialize(&mut Serializer::new(&mut dst))?;
++    Ok(dst)
++}
++
++/// Serialize the given data structure as a "pretty" String of TOML.
++///
++/// This is identical to `to_string` except the output string has a more
++/// "pretty" output. See `Serializer::pretty` for more details.
++pub fn to_string_pretty<T: ?Sized>(value: &T) -> Result<String, Error>
++    where T: ser::Serialize,
++{
++    let mut dst = String::with_capacity(128);
++    value.serialize(&mut Serializer::pretty(&mut dst))?;
++    Ok(dst)
++}
++
++/// Errors that can occur when serializing a type.
++#[derive(Debug, PartialEq, Eq, Clone)]
++pub enum Error {
++    /// Indicates that a Rust type was requested to be serialized but it was not
++    /// supported.
++    ///
++    /// Currently the TOML format does not support serializing types such as
++    /// enums, tuples and tuple structs.
++    UnsupportedType,
++
++    /// The key of all TOML maps must be strings, but serialization was
++    /// attempted where the key of a map was not a string.
++    KeyNotString,
++
++    /// An error that we never omit but keep for backwards compatibility
++    #[doc(hidden)]
++    KeyNewline,
++
++    /// Arrays in TOML must have a homogenous type, but a heterogeneous array
++    /// was emitted.
++    ArrayMixedType,
++
++    /// All values in a TOML table must be emitted before further tables are
++    /// emitted. If a value is emitted *after* a table then this error is
++    /// generated.
++    ValueAfterTable,
++
++    /// A serialized date was invalid.
++    DateInvalid,
++
++    /// A serialized number was invalid.
++    NumberInvalid,
++
++    /// None was attempted to be serialized, but it's not supported.
++    UnsupportedNone,
++
++    /// A custom error which could be generated when serializing a particular
++    /// type.
++    Custom(String),
++
++    #[doc(hidden)]
++    __Nonexhaustive,
++}
++
++#[derive(Debug, Default, Clone)]
++#[doc(hidden)]
++/// Internal place for holding array setings
++struct ArraySettings {
++    indent: usize,
++    trailing_comma: bool,
++}
++
++impl ArraySettings {
++    fn pretty() -> ArraySettings {
++        ArraySettings {
++            indent: 4,
++            trailing_comma: true,
++        }
++    }
++}
++
++#[derive(Debug, Default, Clone)]
++#[doc(hidden)]
++/// Internal struct for holding serialization settings
++struct Settings {
++    array: Option<ArraySettings>,
++    pretty_string: bool,
++}
++
++/// Serialization implementation for TOML.
++///
++/// This structure implements serialization support for TOML to serialize an
++/// arbitrary type to TOML. Note that the TOML format does not support all
++/// datatypes in Rust, such as enums, tuples, and tuple structs. These types
++/// will generate an error when serialized.
++///
++/// Currently a serializer always writes its output to an in-memory `String`,
++/// which is passed in when creating the serializer itself.
++pub struct Serializer<'a> {
++    dst: &'a mut String,
++    state: State<'a>,
++    settings: Settings,
++}
++
++#[derive(Debug, Clone)]
++enum State<'a> {
++    Table {
++        key: &'a str,
++        parent: &'a State<'a>,
++        first: &'a Cell<bool>,
++        table_emitted: &'a Cell<bool>,
++    },
++    Array {
++        parent: &'a State<'a>,
++        first: &'a Cell<bool>,
++        type_: &'a Cell<Option<&'static str>>,
++    },
++    End,
++}
++
++#[doc(hidden)]
++pub struct SerializeSeq<'a: 'b, 'b> {
++    ser: &'b mut Serializer<'a>,
++    first: Cell<bool>,
++    type_: Cell<Option<&'static str>>,
++}
++
++#[doc(hidden)]
++pub enum SerializeTable<'a: 'b, 'b> {
++    Datetime(&'b mut Serializer<'a>),
++    Table {
++        ser: &'b mut Serializer<'a>,
++        key: String,
++        first: Cell<bool>,
++        table_emitted: Cell<bool>,
++    }
++}
++
++impl<'a> Serializer<'a> {
++    /// Creates a new serializer which will emit TOML into the buffer provided.
++    ///
++    /// The serializer can then be used to serialize a type after which the data
++    /// will be present in `dst`.
++    pub fn new(dst: &'a mut String) -> Serializer<'a> {
++        Serializer {
++            dst: dst,
++            state: State::End,
++            settings: Settings::default(),
++        }
++    }
++
++    /// Instantiate a "pretty" formatter
++    ///
++    /// By default this will use:
++    ///
++    /// - pretty strings: strings with newlines will use the `'''` syntax. See
++    ///   `Serializer::pretty_string`
++    /// - pretty arrays: each item in arrays will be on a newline, have an indentation of 4 and
++    ///   have a trailing comma. See `Serializer::pretty_array`
++    pub fn pretty(dst: &'a mut String) -> Serializer<'a> {
++        Serializer {
++            dst: dst,
++            state: State::End,
++            settings: Settings {
++                array: Some(ArraySettings::pretty()),
++                pretty_string: true,
++            },
++        }
++    }
++
++    /// Enable or Disable pretty strings
++    ///
++    /// If enabled, strings with one or more newline character will use the `'''` syntax.
++    ///
++    /// # Examples
++    ///
++    /// Instead of:
++    ///
++    /// ```ignore
++    /// single = "no newlines"
++    /// text = "\nfoo\nbar\n"
++    /// ```
++    ///
++    /// You will have:
++    ///
++    /// ```ignore
++    /// single = "no newlines"
++    /// text = '''
++    /// foo
++    /// bar
++    /// '''
++    /// ```
++    pub fn pretty_string(&mut self, value: bool) -> &mut Self {
++        self.settings.pretty_string = value;
++        self
++    }
++
++    /// Enable or Disable pretty arrays
++    ///
++    /// If enabled, arrays will always have each item on their own line.
++    ///
++    /// Some specific features can be controlled via other builder methods:
++    ///
++    /// - `Serializer::pretty_array_indent`: set the indent to a value other
++    ///   than 4.
++    /// - `Serializer::pretty_array_trailing_comma`: enable/disable the trailing
++    ///   comma on the last item.
++    ///
++    /// # Examples
++    ///
++    /// Instead of:
++    ///
++    /// ```ignore
++    /// array = ["foo", "bar"]
++    /// ```
++    ///
++    /// You will have:
++    ///
++    /// ```ignore
++    /// array = [
++    ///     "foo",
++    ///     "bar",
++    /// ]
++    /// ```
++    pub fn pretty_array(&mut self, value: bool) -> &mut Self {
++        self.settings.array = if value {
++            Some(ArraySettings::pretty())
++        } else {
++            None
++        };
++        self
++    }
++
++    /// Set the indent for pretty arrays
++    ///
++    /// See `Serializer::pretty_array` for more details.
++    pub fn pretty_array_indent(&mut self, value: usize) -> &mut Self {
++        let use_default = if let &mut Some(ref mut a) = &mut self.settings.array {
++            a.indent = value;
++            false
++        } else {
++            true
++        };
++
++        if use_default {
++            let mut array = ArraySettings::pretty();
++            array.indent = value;
++            self.settings.array = Some(array);
++        }
++        self
++    }
++
++    /// Specify whether to use a trailing comma when serializing pretty arrays
++    ///
++    /// See `Serializer::pretty_array` for more details.
++    pub fn pretty_array_trailing_comma(&mut self, value: bool) -> &mut Self {
++        let use_default = if let &mut Some(ref mut a) = &mut self.settings.array {
++            a.trailing_comma = value;
++            false
++        } else {
++            true
++        };
++
++        if use_default {
++            let mut array = ArraySettings::pretty();
++            array.trailing_comma = value;
++            self.settings.array = Some(array);
++        }
++        self
++    }
++
++    fn display<T: fmt::Display>(&mut self,
++                                t: T,
++                                type_: &'static str) -> Result<(), Error> {
++        self.emit_key(type_)?;
++        drop(write!(self.dst, "{}", t));
++        if let State::Table { .. } = self.state {
++            self.dst.push_str("\n");
++        }
++        Ok(())
++    }
++
++    fn emit_key(&mut self, type_: &'static str) -> Result<(), Error> {
++        self.array_type(type_)?;
++        let state = self.state.clone();
++        self._emit_key(&state)
++    }
++
++    // recursive implementation of `emit_key` above
++    fn _emit_key(&mut self, state: &State) -> Result<(), Error> {
++        match *state {
++            State::End => Ok(()),
++            State::Array { parent, first, type_ } => {
++                assert!(type_.get().is_some());
++                if first.get() {
++                    self._emit_key(parent)?;
++                }
++                self.emit_array(first)
++            }
++            State::Table { parent, first, table_emitted, key } => {
++                if table_emitted.get() {
++                    return Err(Error::ValueAfterTable)
++                }
++                if first.get() {
++                    self.emit_table_header(parent)?;
++                    first.set(false);
++                }
++                self.escape_key(key)?;
++                self.dst.push_str(" = ");
++                Ok(())
++            }
++        }
++    }
++
++    fn emit_array(&mut self, first: &Cell<bool>) -> Result<(), Error> {
++        match self.settings.array {
++            Some(ref a) => {
++                if first.get() {
++                    self.dst.push_str("[\n")
++                } else {
++                    self.dst.push_str(",\n")
++                }
++                for _ in 0..a.indent {
++                    self.dst.push_str(" ");
++                }
++            },
++            None => {
++                if first.get() {
++                    self.dst.push_str("[")
++                } else {
++                    self.dst.push_str(", ")
++                }
++            },
++        }
++        Ok(())
++    }
++
++    fn array_type(&mut self, type_: &'static str) -> Result<(), Error> {
++        let prev = match self.state {
++            State::Array { type_, .. } => type_,
++            _ => return Ok(()),
++        };
++        if let Some(prev) = prev.get() {
++            if prev != type_ {
++                return Err(Error::ArrayMixedType)
++            }
++        } else {
++            prev.set(Some(type_));
++        }
++        Ok(())
++    }
++
++    fn escape_key(&mut self, key: &str) -> Result<(), Error> {
++        let ok = key.chars().all(|c| {
++            match c {
++                'a' ... 'z' |
++                'A' ... 'Z' |
++                '0' ... '9' |
++                '-' | '_' => true,
++                _ => false,
++            }
++        });
++        if ok {
++            drop(write!(self.dst, "{}", key));
++        } else {
++            self.emit_str(key)?;
++        }
++        Ok(())
++    }
++
++    fn emit_str(&mut self, value: &str) -> Result<(), Error> {
++        let do_pretty = if self.settings.pretty_string {
++            value.contains('\n')
++        } else {
++            false
++        };
++        if do_pretty {
++            drop(write!(self.dst, "'''\n"));
++        } else {
++            drop(write!(self.dst, "\""));
++        }
++        for ch in value.chars() {
++            match ch {
++                '\u{8}' => drop(write!(self.dst, "\\b")),
++                '\u{9}' => drop(write!(self.dst, "\\t")),
++                '\u{a}' => {
++                    if do_pretty {
++                        drop(write!(self.dst, "\n"));
++                    } else {
++                        drop(write!(self.dst, "\\n"));
++                    }
++                },
++                '\u{c}' => drop(write!(self.dst, "\\f")),
++                '\u{d}' => drop(write!(self.dst, "\\r")),
++                '\u{22}' => {
++                    if do_pretty {
++                        drop(write!(self.dst, "\""))
++                    } else {
++                        drop(write!(self.dst, "\\\""))
++                    }
++                },
++                '\u{5c}' => drop(write!(self.dst, "\\\\")),
++                c if c < '\u{1f}' => {
++                    drop(write!(self.dst, "\\u{:04X}", ch as u32))
++                }
++                ch => drop(write!(self.dst, "{}", ch)),
++            }
++        }
++        if do_pretty {
++            drop(write!(self.dst, "'''"));
++        } else {
++            drop(write!(self.dst, "\""));
++        }
++        Ok(())
++    }
++
++    fn emit_table_header(&mut self, state: &State) -> Result<(), Error> {
++        let array_of_tables = match *state {
++            State::End => return Ok(()),
++            State::Array { .. } => true,
++            _ => false,
++        };
++
++        // Unlike [..]s, we can't omit [[..]] ancestors, so be sure to emit table
++        // headers for them.
++        let mut p = state;
++        if let State::Array { first, parent, .. } = *state {
++            if first.get() {
++                p = parent;
++            }
++        }
++        while let State::Table { first, parent, .. } = *p {
++            p = parent;
++            if !first.get() {
++                break;
++            }
++            if let State::Array { parent: &State::Table {..}, ..} = *parent {
++                self.emit_table_header(parent)?;
++                break;
++            }
++        }
++
++        match *state {
++            State::Table { first, .. } |
++            State::Array { parent: &State::Table { first, .. }, .. } => {
++                if !first.get() {
++                    self.dst.push_str("\n");
++                }
++            }
++            _ => {}
++        }
++        self.dst.push_str("[");
++        if array_of_tables {
++            self.dst.push_str("[");
++        }
++        self.emit_key_part(state)?;
++        if array_of_tables {
++            self.dst.push_str("]");
++        }
++        self.dst.push_str("]\n");
++        Ok(())
++    }
++
++    fn emit_key_part(&mut self, key: &State) -> Result<bool, Error> {
++        match *key {
++            State::Array { parent, .. } => self.emit_key_part(parent),
++            State::End => Ok(true),
++            State::Table { key, parent, table_emitted, .. } => {
++                table_emitted.set(true);
++                let first  = self.emit_key_part(parent)?;
++                if !first {
++                    self.dst.push_str(".");
++                }
++                self.escape_key(key)?;
++                Ok(false)
++            }
++        }
++    }
++}
++
++impl<'a, 'b> ser::Serializer for &'b mut Serializer<'a> {
++    type Ok = ();
++    type Error = Error;
++    type SerializeSeq = SerializeSeq<'a, 'b>;
++    type SerializeTuple = ser::Impossible<(), Error>;
++    type SerializeTupleStruct = ser::Impossible<(), Error>;
++    type SerializeTupleVariant = ser::Impossible<(), Error>;
++    type SerializeMap = SerializeTable<'a, 'b>;
++    type SerializeStruct = SerializeTable<'a, 'b>;
++    type SerializeStructVariant = ser::Impossible<(), Error>;
++
++    fn serialize_bool(self, v: bool) -> Result<(), Self::Error> {
++        self.display(v, "bool")
++    }
++
++    fn serialize_i8(self, v: i8) -> Result<(), Self::Error> {
++        self.display(v, "integer")
++    }
++
++    fn serialize_i16(self, v: i16) -> Result<(), Self::Error> {
++        self.display(v, "integer")
++    }
++
++    fn serialize_i32(self, v: i32) -> Result<(), Self::Error> {
++        self.display(v, "integer")
++    }
++
++    fn serialize_i64(self, v: i64) -> Result<(), Self::Error> {
++        self.display(v, "integer")
++    }
++
++    fn serialize_u8(self, v: u8) -> Result<(), Self::Error> {
++        self.display(v, "integer")
++    }
++
++    fn serialize_u16(self, v: u16) -> Result<(), Self::Error> {
++        self.display(v, "integer")
++    }
++
++    fn serialize_u32(self, v: u32) -> Result<(), Self::Error> {
++        self.display(v, "integer")
++    }
++
++    fn serialize_u64(self, v: u64) -> Result<(), Self::Error> {
++        self.display(v, "integer")
++    }
++
++    fn serialize_f32(mut self, v: f32) -> Result<(), Self::Error> {
++        if !v.is_finite() {
++            return Err(Error::NumberInvalid);
++        }
++
++        self.emit_key("float")?;
++        drop(write!(self.dst, "{}", v));
++        if v % 1.0 == 0.0 {
++            drop(write!(self.dst, ".0"));
++        }
++        if let State::Table { .. } = self.state {
++            self.dst.push_str("\n");
++        }
++        Ok(())
++    }
++
++    fn serialize_f64(mut self, v: f64) -> Result<(), Self::Error> {
++        if !v.is_finite() {
++            return Err(Error::NumberInvalid);
++        }
++
++        self.emit_key("float")?;
++        drop(write!(self.dst, "{}", v));
++        if v % 1.0 == 0.0 {
++            drop(write!(self.dst, ".0"));
++        }
++        if let State::Table { .. } = self.state {
++            self.dst.push_str("\n");
++        }
++        Ok(())
++    }
++
++    fn serialize_char(self, v: char) -> Result<(), Self::Error> {
++        let mut buf = [0; 4];
++        self.serialize_str(v.encode_utf8(&mut buf))
++    }
++
++    fn serialize_str(mut self, value: &str) -> Result<(), Self::Error> {
++        self.emit_key("string")?;
++        self.emit_str(value)?;
++        if let State::Table { .. } = self.state {
++            self.dst.push_str("\n");
++        }
++        Ok(())
++    }
++
++    fn serialize_bytes(self, value: &[u8]) -> Result<(), Self::Error> {
++        use serde::ser::Serialize;
++        value.serialize(self)
++    }
++
++    fn serialize_none(self) -> Result<(), Self::Error> {
++        Err(Error::UnsupportedNone)
++    }
++
++    fn serialize_some<T: ?Sized>(self, value: &T) -> Result<(), Self::Error>
++        where T: ser::Serialize
++    {
++        value.serialize(self)
++    }
++
++    fn serialize_unit(self) -> Result<(), Self::Error> {
++        Err(Error::UnsupportedType)
++    }
++
++    fn serialize_unit_struct(self,
++                             _name: &'static str)
++                             -> Result<(), Self::Error> {
++        Err(Error::UnsupportedType)
++    }
++
++    fn serialize_unit_variant(self,
++                              _name: &'static str,
++                              _variant_index: u32,
++                              variant: &'static str)
++                              -> Result<(), Self::Error> {
++        self.serialize_str(variant)
++    }
++
++    fn serialize_newtype_struct<T: ?Sized>(self, _name: &'static str, value: &T)
++                                           -> Result<(), Self::Error>
++        where T: ser::Serialize,
++    {
++        value.serialize(self)
++    }
++
++    fn serialize_newtype_variant<T: ?Sized>(self,
++                                            _name: &'static str,
++                                            _variant_index: u32,
++                                            _variant: &'static str,
++                                            _value: &T)
++                                            -> Result<(), Self::Error>
++        where T: ser::Serialize,
++    {
++        Err(Error::UnsupportedType)
++    }
++
++    fn serialize_seq(mut self, _len: Option<usize>)
++                     -> Result<Self::SerializeSeq, Self::Error> {
++        self.array_type("array")?;
++        Ok(SerializeSeq {
++            ser: self,
++            first: Cell::new(true),
++            type_: Cell::new(None),
++        })
++    }
++
++    fn serialize_tuple(self, _len: usize)
++                       -> Result<Self::SerializeTuple, Self::Error> {
++        Err(Error::UnsupportedType)
++    }
++
++    fn serialize_tuple_struct(self, _name: &'static str, _len: usize)
++                              -> Result<Self::SerializeTupleStruct, Self::Error> {
++        Err(Error::UnsupportedType)
++    }
++
++    fn serialize_tuple_variant(self,
++                               _name: &'static str,
++                               _variant_index: u32,
++                               _variant: &'static str,
++                               _len: usize)
++                               -> Result<Self::SerializeTupleVariant, Self::Error> {
++        Err(Error::UnsupportedType)
++    }
++
++    fn serialize_map(mut self, _len: Option<usize>)
++                     -> Result<Self::SerializeMap, Self::Error> {
++        self.array_type("table")?;
++        Ok(SerializeTable::Table {
++            ser: self,
++            key: String::new(),
++            first: Cell::new(true),
++            table_emitted: Cell::new(false),
++        })
++    }
++
++    fn serialize_struct(mut self, name: &'static str, _len: usize)
++                        -> Result<Self::SerializeStruct, Self::Error> {
++        if name == SERDE_STRUCT_NAME {
++            self.array_type("datetime")?;
++            Ok(SerializeTable::Datetime(self))
++        } else {
++            self.array_type("table")?;
++            Ok(SerializeTable::Table {
++                ser: self,
++                key: String::new(),
++                first: Cell::new(true),
++                table_emitted: Cell::new(false),
++            })
++        }
++    }
++
++    fn serialize_struct_variant(self,
++                                _name: &'static str,
++                                _variant_index: u32,
++                                _variant: &'static str,
++                                _len: usize)
++                                -> Result<Self::SerializeStructVariant, Self::Error> {
++        Err(Error::UnsupportedType)
++    }
++}
++
++impl<'a, 'b> ser::SerializeSeq for SerializeSeq<'a, 'b> {
++    type Ok = ();
++    type Error = Error;
++
++    fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), Error>
++        where T: ser::Serialize,
++    {
++        value.serialize(&mut Serializer {
++            dst: &mut *self.ser.dst,
++            state: State::Array {
++                parent: &self.ser.state,
++                first: &self.first,
++                type_: &self.type_,
++            },
++            settings: self.ser.settings.clone(),
++        })?;
++        self.first.set(false);
++        Ok(())
++    }
++
++    fn end(self) -> Result<(), Error> {
++        match self.type_.get() {
++            Some("table") => return Ok(()),
++            Some(_) => {
++                match self.ser.settings.array {
++                    Some(ref a) => {
++                        if a.trailing_comma {
++                            self.ser.dst.push_str(",");
++                        }
++                        self.ser.dst.push_str("\n]");
++                    },
++                    None => {
++                        self.ser.dst.push_str("]");
++                    }
++                }
++            }
++            None => {
++                assert!(self.first.get());
++                self.ser.emit_key("array")?;
++                self.ser.dst.push_str("[]")
++            }
++        }
++        if let State::Table { .. } = self.ser.state {
++            self.ser.dst.push_str("\n");
++        }
++        Ok(())
++    }
++}
++
++impl<'a, 'b> ser::SerializeMap for SerializeTable<'a, 'b> {
++    type Ok = ();
++    type Error = Error;
++
++    fn serialize_key<T: ?Sized>(&mut self, input: &T) -> Result<(), Error>
++        where T: ser::Serialize,
++    {
++        match *self {
++            SerializeTable::Datetime(_) => panic!(), // shouldn't be possible
++            SerializeTable::Table { ref mut key, .. } => {
++                key.truncate(0);
++                *key = input.serialize(StringExtractor)?;
++            }
++        }
++        Ok(())
++    }
++
++    fn serialize_value<T: ?Sized>(&mut self, value: &T) -> Result<(), Error>
++        where T: ser::Serialize,
++    {
++        match *self {
++            SerializeTable::Datetime(_) => panic!(), // shouldn't be possible
++            SerializeTable::Table {
++                ref mut ser,
++                ref key,
++                ref first,
++                ref table_emitted,
++                ..
++            } => {
++                let res = value.serialize(&mut Serializer {
++                    dst: &mut *ser.dst,
++                    state: State::Table {
++                        key: key,
++                        parent: &ser.state,
++                        first: first,
++                        table_emitted: table_emitted,
++                    },
++                    settings: ser.settings.clone(),
++                });
++                match res {
++                    Ok(()) => first.set(false),
++                    Err(Error::UnsupportedNone) => {},
++                    Err(e) => return Err(e),
++                }
++            }
++        }
++        Ok(())
++    }
++
++    fn end(self) -> Result<(), Error> {
++        match self {
++            SerializeTable::Datetime(_) => panic!(), // shouldn't be possible
++            SerializeTable::Table { mut ser, first, ..  } => {
++                if first.get() {
++                    let state = ser.state.clone();
++                    ser.emit_table_header(&state)?;
++                }
++            }
++        }
++        Ok(())
++    }
++}
++
++impl<'a, 'b> ser::SerializeStruct for SerializeTable<'a, 'b> {
++    type Ok = ();
++    type Error = Error;
++
++    fn serialize_field<T: ?Sized>(&mut self, key: &'static str, value: &T)
++                                  -> Result<(), Error>
++        where T: ser::Serialize,
++    {
++        match *self {
++            SerializeTable::Datetime(ref mut ser) => {
++                if key == SERDE_STRUCT_FIELD_NAME {
++                    value.serialize(DateStrEmitter(&mut *ser))?;
++                } else {
++                    return Err(Error::DateInvalid)
++                }
++            }
++            SerializeTable::Table {
++                ref mut ser,
++                ref first,
++                ref table_emitted,
++                ..
++            } => {
++                let res = value.serialize(&mut Serializer {
++                    dst: &mut *ser.dst,
++                    state: State::Table {
++                        key: key,
++                        parent: &ser.state,
++                        first: first,
++                        table_emitted: table_emitted,
++                    },
++                    settings: ser.settings.clone(),
++                });
++                match res {
++                    Ok(()) => first.set(false),
++                    Err(Error::UnsupportedNone) => {},
++                    Err(e) => return Err(e),
++                }
++            }
++        }
++        Ok(())
++    }
++
++    fn end(self) -> Result<(), Error> {
++        match self {
++            SerializeTable::Datetime(_) => {},
++            SerializeTable::Table { mut ser, first, ..  } => {
++                if first.get() {
++                    let state = ser.state.clone();
++                    ser.emit_table_header(&state)?;
++                }
++            }
++        }
++        Ok(())
++    }
++}
++
++struct DateStrEmitter<'a: 'b, 'b>(&'b mut Serializer<'a>);
++
++impl<'a, 'b> ser::Serializer for DateStrEmitter<'a, 'b> {
++    type Ok = ();
++    type Error = Error;
++    type SerializeSeq = ser::Impossible<(), Error>;
++    type SerializeTuple = ser::Impossible<(), Error>;
++    type SerializeTupleStruct = ser::Impossible<(), Error>;
++    type SerializeTupleVariant = ser::Impossible<(), Error>;
++    type SerializeMap = ser::Impossible<(), Error>;
++    type SerializeStruct = ser::Impossible<(), Error>;
++    type SerializeStructVariant = ser::Impossible<(), Error>;
++
++    fn serialize_bool(self, _v: bool) -> Result<(), Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_i8(self, _v: i8) -> Result<(), Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_i16(self, _v: i16) -> Result<(), Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_i32(self, _v: i32) -> Result<(), Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_i64(self, _v: i64) -> Result<(), Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_u8(self, _v: u8) -> Result<(), Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_u16(self, _v: u16) -> Result<(), Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_u32(self, _v: u32) -> Result<(), Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_u64(self, _v: u64) -> Result<(), Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_f32(self, _v: f32) -> Result<(), Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_f64(self, _v: f64) -> Result<(), Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_char(self, _v: char) -> Result<(), Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_str(self, value: &str) -> Result<(), Self::Error> {
++        self.0.display(value, "datetime")?;
++        Ok(())
++    }
++
++    fn serialize_bytes(self, _value: &[u8]) -> Result<(), Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_none(self) -> Result<(), Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_some<T: ?Sized>(self, _value: &T) -> Result<(), Self::Error>
++        where T: ser::Serialize
++    {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_unit(self) -> Result<(), Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_unit_struct(self,
++                             _name: &'static str)
++                             -> Result<(), Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_unit_variant(self,
++                              _name: &'static str,
++                              _variant_index: u32,
++                              _variant: &'static str)
++                              -> Result<(), Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_newtype_struct<T: ?Sized>(self, _name: &'static str, _value: &T)
++                                           -> Result<(), Self::Error>
++        where T: ser::Serialize,
++    {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_newtype_variant<T: ?Sized>(self,
++                                            _name: &'static str,
++                                            _variant_index: u32,
++                                            _variant: &'static str,
++                                            _value: &T)
++                                            -> Result<(), Self::Error>
++        where T: ser::Serialize,
++    {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_seq(self, _len: Option<usize>)
++                     -> Result<Self::SerializeSeq, Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_tuple(self, _len: usize)
++                       -> Result<Self::SerializeTuple, Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_tuple_struct(self, _name: &'static str, _len: usize)
++                              -> Result<Self::SerializeTupleStruct, Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_tuple_variant(self,
++                               _name: &'static str,
++                               _variant_index: u32,
++                               _variant: &'static str,
++                               _len: usize)
++                               -> Result<Self::SerializeTupleVariant, Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_map(self, _len: Option<usize>)
++                     -> Result<Self::SerializeMap, Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_struct(self, _name: &'static str, _len: usize)
++                        -> Result<Self::SerializeStruct, Self::Error> {
++        Err(Error::DateInvalid)
++    }
++
++    fn serialize_struct_variant(self,
++                                _name: &'static str,
++                                _variant_index: u32,
++                                _variant: &'static str,
++                                _len: usize)
++                                -> Result<Self::SerializeStructVariant, Self::Error> {
++        Err(Error::DateInvalid)
++    }
++}
++
++struct StringExtractor;
++
++impl ser::Serializer for StringExtractor {
++    type Ok = String;
++    type Error = Error;
++    type SerializeSeq = ser::Impossible<String, Error>;
++    type SerializeTuple = ser::Impossible<String, Error>;
++    type SerializeTupleStruct = ser::Impossible<String, Error>;
++    type SerializeTupleVariant = ser::Impossible<String, Error>;
++    type SerializeMap = ser::Impossible<String, Error>;
++    type SerializeStruct = ser::Impossible<String, Error>;
++    type SerializeStructVariant = ser::Impossible<String, Error>;
++
++    fn serialize_bool(self, _v: bool) -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_i8(self, _v: i8) -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_i16(self, _v: i16) -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_i32(self, _v: i32) -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_i64(self, _v: i64) -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_u8(self, _v: u8) -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_u16(self, _v: u16) -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_u32(self, _v: u32) -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_u64(self, _v: u64) -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_f32(self, _v: f32) -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_f64(self, _v: f64) -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_char(self, _v: char) -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_str(self, value: &str) -> Result<String, Self::Error> {
++        Ok(value.to_string())
++    }
++
++    fn serialize_bytes(self, _value: &[u8]) -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_none(self) -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_some<T: ?Sized>(self, _value: &T) -> Result<String, Self::Error>
++        where T: ser::Serialize
++    {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_unit(self) -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_unit_struct(self,
++                             _name: &'static str)
++                             -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_unit_variant(self,
++                              _name: &'static str,
++                              _variant_index: u32,
++                              _variant: &'static str)
++                              -> Result<String, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_newtype_struct<T: ?Sized>(self, _name: &'static str, _value: &T)
++                                           -> Result<String, Self::Error>
++        where T: ser::Serialize,
++    {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_newtype_variant<T: ?Sized>(self,
++                                            _name: &'static str,
++                                            _variant_index: u32,
++                                            _variant: &'static str,
++                                            _value: &T)
++                                            -> Result<String, Self::Error>
++        where T: ser::Serialize,
++    {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_seq(self, _len: Option<usize>)
++                     -> Result<Self::SerializeSeq, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_tuple(self, _len: usize)
++                       -> Result<Self::SerializeTuple, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_tuple_struct(self, _name: &'static str, _len: usize)
++                              -> Result<Self::SerializeTupleStruct, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_tuple_variant(self,
++                               _name: &'static str,
++                               _variant_index: u32,
++                               _variant: &'static str,
++                               _len: usize)
++                               -> Result<Self::SerializeTupleVariant, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_map(self, _len: Option<usize>)
++                     -> Result<Self::SerializeMap, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_struct(self, _name: &'static str, _len: usize)
++                        -> Result<Self::SerializeStruct, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++
++    fn serialize_struct_variant(self,
++                                _name: &'static str,
++                                _variant_index: u32,
++                                _variant: &'static str,
++                                _len: usize)
++                                -> Result<Self::SerializeStructVariant, Self::Error> {
++        Err(Error::KeyNotString)
++    }
++}
++
++impl fmt::Display for Error {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        match *self {
++            Error::UnsupportedType => "unsupported Rust type".fmt(f),
++            Error::KeyNotString => "map key was not a string".fmt(f),
++            Error::ArrayMixedType => "arrays cannot have mixed types".fmt(f),
++            Error::ValueAfterTable => "values must be emitted before tables".fmt(f),
++            Error::DateInvalid => "a serialized date was invalid".fmt(f),
++            Error::NumberInvalid => "a serialized number was invalid".fmt(f),
++            Error::UnsupportedNone => "unsupported None value".fmt(f),
++            Error::Custom(ref s) => s.fmt(f),
++            Error::KeyNewline => unreachable!(),
++            Error::__Nonexhaustive => panic!(),
++        }
++    }
++}
++
++impl error::Error for Error {
++    fn description(&self) -> &str {
++        match *self {
++            Error::UnsupportedType => "unsupported Rust type",
++            Error::KeyNotString => "map key was not a string",
++            Error::ArrayMixedType => "arrays cannot have mixed types",
++            Error::ValueAfterTable => "values must be emitted before tables",
++            Error::DateInvalid => "a serialized date was invalid",
++            Error::NumberInvalid => "a serialized number was invalid",
++            Error::UnsupportedNone => "unsupported None value",
++            Error::Custom(_) => "custom error",
++            Error::KeyNewline => unreachable!(),
++            Error::__Nonexhaustive => panic!(),
++        }
++    }
++}
++
++impl ser::Error for Error {
++    fn custom<T: fmt::Display>(msg: T) -> Error {
++        Error::Custom(msg.to_string())
++    }
++}
++
++enum Category {
++    Primitive,
++    Array,
++    Table,
++}
++
++/// Convenience function to serialize items in a map in an order valid with
++/// TOML.
++///
++/// TOML carries the restriction that keys in a table must be serialized last if
++/// their value is a table itself. This isn't always easy to guarantee, so this
++/// helper can be used like so:
++///
++/// ```rust
++/// # #[macro_use] extern crate serde_derive;
++/// # extern crate toml;
++/// # use std::collections::HashMap;
++/// #[derive(Serialize)]
++/// struct Manifest {
++///     package: Package,
++///     #[serde(serialize_with = "toml::ser::tables_last")]
++///     dependencies: HashMap<String, Dependency>,
++/// }
++/// # type Package = String;
++/// # type Dependency = String;
++/// # fn main() {}
++/// ```
++pub fn tables_last<'a, I, K, V, S>(data: &'a I, serializer: S)
++                                   -> Result<S::Ok, S::Error>
++    where &'a I: IntoIterator<Item = (K, V)>,
++          K: ser::Serialize,
++          V: ser::Serialize,
++          S: ser::Serializer
++{
++    use serde::ser::SerializeMap;
++
++    let mut map = serializer.serialize_map(None)?;
++    for (k, v) in data {
++        if let Category::Primitive = v.serialize(Categorize::new())? {
++            map.serialize_entry(&k, &v)?;
++        }
++    }
++    for (k, v) in data {
++        if let Category::Array = v.serialize(Categorize::new())? {
++            map.serialize_entry(&k, &v)?;
++        }
++    }
++    for (k, v) in data {
++        if let Category::Table = v.serialize(Categorize::new())? {
++            map.serialize_entry(&k, &v)?;
++        }
++    }
++    map.end()
++}
++
++struct Categorize<E>(marker::PhantomData<E>);
++
++impl<E> Categorize<E> {
++    fn new() -> Self {
++        Categorize(marker::PhantomData)
++    }
++}
++
++impl<E: ser::Error> ser::Serializer for Categorize<E> {
++    type Ok = Category;
++    type Error = E;
++    type SerializeSeq = Self;
++    type SerializeTuple = ser::Impossible<Category, E>;
++    type SerializeTupleStruct = ser::Impossible<Category, E>;
++    type SerializeTupleVariant = ser::Impossible<Category, E>;
++    type SerializeMap = Self;
++    type SerializeStruct = Self;
++    type SerializeStructVariant = ser::Impossible<Category, E>;
++
++    fn serialize_bool(self, _: bool) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Primitive)
++    }
++
++    fn serialize_i8(self, _: i8) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Primitive)
++    }
++
++    fn serialize_i16(self, _: i16) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Primitive)
++    }
++
++    fn serialize_i32(self, _: i32) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Primitive)
++    }
++
++    fn serialize_i64(self, _: i64) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Primitive)
++    }
++
++    fn serialize_u8(self, _: u8) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Primitive)
++    }
++
++    fn serialize_u16(self, _: u16) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Primitive)
++    }
++
++    fn serialize_u32(self, _: u32) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Primitive)
++    }
++
++    fn serialize_u64(self, _: u64) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Primitive)
++    }
++
++    fn serialize_f32(self, _: f32) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Primitive)
++    }
++
++    fn serialize_f64(self, _: f64) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Primitive)
++    }
++
++    fn serialize_char(self, _: char) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Primitive)
++    }
++
++    fn serialize_str(self, _: &str) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Primitive)
++    }
++
++    fn serialize_bytes(self, _: &[u8]) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Array)
++    }
++
++    fn serialize_none(self) -> Result<Self::Ok, Self::Error> {
++        Err(ser::Error::custom("unsupported"))
++    }
++
++    fn serialize_some<T: ?Sized + ser::Serialize>(self, v: &T) -> Result<Self::Ok, Self::Error> {
++        v.serialize(self)
++    }
++
++    fn serialize_unit(self) -> Result<Self::Ok, Self::Error> {
++        Err(ser::Error::custom("unsupported"))
++    }
++
++    fn serialize_unit_struct(self, _: &'static str) -> Result<Self::Ok, Self::Error> {
++        Err(ser::Error::custom("unsupported"))
++    }
++
++    fn serialize_unit_variant(self, _: &'static str, _: u32, _: &'static str) -> Result<Self::Ok, Self::Error> {
++        Err(ser::Error::custom("unsupported"))
++    }
++
++    fn serialize_newtype_struct<T: ?Sized + ser::Serialize>(self, _: &'static str, v: &T) -> Result<Self::Ok, Self::Error> {
++        v.serialize(self)
++    }
++
++    fn serialize_newtype_variant<T: ?Sized + ser::Serialize>(self, _: &'static str, _: u32, _: &'static str, _: &T) -> Result<Self::Ok, Self::Error> {
++        Err(ser::Error::custom("unsupported"))
++    }
++
++    fn serialize_seq(self, _: Option<usize>) -> Result<Self, Self::Error> {
++        Ok(self)
++    }
++
++    fn serialize_tuple(self, _: usize) -> Result<Self::SerializeTuple, Self::Error> {
++        Err(ser::Error::custom("unsupported"))
++    }
++
++    fn serialize_tuple_struct(self, _: &'static str, _: usize) -> Result<Self::SerializeTupleStruct, Self::Error> {
++        Err(ser::Error::custom("unsupported"))
++    }
++
++    fn serialize_tuple_variant(self, _: &'static str, _: u32, _: &'static str, _: usize) -> Result<Self::SerializeTupleVariant, Self::Error> {
++        Err(ser::Error::custom("unsupported"))
++    }
++
++    fn serialize_map(self, _: Option<usize>) -> Result<Self, Self::Error> {
++        Ok(self)
++    }
++
++    fn serialize_struct(self, _: &'static str, _: usize) -> Result<Self, Self::Error> {
++        Ok(self)
++    }
++
++    fn serialize_struct_variant(self, _: &'static str, _: u32, _: &'static str, _: usize) -> Result<Self::SerializeStructVariant, Self::Error> {
++        Err(ser::Error::custom("unsupported"))
++    }
++}
++
++impl<E: ser::Error> ser::SerializeSeq for Categorize<E> {
++    type Ok = Category;
++    type Error = E;
++
++    fn serialize_element<T: ?Sized + ser::Serialize>(&mut self, _: &T)
++                                                     -> Result<(), Self::Error> {
++        Ok(())
++    }
++
++    fn end(self) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Array)
++    }
++}
++
++impl<E: ser::Error> ser::SerializeMap for Categorize<E> {
++    type Ok = Category;
++    type Error = E;
++
++    fn serialize_key<T: ?Sized + ser::Serialize>(&mut self, _: &T)
++                                                 -> Result<(), Self::Error> {
++        Ok(())
++    }
++
++    fn serialize_value<T: ?Sized + ser::Serialize>(&mut self, _: &T)
++                                                   -> Result<(), Self::Error> {
++        Ok(())
++    }
++
++    fn end(self) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Table)
++    }
++}
++
++impl<E: ser::Error> ser::SerializeStruct for Categorize<E> {
++    type Ok = Category;
++    type Error = E;
++
++    fn serialize_field<T: ?Sized>(&mut self,
++                                  _: &'static str,
++                                  _: &T) -> Result<(), Self::Error>
++        where T: ser::Serialize,
++    {
++        Ok(())
++    }
++
++    fn end(self) -> Result<Self::Ok, Self::Error> {
++        Ok(Category::Table)
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..11f47f56829edd690ca08c11bf9d0dee343a5b16
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,620 @@@
++use std::borrow::Cow;
++use std::char;
++use std::str;
++use std::string;
++
++use self::Token::*;
++
++#[derive(Eq, PartialEq, Debug)]
++pub enum Token<'a> {
++    Whitespace(&'a str),
++    Newline,
++    Comment(&'a str),
++
++    Equals,
++    Period,
++    Comma,
++    Colon,
++    Plus,
++    LeftBrace,
++    RightBrace,
++    LeftBracket,
++    RightBracket,
++
++    Keylike(&'a str),
++    String { src: &'a str, val: Cow<'a, str> },
++}
++
++#[derive(Eq, PartialEq, Debug)]
++pub enum Error {
++    InvalidCharInString(usize, char),
++    InvalidEscape(usize, char),
++    InvalidHexEscape(usize, char),
++    InvalidEscapeValue(usize, u32),
++    NewlineInString(usize),
++    Unexpected(usize, char),
++    UnterminatedString(usize),
++    NewlineInTableKey(usize),
++    EmptyTableKey(usize),
++    Wanted { at: usize, expected: &'static str, found: &'static str },
++}
++
++#[derive(Clone)]
++pub struct Tokenizer<'a> {
++    input: &'a str,
++    chars: CrlfFold<'a>,
++}
++
++#[derive(Clone)]
++struct CrlfFold<'a> {
++    chars: str::CharIndices<'a>,
++}
++
++#[derive(Debug)]
++enum MaybeString {
++    NotEscaped(usize),
++    Owned(string::String),
++}
++
++impl<'a> Tokenizer<'a> {
++    pub fn new(input: &'a str) -> Tokenizer<'a> {
++        let mut t = Tokenizer {
++            input: input,
++            chars: CrlfFold {
++                chars: input.char_indices(),
++            },
++        };
++        // Eat utf-8 BOM
++        t.eatc('\u{feff}');
++        t
++    }
++
++    pub fn next(&mut self) -> Result<Option<Token<'a>>, Error> {
++        let token = match self.chars.next() {
++            Some((_, '\n')) => Newline,
++            Some((start, ' ')) => self.whitespace_token(start),
++            Some((start, '\t')) => self.whitespace_token(start),
++            Some((start, '#')) => self.comment_token(start),
++            Some((_, '=')) => Equals,
++            Some((_, '.')) => Period,
++            Some((_, ',')) => Comma,
++            Some((_, ':')) => Colon,
++            Some((_, '+')) => Plus,
++            Some((_, '{')) => LeftBrace,
++            Some((_, '}')) => RightBrace,
++            Some((_, '[')) => LeftBracket,
++            Some((_, ']')) => RightBracket,
++            Some((start, '\'')) => return self.literal_string(start).map(Some),
++            Some((start, '"')) => return self.basic_string(start).map(Some),
++            Some((start, ch)) if is_keylike(ch) => self.keylike(start),
++
++            Some((start, ch)) => return Err(Error::Unexpected(start, ch)),
++            None => return Ok(None),
++        };
++        Ok(Some(token))
++    }
++
++    pub fn peek(&mut self) -> Result<Option<Token<'a>>, Error> {
++        self.clone().next()
++    }
++
++    pub fn eat(&mut self, expected: Token<'a>) -> Result<bool, Error> {
++        match self.peek()? {
++            Some(ref found) if expected == *found => {}
++            Some(_) => return Ok(false),
++            None => return Ok(false),
++        }
++        drop(self.next());
++        Ok(true)
++    }
++
++    pub fn expect(&mut self, expected: Token<'a>) -> Result<(), Error> {
++        let current = self.current();
++        match self.next()? {
++            Some(found) => {
++                if expected == found {
++                    Ok(())
++                } else {
++                    Err(Error::Wanted {
++                        at: current,
++                        expected: expected.describe(),
++                        found: found.describe(),
++                    })
++                }
++            }
++            None => {
++                Err(Error::Wanted {
++                    at: self.input.len(),
++                    expected: expected.describe(),
++                    found: "eof",
++                })
++            }
++        }
++    }
++
++    pub fn table_key(&mut self) -> Result<Cow<'a, str>, Error> {
++        let current = self.current();
++        match self.next()? {
++            Some(Token::Keylike(k)) => Ok(k.into()),
++            Some(Token::String { src, val }) => {
++                let offset = self.substr_offset(src);
++                if val == "" {
++                    return Err(Error::EmptyTableKey(offset))
++                }
++                match src.find('\n') {
++                    None => Ok(val),
++                    Some(i) => Err(Error::NewlineInTableKey(offset + i)),
++                }
++            }
++            Some(other) => {
++                Err(Error::Wanted {
++                    at: current,
++                    expected: "a table key",
++                    found: other.describe(),
++                })
++            }
++            None => {
++                Err(Error::Wanted {
++                    at: self.input.len(),
++                    expected: "a table key",
++                    found: "eof",
++                })
++            }
++        }
++    }
++
++    pub fn eat_whitespace(&mut self) -> Result<(), Error> {
++        while self.eatc(' ') || self.eatc('\t') {
++            // ...
++        }
++        Ok(())
++    }
++
++    pub fn eat_comment(&mut self) -> Result<bool, Error> {
++        if !self.eatc('#') {
++            return Ok(false)
++        }
++        drop(self.comment_token(0));
++        self.eat_newline_or_eof().map(|()| true)
++    }
++
++    pub fn eat_newline_or_eof(&mut self) -> Result<(), Error> {
++        let current = self.current();
++        match self.next()? {
++            None |
++            Some(Token::Newline) => Ok(()),
++            Some(other) => {
++                Err(Error::Wanted {
++                    at: current,
++                    expected: "newline",
++                    found: other.describe(),
++                })
++            }
++        }
++    }
++
++    pub fn skip_to_newline(&mut self) {
++        loop {
++            match self.chars.next() {
++                Some((_, '\n')) |
++                None => break,
++                _ => {}
++            }
++        }
++    }
++
++    fn eatc(&mut self, ch: char) -> bool {
++        match self.chars.clone().next() {
++            Some((_, ch2)) if ch == ch2 => {
++                self.chars.next();
++                true
++            }
++            _ => false,
++        }
++    }
++
++    pub fn current(&mut self) -> usize {
++        self.chars.clone().next().map(|i| i.0).unwrap_or(self.input.len())
++    }
++
++    pub fn input(&self) -> &'a str {
++        self.input
++    }
++
++    fn whitespace_token(&mut self, start: usize) -> Token<'a> {
++        while self.eatc(' ') || self.eatc('\t') {
++            // ...
++        }
++        Whitespace(&self.input[start..self.current()])
++    }
++
++    fn comment_token(&mut self, start: usize) -> Token<'a> {
++        while let Some((_, ch)) = self.chars.clone().next() {
++            if ch != '\t' && (ch < '\u{20}' || ch > '\u{10ffff}') {
++                break
++            }
++            self.chars.next();
++        }
++        Comment(&self.input[start..self.current()])
++    }
++
++    fn read_string(&mut self,
++                   delim: char,
++                   start: usize,
++                   new_ch: &mut FnMut(&mut Tokenizer, &mut MaybeString,
++                                      bool, usize, char)
++                                     -> Result<(), Error>)
++                   -> Result<Token<'a>, Error> {
++        let mut multiline = false;
++        if self.eatc(delim) {
++            if self.eatc(delim) {
++                multiline = true;
++            } else {
++                return Ok(String {
++                    src: &self.input[start..start+2],
++                    val: Cow::Borrowed(""),
++                })
++            }
++        }
++        let mut val = MaybeString::NotEscaped(self.current());
++        let mut n = 0;
++        'outer: loop {
++            n += 1;
++            match self.chars.next() {
++                Some((i, '\n')) => {
++                    if multiline {
++                        if self.input.as_bytes()[i] == b'\r' {
++                            val.to_owned(&self.input[..i]);
++                        }
++                        if n == 1 {
++                            val = MaybeString::NotEscaped(self.current());
++                        } else {
++                            val.push('\n');
++                        }
++                        continue
++                    } else {
++                        return Err(Error::NewlineInString(i))
++                    }
++                }
++                Some((i, ch)) if ch == delim => {
++                    if multiline {
++                        for _ in 0..2 {
++                            if !self.eatc(delim) {
++                                val.push(delim);
++                                continue 'outer
++                            }
++                        }
++                    }
++                    return Ok(String {
++                        src: &self.input[start..self.current()],
++                        val: val.into_cow(&self.input[..i]),
++                    })
++                }
++                Some((i, c)) => try!(new_ch(self, &mut val, multiline, i, c)),
++                None => return Err(Error::UnterminatedString(start))
++            }
++        }
++    }
++
++    fn literal_string(&mut self, start: usize) -> Result<Token<'a>, Error> {
++        self.read_string('\'', start, &mut |_me, val, _multi, i, ch| {
++            if ch == '\u{09}' || ('\u{20}' <= ch && ch <= '\u{10ffff}') {
++                val.push(ch);
++                Ok(())
++            } else {
++                Err(Error::InvalidCharInString(i, ch))
++            }
++        })
++    }
++
++    fn basic_string(&mut self, start: usize) -> Result<Token<'a>, Error> {
++        self.read_string('"', start, &mut |me, val, multi, i, ch| {
++            match ch {
++                '\\' => {
++                    val.to_owned(&me.input[..i]);
++                    match me.chars.next() {
++                        Some((_, '"')) => val.push('"'),
++                        Some((_, '\\')) => val.push('\\'),
++                        Some((_, 'b')) => val.push('\u{8}'),
++                        Some((_, 'f')) => val.push('\u{c}'),
++                        Some((_, 'n')) => val.push('\n'),
++                        Some((_, 'r')) => val.push('\r'),
++                        Some((_, 't')) => val.push('\t'),
++                        Some((i, c @ 'u')) |
++                        Some((i, c @ 'U')) => {
++                            let len = if c == 'u' {4} else {8};
++                            val.push(try!(me.hex(start, i, len)));
++                        }
++                        Some((_, '\n')) if multi => {
++                            while let Some((_, ch)) = me.chars.clone().next() {
++                                match ch {
++                                    ' ' | '\t' | '\n' => {
++                                        me.chars.next();
++                                    }
++                                    _ => break,
++                                }
++                            }
++                        }
++                        Some((i, c)) => return Err(Error::InvalidEscape(i, c)),
++                        None => return Err(Error::UnterminatedString(start)),
++                    }
++                    Ok(())
++                }
++                ch if '\u{20}' <= ch && ch <= '\u{10ffff}' => {
++                    val.push(ch);
++                    Ok(())
++                }
++                _ => Err(Error::InvalidCharInString(i, ch))
++            }
++        })
++    }
++
++    fn hex(&mut self, start: usize, i: usize, len: usize) -> Result<char, Error> {
++        let mut val = 0;
++        for _ in 0..len {
++            match self.chars.next() {
++                Some((_, ch)) if '0' <= ch && ch <= '9' => {
++                    val = val * 16 + (ch as u32 - '0' as u32);
++                }
++                Some((_, ch)) if 'A' <= ch && ch <= 'F' => {
++                    val = val * 16 + (ch as u32 - 'A' as u32) + 10;
++                }
++                Some((i, ch)) => return Err(Error::InvalidHexEscape(i, ch)),
++                None => return Err(Error::UnterminatedString(start)),
++            }
++        }
++        match char::from_u32(val) {
++            Some(ch) => Ok(ch),
++            None => Err(Error::InvalidEscapeValue(i, val)),
++        }
++    }
++
++    fn keylike(&mut self, start: usize) -> Token<'a> {
++        while let Some((_, ch)) = self.chars.clone().next() {
++            if !is_keylike(ch) {
++                break
++            }
++            self.chars.next();
++        }
++        Keylike(&self.input[start..self.current()])
++    }
++
++    pub fn substr_offset(&self, s: &'a str) -> usize {
++        assert!(s.len() <= self.input.len());
++        let a = self.input.as_ptr() as usize;
++        let b = s.as_ptr() as usize;
++        assert!(a <= b);
++        b - a
++    }
++}
++
++impl<'a> Iterator for CrlfFold<'a> {
++    type Item = (usize, char);
++
++    fn next(&mut self) -> Option<(usize, char)> {
++        self.chars.next().map(|(i, c)| {
++            if c == '\r' {
++                let mut attempt = self.chars.clone();
++                if let Some((_, '\n')) = attempt.next() {
++                    self.chars = attempt;
++                    return (i, '\n')
++                }
++            }
++            (i, c)
++        })
++    }
++}
++
++impl MaybeString {
++    fn push(&mut self, ch: char) {
++        match *self {
++            MaybeString::NotEscaped(..) => {}
++            MaybeString::Owned(ref mut s) => s.push(ch),
++        }
++    }
++
++    fn to_owned(&mut self, input: &str) {
++        match *self {
++            MaybeString::NotEscaped(start) => {
++                *self = MaybeString::Owned(input[start..].to_owned());
++            }
++            MaybeString::Owned(..) => {}
++        }
++    }
++
++    fn into_cow(self, input: &str) -> Cow<str> {
++        match self {
++            MaybeString::NotEscaped(start) => Cow::Borrowed(&input[start..]),
++            MaybeString::Owned(s) => Cow::Owned(s),
++        }
++    }
++}
++
++fn is_keylike(ch: char) -> bool {
++    ('A' <= ch && ch <= 'Z') ||
++        ('a' <= ch && ch <= 'z') ||
++        ('0' <= ch && ch <= '9') ||
++        ch == '-' ||
++        ch == '_'
++}
++
++impl<'a> Token<'a> {
++    pub fn describe(&self) -> &'static str {
++        match *self {
++            Token::Keylike(_) => "an identifier",
++            Token::Equals => "an equals",
++            Token::Period => "a period",
++            Token::Comment(_) => "a comment",
++            Token::Newline => "a newline",
++            Token::Whitespace(_) => "whitespace",
++            Token::Comma => "a comma",
++            Token::RightBrace => "a right brace",
++            Token::LeftBrace => "a left brace",
++            Token::RightBracket => "a right bracket",
++            Token::LeftBracket => "a left bracket",
++            Token::String { .. } => "a string",
++            Token::Colon => "a colon",
++            Token::Plus => "a plus",
++        }
++    }
++}
++
++#[cfg(test)]
++mod tests {
++    use std::borrow::Cow;
++    use super::{Tokenizer, Token, Error};
++
++    fn err(input: &str, err: Error) {
++        let mut t = Tokenizer::new(input);
++        let token = t.next().unwrap_err();
++        assert_eq!(token, err);
++        assert!(t.next().unwrap().is_none());
++    }
++
++    #[test]
++    fn literal_strings() {
++        fn t(input: &str, val: &str) {
++            let mut t = Tokenizer::new(input);
++            let token = t.next().unwrap().unwrap();
++            assert_eq!(token, Token::String {
++                src: input,
++                val: Cow::Borrowed(val),
++            });
++            assert!(t.next().unwrap().is_none());
++        }
++
++        t("''", "");
++        t("''''''", "");
++        t("'''\n'''", "");
++        t("'a'", "a");
++        t("'\"a'", "\"a");
++        t("''''a'''", "'a");
++        t("'''\n'a\n'''", "'a\n");
++        t("'''a\n'a\r\n'''", "a\n'a\n");
++    }
++
++    #[test]
++    fn basic_strings() {
++        fn t(input: &str, val: &str) {
++            let mut t = Tokenizer::new(input);
++            let token = t.next().unwrap().unwrap();
++            assert_eq!(token, Token::String {
++                src: input,
++                val: Cow::Borrowed(val),
++            });
++            assert!(t.next().unwrap().is_none());
++        }
++
++        t(r#""""#, "");
++        t(r#""""""""#, "");
++        t(r#""a""#, "a");
++        t(r#""""a""""#, "a");
++        t(r#""\t""#, "\t");
++        t(r#""\u0000""#, "\0");
++        t(r#""\U00000000""#, "\0");
++        t(r#""\U000A0000""#, "\u{A0000}");
++        t(r#""\\t""#, "\\t");
++        t("\"\"\"\\\n\"\"\"", "");
++        t("\"\"\"\\\n     \t   \t  \\\r\n  \t \n  \t \r\n\"\"\"", "");
++        t(r#""\r""#, "\r");
++        t(r#""\n""#, "\n");
++        t(r#""\b""#, "\u{8}");
++        t(r#""a\fa""#, "a\u{c}a");
++        t(r#""\"a""#, "\"a");
++        t("\"\"\"\na\"\"\"", "a");
++        t("\"\"\"\n\"\"\"", "");
++        err(r#""\a"#, Error::InvalidEscape(2, 'a'));
++        err("\"\\\n", Error::InvalidEscape(2, '\n'));
++        err("\"\\\r\n", Error::InvalidEscape(2, '\n'));
++        err("\"\\", Error::UnterminatedString(0));
++        err("\"\u{0}", Error::InvalidCharInString(1, '\u{0}'));
++        err(r#""\U00""#, Error::InvalidHexEscape(5, '"'));
++        err(r#""\U00"#, Error::UnterminatedString(0));
++        err(r#""\uD800"#, Error::InvalidEscapeValue(2, 0xd800));
++        err(r#""\UFFFFFFFF"#, Error::InvalidEscapeValue(2, 0xffffffff));
++    }
++
++    #[test]
++    fn keylike() {
++        fn t(input: &str) {
++            let mut t = Tokenizer::new(input);
++            let token = t.next().unwrap().unwrap();
++            assert_eq!(token, Token::Keylike(input));
++            assert!(t.next().unwrap().is_none());
++        }
++        t("foo");
++        t("0bar");
++        t("bar0");
++        t("1234");
++        t("a-b");
++        t("a_B");
++        t("-_-");
++        t("___");
++    }
++
++    #[test]
++    fn all() {
++        fn t(input: &str, expected: &[Token]) {
++            let mut tokens = Tokenizer::new(input);
++            let mut actual = Vec::new();
++            while let Some(token) = tokens.next().unwrap() {
++                actual.push(token);
++            }
++            for (a, b) in actual.iter().zip(expected) {
++                assert_eq!(a, b);
++            }
++            assert_eq!(actual.len(), expected.len());
++        }
++
++        t(" a ", &[
++            Token::Whitespace(" "),
++            Token::Keylike("a"),
++            Token::Whitespace(" "),
++        ]);
++
++        t(" a\t [[]] \t [] {} , . =\n# foo \r\n#foo \n ", &[
++            Token::Whitespace(" "),
++            Token::Keylike("a"),
++            Token::Whitespace("\t "),
++            Token::LeftBracket,
++            Token::LeftBracket,
++            Token::RightBracket,
++            Token::RightBracket,
++            Token::Whitespace(" \t "),
++            Token::LeftBracket,
++            Token::RightBracket,
++            Token::Whitespace(" "),
++            Token::LeftBrace,
++            Token::RightBrace,
++            Token::Whitespace(" "),
++            Token::Comma,
++            Token::Whitespace(" "),
++            Token::Period,
++            Token::Whitespace(" "),
++            Token::Equals,
++            Token::Newline,
++            Token::Comment("# foo "),
++            Token::Newline,
++            Token::Comment("#foo "),
++            Token::Newline,
++            Token::Whitespace(" "),
++        ]);
++    }
++
++    #[test]
++    fn bare_cr_bad() {
++        err("\r", Error::Unexpected(0, '\r'));
++        err("'\n", Error::NewlineInString(1));
++        err("'\u{0}", Error::InvalidCharInString(1, '\u{0}'));
++        err("'", Error::UnterminatedString(0));
++        err("\u{0}", Error::Unexpected(0, '\u{0}'));
++    }
++
++    #[test]
++    fn bad_comment() {
++        let mut t = Tokenizer::new("#\u{0}");
++        t.next().unwrap().unwrap();
++        assert_eq!(t.next(), Err(Error::Unexpected(1, '\u{0}')));
++        assert!(t.next().unwrap().is_none());
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..056eac4f04e65ee097f57f8c92480ad6fa703625
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,946 @@@
++//! Definition of a TOML value
++
++use std::collections::{BTreeMap, HashMap};
++use std::hash::Hash;
++use std::fmt;
++use std::ops;
++use std::str::FromStr;
++use std::vec;
++
++use serde::ser;
++use serde::de;
++use serde::de::IntoDeserializer;
++
++pub use datetime::{Datetime, DatetimeParseError};
++use datetime::{DatetimeFromString, SERDE_STRUCT_FIELD_NAME};
++
++/// Representation of a TOML value.
++#[derive(PartialEq, Clone, Debug)]
++pub enum Value {
++    /// Represents a TOML string
++    String(String),
++    /// Represents a TOML integer
++    Integer(i64),
++    /// Represents a TOML float
++    Float(f64),
++    /// Represents a TOML boolean
++    Boolean(bool),
++    /// Represents a TOML datetime
++    Datetime(Datetime),
++    /// Represents a TOML array
++    Array(Array),
++    /// Represents a TOML table
++    Table(Table),
++}
++
++/// Type representing a TOML array, payload of the `Value::Array` variant
++pub type Array = Vec<Value>;
++
++/// Type representing a TOML table, payload of the `Value::Table` variant
++pub type Table = BTreeMap<String, Value>;
++
++impl Value {
++    /// Convert a `T` into `toml::Value` which is an enum that can represent
++    /// any valid TOML data.
++    ///
++    /// This conversion can fail if `T`'s implementation of `Serialize` decides to
++    /// fail, or if `T` contains a map with non-string keys.
++    pub fn try_from<T>(value: T) -> Result<Value, ::ser::Error>
++        where T: ser::Serialize,
++    {
++        value.serialize(Serializer)
++    }
++
++    /// Interpret a `toml::Value` as an instance of type `T`.
++    ///
++    /// This conversion can fail if the structure of the `Value` does not match the
++    /// structure expected by `T`, for example if `T` is a struct type but the
++    /// `Value` contains something other than a TOML table. It can also fail if the
++    /// structure is correct but `T`'s implementation of `Deserialize` decides that
++    /// something is wrong with the data, for example required struct fields are
++    /// missing from the TOML map or some number is too big to fit in the expected
++    /// primitive type.
++    pub fn try_into<'de, T>(self) -> Result<T, ::de::Error>
++        where T: de::Deserialize<'de>,
++    {
++        de::Deserialize::deserialize(self)
++    }
++
++    /// Index into a TOML array or map. A string index can be used to access a
++    /// value in a map, and a usize index can be used to access an element of an
++    /// array.
++    ///
++    /// Returns `None` if the type of `self` does not match the type of the
++    /// index, for example if the index is a string and `self` is an array or a
++    /// number. Also returns `None` if the given key does not exist in the map
++    /// or the given index is not within the bounds of the array.
++    pub fn get<I: Index>(&self, index: I) -> Option<&Value> {
++        index.index(self)
++    }
++
++    /// Mutably index into a TOML array or map. A string index can be used to
++    /// access a value in a map, and a usize index can be used to access an
++    /// element of an array.
++    ///
++    /// Returns `None` if the type of `self` does not match the type of the
++    /// index, for example if the index is a string and `self` is an array or a
++    /// number. Also returns `None` if the given key does not exist in the map
++    /// or the given index is not within the bounds of the array.
++    pub fn get_mut<I: Index>(&mut self, index: I) -> Option<&mut Value> {
++        index.index_mut(self)
++    }
++
++    /// Extracts the integer value if it is an integer.
++    pub fn as_integer(&self) -> Option<i64> {
++        match *self { Value::Integer(i) => Some(i), _ => None }
++    }
++
++    /// Tests whether this value is an integer
++    pub fn is_integer(&self) -> bool {
++        self.as_integer().is_some()
++    }
++
++    /// Extracts the float value if it is a float.
++    pub fn as_float(&self) -> Option<f64> {
++        match *self { Value::Float(f) => Some(f), _ => None }
++    }
++
++    /// Tests whether this value is a float
++    pub fn is_float(&self) -> bool {
++        self.as_float().is_some()
++    }
++
++    /// Extracts the boolean value if it is a boolean.
++    pub fn as_bool(&self) -> Option<bool> {
++        match *self { Value::Boolean(b) => Some(b), _ => None }
++    }
++
++    /// Tests whether this value is a boolean
++    pub fn is_bool(&self) -> bool {
++        self.as_bool().is_some()
++    }
++
++    /// Extracts the string of this value if it is a string.
++    pub fn as_str(&self) -> Option<&str> {
++        match *self { Value::String(ref s) => Some(&**s), _ => None }
++    }
++
++    /// Tests if this value is a string
++    pub fn is_str(&self) -> bool {
++        self.as_str().is_some()
++    }
++
++    /// Extracts the datetime value if it is a datetime.
++    ///
++    /// Note that a parsed TOML value will only contain ISO 8601 dates. An
++    /// example date is:
++    ///
++    /// ```notrust
++    /// 1979-05-27T07:32:00Z
++    /// ```
++    pub fn as_datetime(&self) -> Option<&Datetime> {
++        match *self { Value::Datetime(ref s) => Some(s), _ => None }
++    }
++
++    /// Tests whether this value is a datetime
++    pub fn is_datetime(&self) -> bool {
++        self.as_datetime().is_some()
++    }
++
++    /// Extracts the array value if it is an array.
++    pub fn as_array(&self) -> Option<&Vec<Value>> {
++        match *self { Value::Array(ref s) => Some(s), _ => None }
++    }
++
++    /// Extracts the array value if it is an array.
++    pub fn as_array_mut(&mut self) -> Option<&mut Vec<Value>> {
++        match *self { Value::Array(ref mut s) => Some(s), _ => None }
++    }
++
++    /// Tests whether this value is an array
++    pub fn is_array(&self) -> bool {
++        self.as_array().is_some()
++    }
++
++    /// Extracts the table value if it is a table.
++    pub fn as_table(&self) -> Option<&Table> {
++        match *self { Value::Table(ref s) => Some(s), _ => None }
++    }
++
++    /// Extracts the table value if it is a table.
++    pub fn as_table_mut(&mut self) -> Option<&mut Table> {
++        match *self { Value::Table(ref mut s) => Some(s), _ => None }
++    }
++
++    /// Extracts the table value if it is a table.
++    pub fn is_table(&self) -> bool {
++        self.as_table().is_some()
++    }
++
++    /// Tests whether this and another value have the same type.
++    pub fn same_type(&self, other: &Value) -> bool {
++        match (self, other) {
++            (&Value::String(..), &Value::String(..)) |
++            (&Value::Integer(..), &Value::Integer(..)) |
++            (&Value::Float(..), &Value::Float(..)) |
++            (&Value::Boolean(..), &Value::Boolean(..)) |
++            (&Value::Datetime(..), &Value::Datetime(..)) |
++            (&Value::Array(..), &Value::Array(..)) |
++            (&Value::Table(..), &Value::Table(..)) => true,
++
++            _ => false,
++        }
++    }
++
++    /// Returns a human-readable representation of the type of this value.
++    pub fn type_str(&self) -> &'static str {
++        match *self {
++            Value::String(..) => "string",
++            Value::Integer(..) => "integer",
++            Value::Float(..) => "float",
++            Value::Boolean(..) => "boolean",
++            Value::Datetime(..) => "datetime",
++            Value::Array(..) => "array",
++            Value::Table(..) => "table",
++        }
++    }
++}
++
++impl<I> ops::Index<I> for Value where I: Index {
++    type Output = Value;
++
++    fn index(&self, index: I) -> &Value {
++        self.get(index).expect("index not found")
++    }
++}
++
++impl<I> ops::IndexMut<I> for Value where I: Index {
++    fn index_mut(&mut self, index: I) -> &mut Value {
++        self.get_mut(index).expect("index not found")
++    }
++}
++
++impl<'a> From<&'a str> for Value {
++    #[inline]
++    fn from(val: &'a str) -> Value {
++        Value::String(val.to_string())
++    }
++}
++
++impl<V: Into<Value>> From<Vec<V>> for Value {
++    fn from(val: Vec<V>) -> Value {
++        Value::Array(val.into_iter().map(|v| v.into()).collect())
++    }
++}
++
++impl<S: Into<String>, V: Into<Value>> From<BTreeMap<S, V>> for Value {
++    fn from(val: BTreeMap<S, V>) -> Value {
++        let table = val.into_iter()
++            .map(|(s, v)| (s.into(), v.into()))
++            .collect();
++
++        Value::Table(table)
++    }
++}
++
++impl<S: Into<String> + Hash + Eq, V: Into<Value>> From<HashMap<S, V>> for Value {
++    fn from(val: HashMap<S, V>) -> Value {
++        let table = val.into_iter()
++            .map(|(s, v)| (s.into(), v.into()))
++            .collect();
++
++        Value::Table(table)
++    }
++}
++
++macro_rules! impl_into_value {
++    ($variant:ident : $T:ty) => {
++        impl From<$T> for Value {
++            #[inline]
++            fn from(val: $T) -> Value {
++                Value::$variant(val.into())
++            }
++        }
++    }
++}
++
++impl_into_value!(String: String);
++impl_into_value!(Integer: i64);
++impl_into_value!(Integer: i32);
++impl_into_value!(Integer: i8);
++impl_into_value!(Integer: u8);
++impl_into_value!(Integer: u32);
++impl_into_value!(Float: f64);
++impl_into_value!(Float: f32);
++impl_into_value!(Boolean: bool);
++impl_into_value!(Datetime: Datetime);
++
++/// Types that can be used to index a `toml::Value`
++///
++/// Currently this is implemented for `usize` to index arrays and `str` to index
++/// tables.
++///
++/// This trait is sealed and not intended for implementation outside of the
++/// `toml` crate.
++pub trait Index: Sealed {
++    #[doc(hidden)]
++    fn index<'a>(&self, val: &'a Value) -> Option<&'a Value>;
++    #[doc(hidden)]
++    fn index_mut<'a>(&self, val: &'a mut Value) -> Option<&'a mut Value>;
++}
++
++/// An implementation detail that should not be implemented, this will change in
++/// the future and break code otherwise.
++#[doc(hidden)]
++pub trait Sealed {}
++impl Sealed for usize {}
++impl Sealed for str {}
++impl Sealed for String {}
++impl<'a, T: Sealed + ?Sized> Sealed for &'a T {}
++
++impl Index for usize {
++    fn index<'a>(&self, val: &'a Value) -> Option<&'a Value> {
++        match *val {
++            Value::Array(ref a) => a.get(*self),
++            _ => None,
++        }
++    }
++
++    fn index_mut<'a>(&self, val: &'a mut Value) -> Option<&'a mut Value> {
++        match *val {
++            Value::Array(ref mut a) => a.get_mut(*self),
++            _ => None,
++        }
++    }
++}
++
++impl Index for str {
++    fn index<'a>(&self, val: &'a Value) -> Option<&'a Value> {
++        match *val {
++            Value::Table(ref a) => a.get(self),
++            _ => None,
++        }
++    }
++
++    fn index_mut<'a>(&self, val: &'a mut Value) -> Option<&'a mut Value> {
++        match *val {
++            Value::Table(ref mut a) => a.get_mut(self),
++            _ => None,
++        }
++    }
++}
++
++impl Index for String {
++    fn index<'a>(&self, val: &'a Value) -> Option<&'a Value> {
++        self[..].index(val)
++    }
++
++    fn index_mut<'a>(&self, val: &'a mut Value) -> Option<&'a mut Value> {
++        self[..].index_mut(val)
++    }
++}
++
++impl<'s, T: ?Sized> Index for &'s T where T: Index {
++    fn index<'a>(&self, val: &'a Value) -> Option<&'a Value> {
++        (**self).index(val)
++    }
++
++    fn index_mut<'a>(&self, val: &'a mut Value) -> Option<&'a mut Value> {
++        (**self).index_mut(val)
++    }
++}
++
++impl fmt::Display for Value {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        ::ser::to_string(self).expect("Unable to represent value as string").fmt(f)
++    }
++}
++
++impl FromStr for Value {
++    type Err = ::de::Error;
++    fn from_str(s: &str) -> Result<Value, Self::Err> {
++        ::from_str(s)
++    }
++}
++
++impl ser::Serialize for Value {
++    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
++        where S: ser::Serializer
++    {
++        use serde::ser::SerializeMap;
++
++        match *self {
++            Value::String(ref s) => serializer.serialize_str(s),
++            Value::Integer(i) => serializer.serialize_i64(i),
++            Value::Float(f) => serializer.serialize_f64(f),
++            Value::Boolean(b) => serializer.serialize_bool(b),
++            Value::Datetime(ref s) => s.serialize(serializer),
++            Value::Array(ref a) => a.serialize(serializer),
++            Value::Table(ref t) => {
++                let mut map = serializer.serialize_map(Some(t.len()))?;
++                // Be sure to visit non-tables first (and also non
++                // array-of-tables) as all keys must be emitted first.
++                for (k, v) in t {
++                    if !v.is_table() && !v.is_array() ||
++                       (v.as_array().map(|a| !a.iter().any(|v| v.is_table())).unwrap_or(false)) {
++                        map.serialize_entry(k, v)?;
++                    }
++                }
++                for (k, v) in t {
++                    if v.as_array().map(|a| a.iter().any(|v| v.is_table())).unwrap_or(false) {
++                        map.serialize_entry(k, v)?;
++                    }
++                }
++                for (k, v) in t {
++                    if v.is_table() {
++                        map.serialize_entry(k, v)?;
++                    }
++                }
++                map.end()
++            }
++        }
++    }
++}
++
++impl<'de> de::Deserialize<'de> for Value {
++    fn deserialize<D>(deserializer: D) -> Result<Value, D::Error>
++        where D: de::Deserializer<'de>,
++    {
++        struct ValueVisitor;
++
++        impl<'de> de::Visitor<'de> for ValueVisitor {
++            type Value = Value;
++
++            fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++                formatter.write_str("any valid TOML value")
++            }
++
++            fn visit_bool<E>(self, value: bool) -> Result<Value, E> {
++                Ok(Value::Boolean(value))
++            }
++
++            fn visit_i64<E>(self, value: i64) -> Result<Value, E> {
++                Ok(Value::Integer(value))
++            }
++
++            fn visit_f64<E>(self, value: f64) -> Result<Value, E> {
++                Ok(Value::Float(value))
++            }
++
++            fn visit_str<E>(self, value: &str) -> Result<Value, E> {
++                Ok(Value::String(value.into()))
++            }
++
++            fn visit_string<E>(self, value: String) -> Result<Value, E> {
++                Ok(Value::String(value))
++            }
++
++            fn visit_some<D>(self, deserializer: D) -> Result<Value, D::Error>
++                where D: de::Deserializer<'de>,
++            {
++                de::Deserialize::deserialize(deserializer)
++            }
++
++            fn visit_seq<V>(self, mut visitor: V) -> Result<Value, V::Error>
++                where V: de::SeqAccess<'de>,
++            {
++                let mut vec = Vec::new();
++                while let Some(elem) = try!(visitor.next_element()) {
++                    vec.push(elem);
++                }
++                Ok(Value::Array(vec))
++            }
++
++            fn visit_map<V>(self, mut visitor: V) -> Result<Value, V::Error>
++                where V: de::MapAccess<'de>,
++            {
++                let mut key = String::new();
++                let datetime = visitor.next_key_seed(DatetimeOrTable {
++                    key: &mut key,
++                })?;
++                match datetime {
++                    Some(true) => {
++                        let date: DatetimeFromString = visitor.next_value()?;
++                        return Ok(Value::Datetime(date.value))
++                    }
++                    None => return Ok(Value::Table(BTreeMap::new())),
++                    Some(false) => {}
++                }
++                let mut map = BTreeMap::new();
++                map.insert(key, visitor.next_value()?);
++                while let Some(key) = visitor.next_key()? {
++                    if map.contains_key(&key) {
++                        let msg = format!("duplicate key: `{}`", key);
++                        return Err(de::Error::custom(msg))
++                    }
++                    map.insert(key, visitor.next_value()?);
++                }
++                Ok(Value::Table(map))
++            }
++        }
++
++        deserializer.deserialize_any(ValueVisitor)
++    }
++}
++
++impl<'de> de::Deserializer<'de> for Value {
++    type Error = ::de::Error;
++
++    fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, ::de::Error>
++        where V: de::Visitor<'de>,
++    {
++        match self {
++            Value::Boolean(v) => visitor.visit_bool(v),
++            Value::Integer(n) => visitor.visit_i64(n),
++            Value::Float(n) => visitor.visit_f64(n),
++            Value::String(v) => visitor.visit_string(v),
++            Value::Datetime(v) => visitor.visit_string(v.to_string()),
++            Value::Array(v) => {
++                let len = v.len();
++                let mut deserializer = SeqDeserializer::new(v);
++                let seq = visitor.visit_seq(&mut deserializer)?;
++                let remaining = deserializer.iter.len();
++                if remaining == 0 {
++                    Ok(seq)
++                } else {
++                    Err(de::Error::invalid_length(len, &"fewer elements in array"))
++                }
++            }
++            Value::Table(v) => {
++                let len = v.len();
++                let mut deserializer = MapDeserializer::new(v);
++                let map = visitor.visit_map(&mut deserializer)?;
++                let remaining = deserializer.iter.len();
++                if remaining == 0 {
++                    Ok(map)
++                } else {
++                    Err(de::Error::invalid_length(len, &"fewer elements in map"))
++                }
++            }
++        }
++    }
++
++    #[inline]
++    fn deserialize_enum<V>(
++        self,
++        _name: &str,
++        _variants: &'static [&'static str],
++        visitor: V,
++    ) -> Result<V::Value, ::de::Error>
++    where
++        V: de::Visitor<'de>,
++    {
++        match self {
++            Value::String(variant) => visitor.visit_enum(variant.into_deserializer()),
++            _ => Err(de::Error::invalid_type(de::Unexpected::UnitVariant, &"string only")),
++        }
++    }
++
++    // `None` is interpreted as a missing field so be sure to implement `Some`
++    // as a present field.
++    fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, ::de::Error>
++        where V: de::Visitor<'de>,
++    {
++        visitor.visit_some(self)
++    }
++
++    fn deserialize_newtype_struct<V>(
++        self,
++        _name: &'static str,
++        visitor: V
++    ) -> Result<V::Value, ::de::Error>
++        where V: de::Visitor<'de>
++    {
++        visitor.visit_newtype_struct(self)
++    }
++
++    forward_to_deserialize_any! {
++        bool u8 u16 u32 u64 i8 i16 i32 i64 f32 f64 char str string unit seq
++        bytes byte_buf map unit_struct tuple_struct struct
++        tuple ignored_any identifier
++    }
++}
++
++struct SeqDeserializer {
++    iter: vec::IntoIter<Value>,
++}
++
++impl SeqDeserializer {
++    fn new(vec: Vec<Value>) -> Self {
++        SeqDeserializer {
++            iter: vec.into_iter(),
++        }
++    }
++}
++
++impl<'de> de::SeqAccess<'de> for SeqDeserializer {
++    type Error = ::de::Error;
++
++    fn next_element_seed<T>(&mut self, seed: T)
++                            -> Result<Option<T::Value>, ::de::Error>
++        where T: de::DeserializeSeed<'de>,
++    {
++        match self.iter.next() {
++            Some(value) => seed.deserialize(value).map(Some),
++            None => Ok(None),
++        }
++    }
++
++    fn size_hint(&self) -> Option<usize> {
++        match self.iter.size_hint() {
++            (lower, Some(upper)) if lower == upper => Some(upper),
++            _ => None,
++        }
++    }
++}
++
++struct MapDeserializer {
++    iter: <BTreeMap<String, Value> as IntoIterator>::IntoIter,
++    value: Option<(String, Value)>,
++}
++
++impl MapDeserializer {
++    fn new(map: BTreeMap<String, Value>) -> Self {
++        MapDeserializer {
++            iter: map.into_iter(),
++            value: None,
++        }
++    }
++}
++
++impl<'de> de::MapAccess<'de> for MapDeserializer {
++    type Error = ::de::Error;
++
++    fn next_key_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, ::de::Error>
++        where T: de::DeserializeSeed<'de>,
++    {
++        match self.iter.next() {
++            Some((key, value)) => {
++                self.value = Some((key.clone(), value));
++                seed.deserialize(Value::String(key)).map(Some)
++            }
++            None => Ok(None),
++        }
++    }
++
++    fn next_value_seed<T>(&mut self, seed: T) -> Result<T::Value, ::de::Error>
++        where T: de::DeserializeSeed<'de>,
++    {
++        let (key, res) = match self.value.take() {
++            Some((key, value)) => (key, seed.deserialize(value)),
++            None => return Err(de::Error::custom("value is missing")),
++        };
++        res.map_err(|mut error| {
++            error.add_key_context(&key);
++            error
++        })
++    }
++
++    fn size_hint(&self) -> Option<usize> {
++        match self.iter.size_hint() {
++            (lower, Some(upper)) if lower == upper => Some(upper),
++            _ => None,
++        }
++    }
++}
++
++impl<'de> de::IntoDeserializer<'de, ::de::Error> for Value {
++    type Deserializer = Self;
++
++    fn into_deserializer(self) -> Self {
++        self
++    }
++}
++
++struct Serializer;
++
++impl ser::Serializer for Serializer {
++    type Ok = Value;
++    type Error = ::ser::Error;
++
++    type SerializeSeq = SerializeVec;
++    type SerializeTuple = ser::Impossible<Value, ::ser::Error>;
++    type SerializeTupleStruct = ser::Impossible<Value, ::ser::Error>;
++    type SerializeTupleVariant = ser::Impossible<Value, ::ser::Error>;
++    type SerializeMap = SerializeMap;
++    type SerializeStruct = SerializeMap;
++    type SerializeStructVariant = ser::Impossible<Value, ::ser::Error>;
++
++    fn serialize_bool(self, value: bool) -> Result<Value, ::ser::Error> {
++        Ok(Value::Boolean(value))
++    }
++
++    fn serialize_i8(self, value: i8) -> Result<Value, ::ser::Error> {
++        self.serialize_i64(value.into())
++    }
++
++    fn serialize_i16(self, value: i16) -> Result<Value, ::ser::Error> {
++        self.serialize_i64(value.into())
++    }
++
++    fn serialize_i32(self, value: i32) -> Result<Value, ::ser::Error> {
++        self.serialize_i64(value.into())
++    }
++
++    fn serialize_i64(self, value: i64) -> Result<Value, ::ser::Error> {
++        Ok(Value::Integer(value.into()))
++    }
++
++    fn serialize_u8(self, value: u8) -> Result<Value, ::ser::Error> {
++        self.serialize_i64(value.into())
++    }
++
++    fn serialize_u16(self, value: u16) -> Result<Value, ::ser::Error> {
++        self.serialize_i64(value.into())
++    }
++
++    fn serialize_u32(self, value: u32) -> Result<Value, ::ser::Error> {
++        self.serialize_i64(value.into())
++    }
++
++    fn serialize_u64(self, value: u64) -> Result<Value, ::ser::Error> {
++        if value <= i64::max_value() as u64 {
++            self.serialize_i64(value as i64)
++        } else {
++            Err(ser::Error::custom("u64 value was too large"))
++        }
++    }
++
++    fn serialize_f32(self, value: f32) -> Result<Value, ::ser::Error> {
++        self.serialize_f64(value.into())
++    }
++
++    fn serialize_f64(self, value: f64) -> Result<Value, ::ser::Error> {
++        Ok(Value::Float(value))
++    }
++
++    fn serialize_char(self, value: char) -> Result<Value, ::ser::Error> {
++        let mut s = String::new();
++        s.push(value);
++        self.serialize_str(&s)
++    }
++
++    fn serialize_str(self, value: &str) -> Result<Value, ::ser::Error> {
++        Ok(Value::String(value.to_owned()))
++    }
++
++    fn serialize_bytes(self, value: &[u8]) -> Result<Value, ::ser::Error> {
++        let vec = value.iter().map(|&b| Value::Integer(b.into())).collect();
++        Ok(Value::Array(vec))
++    }
++
++    fn serialize_unit(self) -> Result<Value, ::ser::Error> {
++        Err(::ser::Error::UnsupportedType)
++    }
++
++    fn serialize_unit_struct(self, _name: &'static str)
++                             -> Result<Value, ::ser::Error> {
++        Err(::ser::Error::UnsupportedType)
++    }
++
++    fn serialize_unit_variant(self,
++                              _name: &'static str,
++                              _variant_index: u32,
++                              _variant: &'static str)
++                              -> Result<Value, ::ser::Error> {
++        self.serialize_str(_variant)
++    }
++
++    fn serialize_newtype_struct<T: ?Sized>(self,
++                                           _name: &'static str,
++                                           value: &T)
++                                           -> Result<Value, ::ser::Error>
++        where T: ser::Serialize,
++    {
++        value.serialize(self)
++    }
++
++    fn serialize_newtype_variant<T: ?Sized>(self,
++                                            _name: &'static str,
++                                            _variant_index: u32,
++                                            _variant: &'static str,
++                                            _value: &T)
++                                            -> Result<Value, ::ser::Error>
++        where T: ser::Serialize,
++    {
++        Err(::ser::Error::UnsupportedType)
++    }
++
++    fn serialize_none(self) -> Result<Value, ::ser::Error> {
++        Err(::ser::Error::UnsupportedNone)
++    }
++
++    fn serialize_some<T: ?Sized>(self, value: &T) -> Result<Value, ::ser::Error>
++        where T: ser::Serialize,
++    {
++        value.serialize(self)
++    }
++
++    fn serialize_seq(self, len: Option<usize>)
++                     -> Result<Self::SerializeSeq, ::ser::Error>
++    {
++        Ok(SerializeVec {
++            vec: Vec::with_capacity(len.unwrap_or(0))
++        })
++    }
++
++    fn serialize_tuple(self, _len: usize) -> Result<Self::SerializeTuple, ::ser::Error> {
++        Err(::ser::Error::UnsupportedType)
++    }
++
++    fn serialize_tuple_struct(self, _name: &'static str, _len: usize)
++                              -> Result<Self::SerializeTupleStruct, ::ser::Error> {
++        Err(::ser::Error::UnsupportedType)
++    }
++
++    fn serialize_tuple_variant(self,
++                               _name: &'static str,
++                               _variant_index: u32,
++                               _variant: &'static str,
++                               _len: usize)
++                               -> Result<Self::SerializeTupleVariant, ::ser::Error>
++    {
++        Err(::ser::Error::UnsupportedType)
++    }
++
++    fn serialize_map(self, _len: Option<usize>)
++                     -> Result<Self::SerializeMap, ::ser::Error>
++    {
++        Ok(SerializeMap {
++            map: BTreeMap::new(),
++            next_key: None,
++        })
++    }
++
++    fn serialize_struct(self, _name: &'static str, len: usize)
++                        -> Result<Self::SerializeStruct, ::ser::Error> {
++        self.serialize_map(Some(len))
++    }
++
++    fn serialize_struct_variant(self,
++                                _name: &'static str,
++                                _variant_index: u32,
++                                _variant: &'static str,
++                                _len: usize)
++                                -> Result<Self::SerializeStructVariant, ::ser::Error>
++    {
++        Err(::ser::Error::UnsupportedType)
++    }
++}
++
++struct SerializeVec {
++    vec: Vec<Value>,
++}
++
++struct SerializeMap {
++    map: BTreeMap<String, Value>,
++    next_key: Option<String>,
++}
++
++impl ser::SerializeSeq for SerializeVec {
++    type Ok = Value;
++    type Error = ::ser::Error;
++
++    fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), ::ser::Error>
++        where T: ser::Serialize
++    {
++        self.vec.push(Value::try_from(value)?);
++        Ok(())
++    }
++
++    fn end(self) -> Result<Value, ::ser::Error> {
++        Ok(Value::Array(self.vec))
++    }
++}
++
++impl ser::SerializeMap for SerializeMap {
++    type Ok = Value;
++    type Error = ::ser::Error;
++
++    fn serialize_key<T: ?Sized>(&mut self, key: &T) -> Result<(), ::ser::Error>
++        where T: ser::Serialize
++    {
++        match Value::try_from(key)? {
++            Value::String(s) => self.next_key = Some(s),
++            _ => return Err(::ser::Error::KeyNotString),
++        };
++        Ok(())
++    }
++
++    fn serialize_value<T: ?Sized>(&mut self, value: &T) -> Result<(), ::ser::Error>
++        where T: ser::Serialize
++    {
++        let key = self.next_key.take();
++        let key = key.expect("serialize_value called before serialize_key");
++        match Value::try_from(value) {
++            Ok(value) => { self.map.insert(key, value); }
++            Err(::ser::Error::UnsupportedNone) => {}
++            Err(e) => return Err(e),
++        }
++        Ok(())
++    }
++
++    fn end(self) -> Result<Value, ::ser::Error> {
++        Ok(Value::Table(self.map))
++    }
++}
++
++impl ser::SerializeStruct for SerializeMap {
++    type Ok = Value;
++    type Error = ::ser::Error;
++
++    fn serialize_field<T: ?Sized>(&mut self, key: &'static str, value: &T) -> Result<(), ::ser::Error>
++        where T: ser::Serialize
++    {
++        try!(ser::SerializeMap::serialize_key(self, key));
++        ser::SerializeMap::serialize_value(self, value)
++    }
++
++    fn end(self) -> Result<Value, ::ser::Error> {
++        ser::SerializeMap::end(self)
++    }
++}
++
++struct DatetimeOrTable<'a> {
++    key: &'a mut String,
++}
++
++impl<'a, 'de> de::DeserializeSeed<'de> for DatetimeOrTable<'a> {
++    type Value = bool;
++
++    fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
++        where D: de::Deserializer<'de>
++    {
++        deserializer.deserialize_any(self)
++    }
++}
++
++impl<'a, 'de> de::Visitor<'de> for DatetimeOrTable<'a> {
++    type Value = bool;
++
++    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
++        formatter.write_str("a string key")
++    }
++
++    fn visit_str<E>(self, s: &str) -> Result<bool, E>
++        where E: de::Error,
++    {
++        if s == SERDE_STRUCT_FIELD_NAME {
++            Ok(true)
++        } else {
++            self.key.push_str(s);
++            Ok(false)
++        }
++    }
++
++    fn visit_string<E>(self, s: String) -> Result<bool, E>
++        where E: de::Error,
++    {
++        if s == SERDE_STRUCT_FIELD_NAME {
++            Ok(true)
++        } else {
++            *self.key = s;
++            Ok(false)
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ebbc01ccf34481fb4b32293c50654eb865fb8926
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++Tests are from https://github.com/BurntSushi/toml-test
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1b3f5993d0547fada260be8c189a607a4ab84300
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,19 @@@
++extern crate toml;
++extern crate serde;
++
++use serde::de::Deserialize;
++
++#[test]
++fn main() {
++    let s = "
++        [a] foo = 1
++        [[b]] foo = 1
++    ";
++    assert!(s.parse::<toml::Value>().is_err());
++
++    let mut d = toml::de::Deserializer::new(s);
++    d.set_require_newline_after_table(false);
++    let value = toml::Value::deserialize(&mut d).unwrap();
++    assert_eq!(value["a"]["foo"].as_integer(), Some(1));
++    assert_eq!(value["b"][0]["foo"].as_integer(), Some(1));
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..948e86310c8e56f339c0aa5d9b7a3d57104f4949
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,58 @@@
++extern crate toml;
++
++use std::str::FromStr;
++
++use toml::Value;
++
++#[test]
++fn times() {
++    fn good(s: &str) {
++        let to_parse = format!("foo = {}", s);
++        let value = Value::from_str(&to_parse).unwrap();
++        assert_eq!(value["foo"].as_datetime().unwrap().to_string(), s);
++    }
++
++    good("1997-09-09T09:09:09Z");
++    good("1997-09-09T09:09:09+09:09");
++    good("1997-09-09T09:09:09-09:09");
++    good("1997-09-09T09:09:09");
++    good("1997-09-09");
++    good("09:09:09");
++    good("1997-09-09T09:09:09.09Z");
++    good("1997-09-09T09:09:09.09+09:09");
++    good("1997-09-09T09:09:09.09-09:09");
++    good("1997-09-09T09:09:09.09");
++    good("09:09:09.09");
++}
++
++#[test]
++fn bad_times() {
++    fn bad(s: &str) {
++        let to_parse = format!("foo = {}", s);
++        assert!(Value::from_str(&to_parse).is_err());
++    }
++
++    bad("199-09-09");
++    bad("199709-09");
++    bad("1997-9-09");
++    bad("1997-09-9");
++    bad("1997-09-0909:09:09");
++    bad("1997-09-09T09:09:09.");
++    bad("T");
++    bad("T.");
++    bad("TZ");
++    bad("1997-09-09T09:09:09.09+");
++    bad("1997-09-09T09:09:09.09+09");
++    bad("1997-09-09T09:09:09.09+09:9");
++    bad("1997-09-09T09:09:09.09+0909");
++    bad("1997-09-09T09:09:09.09-");
++    bad("1997-09-09T09:09:09.09-09");
++    bad("1997-09-09T09:09:09.09-09:9");
++    bad("1997-09-09T09:09:09.09-0909");
++
++    bad("1997-00-09T09:09:09.09Z");
++    bad("1997-09-00T09:09:09.09Z");
++    bad("1997-09-09T30:09:09.09Z");
++    bad("1997-09-09T12:69:09.09Z");
++    bad("1997-09-09T12:09:69.09Z");
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..069e0f9e539942965006e8f1d2fe3cb1093ae556
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,49 @@@
++extern crate toml;
++#[macro_use] extern crate serde_derive;
++
++#[derive(Debug, Serialize, Deserialize)]
++pub struct Recipe {
++    pub name: String,
++    pub description: Option<String>,
++    #[serde(default)]
++    pub modules: Vec<Modules>,
++    #[serde(default)]
++    pub packages: Vec<Packages>
++}
++
++#[derive(Debug, Serialize, Deserialize)]
++pub struct Modules {
++    pub name: String,
++    pub version: Option<String>
++}
++
++#[derive(Debug, Serialize, Deserialize)]
++pub struct Packages {
++    pub name: String,
++    pub version: Option<String>
++}
++
++#[test]
++fn both_ends() {
++    let recipe_works = toml::from_str::<Recipe>(r#"
++        name = "testing"
++        description = "example"
++        modules = []
++
++        [[packages]]
++        name = "base"
++    "#).unwrap();
++    toml::to_string(&recipe_works).unwrap();
++
++    let recipe_fails = toml::from_str::<Recipe>(r#"
++        name = "testing"
++        description = "example"
++        packages = []
++
++        [[modules]]
++        name = "base"
++    "#).unwrap();
++
++    let recipe_toml = toml::Value::try_from(recipe_fails).unwrap();
++    recipe_toml.to_string();
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ca4fdd8ce395523d65c6e85a1b8146418d917ef4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,103 @@@
++extern crate toml;
++
++use std::collections::BTreeMap;
++
++use toml::Value::{String, Integer, Float, Boolean, Array, Table};
++
++macro_rules! map( ($($k:expr => $v:expr),*) => ({
++    let mut _m = BTreeMap::new();
++    $(_m.insert($k.to_string(), $v);)*
++    _m
++}) );
++
++#[test]
++fn simple_show() {
++    assert_eq!(String("foo".to_string()).to_string(),
++               "\"foo\"");
++    assert_eq!(Integer(10).to_string(),
++               "10");
++    assert_eq!(Float(10.0).to_string(),
++               "10.0");
++    assert_eq!(Float(2.4).to_string(),
++               "2.4");
++    assert_eq!(Boolean(true).to_string(),
++               "true");
++    assert_eq!(Array(vec![]).to_string(),
++               "[]");
++    assert_eq!(Array(vec![Integer(1), Integer(2)]).to_string(),
++               "[1, 2]");
++}
++
++#[test]
++fn table() {
++    assert_eq!(Table(map! { }).to_string(),
++               "");
++    assert_eq!(Table(map! {
++                        "test" => Integer(2),
++                        "test2" => Integer(3) }).to_string(),
++               "test = 2\ntest2 = 3\n");
++    assert_eq!(Table(map! {
++                    "test" => Integer(2),
++                    "test2" => Table(map! {
++                        "test" => String("wut".to_string())
++                    })
++               }).to_string(),
++               "test = 2\n\
++                \n\
++                [test2]\n\
++                test = \"wut\"\n");
++    assert_eq!(Table(map! {
++                    "test" => Integer(2),
++                    "test2" => Table(map! {
++                        "test" => String("wut".to_string())
++                    })
++               }).to_string(),
++               "test = 2\n\
++                \n\
++                [test2]\n\
++                test = \"wut\"\n");
++    assert_eq!(Table(map! {
++                    "test" => Integer(2),
++                    "test2" => Array(vec![Table(map! {
++                        "test" => String("wut".to_string())
++                    })])
++               }).to_string(),
++               "test = 2\n\
++                \n\
++                [[test2]]\n\
++                test = \"wut\"\n");
++    assert_eq!(Table(map! {
++                    "foo.bar" => Integer(2),
++                    "foo\"bar" => Integer(2)
++               }).to_string(),
++               "\"foo\\\"bar\" = 2\n\
++                \"foo.bar\" = 2\n");
++    assert_eq!(Table(map! {
++                    "test" => Integer(2),
++                    "test2" => Array(vec![Table(map! {
++                        "test" => Array(vec![Integer(2)])
++                    })])
++               }).to_string(),
++               "test = 2\n\
++                \n\
++                [[test2]]\n\
++                test = [2]\n");
++    let table = Table(map! {
++        "test" => Integer(2),
++        "test2" => Array(vec![Table(map! {
++            "test" => Array(vec![Array(vec![Integer(2), Integer(3)]),
++            Array(vec![String("foo".to_string()), String("bar".to_string())])])
++        })])
++    });
++    assert_eq!(table.to_string(),
++               "test = 2\n\
++                \n\
++                [[test2]]\n\
++                test = [[2, 3], [\"foo\", \"bar\"]]\n");
++    assert_eq!(Table(map! {
++                    "test" => Array(vec![Integer(2)]),
++                    "test2" => Integer(2)
++               }).to_string(),
++               "test = [2]\n\
++                test2 = 2\n");
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..10fb165385931ce28122f42529fb3b1ffb8315ab
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,55 @@@
++extern crate serde;
++#[macro_use]
++extern crate serde_derive;
++extern crate toml;
++
++use toml::to_string;
++
++#[derive(Debug, Clone, Hash, PartialEq, Eq, Serialize, Deserialize)]
++struct User {
++    pub name: String,
++    pub surname: String,
++}
++
++#[derive(Debug, Clone, Hash, PartialEq, Eq, Serialize, Deserialize)]
++struct Users {
++    pub user: Vec<User>,
++}
++
++#[derive(Debug, Clone, Hash, PartialEq, Eq, Serialize, Deserialize)]
++struct TwoUsers {
++    pub user0: User,
++    pub user1: User,
++}
++
++#[test]
++fn no_unnecessary_newlines_array() {
++    assert!(!to_string(&Users {
++            user: vec![
++                    User {
++                        name: "John".to_string(),
++                        surname: "Doe".to_string(),
++                    },
++                    User {
++                        name: "Jane".to_string(),
++                        surname: "Dough".to_string(),
++                    },
++                ],
++        }).unwrap()
++        .starts_with("\n"));
++}
++
++#[test]
++fn no_unnecessary_newlines_table() {
++    assert!(!to_string(&TwoUsers {
++            user0: User {
++                name: "John".to_string(),
++                surname: "Doe".to_string(),
++            },
++            user1: User {
++                name: "Jane".to_string(),
++                surname: "Dough".to_string(),
++            },
++        }).unwrap()
++        .starts_with("\n"));
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..272f58f8bfd664463c901db4f89bf9cf7ff0e2b3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++extern crate toml;
++
++use std::f64;
++
++#[test]
++fn test_invalid_float_encode() {
++    fn bad(value: toml::Value) {
++        assert!(toml::to_string(&value).is_err());
++    }
++
++    bad(toml::Value::Float(f64::INFINITY));
++    bad(toml::Value::Float(f64::NEG_INFINITY));
++    bad(toml::Value::Float(f64::NAN));
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2d42ead67e628fdc6ead0d7ad4bda8a679fa70d2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++{
++    "ints-and-floats": {
++        "type": "array",
++        "value": [
++            {
++                "type": "integer",
++                "value": "1"
++            },
++            {
++                "type": "float",
++                "value": "1.1"
++            }
++        ]
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bb70b976b4266183a56ff9e418320ba7096512bb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++extern crate toml;
++
++#[test]
++fn bad() {
++    fn bad(s: &str) {
++        assert!(s.parse::<toml::Value>().is_err());
++    }
++
++    bad("a = 01");
++    bad("a = 1__1");
++    bad("a = 1_");
++    bad("''");
++    bad("a = nan");
++    bad("a = -inf");
++    bad("a = inf");
++    bad("a = 9e99999");
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..46796843a01a64ebd8a63e3f133d3c8624522edb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,98 @@@
++extern crate toml;
++
++fn run(toml: &str) {
++    println!("test if invalid:\n{}", toml);
++    if let Ok(e) = toml.parse::<toml::Value>() {
++        panic!("parsed to: {:#?}", e);
++    }
++}
++
++macro_rules! test( ($name:ident, $toml:expr) => (
++    #[test]
++    fn $name() { run($toml); }
++) );
++
++test!(array_mixed_types_arrays_and_ints,
++      include_str!("invalid/array-mixed-types-arrays-and-ints.toml"));
++test!(array_mixed_types_ints_and_floats,
++      include_str!("invalid/array-mixed-types-ints-and-floats.toml"));
++test!(array_mixed_types_strings_and_ints,
++      include_str!("invalid/array-mixed-types-strings-and-ints.toml"));
++test!(datetime_malformed_no_leads,
++      include_str!("invalid/datetime-malformed-no-leads.toml"));
++test!(datetime_malformed_no_secs,
++      include_str!("invalid/datetime-malformed-no-secs.toml"));
++test!(datetime_malformed_no_t,
++      include_str!("invalid/datetime-malformed-no-t.toml"));
++test!(datetime_malformed_with_milli,
++      include_str!("invalid/datetime-malformed-with-milli.toml"));
++test!(duplicate_keys,
++      include_str!("invalid/duplicate-keys.toml"));
++test!(duplicate_key_table,
++      include_str!("invalid/duplicate-key-table.toml"));
++test!(duplicate_tables,
++      include_str!("invalid/duplicate-tables.toml"));
++test!(empty_implicit_table,
++      include_str!("invalid/empty-implicit-table.toml"));
++test!(empty_table,
++      include_str!("invalid/empty-table.toml"));
++test!(float_no_leading_zero,
++      include_str!("invalid/float-no-leading-zero.toml"));
++test!(float_no_trailing_digits,
++      include_str!("invalid/float-no-trailing-digits.toml"));
++test!(key_after_array,
++      include_str!("invalid/key-after-array.toml"));
++test!(key_after_table,
++      include_str!("invalid/key-after-table.toml"));
++test!(key_empty,
++      include_str!("invalid/key-empty.toml"));
++test!(key_hash,
++      include_str!("invalid/key-hash.toml"));
++test!(key_newline,
++      include_str!("invalid/key-newline.toml"));
++test!(key_open_bracket,
++      include_str!("invalid/key-open-bracket.toml"));
++test!(key_single_open_bracket,
++      include_str!("invalid/key-single-open-bracket.toml"));
++test!(key_space,
++      include_str!("invalid/key-space.toml"));
++test!(key_start_bracket,
++      include_str!("invalid/key-start-bracket.toml"));
++test!(key_two_equals,
++      include_str!("invalid/key-two-equals.toml"));
++test!(string_bad_byte_escape,
++      include_str!("invalid/string-bad-byte-escape.toml"));
++test!(string_bad_escape,
++      include_str!("invalid/string-bad-escape.toml"));
++test!(string_byte_escapes,
++      include_str!("invalid/string-byte-escapes.toml"));
++test!(string_no_close,
++      include_str!("invalid/string-no-close.toml"));
++test!(table_array_implicit,
++      include_str!("invalid/table-array-implicit.toml"));
++test!(table_array_malformed_bracket,
++      include_str!("invalid/table-array-malformed-bracket.toml"));
++test!(table_array_malformed_empty,
++      include_str!("invalid/table-array-malformed-empty.toml"));
++test!(table_empty,
++      include_str!("invalid/table-empty.toml"));
++test!(table_nested_brackets_close,
++      include_str!("invalid/table-nested-brackets-close.toml"));
++test!(table_nested_brackets_open,
++      include_str!("invalid/table-nested-brackets-open.toml"));
++test!(table_whitespace,
++      include_str!("invalid/table-whitespace.toml"));
++test!(table_with_pound,
++      include_str!("invalid/table-with-pound.toml"));
++test!(text_after_array_entries,
++      include_str!("invalid/text-after-array-entries.toml"));
++test!(text_after_integer,
++      include_str!("invalid/text-after-integer.toml"));
++test!(text_after_string,
++      include_str!("invalid/text-after-string.toml"));
++test!(text_after_table,
++      include_str!("invalid/text-after-table.toml"));
++test!(text_before_array_separator,
++      include_str!("invalid/text-before-array-separator.toml"));
++test!(text_in_array,
++      include_str!("invalid/text-in-array.toml"));
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..051ec73136b2b6c2f933a5a380253aa42bb0b848
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++arrays-and-ints =  [1, ["Arrays are not integers."]]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a5aa9b7a03375a0d7971260daa1aee51b518951f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++ints-and-floats = [1, 1.1]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f3483080532f395b58b60fb58a3c80ef564d1a91
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++strings-and-ints = ["hi", 42]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..123f173beb3ac7282059fe64bca9f8e60d65ac68
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++no-leads = 1987-7-05T17:45:00Z
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ba9390076273ddabaafe4471c9e943e4e312039d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++no-secs = 1987-07-05T17:45Z
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..617e3c56d4008a000d8d705cf6e4eccf2a2707a6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++no-t = 1987-07-0517:45:00Z
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..eef792f34d6ef9c0880c70868c2ee076dba4f1c6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++with-milli = 1987-07-5T17:45:00.12Z
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..cedf05fc53bff115a6530fb2c8917ca7e2afd95b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++[fruit]
++type = "apple"
++
++[fruit.type]
++apple = "yes"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9b5aee0e59b35b0b547c93ddcc6effe42ab9a45d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++dupe = false
++dupe = true
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8ddf49b4e89303ede5d8903e0cfc62075171ae22
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++[a]
++[a]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0cc36d0d28154acd0cf9c4399a7f3c5b499373bc
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++[naughty..naughty]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fe51488c7066f6687ef680d6bfaa4f7768ef205c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++[]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..cab76bfd1588720c7c8bb8194c1f915e13ed460c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++answer = .12345
++neganswer = -.12345
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..cbff2d06f05cce51179f23453a9ad77d63f2f9fd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++answer = 1.
++neganswer = -1.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5c1a1b0a9bc50fd2ab7b2bab904e452827590998
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++[[agencies]] owner = "S Cjelli"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4bc82136ce9da826e4409102843cce42e16a8de1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++[history] guard = "sleeping"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..09f998f4163e1bff9e58278ebd89573819285c18
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++ = 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e321b1fbd0c969ce97800814ed51d605f886b9ae
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++a# = 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..707aad54ec34ffb5d4f73c4648b58b7ee11de564
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++a
++= 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f0aeb16e50003fe97ae7bb08f923168a4cacdfec
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++[abc = 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8e2f0bef135ba8e52e4110b6a5b0ebf19a528ca4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++[
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..201806d28013285bb78e3011b5448578fc967fd1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++a b = 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e0597ae1c6f1ca3fbc8dc3ba692d5aa9661d8b95
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++[a]
++[xyz = 5
++[b]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..25a037894eb0fc9adef5fa3ef69547dd087b7662
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++key= = 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4c7be59f4b16cb34c0586a94b586a99e86238705
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++naughty = "\xAg"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..60acb0ccc50774299c963e18acaa8277f7503b9f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++invalid-escape = "This string has a bad \a escape character."
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e94452a8dfc882903934f2e086f50427af5266f8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++answer = "\x33"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0c292fcab730d5ee7e3026407407b992fdcabab8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++no-ending-quote = "One time, at band camp
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..05f2507ecb687f308c655182da0a1f28d34a18a1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++# This test is a bit tricky. It should fail because the first use of
++# `[[albums.songs]]` without first declaring `albums` implies that `albums`
++# must be a table. The alternative would be quite weird. Namely, it wouldn't
++# comply with the TOML spec: "Each double-bracketed sub-table will belong to 
++# the most *recently* defined table element *above* it."
++#
++# This is in contrast to the *valid* test, table-array-implicit where
++# `[[albums.songs]]` works by itself, so long as `[[albums]]` isn't declared
++# later. (Although, `[albums]` could be.)
++[[albums.songs]]
++name = "Glory Days"
++
++[[albums]]
++name = "Born in the USA"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39c73b05c44e44043f7187ff87a22a70071c7944
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++[[albums]
++name = "Born to Run"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a470ca332f31f4a9c57a5971c36aec0caf999781
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++[[]]
++name = "Born to Run"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fe51488c7066f6687ef680d6bfaa4f7768ef205c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++[]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c8b5a67858006c557bbb420d91fee14af778011b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++[a]b]
++zyx = 42
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..246d7e91fe4fb16ba1f2b3f89294fbff0c6ea1c7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++[a[b]
++zyx = 42
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..79bbcb1e29832452395da83644c95172caacc787
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++[invalid key]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0d8edb524fe1afe1d539952b33ba04ed759c6715
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++[key#group]
++answer = 42
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1a7289074ed131de598a6a296121779e2102615d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,4 @@@
++array = [
++  "Is there life after an array separator?", No
++  "Entry"
++]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..42de7aff4d85693158d073e53fa73f96b36215cf
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++answer = 42 the ultimate answer?
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c92a6f11d85a7570cce1d9383a2911812d914e5b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++string = "Is there life after strings?" No.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..87da9db26dffc26cfef91ddaee80e4c87dc5b326
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++[error] this shouldn't be here
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9b06a392410634906e1dabd7487ffa3acc40f747
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,4 @@@
++array = [
++  "Is there life before an array separator?" No,
++  "Entry"
++]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a6a6c42075e24c483c568e6c4e7b07368b3f5e2c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++array = [
++  "Entry 1",
++  I don't belong,
++  "Entry 2",
++]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2282416f3e955c2414613c7b3e877f6ab002dbcf
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,495 @@@
++extern crate toml;
++
++use toml::Value;
++
++macro_rules! bad {
++    ($s:expr, $msg:expr) => ({
++        match $s.parse::<Value>() {
++            Ok(s) => panic!("successfully parsed as {}", s),
++            Err(e) => {
++                let e = e.to_string();
++                assert!(e.contains($msg), "error: {}", e);
++            }
++        }
++    })
++}
++
++#[test]
++fn crlf() {
++    "\
++[project]\r\n\
++\r\n\
++name = \"splay\"\r\n\
++version = \"0.1.0\"\r\n\
++authors = [\"alex@crichton.co\"]\r\n\
++\r\n\
++[[lib]]\r\n\
++\r\n\
++path = \"lib.rs\"\r\n\
++name = \"splay\"\r\n\
++description = \"\"\"\
++A Rust implementation of a TAR file reader and writer. This library does not\r\n\
++currently handle compression, but it is abstract over all I/O readers and\r\n\
++writers. Additionally, great lengths are taken to ensure that the entire\r\n\
++contents are never required to be entirely resident in memory all at once.\r\n\
++\"\"\"\
++".parse::<Value>().unwrap();
++}
++
++#[test]
++fn fun_with_strings() {
++    let table = r#"
++bar = "\U00000000"
++key1 = "One\nTwo"
++key2 = """One\nTwo"""
++key3 = """
++One
++Two"""
++
++key4 = "The quick brown fox jumps over the lazy dog."
++key5 = """
++The quick brown \
++
++
++fox jumps over \
++the lazy dog."""
++key6 = """\
++   The quick brown \
++   fox jumps over \
++   the lazy dog.\
++   """
++# What you see is what you get.
++winpath  = 'C:\Users\nodejs\templates'
++winpath2 = '\\ServerX\admin$\system32\'
++quoted   = 'Tom "Dubs" Preston-Werner'
++regex    = '<\i\c*\s*>'
++
++regex2 = '''I [dw]on't need \d{2} apples'''
++lines  = '''
++The first newline is
++trimmed in raw strings.
++All other whitespace
++is preserved.
++'''
++"#.parse::<Value>().unwrap();
++    assert_eq!(table["bar"].as_str(), Some("\0"));
++    assert_eq!(table["key1"].as_str(), Some("One\nTwo"));
++    assert_eq!(table["key2"].as_str(), Some("One\nTwo"));
++    assert_eq!(table["key3"].as_str(), Some("One\nTwo"));
++
++    let msg = "The quick brown fox jumps over the lazy dog.";
++    assert_eq!(table["key4"].as_str(), Some(msg));
++    assert_eq!(table["key5"].as_str(), Some(msg));
++    assert_eq!(table["key6"].as_str(), Some(msg));
++
++    assert_eq!(table["winpath"].as_str(), Some(r"C:\Users\nodejs\templates"));
++    assert_eq!(table["winpath2"].as_str(), Some(r"\\ServerX\admin$\system32\"));
++    assert_eq!(table["quoted"].as_str(), Some(r#"Tom "Dubs" Preston-Werner"#));
++    assert_eq!(table["regex"].as_str(), Some(r"<\i\c*\s*>"));
++    assert_eq!(table["regex2"].as_str(), Some(r"I [dw]on't need \d{2} apples"));
++    assert_eq!(table["lines"].as_str(),
++               Some("The first newline is\n\
++                     trimmed in raw strings.\n\
++                        All other whitespace\n\
++                        is preserved.\n"));
++}
++
++#[test]
++fn tables_in_arrays() {
++    let table = r#"
++[[foo]]
++#…
++[foo.bar]
++#…
++
++[[foo]] # ...
++#…
++[foo.bar]
++#...
++"#.parse::<Value>().unwrap();
++    table["foo"][0]["bar"].as_table().unwrap();
++    table["foo"][1]["bar"].as_table().unwrap();
++}
++
++#[test]
++fn empty_table() {
++    let table = r#"
++[foo]"#.parse::<Value>().unwrap();
++    table["foo"].as_table().unwrap();
++}
++
++#[test]
++fn fruit() {
++    let table = r#"
++[[fruit]]
++name = "apple"
++
++[fruit.physical]
++color = "red"
++shape = "round"
++
++[[fruit.variety]]
++name = "red delicious"
++
++[[fruit.variety]]
++name = "granny smith"
++
++[[fruit]]
++name = "banana"
++
++[[fruit.variety]]
++name = "plantain"
++"#.parse::<Value>().unwrap();
++    assert_eq!(table["fruit"][0]["name"].as_str(), Some("apple"));
++    assert_eq!(table["fruit"][0]["physical"]["color"].as_str(), Some("red"));
++    assert_eq!(table["fruit"][0]["physical"]["shape"].as_str(), Some("round"));
++    assert_eq!(table["fruit"][0]["variety"][0]["name"].as_str(), Some("red delicious"));
++    assert_eq!(table["fruit"][0]["variety"][1]["name"].as_str(), Some("granny smith"));
++    assert_eq!(table["fruit"][1]["name"].as_str(), Some("banana"));
++    assert_eq!(table["fruit"][1]["variety"][0]["name"].as_str(), Some("plantain"));
++}
++
++#[test]
++fn stray_cr() {
++    "\r".parse::<Value>().unwrap_err();
++    "a = [ \r ]".parse::<Value>().unwrap_err();
++    "a = \"\"\"\r\"\"\"".parse::<Value>().unwrap_err();
++    "a = \"\"\"\\  \r  \"\"\"".parse::<Value>().unwrap_err();
++    "a = '''\r'''".parse::<Value>().unwrap_err();
++    "a = '\r'".parse::<Value>().unwrap_err();
++    "a = \"\r\"".parse::<Value>().unwrap_err();
++}
++
++#[test]
++fn blank_literal_string() {
++    let table = "foo = ''".parse::<Value>().unwrap();
++    assert_eq!(table["foo"].as_str(), Some(""));
++}
++
++#[test]
++fn many_blank() {
++    let table = "foo = \"\"\"\n\n\n\"\"\"".parse::<Value>().unwrap();
++    assert_eq!(table["foo"].as_str(), Some("\n\n"));
++}
++
++#[test]
++fn literal_eats_crlf() {
++    let table = "
++        foo = \"\"\"\\\r\n\"\"\"
++        bar = \"\"\"\\\r\n   \r\n   \r\n   a\"\"\"
++    ".parse::<Value>().unwrap();
++    assert_eq!(table["foo"].as_str(), Some(""));
++    assert_eq!(table["bar"].as_str(), Some("a"));
++}
++
++#[test]
++fn string_no_newline() {
++    "a = \"\n\"".parse::<Value>().unwrap_err();
++    "a = '\n'".parse::<Value>().unwrap_err();
++}
++
++#[test]
++fn bad_leading_zeros() {
++    "a = 00".parse::<Value>().unwrap_err();
++    "a = -00".parse::<Value>().unwrap_err();
++    "a = +00".parse::<Value>().unwrap_err();
++    "a = 00.0".parse::<Value>().unwrap_err();
++    "a = -00.0".parse::<Value>().unwrap_err();
++    "a = +00.0".parse::<Value>().unwrap_err();
++    "a = 9223372036854775808".parse::<Value>().unwrap_err();
++    "a = -9223372036854775809".parse::<Value>().unwrap_err();
++}
++
++#[test]
++fn bad_floats() {
++    "a = 0.".parse::<Value>().unwrap_err();
++    "a = 0.e".parse::<Value>().unwrap_err();
++    "a = 0.E".parse::<Value>().unwrap_err();
++    "a = 0.0E".parse::<Value>().unwrap_err();
++    "a = 0.0e".parse::<Value>().unwrap_err();
++    "a = 0.0e-".parse::<Value>().unwrap_err();
++    "a = 0.0e+".parse::<Value>().unwrap_err();
++    "a = 0.0e+00".parse::<Value>().unwrap_err();
++}
++
++#[test]
++fn floats() {
++    macro_rules! t {
++        ($actual:expr, $expected:expr) => ({
++            let f = format!("foo = {}", $actual);
++            println!("{}", f);
++            let a = f.parse::<Value>().unwrap();
++            assert_eq!(a["foo"].as_float().unwrap(), $expected);
++        })
++    }
++
++    t!("1.0", 1.0);
++    t!("1.0e0", 1.0);
++    t!("1.0e+0", 1.0);
++    t!("1.0e-0", 1.0);
++    t!("1.001e-0", 1.001);
++    t!("2e10", 2e10);
++    t!("2e+10", 2e10);
++    t!("2e-10", 2e-10);
++    t!("2_0.0", 20.0);
++    t!("2_0.0_0e1_0", 20.0e10);
++    t!("2_0.1_0e1_0", 20.1e10);
++}
++
++#[test]
++fn bare_key_names() {
++    let a = "
++        foo = 3
++        foo_3 = 3
++        foo_-2--3--r23f--4-f2-4 = 3
++        _ = 3
++        - = 3
++        8 = 8
++        \"a\" = 3
++        \"!\" = 3
++        \"a^b\" = 3
++        \"\\\"\" = 3
++        \"character encoding\" = \"value\"
++        'ʎǝʞ' = \"value\"
++    ".parse::<Value>().unwrap();
++    &a["foo"];
++    &a["-"];
++    &a["_"];
++    &a["8"];
++    &a["foo_3"];
++    &a["foo_-2--3--r23f--4-f2-4"];
++    &a["a"];
++    &a["!"];
++    &a["\""];
++    &a["character encoding"];
++    &a["ʎǝʞ"];
++}
++
++#[test]
++fn bad_keys() {
++    "key\n=3".parse::<Value>().unwrap_err();
++    "key=\n3".parse::<Value>().unwrap_err();
++    "key|=3".parse::<Value>().unwrap_err();
++    "\"\"=3".parse::<Value>().unwrap_err();
++    "=3".parse::<Value>().unwrap_err();
++    "\"\"|=3".parse::<Value>().unwrap_err();
++    "\"\n\"|=3".parse::<Value>().unwrap_err();
++    "\"\r\"|=3".parse::<Value>().unwrap_err();
++}
++
++#[test]
++fn bad_table_names() {
++    "[]".parse::<Value>().unwrap_err();
++    "[.]".parse::<Value>().unwrap_err();
++    "[\"\".\"\"]".parse::<Value>().unwrap_err();
++    "[a.]".parse::<Value>().unwrap_err();
++    "[\"\"]".parse::<Value>().unwrap_err();
++    "[!]".parse::<Value>().unwrap_err();
++    "[\"\n\"]".parse::<Value>().unwrap_err();
++    "[a.b]\n[a.\"b\"]".parse::<Value>().unwrap_err();
++    "[']".parse::<Value>().unwrap_err();
++    "[''']".parse::<Value>().unwrap_err();
++    "['''''']".parse::<Value>().unwrap_err();
++    "['\n']".parse::<Value>().unwrap_err();
++    "['\r\n']".parse::<Value>().unwrap_err();
++}
++
++#[test]
++fn table_names() {
++    let a = "
++        [a.\"b\"]
++        [\"f f\"]
++        [\"f.f\"]
++        [\"\\\"\"]
++        ['a.a']
++        ['\"\"']
++    ".parse::<Value>().unwrap();
++    println!("{:?}", a);
++    &a["a"]["b"];
++    &a["f f"];
++    &a["f.f"];
++    &a["\""];
++    &a["\"\""];
++}
++
++#[test]
++fn invalid_bare_numeral() {
++    "4".parse::<Value>().unwrap_err();
++}
++
++#[test]
++fn inline_tables() {
++    "a = {}".parse::<Value>().unwrap();
++    "a = {b=1}".parse::<Value>().unwrap();
++    "a = {   b   =   1    }".parse::<Value>().unwrap();
++    "a = {a=1,b=2}".parse::<Value>().unwrap();
++    "a = {a=1,b=2,c={}}".parse::<Value>().unwrap();
++    "a = {a=1,}".parse::<Value>().unwrap_err();
++    "a = {,}".parse::<Value>().unwrap_err();
++    "a = {a=1,a=1}".parse::<Value>().unwrap_err();
++    "a = {\n}".parse::<Value>().unwrap_err();
++    "a = {".parse::<Value>().unwrap_err();
++    "a = {a=[\n]}".parse::<Value>().unwrap();
++    "a = {\"a\"=[\n]}".parse::<Value>().unwrap();
++    "a = [\n{},\n{},\n]".parse::<Value>().unwrap();
++}
++
++#[test]
++fn number_underscores() {
++    macro_rules! t {
++        ($actual:expr, $expected:expr) => ({
++            let f = format!("foo = {}", $actual);
++            let table = f.parse::<Value>().unwrap();
++            assert_eq!(table["foo"].as_integer().unwrap(), $expected);
++        })
++    }
++
++    t!("1_0", 10);
++    t!("1_0_0", 100);
++    t!("1_000", 1000);
++    t!("+1_000", 1000);
++    t!("-1_000", -1000);
++}
++
++#[test]
++fn bad_underscores() {
++    bad!("foo = 0_", "invalid number");
++    bad!("foo = 0__0", "invalid number");
++    bad!("foo = __0", "invalid number");
++    bad!("foo = 1_0_", "invalid number");
++}
++
++#[test]
++fn bad_unicode_codepoint() {
++    bad!("foo = \"\\uD800\"", "invalid escape value");
++}
++
++#[test]
++fn bad_strings() {
++    bad!("foo = \"\\uxx\"", "invalid hex escape");
++    bad!("foo = \"\\u\"", "invalid hex escape");
++    bad!("foo = \"\\", "unterminated");
++    bad!("foo = '", "unterminated");
++}
++
++#[test]
++fn empty_string() {
++    assert_eq!("foo = \"\"".parse::<Value>()
++                           .unwrap()["foo"]
++                           .as_str()
++                           .unwrap(),
++               "");
++}
++
++#[test]
++fn booleans() {
++    let table = "foo = true".parse::<Value>().unwrap();
++    assert_eq!(table["foo"].as_bool(), Some(true));
++
++    let table = "foo = false".parse::<Value>().unwrap();
++    assert_eq!(table["foo"].as_bool(), Some(false));
++
++    assert!("foo = true2".parse::<Value>().is_err());
++    assert!("foo = false2".parse::<Value>().is_err());
++    assert!("foo = t1".parse::<Value>().is_err());
++    assert!("foo = f2".parse::<Value>().is_err());
++}
++
++#[test]
++fn bad_nesting() {
++    bad!("
++        a = [2]
++        [[a]]
++        b = 5
++    ", "duplicate key: `a`");
++    bad!("
++        a = 1
++        [a.b]
++    ", "duplicate key: `a`");
++    bad!("
++        a = []
++        [a.b]
++    ", "duplicate key: `a`");
++    bad!("
++        a = []
++        [[a.b]]
++    ", "duplicate key: `a`");
++    bad!("
++        [a]
++        b = { c = 2, d = {} }
++        [a.b]
++        c = 2
++    ", "duplicate key: `b`");
++}
++
++#[test]
++fn bad_table_redefine() {
++    bad!("
++        [a]
++        foo=\"bar\"
++        [a.b]
++        foo=\"bar\"
++        [a]
++    ", "redefinition of table `a`");
++    bad!("
++        [a]
++        foo=\"bar\"
++        b = { foo = \"bar\" }
++        [a]
++    ", "redefinition of table `a`");
++    bad!("
++        [a]
++        b = {}
++        [a.b]
++    ", "duplicate key: `b`");
++
++    bad!("
++        [a]
++        b = {}
++        [a]
++    ", "redefinition of table `a`");
++}
++
++#[test]
++fn datetimes() {
++    macro_rules! t {
++        ($actual:expr) => ({
++            let f = format!("foo = {}", $actual);
++            let toml = f.parse::<Value>().expect(&format!("failed: {}", f));
++            assert_eq!(toml["foo"].as_datetime().unwrap().to_string(), $actual);
++        })
++    }
++
++    t!("2016-09-09T09:09:09Z");
++    t!("2016-09-09T09:09:09.1Z");
++    t!("2016-09-09T09:09:09.2+10:00");
++    t!("2016-09-09T09:09:09.123456789-02:00");
++    bad!("foo = 2016-09-09T09:09:09.Z", "failed to parse date");
++    bad!("foo = 2016-9-09T09:09:09Z", "failed to parse date");
++    bad!("foo = 2016-09-09T09:09:09+2:00", "failed to parse date");
++    bad!("foo = 2016-09-09T09:09:09-2:00", "failed to parse date");
++    bad!("foo = 2016-09-09T09:09:09Z-2:00", "failed to parse date");
++}
++
++#[test]
++fn require_newline_after_value() {
++    bad!("0=0r=false", "invalid number at line 1");
++    bad!(r#"
++0=""o=""m=""r=""00="0"q="""0"""e="""0"""
++"#, "expected newline");
++    bad!(r#"
++[[0000l0]]
++0="0"[[0000l0]]
++0="0"[[0000l0]]
++0="0"l="0"
++"#, "expected newline");
++    bad!(r#"
++0=[0]00=[0,0,0]t=["0","0","0"]s=[1000-00-00T00:00:00Z,2000-00-00T00:00:00Z]
++"#, "expected newline");
++    bad!(r#"
++0=0r0=0r=false
++"#, "invalid number at line 2");
++    bad!(r#"
++0=0r0=0r=falsefal=false
++"#, "invalid number at line 2");
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ae9a8393adf5cdb383ee836dfb116007a97b47cb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,168 @@@
++extern crate toml;
++extern crate serde;
++
++use serde::ser::Serialize;
++
++const NO_PRETTY: &'static str = "\
++[example]
++array = [\"item 1\", \"item 2\"]
++empty = []
++oneline = \"this has no newlines.\"
++text = \"\\nthis is the first line\\nthis is the second line\\n\"
++";
++
++#[test]
++fn no_pretty() {
++    let toml = NO_PRETTY;
++    let value: toml::Value = toml::from_str(toml).unwrap();
++    let mut result = String::with_capacity(128);
++    value.serialize(&mut toml::Serializer::new(&mut result)).unwrap();
++    println!("EXPECTED:\n{}", toml);
++    println!("\nRESULT:\n{}", result);
++    assert_eq!(toml, &result);
++}
++
++#[test]
++fn disable_pretty() {
++    let toml = NO_PRETTY;
++    let value: toml::Value = toml::from_str(toml).unwrap();
++    let mut result = String::with_capacity(128);
++    {
++        let mut serializer = toml::Serializer::pretty(&mut result);
++        serializer.pretty_string(false);
++        serializer.pretty_array(false);
++        value.serialize(&mut serializer).unwrap();
++    }
++    println!("EXPECTED:\n{}", toml);
++    println!("\nRESULT:\n{}", result);
++    assert_eq!(toml, &result);
++}
++
++const PRETTY_STD: &'static str = "\
++[example]
++array = [
++    \"item 1\",
++    \"item 2\",
++]
++empty = []
++oneline = \"this has no newlines.\"
++text = '''
++this is the first line
++this is the second line
++'''
++";
++
++#[test]
++fn pretty_std() {
++    let toml = PRETTY_STD;
++    let value: toml::Value = toml::from_str(toml).unwrap();
++    let mut result = String::with_capacity(128);
++    value.serialize(&mut toml::Serializer::pretty(&mut result)).unwrap();
++    println!("EXPECTED:\n{}", toml);
++    println!("\nRESULT:\n{}", result);
++    assert_eq!(toml, &result);
++}
++
++
++const PRETTY_INDENT_2: &'static str = "\
++[example]
++array = [
++  \"item 1\",
++  \"item 2\",
++]
++empty = []
++oneline = \"this has no newlines.\"
++text = '''
++this is the first line
++this is the second line
++'''
++";
++
++#[test]
++fn pretty_indent_2() {
++    let toml = PRETTY_INDENT_2;
++    let value: toml::Value = toml::from_str(toml).unwrap();
++    let mut result = String::with_capacity(128);
++    {
++        let mut serializer = toml::Serializer::pretty(&mut result);
++        serializer.pretty_array_indent(2);
++        value.serialize(&mut serializer).unwrap();
++    }
++    assert_eq!(toml, &result);
++}
++
++const PRETTY_INDENT_2_OTHER: &'static str = "\
++[example]
++array = [
++  \"item 1\",
++  \"item 2\",
++]
++empty = []
++oneline = \"this has no newlines.\"
++text = \"\\nthis is the first line\\nthis is the second line\\n\"
++";
++
++
++#[test]
++/// Test pretty indent when gotten the other way
++fn pretty_indent_2_other() {
++    let toml = PRETTY_INDENT_2_OTHER;
++    let value: toml::Value = toml::from_str(toml).unwrap();
++    let mut result = String::with_capacity(128);
++    {
++        let mut serializer = toml::Serializer::new(&mut result);
++        serializer.pretty_array_indent(2);
++        value.serialize(&mut serializer).unwrap();
++    }
++    assert_eq!(toml, &result);
++}
++
++
++const PRETTY_ARRAY_NO_COMMA: &'static str = "\
++[example]
++array = [
++    \"item 1\",
++    \"item 2\"
++]
++empty = []
++oneline = \"this has no newlines.\"
++text = \"\\nthis is the first line\\nthis is the second line\\n\"
++";
++#[test]
++/// Test pretty indent when gotten the other way
++fn pretty_indent_array_no_comma() {
++    let toml = PRETTY_ARRAY_NO_COMMA;
++    let value: toml::Value = toml::from_str(toml).unwrap();
++    let mut result = String::with_capacity(128);
++    {
++        let mut serializer = toml::Serializer::new(&mut result);
++        serializer.pretty_array_trailing_comma(false);
++        value.serialize(&mut serializer).unwrap();
++    }
++    assert_eq!(toml, &result);
++}
++
++
++const PRETTY_NO_STRING: &'static str = "\
++[example]
++array = [
++    \"item 1\",
++    \"item 2\",
++]
++empty = []
++oneline = \"this has no newlines.\"
++text = \"\\nthis is the first line\\nthis is the second line\\n\"
++";
++#[test]
++/// Test pretty indent when gotten the other way
++fn pretty_no_string() {
++    let toml = PRETTY_NO_STRING;
++    let value: toml::Value = toml::from_str(toml).unwrap();
++    let mut result = String::with_capacity(128);
++    {
++        let mut serializer = toml::Serializer::pretty(&mut result);
++        serializer.pretty_string(false);
++        value.serialize(&mut serializer).unwrap();
++    }
++    assert_eq!(toml, &result);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..57fa5db052c86a05612efd00fb74ab86f8ca582a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,578 @@@
++extern crate serde;
++extern crate toml;
++#[macro_use]
++extern crate serde_derive;
++
++use std::collections::{BTreeMap, HashSet};
++use serde::{Deserialize, Deserializer};
++
++use toml::Value;
++use toml::Value::{Table, Integer, Array, Float};
++
++macro_rules! t {
++    ($e:expr) => (match $e {
++        Ok(t) => t,
++        Err(e) => panic!("{} failed with {}", stringify!($e), e),
++    })
++}
++
++macro_rules! equivalent {
++    ($literal:expr, $toml:expr,) => ({
++        let toml = $toml;
++        let literal = $literal;
++
++        // In/out of Value is equivalent
++        println!("try_from");
++        assert_eq!(t!(Value::try_from(literal.clone())), toml);
++        println!("try_into");
++        assert_eq!(literal, t!(toml.clone().try_into()));
++
++        // Through a string equivalent
++        println!("to_string(literal)");
++        assert_eq!(t!(toml::to_string(&literal)), toml.to_string());
++        println!("to_string(toml)");
++        assert_eq!(t!(toml::to_string(&toml)), toml.to_string());
++        println!("literal, from_str(toml)");
++        assert_eq!(literal, t!(toml::from_str(&toml.to_string())));
++        println!("toml, from_str(toml)");
++        assert_eq!(toml, t!(toml::from_str(&toml.to_string())));
++    })
++}
++
++macro_rules! error {
++    ($ty:ty, $toml:expr, $error:expr) => ({
++        println!("attempting parsing");
++        match toml::from_str::<$ty>(&$toml.to_string()) {
++            Ok(_) => panic!("successful"),
++            Err(e) => {
++                assert!(e.to_string().contains($error),
++                        "bad error: {}", e);
++            }
++        }
++
++        println!("attempting toml decoding");
++        match $toml.try_into::<$ty>() {
++            Ok(_) => panic!("successful"),
++            Err(e) => {
++                assert!(e.to_string().contains($error),
++                        "bad error: {}", e);
++            }
++        }
++    })
++}
++
++macro_rules! map( ($($k:ident: $v:expr),*) => ({
++    let mut _m = BTreeMap::new();
++    $(_m.insert(stringify!($k).to_string(), $v);)*
++    _m
++}) );
++
++#[test]
++fn smoke() {
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Foo { a: isize }
++
++    equivalent!(
++        Foo { a: 2 },
++        Table(map! { a: Integer(2) }),
++    );
++}
++
++#[test]
++fn smoke_hyphen() {
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Foo {
++        a_b: isize,
++    }
++
++    equivalent! {
++        Foo { a_b: 2 },
++        Table(map! { a_b: Integer(2) }),
++    }
++
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Foo2 {
++        #[serde(rename = "a-b")]
++        a_b: isize,
++    }
++
++    let mut m = BTreeMap::new();
++    m.insert("a-b".to_string(), Integer(2));
++    equivalent! {
++        Foo2 { a_b: 2 },
++        Table(m),
++    }
++}
++
++#[test]
++fn nested() {
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Foo { a: isize, b: Bar }
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Bar { a: String }
++
++    equivalent! {
++        Foo { a: 2, b: Bar { a: "test".to_string() } },
++        Table(map! {
++            a: Integer(2),
++            b: Table(map! {
++                a: Value::String("test".to_string())
++            })
++        }),
++    }
++}
++
++#[test]
++fn application_decode_error() {
++    #[derive(PartialEq, Debug)]
++    struct Range10(usize);
++    impl<'de> Deserialize<'de> for Range10 {
++         fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Range10, D::Error> {
++             let x: usize = try!(Deserialize::deserialize(d));
++             if x > 10 {
++                 Err(serde::de::Error::custom("more than 10"))
++             } else {
++                 Ok(Range10(x))
++             }
++         }
++    }
++    let d_good = Integer(5);
++    let d_bad1 = Value::String("not an isize".to_string());
++    let d_bad2 = Integer(11);
++
++    assert_eq!(Range10(5), d_good.try_into().unwrap());
++
++    let err1: Result<Range10, _> = d_bad1.try_into();
++    assert!(err1.is_err());
++    let err2: Result<Range10, _> = d_bad2.try_into();
++    assert!(err2.is_err());
++}
++
++#[test]
++fn array() {
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Foo { a: Vec<isize> }
++
++    equivalent! {
++        Foo { a: vec![1, 2, 3, 4] },
++        Table(map! {
++            a: Array(vec![
++                Integer(1),
++                Integer(2),
++                Integer(3),
++                Integer(4)
++            ])
++        }),
++    };
++}
++
++#[test]
++fn inner_structs_with_options() {
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Foo {
++        a: Option<Box<Foo>>,
++        b: Bar,
++    }
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Bar {
++        a: String,
++        b: f64,
++    }
++
++    equivalent! {
++        Foo {
++            a: Some(Box::new(Foo {
++                a: None,
++                b: Bar { a: "foo".to_string(), b: 4.5 },
++            })),
++            b: Bar { a: "bar".to_string(), b: 1.0 },
++        },
++        Table(map! {
++            a: Table(map! {
++                b: Table(map! {
++                    a: Value::String("foo".to_string()),
++                    b: Float(4.5)
++                })
++            }),
++            b: Table(map! {
++                a: Value::String("bar".to_string()),
++                b: Float(1.0)
++            })
++        }),
++    }
++}
++
++#[test]
++fn hashmap() {
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Foo {
++        set: HashSet<char>,
++        map: BTreeMap<String, isize>,
++    }
++
++    equivalent! {
++        Foo {
++            map: {
++                let mut m = BTreeMap::new();
++                m.insert("foo".to_string(), 10);
++                m.insert("bar".to_string(), 4);
++                m
++            },
++            set: {
++                let mut s = HashSet::new();
++                s.insert('a');
++                s
++            },
++        },
++        Table(map! {
++            map: Table(map! {
++                foo: Integer(10),
++                bar: Integer(4)
++            }),
++            set: Array(vec![Value::String("a".to_string())])
++        }),
++    }
++}
++
++#[test]
++fn table_array() {
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Foo { a: Vec<Bar>, }
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Bar { a: isize }
++
++    equivalent! {
++        Foo { a: vec![Bar { a: 1 }, Bar { a: 2 }] },
++        Table(map! {
++            a: Array(vec![
++                Table(map!{ a: Integer(1) }),
++                Table(map!{ a: Integer(2) }),
++            ])
++        }),
++    }
++}
++
++#[test]
++fn type_errors() {
++    #[derive(Deserialize)]
++    #[allow(dead_code)]
++    struct Foo { bar: isize }
++
++    error! {
++        Foo,
++        Table(map! {
++            bar: Value::String("a".to_string())
++        }),
++        "invalid type: string \"a\", expected isize for key `bar`"
++    }
++
++    #[derive(Deserialize)]
++    #[allow(dead_code)]
++    struct Bar { foo: Foo }
++
++    error! {
++        Bar,
++        Table(map! {
++            foo: Table(map! {
++                bar: Value::String("a".to_string())
++            })
++        }),
++        "invalid type: string \"a\", expected isize for key `foo.bar`"
++    }
++}
++
++#[test]
++fn missing_errors() {
++    #[derive(Serialize, Deserialize, PartialEq, Debug)]
++    struct Foo { bar: isize }
++
++    error! {
++        Foo,
++        Table(map! { }),
++        "missing field `bar`"
++    }
++}
++
++#[test]
++fn parse_enum() {
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Foo { a: E }
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    #[serde(untagged)]
++    enum E {
++        Bar(isize),
++        Baz(String),
++        Last(Foo2),
++    }
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Foo2 {
++        test: String,
++    }
++
++    equivalent! {
++        Foo { a: E::Bar(10) },
++        Table(map! { a: Integer(10) }),
++    }
++
++    equivalent! {
++        Foo { a: E::Baz("foo".to_string()) },
++        Table(map! { a: Value::String("foo".to_string()) }),
++    }
++
++    equivalent! {
++        Foo { a: E::Last(Foo2 { test: "test".to_string() }) },
++        Table(map! { a: Table(map! { test: Value::String("test".to_string()) }) }),
++    }
++}
++
++#[test]
++fn parse_enum_string() {
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Foo { a: Sort }
++
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    #[serde(rename_all = "lowercase")]
++    enum Sort {
++        Asc,
++        Desc,
++    }
++
++    equivalent! {
++        Foo { a: Sort::Desc },
++        Table(map! { a: Value::String("desc".to_string()) }),
++    }
++
++}
++
++// #[test]
++// fn unused_fields() {
++//     #[derive(Serialize, Deserialize, PartialEq, Debug)]
++//     struct Foo { a: isize }
++//
++//     let v = Foo { a: 2 };
++//     let mut d = Decoder::new(Table(map! {
++//         a, Integer(2),
++//         b, Integer(5)
++//     }));
++//     assert_eq!(v, t!(Deserialize::deserialize(&mut d)));
++//
++//     assert_eq!(d.toml, Some(Table(map! {
++//         b, Integer(5)
++//     })));
++// }
++//
++// #[test]
++// fn unused_fields2() {
++//     #[derive(Serialize, Deserialize, PartialEq, Debug)]
++//     struct Foo { a: Bar }
++//     #[derive(Serialize, Deserialize, PartialEq, Debug)]
++//     struct Bar { a: isize }
++//
++//     let v = Foo { a: Bar { a: 2 } };
++//     let mut d = Decoder::new(Table(map! {
++//         a, Table(map! {
++//             a, Integer(2),
++//             b, Integer(5)
++//         })
++//     }));
++//     assert_eq!(v, t!(Deserialize::deserialize(&mut d)));
++//
++//     assert_eq!(d.toml, Some(Table(map! {
++//         a, Table(map! {
++//             b, Integer(5)
++//         })
++//     })));
++// }
++//
++// #[test]
++// fn unused_fields3() {
++//     #[derive(Serialize, Deserialize, PartialEq, Debug)]
++//     struct Foo { a: Bar }
++//     #[derive(Serialize, Deserialize, PartialEq, Debug)]
++//     struct Bar { a: isize }
++//
++//     let v = Foo { a: Bar { a: 2 } };
++//     let mut d = Decoder::new(Table(map! {
++//         a, Table(map! {
++//             a, Integer(2)
++//         })
++//     }));
++//     assert_eq!(v, t!(Deserialize::deserialize(&mut d)));
++//
++//     assert_eq!(d.toml, None);
++// }
++//
++// #[test]
++// fn unused_fields4() {
++//     #[derive(Serialize, Deserialize, PartialEq, Debug)]
++//     struct Foo { a: BTreeMap<String, String> }
++//
++//     let v = Foo { a: map! { a, "foo".to_string() } };
++//     let mut d = Decoder::new(Table(map! {
++//         a, Table(map! {
++//             a, Value::String("foo".to_string())
++//         })
++//     }));
++//     assert_eq!(v, t!(Deserialize::deserialize(&mut d)));
++//
++//     assert_eq!(d.toml, None);
++// }
++//
++// #[test]
++// fn unused_fields5() {
++//     #[derive(Serialize, Deserialize, PartialEq, Debug)]
++//     struct Foo { a: Vec<String> }
++//
++//     let v = Foo { a: vec!["a".to_string()] };
++//     let mut d = Decoder::new(Table(map! {
++//         a, Array(vec![Value::String("a".to_string())])
++//     }));
++//     assert_eq!(v, t!(Deserialize::deserialize(&mut d)));
++//
++//     assert_eq!(d.toml, None);
++// }
++//
++// #[test]
++// fn unused_fields6() {
++//     #[derive(Serialize, Deserialize, PartialEq, Debug)]
++//     struct Foo { a: Option<Vec<String>> }
++//
++//     let v = Foo { a: Some(vec![]) };
++//     let mut d = Decoder::new(Table(map! {
++//         a, Array(vec![])
++//     }));
++//     assert_eq!(v, t!(Deserialize::deserialize(&mut d)));
++//
++//     assert_eq!(d.toml, None);
++// }
++//
++// #[test]
++// fn unused_fields7() {
++//     #[derive(Serialize, Deserialize, PartialEq, Debug)]
++//     struct Foo { a: Vec<Bar> }
++//     #[derive(Serialize, Deserialize, PartialEq, Debug)]
++//     struct Bar { a: isize }
++//
++//     let v = Foo { a: vec![Bar { a: 1 }] };
++//     let mut d = Decoder::new(Table(map! {
++//         a, Array(vec![Table(map! {
++//             a, Integer(1),
++//             b, Integer(2)
++//         })])
++//     }));
++//     assert_eq!(v, t!(Deserialize::deserialize(&mut d)));
++//
++//     assert_eq!(d.toml, Some(Table(map! {
++//         a, Array(vec![Table(map! {
++//             b, Integer(2)
++//         })])
++//     })));
++// }
++
++#[test]
++fn empty_arrays() {
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Foo { a: Vec<Bar> }
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Bar;
++
++    equivalent! {
++        Foo { a: vec![] },
++        Table(map! {a: Array(Vec::new())}),
++    }
++}
++
++#[test]
++fn empty_arrays2() {
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Foo { a: Option<Vec<Bar>> }
++    #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
++    struct Bar;
++
++    equivalent! {
++        Foo { a: None },
++        Table(map! {}),
++    }
++
++    equivalent!{
++        Foo { a: Some(vec![]) },
++        Table(map! { a: Array(vec![]) }),
++    }
++}
++
++#[test]
++fn extra_keys() {
++    #[derive(Serialize, Deserialize)]
++    struct Foo { a: isize }
++
++    let toml = Table(map! { a: Integer(2), b: Integer(2) });
++    assert!(toml.clone().try_into::<Foo>().is_ok());
++    assert!(toml::from_str::<Foo>(&toml.to_string()).is_ok());
++}
++
++#[test]
++fn newtypes() {
++    #[derive(Deserialize, Serialize, PartialEq, Debug, Clone)]
++    struct A {
++        b: B
++    }
++
++    #[derive(Deserialize, Serialize, PartialEq, Debug, Clone)]
++    struct B(u32);
++
++    equivalent! {
++        A { b: B(2) },
++        Table(map! { b: Integer(2) }),
++    }
++}
++
++#[test]
++fn newtypes2() {
++    #[derive(Deserialize, Serialize, PartialEq, Debug, Clone)]
++      struct A {
++              b: B
++      }
++
++    #[derive(Deserialize, Serialize, PartialEq, Debug, Clone)]
++      struct B(Option<C>);
++
++    #[derive(Deserialize, Serialize, PartialEq, Debug, Clone)]
++      struct C {
++              x: u32,
++              y: u32,
++              z: u32
++      }
++
++    equivalent! {
++        A { b: B(Some(C { x: 0, y: 1, z: 2 })) },
++        Table(map! {
++            b: Table(map! {
++                x: Integer(0),
++                y: Integer(1),
++                z: Integer(2)
++            })
++        }),
++    }
++}
++
++#[derive(Debug, Default, PartialEq, Serialize, Deserialize)]
++struct CanBeEmpty {
++    a: Option<String>,
++    b: Option<String>,
++}
++
++#[test]
++fn table_structs_empty() {
++    let text = "[bar]\n\n[baz]\n\n[bazv]\na = \"foo\"\n\n[foo]\n";
++    let value: BTreeMap<String, CanBeEmpty> = toml::from_str(text).unwrap();
++    let mut expected: BTreeMap<String, CanBeEmpty> = BTreeMap::new();
++    expected.insert("bar".to_string(), CanBeEmpty::default());
++    expected.insert("baz".to_string(), CanBeEmpty::default());
++    expected.insert(
++        "bazv".to_string(), 
++        CanBeEmpty {a: Some("foo".to_string()), b: None},
++    );
++    expected.insert("foo".to_string(), CanBeEmpty::default());
++    assert_eq!(value, expected);
++    assert_eq!(toml::to_string(&value).unwrap(), text);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d05c8f0bed1d181b6b48a31c27fb51df6ff8e3da
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++#[macro_use]
++extern crate serde_derive;
++extern crate toml;
++
++use std::collections::HashMap;
++
++#[derive(Serialize)]
++struct A {
++    #[serde(serialize_with = "toml::ser::tables_last")]
++    vals: HashMap<&'static str, Value>,
++}
++
++#[derive(Serialize)]
++#[serde(untagged)]
++enum Value {
++    Map(HashMap<&'static str, &'static str>),
++    Int(i32),
++}
++
++#[test]
++fn always_works() {
++    let mut a = A { vals: HashMap::new() };
++    a.vals.insert("foo", Value::Int(0));
++
++    let mut sub = HashMap::new();
++    sub.insert("foo", "bar");
++    a.vals.insert("bar", Value::Map(sub));
++
++    toml::to_string(&a).unwrap();
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6a048665e147e08ad498c44974749da5975a2eb4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,204 @@@
++extern crate toml;
++extern crate serde_json;
++
++use toml::Value as Toml;
++use serde_json::Value as Json;
++
++fn to_json(toml: toml::Value) -> Json {
++    fn doit(s: &str, json: Json) -> Json {
++        let mut map = serde_json::Map::new();
++        map.insert("type".to_string(), Json::String(s.to_string()));
++        map.insert("value".to_string(), json);
++        Json::Object(map)
++    }
++
++    match toml {
++        Toml::String(s) => doit("string", Json::String(s)),
++        Toml::Integer(i) => doit("integer", Json::String(i.to_string())),
++        Toml::Float(f) => doit("float", Json::String({
++            let s = format!("{:.15}", f);
++            let s = format!("{}", s.trim_right_matches('0'));
++            if s.ends_with('.') {format!("{}0", s)} else {s}
++        })),
++        Toml::Boolean(b) => doit("bool", Json::String(format!("{}", b))),
++        Toml::Datetime(s) => doit("datetime", Json::String(s.to_string())),
++        Toml::Array(arr) => {
++            let is_table = match arr.first() {
++                Some(&Toml::Table(..)) => true,
++                _ => false,
++            };
++            let json = Json::Array(arr.into_iter().map(to_json).collect());
++            if is_table {json} else {doit("array", json)}
++        }
++        Toml::Table(table) => {
++            let mut map = serde_json::Map::new();
++            for (k, v) in table {
++                map.insert(k, to_json(v));
++            }
++            Json::Object(map)
++        }
++    }
++}
++
++fn run(toml: &str, json: &str) {
++    println!("parsing:\n{}", toml);
++    let toml: Toml = toml.parse().unwrap();
++    let json: Json = json.parse().unwrap();
++
++    // Assert toml == json
++    let toml_json = to_json(toml.clone());
++    assert!(json == toml_json,
++            "expected\n{}\ngot\n{}\n",
++            serde_json::to_string_pretty(&json).unwrap(),
++            serde_json::to_string_pretty(&toml_json).unwrap());
++
++    // Assert round trip
++    println!("round trip parse: {}", toml);
++    let toml2 = toml.to_string().parse().unwrap();
++    assert_eq!(toml, toml2);
++}
++
++macro_rules! test( ($name:ident, $toml:expr, $json:expr) => (
++    #[test]
++    fn $name() { run($toml, $json); }
++) );
++
++test!(array_empty,
++       include_str!("valid/array-empty.toml"),
++       include_str!("valid/array-empty.json"));
++test!(array_nospaces,
++       include_str!("valid/array-nospaces.toml"),
++       include_str!("valid/array-nospaces.json"));
++test!(arrays_hetergeneous,
++       include_str!("valid/arrays-hetergeneous.toml"),
++       include_str!("valid/arrays-hetergeneous.json"));
++test!(arrays,
++       include_str!("valid/arrays.toml"),
++       include_str!("valid/arrays.json"));
++test!(arrays_nested,
++       include_str!("valid/arrays-nested.toml"),
++       include_str!("valid/arrays-nested.json"));
++test!(empty,
++       include_str!("valid/empty.toml"),
++       include_str!("valid/empty.json"));
++test!(bool,
++       include_str!("valid/bool.toml"),
++       include_str!("valid/bool.json"));
++test!(datetime,
++       include_str!("valid/datetime.toml"),
++       include_str!("valid/datetime.json"));
++test!(example,
++       include_str!("valid/example.toml"),
++       include_str!("valid/example.json"));
++test!(float,
++       include_str!("valid/float.toml"),
++       include_str!("valid/float.json"));
++test!(implicit_and_explicit_after,
++       include_str!("valid/implicit-and-explicit-after.toml"),
++       include_str!("valid/implicit-and-explicit-after.json"));
++test!(implicit_and_explicit_before,
++       include_str!("valid/implicit-and-explicit-before.toml"),
++       include_str!("valid/implicit-and-explicit-before.json"));
++test!(implicit_groups,
++       include_str!("valid/implicit-groups.toml"),
++       include_str!("valid/implicit-groups.json"));
++test!(integer,
++       include_str!("valid/integer.toml"),
++       include_str!("valid/integer.json"));
++test!(key_equals_nospace,
++       include_str!("valid/key-equals-nospace.toml"),
++       include_str!("valid/key-equals-nospace.json"));
++test!(key_space,
++       include_str!("valid/key-space.toml"),
++       include_str!("valid/key-space.json"));
++test!(key_special_chars,
++       include_str!("valid/key-special-chars.toml"),
++       include_str!("valid/key-special-chars.json"));
++test!(key_with_pound,
++       include_str!("valid/key-with-pound.toml"),
++       include_str!("valid/key-with-pound.json"));
++test!(long_float,
++       include_str!("valid/long-float.toml"),
++       include_str!("valid/long-float.json"));
++test!(long_integer,
++       include_str!("valid/long-integer.toml"),
++       include_str!("valid/long-integer.json"));
++test!(multiline_string,
++       include_str!("valid/multiline-string.toml"),
++       include_str!("valid/multiline-string.json"));
++test!(raw_multiline_string,
++       include_str!("valid/raw-multiline-string.toml"),
++       include_str!("valid/raw-multiline-string.json"));
++test!(raw_string,
++       include_str!("valid/raw-string.toml"),
++       include_str!("valid/raw-string.json"));
++test!(string_empty,
++       include_str!("valid/string-empty.toml"),
++       include_str!("valid/string-empty.json"));
++test!(string_escapes,
++       include_str!("valid/string-escapes.toml"),
++       include_str!("valid/string-escapes.json"));
++test!(string_simple,
++       include_str!("valid/string-simple.toml"),
++       include_str!("valid/string-simple.json"));
++test!(string_with_pound,
++       include_str!("valid/string-with-pound.toml"),
++       include_str!("valid/string-with-pound.json"));
++test!(table_array_implicit,
++       include_str!("valid/table-array-implicit.toml"),
++       include_str!("valid/table-array-implicit.json"));
++test!(table_array_many,
++       include_str!("valid/table-array-many.toml"),
++       include_str!("valid/table-array-many.json"));
++test!(table_array_nest,
++       include_str!("valid/table-array-nest.toml"),
++       include_str!("valid/table-array-nest.json"));
++test!(table_array_one,
++       include_str!("valid/table-array-one.toml"),
++       include_str!("valid/table-array-one.json"));
++test!(table_empty,
++       include_str!("valid/table-empty.toml"),
++       include_str!("valid/table-empty.json"));
++test!(table_sub_empty,
++       include_str!("valid/table-sub-empty.toml"),
++       include_str!("valid/table-sub-empty.json"));
++test!(table_multi_empty,
++       include_str!("valid/table-multi-empty.toml"),
++       include_str!("valid/table-multi-empty.json"));
++test!(table_whitespace,
++       include_str!("valid/table-whitespace.toml"),
++       include_str!("valid/table-whitespace.json"));
++test!(table_with_pound,
++       include_str!("valid/table-with-pound.toml"),
++       include_str!("valid/table-with-pound.json"));
++test!(unicode_escape,
++       include_str!("valid/unicode-escape.toml"),
++       include_str!("valid/unicode-escape.json"));
++test!(unicode_literal,
++       include_str!("valid/unicode-literal.toml"),
++       include_str!("valid/unicode-literal.json"));
++test!(hard_example,
++       include_str!("valid/hard_example.toml"),
++       include_str!("valid/hard_example.json"));
++test!(example2,
++       include_str!("valid/example2.toml"),
++       include_str!("valid/example2.json"));
++test!(example3,
++       include_str!("valid/example-v0.3.0.toml"),
++       include_str!("valid/example-v0.3.0.json"));
++test!(example4,
++       include_str!("valid/example-v0.4.0.toml"),
++       include_str!("valid/example-v0.4.0.json"));
++test!(example_bom,
++       include_str!("valid/example-bom.toml"),
++       include_str!("valid/example.json"));
++
++test!(datetime_truncate,
++      include_str!("valid/datetime-truncate.toml"),
++      include_str!("valid/datetime-truncate.json"));
++test!(key_quote_newline,
++      include_str!("valid/key-quote-newline.toml"),
++      include_str!("valid/key-quote-newline.json"));
++test!(table_array_nest_no_keys,
++      include_str!("valid/table-array-nest-no-keys.toml"),
++      include_str!("valid/table-array-nest-no-keys.json"));
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2fbf2567f87bc7bff4503922973847867e26414d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,11 @@@
++{
++    "thevoid": { "type": "array", "value": [
++        {"type": "array", "value": [
++            {"type": "array", "value": [
++                {"type": "array", "value": [
++                    {"type": "array", "value": []}
++                ]}
++            ]}
++        ]}
++    ]}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fa58dc63d48803656e188ede9452726f79e6f5c2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++thevoid = [[[[[]]]]]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1833d61c55973ee9ce1c6691b2e5bb0f1331c324
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,10 @@@
++{
++    "ints": {
++        "type": "array",
++        "value": [
++            {"type": "integer", "value": "1"},
++            {"type": "integer", "value": "2"},
++            {"type": "integer", "value": "3"}
++        ]
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..66189367fe9eb53de353a250f70431404b4d0349
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++ints = [1,2,3]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..478fa5c706b2f343c5856fea14ca83f2730c0f26
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,19 @@@
++{
++    "mixed": {
++        "type": "array",
++        "value": [
++            {"type": "array", "value": [
++                {"type": "integer", "value": "1"},
++                {"type": "integer", "value": "2"}
++            ]},
++            {"type": "array", "value": [
++                {"type": "string", "value": "a"},
++                {"type": "string", "value": "b"}
++            ]},
++            {"type": "array", "value": [
++                {"type": "float", "value": "1.1"},
++                {"type": "float", "value": "2.1"}
++            ]}
++        ]
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a246fcf1deb371f8f4452eea08503b23a987fb25
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++mixed = [[1, 2], ["a", "b"], [1.1, 2.1]]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d21920cc3eb41d5058b1fdf7ba0285ce4e620643
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++{
++    "nest": {
++        "type": "array",
++        "value": [
++            {"type": "array", "value": [
++                {"type": "string", "value": "a"}
++            ]},
++            {"type": "array", "value": [
++                {"type": "string", "value": "b"}
++            ]}
++        ]
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ce3302249b72dcf5f0d9f7d394390e78bef5932a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++nest = [["a"], ["b"]]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..58aedbccbef1a939e9bef3fbca5d8f5915f126ac
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,34 @@@
++{
++    "ints": {
++        "type": "array",
++        "value": [
++            {"type": "integer", "value": "1"},
++            {"type": "integer", "value": "2"},
++            {"type": "integer", "value": "3"}
++        ]
++    },
++    "floats": {
++        "type": "array",
++        "value": [
++            {"type": "float", "value": "1.1"},
++            {"type": "float", "value": "2.1"},
++            {"type": "float", "value": "3.1"}
++        ]
++    },
++    "strings": {
++        "type": "array",
++        "value": [
++            {"type": "string", "value": "a"},
++            {"type": "string", "value": "b"},
++            {"type": "string", "value": "c"}
++        ]
++    },
++    "dates": {
++        "type": "array",
++        "value": [
++            {"type": "datetime", "value": "1987-07-05T17:45:00Z"},
++            {"type": "datetime", "value": "1979-05-27T07:32:00Z"},
++            {"type": "datetime", "value": "2006-06-01T11:00:00Z"}
++        ]
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c435f57b62c56b4a47fa1cb142a9a172fbe7d2e5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,8 @@@
++ints = [1, 2, 3]
++floats = [1.1, 2.1, 3.1]
++strings = ["a", "b", "c"]
++dates = [
++  1987-07-05T17:45:00Z,
++  1979-05-27T07:32:00Z,
++  2006-06-01T11:00:00Z,
++]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ae368e9492e3538106a3355b9d036f068355fef7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,4 @@@
++{
++    "f": {"type": "bool", "value": "false"},
++    "t": {"type": "bool", "value": "true"}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a8a829b34de9bcc694b0886bd82cde6fc40d9dbf
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++t = true
++f = false
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69a2e9582395accc3eb9c0dc240df9cbbfd2794
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++{
++    "group": {
++        "answer": {"type": "integer", "value": "42"},
++        "more": {
++            "type": "array",
++            "value": [
++                {"type": "integer", "value": "42"},
++                {"type": "integer", "value": "42"}
++            ]
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3dca74cade51620fef199de4b45c5cd1d2232367
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++# Top comment.
++  # Top comment.
++# Top comment.
++
++# [no-extraneous-groups-please]
++
++[group] # Comment
++answer = 42 # Comment
++# no-extraneous-keys-please = 999
++# Inbetween comment.
++more = [ # Comment
++  # What about multiple # comments?
++  # Can you handle it?
++  #
++          # Evil.
++# Evil.
++  42, 42, # Comments within arrays are fun.
++  # What about multiple # comments?
++  # Can you handle it?
++  #
++          # Evil.
++# Evil.
++# ] Did I fool you?
++] # Hopefully not.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8c512e10c60b0d2556d950afcf03fbb03a95bcfe
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++{
++    "bestdayever": {
++        "type": "datetime",
++        "value": "1987-07-05T17:45:00.123456789Z"
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..05de84105b4e57a55bac3731aca944cc8c7d45ab
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++bestdayever = 1987-07-05T17:45:00.123456789012345Z
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2ca93ce966faa9995f79032281badbd1213ef9af
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++{
++    "bestdayever": {"type": "datetime", "value": "1987-07-05T17:45:00Z"}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2e993407d71c49a26a71c27b083956796a570007
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++bestdayever = 1987-07-05T17:45:00Z
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0967ef424bce6791893e9a57bb952f80fd536e93
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fb5ac815c9b17dad9c48f8945de136fe3c6ce873
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++best-day-ever = 1987-07-05T17:45:00Z
++
++[numtheory]
++boring = false
++perfection = [6, 28, 496]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1d9dcb581c22e0ba3b250baa230cef82eb2a0abf
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"Array":{"key1":{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"},{"type":"integer","value":"3"}]},"key2":{"type":"array","value":[{"type":"string","value":"red"},{"type":"string","value":"yellow"},{"type":"string","value":"green"}]},"key3":{"type":"array","value":[{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"}]},{"type":"array","value":[{"type":"integer","value":"3"},{"type":"integer","value":"4"},{"type":"integer","value":"5"}]}]},"key4":{"type":"array","value":[{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"}]},{"type":"array","value":[{"type":"string","value":"a"},{"type":"string","value":"b"},{"type":"string","value":"c"}]}]},"key5":{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"},{"type":"integer","value":"3"}]},"key6":{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"}]}},"Booleans":{"False":{"type":"bool","value":"false"},"True":{"type":"bool","value":"true"}},"Datetime":{"key1":{"type":"datetime","value":"1979-05-27T07:32:00Z"}},"Float":{"both":{},"exponent":{},"fractional":{"key1":{"type":"float","value":"1.0"},"key2":{"type":"float","value":"3.1415"},"key3":{"type":"float","value":"-0.01"}}},"Integer":{"key1":{"type":"integer","value":"99"},"key2":{"type":"integer","value":"42"},"key3":{"type":"integer","value":"0"},"key4":{"type":"integer","value":"-17"}},"String":{"Literal":{"Multiline":{"lines":{"type":"string","value":"The first newline is\ntrimmed in raw strings.\n   All other whitespace\n   is preserved.\n"},"regex2":{"type":"string","value":"I [dw]on't need \\d{2} apples"}},"quoted":{"type":"string","value":"Tom \"Dubs\" Preston-Werner"},"regex":{"type":"string","value":"\u003c\\i\\c*\\s*\u003e"},"winpath":{"type":"string","value":"C:\\Users\\nodejs\\templates"},"winpath2":{"type":"string","value":"\\\\ServerX\\admin$\\system32\\"}},"Multiline":{"key1":{"type":"string","value":"One\nTwo"},"key2":{"type":"string","value":"One\nTwo"},"key3":{"type":"string","value":"One\nTwo"}},"Multilined":{"Singleline":{"key1":{"type":"string","value":"The quick brown fox jumps over the lazy dog."},"key2":{"type":"string","value":"The quick brown fox jumps over the lazy dog."},"key3":{"type":"string","value":"The quick brown fox jumps over the lazy dog."}}},"basic":{"type":"string","value":"I'm a string. \"You can quote me\". Name\u0009José\nLocation\u0009SF."}},"Table":{"key":{"type":"string","value":"value"}},"dog":{"tater":{"type":{"type":"string","value":"pug"}}},"fruit":[{"name":{"type":"string","value":"apple"},"physical":{"color":{"type":"string","value":"red"},"shape":{"type":"string","value":"round"}},"variety":[{"name":{"type":"string","value":"red delicious"}},{"name":{"type":"string","value":"granny smith"}}]},{"name":{"type":"string","value":"banana"},"variety":[{"name":{"type":"string","value":"plantain"}}]}],"products":[{"name":{"type":"string","value":"Hammer"},"sku":{"type":"integer","value":"738594937"}},{},{"color":{"type":"string","value":"gray"},"name":{"type":"string","value":"Nail"},"sku":{"type":"integer","value":"284758393"}}],"x":{"y":{"z":{"w":{}}}}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..76aacc31aac95bf616a2ad758d651f7d45cda6ea
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,182 @@@
++# Comment
++# I am a comment. Hear me roar. Roar.
++
++# Table
++# Tables (also known as hash tables or dictionaries) are collections of key/value pairs.
++# They appear in square brackets on a line by themselves.
++
++[Table]
++
++key = "value" # Yeah, you can do this.
++
++# Nested tables are denoted by table names with dots in them. Name your tables whatever crap you please, just don't use #, ., [ or ].
++
++[dog.tater]
++type = "pug"
++
++# You don't need to specify all the super-tables if you don't want to. TOML knows how to do it for you.
++
++# [x] you
++# [x.y] don't
++# [x.y.z] need these
++[x.y.z.w] # for this to work
++
++# String
++# There are four ways to express strings: basic, multi-line basic, literal, and multi-line literal.
++# All strings must contain only valid UTF-8 characters.
++
++[String]
++basic = "I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF."
++
++[String.Multiline]
++
++# The following strings are byte-for-byte equivalent:
++key1 = "One\nTwo"
++key2 = """One\nTwo"""
++key3 = """
++One
++Two"""
++
++[String.Multilined.Singleline]
++
++# The following strings are byte-for-byte equivalent:
++key1 = "The quick brown fox jumps over the lazy dog."
++
++key2 = """
++The quick brown \
++
++
++  fox jumps over \
++    the lazy dog."""
++
++key3 = """\
++       The quick brown \
++       fox jumps over \
++       the lazy dog.\
++       """
++
++[String.Literal]
++
++# What you see is what you get.
++winpath  = 'C:\Users\nodejs\templates'
++winpath2 = '\\ServerX\admin$\system32\'
++quoted   = 'Tom "Dubs" Preston-Werner'
++regex    = '<\i\c*\s*>'
++
++
++[String.Literal.Multiline]
++
++regex2 = '''I [dw]on't need \d{2} apples'''
++lines  = '''
++The first newline is
++trimmed in raw strings.
++   All other whitespace
++   is preserved.
++'''
++
++# Integer
++# Integers are whole numbers. Positive numbers may be prefixed with a plus sign.
++# Negative numbers are prefixed with a minus sign.
++
++[Integer]
++key1 = +99
++key2 = 42
++key3 = 0
++key4 = -17
++
++# Float
++# A float consists of an integer part (which may be prefixed with a plus or minus sign)
++# followed by a fractional part and/or an exponent part.
++
++[Float.fractional]
++
++# fractional
++key1 = +1.0
++key2 = 3.1415
++key3 = -0.01
++
++[Float.exponent]
++
++# exponent
++#key1 = 5e+22
++#key2 = 1e6
++#key3 = -2E-2
++
++[Float.both]
++
++# both
++#key = 6.626e-34
++
++# Boolean
++# Booleans are just the tokens you're used to. Always lowercase.
++
++[Booleans]
++True = true
++False = false
++
++# Datetime
++# Datetimes are RFC 3339 dates.
++
++[Datetime]
++key1 = 1979-05-27T07:32:00Z
++#key2 = 1979-05-27T00:32:00-07:00
++#key3 = 1979-05-27T00:32:00.999999-07:00
++
++# Array
++# Arrays are square brackets with other primitives inside. Whitespace is ignored. Elements are separated by commas. Data types may not be mixed.
++
++[Array]
++key1 = [ 1, 2, 3 ]
++key2 = [ "red", "yellow", "green" ]
++key3 = [ [ 1, 2 ], [3, 4, 5] ]
++key4 = [ [ 1, 2 ], ["a", "b", "c"] ] # this is ok
++
++#Arrays can also be multiline. So in addition to ignoring whitespace, arrays also ignore newlines between the brackets.
++# Terminating commas are ok before the closing bracket.
++
++key5 = [
++  1, 2, 3
++]
++key6 = [
++  1,
++  2, # this is ok
++]
++
++# Array of Tables
++# These can be expressed by using a table name in double brackets.
++# Each table with the same double bracketed name will be an element in the array.
++# The tables are inserted in the order encountered.
++
++[[products]]
++name = "Hammer"
++sku = 738594937
++
++[[products]]
++
++[[products]]
++name = "Nail"
++sku = 284758393
++color = "gray"
++
++
++# You can create nested arrays of tables as well.
++
++[[fruit]]
++  name = "apple"
++
++  [fruit.physical]
++    color = "red"
++    shape = "round"
++
++  [[fruit.variety]]
++    name = "red delicious"
++
++  [[fruit.variety]]
++    name = "granny smith"
++
++[[fruit]]
++  name = "banana"
++
++  [[fruit.variety]]
++    name = "plantain"
++
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d5cac343a818c304a0522a300b2f0df248122a1c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"array":{"key1":{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"},{"type":"integer","value":"3"}]},"key2":{"type":"array","value":[{"type":"string","value":"red"},{"type":"string","value":"yellow"},{"type":"string","value":"green"}]},"key3":{"type":"array","value":[{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"}]},{"type":"array","value":[{"type":"integer","value":"3"},{"type":"integer","value":"4"},{"type":"integer","value":"5"}]}]},"key4":{"type":"array","value":[{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"}]},{"type":"array","value":[{"type":"string","value":"a"},{"type":"string","value":"b"},{"type":"string","value":"c"}]}]},"key5":{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"},{"type":"integer","value":"3"}]},"key6":{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"}]}},"boolean":{"False":{"type":"bool","value":"false"},"True":{"type":"bool","value":"true"}},"datetime":{},"float":{"both":{},"exponent":{},"fractional":{"key1":{"type":"float","value":"1.0"},"key2":{"type":"float","value":"3.1415"},"key3":{"type":"float","value":"-0.01"}},"underscores":{}},"fruit":[{"name":{"type":"string","value":"apple"},"physical":{"color":{"type":"string","value":"red"},"shape":{"type":"string","value":"round"}},"variety":[{"name":{"type":"string","value":"red delicious"}},{"name":{"type":"string","value":"granny smith"}}]},{"name":{"type":"string","value":"banana"},"variety":[{"name":{"type":"string","value":"plantain"}}]}],"integer":{"key1":{"type":"integer","value":"99"},"key2":{"type":"integer","value":"42"},"key3":{"type":"integer","value":"0"},"key4":{"type":"integer","value":"-17"},"underscores":{"key1":{"type":"integer","value":"1000"},"key2":{"type":"integer","value":"5349221"},"key3":{"type":"integer","value":"12345"}}},"products":[{"name":{"type":"string","value":"Hammer"},"sku":{"type":"integer","value":"738594937"}},{},{"color":{"type":"string","value":"gray"},"name":{"type":"string","value":"Nail"},"sku":{"type":"integer","value":"284758393"}}],"string":{"basic":{"basic":{"type":"string","value":"I'm a string. \"You can quote me\". Name\u0009José\nLocation\u0009SF."}},"literal":{"multiline":{"lines":{"type":"string","value":"The first newline is\ntrimmed in raw strings.\n   All other whitespace\n   is preserved.\n"},"regex2":{"type":"string","value":"I [dw]on't need \\d{2} apples"}},"quoted":{"type":"string","value":"Tom \"Dubs\" Preston-Werner"},"regex":{"type":"string","value":"\u003c\\i\\c*\\s*\u003e"},"winpath":{"type":"string","value":"C:\\Users\\nodejs\\templates"},"winpath2":{"type":"string","value":"\\\\ServerX\\admin$\\system32\\"}},"multiline":{"continued":{"key1":{"type":"string","value":"The quick brown fox jumps over the lazy dog."},"key2":{"type":"string","value":"The quick brown fox jumps over the lazy dog."},"key3":{"type":"string","value":"The quick brown fox jumps over the lazy dog."}},"key1":{"type":"string","value":"One\nTwo"},"key2":{"type":"string","value":"One\nTwo"},"key3":{"type":"string","value":"One\nTwo"}}},"table":{"inline":{"name":{"first":{"type":"string","value":"Tom"},"last":{"type":"string","value":"Preston-Werner"}},"point":{"x":{"type":"integer","value":"1"},"y":{"type":"integer","value":"2"}}},"key":{"type":"string","value":"value"},"subtable":{"key":{"type":"string","value":"another value"}}},"x":{"y":{"z":{"w":{}}}}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ffbcce0d9dfb13c1ceb2599fed11778d73de959f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,235 @@@
++################################################################################
++## Comment
++
++# Speak your mind with the hash symbol. They go from the symbol to the end of
++# the line.
++
++
++################################################################################
++## Table
++
++# Tables (also known as hash tables or dictionaries) are collections of
++# key/value pairs. They appear in square brackets on a line by themselves.
++
++[table]
++
++key = "value" # Yeah, you can do this.
++
++# Nested tables are denoted by table names with dots in them. Name your tables
++# whatever crap you please, just don't use #, ., [ or ].
++
++[table.subtable]
++
++key = "another value"
++
++# You don't need to specify all the super-tables if you don't want to. TOML
++# knows how to do it for you.
++
++# [x] you
++# [x.y] don't
++# [x.y.z] need these
++[x.y.z.w] # for this to work
++
++
++################################################################################
++## Inline Table
++
++# Inline tables provide a more compact syntax for expressing tables. They are
++# especially useful for grouped data that can otherwise quickly become verbose.
++# Inline tables are enclosed in curly braces `{` and `}`. No newlines are
++# allowed between the curly braces unless they are valid within a value.
++
++[table.inline]
++
++name = { first = "Tom", last = "Preston-Werner" }
++point = { x = 1, y = 2 }
++
++
++################################################################################
++## String
++
++# There are four ways to express strings: basic, multi-line basic, literal, and
++# multi-line literal. All strings must contain only valid UTF-8 characters.
++
++[string.basic]
++
++basic = "I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF."
++
++[string.multiline]
++
++# The following strings are byte-for-byte equivalent:
++key1 = "One\nTwo"
++key2 = """One\nTwo"""
++key3 = """
++One
++Two"""
++
++[string.multiline.continued]
++
++# The following strings are byte-for-byte equivalent:
++key1 = "The quick brown fox jumps over the lazy dog."
++
++key2 = """
++The quick brown \
++
++
++  fox jumps over \
++    the lazy dog."""
++
++key3 = """\
++       The quick brown \
++       fox jumps over \
++       the lazy dog.\
++       """
++
++[string.literal]
++
++# What you see is what you get.
++winpath  = 'C:\Users\nodejs\templates'
++winpath2 = '\\ServerX\admin$\system32\'
++quoted   = 'Tom "Dubs" Preston-Werner'
++regex    = '<\i\c*\s*>'
++
++
++[string.literal.multiline]
++
++regex2 = '''I [dw]on't need \d{2} apples'''
++lines  = '''
++The first newline is
++trimmed in raw strings.
++   All other whitespace
++   is preserved.
++'''
++
++
++################################################################################
++## Integer
++
++# Integers are whole numbers. Positive numbers may be prefixed with a plus sign.
++# Negative numbers are prefixed with a minus sign.
++
++[integer]
++
++key1 = +99
++key2 = 42
++key3 = 0
++key4 = -17
++
++[integer.underscores]
++
++# For large numbers, you may use underscores to enhance readability. Each
++# underscore must be surrounded by at least one digit.
++key1 = 1_000
++key2 = 5_349_221
++key3 = 1_2_3_4_5     # valid but inadvisable
++
++
++################################################################################
++## Float
++
++# A float consists of an integer part (which may be prefixed with a plus or
++# minus sign) followed by a fractional part and/or an exponent part.
++
++[float.fractional]
++
++key1 = +1.0
++key2 = 3.1415
++key3 = -0.01
++
++[float.exponent]
++
++[float.both]
++
++[float.underscores]
++
++
++################################################################################
++## Boolean
++
++# Booleans are just the tokens you're used to. Always lowercase.
++
++[boolean]
++
++True = true
++False = false
++
++
++################################################################################
++## Datetime
++
++# Datetimes are RFC 3339 dates.
++
++[datetime]
++
++#key1 = 1979-05-27T07:32:00Z
++#key2 = 1979-05-27T00:32:00-07:00
++#key3 = 1979-05-27T00:32:00.999999-07:00
++
++
++################################################################################
++## Array
++
++# Arrays are square brackets with other primitives inside. Whitespace is
++# ignored. Elements are separated by commas. Data types may not be mixed.
++
++[array]
++
++key1 = [ 1, 2, 3 ]
++key2 = [ "red", "yellow", "green" ]
++key3 = [ [ 1, 2 ], [3, 4, 5] ]
++key4 = [ [ 1, 2 ], ["a", "b", "c"] ] # this is ok
++
++# Arrays can also be multiline. So in addition to ignoring whitespace, arrays
++# also ignore newlines between the brackets.  Terminating commas are ok before
++# the closing bracket.
++
++key5 = [
++  1, 2, 3
++]
++key6 = [
++  1,
++  2, # this is ok
++]
++
++
++################################################################################
++## Array of Tables
++
++# These can be expressed by using a table name in double brackets. Each table
++# with the same double bracketed name will be an element in the array. The
++# tables are inserted in the order encountered.
++
++[[products]]
++
++name = "Hammer"
++sku = 738594937
++
++[[products]]
++
++[[products]]
++
++name = "Nail"
++sku = 284758393
++color = "gray"
++
++
++# You can create nested arrays of tables as well.
++
++[[fruit]]
++  name = "apple"
++
++  [fruit.physical]
++    color = "red"
++    shape = "round"
++
++  [[fruit.variety]]
++    name = "red delicious"
++
++  [[fruit.variety]]
++    name = "granny smith"
++
++[[fruit]]
++  name = "banana"
++
++  [[fruit.variety]]
++    name = "plantain"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..48aa90784a4ebfac654c8288a86d65fbf842dfcd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++{
++  "best-day-ever": {"type": "datetime", "value": "1987-07-05T17:45:00Z"},
++  "numtheory": {
++    "boring": {"type": "bool", "value": "false"},
++    "perfection": {
++      "type": "array",
++      "value": [
++        {"type": "integer", "value": "6"},
++        {"type": "integer", "value": "28"},
++        {"type": "integer", "value": "496"}
++      ]
++    }
++  }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8cb02e01b03485b173b5aa3eb945c8fc95fb4b19
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++best-day-ever = 1987-07-05T17:45:00Z
++
++[numtheory]
++boring = false
++perfection = [6, 28, 496]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3249a974fba77cffe449864a1b84da40f2d268af
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"clients":{"data":{"type":"array","value":[{"type":"array","value":[{"type":"string","value":"gamma"},{"type":"string","value":"delta"}]},{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"}]}]},"hosts":{"type":"array","value":[{"type":"string","value":"alpha"},{"type":"string","value":"omega"}]}},"database":{"connection_max":{"type":"integer","value":"5000"},"enabled":{"type":"bool","value":"true"},"ports":{"type":"array","value":[{"type":"integer","value":"8001"},{"type":"integer","value":"8001"},{"type":"integer","value":"8002"}]},"server":{"type":"string","value":"192.168.1.1"}},"owner":{"bio":{"type":"string","value":"GitHub Cofounder \u0026 CEO\nLikes tater tots and beer."},"dob":{"type":"datetime","value":"1979-05-27T07:32:00Z"},"name":{"type":"string","value":"Tom Preston-Werner"},"organization":{"type":"string","value":"GitHub"}},"products":[{"name":{"type":"string","value":"Hammer"},"sku":{"type":"integer","value":"738594937"}},{"color":{"type":"string","value":"gray"},"name":{"type":"string","value":"Nail"},"sku":{"type":"integer","value":"284758393"}}],"servers":{"alpha":{"dc":{"type":"string","value":"eqdc10"},"ip":{"type":"string","value":"10.0.0.1"}},"beta":{"country":{"type":"string","value":"中国"},"dc":{"type":"string","value":"eqdc10"},"ip":{"type":"string","value":"10.0.0.2"}}},"title":{"type":"string","value":"TOML Example"}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bc12c990160499e2dc6bc02ef3fd5064c9853bd5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,47 @@@
++# This is a TOML document. Boom.
++
++title = "TOML Example"
++
++[owner]
++name = "Tom Preston-Werner"
++organization = "GitHub"
++bio = "GitHub Cofounder & CEO\nLikes tater tots and beer."
++dob = 1979-05-27T07:32:00Z # First class dates? Why not?
++
++[database]
++server = "192.168.1.1"
++ports = [ 8001, 8001, 8002 ]
++connection_max = 5000
++enabled = true
++
++[servers]
++
++  # You can indent as you please. Tabs or spaces. TOML don't care.
++  [servers.alpha]
++  ip = "10.0.0.1"
++  dc = "eqdc10"
++
++  [servers.beta]
++  ip = "10.0.0.2"
++  dc = "eqdc10"
++  country = "中国" # This should be parsed as UTF-8
++
++[clients]
++data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it
++
++# Line breaks are OK when inside arrays
++hosts = [
++  "alpha",
++  "omega"
++]
++
++# Products
++
++  [[products]]
++  name = "Hammer"
++  sku = 738594937
++
++  [[products]]
++  name = "Nail"
++  sku = 284758393
++  color = "gray"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b8a2e97581ff06720ca20e97dff402af212966a1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,4 @@@
++{
++    "pi": {"type": "float", "value": "3.14"},
++    "negpi": {"type": "float", "value": "-3.14"}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7c528d200c3718edc1bb9df5f7858274fc932804
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++pi = 3.14
++negpi = -3.14
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9762e58ef3563ed5d63a51966f7bb87257a413f7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"the":{"hard":{"another_test_string":{"type":"string","value":" Same thing, but with a string #"},"bit#":{"multi_line_array":{"type":"array","value":[{"type":"string","value":"]"}]},"what?":{"type":"string","value":"You don't think some user won't do that?"}},"harder_test_string":{"type":"string","value":" And when \"'s are in the string, along with # \""},"test_array":{"type":"array","value":[{"type":"string","value":"] "},{"type":"string","value":" # "}]},"test_array2":{"type":"array","value":[{"type":"string","value":"Test #11 ]proved that"},{"type":"string","value":"Experiment #9 was a success"}]}},"test_string":{"type":"string","value":"You'll hate me after this - #"}}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..38856c8737a8e8066b1204d85b676883e2a292c2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,33 @@@
++# Test file for TOML
++# Only this one tries to emulate a TOML file written by a user of the kind of parser writers probably hate
++# This part you'll really hate
++
++[the]
++test_string = "You'll hate me after this - #"          # " Annoying, isn't it?
++
++    [the.hard]
++    test_array = [ "] ", " # "]      # ] There you go, parse this!
++    test_array2 = [ "Test #11 ]proved that", "Experiment #9 was a success" ]
++    # You didn't think it'd as easy as chucking out the last #, did you?
++    another_test_string = " Same thing, but with a string #"
++    harder_test_string = " And when \"'s are in the string, along with # \""   # "and comments are there too"
++    # Things will get harder
++
++        [the.hard."bit#"]
++        "what?" = "You don't think some user won't do that?"
++        multi_line_array = [
++            "]",
++            # ] Oh yes I did
++            ]
++
++# Each of the following keygroups/key value pairs should produce an error. Uncomment to them to test
++
++#[error]   if you didn't catch this, your parser is broken
++#string = "Anything other than tabs, spaces and newline after a keygroup or key value pair has ended should produce an error unless it is a comment"   like this
++#array = [
++#         "This might most likely happen in multiline arrays",
++#         Like here,
++#         "or here,
++#         and here"
++#         ]     End of array comment, forgot the #
++#number = 3.14  pi <--again forgot the #
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..374bd09343ef1d81cafec48b639e527be6346bbe
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,10 @@@
++{
++    "a": {
++        "better": {"type": "integer", "value": "43"},
++        "b": {
++            "c": {
++                "answer": {"type": "integer", "value": "42"}
++            }
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c0e8865b392c2878cba97ed38b671172d3e6d94d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++[a.b.c]
++answer = 42
++
++[a]
++better = 43
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..374bd09343ef1d81cafec48b639e527be6346bbe
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,10 @@@
++{
++    "a": {
++        "better": {"type": "integer", "value": "43"},
++        "b": {
++            "c": {
++                "answer": {"type": "integer", "value": "42"}
++            }
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..eee68ff5143aa00cb613f7737512d9fa225b2531
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++[a]
++better = 43
++
++[a.b.c]
++answer = 42
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fbae7fc71beff10669df6cc1f27daebd691f89c5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,9 @@@
++{
++    "a": {
++        "b": {
++            "c": {
++                "answer": {"type": "integer", "value": "42"}
++            }
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b6333e49d577e895c34e26f0b50d30d037f10b67
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++[a.b.c]
++answer = 42
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..61985a1e97ce2f6ee5db42222ffdb4ef9cdc4e7f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,4 @@@
++{
++    "answer": {"type": "integer", "value": "42"},
++    "neganswer": {"type": "integer", "value": "-42"}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c4f62972cb2f1ed8ed4ad31269cbb76260229942
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++answer = 42
++neganswer = -42
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1f8709ab9f46f7312d2eb04fef672ce0b2027f85
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++{
++    "answer": {"type": "integer", "value": "42"}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..560901c5a43f20751e78d665433bdd1d03f64aeb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++answer=42
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..12473e42027a4b789fe296b1189e08b2be7c452f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++{
++    "\n": {"type": "integer", "value": "1"}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a2639bfbb7210f8e65d3555ba1c32ce750d85ce5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++"\n" = 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9d1f76911d523c71bd1ec154430c7760ad3bcb11
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++{
++    "a b": {"type": "integer", "value": "1"}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f4f36c4f6df2c06466ffd59b76a319e663bf27b3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++"a b" = 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6550ebda2326dc9d42c30e1ca920ce1a42b7209f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++{
++    "~!@#$^&*()_+-`1234567890[]\\|/?><.,;:'": {
++        "type": "integer", "value": "1"
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..dc43625d232e9467bbb364866a46a57f076c422b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++"~!@#$^&*()_+-`1234567890[]\\|/?><.,;:'" = 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ee39e1de4cb5e33eb3d014f28c1fb60777e553c5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++{
++    "key#name": {"type": "integer", "value": "5"}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..65b766fd1576971f902dbac4c8befed56eb3418b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++"key#name" = 5
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8ceed47971ef09417f6ddcaed4e55d88c70c5edf
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,4 @@@
++{
++    "longpi": {"type": "float", "value": "3.141592653589793"},
++    "neglongpi": {"type": "float", "value": "-3.141592653589793"}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9558ae47c023ffef9327ea0a9813dbca99cd9f9d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++longpi = 3.141592653589793
++neglongpi = -3.141592653589793
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..16c331ed3983adc8e6cfdd9eab79c9b981876907
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,4 @@@
++{
++    "answer": {"type": "integer", "value": "9223372036854775807"},
++    "neganswer": {"type": "integer", "value": "-9223372036854775808"}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..424a13ac2af1b3987c94d02634c8d1b2e588027e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++answer = 9223372036854775807
++neganswer = -9223372036854775808
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..075bf505464b5528ebfb2b7c41cafc5be7055242
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++{
++    "multiline_empty_one": {
++        "type": "string",
++        "value": ""
++    },
++    "multiline_empty_two": {
++        "type": "string",
++        "value": ""
++    },
++    "multiline_empty_three": {
++        "type": "string",
++        "value": ""
++    },
++    "multiline_empty_four": {
++        "type": "string",
++        "value": ""
++    },
++    "equivalent_one": {
++        "type": "string",
++        "value": "The quick brown fox jumps over the lazy dog."
++    },
++    "equivalent_two": {
++        "type": "string",
++        "value": "The quick brown fox jumps over the lazy dog."
++    },
++    "equivalent_three": {
++        "type": "string",
++        "value": "The quick brown fox jumps over the lazy dog."
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..15b11434ff00960720b8895d4678703e8204f5a0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,23 @@@
++multiline_empty_one = """"""
++multiline_empty_two = """
++"""
++multiline_empty_three = """\
++    """
++multiline_empty_four = """\
++   \
++   \
++   """
++
++equivalent_one = "The quick brown fox jumps over the lazy dog."
++equivalent_two = """
++The quick brown \
++
++
++  fox jumps over \
++    the lazy dog."""
++
++equivalent_three = """\
++       The quick brown \
++       fox jumps over \
++       the lazy dog.\
++       """
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b43cce5a2d173310d6776ff353eed2786ec92bdb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++{
++    "oneline": {
++        "type": "string",
++        "value": "This string has a ' quote character."
++    },
++    "firstnl": {
++        "type": "string",
++        "value": "This string has a ' quote character."
++    },
++    "multiline": {
++        "type": "string",
++        "value": "This string\nhas ' a quote character\nand more than\none newline\nin it."
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8094c03e31a404e91b1b6c054817c1b7a6b4ddbb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,9 @@@
++oneline = '''This string has a ' quote character.'''
++firstnl = '''
++This string has a ' quote character.'''
++multiline = '''
++This string
++has ' a quote character
++and more than
++one newline
++in it.'''
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..693ab9b54a493b0d68474865d10a4685c8e0a71e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++{
++    "backspace": {
++        "type": "string",
++        "value": "This string has a \\b backspace character."
++    },
++    "tab": {
++        "type": "string",
++        "value": "This string has a \\t tab character."
++    },
++    "newline": {
++        "type": "string",
++        "value": "This string has a \\n new line character."
++    },
++    "formfeed": {
++        "type": "string",
++        "value": "This string has a \\f form feed character."
++    },
++    "carriage": {
++        "type": "string",
++        "value": "This string has a \\r carriage return character."
++    },
++    "slash": {
++        "type": "string",
++        "value": "This string has a \\/ slash character."
++    },
++    "backslash": {
++        "type": "string",
++        "value": "This string has a \\\\ backslash character."
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..92acd2557c4c2a5fd102d8af064d1b7e851e04c3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7 @@@
++backspace = 'This string has a \b backspace character.'
++tab = 'This string has a \t tab character.'
++newline = 'This string has a \n new line character.'
++formfeed = 'This string has a \f form feed character.'
++carriage = 'This string has a \r carriage return character.'
++slash = 'This string has a \/ slash character.'
++backslash = 'This string has a \\ backslash character.'
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6c26d695b29a61190329debbbbce605672f70a14
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++{
++    "answer": {
++        "type": "string",
++        "value": ""
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e37e6815bc73dd2bc5d0b7b9037b8c79d7125306
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++answer = ""
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..62dac5178fb3c2b4e0d831f1df824e83986b0805
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,50 @@@
++{
++    "backspace": {
++        "type": "string",
++        "value": "This string has a \u0008 backspace character."
++    },
++    "tab": {
++        "type": "string",
++        "value": "This string has a \u0009 tab character."
++    },
++    "newline": {
++        "type": "string",
++        "value": "This string has a \u000A new line character."
++    },
++    "formfeed": {
++        "type": "string",
++        "value": "This string has a \u000C form feed character."
++    },
++    "carriage": {
++        "type": "string",
++        "value": "This string has a \u000D carriage return character."
++    },
++    "quote": {
++        "type": "string",
++        "value": "This string has a \u0022 quote character."
++    },
++    "slash": {
++        "type": "string",
++        "value": "This string has a \u002F slash character."
++    },
++    "backslash": {
++        "type": "string",
++        "value": "This string has a \u005C backslash character."
++    },
++    "notunicode1": {
++        "type": "string",
++        "value": "This string does not have a unicode \\u escape."
++    },
++    "notunicode2": {
++        "type": "string",
++        "value": "This string does not have a unicode \u005Cu escape."
++    },
++    "notunicode3": {
++        "type": "string",
++        "value": "This string does not have a unicode \\u0075 escape."
++    },
++    "notunicode4": {
++        "type": "string",
++        "value": "This string does not have a unicode \\\u0075 escape."
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c5d495428a12078cdad894309cb3cfaf01192eb8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++backspace = "This string has a \b backspace character."
++tab = "This string has a \t tab character."
++newline = "This string has a \n new line character."
++formfeed = "This string has a \f form feed character."
++carriage = "This string has a \r carriage return character."
++quote = "This string has a \" quote character."
++slash = "This string has a / slash character."
++backslash = "This string has a \\ backslash character."
++notunicode1 = "This string does not have a unicode \\u escape."
++notunicode2 = "This string does not have a unicode \u005Cu escape."
++notunicode3 = "This string does not have a unicode \\u0075 escape."
++notunicode4 = "This string does not have a unicode \\\u0075 escape."
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2e05f99b4d181a5826b1a9c90afbc01139b734ed
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++{
++    "answer": {
++        "type": "string",
++        "value": "You are not drinking enough whisky."
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e17ade6237b7ba9900f1f90dc5969f83d454d897
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++answer = "You are not drinking enough whisky."
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..33cdc9c4b58c814213856756014785bd683eac1c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7 @@@
++{
++    "pound": {"type": "string", "value": "We see no # comments here."},
++    "poundcomment": {
++        "type": "string",
++        "value": "But there are # some comments here."
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5fd87466dff05ebe69f6488aeef45951678aabd2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++pound = "We see no # comments here."
++poundcomment = "But there are # some comments here." # Did I # mess you up?
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..32e464012d63d21251e3195ec5aa45c4f8f6dda0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7 @@@
++{
++    "albums": {
++       "songs": [
++           {"name": {"type": "string", "value": "Glory Days"}}
++       ]
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3157ac981d37991ea98e6191aaac27b6983d2c60
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++[[albums.songs]]
++name = "Glory Days"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..84df2dabb0d6b5f2a61719a348db8b8bd0084314
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++{
++    "people": [
++        {
++            "first_name": {"type": "string", "value": "Bruce"},
++            "last_name": {"type": "string", "value": "Springsteen"}
++        },
++        {
++            "first_name": {"type": "string", "value": "Eric"},
++            "last_name": {"type": "string", "value": "Clapton"}
++        },
++        {
++            "first_name": {"type": "string", "value": "Bob"},
++            "last_name": {"type": "string", "value": "Seger"}
++        }
++    ]
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..46062beb8e747400602845f40ad477219286afa6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,11 @@@
++[[people]]
++first_name = "Bruce"
++last_name = "Springsteen"
++
++[[people]]
++first_name = "Eric"
++last_name = "Clapton"
++
++[[people]]
++first_name = "Bob"
++last_name = "Seger"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7537b1a1940582e1d3ba8cb721b36f6b85840fef
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++{
++    "albums": [
++        {
++            "songs": [{}, {}]
++        }
++    ],
++    "artists": [
++        {
++            "home": {
++                "address": {}
++            }
++        }
++    ]
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ad6eb106303dc619c412fba7d95e3a63cb05cc7f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++[[ albums ]]
++  [[ albums.songs ]]
++  [[ albums.songs ]]
++
++[[ artists ]]
++  [ artists.home.address ]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c117afa40d4d071881ce45bf1e94cd4c7d80e7c1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,18 @@@
++{
++    "albums": [
++        {
++            "name": {"type": "string", "value": "Born to Run"},
++            "songs": [
++                {"name": {"type": "string", "value": "Jungleland"}},
++                {"name": {"type": "string", "value": "Meeting Across the River"}}
++            ]
++        },
++        {
++            "name": {"type": "string", "value": "Born in the USA"},
++            "songs": [
++                {"name": {"type": "string", "value": "Glory Days"}},
++                {"name": {"type": "string", "value": "Dancing in the Dark"}}
++            ]
++        }
++    ]
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d659a3d9470c50ebd93b6617ca2f32bc0c5d95ce
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++[[albums]]
++name = "Born to Run"
++
++  [[albums.songs]]
++  name = "Jungleland"
++
++  [[albums.songs]]
++  name = "Meeting Across the River"
++
++[[albums]]
++name = "Born in the USA"
++  
++  [[albums.songs]]
++  name = "Glory Days"
++
++  [[albums.songs]]
++  name = "Dancing in the Dark"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d75faaeb23904a8a058aafa0851dc862af9f7ad8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,8 @@@
++{
++    "people": [
++        {
++            "first_name": {"type": "string", "value": "Bruce"},
++            "last_name": {"type": "string", "value": "Springsteen"}
++        }
++    ]
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..cd7e1b690711019d512be5d61db9341bca3c5e48
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++[[people]]
++first_name = "Bruce"
++last_name = "Springsteen"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6f3873af6b2f8cc8a857ac78732f90fc3652dff4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++{
++    "a": {}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8bb6a0aa07ea695561c000d4ea4950c7166b2d3e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++[a]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a6e17c926d7a0caf8979aa98f0cfb7b775d58b9f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++{
++    "a": { "b": {} },
++    "b": {},
++    "c": { "a": {} }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2266ed2d48b484f9d619e0e9a6a1f0455f4fe140
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++[a]
++[a.b]
++[b]
++[c]
++[c.a]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..97877708e6d9bf99aa327d1b1724e188ac9c8861
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++{
++    "a": { "b": {} }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..70b7fe11c3d12f9342824e8b9e0c2c996123a26d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++[a]
++[a.b]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3a73ec864537ed691c180813d373bf08e68fd0a4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++{
++    "valid key": {}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..daf881d13a560c4b24fa231039ead3322d6bf42b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++["valid key"]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5e594e419198105161ea83f1ebd86c9b82acbee3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++{
++    "key#group": {
++        "answer": {"type": "integer", "value": "42"}
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..33f2c4fd6cf02ef95585356cd18cff60d7f6d362
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++["key#group"]
++answer = 42
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..32948c6202e5a89df59fe4c43005dd3dd854c031
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++{
++    "answer1": {"type": "string", "value": "\u000B"},
++    "answer4": {"type": "string", "value": "\u03B4α"},
++    "answer8": {"type": "string", "value": "\u03B4β"}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c0d5a25bfdf420b5aaed2c52f916677ae0e2a727
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++answer1 = "\u000B"
++answer4 = "\u03B4α"
++answer8 = "\U000003B4β"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..00aa2f8325ecb5099e31af7b28577e3d9588b5cd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++{
++    "answer": {"type": "string", "value": "δ"}
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c65723ca1d273aa9e003158e65450e8cecca266b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++answer = "δ"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f73f1762d2ddc7a6910e2633fc46b357bcdd6304
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"71d28ea36bbd9192d75bd9fa9b39f96ddb986eaee824adae5d53b6e51919b2f3"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8a080b8358d45125405e04a1057647d9f0199d07
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++[package]
++name = "userenv-sys"
++version = "0.2.0"
++authors = ["Peter Atashian <retep998@gmail.com>"]
++description = "Contains function definitions for the Windows API library userenv. See winapi for types and constants."
++documentation = "https://retep998.github.io/doc/userenv/"
++repository = "https://github.com/retep998/winapi-rs"
++readme = "README.md"
++keywords = ["windows", "ffi", "win32"]
++license = "MIT"
++build = "build.rs"
++[lib]
++name = "userenv"
++[dependencies]
++winapi = { version = "0.2.5", path = "../.." }
++[build-dependencies]
++winapi-build = { version = "0.1.1", path = "../../build" }
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4685dece14d8ead9a7f947e9ad12568abef167ea
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++# userenv #
++Contains function definitions for the Windows API library userenv. See winapi for types and constants.
++
++```toml
++[dependencies]
++userenv-sys = "0.0.1"
++```
++
++```rust
++extern crate userenv;
++```
++
++[Documentation](https://retep998.github.io/doc/userenv/)
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a707d207b5b276affa1174a00713b17f746b8cda
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++// Copyright © 2015, Peter Atashian
++// Licensed under the MIT License <LICENSE.md>
++extern crate build;
++fn main() {
++    build::link("userenv", false)
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..25dd72b6c614307276321d257fecd0b4d542848e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,95 @@@
++// Copyright © 2015, Peter Atashian
++// Licensed under the MIT License <LICENSE.md>
++//! FFI bindings to userenv.
++#![cfg(windows)]
++extern crate winapi;
++use winapi::*;
++extern "system" {
++    // pub fn AreThereVisibleLogoffScripts();
++    // pub fn AreThereVisibleShutdownScripts();
++    // pub fn CheckDirectoryOwnership();
++    // pub fn CheckXForestLogon();
++    // pub fn CopyProfileDirectoryEx2();
++    // pub fn CreateAppContainerProfile();
++    // pub fn CreateAppContainerProfileInternal();
++    // pub fn CreateDirectoryJunctionsForSystem();
++    // pub fn CreateDirectoryJunctionsForUserProfile();
++    pub fn CreateEnvironmentBlock(
++        lpEnvironment: *mut LPVOID, hToken: HANDLE, bInherit: BOOL,
++    ) -> BOOL;
++    // pub fn CreateGroupEx();
++    // pub fn CreateLinkFileEx();
++    pub fn CreateProfile(
++        pszUserSid: LPCWSTR, pszUserName: LPCWSTR, pszProfilePath: LPWSTR, cchProfilePath: DWORD,
++    ) -> HRESULT;
++    // pub fn DeleteAppContainerProfile();
++    // pub fn DeleteAppContainerProfileInternal();
++    // pub fn DeleteGroup();
++    // pub fn DeleteLinkFile();
++    pub fn DeleteProfileA(
++        lpSidString: LPCSTR, lpProfilePath: LPCSTR, lpComputerName: LPCSTR,
++    ) -> BOOL;
++    // pub fn DeleteProfileDirectory();
++    pub fn DeleteProfileW(
++        lpSidString: LPCWSTR, lpProfilePath: LPCWSTR, lpComputerName: LPCWSTR,
++    ) -> BOOL;
++    // pub fn DeriveAppContainerSidFromAppContainerName();
++    // pub fn DeriveRestrictedAppContainerSidFromAppContainerSidAndRestrictedName();
++    pub fn DestroyEnvironmentBlock(lpEnvironment: LPVOID) -> BOOL;
++    pub fn EnterCriticalPolicySection(bMachine: BOOL) -> HANDLE;
++    pub fn ExpandEnvironmentStringsForUserA(
++        hToken: HANDLE, lpSrc: LPCSTR, lpDest: LPSTR, dwSize: DWORD,
++    ) -> BOOL;
++    pub fn ExpandEnvironmentStringsForUserW(
++        hToken: HANDLE, lpSrc: LPCWSTR, lpDest: LPWSTR, dwSize: DWORD,
++    ) -> BOOL;
++    // pub fn ForceSyncFgPolicy();
++    // pub fn FreeGPOListA();
++    // pub fn FreeGPOListW();
++    // pub fn GenerateGPNotification();
++    pub fn GetAllUsersProfileDirectoryA(lpProfileDir: LPSTR, lpcchSize: LPDWORD) -> BOOL;
++    pub fn GetAllUsersProfileDirectoryW(lpProfileDir: LPWSTR, lpcchSize: LPDWORD) -> BOOL;
++    // pub fn GetAppContainerFolderPath();
++    // pub fn GetAppContainerRegistryLocation();
++    // pub fn GetAppliedGPOListA();
++    // pub fn GetAppliedGPOListW();
++    pub fn GetDefaultUserProfileDirectoryA(lpProfileDir: LPSTR, lpcchSize: LPDWORD) -> BOOL;
++    pub fn GetDefaultUserProfileDirectoryW(lpProfileDir: LPWSTR, lpcchSize: LPDWORD) -> BOOL;
++    // pub fn GetGPOListA();
++    // pub fn GetGPOListW();
++    // pub fn GetLongProfilePathName();
++    // pub fn GetNextFgPolicyRefreshInfo();
++    // pub fn GetPreviousFgPolicyRefreshInfo();
++    pub fn GetProfileType(dwFlags: *mut DWORD) -> BOOL;
++    pub fn GetProfilesDirectoryA(lpProfileDir: LPSTR, lpcchSize: LPDWORD) -> BOOL;
++    pub fn GetProfilesDirectoryW(lpProfileDir: LPWSTR, lpcchSize: LPDWORD) -> BOOL;
++    pub fn GetUserProfileDirectoryA(
++        hToken: HANDLE, lpProfileDir: LPSTR, lpcchSize: LPDWORD,
++    ) -> BOOL;
++    // pub fn GetUserProfileDirectoryForUserSidW();
++    pub fn GetUserProfileDirectoryW(
++        hToken: HANDLE, lpProfileDir: LPWSTR, lpcchSize: LPDWORD,
++    ) -> BOOL;
++    // pub fn HasPolicyForegroundProcessingCompleted();
++    // pub fn IsAppContainerProfilePresentInternal();
++    pub fn LeaveCriticalPolicySection(hSection: HANDLE) -> BOOL;
++    // pub fn LoadUserProfileA(hToken: HANDLE, lpProfileInfo: LPPROFILEINFOA) -> BOOL;
++    // pub fn LoadUserProfileW(hToken: HANDLE, lpProfileInfo: LPPROFILEINFOW) -> BOOL;
++    // pub fn LookupAppContainerDisplayName();
++    // pub fn PingComputer();
++    // pub fn ProcessGroupPolicyCompleted();
++    // pub fn ProcessGroupPolicyCompletedEx();
++    pub fn RefreshPolicy(bMachine: BOOL) -> BOOL;
++    pub fn RefreshPolicyEx(bMachine: BOOL, dwOptions: DWORD) -> BOOL;
++    pub fn RegisterGPNotification(hEvent: HANDLE, bMachine: BOOL) -> BOOL;
++    // pub fn RemapProfile();
++    // pub fn RsopAccessCheckByType();
++    // pub fn RsopFileAccessCheck();
++    // pub fn RsopResetPolicySettingStatus();
++    // pub fn RsopSetPolicySettingStatus();
++    pub fn UnloadUserProfile(hToken: HANDLE, hProfile: HANDLE) -> BOOL;
++    pub fn UnregisterGPNotification(hEvent: HANDLE) -> BOOL;
++    // pub fn UpdateAppContainerProfile();
++    // pub fn WaitForMachinePolicyForegroundProcessing();
++    // pub fn WaitForUserPolicyForegroundProcessing();
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a2a0d4eeb5c630c0a45e5f3a6d332883c8770d0b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{"files":{},"package":"bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff"}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..98db00c4b71497e93f1ecba4869e7223c194aeb5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++language: rust
++rust:
++  - 1.10.0
++  - stable
++  - beta
++  - nightly
++script:
++  - cargo build --verbose
++  - cargo test --verbose
++  - cargo doc
++branches:
++  only:
++    - master
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bb9c20a094e41b7632d63bcff20c0b4b95e80777
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++This project is dual-licensed under the Unlicense and MIT licenses.
++
++You may use this code under the terms of either license.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..34a7b5b24987eae1372e7c8887505a787fb69053
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++[package]
++name = "walkdir"
++version = "1.0.7"  #:version
++authors = ["Andrew Gallant <jamslam@gmail.com>"]
++description = "Recursively walk a directory."
++documentation = "https://docs.rs/walkdir/"
++homepage = "https://github.com/BurntSushi/walkdir"
++repository = "https://github.com/BurntSushi/walkdir"
++readme = "README.md"
++keywords = ["directory", "recursive", "walk", "iterator"]
++license = "Unlicense/MIT"
++
++[dependencies]
++same-file = "0.1.1"
++
++[target.'cfg(windows)'.dependencies]
++kernel32-sys = "0.2"
++winapi = "0.2"
++
++[dev-dependencies]
++docopt = "0.7"
++quickcheck = { version = "0.4", default-features = false }
++rand = "0.3"
++rustc-serialize = "0.3"
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3b0a5dc09c1e16357459ddc9182a50f360f3cdba
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++The MIT License (MIT)
++
++Copyright (c) 2015 Andrew Gallant
++
++Permission is hereby granted, free of charge, to any person obtaining a copy
++of this software and associated documentation files (the "Software"), to deal
++in the Software without restriction, including without limitation the rights
++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++copies of the Software, and to permit persons to whom the Software is
++furnished to do so, subject to the following conditions:
++
++The above copyright notice and this permission notice shall be included in
++all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++THE SOFTWARE.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9f956f4c43387ec4dd901db1c0f1ad0c844b8027
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++all:
++      echo Nothing to do...
++
++ctags:
++      ctags --recurse --options=ctags.rust --languages=Rust
++
++docs:
++      cargo doc
++      in-dir ./target/doc fix-perms
++      rscp ./target/doc/* gopher:~/www/burntsushi.net/rustdoc/
++
++push:
++      git push origin master
++      git push github master
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ee525de76fc4a27f049d30b7c2065510d4b9f5e1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,140 @@@
++walkdir
++=======
++A cross platform Rust library for efficiently walking a directory recursively.
++Comes with support for following symbolic links, controlling the number of
++open file descriptors and efficient mechanisms for pruning the entries in the
++directory tree.
++
++[![Linux build status](https://api.travis-ci.org/BurntSushi/walkdir.svg)](https://travis-ci.org/BurntSushi/walkdir)
++[![Windows build status](https://ci.appveyor.com/api/projects/status/github/BurntSushi/walkdir?svg=true)](https://ci.appveyor.com/project/BurntSushi/walkdir)
++[![](http://meritbadge.herokuapp.com/walkdir)](https://crates.io/crates/walkdir)
++
++Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
++
++### Documentation
++
++[docs.rs/walkdir](https://docs.rs/walkdir/)
++
++### Usage
++
++To use this crate, add `walkdir` as a dependency to your project's
++`Cargo.toml`:
++
++```
++[dependencies]
++walkdir = "1"
++```
++
++### Example
++
++The following code recursively iterates over the directory given and prints
++the path for each entry:
++
++```rust,no_run
++use walkdir::WalkDir;
++
++for entry in WalkDir::new("foo") {
++    let entry = entry.unwrap();
++    println!("{}", entry.path().display());
++}
++```
++
++Or, if you'd like to iterate over all entries and ignore any errors that may
++arise, use `filter_map`. (e.g., This code below will silently skip directories
++that the owner of the running process does not have permission to access.)
++
++```rust,no_run
++use walkdir::WalkDir;
++
++for entry in WalkDir::new("foo").into_iter().filter_map(|e| e.ok()) {
++    println!("{}", entry.path().display());
++}
++```
++
++### Example: follow symbolic links
++
++The same code as above, except `follow_links` is enabled:
++
++```rust,no_run
++use walkdir::WalkDir;
++
++for entry in WalkDir::new("foo").follow_links(true) {
++    let entry = entry.unwrap();
++    println!("{}", entry.path().display());
++}
++```
++
++### Example: skip hidden files and directories efficiently on unix
++
++This uses the `filter_entry` iterator adapter to avoid yielding hidden files
++and directories efficiently:
++
++```rust,no_run
++use walkdir::{DirEntry, WalkDir, WalkDirIterator};
++
++fn is_hidden(entry: &DirEntry) -> bool {
++    entry.file_name()
++         .to_str()
++         .map(|s| s.starts_with("."))
++         .unwrap_or(false)
++}
++
++let walker = WalkDir::new("foo").into_iter();
++for entry in walker.filter_entry(|e| !is_hidden(e)) {
++    let entry = entry.unwrap();
++    println!("{}", entry.path().display());
++}
++```
++
++### Motivation
++
++`std::fs` has an unstable `walk_dir` implementation that needed some design
++work. I started off on that task, but it quickly became apparent that walking
++a directory recursively is quite complex and may not be a good fit for `std`
++right away.
++
++This should at least resolve most or all of the issues reported here (and then
++some):
++
++* https://github.com/rust-lang/rust/issues/27707
++* https://github.com/rust-lang/rust/issues/23715
++
++### Performance
++
++The short story is that performance is comparable with `find` and glibc's
++`nftw` on both a warm and cold file cache. In fact, I cannot observe any
++performance difference after running `find /`, `walkdir /` and `nftw /` on my
++local file system (SSD, ~3 million entries). More precisely, I am reasonably
++confident that this crate makes as few system calls and close to as few
++allocations as possible.
++
++I haven't recorded any benchmarks, but here are some things you can try with a
++local checkout of `walkdir`:
++
++```
++# The directory you want to recursively walk:
++DIR=$HOME
++
++# If you want to observe perf on a cold file cache, run this before *each*
++# command:
++sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
++
++# To warm the caches
++find $DIR
++
++# Test speed of `find` on warm cache:
++time find $DIR
++
++# Compile and test speed of `walkdir` crate:
++cargo build --release --example walkdir
++time ./target/release/examples/walkdir $DIR
++
++# Compile and test speed of glibc's `nftw`:
++gcc -O3 -o nftw ./compare/nftw.c
++time ./nftw $DIR
++
++# For shits and giggles, test speed of Python's (2 or 3) os.walk:
++time python ./compare/walk.py $DIR
++```
++
++On my system, the performance of `walkdir`, `find` and `nftw` is comparable.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..68a49daad8ff7e35068f2b7a97d643aab440eaec
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++This is free and unencumbered software released into the public domain.
++
++Anyone is free to copy, modify, publish, use, compile, sell, or
++distribute this software, either in source code form or as a compiled
++binary, for any purpose, commercial or non-commercial, and by any
++means.
++
++In jurisdictions that recognize copyright laws, the author or authors
++of this software dedicate any and all copyright interest in the
++software to the public domain. We make this dedication for the benefit
++of the public at large and to the detriment of our heirs and
++successors. We intend this dedication to be an overt act of
++relinquishment in perpetuity of all present and future rights to this
++software under copyright law.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
++OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
++ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++OTHER DEALINGS IN THE SOFTWARE.
++
++For more information, please refer to <http://unlicense.org/>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4aace16b7e58a04caf5e8c7cb1eeddc3e8e8fbcb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,23 @@@
++environment:
++  matrix:
++  - TARGET: x86_64-pc-windows-msvc
++  - TARGET: i686-pc-windows-msvc
++  - TARGET: i686-pc-windows-gnu
++
++install:
++  - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
++  - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
++  - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
++  - SET PATH=%PATH%;C:\MinGW\bin
++  - rustc -V
++  - cargo -V
++
++build: false
++
++test_script:
++  - cargo build --verbose
++  - cargo test --verbose
++
++branches:
++  only:
++    - master
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7d36e2fdf4082e6c1147712907bd3e50c760f649
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++#define _XOPEN_SOURCE 500
++#include <ftw.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <stdint.h>
++
++static int
++display_info(const char *fpath, const struct stat *sb,
++             int tflag, struct FTW *ftwbuf)
++{
++    printf("%s\n", fpath);
++    return 0;
++}
++
++int
++main(int argc, char *argv[])
++{
++    int flags = FTW_PHYS;
++    if (nftw((argc < 2) ? "." : argv[1], display_info, 20, flags) == -1) {
++        perror("nftw");
++        exit(EXIT_FAILURE);
++    }
++    exit(EXIT_SUCCESS);
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..303d323e246e39d8682a13851975821c468e627f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,10 @@@
++from __future__ import absolute_import, division, print_function
++
++import os
++import sys
++
++for dirpath, dirnames, filenames in os.walk(sys.argv[1]):
++    for n in dirnames:
++        print(os.path.join(dirpath, n))
++    for n in filenames:
++        print(os.path.join(dirpath, n))
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b42edf7579a644f790c1f9b4d462441e87ce26f9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,11 @@@
++--langdef=Rust
++--langmap=Rust:.rs
++--regex-Rust=/^[ \t]*(#\[[^\]]\][ \t]*)*(pub[ \t]+)?(extern[ \t]+)?("[^"]+"[ \t]+)?(unsafe[ \t]+)?fn[ \t]+([a-zA-Z0-9_]+)/\6/f,functions,function definitions/
++--regex-Rust=/^[ \t]*(pub[ \t]+)?type[ \t]+([a-zA-Z0-9_]+)/\2/T,types,type definitions/
++--regex-Rust=/^[ \t]*(pub[ \t]+)?enum[ \t]+([a-zA-Z0-9_]+)/\2/g,enum,enumeration names/
++--regex-Rust=/^[ \t]*(pub[ \t]+)?struct[ \t]+([a-zA-Z0-9_]+)/\2/s,structure names/
++--regex-Rust=/^[ \t]*(pub[ \t]+)?mod[ \t]+([a-zA-Z0-9_]+)/\2/m,modules,module names/
++--regex-Rust=/^[ \t]*(pub[ \t]+)?static[ \t]+([a-zA-Z0-9_]+)/\2/c,consts,static constants/
++--regex-Rust=/^[ \t]*(pub[ \t]+)?trait[ \t]+([a-zA-Z0-9_]+)/\2/t,traits,traits/
++--regex-Rust=/^[ \t]*(pub[ \t]+)?impl([ \t\n]+<.*>)?[ \t]+([a-zA-Z0-9_]+)/\3/i,impls,trait implementations/
++--regex-Rust=/^[ \t]*macro_rules![ \t]+([a-zA-Z0-9_]+)/\1/d,macros,macro definitions/
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4497487a361d5760be24a1b175f8ef1f42414608
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,91 @@@
++extern crate docopt;
++extern crate rustc_serialize;
++extern crate walkdir;
++
++use std::io::{self, Write};
++
++use docopt::Docopt;
++use walkdir::WalkDir;
++
++const USAGE: &'static str = "
++Usage:
++    walkdir [options] [<dir>]
++
++Options:
++    -h, --help
++    -L, --follow-links   Follow symlinks.
++    --min-depth NUM      Minimum depth.
++    --max-depth NUM      Maximum depth.
++    -n, --fd-max NUM     Maximum open file descriptors. [default: 32]
++    --tree               Show output as a tree.
++    --sort               Sort the output.
++    -q, --ignore-errors  Ignore errors.
++";
++
++#[derive(Debug, RustcDecodable)]
++#[allow(dead_code)]
++struct Args {
++    arg_dir: Option<String>,
++    flag_follow_links: bool,
++    flag_min_depth: Option<usize>,
++    flag_max_depth: Option<usize>,
++    flag_fd_max: usize,
++    flag_tree: bool,
++    flag_ignore_errors: bool,
++    flag_sort: bool,
++}
++
++macro_rules! wout { ($($tt:tt)*) => { {writeln!($($tt)*)}.unwrap() } }
++
++fn main() {
++    let args: Args = Docopt::new(USAGE).and_then(|d| d.decode())
++                                       .unwrap_or_else(|e| e.exit());
++    let mind = args.flag_min_depth.unwrap_or(0);
++    let maxd = args.flag_max_depth.unwrap_or(::std::usize::MAX);
++    let dir = args.arg_dir.clone().unwrap_or(".".to_owned());
++    let mut walkdir = WalkDir::new(dir)
++                     .max_open(args.flag_fd_max)
++                     .follow_links(args.flag_follow_links)
++                     .min_depth(mind)
++                     .max_depth(maxd);
++    if args.flag_sort {
++        walkdir = walkdir.sort_by(|a,b| a.cmp(b));
++    }
++    let it = walkdir.into_iter();
++    let mut out = io::BufWriter::new(io::stdout());
++    let mut eout = io::stderr();
++    if args.flag_tree {
++        for dent in it {
++            match dent {
++                Err(err) => {
++                    out.flush().unwrap();
++                    wout!(eout, "ERROR: {}", err);
++                }
++                Ok(dent) => {
++                    let name = dent.file_name().to_string_lossy();
++                    wout!(out, "{}{}", indent(dent.depth()), name);
++                }
++            }
++        }
++    } else if args.flag_ignore_errors {
++        for dent in it.filter_map(|e| e.ok()) {
++            wout!(out, "{}", dent.path().display());
++        }
++    } else {
++        for dent in it {
++            match dent {
++                Err(err) => {
++                    out.flush().unwrap();
++                    wout!(eout, "ERROR: {}", err);
++                }
++                Ok(dent) => {
++                    wout!(out, "{}", dent.path().display());
++                }
++            }
++        }
++    }
++}
++
++fn indent(depth: usize) -> String {
++    ::std::iter::repeat(' ').take(2 * depth).collect()
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..213c95660bcd3fef5d156508b6792471e473c349
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++au BufWritePost *.rs silent!make ctags > /dev/null 2>&1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c882e835dd3dd129ff27e92b75dfa4036a31c36a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1006 @@@
++/*!
++Crate `walkdir` provides an efficient and cross platform implementation
++of recursive directory traversal. Several options are exposed to control
++iteration, such as whether to follow symbolic links (default off), limit the
++maximum number of simultaneous open file descriptors and the ability to
++efficiently skip descending into directories.
++
++To use this crate, add `walkdir` as a dependency to your project's
++`Cargo.toml`:
++
++```ignore
++[dependencies]
++walkdir = "1"
++```
++
++# From the top
++
++The `WalkDir` type builds iterators. The `WalkDirIterator` trait provides
++methods for directory iterator adapters, such as efficiently pruning entries
++during traversal. The `DirEntry` type describes values yielded by the iterator.
++Finally, the `Error` type is a small wrapper around `std::io::Error` with
++additional information, such as if a loop was detected while following symbolic
++links (not enabled by default).
++
++# Example
++
++The following code recursively iterates over the directory given and prints
++the path for each entry:
++
++```rust,no_run
++use walkdir::WalkDir;
++
++for entry in WalkDir::new("foo") {
++    let entry = entry.unwrap();
++    println!("{}", entry.path().display());
++}
++```
++
++Or, if you'd like to iterate over all entries and ignore any errors that may
++arise, use `filter_map`. (e.g., This code below will silently skip directories
++that the owner of the running process does not have permission to access.)
++
++```rust,no_run
++use walkdir::WalkDir;
++
++for entry in WalkDir::new("foo").into_iter().filter_map(|e| e.ok()) {
++    println!("{}", entry.path().display());
++}
++```
++
++# Example: follow symbolic links
++
++The same code as above, except `follow_links` is enabled:
++
++```rust,no_run
++use walkdir::WalkDir;
++
++for entry in WalkDir::new("foo").follow_links(true) {
++    let entry = entry.unwrap();
++    println!("{}", entry.path().display());
++}
++```
++
++# Example: skip hidden files and directories efficiently on unix
++
++This uses the `filter_entry` iterator adapter to avoid yielding hidden files
++and directories efficiently:
++
++```rust,no_run
++use walkdir::{DirEntry, WalkDir, WalkDirIterator};
++
++fn is_hidden(entry: &DirEntry) -> bool {
++    entry.file_name()
++         .to_str()
++         .map(|s| s.starts_with("."))
++         .unwrap_or(false)
++}
++
++let walker = WalkDir::new("foo").into_iter();
++for entry in walker.filter_entry(|e| !is_hidden(e)) {
++    let entry = entry.unwrap();
++    println!("{}", entry.path().display());
++}
++```
++
++*/
++#[cfg(windows)] extern crate kernel32;
++#[cfg(windows)] extern crate winapi;
++#[cfg(test)] extern crate quickcheck;
++#[cfg(test)] extern crate rand;
++extern crate same_file;
++
++use std::cmp::{Ordering, min};
++use std::error;
++use std::fmt;
++use std::fs::{self, FileType, ReadDir};
++use std::io;
++use std::ffi::OsStr;
++use std::ffi::OsString;
++use std::path::{Path, PathBuf};
++use std::result;
++use std::vec;
++
++pub use same_file::is_same_file;
++
++#[cfg(test)] mod tests;
++
++/// Like try, but for iterators that return `Option<Result<_, _>>`.
++macro_rules! itry {
++    ($e:expr) => {
++        match $e {
++            Ok(v) => v,
++            Err(err) => return Some(Err(From::from(err))),
++        }
++    }
++}
++
++/// A result type for walkdir operations.
++///
++/// Note that this result type embeds the error type in this crate. This
++/// is only useful if you care about the additional information provided by
++/// the error (such as the path associated with the error or whether a loop
++/// was dectected). If you want things to Just Work, then you can use
++/// `io::Result` instead since the error type in this package will
++/// automatically convert to an `io::Result` when using the `try!` macro.
++pub type Result<T> = ::std::result::Result<T, Error>;
++
++/// A builder to create an iterator for recursively walking a directory.
++///
++/// Results are returned in depth first fashion, with directories yielded
++/// before their contents. The order is unspecified. Directory entries `.`
++/// and `..` are always omitted.
++///
++/// If an error occurs at any point during iteration, then it is returned in
++/// place of its corresponding directory entry and iteration continues as
++/// normal. If an error occurs while opening a directory for reading, it
++/// is skipped. Iteration may be stopped at any time. When the iterator is
++/// destroyed, all resources associated with it are freed.
++///
++/// # Usage
++///
++/// This type implements `IntoIterator` so that it may be used as the subject
++/// of a `for` loop. You may need to call `into_iter` explicitly if you want
++/// to use iterator adapters such as `filter_entry`.
++///
++/// Idiomatic use of this type should use method chaining to set desired
++/// options. For example, this only shows entries with a depth of `1`, `2`
++/// or `3` (relative to `foo`):
++///
++/// ```rust,no_run
++/// use walkdir::WalkDir;
++///
++/// for entry in WalkDir::new("foo").min_depth(1).max_depth(3) {
++///     let entry = entry.unwrap();
++///     println!("{}", entry.path().display());
++/// }
++/// ```
++///
++/// Note that the iterator by default includes the top-most directory. Since
++/// this is the only directory yielded with depth `0`, it is easy to ignore it
++/// with the `min_depth` setting:
++///
++/// ```rust,no_run
++/// use walkdir::WalkDir;
++///
++/// for entry in WalkDir::new("foo").min_depth(1) {
++///     let entry = entry.unwrap();
++///     println!("{}", entry.path().display());
++/// }
++/// ```
++///
++/// This will only return descendents of the `foo` directory and not `foo`
++/// itself.
++///
++/// # Loops
++///
++/// This iterator (like most/all recursive directory iterators) assumes that
++/// no loops can be made with *hard* links on your file system. In particular,
++/// this would require creating a hard link to a directory such that it creates
++/// a loop. On most platforms, this operation is illegal.
++///
++/// Note that when following symbolic/soft links, loops are detected and an
++/// error is reported.
++pub struct WalkDir {
++    opts: WalkDirOptions,
++    root: PathBuf,
++}
++
++struct WalkDirOptions {
++    follow_links: bool,
++    max_open: usize,
++    min_depth: usize,
++    max_depth: usize,
++    sorter: Option<Box<FnMut(&OsString,&OsString) -> Ordering + 'static>>,
++}
++
++impl WalkDir {
++    /// Create a builder for a recursive directory iterator starting at the
++    /// file path `root`. If `root` is a directory, then it is the first item
++    /// yielded by the iterator. If `root` is a file, then it is the first
++    /// and only item yielded by the iterator. If `root` is a symlink, then it
++    /// is always followed.
++    pub fn new<P: AsRef<Path>>(root: P) -> Self {
++        WalkDir {
++            opts: WalkDirOptions {
++                follow_links: false,
++                max_open: 10,
++                min_depth: 0,
++                max_depth: ::std::usize::MAX,
++                sorter: None,
++            },
++            root: root.as_ref().to_path_buf(),
++        }
++    }
++
++    /// Set the minimum depth of entries yielded by the iterator.
++    ///
++    /// The smallest depth is `0` and always corresponds to the path given
++    /// to the `new` function on this type. Its direct descendents have depth
++    /// `1`, and their descendents have depth `2`, and so on.
++    pub fn min_depth(mut self, depth: usize) -> Self {
++        self.opts.min_depth = depth;
++        if self.opts.min_depth > self.opts.max_depth {
++            self.opts.min_depth = self.opts.max_depth;
++        }
++        self
++    }
++
++    /// Set the maximum depth of entries yield by the iterator.
++    ///
++    /// The smallest depth is `0` and always corresponds to the path given
++    /// to the `new` function on this type. Its direct descendents have depth
++    /// `1`, and their descendents have depth `2`, and so on.
++    ///
++    /// Note that this will not simply filter the entries of the iterator, but
++    /// it will actually avoid descending into directories when the depth is
++    /// exceeded.
++    pub fn max_depth(mut self, depth: usize) -> Self {
++        self.opts.max_depth = depth;
++        if self.opts.max_depth < self.opts.min_depth {
++            self.opts.max_depth = self.opts.min_depth;
++        }
++        self
++    }
++
++    /// Follow symbolic links. By default, this is disabled.
++    ///
++    /// When `yes` is `true`, symbolic links are followed as if they were
++    /// normal directories and files. If a symbolic link is broken or is
++    /// involved in a loop, an error is yielded.
++    ///
++    /// When enabled, the yielded `DirEntry` values represent the target of
++    /// the link while the path corresponds to the link. See the `DirEntry`
++    /// type for more details.
++    pub fn follow_links(mut self, yes: bool) -> Self {
++        self.opts.follow_links = yes;
++        self
++    }
++
++    /// Set the maximum number of simultaneously open file descriptors used
++    /// by the iterator.
++    ///
++    /// `n` must be greater than or equal to `1`. If `n` is `0`, then it is set
++    /// to `1` automatically. If this is not set, then it defaults to some
++    /// reasonably low number.
++    ///
++    /// This setting has no impact on the results yielded by the iterator
++    /// (even when `n` is `1`). Instead, this setting represents a trade off
++    /// between scarce resources (file descriptors) and memory. Namely, when
++    /// the maximum number of file descriptors is reached and a new directory
++    /// needs to be opened to continue iteration, then a previous directory
++    /// handle is closed and has its unyielded entries stored in memory. In
++    /// practice, this is a satisfying trade off because it scales with respect
++    /// to the *depth* of your file tree. Therefore, low values (even `1`) are
++    /// acceptable.
++    ///
++    /// Note that this value does not impact the number of system calls made by
++    /// an exhausted iterator.
++    pub fn max_open(mut self, mut n: usize) -> Self {
++        if n == 0 {
++            n = 1;
++        }
++        self.opts.max_open = n;
++        self
++    }
++
++    /// Set a function for sorting directory entries.
++    ///
++    /// If a compare function is set, the resulting iterator will return all
++    /// paths in sorted order. The compare function will be called to compare
++    /// names from entries from the same directory using only the name of the
++    /// entry.
++    ///
++    /// ```rust,no-run
++    /// use std::cmp;
++    /// use std::ffi::OsString;
++    /// use walkdir::WalkDir;
++    ///
++    /// WalkDir::new("foo").sort_by(|a,b| a.cmp(b));
++    /// ```
++    pub fn sort_by<F>(mut self, cmp: F) -> Self
++            where F: FnMut(&OsString, &OsString) -> Ordering + 'static {
++        self.opts.sorter = Some(Box::new(cmp));
++        self
++    }
++}
++
++impl IntoIterator for WalkDir {
++    type Item = Result<DirEntry>;
++    type IntoIter = Iter;
++
++    fn into_iter(self) -> Iter {
++        Iter {
++            opts: self.opts,
++            start: Some(self.root),
++            stack_list: vec![],
++            stack_path: vec![],
++            oldest_opened: 0,
++            depth: 0,
++        }
++    }
++}
++
++/// A trait for recursive directory iterators.
++pub trait WalkDirIterator: Iterator {
++    /// Skips the current directory.
++    ///
++    /// This causes the iterator to stop traversing the contents of the least
++    /// recently yielded directory. This means any remaining entries in that
++    /// directory will be skipped (including sub-directories).
++    ///
++    /// Note that the ergnomics of this method are questionable since it
++    /// borrows the iterator mutably. Namely, you must write out the looping
++    /// condition manually. For example, to skip hidden entries efficiently on
++    /// unix systems:
++    ///
++    /// ```rust,no_run
++    /// use walkdir::{DirEntry, WalkDir, WalkDirIterator};
++    ///
++    /// fn is_hidden(entry: &DirEntry) -> bool {
++    ///     entry.file_name()
++    ///          .to_str()
++    ///          .map(|s| s.starts_with("."))
++    ///          .unwrap_or(false)
++    /// }
++    ///
++    /// let mut it = WalkDir::new("foo").into_iter();
++    /// loop {
++    ///     let entry = match it.next() {
++    ///         None => break,
++    ///         Some(Err(err)) => panic!("ERROR: {}", err),
++    ///         Some(Ok(entry)) => entry,
++    ///     };
++    ///     if is_hidden(&entry) {
++    ///         if entry.file_type().is_dir() {
++    ///             it.skip_current_dir();
++    ///         }
++    ///         continue;
++    ///     }
++    ///     println!("{}", entry.path().display());
++    /// }
++    /// ```
++    ///
++    /// You may find it more convenient to use the `filter_entry` iterator
++    /// adapter. (See its documentation for the same example functionality as
++    /// above.)
++    fn skip_current_dir(&mut self);
++
++    /// Yields only entries which satisfy the given predicate and skips
++    /// descending into directories that do not satisfy the given predicate.
++    ///
++    /// The predicate is applied to all entries. If the predicate is
++    /// true, iteration carries on as normal. If the predicate is false, the
++    /// entry is ignored and if it is a directory, it is not descended into.
++    ///
++    /// This is often more convenient to use than `skip_current_dir`. For
++    /// example, to skip hidden files and directories efficiently on unix
++    /// systems:
++    ///
++    /// ```rust,no_run
++    /// use walkdir::{DirEntry, WalkDir, WalkDirIterator};
++    ///
++    /// fn is_hidden(entry: &DirEntry) -> bool {
++    ///     entry.file_name()
++    ///          .to_str()
++    ///          .map(|s| s.starts_with("."))
++    ///          .unwrap_or(false)
++    /// }
++    ///
++    /// for entry in WalkDir::new("foo")
++    ///                      .into_iter()
++    ///                      .filter_entry(|e| !is_hidden(e)) {
++    ///     let entry = entry.unwrap();
++    ///     println!("{}", entry.path().display());
++    /// }
++    /// ```
++    ///
++    /// Note that the iterator will still yield errors for reading entries that
++    /// may not satisfy the predicate.
++    ///
++    /// Note that entries skipped with `min_depth` and `max_depth` are not
++    /// passed to this predicate.
++    fn filter_entry<P>(self, predicate: P) -> IterFilterEntry<Self, P>
++            where Self: Sized, P: FnMut(&DirEntry) -> bool {
++        IterFilterEntry { it: self, predicate: predicate }
++    }
++}
++
++/// An iterator for recursively descending into a directory.
++///
++/// A value with this type must be constructed with the `WalkDir` type, which
++/// uses a builder pattern to set options such as min/max depth, max open file
++/// descriptors and whether the iterator should follow symbolic links.
++///
++/// The order of elements yielded by this iterator is unspecified.
++pub struct Iter {
++    /// Options specified in the builder. Depths, max fds, etc.
++    opts: WalkDirOptions,
++    /// The start path.
++    ///
++    /// This is only `Some(...)` at the beginning. After the first iteration,
++    /// this is always `None`.
++    start: Option<PathBuf>,
++    /// A stack of open (up to max fd) or closed handles to directories.
++    /// An open handle is a plain `fs::ReadDir` while a closed handle is
++    /// a `Vec<fs::DirEntry>` corresponding to the as-of-yet consumed entries.
++    stack_list: Vec<DirList>,
++    /// A stack of file paths.
++    ///
++    /// This is *only* used when `follow_links` is enabled. In all other cases
++    /// this stack is empty.
++    stack_path: Vec<PathBuf>,
++    /// An index into `stack_list` that points to the oldest open directory
++    /// handle. If the maximum fd limit is reached and a new directory needs
++    /// to be read, the handle at this index is closed before the new directory
++    /// is opened.
++    oldest_opened: usize,
++    /// The current depth of iteration (the length of the stack at the
++    /// beginning of each iteration).
++    depth: usize,
++}
++
++/// A sequence of unconsumed directory entries.
++///
++/// This represents the opened or closed state of a directory handle. When
++/// open, future entries are read by iterating over the raw `fs::ReadDir`.
++/// When closed, all future entries are read into memory. Iteration then
++/// proceeds over a `Vec<fs::DirEntry>`.
++enum DirList {
++    /// An opened handle.
++    ///
++    /// This includes the depth of the handle itself.
++    ///
++    /// If there was an error with the initial `fs::read_dir` call, then it is
++    /// stored here. (We use an `Option<...>` to make yielding the error
++    /// exactly once simpler.)
++    Opened { depth: usize, it: result::Result<ReadDir, Option<Error>> },
++    /// A closed handle.
++    ///
++    /// All remaining directory entries are read into memory.
++    Closed(vec::IntoIter<Result<fs::DirEntry>>),
++}
++
++/// A directory entry.
++///
++/// This is the type of value that is yielded from the iterators defined in
++/// this crate.
++///
++/// # Differences with `std::fs::DirEntry`
++///
++/// This type mostly mirrors the type by the same name in `std::fs`. There are
++/// some differences however:
++///
++/// * All recursive directory iterators must inspect the entry's type.
++/// Therefore, the value is stored and its access is guaranteed to be cheap and
++/// successful.
++/// * `path` and `file_name` return borrowed variants.
++/// * If `follow_links` was enabled on the originating iterator, then all
++/// operations except for `path` operate on the link target. Otherwise, all
++/// operations operate on the symbolic link.
++pub struct DirEntry {
++    /// The path as reported by the `fs::ReadDir` iterator (even if it's a
++    /// symbolic link).
++    path: PathBuf,
++    /// The file type. Necessary for recursive iteration, so store it.
++    ty: FileType,
++    /// Is set when this entry was created from a symbolic link and the user
++    /// excepts the iterator to follow symbolic links.
++    follow_link: bool,
++    /// The depth at which this entry was generated relative to the root.
++    depth: usize,
++    /// The underlying inode number (Unix only).
++    #[cfg(unix)]
++    ino: u64,
++}
++
++impl Iterator for Iter {
++    type Item = Result<DirEntry>;
++
++    fn next(&mut self) -> Option<Result<DirEntry>> {
++        if let Some(start) = self.start.take() {
++            let dent = itry!(DirEntry::from_link(0, start));
++            if let Some(result) = self.handle_entry(dent) {
++                return Some(result);
++            }
++        }
++        while !self.stack_list.is_empty() {
++            self.depth = self.stack_list.len();
++            if self.depth > self.opts.max_depth {
++                // If we've exceeded the max depth, pop the current dir
++                // so that we don't descend.
++                self.pop();
++                continue;
++            }
++            match self.stack_list.last_mut().unwrap().next() {
++                None => self.pop(),
++                Some(Err(err)) => return Some(Err(err)),
++                Some(Ok(dent)) => {
++                    let dent = itry!(DirEntry::from_entry(self.depth, &dent));
++                    if let Some(result) = self.handle_entry(dent) {
++                        return Some(result);
++                    }
++                }
++            }
++        }
++        None
++    }
++}
++
++impl WalkDirIterator for Iter {
++    fn skip_current_dir(&mut self) {
++        if !self.stack_list.is_empty() {
++            self.stack_list.pop();
++        }
++        if !self.stack_path.is_empty() {
++            self.stack_path.pop();
++        }
++    }
++}
++
++impl Iter {
++    fn handle_entry(
++        &mut self,
++        mut dent: DirEntry,
++    ) -> Option<Result<DirEntry>> {
++        if self.opts.follow_links && dent.file_type().is_symlink() {
++            dent = itry!(self.follow(dent));
++        }
++        if dent.file_type().is_dir() {
++            self.push(&dent);
++        }
++        if self.skippable() { None } else { Some(Ok(dent)) }
++    }
++
++    fn push(&mut self, dent: &DirEntry) {
++        // Make room for another open file descriptor if we've hit the max.
++        if self.stack_list.len() - self.oldest_opened == self.opts.max_open {
++            self.stack_list[self.oldest_opened].close();
++            self.oldest_opened = self.oldest_opened.checked_add(1).unwrap();
++        }
++        // Open a handle to reading the directory's entries.
++        let rd = fs::read_dir(dent.path()).map_err(|err| {
++            Some(Error::from_path(self.depth, dent.path().to_path_buf(), err))
++        });
++        let mut list = DirList::Opened { depth: self.depth, it: rd };
++        if let Some(ref mut cmp) = self.opts.sorter {
++            let mut entries: Vec<_> = list.collect();
++            entries.sort_by(|a, b| {
++                match (a, b) {
++                    (&Ok(ref a), &Ok(ref b)) => {
++                        cmp(&a.file_name(), &b.file_name())
++                    }
++                    (&Err(_), &Err(_)) => Ordering::Equal,
++                    (&Ok(_), &Err(_)) => Ordering::Greater,
++                    (&Err(_), &Ok(_)) => Ordering::Less,
++                }
++            });
++            list = DirList::Closed(entries.into_iter());
++        }
++        self.stack_list.push(list);
++        if self.opts.follow_links {
++            self.stack_path.push(dent.path().to_path_buf());
++        }
++    }
++
++    fn pop(&mut self) {
++        self.stack_list.pop().expect("cannot pop from empty stack");
++        if self.opts.follow_links {
++            self.stack_path.pop().expect("BUG: list/path stacks out of sync");
++        }
++        // If everything in the stack is already closed, then there is
++        // room for at least one more open descriptor and it will
++        // always be at the top of the stack.
++        self.oldest_opened = min(self.oldest_opened, self.stack_list.len());
++    }
++
++    fn follow(&self, mut dent: DirEntry) -> Result<DirEntry> {
++        dent = try!(DirEntry::from_link(self.depth,
++                                        dent.path().to_path_buf()));
++        // The only way a symlink can cause a loop is if it points
++        // to a directory. Otherwise, it always points to a leaf
++        // and we can omit any loop checks.
++        if dent.file_type().is_dir() {
++            try!(self.check_loop(dent.path()));
++        }
++        Ok(dent)
++    }
++
++    fn check_loop<P: AsRef<Path>>(&self, child: P) -> Result<()> {
++        for ancestor in self.stack_path.iter().rev() {
++            let same = try!(is_same_file(ancestor, &child).map_err(|err| {
++                Error::from_io(self.depth, err)
++            }));
++            if same {
++                return Err(Error {
++                    depth: self.depth,
++                    inner: ErrorInner::Loop {
++                        ancestor: ancestor.to_path_buf(),
++                        child: child.as_ref().to_path_buf(),
++                    },
++                });
++            }
++        }
++        Ok(())
++    }
++
++    fn skippable(&self) -> bool {
++        self.depth < self.opts.min_depth || self.depth > self.opts.max_depth
++    }
++}
++
++impl DirList {
++    fn close(&mut self) {
++        if let DirList::Opened { .. } = *self {
++            *self = DirList::Closed(self.collect::<Vec<_>>().into_iter());
++        }
++    }
++}
++
++impl Iterator for DirList {
++    type Item = Result<fs::DirEntry>;
++
++    #[inline(always)]
++    fn next(&mut self) -> Option<Result<fs::DirEntry>> {
++        match *self {
++            DirList::Closed(ref mut it) => it.next(),
++            DirList::Opened { depth, ref mut it } => match *it {
++                Err(ref mut err) => err.take().map(Err),
++                Ok(ref mut rd) => rd.next().map(|r| r.map_err(|err| {
++                    Error::from_io(depth + 1, err)
++                })),
++            }
++        }
++    }
++}
++
++impl DirEntry {
++    /// The full path that this entry represents.
++    ///
++    /// The full path is created by joining the parents of this entry up to the
++    /// root initially given to `WalkDir::new` with the file name of this
++    /// entry.
++    ///
++    /// Note that this *always* returns the path reported by the underlying
++    /// directory entry, even when symbolic links are followed. To get the
++    /// target path, use `path_is_symbolic_link` to (cheaply) check if
++    /// this entry corresponds to a symbolic link, and `std::fs::read_link` to
++    /// resolve the target.
++    pub fn path(&self) -> &Path {
++        &self.path
++    }
++
++    /// Returns `true` if and only if this entry was created from a symbolic
++    /// link. This is unaffected by the `follow_links` setting.
++    ///
++    /// When `true`, the value returned by the `path` method is a
++    /// symbolic link name. To get the full target path, you must call
++    /// `std::fs::read_link(entry.path())`.
++    pub fn path_is_symbolic_link(&self) -> bool {
++        self.ty.is_symlink() || self.follow_link
++    }
++
++    /// Return the metadata for the file that this entry points to.
++    ///
++    /// This will follow symbolic links if and only if the `WalkDir` value
++    /// has `follow_links` enabled.
++    ///
++    /// # Platform behavior
++    ///
++    /// This always calls `std::fs::symlink_metadata`.
++    ///
++    /// If this entry is a symbolic link and `follow_links` is enabled, then
++    /// `std::fs::metadata` is called instead.
++    pub fn metadata(&self) -> Result<fs::Metadata> {
++        if self.follow_link {
++            fs::metadata(&self.path)
++        } else {
++            fs::symlink_metadata(&self.path)
++        }.map_err(|err| Error::from_entry(self, err))
++    }
++
++    /// Return the file type for the file that this entry points to.
++    ///
++    /// If this is a symbolic link and `follow_links` is `true`, then this
++    /// returns the type of the target.
++    ///
++    /// This never makes any system calls.
++    pub fn file_type(&self) -> fs::FileType {
++        self.ty
++    }
++
++    /// Return the file name of this entry.
++    ///
++    /// If this entry has no file name (e.g., `/`), then the full path is
++    /// returned.
++    pub fn file_name(&self) -> &OsStr {
++        self.path.file_name().unwrap_or_else(|| self.path.as_os_str())
++    }
++
++    /// Returns the depth at which this entry was created relative to the root.
++    ///
++    /// The smallest depth is `0` and always corresponds to the path given
++    /// to the `new` function on `WalkDir`. Its direct descendents have depth
++    /// `1`, and their descendents have depth `2`, and so on.
++    pub fn depth(&self) -> usize {
++        self.depth
++    }
++
++    /// Returns the underlying `d_ino` field in the contained `dirent`
++    /// structure.
++    #[cfg(unix)]
++    pub fn ino(&self) -> u64 {
++        self.ino
++    }
++
++    #[cfg(not(unix))]
++    fn from_entry(depth: usize, ent: &fs::DirEntry) -> Result<DirEntry> {
++        let ty = try!(ent.file_type().map_err(|err| {
++            Error::from_path(depth, ent.path(), err)
++        }));
++        Ok(DirEntry {
++            path: ent.path(),
++            ty: ty,
++            follow_link: false,
++            depth: depth,
++        })
++    }
++
++    #[cfg(unix)]
++    fn from_entry(depth: usize, ent: &fs::DirEntry) -> Result<DirEntry> {
++        use std::os::unix::fs::DirEntryExt;
++
++        let ty = try!(ent.file_type().map_err(|err| {
++            Error::from_path(depth, ent.path(), err)
++        }));
++        Ok(DirEntry {
++            path: ent.path(),
++            ty: ty,
++            follow_link: false,
++            depth: depth,
++            ino: ent.ino(),
++        })
++    }
++
++    #[cfg(not(unix))]
++    fn from_link(depth: usize, pb: PathBuf) -> Result<DirEntry> {
++        let md = try!(fs::metadata(&pb).map_err(|err| {
++            Error::from_path(depth, pb.clone(), err)
++        }));
++        Ok(DirEntry {
++            path: pb,
++            ty: md.file_type(),
++            follow_link: true,
++            depth: depth,
++        })
++    }
++
++    #[cfg(unix)]
++    fn from_link(depth: usize, pb: PathBuf) -> Result<DirEntry> {
++        use std::os::unix::fs::MetadataExt;
++
++        let md = try!(fs::metadata(&pb).map_err(|err| {
++            Error::from_path(depth, pb.clone(), err)
++        }));
++        Ok(DirEntry {
++            path: pb,
++            ty: md.file_type(),
++            follow_link: true,
++            depth: depth,
++            ino: md.ino(),
++        })
++    }
++}
++
++impl Clone for DirEntry {
++    #[cfg(not(unix))]
++    fn clone(&self) -> DirEntry {
++        DirEntry {
++            path: self.path.clone(),
++            ty: self.ty,
++            follow_link: self.follow_link,
++            depth: self.depth,
++        }
++    }
++
++    #[cfg(unix)]
++    fn clone(&self) -> DirEntry {
++        DirEntry {
++            path: self.path.clone(),
++            ty: self.ty,
++            follow_link: self.follow_link,
++            depth: self.depth,
++            ino: self.ino,
++        }
++    }
++}
++
++impl fmt::Debug for DirEntry {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        write!(f, "DirEntry({:?})", self.path)
++    }
++}
++
++/// A recursive directory iterator that skips entries.
++///
++/// Directories that fail the predicate `P` are skipped. Namely, they are
++/// never yielded and never descended into.
++///
++/// Entries that are skipped with the `min_depth` and `max_depth` options are
++/// not passed through this filter.
++///
++/// If opening a handle to a directory resulted in an error, then it is yielded
++/// and no corresponding call to the predicate is made.
++///
++/// Type parameter `I` refers to the underlying iterator and `P` refers to the
++/// predicate, which is usually `FnMut(&DirEntry) -> bool`.
++pub struct IterFilterEntry<I, P> {
++    it: I,
++    predicate: P,
++}
++
++impl<I, P> Iterator for IterFilterEntry<I, P>
++        where I: WalkDirIterator<Item=Result<DirEntry>>,
++              P: FnMut(&DirEntry) -> bool {
++    type Item = Result<DirEntry>;
++
++    fn next(&mut self) -> Option<Result<DirEntry>> {
++        loop {
++            let dent = match self.it.next() {
++                None => return None,
++                Some(result) => itry!(result),
++            };
++            if !(self.predicate)(&dent) {
++                if dent.file_type().is_dir() {
++                    self.it.skip_current_dir();
++                }
++                continue;
++            }
++            return Some(Ok(dent));
++        }
++    }
++}
++
++impl<I, P> WalkDirIterator for IterFilterEntry<I, P>
++        where I: WalkDirIterator<Item=Result<DirEntry>>,
++              P: FnMut(&DirEntry) -> bool {
++    fn skip_current_dir(&mut self) {
++        self.it.skip_current_dir();
++    }
++}
++
++/// An error produced by recursively walking a directory.
++///
++/// This error type is a light wrapper around `std::io::Error`. In particular,
++/// it adds the following information:
++///
++/// * The depth at which the error occurred in the file tree, relative to the
++/// root.
++/// * The path, if any, associated with the IO error.
++/// * An indication that a loop occurred when following symbolic links. In this
++/// case, there is no underlying IO error.
++///
++/// To maintain good ergnomics, this type has a
++/// `impl From<Error> for std::io::Error` defined so that you may use an
++/// `io::Result` with methods in this crate if you don't care about accessing
++/// the underlying error data in a structured form.
++#[derive(Debug)]
++pub struct Error {
++    depth: usize,
++    inner: ErrorInner,
++}
++
++#[derive(Debug)]
++enum ErrorInner {
++    Io { path: Option<PathBuf>, err: io::Error },
++    Loop { ancestor: PathBuf, child: PathBuf },
++}
++
++impl Error {
++    /// Returns the path associated with this error if one exists.
++    ///
++    /// For example, if an error occurred while opening a directory handle,
++    /// the error will include the path passed to `std::fs::read_dir`.
++    pub fn path(&self) -> Option<&Path> {
++        match self.inner {
++            ErrorInner::Io { path: None, .. } => None,
++            ErrorInner::Io { path: Some(ref path), .. } => Some(path),
++            ErrorInner::Loop { ref child, .. } => Some(child),
++        }
++    }
++
++    /// Returns the path at which a cycle was detected.
++    ///
++    /// If no cycle was detected, `None` is returned.
++    ///
++    /// A cycle is detected when a directory entry is equivalent to one of
++    /// its ancestors.
++    ///
++    /// To get the path to the child directory entry in the cycle, use the
++    /// `path` method.
++    pub fn loop_ancestor(&self) -> Option<&Path> {
++        match self.inner {
++            ErrorInner::Loop { ref ancestor, .. } => Some(ancestor),
++            _ => None,
++        }
++    }
++
++    /// Returns the depth at which this error occurred relative to the root.
++    ///
++    /// The smallest depth is `0` and always corresponds to the path given
++    /// to the `new` function on `WalkDir`. Its direct descendents have depth
++    /// `1`, and their descendents have depth `2`, and so on.
++    pub fn depth(&self) -> usize {
++        self.depth
++    }
++
++    fn from_path(depth: usize, pb: PathBuf, err: io::Error) -> Self {
++        Error {
++            depth: depth,
++            inner: ErrorInner::Io { path: Some(pb), err: err },
++        }
++    }
++
++    fn from_entry(dent: &DirEntry, err: io::Error) -> Self {
++        Error {
++            depth: dent.depth,
++            inner: ErrorInner::Io {
++                path: Some(dent.path().to_path_buf()),
++                err: err,
++            },
++        }
++    }
++
++    fn from_io(depth: usize, err: io::Error) -> Self {
++        Error {
++            depth: depth,
++            inner: ErrorInner::Io { path: None, err: err },
++        }
++    }
++}
++
++impl error::Error for Error {
++    fn description(&self) -> &str {
++        match self.inner {
++            ErrorInner::Io { ref err, .. } => err.description(),
++            ErrorInner::Loop { .. } => "file system loop found",
++        }
++    }
++
++    fn cause(&self) -> Option<&error::Error> {
++        match self.inner {
++            ErrorInner::Io { ref err, .. } => Some(err),
++            ErrorInner::Loop { .. } => None,
++        }
++    }
++}
++
++impl fmt::Display for Error {
++    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
++        match self.inner {
++            ErrorInner::Io { path: None, ref err } => {
++                err.fmt(f)
++            }
++            ErrorInner::Io { path: Some(ref path), ref err } => {
++                write!(f, "IO error for operation on {}: {}",
++                       path.display(), err)
++            }
++            ErrorInner::Loop { ref ancestor, ref child } => {
++                write!(f, "File system loop found: \
++                           {} points to an ancestor {}",
++                       child.display(), ancestor.display())
++            }
++        }
++    }
++}
++
++impl From<Error> for io::Error {
++    fn from(err: Error) -> io::Error {
++        match err {
++            Error { inner: ErrorInner::Io { err, .. }, .. } => err,
++            err @ Error { inner: ErrorInner::Loop { .. }, .. } => {
++                io::Error::new(io::ErrorKind::Other, err)
++            }
++        }
++    }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e5fbf5dd1058a91d5313bc3e9b3aaa22f9cf1a1d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,742 @@@
++#![cfg_attr(windows, allow(dead_code, unused_imports))]
++
++use std::env;
++use std::fs::{self, File};
++use std::io;
++use std::path::{Path, PathBuf};
++
++use quickcheck::{Arbitrary, Gen, QuickCheck, StdGen};
++use rand::{self, Rng};
++
++use super::{DirEntry, WalkDir, WalkDirIterator, Iter, Error, ErrorInner};
++
++#[derive(Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]
++enum Tree {
++    Dir(PathBuf, Vec<Tree>),
++    File(PathBuf),
++    Symlink {
++        src: PathBuf,
++        dst: PathBuf,
++        dir: bool,
++    }
++}
++
++impl Tree {
++    fn from_walk_with<P, F>(
++        p: P,
++        f: F,
++    ) -> io::Result<Tree>
++    where P: AsRef<Path>, F: FnOnce(WalkDir) -> WalkDir {
++        let mut stack = vec![Tree::Dir(p.as_ref().to_path_buf(), vec![])];
++        let it: WalkEventIter = f(WalkDir::new(p)).into();
++        for ev in it {
++            match try!(ev) {
++                WalkEvent::Exit => {
++                    let tree = stack.pop().unwrap();
++                    if stack.is_empty() {
++                        return Ok(tree);
++                    }
++                    stack.last_mut().unwrap().children_mut().push(tree);
++                }
++                WalkEvent::Dir(dent) => {
++                    stack.push(Tree::Dir(pb(dent.file_name()), vec![]));
++                }
++                WalkEvent::File(dent) => {
++                    let node = if dent.file_type().is_symlink() {
++                        let src = try!(dent.path().read_link());
++                        let dst = pb(dent.file_name());
++                        let dir = dent.path().is_dir();
++                        Tree::Symlink { src: src, dst: dst, dir: dir }
++                    } else {
++                        Tree::File(pb(dent.file_name()))
++                    };
++                    stack.last_mut().unwrap().children_mut().push(node);
++                }
++            }
++        }
++        assert_eq!(stack.len(), 1);
++        Ok(stack.pop().unwrap())
++    }
++
++    fn name(&self) -> &Path {
++        match *self {
++            Tree::Dir(ref pb, _) => pb,
++            Tree::File(ref pb) => pb,
++            Tree::Symlink { ref dst, .. } => dst,
++        }
++    }
++
++    fn unwrap_singleton(self) -> Tree {
++        match self {
++            Tree::File(_) | Tree::Symlink { .. } => {
++                panic!("cannot unwrap file or link as dir");
++            }
++            Tree::Dir(_, mut childs) => {
++                assert_eq!(childs.len(), 1);
++                childs.pop().unwrap()
++            }
++        }
++    }
++
++    fn unwrap_dir(self) -> Vec<Tree> {
++        match self {
++            Tree::File(_) | Tree::Symlink { .. } => {
++                panic!("cannot unwrap file as dir");
++            }
++            Tree::Dir(_, childs) => childs,
++        }
++    }
++
++    fn children_mut(&mut self) -> &mut Vec<Tree> {
++        match *self {
++            Tree::File(_) | Tree::Symlink { .. } => {
++                panic!("files do not have children");
++            }
++            Tree::Dir(_, ref mut children) => children,
++        }
++    }
++
++    fn create_in<P: AsRef<Path>>(&self, parent: P) -> io::Result<()> {
++        let parent = parent.as_ref();
++        match *self {
++            Tree::Symlink { ref src, ref dst, dir } => {
++                if dir {
++                    try!(soft_link_dir(src, parent.join(dst)));
++                } else {
++                    try!(soft_link_file(src, parent.join(dst)));
++                }
++            }
++            Tree::File(ref p) => { try!(File::create(parent.join(p))); }
++            Tree::Dir(ref dir, ref children) => {
++                try!(fs::create_dir(parent.join(dir)));
++                for child in children {
++                    try!(child.create_in(parent.join(dir)));
++                }
++            }
++        }
++        Ok(())
++    }
++
++    fn canonical(&self) -> Tree {
++        match *self {
++            Tree::Symlink { ref src, ref dst, dir } => {
++                Tree::Symlink { src: src.clone(), dst: dst.clone(), dir: dir }
++            }
++            Tree::File(ref p) => {
++                Tree::File(p.clone())
++            }
++            Tree::Dir(ref p, ref cs) => {
++                let mut cs: Vec<Tree> =
++                    cs.iter().map(|c| c.canonical()).collect();
++                cs.sort();
++                Tree::Dir(p.clone(), cs)
++            }
++        }
++    }
++
++    fn dedup(&self) -> Tree {
++        match *self {
++            Tree::Symlink { ref src, ref dst, dir } => {
++                Tree::Symlink { src: src.clone(), dst: dst.clone(), dir: dir }
++            }
++            Tree::File(ref p) => {
++                Tree::File(p.clone())
++            }
++            Tree::Dir(ref p, ref cs) => {
++                let mut nodupes: Vec<Tree> = vec![];
++                for (i, c1) in cs.iter().enumerate() {
++                    if !cs[i+1..].iter().any(|c2| c1.name() == c2.name())
++                        && !nodupes.iter().any(|c2| c1.name() == c2.name()) {
++                        nodupes.push(c1.dedup());
++                    }
++                }
++                Tree::Dir(p.clone(), nodupes)
++            }
++        }
++    }
++
++    fn gen<G: Gen>(g: &mut G, depth: usize) -> Tree {
++        #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
++        struct NonEmptyAscii(String);
++
++        impl Arbitrary for NonEmptyAscii {
++            fn arbitrary<G: Gen>(g: &mut G) -> NonEmptyAscii {
++                use std::char::from_u32;
++                let upper_bound = g.size();
++                // We start with a lower bound of `4` to avoid
++                // generating the special file name `con` on Windows,
++                // because such files cannot exist...
++                let size = g.gen_range(4, upper_bound);
++                NonEmptyAscii((0..size)
++                .map(|_| from_u32(g.gen_range(97, 123)).unwrap())
++                .collect())
++            }
++
++            fn shrink(&self) -> Box<Iterator<Item=NonEmptyAscii>> {
++                let mut smaller = vec![];
++                for i in 1..self.0.len() {
++                    let s: String = self.0.chars().skip(i).collect();
++                    smaller.push(NonEmptyAscii(s));
++                }
++                Box::new(smaller.into_iter())
++            }
++        }
++
++        let name = pb(NonEmptyAscii::arbitrary(g).0);
++        if depth == 0 {
++            Tree::File(name)
++        } else {
++            let children: Vec<Tree> =
++                (0..g.gen_range(0, 5))
++                .map(|_| Tree::gen(g, depth-1))
++                .collect();
++            Tree::Dir(name, children)
++        }
++    }
++}
++
++impl Arbitrary for Tree {
++    fn arbitrary<G: Gen>(g: &mut G) -> Tree {
++        let depth = g.gen_range(0, 5);
++        Tree::gen(g, depth).dedup()
++    }
++
++    fn shrink(&self) -> Box<Iterator<Item=Tree>> {
++        let trees: Box<Iterator<Item=Tree>> = match *self {
++            Tree::Symlink { .. } => unimplemented!(),
++            Tree::File(ref path) => {
++                let s = path.to_string_lossy().into_owned();
++                Box::new(s.shrink().map(|s| Tree::File(pb(s))))
++            }
++            Tree::Dir(ref path, ref children) => {
++                let s = path.to_string_lossy().into_owned();
++                if children.is_empty() {
++                    Box::new(s.shrink().map(|s| Tree::Dir(pb(s), vec![])))
++                } else if children.len() == 1 {
++                    let c = &children[0];
++                    Box::new(Some(c.clone()).into_iter().chain(c.shrink()))
++                } else {
++                    Box::new(children
++                             .shrink()
++                             .map(move |cs| Tree::Dir(pb(s.clone()), cs)))
++                }
++            }
++        };
++        Box::new(trees.map(|t| t.dedup()))
++    }
++}
++
++#[derive(Debug)]
++enum WalkEvent {
++    Dir(DirEntry),
++    File(DirEntry),
++    Exit,
++}
++
++struct WalkEventIter {
++    depth: usize,
++    it: Iter,
++    next: Option<Result<DirEntry, Error>>,
++}
++
++impl From<WalkDir> for WalkEventIter {
++    fn from(it: WalkDir) -> WalkEventIter {
++        WalkEventIter { depth: 0, it: it.into_iter(), next: None }
++    }
++}
++
++impl Iterator for WalkEventIter {
++    type Item = io::Result<WalkEvent>;
++
++    fn next(&mut self) -> Option<io::Result<WalkEvent>> {
++        let dent = self.next.take().or_else(|| self.it.next());
++        let depth = match dent {
++            None => 0,
++            Some(Ok(ref dent)) => dent.depth(),
++            Some(Err(ref err)) => err.depth(),
++        };
++        if depth < self.depth {
++            self.depth -= 1;
++            self.next = dent;
++            return Some(Ok(WalkEvent::Exit));
++        }
++        self.depth = depth;
++        match dent {
++            None => None,
++            Some(Err(err)) => Some(Err(From::from(err))),
++            Some(Ok(dent)) => {
++                if dent.file_type().is_dir() {
++                    self.depth += 1;
++                    Some(Ok(WalkEvent::Dir(dent)))
++                } else {
++                    Some(Ok(WalkEvent::File(dent)))
++                }
++            }
++        }
++    }
++}
++
++struct TempDir(PathBuf);
++
++impl TempDir {
++    fn path<'a>(&'a self) -> &'a Path {
++        &self.0
++    }
++}
++
++impl Drop for TempDir {
++    fn drop(&mut self) {
++        fs::remove_dir_all(&self.0).unwrap();
++    }
++}
++
++fn tmpdir() -> TempDir {
++    let p = env::temp_dir();
++    let mut r = rand::thread_rng();
++    let ret = p.join(&format!("rust-{}", r.next_u32()));
++    fs::create_dir(&ret).unwrap();
++    TempDir(ret)
++}
++
++fn dir_setup_with<F>(t: &Tree, f: F) -> (TempDir, Tree)
++        where F: FnOnce(WalkDir) -> WalkDir {
++    let tmp = tmpdir();
++    t.create_in(tmp.path()).unwrap();
++    let got = Tree::from_walk_with(tmp.path(), f).unwrap();
++    (tmp, got.unwrap_singleton().unwrap_singleton())
++}
++
++fn dir_setup(t: &Tree) -> (TempDir, Tree) {
++    dir_setup_with(t, |wd| wd)
++}
++
++fn canon(unix: &str) -> String {
++    if cfg!(windows) {
++        unix.replace("/", "\\")
++    } else {
++        unix.to_string()
++    }
++}
++
++fn pb<P: AsRef<Path>>(p: P) -> PathBuf { p.as_ref().to_path_buf() }
++fn td<P: AsRef<Path>>(p: P, cs: Vec<Tree>) -> Tree {
++    Tree::Dir(pb(p), cs)
++}
++fn tf<P: AsRef<Path>>(p: P) -> Tree {
++    Tree::File(pb(p))
++}
++fn tld<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> Tree {
++    Tree::Symlink { src: pb(src), dst: pb(dst), dir: true }
++}
++fn tlf<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> Tree {
++    Tree::Symlink { src: pb(src), dst: pb(dst), dir: false }
++}
++
++#[cfg(unix)]
++fn soft_link_dir<P: AsRef<Path>, Q: AsRef<Path>>(
++    src: P,
++    dst: Q,
++) -> io::Result<()> {
++    use std::os::unix::fs::symlink;
++    symlink(src, dst)
++}
++
++#[cfg(unix)]
++fn soft_link_file<P: AsRef<Path>, Q: AsRef<Path>>(
++    src: P,
++    dst: Q,
++) -> io::Result<()> {
++    soft_link_dir(src, dst)
++}
++
++#[cfg(windows)]
++fn soft_link_dir<P: AsRef<Path>, Q: AsRef<Path>>(
++    src: P,
++    dst: Q,
++) -> io::Result<()> {
++    use std::os::windows::fs::symlink_dir;
++    symlink_dir(src, dst)
++}
++
++#[cfg(windows)]
++fn soft_link_file<P: AsRef<Path>, Q: AsRef<Path>>(
++    src: P,
++    dst: Q,
++) -> io::Result<()> {
++    use std::os::windows::fs::symlink_file;
++    symlink_file(src, dst)
++}
++
++macro_rules! assert_tree_eq {
++    ($e1:expr, $e2:expr) => {
++        assert_eq!($e1.canonical(), $e2.canonical());
++    }
++}
++
++#[test]
++fn walk_dir_1() {
++    let exp = td("foo", vec![]);
++    let (_tmp, got) = dir_setup(&exp);
++    assert_tree_eq!(exp, got);
++}
++
++#[test]
++fn walk_dir_2() {
++    let exp = tf("foo");
++    let (_tmp, got) = dir_setup(&exp);
++    assert_tree_eq!(exp, got);
++}
++
++#[test]
++fn walk_dir_3() {
++    let exp = td("foo", vec![tf("bar")]);
++    let (_tmp, got) = dir_setup(&exp);
++    assert_tree_eq!(exp, got);
++}
++
++#[test]
++fn walk_dir_4() {
++    let exp = td("foo", vec![tf("foo"), tf("bar"), tf("baz")]);
++    let (_tmp, got) = dir_setup(&exp);
++    assert_tree_eq!(exp, got);
++}
++
++#[test]
++fn walk_dir_5() {
++    let exp = td("foo", vec![td("bar", vec![])]);
++    let (_tmp, got) = dir_setup(&exp);
++    assert_tree_eq!(exp, got);
++}
++
++#[test]
++fn walk_dir_6() {
++    let exp = td("foo", vec![
++        td("bar", vec![
++           tf("baz"), td("bat", vec![]),
++        ]),
++    ]);
++    let (_tmp, got) = dir_setup(&exp);
++    assert_tree_eq!(exp, got);
++}
++
++#[test]
++fn walk_dir_7() {
++    let exp = td("foo", vec![
++        td("bar", vec![
++           tf("baz"), td("bat", vec![]),
++        ]),
++        td("a", vec![tf("b"), tf("c"), tf("d")]),
++    ]);
++    let (_tmp, got) = dir_setup(&exp);
++    assert_tree_eq!(exp, got);
++}
++
++#[test]
++fn walk_dir_sym_1() {
++    let exp = td("foo", vec![tf("bar"), tlf("bar", "baz")]);
++    let (_tmp, got) = dir_setup(&exp);
++    assert_tree_eq!(exp, got);
++}
++
++#[test]
++fn walk_dir_sym_2() {
++    let exp = td("foo", vec![
++        td("a", vec![tf("a1"), tf("a2")]),
++        tld("a", "alink"),
++    ]);
++    let (_tmp, got) = dir_setup(&exp);
++    assert_tree_eq!(exp, got);
++}
++
++#[test]
++fn walk_dir_sym_root() {
++    let exp = td("foo", vec![
++        td("bar", vec![tf("a"), tf("b")]),
++        tld("bar", "alink"),
++    ]);
++    let tmp = tmpdir();
++    let tmp_path = tmp.path();
++    let tmp_len = tmp_path.to_str().unwrap().len();
++    exp.create_in(tmp_path).unwrap();
++
++    let it = WalkDir::new(tmp_path.join("foo").join("alink")).into_iter();
++    let mut got = it
++        .map(|d| d.unwrap().path().to_str().unwrap()[tmp_len+1..].into())
++        .collect::<Vec<String>>();
++    got.sort();
++    assert_eq!(got, vec![
++        canon("foo/alink"), canon("foo/alink/a"), canon("foo/alink/b"),
++    ]);
++
++    let it = WalkDir::new(tmp_path.join("foo/alink/")).into_iter();
++    let mut got = it
++        .map(|d| d.unwrap().path().to_str().unwrap()[tmp_len+1..].into())
++        .collect::<Vec<String>>();
++    got.sort();
++    assert_eq!(got, vec!["foo/alink/", "foo/alink/a", "foo/alink/b"]);
++}
++
++#[test]
++#[cfg(unix)]
++fn walk_dir_sym_detect_no_follow_no_loop() {
++    let exp = td("foo", vec![
++        td("a", vec![tf("a1"), tf("a2")]),
++        td("b", vec![tld("../a", "alink")]),
++    ]);
++    let (_tmp, got) = dir_setup(&exp);
++    assert_tree_eq!(exp, got);
++}
++
++#[test]
++#[cfg(unix)]
++fn walk_dir_sym_follow_dir() {
++    let actual = td("foo", vec![
++        td("a", vec![tf("a1"), tf("a2")]),
++        td("b", vec![tld("../a", "alink")]),
++    ]);
++    let followed = td("foo", vec![
++        td("a", vec![tf("a1"), tf("a2")]),
++        td("b", vec![td("alink", vec![tf("a1"), tf("a2")])]),
++    ]);
++    let (_tmp, got) = dir_setup_with(&actual, |wd| wd.follow_links(true));
++    assert_tree_eq!(followed, got);
++}
++
++#[test]
++#[cfg(unix)]
++fn walk_dir_sym_detect_loop() {
++    let actual = td("foo", vec![
++        td("a", vec![tlf("../b", "blink"), tf("a1"), tf("a2")]),
++        td("b", vec![tlf("../a", "alink")]),
++    ]);
++    let tmp = tmpdir();
++    actual.create_in(tmp.path()).unwrap();
++    let got = WalkDir::new(tmp.path())
++                      .follow_links(true)
++                      .into_iter()
++                      .collect::<Result<Vec<_>, _>>();
++    match got {
++        Ok(x) => panic!("expected loop error, got no error: {:?}", x),
++        Err(err @ Error { inner: ErrorInner::Io { .. }, .. }) => {
++            panic!("expected loop error, got generic IO error: {:?}", err);
++        }
++        Err(Error { inner: ErrorInner::Loop { .. }, .. }) => {}
++    }
++}
++
++#[test]
++fn walk_dir_sym_infinite() {
++    let actual = tlf("a", "a");
++    let tmp = tmpdir();
++    actual.create_in(tmp.path()).unwrap();
++    let got = WalkDir::new(tmp.path())
++                      .follow_links(true)
++                      .into_iter()
++                      .collect::<Result<Vec<_>, _>>();
++    match got {
++        Ok(x) => panic!("expected IO error, got no error: {:?}", x),
++        Err(Error { inner: ErrorInner::Loop { .. }, .. }) => {
++            panic!("expected IO error, but got loop error");
++        }
++        Err(Error { inner: ErrorInner::Io { .. }, .. }) => {}
++    }
++}
++
++#[test]
++fn walk_dir_min_depth_1() {
++    let exp = td("foo", vec![tf("bar")]);
++    let (_tmp, got) = dir_setup_with(&exp, |wd| wd.min_depth(1));
++    assert_tree_eq!(tf("bar"), got);
++}
++
++#[test]
++fn walk_dir_min_depth_2() {
++    let exp = td("foo", vec![tf("bar"), tf("baz")]);
++    let tmp = tmpdir();
++    exp.create_in(tmp.path()).unwrap();
++    let got = Tree::from_walk_with(tmp.path(), |wd| wd.min_depth(2))
++                   .unwrap().unwrap_dir();
++    assert_tree_eq!(exp, td("foo", got));
++}
++
++#[test]
++fn walk_dir_min_depth_3() {
++    let exp = td("foo", vec![
++        tf("bar"),
++        td("abc", vec![tf("xyz")]),
++        tf("baz"),
++    ]);
++    let tmp = tmpdir();
++    exp.create_in(tmp.path()).unwrap();
++    let got = Tree::from_walk_with(tmp.path(), |wd| wd.min_depth(3))
++                   .unwrap().unwrap_dir();
++    assert_eq!(vec![tf("xyz")], got);
++}
++
++#[test]
++fn walk_dir_max_depth_1() {
++    let exp = td("foo", vec![tf("bar")]);
++    let (_tmp, got) = dir_setup_with(&exp, |wd| wd.max_depth(1));
++    assert_tree_eq!(td("foo", vec![]), got);
++}
++
++#[test]
++fn walk_dir_max_depth_2() {
++    let exp = td("foo", vec![tf("bar"), tf("baz")]);
++    let (_tmp, got) = dir_setup_with(&exp, |wd| wd.max_depth(1));
++    assert_tree_eq!(td("foo", vec![]), got);
++}
++
++#[test]
++fn walk_dir_max_depth_3() {
++    let exp = td("foo", vec![
++        tf("bar"),
++        td("abc", vec![tf("xyz")]),
++        tf("baz"),
++    ]);
++    let exp_trimmed = td("foo", vec![
++        tf("bar"),
++        td("abc", vec![]),
++        tf("baz"),
++    ]);
++    let (_tmp, got) = dir_setup_with(&exp, |wd| wd.max_depth(2));
++    assert_tree_eq!(exp_trimmed, got);
++}
++
++#[test]
++fn walk_dir_min_max_depth() {
++    let exp = td("foo", vec![
++        tf("bar"),
++        td("abc", vec![tf("xyz")]),
++        tf("baz"),
++    ]);
++    let tmp = tmpdir();
++    exp.create_in(tmp.path()).unwrap();
++    let got = Tree::from_walk_with(tmp.path(),
++                                   |wd| wd.min_depth(2).max_depth(2))
++                   .unwrap().unwrap_dir();
++    assert_tree_eq!(
++        td("foo", vec![tf("bar"), td("abc", vec![]), tf("baz")]),
++        td("foo", got));
++}
++
++#[test]
++fn walk_dir_skip() {
++    let exp = td("foo", vec![
++        tf("bar"),
++        td("abc", vec![tf("xyz")]),
++        tf("baz"),
++    ]);
++    let tmp = tmpdir();
++    exp.create_in(tmp.path()).unwrap();
++    let mut got = vec![];
++    let mut it = WalkDir::new(tmp.path()).min_depth(1).into_iter();
++    loop {
++        let dent = match it.next().map(|x| x.unwrap()) {
++            None => break,
++            Some(dent) => dent,
++        };
++        let name = dent.file_name().to_str().unwrap().to_owned();
++        if name == "abc" {
++            it.skip_current_dir();
++        }
++        got.push(name);
++    }
++    got.sort();
++    assert_eq!(got, vec!["abc", "bar", "baz", "foo"]); // missing xyz!
++}
++
++#[test]
++fn walk_dir_filter() {
++    let exp = td("foo", vec![
++        tf("bar"),
++        td("abc", vec![tf("fit")]),
++        tf("faz"),
++    ]);
++    let tmp = tmpdir();
++    let tmp_path = tmp.path().to_path_buf();
++    exp.create_in(tmp.path()).unwrap();
++    let it = WalkDir::new(tmp.path()).min_depth(1)
++                     .into_iter()
++                     .filter_entry(move |d| {
++                         let n = d.file_name().to_string_lossy().into_owned();
++                         !d.file_type().is_dir()
++                         || n.starts_with("f")
++                         || d.path() == &*tmp_path
++                     });
++    let mut got = it.map(|d| d.unwrap().file_name().to_str().unwrap().into())
++                    .collect::<Vec<String>>();
++    got.sort();
++    assert_eq!(got, vec!["bar", "faz", "foo"]);
++}
++
++#[test]
++fn qc_roundtrip() {
++    fn p(exp: Tree) -> bool {
++        let (_tmp, got) = dir_setup(&exp);
++        exp.canonical() == got.canonical()
++    }
++    QuickCheck::new()
++               .gen(StdGen::new(rand::thread_rng(), 15))
++               .tests(1_000)
++               .max_tests(10_000)
++               .quickcheck(p as fn(Tree) -> bool);
++}
++
++// Same as `qc_roundtrip`, but makes sure `follow_links` doesn't change
++// the behavior of walking a directory *without* symlinks.
++#[test]
++fn qc_roundtrip_no_symlinks_with_follow() {
++    fn p(exp: Tree) -> bool {
++        let (_tmp, got) = dir_setup_with(&exp, |wd| wd.follow_links(true));
++        exp.canonical() == got.canonical()
++    }
++    QuickCheck::new()
++               .gen(StdGen::new(rand::thread_rng(), 15))
++               .tests(1_000)
++               .max_tests(10_000)
++               .quickcheck(p as fn(Tree) -> bool);
++}
++
++#[test]
++fn walk_dir_sort() {
++    let exp = td("foo", vec![
++        tf("bar"),
++        td("abc", vec![tf("fit")]),
++        tf("faz"),
++    ]);
++    let tmp = tmpdir();
++    let tmp_path = tmp.path();
++    let tmp_len = tmp_path.to_str().unwrap().len();
++    exp.create_in(tmp_path).unwrap();
++    let it = WalkDir::new(tmp_path).sort_by(|a,b| a.cmp(b)).into_iter();
++    let got = it.map(|d| {
++        let path = d.unwrap();
++        let path = &path.path().to_str().unwrap()[tmp_len..];
++        path.replace("\\", "/")
++    }).collect::<Vec<String>>();
++    assert_eq!(got,
++        ["", "/foo", "/foo/abc", "/foo/abc/fit", "/foo/bar", "/foo/faz"]);
++}
++
++#[test]
++fn walk_dir_sort_small_fd_max() {
++    let exp = td("foo", vec![
++        tf("bar"),
++        td("abc", vec![tf("fit")]),
++        tf("faz"),
++    ]);
++    let tmp = tmpdir();
++    let tmp_path = tmp.path();
++    let tmp_len = tmp_path.to_str().unwrap().len();
++    exp.create_in(tmp_path).unwrap();
++    let it =
++        WalkDir::new(tmp_path).max_open(1).sort_by(|a,b| a.cmp(b)).into_iter();
++    let got = it.map(|d| {
++        let path = d.unwrap();
++        let path = &path.path().to_str().unwrap()[tmp_len..];
++        path.replace("\\", "/")
++    }).collect::<Vec<String>>();
++    assert_eq!(got,
++        ["", "/foo", "/foo/abc", "/foo/abc/fit", "/foo/bar", "/foo/faz"]);
++}